[ANN] LambdaMessageSend explained

Stéphane Rollandin lecteur at zogotounga.net
Sun Feb 25 13:05:30 UTC 2007


Damien Cassou wrote:
> What you did looks really cool. I will prepare it for next squeak-dev
> image. Did you already use it in one of your projects ? Can you give
> us a little background please ?

yes, I use it a lot in µO.

it first started from ideous hacks I did on MenuMorph and MenuItemMorph 
so that I could have highly dynamic behavior from menus. I would set the 
morphs target as a MessageSend with another MessageSend as receiver and 
a custom made evaluation trigger as selector, etc. very ugly ! basically 
what I describe in the first part of the notes: how trying to nest 
MessageSends naturally leads to LambdaMessageSend.

now about all menus in µO rely on it.

and again in µO, I also use subclasses of LambdaMessageSend for 
representing plain mathematical functions. see the NFunctionEditor for 
example: if you do 'µO objects'->'+ µO tools'->FunctionEditor then click 
'help' in the appearing bookmorph, you will see how functions can be 
defined directly by their equation: this is all based on LambdaMessageSend.


the lambda calculus stuff just came along as I tried to figure out the 
conceptual framework for evaluation, which is a tricky matter.


curiously enough I also first started to hack a Lisp interpreter 
thinking that would be a good way to test the LambdaMessageSend idea, 
but I eventually came up with Lispkit which does not make use of it at 
all ! ... still I am now trying to implement a compiler and it seems it 
could be quite useful at last.


so everything came from very practical problems I had with µO (I'm no 
theorist). trouble is, I could not stop digging and eventually went very 
astray, since my primary goal is to compose music. I would have been 
better off learning guitar :)


regards,

Stef





More information about the Squeak-dev mailing list