Squeak SSP-- huh?

Bijan Parsia bparsia at email.unc.edu
Wed Apr 3 18:42:16 UTC 2002


On Wed, 3 Apr 2002, Nevin Pratt wrote:

> I've been playing around with the SSP stuff at 
> http://ssp-squeak.swiki.net, and quite frankly, I'm at a loss at 
> understanding what good it is.

It's good for writing methods that are largely text.

> Well, it's a totally different animal than the SSP work that Alan Knight 
> did for VW.  For one thing, you write your "Active Smalltalk Pages" in 
> the Class Browser instead of using external files.  Hmmm, that might 
> even be useful, except for the way it works.
> 
> OK, I type the example from the swiki into the browser (any class):
> 
> **************
>      serveletExampleOn: strm
>         <ssp on: strm>
> 
>         This is an example servelet method.  I can embed code in this
>         string as follows:  <%= (1 + 1) printString %>.
> **************
> 
> 
> I then "accept" the method, and... voila!  The method magically changes 
>   to normal Smalltalk code of (I am using Squeak 3.2gamma):
> 
> 
> **************
>      servletExampleOn: strm
>         strm nextPutAll: 'This is an example servelet method.  I can
> embed code in the string as follows: ',
>         (1 + 1) printString sspStreamOn: strm.
>         strm nextPutAll: '.
> '
> **************

My guess is that you're browsing with pretty print enabled? When I was
using SSP, it kept things in SSP format.

[snip]
> Now, the problem with the above is that if I had wanted it to convert my 
> original HTML/SSP source string to pure Smalltalk code, I would have 
> written it in pure Smalltalk in the first place.  It doesn't preserve my 
> original code *at all*.  Nor is there apparantly any easy way to feed it 
> an arbitrary string read in from an external file.

It shouldn't be that hard to write a File-in to SSP wrapper, FWIW.


> Now, if you compare this to the work that Alan did with VW...
> 
> ...with Alan's work, I can have my 12 year old son do HTML pages with 
> Dreamweaver (my son's tool of choice), and then gradually introduce him 
> to embedded Smalltalk code within his HTML pages, thus giving him a 
> gradual introduction to Smalltalk.
[snip]

You really should be able to do this too. Of course, connecting with
ComSwiki would be a good thing too, btw.

If the converstion in the browser is *not* the result of pretty printing,
then it's a bug.

I prefer writing such code in the smalltalk browser becasue I get all the
cool features I love (like versioning).

Cheers,
Bijan Parsia.




More information about the Squeak-dev mailing list