[squeak-dev] Some Rosetta examples

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Apr 22 21:44:51 UTC 2020


Hi all,
from time to time, we might want to add some Rosetta snippets for our
favourite Smalltalk flavor.
I have added a Squeak entry for
https://rosettacode.org/wiki/Hamming_numbers#Smalltalk

This is related to the discussion having taken place here about
Generator(s), timesCollect: ...
I have used Xtreams for laziness capability.
It's not perfect, because the block read stream does not have absolute
positioning capability.
I could have used a Generator, if only it had the capability to skip a
batch of items...

The snippet is reasonably fast.

One of the pitfalls is the syntax for declaring classes and methods (bangs
gives a wrong idea of what Smalltalk coding is).
I guess that's one of the reasons motivating Pharo's Tonel format (like the
gnu format)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200422/2390f55b/attachment.html>


More information about the Squeak-dev mailing list