Hacker News new | ask | show | jobs
by sinnsro 112 days ago
While others have mentioned plenty of reasons, for this particular case I want to highlight 3 things:

1. Julia has great tooling for operations research/linear programming. JuMP provides an standardise interface to interact with solvers (e.g., Gurobi, CPLEX) via wrapper libraries.

2. I like its overall ergonomics. It is fast enough that a programmer might not need to use a compiled language for performance. The type system allows for multiple dispatch. And the syntax is more approachable than say Python for matrix algebra.

3. I would say the performance is overstated by the community but out of the box it is good enough to avoid languages like C/C++ to build solutions. The two-language problem in academia is real, and Julia helps to reduce that gap somewhat in certain fields.

1 comments

> might not need to use a compiled language

A very minor nit: Julia is a compiled language, but it has an unusual model where it compiles functions the first time they're used. This is why highly-optimized Julia can have pretty extreme performance.

> I would say the performance is overstated by the community but out of the box it is good enough to avoid languages like C/C++ to build solutions.

For about a year we had a 2-hour problem in our hiring pipeline where the main goal was to write the fastest code possible to do a task, and the best 2 solutions were in Julia. C++ was a close third, and Rust after that.

I would not call that very unusual, even Lisp and Dartmouth BASIC used such approach, BASIC only got the fame of being interpreted when the compiler was thrown away to fit the language with 8 bit home computers ROMs.

Or anyone living in any JIT ecosystem for that matter, when it actually kicks off is an implementation detail, and some ecosystems even have configuration options.

> A very minor nit: Julia is a compiled language

Caught. Should have just listed the usual suspects (C, C++, maybe Rust nowadays?).

> and the best 2 solutions were in Julia. C++ was a close third, and Rust after that.

Awesome. Which type of problem was this, if you can share?

It was roughly "given this dataset with 100 time series, write code to calculate these statistics as performantly as possible. Make one single-threaded version and one using 4 cores."

The C++ versions were around ~250 lines long, and the developers generally only had time to try one approach. While the Julia versions were around ~80 lines long, and the developers had time to try several approaches. I'm sure the best theoretically possible C++ version is faster than the best Julia version, but given that we're always working with time constraints, the performance per developer hour in Julia tends to be really good in my experience.