Fork me on GitHub
#babashka
<
2021-05-10
>
dorab01:05:30

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

solf03:05:13

This might be tangential, but here鈥檚 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))

David Pham09:05:36

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

borkdude09:05:15

@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

David Pham09:05:26

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

borkdude09:05:50

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

David Pham09:05:47

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.

David Pham09:05:03

This allows you to serialize the template

David Pham09:05:12

so you could have your template in plain .edn file

David Pham09:05:50

when your logic is mostly replacing the fields with data.

David Pham09:05:55

does it make sense?

David Pham09:05:33

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

borkdude09:05:35

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

David Pham09:05:54

thanks for your hinsight 馃檪

David Pham09:05:57

hindsight 馃檪

Karol W贸jcik16:05:09

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

borkdude16:05:14

yes

馃憤 3
grazfather16:05:14

a static binary would be great

borkdude16:05:57

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

馃憤 3
grazfather17:05:13

馃槈 that鈥檚 the plan

john-shaffer18:05:12

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-shaffer18:05:29

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

borkdude18:05:02

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

john-shaffer18:05:37

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

john-shaffer18:05:03

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

borkdude18:05:04

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

borkdude18:05:15

it's compatible with bb afaik

borkdude18:05:35

if you want to shell out to mysql

borkdude18:05:04

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

borkdude18:05:29

A direct PR to that project would work too

馃憤 3
borkdude18:05:59

The project is looking exciting btw!