You can have the ore now. It is in New York, a thousand tons of it
en.wikipedia.org9 pointsby tgamblin0 comments
view:
mpis:
root: /path/to/view
select: [^mpi]
exclude: ['%[email protected]']
projections:
all: '{name}/{version}-{compiler.name}'
link_type: symlink
That will get you symlinks to the prefixes of the packages that match the criteria, with fancy names. view:
myview:
projections:
zlib: "{name}-{version}"
^mpi: "{name}-{version}/{^mpi.name}-{^mpi.version}-{compiler.name}-{compiler.version}"
all: "{name}-{version}/{compiler.name}-{compiler.version}"
That puts all your zlib installs in a short name-version directory, most things in directories named by the package and version and a subdirectory for what compiler it was built with, and for packages that depend on MPI it also adds the MPI implementation (openmpi, mpich, etc.) and its version to that. view:
default:
root: ~/myprefix
That is useful for what we call a "unified" environment where there is only one version of any particular package -- it basically converts a subset of a store into an FHS layout. $ spack find -p
...
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/cmake-3.27.9-x6g5fl54kgt4nqmgnajrtfycivokap2p
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/cmake-3.27.9-x4bznyafesvpdbplqhmnwwvy2zj5fdzs
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/coreutils-9.3-vlwyg7d3ysxfoom3erl6ai4yy7fuf2jn
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/curl-8.4.0-zjz6twa32vxnevika34kkrxjwo27z6vj
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/curl-8.6.0-da5tk7aqaqp6zdligjmahzwohzut65qc
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/diffutils-3.9-lau4vo7zlsktmbhyn3pf3x72nxhihsaq
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/double-conversion-3.3.0-zihvj7vzedapjprk76awr7qied3k45n6
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/emacs-29.2-x5v4wdhp4vfsuxquadackqckdvxrppwi
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/expat-2.5.0-hmdysf6hcrzuhcxu7fkecpvskzxecgps
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/findutils-4.9.0-atynmdjhdjpb2ipurlk7cxtdep77m7mu
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/fish-3.6.1-sg3ws3rmbfgdfyhvjnhd5agepguj4yf2
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/flex-2.6.3-quw6ammnjxfutqtqcifvjfsp5nyqpeab
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/freetype-2.11.1-ue2ofutkkawtzvcl47pqts4lasm5lgha
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/gawk-5.2.2-jld7vb24rls64nbzkyxcp4alluyedfzv
[email protected] ~/spack/opt/spack/darwin-sonoma-m1/apple-clang-15.0.0/gdbm-1.23-amtpuskagocirjhffgqrjas3bfbnzixi
...
You can also customize the install tree paths[1] with format strings; the default is: config:
install_tree:
root: $spack/opt/spack
projections:
all: "{architecture}/{compiler.name}-{compiler.version}/{name}-{version}-{hash}"
One reason `nix` uses `/nix/HASH` is because it results in shorter paths and avoids issues with long paths. We use sbang[2] to avoid the most common one -- that long shebangs don't work on some OS's (notably, most linux distros). > spack -e default config blame packages
--- packages:
spack/environments/default/spack.yaml:59 fftw:
spack/environments/default/spack.yaml:60 require: ~mpi
spack/etc/spack/defaults/darwin/packages.yaml:17 all:
spack/defaults/packages.yaml:18 compiler: [apple-clang, gcc, clang]
spack/defaults/darwin/packages.yaml:20 providers:
spack/defaults/darwin/packages.yaml:21 unwind: [apple-libunwind]
spack/defaults/packages.yaml:20. blas: [openblas, amdblis]
spack/defaults/packages.yaml:21 jpeg: [libjpeg-turbo, libjpeg]
spack/defaults/packages.yaml:22 lapack: [openblas, amdlibflame]
spack/defaults/packages.yaml:23. mpi: [openmpi, mpich]
spack/defaults/darwin/packages.yaml:22 apple-libunwind:
spack/defaults/darwin/packages.yaml:23 buildable: False
spack/defaults/darwin/packages.yaml:24 externals:
spack/defaults/darwin/packages.yaml:27 - spec: [email protected]
spack/defaults/darwin/packages.yaml:28 prefix: /usr
The filenames are shown in color in the UI; you can see what it really looks like here: https://imgur.com/uqeiBb5
- https://www.cs.utexas.edu/~vl/teaching/378/ASP.pdf
It starts with basics of using ASP and gives examples in clingo, not math.
The Potassco book is more comprehensive and will help you understand better what is going on:
- https://potassco.org/book/
Things I don't like include that it's more dense, doesn't use clingo examples (mostly math-style examples so you kind of have to translate them in your head), and while the proofs of how grounding works are interesting, the explanations are kind of short and don't always have the intuition I want.
I still think this is the authoritative reference.
The "how to build your own ASP system" paper is a good breakdown of how to integrate ASP into other projects:
- https://arxiv.org/abs/2008.06692
The Potassco folks are doing amazing work maintaining these tools. I also wish more people knew about them.
EDIT: I forgot to mention that specifically for games stuff like enclose.horse, look at Adam Smith's Applied ASP Course from UCSC:
- https://canvas.ucsc.edu/courses/1338
Forgot to mention that one... we use clingo in Spack for dependency solving and other applications frequently slip my mind.