61691-63257 subjects 62134-62900

Resolution to CGI API problem?
61901 [whitton@at a] There is a very long thread [ruby-talk:39898] that talks about changes
+ 61921 [bruce@co ed ] Have you taken a look at narf-lib? It's even more useful than that.
+ 62101 [whitton@at a] require 'cgi'
  + 62109 [gsinclair@so] You're damn right there is.  StandardClassExceptions is the place.
  | + 62176 [martindemell] s/cept/tens
  | + 62182 [whitton@at a] OK, I've added it to StandardClassExtensions/CGI. I'll add a disclaimer to
  + 62132 [bruce@co ed ] Have you tried narf-lib ? You might want to give it a shot.  It's an entirely
  | 62185 [whitton@at a] I checked it out, and I like the way it makes it easy to test your web
  | 62240 [ tom@u2 .c m] You actually don't need to do this. The only function of this is to
  | 62559 [whitton@at a] I currently just run everything under mod_ruby. If you set your RubyHandler
  + 62155 [fg@si me om ] seems that the latest CVS version of Ruby 1.8.0 does exactly what you

IE OLE automation and multiple windows
61902 [drbrain@se m] I'm using IE to automatically navigate the CMS used where I work.  As

OT - Re: quick: it responds, it evaluates, and is not empty
61910 [ahoward@fs .] i have done
61911 [dblack@ca dl] With a string maybe, but I'm not sure about generalizing it.  It's a

[SEMI-OT] Programming Languages Will Become OSes (But Are Not Quite Yet)
61916 [james@ja es ] Saw this article/talk mentioned on /.
+ 61924 [probertm@ac ] Interesting article.
+ 61937 [decoux@mo lo] From the article
  61940 [feldt@ce ch ] Would you care to elaborate on what you do from a security/sandboxing
  61941 [decoux@mo lo] In english, no :-))
  61961 [davegaramond] i admit i never use PL/Ruby, but am i correct to say that the main
  61997 [decoux@mo lo] When you use plruby, this is like if you begin all your scripts with
  62004 [transami@tr ] Lisp used to be an OS, in fact Lisp was the Machine Code. Recall Lisp

fork and mutex
61918 [vjoel@PA H. ] The standard implementation of fork and mutex are incompatible. A thread

[ANN] Ruby/Google 0.5.0
61920 [ian@ca ib n.] Version 0.5.0 of Ruby/Google has been released. This version utilises

druby with 1.7.x?
61923 [hal9000@hy e] I've just looked at druby for the first time
+ 61926 [ptkwt@sh ll ] Are you using the version of drb on each machine you're trying to use
+ 61927 [sdate@kc rr ] I got it to work on Win XP (Pro) using ruby 1.7.3 (2002-11-17)
  61932 [hal9000@hy e] Thanks, that's a good reference point.
  61933 [hal9000@hy e] OK, this is working fine.
  61943 [m_seki@mv .b] Please use 'DRb.thread.join' instead of 'gets'.

Handling exceptions
61929 [sdate@kc rr ] How do I get the type (class)  of exception thrown by any given peice of
61930 [dsafari@pa a] Maybe something like this helps you?
61991 [sdate@kc rr ] But of course ! Duh !!

Rubyists in Budapest?
61936 [chad@ch df w] I'm in Budapest for 3 weeks and wondering if there are any fellow Rubyists here that would be interested in meeting and perhaps doing some programming.
61945 [sdate@kc rr ] Cool ! Will you be updating your travel journal ? I was on your website to

61944 [anti-virus@d] ################# VIRUS NOTIFICATION #################

Reducing an Array
61948 [bruce@co ed ] The Array#any?, Array#all? RCR discussion reminded me of a snippet I had
61950 [decoux@mo lo] pigeon% ruby -ve 'p [1,2,3,4].inject { |a,b| a + b }'
61951 [bruce@co ed ] Guy,

Ruby under Windows
61949 [dcarrera@ma ] I'm trying to get my brother to try ruby.  Currently he's using Windows
+ 61952 [Stephan.Kaem] What was the error message?
| 61953 [dcarrera@ma ] "Program not found" (or something along those lines).
+ 61954 [sdate@kc rr ] Make sure that the PATH variable has C:\RUBY\BIN in it (assuming ruby is
| + 61957 [dcarrera@ma ] Shashank, thank you for your thorough answers.  I just learned a fair bit
| + 61972 [nobu.nokada@] Note that redirection doesn't work with associated programs.  I
+ 61998 [mikkelfj-ant] There have been various answers already - however the thread leaves the

dRuby question
61959 [sdate@kc rr ] I am trying to write a client/server application using dRuby drb-2.0b1 onWin
61989 [ysantoso@je ] What do you mean by "Does not work"? Can you be more specific?
61992 [sdate@kc rr ] The second thread does not start till the first thread is done, effectively
62128 [sdate@kc rr ] effectively

61960 [dcarrera@ma ] Does anyone know how to use the GetoptLong module?  Or where I can find
+ 61962 [cedric.foll-] see http://www.rubycentral.com/book/lib_standard.html
+ 61963 [dblack@ca dl] David
| 61964 [dcarrera@ma ] Thanks for the help.
+ 61971 [dossy@pa op ] Have you not installed OpenOffice yet?
+ 61973 [tarasis@bt p] There is a pretty cool tool called antiword
+ 61988 [chad@ch df w] You should be able to use OpenOffice to read the .doc as well as the
+ 62031 [lists@de on ] openoffice and even abiword are quite bulky. My personal favorite is
+ 62156 [tpeters@in a] $ wget http://www.sra.co.jp/people/m-kasahr/ruby/getoptlong/getoptlong.doc 2>/dev/null

PickAxe index?
61965 [dcarrera@ma ] Does PickAxe online have an index?
+ 61966 [dcarrera@ma ] Oh, BTW, I did eventually find what I was looking for.  But I still think
| + 61967 [batsman.geo@] It sure does have one: pages 537 to 564 ;-)
| + 61969 [bruce@co ed ] It does have an index. ;-)
| + 61970 [cyclists@nc ] Which version of the Pickaxe are you looking at?
|   61974 [dcarrera@ma ] The online version.
+ 61976 [gsinclair@so] The Ruby Document Bundle contains an online pickaxe with an index in a
| + 61980 [dcarrera@ma ] Cool.  My tutorial made it to the bundle. :)
| | 61994 [gsinclair@so] It did :)  And I'm eagerly awaiting an announcement on -talk of an
| | 62029 [dcarrera@ma ] So you know.  I'm currently studying for a Qualifier Exam and a final
| + 61981 [jweirich@on ] On that web page, we find this very interesting date: "Fri, 10 Feb 2003"
+ 62012 [jbritt@ru y-] It can.  See Rimport
+ 62032 [lists@de on ] I have ano lder copy of the book which you can find at
  62038 [botp@de mo t] the pdf version of the pickaxe is handy.

problem with "threads & os-calls"
61968 [jonnypichler] well...
+ 61990 [ysantoso@je ] The threading in the official ruby implementations is implemented in
+ 61993 [sdate@kc rr ] the

Re: Mac OSX stacksize
61978 [achou@te le ] ...
61986 [jim@fr ez .o] It's 'unlimit' on OS X.

PickAxe Index?
61982 [ ted@ph .n t] Has anyone mentioned the PickAxe book at

Test::Unit bug (maybe?)
61985 [jweirich@on ] Given the following unit tests ...
62181 [nathaniel@NO] I agree this is somewhat disconcerting, but I don't know of a good way

Binary ERuby package for Windows ?
61987 [llothar@we .] Is there an already compiled binary package of "ERuby" available for download ?

61996 [infor@li ec ] <送信者>ライクファイナンス

Matrix#pretty_print available?
62000 [gsinclair@so] Matrix lacks a method to return a string like (for
+ 62001 [dblack@ca dl] Wouldn't it be very hard to generalize that, since matrices can
| 62002 [gsinclair@so] I must say, I wasn't expecting that.  Maybe I missed a few too many
| 62003 [dblack@ca dl] When it comes to math issues, a good first approximation is to assume
| 62005 [jim@fr ez .o] Hmm, sounds like Matrix needs to be refactored to support symbolic math.
| 62008 [nemo@he lo r] Hmm, sounds like Matrix needs to be refactored to support symbolic math.
| + 62009 [daniel@ze ed] You are right. It is not nit-picking. People tend to use words that have
| + 62016 [jim@fr ez .o] You are right. I said to my self right after I hit the send key
+ 62007 [martindemell] Here you go - it's two-pass, and doesn't handle complex

How to determine if TCPSocket has been closed?
62006 [lars-m@gm .n] How can I determine if a TCPSocket has been closed? I have written this tool

Strange sleep behavior?
62011 [bjst01@st de] th = Thread.new{
62015 [sdate@kc rr ] When the new thread (th) is created and it encounters the sleep(5) it gets
62017 [bjst01@st de] took a little peek at the ruby source, rb_sleep_forever() (the behaviour I was looking for)
62028 [sdate@kc rr ] was looking for)

phone system
62013 [transami@tr ] kenny,
62014 [transami@tr ] OOPS! WRONG ADDRESS. SORRY!
62025 [dossy@pa op ] Tom,

openprojects.org - servers exhausted
62035 [jim@fr ez .o] I have been trying for about a month now to get an IRC
62036 [dblack@ca dl] They've changed their name to irc.freenode.net -- I don't think
62037 [jim@fr ez .o] Thanks David. Works now.

New address for Ruby IRC (chat) channel
62039 [dblack@ca dl] Just to repeat something from another thread, but with its own
62044 [sdate@kc rr ] This is my first attempt to use IRC so may be I am missing all the fun.
62045 [gsinclair@so] Did you say hello? ;)
62248 [loats205@ao ] Do you know of any other ruby channels anywhere? I've tried starting a few of
62251 [gsinclair@so] One's enough, isn't it?  Specific projects might have their own

Article: Using the Ruby DBI Module
62040 [paul@sn ke n] I've written an article, "Using the Ruby DBI Module," that discusses
62041 [ ted@ph .n t] technical writers shouldn't use 'will' for events occurring as the result

[ANN] YAML.rb 0.49.2 -- YPath, seq-in-seq and elimination of '+/-' implicits
62042 [yaml-core@wh] Okay, my unwilling accomplices.

Amrita ML (was: OT: IE blatantly defiant of HTML standards)
62053 [bruce@co ed ] As Tim says, Amrita is really moving forward-- I've really seen the interest

loading problem
62056 [zhoujing@co ] #! /usr/bin/env ruby
+ 62071 [gsinclair@so] Can you reproduce it in the simplest case?
+ 62083 [mike@os n. r] is that really 'l' (small 'L'), '.6.8'?

ruby-dev summary 19346-19379
62057 [ttate@kt ja ] Here is a summary for last week on the ruby-dev mailing list.
62058 [a.bokovoy@sa] This might broke packaging, at least for RPM-enabled targets because
62059 [nobu.nokada@] Do you mean relocatable RPM packages?  If so, they can be
62065 [a.bokovoy@sa] Both. I as didn't see original post, from summary it is not obvious which
62086 [nobu.nokada@] Also, this proposition is only for the files in standard
62087 [a.bokovoy@sa] I know this well (after all, I'm maintainer of Ruby in ALT Linux :) but

Re: persistence (was: IE blatantly defiant of HTML standards)
62060 [ndrsbngtssn@] I'd recommend looking at Prevayler, it's a very easy
+ 62066 [tim@ba es id] Mnemonic looks good, but there has been no new version since Jan 2002. It
| + 62079 [ndrsbngtssn@] I re-implemented Prevayler for Ruby a few weeks ago,
| + 62121 [ahoward@fs .] if your development will be exclusively web based you might check out
+ 62122 [transami@tr ] Prevayler is a very interesting idea, but it isn't a full purpose solution. i
  + 62123 [dim@co eb tc] the hard thing is then indexes.... I've created my own little custom
  + 62124 [tim@ba es id] This idea intrigues me, but I'm grappling with what implementation would be
  | + 62125 [dim@co eb tc] sounds like we're about to write an OODB (o:  as I mentioned in my other
  | | 62126 [tim@ba es id] But it's not an OODB; all you'd be doing is saving the state of your objects
  | | 62127 [dim@co eb tc] thanks for the response.  so the difference between this and PStore (or
  | | 62129 [tim@ba es id] I don't know, maybe I'm not; I'm just throwing ideas around. It would be more
  | | + 62130 [dim@co eb tc] ok, here's what I've got made more generic (developed using the well
  | | + 62192 [ahoward@fs .] pstore is not tied to CGI.  pstore is the generic object persistence scheme
  | + 62143 [transami@tr ] well, i've been thinking about this for a bit and there seems to be a couple
  |   62145 [ndrsbngtssn@] Yes, but you don't need to persist the entire system,
  + 62144 [ndrsbngtssn@] You do know that modern computers often *have*

Tips for compiling libraries for use with Windows Ruby?
62061 [robertm@sp l] I am planning on compiling a few libraries for use with the windows
62070 [gsinclair@so] I don't understand the middle paragraph, but mingw is supposed to
62072 [robertm@sp l] Really? Excellent!
62073 [gsinclair@so] Yep.  I'd be very interested to know if cygwin's gcc can be shoehorned
+ 62082 [robertm@sp l] I need to look at my notes I used when I compiled a mingw version of
+ 62085 [eban@os ri .] % ./configure --with-gcc='gcc -mno-cygwin' --enable-shared
+ 62102 [whitton@at a] What do you mean Windows-compatible binaries? If you mean ruby extensions,
  62116 [gsinclair@so] Sorry, I should have been clearer.  By "Windows-compatible binaries" I

a single class that supports multiple facets/interfaces
62063 [davegaramond] i want to have a class that can support multiple sets of methods, based
+ 62074 [jweirich@on ] Elegant is often in the eye of the beholder.  I have this ...
+ 62089 [bard@pr sm l] I know that you're avoiding inheritance on purpose, but I'd do it like
+ 62090 [dblack@ca dl] class C
+ 62657 [sroberts@un ] class C
  62663 [transami@tr ] class C

Generation of array with symbols
62067 [jim@fr ez .o] I was wondering, to create an array I usually do
+ 62068 [feldt@ce ch ] Not that I know of, but of course there is
+ 62069 [gsinclair@so] %w{a b c}  #=>> ["a", "b", "c"]
  62081 [dblack@ca dl] Those are strings, not symbols.

Strange problems while compiling eruby.
62075 [Radek@Hn li ] I have problem compiling eruby.

2 optparse questions
62077 [han.holl@pr ] 1. It seems not to allow the '-d directory' style of option values.
+ 62078 [jweirich@on ] I tend to use the getoptlong library.  It seems to address your issues.
| 62098 [han.holl@po ] Yes, but optparse has a couple of capabilities that are really
+ 62088 [nobu.nokada@] Thank you.
  + 62092 [matt@li ke .] ruby-cvs -roptparse -e 'ARGV.options{|opt|opt.on("--dir=[DIR]"){|d|@dir=d};opt.parse!};p self' -- --dir here
  | 62095 [nobu.nokada@] It sounds non-optional.  If it were "greedy", how do you omit
  | 62133 [matt@li ke .] I see your point, but I have one idea.
  | + 62136 [nobu.nokada@] Looks reasonable.  Let me consider.
  | + 62138 [akr@m1 n. rg] If non-option argument which is not begin with a - character is
  |   62139 [matt@li ke .] Yes.  E.g. if --foo takes an optional argument, but you do not want to
  + 62097 [han.holl@po ] Ok, it's a version issue. I'm running 1.6.8, and downloaded

Re: [FXText]
62084 [lars-m@gm .n] Thanks so much!

Understanding mixins
62091 [gfb@to es ft] [x86.bison:695]gfb> ruby -v

Local variable scope
62093 [dcarrera@ma ] I'm a bit confused by the scope of local variables.
+ 62094 [nobu.nokada@] Any methods have each own scopes.
+ 62096 [vjoel@PA H. ] module M
| + 62100 [ptkwt@sh ll ] This falls into the catagory of
| | 62103 [hal9000@hy e] Correct me if I'm wrong, but isn't this simply
| | 62104 [dim@co eb tc] The following question is probably completely different to this thread,
| | + 62106 [dcarrera@ma ] This works fine in my system.  Check your code.  Try this example on your
| | | 62107 [dim@co eb tc] obvious (in that I expect it to return the arg multiplied by 4, or the
| | | 62110 [hal9000@hy e] nil if you actually wanted it to accept NO ARGUMENT
| | | 62114 [gsinclair@so] Just to emphasise the point.  If you call *your* code with no
| | | 62115 [dim@co eb tc] I'd effectively get a 'array index out of bounds' error or something
| | | 62117 [gsinclair@so] => nil
| | | + 62118 [dim@co eb tc] Gavin,
| | | + 62119 [dcarrera@ma ] Maybe --simple-prompt should be the default and have a --verbose-prompt
| | |   62120 [tim@ba es id] But I like the verbose prompt, except when I want to copy it into an email.
| | + 62108 [hal9000@hy e] This should work fine. Offhand I'd say the problem
| | | + 62111 [gsinclair@so] s/if/unless
| | | | 62113 [hal9000@hy e] Right, thanks.
| | | + 62112 [dim@co eb tc] Thanks - hadn't spotted the .nil? method.  I assume thats on Object.
| | + 62142 [drbrain@se m] Yes, the value of the last statement in an if/elsif/else/end block is
| |   62226 [dblack@ca dl] (You forgot to erase that last "bar =" :-)
| + 62105 [nobu.nokada@] This works in 1.6 too.
+ 62099 [ptkwt@sh ll ] That's kind of how Perl's scoping works, but not Ruby.  The scope inside
  62148 [bob.news@gm ] irb(main):001:0> @@foo = "bar"

redefining rand and srand
62131 [ptkwt@sh ll ] 1) how good is Ruby's rand function (what's the quality of randomness)?  I
+ 62146 [ptkwt@sh ll ] Here's what I did.  At Robert Feldt's suggestion I used his RandomR
| 62151 [phasis@no nu] How about use native Ruby code instead of extension module?
| + 62152 [decoux@mo lo] 1.8 use Mersenne Twister
| + 62199 [ptkwt@sh ll ] C code is faster...  I'm using this for a genetic algorithms class.
| + 67503 [judson@ir v2] So long as we're redefining rand, and srand, can I recommend that they
|   + 67513 [vjoel@PA H. ] I second that. I've done it for myself using Numerical Recipes
|   + 67564 [nobu.nokada@] ...
|     68478 [nobu.nokada@] I've forgot this.
+ 62246 [sroberts@un ] You may know this already, but rand() doesn't output random numbers, it
  62259 [ptkwt@sh ll ] Right, pseudo-random.  Isn't there a VonNeumann quote where he says
  62260 [gsinclair@so] Here it is, cited in the Perl Cookbook.  It's a classic!