Collection idioms in GNU Smalltalk (and problems thereof)

Tagged:  •    •    •    •  

Peter Norvig's blog showed an example of a toy spell checker in Python, which Michael Davies converted to Smalltalk. This problem is interesting and Michael's solution is actually quite idiomatic.

I'll show a couple more tricks that can help decrease the number of lines.

GNU Smalltalk 3.0 released

Tagged:  •    •  

GNU Smalltalk 3.0 has been released at

The release was tested on the following systems:

  • i686-pc-linux-gnu
  • x86_64-pc-linux-gnu
  • powerpc-apple-darwin8.9.0
  • powerpc-unknown-linux-gnu
  • sparc-unknown-linux-gnu
  • ia64-hp-linux-gnu
  • s390-ibm-linux-gnu
  • hppa-hp-linux-gnu

Thanks to Stephen Compall, Thomas Girard, Robin Redeker for help and testing of this release!

News from 2.3.6 to 3.0

(Changes from the last release candidate, 2.95h, are listed later.)

Important changes:

Fun with Generators

Tagged:  •    •  

Sometimes I just wander around in blogs looking for cool snippets in other programming languages. Since the upcoming GNU Smalltalk 3.0 will have some features from Python and Ruby (most notably generators), it is nice to test corner cases and see if GNU Smalltalk's behavior matches what happens in other languages.

I came across two implementations of the power-set function in Python, a recursive and an iterative one:

# by Guido van Rossum
def power(s):
    if len(s) == 0:
        yield Set()
        # Non-destructively choose a random element:

Syndicate content

User login