[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] Wireworld animated GIF renderer - also questions on sty
[Help-smalltalk] Wireworld animated GIF renderer - also questions on style and distribution
Mon, 6 Dec 2010 22:07:30 +0000
Recently I found a Rosetta code task which asked readers to submit
implementations of the Wireworld cellular automaton in various
I noticed that Smalltalk was not on the list, so I decided to try
learning it and completing the task. My efforts can be found here:
You can have a peek at the animated output here:
What it does:
* Reads wireworld programs in the format described on the Rosetta
* Produces animated (pseudo) GIFs of the simulation, using libplot from
* Crashes with uninformative error messages on incorrect input because
it does no error handling whatsoever.
This is my first Smalltalk program. I really enjoyed writing it - but I
am yet a complete newbie! I've only read the GNU Smalltalk tutorial and
parts of the user guide at
Inevitably I have questions:
* I have not parcelled my program as a package. I've read about
Smalltalk packages though, and I see that a package can depend on a
shared object being installed.
However, my program contains C code which is compiled to a shared
library and then loaded dynamically in Smalltalk. I couldn't see
anything in the user manual which would suggest that C source can be
distributed as part of a package, and compiled on the user's machine.
Am I right or are there Smalltalk tools that help with this?
More broadly: am I doing it wrong?
What is the convention for dealing with this?
* I'm used to choosing method and function names in Ruby,
Haskell and C that describe the intent of the function. In
Smalltalk I'm finding this difficult because I need multiple
selector names, one: for each: parameter, so I have to choose multiple
selector names which together describe the intent. I'm not sure
why, but I find this very difficult. Any advice?
- [Help-smalltalk] Wireworld animated GIF renderer - also questions on style and distribution,
John Morrice <=