News for hackers. Stuff that matters.
Re:frak: Transform collections of strings into regular expre... by colanderman on Monday August 12, 2013 @10:33PM (#6203688)
Why not just use, say, an actual (i.e. backtrack-free, DFA-based) regular expression library?
Re:frak: Transform collections of strings into regular expre... by limmeau on Tuesday August 13, 2013 @03:12AM (#6204402)
This produces inputs to an arbitrary regex library. You could of course build a regex "(w1|w2|w3|...|wN)" for words w1...wN (assuming an efficient regex library) and save the hassle, but the frak output will hopefully be more compact.
Re:frak: Transform collections of strings into regular expre... by noprompt on Tuesday August 13, 2013 @03:20PM (#6207679)
Because that's not why I wrote frak. Originally, I wrote it to help eliminate backtracking and, indirectly, minimize the state table of two enormous regular expressions within Vim's Clojure syntax file (the README has a link in the "Why?" section by the way).

Vim uses an NFA style engine and it was obvious to me that backtracking with these patterns would be an issue. Since we went to such great lengths to provide the most accurate regular expression highlighting possible for Clojure, which is pretty damn accurate, I figured we might as well try to make it performant. It turns out our efforts were not in vain.

Have a look at this pull request: https://github.com/guns/vim-clojure-static/pull/28.