or learn more

clojure.spec: Data Design 01 – Sketching a Struct

Feb 10, 2017

With the growing focus on functional programming the importance of data design has been thrust to the forefront. That said, you wouldn’t know that the importance was widely agreed upon based on an observation of existing data-driven APIs. Certainly I’ve committed my share of sins in the name of “API data packets,” but with the […]

Read-Eval-Print-λove v004 – Production Rules has landed!

Jan 27, 2017 some comments

It’s been a long time coming, but I’ve finally put the finishing touches on the latest installment of my Read-Eval-Print-λove zine, this time focusing on production rules. This installment will deal with production rules, their purpose and implementation as well as an exploration into rules-driven OOP, data, and extracting ourselves from the Tarpit. Plus, I […]

clojure.spec: Introduction

Jan 10, 2017 some comments

If you’ve looked into the relatively new Clojure library clojure.spec you might have come across something curious. Observe the use of core.spec/or: (require ‘[clojure.spec :as s]) (s/def ::num (s/or :float float? :int int? :ratio ratio?)) (s/conform (s/coll-of ::num) [0.25 1/2 1]) ;;=> [[:float 0.25] [:ratio 1/2] [:int 1]] The result of the call to s/conform […]