[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby Philosophy

Darren Crotchett

12/28/2004 8:02:00 AM

I'm trying to get a feel for the philosophical differences between Smalltalk,
Ruby and Python. I realize that many of the technical differences are only
going to come from hands on experience. And, I'm sure they all have their
good and bad points. I'm just trying to get some idea of why some people
choose one of these languages over the other.

Without any point of reference, this could be a difficult question to answer.
Therefore, I thought it might be more helpful if I gave a little background
info on my experience with those languages and my level of experience in
general.

First, let me say that I am a 4th year CS student (with 3 classes left). I've
taken classes in C, C++, Ada and Smalltalk. I have done just enough C++ to
come to the conclusion that I don't like it. Ada is OK (until I get to
generics), if I have to compile something. But, Smalltalk seems to make the
most sense to me out of the languages that I've been exposed to so far.

Regarding the 3 languages in question, here is how I summarize them:

Smalltalk. I like it. Smalltalk feels "natural". It seems very intuitive,
consistent and predictable. After learning the basics, I could often guess
how to do stuff. But, I get the impression that the Smalltalk community is
shrinking (or at least, stagnate).

In class, we used Cincom's VisualWorks. VisualWorks seems like it has a lot
of nice features. But, it also has too many quirks that get on my nerves to
the extent that I couldn't actually use it unless those oddities were fixed.
I do like Smalltalk, though.

Python. Its strength seems to be its popularity. To me, however, it really
seems to lack consistency. I've read quite a bit about the Python way of
doing things. Yet, for the life of me, I can't seem to get the hang of it.
For example, I may have the wrong idea, but one thing that bugs me is the way
that "self" must be included as a parameter to the __init__ constructor
function in a class. That seems weird to me. Who else is going to call that
__init__? And, I can never seem to remember if it's str.length() or
length(str). It's like Python wants to appeal to people more familiar with C
so as to not scare off newbies. Maybe it's just me. Maybe after awhile I'll
see the consistency.

Ruby. I've been reading up on Ruby, a little. I just bought the Programming
Ruby book. It seems to be a lot like Smalltalk. I'm thinking that I like it
better than Python because it seems a lot more consistent like Smalltalk.
But, then I question, if it is good because it is a lot like Smalltalk, why
not just use Smalltalk? I'm sure there must be some good answers to this
question.

Also, is the Ruby community experiencing a lot of growth or what?

TIA,
Darren


18 Answers

gabriele renzi

12/28/2004 9:12:00 AM

0

Darren Crotchett ha scritto:

> Ruby. I've been reading up on Ruby, a little. I just bought the Programming
> Ruby book. It seems to be a lot like Smalltalk. I'm thinking that I like it
> better than Python because it seems a lot more consistent like Smalltalk.
> But, then I question, if it is good because it is a lot like Smalltalk, why
> not just use Smalltalk? I'm sure there must be some good answers to this
> question.

just my two eurocents: I try to learn Smalltalk[0] from time to time,
but It does not fit my mind perfectly, mainly due to three things.

First, I think Smalltalk is more predictable and more consistent than
ruby, but, somewhat, I don't want that kind of consistency (i.e.
#ifTrue: vs algol-like if).

The other point is the IDE integration/image based development. I can't
feel good with it, and actually, I think I really felt comfortable just
with GNU/Smalltalk because of the lack of a GUI environment(when I last
tried.. I think they have one now). Notice this is just me, I
understand. We seem to get a lot of Smalltalkish stuff in ruby in this
days (i.e. the breakpoint library somewhat feels like debug-and-continue)

Last, ruby has the 'scripting' thing, I mean, the ease of use for one
liners and quick scripts, the coarse grained library and the general
feel of "getting the job done". Just compare what Array in ruby does
with all the collection classes in Smalltalk.[1]



> Also, is the Ruby community experiencing a lot of growth or what?

I really think so, and I thing when the "Facets of Ruby" book series
from the PragProgs will come out it will grow further :D

> TIA,
> Darren

HTH.

[0] Avi, thanks for teaching me how to write it :)

[1] I'd love to have more mixins related to base classes in ruby (i.e.
Map/Association, Stringish, Readable/Writable/Seekable,) they definitely
do too much stuff becoming almost not-inheritable :/

Thursday

12/28/2004 9:40:00 AM

0

Darren Crotchett wrote:
[snip]
> Also, is the Ruby community experiencing a lot of growth or what?
>
> TIA,
> Darren
>
>

Growth can be measured in a number of ways.

I'll just mention 2 that come immediately to mind.

1. number of books on the topic

The lack of English books and documentation were Ruby's greatest area of
weakness compared to other languages. About 5 years ago, I'd be
hard-pressed to find a single Ruby book written in English.

But that has changed. We now have Programming Ruby 2nd Ed. which is hot
off the press. More well-known series of tech books now include Ruby
such as "Ruby in a Nutshell" and "Teach Yourself Ruby in 21 days". At
this rate, I wouldn't be surprised to see a "Ruby Bible" and "Ruby for
Dummies" soon. There are at least a half-dozen English books on Ruby
now, all published within the past few years.

When I visit Borders bookstore, I still don't see Ruby books on the
shelves (only one or two Ruby books--and infrequently).

2. number of people in the irc channel

Another decent indicator is the number of people in the irc channel. I
think the #ruby-lang channel has steadily grown this year. I'm guessing
it'll hit around 200 people before this time next year if it continues
growing at this rate.

Armed with better English documentation, growth rate should accelerate.
I don't know the status of other non-Japenese docs but I hope they
improve as well.


Stefan Schmiedl

12/28/2004 9:45:00 AM

0

On Tue, 28 Dec 2004 17:02:21 +0900,
Darren Crotchett <rubylang@usmstudent.com> wrote:
>
> Smalltalk. I like it. Smalltalk feels "natural". It seems very intuitive,
> consistent and predictable. After learning the basics, I could often guess
> how to do stuff. But, I get the impression that the Smalltalk community is
> shrinking (or at least, stagnate).

Ruby feels like Smalltalk without IDE. To make up for that loss, you get
regular expressions. If you liked Smalltalk, you'll like Ruby. If you
liked the Unix-approach to things, too, you'll love Ruby.

> __init__? And, I can never seem to remember if it's str.length() or
> length(str).

Python started non-OO and still carries this burden with it. Ruby OTOH
was OO from the beginning.

>
> Ruby. I've been reading up on Ruby, a little. I just bought the Programming
> Ruby book. It seems to be a lot like Smalltalk. I'm thinking that I like it
> better than Python because it seems a lot more consistent like Smalltalk.
> But, then I question, if it is good because it is a lot like Smalltalk, why
> not just use Smalltalk? I'm sure there must be some good answers to this
> question.

You can do lots of things within the Smalltalk environment, in a very
natural and consistent way. It's a little bit harder if you have to
interface to the different philosophy behind OSes like Unix, where
everything is not an object, but a (text) file.

Ruby is well suited for such file-based environments. You won't have the
natural persistence that ST objects show within a saved image. But this
can be both curse and blessing.

>
> Also, is the Ruby community experiencing a lot of growth or what?

steady growth ...
s.

Ralf Müller

12/28/2004 10:53:00 AM

0

Am Dienstag, 28. Dezember 2004 09:02 schrieb Darren Crotchett:
> I'm trying to get a feel for the philosophical differences between
> Smalltalk, Ruby and Python. I realize that many of the technical
> differences are only going to come from hands on experience. And, I'm sure
> they all have their good and bad points. I'm just trying to get some idea
> of why some people choose one of these languages over the other.
>
> Without any point of reference, this could be a difficult question to
> answer. Therefore, I thought it might be more helpful if I gave a little
> background info on my experience with those languages and my level of
> experience in general.
>
> First, let me say that I am a 4th year CS student (with 3 classes left).
> I've taken classes in C, C++, Ada and Smalltalk. I have done just enough
> C++ to come to the conclusion that I don't like it. Ada is OK (until I get
> to generics), if I have to compile something. But, Smalltalk seems to make
> the most sense to me out of the languages that I've been exposed to so far.
>
> Regarding the 3 languages in question, here is how I summarize them:
>
> Smalltalk. I like it. Smalltalk feels "natural". It seems very
> intuitive, consistent and predictable. After learning the basics, I could
> often guess how to do stuff. But, I get the impression that the Smalltalk
> community is shrinking (or at least, stagnate).
>
> In class, we used Cincom's VisualWorks. VisualWorks seems like it has a
> lot of nice features. But, it also has too many quirks that get on my
> nerves to the extent that I couldn't actually use it unless those oddities
> were fixed. I do like Smalltalk, though.
>
> Python. Its strength seems to be its popularity. To me, however, it
> really seems to lack consistency. I've read quite a bit about the Python
> way of doing things. Yet, for the life of me, I can't seem to get the hang
> of it. For example, I may have the wrong idea, but one thing that bugs me
> is the way that "self" must be included as a parameter to the __init__
> constructor function in a class. That seems weird to me. Who else is
> going to call that __init__? And, I can never seem to remember if it's
> str.length() or length(str). It's like Python wants to appeal to people
> more familiar with C so as to not scare off newbies. Maybe it's just me.
> Maybe after awhile I'll see the consistency.
>
> Ruby. I've been reading up on Ruby, a little. I just bought the
> Programming Ruby book. It seems to be a lot like Smalltalk. I'm thinking
> that I like it better than Python because it seems a lot more consistent
> like Smalltalk. But, then I question, if it is good because it is a lot
> like Smalltalk, why not just use Smalltalk? I'm sure there must be some
> good answers to this question.
>
> Also, is the Ruby community experiencing a lot of growth or what?
>
You're mixing different things:
1. for Smalltalk, you mentioned stagnation of the community: a fact, true or
false (or at least you're not satisfied)
2. for python, the popularity is good, but you get a bit annoyed, typing
strange commands: your feeling, and i know that, too.
3. for ruby: you're feeling, that it's quite near to smalltalk, so why not
smalltalk: Well:

Because, you posted that message?

to 1.: This list IS active and VERY helpfull (BTW: thanks a lot). so, if this
is the only point, forget smalltalk. But it's not, isn't it?
to 2.: ruby has such a nice grammar, that i believe, you could write poems
with it. I made the experience, that commands can be typed as I think they
can.
to 3.: Your gave the answer yourself: you're unhappy with it.

I think, you have to try ruby within something the other langs become odd.
Anyway, there is no way of telling you the advantages and disadvantages. It
seems to be something you feel.
This is not meant to be arrogant or slt. What you feel, is important, because
any language has an inner logic; and this logic should be your friend.

I tried C++, had a small Java-Project and felt that these langs do not fit to
my mind. Then i tried Perl and guess what...., Then I thougth Python would be
the best choice, but after a while i became disappointed whit it.

unfortunately my employer wants me to use bash, perl and php.
So, there is now way of using ruby in big projects. Therewith other members of
this list will be more helpfull.
But for all the tiny things, that'd waste hours and hours, I use ruby and get
them done in a few minutes (logfile analysis, code analysis, database
manipulation).



Joao Pedrosa

12/28/2004 1:00:00 PM

0

Hi,

On Tue, 28 Dec 2004 17:02:21 +0900, Darren Crotchett
<rubylang@usmstudent.com> wrote:
> I'm trying to get a feel for the philosophical differences between Smalltalk,
> Ruby and Python. I realize that many of the technical differences are only
> going to come from hands on experience. And, I'm sure they all have their
> good and bad points. I'm just trying to get some idea of why some people
> choose one of these languages over the other.

At least the word philosophy matches with Ruby. Ruby is that language
that when we don't use it, we miss it so hard. Don't forget the
supporting libraries. Ruby has some very nice libraries. Nice in the
sense that they work, they are licensed under the Ruby license, which
is a nice custom one, and Ruby as a C framework provides some nice
constructions for the C libraries, and finally, Ruby as a language
supports any library beautifully, shortly and powerfully.

The price for all the dynamic power of Ruby is that it's harder to
enable it with some tools (on the other hand, some other tools are
easier to build.) So if Ruby does not suit the project, we have to
look at other language to accomplish it. Or maybe try to bend the
project over to Ruby. :-)

That's it. Enough of blah blah blah. :)

BTW, Python sucks. :)

Cheers,
Joao


Robert Klemme

12/28/2004 1:34:00 PM

0


"Joao Pedrosa" <joaopedrosa@gmail.com> schrieb im Newsbeitrag
news:ca24287804122804595bfbe009@mail.gmail.com...
> Hi,
>
> On Tue, 28 Dec 2004 17:02:21 +0900, Darren Crotchett
> <rubylang@usmstudent.com> wrote:
> > I'm trying to get a feel for the philosophical differences between
Smalltalk,
> > Ruby and Python. I realize that many of the technical differences are
only
> > going to come from hands on experience. And, I'm sure they all have
their
> > good and bad points. I'm just trying to get some idea of why some
people
> > choose one of these languages over the other.
>
> At least the word philosophy matches with Ruby. Ruby is that language
> that when we don't use it, we miss it so hard.

Sounds like "addiction" would match fairly better than "philisophy"...
:-))

robert


PS: Yes, I'm addicted, too. ;-)

gabriele renzi

12/28/2004 4:14:00 PM

0

Thursday ha scritto:
> Darren Crotchett wrote:
> [snip]
>
>> Also, is the Ruby community experiencing a lot of growth or what?
>> TIA,
>> Darren
>>
>
> Growth can be measured in a number of ways.
>
> I'll just mention 2 that come immediately to mind.
>
> 1. number of books on the topic
>
> The lack of English books and documentation were Ruby's greatest area of
> weakness compared to other languages. About 5 years ago, I'd be
> hard-pressed to find a single Ruby book written in English.
>
> But that has changed. We now have Programming Ruby 2nd Ed. which is hot
> off the press. More well-known series of tech books now include Ruby
> such as "Ruby in a Nutshell" and "Teach Yourself Ruby in 21 days". At
> this rate, I wouldn't be surprised to see a "Ruby Bible" and "Ruby for
> Dummies" soon. There are at least a half-dozen English books on Ruby
> now, all published within the past few years.
>
> When I visit Borders bookstore, I still don't see Ruby books on the
> shelves (only one or two Ruby books--and infrequently).

notice that there are books that do not have ruby in the cover but use
it inside, the first I can think of is 'code generation in action', but
I recall there were others.

Premshree Pillai

12/28/2004 4:37:00 PM

0

Measuring a language's performance is a difficult task. ML posts and suchlike.

TIOBE software maintains a language popularity index at
http://www.tiobe.co... Language popularity indices are not
accurate, but they give an idea.

For a recent conf, I needed data on Ruby's growth. Tiobe provided me
with some data. You can see a graph of Ruby's growth here:
http://www.livejournal.com/.../...


On Wed, 29 Dec 2004 01:16:51 +0900, gabriele renzi
<rff_rff@remove-yahoo.it> wrote:
> Thursday ha scritto:
> > Darren Crotchett wrote:
> > [snip]
> >
> >> Also, is the Ruby community experiencing a lot of growth or what?
> >> TIA,
> >> Darren
> >>
> >
> > Growth can be measured in a number of ways.
> >
> > I'll just mention 2 that come immediately to mind.
> >
> > 1. number of books on the topic
> >
> > The lack of English books and documentation were Ruby's greatest area of
> > weakness compared to other languages. About 5 years ago, I'd be
> > hard-pressed to find a single Ruby book written in English.
> >
> > But that has changed. We now have Programming Ruby 2nd Ed. which is hot
> > off the press. More well-known series of tech books now include Ruby
> > such as "Ruby in a Nutshell" and "Teach Yourself Ruby in 21 days". At
> > this rate, I wouldn't be surprised to see a "Ruby Bible" and "Ruby for
> > Dummies" soon. There are at least a half-dozen English books on Ruby
> > now, all published within the past few years.
> >
> > When I visit Borders bookstore, I still don't see Ruby books on the
> > shelves (only one or two Ruby books--and infrequently).
>
> notice that there are books that do not have ruby in the cover but use
> it inside, the first I can think of is 'code generation in action', but
> I recall there were others.
>
>


--
Premshree Pillai
http://www.livejournal.com/...


gabriele renzi

12/28/2004 5:46:00 PM

0

Premshree Pillai ha scritto:
> Measuring a language's performance is a difficult task. ML posts and suchlike.
>
> TIOBE software maintains a language popularity index at
> http://www.tiobe.co... Language popularity indices are not
> accurate, but they give an idea.

The tiobe index system is (in my little worth opinion) strange in many
ways, or I just never understood it (wich is quite possible).
Could someone explain me the query they are using? what does:
+"<language> programming" -tv
really mean?


> For a recent conf, I needed data on Ruby's growth. Tiobe provided me
> with some data. You can see a graph of Ruby's growth here:
> http://www.livejournal.com/~premshree/...
>

You just made recall this thread about ruby community growth, where you
can find reference to some google stats on "programming <language>" :
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-t...

PS
do I spamm^Whinted about ruby on your blog long time ago? :)

Premshree Pillai

12/28/2004 6:05:00 PM

0

On Wed, 29 Dec 2004 02:46:53 +0900, gabriele renzi
<rff_rff@remove-yahoo.it> wrote:
> Premshree Pillai ha scritto:
> > Measuring a language's performance is a difficult task. ML posts and suchlike.
> >
> > TIOBE software maintains a language popularity index at
> > http://www.tiobe.co... Language popularity indices are not
> > accurate, but they give an idea.
>
> The tiobe index system is (in my little worth opinion) strange in many
> ways, or I just never understood it (wich is quite possible).
> Could someone explain me the query they are using? what does:
> +"<language> programming" -tv

No idea what this "-tv" option is. I think I should ask the TIOBE
folks. IAC, the Tiobe index might seem strange and all, but don't you
think in most cases it seems to depict things correctly.

Well, at least it's true in the case of Java. :)

> really mean?
>
>
> > For a recent conf, I needed data on Ruby's growth. Tiobe provided me
> > with some data. You can see a graph of Ruby's growth here:
> > http://www.livejournal.com/.../...
> >
>
> You just made recall this thread about ruby community growth, where you
> can find reference to some google stats on "programming <language>" :
> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-t...
>
> PS
> do I spamm^Whinted about ruby on your blog long time ago? :)

Didn't get ya. Explain?

>
>


--
Premshree Pillai
http://www.livejournal.com/...