Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardizing SRFI metadata #14

Open
lassik opened this issue Nov 11, 2020 · 3 comments
Open

Standardizing SRFI metadata #14

lassik opened this issue Nov 11, 2020 · 3 comments

Comments

@lassik
Copy link
Member

lassik commented Nov 11, 2020

@diamond-lizard I'm opening this issue to explore the SRFI metadata problem specifically, since the scope of pre-srfi/scheme-metadata-files is both more general and (in other ways) more specific.

Let's walk backward from the end result. To generate the big table, we need an S-expression like this:

((chez
  (0 external)
  (1 external)
  (2 external)
  (4 external)
  (5 external)
  ...)
 (chicken
  (0 release)
  (1 external)
  (2 release)
  (4 release)
  (6 release)
  (8 release)
  (9 release)
  (10 release)
  (11 release)
  (12 release)
  (13 external)
  (14 external)
  (15 release)
  ...)
 ...)

Here the symbol is external or release or pre-release to indicate how that SRFI is supported in that implementation. Missing SRFIs are unsupported.

We know:

  • Each implementation has zero or more SRFIs in built-in.

  • Some implementations have their own package collection, serving packages for that implementation only. E.g. Chicken eggs. Each package implements zero or more SRFIs.

  • There are also cross-implementation package collections like Akku and Snow-Fort. Each package implements zero or more SRFIs for one or more implementations.

  • Each package collection has an index of all the packages in it.

This suggests the following standardization:

  • Each implementation has some file in its source release that lists all the built-in SRFIs.

  • Each package collection has a machine-readable package index that lists all the SRFIs implemented by each package.

  • The cross-implementation package collections have some way of indicating in their index which Scheme implementations are supported by each package. If this information is unavailable, we need to make an educated guess.

Currently there is no standardization:

  • Scheme implementations' source releases don't ship any standard metadata file.

  • Package collections haven't standardized their per-package metadata, and also haven't standardized their package indexes.

@lassik
Copy link
Member Author

lassik commented Nov 11, 2020

This shows the utility of storing all of a package's metadata in one S-expression: If instead of SRFI information, we wanted to list license information, or author information, that problem would have exactly the same shape as this problem, just using different fields of the metadata. The authoritative source for the information would be in the same place (in each Scheme implementation, and in each package) and could be aggregated to the index of each package collection like the SRFI information.

Likewise, if the package index is an S-expression (as it already is for Akku) it can be naturally made as a list of the individual packages' S-expressions.

If at any point there is too much information, just (filter do-i-care-about-this-part? the-s-expression)

@jpellegrini
Copy link
Contributor

One thing: some R6RS libraries have SRFI equivalent, and the table doesn't show them.
For example, Guile (and other R6RS implementations) have (rnrs io ports), which do implement SRFI-192 completely. But the table does not show these implementation as supporting SRFI-192, because in them it is called rnrs io ports...

@lassik
Copy link
Member Author

lassik commented Nov 14, 2020

Good point. Same thing with the libraries in the work-in-progress R7RS-large: each library is one SRFI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants