Fork me on GitHub
#juxt
<
2017-08-13
>
jonpither17:08:25

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

jonpither18:08:07

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.

chouser18:08:09

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

jonpither18:08:28

yeah... probably should review that!

chouser18:08:48

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.

chouser18:08:33

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]] ...)}}

chouser18:08:37

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'

chouser18:08:24

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

jonpither18:08:57

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

jonpither18:08:51

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

chouser18:08:08

ok, I can try that. Thanks!

jonpither18:08:30

I see your point about postwalk vs prewalk - this code actually originated in Aero and it's a postwalk there also. https://github.com/juxt/aero. 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.

chrisjd18:08:30

@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. 🙂

jonpither18:08:59

@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)

dominicm18:08:28

@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.