This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-02
Channels
- # announcements (3)
- # aws (2)
- # babashka (60)
- # beginners (21)
- # cljs-dev (35)
- # cljsrn (3)
- # clojure (53)
- # clojure-android (2)
- # clojure-australia (3)
- # clojure-europe (45)
- # clojure-france (4)
- # clojure-nl (4)
- # clojure-uk (6)
- # clojurescript (33)
- # core-typed (1)
- # cursive (13)
- # datomic (6)
- # duct (1)
- # emacs (2)
- # fulcro (10)
- # introduce-yourself (3)
- # jobs (2)
- # jobs-discuss (13)
- # leiningen (1)
- # malli (19)
- # missionary (63)
- # music (1)
- # off-topic (21)
- # pathom (3)
- # polylith (18)
- # practicalli (12)
- # proletarian (1)
- # reagent (40)
- # reitit (23)
- # releases (1)
- # remote-jobs (1)
- # ring (14)
- # ring-swagger (1)
- # shadow-cljs (13)
- # sql (30)
- # testing (27)
- # tools-deps (31)
- # vim (10)
- # xtdb (4)
@borkdude Just checking how 0.5.1 is looking. On Wednesday I’m going away hiking for the rest of the week, and I have the Cursive bit in a state where I could release a beta build. Since it’ll require 0.5.1 for the deps output part, I’ll wait till that’s out before releasing. No pressure though, otherwise I can release when I’m back, no problem.
I can get 0.5.1 out with the deps output by then, no problem. But I was also planning to look into the vars without metadata and the dynamic vars. Not sure I can get those in before Wednesday. Do you prefer an earlier release without those?
Hmm, good question, I’d forgotten about that. The dynamic vars aren’t a problem since I’ve implemented the REPL over nREPL for now, and I can support the socket REPL later. The missing vars will only affect completion, currently I have a hack which uses clojure.core if the ns is missing, but I haven’t gone back to check if I can default that in a better way. I’ll look at that tomorrow and let you know.
Actually, I just checked - I can default that, no problem. So no, I don’t need either of those.
ok, there are two things for me to do: write a test for the print-deps and upgrade deps.clj to the newest clojure CLI stuff and then I can release a new bb for you
I posted in the main channel. The last thing I'll have to do is write test for print-deps
but I suspect there will be no other changes for 0.5.1.
Just in case, here's the final binary: https://21433-201467090-gh.circle-artifacts.com/0/release/babashka-0.5.1-SNAPSHOT-macos-amd64.tar.gz Tomorrow morning I'll release 0.5.1 (in 10 hours from now or so)
I’d like to use a glob in fs/modifield-since
it would require another branch here: https://github.com/babashka/fs/blob/master/src/babashka/fs.cljc#L720 Is this worth a PR?
I'd have to think if this would still be the correct semantics, but since you can put a dir there too, I think it would
I will publish a new bb
tomorrow to support new efforts in #cursive and LSP to get better babashka script support (resolving of vars for static analysis + nREPL). I upgraded deps.clj to match the newest clojure CLI (so bb clojure
should work with the new tools stuff as well). Please give it a spin.
Linux:
https://21422-201467090-gh.circle-artifacts.com/0/release/babashka-0.5.1-SNAPSHOT-linux-amd64-static.tar.gz
macOS:
https://21427-201467090-gh.circle-artifacts.com/0/release/babashka-0.5.1-SNAPSHOT-macos-amd64.tar.gz
Windows:
(build still going: https://ci.appveyor.com/project/borkdude/babashka/builds/40221161/artifacts)
/cc @cfleming @ericdallo
@ericdallo Please wait publishing clojure-lsp until I also get the clj-kondo issue sorted, if you can :)
This may be a bit out there,,, but has anyone an example of using babashka to convert a series of clojure hash maps into individual curl scripts ? I want to populate a dynamodb database via an API I have for staging and production environments, which I'm supposed to use a script (although will anyone know if I switch on an nREPL server...)
How general are your maps? You may be able to use selmer to convert them into the text you want. The difficulty of that approach is correlated with how many curl features or flags you want to use
Its a completely flat map with keywords and mostly strings as values {:account-id "" :account-name "" :status true ,,,}
and about 6 other key values pairs the same
@jr0cket do you mean, you would like to insert this as JSON with a POST request and you would like the curl command line format for this?
Suppose I’ve written a babashka script with a couple of external project dependencies; what’s the best way of packaging that up into something a not-super-technical person without babashka installed could easily download and run?
I was thinking applying uberscript and https://github.com/MnRA/nativity might be the solution, but nativity doesn’t seem to work for me at all when playing with it locally
@aengelberg actually, the upcoming 0.5.1 version has a new CLI option calls print-deps
which prints a deps.edn map with all built-in deps + external deps
you could then use that for making a native CLI. I've illustrated here how you could do that, once you have a deps.edn: https://github.com/borkdude/jayfu
but to be honest, just letting the other person install babashka is maybe easier since you won't have to deal with all your consumer's OSes, etc.
I can have a hack around with something in the morning... I am exhausted now.. its been a long 12+ at work 😞
interesting
btw thanks for all the work on babashka, just started using it recently and really enjoying it!
I’m not really sure how binaries work, but do you think it’s possible (for each OS) to combine the existing bb
binary and a script into a single binary that just feeds the script to bb?
without really knowing the internals, it feels like that should be technically feasible without having to re-run GraalVM
this feature has been requested more often, but this is similar to packaging up a complete nodejs or python + scripts. Usually it's easier to just install node on the other side and them let them use the script
Perhaps it is possible to package some extra resources into a binary, but I don't know how
running a bb uberjar requires JVM installed, right?
To be sure I asked the binary + resources question in the GraalVM slack (https://graalvm.slack.com/archives/CN9KSFB40/p1627930036001500)
thank you!