9843-10191 subjects 10245-10616

newbie list questions
10063 [rncarpio@ya ] foreach a {1 2 3} b {4 5 6} {
10081 [decoux@mo lo] You can look at the thread "[ruby-talk:6956] parallel array traversal"
+ 10102 [schneik@us i] #
+ 10115 [rncarpio@ya ] Hmm, that'll do the trick for parallel iterators;  how about
  10116 [avi@be a4 co] How about something like
  10117 [avi@be a4 co] yield n_items unless n_items.empty?      #***



10078 [lists.ruby-t] gotta be a monday morning.
10086 [erne@po er a] Couldn't all of this be resolved by putting the ruby talk number at the end

Locale support
10085 [   xm@w3 .r ] Just curious ... how ruby deals with locales ? Maybe someone already
10091 [matz@ze ab t] Ruby itself does not and will not use locale.  It is left for applications.

Newbie compilation problem
10096 [simonp@pa ks] I'm trying to get the win32ole extension built. My environment is as

offtopic: you can breathe now
10098 [sp00fD@ya oo] Just so everyone can breathe a sigh of relief, I've removed myself, and

Possible bug in RubyUnit? Or just my bug?
10101 [noel.rappin@] I was having RubyUnit hang on assert_equal for some of my objects when the
10293 [CQN02273@ni ] The to_str(obj) method calls obj.inspect (Object#inspect) if obj is
10305 [noel.rappin@] Thanks for replying... with a little further investigation, I think I've got

A parsing bug?
10104 [thutton@ve .] understand what I'm doing).
+ 10110 [decoux@mo lo] names.push(fp.gets "\0").chop
+ 10113 [green@Fr eB ] The difference is in the push method call.
  10167 [matz@ze ab t] on 01/01/30, "Brian F. Feldman" <green@FreeBSD.org>

How to use cgi offline mode
10105 [chrismo@ho e] Running Ruby on Win9x/NT -- if I run my cgi directly, there's an offline
+ 10109 [barry_shultz] CTRL-D  works for me.
| 10124 [chrismo@ho e] Thanks! I'd been trying ctrl-Z, and it just hangs on me then. ctrl-d did the
+ 10122 [julian.romer] Ctrl-Z under windows

security issues -just asking
10118 [botp@de mo t] does anyone know of any security issues (past or present) in running ruby? I
10119 [decoux@mo lo] See "[ruby-talk:02689] Re: Tainting" for the security mechanism,
10120 [botp@de mo t] got it.

RSVP (Ruby SerVer Pages -sort of :-)
10123 [botp@de mo t] Does anyone know of any server page written in ruby -sort of like Ruby
+ 10131 [chadfowler@y] You should look at eruby, erb, and IOWA (there may be
| 10132 [decoux@mo lo] Perhaps you want something like mod_ruby/eruby
+ 10133 [gnhurst@hu s] In PHP, I just use exec() or system() and use the result

Capturing Screen, Moving mouse
10125 [makotosu@my ] Is there a way to use Ruby to control a user's desktop?  I want to be
10148 [ben_tilly@ho] There is a primitive scriptable interface, see
10150 [jens@ir -n t] It might be possible to access the Desktop using

Problems with Ruby/Gtk
10126 [bombadil@wa ] I am using Gtk extension for Ruby and have found a little problem that I
10129 [decoux@mo lo] Try
10134 [bombadil@wa ] Thanks, but I have tried it... with same problem :(
10154 [sent@qu li y] Is MyLabel inside a box or other widget? If so,
10160 [bombadil@wa ] I put MyLabel instances inside a VBox, and think that should get something

Ruby for DOS
10128 [Dave@Pr gm t] I know about the old 1.4 binaries on netlab, but can anyone point me
+ 10130 [toshirok@yb ] For example, Nakada's
+ 10253 [snowzone@ho ] i'd like to see a version of ruby that would run on a 16-bit dos...i've got
  10258 [gotoken@ma h] ...
  + 10272 [eban@os ri .] Sorry, DJGPP requires at least 386SX CPU.
  + 10321 [snowzone@ho ] i don't think that will work
    10343 [gotoken@ma h] No, that won't.  As eban says [ruby-talk:10272], 386SX is required.
    + 10346 [eban@os ri .] 3.5 Can I run it on a 286?
    + 10355 [snowzone@ho ] that version of ruby is a 32-bit dos program...

Array's undocumented features
10136 [matju@ca .o ] I can't seem to find a complete description of Array#[] in any of the
10138 [Dave@Pr gm t] in our sense, we meant greater than the index of the highest element
10193 [  zak@al .c ] Actually once upon a time I prepared a patch to introduce negative
10220 [matju@ca .o ] I think it is pretty strange that a range x for which x.length == 0

Easy regex question
10137 [nconway@kl m] I just learned Ruby recently (coming from Perl/Java/Python), and I've got
+ 10139 [mike@st k. o] irb(main):008:0> puts str.gsub(/'/, "\\\\'")
+ 10140 [Dave@Pr gm t] This is ugly, so brace yourself...

ArrayMixin 0.2
10141 [matju@ca .o ] Second "release" of ArrayMixin 0.2, a future equivalent to Perl's TIEARRAY
+ 10143 [Dave@Pr gm t] I think this is marvelous stuff (and I'm looking forward to the File
| 10146 [matju@ca .o ] Another marvelous thing is Rubicon. Maybe you can adapt it to run on
| 10147 [Dave@Pr gm t] sometimes they'll be the 'real' array and sometime the array under
+ 10152 [dblack@ca dl] I'm finding ArrayMixin quite interesting, but I'm still stuck not seeing
  10157 [matju@ca .o ] In Perl you don't need to redefine the array slice. You don't need to
  10169 [dblack@ca dl] [etc.]

DateTime class for Ruby?
10142 [neumann@s- i] Is there a "DateTime" class in Ruby, which can handle dates before 1970
+ 10151 [andy@to ls e] Most people don't seem to care about time when dealing with
| + 10153 [ben_tilly@ho] I don't know what application they had, but there are
| | 10166 [andy@to ls e] Oh, agreed - and I think this ought to be implemented if
| | + 10170 [elderburn@mi] An astronomical database covering the last 6000 years?
| | | 10174 [wmwilson1@go] I know everyone here can't be under 30.... Don't ya think wanting to track birthdates (as actual dates instead of strings, obviously) and do some amount of diddling might be difficult as well?
| | | 10185 [schneik@us i] Mike Wilson (presuming that under 30 people were clueless (pun intended)
| | + 10201 [wmerrell@ho ] How about a genealogy program. Maybe grandpa was a twin, which one was older?
| | + 10239 [cyoungbl@le ] One common application that comes to mind is genealogy.
| + 10163 [neumann@s- i] I've just completing XML-RPC for Ruby.
+ 10165 [matz@ze ab t] on 01/01/31, Michael Neumann <neumann@s-direktnet.de>
+ 10210 [jvradelis@me] You might take a look at date3.rb (part of the date2 package).
  10270 [neumann@s- i] Thank you all for the comments and help, I'll have a look

Swig and Ruby
10144 [ptkwt@us r2 ] I'm wondering if anyone has had any experiences with using SWIG to extend
10173 [ljohnson@re ] Phil,

Refactoring the Ruby Foundation (was: ArrayMixin 0.2)
10149 [ntalbott@ro ] This type of thing really excites me as well. What I'd love to see some day

Defining class methods in a module
10155 [ntalbott@ro ] def MyModule
10156 [Dave@Pr gm t] Heh, this is Ruby!
10158 [decoux@mo lo] What you want probably is extend

O'Reilly Open Source Software Convention
10159 [schneik@us i] FYI.
10164 [matt@se ge n] I've submitted the proposal "Ruby for Perl Programmers" in the Perl track. I
+ 10184 [schneik@us i] # >
+ 10192 [gnhurst@hu s] In case a Ruby conference materializes here in the US, would you be
  10208 [matt@se ge n] Given travel and accomodation are paid for, sure. I'm travelling from
  10211 [matz@ze ab t] Software Convention"

Re: Problems with Ruby/Gtk [solved, ops!]
10161 [bombadil@wa ] You were right, obviously.
10162 [jens@ir -n t] The easiest option would be to point&click the GUI

IOWA - (eval):6: warning: already initialized constant Guest
10168 [jilanik@ti .] I receive this message (on the server) when I try to call from the
10189 [avi@be a4 co] If you modify a source file, IOWA reloads it... that means any constants

OT: Programming Ruby psychic?
10171 [wmwilson1@go] I don't know how Dave and Andy did it, but here's my funny little story.
+ 10172 [dblack@ca dl] Andy and Dave ... the Paranormal Programmers!
+ 10176 [Dave@Pr gm t] The hard part is personalizing each book to the future needs of its
  10178 [wmwilson1@go] I think you embedded Ruby inside the book so that it could dynamically rewrite the chapters in place... ;)

parser behavior ?
10175 [ted_meng@ya ] This ussue might have been brought up before.
10177 [decoux@mo lo] What do you expect with ?
10182 [ted_meng@ya ] I think many languages add until to compensate while
10212 [decoux@mo lo] Yes, this is equivalent to
10216 [ted_meng@ya ] To me,
10217 [decoux@mo lo] OK, but do you want the same for while ?

Embedded Ruby problems
10180 [olivier@vi e] I'm trying to embed Ruby into another C++ program, and I'm facing two
+ 10194 [cpine@fi ax ] I'm trying to embed Ruby into another C++ program, and I'm facing two
+ 10195 [masa@st rs g] Function "rb_set_end_proc(func, data)" might help.

Require loops
10181 [harryo@zi wo] I've written a number of numeric types that I want to be able to use
10183 [Dave@Pr gm t] There's a built-in mechanism called 'coerce' that might do what you
10187 [harryo@zi wo] Thanks Dave!  I'm printing it out to read on the train.  It looks like

Is this a bug in RubyWin?
10188 [0317025435@t] If I enter

if have_header question
10196 [declan@mc .c] when running    ruby extconf.rb

ctags and SciTE
10197 [sahuagin@me ] Made some quick changes, now you can use ctags with emacs, and SciTE
10199 [avi@be a4 co] What would be nice would be to produce a SciTE .api file for the Ruby base
10204 [Dave@Pr gm t] We hope to release them in XML form as soon as some legalities are
10205 [avi@be a4 co] SciTE seems to ignore all but the first definition for each method.  Is

POLS question: returning from a closure
10198 [dblack@ca dl] def rtest
+ 10200 [matju@ca .o ] "return" returns from "real" methods; for closures you have to return
| + 10202 [sent@qu li y] Yes. However, I quickly learned that "return" is
| + 10249 [dblack@ca dl] Interesting -- I see the workings of it now, though it's still on my
+ 10207 [jonas.bulow@] irb(main):001:0> c=nil
  10213 [raja@cs in i] Not a callcc surprise ... more of a transient error in ruby 1.7.0 .
  10265 [matz@ze ab t] from a closure"

10203 [sent@qu li y] Yes. I'll probably release it within a couple

Two Ruby Questions
10206 [matju@ca .o ] My Two Ruby Questions For Today
10264 [matz@ze ab t] Because it should not be a subclass of StandardError.
10361 [matju@ca .o ] thank you very much for your answers.
10365 [matz@ze ab t] Oops, you are right.  Let me think about it.

Market for XML Web stuff
10209 [matt@se ge n] I'm trying to get a handle on what the size of the market for AxKit would be
+ 10214 [maki@in c. o] *I* 'm very interested in Aplication server, like AxKit, for Ruby.
+ 10223 [joe@vp p. et] mod_fastcgi with ruby is stable and IMHO a much better architecture

Re: [ruby-list:27444] Re: NHK program
10215 [knu@iD em ns] You know, English speaking folks are very eager to get info by

limits on computation?
10218 [wmwilson1@go] Just fooling around some, I ran this
+ 10219 [Dave@Pr gm t] base = 1020939
| 10222 [wmwilson1@go] snip
| + 10224 [Dave@Pr gm t] If I pay the postage could you ship it over?
| + 10229 [mike@st k. o] [about 1020939**28329282]
|   10230 [wmwilson1@go] snip
|   10234 [Dave@Pr gm t] Damn. I _did_ try it, but not with big enough numbers. Because the
+ 10225 [matju@ca .o ] First of all, Perl makes no strict distinction between integers and
| 10227 [wmwilson1@go] sure, postage would be $400,000, $600,000 if you want the TB of disk too, that good? ;)
| 10228 [Dave@Pr gm t] Guess I'll wait for it to appear on eBay
| 10235 [matju@ca .o ] a = 2**2**29
+ 10236 [kanton@gm .n] The number you're computing will roughly have 200 million decimal

Embedded Ruby (PART II)- Ruby hackers help wanted :)
10221 [olivier@vi e] In yesterday's post, I tried to embed Ruby in another program with
10226 [decoux@mo lo] Why you don't read the script and then call rb_eval_string_protect(), or
+ 10259 [olivier@vi e] Well, I didn't know that those functions existed! I only read a little
+ 10260 [decoux@mo lo] pigeon% cat -n eval.c
  10269 [olivier@vi e] I will!

mod_fastcgi with Ruby
10231 [jilanik@ti .] Could you illustrate a little example on how to use it with Ruby?
10233 [joe@vp p. et] #!/usr/bin/ruby
+ 10237 [hgs@dm .a .u] Where is this?  I cannot see it in the RAA or in my libraries.
| 10246 [maki@in c. o] TAKAHASHI Masayoshi (maki@inac.co.jp)
| 10247 [avi@be a4 co] Man, that's a well hidden module!  I started writing such a thing at one
| 10267 [matz@ze ab t] I will give that library to anyone who is willing.
| 10418 [maki@in c. o] If no one take care for it, what about put it into Ruby's CVS
| 10639 [neumann@s- i] I have had a look on it.
| 10649 [knu@iD em ns] Can we assume it's available under the same license as Ruby?
| + 10677 [matz@ze ab t] Definitely.
| + 10679 [neumann@s- i] I would write a short documentation.
+ 10263 [jonas.bulow@] Where do I find "fcgi" for ruby?

ANN: Slide show available
10232 [Dave@Pr gm t] Last night I took my life in my hands and presented Ruby to the local
10266 [matt@se ge n] Which chapter, out of interest?
10278 [Dave@Pr gm t] Dallas. They even had to organize a special meeting for it (they
10286 [matt@se ge n] Thats the whole point of the Perl Mongers :-)
10292 [ben_tilly@ho] Indeed, and that is why I never have been and likely
10304 [matz@ze ab t] Well, same thing happens to me, although I don't have asthma.  I don't
10324 [ben_tilly@ho] I can't imagine why...
10337 [crippel@pr m] The best part (IMO a bit excessive) of California's anti
10351 [ben_tilly@ho] That is IMHO way too excessive.
10360 [crippel@pr m] I am somewhat suspect about the context of your
10362 [ben_tilly@ho] Then forget the phrase "neoteny", and note that it has

RFC: RubyVM (long)
10238 [feldt@ce ch ] I had planned to work a bit more on this before posting but since the
+ 10364 [matju@ca .o ] I'd like to see a draft of the bytecode format description when Matz
| + 10366 [feldt@ce ch ] Me to.
| | + 10367 [matz@ze ab t] Yes, a lot.  Every scopes and several others are GC target objects.
| | | 10369 [feldt@ce ch ] Ok, then I guess we can write the GC/ObjectMemory first and then use that
| | | 10370 [matz@ze ab t] According to the grep result,
| | + 10377 [noel.rappin@] I'm not an expert on the Squeak VM, but I have been a Squeak user for a
| | + 10743 [matju@ca .o ] I prefer not to discuss about RubyVM at all for now, because I feel there
| |   10745 [john_van_v@y] ...  it'll not be easy and will require tight integration with a VM/run-time.
| |   + 10758 [ben_tilly@ho] We have disagreed on this before, and before we disagree
| |   | 10777 [feldt@ce ch ] Oops, I'll cross-post to ruby-talk. Missed that on the previous post...
| |   | 11126 [matju@ca .o ] * ArrayMixin
| |   | 11517 [feldt@ce ch ] It's been a busy week but I'll try to pack it up and send it in the coming
| |   | 11543 [matju@sy pa ] No problem, I took a week to reply to your previous large mail.
| |   + 11115 [matju@ca .o ] "Writing L in L" is called metacircularity.
| |     + 11117 [feldt@ce ch ] Is there an appropriate word for what you want to do or are you still
| |     | 11199 [matju@ca .o ] There are words for many little parts but not for the whole. I'm not
| |     + 11150 [nconway@kl m] Excuse my ignorance (as a pre-CS person), but why is metacircularity
| |       + 11178 [ben_tilly@ho] The idea is, of course, much older than that.  The
| |       | 11202 [matju@ca .o ] Yes, yes, but I didn't want to go into details. Basically, COBOL didn't
| |       + 11201 [matju@ca .o ] It's an essential feature because it's very groovy.
| |         11209 [crippel@pr m] Ps. I prefer a functional subdivided ArrayMixin because it
| + 10856 [someone@mi r] What about an implementation of Ruby that works in the Java VM?  There are
|   10882 [matz@ze ab t] JVM was designed for Java.  It's not impossible, but pretty difficult to
+ 10847 [phillidNOSPA] this might save you some time....
  11198 [matju@ca .o ] Ok. May you point me to documentation?
  11226 [feldt@ce ch ] I agree. I mailed the developers of ICVM and their reply was not very

Re: ANN: Slide show available(Publicity for Ruby)
10240 [ptkwt@us r2 ] It might be a good idea to also forward announcements like this to places
+ 10241 [chadfowler@y] Aleksi has already started something like this at
| 10242 [wmwilson1@go] I would second that!  Let's face it, PR can really make or break a language, I'd hate to see Ruby left in the dust because we weren't vocal enough.
| + 10243 [wmwilson1@go] Sorry Aleksi, I screwed up your name, please forgive me.
| + 10244 [nconway@kl m] I've been thinking of writing one for kuro5hin.org -- if someone with more
| + 10381 [0317025435@t] language, I'd hate to
+ 10248 [Dave@Pr gm t] 'tis done (good idea).
  10252 [schneik@us i] # Let's face it, PR can really make or break a language, I'd hate to
  10255 [ben_tilly@ho] Um, you just did indirectly.  I forwarded the above to him.
  10256 [ben_tilly@ho] Erm, these slide look suspiciously familar.
  10257 [Dave@Pr gm t] Heh - I even admit to it on the index page ;-) The main difference is
  10273 [jweirich@on ] I love that cookbook example.  Replicate the algorithm, tidy it up,
  10274 [jim@fr ez .o] This sounds very interesting.
  10279 [Dave@Pr gm t] It starts at