5 ms·
Lisp Koans by Google
- paines 13y agoWhat is a Koan ?!?!
- coolsunglasses 13y agohttp://en.wikipedia.org/wiki/Koan http://en.wikipedia.org/wiki/Koan http://en.wikipedia.org/wiki/Hacker_koan http://en.wikipedia.org/wiki/Hacker_koan http://www.catb.org/~esr/writings/unix-koans/ http://www.catb.org/~esr/writings/unix-koans/ http://catb.org/jargon/html/koans.html http://catb.org/jargon/html/koans.html http://c2.com/cgi/wiki?TestDrivenDevelopment http://c2.com/cgi/wiki?TestDrivenDevelopment http://rubykoans.com/ http://rubykoans.com/ https://github.com/google/lisp-koans/blob/master/README https://github.com/google/lisp-koans/blob/master/README
- PurplePanda 13y ago(many) examples: http://www.reddit.com/r/Koans/ http://www.reddit.com/r/Koans/
- nuttendorfer 13y agoAs someone eyeing SICP with previous programming experience should I do SICP first and then do these koans? How big is the difference between Scheme and Common Lisp?
- coolsunglasses 13y agoBig enough that you might get confused in subtle and obvious ways.
- piokoch 13y agoI would go with "How to design programs" - looks at the beginning to be siplistic, but it gives a lot of understanding about lisp like languages. Then I would go with SCIP and then Koans. I am treating lisps as a kind of mind game (I dont like crosswords :) so I do Lisp) since I cannot use it for everyday job so from my point of view Scheme and Lisp are not very different. There is different approach to things like mutable state and other more advanced concepts, but basics are the same. If you want to have at least an illusion of learning Lisp that can catch up one day, learn Clojure. Or go with Scheme's ugly duckling son - JavaScript. :)
- samrat 13y agoA course (lightly)based on HtDP is also starting in Coursera in a few days- https://www.coursera.org/course/programdesign https://www.coursera.org/course/programdesign. It uses Racket and the first two weeks of videos are already up so you can preview them.
- brudgers 13y agoI love Lisp->crosswords idea. SICP [2nd edition] is flat out just a more readable book than HtDP [first print edition, second edition is not in print but looks to be significantly improved]. As textbooks, it may be a bit of a different story, the tone of SICP is certainly cockier. There's less acknowledgement that mathematics is just domain knowledge within the context of an introductory "computer science" course. Then again, HtDP had two decades of experience with SICP upon which to draw. It also has the practical advantage of assuming that students had high levels of access to computers capable of running Lisp. That wasn't the case in the late 1970's and early 80's (or even the late 80's and mid 90's).
- gosub 13y agoWhile CL and scheme are both lisp dialects, they are quite different. Just to make a pair of examples, CL has two separate namespaces for variables and functions, scheme only one; scheme has guaranteed tail call optimization (which is used often to solve problems recursively), CL depends on implementations. To do these koans I would first go through Practical Common Lisp by Seibel http://www.gigamonkeys.com/book/ http://www.gigamonkeys.com/book/
- brudgers 13y agoThe optimization of tail-call optimization is converting some recursive procedure descriptions into iterative processes. A recursive procedure description may instead describe a necessarily recursive process. The difference between descriptions and the procedures they produce is one of the issues covered in SICP - most explicitly by Ableson in one of the videos.
- glurgh 13y agoIf you're already a programmer, you should probably read Paul Graham's On Lisp. It's a technical book, written by an advocate but before he became a VC or took up writing on woolly topics like the relationship of programming to painting.
- muuh-gnu 13y agoYou dont do SICP to "learn Lisp", you do SICP to learn fundamental programming principles. SICP just happens to use Scheme because one of the authors of SICP was also one of the authors of Scheme. The difference between Scheme and Lisp is big enough to justify them having different names and Scheme not being "just another dialect of Lisp". The problem with Scheme is not the language, the problem is that the ecosystem is so hopelessly balkanized, that it is useless for practical purposes and nobody uses it for anything interesting except for teaching of SICP. You have tiny standards covering only base language constructs, and everything else is left to implementations of which 1001 different one exists and each implements the same stuff in a different, incompatible way, so there is no code portability. So an large number of Scheme users, instead of developing interesting and useful _new_ libraries, instead rewrite 1001 different implementations and 1001 different manuals covering the same area. If you write something and tell me you wrote it in Scheme, the first thing I'd have to ask is "Which one?" because your code will not run on the 1000 remaining ones. The scheme ecosystem is the prime example of code non-reuse, of the NIH syndrome and waste of man-decades of effort, so while the language itself is nice for teaching, the existing worst-practices are examples of what _not_ to do.
- abecedarius 13y agoSICP doesn't 'just happen' to use Scheme; the simple language from a well-chosen combination of powerful mechanisms is the kind of thing they're teaching you to design. The medium is part of the message. (Yes, you can solve the problems using another language; I used XLisp.) On 'dialects of Lisp': it used to be standard for very different Lisp-family languages to be called that, while nowadays someone will always contradict you if you do. It seems more of a social change than a technical one to me. (I first noticed it among Common Lispers after the AI winter.) I know someone impressive doing real work with Scheme (though I recommended they try Lua). I don't know whether you're right about the Scheme ecosystem, as I've been elsewhere the last 15 years.
- derengel 13y agoMaybe Racket is closing this gap.
- meemo 13y agohow would you get started with clisp instead of sbcl?
- clkoans 13y agoThe lisp koans should execute on any common lisp implementation modulo the threads koan group. If you modify the file ".koans" https://github.com/google/lisp-koans/blob/master/.koans https://github.com/google/lisp-koans/blob/master/.koans to remove the last entry ":threads" it should work.
- IvyMike 13y agoThis is mildly interesting coming out of google because I thought lisp wasn't a google-approved language. (Yes, there are other projects on github in non-approved languages, but they appear mostly to allow 3rd party interop with google services. The educational nature of this project puts it in a slightly different category.)
- muuh-gnu 13y agoLisp became a "language internally used by Google" when Google purchased ITA with a Lisp code-base so large and Lisp-only staff so large, that it is unlikely that it will ever be rewritten or that the staff will be retrained to use Java.
- gohrt 13y agoITA had a small staff, and was not Lisp-only. They were hiring people to do Java work >5 years ago.
- DannyBee 13y agoTo be clear: This is a random googler's open source project, not anything official from Google. The only reason it's part of the Google org is so that they didn't have to pay for a private project for staging. Normally, in situations like this, they are supposed to have a disclaimer in the README that points out it's not official google anything (to avoid exactly the confusion that seems to have occurred here).
- gohrt 13y agoThe source code says "Copyright 2013 Google"...?
- packetslave 13y agoBy default, Google holds the copyright to open-source projects released by Googlers. There's a review process for transferring copyright to the individual, but you don't have to go through it just to release something. edit: See previous comments from DannyBee and cdibona here: https://news.ycombinator.com/item?id=4051325 https://news.ycombinator.com/item?id=4051325
- alecdbrooks 13y agoOther functional language koans: * https://github.com/functional-koans/clojure-koans https://github.com/functional-koans/clojure-koans * https://github.com/HaskVan/HaskellKoans https://github.com/HaskVan/HaskellKoans * https://github.com/rubbish/scala-koans https://github.com/rubbish/scala-koans Other interpreted language koans: * https://github.com/bittersweetryan/ColdFusion-Koans https://github.com/bittersweetryan/ColdFusion-Koans * https://github.com/matyb/java-koans https://github.com/matyb/java-koans * https://github.com/liammclennan/JavaScript-Koans https://github.com/liammclennan/JavaScript-Koans * https://github.com/midpeter444/mybatis-koans https://github.com/midpeter444/mybatis-koans (In Java, but for the library MyBatis 3) * https://github.com/kikito/lua_missions https://github.com/kikito/lua_missions * https://github.com/forcedotcom/PerlKoans https://github.com/forcedotcom/PerlKoans * https://github.com/TorontoPHPSoftwareCraftsmanship/PHPUnit-Koans https://github.com/TorontoPHPSoftwareCraftsmanship/PHPUnit-K... * https://github.com/gregmalcolm/python_koans https://github.com/gregmalcolm/python_koans * https://github.com/DASpringate/Rkoans https://github.com/DASpringate/Rkoans * https://github.com/neo/ruby_koans https://github.com/neo/ruby_koans * https://github.com/brysztofor/koans https://github.com/brysztofor/koans (Ruby on Rails koans) Other language koans: * https://github.com/marcinbunsch/bash_koans https://github.com/marcinbunsch/bash_koans * https://github.com/paytonrules/PointerKoan https://github.com/paytonrules/PointerKoan (C pointers) * https://github.com/CoryFoy/DotNetKoans https://github.com/CoryFoy/DotNetKoans * https://github.com/torbjoernk/CppKoans https://github.com/torbjoernk/CppKoans * https://github.com/liammclennan/coffeescript-koans https://github.com/liammclennan/coffeescript-koans * https://github.com/patrickgombert/erlang-koans https://github.com/patrickgombert/erlang-koans * https://github.com/VictorDenisov/go_koans https://github.com/VictorDenisov/go_koans * https://github.com/cdarwin/go-koans https://github.com/cdarwin/go-koans * https://github.com/cjudd/groovy_koans https://github.com/cjudd/groovy_koans * https://github.com/joecannatti/Objective-C-Koans https://github.com/joecannatti/Objective-C-Koans Other programming or technical koans: * http://stevelosh.com/blog/2013/04/git-koans/ http://stevelosh.com/blog/2013/04/git-koans/ * https://github.com/chicagoruby/MongoDB_Koans https://github.com/chicagoruby/MongoDB_Koans * http://blog.sanctum.geek.nz/vim-koans/ http://blog.sanctum.geek.nz/vim-koans/ (For any aspiring koan writers, Arc, Rust, and Scheme lack koans. And PHP's and R's are pretty sparse.)
- felixgallo 13y ago
- Rickasaurus 13y agoF# Koans https://github.com/ChrisMarinos/FSharpKoans https://github.com/ChrisMarinos/FSharpKoans
- aidenn0 13y agoAnyone know why the author chose .lsp for the extension? I've not seen that on any system that allows longer extensions.
- lesterbuck 13y ago>In test-driven development the mantra has always been, red, green, refactor. Write a failing test and run it (red), make the test pass (green), then refactor it (that is look at the code and see if you can make it any better. In this case you will need to run the koan and see it fail (red), make the test pass (green), then take a moment and reflect upon the test to see what it is teaching you and improve the code to better communicate its intent (refactor). While the above was quoted from the Ruby koans, I would have thought a Lisp author would have corrected the unbalanced parentheses. Am I unusual in finding unbalanced parentheses in English text very distracting? It must be something like my borderline OCD.
- clkoans 13y agoHeh. Fixed.