Hi all, any ideas on how I would get this to work using clojure.java.shell? I’ve tried all the variations I can think of but can’t get the > working
pg_dump -Fc <postgresql://postgres:postgrespassword@localhost:5432/postgres> > dump.sql
@limix >
is bash syntax, so prepend this with "bash" "-c"
@limix you can also use babashka.process
which accepts :out <file>
$ bb -e '(babashka.process/sh ["echo" "foo"] {:out (io/file "/tmp/output.txt")})'
Babashka news overview of March 2021: https://github.com/babashka/babashka/blob/master/doc/news.md#2021-03
What's your preferred way of visualising graphs with babashka? I'm looking for a simple way to visualise graphs based on data retrieved and transformed in babashka.
(simple line graphs and histograms probably fit 95% of the use cases)
Ah not graphs as in directed, acyclic graphs, but graphs as in images?
charts?
Here is an example of someone using vega-lite to do it. https://gist.github.com/vdikan/6b6063d6e1b00a3cd79bc7b3ce3853d6/ It's using the old custom "from scratch" http server, but nowadays you can do this using httpkit. The html could now be done using hiccup.
Check out #data-science
@mmz ^
@borkdude Thanks so much for the reply!
Thank you! That should work :thumbsup::skin-tone-3:
@grazfather fyi, I'm now experimenting with topological sort and dependencies between tasks: https://github.com/babashka/babashka/discussions/765#discussioncomment-571737
awesome
is your intent mostly to work with .PHONY
like targets, or would you support something that can detect if a task actually needs to run?
e.g. if test needs bin, but bin doesn’t run if none of the files have been touched
technicall a task could have an attribute that is a ‘needs to run’ predicate
@grazfather yes, can easily support that, but you can also write (when ... ...)
or (if ... (println "Nothing to do here")
yourself
true, that’s probably a better idea. Just maybe something for the babashka book (a recipe) rather than baking it into bb itelsf
can always add it later, if it turns out to be something people really want, but providing some helper functions like (modified-since? target files)
are the foundation I think
Borrowing ideas from https://github.com/juxt/mach, but leaving some things out which I think you can do yourself in some code, which could be added later into some option as well
oh, I have never seen that project
it's deprecated
if you want to play with this, binaries available in #babashka-circleci-builds
I might 🙂 I often whip up quick makefiles when I am debugging something just to re do a few steps
often in a docker container
An easy (if docker ps | grep) to avoid re-starting the container would be awesome