HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
yoav-lavi
melody
Rust2022–2026
yoav-lavi / melody

melody

Melody is a language that compiles to regular expressions and aims to be more readable and maintainable

5Distinct people
8Mentions
1Explicit recommenders
4.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Melody is a language that compiles to regular expressions and aims to be more readable and maintainable

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

I recommend checking Melody out if you're into readable regex alternatives: https://github.com/yoav-lavi/melody

fathyb used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year8 dated mentions

Observed mentions: 2022-02-16 11:10:12 UTC to 2026-10-18 20:45:47 UTC.

02462022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 6 mentions; 2 submissions, 4 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC624
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC110
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC000
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

What Hacker News says

8 sources
I've collected the different projects along with a nontrivial syntax example here: https://github.com/SonOfLilit/kleenexp#similar-works - Regular Expressions - very popular, occasionally reads like line noise, backslash for escape (?:What is your (?:name|quest|favourite colour)\?\s?){1,3} - https://github.com/SonOfLilit/kleenexp - Terse, readable, almost never needs escaping. Python compiler, almost ready VSCode extension, online playground. [1-3 'What is your ' ['name' | 'quest' | 'favourite colour'] '?' [0-1 #space]] - https://github.com/yoav-lavi/melody - More verbose, supports macros, backslash escapes only for quotes. Rust compiler, babel plugin. Improves with time, getting quite impressive. 1 to 3 of match { "What is your "; either { "name"; "quest"; "favorite color"; } "?"; 0 to 1 of "
Read the rest
"; } - https://rulex-rs.github.io/ - Very similar to legacy regex syntax, supports macros and number ranges, supports unicode, _amazing_ error messages help convert legacy to new syntax, backslash escapes only for quotes. Rust compiler, as of today no built in way to use outside rust (but they seem to be planning it). ('What is your ' ('name'|'quest'|'favorite colour')'?' [s]){1,3} - https://www.oilshell.org/release/latest/doc/eggex.html Part of a new Unix shell's syntax. Big on composition (macros in kleenexp). Uses backslash for character classes. Production-ready within the shell, not supported elsewhere yet. / 'What is your ' ('name' | 'quest' | 'favorite color') '?' ' '? / - https://docs.raku.org/language/regexes Similar to Eggex, part of Raku (the artist formerly known as Perl 6) - http://verbalexpressions.github.io/ - Embedded DSL, supports 14(!) languages (to some extent? I didn't verify), but don't seem to have syntax for `(a|b)` and `(?:...){3}` const tester = VerEx() .then('What is your ') .either( // this doesn't seem to be implemented yet (?), so I'm proposing a possible syntax VerEx().then('name'), VerEx().then('quest'), VerEx().then('favorite color'), ) .then('?') .maybe(' ') .multiple(3); // not sure this is the correct syntax or how to use it in more complex scenarios, hard to tell from tests and discussions in Issues - There are many more eDSLs, but I will not list them as they are less relevant in my opinion
In Rulex – A new, portable, regular expression language
Melody was posted here (not by myself), but the project was still in very early stages, and so I wanted to post an update that Melody now has: - A Babel plugin - https://www.npmjs.com/package/babel-plugin-melody - NodeJS bindings via WASM - https://www.npmjs.com/package/melodyc - A playground - https://melody-playground.vercel.app/ - VSCode and JetBrains extensions - https://marketplace.visualstudio.com/items?itemName=yoavlavi... https://plugins.jetbrains.com/plugin/18693-melody - A CLI and REPL - A documentation book - https://yoav-lavi.github.io/melody/book/ The idea behind Melody is to represent regular expressions in a readable, maintainable format that plays nicely with larger projects, multiple people, diffs and so forth, while adding some QOL features. See the repository here: https://github.com/yoav-lavi/melody
In Babel Plugin Melody
yoav_lavi·Apr 4, 2022Submission

Melody – A readable language that compiles to regular expressions

Melody was posted here (not by myself), but the project was still in very early stages, and so I wanted to post an update that Melody now has: - A Babel plugin - https://www.npmjs.com/package/babel-plugin-melody - NodeJS bindings via WASM - https://www.npmjs.com/package/melodyc - A playground - https://melody-playground.vercel.app/ - VSCode and JetBrains extensions - https://marketplace.visualstudio.com/items?itemName=yoavlavi.melody https://plugins.jetbrains.com/plugin/18693-melody - A CLI and REPL - A documentation book - https://yoav-lavi.github.io/melody/book/ The idea behind Melody is to represent regular expressions in a readable, maintainable format that plays nicely with larger projects, multiple people, diffs and so forth, while adding some QOL features. See the repository here: https://github.com/yoav-lavi/melody
5 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.