Fork me on GitHub
#scittle
<
2023-02-26
>
Thierry08:02:00

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

borkdude09:02:18

@thierry572 (js/JSON.stringify ...)

Thierry09:02:52

Well that was easy 🙃:man-facepalming::skin-tone-2:

borkdude09:02:01

js is the global JS environment, JSON is a JS standard, not from jquery

🙌 2
Thierry13:02:03

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 :face_with_hand_over_mouth:. And I wanted to see what would be faster.

borkdude13:02:05

JS is likely faster than CLJS and normal CLJS is likely faster than scittle (since scittle uses an interpreter)

Thierry14:02:51

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

Gerome15:02:29

This would be pretty cool for #C035GRLJEP8

borkdude15:02:26

I think you could do a similar thing with clerk as well

Gerome15:02:10

Yes, but clerk is not interactive. I mean, people looking at the notebook, could change data and calculations on the fly.

borkdude15:02:50

@U017QJZ9M7W can probably tell you how you could accomplish this with clerk and a custom build or maybe @U5H74UNSF is open to adding an evaluation component like this into clerk

borkdude15:02:11

I think most of the dependencies for this are in clerk already anyway

Sam Ritchie15:02:33

This would be great and I’m sure we can get it working in Clerk

Gerome15:02:00

@U04V15CAJ Aykay, you know more about this stuff than I do 🙂

mkvlr16:02:00

@U9EQP1K0X built some clerk demos around this iirc

Andrea16:02:50

it uses clerk viewers cljs library

Andrea16:02:23

but that’s plain sci, browser target, compiled with shadow

borkdude16:02:51

same as the original post here, but cljs-showcase is very minimal

👍 2
mkvlr17:02:26

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