Free Python optimization framework

Monday, January 7, 2008

Jan 2008: Python continue to grow (TIOBE)

Today TIOBE index have been updated for Jan 2008.
Python language continue to grow:

6 8 Python 5.538% +2.04% A

6th position this month, 8th - the one year ago, 5.538 - this month (gained 2.04 during year 2007)

Now, what about other free script languages?
Ruby goes a little bit down
11 10 Ruby 2.345% -0.17% A
However, Lua quickly grows up:
16 46 Lua 0.579% +0.48% A--

Fortunately, Python scientific software is much more mature than same for Lua, at least for now.
BTW I remember reading a message about Lua-Python 2-way bridge (free software).
Note that Ruby and Lua were created after Python so some Python drawbacks were taken into account (same to Python vs Perl and PHP).

PHP is growing up but the language is so inconvenient (as well as Perl) that no doubts it will be suppressed.
4 5 PHP 9.195% +1.25% A
7 6 Perl 5.247% -0.99% A

Java still remains 1st, C and C++ go down:
1 1 Java 20.849% +1.69% A
2 2 C 13.916% -1.89% A
5 3 C++ 8.730% -1.70% A


Also, Fortran and MATLAB should be mentioned:

24 Fortran 0.305%


26 MATLAB 0.241%

However, noone knows what scientific language will suppress all others - will it be Sun Fortress (also known as Fortran successor, however, similar name is almost the single similar feature), or IBM X10 (parallel calculation libraries for Java), or Cray Chapel (C-like, something similar to D or Pyrex languages) or MS F#, or maybe another one, unknown for now.

Or, maybe, it will be Python language? :)

On the other hand, usage of Python as scientific language may become deprecated, like Ada language had been suppressed by C.

I write a little programs time-to-time using the Fortress language, btw I had wrote ralg solver using the one. Fortress FAQ says "Fortress is general language, not only mathematical one". But the language requires strict type classification.
For example:
a1 = array[\RR64\](3,4).fill(1.5)
b := a1 + a1 (or b = a1 + a1)
yields error in Fortress ("unbound variable", it makes me remember my times of OCAML programming). But it works perfectly in Python or MATLAB.
Almost all langs quickly growing up in TIOBE index (Python, Ruby, Lua etc) are free of strict type classification - users prefer to type as little code as possible, some percents of speed down are less important.

One more serious Fortress drawback is loops parallel by default:
for i <- 0#n, j <- seq(0#n)
means parallel by i. So they provoke users to use parallel loops where sequential are much more safe. I don't want to get no sleep suspecting that someone from developers team turn out to be too lazy to write "seq()" everywhere where is should be done, and then aircraft crashing etc.
For "general purpose language" sequential loops should be default ones. I had proposed using
for i <= 0#n, j <- 0#n instead, but no answer have been obtained - have it been accepted or rejected.

Fortress developers promise to yield stable compiler in 2009-2010 or so. And maybe Python, F# or other languages will have much more stronger positions (as scientific languages) for the date.

3 comments:

Anonymous said...

why do you consider it "fortunate" that Python scientific software is more mature than Lua's? I don't know Lua and like Python a lot, would it not be most fortunate if Lua had even better scientific software than Python? Than we all had more choice.

Dmitrey said...

I consider if fortunate
1) for me, since I had chose Python as my programming language
2) because splitting (or, more exactly, duplicating) opensource programmers efforts would yield some opposite incompatible scientific software. For example, Ruby and Lua have equivalent to numpy (very primitive for now) and make lots of efforts to make it as good as numpy is, instead of joining efforts with numpy developers and single language.

Unknown said...

You're right about the joint effort. I guess Lua and Ruby are similar enough to Python to make the possible advantages small. On the other hand, having several, say two or three but no more, efforts at a scientific open source framework might be a good way to keep fresh ideas coming.