Skip to content

Comment on Ask HN: How to make smalltalk?parent

Comments

What about from scratch?

How to make a Smalltalk VM.

1) Implement a loop containing a 256 case case-statement. Get ahold of documentation of the Smalltalk bytecodes, then start implmenting each one.

2) Code up method loookup. (Really, you've done this if you've done step 1, but it deserves mention.)

3) Add code for loading and saving an image.

4) Add a library for Garbage Collection: http://www.hpl.hp.com/personal/Hans_Boehm/gc/

Done! You don't need a Smalltalk compiler in your VM. It's all Smalltalk objects in the image!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.