Archive for the 'Hacking' Category

Smalltalk example of the day

Friday, February 23rd, 2007

I often find myself typing out code snippets to prove to myself that, yes, it really is easy in Smalltalk. Rather than keep them to myself, I think they may be useful as examples of Smalltalk code, so I’m going to try starting a series.
At The Daily WTF, they are removing spaces from a string. [...]

A Pop Client

Monday, November 20th, 2006

This is ported from CL-POP, which is written by Brian Sorg and is gratifyingly easy to port. Not sure if that is because of Brian’s good code, because POP is a very simple protocol, or because of the cousinly similarity of Lisp and Smalltalk.
pop.tgz.
Also contained in the archive is an example script which deletes mail [...]

My First Scheme Program!

Sunday, November 12th, 2006

I was following a Photoshop tutorial for creating Lichenstein-style images when I realized that it was using a built-in filter, which GIMP lacks… so I wrote one.
Halftone dots version 1.
I haven’t wrapped it up with the script-fu stuff, so if you want to run this for yourself, you have to run the (define)s first, then [...]

New Smalltalk article series

Friday, October 6th, 2006

I didn’t find writing a tutorial very satisfactory, so I’m going to try another take on introducing Smalltalk, by talking about those features of the language that really amaze me.
Wow Smalltalk!

SVG Browser pt. 2

Thursday, October 5th, 2006

The SVG browser has the problem that putting text at angles seems to make Firefox start working the processor hard, even after the image is rendered. Don’t know why.
Anyway, here’s a reworking of the Class diagram with the methods all horizontal. Maybe it’s more readable too…

Here’s a mockup of a class hierarchy diagram:

Obviously, I don’t [...]

SVG Browser

Wednesday, October 4th, 2006

Some screenshots of the SVG browser I was playing with a while back:
A class diagram (inspired by the ‘donut’ diagrams in “Smalltalk, Objects, and Design”):

A namespace tree - the maths needs a bit of work, and the tree is way too cramped:

Smalltalk logos

Friday, September 29th, 2006

Not so long ago, there was a thread on comp.lang.smalltalk proposing a new logo: [|]. Somebody mentioned Polly Morphic, the parrot mascot of the Smalltalk Chronicles (I think it was). Anyway, I like Polly Morphic much better than the brackets thing, so here’s my effort (ignore the writing for now):

This is the SVG original: Polly [...]

Clock Demo

Sunday, May 28th, 2006

Just posted a page with a clock demo (see right) that I’ve created. It’s actually on-the-way to a desklets system in gst, but not really worthy of that name yet.
It’s mostly a demo of linking to various C libraries (XLib, Imlib and Cairo). Check the page for more.

Well, that passed the time

Sunday, May 21st, 2006

Giving up on proper handling of signals. Everything seems to work; it just doesn’t… work. Presumably, I’ve got some error with the actual C function invocation (which would exactly surprise me), but I’m so tired of adding debug statements and the compile-install-test cycle, I’m just going to poll instead, since that works. Incidentally, there’s an [...]

Signals

Friday, May 19th, 2006

This week’s Smalltalk effort is to try to unblock blocking calls.
Basically, I want to be able to call XNextEvent without blocking the entire image. That means (I think) forking a C process, and waiting on a (ST) Semaphore, which will be signalled when the child process terminates.
It’s an experiment, really, because I’m sure there are [...]