@camdez

61 Followers
205 Following
74 Posts
Founder and CEO at CollBox. Emacs, Clojure, &c.—tea enthusiast, erstwhile vagabond, libertine, & over-thinker.
bloghttps://camdez.com
githubhttps://github.com/camdez
@nina_kali_nina Holy. Cow. I can’t handle a blinking cursor at my terminal, so this is just… 

@aartaka @muhanga Weird string keys are definitely annoying… once you’ve gone down the keyword route, you sure wish everyone else had too.

The destructuring syntax honestly doesn’t bother me anymore (after years of using it, to be fair), though it does get hard to read with a lot of nesting, and I occasionally battle with myself about how I want to indent it (being a person who usually likes to align keys across lines).

@muhanga @aartaka I'd guess another factor in the design decision is the special keys like :as, :keys, :or, etc. which are somewhat analogous to keyword arguments, and thus would naturally live to the left of their values.

If keys to be destructured also went on the left then you could get collisions with those names.

@muhanga @aartaka Presumably referring to this:

(let [{resp-body :body} {:status 200 :body "Hello World"}]
resp-body) ; => "Hello World"

I imagine it feels odd because the (binding) key / val are reversed from the data being bound. (`[{a :a} {:a 1}]`).

Not entirely obvious to me that that *couldn't* have been done in the other order. OTOH, it does feel natural to keep the bound names to the left in a binding form.

Fixed Order Sorting in Clojure

Here’s another tidy bit of Clojure that makes me happy… Of course it’s easy to sort items in the natural order: (sort [1 3 4 2]) ; => (1 2 3 4) Or via a mapping to elements that sort in a natural order: (sort-by count ["xx" "xxx" "x"]) ; => ("x" "xx" "xxx") But how do we sort in a user-defined, fixed order?

camdez
Apologies for the slightly redundant post; this is a blog post with a touch of background. Discussion on Reddit if you have feedback or questions: https://www.reddit.com/r/Clojure/comments/1k4nqor/the_duality_of_transducers_clojures_transducers/
I finally re-recorded and published my intro to Clojure's transducers talk that I gave last year. Check it out if you're a Clojure user who's not yet using transducers. It includes the insight that made me start using transducers every day: https://www.youtube.com/watch?v=ACwJNGxo3o4
The Duality of Transducers — Clojure's Transducers from Scratch

YouTube

Redbox.HAL.Configuration
.ConfigurationFileService implements IConfigurationFileService

STOP MAKING SERVICES AND FACTORIES AND INTERFACES AND JUST READ THE FUCKING JSON FILE YOU ENTERPRISE FUCKERS