This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (13)
- # aws (6)
- # babashka (23)
- # babashka-sci-dev (6)
- # beginners (64)
- # calva (110)
- # cider (25)
- # cljs-dev (5)
- # cljsrn (8)
- # clojars (5)
- # clojure (20)
- # clojure-austin (1)
- # clojure-europe (77)
- # clojure-nl (1)
- # clojure-uk (3)
- # clojurescript (14)
- # cursive (7)
- # datahike (9)
- # datomic (13)
- # eastwood (15)
- # emacs (14)
- # figwheel-main (1)
- # fulcro (8)
- # graalvm-mobile (2)
- # graphql (2)
- # honeysql (2)
- # hyperfiddle (2)
- # introduce-yourself (4)
- # jobs (4)
- # joyride (4)
- # leiningen (4)
- # lsp (8)
- # minecraft (8)
- # off-topic (11)
- # polylith (18)
- # rdf (2)
- # reagent (3)
- # reitit (4)
- # remote-jobs (1)
- # shadow-cljs (12)
- # specter (7)
- # xtdb (3)
One thing I like about Makefiles is that I can declare dependencies between tasks. This generally speeds things up task running.
It also enables a more subtle advantage. When
make decides that no actions are needed, no files are touched. This makes it possible to run make with a file watcher that watches the whole directory tree.
watchexec make or
rg --files | entr make.
If I were to convert https://github.com/teodorlu/playground.teod.eu/blob/master/Makefile to a
bb.edn, and run
watchexec bb run make, I would be running updates all the time, because each call to
bb run make would recreate files on each call, which would (in turn) trigger a rerun of the make script. So I would be running the make task all the time - not just when something has changed. Then I might as well run
watch -n 0.001 bb run make. Which I would prefer not to.
Has "add dependency tracking to bb.edn tasks" been discussed before? (I couldn't find any issues).
@U3X7174KS Eeeeh, bb.edn supports dependencies between tasks :)
How do I declare which files depend on which? For instance, in this makefile line:
I say that in order to produce
feedback-loops-api-design-how-it-works/index.html: feedback-loops-api-design-how-it-works/index.org pandoc -s --toc --from=org+smart -i feedback-loops-api-design-how-it-works/index.org -o feedback-loops-api-design-how-it-works/index.html
feedback-loops-api-design-how-it-works/index.html, one must run
, which should be re-run any time
pandoc -s --toc --from=org+smart -i feedback-loops-api-design-how-it-works/index.org -o feedback-loops-api-design-how-it-works/index.html
You use fs/modified-since for this. I have a blog post about it (will send link later once I'm at kbd)
If I'm reading your post right, you might be aiming for something more flexible. Avoiding huge makefiles that need to be generated (like with cmake). Interesting.
Specifically - my usecase was wanting to run
watchexec bb run tests in the Neil repo, which resulted in
./neil being regenerated on each run (bb gen-script), which triggered a rerun.
(and i do reallly want to use Clojure + EDN for this rather than bash + makefile dependencies)
If I want to process some jpeg files in babashka, what are my options? I don't have
Ideally all I want to do is read them and process them raw as byte buffers.
(ImageIO/read "foo.jpeg") is all I need.
After that, I anyway only operate with the raw bytes.
FWIW, I shell out to https://imagemagick.org/index.php or http://www.graphicsmagick.org/
I'm not reading the raw bytes of the file, I am reading the raw bytes of the pixels from the jpeg. I'm using the bytes from the BufferedImage to find the brightest pixels on the image
Thanks anyway. I can afford to use clj for the project anyway, so I might just stick to clj for this