[#111191] invisible Infinity — gabriele renzi <rff_rff@...>

Hi gurus and nubys,

17 messages 2004/09/01

[#111202] Ruby blog software. — Lloyd Zusman <ljz@...>

As a favor to a friend, I'm setting up a blog for her on my server.

44 messages 2004/09/01
[#111206] Re: Ruby blog software. — Jamis Buck <jgb3@...> 2004/09/01

Lloyd Zusman wrote:

[#111284] Re: Ruby blog software. — Mike Clark <mike@...> 2004/09/02

[#111287] Re: Ruby blog software. — Jamis Buck <jgb3@...> 2004/09/02

Mike Clark wrote:

[#111294] Re: Ruby blog software. — Dave Thomas <dave@...> 2004/09/02

[#111212] - EZFX Editor 0.6.0 — Richard Lyman <lymans@...>

Download:

17 messages 2004/09/01

[#111214] ruby sidebar for firefox? — djberg96@... (Daniel Berger)

Hi all,

27 messages 2004/09/01
[#111710] Firefox Ruby sidebar (Re: ruby sidebar for firefox?) — James Britt <jamesUNDERBARb@...> 2004/09/07

James Britt wrote:

[#111245] Not just $SAFE, but damn $SAFE — Aredridel <aredridel@...>

I've been toying with an IRC bot that takes input from users in channel,

20 messages 2004/09/02
[#111273] Re: Not just $SAFE, but damn $SAFE — Florian Gross <flgr@...> 2004/09/02

Aredridel wrote:

[#111277] Re: Not just $SAFE, but damn $SAFE — ts <decoux@...> 2004/09/02

>>>>> "F" == Florian Gross <flgr@ccan.de> writes:

[#111300] autochomp? — Martin DeMello <martindemello@...>

Any way to make IO.readlines chomp each line before adding it to the

33 messages 2004/09/02
[#111436] Re: autochomp? — "Robert Klemme" <bob.news@...> 2004/09/03

[#111447] Re: autochomp? — Ara.T.Howard@... 2004/09/03

On Fri, 3 Sep 2004, Robert Klemme wrote:

[#111448] Pickaxe 2 Suspense Is Killing Me — Zach Dennis <zdennis@...> 2004/09/03

I have been suffering from what appears to be an pre-PickAxe 2 Suspense

[#111364] Pickaxe 2 and rpa-base — Carl Youngblood <carl.youngblood@...>

I was just drooling in anticipation for pickaxe 2 and looking through

16 messages 2004/09/02

[#111477] Hashes and ordering — Hal Fulton <hal9000@...>

I've been wondering something today...

35 messages 2004/09/04
[#111481] Re: Hashes and ordering — Markus <markus@...> 2004/09/04

> Do people test equality of hashes very often? I, for one,

[#111483] Re: Hashes and ordering — Hal Fulton <hal9000@...> 2004/09/04

Markus wrote:

[#111488] OK... :) question about hash and array literals — Hal Fulton <hal9000@...>

It has always bothered me a little that [...] and {...} do not

31 messages 2004/09/04
[#111499] Re: OK... :) question about hash and array literals — Yukihiro Matsumoto <matz@...> 2004/09/04

Hi,

[#111521] Re: OK... :) question about hash and array literals — Hal Fulton <hal9000@...> 2004/09/04

Yukihiro Matsumoto wrote:

[#111576] Re: OK... :) question about hash and array literals — Yukihiro Matsumoto <matz@...> 2004/09/05

Hi,

[#111595] Re: OK... :) question about hash and array literals — Hal Fulton <hal9000@...> 2004/09/05

Yukihiro Matsumoto wrote:

[#111607] Re: OK... :) question about hash and array literals — Yukihiro Matsumoto <matz@...> 2004/09/05

Hi,

[#111610] Re: OK... :) question about hash and array literals — Hal Fulton <hal9000@...> 2004/09/05

Yukihiro Matsumoto wrote:

[#111614] Re: OK... :) question about hash and array literals — Bill Guindon <agorilla@...> 2004/09/05

On Mon, 6 Sep 2004 08:31:38 +0900, Hal Fulton <hal9000@hypermetrics.com> wrote:

[#111531] Anyone using Copland? I need feedback! — Jamis Buck <jgb3@...>

Copland (an IoC container for Ruby) is moving forward, and I *think*

13 messages 2004/09/04

[#111543] Videos of Ruby Conference — Carl Youngblood <carl.youngblood@...>

Is anyone going to be filming rubycon? I would really like to watch

51 messages 2004/09/04
[#111558] Re: Videos of Ruby Conference — Chad Fowler <chadfowler@...> 2004/09/05

On Sun, 5 Sep 2004 07:20:14 +0900, Carl Youngblood

[#111645] Re: Videos of Ruby Conference — Robert McGovern <robert.mcgovern@...> 2004/09/06

> I have a digital video camera of my own and am also planning to try to

[#111971] Re: Videos of Ruby Conference — Eric Hodel <drbrain@...7.net> 2004/09/09

Robert McGovern (robert.mcgovern@gmail.com) wrote:

[#112002] Re: Videos of Ruby Conference — Gavin Sinclair <gsinclair@...> 2004/09/09

On Thursday, September 9, 2004, 5:06:10 PM, Eric wrote:

[#112012] Re: Videos of Ruby Conference — Richard Kilmer <rich@...> 2004/09/09

We are going to have my buddy's audio mixing board, a wireless mic, and a

[#112016] Re: Videos of Ruby Conference — Chad Fowler <chadfowler@...> 2004/09/09

On Fri, 10 Sep 2004 00:08:22 +0900, Richard Kilmer <rich@infoether.com> wrote:

[#112021] Re: Videos of Ruby Conference — Richard Lyman <lymans@...> 2004/09/09

Please don't 'bittorrent-only' anything. There are those of use who

[#112025] BItTorrent: A Force for Good or Evil? (Re: Videos of Ruby Conference) — James Britt <jamesUNDERBARb@...> 2004/09/09

Richard Lyman wrote:

[#111687] Ruby-Nuby forum — Alexey Verkhovsky <alex@...>

Dear fellow ruby-talkers,

49 messages 2004/09/06
[#111714] Re: Ruby-Nuby forum — "Robert Klemme" <bob.news@...> 2004/09/07

[#111718] Re: Ruby-Nuby forum — Alexey Verkhovsky <alex@...> 2004/09/07

On Tue, 2004-09-07 at 10:05, Robert Klemme wrote:

[#111765] Re: Ruby-Nuby forum — Brian Wisti <brianwisti@...> 2004/09/07

[#111770] Re: Ruby-Nuby forum — "Bill Kelly" <billk@...> 2004/09/07

> There will always be some folks who think that all

[#111855] Re: Ruby-Nuby forum — David Ross <drossruby@...> 2004/09/08

That is a very good idea. I have a few thoughts to add

[#111757] Request for ideas: simple, useful web app — "Kirk Haines" <khaines@...>

I'm working on a much broader set of IOWA documentation, and core to this is

14 messages 2004/09/07

[#111759] Reporting errors/problem with modules part of ruby base — Dany Cayouette <danyc@...>

I am a ruby newbie and am intimitaded by posting to this newsgroup... I only made two postings related to modules included with base ruby 1.8.0 and 1.8.1 (net/imap and net/telnet). I think I did my homework in researching the behavior I observed, but never saw any replies to my postings.

11 messages 2004/09/07

[#111786] Unified type conversion framework — gabriele renzi <rff_rff@...>

Hi gurus and nubys,

13 messages 2004/09/07

[#111808] Extending ruby with crypto++ — dwerder@... (Dominik Werder)

Hello everybody,

15 messages 2004/09/07

[#111839] ruby-dev summary 24171-24235 — Minero Aoki <aamine@...>

Hi all,

13 messages 2004/09/08

[#111922] Ruby-Nuby forum — Alexey Verkhovsky <alex@...>

Hi all!

22 messages 2004/09/08

[#111972] Problem with ensuring consistency .. Finalization?? — Charles Hixson <charleshixsn@...>

I want to have a class which occasionally updates a file, but I want to

15 messages 2004/09/09

[#112096] OpenGL on MacOS X (again) — Gavin Kistner <gavin@...>

I'm trying to get Ruby/OpenGL working for just me on my MacOS X box;

13 messages 2004/09/09

[#112194] SQLite/Ruby 2.0.1 BETA — Jamis Buck <jgb3@...>

Another beta release for SQLite/Ruby is available, hard on the heels of

16 messages 2004/09/10
[#112200] Re: [ANN] SQLite/Ruby 2.0.1 BETA — Vincent Isambart <vincent.isambart@...> 2004/09/10

Hi,

[#112208] Re: [ANN] SQLite/Ruby 2.0.1 BETA — Jamis Buck <jgb3@...> 2004/09/10

Vincent Isambart wrote:

[#112195] hob x 0.2 .. blogink for ample abilities .. come into the arms of .. — why the lucky stiff <ruby-talk@...>

ok, ruby-talk. enough.

24 messages 2004/09/10

[#112229] Rails and RubyGems — Jim Menard <jimm@...>

I have two issues with installing Rails via RubyGems. I'm on Mac OS X.

12 messages 2004/09/11

[#112253] Singleton method on object via define_method? — Hal Fulton <hal9000@...>

OK, I have this variable called box.

50 messages 2004/09/11
[#112343] Re: Singleton method on object via define_method? — Martin DeMello <martindemello@...> 2004/09/12

"trans. (T. Onoma)" <transami@runbox.com> wrote:

[#112346] Re: Singleton method on object via define_method? — "trans. (T. Onoma)" <transami@...> 2004/09/12

On Sunday 12 September 2004 02:19 pm, Martin DeMello wrote:

[#112353] Re: Singleton method on object via define_method? — "David A. Black" <dblack@...> 2004/09/13

Hi --

[#112354] Re: Singleton method on object via define_method? — "Gavin Sinclair" <gsinclair@...> 2004/09/13

D. A. Black wrote:

[#112355] Re: Singleton method on object via define_method? — "David A. Black" <dblack@...> 2004/09/13

On Mon, 13 Sep 2004, Gavin Sinclair wrote:

[#112360] Re: Singleton method on object via define_method? — "Gavin Sinclair" <gsinclair@...> 2004/09/13

> On Mon, 13 Sep 2004, Gavin Sinclair wrote:

[#112382] Re: Singleton method on object via define_method? — "Robert Klemme" <bob.news@...> 2004/09/13

[#112464] Catching undefined global variable errors — "George Moschovitis" <george.moschovitis@...>

Hello everyone,

14 messages 2004/09/14

[#112506] Ruby Image — Brian Schroeder <spam0504@...>

Hello Group,

27 messages 2004/09/14
[#112511] Re: [Slightly OT] Ruby Image — James Edward Gray II <james@...> 2004/09/14

On Sep 14, 2004, at 9:04 AM, Brian Schroeder wrote:

[#112549] Programming Ruby available for pre-order — Dave Thomas <dave@...>

Folks:

37 messages 2004/09/14
[#112749] Re: [ANN] Programming Ruby available for pre-order — I did not <NOSPAM@...> 2004/09/16

On Thu, 16 Sep 2004 00:01:54 +0200, Dietmar Gack wrote:

[#112608] Ex-Perl coders: Howz it feel to convert to Ruby? — Chris <ceo@...>

I didn't even think about asking this question until now, based on a

95 messages 2004/09/15
[#112716] Re: Ex-Perl coders: Howz it feel to convert to Ruby? — ptkwt@... (Phil Tomson) 2004/09/16

In article <ER32d.2786$Qv5.1325@newssvr33.news.prodigy.com>,

[#112692] Hacking the Ruby interpreter — Tim Hunter <cyclists@...>

I've got an idea for a hack^H^H^H^H enhancement to the interpreter that I'd

12 messages 2004/09/15

[#112726] RubyGems 0.8.0 — Chad Fowler <chad@...>

Marking the 3000th download of RubyGems

13 messages 2004/09/16

[#112814] horribly impossible debugging task — "Ara.T.Howard" <Ara.T.Howard@...>

17 messages 2004/09/16

[#112815] Re: [ANN] Programming Ruby available for pre-order — Dale Martenson <dmartenson@...>

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

12 messages 2004/09/16

[#112831] Want a regular Ruby Quiz? (long) — James Edward Gray II <james@...>

I'm a fan of short, but regular programming "challenges" or "quizzes".

25 messages 2004/09/16

[#112881] Automatic class conversion / function overloading — torehalv@... (Tore Halvorsen)

Hi! Rather new to ruby, and I'm not quite sure where to look for the

18 messages 2004/09/17

[#112940] Accessing Hash elements in sorted order? — Chris <ceo@...>

Problem: I wanted to access the elements of a Hash (specifically from

14 messages 2004/09/17

[#112976] Return value of while loop. — Brian Schrer <ruby@...>

Maybe this question would be more adequate for the ruby-nuby forum ;), but

21 messages 2004/09/18

[#113026] Method improvement request .-- — Charles Hixson <charleshixsn@...>

I'm sure there must be a more idiomatic+efficient way to do this, but I

32 messages 2004/09/18

[#113055] Array#index block and rdetect — "trans. (T. Onoma)" <transami@...>

Tiny RCR suggestion:

62 messages 2004/09/19
[#113072] Re: Array#index block and rdetect — "Robert Klemme" <bob.news@...> 2004/09/19

[#113097] Re: Array#index block and rdetect — Yukihiro Matsumoto <matz@...> 2004/09/19

Hi,

[#113100] Re: Array#index block and rdetect — "David A. Black" <dblack@...> 2004/09/20

Hi --

[#113103] Re: Array#index block and rdetect — Yukihiro Matsumoto <matz@...> 2004/09/20

Hi,

[#113105] Re: Array#index block and rdetect — "David A. Black" <dblack@...> 2004/09/20

Hi --

[#113130] Re: Array#index block and rdetect — "Robert Klemme" <bob.news@...> 2004/09/20

[#113146] Re: Array#index block and rdetect — "Robert Klemme" <bob.news@...> 2004/09/20

[#113150] Re: Array#index block and rdetect — "David A. Black" <dblack@...> 2004/09/20

Hi --

[#113172] Re: Array#index block and rdetect — Yukihiro Matsumoto <matz@...> 2004/09/20

Hi,

[#113179] Re: Array#index block and rdetect — "David A. Black" <dblack@...> 2004/09/20

Hi --

[#113219] Re: Array#index block and rdetect — Yukihiro Matsumoto <matz@...> 2004/09/20

Hi,

[#113237] Re: Array#index block and rdetect — "David A. Black" <dblack@...> 2004/09/21

Hi --

[#113118] Re: [ANN] Vim/Ruby Configuration Files, 2004.09.20 — "Mehr, Assaph (Assaph)" <assaph@...>

10 messages 2004/09/20

[#113192] Store object in on disk / mini database — Kristian Sensen <ks@...>

Hi!

19 messages 2004/09/20
[#113207] Re: Store object in on disk / mini database — "Bill Kelly" <billk@...> 2004/09/20

From: "trans. (T. Onoma)" <transami@runbox.com>

[#113222] - install.rb hack # 42 — "Ara.T.Howard" <Ara.T.Howard@...>

18 messages 2004/09/20
[#113226] Re: [ANN] - install.rb hack # 42 — Tim Hunter <cyclists@...> 2004/09/21

Ara.T.Howard wrote:

[#113227] Re: [ANN] - install.rb hack # 42 — Ara.T.Howard@... 2004/09/21

On Tue, 21 Sep 2004, Tim Hunter wrote:

[#113233] Re: [ANN] - install.rb hack # 42 — "trans. (T. Onoma)" <transami@...> 2004/09/21

On Monday 20 September 2004 08:54 pm, Ara.T.Howard@noaa.gov wrote:

[#113328] text analyzator — "martinus" <martin.ankerl@...>

I have created a little text analyzation tool, that tries to extract

16 messages 2004/09/21

[#113347] soap4r. I just dont get it. — nkb <nkb@...>

Hi.

15 messages 2004/09/22
[#113349] Re: soap4r. I just dont get it. — "NAKAMURA, Hiroshi" <nakahiro@...> 2004/09/22

Hi,

[#113407] Regexp Arity — "trans. (T. Onoma)" <transami@...>

Just ran into a need to know how many parenthetical groupings a Regexp has.

16 messages 2004/09/22
[#113410] Re: Regexp Arity — Yukihiro Matsumoto <matz@...> 2004/09/22

Hi,

[#113443] Newbie: Case statement — "Graham Foster" <graham@...>

As a newbie I'm confused about the Case construct. All the

14 messages 2004/09/22

[#113479] whitespace string only — Henrik Horneber <ryco@...>

Hi!

39 messages 2004/09/23

[#113533] Design Advice: Sub-Class 'Instances' — Gavin Kistner <gavin@...>

Summary

23 messages 2004/09/23

[#113615] The Solitaire Cipher (#1) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

26 messages 2004/09/24

[#113627] Ruby Code to HTML — James Edward Gray II <james@...>

I need to HTMLify some Ruby code. Before I go make some crude

22 messages 2004/09/24

[#113648] openssl examples and docs — "Ara.T.Howard" <Ara.T.Howard@...>

13 messages 2004/09/24

[#113697] Proc / def / yield semantics (long) — Markus <markus@...>

16 messages 2004/09/25

[#113750] local_method_missing possible — "trans. (T. Onoma)" <transami@...>

13 messages 2004/09/26
[#113752] Re: local_method_missing possible — Markus <markus@...> 2004/09/26

[#113754] Re: local_method_missing possible — "trans. (T. Onoma)" <transami@...> 2004/09/26

On Saturday 25 September 2004 10:42 pm, Markus wrote:

[#113803] RPM of Ruby 1.8.x — Matt Lawrence <matt@...>

I'm trying to find rpms for the latest released version of Ruby. After I

22 messages 2004/09/26

[#113885] {newb} Each statements — STEPHEN BECKER I V <Becker004@...>

Do each statements change the thing that they are using?

14 messages 2004/09/27

[#113888] Any YARV pre-questions in RubyConf2004? — SASADA Koichi <ko1@...>

Hi,

20 messages 2004/09/27
[#113897] Re: Any YARV pre-questions in RubyConf2004? — James Britt <jamesUNDERBARb@...> 2004/09/27

SASADA Koichi wrote:

[#113923] Best name for "this method" ? — "trans. (T. Onoma)" <transami@...>

Wondering what the conscensus is on the best name for "this method". Right now

67 messages 2004/09/27
[#113930] Re: Best name for "this method" ? — "David A. Black" <dblack@...> 2004/09/28

Hi --

[#113994] Re: Best name for "this method" ? — "Robert Klemme" <bob.news@...> 2004/09/28

[#114003] Re: Best name for "this method" ? — Gavin Sinclair <gsinclair@...> 2004/09/28

On Tuesday, September 28, 2004, 5:49:21 PM, Robert wrote:

[#114117] Re: Best name for "this method" ? — "trans. (T. Onoma)" <transami@...> 2004/09/28

On Tuesday 28 September 2004 05:44 am, Gavin Sinclair wrote:

[#114121] Re: Best name for "this method" ? — "David A. Black" <dblack@...> 2004/09/28

Hi --

[#113939] Re: Best name for "this method" ? — Florian Gross <flgr@...> 2004/09/28

trans. (T. Onoma) wrote:

[#113946] irb configure options — James Edward Gray II <james@...>

Where is a good source I can learn irb configuration options from?

15 messages 2004/09/28

[#113965] Wish list for 2.0 — STEPHEN BECKER I V <Becker004@...>

In ref to http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/31099

18 messages 2004/09/28
[#113968] Re: Wish list for 2.0 — Yukihiro Matsumoto <matz@...> 2004/09/28

Hi,

[#113971] Re: Wish list for 2.0 — STEPHEN BECKER I V <Becker004@...> 2004/09/28

does that work for end lines in the middle of a string? or a tab? I

[#113981] Re: Wish list for 2.0 — Yukihiro Matsumoto <matz@...> 2004/09/28

Hi,

[#113988] Re: Wish list for 2.0 — Gavin Sinclair <gsinclair@...> 2004/09/28

On Tuesday, September 28, 2004, 2:40:02 PM, Yukihiro wrote:

[#113976] RubyGarden Spam — James Britt <jamesUNDERBARb@...>

The rubygarden wiki has been over-run with spam links.

45 messages 2004/09/28
[#113980] Re: RubyGarden Spam — David Ross <drossruby@...> 2004/09/28

You should create a way to generate images with text

[#114135] Re: RubyGarden Spam — Patrick May <patrick@...> 2004/09/28

Hello,

[#115134] Re: RubyGarden Spam — Patrick May <patrick@...> 2004/10/06

Hello,

[#115183] Re: RubyGarden Spam — Chad Fowler <chadfowler@...> 2004/10/06

On Wed, 6 Oct 2004 11:53:55 +0900, Patrick May <patrick@hexane.org> wrote:

[#117646] RubyGarden Spam - One step to Solution — David Ross <dross@...> 2004/10/25

Here is one step of which many could be applied.

[#114152] Ruby gems crash on OpenBSD Sparc64 — Wes Moxam <wildwildwes@...>

Hi,

12 messages 2004/09/29

[#114197] ruby-dev summary 24298-24353 — SASADA Koichi <ko1@...>

Hi all,

29 messages 2004/09/29
[#114202] Re: ruby-dev summary 24298-24353 — "Robert Klemme" <bob.news@...> 2004/09/29

[#114436] Re: ruby-dev summary 24298-24353 — "trans. (T. Onoma)" <transami@...> 2004/09/30

> "SASADA Koichi" <ko1@atdot.net> schrieb im Newsbeitrag

[#114439] Re: ruby-dev summary 24298-24353 — Yukihiro Matsumoto <matz@...> 2004/10/01

Hi,

[#114443] Re: ruby-dev summary 24298-24353 — "trans. (T. Onoma)" <transami@...> 2004/10/01

On Thursday 30 September 2004 08:17 pm, Yukihiro Matsumoto wrote:

[#114229] Purely static build of Ruby — "rcoder@..." <rcoder@...>

I'm trying to find out whether it's possible to build a completely

13 messages 2004/09/29

[#114249] FXRuby help — Jamis Buck <jgb3@...>

Having some troubles getting FXRuby to work for me. Any script that I

14 messages 2004/09/29

[#114278] Too Many Ways? — Gavin Kistner <gavin@...>

At what point do you cross over from:

99 messages 2004/09/30
[#114286] Re: Too Many Ways? — "Robert Klemme" <bob.news@...> 2004/09/30

[#114298] Re: Too Many Ways? — "David A. Black" <dblack@...> 2004/09/30

Hi --

[#114314] Re: Too Many Ways? — Gavin Kistner <gavin@...> 2004/09/30

On Sep 30, 2004, at 4:04 AM, David A. Black wrote:

[#114319] Range syntax theory — Zach Dennis <zdennis@...> 2004/09/30

I have been thinking lately about rangess and I will give you the two

[#114333] Re: Range syntax theory — gabriele renzi <rff_rff@...> 2004/09/30

Zach Dennis ha scritto:

[#114408] Re: Too Many Ways? — Brian Candler <B.Candler@...> 2004/09/30

> "Duplicate names and techniques to do the same

[#114631] Re: Too Many Ways? — Bob Sidebotham <bob@...> 2004/10/02

Brian Candler wrote:

[#114648] Re: Too Many Ways? — Gavin Sinclair <gsinclair@...> 2004/10/03

On Sunday, October 3, 2004, 3:34:57 AM, Bob wrote:

[#114652] Re: Too Many Ways? — "trans. (T. Onoma)" <transami@...> 2004/10/03

On Saturday 02 October 2004 10:12 pm, Gavin Sinclair wrote:

[#114750] Re: Too Many Ways? — Brian Candler <B.Candler@...> 2004/10/04

On Sun, Oct 03, 2004 at 12:29:39PM +0900, trans. (T. Onoma) wrote:

[#114792] Re: Too Many Ways? — "trans. (T. Onoma)" <transami@...> 2004/10/04

On Monday 04 October 2004 04:06 am, Brian Candler wrote:

[#114797] Re: Too Many Ways? — Brian Candler <B.Candler@...> 2004/10/04

On Mon, Oct 04, 2004 at 11:08:42PM +0900, trans. (T. Onoma) wrote:

[#114798] Re: Too Many Ways? — Brian Candler <B.Candler@...> 2004/10/04

On Mon, Oct 04, 2004 at 11:37:09PM +0900, Brian Candler wrote:

[#114799] Re: Too Many Ways? — "trans. (T. Onoma)" <transami@...> 2004/10/04

On Monday 04 October 2004 10:42 am, Brian Candler wrote:

[#114289] Funtionality of 'case'-Expression — Ralf Mler <r_mueller@...>

Salve!

15 messages 2004/09/30
[#114292] Re: Funtionality of 'case'-Expression — "Robert Klemme" <bob.news@...> 2004/09/30

[#114387] Proc.new(method)? (was Re: Funtionality of 'case'-Expression) — Mark Hubbart <discordantus@...> 2004/09/30

On Thu, 30 Sep 2004 16:50:03 +0900, Robert Klemme <bob.news@gmx.net> wrote:

[#114362] Re: Range syntax theory — "Mills Thomas (app1tam)" <app1tam@...>

Okay, maybe we think of it this way. '..' is a club. '...' is a club, with

23 messages 2004/09/30
[#114366] Re: Range syntax theory — Zach Dennis <zdennis@...> 2004/09/30

This has been a very fun discussion. I'll shut up now unless anyone

[#114447] Re: Range syntax theory — "Gavin Sinclair" <gsinclair@...> 2004/10/01

Zach wrote:

[#114450] Re: Range syntax theory — Zach Dennis <zdennis@...> 2004/10/01

Gavin Sinclair wrote:

[#114460] Re: Range syntax theory — "Gavin Sinclair" <gsinclair@...> 2004/10/01

Zach wrote:

[#114381] The new Pickaxe II book is a reality! — "Warren Brown" <WBrown@...>

To everyone eagerly awaiting Dave's new book:

29 messages 2004/09/30
[#114384] Re: The new Pickaxe II book is a reality! — Dave Thomas <dave@...> 2004/09/30

[#114399] Re: The new Pickaxe II book is a reality! — Kevin McConnell <kevin_mcconnell@...> 2004/09/30

> as of today

[#114402] Re: The new Pickaxe II book is a reality! — Mike Clark <mike@...> 2004/09/30

Got mine in Colorado today. I *love* the lay-flat binding. And

[#114483] Re: The new Pickaxe II book is a reality! — Victor Reyes <victor.reyes@...> 2004/10/01

PLEASSSSSSSSSSSSSSSSSSSSSSSEEEEEEEEEEEE stop enjoying it so much. I am

[#114492] Re: The new Pickaxe II book is a reality! — Florian Weber <csshsh@...> 2004/10/01

[#114392] Calling super methods — Grzegorz Dostatni <grzegorz@...>

16 messages 2004/09/30
[#114406] Re: Calling super methods — Andrew Johnson <ajohnson@...> 2004/09/30

[#114407] Re: Calling super methods — Florian Frank <flori@...> 2004/09/30

On Thu, 2004-09-30 at 22:20, Andrew Johnson wrote:

[#114398] irb: a great tool in it's own right — ptkwt@... (Phil Tomson)

irb (and a little Ruby knowledge) is great for system tasks, especially on

15 messages 2004/09/30

Proc / def / yield semantics (long)

From: Markus <markus@...>
Date: 2004-09-25 04:58:51 UTC
List: ruby-talk #113697
ABSTRACT

     The semantics of Proc object calling was changed between 1.8.0 and
1.8.1 to resolve a disparity with the semantics of yield(); I feel this
was a mistake & would like to see the change reversed.  Specifically:

      * For 1.8.2 I would like to see the semantics revert to the way
        they were in 1.8.0; this leaves the disparity between yield and
        Proc#call, but does not break anything.

      * For 2.0 I would like the semantics to be homogenized, either by:

              * Changing yield (and assignment) to match the semantics
                of the rest of the language, 
        or
              * Making the behavior controllable by the user (on a case
                by case basis) so that people who want the new behavior
                can get it.


BACKGROUND

     Ruby supports parallel assignment and array expansion with
relatively clean semantics.  Arrays used as the last rvalue or the last
lvalue can be expanded by prefixing them with an "*"; the only
inconsistency come from the fact that: 

        This is not necessary if the rvalue is the only thing on the
        right hand side--the array will be expanded automatically.
        -- (Pickaxe I, page 77)

     This syntactic "shortcut" can lead to some decidedly unobvious
behavior.  For example, adding a rvalue to the right hand side of an
assignment statement can cause the class of any of the other lvalues to
change, but only under some conditions:

        x = [1]
        
        a,b = x 
        p a.class    #Fixnum
        
        a,b = x,4 
        p a.class    #Array
        
        x = "1"
        
        a,b = x 
        p a.class    #String
        
        a,b = x,4 
        p a.class    #String
        
     In 1.8.0, only assignment and yield, of the half dozen or so ways
to assign values to a collection of variables, special case single
rvalues which happen to be arrays this way.  (The code in listing one
can be used to test the behavior of the different version.)  

     In the case of assignment, the "feature" is of very slight utility,
since the same effect can be had (if desired) by prefixing the single
rvalue with an "*".

     Where it is must useful is in the case of yield, where it
facilitates constructs such as:

    my_hash.each { |key,value| ... }

which are widely used.

THE CHANGE

     A consequence of this is that using yield on a block has different
semantics than converting the block to a Proc and calling it (as noted
in http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-dev/21726):

        def foo
            yield([:key, :value])
            end
        foo {|k, v| p [k, v]}     #[:key, :value]
        
        def bar(&blk)
            blk.call([:key, :value])
            end
        bar {|k, v| p [k, v]}     #[[:key, :value], nil]
        

     I am somewhat hampered by my illiteracy (at best I can "read"
Japanese at a rate of 1 page a month or so, given sufficient reference
materials) and therefore I am guessing in what follows.

     There are two ways that the discrepancy could be resolved: either
the behavior of yield could be changed, or that of Proc#call.  If the
former path had been taken, we would have:


        def foo
            yield([:key, :value])
            end
        foo {|k, v| p [k, v]}     #[[:key, :value], nil]
        
        def bar(&blk)
            blk.call([:key, :value])
            end
        bar {|k, v| p [k, v]}     #[[:key, :value], nil]
        
and the prior behavior could have been reproduced (if desired) by writing:

        def foo
            yield(*[:key, :value])
            end
        foo {|k, v| p [k, v]}     #[:key, :value]
        
or more simply (in the example case at least):

        def foo
            yield(:key, :value)
            end
        foo {|k, v| p [k, v]}     #[:key, :value]
        
     (This is the choice I would have advocated had I been following the
debate.  But I wasn't and so I am making this 11th hour plea.)

     Instead, it was decided to change Proc.  This, I surmise, led to
some problems and a compromise appears to have been hammered out along
these lines (using the tags from the program in listing 1):

        inline:          special case single arrays
        inline (array):  no special casing
        def:             no special casing
        Proc.new:        special case single arrays
        proc:            no special casing
        My_proc.new:     special case single arrays
        my_proc:         special case single arrays
        yield:           special case single arrays
        
     Contrast this with the situation in 1.8.0:

        inline:          special case single arrays
        inline (array):  no special casing
        def:             no special casing
        Proc.new:        no special casing
        proc:            no special casing
        My_proc.new:     no special casing
        my_proc:         no special casing
        yield:           special case single arrays
        
and you will note that:

      * Kernel#proc is now almost but not quite a synonym for Proc.new

      * It does not appear to be possible to subclass Proc without
        getting the special case behavior

      * It does not appear to be possible to write "wrapper" Procs (a'la
        CLOS) that act like methods

      * It does not appear to be possible to define something that works
        like Kernel#proc

      * The potential for odd behavior noted in the background section
        has not gone away; instead, it has spread to many more contexts.

CONSEQUENCES

     There is a venerable pattern (dating back decades before we even
called them patterns) for dealing with sequences recursively by at each
stage treating the list as a pair: the first item and the rest of the
list.  (CAR/CDR)

     Up until 1.8.0 (and, I hope, in 1.8.2 on) it is easy to implement
this pattern in ruby.  For example:

        def tickle(head,*rest)
            head.giggle if head.respond_to? :giggle
            tickle(rest) if rest
            end

     This works, but breaks subtly under the new semantics if you try to
make it an object:

        tickeler = Proc.new { |head,*rest|
            head.giggle if head.respond_to? :giggle
            self.call(rest) if rest   
            }


     Another useful construct that is possible with the old semantics
but not with the new is before methods (borrowed from CLOS):

        $observers = {}
        class Module
            def before(method,&block)
                new_name = Symbol.unique(method)
                alias_method new_name, method
                block_name = Symbol.unique(method)
                $observers[block_name] = block
                module_eval %{
                    def #{method}(*args, &block)
                        $observers[:#{block_name}].
                            call(self,*args,&block)
                        #{new_name}(*args,&block)
                        end
                    }
                return [self, method, new_name, block_name]
                end
            end
        
with which we can write:

        class Animal
             def dinner(...)
                  :
                  end
             :
             end
        
        Animal.before :dinner do |animal,*args|
            :
            end
        
        
     Of course, this only works so long as the semantics of calling a
block are the same as the semantics of calling a method.  In other
words, it works fine under 1.8.0 but fails mysteriously under 1.8.1

     There are many such examples, but most of them are much harder to
abstract (or at least, harder to abstract concisely).  For example, the
Action pattern and its kin are much easier to implement if Procs and
methods don't have different special cases.


PROPOSED RESOLUTION

     I gather the deadline for 1.8.2 is looming.  Therefore, for 1.8.2,
I would propose going back to the 1.8.0 semantics.  This could be done
(I believe) by simply reversing the change made by Matz on 30 September
2003.  Anyone who wants the new behavior should be able to get it by the
judicious use of "*".

     For 2.0 (which, as I understand it, is not committed to 100%
backward compatibility), I would recommend one of the following:

      * If no one can devise a case in which it would not be possible to
        reproduce the special case behavior by prefixing single rvalues
        with an "*", I would recommend eliminating the special case
        altogether.  This would mean changing the semantics of yield and
        assignment slightly, through I would be surprised if there was
        much code at all (out side of iterators over structures such as
        hashes) that _wants_ the new behavior.

      * If there is some reason why yield and assignment need to keep
        the special case, I would like to see a flag added to the Proc
        object that determines its behavior.  Rather than having
        Kernal#proc return one type of Proc and Proc#new return a subtly
        different type of Proc, both should return the same thing and
        its behavior should be adjustable either at creation time (via a
        parameter to the creation method) or by sending a message to the
        object (Proc#expand_array_parameters=, or some such). 



     Thank you for taking time to read this; I'm sorry I wasn't alert
enough to offer it a year ago.  As always, I am more than willing to
help in whatever way is needed.

           -- Markus



LISTING 1

def show(h,r)
    print " head: #{h.inspect}, rest: #{r.inspect}    "
    end


#-----------------------------------------------
print "inline:          "
#head,*rest = 1,2,3   ; show(head,rest)
#head,*rest = [1],2,3 ; show(head,rest)
head,*rest = [1,2],3 ; show(head,rest)
head,*rest = [1,2,3] ; show(head,rest)
print "\n"

#-----------------------------------------------
print "inline (array):  "
#a = [1,2,3]   ; h,*r = *a; show(head,rest)
#a = [[1],2,3] ; h,*r = *a; show(head,rest)
a = [[1,2],3] ; h,*r = *a; show(head,rest)
a = [[1,2,3]]  ; h,*r = *a; show(head,rest)
print "\n"

#-----------------------------------------------
print "def:             "
def test1(head,*rest)
    show(head,rest)
    end
#test1(1,2,3)
#test1([1],2,3)
test1([1,2],3)
test1([1,2,3])
print "\n"

#-----------------------------------------------
print "Proc.new:        "
test2 = Proc.new { |head,*rest|
    show(head,rest)
    }
#test2.call(1,2,3)
#test2.call([1],2,3)
test2.call([1,2],3)
test2.call([1,2,3])
print "\n"

#-----------------------------------------------
print "proc:            "
test3 = proc { |head,*rest|
    show(head,rest)
    }
#test3.call(1,2,3)
#test3.call([1],2,3)
test3.call([1,2],3)
test3.call([1,2,3])
print "\n"

#-----------------------------------------------
print "My_proc.new:     "
class My_proc < Proc
    end
test4 = My_proc.new { |head,*rest|
    show(head,rest)
    }
#test4.call(1,2,3)
#test4.call([1],2,3)
test4.call([1,2],3)
test4.call([1,2,3])
print "\n"

#-----------------------------------------------
print "my_proc:         "
def my_proc(&b)
    b
    end
test5 = my_proc { |head,*rest|
    show(head,rest)
    }
#test5.call(1,2,3)
#test5.call([1],2,3)
test5.call([1,2],3)
test5.call([1,2,3])
print "\n"

#-----------------------------------------------
print "yield:           "
def test6
    #yield(1,2,3)
    #yield([1],2,3)
    yield([1,2],3)
    yield([1,2,3])
    end
test6 { |head,*rest|
    show(head,rest)
    }
print "\n"








In This Thread

Prev Next