[closer-devel] Plans for ContextL 1.0

Pascal Costanza pc at p-cos.net
Sun Jan 7 19:06:23 UTC 2007


Hi,

I am planning to move ContextL to a 1.0 release, probably/hopefully  
in February. To round up a few things, I have collected the following  
issues that I would like to fix for 1.0:

+ Currently, there is no clean way to activate / deactivate layers  
for the rest of a computation and confine such activations /  
deactivations to the current thread. I have now a better  
understanding of what is required to be able to do this. Essentially,  
there must be a way to capture the current set of active layers and a  
way to reactivate such a captured set of layers. So let's say we have  
two functions current-layer-context and funcall-with-layer-context,  
then we could do the following:

(let ((layer-context (current-layer-context))) ; capture the current  
set of active layers
   (process-run-function 'some-process-name
     (lambda ()
       (funcall-with-layer-context layer-context ; reinstall the  
captured set of active layers
         (lambda ()
           ... here comes the actual code ...))))))

Inside such code, programs can then call ensure-active-layer and  
ensure-inactive-layer to activate and deactivate layers for the  
current thread without affecting other threads.

The functions current-layer-context and funcall-with-layer-context  
would also allow more complex things like capturing and reinstalling  
active layers in continuation-based web servers.


+ I am not happy with some of the names for dealing with layers. The  
macros with-active-layers and with-inactive-layers are fine, but I  
have chosen suboptimal names for ensure-active-layers / ensure- 
inactive-layers and activate-layer / deactivate-layer. Especially  
activate-layer and deactivate-layer don't do what their names suggest.

I would like to replace these names with activate-layer and  
deactivate-layer instead of ensure-inactive-layer and ensure-inactive- 
layer, and with compute-active-layer-context and compute-inactive- 
layer-context instead of activate-layer and deactivate-layer  
respectively. I would also like to get rid of the current funcall- 
with-layers and apply-with-layers functions because they are  
redundant once funcall-with-layer-context and compute-active-layer- 
context / compute-inactive-layer-context are added.


+ I would like to beef up the meta-object protocol, especially the  
introspective part. For example, it should be possible to determine  
on what layer a method metaobject is specialized via method-layer,  
etc. There are quite a few metaclasses in ContextL, so I have to put  
some thought on what to expose and what not, but I think this should  
be beneficial.


+ Currently, some of the metaobjects (layered functions, layered  
classes, layered methods) look quite ugly when printed. I would like  
to define appropriate methods for print-object such that they print  
more nicely.


After these changes, I would like to compile a paper that describes  
the overall design of ContextL with a few examples and an API  
reference. There are, of course, more things that would be  
interesting to add to ContextL, but this is left for a 2.0 release. ;)

Any thoughts, wishes, comments, criticism?


Pascal

-- 
Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
Vrije Universiteit Brussel, Programming Technology Lab
Pleinlaan 2, B-1050 Brussel, Belgium







More information about the closer-devel mailing list