5091-5698 subjects 5480-5974

Errata for Ruby Book?
5310 [jon@ka ji co] Does anyone have a URL for the errata for the Ruby Book?
+ 5311 [yashi@ya hi ] it's on www.ruby-lang.org :)
| + 5312 [jon@ka ji co] Thanks for the URL. I did ask him, but he didn't know.
| + 5316 [jon@ka ji co] The Ruby Book errata concerns editions earlier than either the Xerox I
+ 5317 [matz@ze ab t] I believe the Xerox is correct this case.  So I think comma in the

Redefining super method as singleton?
5318 [feldt@ce ch ] class Super
5320 [matz@ze ab t] class Super
5328 [feldt@ce ch ] # -> "Super#m\nSub#m\ns.m\n"
5333 [matz@ze ab t] No, you can't.  You can't tweak ancestors' hierarchy.

Ideas for speeding up profile?
5319 [feldt@ce ch ] I'm doing some profiling and find the execution time

Typo in Ruby Home Page?
5323 [phasis@ch nn] I noticed a typo in http://www.ruby-lang.org/en/index.html a few days ago.
5324 [matz@ze ab t] It's a typo.  Thank you.

Ruby vs PHP ?
5329 [bamberga@ti ] I was going to learn PHP, when I found an article (the first in Italy i
+ 5330 [hal9000@hy e] I don't know PHP, but Guy Hurst knows it well...
| 5334 [gnhurst@hu s] I have been working with PHP for over three years, and with Ruby
+ 5332 [knu@id em ns] First of all, PHP is characterized as an embedded language in HTML
  + 5337 [gnhurst@hu s] Actually, this is not accurate, because functionality does not
  | + 5341 [knu@id em ns] Admittedly.  I only saw PHP from a linguistic/grammatical point of
  | + 5374 [skol@sb x. u] is there a module that supports that in perl?
  |   5455 [bamberga@ti ] Thanks to everyone in this thread :)
  + 5343 [matju@ca .o ] I must say PHP3 is the first "OO-supporting" language I've ever seen
    5344 [knu@id em ns] I was talking about PHP4, which has more developed OO support.

Unit testing network code?
5331 [hgs@dm .a .u] Can someone give me pointers on how to Unit Test code that is run on
5362 [matju@ca .o ] This seems to be heavily architecture-dependent. Maybe there could be an
+ 5375 [hgs@dm .a .u] Yes, it could be, but the problems will arise with different networks
+ 5377 [trinexus@on ] being
  5390 [hgs@dm .a .u] Thank you.  I have had a look at this, and it looks good.  I think a
  5456 [hgs@dm .a .u] Having dug about on the net for this, I think I did have this about right.

string streams in Ruby?
5335 [hgs@dm .a .u] Is there any way, without going through "modifying the internals",
+ 5336 [hgs@dm .a .u] While I should not followup my own posts, I meant that
+ 5338 [Dave@th ma e] Depending on your circumstances, you could change your code to read the
+ 5339 [matz@ze ab t] It depends on how much your input string should look like a file.
| 5340 [hgs@dm .a .u] Thank you, Dave and Matz, both interesing approaches.  I'll look at
+ 5359 [c.hintze@gm ] I do not know whether this is what you search, but I had implemented a
  5376 [hgs@dm .a .u] This sounds interesting.  I think this would be a good thing to add

Is Ruby "enough better"?
5346 [Gabriel.Lima] First of all, please don't flame me, or misinterpret my question.  I am
+ 5347 [jimm@er s. o] Then don't. If Python (or whatever) meets your needs, stick with it. I'm
+ 5348 [Dave@th ma e] I'm not sure that this question can be answered--it seems like a
| 5367 [Gabriel.Lima] I really didn't want for others to make the decision for me at all.
+ 5349 [yue207@ho e.] This seems a question comparing the virtue of OOP and
| 5356 [matju@ca .o ] Well, AFAIK, OOP never promised me anything.
| 5358 [schneik@us i] The answer largely depends on your interests and needs.
+ 5351 [yashi@ya hi ] I guess it all depends on what you want to do with and what you need.
+ 5371 [c.hintze@gm ] I cannot add much more to the answers posted so far. I was also coming
+ 5372 [frido@q- of ] What is noticeable better? Is it a more minimalistic language, is it

Object method scope
5350 [ChrisM@SN LL] I'm new to Ruby, going through the online User's guide. The "More on methods
5353 [gotoken@ma h] % ruby -ve 'def a; end; self.a'
5354 [ChrisM@SN LL] Is there a 1.6.1 compiled for Win32? I don't remember seeing it, but I'm a
+ 5355 [Dave@th ma e] I'm coming into this thread late, so I'm probably missing the point,
+ 5357 [gotoken@ma h] There are no official ports for win32 though, there are some compiled
  5378 [ChrisM@SN LL] Thanks for all the sample code -- that helps a lot.
  5380 [Dave@th ma e] That's it exactly.

applying unit testing to ruby?
5361 [matju@ca .o ] It would be nice to have a number of unit tests for Ruby internals
5363 [Dave@th ma e] Funny you should say that...
+ 5370 [schneik@us i] Dave Thomas writes,
| 5379 [Dave@th ma e] I wanted to check for major functionality changes in the
+ 5389 [green@Fr eB ] Cool :)  Let me know if you want any help getting rid of Linux dependencies
  5393 [ChrisM@SN LL] Dave,
  5394 [Dave@th ma e] Yup, I use RubyUnit, and subclassed it to give me some summary
  5395 [aleksi.nieme] Although it was for Dave, I might answer. Yes, they are using, but they've

Allowing *ary's in the middle of a camma separated list
5364 [knu@id em ns] I was writing some script and wanted to do the following thing, but it
5365 [matz@ze ab t] How about this?
5373 [knu@id em ns] options, of course ;)
+ 5381 [matz@ze ab t] It's consistent with the right hand side of assignment.  Well, let me
| + 5382 [hipster@xs a] An asterisk at other places than the end sounds ok, just need to count
| | 5384 [hipster@xs a] Sorry, this is another issue... I was thinking about multiple
| | 5385 [aleksi.nieme] I think we should change only multiple right hand side (or mrhs in parse.y),
| | 5386 [knu@id em ns] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | 5387 [decoux@mo lo] I know nothing about ruby, but you just need to change args no ?
| + 5383 [decoux@mo lo] Perhaps I'm wrong but I think the request was only when you call a proc,
+ 5388 [green@Fr eB ] I ran into this problem last week, and my workaround was to change a little
  5391 [aleksi.nieme] Well, to begin with, your statement about yourself is a school example of
  5392 [decoux@mo lo] I've tried this but it don't work :-)
  5396 [aleksi.nieme] That's true. On this case I'd like to make somewhat more extensive testing

The Dave & Andy Book
5397 [DDouthitt@cu] What is the schedule like now for the publication of Dave and Andy's book?  And what's the schedule for the publication of the English translation of matz's book?
5398 [Dave@th ma e] The first couple of hundred copies will be shipped from the printer
5399 [faatdilac@my] Which exhibitor sells this book, please?
5400 [Dave@th ma e] Addison-Wesley have a booth which will be selling it. There's
5470 [faatdilac@my] Is the signing scheduled?
5472 [Dave@th ma e] The last we heard, it may be Tuesday 2:30-3:30, but that might

rb_gc_mark error message
5401 [feldt@ce ch ] Anyone got ideas on what could cause the following error message;
+ 5402 [aleksi.nieme] Haven't used NArray, so can't say anything for that.
+ 5403 [shugo@ru y- ] "[BUG]" means that it is the bug of ruby or extension libraries.
  5448 [shugo@ru y- ] OK.
  5453 [feldt@ce ch ] I didn't do this in one of my extensions so this might be the cause of my

Object.foo, setters and so on
5404 [hal9000@hy e] ...
5406 [yashi@ya hi ] nop
+ 5407 [matz@ze ab t] Yes.  But setter should always be public.  I'll fix this.
| 5411 [shugo@ru y- ] Do you mean that I'll be able to call private setters like this?
| 5414 [matz@ze ab t] No.  I meant top-level setter like
| 5416 [shugo@ru y- ] Is this Object#foo= public method?
| 5417 [matz@ze ab t] It will be in 1.6.2 (or the latest CVS).
| 5450 [shugo@ru y- ] $ ruby-cvs -S irb
| 5463 [matz@ze ab t] I don't feel it's inconsistent (see `initialize').  It's a matter of
| 5492 [shugo@ru y- ] I prefer b because I don't like implicit method visibility
| 5496 [yashi@ya hi ] I asked shugo a few questions on irc just now.  it turns out that all
+ 5410 [hal9000@hy e] What does this entry in the FAQ mean?
  5412 [Dave@th ma e] say you have
  5413 [hal9000@hy e] Ahh. So we're not talking about the toplevel. Thanks.

Path for requires statements
5405 [chrismo@ho e] Newbie alert: ruby can't find the file I'm referring to in a require
+ 5408 [matz@ze ab t] % ruby -e 'p $LOAD_PATH'
+ 5409 [Dave@th ma e] The default path to search is set when Ruby is installed, and includes
+ 5415 [hipster@xs a] Also remember that the file required has to have a `.rb' extension (or
  5418 [hipster@xs a] s/first/last/
  5419 [ChrisM@SN LL] That's the ticket. Thanks, Dave.
  5420 [hal9000@hy e] Hmm... would it be reasonable to have the interpreter automatically

File.expand_path(), second arg?
5421 [hgs@dm .a .u] brains hgs 33 %> ruby -v -e 'File.expand_path("finder.rb", nil)'
5430 [yashi@ya hi ] 1.4.6 doesn't work either.  i think the problem is implicit
5454 [hgs@dm .a .u] This patch didn't work for me but my change to the file is below.

Trouble setting up Ruby on Win98
5422 [aschneiderma] I'd like to start playing with Ruby, but I'm having trouble sorting out
5423 [hal9000@hy e] Anders is right. Some of this stuff is hard to find, out of date, or
5428 [schneik@us i] Speaking of hard to find, how about quoting things you are referring to
5474 [aleksi.nieme] I'm sorry I can't help you here by offering a complete solution, and I have
+ 5476 [schneik@us i] # > I'd like to start playing with Ruby, but I'm having trouble
| 5477 [Dave@th ma e] Actually, there's better news than that, but I'll let Andy make the
| 5481 [schneik@us i] # > Hopefully much of this sort of information will soon find its way into
+ 5523 [aschneiderma] Thanks very much for this information; this is just what I was looking
  + 5524 [aschneiderma] I think that's called an MS Freudian Slip:  too many hours spent
  + 5525 [Dave@th ma e] I'll take you up on that. If you can send me plain text, I'll massage

Class instance variables?
5424 [hal9000@hy e] Hoping someone can shed some light on something.
5446 [matz@ze ab t] Note "class instance variables" are mere instance variables which

Ruby Book Eng. tl, 9.8.11 -- seishitsu ? 
5425 [jon@ka ji co] What should I use in English for  (seishitsu) here?
+ 5426 [yashi@ya hi ] how about 'characteristic'
+ 5427 [crouton@we t] I think
  5429 [jon@ka ji co] Thanks for the input.
  + 5431 [manamist@wh ] I read this sentence first in Japanese to find
  + 5432 [yashi@ya hi ] close.  but not right. i don't know what 'this function' in the above
  | 5433 [jon@ka ji co] Help greatly appreciated. So unless I hear screaming and hollering,
  | + 5436 [yashi@ya hi ] i guess i gotta scream and holler. ;p
  | | 5438 [jon@ka ji co] Just in the nick of time!
  | | 5441 [yashi@ya hi ] oops, I didn't read this one before I went out for food..
  | | 5449 [yashi@ya hi ] and that one looks bad :(
  | | + 5461 [thucdat@ho m] Do you consult "The Elements of Style" by White and Strunk?
  | | | 5465 [jon@ka ji co] Yes, but only in memory.  I was looking fondly at my old, worn out
  | | + 5462 [jon@ka ji co] [ Due to the nature of C, there is no there is no need to fetch the 2nd
  | |   + 5464 [hgs@dm .a .u] I think the clarity is reduced by the double negative.
  | |   | 5467 [jon@ka ji co] Yes. Much better. Thanks.
  | |   + 5466 [jon@ka ji co] [ Due to the nature of C, there is no there is no need to fetch the 2nd
  | + 5439 [yashi@ya hi ] Jon, could you wait at least a day, so that everyone on the list has a
  |   5440 [jon@ka ji co] Will do.
  + 5447 [matz@ze ab t] SugHimsi's comment in [ruby-talk:5431] is correct.  Translation should

WANTED: rd2mgp
5434 [rubikitch@ru] Does someone make `rd2mgp', which translates RD to MagicPoint?
5435 [crouton@we t] Visit http://www.mew.org/mgp/ :-P

Editor recommandations?
5437 [chrismo@ho e] Any recommendations on editors for Ruby script on Windows?
+ 5442 [schneik@us i] # Any recommendations on editors for Ruby script on Windows?
+ 5443 [Dave@th ma e] Uh oh. A religious question...
| 5444 [ms@ia ta e. ] Cool idea - but doesn't happen for me for some reason.  I'm in ruby mode
| 5445 [Dave@th ma e] (defun ruby-xmp-region (reg-start reg-end)
| 5451 [hipster@xs a] map <M-F10> :!ruby -r xmp -n -e 'xmp($_, "\%l\t\t\# \%r\n")'<CR>
| 5452 [schneik@us i] # >
| + 5457 [ms@ia ta e. ] Um ... as it seems to be my lot in life to ask all the stupid questions,
| + 5458 [decoux@mo lo] perhaps it's better to use $LOAD_PATH
| + 5459 [Dave@th ma e] Is there a standard Ruby distribution?
|   5460 [gotoken@ma h] A stupid guy (aka Gotoken) adopted a cute patch [ruby-talk:3755] after
|   5473 [schneik@us i] # > Since this is something every Ruby unit should always have on tap, how
+ 5693 [wy2lam@un er] There are many programmer's editors for Windows, however the only free ones are
  5695 [gnhurst@hu s] I just recently downloaded a binary for emacs on Windows.
  5724 [wy2lam@un er] There are several versions of binaries for Windows.  One that is compiled using

For x in (1..20)
5468 [artswan@kt .] Using for x in (1..20) format for fixed repeating of a task is
5469 [Dave@th ma e] 10.times { |x|

2 ideas from Haskell
5471 [ms@ia ta e. ] 1. a "literate mode" that assumes all lines in a script are comments
+ 5475 [hal9000@hy e] Hmmm... not on my Top Ten list of features. I think =begin/=end are
| + 5478 [schneik@us i] # >
| | 5494 [matju@ca .o ] (0..18).skip(2)
| | 5495 [aleksi.nieme] While you have pretty good idea here, don't forget that .succ is has been
| | 5556 [matju@ca .o ] class Object
| + 5503 [mslagell@ia ] I have to disagree there: the =begin/=end scheme distinguishes comments
|   + 5504 [hgs@dm .a .u] But then you have to look for a leading > or whatever, instead of a
|   + 5507 [hal9000@hy e] See below...
|     + 5510 [ms@ia ta e. ] You're right. The file extender is a Haskell convention, and as I think
|     + 5511 [hipster@xs a] #!/usr/bin/ruby -w
|       5518 [ms@ia ta e. ] Michel, that works nicely, thanks.
+ 5513 [Dave@th ma e] This is an interesting concept. It's interesting because it assumes
  5515 [ms@ia ta e. ] I'm not basing any of this on an assumption that all or even most source
  + 5517 [schneik@us i] # >
  + 5519 [Dave@th ma e] True, but then you're writing a document, not Ruby, and you're using
    5533 [ms@ia ta e. ] Ok.  I wouldn't ask students to submit homework in that form, but the
    5535 [Dave@th ma e] # extract the name and SSN from the blurble record
    5536 [jon@ka ji co] But I wonder how you would evaluate the _pedagogic_ value that writing

Some newbye question
5479 [marchign@di ] I am reading the documentation I found about ruby but several points
+ 5482 [Dave@th ma e] It can be confusing, but it's also a benefit. It allows blocks to be
| 5483 [marchign@di ] Probably my question was not clear, I was not talking about a. For sure,
| 5485 [matz@ze ab t] It is necessary.  For example
| + 5486 [Dave@th ma e] But turning this around, I think the question was why do block
| | 5497 [matz@ze ab t] (a) I don't like variable overriding, especially in declaration-less
| | 5498 [aleksi.nieme] It seems, matz, that you valuate variable non-overridingness more than
| | 5499 [matz@ze ab t] In a word, yes.  I want block parameters be left side expression of
| + 5487 [marchign@di ] I agree, this is the right way. But again my question is different (see
|   5488 [aleksi.nieme] I think I'm reading your question wrongly, but it seems you have a mistake
+ 5500 [cle@qi o. oc] Do you mean, why b remains accessible? You are stumbled about the
  + 5501 [decoux@mo lo] This is the difference between local variable and dynamic variable. See
  | 5502 [aleksi.nieme] And if someone else wants to civilize himself too, here's a link to what's
  + 5514 [marchign@di ] First thanks to everybody for the numerous answers.
    5516 [decoux@mo lo] How do you resolve this ?
    + 5531 [matz@ze ab t] (1) local variables in the block parameters be valid only in the
    | + 5537 [gnhurst@hu s] I'm not an expert in this realm, but it seems to me that since this
    | + 5541 [decoux@mo lo] pigeon% ruby -e '%a'
    | | + 5548 [gnhurst@hu s] Actually, I realized later that using '%' would conflict
    | | + 5752 [decoux@mo lo] I see 2 problems with your idea
    | |   + 5780 [gnhurst@hu s] Hmm. Could you explain what you mean more?
    | |   + 5785 [decoux@mo lo] def block
    | + 5543 [Dave@th ma e] If I had a vote, I'd go for this one, as it seems cleanest.
    | + 5544 [marchign@di ] I think that this thread got really long (and maybe for someone also
    | + 5545 [decoux@mo lo] OK, but how many script do you break ?
    |   + 5546 [Dave@th ma e] I don't know--I agree it's a problem.
    |   + 5547 [decoux@mo lo] I prefer this rather than the original proposition (1)
    |     5549 [mslagell@ia ] As Dave says, params are really placeholders; they behave as pronouns as
    + 5532 [decoux@mo lo] If I've well understood, this is easy. This is just to have
      5534 [matz@ze ab t] Well, current interpreter does not handle overridden local variables.