News for hackers. Stuff that matters.
Re:Let's Build a Regex Engine (2019) by e12e on Friday May 28, 2021 @06:31PM (#27321289)
> I frankly think we're still waiting for a 'gold standard' in regular expression implementation.

Is it the implementations, or is it regexes themselves? I was under the impression that SNOBOL/SPITBOL/REBOL was the gold standard... But I guess you're saying that given some (posix?) regex syntax, implementations can/should be improved? (while eg REBOL/Red-lang goes more towards "a more pragmatic regular language for pattern recognition", I guess ?)

Re:Let's Build a Regex Engine (2019) by 9214 on Saturday May 29, 2021 @05:08AM (#27323986)
> REBOL/Red-lang goes more towards "a more pragmatic regular language for pattern recognition"

Rebol and Red use embedded PEG parsers, which, by definition, support context-free, and not just regular, languages.

Re:Let's Build a Regex Engine (2019) by glangdale on Saturday May 29, 2021 @08:58PM (#27329665)
I'm fascinated by PEG parsers, but I don't know whether they can be implemented in a way that's remotely as performant as even mediocre regular expression implementations, much less tuned SIMD extravaganzas.

That would be a stretch goal for me: build a regular expression / automata library that's sufficiently modular to keep some components and drop in more expressive constructs (not necessarily PEGs, but maybe pushdown automata).

Re:Let's Build a Regex Engine (2019) by e12e on Monday May 31, 2021 @02:20AM (#27340805)
Not, sure - but I just came across this in the Nim standard library:

http://nim-lang.github.io/Nim/pegs.html

> Simple PEG (Parsing expression grammar) matching. Uses no memorization, but uses superoperators and symbol inlining to improve performance. Note: Matching performance is hopefully competitive with optimized regular expression engines.

Re:Let's Build a Regex Engine (2019) by glangdale on Wednesday June 02, 2021 @02:01AM (#27365389)
I've written a lot of things that are "hopefully competitive" with something else, but generally benchmarking is the ideal. :-) Hard to benchmark PEG vs regex fairly. Not dismissing it out of hand, as I've had many years to observe the weak spots of regex at quite a short distance.