Live data from Hacker News

Beam VM Wisdoms (2019)

beam-wisdoms.clau.se

1–10 of 40 posts

Re: Beam VM Wisdoms (2019)

#3

There sure has been some definition creep of ELI5...

What 5 y.o. wouldn't understand an explanation as simple as this:

> This way it is easy to jump to a location in C code which handles next opcode. Just read a void* pointer and do a goto *p. This feature is an extension to C and C++ compilers. This type of VM loop is called direct-threaded dispatch virtual machine loop.

...I guess the author works with quite smart 5 years olds, right...

Re: Beam VM Wisdoms (2019)

#4

There sure has been some definition creep of ELI5...

My understanding is that it has always been to be taken figuratively. Obviously, you won't explain this to (almost) any 5 year old. Mostly, because they will miss all the background. (Hey, what's a program at all, not to mention processors or virtual machines having virtual processors. BTW, what the heck is virtual?) Which you could explain, but half way through you'd loose their interest because their attention span is only so long.

Other than that, I found it pretty approachable. The basic knowledge it assumes is that you know what processors (and registers), pointers are and what a goto instruction does. It doesn't seem like a wild expectation. (Or something that you couldn't google in a few minutes if you already have some programming knowledge. And if you don't, why would you want to start with understanding how a VM works in the first place?)

Re: Beam VM Wisdoms (2019)

#5
post #3

There sure has been some definition creep of ELI5...

What 5 y.o. wouldn't understand an explanation as simple as this: > This way it is easy to jump to a location in C code which handles next opcode. Just read a void* pointer and do a goto *p. This feature is an extension to C and C++ compilers. This type of VM loop is called direct-threaded dispatch virtual machine loop. ...I guess the author works with quite smart 5 years olds, right...

I mean ELI5 is clearly hyperbolic, but explaining dispatch like "Just read a void* pointer and do a goto *p" is definitely 1st year of CS level. This wouldn't be valid for teaching actual VM implementation fundamentals.

Some may wish courses about compilers & VMs would be as easily (and naively) explained, but this style misses a lot of critical and complex details. Nobody likes complexity, but if it exists, it exists.

Re: Beam VM Wisdoms (2019)

#8
I thought modern processors had enough branch prediction that threaded interpreters were no longer faster than a normal switch loop.

Wonder if that also applies to aarm64

Re: Beam VM Wisdoms (2019)

#9

There sure has been some definition creep of ELI5...

I guess the first and foremost for an ELI5 is WTF is BEAM VM?

The "BEAM VM ELI5" page doesn't explain what it is specifically, and how it's not a Hypervisor VM, but as a bytecode interpreter in Erlang. When I see 'VM' I think first of a hypervisor virtual machine.

Maybe I'm a bit of a curmudgeon, but I'd like to think an ELI5 would at least bring in the basics.

http://beam-wisdoms.clau.se/en/latest/eli5-vm.html

Re: Beam VM Wisdoms (2019)

#10
post #9

There sure has been some definition creep of ELI5...

I guess the first and foremost for an ELI5 is WTF is BEAM VM? The "BEAM VM ELI5" page doesn't explain what it is specifically, and how it's not a Hypervisor VM, but as a bytecode interpreter in Erlang. When I see 'VM' I think first of a hypervisor virtual machine. Maybe I'm a bit of a curmudgeon, but I'd like to think an ELI5 would at least bring in the basics. http://beam-wisdoms.clau.se/en/latest/eli5-vm.html

> When I see 'VM' I think first of a hypervisor virtual machine.

VM as a bytecode interpreter is a very well-known meaning of the term thanks to the JVM.

Post reply on HN