How I fixed a bug in Atom
davidvgalbraith.com
How I fixed a bug in Atom
1–10 of 189 posts
Re: How I fixed a bug in Atom
#2Re: How I fixed a bug in Atom
#3Re: How I fixed a bug in Atom
#4Re: How I fixed a bug in Atom
#5Good job!
Re: How I fixed a bug in Atom
#6Re: How I fixed a bug in Atom
#7Re: How I fixed a bug in Atom
#8.. which is his main pass time if you see his other posts, rather than spending his effort on fixing bugs that actually affect a lot of people. I am sorry but I don't really appreciate it and have trouble getting over the misrepresentation in the title of the blog posts.
Re: How I fixed a bug in Atom
#9Re: How I fixed a bug in Atom
#10And why? So you could write some dirty hack rather than writing a simple recursive descent parser to create an AST of the code (which takes O(n)). What did you gain by ruining your regular expression implementation and writing shitty code?
EDIT: Matching might be O(m), but I'm wondering about maximally linked graphs with many epsilon edges. The conversion from DFA to NFA would require O(n^2) in that case. Implementing it as an NFA evaluation might be faster than full conversion, but then you run the risk of having O(n^2) dominating in the matching.
EDIT: The author is somewhat correct on what "catastrophic back referencing" is. While you could argue that it is due to bad implementations of the greedy matching, it's a more endemic problem of how you have to implement a regular expression engine that supports back references. If you have to support back references, then you will always have a class of pathological cases which cause exponential time complexity. I had a useful graph about this on my toy regular expression engine (which performs much better than Python's implementation even though it's written in Python and not C): https://github.com/cyphar/redone.