6 ms·
ClojureScript Koans: Learn ClojureScript from inside your browser
- michaelsbradley 13y agoVery nice! Would like to see it feature a ToC so one can easily move between the koan categories.
- lazerwalker 13y agoThanks! (Creator here.) 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.
- eaurouge 13y agoI'm working thru it in order. I didn't feel the need to jump around, but it would be nice to know how much longer I have to go, i.e. how many more screens.
- deleted 13y ago[deleted]
- deleted 13y ago[deleted]
- terhechte 13y agoThis goes from easy/novice up to advanced level in a short amount of time. I did some koans until I arrived at functions/9 which is: (= 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.
- DoggettCK 13y ago(fn [f] (f 5)) 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.
- scottdw 13y agoOr the threading macro #(-> 5 %)
- chrismonsanto 13y agoOr (fn [f] 25)
- danneu 13y ago(constantly 25)
- berdario 13y agoalso #(% 5)
- vdm 13y agoSpoiler: #(%1 5)
- MBlume 13y agoThis was exactly the koan that I felt had the biggest discontinuity, and yeah, having the previous ones visible might help.
- dizzystar 13y agoI have to say that this one came out of left field. Would have been much better at the end. Also, not sure what happened here: http://clojurescriptkoans.com/#runtime-polymorphism/4 http://clojurescriptkoans.com/#runtime-polymorphism/4 I guess it ends here?
- resu_nimda 13y agoI like this, but it seems too cryptic for a true novice to actually learn from, especially if they've never been exposed to Lisp syntax. Who is the intended audience? 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.
- lazerwalker 13y agoCreator here. 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.
- mbubb 13y agoReally fun! Reminds me of "little Schemer"* in the sense that there are no 'instructions' so you are encouraged to try various things out. In my opinion this way of doing it is good. It works for me. * http://mitpress.mit.edu/books/little-schemer http://mitpress.mit.edu/books/little-schemer
- icefox 13y agoIt would be very nice if each koan had docs included underneath (maybe hidden by a hint link?) talking about what the koan was trying to teach you. If you can do every single one it isn't that much fun, but if you can't do every single one then you need to go off and learn something and it would be really good to help nudge the user along to where they can learn more. Alternatively to a help box having the displayed code provide links to the appropriate clojure docs would be another route.
- krcz 13y ago#5 in sequence comprehensions part doesn't seem to work for me. I've checked my solution in console clojure interpreter and it evaluates to true there.
- TallboyOne 13y agoLots more Koans: http://pineapple.io/tags/koans http://pineapple.io/tags/koans
- koanita 13y agoI was playing with this, but is a little long and I wanted to know if the end is near, so add a percentage bar also it would be useful to have an index of topics.
- graue 13y agoAwesome site! 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.
- taivare 13y agoAnki, has Clojure flash-cards.
- MBlume 13y agoThere are some good criticisms here about some of the discontinuities in difficulty, but first and foremost I really want to congratulate OP for doing something to address the instant gratification problem in learning to program. You can open this site in your browser and immediately start interacting with code rather than trying to get your java environment/editor/etc. set up, and that's fantastic, we really need more tools like this.
- agentultra 13y agoInteresting... I would second adding some hints after n failed attempts. You could just expect the user to go off to google but it'd be a nice touch to get a small hint in-place.
- blossoms 13y agohttp://clojurescriptkoans.com/#higher-order-functions/10 http://clojurescriptkoans.com/#higher-order-functions/10 got me good. Why is it one needs to use `(count a) (count b)` instead of just `a b` like worked when comparing string lengths in a previous ClojureScript Koan?
- jamii 13y agoThe `<` function only works on numbers but, unlike java, it will correctly coerce numbers with different representations. (< 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"
- __float 13y agoThis reminds me of http://4clojure.com http://4clojure.com with a simpler [nicer?] (but less featureful) UI. 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.
- agumonkey 13y agoIndeed. I like the non visible UI. Almost Brett Victorian.
- tonetheman 13y agoReally interesting way to learn. I made it into vectors and then got completely stuck on subslice. Maybe a hint text or something or a way to skip it or get the answer if I have not got it after a few tries. I might be typical but once I hit that screen and could not go further I closed it. Still really good work!
- deleted 13y ago[deleted]
- nemo1618 13y agoI chuckled when I realized you could just copy and paste the expression and it will pass the equality test. Obviously you don't learn anything this way, but I'll admit I used it once or twice when I got stumped.
- deleted 13y ago[deleted]
- gotofritz 13y agoNice, but needs help / clues