bartblast

bartblast

Creator of Hologram

Hologram v0.11 is out! Two headline features this release. First, Elixir regexes now run in the browser. They were server-only until now, and handing patterns to JavaScript’s RegExp doesn’t hold up, so v0.11 ships a PCRE2 parser, translator and interpreter of Hologram’s own, and what comes back is what the BEAM would have given you. Second, client errors now read like server errors, same messages and same stacktraces, so __STACKTRACE__ finally holds real Elixir frames. The release also brings dynamic component and element tags, attribute and prop spread, umbrella project support, and a fix for a DOM identity bug that could knock focus out of an input mid-typing.

Thanks to everyone who reported issues and opened feature requests along the way.

Thanks to our sponsors for making sustained development possible: Curiosum (Main Sponsor), Erlang Ecosystem Foundation (Milestone Sponsor), and our GitHub sponsors - Innovation Partner: @sheharyarn, Framework Visionaries: @absowoot, Oban, @robertu, Moss Piglet, and all other GitHub sponsors.

Full details in the blog post:

Showing Posts 1 to 2

lpil

lpil

Creator of Gleam

Wow, that’s impressive! Are you compiling them into JavaScript regexes? How does the performance compare to regexes written in regular JavaScript?

bartblast

bartblast OP

Creator of Hologram

Thanks Louis!

Where it’s safe, yes. Hologram parses the pattern into an AST, then checks whether every construct in it maps onto JS RegExp with the same semantics. When it does, the AST gets translated and compiled with new RegExp, so matching runs on the browser’s own engine. When it doesn’t, it falls back to a backtracking matcher of Hologram’s own. That’s \K, atomic groups, possessive quantifiers, conditionals, subroutines, backrefs to a group that might not have participated, and a few caseless Unicode corners where JS folds characters that PCRE2 doesn’t. Better to be slower there than to quietly match differently.

Compiled patterns sit in a registry in the client runtime, keyed by ref. They can’t travel, so what actually crosses the boundary is the source plus the options, recompiled on the other side and registered under the same ref. Keeps an opaque {:re_pattern, ...} term working after the trip.

The other nice thing about riding the browser’s engine is that there are no Unicode tables to ship. \p{Greek} resolves against the engine’s own data even on the interpreted path. Go the WASM way and you’re compiling a whole regex engine and hauling its tables along with it.

Most app patterns end up native, so it’s a JS regex plus a one-off parse. The interpreted tail is slower for sure, and I haven’t measured it properly yet, but it’s not the kind of thing people usually write.

— All posts loaded —

Where Next? Top

Trending in News & Updates Top

sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
bartblast
I’ll be using this thread to share Hologram patch release announcements. Minor releases will continue to get dedicated threads with blog ...
New
sorenone
This release unifies configuration for queues, repos, and services, swaps opaque timing integers for readable durations, and backports pe...
New
pcharbon
:heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::heart::hea...
New
nature
NatureWhistle v0.4.1 is out! :tada: This release is a pretty significant step forward for the project. When I first built NatureWhistle,...
New
webofbits
Aludel 0.7.0 is released :tada: Since 0.5.0, Aludel has grown into a much more complete LLM evaluation toolkit for Elixir and Phoenix app...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews