[Vm-dev] Recreating live coding in CPython 3.5

Nicolai Hess nicolaihess at gmail.com
Wed Oct 11 11:09:38 UTC 2017

2017-10-11 12:14 GMT+02:00 Dimitris Chloupis <kilon.alios at gmail.com>:

> Hey there as it says in the title I am trying to recreat live coding Pharo
> chracteristics in Python .

Now I am confused, I thought you already did this? In the other thread you

"From my experience around  100 lines of code are enough to offer most of
Pharo’s basic live coding functionality"

> One of the issues I have is live replacing of a method to an existing
> instance.

And in the other thread you wrote:

"Well live coding is a simple process of reloading code. In Pharo the VM
recompiles a method and replace it’s old instance with a new one while code

Python you basically reload the module. Because Python does not compile per
method but per module which means executing code lively. This happens
because when you import a module in Python, Python does nothing special
than executing the source code. Not before compilation but during
execution. Hence live coding, the Python VM replaces objects lively. Python
can also compile any size of code including individual methods.

That happens with one line of code importlib.reload(mymodule) "

So, if python can already reload code and replace the instances, what is
missing ?

> I know how to do this in Python but that shown me I would benefit greatily
> from a more deeper understanding of Pharo live coding internals than I have
> at the moment which is only at the user level. This will help me avoid
> common pitfalls in a field that I am not experienced with.
> Have you guys written any paper , article or blog post in this area,
> explaining the internals of the VM to that regard ?
> I am also interested in time machine livde coding, meaning live coding
> that does not keeps you in the present but also can send you back in the
> past restoring the live state of old object instances in a specific time
> moment.

I remember a project that developed some tools for back-in-time debugging
and testing

> Generally any guidance on the art of implementing live coding will be
> greatly appreciated.
> I don't care how this can be done in Python because I have already
> recreated a very basic live coding enviroment in Python and there is a lot
> of documentation about Python overall what I am interested only is the
> Smalltalk way of doing live coding but from the perspective of the
> implementors not the mere users.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20171011/0a7a811e/attachment.html>

More information about the Vm-dev mailing list