Forum: Ruby How is Ruby the "Perlification" of Lisp?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
53e111a857343d7eeec2c85071e904aa?d=identicon&s=25 Griff (Guest)
on 2007-01-29 04:55
(Received via mailing list)
I read that Ruby is the "Perlification" of Lisp or something to that
effect.

May some please elaborate on this?
31e038e4e9330f6c75ccfd1fca8010ee?d=identicon&s=25 Gregory Brown (Guest)
on 2007-01-29 05:09
(Received via mailing list)
On 1/28/07, Griff <grettke@gmail.com> 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.
3bb23e7770680ea44a2d79e6d10daaed?d=identicon&s=25 M. Edward (Ed) Borasky (Guest)
on 2007-01-29 05:14
(Received via mailing list)
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.
2d3ec3a83b4f8784d6853564fa0d2e77?d=identicon&s=25 Dido Sevilla (Guest)
on 2007-01-29 10:45
(Received via mailing list)
On 1/29/07, M. Edward (Ed) Borasky <znmeb@cesmail.net> 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: http://www.jwz.org/doc/worse-is-better.html
3bb23e7770680ea44a2d79e6d10daaed?d=identicon&s=25 M. Edward (Ed) Borasky (Guest)
on 2007-01-29 15:58
(Received via mailing list)
Dido Sevilla 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: http://www.jwz.org/doc/worse-is-better.html
>
OK ... here goes ... my last rant for the weekend :)

The message from Matz Bil Kleb 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. :)

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. :) For that matter, I get a headache now when I try to
program in Lisp or Scheme. :)


--
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.
A87f7a014c624587fab0d3d78c5b9c18?d=identicon&s=25 Bil Kleb (Guest)
on 2007-09-25 23:04
(Received via mailing list)
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...

  http://www.google.com/search?q=matz+lisp+ruby

reveals,

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

Regards,
This topic is locked and can not be replied to.