51118-53848 subjects 51532-52586

ANN: REXML 2.4.2 and 2.5.2
51194 [ser@ge ma e-] Sorry for the delay in this release, folks.  I moved cross country

RE: Yet Another "Thickie" question / Random Range
51200 [mark.firesto] I have to get my head around having "lots of memory" and not being limited
51207 [mike@st k. o] def random(r)
51303 [mark.firesto] Hey!  That works great!  Thanks!

Re: select and selectZ
51205 [hgs@dm .a .u] What about
51238 [gsinclair@so] Very good!

Regular expression object question
51206 [djberge@v5 h] Is there a way to add a new regex to an existing regular expression
+ 51215 [billtj@y. lu] Well, if your regular expression is not very complicated, you can
| 51230 [djberge@qw s] Good idea.  What about overloading += for the source method?
| 51232 [billtj@z. lu] I don't know whether it is worth an RFC (what is RFC?)
| 51234 [vjoel@PA H. ] irb(main):001:0> /ab/+"cd"
| 51241 [gotoken@no w] I don't know the reasons but I can imagine
+ 51266 [bulatz@in eg] class Array
  51308 [djberge@qw s] I wouldn't go out of my way to prevent people from shooting themselves in

A Ruby-C Interface Model: Part II
51218 [billtj@y. lu] Using Tcl a long time ago, I found it relatively easy to use Tcl as a

Fwd: ApacheCon: Less than a week left for early-bird savings
51219 [sean@ch tt n] Howdy folks, just an FYI.  Please feel free to forward this on to

ruby and mktemp/mkstemp
51224 [pbrannan@at ] Looking through the 1.7 source, I don't immediately see any wrapper for
51237 [gsinclair@so] See the Tempfile class in Pickaxe.
51297 [pbrannan@at ] Hahaha, I've even used that class before and I had forgotten all about

FXRuby problem
51240 [en4certech@y] I'm trying to write a small FXRuby program that will
51293 [lyle@us rs s] <... snip ...>

FW: The Perl Journal--Back in Business!
51242 [james@ja es ] Regarding an earlier thread on the revival of The Perl Journal, and a

Newbie question: Calling a shell script from ruby
51245 [ZSethna@rs s] Apologies if this question is already answered in the doc. How do I call a
+ 51249 [gsinclair@so] `shell script`
+ 51251 [gotoken@no w] A simple way is
  51252 [ZSethna@rs s] thanks all :-)
  51253 [michael.d.he] That works if foo.sh has "#! /usr/bin/env perl -" (or the not-made-up
  51254 [gotoken@no w] Thanks for helpful supplementation.  But why perl for foo.sh?  :)
  + 51257 [michael.d.he] I thought that Zubin's original question was about calling perl scripts.
  | 51258 [ZSethna@rs s] yes, my question was about calling perl scripts. I didn't state the platform
  + 51314 [nobu.nokada@] Note that it works on systems support #! by kernel - almost

ZenTest 1.0.0 released - automatic test/code writing
51246 [ryand-ruby@z] ZenTest scans your target and unit-test code and writes your missing

constructing closures on the fly
51276 [bulatz@in eg] ok, that's my problem: i had large list of filenames (100k strings,
51284 [szegedy@no p] I think that your approach is quite OK.

mkmf.rb (1.7) causing confusion on mswin32
51277 [skywizard@ti] I just notice few mistake in mkmf.rb (ruby 1.7.3) since Sept 24,
51280 [usa@os .a t.] I've committed it.

warning: overriding global function 'initialize'
51286 [skywizard@ti] class A
+ 51299 [gminick@un e] Is it all ?
+ 51302 [matz@ru y- a] Sorry, it will be fixed soon.

no RWN this week
51291 [pate@ey er a] Sorry everyone,

lab information mgt system (was: call for commentary...)
51311 [fewayne@fa s] tion

Re: call for commentary: review of Ruby IS FINISHED, YAY!
51312 [fewayne@fa s] i've sent it off the article to the magazine, so the only folks i'll be

51315 [manfred@to p] is this possible with http/net .
51316 [decoux@mo lo] Well, if you use basic authentification you have in the documentation
+ 51320 [manfred@to p] Thanks for your advice.
+ 51324 [jim@fr ez .o] First, let me say that I am a net/http dummy.
  51329 [jim@fr ez .o] ./get.rb
  51335 [gotoken@no w] should be Net::HTTP.start(host[, port]){|http|
  51344 [jim@fr ez .o] ================================================
  51346 [gotoken@no w] html = ....
  51359 [jim@fr ez .o] [#<URI::HTTP:0x409000e URL:http://xyz.mycompany.com:3000/scripts/isynch.dll?SyncNotesTopMenu>, #<URI::HTTP:0x408fd66 URL:http://xyz.mycompany.com:3000/scripts/isynch.dll?panel=TclScript&file=QuickView.tcl>, #<URI::HTTP:0x408fa50 URL:http://xyz.mycompany.com:3000/scripts/isynch.dll?SyncNotesTopIntro>]
  51360 [aamine@mx ed] Other Net::HTTP methods do NOT accept URI objects.
  51361 [aamine@mx ed] This change is done ***in 1.7***.

Newbie, threads
51321 [stathy.toulo] I want to start a thread from within the initialize method.  This thread
51326 [vjoel@PA H. ] The block is a closure, so self, local vars (like timout), and even

Is There a Formal List on What "Surprises" in Ruby?
51322 [billtj@y. lu] I think from time to time there are discussions on things that people find
+ 51333 [lyle@us rs s] may give you some ideas about things that are frequently asked about.
| 51336 [billtj@y. lu] Actually I am thinking something more like Andrew Koenig's "C Traps and
| 51343 [harryo@zi .c] The first chapter of "The Ruby Way" discusses quite a few items that could go
| 51345 [billtj@y. lu] Thanks for the information.  Probably I should take a look at the book (so
+ 51337 [dblack@ca dl] I think that's a good idea, though I would encourage you to avoid
  51342 [billtj@y. lu] It is a very good point.  How if I call it officially "Things That
  51436 [batsman.geo@] This looks to me like the kind of thing the Wiki would be good for...

Expanding an array to function args
51325 [whitton@at a] list given to a method in one easy step. The following contrived example
+ 51327 [billtj@y. lu] In your example you can simply use the "*" when calling the function,
+ 51328 [alan@di ik t] Yes there is, placing a * ahead of the array expands the arguments,

51334 [bello_mohamm] ...

Last days to register for RubyConf!
51338 [dblack@ca dl] Registration runs through Monday.  So all you holdouts and

51347 [stathy.toulo] Is the DBI module the preferred method for database connectivity?
+ 51348 [info@mj is d] that depends. if you want to be portable between several databases, then
+ 51482 [adamon@ma la] Speaking of DBI, I've been looking for a Postgresql DBD for Windows

getting all classes within a module ??
51349 [info@mj is d] is there a way to get all classes defined within a module ?
51351 [vjoel@PA H. ] ^^^^^^^^ what is this?

Set Union on Array of Objects
51350 [mah69@em il ] Why do array subtraction and array union not behave in the same manner
51362 [billtj@z. lu] You have a very interesting case.  It seems that while array subtraction
51367 [bulatz@in eg] such methods can try to use

[OT] Re: select and select
51354 [rich@li hi o] Speaking of log in...

complete novice..., where to begin...?
51356 [jac@av te h.] where would a complete novice (to ruby; have some vb experience, but MS
+ 51357 [Graeme.Matth] Jon
+ 51358 [billtj@z. lu] After you execute the rubyxxx.exe, do you see a Ruby folder in the Windows

[ANN] Ruby/CorporateTime 0.1.0
51363 [ian@ca ib n.] This is to announce Ruby/CorporateTime.

Some nice examples for presentation on the lugcon
51368 [kybu@ky u. k] I have presentation at the Slovak's Lugcon about ruby, and i will very
51369 [bulatz@in eg] best examples i seen is in matz's letter for ddj (find ruby at ddj.com)

adding overloading to ruby
51381 [bulatz@in eg] may be instead of dicussing adding overloading to ruby we must

Const vs warning
51385 [papap@gm .n ] Although a newbie, I am really impressed of this powerful and consistent
+ 51386 [dblack@ca dl] Welcome, nuby!
+ 51387 [jason@jv eg ] When you create a constant in Ruby (by capitalizing the variable name)

Is Ruby's grammar LL(k)?
51389 [batsman.geo@] ...or better yet LL(1)? Can a recursive descent parser work with all of
51587 [nobu.nokada@] Perhaps, it really wants LALR(k) or possibly LL(k), where k is
+ 51607 [probertm@no ] Is this due to the use of yield and blocks?  Or do you think
| 51662 [batsman.geo@] Why should yield and blocks be any harder to parse?
+ 51669 [batsman.geo@] But right now Ruby's main implementation uses bison, ie LALR(1). I'm not
| 51709 [mikkelfj-ant] There is a difference between grammar and language.
| 51771 [batsman.geo@] So I understand we can possibly create a LL(2) [according to matz]
+ 51715 [matz@ru y- a] I think the current implementation requires two look ahead for the
  51717 [mikkelfj-ant] Can't this be written with
  51751 [probertm@no ] I agree with that.  LL(1) has more of a issue, I think,
  + 51753 [billtj@y. lu] I am sorry, I know the code below is just an example.  But will I be
  + 51794 [mikkelfj-ant] You can easily handle many of Rubys linebreak rules if you include linebreak
    51961 [probertm@no ] It is true that Ruby parsers exist, the question was more related to LL(1)
    51986 [mikkelfj-ant] The above are the same form - you can have the rule

bdb + BerkeleyDB + ruby 1.6.7 + Cygwin
51392 [leikind@mo a] I mostly use Ruby on Linux, but now I have to port
51396 [decoux@mo lo] You must use bdb-0.3.5 with 4.1.24
51501 [leikind@mo a] Thank you, sorry for not reading the docs carefully ;-(

RDE linefeeds
51400 [Mark.Volkman] ...

Ruby/Tk + UTF-8
51402 [pbrannan@at ] I have an application (a program to quiz me in Greek) that currently
51614 [mvondung@gm ] I believe the font is the problem. I looked at it and it doesn't
51620 [pbrannan@at ] It's a Unicode font, and has the characters I need, though they aren't
51625 [mvondung@gm ] I realised this after I had a cup of coffee (actually, while I had it)

Short Presentation on Ruby
51407 [jon@fr g. rd] Dear All,
+ 51417 [armin@xs .d ] make sure to look here to recycle some ideas.
+ 51519 [hal9000@hy e] My top three are: iterators, "everthing's an object", and open classes.

block syntax was: call for commentary: review of Ruby for a magazine (long, sorry!)
51410 [mikkelfj-ant] That's nice - but it is not clear whether indentation is important in your
51412 [billtj@z. lu] Totally agree, Mikkel, I also found too many "end"'s.

object attributes list
51421 [ajksharma@ya] I have a Object
+ 51445 [transami@tr ] i did this using #instance_variables
+ 51449 [billtj@z. lu] I think the key to what you want to accomplish it the
| + 51585 [ajksharma@ya] Thanks , it works.
| + 51601 [kentda@st d.] This works wonders as long as
|   51603 [decoux@mo lo] Well, actually my stupid implementation do this
+ 51840 [list@NO PA c] Put them in a hash in the first place.

Weird Array.flatten behaviour with DBI
51433 [whitton@at a] it with DBI. The problem is that it doesn't seem to flatten out results
51443 [uu9r@rz un -] Method fetch_all returns DBI::Row objects, not Arrays!

Ruby/Tk or mod_ruby or what ??
51444 [GBanschbach@] Dear All,
+ 51450 [mgushee@ha e] And something that will run with less than a gigabyte of memory, maybe?
+ 51456 [billtj@z. lu] I think this is because unlike Tcl, with its definite Tk companion, there
| 51458 [     NO@SP M] A suggestion could be to have Ruby interact with a widget server,
| + 51460 [billtj@z. lu] No problem, Basile, someone has written an interface between Ruby and Lua
| | 51466 [     NO@SP M] Actually I could even make it simpler: the glue between Lua (or maybe
| + 51465 [mgushee@ha e] That's an interesting idea. How would it affect performance? Or more
|   + 51477 [     NO@SP M] I did use and code with NeWS around 1993 on a Sun3/160 [or perhaps a
|   + 51478 [mikkelfj-ant] X terminals have existed since much slower processors and networks.
|     51480 [mgushee@ha e] That's true, but in those days people were using Athena widgets or raw
|     51490 [mikkelfj-ant] connection. I
+ 51457 [lyle@us rs s] You don't explicitly state which Ruby/Tk tutorial(s) you looked at, but

Ruby program design question ( Pattern or AntiPattern ?)
51459 [comp.lang.ru] - - I find myself repeating this kind of pattern over and over
+ 51469 [mikkelfj-ant] You should consider using mixins.
+ 51547 [bulatz@in eg] bclrS20tse> - - I find myself repeating this kind of pattern over and over
  51668 [comp.lang.ru] - - Here's a trivial example. I've been using ifile to help sort
  51683 [batsman.geo@] [deleted]

Signalling object destruction eligibility
51472 [stathy.toulo] Is there a way to invoke a method when references to an object have gone
51481 [billtj@y. lu] Not immediately, I guess, as Ruby uses mark-and-sweep gc instead of

/ADV / The Best Business Opportunity on Net
51484 [kastelic.maj] ...

Ruby - common pitfalls?
51486 [AntiATField_] Is there a list of common pitfalls beginners in this language should
+ 51487 [alan@di ik t] Note that you get warnings for this when using ruby -w
| 51494 [AntiATField_] I know - but then the code already has been written. I think it just has
| 51499 [alan@di ik t] Agreed.. maybe the pitfall is not running with ruby -w during development :)
| 51521 [skywizard@ti] Simply
| 51527 [mikkelfj-ant] pressing F5 (to execute script) in the Scite editor will give you warnings
+ 51491 [billtj@y. lu] I just offered my service to start compiling "Things That Newcomers to
| 51503 [AntiATField_] Thanks.
| 51511 [gsinclair@so] Instead of finding "workarounds" to make Ruby look like Pascal or Bash, why not
| 51582 [AntiATField_] -w tells you the error *after* you have done it. It would be better it it
| 51617 [gsinclair@so] not
+ 51508 [matz@ru y- a] Hmm, if you are Pascal addicted, you have to write
| + 51514 [billtj@y. lu] I just created this list starting one hour ago.  Not to create lengthy
| | 51526 [dblack@ca dl] <<< 550 5.0.0 Sorry,no access for this domain
| + 51599 [pixel@ma dr ] module Enumerable
+ 51510 [whitton@at a] a = 0
| 51512 [alan@di ik t] $sum = 0;
| + 51534 [ian@ca ib n.] In Perl, you access the outer scope unless you explicitly request a
| + 51630 [whitton@at a] # External scope
|   51631 [billtj@z. lu] I don't understand the poll items.  There were 104 who voted "make 'em all
|   51644 [gsinclair@so] I think previous posts have made it clear that the default behaviour is not
+ 51552 [bulatz@in eg] do-it-yourself! :)  glorious APL days :)
+ 51575 [gotoken@no w] There is a small list in Japanese.  I have translated a few items to
| 51613 [billtj@z. lu] The list looks pretty good.  Since the list in rwiki already started
| 51681 [batsman.geo@] One tenth, rather ;-)
+ 52197 [djkea2@mu ca] Regards,

hash missing value
51495 [mikkelfj-ant] Wouldn't it be useful with a missing value in hash tables so you avoid the
+ 51496 [mikkelfj-ant] =>
| + 51509 [billtj@y. lu] I think this has been discussed before.  We can take an advantage of, as
| | 51520 [mikkelfj-ant] See that's what I mean - everything I can think of in Ruby has already been
| | 51522 [skywizard@ti] window.caption = files[current_item]  # nil
| + 51513 [gsinclair@so] window.caption = (files[current_item] ||= "Untitled")
+ 51497 [billtj@y. lu] I think it is already there.  If you first declare the hash with
  + 51500 [alan@di ik t] You can set it after initialization too
  + 51502 [mikkelfj-ant] files = { ... }

Bye all
51504 [Graeme.Matth] Just a note to say goodbye to all of you and thanks for all your help over
51590 [chris@da kr ] I will agree that the spam is anoying, but I would try using spamassasin,
51648 [alwagner@tc ] Tasteless and offensive signature.
51716 [brailsmt@ya ] Yet so true...

'kakasi': different style for hiragana and katakana?
51506 [AntiATField_] KATAKANA
51533 [gotoken@no w] As far as I know, kakasi doesn't have such function.
51578 [AntiATField_] Thanks! Where can I find an EUC-JP coding table (not containing each

RubyConf: Perl/Python folks?
51518 [hal9000@hy e] Just curious...
51524 [mike@st k. o] The spirit is willing, but the wallet is weak :-(

String gsub last '/\\%[0-8a-fA-F][0-8a-fA-F]/ match does not sub
51528 [robert_linde] ...
51544 [ryand@ze sp ] Why would it replace %29? your matching 0-8, not 0-9.
51551 [robert_linde] Me , Dummy.
51556 [drbrain@se m] The other option is to use cgi-lib to unescape the string and use a

Where Is Method Call Precedence?
51530 [billtj@y. lu] When I look at "Table 18.4: Ruby Operators" in the Pickaxe book, I cannot
51531 [matz@ru y- a] Usually these are not handled by precedence order.  They are just
+ 51618 [billtj@z. lu] This is actually rather confusing to me, since in Ruby the '()' is
| 51718 [matz@ru y- a] It's due to YACC restriction.  It is relaxed in 1.7.x though.
+ 51706 [qrczak@kn .o] f     Ada, Eiffel, Haskell, Mercury, Perl, Pliant, Ruby, Tcl, Pascal
  + 51712 [pixel@ma dr ] page .../syntax-across-languages.html can now be accessed per category
  + 51714 [mikkelfj-ant] tuple)
    51750 [gsinclair@so] Since Ruby is close to Python is *some* ways, and Python has tuples, I cast the
    + 51754 [billtj@y. lu] If I remember correctly, tuples can be used as hash keys while an
    | 51917 [bulatz@in eg] CLU roots? :)
    | 51925 [matz@ru y- a] Tried?
    | 51941 [bulatz@in eg] p hash[s] #=> nil
    | + 51955 [billtj@z. lu] Everything below is "obvious" and natural, isn't it?  That's why I don't
    | | 51964 [bulatz@in eg] s = "mutable"
    | | 51979 [billtj@z. lu] When I first read your code below, it was also obvious to me, since the
    | | + 51984 [dblack@ca dl] hsh.rehash -> hsh
    | | | 51992 [billtj@z. lu] Wow, quite a revelation to me, David!  Thanks a lot for pointing the *very
    | | + 52073 [bulatz@in eg] not VALUES! it is OBVIOUS that hash keys must not change just because
    | + 51971 [qrczak@kn .o] It's not obvious that a Ruby hash doesn't put given objects as keys
    |   + 51982 [billtj@z. lu] Thanks for the explanation; now it is more clear to me regarding the
    |   + 52012 [pixel@ma dr ] on this subject, i've collected the behaviour of important types
    |   + 52023 [qrczak@kn .o] You are wrong that OCaml string constructor allocates a copy.
    |     52034 [pixel@ma dr ] fixing
    + 51790 [mikkelfj-ant] cast the
    | 51793 [billtj@y. lu] I think Ruby NArray has about the same efficiency as the new array/tuple
    + 51916 [bulatz@in eg] tuple is an array with fixed size. when you have very large number of
      51958 [billtj@z. lu] Do you mean just because we need to story only "len" instead of "len" and
      + 51966 [bulatz@in eg] no, len is coded in tuple type (Tuple2, Tuple3 and so on). and if you
      | 51981 [billtj@z. lu] I am using Ruby v 1.6.7 (which is called the "stable version" at
      | 52074 [bulatz@in eg] 1) sizeof(len)+sizeof(capa) == 8 :)
      + 51967 [bulatz@in eg] .... but Array_Of_Tuples is better candidate for realization. but in
      + 51994 [batsman.geo@] If size is fixed (de)allocation can be made much faster and is
        + 51998 [billtj@z. lu] Isn't that in the current Ruby (1.6.7) the memory area is already managed
        | 52025 [batsman.geo@] Agreed, we get to save a bit of mem per tuple, not per element. But it
        + 52001 [mikkelfj-ant] and