Please help a brand new Squeaker.

Ned Konz ned at bike-nomad.com
Sun Apr 15 19:45:34 UTC 2001


Christopher Sawtell <csawtell at xtra.co.nz> wrote:
> Greetings Squeakers,
> 
>  After playing about with it for essentially just a few hours, Squeak 
> Smalltalk would appear to be a very possible answer to my needs but I have a 
> couple or three quick questions.
> 
> 1) Squeak seems horrendously slow. I can't help but wonder if I have left     
>    out a compilation stage or something. Should the huge file of classes 
>    called SqueakV3.sources be compiled or processed in some
>    way if Squeak is to achieve full performance?

The sources file is just that: source code. It's already compiled and in
your image.

What seems slow? What kind of system are you using?

If you get 3.0, try making a new project to test things out in (open/new
morphic project).
The mouse on the initial page can slow things down quite a bit.

> 2) I am hoping to use Squeak in a control situation.
>    Please could some kind soul direct me to a wisp of wisdom about
>    interfacing between programs generated using Squeak and the o/s ( Linux,   
>    if it matters ) drivers. There is a suggestion in the Mail-list archive   
>    that this is possible, but the continuation of the thread seems to have    
>    been lost.

It depends on what kind of interface you need. There's (at least) four
basic options:

* if it looks like a file (open/read/write) try using the file stuff.

* otherwise, you could try FFI to use the services of one or more shared
library(ies)
Though FFI is not a part of the 3.0 distribution by default.

* otherwise, you could write a primitive
Look, for example, at the SerialPort and the SerialPlugin. The code in
SerialPort
is in Smalltalk and calls primitives. Those primitives are defined in
SerialPlugin,
and they call platform-specific code in another file (in my case,
sqUnixSerial.c).

* or you could communicate with a helper app over a named pipe or socket

> 3) After an application is written is it possible to generate a binary which  
>     is directly launchable from the o/s in the normal way?

What do you mean "in the normal way"? You can't get a single file, but
you
can rename the Squeak executable. I believe it'll look for an image file
with a matching
name first, so you should be able to have a couple of files

myApp (or myApp.exe) -- renamed squeak or squeak.exe
myApp.image -- your images
shared libs (DLL's, .so's) if you have external plugins (though you can
compile
plugins internally)

You can abandon sources and also run without a changes file.
 
> 4) How can I interface with ordinary applications - an SQL database for 
>     example.

There are interfaces with both mySQL and PostgreSQL available.





More information about the Squeak-dev mailing list