Le sam. 2 nov. 2019 à 09:43, Lassi Kortela lassi@lassi.io a écrit :
I stumbled upon https://github.com/udem-dlteam/libs/ but:
Great. I didn't know it was public :) It's mostly (but not exclusively) SRFIs for now.
A) There is no tests
Work in progress :)
A lot of SRFIs don't have many tests. It might be nice to gather a big, up-to-date test suite for all SRFIs.
Or keep up-to-date tests in each SRFI's repo with the sample implementation.
That will be nice.
B) There is no doc
All except one of the current ones are SRFI implementations, so the SRFI is the documentation.
We already discussed that matter in SRFI schemedoc mailing list. We disagree. In my opinion, SRFI documents are not user documentation. Simply refering gambit user to the SRFI document is not good enough. A proper implementation documentation will need examples uses, a useable comment system. And also systematic documentation of all forms. Unlike some SRFI document like (scheme mapping) aka. SRFI-146 that bolt together (scheme mapping) and (scheme mapping hash) together (see https://srfi.schemers.org/srfi-146/)
C) The layout of the repository is as far as I can tell:
libs/srfi/1/1.sld
That would me that srfi 1 is importable with:
(import (srfi 1 1))
which looks odd. Maybe I misunderstood something.
Gambit's lookup rules allow either foo.sld or foo/foo.sld to be imported with (import (foo)). This may be unusual among R7RS Schemes.
It is different from what I have already seen, but I see it as an improvement as all files can be in the same directory which will ease navigation.
D) There is not (scheme fu) libraries
They are in the lib/scheme directory Gambit's main repo: https://github.com/gambit/gambit/tree/master/lib/scheme
It also has a lib/srfi directory: https://github.com/gambit/gambit/tree/master/lib/srfi
Most of the SRFI implementations from udem-dlteam/libs will probably be merged into Gambit's main repo once they have been tested enough; libs is mostly for work-in-progress stuff.
It will be easier if that was a draft pull-request against gambit repository. It will help with discovery and it will also take advantage of gambit repository Continuous Integration.
E) Can someone add a dummy test for a dummy library so that I can see how to run recent gambit with R7RS? Here is an example of such thing: https://github.com/amirouche/arew-scheme/blob/master/src/tests-tests.scm
Gambit has a build-in test framework but I haven't used it yet. We also plan to implement SRFI 64 (A Scheme API for test suites) using the built-in framework.
I don't like SRFI 64. It is impossible to run a single test with SRFI-64. I am looking forward an introspection or reflection library system (something like guile or chez does) so that it is possible to run a single test where a test are procedures.
See `library-exports` at https://github.com/amirouche/arew-scheme/blob/master/make-check.scm#L22
I already tried to use SRFI-64, at the very minimum it requires to wrap `test-fu` forms inside a procedure like chibi scheme does.