This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-31
Channels
- # aws (18)
- # babashka (35)
- # beginners (7)
- # cider (3)
- # clara (2)
- # clj-kondo (15)
- # cljs-dev (1)
- # cljsrn (3)
- # clojure (20)
- # clojure-canada (1)
- # clojure-dev (3)
- # clojure-spec (17)
- # clojure-uk (13)
- # clojutre (1)
- # cursive (7)
- # datomic (1)
- # duct (7)
- # fulcro (33)
- # helix (77)
- # jobs (3)
- # malli (15)
- # meander (3)
- # off-topic (30)
- # pathom (3)
- # quil (1)
- # reagent (1)
- # reitit (10)
- # shadow-cljs (2)
- # tools-deps (5)
- # xtdb (6)
- # yada (1)
might be interesting for folks, this is a bb
wrapper script that I've been dropping into projects as bin/bb
https://github.com/lambdaisland/open-source/blob/master/bin/bb
@mkvlr came up with the first version of this, I added several extras like the version check bb_deps.edn
, rlwrap
@plexus very cool. are you aware of deps.clj? with it, you can prevent doing this: https://github.com/lambdaisland/open-source/blob/336e30a529b7f50db2a998d1f9f43dfc7cc71b65/bin/bb#L95
ah that's good to know. pretty annoying that clojure CLI won't let you ignore the local deps.edn
deps.clj is a port of the clojure
bash script to babashka, with some extra options. it can be used as a drop in replacement to start normal JVM Clojure programs, but also babashka ones.
yeah I've seen that, will have a look at how best to integrate it. Would actually be great if this script didn't rely on clojure
at all
deps.clj is self-installable: the only thing you need to do is download the script (or native executable) and have java
installed. the rest will install itself. works cross-platform
clojure
also supports CLJ_CONFIG
, an alias might also work. some ideas to work with 🙂
Some feedback from a user comparing Python to babashka: https://github.com/borkdude/babashka/issues/457 Feel free to respond on it with your ideas of how things should be.
On the python batteries included comparison I do like this comparison of similar scripting languages by hyperpolyglot https://hyperpolyglot.org/scripting2 An extra column for bb would be a very useful resource for recruiting/orienting new users to babashka.
Am advantage of deps.clj's approach is that it works on windows. All bash script approach will struggle there otherwise.
done: https://github.com/borkdude/babashka/issues/458 will be part of the next release
@dominicm wasn't succesful. reflection warnings in clojure.data. I'll have to make an inlined version of that:
user=> (load-file "/tmp/data.clj")
Reflection warning, /tmp/data.clj:85:39 - reference to field getClass can't be resolved.
Reflection warning, /tmp/data.clj:85:39 - reference to field isArray can't be resolved.
Reflection warning, /tmp/data.clj:87:42 - reference to field getClass can't be resolved.
Reflection warning, /tmp/data.clj:87:42 - reference to field isArray can't be resolved.
#'clojure.data/diff
and probably a patch for Clojure@dominicm Success:
$ ./bb "(require '[clojure.data :as d]) (d/diff [1 1 2] [1 2 2])"
[[nil 1] [nil 2] [1 nil 2]]
Just used babashka to sync my Plex watch status to Jellyfin. Moving me from closed source media management to totally open source media :)
Hmm.. got most of the way through. I think we may be a little fast for the API. Thread/sleep to the rescue :)
Is turning on reflection standard at every ns level? I mean is that a standard for the clojure namespaces?