-----Original Message-----
From: ruby-talk-admin / ruby-lang.org
[mailto:ruby-talk-admin / ruby-lang.org] 
Sent: 2001723 16:00
To: Delivery list is suppressed
Subject: Digest Articles 18282-18332 (1/4) (ruby-talk ML)

From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from mailgate.rz.uni-karlsruhe.de
(mailgate.rz.uni-karlsruhe.de [129.13.64.97])
	by helium.ruby-lang.org (Postfix) with ESMTP id 443CE37BF
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 18:44:22 +0900
(JST)
Received: from rzstud4.rz.uni-karlsruhe.de
(exim / rzstud4.rz.uni-karlsruhe.de [193.196.41.36])
	by mailgate.rz.uni-karlsruhe.de with esmtp (Exim 3.16 #1)
	id 15OFmf-0003Bj-00; Sun, 22 Jul 2001 11:44:21 +0200
Received: from uu9r by rzstud4.rz.uni-karlsruhe.de with local (Exim 2.12
#2)
	id 15OFme-0003DT-00
	for ruby-talk / ruby-lang.org; Sun, 22 Jul 2001 11:44:20 +0200
Date: Sun, 22 Jul 2001 18:44:23 +0900
Posted: Sun, 22 Jul 2001 11:44:20 +0200
From: Michael Neumann <uu9r / rz.uni-karlsruhe.de>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18282] Re: Re-loading a modified class definition
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Message-Id: <20010722114419.A12283 / rz.uni-karlsruhe.de>
In-Reply-To: <20010722.151411.552910253.12722 / zipworld.com.au>; from
harryo / zipworld.com.au on Sun, Jul 22, 2001 at 02:21:20PM +0900
References: <20010722.150447.1023457753.12722 / zipworld.com.au>
<20010722.151411.552910253.12722 / zipworld.com.au>
X-ML-Name: ruby-talk
X-Mail-Count: 18282
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Precedence: bulk
Lines: 21

On Sun, Jul 22, 2001 at 02:21:20PM +0900, HarryO wrote:
> Never mind.  I took a guess that there might be a special variable
that
> tracks what files have been loaded.  There is; it's $".
> 
> So, by deleting the particular file from $", I was able to force Ruby
to
> re-load the file and everything worked just fine.
> 
> What's even nicer is that the objects that were created maintained
their
> definitions even after re-loading.  Only new objects created had the
new
> definition, which is how I'd like it to be.

Try load instead of require!
This will reload a file.


Regards,

  Michael

-- 
Michael Neumann  ***  eMail uu9r / rz.uni-karlsruhe.de

From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from vu-vlsi.ee.vill.edu (vu-vlsi.ee.vill.edu
[153.104.44.229])
	by helium.ruby-lang.org (Postfix) with ESMTP id CAE1437BF
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 18:50:10 +0900
(JST)
Received: from acadia.ee.vill.edu (acadia.ee.vill.edu [153.104.63.246])
by vu-vlsi.ee.vill.edu (8.11.1/8.8.2) with ESMTP id f6M9mFb09300; Sun,
22 Jul 2001 05:48:15 -0400 (EDT)
Received: (from anany@localhost) by acadia.ee.vill.edu (8.8.7/8.8.2) id
FAA08135; Sun, 22 Jul 2001 05:48:14 -0400 (EDT)
Date: Sun, 22 Jul 2001 18:50:12 +0900
Posted: Sun, 22 Jul 2001 05:48:14 -0400 (EDT)
From: Toby DiPasquale <anany / ece.villanova.edu>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18283] New Ruby FTP Mirror
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Message-Id:
<Pine.SV4.3.95.1010722053830.8131A-100000 / acadia.ee.vill.edu>
X-ML-Name: ruby-talk
X-Mail-Count: 18283
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
X-Sender: anany / acadia.ee.vill.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Precedence: bulk
Lines: 29

Hello everyone,

	I have just finished setting up a new Ruby FTP Mirror here on
campus. The URL is as follows:

ftp://fearless.ece.vill.edu/pub/ruby

This server is located on the east coast of the US, at Villanova
University. It will allow a total of 50 concurrent anonymous connections
(feedback from you guys can get this raised), and will do a nightly
refresh of the ftp.ruby-lang.org server via rsync. Thanks for all the
help
in getting me started (Dave, Andy and Matz, in particular).

Enjoy, everyone! =)

Any problems connecting: please email me at the address below. I am
generally online 23 hours a day, so you will catch me.

Also, check out http://rubictm.sourceforge.net in about a month.

0100001101000010010000110100011101110101
Tobias DiPasquale
-Solaris Systems Administrator-
Villanova University ECE Dept. (www.ece.vill.edu)
-Applications Engineering Consultant-
CyberSoft, Inc. (www.cybersoft.com)
mailto: anany / ece.vill.edu
0100001101000010010000110100011101110101


From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from cello (p3EE2734E.dip.t-dialin.net [62.226.115.78])
	by helium.ruby-lang.org (Postfix) with ESMTP id 730A437BF
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 19:38:48 +0900
(JST)
Received: from cello (really [127.0.0.1]) by cello
	via smail with esmtp
	id <m15OGZ6-001z4UC / cello> (Debian Smail3.2.0.111)
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 12:34:24 +0200
(CEST) 
Date: Sun, 22 Jul 2001 19:38:49 +0900
Posted: Sun, 22 Jul 2001 10:34:22 UT
From: Jens Luedicke <jens / irs-net.com>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18284] environment variables
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Message-Id: <m15OGZ6-001z4UC / cello>
X-ML-Name: ruby-talk
X-Mail-Count: 18284
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
X-Mailer: MIME::Lite 2.106  (A1.17; B2.12; Q2.03)
Content-Disposition: inline
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: binary
Precedence: bulk
Lines: 8

hi ...

how can I access environment variables? 

I'm using a ruby CVS debian package and the
Ruby 1.4 Reference Manual wasn't very helpful.

jens

From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from bbnmg1.net.external.hp.com (bbnmg1.net.external.hp.com
[192.6.76.73])
	by helium.ruby-lang.org (Postfix) with ESMTP id 2CD2237BF
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 19:53:10 +0900
(JST)
Received: from isoit213.bbn.hp.com (isoit213.bbn.hp.com [15.140.169.29])
	by bbnmg1.net.external.hp.com (Postfix) with ESMTP id 03EA6133
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 12:52:57 +0200
(METDST)
Received: from aare.GVA.HP.COM (aare.gva.hp.com [15.152.18.77])
	by isoit213.bbn.hp.com (8.9.3 (PHNE_18979)/8.9.3 SMKit6.0.6
OpenMail) with SMTP id MAA23136
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 12:52:49 +0200
(METDST)
Received: from 15.152.18.77 by aare.GVA.HP.COM (InterScan E-Mail
VirusWall NT); Sun, 22 Jul 2001 12:52:48 +0200 (W. Europe Daylight Time)
Received: by aare.gva.hp.com with Internet Mail Service (5.5.2653.19)
	id <3F5LW4X9>; Sun, 22 Jul 2001 12:52:48 +0200
Date: Sun, 22 Jul 2001 19:53:10 +0900
Posted: Sun, 22 Jul 2001 12:52:46 +0200
From: "SHULTZ,BARRY (HP-Israel,ex1)" <barry_shultz / hp.com>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18285] RE:  environment variables
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Message-Id:
<733CA39D4982D411AD080090278CBE399A54ED / shalom.israel.hp.com>
X-ML-Name: ruby-talk
X-Mail-Count: 18285
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
X-Mailer: Internet Mail Service (5.5.2653.19)
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Precedence: bulk
Lines: 16

> 
> how can I access environment variables? 
> 
ENV[key]

For instance

ENV['TERM']


You'll find a complete discussion of environment variables at

http://www.rubycentral.com/book/rubyworld.html

Regards,
Barry

From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from moulon.inra.fr (moulon.inra.fr [138.102.114.1])
	by helium.ruby-lang.org (Postfix) with ESMTP id 7553B37B5
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 21:44:21 +0900
(JST)
Received: (from decoux@localhost)
	by moulon.inra.fr (8.10.1/8.10.1) id f6MCgod27313;
	Sun, 22 Jul 2001 14:42:50 +0200 (MET DST)
Date: Sun, 22 Jul 2001 21:44:23 +0900
Posted: Sun, 22 Jul 2001 14:42:50 +0200 (MET DST)
From: ts <decoux / moulon.inra.fr>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18286] Re: RCR: Transient instance variables
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Cc: ruby-talk / ruby-lang.org
Message-Id: <200107221242.f6MCgod27313 / moulon.inra.fr>
In-Reply-To: <20010721202506.A4148 / rz.uni-karlsruhe.de> (message from
Michael
	Neumann on Sun, 22 Jul 2001 03:25:10 +0900)
References: <20010721124357.A646 / michael.neumann.all>
<200107211418.f6LEImS26251 / moulon.inra.fr>
<20010721202506.A4148 / rz.uni-karlsruhe.de>
X-ML-Name: ruby-talk
X-Mail-Count: 18286
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
Precedence: bulk
Lines: 12

>>>>> "M" == Michael Neumann <uu9r / rz.uni-karlsruhe.de> writes:

M> This works fine, but has one major drawback, that you have to
M> call it explicitly. 

 Well, it exist a possibility but this make something complex.

 I can send it to you (in private e-mail) if you want to look at it and
try
 to have a better solution.


Guy Decoux

From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from zip.local.thomases.com (somewhere.in.pragprog.com [63.68.
129.130])
	by helium.ruby-lang.org (Postfix) with ESMTP id 855D537BE
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 22:42:22 +0900
(JST)
Received: from localhost (dave@localhost [127.0.0.1])
	by zip.local.thomases.com (8.11.2/8.11.2) with ESMTP id
f6MDgMk01640
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 08:42:22 -0500
Date: Sun, 22 Jul 2001 22:42:28 +0900
Posted: Sun, 22 Jul 2001 13:30:49 GMT
From: "HarryO" <harryo / zipworld.com.au>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18287] Re: Re-loading a modified class definition
To: ruby-talk / ruby-lang.org (ruby-talk ML)
	, undisclosed-recipients:;
Message-Id: <20010722.233049.816504794.12722 / zipworld.com.au>
References: <20010722.150447.1023457753.12722 / zipworld.com.au>
<20010722.151411.552910253.12722 / zipworld.com.au>
<1ex67.4924$4v6.512715 / e420r-atl3.usenetserver.com>
X-ML-Name: ruby-talk
X-Mail-Count: 18287
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question,
	please contact ruby-talk-admin / ruby-lang.org;
	<mailto:ruby-talk-admin / ruby-lang.org>
Path:
e420r-atl2.usenetserver.com!nntprelay-atl1!e420r-sjo4.usenetserver.com!c
yclone2.usenetserver.com!usenetserver.com!news-xfer.siscom.net!intgwlon.
nntp.telstra.net!news-server.bigpond.net.au!not-for-mail
Newsgroups: comp.lang.ruby
User-Agent: Pan/0.9.7 (Unix)
NNTP-Posting-Host: 144.132.249.179
X-Complaints-To: news / bigpond.net.au
X-Trace: news-server.bigpond.net.au 995808649 144.132.249.179 (Sun, 22
Jul 2001 23:30:49 EST)
NNTP-Posting-Date: Sun, 22 Jul 2001 23:30:49 EST
Organization: BigPond Internet Services (http://www.bigpond.net.au)
X-rubymirror: yes
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Precedence: bulk
Lines: 11

In article <1ex67.4924$4v6.512715 / e420r-atl3.usenetserver.com>, "Michael
Neumann" <uu9r / rz.uni-karlsruhe.de> wrote:


> Try load instead of require!
> This will reload a file.

Thanks Michael.  That's precisely what I was looking for.  Saves me
doing
the fiddling myself.

Damn I love this language !!

From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from picachu.netlab.jp (picachu.netlab.jp [210.251.121.24])
	by helium.ruby-lang.org (Postfix) with ESMTP id 4037D37DC
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 23:43:09 +0900
(JST)
Received: from ev.netlab.zetabits.co.jp.(none) (analog3.netlab.jp
[210.251.121.17])
	by picachu.netlab.jp (Postfix) with SMTP id 465C02D015
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 23:43:08 +0900
(JST)
Received: (nullmailer pid 4773 invoked by uid 1000);
	Sun, 22 Jul 2001 14:40:20 -0000
Date: Sun, 22 Jul 2001 23:43:09 +0900
Posted: Sun, 22 Jul 2001 23:40:20 +0900
From: matz / ruby-lang.org (Yukihiro Matsumoto)
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18288] Re: 99 bottles of sake
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Message-Id: <995812820.843681.4772.nullmailer / ev.netlab.jp>
In-Reply-To: Glen Starchman's message of "Sun, 22 Jul 2001 07:37:16
+0900"  	<01072115305307.01065 / daibutsu.enabledtechnology.com>
References: <F122SPUPeKljq65Rn8P00003451 / hotmail.com>
	<01072115305307.01065 / daibutsu.enabledtechnology.com>
X-ML-Name: ruby-talk
X-Mail-Count: 18288
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
X-Mailer: cmail 2.61+20001225 on GNU Emacs 20.7.2 / Mule 4.1 (AOI)
User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi)
APEL/10.3 Emacs/20.7 (i386-debian-linux-gnu) MULE/4.1 (AOI)
Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya")
Content-Type: text/plain; charset=US-ASCII
Precedence: bulk
Lines: 13

Hi,

In message "[ruby-talk:18270] Re: 99 bottles of sake"
    on 01/07/22, Glen Starchman <glen / enabledventures.com> writes:

|> I would like to present the inventor of Ruby with a bottle of
|> sake. Could somebody advise me a liquor store near Matz.'s place with
|> a web site and accept VISA? Feel free to join me to make the
|> number 99.

Ah, sorry.  I don't drink alcohol at all.  Try something else.

							matz.

From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from relay.utnet.ru (unknown [195.12.66.83])
	by helium.ruby-lang.org (Postfix) with ESMTP id B298637DC
	for <ruby-talk / ruby-lang.org>; Mon, 23 Jul 2001 00:26:16 +0900
(JST)
Received: from p32 ([195.12.94.102])
	by relay.utnet.ru (8.11.3/8.11.3) with ESMTP id f6MFP6C23315
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 21:25:20 +0600
(YEKST)
	(envelope-from aleksei.guzev / bigfoot.com)
Date: Mon, 23 Jul 2001 00:26:18 +0900
Posted: Sun, 22 Jul 2001 21:29:22 +0600
From: "Aleksei Guzev" <aleksei.guzev / bigfoot.com>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18289] FIX2LONG, NUM2INT
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Message-Id: <000001c112c3$1d60f260$665e0cc3@p32>
X-ML-Name: ruby-talk
X-Mail-Count: 18289
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
X-Mailer: Microsoft Outlook, Build 10.0.2616
Organization: ISD
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Mime-Version: 1.0
Content-Type: text/plain;
	charset="koi8-r"
Content-Transfer-Encoding: 7bit
Precedence: bulk
Lines: 3

What is the difference between FIX and NUM? 
Why there's FIX2LONG but ther is not NUM2ULONG?


From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from moulon.inra.fr (moulon.inra.fr [138.102.114.1])
	by helium.ruby-lang.org (Postfix) with ESMTP id A18AA37DC
	for <ruby-talk / ruby-lang.org>; Mon, 23 Jul 2001 00:34:27 +0900
(JST)
Received: (from decoux@localhost)
	by moulon.inra.fr (8.10.1/8.10.1) id f6MFWtf27373;
	Sun, 22 Jul 2001 17:32:55 +0200 (MET DST)
Date: Mon, 23 Jul 2001 00:34:29 +0900
Posted: Sun, 22 Jul 2001 17:32:55 +0200 (MET DST)
From: ts <decoux / moulon.inra.fr>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18290] Re: FIX2LONG, NUM2INT
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Cc: ruby-talk / ruby-lang.org
Message-Id: <200107221532.f6MFWtf27373 / moulon.inra.fr>
In-Reply-To: <000001c112c3$1d60f260$665e0cc3@p32>
(aleksei.guzev / bigfoot.com)
References:  <000001c112c3$1d60f260$665e0cc3@p32>
X-ML-Name: ruby-talk
X-Mail-Count: 18290
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
Precedence: bulk
Lines: 17

>>>>> "A" == Aleksei Guzev <aleksei.guzev / bigfoot.com> writes:

A> What is the difference between FIX and NUM? 

 FIXNUM <= 1073741823

A> Why there's FIX2LONG but ther is not NUM2ULONG?

 ???

pigeon% grep NUM2ULONG *.h
ruby.h:#define NUM2ULONG(x) rb_num2ulong((VALUE)x)
ruby.h:#define NUM2UINT(x) NUM2ULONG(x)
pigeon% 


Guy Decoux

From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from moulon.inra.fr (moulon.inra.fr [138.102.114.1])
	by helium.ruby-lang.org (Postfix) with ESMTP id 7828837DC
	for <ruby-talk / ruby-lang.org>; Mon, 23 Jul 2001 00:39:54 +0900
(JST)
Received: (from decoux@localhost)
	by moulon.inra.fr (8.10.1/8.10.1) id f6MFcNj27381;
	Sun, 22 Jul 2001 17:38:23 +0200 (MET DST)
Date: Mon, 23 Jul 2001 00:39:56 +0900
Posted: Sun, 22 Jul 2001 17:38:23 +0200 (MET DST)
From: ts <decoux / moulon.inra.fr>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18291] Re: FIX2LONG, NUM2INT
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Cc: ruby-talk / ruby-lang.org, ruby-talk / ruby-lang.org
Message-Id: <200107221538.f6MFcNj27381 / moulon.inra.fr>
In-Reply-To: <200107221532.f6MFWtf27373 / moulon.inra.fr> (message from ts
on
	Mon, 23 Jul 2001 00:34:29 +0900)
References: <000001c112c3$1d60f260$665e0cc3@p32>
<200107221532.f6MFWtf27373 / moulon.inra.fr>
X-ML-Name: ruby-talk
X-Mail-Count: 18291
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
Precedence: bulk
Lines: 11

>>>>> "t" == ts  <decoux / moulon.inra.fr> writes:

t>  FIXNUM <= 1073741823

 More precisely

  -1073741824 <= FIXNUM <= 1073741823


Guy Decoux


From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from aaanet.ru (pa.aaanet.ru [213.59.98.223])
	by helium.ruby-lang.org (Postfix) with ESMTP id F076437DC
	for <ruby-talk / ruby-lang.org>; Mon, 23 Jul 2001 00:42:56 +0900
(JST)
Received: from [213.59.109.213] (helo=xm)
	by aaanet.ru with smtp (Exim 3.16 #1)
	id 15OLNR-000BFB-00
	for ruby-talk / ruby-lang.org; Sun, 22 Jul 2001 19:42:41 +0400
Date: Mon, 23 Jul 2001 00:42:57 +0900
Posted: Sun, 22 Jul 2001 19:45:43 +0400
From: "Aristarkh A Zagorodnikov" <xm / w3d.ru>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18292] Re: 99 bottles of sake
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Message-Id: <ADEIIKHFJNKIAJNFANKDKEDCCIAA.xm / w3d.ru>
In-Reply-To: <995812820.843681.4772.nullmailer / ev.netlab.jp>
X-ML-Name: ruby-talk
X-Mail-Count: 18292
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2505.0000
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Precedence: bulk
Lines: 24


> -----Original Message-----
> From: Yukihiro Matsumoto [mailto:matz / ruby-lang.org]
> Sent: Sunday, July 22, 2001 6:43 PM
> To: ruby-talk ML
> Subject: [ruby-talk:18288] Re: 99 bottles of sake
> 
> 
> Hi,
> 
> In message "[ruby-talk:18270] Re: 99 bottles of sake"
>     on 01/07/22, Glen Starchman <glen / enabledventures.com> writes:
> 
> |> I would like to present the inventor of Ruby with a bottle of
> |> sake. Could somebody advise me a liquor store near Matz.'s place
with
> |> a web site and accept VISA? Feel free to join me to make the
> |> number 99.
> 
> Ah, sorry.  I don't drink alcohol at all.  Try something else.
Good ... alcohol is no good ;) Maybe some fruit juice ...
cherry+blackberry+apple mix?
Offtopic theme - beware [mental note to self too] ;)

Aristarkh A Zagorodnikov, Lead Programmer, W3D Group
http://www.w3d.ru /// xm / w3d.ru /// ICQ UIN 36987938

From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from relay.utnet.ru (indigo.utnet.ru [195.12.66.83])
	by helium.ruby-lang.org (Postfix) with ESMTP id 76ABF37DC
	for <ruby-talk / ruby-lang.org>; Mon, 23 Jul 2001 00:43:46 +0900
(JST)
Received: from p32 ([195.12.94.102])
	by relay.utnet.ru (8.11.3/8.11.3) with ESMTP id f6MFcrC23568
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 21:38:53 +0600
(YEKST)
	(envelope-from aleksei.guzev / bigfoot.com)
Date: Mon, 23 Jul 2001 00:43:47 +0900
Posted: Sun, 22 Jul 2001 21:43:08 +0600
From: "Aleksei Guzev" <aleksei.guzev / bigfoot.com>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18293] NUM2LONG problem :)
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Message-Id: <000101c112c5$01d7ed30$665e0cc3@p32>
X-ML-Name: ruby-talk
X-Mail-Count: 18293
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
X-Mailer: Microsoft Outlook, Build 10.0.2616
Organization: ISD
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Mime-Version: 1.0
Content-Type: text/plain;
	charset="koi8-r"
Content-Transfer-Encoding: 7bit
Precedence: bulk
Lines: 10

Just now I met a funny problem with NUM2LONG macro.

I've written a line like the following

 return NUM2LONG( fn( x ) );

Function fn has vivid side effect and NUM2LONG calls it twice ( see its
definition ) :) 
Do not do like above!


From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from hoyogw.zetabits.com (hoyogw.zetabits.com
[210.251.121.20])
	by helium.ruby-lang.org (Postfix) with ESMTP id D824A37DC
	for <ruby-talk / ruby-lang.org>; Mon, 23 Jul 2001 00:55:44 +0900
(JST)
Received: from zip.local.thomases.com (somewhere.in.pragprog.com [63.68.
129.130])
	by hoyogw.zetabits.com (Postfix) with ESMTP id 3DDE046C7E
	for <ruby-talk / netlab.co.jp>; Mon, 23 Jul 2001 00:55:43 +0900
(JST)
Received: (from dave@localhost)
	by zip.local.thomases.com (8.11.2/8.11.2) id f6MFtiT02100;
	Sun, 22 Jul 2001 10:55:44 -0500
Date: Mon, 23 Jul 2001 00:55:45 +0900
Posted: 22 Jul 2001 10:55:44 -0500
From: Dave Thomas <Dave / PragmaticProgrammer.com>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18294] Re: NUM2LONG problem :)
Sender: dave / thomases.com
To: ruby-talk / ruby-lang.org (ruby-talk ML)
	, ruby-talk / netlab.co.jp
Message-Id: <m2vgklq7pb.fsf / zip.local.thomases.com>
In-Reply-To: "Aleksei Guzev"'s message of "Mon, 23 Jul 2001 00:43:47
+0900"
References: <000101c112c5$01d7ed30$665e0cc3@p32>
X-ML-Name: ruby-talk
X-Mail-Count: 18294
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question,
	please contact ruby-talk-admin / ruby-lang.org;
	<mailto:ruby-talk-admin / ruby-lang.org>
Organization: The Pragmatic Programmers, LLC
User-Agent: Gnus/5.0802 (Gnus v5.8.2) XEmacs/21.4 (Solid Vapor)
X-Authentication-Warning: zip.local.thomases.com: dave set sender to
Dave / Thomases.com using -f
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Precedence: bulk
Lines: 21

"Aleksei Guzev" <aleksei.guzev / bigfoot.com> writes:

> Just now I met a funny problem with NUM2LONG macro.
> 
> I've written a line like the following
> 
>  return NUM2LONG( fn( x ) );
> 
> Function fn has vivid side effect and NUM2LONG calls it twice ( see
> its definition ) :) Do not do like above!

Patient: Doctor, it hurts when I type this.

Doctor: Then don't type that.


Just call rb_num2long(fn(x)) directly.



Dave

From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from zip.local.thomases.com (somewhere.in.pragprog.com [63.68.
129.130])
	by helium.ruby-lang.org (Postfix) with ESMTP id 2E4743771
	for <ruby-talk / ruby-lang.org>; Mon, 23 Jul 2001 01:02:38 +0900
(JST)
Received: from localhost (dave@localhost [127.0.0.1])
	by zip.local.thomases.com (8.11.2/8.11.2) with ESMTP id
f6MG2dk02162
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 11:02:39 -0500
Date: Mon, 23 Jul 2001 01:02:39 +0900
Posted: Sun, 22 Jul 2001 08:45:16 +2328
From: Ned Konz <ned / whidbey.net>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18295] Unicode filenames and Ruby porting
To: ruby-talk / ruby-lang.org (ruby-talk ML)
	, undisclosed-recipients:;
Message-Id: <tllt6mslvsrl89 / corp.supernews.com>
X-ML-Name: ruby-talk
X-Mail-Count: 18295
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question,
	please contact ruby-talk-admin / ruby-lang.org;
	<mailto:ruby-talk-admin / ruby-lang.org>
Path:
e420r-atl3.usenetserver.com!nntprelay-atl1!e420r-sjo4.usenetserver.com!u
senetserver.com!newshub2.rdc1.sfba.home.com!news.home.com!feeder.via.net
!newsfeed.berkeley.edu!ucberkeley!news.gv.tsc.tdk.com!sn-xit-02!sn-post-
01!supernews.com!corp.supernews.com!not-for-mail
Newsgroups: comp.lang.ruby
Organization: Posted via Supernews, http://www.supernews.com
User-Agent: KNode/0.5.6
X-Complaints-To: newsabuse / supernews.com
X-rubymirror: yes
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Precedence: bulk
Lines: 20

If someone were to port Ruby to Windows/CE, they would have a little 
problem: Ruby seems to assume (from a quick glance at the source) that 
filenames are made up of 1-byte characters (don't know what character
set 
it assumes). However, all file APIs in Windows/CE take and return
Unicode 
characters.

Other WinCE ports (like the Python WinCE port) just attempt to map the 
characters back and forth to ASCII (or maybe just some unspecified 8-bit

character set). However, this can lose a lot of information if you have 
users who have used the native ability to use their local character set
for 
filenames.

Are there any provisions in the Ruby source for dealing with
wide-character 
filenames?

I would think that (given its wide use in Japan) this would be an
important 
feature.

Note that Windows/NT also provides a set of Unicode APIs equivalent to
the 
ASCII ones for file operations.

From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from zip.local.thomases.com (somewhere.in.pragprog.com [63.68.
129.130])
	by helium.ruby-lang.org (Postfix) with ESMTP id C4E8B37B5
	for <ruby-talk / ruby-lang.org>; Mon, 23 Jul 2001 01:02:38 +0900
(JST)
Received: from localhost (dave@localhost [127.0.0.1])
	by zip.local.thomases.com (8.11.2/8.11.2) with ESMTP id
f6MG2ek02167
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 11:02:40 -0500
Date: Mon, 23 Jul 2001 01:02:40 +0900
Posted: Sun, 22 Jul 2001 08:51:54 +2328
From: Ned Konz <ned / whidbey.net>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18296] RE:  Effecient indexing algorithm
To: ruby-talk / ruby-lang.org (ruby-talk ML)
	, undisclosed-recipients:;
Message-Id: <tlltj39inhqk14 / corp.supernews.com>
References: <mcp67.2542$4v6.362811 / e420r-atl3.usenetserver.com>
X-ML-Name: ruby-talk
X-Mail-Count: 18296
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question,
	please contact ruby-talk-admin / ruby-lang.org;
	<mailto:ruby-talk-admin / ruby-lang.org>
Path:
e420r-atl3.usenetserver.com!nntprelay-atl1!e420r-sjo4.usenetserver.com!u
senetserver.com!wn1feed!worldnet.att.net!128.230.129.106!news.maxwell.sy
r.edu!sn-xit-03!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
Newsgroups: comp.lang.ruby
Organization: Posted via Supernews, http://www.supernews.com
User-Agent: KNode/0.5.6
X-Complaints-To: newsabuse / supernews.com
X-rubymirror: yes
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Precedence: bulk
Lines: 10

Michael Davis wrote:

> I am planning to release my version of a btree written in Ruby
sometime
> next week.  It will allow you to store terabytes of data across
multiple
> files and should allow you to quickly retrieve that data.  I have the
code
> written and tested.  I just need to revise my test scripts and
complete
> the documentation.

How does this compare to libdb-ruby, which is a Ruby interface for the 
BerkeleyDB?

From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from relay.utnet.ru (indigo.utnet.ru [195.12.66.83])
	by helium.ruby-lang.org (Postfix) with ESMTP id B70C637F6
	for <ruby-talk / ruby-lang.org>; Mon, 23 Jul 2001 01:23:14 +0900
(JST)
Received: from p32 ([195.12.94.102])
	by relay.utnet.ru (8.11.3/8.11.3) with ESMTP id f6MGL2C24281
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 22:21:02 +0600
(YEKST)
	(envelope-from aleksei.guzev / bigfoot.com)
Date: Mon, 23 Jul 2001 01:23:15 +0900
Posted: Sun, 22 Jul 2001 22:25:18 +0600
From: "Aleksei Guzev" <aleksei.guzev / bigfoot.com>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18297] RE:  Unicode filenames and Ruby porting
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Message-Id: <000201c112ca$e564d950$665e0cc3@p32>
In-Reply-To: <tllt6mslvsrl89 / corp.supernews.com>
X-ML-Name: ruby-talk
X-Mail-Count: 18297
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
X-Mailer: Microsoft Outlook, Build 10.0.2616
Organization: ISD
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Mime-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
Precedence: bulk
Lines: 5

Next versions will support multibyte coding. I hope...

Now You can rebuild Your Ruby with UNICODE and _UNICODE flags set... And
some code replaced :)


From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119])
	by helium.ruby-lang.org (Postfix) with ESMTP id 3498237F6
	for <ruby-talk / ruby-lang.org>; Mon, 23 Jul 2001 01:48:40 +0900
(JST)
Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18])
	by mx2.freebsd.org (Postfix) with ESMTP id 2E8D055B2B
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 09:48:38 -0700
(PDT)
	(envelope-from green / green.bikeshed.org)
Received: from green.bikeshed.org (freefall.freebsd.org
[216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 215C237B401
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 09:48:38 -0700
(PDT)
	(envelope-from green / green.bikeshed.org)
Received: from localhost (green@localhost)
	by green.bikeshed.org (8.11.4/8.11.1) with ESMTP id f6MGma882347
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 12:48:37 -0400
(EDT)
	(envelope-from green / green.bikeshed.org)
Date: Mon, 23 Jul 2001 01:48:40 +0900
Posted: Sun, 22 Jul 2001 12:48:36 -0400
From: "Brian F. Feldman" <green / FreeBSD.org>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18298] Re: NUM2LONG problem :)
Sender: green / green.bikeshed.org
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Message-Id: <200107221648.f6MGma882347 / green.bikeshed.org>
In-Reply-To: Your message of "Mon, 23 Jul 2001 00:55:45 +0900."
             <m2vgklq7pb.fsf / zip.local.thomases.com> 
X-ML-Name: ruby-talk
X-Mail-Count: 18298
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Precedence: bulk
Lines: 36

Dave Thomas <Dave / PragmaticProgrammer.com> wrote:
> "Aleksei Guzev" <aleksei.guzev / bigfoot.com> writes:
> 
> > Just now I met a funny problem with NUM2LONG macro.
> > 
> > I've written a line like the following
> > 
> >  return NUM2LONG( fn( x ) );
> > 
> > Function fn has vivid side effect and NUM2LONG calls it twice ( see
> > its definition ) :) Do not do like above!
> 
> Patient: Doctor, it hurts when I type this.
> 
> Doctor: Then don't type that.
> 
> 
> Just call rb_num2long(fn(x)) directly.

The definition should be trivially fixed, nonetheless... the rules
I've learned for the implementation of macros have been:

* if they're meant to be a block of code not returning a value, they
  should be in "do { code } while (0)"
* parameters must be parenthesized in the implementation to allow for
  arbitrary expressions without operation order interference
* all parameters should be evaluated only once.

Generally, these are all easy to do and result in much more robust
macros that don't break in ways people don't expect.

-- 
 Brian Fundakowski Feldman           \  FreeBSD: The Power to Serve!  /
 green / FreeBSD.org                    `------------------------------'



From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from aiobjects.com (unknown [12.105.170.254])
	by helium.ruby-lang.org (Postfix) with ESMTP id 2084837F8
	for <ruby-talk / ruby-lang.org>; Mon, 23 Jul 2001 02:05:19 +0900
(JST)
Received: from aiov7cl1o (cust-P5-R2-41.POOL.ESR.SJO.wwc.com
[206.112.105.41])
	by aiobjects.com (8.11.2/8.11.0) with SMTP id f6MHLvE05533
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 10:21:57 -0700
Date: Mon, 23 Jul 2001 02:05:21 +0900
Posted: Sun, 22 Jul 2001 10:09:48 -0700
From: "Joe Graham" <joe / aiobjects.com>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18299] Re: Effecient indexing algorithm
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Message-Id: <IMEGLENONPJBIHCEKOPPCEEEDDAA.joe / aiobjects.com>
In-Reply-To: <tlltj39inhqk14 / corp.supernews.com>
X-ML-Name: ruby-talk
X-Mail-Count: 18299
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
Importance: Normal
Mime-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit
Precedence: bulk
Lines: 35

It was a joke because I asked a silly question.  Or was it?  (hahaha)
It
was (mostly) off topic nonetheless.  This turned into an offline
discussion
with the resolution being an inverted text index (ala google) or GNU
Mifluz
( http://www.gnu.org/software/mifluz/ ).   Data structure TBD.
The data structure contenders are:
Dictionary (hash)
Skip List (Probabilistic Insertion)
http://iamwww.unibe.ch/~wenger/DA/SkipList/
Ternary Trees
http://www.ddj.com/articles/1998/9804/9804a/9804a.htm
Good ol' B-tree

Credits go to Mikkel on the solution and excellent data structure
recommendations.  Your comments / suggestions are welcome as well.

-joe

-----Original Message-----
From: Ned Konz [mailto:ned / whidbey.net]
Sent: Sunday, July 22, 2001 9:03 AM
To: ruby-talk ML; undisclosed-recipients:
Subject: [ruby-talk:18296] RE: Effecient indexing algorithm


Michael Davis wrote:

> I am planning to release my version of a btree written in Ruby
sometime
> next week.  It will allow you to store terabytes of data across
multiple
> files and should allow you to quickly retrieve that data.  I have the
code
> written and tested.  I just need to revise my test scripts and
complete
> the documentation.

How does this compare to libdb-ruby, which is a Ruby interface for the
BerkeleyDB?


From ruby-talk-admin / ruby-lang.org Mon, 23 Jul 2001 17:00:03 +0900
Return-Path: <ruby-talk-admin / ruby-lang.org>
Received: from hawk.mail.pas.earthlink.net (hawk.mail.pas.earthlink.net
[207.217.120.22])
	by helium.ruby-lang.org (Postfix) with ESMTP id 6AF3B37F8
	for <ruby-talk / ruby-lang.org>; Mon, 23 Jul 2001 02:06:12 +0900
(JST)
Received: from SALLY (cpe-66-1-238-71.co.sprintbbd.net [66.1.238.71])
	by hawk.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with SMTP id
KAA20850
	for <ruby-talk / ruby-lang.org>; Sun, 22 Jul 2001 10:06:09 -0700
(PDT)
Received: by localhost with Microsoft MAPI; Sun, 22 Jul 2001 11:06:10
-0600
Date: Mon, 23 Jul 2001 02:06:13 +0900
Posted: Sun, 22 Jul 2001 11:06:09 -0600
From: Michael Davis <mdavis / sevainc.com>
Reply-To: ruby-talk / ruby-lang.org
Subject: [ruby-talk:18300] Re: Effecient indexing algorithm
To: ruby-talk / ruby-lang.org (ruby-talk ML)
Message-Id: <01C1129E.5070D870.mdavis / sevainc.com>
X-ML-Name: ruby-talk
X-Mail-Count: 18300
X-MLServer: fml [fml 3.0pl#17]; post only (anyone can post)
X-ML-Info: If you have a question, send e-mail with the body
	"help" (without quotes) to the address
ruby-talk-ctl / ruby-lang.org;
	help=<mailto:ruby-talk-ctl / ruby-lang.org?body=help>
X-Mailer: Microsoft Internet E-mail/MAPI - 8.0.0.4211
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Precedence: bulk
Lines: 51

My btree is written almost completely in Ruby.  I created several small
C 
functions to make searching faster.  The C functions are only needed if 
want a little better performance.  My btree basically reads and writes 
records to and from files.  I believe that Libdb-ruby allows you to use 
BerkeleyDB to also read and write records.  BerkeleyDB is written in C.
I 
know very little about BerkeleyDB but I believe it provides a lot of 
database type stuff like transaction support in addition to reading and 
writing records.  BerkeleyDB is closer to a real database than my btree
is. 
 I don't feel that BerkeleyDB has all of the features of a real database

server like PostgreSQL.  If all you need to do is quickly read and write
a 
lot of records, then using my btree will be an alternative choice to
using 
BerkeleyDB.  Here are some of the features of my btree:

- it is thread safe
- it allows multiple concurrent readers (using Ruby threads)
- it allows one concurrent writer that does not block readers (unless a 
page needs to be split or deleted)
- a btree can span many files
- many btrees can reside in the same file

The btree is a by-product of a database server I am working on.  The 
database server is written completely in Ruby.  The database server uses
my 
btree to read and write records.  I am creating the database server in 
layers such that each layer can be used as independent, stand-alone 
modules.  The btree is one of several stand-alone modules that I have 
created to support the database server.

Why write another database server when there are other great choices
like 
BerkeleyDB and PostgreSQL?  Because I love Ruby, I felt that Ruby had
all 
of the needed components to easily create one, and I choose this as my 
first Ruby project.  So far, getting the btree to work efficiently in
Ruby 
has been the only difficult challenge.

-----Original Message-----
From:	Ned Konz [SMTP:ned / whidbey.net]
Sent:	Sunday, July 22, 2001 10:03 AM
To:	ruby-talk ML; undisclosed-recipients: ;
Subject:	[ruby-talk:18296] RE:  Effecient indexing algorithm

Michael Davis wrote:

> I am planning to release my version of a btree written in Ruby
sometime
> next week.  It will allow you to store terabytes of data across
multiple
> files and should allow you to quickly retrieve that data.  I have the 
code
> written and tested.  I just need to revise my test scripts and
complete
> the documentation.

How does this compare to libdb-ruby, which is a Ruby interface for the
BerkeleyDB?