Lisp Koans
github.com
github.com
One question: using SBCL I can run the script with sbcl --script contemplate.lisp but how do I load the koans into the repl in a way that has all the helper/test functions available? If I just (load "test-framework.lisp") or do sbcl --load contemplate.lisp, I get a bunch of warnings and things like (assert-equal t t) throw "undefined function". It's mentioned in the original PR that this "should" be possible now but I didn't see it in the README.
One thing I'm very not familiar with yet is the quicklisp/abcl and packaging system so this is probably very obvious. Thanks!
edited with suggestion to call use-package I'm not very familiar with the lisp packaging stuff yet.
Here's what I was trying to do:
* (load "test-framework.lisp")
T
* (use-package :lisp-koans.test)
T
* (assert-equal t t)
debugger invoked on a UNBOUND-VARIABLE in thread
#<THREAD "main thread" RUNNING {1001570143}>:
The variable LISP-KOANS.TEST::*KOAN-ASSERT-LIST* is unbound.
Aha it looks like it's part of the code that is testing for blanks in the original form. (if (form-contains-blanks-p form)
(push :incomplete *koan-assert-list*)
That seems like it's fixable, maybe I will open a bug for that. I don't think it expects to run outside of the run-koan function. That's fine, I'll stop there until I know enough to fix it haha.Also thanks for answering my noob questions! I just realized you also wrote the Common Lisp Condition System which is on my TO-READ list (after I do about 100 hours of lisp refresher stuff lol).
(use-package :lisp-koans.test) and you should be good to go.
## Edit
Years ago when I was confronted with a new technology that caught my interest, I‘d ask myself: Is it in use? Is it wide-spread? Is it used by companies in commercial situations?
My questions have changed. Now I tend to apply questions like: Does the hacker in me get excited? Does this technology help me solve problems? Does it make my life easier?
If you're trying to build something many people should be able to build upon, you as a developer should be easily replaceable and you want to have a high hiring pool with mid-level developers (like how the typical startup thinks), then your first questions are more appropriate.
But if you're looking to build something for fun, to scratch your own itch or trying to do something more innovative than a CRUD app, then perhaps your latter questions are more appropriate.
https://github.com/ashok-khanna/common-lisp-by-example
(Disclaimer: I’m the compiler of this guide)
The various textbooks on lisp are great and this wasn’t aimed to replace them, but just guide the reader through the initial phase where they may be overwhelmed.
Good luck and I hope to see you as a pro lisp programmer in a few months!
It's still rough and doesn't include @phoe-krk's latest changes (forked 1.5yrs ago), but I found it super useful for learning lisp.
It feels much more like a puzzle, the hints can be more cryptic and requires me to be more bought in than an introductory podcast or an online set of lessons.
I'd love to see this format applied to other topics and fields, although none will likely lend themselves to the format as natively as programming languages will.
Knight, seeing what the student was doing, spoke sternly: "You cannot fix a machine by just power-cycling it with no understanding of what is going wrong."
Knight turned the machine off and on.
The machine worked.
---------------
Always beautiful to read those.
Might be worth to update them if anyone finds the time for that!
Like you said, elisp-koans was forked from lisp-koans awhile back. Bringing over the additional coverage you added will be a great improvement!
I love the addition of the `koans-solved` directory. I was using a separate branch, but that was a pain to keep in sync with master. Will definitely bring that over :)