Forth is an imperative stack-based programming language, and a member of the class of extensible interactive languages. It was created by Charles Moore in 1970 to control telescopes in observatories using small computers. Because of its roots, Forth stresses efficiency, compactness, flexible and efficient hardware/software interaction.
Forth has a number of properties that contrast it from many other programming languages. In particular, Forth has no inherent keywords and is extensible. It is both a low level and high level language. It has the interesting property of being able to compile itself into a new compiler, debug itself and to experiment in real time as the system is built. Forth is an extremely flexible language, with high portability, compact source and object code, and a language that is easy to learn, program and debug. It has an incremental compiler, an interpreter and a very fast edit-compile-test cycle. Forth uses a stack to pass data between words, and it uses the raw memory for more permanent storage. It also lets coders write their own control structures.
Forth has often being deployed in embedded systems due to the compactness of object code. Forth is also used in boot loaders such as Open Firmware (developed by Sun Microsystems) as well as scientific fields such as astronomy, mathematics, oceanography and electrical engineering.
Here’s our recommended tutorials to learn Forth. If you’re looking for free Forth programming books, check here.
1. Forth Tutorials by Albert Nijhof
This set of tutorials cover control structures, and much more.
2. An Introduction to Forth using StackFlow by Gordon Charlton
This introduction uses a graphic metaphor called StackFlow to ease that confusion. It may also be of interest to more experienced Forth programmers.
3. Forth Tutorial by Phil Burk
The intent of this tutorial is to provide a series of experiments that will introduce you to the major concepts of Forth. It is only a starting point.
4. A Beginner’s Guide to Forth by J.V. Noble
Here’s a very good guide.
5. An Introduction to Forth
This introduction isn’t meant to be an all-inclusive tutorial about Forth, just a simple introduction for users of near-infrared camera software which uses Mitch Bradley’s CFORTH.
6. Thoughtful Programming and Forth by Jeff Fox
This document is actually not intended to be a programming tutorial. It is not going to present a step by step explanation of how one programs in the style that Chuck Moore is using but will present an overview of what he is doing and why.
All tutorials in this series:
|Free Programming Tutorials|
|Java||General-purpose, concurrent, class-based, object-oriented, high-level language|
|C||General-purpose, procedural, portable, high-level language|
|Python||General-purpose, structured, powerful language|
|C++||General-purpose, portable, free-form, multi-paradigm language|
|C#||Combines the power and flexibility of C++ with the simplicity of Visual Basic|
|PHP||PHP has been at the helm of the web for many years|
|Ruby||General purpose, scripting, structured, flexible, fully object-oriented language|
|Assembly||As close to writing machine code without writing in pure hexadecimal|
|Swift||Powerful and intuitive general-purpose programming language|
|Groovy||Powerful, optionally typed and dynamic language|
|Go||Compiled, statically typed programming language|
|Pascal||Imperative and procedural language designed in the late 1960s|
|Perl||High-level, general-purpose, interpreted, scripting, dynamic language|
|R||De facto standard among statisticians and data analysts|
|COBOL||Common Business-Oriented Language|
|Scala||Modern, object-functional, multi-paradigm, Java-based language|
|Fortran||The first high-level language, using the first compiler|
|Scratch||Visual programming language designed for 8-16 year-old children|
|Lua||Designed as an embeddable scripting language|
|Logo||Dialect of Lisp that features interactivity, modularity, extensibility|
|Rust||Ideal for systems, embedded, and other performance critical code|
|Lisp||Unique features - excellent to study programming constructs|
|Ada||ALGOL-like programming language, extended from Pascal and others|
|Haskell||Standardized, general-purpose, polymorphically, statically typed language|
|Scheme||General-purpose, functional, language descended from Lisp and Algol|
|Prolog||General purpose, declarative, logic programming language|
|Forth||Imperative stack-based programming language|
|Clojure||Dialect of the Lisp programming language|
|Julia||High-level, high-performance language for technical computing|
|SQL||Access and manipulate data held in a relational database management system|
|Erlang||General-purpose, concurrent, declarative, functional language|
|VimL||Powerful scripting language of the Vim editor|
|OCaml||General-purpose, powerful, high-level language|
|Awk||Versatile language designed for pattern scanning and processing|
|Racket||Platform for programming language design and implementation|
|BASIC||Family of general-purpose, high-level programming languages|
|LaTeX||Professional document preparation system and document markup language|
|Elixir||Relatively new functional language that runs on the Erlang virtual machine|
|Dart||Client-optimized programming language for fast apps|
|ABAP||Advanced Business Application Programming|
|F#||General purpose, strongly typed, multi-paradigm language. Part of ML|
|Chapel||Parallel-programming language in development at Cray Inc.|
|Dylan||Multi-paradigm language, supports functional & object-oriented programming|
|D||General-purpose systems programming language with a C-like syntax|
|Solidity||Object-oriented, high-level language for implementing smart contracts|
|XML||Set of rules for defining semantic tags that describe the structure and meaning|
|Vala||Object-oriented language with a self-hosting compiler that generates C code|
|ECMAScript||Best known as the language embedded in web browsers|
|Kotlin||Statically typed, general-purpose programming language with type inference|
|Markdown||Plain text formatting syntax designed to be easy-to-read and easy-to-write|
|Pike||Interpreted, general-purpose, high-level, cross-platform, dynamic language|
|HTML||HyperText Markup Language|
|Factor||Dynamic stack-based language|
|Objective-C||General purpose language which is a superset of C|
|Standard ML||One of the two main dialects of the ML language|
|Alice||Educational language with an integrated development environment|
|Agda||Dependently typed functional language based on intuitionistic type theory|
|Icon||High-level, general-purpose language|
|PureScript||Small strongly, statically typed language with expressive types|
|Tcl||Dynamic language based on concepts of Lisp, C, and Unix shells|