Carsten Behring

Results 517 comments of Carsten Behring

The "renv" package should allow this in some form: https://rstudio.github.io/renv/articles/renv.html

Something like this works: ``` (def t (tech.v3.tensor/new-tensor [4 5])) (import '[org.tribuo.math.la DenseMatrix]) (def jvm (tech.v3.tensor/->jvm t {:base-storage :java-array :datatype :double})) (DenseMatrix/createDenseMatrix (into-array jvm)) #object[org.tribuo.math.la.DenseMatrix 0x49d26eba "DenseMatrix(dim1=4,dim2=5,values=\n\trow 0 [ 0.000000000000000,...

some syntactic sugar for doing ```clojure (require '[clojisr.v1.r :refer [r require-r]]) (require-r '[Require]) (require-r '[base]) (r.Require/Require ["data.table (==1.12.8)" "dplyr" "reproducible" "PredictiveEcology/SpaDES@development" "raster (>=3.1.5)"] :libPaths (r.base/tempdir) :standAlone true) ```

or it could go to `noj` as opinionated support for `Require`

Maybe it is too opinionated to be in Clojisr. R has at least 10 package managers all with pros and cons. I am still dreaming about a perfect "declarative" package...

> Is `clojure.repl.deps` something new? I remember `clojure.main/repl-requires` (that is what CIDER is using to emulate the behavior of the default Clojure REPL). yes it is new. clojure.repl.deps did not...

Root cause is this: ``` (def newsgroups (sklearn.datasets/fetch_20newsgroups :subset "all" :remove (builtins/tuple [ "headers" "footers" "quotes"]))) (.hashCode newsgroups) ``` failing with: ``` Unhandled java.lang.Exception TypeError: unhashable type: 'Bunch' ```

There seems to be the opinion in the java community, that .hashCode implementations should never throw exceptions.

But this seem to be a very special case in Python, where a python type is not hashable. `Bunch` extends `dict`, and `dict` is not hashable in Python.