This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-03
Channels
- # announcements (2)
- # babashka (15)
- # beginners (40)
- # calva (11)
- # cherry (2)
- # cider (3)
- # cljsrn (2)
- # clojure (37)
- # clojure-austin (4)
- # clojure-europe (2)
- # clojurescript (16)
- # core-async (1)
- # datomic (25)
- # hyperfiddle (18)
- # jobs-discuss (9)
- # nbb (7)
- # off-topic (19)
- # pathom (6)
- # podcasts-discuss (4)
- # portal (37)
- # practicalli (1)
- # re-frame (11)
- # releases (1)
- # scittle (13)
- # shadow-cljs (6)
Does anyone know how to properly require core.matrix in cljs? I have aljabr as a dependency, I’ve tried the different suggestions I’ve found on stack overflow etc, but I’m getting this error "No dynamic loading of implementations in Clojurescript. You must require an implementation explicitly in a namespace, for example thinktopic.aljabr.core"
For reference, see how the implementation is required in the test namespace (I assume their tests run just fine, I haven't actually checked): https://github.com/originrose/aljabr/blob/master/test/thinktopic/aljabr/test_all.cljc#L3-L6
Currently requiring and calling it like this, still getting the above error.
The error goes away if I take out the test-mat bit. using shadow.cljs if thats relevant?
Shadow-cljs shouldn't be relevant here.
But that test NS is incomplete in the sense that it only uses mat/shape
from the whole core.matrix
API.
mat/matrix
works without the keyword, the issue is seemingly only when I call mat/inverse
on something.
or, on a matrix, specifically
But does adding that keyword fix the error? Regardless of what expression resulted in the error.
Adding the keyword to mat/inverse
before the matrix throws an error, too many arguments
I tried this (mat/inverse (mat/matrix :aljabr [[1 2][3 4]]))
and got this error INFO: No dynamic loading of implementations in Clojurescript.
You must require an implementation explicitly in a namespace, for example thinktopic.aljabr.core
.
Instead of explicitly providing that keyword every time, you can also do (mat/set-current-implementation :aljabr)
, just like here: https://github.com/mikera/core.matrix/blob/develop/src/test/cljs/clojure/core/matrix/test_basics.cljs#LL19C41-L19C41
Judging by the implementation, it will still result in that error. But it's a false symptom because the error is printed unconditionally.