reference implementation Alex Shinn (08 Oct 2015 05:06 UTC)
Re: reference implementation taylanbayirli@xxxxxx (08 Oct 2015 06:13 UTC)
Re: reference implementation taylanbayirli@xxxxxx (08 Oct 2015 16:03 UTC)

Re: reference implementation taylanbayirli@xxxxxx 08 Oct 2015 16:03 UTC

xxxxxx@gmail.com (Taylan Ulrich "Bayırlı/Kammer") writes:

> Indeed, I have it on my plans to work on a Guile implementation
> eventually.  And then maybe Racket.  Or, if Chibi's ephemerals are
> fixed, and extending the reader/writer isn't too hard on Chibi, I could
> do it for Chibi.

Progress report:

https://github.com/TaylanUB/guile/blob/stable-2.0/module/srfi/srfi-126.scm

That lacks ephemeral tables which Guile lacks, and doesn't implement the
quasiquote integration.

It passes (a slightly modified version of) the R6RS hashtables test
suite of Guile.  The new forms haven't been tested yet, but what matters
is that there were no fundamental problems in implementing them.

Ephemeral table support would be trivial if Guile supported it (see
'make-table').

Quasiquote integration would probably require deeper changes.  It would
not be an issue if quasiquote were made extensible in parallel with
reader extensions...

There's also the issue that the library needs to be loaded to make the
read syntax available, and that it squats the whole '#h...'  "namespace"
(i.e. anything beginning with '#h' will be passed to my reader
extension, since apparently Guile only supports direct dispatching on
one letter).  The former issue would be lifted by installing the reader
extension some place in Guile's boot process, which should be no
problem.  The latter is a pretty unexpected limitation, and I don't
really know why it would be in Guile; maybe just hysterical raisins.  I
think it's acceptable though; can't think of any other uses of '#h...'
so far.

I also couldn't see any salting in Guile's hashing.  *puts on todo*

It seems that I mostly succeeded in keeping it all easy to implement...

Taylan