[#271943] Ruby vs. PHP — Marcin Raczkowski <mailing.mr@...>

Hello

63 messages 2007/10/01
[#271948] Re: Ruby vs. PHP — "Richard Conroy" <richard.conroy@...> 2007/10/01

On 10/1/07, Marcin Raczkowski <mailing.mr@gmail.com> wrote:

[#272001] Re: Ruby vs. PHP — Marcin Raczkowski <mailing.mr@...> 2007/10/01

Richard Conroy wrote:

[#272003] Re: Ruby vs. PHP — Marc Heiler <shevegen@...> 2007/10/01

Finally a topic I like :)

[#271996] Reference vs. Reference — "Robert Klemme" <shortcutter@...>

I feel there is a subtle point that needs clarification.

27 messages 2007/10/01
[#272607] Re: Reference vs. Reference — Paul Brannan <pbrannan@...> 2007/10/04

On Tue, Oct 02, 2007 at 12:29:37AM +0900, Robert Klemme wrote:

[#272138] a = b = c order of evaluation weird — SpringFlowers AutumnMoon <summercoolness@...>

i thought if it is

25 messages 2007/10/02
[#272140] Re: a = b = c order of evaluation weird — 7stud -- <dolgun@...> 2007/10/02

SpringFlowers AutumnMoon wrote:

[#272141] Re: a = b = c order of evaluation weird — 7stud -- <dolgun@...> 2007/10/02

7stud -- wrote:

[#272329] Searching through a sorted array — FireAphis <FireAphis@...>

Hello,

16 messages 2007/10/03

[#272427] Non-blocking 'gets' ? — Stephen Ware <sgware@...>

Hi guys, sorry if this is a stupid question, but I've been reading

27 messages 2007/10/03
[#272458] Re: Non-blocking 'gets' ? — 7stud -- <dolgun@...> 2007/10/03

Stephen Ware wrote:

[#272496] opinion on a simple method — Lloyd Linklater <lloyd@2live4.com>

I am trying to find the better way to do things ruby style. I needed to

15 messages 2007/10/04

[#272529] cygwin's Ruby (was: Re: Whats going on!?!?) — "Robert Klemme" <shortcutter@...>

2007/10/2, Phlip <phlip2005@gmail.com>:

20 messages 2007/10/04
[#272552] Re: cygwin's Ruby — Jay Levitt <jay+news@...> 2007/10/04

On Thu, 4 Oct 2007 18:15:36 +0900, Robert Klemme wrote:

[#272581] Re: cygwin's Ruby — "Garry Offord" <droffo@...> 2007/10/04

It's good to know that somebody has successfully done this. I've tried in

[#272589] Re: cygwin's Ruby — "M. Edward (Ed) Borasky" <znmeb@...> 2007/10/04

Garry Offord wrote:

[#272740] Itinerary for a Traveling Salesman (#142) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

20 messages 2007/10/05

[#272803] The Case for Multiple-Inheritance — Trans <transfire@...>

So I working on little lib that's ripe for an adapter pattern, when I

71 messages 2007/10/05
[#272918] Re: The Case for Multiple-Inheritance — MenTaLguY <mental@...> 2007/10/06

On Sat, 2007-10-06 at 19:17 +0900, Sylvain Joyeux wrote:

[#272924] Re: The Case for Multiple-Inheritance — Sylvain Joyeux <sylvain.joyeux@...> 2007/10/06

On Saturday 06 October 2007, MenTaLguY wrote:

[#272928] Re: The Case for Multiple-Inheritance — James Edward Gray II <james@...> 2007/10/06

On Oct 6, 2007, at 3:55 PM, Sylvain Joyeux wrote:

[#272979] Re: The Case for Multiple-Inheritance — Sylvain Joyeux <sylvain.joyeux@...> 2007/10/07

> Delegation does not mean duck typing. You are confusing your

[#273018] Re: The Case for Multiple-Inheritance — "Austin Ziegler" <halostatue@...> 2007/10/07

On 10/6/07, Trans <transfire@gmail.com> wrote:

[#273030] Re: The Case for Multiple-Inheritance — Trans <transfire@...> 2007/10/07

[#273120] Re: The Case for Multiple-Inheritance — "Austin Ziegler" <halostatue@...> 2007/10/08

On 10/7/07, Trans <transfire@gmail.com> wrote:

[#273132] Re: The Case for Multiple-Inheritance — Trans <transfire@...> 2007/10/08

[#273185] Re: The Case for Multiple-Inheritance — "Austin Ziegler" <halostatue@...> 2007/10/08

On 10/8/07, Trans <transfire@gmail.com> wrote:

[#272894] Can I do this perl code the same in ruby? — kazaam <kazaam@...>

Well I'm trying to "translate" a perl program to ruby and everything worked fine until the near end where I'm now. There we have this perl code:

14 messages 2007/10/06

[#272904] Ternary Usage — Greg Willits <lists@...>

New to Ruby. Having trouble with ternary statements.

13 messages 2007/10/06

[#272952] The old File.rename not working again. . . . — Peter Bailey <pbailey@...>

This always throws me. I keep getting "permission denied" messages when

24 messages 2007/10/07

[#272954] Hiding source code — |MKSM| <mksm.sama@...>

Hello.

17 messages 2007/10/07

[#272982] #sort_by and #sort_obj — Eric Hodel <drbrain@...7.net>

I haven't seen this technique in the wild before.

18 messages 2007/10/07

[#273052] Obfuscator for Ruby/RoR — "Igor K." <testmyeclipse@...>

Hello,

35 messages 2007/10/07
[#273270] Re: Obfuscator for Ruby/RoR — Ryan Davis <ryand-ruby@...> 2007/10/08

[#273308] Re: Obfuscator for Ruby/RoR — John Joyce <dangerwillrobinsondanger@...> 2007/10/09

[#273382] Re: Obfuscator for Ruby/RoR — mortee <mortee.lists@...> 2007/10/09

John Joyce wrote:

[#273403] Re: Obfuscator for Ruby/RoR — Eric Hodel <drbrain@...7.net> 2007/10/09

On Oct 9, 2007, at 09:22 , mortee wrote:

[#273057] considering writing a book on Ruby/Rails? — "Eric H." <REMOVE-CAPSburnFORout@...>

If anyone here is considering writing a book on Ruby or Rails I'd like

41 messages 2007/10/07
[#273063] Re: considering writing a book on Ruby/Rails? — "Phlip" <phlip2005@...> 2007/10/07

> I hate to gripe but as of today I'm at Ruby/Rails book number 7 and it

[#273069] Re: considering writing a book on Ruby/Rails? — John Joyce <dangerwillrobinsondanger@...> 2007/10/07

[#273079] Re: considering writing a book on Ruby/Rails? — "M. Edward (Ed) Borasky" <znmeb@...> 2007/10/07

John Joyce wrote:

[#273109] Translation Service — James Edward Gray II <james@...>

Sorry for being off topic, but I know so many of you know more

16 messages 2007/10/08

[#273152] Bug: Numeric#divmod calculates wrongly — "Dirk Traulsen" <dirk.traulsen@...>

Hi all!

13 messages 2007/10/08
[#274036] Re: Bug: Numeric#divmod calculates wrongly — "Dirk Traulsen" <dirk.traulsen@...> 2007/10/14

Am 8 Oct 2007 um 19:49 hat Dirk Traulsen geschrieben:

[#273154] MATRIX PROBLEMS (AGAIN!) — "John Nott" <JNott@...>

Hi everyone,=20

15 messages 2007/10/08
[#273172] Re: MATRIX PROBLEMS (AGAIN!) — 7stud -- <dolgun@...> 2007/10/08

John Nott wrote:

[#273175] Re: MATRIX PROBLEMS (AGAIN!) — 7stud -- <dolgun@...> 2007/10/08

7stud -- wrote:

[#273158] regexp question - look for parentheses then remove them — Max Williams <toastkid.williams@...>

I'm struggling with a regular expression problem, can anyone help?

12 messages 2007/10/08
[#273160] Re: regexp question - look for parentheses then remove them — "Jes俍 Gabriel y Gal疣" <jgabrielygalan@...> 2007/10/08

On 10/8/07, Max Williams <toastkid.williams@gmail.com> wrote:

[#273265] parts of speech in Ruby — Chad Perrin <perrin@...>

I'm curious -- exactly what class of syntactic element is `=` in Ruby,

13 messages 2007/10/08

[#273305] The Open-Closed-from-a-certain-angle Principle — Jay Levitt <jay+news@...>

Let me start off by saying that I'm SURE this is either a bad idea,

17 messages 2007/10/09

[#273423] Finding shared elements between to arrays. — Sebastian probst Eide <sebastian.probst.eide@...>

Hi

14 messages 2007/10/09

[#273453] will #in? be in ruby2? (was Re: Finding shared elements between to arrays.) — Pe, Botp <botp@...>

Eric wrote:

14 messages 2007/10/10
[#273460] Re: will #in? be in ruby2? (was Re: Finding shared elements between to arrays.) — "Devi Web Development" <devi.webmaster@...> 2007/10/10

T24gMTAvOS8wNywgUGXDsWEsIEJvdHAgPGJvdHBAZGVsbW9udGUtcGhpbC5jb20+IHdyb3RlOgo+

[#273466] Re: will #in? be in ruby2? (was Re: Finding shared elements between to arrays.) — Peña, Botp <botp@...> 2007/10/10

RnJvbTogRGV2aSBXZWIgRGV2ZWxvcG1lbnQgW21haWx0bzpkZXZpLndlYm1hc3RlckBnbWFpbC5j

[#273481] Inter-Process Messaging — Daniel DeLorme <dan-ml@...42.com>

What are the possibilities in ruby for passing information from one

32 messages 2007/10/10
[#273566] Re: Inter-Process Messaging — Joel VanderWerf <vjoel@...> 2007/10/10

Daniel DeLorme wrote:

[#273556] RubyGems Installation Problem on Solaris 10 — cratervoid@...

I've installed Ruby 1.8.6 on a Solaris 10 server without a problem.

10 messages 2007/10/10

[#273575] what does print call internally? — "Martin DeMello" <martindemello@...>

irb(main):001:0> puts nil

14 messages 2007/10/10
[#273584] Re: what does print call internally? — Eric Hodel <drbrain@...7.net> 2007/10/11

On Oct 10, 2007, at 15:31 , Martin DeMello wrote:

[#273612] Why does this use a block — "Anonymous" <jaimrk@...>

So I'm new to Ruby and I'm trying to use OptionParser to parse in some

13 messages 2007/10/11

[#273630] Should *most* memory be release back to the system? — Blackie <mudsweatandears@...>

If anyone can explain this I would appreciate it.

50 messages 2007/10/11
[#273638] Re: Should *most* memory be release back to the system? — Yohanes Santoso <ysantoso-rubytalk@...> 2007/10/11

Blackie <mudsweatandears@gmail.com> writes:

[#273655] Re: Should *most* memory be release back to the system? — "ara.t.howard" <ara.t.howard@...> 2007/10/11

[#274671] Re: [OT] Re: Should *most* memory be release back to the system? — Yohanes Santoso <ysantoso-rubytalk@...> 2007/10/18

"ara.t.howard" <ara.t.howard@gmail.com> writes:

[#274699] Re: [OT] Re: Should *most* memory be release back to the system? — "M. Edward (Ed) Borasky" <znmeb@...> 2007/10/18

Yohanes Santoso wrote:

[#274705] Re: [OT] Re: Should *most* memory be release back to the system? — Yohanes Santoso <ysantoso-rubytalk@...> 2007/10/18

"M. Edward (Ed) Borasky" <znmeb@cesmail.net> writes:

[#274709] Re: [OT] Re: Should *most* memory be release back to the system? — "ara.t.howard" <ara.t.howard@...> 2007/10/18

[#274761] Re: [OT] Re: Should *most* memory be release back to the system? — "M. Edward (Ed) Borasky" <znmeb@...> 2007/10/19

ara.t.howard wrote:

[#274810] Re: [OT] Re: Should *most* memory be release back to the system? — khaines@... 2007/10/19

On Fri, 19 Oct 2007, M. Edward (Ed) Borasky wrote:

[#274826] Re: [OT] Re: Should *most* memory be release back to the system? — "M. Edward (Ed) Borasky" <znmeb@...> 2007/10/19

khaines@enigo.com wrote:

[#274884] Re: [OT] Re: Should *most* memory be release back to the system? — "Michal Suchanek" <hramrach@...> 2007/10/19

On 19/10/2007, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:

[#274942] Why don't we have "C" machines? (was Re: [OT] Re: Should *most* memory be release back to the system?) — "M. Edward (Ed) Borasky" <znmeb@...> 2007/10/20

Michal Suchanek wrote:

[#275118] Re: Why don't we have "C" machines? (was Re: [OT] Re: Should *most* memory be release back to the system?) — "Michal Suchanek" <hramrach@...> 2007/10/21

On 20/10/2007, M. Edward (Ed) Borasky <znmeb@cesmail.net> wrote:

[#275170] Re: Why don't we have "C" machines? (was Re: [OT] Re: Should *most* memory be release back to the system?) — "Martin DeMello" <martindemello@...> 2007/10/22

On 10/21/07, Michal Suchanek <hramrach@centrum.cz> wrote:

[#275223] Re: Why don't we have "C" machines? (was Re: [OT] Re: Should *most* memory be release back to the system?) — "M. Edward (Ed) Borasky" <znmeb@...> 2007/10/22

Martin DeMello wrote:

[#275227] Re: Why don't we have "C" machines? (was Re: [OT] Re: Should *most* memory be release back to the system?) — Xavier Noria <fxn@...> 2007/10/22

On Oct 22, 2007, at 4:23 PM, M. Edward (Ed) Borasky wrote:

[#273707] How to delete specific characters from a string? — Bazsl <hs@...>

Is there really no method that allows me to delete N characters starting

13 messages 2007/10/11

[#273718] range max — Marek Kasperkiewicz <m.kasperkiewicz@...>

If i try this

31 messages 2007/10/12
[#273727] Re: range max — Brian Adkins <lojicdotcom@...> 2007/10/12

On Oct 11, 9:30 pm, Marek Kasperkiewicz <m.kasperkiew...@gmail.com>

[#273800] Re: range max — Yossef Mendelssohn <ymendel@...> 2007/10/12

On Oct 11, 9:55 pm, Brian Adkins <lojicdot...@gmail.com> wrote:

[#273823] Re: range max — Brian Adkins <lojicdotcom@...> 2007/10/12

On Oct 12, 8:56 am, Yossef Mendelssohn <ymen...@pobox.com> wrote:

[#273755] Syntax error when redefining >> operator to take a block — John Woods <jqwoods@...>

I'm trying to redefine the >> operator for a particular class such that

9 messages 2007/10/12

[#273828] ANN: English 0.1 — Trans <transfire@...>

English 0.1

17 messages 2007/10/12

[#273887] Is there a standard pattern for threaded access to a file? — Jon Handler <jhandler@...>

I'm pretty new to ruby and this is one of those areas where I can't

37 messages 2007/10/12
[#273891] Re: Is there a standard pattern for threaded access to a file? — "ara.t.howard" <ara.t.howard@...> 2007/10/13

[#273896] Re: Is there a standard pattern for threaded access to a file? — 7stud -- <bbxx789_05ss@...> 2007/10/13

ara.t.howard wrote:

[#273940] Re: Is there a standard pattern for threaded access to a file? — "Francis Cianfrocca" <garbagecat10@...> 2007/10/13

On 10/12/07, Jon Handler <jhandler@shopping.com> wrote:

[#273955] Re: Is there a standard pattern for threaded access to a file? — Eric Hodel <drbrain@...7.net> 2007/10/13

On Oct 13, 2007, at 07:29 , Francis Cianfrocca wrote:

[#273974] Re: Is there a standard pattern for threaded access to a file? — Brian Adkins <lojicdotcom@...> 2007/10/13

On Oct 13, 1:32 pm, Eric Hodel <drbr...@segment7.net> wrote:

[#273919] RubyGems Beta 0.9.4.5 — Eric Hodel <drbrain@...7.net>

RubyGems 0.9.4.5 is a beta release for the upcoming 0.9.5 which adds

13 messages 2007/10/13

[#273980] top 10 last played mp3's — Robin Wagenaar <robin87_msn@...>

Hello everyone,

18 messages 2007/10/13
[#273983] Re: top 10 last played mp3's — "Andreas S." <x-ruby-forum.com@...> 2007/10/13

Robin Wagenaar wrote:

[#273995] Re: top 10 last played mp3's — Konrad Meyer <konrad@...> 2007/10/13

Quoth Andreas S.:

[#273984] write_noblock is blocking? — Christoffer Lern<lerno@...>

Anyone know what's up with TCPSocket#write_noblock actually blocking

15 messages 2007/10/13

[#274031] Mac OS X Tiger comes with Tk? — SpringFlowers AutumnMoon <summercoolness@...>

I thought it is said that Mac OS X Tiger comes with Tk?

23 messages 2007/10/14
[#274032] Re: Mac OS X Tiger comes with Tk? — Ben Bleything <ben@...> 2007/10/14

On Sun, Oct 14, 2007, SpringFlowers AutumnMoon wrote:

[#274062] MIT vs. Ruby/GPL License — Trans <transfire@...>

Rails uses the MIT license. The Ruby license is essentially the GPL

46 messages 2007/10/14
[#274075] Re: MIT vs. Ruby/GPL License — Randy Kramer <rhkramer@...> 2007/10/14

On Sunday 14 October 2007 09:31 am, Trans wrote:

[#274080] Re: MIT vs. Ruby/GPL License — Trans <transfire@...> 2007/10/14

[#274093] Re: MIT vs. Ruby/GPL License — "Terry Poulin" <bigboss64@...> 2007/10/14

I don't think the difference between MIT and GPL License has much purpose in

[#274098] Re: MIT vs. Ruby/GPL License — Trans <transfire@...> 2007/10/14

[#274066] Parameter in a block is not local? — SpringFlowers AutumnMoon <summercoolness@...>

I thought a iterator with a block is like an nameless function call...

21 messages 2007/10/14

[#274120] nil.to_i returning zero — "Gerardo Santana Gez Garrido" <gerardo.santana@...>

zero in Ruby is true, not false, in a boolean context.

38 messages 2007/10/14
[#274289] Re: nil.to_i returning zero — "Gerardo Santana Gez Garrido" <gerardo.santana@...> 2007/10/15

John Joyce wrote:

[#274227] Re: [ANN] RubyTraits 0.1 — Yukihiro Matsumoto <matz@...>

Hi,

22 messages 2007/10/15
[#274239] Re: RubyTraits 0.1 — Trans <transfire@...> 2007/10/15

[#274242] Re: RubyTraits 0.1 — Yukihiro Matsumoto <matz@...> 2007/10/15

Hi,

[#274244] Re: RubyTraits 0.1 — Trans <transfire@...> 2007/10/15

[#274236] ruby wish-list — Roger Pack <rogerpack2005@...>

My personal ruby wish-list (for any feedback):

177 messages 2007/10/15
[#274243] Re: ruby wish-list — Yukihiro Matsumoto <matz@...> 2007/10/15

Hi,

[#274245] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2007/10/15

Thanks Matz.

[#274263] Re: ruby wish-list — Robert Klemme <shortcutter@...> 2007/10/15

On 15.10.2007 17:24, Roger Pack wrote:

[#274264] Re: ruby wish-list — Robert Klemme <shortcutter@...> 2007/10/15

On 15.10.2007 18:45, Robert Klemme wrote:

[#274271] Re: ruby wish-list — James Tucker <jftucker@...> 2007/10/15

I don't really see the reason why the GC would need or want a specific thread to itself - for a start, such a design makes the system slower on low end systems. There may also be cases where it is possible to choose 'optimal' times to run the GC within a single thread context.

[#274282] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2007/10/15

So you'd prefer a few tweaks:

[#274721] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2007/10/18

GC wish list:

[#274898] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2007/10/19

Roger Pack wrote:

[#274910] Re: ruby wish-list — Suraj Kurapati <snk@...> 2007/10/19

Oh, wishing star! Here are my wishes:

[#277588] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2007/11/05

Suraj Kurapati wrote:

[#277760] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2007/11/06

> Take care.

[#277902] Re: ruby wish-list — "Rick DeNatale" <rick.denatale@...> 2007/11/07

On 11/6/07, Roger Pack <rogerpack2005@gmail.com> wrote:

[#278435] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2007/11/11

>> I wish... that Range.to_a wouldn't become obselete, as it seems quite useful

[#278460] Re: ruby wish-list — "Rick DeNatale" <rick.denatale@...> 2007/11/11

On Nov 11, 2007 1:13 AM, Roger Pack <rogerpack2005@gmail.com> wrote:

[#278461] Re: ruby wish-list — Marc Heiler <shevegen@...> 2007/11/11

"unless you wanted to introduce ';'s to ruby too:"

[#279154] Re: ruby wish-list — Suraj Kurapati <snk@...> 2007/11/15

Marc Heiler wrote:

[#279174] Re: ruby wish-list — "Todd Benson" <caduceass@...> 2007/11/15

On Nov 15, 2007 11:48 AM, Suraj Kurapati <snk@gna.org> wrote:

[#279181] Re: ruby wish-list — Suraj Kurapati <snk@...> 2007/11/15

Todd Benson wrote:

[#279189] Re: ruby wish-list — James Britt <james.britt@...> 2007/11/15

Suraj Kurapati wrote:

[#279197] Re: ruby wish-list — "Rick DeNatale" <rick.denatale@...> 2007/11/15

On Nov 15, 2007 5:30 PM, James Britt <james.britt@gmail.com> wrote:

[#279203] Re: ruby wish-list — "Todd Benson" <caduceass@...> 2007/11/16

On Nov 15, 2007 5:28 PM, Rick DeNatale <rick.denatale@gmail.com> wrote:

[#279213] Re: ruby wish-list — James Britt <james.britt@...> 2007/11/16

Todd Benson wrote:

[#279226] Re: ruby wish-list — Suraj Kurapati <snk@...> 2007/11/16

James Britt wrote:

[#279232] Re: ruby wish-list — James Britt <james.britt@...> 2007/11/16

Suraj Kurapati wrote:

[#279318] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2007/11/16

> I'm arguing that methods that end in "?" should be designed and used as

[#279348] Re: ruby wish-list — "Todd Benson" <caduceass@...> 2007/11/16

On Nov 16, 2007 9:26 AM, Roger Pack <rogerpack2005@gmail.com> wrote:

[#281415] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2007/11/30

My latest wish for the wishing tree...

[#281422] Re: ruby wish-list — Trans <transfire@...> 2007/11/30

[#281423] Re: ruby wish-list — "Paul McMahon" <pm@...> 2007/11/30

On Fri, 30 Nov 2007 12:06:18 +0900, Trans <transfire@gmail.com> wrote:

[#281427] Re: ruby wish-list — Trans <transfire@...> 2007/11/30

[#286855] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/01/09

My biggest wish list currently is...I wish I didn't have to use # within

[#286856] Re: ruby wish-list — "Alex LeDonne" <aledonne.listmail@...> 2008/01/09

On Jan 9, 2008 2:37 PM, Roger Pack <rogerpack2005@gmail.com> wrote:

[#288183] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/01/21

[#288228] Re: ruby wish-list — "Robert Klemme" <shortcutter@...> 2008/01/22

2008/1/21, Roger Pack <rogerpack2005@gmail.com>:

[#288267] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/01/22

Robert Klemme wrote:

[#289182] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/01/30

I know this is controversial, but I wish that if you did

[#289229] Re: ruby wish-list — Chad Perrin <perrin@...> 2008/01/30

On Thu, Jan 31, 2008 at 04:34:49AM +0900, Roger Pack wrote:

[#309521] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/07/29

> Now you know you can.

[#295325] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/03/21

Roger Pack wrote:

[#295469] Re: ruby wish-list — Nobuyoshi Nakada <nobu@...> 2008/03/24

Hi,

[#296028] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/03/27

Next wish :)

[#296030] Re: ruby wish-list — "Thomas Wieczorek" <wieczo.yo@...> 2008/03/27

On Fri, Mar 28, 2008 at 12:21 AM, Roger Pack <rogerpack2005@gmail.com> wrote:

[#296031] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/03/27

> You want to create a two-dimensional array, right?

[#296035] Re: ruby wish-list — Tim Hunter <TimHunter@...> 2008/03/27

Roger Pack wrote:

[#296067] Re: ruby wish-list — Damjan Rems <d_rems@...> 2008/03/28

[#296083] Re: ruby wish-list — "Thomas Wieczorek" <wieczo.yo@...> 2008/03/28

On Fri, Mar 28, 2008 at 8:34 AM, Damjan Rems <d_rems@yahoo.com> wrote:

[#296810] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/04/02

> Ruby 1.9 supports named parameters, but I don't know anything about

[#296813] Re: ruby wish-list — Gary Wright <gwtmp01@...> 2008/04/02

[#296815] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/04/02

Gary Wright wrote:

[#296854] Re: ruby wish-list — Chad Perrin <perrin@...> 2008/04/02

On Thu, Apr 03, 2008 at 02:06:21AM +0900, Roger Pack wrote:

[#306230] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/06/25

[#298009] Re: ruby wish-list — Chris Shea <cmshea@...> 2008/04/12

On Apr 12, 10:49 am, Roger Pack <rogerpack2...@gmail.com> wrote:

[#298058] Re: ruby wish-list — Robert Klemme <shortcutter@...> 2008/04/13

On 12.04.2008 20:40, Chris Shea wrote:

[#298237] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/04/15

[#299044] Re: ruby wish-list — Roger Pack <roger@...> 2008/04/21

I wish this worked :)

[#299045] Re: ruby wish-list — "Robert Klemme" <shortcutter@...> 2008/04/21

2008/4/21, Roger Pack <roger@doachristianturndaily.info>:

[#299933] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/04/29

Robert Klemme wrote:

[#301521] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/05/12

All right ruby-genie. My next wish!

[#302766] Re: ruby wish-list — Roger Pack <rogerpack2005@...> 2008/05/23

Back to the wishing well...

[#274338] A Ruby/Rails bibliography — "Jeremy McAnally" <jeremymcanally@...>

Howdy all,

13 messages 2007/10/15

[#274374] equal? versus eql? versus == versus === verus <=> — Paul Butcher <paul@...>

I recently found myself explaining to a friend how Ruby's various

13 messages 2007/10/16

[#274400] How to remove "~" in those files — Vidya Vidya <vidhu1232001@...>

14 messages 2007/10/16

[#274426] Struct is slow — Wayne Magor <wemagor2@...>

I have a script in which I was using a 2-element array where a struct

20 messages 2007/10/16
[#274430] Re: Struct is slow — Alex Fenton <aff28@...> 2007/10/16

Wayne Magor wrote:

[#274460] Compound conditionals in case when statements? Syntax? — Randy Kramer <rhkramer@...>

I need (or want ;-) to do something like the following:

12 messages 2007/10/16

[#274461] recommendations for working with PostgreSQL — Chad Perrin <perrin@...>

I have need to work with PostgreSQL via Ruby. What gems/modules do you

13 messages 2007/10/16

[#274470] Mind giving a little help? — Tj Superfly <nonstickglue@...>

Hello everyone! I posted a topic a few days go and got an answer, and I

13 messages 2007/10/16
[#274475] Re: Mind giving a little help? — Ben Giddings <bg-rubytalk@...> 2007/10/17

On Oct 16, 2007, at 19:56, Tj Superfly wrote:

[#274561] rocaml 0.6.0: fast, easy Ruby extensions in Objective Caml — Mauricio Fernandez <mfp@...>

16 messages 2007/10/17
[#274604] Re: rocaml 0.6.0: fast, easy Ruby extensions in Objective Caml — Daniel Berger <djberg96@...> 2007/10/17

[#274611] Re: rocaml 0.6.0: fast, easy Ruby extensions in Objective Caml — Daniel Berger <djberg96@...> 2007/10/17

[#274619] Re: rocaml 0.6.0: fast, easy Ruby extensions in Objective Caml — Mauricio Fernandez <mfp@...> 2007/10/17

On Thu, Oct 18, 2007 at 04:48:13AM +0900, Daniel Berger wrote:

[#274571] extracting values from consecutive lines — baptiste Augui<ba208@...>

16 messages 2007/10/17

[#274615] Class instance variable idiom — Perry Smith <pedz@...>

I am using this technique for class instance variables:

27 messages 2007/10/17
[#274650] Re: Class instance variable idiom — Brian Adkins <lojicdotcom@...> 2007/10/18

On Oct 17, 4:10 pm, Perry Smith <p...@easesoftware.com> wrote:

[#274661] Re: Class instance variable idiom — "Robert Klemme" <shortcutter@...> 2007/10/18

2007/10/18, Brian Adkins <lojicdotcom@gmail.com>:

[#274708] Re: Class instance variable idiom — Brian Adkins <lojicdotcom@...> 2007/10/18

On Oct 18, 2:44 am, "Robert Klemme" <shortcut...@googlemail.com>

[#274717] Re: Class instance variable idiom — "David A. Black" <dblack@...> 2007/10/18

Hi --

[#274770] Re: Class instance variable idiom — "ara.t.howard" <ara.t.howard@...> 2007/10/19

[#274646] combinations listing — Michael Linfield <globyy3000@...>

Making an form of an anagram solver. My approach would be the code

20 messages 2007/10/18
[#274706] Re: combinations listing — mortee <mortee.lists@...> 2007/10/18

Others have already shown you how you can generate all permutations of a

[#274769] Re: combinations listing — Peña, Botp <botp@...> 2007/10/19

RnJvbTogbW9ydGVlIFttYWlsdG86bW9ydGVlLmxpc3RzQGthdmVtYWxuYS5odV0gDQojIEhvd2V2

[#274774] Re: combinations listing — Michael Linfield <globyy3000@...> 2007/10/19

Thanks all ----

[#274840] Re: combinations listing — Brian Adkins <lojicdotcom@...> 2007/10/19

On Oct 19, 2:01 am, Michael Linfield <globyy3...@hotmail.com> wrote:

[#274773] the level of Ruby programmers vs PHP's — SpringFlowers AutumnMoon <summercoolness@...>

i asked the same question on Ruby: how do you write some code to print

18 messages 2007/10/19
[#274779] Re: the level of Ruby programmers vs PHP's — Shuaib Zahda <shuaib.zahda@...> 2007/10/19

do you mean something like this

[#274820] Is it always the norm to skip 'return'? — Tito Ciuro <tciuro@...>

Hello,

24 messages 2007/10/19
[#274822] Re: Is it always the norm to skip 'return'? — "Glen Holcomb" <damnbigman@...> 2007/10/19

On 10/19/07, Tito Ciuro <tciuro@mac.com> wrote:

[#274936] Why's (Poignant) Guide to Ruby (is this guy ok?) — "Jayson Williams" <williams.jayson@...>

Recently, I was looking for a Ruby guide that could help my son catch

11 messages 2007/10/20

[#274958] RubyGems Beta 0.9.4.6 — Eric Hodel <drbrain@...7.net>

RubyGems 0.9.4.6 is a beta release for the upcoming 0.9.5 which adds

20 messages 2007/10/20
[#274979] Re: [ANN] RubyGems Beta 0.9.4.6 — Sasa Ebach <se@...> 2007/10/20

Hi Eric,

[#274986] Re: [ANN] RubyGems Beta 0.9.4.6 — Eric Hodel <drbrain@...7.net> 2007/10/20

On Oct 20, 2007, at 09:43 , Sasa Ebach wrote:

[#275007] Re: [ANN] RubyGems Beta 0.9.4.6 — Sasa Ebach <se@...> 2007/10/20

> On Oct 20, 2007, at 09:43 , Sasa Ebach wrote:

[#275025] Is Ruby For Me? — Tony De <tony@...>

Hi all,

25 messages 2007/10/21

[#275037] Problem using FileUtils to sort JPEG files — forgottenwizard <phrexianreaper@...>

This is an odd problem, I admit. I'm currently working on a short script

14 messages 2007/10/21

[#275156] IronRuby...will it be like J++? — Thufir <hawat.thufir@...>

Could it be that Microsoft won't fully implement the language

22 messages 2007/10/22

[#275177] REXML (1.8.6-p110) backwards compatibility problem with rcov — Brian Candler <B.Candler@...>

When I upgraded my Ubuntu 6.06.1 system from its stock ruby-1.8.4 to

10 messages 2007/10/22

[#275190] Conflicts between using respond_to? and extending Ruby — Trans <transfire@...>

Hi--

27 messages 2007/10/22
[#275193] Re: Conflicts between using respond_to? and extending Ruby — "David A. Black" <dblack@...> 2007/10/22

Hi --

[#275250] Re: Conflicts between using respond_to? and extending Ruby — "ara.t.howard" <ara.t.howard@...> 2007/10/22

[#275280] Re: Conflicts between using respond_to? and extending Ruby — "Sean O'Halpin" <sean.ohalpin@...> 2007/10/22

On 10/22/07, ara.t.howard <ara.t.howard@gmail.com> wrote:

[#275282] Re: Conflicts between using respond_to? and extending Ruby — "Sean O'Halpin" <sean.ohalpin@...> 2007/10/22

On 10/22/07, Sean O'Halpin <sean.ohalpin@gmail.com> wrote:

[#275230] Re: IronRuby...will it be like J++? — James Britt <dangerwillrobinsondanger@...>

Check the archives of Ruby-Talk.

41 messages 2007/10/22
[#275359] Re: IronRuby...will it be like J++? — "Todd Benson" <caduceass@...> 2007/10/23

On 10/23/07, Robert Dober <robert.dober@gmail.com> wrote:

[#275312] Ruby Certification Test — John Joyce <dangerwillrobinsondanger@...>

In the Japanese page of Ruby Association, at http://www.ruby-assn.org/

24 messages 2007/10/23

[#275324] pop/push, shift/unshift — "Simon Schuster" <significants@...>

the inconsistency in naming bothers me. :P I would imagine that it

51 messages 2007/10/23
[#275338] Re: pop/push, shift/unshift — Robert Klemme <shortcutter@...> 2007/10/23

On 23.10.2007 05:53, Simon Schuster wrote:

[#275354] Re: pop/push, shift/unshift — "Simon Schuster" <significants@...> 2007/10/23

*yawn* oh, what? people have been using these terms for a long time?

[#275360] Re: pop/push, shift/unshift — "richard.j.dale@..." <richard.j.dale@...> 2007/10/23

On Oct 23, 10:50 am, "Simon Schuster" <significa...@gmail.com> wrote:

[#275396] Re: pop/push, shift/unshift — "Jes俍 Gabriel y Gal疣" <jgabrielygalan@...> 2007/10/23

On 10/23/07, richard.j.dale@gmail.com <richard.j.dale@gmail.com> wrote:

[#275400] Re: pop/push, shift/unshift — "David A. Black" <dblack@...> 2007/10/23

Hi --

[#275326] recursive array — "Simon Schuster" <significants@...>

207:0> a = [1,2,3,4]

12 messages 2007/10/23

[#275378] to_yaml and international characters — h3raLd <h3rald@...>

Hello,

15 messages 2007/10/23
[#275383] Re: to_yaml and international characters — "Luis Parravicini" <lparravi@...> 2007/10/23

On 10/23/07, h3raLd <h3rald@gmail.com> wrote:

[#275644] Ruby is simple? NooooT! — Casimir P <pikselNOSPAMMi@...>

Hehe whoever said that ruby is not verbose was WRONG!! ;)

16 messages 2007/10/24

[#275697] .each do |foo, bar| what does bar do? — Thufir <hawat.thufir@...>

"code_words.each do |real, code|

27 messages 2007/10/24
[#276096] Re: .each do |foo, bar| what does bar do? — Thufir <hawat.thufir@...> 2007/10/27

On Thu, 25 Oct 2007 06:14:12 +0900, Ben Giddings wrote:

[#276097] Re: .each do |foo, bar| what does bar do? — "David A. Black" <dblack@...> 2007/10/27

Hi --

[#276149] Re: .each do |foo, bar| what does bar do? — Brian Adkins <lojicdotcom@...> 2007/10/27

On Oct 27, 7:05 am, "David A. Black" <dbl...@rubypal.com> wrote:

[#276162] Re: .each do |foo, bar| what does bar do? — 7stud -- <bbxx789_05ss@...> 2007/10/27

Brian Adkins wrote:

[#275742] Intervals in Ruby — Steven D'Aprano <steve@...>

Howdy,

24 messages 2007/10/25

[#275839] Change a string to an integer, report an error if the string does not represent an integer? — Randy Kramer <rhkramer@...>

Can anybody point me to a way to check if a string represents a valid integer

14 messages 2007/10/25

[#275853] Need help understanding metaclassing — Chris Czub <chris.czub@...>

I've been reading lots of Ruby tutorials trying to figure out

17 messages 2007/10/25

[#275866] Ruby Changes in Leopard — "Laurent Sansonetti" <laurent.sansonetti@...>

Hi,

41 messages 2007/10/25
[#276143] Re: [ANN] Ruby Changes in Leopard — Bil Kleb <Bil.Kleb@...> 2007/10/27

John Joyce wrote:

[#276150] Re: Ruby Changes in Leopard — Brian Adkins <lojicdotcom@...> 2007/10/27

On Oct 27, 2:21 pm, Bil Kleb <Bil.K...@NASA.gov> wrote:

[#276154] Re: Ruby Changes in Leopard — James Edward Gray II <james@...> 2007/10/27

On Oct 27, 2007, at 2:15 PM, Brian Adkins wrote:

[#276161] Re: Ruby Changes in Leopard — "David A. Black" <dblack@...> 2007/10/27

Hi --

[#276172] Re: Ruby Changes in Leopard — "Pat Maddox" <pergesu@...> 2007/10/27

Are there any compelling reasons to use the built-in install? I was

[#275888] What's in YOUR Ruby??? Could Ruby ever be a g.p. dev language? — CodeToad <TheOldCodeToad@...>

Hi Folks,

11 messages 2007/10/25

[#275891] cant seem to get system() & pipe to work together — "dtown22@..." <dtown22@...>

I am trying to run a command line utility which converts a wma file to

11 messages 2007/10/25

[#275911] Skip the first invocation e.g. skip_first { foo } — Brian Adkins <lojicdotcom@...>

Consider the following code:

31 messages 2007/10/25

[#275968] Editing Text (#145) — Ruby Quiz <james@...>

The three rules of Ruby Quiz:

34 messages 2007/10/26

[#276035] Newlines included in bracket negation — "Chris Morris" <the.chrismo@...>

(... that subject probably makes no sense ...)

12 messages 2007/10/26

[#276085] open-uri + OpenSSL — Matthew Lagace <matthewlagace@...>

Hello,

13 messages 2007/10/27

[#276137] Checkers library — "Helder Ribeiro" <helder@...>

Does anyone know if there's a sort of library for the game Checkers in

14 messages 2007/10/27

[#276179] A memcached-like server in Ruby - feasible? — Tom Machinski <tom.machinski@...>

Hi group,

27 messages 2007/10/27
[#276216] Re: A memcached-like server in Ruby - feasible? — "ara.t.howard" <ara.t.howard@...> 2007/10/28

[#276185] convert string format — Junkone <junkone1@...>

Hello

18 messages 2007/10/27

[#276228] Talking more about JRuby — Charles Oliver Nutter <charles.nutter@...>

For the most part, we've been pretty good about keeping JRuby

30 messages 2007/10/28

[#276231] JRuby disabling ObjectSpace: what implications? — Charles Oliver Nutter <charles.nutter@...>

As some of you may have heard, we're considering disabling

26 messages 2007/10/28
[#276235] Re: JRuby disabling ObjectSpace: what implications? — Charles Oliver Nutter <charles.nutter@...> 2007/10/28

ara.t.howard wrote:

[#276262] Re: JRuby disabling ObjectSpace: what implications? — Robert Klemme <shortcutter@...> 2007/10/28

On 28.10.2007 08:06, Charles Oliver Nutter wrote:

[#276288] Re: JRuby disabling ObjectSpace: what implications? — Charles Oliver Nutter <charles.nutter@...> 2007/10/28

Robert Klemme wrote:

[#276259] Duplicate elements in array — Shuaib Zahda <shuaib.zahda@...>

Hello

15 messages 2007/10/28
[#276263] Re: Duplicate elements in array — "Sean O'Halpin" <sean.ohalpin@...> 2007/10/28

On 10/28/07, Shuaib Zahda <shuaib.zahda@gmail.com> wrote:

[#276334] Enhancing the Gateway (Help Needed) — James Edward Gray II <james@...>

Here's the short-story on the current situation with our mailing list =20=

23 messages 2007/10/28

[#276422] HTML parser Hpricot? and how to get all text — SpringFlowers AutumnMoon <summercoolness@...>

Would a good HTML parser be Hpricot? I wonder if anyone knows an easy

13 messages 2007/10/29

[#276500] Problem with socket.recv() — "Frank Preiswerk" <frank.preiswerk@...>

Hi everyone,

13 messages 2007/10/29

[#276502] find the closest items in an array to a given value. — trebor777 <mrobert@...777.net>

16 messages 2007/10/29

[#276539] Zip an existing directory? — Peter Marks <petertmarks@...>

Hello,

18 messages 2007/10/29
[#276544] Re: Zip an existing directory? — "Phlip" <phlip2005@...> 2007/10/30

> I am trying to zip an existing directory using the following code:

[#276546] Re: Zip an existing directory? — "M. Edward (Ed) Borasky" <znmeb@...> 2007/10/30

Phlip wrote:

[#276550] Re: Zip an existing directory? — Peter Marks <petertmarks@...> 2007/10/30

Thanks for the help guys. I am developing in osx and will deploy in

[#276587] Re: Zip an existing directory? — "M. Edward (Ed) Borasky" <znmeb@...> 2007/10/30

Peter Marks wrote:

[#276547] Gateway Upgraded — James Edward Gray II <james@...>

We are now running on my new gateway code that will hopefully get

27 messages 2007/10/30

[#276618] the result of Ruby official logo contest — Yukihiro Matsumoto <matz@...>

Hello All,

81 messages 2007/10/30
[#276621] Re: [ANN] the result of Ruby official logo contest — Yukihiro Matsumoto <matz@...> 2007/10/30

Hi,

[#276643] Re: [ANN] the result of Ruby official logo contest — Peter Szinek <peter@...> 2007/10/30

Robert Dober wrote:

[#276711] Re: [ANN] the result of Ruby official logo contest — James Britt <james.britt@...> 2007/10/30

Peter Szinek wrote:

[#276746] Re: [ANN] the result of Ruby official logo contest — "Martin DeMello" <martindemello@...> 2007/10/30

On 10/30/07, James Britt <james.britt@gmail.com> wrote:

[#276799] Re: [ANN] the result of Ruby official logo contest — "Jeremy McAnally" <jeremymcanally@...> 2007/10/30

You can see my comments on the http://www.rubyinside.com/ page, and I

[#276808] Re: [ANN] the result of Ruby official logo contest — Yukihiro Matsumoto <matz@...> 2007/10/30

Hi,

[#277215] Re: the result of Ruby official logo contest — Willem Källman <lefteus@...> 2007/11/02

Yukihiro Matsumoto wrote:

[#277288] Re: the result of Ruby official logo contest — Chad Perrin <perrin@...> 2007/11/02

On Fri, Nov 02, 2007 at 06:07:21PM +0900, Willem K??llman wrote:

[#276682] InstantRails windows Installation, problem with Gem — Ronald Dsouza <rondsouza2000@...>

Hi Good Morning,

15 messages 2007/10/30

[#276686] Array and ASCII Help needed... — "Hiato Xaero" <hiato3@...>

Hello there,

13 messages 2007/10/30

[#276710] RUBY DRY to replace 6 lines in 1 — Josselin <josselin@...>

I have a group of lines (used in Googlemaps display) based on 2 arrays :

17 messages 2007/10/30

[#276767] Bounty: $250 - Successfully log in to AOL Webmail with Mechanize — "dave.myron@..." <dave.myron@...>

We're about to release a gem called Blackbook that will automate

12 messages 2007/10/30

[#276801] Why, oh, why, little regexp? — Daniel Waite <rabbitblue@...>

'cost * tax'.match(/([a-z]+)*/).to_a

15 messages 2007/10/30

[#276831] Rubyconf Attendees — "Rick DeNatale" <rick.denatale@...>

Just wondering how many other regulars of ruby-talk will be in

26 messages 2007/10/31

[#276918] Dinner / drink recommendations for Charlotte? — Francis Hwang <francisphwang@...>

With RubyConf 2007 almost upon us, do any Charlotte natives care to

12 messages 2007/10/31

[#276978] Sorting a string... — Daniel Waite <rabbitblue@...>

I was porting a small Python script over to Ruby and realized Ruby does

15 messages 2007/10/31

Re: Class instance variable idiom

From: "ara.t.howard" <ara.t.howard@...>
Date: 2007-10-19 15:06:56 UTC
List: ruby-talk #274817
On Oct 19, 2007, at 5:09 AM, David A. Black wrote:


>
> I think we're defining encapsulation differently. I don't mean that no
> two objects should ever share any kind of data; rather, it's that
> class variables don't play nicely with the system of which they are
> part. I know about the "singleton" non-singletons... but at least
> that's implemented in terms of inheritance (so really only the
> terminology is at stake). I can see what a subclass has to do with its
> parent class, especially given Matz's point that inheritance in Ruby
> is mostly about "shared implementation". I find automatic variable
> sharing between classes and instances much more problematic,
> especially given the fact that classes are first-class objects (which
> leads to all the problems with @@vars obscuring @vars, conceptually at
> least).

yeah i see that.  i avoid them much of the time for those reasons.   
but, technically, doing something like this

   class C
     SHARED_WITH_ALL_SUBCLASSES_AND_INSTANCES = []
   end

does the same.  it's something worth considering.

>> and constants and singleton methods....  of course class singleton  
>> methods,
>
> It's not a contest, though :-) It's possible that constants are
> well-designed and class variables aren't, even if they share certain
> behaviors. Actually, I'd add constants to the list of things, along
> with instance variables, that can do most of what people usually use
> class variables for.
>

sort of.  if you need state to be inherited you can use constants.   
if you want true class singleton state that is settable you can use  
class instance variables.  if you want state that is settable AND  
inherited the simplest option at the moment are class @@variables.   
the way they mix into instances, i would agree is confusing, but  
there really aren't any other *simple* options for inheriting state  
in classes

>> in an instance context, require a 'self.class' prefix to invoke  
>> while constants do not but this is not encapsulation - it's the  
>> breaking of it - instances *should* be allowed to access the  
>> unfettered methods of their class because requiring the  
>> 'self.class' prefix also makes them *public* which, of course,  
>> seriously breaks encapsulation.
>
> I'm not following this, I'm afraid. If an object has a public method
> defined on it, and you call obj.meth, how does that break
> encapsulation? I guess it's the "*should*" I'm not understanding.

in some languages instances of a class may call private/protected  
methods of that class which, if you think about it, makes sense.  in  
ruby, a method must (ignoring xxx_eval and send) be exposed to the  
world if instances also need to call it.  so when using class  
instance vars you give instances one simple option for accessing  
them: expose them through attr_accessor thereby also exposing them to  
the world.  for example

   class C
     @how_do_instances_get_at_this

     def initialize
       class << self.class
         def with_a_public_accessor() @how_do_instances_get_at_this end
       end

       self.class.with_a_public_accessor
     end

so the typical pattern with class instance variables is to expose  
them publicly and this may break encapsulation iff the information  
exposed is best left internal to the class and it's instances

>
> OK... but I don't think we have to choose between (a) no two objects
> ever sharing anything, and (b) deciding that some objects share some
> things so we might as well give up trying to differentiate among
> different cases. It's possible that mixins are well-designed and class
> variables aren't, even if both of them involve, described at a very
> high level, tearing down barriers between bits of code.
>
> The sense I get from class variables is of quasi-globalness. I don't
> get that sense when I include a mixin; I actually don't think it's the
> same in either kind or degree.
>

yeah the fact that instances see them does indeed make them seem  
quasi global - but the lack of another inherited class state  
mechanism is a show stopper when it comes to declaring them useless  
and poorly designed.  that's critical functionality in some object  
hierarchies.


>
> I'm not sure what the advantage is of generalizing the technical term
> "instance" that way. You can say that global variables are associated
> with an "instance" of a computer program, so they must be OK :-)
>

heh.  i actually meant it quite specifically with regard to classes -  
each iteration of oo laguanges is breaking down the barrier between  
classes, objects, and other constructs like modules.  i think we all  
can see that the distinction in ruby is largely artificial: layers  
put on top to make us see them as distinct.  i probably program a lot  
more class factories than your average ruby programmer and, when you  
are working with classes at that level you, correctly, are thinking  
of them as instances.  but you also start wondering why things like  
this don't work:

   class C
     @var = 42
     class << self
       p @var
     end
   end

and this too

   class B < C
     p @var
   end

if you've programmed using prototypes this shouldn't really come as a  
surprise: it's normal to expect classes that *are* objects to have  
some mechanism for sharing or copying that object's state.  in ruby  
you have to resort to @@vars and other weirdness like klass.clone or  
klass.dup to get the affect.  in summary it's correct, i think, in a  
language where classes are first class objects to consider attributes  
of that class, like it's singleton class and it's child classes, as  
*instance* data.

>>
>> class Parser
>>
>>   def self.bufsize(*value)
>>     value.size == 0 ? @@bufsize : self.bufsize=(value.first)
>>   end
>>
>>   def self.bufsize=(value)
>>     @@bufsize = Integer value
>>   end
>>
>>   bufsize 4242
>>
>>   def initialize options = {}
>>     @bufsize = options[:bufsize] || @@bufsize
>
> I don't think it would be such a disaster to have to say "||  
> self.class.bufsize". It would certainly be worthwhile tradeoff for
> all the other problems.

i disagree - if you do that you've designed a class that cannot be  
subclassed: as that line will return 'nil' in those subclasses.  if  
you do that you should be using a singleton object or module - not a  
class - to model your problem domain.

>>
>> i can hear people thinking "you need instance variables!"  sure,  
>> if you want to write totally non-reusable code.  why?  because if  
>> i do
>>
>> class Parser
>>   def self.bufsize(*value)
>>     value.size == 0 ? @bufsize : self.bufsize=(value.first)
>>   end
>>
> [code snipped]
>>
>> in short there are a million reasons to use class variables  
>> revolving around the glitch that class inheritance in ruby does  
>> not provide a straightforward way for child classes to have any  
>> sort of setup step performed and that class variables let you  
>> perform that setup once in a way that is inherited and yet  
>> settable by client code.
>
> I'm still happier with class objects playing in the same ballpark as
> other objects, when it comes to per-object state. Set up, if desired,
> a way for other objects to get at the state, and then have the other
> objects send you messages. It's all about where one thinks the
> special-case horizon should be, I guess.

the lack of class setup with class instance variables isn't really a  
special case though - any newbie would expect to be able to write this

   class C
     @a, @b = 4, 2
   end

   class B < C
   end

and have @a and @b end up being initialized in B somehow.  i guess i  
just don't think that inheritance/setup of class state is something  
that people should be expected to roll on their own in a language as  
powerful as ruby - it can get quite complex when modules enter the  
picture too.  i'd rather entrust matz to solved the problem  
generically ;-)

>
> I'm not saying they should. I'm saying I'd like it if class variables
> did :-) It's not a one-size-fits-all argument about misunderstood Ruby
> features; it's specifically about class variables.
>
>

oh i understand that david - no worries.  what i'm saying is simply  
that i've probably designed as many complex ruby class hierarchies as  
anyone else out there and i've solved the class state sharing issue a  
whole bunch of times in different ways: sometimes using 'inherited',  
sometimes by factoring things out into modules, and sometimes using  
@@variables and none of them are perfect.  my experience has lead me  
to think that any discussion of the evils of class variables (and  
i've said they are evil on this list too!) shouldn't be outside the  
context of how to *better* share and initialize state between parent  
and child classes because it's an important feature in an oop  
language - in short, it's a red herring.

cheers.

a @ http://codeforpeople.com/
--
share your knowledge.  it's a way to achieve immortality.
h.h. the 14th dalai lama



In This Thread