💾 Archived View for idiomdrottning.org › rope-irregex captured on 2023-03-20 at 18:05:53. Gemini links have been rewritten to link to archived content
➡️ Next capture (2023-05-24)
-=-=-=-=-=-=-
This Chicken Scheme extension, rope-irregex, provides two chunkers for irregex’s chunked API compatible with ropes from the ropes egg.
One is called rope-chunker, which is directly compatible with ropes, and the other saves a lot of CPU memory, it’s called flat-chunker, and you get a rope->flat to wrap your rope with.
In other words, these two are equivalent:
(irregex-search/chunked "ana" rope-chunker (rope "banana")) (irregex-search/chunked "ana" flat-chunker (rope->flat (rope "banana")))
The second way is faster than the first and also saves memory.
Either way, irregex-match-subchunk will return a full rope, not a flat, so if you then wanna do more flat-chunked irregexing on that rope you’ll have to call rope->flat again.