NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
RE#: how we built the fastest regex engine in F# (iev.ee)
noelwelsh 11 minutes ago [-]
I love regular expression derivatives. One neat thing about regular expression derivatives is they are continuation-passing style for regular expressions. The derivative is "what to do next" after seeing a character, which is the continuation of the re. It's a nice conceptual connection if you're into programming language theory.

Low-key hate the lack of capitalization on the blog, which made me stumble over every sentence start. Great blog post a bit marred by unnecessary divergence from standard written English.

agnishom 18 minutes ago [-]
The author mentions that they found Mamouras et al. (POPL 2024), but not the associated implementation. While the Rust implementation is not public, a Haskell implementation can be found here: https://github.com/Agnishom/lregex
andriamanitra 13 minutes ago [-]
This is very interesting. I'm a bit skeptical about the benchmarks / performance claims because they seem almost too good to be true but even just the extended operators alone are a nice improvement over existing regex engines.

The post mentions they also have a native library implemented in Rust without dependencies but I couldn't find a link to it. Is that available somewhere? I would love to try it out in some of my projects but I don't use .NET so the NuGET package is of no use to me.

balakk 34 minutes ago [-]
Finally, an article about humans programming some computers. Thank you!
gbacon 31 minutes ago [-]
That’s beautiful work. Check out other examples in the interactive web app:

https://ieviev.github.io/resharp-webapp/

Back in the Usenet days, questions came up all the time about matching substrings that do not contain whatever. It’s technically possible without an explicit NOT operator because regular languages are closed under complement — along with union, intersection, Kleene star, etc. — but a bear to get right by hand for even simple cases.

Unbounded lookarounds without performance penalty at search time are an exciting feature too.

sourcegrift 2 hours ago [-]
I've had nothing but great experience with F#. If it wasn't associated with Microsoft, it'd be more popular than haskell
raincole 2 hours ago [-]
I think if it weren't a 'first class' member of .NET ecosystem[0], no one would know F#. After all Haskell and Ocaml already exist.

[0]: my very charitable take, as MS obviously cares C# much much more than F#.

46 minutes ago [-]
pjmlp 24 minutes ago [-]
Management has always behaved as if they repent having added F# to VS 2010, at least it hasn't yet suffered the same stagnation as VB, even C++/CLI was updated to C++20 (minus modules).

In any case, those of us that don't have issues with .NET, or Java (also cool to hate these days), get to play with F# and Scala, and feel no need to be amazed with Rust's type system inherited from ML languages.

It is yet another "Rust but with GC" that every couple of months pops up in some forums.

dude250711 1 hours ago [-]
sourcegrift 55 minutes ago [-]
> But they all just skip the press releases and go straight to the not using it part

Lol

brabel 6 minutes ago [-]
Did they ever get the full extra person who gives a shit?
lynx97 2 hours ago [-]
You realize that Microsoft Research employed Simon for many many years?
anentropic 1 hours ago [-]
Fantastic stuff!

FYI some code snippets are unreadable in 'light mode' ("what substrings does the regex (a|ab)+ match in the following input?")

ieviev 26 minutes ago [-]
ah thank you for letting me know, fixed it now!
sourcegrift 37 minutes ago [-]
Obligatory: Hitler reacts to functional programming

https://m.youtube.com/watch?v=ADqLBc1vFwI

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 12:40:08 GMT+0000 (Coordinated Universal Time) with Vercel.