OhmJS
banner
ohmjs.org
OhmJS
@ohmjs.org
A user-friendly parsing toolkit for JavaScript and TypeScript ∙ https://ohmjs.org

Support Ohm development on GitHub Sponsors: https://github.com/sponsors/pdubroy
Reposted by OhmJS
📢 New #WasmAssembly podcast 🎙️ episode:
#WebAssembly from the Ground Up with @dubroy.com and @marianoguerra.org. Learn how they're teaching #Wasm by building a compiler in JavaScript and why writing Wasm by hand is crucial!

🍿 www.youtube.com/watch?v=dRdD...
🎧 wasmassembly.libsyn.com/webassembly-...
WebAssembly from the Ground Up with Patrick Dubroy and Mariano Guerra
YouTube video by Chrome for Developers
www.youtube.com
October 20, 2025 at 6:22 PM
Hey everyone, just FYI:

After investigating, we do *not* believe that ohm-js, or any other package under the @ ohmjs namespace, is affected by the Shai-Hulud worm or any of the recent npm supply chain attacks.
September 17, 2025 at 2:09 PM
Any Ohm fans who want to get a taste of low-level programming?

Get 25% off the only book in the world* that will teach you WebAssembly with Ohm!

(*So far.)
The summer holidays just started here in southern Germany.

So, it's time for a ☀️ SUMMER SALE ☀️ —

Use the code SUMMER25 for a 25% discount on the book until Sept 15: wasmgroundup.com
WebAssembly from the Ground Up
A book about WebAssembly — learn Wasm by building a simple compiler in JavaScript.
wasmgroundup.com
August 5, 2025 at 3:18 PM
First new release of Ohm in…eh *pulls at shirt collar* quite a while.

v17.2.1 is here…one small l'il feature and a teeny weeny fix: github.com/ohmjs/ohm/re...

Also pushed v2.0.1 of @ohm-js/cli.
Release Ohm v17.2.1 · ohmjs/ohm
Browser bundles: ohm.js • ohm.min.js New features: [456b540]: asIteration() is now support for iter nodes (returns the node itself) Fixes [59b17ec]: Expose Matcher’s grammar prop in TS types
github.com
July 28, 2025 at 2:50 PM
Reposted by OhmJS
Pretty pleased with the ergonomics of the Wasm (macro-)assembler in @ohmjs.org.

It's built on the low-level assembler lib we created for @wasmgroundup.com, but has some nice higher-level features, including labeled breaks. I'm particularly proud of the idea to put the block label at the end. 😊
July 25, 2025 at 8:00 AM
You know about the Ohm Discord, right?

Great place to ask questions, get feedback on your grammars, and hang out with the some of the friendliest folks out there.

discord.gg/KwxY5gegRQ
Join the Ohm Land Discord Server!
Check out the Ohm Land community on Discord - hang out with 169 other members and enjoy free voice and text chat.
discord.gg
July 17, 2025 at 2:09 PM
Thanks to a generous contribution from Shopify, we've secured enough funding to make further progress towards production-ready Ohm+WebAssembly support! github.com/ohmjs/ohm/i...

Thank you Shopify for funding open source. ❤️
Production-ready WebAssembly support · Issue #511 · ohmjs/ohm
#503 covers the initial investigation into WebAssembly. Due to funding limitations, that work was scoped to a 6-week effort. This issue is about the next phase: productionizing the current prototyp...
github.com
July 14, 2025 at 5:42 PM
A few different Ink & Switch projects have used Ohm…here's the latest one.

From @alexwarth.bsky.social (co-creator of Ohm) and @geoffreylitt.com (who made Wildcard, one of our all-time favourite Ohm-powered projects)
What if a spreadsheet cell could hold multiple values at the same time?

That's the idea behind Ambsheets, a project I've been working on w/ @geoffreylitt.com at @inkandswitch.com. It's a new spreadsheet that makes it easier for you to explore many possibilities simultaneously.

1/2
July 10, 2025 at 6:12 PM
Ever wanted to use Ohm from another language? Go, Python, Rust?

See the brand new, experimental support for compiling Ohm grammars to Wasm: github.com/ohmjs/ohm/d...

It wasn't the main goal, but it also appears to be a perf win — parsing is about 10x faster on real-world grammars (e.g. ES5).
June 23, 2025 at 2:26 PM
One of the biggest production users of Ohm that we know of is Shopify.

They used Ohm in the Liquid HTML parser that powers their prettier plugin & VS Code language server — as well as the Shopify Admin's CodeMirror-based editor.

www.npmjs.com/package/@sh...
npm: @shopify/liquid-html-parser
Liquid HTML parser by Shopify. Latest version: 2.8.2, last published: 2 months ago. Start using @shopify/liquid-html-parser in your project by running `npm i @shopify/liquid-html-parser`. There are 8 other projects in the npm registry using @shopify/liquid-html-parser.
www.npmjs.com
June 16, 2025 at 3:38 PM
Reposted by OhmJS
Working on a cheat sheet for @ohmjs.org grammars. wdyt?
May 17, 2025 at 2:16 PM
Making progress on the Wasm implementation — and encountering some interesting challenges!
Ok ok this may not make a lot of sense but I am *extremely* happy to have gotten this code working!! So I feel compelled to share.

(And yes, I wrote my own macro-assembler for #wasm in JavaScript. That's how much fun I'm having, and yes I mean that sincerely.)

1/x
May 16, 2025 at 2:58 PM
Reposted by OhmJS
Made some good progress on this! Follow along on the issue if you're interested: github.com/ohmjs/ohm/is...
May 2, 2025 at 3:22 PM
Hey folks, we had another Cloudflare ⇆ GitHub SSL issue which meant the web site was down for about an hour.

Thanks for @onlineornot.com we found out pretty quickly, and it should be fixed now!

And we'll be getting rid of Cloudflare so hopefully we'll be rid of this problem for good 🤞
April 29, 2025 at 7:08 PM
Reposted by OhmJS
Wondering if the book is *practical*?

I'm currently using the helper library extracted from the book for a new @ohmjs.org feature which will allow you to compile Ohm grammars to Wasm.

This will make it possible to use Ohm grammars from Go, Python, etc.

Details here 👉 github.com/ohmjs/ohm/is...
btw what I'm using here is the "assembler library" that we construct bit by bit in @wasmgroundup.com. It's also available as a standalone NPM package: www.npmjs.com/package/@was...

There's not yet much documentation (outside of the book), but we'll work on that soon!
April 29, 2025 at 7:01 PM
Excited to kick off some new Ohm work next week — adding the ability to compile an Ohm grammar to WebAssembly. See
github.com/ohmjs/ohm/i... if you're interested, and feel free to comment if you have opinions!
WebAssembly support · Issue #503 · ohmjs/ohm
Over the years we've had a few requests for a way to use Ohm from other languages — e.g. #348 mentions Dart, Rust, and Swift. Go and Python have also come up in private discussions. This propos...
github.com
April 25, 2025 at 3:00 PM
Very cool to learn that Ohm was used to create Gambu-Script, which is used to teach programming to over 90k students in Austria!

It's part of SchuBu, a free-to-use digital schoolbook: www.schubu.org/p768/progra...
March 12, 2025 at 9:55 AM
If you dig Ohm and are interested in WebAssembly, check out this book by @dubroy.com (co-creator of Ohm).

You'll learn Wasm (the instruction set and module format) by building a compiler for a small programming language.

It's also a great way to learn Ohm!
Excited to announce the official launch of our online book, WebAssembly from the Ground Up! 🎉

It's the book we wish we'd had 3 years ago.

No messing with tools and frameworks. It's a hands-on guide to the core of Wasm: the instruction set and module format.

Link below. 👇
March 10, 2025 at 1:29 PM
Anyone catch Ohm in the current edition of JavaScript Weekly? javascriptweekly.com/issues/723
February 17, 2025 at 2:05 PM
Just been told that ohmjs.org is currently down. Sorry about the disruption!

We're working on a fix, but in the meantime, if you need to access the docs you can find them here: github.com/ohmjs/ohm/t...
ohm/doc at main · ohmjs/ohm
A library and language for building parsers, interpreters, compilers, etc. - ohmjs/ohm
github.com
January 29, 2025 at 4:28 PM
Reposted by OhmJS
Constraint-Based Spreadsheet, 2014.

An attempt to make spreadsheets more powerful and user-friendly by replacing one-way formulas with multi-way constraints.

Check out the source code (@ohmjs.org inside!) and play with the live demo at github.com/harc/constra...
January 21, 2025 at 3:49 AM
Reposted by OhmJS
If you're a fan of @worrydream.com's Inventing on Principle, check out Seymour, a live programming environment I made with Saketh Kasibatla

harc.github.io/seymour-live...
December 27, 2024 at 6:59 PM
Extensible parsers…great idea! 😄
x.com/duckdb/stat...
December 9, 2024 at 2:05 PM
Reposted by OhmJS
📝 New blog post

One way to do applied research
dubroy.com/blog/one-way...
November 7, 2024 at 2:04 PM