Fork me on GitHub
#off-topic
<
2020-08-01
>
p-himik11:08:08

Does anyone have any thoughts/experience on using Makefiles for development... orchestration? E.g. I consider running podman, showing logs, starting the development browser with all the requires flags, etc.

p-himik11:08:46

I've seen people do it before. But it still feels like abusing the tool. Right now I'm using a bunch of shell scripts. My only complain is that their support in IntelliJ IDEA is not the best.

borkdude11:08:29

Right now I'm using this simple clojure/babashka script to start a couple of dev things at the same time: https://gist.github.com/borkdude/8f5dff7c2330ca520403eb44c9013a83

danieroux11:08:44

I use a Makefile, and I document everything worth doing in the projects there - including downloading and installing Datomic related tools and jars, starting REPLs. Am considering Babashka. What I like is typing make, and TAB, and getting all the targets completed

💯 3
dominicm12:08:21

Makefile is for making things. It's not a command runner.

👍 6
3
dominicm12:08:46

I usually lean on scripts with a case

dominicm12:08:51

I would strongly discourage you from starting the jvm. You might want to leave that to the user so they can jack in.

p-himik12:08:48

> Makefile is for making things That's exactly my thoughts. > I would strongly discourage you from starting the jvm. Yeah, didn't intend to.

p-himik12:08:23

@U04V15CAJ Do I remember correctly that you're not using IDEA? I don't think using bb would be much easier than using bash there. Although bb is definitely nicer if you need something more than just running a command with some particular arguments.

borkdude12:08:28

You can probably do this with bash (run things in parallel, kill them all when the last process dies by SIGINT), but I'd have to look up how to do that

borkdude12:08:58

Which is for me the case for babashka: I don't have to look up bash stuff I keep forgetting

p-himik12:08:46

Right. Thanks!

danieroux13:08:54

@U09LZR36F and I strongly discourage jack-in in teams. I do want a stable and consistent way to start up my REPL to be connected. I am not super excited about Make, it’s the best I could come up with right now. A strong case can be made for shell-with-case (hah). I’ll see where that goes

dominicm13:08:10

People will make the same changes to their repl for their workflow to work. If I want to load cider, spy scope, etc. Then that's my choice...

borkdude13:08:00

I also don't use cider-jack-in, was never a big fan of that.

borkdude13:08:25

I don't want my REPL process to be a subprocess of my editor

danieroux13:08:26

Yes, and in a team - if you add spy scope, I would like to benefit from it. And when we pair, it’s grand to be able to assume that we all have the same toolbox. We load cider, with, nrebl-middleware and explicit lispy deps. And connect to the configured nREPL port via a shared (committed) Cursive run configuration. The consistency has huge payoffs for me

richiardiandrea14:08:23

I have used in my company this task runner with big success https://pydoit.org/ It can do very complicated things very easily, a few abstractions over tasks are doing their job. I agree though that she'll or babaska script most of the times are enough... We had a complicated build + app startup and we needed something better. Also we needed something portable for Windows users.

emccue17:08:14

Mentioned it a day ago, but I use rake for that stuff

noisesmith17:08:40

using Make for arbitrary dev tasks is not abusing the tool, any more than using lein for them is

noisesmith17:08:50

and it's simpler and more reliable than lein is

noisesmith17:08:46

it's a domain specific language for tasks, artifacts, and subtask resolution, I don't like the fact that it uses tabs semantically, but it's superior to the other general purpose task execution DSLs I've used

sveri17:08:04

@U0C8489U6 Thanks for the pointer to pydoit, this looks good 🙂

👍 3
Endre Bakken Stovner17:08:11

If you want the Make paradigm, check out Snakemake. It is a Python DSL that is much used in science. https://snakemake.readthedocs.io/en/stable/tutorial/basics.html