5 ms·
A script can’t execute itself?
by jahewson 8y ago
A script can’t execute itself?
- chrisseaton 8y agoYou could implement a 'script' that implements an interpreter and then run that script on itself.
- Narishma 8y agoBut you still need some interpreter to execute the initial script.
- chrisseaton 8y agoYou could compile the script to native code if you wanted to.
- pygy_ 8y agoA CPU is an interpreter.
- pjmlp 8y agoOnly if designed with microcode interpreter/JIT instead of pure hardware gates.
- pygy_ 8y agoNo. Even without those, the CPU interprets machine language. It is a hardware interpreter.
- pjmlp 8y agoCare to refer to any good CS/EE book that asserts your opinion?
- pygy_ 8y agoYou may want to re-read the definition of Turing equivalence. You should find it in any good CS/EE book. You could bake a JS interpreter in silico. There are actual hardawre implementations of the JVM. You can also run machine language in emulators. CPUs are just hardware interpreters for their respective machine language.
- pygy_ 8y agoReply since the edit window is closed. I guess you could argue that an interpreter is specifically a piece of software, in which case my point wouldn't stand.
- UK-AL 8y agoThe interpreter would then be a standard program?
- jaggederest 8y agoMetacircular interpreter is a pretty standard project in the lisp/Scheme world.