151107-156207 subjects 151534-166486

^ Poll STDIN for waiting input on Win32
151358 [batkins57 gm] How can I determine if there's input waiting on STDIN before calling
151367 [billk cts.co] <laugh> I just posted this a minute ago on the
151415 [dmartenson m] You can also define '_getch' to allow you to get the character right

^ help me understand this ruby idiom: class << self; alias_method :x :y end
151360 [kelly.felkin] I'm trying to understand classes and objects. The Pick axe book points out=
151365 [bob.news gmx] As you guessed the reasons are different: typically you use "class

^ Re-reading a portion of a source file from a specific point
151364 [Daniel.Berge] From within a Ruby program, is there a way to get Ruby to re-read itself
+ 151366 [halostatue g] Parse #caller[0]? Use __FILE__ and __LINE__?
+ 151369 [ruby.brian g] bschroed@black:~/svn/projekte/ruby-things$ cat slurpself.rb
+ 151374 [ezra yakima-] There is an obscure constant called SCRIPT_LINES__ . To use it you
+ 151861 [dooby d10.ka] The DATA constant initially points after the __END__ marker.
| 151917 [halostatue g] This only works for the top-level script ($0). It does not work for
| 151924 [dooby d10.ka] daz
| 151925 [halostatue g] So I did. I meant to quote what you said about using __END__ and DATA.
+ 151913 [Ara.T.Howard] require 'tempfile'

^ Get path of currently-executing Ruby interpreter
151368 [batkins57 gm] Is there a built-in variable that will return the name of the current
151375 [langstefan g] require 'rbconfig'
151376 [mrcode netro] require 'rbconfig'

^ Re: [SOLUTION] Stock Portfolios (#41)
151371 [james graypr] Thanks for sharing.  I wasn't aware of that service and it is trivial
+ 151372 [james graypr] #!/usr/local/bin/ruby
+ 151391 [jeff opendbm] I use a web service that uses yahoo, I always thought this was dirty though,

^ event driven framework for ruby
151377 [snacktime gm] Is there an event driven framework for ruby?  Something similar to POE
+ 151381 [zedshaw zeds] Actually, yes.  I'm working on the Ruby/Event library.  It's a C extension
| + 151384 [james graypr] Does this do all it's socket work in C, to bypass Ruby's Thread
| | + 151389 [ysantoso-rub] What blocking issue?
| | | 151394 [james graypr] Writing a large chunk of data to a file, for example.  Ruby will
| | | 151400 [ysantoso-rub] Disk I/O will always block the process executing it. only way to avoid
| | | + 151405 [james graypr] Non-blocking IO is another solution.
| | | | + 151410 [ysantoso-rub] I know no POSIX system that honours O_NONBLOCK for disk I/O. That
| | | | | 151421 [mailinglists] It should work on linux even if the linux implementation is done
| | | | + 151445 [akr m17n.org] O_NONBLOCK is not always applicable.
| | | |   151447 [vjoel path.b] Can you say a bit more about what happens differently on Linux 2.6 when
| | | |   151448 [akr m17n.org] Linux 2.6's select notify readability by a UDP packet with a bad checksum.
| | | |   + 151454 [vjoel path.b] That post (148436) suggests that the native thread running the
| | | |   | 151457 [akr m17n.org] Ruby threads is not native threads.
| | | |   | + 151458 [vjoel path.b] $ ruby -rsocket -e '
| | | |   | | + 151459 [vjoel path.b] ...which means the packet was received normally by the UDP port.
| | | |   | | + 151460 [akr m17n.org] I can reproduce the exit if server and client is same machine.
| | | |   | + 151461 [vjoel path.b] Is there any disadvantage to setting O_NONBLOCK for all UDP packets, as
| | | |   |   + 151462 [akr m17n.org] Some methods may behave differently.  At least IO#sysread raises
| | | |   |   + 151537 [billk cts.co] process blocking on a UDP recv.
| | | |   + 151776 [ralf.horstma] This should be fixed in 2.6.10. They made a workaround that validates
| | | |     + 151833 [akr m17n.org] I didn't know that.  Thank you.
| | | |     + 151964 [vjoel path.b] That's a big relief. Thanks for the information.
| | | + 151408 [rcoder gmail] Actually, the entire point of "native" threading is to allow blocking
| | | + 151451 [akr m17n.org] I think native (kernel level) thread doesn't block other threads.
| | + 151416 [zedshaw zeds] Depending on the libevent API used, all of the actual socket
| |   151422 [james graypr] This project interests me a great deal!  Thanks for taking the time
| + 151386 [ezra yakima-] Hey Zed-
|   151417 [zedshaw zeds] Hey Ezra, this stuff is actually still in my queue of things to get done.
+ 151439 [akr m17n.org] Why do you need an event driven framework?

^ [ANN] another Ruby article at developerworks
151378 [pat.eyler gm] IBM just published another Ruby of my articles on Ruby.   'Profiling and
151802 [jeff.darklig] Pat,
151894 [pat.eyler gm] IBM has a 30 day exclusive, but I'm collecting all the articles from the

^ Update installed gems
151380 [dmartenson m] I build my own gems as a way to distribute a variety of utilities where
151382 [ezra yakima-] $ gem_server
151407 [dmartenson m] I will give that a try, but it seems like it is meant to serve your
151473 [chadfowler g] from an alternate directory (with the -d param) if you want to include
151505 [dmartenson m] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

^ Software used for Ruby on Rails "15m intro movie" ?
151388 [francisramme] I just saw the 15m intro movie for Ruby on Rails and I wonder what
151392 [james graypr] The editor is TextMate and I really think it's worth a look, assuming
151395 [francisramme] Yes I'm using OS X at work. I really wanted something that uses tabbed
151396 [fxn hashref.] ...
151463 [matt.mower g] Yes it's iTerm.  DHH used (when I asked him about it a couple of weeks
151485 [brianm apach] TextMate is pretty nice, but I've still been more productive lately
151486 [shalev simpl] What's "inferior ruby" ?

^ [ANN] Rio 0.3.1
151393 [rio4ruby rub] I am pleased to announce the first public release of Rio -- Rio 0.3.1
151466 [wybo servaly] Attempting remote installation of 'rio'
151483 [shalev simpl] Usually when requiring a gem you need to first " require 'rubygems' "
151494 [wybo servaly] it did - thanks!

^ "Conversations" and coroutines
151402 [levin grunde] I am trying to write a some code that expresses a series of
+ 151406 [vjoel path.b] I'm guessing #start runs the block? Why not
| 151419 [levin grunde] I am pretty sure that I need Threads, but I think a single
+ 151425 [probertm acm] I think that the "serial link" part is important.  How does the

^ Re: Stock Portfolios (#41)
151413 [netghost gma] The application bit is a little unpolished, but it has some neat

^ NitroHQ been vandalised?
151414 [john.carter ] I went looking for the Nitro homepage to give it a mention to our
+ 151418 [jamis 37sign] Indeed, very sad. It's too bad that people feel the need to target
| 151434 [schlu-do gmx] Yes. But as it's a Wiki, it should be easy to revert to a previous
| 151464 [george.mosch] Thanks for reporting, I have rolled-back the earlier version. I 'll
+ 151424 [transfire gm] Perhaps put email confirmations on editing. Once confirmed perhaps the
  151435 [johnwilger g] Must be those Absynthe programmers. Absynthe is the Apocolypse! :-D
  151442 [transfire gm] Is that another agile web framework?
  + 151489 [johnwilger g] No. (At least not that I'm aware of.) That's kind of an inside joke
  | 151628 [julian coret] that's kinda funny... coz AbSynth is also a programmable synthesizer...
  | 151806 [hal9000 hype] "Synth" as in synthesizer obviously, but also a play on
  | 152057 [johnwilger g] Damn! I was hoping to get through this thread without anyone pointing
  + 151498 [dbatml gmx.d] No. Check out "The Least Surprised - Time dot now.avi" or "The Least
    151516 [transfire gm] Shucks. I was hoping to get a LOL, but you all took me serious! Sorry,

^ Gateway Okay? (Missing Quiz Solutions?)
151423 [james graypr] Looking through Google Groups, I can see a quiz solution on
151430 [omccabe gmai] I think what happened is that I sent an email that looked like a
151438 [james graypr] Gotcha.  Thanks for the info.

^ SOAP4R -- Need Help!
151426 [jeff.darklig] Ok, I've been scrounging around for the last hour to hour and a half

^ Ruby and ESB (Sonic)
151428 [bertvanbrake] Has anyone had any experience with ruby and ESB testing? Especially sonic ESB?
151481 [brianm apach] I'm working on (in Java and JDBC terms) a generic Type-4 (protocol
151562 [bertvanbrake] Thanks Brian, looks cool.

^ [ANN] KirbyBase 2.2.1
151433 [jcribbs twmi] I would like to announce version 2.2.1 of KirbyBase, a simple, pure-Ruby

^ NEWBIE QUESTION: pattern with nil
151441 [basi_lio hot] if a == "" or a == nil
+ 151443 [dblack wobbl] if a.to_s.empty?
| + 151446 [Ara.T.Howard] 'normalize' is such a nicer word than 'cast' - i'll take it!
| + 151563 [basi_lio hot] Thanks all for the suggestions. This solution appeals to me because I
|   + 151565 [aredridel nb] Certainly not the only criteria one should use -- but it sure feels
|   + 151566 [james graypr] Ruby makes it trivially easy to alter the behavior of the core
|     151626 [gavin refine] This has been the biggest 'gotcha' for me; I started out with Ruby
|     151631 [john.carter ] My whole reply was a little tease....
+ 151444 [Ara.T.Howard] i generally use
+ 151453 [john.carter ] class NilClass
  151465 [bearitall ra] I vote for this one because a good programmer is a lazy sod. Where ever
  151480 [halostatue g] Just, please, don't do it in a library that you unleash on the rest of
  + 151544 [wilsonb gmai] Rails defines a method called "blank?" on the class Object.
  + 151605 [john.carter ] Well...
  | + 151616 [dblack wobbl] I would say that asking whether nil is empty is like asking whether 12
  | | 151630 [john.carter ] class Fixnum
  | | + 151659 [dblack wobbl] Well, yes, Ruby lets you do that.  I would still argue that "it just
  | | + 151798 [w_a_x_man ya] By definition, axioms are not provable.
  | |   151804 [flori nixe.p] Yes, but back then it wasn't known, that the 5th Euclidean axiom was
  | + 151671 [halostatue g] I didn't go into detail there, John, but it's worth noting that
  |   + 151777 [john.carter ] No, as I remember it, his problem wasn't with NULL, but
  |   | 151810 [halostatue g] Um. In part, yes. The point is, though, that Codd believed toward
  |   | 151829 [john.carter ] John Carter                             Phone : (64)(3) 358 6639
  |   | + 151831 [kevin.jackso] Yeah I have to agree here, integers are a Set of values based on a
  |   | | 151832 [twifkak comc] Woah, woah, woah. Integers are just things that satisfy a specific set
  |   | | 151834 [kevin.jackso] Ok, agreed it's just one way of defining 'things' that happen to satisfy
  |   | + 151863 [dblack wobbl] Nothing on that page remotely implies that the Ruby Integer object 3
  |   + 151801 [dblack wobbl] I'd say it's undefined, or just meaningless.  One could say that -3
  |   + 152539 [transfire gm] Austin, I'd like to see a _real_ example of where Nilclass' suppossed
  |     152549 [halostatue g] 1. It isn't a supposed contract. By default, Ruby does not offer #empty?
  + 152534 [netghost gma] Don't worry, you can redefine it to return :mu

^ IS there a GUI for RubyGems?
151449 [olczyk2002 y] Seen to have seen one called something like RubyGems Manager on one of
+ 151452 [brian.takita] Arachno-Ruby has a GUI Gems manager.
| 151482 [eduardo.yane] where?
+ 151474 [chadfowler g] Paul Duncan created one for Linux called gemini
  + 151492 [snowzone5 ho] it's the long answer too.
  | 151532 [eduardo.yane] where is the option menu?
  + 151502 [ezra yakima-] There is a Ruby web dialogs gem front end called RubySlippers for gems
  + 151510 [mailinglists] RubySlippers at http://freshmeat.net/projects/rubyslippers/
    151513 [chadfowler g] Aah, yes.  Thanks for pointing that out and my apologies to the author of
    151540 [rob.02004 gm] Look's like a Gems interface is the next feature I should add to the

^ UDPSocket#bind with 0 or nil
151456 [vjoel path.b] Anyone happen know what the difference between bind(0) and bind(nil) is?
151468 [daniel brock] Joel,
151555 [vjoel path.b] ...snipped useful explanation...

^ passing a method
151467 [wybo servaly] I want to make a method which can execute another method given to it as
+ 151469 [daniel brock] Why do you want to do this?
+ 151470 [twifkak comc] @t = ''
+ 151471 [clr6.10.rand] what about
| 151475 [wybo servaly] That's exactly what I needed. Thanks!
| + 151476 [dblack wobbl] Why not just use send?
| + 151478 [bob.news gmx] IMHO a superior solution would be to use a block instead of argument
|   151484 [wybo servaly] exactly
+ 151472 [dblack wobbl] Have you looked into the 'send' method?
+ 151477 [nobu.nokada ] yield

^ force_recycle
151493 [simon.kroege] is there a way to tell the GC that an object isn't needed anymore?
+ 151496 [nobu.nokada ] No.
| 151500 [simon.kroege] Thanks,
| 151504 [halostatue g] Nobu just told you "no". There are three people who, if they tell you
| 151506 [simon.kroege] Ok, perhaps I (wanted to) misinterpret Nobu's 'no'. I thought this
| 151508 [nobu.nokada ] Sorry, I was too terse.
| 151514 [simon.kroege] I'm not lucky,
| + 151523 [Ara.T.Howard] fork - and do work in multiple processes.  all memory is freed when the
| + 151612 [nobuyoshi.na] The wrong thing is that you misuse GC to maintain expensive
|   151641 [simon.kroege] i realy appreciate your input but that's not the kind of problem
|   + 151642 [simon.kroege] That's what we try, but with problems atm.
|   | + 151643 [simon.kroege] Thanks,
|   | + 151645 [ruby.brian g] Then maybe this is even a usable way, because if you proxy the objects
|   + 151647 [nobuyoshi.na] Have those threads all terminated and got freed?
|   + 151751 [vjoel path.b] I patched the ruby interpreter to divulge this information, but that was
|     + 151854 [nobuyoshi.na] Interesting.
|     | 151876 [nobu.nokada ] Oops, a wrapper function is needed.
|     | 151982 [SimonKroeger] Thanks a lot!
|     + 151984 [SimonKroeger] Very cool!
+ 151515 [ruby.brian g] The cleanest way i can think of would be to set the references to nil,

^ Matrix type ?
151507 [zimba.tm gma] Maybe you can help me.
+ 151518 [ruby.brian g] You should start with a board class. Something like this
+ 151520 [bob.news gmx] That can be simplified to
+ 151521 [Daniel.Berge] require "matrix"
+ 151528 [james graypr] up.  I already have a quiz for next week, but it will pop-up after that.
+ 151621 [tom infoethe] Yours,
| 151871 [leslie camar] as one of my first Ruby programs. Very quick and easy -
| 152004 [james graypr] Any chance I could talk you into posting that as a reply to the Ruby
+ 151987 [ jupp gmx.de] Sudoku seem to be pandemic. I started sudokuing today using a booklet

^ problems installing gems on suse 9.1 (zlib probs?)
151512 [rocknroll bi] first of all: i'm new to the list, i'm new to ruby, i'm not to suse :)
+ 151604 [eric.promisl] I'm on Windows, trying to install rails with the preview version
+ 151869 [caiomoritz g] Lars, I was having the same problems you've describe trying to install

^ Threading on Win32 - at an impasse
151517 [batkins57 gm] I'm working on a project that would have to run several TCPServer's in
+ 151526 [david vallne] Oooh, nested parentheses. Don't take this as a pro's advice, just first ideas I
| 151527 [batkins57 gm] I'm using readine for its completion and history features.
| 151652 [david vallne] Hmm. DOSKEY does do history automagically, I also have a hunch IO#gets is
| 151681 [batkins57 gm] All right, just in case anyone googles this later on, I was able to
| 151687 [Ara.T.Howard] can you post a baby example?
| 151693 [batkins57 gm] Sure.  This solution might not work for everyone, because fortunately
| 151695 [Ara.T.Howard] it does - there is a win32-fork - guess you can't exec then?  i don't really
| + 151697 [Daniel.Berge] There is no win32-fork.  There's an implementation of fork in
| | 151711 [Ara.T.Howard] right-o.  i guess what wondering what the semantics of this wrapper are - do
| | 152052 [djberg96 gma] A pretty good guide on the differences can be found at
| | 152053 [dooby d10.ka] (replacement link)
| + 151701 [batkins57 gm] There's a Process.fork in win32-process, but despite the name it does
+ 151561 [vjoel path.b] Not very helpful, but what about hacking FXIrb and doing your user input
+ 151611 [akr m17n.org] mechanism support Windows console.  I don't know current status,

^ RubyGems questions
151524 [mutoh highwa] I'm working to make the gem file of my library(Ruby-GetText-Package).

^ require and relative paths
151530 [francisramme] require "./Classes/Printer" # My personal printer class
+ 151533 [bob.news gmx] Did you try removing "./"?  Other than that, if directory "Classes" is
| 151538 [francisramme] I tried to remove the "./" but that doesn't work.
| 151539 [bob.news gmx] Of course this won't work if you try it from irb.  Did you try it in your
| 151554 [francisramme] require File.join(File.dirname(__FILE__), 'Classes', 'Printer') works
+ 151535 [ jimm io.com] require File.join(File.dirname(__FILE__), 'Classes', 'Printer')
| 151624 [meta pobox.c] I'm inclined to prefer doing
+ 151542 [pan erikveen] $: << File.dirname(File.expand_path(__FILE__))
  151637 [francisramme] Thank you very much.
  151638 [francisramme] $: << File.dirname(File.expand_path(__FILE__))
  151654 [google erikv] I couldn't do it clumpsier...:)
  151662 [francisramme] Thanks, that looks a lot better than my "solution"..