technology from back to front

Archive for the ‘Smalltalk’ Category

Assuming there’s a user is sometimes a bad idea

Squeak has a very strong (historic) assumption that there’s a(n interactive) user interface. I stumbled across another occurrence of this assumption the other day. Let’s take a look at the problem, and how to fix it.

Read more…

by
Frank Shearar
on
23/09/13

Breaking inter-package dependencies through Squeak’s pragma preferences

The Preferences class provides a common place for all parts of a Squeak Smalltalk image to register their switches: Which update stream do we want to follow? What colour do we want our Browsers? Do we allow assignments to block parameters? Do we allow underscores in selector names? Preferences range from low level things that affect the language’s grammar, all the way to trivial things.

In the old days we would create a preference by adding a getter/setter pair that would expose a key-value pair in a dictionary. That sounds great. It’s certainly simple. It’s only when a system evolves organically over decades that we realise the trap: such a dictionary is a giant chain, coupling together otherwise independent packages that simply wish to store something configurable. Even though we can store the preference accessors within each package, the packages still share the backing dictionary. It’s a recipe for trouble. Let’s see how we can untangle the chain.

Read more…

by
Frank Shearar
on
31/07/13

Resumable exceptions for separating packages

Resumable exceptions form a key component of the Smalltalk infrastructure. They are one of the standard means of communicating along the call stack, much like Common Lisp’s condition system. They can, however, add a “cross layer” dependency.

Read more…

by
Frank Shearar
on
20/07/13

One thing and one thing only

Package dependencies appear in many ways, some more surprising than others. Let’s see what we’ve recently dug up in the trenches.

Read more…

by
Frank Shearar
on
30/06/13

A Double Fugue in Traits

Traits provide a means of composing an object’s functionality out of smaller, simpler parts. Verbs being limited in number, especially good ones, sometimes you want to compose two traits that share names. Today we’re going to look at how to resolve the dispute.

Read more…

by
Frank Shearar
on
31/05/13

Non-blocking parsing

Last month we saw one way how to produce decent error messages while parsing. I’ve also mentioned that parsing with derivatives is a non-blocking parsing technique. What’s that actually mean?

Read more…

by
Frank Shearar
on
23/03/13

Reporting parser errors

We like parsers. One of the things that really kills the vibe with parsers is a rubbish error message.

Given the technical interestingness of parsing with derivatives, can we get useful error messages out of them?

Read more…

by
Frank Shearar
on
20/02/13

Just In Time Development

Since the dark ages of yesteryear Squeak has had a very interesting button in its Debugger – “create”. Today we’re going to teach it a new trick.

Read more…

by
Frank Shearar
on
30/01/13

Squeak 4.4 released

Squeak 4.4 Ulam Spiral is finally ready to be born. I semi-volunteered to be its release manager, and I’d like to look back over the last six months and talk a bit about what’s happened.

Read more…

by
Frank Shearar
on
31/12/12

Compacting cyclic parsers

When I wrote my Smalltalk deriving-with-parsers library, I ran into an issue with compaction: cycles in the parser. Self-referencing parsers (corresponding to left- and right-recursive rules) occur naturally, so I couldn’t hide from the problem. I investigated two ways to introduce circularity as well as how to compact these graphs: delegates, and “sutures”.

Read more…

by
Frank Shearar
on
30/12/12

Search

Categories

You are currently browsing the archives for the Smalltalk category.

Feeds

Archives

2000-14 LShift Ltd, 1st Floor, Hoxton Point, 6 Rufus Street, London, N1 6PE, UK+44 (0)20 7729 7060   Contact us