7 ms·
Lisp Koans
- submeta 6y agoJust started learning Emacs Lisp. Common Lisp is on my todo list. Glancing through these tasks, I realize I have a lot to learn before I can call myself proficient. But I am very eager. Started reading Guy Steele and Touretzky. Love the concepts, the simplicity, homoiconicity, Lisp macros, and the fact that it is time tested. ## 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?
- capableweb 6y agoAbout the questions that has changed over time. I see them as questions that depend on the context rather than experience and/or time. 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.
- abhinav22 6y agoTry this guide - it’s quite a good and concise introduction and will get you coding quickly. It can be read alongside a textbook: https://github.com/ashok-khanna/common-lisp-by-example https://github.com/ashok-khanna/common-lisp-by-example (Disclaimer: I’m the compiler of this guide)
- dunefox 6y agoLooks good, thanks. Will you include more topics that are missing now?
- abhinav22 6y agoNah, it was a conscious choice to limit the amount of material in the guide as not to overwhelm the beginner. 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.
- monroewalker 6y agoAwesome guide :). I've been meaning to learn the basics of LISP since trying out Emacs and this was finally an easy enough introduction to it that I've read a fair amount. Thanks for this!
- abhinav22 6y agoYour welcome :) I was (am) in the exact same shoes as you, so I wrote notes along the way , hence us beginners “get” it ;) Good luck and I hope to see you as a pro lisp programmer in a few months!
- Kelamir 6y agoI love the guide. Thank you very much, abhinav22.
- abhinav22 6y agoYou are most welcome Kelamir :)
- jtmoulia 6y agoI ported lisp-koans to elisp https://github.com/jtmoulia/elisp-koans https://github.com/jtmoulia/elisp-koans 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.
- phoe-krk 6y agoIf you've seen the Lisp Koans in the past, you might want to revisit them someday. Around half a year ago I've rewritten[0] the original set of koans, fixed multiple correctness issues, added some content, and cleaned up the test framework; they now look much better than the original version. [0] https://github.com/google/lisp-koans/pull/111 https://github.com/google/lisp-koans/pull/111
- zdragnar 6y agoThank you!
- phoe-krk 6y agoMy pleasure, hope they serve you well.
- owyn 6y agoCool, I started doing these a couple of years ago, nice to have an updated version. I haven't done lisp in a long time but I'm trying to get back into CL. 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!
- phoe-krk 6y agoHmmm. Koans in the original form will warn because they are incomplete, so loading them altogether is going to not work very well. I don't think that the current version of koans is very well-suited for interactive development; please feel free to open an issue for that and perhaps it will get done someday.
- Zhyl 6y agoI really like the koans format of language learning. I find they pique and sustain my interest more than rote tutorials or trying to glean purpose, feel and function of languages. 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.
- vilhelm_s 6y agoI thought this would be http://hackersdictionary.com/html/Some-AI-Koans.html http://hackersdictionary.com/html/Some-AI-Koans.html .
- phoe-krk 6y agoA novice was trying to fix a broken Lisp machine by turning the power off and on. 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.
- pmoriarty 6y agoAre these available for Emacs Lisp?
- phoe-krk 6y agoSeems like https://github.com/jtmoulia/elisp-koans https://github.com/jtmoulia/elisp-koans is available, but it was forked before my changes and therefore does not seem to include them. Might be worth to update them if anyone finds the time for that!
- jtmoulia 6y agoAwesome to see such a comprehensive update to the lisp koans. much thanks! 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 :)
- markc 6y agoClojure Koans: http://www.clojurekoans.com/ http://www.clojurekoans.com/
- dimitar 6y agoThese are pretty easy compared to 4clojure, so they are perhaps the best for beginners.
- aewens 6y agoIs there a particular reason that Google has this as one of their repos? I don’t recall them being heavy on using Lisp.
- Jtsummers 6y agoThey bought ITA who were big CL users.
- dodobirdlord 6y agoGoogle’s standard employment contract gives it default ownership of basically any software produced by an employee if it has anything to do with the employee’s job or Google’s business, which means basically everything. But it’s also very easy for an employee at Google to open-source software. The consequence of this is that frequently when a Google employee has a side project that they want to share with the world it will end up released as a Google open-source project under a permissive license.
- reikonomusha 6y agoI think that it’s also that Google employs Common Lisp programmers and maintains Common Lisp code.