245203-245955

244958-245994 subjects 249800-258208

^ New Version of DRP (Genetic Programming)
245203 [chromatophor] i'm working on the next release of DRP and was just curious if any of
245221 [polypus yaho] i see on your blog that you are interested in music
245223 [polypus yaho] sorry but none that i am willing to share at this point, but i will try

^ class methods and instance variables in ActiveRecord::Base
245207 [ziggurism gm] I'm still learning my way around ruby and I seem to be confused about
+ 245208 [alex blackke] Not quite.  The difference between Ruby and other languages is that *the
+ 245210 [stefano.croc] I don't know rails at all, so I may be completely wrong. Classes (in this case
  245224 [ziggurism gm] OK, I think I'm getting there.
  245225 [TimHunter nc] A class variable is NOT the same as an instance variable of the class
  245227 [ziggurism gm] You're right, that method isn't defined in the first case, I've just
  245242 [stefano.croc] In the second case, you have set @var1 to 2 in the context of the singleton
  245281 [ziggurism gm] OK, I think I've got it now.  Class methods of the class have access
  + 245282 [B.Candler po] Class instance variables belong only to one class. For them, a subclass is a
  + 245310 [gwtmp01 mac.] It is also important to realize that class variables ('@@xyz') are
  + 245942 [ziggurism gm] One thing we _can_ say is that class instance *methods* are the same
    245952 [gwtmp01 mac.] I'm not sure that 'class instance methods' is a well-defined term.

^ Prcoessing outoput from tail
245211 [phyprabab ya] I am trying to figure out how to perpetually process the output from a file.  That is I continuously want to process output that is appended to a file and that file could get rolled out at any time.  I use popen w/tail, but this opens the file each time and I have to reprocess all the files content.  Is there a better way to do this or a library that would help me?  I know that I could probably open the file, tack location, and watch the inode to make sure the file has not been rolled, but that amounted to a lot of mistakes and I could never get it work properly.
+ 245212 [gustav rails] Cheery-o,
| 245213 [phyprabab ya] IO.popen('tail -F foo.txt') {|file|
| 245217 [gustav rails] Great! Looks like that works fine. I haven't used the file-tail gem,
| 245218 [phyprabab ya] What happens in the middle of a read from tail when the thread is interrupted?  I have yet to get that stage where I can test this, but it is something I need to watch out for.  Would hate to have a short read - only get half the data!
+ 245265 [B.Candler po] Have a look at using "tail -F=<filename>" or "tail -f=<filename> --retry"

^ Ruby with C
245216 [dogwasstar h] I am new at programming ruby with C. I am trying to pass in a value from
+ 245219 [hhausman gma] By putting the variable 'n' through the INT2NUM macro as you pass it
| + 245220 [dangerwillro] You mean C++ class?
| + 245228 [phurley gmai] int n = NUM2INT(obj);
+ 245280 [ryand-ruby z] Your question has already been answered. Alternatively, use inline to

^ Eclipse Ruby Debugger: Port 1098 problem?
245229 [gallitzin gm] I've read that Eclipse's debugger will not work unless the Ruby

^ [ANN] mechanize 0.6.6 Released
245230 [aaron tender] mechanize version 0.6.6 has been released!

^ ruby18 vs. ruby
245232 [meino.cramer] I am using the ruby-stable-snapshot on a more or less regualr basis
245233 [perl2ruby gm] Can simply create a symbolic link called ruby that points to ruby18 as
245234 [meino.cramer] thanks for your reply, ranx...already know symlinks...being a UNIX

^ Backus, Functional Programming, and Ruby
245235 [jesse.d.merr] Recently, John Backus, the father of Fortran, died. In 1977 he won the Turing
245293 [vjoel path.b] Ruby has its own way of doing things, not that there is anything wrong
245296 [jesse.d.merr] Yep, I was just seeing how close I could make Ruby code look like Backus'
245299 [twifkak comc] module Enumerable
+ 245302 [jesse.d.merr] That looks good, but is it right?
| 245306 [cdcarter gma] He is assuming you have the famed "Symbol#to_proc" method, you can
| 245313 [jesse.d.merr] Ah, very nice. Very nice.
+ 245457 [steven lumos] That's the most morphologically equivalent to Lisp Ruby ever!

^ adding anotehr each method to String
245240 [unbewusst.se] f it doesn't exist allready, i'd like to add another each method to
+ 245241 [cmshea gmail] On Mar 25, 2:20 am, unbewusst.s...@wortanschahung.com.invalid (Une
| 245246 [unbewusst.se] Ok, fine thanks a lot !
| + 245252 [hhausman gma] irb(main):001:0> "a string".split( "" )
| | 245254 [unbewusst.se] OK fine, then no need to extend String )))
| | 245256 [transfire gm] On Mar 25, 6:00 am, unbewusst.s...@wortanschahung.com.invalid (Une
| + 245253 [unbewusst.se] ms=String.methods
|   245449 [rick.denatal] This is because in Ruby a String doesn't act as a collection of
|   245451 [gavin refine] To be pedantic, it's not really a collection of lines. It's a
|   245528 [rick.denatal] I think that a better name for
+ 245245 [dangerwillro] Might not do what you expect.
| 245247 [unbewusst.se] then, u mean, it wouldn't work with NON-ASCII chars ?
| 245248 [dangerwillro] I mean you should check into the way Ruby works with multi-byte
| 245251 [unbewusst.se] because i'm a french guy, i knew that )))
+ 245277 [lists bertra] The split method was already proposed.
+ 245400 [james graypr] #!/usr/bin/env ruby -wKU
  245411 [unbewusst.se] thanks to all !

^ Pretty tables CLI scripts
245243 [toulax gmail] Does anyone know of any library or anything that can be used to
245268 [gregory.t.br] See the API documentation for Data::Table
245290 [toulax gmail] On Mar 25, 12:05 pm, "Gregory Brown" <gregory.t.br...@gmail.com>

^ [ANN] Rassmalog 3.2.0
245249 [ snk gna.org] Rassmalog is a static blog engine based on RSS 2.0, YAML,

^ Change object class
245255 [seth animeju] I'm still very new to Ruby and am having trouble with a small script
245258 [alex blackke] Use the Hpricot::Elem#to_html method.
245260 [seth animeju] Gah! Genius.  Thank you.

^ Read only a few bytes from file
245257 [toulax gmail] Is there any way to read only a determined amount of bytes from a
+ 245259 [alex blackke] If you want to read from the start of the file, File#read takes a number
+ 245266 [Rob AgileCon] Initial contents of http://conferences.oreillynet.com/rails/
  245291 [toulax gmail] On Mar 25, 9:59 am, Rob Biedenharn <R...@AgileConsultingLLC.com>
  245292 [TimHunter nc] Specify the number of bytes you want to the read method. Because of
  245294 [toulax gmail] I tested on a URL with around 200kb and it took the exact same time
  245321 [gwtmp01 mac.] Absolutely.

^ pointer to function
245261 [ekkehard.hor] Just starting to learn Ruby, I'd like to ask if somebody would be so
+ 245263 [pstickne gma] I have no idea what all that's supposed to do.
+ 245264 [B.Candler po] You have several options, depending on how literally you want to translate
+ 245271 [ekkehard.hor] With the great help from Paul and Brian I changed just one line of the run method
  245279 [B.Candler po] Yes, send allows you to pass either a string or a symbol. The symbol is
  245285 [ekkehard.hor] Thanks Brian,

^ splitting an array into sub_arrays ...need advice
245269 [josselin wan] I have an array similar to this example  (after sorting it on a[i][1]
245276 [o.renaud lap] Le dimanche 25 mars 2007 17:50, Josselin a ˝─rit
245287 [josselin wan] thanks a lot I'll have a look asap
245289 [o.renaud lap] Note that partition_by is a simple method with no dependencies. So, you can
245517 [josselin wan] thanks a lot I got it

^ RubyGems pre/post install
245270 [transfire gm] Does RubyGems support pre/post install scripting?
+ 245273 [ara.t.howard] nope.
| 245275 [halostatue g] And with, I think, very good reason. There are times when, in the
| + 245423 [transfire gm] Thanks Ara, Gregory and Austin. Guess, I'll just write gembundle as an
| + 245560 [drbrain segm] Actually, there are two.  I'm going to remove the second one sometime
+ 245274 [gregory.t.br] Not sure if 'support' is the right word. :)

^ ruby 1.8.6, zlib and x86_64 problems
245272 [zackzondlo y] Im trying to install ruby 1.8.6 on an x86_64 centos 4.2 system. i've

^ SQL Error
245286 [keith millim] All,
245513 [rick.denatal] This is a rails question rather than a pure ruby one.
245516 [shortcutter ] I'm not sure.  Maybe also a MySQL related group.  It appears that the DB

^ Question about using ruby and gtk to make an app
245288 [verbena1 gma] I have a question about using ruby and ruby-gtk2.  I have a simple gui
245409 [gallitzin gm] Chapter 2: GUI Toolkits for Ruby
245415 [nephish gmai] i am not sure what your question is, but i am using ruby and glade a lot.

^ Rethinking the Generic Ruby Oneliner...
245295 [john.carter ] So I was asking myself the question... What ruby run time options
245301 [pstickne gma] pathRegex -i.bak --gsub searchRegex
245335 [B.Candler po] If you call it x.rb then you can have ruby -rx ...
245955 [shortcutter ] Or create a shell script ("rubyfind") that does the command line

^ unbuffered output - how to
245305 [ahidalgo ver] I need to do unbuffered output to sdtdout.
245307 [TimHunter nc] $stdout.sync = true

^ how to tranlsate number to binary?
245314 [macro.peng g] input file, change every digital number into  4 bits len's binary
+ 245315 [hhausman gma] I don't know what a "4 bits len's binary number" is.
| 245316 [blowmage gma] I assume that by "4 bits len binary number" he means that he wants the
| 245319 [macro.peng g] I want my function to give output 100100000011 for input 903. Where
| + 245323 [alexg kuicr.] 903.to_s.split(//).map{|n| sprintf("%04d",n.to_i.to_s(2))}.join
| + 245324 [michaelst gm] Maybe this one is goon for you?
| + 245325 [hhausman gma] I don't know about efficent, but you could start with something like
| + 245326 [vjoel path.b] "903".split("").map{|s| "%04b" % s.to_i}.join
| | 245330 [gavin refine] irb(main):002:0> 903.to_s.split('').map{|n| "%04b" % n }.to_s
| | + 245332 [macro.peng g] Woo.., that's really what's I want.
| | + 245333 [vjoel path.b] Had no idea that would work, but now it seems obvious.... Apparently
| + 245327 [phurley gmai] irb(main):001:0> "903".split(//).map { |c| "%04b" % c }
| + 245519 [rick.denatal] Just for the record, that is commonly called BCD (for Binary Coded Decimal).
+ 245337 [why ruby-lan] => "100100000011"
  245358 [gdprasad gma] => "000110010011"

^ find_by_sql and date_format
245317 [felix deasil] I'm beginning my first project in Ruby (and Rails) and running into
245403 [aledonne.lis] Felix,

^ importing GEM libraries .... newby questions
245318 [cugf_0956 ya] I have installed ruby on my laptop using rpm and I installed a whole
+ 245365 [TimHunter nc] You need to have RubyGems loaded before you require any libraries that
| 245412 [bsherard rea] I have the exact problem cugf described right down to using the same gem
| + 245421 [B.Candler po] There is no "compile time" in Ruby.
| + 245427 [TimHunter nc] Libraries installed by RubyGems must be loaded by RubyGems. RubyGems
|   245429 [bsherard rea] Excellent Tim! I owe you my soul or something for all that help. Thanks!
+ 245559 [drbrain segm] You must require rubygems first.  You can set RUBYOPT=-rubygems in

^ [ANN] R-Bus, a native Ruby implementation of D-Bus
245322 [kristoffer.l] just put the source code up at the project page at Rubyforge. Finallyfound the time to clean it up a bit and polish the docs a little.
245481 [kristoffer.l] Thanks!

^ drb recycled object problem
245328 [rajsahae gma] I did a search on google and found the following page.
+ 245418 [rajsahae gma] As an addendum, I ran this guys test code on my comp and I didn't get
+ 245462 [rajsahae gma] bump?
  245463 [ara.t.howard] you have a handle on an object which has been garbage collected on the server.
  245470 [rajsahae gma] Ahh, that's what recycled object means then.  So how do I prevent the
  + 245473 [rajsahae gma] Sorry for the double post.  I should have done a little reading on the
  | 245479 [ara.t.howard] yeah.  terrible idea.
  | 245495 [rajsahae gma] Snipping code would be tricky.  It's a fairly large program.  None of
  | + 245512 [ara.t.howard] but the error is telling you that this is exactly what's happening?
  | + 245547 [B.Candler po] $foo = server.game
  |   245568 [ara.t.howard] drb itself holds a referent to this, the 'front', object - so i don't think
  |   245587 [rajsahae gma] Thanks guys.  I'll keep these tips in mind while I keep digging through
  + 245497 [angus quovad] Doesn't this message in the thread you mentioned help you?

^ unsubscribe
245329 [ravinder.198] unsubscribe

^ visual ruby project
245331 [botp delmont] is there someone doing like this http://cs.joensuu.fi/jeliot/description.php in ruby?
245338 [sonoflilit g] Hmmm, the visualization itself seems like it will be very messy on
245341 [botp delmont] # The Ruby part is easy since writing profilers is so trivial in Ruby.
245345 [sonoflilit g] A generic language visualiser won't be. It just won't, IMHO, since

^ [ANN] open4-0.9.2
245334 [ara.t.howard] URIS

^ [ANN] scRUBYt! - Hpricot and WWW::Mechanize on even more steroids, 0.2.6 released
245342 [peter rubyra] scRUBYt! version 0.2.6 has been released with some great new features,
245730 [glenn.gillen] Peter,

^ gets gets
245343 [dangerwillro] I'm a little surprised at this.
245383 [james graypr] It's not surprising at all.  First, let's insert the parentheses so
245390 [dangerwillro] Excellent explanation!

^ UNSUBSCRIBE .. me please
245344 [mjmcclain gm] Please remove me from the mailing list.  I want to put a different email
245727 [faisal faisa] -faisal

^ Sequel 0.0.9 - Concise ORM for Ruby
245347 [ciconia gmai] Sequel is a new ORM tool for Ruby. Sequel provides the following

^ Rubyforge login failure?
245348 [leslieviljoe] I can't retrieve the rubyforge login page - is it just me?
245350 [farrel.lifso] I had issues a month or two ago with Rubyforge due to Telkom's
+ 245351 [leslieviljoe] I have used one of these and the page loads much faster, but when I
| 245353 [farrel.lifso] That's the same problem I had (being sent back to the login page).
| 245357 [leslieviljoe] Thanks, I'll be very grateful. Kinda sad that all of South Africa
+ 245352 [leslieviljoe] Ah, I see the proxy does not work on the SSL port 443. Could be the problem.

^ ajax-update with link_to_remote(image_tag), how to?
245349 [gohannimbus ] I have a image.
245377 [senthilkumar] you can call a javascript function in :complete option of your

^ sorting an array basedon two attributes of objects
245359 [senthilkumar] I want to sort the objects of array based on two attributes.I want
+ 245360 [mental rydia] Is this what you had in mind?
+ 245361 [augiedb gmai] results = person.sort_by { |p| [p.salary, p.name] }
+ 245363 [florgro gmai] Try this: employees.sort_by { |employee| [employee.salary,

^ [ANN] Execute as Ruby Code Service for OS X
245362 [florgro gmai] Moin.
+ 245368 [benjohn fysh] That sounds great though, I'll be grabbing it tonight. Thanks!
+ 245562 [benjohn fysh] I'm sure I'm doing something wrong, but this isn't working for me.
| 245647 [dave.baldwin] I found a similar thing.  It doesn't work in Mail (just beeps), but
+ 245698 [matt tidbits] Just FYI, see also Bellhop, which allows you to use Ruby code *as* a

^ Re: More Summer of Code goodness (please forward)
245364 [ko1 atdot.ne] Great! :)
245426 [chneukirchen] Yay, I've been thinking that for years and that includes

^ Ruby/MySQL SELECT results
245366 [info paulwil] I am playing with Ruby/MySQL, I have everything installed ok. I can
+ 245370 [cmdjackryan ] hasid.each do |row|
| 245431 [info paulwil] I'm having trouble getting my id out of the array to use as a variable
| 245436 [cmdjackryan ] Try the Mysql::Result#fetch_field_direct method. This should do what you
+ 245566 [kbloom gmail] hasid,=my.query("SELECT id FROM table WHERE title = 'Here is a

^ sorting an array based on two attributes of objects
245371 [senthilkumar] Thanks for some of your replies for the lst post i need small
+ 245372 [alex blackke] sorted_employees = employees.sort_by { |e| [ -e.salary, e.name ] }
| + 245375 [coder68 yaho] Doh!!!!  Ofcourse!  Ok.. more coffee for me..
| + 245522 [rick.denatal] Someone, in another recent thread, came up with the idea of a reverse
|   245525 [alex blackke] That's lovely.  My brain wandered off down the String#invert route, and
+ 245374 [coder68 yaho] I came up with this which is sub par as I test for a condition twice so
  245382 [Rob AgileCon] Just to add a bit to this:  consider using .nonzero? for chained

^ Re: Execute as Ruby Code Service for OS X
245373 [florgro gmai] I just need a *huge* user base! ;)
245397 [mguterl gmai] Add another user to that list.  Very nice work Florian.  This will

^ Ruby DBI
245376 [starke1120 h] I am trying to create a reporting system via rails and iSeries DB2.  I
+ 245407 [d_rems yahoo] I see no reason, why you couldn't access your data with DBI inside rails
+ 245408 [B.Candler po] Yes.
  245417 [starke1120 h] I thought so to, but I guess Im not setting up rails correctly to use
  245422 [B.Candler po] Ah, I see what you mean. database.yml is for ActiveRecord. Those values are

^ syntax error, unexpected kOR
245378 [emanueledf g] I'm newbie with ruby and to be onest I'm quite surprised about a
+ 245380 [florgro gmai] Currently, it is the same as (true; or false).
+ 245381 [jan.svitok g] The problem is that interpreter needs to know somehow that the line
  245387 [emanueledf g] CUT

^ Re: capturing standard out?
245389 [james graypr] #!/usr/bin/env ruby -w

^ Alternative to switch statements
245394 [aidy.rutter ] I am trying to write a 'keyword-driven test automation framework' in
245396 [shortcutter ] MAP_FIELD = Hash.new {|h,k| k}.update(

^ local network
245410 [longinos10 h] can ruby be used to make an inventory and administration program,to run
245420 [B.Candler po] This is rather like asking "can I write programs in Ruby?" The answer is
threads.html
top