A succinct method for sharing Arc libraries.
A call such as
(lib "http://catdancer.github.com/erp.arc")
does the following:
lib
directory, and it has a “.arc
” extension, it is loaded into Arc.load
: No network calls are made.lib
by itself does not check if a newer version of the library is available. You decide when and if you want to upgrade.lib
directory yet, it is downloaded from the remote site, and then, if it also has a “.arc
” extension, loaded into Arc.lib
directory using the same directory structure as the URL. (“http://catdancer.github.com/erp.arc” is stored in “lib/catdancer.github.com/erp.arc”).(lib "http://yoururl/other-file")
, and other-url
will be available in the known location in the lib
directory.(lib-new)
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.
wget
installed.