Digest Articles 18282-18332 (1/4) (ruby-talk ML) 
Author Message
 Digest Articles 18282-18332 (1/4) (ruby-talk ML)

Quote:
-----Original Message-----


Sent: 2001?7??23? 16:00
To: Delivery list is suppressed
Subject: Digest Articles 18282-18332 (1/4) (ruby-talk ML)



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

(JST)
Received: from rzstud4.rz.uni-karlsruhe.de

        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

Date: Sun, 22 Jul 2001 18:44:23 +0900
Posted: Sun, 22 Jul 2001 11:44:20 +0200


Subject: [ruby-talk:18282] Re: Re-loading a modified class definition






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


Content-Disposition: inline
User-Agent: Mutt/1.2.5i
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Precedence: bulk
Lines: 21


> 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

--



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

(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)

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)


Subject: [ruby-talk:18283] New Ruby FTP Mirror

Message-Id:

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



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://www.*-*-*.com/ in about a month.

0100001101000010010000110100011101110101
Tobias DiPasquale
-Solaris Systems Administrator-
Villanova University ECE Dept. (www.ece.vill.edu)
-Applications Engineering Consultant-
{*filter*}Soft, Inc. (www.{*filter*}soft.com)

0100001101000010010000110100011101110101



Received: from cello (p3EE2734E.dip.t-dialin.net [62.226.115.78])
        by helium.ruby-lang.org (Postfix) with ESMTP id 730A437BF

(JST)
Received: from cello (really [127.0.0.1]) by cello
        via smail with esmtp


(CEST)
Date: Sun, 22 Jul 2001 19:38:49 +0900
Posted: Sun, 22 Jul 2001 10:34:22 UT


Subject: [ruby-talk:18284] environment variables


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


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



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

(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

(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

(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


Subject: [ruby-talk:18285] RE:  environment variables

Message-Id:

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


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.*-*-*.com/

Regards,
Barry



Received: from moulon.inra.fr (moulon.inra.fr [138.102.114.1])
        by helium.ruby-lang.org (Postfix) with ESMTP id 7553B37B5

(JST)

        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)


Subject: [ruby-talk:18286] Re: RCR: Transient instance variables




Michael
        Neumann on Sun, 22 Jul 2001 03:25:10 +0900)



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


Precedence: bulk
Lines: 12


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



Received: from zip.local.thomases.com (somewhere.in.pragprog.com [63.68.
129.130])
        by helium.ruby-lang.org (Postfix) with ESMTP id 855D537BE

(JST)

        by zip.local.thomases.com (8.11.2/8.11.2) with ESMTP id
f6MDgMk01640

Date: Sun, 22 Jul 2001 22:42:28 +0900
Posted: Sun, 22 Jul 2001 13:30:49 GMT


Subject: [ruby-talk:18287] Re: Re-loading a modified class definition

        , undisclosed-recipients:;




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,


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-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.*-*-*.com/ )
X-rubymirror: yes
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Precedence: bulk
Lines: 11



> 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 !!



Received: from picachu.netlab.jp (picachu.netlab.jp [210.251.121.24])
        by helium.ruby-lang.org (Postfix) with ESMTP id 4037D37DC

(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

(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


Subject: [ruby-talk:18288] Re: 99 bottles of sake


In-Reply-To: Glen Starchman's message of "Sun, 22 Jul 2001 07:37:16



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


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"

|> 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 {*filter*} at all.  Try something else.

                                                        matz.



Received: from relay.utnet.ru (unknown [195.12.66.83])
        by helium.ruby-lang.org (Postfix) with ESMTP id B298637DC

(JST)
Received: from p32 ([195.12.94.102])
        by relay.utnet.ru (8.11.3/8.11.3) with ESMTP id f6MFP6C23315

(YEKST)

Date: Mon, 23 Jul 2001 00:26:18 +0900
Posted: Sun, 22 Jul 2001 21:29:22 +0600


Subject: [ruby-talk:18289] FIX2LONG, NUM2INT


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


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?



Received: from moulon.inra.fr (moulon.inra.fr [138.102.114.1])
        by helium.ruby-lang.org (Postfix) with ESMTP id A18AA37DC

(JST)

        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)


Subject: [ruby-talk:18290] Re: FIX2LONG, NUM2INT






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


Precedence: bulk
Lines: 17


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



Received: from moulon.inra.fr (moulon.inra.fr [138.102.114.1])
        by helium.ruby-lang.org (Postfix) with ESMTP id 7828837DC

(JST)

        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)


Subject: [ruby-talk:18291] Re: FIX2LONG, NUM2INT




on
        Mon, 23 Jul 2001 00:34:29 +0900)


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


Precedence: bulk
Lines: 11


t>  FIXNUM <= 1073741823

 More precisely

  -1073741824 <= FIXNUM <= 1073741823

Guy Decoux



Received: from aaanet.ru (pa.aaanet.ru [213.59.98.223])
        by helium.ruby-lang.org (Postfix) with ESMTP id F076437DC

(JST)
Received: from [213.59.109.213] (helo=xm)
        by aaanet.ru with smtp (Exim 3.16 #1)
        id 15OLNR-000BFB-00

Date: Mon, 23 Jul 2001 00:42:57 +0900
Posted: Sun, 22 Jul 2001 19:45:43 +0400


Subject: [ruby-talk:18292] Re: 99 bottles of sake



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


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-----

> 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"

> |> 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 {*filter*} at all.  Try something else.
Good ... {*filter*} 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



Received: from relay.utnet.ru (indigo.utnet.ru [195.12.66.83])
        by helium.ruby-lang.org (Postfix) with ESMTP id 76ABF37DC

(JST)
Received: from p32 ([195.12.94.102])
        by relay.utnet.ru (8.11.3/8.11.3) with ESMTP id f6MFcrC23568

(YEKST)

Date: Mon, 23 Jul 2001 00:43:47 +0900
Posted: Sun, 22 Jul 2001 21:43:08 +0600


Subject: [ruby-talk:18293] NUM2LONG problem :)


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


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!



Received: from hoyogw.zetabits.com (hoyogw.zetabits.com
[210.251.121.20])
        by helium.ruby-lang.org (Postfix) with ESMTP id D824A37DC

(JST)
Received: from zip.local.thomases.com (somewhere.in.pragprog.com [63.68.
129.130])
        by hoyogw.zetabits.com (Postfix) with ESMTP id 3DDE046C7E

(JST)

        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


Subject: [ruby-talk:18294] Re: NUM2LONG problem :)




In-Reply-To: "Aleksei Guzev"'s message of "Mon, 23 Jul 2001 00:43:47
+0900"

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,


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

Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Precedence: bulk
Lines: 21


> 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



Received: from zip.local.thomases.com (somewhere.in.pragprog.com [63.68.
129.130])
        by helium.ruby-lang.org (Postfix) with ESMTP id 2E4743771

(JST)

        by zip.local.thomases.com (8.11.2/8.11.2) with ESMTP id
f6MG2dk02162

Date: Mon, 23 Jul 2001 01:02:39 +0900
Posted: Sun, 22 Jul 2001 08:45:16 +2328


Subject: [ruby-talk:18295] Unicode filenames and Ruby porting

        , undisclosed-recipients:;

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,


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.*-*-*.com/
User-Agent: KNode/0.5.6

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.



Received: from zip.local.thomases.com (somewhere.in.pragprog.com [63.68.
129.130])
        by helium.ruby-lang.org (Postfix) with ESMTP id C4E8B37B5

(JST)

        by zip.local.thomases.com (8.11.2/8.11.2) with ESMTP id
f6MG2ek02167

Date: Mon, 23 Jul 2001 01:02:40 +0900
Posted: Sun, 22 Jul 2001 08:51:54 +2328


Subject: [ruby-talk:18296] RE:  Effecient indexing algorithm

        , undisclosed-recipients:;


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,


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.*-*-*.com/
User-Agent: KNode/0.5.6

X-rubymirror: yes
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Precedence: bulk
Lines: 10


> 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?



Received: from relay.utnet.ru (indigo.utnet.ru [195.12.66.83])
        by helium.ruby-lang.org (Postfix) with ESMTP id B70C637F6

(JST)
Received: from p32 ([195.12.94.102])
        by relay.utnet.ru (8.11.3/8.11.3) with ESMTP id f6MGL2C24281

(YEKST)

Date: Mon, 23 Jul 2001 01:23:15 +0900
Posted: Sun, 22 Jul 2001 22:25:18 +0600


Subject: [ruby-talk:18297] RE:  Unicode filenames and Ruby porting



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


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 :)



Received: from mx2.freebsd.org (mx2.freebsd.org [216.136.204.119])
        by helium.ruby-lang.org (Postfix) with ESMTP id 3498237F6

(JST)
Received: from hub.freebsd.org (hub.freebsd.org [216.136.204.18])
        by mx2.freebsd.org (Postfix) with ESMTP id 2E8D055B2B

(PDT)

Received: from green.bikeshed.org (freefall.freebsd.org
[216.136.204.21])
        by hub.freebsd.org (Postfix) with ESMTP id 215C237B401

(PDT)


        by green.bikeshed.org (8.11.4/8.11.1) with ESMTP id f6MGma882347

(EDT)

Date: Mon, 23 Jul 2001 01:48:40 +0900
Posted: Sun, 22 Jul 2001 12:48:36 -0400


Subject: [ruby-talk:18298] Re: NUM2LONG problem :)



In-Reply-To: Your message of "Mon, 23 Jul 2001 00:55:45 +0900."

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


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



> > 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!  /



Received: from aiobjects.com (unknown [12.105.170.254])
        by helium.ruby-lang.org (Postfix) with ESMTP id 2084837F8

(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

Date: Mon, 23 Jul 2001 02:05:21 +0900
Posted: Sun, 22 Jul 2001 10:09:48 -0700


Subject: [ruby-talk:18299] Re: Effecient indexing algorithm



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


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.*-*-*.com/ ).   Data structure TBD.
The data structure contenders are:
Dictionary (hash)
Skip List (Probabilistic Insertion)
http://www.*-*-*.com/ ~wenger/DA/SkipList/
Ternary Trees
http://www.*-*-*.com/
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-----

Sent: Sunday, July 22, 2001 9:03 AM
To: ruby-talk ML; undisclosed-recipients:
Subject: [ruby-talk:18296] RE: Effecient indexing algorithm


> 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?



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

(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

(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


Subject: [ruby-talk:18300] Re: Effecient indexing algorithm


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


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-----

Sent:   Sunday, July 22, 2001 10:03 AM
To:     ruby-talk ML; undisclosed-recipients: ;
Subject:        [ruby-talk:18296] RE:  Effecient indexing algorithm


> 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?



Fri, 09 Jan 2004 23:04:08 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Digest Articles 40486-40493 (1/1) (ruby-talk ML)

2. Digest Articles 9686-9738 (3/4) (ruby-talk ML)

3. Not seeing today's ruby-talk ML items on comp.lang.ruby

4. ruby-talk ml

5. Welcome to our (ruby-talk ML) You are added automatically

6. Subscribe confirmation request (ruby-talk ML)

7. Welcome to our (ruby-talk ML) You are added automatically

8. Welcome to our (ruby-talk ML) You are added automatically

9. Welcome to our (ruby-talk ML) You are added automatically

10. help (ruby-talk ML)

11. Welcome to our (ruby-talk ML) You are added automatically

12. Welcome to our (ruby-talk ML) You are added automatically

 

 
Powered by phpBB® Forum Software