News for hackers. Stuff that matters.
Re:Julia 1.6: what has changed since Julia 1.0? by the__alchemist on Sunday February 14, 2021 @11:16AM (#26133546)
> Plotting, it turns out, is basically a really hard thing for a compiler. It is many, many, small methods, most of which are only called once. And unlike most Julia code, it doesn’t actually benefit all that much from Julia’s JIT. Julia’s JIT is normally specializing code, and running a ton of optimizations. But plotting itself isn’t in the hot-loop – optimizing the code takes longer than running it the few dozen times it might be used unoptimized. To make a long-story short, plotting is the poster child example for Julia needing to compile things before it can run them.

This is misleading. There's no reason you need to to compile the plotting library every time you load a REPL or program. Python, a "slow" interpreted language handles this quickly, as does Rust, a slow-to-compile Lang - You can compile and run a Rust program that plots more quickly than in Julia, since it doesn't need to compile the plotting lib after it's initially installed.

Re:Julia 1.6: what has changed since Julia 1.0? by find on Sunday February 14, 2021 @12:59PM (#26134474)
You can certainly achieve the Rust plotting solution for Julia by compiling a plotting package with PackageCompiler. I use this for day-to-day research tasks.

However, Julia users are greedy! They want their cake (composability, portability, dynamic language features) and eat it too (performance). Lots of effort has thus been put into the language towards not needing solutions like PackageCompiler.

Re:Julia 1.6: what has changed since Julia 1.0? by oxinabox on Sunday February 14, 2021 @11:20AM (#26133583)
> You don't need to compile the plotting library every time.

You don't need to but Julia does. Its definately a issue, and I know it is being worked on.

Julia doesn't store compiled binary code between sessions. Unless you compile it into a sysimage.

There are apparently reasons why caching compiled binary like this is complicated in Julia. But once that is solved, wow things are going to be nice.

Re:Julia 1.6: what has changed since Julia 1.0? by CyberDildonics on Sunday February 14, 2021 @12:45PM (#26134354)
> There are apparently reasons why caching compiled binary like this is complicated in Julia. But once that is solved, wow things are going to be nice.

I put a lot of hours into julia five years ago and all the same things were being said. I don't know why the compilation is so slow or why the caching is so bad, but it was the main complaint then and still is. The solutions are all 'just around the corner'. It reminds me of java two decades ago.

Actually most languages that get a lot of use seem to go through this. The big problems for some reason have solutions "just around the corner" but they remain giant problems.

I think what really happens is that people work on what they want. Solving their hard problems is not fun and no one holds anyone's feet to the flames. C++ has had problems with compile time and template errors, but there has been real commercial pressure to making progress on those. Julia's problems are the same as they were half a decade ago. Start working and wait an enormous amount of time for the exact things to compile that you compiled yesterday when you started it up.

Re:Julia 1.6: what has changed since Julia 1.0? by lhn on Sunday February 14, 2021 @01:21PM (#26134700)
I don't think it's fair to say Julia's problems haven't changed at all. While compilation latency is still an ongoing issue, it has consistently and noticeably improved over the years. Package caching is much better, you can save compilation results you depend on in your workflow with PackageCompiler, etc. There are now incredible tools (e.g., SnoopCompile.jl) for package developers to inspect closely where the compiler might have difficulty and fix the issues.

The major source of improvements in 1.6 is eliminating method invalidations. Julia's flexibility makes it vulnerable to invalidating already compiled code as new packages are loaded and new methods are defined. This triggers a disastrous cascade of recompiling a bunch of things, and is the main conceptual reason why nothing lower than type-inferred code is cached. If your method will be recompiled anyway, then what good is it to save the native code in the first place? Now that invalidations can be efficiently diagnosed and patched, there is definitely interest into caching lower levels of code in the compilation process, potentially even native machine code.

All of these progress however requires labor and care. I'd say the Julia community has spent an admirable amount of efforts into its latency issue, but there's a limit to how fast you can address these problems through open-source development without backing from major tech companies. Imagine the improvements to the Julia compiler had Google chose Julia for its S4TF project, for instance.

Re:Julia 1.6: what has changed since Julia 1.0? by Certhas on Sunday February 14, 2021 @01:14PM (#26134625)
I don't think that's fair, simply because things have actually gotten a lot better. This is shown in this blog post and it also is evident to people who use Julia:

https://i.redd.it/ik4uymvb28k51.png

Also, compiling a sysimage used to be an arcane art, and now works reasonably simply/well. It's easy to imagine a future where, with the tooling that is already there and without a magic breakthrough in caching Julia code, we simply get a per project sys-image in VSC that is recompiled when needed.

Re:Julia 1.6: what has changed since Julia 1.0? by DNF2 on Sunday February 14, 2021 @01:19PM (#26134675)
Well, a lot of resources have been put into reducing compilation times, and large improvements have been achieved. It's not just perennially 'around the corner', the improvements are tangible and happening right now.
Re:Julia 1.6: what has changed since Julia 1.0? by CoolGuySteve on Sunday February 14, 2021 @12:54PM (#26134437)
Yeah, I got fed up with Julia's plotting library and wrote a C++ Qt plot function that forks and plots arrays of doubles.

It runs instantly even with millions of points.

Re:Julia 1.6: what has changed since Julia 1.0? by gugagore on Sunday February 14, 2021 @06:05PM (#26137149)
Now what if your points aren't IEEE double-precision floating point numbers? What if they are Unix time represented as 64-bit integers, and you'd like to format the tick labels according to your locale?

That kind of composability is what keeps me interested in Julia, so I hope that the community keeps improving the overall UX of the language.

Re:Julia 1.6: what has changed since Julia 1.0? by CoolGuySteve on Monday February 15, 2021 @07:39AM (#26142155)
It’s QtCustomPlot so if I cared I could easily support those things. Julia does not have a monopoly on static types.

In the meantime, Julia GR plots are missing basic features and insist on putting bold black outlines around everything by default, obscuring the data.