5 ms·
The following terms are quite similar... - Virtual Machine - Emulator - Interpreter - Finite State Machine I think your implementation would fit under the
by PhilWright 9y ago
The following terms are quite similar...
- Virtual Machine
- Emulator
- Interpreter
- Finite State Machine
I think your implementation would fit under the traditional definition of a state machine or maybe an interpreter. But most people would not define it as a virtual machine. It is certainly not an operating system running on another operating system which is the most popular definition today. Nor is it as capable as the VM's that run environments such as Java or .NET, which is the other definition people might use.
- naasking 9y agoMost interpreters these days are virtual machines. If it has a set of opcodes for an abstract machine, it counts as a virtual machine.
- posterboy 9y agoThe term virtual machine stands in distinction to real machine, so unless a hardware interpreter for python (perhaps interpreting preprocessed bytecode), I wouldn't prefer to make the distinction, although, technically, there are unrelated bare to the bones interpreters in the contrast (edit: as is the case with the featuredvarticle, the author points out in this thread).
- naasking 9y ago> The term virtual machine stands in distinction to real machine Right: virtual machine = software implementation of what could be a real machine. The simplest interpreters execute directly from the AST, but if there's a pass that reduces this to an abstract machine with an ISA, I think it's fair to classify that as a VM.
- dahart 9y ago> most people would not define it as a virtual machine. It is certainly not an operating system running on another operating system which is the most popular definition today. There are two kinds of VMs: system VMs and process VMs (https://en.wikipedia.org/wiki/Virtual_machine https://en.wikipedia.org/wiki/Virtual_machine) Maybe refrain from 'correcting' someone on common definitions if you aren't familiar with the kinds and amount of commonality of all definitions? "Virtual Machine" does today commonly mean an interpreter based on opcode instructions, aka process VM. Furthermore, using 'interpreter' for an opcode based VM is less common, I feel like your suggestion goes backwards by your own metric. > Nor is it as capable as the VM's that run environments such as Java or .NET, which is the other definition people might use. So I'm curious what you were expecting when you clicked on "Simple Virtual Machine in C" linked to github? Is it likely that someone's open source project is going to compete with the 2 largest and most widely distributed runtimes on the planet? How do you measure capability? If the VM is Turing complete, is it really less "capable"? What is the point of your negative comment? Do you want the author to change the title? Do you want other people to never make another VM because Java already has one? And what kind of responses do you hope for next time you share your open source project on HN?