#!/bin/bash # # Usage: # ./run.sh set -o nounset set -o pipefail set -o errexit count() { # 8504 lines. flisp.c is 2391 lines. echo INTERPRETER CODE wc -l *.c *.h echo # 5700 lines echo 'C EXTENSIONS' wc -l llt/*.c llt/*.h echo # each one is like 1000 lines echo TINY VARIANTS wc -l tiny/*.c #tiny/*.h echo # ~6800 lines echo "Scheme / Lisp libraries" find . -name '*.scm' -o -name '*.lsp' | xargs wc -l echo } # femtolisp is cool because it has pretty printing! argv() { ./flisp tests/argv.lsp 1 2 3 } # what is the trailing #t? stdin() { ./flisp <&1 | wc -l echo ls -l flisp echo strip flisp ls -l flisp echo # Links against libm and libc. OK I guess. ldd flisp echo } show-libs() { echo SCHEME find . -name '*.scm' echo echo LISP find . -name '*.lsp' echo } search-libs() { { find . -name '*.scm' find . -name '*.lsp' } | xargs -- grep "$@" } "$@"