This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-11
Channels
- # aleph (50)
- # announcements (20)
- # babashka (68)
- # beginners (70)
- # calva (25)
- # cider (1)
- # clj-kondo (10)
- # cljs-dev (3)
- # clojars (1)
- # clojure (113)
- # clojure-australia (7)
- # clojure-berlin (4)
- # clojure-europe (47)
- # clojure-italy (14)
- # clojure-nl (2)
- # clojure-norway (1)
- # clojure-serbia (5)
- # clojure-spec (11)
- # clojure-uk (8)
- # clojurescript (16)
- # community-development (2)
- # conjure (2)
- # cursive (15)
- # data-oriented-programming (35)
- # datahike (12)
- # datascript (5)
- # datomic (13)
- # duct (7)
- # fulcro (21)
- # graalvm (94)
- # graphql (1)
- # helix (4)
- # honeysql (19)
- # jackdaw (8)
- # jobs (2)
- # jobs-rus (1)
- # leiningen (1)
- # malli (32)
- # missionary (1)
- # mount (1)
- # off-topic (40)
- # perun (2)
- # portal (7)
- # reitit (10)
- # rewrite-clj (26)
- # shadow-cljs (90)
- # spacemacs (29)
- # sql (17)
- # tools-deps (49)
- # wasm (1)
- # xtdb (26)
Any preferences between the two competing babashka file watchers? https://github.com/babashka/pod-babashka-fswatcher or https://github.com/babashka/pod-babashka-filewatcher?
@borkdude cool, thanks. Now I’m stuck trying to figure out what the latest https://github.com/babashka/pods version is. I want to use it from the JVM
I'm using the Rust one in the babashka book for watching changes: https://github.com/babashka/book/blob/master/script/watch.clj Together with etaoin to show the changes in a browser 😎
$ clj
Clojure 1.10.1
user=> (require '[babashka.pods :as pods])
nil
user=> (pods/load-pod 'org.babashka/filewatcher "0.0.1")
#:pod{:id "pod.babashka.filewatcher"}
user=> (require '[pod.babashka.filewatcher :as fw])
nil
user=> (fw/watch "/tmp" prn)
nil
user=> (spit "/tmp/foo.txt" "hello")
nil
user=> {:path "/private/tmp/foo.txt", :type :create}
@borkdude sorry I wasn’t clear: I am getting notifications, but no return value from fw/watch
(like you) to stop the watch again
I guess that only works in the go version? https://github.com/babashka/pod-babashka-fswatcher#usage
ah yes, that's true. this was an issue with the Rust version: I couldn't figure out how to keep a global list of watchers, etc. This is supported in the go one
The go pod's API might still change, so use with caution when upgrading: https://github.com/babashka/pod-babashka-fswatcher/issues/10
btw, there is also pods/unload-pod
which will accept the return value from load-pod
, to tear down the pod itself. this might have worked with the Rust one as well
you will need to call load-pod again and also reload the namespaces associated with it, if you want to use it again (I think)
CircleCI has granted me linux arm64 access, so I guess we'll have raspberry binaries hopefully soon :)
raspberry pi still runs on 32 bit mode by default 🙂
I just happen to freshly be aware of it since I wanted BB for my pi already
FYI, I just tried to install babashka on a Synology NAS but the official install script doesn't work... DSM, Synology's OS, doesn't have a proper package manager and so unfortunately unzip can't be installed without going through hoops.
For some peculiar reason it does have 7z though, so changing https://github.com/babashka/babashka/blob/39284ae707451d59bf7eedc46bbd42a948511d14/install#L75 to 7z x "babashka-$version-$platform-amd64.zip"
seems to fix the problem.
I understand I'm in a niche minority but is there a chance this could somehow be added to the README?
Ah, not sure, let me check
tar is installed as well and it's more ubiquitous, so maybe it's a better choice indeed
@pavlos Even better, we can make the script detect unzip or 7z and handle it that way ;)
I actually hit the unzip error
I was trying to install bb into a docker container and the ubuntu base image doesn’t start with unzip, but does have targz
might be better to detect tar vs unzip and download the appropriate file AFTER that’s determined?
certainly
and also change the installer script (for next release). I think it would be best if the bash script does unzip or tar gz based on the extension, so it can still install older versions
I will show a PR with my idea
oh, you don’t release as tgz 😞
my proposal is that we can switch to tgz but the script also needs to support installing older versions
yep, I understand now
nice trick: tar
works on .zip
[g ~/xx] $ tar xvf babashka-0.2.13-macos-amd64.zip
x bb
[g ~/xx] $ file *.zip
babashka-0.2.13-macos-amd64.zip: Zip archive data, at least v2.0 to extract
of course
of course maybe not all versions of tar can do this
that part I Don’t know
doesn't work on DSM (tar v1.28):
$ tar xvf babashka-0.2.13-linux-amd64.zip
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
nor fedora 33 (tar v1.32, same error as above)I’m trying to import a package from a jar that I have locally. I used add-classpath
to add the jar to class-path, but on import I get Unable to resolve classname
. I have verified that the classes I’m importing are in the jar and I’ve printed get-classpath
and verified that the jar is there. What can I be missing?