This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-09
Channels
- # announcements (47)
- # asami (43)
- # babashka (37)
- # beginners (119)
- # bitcoin (1)
- # calva (5)
- # circleci (5)
- # clj-kondo (36)
- # cljs-dev (5)
- # cljsrn (1)
- # clojure (92)
- # clojure-australia (2)
- # clojure-bay-area (2)
- # clojure-europe (121)
- # clojure-italy (7)
- # clojure-japan (1)
- # clojure-nl (4)
- # clojure-serbia (2)
- # clojure-uk (66)
- # clojuredesign-podcast (2)
- # clojurescript (19)
- # conjure (2)
- # cursive (13)
- # data-oriented-programming (2)
- # datomic (53)
- # defnpodcast (7)
- # depstar (33)
- # events (1)
- # fulcro (21)
- # graalvm (47)
- # jobs (1)
- # kaocha (1)
- # lambdaisland (1)
- # luminus (2)
- # malli (14)
- # membrane (16)
- # off-topic (45)
- # polylith (2)
- # re-frame (11)
- # reitit (7)
- # releases (1)
- # reveal (15)
- # rewrite-clj (123)
- # shadow-cljs (7)
- # sql (21)
- # startup-in-a-month (3)
- # tools-deps (25)
- # vim (2)
babashka v0.2.13: minor bugfix/enhancement release https://github.com/babashka/babashka/blob/master/CHANGELOG.md#v0213 Thanks @dstephens, @wilkerlucio, @kiraemclean, @tekacs and @eamonn.sullivan for contributing!
Here's a question: The (probably overly elaborate) https://github.com/eamonnsullivan/backup-scripts I wrote in babashka is working well, and I was thinking I would like to move it to some dedicated hardware. I was thinking of using a Raspberry Pi 4 with a couple of USB SSD disks attached, but am I right in thinking that babashka doesn't yet support that ARM processor? What would be a work-around? I should be able to compile the script into a normal uberjar, right?
There is a thread about ARM here: https://github.com/babashka/babashka/issues/241
Ah, so it looks like progress, but I should probably wait. Presumably I could just add a deps.edn to my project, specifying the dependencies in the usual way and compile it to a jar, right? The Raspberry supports running jars, as far as I know.
Yes, that is certainly possible. But as you can see in that thread, someone already made some ARM binaries available.
And you can possibly compile it yourself on ARM if you need a more updated one. How many GB of memory do you have on ARM?
I'm looking at the P4 with 8GB of RAM. Or, rather, I'm going to ask my kids for one for my birthday...
(I have 5 kids, all in their 20s and 30s, so they can afford it...)
Yes, I'm pretty sure the P4 (and the P3) are 64-bit CPUs.
So I gather cross-compiling isn't a thing...
4GB of memory is probably just a bit too low, so make sure: 64bit and 8gb, this will work. No, GraalVM doesn't support cross compilation
:thumbsup: -- Another side project to add to the ever-growing list.
If there was a CI that exposed linux ARM 64 bit then I would distribute the binary from there
Yeah, AWS EC2 arm-64 instances exists, so technically something like CircleCI should be able to spin one up. I'll google around. I use CircleCI already on one my libs. It would be something to play with until I have an actual Pi to use.
I remember seeing something like 2 shebang lines used in context of babashka, but i can't recall what was it for or where did i see it. For example, u can create self-contained shell scripts which pull their dependencies from the Nix package manager, if u start your script with a "double shebang", like this:
#! /usr/bin/env nix-shell
#! nix-shell -i python3 -p python3 python34Packages.pygobject3 libnotify gobjectIntrospection gdk_pixbuf
I remember there was something similar for babashka:
#!/usr/bin/env bb
#! ... ???
#!/bin/sh
#_(
"exec" "bb" "$0" hello "$@"
)
(prn *command-line-args*)
./script.clj 1 2 3
("hello" "1" "2" "3")
I've asked in #clojure but it is rather bb specific. I want to extract all calls to log/warn from cljc code, using bb (to make a dictionary of possible app errors for users). But edn/read does not handle reader conditionals. Tips? Use it anyway and register custom reader for #? that returns the content as a map {:clj.., :cljs...}? 🙏
@holyjak You can do this from babashka using https://github.com/babashka/pod-babashka-parcera
This will give you the code including the whitespace, you can then select from this code and spit out some data.
Other than that, #rewrite-clj is a really good library for this too, but doesn't work with babashka.
If you want to do this using s-expressions directly, you can also use https://github.com/borkdude/edamame which accepts a :features
option which you can set to #{:cljs}
to only get cljs branches
If you are going with the JVM I would recommend joining #rewrite-clj and use that tool
Thanks a lot!!!
I suggested to @lee that we should maybe work on a rewrite-clj
command line scripting tool for this purpose, I think that would be really neat
Sounds interesting to me! I’m going to try to get rewrite-clj v1 alpha out the door first, getting close!
@lee If you think that rewrite-clj nodes are serializable, then I think a pod can also work
I think it will also be a bit painful when it comes to zippers, so a separate scripting tool makes sense, I think
@holyjak I forgot about https://github.com/borkdude/grasp which is exactly made for this use case: find s-expressions that match a certain shape
Is it bb or Clj-only?