compiler.org
Learning and science
regex visualization
SHOW HN2021
How HN took it
6 positive, 6 neutral or asking, 1 mixed, 3 critical, out of 16 comments about the project. Thread score +0.22.
Idea: 2 for, 2 againstExecution: 1 for, 1 againstDesign: 1 for, 0 againstDocs: 1 for, 0 against
The thread, comment by comment
Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.
positive neutral or mixed critical about another commenter or something else the maker
What HN said
What people liked
Amazing interactive learning tool
From 3 comments
This is an amazing interactive learning tool. Kudos! I vaguely remember from a "computer science modelling" course at uni, learning how to do this process by hand, from the…
allanrbo on HNThis is really neat! I've been putting off learning regex's for some time now, guess I need to add it to my tool belt.
lprd on HNIn all DM books. Kudos!
stelf on HN
Useful for understanding regex internals
From 2 comments
> It feels to me like it shouldn’t be compilation to a program that processes one character at a time High performance regex engines do use SIMD in various places. Others have…
burntsushi on HNI would like to echo @allanrbo kind words I to think it's a great way to understand regular expressions and their various implementations. I was a little confused about how to…
filterfish on HN
Objections
Only supports academic regular expressions, lacks Unicode and backreferences
From 2 comments
Too many to enumerate, already the utter lack of Unicode is a killer. The tool supports only the academic interpretation of regular expressions that are strictly equivalent to…
bmn__ on HN>> Too many to enumerate I take back my previous claim, this is a wrong exaggeration. > The tool could be extended to support Unicode Not an easy task. There are some things in…
bmn__ on HN
Perl-style regex features like lookaround are not supported
From 2 comments
>> Too many to enumerate I take back my previous claim, this is a wrong exaggeration. > The tool could be extended to support Unicode Not an easy task. There are some things in…
bmn__ on HNOnly regular expressions[0] can compile to FST's; Perl-style regexes aren't regular. [0] https://en.wikipedia.org/wiki/Regular_language
unhammer on HN
Requests
Show the generated code after each optimization step
From 1 comment
I guess this might be hard, but it would be pretty cool to be able to "stop" the optimizations at some point and see the resulting code. Say "give me the generated code for the…
JD557 on HN
Support more algorithms from the compiler course
From 2 comments
Heh, the idea was to put more things on it, would be cool to visualize more algorithms. Too bad ReasonML became such a mess, I really liked the coding experience in it. Now I…
JoelJacobson on HNThanks for the kind words. I made it for fun during a compiler course held by professor Christian Schulte at the Royal Institute of Technology here in Sweden. My original plan…
JoelJacobson on HN
Questions
How do SIMD and ILP apply to regex compilation performance
From 3 comments
I wonder what the state of the art is in regex compilation? It feels to me like it shouldn’t be compilation to a program that processes one character at a time as you’ll be doing…
dan-robertson on HNMany high-performance regex libraries use SIMD these days. Hyperscan might be the most prominent example of that, being made by Intel and all.
zokier on HNAuthor here. The generated LLVM IR at the bottom actually make uses of vector instructions, which will make LLVM generate SIMD instructions if supported by the CPU. For instance,…
JoelJacobson on HN
What are the limitations compared to Python's re module
From 1 comment
What are the limitations of regular expressions compiled in this way, compared to things like Python’s `re` module? Is it just that they can’t support backreferences?
pansa2 on HN
Alternatives named
regex101.com
From 1 comment
Regex101.com is the super-lite version of this, also worth a look if you haven’t tried it
savrajsingh on HN
Hyperscan
From 1 comment
Many high-performance regex libraries use SIMD these days. Hyperscan might be the most prominent example of that, being made by Intel and all.
zokier on HN
RE2
From 1 comment
> It feels to me like it shouldn’t be compilation to a program that processes one character at a time High performance regex engines do use SIMD in various places. Others have…
burntsushi on HN
Emacs rx
From 1 comment
See also https://www.emacswiki.org/emacs/rx
unhammer on HN