Don’t have to stray from the right path after all
So something interesting happened while I started warming up :D.
This came out: https://github.com/dparis/phzr
So yeah, no javascript for meeeeee.
It’s crazy because while warming up I was actually pulling my hair out trying to get back into a js thinking mode. I’ve been worshipping learning Clojure for the past 6 months now, so I’ve come to expect a few things from a language which aren’t exactly there in JS.
For example, I started trying to implement a feature I’d thought of, using sets. Yeah… for those who don’t know, well, implementing sets in javascript is a bit shady. I’m sure there’s third party libraries somewhere but the basic advice I found was:
var mySet = {‘a’ : true, ‘b’ : true};
if (‘a’ in mySet) {something}; etc etc…. sure, that’s not too bad but… this isn’t a set, I don’t have native support for unions and stuff.
yeaaaaaah nooooooo…
(def mySet #{:a :b}) => #’user/mySet
(mySet :a) => returns :a – and all the clojure.set functions come with it. union and intersections, etc, etc
Also, this allows me to develop using a repl, just having my changes instantly appear in my game without even having to refresh my browser.
Anyways. I’m even more motivated now 😀