I have had some free time recently between working for clients, and took this opportunity to implement new features for Akku’s website.
In case you did not know, Akku is a package manager with features specially designed for R6RS and R7RS Scheme.
The library systems in Scheme make it possible to automatically analyze source code to find libraries, exports and imports. Akku combines such analysis with a package index that lets you install packages from the command line, automatically resolving dependencies and placing files in the right place. Dependencies and installed files are project-specific, so you can concentrate on each project separately.
Search box
The top of the page now has a handy search box:
It uses DuckDuckGo, which I think is a good balance between privacy and functionality.
At some point it would be good to set up a custom search engine which also searches through all source code.
Who uploaded the package?
Akku has over 500 packages in its index. Many of them have been uploaded by me personally when I initially set up the archive. Packaging is really simple due to the automatic analysis built-in to Akku, so when packaging something new I just needed to read through the code to see that nothing bad was going on, then add the required dependencies and write a description.
The package uploader is identified through their OpenPGP signature on the uploaded package at https://archive.akkuscm.org/archive/packages/. The website generator uses this signature to figure out who uploaded the package and shows their name if it is different from the (single) package author.
There’s an exception for packages mirrored from Snow. Those are all signed by me anyway, as there is no way to directly upload a Snow package to Akku. Those all have to go through snow-fort.org first.
Anyone can upload packages to Akku’s archive, so if you find some cool R6RS project that’s missing in Akku then you can go ahead and upload it. See the man page for instructions. (If you want to upload a new version of a package that already exists then that’s okay too, but if the author themselves uploaded the previous version then please check with them first).
Before packages are published in the archive they are manually reviewed to verify that they’re not up to any funny business. I think this is the only way to truly prevent the attacks that regularly happen to the larger package repositories for other languages. The work is manageable today and if Akku gets more popular then it should still be sustainable with increased automation to help with the tedious parts of the manual review.
Where do I get that library?
If you have some Scheme code in front of you that imports a library then you might like to find the package that contains it. There is now a new page with just such an index:
The index is still small enough that everything fits on one page. On the left you see libraries, which are tagged as R6RS libraries, R7RS libraries or implementation-specific modules. On the right you see which packages contain the library.
A library can exist in multiple packages, so you will see some libraries with links to multiple packages. When Akku encounters this situation it is the order of the dependencies in Akku.manifest that determines which variant “wins”: dependencies can overwrite files from dependencies specified earlier in the list.
Who exports this identifier?
Akku’s archive also has information about what identifiers are exported by each library, so I have made a page where you can look for identifiers and find the relevant libraries and packages.
I’m not too happy about the usability of this page, and ideas for improvements are very welcome. I tried putting it all on one page, thinking that at least then you can search in the browser, but Mr. Browser got slow and the page was 11MB. So instead there’s an awkward split into multiple pages. It should however make search engines happy, and that’s good enough for now.
What’s in the package?
Akku’s analyzer knows what is in each package and the archive software has been publishing this information for some time, but it has never been visualized before. The only information you got on the website was a synopsis, a list of authors, maybe a description and a reference to the source code.
The new “Package contents” box lists all libraries and modules that are found in the package. The first row under each library name is the list of exported identifiers, followed by one row for each imported library. Meta-information is added to the rows, like a little tag showing if it’s an R6RS library, an R7RS library, or an implementation-specified module format.
A library name can show up multiple times if there are implementation-specific variants, e.g., one variant for Chez Scheme and another one for Chibi-Scheme. This is also shown with a little tag on the package name.
SRFI library names are linked to the relevant page on https://srfi.schemers.org. This type of linking is something that should be expanded on later, but for now that’s the only type of link you will see on a library.
I think this type of information adds a lot to the package pages. You get a deeper insight into what libraries there are, what libraries they use, and you can quickly see if the package is missing library variants for your Scheme implementation. An example is the wak-common package and its (wak private include compat) library, which exists only for Chez Scheme, GNU Guile, Ikarus, Mosh, Racket and Ypsilon. However, if you look in the library index then you can see that the akku package also has a variant of this library for Loko Scheme.
Future work
There is more I would like to add to the web site, and they are not such small projects:
Documentation. Some packages have proper documentation and it would be good to link to this. It might require an update to Akku’s package format so that it will be built properly, e.g., if there are PDFs to generate. It’s also common for other languages to have automatically extracted documentation from comments, but today there is no wide-spread tool for Scheme that does this.
Test reports. Many packages have automatic test suites, but Akku does nothing with them at the moment. An even simpler test would be to just try importing each library in each Scheme and see if that works.
Suggestions and merge requests are welcome at the website’s project page: https://gitlab.com/akkuscm/akku-web.