Fork me on GitHub

Hi @chrisjd. Thanks for watching us 🙂 It's nice to know we have advocates who would like to see a consultancy using Clojure succeed.


For the climate of Clojure consulting.... I don't think there is a great deal of demand for consulting simply of grounds of us using Clojure. Clojure is inherently a very simple language, and the teams that pick it up seem to go from strength to strength of their own accord (they can also hire relatively easily). Where JUXT has found greater demand is for a team that gets stuff done and has a track record of doing so, and for a consultancy that can bring innovation to a wider company. For sure we have won business from clients who are interested in Clojure and associated tech, but we have tried to widen our messaging beyond the precise tooling used.


I looked for a #mach and didn't see it. Didn't think to look for #juxt.


yeah... probably should review that!


Ok, so I'm trying to write a mach entry that copies the source trees from a bunch of different lein projects into one (don't ask why!). Most of the source projects have the same layout, but a couple are odd.


So, I have something like: {collect {copy-tree-extra {"foo-orig/a" "foo-copy/a"}, classic-modules '[bar baz], copy-tree (merge (compute-copy-tree-for-modules classic-modules) copy-tree-extra), novelty (some (fn ...) #ref[collect copy-tree]), update! (doseq [entry #ref[collect copy-tree]] ...)}}


Sorry, I should format that better. Anyway, the point is I have a target whose definition depends on other targets. But this doesn't work because the ref preprocessor uses postwalk, which means that when a ref is expanded that contains other refs, only the first expansion happens, and a get a tricky-to-understand error about undeclared Var 'collect'


So am I misusing #refs, and should be solving this a different way?


Using props you can define vars, and then during the update! and produces etc, the vars are used in a let binding


so copy-tree in your case could go in the mach/props block...


ok, I can try that. Thanks!


I see your point about postwalk vs prewalk - this code actually originated in Aero and it's a postwalk there also. What you're saying does make sense though, so I'd want to ask @malcolmsparks if there's some overriding rationale behind the postwalk. Thanks for raising.


@jonpither Thanks! Interesting insight; I remember being intrigued by the emphasis that Juxt placed on the use of Clojure. From a technical perspective, the advantages of that are clear - I guess you must have the right mix of technical skills and customer relationships on board. 🙂


@chrisjd Yes I think that's key - Clojure is a (not-so) secret weapon of choice, but a lot of the work we do is traditional consultancy practice (business development, risk/account management etc)


@chouser we recently fixed this for #ref with aero which used a similar mechanism to this. Mach hasn't quite had the same attention for this point yet.