Forth is amazing. There's hardly any compiler or runtime system and yet it has all the sophistication of Lisp. This feels like discovering Gödel, Escher, Bach faithfully expressed in a few dozen cave paintings.
The best part about embedded programming is starting from scratch without using a single line of code that we didn't write outselves. Right now we don't have memory protection, dynamic memory allocation, concurrency, garbage collection, etc. So we're going to rediscover first-hand at what point it's worth developing these fancy features. Truly we're retreading some giant steps :-)
Here's some Forth I wrote that may be clever or stupid, I'm not sure which yet:
\ Running time profiling: t( ... )t : t( r> tick ( r t1 ) >r >r ( r: t1 r ) ; : )t tick r> r> ( t2 r t1 ) swap >r ( t2 t1 ) - ( tdelta ) . ." ms" cr ;Ah the rapture of learning a new programming language :-)