> On Oct 25, 2022, at 11:23 AM, Arthur A. Gleckler <xxxxxx@speechcode.com> wrote: > > On Tue, Oct 25, 2022 at 5:16 AM Marc Feeley <xxxxxx@iro.umontreal.ca> wrote: > > By the way this library name syntax is currently supported by try.scheme.org if you want to try it out. For example you can type at the REPL: > > (import (github.com/gambit/hello demo)) > > and the interpreter will fetch the library directly from that github repository. Read the tutorial on try.scheme.org to know more about how to write and use hosted libraries. > > That's a great feature. I’m glad you like it! While I can understand the automatic downloading is not to everyone’s taste, it is very convenient for sharing code as it reduces the barrier to collaboration by avoiding the tedium of locating and installing the library after the other collaborator has made a change. But the main point here is not the automatic dowloading but rather the combination of having a unique name for the library, knowing the location where it can be downloaded, and the absence of centralized control (for registering new libraries, user names, etc). > I would rather see the URI enclosed in double quotes, which would eliminate concerns about conflicts between Scheme identifier syntax and URI syntax. It would only be slightly more verbose to say (import ((uri "https://github.com/gambit/hello") demo)), but would be even clearer. > To me the terseness and elegance of the notation is important so the choice between these two is clear to my eye: (import (github.com/gambit/hello demo)) (import ((uri "https://github.com/gambit/hello") demo)) Moreover, currently the first notation is allowed by R7RS for a library name, but not the second, so nothing would have to change in R7RS. We just need a convention for the community to adopt. For example you can use (github.com/gambit/hello demo) as a library name in Chibi Scheme and it will look for the file github.com/gambit/hello/demo.sld in the module search directories. This means that an independent installer could be written for Chibi to dowload the sources and put them in one of the module search directories (without having to change Chibi). This is probably a few lines of shell script calling wget/tar/etc. In principle that notation should be supported by other R7RS conformant systems although the presence of a “/” in the name may trigger bugs in the implementation (the R7RS says it is “inadvisable” but not “an error” to use “/” in a library name). Note that I’m not proposing that a full URI be used because a URI has a bunch of unnecessary information, such as the https:// part, that is not normally relevant (I rarely if ever enter it at the browser’s address bar). Undelimited Scheme symbols cover almost all the characters acceptable in a URI (assuming the part after the URI path is empty which would be the case here). The characters | and \ are not allowed in the relevant parts of URIs, and I believe special characters like ()’,; are valid, so for URIs with those characters a delimited Scheme symbol could be used. Note that this approach to naming libraries is also used by GoLang, so there’s something to be said about its practicality. See https://encore.dev/guide/go.mod Marc