[#101991] Gateway appears to be working!! — "David A. Black" <dblack@...>

Hi --

13 messages 2004/06/01

[#102028] What is the equivalent of Python's "%s" % "MyString"? — "Sam Sungshik Kong" <ssk@...>

Hello!

20 messages 2004/06/01

[#102050] Obfuscating Ruby Code. — "Ken Hilton" <kenosis@...>

Does anyone know of a Ruby source code obfuscator that's reliable and

56 messages 2004/06/01

[#102170] Floating point division operator /. (or fdiv method) — Michael Neumann <mneumann@...>

Hi,

31 messages 2004/06/02
[#102247] Re: [RCR] Floating point division operator /. (or fdiv method) — "Robert Klemme" <bob.news@...> 2004/06/03

[#102231] Reply wasn't posted; will test new post — "Pe, Botp" <botp@...>

Hi ALL:

38 messages 2004/06/03
[#102236] Re: Reply wasn't posted; will test new post — "daz" <dooby@...10.karoo.co.uk> 2004/06/03

[#102241] Re: Reply wasn't posted; will test new post — "David A. Black" <dblack@...> 2004/06/03

Hi --

[#102366] Active Record 0.8.2: Inheritable callback ques — David Heinemeier Hansson <david@...>

What's new in Active Record 0.8.2?

13 messages 2004/06/04

[#102401] Problem Installing Ruby Gems 0.4.0 on XP not segfault — "Ernie" <erne@...>

I get the following error I'm running Ruby 1.8 windows version installed

10 messages 2004/06/04

[#102412] Check assertion in Ruby — Edgardo Hames <ehames@...>

Hi, everybody. I would like to use an assert like function to test the

20 messages 2004/06/04

[#102431] How to ducktype a Hash? — "Sean O'Dell" <sean@...>

I need to detect when an object is a hash-like container for other objects,

137 messages 2004/06/05
[#102456] Re: How to ducktype a Hash? — "Robert Klemme" <bob.news@...> 2004/06/05

[#102495] Re: How to ducktype a Hash? — "Sean O'Dell" <sean@...> 2004/06/05

On Saturday 05 June 2004 02:28, Robert Klemme wrote:

[#102496] Re: How to ducktype a Hash? — Dave Thomas <dave@...> 2004/06/05

[#102499] Re: How to ducktype a Hash? — "Sean O'Dell" <sean@...> 2004/06/05

On Saturday 05 June 2004 10:39, Dave Thomas wrote:

[#102507] Re: How to ducktype a Hash? — Dave Thomas <dave@...> 2004/06/05

[#102514] Re: How to ducktype a Hash? — "Sean O'Dell" <sean@...> 2004/06/06

On Saturday 05 June 2004 13:30, Dave Thomas wrote:

[#102530] Re: How to ducktype a Hash? — "John W. Long" <ng@...> 2004/06/06

Sean O'Dell wrote:

[#102535] Re: How to ducktype a Hash? — "Sean O'Dell" <sean@...> 2004/06/06

On Saturday 05 June 2004 21:05, John W. Long wrote:

[#102563] Re: How to ducktype a Hash? — David Garamond <lists@...6.isreserved.com> 2004/06/06

Sean O'Dell wrote:

[#102573] Re: How to ducktype a Hash? — "David A. Black" <dblack@...> 2004/06/06

Hi --

[#102465] Re: How to ducktype a Hash? — gabriele renzi <surrender_it@...1.vip.ukl.yahoo.com> 2004/06/05

il Sat, 5 Jun 2004 11:15:37 +0900, "Sean O'Dell" <sean@celsoft.com> ha

[#102509] Re: How to ducktype a Hash? — "John W. Long" <ng@...> 2004/06/05

[#102516] Re: How to ducktype a Hash? — "Sean O'Dell" <sean@...> 2004/06/06

On Saturday 05 June 2004 15:01, John W. Long wrote:

[#102649] Re: How to ducktype a Hash? — "Dave Burt" <burtdav@...> 2004/06/07

param.respond_to? '[]' and

[#102445] class A::B verses module A ; class B — quixoticsycophant@... (Jeff Mitchell)

module A

14 messages 2004/06/05

[#102597] Segfault on embedded ruby. — Godot <garciamj@...>

16 messages 2004/06/06

[#102601] Instiki 0.9.0: Rendering improvements, Latex integration, OS X version — David Heinemeier Hansson <david@...>

What's new in Instiki 0.9.0?

9 messages 2004/06/06

[#102675] Waiting for condor output files — Milo Thurston <nospam@...>

I've got a script that submits a whole load of condor jobs, and has to

11 messages 2004/06/07

[#102710] Re: How to ducktype a Hash? — "Austin Ziegler" <Austin.Ziegler@...>

> dblack@wobblini.evault.com

18 messages 2004/06/07

[#102716] Re: Unit tests ... not just for the young — "Kloubakov, Yura" <YKloubakov@...>

22 messages 2004/06/07
[#102729] Re: Unit tests ... not just for the young — "Sean O'Dell" <sean@...> 2004/06/08

On Monday 07 June 2004 16:13, Kloubakov, Yura wrote:

[#102789] Re: Unit tests ... not just for the young — Michael Campbell <michael.campbell@...> 2004/06/08

> I've worked with some fresh guys right

[#102796] Re: Unit tests ... not just for the young — "Sean O'Dell" <sean@...> 2004/06/08

On Tuesday 08 June 2004 07:55, Michael Campbell wrote:

[#102808] Re: Unit tests ... not just for the young — Michael Campbell <michael.campbell@...> 2004/06/08

> Non-college grads, though, never got hired unless they could prove their

[#102819] Re: Unit tests ... not just for the young — "Sean O'Dell" <sean@...> 2004/06/08

On Tuesday 08 June 2004 10:03, Michael Campbell wrote:

[#102822] Re: Unit tests ... not just for the young — Jim Freeze <jim@...> 2004/06/08

On Wednesday, 9 June 2004 at 3:52:21 +0900, Sean O'Dell wrote:

[#102823] Re: Unit tests ... not just for the young — Michael Campbell <michael.campbell@...> 2004/06/08

>

[#102824] Re: Unit tests ... not just for the young — "Sean O'Dell" <sean@...> 2004/06/08

On Tuesday 08 June 2004 12:12, Michael Campbell wrote:

[#102731] Interfaces and semantics (or, how to hashpipe a duck) — Hal Fulton <hal9000@...>

Semantics, James Thurber notwithstanding, is not a town in Ohio.

34 messages 2004/06/08
[#102814] Re: Interfaces and semantics (or, how to hashpipe a duck) — djberg96@... (Daniel Berger) 2004/06/08

"Sean O'Dell" <sean@celsoft.com> wrote in message news:<200406080736.32485.sean@celsoft.com>...

[#102818] Re: Interfaces and semantics (or, how to hashpipe a duck) — "Sean O'Dell" <sean@...> 2004/06/08

On Tuesday 08 June 2004 11:23, Daniel Berger wrote:

[#102839] Re: Interfaces and semantics (or, how to hashpipe a duck) — "David A. Black" <dblack@...> 2004/06/08

Hi --

[#102788] ruby and mustard — "Ara.T.Howard" <Ara.T.Howard@...>

20 messages 2004/06/08

[#102817] Ruby/Interface — "Sean O'Dell" <sean@...>

Ruby/Interface 0.1-1

18 messages 2004/06/08

[#102863] oddities with select — Ben Giddings <bg-rubytalk@...>

I'm trying to use Ruby to talk to an network application, and noticed

21 messages 2004/06/08

[#102890] Re: Unit tests ... not just for the young — "Pe, Botp" <botp@...>

Gennady [mailto:gfb@tonesoft.com] wrote:

39 messages 2004/06/09
[#102891] Re: Unit tests ... not just for the young — Jim Freeze <jim@...> 2004/06/09

On Wednesday, 9 June 2004 at 11:46:12 +0900, "Pe?a, Botp" wrote:

[#102896] Re: Unit tests ... not just for the young — Dan Tapp <dhtapp@..._sig_line.com> 2004/06/09

Jim Freeze wrote:

[#102900] Re: Unit tests ... not just for the young — Tyler Zesiger <mailing-lists@...> 2004/06/09

I'd be afraid to hire a code-monkey who said yes.

[#102929] Re: Unit tests ... not just for the young — Tom Copeland <tom@...> 2004/06/09

On Wed, 2004-06-09 at 01:21, Tyler Zesiger wrote:

[#102930] Re: [OT] Re: Unit tests ... not just for the young — Michael Campbell <michael.campbell@...> 2004/06/09

On Wed, 9 Jun 2004 22:48:30 +0900, Tom Copeland <tom@infoether.com> wrote:

[#102931] Re: [OT] Re: Unit tests ... not just for the young — Tom Copeland <tom@...> 2004/06/09

On Wed, 2004-06-09 at 09:56, Michael Campbell wrote:

[#102934] Re: [OT] Re: Unit tests ... not just for the young — Jim Freeze <jim@...> 2004/06/09

On Wednesday, 9 June 2004 at 23:02:22 +0900, Tom Copeland wrote:

[#102978] Re: [OT] Re: Unit tests ... not just for the young — Jean-Hugues ROBERT <jean_hugues_robert@...> 2004/06/09

At 23:21 09/06/2004 +0900, you wrote:

[#102914] strip DOS ^Ms? — Dick Davies <rasputnik@...>

15 messages 2004/06/09

[#102922] Active Record 0.8.3: Modules, mapping, and transactions — David Heinemeier Hansson <david@...>

What's new in Active Record 0.8.3?

12 messages 2004/06/09

[#102950] #include <re.h> required for Opteron but not Pentium. — Jim Freeze <jim@...>

Hi

14 messages 2004/06/09
[#103007] Re: #include <re.h> required for Opteron but not Pentium. — Tim Hunter <cyclists@...> 2004/06/09

On Thu, 10 Jun 2004 03:58:55 +0900, Jim Freeze wrote:

[#102951] History of Languages poster from O'Reilly — djberg96@... (Daniel Berger)

Hi all,

12 messages 2004/06/09

[#103072] Graphing 2Ds in Python is pretty easy... — piir@... (Todd Gardner)

Hello everyone,

16 messages 2004/06/10

[#103172] Array#rest — Charles Comstock <cc1@...>

I find myself frequently using array slice of 1..-1, to pass the rest of an

25 messages 2004/06/11

[#103217] Switch to .ruby extension? — doodpants@... (Karl von Laudermann)

The current convention for Ruby source file names is to end them with

72 messages 2004/06/11
[#103228] Re: Switch to .ruby extension? — Tyler Zesiger <mailing-lists@...> 2004/06/11

The obsessive levels of abbreviation in the *nix world infuriate me.

[#103580] Re: Switch to .ruby extension? — "SER" <ser@...> 2004/06/14

> I remember when I first started using linux (now I use FreeBSD, which

[#103599] Re: Switch to .ruby extension? — Tyler Zesiger <mailing-lists@...> 2004/06/14

I don't know how much of the thread you read through, but I repeated at

[#103602] Re: Switch to .ruby extension? — "Sean O'Dell" <sean@...> 2004/06/14

On Monday 14 June 2004 16:13, Tyler Zesiger wrote:

[#103605] Re: Switch to .ruby extension? — "Zach Dennis" <zdennis@...> 2004/06/14

>Most programmers

[#103608] Re: Switch to .ruby extension? — "Sean O'Dell" <sean@...> 2004/06/15

On Monday 14 June 2004 16:46, Zach Dennis wrote:

[#103618] Re: Switch to .ruby extension? — Sam Roberts <sroberts@...> 2004/06/15

Quoteing sean@celsoft.com, on Tue, Jun 15, 2004 at 09:40:26AM +0900:

[#103622] Re: Switch to .ruby extension? — "Sean O'Dell" <sean@...> 2004/06/15

On Monday 14 June 2004 19:09, Sam Roberts wrote:

[#103673] Re: Switch to .ruby extension? — Sam Roberts <sroberts@...> 2004/06/15

Wrote Sean O'Dell <sean@celsoft.com>, on Tue, Jun 15, 2004 at 11:36:18AM +0900:

[#103239] Re: Switch to .ruby extension? [OT] — Mark Hubbart <discord@...> 2004/06/11

[#103246] Re: Switch to .ruby extension? [OT] — Tyler Zesiger <mailing-lists@...> 2004/06/11

I think I may be earning myself a reputation as a user-friendliness

[#103252] Re: Switch to .ruby extension? [OT] — "Zach Dennis" <zdennis@...> 2004/06/11

[#103258] Re: Switch to .ruby extension? [OT] — Tyler Zesiger <mailing-lists@...> 2004/06/11

[#103225] celsoft.com/Battery 0.1.1 — "Sean O'Dell" <sean@...>

Battery is a unit testing framework for Ruby. It captures all standard error

61 messages 2004/06/11
[#103236] Re: [ANN] celsoft.com/Battery 0.1.1 — "David A. Black" <dblack@...> 2004/06/11

Hi --

[#103250] Re: [ANN] celsoft.com/Battery 0.1.1 — "Sean O'Dell" <sean@...> 2004/06/11

On Friday 11 June 2004 11:47, David A. Black wrote:

[#103267] Re: [ANN] celsoft.com/Battery 0.1.1 — "David A. Black" <dblack@...> 2004/06/12

Hi --

[#103275] Re: [ANN] celsoft.com/Battery 0.1.1 — "Sean O'Dell" <sean@...> 2004/06/12

On Friday 11 June 2004 18:08, David A. Black wrote:

[#103308] Re: [ANN] celsoft.com/Battery 0.1.1 — "David A. Black" <dblack@...> 2004/06/12

On Sat, 12 Jun 2004, Sean O'Dell wrote:

[#103329] Re: [ANN] celsoft.com/Battery 0.1.1 — "Sean O'Dell" <sean@...> 2004/06/12

On Saturday 12 June 2004 03:49, David A. Black wrote:

[#103353] Re: [ANN] celsoft.com/Battery 0.1.1 — "David A. Black" <dblack@...> 2004/06/12

> arbitrary:

[#103366] Re: [ANN] celsoft.com/Battery 0.1.1 — "Sean O'Dell" <sean@...> 2004/06/12

On Saturday 12 June 2004 13:34, David A. Black wrote:

[#103389] Re: [ANN] celsoft.com/Battery 0.1.1 — Jean-Hugues ROBERT <jean_hugues_robert@...> 2004/06/13

At 08:12 13/06/2004 +0900, you wrote:

[#103525] Re: [ANN] celsoft.com/Battery 0.1.1 — "Sean O'Dell" <sean@...> 2004/06/14

On Sunday 13 June 2004 00:13, Jean-Hugues ROBERT wrote:

[#103533] Re: [ANN] celsoft.com/Battery 0.1.1 — James Britt <jamesUNDERBARb@...> 2004/06/14

Sean O'Dell wrote:

[#103536] Re: [ANN] celsoft.com/Battery 0.1.1 — "Sean O'Dell" <sean@...> 2004/06/14

On Monday 14 June 2004 09:27, James Britt wrote:

[#103412] Re: [ANN] celsoft.com/Battery 0.1.1 — Nathaniel Talbott <nathaniel@...> 2004/06/13

On Jun 12, 2004, at 12:28, Sean O'Dell wrote:

[#103413] Re: [ANN] celsoft.com/Battery 0.1.1 — Jamis Buck <jgb3@...> 2004/06/13

Nathaniel Talbott wrote:

[#103532] Re: [ANN] celsoft.com/Battery 0.1.1 — "Sean O'Dell" <sean@...> 2004/06/14

On Sunday 13 June 2004 07:52, Jamis Buck wrote:

[#103293] Any way to get the calling method's binding? — Gavin Sinclair <gsinclair@...>

Something I've wanted to do on a few occasions recently is to evaluate

13 messages 2004/06/12

[#103328] OpenSSL: patch — Jamis Buck <jgb3@...>

Attached is a patch for the Ruby/OpenSSL module, done against the code

25 messages 2004/06/12

[#103334] undefine — tony summerfelt <snowzone5@...>

is there a way to undefine a variable?

43 messages 2004/06/12
[#103405] Re: undefine — "Robert Klemme" <bob.news@...> 2004/06/13

[#103438] undefine — tony summerfelt <snowzone5@...> 2004/06/13

On Sun, 13 Jun 2004 20:08:48 +0900, you wrote:

[#103465] Re: undefine — Claus Spitzer <DocBoobenstein@...> 2004/06/14

Again, this is where it's useful to consider the OO approach and think

[#103550] undefine — tony summerfelt <snowzone5@...> 2004/06/14

On Mon, 14 Jun 2004 16:18:32 +0900, you wrote:

[#103560] Re: undefine — Michael Campbell <michael.campbell@...> 2004/06/14

> i just need the variable to 'not exist' however it's thought about (by

[#103335] "www.ruby-lang.org" still down for maintenance - thats not good — Lothar Scholz <mailinglists@...>

Hello,

12 messages 2004/06/12

[#103381] Ruby /.'ted — Dan Tapp <dhtapp@..._sig_line.com>

Ruby was just slashdotted under "Developers: Searching for the Best

14 messages 2004/06/13

[#103404] How to read a .csv file into a 2D array? — piir@... (Todd Gardner)

Hello everyone,

16 messages 2004/06/13

[#103468] Non-standard library project — Gavin Sinclair <gsinclair@...>

Hi all,

28 messages 2004/06/14

[#103650] "Litte Ruby" book — Csaba Henk <csaba@..._for_avoiding_spam.org>

The book (or book-germ) entitled "A Little Ruby, A Lot of Objects" was

15 messages 2004/06/15

[#103697] a newbie question about main, Object... — "Sam Sungshik Kong" <ssk@...>

Hello!

14 messages 2004/06/15

[#103742] Re: [ANN] celsoft.com/Battery 0.1.1 — "Austin Ziegler" <Austin.Ziegler@...>

Sean O'Dell [mailto:sean@celsoft.com] :

17 messages 2004/06/15
[#103744] Re: [ANN] celsoft.com/Battery 0.1.1 — "Sean O'Dell" <sean@...> 2004/06/15

On Tuesday 15 June 2004 13:53, Austin Ziegler wrote:

[#103874] Bidirectional named pipes on Linux — ptkwt@... (Phil Tomson)

12 messages 2004/06/16

[#103930] introducing Hash-like mixin — gabriele renzi <surrender_it@...1.vip.ukl.yahoo.com>

Hi gurus and nubys,

17 messages 2004/06/17

[#103974] the new great computer language shootout — ptkwt@... (Phil Tomson)

26 messages 2004/06/17
[#103975] Re: the new great computer language shootout — Lennon Day-Reynolds <rcoder@...> 2004/06/17

Part of the speedup appears to be from their use of the Psyco JIT

[#103986] Re: the new great computer language shootout — Eric Hodel <drbrain@...7.net> 2004/06/17

Lennon Day-Reynolds (rcoder@gmail.com) wrote:

[#103992] Re: the new great computer language shootout — Eric Hodel <drbrain@...7.net> 2004/06/17

Eric Hodel (drbrain@segment7.net) wrote:

[#103977] How to make generic #== method? — Zakaria <zakaria@...>

Hi,

13 messages 2004/06/17

[#103993] Generating "real-time" 2D line plots in Windows 2k? — piir@... (Todd Gardner)

Hello everyone,

11 messages 2004/06/17

[#104182] rubys web performance — Florian Weber <csshsh@...>

hi!

31 messages 2004/06/20

[#104222] About top-level method — "Sam Sungshik Kong" <ssk@...>

Hello!

15 messages 2004/06/21

[#104272] A question about Class and Object — "Sam Sungshik Kong" <ssk@...>

Hello!

18 messages 2004/06/21

[#104364] Newbie question - how to replace multiple whitespace within a string? — Brian Tully <btully@...>

Sorry if this is too basic a question but I just inherited a handful of Ruby

10 messages 2004/06/22

[#104455] rubygems thoughts — Hans Fugal <fugalh@...>

My participation here is sporadic at best, so forgive me if these

34 messages 2004/06/24
[#104459] Re: rubygems thoughts — "Jim Weirich" <jim@...> 2004/06/24

[#104465] Re: rubygems thoughts — Hans Fugal <hfugal@...> 2004/06/24

Jim Weirich wrote:

[#104466] Re: rubygems thoughts — "Sean O'Dell" <sean@...> 2004/06/24

On Thursday 24 June 2004 10:18, Hans Fugal wrote:

[#104494] Is it considered Harmful? — "rolo" <rohitlodha@...>

Hi

133 messages 2004/06/24
[#104495] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/24

On Thursday 24 June 2004 16:15, rolo wrote:

[#104498] Re: Is it considered Harmful? — Eric Hodel <drbrain@...7.net> 2004/06/24

Sean O'Dell (sean@celsoft.com) wrote:

[#104499] Re: Is it considered Harmful? — "rolo" <rohitlodha@...> 2004/06/25

> Sean O'Dell (sean@celsoft.com) wrote:

[#104500] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/25

On Thursday 24 June 2004 17:23, rolo wrote:

[#104526] Re: Is it considered Harmful? — ts <decoux@...> 2004/06/25

>>>>> "S" == Sean O'Dell <sean@celsoft.com> writes:

[#104539] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/25

On Friday 25 June 2004 02:19, ts wrote:

[#104542] Re: Is it considered Harmful? — Dave Thomas <dave@...> 2004/06/25

[#104587] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/25

On Friday 25 June 2004 08:57, Dave Thomas wrote:

[#104636] Re: Is it considered Harmful? — ts <decoux@...> 2004/06/26

>>>>> "S" == Sean O'Dell <sean@celsoft.com> writes:

[#104646] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/26

On Saturday 26 June 2004 04:19, ts wrote:

[#104663] Re: Is it considered Harmful? — ts <decoux@...> 2004/06/27

>>>>> "S" == Sean O'Dell <sean@celsoft.com> writes:

[#104694] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/27

On Sunday 27 June 2004 01:41, ts wrote:

[#104699] Re: Is it considered Harmful? — Patrick May <patrick@...> 2004/06/27

I think that #become and #class= are _theoretically_ wrong. Such a

[#104700] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/27

On Sunday 27 June 2004 13:44, Patrick May wrote:

[#104701] Re: Is it considered Harmful? — Patrick May <patrick@...> 2004/06/27

On Sunday, June 27, 2004, at 05:20 PM, Sean O'Dell wrote:

[#104706] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/27

On Sunday 27 June 2004 14:48, Patrick May wrote:

[#104710] Re: Is it considered Harmful? — Patrick May <patrick@...> 2004/06/27

Sean,

[#104712] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/27

On Sunday 27 June 2004 15:43, Patrick May wrote:

[#104714] Re: Is it considered Harmful? — Patrick May <patrick@...> 2004/06/27

[#104715] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/28

On Sunday 27 June 2004 16:53, Patrick May wrote:

[#104716] Re: Is it considered Harmful? — Patrick May <patrick@...> 2004/06/28

[#104724] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/28

On Sunday 27 June 2004 17:30, Patrick May wrote:

[#104754] Re: Is it considered Harmful? — Patrick May <patrick@...> 2004/06/28

Sean,

[#104763] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/28

On Monday 28 June 2004 05:45, Patrick May wrote:

[#104764] Re: Is it considered Harmful? — Mikael Brockman <phubuh@...> 2004/06/28

"Sean O'Dell" <sean@celsoft.com> writes:

[#104766] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/28

On Monday 28 June 2004 08:33, Mikael Brockman wrote:

[#104767] Re: Is it considered Harmful? — Austin Ziegler <halostatue@...> 2004/06/28

On Tue, 29 Jun 2004 00:58:22 +0900, Sean O'Dell <sean@celsoft.com> wrote:

[#104769] Re: Is it considered Harmful? — "Sean O'Dell" <sean@...> 2004/06/28

On Monday 28 June 2004 09:27, Austin Ziegler wrote:

[#104787] Re: [OT] Re: Is it considered Harmful? — "Bill Kelly" <billk@...> 2004/06/28

Hi,

[#104533] Re: Is it considered Harmful? — Scott Rubin <srubin@...> 2004/06/25

I can't possibly imagine it being useful to do this except when the

[#104535] Re: Is it considered Harmful? — "Jim Weirich" <jim@...> 2004/06/25

[#104501] Building Ruby on AIX -- again — Matt Lawrence <matt@...>

I finally have a stable system to use to try to build Ruby. Here's the

18 messages 2004/06/25
[#104510] Re: Building Ruby on AIX -- again — nobu.nokada@... 2004/06/25

Hi,

[#104511] Re: Building Ruby on AIX -- again — Matt Lawrence <matt@...> 2004/06/25

On Fri, 25 Jun 2004 nobu.nokada@softhome.net wrote:

[#104512] Re: Building Ruby on AIX -- again — nobu.nokada@... 2004/06/25

Hi,

[#104513] Re: Building Ruby on AIX -- again — Matt Lawrence <matt@...> 2004/06/25

On Fri, 25 Jun 2004 nobu.nokada@softhome.net wrote:

[#104601] OSCON Ruby tutorials cancelled? — ptkwt@... (Phil Tomson)

14 messages 2004/06/25

[#104637] SQLite-Ruby and "other chrs" — Meino Christian Cramer <Meino.Cramer@...>

Hi,

13 messages 2004/06/26

[#104649] Writing UNIX 'wc' program — "@*(&SPAM&)*optonline.net" <" kboruff\""@*.*optonline.net>

Hey all,

13 messages 2004/06/27

[#104737] (oddity) applying objects with #call() implicitly — gabriele renzi <surrender_it@...1.vip.ukl.yahoo.com>

Hi gurus and nubys,

16 messages 2004/06/28

[#104864] arrayfields-3.0.0 — "Ara.T.Howard" <Ara.T.Howard@...>

URLS:

16 messages 2004/06/29

Re: Delayed Instantiation - delayed.rb

From: mhm26@... (matt)
Date: 2004-06-17 01:48:24 UTC
List: ruby-talk #103891
Sorry for the double post earlier (google issues) and the poorly
formatted code.  The code is available at
http://www.cs.drexel.edu/~ummaycoc/delayed.rb

I have run into a problem as I developed this a little further:

on line 97, which is the commented on in the following context

        def self.singleton_method_added(sym)
          return if @skip

          mget = Object.instance_method(:method).bind(self)
          m    = mget.call(sym).unbind
          @object.instance_eval {
            @_____meth_hash_____[sym] = m
          }

          code = <<-END_EVAL
            def @object.#{sym}(*a, &b)
              m = @_____meth_hash_____[#{sym.inspect}]
------------> #m.bind(self).call(*a, &b) unless m.nil?
            end

            class << self
              undef_method(#{sym.inspect})
            end
          END_EVAL
          $stdout.puts code # :-(
          eval code         # :-(
        end

I need to make a singleton method out of an object.  I can't just
redirect to the parent when a singleton is made, as the parent doesn't
have the same state as the child - nor should it.  My current issue is
just finding a way to change what a singleton method is bound to
binding wise for looking up self->instance_variables... (not doing so
lets them be set/used from the DelayedInstance object instead of the
@object object).

I'd most like a way to do this without just fixing the given line
(line 97 in the entire file - which is given below and at the
aforementioned website) - I dislike the idea of having to have the
@_____meth_hash_____ object, but I think that if anything will work,
it's prolly gonna be some hack similar to that.  Any help is
appreciated...

-begin

###################################################################
###################################################################
###                                                             ###
###  delayed.rb:  Thunks for Object Insantiation                ###
###  Author:           Matthew Maycock                          ###
###  Email:         _mr_bill_98@yahoo.com                       ###
###  Date:           June 16th, 2004 AD!                        ###
###                                                             ###
###  Purpose:                                                   ###
###    Delay instantiation of objects until needed!             ###
###    Overhead given by an extra indirection of dispatch!      ###
###    Use at your own risk!                                    ###
###                                                             ###
###  License:                                                   ###
###    The least restrictive license that's applicable to this  ###
###    software given that it was written in ruby and uses the  ###
###    ruby library.  I don't really know that much about such  ###
###    things, so if there isn't anything in the way, consider  ###
###    this released under the public domain, free for all!     ###
###                                                             ###
###  Problems:                                                  ###
###    eval redefining __id__ and __send__ produces warnings    ###
###     for now, they are not redefined.  I don't know how that ###
###     will play out for everything else, however.             ###
###                                                             ###
###    problem with singleton methods and how to pass them on   ###
###                                                             ###
###################################################################
###################################################################

require 'thread'

# Delay creation of an object until some method tries to use it.
class DelayedInstance < Object
  @@inst_rejects = [:__id__, :__send__].freeze
  @@clss_rejects = [:__id__, :__send__,
:singleton_method_added].freeze

  @@symbols = ([
    :==, :===, :=~, :__id__, :__send__, :class, :clone, :display,
    :dup, :eql?, :equal?, :extend, :freeze, :frozen?, :hash,:id,
    :inspect, :instance_eval, :instance_of, :instance_variable_get,
    :instance_variable_set, :instance_variables, :is_a?, :kind_of?,
    :method, :methods, :new, :nil?, :object_id, :private_methods,
    :protected_methods, :public_methods, :remove_instance_variable,
    :respond_to?, :send, :singleton_method_added,
    :singleton_method_removed, :singleton_method_undefined,
    :singleton_methods, :taint,  :tainted?, :to_a, :to_s, :type,
    :untaint
  ]).freeze


  def DelayedInstance.symbols(sym = :class)
    @@symbols - (sym == :class ? @@clss_rejects : @@inst_rejects)
  end

  def DelayedInstance.notify(&notify)
    @@notify = notify
  end
  @@notify = nil

  def initialize(klass, *kargs, &kblock)
    @object  = Object.new
    @skip    = false
    ieval    = Object.instance_method(:instance_eval)
    self_id  = self.id
    switched = false
    mutex    = Mutex.new

    switch = Proc.new {
      mutex.synchronize {
        next               if switched
        @@notify[self_id]  unless @@notify.nil?
        switched = true
        @object  = klass.send(:new, *kargs, &kblock)

        @skip = true
        @object.instance_eval {
          @_____meth_hash_____ = Hash.new
        }
        def self.method_missing(s, *a, &b)
          @object.send(s, *a, &b)
        end

        def self.singleton_method_added(sym)
          return if @skip

          mget = Object.instance_method(:method).bind(self)
          m    = mget.call(sym).unbind
          @object.instance_eval {
            @_____meth_hash_____[sym] = m
          }

          code = <<-END_EVAL
            def @object.#{sym}(*a, &b)
              m = @_____meth_hash_____[#{sym.inspect}]
              #m.bind(self).call(*a, &b) unless m.nil?
            end

            class << self
              undef_method(#{sym.inspect})
            end
          END_EVAL
          $stdout.puts code # :-(
          eval code         # :-(
        end
        @skip = false
      }
    }

    delayed_self = self
    @object.instance_eval {
      @delayed_switch = switch
      @delayed_added  = false
      @delayed_eval   = ieval.bind(delayed_self)
    }

    DelayedInstance.symbols(:instance).each {|sym|
      eval <<-END_EVAL
        def @object.#{sym.to_s}(*args, &block)
          return super(*args, &block) unless @delayed_added
          @delayed_switch[]
          @delayed_eval.call {
            @object
          }.send(#{sym.inspect}, *args, &block)
        end
      END_EVAL
    }

    Object.instance_method(:instance_eval).bind(@object).call {
      @delayed_added = true
    }
  end

  def method_missing(sym, *args, &block)
    @object.id
    method_missing(sym, *args, &block)
  end

  def singleton_method_added(sym)
    return if @skip
    @object.id
    m = Object.instance_method(:method).bind(self).call(:singleton_method_added)
    res = m.call(sym)
  end
end

DelayedInstance.symbols(:class).each {|sym|
  DelayedInstance.module_eval <<-END_EVAL
    def #{sym.to_s}(*args, &block)
      @object.send(#{sym.inspect}, *args, &block)
    end
  END_EVAL
}



if __FILE__ == $0 then

  DelayedInstance.notify {|obj_id|
    $stdout.puts "Switching with object #{obj_id}"
  }

  class Test
    def initialize(index)
      $stdout.puts "Something that takes a thousand hours..."
      @index = index
    end

    def display_data
      $stdout.puts @index
    end
  end

  $stdout.puts "Building array..."
  data = (1..4).map {|i| DelayedInstance.new(Test, i)}

  i = data[0]

  $stdout.puts "Displaying Items..."
  data.each {|d|
    d.display_data
    $stdout.puts
  }

  $stdout.puts
  foo = DelayedInstance.new(Test, 1000)
  foo.instance_eval {
    $stdout.puts "Instance Eval!"
    @santa = 100
  }
  $stdout.puts

  ivars = Object.instance_method(:instance_variables)
  ieval = Object.instance_method(:instance_eval)

  $stdout.puts
  $stdout.puts "Variables!"
  $stdout.puts foo.instance_variables.inspect
  $stdout.puts foo.instance_eval {@santa}
  $stdout.puts
  $stdout.puts ivars.bind(foo).call.inspect
  $stdout.puts ieval.bind(foo).call {@santa}

  $stdout.puts
  $stdout.puts "Define Singleton!"
  def foo.meow
    self.class.to_s
    @gagaga = 4
  end

  $stdout.puts
  $stdout.puts "Singleton, then Variables!"
  $stdout.puts foo.meow  # UnboundMethod#inspect for now.

  $stdout.puts foo.instance_variables.inspect
  $stdout.puts foo.instance_eval {@gagaga}
  $stdout.puts
  $stdout.puts ivars.bind(foo).call.inspect
  $stdout.puts ieval.bind(foo).call {@gagaga}

end


=begin
###################################################################
### OUTPUT
Building array...
Displaying Items...
Switching with object 22220152
Something that takes a thousand hours...
1

Switching with object 22193320
Something that takes a thousand hours...
2

Switching with object 22656588
Something that takes a thousand hours...
3

Switching with object 22629756
Something that takes a thousand hours...
4


Switching with object 22601604
Something that takes a thousand hours...
Instance Eval!


Variables!
["@_____meth_hash_____", "@index", "@santa"]
100

["@skip", "@object"]
nil

Define Singleton!
            def @object.meow(*a, &b)
              m = @_____meth_hash_____[:meow]
              #m.bind(self).call(*a, &b) unless m.nil?
            end

            class << self
              undef_method(:meow)
            end

Singleton, then Variables!
#<UnboundMethod: #<Class:#<DelayedInstance:0x2b1bf98>>#meow>
["@_____meth_hash_____", "@index", "@santa"]
nil

["@skip", "@object"]
nil
=end

In This Thread

Prev Next