22647-23714 subjects 23044-24253

PLease condense my code
22813 [frankm@ba ar] First off, it was a pleasure to meet so many people on this list at
22815 [joe@vp p. et] while gets
22816 [joe@vp p. et] while gets
22817 [frankm@ba ar] Weird.  I thought I tried something like that; I recall the Range seemed
+ 22818 [hal9000@hy e] Hmm... does this work in 1.7.1?
| 22824 [decoux@mo lo] Yes, but only with -e
| + 22830 [decoux@mo lo] Finally I think that it will be difficult to explain why these 2 lines
| + 22849 [hal9000@hy e] That's what I thought.
|   22868 [decoux@mo lo] Well, the problem actually is that it's difficult to explain why the first
+ 22823 [harryo@zi wo] Can someone explain what the "!(/=begin/../=end/)" does?
  22828 [avdi@av i. r] P. 57, under the heading "Ranges as Conditions"
  22853 [harryo@zi wo] Thanks!  That's a relatively short section, so I guess I must have missed

C-style enums?
22833 [avdi@av i. r] does anyone have a ruby module that emulates C enums, so that if you
+ 22835 [j.travnik@sh] Why to have this if we have identifiers itself. There is not need for enum.
+ 22844 [matju@sy pa ] RubyX11 0.5 has X11/Type.rb

REXML 1.0a9
22837 [ ser@ef .o g] Namespace support was buggy. Oliver gave me some good

array prob
22838 [niko.schwarz] I still have probs with ruby, i hope you can find me, it wont take long,
22840 [decoux@mo lo] ^         ^
22841 [niko.schwarz] thats exactly the problem. if i do that, it wont work anymore.

FYI: ODBC problem
22851 [mchahn@fa el] I've downloaded and installed the current cygwin version of Ruby/ODBC
22852 [mchahn@fa el] I just discovered that my problem only happened when ODBC was included, like

converting an array into a hash
22855 [djberg96@ho ] What's the easiest (i.e. a one liner) for creating a hash based on an array?
22856 [dblack@ca dl] hash = Hash[*array]
22860 [djberg96@ho ] array?
23013 [schneiker@ju] pro/con votes would be a nice way of keeping this and many similar such
23016 [Dave@Pr gm t] A list of current RCRs is at
23017 [joe@vp p. et] and if you have a sec, vote on RCR #3.  It's a pet peeve of mine.  I'd
23019 [matt@li ke .] It is already listed as a rejected change request.  :-)

Building Ruby on MacOS 10.1
22857 [will_conant@] Has anyone been able to build Ruby on MacOS 10.1? I was able to build
22858 [dlh@ma l. om] I was able to build ruby-1.6.5, make ruby. It passed make test. I was not
22887 [will_conant@] Thanks. Downloading the new Apple Dev tools let me build ruby, but I
22913 [pc000@pa st ] This is caused by the two-level namespaced in the OSX 10.1 linker (see

Newbie: Ruby equiv for Perl while (<>)???
22859 [colive@te hn] I just learned about Ruby two days ago, and spent all day Friday
+ 22861 [dblack@ca dl] Welcome to Ruby!  I had just about exactly the same experience, just
| 22870 [neumann@s- i] $ ruby -ne 'puts /^\d/ ? "Starts with digit" : "Nope"'
| 22874 [dblack@ca dl] Interesting!  At first I thought the = was supposed to be =~, but now
| 23006 [colive@te hn] Thanks all.  I discovered the -n switch shortly after submitting my question
| + 23007 [avdi@av i. r] Don't take this as any strike against you, Chris, because it's not
| + 23032 [neumann@s- i] Of course there is support for MySQL and a handful other databases.
+ 22863 [matt@li ke .] ARGF.each { |l| DoAnything(l) }

Happy Birthmonth to the pickaxe!
22862 [dblack@ca dl] Happy birthmonth to you,
22880 [ ser@ef .o g] Super!

I need some help!!
22864 [Camgangrel@c] I'm new to programming and I was told that Ruby was EZ.
+ 22867 [mikkel.bruun] uhhmm...
| 22883 [tobiasreif@p] FUD. It's fun and cheap.
| + 22884 [mikkel.bruun] I find it expensive...
| | 22885 [tobiasreif@p] Intimidation often is the biggest roadblock to clear when learning to
| + 22886 [avdi@av i. r] I second this.  Don't believe that programming is hard or expensive to
|   22888 [ned@bi e- om] There are a number of different Smalltalk environments, with differing
+ 22877 [tobiasreif@p] Tobi
+ 22882 [avdi@av i. r] Sounds like a guinea pig for the "Little Lisper"-style Ruby book that
  22903 [list@ch om t] I glanced over one as well (the C++ one) and it looked like the usual
  22916 [avdi@av i. r] I got the impression in my perusal that it was written by a real live

Animorphic VM
22865 [feldt@ce ch ] (This is a bit long)
22878 [webmaster@ma] Yo!
22907 [matju@sy pa ] Parrot, the lower-level half of Perl 6.x, is designed Perl in mind, with
22914 [feldt@ce ch ] Yes, thats my impression also from reading the design docs att
23041 [pate@ne wo k] Parrot used to be much less Pythonish until Guido and other python folks

Preaching Ruby to the masses. How?
22871 [kentda@st d.] Despite my still quite ruby-newbie status, I've volunteered to hold a
+ 22872 [pixel@ma dr ] at least, you can use htmlize.el (eg: http://pleac.sourceforge.net/pleac_ruby)
| 22876 [neumann@s- i] I've adapted Vim's 2html.vim file, so that it creates colorized <div>
| + 22908 [harryo@zi wo] Brilliant!  Would it be possible for you to make the tool you've
| + 26507 [harryo@zi wo] Brilliant!  Would it be possible for you to make the tool you've
| + 32671 [harryo@zi wo] Brilliant!  Would it be possible for you to make the tool you've
|   + 22910 [feldt@ce ch ] Michaels solution seems to output somewhat nicer-looking html but there is
|   + 22981 [neumann@s- i] You can download it from
|   | 22997 [harryo@zi wo] Great!  Thanks very much, Michael.  I migth even learn something about
|   + 26508 [harryo@zi wo] Whoops !!  That message had been sitting in my pending folder for ages.
+ 22873 [armin@ap ro ] we produced a few simply slides (recyling heavily
+ 22875 [tobiasreif@p] check
+ 22926 [nigelb@en sb] Nigel Ball
+ 22957 [max@ma va co] Vim 6.0 can also do postscript output which is handy for prining.
| 22980 [neumann@s- i] cool. how do you do this? is it colorized?
| 23035 [max@ma va co] Yup, it is colorized.
+ 23009 [huber@al m. ] Yeah, in emacs

RE:  SmallScript, etc (was: Re: I need some help!!)
22889 [rich@in oe h] ...and David attended the Ruby conference.  David's SmallScript VM is more interesting in more than just architecture (which I believe is incredible).  He is looking to support multiple languages atop the VM.  Microsoft's CLR does not currently meet the needs that dynamic languages (such as Ruby) impose.  We had some interesting talks about support for Ruby on the SmallScript VM.
+ 22898 [chadfowler@y] I second Rich's sentiments about SmallScript being (at
| 22917 [matz@ru y- a] It can't be.  Ruby based on David's VM might be an alternative
+ 22925 [ptkwt@sh ll ] I just checked the smallscript website and it looks like the SmallScript
  22979 [pulsar@qk .c] posted
  + 22983 [ptkwt@sh ll ] Will it be 'free' as in the source code will be available?
  | 23012 [schneiker@ju] [Lots of stuff trimmed out.]
  | 23025 [feldt@ce ch ] Creative idea even though it may be difficult to put a price tag on it
  | 23092 [schneiker@ju] are
  + 22984 [feldt@ce ch ] I'm planning for a RubyOnAos as it is very relevant to RubyVM. Reasons

stack_frames patch
22890 [wconrad@ya n] Is anyone interested in getting more information about the internal
22901 [matz@ru y- a] check out [ruby-talk:12097] and [ruby-talk:12111] by Robert Feldt.
22906 [wconrad@ya n] Doumo!
22909 [feldt@ce ch ] BTW matz, any plans on including this in the 1.7 series? I still find it
22918 [matju@sy pa ] Please see
+ 22933 [wconrad@ya n] I think I like that proposal.  I may take a shot at implementing at least part of it if nobody else has.
| 22936 [wconrad@ya n] Probably not better, although I haven't looked at your patch in detail yet (having only just found it tonight).  The only obvious improvement is that I return an array of objects rather than an array of arrays -- I hate having to remember which field is [2] and which is [4].  But it probably doesn't matter a whole lot for an experimental patch, and it's certainly not improved semantics (just different data structure).
+ 22939 [feldt@ce ch ] Yes, this is a better approach than previous proposals and IMHO the
  22963 [pbrannan@at ] It certainly looks cleaner, but to get the binding n levels up looks to be
  + 22974 [feldt@ce ch ] Many things are dangerous but still tempting... ;-)
  + 23401 [matju@sy pa ] Usually,

Rite, Amelioration
22891 [tobiasreif@p] 1. What happened to the Code Amelioration Contest?
+ 22892 [dblack@ca dl] I'm afraid I've been remiss about announcing this.  We only got one
| 22904 [niklas@ka i.] That would be me. No worries, I kind of figured what had happened.
+ 22900 [matz@ru y- a] Rite will be the drop-in replacement for Ruby, so that every Ruby
  22905 [tobiasreif@p] Sounds good.
  22927 [matz@ru y- a] Yes, Rite is the code name for the interpreter.

Possible RCR? - break <n> for nested loops
22893 [wvucenic@ne ] A month or two ago on this mailing list there was a discussion of the
+ 22895 [mchahn@fa el] I personally think throw/catch is a superior solution because of readability
| 22896 [wconrad@ya n] Wayne, Great name! :)
+ 22897 [avdi@av i. r] On first look, my thought is "ick"... and here's why... I often find
+ 22899 [matz@ru y- a] use catch and throw.
  22915 [wvucenic@ne ] Thank you all for your prompt and thoughtful replies!!!
  22931 [wconrad@ya n] Right.  That's almost exactly the Java syntax for labeled break, and
  22946 [matju@sy pa ] It's all taken from Ada, which was designed as if it were the last

installing libraries
22894 [tromp@da sy ] I tried to install xmp from the application archive.

First steps in unit testing
22902 [list@ch om t] I'm using rubyunit and it is my first experience with unit testing in
+ 22935 [jweirich@on ] Start with the simpliest, style 3).  As you add tests, you will notice
| + 22938 [wconrad@ya n] Prefer #3, because setup and teardown methods are a bit of "OOP spaghetti code," not quite as easy to read as straightforward "start at the beginning and go to the end" code.  Also, setup & teardown methods are only really happy when every test looks the same.  When you need to add a new test that needs its objects setup a little differently, that handy setup & teardown method will start to get uncomfortable.
| + 22948 [list@ch om t] Uhm, <blush>, right.  Still haunted from BigDesignFirst ghost. :-)
+ 22949 [list@ch om t] Your suggestions improved both my testing class and my understanding
  22975 [hal9000@hy e] terms

pre 1.6.5 versons
22911 [sol123@ms .c] ...
22924 [rtarpine@ho ] I hope you can get 1.6.5 working correctly.  Otherwise,
22929 [sol123@ms .c] ...
22934 [sol123@ms .c] ...
22951 [bdelmee@ad a] dev.rubycentral.com/downloads/files/ruby164-3.exe

OT: company health (was RE:  Re: Bruce Eckel's opinion of Ruby)
23457 [james@ru yx ] On the other hand, if a company goes out of business because it has to carry
23457 [james@ru yx ] OT: company health (was RE:  Re: Bruce Eckel's opinion of Ruby)
+ 23462 [tobiasreif@p] holy cow!
| 23467 [james@ru yx ] Well, gee ...
| 23470 [tobiasreif@p] James,
+ 23480 [ser@ge ma e-] Yeah, that's the eternal conflict.  I don't think it should be impossible

Singleton methods and instance methods with same name?
23459 [ljohnson@re ] After a quick experiment I've confirmed that Ruby's OK with having class

Configuration class
22928 [nigelb@en sb] I would like some thoughts on a question that I am trying to resolve.
22930 [nigelb@en sb] As usual I have answered one of my questions myself!

Re: modified assignments with methods?
22932 [matz@ru y- a] I agree with the concept, but I'm not sure if there's proper syntax
+ 22943 [rokosm@kl ka] If we're talking about this, some time ago I wished to have
+ 22964 [pbrannan@at ] More appropriate, I think, are the "bang methods".  For example, where you
| 22969 [matz@ru y- a] str = str.gsub('a', 'b')
+ 22985 [mchahn@fa el] Is there a published grammer (bnf, etc.) for Ruby?
  23037 [matz@ru y- a] parse.y ;-)

Most OO way to make a variation of the IO class?
22940 [dpeschel@es ] Like other people on the list, I'm new to Ruby, and I'm quite pleased with
22945 [matju@sy pa ] 1. If you want to have IO methods filtered, a pattern to use is: define

rb_iterate help needed...
22944 [mikkel.bruun] ive asked this before, but i just cant seem to get it right...
22958 [decoux@mo lo] This is just an example, it's stupid but it's normal :-)

Emacs folding mode
22947 [list@ch om t] Is anybody aware of Emacs minor modes that could be adapted to
22950 [pixel@ma dr ] M-3 C-x $   (set-selective-display)
23045 [adam@th lo i] Also, M-x hs-minor-mode would do exactly what you're after, but

formmail.pl in ruby
22953 [Manuel.Hende] im new to ruby, and I'm looking for some examples to compare to the
22968 [ned@bi e- om] Now there's a concept: someone needs to re-write Matt's Script Archive in
22978 [mhe@he .e sy] So, there's no script available, but with cgi.rb and Net::SMTP, it's

ruby-mode.el bug
22956 [j.travnik@sh] I'm still developing TUI in ruby and I have came across problem
22995 [j.travnik@sh] Thanks, your patch solved the problem.

SV:  Re: rb_iterate help needed...
22959 [mikkel.bruun] Whoa...

[OT] Converting Powerpoint 2000 Presentations to HTML?
22970 [ljohnson@re ] All,
+ 22972 [dblack@ca dl] I've never tried this, but you could import it into StarOffice, which
| 22976 [armin@ap ro ] I have actually done that works fine.
| 22977 [armin@ap ro ] Or simply email me the .ppt and I will try
+ 22973 [rtarpine@ho ] Converts postscript slides to gifs and html, and gives instructions for

Re: Info/papers on Animorphic VM tech? (fwd)
22986 [feldt@ce ch ] For VM issues below are some more info about the Animorphic VM from

assigning variables
22987 [joe@vp p. et] def setvars(vars)
22991 [hal9000@hy e] or method `anarray\
22992 [joe@vp p. et] It's for a templating type application.  I want to be able to name the
22993 [hal9000@hy e] Could you possibly just keep it as a hash?
22994 [joe@vp p. et] Doh!  That definitely sinks my idea.  bummer.  I did get it to work
23022 [c.hintze@gm ] Hmm ... is this what you want to do?

MSVC build
22996 [will@wi lm g] I'd like to build Ruby as a static lib, with Visual C++ 6.
23027 [nobu.nokada@] libruby.lib is the static link library.

Fw: Patriotic Fundraiser for your organization
22999 [frelly@my xc] ...
23000 [mchahn@fa el] ...
+ 23001 [elanthis@aw ] I would guess bots that scan websites found a link or achive.
+ 23002 [csawtell@pa ] Sadly, from the spam point of view, ruby-talk is an open and unmoderated list.
  23003 [kero@d4 50 u] Lately, I receive more e-mail /about/ spam on ruby-talk than actual

Re: Welcome to our (ruby-talk ML)
23004 [vfields@he b] unsubscribe vance fields

Home automation and Ruby (a repost)
23008 [hal9000@hy e] I posted this three days ago... forgive my persistence,
+ 23020 [msassak@sp a] Now I really really really don't want this to come off as a snide
| 23021 [hal9000@hy e] Ha...  :)  No offense taken, Mike, I sympathize fully.
| 23023 [feldt@ce ch ] Same here.
| 23031 [tobiasreif@p] Can't wait :)
+ 23071 [emeade@ge kf] I'm willing to take a look.  I'm new to ruby and know nothing
| 23074 [hal9000@hy e] Thanks, Erik...
+ 23080 [emeade@ge kf] I'm willing to take a look.  I'm new to ruby and know nothing

RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby!  (Revised 2001-10-22)
23011 [schneiker@ju] RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby!  (Revised 2001-10-22)
23165 [mdemello@ve ] Suggestion - have a table of contents atop the FAQ. Makes it easier to see
23207 [schneiker@ju] Done.

23018 [ ser@ef .o g] This release has only minor changes from 1.0a9, including some whitespace

Error in Programming Ruby and patch suggestion for ruby
23024 [niklas@ka i.] The section "Adding Information to Exceptions" on page 97 and the
+ 23026 [decoux@mo lo] Seems for me similar to Exception#message, no ?
| + 23030 [niklas@ka i.] Yes, you are right, it is already covered by RCR #21. That's what I
| + 23033 [niklas@ka i.] Hmmm... looking at this again I don't think RCR #22 (already
|   23039 [decoux@mo lo] pigeon% cat b.rb
+ 23712 [matz@ru y- a] But it reduces flexibility.  We have to seek the way around.

23028 [tobiasreif@p] here
23029 [feldt@ce ch ] Well, its not really an API but a *really* simple class that will generate
23038 [tobiasreif@p] Sorry, I'm still a rubynewbie. But I'm looking forward to using your
23050 [neumann@s- i] For simple binary-trees, I've written a BinaryTree class and two
23051 [tobiasreif@p] Check

Howto read binary data?
23034 [martin.kahle] I want to read a file containing double values in binary representation,
+ 23036 [feldt@ce ch ] def file_exists?(filename)
+ 23048 [neumann@s- i] class BinaryReader

Bringing window to front Ruby/GTK (or Ruby/KDE?)
23040 [harryo@zi wo] Say I have a Ruby/GTK script and I want to bring its window to the front.

chop and chomp
23042 [alan_moore@g] I notice that String#chop is a little more intelligent
23043 [decoux@mo lo] chop is defined as
23046 [alan_moore@g] I know that.  What I'm saying is that I shouldn't have to
23270 [matz@ru y- a] OK, so what do you think the chomp behavior should be?
23298 [alan_moore@g] If no argument is provided, it should look for "\r\n",
23534 [matz@ru y- a] Ignoring '$/' at all is backward incompatible.  I like your proposed
23637 [alan_moore@g] How disruptive would it really be, I wonder?  It depends on
23812 [matz@ru y- a] Since "$/"'s default value is '\n', I'm going to treat it specially;