scittle 2023-02-26

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

πŸ™Œ 1

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

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

πŸ‘ 1

@andrea712 I meant a code viewer that evaluates the code in sci and shows the editable code with its result