From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: amirouche@hyper.dev Newsgroups: gmane.lisp.guile.user Subject: Re: R7RS On Guile Date: Tue, 23 Apr 2019 22:34:36 +0200 Message-ID: <81c650499b03981bc760753a17aa4950@hyper.dev> References: <31b28dccf5cf612aa6134ad20001097b@hyper.dev> <87imv47ay9.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="181646"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Roundcube Webmail/1.3.8 Cc: guile-user@gnu.org, guile-user To: Brett Gilio Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Apr 23 22:35:16 2019 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJ28J-000l7A-7U for guile-user@m.gmane.org; Tue, 23 Apr 2019 22:35:15 +0200 Original-Received: from localhost ([127.0.0.1]:59187 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJ28I-0007sw-8A for guile-user@m.gmane.org; Tue, 23 Apr 2019 16:35:14 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJ27u-0007si-GX for guile-user@gnu.org; Tue, 23 Apr 2019 16:34:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJ27t-0007vh-6e for guile-user@gnu.org; Tue, 23 Apr 2019 16:34:50 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:56565) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hJ27p-0007hj-MZ; Tue, 23 Apr 2019 16:34:45 -0400 Original-Received: from webmail.gandi.net (webmail14.sd4.0x35.net [10.200.201.14]) (Authenticated sender: amirouche@hyper.dev) by relay6-d.mail.gandi.net (Postfix) with ESMTPA id 5908EC0004; Tue, 23 Apr 2019 20:34:36 +0000 (UTC) In-Reply-To: <87imv47ay9.fsf@posteo.net> X-Sender: amirouche@hyper.dev X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.70.183.198 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15418 Archived-At: 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.