I am using the example of Doug Hoyte's and The Phoeron's let-over-lambda to simultaneously build up my understanding of common-lisp packages, of quicklisp and asdf, and of production-level, professional practices for programming at scale in common lisp.
I am able to use the package in ways illustrated below, but haven't yet figured out how to run its tests using similar partially guided guesswork. Details follow.
I found the code here: https://github.com/thephoeron/let-over-lambda. I am using a "firehose" and "incrementally educated guesswork" approach to cram as much as possible into my head as quickly as possible, using this as a trail guide. Of course, this approach is going to leave me with many more fuzzy spots of knowledge along the way than a more structured approach would, but it might get me to the mountain top faster (feel free to disabuse me of this notion).
At my present, rudimentary level of understanding, I can use the package in my own code. For instance, I can write
(load "~/quickload/setup.lisp")
(ql:quickload "let-over-lambda")
(let-overlambda:flatten '((a . b) c (d e)))
and get
(A B C D E)
I can notice that the package defines a nickname, lol
, by reading the defpackage
in "package.lisp", namely (abbreviated):
(defpackage #:let-over-lambda
(:nicknames #:lol)
(:use #:cl #:cl-user #:cl-ppcre)
I can use the nickname:
(lol:flatten '((a . b) c (d e)))
=> (A B C D E)
and even import its exports, getting rid of any need to qualify symbols:
(use:package :lol)
(flatten '((a . b) c (d e)))
=> (A B C D E)
Now, I notice that the repo contains a tantalizing test package and directory, "t":
-rw-r--r-- 1 921 Dec 5 05:27 let-over-lambda-test.asd
-rw-r--r-- 1 941 Dec 5 05:27 let-over-lambda.asd
-rw-r--r-- 1 17421 Dec 5 05:27 let-over-lambda.lisp
-rw-r--r-- 1 1771 Dec 5 05:27 package.lisp
drwxr-xr-x 3 102 Dec 5 05:27 t
I haven't been able to figure out how to run the tests, though, and that's my question: how do I do that? Here are some of the things I tried, unsuccessfully, in sbcl 1.3.1:
* (ql:quickload "let-over-lambda-test")
debugger invoked on a QUICKLISP-CLIENT:SYSTEM-NOT-FOUND in thread
#<THREAD "main thread" RUNNING {1002ACC943}>:
System "let-over-lambda-test" not found
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE] Try again
1: [ABORT ] Give up on "let-over-lambda-test"
2: Exit debugger, returning to top level.
((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "let-over-lambda-test")
0]
and this
* (load "./t/let-over-lambda.lisp")
While evaluating the form starting at line 3, column 0
of #P"/Users/bbeckman/Documents/let-over-lambda/./t/let-over-lambda.lisp":
debugger invoked on a SB-KERNEL:SIMPLE-PACKAGE-ERROR in thread
#<THREAD "main thread" RUNNING {1002ACC943}>:
The name "PROVE" does not designate any package.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [RETRY ] Retry EVAL of current toplevel form.
1: [CONTINUE] Ignore error and continue loading file "/Users/bbeckman/Documents/let-over-lambda/./t/let-over-lambda.lisp".
2: [ABORT ] Abort loading file "/Users/bbeckman/Documents/let-over-lambda/./t/let-over-lambda.lisp".
3: Exit debugger, returning to top level.
(SB-INT:%FIND-PACKAGE-OR-LOSE "PROVE")
0]
EDIT: quickloading "prove," as follows, loaded a bunch more cool stuff into my environment, but still left me not knowing how to run the tests. I would have thought that "prove" would be automatically quickloaded as a dependency of the defsystem
in "let-over-lambda-test," so this was a minor surprise:
* (ql:quickload "prove")
To load "prove":
Load 2 ASDF systems:
alexandria cl-ppcre
Install 5 Quicklisp releases:
anaphora cl-ansi-text cl-colors let-plus prove
; Fetching #<URL "http://beta.quicklisp.org/archive/anaphora/2011-06-19/anaphora-0.9.4.tgz">
; 5.02KB
==================================================
5,136 bytes in 0.00 seconds (5015.63KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/let-plus/2013-12-11/let-plus-20131211-git.tgz">
; 10.52KB
==================================================
10,768 bytes in 0.00 seconds (0.00KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/cl-colors/2015-03-02/cl-colors-20150302-git.tgz">
; 14.11KB
==================================================
14,449 bytes in 0.06 seconds (220.47KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/cl-ansi-text/2015-08-04/cl-ansi-text-20150804-git.tgz">
; 5.74KB
==================================================
5,876 bytes in 0.00 seconds (5738.28KB/sec)
; Fetching #<URL "http://beta.quicklisp.org/archive/prove/2015-08-04/prove-20150804-git.tgz">
; 854.08KB
==================================================
874,578 bytes in 3.35 seconds (254.95KB/sec)
; Loading "prove"
[package alexandria.0.dev]........................
..................................................
[package anaphora]................................
[package anaphora-basic]..........................
[package anaphora-symbol].........................
[package let-plus]................................
[package cl-colors]...............................
[package cl-ansi-text]............................
[package prove.output]............................
[package prove.report]............................
[package prove.reporter]..........................
[package prove.asdf]..............................
[package prove.suite].............................
[package prove.test]..............................
[package prove.color].............................
[package prove]...................................
[package prove.reporter.tap]......................
[package prove.reporter.fiveam]...................
[package prove.reporter.list].....................
[package prove.reporter.dot].
("prove")
* (ql:quickload "let-over-lambda-test")
debugger invoked on a QUICKLISP-CLIENT:SYSTEM-NOT-FOUND in thread
#<THREAD "main thread" RUNNING {1002ACC943}>:
System "let-over-lambda-test" not found
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE] Try again
1: [ABORT ] Give up on "let-over-lambda-test"
2: Exit debugger, returning to top level.
((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "let-over-lambda-test")
0] 2
I'd be grateful for any guidance.
The ASDF test-op is defined so evaluating
(asdf:test-system #:let-over-lambda)
should do the trick. You may need to load the let-over-lambda-test system first.