185245-186500
185026-187395 subjects 185443-186507
^ Round floats to N decimal places?
185245 [pergesu gmai] I'm doing some math that results in floats with ~10 decimal places,
+ 185247 [vjoel path.b] (the_float*100).round/100.0 is probably a bit faster... you might want
| + 185251 [vjoel path.b] Oops. I got the benchmark labels backwards. Strings are slower. Here's
| + 185261 [dave burt.id] Facets adds Numeric#round_at(d) and round_to(n).
+ 186245 [karl_brodows] You should consider if you want to work with Float, Integer, BigDecimal
^ Is this a kind of design patterns?
185254 [sam.s.kong g] Sometimes a class provides object instantiation methods other than new.
+ 185256 [killy-kun wa] isn't that the facory design pattern ?
| 185257 [danielbaird ] The truth is, as a ganeral rule the original G4 design patterns were kinda
+ 185268 [bob.news gmx] Since you invoke a class's method "new" like any other method of any
| + 185333 [sam.s.kong g] This looks tricky and wonderful.
| + 185348 [jim weirichh] I was thinking along the same lines, but I do like the method interface
| + 185362 [r.mark.volkm] Is there any difference between the above code and this?
| | 185531 [robert.dober] No, not at my knowledge
| + 185400 [vjoel path.b] And this is tantamount to dependency injection. For example, with my
| + 185502 [bob.news gmx] IMHO this is not thread safe. If you need the method interface, you
| + 185504 [robert.dober] let us wrap
| + 185530 [jim weirichh] I did catch the smiley. :)
| 185533 [bob.news gmx] Since we're in Color anyway, you can simplify the definition that by
| 185560 [jim weirichh] I like that.
| 185565 [pertl gmx.or] I got great improvements to make color usage enterprise ready...
+ 185277 [wilsonb gmai] That's the "Factory Method" pattern. It's handy when you want
+ 185330 [sam.s.kong g] At first I thought so.
| 185335 [pertl gmx.or] method, that creates a object,
| + 185349 [jim weirichh] The value of patterns is the vocabulary it gives to developers.
| + 185350 [sam.s.kong g] You may be right.
+ 185351 [jim weirichh] Hmmm ... It's not the GOF Factory Method pattern. It doesn't even solve
^ Net::HTTP timeout
185259 [alexandru gl] Is there a way to set the timout limit that affects Net::HTTP ?
+ 185264 [bobgus rcn.c] You could search the source for '60'. And/or 'Timeout::Error'
| 185266 [alexandru gl] Well, I was hoping for a more ruby-like ideea .set_timeout() or something
+ 185278 [aglarond gma] Have you tried the following?
+ 185515 [chesschintan] Use Time Out block.
+ 185517 [alexandru gl] Thank you all for your help!
^ Ruby HTML Tools - ruby-htmltools Examples
185260 [josephlsmyth] I have searched a lot of sites and newsgroups on the best approach to
+ 185539 [jesusrubsyou] Posted via http://www.ruby-forum.com/.
+ 185744 [james_b neur] I use Mechanize to grab content from several Cafe Press sites and
^ I need a Ruby U.I Designer
185265 [alexander.pe] Any of you guys worked with JSF, Eclipse and Ruby? I need to hire a User
^ Net::HTTP when server doesn' exists ???
185270 [pere.noel la] server exists, document exists
^ Ruby performance
185273 [ksader gmail] I'm considering using Ruby to re-write and extract, transform, and
+ 185274 [pat.eyler gm] Write it in Ruby, then if you have performance issues -- profile,
| 185275 [se digitale-] Unless he uses Perl::Inline :)
| 185279 [pat.eyler gm] You'd still have to use Perl ;^)
+ 185280 [bob.news gmx] Usually client tool performance is shadowed by DB performance and
185356 [rhkramer gma] Of course ;-)
185363 [emk.lists gm] By an interesting coincidence, Rails sites tend to support about 30
185414 [reid.thompso] Simple test, ran from
^ Amazing Prices for Ruby Books on Amazon
185281 [seanacarley ] The pickaxe is available on Amazon for $28.32 USD right now and Learn to
185289 [syarus gmail] <http://www.nerdbooks.com/item.php?id=0974514055>
185321 [reid.thompso] save a tree, buy the searchable, updated, PDF --
^ Reading from standard error
185282 [thiago.arrai] Maybe this one has already been answered somewhere. If so, my
+ 185315 [Pierre.Barbi] rd,wt = IO.pipe # Prepare the pipe to get the output
+ 185343 [vjoel path.b] require 'open3'
^ questions/suggestions from a Ruby newbie
185284 [Diego.Viraso] first of all let me say I really really like Ruby, and I look forward
+ 185286 [dblack wobbl] Cool!
| + 185291 [bob.news gmx] Also, it's not too difficult to write a multi dimensional array class.
| + 185597 [joevandyk gm] That's a hella confusing paragraph, especially that last sentence.
| 185599 [dblack wobbl] I'm surprised you find the first sentence clearer than the second, at
+ 185292 [bob.news gmx] Not that I heard of. It doesn't sound like it was too difficult to
+ 185303 [rossrt rosco] I don't think this is doable with things as they are, since Ruby's
| 185369 [Diego.Viraso] Yes, thank you. I tried something like this before sending the post but
| + 185426 [matz ruby-la] ruby-core list is a good place to discuss about the proposal. We'd
| + 185428 [matthew.moss] => Matrix[[1, 2, 3], [4, 5, 6], [7, 8, 9]]
| | 185430 [matthew.moss] Ooops, nevermind. I didn't actually test []=. Apologies.
| + 185444 [dblack wobbl] I'm sure we can help you fix it if you want to post it.
+ 185413 [SimonKroeger] Welcome Diego,
+ 185440 [Diego.Viraso] I am really sorry. I was not meaning to say how the language should be
+ 185451 [dblack wobbl] This message is in MIME format. The first part should be readable text,
185501 [pit capitain] David, is this really working for you?
185598 [dblack wobbl] Oh, I knew someone would find a problem with it :-) I think that's
^ rdoc -> chm file failing
185288 [mirek.rusin ] my name is Mirek, I'm Pythonist, just newbie to Ruby.
^ Noob question about layout in FXRuby
185300 [apwing zonne] I am new to Ruby as well as FXRuby.
185373 [meinrad.rech] its overridden by your layout hints. use LAYOUT_FIX_X|LAYOUT_FIX_Y if
+ 185377 [meinrad.rech] ...
+ 185522 [apwing zonne] Thanks!
^ FreeRide - How to Input Data
185306 [wk3462 att.c] New to Ruby and using the FreeRIDE IDE. I tried to run the following
185366 [wk3462 att.c] Forgot to mention the platform being Windows XP.
^ basic question...
185307 [mopthisandth] Suppose "OOO.csv" is a data file with 9 columns, and I want to create a
+ 185309 [alder.green ] Iterate over OOO.csv's lines, split each line as you wish (probably
+ 185310 [bob.news gmx] <kidding>This is a Ruby and not a Basic group.</kidding>
+ 185316 [james graypr] 000.csv trim_columns.rb
^ Seeking some of that old-time Smalltalk religion
185308 [drjflam gmai] I know there are some Smalltalk folks who hang out here, so I'd like to pos=
+ 185313 [bob.news gmx] <disclaimer>Not being a Smalltalk guy myself...</disclaimer>
| 185452 [drjflam gmai] Whoops - that's right. Is it possible to persist Ruby's AST as well as the
| 185456 [drbrain segm] ParseTree can be used with Ruby2Ruby to persist some of the AST.
| 185484 [drjflam gmai] I forgot about ParseTree - thanks for making it!
+ 185437 [noone nowher] I think Self and Squeak are pioneers in live design, but I find them a little
+ 185442 [nospam gmail] The short answer is light years away. Go over to
^ why doesn't "to_s" DWIM?
185317 [christopher.] How come to_s doesn't work here?
+ 185320 [dblack wobbl] Inside the inner each block, you're just doing a local (re)assignment
+ 185322 [farrel.lifso] You might want to look at Array#map
+ 185323 [rossrt rosco] Each just iterates the items, and the 'items' argument to the block is a
| + 185346 [christopher.] Thanks, I knew it had to be something like that.
| + 185368 [listen marcr] a = ["haha", "hihi", "hoho"]
| + 185374 [listen marcr] aoa = [[1,2,3],[4,5,6]]
| + 185417 [rossrt rosco] True, this is why the updated code I and others posted mostly retained
+ 185324 [peter semant] I'm not really sure what you are expecting to happen here. aoa.each will
^ A DMG for Macosx Tiger.
185319 [gorter9 xs4a] I want to learn programming from the beginning and i choosen to start
185326 [james graypr] TextMate does not install the mate command, until you ask it to. Try
185331 [gorter9 xs4a] That works i now did all the hings below.
185334 [james graypr] You're leaving the land of your Mac GUI my friend. ;) Try opening
185337 [gorter9 xs4a] Thanks
185796 [benjohn fysh] If you're starting from the beginning, you'd probably do really well
^ scope issue of variable in iterator
185327 [mkhan lextra] mkhan@mkhan:~$ irb
185328 [r.mark.volkm] It's true that blocks introduce a new scope.
+ 185345 [bob.news gmx] .... like in other programming languages as well.
+ 185477 [dlandrith ma] about this block posted by Mohammad Khan
185723 [beeplove gma] When we are enjoying the freedom of using variable without
185728 [bob.news gmx] What exactly are you trying to convey? I don't see how the absence of
185765 [beeplove gma] Let me correct myself,
+ 185767 [dblack wobbl] This has been discussed endlessly over the years on this list and
+ 186113 [bob.news gmx] sum = 0
186116 [ mfp acm.org] Not really; item being block-scoped wouldn't preclude access to other local
186142 [bob.news gmx] Seems like a rare thing to do. This is another thing you cannot do with
186170 [beeplove gma] last = nil
186500 [erik hollens] Regardless of where it's used, ruby does not have dynamic scoping
^ How to make readline work in IRB?
185329 [rhkramer gma] I did mention this in another thread, but (I think) think I've learned a
185347 [vjoel path.b] You may need the devel version of the package, so the readline headers
185357 [rhkramer gma] Joel,
+ 185359 [steve waits.] Also thought I'd just throw in that readline depends on ncurses.
+ 185360 [collinsj sea] For LE2005 there are a couple packages: libreadline4-devel and
^ A syntax question about nested 'each' blocks
185332 [stephen.tash] Would someone explain the syntax of nested blocs vis-a-vis the use of
185336 [cohen.jeff g] Your code works for me, but I had to first replace the }} with ) at the
+ 185338 [stephen.tash] Thanks. My code works for me too, with your corrections! But does it
| 185344 [bob.news gmx] Yes.
+ 185339 [stephen.tash] last_name = Array.new[] %w{ Groster Riplaid Pewley Lundrund Banks}
185342 [stephen.tash] .... or rather
185352 [jim weirichh] last_name = Array.[] *%w{ Groster Riplaid Pewley Lundrund Banks }
^ Re: Programming challenge: wildcard exclusion in cartesian products
185341 [dthierbach u] [Had to drop alt.comp.lang.haskell, otherwise my newsserver doesn't accept it]
+ 185422 [wkehowski co] "And it doesn't really matter what language you use to implement this
| 185495 [dthierbach u] A classic is "Introduction to automata theory, languages and computation"
+ 185512 [dinko.tenev ] Given the requirements, did you mean taking the *union* and swapping
185556 [dthierbach u] Whatever the requirements were. Take your pick. :-)
185576 [dinko.tenev ] OK :)
+ 185594 [wkehowski co] Call a wc 'free' if it satisfies the propery that every letter 'a' in
| + 185680 [dinko.tenev ] There would be no difference for single patterns, but I'm not sure into
| + 185731 [dthierbach u] Would '*ab*' be free or anchored?
+ 185661 [dthierbach u] But you cannot get rid of this. Consider S = {a, b}, W = {a}.
185673 [dinko.tenev ] Yes, but then, they are in the target set. The point here is whether
185709 [dthierbach u] [One cannot escape exponential behaviour]
185757 [dinko.tenev ] [A lot of stuff]
185833 [dthierbach u] Maybe it would help to just take a concrete example, and work through
186211 [funkyj gmail] Going in a slightly different direction ...
186227 [cfc shell01.] Yes, there is literature on the generating side of the regular
186420 [funkyj gmail] If the language is Sigma* (rather than Sigma^n in the original post)
^ [ANN] mogilefs-1.0.1
185355 [drbrain segm] == About
185358 [ezmobius gma] Awesome Eric Thanks!
^ Return code of process from IO
185367 [farrel.lifso] I'm using IO.popen to communicate with an external process. At some
185370 [farrel.lifso] Just solved it. Just run Process.wait after the call to the IO.popen
185387 [ null void.0] #!/usr/bin/ruby
+ 185392 [farrel.lifso] Yeah that can be a problem, but luckily I'm not using any threads so
+ 185396 [ null void.0] This should work in a mt env.
185404 [ null void.0] that should be #{Process.waitpid2(p.pid)[1].exitstatus}
^ Ruby history
185372 [cschweitzer ] I am writing a report on the language Ruby, and I was wondering if
185378 [Daniel.Berge] You may want to email Matz directly to request that information. I
+ 185384 [dishmael win] I thought there was a way to compile Ruby into an executable (similar, but
| + 185390 [Daniel.Berge] I believe you're thinking of either exerb or rubyscriptexe, which only work for
| | 185399 [dishmael win] Yep, I just went back and looked, its just a collector: RubyScript2Exe. My
| + 185395 [timothy.s.be] I remember finding a way to package a Ruby program in an executable,
+ 185403 [cschweitzer ] Thank you very much for your help...do you know how to contact Matz
185415 [agorilla gma] Well, he reads this list, so there's a fair chance he'll see this
185416 [steve waits.] And while you're waiting to hear from Matz, check this out, if you
185572 [cschweitzer ] Thank you all very much. I might ask a question about how to write an
^ [ANN] XmlStruct-1.0.0 released
185379 [aldursys gma] XmlStruct
185391 [jgbailey gma] Have you seen the xml builder project? It's along the same lines but gives =
185434 [zdennis mkte] I don't like the reuse of xml inside of each of the blocks. IIRC it is why I dislike the CGI library. Visually it looks like
^ duplicate keys in a Hash
185382 [briankbuckle] In the code below it appears Ruby is permitting duplicate keys. What's
+ 185419 [rossrt rosco] {}.eql? {}
+ 185424 [emk.lists gm] The two empty hashes are equal, but they're not the same empty hash,
^ Best way to slurp a file into a string?
185383 [weyus att.ne] All,
+ 185385 [Daniel.Berge] IO.read(@document.path)
| 185389 [weyus att.ne] Isn't it better to do the block thing so that the file gets closed,
| + 185393 [weyus att.ne] I see that IO.read takes care of that.
| + 185394 [Daniel.Berge] Nope. No need to worry about that with IO.read. It's not returning an open
+ 185603 [skhisma gmai] Personally File.read makes more sense to me than IO.read... But i've
^ Introspection of method parameters
185398 [ksader gmail] I'm trying to find out the number and name of a method's parameters.
+ 185402 [dishmael win] Try this ...
| 185406 [ksader gmail] Ok, I tried that and it gets me to where I am now, I can see the
| + 185410 [r.mark.volkm] Both can be answered using the arity method in the class Method.
| + 185411 [ mfp acm.org] RUBY_VERSION # => "1.8.4"
| + 185412 [dishmael win] Try this ...
+ 185425 [rossrt rosco] method arguments, though with some limitations (no C methods, no
^ Re: Space Merchant (#71)
185401 [pfharlock ya] This is awsome. I've been thinking about writing a tradewars server for
185487 [timothy.s.be] I dunno about continuing with this as a quiz, but I think it'd be
185523 [semmons99 gm] I would be willing to help. I have been thinking for months on a way to
^ Ruby IPC In an OpenMosix Cluster
185418 [the.liberal.] I'm undertaking a project that will eventually become a processing
185420 [ara.t.howard] i recently built a system __exactly__ like this for noaa. it's built upon
185441 [the.liberal.] Right on, Ara. Thanks for your input!
+ 185473 [the.liberal.] Ok, so I went back and actually read through the entire rq article this
| 185493 [ara.t.howard] yup this would defintely push the limits __unless__ you can batch them. i'm
| 185596 [the.liberal.] Not sure if this is an option yet.
+ 185492 [ara.t.howard] hmmm. not quite clear on what you are asking - but we regularly add and
185595 [the.liberal.] No, actually I really just spat out the wrong question before I read
^ Freeride on winxp doesn't capture output
185433 [fake address] I have Freeride 0.9.5. I if have a script like 'puts "hello"', save it,
185475 [ml.chibbs gm] Curt
185524 [fake address] I tried, but it didn't make any difference. Nothing new happened. Not
185654 [billb ti.com] I am basically having the same problem. With the standalone version I
^ bug in YAML for Ruby?
185436 [haazmatt gma] I'm getting some strange behavior with YAML in ruby regarding the
+ 185446 [dharple gene] It is not a bug, but it is confusing. According the the YAML spec[1]
+ 185447 [vjoel path.b] I think so. The quotes are needed to disambiguate the string "01" from
+ 185450 [logancapaldo] Well just guessing here, but you don't have to quote 08 because it
^ bug: segfault when using super and method_missing
185438 [bhilton vpop] The following code produces a segfault with ruby-1.8.4 from gentoo,
+ 185448 [matz ruby-la] A bug was in super without any argument. The patch attached should
| 185454 [bhilton vpop] Thanks for your help and the quick patch!
+ 185449 [vjoel path.b] It's ok on
185453 [matz ruby-la] It happens only on CVS top.
threads.html
top