[#60304] FreeRIDE hangs when I use gets — sothoth@... (Yog-Sothoth)

Hi there, and happy new year!

23 messages 2003/01/01
[#60305] Ruby DBI — David King Landrith <dave@...> 2003/01/01

Is there any way to retrieve the table and database associated with

[#60306] Re: Ruby DBI — Tom Sawyer <transami@...> 2003/01/01

On Wednesday 01 January 2003 07:03 am, David King Landrith wrote:

[#60309] Re: Ruby DBI — David Landrith <dlandrith@...> 2003/01/01

On Wednesday, January 1, 2003, at 09:20 AM, Tom Sawyer wrote:

[#60378] Interfaces in Ruby — "Robert" <bob.news@...>

15 messages 2003/01/02

[#60541] testunit 0.1.6 problems — Daniel Berger <djberg96@...>

ruby 1.6.7, 1.6.8, 1.7.3

39 messages 2003/01/04
[#60556] Re: testunit 0.1.6 problems — <nathaniel@...> 2003/01/04

Daniel Berger [mailto:djberg96@yahoo.com] wrote:

[#60579] Re: testunit 0.1.6 problems — Gavin Sinclair <gsinclair@...> 2003/01/04

On Sunday, January 5, 2003, 2:46:04 AM, nathaniel wrote:

[#60914] Re: Test::Unit fails w/no tests [was: testunit 0.1.6 problems] — <nathaniel@...> 2003/01/08

Gavin Sinclair [mailto:gsinclair@soyabean.com.au] wrote:

[#60947] Re: Test::Unit fails w/no tests [was: testunit 0.1.6 problems] — Gavin Sinclair <gsinclair@...> 2003/01/09

On Thursday, January 9, 2003, 6:56:44 AM, nathaniel wrote:

[#60959] Re: Test::Unit fails w/no tests [was: testunit 0.1.6 problems] — "Mike Campbell" <michael_s_campbell@...> 2003/01/09

> In my mind, there's nothing whatsoever wrong with an empty unit test.

[#60604] Forward: Drafting a "The Year in Scripting Languages" — matz@... (Yukihiro Matsumoto)

Hello,

21 messages 2003/01/05
[#60652] Re: Forward: Drafting a "The Year in Scripting Languages" — ptkwt@...1.aracnet.com (Phil Tomson) 2003/01/06

I noticed several replies which said that they could not do this - I

[#60620] bad interpreter — Arnaudo Massimo <marnaudo@...>

Hi everibody,

31 messages 2003/01/05
[#60985] Re: bad interpreter — mkcon@... (Martin Kahlert) 2003/01/09

In article <20030105144216.GA2879@gull.zena.it>,

[#61045] Re: bad interpreter — Arnaudo Massimo <marnaudo@...> 2003/01/09

* Martin Kahlert <mkcon@gmx.de> [gioved09 gennaio 2003, alle 16:36]:

[#61046] Re: bad interpreter — dblack@... 2003/01/09

Hi --

[#61052] Re: bad interpreter — Stoyan Zhekov <zhware@...> 2003/01/09

> > masarn1@gull:~/Ruby$ ./test.rb 2> error.log

[#61183] Re: bad interpreter — Arnaudo Massimo <marnaudo@...> 2003/01/11

* Stoyan Zhekov <zhware@hotpop.com> [venerd10 gennaio 2003, alle 08:55]:

[#60636] Compile time constant folding? — Dan Sugalski <dan@...>

Here's a quick question, now that parrot's close to getting object

19 messages 2003/01/05

[#60650] attr_cast, one a small step for interface techniques — Tom Sawyer <transami@...>

another addition to tomslib/rubylib:

16 messages 2003/01/06
[#60657] Re: attr_cast, one a small step for interface techniques — Jim Freeze <jim@...> 2003/01/06

On Monday, 6 January 2003 at 10:30:54 +0900, Tom Sawyer wrote:

[#60665] Re: attr_cast, one a small step for interface techniques — Gavin Sinclair <gsinclair@...> 2003/01/06

On Monday, January 6, 2003, 1:20:06 PM, Jim wrote:

[#60691] Re: attr_cast, one a small step for interface techniques — Tom Sawyer <transami@...> 2003/01/06

On Sunday 05 January 2003 09:30 pm, Gavin Sinclair wrote:

[#60702] Re: attr_cast, one a small step for interface techniques — Gavin Sinclair <gsinclair@...> 2003/01/06

On Monday, January 6, 2003, 7:48:18 PM, Tom wrote:

[#60766] Re: A very humour game — Gavin Sinclair <gsinclair@...>

Should a rule be set up that disallows messages (or attachments) of

13 messages 2003/01/07

[#60786] Re: attachment:ot -was RE: A very humour game — "Pe, Botp" <botp@...>

12 messages 2003/01/07

[#60877] Can you detect if a method takes a block argument? — Martin Hart <martin@...>

Hi all, hope everybody had a great new year - it is snowing outside for

16 messages 2003/01/08

[#60910] Ruby advocacy in sigs — Brennan Leathers <digibren@...>

I've started using the following as a sig on leoville.com, a very large

51 messages 2003/01/08
[#61644] Re: Ruby advocacy in sigs — "Gennady" <gfb@...> 2003/01/15

>

[#61645] Re: Ruby advocacy in sigs — Daniel Carrera <dcarrera@...> 2003/01/15

On Thu, 16 Jan 2003, Gennady wrote:

[#61662] Re: Ruby advocacy in sigs — "Park Heesob" <phasis@...> 2003/01/16

Hi,

[#61664] Re: Ruby advocacy in sigs — dblack@... 2003/01/16

Hi --

[#61667] Re: Ruby advocacy in sigs — "Hal E. Fulton" <hal9000@...> 2003/01/16

----- Original Message -----

[#61678] Re: Ruby advocacy in sigs — Tom Sawyer <transami@...> 2003/01/16

"More powerful than Perl, more object-oriented than Python."

[#61684] Re: Ruby advocacy in sigs — Hugh Sasse Staff Elec Eng <hgs@...> 2003/01/16

On Thu, 16 Jan 2003, Tom Sawyer wrote:

[#60926] The Year in Scripting Languages (Final Draft) — Lyle Johnson <lyle@...>

All,

44 messages 2003/01/08
[#60928] Re: The Year in Scripting Languages (Final Draft) — Tom Sawyer <transami@...> 2003/01/08

so who are we?

[#60943] Rubyists (Re: The Year in Scripting Languages (Final Draft)) — matz@... (Yukihiro Matsumoto) 2003/01/09

Hi,

[#60965] Re: Rubyists (Re: The Year in Scripting Languages (Final Draft)) — Jim Freeze <jim@...> 2003/01/09

On Thursday, 9 January 2003 at 9:18:00 +0900, Yukihiro Matsumoto wrote:

[#60944] OT: apple x11 — Brennan Leathers <digibren@...>

just in case anyone missed the word on the wire, apple has released its

24 messages 2003/01/09

[#61002] @@'s are not inherited? — Tom Sawyer <transami@...>

please correct me if i'm wrong but i beleive i just discovered something i did

12 messages 2003/01/09

[#61098] Using Observer pattern in client/server architecture - how? — Martin Hart <martin@...>

Hi everyone,

10 messages 2003/01/10

[#61144] Why Fox — Daniel Carrera <dcarrera@...>

Could someone explain to me why Ruby is adopting Fox as its standard GUI?

24 messages 2003/01/10

[#61167] 'require' search path — Tim Bates <tim@...>

I wish 'require' would count the current directory as the directory the file

16 messages 2003/01/11

[#61220] Ruby: politics & performance [long] — Louis Krupp <lkrupp@...>

The problem: Read a structured file (the details are irrelevant)

26 messages 2003/01/11

[#61271] sorting with the Swartzian transform — Daniel Carrera <dcarrera@...>

Hello all,

14 messages 2003/01/12

[#61349] OT: IE blatantly defiant of HTML standards — Tom Sawyer <transami@...>

33 messages 2003/01/13
[#62019] Re: OT: IE blatantly defiant of HTML standards — Eric Hodel <drbrain@...7.net> 2003/01/19

Tom Sawyer (transami@transami.net) wrote:

[#62046] Re: OT: IE blatantly defiant of HTML standards — Dmitri Colebatch <dim@...> 2003/01/20

> Tom Sawyer (transami@transami.net) wrote:

[#62048] Re: OT: IE blatantly defiant of HTML standards — Tom Sawyer <transami@...> 2003/01/20

On Sunday 19 January 2003 08:21 pm, Dmitri Colebatch wrote:

[#62049] Re: OT: IE blatantly defiant of HTML standards — Dmitri Colebatch <dim@...> 2003/01/20

Tom Sawyer wrote:

[#62060] Re: persistence (was: IE blatantly defiant of HTML standards) — Anders Bengtsson <ndrsbngtssn@...> 2003/01/20

--- Dmitri Colebatch <dim@colebatch.com> wrote:

[#62122] Re: persistence (was: IE blatantly defiant of HTML standards) — Tom Sawyer <transami@...> 2003/01/21

On Monday 20 January 2003 04:58 am, Anders Bengtsson wrote:

[#61351] UML tool for Linux? — Tim Bates <tim@...>

Does anyone know of a good OO modelling (UML?) tool for Linux, that works well

23 messages 2003/01/13

[#61435] Yet Another Test First Example ... in Ruby — Jim Weirich <jweirich@...>

Our local XP group did a Test-Driven Design clinic. Although most of

13 messages 2003/01/14

[#61497] ruby-dev summary 19198-19345 — Kazuo Saito <ksaito@...>

49 messages 2003/01/14
[#61499] Re: ruby-dev summary 19198-19345 — Paul Brannan <pbrannan@...> 2003/01/14

On Wed, Jan 15, 2003 at 02:31:22AM +0900, Kazuo Saito wrote:

[#61534] Re: ruby-dev summary 19198-19345 — Matt Armstrong <matt@...> 2003/01/14

Paul Brannan <pbrannan@atdesk.com> writes:

[#61565] Re: ruby-dev summary 19198-19345 — matz@... (Yukihiro Matsumoto) 2003/01/15

Hi,

[#61566] Re: ruby-dev summary 19198-19345 — Matt Armstrong <matt@...> 2003/01/15

matz@ruby-lang.org (Yukihiro Matsumoto) writes:

[#61571] Re: ruby-dev summary 19198-19345 — Gavin Sinclair <gsinclair@...> 2003/01/15

On Wednesday, January 15, 2003, 3:17:11 PM, Matt wrote:

[#61574] Re: ruby-dev summary 19198-19345 — matz@... (Yukihiro Matsumoto) 2003/01/15

Hi,

[#61512] Re: ruby-dev summary 19198-19345 — Tom Sawyer <transami@...> 2003/01/14

On Tuesday 14 January 2003 10:31 am, Kazuo Saito wrote:

[#61665] Re: ruby-dev summary 19198-19345 — Tom Sawyer <transami@...> 2003/01/16

On Tuesday 14 January 2003 12:40 pm, Tom Sawyer wrote:

[#61653] Quick question for Japanese speaker — "Hal E. Fulton" <hal9000@...>

I've created a graphic based on the Kanji

12 messages 2003/01/15

[#61682] Re: ruby-dev summary 19198-19345 — "Pe, Botp" <botp@...>

13 messages 2003/01/16

[#61749] Linux Editor — dwerder@... (Dominik Werder)

What's your favorite ruby editor on linux?

22 messages 2003/01/16

[#61757] quick: it responds, it evaluates, and is not empty — Tom Sawyer <transami@...>

quick quest: anyone know of a nice slick short and sweet way to do this:

38 messages 2003/01/17
[#61797] Re: quick: it responds, it evaluates, and is not empty — "Bulat Ziganshin" <bulatz@...> 2003/01/17

Hello Tom,

[#61842] Re: quick: it responds, it evaluates, and is not empty — Tom Sawyer <transami@...> 2003/01/17

On Thursday 16 January 2003 11:25 pm, Bulat Ziganshin wrote:

[#61846] Re: quick: it responds, it evaluates, and is not empty — "Bulat Ziganshin" <bulatz@...> 2003/01/17

Hello Tom,

[#61848] Re: quick: it responds, it evaluates, and is not empty — Tom Sawyer <transami@...> 2003/01/17

On Friday 17 January 2003 07:08 am, Bulat Ziganshin wrote:

[#61854] Re: quick: it responds, it evaluates, and is not empty — Gavin Sinclair <gsinclair@...> 2003/01/17

On Saturday, January 18, 2003, 1:22:09 AM, Tom wrote:

[#61855] Re: quick: it responds, it evaluates, and is not empty — dblack@... 2003/01/17

Hi --

[#61864] Re: quick: it responds, it evaluates, and is not empty — ahoward <ahoward@...> 2003/01/17

On Fri, 17 Jan 2003 dblack@candle.superlink.net wrote:

[#61872] Re: quick: it responds, it evaluates, and is not empty — dblack@... 2003/01/17

Hi --

[#61896] Re: quick: it responds, it evaluates, and is not empty — ahoward <ahoward@...> 2003/01/17

On Sat, 18 Jan 2003 dblack@candle.superlink.net wrote:

[#61759] most popular unix scripting language — dorli@... (dambalaMaster)

does anyone know which is the most popular unix scripting language?

26 messages 2003/01/17

[#61810] Automating Perl -> Ruby translation? — "Hal E. Fulton" <hal9000@...>

Has anyone given any thought to this

22 messages 2003/01/17
[#61875] Re: Automating Perl -> Ruby translation? — ptkwt@...1.aracnet.com (Phil Tomson) 2003/01/17

In article <034a01c2be07$95670380$0300a8c0@austin.rr.com>,

[#61901] Resolution to CGI API problem? — Travis Whitton <whitton@...>

There is a very long thread [ruby-talk:39898] that talks about changes

11 messages 2003/01/17

[#61965] PickAxe index? — Daniel Carrera <dcarrera@...>

Does PickAxe online have an index?

14 messages 2003/01/18

[#62063] a single class that supports multiple facets/interfaces — David Garamond <davegaramond@...>

i want to have a class that can support multiple sets of methods, based

16 messages 2003/01/20
[#62090] Re: a single class that supports multiple facets/interfaces — dblack@... 2003/01/20

Hi --

[#62268] extend (Re: a single class that supports multiple facets/interfaces) — David Garamond <davegaramond@...> 2003/01/22

dblack@candle.superlink.net wrote:

[#62093] Local variable scope — Daniel Carrera <dcarrera@...>

I'm a bit confused by the scope of local variables.

24 messages 2003/01/20

[#62203] accessors for module instance vars — ptkwt@...1.aracnet.com (Phil Tomson)

I've got a module that that has several classes defined within it. These

17 messages 2003/01/21
[#62250] Re: accessors for module instance vars — ptkwt@...1.aracnet.com (Phil Tomson) 2003/01/22

In article <Pine.LNX.4.33.0301212020500.6373-100000@eli.fsl.noaa.gov>,

[#62213] Newbie Q: do i need PStore for this or something else ? — "Vandemoortele Simon" <delirious_nospamplz@...>

_Background info:_

17 messages 2003/01/21

[#62319] Re: exit status, stderr and stdout — "Berger, Daniel" <djberge@...>

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

14 messages 2003/01/22

[#62321] Definition: iterator — Daniel Carrera <dcarrera@...>

I sort of know what an iterator is, but not well enough to explain it.

18 messages 2003/01/22

[#62340] mod_ruby: what's persistent and what's shared? — Tom Sawyer <transami@...>

i'm tired of being confused about this and i'm hoping someone can clear this

21 messages 2003/01/23

[#62344] Can we attack the 'not enough libraries' thing straight on? — dblack@...

Hi --

136 messages 2003/01/23
[#62349] Re: Can we attack the 'not enough libraries' thing straight on? — Simon Cozens <simon@...> 2003/01/23

dblack@candle.superlink.net writes:

[#62358] Re: Can we attack the 'not enough libraries' thing straight on? — dblack@... 2003/01/23

Hi --

[#62645] Re: Can we attack the 'not enough libraries' thing straight on? — "MikkelFJ" <mikkelfj-anti-spam@...> 2003/01/25

[#62648] Re: Can we attack the 'not enough libraries' thing straight on? — ahoward <ahoward@...> 2003/01/25

On Sat, 25 Jan 2003, MikkelFJ wrote:

[#62658] Re: Can we attack the 'not enough libraries' thing straight on? — Mark Wilson <mwilson13@...> 2003/01/25

The following is my initial, and not yet complete, proposal on

[#62696] Re: Can we attack the 'not enough libraries' thing straight on? — "Iain 'Spoon' Truskett" <spoon@...> 2003/01/26

* Mark Wilson (mwilson13@cox.net) [26 Jan 2003 09:44]:

[#62699] Re: Can we attack the 'not enough libraries' thing straight on? — Mark Wilson <mwilson13@...> 2003/01/26

[#62705] Re: Can we attack the 'not enough libraries' thing straight on? — "Iain 'Spoon' Truskett" <spoon@...> 2003/01/26

* Mark Wilson (mwilson13@cox.net) [26 Jan 2003 17:26]:

[#62725] Re: Can we attack the 'not enough libraries' thing straight on? — Dave Thomas <dave@...> 2003/01/26

Iain 'Spoon' Truskett wrote:

[#62731] Re: Can we attack the 'not enough libraries' thing straight on? — "Mike Campbell" <michael_s_campbell@...> 2003/01/26

[#62738] Re: Can we attack the 'not enough libraries' thing straight on? — Dave Thomas <dave@...> 2003/01/26

Mike Campbell wrote:

[#62750] Re: Can we attack the 'not enough libraries' thing straight on? — Daniel Carrera <dcarrera@...> 2003/01/26

I certainly think that RAA should have a search feature.

[#62808] Re: Can we attack the 'not enough libraries' thing straight on? — "NAKAMURA, Hiroshi" <nahi@...> 2003/01/27

Hi, all,

[#62733] Re: Can we attack the 'not enough libraries' thing straight on? — ahoward <ahoward@...> 2003/01/26

On Sun, 26 Jan 2003, Dave Thomas wrote:

[#62369] Re: Can we attack the 'not enough libraries' thing straight on? — Simon Cozens <simon@...> 2003/01/23

Daniel Carrera <dcarrera@math.umd.edu> writes:

[#62373] Re: Can we attack the 'not enough libraries' thing straight on? — dblack@... 2003/01/23

Hi --

[#62381] Re: Can we attack the 'not enough libraries' thing straight on? — Tom Sawyer <transami@...> 2003/01/23

want to here a crazy idea?

[#62545] Re: Can we attack the 'not enough libraries' thing straight on? — Warren Brian Noronha <warren@...> 2003/01/24

dear devels

[#62345] Hash#+ ? — Daniel Carrera <dcarrera@...>

I think that there should be a Hash#+ method, aking to Array#+.

22 messages 2003/01/23
[#62347] Re: Hash#+ ? — dblack@... 2003/01/23

Hi --

[#62350] Re: Hash#+ ? — Tom Sawyer <transami@...> 2003/01/23

On Wednesday 22 January 2003 06:52 pm, dblack@candle.superlink.net wrote:

[#62351] Re: Hash#+ ? — Daniel Carrera <dcarrera@...> 2003/01/23

On Thu, Jan 23, 2003 at 11:14:08AM +0900, Tom Sawyer wrote:

[#62376] Re: Hash#+ ? — Tom Sawyer <transami@...> 2003/01/23

On Wednesday 22 January 2003 07:20 pm, Daniel Carrera wrote:

[#62378] Re: Hash#+ ? — matz@... (Yukihiro Matsumoto) 2003/01/23

Hi,

[#62383] Missing libraries?? — "Hal E. Fulton" <hal9000@...>

I'm starting a new thread to get away from

22 messages 2003/01/23

[#62665] RAA proposal — Daniel Carrera <dcarrera@...>

Hello all,

20 messages 2003/01/26
[#62667] Re: RAA proposal — Jim Freeze <jim@...> 2003/01/26

On Sunday, 26 January 2003 at 10:48:02 +0900, Daniel Carrera wrote:

[#62669] Re: RAA proposal — Daniel Carrera <dcarrera@...> 2003/01/26

On Sun, Jan 26, 2003 at 10:57:28AM +0900, Jim Freeze wrote:

[#62708] solaris porting problem -- flock failure? — Joel VanderWerf <vjoel@...>

Any solaris gurus out there?

27 messages 2003/01/26

[#62730] cascading configuration variables — Wilbert Berendsen <wilbert@...>

-----BEGIN PGP SIGNED MESSAGE-----

13 messages 2003/01/26

[#62767] common regular expressions — Michael Garriss <mgarriss@...>

Sorry if this a stupid question but I am new to ruby AND regular

17 messages 2003/01/26

[#62836] Test::Unit -> order of tests? — Mauricio Fern疣dez <batsman.geo@...>

28 messages 2003/01/27
[#62845] Re: Test::Unit -> order of tests? — Michael Garriss <mgarriss@...> 2003/01/27

IMHO, it would be nice if they were run in the order they were defined.

[#62852] Re: Test::Unit -> order of tests? — ahoward <ahoward@...> 2003/01/27

On Tue, 28 Jan 2003, Michael Garriss wrote:

[#62855] Re: Test::Unit -> order of tests? — Chad Fowler <chad@...> 2003/01/27

[#62861] Re: Test::Unit -> order of tests? — ahoward <ahoward@...> 2003/01/27

On Tue, 28 Jan 2003, Chad Fowler wrote:

[#62867] Re: Test::Unit -> order of tests? — Matt Armstrong <matt@...> 2003/01/27

ahoward <ahoward@fsl.noaa.gov> writes:

[#62899] Re: Test::Unit -> order of tests? — "Warren Brown" <wkb@...> 2003/01/28

> To implement this, I would suggest renaming all your test_XXX methods

[#62847] tkgnuplot problem: fork() on win — Ralf <lausianne@...>

Hi,

17 messages 2003/01/27
[#62936] Re: tkgnuplot problem: fork() on win (popen3 for windows?) — ptkwt@...1.aracnet.com (Phil Tomson) 2003/01/28

In article <20030128122113W.nagai@ai.kyutech.ac.jp>,

[#62890] ruby-dev summary 19380-19436 — TAKAHASHI Masayoshi <maki@...>

Hello all,

14 messages 2003/01/27

[#63065] Local variables & blocks — ahoward <ahoward@...>

108 messages 2003/01/29
[#63072] Re: Local variables & blocks — Gavin Sinclair <gsinclair@...> 2003/01/29

On Wednesday, January 29, 2003, 5:04:51 PM, ahoward wrote:

[#63075] Re: Local variables & blocks — Gavin Sinclair <gsinclair@...> 2003/01/29

On Wednesday, January 29, 2003, 6:17:44 PM, Gavin wrote:

[#63087] Re: Local variables & blocks — Mauricio Fern疣dez <batsman.geo@...> 2003/01/29

On Wed, Jan 29, 2003 at 04:40:21PM +0900, Gavin Sinclair wrote:

[#63100] Re: Local variables & blocks — matz@... (Yukihiro Matsumoto) 2003/01/29

Hi,

[#63103] Re: Local variables & blocks — ahoward <ahoward@...> 2003/01/29

On Thu, 30 Jan 2003, Yukihiro Matsumoto wrote:

[#63119] Re: Local variables & blocks — matz@... (Yukihiro Matsumoto) 2003/01/29

Hi,

[#63203] Re: Local variables & blocks — Martin DeMello <martindemello@...> 2003/01/30

ahoward <ahoward@fsl.noaa.gov> wrote:

[#63211] Re: Local variables & blocks — ahoward <ahoward@...> 2003/01/30

On Thu, 30 Jan 2003, Martin DeMello wrote:

[#63558] Re: Local variables & blocks — "Robert Klemme" <bob.news@...> 2003/02/03

[#63560] Re: Local variables & blocks — matz@... (Yukihiro Matsumoto) 2003/02/03

Hi,

[#63094] Ruby Books -- A Question — Mark Probert <probertm@..._acm.org>

Rubyists,

15 messages 2003/01/29

[#63198] reading past a file header — Martin DeMello <martindemello@...>

Looking for a more idiomatic way to do this:

12 messages 2003/01/30

[#63216] Newbie question — n.vasiliev@... (Nicolay Vasiliev)

Hello!

17 messages 2003/01/30

[#63284] Return values from assertions — <nathaniel@...>

Eivind Eklund and I have been discussing whether assertions ought to

12 messages 2003/01/31

[#63305] %L, %l revisited — Tom Sawyer <transami@...>

this is a general request for opinion/support. i, for one, would very much

40 messages 2003/01/31
[#63556] Re: %L, %l revisited — nobu.nokada@... 2003/02/03

Hi,

[#63566] Re: %L, %l revisited — Tom Sawyer <transami@...> 2003/02/03

On Monday 03 February 2003 01:26 am, nobu.nokada@softhome.net wrote:

[#63592] Re: %L, %l revisited — nobu.nokada@... 2003/02/03

Hi,

[#63773] Re: %L, %l revisited — Tom Sawyer <transami@...> 2003/02/05

Nobu,

[#63777] Re: %L, %l revisited — dblack@... 2003/02/05

Hi --

[#63784] Re: %L, %l revisited — "Hal E. Fulton" <hal9000@...> 2003/02/05

----- Original Message -----

[#63799] Re: %L, %l revisited — Tom Sawyer <transami@...> 2003/02/05

On Wednesday 05 February 2003 02:44 pm, Hal E. Fulton wrote:

Why is the performance of list_append O(n**2)?

From: ptkwt@...1.aracnet.com (Phil Tomson)
Date: 2003-01-11 20:47:02 UTC
List: ruby-talk #61215
In article <3E1FF274.2090106@pssw.NOSPAMPLEASE.com.invalid>,
Louis Krupp  <lkrupp@pssw.NOSPAMPLEASE.com.invalid> wrote:
>The problem:  Read a structured file (the details are irrelevant)
>and generate a program which, when run, would produce the original
>file.  Modify the program, re-run it, and you have a relatively
>easy way to change the original structured file.

Interesting...  Just curious, what kind of files are these?

>
>For various reasons, C++ seemed like the way to go when I first did
>this.  It worked, until I was handed structured files that were 4 MB
>long and the generated C++ program went on for some 600,000 lines
>and g++ crashed trying to compile it.
>
>I needed a scripting language.  I should have realized that a long
>time ago.
>
>I tried Ruby.  Ruby had a political advantage:  It wasn't Perl.
>The problem with Perl was that it's been around long enough to have
>a reputation, deserved or not, for being hard to read.  I don't
>mind Perl, but my boss was visibly relieved to hear I was using
>something else.
>

Again, interesting...  It has so often been the opposite case (that the 
boss was upset at someone using Ruby instead of Perl because the boss 
never heard of Ruby) - this is a refreshing change.

>
>If what follows has already been discussed, let me know.  I looked,
>but I couldn't find anything.
>
>I wrote a Ruby script generator that worked for small input files.
>It worked for large input files, too, but it was slow, very slow.
>It took 18 minutes to reproduce a 4 MB structured file.  My
>generated C++ program couldn't do it at all, but 18 minutes was
>still too long.
>
>When I took a closer look, I realized that most of those 18 minutes
>were spent parsing the script, and most of that time was spent in
>list_append.
>
>The problem, I finally figured out, was the arrays.  The generated
>script had lots of them, and many of them were big, some with more
>than 10,000 elements.

Maybe not so unusual...
>
>At this point, I realized that mine wasn't your typical Ruby
>application.  Normal, handwritten programs don't have arrays that
>huge.
>
>What to do...  I could give up and try, say, Python, or I could see
>if there was a way to tweak Ruby.
>
>I didn't have time to learn Python.
>
>Back to Ruby...
>
>list_append (from 1.6.8) looks like this:
>
>---
>static NODE*
>list_append(head, tail)
>     NODE *head, *tail;
>{
>     NODE *last;
>
>     if (head == 0) return NEW_LIST(tail);
>
>     last = head;
>     while (last->nd_next) {
>	last = last->nd_next;
>     }
>
>     last->nd_next = NEW_LIST(tail);
>     head->nd_alen += 1;
>     return head;
>}
>---
>
>Following nd_next links for each of n array elements takes
>O(n**2) time.  

Yes, that does seem excessive...

>A tail pointer would have been useful, but with
>the node structure being as compact as it is, there was no room
>for one.
>
>Desperate times called for desperate measures.  I don't expect
>anyone to like what I did.  I'm not crazy about it myself.
>
>I added another word to the node:
>
>---
>typedef struct RNode {
>     ...
>     union {
>	struct RNode *node;
>     } u4;
>} NODE;
>
>...
>
>#define nd_tail  u4.node
>
>...
>
>static NODE*
>list_append(head, tail)
>     NODE *head, *tail;
>{
>     NODE *last;
>
>     if (head == 0) return NEW_LIST(tail);
>
>     if (head->nd_tail) {
>	last = head->nd_tail;
>     } else {
>	last = head;
>     }
>
>     head->nd_tail = last->nd_next = NEW_LIST(tail);
>     head->nd_alen += 1;
>     return head;
>}
>---
>
>It worked.  The monster script that generated 4 MB of structured
>stuff ran in under six minutes instead of 18.  This is almost
>acceptable, and it's a lot better than a g++ compilation that
>takes 15 minutes to not work at all.
>
>My immediate problem seems to be solved, but I don't want to make
>my company dependant on a patched version of Ruby forever, so I'd
>like some feedback.
>
>I can see this going one of several ways:
>
>1.  Array parsing should be improved.  Adding a word to the node
>structure is crude and unimaginitive, but it may be necessary.
>
>2.  Array parsing should be improved, and there's a better way
>to fix it than by bloating the node size by 33%.
>
>3.  Array parsing could be improved, but don't expect it to
>happen any time soon.  If you insist on having 10,000-element
>arrays, you might consider finding another language.
>

You mean appending to the end of an Array should be improved, am I 
right?

>If the answer is #3, I don't mind.  I can deliver what I've got
>and take the time to try something else.  On the other hand,
>I'd be a fool to assume anything.

Have you checked out NArray?
 http://www.ir.isas.ac.jp/~masa/ruby/index-e.html

It may not be what you want, though.  

It certainly seems that the O(n**2) performace for appending an item to 
the end of an Array could be improved upon.  Why would each node in the list 
have to carry around the tail info?  Why couldn't we do it so that Array 
object (as defined in C, of course) always knows where it's tail is?  Then 
you only add the overhead of one pointer for the whole array (unless I've 
misunderstood what you did).  Of course you add some time overhead 
whenever the array grows or shrinks, but I don't think a new pointer 
assignment adds much time.

Or perhaps since we always know how many elements are in an Array (don't 
we, I haven't looked at the Array C code, I hope we don't do a n**2 
traversal to find out) couldn't that info be used by list_append?

>
>Thanks for taking the time to read this.
>

I changed the title of this thread so as to get the attention of Ruby 
internals folks (matz, guy, are you listening? :)

>Opinions...?
>

I suppose another option would be to define a different kind of Array at 
the C level, one that meets your needs.  Then you wouldn't be depending on 
a modified version of Ruby, but on a homegrown extension which isn't so 
bad.

>Louis Krupp
>


Phil
-- 
"Or perhaps the truth is less interesting than the facts?" 
Amy Weiss (accusing theregister.co.uk of engaging in 'tabloid journalism')
Senior VP, Communications
Recording Industry Association of America  

In This Thread

Prev Next