unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: amirouche@hyper.dev
To: Brett Gilio <brettg@posteo.net>
Cc: guile-user@gnu.org,
	guile-user <guile-user-bounces+amirouche=hyper.dev@gnu.org>
Subject: Re: R7RS On Guile
Date: Tue, 23 Apr 2019 22:34:36 +0200	[thread overview]
Message-ID: <81c650499b03981bc760753a17aa4950@hyper.dev> (raw)
In-Reply-To: <87imv47ay9.fsf@posteo.net>

On 2019-04-23 21:55, Brett Gilio wrote:
> amirouche@hyper.dev writes:
> 
>> Hello,
>> 
>> 
>> 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:
>> 
>>     https://git.sr.ht/~amz3/guile-r7rs
>> 
>> 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.
>> 
>> 
>> Happy hacking!
> 
> Hey, I would love to help with this! I am on sr.ht as well.

Great!

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

Or

- `(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 [0]
those forms in that case in scheme/list.scm file.

[0] 
https://www.gnu.org/software/guile/manual/html_node/Creating-Guile-Modules.html#index-re_002dexport-1

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 [1]

[1] https://git.sr.ht/~amz3/guile-r7rs/tree/master/scheme/base.scm#L25

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 
https://git.sr.ht/~amz3/guile-r7rs/tree/master/Makefile#L14
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
DOCUMENTATION_FILES
https://git.sr.ht/~amz3/guile-r7rs/tree/master/Makefile#L4

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
https://todo.sr.ht/~amz3/guile-r7rs

Also don't forget to add a license header in the files you create
or contribute to.



  reply	other threads:[~2019-04-23 20:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-23 19:22 R7RS On Guile amirouche
2019-04-23 19:55 ` Brett Gilio
2019-04-23 20:34   ` amirouche [this message]
     [not found] <mailman.127.1556121627.20760.guile-user@gnu.org>
2019-04-24 19:48 ` Zelphir Kaltstahl
2019-04-24 21:24   ` Amirouche Boubekki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=81c650499b03981bc760753a17aa4950@hyper.dev \
    --to=amirouche@hyper.dev \
    --cc=brettg@posteo.net \
    --cc=guile-user-bounces+amirouche=hyper.dev@gnu.org \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).