Advertisement · 728 × 90

Posts by OhmJS

Bar chart comparing performance improvements across three technologies: JSON shows 15.6ms (v17) reduced to 0.35ms (v18), a 44.6x speed increase; LiquidHTML shows 2,250ms (JS) reduced to 36ms (Wasm), a 62.8x speed increase; and ES5 shows 3,308ms (JS) reduced to 55ms (Wasm), a 60.3x speed increase. Blue bars represent 'Before' measurements and green bars represent 'After' measurements

Bar chart comparing performance improvements across three technologies: JSON shows 15.6ms (v17) reduced to 0.35ms (v18), a 44.6x speed increase; LiquidHTML shows 2,250ms (JS) reduced to 36ms (Wasm), a 62.8x speed increase; and ES5 shows 3,308ms (JS) reduced to 55ms (Wasm), a 60.3x speed increase. Blue bars represent 'Before' measurements and green bars represent 'After' measurements

New post on the @ohmjs.org blog —

Inside Ohm's PEG-to-Wasm compiler
→ ohmjs.org/blog/2026/03...

v18 is now more than 50x faster for real-world grammars while using about 10% of the memory 🔥

…this post goes into the details of how it's built.

3 weeks ago 8 4 0 0

One more time — I'm looking for new consulting clients.

Some ways I can help:

∙ Fractional tech leadership (tackling "leadership debt" in small eng orgs)
∙ Full-stack, 0 to 1 projects
∙ Language design & impl (eg with @ohmjs.org)
∙ JavaScript/TypeScript perf

(🔁 appreciated)

1 month ago 11 16 0 0
Line chart showing weekly downloads for the npm package "ohm-js" from February 28, 2025 to February 26, 2026. The graph displays relatively flat growth at around 200,000 weekly downloads for most of the year, then shows dramatic exponential growth starting in late January 2026, skyrocketing from approximately 200,000 to 1.8 million weekly downloads by late February 2026. The y-axis shows weekly downloads ranging from 0 to 1.8M, and the x-axis shows dates with major tick marks every few months

Line chart showing weekly downloads for the npm package "ohm-js" from February 28, 2025 to February 26, 2026. The graph displays relatively flat growth at around 200,000 weekly downloads for most of the year, then shows dramatic exponential growth starting in late January 2026, skyrocketing from approximately 200,000 to 1.8 million weekly downloads by late February 2026. The y-axis shows weekly downloads ranging from 0 to 1.8M, and the x-axis shows dates with major tick marks every few months

Whoah. Today we discovered that ohm-js is now a "high-impact" NPM package (>1M downloads/week).

The mystery was: why?

Turns out it's now a transitive dependency of the Vercel CLI, via pip-requirements-js, an Ohm-based package for parsing requirements.txt files: github.com/Twixes/pip-r...

1 month ago 4 0 0 1

Take a look if you're interested in using Ohm to compile to #Wasm.

(This is the same library we use in the new Ohm v18 beta that compiles grammars to Wasm.)

1 month ago 3 1 0 0
Preview
Ohm v18 Beta | Ohm Ohm v18 compiles grammars to WebAssembly, making parsing ~20x faster and using a fraction of the memory.

A couple big announcements for y'all —

1️⃣ We have a blog now!
2️⃣ We just published the beta version of Ohm v18: ohmjs.org/blog/ohm-v18

Give it a spin and tell us what you think!

1 month ago 1 1 0 1
Preview
Ohm v18 Beta | Ohm Ohm v18 compiles grammars to WebAssembly, making parsing ~20x faster and using a fraction of the memory.

A couple big announcements for y'all —

1️⃣ We have a blog now!
2️⃣ We just published the beta version of Ohm v18: ohmjs.org/blog/ohm-v18

Give it a spin and tell us what you think!

1 month ago 1 1 0 1
Preview
Ohm.js (@ohmjs@hachyderm.io) 2 Posts, 0 Following, 1 Follower · A user-friendly parsing toolkit for JavaScript and TypeScript ∙ ohmjs.org

Btw, if you have a fedi account, you can also (finally) follow Ohm news over there: hachyderm.io/@ohmjs

2 months ago 0 0 0 0
Advertisement
Preview
GitHub - humanwhocodes/crosspost: A JavaScript utility for posting across multiple social networks at once A JavaScript utility for posting across multiple social networks at once - humanwhocodes/crosspost

By the way, our posts are now powered by @humanwhocodes.com's fantastic crosspost package: https://github.com/human

2 months ago 0 1 0 0

Today we published v17.4.0, with one new feature (`recoverSourceOrder` in /extras) and two small fixes: https://github.com/ohmjs

2 months ago 0 0 0 0
Ohm: A Parsing Toolkit for JavaScript and TypeScript — It’s been a few years since we covered this project and it’s come along a lot since. It’s a library for building PEG-based parsers you can use in interpreters, compilers, analysis tools, etc. and you can even play with its grammar online.

Warth, Dubroy, et al.

Ohm: A Parsing Toolkit for JavaScript and TypeScript — It’s been a few years since we covered this project and it’s come along a lot since. It’s a library for building PEG-based parsers you can use in interpreters, compilers, analysis tools, etc. and you can even play with its grammar online. Warth, Dubroy, et al.

Oh hey, we're in JavaScript Weekly again 😊

javascriptweekly.com/issues/768

3 months ago 1 0 0 0
Release Ohm v17.3.0 · ohmjs/ohm Browser bundles: ohm.js • ohm.min.js New features [d957ac7] typings: #494 - Typescript MatchResult object incomplete [e1b8225] typings: add FailedMatchResult / SucceededMatchResult [891b6d8] feat:...

Published v17.3.0 yesterday, with a couple small improvements to the typings and a bug fix related to matching letters outside the BMP (basic multilingual plane): github.com/ohmjs/ohm/re...

Last release of 2025 (hopefully 🤞)…watch for a new major release early next year!

3 months ago 0 0 0 0

Just added an example to the Ohm repo of implementing something like Zed's SumTree.

(aka "monoid-cached trees" if you want to sound clever)

Full example here: github.com/ohmjs/ohm/bl...

4 months ago 3 1 0 0

What an amazing essay for everyone with the intention to design a programming language. Also mentioned: @ohmjs.org

5 months ago 3 1 1 0

TIL about the CSS Custom Highlight API: developer.mozilla.org/en-US/docs/W...

5 months ago 0 0 0 0
WebAssembly from the Ground Up with Patrick Dubroy and Mariano Guerra
WebAssembly from the Ground Up with Patrick Dubroy and Mariano Guerra YouTube video by Chrome for Developers

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

5 months ago 13 4 1 1

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.

6 months ago 4 2 0 0
Advertisement

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

8 months ago 1 0 0 0
Preview
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

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.

8 months ago 1 0 0 0
Preview
Ambsheets: Spreadsheets for exploring scenarios Ambsheets is a research project about new kinds of spreadsheets for exploring possibility spaces and making better decisions.

For more info, see: www.inkandswitch.com/ambsheets/no...

8 months ago 4 1 0 0
A code screenshot showing a TypeScript/JavaScript function called ⁠wrapTerminalLike that generates WebAssembly (WASM) code. The code contains:  • A function definition that takes a ⁠thunk parameter  • Assembly code generation using an ⁠asm object with methods like ⁠block(), ⁠localSet(), ⁠break(), etc.  • A ⁠break statement that references a label called ⁠'_success' (highlighted with a pink arrow and annotation "This...")  • A label definition for ⁠'_success' at the bottom (highlighted with a red arrow and annotation "...goes here")  • Additional assembly operations like ⁠newTerminalNodeWithSavedPos(), ⁠updateLocalFailurePos(), and ⁠setRet()  The pink annotations with arrows illustrate the control flow relationship between the break statement and its corresponding label, showing how the break jumps to the ⁠'_success' label.

A code screenshot showing a TypeScript/JavaScript function called ⁠wrapTerminalLike that generates WebAssembly (WASM) code. The code contains: • A function definition that takes a ⁠thunk parameter • Assembly code generation using an ⁠asm object with methods like ⁠block(), ⁠localSet(), ⁠break(), etc. • A ⁠break statement that references a label called ⁠'_success' (highlighted with a pink arrow and annotation "This...") • A label definition for ⁠'_success' at the bottom (highlighted with a red arrow and annotation "...goes here") • Additional assembly operations like ⁠newTerminalNodeWithSavedPos(), ⁠updateLocalFailurePos(), and ⁠setRet() The pink annotations with arrows illustrate the control flow relationship between the break statement and its corresponding label, showing how the break jumps to the ⁠'_success' label.

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

8 months ago 8 2 1 0
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.

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

8 months ago 0 0 0 0
Project Overview

I'd also like to acknowledge the support from Adam Bouhenguel and Project Substrate (projectsubstrate.org), which provided the funding to build the initial MVP. 🙏

Without their support none of this would have been possible!

9 months ago 0 0 0 0
Sponsor @pdubroy on GitHub Sponsors I'm the lead developer of Ohm (ohmjs.org), a user-friendly parsing toolkit for JavaScript and TypeScript. I also created the Ohm Editor, and the interactive visualization for understanding and ...

We're still looking for more sponsors! If you or your company can help fund this effort: github.com/sponsors/pd...

Since 2017, my work on Ohm has been unpaid. Your sponsorship helps the project be sustainable, ensuring that I can maintain and improve Ohm for many years to come!

9 months ago 0 1 1 0
Advertisement
Preview
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...

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

9 months ago 5 2 1 0

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)

9 months ago 8 3 1 0

Outside of this specific funding need, if you get value from Ohm you should consider a recurring sponsorship: github.com/sponsors/pdu...

This keeps the project sustainable and ensures that I can continue to spend time maintaining and improving Ohm for everyone!

9 months ago 0 1 0 0

We are seeking funding to make it possible to ship a production-ready version. (It's an estimated 8–10 more weeks of effort.)

If you or your company would benefit from the portability and performance improvements and could potentially help fund this work, please get in touch with @dubroy.com!

9 months ago 0 0 1 0
A couple months ago, I started prototyping a new feature: the ability to compile an Ohm grammar to WebAssembly, so that it can be used from languages other than JS. You can find more background (use cases and implementation details) in #503.  The MVP is complete, and this feature is now available for early testing (with some limitations). We're very interested to get feedback and hear what uses cases people have for this.  Although it wasn't the main motivation for this work, early benchmarks are showing ~10x improvement in parse times. Take this with a grain of salt — since the implementation isn't yet complete, it's hard to know what the final performance will look like. But it looks like this will be a significant performance win for real-world grammars!

A couple months ago, I started prototyping a new feature: the ability to compile an Ohm grammar to WebAssembly, so that it can be used from languages other than JS. You can find more background (use cases and implementation details) in #503. The MVP is complete, and this feature is now available for early testing (with some limitations). We're very interested to get feedback and hear what uses cases people have for this. Although it wasn't the main motivation for this work, early benchmarks are showing ~10x improvement in parse times. Take this with a grain of salt — since the implementation isn't yet complete, it's hard to know what the final performance will look like. But it looks like this will be a significant performance win for real-world grammars!

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

9 months ago 4 2 1 1
Preview
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.

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

10 months ago 9 4 0 0
Post image

Working on a cheat sheet for @ohmjs.org grammars. wdyt?

10 months ago 12 1 2 0