307667-308996

307462-345102 subjects 307854-314165

^ Thread-safe priority queue?
307667 [sean.ohalpin] Does anyone know of a solid, thread-safe priority queue implementation in Ruby?
+ 307682 [robert.dober] Sean I seem to fail to understand why that change should have any
| 307687 [sean.ohalpin] I didn't explain that very well, did I? Joel's version inherits from
+ 307683 [transfire gm] Ruby?
| 307699 [sean.ohalpin] Thanks for the pointer but the Facets version isn't thread-safe.
| 307721 [rogerpack200] Could throw a mutex around the facets version.
+ 307744 [vjoel path.b] It's pretty easy to work around, I think. Try the following code. It's
  + 307746 [martindemell] Ooh, seconded! Stand up and be thanked :)
  + 307747 [vjoel path.b] Looks like a race condition in that...
    307748 [vjoel path.b] Proposed fix, using a condition var... still needs some eyeballing and
    307778 [vjoel path.b] That was not quite right either (because cond.signal only wakes the
    307919 [sean.ohalpin] Thanks for taking the time to do this Joel. You can see why I was
    308169 [vjoel path.b] And as you can see from my other thread, this code breaks on 1.8.6. :(

^ How do make it post instead of get?
307668 [flemming mun] This script will GET the page i request when i call it from dos-prompt
307669 [paul pollyan] Change
307745 [flemming mun] Well... that run's without any errors too, but i dont get the result i

^ Error installing sqlite gems
307671 [marchese58 l] I've tried from NetBeans to install sqlite gems, but I always got the
307674 [ruby slightl] _api/gem_make.out
307675 [marchese58 l] Ok so what should I do with windows XP to run application with NetBeans
307676 [ruby slightl] 's

^ Regarding migrations?
307672 [ravivardhank] I am using "review_old" database in my rails app.i have 20 tables in
307686 [phlip2005 gm] Ruby is the language that supports Rails, so its forum is less well qualified to

^ How do I link to inferior-ruby/interpreter in emacs?
307678 [circularfunc] I have fixed ruby-mode for emacs but I dont understand how to run the
307688 [ryand-ruby z] M-x find-library RET
+ 307719 [circularfunc] C-c C-s is not defined.
| 307722 [jayeola gmai] Open a ruby file and see what mode you are in then C-h m and C-h b will tel=
+ 307724 [circularfunc] ;; (autoload 'ruby-mode "ruby-mode"

^ (none)
307680 [gaetan.dubar] unsuscribe Gaetan Dubar

^ New RMagick4J release.
307681 [serabe gmail] RMagick aims to implement the ImageMagick funcionality and the C
307706 [TimHunter nc] Awesome!

^ Trying to find good examples of Ruby Sessions.
307689 [xcampanoli g] if session['lastaccess']
+ 307690 [dave pragpro] It doesn't need to. It'll be nil if unset, and nil is false in Ruby.
| 307692 [xcampanoli g] You're right.  I miscoded my copy.  Okay, my apologies.  Still, it would
| + 307693 [dave pragpro] Rails?
| | 307695 [xcampanoli g] Not really, though I am accessing active record in here, but I'm
| | + 307696 [xcampanoli g] And I just tried supplying a session key, and that leaves me with the
| | + 307697 [dave pragpro] You were asking for examples of use. Rails 1.x uses CGI::Session...
| |   307698 [xcampanoli g] Thank you.  I'm looking at that now.
| |   307709 [xcampanoli g] Looks like I need to find the way to make my eruby .rhtml files take
| + 307694 [xcampanoli g] Okay, I appear to be creating the persistence file in
+ 307691 [xcampanoli g] The way I'm trying to use this now is to initialize the session in a

^ [Q] In place edit mode activation?
307700 [laurent mold] Does anybody knows if there is a way to activate the 'in place edit
307743 [vjoel path.b] [~/tmp] cat >foo

^ Ruby bug database
307701 [Stefan.Schmi] where has the Ruby bug database gone? It used to be at http://www.ruby-lang.org/cgi-bin/ruby-bugs but that address doesn't work anymore. I cannot find it on the website.
+ 307702 [shevegen lin] I don't know but you are not the first to mention this :-)
| 307704 [jbarnette gm] What you're looking for is http://redmine.ruby-lang.org/ .
+ 307703 [martindemell] martin
+ 307705 [ryand-ruby z] which does not appear linked on any page on the regular site. That
  + 307707 [Stefan.Schmi] Thanks @everybody for the correct link.
  + 307712 [james graypr] James Edward Gray II
    307713 [Stefan.Schmi] If I visit ruby-lang.org I am redirected to ruby-lang.org/de/ and there I find
    307726 [james graypr] Yes, I just made the change on the English page.  It may take some =20

^ String#upcase/downcase with UTF-8 strings in Ruby 1.9
307710 [Stefan.Schmi] => "AOUE"
307718 [matz ruby-la] str.upcase   =3D> new_str
+ 307725 [dangerwillro] <Stefan.Schmidt@gmx.net=20
+ 307730 [Stefan.Schmi] Yes, sorry, I should have read the documentation
  307731 [dangerwillro] No.
  + 307770 [Stefan.Schmi] Is Nikolai Weibull's Ruby Character Encodings Library [1] currently the best way to go?
  + 307817 [Stefan.Schmi] Are there any working extensions for Ruby 1.9 that offer Unicode support for String#downcase/upcase and/or Array#sort?

^ Is there a way to set a cookie with CGI::Cookie objects, from an rhtml file?
307715 [xcampanoli g] I'm trying this with cgi.out, but it doesn't like me doing that without
+ 307716 [xcampanoli g] ...
+ 307717 [xcampanoli g] How do I set a cookie from a .rhtml file?

^ what's your recommendation re ruby backup scripts for linux backups???
307727 [greg.hauptma] I want to put in place a periodic backup routine for my linux box to cover

^ IO.select timeout problem
307728 [steve.w.gibs] Using ruby 1.8.6 under Linux.  For some reason IO.select() seems to be
307733 [inspire22 gm] I'm having this same problem - wish I had a better solution to offer

^ (www.stefsclothes.com)supply nike air jordan shoes(paypal accept)
307734 [stefsclothes] (www.stefsclothes.com)supply nike sports shoes,nike jordan shoes,nike

^ Setting a cooking from an eruby .rhtml file
307735 [xcampanoli g] I also tried inserting the cookings at an intermediate page that
307763 [boesemar gmx] I assume you call the eruby program as the cgi handler from your webserver

^ Problem with hash in function
307738 [skaverat rf-] Somehow I'm missing something really basic. Why is following function
+ 307739 [srijayanth g] args.id will return your object_id. I am not sure that's what you
| 307741 [skaverat rf-] thanks, I knew I missed womething.
+ 307740 [grzm seespot] Are you expecting foobar({:id => "MyID"}) to return "MyID"? args.id

^ Install gems on shoes
307752 [marchese58 l] can I do it?
307766 [gthiesfeld g] hth,

^ Killing a ruby script gracefully
307753 [crofty_james] I have a Ruby script that uses Event machine to listen on a port for
307769 [znmeb cesmai] I don't know about Windows, but on Linux, and most Unix-ish systems,
307771 [vjoel path.b] Sounds like he was asking: which signals does EM handle and how...?

^ Error using sqlite gems
307754 [marchese58 l] `gem_original_require': no such file to load -- sqlite3-ruby (LoadError)
307767 [damnbigman g] From that first error message I would guess your require line is wrong.  You
307781 [luislavena g] ake.out

^ problem in rubygems installation
307757 [martin angle] Dear all,
307819 [martin angle] Dear all,
308271 [drbrain segm] It won't work without zlib.

^ Overloading the []-Operator
307759 [matthias.win] I'm trying to overload the [ ] operator. It works fine for read-only
+ 307760 [stefano.croc] def []=(acc, value)
| 307827 [davebass mus] ...because the name of the method is "[]=", strange though that may seem
+ 307761 [ttmrichter g] irb(main):017:0> class Junk

^ Net::SSH - how to respond to a prompt before first command?
307764 [slawek_zachc] I'm trying to connect, using SSH, to a server that immediately after

^ calling c++ from Ruby
307772 [tiberiu.moto] actually get posted. Here it goes again. I'm trying to call a c++
+ 307774 [stefano.croc] I don't know whether it has to do with the error you're getting, but I thin=
| 307775 [AEtzold gmx.] Dear Tiberiu,
+ 308996 [todd.fisher ] I think you meant to use rb_define_singleton_method, instead of

^ (none)
307773 [tay.carpente] charset="us-ascii"

^ [SUMMARY] Statistician II (#168)
307779 [matthew.moss] I don't know if it was the metaprogramming that scared people away

^ character-encodings gem with Ruby 1.9
307780 [Stefan.Schmi] I tried to install Nikolai Weibull's Ruby Character Encodings Library [1] with Ruby 1.9, but didn't succeed.
307784 [dave pragpro] Do you know that 1.9 has excellent built-in support for character
+ 307796 [Stefan.Schmi] Yes, but String#upcase/downcase doesn't work for non-ascii strings.
+ 308248 [roberto REMO] Like the OP said, as long as #upcase/#downcase don't work, I'd not call that

^ file modes
307782 [martindemell] A post on Arc [http://arcanesentiment.blogspot.com/2008/07/arc-gets-io-right.html]
+ 307789 [jens.wille u] just added them to ruby-nuggets [1] ;-) (sans the 'open_')
| 307791 [martindemell] Neat :) I suggested the open_ because I was wondering how you'd get
| 307794 [jens.wille u] well, it's not completely backwards compatible, since the original
+ 307790 [djberg96 gma] ght.html]
  307793 [martindemell] The modes are still there in .open if you need them; they just aren't

^ Re: Statistician II (#168)
307783 [matthew.moss] I wanted to add one more note...

^ wsdl/operation.rb blowing up
307785 [Dan.McNulty ] I am attempting to do some SOAP scripting for my first time, and have

^ Ruby Raw Sockets
307786 [fdmanana gma] PF_PACKET    = 17        # linux/socket.h
+ 307792 [fdmanana gma] Forget it... found the error Socket::SOCK_DGRAM.. Must use
+ 307797 [vjoel path.b] Unsolicited suggestion: if you're doing a lot of packing, byte swapping,

^ Map with &:method_name
307787 [oliver.saund] I see this a lot but it doesn't work for me in IRB. Is a gem required or
307788 [ara.t.howard] it's rails - basically
+ 307798 [rick.denatal] And it's been picked up in Ruby 1.9, and maybe 1.8.7 as well since the
+ 307808 [oliver.saund] class Symbol

^ Communication between 2 ruby programs
307795 [julien.genes] I am having a hard time solving this issue and I'm sure you guys know
+ 307799 [james.britt ] Have you considered using xml-rpc?  Ruby includes a library for that.
| 307800 [julien.genes] Hum,
+ 307801 [ara.t.howard] bot = IO.popen 'bot.rb', 'r+'
| 307802 [julien.genes] Correct me if I'm wrong, but popen will "fork" the current process and
| 307813 [ara.t.howard] man mkfifo
+ 307803 [drbrain segm] The RailsRemoteControl gem may be a good start.
+ 307816 [mail.list fi] I would look at activemessaging plugin for this if you want something

^ Why Ruby interpreter is writed in c (not in c++)?
307804 [ranieri.tx g] I've downloaded the sources of Ruby 1.8.7-p22 and compiled it with MS CL
+ 307807 [phlip2005 gm] What a pain! Next time, get CygWin, and compile with GNU C.
| + 307811 [dangerwillro] But Objective-C may soon.... MacRuby....
| + 307818 [znmeb cesmai] There are actually starting to be some decent "system-level engines"
| | 308150 [hramrach cen] Even GCC does not run everywhere.
| | 308152 [phlip2005 gm] Which is why Ruby's source is compatible with K&R C - before even prototypes.
| + 307831 [davebass mus] This is because object-orientation is unnecessary. Any job you can do
| | + 307835 [eleanor game] Very true, although a large program in assembler is often a much
| | | + 307836 [dblack rubyp] I wonder, though. I think I think procedurally. With lots of rescue
| | | | 307838 [eleanor game] Ruby-- perhaps ?;)
| | | + 307949 [davebass mus] It may be natural for some people, but I have to force myself into
| | | + 308130 [fox nscl.msu] Close but not really.  The primary purpose of OO is that it provide a
| | |   308134 [phlip2005 gm] You describe an "Object Based" system.
| | + 307843 [phlip2005 gm] Of course. The C source to Ruby has no OO. It just has lots of functions that
| + 307837 [eleanor game] It may well compile for them, but there are systems where even diet
| | 307844 [znmeb cesmai] There's also another light-weight libc -- I forget the name, but there
| | 307847 [eleanor game] Not to mention Forth can be compiled to a very minimal memory
| | 307851 [znmeb cesmai] I'm not the heretic -- the heretics are the people who added "labels as
| | 307865 [eleanor game] I never did understand why both K&R and ANSI-C lacked computed gotos -
| + 307871 [ranieri.tx g] Thank you Philip.
| | 307901 [phlip2005 gm] CygWin is the GNU toolkit ported to Windows. It gives you Bash, X, gcc, g++, and
| + 307894 [lloyd 2live4] Actually, the point of OOP is that the old procedural approach led to
+ 307946 [Bil.Kleb-use] 1) Ruby was born long before C++ compilers were even close to portable,
| 307974 [znmeb cesmai] 1. Rumor has it that Rubinius is migrating towards LLVM, which is also
+ 308128 [fox nscl.msu] Because the implementers made that design choice.

^ compile ruby sources with mingw for ms-windows-386
307805 [ranieri.tx g] Can you point me to the path that will show how to compile ruby sources with

^ Got my redirect to work... something.cgi
307806 [xcampanoli g] require "#{ScriptLib}/CGIUtils.rb"
+ 307809 [xcampanoli g] Oddly, the cookie I see in my browser isn't readable by default from the
+ 307841 [boesemar gmx] I thought I answered that. A redirect option would be easy to add.

^ Re: threadify-0.0.1
307810 [djberg96 gma] =A0
307814 [ara.t.howard] sweet.  i wouldn't launch rockets with it - but it a cheap speedup for

^ MS SQL 2005 Express and MySQL on Windows
307812 [kyle.rabe gm] The short question: Has anybody successfully connected to both MS SQL
+ 307815 [dvohra09 yah] Kyle,
+ 307840 [gethemant gm] Your mysql problems has nothing to do with your sql server. You don't
  307858 [kyle.rabe gm] Thank you for your tips.  I'd rather not install Rails if possible -
  307859 [kyle.rabe gm] at least now, I'm getting "require 'mysql'" to return "true".
  307862 [kyle.rabe gm] False hope.  If I fire up irb, require 'dbi', and then try to load a
  307884 [kyle.rabe gm] OK, I missed something very basic and essential.  It's now working.  I

^ ruby extension for qt
307820 [martin angle] Dear all,
307822 [perchr north] I have a question. Why write your own, and not use the existing one?
307823 [martin angle] Dear Per Christian Viken,

^ Trying to write a first plain ruby script
307821 [tefflox gmai] In irb, the method "one\ntwo\nthree".split worked fine
307824 [AEtzold gmx.] Dear Jesse,
307878 [tefflox gmai] Heh.  It was even later than I thought.  The problem was that I called

^ ANNOUNCE: Rucola 0.5 released
307825 [eloy.de.enig] I've just released Rucola 0.5
+ 307833 [sandro.pagan] WOW. seems cool !
+ 307875 [ymendel pobo] Sounds like a good release, Eloy. It was definitely too long to wait

^ Beginner: if statement in one line?
307826 [kylejc gmx.n] How can I put a statement like
+ 307828 [trader9 gmai] if 5== 5 then puts '5' end
+ 307829 [charroch gma] puts '5' if 5==5
+ 307830 [twinandi web] puts '5' if 5 == 5
| 307832 [sandro.pagan] for if / else oneliners you can use also
+ 307842 [znmeb cesmai] puts '5' if 5 == 5
+ 307850 [matt tidbits] In addition to others answers you've received, keep in mind that you can
+ 307868 [ trys vip.hr] AFAIK, you can't use {} brackets to mark block for "if" statement, so
| 308006 [nobu ruby-la] That usage of ":" had never been an official feature, and no
+ 307890 [mcpierce gma] puts '5' if 5 == 5 # The condition can be at the end of the line. :)
+ 307952 [davebass mus] Be aware that { } blocks in Ruby don't have the same meaning as { }

^ Unescape xml element content
307834 [jon equipe.n] Is there a way to unescape this string?
+ 307839 [AEtzold gmx.] Dear John,
+ 307849 [matt tidbits] require 'rexml/document'

^ [OT] Re: Why Ruby interpreter is writed in c (not in c++)?
307845 [ara.t.howard] my experience is that it really is.  a few years back a group i worked
307846 [znmeb cesmai] Java is also easier to read and write than C++ -- a *lot* easier. And

^ gem update
307848 [jose.cruz si] I'm behind a firewall. How can I update ruby modules?
+ 307852 [damnbigman g] Can you ping http://gems.rubyforge.org?
| 307857 [jose.cruz si] No!
| 307860 [damnbigman g] Sounds like it is either your firewall or DNS/Routing problems then.  In
+ 307877 [osapauschke ] if its a proxy problem u can try to set an environment variable in

^ [QUIZ] Symbolify (#169)
307853 [matthew.moss] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+ 307863 [ara.t.howard] i've got one line - tests pass.
| + 307870 [aledonne.lis] Me too. My method body is one line, 25 characters. Did you manage to
| | 307874 [ara.t.howard] haven't gone golfing yet - it's 74 now.  you've guess my target
| | 307879 [dmerrick ics] Haha, I just did it and my solution just happened to be 42 characters.
| | 307882 [ara.t.howard] damn - i've usurped!
| | 307883 [james graypr] Mine was 28 characters, with normal whitespace usage.
| | + 307886 [james graypr] Of course, using my solution, the following code causes Ruby to
| | | + 307889 [ara.t.howard] a feature - no on needs numbers that big, 2 ** 10 should be enough for
| | | + 307921 [Glen.F.Panko] One line; 38 chars (uses no whitespace); no cheating; 1200 OK;
| | + 307892 [aledonne.lis] I managed to golf one char out of my first solution; it's 28 with
| | | 307909 [aledonne.lis] After clearing a "duh" moment, I've improved these encoded lengths...
| | | + 307913 [ara.t.howard] mine are all zero length ;-)
| | | + 307928 [frederick.ch] I've been trying the short representations that are just plain old
| | | | 307931 [frederick.ch] Or even
| | | | 307976 [ruby alef1.o] Just make test pass.... nothing clever!
| | | + 308012 [ryand-ruby z] I'm not a good golfer by any means... Hell, I preach against it. My
| | |   308015 [motoakira ma] [QUIZ] Symbolify (#169)
| | + 307911 [woutersmeenk] I managed to squeeze my solution in 19 characters and 23 with normal
| |   307918 [aledonne.lis] I found a 19-character, 23-with-whitespace solution as well, thanks to
| |   307926 [billk cts.co] Wow...  Nice...
| |   307927 [aledonne.lis] I, on the other hand, am looking forward to the various "cheating"
| |   307930 [billk cts.co] Although I'd mulled over a slightly more clever cheat, I went
| + 308440 [robert.dober] Great Quiz indeed, but just coming back from vacations the fun stuff
|   308444 [vjoel path.b] Define forever :P
+ 307881 [james graypr] Excellent quiz.  Full marks Matthew.  ;)
+ 308020 [mike rubywiz] 23 characters symbolify(i) body, no cheating.
+ 308044 [aledonne.lis] def symbolify_1(i)
| 308045 [james graypr] def symbolify(n)
| 308058 [frederick.ch] I came up with something along those lines.
| 308093 [rick.denatal] Here's a fairly straightforward solution, this passes the tests and works
| + 308106 [ryand-ruby z] My first version did roughly the same thing, but against the binary
| | 308115 [paul pollyan] Is it awful at this point to say that I just don't get it?  How does eval on
| | 308116 [frederick.ch] Well you've got multiplication, exponentiation and substraction/unary
| | 308118 [paul pollyan] Wow, so ?? gives you the ASCII code for the ? character.  That's awesome.
| + 308148 [motoakira ma] Excuse me again(^_^;)
+ 308052 [mike rubywiz] def symbolify(i)
+ 308054 [boesemar gmx] def symbolify(i)
| 308105 [boesemar gmx] def symbolify(i)
+ 308084 [dmerrick ics] Here is my solution. It's not really outstanding on any front, but it wor=
threads.html
top