开发者

What's the difference of Squeak/Pharo/Newspeak Smalltalk VMs?

开发者 https://www.devze.com 2023-03-12 08:35 出处:网络
I saw 3 different VMs while learning abou开发者_如何学编程t Smalltalk. They are Squeak/Pharo/Newspeak. What\'s the difference between them?Squeak and Pharo are different dialects of Smalltalk, while N

I saw 3 different VMs while learning abou开发者_如何学编程t Smalltalk. They are Squeak/Pharo/Newspeak. What's the difference between them?


Squeak and Pharo are different dialects of Smalltalk, while Newspeak is different language, although inspired and in many ways similar to Smalltalk and Self.

As for Squeak and Pharo, since Pharo is fork of Squeak, they both run on the same kind of Virtual machine, they depend on the same VM instruction set, and set of primitives.

As for Squeak and Pharo virtual machines, there are several versions, but 2 most important kinds are classic squeak VM, and new jit based Cog virtual machine. But both of them execute generally same instruction set.

While we are at sqeak and pharo VMs it is interesting that you can hack your own VM, sources are available and there are written in Smalltalk subset, and there is tool set that allows you to make changes and build your own VM. There is a great series of posts from Mariano Martinez Peck that describes how to play with VM here is the introductory post:

http://marianopeck.wordpress.com/2011/03/31/journey-through-the-vm/


A virtual machine for Smalltalk is quite basic. It contains a set of primitive instructions that are directly referenced from Smalltalk code. This makes the the actual VM easily plugable. So the Squeak is often used for experimenting with virtual machine.

Pharo is a project to replace Squeaks basic library because Squeak's look and feel is somewhat dated. It uses the Squeak VM and is mostly compatible but the interface is completely different.

On the VM side of Squeak there is the vanilla VM. As far as I know it started as part of the Squeak project and is still used.

Then a while back Eliot Miranda, a researcher in VM's, announced he was developing a new optimized VM for Squeak. Cog is open source and can be used with Squeak and Pharo. It is still actively developed, but faster than the basic VM.

Newspeak is a different animal all together. It is an experiment to create a Language which uses pure message passing as the only primitive of the Language. It is based on the Squeak VM but not really Smalltalk. You can find more information on it at http://bracha.org/Site/Newspeak.html.


Both Squeak and Pharo share so far the same VM. Newspeak has its own, which originates from Squeak VM.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号