How is Ruby the "Perlification" of Lisp?

I read that Ruby is the “Perlification” of Lisp or something to that
effect.

May some please elaborate on this?

On 1/28/07, Griff [email protected] wrote:

I read that Ruby is the “Perlification” of Lisp or something to that
effect.

Where did you read this? It’d be helpful if we knew the context of the
comment.

Griff wrote:

I read that Ruby is the “Perlification” of Lisp or something to that
effect.

May some please elaborate on this?

I don’t think it’s a particularly accurate or useful characterization of
Ruby, since Ruby started out with something neither Lisp nor Perl was
born with – “everything is an object”, objects, classes and methods.
Ruby is Ruby.


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.

On 1/29/07, M. Edward (Ed) Borasky [email protected] wrote:

I don’t think it’s a particularly accurate or useful characterization of
Ruby, since Ruby started out with something neither Lisp nor Perl was
born with – “everything is an object”, objects, classes and methods.
Ruby is Ruby.

Matz was once quoted as admitting that Ruby is a bad rip off of
Smalltalk or Lisp, that’s nicer to people. As someone with a slight
acquaintance with Scheme and Common Lisp I could say that it’s a
reasonable characterization. Ruby got the “everything is an object”
idea from Smalltalk, which in turn was greatly influenced by CLOS.
These systems are all described as systems based on the “Right Thing”
or MIT approach to design. Perl on the other hand is the very
embodiment of the “Worse-is-Better” or New Jersey approach to design.
[1] The way I see it, Ruby has become a way to combine both approaches
to get the best of both worlds.

[1] See here: The Rise of ``Worse is Better''

Dido S. wrote:

idea from Smalltalk, which in turn was greatly influenced by CLOS.
These systems are all described as systems based on the “Right Thing”
or MIT approach to design. Perl on the other hand is the very
embodiment of the “Worse-is-Better” or New Jersey approach to design.
[1] The way I see it, Ruby has become a way to combine both approaches
to get the best of both worlds.

[1] See here: The Rise of ``Worse is Better''

OK … here goes … my last rant for the weekend :slight_smile:

The message from Matz Bil K. posted:

"Ruby is a language designed in the following steps:

  • take a simple lisp language (like one prior to CL).
  • remove macros, s-expression.
  • add simple object system (much simpler than CLOS).
  • add blocks, inspired by higher order functions.
  • add methods found in Smalltalk.
  • add functionality found in Perl (in OO way).

So, Ruby was a Lisp originally, in theory.
Let’s call it MatzLisp from now on. ;-)"

Now let’s parse this:

  1. Take a simple lisp language (like one prior to CL). OK … let’s go
    all the way back to Lisp 1.5, to avoid the MIT - Stanford schism or the
    Scheme schism.

  2. Remove macros … OK … remove s-expression … WHOA, NELLIE! You’ve
    just destroyed Lisp! Lisp is s-expressions, m-expressions, and the
    fact that you can code m-expressions into s-expressions and then write
    EVAL and APPLY (and later EVALQUOTE, READ-EVAL-PRINT loops, etc. in
    Lisp. At this point, about all you have left of Lisp is LAMBDA, unless
    you want to count call-with-current-continuation, which came from
    Scheme. :slight_smile:

  3. Add simple object system (much simpler than CLOS) … OK … although
    the Ruby object system of classes, objects and methods, single
    inheritance, etc., looks to me very much like that of Java without some
    of Java’s nastier quirks … it’s much cleaner. I think of it as a
    pretty much “standard second-generation classes-objects-methods”
    structure – “humanizing” the somewhat raw but revolutionary concepts of
    Smalltalk.

  4. Add blocks, inspired by higher order functions. OK

  5. Add methods found in Smalltalk. OK … see 3 above.

6 Add functionality found in Perl (in OO way). Well … About all I’ve
seen in Ruby that looks like it’s directly coming from Perl is regular
expressions, the ability to ignore certain syntactical things like
parentheses whenever possible, constructs like “xxx if yyy”, and Perl’s
ghastly “$!” variables, which both Perl and Ruby have thankfully
translated into English. And I wouldn’t say “in OO way” – what Ruby has
done is much better than that!

First of all, regular expressions are first-class objects in Ruby, not a
confusing syntactic and semantic half-breed with strings like they are
in Perl. Second, Ruby has reflection and introspection baked right in –
the first versions of Java didn’t even have that! And finally, Ruby is
much cleaner in the way it handles the dynamic variable. In Perl, at
least the versions I learned on, variables were essentially stored as
strings until you turned them into something else, for example, by
saying “$a += 0.4;”. In Ruby, a variable is a reference to an object,
just like Java.

I think my main point in all this ranting and raving is that, while Ruby
may have “evolved from Lisp” in the thought processes of Matz, the
fundamental core of Lisp – the things that make Lisp Lisp – is long
gone in Ruby, and it’s a lot easier, for me at least, to think of Ruby
as a happy marriage of the best parts of Java and Perl, with a few
advanced constructs added from the more “theoretical” languages like
Lisp and CLU. And when I try to “think in Lisp” while programming Ruby,
I get a headache. :slight_smile: For that matter, I get a headache now when I try to
program in Lisp or Scheme. :slight_smile:


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC(P)
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.

Griff wrote:

I read that Ruby is the “Perlification” of Lisp or something to that
effect.

May some please elaborate on this?

Let’s see what our benevolent dictator has to say…

matz lisp ruby - Google Search

reveals,

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/179642

Regards,