boot

:boot-clj: https://boot-clj.github.io/ — build tooling for Clojure. Dev chat in #boot-dev
flyboarder 2019-04-30T02:09:40.054700Z

@dave I would start with a simple client server architecture on top of the clojure cli tool

flyboarder 2019-04-30T02:10:13.055300Z

ideally the client should be able to start on the cli tool and on a bootstrap based native image

flyboarder 2019-04-30T02:11:13.056100Z

so we should assume in each case that the required bit’s would be provided by those platforms, and all that’s needed is implementing the client

flyboarder 2019-04-30T02:11:34.056600Z

the server is the harder part as we need to overhaul the fileset and pod architectures

flyboarder 2019-04-30T02:11:48.057Z

I started with a rewrite on the fileset already

flyboarder 2019-04-30T02:12:11.057400Z

it keeps a similar api but the internals are a bit cleaner

flyboarder 2019-04-30T02:14:27.059100Z

my thought around the server design is that we have a new http://boot.app namespace which creates the initial “core” pod, then it spins up additional pods as boot clients connect and send over their boot.properties

seancorfield 2019-04-30T03:31:31.060800Z

@flyboarder Is the main driver for that to have a persistent pod-based Clojure "engine" that can support short-lived client commands with very fast startup? i.e., all about avoiding the JVM startup overhead?

flyboarder 2019-04-30T05:06:15.061100Z

@seancorfield yes sir

seancorfield 2019-04-30T05:19:29.062800Z

I've seen a number of those sort of things over the years but none of them seem to have gone mainstream -- are you sure it's not a solution in search of a problem?

flyboarder 2019-04-30T05:21:38.064500Z

I think it’s a viable approach and it’s something that keeps coming up

flyboarder 2019-04-30T05:22:21.065200Z

I imagine it as a remote repl kind of situation

flyboarder 2019-04-30T05:23:30.066500Z

the jvm has a huge startup cost, which compared to something like nodejs, has a terrible developer experience when running cli based tools

👍 1
flyboarder 2019-04-30T05:25:11.067700Z

by shifting the build processing to a “server”, we can drastically reduce the cost of repeated startups

flyboarder 2019-04-30T05:25:31.068300Z

we also get the option of shifting that to another computer entirely

flyboarder 2019-04-30T05:26:05.069400Z

such as a compilation service for clojure code, where you have a local client and some really powerful build box

seancorfield 2019-04-30T05:27:10.070600Z

I guess I remain unconvinced. I've been doing Clojure for nine years now, eight in production, and we have 82,000 lines of code in a monorepo with 30-ish subprojects, and startup time -- every for our command-line tools in all that -- really isn't a problem. Sure, it's a minor annoyance occasionally, but I don't yearn for some "server" process that stays hot for all the things I'm doing...

2019-04-30T07:58:41.097300Z

@seancorfield I had the same feeling until I created a prototype with Clojure (a client/server setup [1]) that runs scripts under 30ms like any other bash or python script. The client is compiled with GraalVM which makes it fast, the server is a prepl. It might not be for everything but for a case where startup time matters this could make Clojure viable [1] https://github.com/jeroenvandijk/clojure-scripting

flyboarder 2019-04-30T05:28:01.072Z

How long do you estimate your builds took when you last used boot?

seancorfield 2019-04-30T05:28:01.072100Z

The vast majority of my workflow is based around a live REPL that I startup and leave running for days (or even weeks). I load code (compile), run tests, no startup cost involved.

seancorfield 2019-04-30T05:28:16.072400Z

We don't AOT. We never have.

seancorfield 2019-04-30T05:28:29.072700Z

So a "build" isn't really a thing for us.

seancorfield 2019-04-30T05:28:51.073200Z

We create uberjars (using clj and my fork of depstar) but that's pretty quick.

flyboarder 2019-04-30T05:29:26.074100Z

ok, so for my apps I am building cljs client/server projects, currently our builds take about 60 seconds every time I save a file

seancorfield 2019-04-30T05:29:45.074600Z

Is that inherently a cljs problem?

seancorfield 2019-04-30T05:30:05.075300Z

We tried cljs about four years ago and concluded it was too fragile for production work.

seancorfield 2019-04-30T05:30:23.075800Z

I'm surprised compilation time is still an issue after four years 😞

flyboarder 2019-04-30T05:30:27.076Z

Often I work across many projects which are related, each their own boot project, so I am restarting boot all day long

flyboarder 2019-04-30T05:31:17.077200Z

waiting 3 minutes for a working build ready for code changes and then waiting another minute every time I make a meaningful change is rather difficult

👍 1
seancorfield 2019-04-30T05:31:31.077600Z

But Boot itself is pretty heavy to start up. It contains a lot of code. Leiningen is too (and it starts two JVMs!).

seancorfield 2019-04-30T05:31:51.078300Z

I think Boot's fileset abstraction also contributes to the performance problem.

seancorfield 2019-04-30T05:32:11.079Z

clj is such a breath of fresh air for us, compared to lein and boot.

seancorfield 2019-04-30T05:32:43.080Z

But, yeah, I'll concede that pure-clj avoids some of the pain I keep hearing from cljs users 🙂

flyboarder 2019-04-30T05:33:03.080400Z

my problem with clj is that it’s not a build tool and doesn’t take into account everything unrelated to the clojure aspects of my poject

flyboarder 2019-04-30T05:33:19.080800Z

I completely understand why you would use it if you are only using clojure in your apps

seancorfield 2019-04-30T05:33:42.081400Z

(and this sort of discussion is important to me because at some point we'll start using cljs again -- but it needs to solve these problems first)

flyboarder 2019-04-30T05:33:53.081600Z

agreed

flyboarder 2019-04-30T05:34:05.082100Z

we are on the other side of the spectrum, cljs all the way

seancorfield 2019-04-30T05:34:35.082900Z

If you weren't doing cljs -- just clj -- what "build" stuff would you want, that clj doesn't provide? Just curious there.

flyboarder 2019-04-30T05:34:53.083400Z

the pipeline

seancorfield 2019-04-30T05:35:19.084200Z

Ah, OK. The problem we've "solved" by a small shell script to run clojure multiple times.

flyboarder 2019-04-30T05:35:37.084800Z

and replacing things like gulp/bower/sass/less with a single tool

seancorfield 2019-04-30T05:36:28.085700Z

For cljs, it seems a bit hamstrung by still depending on the JVM/Google Closure etc. So, yeah, I can see that. The front end ecosystem is such a mess IMO.

flyboarder 2019-04-30T05:37:01.086800Z

yes, I also want to make boot a posibility for clojureCLR users

seancorfield 2019-04-30T05:37:01.086900Z

I watch our front end team struggle with the wild west of build tools etc -- and they're doing pure JS (React.js etc).

seancorfield 2019-04-30T05:37:38.087400Z

ClojureCLR seems to be generating a bit more buzz lately. Mr Miller is a powerhouse.

flyboarder 2019-04-30T05:38:10.088Z

if I could just use boot for the clr I would be the happiest person, powershell still doesnt do it for me

flyboarder 2019-04-30T05:38:39.088600Z

I dont want to have to use powershell or c# I want the same clojure experience on windows

seancorfield 2019-04-30T05:39:03.089100Z

We have a PS version of the clojure *nix script now 🙂 For JVM Clojure of course 😉

flyboarder 2019-04-30T05:39:52.090Z

I wrote a thing for clojureCLR in powershell, it’s ok for scripts but it made me realize I need a build tool to get anything really meaningful past that

seancorfield 2019-04-30T05:43:53.091Z

Hah, I like how you can just use the clr.api to var and invoke like that...

flyboarder 2019-04-30T05:44:59.091400Z

i like how it’s only 30 lines without comments or whitespace XD

flyboarder 2019-04-30T05:45:54.092500Z

it’s so easy to get started with clojure on clr and very difficult to make anything complex

seancorfield 2019-04-30T05:47:38.093500Z

I'll be interested to see how all this plays out -- boot was such a huge improvement over lein when we switched back in 2015 but we just got bogged down in it all the more we built with it. We ended up with a 2,000 line build.boot file 🙂

seancorfield 2019-04-30T05:48:43.095200Z

For us to even consider anything serious with cljs in the future, the tooling needs to be sorted out, so I can see a definitely window there for Boot -- but shadows-cljs seems to have a solid foothold (I use that for hacking on Chlorine, the plugin for Atom).

flyboarder 2019-04-30T05:48:43.095300Z

thats so interesting, for cljs projects even my complex ones have a super simple build.boot

flyboarder 2019-04-30T05:49:14.096100Z

I wrote a boot-shadow task for that exact thing, we have been using it in production for 6 months now

flyboarder 2019-04-30T05:50:13.096900Z

shadow is great for cljs compiling, but again falls short for the rest of our pipeline

flyboarder 2019-04-30T22:01:43.098800Z

Well looks like boot is getting funded thanks to Clojurists Together!

2
🎉 10
seancorfield 2019-04-30T22:09:00.099500Z

Congrats! 💯