4 ms·
You could just use Julia which basically gives you a Python like language but with C like performance. Julia will kick Java to the curb on numerics because it w
by socialdemocrat 7y ago
You could just use Julia which basically gives you a Python like language but with C like performance. Julia will kick Java to the curb on numerics because it was actually built with that in mind.
And you get all of this WITHOUT static typing and yes in Julia everything is still a full-fledged object. There is no difference between numbers and other objects in Julia. But numerics is still fast.
- steev 7y agoI tried really hard to like Julia and just couldn't get behind it. We used it for a research paper in the area of optimization and by the end of the project I really regretted it. Performance and built in numerics libraries were great, but I feel the language ergonomics are pretty bad. I hate Python just as much as the next developer, but I do find it much easier to use than Julia for research type work. My biggest qualm with Julia (and maybe this speaks to my inexperience with the language) is that it isn't always obvious when Julia is going to make a copy. We spent about an hour working through some code that was very slow (props to Julia's profiling tools) but couldn't figure out _why_ it was slow. It turned out that despite our best efforts, Julia was still copying a vector despite us using pre-allocated scratch space for the work. From my point of view, if I am comparing algorithms then Python's performance doesn't really matter and it's ergonomics win. If performance matters I'd just use C++ or Rust.
- Sukera 7y ago> My biggest qualm with Julia (and maybe this speaks to my inexperience with the language) is that it isn't always obvious when Julia is going to make a copy. If you're talking about slices of an array, those always create a copy unless created with the @views macro (or the equivalent function call).
- socialdemocrat 7y agoInteresting how we can have such vastly different experiences. When Julia makes a copy is pretty straightforward and natural IMHO. I would have been curious to see an example of the code you used where a copy was made without you knowing. I started with Python, but I find Julia better is almost every single way I can think of. Like even if Julia was slower than Python I would have picked it because I find it so much nicer to use. I wrote an article here about some of the observations I had about using Python after coming back to it from Julia: https://medium.com/@Jernfrost/python-vs-julia-observations-e61ee667fa95 https://medium.com/@Jernfrost/python-vs-julia-observations-e... There are some exchanges further down. Would have been interesting to hear your feedback on some of those things.
- hoiuyoi9087 7y agoJulia is dead, but few realize it. It's not as nice as Python, nor as fast as C++. And much less supported (tools/libraries/...) than both. So it sits in this awkward middle between Python and C++, basically sucking at both and excelling at none.
- psv1 7y agoI wouldn't claim that it's dead - it just fails to deliver on its main promise and the developer experience is still quite poor.
- dunefox 7y agoIn which way does it 'fail to deliver on its main promise' and how is the developer experience 'quite poor'?
- IOT_Apprentice 7y agoDoes Julia have the number of libraries that Python does?
- ChrisRackauckas 7y agoIt's somewhat the other direction. In the area that I work, scientific machine learning and differential equation modeling, Python does not really have a well-developed ecosystem while Julia has all of the tools. High performance methods with stiffness handling, automatic detection of Jacobian sparsity form a Julia program, methods for stochastic/delay/differential-algebraic equations, and the ability to embed neural networks into arbitrary differential equations and train them in a scientific context. Python is very far behind even MATLAB or Mathematica in this domain.
- psv1 7y agoThat's interesting. How do you think R fares in this respect? (The problem that I'm having with Julia isn't the math/computational aspect, it's Julia's use as a more general purpose programming language in additional to math.)