Elektrine lite

← Feed

@sminez@hachyderm.io

Post #2280785

2025-10-29 21:28 UTC

@cliffordheath@mastodon.social @robpike@hachyderm.io in my engine patterns can't match one another's output as all matches are resolved first before any actions (edits / printing) take place. The paper also calls out that matches must not overlap which I currently don't have a nice solution for other than a runtime error. I've been chatting to my friend @oac@fosstodon.org about how to handle execution on streams and I _think_ that so long as you're not extending matches backwards you should be able to easily determine when you can drop previous input and when actions can be applied. Parallel groups still require evaluating all matches before any actions can be taken though, which is unfortunate but I suspect unavoidable?

Replies (1)

  • @oac@fosstodon.org 2025-10-29 21:35

    @sminez@hachyderm.io @cliffordheath@mastodon.social @robpike@hachyderm.io If you have the restriction of just a single top-level chain, then I think for many use cases you would be able to greedily proceed with processing once the top-level match completes. Some sort of lazy evaluation (like the `refer` database example from http://doc.cat-v.org/bell_labs/structural_regexps/se.pdf) where you can process each matching sub-stream as it completes.

    Open ##2280786