36933-37690 subjects 37282-39335

Recursing thru directories?
37127 [bcox@vi tu l] Could someone please provide the ruby idiom for visiting each file in
+ 37129 [Dave@Pr gm t] require "find"
+ 37130 [matz@ru y- a] How about

OT: Cool Open Source request
37132 [Dave@Pr gm t] I need some help. I've been roped in to talking about open source, and
+ 37134 [msassak@sp a] Are you looking for any kind of application, or just ones with
| 37138 [Dave@Pr gm t] Anything, but probably lesser-known within the community.
+ 37204 [toddg@ma l. ] Help us out with the intended audience!  To whom are you presenting?
  + 37205 [jim@fr ez .o] Just check out the ports collection of FreeBSD. 9.999% are open source.
  | 37214 [brailsmt@ya ] What about the other 90.001%?
  | 37223 [jim@fr ez .o] Woops, those misplaced decimal points can really cause
  + 37206 [gonzo@qr -s ] Just saw a good documentary not too long about this subject...

Automating CVS
37141 [web2ed@ya oo] Is there a Ruby API to CVS?
37142 [gnhurst@hu s] Guy N. Hurst

re-extending object
37143 [edsin@sw s. ] whailer% cat state_test.rb
37153 [decoux@mo lo] Why you don't use a State pattern ?
37156 [edsin@sw s. ] Thanx for the snippet, I used similar scheme, but without automated
37157 [decoux@mo lo] When you call #include or #extend, ruby first check if the module exist in
37158 [edsin@sw s. ] Yes, I've seen this in rb_include_module. But if you look at *my*
37159 [decoux@mo lo] Here your example

mod_ruby installers for Windows?
37145 [sean@ch tt n] Anyone know of any?  Anyone have any luck compiling mod_ruby under

Trying to build eRuby under windows with GCC
37146 [philip@dy as] I'm new to Ruby, so please bear with me through dumb questions :).
+ 37149 [nobu.nokada@] You can use mingw32 version.
| 37150 [philip@dy as] Thanks a lot,
| 37151 [eban@os ri .] You need to update Cygwin 1.3.7 or later.
+ 37220 [lucid@us rs ] Borland provide a free download of C++ Compiler v5.5 from their website,

April 1
37154 [artem@fr it ] ...

37155 [repeater@lu ] i've seen some posts previously mentioning apollo, the delphi libary ruby

How can I Remove me from this group?
37165 [liu@nc i. lm] How can I Remove me from this group?

Various Ruby RPMs available for Red Hat Linux 7.2
37178 [ian@go gl .c] For those who use the RPM packaging system, binary and source RPMs of
37336 [mwg@fl ff .i] Is there any Debian package repository ? Their main rep. does not have

It's April...
37181 [Dave@Pr gm t] www.cpan.org

Sun Microsystems Buys Rights to Ruby
37182 [james@ru yx ] I'm surprised nobody in the list has mentioned this.  I read in a ZDNet
37192 [hal9000@hy e] I mean, does the ZDNet note exist or did you make it up? If it exists,
+ 37194 [james@ru yx ] Well, I never meta-joke I didn't like ...
+ 37200 [jason@at es ] Date check ...
  37202 [hal9000@hy e] ZDNet
  37218 [gehlker@fa t] Oh my God! Ruby is dead. Oh well, back to Java... ;)

Ruby 21 Days arrived
37186 [james@ru yx ] UPS just dropped off Learn Ruby in 21 Days.
37190 [hal9000@hy e] Congrats to Mark indeed. Got mine yesterday.
37678 [ms@ia ta e. ] Thanks - I've been out of town and just now am able to respond to this.

Ruby Weekly News
37189 [Dave@Pr gm t] Ruby Weekly News: 04/01/2002
37203 [pabs@pa lo r] I just thought I'd mention the links on the sidebar of the RWN page are
37207 [Dave@Pr gm t] Thanks - I've fixed it, but I need to find out why it happens every

[RURL] Larry Wall proclaims Ruby to be Perl 6
37198 [ptkwt@sh ll ] Another shocking development today... Larry says: "I picked up this
+ 37216 [matz@ru y- a] ;-)
| 37217 [elanthis@aw ] Look, I know Perl ain't pretty, but that's a bit harsh, isn't it?
+ 37274 [fokke_wulf@h] St. Wall has indeed looked at Ruby and found some ideas he likes for

Dir[] on Windows w/ long filenames
37201 [chris.morris] Ruby 1.6.6
+ 37208 [nobu.nokada@] A space is a separator of globbing patterns in 1.6 or former.
+ 37209 [mattbee@so p] I fired up my newsreader to post almost exactly the same bug; or something

Weekly RCR Summary
37210 [RubyGarden@t] This is an automatically generated list of Ruby Change Requests.

Dr.Dobb's RubyCocoa article
37212 [james@ja es ] Just got the May issue of Dr. Dobb's, and I see they have an article by

tk problems on Linux
37213 [anany@ec .v ] I just decided to get into some GUI work, and so I picked up

Eclipse Ruby Development Tool
37215 [awilliams@ro] * Under Workbench -> Preferences, choose Ruby -> Installed Interpreters. Add
38102 [switch@at ot] Is that CVS code actually downloadable?  What is the module name?
38107 [switch@at ot] Ooops, I see it now.  Just need to get those four org.rubypeople.rdt.*

getaddrinfo: invalid value for hints ?
37219 [nick@sa io .] Just got the latest ruby snapshot, 04/01, compiled it on cygwin. I get the
37221 [eban@os ri .] Try this patch.
37222 [nick@sa io .] Thanks! That did it

37224 [gappodi@ho m] Can I embedded Ruby withing my application and provide my own object
37227 [elanthis@aw ] You sure can.  I use Ruby like that now in a couple projects.  The

NEW 바니(Barney) 비디오 SET (광..고)
37225 [dhl660717@ly] ...

37228 [ysantoso@je ] Not to slight other existing ruby development tools, but I was
+ 37236 [ysantoso@je ] Please ignore my previous post. I just scanned the archive and found
+ 37241 [jasonfax@ho ] I would LOVE to see a remacs.
  37294 [web2ed@ya oo] Ditto, I've been dreaming of the very same thing.  Or better yet, how
  + 37305 [ysantoso@je ] (I'm the OP of this thread).
  | 37306 [james@ru yx ] If there is, then those maybe those scripts could run in Vim, which already
  + 37315 [tobiasreif@p] check
  + 37326 [list@ch om t] Yes, that would rule me out. ;-)

metaruby mainloop
37229 [ps@ra ia .m ] I am trying to use MetaRuby's MainLoop class in an application of mine and are

[ANN] Announcing New Ruby Book Under Development!
37231 [robert.calco] Just thought the community would like to know that it's official: We'll be writing a new book on Ruby for Sams Publishing. The "Ruby Developer's Handbook" (not to be confused with the excellent "Ruby Developer's
+ 37233 [james@ru yx ] This is great news.   I, too, am working on a Ruby book (on beginning Ruby
| + 37234 [pate@ey er a] One thing I'd really like to see is 'beginning programming with ruby' as
| + 37249 [info@mj is d] what I heard from some friends is that "yield" is sometimes confusing,
+ 37247 [info@mj is d] great news.
| 37250 [jyeung@di co] Have you checked out?
| 37295 [Chad.Fowler@] I believe Pete McBreen had started on something like this.  Pete?
| 37299 [pete@mc re n] Chad Fowler exclaimed in response to Pat Eyler's desires
| + 37310 [Stephan.Kaem] Sounds interesting...
| + 37314 [tobiasreif@p] Sounds great.
+ 37319 [tpeters@un -] You make great promises. I'll definitely buy such a book. Have you decided
  37338 [rich@in oe h] Since its not April 1st I cannot say it will be proprietary and closed
  37365 [info@mj is d] I am not sure about Ruby License but isn't Ruby dual licensed
  37441 [matz@ru y- a] Yes, and yes.

seeking to understand...
37232 [probertm@no ] Dear All,
+ 37235 [james@ru yx ] If you search the ruby-talk archives, you'll find previous discussion about
+ 37237 [chris@cm -e ] I started with Perl, and with a disdain for anything OO.  Then I saw the
+ 37238 [kentda@st d.] The explicit self argument in Python. Made me gag, since even C++ does
| 37240 [bs1535@sb .c] I am a Java and Python programmer and have recently taken a look at Ruby. I
| 37242 [james@ru yx ] How weird.  I come from a VB/Java/Perl background.  You're right in that
| + 37243 [andrew_queis] I can't quite agree with the Perl->Ruby path either. I'm
| | 37288 [michael_s_ca] *chuckle*
| | 37352 [probertm@no ] My initial question about Mr Eckel's comments was because,
| + 37245 [tom.hurst@cl] I don't think Ruby's way of doing things fits in well with Perl's
+ 37246 [ptkwt@sh ll ] I don't really qualify (I came from Perl to Ruby) - but will point out
  + 37251 [ysantoso@je ] What is this "lexical closures" that I've been hearing about? Most
  | 37267 [ptkwt@sh ll ] A closure is a function that remembers the context in which it was
  | + 37271 [ysantoso@je ] Thanks Phil for the explanation. Now I know for sure that I've been
  | | + 37272 [brk@je ko .c] [Bryn Keller]
  | | + 37277 [ptkwt@sh ll ] I'm pretty rusty on Java, but I'm not sure that achieves the same thing
  | |   37286 [ysantoso@je ] You got that right. But as brk@jenkon.com (Bryn Keller??) mentioned,
  | + 37276 [dblack@ca dl] OK... but, in this example, how would you call the proc with different
  |   37309 [ptkwt@sh ll ] Sharp eyes David.  There is no way to change a and/or b in this example.
  + 37311 [jayce@mo x. ] I have developped a "big" soft in python and that made me knows it

Apology (Source code for _The Ruby Way_)
37239 [hal9000@hy e] ...
37303 [spamoff@go i] ...

Ruby, python, perl, ...
37244 [bcox@vi tu l] I've used C, Objective-C, perl, python and java heavily. Switched
37252 [ysantoso@je ] Sorry for my lack of knowledge in Python. How does Python achive the
+ 37255 [chris@cm -e ] It's not bizzare, but Python, to the best of my knowledge, just
| 37258 [jason@jv eg ] Ruby has that too...try it out. :)
| 37293 [chris@cm -e ] When I try this(in irb), the behavior that seems to actually be
| + 37313 [tsiivola@ni ] This is just a case of ruby concatenating adjacent literal strings at parse
| + 37340 [jason@jv eg ] You've seen through my smoke and mirrors. ;)
|   37383 [chris@cm -e ] ...
|   + 37384 [vjoel@PA H. ] What about
|   | 37400 [chris@cm -e ] You'd still have to escape out any } that might actually occur in the
|   | + 37403 [rich@in oe h] of.
|   | | + 37404 [tobiasreif@p] ... aren't there additional newlines then?
|   | | | 37408 [chris@cm -e ] foo = (<<-XDFGDFNG
|   | | + 37407 [chris@cm -e ] This should have ccurred to me, given Ruby's other Perlisms..
|   | + 37405 [ysantoso@je ] foo = %q# quotation marker can be any non-alphanumeric char #
|   |   37409 [vjoel@PA H. ] Only if the { } are not balanced.
|   + 37391 [mike@st k. o] In Ruby I guess I'd use %q for that and pick my own quotes e.g.
+ 37278 [  pih@oe .d ] print "This line includes %s easily" % whatever

Mixins vs. Multiple Inheritance
37253 [jason@jv eg ] Given that including a module M into a class C
+ 37254 [andrew_queis] A typical mixin module doesn't define a class. In C++ two
| 37257 [jason@jv eg ] So how would the following scenario be any different if Foo and Bar were
| 37486 [chr_news@gm ] I find it interesting that Ruby's (1.7) default method-search order in
+ 37262 [chr_news@gm ] My first thought would be to search comp.lang.ruby on  Google-news
| 37264 [andrew_queis] I don't see a difference for the example you're giving above. If
+ 37292 [matz@ru y- a] Mix-in is subset of multiple inheritance.  So mix-in can be done using
| 37333 [hutch@xa pl ] Is there someplace that outlines what you can do with multiple inheritance
| 37355 [matz@ru y- a] You can't inherit from two (or more) concrete classes by mix-in.
| + 37363 [jason@jv eg ] True, but I think the question was more along the lines of "How would it be
| | 37442 [matz@ru y- a] You have to think twice to extract abstract feature set to utilize
| + 37364 [hutch@re ur ] That's it? That's good to hear! This is basically what I've come to assume
|   37370 [andrew_queis] My experience with MI in C++ is that 99% of the time I
+ 37771 [paul@at es .] Base
  + 37780 [jason@jv eg ] Thanks Paul.  That's precisely the kind of information I was looking for.
  + 37799 [chr_news@gm ] Note you can create a Ruby ``mixin-diamond'' with a  C++ - ``(virtual)

Understanding Python
37259 [nsmail@gn si] I've seen a number of people on the Ruby newsgroup who really
+ 37325 [list@ch om t] Not if you can spend five minutes writing each_send into Enumerable.
| 37330 [dblack@ca dl] See http://www.rubygarden.com/article.php?sid=127 for a discussion
| 37395 [list@ch om t] Erm, I read the page, but what was the official reason for rejecting
| 37402 [dblack@ca dl] Well, matter-of-taste points count for a lot, if it's Matz's taste
| 37406 [list@ch om t] Yep, no doubt about that!  That's why I'm not too fond of it as an RCR
+ 37401 [kentda@st d.] Hey, wadda ya know? I'm in the One-In-A-Hundred club ;-P

install DBI on windows
37261 [edk_ruby@ho ] - Downloaded and unpacked ruby-dbi-all-0.0.12.tar.gz

a note on the . and .. discussion
37265 [patrick-may@] I just realized that unix commands do not recognize the "." and ".."
+ 37268 [ysantoso@je ] You're mistaking shell with unix command. The character * is expanded
| 37307 [patrick-may@] You're exactly right, I am getting confused.  Thanks for the
| + 37425 [in6x059@pu l] I would be surprised if this implementation detail wouldn't be solved
| + 37604 [comp.lang.ru] - - Yes, . and .. are in the directory entry. Some shells however
+ 37269 [Dave@Pr gm t] drwxr-xr-x   2 dave     dave         1024 Apr  2 15:36 .
+ 37270 [elanthis@aw ] UNIX does not treat . or .. specially.  Any entry that begins with a .
+ 37280 [in6x059@pu l] - It would be very good to have methods on Dir which ignore '.' and
  37668 [ruby@fo rt c] I would vote to add new default argument to existing method.  Default

1.6.7 for Windows ?
37275 [bobx@li ux a] I know that Andy has been galavanting (sp?) around the globe but I was

About efficiency
37279 [jean_hugues_] I am looking for tips about writing more efficient Ruby programs. I have
37289 [nobu.nokada@] Ruby VM is planned.
37291 [elanthis@aw ] VM's make things a *lot* faster.  I'm experimenting with Scriptix, and
+ 37360 [cjack@cj ck ] I'm curious, do you know exactly where the speed gains come from in your
| + 37367 [elanthis@aw ] Many things.  One of the biggest (on modern processors) is cache
| + 37390 [ptkwt@sh ll ] If you consider the case of Perl, most of the time people don't bother to
|   37394 [elanthis@aw ] Well, consider Python then, where it by default stores the bytecode to
|   37451 [george.marro] There's also the meta-speed-up that I think someone (Dan Sugalski?)
|   + 37491 [elanthis@aw ] I'm not sure I follow - the way I see it, the parser/compiler just
|   + 37613 [dan@si he or] I'm pretty sure I said something like that.
+ 37392 [stern@ro la ] Can you (or anybody else) explain why that is so?  It's not obvious to
| 37393 [elanthis@aw ] Well, that is a huge source of savings.  I cut the run time of smaller
| 37436 [ rik@kd .o g] #if Sean Middleditch
| 37437 [elanthis@aw ] Ya, the other optimization that just hit me is the fact that there are
+ 37443 [nobu.nokada@] I guess it's so hard.
  37489 [elanthis@aw ] ^,^  That's how I look at it.
  + 37505 [matz@ru y- a] Compile time.
  | 37517 [elanthis@aw ] Ah.  Is it guaranteed that all names which are the same will have the
  | 37556 [matz@ru y- a] Yes.  And it seems no performance problem since they are stored in a
  + 37576 [jean_hugues_] This msg is about the Ruby C interpreter, not about using Ruby itself.
    37579 [decoux@mo lo] It's best if you look at the source of ruby

Is eval a code/design smell?
37281 [home@cl bs o] I seem to have an inherent distaste for eval, but I don't know why. I've
+ 37285 [in6x059@pu l] There is also the security problem: If the string you eval is somehow
+ 37287 [elanthis@aw ] Personally, I agree with you for a number of reasons (you can find my
+ 37323 [ronjeffries@] In my experience and opinion, there are very few valid reasons to use eval.
  + 37398 [avi@be a4 co] I never use eval.  However, I use module_eval all the time.  That is,
  | + 37429 [ronjeffries@] Yes, eval or its brethren are very useful for code generation. Although in many
  | + 37449 [harryo@zi .c] Chris and I have been having a discussion about the use of eval because
  |   + 37488 [elanthis@aw ] I know I would.  To me, that is indeed a language flaw.  There should be
  |   | + 37537 [avi@be a4 co] Nonsense.  It's impossible to predict everything a language is going
  |   | | 37547 [elanthis@aw ] You are right, of course.  There should be a way to make Ruby do what
  |   | | + 37578 [avi@be a4 co] I utterly disagree.  If you are *not* dynamically generating code, you
  |   | | | 37633 [elanthis@aw ] You are missing the point entirely...
  |   | | | + 37637 [gnhurst@hu s] I think you would like Python, which takes this kind of erector-set approach.
  |   | | | | 37656 [elanthis@aw ] If I liked Python better, I'd be bitching on Python's lists to add the
  |   | | | + 37673 [avi@be a4 co] Ok, if you merely dislike the aesthetics of generating text, I
  |   | | | + 37674 [avi@be a4 co] time.
  |   | | + 37584 [tobiasreif@p] I don't see his.
  |   | |   37634 [elanthis@aw ] If eval() is running faster than your schema->lib functions, then I
  |   | |   37648 [tobiasreif@p] ?? I'm not using eval. I'm saving the generated lib as a file; then each
  |   | |   37657 [elanthis@aw ] Ah, I see.  Yes, Ruby doesn't let you get around that too easily, since
  |   | |   37658 [tobiasreif@p] which format for example?
  |   | |   37659 [elanthis@aw ] Whichever - XML might work, by dumping the tree nodes.  I did that with
  |   | |   37663 [tobiasreif@p] I kn[o|e]w.
  |   | |   37681 [elanthis@aw ] Again, in the context you cut out, we were dicussing the "if" part of
  |   | |   37682 [mb227@co ne ] Well, I can think of one practical application: if the Ruby interpreter
  |   | + 37538 [Dave@Pr gm t] Seems to me that providing methods to set instance variables in an
  |   | | 37546 [home@cl bs o] Is there anything in Ruby that prevents me adding an accessor for these
  |   | + 37553 [harryo@zi .c] I'm not quite sure what security holes you imagine can be opened up
  |   |   + 37554 [elanthis@aw ] Depends.  Where does name and value come from?  Like mentioned in other
  |   |   | 37569 [harryo@zi .c] Fair point. I guess I'm assuming that, since both the name and the
  |   |   | 37618 [elanthis@aw ] Ya.  Depending on your exact situation, eval() could be safe - but of
  |   |   + 37593 [in6x059@pu l] None?
  |   + 37536 [avi@be a4 co] Hmm, I don't think it was me - after all, the language *does* provide
  + 38034 [ian@ca ib n.] So what is a better way to do this?
    38045 [elanthis@aw ] Sorry if it should be obvious, but what is the purpose of eval on attr?
    38061 [ian@ca ib n.] Without the eval, the yield method will pass the variable's name to
    + 38062 [pbrannan@at ] Not all instance variables begin with an "@", so this doesn't quite work
    | 38070 [ian@ca ib n.] Just to go off at a tangent here for a moment, why is this?
    | 38071 [decoux@mo lo] in ruby, yes but in C you can create (and retrieve) instance variable
    + 38063 [elanthis@aw ] Ah, got it.
      + 38064 [decoux@mo lo] ???
      | 38066 [elanthis@aw ] Class, object, same difference.  You know what I meant.  (Sorry,
      | + 38067 [decoux@mo lo] this is why eval is evil :-)
      | | 38068 [elanthis@aw ] Ah, I see.  ^,^  So, then, is this a "security bug" in Ruby, or by
      | | 38069 [decoux@mo lo] not a security bug
      | | 38072 [elanthis@aw ] Well, if you cannot operate on the object normally, and eval() does let
      | | + 38074 [decoux@mo lo] Its example was [ruby-talk:38034]
      | | | 38078 [ian@ca ib n.] They _are_ public, but I wanted to define an each method that would
      | | | 38096 [dsafari@xt a] if they are public and have getter methods why not use Object#__send__?
      | | | 38114 [ian@ca ib n.] Because I'm still learning the language and hadn't discovered it yet :-)
      | | + 38079 [alan@di ik t] Ruby's protection scheme is not intended to procted the encapsulated
      | |   38082 [pbrannan@at ] The difference is that with C++, friends have to be declared by the
      | |   + 38083 [elanthis@aw ] Of course, with C++, you do directly access any byte in memory owned by
      | |   | 38088 [pbrannan@at ] It's more than that.  In C++, bypassing the access control is undefined.
      | |   | 38090 [elanthis@aw ] Ya, well, still - the point is, it's possible, whereas in Ruby (assuming
      | |   | 38092 [pbrannan@at ] The difference is that a C extension for Ruby has well-defined behavior.
      | |   + 38116 [alan@di ik t] This is true, but my real point is that from time to time there is
      | |     38231 [in6x059@pu l] Just to get this straight: When there was talk about a potential
      | + 38075 [pbrannan@at ] These are very distinct concepts in Ruby, and it is important to
      + 38065 [pbrannan@at ] Everything is an Object, not a Class :)