LWN.net Logo

Advertisement

Advanced thin client solution for Linux, based on Open Source. Mix Windows and Linux applications on the same desktop. V

Advertise here

Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

Posted Feb 9, 2008 22:29 UTC (Sat) by Nelson (subscriber, #21712)
In reply to: Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News) by tjc
Parent article: Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

What's to compare? They are both Turing complete, the can both express the same programs.

  • Ruby has a more terse syntax, similar in ways to perl, python forces some indentation on you.
  • Ruby seems to have a more insecure (my bias) following that beat the drum a bit more, they're worried that the world won't see them and not happy with what they're doing unless everyone else does it too.
  • Python users seem to be more insecure when it comes to public advocacy, with Pypy, Iron python, jython, cpython, python 3000 and python 2.6 and maybe a few other variants in various states of progress and calcification, the python guys might be too content doing their own thing and not caring what the world around them is doing. (is there a Pypy with LLVM project? that does kind of get me a little excited if it's alive)
  • Except for a few really great Ruby guys and a couple of really great Python guys the vocal parts of community at large, in my opinion, seems to think that their tool is a programming panacea in spite of no really substantial projects of size really being done in either language..
  • Seems to me, iterating through loops and lists is something that many members of the community really feel strongly about the syntax of and tend to think that there is a wrong way to do it or the character count of the source code makes a huge difference.
  • I like them both, I think you should learn them both. I don't really love either, if one went away, I'd simply switch to the other and not really feel much about it. At least that's how I personally see it.

Programming is hard, I think it was Knuth that said that. As I get older, I really appreciate that sage wisdom of that statement more and more. The language seems like such a tiny part of that after a while. I just can't get that excited over the differences in Ruby and Python, I can't think of a problem that one makes substantially easier than the other.


(Log in to post comments)

Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

Posted Feb 10, 2008 14:10 UTC (Sun) by oak (subscriber, #2786) [Link]

> Except for a few really great Ruby guys and a couple of really great 
Python guys the vocal parts of community at large, in my opinion, seems to 
think that their tool is a programming panacea in spite of no really 
substantial projects of size really being done in either language..

How large should be a program of a substantial size be?

There are for example (UI) applications done in Python with > 100 K-lines 
of code (which corresponds to significantly larger C-program), I think 
both in Gtk (e.g. Gramps) and Qt.   Python is the programming language in 
the latest Civilization (IV) game[1].  Zope CMS is done in Python and 
there are several projects done on top Zope also (e.g. Plone).

And it's not the only one, there are even Python game programming 
environments like: http://www.panda3d.org/

Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

Posted Feb 10, 2008 15:12 UTC (Sun) by Nelson (subscriber, #21712) [Link]

I knew when I said that I'd probably take some flack. There is a lot of substantial and important code written in both in use a lot of places.

I think what would be more compelling is a very mainstream app written in either language. I was trying to suggest looking at the fruit to compare the greatness. Maybe the most compelling is Anaconda, that's some python that millions of people have used, whether or not they know it. i know large programs have been written in both, I think large size in complexity/code as well as large size in use is what I meant. If they are so much better than, say, C, then why isn't a really common and important part of GNOME or KDE or Firefox or OpenOffice of GIMP written in them? Or some other app? GNOME-Menu could be python or ruby. Surely there must be a substantial advantage if language X is so much better, or are these just vocal community folks that don't produce apps like that? Even the guy who started this said he might use Ruby in Amarok simply to force Ruby in to more common use, why not bang out the whole app in it if it's so great.

If they are such great languages (and I like them both, they are great, for some things) then why would that killer always or only be app be a web app (still neither has anything on PHP there..) in my mind, that'd be the first major limitation and strike, if your language is only good at producing little web apps, then that seems kind of lame when talking about the greatness of the languages, especially compared to so many that do so much more. Is there a good Ruby IDE written in Ruby? How about Python, I know a some things like that have been written but I've never seen it deployed for crap, it seems my wxPython from OpenSuse or Fedora is never quite good enough or something.

Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

Posted Feb 10, 2008 21:28 UTC (Sun) by oak (subscriber, #2786) [Link]

> If they are so much better than, say, C, then why isn't a really common 
and important part of GNOME or KDE or Firefox or OpenOffice of GIMP 
written in them?

For all of these the reasons should be fairly obvious.

Gnome and KDE: I think the main thing is platform bindings, if the 
platform would be done in some given higher level language, how you would 
provide bindings for lower level languages?

As to Firefox, JS virtual machine and HTML rendering are performance 
critical functionality.  Writing VM in higher level language could also 
have "interesting" memory usage issues...  I  think performance are also 
issues why OpenOffice and Gimp *core* functionality is in C.

Note that except for Firefox (which extension language is quite 
understandably JavaScript), all of your examples provide Python bindings. 
In Gnome you can e.g. do panel applets in Python.

You find higher level languages where the ease of development and code 
maintainability are more important than their performance.  Performance 
includes startup speed which on higher level languages is higher due to 
need to load more things upfront.

For long running services, startup speed doesn't matter that much.  Also, 
on servers you don't run that many processes and you just add memory if 
it's needed whereas on Desktop too many services taking more memory starts 
to be noticeable.  That's why higher level languages are more used on 
servers and in education.


> if your language is only good at producing little web apps, then that 
seems kind of lame when talking about the greatness of the languages, 
especially compared to so many that do so much more.

Little?  What you consider little?  10 KLOCs?  100 KLOCs? Millions of 
lines of code?

Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

Posted Feb 11, 2008 18:06 UTC (Mon) by Nelson (subscriber, #21712) [Link]

There are GNOME and KDE bindings for Ruby and Python and there are some little things done in Python, I'm not aware of any Ruby applets though. I'm not aware of any really standard and common GNOME or KDE things written in Python, just some more fringe kinds of elements, like gDesklets.

So basically, if memory and speed are of a concern, both of these languages may be unsuitable.

The other thing that kind of rubs me with this kind of advocacy is that "ease of development" is placed high on the list but something as complex as a Browser or OpenOffice are sort of out of their range. Is it just me or is there a certain logical flaw to that? Do these languages really ease development if they are only used on a subset of applications that don't require start up speed, frugal memory usage, or any highly optimized portions? It seems to me that they "ease development" on a set of tasks that are pretty easy to begin with (not that that isn't a worthy use) which kind of begs the issue if you ask me. I'm not trying to be too argumentative but if we were to try and compare the relative "power" of Ruby and Python a good place to start might be by looking at the set of applications they are capable of being used for and those which they are ill-suited and looking for overlaps and exclusive portions.

Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

Posted Feb 10, 2008 18:00 UTC (Sun) by zooko (subscriber, #2589) [Link]

Yes, PyPy can use LLVM for a backend.  Go have fun!

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.