375392-406622

375155-389694 subjects 375556-376108

Daemons
375392 [iainspeed@gm] I've got a process I'd like to daemonize, a call the twitter search API =
+ 375393 [alex@bl ck e] The Daemons gem is good, but if you don't need anything fancy then
| 375394 [iainspeed@gm] Thanks Alex, I'll give both that gem and the code a good look!
+ 375708 [jeremy@hi eg] Also take a look at the 'servolux' gem.
  375716 [tim.pease@gm] API ever 10 minutes or so. There seem to be a few gems that purport to =

Re: yardoc - can't view code docs in browser SOLVED
375397 [mrbillhaxor@] have been related to how the project handled gems. So I started

Substituting New Line Character
375398 [atomicmcbomb] I have a bunch of text that I need to inject a newline character. In my
375399 [jeremy@bo p.] There are multiple standards for the end of line character sequence in
375400 [atomicmcbomb] Thanks Jeremy.
375401 [jeremy@bo p.] irb(main):001:0> a = "hello world"
375405 [atomicmcbomb] thanks Jeremy,

EzCrypto crypts to string or binary?
375402 [barbq2000@gm] key = EzCrypto::Key.with_password("aKey","salted hash")
+ 375403 [jeremy@bo p.] It appears that you're getting binary data in irb as well.  It's just
+ 375412 [barbq2000@gm] Thanks, that's helpful.

Syntax error, want to use multiple variables in one line, copy mysql data
375406 [kvaccaro@mi ] I'm completely new to Ruby and trying to do something pretty simple --
+ 375410 [peter@va de ] Which library are you using to access the database (how did you
+ 375419 [shortcutter@] Maybe row looks different than you think.  I would try this
+ 375423 [kvaccaro@mi ] Thanks for all your help! Turns out the problem was even simpler than I

String or string
375407 [garrisontayl] I am doing something where I do=20
+ 375408 [sduncan@we a] It doesn't seem to mind if those are pre-assigned ...
+ 375409 [josh.cheek@g] falsiness of its parameters. The set of falsy objects is { false , nil },
  375411 [garrisontayl] When I typed it I wasn't looking at it, it was actually=20
  375413 [chaos@ro s. ] Same problem, though. That's the same thing as
  375414 [garrisontayl] I want it to puts blah if u2 isn't force or spells.
  375415 [sduncan@we a] ruby-1.9.2-p0 > u2 = "foo"
  375418 [shortcutter@] Ruby version 1.9.1

Conflicting definitions between ActiveRecord and QT
375416 [emil_macarie] I am somewhat of a Ruby newbie, so if this question is in the wrong
+ 375417 [stefano.croc] In ruby 1.8, Module#constants takes no arguments and qt-ruby redefines it in
+ 375441 [emil_macarie] Thank you for your help.  I will give that a shot as soon as I get back

Instiki failing to run - msvcrt-ruby18.dll not found
375424 [blip@bl pi .] Hope you can help. I am completely inexperienced as regards
+ 375432 [luislavena@g] Instiki has just recently made compatible with Ruby 1.9, but they do
| 375435 [blip@bl pi .] Thanks for the response. There were technical reasons why I couldnt
+ 375480 [blip@bl pi .] still getting msvcrt-ruby18.dll not found unfortunately. Although the
| 375489 [luislavena@g] As I mentioned before, the issue you're getting about the missing
+ 375493 [blip@bl pi .] sounds reasonable. although I only have a vague conception of what a
| + 375495 [cmdjackryan@] A binary gem is a gem that contains binaries (which means compiled
| | 375499 [blip@bl pi .] Thanks very much Phillip
| | 375509 [cmdjackryan@] You are quite welcome. :)
| | 375512 [blip@bl pi .] Sorry to show ignorance - what exactly is contained in a back trace?
| | 375524 [cmdjackryan@] The last steps of your program before it gave up, and refused to do
| | 375587 [blip@bl pi .] Morning All
| + 375515 [luislavena@g] Apologies, but I assume you have certain knowledge of programming.
+ 375589 [blip@bl pi .] *** UPDATE ***
+ 375594 [blip@bl pi .] I've trialled this across the 'net and it does seem to work ok as a
+ 375792 [blip@bl pi .] Ok, everything works but I still have the missing file error.

Designer sunglasses
375425 [aamar22@gm i] Every year new sunglasses are introduced by different fashion

Grep a string
375426 [munikur@gm i] I need to grep the entire string "sync; sync; reboot" after 0 10 * * 0
+ 375428 [b.candler@po] Have you tried searching for an online regexp reference, or used a
+ 375429 [peter@va de ] If on the commandline, 'cut' may be useful.
| 375434 [munikur@gm i] cat /tmp/cron.list | egrep '^[0-9\*]'
| + 375439 [Rob@Ag le on] cat /tmp/cron.list | ruby -nle 'next if $_ =~ /^\s*#/; fields =
| + 375446 [b.candler@po] Grep shows the whole line which matches, or with the -o option shows the
|   375456 [peter@va de ] The part you may have overlooked is the 'cut' command at the end of
+ 375430 [adrain.f.tep] grep "sync;sync;reboot" cron* |head -1 | sed 's/[0-9*\\]//g;s/^[ ]*//'
+ 375433 [Rob@Ag le on] Well, you asked on a Ruby list so you're getting a Ruby answer from me.
  375457 [ryand-ruby@z] me.
  375500 [Rob@Ag le on] Except that I have $_.split(" ", 6) since there are 5 schedule parts

Ruby 1.9.2 : Io performance when application use multithread
375427 [regis.aubare] The file attachment is an simple script for measure performance
375448 [drbrain@se m] On OS X 10.6 I don't see a performance drop for threaded vs non =
375449 [drbrain@se m] threaded.  I ran your script with an argument of 1000 instead of 10 as =
375494 [regis.aubare] Test of your version with  ruby 1.9.1 on linux : 30% better flow,
375525 [zuerrong@gm ] Thanks for all the valueable info.
375532 [shortcutter@] I am not sure what you are asking here.  Are you talking about current
375545 [zuerrong@gm ] What I'm asking is, does ruby's threads behave better on performance
375586 [shortcutter@] It depends.  Generally even Ruby's green threads work pretty well for
375595 [zuerrong@gm ] Thanks. good answer.

Win32::Screenshot 0.0.8 Released
375436 [jarmo.p@gm i] Capture Screenshots on Windows with Ruby

[ANN] cool.io 1.0.0: a cool event framework for Ruby (formerly known as Rev)
375437 [tony.arcieri] Do you like Sinatra? Do you like Node.js? Wish you could write Node.js apps

[ANN] pistachio 0.1.0: HTTP "push" middleware for Rack powered by Redis
375438 [tony.arcieri] Need events delivered to an HTTP client in realtime? Perhaps you=92ve

[THREADS] Behaviour of Thread#stop?
375440 [xavier.noell] I'm currently struggling with Ruby threads, especially the #stop and

do your bit for my mental health - how to find the difference between two strings?
375442 [iainspeed@gm] I have a piece of code that doesn't work in a Sinatra app I've been =
+ 375443 [gmkoller@gm ] This is likely not what you are looking for directly, but it my give
| 375453 [ryand-ruby@z] WTF?!? Did you even read his mail?
| 375458 [gmkoller@gm ] I was thinking from the title that knowing the exact difference
| + 375460 [hassan.schro] Well... your example code tells me the Levenshtein distance between
| + 375461 [ryand-ruby@z] Well... my mind is blown. Obviously, for me to call you out for not =
|   375472 [gmkoller@gm ] Listen,
|   375477 [shortcutter@] As Brian has correctly pointed out there are more ways that String
|   375485 [gmkoller@gm ] Robert,
|   + 375496 [hassan.schro] It was me, not Ryan, who said it didn't work, and of course I tested it
|   + 375502 [b.candler@po] Maybe the OP could have chosen a better subject heading, but it's fairly
+ 375444 [b.candler@po] If you're using ruby 1.9, then there are hidden qualities to strings :-(
| 375554 [iainspeed@gm] Thanks for all the responses, though I was looking for the difference =
| 375558 [b.candler@po] foo = "servicename"
| 375561 [iainspeed@gm] the
| 375563 [b.candler@po] (1) The Rack spec already defines ASCII-8BIT for the body. It doesn't
+ 375465 [botpena@gm i] 1 pls show terminal/screenshots
+ 375588 [yitsushi@gm ] ng that doesn't work.
  375591 [b.candler@po] The strings are "equal", in the sense that Ruby says a==b is true. But
  375639 [peter@va de ] Would it make sense than to include a method like
  + 375649 [martindemell] identical? is a more future-proof name
  + 375657 [w_a_x_man@ya] Try

Re: Behaviour of Thread#stop?
375445 [b.candler@po] You probably don't want to be doing this. There are higher-level data structures which will more likely do what you want.
+ 375462 [zhangsu@li e] thr.stop? returns true not only when thr is dead but also when it is
+ 375541 [xavier.noell] You're absolutely right. I forgot about the Queue structure, which is

Need Help with Split
375447 [atomicmcbomb] I have a list of records that need to be split between the address and
+ 375451 [w_a_x_man@ya] DATA.each{|s|
+ 375452 [brabuhr@gm i] /tmp$ cat i.rb

cTioga - help with axes
375455 [chrislz15@ya] I would like to have a plot where the bottom x-axis has major ticks with
+ 375511 [chrislz15@ya] Anyone?
| 375522 [ninja@sl ph ] ruby-talk is generally for questions about Ruby programming, and I, for one,
+ 375523 [chrislz15@ya] Ah, ok. I posted there yesterday but it seems like a dead forum.
| 375529 [ninja@sl ph ] The next step would be to email the author, or maintainer, or whoever is
+ 376589 [niziriss@ho ] ctioga  --yaxis line --xaxis top,line --inset .5,.5:1,1 --xrange 20:70

[ANN] treequel 1.2.2 Released
375463 [ged@Fa ri MU] treequel version 1.2.2 has been released!

Update Ruby without new installation?
375467 [hka2011@gm i] update to 1.9.2 without doing a complete install alongside my 1.8.6
375474 [stu@ru yp og] For OSX I use rvm and never touch my system ruby installation. I

String.populate(data) for sprintf?
375468 [redstun@gm i] This idea came up in my mind last night.
+ 375469 [redstun@gm i] oops, sorry for typos
+ 375470 [botpena@gm i] what is wrong w String#%
  375471 [redstun@gm i] I mean to have String.populate as an instance method
  375473 [matz@ru y- a] fmt_str = "aligned numbers: %6d %6d"
  375476 [redstun@gm i] Ah, right, so I was just asking for something like

mysql gem segfault on line 343
375475 [dglnz2@gm il] cross posted from mysql ruby forums
375490 [luislavena@g] What version of mysql gem you have installed? (gem list mysql)
375527 [dglnz2@gm il] Downloaded it and then tried it again and got the same error.
375531 [dglnz2@gm il] This problem is SOLVED !!!

How do I define virtual global variable in ruby?
375478 [femtowin@gm ] in ruby c source code, there is
+ 375482 [ryand@ze sp ] <http://codesearch.google.com/codesearch/p?hl=3Den#kOEgDIzD-Ao/trunk/lib/r=
+ 375486 [shortcutter@] They are not global variables, they are more restricted: these
  375505 [b.candler@po] In addition to what Robert said, maybe const_missing would be useful to

Circular Require Warning by gsl and curb
375479 [adam.pocsi@q] I have spent some time googling for answers to this and I have checked

No such file to load -- rubygems (LoadError)
375481 [ops.tong@gm ] I have use ruby to write a shell script to send email automatic, then i
375483 [ryand-ruby@z] env | grep RUBY
375484 [ops.tong@gm ] My script already have require "rubygems", and how to set rubygems
+ 375488 [jgabrielygal] Jesus.
+ 375491 [ryand-ruby@z] Then you're prolly using a different ruby in cron than on cmdline. Use full p=
  375503 [abinoam@gm i] It's probably "env-related"
  375510 [ryand-ruby@z] ing-

How to do UDP calls
375487 [l17339@gm il] Hey guys...
+ 375492 [shortcutter@] The standard library has basic UDP functionality already.
+ 375504 [b.candler@po] Can you give an example of what you mean by a "UDP url"? I don't know of
+ 375548 [l17339@gm il] Maybe I have not explained well...
| 375549 [b.candler@po] No, I haven't seen the udp:// URL format at all. Is there an RFC which
+ 375550 [b.candler@po] It's not HTTP. It's bittorrent-specific (so using "udp" as the URL label
+ 375555 [l17339@gm il] Hey man, thanks for your reply.
| 375564 [b.candler@po] s = data.pack('qNN')
+ 375600 [l17339@gm il] Man, thanks a lot for you time. You've been a really great help.
| 375613 [b.candler@po] A 64-bit integer is 8 bytes, and two 32-bit integers are 8 bytes.
+ 375739 [l17339@gm il] Thanks for your explanation.
  375742 [b.candler@po] Not from my reading of the description at

Visit this blog to increase your general knowledge, this will be very helpful to you
375497 [jr.kv.01@gm ] ...

xml parsing in ruby
375498 [saleem.vighi] I am very new to ruby language and have problem in xml parsing in ruby.

xml parsing in ruby
375501 [saleem.vighi] I am very new to ruby programming and therefore, facing problem in xml
375513 [zundra.danie] Have you looked into nokogiri?
375517 [saleem.vighi] No, I could not find it. When did you sent it?
375518 [saleem.vighi] Ok. I tried to look into nokogiri but I could not solve my problem yet.
+ 375520 [abinoam@gm i] Salim,
| 375544 [saleem.vighi] I am really grateful to you for your immense help.
| 375547 [abinoam@gm i] Salim,
| 375559 [saleem.vighi] It works as intended. Thanks for the help. I have understood most of the
| 375566 [abinoam@gm i] (ARGV[0].nil?) ? ("xmlfile.xml") : (ARGV[0])
| 375583 [saleem.vighi] Thanks Abinoam.
+ 375521 [shortcutter@] Typically you'll get more and better answers if you ask more specific

[ANN] minitest 2.0.1 Released
375514 [ryand-ruby@z] minitest version 2.0.1 has been released!

[ANN] RubyInstaller DevKit 4.5.1 Released
375519 [jon.forums@g] Just in time for your holiday hacking, the RubyInstaller for Windows project [1] is pleased to announce its latest release of the DevKit [2] providing MinGW GCC v4.5.1 capabilities for Ruby on Windows users.

Help a beginner
375526 [guille@du ti] It's showing the error: Unsupported digest algorithm (sha256).
+ 375534 [botpena@gm i] probably not a ruby version problem, eg
| 375546 [josecalderon] What gem are you wearing?
+ 375551 [guille@du ti] Thanks -botp and Jose.
| 375565 [b.candler@po] Try a more common digest, e.g.
+ 375571 [guille@du ti] Thanks again for the help.
+ 375576 [guille@du ti] One last question: what is doing $ ruby -ropenssl -e 'p
| 375577 [botpena@gm i] yes. that is why you have to check one at a time wc gem is screwing openssl...
+ 375579 [guille@du ti] How I do that?
| 375580 [cmdjackryan@] 1. Write test case (i.e. a minimal script doing what you want as above).
+ 375604 [guille@du ti] Thanks Phillip, but what I am confused now is about how I require one
  375621 [cmdjackryan@] require "gem_file_to_be_required"

parsedate (LoadError) 1.9.2
375528 [siddharth.ka] siddharth@jupiter:~/tools$ ~/tools/mri-186-p420/bin/ruby -rparsedate
375533 [botpena@gm i] parsedate has been removed in 1.9.2.

what sofware are you using to reading the ruby language ?
375530 [yangtt@co ls] which sofware is best to reading ruby language?
+ 375535 [dglnz2@gm il] What is you OS?
+ 375536 [shortcutter@] Your question got me stumped: are you really asking what tool to use

Ruby and science ?
375537 [michel@de az] I am really puzzled.
+ 375538 [cmdjackryan@] If you need the proper tools Right Now, then, well, you have to pick
| + 375539 [michel@de az] The issue is internal representation. For instance a matrix 1000 x
| | 375542 [cmdjackryan@] That's true. But it's not like they are much more manageable in for
| + 375569 [ryand-ruby@z] And thanks to Rocket Scientists=99, it does Fortran too!
|   375581 [michel@de az] Which means my problem was just finding where to look up !
|   + 375582 [cmdjackryan@] Not quite, but have a look at ruby-toolbox.com (IIRC), which gives an
|   | 375584 [michel@de az] 'gsl' was not in the toolbox, and (stupid me) I did not look in the RAA
|   | + 375655 [jarmo.p@gm i] This thread reminded me this nice blog post about the same topic -
|   | | 375662 [michel@de az] @ryan : thanks for the Fortran tip
|   | + 375720 [bjracine@gl ] I totally understand the desire to have thse capabilities and the elegance =
|   |   + 375727 [michel@de az] Benjamin, you are moving the knife in the wound (translated from French,
|   |   | 375746 [martindemell] "Twisting the knife" in English
|   |   | 375752 [michel@de az] In French it is "remuer le couteau dans la plaie". Twisting is certainly
|   |   + 375758 [sophrinix@gm] It depends on what kind of science you are trying to do in ruby.
|   |   + 375764 [headius@he d] What I'd really like to see are FFI-based wrappers around key science
|   |     375794 [martindemell] How do FFI wrappers handle concurrent running? (As in, how do they
|   |     375798 [headius@he d] At least in JRuby, FFI calls are not prevented from firing in
|   + 375637 [ryand-ruby@z] gem install RubyInlineFortran
+ 375540 [ammarabuali@] Have you seen Ruby/GSL?
| 375543 [michel@de az] Good news. I'll look. Thanks !
| 375553 [michel@de az] Works ! (Ubuntu Lucid)
+ 375557 [tony.arcieri] Have you considered trying to use a library like JAMA with JRuby?
| 375560 [michel@de az] I am still reluctant to a jump to jruby. I'll first check GSL on MRI
| 375567 [colinb2r@go ] 1. JRuby is currently(?) and anecdotally somewhat slower than MRI 1.9, but
| + 375573 [ninja@sl ph ] And JRuby is getting faster all the time. It's not clear whether one will
| | 375663 [headius@he d] We've always emphasized compatibility and bugfixes over performance,
| | 375906 [ninja@sl ph ] Not really.
| + 375664 [headius@he d] Apart from perhaps MacRuby calling ObjC and IronRuby calling .NET,
|   375675 [ara.t.howard] ...
|   375681 [headius@he d] If you need C or Fortran, you need C or Fortran. I won't argue that.
|   + 375686 [ara.t.howard] ...
|   + 375687 [james@gr ys ] Before I say this, I need to state that I love and use JRuby.  The =
|     + 375691 [michel@de az] @all, esp. @ara, @james, @charles
|     + 375763 [headius@he d] The JVM and the JDK APIs suck at process manipulation...not JRuby.
|     | 375769 [ryand-ruby@z] Oh come now. If the JVM sucks at something, JRuby sucks at it too. Don't =
|     | 375780 [headius@he d] You couldn't be more wrong. It's understandable since you don't
|     | 375793 [ryand-ruby@z] Don't pass the buck.
|     | 375797 [headius@he d] No, you actually were wrong. We route around the JVM/JDK limitations
|     | 375802 [james@gr ys ] bugs we didn't immediately fix=85
|     | 375806 [headius@he d] I think the workarounds were quite acceptable. You did not. That's
|     | 375809 [james@gr ys ] Unixy process management.  It had to interoperate with other processes =
|     | 375810 [headius@he d] This I agree with. I'd like to provide the opt-in POSIX versions as a
|     + 375812 [tony.arcieri] For what it's worth, the APIs that Ruby provides for process management and
+ 375672 [ara.t.howard] ...
+ 375789 [timrandg@gm ] I think you are completely correct in your criticism of ruby's lack of
| + 375799 [jose.halesga] Curious if you've used RinRuby and what  you think of it?
| | 375818 [ryand-ruby@z] I've had good success with rsruby. It isn't the nicest or terribly =
| + 375923 [ara.t.howard] ...
+ 406622 [lists@ru y- ] I know this is an old post... but Im new to the subject.  I dont know if people will read this or not.  Anyhow, Ive just implemented a Gem called MDArray which is available at RubyGem and GitHub (https://github.com/rbotafogo/mdarray).  It implements a multi dimensional array in the spirit of numpy.  It is far from numpy performance and features, but Im planning to keep adding features. I think it should be functional for what it does, but still limited.  It is targeted to JRuby as it uses Java-NetCDF library.
threads.html
top