[#11822] RCR: Input XML support in the base Ruby — Dave Thomas <Dave@...>

15 messages 2001/03/01

[#11960] Not Ruby, for me, for the moment at least — "Michael Kreuzer" <mkreuzer@... (nospam)>

I wrote on this newsgroup last weekend about how I was considering using

11 messages 2001/03/04

[#12023] French RUG ? — "Jerome" <jeromg@...>

Hi fellow rubyers,

16 messages 2001/03/05

[#12103] disassembling and reassembling a hash — raja@... (Raja S.)

Given a hash, h1, will the following always hold?

20 messages 2001/03/06

[#12204] FEATURE REQUEST: 'my' local variables — Leo Razoumov <see_signature@127.0.0.1>

Ruby is, indeed, a very well designed language.

64 messages 2001/03/07
[#12250] Re: FEATURE REQUEST: 'my' local variables — Leo Razoumov <see_signature@127.0.0.1> 2001/03/07

>>>>> "GK" == GOTO Kentaro <gotoken@math.sci.hokudai.ac.jp> writes:

[#12284] Re: FEATURE REQUEST: 'my' local variables — gotoken@... (GOTO Kentaro) 2001/03/08

In message "[ruby-talk:12250] Re: FEATURE REQUEST: 'my' local variables"

[#12289] Re: FEATURE REQUEST: 'my' local variables — matz@... (Yukihiro Matsumoto) 2001/03/08

Hi,

[#12452] Re: FEATURE REQUEST: 'my' local variables — gotoken@... (GOTO Kentaro) 2001/03/12

In message "[ruby-talk:12289] Re: FEATURE REQUEST: 'my' local variables"

[#12553] Re: FEATURE REQUEST: 'my' local variables — Dave Thomas <Dave@...> 2001/03/13

matz@zetabits.com (Yukihiro Matsumoto) writes:

[#12329] Math package — Mathieu Bouchard <matju@...>

18 messages 2001/03/09

[#12330] Haskell goodies, RCR and challenge — Robert Feldt <feldt@...>

Hi,

19 messages 2001/03/09
[#12374] Re: Haskell goodies, RCR and challenge — matz@... (Yukihiro Matsumoto) 2001/03/10

Hi,

[#12349] Can Ruby-GTK display Gif Png or Jpeg files? — Phlip <phlip_cpp@...>

Ruby-san:

20 messages 2001/03/09

[#12444] class variables — Max Ischenko <max@...>

14 messages 2001/03/12

[#12606] Order, chaos, and change requests :) — Dave Thomas <Dave@...>

17 messages 2001/03/14

[#12635] email address regexp — "David Fung" <dfung@...>

i would like to locate probable email addresses in a bunch of text files,

12 messages 2001/03/14

[#12646] police warns you -- Perl is dangerous!! — Leo Razoumov <see_signature@127.0.0.1>

I just read this story on Slashdot

14 messages 2001/03/14
[#12651] Re: police warns you -- Perl is dangerous!! — pete@... (Pete Kernan) 2001/03/14

On 14 Mar 2001 11:46:35 -0800, Leo Razoumov <see_signature@127.0.0.1> wrote:

[#12691] Re: police warns you -- Perl is dangerous!! — "W. Kent Starr" <elderburn@...> 2001/03/15

On Wednesday 14 March 2001 15:40, Pete Kernan wrote:

[#12709] [OFFTOPIC] Re: police warns you -- Perl is dangerous!! — Stephen White <spwhite@...> 2001/03/16

On Fri, 16 Mar 2001, W. Kent Starr wrote:

[#12655] Re: FEATURE REQUEST: 'my' local variables — "Benjamin J. Tilly" <ben_tilly@...>

>===== Original Message From Leo Razoumov <see_signature@127.0.0.1> =====

18 messages 2001/03/14

[#12706] Library packaging — "Nathaniel Talbott" <ntalbott@...>

I have a project that I'm working on that needs to live two different lives,

30 messages 2001/03/16

[#12840] Looking for a decent compression scheme — Dave Thomas <Dave@...>

14 messages 2001/03/19

[#12895] differences between range and array — "Doug Edmunds" <dae_alt3@...>

This code comes from the online code examples for

16 messages 2001/03/20
[#12896] Re: differences between range and array — "Hee-Sob Park" <phasis@...> 2001/03/20

[#12899] Re: differences between range and array — Jim Freeze <jim@...> 2001/03/20

On Tue, 20 Mar 2001, Hee-Sob Park wrote:

[#12960] TextBox ListBox — Ron Jeffries <ronjeffries@...>

Attached is a little Spike that Chet and I are doing. It is a

13 messages 2001/03/20

[#12991] [ANN] Lapidary 0.2.0 — "Nathaniel Talbott" <ntalbott@...>

Well, here's my first major contribution to the Ruby world: Lapidary. It's a

16 messages 2001/03/20

[#13028] mkmf question — Luigi Ballabio <luigi.ballabio@...>

15 messages 2001/03/21

[#13185] Reading a file backwards — "Daniel Berger" <djberg96@...>

Hi all,

21 messages 2001/03/25
[#13197] Re: Reading a file backwards — "Daniel Berger" <djberg96@...> 2001/03/25

> Hi Dan,

[#13203] Re: Reading a file backwards — Mathieu Bouchard <matju@...> 2001/03/25

On Sun, 25 Mar 2001, Daniel Berger wrote:

[#13210] Re: Reading a file backwards — "Daniel Berger" <djberg96@...> 2001/03/25

"Mathieu Bouchard" <matju@sympatico.ca> wrote in message

[#13374] Passing an array to `exec'? — Lloyd Zusman <ljz@...>

I'd like to do the following:

15 messages 2001/03/31

[#13397] Multidimensional arrays and hashes? — Lloyd Zusman <ljz@...>

Is it possible in ruby to make use of constructs that correspond to

14 messages 2001/03/31

[ruby-talk:13249] Re: Randal in Ruby-land? (was: email address regexp)

From: "Benjamin J. Tilly" <ben_tilly@...>
Date: 2001-03-27 20:38:01 UTC
List: ruby-talk #13249
>===== Original Message From Mathieu Bouchard <matju@sympatico.ca> =====
><rant>
>
???
>
>On Tue, 27 Mar 2001, Benjamin J. Tilly wrote:
>> - Perl's tie is being done in Ruby - right.  In Perl there is
                ^^^^^^^^^^^^^
>>   a basic syntactic wall between dealing with an object as an
>>   object and dealing with it as a drop-in replacement for a
>>   native data-type.  Ruby's syntax makes this a non-issue.
>
>Well, I haven't seen the "tie" feature in Ruby. You can't just call Ruby's
>syntax an implementation of "tie".

I did not say that it was done.  I said being done.  For a
reason.  I am well aware that, despite much hard work on
your part, it isn't done yet.  But when you are happy with
it, it will be better than what Perl has because you are
able to work with the language to extend it rather than
fighting the syntax.

>In Ruby there is a basic public relations wall between dealing with an
>object as an object and dealing with it as a drop-in replacement for a
>native data-type.

I am aware of that.  The point being that native data-types
have a lot of functionality that people take for granted.
A lot of that is syntactic sugar.  One of the things that
Perl's tie facility does - and the "only" thing you need to
do - is translate from a minimal internal interface from
which the richer visible one can theoretically be provided,
and the richer interface that people may expect to be there.

The other thing that is needed in Perl is low-level support
to translate from basic syntax to method calls.  This is the
part you *don't* have to do in Ruby.

>The Ruby community's standard lie is that you only have to define #[] and
>#[]=. This is from the people who have never really considered doing so.

I doubt that many who understand the original in Perl would
claim that.  Conversely most who claim that probably do not
understand the full power of the original.

>To implement those two methods you need to work out negative indices,
>slice by length (with negative indices), slice by range (with negative
>indices bypassing the semantics of range), expanding array with default
>value 'nil', handling out-of-bounds fetching, and if you are implementing
>String, you also have to handle slice by string and slice by regexp.
>And you have to raise errors when you need to. By the time you succeed you
>have filled a few pages, and that's only 2 methods.

Yup.

>Perl's "tie" is by all standards a hack. However, from a user's point of
>view, it _works_, and as an idea it _works too_. This is why I have
>written MetaRuby in the first place: to bring that idea to Ruby. And this
>is also why I am rejecting any requests to make MetaRuby "less like Perl".

Allow me to say it another way then.

When Larry Wall chose Perl's native data structures he chose a
small circle of ideas that play very well together for a wide
range of natural problems.  For each data type he put in the
ability to do many types of operations that people often want
to do.  Ruby largely lifted this design.

Therefore Ruby has a fairly small number of very rich native
data types.  Imitating those is a lot of work because of the
richness of the interface.  However that same richness is tied
to how convenient it is to use.  Look through the functionality
that is offered by Array, String, and Hash.  There is a lot of
meat there, meat that your programs use all of the time.  For
someone to build a new and interesting Array, String, and Hash
*AND* have them be able to transparently be used where the
current data types are used, all of that functionality needs
to be provided.

Sure, you can boil down everything that you do to a small
number of simple operations.  If existing Ruby code only used
the same limited operations, then matching the interface
would be easy.  But the interface exists because it is used,
and the syntactic sugar has value.

>But one thing MetaRuby can't do yet is make the delusions go away. I plan
>to add that feature around version 1.618034, and clearly I'm not there
>yet.

Perhaps a few more of these rants will help?

Cheers,
Ben

In This Thread

Prev Next