Re: R6RS and portability Marc Feeley 25 Apr 2021 15:05 UTC

> On Apr 25, 2021, at 10:55 AM, Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote:
>
>
> Also the syntax for the library names would need to be reserved.  I have advocated a syntax that uses the URL as part of the name, e.g. (github.com/feeley/digest) or (github.com/feeley digest), so that the package manager can operate without a central registry of libraries, which is important to give library authors the freedom to create and update libraries as they see fit.  A nice practical advantage of a URL name like github.com/feeley/digest is that many tools (code editors, slack, web browsers, email readers, etc) will detect these names and offer a hyperlink that will allow the repository to be browsed in a single click.
>
> I would make a difference between package names and library names. In general, we are not interested in finding single libraries but packages (that include meta-information and know about dependencies). It is the packages that need to be found automatically. So it makes sense to "name" packages through a URI, but libraries can still be named, as usual, e.g. `(srfi 999)` or `(scheme box)` or `(nieper bubblesort)`.
>
> The package for my bubblesort would be "named" <gitlab.com/nieper/bubblesort>. It would contain a manifest like
>
> (package
>   (author "Marc Nieper-Wißkirchen")
>   (license GPL-v3)
>   ..
>   (defines (nieper bubblesort))
>   (cond-expand
>     ((gambit)
>      (requires "gitlab.com/r7rs/box"))
>     ...))
>   ...)
>
> As a package author, I know that the "gitlab.com/r7rs/box" package provides `(scheme box)`.

In my view, repositories are equated with packages and the repository’s subdirectories (possibly including the root) are the libraries.

So if the URL is github.com/account/repo then these are possible libraries:

   (github.com/account/repo)           ;; if the package is itself a library (useful for small libraries)
   (github.com/account/repo foo)       ;; the foo library in the package
   (github.com/account/repo bar)       ;; the bar library in the package
   (github.com/account/repo foo qux)   ;; the foo/qux library in the package

Marc