7 ms·
I find Julia to be a beautiful little language. Applause to the team for this 1.3 release! In one of my CS classes we wrote a LISP using Julia. Our professor w
by ashton314 7y ago
I find Julia to be a beautiful little language. Applause to the team for this 1.3 release!
In one of my CS classes we wrote a LISP using Julia. Our professor wrote the parser for us, so we just had to focus on the actual interpreter bit. The pattern matching/multi-dispatch mechanisms were really nice. We didn't get to play too much with the parallelism mechanisms, but I liked what I did see.
I feel like Julia is a much richer language than, say, Python, and it would be a nice drop-in replacement for numerical computing tasks: it's faster, in some ways more ergonomic, and afaik can call out to Python libraries if needed. Has anyone here switched from Python to Julia for scientific/ML/AI purposes?
- dmos62 7y agoI played around with Julia a bit last year. One thing that stuck with me was the non-negligible start-up speed. If you want tight feedback loops you have to figure out a way to reuse a Julia instance (like Jupyter). On that train of thought, how interoperable is preexisting numpy/pandas code with Julia?
- short_sells_poo 7y agoI agree and this still holds it back from being the main language in a research environment where one wants to have quick turnaround time. On the other hand, it should work very well as a replacement for Numba. Numba already comes with a one-off jit cost, and it is much more limited in the sort of code it can speed up.
- socialdemocrat 7y agoYou can ;-) The secret sauce in Julia is to use Revise.jl package. Is makes your life so much better. It observes source code changes while you are at the REPL. No need to restart everything.
- ashton314 7y ago+1 for this package. Total game changer.
- jjoonathan 7y agoHow reliable is Revise.jl compared to ipython autoreload? My experience with ipython autoreload is... very poor, even though some people swear by it, so I have trust issues with this type of thing.
- montalbano 7y agoI use it extensively. In my experience it is very reliable. Onle once or twice in two years of using it has something strange happened with JIT compilation of functions. All I had to do to fix was restart the Julia REPL and load things in again.
- oxinabox 7y agoOne downside is Revise v2 actually itself has a fairly high startup cost. Best alternative is to pin it to Revise v1. I personsally don't mind the startup too much. But I do get where people are coming from
- enriquto 7y ago> One thing that stuck with me was the non-negligible start-up speed. Yes! this is the biggest roadblock for me. I find python startup time unbearably long. I do not want to imagine even using julia. And this is sad because the language is orders of magnitude better (for math, at least).
- timholy 7y agoIf you're used to launching everything from your OS's command prompt, this is a killer. But if you get used to launching a REPL and running things from there, it's much better, because you only pay the startup latency once.
- tfunnell 7y agoSome workflows require running scripts from the command line though
- JustFinishedBSG 7y agoJulia has 0-copy numpy array interop through PyCall.jl if that's what you're asking.
- dmos62 7y agoIt is. Thanks!
- ChrisRackauckas 7y agoAs for startup speed, note that in this round our research software engineer in the Julia Lab just brought the "first time to plot" to about 1/4 of what it was before. Julia 1.3 has a lot of these updates, and Julia 1.4 has a development sprint for bringing down the latency. I would be surprised if the common major latency issues still exist past next summer. Of course a JIT will always have some bumps compared to a pure interpreter, but Julia's compiler is definitely getting a lot smarter as to what to try and fully analyze (and what to cache)
- omaranto 7y ago> If you want tight feedback loops you have to figure out a way to reuse a Julia instance I think Julia is meant to be used like Lisp: - Step 1: Open the REPL. - Step 2: Don't close it until you are finished (both writing and running your program). My best guess is that people that complain about startup speed of Julia (and Emacs too for that matter) ignore step 2.
- tfunnell 7y agoFor myself, I write scripts that are part of automated analysis pipelines. So in my case (and probably others), using the REPL is mostly useful for testing code.
- The_rationalist 7y agoNot being 100% interoperable with python make Julia doomed. Library ecosystems have a human workforce value of billions of dollars, available for free. Any modern language that want to go mainstream must offer transparent and complete interoperability with an existing ecosystem. TypeScript -> js Kotlin -> jvm C++ -> C Elixir -> Erlang Hack -> php Crystal -> ruby As we can see there are still Big ecosystems lacking a new modern language™ The python ecosystem The C# (CLR) ecosystem It could be said that's mainly because those languages are already mostly "modern" There are also dying big ecosystem and there would be economic value to make their old libraries accessible. Fortran Pascal Perl Etc
- Tomte 7y ago> As we can see there are still Big ecosystems lacking a new modern language™ [...] The C# (CLR) ecosystem F#, obviously.
- coldtea 7y agoNot to mention C# is as modern as it gets...
- BubRoss 7y agoHow is C# modern? It is extremely verbose and rooted in Java style 'OO' with lots of memory hopping.
- SigmundA 7y agoEvery iteration of C# has made it less verbose and adds more modern concepts [1]. What do you mean by memory hopping, reference types? C# has had value types since the beginning unlike Java. 1. https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8 https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csh...
- coldtea 7y agoModern != less verbose
- bacr 7y agoIs there any chance the course material is available? I've been looking to better my Julia meta-programming. Most of the resources out there are geared towards other languages. It would be amazing to see some simple parser/interpreter implementations.
- montalbano 7y agoI switched to Julia from Python due to facing the classic '2-language problem' of scientists. We wanted an easy to use API and good speed. The main bottleneck was computing the Mittag-Leffler function. First we tried in Python, then we get a ~10x improvement by outsourcing that bit to Fortran. The Julia implementation of the Mittag-Leffler function is comparable to Fortran but writing the entire software package in Julia led to ~5x speedup due to avoiding language interop issues and taking advantage of other Julia-specific benefits.
- xenonite 7y agoSo, you obtained a 5x speedup of the whole package compared to the Python version with some Fortran extensions?
- montalbano 7y agoYes. And for anyone wondering about the state of the Julia package ecosystem compared to Python, someone had already written the main two packages we needed in Julia (for Mittag-Leffler computation and Inverse Laplace computation). At that time there was no Mittag-Leffler implemented in Python or SciPy that I could find. I could also add that we were computing integral equations with Mittag-Leffler function in the Kernels so in worst cases we needed O(n^2) calls to Mittag-Leffler function where n could be O(10^5).
- Rochus 7y agoIf you need another speedup consider LuaJIT which is used at CERN for heavy number crunching and data analysis, see http://cds.cern.ch/record/2157242?ln=de http://cds.cern.ch/record/2157242?ln=de. E.g. on slide 14: LuaJIT took 5.3 sec, C++/GCC 5.7 sec, PyPy 7.6 sec, Julia 35 sec and Python > 2 hours.
- improbable22 7y agoFrom the comments on that: > No one should use global scope of Julia for calculations: [...] which is said that takes 35 seconds. > If you wrap it in a function and not had a type instability, You'd get 4.704 seconds... Half-decently written Julia ought not to be much slower than C. But it does also allow you to write quick and dirty scripts with no care for speed, which is also useful. It would be nice if people wouldn't benchmark the latter. The manual has a pretty helpful section for avoiding this: https://docs.julialang.org/en/v1/manual/performance-tips/ https://docs.julialang.org/en/v1/manual/performance-tips/