[ExI] Weird new way to do physics

Tomasz Rola rtomek at ceti.pl
Fri Nov 4 05:21:44 UTC 2011


On Thu, 3 Nov 2011, The Avantguardian wrote:

[...]
> this, my computer is running a brute-force search algorithm in Python to 

Ouch. If you want to stay high-level so much, consider learning a language 
that has better compiler (I may be not current but last time I checked, 
Python's compilers didn't impress me too much, which was probably my 
fault). 

I like Common Lisp, their compilers work, give decent performance (i.e. 
not tragic) and I can run the same code both interpreted (when developing) 
and compiled. I would like Haskell, which has even better compiler and is 
closely related to lambda calculus but I don't know it well enough to like 
or dislike. Ditto for Ocaml, but this one was few years ago on par with 
gcc wrt to generated code speed and can be easier to optimize than Haskell 
(from what I read).

Last but not least, you can try Octave or it's commercial cousin, what's 
its name. Especially if you have lots of matrix calculations, solving 
equations, differential equations etc. I have scratched Octave thanks to 
ML course at St. Anford and so far I like it. Not much, but still I would 
consider it for theoretical calculations more than Python. Unless you are 
fluent with Sage, but this is another story. The fact that there seems to 
be a way to link Common Lisp with Octave certainly doesn't have anything 
to do with it. There is also Maxima, a CAS written in Common Lisp, so 
definitely more usable from it, but not so much functionality.

All of above is based on anecdotes, fake news, fake benchmarks, fake blogs 
and only sometimes my own experience, so you are free to ignore it.

AFAIK Python as it is today is unfit for calculations, especially on 
multicore machines (because it is unicore). Unless you do it in Sage 
(which relies on libraries in written in C and optimised a lot).

You could also mix Python with functions in C/C++ for time consuming 
routines, but IMHO long term this is going to backfire one way or another 
(I mean, mixing different languages under one roof).

> I will let you all know what my algorithm comes up with. 

Sure, please do.

Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.      **
** As the answer, master did "rm -rif" on the programmer's home    **
** directory. And then the C programmer became enlightened...      **
**                                                                 **
** Tomasz Rola          mailto:tomasz_rola at bigfoot.com             **


More information about the extropy-chat mailing list