15471-15895 subjects 15833-16235

Ruby mascot - Let Matz pick?
15676 [rmiller@tr n] Having been through the "mascot" process recently with the Midori Linux Project

Serious offer. This is not ordinary offer as many in Internet. The New Way In Your Life Here!!!
15678 [to_infinity@] Serious offer for You here. This is not ordinary offer as many in Internet.

for those looking into parsers
15680 [royhamel@ho ] Todd Proebsting's Home Page

Holiday Message
15681 [Richard@ru y] Thank you for your email.  I will be out of the office from Friday, May 25

Problem compiling 1.6.4 preview 2 on cygwin - timezone redeclarat ion
15682 [martin@ma si] I'm having problems with 'timezone' being redeclared in
15686 [matz@ze ab t] It may be caused by Cygwin version mismatch.
15693 [martin@ma si] cygwin - timezone redeclarat ion

Newbie: each!
15683 [mdemello@ke ] I'm trying to write an each! iterator that will iterate over an object
+ 15684 [jim@fr ez .o] You can use Array#map! to do this.
| 15696 [matz@ze ab t] Close.  But map! does not pass a modifiable reference, but replaces
| 15700 [mdemello@ke ] I can, but the references would have been pretty <g>. I can see (sort of)
+ 15691 [phasis@ha an] so
  15692 [mdemello@ke ] map! sets the iterated-over value to the retval of the block, not to the

every body wants java java
15687 [baasad@qu li] its really frustrating when you try to look for a job noadays.... you know so

every body wants java
15688 [baasad@qu li] ...
15719 [elderburn@mi] Java is the currently in vogue "magic bullet' for corporate management types,
+ 15726 [wayne.blair@] know
| + 15728 [baasad@qu li] sounds reasonable
| + 15729 [ser@ge ma e-] There is an internal US Forest Service product called Informs.  Informs is a
+ 15727 [baasad@qu li] very well said...

Problems with MD5 and strong comparison.
15690 [WPierce@At e] This is a multi-part message in MIME format.
15703 [knu@iD em ns] This should be just md5.hexdigest.  Calling update(x) twice then
15717 [knu@iD em ns] D'uh, ignore this, I think I was sleeping.  MD5 certainly doesn't need

Where can I find tiki for ftp?
15695 [john@jo nk i] Subject says it all.

using gtk
15698 [Jean-Francoi] I try to use ruby/gtk for make a front-end to the "dump/restore" utility
15702 [bombadil@wa ] perhaps 'each_selection'?

Compile to standalone Win32 exe
15699 [ dos@ma l. u] I am a novice in this nice language and i have a question to all Ruby
15707 [feldt@ce ch ] rbwrap might be an intermediate

gnome, bonobo and corba.
15704 [erik@ba fo s] I send this mail to the list because I think alot of people are
15714 [pate@gn .o g] just as a side not, has this discussion been brought up on the
15718 [erik@ba fo s] No. not on the gnome-components-list either.  I am thinking about
15820 [MAP2303@ma l] Re the message of ``[ruby-talk:15718] Re: gnome, bonobo and corba.''...
15838 [erik@ba fo s] libbonobo uses ORBit extensively.  Basically if we want a bonobo that's
15861 [MAP2303@ma l] Re the message of ``[ruby-talk:15838] Re: gnome, bonobo and corba.''...

15708 [decoux@mo lo] Ruby has really a problem with 'duplicate'. I must say that I've found
+ 15709 [matz@ze ab t] I don't forget your comments, such as this one, [ruby-talk:15162], and
+ 15724 [see_signatur] [0]> ruby -e 'puts "OK" if /(a)+-\1b/ =~ "aaa-b"'
+ 15748 [decoux@mo lo] I'll try to explain the rules used by ruby.

RubyWin and Tk
15710 [s.unsworth@v] As an impressed newbie to Ruby I've tried using Tk in RubyWin, however it
15712 [erichey2@ho ] My problem turned out to be ruby install (default is static, and for me,

bug in "system" PATH scanning?
15711 [pixel@ma dr ] ...
15730 [matz@ze ab t] Thank you.

mySQL library under Win2k
15713 [devnull@de a] Moin.

library for parsing urls
15715 [steven@ha ya] Is there a library for parsing URIs and URLs? I am thinking
15720 [Dave@Pr gm t] There's a uri library on www.ruby-lang.org/en/raa.html. It works (I'm
15722 [knu@iD em ns] /__  __            Akinori.org / MUSHA.org

which ones are atomic?
15716 [steven@ha ya] Which ones of the below are atomic (so I don't have to use mutex in
15800 [matz@ze ab t] None of them are atomic.

ruby way
15721 [wayne.blair@] In the last couple of weeks since I started participating, I've noticed a
15723 [Dave@Pr gm t] Well said.

Wow! (impressed newbie)
15725 [sjr3a@bu a. ] I just got the Programming Ruby book a few days ago and have been reading it
15731 [ptkwt@sh ll ] Welcome!
+ 15732 [erik@ba fo s] Just getting something like "Ruby weekly news" that we could link to
| 15733 [Dave@Pr gm t] Well, there's the log on RubyGarden. It just needs people to
+ 15743 [hal9000@hy e] ask
+ 15779 [feldt@ce ch ] Great list. Minor comments below.

java based interpreter and regexes
15734 [wayne.blair@] I have been thinking about the java based ruby interpreter project, and I
+ 15736 [glen@en bl d] org.apache.oro.text.regex
| 15740 [ser@ge ma e-] ...
| + 15747 [sma@3p us .d] I compared Ruby 1.6.4 against JDK 1.4 beta and cannot confirm your
| | + 15750 [wayne.blair@] Would the goal be to make it compatible with the ruby C regex implementation
| | | + 15753 [sma@3p us .d] Well, with "it" I was actually referring to Ruby as whole, not to the
| | | + 15758 [decoux@mo lo] Not really a superset because it give incompatibilities. For example,
| | + 15752 [decoux@mo lo] There are differences between perl5 and ruby for the regexp engine.
| | + 15759 [ser@ma s. er] Hm.  I was comparing Ruby 1.6.4 against IBM's Java 1.3 on Linux.
| |   + 15764 [glen@en bl d] Hm... it seems to me that a regex implementation that was simply an
| |   | 15776 [sma@3p us .d] Don't think so as it's not possible to extend class String in Java ;-)
| |   + 15775 [sma@3p us .d] I was using a PII 450 with 256 MB running Windows 98.
| |     + 15796 [benoit.cerri] I did the test too both using jdk1.4 and the ruby 1.6.3 as distributed by
| |     | 15809 [ben_tilly@op] At a glance it doesn't support embedded comments.
| |     + 15812 [ser@ma s. er] [Many replies to multiple emails on this thread in one easy-to-delete
| |       + 15815 [sma@3p us .d] 1.4 should be at least as fast as 1.3, it might include some debug
| |       | + 15842 [benoit.cerri] How did you get those results, I used both -Xloggc:log.gc and
| |       | | 15859 [sma@3p us .d] Well, I guessed :-)  Actually, I used "-verbose:gc" and counted the
| |       | + 15942 [ser@ge ma e-] Have you tried running the benchmark with Java 1.3 on your machine?
| |       |   15969 [sma@3p us .d] Okay, I installed jarkata 1.2 and run the test: Time says 9.5s. Just
| |       |   15977 [ser@ge ma e-] What is Jarkata?  Does this include the Sun HotSpot JIT?  What does your
| |       |   + 16017 [benoit.cerri] I didn't test it but according to the release notes an important part
| |       |   + 16056 [sma@3p us .d] It includes the regexp package.  It's part of the apache Java project.
| |       |     16061 [ser@ge ma e-] Oh, I thought you had already tested the Jakarta regexp package.  I wasn't
| |       + 15837 [benoit.cerri] the
| |         + 15860 [sma@3p us .d] Well, the startup times have nothing to do with Java's hunger for
| |         + 15943 [ser@ge ma e-] Yes, in general, I've found that the IBM JIT is not only faster than HotSpot,
| + 15751 [decoux@mo lo] You are right, this is the real problem because otherwise you'll have 2
+ 16018 [wayne.blair@] Does anyone have any experience with javacc?  I've been playing with it and
  + 16021 [avi@be a4 co] When I was looking at Java parser generators recently, I found sablecc
  | 16041 [wayne.blair@] Thanks, checking it out now.  Certainly better documented.
  + 16022 [matz@ze ab t] It can be easily generated from parse.y using sample/exyacc.rb.
  | 16044 [glen@en bl d] After doing some digging and (re) discovering Smalltalk, it seems to me
  | + 16046 [mirian@co mi] I've recently joined this list, so please forgive me if I've missed
  | | + 16047 [wayne.blair@] In my interpretation each ruby class would be an instance in java (say
  | | | 16048 [wayne.blair@] As usual, I look at my example code and find it flawed, RubyObject
  | | | 16049 [wayne.blair@] public RubyObject new(RubyObject[] args)
  | | + 16059 [sma@3p us .d] One could perhaps try to use Java Debug API which allows to modify
  | + 16058 [sma@3p us .d] That would be definitely an option.  I'd vote for Squeak as it comes
  |   16060 [glen@en bl d] What about GNU Smalltalk? Not being a Smalltalk expert I can't verify
  |   16063 [wayne.blair@] I see java as a potential trojan horse (not in the pejorative sense but I
  |   + 16080 [ser@ma s. er] Or, in our case, it would make using Ruby *possible*.  We don't have the
  |   | 16082 [glen@en bl d] Very valid point, and I am sure that Sean is not alone in this
  |   | 16103 [billk@ct .c ] Yes, we're in the same boat too.  We do Java stuff both server-side
  |   | 16111 [wayne.blair@] Wow is that phat.  Working with antlr the first time and will be psyched to plug in your grammar for hacking.
  |   + 16083 [glen@en bl d] Jython is pretty widely used as a "glue" language, despite its silly
  + 16057 [sma@3p us .d] Well, last weekend, I spend some time evaluating quite a few different
    + 16065 [mirian@co mi] I'm intrigued.  What issues in Ruby prevent it from being expressible
    + 16078 [hipster@xs a] While the Ruby grammar might not be LL(k) as-is (haven't got a proof),
      16079 [matz@ze ab t] It's good to hear you'ce got the work done that much.

Compilation helper
15735 [elanthis@us ] I've run into a few issues in my project AweMUD in trying to embed Ruby in relation to compilation.  I'm using automake/autoconf, but I can't find an easy way to detect/configure the settings for compiling in the Ruby library (library and include paths, basically).
15737 [glen@en bl d] Hm... I have begun a group of Autoconf macros for Python, am about to
16003 [elanthis@us ] Sweet.  ^,^

Ruby globbing problem?
15738 [gc@ma dr ke ] I have two directories, one being a "real" directory, the other one being
+ 15817 [matz@ze ab t] I see a problem from
| 15872 [gc@ma dr ke ] Yep.
+ 15850 [decoux@mo lo] pigeon% mkdir xx
  15852 [matz@ze ab t] Oh, this one.  Thank you.  I've been not sure this one to be back
  15875 [gc@ma dr ke ] As for me, I think that once we know it, it's not a big deal. And it's

Ruby Programming Practice
15742 [jkaurin@ho e] Although the following code is legal in Ruby (assuming I made no
+ 15744 [hal9000@hy e] Some other people will have more valuable opinions than mine.
+ 15745 [r2d2@ma .a c] I would probably put a placeholder in the superclass just to remind myself
+ 15746 [guillaume.ru] "John Kaurin" <jkaurin@home.com>
+ 15749 [wayne.blair@] This is a fairly common practice when taking advantage of polymorphism.
+ 15760 [ser@ma s. er] Well, I'd say that this is not good programming practice.  Better would
+ 15767 [patrickdloga] It's all software, and so there may be a reason for something like this.
+ 15802 [matz@ze ab t] I think it's OK.  I even call this a template pattern.

Challenges of java interpreter
15754 [wayne.blair@] To create a java interpreter for ruby, ruby would ideally be coded in itself
+ 15755 [decoux@mo lo] [ruby-talk:14893]
| + 15761 [ser@ma s. er] C is pretty famous for (practically) bootstrapping itself this way.
| | 15774 [sma@3p us .d] However, the next "natural" step would be to write a Ruby2C compiler
| + 15762 [decoux@mo lo] No,
|   15772 [wayne.blair@] expecting
+ 15773 [sma@3p us .d] Well, this would be only useful IMHO if there's a way to compile the
  15778 [feldt@ce ch ] The RubyVM project emanating from [ruby-talk:10238] is very related to
  + 15794 [sma@3p us .d] Interesting...
  | 15824 [feldt@ce ch ] Agreed, but if you want to go all the way... ;-)
  + 15803 [matz@ze ab t] Ah, that's just because I'm not smart enough to handle meta.  I'm not
    15825 [feldt@ce ch ] And a bright side it sure is. Even I'm not sure I can agree with your
    15830 [matz@ze ab t] Of course.  The only source of grammer information - parse.y - is a

XMLC for Ruby
15756 [dcorbin@im e] About 3 months ago someone posted a message here about a Ruby
+ 15757 [decoux@mo lo] Perhaps [ruby-talk:13919]
+ 15916 [chadfowler@y] A colleague and I have written one, available on

RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby!  (Revised 2001-05-26)
15769 [schneiker@ju] RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby!  (Revised 2001-05-26)

eRuby file suffix
15777 [ingen.eposta] Just a proposal: How about using ".erb" as the file suffix for eRuby
15813 [comp.lang.ru] .rhtml is inline with .phtml for Perl and .shtml for SSI.  I guess
15876 [ingen.eposta] Well, most PHP programmers (like myself) use the ".php" extension
15890 [comp.lang.ru] I thought PHP was always ".php"?  A law unto itself as ever...

15780 [baasad@qu li] how can I run a system command in ruby like the one in perl system(command,options)
+ 15781 [eric@sf rc n] Same way..
+ 15784 [harryo@zi wo] You can use backticks, just like in perl.  For example ...

Subsets of a set
15782 [harryo@zi wo] I know that the Array class has a number of methods that make it usable
+ 15783 [harryo@zi wo] By the way, I'd be happy to accept a routine which returns the set of ALL
| + 15787 [matju@sy pa ] Mine is not recursive, but it works anyway.
| + 15790 [dgjs@ac .o g] An alogorithm exponential in it's input size "runs for a very long time"?
|   15819 [harryo@zi wo] Fair comment, but 4 minutes for n=8 is a bit over the top.  Let's face it, 2^8
+ 15903 [r2d2@ma .a c] class Array

newbie queation
15785 [akhar@vi eo ] is it possible to read, write , display images with ruby? or maybe just read

Splitting up a huge ruby file
15786 [ugly-daemon@] split up a source file into several smaller ones but still have them behave as
15791 [hal9000@hy e] to
15798 [tuurlijk@tu ] Use one module to contain the contents of each seperate file.

RCR: Net::FTP SITE command et. al.
15789 [gnhurst@hu s] I recently needed to be able to 'chmod' a file after

Event Loop (MainLoop.rb)
15792 [matju@sy pa ] This is my event loop, but I haven't got the chance of really using it

Check a few characters of a string: How?
15793 [fgeiger@da e] Want to check the first or last character of a string or say any character
+ 15795 [knu@iD em ns] Isn't s[pos,len] short enough?  The first character will be s[0,1] and
+ 15799 [sma@3p us .d] I think, you could write either use the "?" syntax to refer to
  15801 [ugly-daemon@] Why is it like that anyway?? Wouldn't it be more useful to have array[i] return
  + 15805 [matz@ze ab t] You might not know the definition of characters can cause very hot and
  + 15843 [mlang@ho e. ] try s[1].chr

is it possible to dynamically coerce objects types in Ruby?
15804 [mirian@co mi] Greetings to all.  I am a newcomer to Ruby and I am exploring the
+ 15806 [decoux@mo lo] use #to_int
+ 15807 [matz@ze ab t] Try 'to_int' which is for that particular purpose, not 'to_i' which is
  + 15808 [jonas.bulow@] Why is there a difference between to_i and to_int? Is it the principle
  | 15811 [Dave@Pr gm t] The longer forms to to_xxx (to_int, to_str, and to_ary) are used when
  + 15810 [mirian@co mi] Thank you for your help.  I also should have been more specific about
    15816 [matz@ze ab t] If you reallly want MyClass to be integer that much, either
    15818 [mirian@co mi] coerce is pretty nice, thank you.  It seems that when I use coerce, I
    15821 [matz@ze ab t] Yes.  You have to pay the cost to join Numeric family.
    15822 [mirian@co mi] Okay.
    15823 [feldt@ce ch ] Yes, it would. MetaRuby takes a similar approach on other classes so you
    15826 [matju@sy pa ] module ArithInterface
    + 15827 [feldt@ce ch ] Well, its a start... ;-)
    + 15867 [mirian@co mi] Perhaps I will work on this, as an exercise to learn Ruby.
      15901 [ben_tilly@op] You will not be far wrong if you think of "to_int" as being
      15902 [mirian@co mi] *grin*  I like this image.  I didn't understand the different between
      15922 [mike@le to .] So what about a String#to_int method that would raise an exception (or return nil) if the string is not a pure number represented in a string?

Cannot run 'irb --readline'
15814 [pschoenb@so ] when I do
15869 [keiju@is it ] Perhaps, this problem is same for [ruby-talk:8842] and its thread.

subclassing Date
15828 [Michael.Husm] Using ruby 1.6.0 and trying to subclass the Date class like
15831 [matz@ze ab t] You're calling `super("2001.5.28",...)'.  I think there's something
+ 15835 [nahi@ke na t] I'm sorry for replying matz' article.  I've lost the
| 15840 [Michael.Husm] sorry for ommitting the st variable in my first posting.
| + 15844 [nahi@ke na t] I was wrong...  I don't know how to do it.
| + 15845 [matz@ze ab t] You're defining an instance method new3.  I think you have to define a
|   15856 [Michael.Husm] yes that works. Thank you for your help.
|   15882 [matz@ze ab t] This will be fixed in the near future (already fixed in the snapshot).
+ 15848 [Michael.Husm] ...
  15855 [decoux@mo lo] When new0 is defined as an alias, Date::new is not yet defined. This

Can irb have smart completion?
15832 [max@ma va co] When I use <TAB> in irb, it used to show file list.
15834 [matz@ze ab t] irb bundled with 1.7 (try snapshot.tar.gz) has this feature, I think.
15839 [keiju@is it ] % irb -r irb/completion
+ 15864 [max@ma va co] Yup. It works even in 1.6.2.
+ 15868 [Dave@Pr gm t] I'm thinking it would be quite neat to tie this is in to 'ri', or an
  15904 [jim@fr ez .o] Or how about adding the ability to do ri within irb?