Cat’s hacks:


A succinct method for sharing Arc libraries.


A call such as

(lib "")

does the following:

  1. If the library file has already been loaded into Arc, nothing happens. (Program A can include libraries B and C, and library B can include library C, without C getting loaded twice).
  2. If the library file is already present in the lib directory, and it has a “.arc” extension, it is loaded into Arc.
  3. If the library isn't in the lib directory yet, it is downloaded from the remote site, and then, if it also has a “.arc” extension, loaded into Arc.


Prints out a list of URL's that have a new version available or have been overridden. (That is, it prints out those URL's for which the file in the lib directory is different than the file at the URL).

(lib-fetch url)

Unconditionally downloads the URL and stores it in the lib directory.


In other languagues, sharing code is complicated: you have to package it up, and then publish your package, and users have to download and install it, and then load it their program...

Following Paul Graham’s “Succinctness is Power” hypothesis, I tried to imagine what could be the quickest possible way to share and use Arc code.



Have fixes? Send them to me on GitHub.

Get This Hack


Comment in the Arc Forum.


public domain