What are plugins

Hannes Hirzel hirzel at spw.unizh.ch
Fri Mar 15 21:09:36 UTC 2002


On 15 Mar 2002, Martin Drautzburg wrote:

> 
> Could someone give me some pointers to what plugins are, where they
> are and what kind of plugins are available.
> 
A plugin is an external code library linked into Squeak.


The external commands are called by so called 'primitives'.

For example the StarSqueakPlugin I've been asking about in another thread
has methods like

<primitive: 'primitiveDiffuseFromToWidthHeightDelta' 
module: 'StarSqueakPlugin'>

<primitive: 'primitiveEvaporateRate' module: 'StarSqueakPlugin'>

<primitive: 'primitiveMapFromToWidthHeightPatchSizeRgbFlagsShift'
module: 'StarSqueakPlugin'>

This are direct calls to compiled C or whatever code bypassing
Smalltalk. However in case the plugin code fails for some reasons often
the method contains a Smalltalk implementation as well which gets
executed. Sometimes the Smalltalk code has been the base for creating the
external object library. There is Slang a subset of Smalltalk used in
Squeak which has a compiler to C as well in Squeak.


An example for a plugin with an excellent documentation is the regular
expression plugin done by Andrew C. Greenberg
http://www.mucow.com/RePlugin.html

A search on 
http://minnow.cc.gatech.edu/squeak/search

reveals additional information though not all up to date


Hannes Hirzel




More information about the Squeak-dev mailing list