News for hackers. Stuff that matters.
Re:Julia: Faster than Fortran, cleaner than Numpy by bobbylarrybobby on Sunday June 20, 2021 @02:21PM (#27572573)
Unfortunately Julia is a “repl-based language”. You are expected to open a repl and work in it for as long as possible so that your compilations all remain cached. Packages like Revise can help reevaluate code that changes so that you don’t have to leave the repl.

I do wish that Julia would start up in an interpreted mode and compile in the background so that it would be fast enough when first opened and then attain maximum speed later on. (I think this is how JavaScript engines work?)

Re:Julia: Faster than Fortran, cleaner than Numpy by eigenspace on Sunday June 20, 2021 @02:30PM (#27572668)
You can have what you want here by using DaemonMode.jl

https://github.com/dmolina/DaemonMode.jl

Re:Julia: Faster than Fortran, cleaner than Numpy by snicker7 on Sunday June 20, 2021 @02:46PM (#27572818)
It would be nice if their was an "offline version" of this, e.g. automagically cache all compiled code to disk. Daemon mode isn't restart-friendly.
Re:Julia: Faster than Fortran, cleaner than Numpy by adgjlsfhk1 on Sunday June 20, 2021 @02:52PM (#27572868)
That's basically what PackageCompiler does. That said, StaticCompiler.jl is expected to improve the state of this in the future.
Re:Julia: Faster than Fortran, cleaner than Numpy by snicker7 on Sunday June 20, 2021 @11:39PM (#27576073)
Not quite. PackageCompiler isn't automagic. The sysimage doesn't get automatically updated in the REPL. You have to create one manually (and this requires tracing instead of static type inference which Julia can do). So the workflow isn't zero-friction. And StaticCompiler hasn't been updated in over a year.

The problem with Julia tooling in general is that they feel 90% done. And tooling is, in my opinion, more important than the language itself.

Re:Julia: Faster than Fortran, cleaner than Numpy by eigenspace on Monday June 21, 2021 @12:04AM (#27576213)
> So the workflow isn't zero-friction. And StaticCompiler hasn't been updated in over a year.

There's much more recent work here: https://github.com/tshort/StaticCompiler.jl/pull/46 and apparently some more is still ongoing privately.

That said, yeah. I would not recommend Julia currently for people who truly believe they need AOT compilation, and that they need to trigger AOT compilation very often and with low friction. That definitely needs more work, but it's happening.

That said, a lot of people overestimate how much they actually need AOT compilation.

Julia has some fantastic tooling in other areas though. Especially the package management and interactive analysis tools.

Re:Julia: Faster than Fortran, cleaner than Numpy by Sanguinaire on Sunday June 20, 2021 @06:36PM (#27574484)
I really wish there was an option for better non-REPL usage - basically Cargo for package installation and ahead-of-time compilation, but with the Julia syntax and ethos.
Re:Julia: Faster than Fortran, cleaner than Numpy by tsimionescu on Sunday June 20, 2021 @03:07PM (#27572987)
> (I think this is how JavaScript engines work?)

Yes, modern V8 does this, as does the JVM. Common Lisp runtimes also often support this, though I think they usually leave it up to the programmer to choose when to compile a function, they don't always do it automatically. The .NET CLR also behaves like Julia - JIT compile on first execution of every function.