On 2018-10-30 10:01 am, Alexander Kobel wrote:
Does anyone have a hint how to approach this one? (Or is the answer
just: be patient and hope for Guile v2?)
The only hint here is to replace the built-in functions with ones
which understand UTF8 encoding and can perform the work needed. There
very well might be someone online who has already done this work,
which would save on having to do it yourself.
Otherwise, the basic strategy is to replace string->list with a
version that decodes UTF8 and returns a list of integers (essentially
UTF32). Then, all of the string work is being done with these lists
of integers instead. (The character set would also just be a set of
integers representing the unique Unicode code points.) After you find
the subsets of the list that are interesting to measure, you'll then
need to convert the list back into a string. This means encoding back
into UTF8 and emitting a string.