193176-194645

192901-193640 subjects 193398-196517

^ [OT] First interesting Java development in a while...
193176 [jpshack gmai] Take a look at http://code.google.com/webtoolkit/overview.html. Very
194344 [chneukirchen] I have to admit I'm pretty impressed by

^ Blocks in Procs?
193177 [meshac.ruby ] SGkgYWxsLCBJIGhhdmUgYmVlbiB1c2luZyBhIGxvdCBvZiBQcm9jJ3MgYW5kIGxhbWJkYSdzIGxh
+ 193178 [gwtmp01 mac.] I don't believe you can pass a block argument when calling a Proc.
| 193180 [meshac.ruby ] VGhhbmsgeW91IHZlcnkgbXVjaCBHYXJ5ISAgL21lIGNyb3NzZXMgZmluZ2VycyBmb3Igc3VwcG9y
| 193508 [dave burt.id] It's already there, I think.
+ 193202 [pbattley gma] Is this any use to you?

^ Fwd: Please Forward: Ruby Quiz Submission
193179 [james graypr] charset=US-ASCII;

^ When will the gateway be back?
193187 [rubyfan gmai] I really prefer to read comp.lang.ruby instead of being subscribed to
+ 193206 [shortcutter ] +1
| 193209 [Bil.Kleb NAS] +1
| 193217 [shortcutter ] I think in googlemail you always delete whole threads - if you delete
| + 193239 [Daniel.Berge] I second that!
| + 193255 [lukfugl gmai] Ah, but deleting a thread still only deletes the messages currently in
+ 193257 [khaines enig] is the gateway currently gone simply because of a lack of a machine to run it
  193260 [halostatue g] The gateway is currently gone, as I understand it, because the
  193262 [khaines enig] It's something that I am probably willing to run, if there is a news provider
  193264 [halostatue g] That's the real trick; finding such a news provider. Maybe someone
  193294 [ray warmroom] I'm reading, and responding, to this thread in gmane.comp.lang.ruby.general.
  193297 [halostatue g] Right. But that's a gmane-specific mailing list interface. My
  193364 [pjhyett gmai] Gmail using filters that auto-archive threads (thus bypassing your
  193366 [danielbaird ] I love that about Gmail too.
  193420 [rubyfan gmai] The other thing is that with news I don't get a bunch of stuff

^ Rbfactorings
193192 [daniel flyin] The other day I had an idea - wouldn't it be cool to collect

^ Re: Welcome to our (ruby-talk ML) You are added automatically
193201 [matt.g.brown] #help

^ Capturing stdout
193205 [damphyr free] I have code that prints to stdout (using puts and/or print).
+ 193207 [shortcutter ] You can use popen but then your code is in another process.
| + 193208 [shortcutter ] ...
| + 193213 [damphyr free] Yes, but I can change Kernel#puts :)
|   + 193216 [shortcutter ] You can use a simple mock method for this. See
|   + 193218 [dharple gene] require 'stringio'
|     + 193219 [r.mark.volkm] Here's another alternative.
|     | + 193276 [uncutstone s] I think this is what duck type means. It's really a good example of duck
|     | + 193291 [drbrain segm] How is this better than using StringIO?
|     |   193301 [uncutstone s] IMHO, by using StringIO, you pay for something useless in this case but
|     |   193312 [drbrain segm] You're confusing unused with useless.  I almost never use Hash#index
|     |   193317 [r.mark.volkm] You don't have to add a puts method to the String object in order to
|     |   + 193351 [uncutstone s] Yes, print does the same.
|     |   + 193354 [drbrain segm] The Kernel methods have this behavior, yes, but this is not a general
|     + 193220 [uncutstone s] I am wondering whether Ruby has something similar to C++ stringstream,
+ 193212 [uncutstone s] s = `ruby file1.rb` , you don't need to load file1.rb in .
+ 193221 [a2800276 gma] All you have to do is assign a different IO Object to the global
+ 193289 [sroberts uni] Yes,

^ Method name
193214 [Michael_ee y] I'm looking around, but I didn't find a replacement for c++
193223 [r.mark.volkm] I assume you mean the name of the current method.  Here's one way.
193250 [dave burt.id] Does this work?
193284 [uncutstone s] What if I am at the outmost level?
193293 [miken700 yah] It seems to work properly for me on the outermost level.
193298 [uncutstone s] I mean at the outmost level, you are still execute in a function's

^ Please answer to this code?
193225 [visweshwar_0] can anybody execute it and tell me where i go wrong.please let me know
+ 193228 [has.sox gmai] viswesh,
+ 193229 [miken700 yah] I think you forgot the .chomp on the second gets. This is probably your
| 193232 [visweshwar_0] That's wonderfull quick time replies and iam thankfull for both.
| 193246 [visweshwar_0] can u suggest me how to write a method where both cases are accepted to
| 193287 [miken700 yah] I'm not too sure what you are asking for. Something like this?
| 193380 [visweshwar_0] Thanks for ur time.
| 193384 [phurley gmai] You can use regular expressions for case insensitivity or downcase the
| 193386 [a2800276 gma] Have a quick look at this documentation, it will answer a lot of your
| 193612 [cklaiber gma] viswesh, how about something like this? i'm a bit of a ruby newbie
| 193626 [agorilla gma] Converted to a case statement (because I needed a break from work).
+ 193230 [xiaofeng.li ] You'd get gets.chomp for fine and use fine=="good" for direct comparison.
+ 193236 [gm.vlkv gmai] < Your code
+ 193266 [daniel.schie] puts "what is your name?"
| 193310 [david koontz] list.rb:8: private method `String' called for "David\n":String (NoMethodError)
+ 193372 [xiaofeng.li ] You'd get gets.chomp for fine and use fine=="good" for direct comparison.

^ Weird forking/rejoining issue
193234 [lutzky gmail] I'm a Unix admin at a research lab in the technion, and use (and
193243 [ara.t.howard] do your daemon apparently exited and it doesn't prevent itself from running
193259 [lutzky gmail] hehe... manually, at this point, so that's not it. Excellent point
193277 [ara.t.howard] deleting a job from the queue, forking the child, and adding the cid to the

^ Module, class and methods confusion
193235 [patrick pksp] I have a test harness script that requires module "mhiqErrorLogger".
193240 [rmagick gmai] Just a guess, but should that be
+ 193241 [patrick pksp] ErrorLogger is not a class/module
+ 193242 [shortcutter ] module MHIQErrorLogger
  193245 [patrick pksp] Now I'm confused as to how it should be called...
  193251 [patrick pksp] OK, got it! This works...

^ Print quota management in Ruby?
193238 [lutzky gmail] I'm a unix admin at a lab, and we use Pykota to manage print quotas
193305 [logancapaldo] Oh but you can. Don't share a real printer. Install ghostscript, and

^ Help installing rails
193252 [CMcDevitt aa] charset="us-ascii"
193288 [drbrain segm] Try the rails mailing list.

^ is there "equalsIgnoreCase" in ruby?
193254 [visweshwar_0] Please let me know whether any method similar to ("equalsIgnoreCase" in
+ 193256 [halostatue g] What does equalsIgnoreCase do, and could you not have spent five
+ 193258 [lyle.johnson] Yes, it's called String#casecmp().
  193269 [visweshwar_0] can u please correct the code...
  + 193271 [lyle.johnson] if fine.casecmp("good")
  + 193273 [jmg3000 gmai] See "ri String#casecmp".
  + 193274 [a2800276 gma] you forgot to tell us what you want the program  to do, what it's

^ Need help designing UI
193261 [scottlholmes] I'm working on a user interface and I'm hoping I can get some
+ 193265 [leavengood g] Over the years I'm sure there has been invented countless ways of
| + 193280 [uncutstone s] I think there are two essential design patterns here, one is message
| | 193282 [scottlholmes] Thanks, will google that!
| + 193281 [scottlholmes] Thanks for replying Ryan. This got me thinking about some design goals.
|   193286 [leavengood g] In other words anything starting with a colon. These are unique per
+ 193357 [ilmari.heikk] In a DOM-like system: on clicking the button, it would bubble up aCloseWindow-event, which the Viewer would then catch and close thewindow.
+ 193362 [xavier-list ] Investigate a listener/dispatcher pattern, as used by the Java Swing

^ Rails Install
193263 [CMcDevitt aa] charset="us-ascii"

^ Simple regexp: Matching CRLF in a Windows file
193267 [weyus att.ne] All,
193268 [weyus att.ne] Apparently just matching on \n works.
193278 [dave burt.id] Ruby on Windows automatically replaces \r\n with \n on input and

^ Install Local Gem files
193275 [CMcDevitt aa] charset="us-ascii"

^ load unless requires - what are the ramifications
193290 [todd_run yah] I very new to Ruby (this is my second week), so excuse the "newbieness"
+ 193292 [Daniel.Berge] Some people are nice about letting tests run from the test or parent
+ 193295 [jim weirichh] Oops.  Require will return false if the file is already loaded, not if
  193302 [todd_run yah] You're correct!  Definately not what I want!

^ greatest float smaller than 1.0?
193320 [polypus yaho] how do i get the greatest float smaller than 1.0?
+ 193322 [a2800276 gma] Analysis?
+ 193323 [collinsj sea] 0.999999999999999 ?
| + 193325 [garbagecat10] I'd expect it to be platform-dependent. I also think this is one of those
| | 193328 [ mfp acm.org] f = (1.0 - Float::EPSILON)             # => 1.0
| + 193326 [polypus yaho] i mean is there some portable way of getting the value via some method
|   193327 [garbagecat10] From the rand(3) manpage: "The  rand()  function  returns  a  pseudo-random
+ 193329 [vjoel path.b] Something like this maybe?
| + 193331 [garbagecat10] Floating point libraries are really weird and platform-dependent, especiall=
| | 193339 [gilesb gmail] yeah -- this is actually playing with fire, really.
| + 193332 [vjoel path.b] That was completely wrong, please ignore.
|   + 193333 [garbagecat10] Without knowing your hardware and software, I can only guess, but when you
|   | + 193334 [Nuralanur ao] If you look into some numerics book , like the one by Stoer and  Burlisch,
|   | + 193369 [dido.sevilla] The technical term for this unfortunate situation is significance
|   |   + 193371 [Nuralanur ao] I fully agree with you. I'd like to add that there is, among others,
|   |   + 194503 [lutzky gmail] By the way, the problem in your question lies with calculus. Fact is, in
|   |     194504 [lutzky gmail] Pardon, you were looking for the other direction :)
|   + 193337 [ mfp acm.org] oops
+ 193348 [logancapaldo] 1.0 - Float::EPSILON
| 193363 [taschini.mli] The right answer is that of Mauricio
+ 194523 [robert.dober] I agree with the answers that this question is dangerous and meaningless

^ Ruby for Rails Rocks!
193335 [pollak gmail] Folks,
194634 [Eric.Armstro] I have to add my kudos, as well. It's a spectacular effort.
194645 [gilesb gmail] ditto, it's very good

^ bm + net/http sanity check
193340 [steve.debaun] Hey all,
+ 193344 [a2800276 gma] Maybe consider the relative delta. The GET request should take quite a
+ 193345 [sroberts uni] Why not? Sounds ok, setting up, using, and closing down a tcp line
  193346 [steve.debaun] Sorry, I should have clarified; I'm benchmarking the same site (server,
  193347 [steve.debaun] Ah ha, that makes more sense.  It didn't occur to me that it would take
  193352 [ruby philip.] get() should just download the one page.  It's not going to download the

^ Asynchronous calls in DRb
193353 [madan.manoha] I am thinking about writing a distributed application in Ruby where the
+ 193355 [drbrain segm] Throw away your magnifying glass, you're looking too hard.
| 193360 [uncutstone s] Yes, it is quite easy to implement asynchronous call using thread. Here
+ 193358 [binary42 gma] Yes. It is actually more simple that you think (Ruby is more magic
+ 193547 [madan.manoha] -Madan.

^ Is there an equivalent to instance_eval in JavaScript?
193356 [drjflam gmai] Thanks,
193365 [m-lists bris] No, I don't think so. But you can probably add it.
193390 [drjflam gmai] Thanks, Marcus! I'll let you know if some corner cases crop up (my

^ pcap library install on windows without c compiler
193361 [maddern gmai] I need to find a gem or simple installer for the pcap library for
193376 [Nuralanur ao] Does this help you ?
193491 [maddern gmai] Not really I need to use
193519 [Nuralanur ao] OK. The "./configure make..make install" installation process is  something
193546 [halostatue g] Better to use MINGW/MSYS than Cygwin. Cygwin is ... not a good choice
193550 [Nuralanur ao] I've heard of MINGW, but not installed it on my system - Cygwin  drives
193554 [halostatue g] It doesn't pretend to be Unix. It provides a shell and a compiler that

^ alias_method
193367 [limux 126.co] module ActiveRecordExtension
193373 [decoux moulo] You want probably alias with instance_eval

^ Make a revised version of design patterns in ruby
193368 [uncutstone s] Ruby is highly dynamic and extensible. Ruby is duck typed. Interface
+ 193377 [shortcutter ] That might be an interesting thing to do.
| 193413 [uncutstone s] Yes, you are right. Class WidegetFactory is unnecessary. So an simpler
+ 193416 [gene.tani gm] ...
  193427 [uncutstone s] Acctually, I did took a look at ExampleDesignPatternsInRuby
  193432 [jim weirichh] The way I understood the examle is that "create_something" IS the
  + 193433 [jim weirichh] Oops, Let me correct this.  I see that the create_something does not
  + 193501 [uncutstone s] Ah, it seems I misunderstood something. I think the name

^ WEBLOG in RUBY.. Can u help me?
193375 [alkhezzi hot] Can you help me in writing (or finding an already written) code to read
+ 193387 [masukomi gma] just as a note. You are going to really confuse people if you call that a
+ 193388 [peter semant] Well the standard tool for web server log analysis is analog

^ Command Line Processing / Pipes
193379 [Stuart.Holde] I'm trying to create a script that that is flexible enough to accept
+ 193383 [chris.hulan ] The following works on Win2k with ruby 1.8.2 (2004-12-25) [i386-mswin32]
| 193400 [Stuart.Holde] Sorry, I forgot about 'cat' being a non-standard cmd. It's on this
| + 193434 [chris.hulan ] type subseq.rb | ruby pipe-test.rb
| + 193437 [aledonne.lis] type input.txt | ruby parser.rb
|   + 193493 [caldridge gm] It's getting to ruby if a ruby exception is being thrown.
|   + 193517 [pit capitain] type r.rb | r.rb
|     193521 [Stuart.Holde] Yes, when I explicitly call ruby rather than rely on the file
+ 193402 [shortcutter ] CYGWIN_NT-5.2-WOW64 PDBXPWSRK38 1.5.19(0.150/4/2) 2006-01-20 13:28 i686 Cygwin
  193407 [Stuart.Holde] The one liners mentioned below both work for me. I encounter the

^ instance variables for Fixnum?
193381 [pascal_hurni] irb(main):001:0> 1.instance_variable_set(:@foo, 123)
193382 [daniel.schie] Almost everything in Ruby is an object -- even Fixnums. There is only
193385 [pascal_hurni] Yes, that's ok

^ [OT] Partial functions?
193389 [Daniel.Berge] I'm trying to understand a new feature of Python 2.5 (PEP 309) called
+ 193391 [JoeBowers bc] Partials are great for deferring part of a computation
| + 193412 [madan.manoha] Yesterday* Brian Mitchell *introduced me to the work of *MenTaLguY* where h=
| | 193651 [binary42 gma] I did introduce that but it isn't quite right to call them the same
| + 193485 [grzm seespot] I've been keen to learn more about closures, but haven't made the
+ 193392 [kiaroskuro g] the partial function binds one of the arguments of that function, so that
+ 193393 [keith oreill] Hey,
| 193395 [simon.kroege] gem install rubymurray
+ 193396 [maurice.codi] languages (ex, ML automatically curries for you).

^ Re: [SUMMARY] Tab Player (#79)
193394 [rossrt rosco] Putting aside the musical theme for a moment, this quiz boiled down to a
193787 [james graypr] Thanks so much Ross.  Great summary!

^ Rescue clauses on do/end blocks?
193397 [daniel.schie] I know this has been on the table before, but I really see no reason not
+ 193399 [shortcutter ] Go for it!
| 193415 [daniel.schie] Alrighty then!
+ 193401 [jgbailey gma] I've tried that syntax myself and been surprised when it failed. It seems
+ 193404 [rossrt rosco] File.open('somefile') do |f|
| + 193409 [daniel.schie] The same as there would now; since the rescue clause is not inside the
| | 193423 [rossrt rosco] Does that mean that with the proposed syntax, to rescue an exception
| | + 193430 [daniel.schie] As I imagine it right now, rescue clauses on do/end blocks would only
| | | 193440 [jesusrubsyou] I agree with Daniel.  It should only rescue exceptions raised in the
| | + 193524 [shortcutter ] No.  You still decide where to catch the exception.  You can do it
| + 193421 [uncutstone s] What if rescue has more than one sentence? It seems not a good idea.
|   193426 [uncutstone s] File.open('somefile') do |f|
|   + 193431 [daniel.schie] File.open('pr0n') do |f|
|   + 193478 [matz ruby-la] Which do you expect from above code?
|     + 193480 [halostatue g] I expect (a), personally. The only thing that could confuse it is the
|     | 193482 [matz ruby-la] If (a) is the case, the value from the rescue clause is used for a
|     + 193498 [uncutstone s] I expect case a. Sorry I didn't carefully check the code I gave,  "Can't
|     + 193527 [shortcutter ] Hm, I beg to differ: the "rescue" is *inside* the block so it can
|       193537 [daniel.schie] I'm on the same page as Robert -- I didn't even think of rescuing
+ 193428 [halostatue g] foo {
| 193444 [daniel.schie] I think it looks too odd. The do/end and the curly bracket syntaxes are
| + 193455 [dblack wobbl] I'm not sure I get that distinction -- I mean, I understand that you
| | 193459 [daniel.schie] Maybe it's time we make that distinction. From a syntactical point of
| | + 193464 [drbrain segm] parse.y disagrees with you.
| | | 193472 [daniel.schie] That's implementation. We ought to be able to abstract away from that,
| | | + 193474 [drbrain segm] No, ruby itself directly contradicts you.  The language defines only
| | | + 193476 [halostatue g] Yes, but as I said -- and I know you haven't seen it as I'm writing it
| | + 193475 [halostatue g] Blocks are blocks. Stylistically, some people prefer braces, some
| |   193538 [daniel.schie] Personally, I wouldn't mind a distinction between the two. Maybe an
| + 193458 [drbrain segm] Not true.  do/end and {/} are interchangeable except you may need to
| + 193473 [halostatue g] No, they're not used in different places, not really.
+ 193435 [drbrain segm] Setting up and tearing down an exception handler for every block
  + 193436 [jim weirichh] Couldn't the setup/teardown be done only if a rescue/ensure clause was
  | 193462 [drbrain segm] charset=US-ASCII;
  + 193445 [daniel.schie] Wouldn't it be possible to only set up an exception handler for blocks
  + 193486 [hal9000 hype] I guess I assumed that it would only do the setup if the rescue
    193500 [drbrain segm] I misremembered what AST would be built.  The setup only occurs when
threads.html
top