ClojureScript Koans: Learn ClojureScript from inside your browser
clojurescriptkoans.com
clojurescriptkoans.com
I see that it's something of a port of the Clojure Koans, has there been much feedback on that as to whether people are able to truly learn the language this way? I'm intrigued by new methods of instruction, but this seems like it would be a very frustrating trial-and-error game to a beginner, as there is virtually zero actual teaching. We're supposed to be making programming more accessible, not less. It seems like this kind of thing ends up as a fun toy/experiment for people who already know most of it.
It is very nice though.
You're totally right it's not a good way to learn the language in isolation. A little context: this is the first project I've built in any Lisp, so learning Clojure/ClojureScript from scratch is still very fresh in my mind.
When I worked through the original Clojure Koans, I had a REPL open and made judicious use of online resources to figure out each answer. As an experienced programmer who was brand new to Lisp, treating the koans as a sort of 'open-book exam' was very effective for me. Perhaps explicitly suggesting that workflow on the home page would be a simple but worthwhile addition.
In my opinion this way of doing it is good. It works for me.
Well, I am definitely learning from this. I always wanted to explore Clojure/ClojureScript and I read first chapter of SICP so I understand Lispy syntax, but I never followed through.
I love how this website doesn't try to appeal to novices, because I'm always frustrated reading beginner guide to languages, because they're easy too slow- or too fast-paced. This one strikes a nice balance, without being too pedagogical. It lets me make guesses. I like this approach a lot.
Background: Experienced functional, OOP, web dev. Know enough elisp to get by.
TY @lazerwalker
(= 25 ( ___ (fn [n] (* n n))))
I found this one to be not so trivial, granted I'm still a novice clojure user, but I still think that it went up rather steeply here.
I think if they really want to introduce new people to ClojureScript, then the koans need a friendly help system and the ability to show the solution and have it explained to you.
It should also have a short introduction in Lisp that explains prefix notation / s-expressions. I think that would make things a lot easier.
I do love the format, but what I like a bit better about Clojure Koans is that you can see the previous ones for a bit of a reminder.
Maybe for each section, they could leave up the ones you'd successfully completed so you could refer to them.
Other than that minor nitpick, I love this.
(constantly 25)Also, not sure what happened here: http://clojurescriptkoans.com/#runtime-polymorphism/4
I guess it ends here?
Would like to see it feature a ToC so one can easily move between the koan categories.
I came this close to delaying the site launch so I could build in a table of contents, but figured it wasn't 100% essential to shipping. Given the great response I've gotten to the koans, I'll probably add one in very soon.
I want to add a slightly off-topic remark, but 4clojure actually runs the tests in a sandbox on the server. This is compiling to ClojureScript, and I have to wonder if it's "good enough" or whether down the line some koans might run into problems being ClojureScript instead of the real Clojure on the JVM.
(< 1 ;; Long
1.5 ;; Double
2N ;; BigInt
)
If you want java-style comparisons use `compare` instead.EDIT: Ooops, this is cljs, not clojure. The correct answer is that string comparison is lexicographic in js:
"is" < "length" < "word"Having done a few Clojure projects lately, I got most of these right immediately, but there were a few I messed up. It would be cool if you could go through these flashcard-style: one try for each koan in a category, then re-show the ones you got wrong, and repeat until you get them all right.
I might be typical but once I hit that screen and could not go further I closed it.
Still really good work!