== Lay [[toc:]] === Description The lay utility installs eggs. It leverages the index file generated by [[/egg/egg-tarballs#egg-tarballs-index|egg-tarballs-index]] and [[/man/5/Extension tools#chicken-install-reference|chicken-install]] to parallelize and speedup the eggs building process. === Usage lay [-h] [-c] [-v] [-j jobs] [-z zcat] egg ... -h display this help page and quit -c clear the local cache before doing anything else -i prog use 'prog' as chicken-install program -v print verbose output -j jobs use at most 'jobs' parallel processes (default: 4) -z prog use 'prog' as zcat program === Details The lay utility retrieves the eggs index file from the [[https://code.call-cc.org/egg-tarballs|egg-tarballs]] directory of the running CHICKEN major release. A copy is kept in a local cache directory to avoid unnecessary downloads. A DAG representing eggs dependencies is generated from the eggs index file. The DAG file is cached too. The DAG is then resolved into levels. Each level contains independent eggs that can be built in parallel. Here comes the major advantage of using lay: multiple instances of [[/man/5/Extension tools#chicken-install-reference|chicken-install]] can be used to build the eggs at each level. As an example, to build version 1.42 of the [[/egg/brev|brev]] egg we need to resolve 6 levels: * (srfi-71:0.2 llrb-syntax:0.2 memory-mapped-files:0.4 anaphora:1.0.1 srfi-69:0.4.3 miscmacros:1.0 matchable:1.2 srfi-18:0.1.7 srfi-14:0.2.1 srfi-1:0.5.1) * (sendfile:2.0 uri-generic:3.3 defstruct:2.0 fast-generic:0.7 brev-separate:1.97 clojurian:3 combinators:1.2.2 srfi-13:0.3.4) * (sxpath:1.0 srfi-128:0.11 simple-md5:0.1.1 base64:1.0 uri-common:2.0 html-parser:0.3 sxml-transforms:1.4.3 strse:1.39 srfi-42:1.76 quasiwalk:1.10 getopt-long:1.21 sxml-serializer:0.5) * (tree:1.50 llrb-tree:0.3.8 intarweb:2.1.0 fix-me-now:1.5 match-generics:2.8 sequences:0.6.1 define-options:1.23) * (scsh-process:1.6.0 http-client:1.2.1 acetone:1.2 dwim-sort:1.4) * (brev:1.42) At the time of this writing, on a reasonably cheap VPS, building brev with plain chicken-install vs. using lay results in these times: * chicken-install brev: 805.06 secs * lay -j 8 brev: 373.90 secs === Author Pietro Cerutti === Repository [[https://code.ptrcrt.ch/lay|https://code.ptrcrt.ch/lay]] === License Copyright (c) Pietro Cerutti All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. === Version History * 0.2.1 ** keep all versions in the DAG, they might have different dependencies * 0.2.0 ** fix installing the egg that appears last in the index file ** take the highest version available in a versioned dependency ** skip the srfi-4 and chicken eggs * 0.1.2 ** default chicken-install to C_INSTALL_PREFIX/bin/chicken-install ** allow overriding the chicken-install program via -i * 0.1.1 ** default zcat to gzcat on macOS * 0.1.0 ** initial release