From: James Mills on
On Tue, Jun 22, 2010 at 6:58 PM, Josef Tupag <joseftupag(a)gmail.com> wrote:
> Before I really dive in, though, I'm curious to hear what others think about
> the choice between these two languages.

This is a terribly subjective opinion and I apologize to anyone that
actually uses
Ruby and likes it :)

I find Ruby (compared to Python) to be a syntactical rip-off and
a bad one at that. Some things in Ruby aren't nearly as simple or
as concise as you would find in Python.

When it comes to "Web Frameworks" IHMO, I believe Python has
a lot wide variety of tools available to you, not just Django,
TurbotGears, Pylons, etc. (I can't comment on Ruby).

Aside from my not liking some of Ruby's syntax or semantics
I found Ruby on Rails to be awful. I went through it's turotial
a few months back and didn't even make the first couple of pages
before I got utterly bored with reading.

So there you go...

Sorry I can't offer you a real objective response!

cheers
James
From: Jean-Michel Pichavant on
Josef Tupag wrote:
>
> I've been programming (when I do program) mainly in Perl
> <http://www.perl.org/> for the last 10 years or so. But I've been
> itching to learn a new language for a while now, and the two near the
> top of the list are Ruby <http://www.ruby-lang.org/> and Python
> <http://python.org/>.
>
> I figure that Ruby would be easy to learn because of its similarity to
> Perl (I'm told). But I also figure that Python would be easy to learn
> because of its simplicity. And when it comes to webby stuff, I can use
> Rails <http://www.rubyonrails.org/> with Ruby and Django
> <http://www.djangoproject.com/> with Python.
>
> I'm currently leaning toward Python and began doing so last week. I
> started with Mark Pilgrim's excellent Dive Into Python
> <http://diveintopython.org/> and made it thru the first 3 chapters
> pretty quickly. So far it feels pretty good.
>
> Before I really dive in, though, I'm curious to hear what others think
> about the choice between these two languages.
>
> (On a related note, you might also read Tim Bray's On Ruby
> <http://www.tbray.org/ongoing/When/200x/2006/07/24/Ruby> post, since
> he just started learning Ruby.)
>
>
> Josef Tupag - best humidifier <http://thebesthumidifiers.com>
>
>
Hello,

This is a python list, fully dedicated to our dutch semi God. So how can
you even immagine that someone here will suggest you to go for rub...
sorry I can't prononce this blasphemous name.

JM


From: James Mills on
On Tue, Jun 22, 2010 at 7:29 PM, Jean-Michel Pichavant
<jeanmichel(a)sequans.com> wrote:
> This is a python list, fully dedicated to our dutch semi God. So how can you
> even immagine that someone here will suggest you to go for rub... sorry I
> can't prononce this blasphemous name.

Good call :) (Personally - and again sorry if there are any
Python/Rub* dualists!) -- When I came across Rub* I found it to
be just a rip-off of Python (in some respects) and couldn't understand
how it became popular so quickly :)

It's not that great really!

--James

--
--
-- "Problems are solved by method"
From: lkcl on
On Tue, Jun 22, 2010 at 6:58 PM, Josef Tupag <joseftu...(a)gmail.com>
wrote:
> Before I really dive in, though, I'm curious to hear what others think about
> the choice between these two languages.

i think one good illustration is a story i heard from someone who had
learned a hell of a lot of programming languages, but didn't know
python. he decided one day to try it and, without looking closely at
a manual, literally guessed his way through the syntax:

"how do you do lists? let's try square brackets. oh look, that
worked! ok.. um... how do you do arrays? let's try curly brackets.
oh look, that worked! ok, what are they called? ahh, dictionaries.
how quaint. ok, how do you do if statements? ok.... let's try the
woordd if! ok, that worked - hmmm, how do you terminate them? let's
tryyy... a colon - great - that worked! hmmm, what's with this three
dots on the python prompt, now? ok, let's put in some spaces. ah
ha! that worked!"

when compared to other programming languages, three things stand out
clearly for me:

1) it's actually readable. especially when you use colour syntax
highlighting (such as vim) which i thoroughly, thoroughly recommend:
giving yourself those visual cues that keywords are in yellow,
comments are in blue, strings in purple, it increases productivity
*massively* as you scan through reams of text, jumping to the correct
location, finding what you want, based on blocks of colour *first*,
and the characters second.

2) it's beautiful / tidy. the use of fixed/identical indentation to
specify a "block" _forces_ the developer to be "tidy". i've seen some
developers - perl mostly - _actively_ discouraged and hostile to perl
because of this, and to be frank, that's a good thing.

3) it's a dynamic and a compact language. i remember seeing that
comparison of python and lisp, which happened to include some java
statements as well. _six_ lines of java to do what you can do in a
few characters of python - and about two in scheme :)

so whilst ruby may be dynamic and compact, it's not beautiful,
readable or obvious as to what's going on. i look at a python
program, and it uses actual... like... y'know... words that make
sense. i look at a ruby program and i simply cannot say the same, not
even if you put code which is supposed to do exactly the same job.

l.
From: Thomas Jollans on
On 06/22/2010 10:58 AM, Josef Tupag wrote:
> I've been programming (when I do program) mainly in Perl
> <http://www.perl.org/> for the last 10 years or so. But I've been
> itching to learn a new language for a while now, and the two near the
> top of the list are Ruby <http://www.ruby-lang.org/> and Python
> <http://python.org/>.
>
> I figure that Ruby would be easy to learn because of its similarity to
> Perl (I'm told). But I also figure that Python would be easy to learn
> because of its simplicity. And when it comes to webby stuff, I can use
> Rails <http://www.rubyonrails.org/> with Ruby and Django
> <http://www.djangoproject.com/> with Python.
>
> I'm currently leaning toward Python and began doing so last week. I
> started with Mark Pilgrim's excellent Dive Into Python
> <http://diveintopython.org/> and made it thru the first 3 chapters
> pretty quickly. So far it feels pretty good.
>
> Before I really dive in, though, I'm curious to hear what others think
> about the choice between these two languages.

Ruby has a bunch of strange syntactical zits: I mean, @instancevariable,
@@classvariable, $GLOBAL, and whatnot?? I don't like them, I find
Python's syntax cleaner, easier on the eye, and the finger.

It's all a matter of taste. You should probably look into Ruby too, at
least a bit. I can think of one single point where Python probably wins
hands-down: it comes with batteries included. The standard library is
great, and I don't think Ruby has anything like it. There are rubygems,
of course, but there is also the PyPI.

"Everything is an object" in both languages, or so they say. But what
that means is different. If you're coming from Perl 5, you probably
won't care much anyway. I personally prefer Python's [methods are
functions are objects] to Ruby's [functions are methods are
messages-to-objects]. Ah well

To get really religious, and Ruby violates quite a few of these,
>>> import this
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
>>>


[Community!]
Ruby is almost only used on Rails and in Japan. We're much more
universal, and more friendly ! ;-)

-- Thomas

>
> (On a related note, you might also read Tim Bray's On Ruby
> <http://www.tbray.org/ongoing/When/200x/2006/07/24/Ruby> post, since he
> just started learning Ruby.)
>
>
> Josef Tupag - best humidifier <http://thebesthumidifiers.com>
>
>