Fork me on GitHub
#babashka
<
2020-07-28
>
borkdude10:07:45

@vlaaad wrote a blog post about a simple way of parsing CLI args for Clojure centric scripts: https://vlaaad.github.io/tools-cli-in-10-lines-of-code Made a minor variant of it that works with bb scripts without a -main: https://gist.github.com/borkdude/b5e14978572e4658bf74e9451ed5c322

vlaaad10:07:21

By the way, I realised I don’t need resolving symbols for my use-case and went with a bit simpler approach for reveal entry point https://github.com/vlaaad/reveal/blob/91118db960f00e6048bd8e512f1e0dfeb897b3ff/src/vlaaad/reveal.clj#L84-L89

royalaid21:07:48

Hey all, I am trying to plug together babashka and camel-snake-kebab in an uberscript but it appears that the NS’s get copied in to my file out of order so the ubserscript output needs to be rearranged

royalaid21:07:04

Is this a known issue or should I file in it on the babashka github?

borkdude21:07:38

Hmm, it should be copied in the order that the namespaces are required in.

borkdude21:07:41

If that's not the case, then it's probably a bug. An issue with repro would be good, I can take a look tomorrow

royalaid21:07:32

Sounds good, got a bunch of other work stuff on my plate ATM so I will try to get a repro together in the next couple of days

royalaid21:07:01

Also usability question, when including the shebang for bb it looks like it doesn’t get moved to the top of an uberscript, is this intentional?

royalaid21:07:28

If so, no big deal I can just make a little script that moves the shebang back to the top

borkdude21:07:08

I think uberscript just copies the namespace source as is. And it doesn't put a shebang on the top for the resulting script.

borkdude21:07:08

so if you require A and A requires B then the source code of ns B is copied on top, then A

borkdude21:07:41

shebangs in the middle of the code just get ignored by clojure (also shebangs at the start, it's only there for bash reallly)

borkdude21:07:25

turning off my computer now, sleep. talk later