[#121980] SOT gmail invites — Lyndon Samson <lyndon.samson@...>

X % of the people of this list appear to be using GoogleMail, where X

93 messages 2004/12/01
[#122062] Re: SOT gmail invites — Steve Zich <szich@...> 2004/12/01

On 2004-11-30 19:26:08 -0800, Lyndon Samson <lyndon.samson@gmail.com> said:

[#122063] Re: SOT gmail invites — Robert McGovern <robert.mcgovern@...> 2004/12/01

On Thu, 2 Dec 2004 02:17:45 +0900, Steve Zich >

[#122065] Re: SOT gmail invites — tony summerfelt <snowzone5@...> 2004/12/01

i've got 3 left...

[#122066] Re: SOT gmail invites — Pat Eyler <pate@...> 2004/12/01

I'd take one,

[#122072] Re: SOT gmail invites — tony summerfelt <snowzone5@...> 2004/12/01

On Thu, 2 Dec 2004 02:58:33 +0900, you wrote:

[#122073] Re: SOT gmail invites — Mark Hubbart <discordantus@...> 2004/12/01

On Thu, 2 Dec 2004 03:57:19 +0900, tony summerfelt

[#122075] Re: SOT gmail invites — Matt Maycock <ummaycoc@...> 2004/12/01

I've got some, too...

[#122112] Re: SOT gmail invites — Lyndon Samson <lyndon.samson@...> 2004/12/02

Ok, who missed out, I've got a couple left.

[#122120] Re: SOT gmail invites — Jamis Buck <jamis_buck@...> 2004/12/02

Lyndon Samson wrote:

[#122240] Re: SOT gmail invites — Stefan Schmiedl <s@...> 2004/12/02

On Thu, 2 Dec 2004 12:34:29 +0900,

[#122246] Re: SOT gmail invites — Jamis Buck <jamis_buck@...> 2004/12/02

Stefan Schmiedl wrote:

[#122254] Re: SOT gmail invites — Carl Youngblood <carlwork@...> 2004/12/02

Jamis Buck wrote:

[#122397] Re: SOT gmail invites — Hans Fugal <hans@...> 2004/12/03

Carl Youngblood wrote:

[#122400] Re: SOT gmail invites — Carl Youngblood <carlwork@...> 2004/12/03

Hans Fugal wrote:

[#122427] Re: SOT gmail invites — Hans Fugal <hans@...> 2004/12/03

Carl Youngblood wrote:

[#122069] Rails with webrick slow as snails — Sarah Tanembaum <sarahtanembaum@...>

I've followed the sample installation

15 messages 2004/12/01
[#122071] Re: Rails with webrick slow as snails — David Heinemeier Hansson <david@...> 2004/12/01

> BUT

[#122083] Re: Rails with webrick slow as snails — Sarah Tanembaum <sarahtanembaum@...> 2004/12/01

David Heinemeier Hansson wrote:

[#122110] ordered hash ? — "itsme213" <itsme213@...>

Is there a pure-ruby ordered hash? I'm looking for something that will

44 messages 2004/12/02
[#122176] Re: ordered hash ? — Nikolai Weibull <mailing-lists.ruby-talk@...> 2004/12/02

* itsme213 <itsme213@hotmail.com> [Dec 02, 2004 14:00]:

[#122156] Does anyone have benchmark programs for YARV? — SASADA Koichi <ko1@...>

Hi,

18 messages 2004/12/02

[#122177] nested defs, what if... — Hugh Sasse Staff Elec Eng <hgs@...>

This is too half-baked to be an RCR, but here goes...

17 messages 2004/12/02
[#122179] Re: nested defs, what if... — Austin Ziegler <halostatue@...> 2004/12/02

On Thu, 2 Dec 2004 23:44:08 +0900, Hugh Sasse Staff Elec Eng

[#122212] Re: nested defs, what if... — Brian =?ISO-8859-15?Q?Schr=F6der?= <ruby@...> 2004/12/02

On Thu, 2 Dec 2004 23:57:09 +0900

[#122180] Net::SSH 0.6.0 — Jamis Buck <jamis_buck@...>

Here's another release of Net::SSH, your friendly neighborhood pure-Ruby

12 messages 2004/12/02

[#122288] Ruby documentation. — Adam Fabian <afabian@...>

I'm kind of getting the impression that Ruby might not be

31 messages 2004/12/03

[#122350] Crosswords (#10) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

18 messages 2004/12/03

[#122371] GC run at end of script execution - order in which objects are claimed? — Tilman Sauerbeck <tilman@...>

Hi,

13 messages 2004/12/03

[#122416] *sigh* Anyone having wireless working on a linux machine? — "Abraham Vionas" <abe_ml@...>

I've tried something like eight different distributions and the best I've

11 messages 2004/12/03

[#122444] Using yield — "Joe Van Dyk" <joe.vandyk@...>

I come from a heavy C++ background, discovered Ruby a few months ago and

26 messages 2004/12/04

[#122475] Ruby 2.0 — "Joe Van Dyk" <joe.vandyk@...>

When is Ruby 2.0 due? Or estimated due date?

44 messages 2004/12/04
[#122544] Re: Ruby 2.0 — w_a_x_man@... (William James) 2004/12/04

Brian Mitchell <binary42@gmail.com> wrote

[#122549] Re: Ruby 2.0 — Florian Gross <flgr@...> 2004/12/04

William James wrote:

[#122554] Re: Ruby 2.0 — Giovanni Intini <intinig@...> 2004/12/04

> 32.times{|y|print" "*(31-y),(0..y).map{|x|~y&x>0?" .":" A"},$/}

[#122604] Re: Ruby 2.0 — Florian Gross <flgr@...> 2004/12/05

Giovanni Intini wrote:

[#122619] patch to "make def return something useful" — Peter <Peter.Vanbroekhoven@...>

In RCR 277 it is proposed to have def return something useful, more

15 messages 2004/12/06

[#122630] Freezing Variable Assignment — Nicholas Van Weerdenburg <vanweerd@...>

Hi,

62 messages 2004/12/06
[#122740] Re: Freezing Variable Assignment — "itsme213" <itsme213@...> 2004/12/06

[#122762] Re: Freezing Variable Assignment — "itsme213" <itsme213@...> 2004/12/07

[#122766] Re: Freezing Variable Assignment — Austin Ziegler <halostatue@...> 2004/12/07

On Tue, 7 Dec 2004 12:07:32 +0900, itsme213 <itsme213@hotmail.com>

[#122805] Re: Freezing Variable Assignment — Nicholas Van Weerdenburg <vanweerd@...> 2004/12/07

On Tue, 7 Dec 2004 13:44:09 +0900, Austin Ziegler <halostatue@gmail.com> wrote:

[#122644] Signatures and one liners — Brian Mitchell <binary42@...>

readers.each{|x| puts "Hi #{x},"}

23 messages 2004/12/06

[#122645] Duck images — "Dave Burt" <dave@...>

Hi,

35 messages 2004/12/06
[#122697] Re: Duck images — ptkwt@... (Phil Tomson) 2004/12/06

In article <vcSsd.61264$K7.35690@news-server.bigpond.net.au>,

[#122713] Re: Duck images — "trans. (T. Onoma)" <transami@...> 2004/12/06

On Monday 06 December 2004 12:52 pm, Phil Tomson wrote:

[#122715] Re: Duck images — Michael DeHaan <michael.dehaan@...> 2004/12/06

0>

[#122696] Ruby Article at Linux Journal — pat eyler <pat.eyler@...>

Hey, it looks like our own Ara Howard has been busy. He's got a cool

15 messages 2004/12/06

[#122775] Recommened readings? — "John" <jtrunek@...>

For one of my university courses, I have to complete a paper on Ruby.

13 messages 2004/12/07

[#122782] Ruby Weekly News 29th Nov - 5th Dec 2004 — timsuth@... (Tim Sutherland)

http://www.rubygarden.org/ruby?RubyNews/2004-11-29

12 messages 2004/12/07

[#122798] Idiom for creating hash from two arrays — Jonathan Paisley <jp-www@...>

Hello all,

22 messages 2004/12/07

[#122875] Re: [rcr] String#split behaves odd — "Pe, Botp" <botp@...>

Ryan Davis [mailto:ryand-ruby@zenspider.com] wrote:

30 messages 2004/12/08
[#122886] Re: [rcr] String#split behaves odd — Yukihiro Matsumoto <matz@...> 2004/12/08

Hi,

[#122894] Re: [rcr] String#split behaves odd — "trans. (T. Onoma)" <transami@...> 2004/12/08

On Wednesday 08 December 2004 12:00 am, Yukihiro Matsumoto wrote:

[#122940] Re: [rcr] String#split behaves odd — Florian Frank <flori@...> 2004/12/08

On 2004-12-08 15:56:01 +0900, trans. (T. Onoma) wrote:

[#123046] Re: [rcr] String#split behaves odd — "trans. (T. Onoma)" <transami@...> 2004/12/09

On Wednesday 08 December 2004 10:00 am, Florian Frank wrote:

[#123068] Re: [rcr] String#split behaves odd — Glenn Parker <glenn.parker@...> 2004/12/09

trans. (T. Onoma) wrote:

[#123085] Re: [rcr] String#split behaves odd — "trans. (T. Onoma)" <transami@...> 2004/12/09

On Thursday 09 December 2004 08:19 am, Glenn Parker wrote:

[#123100] Re: String#split behaves odd — Ibraheem Umaru-Mohammed <iumarumohammed@...> 2004/12/09

++ trans. (T. Onoma) [ruby-talk] [10/12/04 00:43 +0900]:

[#123103] Re: String#split behaves odd — "trans. (T. Onoma)" <transami@...> 2004/12/09

On Thursday 09 December 2004 12:29 pm, Ibraheem Umaru-Mohammed wrote:

[#122918] RubyScript2Exe 0.2.0 — "Erik Veenstra" <pan@...>

28 messages 2004/12/08

[#123076] Crosswords (#10) — Ruby Quiz <james@...>

The summary for this week's quiz should be:

11 messages 2004/12/09

[#123137] Want to Write a Book? — Dave Thomas <dave@...>

Gentle Ruby folk:

40 messages 2004/12/10

[#123189] Learning Tic-Tac-Toe (#11) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

58 messages 2004/12/10
[#123196] Re: [QUIZ] Learning Tic-Tac-Toe (#11) — Brian =?ISO-8859-15?Q?Schr=F6der?= <ruby@...> 2004/12/10

On Fri, 10 Dec 2004 23:29:02 +0900

[#123198] Re: [QUIZ] Learning Tic-Tac-Toe (#11) — James Edward Gray II <james@...> 2004/12/10

On Dec 10, 2004, at 9:19 AM, Brian Schrer wrote:

[#123204] Re: [QUIZ] Learning Tic-Tac-Toe (#11) — Brian =?ISO-8859-15?Q?Schr=F6der?= <ruby@...> 2004/12/10

On Sat, 11 Dec 2004 00:42:04 +0900

[#123206] Re: [QUIZ] Learning Tic-Tac-Toe (#11) — James Edward Gray II <james@...> 2004/12/10

On Dec 10, 2004, at 10:11 AM, Brian Schrer wrote:

[#123218] Re: [QUIZ] Learning Tic-Tac-Toe (#11) — Brian =?ISO-8859-15?Q?Schr=F6der?= <ruby@...> 2004/12/10

On Sat, 11 Dec 2004 01:22:30 +0900

[#123313] Re: [QUIZ] Learning Tic-Tac-Toe (#11) — Hans Fugal <fugalh@...> 2004/12/11

It would be good to be able to play against eachother when this is all

[#123195] iconv replacement for windows? — Thomas Leitner <t_leitner@...>

Hi,

17 messages 2004/12/10
[#123205] Re: iconv replacement for windows? — Thomas Leitner <t_leitner@...> 2004/12/10

On Sat, 11 Dec 2004 00:45:11 +0900

[#123222] How to make a deep copy of an object (Searching for Idiom) — Brian =?ISO-8859-15?Q?Schr=F6der?= <ruby@...>

Hello Group,

18 messages 2004/12/10

[#123317] puts / print as method not keyword? — zuzu <sean.zuzu@...>

so, i'm thinking about language design with a particular interest in

23 messages 2004/12/11
[#123319] Re: puts / print as method not keyword? — Ilmari Heikkinen <kig@...> 2004/12/11

[#123321] Re: puts / print as method not keyword? — zuzu <sean.zuzu@...> 2004/12/11

On Sun, 12 Dec 2004 05:23:10 +0900, Ilmari Heikkinen <kig@misfiring.net> wrote:

[#123351] Find every location of "th" in string. — "William James" <w_a_x_man@...>

Find location of every "th" in "the thin man thinks".

14 messages 2004/12/12

[#123426] Any bug/issue trackers written in Ruby? — "J. D." <jd@...>

Hi,

12 messages 2004/12/12

[#123454] Abstracts and Interfaces in Ruby? — Miles Keaton <mileskeaton@...>

What's the recommended Ruby way to do abstract classes and abstract methods?

12 messages 2004/12/13

[#123590] wxRuby and other GUI toolkits — Nick <devel@...>

24 messages 2004/12/14
[#123616] Re: wxRuby and other GUI toolkits — "itsme213" <itsme213@...> 2004/12/14

Any chance you could provide a simplified interface along the lines

[#123614] Apache2, FastCGI and Rails on Windows — "Williams, Chris" <Chris.Williams@...>

I've been running around in circles trying to enable FastCGI on my rails

20 messages 2004/12/14
[#123630] Re: Apache2, FastCGI and Rails on Windows — Kent Sibilev <ksibilev@...> 2004/12/14

I'm running my rails application on the same environment and it works

[#123825] Re: Apache2, FastCGI and Rails on Windows — Sarah Tanembaum <sarahtanembaum@...> 2004/12/16

Kent Sibilev wrote:

[#123831] Re: Apache2, FastCGI and Rails on Windows — Kent Sibilev <ksibilev@...> 2004/12/16

Oh, This is quite easy. I assume you have Ruby and RubyForApache

[#123626] Ruby Wiki engine w/ability to upload files — Bil Kleb <Bil.Kleb@...>

Hello again,

12 messages 2004/12/14

[#123661] rand.rb 0.9: Random access methods for Enumerables — Ilmari Heikkinen <kig@...>

Hello all, here's a little convenience library we whipped up a couple

17 messages 2004/12/15

[#123694] Re: [BUG] unknown node type 0 - SERIOUS ENOUGH TO MIGRATE AWAY FROM RUBY? — Andrew Walrond <andrew@...>

This is a long standing bug in Ruby, and has been reported hundreds of times

16 messages 2004/12/15

[#123740] P2P application in 15 lines of Python posted on slashdot — slonik AZ <slonik.az@...>

Hi Everybody,

16 messages 2004/12/15

[#123815] Ruby Cocoa (OS X) questions: deployment & interface builder — Michael DeHaan <michael.dehaan@...>

Folks,

13 messages 2004/12/16

[#123852] Rails 0.9: Fast development, breakpoints, validations... — David Heinemeier Hansson <david@...>

Another huge upgrade with again close to 100 changes, additions, and

10 messages 2004/12/16

[#123898] Scrabble Stems (#12) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

22 messages 2004/12/17

[#123983] OT: vi useability question — Lothar Scholz <mailinglists@...>

Hello ruby-talk,

30 messages 2004/12/18
[#124013] Re: OT: vi useability question — Roeland Moors <roelandmoors@...> 2004/12/19

On Sun, Dec 19, 2004 at 08:07:28AM +0900, Lothar Scholz wrote:

[#124130] Re: OT: vi useability question — Hans Fugal <fugalh@...> 2004/12/20

Roeland Moors wrote:

[#124131] A RDoc template without frames — David Heinemeier Hansson <david@...>

Despite the snazzy look of the new default RDoc templates with three

21 messages 2004/12/20
[#124171] Re: A RDoc template without frames — "John W. Long" <ng@...> 2004/12/21

I did a design up once for something without frames:

[#124176] Re: A RDoc template without frames — why the lucky stiff <ruby-talk@...> 2004/12/21

John W. Long wrote:

[#124140] Is there any ruby compatible graphics/imaging utilities ... — Sarah Tanembaum <sarahtanembaum@...>

that works under native mswin323232 or at least with Cygwin X windows

16 messages 2004/12/20

[#124175] Text::Hyphen 1.0.0 — Austin Ziegler <halostatue@...>

I just told you that I'm releasing Text::Hyphen 1.0.0, and here it is

14 messages 2004/12/21

[#124182] curses - how to use unicode — Simon Strandgaard <neoneye@...>

Yesterday I got xterm working with UTF-8. I had made an oneliner that

13 messages 2004/12/21

[#124198] Re: OT: vi useability question — "Pe, Botp" <botp@...>

Mikael Brockman [mailto:mikael@phubuh.org] wrote:

28 messages 2004/12/21
[#124200] Re: OT: vi useability question — Dick Davies <rasputnik@...> 2004/12/21

* "Pe?a, Botp" <botp@delmonte-phil.com> [1210 11:10]:

[#124290] Re: OT: vi useability question — Fredrik Jagenheim <jagenheim@...> 2004/12/22

On Tue, 21 Dec 2004 20:16:14 +0900, Dick Davies

[#124329] All I want to do is move a directory :( — "trans. (T. Onoma)" <transami@...>

Very frustrated. I have just spent well over an hour trying to do the simplest

16 messages 2004/12/22
[#124339] Re: All I want to do is move a directory :( — Gennady Bystritksy <gfb@...> 2004/12/22

trans. (T. Onoma) wrote:

[#124343] Re: All I want to do is move a directory :( — "trans. (T. Onoma)" <transami@...> 2004/12/22

On Wednesday 22 December 2004 04:25 pm, Gennady Bystritksy wrote:

[#124344] Re: All I want to do is move a directory :( — "trans. (T. Onoma)" <transami@...> 2004/12/23

I think the problem may be that the :force option isn't working correctly on

[#124391] Merry Christmas — Christian Neukirchen <chneukirchen@...>

20 messages 2004/12/24
[#124397] Re: Merry Christmas — "trans. (T. Onoma)" <transami@...> 2004/12/24

:( I get

[#124400] Re: Merry Christmas — CT <demerzel@...> 2004/12/24

> On Friday 24 December 2004 08:21 am, Christian Neukirchen wrote:

[#124433] Re: Merry Christmas — Michael Neumann <mneumann@...> 2004/12/25

CT wrote:

[#124413] ruby 1.8.2 — Yukihiro Matsumoto <matz@...>

Merry Christmas,

25 messages 2004/12/25

[#124439] HTML and CSS validation — Bil Kleb <Bil.Kleb@...>

What's the best method to automate the validation

17 messages 2004/12/25

[#124502] Ri bug in new 1.8.2 release — jim@...

Hi

13 messages 2004/12/26

[#124562] split on '' (and another for split -1) — "trans. (T. Onoma)" <transami@...>

Here's a generic routine I'm working on:

11 messages 2004/12/27

[#124591] Ruby Philosophy — Darren Crotchett <rubylang@...>

I'm trying to get a feel for the philosophical differences between Smalltalk,

19 messages 2004/12/28

[#124596] Best ways to accelerate Ruby's popularity — Thursday <nospam@...>

I think Ruby's popularity is growing, but I can't help but wonder what

196 messages 2004/12/28
[#127081] Re: Best ways to accelerate Ruby's popularity — Ben Giddings <bg-rubytalk@...> 2005/01/19

Hi all, I got to this discussion really late, but I have some ideas.

[#127100] Re: Best ways to accelerate Ruby's popularity — Joel VanderWerf <vjoel@...> 2005/01/19

Ben Giddings wrote:

[#127162] Re: Best ways to accelerate Ruby's popularity — Ben Giddings <bg-rubytalk@...> 2005/01/19

Joel VanderWerf wrote:

[#127180] Re: Best ways to accelerate Ruby's popularity — Yukihiro Matsumoto <matz@...> 2005/01/19

Hi,

[#127191] Re: Best ways to accelerate Ruby's popularity — Ben Giddings <bg-rubytalk@...> 2005/01/19

Yukihiro Matsumoto wrote:

[#127207] Re: Best ways to accelerate Ruby's popularity — ruby talk <ruby.talk.list@...> 2005/01/19

On Thu, 20 Jan 2005 03:14:28 +0900, Ben Giddings

[#127228] Re: Best ways to accelerate Ruby's popularity — Ben Giddings <bg-rubytalk@...> 2005/01/19

ruby talk (AKA James Britt) wrote:

[#127232] Re: Best ways to accelerate Ruby's popularity — why the lucky stiff <ruby-talk@...> 2005/01/19

Ben Giddings (bg-rubytalk@infofiend.com) wrote:

[#127255] Re: Best ways to accelerate Ruby's popularity — gabriele renzi <rff_rff@...> 2005/01/19

why the lucky stiff ha scritto:

[#127315] Re: Best ways to accelerate Ruby's popularity — "zimba.tm@..." <zimba.tm@...> 2005/01/20

I think it's cool to have community-driven websites,

[#127353] Re: Best ways to accelerate Ruby's popularity — Ben Giddings <bg-rubytalk@...> 2005/01/20

zimba.tm@gmail.com wrote:

[#127360] Re: Best ways to accelerate Ruby's popularity — "David A. Black" <dblack@...> 2005/01/20

HI --

[#127369] Re: Best ways to accelerate Ruby's popularity — Ben Giddings <bg-rubytalk@...> 2005/01/20

David A. Black wrote:

[#127674] Re: Best ways to accelerate Ruby's popularity — "David A. Black" <dblack@...> 2005/01/22

Hi --

[#127984] Re: Best ways to accelerate Ruby's popularity — Ben Giddings <bg-rubytalk@...> 2005/01/25

David A. Black wrote:

[#128748] Re: Best ways to accelerate Ruby's popularity — Ian Hobson <Ian.Hobson@...> 2005/01/28

In message <41F58CEF.70807@infofiend.com>, Ben Giddings

[#127424] Re: Best ways to accelerate Ruby's popularity — James Britt <jamesUNDERBARb@...> 2005/01/20

David A. Black wrote:

[#127431] Re: Best ways to accelerate Ruby's popularity — "Curt Hibbs" <curt@...> 2005/01/20

James Britt wrote:

[#127435] Re: Best ways to accelerate Ruby's popularity — James Britt <jamesUNDERBARb@...> 2005/01/21

Curt Hibbs wrote:

[#124652] Re: Best ways to accelerate Ruby's popularity — gabriele renzi <rff_rff@...> 2004/12/28

Thursday ha scritto:

[#124672] Re: Best ways to accelerate Ruby's popularity — Tom Copeland <tom@...> 2004/12/28

On Tue, 2004-12-28 at 11:36, gabriele renzi wrote:

[#124674] Re: Best ways to accelerate Ruby's popularity — Premshree Pillai <premshree.pillai@...> 2004/12/28

On Wed, 29 Dec 2004 05:54:01 +0900, Tom Copeland <tom@infoether.com> wrote:

[#124675] Re: Best ways to accelerate Ruby's popularity — Tom Copeland <tom@...> 2004/12/28

On Tue, 2004-12-28 at 16:00, Premshree Pillai wrote:

[#125257] Re: Best ways to accelerate Ruby's popularity — timsuth@... (Tim Sutherland) 2005/01/06

In article <41D44401.4060104@mktec.com>, Zach Dennis wrote:

[#124607] help on making ruby code faster — David Garamond <lists@...6.isreserved.com>

I use 128bit GUID values a lot, and on my Guid class there's the

17 messages 2004/12/28

[#124612] verifying a network connection — Thomas Metz <metz@...>

Hi,

13 messages 2004/12/28

[#124746] #send and private methods — Brian Palmer <brian@...>

I apologize if this has been discussed before and I missed it...

12 messages 2004/12/29

[#124805] Inheritance of class variables — "Eustaquio Rangel de Oliveira Jr." <eustaquiorangel@...>

Hello there.

18 messages 2004/12/30

[#124899] Ruby and Smalltalk like environment?

Hi there,

14 messages 2004/12/31

Re: Namespaces, inverted

From: Joel VanderWerf <vjoel@...>
Date: 2004-12-28 04:50:04 UTC
List: ruby-talk #124579
eero.saynatkari@kolumbus.fi wrote:
> Apologies if this topic has already been beaten to death.
> Oh, and for the long-windedness.
> 
> Using modules for namespaces is somewhat unwieldy. I'd call it one 
> of the few evil parts of Ruby, although its implementation is
> understandable when viewed from an OO standpoint. It's just
> tiresome to A) invent and B) use unique namespaces in Ruby (and
> by 'unique' I mean FooSoft Inc. wrapping all their libraries inside a
> module FooSoft).
> 
> Of the current commercial languages, the package system of Java is
> likely to be the best for flexibility and uniqueness, although it
> does suffer from verbosity--and I wouldn't mind seeing Haskell-style
> limited export capabilities, either. This, of course, should be
> possible to do in Ruby 'on top' of the current system. 
> 
> But why use unique namespaces? Modules are certainly useful for 
> partitioning a project into its constituent parts, but unique 
> namespaces are only useful in the context of that code being used
> by another party where it can prevent namespace clashes. This, of 
> course, is highly site-dependent: it may not be necessary at all, 
> they may already have a package with the same 'unique' namespace,
> they may not like the module name, etc. etc.
> 
> Why not have the 'client' decide if and which namespace to assign
> to a foreign library? As in, if I want to use FooBar Inc.'s Math
> package, they need not wrap it in module FooBar, but can just ship
> it as Math. Then I just wrap it to Extern, my namespace for all
> third-party modules. In current Ruby, I suppose this can be achieved
> with something like (please correct if I'm wrong, this is off the top 
> of my head):
> -----
> 
> # Toplevel
> # This is just an aesthetically pleasing (?) implementation,
> # I'm not sure about using String for the ascribed purpose.
> 
> def import file
>  file[:module].module_eval(IO.readlines(file[:name]).join)
> end
> 
> class String
>  def as module
>   {:name => self, :module => module}
>  end
> 
>  # Convenience
>  alias :in   :as
>  alias :into :as
> end
> 
> # Usage
> import "foomath.rb".as Extern
> 
> rand = Extern::Math.random()
> 
> -----
> Or is that just counterintuitive? It would at least conceptually
> free the module construct from doing double duty as the namespace
> construct.
> 
> The Ruby implementation is obviously somewhat slow but it could be 
> written to use the same routines as require()/load() with the 
> exception of doing the loading in the context of a given module. I 
> think the above 'implementation' also handles altogether non-moduled 
> files but I may be wrong in my it's-Sunday-morning-and-I'm-at-work 
> stupor.

I like the idea very much, but there are some difficulties...


def import file
  file[:module].module_eval(IO.readlines(file[:name]).join)
end

class String
  def as mod
   {:name => self, :module => mod}
  end
end

module Extern; end
# It's a little awkward, but you gotta do this first, if
# you want to refer to the module as below.

libfile = "/usr/local/lib/ruby/1.8/complex.rb"
# One problem is the cumbersome path name to the library file.

import libfile.as(Extern)
# This fails because the library complex.rb tries to open an existing
# class, Numeric, and modify its contents. But instead it opens a new
# module, also called Numeric, that lives inside the wrapper. You can
# fix this in complex.rb (assuming you want to touch 3rd party code)
# by referring to the module as ::Numeric when you define it. But
# there's still a problem...

z = Extern::Complex(1,2)
# "undefined method `Complex' for Extern::Complex"
# This is due to the special effect of "def foo" at the top level in
# ruby--it defines an instance method of Object. But the effect within
# the wrapper module is very different. Again it's possible to modify
# the 3rd party code, as follows:
#
#  class ::Object
#    def Complex(a, b = 0)
#      # ...
#    end
#  end

In This Thread