informations about pharo'VM

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

informations about pharo'VM

michel sangala
 
Good morning, i want to know all about pharo'VM, books and notes, i also want to know differences between pharo'VM and JavaVM, thanks a lot

Reply | Threaded
Open this post in threaded view
|

Re: informations about pharo'VM

Paul DeBruicker
The blue book
http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf



and all the info on this blog should get you started

http://www.mirandabanda.org/cogblog/about-cog/




michel sangala wrote
Good morning, i want to know all about pharo'VM, books and notes, i also want to know differences between pharo'VM and JavaVM, thanks a lot
Reply | Threaded
Open this post in threaded view
|

Re: informations about pharo'VM

timrowledge
 

> On 03-04-2017, at 2:59 PM, Paul DeBruicker <[hidden email]> wrote:
>
>
> The blue book
> http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf

And don’t forget the ‘middle path’ describing the original Squeak VM at http://www.rowledge.org/resources/tim's-Home-page/Squeak/OE-Tour.pdf
It’s a somewhat simpler an artefact to understand than the full Cog VM, so makes a better place to begin.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: EOS: Erase Operating System


Reply | Threaded
Open this post in threaded view
|

Re: informations about pharo'VM

Ben Coman
In reply to this post by Paul DeBruicker
 


On Tue, Apr 4, 2017 at 5:59 AM, Paul DeBruicker <[hidden email]> wrote:

The blue book
http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf


and all the info on this blog should get you started

http://www.mirandabanda.org/cogblog/about-cog/



michel sangala wrote
> Good morning, i want to know all about pharo'VM, books and notes, i also
> want to know differences between pharo'VM and JavaVM, thanks a lot


At its most concise:
* #become:
* resumable exceptions
* message passing
* its just an execution engine

The links below expand on these, except the last which I'll expand on briefly.

IIUC, the JVM class libraries are often considered part of the VM.  With Smalltalk, the class libraries are part of *your* Image, written in Smalltalk (you have direct access to understanding and debugging them in the context of your running application).  The Pharo VM provides only: 
* bytecode interpreter
* JIT bytecode to machine code compilation
* memory allocation
* primitives hiding platform differences
* primitives accelerating speed sensitive activities














btw, note that the Pharo VM is a branding of the OpenSmalltalk-VM,
which is the original Squeak-VM renamed, since there are now several
downstream consumers: Pharo, Squeak, Cuis & Newspeak. 


cheers -ben

P.S. just an aside for anyone unfamiliar with reading Smalltalk syntax...


Reply | Threaded
Open this post in threaded view
|

Re: informations about pharo'VM

Clément Béra
 

On Mon, Apr 3, 2017 at 6:30 PM, Ben Coman <[hidden email]> wrote:
 


On Tue, Apr 4, 2017 at 5:59 AM, Paul DeBruicker <[hidden email]> wrote:

The blue book
http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf


and all the info on this blog should get you started

http://www.mirandabanda.org/cogblog/about-cog/



michel sangala wrote
> Good morning, i want to know all about pharo'VM, books and notes, i also
> want to know differences between pharo'VM and JavaVM, thanks a lot


At its most concise:
* #become:
* resumable exceptions
* message passing
* its just an execution engine

The links below expand on these, except the last which I'll expand on briefly.

IIUC, the JVM class libraries are often considered part of the VM.  With Smalltalk, the class libraries are part of *your* Image, written in Smalltalk (you have direct access to understanding and debugging them in the context of your running application).  The Pharo VM provides only: 
* bytecode interpreter
* JIT bytecode to machine code compilation
* memory allocation
* primitives hiding platform differences
* primitives accelerating speed sensitive activities














btw, note that the Pharo VM is a branding of the OpenSmalltalk-VM,
which is the original Squeak-VM renamed, since there are now several
downstream consumers: Pharo, Squeak, Cuis & Newspeak. 


cheers -ben

P.S. just an aside for anyone unfamiliar with reading Smalltalk syntax...




Reply | Threaded
Open this post in threaded view
|

Re: informations about pharo'VM

michel sangala
 
thanks a lot, , i've a mercy


Le Mardi 4 avril 2017 6h21, Clément Bera <[hidden email]> a écrit :



On Mon, Apr 3, 2017 at 6:30 PM, Ben Coman <[hidden email]> wrote:
 


On Tue, Apr 4, 2017 at 5:59 AM, Paul DeBruicker <[hidden email]> wrote:

The blue book
http://stephane.ducasse.free.f r/FreeBooks/BlueBook/Bluebook. pdf


and all the info on this blog should get you started

http://www.mirandabanda.org/co gblog/about-cog/



michel sangala wrote
> Good morning, i want to know all about pharo'VM, books and notes, i also
> want to know differences between pharo'VM and JavaVM, thanks a lot


At its most concise:
* #become:
* resumable exceptions
* message passing
* its just an execution engine

The links below expand on these, except the last which I'll expand on briefly.

IIUC, the JVM class libraries are often considered part of the VM.  With Smalltalk, the class libraries are part of *your* Image, written in Smalltalk (you have direct access to understanding and debugging them in the context of your running application).  The Pharo VM provides only: 
* bytecode interpreter
* JIT bytecode to machine code compilation
* memory allocation
* primitives hiding platform differences
* primitives accelerating speed sensitive activities














btw, note that the Pharo VM is a branding of the OpenSmalltalk-VM,
which is the original Squeak-VM renamed, since there are now several
downstream consumers: Pharo, Squeak, Cuis & Newspeak. 


cheers -ben

P.S. just an aside for anyone unfamiliar with reading Smalltalk syntax...






Reply | Threaded
Open this post in threaded view
|

Re: informations about pharo'VM

Eliot Miranda-2
In reply to this post by Ben Coman
 
Hi Ben,

On Mon, Apr 3, 2017 at 6:30 PM, Ben Coman <[hidden email]> wrote:
 


On Tue, Apr 4, 2017 at 5:59 AM, Paul DeBruicker <[hidden email]> wrote:

The blue book
http://stephane.ducasse.free.fr/FreeBooks/BlueBook/Bluebook.pdf


and all the info on this blog should get you started

http://www.mirandabanda.org/cogblog/about-cog/



michel sangala wrote
> Good morning, i want to know all about pharo'VM, books and notes, i also
> want to know differences between pharo'VM and JavaVM, thanks a lot


At its most concise:
* #become:
* resumable exceptions
* message passing
* its just an execution engine

I see three important things missing, contexts, self-definition and doesNotUnderstand:.

Contexts are really important to Smalltalk-80 Smalltalks (true Smalltalks).  Smalltalk provides access to the current activation record from the language.  Hence the exception system is largely above the VM.  The only thing that needs to be in the VM is unwind-protect.  Everything else (exception search, handler activation) can be done by walking the linked list of method activations starting from thisContext.  Hence the debugger is written entirely in Salltalk and execution can be simulated above the VM by sending messages to contexts to ask them to interpret their methods' bytecodes.  Hence processes can be serialized, exchanged between images, etc.

Self-definition (why the VM is just an execution engine):  All the objects that comprise a Smalltalk program are themselves defined by Smalltalk classes.  So classes are general instances of Class or Metaclass (instances of specific metaclasses that inherit from either Class or Metaclass). Methods are instances of CompiledMethod.  Activation records are instances of class Context (MethodContext or BlockContext in older versions).  Hence the compiler is written in Smalltalk and does not live in the VM.

doesNotUnderstand:, a key part of message passing.  When a message is sent to an object and that object's class, nor any superclass of the class implements a method with the message's selector, the VM reifies the message as an instance of Message (holding selector and arguments) and sends doesNotUnderstand: to the object with the message as an argument.  Hence Smalltalk provides transparent proxies that can catch messages and forward them.  Implement a class that doesn't inherit from Object and implements doesNotUnderstand: and its instances catch any and all messages sent to them.
 

The links below expand on these, except the last which I'll expand on briefly.

IIUC, the JVM class libraries are often considered part of the VM.  With Smalltalk, the class libraries are part of *your* Image, written in Smalltalk (you have direct access to understanding and debugging them in the context of your running application).  The Pharo VM provides only: 
* bytecode interpreter
* JIT bytecode to machine code compilation
* memory allocation
* primitives hiding platform differences
* primitives accelerating speed sensitive activities














btw, note that the Pharo VM is a branding of the OpenSmalltalk-VM,
which is the original Squeak-VM renamed, since there are now several
downstream consumers: Pharo, Squeak, Cuis & Newspeak. 


cheers -ben

P.S. just an aside for anyone unfamiliar with reading Smalltalk syntax...






--
_,,,^..^,,,_
best, Eliot