3 ms·
> Based on all this, using my definitions, would you say Hy is embedded, or just implemented? Can I see the Python REPL inside Hy? or is Hy a microcosm, inside
by ggm 3y ago
> Based on all this, using my definitions, would you say Hy is embedded, or just implemented?
Can I see the Python REPL inside Hy? or is Hy a microcosm, inside the python runtime?
I tend to implemented. I like your model that its interpreted languages which are somewhat inherently embeddable, and compiled languages exist in the machine they are compiled for (at whatever level it is in the stack from physics upwards)
If however, you can mutate the state of Python such that new features expose into Hy, by invoking some outer call from Hy into Python to install and provide a function, then I think embedded might be the way to go.
- kazinator 3y agoI'm not sure I agree with your reverse manipulation criterion. It implies that we can't have an embedding if the guest language is sandboxed. E.g. JS isn't embedded in the browser. Or POSIX regcomp and regexec doesn't achieve embedding the regex language in C programs.
- ggm 3y agoYea, I'm looking pretty wrong. I guess the word fits. I think the existence of a JIT and a pseudo-machine you can "code" to, inside a system which provides execution primitives and a memory model and some kind of IO, means to a world view outside that pseudo machine you're embedded inside it. So from the outside shell your run Hy by executing Hy inside Python. it's embedded. Colour me wrong.