Fork me on GitHub
#babashka
<
2023-03-26
>
judepayne09:03:20

Hi, I have a babashka/ clojure library for storing encrypted information. One interface to it is a command line tool wrapper. What are my options for keeping state between subsequent invocations of the command line tool? Ideally I'd like to keep state in memory since it's sensitive, but I think I am limited to disk/ environment variables? Perhaps I need to wrap the library as a pod so that it's a process. Would appreciate a pointer to a simple 'training' clojure based pod to use as a template for implementing the bencode interface etc. ps. I am aware of the stash pod but have written my own since I wanted a different cryptographic scheme for it.

borkdude10:03:09

For keeping state you can use the disk or a database. Stash also came to my mind. For a database, maybe the sqlite pod

borkdude10:03:25

or just shelling out to sqlite

Benjamin10:03:09

I can use deps.edn deps from bb.edn right

💡 2
borkdude11:03:10

Yes, via :local/root

borkdude11:03:20

{my/dep {:local/root "."}}

keychera11:03:59

Would babashka ignore :deps in deps.edn that's already built-in (like core.match ot httpkit)? I'm trying to make my bb scripts works in jvm and I want to make sure it's still free of java deps if it's used via babashka

borkdude11:03:39

babashka's built-in namespaces take precedence over deps.edn dependencies, unless they are required with :reload

borkdude11:03:06

so what you are doing should work

keychera11:03:42

I see, thanks for the clarification!