155365-157410 subjects 155783-165976

Re: NDiff (#46)
155543 [meadori@gm i] a b 1.2345 c d
155545 [Bil.Kleb@NA ] That would be a good option, but at this point, all

Mmap crash when appending
155552 [guslist@fr e] [gus@hibernatus Bifurcation]$ cat mmap-abort.rb
+ 155553 [decoux@mo lo] mm = Mmap.new("test-mmap", "rw")
| 155555 [guslist@fr e] It works!
| 155557 [decoux@mo lo] svg% diff -u mmap.c~ mmap.c
+ 155573 [Ara.T.Howard] irb(main):001:0> FileUtils::touch 'mmap'
  155593 [guslist@fr e] Yes, as suggested by Guy, using "rw" instead of "w" fixes the problem,

white out on pulldown options when mouse is over said option
155558 [xeno@es im .] I've got this problem that my mouse options turn completely white (no

Problems building Ruby from source on Windows
155560 [djberg96@gm ] Windows XP Pro
155585 [ggarra@ad an] Not sure about the hanging, but regarding the "lib" error, this points
155589 [djberg96@gm ] Thanks, that was it.  I ran setenv.bat, but for some odd reason it has

I cannot figure out how to set my signature on thunderbird...
155564 [xeno@es im .] I actually had it working with thunderbird on SuSE, but the "signature"
155565 [james@gr yp ] Are you aware that you are posting to a group for the Ruby
155568 [xeno@es im .] Sorry.  I meant to post to Debian.  I must be tired.  Oh boy.
155600 [tim@ve et .a] news.software.readers would be even more on-topic.

Better Random benchmark - need help with profiling
155567 [martialis@bi] I recently started to learn Ruby. I thought that the obviously flawed
+ 155575 [ruby.brian@g] Risking to be burned because I'm somehow helping with the aliot things
| 155607 [martialis@bi] user     system      total        real
| 155608 [ruby.brian@g] $ ruby -v
| 155654 [martialis@bi] You convinced me. I will make a nice looking version. It will still be
+ 155734 [igouy@ya oo ] "Each program should use symbolic constants (or whatever is closest) to

Webrick streaming bodies
155572 [phlipcpp@ya ] def do_GET(req, res)
155703 [gotoyuzo@no ] res.body can take an IO object.
155720 [phlipcpp@ya ] I fear popen. I use Win32. (Not my idea.) It will try to fork, then its
155740 [timsuth@ih g] popen was just an example. The equivalent of std::stringstream is StringIO.
156054 [phlipcpp@ya ] I'm afraid 'std::streamstring' was a red-herring; I'l ask a different way.

RubyGems in 1.8.3?
155590 [ptkwt@ar cn ] Will RubyGems be included as standard equipment in the Ruby 1.8.3 release?

confused by nested functions
155591 [navindra@cs ] Why does the first one work but not the second one?
+ 155603 [meta@po ox c] Ruby doesn't really have nested functions, and "def" is executable code
+ 155606 [twifkak@co c] As mathew said, def is just a command to define a method, it runs when
  + 155624 [dblack@wo bl] I think the private thing depends on lexical scope.  Since the nested
  | 155641 [twifkak@co c] Yo --
  | + 155886 [discordantus] Just a quick note: beware of IRB. when it comes to method and variable
  | + 155910 [dblack@wo bl] $ ruby -e 'def x; end; nil.x'
  |   155912 [twifkak@co c] Blrgh! Thanks, Mark & David. I have been schooled.
  |   155913 [dblack@wo bl] You're not accessing the top-level object's singleton class there,
  |   155914 [twifkak@co c] I, uh... must be tired. Yeah, that's it. I'm going to shut up now. :)
  + 155865 [navindra@cs ] Thanks for the careful explanation, Devin.

Getting "Require" to work, using the Poignant Guide to Ruby
155594 [Ian.Irving@g] In a (doomed?) attempt to actual understand ruby (with my almost 20
+ 155596 [dblack@wo bl] Local variables used in a file you 'require' do not appear in the
+ 155619 [dbatml@gm .d] This is an error in the guide, see
| 155620 [hawkman.gelo] ...
+ 155835 [Ian.Irving@g] Many Thanks for the replys. Problem resolved! by
  155838 [ruby-talk@wh] Becooz I don't like that blue yet.  It buzzes people's eyelids too bad.
  155842 [Ian.Irving@g] Well, as long as it's a good reason...(and that's what style sheets are

r4 - the simplest ruby pre-processor
155601 [Ara.T.Howard] all this talk about pre-processors and erb got me thinking : what would it
+ 155602 [Ara.T.Howard] no
| 155611 [tokikenshi@g] Short and sweet. :-)
+ 155614 [chneukirchen] def macro(name, &block)
| + 155625 [hutch@re ur ] With a tiny change to this you can also use ruby's embedded value
| | 155627 [hutch@re ur ] and lost the dump
| | 155640 [twifkak@co c] And broke it.
| | 155649 [hutch@re ur ] Broke it? Nah, it was already 'broken'. And anyway, that's what I
| | + 155660 [Ara.T.Howard] careful - if you go the
| | | 155664 [hutch@re ur ] Except that '#{' or '`' will be escaped and ignored. Still, point
| | + 155666 [chneukirchen] You broke it because " can't appear as-is in the file anymore.
| |   155670 [Ara.T.Howard] using the -i switch i can interpolate x as #{ x }
| + 155656 [hutch@re ur ] So, playing around a bit more, I've got something that solves a
| + 155665 [Ara.T.Howard] a version which optionally interpolates - six lines, ergo r6
|   155671 [pit@ca it in] Just a minor simplification: ARGF is kind of an Enumerable, so you can
+ 155682 [transfire@gm] Very cool Ara.
  155714 [transfire@gm] exactly think in words, so its not alwasy easy to translate) BUt to
  155742 [dave@bu t. d] I think this is a very cool idea for an interesting debug mode.

Ruby for Pocket PC?
155605 [me@pr st nc ] Just got a Pocket PC. Is there a version of Ruby for Pocket PC that's

Interesting Sentence
155613 [Bil.Kleb@NA ] I just stumbled across this sentence,
155616 [daniel@th mi] ...

newbie mysteries
155621 [tomcloyd@be ] Good morning!
155622 [vanweerd@gm ] Did you use the Window's one-click installer to install ruby? If so,
155623 [hawkman.gelo] ...
155650 [nightphotos@] ...
+ 155655 [hawkman.gelo] ...
+ 155669 [tomcloyd@be ] List and Wayne,
  155672 [pit@ca it in] you can't put the line into a Ruby script because it's not Ruby code.
  155675 [tomcloyd@be ] Nuts. How right you are.
  155678 [nightphotos@] ...
  155681 [tomcloyd@be ] Yeah. As a newbie, I note in ruby documentation a variable neglect of

When an Array is not
155626 [michael@sc u] (1) Under what circumstances is an array not an Array? I'm confronted
155628 [dblack@wo bl] Can you provide a complete (non-)working example?  I can't quite
+ 155630 [calamitas@ad] module M
| + 155631 [dblack@wo bl] Yes, thanks for correcting.  I somehow transmuted the whole thing into
| + 155636 [michael@sc u] I had a nagging suspicion that something like that would be involved.
+ 155635 [michael@sc u] Attached below with resolution. When copying and pasting the minimally

gem & require -> returns false?
155632 [itsme213@ho ] When requiring a gem with
155677 [ptkwt@ar cn ] I've noticed this too.  Mostly you notice it in irb, of course.  Before I
155730 [jim@we ri hh] I'm not seeing this ...
+ 155781 [drbrain@se m] $ cat x.rb
| 155909 [jim@we ri hh] Thanks.  I took a bit to figure out, but here's what is happening.
+ 155811 [ptkwt@ar cn ] Right.
  + 155902 [chrisgame@ex] So where's the code for 'require' so we can work out how it works?
  + 155906 [ts_news1@so ] Sounds like the gem autorequire'd the module for you. Try requiring just

Class.new and extending it...
155633 [enebo@ac .o ] class Base
155634 [decoux@mo lo] def inherited(kl)
155637 [enebo@ac .o ] Thanks!  I have a strange variation on this (using 'inherited') that works

[RFC] The Early Demise of Myriad (Thanks To Ruby Threads)
155638 [zedshaw@ze s] 1)  Ruby/Event becomes completely evil and redefines Thread's initialize so that it throws an exception telling you to not use threads.  Ugh.
+ 155647 [akr@m1 n. rg] Ruby 1.9 allocates fd_set dynamically.  So the FD_SETSIZE restriction
| 155653 [zedshaw@ze s] Thanks, that really helps me decide if I should continue.  FD_SETSIZE in a Ruby implementation that will be done "when it's done" is exactly the information I needed to know that Myriad is worth continuing.
+ 155651 [wink@sa il e] I'm a Ruby newb but have been programming for many years and have been
| + 155695 [rhkramer@gm ] Yes!
| + 155697 [zedshaw@ze s] Hey Wink,
|   155706 [wink@sa il e] Thanks for the feed back and the gotcha's! Let me noodle on this a while
|   155719 [zedshaw@ze s] Actually, this would be the *best* way to do this.  You just register the whole damn pool with the GC and never unregister it.  Then you do your own memory management and control.  The GC is completely cut out of the picture and can't mess with your gear.  The only thing you need to do is just not declare a free function for the ruby object.
|   155727 [wink@sa il e] ...
+ 155668 [chneukirchen] Or,     4) Become a great Ruby hacker and replace the Ruby thread select()
| + 155694 [zedshaw@ze s] This is apparently in the works for Ruby's "whenever-it's-done-version", although I haven't noticed much mention of it other than an occaisional person announced as being charged with doing libevent.
| + 155763 [hgs@dm .a .u] [Performance implication...]
|   155769 [Ara.T.Howard] other than liscense issues - i wonder why not build upon a library which
|   155777 [jos@ca no k.] There's also Sydney which promises to add real POSIX thread support to 1.8.2
+ 155691 [k.wong@la os] This is so depressing for me to hear, I wonder what it must be like for

Reference to super instance
155643 [dannyyuan@gm] Is there a way (or Ruby way?) to get the reference to the super instance
155658 [bob.news@gm ] What do you mean by "super instance"?  Ruby is not C++ - you cannot (and

Re: ] Re: File.mtime <=> DateTime.strptime()
155644 [snowzone5@ho] except when it doesn't :/

ERB and puts/print
155645 [hal9000@hy e] This discussion is interesting, but my solution would be an
155657 [Ara.T.Howard] see the r4 thread ;-)

155659 [daniel.schie] I'm writing a class representing a coordinate system, and I want to be
+ 155661 [james@gr yp ] If the slurpy arrays could be used anywhere in the list, if becomes
| 155667 [daniel.schie] Thanks! That looks a lot better.
+ 155662 [Ara.T.Howard] def []=(*a)
+ 155663 [twifkak@co c] Yes, that would be useful. It has been discussed many-a-time, before,
| 155676 [transfire@gm] I think that you have the right sentiment, but the implemenation isn't
| 155683 [twifkak@co c] 1. Matz has said that he won't implement them. :)
| 155715 [transfire@gm] You make some good points. But it occurs to me that having seperated
| 155718 [twifkak@co c] Yeah, I guess what I'm seeking is a concise way to write that. Maybe
| 155724 [transfire@gm] hmmm....
| 155726 [transfire@gm] def prms(bind,*args)
+ 155688 [eric_mahurin] Coincidentally, I was just writing an RCR for this one.  It is

[ANN] Gambit 0.1.1
155673 [james@gr yp ] Gambit 0.1.1 Released
155685 [matt.mower@g] Really cool that you've released this James.
155686 [james@gr yp ] Sorry about the wait.

IO like object
155674 [SimonKroeger] i have an IO like object (in this case win32 pipes, connected to a child
155692 [alex@de et m] Nice job on finding a solution to unwanted command prompts with popen()
156133 [logancapaldo] Have you considered creating a subclass from IO and defining the
+ 156136 [eric_mahurin] A module defining all other methods based on just would also
+ 156147 [SimonKroeger] 'considered' is the right word. I just don't know which would be the

[ANN] SMC - State Machine Compiler v. 4.2.0 for Ruby
155679 [rapp@ac .o g] SMC - The State Machine Compiler v. 4.2.0

Re: Rio 0.3.4
155680 [itsme213@ho ] What an absolutely lovely piece of work! Thank you!

rubyw.exe not working
155687 [hawkman.gelo] ...
+ 155698 [lyndon.samso] ...
+ 155701 [halostatue@g] Make sure that none of what you're trying to do writes to $stdout or
+ 155716 [curt.hibbs@g] ...
  155732 [hawkman.gelo] ...

Misunderstanding of instance variables
155693 [matthew.moss] I'm learning Rails, and trying to setup image upload in a form. As part
+ 155699 [matthew.moss] I think I understand...  self.content_type is an accessor, I'm
+ 155700 [twifkak@co c] self.content_type = blahblahblah is an invocation of an instance method
  155733 [hal9000@hy e] Chances are, it does some extra housekeeping in addition to merely

new RCRs
155705 [eric_mahurin] 318 easy way(s) to make a duck
155709 [halostatue@g] I'm strongly opposed to this one. David Black has nicely summarised
155713 [eric_mahurin] I think it would be best to post these comments with the RCRs
155753 [halostatue@g] Done. However, note that the RCR site itself encourages discussion in
155762 [eric_mahurin] And all of these have been discussed on ruby-talk - most with a

[Q] how to well-qualify the 2-inherited methods at their collision point
155708 [tshiget1@gw ] dear guys,
+ 155710 [dblack@wo bl] I don't think you can.  However... does this help?
| 155722 [tshiget1@gw ] David, greetings. thank you for your code and adjustment to my
+ 155737 [ mfp@ac .o g] BaseClass.instance_method(:greeting).bind(self).call
  155739 [tshiget1@gw ] greetings, Mauricio. thank you for showing me inside-ruby mechanism.

Re: how to well-qualify the 2-inherited methods at their collision point
155712 [transfire@gm] Perhaps you just wish to pass along the call, i.e.
+ 155725 [tshiget1@gw ] greetings, Trans. than kyou for your good guess.
+ 155773 [lukfugl@gm i] I'm not sure about that conditional... wouldn't that call super (with
  155775 [malte.milatz] => "method"
  155776 [ruby-talk@wh] While ago I dug around the internals to figure out this curious

RoR sessions
155723 [kenfettig@bt] #{@session[:user].userid'} but this causes a Rails error when it tries to
155752 [balcersk@ws ] I have no becouse I'am at work now and can not check it.
156188 [kenfettig@bt] Thank you very much for the help. Could you point me to some good info on

Another Ruby/DL question
155728 [awertyui@gm ] I'm trying to set a wndProc to a block of ruby code because the
155774 [awertyui@gm ] I figured it out. You can't set it to a @instance variable for whatever

[ANN] gmailer 0.1.0
155731 [phasis@bc in] GMailer 0.1.0 Released
+ 155758 [daniel.schie] This little project of yours is growing fast! This is great!
+ 155764 [runlevel7@gm] I'm not up on the gmail spec. Can this be used to implement something
+ 157530 [james_b@ne r] I've found all sorts of neat uses for this code.  Thanks!

website screen scraping with Mechanize or Rubyful Soup
155735 [dan@da ko n.] I'm trying to get some website screen scraping working, but I'm
+ 155736 [lyndon.samso] ...
+ 155760 [james_b@ne r] What are you actually trying to accomplish?
| 155767 [dan@da ko n.] My ultimate goal is to create a series of screen scrapers that are able
| + 155840 [lyndon.samso] ...
| + 155880 [dave.burt@gm] If you can use a Windows box, Watir might be the best-fit.
|   155891 [dan@da ko n.] Looks cool, thanks.  I'm developing on a Windows machine, but plan to
+ 155768 [blaumag@gm i] print "My wife is ", md[1]
  155778 [dan@da ko n.] Thanks, Michel.
  155779 [blaumag@gm i] You're welcome!

XMPP4R 0.1 released
155738 [lucas@lu as ] I'm very pleased to announce the first release of XMPP4R : XMPP4R 0.1.
155765 [chneukirchen] How does it compare to Jabber4r (http://jabber4r.rubyforge.org/)?
155770 [lucas@lu as ] "Jabber4R (projet homepage at Rubyforge) : Not maintained anymore.

Problem with sockets
155741 [pierre.barbi] I was trying to code a scriptable MUD client (following the RubyQuiz
155743 [bob.news@gm ] The first changes I'd do are to use the block form of File.open, use
155757 [pierre.barbi] Well, thanks a lot, I found the error :) And, of course it was not were

script hangs while opening a file from /proc in a thread
155744 [ mig@19 4. z] I have a problem with opening a file under /proc in a thread.
155745 [akr@m1 n. rg] Upgrade the Linux kernel to 2.6.13.

detaching required scripts
155747 [ mig@19 4. z] I was trying to remove required script (plugin) from memory via
+ 155748 [lyndon.samso] ...
+ 155750 [bob.news@gm ] ["socket.so"]
+ 155780 [vjoel@pa h. ] Check out my "script" lib on RAA.

Stupid Newb Question
155751 [doc@do on el] For background only (I think my question is simple): I'm new to ruby,
155754 [bob.news@gm ] You can define constants per class, you can use an existing enum
+ 155755 [doc@do on el] Thanks Robert. Think I'll use class constants for now.
+ 156657 [jlsysinc@al ] I love :symblos

Ruby Weekly News 5th - 11th September 2005
155759 [timsuth@ih g] Ruby Weekly News 5th - 11th September 2005
155814 [christophe.g] Wow! Seeing my name associated to one of the websites I follow most is

Re: The Early Demise of Myriad (Thanks To Ruby Threads)
155771 [rmt512@gm il] As i mentioned I tweaked my chat to use myriad, and it's going a lot

[QUIZ] NDiff (#46)
155782 [jim@fr ez .o] Uhm, where are the solutions?
155785 [james@gr yp ] Only if my email is broken too.  Haven't had time to fiddle with it
155907 [Bil.Kleb@NA ] Sigh, maybe it's just my lame quiz writing skills...
155917 [ruby.brian@g] I really want to do this quiz as it looks quite interesting, but I'm