Store.dhall-lang.org is available


#1

There is now a public cache available for commonly-used Dhall packages at store.dhall-lang.org. To retrieve a cache product whose hash is HASH you can fetch it from https://store.dhall-lang.org/1220${HASH}. For example:

$ dhall hash <<< 'https://prelude.dhall-lang.org/v20.0.0/package.dhall'
sha256:21754b84b493b98682e73f64d9d57b18e1ca36a118b81b33d0a243de8455814b

$ curl https://store.dhall-lang.org/122021754b84b493b98682e73f64d9d57b18e1ca36a118b81b33d0a243de8455814b | dhall decode
…

These cache products are laid out and encoded in the exact same way as a typical Dhall cache (i.e. CBOR-encoded expressions whose name includes a 1220 prefix).

I documented how you can add new packages to our public cache here:

Right now the main packages of interest that are cached there are all recent Prelude and dhall-kubernetes versions, so interpreters can use the cache to accelerate the first-time setup process for new users.

I’m also going follow up soon with a change to also serve documentation for all packages cached this way (sort of like a Hackage for Dhall).


RFC: proxy.dhall-lang.org
#2

How can the cache from store.dhall-lang.org be used?

If I wanted to import the prelude faster from my local machine can I just execute dhall decode and the cache will be stored in my cache?


#3

@lorenzo: There’s not yet interpreter support for automatically using the cache, but in the interim you can pull any expression that is cached by its hash, like this:

$ HASH="$(dhall hash <<< 'https://prelude.dhall-lang.org/v20.0.0/package.dhall')"
$ curl "https://store.dhall-lang.org/1220${HASH}" > "~/.cache/dhall/1220${HASH}"

… replacing https://prelude.dhall-lang.org/v20.0.0/package.dhall with the desired import that is being cached at store.dhall-lang.org. Anything listed on the store.dhall-lang.org main page should be cached (e.g. all recent Prelude and dhall-kubernetes versions).


#4

Thanks, Gabriel

I thought the interpreter already had support for this, but makes sense that it is not yet part of any release. The workaround works perfectly for me in the mean time.

Thanks for your all your great work!