Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
c0nstantine
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
c0nstantine
2y ago
Typo. Fixed. Thanks. Too many cats in examples.
32.
▲
Show HN: Transductive regular expressions for text editing
(github.com)
263 points
by
c0nstantine
2y ago
|
102 comments
33.
▲
by
c0nstantine
4y ago
Hi, thanks for sharing. Didn't know there is a python implementation. Your article is broader and I like the functional flavor. For the 'compaction' you mention, yes it is useful. But the code will be more complicated and opt
34.
▲
by
c0nstantine
4y ago
I think I got your point. It is valid. To construct the DFA and have a finite number of derivatives we have to keep track of the following equivalences: r + r ~ r r + s ~ s + r (r + s) + t ~ r + (s + t) In [1] authors state this and refer t
35.
▲
by
c0nstantine
4y ago
Thanks for sharing. I am not familiar with Agda. Will take a look. There is somewhat similar code in COQ: https://github.com/coq-community/regexp-Brzozowski
36.
▲
by
c0nstantine
4y ago
I agree. There is no magic. DFA construction has a risk of exponential growth in the number of states. My point was to illustrate the technique. I found no minimalistic python implementations and decided to write one with a short and gentle
37.
▲
by
c0nstantine
4y ago
I don't think Rust regex engine relies on this technique. I guess the main point is when you construct the DFA directly you still have the possibility of the exponential explosion of the number of states. That's why modern engines
38.
▲
by
c0nstantine
4y ago
Yes there's a typo. Thank you for following the README.md and your attention. It's fixed now.
39.
▲
Show HN: Regex Derivatives (Brzozowski Derivatives)
(github.com)
103 points
by
c0nstantine
4y ago
|
35 comments