HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
jeaye
orchestra
Clojure2017–2020
jeaye / orchestra

orchestra

Complete instrumentation for clojure.spec

4Distinct people
6Mentions
0Explicit recommenders
625GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Complete instrumentation for clojure.spec

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year6 dated mentions

Observed mentions: 2017-03-30 18:31:55 UTC to 2020-09-10 17:47:29 UTC.

0122017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2020

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC211
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC202
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC202

What Hacker News says

6 sources
I strongly recommend that anyone using spec for validation should check out Orchestra, to instrument the functions and have them automatically validated on each and every call: https://github.com/jeaye/orchestra For my team, generators and parsing are basically useless with spec. We just don't use them. But describing the shape of data and instrumenting our functions, using defn-spec, to ensure that the data is correct as it flows through the system is exactly what we want and nothing I've seen in Clojure land does it like spec + Orchestra can. I think part of this may boil down to different types of testing. We primarily use functional testing, especially for our back-end, so we're starting from HTTP and hitting each endpoint as the client would. Then we ensure that the response is correct and any effects we wanted to happen did happen.
Read the rest
This is much closer to running production code, but we do it with full instrumentation. Being able to see an error describing exactly how the data is malformed, which function was called, and what the callstack was is such a relief in Clojure. Call to #'com.okletsplay.back-end.challenge.lol.util/provider-url did not conform to spec. -- Spec failed -------------------- Function arguments (nil) ^^^ should satisfy (-> com.okletsplay.common.transit.game.lol/region->info keys set) -- Relevant specs ------- :com.okletsplay.common.transit.game.lol/region: (clojure.core/-> com.okletsplay.common.transit.game.lol/region->info clojure.core/keys clojure.core/set) ------------------------- Detected 1 error
In What Clojure Spec is and what you can do with it
> I wondered why there’s a reduce in clojure.core but no fold? (It’s just a different arity of reduce that’s missing the initial state.) There is literally an arity of reduce which skips the initial state. Check out `(doc reduce)`. > No tuple type? Vectors are tuples. “What if one of the vectors is of a different length?” I gasped as I clutched my pearl monads. `s/tuple` is the answer to that question. > This ties into another concept that was new to me: applying a sequence of arguments to a function. You're not applying the sequence to the fn. This is "function application", so you're applying the fn to the sequence. In Clojure, you have some data, you apply a fn to it, then you have some transformed data. Rinse and repeat. Also, check out `(doc apply)`. > I’ve read/heard the Clojure designers encourage the use of namespaced keywords, bu
Read the rest
t I rarely encounter them outside clojure.spec definitions. As other people have done in the comments here, I make a case for namespace keywords here [1]. > I can’t talk about data in Clojure without talking about clojure.spec! Please be sure to check out Clojure spec's instrumentation, along with Orchestra [2] to further improve the experience. My team uses `defn-spec` for basically every fn in both our front-end and back-end code; all of the data is spec'd, with shared specs between front-end and back-end, and we get full instrumentation during development and testing. Thanks to macros, that can disappear completely in production. 1: https://blog.jeaye.com/2017/10/31/clojure-keywords/ 2: https://github.com/jeaye/orchestra
In A Year in Clojure
Yes, in my experience it does. In my projects I fdef all my functions and then turn on instrumentation (with the Orchestra[0] library, so that it also checks :ret specs). It helped me find several instances where I was incorrectly assuming that I would never get nil as an input. Couple it with Expound[1] to make reading the spec errors a bit easier, and you've got a much better story for handling nil in Clojure. [0]https://github.com/jeaye/orchestra [1]https://github.com/bhb/expound
In Robust Clojure: The best way to handle nil

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.