mikera / core.matrix

core.matrix : Multi-dimensional array programming API for Clojure
Other
701 stars 113 forks source link

`pm` (pretty print) undefined in clojurescript #347

Open SolbiatiAlessandro opened 3 years ago

SolbiatiAlessandro commented 3 years ago

I love core.matrix in my clojurescript project, and I am using the https://github.com/originrose/aljabr implementation. Everything works, beside pm.

(require '[clojure.core.matrix :as mat])
dev:cljs.user=> (def m (mat/matrix :aljabr [[1 2]]))
#'cljs.user/m
dev:cljs.user=> (mat/esum m)
3
dev:cljs.user=> (mat/pm m)
----  Compiler Warning on   <cljs form>   line:1  column:2  ----

  Use of undeclared Var clojure.core.matrix/pm

  1  (mat/pm m)
      ^---

----  Compiler Warning  ----
#object[TypeError TypeError: Cannot read property 'call' of undefined]
dev:cljs.user=> (doc mat/pm)
nil

The commands above are executed in the lein figwheel repo, in my dependencies I have [net.mikera/core.matrix "0.62.0"] [thinktopic/aljabr "0.1.1"].

Any ideas what's wrong with pm?

pedrorgirardi commented 3 years ago

@SolbiatiAlessandro pm doesn't seem to be available in ClojureScript - there's a reader conditional for clj, but not for cljs.