Hacker News new | ask | show | jobs
by dunefox 1217 days ago
The criticism of Julia seems strange:

> But the big dealbreaker with Julia is it only complies on the fly. That means you can't just hand a compiled executable to someone. You must give them instructions to install Julia and all your dependencies first. That's no good for anything you want to ship like a desktop app or a game. You also don't want Julia on your server recompiling with every web request.

That's an issue with Python as well, but the Julia team is working on that.

2 comments

Also, you can precompile a whole package and just ship the binary. We do this all of the time.

https://github.com/JuliaLang/PackageCompiler.jl

And getting things precompiled: https://sciml.ai/news/2022/09/21/compile_time/

How well does this work? I've seen this library but never used it. Julia is really slow from a cold start, which limits its utility for scripting.

About a year ago I was very off-put by someone on Reddit who sort of scolded me for wanting to use Julia as a general-purpose scripting language at the CLI. The Redditor said this wasn't as idiomatic usage of Julia. Idk how representative this is of the community at large.

PackageCompiler is one of the 6 projects pinned in the JuliaLang repo, along with Pkg (the package manager), the juliaup installer, IJulia Jupyter kernels, the Julialang.org website, and Julia itself.

https://github.com/JuliaLang

It's not "idiomatic usage of Julia". What the hell? It's literally given by the language developers as first class as the package manager and put on the website right next to it.

By any chance, was your post about starting Julia in a tight inner loop? If so, this really isn't idiomatic and exactly one of the few cases where Julia isn't great. Though it can be circumvented.
Tooks some digging, but [here it is](https://www.reddit.com/r/Julia/comments/n2mje4/comment/gwmt1...). I was talking about invoking Julia from the shell as a script. Because loading packages takes time, I found that my script was significantly faster in Python than Julia.

I never did get around to trying the daemon mode thing someone suggested. Someday I'll have a reason to do this again and try it.

Scolded is a bit exaggerated, I think. Python starts faster, but as soon as you have long running complex tasks Julia takes off - it's just the tradeoff you were hitting.
I don't know first hand how well it works, but py2exe is a thing.