yes
is a program that prints y
over and over, meant to be piped into the input of programs requiring confirmation.
Our task is to write a program in Common Lisp that prints YES
in a similar manner.
Usage
yesyes
(loop (write-line "YES")(write-line "Y")(write-line "y")(write-line "yes"))
Thats nice for the interpreter, but how do we make this an executable?
a Compiler for Common Lisp
brew install buildapp
buildapp \
--eval '(defun main (argv) (declare (ignore argv)) (loop (write-line "YES")(write-line "Y")(write-line "y")(write-line "yes")))' \
--entry main \
--output yesyes