A Ruby-relevant quote from Alan Kay

C

Curt Hibbs

ACM Queue just published an interview with Alan Kay (the creator of
Smalltalk), and there was one quote from the interview that I really liked
because I think that this is the approach that Matz took with Ruby:

Even if you’re designing for professional programmers,
in the end your programming language is basically
a user-interface design. You will get much better
results regardless of what you’re trying to do if you
think of it as a user-interface design.

Curt
 
D

Douglas Livingstone

Steve Wart about "why Smalltalk never caught on":

HTML 3.2? Not seen that in a while... I think it needs updated:
Replace Smalltalk with Java, and Java with Ruby :)

Douglas
 
A

Adriano Ferreira

HTML 3.2? Not seen that in a while... I think it needs updated:
Replace Smalltalk with Java, and Java with Ruby :)

Argh! Going from Smalltalk to Java is not an improvement at all.
Java's benefit compared to conventional languages like C/C++ is
automatic memory management and straight-jacket ways to do a bit of
dynamic programming (like loading classes at runtime, etc.) (and even
that not without pains).

Going from Smalltalk to Java and then to Ruby only works if you intend
to deliver great pain and misery and suddenly smooth their suffering.
I think it is a masochist strategy which I don't deserve to anyone.
 
T

Thomas Kirchner

--XsQoSWH+UP9D9v3l
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

* On Feb 11 20:42 said:
Argh! Going from Smalltalk to Java is not an improvement at all.
Java's benefit compared to conventional languages like C/C++ is
automatic memory management and straight-jacket ways to do a bit of
dynamic programming (like loading classes at runtime, etc.) (and even
that not without pains).
=20
Going from Smalltalk to Java and then to Ruby only works if you intend
to deliver great pain and misery and suddenly smooth their suffering.
I think it is a masochist strategy which I don't deserve to anyone.

I think you may have misunderstood the message - he wasn't advocating that
Smalltalk users learn Java then switch to Ruby. He was saying that the
website is now out-of-date because even Java may be falling out of
fashion. In the text of the page, "Smalltalk" should be replaced with
"Java", and "Java" with "Ruby". It might then be more accurate to today's
programming trends :)
Tom

--XsQoSWH+UP9D9v3l
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCDKv+/rVdTqQq7OwRAjUFAJ4mpJgYUTfy2+B3oyJtuD5PbSs5/ACfTIW0
149olGfelh28G7t6A+3PxDM=
=kvxG
-----END PGP SIGNATURE-----

--XsQoSWH+UP9D9v3l--
 
D

Dave Burt

Brian McCallister said:
For the OS X'ers:

curl http://hoho.dyndns.org/~holger/smalltalk.html \
| ruby -pe 'gsub!(/Smalltalk/, "Ruby")' \
&& sleep 3 \
&& rm foo.html

For the FreeBSD'ers and Linux'ers:

curl http://hoho.dyndns.org/~holger/smalltalk.html \
| ruby -pe 'gsub!(/Smalltalk/, "Ruby")' \
&& sleep 3 \
&& rm foo.html

Windows folks are on your own, sorry =/

For the Windows folk:

ruby -ropen-uri -e "puts open(
'http://hoho.dyndns.org/~holger/smalltalk.html').read.gsub(/Smalltalk/,
'Ruby')" > foo.html && start foo.html
&& ruby -e "sleep 3"
&& del foo.html

And all that needs to be one line.

Does anyone know if Windows has a line continuation thingy like *nix's
backslash (\)?

Cheers,
Dave
 
D

Douglas Livingstone

Tom

Thanks Tom, that's the meaning I was after :)

(Any feedback as to why I didn't make sense appreciated!)

Douglas
 
P

Park Heesob

Hi,
For the Windows folk:

ruby -ropen-uri -e "puts open(
'http://hoho.dyndns.org/~holger/smalltalk.html').read.gsub(/Smalltalk/,
'Ruby')" > foo.html && start foo.html
&& ruby -e "sleep 3"
&& del foo.html

And all that needs to be one line.

Does anyone know if Windows has a line continuation thingy like *nix's
backslash (\)?
You can put a caret ^ character at the end of the line to continue it.


However, be sure there are no space characters or any other whitespace
following the ^ character.
Try:

ruby -ropen-uri -e "url='http://hoho.dyndns.org/~holger/smalltalk.html'" ^
-e "puts open(url).read.gsub(/Smalltalk/,'Ruby')" > foo.html ^
&& start foo.html && ruby -e "sleep 3" && del foo.html

Regards,
Park Heesob
 
C

Curt Sampson

Without offense, one can say that Ruby is Smalltalk made right (or at
least one way to make it right).

If if by "making it right" you mean going back to imperative languages
and irregular syntax.

Smalltalk already had pretty good iterators; why add the imperative
"while"? Smalltalk itself is so powerful that it doesn't even have an
"if" statement. Ruby is that powerful too, but a lot more awkward.
(It's probably more awkward because it does have an "if" statement and
therefore never had to make things like a generic block statement that
was as syntatically light as possible.)

And I find the highly irregular syntax very frustrating. What does
something in braces mean, for example? It depends on where it appears
in the program. Why do I use one syntax when passing only one block to
a method, but a different syntax when passing two? And so on. Irregular
syntax combined with too many different ways of doing things makes
learning much harder, becuase you can't naturally work out how to do
things, you need to discover the tricks.

(I just about fell over when I discovered you could use "rescue" before
"end" for a function, as well as after a "begin." But you can't use it
for "if". There seems to be no logic you can use to guide you to say
where you can and can't use it.)

I think ruby has been reasonably successful for a couple of reasons.

1. One thing it did get right was to integrate well into the Unix
environment. If we had a good Smalltalk that did that, I'd be all
over it.

2. Java has been around along enough that many programmers have absorbed
the incremental improvements it offered over C++ and other languages of
the day, and are now starting to discover how backward in many was Java
really is. So now they're ready for another incremental improvement--but
not one that's to big. Not a language, for example, without "if" statements.

Ruby did get some other stuff right, such as having continuations in
the language, but I don't think that sort of thing was much of a factor
in its success. There will be a day when we nobody will take a language
without continuations seriously, but that day is not here yet. (And the
day where nobody takes seriously a language without type inference is
even further away.)

cjs
 
J

Joao Pedrosa

Hi,

If if by "making it right" you mean going back to imperative languages
and irregular syntax.

Smalltalk already had pretty good iterators; why add the imperative
"while"? Smalltalk itself is so powerful that it doesn't even have an
"if" statement. Ruby is that powerful too, but a lot more awkward.
(It's probably more awkward because it does have an "if" statement and
therefore never had to make things like a generic block statement that
was as syntatically light as possible.)

And I find the highly irregular syntax very frustrating. What does
something in braces mean, for example? It depends on where it appears
in the program. Why do I use one syntax when passing only one block to
a method, but a different syntax when passing two? And so on. Irregular
syntax combined with too many different ways of doing things makes
learning much harder, becuase you can't naturally work out how to do
things, you need to discover the tricks.

(I just about fell over when I discovered you could use "rescue" before
"end" for a function, as well as after a "begin." But you can't use it
for "if". There seems to be no logic you can use to guide you to say
where you can and can't use it.)

I think ruby has been reasonably successful for a couple of reasons.

1. One thing it did get right was to integrate well into the Unix
environment. If we had a good Smalltalk that did that, I'd be all
over it.

2. Java has been around along enough that many programmers have absorbed
the incremental improvements it offered over C++ and other languages of
the day, and are now starting to discover how backward in many was Java
really is. So now they're ready for another incremental improvement--but
not one that's to big. Not a language, for example, without "if" statements.

Ruby did get some other stuff right, such as having continuations in
the language, but I don't think that sort of thing was much of a factor
in its success. There will be a day when we nobody will take a language
without continuations seriously, but that day is not here yet. (And the
day where nobody takes seriously a language without type inference is
even further away.)

Nice post. Maybe Smalltalk is more like the old Unixes and Ruby is
more like Linux. Do you like Linux/FreeBSD, by the way? :)

Cheers,
Joao
 
M

Martin DeMello

Curt Sampson said:
Ruby did get some other stuff right, such as having continuations in
the language, but I don't think that sort of thing was much of a factor
in its success. There will be a day when we nobody will take a language
without continuations seriously, but that day is not here yet. (And the
day where nobody takes seriously a language without type inference is
even further away.)

I'm just waiting for the day when no one will take a language without
closures seriously.

martin
 
C

Csaba Henk

in the program. Why do I use one syntax when passing only one block to
a method, but a different syntax when passing two?

That one block thing is just what needed in the 92% of cases. So I think it was
reasonable to choose this as the thing to be sugared to death.

If you think a little bit, you'll see that you couldn't put together a
similarly comofortable sugaring scheme such that it's usable for passing
multiple blocks/procs in a sugared way.

Csaba
 
C

Curt Hibbs

Csaba said:
That one block thing is just what needed in the 92% of cases. So
I think it was
reasonable to choose this as the thing to be sugared to death.

If you think a little bit, you'll see that you couldn't put together a
similarly comofortable sugaring scheme such that it's usable for passing
multiple blocks/procs in a sugared way.

That's a limitation of the Ruby syntax. I think Curt's point was that at
least as far as syntax was concerned that Smalltalk got it right. There is
no such special case or syntax in Smalltalk - everything is very consistent.

- The other Curt
 
W

William Morgan

Excerpts from Curt Sampson's mail of 18 Feb 2005 (EST):
If if by "making it right" you mean going back to imperative languages
and irregular syntax.

I don't know Smalltalk, so perhaps I'm misrepresenting your claims. But
I know Lisp and Scheme and I often see similar claims made by their
proponents.

I think syntatic elegance is a distraction. *Conceptual* elegance is
good, in terms of what the language allows one to do and how the API is
structured. But I would happily swallow any amount of irregular syntax
if it meant I had to hit fewer keystrokes to accomplish the same thing.

Yes, Ruby's block syntax is "irregular" in that we could just be using
lambda { } everywhere and have a nice uniform way for passing any number
of lambdas to a function. And Ruby code would be ten times as irritating
to write. Yes, we could replace variables with block-level "let/let*"
statements and do away with the "evils" of imperative languages. And
Ruby would be ten times as annoying to write.

(And this applies to modifying code too. If I want to do a quick
debug-by-printing, I don't want to have to move back and forth inserting
parentheses in weird places. Let me just insert a print statement with a
mininum of effort, for cryin' out loud.)

So, irregular/impure/non-elegant syntax doesn't bother me. Shit, I speak
English. Mainly I just want to type less.
There will be a day when we nobody will take a language without
continuations seriously, but that day is not here yet.

I dunno. In a language with threads and exceptions, I don't think
continuations are quite as useful as they once were. I've see one really
good usage in Ruby (generator.rb), and a couple "cute" uses.
(And the day where nobody takes seriously a language without type
inference is even further away.)

Couldn't disagree more about the desirability of that feature. But
that's another discussion. :)
 
B

Bill Kelly

From: "Curt Sampson said:
If if by "making it right" you mean going back to imperative languages
and irregular syntax.

Smalltalk already had pretty good iterators; why add the imperative
"while"? Smalltalk itself is so powerful that it doesn't even have an
"if" statement. Ruby is that powerful too, but a lot more awkward.
(It's probably more awkward because it does have an "if" statement and
therefore never had to make things like a generic block statement that
was as syntatically light as possible.)

And I find the highly irregular syntax very frustrating. What does
something in braces mean, for example? It depends on where it appears
in the program. Why do I use one syntax when passing only one block to
a method, but a different syntax when passing two? And so on. Irregular
syntax combined with too many different ways of doing things makes
learning much harder, becuase you can't naturally work out how to do
things, you need to discover the tricks.

I love elegant syntax. That Smalltalk didn't need an "if"
statement was something that instantly attracted me to the
language.

Smalltalk and Lisp are at the pinnacle of elegant simplicity
in language design, to me.

And yet I think Matz has accomplished something truly unique,
and equally impressive, in finding a way to blend the best
traits of Smalltalk and Perl. I used to literally think to
my self, If only there were a way to have the best of
Smalltalk and Perl, . . . and before I stumbled upon Ruby,
I used to laugh that off as an impossibility.

True, the syntax winds up nowhere near as simple as Smalltalk
or Lisp. Interestingly one of the slides in one of Matz'
presentations on Ruby was entitled, "Simplicity is NOT a Goal" -
http://www.rubyist.net/~matz/slides/oscon2003/mgp00047.html

But it Matters to me that in Ruby I can do things like:

ruby -e "puts ARGF.read.scan(/\d+\.\d+\.\d+\.\d+/).uniq.sort"

or:

ruby -i -pe 'gsub(/#!\\Perl\\bin\\perl.exe/, "#!/usr/bin/perl")' *.cgi


I think that Ruby's design is extremely elegant; just not
extremely simple.

(As a side note, I've found it amazing how many of the
guiding precepts and philosophies Matz enumerates in his
slides about Ruby's design are almost tangibly visible in
ruby itself. I don't know if I'm explaining myself
adequately here; I just compare that to an imaginary list
of slides for the guiding principles behind the design
of the Visual Basic syntax, which I imagine would read,
"Duhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh." :)


I guess primarily what I'm trying to get across is that
while I agree about the amazing genius simplicity of
Smalltalk syntax, instead of finding ruby's "highly
irregular syntax" frustrating, I find it powerful (and
still elegant, even if not simple.)


Regards,

Bill
 
J

James G. Britt

So, irregular/impure/non-elegant syntax doesn't bother me. Shit, I speak
English.


Aaah!

Nearly spit my coffee all over my laptop.

Funniest thing I've read all week. My vote for Ruby quote of the month.

James
 
C

Csaba Henk

I love elegant syntax. That Smalltalk didn't need an "if"
statement was something that instantly attracted me to the
language.

What do you mean by "needing" if? Ruby neither needs if, it just has it.
You can define if/then/else type methods for objects with a few line of
Ruby code easily (without using "and", "case" and any other
conditional-like construct, of course, I mean it that way). I made it up
to have

loop {
gets.ifthen {
puts "you fed me a line"
}.else {
puts "bye"; exit
}
}

as valid code.

If we had such a thing as the official way to say "if", the elsif parts
would tend to look awkward.

Csaba
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,008
Latest member
HaroldDark

Latest Threads

Top