6348-7087

6134-6492 subjects 6551-6839

interpreter does nothing in interactive mode
6348 [eluddite@my ] I cant get a proper install on RedHat-7.0. Make
6349 [matz@ze ab t] Well, unlike Python, like Perl, invoking Ruby without script does not
6374 [eluddite@my ] mode"

rescue clause affecting IO loop behavior
6354 [dblack@ca dl] My goal here is to implement and use the method String#is_end? to test
6356 [decoux@mo lo] write it like this
6360 [dblack@ca dl] [snip my version]
6363 [decoux@mo lo] You don't have the same 'begin'
6367 [dblack@ca dl] I see what you mean, at least as far as the behavior goes.  But I don't see any
+ 6368 [Dave@th ma e] So do I ;-)
| 6371 [matz@ze ab t] Aaaagh.
| 6372 [Dave@th ma e] Is this a feature with a good reason, or just some side effect of the
| 6378 [matz@ze ab t] I made this on purpose.  The decision was made years ago.  I think I
| 6434 [dblack@ca dl] Maybe it's just because I was not expecting the current behavior, and
| 6654 [cjon@sa ph r] I agree with this, except when it comes to the word 'illegal'.  Too many
| 6655 [schneik@us i] # > Maybe it's just because I was not expecting the current behavior, and
| 6718 [cjon@sa ph r] I think it could start out that way, but (maybe when changing minor
+ 6379 [decoux@mo lo] pigeon% ruby -rii
  + 6380 [Dave@th ma e] OK, I'll bite. What are you saying?
  + 6381 [decoux@mo lo] DEFN fred
  | 6382 [Dave@th ma e] Agreed. I was just noting the fact that we'd failed to document this
  + 6732 [cjon@sa ph r] This is very interestinglookin but I tried it on my system and it

break and http
6359 [ no@sp m. om] Why doesn't break exit the iterator with http?
+ 6365 [decoux@mo lo] It give the same result with this example, problem or not ?
+ 6394 [aamine@dp u-] Thank you reporting.
  6398 [ no@sp m. om] Wow!  Thanks for quick fix.  (I thought it was just something I didn't

What does the Japanese 'hoge' mean?
6361 [Dave@th ma e] Is the the equivalent of 'foo'?
6362 [kikutani@ga ] I guess so...

Is  xfree() the proper counter part to ALLOC_N() or ALLOC() ?
6369 [jsmall@la er] In an extension to Ruby I allocate memory with ALLOC_N() and ALLOC().
6376 [shigeo@ti yf] ALLOC() ?
6389 [shigeo@ti yf] ALLOC_N() or ALLOC() ?

Possible bug in rb_str_cat() function
6370 [jsmall@la er] I think I found a bug in
6377 [matz@ze ab t] rb_str_cat() used to have a bug for the case of concatenating a string

1.6.x documentation.
6383 [hgs@dm .a .u] 1.6 has new features over 1.4
6419 [matz@ze ab t] We are going to upload the whole reference manual to Wiki or CVS.
6420 [bombadil@wa ] Please, also in a printable format ;)
6425 [hgs@dm .a .u] Great news.  Thank you.

lots of Threads
6386 [hgs@dm .a .u] If I have an array to be filled with computationally heavy stuff,
6387 [Dave@th ma e] But why would that be faster? Ruby threads can't take advantage of
6391 [hgs@dm .a .u] I'm not sure that it would.  Certainly if I have to create and destroy
6392 [hipster@xs a] Unless you spread the work over multiple processes using fork instead
+ 6393 [hgs@dm .a .u] I meant to say "repeatedly" here, hence my loop {...;Thread.stop} thing.
+ 6395 [hgs@dm .a .u] Yes, that looks good.  It is pretty clear what is going on [and it is
| 6396 [hipster@xs a] Yes, this is a good idea. Replace
+ 6397 [matz@ze ab t] * scheme to get list of existing threads
  6408 [green@Fr eB ] You can do something like this.  It will let you always have whatever
  6411 [matz@ze ab t] <snip Ruby/C mixture to explain the idea>
  6415 [green@Fr eB ] Well, in this case, wouldn't you have something like this?

CORBA and Ruby (OAF bindings??)
6390 [shreeve@s2 .] I'm interested in interacting with another machine via CORBA and I'd like
6435 [yashi@ya hi ] how about ILU? wasn't GNOME moving to use both ILU and CORBA? I saw

Array.fill with block?
6401 [hgs@dm .a .u] Does anyone else think that it might be a good idea for Array.fill to take
6402 [matz@ze ab t] You mean that Array#fill with a block should be faster since it
6403 [hgs@dm .a .u] For large arrays it adds up...  Well, I just wondered if it was worth

Ruby DBI::ODBC module version 0.1 ready for use on Windows compiled Ruby.dll.
6409 [jsmall@la er] ODBC driver (DBD) which

clas << a & Pascal's with <record> do...end
6412 [hgs@dm .a .u] I was thinking that when a lot of work must be done on an object
+ 6414 [ms@ia ta e. ] Given a convention that destructive methods could be counted on to
| 6418 [ms@ia ta e. ] Actually this doesn't help does it, not with efficiency anyway. Just
+ 6416 [matz@ze ab t] How about the following?
  6424 [hgs@dm .a .u] So you added the feature I wanted before I asked for it.  That _is_
  6428 [matz@ze ab t] I meant you might want to define an better name alias to

[Info] relay between NetNews and ML will stop this weekend.
6413 [nosuzuki@e- ] The relay system will stop exchanging messages between NetNews and

Where is T_RANGE?
6417 [feldt@ce ch ] Why T_ARRAY, T_HASH and so on but not T_RANGE? Is it there somewhere? If
6422 [matz@ze ab t] Since Range uses T_OBJECT structure.
6426 [feldt@ce ch ] Yeah, but is there any special reason (or is it a "development artefact")?
6427 [matz@ze ab t] Simple reason: no special structure was needed.
6430 [matz@ze ab t] By the way, I'd advise you NOT to use the RXXX struct too often.

Tainted objects
6421 [bombadil@wa ] What is a tainted object. For what is it used?.
6423 [decoux@mo lo] See [ruby-talk:02689]

Two-Way Pipes with popen
6431 [jweirich@on ] I want to start a process and feed it information through its standard
+ 6432 [Dave@th ma e] pig = IO.popen("pig", "w+")
| 6433 [jweirich@on ] Thanks.  I missed the close_write call.
+ 6436 [matz@ze ab t] Try open3 library.
+ 6437 [c.hintze@gm ] require "open3"

variable in regular expression
6438 [mjais@we .d ] I have recently bought the new book about ruby and are new trying to learn.
+ 6439 [kikutani@ga ] line.sub!(old,  new) doesn't work ?
| 6440 [decoux@mo lo] This is the same than perl (it begin at 0)
+ 6441 [Dave@th ma e] Firstly, you don't need the //'s in the call to sub. It works out that
+ 6442 [dblack@ca dl] In addition to the other (more relevant) advice you've already
  6443 [Dave@th ma e] In fact you could increase efficiency more by only returning those

Ruby tokenizer for Ruby
6444 [charleshixso] Does anyone know of a Ruby tokenizer for Ruby?  In particular, I am bother
6445 [Dave@th ma e] Have a look at IRB - it have a Ruby lexical analyzer.
6446 [ddabbs@ze er] Is there a parser generator available with bindings for Ruby? I'm interested
6447 [matz@ze ab t] RACC or rbison, both available at http://www.ruby-lang.org/en/raa.html

Did Ruby take the _right_ features from Smalltalk?
6448 [parse@my si ] The Ruby book is great, and I've learned a lot reading it.  (Haven't
+ 6449 [Dave@th ma e] I believe that keyword parameters are due in a coming release of
+ 6450 [ms@ia ta e. ] There are other reasons besides wanting to look like C - efficiency

rbison 0.0.6 released
6451 [aseltine@cs ] Since matz actually still mentions rbison from time to time :), I decided to
6452 [aleksi.nieme] Just to let you know you _have_ at least one fan. Great hack - plain, simple

GUI in ruby
6453 [gawron@ob p.] I would like to get some experiance in Ruby with some portable GUI (MS
6454 [aleksi.nieme] There're at least two options: GTK
+ 6455 [aleksi.nieme] Um, for the sake of completeness one should not skip over the whole
| 6456 [schneik@us i] # I would like to get some experiance in Ruby with some portable GUI (MS
+ 6481 [js@ad pt co ] Coming from a wxPython background, I second that!  How portable is
  6485 [schneik@us i] #
  + 6486 [yashi@ya hi ] would you add a few line if you have tried pygtk?
  | 6489 [schneik@us i] #  How portable is ruby-fltk and the gtk-bindings?
  | 6490 [yashi@ya hi ] but, i have no idea how well they are doing since i don't have mac
  + 6650 [js@ad pt co ] Programming is only my hobby, but it may become my profession.  Some
    6651 [mjais@we .d ] AFAIK will the new GTK+2.0 also be availabe for Windoze.
    6720 [matju@ca .o ] BTW, at http://gtk.org, Ruby is not in the list of language bindings.
    6737 [spcoltri@hr ] I mailed the webmaster about this a few weeks ago.  No reaction.
    6742 [aleksi.nieme] If I recall correctly, some time ago the author or maintainer of Gtk binding
    6810 [wy2lam@st de] Okay...is anyone here familiar with rxPython?  It is apparently done with SWIG
    6811 [schneik@us i] # Okay...is anyone here familiar with rxPython?
    6861 [schneik@us i] Can
    7087 [fukusima@go ] I'm sorry I couldn't respond quickly.  Yes, I have been away from

comp.lang.python "Ruby and Python" thread item
6457 [schneik@us i] There is an interesting comp.lang.python "Ruby and Python" thread, wherein

Symbols.
6458 [hgs@dm .a .u] I'd like to know a bit more about Symbols.  I know that if a variable,
6460 [Dave@th ma e] A symbol is simply an internal representation of a name. You could
6465 [hgs@dm .a .u] Oh, I see.  So then there is no danger in creating them at will then.

question about memory usage of a script
6459 [usenet-2000-] The following script uses more memory as N gets bigger.  Should I
6511 [masato@cs s.] I think that this script will run constant space,

Is there a FITS_IN_UINT(v)?
6461 [feldt@ce ch ] Since Ruby frequently has the stuff you tend to need I'd like to know if
6462 [Dave@th ma e] Do FIXABLE (and POSFIXABLE, NEGFIXABLE) in ruby.h do what you want?
6463 [feldt@ce ch ] No, I need a directive or function that returns true if 0 <= v <
6464 [Dave@th ma e] Can you compare against UINT_MAX from limits.h?
+ 6466 [feldt@ce ch ] Your reply indicates that there is no such thing there already so I
+ 6468 [matz@ze ab t] Not always, e.g. where sizeof(VALUE) == sizeof(long) > sizeof(int).
  6470 [Dave@th ma e] True, I assumed that we were only looking at positive numbers being

Release Schedule?
6467 [hgs@dm .a .u] The new stable version 1.6.1 is released (00/09/27)
6469 [matz@ze ab t] Good question.
6493 [hgs@dm .a .u] OK, thanks for letting me know.

Function declarations?
6471 [mak@im kh o.] I was wondering if it possible to obtain a reference to a function before it
6472 [Dave@th ma e] Sort of...
6474 [mslagell@ia ] #!/usr/local/bin/ruby

Dr. Dobb's Python-URL! ... (Nov 20) ... "Ruby and Python" thread
6473 [schneik@us i] I had a couple of questions about the following item, wherein Just van
6475 [matz@ze ab t] It used to be correct.

%x{...} and ` not working?
6476 [d99-nba@na a] I'm reading The Book, and I was trying out %x{dir} et al on
+ 6477 [hal9000@hy e] I know what's happening, but I'm not sure how
| + 6478 [Dave@th ma e] Under NT, %x{cmd /c dir} works.
| + 6479 [d99-nba@na a] Update below...
+ 6483 [phasis@ha an] Insert 'command.com /c' before internal DOS command.
  6495 [d99-nba@na a] Thanks, it almost worked now! But this is getting weirder by the minute...

Ruby and Expect
6480 [rpmohn@pa ix] I saw some stuff buried deep in the "Thoughts on a Ruby browser" thread

Compile Ruby on AIX
6482 [nospam@hc ne] Today i gave a version of ruby (1.6.1) to a colleage who works with AIX.
+ 6484 [crutherf@my ] AIX.
| 6488 [schneik@us i] # Today i gave a version of ruby (1.6.1) to a colleage who works with AIX.
+ 6516 [vardhan@ca e] somehow conbfigure has detected that you are cross compiling

How does Ruby compare with ....?
6487 [Dave@th ma e] Following on from John Dell'Aquila's great comp.lang.python post
6501 [manamist@wh ] Well, how about that?
6502 [Dave@th ma e] It's a nice sentiment, but I was looking for something slightly more

comp.lang.tcl -- The "Batteries Included" Distribution [LONG]
6491 [schneik@us i] FYI, the post that follows makes several interesting and important points

about proposals and organisation. Was "Batteries Included" Distribution
6494 [hipster@xs a] Now this is something I'd really like to see for Ruby (e.g. RAP / Ruby
6497 [hgs@dm .a .u] Do you mean have both of these?
6500 [hipster@xs a] I didn't mean to say that. A formalised RAP mechanism would probably

ANN: BitVector 0.1.5
6496 [feldt@ce ch ] I've been posing dumb question on ruby-talk for so long now that I think
6498 [schneik@us i] # I've been posing dumb question on ruby-talk for so long now that
6499 [feldt@ce ch ] Fixed in next release... :-)

redefining methods in a hierarchy.
6503 [hgs@dm .a .u] If I have an object which I know to be a subclass of a subclass (at lease)
+ 6504 [gotoken@ma h] Are you looking for something like this?
| + 6505 [hgs@dm .a .u] I'm looking for exactly that. :-) Thank you.
| + 6508 [yashi@ya hi ] p Array.whereis :dup            #=> Kernel
|   + 6509 [schneik@us i] Robert Feldt writes,
|   + 6515 [gotoken@ma h] ?? I think there is no problem.
+ 6506 [gotoken@ma h] prohibit redefinition.  See RAA:preserved,
  6507 [hgs@dm .a .u] Yes, that is a good point.  Knowing enough knots means hanging oneself is

Range#== not defined?
6510 [grady@sc m. ] about this language.  I'm definitely just starting to learn my way
6519 [matz@ze ab t] The former.  No one noticed this simple fact before.  Thank you.

rbison 0.0.7 released
6512 [aseltine@cs ] _______________________________________________________________________

Question about the behavior of write attributes in blocks
6513 [chr@su di en] I am trying to understand iterators and blocks in Ruby.  Could someone
6514 [aleksi.nieme] I changed the code a little, to make it more illustrative. The revised code
6517 [chr@su di en] Thank you very much for your insightful (and speedy) response.  Is it at all
6518 [aleksi.nieme] I'm not sure what you're looking for, but maybe this is some kind of answer
6533 [chr@su di en] Thank you for explanation - the output of "x".inspect() is
6534 [Dave@th ma e] You could write this as
6538 [chr@su di en] I lifted the following two lines from your (great) book - Page 285
+ 6539 [schneik@us i] Hmm, no answer yet? Where is everyone?
| 6541 [chr@su di en] Sorry (about the period) my mistake ...
| 6544 [chr@su di en] On a unrelated note why does
+ 6540 [Dave@th ma e] You have an extraneous '.' at the end of the first line. Ruby says
  6543 [chr@su di en] Thank you for your explanation.  Bignum objects unlike Fixnum objects are

Ruby Gathering in Toronto
6520 [bryan_zarnet] I was wondering if their are any Ruby programmers in

Time Trouble
6521 [d99-nba@na a] here I am with my small problems again! =)
+ 6522 [Dave@th ma e] What is your system's timezone set to?
| 6526 [d99-nba@na a] It simply says "GMT+1:00" on this one (Win98). On my
| 6527 [hgs@dm .a .u] I think you are right: this is incorrect.  In the summer it should
| 6528 [d99-nba@na a] Yeah, if you want to create an object referring to something
| + 6529 [hgs@dm .a .u] Maybe it does, but it is not creating the times with the same timezone
| + 6530 [Dave@th ma e] Which it does under Unix, but not (apparently) under Windows: I just
+ 6536 [mcbreenp@ca ] This is the old clock forward/back problem that occurs whereever
| 6537 [Dave@th ma e] The other side of the POLS is consistency: on Unix boxes you get
| + 6542 [matju@ca .o ] I may be wrong, but last time I checked, Windows had an incomplete time
| + 6547 [mcbreenp@ca ] is
+ 6545 [vardhan@ca e] looks like daylight savings
  6560 [d99-nba@na a] I'm using Windows -- How could my timezone possibly

alias_method and > and <
6523 [hgs@dm .a .u] The operators > and < don't seem to be in the list of things one cannot
6524 [Dave@th ma e] class Fixnum
6525 [hgs@dm .a .u] OK, but how do I do that in a module?  alias doesn't work there either.
6555 [matz@ze ab t] append_feature
6559 [hgs@dm .a .u] OK.  I think I may have found the error: no comma between the arguments.

Faster to roll you own case statement?
6531 [hgs@dm .a .u] When converting code to use symbols instead of strings I got a slowdown.

Re: Ruby vs. UML ?
6532 [Dave@Th ma e] This is something we're currently in the middle of, so what follows
6535 [rpmohn@pa ix] Okay, so it's kind of XP to the eXtreme ;-)
6546 [rpmohn@pa ix] Who says you have to actually talk about it!

Small note on docs for Array#[]
6548 [feldt@ce ch ] IMHO the text
6554 [matz@ze ab t] For getting subarray, `index' means the start point of the subarray.

RangeError vs. IndexError
6549 [feldt@ce ch ] Any ideas on when to use RangeError as compared to IndexError? Where in
6553 [matz@ze ab t] Traditionally RangeError is used to describe numerical ranges.
6568 [feldt@ce ch ] Do you mean that RangeError should only be used when there's a problem
6576 [matz@ze ab t] No.  I believed all usage of RangeError is related with numerical

Note on docs for Array#reverse!
6550 [feldt@ce ch ] IMHO the sentence
+ 6552 [Dave@th ma e] a = "one"		# => "one"
| 6567 [feldt@ce ch ] Not in my opinion. Thanks for straightening this out...
+ 6556 [matz@ze ab t] For reverse! behavior, `unchanged' means array size is either 0 or 1,
  + 6557 [Dave@th ma e] If I can add text without causing different pagination, I'll expand
  + 6569 [feldt@ce ch ] Ok, thanks. I'll do the same in my BitVector class.
threads.html
top