[Pharo-project] [ANN] Traits installer/uninstaller utility

Schwab,Wilhelm K bschwab at anest.ufl.edu
Sat May 15 21:04:33 EDT 2010


Johan,

Best of luck with it!  Taking a really quick look at your web site, this looks like something that could take a lot of time rendering graphics.  Is drawing time a problem for you?  Did you do anything in particular to avoid bottlenecks?  I ask because I am starting to port some of my graphical code to Pharo; some of it is going from home-grown to using gnuplot, but elsewhere I was able to simply pass (Windows speak) an HDC into a function in a DLL and do a lot of rendering fairly quickly as a result.  I am still looking for how to approach that in Pharo+Linux.  I am starting to make my own .so's with success, but have yet to produce graphics that way.

Bill



-----Original Message-----
From: pharo-project-bounces at lists.gforge.inria.fr [mailto:pharo-project-bounces at lists.gforge.inria.fr] On Behalf Of Johan Fabry
Sent: Saturday, May 15, 2010 7:37 PM
To: A friendly place where any question about pharo is welcome; pharo-project at lists.gforge.inria.fr
Subject: [Pharo-project] [ANN] Traits installer/uninstaller utility

Hi all,

this is a small package that I wrote after doing a traits-based refactoring of AspectMaps (Plug: Check out AspectMaps for a cool visualization of Aspects. http://pleiad.cl/aspectmaps. It has nice screencasts. All comments welcome!)

AspectMaps extends a number of classes of FAMIX to do its thing, using standard class extensions. This works OK when you are not using traits. But when using a trait, you need to redef the class, i.e. change the original package (in this case one of the moose packages). A big no-no. This kind of change should also be encapusulated in the AspectMaps package, but currently this is not possible. So, as long as traits and packages dont play well together, these kinds of refactorings are out. 

However not so when you are using the TraitsApplication package. This package provides a means to programmatically install/uninstall traits. Call it in a post-load action on a package (if such a thing exists), in a class initialize method, et cetera (for AspectMaps I do it in the AspectMaps>>open method). I thought this could be useful to some members of the community so I am releasing it publicly. You can find it at http://www.squeaksource.com/TraitsApplication

CAVEAT: This is a quick implementation, it is non-optimal. It can be made much more elegant, but that requires time that I dont have right now :-(. I does not handle fancy trait compositions (yet). I give no guarantees other than that
1) it passes all of its tests
2) it works for me :-)

So check it out. Comments are welcome!
--
Johan Fabry   
jfabry at dcc.uchile.cl - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile




_______________________________________________
Pharo-project mailing list
Pharo-project at lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project




More information about the Pharo-dev mailing list