380902-382525 subjects 381307-383487

^ Packing and unpacking unsigned integers of arbitrary size as binary strings
381088 [astounding g] I see there's a 'w' option to pack for packing arbitrary sized
381100 [b.candler po] => 12345678901234567890
381101 [b.candler po] => "\253T\251\214\353\037\n\322"
381133 [astounding g] Nice, using the conversion via hex string is faster for

^ Re: Using roo to avoid need for Excel to be installed
381089 [popx j-paine] I was able to install the first three, but "gem install" couldn't find

^ can we use direct ruby instaed of javascript ?
381090 [sathish.sale] i am a ROR Developer .
+ 381091 [dhruva.sagar] I am sure there are quite a few projects out there to do what you wish to.
| 381114 [hramrach cen] Another option to use might be JRuby.
+ 381093 [sathish.sale] thx , but i thing HotRuby is dead. There are no updates from last 3
| 381094 [dhruva.sagar] Hmmm, I only know of that.
+ 381112 [rubfor recit] If you have been to any large corporate's offices of late, you would
+ 381113 [whitequark w] I have a project called ColdRuby which is essentially a Ruby 1.9
| 381136 [code apotheo] I don't see any license listed.  Did I overlook it?
| 381147 [whitequark w] The Ruby license, of course. It is implicit.
| 381160 [code apotheo] I haven't looked closely enough to know which way this goes, but one of
| + 381167 [julian coret] I think it might be actually quite interesting for the original poster =
| | 381195 [josh.cheek g] That is incredibly cool! But can you really implement *any* language? What
| | + 381196 [spoon killer] My take here is full of handwaving.  I'll admit I've never of O-Meta
| | + 381199 [spoon killer] Also, if you've already proved the program shouldn't crash due
| | + 381285 [hramrach cen] This is incredibly cool but can you really translate any language into
| |   + 381289 [cmdjackryan ] Of course. Otherwise, the code wouldn't be executed on a CPU, after all.
| |   | 381291 [hramrach cen] And since it can execute on something as limited and poorly designed
| |   + 381298 [wruyahoo05 c] Yes but some language features would depend on a run-time library.
| |     381301 [spoon killer] That would be the STG machine I was talking about, which definitely
| |     381302 [spoon killer] Sorry, I'm an idiot.  Had a brainfart... really you could write a naive
| + 381186 [whitequark w] Please, treat all my words about implicit license as a form of bad
+ 381257 [axyd80 gmail] Do we actually need to have full ruby spec implemented? Don't forget
+ 381293 [josh.cheek g] Accidentally went off list for a bit.
  381297 [cmdjackryan ] YARV generates byte code. The byte code is interpreted by the Ruby VM.

^ uninitialized constant Fileutils (NameError)?
381096 [tluedeke exc] I do not understand what is going on here - I've done this a multitude
+ 381097 [hyagni gmail] Simple spell miss.  The class name is "FileUtils" with an upper U, not
+ 381098 [stefano.croc] It's FileUtils (note the capital U), not Fileutils.

^ convert string to datetime
381103 [jeff_yq yaho] Can anybody tell me how to convert a string format like "20110309" to a
381104 [jgabrielygal] ruby-1.8.7-p334 :001 > d = "20110309"
381105 [b.candler po] t =
381156 [jeff_yq yaho] ost

^ Windows directories not recognized by ruby?
381118 [kalmanh gmai] What's wrong with this code?
+ 381119 [now bitwi.se] You may want to escape your reverse solidus (backslash), or, better
+ 381120 [cmdjackryan ] est_ruby" (\t is is the escape sequence for a tab character)
| 381128 [regis.aubare] ForwardSlash works since MSDOS !
+ 381122 [paul hollyer] It's the way Ruby handles your strings. You are using double quotes,
+ 381141 [koulikoff gm] You should use File.directory? File.join(%w[c: test_ruby])

^ String.gsub with regex and block
381125 [axyd80 gmail] Probably a stupid question, but is there a way to use :gsub replacement
+ 381127 [Reid.Thompso] is it a requirement that you use gsub?
| 381138 [code apotheo] This solution is not very generalizable.  It only works as presented for
| 381181 [b.candler po] Yes, ruby 1.9 has named capture groups. I posted an example earlier in
+ 381129 [b.candler po] There is also $~ (Regexp.last_match); $1/$2/etc are just a facade.
| 381142 [bbxx789_05ss] str = "John Smith"
+ 381131 [b.candler po] Or if you are a ruby 1.9 user, you could use named capture groups
+ 381140 [bbxx789_05ss] Where are you replacing anything?
| 381144 [cmdjackryan ] irb(main):001:0> "John;Smith".scan /\S+/ do |match|
+ 381148 [jakekaiden y] i also wonder if gsub is necessary...  there's no replacement here as
| 381170 [sergey.avsey] name, family, =3D arr
+ 381192 [axyd80 gmail] Thanks for advices, I didn't know about $~ containting arrays of

^ newlines in array problem
381134 [cyril_jose y] Is there a way to get rid of newlines in an array?
+ 381135 [michel demaz] use 'collect'
+ 381137 [jgabrielygal] String#delete returns a copy of the string, it doesn't modify it in
+ 381139 [cyril_jose y] Thanks Jesus - exactly what I needed.
+ 381143 [bbxx789_05ss] each() doesn't create a new array.  Why not use map()?  And you need to
  381146 [jgabrielygal] to
  381151 [bbxx789_05ss] t =

^ REXML Speed Question
381164 [haebooty yah] and I am having an issue with the amount of time it is taking.  If I
+ 381168 [ryand-ruby z] Switch to nokogiri and you'll be much much happier.
+ 381169 [mark without] For larger XML documents SAX parsing can really improve performance
+ 381173 [haebooty yah] Thanks for the info.  I am going to try Nokogiri, if I can only figure

^ reading and writing to child process with streams in ruby
381165 [mpurdy1973us] i am trying to fork a process to run a simple script which requires a
+ 381184 [nobuoka r-de] Using IO#readpartial [1] instead of IO#read, you'll see the ruby
| 381236 [mpurdy1973us] thanx that did work; however, i after doing more research i agree this
+ 381198 [b.candler po] You are sending just "username: " without a trailing newline.
  381238 [mpurdy1973us] (note: this is just to have an example for myself and team; we will

^ Sum of arrays getting slower as size increments
381174 [vbosch gmail] I am currently doing some code for a face detection algorithm. In order =
+ 381176 [vbosch gmail] After some much needed coffee  :-)   I changed from=20
+ 381177 [jgabrielygal] The problem is that b += array is the same as b = b + array, which
  + 381178 [vbosch gmail] Thanks Jes=FAs!!
  + 381179 [vbosch gmail] Your solution is much better than mine with << as that just adds the =

^ How do I trap Ctrl-C so it doesn't reach spawned threads?
381183 [jens.carlber] I'm having trouble trapping Ctrl-C. I have a CLI that spawns processes I wo=
+ 381200 [b.candler po] Try replacing
+ 381266 [headius head] would like to survive the CLI, but if I press Ctrl-C the spawns dies along =
  381517 [jens.carlber] charset="us-ascii"
  381877 [headius head] At this point you might want to take this to a JRuby bug

^ "of" keyword? inverse dot syntax...
381185 [julian coret] some_data.to_s.split("\n").each{|item| puts item}
+ 381194 [josh.cheek g] I don't think my brain would be very fond of this, I like starting with the
+ 381214 [ryand-ruby z] of this_school
  + 381235 [vmanis telus] charset=us-ascii
  + 381255 [ymendel pobo] AppleScript was my first thought, and this "of" stuff is quite

^ DSL 2011 - Last CFP
381188 [emilie.balla] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

^ Re: Help decoding UDPSocket trap data
381190 [chandu.ch29 ] I am new to ruby.
381197 [b.candler po] (1) Are the trap packets arriving? Run Wireshark to look for them.

^ How to know whether current Fiber is the root Fiber?
381191 [ibc aliax.ne] can't yield from root fiber (FiberError)
381211 [bbxx789_05ss] How about catching the exception?
381212 [bbxx789_05ss] require 'fiber'
381276 [ibc aliax.ne] Great solution :)
381278 [shortcutter ] You could even use #equal? instead of #eql? just in case #eql? is overridde=

^ Checkinstall fails to create a Ruby 1.9.2 package
381193 [shamaoke hot] Checkinstall fails to create a Ruby 1.9.2 package. It returns the
+ 381202 [kbloom gmail] Just install Debian's ruby1.9.1 package, which is really ruby 1.9.2.
+ 381203 [shamaoke hot] The patch level is different. It's critical for some applications.
| + 381204 [ibc aliax.ne] I=C3=B1aki Baz Castillo
| + 381219 [kbloom gmail] Well, then do the update the right way, namely
+ 381207 [shamaoke hot] I think, I have to avail myself of your advise.

^ Thor gem: how to display a USAGE: banner when passing in 0 arguments
381201 [klauer gmail] So I can't find any good place to post this question, unless I'm filing it
381389 [klauer gmail] Okay, so it's not really explained in the README, but it's in the docs.  I'm

^ (none)
381209 [badlands_200] ...

^ Calling to_enum on a MatchData object
381210 [vahagnh gmai] def x
+ 381215 [bbxx789_05ss] to_enum() is defined in Object, and all classes inherit from Object.
+ 381216 [bbxx789_05ss] By the way, one way to get a handle on which instance methods a class
+ 381230 [bbxx789_05ss] You also might want to use the synonym enum_for() instead of to_enum(),
+ 381245 [vahagnh gmai] Thank you for your explanations, I can see now that :each is an
| + 381247 [bbxx789_05ss] I'm not sure what you are referring to because each() is neither defined
| | 381411 [vahagnh gmai] Sorry - I meant to say "enum_for / to_enum" was inherited and had to be
| + 381249 [gwtmp01 mac.] You are doing lots of unnecessary work there.  Since MatchData#captures
|   381254 [bbxx789_05ss] Posted via http://www.ruby-forum.com/.
|   381413 [vahagnh gmai] Exactly - that was just to get proof of Enumerator working. In my
|   381498 [gwtmp01 mac.] OK.  I guess I didn't read closely enough.
+ 381248 [bbxx789_05ss] Here's how you can use an enumerator to create an infinite array, from
  381412 [vahagnh gmai] I just tried out (0..9).cycle {|n| puts n} in an irb session and had to
  381414 [shortcutter ] The logic is a bit tricky. :-)  The Enumerator::Generator is just
  381539 [vahagnh gmai] e = Enumerator.new do |y|

^ Java and Ruby integration
381220 [diegonakamas] What is the better way to integrate java and ruby?
+ 381222 [code apotheo] Define "integrate Java and Ruby", please.  Are you talking about writing
+ 381223 [blowmage gma] You may want to take a look at protocol buffers. Pat Eyler has been blogging
+ 381224 [wyhaines gma] JRuby.
+ 381226 [klauer gmail] Without knowing more about what level of integration you're trying to get,

^ [ANN] test-loop 10.0.1
381221 [sunaku gmail] test-loop - Continuous testing for Ruby with fork/eval

^ to_yaml in utf-8 encoding
381227 [axyd80 gmail] Is there a way to force utf-8 encoding in to_yaml, ruby 1.9?
+ 381234 [bbxx789_05ss] The yaml docs for ruby 1.9.2  do not list a to_yaml() method.   And I
+ 381237 [bbxx789_05ss] # encoding: UTF-8
| 381240 [bbxx789_05ss] Posted via http://www.ruby-forum.com/.
+ 381241 [axyd80 gmail] Thanks for Your help,
+ 381242 [axyd80 gmail] require 'iconv'
+ 381243 [axyd80 gmail] $ brew install libyaml
  381260 [koulikoff gm] Try ya2yaml

^ devkit not able to find ruby installation
381231 [javadba gmai] As mentioned in title, devkit is not finding ruby installation. Also
+ 381239 [klauer gmail] Not sure if it will solve your problem, but could you try putting a '-
+ 381246 [luislavena g] As indicated in the example, you need to provide a list of

^ private vs. protected question
381244 [sbstn26 yaho] class Person
+ 381250 [bbxx789_05ss] y by
| 381251 [bbxx789_05ss] class Animal
+ 381253 [bbxx789_05ss] You can call private methods from inside public methods.

^ Re: nokogiri extract text?
381258 [n.haldenwang] If you just want to extract some specific text within a specific tag you
381259 [flethuseo gm] puts doc.search('p').map { |e| e.text }

^ Released Watir 1.8.1
381262 [jarmo.p gmai] Just released Watir 1.8.1!

^ File.open very basic
381268 [brett.a.krug] 'Beginning Ruby' by Peter Cooper
+ 381270 [nruska gmail] Is your text source in the same directory as the ruby file you're running?
+ 381271 [jakekaiden y] very strange...  what version of ruby are you running?  this code
+ 381272 [brett.a.krug] Ya I'm quite stumped as to what the problem could be. text.txt is
+ 381273 [brett.a.krug] So I found a strange solution -
| 381280 [josh.cheek g] Maybe your text editor doesn't run it from the same location the files are
+ 381292 [albertschlef] puts "Last modified:", File.mtime("text.txt")

^ Have a nice day.
381275 [eaglebalti g] Sale Sale Sale. Just visit the following link to buy computer

^ Copying parameters to singleton class
381281 [lasso lassow] I have a metaprogramming question that is driving me mad. I though I
+ 381283 [shortcutter ] class Opportunities
| + 381319 [bbxx789_05ss] Hey Robert K,
| | + 381320 [bbxx789_05ss] In hindsight, I guess that wouldn't work if Opportunities is an existing
| | + 381327 [shortcutter ] Well, basically you just exchanged Opportunities with ClassFactory
| |   381368 [bbxx789_05ss] Yes, that's true.
| + 381382 [bbxx789_05ss] def self.using(opts)
+ 381284 [jgabrielygal] If you don't want instances of Opportunities, of which class you want insta=
| 381286 [lasso lassow] On 11 Apr, 11:36, Jes=FAs Gabriel y Gal=E1n <jgabrielyga...@gmail.com>
+ 381321 [bbxx789_05ss] module ClassFactory
| 381328 [shortcutter ] I think we can do this simpler if you want to reuse that options
| + 381334 [lasso lassow] ractices.com/
| | + 381336 [shortcutter ] Fine!  (Btw, which one did you pick?)
| | + 381367 [bbxx789_05ss] class Object
| |   381369 [bbxx789_05ss] ...actually, class << singleton puts us in the singleton class of
| + 381370 [bbxx789_05ss] I figured out the problem after I posted--including the module
+ 381383 [bbxx789_05ss] class <<singleton
| 381407 [lasso lassow] I'm happy to see that is was possible to do this in so many ways :)
+ 381481 [bbxx789_05ss] Too many variables named 'options'!
+ 381483 [bbxx789_05ss] def using(new_options)
  381484 [bbxx789_05ss] prog.rb:18:in `[]=': can't modify frozen hash (RuntimeError)
  381520 [lasso lassow] Even though I agress that using the same name for both the local
  381545 [bbxx789_05ss] There's working code, and there's clear code.  The goal: working code

^ Beginner's Beginner
381282 [wanelson23 g] I am trying to execute the Sudoku Solver listed in the book "The Ruby
+ 381287 [gerard.cahil] By requiring Sudoku, you're loading the contents of the file sudoku.rb which
| 381288 [cmdjackryan ] Ruby 1.9 expects* you to use
| 381290 [albertschlef] My Ruby 1.9 doesn't have a "require_relative" method.
| + 381296 [cmdjackryan ] Mine does.
| + 381299 [josh.cheek g] require "#{File.dirname __FILE__}/path/to/file_sans_rb"
+ 381305 [bbxx789_05ss] When you require() a file, ruby looks in some default directories for
  381309 [bbxx789_05ss] $LOAD_PATH is an array, and the << is like calling push() on an

^ Re: Ruby and SVG
381294 [ahmed.eldawy] There's a new gem called Rasem.

^ Re: Dynamic SVG with Ruby/Tk
381295 [ahmed.eldawy] There's a new gem called Rasem.

^ Ruby 1.9.2 difference newbie question
381300 [railsfid gma] Is there a difference between ruby 1.9.2 and ruby 1.9.2dev? and if so =

^ [ANN] Goliath v0.9.1 released
381303 [dj2 everburn] I'm pleased to announce that Goliath v0.9.1 has been pushed out.

^ Creating a full application with Ruby
381306 [fs_tigre hot] I have a desk-top application that I created using Actionscript 3.0 and
+ 381310 [bbxx789_05ss] e actual
+ 381315 [jakekaiden y] this looks like something you could do relatively easily with ruby -
+ 381318 [fs_tigre hot] Thank you all for your reply.
| + 381340 [jakekaiden y] simple animations are easy with gtk2...
| | 381345 [ashbbb gmail] If you like both gtk2 and Shoes, how about Green Shoes? ;-)
| | 381348 [jakekaiden y] i'll give it a look - thanks...
| + 381343 [ashbbb gmail] How about the Shoes manual?
+ 381349 [fs_tigre hot] I was reading the documentation from the Shoes' website and it looks
| 381371 [bbxx789_05ss] Please point us to what you are referring to.
+ 381376 [fs_tigre hot] Here.
| 381378 [steve stevek] Hey there! Maintainer of Shoes here!
+ 381385 [fs_tigre hot] Thank you for your reply!
| + 381429 [ashbbb gmail] Umm,... No.
| + 381432 [steve stevek] Glad to hear it. :)
+ 381443 [fs_tigre hot] Thank you all for your help!
| 381450 [steve stevek] heheh, yes, that may be what I'm referring to. :/ Working on it!
+ 381486 [fs_tigre hot] Thank you for your help!
| 381491 [steve stevek] Only way to know for sure is to try. ;)
+ 381524 [fs_tigre hot] Thanks a lot for your help!
| 381529 [ashbbb gmail] We are in the Shoes mailing list: http://librelist.com/browser/shoes/
+ 381538 [fs_tigre hot] Ok, Thanks a lot for your help.