290090-314691 subjects 290490-364078

BigDecimal.new('15.25') == 15.25, false ??
290296 [mathieu.houl] I was writing some unit tests when I ran into some troubles.. In the end
+ 290304 [Rob@Ag le on] 15.25 in decimal
| + 290307 [matthew.moss] No it's not. It is 1111.01 in *fixed* point. Floating-point, however,
| | 290311 [matthew.moss] Okay, I'm half-right and half-wrong. The floating-point rep is
| + 290315 [mathieu.houl] "%.30f" % 15.25
| | 290319 [Rob@Ag le on] Well, now you're pulling in the BigDecimal#to_f which isn't so much a
| | 290370 [divoxx@gm il] On Feb 7, 10:42 pm, Rob Biedenharn <R...@AgileConsultingLLC.com>
| | + 290375 [Rob@Ag le on] Well, my machine is only 32bits.  You shouldn't have a problem with
| | | 290396 [bonzini@gn .] That could be because on 32-bits computations which don't leave the
| | + 290378 [nobu@ru y- a] Could you try the patch in [ruby-dev:33658]?
| |   290391 [divoxx@gm il] Oh yeah baby. That seems to fix it.
| + 290395 [bonzini@gn .] It can be computed as (1*10^3 + 5*10^2 + 2*10^1 + 5*10^0) / 10^2 to
+ 290306 [ranieri.tx@g] ...
+ 290394 [bonzini@gn .] Unfortunately no, it looks like a bug.  Because 15.25 is 1111.01 in

Re: How to use the *args in to_proc ?
290300 [no@sp m. le ] You can't. If you need to, you should hand-roll something like Jeremy's

File and directory handling and management.
290303 [gberz3@gm il] I'm interested in any gems and/or established "best practices" for

FXRuby dynamic drawing canvas and off-screen image buffer resize
290312 [ranieri.tx@g] ...
290380 [lyle@ly ej h] If you want the image to be the same size as the canvas that you're
290505 [ranieri.tx@g] ...

[ANN] Thin 0.6.3 Ninja Cookie release
290313 [macournoyer@] Hey all,

Difference between class_eval and just adding the function?
290314 [tennisbum200] Lets say I have
290318 [iamday@gm il] Kind of hard to read all this nesting without some kind of spacing for

rubygems.rb:87: uninitialized constant Gem::Mutex (NameError)
290316 [nothinghappe] I'm trying out code examples from Pickaxe 2nd ed. using the regular Ruby

regex dynamic count modifier {min, max} ?
290320 [netcam@gm il] ...
+ 290327 [darrin_allen] s.
+ 290343 [shortcutter@] Parsing nested structures is not possible with standard regular
+ 290350 [micathom@gm ] def get_fns(string, count=0)
  290381 [netcam@gm il] ...
  290430 [netcam@gm il] ...
  290487 [micathom@gm ] In this case you'll probably have to take care of strings like "foo

trouble with FileUtils.rm() -- Invalid arguement error
290328 [dtown22@gm i] I have been screwing with this for the last hour, and I still cant get
+ 290329 [fedzor@gm il] What's the error?!?!?1111oneoneeleveneleven
+ 290330 [TimHunter@nc] It looks like you're trying to remove all the files in the directory at
  + 290331 [dtown22@gm i] that makes much more sense. what threw me off was the * in the following
  + 290436 [dtown22@gm i] dir = Dir.open("c:\\myDir\\delete\\")
    290452 [justincollin] FileUtils.rm Dir.glob("c:\\myDir\\delete\\")
    290455 [dtown22@gm i] still doesn't work for some reason. in irb if I do
    290464 [justincollin] FileUtils.rm Dir.glob("c:\\myDir\\delete\\*")
    290467 [dtown22@gm i] irb(main):003:1' Dir.glob('c:\')
    + 290468 [botpena@gm i] i think nobu advised us on using (forward)slash instead of backslash
    + 290471 [justincollin] Well...it _might_ be a Windows thing, but what did you type in before
      290472 [dtown22@gm i] Justin & botp,

Anyone use eclipse on Windows?
290332 [iamday@gm il] If you saw my other post similarly titled, it may become apparent: I'm
290345 [dejan.dimic@] Apatana PlugIn
290469 [iamday@gm il] What's Apatana?
+ 290478 [rha7_@ho ma ] require 'rubygems'
+ 290479 [rha7_@ho ma ] Nevermind my previous post, I misunderstood your problem.

Search Engine Optimization in ROR
290338 [palasrinivas] Is ROR supports the Search Engine Optimization?
290346 [wieczo.yo@go] I am not sure, what kind of SEO you mean. The Rails mailinglist will

Re: A block is an inside-out method [Was: info on block arguments]
290340 [micathom@gm ] [1,2,3].map {|e| e + 10}
290371 [micathom@gm ] And you conclusion from this finding is what exactly?
290429 [perrin@ap th] That we're searching for the wrong terms, maybe.  I've heard of closures

Multilevel class inheritance not working as expected
290349 [jb@jo rg at ] I am having a problem inheriting an already inherited class. errr..
+ 290354 [caduceass@gm] Hmm, not sure.  I think maybe the problem lies within your database
+ 290451 [rick.denatal] First, ActveRecord attributes are not Ruby attributes, they are

convert String to range
290353 [abboura84@ya] is there a way to convert a string to a range??
+ 290358 [wieczo.yo@go] I tried to monkey patch the Range class, but it doesn't seem to work,
| + 290363 [abboura84@ya] thanks a lot
| + 290419 [iw1junk@co c] I am not sure what the rules for the request should be, but
|   290432 [justincollin] This is a pretty strange way to go about it, but it will work even in
+ 290362 [caduceass@gm] irb(main):001:0> 0 / 0.0
+ 290410 [justincollin] irb(main):001:0> r = eval("(1..2)")

Resurrecting the Ruby Wiki
290356 [martindemell] Anyone else miss the Rubygarden wiki? For a language with a community
290360 [tpo2@so rc p] I don't think it matters much where it is hosted per se.

Problem with win32ole to control Adobe InDesign
290357 [angelus@te r] I'm new to Ruby

Structuring RoR systems
290365 [jari@gr up w] Sorry if this ismay seem a naive question. But I am considering using
290399 [divoxx@gm il] Yes, this is the wrong forum for that ;-)

Interesting problem with memcache-client and sockets
290373 [jakanapes@gm] Been writing unit tests and found an interesting problem.

[QUIZ] Internal Rate of Return (#156)
290374 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 290382 [robert.dober] T24gRmViIDgsIDIwMDggMzowMSBQTSwgUnVieSBRdWl6IDxqYW1lc0BncmF5cHJvZHVjdGlvbnMu
| 290387 [james@gr yp ] Yes, it was odd to think as I launched the quiz this morning, this is
+ 290600 [frank.fische] here's my solution (using Newton's method, too).
| 290602 [jamesbkoppel] Here's my solution. I used Newton's method to quickly find the zero of the NPV function.
| + 290605 [bonzini@gn .] Mine is less concise, but it uses, guess what, Newton's method.
| + 290608 [cmdicely@gm ] Here's my solution. Like others, it uses Newton's method. It may have
|   290612 [micathom@gm ] Well, my solution is slightly more verbose. Which doesn't imply it
+ 290606 [justin.ethie] ...
| 290684 [james@gr yp ] Thank you.
+ 290623 [jgabrielygal] I don't have a solution for today's quiz, but I just wanted to say a
| 290647 [james@gr yp ] Thanks so much to you for participating in many of the problems.
+ 290699 [adam.shelly@] Here's my iterative solution. It should produce at least as many
  290708 [james@gr yp ] Thank you Adam.  It's great to hear from another regular.

Re: Internal Rate of Return (#156)
290379 [matthew.moss] f_return) is a common financial
+ 290392 [bonzini@gn .] Yes.  At least I get the right answer if the "irr" function solves for
+ 290404 [y2kbugxp90@g] That's correct.  I forgot to add that detail when I submitted the
| 290453 [s.korteling@] In real life, it's not yearly. IIR needs a time dimension.
| + 290500 [alex.shulgin] Can we return 1/0.0 if NPV does not evaluate to 0 for a reasonably
| | + 290501 [micathom@gm ] How should the following values be handeld? According to some info I
| | | + 290521 [paolo.bonzin] -0.00001
| | | | 290530 [cmdicely@gm ] Its a meaningless input anyway, but wouldn't any rate be a solution?
| | | + 290529 [bug@in ec i.] Yes, (0..2) doesn't make any sense at all, nor does anything that has
| | |   290531 [cmdicely@gm ] Is that really a special result of the first case? It seems to me any
| | |   290534 [bug@in ec i.] Heheh, dur...I'm fairly new to iterative solutions.  Pardon my
| | + 290528 [bug@in ec i.] you can
| |   + 290536 [micathom@gm ] I assume IRR=-1.4228295850 -> -2.8421709430404e-14 wouldn't qualify as
| |   | 290587 [alex.shulgin] Ah... nice catch! :-)
| |   | 290589 [micathom@gm ] In the meantime I read HR's post that the function isn't defined for
| |   | 290607 [badcarl@gm i] Here's my binary search solution.  It can return negative values
| |   | 290620 [ansuga@gm il] class Irr
| |   | 290627 [alex.shulgin] Here is my solution.
| |   | 290632 [Jason.Dew@gm] require 'algebra'
| |   + 290588 [alex.shulgin] Is it OK to format user's hard drive then? ;-)
| + 290532 [bug@in ec i.] I was hoping someone would try this!  It wouldn't be very difficult to
+ 290515 [cmdicely@gm ] MjAwOC8yLzggTWF0dGhldyBNb3NzIDxtYXR0aGV3Lm1vc3NAZ21haWwuY29tPjoKPiA+IEludGVy
  290516 [agent229@gm ] Yes, you want the NPV to be zero... so you really just have to solve

how can 1/100=0
290384 [junkone1@gm ] cannot belive my eyes. how can 1/100 be equal to 0.
+ 290385 [bonzini@gn .] in what languages it isn't?
| 290389 [junkone1@gm ] 1/100
| + 290390 [wieczo.yo@go] Like said, it is about integer division. If you divide an _integer_
| + 290393 [bonzini@gn .] Even in C, 1/100 = 0.  But 1.0/100.0 or 1.0/100 or 1/100.0 = 0.01
+ 290386 [Rob@Ag le on] Integer division.
+ 290388 [rmagick@gm i] Try 1.0/100.0

Re: Ruby from source on Leopard excruciatingly slow internet
290397 [rogerpack200] you could add that code to the lib included when you run

converting strings to booleans, symbols, etc
290400 [dtown22@gm i] I am parsing an xml document, and I wanted to know if there is a quick
+ 290405 [iamday@gm il] Once you're there, making a compare for true/false isn't so much code.
| 290407 [dtown22@gm i] thanks...thats the type of stuff i was looking for...im used to java,
+ 290423 [tim.pease@gm] Here some sample code to get your brain churning ...
+ 290426 [shortcutter@] CONV = {

[ANN] mms2r 2.0.1 Released
290401 [mikemondrago] mms2r version 2.0.1 has been released!

[ANN] impostor 0.0.1 Released
290402 [mikemondrago] impostor version 0.0.1 has been released!

Parsing a spice netlist, need to be faster
290406 [awchamberlai] Hey guys!  I am writing some code that has gotten far too slow.  I am

Digest Ruby Quiz 2
290409 [robert.dober] this is the trial to sum up all the ideas that have been exchanged
290414 [matthew.moss] This discussion does NOT need to occur on the main mailing list.
+ 290415 [caduceass@gm] I'm curious as to why you would say that (also on the main mailing list).
| 290420 [matthew.moss] 1. It's a lot of details that, for the most part, pertain only to the
| + 290424 [robert.dober] Although English is not my native language I have opened up this
| | 290427 [matthew.moss] I said James had run it as a one-man show. Here's what I said: "I
| | 290434 [dangerwillro] Ok, I hope there is no tension already...
| + 290435 [caduceass@gm] Okay.  I sort of agree.
|   290439 [matthew.moss] Wikipedia has a well-developed, long set of posting rules and
|   290441 [caduceass@gm] I should try not to "get" tone via mail.  My apologies.  "There can be
|   290449 [matthew.moss] That was aimed at the comment about my going off and starting my own,
+ 290417 [robert.dober] I am very surprised that you think that, if this is going to be a team

Syntax Opinions
290411 [me@mi ha lb ] I am working on a "framework glue", as in this framework won't make you
+ 290413 [rff_rff@re o] verbose
+ 290576 [dan-ml@da 42] Everyone has their own conventions that fit their brain best. Mine is
  290601 [gaspard@te i] Why not simply write

ragel and ruby
290412 [phil@s1 6. e] I've been trying to generate ruby with ragel. But the generated code
290421 [nyarly@gm il] This is sort of unconsidered, but it might help.  In order to get
290438 [phil@s1 6. e] thanks for your answer, but i had that already. but for reference i
290465 [nyarly@gm il] Well, that's because it's a class method.  You can reach it as

Draft chapter of RubyCocoa book
290416 [marick@vi ib] I'm writing a book on RubyCocoa for the Pragmatic Bookshelf, publisher
+ 290428 [david@es ir ] ...
+ 290440 [dangerwillro] Brian,
  290525 [marick@vi ib] I am going to use Interface Builder, plus perhaps some of the new

[ANN] Logging 0.6.3 (Feral Dust Bunny)
290418 [tim.pease@gm] == Logging
+ 290422 [jens.wille@u] hey tim!
+ 290446 [tpo2@so rc p] What's better/different than in log4r?
  290463 [tim.pease@gm] * Logging is being maintained and currently under development.
  290497 [tpo2@so rc p] Thanks!

alias_method and initialize
290425 [leon@ti -o l] I've got a question about using alias_method with a class and a module.
+ 290431 [iamday@gm il] I could be wrong (of course!), but it looks to me like the aliasing
+ 290433 [jari.william] The code in the module will not be called at all.
+ 290437 [s.korteling@] I do not understand what you are trying to achieve. Anyway, tests[1] is
  290535 [leon@ti -o l] I updated the code (made it simpler) but it still doesn't do what I
  290538 [iamday@gm il] I think this is because the class has "overwritten" the initialize
  290555 [leon@ti -o l] But I get an error. Does anyone know why initialize_with_extras isn't
  + 290637 [leon@ti -o l] Anyone?
  + 290668 [matt.mower@g] Your problem, as I understand it, is that included is called in the
    290669 [leon@ti -o l] Works perfectly! I thought I tried that already... guess not.

Your own if/else
290443 [mailing.mr@g] idea if it was replyied, anyway i wanted to share my idea how to make
+ 290473 [transfire@gm] I bet you could fix that with lazy evaluation.
| 290475 [mailing.mr@g] Fix what? and how exactly? :)
+ 290488 [cjs@cy ic ne] Actually, I find the Smalltalk way a little more elegant. The booleans
  + 290502 [mailing.mr@g] x >3 ? [1+2] : [0]
  + 290503 [rick.denatal] x > 3 ifTrue:[1 + 1] ifFalse:[0]

How do I get the popup text using watir
290444 [dduphorn@re ] I need to get the text to verify the correct popup appeared
290814 [dduphorn@re ] I got it to work, so now anyone can use it.  If you know how do do it

array of here documents
290445 [rogerpack200] a = [<<END
+ 290447 [phrogz@ma .c] stuff = [ <<DOC1, <<DOC2, <<DOC3 ]
| + 290450 [rogerpack200] Posted by Xavier Noria (fxn) on 09.02.2008 00:19
| + 290458 [adam.shelly@] I'm glad I didn't have to write the parser for that....
+ 290448 [fxn@ha hr f.] a = [<<FOO, <<BAR]
  290493 [markonlinux@] Is there any reason you wouldn't set up the heredocs first and then add
  + 290494 [shortcutter@] Waste of constants / variables.
  | 291183 [lcuff@va ue ] I didn't know constants and variables were in short supply, I'll try to be
  | 291218 [shortcutter@] Simpler is often better so frugality might not be the worst course you
  + 290540 [fxn@ha hr f.] Well, we are not advocating here documents in a row, we are just

[ANN] ruport-util 0.13.0
290454 [gregory.t.br] == What is ruport-util? ==

If || statements
290457 [info@ja eo a] Hey chaps,
+ 290459 [TimHunter@nc] $ irb
| 290495 [shortcutter@] And you can spare the brackets
+ 290461 [fwmailinglis] $ irb
  + 290924 [dominikho@gm] Uhm, it's working just the way everybody would expect it to work?
  | 290953 [dominikho@gm] Oh sorry, forgot to have a look on the senders, thought you were the one who started this thread.
  + 291075 [rha7_@ho ma ] false || false || true returns true, and hello is printed.

[Rails] Where is create_table method defined?
290477 [grz01@sp ay ] When scaffolding a model with Rails, you will get a migration file,

RoR Programmer Needed
290480 [casey.a.davi] We are in immediate need of a Ruby on Rails Development team. The team

Beginner help - txt dungeon
290483 [ezrickknight] was the first one that really stuck.  Anyways, I own both Prgramming
+ 290510 [huw@da kn on] I'm not familiar with the example you are following. However, you may
| 290511 [ezrickknight] Your tutorial looks interesting and easy to follow.  I am going to work
+ 290527 [james@gr yp ] ...
| 290750 [ezrickknight] I read your comments and some questions did in fact come up.  You
| 290765 [james@gr yp ] It is a bit harder.  Save that for when you have learned a bit more.
| 290808 [ezrickknight] That is rather simple.  Maybe I will leave the array being used as a
+ 291222 [hawat.thufir] Well, one approach would be to use a database.  By using a db from the
| 291856 [thopre@gm il] ...
| 291879 [fedzor@gm il] whats the difference between File.delete and File.unlink?
| + 291885 [huw@da kn on] I understand your thoughts about singletons. In a sense, each game might
| | + 292128 [hawat.thufir] Yes, that's much more readable than mapping integers around :)
| | + 292129 [hawat.thufir] There may be different worlds/planets dimensions in the game.  So that
| |   292229 [fedzor@gm il] If you're using a hash, put whatever exits you want! use the user's
| + 291925 [celtic@sa ry] ...
+ 291309 [cmdicely@gm ] 1. You've got a bunch of rooms that you reference by symbols, and you
  291348 [hawat.thufir] Actually, an array makes sense to me.  Can you explain the advantages
  291356 [cmdicely@gm ] Since the main use is lookup by reference, and hash is designed for
  291439 [hawat.thufir] There's one set of rooms, which may have sub-sets, of course.  But,
  291870 [caduceass@gm] I'm not sure I follow you.  As far as I understand it, singletons