20 ms·
Julia 1.6 Highlights
- snicker7 6y agoOn the package ecosystem side, 1.6 is required for JET.jl [0]. Despite being a dynamic language, the Julia compiler does a lot of static analysis (or "abstract interpretation" in Julia lingo). JET.jl exposes some of this to the user, opening a path for additional static analysis tools (or maybe even custom compilers). [0]: https://github.com/aviatesk/JET.jl https://github.com/aviatesk/JET.jl
- 3JPLW 6y agoThe feature I'm most excited about is the parallel — and automatic — precompilation. Combined with the iterative latency improvements, Julia 1.6 has far fewer coffee breaks.
- shmeano 6y agoor sword fights https://xkcd.com/303/ https://xkcd.com/303/
- yesenadam 6y agoOhh, is that what the programmers were doing all through Halt and Catch Fire? Waiting for compilation? I couldn't understand how they got away with acting like naughty 5 year olds, throwing things at each other constantly.
- pjmlp 6y agoLove the improvements, all those little details that improve the overall usability.
- xiphias2 6y agoCool, I was thinking of downloading the RC, the demo was so impressive. Will there be an M1 Mac version for 1.7?
- thetwentyone 6y agoI think so - Julia master branch (1.7 precursor) works on M1, but not all the dependencies that some packages require have been built for M1. Though, I understand that the wonderful packaging system and the folks who work on it are working on it. > `git clone https://github.com/JuliaLang/julia https://github.com/JuliaLang/julia` and `make` should be enough at this point. https://github.com/JuliaLang/julia/issues/36617#issuecomment-791110407 https://github.com/JuliaLang/julia/issues/36617#issuecomment...
- xiphias2 6y agoCool, I'll start with 1.6, but it looks interesting of course :)
- staticfloat 6y agoYeah, we've managed to get Julia itself running pretty well on the M1, there are still a few outstanding issues such as backtraces not being as high-quality as on other platforms. You can see the overall tracking issue [0] for a more granular status on the platform support. For the package ecosystem as a whole, we will be slowly increasing the number of third-party packages that are built for aarch64-darwin, but this is a major undertaking, so I don't expect it to be truly "finished" for 3-6 months. This is due to both technical issues (packages may not build cleanly on aarch64-darwin and may need some patching/updating especially since some of our compilers like gfortran are prerelease testing builds, building for aarch64-darwin means that the packages must be marked as compatible with Julia 1.6+ only--due to a limitation in Julia 1.5-, etc...) as well as practical (Our packaging team is primarily volunteers and they only have so much bandwidth to help fix compilation issues). [0] https://github.com/JuliaLang/julia/issues/36617 https://github.com/JuliaLang/julia/issues/36617
- xiphias2 6y ago
- f6v 6y agoIs there a per-project way to manage dependencies yet? I find global package installation to be the biggest weakness of all the R projects out there. Anaconda can help, but it’s not widely used for R projects. And Docker... well, don’t get me started.
- eigenspace 6y agoYes, absolutely. Julia has very strong per-project dependency tracking and reproducibility.
- adgjlsfhk1 6y agoYeah. Julia's had that since (at least) 1.0. Environments are built-in, and you specify project dependencies in a Projects.toml file https://pkgdocs.julialang.org/v1/toml-files/ https://pkgdocs.julialang.org/v1/toml-files/.
- UncleOxidant 6y agoOr you can activate a local project in a directory, add packages and the Project.toml gets created for you.
- staticfloat 6y agoSmall nitpick; its Project.toml (or JuliaProject.toml, to avoid name clashes) not Projects.toml
- oxinabox 6y agoSince 0.7 (which was 1.0 with deprecations) In julia 0.6 and before it was exactly as bad as described. (though there were things like Playground.jl to kind of work around it)
- krastanov 6y agoI might be misunderstanding your question, but this post is about Julia, not R. Julia has a pretty great per-project dependency management.
- MisterBiggs 6y agoI've been running the 1.6 release candidates, and the compilation speed improvements have been massive. There have been plenty of instances in the past where I've tried to 'quickly' show off some Julia code, and I end up waiting ~45 seconds for a plot to show or a minute for a Pluto notebook to run, and that's not to mention waiting for my imports to finish. It's still slower than Matlab for the first run, but it's at least in the same ballpark now.
- Sukera 6y agoWhat kind of speed do you see now?
- leephillips 6y agoI’ve also been running the release candidates, and I get something like 6 seconds to first plot on my 2013 laptop, including the time for `using Plots` and the time to actually draw the first plot. A huge improvement; kudos to the developers.
- MisterBiggs 6y agoNo idea if this is really a fair comparison but just to get a brief idea of current speeds: julia> @time let using Plots plot([sin, cos]) end 11.267558 seconds (17.98 M allocations: 1.114 GiB, 4.83% gc time) Versus Matlab which probably takes about 15 seconds just to open the editor but plotting is very fast. >> tic fplot( @(x) [sin(x) cos(x)]) toc Elapsed time is 0.374394 seconds. Julia is just about as fast as Matlab after the first run for plotting.
- siproprio 6y ago> Matlab which probably takes about 15 seconds just to open the editor Try this: matlab -nosplash -nodesktop -r "tic; fplot( @(x) [sin(x) cos(x)]); toc"
- eigenspace 6y ago
- wiz21c 6y agoWhatever improves loading times is more than welcome. It's not really acceptable to wait because you import some libraries. In understand Julia makes lots of things under the hood and that there's a price to pay for that but being a python user, it's a bit inconvenient. But I'll sure give it a try because Julia hits a sweet spot between expressiveness and speed (at least for the kind of stuff I do : matrix, algorithms, graphs computations).
- ng55QPSK 6y agomaybe i misread this, but milestone "1.6 blockers" still has 3 open with "1.6 now considered feature-complete. This milestone tracks release-blocking issues." - so how can 1.6 be ready?
- kristofferc 6y agoIt is simple. Those issues shouldn't have had the milestone.
- ng55QPSK 6y agoI see. But you should work on your release process if thing like this happen.
- kristofferc 6y agoSorry for the inconvenience and thanks for the advice. We'll do our best to ensure this doesn't happen again.
- icandoit 6y agoYou guys are doing great. Julia is really taking shape. Can't wait to jump ship from Python. It's also nice to see that you (personally) are sponsoring zig development. There is so much more room for improvement in the arena of programming languages. Infrastructure like this is a huge multiplier.
- kristofferc 6y agoI'm excited about Zig and I've spent many evenings looking at Andrew's streams. I haven't gotten the time to try it out properly myself but I'm looking forward to it.
- fermienrico 6y agoAre the performance claims of Julia greatly exaggerated? Julia loses almost consistently to Go, Crystal, Nim, Rust, Kotlin, Python (PyPy, Numpy): https://github.com/kostya/benchmarks https://github.com/kostya/benchmarks Is this because of bad typing or they didn't use Julia properly in idiomatic manner?
- adgjlsfhk1 6y agoThey are measuring compile time, not runtime speed.
- stabbles 6y agoThey are measuring compile time and runtime speed, not just runtime speed like for statically compiled langauges
- dunefox 6y agoWhere does it say that?
- ZeroCool2u 6y agoI'm not a huge Julia user, but typically if they don't specifically mention they're segmenting runtime from compilation time with Julia, that's a bit of a red flag, because unlike Rust, Go, or C++ the compilation step isn't separate in Julia. To the user it just looks like it's running, when in reality it's compiling, then running, without really letting you know in between.
- cygx 6y agoIn the matrix multiplication example, the measurement is done via a simple t = time() results = calc(n) elapsed = time() - t So startup time at least isn't included. One might argue that this is still biased against Julia due to its compilation strategy, but fixing that would mean you'd have to figure out what the appropriate way to get 'equivalent' timings for any of the other languages would be as well - something far more involved than just slapping a timer around a block of code in all cases... edit: As pointed out below, the Julia code should indeed already have been 'warmed up' due to a preceding sanity check. My apologies for 'lying'...
- noisy_boy 6y agoHow easy it is to produce a compiled executable in 1.6? I took a cursory look at the docs but couldn't spot the steps for doing so.
- dklend122 6y agoThat's coming. Pieces are there but still need polish and integration. Fib was around 44kb with no runtime required. Check out staticcompiler.jl
- superdimwit 6y agoIn your experience, what are the current limitations?
- eigenspace 6y agoThere's all sorts of limitations right now. E.g. you can't allocate an array right now, dynamic dispatch is prohibited, there are some bugs too. Most of this is just a relic from StaticCompiler.jl being a very straightforward slight repurposing of GPUCompiler.jl. It will take some work to make it robust on CPU code, but the path to doing so it pretty strightforward. It just requires dedicated work, but it's not a top priority for anyone who has the know-how currently.
- triztian 6y agoI'd love to be able to contribute to this, somewhat new to Julia, but I'm sure I could help with something ... Do you have any links to what has been currently done? EDIT: Found this thread so far: https://discourse.julialang.org/t/statically-compiled-and-statically-linked/12290 https://discourse.julialang.org/t/statically-compiled-and-st...
- eigenspace 6y agoThis is the PR to look at if you want to try and help: https://github.com/tshort/StaticCompiler.jl/pull/46 https://github.com/tshort/StaticCompiler.jl/pull/46 I think this isn't really a great place for beginners though unfortunately. This project is tightly coupled to undocumented internals of not only julia's compiler, but also LLVM.jl and GPUCompiler.jl. It'll require a lot of learning to be able to meaningfully contribute at this stage.
- cbkeller 6y agoSee also Lyndon’s blog post [1] about what all has changed since 1.0, for anyone who’s been away for a while. [1] https://www.oxinabox.net/2021/02/13/Julia-1.6-what-has-changed-since-1.0.html https://www.oxinabox.net/2021/02/13/Julia-1.6-what-has-chang...
- beeforpork 6y agoJulia is such a wonderful language. There are many design decisions that I like, but most importantly to me, its ingenious idea of combining multiple dispatch with JIT compilation still leaves me in awe. It is such an elegant solution to achieving efficient multiple dispatch. Thanks to everyone who is working on this language!
- skohan 6y agoWhat does it mean exactly? Or what is novel here?
- JulianMorrison 6y agoIt's like C++ template specialisation, but it happens when the compiler realises you need a particular version. Which may be at runtime, if you changed something.
- dan-robertson 6y agoExcept the language can choose from suitable templates (eg instead of a generic matrix multiply template for floats, it can use a library like LAPACK) and does so in a systematic way. It also has a feature (I can’t recall the name) which is a bit like fexprs (let’s say macros who’s inputs are the types of the arguments of a function) that can generate customised code (eg an FFT depending on the input size) on the fly.
- gugagore 6y agoI believe you're thinking of https://docs.julialang.org/en/v1/manual/metaprogramming/#Generated-functions https://docs.julialang.org/en/v1/manual/metaprogramming/#Gen... (but I don't find it helpful to compare to fexprs, which I think of as more about deferring evaluation, whereas generated functions are about "staged programming".)
- ddragon 6y agoThis video is good explaining the idea behind multiple dispatch in Julia if you have time: https://www.youtube.com/watch?v=kc9HwsxE1OY https://www.youtube.com/watch?v=kc9HwsxE1OY
- systems 6y agoI know its minor, but I still hope they will fix scoping not that my suggestion is good, but what they have now is bad https://github.com/JuliaLang/julia/issues/37187 https://github.com/JuliaLang/julia/issues/37187
- StefanKarpinski 6y agoHas been fixed since 1.5.
- patagurbon 6y agoShould that issue be closed then?
- systems 6y agoIts a suggestion to fix the awkwardness, one that will never get approved "Put your code into functions, people!" .. is the reason why most people dont notice the weird scoping rules You will only hit the weirdness face first, if you write scripts with global variables, which is usually what beginners do Most advanced users, and library writers, probably hardly notice it
- wott 6y ago> Its a suggestion to fix the awkwardness, one that will never get approved You were courageous to even try :-) From their refusal to see any use in explicit variables declarations, their (somewhat related) huge scope debacle, to its strange and irregular 'resolution', not to mention the original absurdly weird propositions they had made to resolve it: the scope and variable declaration subject is pretty hopeless in Julia land. I quickly gave up on it years ago (long before the scope debacle), as I had no intention of losing my time, when I saw the arguments and the logic they used.
- DNF2 6y agoThis is just a disagreement over basic design: should variable declarations be explicit or not. It is a choice, and something that reasonable people can disagree on. Framing this as a case of irrational and illogical behaviour is unnecessary and unreasonable in my opinion. A lot of serious thought and debate went into the resolution. There is no need to disrespect and badmouth people because they have different priorities than you.
- odipar 6y agoI like Julia (mostly because of multiple dispatch). The only thing that's lacking is an industry strength Garbage Collector, something that can be found in the JVM. I know that you shouldn't produce garbage, but I happen to like immutable data structures and those work better with optimised GCs.
- newswasboring 6y agoI didn't even know julia GC had issues. Care to elaborate?
- StefanKarpinski 6y agoIt doesn’t, it just doesn’t have a $100B GC like Java does. Rather than spending that kind of money trying to compensate for a language design that generates massive amounts of garbage (ie Java), Julia takes the approach of making it easier to avoid generating garbage in the first place, eg by using immutable structures that can be stack allocated and having nice APIs for modifying pre-allocated data structures in place.
- leephillips 6y agoOuch.
- StefanKarpinski 6y agoI mean I’m not trying to hate on Java — pointer-heavy programming was all the rage when it was designed, and GC was a hot research topic, so there was good reason to be optimistic about that approach. But it turns out that it’s very hard to make up for generating tons of garbage and pointer-heavy programming hasn’t aged well given the way hardware has evolved (pointers are large and indirection is expensive).
- leephillips 6y agoHating on Java seems perfectly reasonable to me.
- ghosty-discord 6y agodo people use Julia for machine learning model or else? is it ready to go
- JulianMorrison 6y agoBTW, broken link on the documentation page, "The documentation is also available in PDF format: julia-1.6.0.pdf." No it isn't.
- mbauman 6y agoThanks for the report: https://github.com/JuliaLang/julia/issues/40190 https://github.com/JuliaLang/julia/issues/40190 Edit: it's now building: https://github.com/JuliaLang/docs.julialang.org/runs/2196972845?check_suite_focus=true https://github.com/JuliaLang/docs.julialang.org/runs/2196972...
- JulianMorrison 6y agoMuch appreciated.
- siproprio 6y agoOn 1.6, I tried "] add Plots" and julia got stuck.
- StefanKarpinski 6y agoPlease file an issue describing the situation: https://github.com/JuliaLang/julia/issues/new https://github.com/JuliaLang/julia/issues/new
- siproprio 6y agoAfter the issue, I nuked the .julia folder, and now it is taking too long to clone the "JuliaRegistries/General.git" repo. By the download speed, it might take a few hours before I can plot something. It also seems that just doing "git clone JuliaRegistries/General.git" is much faster than doing "] add Plots"
- siproprio 6y ago> (@v1.6) pkg> add Plots Installing known registries into `~\.julia` Cloning registry from "https://github.com/JuliaRegistries/General.git https://github.com/JuliaRegistries/General.git" Fetching: [==> ] 3.4 % I gave up because it's just too slow (more than 15 min to get to 3%). Maybe plotting is indeed faster, but I don't think I'll actually get to that point.
- Buttons840 6y agoI recently ported a reinforcement learning algorithm from PyTorch to Julia. I did my best to keep the implementations the same, with the same hyperparameters, network sizes, etc. I think I did a pretty good job because the performance was similar, solving the CartPole environment in the a similar number of steps, etc. The Julia implementation ended up being about 2 to 3 times faster. I timed the core learning loops, the network evaluations and gradient calculations and applications, and PyTorch and Julia performed similar here. So it wasn't that Julia was faster at learning. Instead it was all the in-between, all the "book keeping" in Python ended up being much faster in Julia, enough so that overall it was 2 to 3 times faster. (I was training on a CPU though. Things may be different if you're using a GPU, I don't know.)
- stellalo 6y agoThat’s interesting: did you use Flux?
- Buttons840 6y agoYes. I used Flux.
- wiz21c 6y agocould you tell us more ? It looks like a very in depth / interesting benchmark
- Buttons840 6y agoI will make a blog post about it.
- gdpr 6y agoSimilar experience over here. (G)ARCH models are severely underserved in Python, and I could not be bothered to learn a Probabilistic programming abstraction like Pyro or Stan just to build a quick prototype myself. Chose Julia instead. Took 4 hours to get everything sorted out (including getting IT to allow Julias package manager to actually download stuff) and have the first model running just putting a paper into code. Since code is just writing the math, this is a vast communication improvement. After fiddling around withit at home for a week, this was the first professional experience and I'm blown away.
- DreamScatter 6y agoJulia has a toxic anti-open source community, they ban people from contributing code. For example, Julia v1.6 doesn't have a feature to apply `rem` to Gaussian integers, because my pull request could never be completed because I was banned The language is good, i released several popular Julia projects, but people like Stefan Karpinski are toxic and they are anti-open source because they just ban people from contributing code. I have zero respect for the Julia community at this point, but the language is alright.