Disk Clock weathered the introduction of Google Chrome fairly well, although the outer rings were not getting drawn. I’ve issued a patch release 1.0.3 for use on the web site and sites using the widget in a web page. Further development on the latest branch got caught in a semi-major project.
No updates the week before: I’ve been working a game design domain specific language embedded in ruby, and it will be a while until I get something presentable.
1 % 1 = 0
A Plan For Modularization
I made a few small changes to the latest branch, and then set out to to solve one of my modularization problems – the TIME.UNIT collection. This is where I ran into trouble with the new version of WebKit; withing the TIME.UNIT object as a namespace didn’t work for function statements. I now know that function expressions would have worked, but this experience combined with the the standard cry against the with statement has turned me off a bit. I’m not complete at ease with the namespace-explosion operation.
The Time Unit DSL
I had the idea to solve the time unit problem with time unit Domain Specific Language. It lets you write things like “5 seconds/day”. I’ll have more to say about it when the code is posted. I got a working implementation, at least for every case used in in DC, by regex-hacking through it.
A Code Too Far
This is probably all DC needs, but as the weekend was only half over, I’m currently reading Compilers (aka the dragon book) and I’ve got some other language projects brewing, I figured I’d see about re-implementing it with some more maintainable methods. Unfortunately, they are also very complicated methods. The lexer went fairly quick, as I cheated and used Javscripts regular expressions rather than building an automaton. The parser is quite an unwieldy beast, and I’ll need at least another day to get something running.