Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>Almost every bytecode VM in existence today owes Forth (and Moore) a giant "thank you."

Funny, I see bytecode VM as one of the things that's fundamentally wrong with computing. It's one more layer of unnecessary crap that doesn't even remotely resemble the underlying hardware.



> that doesn't even remotely resemble the underlying hardware.

And that is what makes the code portable and re-usable. See also Rob Pike's Eulogy on Dennis Ritchie[0], where he explains the true strengths of C and Unix:

> In the late 1970s, Dennis joined with Steve Johnson to port Unix to the Interdata. From this remove it's hard to see how radical the idea of a portable operating system was; back then OSes were mostly written in assembly language and were tightly coupled, both technically and by marketing, to specific computer brands. Unix, in the unusual (although not unique) position of being written in a "high-level language", could be made to run on a machine other than the PDP-11. Dennis and Steve seized the opportunity, and by the early 1980s, Unix had been ported by the not-yet-so-called open source community to essentially every mini-computer out there. That meant that if I wrote my program in C, it could run on almost every mini-computer out there. All of a sudden, the coupling between hardware and operating system was broken. Unix was the great equalizer, the driving force of the Nerd Spring that liberated programming from the grip of hardware manufacturers.

> The hardware didn't matter any more, since it all ran Unix. And since it didn't matter, hardware fought with other hardware for dominance; the software was a given.

[0] https://plus.google.com/u/0/+RobPikeTheHuman/posts/33mmANQZD...


The true strength of C is being a good fit to the underlying hardware.

And hardware still very much matters, even if it's running Unix, because of binary compatibility.

I still don't get the VM thing. I mean, I get it from a portability standpoint, but in practice it's been a pretty horrible thing because a stack machine of all things is often picked as the virtual target. Why not a generic register based machine, like most hardware actually is these days? My feeling is the people doing the implementing are infected with the Forth virus, and a stack based VM is one of the few ways they can force their crazy ideas on the rest of us.


You do understand that hardware development has been shaped by C being the defacto standard low-level language? That is, if new hardware isn't easy to code for with C it has little chance of it catching on, unless it's so incredibly low-level and minimal that ASM is the most complicated language you need.

And while I'm no compiler writer, I suspect stack machines are a great choice for modelling an intermediate language because converting it to optimal register use is fairly simple, yet at the same time is completely agnostic about how many registers an underlying machine has.


>You do understand that hardware development has been shaped by C being the defacto standard low-level language?

No, I don't understand that, and honestly have no clue what you're talking about. C is about as simple as things come, and it doesn't necessarily make strange demands on the hardware. It may seem that I'm contradicting my previous statement, but C working well with hardware doesn't necessarily mean it is a force for shaping modern hardware.

Three operand register-based load / store machines make too much sense from a variety of angles for many (any?) other configurations to touch them, that's why they're everywhere.

Stack machines are inherently less efficient, and you only see a bunch of designs (mostly as amateur soft cores) to this day because they are almost trivial to for enthusiasts to implement, not because they kick ass.


> No, I don't understand that, and honestly have no clue what you're talking about.

Clearly.

https://en.wikipedia.org/wiki/Lisp_machine#End_of_the_Lisp_m...


But we don't do this anymore, we don't build processors to cater to the particular needs of a particular high level language because we know now this approach to speeding things up is fundamentally misguided. Hardware is designed based on the types of calculations it is intended to do (DSP, GP, FP, GPU) and that's it. To do otherwise would be inefficient.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: