Fork me on GitHub

how are you running your tests?

hiredman00:02:45 for example calls shutdown-agents! already


I am using this library, but I experienced test suites that failed to exit not too long ago and adding an explicit call to shutdown-agents! in my own test fixture seemed to fix it. perhaps that was a coincidence?


yes, you also may have just broken your test suite generally


clojure.test doesn't have global test fixtures, just per testing namespace fixtures, so adding shutdown-agents! there will break things for any tests run after that


I guess I just lucked out in that the suite that has that fixture happens to consistently run last


and/or none of the other tests depend upon namespaces that use/require agents for the capabilities being tested


sure enough, a local run with the shutdown-agents fixture commented out is hanging at the moment - if I'm relying on a fixture to prevent this from happening it sounds like I need to do some more work to track down the actual problem


@hiredman based on my read of the source, it seems like shutdown-agents will only get called if an exception is raised, which means that something like my fixture may still be necessary:


but System/exit is called if no exception happens


the real culprit was my own fault, a misplaced send "stop" call to an agent already in a "terminated" state that blocked the shutdown hook I had added to the runtime shutdown-agents had the appearance of fixing it because it terminated the agent before that send call.


What % of the Clojure community is constituted by Clojurescript?


According to last year's State of Clojure survey, almost 62% of Clojure developers use Clojurescript


Hi, what is your preferred solution for implementing sliding window with transducers? I hoped that this: will be one of 1.11 updates 😶


It does, would you recommend it? I was discouraged by the last commit date so I created my own implementation but I will switch if that library is frequently used.

Alex Miller (Clojure team)16:02:53

stuff that works doesn't need commits :)

Noah Bogart16:02:02

Generally, last commit date isn't a good indicator of “good library” given how stable clojure is

💯 1

Of course not. But there are some issues and no updates so i wanted to be sure that there is no newer and better alternative. Thank you :-)

👍 1

Any recommendations for tutorials on Clojure CLI / deps.edn for someone coming from Leiningen? (Some kind of mapping from how-to-do-X-with-Leiningen to how-to-do-X-with-deps.edn.)


Ive been using and google so far 🙂


And there's the #tools-deps channel which is helpful when you're switching over. We went lein (2011) -> boot (2015) -> CLI / deps.edn (2018) at work so I'm happy to answer any specific Qs you might have @U06A9U5RP


@seancorfield Thank you. I will ask specific questions there (after I’ve read up a bit more on the basics).


I'm trying to use clj-new to scaffold a figwheel-main template, but am having some issues. @seancorfield any ideas?

clojure -Ttools install com.github.seancorfield/clj-new '{:git/tag "v1.2.381"}' :as clj-new
Checking out:  at 76f728dce63f7b881f4e5705ba0d59d795d56f11
Installed clj-new
coetry@Allens-MacBook-Air ~ % clj -X:new clj-new/create :template figwheel-main :name coetry/seven-guis :args '["--reagent"]'

WARNING: Specified aliases are undeclared and are not being used: [:new]
Namespace could not be loaded: clj-new

coetry@Allens-MacBook-Air ~ % clj -Tclj-new/create :template figwheel-main :name coetry/seven-guis :args '["--reagent"]'

Error building classpath. Unknown tool: clj-new/create

coetry@Allens-MacBook-Air ~ % clj -Tclj-new :template figwheel-main :name coetry/seven-guis :args '["--reagent"]' 

No function found on command line or in :exec-fn

coetry@Allens-MacBook-Air ~ % clojure -Tclj-new :template figwheel-main :name coetry/seven-guis :args '["--reagent"]'

No function found on command line or in :exec-fn


maybe @U064J0EFR you might know?


Try clj -Tclj-new create :template ...


yup, that was it thanks!


@U1KFUC2NA Happy to improve the clj-new README if that would help? It has this section on installation and use as a CLI tool: and then it has this section on installation and use via an alias in deps.edn:

Alex Miller (Clojure team)19:02:08

you said :as clj-new on the installation - that's the tool name

Alex Miller (Clojure team)19:02:07

then its clj -Tname function so here should be clj -Tclj-new create ...

Alex Miller (Clojure team)19:02:47

the -X:new didn't work as you didn't define the :new alias anywhere

Alex Miller (Clojure team)19:02:21

so should be:

clj -Tclj-new create :template figwheel-main :name coetry/seven-guis :args '["--reagent"]'

❤️ 1
James Vickers22:02:24

If I have the name of a symbol as it's used in a namespace, how do I resolve it? As in, a namespace the-ns requires another one like (:require [ :as baz]) and uses a symbol like baz/boo, how do I resolve the symbol baz/boo used in the-ns from another namespace e.g. to get meta on that symbol as it's defined in When I try something like (ns-resolve (find-ns 'the-ns) (symbol "baz/boo")) I get nil (find-ns returned a right-looking value as did symbol). Is there a way to do this?


user=> (ns foo)
foo=> (def f 1)
foo=> (ns bar (:require [foo :as f]))
bar=> (in-ns 'user)
#object[clojure.lang.Namespace 0x522b2631 "user"]
user=> (ns-resolve 'bar 'f/f)



user=> (ns-resolve (find-ns 'bar) 'f/f)


should that be (symbol "baz" "boo")?


user=> ((juxt namespace name) (symbol "baz" "boo"))
["baz" "boo"]

👍 1

user=> ((juxt namespace name) (symbol "baz/boo"))
["baz" "boo"]


ah, i was remembering this little bit (map namespace [(symbol "foo/bar" "baz") (symbol "foo" "bar/baz")]) where the symbols print identically but have different namespaces


i'm looking for a way of serializing and storing clojure data in a compact way that would allow storing historical copies

isak23:02:43 > [ALPHA] durable (disk-backed) representations which share the API and asymptotic performance of their in-memory counterparts Haven't tested this, but may be worth looking into ^


yeah was looking at that


i.e. a file backed atom with on-disk structural sharing of some sort

datomic 1

i know of datomic but looking for something simpler 😛


I'm also interested in a library that could do what you describe.


iirc @U053S2W0V did something like this a number of years back(?)

Joshua Suskalo00:02:50

although I don't think this does history

Joshua Suskalo00:02:21

you could use datahike which does hitchhiker trees for on-disk persistent kv store and then it builds a datalog query engine atop it

Joshua Suskalo00:02:29

it does have history


@U07S8JGF7 i did build something like this, but it never achieved production readiness in a way i felt comfortable sharing


the idea was generally mything is to datomic as redis is to postgres


yeah I'm looking for something akin to redis. maybe sqlite


I like the idea of persisting to a single file


I guess what I really need is serialization with structural sharing

Joshua Suskalo15:02:19

hitchhiker trees do that

Joshua Suskalo15:02:23

if nothing else

Joshua Suskalo15:02:49

they don't map cleanly to all clojure structures though necessarily