Is there a cljs/scittle equivalent of jQueries JSON.stringify() ? I searched on the bb scittle sites but came up empty. I have zero experience with cljs and really like the way scittle works
@thierry572 (js/JSON.stringify ...)
Well that was easy ππ€¦π»ββοΈ
js is the global JS environment, JSON is a JS standard, not from jquery
Thanks for the tips, got it working in the end. Had some inline javascript in a clojure project and wanted to know how to do the same with scittle as writing Clojure(script) is more fun to do then js π€. And I wanted to see what would be faster.
JS is likely faster than CLJS and normal CLJS is likely faster than scittle (since scittle uses an interpreter)
Yeah just messing about, scittle is perfect in this case because I dont yet know how to integrate cljs into my clj project π which I will probably do in the end, just not now
This would be pretty cool for #clerk
I think you could do a similar thing with clerk as well
Yes, but clerk is not interactive. I mean, people looking at the notebook, could change data and calculations on the fly.
@sritchie09 can probably tell you how you could accomplish this with clerk and a custom build or maybe @mkvlr is open to adding an evaluation component like this into clerk
I think most of the dependencies for this are in clerk already anyway
This would be great and Iβm sure we can get it working in Clerk
@borkdude Aykay, you know more about this stuff than I do π
@andrea712 built some clerk demos around this iirc
@mkvlr possible, maybe you mean https://snapshots.nextjournal.com/clojure-mode/build/ac038ebf6e5da09dd2b8a31609e9ff4a65e36852/livedoc/index.html ?
it uses clerk viewers cljs library
but thatβs plain sci, browser target, compiled with shadow
same as the original post here, but cljs-showcase is very minimal
@andrea712 I meant a code viewer that evaluates the code in sci and shows the editable code with its result