190330-192029

190037-190931 subjects 190457-191344

^ Magic Quotes in Ruby?
190330 [nathan.olber] (I thought I posted this question just a bit ago but I can't find it
190331 [luke blansha] irb(main):004:0> s = "ab\"c\""
190332 [nathan.olber] Well, I'm glad you're paying attention to the obvious things, because I
190333 [jgbailey gma] Not really - use CGI.escapeHTML(str) and you are all set.

^ Extending Methods
190334 [geoffstanley] I'm working on a plugin system for a IRC client I'm currently making.
+ 190335 [james graypr] Can you please explain why inheritance and super are bad here?  They
| 190338 [geoffstanley] I don't want to use inheritence and super because that would mean each
| + 190340 [logancapaldo] class Plugin
| + 190341 [dharple gene] 1) Use Class#inherited
|   + 190342 [dblack wobbl] Although....
|   + 190715 [geoffstanley] Thanks for all the responses!
|     + 190790 [logancapaldo] # Changing Foo, so we temporarily disable warnings
|     + 190821 [pit capitain] Object.instance_eval { remove_const :Foo }
|       191726 [geoffstanley] This works nicely. Thanks!
+ 190350 [ara.t.howard] class Module
+ 190362 [sylvain.joye] You can use Module and super
  190370 [pit capitain] Super! :-) I didn't know that idiom. Thanks for sharing!

^ Trying to stir conversation in the rrobots community
190336 [gregcoit gma] I'm new to ruby, but enjoying learning it a great deal. And rrobots
190373 [simon.kroege] well there was some talk about new feature in february but all
+ 190418 [tom infoethe] Nope, not yet... we're trying to avoid that to help keep RubyForge nice
+ 190420 [steve waits.] Perhaps something that would be more maintainable would be to create
| 190445 [SimonKroeger] that would be great without a doubt, but I'm not able to provide an
+ 190498 [gregcoit gma] Simon,

^ Q about the FasterCSV
190347 [eric.wenbl g] test.csv
+ 190348 [botp delmont] # test.csv
+ 190349 [logancapaldo] Remember its "comma-separated", fiddling around I discovered that
  190356 [eric.wenbl g] In the csv file,
  190361 [botp delmont] # In the csv file,
  190364 [dave burt.id] No, it's not a bug. CSV is a simple delimited format. It's delimited by
  190367 [botp delmont] # No, it's not a bug. CSV is a simple delimited format. It's
  + 190369 [eric.wenbl g] I agree!
  + 190386 [james graypr] FasterCSV is intentionally a strict parser.  For one thing, that
  + 190423 [dave burt.id] Thanks, I think. (I don't know how many Rubyists Microsoft has - I don't
    190425 [james graypr] You should modify the above line too.  It takes both to correctly
    190428 [dave burt.id] I looked at this, but I deduced from [1] that a number of fields equal
    190433 [james graypr] Good points all around.  Dave knows this code better than I do,
    190446 [dave burt.id] Thanks, but credit to you -- IIRC part of your stated aim for FasterCSV
    190516 [botp delmont] # Oh, I don't want the patch. It's a terrible idea! "foo, bar, 'baz'"
    + 190517 [botp delmont] # > Good points all around.  Dave knows this code better than I do,
    | 190527 [james graypr] To me, the problem is solved.  For the record, that problem was that
    | 190528 [botp delmont] #
    | 190531 [gregory.t.br] I think both CSV and FasterCSV can do this.  Same rules apply though,
    | 190532 [botp delmont] # I think both CSV and FasterCSV can do this.  Same rules apply though,
    | 192017 [eric.wenbl g] Why 'a,"bc"d' could not be parsed correctly in both FasterCSV and CSV
    | + 192019 [ara.t.howard] a,"""bc""d"
    | + 192021 [dave burt.id] 1) Commas (,) separate fields. (You can pick a different delimiter if
    |   192029 [eric.wenbl g] Thanks for your patient and time, Dave
    + 190526 [james graypr] There's no problem with the space, correct.  The quote after it is

^ [ANN] open4-0.4.0
190351 [ara.t.howard] URIS

^ Q: how to undefined a class after declaration?
190352 [imadzen yaho] E.g. using irb, I created class A and then class B, later I realized
190353 [logancapaldo] irb(main):001:0> class A
190354 [imadzen yaho] Thanks Logan Capaldo. It works.
190355 [logancapaldo] remove_const just removes the constant named 'B'. Your instances

^ object available in one class but not another?
190366 [gregcoit gma] Playing around more with rrobots.
190382 [dave burt.id] I'm going to ignore your question in hope that this advice is as useful
190483 [gregcoit gma] Dave,

^ from block to code (also: how to get the bindings of a block)
190368 [kiaroskuro g] Does anyone know how to convert a block to a string representation of
+ 190383 [dave burt.id] Read the source file?
| 190400 [kiaroskuro g] how would I know what is the source file and lines associated with a block?
| + 190413 [dave burt.id] OK, here are some practical options. (Sorry for the previous comment. I
| | 190416 [kiaroskuro g] The quiz is a great resource, thanks.
| + 190434 [banshee bans] Does ParseTree solve your problem?
|   190641 [kiaroskuro g] -local.html
|   190655 [dave burt.id] "The end" meaning "return the block's local variable binding" is a very
+ 190793 [drbrain segm] lib/r2chacks.rb in ZenHacks has this.
  190798 [kiaroskuro g] I'll check it out thanks.
  + 190902 [drbrain segm] I doubt your problem is really that special.
  | 190909 [kiaroskuro g] it's special in respect to the fact that goes against the boundaries of the
  | + 190910 [lukfugl gmai] This is my big question; why do you need the equal signs? I see
  | | 190913 [kiaroskuro g] I realize that would make it much easier in ruby.
  | | + 190926 [ara.t.howard] it would be tough to convince me that people wouldn't find this syntax
  | | | 190927 [kiaroskuro g] I am aware of this technique, something very similar was also described in =
  | | + 190948 [rossrt rosco] In return for keeping the equals signs, would the users let you get away
  | |   190950 [kiaroskuro g] Not sure about the ATs. even if I don't mind them that much... if I unfocus
  | |   + 190951 [james graypr] In a word:  yuck.  :)
  | |   | 190956 [kiaroskuro g] seriously, can you think of another  'last word' that fits well at the end
  | |   + 190955 [rossrt rosco] Without looking, I'd guess def the; binding; end ? (Quick look, done
  | |   | + 190957 [kiaroskuro g] True, I need to check variables before and after calling the block and work
  | |   | | 190961 [rossrt rosco] Hmm, not really. I guess if you really have to have the superfluous
  | |   | | 190963 [james graypr] That's the best variation of the binding trick, in my opinion.
  | |   | | 190983 [rossrt rosco] Yeah, couldn't agree more. The whole thing seems kind of clunky and
  | |   | + 190986 [chneukirchen] recipe "english breakfast" do |take|
  | |   |   190987 [kiaroskuro g] I like it :-)
  | |   |   190992 [chneukirchen] Ideally
  | |   |   191062 [kiaroskuro g] RiffRaff has driven the last meta-nail in my coffin with this inventive
  | |   + 190971 [binary42 gma] If you really want the = look you can capture the binding with the
  | + 190935 [drbrain segm] def recipe(name, &block)
  |   190939 [kiaroskuro g] my users like them :-)
  + 190937 [logancapaldo] I dunno know about the binding (maybe you can use method_missing +
    190940 [kiaroskuro g] If it works, it's brilliant!

^ I have some problem with convert to symbol, in Hash object
190371 [iiskakov iss] => {"fax"=>"80233923293", "name"=>"Ilyas store",
+ 190372 [botp delmont] # I want to convert "name" to :symbol
+ 190378 [shortcutter ] Hash[*str.scan(/store\[([^\s,]+)\s*\]=\s*([^,]+)/).map{|k, v|

^ Trouble migrating formula from JavaScript to Ruby
190374 [ingoweiss gm] I am trying (unsuccessfully) to migrate a formula (for calculating
+ 190375 [botp delmont] # dlng = p2_lng - p1_lng
| + 190377 [reid.thompso] is dlng a typo, the first formula uses dlon?
| + 190426 [ingoweiss gm] Turned out that I needed to convert the numbers to radians. Here is the
+ 190376 [kiaroskuro g] is it possible that you need to make numbers explicitly float? eg: 2 --> 2.0

^ Pickaxe 1 & 2 - Worth the upgrade?
190379 [doug.bromley] I was just wondering if it would be worth me buying the second edition of
+ 190384 [botp delmont] # I was just wondering if it would be worth me buying the
| 190429 [warrens actc] Plus, if you get the PDF, then they refresh it for free when there are changes.
+ 190388 [rmagick gmai] Yes, the 2nd edition includes material about Ruby 1.8 that isn't present

^ Rake default == -T
190381 [transfire gm] Is it possible to make the default task the same as using the -T
190385 [james graypr] I assume you could make a task that shells out to rake -T.
190389 [transfire gm] Thanks, James. Turns out that doesn't work so well. But your suggestion spark an
+ 190402 [Bil.Kleb nas] This doesn't work for me, viz,
+ 190403 [taschini.mli] task :tasks do
  190430 [Bil.Kleb nas] Works for me now.

^ [SUMMARY] Text Munger (#76)
190387 [james graypr] Obviously, this is not an overly difficult problem.  Here's a small, but pretty
190395 [dblack wobbl] "Are you kiddin'?!" he exclaimed :-)
190397 [james graypr] I meant that scrambling long runs of punctuation didn't really seem
190401 [dblack wobbl] I gues "Are you kiddin'?!" is a bit of a stretch -- though possible --
190408 [james graypr] You bring up some good points.
190411 [robert.dober] This is jewel James, but just tell me what will they become than?
190415 [james graypr] If I understood the question correctly, David is trying to show that

^ Day number delta
190390 [lindsay.boyd] How can I calculate the number of days between two Date objects?. This
+ 190399 [lindsay.boyd] (Date.parse(date2.to_s) - Date.parse(date1.to_s)).to_i
+ 190405 [khaines enig] delta = a - b
  190407 [taschini.mli] require 'date'

^ "Unrequire" a file ?
190391 [tuka yorn.ne] after making changes to a particular file,
190394 [halostatue g] ri Kernel#load
190398 [vincent.isam] Well, you could also remove the file from the array $", and rerequire
190431 [tuka yorn.ne] many thanks for your input.

^ Where are the Test::Unit meta tests?
190392 [thiago.arrai] I suppose Test::Unit has tests for testing itself, but I can't find
190432 [Bil.Kleb nas] Regards,
190440 [thiago.arrai] Thanks, Bill.

^ (none)
190393 [Hinnerk.Ries] I have an installation problem with openSSL

^ Sorting with Hash
190396 [u_dinesh yah] I have a hash like this and i want to sort. After sorting i want the key
190404 [simon.kroege] h = { "c" => 20, "b" => 30, "a" => 10  }
190406 [simon.kroege] Sorry, after reading your post again I guess I haven't

^ help help help!
190409 [speechexpert] How to unsubscribe?
190410 [matthew.moss] That's because they're at the top, in the headers.
190414 [jmg3000 gmai] The main Ruby mailing lists page (

^ Last (more or less) call for Google Summer of Code mentors!
190419 [dblack wobbl] As you know, Ruby Central is participating this year as a Google
190422 [pollak gmail] David,

^ Integration/Antidifferentiation Program
190435 [SleepJunk13 ] I'd like to write a program to integrate derivatives to save time on
+ 190437 [jesusrubsyou] Hm... you'll probably strengthen your derivation and integration skills
| + 190439 [klancaster19] And just to add to that a bit - doing integration with a computer is
| + 190441 [steve waits.] I agree.  Matt didn't say how he wants to solve them, but if he wants to
| + 190442 [SleepJunk13 ] I can integrate and derive perfectly fine. It's more of "I just want to
|   + 190447 [logancapaldo] I think you're going to have to look at the source of some other
|   | + 190448 [edder tkwspi] Maxima is an open source symbolic solver/integrator, so you could start
|   | + 190449 [stuart footw] Just for normal college/university level calc1&2, you will need
|   |   190458 [SleepJunk13 ] After hearing all of this and talking to a co-worker (programmer who has
|   + 190675 [znmeb cesmai] Basic symbolic differentiation is a piece of cake. It's usually done as
+ 190486 [gilesb gmail] First of all I'd like to disagree with everybody who told you you'd be
| 190495 [SleepJunk13 ] Thanks a lot for that book, I'll have to check the book store and read
| 190500 [SleepJunk13 ] So.. I have no idea where to start.
| 190502 [curi curi.us] Maybe you should figure out a format for storing polynomials, make a
| + 190505 [jjhartley at] Come on, Google is your friend.  I searched for "symbolic differentiation" & found several hits to projects & code libraries which do exactly what you are wanting to do.  Granted, a number of these are written in languages other than Ruby, but you should still be able to understand them well enough to get an idea of where to start on your own.
| + 190676 [znmeb cesmai] Hmmm ... there's actually a C++ library for writing computer algebra
| | 190682 [stuart footw] As this is a calc student, I would assume he want to write the whole thing.
| + 190705 [chneukirchen] Christian Neukirchen  <chneukirchen@gmail.com>  http://chneukirchen.org
+ 192005 [bodanger vt.] I've been thinking about doing something like this myself, just for
  192011 [znmeb cesmai] A look at Axiom or Maxima (open source) or Derive (closed source but
  192013 [gilesb gmail] I know nada about calc, but for what it's worth, it's used as a

^ Gateway and the new ruby-talk-google archive
190436 [transfire gm] Though everyone should know about the status of the news<->mail
190444 [florgro gmai] There also is http://news.gmane.org/gmane.comp.lang.ruby.general
190463 [jesusrubsyou] Not to forget http://www.ruby-forum.com (which I use).
190511 [transfire gm] Which actually would be a great place for gateway to the newsgroup too.

^ OT: Vim->Ruby and back ?
190438 [Meino.Cramer] sorry for this offtopic mail, but I asked this on the vim-user
+ 190443 [reid.thompso] I pulled this from the web, or the mailing list, somewhere..... a google
| 190515 [Meino.Cramer] Thanks a lot for that trick, Reid ! :)
| + 190521 [gregory.t.br] map <C-R> :!ruby %<CR>
| | + 190522 [gregory.t.br] sorry... did not fully read your post.  I don't know how to load it
| | + 190524 [Meino.Cramer] I inserted the above mapping into $HOME/.vimrc .>
| |   190525 [gregory.t.br] hmm... looks like it needs to be run against a saved file.  :(
| |   + 190540 [pit capitain] How about
| |   + 190573 [ mfp acm.org] * F7 in visual mode evaluates the selected area; temporary files are used so
| + 190552 [ruby anthrop] } > > Hi,
|   190556 [ruby anthrop] }
+ 190541 [rossrt rosco] I've wanted this myself, but never quite got there.

^ Fishing in Ruby
190450 [fishing fish] sea =<<END_OF_SEA
+ 190451 [dblack wobbl] But does it scale?
| + 190452 [Alan.Fritz y] Are you doing this for the halibut? ha!
| | 190453 [warrenbrown ] Stop this before I write a poisson pen letter.
| | + 190454 [jason persam] Stop floundering and get back to work.
| | + 190455 [dblack wobbl] Don't you want to know who the upstream author is?
| |   + 190456 [Alan.Fritz y] are you returning all exceptions to Fishman?
| |   + 190467 [jesusrubsyou] I think the net result of this thread will be next to nil...
| |     + 190468 [dblack wobbl] We'll sea.
| |     + 190469 [jake.mcarthu] I'm getting sick of ex-salmoning these stupid puns.
| |       + 190506 [jesusrubsyou] Perhaps Ruby book publishers believe that popular mailing list threads
| |       + 190523 [gregory.t.br] Yeah, it's a real pain in the bass. ;)
| |       + 190536 [sjc2000_uk y] For sure, there's no plaice here for them....
| |         + 190537 [danielbaird ] Surely there has been enough carping on.. we should stop baiting each
| |         | 190551 [Alan.Fritz y] Yes, I agree. This is all becoming one big flaming fugu...
| |         | 190554 [syarus gmail] I'm floundering around, hoping there will be a reel end to this
| |         | 190620 [gilesb gmail] I think it may be a while before this thread hits its fin ish.
| |         | 190623 [jmg3000 gmai] Nah. This is just a fluke. The bad puns will abait any minute now.
| |         | 190632 [gilesb gmail] You're right. We've definitely passed the point where anyone else will dive in.
| |         | 190633 [agorilla gma] Parsing all these bad puns is giving me a haddock.
| |         | 190634 [vladgalu gma] *chime* I subscribed to the list after this thread was started.
| |         | + 190635 [Alan.Fritz y] It's a loooooong fish story....
| |         | + 190636 [agorilla gma] It's been sinking ever since.
| |         | + 190637 [syarus gmail] Yes, a whale of a tail....
| |         | + 190638 [ruby crazyte] Welcome, it's good to see more people getting their feet wet with Ruby!
| |         |   190639 [Alan.Fritz y] Yes we usually don't see this much carp over one thread but Welcome!
| |         |   190640 [charlie cast] I just followed a link earlier in this post to the ruby forum.  Google
| |         |   + 190644 [robert.evans] That post sure hooked a lot of rubyists. Though some of the responses
| |         |   | 190647 [ruby philip.] Is there a porpoise to this thread anymore?
| |         |   | + 190648 [matthew.moss] Bass to leave it alone.
| |         |   | + 190649 [gregory.t.br] probably not, but it's sure made quite a splash.
| |         |   |   190661 [jesusrubsyou] Someone please put some actual Ruby cod in a post...
| |         |   |   190677 [znmeb cesmai] Could you say that again ... I'm hard of herring
| |         |   |   190678 [billk cts.co] Mahi-mahi, the lure of this thread.  Any usenet groupers joined the
| |         |   + 190652 [stuart footw] And suprisngly probably have gotten a click or two to those sites.
| |         |   + 190683 [dblack wobbl] Darn, I *knew* I should have named my book "Ruby for Fly Fishermen Who
| |         |     + 190684 [vjoel path.b] A Ruby Runs Through It on Rails ?
| |         |     + 190697 [dblack wobbl] s/second/section/.  I plead jet-lag.
| |         |       191326 [jesusrubsyou] And here I thought this thread was dead.
| |         |       191417 [louis.j.scor] I suppose he cod, but really what porpoise would that serve?
| |         |       + 191418 [rubytalk eac] I suggest that you listen to the tuna called: Wet Dreams by Dr.Demento
| |         |       + 191468 [jesusrubsyou] Oh buoy, here we go again...
| |         |         191473 [kevin.jackso] Is this going to be one of those long-running OT threads that last forever?
| |         |         191491 [simonbarron ] I'm just waiting for the Perl fishers to join in.
| |         |         191501 [syarus gmail] I'm too Bizet to mess with Perl fishers.
| |         + 190538 [syarus gmail] Really, I second that flatly.
| + 190465 [jesusrubsyou] Now THAT was a groaner if I ever saw one.  ;)  hehehe
+ 190466 [jesusrubsyou] Just as I thought: Your code doesn't run.  ;)
  190470 [fishing fish] IRB can't handle the fish. It runs reel well using regular ruby command.
  + 190473 [Alan.Fritz y] so your not fishing off the same platform?
  | 190493 [danielbaird ] Perhaps the original poster was just fishing for compliments.
  | 190501 [phurley gmai] I believe he was trolling
  + 190507 [jesusrubsyou] Can someone explain what's happening with the line, then?  Is it using
threads.html
top