Vocabulary for finding libraries Lassi Kortela (26 Oct 2022 18:17 UTC)
Re: Vocabulary for finding libraries Arthur A. Gleckler (26 Oct 2022 19:03 UTC)
Re: Vocabulary for finding libraries Lassi Kortela (26 Oct 2022 20:43 UTC)
Re: Vocabulary for finding libraries Lassi Kortela (26 Oct 2022 21:07 UTC)
Re: Vocabulary for finding libraries Lassi Kortela (26 Oct 2022 21:40 UTC)

Re: Vocabulary for finding libraries Lassi Kortela 26 Oct 2022 21:06 UTC

One more cool thing is that you can express different levels of
abstraction in the same DSL. It falls out naturally once you have
specified enough combinators that the higher-level ones output the
lower-level ones.

For example, consider a directory with the following files:

srfi/1.sld
srfi/1/lists.sld
srfi/13.sld
srfi/13/strings.sld

The high-level combinators (using-convention ".sld" (directory ".")),
when applied to the above directory tree, would expand into the
following low-level combinators:

(at srfi
     (union (at 1
                (union (library "srfi/1.sld")
                       (at lists (library "srfi/1/lists.sld"))))
            (at 13
                (union (library "srfi/13.sld")
                       (at strings (library "srfi/13/strings.sld"))))))

This way, the REPL could offer a "macroexpand"-style tool to show what
the library finder is actually doing. You could also write the
expansions into build logs and things like that.