168719-173263 subjects 169082-171160

^ limiting how long a method is permiited to run
168905 [briankbuckle] Is there a means of limiting how long a method is permiited to run?  I
+ 168907 [bob_showalte] ...
+ 168908 [decoux moulo] Well, you have timeout.rb in the standard distribution
| 168931 [pfharlock ya] fork, (as it doesn't work on windows), is there a way to timeout either
+ 168929 [leavengood g] require 'timeout'
  168935 [briankbuckle] Sweet!  I added in *args and it seems to do exactly what I was looking for.

^ [ANN] FireRuby 0.4.1
168906 [paw220470 ya] FireRuby 0.4.1

^ [tk] Equivalent to Perl's Tk::Tiler?
168918 [fkc_email-ne] I making arbitrarily large forms and in doing similar in Perl, I've
169227 [nagai ai.kyu] I don't know Perl's Tk::Tiler. Is it the one like the following?
169376 [fkc_email-ne] So I get the following error when running it (latest stable 1 click installer on windows xp)
169467 [nagai ai.kyu] Oh, sorry. The method is available ruby-1.8.2 or later.
169995 [fkc_email-ne] Now it displays a window briefly and then segfaults, both on win XP and win 2K
170138 [nagai ai.kyu] When do you get SEGV? Before displaying Tk window?
170336 [fkc_email-ne] Pretty much immediately after I see the tk window.

^ a todo list
168919 [smasala gmai] did a tutorial on ruby on rails site, however the edit isnt working
+ 168927 [jeff.darklig] <%=3D link_to("Edit", :action =3D> "edit", :id =3D> @tasklists.id) %>
| 168933 [smasala gmai] thanx that was the error
+ 168936 [rforum gmail] What you've done (just to expand on *why* it doesn't work) is you've
  168939 [jeff.darklig] Actually, your information is a bit off-center.  Although yes, the current
  + 168942 [smasala gmai] hmm no i cant get something else to work
  | 168970 [greg.kujawa ] You closed your controller method with def...end but not the
  | 168973 [lukfugl gmai] Well not necessarily at the end of the code. It should be added in
  | 169092 [greg.kujawa ] Gotcha. Didn't mean to confuse anyone with the suggestion. In his
  + 168947 [rforum gmail] Right.  And it's smart enough to not just blindly call id on what's
    168950 [rforum gmail] <%= link_to 'Test on AR instance', :action => 'show', :id => @foo %>
    168969 [steve waits.] Thanks for your message about Ruby on Rails.  I think you'll find

^ Colorized Ruby Source Listings/Printing
168920 [phurley gmai] I guess I am just old fashion, but sometimes when I am working on
+ 168923 [tom infoethe] ot=rubygems&content-type=text/vnd.viewcvs-markup
+ 168924 [kyosuke sezn] Scite is quite fine for me... ;-)
| 168937 [phurley gmai] FYI, I just notice scite has a -p command line option to print and
+ 168926 [neil hakubi.] Vim can output highlighted text as html, which you could then print.  It
| + 168932 [keith oreill] Because it took me a while to figure out what Neil was saying, here's a
| | 168954 [mailing-list] This is probably not the thing he was talking about.  Just issue
| + 168938 [mailing-list] And Im working on providing an XML-based generic output-format that can
+ 168966 [ruby.brian g] xemacs -nw -eval '(htmlize-file "$<" "$@")' -kill
+ 168976 [gene.tani gm] TMTOWTDI (but not as bad as python)
+ 169075 [d454d web.de] Currently I use jEdit together with Robs plugin for editing Ruby code

^ [OT] desktop apps vs. web applications (was Re: What a response!)
168930 [joevandyk gm] When should an application be a web application (that could be
+ 168934 [jeff.darklig] Graphical intensity & Privacy/Location of data are the questions that
+ 168967 [ef alum.mit.] =20

^ Determining endianness in extconf.rb
168941 [aaron_patter] I am writing an extension for Ruby in C, and I need to determine
168948 [Daniel.Berge] # extconf.rb
+ 168953 [aaron_patter] Thank you for the help!
+ 169051 [nobuyoshi.na] It tells the endian of the running platform, but not of the
  169193 [aaron_patter] I guess I don't understand how I am supposed to set up my build
  169213 [guslist free] That's because you are on Intel, which is little endian.

^ http://www.inkdroid.org/journal/2005/12/02/code4lib-2006/
168943 [pat.eyler gm] For those of you working on Library or Library related stuff, this link
168944 [pat.eyler gm] Doh!   Andy and inkdroid are different people, Ed is Inkdroid, but he's
168951 [Daniel.Berge] Oh, library as in "books & stuff", not "code library".  I wondered why it was
168952 [pat.eyler gm] heh.

^ add a task to todo
168945 [smasala gmai] hmm no i cant get something else to work
+ 168946 [drbrain segm] Can you please take your Rails questions to the Rails mailing list?
+ 168959 [lukfugl gmai] In general, I agree with Eric Hodel, you need to take Rails questions

^ RDOC for Ruby standard libs
168955 [asivitz ober] I think I have RDOC installed fine (Gentoo Linux), as the command "ri
168965 [james_b neur] No.

^ Interactive browser/IDE for Ruby
168956 [mark.ericson] I'm sure this has been asked before on this list...  I was wondering if
168968 [jeff.darklig] Actually, I'd love to see something like IRB that would let you play like
169333 [spoooq gmail] This isnt going to be practical until we have ruby-in-ruby. Lots of

^ String split drops the delimiter
168958 [basi_lio hot] data = " This is a declarative sentence. And is this a question? Yes! "
+ 168960 [jim freeze.o] Use ().
+ 168962 [james graypr] split() can be asked to include it, though it puts it in a separate
+ 168964 [bob_showalte] puts data.scan(/\S.*?[.!?]/)
  168981 [basi_lio hot] This works for me.
  169045 [neoneye gmai] anternatively
  169056 [basi_lio hot] irb(main):369:0> data
  169058 [neoneye gmai] data.scan(/(?:"[^"]*?"|[^.?!])*[.?!]\s?/)
  169065 [basi_lio hot] Thanks for supplying the last piece of "my" puzzle. It is much

^ Re: desktop apps vs. web applications (was Re: What a response!)
168961 [dabhar1959 h] Excellent question. I'll be interested to see the responses.

^ Shuffling an array, sort_by{rand}'s bias (was Re: need some Ruby magic)
168963 [ mfp acm.org] array size  P(#rand() collision)
+ 168975 [steve waits.] It's considerably slower.  Changing it to sort { rand(10000) <=> 5000 }
| 169302 [hmassa gmail] Why not
| + 169305 [ruby.brian g] What are you all trying to achieve by variations of
| + 169309 [michael.ulm ] What you have posted does not avoid collisions.
| | 169315 [ruby.brian g] and then he should do us a favour and write
| + 169327 [steve waits.] Because it's the slowest version I've tested.  See the rest of the
+ 168977 [ara.t.howard] the big difference is that a value will have rand called multiple times for it
| 169077 [ mfp acm.org] That might be the very reason why it is ultimately much more biased than
| 169089 [michael.ulm ] Indeed,
+ 169120 [chneukirchen] And that is a good thing?  How can the sequence be "random" if it
  169150 [ mfp acm.org] Nah, I misread genrand_real; the above shows it is possible.

^ Perl's DBI::quote functionality?
168978 [akonsu gmail] does anyone know of any modules that would allow me to "prepare" sql
+ 168982 [vanek acd.ne] ...
| 168986 [akonsu gmail] thanks. is this a part of rails?
| 168987 [gregory.t.br] ActiveRecord can be used with or without rails.  It is in rails by
+ 168988 [caleb aei-te] Did you check out ruby-dbi?
+ 169030 [halostatue g] Yes. DBI#quote.

^ Are my metaprogramming underpants showing?
168980 [M.B.Smillie ] I've done a quick little project to see if I can wrap my head around
168983 [james_b neur] A suggestion: move the code that munges method_id and *params into
169005 [M.B.Smillie ] Done, with a due sense of embarrassment since I as soon as I started
169022 [transfire gm] The whole class as method thing seems very odd.n I suspect there's a
169039 [M.B.Smillie ] Matthew Smillie            <M.B.Smillie@sms.ed.ac.uk>
169048 [transfire gm] Ah, I see. Okay. I'm too tired to go into tonight, but I get back to
169252 [transfire gm] Sorry I didn't get to this until this evening. Hope it's helpful. -T.
169457 [M.B.Smillie ] Noone's in a hurry over here, so no worries.
169489 [transfire gm] Hmm.... that does make it trickier b/c when will the chain end? The
169517 [daniels pron] Considering that there seems to be at least one mandatory argument
+ 169526 [transfire gm] Daniel...
+ 169630 [M.B.Smillie ] Maybe this makes me sound thick, but then again, enlightenment is the
  169638 [transfire gm] I don't think there is neccessarily. Functor's just the completely
  169727 [daniels pron] charset="iso-8859-1"
  169769 [M.B.Smillie ] Good idea, since a conflict would break the whole thing.

^ Subclassing Class.
168989 [john.carter ] Ok. This is a wild idea.
+ 168990 [aredridel nb] class Foo
| + 168996 [dblack wobbl] Is there any chance of stemming the tide of nicknames and coined synonyms
| | 169033 [john.carter ] Hmm. It's perfectly standard mathematical terminology for an operator A,
| | + 169038 [dblack wobbl] So are thousands of other usages of "eigen" :-)  But I'm not arguing for
| | | 169076 [rosco roscop] Absolutely. Which I would suggest is 'very little', if only because there
| | + 169102 [martindemell] The mathematical usage draws on the German word for "own", as does
| |   169110 [dblack wobbl] A lot of the usage I've seen is from newcomers who see the term used by
| |   169123 [gwtmp01 mac.] Isn't that pretty much how all new jargon comes into being, by being
| |   169129 [dblack wobbl] I know -- I've done it myself.  I've never hesitated to use neologisms in
| |   + 169131 [dblack wobbl] Oh, you know.  Short-term, or some synonym for it :-)
| |   | 169158 [nightphotos ] I just wanted to chime in that I totally agree with your position
| |   + 169154 [gwtmp01 mac.] With all due respect to Matz, I think Ruby is now much more than the
| |   | 169164 [dblack wobbl] Let's not pass over the sentence right after the one you quoted either :-)
| |   | 169189 [gwtmp01 mac.] Yeah, I should have acknowledged that in my response, but I didn't
| |   | + 169201 [dblack wobbl] Matz is, by his account, a "benevolent dictator" :-)  It's a great
| |   | + 169204 [dblack wobbl] Just to clarify that sentence you didn't understand: it was in response to
| |   + 169156 [gwtmp01 mac.] I do see your point.  Keep the wordsmithing to the threads that are
| + 169003 [transfire gm] In this context it is generally called the metaclass. But I'm really
| + 169029 [john.carter ] Err. Right.
|   + 169041 [nightphotos ] I agree with you.  I once heard Eric Evans (author of the _best_
|   + 169066 [pit capitain] John, I'm not sure what you really need, but I think that the singleton
|     169079 [rosco roscop] [rosco@jukebox ruby]$ ruby oneninetest.rb
|     169083 [pit capitain] Thanks for the info, Ross. I remember vaguely that something about the
+ 168991 [logancapaldo] Why are you trying so hard?
+ 169012 [surrender_it] given that people already told you about overriding Class#new, I won't
  169024 [john.carter ] Add state and polymorphic behaviour, not to the object, but the

^ Speed Golf - Remove Early Dups
168992 [gavin refine] SUMMARY
+ 168997 [akonsu gmail] perhaps in.reverse!.uniq!.reverse!   ?
| 168999 [akonsu gmail] i meant in.reverse.uniq!.reverse! (the first reverse is non-destructive)
| + 169025 [gavin refine] Array#uniq! can return nil if no changes were made. This will not
| + 169032 [dbatml gmx.d] from (irb):3
+ 169004 [w_a_x_man ya] In = ["i", "v", "w", "e", "l", "d", "u", "f", "e", "v", "f", "e",
| 169006 [akonsu gmail] does this have a quadratic time complexity? doing this by sorting might
| 169019 [gavin refine] Quadratic? No. The suggested algorithms are O(2n) or O(3n).
| 169060 [akonsu gmail] i do not see why not. this is almost exactly a bubble sort. which is in
| 169090 [gavin refine] It's not an arbitrary re-sorting of all the elements involved. The
| 169186 [akonsu gmail] my reasoning was that the code loops over the array and on every
+ 169035 [dblack wobbl] This entry is not in contention on shortness or speed (don't even bother

^ Overloaded constructors in Ruby
168993 [kheon comcas] I have a class that I want to have a number of overloaded constructors for.
+ 168998 [akonsu gmail] i believe the way to do it is to use names parameters and/or default
| 169002 [ces.fci gmai] ...
+ 169016 [cyclists nc.] Actually, defining default values for arguments is a very "Ruby" way of
| 169143 [sam.s.kong g] I guess you forgot a line, right?
+ 169020 [transfire gm] Timothy makes good points, but just so you understand how to write
+ 169062 [ptkwt aracne] def GravPoint.from_x_y_strength(x,y,strength)

^ how best to handle errors in object instaintiation (sp ?)
169000 [r.fulton auc] I'm new to Ruby and still trying to figure out how best to do things
169011 [cyclists nc.] You don't really have any choice. The return value from 'new' is an
169241 [halostatue g] Hm, no, that's not quite right ;)

^ CLOSING SHOP! XML:Tools, bindings for libxml and libxslt
169010 [transfire gm] It my sad task to inform all those interested that I will no long be
+ 169026 [halostatue g] I recommend putting these on RubyForge with an equivalent notice to
+ 169028 [james_b neur] I'm happy to host what you have on rubyxml.com, though I cannot offer to
  169088 [transfire gm] Thanks.
  + 169115 [james_b neur] Um, if you need a name to go with the project, sure.   But I haven't
  + 169118 [rosco roscop] Without knowing what's involved, I'm not sure how much help I can be, but
    169139 [transfire gm] Ross,
    169144 [rosco roscop] I've kept taking my C out for a walk on other projects, so hopefully it'll
    169152 [transfire gm] Ross, contact me via private email. I tried the return address your

^ Re: how best to handle errors in object instaintiation (sp ?
169021 [r.fulton auc] Great, that's what I thought but I wanted to make sure.  None of the

^ Qt Ruby Bindings in Ubuntu?
169023 [ghuntress co] I know this is more of an ubuntu and apt-get problem but I thought maybe
169037 [tsumeruby ts] If this were #debian, you'd be trolled out the channel for using synaptic..
169040 [ghuntress co] You can see in my original post that I did try exactly the command line you
+ 169044 [wrongside gm] I think the package you want is only available in the most recent
+ 169059 [tsumeruby ts] doh! *flogs self*

^ xmlrpc: 500 internal server error
169027 [fugalh gmail] #!/usr/bin/ruby

^ [rails][ruby talk] Localization woes
169049 [dan.bikle gm] People,
+ 169055 [james_b neur] You will get better, faster, help for Rails at
| 169068 [joevandyk gm] This seems to be a yaml / webrick issue though, and not a rails one.
| 169112 [james_b neur] My apolgies.
+ 170151 [dan.bikle gm] People,

^ rflickr
169052 [n8agrinster ] hey all, i'm looking for anyone out there who is using rflickr to access th=
195166 [ingoweiss gm] I know this was a while ago but did you get rflickr to work for your
195285 [masukomi gma] I'm pretty sure i did get it to work, although i was using it almost
195288 [ingoweiss gm] Thanks!!

^ getting around access control
169057 [ara.t.howard] i know there is a way to do this - but how
+ 169061 [vjoel path.b] irb(main):012:0>   c.instance_eval{ p send(:meth) }
| 169063 [ara.t.howard] yeah - it's quite strange.  unfortunately the 'send' approach won't work
| + 169064 [vjoel path.b] delegate(@controller).instance_eval do ... end
| + 169078 [rosco roscop] I actually really like Ruby's notion of private - just that you can't call
| + 169106 [gene.tani gm] Anyway, i think the 'send' of private methods is / will be changed in
|   + 169121 [rosco roscop] <possible stupid question>
|   | 169130 [ara.t.howard] try your example with 'protected'.
|   | 169138 [rosco roscop] irb(main):025:0> class ClzThree
|   | 169140 [ara.t.howard] yeah...  technically that works.  what i'm doing is having handlered register
|   | + 169141 [lukfugl gmai] Good points, especially the last one. Since all public methods of a
|   | + 169147 [rosco roscop] Phew - I was worried I'd missed a huge part of that section for a moment :)
|   + 169136 [ara.t.howard] doesn't look like it....
+ 169067 [nobuyoshi.na] Hmmm, it seems to have changed unintentionally, together with
  169132 [ara.t.howard] i personally think instance_eval should be able to call both protected and
  + 169134 [james graypr] I agree.
  + 169137 [lukfugl gmai] Well, one thing you can do for now is not worry about altering the

^ Ruby Weekly News 28th November - 4th December 2005
169070 [timsuth ihug] Ruby Weekly News 28th November - 4th December 2005
169071 [timsuth ihug] ...

^ [ANN] ruby-mp3info 0.5
169074 [moumar___AT_] ruby-mp3info gives you access to low level informations on mp3 files

^ Ruby Event Manager / Scheduler
169080 [bpotier gmai] In the scope of a project management tool development, we would need to
169142 [leavengood g] I have considered writing a cron-like system in pure Ruby, as it would
+ 169145 [james graypr] Have you seen Daedalus?
| + 169151 [leavengood g] Yes, but that just makes sure that processes are kept running. It
| + 169261 [bpotier gmai] Thanks for the hint on runt, I'll sure have a look at it
+ 169148 [ara.t.howard] this would help