[plt-scheme] Swindle Tiny-CLOS examples..

From: Will M Farr (farr at MIT.EDU)
Date: Thu Mar 1 22:45:59 EST 2007


I have a fair amount of swindle code in my differential geometry  
project, which you can find at http://web.mit.edu/farr/www/ 
SchemeCode/ (or just darcs get http://web.mit.edu/farr/www/ 
SchemeCode/ if you use darcs).  The background is pretty technical  
(it's intended to duplicate the code associated with this MIT AI  
Memo: http://www-swiss.ai.mit.edu/users/wisdom/AIM-2005-003.pdf ),  
but you might still get some use out of it.

I'd suggest looking at generics.ss and then tuples.ss for the  
simplest examples of generic functions and methods.  Then, if you  
want some fun with applicable objects (objects which can also be  
functions that are applied), you could have a look at manifolds.ss,  
which defines vectors fields as operators that act on functions over  
a manifold, but also defines a way to add, subtract, etc, vector fields.

Good luck, and feel free to ask questions if there's something you  
don't understand!


On Mar 1, 2007, at 10:36 PM, Kyle Smith wrote:

> I've been working my way through Queinnec's, "Lisp In Small  
> Pieces", English Ed. 1996.  It's quite an impressive breadth of  
> material that he covers; eleven (11) interpreters and (2)  
> compilers.  Some parts are obviously dated, but there is a new  
> French ed. out just this month, so hopefully for those of us French  
> impaired readers, they'll have an English translation out in less  
> than the two years it took them last go around.
> Anyway, not only are some of the concepts a bit out of touch with  
> current research, but the programs are written in a CLOS like  
> system called  Meroonet, with the last update in 1993.  There is a  
> much more robust version called Meroon that actually was ported to  
> MzScheme v50 circa 1998.  Anyway, I pulled them both off the net to  
> see if I could easily port them to v360'ish MzScheme.   
> Unfortunately,  he  makes  heavy use of  defmacro which makes it a  
> nightmare to think about porting if I can find an easier route.
> That's when I remembered Swindle had a CLOS like Object system.  So  
> I spent the afternoon looking it over.  However, I didn't find any  
> example programs.  I learn best from a good example along with the  
> documentation to pick it apart.  Is it possible that someone has  
> any example Swindle OO files that make use of generic methods?    
> Queinnec makes use of generics extensively.
> In return for any example code that gets me off the ground at  
> mimicking Meroonet, I'll gladly post the port on PlaneT so others  
> can use it when working through the text.
> Thanks,
> --kyle Kyle Smith airfoil at bellsouth dot net schemekeys.blogspot.com
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.