No Next Item No Next Conference Can't Favor Can't Forget Item List Conference Home Entrance    Help
View Responses


Grex Systems Item 79: Python or Ruby (or Something Else) for Web Development? [linked]
Entered by remmers on Sun Aug 19 18:05:26 UTC 2007:

Which should I learn - Python or Ruby?

67 responses total.



#1 of 67 by cross on Sun Aug 19 21:22:36 2007:

Why not both?  Either is sufficiently intuitive that one can be usably
proficient in a day or two; picking up both should not be that hard.

Personally, from a pure language-design perspective, I prefer Ruby over
Python.  Steve Yegge, however, feels that it is not an acceptable substitute
for LISP and gives a number of reasons why:
http://steve-yegge.blogspot.com/2006/04/lisp-is-not-acceptable-lisp.html

Python feels a bit rougher around the edges, but is still useful.


#2 of 67 by djdoboy on Mon Aug 20 00:25:58 2007:

Remmers, with all do respect, isn't it rogaine and viagra time for you?


#3 of 67 by djdoboy on Mon Aug 20 00:48:56 2007:

I've never dealt with ruby and spent maybe 2 hours with python. Maybe I wasn't
fully understanding python, but from what I could tell, python names it's
chunk of memory. Here is how I understood it. In C, I would go like

char i = 6;
char *p = &i;

in C, &i is just a chunk of unamed memory. The only thing that has a name is
the shit associated with the variable i.

However in python this would be a reference (ie not a pointer) and this
reference would have a name. This means I can do true variable rebinding as
opposed to simulatng variable rebinding in C.


#4 of 67 by cross on Mon Aug 20 01:32:57 2007:

It is true that, in python, variables are references.

To me, Python feels a bit more hacked together; you can tell that some things
were bolted onto the side of the language, often rather clumsily.  Ruby is
much cleaner in this respect.


#5 of 67 by sholmes on Mon Aug 20 01:58:07 2007:

I find some of the syntax of ruby very elegant. Never did any serious
coding with python to really compare. But really like ruby.


#6 of 67 by remmers on Mon Aug 20 16:44:16 2007:

Re #1:  I'm sure you're correct that it's not difficult to pick up the
basics of both languages, so let me clarify the question a bit.

Do folks have a preference for one over the other as an environment for
developing web applications?  Or some third language?  PhP (with which
I've had a bit of experience) is another candidate to throw into the mix.


#7 of 67 by nharmon on Mon Aug 20 16:53:55 2007:

I prefer to write my web applications in PHP, and do any back-end
scripting using Perl.


#8 of 67 by cross on Mon Aug 20 17:12:02 2007:

Regarding #6; Ah, that's a little clearer.  Ruby, hands down.  Rails is the
`killer app' for web type stuff.


#9 of 67 by remmers on Mon Aug 20 18:59:55 2007:

I've been hearing a lot of buzz about Rails, most of it favorable,
although apparently there are scalability issues (Twitter is written in
Rails and has run into some problems).

Yeah, I've done some PHP development - my jremmers.org website is all
PHP-based, currently.  What would be the advantages of Ruby+Rails over
PHP, or PHP+Perl?


#10 of 67 by remmers on Mon Aug 20 19:01:14 2007:

(I've retitled this item to better reflect its purpose.)


#11 of 67 by cross on Mon Aug 20 20:28:05 2007:

Regarding #9; The usual: A better underlying language, a huge amount of 3rd
party support, and some others: Rails has a good implementation of model 2
for web applications, which is really nice to work with.  It makes developing
really fast; and hopefully, a lot of of the scalability issues will be
resolved with future upgrades to the Ruby interpreter.  But how big do you
expect your demands to be?  Do you really expect to run into a lot of scaling
problems?


#12 of 67 by maus on Tue Aug 21 03:13:11 2007:

Java + JSP in a Websphere or JES container, using Struts for the
presentation framework and Oracle or DB2 or Postgres on the backend. 

Ok, that is probably overkill for what the average person plans to
develop, but it would certainly be scalable and well supported, and
marketable. 


#13 of 67 by remmers on Tue Aug 21 14:17:19 2007:

Linked from Jellyware 79 to Web 14.


#14 of 67 by remmers on Tue Aug 21 19:20:43 2007:

Re #11: I don't expect to run into scaling problems for a while.

I've done some cursory reading up on Rails (and also Django, its Python
counterpart).  Is it correct to say that these frameworks are geared to
using a relational database as the backend data store?  Or are they more
general than that?

I'm also discovering that some web hosting companies support Rails and
others (like my current web host) don't.


#15 of 67 by cross on Tue Aug 21 23:04:54 2007:

Geared toward, but not required.


#16 of 67 by trancequility on Wed Aug 22 00:44:21 2007:

I really wouldn't use Perl or the Perl DBI when connecting to any kind of
proudction level database. My whole gripe is because Perl OOP paradigm still
lacks the maturity needed to be used in a production level setting. I also
think the whole reference counting garbage collector that Perl uses is a
bigger load of shit than organized religion. Cross, admit it. The perl
garbage collector lags 3 decades behind the lisp garbage collector.

Going off on a tangent, Perl sort used to suck ass because the sorting was
unstable. However, I think as of Perl 5.6, they switched over to mergesort
and hence you can finally get a stable sort. I refuse to comment on perl
hashes.

However, for a personal website or writing hobbyist code, I would use perl
to connect to my database.


#17 of 67 by cross on Wed Aug 22 01:17:17 2007:

I don't care for perl.


#18 of 67 by trancequility on Wed Aug 22 01:22:12 2007:

Is this because nharmon and vive fagged up your perl experience?


#19 of 67 by cross on Wed Aug 22 02:44:33 2007:

No, because it's a sucky language.


#20 of 67 by mcnally on Wed Aug 22 03:57:47 2007:

 I don't care for perl either, and agree that it's a "sucky language",
 though I still use it for quick jobs -- usually nothing that I think
 I'm going to have to go back to, because when I'm done the code 
 usually looks like line noise and a month later I find it borderline
 unreadable.

 But #16 is a pretty silly thing to say.  Perl is obviously being used
 in a really whopping number of production environments all around the
 world.  The comments about the garbage collector and OOP paradigm are
 true, but pretty much totally beside the point.  


#21 of 67 by mcnally on Wed Aug 22 03:58:29 2007:

 I probably should play around with Ruby the next time I have a 
 project..


#22 of 67 by keesan on Wed Aug 22 04:45:52 2007:

Perl put a ridiculous number of man pages onto my computer so I removed it.


#23 of 67 by scholar on Wed Aug 22 05:27:23 2007:

...


#24 of 67 by mcnally on Wed Aug 22 05:47:58 2007:

 re #22:  Why not just remove the man pages?


#25 of 67 by sholmes on Wed Aug 22 09:46:36 2007:

Perl sucks when its used for what it is not good at.
but for small text editing I find perl one liners the best at the job.

I would definitely not write a 1000lines program in perl.


#26 of 67 by scholar on Wed Aug 22 10:05:42 2007:

You'd prefer a 10000lines program in C


#27 of 67 by twenex on Wed Aug 22 10:22:22 2007:

Most people would be both pleased and astonished to have manpages that give
copious amounts of information.

I have to say, though, the Linux LVM manpages are REALLY good.


#28 of 67 by remmers on Wed Aug 22 14:31:17 2007:

Yeah, Perl does spam the manpage space.  Really clutters up manpage
search results to the point of making them unusable.  Shame on them.  I
wouldn't go so far as to remove Perl on that account, though.

Getting back to Ruby vs. Python:  Google searches turn up tons of
discussion, with lots of opinions on both sides but no particular
consensus.  The _RESTful Web Services_ book I'm reading favors Ruby for
its code examples, so that tends to tilt me in the Ruby direction, at
least for now.


#29 of 67 by trancequility on Thu Aug 23 01:31:41 2007:

Writing 10000 line of C code is about as enjoyable as getting a BJ in a dres,
stocking, and heels.


#30 of 67 by cross on Thu Aug 23 01:50:47 2007:

I thought you were into that kind of thing?


#31 of 67 by trancequility on Thu Aug 23 02:22:40 2007:

Okay, outside of the really bad typos in thread 29, writing 1000 lines
of threaded code for Linux in C is like wearing cheap stockings. Both are piss
poor imitations to the real thing and both tend to rip apart at the most
inappropriate moments. I really forgot where I was going with this analogy.

I'm also getting the feeling uncle remmer is ignoring me.

And in other news, I finally understand what a fucking tagged union is. Yes,
another winner topic that has taken me 6 months to understand. 



#32 of 67 by keesan on Thu Aug 23 16:02:00 2007:

I removed the man pages.  Then I removed the doc pages (html).  Then I noticed
a large unicode directory containing Tibetan.  ANd a Test directory.  And a
whole bunch of other files, maybe thousands of them.  I only needed perl once
to compile one program, and there was a workaround (manual installation?).
If I ever need it again I can use it at grex or reinstall.  The list of files
in perl is 43K (20 printed pages).  80x43=3200 files?  Do I really need
anything not in bin or lib (not even including /lib/perl5/unicode - Bengali,
Cherokee, Bopomofo, Ethiopic, Hangul are all interesting but not relevant to
what I am doing with my computer).
What do other people use perl for?


#33 of 67 by cross on Thu Aug 23 22:49:07 2007:

Mostly, text processing (in various guises).  So it created a lot of files;
were you running out of space or something?


#34 of 67 by maus on Fri Aug 24 01:11:24 2007:

What I'd recommend, if you can borrow use of someone else's machine and
they will let you download and build on it, make either the microperl or
miniperl (depending on your needs and space constraints). You will then
have the relevant exe and can move just it and (I think) one or two .so
files and be done with it.


#35 of 67 by keesan on Fri Aug 24 03:01:02 2007:

Thanks for the suggestion about building a smaller perl.
I don't like having a lot of junk on my computer that I do not use.
I process text with pico.  I have perl source code (from Slackware 10).


#36 of 67 by maus on Fri Aug 24 03:40:11 2007:

Please do not develop the bad habits of so many people who write perl
codes. Many perl authors write intentionally opaque codes that use
shortcuts, exploit side effects and massive (unnecessary) indirection.
The arrogance seems to be "well, if I wrote it and I understand it, and
if you cannot understand it to maintain it, I must clearly be smarter
than you". Those fuckers deserve to be sodomized with a rusty hashmap
and force-fed an uncommented library characterized by its gotos into
inner-loops. And then beaten savagely. 





#37 of 67 by scholar on Fri Aug 24 07:49:13 2007:

Sounds like you need to learn perl.


#38 of 67 by remmers on Fri Aug 24 16:49:12 2007:

It's possible to write decent code in Perl.  All of my Perl code is
*supremely* elegant and readable.  :)


#39 of 67 by nharmon on Fri Aug 24 17:32:25 2007:

I would have to say the main reason I develop web apps in PHP is because
it is almost universal for web hosts. 


Last 28 Responses and Response Form.
No Next Item No Next Conference Can't Favor Can't Forget Item List Conference Home Entrance    Help

- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss