56262-56580

56051-56542 subjects 56490-57539

^ Kernel.method() question
56262 [nemo hellotr] I was just wondering, why doesn't Kernel.method() call method_missing() when
56264 [decoux moulo] Well, probably you make a confusion
56285 [nemo hellotr] D'oh!

^ Inheriting from FalseClass fails
56269 [zickzack mei] Apologies if that is covered somewhere. I searched the FAQ and
56456 [flori nixe.p] It doesn't work because "new" is explicitly undefined in object.c.

^ Symbol usage help
56273 [ahoward fsl.] rubyists-
+ 56275 [vjoel PATH.B] Instead of
| 56282 [ahoward fsl.] hmmm.  this does work, but the string eval'd is actually dynamically generated
| + 56283 [dblack candl] Class === obj.type
| | 56288 [ahoward fsl.] it seems to be a valid test for me?
| | 56291 [dblack candl] Well, admittedly Class === obj.type is only true if obj is a Ruby
| + 56316 [bulatz integ] hash['a'] = 12
+ 56279 [lyle users.s] What about this?
+ 56280 [ptkwt shell1] irb(main):013:0> %w( a b ).each do |s|

^ Does Ruby support Asyncronous Sockets on Win32
56274 [jcb iteris.c] The Programming Ruby book lists
56324 [dali insula.] irb(main):001:0> require 'fcntl'

^ difference between "and" and "&&"
56276 [Mark.Volkman] This message is in MIME format. Since your mail reader does not understand
56278 [dblack candl] (haveBoth = a) and b
56387 [botp delmont] I am surprise and I'm new to Ruby :-)
+ 56410 [gsinclair so] Not so long ago, Matz stated that the difference in precedence was because
| + 56418 [botp delmont] but the precedence of the assignment operator has always been low (my
| | 56419 [gsinclair so] No, but other languages don't typically have 'and' and '&&'.  So yes, '=' has a
| | 56438 [austin halos] param = param || default_value and handle(param)
| | 56512 [botp delmont] Very cleary explained, sir Gavin.
| + 56427 [dblack candl] Indeed.  There does seems to be an unstated (at least in any grammar
+ 56425 [rando babbli] Remember, if in doubt, you can always add more parenthesis; not only

^ Re: difference between 'and' and '&&'
56277 [wjl icecaver] irb(main):001:0> a = 'test'

^ Requiring zlib & xmlparser seg faults
56286 [tarasis btop] I was just testing out Andy's release of 1.7.3-7 (for windows) and came

^ Recruiter asks about Ruby...
56289 [hal9000 hype] <sigh>
+ 56293 [gsinclair so] Ruby is similar enough to Perl to make it useful in the same domains, but
| 56451 [patrick-may ] Java actually has a more tight relationship with xml than this.  The
+ 56303 [lyle users.s] Obviously point out that DBAs and Webmasters can do anything in Ruby
+ 56355 [thucdat hotm] This is not real, especially the question came from a Ruby evangalist,
| + 56357 [mikkelfj-ant] Yes - shame on you Hal, please stop this poorly camouflaged Ruby propaganda
| + 56365 [hal9000 hype] Thanks for the kind words, but it's quite real...
|   56445 [lyle users.s] If only you had digitally signed the original post we could be sure
+ 56372 [dossy panopt] The poor shmucks who are downstream from the initial programmers.  You

^ Learning Ruby
56296 [dcarrera mat] 1)  What is a good resource for learning Ruby in general?  Is there a Ruby
+ 56299 [dblack candl] Welcome :-)
+ 56304 [lyle users.s] "Programming Ruby", by Dave Thomas and Andy Hunt.
+ 56308 [ptkwt shell1] Welcome... I used to do Perl a few years back, then I found Ruby ;-)
| + 56310 [mwilson13 co] I am also new to Ruby (and to programming in general).  I have found
| + 56344 [dcarrera mat] prototype?
+ 56361 [gsinclair so] BEGIN {

^ Defining <=>
56297 [cyclists nc.] I need to define <=> in a class. What is the appropriate thing to do when
+ 56302 [matz ruby-la] Return nil.
| 56309 [gsinclair so] If you return nil, then future operations like < and sort will raise the
| 56312 [matz ruby-la] This is a formal way in 1.7.  I should modify 1.6.8 as well to handle
| 56313 [hal9000 hype] TypeError
+ 56305 [lyle users.s] If you can somehow coerce the other argument into the receiver's class,
  56499 [cyclists nc.] Thanks to everybody for their help! Actually, I had mistakenly asked two
  56500 [dblack candl] Have you looked into using the Comparable module?  I'm not sure

^ untainted, unfrozen, honest-to-god session data!
56300 [nemo hellotr] I'm trying to find a replacement for CGI::Session::FileStore which works
56311 [ahoward fsl.] i put CGI::Session::Pstore on the RAA
56317 [nemo hellotr] Well, I tried something just like that...
56318 [ahoward fsl.] don't know about that...
56335 [nemo hellotr] Well, after closer inspection, I think I have narrowed down the freezing
+ 56336 [nemo hellotr] I'd prefer a real solution (you know, CGI::Session::MemoryLikeFileStore),
| 56337 [decoux moulo] When ruby marshal a symbol it store the _string_, when it reload it it
+ 56364 [matz ruby-la] String hash keys are copied and frozen.  This is intended behavior.
  56452 [patrick-may ] The session data is not external, but the _key_ is.  I don't know how
  + 56464 [matz ruby-la] Ah, I meant "external" as data read from the file.  Session data is
  | 56530 [patrick-may ] Double ah.  One of the things Tom and I discovered about a "web"
  + 56486 [nemo hellotr] I don't understand.  When you say "key", do you mean the session id (which

^ Re: untainted, unfrozen, honest-to-god session data! (fwd)
56314 [ahoward fsl.] apologies if this goes out twice... our news server is misbehaving.

^ RUBYLIB="" causes load problems in 1.7.3
56319 [vjoel PATH.B] Has this been fixed in more recent releases? I have 2002-10-30.
56320 [matz ruby-la] First, check where ftools for 1.7 is installed.
56346 [vjoel PATH.B] /usr/local/lib/ruby/1.6/ftools.rb
+ 56404 [eban os.rim.] ===================================================================
+ 56407 [matz ruby-la] It was a bug.

^ Array#shift(n)?
56321 [gsinclair so] Pretty obvious question, really.
+ 56322 [stefan.schol] Yeah, very obvious ...
+ 56408 [gsinclair so] Hmmm.... no-one's taken the ball...

^ eRuby & MySQL
56325 [jostein.bern] Is using eRuby with MySQL, for making PHP-like solutions, documented in any
56327 [bruce codedb] Jostein,
56329 [jostein.bern] Thanks for the pointers and links, Amrita was new for me. I have all the 6
56330 [markusjais y] I have written some documentation on Ruby and Mysql.
56331 [jostein.bern] This looks great, hope you get some freetime to expand on this, and write

^ Problem installing testunit 0.1.4 on OSX
56328 [rshaw1961 ya] I am trying to install testunit-0.1.4 on OSX but I get the following
56343 [decoux moulo] Verify the value of stacksize with `ulimit -a', and change it if it's too
+ 56353 [rshaw1961 ya] Unfortunately this command was not found.
| + 56398 [hwyss ywesee] If you're running tcsh, use
| | 56402 [rshaw1961 ya] Thanks very much - this worked
| + 56479 [canyonrat ma] That's because in tcsh it's 'limit stacksize'. I'd suggest you use the
+ 56478 [canyonrat ma] On OS X that's more likely 'limit stacksize'. :-)

^ Newbie question: How are strings stored in Ruby?
56339 [christopher.] Just wondering
56342 [ndrsbngtssn ] They use 8 bit characters. But it can handle some Japanese kanji charset

^ redirect in webrick with eruby
56341 [mhale rolemo] I am trying to do a redirect inside an erb page running under webrick.
56487 [gotoyuzo not] gotoyuzo

^ tk = 100% CPU
56347 [khindenburg ] running tkhello.rb eats up 100% of the CPU.  Wondering if it the Tcl/Tk
+ 56377 [aleksei.guze] Congratulations! Your program uses all the available resources to produce
+ 56395 [khindenburg ] Bummer, this sux...anyway, here is a strace will tkhello.rb is

^ Questions about embedding Ruby in C
56348 [tokikenshi a] 1. How can I make Ruby not calling exit() when finished with a script?
+ 56415 [decoux moulo] Just don't call ruby_run()
| 56459 [tokikenshi a] 1. But if I don't call ruby_run(), how does it interpret?
| 56463 [decoux moulo] Well, this is very quickly written
+ 56424 [tokikenshi a] Or at least, is there any documentation aviable on the subject?
  56462 [glenn gmlewi] I looked through a bunch of examples in the RAA, and here
  56518 [tokikenshi a] I don't really know if this was what I was looking for, but thanks

^ Ruby/Fltk/SQLite GPL workbench testers required win32/linux
56350 [domingo dad-] I'm working with ruby/fltk/sqlite as a workbench to write applications
+ 56498 [domingo dad-] Sorry for the people that downloaded the linux version, there was a
+ 56580 [patrick-may ] I gave it a run through.  It looks good, though I don't read spanish

^ Need Ruby binding to open source middleware
56351 [tgagne wide-] I've been asked by someone if there's a Ruby binding to my
+ 56356 [mikkelfj-ant] It's fairly easy to write Ruby extensions, and since the API is pretty
+ 56358 [alan digikat] Look at SWIG, given that you prbably have a C header to interface to
+ 56359 [ptkwt shell1] Don't know anything about how your app is written or organized, but if

^ Sydney Ruby users' group meeting tonight!
56360 [harryo zip.c] charset="us-ascii"
56362 [martin massi] The code Harry attached is a port of some of the sample C code provided at
56368 [mikkelfj-ant] There is of course the "many robots compete to collect thingies" in this

^ O() notation for Arrays operations and why is there no List class
56370 [jcb iteris.c] Is there any documentation of the O() notation for Array operations.
56371 [matz ruby-la] The source. ;-)  It answers everything (including bugs), except for
+ 56409 [matz ruby-la] Oops, I have to mention "on 1.7".
+ 56547 [timsuth ihug] Additionally, since the currently Ruby implementation is not properly

^ [FAQ] Interpreted vs compiled [FAQ] defining methods anywhere
56376 [dcarrera mat] Gavin suggested I compile the answers to my questions into FAQs.  Here
+ 56378 [spoon-dated-] This seems a bit 'tacked on' and not really relevant to the rest of the
| 56379 [jim freeze.o] Well, it shows a meethod being called before it is defined,
| + 56380 [dcarrera mat] It was just a though.  I guess it is kind of extraneous.  Just leave that
| + 56382 [mwilson13 co] Please explain how methods in an explicit class are different than
|   56385 [Dave Pragmat] bert
|   56433 [jim freeze.o] class Fred
|   56435 [decoux moulo] Well, at compile ruby has not found the local variable `fred' this is the
|   56443 [jim freeze.o] So,
|   56448 [decoux moulo] You have partially found :-)
+ 56381 [Dave Pragmat] I hope you don't mind, but I've copied these into faqtotum.
  56406 [gsinclair so] That's exactly what they're there for, Dave.  Posts with subject [FAQ] are
  56432 [Dave Pragmat] 'tis done.

^ book content duplication
56386 [jhonold bigf] i have owned the pickaxe book for a while, and finally had the good sense to
56393 [ruby-talk wh] I use both the Pickaxe and Nutshell in my daily life.  Nutshell is at

^ Ruby is too slow
56388 [jcb iteris.c] I have been writing some image processing algorithms that run on incoming
+ 56389 [bulatz integ] it is because ruby interpreted language, while java and c++ are
| 56414 [peter semant] Java compiles to byte code that is then interpreted. Unless you have a
| 56417 [bulatz integ] ... or compiled using JIT. based on timings in original post, i think,
| 56474 [jcb iteris.c] The Jave code was compiled using Sun JDK 1.4 for Win32, which uses
| + 56475 [nat.pryce b1] Certainly Ruby is not designed for this particular application, but also
| | 56477 [dcarrera mat] How slow really *is* Ruby?
| | + 56497 [greg puyo.cj] Google tells me: http://www.bagley.org/~doug/shootout/
| | + 56517 [bulatz integ] in different tests, i got 1.5 to 4 times worse than Perl
| + 56491 [pbrannan atd] Change that to ++imageIt and you may get a speed improvement on some
| + 56516 [bulatz integ] ruby is dynamic interpreted language, so for even trivial "x[y]"
+ 56390 [aleksei.guze] Java code seems being JITted.
| 56391 [bulatz integ] give us url and example, pliz :)
| 56396 [aleksei.guze] What URL and what example.
| 56397 [bulatz integ] i think you say about smth like Inline::C module
| 56403 [aleksei.guze] no inline::C.
| 56405 [bulatz integ] interesting... what sort of programs you write?
| 56412 [aleksei.guze] Processing graphics in publishing. Large amounts of vector and raster
+ 56420 [ndrsbngtssn ] Try to run your code with the ruby profiler (using "ruby -rprofile
| 56421 [bulatz integ] it is the joke of the week! :)  he runs simple loop 640*480*2 times
| 56422 [ndrsbngtssn ] So? I still figure that a quick measurement of the code in question
| 56423 [christopher.] Agreed,
+ 56434 [ysantoso jen] Find out the difference and write it in C, preferably using
+ 56436 [tom linuxbri] Simple loop and 3 pointer dereferences.
| 56488 [jcb iteris.c] hmmm.
| + 56504 [gsinclair so] for out-of-bounds indexing; ability to index from the end; ability to take a
| + 56523 [isak hyperge] I've read that using the Array's at function is faster than operator []
|   56525 [bulatz integ] in this situation it's like giving a banana to man who don't eat for
|   56529 [isak hyperge] I guess you're right, but I couldn't help trying: Changing the inner
|   56531 [bulatz integ] in any other situation difference will be even less than 10% :)
+ 56453 [tgagne wide-] Do I have the Smalltalk version right?
  + 56489 [jcb iteris.c] I don't know smalltalk, but it looks close enough.
  | 56519 [tgagne wide-] Smalltalk numbers its indexes from 1 instead of 0.  Since
  + 56528 [batsman.geo ] The index of the first element of an array in Smalltalk is 1.
    56533 [1038410672.4] As a reference, it takes 128ms on a 1.6G P4 using GNU Smalltalk.

^ UDP Socket Problem under Windows
56399 [wnews iam3.d] as I'd read out of previous Messages other people already had the same
+ 56400 [wnews iam3.d] responding to my own Message, uhh...
+ 56465 [billk cts.co] The following code is working reliably for me in 1.6.6 mswin32,
  56483 [wnews iam3.d] Yes that could be a Way. Anyhow under Linux it worked fine :)

^ RubyAddPath doesn't work?
56416 [tim bates.id] RubyAddPath /path/to/my/lib/dir
56461 [jim freeze.o] I posted this same question to mod-ruby a while back
56513 [tim bates.id] I upgraded to mod_ruby 1.0.1 and it now works.

^ attr_accessor?
56428 [christopher.] I think I now understand attr_reader & attr_writer, but how does attr_accessor
+ 56429 [mark.firesto] att_accessor lets you do attr_reader and attr_writer at the same time.
+ 56430 [decoux moulo] Well
  56431 [christopher.] Very cool!  Thanks, all set!   :-)

^ Multiple constructors?
56440 [christopher.] I've seen how Ruby uses an initialize() method as a constructor.
+ 56441 [austin halos] Actually, so far as I can tell, no method in Ruby can be overloaded.
+ 56447 [pbrannan atd] Ruby does not have overloading.  As an alternative, you can do one of
| + 56449 [dblack candl] def self.my_new
| | 56470 [pbrannan atd] 1) I create two objects
| | 56480 [dblack candl] I think the privacy is gate-kept separately by each object's singleton
| | 56485 [pbrannan atd] Oh, good point.
| | 56496 [dblack candl] It does seem more streamlined.
| + 56471 [pbrannan atd] class Foo
+ 56450 [nat.pryce b1] In Ruby there are actually *two* methods that act as a constructor, the
+ 56515 [bulatz integ] def initialize (*args)

^ [FAQ] Multiple constructors?
56442 [gsinclair so] For better or worse, no method can be overloaded, unless you ask Guy for his
56457 [nat.pryce b1] I would avoid this because it is not branching on type, but instead
+ 56460 [gsinclair so] That's fair enough - like I say, none of these approaches is a perfect fit -
+ 56468 [austin halos] Mmmm. No. That unnecessarily exposes producer implementation details
+ 56524 [martindemell] This won't let me do something like
  56527 [nat.pryce b1] That's true but how often does one put arbitrary objects into a
  56546 [martindemell] Well, in general, I think that if you have to select on type at some

^ perl with HTML::Mason or Ruby with Eruby ??
56446 [markusjais y] I told a friend how cool Ruby is and he imediatelly liked it.
+ 56466 [ahoward fsl.] Amrita is very cool, and simple to use.
+ 56501 [greg puyo.cj] Years and years ago, I used htmlpp, a Perl script to 'preprocess' HTML.
+ 56522 [dido imperiu] This Freshmeat article has some ideas I actually used to separate HTML

^ Multiple constructors, thanks!
56454 [christopher.] Thanks very much to all for the great info on this topic!

^ The ultimate Application
56469 [thucdat hotm] <html><div style='background-color:'><DIV>I have used Ruby and some others (Perl, Python, etc.) for some useful things. Those who know these languages, don't need to&nbsp;say why. But when it comes to the ultimate application like a language itself (Ruby, Perl, Python, etc.), nothing can beat the awesome C. To my knowledge, most advanced chess programs (Deep Blue, Fritz, Junior, Shredder, etc.) are written in either C or C++, never Prolog or Lisp. Mastering C/C++ is still required when it comes to performance. If a chess program in Ruby can beat all those chess&nbsp;programs in C/C++, no naive propaganda for Ruby needs to be made. So far I haven't spotted any Job that requires Ruby, but the trio C++/Java/C#;&nbsp;most companies and managers&nbsp;are very well informed.</DIV></div><br clear=all><hr>STOP MORE SPAM with <a href="http://g.msn.com/8HMJEN/2015">the new MSN 8</a> and get 2 months FREE*</html>
+ 56472 [mwilson13 co] charset=ISO-8859-1;
| 56484 [elderburn mi] Well, the first one ("this is not real") I ascribed maybe to lack of
+ 56473 [probertm nor] Maybe the solution here is to start a Ruby-In-Hardware project,
| + 56509 [ptkwt shell1] It would be pretty hard to implememnt Ruby in Hardware given it's dynamic
| | 56534 [probertm nor] I would think that you could take the core interpreter and the built-in
| + 56511 [mikkelfj-ant] FORTH is too easy, here's TCL
|   56535 [probertm nor] Very cool!
+ 56476 [ptkwt shell1] Obiously a troll, but I couldn't resist...
| + 56481 [jim freeze.o] Wouldn't a hardwired ASIC be much faster than assembly?
| | 56502 [ptkwt shell1] That's pretty much what IBM did with Deep Blue.
| + 56495 [mikkelfj-ant] Actually, a good macroassembler can be pretty productive. It's really too
+ 56482 [lyle users.s] Yes, C is "awesome". Be sure to use that word a lot at your next job
threads.html
top