14181-14643 subjects 14634-15031

Problem colouring regexps in Emacs 20.7
14422 [marc.butler@] I also encountered the problem where an escaped forward slash in a

Missed files
14432 [KMurugan@no ] Hai   Everybody

SV:  Re: gtk and Float/to_f
14442 [dennisdecker] Microsoft(R) Windows 98

How to do it the Ruby-way 1
14447 [sma@3p us .d] I'm still a Ruby newbie and wonder what is the best way to express the
14449 [Dave@Pr gm t] A useful idiom is
+ 14450 [SAT@MU TI EC] How does that x ||= 1 work (for us newbies)?
| 14451 [Dave@Pr gm t] x ||= expr
+ 14456 [sma@3p us .d] Thanks Dave, that's clever...
  14514 [ben_tilly@op] FYI, in Perl the nickname for that is the Orcish Maneuver for

How to do it the Ruby-way 2
14448 [sma@3p us .d] I really like the way I can embed ruby code in strings using #{}.
+ 14460 [matz@ze ab t] I don't get the point.  "<#{name.capitalize}>"?
| 14490 [elderburn@mi] [wyzzrd@starcrusher /wyzzrd]$ ruby -e 'r = Regexp.new ("^(.*)\s(.*)$");
+ 14489 [ ericb@eb to] I don't know how to get rid of the eval, but you can move the print out of
  14712 [sma@3p us .d] I wouldn't call that "backslash-monster" nice but overall it's a nice

How to do it the Ruby-way 3
14452 [sma@3p us .d] First a question: Why is
+ 14454 [Dave@Pr gm t] The problem is, there are many (obviously sick and misguided) folks who
| 14485 [pixel@ma dr ] what about not discarding the space and using them? :)
| 14495 [matz@ze ab t] I did and failed.  Probably I haven't gone further enough.
| 14503 [pixel@ma dr ] nowadays spaces seldom have a syntactic meaning (except for indentation),
| 14523 [matz@ze ab t] I agree with you.  In Ruby, it is accomplished partly, for example,
+ 14843 [matju@sy pa ] no
  14844 [avi@be a4 co] ...

Re: mascot
14453 [yozhik@id al] I am torn beneath the two main mascot proposals; the kinglet is certainly
14461 [matz@ze ab t] I like this attitude.

How to get Ruby Tk running
14455 [jim@fr ez .o] I am trying to get Ruby and Tk working (as in Ch15 of

Tek-tips ruby forum
14458 [stillflame@g] Hey list,

Overloading Constructors.
14459 [fgp@ph o. rg] Can I derive Classes from Classes defined in a c-extension of ruby (such as
+ 14462 [jweirich@on ] Yes
+ 14467 [matz@ze ab t] Not all c-extensions call "initialize" from their "new" method.  This
  14471 [fgp@ph o. rg] If the c-extension does not call initialize from their "new" method, would
  14480 [matz@ze ab t] Invoke "initialize" implicitly.
  14500 [fgp@ph o. rg] This works, thank you!
  14515 [matz@ze ab t] Oops, I forgot that initialize was private method.
  14527 [fgp@ph o. rg] Why?
  14530 [matz@ze ab t] Because the "self" within "new" is class DbConnection, not an INSTANCE

ruby-mode.el and XEmacs 21.14
14463 [ljelmore@ho ] I've been using Emacs but have recently switched to XEmacs. One quirk

who uses Python or Ruby, and for what?
14464 [ellard2@is 1] A while ago I posted a request for people to share their experiences
+ 14465 [bryan_zarnet] In the last few years I have written several
+ 14466 [dgjs@ac .o g] Ever heard of Zope (http://www.zope.org), the web application server
| 14496 [ellard2@is 5] Zope?  Nope.
| 14505 [knos@fr e. r] "Welcome to Nope. Nope came out of a need we had on the iMacLinux Page for a
+ 14468 [bryan_zarnet] Its interesting that people consider the number of
| 14484 [andy@to ls e] That's exactly right.  Capabilities are much more important
| + 14498 [elderburn@mi] Well, clients can be educated.
| + 14516 [ugly-daemon@] May I ask what an object pool is?? Sorry, if this is a dumb question.
|   14526 [bryan_zarnet] An object pool is a "container" that manages a series
+ 14469 [billk@ct .c ] see http://www.don-lindsay-archive.org/skeptic/arguments.html#middle ;)
+ 14504 [akuchlin@ut ] An interesting question.  I work on a project which requires a Web

Large Matrix
14470 [rashworth@ma] What is the Ruby code to define a large matrix, 50 by 50
14472 [Dave@Pr gm t] (1..50).map { (1..50).map { '+' }  }
14475 [rashworth@ma] The map works fine, but I am not able to redefine
+ 14476 [dave_dunkin@] matrix = (1..50).map {(1..50).map {"+"}}
+ 14477 [Dave@Pr gm t] my_array = (1..50).map { (1..50).map { '+' }  }
+ 14478 [ms@ia ta e. ] Redefining an element should work.  Are you giving a name to the matrix?
  14529 [rashworth@ma] my_array = (1..50).map { (1..50.map { '+' } }

Re: Visual SlickEdit
14473 [jkaurin@ho e] ______________________________________________________________

Re: FTP vs Telnet Connection Times
14474 [jkaurin@ho e] <portions deleted>

uniq using ==?
14483 [agnot_tok@eu] Is there an obvious way of doing a uniq that uses == instead of id (or hash)

Help: Problems with Tk
14487 [jim@fr ez .o] I am trying to get Ruby and Tk working (as in Ch15 of
14493 [matz@ze ab t] Your programs failed to load libtk.so, which probably should reside in
14497 [jim@fr ez .o] dir libtc* libtk*
+ 14499 [glen@en bl d] /etc/ld.so.conf ...  you didn't say which directory you ran your listing
| 14506 [jim@fr ez .o] Yes, it was from /usr/local/lib
| 14507 [glen@en bl d] Um... what platform are you using?
| 14509 [jim@fr ez .o] uname -a
| 14510 [glen@en bl d] Oh, sorry... my assumption was that you were on either Linux or FreeBSD (Not
+ 14501 [gsemones@tr ] ...
+ 14508 [dgjs@ac .o g] Solaris doeen't use 'ld.so.conf'.  If the Ruby interpretor can't find
  14512 [jim@fr ez .o] Thanks...
  14513 [dgjs@ac .o g] Try adding

Cannot compile ruby-1.6.3 on Linux
14511 [pschoenb@so ] make[1]: Entering directory `/usr/src/ruby-1.6.3/ext/readline'
14522 [matz@ze ab t] try the stable snapshot at
14547 [pschoenb@so ] Tried this one. Same problem.
14760 [matz@ze ab t] try really latest stable-snapshot.  hope it works.

14517 [ptkwt@sh ll ] I notice something about the RAA (Ruby Application Archive) that is a bit
14519 [hal9000@hy e] with
+ 14525 [matz@ze ab t] I agree, Hal.  At the time I developed RAA, it supposed to be
+ 14531 [gnhurst@hu s] Thanks, Hal, for your feature request. :-)
  14532 [Dave@Pr gm t] Just to point out that there are already some notes on possible

problems with String -> Numeric conversions
14518 [see_signatur] Ruby has a number of very useful functions which convert strings representing

alias, undef, etc.
14520 [hal9000@hy e] Pardon my ignorance, but what is going on
14524 [matz@ze ab t] They are documented in syntax.html in the reference, and "alias" is
14528 [hal9000@hy e] Oh, of course... alias and undef are reserved words! I always forget

Named parameters: Bright idea fizzles
14521 [hal9000@hy e] One day, a semi-intelligent caveman named Hal
14540 [rshaw1961@ya] All the variables in your block will only be local within the block and

Pukes while compiling...
14533 [msowka@ho e.] gcc -g -O2 -rdynamic  main.o ext/extinit.o ext/curses/curses.a
14543 [ljohnson@re ] Mike,

Rajah: Ruby-Java integration
14537 [matthewdspen] Our names are Dan Munk and Matthew Spencer. We have noticed the recent threads
14590 [Dave@Pr gm t] I think this is tremendous. I'll look to hacking with this once it's

interfaces to some existing C/C++ code?
14538 [dalke@ac .o ] [Synopsis: a C library I work with uses opaque integer handles to
14698 [dalke@ac .o ] I sent this post a few days ago but haven't seen a response
+ 14731 [ben_tilly@op] I think the problem was that it was a long, detailed question
+ 14737 [matz@ze ab t] Since I'm in vacation mode now, could you wait for few more days.

interfaces to some existing pthread code?
14539 [dalke@ac .o ] This is the other part of the post I made in c.l.py that

Calling assignment methods in instance_eval
14544 [mike@le to .] When I use the instance_eval method to change the value of self in a block, I cannot use the methods in the form 'foo='. Ruby creates a variable foo without looking for a method with this name.
14561 [hal9000@hy e] block, I cannot use the methods in the form 'foo='. Ruby creates a variable

14545 [Jean-Francoi] I try to compile ruby under HPUX/10
14548 [barry_shultz] you will find a gzipped depot file of the Ruby binary for 10.20.
14553 [iso247@fr e.] ...but the tcltklib library is missing :^)
14597 [barry_shultz] I was just the messenger on this one :0). But I wonder if I can
14675 [iso247@fr e.] This URL http://hpux.connect.org.uk/hppd/cb.html allows to place a

Grace Hopper (was Ruby mascot)
14549 [jennyw@da ge] Just an aside ...
14554 [ljelmore@ho ] IIRC, The first incarnation of COBOL was literally a quick hack done in

emacs and ruby debugging
14552 [joe@vp p. et] My question is: how do I use it?  What does it do?  Does it
14581 [matz@ze ab t] It's like gdb emacs interface.  Load rubydb3x.el found in misc

Ruby as a Mac OS/X scripting language
14555 [Dave@Pr gm t] Andy and I got an interesting couple of e-mails saying that Apple
+ 14565 [bryan_zarnet] I was looking at OS/X yesterday and although the sales
| 14568 [jennyw@da ge] I'm confused by people saying that there is no scripting language for Mac OS
| 14569 [bryan_zarnet] Applescript is there, as is Perl.  I guess (IMHO) that
| 14579 [johannh@uc i] Applescript isn't very functional yet.  It doesn't talk very well
| 15739 [allansimons1] You may be interested to look at F-Script (www.fscript.org), which is
| 15741 [avi@be a4 co] F-Script is very interesting; I find the message pattern stuff
| 15870 [allansimons1] Actually, you can write arbitrarily complex scripts, with arguments
| 15986 [jeffrey@Di i] For Mac OS X Server, there was the application "Objective Everything"
+ 14573 [avi@cr 98 98] I don't know that Apple "needs a scripting" language for OS X - any of the

Ruby code: the lost generation
14556 [dblack@ca dl] With apologies to those who wish this list were *either* technical
+ 14563 [john@jo nk i] In perl there is often mention of one-liners.  Maybe rubiers could
+ 14566 [ugly-daemon@] I think I agree with him. How about something similar to the cookbook over at rubygarden? Perhaps we could even extend the mail server so that it will automatically extract, organize and post these bits of code to the wiki and then people could take from there adding comments bugfixes etc. Just a thought.
+ 14588 [feldt@ce ch ] I've taken the view that rubygarden.com would solvemany of these issues
  + 14592 [colin@we g2 ] It is my hope that the Ruby Cookbook (www.rubycookbook.org) might
  | 14620 [in6x059@pu l] I just took a second look at www.rubycookbook.org, since I knew to few
  | 14622 [WYS@he bl ng] Gesendet am: Freitag, 4. Mai 2001 11:11
  + 14602 [dblack@ca dl] I think that rubygarden (a term which went through various shades of
    14608 [colin@we g2 ] "there are discussions and comments there [on RubyGarden] that
    14625 [dblack@ca dl] Not exactly saving.  More the reusing process itself.

Arggg Bitten by the block var scope feature!!!
14557 [wscott@bi mo] I just spend a day debugging a elegant script that had this
+ 14559 [dblack@ca dl] Wouldn't it be easier and clearer, and less dangerous (in any
| 14560 [wscott@bi mo] Don't worry. I have already yelled "You Idiot!!" at myself several times. :)
+ 14564 [ ericb@eb to] I don't know if the behavior should change but I think it should at
+ 14567 [ugly-daemon@] I don't think its really a bad feature( actually I like it cause it comes in handy sometimes. ) I think that you just have to learn that preexisting variables show up in the block.
+ 14582 [matz@ze ab t] This problem can be avoided in the future version, using <> instead of ||.
  + 14589 [ms@ia ta e. ] Matz, is this planned for version 1.8, or will it be later?
  | + 14598 [schneik@us i] #
  | | 14605 [dblack@ca dl] I certainly agree that this should not be warned about under -w.  In
  | | 14624 [in6x059@pu l] I certainly do not agree with you. This should be warned about under -w.
  | | + 14627 [dblack@ca dl] I think of -w things as things one should never do -- that is, I like
  | | | 14630 [buter@CW S. ] Being new to Ruby, I might completely misunderstand this issue, but for
  | | + 14645 [matz@ze ab t] When you understand and utilize this behavior, this message would be
  | + 14621 [matz@ze ab t] I've not decided yet.  I think I should work on local variable scope
  + 14616 [hal9000@hy e] I realize this has been discussed endlessly in the past. But I didn't
    14644 [matz@ze ab t] I already decided to take some action in the future, because I myself
    + 14654 [huber@al m. ] Personally, I'd leave it the way it is, but introduce a keyword for
    | + 14667 [schneik@us i] # >
    | | + 14674 [gnhurst@hu s] Perhaps a similar (optional) scheme could be used?
    | | + 14677 [dblack@ca dl] Hey, talk to Marko :-)  Actually I don't think anyone overlooked it
    | | + 14694 [raja@cs in i] Possibly a way to deal with the status quo.
    | + 14679 [lists.ruby-t] I'm by no means a linguist, but I thought that [ruby-talk:13181]
    + 14701 [ugly-daemon@] I was wondering, would we be allowed both?? ie if I wanted variables in the current scope to show up in this block I would use | *args | but if I didn't I would use < *args >.

14558 [jkaurin@ho e] Numerous patches have been posted in this forum
14580 [matz@ze ab t] All patches from me should be to the latest stable, and be merged in
14611 [jkaurin@ho e] Matz, I was assuming your patches would go in :-) I meant
14646 [matz@ze ab t] For the basic rule, the patch by others would NOT merged unless

why doesn't do/end work for sort block?
14570 [dblack@ca dl] ary = [1,2,3,4,5]
+ 14571 [jweirich@on ] Try ...
+ 14572 [jkaurin@ho e] Somewhere in the pickaxe book (I cannot find it now) it stated
  + 14574 [hal9000@hy e] Hmmm, I'm sure you've misunderstood something. This is both
  + 14575 [jkaurin@ho e] and probably does not apply here.
    14576 [hal9000@hy e] Now, that's an interesting note.
    14586 [Dave@Pr gm t] Hmm. Looks like either I messed up, or it got changed again and I

SGI and Ruby
14577 [r.kochhar01@] I was wondering if any one had compiled Ruby on IRIX workstations Or is it

Simple SNMP Library released
14584 [flea@h8 di n] I  released Simple SNMP Library.

[survey] httpd usage
14591 [hipster@xs a] Now that my Ruby httpd has been downloaded 2000+ times, I'm getting
14628 [rashworth@ma] I do not have a reference to httpd.  However, I do use Ruby

Module method definition question
14593 [jim@fr ez .o] What is the difference (if any) between the following
14594 [Dave@Pr gm t] Assuming you meant 'module A', the first defines an instance method,
+ 14595 [mdavis@se ai] The first is an instance method.  It can only be called using a variable of
+ 14596 [jim@fr ez .o] Duh... Yes I did.

OOP-ier Tk?
14599 [jj5412@ea th] Using Tk with Ruby (or any other language) has always seemed a little
14618 [schneik@us i] # Using Tk with Ruby (or any other language) has always seemed a
+ 14641 [jj5412@ea th] I didn't post all the code here for the sake of not bombing the newsgroup.
+ 14682 [jkaurin@ho e] I have read the book and most of the examples use Pmw (Python Mega

Design by contract
14600 [jj5412@ea th] Any interest/thoughts on implementing simple design by contract in Ruby?
14603 [chadfowler@y] You might want to check out Andy Hunt's
14610 [jj5412@ea th] That would do it, thanks Chad and /\ndy!

bizarre File open, read, close problem on Win98?
14601 [ptkwt@sh ll ] The following bit of code is extracted from a larger chunk of code.  It
+ 14607 [joe@vp p. et] I wonder if eval is causing you problems?  It is probably
| + 14615 [Dave@Pr gm t] or even
| + 14619 [ptkwt@sh ll ] /Error/
+ 14614 [jj5412@ea th] reportFileName = "test.txt"
+ 14626 [in6x059@pu l] This construct will not work as expected, it will always go into the

Question about Date
14604 [jaco@te se .] I've just discovered ruby and, to learn it, i'm trying to write some
14617 [skilchen@sw ] "Eric Jacoboni" <jaco@teaser.fr> schrieb im Newsbeitrag
14623 [jacoboni@un ] Err.... I should not work so late in evening ;-)

Re: bizarre File open, read, close problem on Win98|2K and Linux
14606 [ptkwt@sh ll ] OK, I also see the trouble on NT (but it gets further) and Linux (it

scope of base class instance variable
14609 [cclee@pr me ] ...

Re: Design by contract - problem with DbC
14612 [jj5412@ea th] One small problem, DbC doesn't check the invariant after the constructor,
14670 [andy@to ls e] It should.  But you know, I seem to remember something about that -- like

Some ideas on collaboration
14613 [ugly-daemon@] I have just been thinking about the thread that is carrying on here about someones about the need for a tool that's like the wiki but not the wiki. And I was thinking how about the mailing list?? Most mail servers come with commands such as lists and help for majordomo. How about we add some commands to the ruby-talk server( it's written in ruby right?? ) such as "code"( to browse the code snippets ). There would be commands for organizing them, selecting only specific code, code that behaves in a certian way( does a specific task ), code that uses a certain function/feature, commands to retrieve the dicussion surrounding it, functionality similar to the wiki, etc. It might be better to use a client to for some of this fuctionality though. Best of all, it's all in one place. ie we don't have to leave the list. I can just sit at my ruby-talk client and collaboate and dicuss, etc. What do you think?? Too much work?? Not such a great idea??
14633 [elderburn@mi] Normally, my experience wouldcause me to say "Accck...waaaay to much work!"

Database Abstraction Framework
14629 [fgp@ph o. rg] Is anyone developing a database abstraction framework at the moment?
+ 14631 [buter@CW S. ] [...snip...]
| + 14632 [fgp@ph o. rg] Since I never used Perl, but of course want to steal any good idea I can
| | 14637 [SAT@MU TI EC] There is currently an effort underway to define a standard DBI interface for
| | 14640 [buter@CW S. ] If you want to know exactly, try http://dbi.symbolstone.org.
| + 14642 [imperator@ca] I'd say: different 'layer'. What Florian wants could be implemented
|   14647 [ben_tilly@op] (partly)
|   14651 [ben_tilly@op] Sorry, I don't have any energy to devote to this effort.
|   14657 [mike@st k. o] You could still use a DBI class whose connect is a factory method which
+ 14658 [avi@cr 98 98] I actually played around with developing something very much like what you
  14688 [fgp@ph o. rg] Could you mail me your code, or put it on the web somewhere?
  14690 [avi@be a4 co] Sure, you can find it (undocumented, unfinished, etc...) at
  14735 [buter@CW S. ] Ah! Thanks for the pointer. I think I'll look into that one. Having an
  14767 [SAT@MU TI EC] If you have time, please try to make sure that your high level database
  14795 [fgp@ph o. rg] I certainly will use DBI - but there will still be the need for an extra