Skip to content

Melody – A readable language that compiles to regular expressions

5 pointsyoav_lavi3 comments
On HN

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

Comments

I like innovation, and I'm all for making programming easier.

That said, from the example documentation.. <start>;

option of "v";

capture major { some of <digit>; }

".";

capture minor { some of <digit>; }

".";

capture patch { some of <digit>; }

<end>;

// v1.0.0

Show that to someone who isn't familiar with regex, and they'll have no idea what it means.

Someone who is familiar with regex, will likely prefer the regex format.

I can see the value of this but I worry that the implementation of support for it has rushed ahead of what "it" is. To be successful I think a formal definition of how say 90% of regex expressions would be represented should be created and reviewed.

None of these links work when you submit them in question text.

It's better to just submit links as links.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.