Fork me on GitHub

I believe there is a quote in 'maybe not' from the conj, where Rich Hickey talks about design as separating two ideas that shouldn't be conflated... Anyone remember the exact quote, or can formulate it nicely?


Yep, that one 🙂 I was in a discussion trying to make a point, and didn't have time to re-watch the whole video. Think I got my point across anyway.


There are transcripts for most of Rich Hickey's talks available here:


It is definitely a point he has talked about in more than one of his talks.


I'm not convinced that the example in the talk is an instance of decoupling. The problem with s/keys seems to be that you cannot create nested requirements so you end up having to create intermediate specs for every single combination you need in order to properly spec your functions's input. If you introduce a new abstraction like select to describe your nested requirements then you solve your problem. I don't see why the idea of schema is even required. And I even wonder if it could hurt composability. What if my function requires a map that is composed of two different sets of keys? Let's say my users can have different roles. editor and author for example. I have schemas for these two roles that define editor-specific and author-specific set of keys. If a function requires a user entity that has both roles, what schema do I use? Do I have to create a new schema to represent the union of the roles?

Alex Miller (Clojure team)17:12:54

union the existing ones with s/merge


Isn't selection (vs schema (shape)) only one of many possible things that could be dependent on context?


Just upgraded from clojure 1.8 to 1.10 and discovered that two of my defns had optional keyword args with :or as a vector instead of a map. Thanks spec! (though tbh at first I was like what is the mountain of text and I don’t see how this thing fails the simple-symbol? predicate) :pred clojure.core/simple-symbol?, :val {:keys [graphic? lock?], :or [graphic? false lock? false]} but further down, eventually: :pred clojure.core/map?, :val [graphic? false lock? false],


@alexmiller ok makes sense. But what is the schema for? Can't the select just list the nested keys it needs?

Alex Miller (Clojure team)18:12:08

I don’t know any more than you do about the design at this point

Alex Miller (Clojure team)18:12:39

so I can’t answer any questions that aren’t answered by Rich’s talk


Got it. thanks.


is there somewhere i can go to read up on readers, readables, iostreams, etc?


having a hard time trying to conceptualize writing to anything that’s not just a regular file

Alex Miller (Clojure team)20:12:16

Streams are Java’s byte stream abstraction

Alex Miller (Clojure team)20:12:29

Readers are character based

Alex Miller (Clojure team)20:12:50

So readers can be built from streams

Alex Miller (Clojure team)20:12:09

(Given a particular character encoding)


ah, ok. so if i wanted to write to a file i have the option of working in streams or characters. but what if i wanted to say, hand an http-lib an output stream? i’m not sure the combination of binding [*out ...] or pr vs pr-str to convert a structure into a stream … figured there would be a big blog post somewhere about all of it

Alex Miller (Clojure team)20:12:03

If doing output, you typically want an OutputStream to write values to

Alex Miller (Clojure team)20:12:20

Or a Writer that wraps an OutputStream to write characters


:thumbsup: just enough of what i’m looking for so i don’t keep going in circle with google, thanks


i've always wanted a java for clojure programmers series,book,talk, etc

👍 4

some thin 100 pages would be fantastic, for all the things that eventually end up confusing you because … java

👍 4

What is the best way to use module written deps.edn and clj in lein? I guess deploy this module to clojars, but how to deploy to clojars without lein? In other words I did module using deps.edn, but I want to let developers who use lein use it also.


it is cljs module if it matter


BTW it is really hard to find articles in google, because clj / clojure / deps.edn are too general words to find solutions about new way of developing using clj command. It could be very useful if Clojure community start to use better (more unique) name for this solution.


@alexmiller sorry to point you directly, but you are the one who can appreciate this feedback maybe AFAIK.

Alex Miller (Clojure team)22:12:16

Yeah, sorry I don’t have a solution for that


Sure, I am saying this more to consider it in the future


I mean core Clojure team make trends 😉


@kwladyka tools.deps.alpha is good name for that

👍 4

ok so one way is to use deps-deploy with clj to let developers who use lein add this dependency. Other alternatives?


Hmm potentially make deps.edn which point to module using git commit hash like github-kwladyka/form-validator {:git/url "" :sha "3674d524d9d4019fcc494788e3fc878f6bd794e7"} and use this file with lein.


So I found 2 solutions to make it use with lein. Will it be fine for you as developers to create deps.edn using lein to add dependency like this? What is the standard about it?


I am going sleep now, but I will read your feedback tomorrow. Thank you!


@kwladyka Did you see lein-tools-deps?


not sure, but the question is if community will like to use lein-tools-deps only to use my module. It is not about me 🙂 I have feeling deps.edn is still not known for everybody in practice.


But I can start with it and eventually and module to clojars if I get such feedback


If anybody will like to use my module anyway 😉