off-topic

Ben Sless 2025-07-21T18:21:52.128639Z

@nbtheduke would you like selling me on Just?

2025-07-21T18:22:22.540619Z

it's strictly the command runner part of make with sane defaults and a nice syntax

Ben Sless 2025-07-21T18:23:00.711659Z

why would I want that? genuine question - what's wrong with just the tools at hand?

2025-07-21T18:24:34.560119Z

I want to do a full "lint and test" run of my linter splint. i could write

clojure-lsp diagnostics && bb run splint && bb run lazytest && clojure -M:v1.10:dev:test:runner --md README.md && clojure -M:v1.11:dev:test:runner --md README.md && clojure -M:v1.12:dev:test:runner --md README.md
or i could run just test-all-versions

2025-07-21T18:26:07.618699Z

each of the recipes in splint's justfile could be individual scripts, but they're not very big and it's nice to have them be able to reference each other

Ben Sless 2025-07-21T18:27:00.179509Z

That's certainly preferable to scripts. Do you run it in CI? I guess one advantage could be making your repository more CI platform agnostic

borkdude 2025-07-21T18:27:37.680019Z

FWIW bb tasks offers the same benefits (+ autocompletion) + you get a little bit more flexibility using clojure

Ben Sless 2025-07-21T18:27:58.443419Z

Which makes me wonder why not just bb

Ben Sless 2025-07-21T18:28:32.030049Z

my guess is shell scripting is easier in just

2025-07-21T18:29:30.747789Z

i'm not a fan of bb's task runner syntax. if i wanted to write clojure scripts (heh), i'd just write babashka files and then run them with bb. just lets me write the exact things i'd write from the command line into a file (with very light templating)

2025-07-21T18:29:56.961939Z

# Set version, change all instances of <<next>> to version
@set-version version:
    echo '{{version}}' > resources/noahtheduke/splint/SPLINT_VERSION
    fd '.(clj|edn|md)' . -x sd '<<next>>' '{{version}}' {}
    sd '{{current_version}}' '{{version}}' README.md
    sd '{{current_version}}' '{{version}}' docs/installation.md
    sd '{{current_version}}' '{{version}}' docs/usage.md
    sd '## Unreleased' '## Unreleased\n\n## {{version}} - {{today}}' CHANGELOG.md

seancorfield 2025-07-21T18:30:18.014469Z

Both just and bb are additional tools that need installing for dev/test/ci, yes? Although if you're using the Clojure GH Action, you get bb for "free" since it knows how to set that up... But just would be an additional install in GH Actions?

borkdude 2025-07-21T18:30:57.515199Z

@nbtheduke Fair enough. I think bb might be a bit more OS-agnostic where you just use Clojure for most stuff instead of bash/GNU-related tools

2025-07-21T18:31:17.354849Z

i could write that in babashka or clojure itself, but i know and write fd and sd because they're simple and "unix"-y

borkdude 2025-07-21T18:31:29.613369Z

I have never in my life used fd or sd

seancorfield 2025-07-21T18:31:36.626569Z

fd and sd aren't native Linux tho'...?

2025-07-21T18:31:51.652969Z

do they need to be? i'm writing for myself

borkdude 2025-07-21T18:32:22.108359Z

OSS projects often doesn't come down just on yourself ;)

2025-07-21T18:32:41.098379Z

lol maybe i'll change when anyone else contributes to my projects πŸ˜‰

πŸ™ƒ 1
seancorfield 2025-07-21T18:33:39.530339Z

I'm always leery of having a bunch of "stuff that needs to be installed" in order to run tests / build a project / whatever. That's really why I have even embraced bb fully yet (but I'm slowly coming around to that a bit).

2025-07-21T18:35:59.313439Z

the nice thing about just is that it's just (heh) command line calls. i used fd and sd to update the various files before i put it into a justfile recipe (what the collections of commands are called) because i know and use fd and sd in my day to day development. i already write clojure -M:dev:test:runner x100 a day, so putting it into a recipe and calling just test saves me a little bit of time and hassle

2025-07-21T18:36:52.435149Z

and because it's all command line calls, there's (almost) no new syntax or messiness to learn, i'm copying existing commands from my command line history into the file

2025-07-21T18:37:49.010259Z

i don't use just in GHA, i copy-paste the recipes into the appropriate yaml file because i also don't want to mess with additional tooling in CI

borkdude 2025-07-21T18:37:59.545239Z

I run bb dev and bb test 100x a day probably :) bb test would be:

{:tasks {test (clojure "-M:dev:test:runner")}}
using the built-in deps.clj clojure runner or
{:tasks {test (shell "clojure -M:dev:test:runner")}}
for shelling out to the system clojure command. Not that much syntax

2025-07-21T18:38:54.510799Z

you don't need to defend babashka's test runner syntax to me, it's popular and well-used

borkdude 2025-07-21T18:39:26.215129Z

just for anyone reading along.

borkdude 2025-07-21T18:39:47.195489Z

(see what I did there? ;))

πŸ˜„ 1
seancorfield 2025-07-21T18:41:17.076799Z

@nbtheduke I'm curious: do you use build.clj as well? Or would you just use just for that sort of stuff?

2025-07-21T18:41:41.548339Z

oh i use build.clj, but i mostly call it from my just recipes:

@clojars:
    env CLOJARS_USERNAME='noahtheduke' CLOJARS_PASSWORD=`cat ../clojars.txt` clojure -T:build deploy

seancorfield 2025-07-21T18:41:53.702819Z

@borkdude Re: bb -- do you use build.clj as well? Or would you just use bb tasks?

borkdude 2025-07-21T18:42:18.349509Z

@seancorfield We can discuss this in #babashka - I don't want to push bb tasks anymore here after Noah's remark ;)

2025-07-21T18:43:10.099629Z

oh you can talk about it, i was reading your comments as defensive because i said i didn't like the syntax. i don't mind the discussion, just didn't want you to think i was insulting your project

2025-07-21T18:44:24.830809Z

https://github.com/NoahTheDuke/splint/blob/5d5278fa9fbaaecabecb19e70e246b2ded773936/justfile#L84-L104 here's my "cut a new release" recipe that runs all tests, sets the new version, regenerates documentation, commits and sets the new tag, then compiles and deploys, and pings cljdoc to update the documentation

borkdude 2025-07-21T18:45:04.907269Z

neh it's fine. I wasn't going to mention bb at all, but I couldn't resist after seeing very OS-specific stuff that I think would be friendlier to avoid in OSS projects since I think anyone should be able to build a Clojure project regardless of your OS

πŸ€” 1
βœ… 1
borkdude 2025-07-21T18:45:13.972529Z

further bb tasks discussion here: https://clojurians.slack.com/archives/CLX41ASCS/p1753123384945069

πŸ‘ 1
2025-07-21T18:47:12.549769Z

except for fd and sd in a specific recipe (which i think has obscured the discussion a little), there's nothing in these justfiles that can't be used by anyone. they're basically named tutorials of how to do given tasks: run tests, build the project, open a repl, etc

2025-07-21T18:48:12.581389Z

a newcomer to splint says "i want to poke at splint, how do i run a repl like noah?" the justfile says clojure -M:dev:test:v1.12:repl

2025-07-21T18:49:11.881079Z

"i want to test the project", the justfile says clojure -M:dev:test:runner --md README.md -e :integration

2025-07-21T18:49:51.685529Z

"i want to run the integrations tests", the justfile says clojure -M:dev:test:runner --md README.md -i :integration

borkdude 2025-07-21T18:49:55.832469Z

yeah. a lot of people use Makefiles for those still. Makefiles with lots of PHONY stuff. I don't like those a lot. Justfile is an improvement over that. But bb tasks still supports some of the features like dependent tasks and running stuff in parallel, which I bet Just does too. Just is a fine tool. bb tasks aims to do similar stuff but without the bash stuff.

πŸ‘ 1
βœ… 1
sheluchin 2025-07-21T18:52:15.654109Z

What if there was another form for defining a bb task that just took a string literal to support this kind of simple representation?

sheluchin 2025-07-21T18:52:48.761509Z

I guess it would only be saving you a shell call or so.

danieroux 2025-07-21T19:01:44.531719Z

I too was a just skeptic, at the time a Makefile or two was good enough for me. I've come to appreciate just deeply for: β€’ Sane string interpolation β€’ Sane variable declaration β€’ #!/bin/bash scripts in the justfile, a few lines at a time.

πŸ‘ 1
danieroux 2025-07-21T19:03:40.345249Z

(and it does give me a warm fuzzy to type just repl πŸ˜„)

🀝 1
lread 2025-07-21T19:10:40.899339Z

Babashka tasks are my strong preference for a dev front-end. I always have bb installed, and don't mind at all imposing that it be installed for dev work for any open source project where I am a maintainer. I'm a true bbeliever though, and like to share the joy of using clojure tools and bb!

p-himik 2025-07-21T19:24:03.138949Z

> bbeliever Heh, that's a neat word.

p-himik 2025-07-21T19:27:49.482409Z

8
πŸ’° 1
teodorlu 2025-07-21T19:55:55.834669Z

My kicker for embracing bb tasks was: β€’ I can develop tasks from a REPL β€’ I can let bigger tasks grow into Clojure programs I can run from the command line and from my REPL.

practicalli-johnny 2025-07-21T21:07:23.743799Z

I've been using make for the same reason, to https://practical.li/engineering-playbook/build-tool/make/ across Clojure (and other language) projects. I still use make as its just shell commands and environment variables, so neutral ground especially when there are multiple languages at play. Make has been around for decades and I've been using it since 1994 🀣 Its usually installed on Linux machines already. I like the idea of just, but havet had the time to give it a try. I am very comfortable writing shell scripts, so haven't needed to use babashka yet (its on my todo list though)

πŸ‘ 1
gaverhae 2025-07-22T12:48:22.971579Z

So far I've gone for a simple (per-project) Bash script with a case on $1, so I typically run h repl, h test, etc. Recently I've started experimenting with using babashka for that script. The file is put on my PATH by direnv, which incidentally also loads a Nix shell with all of the tools for the current project, so installing appropriate tools or adding a useful tool is never an issue.

2025-07-22T14:47:27.361979Z

#caveman also uses just iirc

πŸ‘ 1
πŸ‘€ 1
James Amberger 2025-07-22T17:35:01.474549Z

I encountered just via #caveman and decided not to invest on the grounds that I’m already pretty good at shell scripting and don’t need that reinvented. Now that this thread prompts me to think about it, many of the niceties just offers could be delivered via a shell script that you source, e.g. auto printing of available recipes/their docstrings

p-himik 2025-07-22T17:38:47.596179Z

> I’m already pretty good at shell scripting Last time that line of thinking has gotten me into a need of deduplicated nested arrays in bash, so I decided to never think that way ever again. :D (But not necessarily about just as I doubt it was something it could help with.)

πŸ’― 1
πŸ˜‚ 1
πŸ˜… 1