Thursday, 31 December 2009

A Cry from the Crypt

Breaking into a running python program using pdb and Unix signals.
2d vectors in Python.

Learning Swedish. More learning Swedish, with online mp3 files. Mercurial hosting on bitbucket.

Cool tutorial on 2D games.

OpenGL Red book online. Basic introduction to vectors.

Open source OCR software, and papers about that. Cloth simulation. Again. Processing physics. GCD. Flixel.

Friday, 9 October 2009

Next in Line

The stdbuf program is now in GNU coreutils. Trying to handle buffered stdout in programs controlled via pipes is awkward.

Friday, 21 August 2009

Forget to Remember

A stylish introduction to the novelties of HTML5.

General collection of programming related 'stuff' - docforge looks interesting.

The Django framework in Python is quite nice, but needs, like all dynamic languages, a good way to debug for typos. The scratch module looks to be the simplest possible way to write a non DB backed web service, albeit with absolutely no support for safe concurrent data access as designed.

Planning a trip to MARS in a Cell. To read about Cell Execution and performance on Cell.

The HIPR Image processing textbook online.

Wednesday, 12 August 2009

The Unforgiving Blade

Cell Linux development is oft discussed on the cbe-oss-dev list.

Jeremy Kerr writes Cell Linux code for IBM.

IBM hosts the developerworks Cell Broadband Engine resource centre.

The Cell Performance forum has interesting articles.

The CorePy system can program SPUs.

A blog on Cell Programming.

How to setup a webserver on OSX. Dynamic DNS makes it visible to the world via a name (provided the computer is left on ;-))

Sunday, 2 August 2009


Shoes - ruby in a box, with a simple to use UI library. Nice enough, but bundling its own version of ruby makes it awkward to integrate 3rd party libraries wanting a different minor version of Ruby. It has an excellent, and amusing, set of documentation.

Compilers for one language targeting another are nothing new, but translating ANSI C into higher level programming languages is interestingly nutty to perform. Clue targets Lua, Java, Perl, and Javascript.

The clojure language discussion of state discusses some of the problems of using an Actor and message passing approach to concurrency.

Jerome K. Jerome's idle thoughts can be read via Project Gutenberg.

An explanation of the FFT.

Games need artwork. Free artwork is a good thing. Good free game artwork is a very good thing. General program art is also good, especially for icons.

Applescript is evil. Langauge bindings for AppleScript are nifty. Enter appscript. Don't forget the tools needed to understand the AppleScript API being bound to, e.g. iTunes.

Ambulance driving and paramedic work - how to be under appreciated, overworked, and covered in bodily fluids all in one day's work - and in a free ebook, Blood, Sweat and Tea.

VirtualBox is a free VM, ala VMWare or VirtualPC. Also, free for 'personal' use, which does in fact permit commercial usage. User manual.

Flipcards, in python. Pyglet, OpenGL and sprites and animation and sound and stuff for games, in a nice package. Unlike pygame, easy to install. Pymunk, a pythonic wrapper around the chipmink 2D physics library. 1.1.3 needs a fix for crashes related to timers, caused by sound playing. Centering windows tip.

Google's protocol buffers make python data persistence easy, and should provide support for evolving data schema.

Friday, 27 March 2009

Tuesday, 24 March 2009

Crash Test

Automated testcase reduction is way cool. Lithium is a very nice python tool for that, easy enough to modify (to for example, attempt to not reduce only in chunks that are powers of two in size)

Hand in hand with automated testcase reduction is automated testcase generation. There is a little GNU tool (named spu) hiding away in the GDB sources to do just that.

EA have a custom STL replacement. (EASTL). WxCocoaDialog, and CocoaDialog.

High precision timers for Cell Linux.

Monday, 16 March 2009

Look for the Truth

Terry Pratchett defines why I read SF & Fantasy.

Just when C++ seems understandable, some new examples of what can be done show up, and present interesting bafflement.

How to program securely in C/C++, avoiding integer overflow via templated operator overloads and allowing testing of objects in boolean contexts without unintended integral promotions.

Test case reduction - using Delta and a book on Why Programs Fail.
Delta debugging.

Monday, 2 March 2009

Welcome Home (Sanitarium)

The shape of code. Interesting. A book giving a cultural commentary on the C language. The C language is relatively small - the commentary comes to 1600 pages - if he wrote it for C++, then would it ever end?

Microsoft have, as expected, a
proprietary name mangling scheme for symbols output from their C++ compiler. It is irritating that they cannot find it in themselves to fully and publically document the naming scheme, resulting in a series of more or less incomplete or obsolete 3rd party attempts scattered across the internet. Even if they promise to, and do, completely revise the scheme each version of the MS tools, it would still be preferable to the current unknown, unknowable, and murkily mutable world of trying to interoperate.

Not that purveyors of open source are much better off - you can point fingers at the quality of the code, you can cry at the state of the documentation - or rather, the lack of (good) documentation about the internals - not just the user manual. Fear of infringing on license terms leads to a reverse engineering process, just like proprietary software, even with open source. Still, some other people do occasionally write docs - leading to the question, are those correct for any or all versions in the range from obsolete, current and bleeding edge.

The impact of economics on compiler optimisation.

Computer chess. Fast, and pretty. The grep command takes a -v argument to invert the meaning of the match - e.g. to drop matching limes, rather than non matching. Random numbers in batch files via %random%

Friday, 20 February 2009

The Line Begins to Blur

The 7zip tool has a command line program to go along with the GUI integrated into Windows explorer. This is well documented here.

High performance fractal viewer written in Java - beautiful images, and good performance. Seems scalar loops in Java get good performance, and you can write a portable GUI on top and have arbitrary precision maths support from the libraries. The symmetry in chaos book describes interesting fractals. Its a sign of changing times that the example programs were written in QBasic.

Some C++ objects are non-copyable. Some patterns recur. Heh.

Tuesday, 17 February 2009

Out Of The Shadows

The sphereflake - nice procedural model generation and raytracer in ~100L of C++. Sorting algorithms have a .com web site.

Tuesday, 10 February 2009

Wake Up

Someone, somewhere, is complaining about the offensive content of the internet. And sending cease and desist letters, to chilling effect.

Someone, somewhere, is wishing a file format they need to process was documented. People write books about things lacking documentation. Like Windows 2000, and its assorted development tools. Someone (who?) may be programming Windows applications in assembler.

John Levine's Linkers and Loaders book is available online in draft form.

Finally, online hex to binary/decimal converters are useful.

Friday, 6 February 2009

The Thin Line Between Love and Hatred

Visual Studio 2005 has a nice debugger; I spend quite a lot of time there. It is certainly an improvement over gdb. Some of its nicer features are the visualisations of the programs data structures - STL containers, arrays of characters as strings. The visualisation of data structures can be customised, and this is good; Sadly, it is not a documented feature. The autoexp.dat file contains the relevant specifications.

It can be used to provide custom views of data structures specific to programs and libraries. One example is the Chromium browser from google. (and links 1,2,3,4,5). It can also be used to auto expand watched data.

The parser and evaluator for these leave much to be desired. Syntax errors are silently ignored (the preview, or child view, the visualiser for a given type is unchanged) leaving the display unchanged. If not ignored, they are reported in a single modal dialog. If an error is not syntactic, the debugger will crash. Possibly immediately, possibly subsequently in the middle of a debugging session on inspecting certain values.

Beyond the implementation quality issues, the lack of documentation is the main problem. The syntax, while not good, would be improved by a smattering of documentation on the MSDN.

Its a shame, because it is obviously a (potentially) useful feature. It certainly was useful for substituting names for numeric codes in data views (when it didn't crash...)

The Visual Studio command line options are documented on MSDN - some obscure but useful ones. Possibly the most useful is /debugexe - to invoke the debugger on a program from the command line.

Wednesday, 4 February 2009

Try, Try, Try

People try to explain maths on the internet; periodically, I try to understand it once more. Teleworking, but from Edinburgh...

Monday, 19 January 2009

The Frayed Ends of Sanity

Some blog titles make you jealous; JavaScript used for sorting DOM list elements and FireBug's console for printf style debugging sanity.

Integration of bugzilla and Thunderbird to ease dealing with bugzilla generated report mails. Nice if it worked with an authenticating bugzilla.

Wednesday, 14 January 2009

Links 234

Version control books online. For CVS, SVN, and Hg. (FAQ). Using a version control system as a 'super client' to another is an interesting idea.

Graphviz for debugging data structures, especially DAGs

Sunday, 11 January 2009

Before I Forget

It is hard to find good online resources about compiler writing. Two interesting approaches to teaching compiler implementation are nano-passes and An Incremental Approach to Compiler Construction.

Wednesday, 7 January 2009

Piece by Piece

Some pretty folder icons on a pretty website. A guide to actually using them on OSX...

Encoding email addresses in JavaScript for web display to humans rather than bots - although, how long will it be before bots run JS?

Markdown. Text to html. Showdown, Markdown in JS. Syntax highlighting for code snippets. Browser side code is becoming useful for more than annoying input validation.

The programming language Oberon, dead in all but name, lives on. As normal for niche languages, especially dead ones, documentation is scarce. Fortunately, Oberon is simple and the report short. Some more books on Oberon are around too, for the moment. Since Oberon is so simple, no-one uses Oberon 1, 2, or 2007 - but extended versions with features (re)added from Pascal, Modula and other Pascal derived languages.