Fork me on GitHub
#babashka
<
2020-09-22
>
robert-stuttaford05:09:22

@borkdude is there a special trick to make #!/usr/bin/env bb style scripts run within emacs? on a project where a .git/hooks/pre-commit uses bb but it doesn't work when used from magit

env: bb: No such file or directory
edit: found https://github.com/purcell/exec-path-from-shell

sogaiu06:09:18

fwiw, if you start your emacs from a terminal and things work it may mean that env var settings for certain dot files could use being elsewhere. i have this issue from time to time when using different distributions of linux as the proper location can vary. for example, currently i place some things in ~/.profile, but depending on one's shell and other factors, it may be better to put such settings in other files. if you're using macos there may be a relatively common answer to this issue (though if you've decided to use a shell other than the default possibly it may differ).

borkdude07:09:42

@robert-stuttaford yes, that's also in my init.el:

exec-path-from-shell ;; fix path in Emacs by reading from .zshenv
along with this:
(when (memq window-system '(mac ns))
  (setenv "SHELL" "/bin/zsh")
  (exec-path-from-shell-initialize)
  (exec-path-from-shell-copy-envs
   '("PATH")))

Daniel Tan10:09:28

anyone used babashka for high level k8s configuration?

borkdude10:09:21

@danieltanfh95 Does k8 use yaml? I do use it for CircleCI config generation. Not so familiar with k8s myself.

Daniel Tan10:09:29

yeah it does

Daniel Tan10:09:34

there’s a bunch of repeated stuff that i’m wondering if it’s worth to semi automate it away with a configuration-for-configuration kinda setup

borkdude10:09:49

I forgot for which project I'm doing this.. argh

Daniel Tan10:09:52

i’ll take a look when i get home

jeroenvandijk13:09:18

Are people already using Babashka to write linux services?

borkdude13:09:10

Is there anything bb can't do that's needed for this?

jeroenvandijk14:09:14

Don't think so. Just wondering, might be quicker to see an example in case there are pitfalls

borkdude14:09:42

I'll make a release at the end of the week that includes httpkit client and server (the server is marked experimental, until I'm convinced this is a good choice :))

jeroenvandijk21:09:39

Makes sense. I don't think they are needed for this particular case if that's what you mean, I'm guessing babashka.curl is enough for this one

dharrigan15:09:27

Looking forward to testing that out.

tzzh15:09:11

Hey I have hacked a super basic pod to interact with dynamodb using the go aws sdk https://github.com/tzzh/pod-tzzh-aws, I have only added a few dynamodb functions for now but it should be really easy to add other dynamodb functions (and AWS components). I don’t write go very often so the code might not be great at the moment but if I end up using it a lot I’ll try and make it better so it can be useful for other people as well

❤️ 3
🎉 3
borkdude15:09:15

Awesome. This is exactly how I envisioned something around AWS (either go, python or clj graal-native)

nate15:09:50

this looks like a great start

tzzh15:09:18

yeah you mentioned it ~10 days ago then I was on holidays for a week but that’s the first thing I did on my day back 😂

borkdude15:09:15

one small note: maybe call pod.dynamodb pod.tzzh.dynamodb, to avoid potential clashes (although it would be unlikely, this is what I've done in most pods)

tzzh15:09:16

ah yes good point :thumbsup: