Fork me on GitHub
Mehdi H.12:12:01

Hi all, Has anyone ever been able to use cljsjs/delaunator? I have tried multiple combinations of (js/Delaunator.from. [[1 2] [2 3] [1 5] [2 4]]) with different point formats (including the one in the example (<>), which is [[1, 2], [2, 3], [1, 5], [2, 4]]. It seems from is not to be called as prototype values as described here (<>) because of how the externs are defined here (<>). The output is : #object[Error Error: No Delaunay triangulation exists for this input.], although the points are not aligned... What am I doing wrong? Thanks!!

Mehdi H.12:12:25

Using (js/Delaunator.from. or (js/Delaunator/from without '.' doesn't even change the error message...


Have you tried wrapping your arrays in clj->js?

Mehdi H.12:12:39

holy hell you're works. Well I am not getting any error. Any idea how to access hashedges from there? Cause the externs contain functions but for instance I can't even find in the original index.js the _hashEdge one


As soon as I see the words "externs" or "cljsjs", I immediately go to shadow-cljs for the help. 🙂 And then I can actually start working instead of yak shaving.


So that's the only advice I can give - use NPM libraries as is and use shadow-cljs.

Mehdi H.12:12:14

haha ok I will have a look! Thanks a lot for the help!!


No problem.

Mehdi H.12:12:40

turned out halfedges are properties of the js object, so (.-halfedges Object) worked 🙂 thanks again!!

👍 1

Hi, Do clojure and clojurescript code are interchangeable? I mean, if i write a program in clojure (that only use the core language features), can i simply change the dependency on clojure by clojurscript an it will work?


roughly @U2KGTH1EG - there are often small differences to take account of


figwheel channels are dead so guess I'll ask here too


i recently updated an old project to figwheel 0.5.19, which seems to have caused it to break somehow. files aren't correctly reloaded in the browser, and i'm presented with Figwheel: error loading filemessage in the console


i tried increasing :time-in-msoption on the server to eliminate a basic timing issue, this looks like a browser issue however


when I make a change, every file that change touches seems to time out independently when attempting to reload in the browser

Mehdi H.15:12:22

Hi all, anyone knows how to get the value at index n of Uint32Array? I can't get the syntax right, and can't find any helpful function or property in here :

Mehdi H.15:12:23

I tried (get-uint32 array index) but it doesn't work

Mehdi H.16:12:00

oh wow...thank you so much rakyi!!! how could I have found this out?

Mehdi H.16:12:04

I tried all sorts of get...but not this one


seems like aget is not on cheatsheet


yeah, it is only in Clojure Cheatsheet

Mehdi H.16:12:22

I'll remember to check both! Thanks again!!

Ben Hammond16:12:30

I am trying to use js/MaterialUIStyles.makeStyles with react/rum/citrus It seems to be absurdly fiddly because • ONLY works as a React hook • rum/defc will ONLY give me a plain-function component (suitable for hooks) if I avoid any kind of mixin complexity Is there a known way to make this less awkward?


would like a non-breaking space in a string. should be "\xa0" and this works in the javascript console. However, clojurescript is just a clojure program and "\xa0" and this is an unsupported escape character. A workaround is (char 160) but wondering if there was a more elegant solution?


not much more elegant lol


seems to be an underscore


oh actually you can put it in a string


cljs.user=> "foo \u00a0 "
"foo   "


awesome. thanks!