unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* R7RS On Guile
@ 2019-04-23 19:22 amirouche
  2019-04-23 19:55 ` Brett Gilio
  0 siblings, 1 reply; 5+ messages in thread
From: amirouche @ 2019-04-23 19:22 UTC (permalink / raw)
  To: guile-user gnu

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!



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: R7RS On Guile
  2019-04-23 19:22 R7RS On Guile amirouche
@ 2019-04-23 19:55 ` Brett Gilio
  2019-04-23 20:34   ` amirouche
  0 siblings, 1 reply; 5+ messages in thread
From: Brett Gilio @ 2019-04-23 19:55 UTC (permalink / raw)
  To: guile-user


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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: R7RS On Guile
  2019-04-23 19:55 ` Brett Gilio
@ 2019-04-23 20:34   ` amirouche
  0 siblings, 0 replies; 5+ messages in thread
From: amirouche @ 2019-04-23 20:34 UTC (permalink / raw)
  To: Brett Gilio; +Cc: guile-user, guile-user

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.



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: R7RS On Guile
       [not found] <mailman.127.1556121627.20760.guile-user@gnu.org>
@ 2019-04-24 19:48 ` Zelphir Kaltstahl
  2019-04-24 21:24   ` Amirouche Boubekki
  0 siblings, 1 reply; 5+ messages in thread
From: Zelphir Kaltstahl @ 2019-04-24 19:48 UTC (permalink / raw)
  To: guile-user

Hi Amirouche!

I just looked at the source hut thingy. I do not really understand where
to go from there.

I see the to-do list: https://todo.sr.ht/~amz3/guile-r7rs

On each item there is already a name before the chat icon in the table.
But I guess that is only the creator of the to-do list item (you?)?

I click on an item, lets say "(scheme repl)". Then I get to this page:
https://todo.sr.ht/~amz3/guile-r7rs/41

There I see a link to a PDF and a GitLab project
https://gitlab.com/akkuscm/akku-r7rs/ .

However, the linked project seems to not be specific to any to-do list
item. No matter what item I check, it always leads me to this akku
thingy. Does that mean, that it is already implemented somewhere in the
akku? Should it not be marked as closed on the to-do list then?

And how does that source hut thing work? Do I create a new repository on
GitLab and simply start implementing things according to what the PDF
defines as the standard? I would like to see example code for other
things R7RS to see if I can understand anything and see, if I feel
capable of contributing anything of value, or if it is above my level.

Sorry for all the questions! I have not used source hut before.

Regards,

Zelphir

On 4/24/19 6:00 PM, guile-user-request@gnu.org wrote:
> Message: 1
> Date: Tue, 23 Apr 2019 21:22:45 +0200
> From: amirouche@hyper.dev
> To: guile-user gnu <guile-user@gnu.org>
> Subject: R7RS On Guile
> Message-ID: <31b28dccf5cf612aa6134ad20001097b@hyper.dev>
> Content-Type: text/plain; charset=US-ASCII; format=flowed
>
> 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!



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: R7RS On Guile
  2019-04-24 19:48 ` Zelphir Kaltstahl
@ 2019-04-24 21:24   ` Amirouche Boubekki
  0 siblings, 0 replies; 5+ messages in thread
From: Amirouche Boubekki @ 2019-04-24 21:24 UTC (permalink / raw)
  To: Zelphir Kaltstahl; +Cc: Guile User

Le mer. 24 avr. 2019 à 21:57, Zelphir Kaltstahl <zelphirkaltstahl@gmail.com>
a écrit :

> Hi Amirouche!
>

Thanks for you interest.


> I just looked at the source hut thingy. I do not really understand where
> to go from there.
>
> I see the to-do list: https://todo.sr.ht/~amz3/guile-r7rs
>
> On each item there is already a name before the chat icon in the table.
>
But I guess that is only the creator of the to-do list item (you?)?
>

Yes. According to the html that column with the name is the name of
submitter.


>
> I click on an item, lets say "(scheme repl)". Then I get to this page:
> https://todo.sr.ht/~amz3/guile-r7rs/41


Those are comments, I did quickly add pointers to existing work.


> There I see a link to a PDF and a GitLab project
> https://gitlab.com/akkuscm/akku-r7rs/ .
>

Akku-r7rs is project build for akku package manager <http://akkuscm.org/>.
It provides R7RS-small.
to akku powered project.

However, the linked project seems to not be specific to any to-do list
> item. No matter what item I check, it always leads me to this akku
> thingy. Does that mean, that it is already implemented somewhere in the
> akku?


Yes, that particular item 41 about the repl is implemented in:

   https://gitlab.com/akkuscm/akku-r7rs/blob/master/scheme/repl.sls

For some reason. It leads to:

  https://gitlab.com/akkuscm/akku-r7rs/blob/master/compat.guile.sls#L12

As you can see it only export (rnrs) environment.


> Should it not be marked as closed on the to-do list then?
>

I don't re-use all of akku r7rs. guile-r7rs does not rely on:

  https://github.com/weinholt/laesare

For the time being at least.

Actually, I was under the impression that it required much more
work than simply re-export rnrs environement. See:

  https://git.sr.ht/~amz3/guile-r7rs/tree/master/scheme/repl.scm

I will fix it.

And how does that source hut thing work? Do I create a new repository on
> GitLab and simply start implementing things according to what the PDF
> defines as the standard?


Forget about what is R7RS-small pdf because I mostly have done it.
Only documentation is missing for those and maybe some tests for
new behaviors defined in (scheme base).


> I would like to see example code for other things R7RS to see if I


A good example is what Linus Björnstam did in another thread called
bit fiddling. The Guile repository is at:

   https://bitbucket.org/bjoli/guile-srfi-151/src/default/

can understand anything and see, if I feel capable of contributing

anything of value, or if it is above my level.
>

I think the easiest are the one in the section "red edition" and "tangerine
edition" among them there (scheme list) which guile's (srfi srfi-1) there
is
also (scheme box) guile has it as (srfi srfi-111) and (scheme ephemeron)
I don't know about that.

*To my mind, it is very repetitive work, but I learned a few things along*
*the way, like the case-lambda syntax.*

By the way, on ward I will mark those that are in-progress with an wip
label in source hut, see:

   https://todo.sr.ht/~amz3/guile-r7rs?search=label:%22work-in-progress%22

Also, there is tab called "label" that allows to filter by label for
instance:


https://todo.sr.ht/~amz3/guile-r7rs?page=2&search=label:%22help%20wanted%22

One that could become popular is (scheme regex) based on SRFI-115:

   https://srfi.schemers.org/srfi-115/

Avoid (scheme show) as it is in the process of being re-specified and
re-implemented.

Sorry for all the questions! I have not used source hut before.
>

No problem.


>
> Regards,
>
> Zelphir
>
> On 4/24/19 6:00 PM, guile-user-request@gnu.org wrote:
> > Message: 1
> > Date: Tue, 23 Apr 2019 21:22:45 +0200
> > From: amirouche@hyper.dev
> > To: guile-user gnu <guile-user@gnu.org>
> > Subject: R7RS On Guile
> > Message-ID: <31b28dccf5cf612aa6134ad20001097b@hyper.dev>
> > Content-Type: text/plain; charset=US-ASCII; format=flowed
> >
> > 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!
>
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-04-24 21:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23 19:22 R7RS On Guile amirouche
2019-04-23 19:55 ` Brett Gilio
2019-04-23 20:34   ` amirouche
     [not found] <mailman.127.1556121627.20760.guile-user@gnu.org>
2019-04-24 19:48 ` Zelphir Kaltstahl
2019-04-24 21:24   ` Amirouche Boubekki

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).