302076-303929 subjects 302524-379221

Pounce Consulting JOBS
302337 [yazmin.carde] My name is Yazmin Cardenas,  I am a recent member of the community, I work =

[ANN] foxGUIb 1.0.0
302338 [meinrad.rech] Dear fellow (fx)rubyists,
302371 [botp@de mo t] # -----Original Message-----
302433 [meinrad.rech] quite busy trying to start his own business. Therefore there is no time lef=

sudo ruby loosing environment?
302339 [transfire@gm] My Ruby installation is from the Ubuntu package repository. Yesterday,
302342 [ruby@an hr p] Yes, it's sudo. Your test is flawed.
302372 [transfire@gm] On May 19, 3:46=A0pm, Gregory Seidman <gsslist+r...@anthropohedron.net>

Method as first class member
302344 [caogl@ve iz ] I don't consider myself a ruby guru but have been a ruby user for a few
302385 [shortcutter@] irb(main):003:0> RUBY_VERSION
302428 [caogl@ve iz ] Thank you for replying. I'm aware of those even though I didn't use them
302430 [shortcutter@] How often is this used?  I rarely see this so I would say, don' t
+ 302436 [caogl@ve iz ] I posted a lambda based rough implementation a few weeks back :-)
+ 302459 [robert.dober] Far too rarely I believe, there was a recent tread in which David
  302466 [shortcutter@] I definitively think that #call should be retained - simply because
  302514 [robert.dober] As simple as possible, *but not simpler*.

Why doesn't Float() work the same as Integer()?
302348 [_mwryder@wo ] In my continuing work learning Ruby while creating a Rational class I
+ 302361 [rimantas@gm ] Yes, because Kernel.Float knows how to convert string "17" to float
| 302364 [_mwryder@wo ] My question is why doesn't Float know how to deal with prefixes such as
| 302373 [rubytraining] On May 19, 7:44=A0pm, "Michael W. Ryder" <_mwry...@worldnet.att.net>
| + 302376 [_mwryder@wo ] I think my main concern was this was yet another "gotcha" that only came
| | 302380 [ara.t.howard] sort of, you can write this
| | + 302405 [fburton@ny .] Why?
| | + 302454 [_mwryder@wo ] This works fine for me and returns values that I am expecting.  Changing
| + 302500 [matz@ru y- a] Because most of us would have hard time to guess how much 0x11.4 is.
|   + 302527 [sepp2k@go gl] I'd expect it to be 1 * 16**1  +  1 * 16**0  +  4 * 16**(-1)
|   + 302548 [_mwryder@wo ] Thank you for the reply.  I wanted to convert strings to Floats first as
|   | 302898 [pit.capitain] I would be very careful with converting Floats to Rationals. You know
|   | 302966 [_mwryder@wo ] I realize that my implementation will not work with all allowable Floats
|   | + 302968 [TimHunter@nc] Ruby uses binary numbers, not decimal numbers. In binary, 1/10 cannot be
|   | | 303088 [_mwryder@wo ] But if I told you that 10 dimes does not equal $1 you would freak.  I
|   | | + 303097 [mark@mw ld n] How would you exactly represent 1/3 in BCD?
|   | | | 303111 [_mwryder@wo ] The same way that the current binary system represents the number or
|   | | | 303114 [ara.t.howard] we can, but it just pushes the problem back further when you re-
|   | | + 303125 [TimHunter@nc] I found this interesting paper "Performance Characterization of Decimal
|   | + 302969 [AEtzold@gm .] Dear Michael,
|   + 302940 [rubytraining] Not that a webcomic should drive language design.  But not that it
+ 302457 [blogger@pi r] As someone who has done floating point validation on microprocessors, I
+ 302567 [marcus.erron] Actually, this is probably the most logical behavior. Integer() and
  + 302570 [_mwryder@wo ] I am glad to see that I am not the only one that feels this way.
  + 302582 [sepp2k@go gl] But shouldn't Float("023") return an error in this case? After all "023" is
    302615 [mark@mw ld n] Again, I think it comes down to pragmatism. It's not what these

where to start ?
302349 [pedrolopezma] Does anyone have a good website or book, to start on Ruby and
+ 302355 [pikseli@we h] ...
| 302357 [pedrolopezma] What is that ??? junk ??
| 302360 [jeremymcanal] Ruby in Practice (http://manning.com/mcanally/)
+ 302381 [martin@an le] Hope this link would help you to learn ruby from the basics.

Got questions about NetBeans Ruby/JRuby support?
302352 [charles.nutt] Hey folks...

[ANN] vlad mailing list
302354 [ryand-ruby@z] Francis pointed out that I forgot to make a mailing list for this
302386 [shortcutter@] Just in case you did not know and to avoid possible confusion: there is

Question about ruby web servers
302356 [di3go.bernar] Usually when you want to archive more performance ex. in mongrel or
302363 [cmdjackryan@] 'Multi-core'. You can shift multiple processes around on multiple CPUs.

help me debug my stack trace
302358 [rogerpack200] So currently ruby is hung using 100% CPU on my machine.
305593 [rogerpack200] appears that this might be something in common only to mac os 10.5 based

Instance Variable in Mixins
302359 [dale.martens] I am trying to get access to an instance variable. I have simplified
302362 [rick.denatal] and

How is this split method working?
302366 [neeraj.jsr@g] length = 20
+ 302369 [bbxx789_05ss] arr = [10, 20, 30, 40]
+ 302377 [martin@an le] Its not specific how you want to split your string but may be
+ 302378 [botp@de mo t] # length = 20
  302379 [martin@an le] yes i agree with your comments.
  302382 [neeraj.jsr@g] if you look at the comments of this blog
  + 302390 [botp@de mo t] # I had never seen text.split[0..length] before. What's
  + 302449 [bbxx789_05ss] arr = text.split

[ANN] win32-thread 0.0.2 and other stuff
302368 [djberg96@gm ] This is just a quick announcement to let people know that a few of the

how to serialize hash to a file?
302383 [hsolter@gm i] i have an xml file that goes like;
+ 302384 [vjoel@pa h. ] Pretty easy...
| 302392 [shortcutter@] Amazing how we nearly picked the same solution - even the file name is
| 302438 [vjoel@pa h. ] Heh. Maybe we've just been here too long, and our brains have been
+ 302389 [shortcutter@] irb(main):012:0> hash={1=>2}

Re: PLEASE help me debug my stack trace
302387 [shortcutter@] You'd probably get more replies if you supply some more environmental
302407 [john.d.perki] It's more than just possible to write rickety code in Ruby, it's
302417 [shevegen@li ] and you try to translate it without rosetta-stone!
302461 [rogerpack200] Exactly! :)

Swig and Ruby - a nice way of using C/C++ code
302388 [keletmaster@] I was just messing around and discovered Swig [http://www.swig.org/]
302401 [keletmaster@] The interface file (multiply.i) should actually look like this: [as per

Watir: Facing problem with "IE.attach"
302391 [anukul.singh] require 'watir'

Watir: Need help in defining a dynamic array
302393 [anukul.singh] I am new to ruby and hence need some help in defining a dynamic array.
302396 [botp@de mo t] # Can anyone help me create a dynamic array and store the hwnd to it as

Why is Array#to_f not defined?
302395 [fredjoha@gm ] Ruby (1.8.6) seems to be missing numeric conversion methods for
+ 302397 [botp@de mo t] # Ruby (1.8.6) seems to be missing numeric conversion methods for
+ 302398 [matz@ru y- a] #to_f converts the receiver to the float itself.
| 302399 [fredjoha@gm ] I see... I understand that it is not following the rule of "converting
| + 302403 [shortcutter@] That may be true for you, but it is not for me - and apparently others as well.
| + 302421 [alex.mdc@gm ] ...
+ 302435 [vjoel@pa h. ] class Array

Getting parameters from command prompt
302400 [vaqas.ashraf] I want to run a ruby script.rb from command prompt with different
302402 [botp@de mo t] # I want to run a ruby script.rb from command prompt with different

manage NET HTTP errors
302409 [andreacamp@h] i've done a ruby script that restart a VoIP network device. The code i s

Is Necessary for all rails employee know computer knowledge?
302412 [abcotech@gm ] Because for last 2 week i am visiting rails department, there i show
+ 302413 [shortcutter@] I am not sure what you mean by "how to open the system". Maybe it is
+ 302414 [pjb@in or at] It's not necessarily necessary for every rails programmer to know
  302431 [eleanor@ga e] It's a fascinating article, not least because I can see where both the
  + 302434 [caduceass@gm] You left out philosophical differences, which is where the rubber
  | 302445 [eleanor@ga e] I normally wait until I'm particularly ticked off and then rant on
  | 302447 [billk@ct .c ] Awesome  :D
  | 302470 [eleanor@ga e] That's always the way ;)
  + 302437 [cmdjackryan@] The largest benefit is derived from attacking the same problem from
  | 302442 [eleanor@ga e] You're not alone. I've ranted several times on my livejournal about
  | 302453 [cmdjackryan@] Worst thing: I'm utterly self-taught, too. Everything I learned, I
  + 302513 [albertschlef] Could you elaborte here? It sounds interesting.
    302516 [eleanor@ga e] Not easily without getting sued for breaching various NDAs ;)
    302528 [caduceass@gm] Albert, a good example of what Ellie is saying would be -- in the ME
    302545 [cmdjackryan@] 'If you all you have is a scalpel, every problem looks like neurosurgery'?

comparison of Array with Array failed
302416 [c-note@ho ma] i got this error when the field serial is empty.
302462 [kyle.rabe@gm] I don't know if this is the root or not.  Array#sort uses the <=>

displaying data
302418 [tim.wolak@gm] I am getting data from three hashes and am trying to arrange them in
302419 [shortcutter@] This won't work since the return value of Hash#each is the Hash
302420 [tim.wolak@gm] Thanks Robert!  It is actually working but like I said after the first
302422 [shortcutter@] Please do not top post.
302424 [tim.wolak@gm] Right I see it now, excuse my n00bism :(   So what is the correct way to

[ANN] At InfoQ: Interview about FXRuby, plus an exclusive chapter from the FXRuby Book
302427 [lyle@ly ej h] InfoQ has just published Werner Schuster's interview with me, in which

Extension of zlib
302432 [shortcutter@] does anybody else think this (or something similar) would be a useful
302439 [djberg96@gm ] On May 20, 9:15=A0am, "Robert Klemme" <shortcut...@googlemail.com>
302444 [shortcutter@] I don't believe so.  ARGFZ plays the same role as ARGF and your argument

Arbitrary IO object
302440 [djberg96@gm ] How would I go about using IO.new such that it would automatically
302443 [shortcutter@] Not sure what you mean: File.open uses a new file descriptor.  Why would
302446 [djberg96@gm ] I'm tinkering with possibly reimplementing win32-open3 using the win32-
+ 302452 [gwtmp01@ma .] IO.new is for associating a Ruby IO object with
| 302460 [djberg96@gm ] Yep, looks like I should just use IO.pipe.
+ 302465 [shortcutter@] It does not seem to make sense to open all these both for reading and

Debugging a TCPSocket.open timeout
302448 [blogger@pi r] TCPSocket.open("imap.gmail.com", 143)
+ 302451 [vjoel@pa h. ] What about trying netcat? Not sure that will give more info than tcp
| 302455 [blogger@pi r] sudo nc -v -v imap.gmail.com 143
+ 302456 [cmdjackryan@] Have you followed (well, as much as possible :P) the instructions GMail
  302458 [blogger@pi r] Funny what the infamous "one more look" can do.  They are using a

Is it possible for rubyzip to return zipped data instead of writing  it to the disk?
302463 [szimek@gm il] I got simple Rails app and I'd like to compress xml data and send it
302464 [cmdjackryan@] Write file to disk, give user link, delete file after a time, in case
302467 [szimek@gm il] Thanks.

This Week in Ruby (May 20, 2008)
302469 [acangiano@gm] Cheers,

is there a better way to write { yield }
302471 [stephanwehne] Is there a better way to write something like
+ 302473 [ara.t.howard] def meth(*a, &b)
+ 302485 [vjoel@pa h. ] That form has the advantage, IIUC, that no Proc object is created, so

Re: BasicObject & OpenStruct in Ruby 1.8.7-preview3
302472 [ snk@gn .o g] Is the BasicObject class (from Ruby 1.9) included in Ruby 1.8.7?
302474 [yazmin.carde] I=B4m Seeking for a Ruby on Rails developer who wants to work in San Franci=
302499 [yoshikane_no] 受信確認レポート

Ruby Quick Reference
302475 [stephen@st p] Anyone know if there's a Ruby Quick Reference similar to Python's PQR
302476 [ryand-ruby@z] ...
302506 [shortcutter@] There is also http://www.ruby-doc.org/docbar for Firefox.

Is there any good source for the logic behind some of the methods?
302477 [_mwryder@wo ] I am trying to figure out why methods that seem to do the same thing
+ 302481 [_mwryder@wo ] In Pickaxe they are listed in the Kernel module.  I notice while reading
+ 302484 [vjoel@pa h. ] "0377".to_i returns 377 -- because #to_i has an default argument
+ 302488 [mark@mw ld n] I would have to say that very few of us run into this problem,
| 302547 [_mwryder@wo ] My learning project started with a different implementation of the
| 302549 [mark@mw ld n] I don't think it's odd in the least. I've _never_ used a language that
+ 302505 [botp@de mo t] # I am trying to figure out why methods that seem to do the same thing=20
  302510 [albertschlef] WTF would he try "w ri"?
  302511 [shevegen@li ] Why do you think Ruby is not on par with perl? In my opinion perl is

13 lines of confusion
302479 [ttmrichter@g] I can't for the life of me figure out why the following code makes Ruby
+ 302480 [ttmrichter@g] Oops.  Forgot to mention: I've also tried putting each module into a
+ 302482 [rick.denatal] the include Rlang::Utility causes the External module to define the e8
  302483 [ttmrichter@g] While I'm not sure I understand the explanation (time to hit the books

[ANN] rubyforge 1.0.0 Released
302486 [ryand-ruby@z] rubyforge version 1.0.0 has been released!

[ANN] hoe 1.5.2 (and 1.5.3) Released
302487 [ryand-ruby@z] hoe version 1.5.2 has been released! Also, I suck. 1.5.3 has been

Ensuring only one instance of a script is running
302489 [djberg96@gm ] I'm probably late to the game on this, but I stumbled across an
+ 302491 [ara.t.howard] quite interesting, i use self-locking scripts quite often, but DATA is
| 302517 [djberg96@gm ] You're welcome. :)
| 302822 [jos@ca no k.] Hear hear. You could also use a process manager such as daemontools or runit -
+ 302492 [vjoel@pa h. ] Google seems to think it's original, FWIW.
| 302857 [fxn@ha hr f.] Locking DATA has been used in Perl for a long time.
| 303219 [djberg96@gm ] Apparently so, because it was a use.perl blog entry that gave me the
+ 302493 [phasis@gm il] I think the above is actually equal to
| 303221 [djberg96@gm ] It would seem so. Sean O'Halpin has expanded on it a bit, too.
+ 302841 [sean.ohalpin] Nice one! However, I don't get a failure (on Linux) - instead the
| 303220 [djberg96@gm ] Yep, that's definitely cleaner, thanks.
+ 303258 [mkasick-rt@c] Cute trick.
  303267 [ara.t.howard] you can use the same trick even on NFS
  304201 [djberg96@gm ] =A0

Local Jump Error
302490 [clement.ow@a] if $file_exception[i] != nil
+ 302495 [adam.shelly@] The error message is telling you exactly what you overlooked:  find
| + 302496 [clement.ow@a] hmmm. Then how should i go about coding these lines? Cause just by
| + 302497 [sepp2k@go gl] Nope. The block passed to find is not a filter. Find takes an argument as well
|   302504 [clement.ow@a] if $file_exception[i] != nil
|   302522 [sepp2k@go gl] You still have the each there. find does NOT return an array or any other kind
|   302594 [clement.ow@a] That means to say that I cant have an each, because Find does not return
|   302663 [sepp2k@go gl] Yes.
|   302683 [clement.ow@a] Ok, but if i just put
|   303138 [clement.ow@a] I've finally came out with the code without any errors(after much
|   303148 [cn.peng.zuo@] src1 << file unless $file_exception[i].all? do |x|
|   303149 [clement.ow@a] I tried all ways and means, all?, any? But it doesnt seem to work. Is
+ 413432 [lists@ru y- ] Works on 1.8.7 and 1.9.3
  413436 [mike@st k. a] Avdi Grimm's books reminded me that Hash.fetch is a good idea, you could =

Re: Is there any good source for the logic behind some of th
302494 [stephen@st p] LOL. Total bs really. it's the guys who learn all the "nooks and
302518 [mark@mw ld n] Sure - and I almost pointed out that if you're interested in the

How to implement this in unit testing
302498 [moath2@ya oo] ...
302503 [Muath.Alkhal] just small change as [1..5].each does not work correctly so I may
302515 [cdemyanovich] You can use a range instead of an array, e.g., (1..5).each { |n| puts n } .

newbie: hierarchical object model with RoR
302501 [adam.short@g] I've read all the simple tutorials and decided to have a go at
302502 [robert.dober] You might want to post this to the RoR mailing list.

undefined method
302507 [sijo@ma xi n] This is more ruby related that is why I am asking here
302509 [keisukefukud] It seems this is more rails-related problem.

list animals with average capture_percent (Josh Susser's example)
302512 [richter.jose] I implemented self-referential system based on Josh Susser's guidance

the process invoked by backticks stays as zombie!
302519 [kazakov@gm i] I need to gather the output from an external program.
+ 302521 [damnbigman@g] ...
| + 302584 [kazakov@gm i] No, my script is not terminated before child.
| + 302684 [john.carter@] Not really.
+ 302589 [albertschlef] Does it happen when you use the following line instead?
  302598 [davebass@mu ] Hopefully not!

arrays in ruby and java
302520 [zhe.zen@gm i] i have been translating an algorithm from ruby to java. unfortunately i
302523 [shortcutter@] I cannot see an error in your reasoning.  Ruby's Array and Java's List
302533 [zhe.zen@gm i] thank you for the reply.
302571 [nefigah@gm i] Yep