[#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: The Case for Multiple-Inheritance

From: "Austin Ziegler" <halostatue@...>
Date: 2007-10-08 15:16:06 UTC
List: ruby-talk #273185
On 10/8/07, Trans <transfire@gmail.com> wrote:
> On Oct 7, 8:45 pm, "Austin Ziegler" <halosta...@gmail.com> wrote:
>> On 10/7/07, Trans <transf...@gmail.com> wrote:
>>> On Oct 7, 8:42 am, "Austin Ziegler" <halosta...@gmail.com> wrote:
>>>> No, actually, it doesn't provide maximum code reusability. Ruby
>>>> supports a rich vocabulary and you're choosing to use a form that,
>>>> while clearly useful in some cases, is not right.
>>> Yes it does, b/c if methods are placed in a class, the only reuse if
>>> via a subclass.
>> You are 100% wrong here. Not all reuse is defined by mixin or
>> inheritance. Delegation and composition are also reuse.
> Fair enough, although that's only 50% wrong ;)

No, it's 100% wrong. You said "the only reuse [is] via a subclass." Just
using the instance as an object is reuse (composition).

[snip]

> modules are more versatile than classes. Thus by using all modules for
> behavior (and classes as only compositions of modules) maximizes
> reusability. And for this simple fact: classes cannot be mixed-in.

Wrong. Look VERY CAREFULLY at your code, Trans. How many of your modules
are used in more than one place?

If the answer is few, then you're doing it wrong and you're introducing
negative consequences in terms of maintainability, while not actually
increasing reuse. Most methods are specific behaviour for a given state.
Pretending that by extracting that into modules that youre increasing
reuse is nonsense. Unless you're actually reusing the code, you're not
increasing reuse.

>>> If they are in a module they are not limited by that constraint. I
>>> haven't lost anything at all by putting all behavior in modules, I
>>> have only gained. The approach is a superset.

You've lost maintainability and clarity. You've lost any sense of good
design.

>> The approach is a mess and tries to abstract things out in a
>> nonsensical way. Essentially, you're saying that UP FRONT you divide
>> things into one or more "class modules" and one or more "instance
>> modules". With few exceptions, modules should be extracted from
>> classes when you can think of a more-generic case for it. And you
>> don't extract the whole damned class to pull it off; you pull the
>> special-purpose-for-similar-objects code out.
> Huh? It's a mess to divide these things into modules for mixin, but
> its ok to divide them as classes and delegate? The point is to make
> less mess by dividing things up into more manageable pieces. Those
> pieces may prove nicely reusable, too, if well thought out, btw.

Yeah, it's much cleaner to think in terms of objects. It's much
preferable to compose than inherit. Delegation is only necessary when
you need to Act As something else.

> But my example of extraction of the *whole* damned class was to make a
> point about the limitations of class vs module reuse. For instance,
> here's an example I didn't mention before. Did you know that if you
> use all modules then AOP coding is very simple? It's easy to prepend a
> module relative to other modules in the inheritance chain. But not so
> for classes. Dynamic AOP for classes takes some mind-numbing meta-
> coding for sure.

That's part of the problem, I guess: I don't think that AOP is
worthwhile in Ruby. AOP doesn't add any readability to the code, in the
end, than doing it a bit smarter. AOP only sort-of makes sense in Java
because Java's (otherwise) a static language. But even there, it's not
all that useful.

>>> I seem to be the only one who ever gives code examples. How about
>>> you show me an example of how you'd do it?
>> You've got plenty of examples of how I'd do it: it's called my
>> existing Ruby code that's out there publicly on RubyForge. (This is
>> probably close to ten thousand lines of code ... that doesn't do what
>> you're talking about except in one instance I can think of that I
>> only did it that way for clarity and wouldn't do it that way again.)
> Of course I've seen some of your code, Austin. And you're quite a
> capable coder. But your Ruby code has a very classic feel to it. Like
> you were programming in C. You're very conservative and don't much
> venture into the meta-coding deep. I'm not insinuating anything
> negative in that, btw. I think it's good that there are all types of
> coders. But you seem almost religious about your way of doing things.

That's because you're tone-deaf. I'm saying that from experience with
other people actually having to maintain code or having to maintain
other peoples' code, the way that you're doing things is nonsense and
reduces overall maintainability.

If you think my code looks like C, you'd be quite wrong; I simply don't
do metaprogramming where it isn't appropriate. (I have an experimental
branch of PDF::Writer that used quite a bit of metaprogramming to
encapsulate a number of rules that PDFs impose on objcts; if I ever pick
up PDF::Writer again, then I will probably be going from that
direction.) Most of the problems that I've solved haven't needed meta-
programming and I'm not going to inflict it on others just to show how
kewl I am.

There's also code that I have written that I can't show (it's
work-related) that does stuff within a particular domain that I would
never advocate in any other way. (I have one, in particular, that
overrides const_missing to return a string value representing the name
of the const just tried. The code where you'd use this expects that.)

>> I mostly do it as classes. I don't screw around with modularizing
>> things that simply *aren't* modules. Just because you CAN extract all
>> of the purpose out of a class and put it into a module just to
>> include it right back in doesn't mean you SHOULD.
> Of course not. And of course I don't. But I wish Ruby didn't make me
> have to choice one over the other. It reduces the flexibility of it's
> otherwise extremely elegant inheritance model; and likewise makes
> delegation the better choice in more cases than otherwise would be
> necessary.

"Necessary" is a matter of opinion. To pick up on a different message
(to which I'll be replying to here, as well), I consider an object with
50 attributes an abomination. I don't care whether you've gotten those
attributes by mixins or manually writing them; it means you haven't
thought about your class design well enough. You seem to prefer flat
classes; I think that flat classes are a disaster in waiting.

[snip]

>>> You are constraining the use of modules according to your own view
>>> of how they "should" be used, and in the process I think you're
>>> missing my point.
>> No, I didn't miss your point at all. I think your approach is stupid
>> and shortsighted. Sorry for the harshness, but the reality is that
>> using modules this way is nonsense and you're running into
>> limitations because you're trying to do something that doesn't make
>> sense. I'm not saying that Ruby's perfect or that everything in it
>> makes sense, but if it *hurts* to do something one way in Ruby,
>> that's usually a sign that you're doing it wrong.
> Ah yea, and "If God meant for men to fly, he would have given them
> wings."
>
> You're arguing that I have the problem, not Ruby. But I'm not arguing
> Ruby has a problem, I'm arguing that maybe it could be even better.
> Nor do I have a problem. I finished the program yesterday. I didn' run
> into a limitation per-se, I ran in to a "why am I having to make an
> ultimately pointless distinction?"

Yeah. You do have a problem and you *have* been arguing that Ruby has a
problem. If one is suggesting an improvement to something, it's because
one has hit a pain point. Sometimes those pain points are legitimate;
sometimes they're like the old joke:

  Man: Doctor, it hurts when I put my arm behind my back.
  Doctor: Well, don't put your arm behind your back.

Your example is precisely one of those situations. The distinction, by
the way, MAY be pointless. Inasmuch as it would encourage the sort of
design decisions you're making and have demonstrated in this discussion?
I'm more than happy to have it there, because if you're doing it, far
less capable programmers than you would make even dumber decisions from
it.

>>> You've created an artificial separation between forms of code
>>> encapsulation because, you reason to yourself, one is for handling
>>> state and one if for generic capabilities.
>> It's not artificial. In Ruby, modules do not contain state. Period.
>> Only objects, which are instances of classes, contain state.
> Now you're knit picking words. Of course only object instances have
> state. But classes, and modules!, define objects.

I'm not nit-picking at all. It's the fundamental distinction between the
two right now. Classes can be turned into things that have state;
modules can't. Modules can only add features to objects.

>> The canonical examples of modules (Enumerable, Comparable) don't deal
>> with state directly, but only through a defined interface that DOES
>> deal with state in an object. Transaction::Simple is a module because
>> it adds functions to objects that allow those objects to manipulate
>> state in different ways.
>>
>> Transaction::Simple has generic applicability. Text::Format does not.
> Yep. A well defined interface is an important aspect of code reuse --
> that's true for all forms of composition.

Not even related to what I said. Modules have some generic
applicability.

>>> But that is putting a hard line in a soft world. There really is no
>>> need to make that hard distinction. If a coder, like yourself, wants
>>> to do that you can do so just as easily with a single form of
>>> encapsulation....
>> [snip the rest of this nonsensical paragraph and the entire next
>> paragraph that has nothing to do with what I said]
>>
>> Do NOT try to put words in my mouth.
> What words? You always do this Austin. You makes some admonishing
> remark and then never explain what your talking about. It's a very
> deceptive conversational tactic. And I wish you'd cut it out. Explain
> yourself. What words do you mean? What I have I said that is
> nonsensical? And why do you think it's all in reference to what you
> said. What about the point *I* trying to make?

"If a coder, like yourself, wants to ... with a single form of
encapsulation." You rambled on for two paragraphs as if I had said
something about a single form for development. Which I didn't. Never
have, never will. (In fact, it's pretty much *you* that's talked about
only using one form for development. I know you don't, but you're still
talking nonsense here.)

>>>> I'll put it clearly: if I were running a Ruby consultancy and a
>>>> programmer of mine used your methodology for everything (e.g.,
>>>> classes defined by composing modules), I would not keep that
>>>> programmer on. It's a bad style. Sorry.
>>> Clearly there is a reason you aren't running a consultancy.
>> ...which has nothing to do with this stance. You write bad code and
>> design badly. You always want to change the language to fix the fact
>> that you've coded yourself into a corner. You've done this for years,
>> Trans.
> No. For years I have explored the language. Pushed up against it's
> boundaries. Investigate what it can and can't do. I bring up ideas and
> make suggestions to explore those further, not because I'm stuck, but
> because I'm curious.

Really? If that's the case, then you really need to work on your
presentation skills, because you've yet to present something in a way
that says "I'm exploring this..." and instead nearly always say "Ruby
should do this..." while presenting examples that in every single case
could be coded easier and cleaner if you simply stepped back and thought
a little more. The example you opened this discussion with
(LinuxVideoPlayerApplication) is such BAD design that you SHOULD have
been able to see it.

Like I said, Ruby isn't perfect and there are things that can improve
about it -- and yes, you've pointed out a few of those areas. But when
it "hurts" to do something one way in Ruby, it usually means that you're
doing something suboptimally.

> I'm forever learning. I didn't come from a C background and just
> started writing my C program's in Ruby. I learned Ruby as Ruby. And I
> try to use Ruby for what it is, and enjoy considering what more it
> could be.

Nice misdirection and assumption of the martyr position.

> Does this exploration lead me down rough roads sometimes? Damn right
> it does. But in the end I'm a better coder for it. Am I the best coder
> around here? Of course not, I don't pretend to be. But you sure do.

Again, nice misdirection. I don't pretend to be the best coder. I am,
however, a professional software developer that has to deliver a lot of
code on a regular basis. There are things that I know I wouldn't put up
with from people who worked with me if I had to maintain their code.
There are things that I don't care about.

>> Classes defined by composing modules is bad practice. There are times
>> for doing things like this, but they are few and far between and
>> people who do it should be prepared to defend their reasons for doing
>> so because it smells like bad code.
> Good gracious. You have so utterly missed the whole point I'm not sure
> why I continue to type. What was my point Austin? Please, I want you
> to put words in my mouth so I can see if there's actually any
> communication going on here.
I haven't missed the point. You believe that modules are more flexible
than classes and that things would be better if you could mix classes in
the same way you can mix modules in, or at least if you could "properly"
instantiate modules. You may believe that, but in Ruby at least, you're
wrong.

On 10/8/07, Trans <transfire@gmail.com> wrote:
> On Oct 7, 8:57 pm, "Austin Ziegler" <halosta...@gmail.com> wrote:
>> On 10/7/07, Trans <transf...@gmail.com> wrote:
>>> On Oct 7, 10:42 am, "Pat Maddox" <perg...@gmail.com> wrote:
>>>> You misunderstand me.  What looks painful to me is having the
>>>> behavior of a class tucked away behind 15 different modules, instead
>>>> of being right in the class where it belongs.
>>> I see. Well it's a trade-off. Would you prefer a class with 50
>>> attributes or one that divides those into a few groups based on what
>>> they concern? For instance I have a Package class, it consists of
>>> General, Version, Content and Control components. I use that as a
>>> library reference object. However when I want to use it for creating
>>> distributable packages I mixin Distribution and Dependency modules.
>> Personally? I'd prefer the former. If I was dumb enough to design
>> something that required 50 attributes. Let's pick on your example:

[snip layered redesign]

>> There we go. It's now a properly composed object that doesn't mix in
>> multiple pieces of functionality into a flat access hierarchy. I now
>> have a Package::Version *class* to reuse elsewhere if I want, and it's a
>> full-on black box. I don't have any worries that Package::Version the
>> class will have any instance variables that conflict with another item
>> because I used a module.
>>
>> It took me all of thirty seconds to fix your design and make it
>> class-oriented rather than module-oriented. My objects are now more
>> usable as a whole and the overall interface substitution capabilities
>> are improved because now my Package class doesn't HAVE fifty attributes;
>> it's got FIVE. The Distributable package is properly specialized, too.
>> It might be possible to use a module to extend a package object into a
>> distributable package object rather than a subclass, but I'm not sure
>> that the design for that is a good one.
>>
>> Because each of my classes is smaller, my code is likely to be
>> significantly more robust, and I have functionality that I can test
>> independently of the whole Package class without trying to mix it
>> into something different.
>>
>> That's what I mean, Trans: your design approach for mixing in 50
>> attributes or writing 50 attributes is bad. If you need that many,
>> your object is PROBABLY way too big. (Yes, there are times when such
>> things are necessary; they're extremely uncommon, though.)
>
> Fantastic jobs Austin. Now initialize the class from a YAML file for
> me. Did I mention the file spec looks like this:

[...]
> It has some 35+ possible entires and some of those have aliases
> besides (because I like giving my users some flexibility). Plus it
> should be extensible because other utilities (like the distributable
> packaging tool) will need additional information.
>
> Come on, show the dumb-dumb how it's *properly* done.

  class Package
    def self.from_yaml(yaml)
      pkg = Package.new

      YAML.load(yaml).each do |key, value|
        case key
        when 'package' then # ...
        when 'version' then # ...
        when 'created' then # ...
        when 'homepage' then # ...
        when 'devsite' then # ...
        when 'authors' then # ...
        when 'description' then # ...
        when 'libpaths' then # ...
        else
          # save the unknown pairs somewhere so that subclasses can deal
          # with them, too.
        end
      end
    end
  end

Just because your storage representation is flat doesn't mean your
in-memory object has to be. (And you can define your own #to_yaml on the
Package class that flattens things for saving.)

This is no different than what I wrote for Ruwiki four years ago (I
eschewed YAML because Syck was broken in a couple of different releases
of Ruby.)

-austin
-- 
Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/
               * austin@halostatue.ca * http://www.halostatue.ca/feed/
               * austin@zieglers.ca

In This Thread