Closed jpellegrini closed 6 months ago
I forgot to mention: the read syntax is not mandatory according to the SRFI...
Also... The code to read from a string is already there (see string->bitvector
).
Hi @egallesio ! I see you have implemented the #*
syntax - that's great! :smile:
Yep, code of the reader has been refactored for #xxx
objects and can be extended in Scheme (see last comment in Issue #434). I hope it will be useful for future extensions.
Anyway, thanks a lot @jpellegrini for this great PR.
Hi @egallesio !
Well... I thought I'd implement one more SRFI... :grin:
This is SRFI 178 - Bitvector library.
MISSING:
Regarding this, I see some possibilities:
bitvector
type as native, and keep onlybitvector
,bitvector-set!
,bitvector-ref
in the core, and if the user wants, the rest may be brought with(import (srfi 178))
.loaded_srfi_178
that tells the reader wether it can read bitvectors. However -- the bitvector data structure would not be known to the reader, and the SRFI would at least have to change a function pointer in the reader.#*10011
instead of(bitvector 1 0 0 1 1)
)...POSSIBLE OPTIMIZATIONS FOR THE FUTURE: