282026-284971

281773-283311 subjects 282277-283016

^ hash
282026 [stu_09 hotma] iv started writing a class which reads the data from a text file and
+ 282029 [coder68 yaho] linecount = 0
+ 282030 [phrogz mac.c] info = {}
  282032 [phrogz mac.c] # Could be IO.read
  282046 [stu_09 hotma] thanks for the awesome response I appreciate it
  282048 [phrogz mac.c] Unless I'm misunderstanding you, both of the solutions I provided do
  282053 [stu_09 hotma] im just expecting an output of every time it encounters a tag to create

^ How to calculate variance
282033 [surjit.meite] How to calculate variance on the elements of an Array
+ 282049 [tim.pease gm] Implement this algorithm <http://mathworld.wolfram.com/Variance.html>.
| 282172 [sgilperez gm] You can also write this, if you are going to need it in more places,
| 282219 [rakrok gmail] def variance( arr )
+ 282112 [alexg kuicr.] *Shameless plug and probably overkill if you just want the variance*

^ FxRuby
282034 [ernst tanaka] I have a big favor to ask. I am new to ruby and have managed to build an
282113 [fxrubyguy gm] What "forum" are you talking about?
+ 282200 [ernst tanaka] Thank you  Lyle for you help.
+ 282768 [meinrad.rech] Yes, it can be assumed. FoxGUIb has subclassed most of the FXRuby

^ ruby 1.9 woes
282040 [brandon.g.jo] I'm running on Solaris and am having trouble building ruby 1.9.
282110 [nobu ruby-la] In general, auto-generated files aren't in the repository.
282191 [brandon.g.jo] Thanks for the assistance.  I'm getting a crash when miniruby tries to
282198 [brandon.g.jo] SunOS dstnsun0 5.9 Generic_122300-13 sun4u sparc SUNW,Sun-Fire
282201 [nobu ruby-la] th is broken?
282208 [brandon.g.jo] It would seem so.  It's the ruby thread passed to vm_call0() in vm.c

^ problem using ruby with c++
282047 [teofilo.dutr] I'm  trying to use a ruby script in c++ which uses the method get of a
282091 [teofilo.dutr] I solved the problem, the method NtInitialize() was missing before

^ Re: Ruby idiom equivalent to Perl "$asdf = $ARGV|| die 'arg
282054 [rmagick gmai] "abort" and "kill" are way too negative and violent. I use
282058 [shevegen lin] How about

^ eruby & ruby cgi, are they "safe"?
282057 [kyleaschmitt] Programming errors asside (sql injection, running uploaded files, not
282068 [alex dunae.c] I've found eRuby to be extremely safe and stable for use over the web.

^ unexpected return (LocalJumpError) when forking off a rake process
282062 [hans.sjunnes] I've written a small ruby cgi script which allows me to fork off a
+ 282065 [hans.sjunnes] ruby 1.8.5 (2006-08-25) [x86_64-linux]
+ 282069 [stefano.croc] I think this is not related to rake. The problem is that you are using retu=

^ rubygems 0.9.5 install issue
282064 [kyleaschmitt] I was attempting to install rubygems on a machine that has, and
282095 [contact thir] I just had the exact same problem and solved it by installing/compiling
282243 [kyleaschmitt] John, I'm not sure I follow about compiling it in a directory in your
282249 [contact thir] I copied the install files to /usr/local and installed it there and got
282366 [kyleaschmitt] *cough cough*
282368 [contact thir] so you're up and running?
282418 [kyleaschmitt] Hu.  I thought the rebuild with no errors was proof it was good, but
282428 [contact thir] Kyle...it doesn't seem to be over for me...
282566 [kyleaschmitt] Err, without knowing that library, are you sure it's not

^ I think this is cool, ruby iterators and continuations
282067 [wbsurfver ya] =begin
282156 [MonkeeSage g] I'm not sure how useful it is to signal failure in the block of

^ PDF Reader
282075 [snoopy1990 g] Hey,
282077 [dvohra09 yah] I'm new to ruby and want to know if there is any open source pdf reader
284971 [snoopy1990 g] I found a much easier solution! Just force the pdf file to be opened in

^ [ANN] Webby 0.6.0 released
282076 [tim.pease gm] Webby is a super fantastic little website management system. It would

^ for loop iterator, next object
282079 [lpgauth gmai] for user in @Users
282081 [mental rydia] Of course.  But what do you want to happen when you're at the end
282083 [mental rydia] prior = nil
282088 [lpgauth gmai] I figured it out... You can use in_group_of
282093 [cvonkleist g] require 'enumerable'
+ 282119 [fourfifty gm] users.each_with_index do |user, index|
| 282121 [cvonkleist g] I think using each_with_index that way will give behavior like each_cons.
+ 282687 [shortcutter ] irb(main):001:0> %w{a b c}.each_cons(2) {|*a| p a}

^ ruby and quicktime??
282084 [Chris.Killim] I know you can interact with the quicktime player via ruby, but why
282104 [has.temp3 vi] QTKit is accessible via RubyCocoa.
282223 [Chris.Killim] Thank you for the reply.  I will check out RubyCocoa.  Are there any

^ [ANN] god 0.6.0 released (and mailing list)
282092 [pubsub rubyi] !!!NEW MAILING LIST!!! We now have a mailing list at
282144 [chiology gma] Looks very cool. I look forward to playing with it.

^ Re: Packet : A Pure Ruby Library for Event Driven Network Programming
282094 [tad.bochan b] I was trying out "packet" tonight, but failed at the starting block with
282098 [ezmobius gma] Windows does not support UnixSockets. Therefor packet does not run on
282122 [no spam.plea] It wouldn't be hard to use Named Pipes instead, which are the Windows equivalent.
282148 [gethemant gm] Never used them, but I will have a look at see, what can be done about
282167 [jameskilton ] You do know that there is a maintained pure ruby version of EventMachine

^ SSL not installed error when trying to install Rails w/ gem
282097 [contact thir] I got ruby and gems installed on Red Hat, then updated gems.
282105 [contact thir] Assuming your source is at /usr/src/ruby-1.8.6

^ I consider this a bug in Ruby...
282100 [ihatespam ho] # This should be 1 followed by 13 zeroes...
+ 282118 [nobu ruby-la] Yes, and performance issue.
| + 282132 [ihatespam ho] Just so I'm clear on this; the Range class is implemented in C for
| | + 282138 [nobu ruby-la] about your "limitation."
| | | 282183 [ihatespam ho] Where did you write about this?  I'd be happy to read it...
| | | + 282192 [MonkeeSage g] On Dec 5, 7:40 am, "Just Another Victim of the Ambient Morality"
| | | + 282209 [gerardo.sant] On Dec 5, 2007 7:46 AM, Just Another Victim of the Ambient Morality
| | |   282213 [ihatespam ho] Rubinius is a virtual machine implementation.  I'm not sure how this
| | |   282217 [gerardo.sant] On Dec 5, 2007 10:40 AM, Just Another Victim of the Ambient Morality
| | + 282143 [charles.nutt] Perhaps not yet, or not 1.8.6. But this is going to change.
| + 282195 [matz ruby-la] Commit the patch, please.
+ 282127 [botpena gmai] On Dec 5, 2007 7:40 AM, Just Another Victim of the Ambient Morality
| 282135 [ihatespam ho] In what way is Range expensive?  Why is it so expensive?
+ 282178 [lloyd 2live4] fyi, to help with counting zeros, you can use an underscore like a

^ Re: rubyforge 101
282108 [tom infoethe] To summarize - there's an hourly (oops, I need to update that frequency
282109 [jmettraux op] simply provide a .gem in the release, and it will be available a bit

^ @@IDENTITY
282120 [four_mrperfe] I can't seem to find any resources which tell me how to do the
282128 [four_mrperfe] doesn't anyone know how to retrieve the id of the last inserted record,
282134 [no spam.plea] It's not that, it's that no-one tends to respond quickly to folk who don't
282140 [four_mrperfe] First off, thanks for your reply.  If it's the case the people haven't
282151 [alex blackke] It's also worth mentioning that your initial request and follow-up were
282185 [four_mrperfe] GREAT!  Thanks, Alex!

^ Ruby works but not JRuby - when using MySQL Driver
282123 [venkatesh.ma] Here is the simple Ruby program that works with "Ruby" but gives an
+ 282126 [superist_joe] I'm not sure if this is the case, but seems like it might be.  JRuby doesn't support C extensions.  I don't know if it can be addressed with that driver.  You might be able to use the Java MySQL Driver, keep in mind the free one is GPL.
+ 282142 [charles.nutt] The pure Ruby MySQL driver should be fine, but it looks like you've got
  + 282146 [charles.nutt] Or of course you could use JDBC directly. The API is pretty clean, a lot
  + 282170 [venkatesh.ma] I installed this driver using "gem install mysql". I suppose this will
  + 282186 [venkatesh.ma] I am not able to make the pure Ruby Mysql driver work. I am getting
    282187 [venkatesh.ma] According to the information here, pure Ruby MySQL doesn't work with
    282257 [charles.nutt] That's unusual, since rails works fine with the pure-ruby mysql driver.
    282271 [venkatesh.ma] Yes. Please send me any examples you may have. I already got one from
    282286 [charles.nutt] Here's a very simple example to get you into the JDBC frame of mind.

^ Shoes questions
282139 [schmode93 ya] Alright i know that its possible to "getkeys" and set commands for the
282150 [why ruby-lan] Oh, Erik, if you want to join the Shoes mailing list, we'll take

^ Rubygems 0.9.5 and fastthread mswin32 gem
282153 [damphyr free] Is there a binary gem for fastthread on windows?
282173 [luislavena g] Yes, there is.
282181 [damphyr free] I can undertsand that :). I guess I can get the binary gem and install
282228 [luislavena g] Hoe set the platform to the gem specification to Gem::Platform::RUBY
283036 [a.holstvoogd] I have the same problem, but i am using 0.9.4.
283048 [luislavena g] On Dec 11, 10:05 am, Arthur Holstvoogd <a.holstvo...@nedforce.nl>

^ UTF-8 and printf
282154 [jldiaz gmail] I'm trying to use printf to give a tabulated format to my output, like
282184 [MonkeeSage g] Unfortunately, I think you'll have to use something ugly like this...
282455 [jldiaz gmail] Hey, thank you very much. The trick of unpack to find the string
282457 [MonkeeSage g] Not really a bug, just that 1.8 doesn't have native unicode support.
282458 [jldiaz gmail] I understand. That's why I put "bug" in double quotes
282495 [MonkeeSage g] IIRC, ruby wasn't created with unicode support because unicode is less

^ iconv problems with different machines
282155 [nappin713 ya] ic = Iconv.new('US-ASCII//TRANSLIT', 'UTF-8')
+ 282159 [nappin713 ya] Actually I found some other posts about this same issue from awhile
| 282160 [fxn hashref.] I have not been able to understand where is exactly the difference, =20
| 282248 [nappin713 ya] I like that solution even better.  Thanks for sharing!
+ 282258 [gmane auxbus] Raymond O'Connor said...

^ How are methods being excecuted?
282157 [saladin.mund] I'm working on a method which should manipulate the excecution of the

^ what's wrong with these calculations?
282161 [caifara.subs] I thought, why search for two hours being totally frustrated if I can
+ 282163 [caifara.subs] Ok
+ 282165 [gethemant gm] sprintf("%.2f",(73.07-64.00)).to_f
| 282166 [gethemant gm] class Float
| + 282168 [jameskilton ] Also look into using the BigDecimal class. It does special processing to
| + 282189 [phrogz mac.c] Note that, due to the nature of floats, calling to_f on that string
|   282190 [jameskilton ] require 'bigdecimal'
|   282196 [phrogz mac.c] irb(main):002:0> require 'bigdecimal'
+ 282204 [caifara.subs] Thanks to everyone helping to find me/us a nice solution.

^ redirect to pdf
282164 [sebastian.bo] in folder public/pdf I have a file "test.pdf"
+ 282177 [halostatue g] =85that you're asking a Rails on ruby-talk. I also suspect that a Google
+ 282254 [perrin apoth] Are you sure that leading / is supposed to be there?  Maybe it should be

^ Expanding array as function arguments
282171 [rugowski nhw] I wonder if it is possible to expand array as function arguments. Like
+ 282174 [sgilperez gm] foo *[1,2,3]
| 282180 [rugowski nhw] Thnx a lot ;)
| 282194 [MonkeeSage g] A note on splat; it can be used to both gather and unpack elements,
+ 282175 [shortcutter ] foo *[1,2,3]
+ 282176 [rimantas gma] How about foo *[1, 2, 3] ? (Note the "*" -"splat").

^ hash
282193 [stu_09 hotma] - reads a text file
282199 [shortcutter ] Why do you repost the same question when you got answers already?  Are
282203 [stu_09 hotma] i wasnt sure i had recieved the answers i was looking for. I was
282210 [MonkeeSage g] If you don't understand or don't find an answer sufficient, say so in
282250 [stu_09 hotma] thanks, i've got it to print out the hash
282253 [MonkeeSage g] ^ This part is pointless now. $linecount above is equal to
282255 [stu_09 hotma] cheers.
282263 [phrogz mac.c] case just fine. Please read through the code and understand it. You
282264 [MonkeeSage g] Sorry about that Phrogz. I didn't read the other thread, I just
282267 [phrogz mac.c] Absolutely no need for an apology. Helping people isn't a competition
282269 [stu_09 hotma] hey guys
282278 [MonkeeSage g] Nah! Any mistake you might make, we've already done that and worse
282285 [stu_09 hotma] thanks mate.
282289 [stu_09 hotma] oh wait...iv solved it

^ Fwd: Please Forward: Ruby Quiz Submission
282197 [james graypr] ...

^ rubygems/rubyforge question - release, package, group?
282202 [rsanheim gma] Could someone please explain the difference between a release, a
282212 [ben bleythin] * group: the project name

^ win32/process problem
282205 [christian.ke] I have an application that consists of serveral independent parts.
282214 [djberg96 gma] On Dec 5, 8:28 am, Christian Kerth <christian.ke...@dynamicmedia.at>
282322 [christian.ke] Win32: 0.5.4 (updated yesterday)
282341 [christian.ke] I uninstalled the ruby win32 gem and reinstalled it.

^ Ruby equivalent for `du`
282215 [cvonkleist g] directory, because I didn't see anything in File::Stat or FileUtils
282218 [MonkeeSage g] Couple problems with that approach 1.) assuming that ".", ".." are the
282226 [cvonkleist g] Good point!  Something like %w(. ..).include?(file) would be better
282235 [MonkeeSage g] No problem. :)

^ Fwd: Please Forward: Ruby Quiz Submission
282216 [james graypr] ...

^ Keeping variables across requires?
282222 [peter.bunyan] I'm making a Befunge interpreter in Ruby - I like to keep my brain
282236 [m_goldberg a] You really have two variables 'instructions', each local to file in
282238 [peter.bunyan] Ah, thanks. With Ruby I'm used to not having to do global/local things;
+ 282241 [dodecaphonic] AFAIK, that's a quirk in 1.8. Blocks with no arguments return -1 when you
| 282244 [peter.bunyan] Ah, the program was that I didn't make all the other variables global as
+ 282245 [MonkeeSage g] Global state is usually unnecessary. It looks like your code would fit

^ Re: infinite streams in ruby 1.9?
282225 [james graypr] Continuations are available in Ruby 1.9 after requiring a standard
+ 282231 [mental rydia] A generator may also yield (no pun intended) better performance than
+ 282232 [MonkeeSage g] Neat article, James! :)

^ Ruby globals
282230 [lschweyer sy] I am have a moderate knowledge of Ruby and OO programming.
282240 [coder68 yaho] Research the GOF singleton pattern.. it is used extensively to solve the
283122 [shawn42 gmai] I would also look at how hard it would be to pass around some kind of Config

^ [ANN] London Ruby User Group - 10th December 2007
282239 [murray.steel] The London Ruby User Group will be having it's December meeting this coming

^ Tidy segfault on Linux
282246 [lee.fyock gm] I'm using the Ruby tidy gem to clean some user-input HTML. It works
282454 [scott ideum.] Lee,
283592 [lee.fyock gm] Excellent, thanks, I'll try it out.

^ Re: ruby-1.8.6-p111 build on osx 10.5.0 fails; ok on 10.4.10
282251 [rogerpack200] to install mysql gem on ppc leopard (10.5)
282274 [laurent.sans] Laurent
282293 [rogerpack200] Yes that link helps you when you don't have xcode installed (which is,

^ WIN32OLE Date Conversion
282259 [mike.rood in] I'm using WIN32OLE calls to grab data from Microsoft's Active

^ [ANN]  December Phoenix Ruby User Group Meeting
282260 [james.britt ] December Phoenix Ruby User Group Meeting

^ require "snmp" error in script
282262 [contact thir] I am trying to require "snmp" in a basic script to poll some networking
282273 [klodus gmail] add line

^ Lambda funcs that call gets won't halt program execution?
282265 [peter.bunyan] Once again, a problem with my Befunge interpreter. I'm trying to
+ 282270 [tpo2 sourcep] i= {}
| 282308 [m_goldberg a] And this very similar code works just fine for me.
+ 282334 [w_a_x_man ya] If Ruby is invoked in this fashion

^ Are there module existing for system test
282275 [tammo tammo-] I have looked around a little at rubyforge and RAA.

^ Worth an RCR? static_type_check, polymorphic_type_check,  quacks_like
282276 [john.carter ] Is there another library like this? I would love it if it were just
+ 282281 [MonkeeSage g] Ola Bini released something similar last year [1]. It didn't go over
+ 282292 [transfire gm] def initialize( _name, _drawable, _theme)
| 282298 [MonkeeSage g] Heh. I used to think the opposite about respond_to?, but for a while
| 282336 [shortcutter ] Some more random thoughts about respond_to?
| 282451 [MonkeeSage g] I can't think of an actual use case offhand (heh, that probably speaks
+ 282305 [john.carter ] Sure you can. However for more typing you get a lower quality / less
+ 282307 [no spam.plea] My Chattr gem does stuff like this for attributes and for arrays.
+ 282326 [dblack rubyp] Keep in mind, though, that static type checking isn't just some safety
  282435 [john.carter ] Yes, yes, yes, I know all the theory, I've read the arguments....and
  + 282480 [no spam.plea] Clifford Heath.
  + 282517 [eeklund gmai] by writing a "typesig" declaration before your method declaration (or
threads.html
top