Is BigDecimal not supported in babashka? I can call bigdec
fine, but when using with-precision
. I get a “could not resolve symbol”
@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.
Thanks
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*
.
I had to look this up, but this seems to work:
$ bb -e '(.setScale 0.00123M 3 BigDecimal/ROUND_HALF_EVEN)'
0.001M
https://stackoverflow.com/questions/9482889/set-specific-precision-of-a-bigdecimal
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
.@alidcastano which version of bb are you using?
git lib, latest sha
no, bb itself?
oh sorry I thought you meant what version of babashka.process
i can try updating babashka, not sure which version I’m in
bb --version
0.1.3
you don't need babashka.process as a git lib, it's built into the latest babashka, 0.2.3
oh ok, version I’m in did not have it built-in so I’ll upgrade