[#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: Freezing Variable Assignment

From: Nicholas Van Weerdenburg <vanweerd@...>
Date: 2004-12-07 18:13:07 UTC
List: ruby-talk #122823
On Wed, 8 Dec 2004 01:06:53 +0900, Austin Ziegler <halostatue@gmail.com> wrote:
> 
> > I think immutability is usually a good thing from a design point
> > of view, so I can see a general need to have more freezing
> > options.
> 
> Why? Convince me, because as someone who has done my share of design
> work, I don't see immmutability as a positive on most things. On
> primary key references, yes (e.g., a customer's identification
> number should never change or be changed in any way), immutability
> is good. But as a general rule? Immutability isn't necessarily what
> you want.
> 
> (As a point of note, in my Ruby, I don't think that I've *ever* used
> #freeze. In the billing design work that I did, none of it depended
> upon immutability of the objects -- the only immutable things in my
> code and design were *constants*.)
> 
> The "need" for immutability is very, erm, mutable and can be worked
> around with various design decisions.
> 

I agree- good interface design effectively creates immutable classes
if desired. But that can be an issue because the object may only
desire immutability later in its lifecycle, or too certain clients.

Also, good design is an ideal case. In a large project, things can
become ugly and to be able to enforce a high-degree of control via
immutable objects can be beneficial, IMHO. Good design requires good
contracts to enforce it.

There are three things that make up an immutable object so far in our
discussion:
1. frozen objects
        -this could also be done with good interface design for
certain cases. other alternatives to freeze would be useful to know-
wrap/delegate, undeffing, etc.
2. frozen attributes (assignmentFreeze)
       -mostly appplies to inheritence, so private instance variables
would help here.
3. frozen value objects (referred to objects of a certain type)
       -not really discussed yet, but seems important as without it,
freeze is only slushy.

And of course the question, why do you need it.

It's hard to describe the benefits of immutables in a short example,
but I think it's similar in nature to global variables- with 
mutables, edits can be done in many places, leading to bugs as well as
maintenance issues.

That's why I mentioned singletons. They often raise the  desire for
immutables since they facilitate uncontrolled access and program flow-
if you can't get to something, you can't change it. With singletons,
there is often too much coupling, which makes the issue of mutability
more pronounced. It's too easy for isolated pieces of code to break
with appropriate responsibility and assume too much knowledge of the
domain object.

For instance, in an asset manager:
asset=AssetManager.getAsset("id=1")
asset.value="10"
Being embedded in gui code.

With the singleton, this kind of code can be sprinkled throughout the
code. Bad design, sure. But this is often an issue where there is
gui-app logic bindings in different dialogs, tables, etc.

Of course, a better domain class can help.

class Asset
  def initialize name, location,  value
    @name=name
    @location=location
    @value=value
  end
  attr_reader :name, :location, :value
end

This is essentially what I do with Java- creating interfaces that
present an immutable interface to the domain object. But that doesn't
work with duck typing. So in Ruby, it needs to be part of the class
interface, and the problem with that is that I may need to have more
write access to an object early in it's lifecycle. I suppose wrappers
or delegates are an option here, and that's not too hard to implement
in a nice way given Ruby's nature. Or even undefing methods. Any
suggestions welcome.

As a side note though, even with freezing,  the above business object
is not immutable...
a=Asset.new "laptop", "home", 500
a.location << " is where the heart is"   # regardless of a being frozen or not.

If an object should protect it's invariant nature, then it would be
nice for ruby to provide some capability for immutable value objects-
maybe something like:

value_reader :name, :location, :value    # returns defensive copies

Some on the concept of value objects vs. reference objects:
http://c2.com/cgi/wiki?ValueObject
http://c2.com/cgi/wiki?ValueObjectsShouldBeImmutable

> 
> You assert the value of immutability, but you haven't actually
> demonstrated the value. I'm really not trying to be difficult here,
> but what sort of immutability to you mean in Java -- and why do you
> then need it in Ruby? I find that most of the time when people say
> that they want particular features in Ruby they do so because
> they're not *thinking* in Ruby, but in other languages that they
> have to deal with on a daily basis to pay the bills. I know I do it,
> from time to time, with C++ now that I'm making my money from that.
> 

I'm still learning to "think" in Ruby for sure, but the essence of the
need comes from non-trivial systems without a perfect design.

Removing singletons and making certain domain objects immutable is
somewhat like putting aspects of the "Law of Demeter" into place.
http://c2.com/cgi/wiki?LawOfDemeter

Another way of thinking about is in terms of object lifecycle- if it
becomes immutable at some point, there is less to worry about.  In a
large system, I would freeze and object just prior to releasing into
the "wild"- e.g. outside the boundaries of my subsystem.

> > And is there anyway to may attributes private so that subclasses
> > can't see them? IIRC, this is possible feature of Rite. This would
> > remove some of the need, since immutability is enforced by
> > invisibility.
> 
> Um. What do you mean by "attributes"? If you mean that which is
> generated by attr_accessor, then:
> 
>    class A
>      attr_accessor :foo
>      private :foo, :foo=
>    end                     # => A
>    class B < A; end        # => nil
>    B.new.foo = :bar
>       # => NoMethodError: private method `foo=' called for
>       # #<B:0x2b52c38>
>

I meant the case where the instance variable @foo is accessed in side
the class B.
 
> If you mean instance variables, no, and that wouldn't work anyway --
> it would simply be a source of errors.
> 
>    class A
>       attr_accessor  :foo
>       private_var    :@foo
>    end
> 

private_var is a concept?

>
>    class B < A
>       def foo=(x)
>          @foo = x
>       end
>    end
> 
> Logically, this shouldn't cause a problem, because even if @foo in A
> is private, then B should still be able to have it's own @foo.
> 
> Maybe there's a way around this -- and this could be potentially
> very useful -- with something like:
> 
>    module A
>       def foo=(x)
>          @<foo> = x
>       end
>    end
> 
> If Ruby mangles @<foo> to be something like @__A_foo__, then you can
> refer to @<foo> safely in a module without worrying about bumping
> into instance variables belonging to the class.
> 
> > BTW- Is freezing bindings simply a delayed constant? Or is there
> > more to it?
> 
> I don't know what itsme really wants, because I think that the idea
> of making variable bindings -- instance or otherwise -- frozen is a
> bad idea. Freezing an object freezes that object's state -- which
> includes assignment to instance variables, certainly, but also
> inclues adding singleton methods, modifying the singleton object,
> extending the object, etc.
> 

I think private variables would alleviate much of the need. That would
allow a better contract for inheritence,  and that was largely the
interest in my first post.

Other issues requiring freezing probably point to an interface that
exposes too many internals - e.g. use of attr_accessor or a class that
has too much responsibility or is simply too big. There is still the
issue of value objects. Any thoughts on that?

http://c2.com/cgi/wiki?ValueObject
http://c2.com/cgi/wiki?ValueObjectsShouldBeImmutable

> > Also, is there anything such as a deep freeze of an object graph?
> > I'm guessing not, since that would something hard to generalize
> > easily (I think of all the Java serializatoin performance problems
> > where it turned out that the data was pulling the application
> > code along with it).
> 
> No, there isn't such built into Ruby. You could write one, but I
> don't think it's a good idea.
>

Agreed- unless needed for a particular case.
 
Regards,
Nick

In This Thread