122279-124019

122070-123594 subjects 122482-123428

ParseTree 1.2.0 Released
122279 [ryand@ze sp ] ParseTree version 1.2.0 has been released!
122289 [sstephenson@] This looks exciting. I can't wait to install the Gem.
122326 [ryand-ruby@z] Go for it. I look forward to your feedback.

Ruby documentation.
122288 [afabian@au t] I'm kind of getting the impression that Ruby might not be
+ 122290 [dblack@wo bl] Welcome to Ruby :-)
| 122294 [dga@lc .m t.] Buy/rent/borrow/beg the pickaxe book.  The class reference at the end is
| 122304 [jd@no pa .c ] I have a hardcopy of pickaxe 2nd edition (by Dave Thomas) and think it
| 122311 [transami@ru ] For Ruby 2 and Pickaxe III, I'd really like to see a high quality Hardback
| 122467 [pragdave@gm ] You you pay $10 more for it? We decided not to go hardcover because we
| + 122489 [mvondung@gm ] I would. IT books are expensive anyway, so an additional ten bucks
| + 122677 [johnwilger@g] I tell you what I'd pay $10-$20 more for is an edition with a
|   122679 [pragdave@gm ] Wire binding would be nice. In the meantime, PickAxe 2 does have a
|   122685 [johnwilger@g] Sadly, that wasn't my experience. :-(  (Don't take that as a complaint
|   122689 [vanweerd@gm ] I tried it after reading this. I had to press down a bit, to "break it
+ 122300 [nick@ac iv h] I think that may have been the case a few years ago, but I don't think
| 122331 [none@no e. e] Although that may be true, I think that the present state of Ruby's
| + 122338 [rff_rff@re o] about the Socket stuff. I always wondered why there was documentation
| | 122468 [pragdave@gm ] That's about it. Be careful though--some stuff has changed in socket
| + 122363 [cameron.mcbr] It is good to realize ruby docs are not on the same level as perl or
| | 122390 [jamesUNDERBA] This sort of hand waving does more harm than good.  Rationalizing the
| | 122414 [cameron.mcbr] Heyo,
| | 122420 [jamesUNDERBA] And I'm sorry if I came off as harsh or dismissive.   I think I was
| + 122384 [nick@ac iv h] Those are good points, and important ones.
|   122399 [jamesUNDERBA] I'm pretty sure that any new source code documentation has been going
|   122451 [gsinclair@so] Oops, I gotta update that statement; there's been a few other
|   122455 [jamesUNDERBA] Has anything new in PickAxe II found a place in the core or stdlib docs?
|   122470 [pragdave@gm ] I contributed _all_ of the core documentation from the initial version
|   122472 [jamesUNDERBA] Many thanks.
+ 122343 [langstefan@g] I have got books for Perl in English and German (my native language) but
| + 122353 [johnwilger@g] Of course, one of the great things about Ruby is that---after you have
| + 122385 [nick@ac iv h] Regards,
+ 122424 [drbrain@se m] The less commonly used a particular library is used, the less likely it
  + 122428 [james@gr yp ] I'm not sure how well that theory holds up.  abbrev is documented, but
  + 122436 [jamesUNDERBA] Thanks Eric.

[rdoc] sections-patch
122291 [mneumann@nt ] # - - - - - - - - - - - - - - - - - -
122477 [pragdave@gm ] I've done something that has the same effect, but which I think is more
122504 [mneumann@nt ] Great!
122513 [pragdave@gm ] I'm not sure I see the benefit, but I'm probably being dense today. I
122515 [mneumann@nt ] I am totally happy with your current implementation. I only thought,
122519 [pragdave@gm ] You can do that (and the description appears under the section in the
122521 [mneumann@nt ] Sure. What is even more useful IMO, is the ability to group
122605 [ichlesekeine] yes, sure :)

TopLevel Delegate
122292 [transami@ru ] but it doesn't seem to want to "singularize". I've tried the Singleton module

[OFF] How to introduce Ruby to more people.
122296 [ruby@3c .c m] Ruby in our country is strangeness,many people even have not hear about it.
+ 122301 [jd@no pa .c ] Show them example ruby code that uses blocks, iterators and exception
| 122341 [rasputnik@he] One cannot make an omelette without breaking eggs -- but it is amazing
+ 122333 [jan@sp m. pa] Don't try to describe it. No description really captures the beauty and
  122339 [rff_rff@re o] I agree with this. BTW I think that one of the best way to show ruby is

Ruby + FastCGI + Apache2 + Debian Sarge
122298 [jd@no pa .c ] Is anyone out there successfully using this setup by using
+ 122317 [jk@mi ro al ] This seems to be because of the following phrase in the LICENSE.TERMS of
+ 122321 [    s@xs .d ] As always I'm not sure about the name, but I see
  122401 [jd@no pa .c ] Thanks! I have no idea why I didn't spot that in sid when I took a look.

* usage
122312 [transami@ru ] I've come across this a few times now and don't understand why its a syntax
+ 122315 [matz@ru y- a] Because operators only take fixed number of arguments.  If you want to
+ 122316 [transami@ru ] Sorry, that could be clearer since << doesn't take multiple arguments (too bad
| 122335 [mneumann@nt ] how about
+ 122410 [flgr@cc n. e] Are you sure you don't want to do this?
  122440 [transami@ru ] I'm sure I would ;) I was just pointing out that the other throws a syntax

What version of Ruby should I use?
122314 [afabian@au t] I noticed the download page has a couple of options, like 1.8.1, or
122356 [james@gr yp ] I'm normally a "go with the latest stable version" kind-of-guy.

IRB + Windows + German keyboard = no square brackets
122318 [martin.anker] the square brackets [ and  ]. Even copy & paste from another editor
+ 122322 [    s@xs .d ] s.
+ 122334 [ryco@gm .n t] I *think* that someone already answered that question the last time you
  122650 [martin.anker] Sorry, I though google groups ate my posting because it did not appear

[rdoc] file vs. class comments
122337 [mneumann@nt ] # this is my class
122340 [ruby@br an s] I'd think that it would be enough to include one line in the beginning of the

Tk mouse events and keys
122344 [mark@oc we .] I'm using the following code to detect a left mouse click.
122354 [nagai@ai ky ] Please see Tcl/Tk's "bind" manual. :-)

[QUIZ] crossword.rb (#10)
122348 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 122349 [james@gr yp ] Wow, I'm full of mistakes this week, aren't I?!  Egad!  I promise to
+ 122351 [gavin@re in ] Is the question in this quiz "Figure out what the quiz is about?"

[QUIZ] Crosswords (#10)
122350 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
122614 [pit@ca it in] here's another solution. When I read the quiz my first thought was about using
122620 [transami@ru ] Very intersting approach, Capitain. I had thought something like this would be
122655 [pit@ca it in] Please call me by my first name, Pit. Otherwise it interferes with the feeling
122751 [Harry_Ohlsen] ...

OT: good chat client?
122359 [itsme213@ho ] which one would you recommend? sorry for the noise, but it is primarily for
+ 122362 [michael.deha] I assume you are using OS/2 or Netware?   :)
| 122366 [itsme213@ho ] lol!
| + 122370 [nick@ac iv h] I've only been on IRC for about 10 days, but its a great ruby resource.
| + 122375 [rff_rff@re o] lots of people hates it but I always found mirc quite good. Simple with
|   122381 [pat.eyler@gm] I've been playing with (and enjoying) erc .... it should work anywhere
|   122437 [lyndon.samso] I use Miranda for IM, I'm pretty sure it has an IRC plugin as well.
+ 122364 [cameron.mcbr] Cameron

[nuby] about ruby multithreading
122367 [lthiryidontw] Is Ruby multithreading cooperative or preemptive?
122368 [james@gr yp ] Preemptive.
122372 [mneumann@nt ] Thread.new {
+ 122378 [lthiryidontw] Thanks all,
+ 122394 [drbrain@se m] No, system does not block other ruby threads.
  122525 [lthiryidontw] Thanks for the remark... I was a bit confused about my interpretation of
  122551 [drbrain@se m] Maybe only on (some) windows builds it blocks?  I no longer have a
  122691 [lthiryidontw] I haven't correcly explained. On my w2k, the sleep command simply
  122729 [drbrain@se m] Yes, I know.

GC run at end of script execution - order in which objects are claimed?
122371 [tilman@co e-] when ruby finished executing code, it will invoke the GC to claim all
+ 122373 [decoux@mo lo] It's like the key for an hash : there is a defined order but you can't
| 122376 [tilman@co e-] Okay.
| 122383 [decoux@mo lo] I can *only* give you an example
| 124019 [tilman@co e-] Thanks, I'll consider jumping through all of this hoops to make it work.
+ 122374 [matz@ru y- a] Yes, GC calls destructors (dfree) in random order.
  + 122379 [tilman@co e-] That would be very hackish IMHO :/
  | + 122409 [matz@ru y- a] I'm not sure how much hackish it is.  Basically all resources are
  | | 122423 [glenn.parker] A counter-example would be creating a named pipe, or a shared memory
  | | 122512 [matz@ru y- a] I think we are saying same thing.  My "something that can not be
  | | 122529 [glenn.parker] Yes, we are saying the same thing.
  | + 122411 [matz@ru y- a] Oh, I got an idea.  How about making a parent free its children
  + 122550 [tpeters@in a] In the past, I made use of the end-of-process freeing for testing

Newbie question
122392 [CAWilliams@c] ...
+ 122393 [sera@fh an .] @limit = @params["limit"] || 50
+ 122395 [jamis_buck@b] @limit = @params["limit"] || 50
+ 122412 [flgr@cc n. e] I'd do something like this

Multiple Ensure Blocks
122396 [gjenkins@xc ] I'm considering raising an RCR: "allow multiple ensure blocks". I've
+ 122398 [jamis_buck@b] begin
| 122453 [gsinclair@so] If 'puts 1' throws an exception...
+ 122406 [drbrain@se m] class Session

how to create an object of a class you don't know yet
122402 [todd.bradley] I'm trying to create an object, but which specific class needs to be
+ 122403 [drbrain@se m] klass = answer.split('::').inject(Object) { |klass,const|
+ 122404 [sera@fh an .] "new" is just a class method, and you can call class methods on classes
+ 122405 [jamis_buck@b] myobj = eval("Foo.new")
| 122408 [todd.bradley] Thanks for all the suggestions, everyone.  I had guessed
| 122413 [flgr@cc n. e] It's Module#const_get. Object is a Class and thus a Module and thus
+ 122491 [daneelvt@la ] class GMClassManager
  122520 [flgr@cc n. e] Using a constant instead would be nicer, I think.

*sigh* Anyone having wireless working on a linux machine?
122416 [abe_ml@bo em] ...
+ 122417 [carlwork@yc ] Forgive me, but what does this have to do with Ruby?  Did you mean to
+ 122429 [hans@fu al n] They're right, it's off-topic. But there's likely a local linux user's
  + 122439 [jamesUNDERBA] I had a Lucent/Orinoco WiFi card running under RH 7.x a few years ago.
  + 122459 [abe_ml@bo em] Thanks for the encouragement - everyone. :-) I'll stick with it another day
    + 122463 [vanweerd@gm ] I used ndiswrappers to get my wireless lan card working (linksys)  and
    + 122483 [aredridel@gm] Y'might be surprised. Go check out the college. There's linux geeks

[OFF] RE: *sigh* Anyone having wireless working on a linux machine? (ruby development machine)
122421 [abe_ml@bo em] Whoops, sorry, I forgot to mention that a lot of the reason I'm
122422 [michael.deha] * SSH from your Windows or Mac laptop into a non-laptop Linux box.
122461 [ilveroluca@n] Try posting to comp.os.linux.hardware or comp.os.linux.misc.  There's been
122507 [michael.deha] My last response on this thread, but I thought I would add...

How do you use delegate.rb?
122434 [james@gr yp ] I'm pretty close to having delegate.rb documented, but I want to
122454 [ryand-ruby@z] look in tempfile.rb

Base64 packing question
122435 [sandspace@gm] I'm packing up a file into an e-mail attachment using base64 encoding
+ 122442 [sroberts@un ] Not sure why you think that pack wil concatenate the array before
| 122450 [sandspace@gm] Thanks. It works now.
| 122465 [sroberts@un ] Its got good advice, thats an odd-ball header, and I wouldn't actually
+ 122458 [drbrain@se m] The Array in Array#pack is like a C struct, and the argument to pack is

[BUG] unknown node type 0
122441 [joe.vandyk@b] When I run the following program under Ruby 1.8.2 (2004-11-30) (I think it's
122478 [jamis_buck@b] Any chance you could try recompiling Ruby with a different version of

Using yield
122444 [joe.vandyk@b] I come from a heavy C++ background, discovered Ruby a few months ago and
+ 122445 [sstephenson@] When you want to write methods that take blocks.
| + 122447 [dblack@wo bl] You don't need &block there, since you don't use the block directly
| + 122476 [joe.vandyk@b] Yes.  What types of methods generally should take blocks?
|   + 122498 [rff_rff@re o] [1] those when behaviour can be further specified.
|   + 122548 [billk@ct .c ] My most recent use of yield is in a tree-structured database,
|     122555 [jim@we ri hh] This is a very common use of blocks.  You might consider the following
|     122561 [billk@ct .c ] Nice, thanks !!
+ 122446 [cyclists@nc ] I use it with methods that create resources that need to be cleaned up
+ 122464 [dga@lc .m t.] I use it to pass in an additional filtering routine to
+ 122540 [ruby@br an s] Yield is just a shortcut for block.call.
| + 122542 [dblack@wo bl] 'yield' is equally explicit, and equally unambiguous.  It tells you
| | 122612 [ruby@br an s] I see it as not as explicit, as it does not document in the method signature
| | 122622 [dblack@wo bl] That actually doesn't tell you much, though, in practical terms.  Any
| + 122543 [vjoel@PA H. ] Yield has an advantage: rdoc can recognize it and generate docs for it,
+ 122590 [bob.news@gm ] "Joe Van Dyk" <joe.vandyk@boeing.com> schrieb im Newsbeitrag
  122607 [flgr@cc n. e] irb(main):022:0> def five_times
  122613 [dblack@wo bl] Wouldn't the &block form be more clutter?  Well, not that it's so
  122794 [bob.news@gm ] "David A. Black" <dblack@wobblini.net> schrieb im Newsbeitrag
  122830 [dblack@wo bl] n.times {|i| b.call(i) }
  + 122872 [discordantus] I forward blocks a lot in my own code, and wish there was a way to get
  + 122896 [bob.news@gm ] "David A. Black" <dblack@wobblini.net> schrieb im Newsbeitrag
    122917 [dblack@wo bl] I think we're talking about different sets of "two idioms", but I see
    122920 [bob.news@gm ] "David A. Black" <dblack@wobblini.net> schrieb im Newsbeitrag
    122925 [dblack@wo bl] I think my vague concern about argument parsing has to do with the
    122929 [bob.news@gm ] "David A. Black" <dblack@wobblini.net> schrieb im Newsbeitrag

hide/show items on TkCanvas?
122457 [mark@oc we .] If I have an item on a TkCanvas such as a Rectangle, is there a way to hide
+ 122462 [nagai@ai ky ] Probably, the simplest way is to move the item to out of
+ 122485 [Ephaeton@gm ] I don't know Ruby/Tk, but I do know Tk, and the canvas supports this via
  122486 [nagai@ai ky ] You are right. 'state' option is supported on Tk8.3+ (is it right?).
  122488 [Ephaeton@gm ] Moin,

Selector namespaces in 2.0 ?
122460 [itsme213@ho ] Is it likely that Ruby 2.0 will have selector namespaces? If so, is

Compile from stable snapshots segfaults
122466 [Meino.Cramer] when compiling the stable snapshot of rub yof the 4.Dec with
122501 [decoux@mo lo] it's corrected in CVS, retrieve the patch from [ruby-core:03882]

"make test" bombs for stable snapshot
122469 [sera@fh an .] I'm trying to build tonight's stable snapshot (as of Sat Dec 04
122502 [decoux@mo lo] Probably the same here (I've not verified) try with the patch in

Possible  opportunity for Rails development
122471 [jamesUNDERBA] I don't think this has come up here before, but Dave Winer is  looking
122473 [sera@fh an .] Are there people saying this could be done in any other language
+ 122474 [jamesUNDERBA] Yes.
| 122518 [sera@fh an .] Oh, for Pete's sake. I actually read that Tim Bray entry when it came
+ 122480 [nightphotos@] Further up on that same page Dave Winer says: "People ask if C# or
  122481 [jamesUNDERBA] But is this true?
  122499 [rff_rff@re o] Well, but ruby /is/ slow.. maybe a mixed code solution could fit..

Ruby 2.0
122475 [joe.vandyk@b] When is Ruby 2.0 due?  Or estimated due date?
122492 [binary42@gm ] I will be done as soon as someone makes it. A number of projects are
+ 122493 [binary42@gm ] (It* will be done -- typo ;) )
+ 122544 [w_a_x_man@ya] 32.times{|y|print" "*(31-y);(y+1).times{|x|print~y&x>0?" .":" A"};puts}
  122549 [flgr@cc n. e] 32.times{|y|print" "*(31-y),(0..y).map{|x|~y&x>0?" .":" A"},$/}
  + 122554 [intinig@gm i] This really is wonderful, but the most wonderful thing its that I
  | + 122563 [vanweerd@gm ] What would be "good form" for the sig for production code?
  | + 122604 [flgr@cc n. e] 32.times{|y|...}: We are going to output 32 lines and we'll need to know
  |   + 122615 [intinig@gm i] Thank you for the wonderful explanation. This was the most difficult
  |   + 122633 [lyndon.samso] Is this an example of a Sierpinski Triangle?
  |     122634 [binary42@gm ] Yes.
  |     + 122635 [lyndon.samso] Stay tuned for a mail client written in or with ruby embedded that
  |     | 122742 [usenet@pl nz] Well, maybe that's overkill. This simple script is as good...  ;-)
  |     + 122636 [transami@ru ] Could we see it any way?
  |     + 122637 [sdate@ev re ] And we (my son and I) are struggling with writing the recursive version
  |     | 122639 [botp@de mo t] //Stay tuned for a mail client written in or with ruby embedded
  |     | 122640 [botp@de mo t] //And we (my son and I) are struggling with writing the
  |     | 122709 [shanko_date@] It is very old and not complete but it can get you
  |     + 122664 [mneumann@nt ] actually a four liner...
  |     | + 122669 [gsinclair@so] Running that on Cygwin, I get
  |     | | 122671 [mneumann@nt ] Probably due to 'display'. The ruby code generates a .pnm image, which
  |     | | 122754 [gsinclair@so] But the code doesn't require rmagick, does it?
  |     | | 122796 [mneumann@nt ] no it doesn't require rmagick. it generates the pnm image itself (and
  |     | + 123029 [news@al m. p] Wow, this is great.  :)
  |     + 122761 [docboobenste] I'd love to see more one-liners. They're a fun way to spread the Ruby gospel :)
  |     | 122763 [botp@de mo t] //> I am looking into lego robots just to lure them
  |     + 122861 [lispamateur@] You inspired me to another triangle one.
  |       122862 [ruby@br an s] You've got a type in there. It should be require "matrix" not require "Matrix".
  |       122868 [lispamateur@] Yes, it works on Windows, but I changed it for future use. Thanks.
  |       122870 [transami@ru ] ruby -e'require"matrix";a=[1];(1..10).each{|n|print" "*(10-n)*3,a.map{|i|\
  |       122874 [batsman.geo@] ruby -rmatrix -le'a=[1];10.times{|n|print" "*(9-n)*3,"%3d   "*a.size%a;a<<0;a=(
  |       + 122888 [lispamateur@] Optimal once you know the stuff - I'm learning!
  |       + 122890 [lispamateur@] Obvious once you know the stuff - I'm learning!
  |         + 122893 [transami@ru ] Amazing. Is any one making a collection of these?
  |         | + 122899 [dave@bu t. d] Check the thread [SOT]Signatures and one liners for more sigs. And there's a
  |         | + 122903 [rff_rff@re o] I guess we would need to add a link in that page to someone like
  |         + 122911 [batsman.geo@] Nice catch, we save 1 char.
  |           122998 [flgr@cc n. e] Small one: (two more chars)
  |           122999 [flgr@cc n. e] We're down to 73 now.
  |           123001 [batsman.geo@] (|i|) DUH
  |           123009 [app1tam@up .] I suppose no one else wanted to do this, but...
  + 122556 [dblack@wo bl] Does this count as shorter?
    + 122565 [zdennis@mk e] This doesn't run on my system....
    | + 122567 [vanweerd@gm ] worked on mine. OS X 1.8.2 preview 3.
    | + 122568 [billk@ct .c ] DOS is too dumb to understand single quotes... :(
    |   122573 [binary42@gm ] Yes. I could have made it shorter but I liked the simplicity of my
    |   122583 [dave@bu t. d] I can't get this to run on any of my boxes. ;)
    + 122601 [flgr@cc n. e] Nice, not sure if this is officially shorter, but it is something I did
threads.html
top