Fork me on GitHub
#joyride
<
2022-07-09
>
pez10:07:08

Is there a reason why Joyride does not implement clojure.core/load-file, @borkdude?

pez10:07:43

Thinking I should be able to implement it pretty easily, so guessing the answer is ”no particular reason”, but my intuitions about these things are sometimes wrong. 😃

borkdude10:07:58

The reason is that SCI doesn't include it by default since reading from the filesystem isn't "safe" by default, but it can be easily done. However! When we move to sci.async, then the semantics of load-file will change a bit.

borkdude10:07:41

but this can be alleviated by making it "auto-awaited" so when you write:

(load-file ...)
it will be similar to nbb's:
(await (load-file ...))

borkdude10:07:33

tl;dr: I think it's fine to add it, but things might change a bit with sci.async. So maybe let's do that first

pez10:07:10

Thanks! I'm fine with doing it in the order you suggest. 😃

borkdude10:07:33

Also, how does load-file work in the web version?

pez10:07:40

I think that should work fine. Though, currently Joyride does not work in the web version, iirc.