dorkbotpdx 0x01/talks/muforth

By: tlockney

2008-03-31 13:48:51

Bootstrap yourself into conviviality by writing your own Forth

David Frech 2008 March 30 DorkbotPDX 0x01


This talk is dedicated to all Makers.

"We make in order to know."

Making creates knowledge in our bodies. We are wired to do it. It is a key part of being human.

The world of made objects is an inexhaustible source of inspiring & intoxicating beauty.


What do these terms mean? What do we mean by


What is Forth?


Concretely, what is Forth?

variable numbers of arguments

   * tokens are simply executed left-to-right

* Dictionary - two senses: * the "heap" - all the words and their data * the association of tokens with their code


What is bootstrapping?

* Originally, idea of pulling yourself up, off the ground, by pulling on your bootstraps.

* Needs an "external input of energy"

* Examples: * booting Linux * creating a new Forth by meta-compiling * creating an "application" by extending Forth (incremental bootstrap)

* Meta-circular * Self-referential * Recursive


What is conviviality? What are convivial tools?

* Ivan Illich, _Tools for conviviality_ a critique/postscript for the industrial age

* E F Schumacher's _Small is beautiful_ is similar

* Convivial != easy to learn or use well

* Alan Kay: pencil as mundane computing device

* Industry can stifle conviviality while creating convivial tools (MCUs are a good example here)

* Human languages are convivial. Why aren't most computer languages?

* Conviviality as a measure (index of liberation)


Forth is simple but powerful. Why is this?

* Code being read in can affect the parser & compiler

* Trivial parser and compiler are easy to modify & "misuse"

* "Writing the reader" - a trait shared with Lisp & Smalltalk

* Live system - all of Forth available, all the time

* Extensible via colon words, code words, and new data types


A brief history of Forth

* Chuck Moore invents (some say "discovers") Forth * polyFORTH * fig-FORTH * ANS * colorForh


Where is the Forth community?

* A dead language? * No good books available * SVFIG a disappointment * Implementors have moved on

* gforth is a good implementation, but big and unapproachable - and ANS.

* Chuck continues to innovate, but his work is inaccessible, literally and figuratively


Why muFORTH?

* It all started with fig-FORTH (ca 1980)

* dforth (ca 1997) * assembler, tied to Linux, hard to modify, hard to understand

* Once again, we make in order to know. I wanted a platform for experiments, a substrate for building target compilers for MCUs

* muFORTH, native-coded (ca 2002) * trivial compiler * tail-recursive * even a trivial compiler can be hard to port

* muFORTH, indirect-threaded (ca 2005) * slower but portable * a simpler model of Forth


muFORTH's innovations

* hybrid of C & Forth * self-bootstrap * no numbers * no control structures * no data types

* token consumers * simplicity of creating new interpreter "modes"


Sources & resources

muFORTH git clone git://github.com/nimblemachines/muforth.git browse http://github.com/nimblemachines/muforth/tree/master

Tools for conviviality http://clevercycles.com/tools_for_conviviality/ (hard to read; style to be narrower)

colorForth http://www.colorforth.com/

HOPL Forth history paper http://www.colorforth.com/HOPL.html

Brad Rodriguez's (good) Forth implementation articles http://www.zetetics.com/bj/papers/index.html

Brad's CamelForth http://camelforth.com/news.php



Back to archive index