Fork me on GitHub
#babashka
<
2020-11-23
>
Max Rothman16:11:05

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

borkdude16:11:54

@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.

👍 3
Max Rothman16:11:51

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*.

borkdude16:11:09

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

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

alidlorenzo22:11:18

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.

borkdude22:11:24

@alidcastano which version of bb are you using?

alidlorenzo22:11:36

git lib, latest sha

borkdude22:11:44

no, bb itself?

alidlorenzo22:11:08

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

alidlorenzo22:11:18

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

borkdude22:11:24

bb --version

borkdude22:11:41

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

alidlorenzo22:11:58

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

👍 3