Python vs Ruby

Considering the ability to plug in C code with Ruby.... how about just a "C"? :slight_smile:

ยทยทยท

On Tue, 11 Jan 2005 04:26:20 +0900, Stephen Kellett <snail@objmedia.demon.co.uk> wrote:

In message <41E2C87E.8010508@cronosys.com>, Alan Garrison > <alang@cronosys.com> writes
>RAP = Ruby + Apache + PostgreSQL? :wink: Though various people's tastes
>in music may lean against this.

Yeah, I'm trying to think of a tool beginning with 'C' that can go on
the front :slight_smile:

No fair stealing the acronym I came up with for my "Commercial
Reporting And Planning" application :wink:

ยทยทยท

On Tue, 11 Jan 2005 04:26:20 +0900, Stephen Kellett <snail@objmedia.demon.co.uk> wrote:

In message <41E2C87E.8010508@cronosys.com>, Alan Garrison > <alang@cronosys.com> writes
>RAP = Ruby + Apache + PostgreSQL? :wink: Though various people's tastes
>in music may lean against this.

Yeah, I'm trying to think of a tool beginning with 'C' that can go on
the front :slight_smile:
--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk
RSI Information: http://www.objmedia.demon.co.uk/rsi.html

--
Regards,
Jason
http://blog.casey-sweat.us/

> Wash your mouths out, guys. In English, "serious" is a highly
> derogatory and offensive and dull term. Get that out.

If serious programmers can't talk about ducks, I'm out of here!

Yes, "serious" programmers can write in every language regardless of
syntax or flavor. New languages should be infinitely easy to pick up
once you have the basic concepts down. But it's the languages they
choose for themselves that are the truly beautiful ones -- the ones
people need to pay attention to.. (Python and Ruby are both cool in
my book, but the level of fun to be had with blocks is unrivalved).

I guess everbody has their own tastes. Matz created something _he_
wanted. Many others liked what he created,

ยทยทยท

On Tue, 11 Jan 2005 22:57:14 +0900, Michael DeHaan <michael.dehaan@gmail.com> wrote:

--
Premshree Pillai

>I think the current balance between backets and begin/end in ruby is
>very good.

it might seem like that if you know ruby really well and use a lot of
the {|x| ...} syntax...

i find my code still has an inordinate amount of begin/end blocks
so my code looks amateurish compared to what i've seen here...

I don't think that's right. It's just a matter of preference. Nothing
to do with how well you can program.

ยทยทยท

On Mon, 10 Jan 2005 22:41:25 +0900, tony summerfelt <snowzone5@hotmail.com> wrote:

On Mon, 10 Jan 2005 14:16:22 +0100, you wrote:

as i learn more efficient ruby that will diminish...
http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org

--
Premshree Pillai

benjamin.ferrari wrote:
...

16:20:18-ferrari@herrober:~$ python
Python 2.3.3 (#1, May 18 2004, 19:29:58)
[GCC 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import this

The Zen of Python, by Tim Peters
...
Although that way may not be obvious at first unless you're Dutch.

"It also makes sense if you grew up Pennsylvania Dutch [...]"

Bruce Eckle, commenting on the readability of a given Ruby example.

http://onthethought.blogspot.com/2005/01/thinking-in-ruby-not.html

James

or does 'the ruby way' mean the freedom to write ruby code the way you
see fit...

larry wall has said of perl code 'if it works, then it's right' or
something along those lines)

i've written some horrendous perl code in 2 or 3 minutes but it
worked when it needed to so i was happy...
http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org

ยทยทยท

On Tue, 11 Jan 2005 00:32:31 +0900, you wrote:

On the other hand, I've read comments (not here) to the effect that the
phrase "The Ruby Way" implies that there is but one correct way to do
things (as opposed to "A Ruby Way" of doing something).

* tony summerfelt <snowzone5@hotmail.com> [0152 15:52]:

>perl otoh, goes very wrong,

and i think perl6 is going to be very wronger...i wish larry wall
would stop listening to the python complains about perl...they aren't
gonna use perl6 anyway...and from the sounds of it a lot of current
perl programmers won't either...

the perl oo always felt tacked on to me...most of the perl code i
write is perl4 anyway...

> it provides many many ways
>of doing the same thing. and none of them sensible :slight_smile:

they make sense to a perl programmer :slight_smile:

*A* perl programmer, yes.

Trouble is, it usually doesn't make as much sense to all the other perl
programmers. Or the same programmer in nine months time.

I quite liked perl until I stayed in the same job for more than 2 years,
and had to maintain those scripts I threw at the interpreter when they
stuck.

I've found ruby is more productive in the short term, so I get to spend
some time building maintenance into the script and save time in the long
term too.

ยทยทยท

On Tue, 11 Jan 2005 00:03:43 +0900, you wrote:

--
'The pie is ready. You guys like swarms of things, right?'
    -- Bender
Rasputin :: Jack of All Trades - Master of Nuns

>perl otoh, goes very wrong,

and i think perl6 is going to be very wronger...i wish larry wall
would stop listening to the python complains about perl...they aren't
gonna use perl6 anyway...and from the sounds of it a lot of current
perl programmers won't either...

the perl oo always felt tacked on to me...most of the perl code i
write is perl4 anyway...

Perl OO is terrible, but things are better with Perl 6.

ยทยทยท

On Tue, 11 Jan 2005 00:51:49 +0900, tony summerfelt <snowzone5@hotmail.com> wrote:

On Tue, 11 Jan 2005 00:03:43 +0900, you wrote:

> it provides many many ways
>of doing the same thing. and none of them sensible :slight_smile:

they make sense to a perl programmer :slight_smile:

http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org

--
Premshree Pillai

A few things to think about for those that worry about popularity.

(1) One learns a language because one learns something from learning
a language, not because the language is immediately the
end-all-beat-all. I still want to play with O'Caml and Haskell, and
I doubt I'll ever use them "for work".

This is true for some folks; I wonder that's the case for a majority:
a lot of folks learn languages not necessarily because they are going
to use it; unfortunately, though, that lot, I suspect, is much lesser
than the other lot.

I use a lot of Ruby for my own projects, but _cannot_ use it for work.
Why? Because my colleagues don't know about it.

(2) If we must chose what is widely adopted, we would always use Java
for every project -- or we might be stuck on Cobol. This is not the
case, as one can always choose the right tool for the job. That tool
is probably not Ruby in 1/2 the cases out there, but that doesn't
lessen Ruby's value. To mix metaphors, some people are always
looking for hammers in their toolbox, or sometimes swiss army knives.
Sometimes you need a torque wrench. It depends. Knowing "more"
can never hurt.

(3) However it is very clear that languages can grow in popularity
from the bottom up. Use a little Ruby on a special homebrew project,
use it on some build machines at work, and pretty soon you've

The whole point about educating people about Ruby is that people know
the _existence_ of the language. People can then make an informed
choice. Ideally, every programmer in the world should be made aware of
Ruby; and that probably is what evangelizers should set as their goal.

converted 1 or more new people to Ruby. Nothing wrong with that.
Ruby adoption levels do not prevent you from using it.

(4) Ruby popularity isn't as small as one might think. I have the
Python list and the Ruby list side-by-side in GMail right now, and the
Ruby list is 80% as active as the Python list. Not bad!

Same here. But generally I've observed around 60% activity as the Python list.

ยทยทยท

On Tue, 11 Jan 2005 04:24:27 +0900, Michael DeHaan <michael.dehaan@gmail.com> wrote:

I really don't think Python-fans are wrong in the least. It's a
decent language, and some of the decisions such as playing down lambda
and the blocks type approach means solutions are developed differently
-- but that doesn't make them wrong. I like list comprehensions,
for instance.

If you can grok the "C" and kernel development mindsets, a lot of this
makes sense. Simplicity and obviousness mean a lack of cleverness at
face value, but they are very practical, straight forward, and easy to
understand for the most part. Those goals aren't all bad.
Personally, I'm looking for convergence, not distance between the
languages.

--
Premshree Pillai

Play with them as long as you want !

I can bet you will use them in work, once you will find they are better
than your current one. Or, someday you will find yourself that you are
not playing with them anymore because its worthless.

ยทยทยท

On Mon, 2005-01-10 at 14:24, Michael DeHaan wrote:

A few things to think about for those that worry about popularity.

(1) One learns a language because one learns something from learning
a language, not because the language is immediately the
end-all-beat-all. I still want to play with O'Caml and Haskell, and
I doubt I'll ever use them "for work".

--
MOhammad

(2) If we must chose what is widely adopted, we would always use Java
for every project -- or we might be stuck on Cobol. This is not the
case, as one can always choose the right tool for the job. That tool
is probably not Ruby in 1/2 the cases out there, but that doesn't
lessen Ruby's value. To mix metaphors, some people are always
looking for hammers in their toolbox, or sometimes swiss army knives.
Sometimes you need a torque wrench. It depends. Knowing "more"
can never hurt.

(3) However it is very clear that languages can grow in popularity
from the bottom up. Use a little Ruby on a special homebrew project,
use it on some build machines at work, and pretty soon you've
converted 1 or more new people to Ruby. Nothing wrong with that.
Ruby adoption levels do not prevent you from using it.

(4) Ruby popularity isn't as small as one might think. I have the
Python list and the Ruby list side-by-side in GMail right now, and the
Ruby list is 80% as active as the Python list. Not bad!

I really don't think Python-fans are wrong in the least. It's a
decent language, and some of the decisions such as playing down lambda
and the blocks type approach means solutions are developed differently
-- but that doesn't make them wrong. I like list comprehensions,
for instance.

If you can grok the "C" and kernel development mindsets, a lot of this
makes sense. Simplicity and obviousness mean a lack of cleverness at
face value, but they are very practical, straight forward, and easy to
understand for the most part. Those goals aren't all bad.
Personally, I'm looking for convergence, not distance between the
languages.

* James Britt (Jan 11, 2005 17:01):

*2* puns in one!

Oh, my sides hurt now.

haha, I know what you mean ;-),
  nikolai

ยทยทยท

--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

James Britt said:

benjamin.ferrari wrote:
...

16:20:18-ferrari@herrober:~$ python
Python 2.3.3 (#1, May 18 2004, 19:29:58)
[GCC 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import this

The Zen of Python, by Tim Peters
...
Although that way may not be obvious at first unless you're Dutch.

"It also makes sense if you grew up Pennsylvania Dutch [...]"

Bruce Eckle, commenting on the readability of a given Ruby example.

On the Thought: Thinking in Ruby ... not

It all makes sense now. Although I, myself, do not speak Pennsylvania
Dutch (my father does), I grew up in a community of Amish and am very used
to the "backwards" style of English spoken there. Could this be the
reason I find Ruby so attractive.

BTW, Guido's Dutch and Pennsylvania Dutch are not related at all.
Pennsylvania Dutch is a (somewhat distant) dialect of German (Deutsch).

ยทยทยท

--
-- Jim Weirich jim@weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

Trouble is, it usually doesn't make as much sense to all the other perl
programmers.

that's been an argument used against perl for a long time. i think
it's a myth...people have posted some pretty horrendous code in the
perl newsgroup and other perl programmers had no trouble reading it...
but people who didn't program in perl coudln't...i see a connection
there...

Or the same programmer in nine months time.

i have some toothpick code i wrote ten years ago...i can still read
it...and i'm willing to bet any other perl programmer can also...

i can crank out working code the quickest in perl, then tcl...i'm
hoping to get my ruby up to speed also...
http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org

ยทยทยท

On Tue, 11 Jan 2005 01:06:25 +0900, you wrote:

* tony summerfelt <snowzone5@hotmail.com> [0154 19:54]:

ยทยทยท

On Tue, 11 Jan 2005 01:06:25 +0900, you wrote:

>Trouble is, it usually doesn't make as much sense to all the other perl
>programmers.

that's been an argument used against perl for a long time. i think
it's a myth...

If your ass remains unbitten, i salute you.

--
'One cannot make an omelette without breaking eggs - but it is amazing
how many eggs one can break without making a decent omelette.'
    -- Charles P. Issawi
Rasputin :: Jack of All Trades - Master of Nuns

not just me...all the perl programmers i know can read all their old
code...and mine...and vice versa...

obfuscated code is different of course, but regular perl code seems to
be just fine...

http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org

ยทยทยท

On Tue, 11 Jan 2005 07:30:50 +0900, you wrote:

If your ass remains unbitten, i salute you.