205118-407703 subjects 205465-208101
Fwd: Please Forward: Ruby Quiz Submission (88)
205260 [james@gr yp ] ...
Re: Please Forward: Ruby Quiz Submission
205269 [james@gr yp ] There's certainly nothing wrong with your solution and we thank you
Ruby hangs when executing a another program
205273 [crasch@op nk] If I run the following command on the command line, it executes
+ 205330 [nobu@ru y- a] %x and `` wait until the command exits and read the output from
+ 205333 [wrecklass1@g] prc = fork
mysterious conf in irb
205276 [bitdoger2@ya] a huge amount of information prints out on the screen (at least on the
+ 205299 [drbrain@se m] Its irb's configuration.
+ 205313 [wrecklass1@g] You've found the irb configuration class. You can configure a number
205294 [leslieviljoe] Can anyone recommend good forum software written in Ruby?
205296 [csshsh@gm il] Is there any way to decode a UCS-2 string with ruby?
+ 205324 [dido.sevilla] Decode to what? You're probably looking for iconv. There's a Ruby
+ 205347 [dave.burt@gm] => true
205375 [pbattley@gm ] Iconv.iconv("UTF-8", "UCS-2BE", "\0a\0b")
205486 [tbray@te tu ] In fact, if you want to be pedantic (and when it comes to character
Ruby2CExtension (Was: converting some autogenerated ruby code to C)
205302 [drbrain@se m] I tried it, it doesn't work.
205306 [dbatml@gm .d] Thanks for the report.
205316 [drbrain@se m] $ gdb `which ruby184`
205560 [dbatml@gm .d] OK, I have investigated a bit more and it seems that the libs, that I
check if 2 objects are equal
205319 [junkone@ro e] I havea a class with this structure. how do i check if 2 objects
205332 [wrecklass1@g] If you want to define equivalence for your classes, you really need to
205412 [sastph@sa .c] def <=>(other)
Telnet Server in Ruby
205321 [devlists-rub] Does anyone know of a Telnet Server written purely in Ruby? It doesn't
+ 205335 [james@gr yp ] It's super easy to get something going with GServer, but my new
| + 205404 [garbagecat10] I'd really like to see a telnet server capability built into and shipped
| | + 205428 [james@gr yp ] You can use whatever you like. Bill's stuff is much farther along
| | + 205598 [billk@ct .c ] No problem!
| | 205602 [garbagecat10] Thanks Bill. I took a look through your code and it's neat,
| | 205909 [billk@ct .c ] It accepts clients, and partitions the client's window into three regions.
| + 205445 [devlists-rub] I will. It sounds like EventMachine maybe the best way to proceed.
| 205452 [garbagecat10] If you go for it and need support, send me email (here or private).
+ 205349 [billk@ct .c ] For what it's worth... I have some ANSI/VT100 telnet libraries that support
205454 [devlists-rub] Fantastic. This is beyond my original intent, but since this is
[ANN] New Ruby Culture T-Shirts!
205350 [chiology@gm ] Ruby culture t-shirts are available for purchase right now!
+ 205351 [makenai@gm i] Hmm..
+ 205352 [ben@be at in] ...
| + 205353 [herbstwc@gm ] They look really cool, lol. Nice one.
| + 205356 [chiology@gm ] Fixed the elusive [ issue.
| + 205365 [tdjordan@gm ] How about the Japanese Crane?
| | + 205373 [asbradbury@t] On that note, an Origami crane (to me) looks distinctly Japanese, and might
| | | + 205441 [james@gr yp ] I snapped a shot with my digital camera's "Digital Macro" mode (large
| | | | 205449 [nobu@ru y- a] FYI, there are some family crests featuring origami cranes.
| | | + 205467 [ mfp@ac .o g] A Shinkansen train, with the Fujisan in the background.
| | | + 205469 [pixelnate@gm] Why couldn't the mascot be a (ruby) red panda? White bits stay white,
| | | | + 205476 [M.B.Smillie@] One reason is because pandas are from Japan much like penguins are
| | | | | 205479 [pixelnate@gm] Duh, pandas are from China. Sorry, just a little brain-dead today. Ok,
| | | | + 205477 [chiology@gm ] Nate, the problem is that Pandas aren't natively found in Japan, and,
| | | | | 205480 [pixelnate@gm] Yeah, my bad. But have you heard of a Tanuki? It is a "Raccoon Dog"
| | | | | + 205539 [perrin@ap th] I mentioned raccoon dogs in the same message in which I mentiond the
| | | | | | + 205550 [chiology@gm ] I'll work on that as well. I'm fond of the Tanuki as well. (Has anyone
| | | | | | + 205552 [pixelnate@gm] Me too. According to wikipedia "Its testicles are notably large, which
| | | | | | + 205668 [nobu@ru y- a] Sometimes Tanuki is considered green rather than red, whereas
| | | | | | 205688 [chiology@gm ] ...
| | | | | + 205690 [fprimus@ux .] Tom Robbins would probably like that.
| | | | | 205800 [chiology@gm ] == UPDATE
| | | | | 205826 [rubyvic@gm i] Hey, great shirts, Matt! There are some awesome ideas in there :-).
| | | | | 205971 [phurley@gm i] I know the t-shirt I want is something Ruby-ish with a Thank You Matz
| | | | | 206006 [chiology@gm ] Hope you like...
| | | | | 206044 [schapht@gm i] I don't know about anyone else, but I was hoping for some over-sized
| | | | | 206072 [chiology@gm ] I'll work on it. ;)
| | | | + 205481 [asbradbury@t] While we're talking about mascots, I think I may as well reference a thread on
| | | + 205564 [tdjordan@gm ] Just browsing for cranes, I came across this graphic
| | + 205374 [perrin@ap th] Nah, I think a raccoon dog would be more appropriate.
| | 205421 [schapht@gm i] I'd wear a shirt with a big daikon on it. I love daikon :)
| | 205422 [chiology@gm ] Unfortunately, I'm pretty limited by the graphics that are already
| + 205368 [paul@ic no l] I really think you need to drop it. Do you have any idea how
| + 205384 [hramrach@ce ] I cannot remember any animal. But what about a sakura tree? ;-)
| 205585 [Eric.Armstro] Mt. Fuji is the archetypal image of Japan.
+ 205355 [james.britt@] Consider adding the extra dollar or so and using it to support a Ruby
| 205358 [chiology@gm ] Considered and done.
+ 205362 [benjohn@fy h] I'm intregued - have you actually made all of these, or are the images
+ 205387 [tirado.carlo] Also they state: "A third of the profits will be donated to RubyCentral"
+ 205415 [chiology@gm ] In regards to the panda: as you can imagine, it was never my intent to
| + 205429 [paul@ic no l] Of course - nobody means to cause offence, never does - I just
| | 205538 [perrin@ap th] I like this one: "Just like a panda, Ruby is never a bear (to use)."
| + 205586 [Eric.Armstro] That rocks. Says it all.
| 205594 [luke@ma st p] It's Big in Japan". It feels like an inside joke, even though I'm
| 205599 [perrin@ap th] It's probably because of the song, which is funny in and of itself.
| 205606 [chiology@gm ] Ruby... It's Big In Japan
| 205607 [luke@ma st p] Sweet! Purchased, thanks.
+ 205613 [work@as le m] This one...
Detecting similar strings
205357 [dylan@dy an ] Is there a way to take two strings, and decide if they are "similar."
+ 205359 [farrel.lifso] Here's a Perl module that does something similar. You might try
| 205360 [farrel.lifso] Farrel
| 205436 [w3gat@nw ag ] Here is an implementation of levenstein distance. It seems to me that
+ 205361 [alexandru@gl] If by any chance you are using MySQL you could use the soundex function
| 205390 [helge.elvik@] The levenshtein algorithm basically gives you the "edit-distance"
+ 205437 [gene.tani@gm] Interesting your name is almost "Markov" ;-}
205440 [gene.tani@gm] ...
Mini quiz (Was: Detecting similar strings)
205367 [benjohn@fy h] You know, there are lots of implementations there, but the Ruby one
205376 [Nuralanur@ao] ...
205377 [benjohn@fy h] It's missing from wikipedia though.
205378 [Nuralanur@ao] ...
+ 205424 [benjohn@fy h] def lev(s1, s2)
+ 205631 [hal9000@hy e] Ping me in a week and I will...
205647 [andrewskegg@] A quick search on Google reveals a levenshtein ruby function has already been created.
205716 [Nuralanur@ao] ...
Default shell for Kernel::system() ?
205370 [ronaldf@em .] Ist it possible to kind of define a default shell which will be used
+ 205414 [logancapaldo] I'm pretty sure the "default" shell for system is /bin/sh on a *nix.
+ 205433 [nobu@ru y- a] /bin/sh is hardcoded, like as make, cron and so on.
For performance, write it in C - Part 3, Source code now available
205379 [peter@se an ] The source code is available from
+ 205382 [perrin@ap th] Great! Thanks.
+ 205471 [igouy@ya oo ] There are some details missing from the webpages
| 205474 [peter@se an ] [peterhickman]$ gcc -v
| + 205478 [headius@he d] ...
| | + 205487 [headius@he d] ...
| | | + 205492 [headius@he d] ...
| | | | 205499 [headius@he d] ...
| | | | 205701 [peter@se an ] The output of my original C and Java versions are identical. If you
| | | + 205498 [enebo@ac .o ] IO can be noisy. I say avoid it for any benchmarking since it can
| | | 205508 [igouy@ya oo ] As you're having so much fun, let me suggest you try converting the
| | + 205698 [peter@se an ] That was simple because I couldn't define the array when I declared it
| | + 205700 [ola.bini@ki ] The point Charles made with saying "but it sets off any Java devs
| | | 205706 [peter@se an ] The question is the code itself, the names can always be renamed. Does
| | | 205707 [headius@he d] ...
| | + 205831 [igouy@ya oo ] 1) I made some changes to the jen.pl script you used to generate the
| | 205836 [headius@he d] ...
| | 205837 [headius@he d] ...
| + 205482 [igouy@ya oo ] I recall someone stating "benchmarking without analysis is bogus".
| 205489 [headius@he d] ...
+ 205483 [csaba.henk@g] Hmm, it would look much better for me if you had included Kristof
| 205502 [alex@bl ck e] While I certainly appreciate the efforts that are going into this, I
| 205511 [headius@he d] ...
| + 205518 [ola.bini@ki ] ... Which is extremely funny, since Common Lisp have had wicked fast
| | 205712 [chneukirchen] Sorry, but which CL has a "wicked fast" *virtual machine* and is on
| | 205763 [znmeb@ce ma ] I don't recall which of the "big four" open source CLs have virtual
| | 205868 [rosssd@gm il] Actually SBCL is a fork from CMUCL (with a focus on maintanability) and
| + 205558 [perrin@ap th] . . . but VMs actually are slow (to start, all else being equal).
+ 205797 [kristof@vl e] Here is another version in Ruby. It uses a more clever algorithm.
| 205802 [peter@se an ] [Latin]$ time ruby latin2.rb > r5
| 205988 [kristof@vl e] Yes. I was really suprised to see that your timings where longer than
| 205990 [peter@se an ] I will add it to the page.
+ 206215 [peter@se an ] Time for another update.
| + 206226 [w_a_x_man@ya] I stole code and ideas from Jon Harrop, so this should be called
| | 206227 [w_a_x_man@ya] I just noticed that your site doesn't have my last version (the 4th).
| | 206229 [peter@se an ] When I get home I'll time it and add it.
| | 206234 [w_a_x_man@ya] In order to be fair to gcc, I'd like to point out one thing.
| | 206244 [peter@se an ] I changed the use of the bool data type (which is really an int) to char
| | 206270 [peter@se an ] Sorry but I have to retract these timings. They were from the tests to
| | 206352 [w_a_x_man@ya] I wish that you would dump Perl and do everything in C.
| | 206407 [jon@ff on ul] I posted an OCaml implementation that used an imperative, array-based
| + 206280 [igouy@ya oo ] sub 9 seconds?
| | + 206303 [peter@se an ] This is a good point but in all the posts where I have mentioned the
| | | + 206306 [ara.t.howard] showing how it performs on a 2, 4, and 8 grid would show how it scaled...
| | | | + 206312 [peter@se an ] I'll test the 6 x 6 in Ocaml, C and Java but I'm not sure that I will be
| | | | + 206413 [igouy@ya oo ] It scales badly
| | | | + 206414 [igouy@ya oo ] It scales badly
| | | | + 206415 [ara.t.howard] indeed - that's my point exactly.
| | | | | + 206417 [igouy@ya oo ] At last, something we can agree about - that makes all this silliness
| | | | | + 206460 [kristof@vl e] Did you actually run the 6x6 version? I think my Ruby version might
| | | | + 206425 [jsnell@ik .f] Sure it would, though his web page implies that different algorithms
| | | | 206741 [peter@se an ] Actually this is a miss reading. The whole point of the first post was
| | | | 206840 [igouy@ya oo ] What is a misreading?
| | | | 206957 [peter@se an ] That all the implementations had to use the same Perl pre compute phase.
| | | | 206977 [jon@ff on ul] Even for such a simple task, the ability to use sophisticated data
| | | | + 207039 [kristof@vl e] For my and Simon Kroegers version you need the permutation.rb file, which
| | | | + 207072 [igouy@ya oo ] Will OCaml make the task of exhaustively generating 9x9 latin squares
| | | | 207113 [kristof@vl e] And could anyone actually say what is the purpose of generating all
| | | | 207139 [igouy@ya oo ] afaik it's intended to be a training-set for a program to evolve rules
| | | + 206411 [igouy@ya oo ] Having repeatedly made a mistake in the past is no reason to continue
| | + 206397 [headius@he d] ...
| + 206302 [tbray@te tu ] That URL again? -Tim
| 206307 [peter@se an ] ...
+ 206958 [peter@se an ] New update to the web site. I have added the language versions to the
+ 209656 [oliver@fi st] IMHO they all are fast.... or maybe your computer
class is converting fixnum to array!?!
205394 [stuart@se ve] I have made a class to return a value of either 1 or 0 depending on
+ 205396 [vincent.four] ...
+ 205403 [shortcutter@] That's exactly the reason why we cannot possibly help you here. The
205405 [stuart@se ve] this is the full class and code to call it, it out puts fixnum then
205408 [angus@qu va ] What if you never enter that block, because ldap.search never found
205411 [stuart@se ve] Thats it, thanks very much :)
Using Win32OLE library for DAO
205426 [jatinder.sau] ...
+ 205447 [jatinder.sau] ...
| 205457 [patrick@pk p] Just out of curosity... *why* do you want to use DAO?
| 205685 [jatinder.sau] ...
+ 205738 [masaki.suket] I have not used DAO, but I hope that DAO.DBEngine is what you want.
205807 [jatinder.sau] ...
XMLBuilder: no such file to load -- builder
205430 [matthew.eich] I'm trying to use the XML builder package, but the require is not working.
205434 [farrel.lifso] require 'rubygems'
205448 [matthew.eich] Farrel,
+ 205450 [dharple@ge e] Only use require_gem if you need a specific gem version ? and if you
| 205453 [matthew.eich] Daniel,
| 205456 [matthew.eich] require 'rubygems'
+ 205451 [matthew.eich] Sorry, I posted too fast. The it works now on Fedora but not on CygWin,
205432 [nayakk@gm il] ...
205459 [jgbailey@gm ] ...
205691 [nayakk@gm il] ...
205786 [jgbailey@gm ] ...
205963 [nayakk@gm il] ...
ActiveRecord: find_or_create with has_and_belongs_to_many -- unexpected behavior
205442 [reddaly@re l] I am attempting to use find_or_create on a foreign table with a
205443 [logancapaldo] If you don't want to deal with lots of email traffic, there a web
205458 [michael@tr i] Am new to Ruby and have the folloiwng Question.
+ 205464 [martindemell] Assuming you want to iterate over @array,
+ 205466 [asbradbury@t] It depends what you want each to do? Just to wrap @array.each? In that case,
| 205473 [asbradbury@t] user system total real
+ 205470 [shortcutter@] class Collect
205461 [patrick@pk p] The following code is throwing errors below. It looks like the wrong
205484 [codeblogger@] ...
205490 [patrick@pk p] This is what threw me off...
Rubyforge svn import
205463 [transfire@gm] How to do an initial svn import to Rubyforge? Is it possible to use
205650 [tom@in oe he] Nope, not at this time...
205860 [transfire@gm] Thanks, I looked at that but it isn't very clear. It's says nothing of
+ 205865 [transfire@gm] transaction '26-1', path 'trunk'
| + 205946 [zimba.tm@gm ] Do you already have some files in your repo ? I don't think you can
| + 205995 [tom@in oe he] Hm, are you importing from an existing repo? Is that how Svn does it,
| 206017 [transfire@gm] Just a directory tree of files like CVS.
+ 205994 [tom@in oe he] Yup, I'm not sure how much detail to put there... and actually, I'm not