Fork me on GitHub
#babashka
<
2023-09-08
>
danm14:09:54

Is it possible to tell babashka to use a different directory for deps downloads? I'm trying to run it within a sandbox and it's erroring because it wants to fetch a specific version of clojure-tools to ~/.deps.clj/, but that directory isn't writable to it. I was hoping that --deps-root would do that, but seemingly not

borkdude14:09:56

Same options as tools-deps

danm14:09:37

Ahha. DEPS_CLJ_TOOLS_DIR works, ta 🙂

borkdude14:09:10

oh that option, I see, yeah

danm14:09:49

Out of interest, given that that seems to reference $HOME by default, why didn't it work when I tried export HOME=/tmp/path before running the process? How was it still looking up what my homedir 'should' be?

borkdude14:09:37

it looks up home via (System/getProperty "user.home")

danm14:09:24

Hmm, I wonder where that gets it from when invoked if not just (System/getenv "HOME")

borkdude14:09:06

not sure how JVM does that

borkdude14:09:58

HOME is OS-specific, perhaps this is why JVM has their own way of doing this

borkdude21:09:40

Seems reasonable. Before Java 17 there's already a bunch of ways to do it, of which you are probably aware

daveliepmann21:09:40

I'm short on ideas, actually. Looking to make a hex literal out of a string, e.g. 0xFFE8993C from "#E8993C"

daveliepmann21:09:14

now I doubt this class would help 💩

daveliepmann21:09:30

thanks for the quick response, nevermind I think

Bob B23:09:44

in case it helps, Integer/parseInt can do different radixes:

user=> (Integer/parseInt "E8993C" 16)
15243580
user=> 0xe8993c
15243580

👍 2
daveliepmann20:09:29

my issue was much simpler — coding late enough into the night that I got hyperfocused on constraining my solution in a way which actually didn't matter :face_palm: i'm using clojuredart and flutter is a diva about defining colors from hex strings (which is how the source data is) but works well with hex literals (`(m/Color 0xFFFF9800)`). I wanted to preserve visual recognizability so I got hung up on finding a way to get literals from the strings. meanwhile flutter works great with (A)RGB and I had a perfectly good 10-year-old util function hex-to-argb which worked as soon as I tried it. sorry for the wild goose chase