It is very interesting to watch the rise and expansion of Python. I'm interested in the thoughts others have to why this is. Is it that it's to learn? Easy to read? Easy to extend? Whatever the cause, I'm glad that I'm learning it for Math too. Similar to the OP's observations, many of the holes when I got started have been filled.
All of the above. Because it's easy to read, it's easy to learn. I think python has nearly perfect syntax. Not sure why more others don't mimic it. Tab/ws instead of braces makes the code prettier and accomplishes what curly braces do.
I still believe that the perfect language will look like python but run like c. We have the language, but not the implementation.
Tab/ws instead of braces makes the code prettier and accomplishes what curly braces do.
Except they don't. Curly braces allow unambiguous indentation, python syntax doesn't. This means refactoring code is always harder in Python than in any other language. This is why other languages do not adopt this syntax.
In my opinion, Python is good enough at a lot of different tasks. I don't think is the best possible language for everything, but it's close enough that it's better than having to keep more languages in your head.
I do a mix of math programming and general programming and I'd like to stay in one language if feasible. I would far rather use a well-designed, general-purpose language with math libraries than try to use a mathematical language for general-purpose programming.
It was Python trying to figure out where its modules and such were. It would try a bunch of likely-seeming directories and get ENOENT until it finally hit the right place. Most HPC systems are kind of expecting that you'll ship a single compiled C/C++ binary to each node, each of which may read a file or two of input from the fileserver. With Python, we had a thousand times as many requests and it just killed the poor thing.
This was on an IBM BlueGene. You can make your own call on the design quality of the system.
My solution to this problem was to build Python so that it finds all of its dependencies in one directory. This project
https://github.com/wavetossed/pybuild has the build script that I used on Ubuntu Lucid LTS. In addition this build ends up being portable to any Linux distro because all of the dependencies are in one directory tree where you can easily create a tarball.
Comments
It is very interesting to watch the rise and expansion of Python. I'm interested in the thoughts others have to why this is. Is it that it's to learn? Easy to read? Easy to extend? Whatever the cause, I'm glad that I'm learning it for Math too. Similar to the OP's observations, many of the holes when I got started have been filled.
All of the above. Because it's easy to read, it's easy to learn. I think python has nearly perfect syntax. Not sure why more others don't mimic it. Tab/ws instead of braces makes the code prettier and accomplishes what curly braces do. I still believe that the perfect language will look like python but run like c. We have the language, but not the implementation.
Except they don't. Curly braces allow unambiguous indentation, python syntax doesn't. This means refactoring code is always harder in Python than in any other language. This is why other languages do not adopt this syntax.
Haskell?
In my opinion, Python is good enough at a lot of different tasks. I don't think is the best possible language for everything, but it's close enough that it's better than having to keep more languages in your head.
I do a mix of math programming and general programming and I'd like to stay in one language if feasible. I would far rather use a well-designed, general-purpose language with math libraries than try to use a mathematical language for general-purpose programming.
Python: How to bring your supercomputer to a crawl as 1,000 nodes all try to access hundreds of non-existent files on the same network share.
Sounds like a poorly designed system rather than a Python problem.
It was Python trying to figure out where its modules and such were. It would try a bunch of likely-seeming directories and get ENOENT until it finally hit the right place. Most HPC systems are kind of expecting that you'll ship a single compiled C/C++ binary to each node, each of which may read a file or two of input from the fileserver. With Python, we had a thousand times as many requests and it just killed the poor thing.
This was on an IBM BlueGene. You can make your own call on the design quality of the system.
My solution to this problem was to build Python so that it finds all of its dependencies in one directory. This project https://github.com/wavetossed/pybuild has the build script that I used on Ubuntu Lucid LTS. In addition this build ends up being portable to any Linux distro because all of the dependencies are in one directory tree where you can easily create a tarball.
the shit would happen if you abuse LD_LIBRARY_PATH or PATH for C/C++ shared libraries.
Many bad python code witll sys.path.insert() which would also cause this.
By bad system I didn't mean your awesome IBM BlueGene, but the running system happened to use Python as language.