3 ms·
The motivating factor for using Julia in a lot of cases is: what do you do when the problem you're trying to solve hasn't been exactly solved already by someone
by tavert 11y ago
The motivating factor for using Julia in a lot of cases is: what do you do when the problem you're trying to solve hasn't been exactly solved already by someone else's C extension? Can an average person (scientist, grad student, etc) who knows the math behind the problem they're trying to solve, but doesn't want to jump through hoops of awkward extension compilation (where you have to know not only the high level language and the low level language, but also how to use the interface layer API's that sit between them), write a high-performance implementation from scratch without it taking too much time or effort? If libraries do exist, do they work in parallel? And the standout features of the language like multiple dispatch and metaprogramming also allow some new, very natural ways of approaching a lot of problems in technical computing.
- dr_zoidberg 11y agoThat motivating factor can be achieved in Python using Numpy and Cython effectively. Check any of Ian Oszvald's High Performance Python talks.
- tavert 11y agoNumpy is great for dense multidimensional arrays of (edit: fixed precision) floating point numbers. Most problems I face need to deal with richer, more complicated, less uniform data structures than that. Similarly Cython is way better than writing a C extension by hand, but it feels very tacked-on (why are you writing libraries in a different sub-language than you use them from?), what you can do in nogil mode is pretty limited, and the choice of supported compilers is depressingly limited for when you need C++11, inline assembly, Fortran, linking to libraries that build with autotools, etc all to work cross-platform. If absolutely everything in the Python ecosystem were written using Cython then Python would have less of a performance problem, but there's a productivity, distribution, and difficulty barrier there.