2006 December 17 18:32

Been thinking a lot about the PIC. I’ve decided to try the PIC on some projects. I’m going to spend some time learning the so-called “midrange” (14-bit instruction) PIC architecture. Programmming it in a structured way is going to be a bit of a challenge, but I’m liking the simplicity and directness of the design.

The PICkit 2 Starter Kit seems like a good way to jump in. This is a USB programmer bundled with a project board that will accept 8, 14, and 20 pin parts. The project board includes a (socketed) 16F690 – a quite capable 20 pin PIC. There is another board coming available, also compatible with the PICkit 2, that will accept 28 pin parts.

The PICkit 1 Starter Kit is still available, and is a bit cheaper ($36 rather than $50), but it’s not as flexible and can only program baseline and midrange parts (the 10F, 12F, and 16F families). The PICkit 2 can program practically any PIC.

For both kits the bundled programming software is Windows-only, but the source code for the firmware of both programmers is available, so using either with non-Windows programming software is a possibility.

Both kits include introductory lessons in doing things the PIC way. These make the chips quite approachable for beginners.

Now I have to decide which parts I want to play with...

2006 December 13 23:37

I spent much of yesterday and today reading and thinking about microcontrollers. I’m going around and around and around about which families I want to invest time and money in. The money isn’t much – $50 per type, roughly – but the time can be enormous. They are all very different, appealing, and appalling, in idiosyncratic ways. I change my mind daily about which one seems like a good fit with my needs, interests, and aesthetics.

Right now the big three are

I’ve added my thoughts about these three families to microcontroller shootout.

I’d like to find one family that can do most of the things I’m currently thinking of, and perhaps re-doing some of what I’ve done with Trimpin:

Once I figure out a good way to wire and power both worn and bicycle-mounted lighting, I’m sure I’ll need some microcontrollers to control it all, and to deal with battery charging.

2006 November 15 14:36

Last night, thinking a bit more about Lua (and why I like it so much), I realized the answer: Lua is a convivial tool.

That term is probably unfamiliar to you. In his landmark 1973 book Tools for conviviality Ivan Illich mounted a compelling critique of industrial society. He claimed that we cannot have a society of authentic human relations unless the tools for production of the artifacts needed by that society are under the control of the people using them. Here is a quote to whet your appetite:

I choose the term “conviviality” to designate the opposite of industrial productivity. I intend it to mean autonomous and creative intercourse among persons, and the intercourse of persons with their environment; and this in contrast with the conditioned response of persons to the demands made upon them by others, and by a man-made environment. I consider conviviality to be individual freedom realized in personal interdependence and, as such, an intrinsic ethical value. I believe that, in any society, as conviviality is reduced below a certain level, no amount of industrial productivity can effectively satisfy the needs it creates among society’s members.

This fits nicely with what I (when I remember to!) consider part of the “mission” of Nimble Machines: liberation. Not necessarily, or simply, liberation from technology, but perhaps liberation through convivial technology. As much as I might like to be, I am not a Luddite; technology fascinates me. But I cannot stomach technologies whose production or consumption is inimical to personal freedom, expression, and relatedness.

He tells the story better than I ever could. Read the book.

Then you can read why I think Lua and Forth are convivial tools.

2006 November 15 01:30

I’ve made this page the “front page” of the site. It’s also no longer called Davids notes; it’s now called, simply, Nimble Machines. Why Nimble Machines still explains the site’s name, and recent changes logs recent activity, as ever.

Since this page is now all about you :-) and effectively your blog, I wonder whether putting my comments directly on the same page is (still) the right thing to do? --Michael Pruemm

It’s not so different than having comments enabled on a blog. I thought about this. I’m not so worried about it, esp when it’s clear which are my thoughts and which belong to others.

2006 November 14 14:24

I’ve spent the last few days recasting my rendering code into Lua, and trying to radically restructure it. It’s been an interesting challenge; it seems more subtle than it “should” be, though perhaps I am simply getting old and slow.

I’m also interested in having the generated XHTML conform to XHTML Basic rather than XHTML 1.0 Strict. W3C have modularized the XHTML specs, to create a family of specs; Basic is a strict subset (of XHTML 1.0) that is intended to render anywhere (ie, on mobile devices and handhelds as well as desktops). It excludes presentation markup but keeps all the semantic (text) markup. It leaves out frames (yay!), and implements slightly simplified models for forms and tables, but I think my generated code will fit the simpler models.

The only element that I generate that XHTML Basic leaves out is hr; it is considered presentation (like i, b, and tt) and is thereby anathema. However, I think I can generate an empty div and style it with one edge of its box solid. So, no worries there.

Actually, you don’t have to. If you choose XHTML Print instead of XHTML Basic, you get the Presentation module back. --Michael Pruemm

But I’m not sure I want it. I like the idea of using the most parsimonious markup. hr isn’t strictly necessary, esp if I can get it by styling, say, the toplevel headings. This would make "----" even easier to use, since you wouldn’t ever have to decide when to use it, or even to type it! (In other words, "----" goes away completely. ;-)

2006 November 05 17:11

I spent all day (16 hrs) on Friday and several hours yesterday and today converting the “wiki markup engine” from Perl to PHP. It works – the PHP code generates the same XHTML as the Perl code – but in the process I realized just how awful PHP is.

I wanted to like PHP. Leading up to actually doing this I had been reading the PHP documentation and finding irritating gotchas, idiosyncrasies, nonlinearities, and special cases. Every time I thought about starting on this project, I would feel a little bit nauseated. Finally, on Friday, I just jumped in. I enjoyed myself well enough, but discovered lots of language misfeatures, and found that I spent a lot of time struggling with the documentation. There is lots of it, but it’s hard to find anything. It describes things, but gives no sense of their underlying meaning or structure. Or subtle semantics. And it seems there is lots of subtle semantics in PHP. It is impossible to get a strong intuitive understanding of PHP from its documentation.

Having completed this task, I’m tempted to ignore PHP for as long as possible. Hopefully for ever.

Late last night, after my PHP struggles, I read a few pages of the new Lua book (the “blue PiL”) and remembered how simple, elegant, and beautiful Lua is. While I feel glum and oppressed reading the PHP documentation, I get excited reading about Lua. It seems to have no warts; every feature carries its weight, and there is nothing in the language that doesn’t belong; and the documentation (esp Programming in Lua, both 1ed and 2ed (PiL)) is clearly written and a delight to read.

I’d like to think that I can do everything in Lua. Let’s see: I’ll start by converting my pages into Lua tables, so I can use Lua as a data structure parser. Then rewrite the markup engine in Lua, using its simple pattern matcher, and maybe writing a little parser. Then write a web app to publish it. Perhaps Kepler can help.

I need a name. Hmm... Maybe “Orbit”?

2006 November 03 16:53

Thinking again, after 18 months or so, about restructuring and rewriting this web engine.

2006 November 03 00:02

Now all off-site links are constructed as calls to a tiny PHP script (out.php) that simply redirects to the target URI (in the query string). This way I can see how people are leaving the site. Not that anyone is actually reading it...

I still need to figure out a clean way to hide the ".php” in off-site URIs. This was a simple hack to get more interesting logs. Now to refine it.

(a bit later) Ok. Fixed. I added the following into the .htaccess file:

 # So we can access "out" (a php file) w/out its extension.
 <Files out>
   ForceType application/x-httpd-php

2006 October 01 17:16

Just now, while reading this online comic I was laughing so hard tears were streaming down my face. If you know about GNU and Linux, and know who Richard Stallman, Linus Torvalds, Eric Raymond, Bruce Perens, and Mark Shuttleworth are, you should enjoy it.

Be prepared for tears!

(BTW: if you look at the HTML for this page, you won’t see Eric R's name in it, so Google won’t index it. I added markup that inserts empty span elements, and used this to break his name into pieces. The more invisible we can make him, the better.)

2006 October 01 15:37

One thing leads to another!

Today while thinking more about free and open source software, I thought it would be interesting to read Richard Stallman's thoughts about the differences between “free” and “open source”. Ages ago (late ’80s?) I read with interest the GNU Manifesto, and agreed passionately with his philosophy. I’ve changed my mind somewhat since then, but I wanted to revisit his story, his motivations for starting the Free Software Foundation (FSF) and the GNU Project, and the differences among all the current “free” and “open source” software licenses.

It’s a complicated world!

So now I have to do the following:

Lots to do.

2006 September 30 16:15

I was reading (on this blog) about Erlang last night, and it struck me that O’Reilly books dont interest me. While supposedly about technologies for early adopters, their books are mostly about free and open source software that is a product of the church of ad hockery. And to make money, O’Reilly has to publish popular books – so they can hardly be on the leading-edge of adoption.

Should my O’Reilly rant instead be called O’Reilly is irrelevant?

2006 September 29 02:54

A new look for the site! Comments?

2006 September 26 03:52

Changed the wiki code to generate more “typeset” output for quotes and dashes. This means that pasting code from the web into an editor causes trouble, but it’s much nicer to read. (Sorry, Michael!)

I also added a “comment” link to the footer of every page that is viewed readonly. Right now it is a mailto: link; it could later be a simple web-form that sends email to the configured webmaster.

2006 September 14 08:31

Added Spoken Word – project page for my bicycle wheel text flasher/speller thingy.

2006 September 02 21:27

Change “voices” styles so that any voice other than the first (default) voice is shifted to the right (3pc left indent, -3pc right indent).

What do you think?

I think it looks a bit odd. Other voices are not quotations, but now somehow look like they are. I am also not sure (meaning I haven’t looked for pages with many voice changes) how a switch back to the first voice is handled. The different color makes the voices stand out enough, IMO.

(BTW, I think the right indent doesn’t work.)

Actually it does. I drew colored boxes around the div’s and you can see that it goes further to the right, but because the text is ragged right, it’s harder to see.

What I would like to see is a way of having a discussion with multiple voices, with a second “default” voice for the original author that is used to distinguish his replies to other voices from the original text of the page. How should that be displayed? --Michael Pruemm

Well, what’s wrong with what we’re doing now, using voices two and three? I think it looks fine, and it’s easy enough.

2006 September 02 20:37

Excited about the Lua programming language!

2006 June 17 15:40

So, I finally put together – but not with the “final” parts – my Motobecane fixie (fixed gear bicycle) project. Last night at 1:30am I rode it for the first time. It was weird. Starting and stopping is hard; balancing and riding slowly is easy.

Today I rode around in tight circles, clockwise and anticlockwise. I was also trying to do trackstands; I can do one for about five seconds. The record is held by an Italian track racer, who apparently did a trackstand for an hour and five minutes!

2006 May 09 13:19

My latest obsession (taking a break from microcontrollers): the fixed gear bicycle. Why would you want to ride a one-speed bicycle that won’t let you coast? Hmm...

2006 April 24 11:27

Since I’m thinking about using the Freescale 908QB8 in some projects, I thought I’d make a quick link here. (I’ve decided to use the 9S08QG8 instead – a newer variant.) There is more info in the microcontroller shootout.

2006 April 09 13:02

Reading about the MSP430 instruction set makes me want to write the real story of carry and borrow. Like the 6502 and the ARM, the MSP430 implements a “natural” borrow (logically “not carry”), rather than a synthesized borrow. I appreciate architectures that do this.

2006 April 08 12:01

Yesterday, after ordering an Olimex ARM development board, I spent some time figuring out RS-232 cabling, and wanted to document my findings.

2006 April 06 16:49

Ok, so that’s fixed. Phew. I captured the modtimes of the old pages files, applied them as properties to the new pages, checked them in, and modified the wiki script to use the “modtime” property from Subversion when it makes the “last edited” link. Everything works fine.

2006 April 06 15:54

Well, this sucks. Every time I ran svn update on the pages directory, it touched all the files, making them appear as if they had been recently edited. Now the “last edited” link at the bottom of every page is wrong.

I suppose, since I’m now using Subversion, that I could attach a property to the page with its last edited time. Seems redundant, but maybe that’s the best & most robust solution.

2006 April 06 01:47

Add ARM development boards, fig-FORTH, and demystifying create does.

2006 April 05 22:30

One more thing. Added code to the wiki so that newly-added pages get added to svn.

2006 April 05 17:16

Built a new repo and migrated the wiki pages. Let’s try this again...

That sort of worked. It checked into the repo, but the command returned some junk that confused the wiki script. Now we’re concatenating the command output to a log file...

Actually running svn --quiet seems to work. But now I can’t get decent info at the command line from svn log...

Never mind. It’s working fine. Just Subversion confusion: in order to see the latest log entries you have to svn update first.

2006 April 05 16:39

Ok. Testing the svn ci tweak. That didn’t work. I just realized that the www user does not have write permission to the Subversion repo, and that’s not something I want to change... So I’ll have to make a www-only repo with the pages in it.

2006 April 05 14:18

That worked beautifully! Now I can use

  svn st pages

to see what has changed (status), and

  svn di pages

to see (diff) the changes, and

  svn ci pages

to check them in! Maybe later today I can fix the wiki script to check-in automagically...

2006 April 05 14:14

This is a test.

I checked the wiki pages into Subversion as a separate “project” from the wiki code itself. This way two things are possible:

  svn ci -m "page edited"

to the wiki script! This makes the page archive directory obsolete.

As soon as I figure out how to do diffs nicely using Subversion I’ll deprecate (ie, delete) the archive entirely.

2006 March 29 18:09

Thinking again what would be a good first motorcycle. Mostly I found some nice pictures of the Kawasaki Ninja 500R (aka EX500R) and wanted a place to put them.

2006 March 29 14:56

Made a wikified copy of Neal Stephenson’s in the beginning was the command line. The original .zip file is available here.

2006 March 27 23:50

A (dumbish) idea: a latest pix page! There you can find a flickr badge with my latest pix, should I ever either:

  1. get in the habit of taking pictures and uploading them regularly; or
  2. get a camera phone, and take & upload pictures regularly.


2006 March 22 00:42

Looking at my weblogs. Wow! People are actually finding the site on Google! A few people searched for Rivendell Bicycle Works, for “klr motard”, for “dual-purpose motorcycle”, and for “muforth” and found me! Cool!

In particular I wanted to put up a muforth page so that I could mention the program there, and solicit comments.

2006 March 21 14:09

Adding markup for obfuscated mailto links. Like so:

  [[mailto:johndoe@example.com email me]]

renders as email me. The link text is necessary, and should be something other than your email address!

I added this as a way for people to contact me thru the wiki.

2006 March 21 12:25

After the relative pain of adding the flickr markup to the wiki codebase – Perl bites! – I’m thinking again, seriously, of rewriting this beast in a nicer language, and one that I would enjoy more. The main contenders, as usual, are:

It would be a good learning experience, the same way that writing this wiki helped me learn (and learn to hate) Perl.

2006 March 20 18:13

Trying out my flickr badge experiment:

I tried to put the images on a colored background, but I was unable to get it to style properly. Either the band of color was a little strip (the height, interestingly, of a line of text), and was the right width, or it was the right height (tall enough for the tallest image) but the width of the page.

It’s not important – I think it looks nice without a background – but does anyone know how to style this (I tried wrapping in another div, but to no avail) to make this work?

Amusing footnote. I changed the script to use public photos tagged with “nimble” and “machine”. Guess what? In flickr’s millions of photos, there isn’t a single one tagged that way.

2006 March 03 21:58

When good enough isnt good enough. ;-)

See earlier journal entries at