Elektrine lite

โ† Feed

@oac@fosstodon.org

Post #2280779

2025-11-01 16:39 UTC

@sminez@hachyderm.io @jbert@hachyderm.io That's awesome, I'm excited to check it out! As it happens I woke up early this morning and couldn't fall back asleep because my brain was working through how to do a streaming-based structed system (with a naive placeholder matching system to start) so the focus is on how to efficiently compute potentially overlapping chains, then figure out the regex syntax later. I might sketch out something during my travels this weekend (but I have a cubesnake to optimize first... XKCD 3125)

Replies (1)

  • @sminez@hachyderm.io 2025-11-01 16:45

    @oac@fosstodon.org @jbert@hachyderm.io sounds fun! I have an idea for how to do stream based but it relies on using my own regex engine and won't work for the regex crate as that needs to match against a &str. (Which isn't great as my engine is suuuuuuuper slow ๐Ÿ˜…) I've tried to take a look at how @burntsushi@programming.dev handles matching against stdin in multiline mode with ripgrep but there is a LOT going on in that crate so I'm going to need to make a pot of coffee and spend an afternoon just reading through the source (and fantastic comments) to figure out how its done. If I can get the regex crate to tell me that it has a potential match when it reaches the end of its input and hold that state rather than failing the match, I could buffer and feed it lines as they come through. I'm pretty sure that's not supported in "regex" itself but it might be possible with one of the underlying crates? I've not checked that yet though ๐Ÿ‘€

    Open ##2280780