[#77662] A bundle of newbie queries — Gawnsoft <xlucid@...>

I've finally overcome my newbie embarrassment enough to post about

14 messages 2003/08/01

[#77707] Re: is rubyforge down ? — "Tom Copeland" <tom@...>

> On Fri, 01 Aug 2003 13:53:05 +0200, Simon Strandgaard wrote:

16 messages 2003/08/01

[#77794] 1.8.0-previewX rb_sys_fail() on socket instead of an Exception. — Kero van Gelder <kero@...>

Hi all,

14 messages 2003/08/02

[#77806] Indentation Style — Nikolai Weibull <lone-star@...>

I've been meaning to ask this for quite some time. Why is and

28 messages 2003/08/02
[#77817] Re: Indentation Style — Thomas Hurst <tom.hurst@...> 2003/08/02

* Nikolai Weibull (lone-star@home.se) wrote:

[#77838] Re: Indentation Style — Seth Kurtzberg <seth@...> 2003/08/02

On Sat, 2 Aug 2003 23:02:08 +0900

[#77840] Re: Indentation Style — Ben Giddings <ben@...> 2003/08/02

On Sat August 2 2003 1:01 pm, Seth Kurtzberg wrote:

[#77888] Lafcadio: An object-relational mapping layer for Ruby — sera@... (Francis Hwang)

Hi everybody,

13 messages 2003/08/03

[#77896] Too bad I've found about Ruby — "wit" <wit7777bezspamu@...>

Hi.

21 messages 2003/08/03

[#77928] Take a Fantasy Cruise with Me! — "Katrina" <katrina@...>

Hi again,

14 messages 2003/08/04

[#77946] ruby 1.8.0 — matz@... (Yukihiro Matsumoto)

Hello,

32 messages 2003/08/04

[#77992] clearing a parameter in Ruby? — Roy Patrick Tan <rtan@...>

Hi,

15 messages 2003/08/04

[#78023] Parrot SMOP benchmark — Harry Ohlsen <harryo@...>

I was just reading Dan Sugalski's slides from RubyConf 2002 and noticed the benchmarks relating to something called "SMOP" at the end of the article.

12 messages 2003/08/04

[#78032] What's New and Shiny in Ruby 1.8.0? — why the lucky stiff <ruby-talk@...>

Since there were a number of requests around for a more detailed

29 messages 2003/08/05
[#78122] Re: What's New and Shiny in Ruby 1.8.0? — Harry Ohlsen <harryo@...> 2003/08/06

why the lucky stiff wrote:

[#78054] Log4r and Ruby 1.8.0 in Singleton problems — David Heinemeier Hansson <david@...>

Somethings rotten...

21 messages 2003/08/05
[#78055] Re: Log4r and Ruby 1.8.0 in Singleton problems — ts <decoux@...> 2003/08/05

>>>>> "D" == David Heinemeier Hansson <david@loudthinking.com> writes:

[#78057] Re: Log4r and Ruby 1.8.0 in Singleton problems — David Heinemeier Hansson <david@...> 2003/08/05

> D> irb(main):001:0> require 'Singleton'

[#78058] Re: Log4r and Ruby 1.8.0 in Singleton problems — ts <decoux@...> 2003/08/05

>>>>> "D" == David Heinemeier Hansson <david@loudthinking.com> writes:

[#78080] Re: Log4r and Ruby 1.8.0 in Singleton problems — Dave Thomas <dave@...> 2003/08/05

ts wrote:

[#78089] format number with comma separators? — Chris Morris <chrismo@...>

I'm brain dead and just trying to get formatted numbers in a task that's

13 messages 2003/08/05

[#78151] Why does Ruby have callcc? — Jim Bob <invalid@...>

I understand, in a woozy sort of way, what callcc does. What I

46 messages 2003/08/06
[#78158] Re: Why does Ruby have callcc? — Harry Ohlsen <harryo@...> 2003/08/06

Jim Bob wrote:

[#78247] Re: Why does Ruby have callcc? — Ben Giddings <ben@...> 2003/08/06

I have been interested in these continuation-thingys for a while now, so now

[#78165] newbie question from a smalltalker — "Adriano Volpones" <adriano.volpones@...>

Dear all,

38 messages 2003/08/06
[#78166] Re: newbie question from a smalltalker — Lyle Johnson <lyle@...> 2003/08/06

Adriano Volpones wrote:

[#78173] Re: newbie question from a smalltalker — Gavin Sinclair <gsinclair@...> 2003/08/06

On Wednesday, August 6, 2003, 11:22:21 PM, Lyle wrote:

[#78251] More on DRB & OpenSSL — "Nathaniel Talbott" <nathaniel@...>

OK, I've tracked down my problem with DRb and OpenSSL a bit more; perhaps

26 messages 2003/08/06
[#78253] Re: More on DRB & OpenSSL — Michael Garriss <mgarriss@...> 2003/08/06

Nathaniel Talbott wrote:

[#78256] Re: More on DRB & OpenSSL — Aredridel <aredridel@...> 2003/08/06

> I've noticed that there is always a strange silence on DRb questions. I=20

[#78265] Re: More on DRB & OpenSSL — Hugh Sasse Staff Elec Eng <hgs@...> 2003/08/06

On Thu, 7 Aug 2003, Aredridel wrote:

[#78270] Re: More on DRB & OpenSSL — "Nathaniel Talbott" <nathaniel@...> 2003/08/06

Hugh Sasse Staff Elec Eng [mailto:hgs@dmu.ac.uk] wrote:

[#78309] Re: More on DRB & OpenSSL — Hugh Sasse Staff Elec Eng <hgs@...> 2003/08/07

On Thu, 7 Aug 2003, Nathaniel Talbott wrote:

[#78274] Re: Why does Ruby have callcc? — Dan Doel <djd15@...>

As for why callcc takes a block (I didn't see this in any of the replies

19 messages 2003/08/07
[#78291] Re: Why does Ruby have callcc? — Ben Giddings <ben@...> 2003/08/07

On Wednesday, August 6, 2003, at 08:32 PM, Dan Doel wrote:

[#78299] Re: Why does Ruby have callcc? — Jim Weirich <jweirich@...> 2003/08/07

On Thu, 2003-08-07 at 00:42, Ben Giddings wrote:

[#78427] Re: Why does Ruby have callcc? — Ben Giddings <ben@...> 2003/08/08

On Thu August 7 2003 3:03 am, Jim Weirich wrote:

[#78282] Re: [Devculture] ruby question - try Python also (fwd) — Pat Eyler <pate@...>

hmmm, this doesn't mesh terribly well with my experience. Anyone else car

13 messages 2003/08/07

[#78328] Elegant solution for a loop-break problem — KONTRA Gergely <kgergely@...>

Hi!

27 messages 2003/08/07

[#78419] Distributing Ruby applications — Daniel Carrera <dcarrera@...>

Hello Rubyists,

19 messages 2003/08/08

[#78487] Re: Ducktype, right? — "Mills Thomas (app1tam)" <app1tam@...>

> -----Original Message-----

20 messages 2003/08/08
[#78502] Re: Ducktype, right? — Dave Thomas <dave@...> 2003/08/08

Mills Thomas (app1tam) wrote:

[#78505] Re: Ducktype, right? — Ben Giddings <ben@...> 2003/08/08

On Fri August 8 2003 1:25 pm, Dave Thomas wrote:

[#78511] Re: Ducktype, right? — Chris Morris <chrismo@...> 2003/08/08

Ben Giddings wrote:

[#78569] Ruby and OOP-design (question of an old "procedural person" ;) — Meino Christian Cramer <mccramer@...>

Hi !

48 messages 2003/08/09
[#78620] Re: Ruby and OOP-design (question of an old "procedural person" ;) — Martin DeMello <martindemello@...> 2003/08/10

Kent Dahl <kentda+news@stud.ntnu.no> wrote:

[#78622] Re: Ruby and OOP-design (question of an old "procedural person" ;) — Dan Doel <djd15@...> 2003/08/10

[#78629] Re: Ruby and OOP-design (question of an old "procedural person" ;) — dblack@... 2003/08/10

Hi --

[#78634] Re: Ruby and OOP-design (question of an old "procedural person" ;) — Dan Doel <djd15@...> 2003/08/10

dblack@superlink.net wrote:

[#78664] rbbr-0.3.1 — Masao Mutoh <mutoh@...>

Hi,

38 messages 2003/08/11
[#78670] Re: [ANN] rbbr-0.3.1 — Brian Candler <B.Candler@...> 2003/08/11

On Mon, Aug 11, 2003 at 10:10:41PM +0900, Masao Mutoh wrote:

[#78672] Re: [ANN] rbbr-0.3.1 — Masao Mutoh <mutoh@...> 2003/08/11

Hi,

[#78674] Re: [ANN] rbbr-0.3.1 — Brian Candler <B.Candler@...> 2003/08/11

On Mon, Aug 11, 2003 at 10:50:56PM +0900, Masao Mutoh wrote:

[#78682] How to build a distributable Solaris binary for Ruby 1.8? — google-venkatp@... (Venkat)

Hello all:

12 messages 2003/08/11

[#78736] Ruby vs Python? — Daniel Carrera <dcarrera@...>

Hi all,

15 messages 2003/08/11

[#78755] NaN and Inifinity — Scott Thompson <easco@...>

If I do something like

22 messages 2003/08/12

[#78810] UTF-8 question — Nikolai Weibull <lone-star@...>

I've finally switched to UTF-8. It's awesome. Now, if I can only find

24 messages 2003/08/12
[#78823] Re: UTF-8 question — matz@... (Yukihiro Matsumoto) 2003/08/12

Hi,

[#78834] Re: UTF-8 question — Nikolai Weibull <lone-star@...> 2003/08/12

* Yukihiro Matsumoto <matz@ruby-lang.org> [Aug, 12 2003 18:10]:

[#78867] Re: UTF-8 question — nobu.nokada@... 2003/08/12

Hi,

[#78813] Nested class/module namespace — "Nathaniel Talbott" <nathaniel@...>

The new ability to declare a class nested in another module (or class)

36 messages 2003/08/12
[#78831] Re: Nested class/module namespace — Kent Dahl <kentda+news@...> 2003/08/12

Nathaniel Talbott wrote:

[#78862] Re: Nested class/module namespace — "Nathaniel Talbott" <nathaniel@...> 2003/08/12

Kent Dahl [mailto:kentda+news@stud.ntnu.no] wrote:

[#78843] Re: Nested class/module namespace — matz@... (Yukihiro Matsumoto) 2003/08/12

Hi,

[#78815] Windows Installer for Ruby 1.8.0 Final — Andrew Hunt <andy@...>

Thanks for your patience

21 messages 2003/08/12

[#78836] AW: [ann] AEditor 0.10, folding added — "Recheis Meinrad" <Meinrad.Recheis@...>

29 messages 2003/08/12
[#78858] Re: AW: [ann] AEditor 0.10, folding added — "Simon Strandgaard" <0bz63fz3m1qt3001@...> 2003/08/12

On Wed, 13 Aug 2003 02:56:48 +0900, Recheis Meinrad wrote:

[#78980] Re: AW: [ann] AEditor 0.10, folding added — Lothar Scholz <mailinglists@...> 2003/08/13

Hello Simon,

[#79002] Refactoring Browsers (was: [ann] AEditor 0.10, folding added) — Jim Weirich <jweirich@...> 2003/08/13

On Wed, 2003-08-13 at 14:03, Lothar Scholz wrote:

[#79009] Re: Refactoring Browsers (was: [ann] AEditor 0.10, folding added) — Richard Kilmer <rich@...> 2003/08/14

A difference between smalltalk and ruby...smalltalk is image based

[#79044] Re: Refactoring Browsers (was: [ann] AEditor 0.10, folding added) — "Its Me" <itsme213@...> 2003/08/14

[#79046] Re: Refactoring Browsers (was: [ann] AEditor 0.10, folding added) — Richard Kilmer <rich@...> 2003/08/14

[#78905] ruby curses documentation ? — MENON Jean-Francois <jean-francois.menon@...>

hello,

12 messages 2003/08/13

[#78961] Java/Ruby communication — Nigel Gilbert <n.gilbert@...>

I am planning to write a Java program and and a Ruby program and have

16 messages 2003/08/13

[#79001] Overloading () — Dan Doel <djd15@...>

Hi,

20 messages 2003/08/13

[#79060] Ruby & Windows-world; IDEs — Armin Roehrl <armin@...>

Hi all,

32 messages 2003/08/14

[#79142] list of Ruby capable text editors? — Martin Pirker <crf@...>

Hi...

25 messages 2003/08/15

[#79192] Newbie Q: Data encapsulation with Ruby — Meino Christian Cramer <mccramer@...>

Hi,

23 messages 2003/08/16
[#79195] Re: Newbie Q: Data encapsulation with Ruby — dblack@... 2003/08/16

Hi --

[#79250] Rite/Ruby2.0 & Ruby vs OCaml — <prosys@...>

Hi All,

53 messages 2003/08/17
[#80116] Re: Rite/Ruby2.0 & Ruby vs OCaml — "Jason Watkins" <jason_watkins@...> 2003/08/25

OCaml is a fine language, but it certainly is not as fun as ruby... unless

[#80142] Re: Rite/Ruby2.0 & Ruby vs OCaml — Brian Candler <B.Candler@...> 2003/08/25

On Mon, Aug 25, 2003 at 02:23:56PM +0900, Jason Watkins wrote:

[#80148] Re: Rite/Ruby2.0 & Ruby vs OCaml — mark <msparshatt@...> 2003/08/25

On Monday 25 Aug 2003 4:10 pm, Brian Candler wrote:

[#79280] Wish: Python-style indenting — Jon_Aquino@... (Jonathan Aquino)

I wish Ruby had Python's use of whitespace to indicate blocks. Then I

17 messages 2003/08/17

[#79283] Bug when rerouting String#gsub with a block using $1? — Florian Gross <flgr@...>

Moin!

11 messages 2003/08/17

[#79292] Ruby for 3D graphics? — "Brandon J. Van Every" <vanevery@3DProgrammer.com>

Ok, I'm sick to death of C++. I'm moving on to a higher level language of

14 messages 2003/08/18

[#79319] Question: immutable strings as design goal? — Gavin Sinclair <gsinclair@...>

-talkers,

15 messages 2003/08/18

[#79337] Re: Question: immutable strings as design goal? — Robert Feldt <feldt@...>

33 messages 2003/08/18
[#79362] Re: Question: immutable strings as design goal? — hanzspam@... (Hannu Kankaanp粐) 2003/08/18

Robert Feldt <feldt@ce.chalmers.se> wrote in message news:<oprt3sncb0oglyup@mail1.telia.com>...

[#79397] Re: Question: immutable strings as design goal? — Gavin Sinclair <gsinclair@...> 2003/08/18

On Tuesday, August 19, 2003, 3:21:32 AM, Hannu wrote:

[#79412] Why did you switch from Python to Ruby? — "Brandon J. Van Every" <vanevery@3DProgrammer.com>

This question is only meant to apply to people who used to use Python, but

174 messages 2003/08/19
[#79492] Why would you abandon Ruby? (was) — "Brandon J. Van Every" <vanevery@3DProgrammer.com> 2003/08/19

Sean O'Dell wrote:

[#79504] Re: Why would you abandon Ruby? (was) — Michael Granger <ged@...> 2003/08/20

On Tuesday, August 19, 2003, at 04:05 PM, Brandon J. Van Every wrote:

[#79517] Re: Why would you abandon Ruby? (was) — "Brandon J. Van Every" <vanevery@3DProgrammer.com> 2003/08/20

Sean O'Dell wrote:

[#79522] Re: Why would you abandon Ruby? (was) — Mark Wilson <mwilson13@...> 2003/08/20

[#79414] $VERBOSE=true returns warnings from standard library — thomass@... (Thomas)

I normally write my ruby code with $VERBOSE=true. When I do this in

11 messages 2003/08/19

[#79433] Re: What's TOTALLY COMPELLING about Ruby over Python? — phlip_cpp@... (Phlip)

> I don't know either. I do know of several posters on the XP

18 messages 2003/08/19
[#79435] Re: What's TOTALLY COMPELLING about Ruby over Python? — "Michael Campbell" <michael_s_campbell@...> 2003/08/19

> If you were to instrument my physical responses and typing rate while

[#79461] Re: What's TOTALLY COMPELLING about Ruby over Python? — "Dave Benjamin" <dave@3dex.com> 2003/08/19

"Michael Campbell" <michael_s_campbell@yahoo.com> wrote in message

[#79462] Re: What's TOTALLY COMPELLING about Ruby over Python? — dblack@... 2003/08/19

Hi --

[#79470] Re: What's TOTALLY COMPELLING about Ruby over Python? — dblack@... 2003/08/19

Hi --

[#79533] What attracts me to Ruby — Ged Byrne <gedb01@...>

As a newbie moving over from Python, the recent posts

24 messages 2003/08/20

[#79655] Punctuation as noise — "Hal E. Fulton" <hal9000@...>

I've been thinking for a day or so about

21 messages 2003/08/20

[#79673] Trollassassin — "Kurt M. Dresner" <kdresner@...>

So, I had this idea, but I couldn't think of anywhere better to post it.

13 messages 2003/08/20

[#79754] Class variables - a surprising result — Jason Williams <jason@...>

class Sup

14 messages 2003/08/21

[#79788] Re: Class variables - a surprising result — "Bennett, Patrick" <Patrick.Bennett@...>

Obviously there's some confusion though Matz.

19 messages 2003/08/21
[#79815] Re: Class variables - a surprising result — matz@... (Yukihiro Matsumoto) 2003/08/21

Hi,

[#79822] Re: Class variables - a surprising result — "Mark J. Reed" <markjreed@...> 2003/08/21

On Fri, Aug 22, 2003 at 03:47:33AM +0900, Yukihiro Matsumoto wrote:

[#79794] Integrated Webserver? — Martin DeMello <martindemello@...>

The HTML form thread made me wonder if we shouldn't have some equivalent

13 messages 2003/08/21

[#79818] Re: How do I handle an HTML form from ruby? — "Mills Thomas (app1tam)" <app1tam@...>

Having Ruby start a browser with the correct form.html file is easy enough.

20 messages 2003/08/21
[#80198] Re: Any sample code where ruby is used in the Eclipse devepment environment? — Ludwigi Beethoven <aix_tech@...> 2003/08/26

Thank you Nathaniel.

[#80269] Re: Any sample code where ruby is used in the Eclipse devepment environment? — gabriele renzi <surrender_it@...1.vip.ukl.yahoo.com> 2003/08/26

il Tue, 26 Aug 2003 22:01:51 +0900, David Corbin

[#80369] Re: Any sample code where ruby is used in the Eclipse devepment environment? — Mauricio Fern疣dez <batsman.geo@...> 2003/08/27

On Wed, Aug 27, 2003 at 04:28:31AM +0900, gabriele renzi wrote:

[#80578] Re: Any sample code where ruby is used in the Eclipse devepment environment? — Ludwigi Beethoven <aix_tech@...> 2003/08/29

I am not sure what the AIX comment is all about, but

[#80586] Re: Any sample code where ruby is used in the Eclipse devepment environment? — Michael Campbell <michael_s_campbell@...> 2003/08/29

--- Ludwigi Beethoven <aix_tech@yahoo.com> wrote:

[#79819] Re: Class variables - a surprising result — "Bennett, Patrick" <Patrick.Bennett@...>

My point was that many programmar's mistake Ruby's 'class' variables as

26 messages 2003/08/21
[#79887] Re: Class variables - a surprising result — matz@... (Yukihiro Matsumoto) 2003/08/22

Hi,

[#79888] Re: Class variables - a surprising result — "Gavin Sinclair" <gsinclair@...> 2003/08/22

> Hi,

[#79890] Re: Class variables - a surprising result — Ryan Pavlik <rpav@...> 2003/08/22

On Fri, 22 Aug 2003 12:32:12 +0900

[#79894] Re: Class variables - a surprising result — Patrick Bennett <patrick.bennett@...> 2003/08/22

Ryan Pavlik wrote:

[#79898] Re: Class variables - a surprising result — Dan Doel <djd15@...> 2003/08/22

Patrick Bennett wrote:

[#79901] Re: Class variables - a surprising result — Patrick Bennett <patrick.bennett@...> 2003/08/22

Dan Doel wrote:

[#79833] Wrapping ENV — "Hal E. Fulton" <hal9000@...>

I just wrote a little piece of code. Is it useful to anyone but

15 messages 2003/08/21

[#79849] POLS and names of mathematical functions — "Josef 'Jupp' Schugt" <jupp@...>

Saluton!

17 messages 2003/08/21

[#79981] Aspect oriented Everything? — letterbox1001@... (New_aspect)

Hello,

37 messages 2003/08/22

[#80038] Ruby & Perl — David Corbin <dcorbin@...>

Has anyone considered some way to make Perl modules callable from Ruby?

20 messages 2003/08/23

[#80135] Specification of Ruby regex? — Ronald Pijnacker <rhp@...>

Hi all,

32 messages 2003/08/25
[#80211] Re: Specification of Ruby regex? — "Tim Hunter" <cyclists@...> 2003/08/26

On Tue, 26 Aug 2003 16:15:38 +0900, Ronald Pijnacker wrote:

[#80212] Re: Specification of Ruby regex? — Emmanuel Touzery <emmanuel.touzery@...> 2003/08/26

Hello!

[#80157] Ruby launching system apps? — "Dan" <falseflyboy@...>

I have a UNIX machine and I want a ruby app that can launch UNIX commands

15 messages 2003/08/25

[#80217] Another Ruby-powered site — Thomas Hurst <tom.hurst@...>

http://qurl.net/ -- a couple of hours with Ruby and FastCGI.

21 messages 2003/08/26
[#80276] Re: Another Ruby-powered site — gabriele renzi <surrender_it@...1.vip.ukl.yahoo.com> 2003/08/26

il Tue, 26 Aug 2003 21:58:21 +0900, Thomas Hurst <tom.hurst@clara.net>

[#80278] Re: Another Ruby-powered site — Michael Campbell <michael_s_campbell@...> 2003/08/26

--- gabriele renzi <surrender_it@rc1.vip.ukl.yahoo.com> wrote:

[#80316] errors compiling Ruby under Solaris — "Kurt M. Dresner" <kdresner@...>

I'm trying to compile Ruby under Solaris. I suck at C, so I don't know

24 messages 2003/08/27
[#80320] Re: errors compiling Ruby under Solaris — nobu.nokada@... 2003/08/27

Hi,

[#80322] Re: errors compiling Ruby under Solaris — nobu.nokada@... 2003/08/27

Hi,

[#80327] Re: errors compiling Ruby under Solaris — "Kurt M. Dresner" <kdresner@...> 2003/08/27

I am using 3.0.3.

[#80331] Re: errors compiling Ruby under Solaris — nobu.nokada@... 2003/08/27

Hi,

[#80345] Re: errors compiling Ruby under Solaris — "Kurt M. Dresner" <kdresner@...> 2003/08/27

> Instead, send ext/socket/mkmf.log.

[#80663] Re: errors compiling Ruby under Solaris — nobu.nokada@... 2003/08/31

Hi,

[#80668] Re: errors compiling Ruby under Solaris — "Kurt M. Dresner" <kdresner@...> 2003/08/31

> What headers do you need to compile sys/socket.h?

[#80670] Re: errors compiling Ruby under Solaris — nobu.nokada@... 2003/08/31

Hi,

[#80672] Re: errors compiling Ruby under Solaris — "Kurt M. Dresner" <kdresner@...> 2003/08/31

It turns out that the thing I sent before was from a Solaris 9 machine,

[#80354] Mac OS X and ruby-postgres again — Thomas Yager-Madden <tym@...>

Hello,

14 messages 2003/08/27
[#80359] Re: Mac OS X and ruby-postgres again — Brian McCallister <mccallister@...> 2003/08/27

How did you install postgresql? I had to specify the location of the

[#80399] os x / mysql : install 1.8 : ruby = nil — paul@... (paul vudmaska)

I'm trying to install ruby/eruby and mysql to learn ruby for web stuff

10 messages 2003/08/27

[#80457] #collect with block modifying receiver — Hal Fulton <hal9000@...>

Hello, all...

13 messages 2003/08/28

[#80497] Python vs. Ruby — Fred <fred@...>

Can anyone give me a good reason why I would want to use Ruby over Python?

53 messages 2003/08/28
[#80507] Re: Python vs. Ruby — dagbrown@... (Dave Brown) 2003/08/28

In article <cxu3b.289101$uu5.63844@sccrnsc04>,

[#80519] Re: Python vs. Ruby — Scott Thompson <easco@...> 2003/08/29

> : Can anyone give me a good reason why I would want to use Ruby over

[#80573] Re: Python vs. Ruby — "W. Kent Starr" <wyzzrd@...> 2003/08/29

Careful, boys,

[#80751] Re: Python vs. Ruby — hanzspam@... (Hannu Kankaanp粐) 2003/09/01

"jbritt@ruby-doc.org" <jbritt@ruby-doc.org> wrote in message news:<3F519252.3090408@ruby-doc.org>...

[#80774] Re: Python vs. Ruby — mark <msparshatt@...> 2003/09/01

On Monday 01 Sep 2003 9:47 am, Hannu Kankaanp粐 wrote:

[#80788] Re: Python vs. Ruby 2003/09/01

mark wrote:

[#80884] Re: Python vs. Ruby — james_b <james_b@...> 2003/09/02

Sean O'Dell wrote:

[#80896] Re: Python vs. Ruby 2003/09/02

james_b wrote:

[#80542] multiply all array with array — ibotty <me@...>

before i spent to many words describing something so simple:

16 messages 2003/08/29

[#80715] `echo %!(*` — Tom Felker <tcfelker@...>

Hello all,

15 messages 2003/08/31

Re: Nested class/module namespace

From: Kent Dahl <kentda+news@...>
Date: 2003-08-13 17:47:34 UTC
List: ruby-talk #78976
Nathaniel Talbott wrote:
> But that common ancestral namespace isn't arbitrary (and it certainly isn't
> just to save me typing): it's a logical separation of my code in to related
> parts. If, when I'm doing that separation, I deem that two classes should go
> in to the same module, it follows that those two pieces of code are closely
> related enough to (a) not worry about namespace clashes, and (b) to need to
> easily access one another's namespace. 

Fair enough, but what about all the constants of all the preceeding 
namespaces you opened? The rationale for polluting your namespace with 
these, is what I find arbitrary. A naive example:

module Text
   class Parser;end
   module SGML
     class Parser;end
     module HTML
       class Parser; end
     end
     module XML
       class Parzer; end # typo
       def self.parse_xml
         Parser.new # uh oh, this turns into an Text::SGML::Parser
       end
     end
   end
end

Now this typo is easily resolved, once you notice that the program 
doesn't do what you thought it did. (_If_ you notice it.) But why should 
one open the entire namespace of Text if you're just working on, say, 
the XML module? Do you really want to deal with all the (potential junk) 
that your co-workers fling into the Text namespace?

module Text::SGML::XML
   class Parzer; end # typo
   def self.parse_xml
     Parser.new # uh oh
   end
end

This will blow up with a nice NameError, in accordance with the "fail 
early" principle for catching bugs. So far so good.

> I'll admit that I still don't understand what benefit this new behavior
> adds, even if I _were_ to separate out my constants in to their own
> namespaces and include them. I see doing that as perhaps making this new
> behavior bearable, but I don't see any benefit in this new behavior when
> working like that.

Confession time: I probably wouldn't do that either. I'm too lazy. 
However, there is a middle ground. Back to the parser example.

Lets say you want to inherit the HTML and XML parser from the SGML 
parser, since entity resolving and a few other things are quite similar.

Now this won't work:

class Text::SGML::XML::Parser < Parser
end

But this will:

module Text::SGML
   class XML::Parser < Parser
   end
end

This might seem like a step backwards, as we have more than one body. 
However, notice that I "cut off" the namespace at Text::SGML, telling 
the reader that I am in need of it, and go on to implement all the 
methods of the XML parser that depends on the SGML stuff. I also avoid 
including the XML namespace, just in case there is something icky there.

In the next step, I'll implement some basic methods inside the parser 
that doesn't depend on SGML nor XML:

class Text::SGML::XML::Parser
   def boring_bookkeeping
   end
end

Here I cut of the namespaces completely, telling the reader:
"Just working on the parser innards, nothing to see here, move along!"

Then there will be methods that need other parts of the XML namespace, 
and I'll do something like:

module Text::SGML::XML
   class Parser
     def pure_xml_stuff
     end
   end
end

Now I seem to have been opening the Parser class umpteen times and for 
what? For separation of concerns. This could also have been done with 
mixins, I seem to recall this having been both discussed and advocated 
here earlier:

module Text
   module SGML
     module XML
       module SGMLSpecificStuffForXMLParser
       end
       module XMLSpecificStuffForXMLParser
         def pure_xml_stuff
         end
       end
       module UnspecificStuffForXMLParser
         def boring_bookkeeping
         end
       end
       class Parser
         include SGMLSpecificStuffForXMLParser
         include XMLSpecificStuffForXMLParser
         include UnspecificStuffForXMLParser
       end
     end
   end
end

But, AFAIK, you cannot do the namespace part of the separation of 
concerns with this approach. If the restrictions of the new M::C style 
is intended, the possibility to do this separation is one of the 
features it brings.


> Call it personal bias, but whenever an argument is made that a problem will
> only show up with a huge code base, I immediately question the validity of
> the so-called "problem". 

An admirable attitude. :-)

> The truth is, until someone writes that 10kLOC
> project, we don't know. And this is not an issue I've heard is a problem for
> any practicioners. As a matter of fact, as a practicioner working on a
> fairly large Ruby app, I have no trouble with namespace pollution, and I do
> get tired of typing "module x; class x; module x; module x; class x" ad
> nauseum. I was hoping this new nesting would save me that, but it doesn't
> look like it will. C'est la vi.

I cannot prove it, nor will I attempt, as matz' decisions will suffice 
for me. This is more of a "gut feeling" that comes from my (limited) 
experience that was semented securely after being bulldozed by a more 
knowledgeable ex-co-worker on the "fail early" issue. But that was in C++.

> But I enjoy programming in Ruby and detest C++; why would I want Ruby to
> emulate it? 

My point here was that the old way emulates C (only #includes), while 
the new style emulates C++. You may detest one or the other, but the 
namespace issue is one thing I like about C++ over C. Or am I the only 
one who gets prefix paranoia reading things like the Ruby source code? ;-P

> I guess, in summary, I _like_ descendent code having easy access
> to constants defined in its ancestors' namespace. I don't think it's a
> problem having this behavior (even in large projects),

In Ruby this might be true. Personally I'll feel safer applying some 
"lessons learned" from other languages pro-actively.

> Perhaps this is where we diverge - I'd prefer to make programming easier now
> (by perhaps having more than I need) rather than prematurely fix problems I
> think I _might_ have.

Yes, but there is more than premature fixes on my mind. Readability and 
expressiveness are my biggest reasons for using Ruby and IMHO this new 
feature adds to that.

-- 
(\[ Kent Dahl ]/)_    _~_    _____[ http://www.pvv.org/~kentda/ ]_____/~
  ))\_student_/((  \__d L b__/ (pre-) Master of Science in Technology  )
( \__\_/__/ ) _)Industrial economics and technological management(
  \____/_\____/ (____engineering.discipline_=_Computer::Technology___)



In This Thread