A portable implementation for srfi-159
Duy Nguyen 14 Feb 2020 12:39 UTC
The reference implementation for this srfi currently is in chibi. But
it's actually (chibi show) and not entirely portable. Moreover because
it's (chibi show) it can evolve and may deviate from 159. And the test
suite is definitely about (chibi show) not (srfi 159). The test suite
is a sticking point for me because when porting/implementing srfi-159.
I want to verify (srfi 159) behavior, not (chibi show).
So I took chibi code out, clean it up and put it in my srfi fork [1].
The test suite passes for Gauche and Chibi. The srfi itself seems to
run well on Larceny too but I'm having problems with (chibi test) on
Larceny so no confirmation yet. I will probably try a couple other
schemes just to make sure the reliance on undefined behavior is
minimum.
I don't know, if people are interested (and with Alex's blessing) I
could open a pull request to merge this back to the srfi repository.
It may make it easier to have a reference implementation for srfi-166
too (not sure if that document is finalized yet)
[1] https://github.com/pclouds/srfi-159/tree/portable-implementation
--
Duy