nallana
Curious what other’s views on DSLs are post-LLMs too
Cheers for the comment!
But okay -- as I mentioned, you're entitled to your views!
Octave is not particularly fast.
RunMat is very fast (orders of magnitude -- see benchmarks).
How do I see the .c files / trace how `ode45` will execute on my machine? Can I see the JIT's source code?
--
Entitled to your view, but clearly difference of opinion here. From perspective of open / closed source -- maybe for you it qualifies as open source, but I can't follow the logic chain, so to me it's not open source.
Cases where a JIT running would conflict with requirements notwithstanding (e.g. HIL with strict requirements and whatnot)...
Will have a really solid rust inspired package manager soon, and a single #macro to expose a rust function in the RunMat script's namespace (= easy to bring any aspects of the rust ecosystem to RunMat).
Our goal is to make a runtime that lets people stay at the math layer as much as possible, and run the math as fast as possible.
Author of RunMat (this project) here --
> The first thing they teach about performant Matlab code is that simple for-loops will tank performance.
Yes! Since in RunMat we're building a computation graph and fusing operations into GPU kernels, we built the foundations to extend this to loop fusion.
That should allow RunMat to take loops as written, and unwrap the matrix math in the computation graph into singular GPU programs -- effectively letting loop written math run super fast too.
Will share more on this soon as we finish loop fusion, but see `docs/fusion/INTERNAL_NOTE_FLOOPS_VM_OPS.md` in the repo if curious (we're also creating VM ops for math idioms where they're advantageous).
> Would love to see something with the convenient math syntax of Matlab, but with broader ease of use of something like JS.
What does "convenient math syntax of Matlab, but with broader ease of use of something like JS" look like to you? What do you wish you could do with Matlab but can't / it doesn't do well with?
The goal was to keep the MATLAB frontend capture syntax, but run it fast.
When we dug into why people were still using Octave, it was because it let them focus on their math, and was easier for them to read - was especially important for people that aren’t programmers; eg scientists and engineers.
I suppose this is also why we write in higher level languages than assembly.
The goal of this project is now: let’s make the fastest runtime in the world to run math.
Turned out, the MATLAB syntax offers a large amount of compiler time hinting in (it is meant for math intent capture after all).
We’ve found as we built this that if we take a domain specific approach (eg we’re going to make every optimization for what’s best for people wanting to focus on the math part), we can outperform general purpose languages like Python by a large mile on the math part.
For example, internals like keeping tensor shapes + broadcasting intent within the AST, and having the computation graph available for profitable GPU/CPU threshold detection isn’t something that makes practical sense to build into a general purpose runtime like Python, but —
It lets RunMat speed up elementwise math orders of magnitude (eg 1B points going through 5-6 element wise ops like sin/cos/+/- etc are 80x faster on my MBP vs Python/PyTorch).
So Tl;dr — started as for Octave users. Goal is to build the fastest runtime for math for those that are looking to use computers to do math.
Obligatory disclosure because we’re engineers: you can still get faster by writing your own CUDA / GPU code. We’re betting 99% of the people that are trying to run math using computers don’t want to do that (ML community notwithstanding).
Show HN: RunMat – runtime with auto CPU/GPU routing for dense math
https://github.com/runmat-org/runmat
Hi, I’m Nabeel. In August I released RunMat as an open-source runtime for MATLAB code that was already much faster than GNU Octave on the workloads I tried. https://news.ycombinator.com/item?id=44972919Since then, I’ve taken it further with RunMat Accelerate: the runtime now automatically fuses operations and routes work between CPU and GPU. You write MATLAB-style code, and RunMat runs your...
Choosing Rust for LLM-generated code
This is a solid compiler + minimal runtime, with an architecture designed to scale.
- Lots of language semantics are unsupported in Octave (like Classes), and it’s purely a slow line by line interpreter so it’s very slow.
- Given the design / Cranelift IR translation here, RunMat can run natively on any compile target for which Cranelift [currently x86-64, aarch64 (ARM64), s390x (IBM Z), and riscv64], and targeting additional ISAs is easy. The net of this: you can write controls / logic in Matlab code and run it natively on device.
- GPU acceleration; the foundations are in place so RunMat can natively accelerate Tensor / Matrix math on GPUs, irrespective of device (eg CUDA / Metal / Vulcan / etc). Net of this is that you can do much bigger math calculations even faster (and without having to worry about moving things on/off GPU memory; there’s a configurable (and substitutable) planner built in that does scatter / gather intelligently for you). The AST is extensively typed, and we can support things like reverse-grade autograd by default -> your math runs even faster than would natively in Octave or even Matlab (I believe Matlab has a separate toolbox where you can do some of this, but it’s not natively how their matrix math works / they try and upsell for that).
- Once the package manager is complete, you can extend it. Octave doesn’t really have a package system per se.
Show HN: RunMat – a V8 inspired Rust runtime for the landlocked Matlab language
https://runmat.org/blog/introducing-runmat
Why build this? MATLAB wasn’t chosen by engineers; it was inherited from classrooms. That unfair advantage let MathWorks sell a decades-old runtime with heavy startup, sluggish hot loops, and paywalled toolboxes. It milks about $500M a year out of the engineering ecosystem for what amounts to an outdated compiler and runtime stack.GNU Octave has been the main open-source way to run MATLAB code...
Would love to share something that has been over a year in the making.
We were originally building an environment to conduct engineering / scientific analysis in the cloud (lambda compute w/ visual outputs for figures and what not).
Design intent was to enable mechanical / electrical engineering teams with basic programming skills (2-3 courses) to harness SW better. I came from a SW background before working in HWE at Apple for a number of years, and saw just how many things people were doing that could be automated if non-SWEs just knew how to set up a CRON or trigger based job (or even install Python!).
We experimented with adding Codex to the product, and the result has turned out to be pretty remarkable.
Since we launched on LinkedIn 2w ago, we’ve been adding new users like crazy.
People are using the product like a graphing calculator on steroids. Like if Matlab meets the team collaborative aspect of Figma. Others are ditching their TI-84s and Excel spreadsheets which they were using for multi-step math to Dystr instead.
Would absolutely love feedback! Please do forward either here, or emailing us (team@ root domain).
Also! Desktop only for now; will release mobile compatibility when development resources allow!
Show HN: Using generative AI for real world engineering analysis
Show HN: A new way to write and publish research
Over the last two years, we’ve seen just how quickly science can move when it’s conducted out in the open, and the focus is on content rather than the publishing process.We’ve built a new way for researchers and scientists to communicate and share their findings with the world - rethought from first principles, with a lot more coming soon.Free to use, and available now for anyone with a...