babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
kokada 2021-05-10T01:09:11.156600Z

> My suggestion is maybe releasing this static version with musl separated from the other static binary, at least until we can figure out why this tests are flakly. Actually, after more testing maybe it is fine. It is just some libs that fail sometimes (but when it works all tests pass), and this musl based binary should work in any Linux system, so this is still a win in my book. The current static binary based on glibc seems more useless in comparison. When it fails it fails hard, and most of the time people are better using the non static version anyway. I also don't think the static glibc version works in Alpine anyway since Alpine is a musl based system (I may be wrong here). My opinion is to release it as is, just leaving somewhere in the release notes that this release is more unstable than the non-static build so the non-static build is still preferred. My 2c.

kokada 2021-05-10T01:11:37.157Z

(And we keep track of new GraalVM releases, I think it is a bug there that will eventually be fixed. It does seem that with GraalVM 21.1 this bug is more difficult to trigger, but this is completely a non-scientific observation.)

dorab 2021-05-10T01:37:30.157200Z

Thanks. Yes, *~ is all files ending in tilde.

solf 2021-05-10T03:10:13.157300Z

This might be tangential, but here’s a better way to solve the emacs ~ files issue: Tell emacs to create them in a dedicated directory (in this example ~/.emacs/savefile/):

(defconst savefile-dir (expand-file-name "savefile" user-emacs-directory))
;; create the savefile dir if it doesn't exist
(unless (file-exists-p savefile-dir)
  (make-directory savefile-dir))

2021-05-10T09:01:36.164Z

Hello πŸ™‚ congrats on 0.4.0! It is a big release. I wonder with the addition to Selmer, if we could also consider adding this library from Yogthos for templating with hiccup? https://github.com/yogthos/hiccup-template

borkdude 2021-05-10T09:08:15.165200Z

@neo2551 I think you could also just run that lib from source? It doesn't seem like a popular, widely used library yet, so including it seems pre-mature

2021-05-10T09:13:26.166200Z

Make sense :), but yes you could use from source indeed. I just find it more natural as a Clojure dev.

borkdude 2021-05-10T09:15:50.167200Z

We already have hiccup included. This library seems to re-implement hiccup. Why do you need this lib?

2021-05-10T09:18:47.170400Z

Because for now, we generate hiccup through function calls as in (defn f [x] [:div x]) whereas with template, you can define a plain data structure [:div :data/x] and then replace :data/x with the hiccup-template/hiccup function.

2021-05-10T09:19:03.170800Z

This allows you to serialize the template

2021-05-10T09:19:12.171100Z

so you could have your template in plain .edn file

2021-05-10T09:19:50.171600Z

when your logic is mostly replacing the fields with data.

2021-05-10T09:19:55.171800Z

does it make sense?

2021-05-10T09:20:33.172600Z

I would say we dissociate the act of writing the template and the function call?

borkdude 2021-05-10T09:23:35.173600Z

yeah, I think the library is basic enough to be run from source right now.

2021-05-10T09:24:54.173800Z

thanks for your hinsight πŸ™‚

2021-05-10T09:24:57.174Z

hindsight πŸ™‚

martinklepsch 2021-05-10T11:44:05.175700Z

πŸŽ‰ 5
borkdude 2021-05-10T16:22:12.180100Z

New static linux binary for testing: https://18553-201467090-gh.circle-artifacts.com/0/release/babashka-0.4.1-SNAPSHOT-linux-amd64-static.tar.gz

Karol WΓ³jcik 2021-05-10T16:23:09.180200Z

@borkdude Static binary is basically an executable with musl built in?

borkdude 2021-05-10T16:24:14.180500Z

yes

πŸ‘ 1
grazfather 2021-05-10T16:52:14.180800Z

a static binary would be great

borkdude 2021-05-10T16:52:57.181100Z

well, ^ there is one, try it out? :)

πŸ‘ 1
grazfather 2021-05-10T17:42:13.181500Z

πŸ˜‰ that’s the plan

john-shaffer 2021-05-10T18:19:12.183400Z

We're releasing an MIT-licensed project using babashka to to configure WordPress servers on EC2. The MySQL code is more robust than the examples (it can handle tabs), although not suitable for untrusted/arbitary input. Code's at https://github.com/staticweb-io/staticweb-open-wp/tree/master/static-wp-daemon/src/io/staticweb/static_wp_daemon

john-shaffer 2021-05-10T18:19:29.184Z

@borkdude Do you still want a MySQL/MariaDB example app? I just saw https://github.com/babashka/babashka/issues/387

borkdude 2021-05-10T18:22:02.184600Z

@jshaffer2112 That was more about adding feature flags to babashka to support the mysql driver than about shelling out to the mysql binary.

john-shaffer 2021-05-10T18:22:13.184800Z

I know

john-shaffer 2021-05-10T18:22:37.185300Z

I'd much rather use JDBC than deal with the hellscape of mysql escaping

john-shaffer 2021-05-10T18:23:03.185900Z

I'd be happy to write an app up if it would help

borkdude 2021-05-10T18:23:04.186Z

@jshaffer2112 I think honeysql (v2) can be of service here

borkdude 2021-05-10T18:23:15.186200Z

it's compatible with bb afaik

borkdude 2021-05-10T18:23:35.186500Z

if you want to shell out to mysql

borkdude 2021-05-10T18:24:04.186900Z

ah yeah, it would be nice to have a reference example of how to do graalvm native with mysql

borkdude 2021-05-10T18:24:17.187100Z

Then we can add support to https://github.com/babashka/babashka-sql-pods

borkdude 2021-05-10T18:24:29.187600Z

A direct PR to that project would work too

πŸ‘ 1
borkdude 2021-05-10T18:24:59.187900Z

The project is looking exciting btw!