Tag Archives: c

IRC bot as a fun project

Something I started working on last year: yet another IRC bot. Since IRC is a simple protocol for sending plain text messages to channels or users, it provides opportunities for some good programming projects, such as a bot. An IRC … Continue reading

Posted in Programming | Tagged , , , | Leave a comment

Some practical uses of goto

A few days ago there was another submission on Reddit on the evils of goto. The flow control primitive “goto” is “considered harmful” (the phrase was coined by the editor of the journal in which Dijkstra’s famous letter was published).

Posted in Programming | Tagged , | 3 Comments


A compiler has always seemed to me to be one of the supreme examples of a serious computer program. It operates on other programs, translating them from one language to another. It must simultaneously work with high-level concepts, and manipulate … Continue reading

Posted in Programming | Tagged , | 7 Comments

Namespaces in C

This post describes why namespaces are useful in programming. It also discusses some of the obvious ways of simulating them in C, including a technique for “reifying” them, using structs.

Posted in Higher-level C | Tagged , , | 6 Comments

Massively parallel fractals

I’ve implemented a mode in the fractal program that lets it run on a GPU, using OpenCL (fixes issue 19!). It’s not yet very fast, but IMHO is a good start. Writing my first GPU program was actually quite a … Continue reading

Posted in Programming | Tagged , , , | 6 Comments

Don’t use signed ints if you don’t need them

Progress on fractals, and a minor (but arguably obvious) optimisation I stumbled upon today.

Posted in Programming | Tagged , , | 1 Comment

Low-level priority queue optimisations

Optimising the Fractal’s trace mode by changing the priority queue and enabling SIMD.

Posted in Programming, Science | Tagged , , , , | 2 Comments