[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: R7RS On Guile
Re: R7RS On Guile
Tue, 23 Apr 2019 22:34:36 +0200
On 2019-04-23 21:55, Brett Gilio wrote:
If you like R7RS and also like Guile you might join me
in getting together R7RS libraries as Guile libraries.
I am just getting started not much is done as of yet.
The repository is over the rainbow at source hut:
There is continuous integration that is setup.
Documentation is written in markdown and the project
rely on Guile srfi-64 testing framework.
My plan is to focus on (scheme base) to get tests
and documentation up.
Feel free to reach me if you would like to join the fun.
Hey, I would love to help with this! I am on sr.ht as well.
For each library there three things to do:
- implementation e.g. scheme/base.scm
- documentation e.g. scheme/base.md
- tests e.g. scheme/base-tests.scm
Pick what you are interested to do, leave the rest. Don't feel
obliged to do documentation if you are not interested.
Among the three tasks, documentation is the easiest as you can
almost all the time copy/paste as-is the original documentation
found in the SRFI specification. Look at scheme/base.md to see
how documentation should look like. If you feel inspired you can
add example uses.
Pick one library in that list:
- `(scheme box)` aka. SRFI 111
- `(scheme charset)` aka. SRFI 14
- `(scheme comparator)` aka. SRFI 128
- `(scheme ephemeron)`) aka. SRFI 124
- `(scheme hash-table)` aka. SRFI 125
- `(scheme ideque)`) aka. SRFI 134
- `(scheme ilist)` aka. SRFI 116
- `(scheme list)` aka. SRFI 1
- `(scheme list-queue)` aka. SRFI 117
- `(scheme lseq)` aka. SRFI 127
- `(scheme rlist)` aka SRFI 101
- `(scheme set)` aka. SRFI 113
- `(scheme sort)` aka. SRFI 132
- `(scheme stream)` aka. SRFI 41
- `(scheme text)` aka. SRFI 135
- `(scheme vector)` aka. SRFI 133
- `(scheme mapping)` aka. SRFI 146
- `(scheme mapping hash)` aka. SRFI 146
- `(scheme regex)` aka. SRFI 115
- `(scheme generator)` aka. SRFI 158
- `(scheme division)` aka. SRFI 141
- `(scheme bitwise)` aka. SRFI 151
- `(scheme fixnum)` aka. SRFI 143
- `(scheme flonum)` aka. SRFI 144
- `(scheme bytevector)` aka. `(rnrs bytevectors)` aka. SRFI 4
- `(scheme vector @)` aka. SRFI 160 where @ is any of base, u8, s8, u16,
s16, u32, s32, u64, s64, f32, f64, c64, c128.
- `(scheme show)` aka. SRFI 159
First you must check if the SRFI is available in guile 2.2.
If it is the case (like SRFI-1) you can re-export 
those forms in that case in scheme/list.scm file.
In the case the SRFI is in guile, forget about the tests.
As you can see they are all based on existing SRFI.
You can find the SRFI at https://git.io/fj3HY they
come most of the time with sample implementation and
sometime with tests.
Sometime guile comes with a better implementation,
in that case use guile implementation. For instance,
I think one can rely on guile-pfds to implement
(scheme mapping hash).
Look at how I started with base.scm 
I define the library with `define-module` and then use
`import` (instead of `use-modules`) with a mixture of
`prefix`, `except` and `only`.
To make a form public use `export` or `re-export` if the
form comes from another guile module (like srfi srfi-1).
When you create a test file you must add it to TEST_FILES
in the Makefile
Mind the "\" at the end of the line that marks the continuation
of the list.
Then you can run all tests with 'make check'
Similarly, if you add a documentation file you must add it to
To build the documentation, you will need 'pandoc' and 'latex'.
Use 'make doc' to generate the documentation.
If you want it, I can add you as contributor, in that case give
me your sr.ht username.
I almost forgot, when you start something fill a todo item at
Also don't forget to add a license header in the files you create
or contribute to.