249695-277154 subjects 250077-265873

Inverse scanf: finding format specifers of existing fields
249911 [Bil.Kleb@NA ] I have files full of numbers that I need to twiddle,
+ 249913 [fxn@ha hr f.] Are there many different formats?
| 249926 [Bil.Kleb@NA ] Yes, in that the field lengths are different.
| 249927 [fxn@ha hr f.] Then I think you could base the solution on String#index/regexps
| 249931 [Bil.Kleb@NA ] This, coupled with Robert's computed field lengths
+ 249917 [shortcutter@] If there is a fixed number of formats you can probably use a cascade of
| 249930 [Bil.Kleb@NA ] Unfortunately not.
| 249932 [shortcutter@] For floating point numbers you might even get away with a single regexp
+ 249924 [dblack@wo bl] require 'scanf'
| 249928 [Bil.Kleb@NA ] The second output indicates that I failed to express
+ 250006 [rick.denatal] Bill,
  250279 [Bil.Kleb@NA ] Excellent!  Thanks.
  + 250281 [Bil.Kleb@NA ] Later,
  + 250444 [rick.denatal] irb(main):001:0> '%8.7f' % 0.0001170
    + 250446 [rick.denatal] By the way Bill, seeing who you seem to work for, I'd like to dedicate
    | 250544 [Bil.Kleb@NA ] You helped me learn more Ruby; always a pure joy.  Thank you.
    + 250542 [Bil.Kleb@NA ] Thanks,

Fwd: Please Forward: Ruby Quiz Submission
249918 [james@gr yp ] ...

Newbie question: How to get an object in the Controller from a view's hidden field
249922 [agnisys@ya o] I'm trying to pass an object from the View to the controller as a hidden field.
+ 249938 [cmdjackryan@] Please don't start a new topic by hitting "Reply" in your mail
| 249944 [zaphod@s4 .d] But what about people, who do not want to use ugly webforums or
| 249945 [cmdjackryan@] What do you think is *this*? If you don't want to use the sources of
| 249947 [zaphod@s4 .d] A news group about "ruby"? As far as I understood your last posting,
| + 249951 [damnbigman@g] ...
| + 249953 [cmdjackryan@] On my end, it's a mailing list. For others, it is a webforum..
|   249956 [zaphod@s4 .d] And on my end it is a usenet newsgroup. But as far as I know, even google
+ 249943 [zaphod@s4 .d] I really do not understand, what you want to do. Which sense does it make,
+ 249952 [ivorpaul@gm ] ...
  250008 [agnisys@ya o] Thanks Igor for you useful response. I would try the Rails community.

problem in ROR
249933 [sangeetha.ge] ...
249934 [chris.lowis@] I suspect they may need more information, for example server logs and

It doesn't produce any output!
249940 [ycelik@oy ek] I wonder if something is wrong with the following code.
249942 [shortcutter@] Your finalizers lock the object in memory.  You can find a recent
250028 [ycelik@oy ek] Thanks Robert,
+ 250039 [shortcutter@] No, that's not the one.  The mere fact that you define a proc / lambda
+ 250046 [cdcarter@gm ] it is pretty well documented that you cannot do that.  From the docs

249950 [ryandhanks@g] Can anyone out there say they've successfully used irbsh [1] on Emacs

MySQL gem problem on OS X
249955 [dangerwillro] Help.
249958 [ryand-ruby@z] First, this is a good problem report. I'd like to see more people
+ 249964 [dangerwillro] Thanks for the compliment. I've seen enough help requests over the
| 249967 [gethemant@gm] Rails works is no guarantee of the fact that, you  have broken build
+ 249970 [dangerwillro] Hmm... in the directory

C DSL anyone?
249957 [phelan@tt ec] Just curious,
+ 249966 [ara.t.howard] check out RubyInline - it is exactly this
+ 249977 [vjoel@pa h. ] IMO, cgen's shadow class mechanism is what differentiates cgen from
| 250029 [sonoflilit@g] Am I the only one that thinks OP is looking for a library to assist in
| + 250036 [dangerwillro] Indeed, the OP is trying to generate C rather than write C. Very
| + 250164 [garbagecat10] ...
+ 250068 [pbrannan@at ] #include <iostream>
  250103 [vjoel@pa h. ] How is this def being used in the output?
  250114 [pbrannan@at ] I wish I had a more realisitc example; I think then it would be clearer.
  250149 [vjoel@pa h. ] My bad. I just missed that. So the #ruby stuff is for defining utility
  250177 [pbrannan@at ] You can use them that way, or if the code returns non-nil, the result
  250396 [lauri.pesone] Related to what the OP was asking for, I've been thinking of
  250506 [B.Candler@po] The thought which struck me when reading this was: "ASN.1"
  250602 [lauri.pesone] You do have a point. I agree that ASN.1 would be able to handle all

replacing parts of newlines
249959 [mikejaystein] ...
249962 [fxn@ha hr f.] Not really.

Help with rather simple method
249960 [kristnjov@no] I'm trying to come up with the "best", most Ruby-ish way to write a
+ 249965 [dangerwillro] 'amount' means what? Number of characters to replace?
| 249972 [kristnjov@no] Correctly guessed!
+ 249973 [w_a_x_man@ya] def random_replace(string, amount)

249975 [jhaberman@gm] Why would SIGVTALRM ever cause IO#sysread to throw EINTR?  I'm having
250127 [pbrannan@at ] Which platform are you running on and which version of ruby are you

Fwd: Please Forward: Ruby Quiz Submission
249976 [james@gr yp ] ...

Re: MySQL gem problem on OS X [SOLVED]
249986 [dangerwillro] Hey, I want to say thanks for pointing me in the right direction!

Re: how to increase the width of a field in rails
249987 [leslieviljoe] ...
250034 [come.news@fr] It's a quite basic question about rails.. Are you sure you shouldn't
+ 250072 [kazaam@ol co] well first of all I didn't knew that this newsgroup is limited to just
| 250081 [rick.denatal] This may be, but in general, you'll find more rails expertise on the
| + 250090 [kazaam@ol co] First, thx for this really great delicious link. Second, of course it is
| | + 250098 [seebs@se bs ] Welcome to the list of people whose questions I will never answer.
| | | + 250100 [cmdjackryan@] Phillip "CynicalRyan" Gawlowski
| | | + 250135 [rick.denatal] Hmmmm,
| | |   250137 [kazaam@ol co] if you think so plz ignore me...
| | + 251687 [henrikloevbo] if you so terribly mind signing up with google to follow the rails
| |   251689 [gregory.t.br] This is such useful content!
| + 250143 [james.britt@] More generally, people are asked to direct library-specific questions to
|   250246 [leslieviljoe] ...
+ 250073 [kazaam@ol co] first thanks for your answer, it worked great :)

Re: JRuby T-Shirts for Contributors
249988 [charles.nutt] It was going to be "require 'java'" up until recentl. "include Java" is

Re: RubyConf 2007
249989 [djberg96@gm ] So much for Canada, eh? ;)
+ 250525 [list.rb@gm i] ...
+ 250675 [marcel@ve ni] Avi Bryant is doing a keynote at this year's RailsConf...Why not Joe Armstrong at
+ 250678 [why@ru y- an] Hey, didn't the creator of Objective-C give a keynote at a previous
| 250679 [marcel@ve ni] Exacto mundo. In 2004.
| 250690 [dangerwillro] It's the Ruby culture.
+ 250714 [matz@ru y- a] I am available.  But I will gladly yield keynote privilege to Joe
| + 250741 [dangerwillro] Oh, but it would be so nice to hear a lot about 1.9/2.0
| + 250764 [dblack@wo bl] Thanks for the offer, but we still want you :-)  And I missed last
|   251769 [djberg96@gm ] So, we'll have Joe do the keynote and Matz do a "State of the Union"
+ 251162 [znmeb@ce ma ] Well ... I'll do a Forth keynote at a Ruby conference :)
| 251206 [matt@te hn r] Cool!  I'll have to make sure to get a front row seat!
+ 251218 [chad@ch df w] It wouldn't be the first time. We had Brad Cox speak in 2004 (he's

shell script with arguments within perl script
249992 [jmkshah@ya o] shell script with argument. I need to know the correct syntax for the
+ 249994 [seebs@se bs ] Hmm.
+ 249996 [dangerwillro] system( command, arg, arg, arg)
+ 249999 [perrin@ap th] Are you using commas exactly as shown?  If so, that's probably the
+ 250000 [perrin@ap th] Oh, one other thing -- you're asking this of a Ruby community, not a
  + 250019 [robert.dober] When there are people behaving strangly in nice restaurants one can
  | 250037 [perrin@ap th] Uh, what?  What does a hat have to do with this?
  | 250038 [perrin@ap th] Never mind.  I get it -- the purpose of the metaphor just slipped by me
  + 250023 [dangerwillro] www.perlmonks.org indeed!

[ANN] - Madison Rails meeting May 8th - Amazon Web Services
249998 [rsanheim@gm ] Join the Madison Ruby on Rails group on May 9th at 6 pm for a

Compiling Ruby C extension on windows problem
250001 [harryspier@h] Dear list members,
250005 [nobu@ru y- a] Makefile created with One-click-installer isn't for

Making executable =P
250003 [djahn@xi ti ] Ehm.. noob question though
250004 [list.push@gm] You want to make the exe?
250016 [djahn@xi ti ] but where to? :P
250024 [list.push@gm] What?

threads, dRuby...
250007 [andy.koch@pc] Not sure where to start, so I'll just jump in...
250026 [dido.sevilla] Have you tried running the code locally, i.e. not remotely via druby?Distributed Ruby tends to mask exceptions thrown by the called processin many cases in my experience, and the error you get tends to getobscured by the time it gets to the remote caller. All you know isthat there was an error of some kind, just not what error it was. Ihave a couple of very large projects that use druby extensively, andthis sort of behavior was so frustrating that I've made it a point totest any code intended to be run via drb by executing it locallyfirst, and making sure that error handling is as bulletproof androbust as I can make it. It seems highly unlikely to me that libxml isreally throwing your fireruby exception, more likely it's throwingsome other exception that winds up getting masked as one by the timeit gets to the druby client.

Rubyforge SCM browser not updating
250009 [no.spam@pl a] The RubyForge SCM pages on viewvc.rubyforge.mmmultiworks.com
+ 250012 [tom@in oe he] Matt just did some stuff to speed up ViewVC on that machine, though,
+ 250087 [bauer@mm ul ] In fact something is broken at the moment.

Re: Checking Credit Cards (#122)
250011 [novakps@gm i] Thank you James for another fun quiz.

Testing Thread and sleep
250013 [jfmiller28@y] I'm writing a script that calls an external program using popen.  The
+ 250030 [B.Candler@po] I suggest you post your code; modify it so the process it calls via popen is
| 250106 [jfmiller28@y] return a StringIO like object instead of a new process.  I can test the
| 250159 [B.Candler@po] Hmm, that's not what I meant. I meant the full code, complete with test, so
| 250306 [jfmiller28@y] io = IO.popen('-', 'w+')
+ 250150 [rrafje@gm il] How about using the timeout module?

[QUIZ] #122 Credit Card Validator (solution)
250014 [pvande@gm il] It's a hack job, nothing terribly pretty or well abstracted, but it

Question regarding tr method in Strings Class
250015 [_mwryder@wo ] Is there a way to denote a null in the replacement for a character using
+ 250017 [robert.dober] I do not think this works but why not use the "right" tool for each task
| 250025 [_mwryder@wo ] Your solution is about the same as the solution I found "clumsy".  I can
| 250027 [robert.dober] <cut>
| 250148 [_mwryder@wo ] I find your sig very appropriate.  I can find several ways to clean up a
| 250237 [rick.denatal] Just out of curiosity, what language is that, and how does it make
| 250297 [_mwryder@wo ] I have been using Business Basic professionally for over 25 years after
+ 250020 [botp@de mo t] # in one step.  Besides, if I am going to be removing a lot of
+ 250031 [B.Candler@po] Removing the apostrophe, and replacing it with null, are two different
  250241 [logancapaldo] ...
  250288 [B.Candler@po] Ooh, shiny.

[ANN] Ruby-VPI 16.0.0
250021 [ snk@gn .o g] Ruby-VPI is a Ruby interface to IEEE 1364-2005 Verilog VPI

eclipse aptana and ruby integration.
250032 [music@mu i. ] Is there anyone using eclipse with ruby support?
+ 250033 [szhurik@gm i] ...
+ 250233 [kpumuk@kp mu] I'm using it for a long time and it has all features needed to the
  250363 [music@mu i. ] I've installed aptana for eclipse and then radrails for eclipse,
  250369 [kpumuk@kp mu] Are you sure you are looking for it in the right place? Window/Open
  + 250373 [michael.s.kl] I suggest you try Eclipse DLTK for  Ruby source files (you can install
  | 250427 [music@mu i. ] I'm using eclipse installed from debian packages.
  + 250428 [music@mu i. ] Yes, in perspective/other I can open aptana perspective but there isn't

gem update hangs (yaml slow on big dataset)
250040 [andrewroth@g] I am having a heck of a time trying to get gems working on a ubuntu

parse excel spreadsheet with password
250042 [lovelymmx@gm] I have done quite a lot of diggings, but all I found were examples and
250084 [toddkennethb] "Caution    If a user assigns password protection to a
250163 [lovelymmx@gm] thanks, but what i need is not a password cracker.
250165 [toddkennethb] Yeah, I misunderstood you.  My reading comprehension

Fwd: Ruby Quiz solution
250043 [james@gr yp ] ...

array slicing
250048 [josselin@wa ] given an array
+ 250051 [botp@de mo t] #  anArray.sort {|a,b| a[1] <=> b[1]}
| + 250053 [list.push@gm] Or this :)
| + 250054 [list.push@gm] Thanks for sort_by.
|   250059 [aquasync@gm ] Just using sort won't get the results into nested arrays based on the
+ 250052 [list.push@gm] Try this
+ 250065 [josselin@wa ] found the sort... but how to slice it now ?
| 250066 [josselin@wa ] found a reply from ... (thanks to him...)
+ 250096 [rrafje@gm il] anArray.inject( Hash.new{ |hash, key| hash[key] =[] } ){ |hash,
  250115 [josselin@wa ] good to know , what about the partition_by , it seems simple ?
  250155 [rrafje@gm il] module Enumerable

[SUMMARY] Checking Credit Cards (#122)
250055 [james@gr yp ] This quiz is super easy, of course.  The reason I ran it though is that I wanted
+ 250060 [rick.denatal] I came to this quiz late, but came up with the following, before
| 250069 [leavengood@g] Nice, I like it. When I first thought about using
| 250075 [rick.denatal] 1) Move enumerator to the core classes.
+ 250067 [kazaam@ol co] Means that: no quiz tomorrow ?!?
| 250071 [james@gr yp ] Yes.  I need a short break.  We will have one the following Friday
| 250076 [kazaam@ol co] Maybe someone is interested or has an idea for an unoffical Ruby Quiz
| + 250085 [puria@ne st ] conway's game of life?
| | 250094 [kazaam@ol co] Never heard about it but read now wiki and sounds interesting, so I
| | 250097 [puria@ne st ] pass it as an argument
| | 250101 [kazaam@ol co] (I)
| | 250120 [puria@ne st ] * a glider
| + 250158 [james@gr yp ] Have you worked all 122 quizzes?  ;)
|   250209 [robert.dober] BTW we missed the score of Pascal's half of a hexagon by the numbers
|   250531 [martindemell] I don't think half a hexagon is what you think it is :)
|   250534 [robert.dober] Hmm you think to know what I think, I think you know more than me than ;)
+ 250519 [martin@sn wp] As if you needed further evidence after my third solution to pp

Beyond YAML? (scaling)
250058 [Bil.Kleb@NA ] I've been using YAML files to store hashes of numbers, e.g.,
+ 250061 [james@gr yp ] * If they are just super straightforward lists of numbers like this a
+ 250062 [jcribbs@ne p] Hey, Bil.  If you don't mind a couple of shameless plugs, you might want
| 250088 [Bil.Kleb@NA ] Plain text will be too big -- I've got an n^2 problem.
| 250089 [jcribbs@ne p] Docs are light compared to KirbyBase.  If you  download the
| 250095 [Bil.Kleb@NA ] Roger, I was afraid you'd say that.  :)
+ 250063 [B.Candler@po] Use a SQL database?
| 250093 [Bil.Kleb@NA ] I always suspect that I should be doing that more often,
| 250152 [dangerwillro] Don't be afraid of the database solution. In the long term, it is
+ 250064 [khaines@en g] I guess that depends on whether you need the files to be easily readable
  250078 [Bil.Kleb@NA ] At this point, I'm looking for an easy out that will
  + 250086 [Bil.Kleb@NA ] Well, maybe not so simple...
  | + 250109 [Bil.Kleb@NA ] Is there a better way than,
  | | 250126 [B.Candler@po] samples[tag] ||= []
  | + 250183 [w_a_x_man@ya] Would making a copy of the hash use too much
  |   250201 [Bil.Kleb@NA ] I don't know, but that's surely another way out of
  |   250256 [logancapaldo] ...
  + 250160 [vjoel@pa h. ] What about mmap and pack/unpack, as ara does in
  + 250342 [jeremy@hi eg] If you want to describe your data needs a bit, and what operations you
    250345 [Bil.Kleb@NA ] I've created a small tolerance DSL, and coupled with the Monte Carlo
    + 250346 [matt@te hn r] You're building an Orion?  Please tell me it's not true!
    | 250376 [Bil.Kleb@NA ] No; I should have been more specific..."our Orion vehicle /design/". :)
    + 250547 [jeremy@hi eg] Okay, so I didn't get to it this weekend, but it is an interesting
      250586 [Bil.Kleb@NA ] The input parameter names are static across all cases, but
      + 250597 [robert.dober] Bill, maybe you want to have a look at JSON
      | 250605 [Bil.Kleb@NA ] Neat.  Thanks for the data.  For now though, Marshal
      + 250995 [jeremy@hi eg] Yeah, that's what explains it best for me.