3 ms·
This is really exciting. I've been using Mojo off and on for side projects over the last two years. (copying from some previous Mojo threads) It's got an owner
by totalperspectiv 1mo ago
This is really exciting. I've been using Mojo off and on for side projects over the last two years.
(copying from some previous Mojo threads) It's got an ownership system adjacent to Rust, comptime similar to Zig, and a first class dependent type system. Even more exciting, is that uses LLVM (to the best of my understanding) in some novel ways and for more optimizations.
- dlahoda 1mo agoHm, in docs they say that dependent type system is not first class seems. Is it even dependent? More like refinement types, which seems will be in Rust too.Also HN recently mentioned Rust building similar llvm based integration with GPU. But compared with Python, Julia, Matlab, R, Rust, C, C++ - Mojo feel relief for working with numerics.
- Archit3ch 1mo ago> But compared with Python, Julia, Matlab, R, Rust, C, C++ - Mojo feel relief for working with numerics. Out of those, Julia is the only one that combines Multiple Dispatch and native code, both important for numerics.
- jondea 1mo agoI don't agree at all with your last paragraph. MATLAB and Julia are lovely for numerics, maths is terse and looks like maths! Mojo is hobbled by choosing Python style syntax, which does not lend itself well to maths. WRT the type system, I agree MATLAB is a mess but Julia's multiple dispatch feels more like maths than any other language I've tried.
- ainch 1mo agoWhat problems do you run into for maths with Python? For linear algebra and ML with Jax/Numpy I find it quite readable.
- jondea 1mo agoI think problems is too strong a word, it's just how the syntax looks. And of course it's far better than say C++. But specifically, the lack of native vectors/matrices and very few infix operators (e.g dot product, and matrix multiplication with @ is clunky). Explicit but generic broadcasting using `.` also helps. The way that types interact with methods _feels_ like maths. I.e. you have a method made up of mathematical operators, if you swap out an input, it typically does the natural and correct thing.
- dlahoda 1mo agoI coded Matlab in uni, never got it. And had to look Julia code. I have to learn it to read. I am more SEng rather then Sci or Quant. And on compile time types. So for me Julia is foreign and forces me to look both Python and Julia.