@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-shellfwiw, 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).
@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")))
anyone used babashka for high level k8s configuration?
@danieltanfh95 Does k8 use yaml? I do use it for CircleCI config generation. Not so familiar with k8s myself.
yeah it does
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
I forgot for which project I'm doing this.. argh
oh right, here it is @danieltanfh95: https://github.com/babashka/babashka-sql-pods/blob/master/script/generate_circleci.clj
i’ll take a look when i get home
thanks!
Are people already using Babashka to write linux services?
I’m considering porting aws-codedeploy-agent to Babashka https://github.com/aws/aws-codedeploy-agent/blob/master/init.d/codedeploy-agent
Is there anything bb can't do that's needed for this?
Don't think so. Just wondering, might be quicker to see an example in case there are pitfalls
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 :))
The next babashka will include httpkit client and server and many improvements! Pre-release binaries: - macOS https://11871-201467090-gh.circle-artifacts.com/0/release/babashka-0.2.1-SNAPSHOT-macos-amd64.zip - linux https://11869-201467090-gh.circle-artifacts.com/0/release/babashka-0.2.1-SNAPSHOT-linux-amd64.zip - Windows https://ci.appveyor.com/api/buildjobs/5a76yn0fnh78nrgp/artifacts/babashka-0.2.1-SNAPSHOT-windows-amd64.zip Consider testing! Official release will follow within a few days.
Looking forward to testing that out.
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
Awesome. This is exactly how I envisioned something around AWS (either go, python or clj graal-native)
this looks like a great start
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 😂
added it here: https://github.com/borkdude/babashka/blob/master/doc/libraries.md#pods
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)
ah yes good point :thumbsup:
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