APL in Squeak [was: RE: Matrix class?]
Alan Kay
Alan.Kay at disney.com
Sat May 5 17:35:05 UTC 2001
A really early example of "LISP in one page" from Smalltalk-72 can be
found in the "Early History of Smalltalk" chapter for HOPL II.
Cheers,
Alan
-----
At 4:12 PM +0200 5/4/01, Thomas Kuehne wrote:
>Dan Ingalls wrote:
>
>> [...]
>>
>> APL in 3 pages
>> The idea is that most of APL consists of a general array class
>>(basically an element array plus accessor state), a few coercion
>>rules, and a bunch of math functions. Once you have designed
>>these, you can do essentially everything in Squeak that you can in
>>APL, except with readable method names.
>
>My "Transfold" pattern (transpose & fold), among other issues,
>describes an operator that can directly express three of the four
>primitive extension operators* of APL (reduction, scan, and
>innerProduct). The fourth (outerProduct) can be described by a
>combination of transfold and map (which itself is a degenerated
>transfold).
>
>*primitive extension operators extend an operation (e.g., plus) to
>work on a collection.
>
>The transfold operator is basically a generalization of do:with: to
>work with any number of collections (not just two) and taking two
>blocks; one which is applied at corresponding elements and another
>to fold the results from these applications.
>
>The paper describing this transfold operator heavily relies on the
>"dragging and beating" technique Dan mentioned to achieve a clean
>separation between collections and the potentially many iteration
>protocols they support.
>The idea is that collections hold the knowledge how to explore
>themselves and generate element streams which contain iteration
>continuations.
>By touching the continuations in the desired order clients can then
>decide on their iteration strategy (e.g., pre-order, in-order,
>post-order for trees). Thus there is no need to pollute the
>interface of the collections with all these iteration variants.
>Lazy evaluation, in general, is a great means to achieve such decoupling.
>
>The said paper should be online at
>http://www-agce.informatik.uni-kl.de/~kuehne/ (see Publications)
>
>I'd be interested in the "Lisp in one page" project.
>Is it available somewhere?
>
>Cheers,
>
> Thomas
>
>--
>Dr. Thomas Kuehne
>+49 178 4314387, http://www-agce.informatik.uni-kl.de/~kuehne
>Seemingly difficult answers are simply waiting for someone
>to ask the right questions. -- TK
More information about the Squeak-dev
mailing list
|