168159-171618

167905-334464 subjects 168352-169588

^ December Ruby events in the SF Bay Area
168159 [rdm cfcl.com] As I hoped, someone (Bosco So) decided that the SF Rubyists needed Real

^ RubyGems - Tests fail on Gem install only
168161 [rosco roscop] I'm trying to package up a new version of my app's Gem, but am having a

^ If like smalltalk
168164 [julesjacobs ] smalltalk if's, where you have a boolean class and two subclasses: true
+ 168165 [halostatue g] They aren't like Smalltalk ifs because Ruby isn't Smalltalk. That
| 168201 [srinivas.j s] An interesting difference, though, is that the Smalltalk version
| 168207 [lazax.com gm] You can define these methods in TrueClass and FalseClass so you don't
| 168221 [johnwilger g] I had thought about doing it that way, but then you could only use
+ 168167 [daniel.cedil] What would be the point of creating another smalltalk like language?
+ 168168 [johnwilger g] class Object
+ 168241 [lthiryidontw] (var == 'a').if_true?
+ 168394 [steve.enzer ] I'm not sure if I'm understanding your question, but it's actually

^ Maximum stack depth Ackermann redux
168166 [igouy yahoo.] ...

^ [SOLUTION] Pinewood Derby
168169 [pine29 myfas] #!/usr/bin/env ruby
168299 [bob_showalte] Sorry, Kenneth, I sent the summary to James before your solution hit, so

^ Help constructing interesting hash?
168170 [christopher.] Suppose I have an array of arrays like
+ 168173 [rosco roscop] I assumed you meant [['A', 'B', 'C'],[1,2,2]] - I know comma at end can be
+ 168174 [gwtmp01 mac.] input = [[:A, :B, :C],[1,2,2]]
+ 168176 [mental rydia] def build( values, keys )
| 168255 [martindemell] ...
+ 168180 [sean.ohalpin] a = [['A', 'B', 'C'],[1,2,3]]
| + 168184 [belorion gma] ...
| + 168185 [sean.ohalpin] Oops - I didn't read the full message properly.
+ 168195 [dblack wobbl] a.zip(b).inject({}) do |hash,(key,value)|
| 168369 [dave burt.id] ...
+ 168205 [lazax.com gm] h = {}
+ 168385 [neoneye gmai] #invert can sometimes be useful..   but not in this case

^ Point an element in Hash Object
168172 [andrea.regin] I'm trying to create an hash object using object string for key and
168178 [rosco roscop] (Caveat: Fairly new to Ruby)
+ 168200 [daniels pron] I thought something like this was in facets... maybe it was one of those
| + 168204 [lazax.com gm] Just a note about previous solution: referencing a reference does
| + 168253 [andrea.regin] Thank too much for your help.
| + 171524 [andrea.regin] This is ok... but i have a question.
|   171606 [daniels pron] You can't serialize procs (well... you can, sort of, but it's best not
|   171609 [mental rydia] Just as an aside, I'm wondering whether this is the best form
|   171618 [daniels pron] Oh... and your actual problem is that the HashReference object isn't
+ 168243 [lthiryidontw] @my_hash["one"].replace 'Modify'
  168256 [rosco roscop] Definitely. Thanks. :)
  168258 [dblack wobbl] It's not an exception: the convention is that when there's a pair of
  168261 [rosco roscop] Ahh, I see... I had the idea that the bang signified a method that

^ Ruby, MySQL on WinXP?
168175 [planetthough] I'm just starting out learning Ruby, having come from a PHP background.
+ 168177 [james_b neur] There is a pure-Ruby MySQL driver.
| + 168193 [planetthough] Thank you -- have it working now!
| + 168198 [dave burt.id] ...
|   + 168230 [planetthough] I am actually connecting without difficulty (so far?) to MySQL 5.0.16
|   + 168351 [planetthough] Still, I'm kind of curious as to why Ruby doesn't have an officially
|     168368 [curt.hibbs g] ...
|     168399 [Paul.McArdle] MySql now has a Ruby section in the forums area.
+ 168191 [gregory.t.br] It is actually a Ruport tutorial, but everything but the last step is
+ 168220 [x versatechs] Microsoft offers a free C++ compiler .....
  + 168223 [gregory.t.br] You can just use MinGW.
  + 168251 [vanek acd.ne] - gcc works fine
  + 168616 [david vallne] I think either the Platform SDK (downloadable) does, and you need that

^ "no such file or directory"
168179 [printdude196] ...
168192 [Paul.McArdle] make sure you are in the Rails application that you created's

^ is there a way to get or list  all available classes?
168181 [uval rz.uni-] topic says it all
+ 168183 [nightphotos ] irb(main):001:0> ObjectSpace.each_object(Class) {|c| p c}
| 168237 [bob.news gmx] Note, that all approaches using ObjectSpace list only classes known to the
| 168820 [gene.tani gm] right, and immediate values are kind of important:Fixnum, Symbol,
+ 168190 [cyclists nc.] classes = []
+ 168617 [david vallne] A slightly more hackish solution I think that might also work with
+ 168809 [robert.evans] Not sure exactly which list of "classes available" you want, but if

^ Error after upgrading to RubyDevTools 0.6.0
168209 [jeff.fry gma] Plug-in org.rubypeople.rdt.ui was unable to load class

^ require!
168211 [rosco roscop] It (finally) clicked now, 'require' is just a method...
+ 168224 [dblack wobbl] Don't.  That's a pretty traditional rite of passage :-)
+ 168227 [transfire gm] object with #to_ary defined --if that is what you mean.
| + 168229 [gwtmp01 mac.] Actually, I think the * operator looks for #to_a not #to_ary.
| | 168234 [rosco roscop] Some quick experiments just now suggest it looks first for to_ary, then
| + 168233 [rosco roscop] course it makes complete sense with hindsight. Thanks for pointing the way.
| + 168244 [lthiryidontw] AFAIK may change in ruby2.
|   168245 [dblack wobbl] ...
|   + 168247 [lthiryidontw] Mmm, I remember Matz wonders about possible changes in the way the array
|   | 168248 [dblack wobbl] ...
|   + 168319 [daniel.schie] #to_ary is called first; if it doesn't exist #to_a will be called.
|     168324 [dblack wobbl] Whoops -- I got a false negative on a (flawed) little test I ran.
+ 168263 [james graypr] Actually * looks for a to_a.
  + 168276 [briankbuckle] Does calling amethod(*x) have the same meaning as calling
  | + 168281 [dblack wobbl] def x(*args)
  | | 168284 [briankbuckle] x(*a)  # [1,2,3]
  | | + 168287 [briankbuckle] Oops.  Scratch that last question.
  | | + 168288 [dblack wobbl] I did leave off the to_a, though array.to_a is a no-op so it shouldn't
  | |   168298 [briankbuckle] I am an older version (1.8.2) but I am getting the same result as you.
  | + 168286 [rosco roscop] def amethod(one,two,three)
  + 168282 [rosco roscop] didn't dare imagine it might be even _more_ flexible. Ruby just keeps on
  + 168420 [hal9000 hype] I always thought it looked for to_ary... now someone says it looks
    + 168436 [rosco roscop] When I kicked this thread off, I'd just done some quick tests that
    + 168467 [james graypr] => nil

^ Re: string range membership
168226 [transfire gm] This is but one common instance. The issue extends beyond this. Range
168270 [transfire gm] Nice summary Warren.

^ Problem: Getting Rails to run on apache
168232 [newsAT scree] ...
168235 [newsAT scree] ...
168254 [blargity gma] Hope you get it fixed though!
168412 [newsAT scree] ...
168499 [corey synthe] A little shell lovin' mixed with Ruby would have seen you through.

^ Ruby Email handling / TMail / ActionMailer
168236 [chrisjroos g] I've used TMail in the past, mainly in conjunction with ActionMailer.

^ Workflow/Rules Engine in Ruby?
168239 [saimonmoore ] Does anyone know of any workflow/rule engines implemented in Ruby?
+ 168250 [lyndon.samso] ...
| + 168279 [teslaomd yah] It's not so much workflow, but if you're looking for something that
| + 168316 [zoso foton.e] State Machine Compiler? http://smc.sourceforge.net/
|   168452 [saimonmoore ] Yes, I 'm having a good look at smc. It might just fit the bill but I
+ 168454 [eule space.c] ...

^ [ANN] Ruby for Postioning Device
168242 [martin.dufor] This first public release (version 0.5.0) of the Ruby for Positioning

^ no subject
168246 [alexander.pa] ...
168249 [tshiget1 gw.] i believe you need to send it to ruby-talk-ctl@, not ruby-talk@.

^ String + Range = Strange
168252 [martindemell] ...
168259 [transfire gm] Exactly.
168322 [steve_rubyta] Maybe I'm about to say something silly (by not being up-to speed) but
168335 [bob_showalte] I don't know about being sane, but the behavior is explicable by the
168354 [steve_rubyta] This, I think is the crux of the matter.  It seems to me that given that
168422 [hal9000 hype] I think that String#succ is of limited usefulness, and will *always* be a
168457 [steve_rubyta] I can see circumstances where it might be useful to have a method

^ [SUMMARY] Pinewood Derby Chart (#56)
168264 [james graypr] ...

^ What is the best way to edit a file to eliminate a line using Ruby?
168265 [steve_rubyta] This sounds an easy task, but I'm certain that I'm yet to find the most
168269 [w_a_x_man ya] ruby -i.bak -ne 'print if $_ !~ /foo/' stuff.txt
168273 [steve_rubyta] Coo... that's a new one to me... very nifty.

^ Good Ruby Examples?
168271 [hcatlin gmai] I'm planning on doing a tutorial about Ruby for Ryerson University's CS
+ 168280 [vanek acd.ne] C has 'Hello world!'
| 168301 [james_b neur] Except the typical C "Hello, world" example doesn't start with, "First,
| + 168312 [james graypr] I agree.  Avoid introducing 50 great add-on tools and target language
| | + 168314 [curtis.schof] Java, not supporting double-dispatch, can turn a pretty pattern like
| | + 168320 [james_b neur] The idea is to give a Rake demo, and then examine the Rake library code
| + 168317 [vanek acd.ne] Good point. You get to show what a rich set of libraries Ruby has and
|   168321 [james_b neur] A valuable aspect of Ruby and gems, but it says nothing about the
|   168372 [hcatlin gmai] James, that's more what I'm thinking about.
+ 168306 [julesjacobs ] If you want to show them how fun ruby is: start with a c/java program
+ 168326 [martin.anker] This is my favourite, here are two solutions for the task
+ 168356 [christopher.] I'm not sure what level your students are, but a demo of drivting
+ 168367 [leavengood g] How about an application which uses open-uri or Net::HTTP to download
+ 168392 [Digikata gma] Since the audience is composed of CS majors, some classic algorithms in
| 168405 [Paul.McArdle] Show them the basics of the language, ALA  "Ruby in a Nutshell".
+ 169053 [nightphotos ] def quicksort(a)
  + 169111 [han.holl gma] ...
  + 169155 [surrender_it] def qs(a)
    169236 [logancapaldo] I don't know, if you start throwing partition in there, you're this

^ (none)
168274 [htruax stf.c] ...

^ Re: What is the best way to edit a file to eliminate a line
168275 [rforum gmail] File.new( "stuff.txt" ) do | f |
+ 168294 [w_a_x_man ya] IO.foreach('stuff'){|s| print s unless s =~ /foo/}
+ 168307 [jeff schwabc] File.new doesn't take a block.  Use File.open.  Also, "in" is a keyword,
+ 168309 [steve_rubyta] That's remarkably similar to my current rough-n-ready approach  - the
  168311 [zdennis mkte] def write filename, data
  168313 [zdennis mkte] You'd probably want the rescue statement to be a "rescue Exception" so you catch any/all errors...
  168315 [zdennis mkte] Ok, slightly more elegant...
  + 168336 [steve_rubyta] It will still permanently and irrecoverably loose data if the process
  | 168338 [zdennis mkte] require 'fileutils'
  + 168340 [steve_rubyta] Both versions look dangerous to me.
    + 168350 [zdennis mkte] Understood. I don't know full extent of your issue. It appears you can
    + 168357 [Digikata gma] I don't think you can get away without a tempfile and get safe
      168458 [steve_rubyta] Yup... that seems pretty reasonable to me too....though I have to say
      168497 [gavin refine] I think most of us have faith that, in general, the computer will not

^ How can I load my own files to ruby? (Win XP)
168285 [Stephan.Kass] I am just trying to get some knowledge in Ruby. For this I am playing
+ 168293 [rosco roscop] (I don't know about Windows, but I expect it's the same in this regard?).
+ 168302 [blargity gma] cd User\stk\Programming\Ruby
+ 168304 [bob_showalte] The RUBYLIB environment variable lets you specify additional directories
  168343 [Stephan.Kass] Thank you.

^ RWB, not quite an announcement
168290 [pat.eyler gm] RWB is a web load/performance testing library currently being
168506 [jgbailey gma] Can we download this somewhere?
168509 [pat.eyler gm] yes, it's available from http://rubyforge.org/projects/rwb

^ Memory Leaks: How to see GC Roots?
168300 [schween snaf] Is there a way to get a list of all GC roots in my Ruby program?  I know
+ 168303 [bob.news gmx] I don't think this info is available.  But how about statistics per class?
+ 168361 [vjoel path.b] There's a ruby patch to show what objects are reachable from the roots
| 168503 [schween snaf] I tried to use the patch with Ruby 1.8.3 and the current CVS Trunk
+ 168510 [snail objmed] <schween@snafu.de> writes

^ Ruby/Tk: pack() with block doesn't work
168308 [doodpants ma] All this talk about Ruby/Tk, particularly the discovery that it all
168428 [nagai ai.kyu] 'pack' method doesn't accept a block.
168432 [nagai ai.kyu] If use the following definition, 'pack' can accept a block. ;-)

^ abstract class
168323 [hochherz inf] hey
+ 168328 [gavin refine] irb(main):001:0> class Foo; def self.new; end; end
+ 168332 [gavin refine] ...
+ 168334 [daniel.schie] class Class
  168337 [hochherz inf] nice solution
  168349 [transfire gm] What do you use this for?
  + 168374 [daniel.schie] Thank you very much :)
  + 168381 [gwtmp01 mac.] Sometimes you have an abstract class that models all the common
    168391 [gavin refine] Which is also one thing that makes abstract classes not nearly as

^ [ANN] el4r-1.0.0 - EmacsLisp for Ruby
168327 [rubikitch ru] ...

^ [ANN] langhelp-0.9.0
168329 [rubikitch ru] ...

^ RubyConf 05 Audio and Video files resurrected!
168333 [ezra yakimah] hey folks-
168564 [Bil.Kleb NAS] I don't see the Ryan Davis videos that I uploaded a couple weeks ago?

^ Ruby TK GUI questions
168341 [htruax stf.c] ...
168429 [nagai ai.kyu] listbox_widget.curselection

^ [ANN} Komodo 3.5.1 -- a professional Ruby IDE
168342 [curt.hibbs g] ...
168492 [janchrister.] I've tried it on Win XP. It's terribly slow, one minute just to see my
+ 168522 [ezra yakimah] Thats just the way it works. It takes forever between page loads
| 168539 [sillydevelop] I thought Komodo used to support code completion drop-downs... is this
| 168550 [curt.hibbs g] ...
| 168579 [janchrister.] I'm looking forward to your comparison, Curt.
| 168600 [curt.hibbs g] ...
| 169198 [florgro gmai] What about ruby-breakpoint? There's no graphical front end just yet, but
| 169686 [eric.promisl] Just coming in to this thread to agree that the Komodo debugger is
| 169692 [curt.hibbs g] ...
+ 168548 [curt.hibbs g] ...
+ 169050 [nightphotos ] I'd give ArachnoRuby a try:  http://www.ruby-ide.com
  169084 [curt.hibbs g] ...

^ need some Ruby magic
168344 [hammed gmail] ...
+ 168345 [dblack wobbl] array.sort_by { rand }
| 168360 [vfoley gmail] Maybe there should be Array#randomize...
| 168363 [jeff.darklig] ...
+ 168347 [jim-keyword-] my_array.sort_by { rand }
  + 168348 [hammed gmail] ...
  + 168643 [reinder verl] ...
    + 168654 [steve waits.] How about just doing this?
    | 168778 [kero chello.] ...
    | 168793 [steve waits.] Good points, thanks.  How about this?
    | 169379 [martindemell] ...
    | 169401 [steve waits.] Thanks Martin!
    + 168662 [sgentle gmai] Actually, sort_by caches every value passed and uses those for
    + 168675 [jim weirichh] Actually, it will.  sort_by uses a Schwartzian transform to do the
      168687 [ mfp acm.org] sort_by{ rand } is actually biased, since sort_by will preserve the
      + 168688 [ara.t.howard] does
      + 168733 [briankbuckle] How frequently would rand return a same value?  (In theory it would be
        168741 [steve waits.] According to the Pickaxe, Kernel.rand is an implementation of the
        168746 [steve waits.] I should add to this that you can approximate when you'll get
        168878 [briankbuckle] I liked the Birthday Problem.   Thanks.
threads.html
top