Q: Squeak and scientific applications

Joshua 'Schwa' Gargus schwa at cc.gatech.edu
Sat Jul 26 17:06:10 UTC 2003


On Sat, Jul 26, 2003 at 12:08:11PM +0200, Alexander Klein wrote:
> Hello all,
> 
> I'm currently looking for a sensible environment to do scientific computing
> for my PhD thesis that I hope to start in October.
> 
> Once again, I came across Squeak that I had already considered two years
> ago before deciding for C++.
> 
> Today I feel that C++ was the right decision as far as performance is
> concerned, but there are a lot of things that I don't like about C++ and I
> think Smalltalk could be a better choice.
> 
> The general idea is to use Squeak for visualization purposes and
> statistics, while the really hard work is done by an external kernel
> written in C or C++.

That sounds sensible.

> I spent yesterday messing around with the Squeak environment and I have a
> few questions:
> 
> 1. I was really glad to see that there is a foreign function interface,
> since I need to do really severe numbercrunching. Has anyone already used
> the FFI to make FFTW (http://www.fftw.org) library calls?

Not that I'm aware of.  However, I'm currently writing an interface to
(parts of) LAPACK and BLAS, so this type of interface is feasible.
You can use either FFI or write your own VM plugin.  For plugins, the
canonical reference is the chapter "Extending the Squeak Virtual
Machine" in the book "Squeak: Open Personal Computing and Multimedia".
Another excellent resource is Ned Konz's web page on writing plugins:
http://bike-nomad.com/squeak/writingPlugins.html

> 
> 2. I got the impression that Squeak (Or is it Smalltalk in general?) is a
> little limited as far as floating point numbers are concerned. Is this
> really the case, and if so, what can I do to get the equivalent of doubles
> or long doubles?

The class Float provides an IEEE compliant 64-bit floating point number, and
FloatArray works with 32-bit IEEE compliant floats.  It would be relatively
straightforward to use the latter as a model to create a DoubleArray.

Can you be a bit more specific about your impression?

> 
> 3. Since I'm used to reading plain text files, I found the system browser
> really confusing. Also, although I think I understand the general ideas, I
> have a really hard time reading Smalltalk source. Is there anything like
> 'Smalltalk in two weeks for C++ programmers'?

Squeak Quick Reference
http://minnow.cc.gatech.edu/squeak/1859

Introductions to Squeak
http://minnow.cc.gatech.edu/squeak/377

The Newbie Page
http://minnow.cc.gatech.edu/squeak/681

The swiki is your friend!

Hope this helps,
Joshua

> 
> Best regards,
> 
> 	Alex
> 
> 



More information about the Squeak-dev mailing list