170218-171390

169943-171962 subjects 170408-176386

^ Re: [SOLUTION] Kalah (#58)
170218 [janchrister.] Rob, I think you forgot the code.
170222 [ruby ml.icem] beh@myhost:/tmp/sol $ tar xfvz ~/solution.tar.gz

^ Rails crashes over night?
170219 [nospam yahoo] I'm running Ruby on Rails on Fedora Core 4 with lighttpd and fastcgi. I
+ 170227 [tsumeruby ts] Tsume
+ 170511 [jgbailey gma] I had a similar problem under Apache and FastCGI. The MySQL connection

^ Memory Usage
170220 [hsanson moeg] I have a ruby script that reads data from a database, processes the data (long
+ 170230 [perrin apoth] Are you making heavy use of symbols?  They don't relinquish RAM
+ 170234 [peter semant] I've had a problem like this using the flickr api and net/http. All it
+ 170262 [gene.tani gm] and John Carter's thing to dump out your objects and (linux) processes
  170384 [hsanson moeg] Thanks,
  170399 [gene.tani gm] i just found this, tagged by 1 del.icio.us user (thx whoeve you are!),

^ Re: Kalah (#58)
170224 [janchrister.] Ach, I'm using http://www.ruby-forum.com
170225 [janchrister.] Strange,

^ Ruby GUI recommendations?
170226 [janchrister.] Which GUI lib is the best and which is the most widely used ?
+ 170231 [joevandyk gm] Depending on your needs, a RubyOnRails application packaged up as an
+ 170233 [tsumeruby ts] Here are comparisons between available toolkits.
  + 170258 [gene.tani gm] this guy likes gtk2 too (in French)
  + 170445 [flecktone gm] What are people's experience with packaging applications made with
    170505 [hawkman.gelo] tk works as well, though i think tk works in a somewhat silly way..
    170543 [snowzone5 ho] i just spent the last few hours trying this out. the install was
    170566 [snowzone5 ho] and add:  libgtjread-2.0-..dll
    170970 [pan erikveen] It obviously needs more than just the DLL's. For TK, I included
    171133 [snowzone5 ho] yeah, with tk you'd probably need the package info, etc.

^ test/unit and pp
170229 [clr10.10.ran] #!/opt/ruby/1.8/bin/ruby -w
170253 [pat.eyler gm] you should grab unitdiff from the ZenTest package, available at
170273 [clr10.10.ran] does it also clean up the messages? Couldn't find anything in the docs
+ 170278 [pat.eyler gm] Ahh, I misread your request.  No it doesn't clean up the message.
+ 170300 [james graypr] Yes and no.  It show's a diff of the two items that were suppose to

^ [ANN] - posixtimer 0.1
170237 [caleb aei-te] Here's my first RubyForge release, a small utility that wraps around the POSIX
170284 [vjoel path.b] I'd be really interested in knowing how this performs compared to simply
170313 [caleb aei-te] I have a feeling it's implementation dependent.  I'll plan to run a few tests
170331 [sylvain.joye] It depends on the kind of signal used. For posix timers, it is recommended
170333 [caleb aei-te] Yep - I'm working on that for the next release.

^ [ANN] Rote 0.3.0 (doc/web)
170238 [rosco roscop] Rote 0.3.0 is now available for download from http://rote.rubyforge.org/.

^ String.to_sym?
170243 [robert_kuzel] is there a String#to_sym method anywhere in the
+ 170247 [mreed theree] It's called "intern", because Ruby internalizes the string into a symbol.
| 170250 [nobu ruby-la] String#to_sym is also an alias in 1.8 or later.
| 170452 [robert_kuzel] obviously its there IF you try to call it.
| 170481 [transfire gm] I see. FYI for the future. The best place to check first is always
+ 170285 [mental rydia] If you've got a reasonably recent version of Ruby, yes.  I don't
| 170316 [chneukirchen] eval ":#{dump}"
+ 170288 [transfire gm] Hmm... What version of Ruby are you using? You should be able to use

^ A question about recursive programming
170244 [hankgong gma] I want to calculate all sum possibility of interger array. I know there are
+ 170246 [steve waits.] Do you just want to learn about recursion?  Or are you interested in
| 170257 [hankgong gma] Because I read some other lauguage said that recursive programming can
| + 170280 [bob.news gmx] IMHO Ruby is not well suited for that because you'll run into stack
| | 170282 [hankgong gma] Yes, I agree with you...
| | + 170299 [mental rydia] def max( *values )
| | | + 170306 [desmarm gmai] An empty list has no max.
| | | | 170443 [johannes.fri] If you are going to use it for anything serious, you don't want to
| | | + 170309 [hankgong gma] You program works.
| | |   170315 [mental rydia] It was just intended to illustrate a trivial transformation from
| | |   170320 [janchrister.] A question about recursive programming
| | + 170301 [julesjacobs ] Why would that be so difficult? It might be in Ruby because iterating
| | + 170437 [logancapaldo] charset=US-ASCII;
| + 170287 [chneukirchen] Unfortunately, Ruby doesn't have tail-call optimization, so recursive
| + 170318 [akonsu gmail] if a function invokes itself and returns the result of this invocation,
+ 170249 [nobu ruby-la] return arr if arr.length==1
| 170252 [simon.kroege] Hmm,
+ 170255 [chdiary gmai] I think that it is better solution
| 170263 [dblack wobbl] def all_sum(arr)
| 170265 [chdiary gmai] def all_sum(arr)
| 170269 [dblack wobbl] I'm probably misunderstanding what the original poster wanted.  I
+ 170416 [ronjeffries ] require "test/unit"
+ 170432 [w_a_x_man ya] class Array
  + 170436 [hankgong gma] concise!!!
  + 170496 [mental rydia] That's awesome.

^ How To Turn Off Net::HTTP w/SSL Certificate Warnings?
170251 [keith oreill] I've got a little Ruby script that needs to use SSL but doesn't really
170256 [decoux moulo] Try
170261 [keith oreill] Works great--can't believe that I didn't find it myself. That said, it
170264 [decoux moulo] It's just that the file https.rb is apparently not in www.ruby-doc.org

^ AJAX in Ruby on Rails
170266 [charles.squi] I'm having some trouble getting AJAX working properly for me in Rails.  I've
+ 170267 [steve waits.] Thanks for your message about Ruby on Rails.  I think you'll find
| 170277 [charles.squi] Thanks Steve, I didn't realize the Rails list was email-based.  I just sent
+ 170274 [charles.squi] Just to save someone a post... I know there's a Rails list, but I have
  170289 [f andreas-s.] Try www.ruby-forum.com. It mirrors the Rails mailing list and allows

^ interception method_added for blocks
170279 [robert_kuzel] is it possible to somehow intercept method_added
170290 [transfire gm] class << Proc
170293 [transfire gm] Ah misread that a bit. The code won't help, so ignore that.

^ GC in lambdas?
170291 [akonsu gmail] could someone please confirm this? i am also interested to know why GC
170298 [ef alum.mit.] ever__
170302 [akonsu gmail] thank you. if lambda creates an object during its execution, and by the
170307 [drbrain segm] The object is eligible for garbage collection.  It may or may not be

^ module variables
170294 [akonsu gmail] module MyModule
170304 [gwtmp01 mac.] The instance variable belongs to MyModule, which is an object.  In

^ Rant 0.5.2
170305 [langstefan g] Rant is a flexible build tool written entirely in Ruby,

^ Re: Problems with missing collection method in has_many rela
170310 [ruby-forum-r] The 'Version:Class' is your best clue: it means that instead of
170311 [ruby-forum-r] The 'Version:Class' is your best clue: it means that instead of

^ Migration with Dynamic Table Names?
170312 [martin.glaud] (This is my first real Ruby/Rails project, so please bare with me...)
170323 [james_b neur] James

^ rendering charts via rails
170319 [ljw1001 gmai] Is there a recommended way to render charts from a ruby-based web
+ 170365 [wilsonb gmai] ...
| 170376 [matthewparri] I'm using SVG::Graph for a home project.  It's easy to get going and
| 170381 [michael.schw] Any idea if this is better?
+ 170385 [steve waits.] Check out [Gruff][1].  In the future, consider using the Rails specific
+ 170393 [zedshaw zeds] Hey "larry",

^ matches -> regexp ?
170321 [akonsu gmail] this is not exactly a ruby problem, i hope people will not consider
170322 [rretzbach go] nice challenge, reminds me a bit of the 4th rubyquiz :>
170324 [ef alum.mit.] This is essentially an information compression problem.  There's
170326 [akonsu gmail] well, right, that is what i mean.
170328 [akonsu gmail] i suspect that from your trivial solution we can arrive at the final
170469 [bob.news gmx] Another option is to build up a tree and create the RX from that.  I once

^ Any problems with Ruby on Rails - on Win CE
170327 [scottishguy ] I think the answer is going to be yes, knowing that Ruby runs on Win
171390 [rdusong gmai] Hye,

^ How Do I Search Ruby ML?
170338 [speechexpert] OK - Here's my issue
+ 170344 [ruby-forum-r] Google with the site: parameter.
+ 170346 [agorilla gma] Some of us use gmail.  It's an excellent way to read lists.  Can send
| 170398 [gregory.t.br] I use Gmail and generally love it, but two annoying things for anyone
| 170504 [rasputnik gm] Isn't that what a 'conversation' is?
| 170538 [gregory.t.br] Actually, yes and no.
+ 170546 [gene.tani gm] This is a major win for Redmond: Outlook Express scales!

^ Hibernate on Ruby
170341 [listrecv gma] Any ideas on using Hibernate OR/M from within Ruby?
+ 170342 [transfire gm] Why, when you have Og, ActiveRecord and a few other interesting
| 170345 [listrecv gma] ActiveRecord is great for small-to-medium things, but does quickly show
| 170353 [ruby-forum-r] Google up Og and Kansas and see if either suits you better.
| 170390 [zedshaw zeds] No, that'd actually involve admitting he is wrong.  The day a
| 170391 [neil hakubi.] Yeah, that's the way, go off on a tangent and berate someone for asking
| 170403 [listrecv gma] Thanks for the support Neil.
| 170479 [wilsonb gmai] I won't claim to support this idea. Personally, I think it's like
+ 170450 [surrender_it] probably the only chance is using jruby, but are you sure you can't do

^ LXR style cross references Ruby code
170343 [listrecv gma] While trying to navigate a large, unfamiliar application, I find a
170404 [listrecv gma] Huh?!
+ 170618 [damphyr free] Maybe because RDoc does most of the cross-references you want, if only
+ 170664 [chneukirchen] Where are the millions of lines of Ruby they would be needed for? :-)

^ Idiom wanted: do-while
170348 [adam.shelly ] So I was working on the quiz solution, and
+ 170349 [james graypr] loop do
| + 170350 [ mfp acm.org] [ruby-core:06745]
| | 170358 [adelcambre g] You can also do
| | 170377 [adam.shelly ] I was certain I had tried that....
| | 170382 [james graypr] But hopefully you followed the Ruby Core link in this thread and saw
| | 170395 [mark.ericson] I did, and I was curious about the statement
| | + 170396 [adelcambre g] The begin end one functions like a do while loop, the body will always
| | + 170433 [steve waits.] Andy already answered, but I thought I'd take my shot at it too.
| + 170387 [slitt earthl] I do this quite a bit, but it's not structured programming and is a little
|   + 170392 [james graypr] Which is probably a sign that method calls are needed.  Heck, I think
|   + 170497 [lukfugl gmai] I see no similarity. 'goto' is unstructured because the target point
|     170579 [slitt earthl] Ahh -- I found a reference. See
|     + 170581 [james graypr] The loop do ... end construct is infinite.  You must add a break to
|     | 170614 [perrin apoth] It's certainly good policy to use unit tests.  On the other hand, coding
|     | 170641 [james graypr] At the risk of sounding like a broken record, I think one of the big
|     + 170583 [jamis 37sign] Ok, I admit I'm coming onto this thread a bit late in the game, so
|     + 170656 [lukfugl gmai] I'll concede that, but refer to James comment (about one break in a
|       170677 [slitt earthl] It's definitely not the break statement's fault. It might not be the
|       170678 [lukfugl gmai] That's unfortunate if you feel that you're in that position (and I can
+ 170357 [surrender_it] you could do
+ 170364 [ara.t.howard] i = 0
  170369 [binary42 gma] ( puts "foo" ) while nil

^ How to time the duration of a script.
170351 [rakxzo gmail] If I wanted to find something like the "time" feature on shell...
+ 170355 [ruby-forum-r] Well, you can actually use 'time my.rb' :)
+ 170362 [ara.t.howard] BEGIN{ $start_time = Time::now.to_f }

^ Re: Weird (Errno::ENOEXEC) - Ruby bug?
170352 [kero chello.] $ ruby test.rb

^ Way to combing Hash Definition sans => with %w() ?
170361 [dandiebolt y] I have a large amount of text pairs (no spaces inthe text) that I need to turn into a hash. Is there a shorcut that will allow me to create the hash without entering the quotes and arrows?
170363 [james graypr] => {"apple"=>"bananna", "orange"=>"grape"}
+ 170366 [dandiebolt y] Yahoo! Shopping
| 170370 [james graypr] That asterisk is Ruby "splat" or "explode" operator, in this
| 170380 [dandiebolt y] Thanks again
| + 170383 [james graypr] As I said, it must be the last parameter of a method call.  Hash[...]
| + 170420 [martindemell] The * converts an array to a comma separated list (what David Black
+ 170372 [jgbailey gma] Was this question a ringer or what? Seriously, I love how easy Ruby

^ System Tray Icon
170367 [listrecv gma] Any one know of a simple way to load an icon to the system tray via
+ 170374 [wilsonb gmai] I don't believe that there's any cross-platform way to do this.
+ 170451 [dooby d10.ka] daz

^ Using Float For Currency
170371 [lists laston] Howdy,
+ 170373 [mental rydia] If you're doing anything that matters, don't use floats for
| + 170375 [f andreas-s.] BigDecimal is good.
| + 170378 [lists laston] Thanks. Fortunately this is just some quick guestimation throw-away stuff.
| + 170424 [joevandyk gm] What cracks can I lose money through?
|   + 170434 [steve waits.] Floating point numbers represent an extremely wide range of values -
|   + 170550 [malte__ gmx-] => 2.77555756156289e-17
|   + 171212 [meta pobox.c] It's not just that; your program logic can also behave unexpectedly. e.g.
|     171218 [steve waits.] Excuse my ignorance, but I'm wondering what BigDecimal does different
|     171219 [james graypr] It doesn't use floating point arithmetic.  That means it is accurate,
|     + 171222 [steve waits.] I think you misread my question.  I realize the difference between
|     | + 171223 [james graypr] Sorry about that.
|     | | 171231 [steve waits.] Ahh, I see what BigDecimal is now.  Think I'd rather just use cents and
|     | + 171227 [neil hakubi.] One would use BigDecimal instead of Fixnum or Bignum when one is going
|     + 171224 [lukfugl gmai] And built-in integer types represent integers, not decimals. :)
+ 170379 [wilsonb gmai] val = 9.756
| 170419 [dave burt.id] Or just
+ 170389 [neil hakubi.] require 'bigdecimal'
| 170486 [wybo servaly] This message is in MIME format.  The first part should be readable text,
+ 171221 [ruby-forum-r] Posted via http://www.ruby-forum.com/.

^ How to catch Timeout::ERROR ?
170394 [vvlad n4a.ro] Is there any way to catch Timeout::ERROR exception throw by timeout
170410 [drbrain segm] rescue Timeout::Error => e

^ 1.8.4 preview 2
170397 [gene.tani gm] (my Dad's been pressuring me to re-learn Japanese, i might as well...)

^ Accessing C structures in Ruby
170400 [joevandyk gm] (I've already looked at Swig, btw.  I'd like to do this one by hand.)
+ 170406 [joevandyk gm] class Player
| 170417 [joevandyk gm] VALUE get_player_x_pos(VALUE self)
+ 170412 [ruby-forum-r] My typical recommendation is to just wrap a pointer to
  170421 [joevandyk gm] Can you share more details?  Is that essentially what I've done in my
  170426 [joevandyk gm] #include "ruby.h"
  170428 [ruby-ml magi] Yep, that looks fine to me. There are certainly other ways but aside
  + 170438 [joevandyk gm] How does my code differ from what you described?
  | 170440 [ruby-ml magi] It does not :) There are just many ways you could achieve the same
  + 170448 [martindemell] myself, but this seems like a prime use case)
    170530 [vjoel path.b] I would have mentioned it but the OP wanted to do things the hard way :)

^ How to exit Ruby program properly
170407 [cohen.jeff g] I'm learning to write ruby code, and I'm using 1.8.2 on Windows XP.
+ 170422 [daniels pron] Process.exit is the way to go (or just putting the rest of your logic
+ 170429 [gene.tani gm] just to save you 3.5 seconds of searching, it's Kernel.exit and exit!
  170518 [damphyr free] Will this actually work if a Thread (unjoined) does it?
threads.html
top