Info on Smalltalk DSLs or Metaprogramming...

David T. Lewis lewis at
Thu Aug 17 10:52:59 UTC 2006

On Wed, Aug 16, 2006 at 11:36:33PM -1000, Rich Warren wrote:
> Ruby can more-easily create actual child processes, which might let  
> me plow through the data faster on a dual-core machine (though, I  
> believe this might lock it into only running on Unix boxes).

Given that you are expecting to run on a unix box anyway, you can
do this quite easily in Squeak, see OSProcess and CommandShell on
SqueakMap. If you want to run multiple Squeak images on multiple
CPUs, look at #forkSqueak.

But I would be very surprised if you need this in practice. You can
manipulate really large amounts of data directly in Squeak, and
you'll be amazed how fast it can be.  Once you load your data into
Squeak, everything is in memory, and Squeak itself is quite fast.

Not so obvious is that when you load your data into well designed
objects, you actually can use a lot less memory than you might
have expected (no need for multiple copies of the same pieces of
data as often is the case in practice with file-based or database
oriented applications). The end result is that you often end up
realizing that you don't need a database after all, once it's in
a Squeak image that you can save at will, that's all you need.
You can crunch a lot of data all in one image with no need to
fuss with child processes, and no need to worry about exchanging
data between the processes or saving results to files.

When brings us back to your DLS question. Michael Latta's advice
is very good: Try implementing your language as classes and
methods that read well and make sense to people. you can read the
source code for this in from a configuration file if you want.
If that turns out not to be sufficient for your needs, you can
implement any language syntax you like using SmaCC (parser
generator like lex/yacc for Smalltalk). SmaCC is on SqueakMap


More information about the Squeak-dev mailing list