Fork me on GitHub
#babashka
<
2022-09-25
>
Bob B15:09:21

Maybe I'm just overlooking something/not awake yet, but am I right in thinking that babashka.curl/*defaults* is not exposed in bb (in the built-in, that is)? Was looking to turn off compression by default on Windows (ya know, because Windows)

borkdude15:09:28

You're right, this is not exposed, but you could also install a newer curl which does support compression

👍 1
borkdude15:09:57

I've asked the Windows maintainers a few times to update their outdated curl and support compression which is pretty much available everywhere

borkdude15:09:53

Of course we could expose it, it's just that it hasn't come up before

borkdude15:09:12

@U013JFLRFS8 Feel free to submit a PR. We could also have a function curl/disable-compression! which alters the global var

Bob B16:09:40

I should probably just take away the age-old lesson: "don't rely on Windows command line tools"

borkdude17:09:16

well, bb.curl was built with the assumption that curl is everywhere (on people's computers)

borkdude18:09:54

@U013JFLRFS8 I've considered disabling compression on Windows by default, but I've never heard any complains so I just assumed that people would upgrade their system's curl

borkdude18:09:37

I'm open to suggestions

Bob B18:09:18

I did upgrade my curl - I think I was just a bit tunnel-visioned because I was addressing a windows issue in bbin

❤️ 1
borkdude16:09:41

I've also considered try/catching the request in case compression isn't supported where it retries the request without compression... and perhaps the detection of the curl that doesn't support compression could be cached

lread15:09:22

I’m a heavy (and grateful) user of bb for scripting. I typically put my bb source code directly under ./script and set my bb.edn :paths to ["script"]. This leads to bb code with single segment namespaces. What do you think? Is that in any way a bad thing for bb scripts? Or totally fine?

borkdude15:09:55

My convention lately is to do the same but put the code in $project/bb - totally random

borkdude15:09:09

so :paths ["bb"]

borkdude15:09:24

single segment is fine for scripting.

lread15:09:36

Coolio, thanks!

lread15:09:17

I kind of like using ./script for the element of surprise. simple_smile Many folks think they’ll find bash files, they look inside and see .clj files. And 🤯.

Bob B15:09:04

as someone who is still daily driving windows, this is a welcome surprise for me 🙂

lread15:09:43

Excellent, I’ll keep it up then!

lread15:09:32

But I’m also a weirdo.

borkdude15:09:46

yeah, fine with me :man-shrugging: 😆