Partitioning of Python

I'd like to see a form of "partitioning" added to Python, with three successive stages:
  1. Safe threads. Only immutable (or otherwise thread-safe) objects can be shared between threads. No longer a need to define a "memory model" (unless CPython and Java.)
  2. Dynamic code seclusion. Modules loaded at runtime prevented from affecting statically loaded code, thus ensuring a compiler can always perform intense optimizations.
  3. Untrusted code jailing. Prevent direct access to the OS or filesystem, as well as limiting memory and CPU usage.
Each stage would add a significant application domain:
  1. SMP. Threads can safely and easily run on multiple CPUs, or even on a cluster of CPUs
  2. Optimizing compilers performing global analysis. Mathematical applications, 3D graphics. Kernels anyone?
  3. Webbrowser applets, extra layer to trusted code security. Alternative to hardware address spaces?
One note, I believe sane finalization requires the first stage (safe threads), and since Python (or at least PyPy) requires finalization, it in turn requires safe threads.


Versions graph

Here's a simple graph corresponding to

a, b = ...
assert a == b

(if I can ever get the bloody image added!)

Eventually I gave up and uploaded the image to another site. Fucking blogger.

Bool reducing and runtime-equality

a1, b1 = ...
if a == b:
a2, b2 = ...
a3, b3 = ...
a4, b4 = ...

a2 is equal to a1

b2 is equal to b1

a2 is equal to b2

a1 is NOT equal to b1

Hrm, but to a bool looking at b2 it's as good as equal to a1.. ahh, but only b2 will be visible, not b1, and b1 is not equal.

The ultimate goal is for a branch to be able to match a bool's reduced values at any of those locations.

Python value annotator

I've been working on a value annotator for python. Most of my posts here will probably relate to that.


Let's see how easily I can add new posts

First post!

First post!