News for hackers. Stuff that matters.
Re:I Love Julia by no_future on Friday December 05, 2014 @03:42PM (#8706775)
How can Julia be "on par" with C when it is itself implemented in C?
Re:I Love Julia by jwmerrill on Friday December 05, 2014 @04:02PM (#8706873)
Both C and Julia are compiled to machine code before they are executed. C is compiled Ahead Of Time, and Julia compiles new code as it runs, Just In Time, whenever a function is called with argument types it hasn't seen before.

Parts of Julia's library and compiler are implemented in C, but this actually isn't very relevant to the speed of the generated machine code that actually runs.

Statements about Julia being "on par" with C mean that if you write code in a straightforward way to solve some problem, e.g. "find the three largest even integers in a collection," then Julia is capable of generating machine code that executes with efficiency "on par" with the machine code that C generates.

The "straightforward" part in the last paragraph is actually important. You could in principle solve this problem in any language by writing your own machine code generator in that language, and then the distinction between efficiency of different languages breaks down. But usually you won't do that, and so usually the distinction does have some meaning.

Re:I Love Julia by johnmyleswhite on Friday December 05, 2014 @04:23PM (#8706997)
GNU's assembler is implemented in C.
Re:I Love Julia by Fede_V on Friday December 05, 2014 @03:47PM (#8706801)
Because Julia has been carefully designed to allow functions to compile down to very fast machine code. There are a few important design choices that are necessary to make it possible to do this (type stability, etc) - there are a few talks about the design principles that went into making Julia.

However, numerical Python can be nearly as fast as C as well with very, very little additional work (using Numba means adding @jit on top of a function). The downside is that Numba only works on the 'numpy' subset of Python, basically.

Re:I Love Julia by no_future on Friday December 05, 2014 @03:52PM (#8706822)
Sounds like snake oil to me.
Re:I Love Julia by apl on Friday December 05, 2014 @04:06PM (#8706895)
You could, of course, just download a Julia distribution, fire up the interpreter and see for yourself. But I'm sure unfounded snark is much, much better.
Re:I Love Julia by kazagistar on Friday December 05, 2014 @05:31PM (#8707315)
If you want to know the catch, it is that it has high latency at first run, and requires a full compiler at runtime. It is optimized for numerical work, where the long runtime make slow startup irrelevant and low latency is easily amortized.

But if you are suspicious, there are introspection utilities that let you see the generated native code. Give it a try.

Re:I Love Julia by ElectronCharge on Saturday December 06, 2014 @05:12PM (#8710393)
As I understand it there's a plan to produce stand-alone binaries downstream, with no compiler needed at runtime.

It's using LLVM on the backed, so it should be quite possible.