And by extension, it seems weird to me to complain that Julia is not a general purpose language because it can not generate binaries. What stops me from making the same statement about python, which is definitely general purpose?
And by extension, it seems weird to me to complain that Julia is not a general purpose language because it can not generate binaries. What stops me from making the same statement about python, which is definitely general purpose?
That depends on the use case. With improvements in static compilation, julia could probably be a good application language. Game development would be an interesting market.
I think this is the case for at least the most popular JIT'd languages: Java, C#, JS, and PHP. Also for the most popular interpreted languages: Python, Ruby and also PHP. I don't know about Visual Basic and R though.
I know that an exception is Dart, that combines a JIT and an AOT. I think EmacsLisp can now be also compiled, but I don't know if it works with all the code and is just free performance, or something more limited.
Edit: as pointed at by pjmlp, Java and C# already combine an AOT and a JIT. What I meant by the comment on Dart is that it can either be run with a VM or compiled to produce binaries.
Other examples are Lisp and Scheme variants, Eiffel, OCaml, Haskell, Prolog.
Not that many places use Java/C# AOT compilation, except for games/iOS apps.
Almost every place I've seen using Java/C# was using JIT.
As for not everything being supported, well that is no different from having C++ code with RTTI and exceptions disabled, or being forced into a specific linking model due to possible problems with a third party dependency.
Is is still plain old Java/Kotlin/C++ as usual.
Press should be better informed, but that is asking too much in modern times.
I might have a counter example: Common Lisp (a compiled language) can be run from sources as a script (like interpreted-ish languages) and we can build self-contained binaries. With SBCL they weight ±20MB minimum (proprietary implementations do tree shaking) and they start instantly.
I agree that generating binaries don't make a language general purpose, I just tried to give an exemple of an ad hoc non scientific thing that is considered "important" to the community (its an official project) that is stuck. The common sense would be just list the web frameworks but I dont think its fair simply because there is no interest on it (yet).
1) querying a time series database of systems metrics at scale for (large) fleets. This is being done via a JSON API. Directly in Julia.
2) Creating data frames from these queries, and performing fleet wide analytics. Quickly. Millions to hundreds of millions of rows in the data frames, typically 4-20 columns. Directly in Julia, no appeal to a 2nd language.
3) leveraging the power of the language to post process these data sets before analysis, to remove an "optimization" that reduced data quality.
4) operate quickly on gigabytes of queried data, threading and sharding my requests, as the server can't handle large requests, but it can handle parallel ones. Poor design, but I can work around it ... trivially ... with Julia
5) creating jupyter lab notebooks for simple consumption of these more complex data sets by wider audiences, complete with plots, and other things.
No science done here ... well ... data science maybe ... and this is specifically in support of business analytics, process optimization, etc.
Julia is an excellent language for this, 10 out of 10, would recommend.
Python is famously bad at this. I hope Julia's proponents don't stop at "look we're only as bad as Python".
A sibling comment made a point about "compiling down to shared libraries" which seems similar to what you are describing, but that seems like it has little to do with "the two language problem".
I love Julia. Which is why it's so painful that I have to rewrite all my elegant Julia prototype code in C++, so I can compile into a shared lib for the users. Every. Single. Time. Two languages.
Now that it isn't the main front and centre claim, I feel a bit less bitter about using it as a prototyping language.
Waiting another 5 years and maybe it really will solve the two-language problem.
Anyways, I'm glad I did invest in learning Julia. Just disappointed it didn't save me from C++. On to Rust!
Common Lisp was also designed to be compiled. Most implementations these days compile to machine code. Compilation is incremental, but ahead-of-time. That means you can start running your program without having yet compiled all the features or libraries you want. You can—while you’re in the REPL or even while your program is running—compile and load extra libraries later. Compilation is cached across sessions, so you won’t ever have to recompile something that doesn’t change.
Despite Lisp being mega-interactive, incremental, and dynamic, just about every implementation of Lisp allows you to just write out a compiled binary. In the implementation called “Steel Bank Common Lisp” (SBCL), from the REPL, you just write:
(sb-ext:save-lisp-and-die "mycoolprog" :executable t :entry-point 'main)
which will produce a statically linked executable binary called “mycoolprog” using the function called “main” as the entry point.Unless you’ve specifically programmed it in, there will be no JIT lag, no runtime compilation, etc. It will all just be compiled machine code running at the speed of your processor. (It’s possible and even easy to invoke the compiler at run-time, even in your static binary, which people rarely do, and when they do, they know exactly what they’re doing and why.)
All of this is a complete non-issue in Lisp, and hasn’t been for about 35 years (or more).
./mycoolprog
just works. From a user perspective, there’s no difference.The binary itself isn’t structured like a typical one with C debugging symbols, etc. But it’s also not some “faux binary” like a bunch of .pyc bundled as data and unzipped when the program runs. It truly is machine code, just arranged differently than a bunch of C ABI functions.
I claim most people running binaries don’t care about the memory layout of the binary. I certainly am never thinking about that every time I run `grep`. You don’t debug Lisp programs with C’s tooling. You use Lisp’s tooling.
(Unless, of course, you use an implementation like Embeddable Common Lisp, which does compile your Lisp program as a C program, and does produce a non-image-based executable. That’s the beauty of Lisp being a standardized language with multiple conforming implementations.)
http://www.lispworks.com/documentation/lw71/DV/html/delivery... https://franz.com/support/documentation/current/doc/dll.htm
Unfortunately none of the FOSS implementations have this ability (to my knowledge). There is nothing inherently in Common Lisp that mandates the "core dump" delivery model.
https://github.com/sharplispers/cormanlisp/blob/master/docum...