LWN.net Logo

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

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

Posted Feb 8, 2008 21:55 UTC (Fri) by tjc (guest, #137)
Parent article: Interview: Mark "Markey" Kretschmann (Not the Gentoo Weekly News)

> I openly fight Python (which is of course the antichrist) wherever I can.

I'd like to see a reasonably unbiased comparison between Python and Ruby.  Every one I've read
has been pimping one and dissing the other, either overtly or on the sly.

I know Python well enough to know that I really like it, but I don't know Ruby well enough to
make a fair comparison.  Anyone out there without religious affiliation who can make a
reasonable comparison?


(Log in to post comments)

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

Posted Feb 8, 2008 22:41 UTC (Fri) by sbergman27 (subscriber, #10767) [Link]

Well, I prefer Python.  So don't be surprised that the random thoughts I throw out here favor
it.  But I've used both. 

They are both dynamically typed languages and have much similarity with each other.  In the
Python culture being "explicit" is strongly preferred.  Ruby fans tend to like some
implicitness.  Ruby looks a bit more like Perl.  There are tons more libaries and support for
things like dbus, beagle, tracker, etc. for python. (Just do a "yum list" or whatever and grep
for ruby and python.  There *is* no comparison. (I find this to be a significant point in my
work.)  If you are doing web development, Rails is more popular than all the Python based
frameworks put together.  But in my opinion, Django toasts Rails for quality and good design.
Outside of web development, python is used a lot more and Python programmers are in a lot
greater demand.  Python runs circles around Ruby for speed.  But neither is a race horse.
Sometimes, the speed of the language is important, and sometimes not.  Ruby has a JVM based
runtime "on the way", but it's been "on the way" for years, and last I tried it, the
performance didn't seem that great.  With python, you have Iron Python (which is quite fast, I
hear) for .Net integrategration.  And Jython, which gives you access to the world of java
class libraries, but is always a release or two behind CPython.

Rails popularity cannot be denied.  (Just go to Amazon and type "Ruby On Rails" in the search
bar.)  But I suspect that if it *weren't* for rails, people would be saying "Ruby?  What's
Ruby?"

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

Posted Feb 9, 2008 17:22 UTC (Sat) by rfunk (subscriber, #4054) [Link]

Most of Ruby's libraries are in gems rather than in distribution 
packages, and gems don't seem to work well as distribution packages.

JRuby is pretty mature and fast now. And if you want .Net there's 
IronRuby too.

It's true that Rails has driven the rise of Ruby, but personally after 
being part of that wave I'm more impressed with Ruby than with Rails.

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

Posted Feb 9, 2008 17:27 UTC (Sat) by nas (subscriber, #17) [Link]

Some thoughts from someone who knows Python quite well. I think he's relatively unbiased, however.

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

Posted Feb 9, 2008 19:27 UTC (Sat) by and (guest, #2883) [Link]

I'm also more familiar with python, but the speed argument doesn't seem to 
be valid anymore. Benchmarking the same two scripts on contemporary 
interpreters on my decidedly non-contemporary 800MHz Athlon yields:

and@glotze:~> python -V
Python 2.4.4
and@glotze:~> time python sieve.py 300000 > /dev/null
real    0m1.121s
user    0m1.092s
sys     0m0.032s
and@glotze:~> ruby -v
ruby 1.8.6 (2007-09-24 patchlevel 111) [i686-linux]
and@glotze:~> time ruby sieve.rb 300000 > /dev/null
real    0m1.579s
user    0m1.568s
sys     0m0.008s


(yeah, I know python 2.5 is out, but debian stable and gentoo still use 
2.4 per default) 

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

Posted Feb 11, 2008 14:23 UTC (Mon) by smitty_one_each (subscriber, #28989) [Link]

It's dated: Oct 25 2002, 3:59 pm 
Possibly a good template for subsequent research...

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

Posted Feb 8, 2008 23:13 UTC (Fri) by zooko (subscriber, #2589) [Link]

disclaimed: I'm biased towards Python.

Ruby may be a better language.  Or it may not be -- I'm not entirely sure.  But Python has a
richer library of mature tools.  This is the deciding factor for me, currently when I choose
to start a new coding project.

I don't just mean the Python Standard Library, although it is good.  I mean also the CPython
interpreter, and the many, many mature, high-quality, well-tested open source Python tools out
there such as the Twisted framework, and, well, just too many to name.  See
http://pypi.python.org for starters, or just type "<PROGRAMMING TASK YOU WANT TO DO> Python"
into google.

Note that part of the reason for this cornucopeia is Python's long tradition of re-using C/C++
code instead of rewriting it into Python code.  Also, of course, the several mature, high
quality tools to ease and automate re-use of C/C++ code.  ;-)

Regards,

Zooko

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

Posted Feb 9, 2008 0:32 UTC (Sat) by njs (subscriber, #40338) [Link]

> Also, of course, the several mature, high quality tools to ease and automate re-use of C/C++
code.

Indeed.  Ctypes is amazing, and Pyrex, a revelation.

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

Posted Feb 9, 2008 14:57 UTC (Sat) by Cato (subscriber, #7643) [Link]

Of course, Perl's CPAN library of modules is still far larger than either Python or Ruby's -
and with Perl 6 it should be easier to use such Perl modules from other languages.   It's not
just the existence of libraries with Perl, it's being able to type 'cpan -i Useful::Module' on
any Linux or Windows box - or in the case of Ubuntu/Debian the most useful ones are already
packaged.  I think some other languages are doing this as a result of Perl's success with CPAN
- the Python Package Index (PYPI link) is a good example. 

 

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

Posted Feb 9, 2008 17:45 UTC (Sat) by zooko (subscriber, #2589) [Link]

Yes, these are some of the most exciting parts of the Python world to me right now:

  • The Python Package Index
  • the easy_install tool which does the same thing as your example: "cpan -i Useful::Module", on multiple operating systems
  • setuptools, which allows you to programmatically specify dependencies on other packages, and which will hopefully grow to replace GNU Make for my Python projects

These were certainly inspired by CPAN and by Ruby's "rake" tool.

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

Posted Feb 11, 2008 14:26 UTC (Mon) by smitty_one_each (subscriber, #28989) [Link]

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

Posted Feb 9, 2008 1:53 UTC (Sat) by dilinger (subscriber, #2867) [Link]

Honestly, I don't understand the "Python is the anti-christ" mentality from Ruby people.  When
I'm starting a project, I'll use Ruby if I don't need to collaborate with anyone, because it's
more fun.  I'll go with Python if I feel the need to attract other developers (as Python has
*much* more momentum), or if co-workers need to understand it.  However, they're both close
enough that switching between the two isn't a big deal.

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

Posted Feb 9, 2008 6:24 UTC (Sat) by kripkenstein (subscriber, #43281) [Link]

I think the "Python is the antichrist" sentiment stems from a sort of sibling envy. Python and
Ruby are similar enough to compete for the same 'niche', and Python has been 'winning' in the
sense of # of people using it, of libraries, integration with other tools, etc. Some Ruby
people resent that, and I can sort of understand them - if Python didn't exist, Ruby might be
where Python is now. Still, I hope that the 'antichrist' sentiment is only held by a minority,
because it is quite unproductive and inappropriate.

Regarding the languages themselves, again, the similarities are fairly big, when you compare
them both to, say, C. Perhaps the main practical difference is, as mentioned above, far more
support for Python with libraries, development of fascinating projects like PyPy, and so
forth. Syntax-wise, the most immediately-noticeable difference is Python's enforced
indentation, which most people either love or hate. Personally, I like it; both Python and
Ruby do well to remove the curly braces popular in other languages, but only Python goes one
step further and also removes the need to close indentations with "end" and so forth. Anything
that makes code shorter is good in my book.

There are lots of other small syntactical differences, that people argue about quite a lot
online, but again I'd stress the similarities.

humor detectors b0rked

Posted Feb 9, 2008 16:40 UTC (Sat) by eean (guest, #50420) [Link]

I'm amazed by all the comments here. Apparently Mark missed that calling a language the
"antichrist" has become a serious way to talk about programming languages. You guys realize
that the term Antichrist refers to an embodiment of pure evil? The being in Christian
mythology that will bring about the end of the world? Mark was obviously exaggerating a bit. 

To some extent its the LWN's editors wanting to stir something up for picking this part of the
interview (is a C++ developer's opinion on Ruby vs. Python that pivotal?), but it's everyone
elses fault for not reading it in the full laid-back context.


humor detectors b0rked

Posted Feb 9, 2008 19:40 UTC (Sat) by and (guest, #2883) [Link]

> You guys realize that the term Antichrist refers to an embodiment of 
> pure evil?

Only for christians, and of these probably mainly for those of the 
american variety. I see this statement in contexts like this more as an 
winking way of expressing one's affiliation.

humor detectors b0rked

Posted Feb 11, 2008 7:55 UTC (Mon) by drag (subscriber, #31333) [Link]

I donno. 

I would figure that almost all Christians, or those who belong to more or less conventional
variations on the faith, believe that Satan is pretty much evil. As evil as evil gets. 

It's certainly a interesting term. Something that has more depth to it then just 'the
embodiment of all evil'. 

Antichrist refers to the fact (take it the bible context, not saying that you or anybody else
assumes it's fact) that the 'Antichrist' is not 'opposite of Christ' or anything like that.
It's that he wants you to think that he is your savior, that he _is_ Jesus. The Antichrist is
a trick to make you think that he is there to save you from the bad things that happen in the
world. 

So in the book of revelations the Antichrist comes shining down from heaven into Jerusalem. He
comes all floating down, all shining with lights and all that sort of thing. He performs
miracles, stops armed conflict, heals the sick, feeds the poor, etc etc. All in a fairly
supernatural (magical-seeming) way. Pretty much what everybody expects Jesus or
$favorite-deity-thingy to do in the end times. 

Since most of the world is ignorant of all of this because they don't know the bible or follow
whats going on then they all fall in line behind this false savior. 

Hence, the Antichrist. Tricking people into following him rather then the true Christ.


So in a sense what is he actually saying, in a obviously tongue-in-cheek manner, (and whether
he realizes it or not) is that Python programming language is in fact a false idol.. A
deception perpetuated on the Linux-going public. That Python promises to be what Ruby is, and
is able to perform most of the tasks that people think that a OO language should be able to
do. 

However the fact (according to Mark "Markey" Kretschmann) is that Python is deceiving people,
turning them away from the one true Ruby. The Ruby that will ultimately save them and provide
them the river of knowledge that will lead programmers out of suffering ignorance and into a
thousand years of fairly productive learning and general success. 

Darn that old Antiruby, Python. 

humor detectors b0rked

Posted Feb 11, 2008 14:35 UTC (Mon) by smitty_one_each (subscriber, #28989) [Link]

In a word: 'hyperbole'.
You can be a famous hacker, and you can call an operating system "utter crap", but the real
metric is money, irrespective of any architectural purity arguments you'd want to make.
Programming language tensions are the same argument in miniature.
Continuing the oddly apropos religious thread, the Python/Ruby tension boils down to religious
denomination X picking on denomination Y about sacrement Z.
Note that, by the time you're on a JVM, CLR, or parrot, you're really just thumb-wrestling
over choice of syntactic sugar at the parser level.
Aren't Real Programmers supposed to see past the tool-fetishism and focus on the results,
anyway?

picking part of the interview

Posted Feb 12, 2008 18:47 UTC (Tue) by rfunk (subscriber, #4054) [Link]

I read the interview, and it was mostly content-free unless you care about 
beer preferences.  This was the most interesting part of it.

Python/Ruby

Posted Feb 9, 2008 17:52 UTC (Sat) by rfunk (subscriber, #4054) [Link]

Well, I'm probably more "religiously affiliated" than you'd like, but I 
try to be fairly objective about these things....

I was a Perl and C programmer for a long time.  I've played around with 
Python a bit, and kept getting annoyed by its object model.  It's 
inconsistent, and required using class methods where I expected to be 
able to use object methods.  Then there's the seemingly pointless 
dichotomy between tuples and arrays; and the limit of one expression 
inside a lambda also seems pointless.

I also don't like Python's inability to be programmed functionally; 
side-effects abound, and it forces separating every little action into a 
temporary variable and another line.

I don't care about the syntax.  Much.  Significant indentation is fine, 
though in Python I do tend to miss having some sort of definite markers 
to show where blocks end.

Then I discovered Ruby, and finally found a language with a complete 
object model -- *everything* is an object.  Ruby is the first language I 
used where the OO was complete enough to be both sensible and useful.  
Methods can be quickly and easily chained together (though watch out for 
potentially nil objects).  Functional programming is easy, though not 
required.

And I've only scratched the surface of what Ruby is capable of; its 
meta-programming capabilities give quite a bit of power.

Basically Ruby has Lisp's power, Smalltalk's OO, Perl's 
programmer-friendliness (or better), but it fixes most of the problems of 
all of those.

Python has more popularity now because its popularity started earlier 
(and because Perl stagnated), and there are definitely major surface 
similarities between Python and Ruby (dynamic, OO), but Ruby is capable 
of so much more.

As far as I'm concerned, Ruby's biggest problems are its slowness and its 
library immaturity.  Improving the speed is a major goal of the 
developers now, and the next version should have much better speed; in 
addition there are other implementations with better speed, including 
Rubinius and JRuby.   The libraries are quickly catching up to Python, 
and if you use JRuby you get the benefit of Java libraries.

Python/Ruby

Posted Feb 9, 2008 21:02 UTC (Sat) by tjc (guest, #137) [Link]

> the limit of one expression inside a lambda also seems pointless.

> I also don't like Python's inability to be programmed functionally; side-effects abound, and
it forces separating every little action into a temporary variable and another line.

Are either of these issues addressed by Python 3.0?  I've googled around a bit, but not found
anything conclusive.

Python/Ruby

Posted Feb 10, 2008 0:41 UTC (Sun) by jmtapio (subscriber, #23124) [Link]

I also don't like Python's inability to be programmed functionally; side-effects abound, and it forces separating every little action into a temporary variable and another line.

Care to elaborate on that? What is missing from Python that _prevents_ functional programming?

And Python does not _force_ opening up one-liners, but it does promote clear code. Just google up "obfuscated python" and there will be a plethora of code examples where "every little action" is not separated.

Python/Ruby

Posted Feb 10, 2008 16:09 UTC (Sun) by rfunk (subscriber, #4054) [Link]

Um, you quoted some, and I mentioned another you didn't quote.

1. Lambdas are limited to a single expression.
2. Too many operations have side effects -- they change their argument rather than 
returning the changed version leaving their argument unchanged.
3. This in turn requires lots of separating of operations and defining temporary variables 
if you don't in fact want the original thing changed.

There's actually a web page I found on programming Python functionally, and it mentions 
Python's abilities and limitations in that area (as well as giving some workarounds).
  http://scott.andstuff.org/FunctionalPython
(For example, it mentions Python's lack of a ternary operator; tricks with and/or are 
definitely obfuscation.)
Another one that gets more to my points, but from a Pythonists's perspective:
  http://withoutane.com/rants/2007/01/embrace-the-heresy
"But if you try to write your whole program in a functional style, you always seem to be 
going against the grain of the language."

Take a look at the operators (well, methods) in the standard Ruby classes, and you'll see 
that support for clear, concise functional programming abounds, with no need for 
workarounds or obfuscated-looking code.  Ruby combines OO and functional 
programming nicely and elegantly, without forcing functional on you.

I do notice, however, that Python has added more support for lists than it had the last 
time I delved deeply into it.

Python/Ruby

Posted Feb 10, 2008 21:30 UTC (Sun) by jmtapio (subscriber, #23124) [Link]

With regards to lambda I disagree. I find there are very few cases where even using a lambda at all is an advantage over giving the function a name. And if you are going to be using statements within the function, why not go all the way and define that function with a statement? After the introduction of list comprehensions several years ago I personally stopped using lambdas, and I do prefer a somewhat functional style myself.

If side effects bother you, don't use functions that operate in-place. For example instead of mylist.sort() do sorted(mylist). Note that you do not have to do something like templist = mylist[:]; templist.sort() as would have been the case a few years ago. I think it is a good thing for a language to have both types of operations available because sometimes there are good performance justifications for using in-place-algorithms.

The first example URL that you gave seems to point to a quite old page. The examples there would have been valid for some really old Python versions. The first example could nowadays be written like this:

[x for x in [1,2,5,6,8,12,15,17,20,23,24] if x % 2 == 0]

And calculating the sum of a sequence can be done by callind sum(sequence) without defining any functions or without any temporary variables. I would like to again reiterate that Python does not _prevent_ using functional style and it does give quite a lot of syntax and tools to make it easier, but fundamentally there are always the procedural and object oriented parts of the language available as well. And the generic mentality among pythonists is to avoid dense hard-to-read code, even if it were mathematically beautiful. I used to write much more functional code in the past until I got more interested making code easy to read for non-wizard people.

(For example, it mentions Python's lack of a ternary operator; tricks with and/or are definitely obfuscation.)

Python does have a ternary operator.

>>> 'foo' if True else 'bar'
'foo'
>>> 'foo' if False else 'bar'
'bar'

Ruby is often mentioned as better than Python based on something that Python did not support in the past. For some reason language knowledge travels very poorly between the two camps and that has in the past years caused a lot of unnecessary rumors and unfounded claims of inferiority/superiority. (I am not accusing you per se, I'm just trying to note that a lot of people over the years have brought up the same points you did, and most of them have been "fixed" years ago in Python.)

Python/Ruby

Posted Feb 11, 2008 1:23 UTC (Mon) by ikm (subscriber, #493) [Link]

> Python does have a ternary operator.
> >>> 'foo' if True else 'bar'
>'foo'
> >>> 'foo' if False else 'bar'
> 'bar'

Which version of Python is that? The one I have right now as a system default (2.4.4, Debian
sid) barfs at the given syntax.

Python/Ruby

Posted Feb 11, 2008 6:52 UTC (Mon) by jmtapio (subscriber, #23124) [Link]

That syntax was added in 2.5.0 (released in September 2006). It is in Debian stable (python2.5) but the default version still has not been migrated even in unstable.

Python/Ruby

Posted Feb 11, 2008 11:08 UTC (Mon) by drag (subscriber, #31333) [Link]

Python 2.5 is certainly a good thing. I am Debian user and habitually specify python2.5 when
working on my own stuff.

Hopefully Python 3000 will be even better. 

Python/Ruby

Posted Feb 11, 2008 14:43 UTC (Mon) by smitty_one_each (subscriber, #28989) [Link]

>language knowledge travels very poorly 
Ignorance is power, when deriving counter-arguments. ;)

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

Posted Feb 9, 2008 22:29 UTC (Sat) by Nelson (subscriber, #21712) [Link]

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.

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!

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

Posted Feb 10, 2008 21:28 UTC (Sun) by muwlgr (guest, #35359) [Link]

Both Python and Ruby, at least in their original native-C implementations, are pretty poorly
thought out in regard to multithreading. Multicore CPUs are steadily becoming things of today,
so initial design flaws of these languages are quite alarming as they are going to make them
useless in the new world. AFAIK, their Java&.Net rewrites (Jython/JRuby/IronPython/Ruby.Net)
use underlying threading facilities so they have more chances to succeed. But such
reimplementations significantly change their original class/modules system also to adapt it to
the underlying platform. As well this reduces their "dynamicity" in some extent.

As to "dynamicity", Ruby feels much more flexible and ductile than Python (the whole Rails
framework is largely built upon these features). But the resulting "overly-dynamic" programs
often consume more CPU time and RAM to run than equally-functional but somewhat dumbed-down
and task-specific implementation in Python.

And the last my word would be about Amarok. I tried to use version 1.4.7 as provided by Ubuntu
gutsy, and it has been capable to eat the whole my CPU (Duron 1800) just sitting idle. You
know, it likes to redraw a matrix of small grey/blue squares on its spectrogram indicator.
Completely useless bling, but this keeps Amarok and X server busy all the time. I would like
this to be turned off by default. Else, so far I prefer xine&mplayer as much lighter
solutions.

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

Posted Feb 11, 2008 2:09 UTC (Mon) by ikm (subscriber, #493) [Link]

> Both Python and Ruby, at least in their original native-C implementations, are pretty poorly
thought out in regard to multithreading. Multicore CPUs are steadily becoming things of today,
so initial design flaws of these languages are quite alarming as they are going to make them
useless in the new world.

Multithreading is mostly to gain more speed, and these kind of languages are not really
created for speed. If you waste your CPU time already, you can as well waste some wall clock
time as well -- after all, you're supposed to waste just a neglectible amount of time anyway,
or else it'd be stupid to write the program in a scripted language in the first place. The
only realistic use for multithreading in a scripted language I can think of is to run some
other process/blocking syscall and wait for it to finish, and these tasks are handled quite
alright already. Otherwise, if some guy would ever proudly tell me that he had successfully
parallelized his Python program and it now runs two times faster, I'd be rolling on the floor
laughing, even with tears in my eyes, because it's just hilarious!

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

Posted Feb 11, 2008 19:31 UTC (Mon) by muwlgr (guest, #35359) [Link]

At the same time, other systems using portable bytecode (Java, .Net) throw a lot of efforts
into JIT compilation and runtime optimization (like Hotspot JVM), as well as multithreading
performance (have a look into JDK/JRE sources, you'll notice a lot of low-level tricks there).

What make their developers do so ? In fact, reimplementing your dynamic language in Java
instead of C often allows you to use these processor- and system-specific optimizations
implemented by JDK/JRE developers itself.

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

Posted Feb 12, 2008 1:07 UTC (Tue) by ikm (subscriber, #493) [Link]

Start with JIT first, then do proper multithreading. Guido haven't done the first, neither he
cared much about the second -- apparently, the speed didn't matter to him. For me, it's a sign
of a sane person, a person who understands his objectives. After all, no one is writing JIT
compilers for shell scripts. Actually, I think shell scripting is an outstanding example of
what scripted languages are good for; not that I like shell syntax, implicit vars etc -- but
the idea is just right.

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

Posted Feb 11, 2008 16:40 UTC (Mon) by southey (subscriber, #9466) [Link]

You may want to check out "The Computer Language Benchmarks Game" at http://shootout.alioth.debian.org/

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