Red Echo

March 31, 2011

Super awesome inspiring mini-presentation: How to Steal Like an Artist, and 9 Other Things Nobody Told Me:

All advice is autobiographical.

It’s one of my theories that when people give you advice, they’re really just talking to themselves in the past. This list is me talking to a previous version of myself.

Your mileage may vary.

1. Steal like an artist.

Every artist gets asked the question, “Where do you get your ideas?”

The honest artist answers, “I steal them.”

March 30, 2011

Why I Like Mercurial More Than Git:

The tools are very similar, and many of the distinguishing differences come down to a matter of taste in my opinion. […] The big difference, the deal-maker for me, is in how each tool goes about meeting the fundamental requirement for any version control system: how it handles source code merging.

March 28, 2011

Right, so, what have I been up to lately?

I spent most of March in a cabin up near Whistler, sick with a flu, or both. I didn’t do as much skiing as I had hoped to, but a quiet cabin in the woods with a fireplace is not a bad place to laze around and get over a flu. I also brought a formidable array of computing hardware and spent a lot of my relaxation time writing code. Some of this was actual day-job work – I brought along the dev boards for my current project – but a fair bit of it was Radian work. In particular, I made solid progress on the two indexed-container objects, map and array.

Most of my time back in Seattle has gone into the ALTSpace project. We have a very substantial sewing workspace, a reasonably well-equipped machine shop, and a rudimentary electronics workbench. There’s a lot of sorting and organizing left to do, and we haven’t even started on the welding room, but it’s coming together. We still don’t have Internet access there yet, but someone who knew what he was talking about took a look at our telecom panel yesterday and figured out what needs to happen next.

I’m still picking away at the next Rhythm Robot prototype. I have finished the layout for the control panel board, which is by far the most complex electronic object I have ever attempted to build, and have actually printed and assembled the MIDI & power daughterboard. I have not yet had time to test the MIDI interface yet but the power regulator works exactly as it is supposed to. The logic board, based on the STM32 Discovery, still needs a fair bit of LED multiplexing circuitry, but I don’t need to finish that in order to make progress on the main control panel and the rest of the hardware needed to make this project go.

March 22, 2011

ARM-Utilities offers a download/upload/debug tool compatible with ST’s proprietary ST-Link protocol, otherwise usable only on Windows.

Later we decided to switch to the more powerful ARM processor, and selected the inexpensive STM32VLDiscovery board as our core module. We were dismayed at the very limited Windows-only support and the concomitant requirement to use a heavyweight GUI for every development activity.

These utilities, libraries and header files were the result of our desire for an equivalent quality ARM development environment. Especially a simple development, build and delivery toolchain. We not only wanted to develop the code, but archive it and have others use, modify, compile and download it with the same ease as with the AVR.

March 21, 2011

Simple, clear, well-written introduction to Pratt parsers

If recursive descent is peanut butter, Pratt parsing is jelly. When you mix the two together, you get a simple, terse, readable parser that can handle any grammar you throw at it.

Pratt’s technique for handling operator precedence and infix expressions is so simple and effective it’s a mystery why almost no one knows about it.

I would guess that it’s overlooked because the programming tools world is still largely convinced that automatic parser generators are something more than a dead end. People who don’t know any better see all the emphasis on parser generators and conclude that parsing must be some kind of inhumanly difficult, heinously complex process far beyond the capacity of an unaided human mind.

March 1, 2011

Clump is a program designed to replace makefiles. It builds C programs in what the author describes as “the most intelligent way possible”, to wit:

– Determine which C files need compiling by analyzing header include
dependencies and checking timestamps on the .o, .c, and .h files.

– Determine which C files are main programs by looking for an “int main”

– For each main program, determine the exact set of .o files that need to
be linked together to build an executable file. It does this by tracing
the header dependencies in a recursive manner (transitive closure). […]

– Determine which system libraries need to be linked into a program
based on any system includes. For example, if a C file says
#include , then clump will know to put “-lcurses” on the
link command line. This is all configurable in the clump.ini file.