frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: RunMat – a V8 inspired Rust runtime for the landlocked Matlab language

https://runmat.org/blog/introducing-runmat
4•nallana•2h ago
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 but it only supports a subset of the grammar and semantics, and its performance is far behind modern expectations. It’s more of a compatibility bridge than a true runtime alternative.

I decided to implement a MATLAB language compiler and executor from scratch, grammar and semantics complete, in Rust with a modern architecture inspired by V8. Like V8, RunMat starts in a lightweight interpreter, then profiles and JITs hot paths using Cranelift. Snapshotting makes cold start essentially vanish (5ms vs 2–10s in MATLAB), and tensor operations run natively across CPUs or GPUs (CUDA, Metal, Vulkan) without an extra license.

Performance (vs Octave, Apple M2 Max, 32GB): * Startup: 0.9147s → 0.005s (180× faster) * Matrix ops: 0.8220s → 0.005s (164×) * Math funcs: 0.8677s → 0.0053s (160×) * Control flow: 0.8757s → 0.0057s (154×)

Unlike Octave, RunMat implements the full MATLAB grammar: arrays/indexing (end/colon/masks/N-D), multiple returns, varargin/varargout, classdef OOP, events/handles, metaclass, and standardized exceptions. The core is slim at 5MB static binaries for Linux, macOS, and Windows (or embedded devices and containers), with language extensibility coming from packages that can be written in MATLAB or in Rust.

It’s 100% open source: The repo is about 3M characters of code, has over 1,000 tests covering the edges of the semantic surface, and was bootstrapped in three weeks. A package manager is next, along with a final draft of the builtin standard library.

TLDR: Same language semantics, but rebuilt with modern methods, the way Chrome’s V8 redefined JavaScript engines.

Comments

godbolev•1h ago
Woahh this is really cool!

If my company makes hardware, what's something I can do with RunMat which I couldn't easily do with Octave? (Assuming I don't want to use MATLAB)

nallana•52m ago
Versus Octave:

- 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.

billthefighter•1h ago
Dude what the fuck did you reimplement Matlab casually as a side project
nallana•48m ago
a solid core, not the whole Matlab (they confound the language, compiler / runtime, an IDE, and a bunch of other things in the name / product that is MATLAB).

This is a solid compiler + minimal runtime, with an architecture designed to scale.

Why Can't the U.S. Build 5-Minute E.V. Chargers?

https://www.nytimes.com/2025/08/19/climate/us-electric-vehicle-chargers-china.html
1•bookofjoe•18s ago•0 comments

A Small Town in Alabama Became a Textile Haven

https://www.cntraveler.com/story/how-florence-alabama-became-a-textile-haven
1•speckx•1m ago•0 comments

Peer reviewers more likely to approve articles that cite their own work

https://www.nature.com/articles/d41586-025-02547-1
4•rntn•2m ago•0 comments

Alano Fishing Game – A Relaxing Adventure on the Water

1•thediversemark•2m ago•0 comments

Singles Are Sick of Dating Apps. But There Are 2.5M on Raya's Waitlist

https://www.wsj.com/style/raya-waitlist-founder-daniel-gendelman-3c64be91
1•uptown•3m ago•0 comments

Solar panels in space 'could provide 80% of Europe's renewable energy by 2050'

https://www.theguardian.com/environment/2025/aug/21/solar-panels-in-space-could-provide-80-of-europes-renewable-energy-by-2050
1•jjp•3m ago•0 comments

Ukrainian held in Italy over blast mystery of Nord Stream gas pipelines

https://www.bbc.com/news/articles/crkz1jl5j06o
1•colinprince•3m ago•0 comments

Apple Fitness Chief Accused of Toxic Workplace Culture and Harassment

https://www.nytimes.com/2025/08/21/technology/apple-fitness-jay-blahnik.html
1•donohoe•4m ago•0 comments

Ask HN: How do you let others try your LLM agents

2•fsilavong•6m ago•0 comments

Discrete optimization for on-call scheduling (2021)

https://www.rainforestqa.com/blog/discrete-optimization-for-on-call-scheduling
2•todsacerdoti•6m ago•0 comments

There might be a 'Planet Y' hiding in the outer solar system

https://www.newscientist.com/article/2493480-there-might-be-a-planet-y-hiding-in-the-outer-solar-system/
1•kPwn•6m ago•0 comments

Why Wall Street thinks the metaverse will be worth trillions (2022)

https://fortune.com/longform/wall-street-metaverse-web3-investors-roblox-meta-platforms-microsoft/
4•pera•9m ago•0 comments

Measuring the Mean Plane of the Distant Kuiper Belt

https://arxiv.org/abs/2508.14156
3•bikenaga•9m ago•0 comments

Bank forced to rehire workers after lying about chatbot productivity, union says

https://arstechnica.com/tech-policy/2025/08/bank-forced-to-rehire-workers-after-lying-about-chatbot-productivity-union-says/
7•ndsipa_pomu•13m ago•0 comments

Paul Graham Hacker News Archive

https://pghn.rhett.info/
1•basketbla•15m ago•1 comments

EPC23102: V, 35 A EPower Stage IC

https://epc-co.com/epc/products/gan-fets-and-ics/epc23102
1•addaon•16m ago•1 comments

Adding my home electricity uptime to status.href.cat

https://aggressivelyparaphrasing.me/2025/08/21/adding-my-home-electricity-uptime-to-status-href-cat/
4•todsacerdoti•18m ago•1 comments

Show HN: I Help Startups Go from Idea to Revenue in 30-60 Days

https://www.syket.io/
1•syketdas•18m ago•0 comments

"We are currently clean on OPSEC": The Signalgate Saga (DEFCON 33) [video]

https://www.youtube.com/watch?v=KFYyfrTIPQY
2•pona-a•18m ago•0 comments

Qoder: Agentic Coding Platform for Real Software

https://qoder.com/blog/qoder-introduction
2•meetpateltech•21m ago•0 comments

Bank backtracks on AI job cuts, apologises for 'error' as call volumes rise

https://www.abc.net.au/news/2025-08-21/cba-backtracks-on-ai-job-cuts-as-chatbot-lifts-call-volumes/105679492
4•speckx•23m ago•0 comments

What happened before the Big Bang? Computational method may provide answers

https://phys.org/news/2025-08-big-method.html
2•bikenaga•23m ago•1 comments

A summary of recent AI research (2016)

https://blog.plan99.net/the-science-of-westworld-ec624585e47
2•mike_hearn•24m ago•0 comments

Continental drying, shrinking freshwater, and land contributions to sea level

https://www.science.org/doi/10.1126/sciadv.adx0298
1•PaulHoule•24m ago•1 comments

Typosquatting GitHub Container Registry `Ghrc.io`

1•bschaatsbergen•25m ago•0 comments

Forced every engineer to take sales calls.They rewrote our platform in 2 weeks

https://old.reddit.com/r/Entrepreneur/comments/1mw5yfg/forced_every_engineer_to_take_sales_calls_they/
14•bilsbie•26m ago•2 comments

AI is creeping into the Linux kernel – and official policy is needed ASAP

https://www.zdnet.com/article/ai-is-creeping-into-the-linux-kernel-and-official-policy-is-needed-asap/
2•CrankyBear•26m ago•0 comments

Clopen Data

https://bastian.rieck.me/blog/2025/clopen_data/
1•Pseudomanifold•27m ago•0 comments

Highest-Paying Jobs in America

https://stacker.com/stories/careers/50-highest-paying-jobs-america
2•realityfactchex•27m ago•0 comments

Battery prices are falling, so why are electric cars still so expensive?

https://www.nature.com/articles/d41586-025-02619-2
7•littlexsparkee•28m ago•2 comments