Becoming good at VM development

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

Becoming good at VM development

Ichiseki
This post was updated on .
Hi
hello to everyone & everybody
I am interesting in going deeply into VM design, development, optimization, etc. I know a lot of Haskell, a good amount of C and some languages that use VM like Python, Lua and Pharo of course.
What would be a road map (books, articles, code to read) to understand deeply and in detail the Pharo VM, the inter operation between the VM and the image. I know this could take a lot of time but I'm committed to invest that time.
Please help me as literature on these topics is very scarce...
I read Tim Rowledge's a tour to the squeak vm
Some post in Eliot's COG site
Some post in Mariano Martinez Pek's blog
But even the words and concepts seems elusive to me.
Thank SO SO much in advance
ichiro
Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

drush66
On Fri, Aug 28, 2015 at 10:11 AM, Ichiseki <[hidden email]> wrote:
Hi
hello to everyone & everybody
I am interesting in going deeply into VM design, development, optimization,
etc. I know a lot of Haskell, a good amount of C and some languages that use
VM like Python, Lua and Pharo of course.
What would be a road map (books, articles, code to read) to understand
deeply and in detail the Pharo VM, the inter operation between the VM and
the image. I know this could take a lot of time but I'm committed to invest
that time.
Please help me as literature on these topics is very scarce...
Thank SO SO much in advacne
ichiro



--
View this message in context: http://forum.world.st/Becoming-good-at-VM-development-tp4846536.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.

Get a copy of Smalltalk blue book and read implementation part. It is very old, but it would get you many important ideas.


after that, there is a source of Squek/Pharo virtual machines, and you can even run and debug them it inside Pharo. 

Davorin Rusevljan


Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

demarey
In reply to this post by Ichiseki
Hi

Le 28 août 2015 à 10:11, Ichiseki a écrit :

> Hi
> hello to everyone & everybody
> I am interesting in going deeply into VM design, development, optimization,
> etc. I know a lot of Haskell, a good amount of C and some languages that use
> VM like Python, Lua and Pharo of course.
> What would be a road map (books, articles, code to read) to understand
> deeply and in detail the Pharo VM, the inter operation between the VM and
> the image. I know this could take a lot of time but I'm committed to invest
> that time.
> Please help me as literature on these topics is very scarce...
> Thank SO SO much in advacne
> ichiro
There are some nice blogs:
http://www.mirandabanda.org/cogblog/
https://clementbera.wordpress.com/ (cog/spur/sista categories)

smime.p7s (5K) Download Attachment
ksi
Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

ksi
In reply to this post by Ichiseki
Hi ichiro,
this could also be interesting for you

http://www.hpi.uni-potsdam.de/hirschfeld/projects/som/#overview

Cheers
Kiril
Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

Ichiseki
In reply to this post by demarey
I've already read those blogs. There are lots of useful information - it seems - but what I want is a head start, something that starts from zero but for someone who has programming knowledge.
I will definitely read the blue book. That goes first!
Any more sources, indications?
TYVM

ichiro
Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

Christian Caldeiro
Hi Ichiro,

there are a bunch of posts in Mariano Martinez Peck's blog named "journey through the VM", done some years ago. He writes about anything related to the VM, how to build it, class format, bytecodes, detailed description of the CompiledMethod class, etc.

You can find the first post here:
https://marianopeck.wordpress.com/2011/03/31/journey-through-the-vm/

Definitely worth reading!

Cheers
Christian



On Fri, Aug 28, 2015 at 10:15 AM, Ichiseki <[hidden email]> wrote:
I've already read those blogs. There are lots of useful information - it
seems - but what I want is a head start, something that starts from zero but
for someone who has programming knowledge.
I will definitely read the blue book. That goes first!
Any more sources, indications?
TYVM

ichiro



--
View this message in context: http://forum.world.st/Becoming-good-at-VM-development-tp4846536p4846648.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

Ben Coman
In reply to this post by demarey
Join vm-dev mail list
http://lists.squeakfoundation.org/mailman/listinfo/vm-dev

Intro...
http://ftp.squeak.org/docs/OOPSLA.Squeak.html
http://design.cs.iastate.edu/vmil/2011/papers/p03-miranda.pdf

Not sure if these are too outdated...
https://marcusdenker.de/talks/05ChileDCC/DCC01JITAndCo.pdf
http://scg.unibe.ch/archive/papers/Haup07aPIC.pdf

On Fri, Aug 28, 2015 at 4:53 PM, Christophe Demarey
<[hidden email]> wrote:

> Hi
>
> Le 28 août 2015 à 10:11, Ichiseki a écrit :
>
>> Hi
>> hello to everyone & everybody
>> I am interesting in going deeply into VM design, development, optimization,
>> etc. I know a lot of Haskell, a good amount of C and some languages that use
>> VM like Python, Lua and Pharo of course.
>> What would be a road map (books, articles, code to read) to understand
>> deeply and in detail the Pharo VM, the inter operation between the VM and
>> the image. I know this could take a lot of time but I'm committed to invest
>> that time.
>> Please help me as literature on these topics is very scarce...
>> Thank SO SO much in advacne
>> ichiro
>
> There are some nice blogs:
> http://www.mirandabanda.org/cogblog/
> https://clementbera.wordpress.com/ (cog/spur/sista categories)

Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

Ichiseki
In reply to this post by Ichiseki
Thanks to all for your responses.
I am carefully reading the material presented by you. Ideally I will like to compile the VM into Chrome's NaCL to run an image under Chrome OS. But first things first, as they say. I have to understand the Squeak/Pharo VM.
One question, is Mariano's blog still relevant? It seems to me that Pharo VM is not build that way anymore?

ありがとう。
Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

Mariano Martinez Peck


On Mon, Aug 31, 2015 at 2:49 PM, Ichiseki <[hidden email]> wrote:
Thanks to all for your responses.
I am carefully reading the material presented by you. Ideally I will like to
compile the VM into Chrome's NaCL to run an image under Chrome OS. But first
things first, as they say. I have to understand the Squeak/Pharo VM.
One question, is Mariano's blog still relevant? It seems to me that Pharo VM
is not build that way anymore?


The exact instructions on how to compile the VM are not exactly as now. So for that I would recommend reading elsewhere (I think the README in git has some info). A few things have changed. But besides compiling, most of the concepts explained remain the same. 

Cheers,

--
Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

stepharo
In reply to this post by Ichiseki
Hi
After the effort made by igor stasenko building the VM is a lot simpler
than it used to.
Did you try to compile the Pharo VM on your platform?
Did you experience some problems?
We should probably add a resource page to get started. I do not have the
information but
we can ask esteban.

Stef

> Thanks to all for your responses.
> I am carefully reading the material presented by you. Ideally I will like to
> compile the VM into Chrome's NaCL to run an image under Chrome OS. But first
> things first, as they say. I have to understand the Squeak/Pharo VM.
> One question, is Mariano's blog still relevant? It seems to me that Pharo VM
> is not build that way anymore?
>
> ありがとう。
>
>
>
> --
> View this message in context: http://forum.world.st/Becoming-good-at-VM-development-tp4846536p4847217.html
> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

Ben Coman
In reply to this post by Ichiseki
On Tue, Sep 1, 2015 at 1:49 AM, Ichiseki <[hidden email]> wrote:
> Thanks to all for your responses.
> I am carefully reading the material presented by you. Ideally I will like to
> compile the VM into Chrome's NaCL to run an image under Chrome OS. But first
> things first, as they say. I have to understand the Squeak/Pharo VM.
> One question, is Mariano's blog still relevant? It seems to me that Pharo VM
> is not build that way anymore?

For my own first try at compiling a pharo-vm a few months ago, I found
the Mac instructions in the README [1] quite straight forward.  My
only hiccup was not paying attention to using the recommended SDK
version 10.6.

[1] https://github.com/pharo-project/pharo-vm

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

EstebanLM
In reply to this post by stepharo

On 31 Aug 2015, at 21:41, stepharo <[hidden email]> wrote:

Hi
After the effort made by igor stasenko building the VM is a lot simpler than it used to.
Did you try to compile the Pharo VM on your platform?
Did you experience some problems?
We should probably add a resource page to get started. I do not have the information but
we can ask esteban.

yes… PharoVM is built as described here: 


if you follow those instructions, you will have no problems. 
The process is running everyday so it *is* working. 
Windows guys can have problems if they change mingw version, etc. They shouldn’t, but since this is over our control, I cannot assure you anything. 
Others problems that have emerged with time (in linux) is people forgetting they need 32bit library versions to be able to build… 

anyway… that should be enough… for most people, once fulfilled requirements, build VM is as easy as: 

1) clone
2) cd image; sh ./newImage.sh ; ./pharo generator.image eval “PharoVMBuilder build"
3) cd ../build ; sh build.sh

cheers, 
Esteban


Stef
Thanks to all for your responses.
I am carefully reading the material presented by you. Ideally I will like to
compile the VM into Chrome's NaCL to run an image under Chrome OS. But first
things first, as they say. I have to understand the Squeak/Pharo VM.
One question, is Mariano's blog still relevant? It seems to me that Pharo VM
is not build that way anymore?

ありがとう。



--
View this message in context: http://forum.world.st/Becoming-good-at-VM-development-tp4846536p4847217.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.





Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

Mariano Martinez Peck
BTW, you question is about becoming good at VM development, so actually the compilation of the VM itself is a very very very little part of the whole picture.  

On Tue, Sep 1, 2015 at 3:37 AM, Esteban Lorenzano <[hidden email]> wrote:

On 31 Aug 2015, at 21:41, stepharo <[hidden email]> wrote:

Hi
After the effort made by igor stasenko building the VM is a lot simpler than it used to.
Did you try to compile the Pharo VM on your platform?
Did you experience some problems?
We should probably add a resource page to get started. I do not have the information but
we can ask esteban.

yes… PharoVM is built as described here: 


if you follow those instructions, you will have no problems. 
The process is running everyday so it *is* working. 
Windows guys can have problems if they change mingw version, etc. They shouldn’t, but since this is over our control, I cannot assure you anything. 
Others problems that have emerged with time (in linux) is people forgetting they need 32bit library versions to be able to build… 

anyway… that should be enough… for most people, once fulfilled requirements, build VM is as easy as: 

1) clone
2) cd image; sh ./newImage.sh ; ./pharo generator.image eval “PharoVMBuilder build"
3) cd ../build ; sh build.sh

cheers, 
Esteban


Stef
Thanks to all for your responses.
I am carefully reading the material presented by you. Ideally I will like to
compile the VM into Chrome's NaCL to run an image under Chrome OS. But first
things first, as they say. I have to understand the Squeak/Pharo VM.
One question, is Mariano's blog still relevant? It seems to me that Pharo VM
is not build that way anymore?

ありがとう。



--
View this message in context: http://forum.world.st/Becoming-good-at-VM-development-tp4846536p4847217.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.








--
Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

EstebanLM

On 01 Sep 2015, at 15:34, Mariano Martinez Peck <[hidden email]> wrote:

BTW, you question is about becoming good at VM development, so actually the compilation of the VM itself is a very very very little part of the whole picture.  
yeah, I could keep adding “very”s there ;)


On Tue, Sep 1, 2015 at 3:37 AM, Esteban Lorenzano <[hidden email]> wrote:

On 31 Aug 2015, at 21:41, stepharo <[hidden email]> wrote:

Hi
After the effort made by igor stasenko building the VM is a lot simpler than it used to.
Did you try to compile the Pharo VM on your platform?
Did you experience some problems?
We should probably add a resource page to get started. I do not have the information but
we can ask esteban.

yes… PharoVM is built as described here: 


if you follow those instructions, you will have no problems. 
The process is running everyday so it *is* working. 
Windows guys can have problems if they change mingw version, etc. They shouldn’t, but since this is over our control, I cannot assure you anything. 
Others problems that have emerged with time (in linux) is people forgetting they need 32bit library versions to be able to build… 

anyway… that should be enough… for most people, once fulfilled requirements, build VM is as easy as: 

1) clone
2) cd image; sh ./newImage.sh ; ./pharo generator.image eval “PharoVMBuilder build"
3) cd ../build ; sh build.sh

cheers, 
Esteban


Stef
Thanks to all for your responses.
I am carefully reading the material presented by you. Ideally I will like to
compile the VM into Chrome's NaCL to run an image under Chrome OS. But first
things first, as they say. I have to understand the Squeak/Pharo VM.
One question, is Mariano's blog still relevant? It seems to me that Pharo VM
is not build that way anymore?

ありがとう。



--
View this message in context: http://forum.world.st/Becoming-good-at-VM-development-tp4846536p4847217.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.








--

Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

Ben Coman
On Tue, Sep 1, 2015 at 9:48 PM, Esteban Lorenzano <[hidden email]> wrote:

>
> On 01 Sep 2015, at 15:34, Mariano Martinez Peck <[hidden email]>
> wrote:
>
> BTW, you question is about becoming good at VM development, so actually the
> compilation of the VM itself is a very very very little part of the whole
> picture.
>
> yeah, I could keep adding “very”s there ;)
>

A journey of a thousand miles begins with a single step...


>
> On Tue, Sep 1, 2015 at 3:37 AM, Esteban Lorenzano <[hidden email]>
> wrote:
>>
>>
>> On 31 Aug 2015, at 21:41, stepharo <[hidden email]> wrote:
>>
>> Hi
>> After the effort made by igor stasenko building the VM is a lot simpler
>> than it used to.
>> Did you try to compile the Pharo VM on your platform?
>> Did you experience some problems?
>> We should probably add a resource page to get started. I do not have the
>> information but
>> we can ask esteban.
>>
>>
>> yes… PharoVM is built as described here:
>>
>> https://github.com/pharo-project/pharo-vm/blob/master/README.md
>>
>> if you follow those instructions, you will have no problems.
>> The process is running everyday so it *is* working.
>> Windows guys can have problems if they change mingw version, etc. They
>> shouldn’t, but since this is over our control, I cannot assure you anything.
>> Others problems that have emerged with time (in linux) is people
>> forgetting they need 32bit library versions to be able to build…
>>
>> anyway… that should be enough… for most people, once fulfilled
>> requirements, build VM is as easy as:
>>
>> 1) clone
>> 2) cd image; sh ./newImage.sh ; ./pharo generator.image eval
>> “PharoVMBuilder build"
>> 3) cd ../build ; sh build.sh
>>
>> cheers,
>> Esteban
>>
>>
>> Stef
>>
>> Thanks to all for your responses.
>> I am carefully reading the material presented by you. Ideally I will like
>> to
>> compile the VM into Chrome's NaCL to run an image under Chrome OS. But
>> first
>> things first, as they say. I have to understand the Squeak/Pharo VM.
>> One question, is Mariano's blog still relevant? It seems to me that Pharo
>> VM
>> is not build that way anymore?
>>
>> ありがとう。
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/Becoming-good-at-VM-development-tp4846536p4847217.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>
>>
>>
>>
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

stepharo
In reply to this post by EstebanLM
thanks esteban!
I love CI.

Le 1/9/15 08:37, Esteban Lorenzano a écrit :

On 31 Aug 2015, at 21:41, stepharo <[hidden email]> wrote:

Hi
After the effort made by igor stasenko building the VM is a lot simpler than it used to.
Did you try to compile the Pharo VM on your platform?
Did you experience some problems?
We should probably add a resource page to get started. I do not have the information but
we can ask esteban.

yes… PharoVM is built as described here: 


if you follow those instructions, you will have no problems. 
The process is running everyday so it *is* working. 
Windows guys can have problems if they change mingw version, etc. They shouldn’t, but since this is over our control, I cannot assure you anything. 
Others problems that have emerged with time (in linux) is people forgetting they need 32bit library versions to be able to build… 

anyway… that should be enough… for most people, once fulfilled requirements, build VM is as easy as: 

1) clone
2) cd image; sh ./newImage.sh ; ./pharo generator.image eval “PharoVMBuilder build"
3) cd ../build ; sh build.sh

cheers, 
Esteban


Stef
Thanks to all for your responses.
I am carefully reading the material presented by you. Ideally I will like to
compile the VM into Chrome's NaCL to run an image under Chrome OS. But first
things first, as they say. I have to understand the Squeak/Pharo VM.
One question, is Mariano's blog still relevant? It seems to me that Pharo VM
is not build that way anymore?

ありがとう。



--
View this message in context: http://forum.world.st/Becoming-good-at-VM-development-tp4846536p4847217.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.






Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

Ichiseki
In reply to this post by Mariano Martinez Peck
Yes Mariano, you are right. The compilation itself should be trivial - in a sense. The hard part is the actual development of the VM. From what I've read, the VM is developed in Smalltalk's Slang, then transpiled to C and then compiled isn't it?

Reply | Threaded
Open this post in threaded view
|

Re: Becoming good at VM development

Mariano Martinez Peck


On Fri, Sep 4, 2015 at 8:25 PM, Ichiseki <[hidden email]> wrote:
Yes Mariano, you are right. The compilation itself should be trivial - in a
sense. The hard part is the actual development of the VM. From what I've
read, the VM is developed in Smalltalk's Slang, then transpiled to C and
then compiled isn't it?

Yes, most of it. Most of the "core". Then you also have "platform code" that is directly hand written in C and it is platform dependent (unix / windows / etc), like management of sockets, files, etc. All of this is explained in my posts.

Best,
 





--
View this message in context: http://forum.world.st/Becoming-good-at-VM-development-tp4846536p4848186.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.




--