Showing posts from August, 2008

A nice turtle reduction

I've been poking away at my Logo Interpreter for the past week. A whole bunch of changes went in - it now supports 64 built-in procedures (25 Turtle Graphics, 25 arithmetic/logical/comparisons, plus flow control, etc.), infix expressions (+-*/%^, etc.), and attempts to adhere to the UCBLogo and Apple II Logo "standards" where possible. (They are only "standards" as every Logo interpreter has its own quirks; it's a far less standardized language than BASIC.) To wrap up the tinkering today, I decided to tackle a "weird" bit of syntax - calling a procedure within parenthesis. In most programming languages, () are grouping characters around expressions. This is true in Logo as well so you can do FORWARD (1+2)*3 . But Logo also supports a convention for calling functions that may consume an unlimited number of arguments - e.g. (SUM 1 2 3 4) . This required adding two new bits of logic - the syntax handling, and the function handling. First, a spe

Logo Interpreter in Javascript

Others have done it better , but I thought I'd take a stab at a Logo interpreter in Javascript. So here it is - warning, doesn't work in Internet Explorer (yet). The TODO list is pretty large. Right now it uses the " canvas " element so it only works in Firefox, Safari and Opera (i.e. not I.E.). I plan to make it optionally use VML (in IE), SVG or canvas.

Product Idea

I want one of these: ... but made of carbon fiber so it weighs practically nothing. Surely there's a market for that? (And I'm not going to spend $2000 on one from a company called Halliburton .) Anyone?