Fork me on GitHub
#sci
<
2023-05-10
>
zimablue18:05:18

is sci technically what they call a metacircular interpreter?

zimablue18:05:37

because it's written in clojure, interprets clojure, and can do it "easier" by (calling eval?) but it can't actually be calling eval since it forms the basis for nbb which afaiu can live inside cljs

borkdude18:05:30

SCI does not use eval because it's not available in GraalVM native-images (babashka) and indeed CLJS (unless you use self-hosted CLJS)

zimablue18:05:43

as far as I'm understanding, the difference between an self-hosted interpreter and a "metacircular" interpreter is to do with having homoiconic/eval "shortcuts" is the definition therefore somewhat blurry/subjective?

borkdude19:05:15

self-hosted CLJS is a self-hosted compiler, which means, the compiler can compile itself

borkdude19:05:32

meta-circular just means "implements the language it is implemented in"

borkdude19:05:32

meta-circular interpreters implement language features by using the language features of the host environment

borkdude19:05:17

e.g. loop in the implemented language is implemented using loop of the implementation language

zimablue19:05:43

I see, so it's not strictly that "eval" is delegated but that "some stuff eg. loop" is delegated

zimablue19:05:45

thank you

👍 1