| ▲ | pachico 3 hours ago | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Legitimate and honest question: in which circumstances would you choose Julia over more mainstream alternative like Go? | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | andriamanitra an hour ago | parent | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
If you need to deal with matrices Julia's built-in support for that kind of stuff is the best out of any language I've ever seen (and I've tried dozens of different languages). It's like having first-class numpy arrays without installing any third party packages, and the syntax is even more convenient than Python. The standard library is reasonably comprehensive (not quite as big as in Python or Ruby or Go, but it's usually more well-designed). It is also an excellent language for messing about because the language and especially the REPL have tons of quality-of-life features. I often use it when I want to do something interactively (eg. inspect a data set, draw a graph, or figure out what's going on with an Unicode string, or debug some bitwise trickery). What Julia is not great at is things where you need minimal overhead. It is performant for serious number crunching like simulations or machine learning tasks, but the runtime is quite heavy for simple scripting and command-line tools (where the JIT doesn't really get a chance to kick in). | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | kryptiskt 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Go is a total non-starter, it's not interactive at all. The competitors are things like Matlab, Mathematica, R or Python (with the right math libs). If you're weird you could use something like Haskell, APL or Lisp in this role, but you'd pay a hefty price in available libs. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | qalmakka 32 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
My two cents: while Julia is arguably more complex than Go, it's type system and especially its data types (N-dimensional arrays, ...) make it way more suited anything that needs to process complex data, or do anything that's even closely related to geometry. `.|>` is wonderful and makes functional-like code easier, and that's just the tip of the iceberg, macros are also beautiful and absurdly useful. Also LLVM more often than not generates faster code than the Go backend, albeit the slowdown at startup in Julia programs is often a dealbreaker for small scripts and iteration in my experience Also, the REPL. Julia's REPL is vastly better than any other language REPL, by far. Python's is good but Julia is way better, even as a calculator for instance, it has fractions and it is more suited for maths | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | dandanua 2 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
[delayed] | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | Human-Cabbage 3 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Julia is aimed at scientific computing. It competes against Python with numpy/scipy, R, etc. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | Certhas 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
On top of what others have said: In many situations the alternative to Julia isn't Go but C++ (or maybe Rust though its library support is lacking). E.g. if you are writing high-ish* performance algorithmic code that should also run on GPU. Julia also heavily prioritizes composability of libraries. And though that can be a source of bugs at times, there are things we are doing in Julia with one or two PhD students that would be practically impossible (as in require an order of magnitude more implementation work) in any other language. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | wolvesechoes 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
It is highly interactive and dynamic, yet performant. And it is not only about scientific computing, for almost any application can take advantage of interactive, modifiable system, where you can explore your state at any point. In others, more static langs good debuggers help with this to lesser or larger extend, but it is not the same from my experience. So better question is: in which circumstances would you choose Julia over more mainstream-y alternative like Clojure? And here scientific and numerical angle comes to play. At the same time I think Julia is failed attempt, with unsolvable problems, but it is a different topic. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | huijzer 2 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
To replace uses where you would use Matlab or R probably. I prefer Julia over Matlab or R. So data science. For production code however, it's not great since it has no static typing. Imagine having your production code crash mid-execution with the error "Function foo not found". Only dynamic languages can do that to you. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | xeonmc 31 minutes ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Its syntax is great for math and has a comprehensive ecosystem of scientific computing libraries stewarded by that timelord guy from Men in Black 3. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | setopt 3 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Scientific computing. AFAIK, library support for that in Go is almost nonexistent. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | markkitti 3 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
When I need to do serious math, I use Julia. | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | Joel_Mckay an hour ago | parent | prev | next [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Julia collapses entire programming paradigms into single character syntax, and often will transparently handle clean parallelism or cluster instance batching. https://docs.julialang.org/en/v1/manual/mathematical-operati... Go is similar in many ways, but takes a performance hit in areas like Garbage collection. The Julia community is great, and performance projects may also be compiled into a binary image. =3 | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | bandrami 2 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Math. Places you might use Wolfram or Sage. | |||||||||||||||||||||||||||||||||||||||||||||||||||||