schemedoc / srfi-metadata

Import SRFI metadata into the Scheme API
https://docs.scheme.org/srfi/support/
MIT License
10 stars 2 forks source link

Standardizing SRFI metadata #14

Open lassik opened 3 years ago

lassik commented 3 years ago

@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:

This suggests the following standardization:

Currently there is no standardization:

lassik commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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