pink-gorilla / goldly

sci-cljs-kernel for reval
24 stars 1 forks source link

(load-file "experience.clj") #25

Closed awb99 closed 2 years ago

masterbuilder99 commented 2 years ago

Yes, I think you can do all of this using the top level expression approach I took in nbb

borkdude:clj-kondo: vor 26 Minuten This requires you to make a sci/reader and use sci/parse-next

borkdude:clj-kondo: vor 26 Minuten and then inspect the form for something special, then do something special async

borkdude:clj-kondo: vor 25 Minuten or else wrap the normal evaluation in a promise or so and then just use promises all the way

nbb has an async way of loading JS files. This is implemented by manually handling all top level expressions. When the top level is ns or require it provides its own async implementation and for the rest of the expressions it just invokes SCI as usual. Eventually that may come to SCI but right now it's incubating in that project.

https://github.com/babashka/scittle/blob/main/src/scittle/core.cljs