270057-408604

269825-273879 subjects 270202-272335

Ruby parser wierdness?
270057 [ciconia@gm i] I've stumbled upon a weird phenomenon when trying nested Dataset#query
270067 [rick.denatal] It's a matter of the operator precedence of do and {}.

Storing a search index on the filesystem
270061 [dougal.s@gm ] ...

Couple of questions about TCPServer.new and TCPSocket.new
270064 [victor.reyes] ...
270082 [jovino@ya co] Server :    Client
270190 [victor.reyes] ...

Splitting a string by x number of lines
270068 [lrlebron@gm ] I am trying to figure out how to split a string into chunks of 25
+ 270071 [sepp2k@go gl] string.scan(/(?:.*?\n){1,25}/)
| 270079 [lrlebron@gm ] On Sep 20, 1:02 pm, Sebastian Hungerecker <sep...@googlemail.com>
+ 270094 [jovino@ya co] def split_newlines(str, num_lines)

Interactive System calls within Ruby Script
270075 [Klauer@gm il] I'm not sure whether this is possible or not, but I know that Ruby
+ 270077 [mo_mail@on h] I'm sure you'll get back much better answers than mine but just to get
+ 270078 [mailing.mr@g] use open4 gem
+ 270080 [droffo@gm il] ...

when $0 isn't what I want
270102 [perrin@ap th] When using eruby for web development, $0 for any given .rhtml file is
270104 [phlip2005@gm] File.dirname(__FILE__)
270106 [perrin@ap th] I coulda sworn I'd tried that already.  Apparently not.

checking for html forms with www::mechenize
270103 [chuckdawit@g] I want to run a check to see which pages have forms and which ones don't
+ 270132 [chuckdawit@g] reached (EOFError)
+ 270221 [jan.svitok@g] The error means mechanize could not read the webpage. Find out if it's
  270227 [chuckdawit@g] This is the error message I'm getting. It's not related to the 13th url
  270229 [jan.svitok@g] Ok, it seems to be a long-time problem - google some words from the

I am new to Ruby and I could use some expert advice as to how I can make this code run faster.
270110 [raychorn@ho ] I am new to Ruby and I could use some expert advice as to how I can
+ 270143 [wayneeseguin] ...
+ 270145 [lojicdotcom@] Write a C extension. Seriously, Ruby is pretty darn slow at iterating
| 270149 [dangerwillro] Benchmark it so you can find the bottlenecks.
| 270236 [raychorn@ho ] On Sep 20, 7:16 pm, John Joyce <dangerwillrobinsondan...@gmail.com>
| + 270239 [caduceass@gm] Yes, if you get a chance, please compare with other languages and
| + 270593 [pbrannan@at ] Since you didn't provide python code for us to compare against, I can only
+ 270301 [w_a_x_man@ya] This is equivalent to
+ 270302 [w_a_x_man@ya] About 2.8 times as fast.
| 270504 [raychorn@ho ] Okay but wake me up when you can make the original Ruby code I
| + 270515 [mo_mail@on h] I'm still confused about why someone wouldn't just have a C extension
| | 270683 [raychorn@ho ] I know of some people right now who are feverishly working to make
| | + 270715 [mo_mail@on h] 1. their lack of pragmatism
| | + 270744 [alex@bl ck e] Got links?
| + 270521 [raychorn@ho ] ruby2c and ruby2cext are hacks that convert Ruby code into C code.
|   270523 [konrad@ty er] charset="iso-8859-1"
|   270580 [raychorn@ho ] It is truly sad that people, like me, are labeled as being "trolls"
|   + 270758 [luc@ho k- on] Presenting lies as reality, among many other reasons, is what makes
|   + 270932 [REMOVE-CAPSb] Every opinion is a reality. -- Timothy Leary
|     271015 [alex@bl ck e] I don't think that's quite accurate.  An opinion that ruby is not the
+ 270305 [nobu@ru y- a] File.new(fname, "rb") do |f|
| + 270307 [nobu@ru y- a] Sorry, these are not "new" but "open".
| + 270575 [ilmari.heikk] $ time ruby -rscramble -e 'scramble_original("trace")'
| | 270625 [ilmari.heikk] $ time ./scramble trace trace.scrambled
| | 270637 [vjoel@pa h. ] To give C its fair due, you might try with
| | 270646 [ilmari.heikk] I tried that a while ago, it was roughly twice as fast as the per-byte version.
| | 270706 [ilmari.heikk] $ time ./scramble64 trace trace.scramblec
| | 270774 [w_a_x_man@ya] On Sep 24, 6:50 pm, "Ilmari Heikkinen" <ilmari.heikki...@gmail.com>
| + 271095 [celtic@sa ry] Nobuyoshi, you are holy!
+ 270315 [w_a_x_man@ya] If you actually want speed, use a compiled language.
  + 270417 [w_a_x_man@ya] If that prolixity bothered you, look at a
  + 270525 [raychorn@ho ] Okay I downloaded Free BASIC and installed it but your code does not
  | 270568 [w_a_x_man@ya] Did it compile without errors?  Did you make sure that no lines of the
  + 270579 [raychorn@ho ] Finally got this FreeBASIC code to work but it reports a runtime of 3
    + 270609 [w_a_x_man@ya] The speed of the disk drive plays a large role here.  Make sure that
    + 270656 [w_a_x_man@ya] Will you explain how you got it to work?  The version I posted

Rubinius on Mac PPC
270111 [ari@ar br wn] Hey all,
270126 [wilsonb@gm i] We had someone in IRC with this same problem a minute ago. It appears
270130 [ari@ar br wn] Hehe. I happen to be seydar :-)
270147 [wilsonb@gm i] Yeah. Just run the rubinius binary with no other arguments, and it will start.

How fast does your Ruby run?
270115 [summercoolne] How fast does your Ruby run?
+ 270118 [promos@bu ch] I just ate your lunch.  MacPro 3ghz dual duo 2gb ram.
| + 270121 [jeremywoerti] HAHAH. I love it! awesome.
| + 270122 [promos@bu ch] Ruby 1.8.2 on universal-darwin8.0
| | + 270135 [perrin@ap th] That cut almost three full seconds off my time -- down to 13.829852
| | + 270898 [jzakiya@ma l] n = 1_000_000
| |   270897 [jzakiya@ma l] opps
| |   270901 [jzakiya@ma l] opps again
| |   276071 [Summercoolne] today, on the Mac OS X 10.5 Leopard
| |   276103 [Summercoolne] sorry it should have been 82,000 iterations per second.  there was an
| + 270127 [drbrain@se m] pwn!
| | 270139 [promos@bu ch] OOOOUCH!!!    Ruby 1.9.0 is HOT!
| + 270133 [perrin@ap th] 55
| + 270167 [charles.nutt] MacBook Pro 2.1G. I tried both Ruby and JRuby.
|   + 270168 [charles.nutt] I also tried Ruby 1.9 and Rubinius, but Rubinius crashed.
|   | + 270172 [has.sox@gm i] ...
|   | + 270182 [GGarramuno@a] Seems like a pretty silly test, but okay...
|   |   270191 [imobachgs@gm] Ok, here's some more numbers (comparing ubuntu pre-compiled, compiled
|   |   + 270246 [lojicdotcom@] On Sep 21, 6:57 am, "Imobach Gonz?lez Sosa" <imobac...@gmail.com>
|   |   | 270254 [tpo2@so rc p] ...
|   |   + 270336 [rick.denatal] One more strike against using Debian packaged Ruby!
|   |     270369 [tpo2@so rc p] ...
|   |     + 270371 [vjoel@pa h. ] The --enable-pthread might be for compatibility with the tcl/tk package
|   |     + 270375 [rick.denatal] I'm not bashing Debian in general, just the Debian approach to Ruby packaging.
|   |       270413 [tpo2@so rc p] Shall I bite?
|   |       270443 [pietia.moo@g] Probably it depends on architecture of the binary-package which was
|   |       270479 [tpo2@so rc p] However the data I have available indicate that compiling ruby for i486
|   + 276147 [charles.nutt] Ruby 1.8.5 patch 3876 on java
+ 270125 [wilsonb@gm i] As you are seeing, ruby 1.8.x is painfully slow on Windows. =(
+ 270134 [reid.thompso] amd athlon 2500+XP processor (1883 MHz) 1GB ram
| 270136 [reid.thompso] forgot the processor speed for the linux core2 duo
+ 270151 [lojicdotcom@] On Sep 20, 6:49 pm, SpringFlowers AutumnMoon
+ 270177 [geoffness8@g] On Sep 21, 10:49 am, SpringFlowers AutumnMoon
+ 270181 [gracin@te .f] Here's something interesting.  The processor is Intel T7200 @ 2.00GHz,
| + 270212 [znmeb@ce ma ] Make sure you use the appropriate "march=" flag when you do. See
| + 270285 [drbrain@se m] How can you draw that conclusion?  You used three different versions
|   270295 [gracin@te .f] You are right, that was one hasty conclusion.
|   270297 [gracin@te .f] Oh, and finally, the latest Ruby from svn...
|   270615 [pbrannan@at ] What does it look like without --enable-pthread?
|   270765 [gracin@te .f] Without --enable-pthread, it still gets linked with libpthread.so.  And
|   270780 [pbrannan@at ] Oh, silly me :) -- YARV uses pthread for its threading now, so of course
+ 270195 [jaimeiniesta] **** Ubuntu GNU/Linux on a Thinkpad R52 (Intel Celeron 1.4 Ghz)
| 270206 [jaimeiniesta] After submitting the results for my local machines, I thought it would
| 270208 [jameskilton@] ...
+ 270241 [phrogz@ma .c] On Sep 20, 4:49 pm, SpringFlowers AutumnMoon
+ 270247 [cmshea@gm il] On Sep 20, 4:49 pm, SpringFlowers AutumnMoon
+ 270255 [robert.mcgov] RubyMate r6354 running Ruby r1.8.6 (/usr/local/bin/ruby)
| + 270258 [pietia.moo@g] Laptop Asus A6TC - Debian Sid i386
| | 270260 [pietia.moo@g] Sorry for "269313 iterations" in my previous post - i couldn't edit it
| | 270268 [caduceass@gm] lol.  I imagine he doesn't want to get swatted by ruby purists.  He
| | 270293 [reid.thompso] I've built using cygwin several times w/out issue.  Not recently though,
| + 270477 [robert.mcgov] Followup, with the newly released 1.8.6p100
|   276345 [robert.mcgov] A followup on myself now that Leopard is out and installed on my MacBook.
+ 270259 [ilmari.heikk] P-III 700MHz, 384 megs of ram
+ 270348 [lloyd@2l ve ] Intel Dual core 3.2 GHz, Win XP machine
+ 270444 [neoanderson1] 55
+ 270446 [mgreenly@gm ] Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz 800MHz FSB
| + 270464 [perrin@ap th] Is that missing a decimal point after the 17?
| + 270480 [tpo2@so rc p] Are you certain?!?!? That would be a 100 fold improvement?!!?!?!
|   270484 [meqif@sc ry ] I guess he typed the results instead of copying and pasting, judging
+ 270452 [julianraschk] Ruby 1.8.5 patch 12 on powerpc-darwin8.8.0
+ 270468 [codethought@] 55
| 270471 [summercoolne] The performance gain I got from Ruby 1.8.6 to Ruby 1.9 is only from
| + 270478 [codethought@] I'm not a big fan of compiling and installing bleeding-edge code...
| + 270485 [lloyd@2l ve ] If that is true, then is the release version specifically compiled to be
|   270493 [znmeb@ce ma ] As far as I've been able to determine, with gcc, the compiler settings
|   270494 [fwmailinglis] charset="us-ascii"
|   270498 [znmeb@ce ma ] Yep ... those numbers are typical of what I'm seeing with the Athlon64
|   270501 [fwmailinglis] charset="us-ascii"
|   270533 [znmeb@ce ma ] It's unlikely to be faster in a statistically significant sense. As a
|   270595 [perrin@ap th] I find that rather surprising.  The common wisdom seems to be that newer
|   270598 [znmeb@ce ma ] The phenomenon is specific to gForth/vmgen and not a general rule as far
|   + 270604 [fwmailinglis] charset="us-ascii"
|   + 270686 [perrin@ap th] Thanks for the info.  I may have to investigate further, with this as
+ 276083 [ara.t.howard] require 'narray'
+ 276114 [ghalsey@ya o] windows xp. intel core2 1.86GHz
| 277412 [ghalsey@ya o] #testing 1.9, yep it's fast;
| 331462 [summercoolne] Ruby 1.9.1 patch 0 on i386-mswin32
| 363874 [blueskybreez] n = 3_000_000
| + 363882 [josh.cheek@g] $rvm list
| + 363926 [cremes.devli] Someone is going to point this out sooner or later so it may as well be me.
|   363929 [blueskybreez] It is just to get an idea, really.
+ 276142 [daniel.schoe] Ruby  Patch Platform            Seconds   Iterations per second
| + 276144 [lionel-subsc] IIRC on my Gentoo I got +80% on this particular benchmark with
| | + 276156 [znmeb@ce ma ] Well, on Gentoo you'd need to turn off the "threads" USE flag globally.
| | | 276201 [propolice@gm] E5320 1.86GHz.
| | + 276248 [daniel.schoe] Ruby  Patch Platform                     Seconds   Iterations/s
| + 276152 [charles.nutt] FYI, we're debating making ObjectSpace something you must turn *on* at
| | 276153 [znmeb@ce ma ] Just a question -- assuming it's off by default, how do you know when
| | 276191 [charles.nutt] We'd print a warning if it's used without being enabled.
| | + 276194 [znmeb@ce ma ] Let me re-phrase that ... how do I know when I'm coding that I'm not
| | | 276214 [charles.nutt] Well, you need to explicitly reference ObjectSpace in most cases to
| | | + 276217 [ara.t.howard] they care.... why not just use autoload charles?
| | | | 276218 [charles.nutt] Because ObjectSpace needs to be loaded/enabled *before* the objects you
| | | | 276221 [ara.t.howard] hmmm.  an exception seems best then - force the require up front.
| | | | 276223 [charles.nutt] Not really; we've made it as lightweight as possible. The problem is
| | | | 276227 [ara.t.howard] better you than me ;-)
| | | + 276224 [vjoel@pa h. ] The dependence on ObjectSpace is kind of nasty, isn't it? A library
| | | | + 276225 [vjoel@pa h. ] Oh, just saw your other post: you use weak refs, so the behavior should
| | | | + 276226 [charles.nutt] Yes, ObjectSpace is a useful tool for walking the heap when you really
| | | + 276314 [james@gr yp ] Couldn't test/unit define an inherited() hook and locate test cases
| | + 276198 [jflam@mi ro ] Wouldn't it be better to throw?
| |   276213 [charles.nutt] Maybe?
| + 276157 [znmeb@ce ma ] What is "patch 5000"??
|   276245 [daniel.schoe] That's what ruby from the svn checkout
+ 276148 [apeiros@gm .] All I have to say to this is: http://xkcd.com/194/ :-p
+ 276327 [djberg96@gm ] On Sep 20, 4:49 pm, SpringFlowers AutumnMoon
| + 276437 [ara.t.howard] touche=B4
| + 363927 [robert.dober] Actually it runs slower than those, but it seems faster because the
+ 363947 [jcmoore@pr s] Ruby 1.9.1 patch 378 on x86_64-linux
  408604 [lists@ru y- ] My goodness, Ruby has come a long way... 12 times as fast as I made the

[ANN] new random_data gem for better development data
270116 [rubyforum-ma] I've released a small gem that provides a Random singleton class with a
270192 [vshepelev@im] Mike Subelsky

GLU and GLUT libs.
270117 [leandroico@g] Someone here has programmed ruby with GLU (OpenGL Utility Library) and
270124 [ruby@an hr p] It's just GLU and GLUT, though. Any reference on the C library should help

[ANN] fire 1.0.0
270120 [ari@ar br wn] fire version 1.8.6 has been released!
270150 [konrad@ty er] charset="iso-8859-1"

Re: [ANN] Metadata 1.0-rc2
270161 [botp@de mo t] # tarball: http://dark.fhtr.org/repos/metadata/metadata-1.0-rc2.tar.gz
+ 270163 [konrad@ty er] charset="utf-8"
+ 270164 [ilmari.heikk] If there's a way to install bin/chardet as-is, now gem adds"#!/usr/bin/ruby"-boilerplate (which doesn't quite work for apython script.) ...Though, I could always turn it into a ruby scriptthat executes a bit of python. So, yeah, it is possible. I'll build one.
  270170 [ilmari.heikk] Or, one could make a VMWare image or somesuch and use it as ametadata appliance. Anyone know how that might work best?
  + 270173 [konrad@ty er] charset="utf-8"
  + 270198 [botp@de mo t] # (I think most cygwin programs only depend on cygwin1.dll

ruby + mysql
270178 [nebbiadimarz] Sono nelal melma con MySql
+ 270193 [ari@ar br wn] Have you tried using ActiveRecord? You can get it by typing
+ 270214 [ciconia@gm i] Rough translation to English: How do I insert a value into the table
  + 270238 [guerrantonio] Thank you a lot, Sharon!!!!!!!!!!!
  | 270248 [ciconia@gm i] I can read more or less. Glad to have helped.
  + 270283 [ari@ar br wn] Ah. yes.. well.... that certainly makes MY response invalid.

Ruby RSS Feeds
270179 [ivan.trajkov] Where can I find good information about using Ruby for RSS Feeds?

CLOB handling
270184 [pjcarvalho@g] In an oracle table, I hava a field of CLOB type (named "VXML").
270188 [pjcarvalho@g] I solved my problem.
298459 [jazzybuddy@g] Please can u post the solution for ur ptroblem as we are facing a

Re: How slow does your Ruby run? (was: How fast does your Ruby run?)
270189 [fred@la av .] Ok.  Since I can't possibly win this DSW, I'll try this on my slowest
270213 [fred@la av .] Ruby 1.8.6 patch 0 on i386-freebsd5
270253 [konrad@ty er] charset="iso-8859-1"

[QUIZ] Shirt Reader (#140)
270196 [james@gr yp ] 1.  Please do not post any solutions or spoiler discussion for this quiz until
+ 270237 [oksteev@ya o] expectations = {
| + 270243 [james@gr yp ] Wow.  Awesome.  Thanks.
| + 270275 [rrafje@gm il] ...
|   270389 [jamesbkoppel] Do not for get the ultimate pictographic message (not sure what these are called, but they're definitely not "T-shirt phrases." - I've seen them before plenty of times, but never on T-shirts.)
|   270396 [martindemell] Rebuses.
|   270426 [oksteev@ya o] my solution: http://rn86.net/~stevedp/tshirt_reader.tar.gz
|   270448 [kbloom@gm il] My answer's along the same lines with Metaphone, but nowhere near as good
|   270878 [benjohn@fy h] I'm wondering if this quiz would work in the opposite direction
+ 270437 [rrafje@gm il] ...
+ 270724 [rubify@so to] Here is my solution. Obviously it is not as "well educated" as Steve's one
  270968 [rubify@so to] One more limit of a good education - sometimes it is limited to an education
threads.html
top