[Vm-dev] Recreating live coding in CPython 3.5
kilon.alios at gmail.com
Thu Oct 12 08:50:20 UTC 2017
Thanks Ben actually your first link was the first thing I read when I
googled become. I dont think VM lookup benefits me in my case as this is
already handled by the Python VM.
You other tlinks are JIT VM related, Python is not friendly to JIT because
its creator believe that performance enhancement should come from wrapping
C libraries and wants to avoid the cost of more complex VM . In the case of
Python this is easy to follow because Python has a ton of high performance
libraries which by the way almost never are used when comparing Python with
other languages speed wise (kinda fare if you just compare language
implementations). Pharo does benefit a lot more from JIT VM as it does not
have as many libraries targeting high performance.
On the last link, I do not know if I understand this correctly at sista
side but at python side yes you can take any string and compile to bytecode
real time and inject that code back to your live execution. If that is what
you mean. Live bytecode compilation can happen at module level too of
course , and a string can be anything from one line of code to a collection
of modules. The cool thing is that you can sandbox the compiling too so you
do not cause any security issues, giving the code access only to a fraction
of your state and code. So yes it gives you a lot of room to move around in
this department but again there is no JIT VM , at least for CPython.
PyPy is a JIT VM for python with Slang like language called rpython that
can be used to port any language and I spoken with some of it authoer and
seem to follow Cog VM vclosely and of coruse expressed admiration of
Eliot's work. Unfortunately PyPy had a long track of issues with python
libraries that wrapped C code so it never get a lot of traction, but its
non the less used by some python coders
If anyone does mind I would like some pointers on the subject of
and reified stack frames
that were mentioned earlier on, I googled them but did not find enough to
clarify what they are in case of Cog VM.
On Thu, Oct 12, 2017 at 12:42 AM Ben Coman <btc at openinworld.com> wrote:
> On Thu, Oct 12, 2017 at 12:38 AM, Dimitris Chloupis <kilon.alios at gmail.com
> > wrote:
>> does "become" only exchange references ? Or is it more to it than that ?
> Also interesting reading...
>> where I can find information about what insance enumeration and reified
>> stack frames are ?
> Lhe last entry here...
> Also, does Python do Polymorphic Inline Caching?...
> or bytecode level hotspot recompilation...
> cheers -ben
>> Python has methods in gc module (module for its garbage collector) to
>> find objects that point to an object or objects that an object point to .
>> But it has no convenient method to exchange those references . I assume you
>> could do it via an iteration but I never tried it in practice.
>> Indeed such feature is essential for live coding. I will have to add it
>> to my implementation thanks.
>> Is this book still relevant for my implementation ?
>> On Wed, Oct 11, 2017 at 6:07 PM Bert Freudenberg <bert at freudenbergs.de>
>>> On Wed 11. Oct 2017 at 16:27, Dimitris Chloupis <kilon.alios at gmail.com>
>>>> I am talking about beyond those obvious features that Python has them
>>>> covered is there anything special the Cog VM is doing live coding wise that
>>>> I am not aware of ?
>>> Instance enumeration, the become operation, and reified stack frames are
>>> features that set Smalltalk apart and enable many of its live coding
>>> capabilities. Cog supports these features. Cog was specifically designed to
>>> allow fast stack operations in the normal case while still allowing frame
>>> manipulation. Spur was designed to make "become" fast, it used to be very
>>> - Bert -
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev