How to learn Factor

An overview of how to get started from scratch with Factor


There are many great resources for learning Factor.

  • Andrea Ferretti's Factor tutorial is a thorough walk-through of the language, progressing from stack basics through metaprogramming, distributed computing, and web development with Furnace.

  • Factor in 2022 is a 2022 talk by John Benediktsson and Doug Coleman that gives a tour of the language and what it's like to use it today.

  • Thinking Forth by Leo Brodie is a classic on the design philosophy and habits of mind behind Forth. Factor is not Forth, but it inherits the concatenative, stack-oriented mindset, and Brodie's book is the best introduction to that way of thinking.

  • Factor's documentation is amazing and extensive. It is available offline, searchable right from the GUI Listener or on the command line, and the same searchable docs are available online.

  • Björn Lindqvist's playground-factor is a repo full of interesting tips and tricks. One of Factor's developers, Björn doesn't update it very often and it's a WIP (much of its content is being moved to the GitHub Wiki), but it's still very cool stuff.

  • Learn X in Y Minutes has a Factor tutorial. It is not extensive by any means, but it is a good reference and enough to get you started.

  • Rosetta Code: Factor is part of a programming chrestomathy site. Among hundreds of other languages, it has solutions to many problems in Factor, which you can compare with languages you already know — a good reference and starting point for solutions.

Lastly, and maybe leastly:

  • Stack Overflow. There's not a large community (okay, about three users including yours truly), but ask there if you're really, truly stuck and someone will surely help you out.

  • The mailing list. Here, you can ask about anything Factor-related and a collaborator will answer helpfully.

  • Factor is on IRC! Come join us; we're happy to help.

  • Learn and read about Joy, Forth, and concatenative / stack-based programming in general.

  • Learn and read about the Common Lisp Object System. The CLOS is widely regarded as the most advanced and innovative object model in the world, and Factor's object model is heavily based on and inspired by it.

  • In a lot of ways, Factor is a Lisp. It's a postfix, point-free, functional, inside-out-and-backwards funny-looking one, but many ideologies are the same. Because of this, it may be beneficial to learn a Lisp, preferably a Lisp-1 in which functions and variables share a namespace (because functions are values in functional programming). Yours truly humbly recommends Scheme, or, for something more modern and usable, Racket, a descendant of Scheme.

Finally, Factor is written almost entirely in Factor. So, read the source code, and search the docs for words you don't know.