268820-299351 subjects 269192-292392

[ANN] win32-api 1.0.0
269034 [djberg96@gm ] The Win32Utils Team is happy to announce the first release of win32-api.

Failed Metaprogramming PLUS Stack Level Too Deep
269043 [ari@ar br wn] Hey all
+ 269056 [jan.svitok@g] -          @chain = #{name}
| 269102 [ari@ar br wn] This is why I fail at life.
+ 269061 [mailing.mr@g] stop metaprogramming :)

Finding ties in sorting?
269045 [AEtzold@gm .] Dear all,
+ 269048 [stefano.croc] a.sort_by{|i| [i['a'], i['b']]}.reverse
+ 269049 [dzwell@gm il] Built in? I don't know about that, but it's pretty easy. I'm sure your
  269058 [Rob@Ag le on] a.sort do |h1,h2|
  269076 [dzwell@gm il] Neat, I didn't know about that.

[QUIZ] IP to Country (#139)
269047 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 269089 [SimonKroeger] Is an 'initialisation run' allowed to massage the data?
| 269090 [james@gr yp ] My script does need and initialization run, yes.  I don't see any
| 269091 [SimonKroeger] Ok, my script does not need any initialization, it uses the file
| + 269092 [james@gr yp ] Wow, I'm impressed.  Can't wait to see that code!
| | 269094 [SimonKroeger] Thanks. :)
| + 269110 [dwebsubmit@g] I think that the timing of the scripts are not a good index. It all
|   269113 [james@gr yp ] I view it that we are getting a rough idea of speeds, not exact
|   269120 [oksteev@ya o] Same here.
+ 269144 [no@sp m. le ] I assume that it's not ok for folk to use my Ruby GeoIP gem?
| 269186 [james@gr yp ] Please do.  I would love to see how it stacks up against the custom
+ 269259 [jgabrielygal] This is my second submission to Ruby Quiz, any tip will be greatly
| 269301 [james@gr yp ] This is the code I used to generate the quiz example.  To give credit
+ 269268 [matthias@wa ] ...
| 269580 [matthias@wa ] I just performed the tests another time on my desktop computer with a
| 269595 [james@gr yp ] Great.  Run it for us and let us know how we do.  ;)
| 269719 [matthias@wa ] Here are the results of the supplied solutions so far, and it looks like
| + 269728 [adam.shelly@] It depends what you mean by unmodified - my algorithm runs off the
| | 269917 [SimonKroeger] Without looking at the other solutions in detail i think one of the problems
| | 269953 [oksteev@ya o] I did some benchmarking of my own.  This one tests out the performance of a single lookup.  I only ran this on solutions which work with IpToCountry.csv out of the box (aka do no prep work).
| | 269965 [oksteev@ya o] -bash-2.05b$ ruby bm.rb
| + 269738 [james@gr yp ] Thank you very much for putting this together and wow, your code is
| + 269753 [jgabrielygal] Yes, I only tested with my version of the file, from which I manually
|   269810 [james@gr yp ] Comments are not a part of the CSV specification, so FasterCSV
|   269903 [jamesbkoppel] MY
+ 269271 [justin.ethie] ...
| 269272 [oksteev@ya o] Here's my submission.  It's almost exactly the same as Jesus'.   I have a feeling everyone is going to have very similar code for this one.
+ 269307 [rubify@so to] My solution suffers from over-generality (is supposed to work for any sorted
  + 269333 [rubify@so to] Check what ccountry is  If you get any valid answer - this answer
  | 269346 [james@gr yp ] $ ruby ip_to_country.rb
  | 269358 [rubify@so to] I've sent my comment and refreshed new headers - and yes, your solution came
  + 269381 [jgabrielygal] require 'ftools'

Race condition in class inheritance
269057 [gaspard@te i] I need to identify classes from a string called kpath (class path)
269064 [vjoel@pa h. ] Defer building the hash until class_from_path is called.
269080 [gaspard@te i] Thanks for the idea, that's a good workaround.

How many computers in the house?
269063 [promos@bu ch] I went to the Lone Star Ruby Conference last week.  7 of us went out to
+ 269067 [Bil.Kleb@NA ] I'm a Toyota Production System / Goldratt fan, I have one
| 269069 [vjoel@pa h. ] Heh. I own 0 computers. Ownership is so 20th century.
| 269073 [Rob@Ag le on] You haven't addressed Todd's original question.  He didn't ask about
| 269079 [vjoel@pa h. ] Still 0, at the moment. Got rid of an 8 year old linux box a few weeks ago.
+ 269068 [JeremyWoerti] 2 completely operational, and 2 that only need ram or a video card. :)
| 269098 [dangerwillro] ZERO.
+ 269072 [Rob@Ag le on] Well, there are 5 that are currently work and at least 5 that don't
+ 269077 [bulliver@ba ] 3 x x86 Desktop/Server (Linux, FreeBSD)
+ 269078 [garbagecat10] ...
+ 269081 [jonas@on a. ] Jonas Roberto de Goes Filho (sysdebug)
+ 269083 [perrin@ap th] RUNNING
| 269088 [perrin@ap th] In summary, counting the SigO's two systems, I expect that in very short
+ 269123 [craigbeck@lu] It's kinda funny.. I just got a new laptop from work and when I got
+ 269132 [znmeb@ce ma ] I still have all but one of the computers I've used -- the one I *don't*
+ 269143 [bigboss64@ip] If I could afford to I'd have wall to wall computers in a massive home
| 269174 [znmeb@ce ma ] 8-bit: Altair 680B, Kim-1, TI University Module (a chip level board, not
+ 269191 [robert.mcgov] Hmm lets see, there are 4 active machines running nearly all the time
+ 269227 [lloyd@2l ve ] I only have 5 but I gave some away recently, so I am not a total
+ 269276 [cdcarter@gm ] I have 3, but up to 3 more may be on the network at any given time.
| 269284 [znmeb@ce ma ] You should buy a Zaurus and call is zaurusaurus ...
+ 269313 [fred@la av .] Not that much.  We have 5 boxen (and 6 cores) for 4 inhabitants, plus
+ 269324 [jonsdenni@gm] I have a mac mini, there's a 2004 IMB server running Ubuntu, two pretty
+ 269362 [winter.ayars] I have one working desktop computer, which is my main one. I have one
| 269365 [rfenney@fe t] Dual booth Vista/SuSE 10.2   AMD 64 4800 dual core, 2GB ram, 1 to 2 TB
+ 269389 [ronald.fisch] (2 Linux machines, one Mac, one Windoze XP and Win 98 (!!!!)).
+ 269411 [rick.denatal] Frodo is an old IBM Intellistation M which is a workstation server.
| 269412 [caduceass@gm] Let me know if you acquire a Tom Bombadil :-)
+ 269414 [jesper@ex lr] 1x C64 with RR, RRnet, MMC, 1541 & 1581 diskdrives
| 269416 [gaspard@te i] Is this statiscal count related to
| + 269417 [summercoolne] I have 8... but one is a 486 with 16MB RAM...  my friends came to my
| + 269421 [promos@bu ch] No, more of a http://en.wikipedia.org/wiki/Compulsive_hoarding
+ 269419 [julianraschk] Beth, the G4 iBook that has survived snow, candlewax, cat claws, beer,
+ 269436 [jeremymcanal] I have two: a black MacBook (domo) and a white MacBook (arigato). :)
| 269535 [perrin@ap th] Zen . . . ?  I was expecting you to next say you have an iMac or a Mac
| 269609 [hramrach@ce ] My mini dictionary says it can be interpreted in several ways.
+ 269536 [warlickt@op ] 1 x86 Server (Linux) (+1 more on the way)
+ 269573 [mac@ma kr ck] 1 - Sever Mandrake 10
| 269604 [rick.denatal] Or maybe, I'm guessing, an older but wiser OS. <G>
| 269647 [mac@ma kr ck] You got that right, Ubuntu seems to be multiplying.
+ 269815 [dougal.s@gm ] 1x Macbook Pro C2D 2.16Ghz 2GB 120GB. Running OS X

question about instance_eval, dynamic methods and blocks
269071 [christopher.] Not sure if I am attacking this correctly or not, so if anyone has any
269075 [stefano.croc] I'm not sure whether I understand your question correctly. Can't you store the

Regarding _popen() in windows 2000
269082 [painulyarun@] I have a console application. In windows 2000,  _popen()  is returning
269093 [djberg96@gm ] Are you talking about IO.popen? I didn't think Ruby used _popen()
270171 [painulyarun@] Thanks a lot! The problem is resolved by setting /MD flag.

confusion over 1.8.5 and 1.8.6 behavior of private
269095 [vinbarnes@gm] I noticed some interesting behavior when implementing some
269323 [rick.denatal] No idea which is right.  I wasn't aware of a difference between 1.8.5 and 1.8.6.

metaprogramming to generate list of class-specific attributes
269097 [phlip2005@gm] Here's a test case illustrates the problem. Then we'll have a candidate fix
+ 269100 [vjoel@pa h. ] Sure...
| 269101 [phlip2005@gm] extend... different from include, right?
| 269103 [vjoel@pa h. ] If you need it to be #include, you can always call #extend from within
+ 269104 [ari@ar br wn] Here is one answering

define method hook
269105 [ben@be bu ke] Is there a way to intercept method defines, so that i can setup a
+ 269106 [wilsonb@gm i] Yep. Module#method_added
| 269111 [ben@be bu ke] great, thanks.
+ 269107 [erikveen@gm ] class Module

gem install mysql mystery
269109 [rps@sa as co] sudo gem install mysql
269190 [dangerwillro] I'm on a similar system.

[ANN] XML in Ruby - Templating Engine
269112 [mneumann@nt ] While everyone embeds Ruby into HTML code nowadays, I thought why not

Ruby and Excel
269114 [analogy47@ao] I'm reading an excel file (text and numbers) with the intent of storing
269435 [analogy47@ao] Thanks for the suggestion David. How would I get rid of the "nil" values
269518 [damnbigman@g] ...

How do I patch Test::Unit?
269119 [cohen.jeff@g] I've finally found some time to dig into one of my favorite parts of
269332 [cohen.jeff@g] Perhaps my original post was too long or too obtuse... let me
269351 [dzwell@gm il] Jeff,
269360 [cohen.jeff@g] Thanks a lot, Dan.  When you said this, it caused me to try the same
269467 [ news@ja .f ] Remember that the Mac comes with an old Ruby (1.8.2?) in /usr/bin, and
269634 [cohen.jeff@g] So it turns out that although I thought was saving my edits to

[ANN] arrayfields-4.1.0
269121 [ara.t.howard] NAME
+ 269131 [m_goldberg@a] Surely, the last line above contains a typo. Shouldn't it be
| 269133 [ara.t.howard] therein lies the problem with writing documentation ;-)
| 269534 [jeremy@hi eg] Bug for you...
| 269676 [ara.t.howard] thanks.
+ 269615 [stephen.bann] There appears to be an incompatibility between arrayfields and active
  + 269675 [stephen.bann] Here's a much simpler way to generate the problem without rails.
  | 269695 [ara.t.howard] yeah thanks.  it was a stupid bug on my part.  4.2.0 and 4.3.0 both
  + 269677 [ara.t.howard] thanks.

269125 [ztz@nx r. rg] I hate to discuss something related to the development timeline, I know
+ 269127 [james@gr yp ] Ruby has some UTF-8 support today.  Support will increase with the
+ 269128 [phlip2005@gm] "Unicode" is not an encoding. Are you asking for UTF-8, UTF-16, or something
+ 269422 [promos@bu ch] I was just looking at the source code for 1.8.6 this weekend.   The C
| 269424 [phlip2005@gm] Apples and oranges. Unicode libraries like iconv use C linkage, so they can
| 269427 [promos@bu ch] You got a problem with Scooby Doo?
| + 269438 [phlip2005@gm] Oh my apologies too - Scooby Doo is quite over my head. All I could
| + 269439 [matz@ru y- a] Old K&R style has nothing related to Unicode support of the language.
|   269454 [promos@bu ch] Thanks Matz.
|   269456 [matz@ru y- a] Even though the old style has some drawbacks (less type checks for
+ 270180 [hramrach@ce ] Ruby has unicode support. Sort of. Regexes work in UTF-8 when $KCODE
  + 270319 [koflerjim@ma] ... or you may use the /re/u regex option to handle UTF-8 encoded
  + 271592 [felipe.contr] What about UTF-16?
    + 271600 [dangerwillro] Go to unicode.org
    | 271641 [felipe.contr] Yes but what about stuff already encoded in UTF-16?
    | 271691 [dangerwillro] That's why I said read up on unicode!
    | + 271697 [james@gr yp ] $ iconv -f utf-8 -t utf-16 japanese_prose_in_utf8.txt >
    | | + 271721 [dangerwillro] interesting that you would generate more lines, fewer words, and
    | | + 271727 [dangerwillro] Scratch that! I must've gone cross-eyed!
    | + 271752 [felipe.contr] I didn't find anything new. It's just explaining character sets in a
    |   + 271757 [bigboss64@ip] ASCII is a 7-Bit Encoding with 128 characters in the set.
    |   + 271758 [dangerwillro] Hmm... you should consider converting it to utf-8 via iconv.
    |   | 271975 [james@gr yp ] The iconv library is a standard library shipped with Ruby.
    |   | 271980 [dangerwillro] Sure enough!
    |   + 271969 [hramrach@ce ] UTF-8 and UTF-16 are pretty much the same. They encode a single
    + 271759 [dangerwillro] oh, and Mr. Contreras,

Mechanize | trouble with select box (drop down box)
269129 [subsume@gm i] For the life of me, I can't seem to access the form '_ddlFilterFormat'

Source a javascript and stylesheet into rhtml file
269135 [tim@58 7s ut] I'm trying to do a quick dump of a javascript and style sheet located in
269137 [phlip2005@gm] <%=h File.read(RAILS_ROOT + '/public/javascript/my_source.js') %>
269138 [james.britt@] Rails questions are better directed to Rails mailing list, where you'll
269181 [ruby@an hr p] While Philip may have assumed that Tim was using Rails, there was nothing
269552 [james.britt@] Amazingly true.

one line to print the statement AS WELL AS the evaluated value like in C
269140 [summercoolne] ...
+ 269161 [dzwell@gm il] def print_val(str)
| 269168 [m_goldberg@a] foo = [1, 2, 3, 4, 5]
| + 269170 [dzwell@gm il] You're right, thanks. When I tested this, I used the first poster's
| + 269205 [Summercoolne] it works but then if print_val is called inside an instance method,
+ 269193 [dangerwillro] puts "myArray[3] + 1 is #{myArray[3] + 1} "
| 269243 [shortcutter@] def print_val(expr,b=binding)
+ 269194 [vjoel@pa h. ] def dbg(&bl)
  269207 [Summercoolne] It works!  both for globals and for instance variables...
  + 269209 [vjoel@pa h. ] The {..} is just ruby's block notation, just as in "each {...}"
  + 269210 [phurley@gm i] require 'rubygems'

Post data
269151 [jarvo88@gm i] Ok guys lets say i have a form like this in a webpage
269154 [jarvo88@gm i] Nevermind.. I have

rand()  v. rand(0.1) ?
269157 [dolgun@ex it] Is there any difference between calling rand() and rand(0.1)?
+ 269160 [flori@ni e. ] rand(max=0)    => number
| 269163 [perrin@ap th] Speaking of which . . . obviously rand() doesn't produce a truly random
| 269167 [matz@ru y- a] It uses Mersenne Twister algorithm which has a period of 2**19937-1.
| 269177 [perrin@ap th] Excellent!  Thank you for the quick and informative response.
+ 269172 [matthewrudyj] takes a look at the rdoc -
  269197 [dolgun@ex it] That was my analysis too, however pickaxe2 has some code on p. 138 that
  269281 [m_goldberg@a] You've found a bug in the Pickaxe book. I'm guessing but I suspect that

[ANN] CouchObject 0.5
269158 [johans@gm il] ...

Unable to load fireruby gem
269162 [Lee.Longmore] I get the following error when trying to load fireruby, despite having
269185 [caduceass@gm] Permissions, maybe?

Re: [ANN] Metadata 0.3
269165 [ilmari.heikk] Oh, nice, mplayer does give out metadata fields. I better augment
+ 269196 [konrad@ty er] charset="utf-8"
+ 269198 [konrad@ty er] charset="utf-8"

[MacOS X RubyCocoa] Please retry installation
269166 [unbewusst.se] since last update of dev tools, i don't see anymore RubyCocoa

XML parser; maybe ruby is too slow?
269171 [benini.david] I managed to write a SGML parser with the hpricot library. As I
+ 269175 [has.sox@gm i] ...
+ 269228 [yermej@gm il] I haven't done any comparison testing, but if your *.EXP files are
  269237 [benini.david] The problem is the EXP file are actually SGML; I could not parse them

will we have rand(m, n)?
269176 [summercoolne] ...
269179 [halostatue@g] Why not instead suggest rand(m..n)? That would, I think, be more
269184 [h.wickham@gm] But would that draw discrete or continuous random numbers?
269187 [shortcutter@] That question actually applies to both variants. :-)

# matome 17
269178 [slavof@gm il] ...

errors, trying to edit and write some text files
269180 [somerandom_b] forum over at Tracks. I'm trying to extract some info from a plain text
269183 [matt@ti bi s] Even in my newsreader program I had trouble with your message. The
269428 [somerandom_b] Many thanks, I had some success by typing out the script myself and this
269520 [matt@ti bi s] Well, the script is doing exactly what you're telling it to do. This
269522 [somerandom_b] That's brilliant thanks! So it seems to me that the Tracks Developers
269549 [matt@ti bi s] It's hard to say, because I don't know the format of the feeds. You
269642 [somerandom_b] Many thanks - you're helping me hugely. I've gone through the script and
269875 [matt@ti bi s] In my view the entire original script is misconceived. You can't just