Fork me on GitHub
#clojure
<
2022-07-03
>
pinkfrog13:07:41

Just saw with-bindings , what’s the use of that compare to binding ?

thheller13:07:59

it is more dynamic. you can just supply a map with bindings, it doesn't have to be fixed like the binding vector

pinkfrog13:07:37

That’s what the doc says, but feeling like normally people only use binding. Haven’t seen a scenario of with-bindings.

thheller13:07:33

well, for most cases you use binding yes. sometimes you just need something more dynamic. pretty sure nrepl uses with-binding in some place

quadron18:07:48

is there a spec for data representation of specs?!

quadron18:07:58

will there ever be an algebra of specs?

danielcompton21:07:02

I’m wanting to benchmark namespace compile time. I seem to remember there being a way to get per-namespace compile times logged but can’t remember if that was stock or with a forked compiler. Does anyone have any tips? I’m thinking I might need to fork the compiler to add some timing statements.

Alex Miller (Clojure team)21:07:53

You would need to modify the compiler for that. I've done so in the past, not sure I could lay hands on it though without some hunting

danielcompton21:07:44

No worries, I can figure it out 🙂

dpsutton22:07:15

There's the :verbose option to require that you might be thinking of

danielcompton22:07:45

Ah yeah that is handy too thanks

respatialized22:07:42

https://clojuredocs.org/clojure.core/compile Would calling this from a REPL suffice? It seems like it would not be super granular and only offer timing about the ns as a whole. A REPL context may presume too much is already loaded, as well, so I'm not sure how that will affect compilation times if you want a representation of 'cold start' compilation.