tldr: npm install something fast hot reloads data-oriented clojurey goodness
875 karma · joined January 21, 2013
tldr: npm install something fast hot reloads data-oriented clojurey goodness
The polymorphism clojure offers (multimethods here) came in handy for dispatching websocket messages, and for drawing pieces onto the board.
{"signup/username": "John",
"signup/password": "pg4pres"}
Then, because you can pass in a function to get called on the keys, just check for a regex like (.+)/(.+) and turn it into a keyword. Here I'll write a function like that real quick using a repl with a nice ux: https://s3-us-east-2.amazonaws.com/photoblobs/Screen_Recordi...Lots of support
Great interactive workflow (with Emacs, Intellij, or Atom)
Data oriented (Most of your code are pure functions making
simple operations on datastructures)
It adds a ton to Clojure(script), including better error messages (yes!), data-structure shape declarations, generation of data, writing quickcheck (generative) tests for a function by just describing the args and return values of functions, and more.
(def dog #:animal{:name "dog" :number-of-legs 4}) https://github.com/clojurecademy/clojurecademy/blob/master/src/cljs/clojurecademy/course.cljs#L37
Also, seeing a whole lot of calls to set-event-handler really rubs me the wrong way.To the author, are you willing to let someone move this to more cljs (i.e. a big state atom with dispatches and subscriptions)?
Of course I probably wouldn't know if a place passed on me because of that.
I wonder what the probability distribution for how much hirers weight "loyalty" or "stick-around-ness" looks like.
https://s3.us-east-2.amazonaws.com/photoblobs/screencast_201...
I have also used Atom with Parinfer to teach a nontechnical designer the basics of clojure. Enough to build templates using hiccup for her resume, and personal website. I don't think smartparens or paredit would be anywhere near as easy for her to pick up.
If you're used to indentation being meaningful as some langs do, you should probably try out clojure/script with parinfer.
Even though interop is possible and not difficult, I am so much more comfortable using cljs wrappers (there are a lot) or in my part of the world (cljs - land). One reason is that the clojure way (tm) is to use immutable data and pure functions. It bugs me to enact stateful changes.
One way out is to have a datastructure that stores the state of the entire browser (what url am i on, what's in local storage?) and change the datastructure while some unspeakable side effecting function observes and updates either localstorage, or browser history, or etc.
In Clojure 90% of my code is datastructures, manipulating them, and sending them back. Partly because servers tend to be way less stateful than UIs, and partly because it feels like there is more to explore in Clojure without going into java, compared to cljs/js.