babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
Max Rothman 2020-11-23T16:37:05.454900Z

Is BigDecimal not supported in babashka? I can call bigdec fine, but when using with-precision. I get a “could not resolve symbol”

borkdude 2020-11-23T16:38:54.455600Z

@max.rothman That's a macro that does seem to be missing from babashka. If you could post an issue about this, it will probably end up in the next release.

👍 1
Max Rothman 2020-11-23T16:41:46.455800Z

https://github.com/borkdude/babashka/issues/662

borkdude 2020-11-23T16:42:44.456100Z

Thanks

Max Rothman 2020-11-23T16:46:51.456300Z

Do you know a workaround in the meantime? I tried simply dropping the macro definition into my script and I’m getting errors about a missing binding *math-context*.

borkdude 2020-11-23T16:49:09.456500Z

I had to look this up, but this seems to work:

$ bb -e '(.setScale 0.00123M 3 BigDecimal/ROUND_HALF_EVEN)'
0.001M

alidlorenzo 2020-11-23T22:11:18.458400Z

I’m trying to use latest babaskha/process in a script, and seeing the following error

java.lang.ClassCastException: java.lang.Class cannot be cast to java.util.concurrent.Future [at /Users/Alid/.gitlibs/libs/babashka/babashka.process/249ddcfd1a5825f33adacc9cfde72a0c3823bdc9/src/babashka/process.clj, line 48, column 1]
could this be a bug? it happens just by requiring babaskha.process.

borkdude 2020-11-23T22:12:24.458700Z

@alidcastano which version of bb are you using?

alidlorenzo 2020-11-23T22:12:36.459200Z

git lib, latest sha

borkdude 2020-11-23T22:12:44.459500Z

no, bb itself?

alidlorenzo 2020-11-23T22:13:08.459900Z

oh sorry I thought you meant what version of babashka.process

alidlorenzo 2020-11-23T22:13:18.460200Z

i can try updating babashka, not sure which version I’m in

borkdude 2020-11-23T22:13:24.460400Z

bb --version

alidlorenzo 2020-11-23T22:13:36.460800Z

0.1.3

borkdude 2020-11-23T22:13:41.461Z

you don't need babashka.process as a git lib, it's built into the latest babashka, 0.2.3

alidlorenzo 2020-11-23T22:13:58.461300Z

oh ok, version I’m in did not have it built-in so I’ll upgrade

👍 1