[#52047] ruby-talk separation, part II — " JamesBritt" <james@...>
> > > >ZenTest and ZenWeb were just released. I announced these to
> > If somebody has a new class or library, then they should add it to
> > > If somebody has a new class or library, then they should add it to
-----BEGIN PGP SIGNED MESSAGE-----
Hello --
On Tue, Oct 01, 2002 at 09:03:44PM +0900, Bulat Ziganshin wrote:
FreeBSD's got a decent setup. Few additions to the list here:
On Wed, Oct 02, 2002 at 04:29:33AM +0900, Sean Chittenden wrote:
As I ponder over the list of topics below, I wonder if people would be
[#52094] OO Perl -> Ruby — ptkwt@...1.aracnet.com (Phil Tomson)
I'm wrapping a C library for a Binary Decision Diagram package using swig.
[#52142] current method — "Volkmann, Mark" <Mark.Volkmann@...>
Is there a way to programmatically determine the name of the method that is
you could do something like this:
[#52184] How do I invoke a block procedure from within a C extension? — philip.bacon@... (Philip Bacon)
I am writing a C extension and wish to call a block from within one of
[#52219] Targeting Borland's compiler on Windows — "Gavin Sinclair" <gsinclair@...>
All,
[#52245] Compiling stuff under Windows: list of problems — "Gavin Sinclair" <gsinclair@...>
I don't want my tortuous experience of trying to get things working under this
[#52259] bugs — "Kontra, Gergely" <kgergely@...>
Hi!
Hi,
>> >> k='Hello'
[#52262] Tcl implemented in hardware? — ptkwt@...1.aracnet.com (Phil Tomson)
This is a rather strange item. I was checking out comp.arch.fpga
[#52278] Printing the Contents of a 2d Array — rotfeast68@... (Rotfeast)
At the risk of sounding like a nuby to ruby...
[#52290] Regexp: Stripping out all except ASCII? — Mark Probert <probertm@...>
[#52300] Can soneone tell me what I'm doing wrong... — Jeremy Gregorio <gunvalk@...>
I'm trying to write a little script to rename my mp3s I started with this:
Hi Jeremy,
Well, I don't know how to explain it easily without using the concept of
[#52349] Please help, question regarding threads — Andrew Cowan <icculus@...>
Bulat Ziganshin wrote:
[#52358] Reusing base classes tests? — coma_killen@...
Hi,
[#52364] mod_ruby and postgresql — Harry Ohlsen <harryo@...>
I did a quick search on the ruby-talk archive, but to no avail, so here's my
In article <200210031922.48955.harryo@zip.com.au>, Harry Ohlsen wrote:
[#52380] Confusion on Keywords — William Djaja Tjokroaminata <billtj@...>
Hi,
[#52391] CRuby (Was: R) — Nikodemus Siivola <tsiivola@...>
CRuby = subset of Ruby + typed methods + compiler to C
Nikodemus Siivola wrote:
Michael Campbell wrote:
Hi --
[#52411] Violation of Principle of Least Surprise — Travis Whitton <whitton@...>
I'm writing this to report a bug as related to Ruby's principle of
[#52436] Specifying local and external block parameters (that old chestnut) — "Gavin Sinclair" <gsinclair@...>
I've cannibalised discussion from the "Bugs" thread. I hope it is a service to
Hi,
On Fri, Oct 04, 2002 at 11:37:21AM +0900, Yukihiro Matsumoto wrote:
Hi,
Hello Yukihiro,
On Fri, 04 Oct 2002 17:32:01 +0000, Bulat Ziganshin wrote:
>>>>> "Y" == Yukihiro Matsumoto <matz@ruby-lang.org> writes:
----- Original Message -----
>>>>> "M" == MikkelFJ <mikkelfj-anti-spam@bigfoot.com> writes:
On Mon, Oct 07, 2002 at 12:01:41AM +0900, ts wrote:
Hi,
[#52483] ruby if no input — "Kontra, Gergely" <kgergely@...>
Hi!
[#52487] SOAP4R proxy support? — "Volkmann, Mark" <Mark.Volkmann@...>
I can't get SOAP4R to send requests though a proxy server. I'm setting the
[#52507] mingw install — Mark Probert <probertm@...>
[#52519] Interview of Matz in Login — Pierre Baillet <oct@...>
Hello there, --
[#52547] Ruby to approximate 'file'? — Austin Ziegler <austin@...>
Is there a file-type detection script available for Ruby, similar to
[#52557] Speed of Ruby/modruby vs PHP — Jim Freeze <jim@...>
Hi:
On Sun, Oct 06, 2002 at 08:50:48PM +0900, MikkelFJ wrote:
> How do I configure mod_ruby to run with a cached script?
On Sun, Oct 06, 2002 at 09:44:41PM +0900, MoonWolf wrote:
Ok, here is how I understand this.
On Sun, Oct 06, 2002 at 05:07:25PM -0400, Jim Freeze wrote:
Hi:
Jim Freeze (jim@freeze.org) wrote:
On Mon, Oct 07, 2002 at 12:05:01PM +0900, Eric Hodel wrote:
Jim Freeze (jim@freeze.org) wrote:
On Tue, Oct 08, 2002 at 04:25:56AM +0900, Eric Hodel wrote:
[#52570] Segfault when installing Test::Unit — nico <n1k0@...>
When i try to install Test::Unit 0.1.4 i get the following error:
>>>>> "n" == nico <n1k0@rogers.com> writes:
>>>>> "t" == ts <decoux@moulon.inra.fr> writes:
[#52579] Coroutines for discrete event simulation? — "Ken Sprague" <eclipse@...>
Is it possible to use Ruby to design a discrete event simulator using
[#52581] Platform again — Friedrich Dominicus <frido@...>
Well I ask again. On what platforms are you using ruby most of the
[#52594] CGI sessions as threads? — Brian Candler <B.Candler@...>
Hello,
[#52602] Another take on ensuring right args to methods — Massimiliano Mirra <list@...>
Hi --
On Sun, Oct 06, 2002 at 10:43:46PM +0900, dblack@candle.superlink.net wrote:
On Mon, Oct 07, 2002 at 05:15:05PM +0900, Massimiliano Mirra wrote:
On Tue, Oct 08, 2002 at 05:52:46PM +0900, Mauricio Fern疣dez wrote:
[#52608] Update on HTTP session handling in Ruby? — "Szabolcs Szasz" <sz@...>
Hi,
[#52641] regex speed — David Garamond <davegaramond@...>
i am noticing ruby is much slower than perl when matching patterns with
[#52643] Rapid Development with Ruby — Vincent Foley <vinfoley@...>
I just read an interview with Pragmatic Andy and Dave on Amazon.com:
[#52653] webforms — "Kontra, Gergely" <kgergely@...>
Hi!
I downloaded and tried it but fails to create a session (?).
"Szabolcs Szasz" <sz@szasz.hu> writes:
[#52664] Regexp.MULTILINE — David Garamond <davegaramond@...>
while we're still on it, i wonder whose decision it is to remove perl's
[#52669] Things That Newcomers to Ruby Should Know — billtj@... (Bill Tj)
Hi,
Hello Bill,
>3) 'x+=b', 'x*=b' and other assignment operators is internally translated
[#52671] File.read Vs. File.sysread performance... — "Allen Mitchell" <ajm@...>
I tried the following piece of code on W2000 using a 2.4MB file
[#52681] reading from a URL — "Volkmann, Mark" <Mark.Volkmann@...>
I need to read the content of an HTTP URL. I can break the URL up into
[#52691] eruby forms processing — <jthorne@...>
I am a newbie web programmer who has been told that ruby and eruby is
[#52693] Clearing arrays etc. in extensions — Mark Probert <probertm@...>
What are you wanting to do? Make the array have 0 elements? You could use
Hi,
[#52712] odd edge case with require — patrick-may@... (Patrick May)
$ cat test.rb
[#52727] block vars (some theory) — "Bulat Ziganshin" <bulatz@...>
Hello all,
>>>>> "B" == Bulat Ziganshin <bulatz@integ.ru> writes:
Hello ts,
[#52747] Re: reading from a URL — "Volkmann, Mark" <Mark.Volkmann@...>
This is what I'm currently doing to read from a URL through the company
[#52750] Re: reading from a URL — "Volkmann, Mark" <Mark.Volkmann@...>
Has Matz said whether he planned to integrate your proxy authorization patch
On Wed, Oct 09, 2002 at 12:02:54AM +0900, Volkmann, Mark wrote:
[#52779] mod_ruby post-request cleanup — Harry Ohlsen <harryo@...>
This is very likely just a bug in my code, but I figured I'd ask, just to save
[#52797] inserting an element to array at a specified position — David Garamond <davegaramond@...>
since ruby's array doesn't have index(POS, OBJ) like in python, nor
[#52801] Compiling using IMPORT, NT=1 — =?ISO-8859-2?Q?Marco_K=F6gler?= <marco.koegler@...>
Hi!
[#52806] strange Hash default behaviour — John Tromp <tromp@...>
I wrote a ruby program to read a list of graph edges and produce
[#52823] CGI sessions without cookies? — Stefan Scholl <stefan.scholl@...>
I haven't tried sessions, yet. But I'm curious if you can work
[#52834] libtemplate ruby binding — Christian Kruse <ckruse@...>
Hello together,
[#52848] Polymorphism, Isomorphism — ptkwt@...1.aracnet.com (Phil Tomson)
Consider this a bit of public pondering...
On Thu, 10 Oct 2002 06:12, Phil Tomson wrote:
[#52888] possible patch for singleton.rb — leikind@... (Yuri Leikind)
Hello all,
[#52910] Re: Too Many Underscores? — "Volkmann, Mark" <Mark.Volkmann@...>
I haven't followed the discussion about new syntax for private variables
[#52930] Sorting an array of hashes — Martin Stannard <martin@...>
Hi,
[#52936] Re: Things That Newcomers to Ruby Should Know — "Pe, Botp" <botp@...>
[#52967] Problems with coordinates and clipping — 520079130762-0001@... (Michael Neumann)
Hi,
[#52992] Re: REXML & Root Node — "Hammond, Tony (ELSLON)" <T.Hammond@...>
Matt:
[#53003] UTF-8 Character Conversion to HTML — Ben Schumacher <ben@...>
-----BEGIN PGP SIGNED MESSAGE-----
[#53021] FYI: Can't attend RubyConf — "Hal E. Fulton" <hal9000@...>
I am an enthusiastic supporter of Ruby
[#53045] Sorting — warren@... (Warren Brian Noronha)
dear developer,
Hello --
> I think almost anything is a better name than CRAN, as that (to me)
Hello --
> Just a thought: why *not* copy CPAN? It's pretty good, isn't it?
Hi --
[#53141] 1.8 release? — "Gavin Sinclair" <gsinclair@...>
Sorry if this has been discussed to death, but I found no concrete mention
[#53165] access surrounding class — Matthias Veit <matthias_veit@...>
[#53183] final in ruby — "Kontra, Gergely" <kgergely@...>
Hi!
On 2002.10.15, Kontra, Gergely <kgergely@mlabdial.hit.bme.hu> wrote:
>> Will ruby some day support some kind of predicate or modifier, so I can
>>>>> "K" == Kontra, Gergely <kgergely@mlabdial.hit.bme.hu> writes:
Kontra, Gergely wrote:
[#53188] Referring to instance vars in a Struct? — "Chris Morris" <chrismo@...>
I have a Struct -- then I extend the class by adding some methods. I
[#53199] & operation and if statment — Robert McGovern <tarasis@...>
I'm puzzled by the behaviour in the following run. I would expect line 2
[#53203] ruby<=>php for web scripting — "Kontra, Gergely" <kgergely@...>
Hi!
"MikkelFJ" <mikkelfj-anti-spam@bigfoot.com> wrote in message news:aoesk2$l7q$1@netsrv2.spss.com...
[#53230] Please check my algorithm — Vincent Foley <vinfoley@...>
Hi, I found a nice programming challenge:
Hi --
dblack@candle.superlink.net wrote in message news:<Pine.LNX.4.44.0210142141510.7458-100000@candle.superlink.net>...
> dblack@candle.superlink.net wrote in message
"Mike Campbell" <michael_s_campbell@yahoo.com> wrote in message news:<NFBBKBEMGLGCIPPFGHOLMEHOCLAA.michael_s_campbell@yahoo.com>...
[#53274] FXRuby-1.0.14 Now Available — "lyle@..." <lyle@...>
I am pleased to announce the latest release of FXRuby, the Ruby language
On Wed 16 Oct 2002 at 05:32:11 +0900, lyle@knology.net wrote:
[#53278] ruby-dev summary 18458-18504 — TAKAHASHI Masayoshi <maki@...>
Hi all,
>>>>> "T" == TAKAHASHI Masayoshi <maki@rubycolor.org> writes:
On Wed, Oct 16, 2002 at 02:50:10PM +0900, ts wrote:
[#53284] Porting a CRC function to ruby — Matthew Miller <namille2@...>
Hello,
[#53285] Psyco — Travis Whitton <whitton@...>
There's an interesting article on IBM developerWorks about a new program
[#53289] OSX file extension — "Bob X" <bobx@...>
I was just perusing some OSX sites and reading a REALbasic review when lo
[#53297] Interfaces in Ruby — web2ed@... (Edward Wilson)
Is there a way to write/inforce interfaces in Ruby like one can using
On Wed, Oct 16, 2002 at 01:30:04PM +0900, Chris Gehlker wrote:
On Thu, Oct 17, 2002 at 12:45:41AM +0900, Chris Gehlker wrote:
On Thu, Oct 17, 2002 at 11:19:04AM +0900, Chris Gehlker wrote:
On Fri, Oct 18, 2002 at 03:02:53AM +0900, Chris Gehlker wrote:
>http://rm-f.net/~cout/code/ruby/treasures/RubyTreasures-0.3/lib/hacks/interface.rb.html
On Thu, Oct 17, 2002 at 01:25:57PM +0900, Edward Wilson wrote:
On Fri, Oct 18, 2002 at 12:16:30AM +0900, Paul Brannan wrote:
On Fri, Oct 18, 2002 at 08:13:18PM +0900, Massimiliano Mirra wrote:
On Fri, 2002-10-18 at 14:42, Paul Brannan wrote:
On Fri, Oct 18, 2002 at 11:20:43PM +0900, Nat Pryce wrote:
On Fri, 2002-10-18 at 18:03, Paul Brannan wrote:
[#53315] Is the debugger broken? — "Gavin Sinclair" <gsinclair@...>
Hi rubyists,
Hi,
[#53328] Hooking on method invocation — viking@... (Eugene Zaikonnikov)
Hello,
On Wed, Oct 16, 2002 at 10:43:05PM +0900, Eugene Zaikonnikov wrote:
[#53359] Things That Newcomers to Ruby Should Know (10/16/02) — William Djaja Tjokroaminata <billtj@...>
Hi,
----- Original Message -----
On Tue 22 Oct 2002 at 12:18:22 +0900, Hal E. Fulton wrote:
Hello Ian,
On Wed, Oct 23, 2002 at 06:28:29PM +0900, Bulat Ziganshin wrote:
Hello Mauricio,
> 13. Ruby variables hold references to objects and the = operator
On Sat 19 Oct 2002 at 00:42:20 +0900, Kontra, Gergely wrote:
[#53368] Marshaling with ARGF — google@... (Tom Payne)
Hi --
[#53376] Plugin autoregistration (inherited method call) — Wejn <lists+rubytalk@...>
Hi,
[#53378] Precompiling eval expressions — Brian Candler <B.Candler@...>
What ways are there to pre-compile an "eval" expression which is going to be
[#53388] DBI:Pg 'autocommit' is not a valid option name — Michael Schuerig <schuerig@...>
[#53417] Strings or symbols? — Philip Mak <pmak@...>
When working with a record that has various fields represented using a
[#53422] Date handling with DBI — "Gavin Sinclair" <gsinclair@...>
Rubyists,
[#53426] Converting String to Time would be nice — "Gavin Sinclair" <gsinclair@...>
[#53440] behaviour of nil —
Hi,
"C馘ric Foll" <cedric.foll-nospam@bigfoot.com> writes:
[#53471] Enumerable.partition — google@... (Tom Payne)
Hi --
[#53478] Ruby on RedHat 8.0? — web2ed@... (Edward Wilson)
Does anybody know whether Ruby made it into RedHat's last release
[#53481] Having trouble installing OSSL — sera@... (Francis Hwang)
I'm trying to install OSSL, but it gives me this error when I run
[#53490] Assignment — Massimo Arnaudo <marnaudo@...>
Hi everibody,
[#53493] URI bug or bad URI? — Alan Chen <alan@...>
Have a proof-of-concept application which parses drop texts. One of the
[#53496] one liner? --- split file at empty line — Dong <dongxiang@...>
I need to split a file
[#53498] one liner? --- need help splitingi a file — Dong <dongxiang@...>
I need to split a file
Hello,
On Fri, Oct 18, 2002 at 08:27:58AM +0900, Dong wrote:
[#53513] Emacs: Ruby with Semantic — Philipp Meier <meier@...>
Hello Rubyists,
[#53553] Text::Format for Ruby (1.003) — Austin Ziegler <austin@...>
I have just reimplemented Text::Format for Perl (0.52) in Ruby. I
On Sat, Oct 19, 2002 at 04:31:16AM +0900, Austin Ziegler wrote:
On Sun, 20 Oct 2002 18:39:02 +0900, Massimiliano Mirra wrote:
[#53556] Help wanted with an experimental FAQ facility — Dave Thomas <Dave@...>
----- Original Message -----
[#53582] realpath() method? — "Szabolcs Szasz" <sz@...>
BTW, how is the coordination of the std. lib done?
[#53596] Is subclass known in superclass.initialize? (virtual constructor theme...) — "Szabolcs Szasz" <sz@...>
Is there a reasonable replacement for '?' below?
[#53613] Strange String bug (around type.to_s from mod_ruby)? — "Szabolcs Szasz" <sz@...>
(See attached files please.)
[#53626] XMLParser, NQXML, REXML, ... — Armin Roehrl <armin@...>
Hi XML-freaks,
> Hi XML-freaks,
On Wed, 23 Oct 2002 13:01:59 +0900, Sean Chittenden wrote:
> > Markus and I are working on rubydoc which is now able to
On Wed, 23 Oct 2002 14:07:46 +0900, Sean Chittenden wrote:
> >> Ruby, on the other hand, has two going on three different
> There is no perfect format, IMHO. XML's good for machines and for
> As a standing offer to any Ruby project: if you want to trade out XML
[#53636] Grouping by twos — martindemello@... (Martin DeMello)
Another of those trivial little problems that I obsess about finding
I ran into the same requirement and I solved it by extending the Array
[#53652] RAA.succ? — ptkwt@...1.aracnet.com (Phil Tomson)
I hope there will be some discussion of RAA.succ (or is it RAA.next) at
Hi,
Hi,
In article <007d01c278d8$0b4cd950$85222fc0@sarion.co.jp>,
In article <1035310903.958074.2185.nullmailer@picachu.netlab.jp>,
Hi,
-----BEGIN PGP SIGNED MESSAGE-----
Hi, all,
On Mon, 21 Oct 2002, Phil Tomson wrote:
In article <20021023041621.GC48080@perrin.int.nxad.com>,
Phil Tomson (ptkwt@shell1.aracnet.com) wrote:
> >> I'd definately like to see some central repository that could be
[#53681] XML/XSLT processors - XSLT4R not working? — Chris Wong <chris_wong@...>
I'm looking for a pure Ruby XSLT processor. Stumbled across XSLT4R.
[#53685] XMLRPC and complex data structures — Daniel Berger <djberge@...>
Hi all,
Michael Neumann wrote:
[#53688] functional Ruby equiv to this perl snippet — bobx@... (Bob)
# parses a text file looking for server names and ignoring lines
def load_server_list
I realised that my first test wasn't good for non-empty but blank
"Austin Ziegler" <austin@halostatue.ca> wrote in message
On Tue, 22 Oct 2002 05:54:49 +0900, Bob X wrote:
"Daniel Berger" <djberge@qwest.com> wrote in message
[#53703] rb_gc_register_address problem — Paul Brannan <pbrannan@...>
We ran into a problem today with the garbage collector (caused by our
Paul Brannan wrote:
[#53707] Unicode GUIs on Windows — Philip Mak <pmak@...>
For anyone who's interested in developing GUIs that use Unicode, I'm
Philip Mak wrote:
[#53771] Perl multiple match RE in Ruby? — michael libby <x@...>
-----BEGIN PGP SIGNED MESSAGE-----
Hi,
-----BEGIN PGP SIGNED MESSAGE-----
-----BEGIN PGP SIGNED MESSAGE-----
[#53780] Ruby/Tk newbie question — "ursus major" <someone@...>
Folks:
[#53795] How to get unique names from file — Korshunov Ilya <kosha@...>
What i have - Proftpd log file in the following format -
[#53823] Using variables in conn.exec (pgsql) — Korshunov Ilya <kosha@...>
I want to create complex sql query for pgsql.
[#53865] XMLRPC and IP authentication — Daniel Berger <djberge@...>
Hi all,
Hi,
[#53884] SQLite — "Bob X" <bobx@...>
Anyone working on a Ruby interface for SQLite?
On Wed, 23 Oct 2002 10:38:31 +0900, Bob X wrote:
Hi all,
On Saturday 02 November 2002 7:57 pm, Enric Lafont wrote:
Albert Wagner wrote:
On Sunday 03 November 2002 5:53 am, Anders Bengtsson wrote:
On Mon, 4 Nov 2002 04:12:39 +0900, Albert Wagner wrote:
On Sun, Nov 03, 2002 at 10:57:29AM +0900, Enric Lafont wrote:
On Sun, 3 Nov 2002 10:57:29 +0900, Enric Lafont wrote:
On Saturday 02 November 2002 11:56 pm, Austin Ziegler wrote:
Austin Ziegler wrote:
On Mon, 4 Nov 2002 06:44:46 +0900, Enric Lafont wrote:
From: "Enric Lafont" <enric@1smart.com>
On Mon, Nov 04, 2002 at 10:02:12PM +0900, Gavin Sinclair wrote:
On Tue, 5 Nov 2002 20:18:47 +0900, Brian Candler wrote:
It is a sign of my hybrid Objective-C background, no doubt, but I
Brad Cox wrote:
> > >
> -----Original Message-----
Rich wrote:
>
Hal E. Fulton wrote:
Yukihiro Matsumoto wrote:
[#53885] Ruby Weekly News — Dave@...
----- Original Message -----
> > Ruby Weekly News: 10/20/2002
"Hal E. Fulton" wrote:
On Thu, 2002-10-24 at 10:50, Daniel Berger wrote:
> -----Original Message-----
> That said, FreeRIDE will have significant capabilities specific to Ruby
[#53953] Re: Things That Newcomers to Ruby Should Know (10/16/02) — "Mills Thomas (app1tam)" <app1tam@...>
But why does it really, REALLY mean that? Was there a reason for doing
Hal E. Fulton <hal9000@hypermetrics.com> wrote:
Hi --
[#53957] NODE tree introspection — Simon Cozens <simon@...>
[#53981] Ruby and Windows — "Regina Goodwin" <amanishakhete@...>
When I open up Ruby on my Windows Desktop and I write code, how do I get it
[#53982] Re: Things That Newcomers to Ruby Should Know (10/16/02) — "Mills Thomas (app1tam)" <app1tam@...>
It's not non-sensical. If it appeared that I mean for all objects to use
[#53983] Re: Things That Newcomers to Ruby Should Know (10/16/02) — "Mills Thomas (app1tam)" <app1tam@...>
Actually, the way you describe '+=' makes sense to me. It is what I would
Hi,
Hi --
[#53992] On Using Data_Wrap_Struct — Mark Probert <probertm@...>
[#54005] comp.lang.ruby FAQ — "Hal E. Fulton" <hal9000@...>
RUBY NEWSGROUP FAQ -- Welcome to comp.lang.ruby! (Revised 2002-9-20)
[#54017] array[start..end] gives unexpected results — ito@...
Is this correct?
[#54021] Ever write a video game in ruby? — Philip Mak <pmak@...>
Has anyone ever written a video game in ruby, of similar technological
[#54039] Read "current line" from a file? — "Gavin Sinclair" <gsinclair@...>
All,
[#54065] ruby calls perl — Carlos <angus@...>
Why does ruby call perl?
[#54090] ruby for DOS — "Andres Hidalgo" <sol123@...>
Is there a version of Ruby for DOS?
[#54110] Visual C++ controversy — "MikkelFJ" <mikkelfj-anti-spam@...>
Pardon me for this somewhat off-topic issue.
[#54111] How come true, false don't support <=> (comparison) operator? — cilibrar@... (Rudi Cilibrasi)
I am wondering if there is a good reason why Ruby does not by default
Hello --
In article <Pine.LNX.4.44.0210250754010.2650-100000@candle.superlink.net>,
Hi --
dblack@candle.superlink.net writes:
Hi --
In article <Pine.LNX.4.44.0210261701170.16157-100000@candle.superlink.net>,
Simon Cozens wrote:
[#54134] Re: How come true, false don't support <=> (comparison) operator? — "Marcin 'Qrczak' Kowalczyk" <qrczak@...>
Fri, 25 Oct 2002 20:59:36 +0900, dblack@candle.superlink.net <dblack@candle.superlink.net> pisze:
[#54164] Too Brief Before? -- fonts in win32 — "Alan (Ursus Major)" <ursus@...>
Folks:
[#54189] exerb question — Floyd Smith <fjs@...>
I am using exerb to create executables under Windows. Certain scripts
Sorry - forgot to include the error message:
[#54223] WE CAN HALVE YOUR TELEPHONE BILLS!! — "Discount Calls UK" <discountcalls@...>
With our UK National & local Calls costing as little as 1.65p per minute!
[#54237] Re: Very Uregent — "Pe, Botp" <botp@...>
I think we should refrain non-members fr posting to this list.
I agree
[#54238] net/protocol.rb version 1.1.37 warning: already initialized constant Errno — "Robert Linder" <robert_linder_2000@...>
Hi,
[#54239] Snippet request: Ruby Web Server written in under an hour — Phlip <phlipcpp@...>
Rubies:
Phlip <phlipcpp@yahoo.com> writes:
Rubies:
Hi --
On Tue, Oct 29, 2002 at 11:38:57PM +0900, dblack@candle.superlink.net wrote:
Hi --
Bulat Ziganshin <bulatz@integ.ru> wrote:
Hi --
On Thu, Oct 31, 2002 at 12:42:25AM +0900, dblack@candle.superlink.net wrote:
dblack@candle.superlink.net wrote:
Hi --
dblack@candle.superlink.net wrote:
On Wed, 2002-10-30 at 17:38, William Djaja Tjokroaminata wrote:
On Wednesday 30 October 2002 12:13 pm, Nat Pryce wrote:
[#54268] Package directory structure during development — "Gavin Sinclair" <gsinclair@...>
All,
[#54269] How to invoke === using custom classes and case statements. — khabibiuf@... (Khurram)
Hi all,
[#54280] exerb & fox-problem; converting gui-script to .exe on windows — Armin Roehrl <armin@...>
Hi,
On Tue, 29 Oct 2002 00:03:09 +0900, Armin Roehrl wrote:
Am Montag, 28. Oktober 2002 16:20 schrieb Austin Ziegler:
I've been able to get all of the exerb samples to work for me.
Am Montag, 28. Oktober 2002 16:53 schrieb Austin Ziegler:
[#54314] Learn and Earn...Join For FREE! — Nicolas Tubilla <ryu_ken@...>
Hello:
[#54316] Fixnum assignment undefined??? Is it a bug, or blindness? — Charles Hixson <charleshixsn@...>
In the routine:
Charles Hixson <charleshixsn@earthlink.net> wrote:
William Djaja Tjokroaminata wrote:
[#54354] good link to read as we contemplate RAA, RAA.succ, et al — Pat Eyler <pate@...>
http://www.onlamp.com/pub/wlg/2225
Hi --
> Interesting. Simon (hi Simon!) is probably right that "Definitive
" JamesBritt" <james@jamesbritt.com> writes:
I missed the original mails that explained this.
Simon Cozens <simon@ermine.ox.ac.uk> writes:
On Wed, 30 Oct 2002 12:16:29 +0900, Jim Menard wrote:
[#54357] Re: net/http segfault — "michael libby" <x@...>
ts <decoux@moulon.inra.fr> wrote:
>>>>> "m" == michael libby <x@ichimunki.com> writes:
[#54359] Blogging RubyConf — why the lucky stiff <ruby-talk@...>
I'm wondering if anyone will be blogging the RubyConf? It's a rare opportunity to
[#54363] Strscan, mkmf and MacOS X — Raymond Blum <raymond@...>
Hi
[#54364] problem with recursive structure — Mark Probert <probertm@...>
[#54380] Dynamically executed methods in Ruby? — mirian@... (Mirian Crzig Lennox)
This is a little hard to explain, and I'm not sure if Ruby can
[#54387] Close Internet Explorer — "Bass" <miner@...>
Hi,
I only have a windows environment. Does anybody know how to install the
[#54412] bug in Fox or in Ruby? — Joel VanderWerf <vjoel@...>
[#54421] want to meet Microsoft .NET guy? — matz@... (Yukihiro Matsumoto)
Hi,
----- Original Message -----
[#54429] "multiple assignment in conditional" — "Gavin Sinclair" <gsinclair@...>
Rubies,
[#54440] THIS IS A SPAM MAIL — Shugo Maeda <shugo@...>
This is a test mail for the spam filter of ruby-talk ML.
[#54449] feature idea: custom literals — loats205@... (loats205)
wouldn't it be cool if you could define custom literal representations for your
loats205 wrote:
On Wed, 2002-10-30 at 11:41, Nikodemus Siivola wrote:
[#54478] DbTalk 0.71 — Dalibor Sramek <dali@...>
I would like to announce a new release of my Ruby project DbTalk.
[#54487] Problems installing and running IOWA — Radek Hnilica <Radek@...>
Hello
[#54495] Ruby and Large File sizes — Jim Freeze <jim@...>
Hi:
[#54528] Please help me modify this... — bobx@... (Bob)
This currently works:
[#54543] define_finalizer does NOT work — ahoward <ahoward@...>
[#54595] Is this the best start to ruby socket server for flash clients? — moonerent@... (Rick)
Hello,
[#54604] Readline Module and completion_proc — Pierre Baillet <oct@...>
Dear rubyists,
[#54626] Ruby at OSCon — Pat Eyler <pate@...>
And for my next trick, watch me pull a conference out of my hat ...
Re: Things That Newcomers to Ruby Should Know (10/16/02)
Hi,
Based on the comments that I received, I just updated the list
(http://www.glue.umd.edu/~billtj/ruby.html).
Regards,
Bill
===========================================================================
Things That Newcomers to Ruby Should Know
Table of Contents
* Resources
1. Using warnings
2. Interactive shell
3. On-screen documentation
4. Class#method notation
5. Getting characters from a String
6. Array and Hash default values
7. Mutable Hash keys
8. Reading numerals from a file
9. Pre/Post Increment/Decrement Operators
10. Lexical scoping in blocks
11. Two sets of logical operators
12. The === operator and case statements
13. White space
14. The "dot" method call operator
15. Range objects
16. Boolean values
17. Variables, references, and objects
18. Deep copy
19. Class variables
20. Substituting Backslashes
* Things That Are Good to Know :-)
_________________________________________________________________
* Resources:
+ HOME PAGE: http://www.ruby-lang.org/en/
+ FAQ: http://www.rubycentral.com/faq/
+ PITFALL:
http://rwiki.jin.gr.jp/cgi-bin/rw-cgi.rb?cmd=view;name=pitfal
l
+ ONLINE TUTORIAL/DOC/BOOK: http://www.rubycentral.com/book/
+ VERY USEFUL HINTS:
o "Programming Ruby" book by David Thomas and Andrew Hunt,
"When Trouble Strikes" Chapter, "But It Doesn't Work"
Section
o "The Ruby Way" book by Hal Fulton, Chapter 1: "Ruby In
Review"
1. Use "ruby -w" instead of simply "ruby" to get helpful warnings. If
not invoking "ruby" directly, you can set the environment variable
RUBYOPT to 'w':
+ win32:
C:\> set RUBYOPT=w
or
pressing F5 (to execute) in the Scite editor will give you
warnings
(and F4 will position at problematic line).
+ unix:
sh# export RUBYOPT="w"
or
csh# setenv RUBYOPT "w"
2. Ruby has an interactive shell; try to invoke the command "irb"
instead of "ruby". "irb" is best used for experimenting with the
language and classes; you may try things out in this environment
before putting them in your programs.
3. For convenient on-screen Ruby documentation, consider to use (and
install, if necessary) "ri"
(http://www.pragmaticprogrammer.com/ruby/downloads/ri.html).
For example, too see the methods of the File class, run "ri File".
To read about its open method, type "ri File.open".
4. The notation "Klass#method" in documentation is used only to
represent an "instance method" of an object of class Klass; it is
not a Ruby syntax at all. A "class method" in documentation, on
the other hand, is usually represented as "Klass.method" (which is
a valid Ruby syntax).
5. The String#[Fixnum] method does not return the "character" (which
is a string of length one) at the Fixnum position, but instead the
ASCII character code at the position (however, this may change in
the future). Currently, to get the character itself, use
String#[Fixnum,1] instead.
Furthermore, there are additional ASCII conversion methods such as
+ Integer#chr to convert from the ASCII code to the character
65.chr # -> "A"
+ ?chr to convert from the character to the ASCII code
?A # -> 65
Using these properties, for example, some ways to get the last
character in a string is by writing "aString[-1, 1]" or
"aString[-1].chr".
6. Array.new(2, Hash.new) # -> [{}, {}]
but the two array elements are identical objects, not independent
hashes. To create an array of (independent) hashes, use the "map"
or "collect" method:
arr = (1..2).map {Hash.new}
Similarly, when creating a hash of arrays, probably the following
is not the original intention:
hsh = Hash.new([])
while line = gets
if line =~ /(\S+)\s+(\S+)/
hsh[$1] << $2
end
end
puts hsh.length # -> 0
One correct and concise way is to write "(hash[key] ||= []) <<
value", such as
hsh = Hash.new
while line = gets
if line =~ /(\S+)\s+(\S+)/
(hsh[$1] ||= []) << $2
end
end
7. Be careful when using "mutable" objects as hash keys. To get the
expected result, call Hash#rehash before accessing the hash
elements. Example:
s = "mutable"
arr = [s]
hsh = { arr => "object" }
s.upcase!
p hsh[arr] # -> nil (maybe not what was expected)
hsh.rehash
p hsh[arr] # -> "object"
8. After reading data from a file and putting them into variables,
the data type is really String. To convert them into numbers, use
the "to_i" or "to_f" methods. If, for example, you use the "+"
operator to add the "numbers" without calling the conversion
methods, you will simply concatenate the strings.
An alternative is to use "scanf"
(http://www.rubyhacker.com/code/scanf).
9. Ruby has no pre/post increment/decrement operator. For instance,
x++ or x-- will fail to parse. More importantly, ++x or --x will
do nothing! In fact, they behave as multiple unary prefix
operators: -x == ---x == -----x == ......
10. Beware of the lexical scoping interaction between local variables
and block local variables. If a local variable is already defined
before the block, then the block will use (and quite possibly
modify) the local variable; in this case the block does not
introduce a new scope. Example:
(0..2).each do |i|
puts "inside block: i = #{i}"
end
puts "outside block: i = #{i}" # -> undefined `i'
On the other hand,
i = 0
(0..2).each do |i|
puts "inside block: i = #{i}"
end
puts "outside block: i = #{i}" # -> 'outside block: i = 2'
and
j = 0
(0..2).each do |i|
j = i
end
puts "outside block: j = #{j}" # -> 'outside block: j = 2'
11. In Ruby, there are two sets of logical operators: [!, &&, ||] and
[not, and, or]. [!, &&, ||]'s precedence is higher than the
assignments (=, %=, ~=, /=, etc.) while [not, and, or]'s
precedence is lower. Also note that while &&'s precedence is
higher than ||'s, the and's precedence is the same as the or's.
12. In the case statement
case obj
when obj_1
....
when obj_k
....
it is the "===" method which is invoked, not the "==" method.
Also, the order is "obj_k === obj" and not "obj === obj_k".
The reason for this order is so that the case statement can
"match" obj in more flexible ways. Three interesting cases are
when obj_k is either a Module/Class, a Regexp, or a Range:
+ The Module/Class class defines the "===" method as a test
whether obj is an instance of the module/class or its
descendants ("obj#kind_of? obj_k").
+ The Regexp class defines the "===" method as a test whether
obj matches the pattern ("obj =~ obj_k").
+ The Range class defines the "===" method as a test whether
obj is an element of the range ("obj_k.include? obj").
13. It is advisable not to write some white space before the opening
'(' in a method call; else, Ruby with $VERBOSE set to true may
give you a warning.
14. The "dot" for method call is the strongest operator. So for
example, while in some other languages the number after the dot in
a floating point number is optional, it is not in Ruby. For
example, "1.e6" will try to call the method "e6" of the object 1
(which is a Fixnum). You have to write "1.0e6".
However, notice that although the dot is the strongest operator,
its precedence with respect to method name may be different with
different Ruby versions. At least in Ruby 1.6.7, "puts
(1..3).length" will give you a syntax error; you should write
"puts((1..3).length)" instead.
15. "0..k" represents a Range object, while "[0..k]" represents an
array with a single element of type Range. For example, if
[0..2].each do |i|
puts "i = #{i}"
end
does not give what you expect, probably you should have written
(0..2).each do |i|
puts "i = #{i}"
end
or
0.upto(2) do |i|
puts "i = #{i}"
end
instead. Notice also that Ruby does not have objects of type
"Tuple" (which are immutable arrays) and parentheses are usually
put around a Range object for the purpose of precedence grouping
(as the "dot" is stronger than the "dot dot" in the above
example).
16. In Ruby, only false and nil are considered as false in a Boolean
expression. In particular, 0 (zero), "" or '' (empty string), []
(empty array), and {} (empty hash) are all considered as true.
17. Ruby variables hold references to objects and the = operator
copies the references. Also, a self assignment such as a += b is
actually translated to a = a + b. Therefore it may be advisable to
be aware whether in a certain operation you are actually creating
a new object or modifying an existing one.
For example, string << "another" is faster than string +=
"another" (no extra object creation), so you would be better off
using any class-defined update-method (if that is really your
intention), if it exists.
18. There is no standard, built-in deep copy in Ruby. One way to
achieve a similar effect is by serialization/marshalling. Because
in Ruby everything is a reference, be careful when you want to
"copy" objects (such as by using the dup or clone method),
especially for objects that contain other objects (such as arrays
and hashes) and when the containment is more than one level deep.
19. A class variable is in general per-hierarchy, not per-class (i.e.,
a class variable is "shared" by a parent and all of its
descendants, in addition to being shared by all instances of that
class). One subtle exception is if a child class creates a class
variable before its parent does. For example, when a parent
creates a class variable first:
class Base
def initialize; @@var = 'base'; end
def base_set_var; @@var = 'base'; end
def base_print_var; puts @@var; end
end
class Derived < Base
def initialize; super; @@var = 'derived'; end #notice
def derived_set_var; @@var = 'derived'; end
def derived_print_var; puts @@var; end
end
d = Derived.new
d.base_set_var; d.derived_print_var # -> 'base'
d.base_print_var # -> 'base'
d.derived_set_var; d.derived_print_var # -> 'derived'
d.base_print_var # -> 'derived'
In the above code, the class variable @@var is indeed "shared" by
the Base and Derived classes. However, now see what happens when a
child class creates the variable first:
class Base
def initialize; @@var = 'base'; end
def base_set_var; @@var = 'base'; end
def base_print_var; puts @@var; end
end
class Derived < Base
def initialize; @@var = 'derived'; super; end #changed
def derived_set_var; @@var = 'derived'; end
def derived_print_var; puts @@var; end
end
d = Derived.new
d.base_set_var; d.derived_print_var # -> 'derived'
d.base_print_var # -> 'base'
d.derived_set_var; d.derived_print_var # -> 'derived'
d.base_print_var # -> 'base'
In this case, the parent and child classes have two independent
class variables with identical names.
20. Substituting backslashes may be tricky. Example:
str = 'a\b\c' # -> a\b\c
puts str.gsub(/\\/,'\\\\') # -> a\b\c
puts str.gsub(/\\/,'\\\\\\') # -> a\\b\\c
puts str.gsub(/\\/,'\\\\\\\\') # -> a\\b\\c
puts str.gsub(/\\/) { '\\\\' } # -> a\\b\\c
puts str.gsub(/\\/, '\&\&') # -> a\\b\\c
Things That Are Good to Know :-)
a. In Ruby the "self assignment operator" goes beyond "+=, -=, *=,
/=, %=". In particular, operators such as "||=" also exist (but
currently not for a class variable if it is not yet defined; this
may change in the future). Please see Table 18.4 in the
"Programming Ruby" book for the complete list.
b. For a "cookbook" with many algorithm and code examples, consider
"PLEAC-Ruby" (http://pleac.sourceforge.net/pleac_ruby/t1.html).
c. For extensive numerical computations, consider "Numerical Ruby"
(http://www.ir.isas.ac.jp/~masa/ruby/index-e.html).
d. For (numerical) arrays which consume a large amount of memory
and/or CPU time, consider "NArray" which is part of the Numerical
Ruby (http://www.ir.isas.ac.jp/~masa/ruby/na/SPEC.en).
e. For speeding up some parts of your Ruby code by writing them in C,
consider "Inline" (http://sourceforge.net/projects/rubyinline/).
f. For Ruby to C translation, consider "rb2c"
(http://easter.kuee.kyoto-u.ac.jp/~hiwada/ruby/rb2c/).
g. For Ruby and C/C++ integration, consider "SWIG"
(http://www.swig.org/).
h. For Ruby and Java integration, consider "JRuby"
(http://jruby.sourceforge.net/).
i. For Ruby and Lua integration, consider "Ruby-Lua"
(http://ruby-lua.unolotiene.com/ruby-lua.whtm).
j. For creating a stand-alone (Windows) executable, consider "exerb"
(http://exerb.sourceforge.jp/index.en.html).
k. For manipulating raw bits, instead of using Fixnum's, consider
"BitVector"
(http://www.ce.chalmers.se/~feldt/ruby/extensions/bitvector/).
* For comments on this list, you may e-mail me directly at
billtj@glue.umd.edu.
_________________________________________________________________
Last updated: Oct 21, 2002.
This list itself is available at
http://www.glue.umd.edu/~billtj/ruby.html.
The plain text format is produced from the HTML format with "lynx
-dump -nolist" (and some minor editing).
_________________________________________________________________