4 ms·
> I think this is a bit too keen to hew to the textbook definition of "virtual machine". That's interesting to me because I haven't ever read any textbook on v
by groovy2shoes 10y ago
> I think this is a bit too keen to hew to the textbook definition of "virtual machine".
That's interesting to me because I haven't ever read any textbook on virtual machines. If you could recommend one, I'd be very interested (especially if it covers designing an ISA that's a good fit for your language, which seems like a dark art to me; I've seen plenty of examples but no design docs or notes whatsoever).
> In modern industry practice a "virtual machine" tends to imply "we wrote an interpreter, and to run your program you execute this interpreter and feed it your program".
My experience has been exactly the opposite: people have a preference for the word interpreter. When they've written an interpreter, they call it an interpreter. When they've written a virtual machine, it's still often called an interpreter. For example, you rarely hear talk of the Python VM, Lua VM, Scheme VM, Lisp VM, etc. the way you hear talk about the JVM. I normally hear "the Python interpreter" or "the Lua interpreter", etc. I sometimes even hear these sorts of VMs referred to as bitcode or bytecode interpreters.
> In the interest of being precise, I'd rather call LLVM an "abstract" machine, in the same vein as the C abstract machine defined by the C language specification
I'd normally be with you on that one, but I referred to it as a virtual machine here for two reasons: 1) I most often hear the terms "virtual machine" and "abstract machine" used interchangeably, and 2) the LLVM -- Low-Level Virtual Machine -- is called a virtual machine by its creators. All in all, the distinction between the two isn't a large one, and only rarely an important one, so I thought it best in this case to avoid causing any more confusion than I already felt I might :)
(As an aside, I think a big problem with the computation science field -- both in academia and in industry, though perhaps more pronounced in industry -- is the sheer lack of (and sometimes even disdain for!) precision in our jargon. Abstract vs. virtual machines is, of course, a topical example, but many others come to mind: parser, DSL, interface, object, message, native, relational, lightweight, functional, and many more. Of particular annoyance to me is the cloud of meanings surrounding the word "type" and its variations, along with a great deal of modifiers typically used alongside it ("strong", "weak", etc.). It's enough to drive the more formal/rigorous/pedantic of us batshit, myself included.)