[squeak-dev] Application deployment in Squeak

Hans-Martin Mosner hmm at heeg.de
Sat Mar 7 22:27:01 UTC 2009


Kevin schrieb:
>
> Options:
>  
> -  Stripped Squeak image:  I've picked up hints of various attempts at
> this (Dependency-
> walker type things, and scripts that disable developer tools).  Seems
> that this is a
> hard problem though, between type-inferencing where variables can take
> on arbitrary types,
> and reflection, and dynamic evaluation, and so on.  So, for now at
> least this is kind
> of a cumbersome and unwieldy way to deal with app deployment.
If you skip the fancy type-inference stuff and just throw out the
compiler and development tools, you might get a pretty OK result without
much hassle. Of course there would be room for space improvement, but in
today's desktop environments this is mostly a non-issue.
>  
>  
>  
> I need to look into the VM generation stuff.  There's the whole thing
> about the Slang
> subset and C code generation of Smalltalk code, so there's
> already-existing knowlege and
> code to build on.
Forget it. The VM generation stuff is very limited and not designed for
this kind of code.
>  
> Seems like it would be a good fit to go a level higher, and translate
> a bigger subset of
> Smalltalk into a higher-level language like C#, or maybe Java or C++. 
> You'd be able to
> automatically translate a lot more of your Smalltalk codebase, and for
> the parts where
> you can't or don't want to (say to avoid bringing along the whole
> Morphic thing) you'd
> have a much better fit for plugging in a replacement library.
Well, compiling Smalltalk into some other high-level language has been
attempted a number of times, but the fact that all existing Smalltalk
implementations work differently should raise some doubts about the
practicality.
You mentioned the type inferencing "hard problem". Guess what? The same
problem raises its ugly head when you try to compile Smalltalk to any of
the statically typed languages. The way out of the dilemma is to
essentially simulate Smalltalk's method lookup, which basically results
in a badly-written and bloated re-implementation of the Squeak VM. You
might just as well use The Real Thing.
At the end of the day, Squeak images run fairly well on Squeak VMs...
>  
>
> So here's what I'd like to do.  I think I heard that Newspeak got
> open-sourced due to
> lack of funding.  So, I'm thinking that if I bring the Newspeak UI
> stuff into Squeak,
> and use it as the UI layer to develop in Squeak, I get the benefits of
> the rapid-
> prototyping/RAD Smalltalk style, using all the tools available
> therein.  And I get the
> ability (maybe) to take the resulting Squeak application code, run an
> auto-translator
> on it to generate for example C# or Java versions of the
> application-specific classes,
> and link that code against a (so far non-existing) library that mimics
> the Newspeak UI
> classes.
The Newspeak UI libraries might be a good choice for getting native
widgets into your app, but I doubt that translating Smalltalk code into
Java or C# gives you much more than a sizable headache.
Investing some time into getting a stripping mechanism to return nice
usable images is most likely the most promising choice.

Cheers,
Hans-Martin



More information about the Squeak-dev mailing list