Forth
Forth is an imperative, hierarchical stack based language. Like many languages at the time FORTH was initially spelled all caps, but it had become the custom to spell it as a noun as early as the mid 70s, unlike most contemporary languages.
Contents
History
Invented by Charles H. Moore in 1966/7 and released in 1968 for the IBM 1130, it became an almost instant hit as it suited the limited hardware and processing power of the 1130 much better than some of the traditional toolkits that IBM offered for the system.
The language was originally developed in FORTRAN on an IBM 1130 computer by Charles H. Moore and then known as Fourth to reflect that it was a 4th-generation computer language (actually it isn't), but as the IBM 1130 filesystem only allowed five character upper case names the name was shortened to FORTH.
Forth's strongest points and its weakest point are basically the same feature, it is extensible to a fault and it also does not integrate well with modern operating systems as many of its features were originally concepts that in a modern setting are replaced by OS functions and the behaviour of the Forth system often totally alien to the host.
The language allows you to build keywords that encapsulate functions or code, this is similar to how a library works in other languages except that the new keywords are not auto-documenting like libraries usually are. This means that you do not only need to learn the language and all the new keywords each implementation brings, but if you are using or updating code from someone else you are required to learn all their frequently undocumented extensions to the language which with larger programs can become a seriously daunting task.
Forth has however found a strong niche in embedded systems where it can take over the tasks we would normally associate with an operating system, interpreter, compiler, editor and assembler into one coherent whole that can be a joy to work with compared to the often cumbersome IDE based modern embedded development systems.
OS/2 implementations
- C-Forth - Open Source
- FIG Forth - Status unknown
- FORTH/2 - Shareware
- FORTH32 - Shareware
- LMI Forth-83 - Commercial - Cross development tool that runs on top of UR/FORTH
- Portable Forth Environment - Open Source
- UR/Forth - Commercial
DOS implementations
Open Source
- ciforth
- ColorForth
- eForth
- FIG Forth
- F-PC
- f83
- Gforth
- HENCE4TH
- hForth
- MiniForth - Open source
- OOF
- Portable Forth Environment
- Pygmy Forth
- ThisForth
- volksFORTH
- Zen
Freeware
- Ale Forth
- BBL
- TCOM
- TIMBRE
- 4THCMP
Commercial
- bigForth
- C-Forth
- Fifth - Freeware/Commercial
- Forth Express
- Forthmacs
- FORTH32
- Golden Porcupine Forth - Shareware
- Hierarchical Music Specification Language
- HS/FORTH
- LMI Forth-83 - Cross development tool that runs on top of UR/FORTH.
- MicroMotion MasterFORTH
- MMS Forth
- Modular Forth
- PowerForth
- polyFORTH
- TURBO-Forth
- UniForth
- UR/Forth
- WPForth
Win-OS/2 implementations
- Forthmacs - Commercial
- ProForth - Commercial
- WinForth - Commercial
Java implementations
- Delta Forth - Open source
- J2EE Forth - Open source
- Misty Beach Forth
- Editor support
- jEdit - Java based - FORTH syntax highlighting built in
JavaScript implementations
- wForth - Open source
- jsForth - Very minimalistic but works, intended for use in a browser rather than stand-alone - Open source
Publications
- Leo Brodie: Starting Forth - Prentice-Hall 1981, ISBN 0-13-842930-8
- Leo Brodie: Starting Forth 2nd Edition - Prentice-Hall 1987, ISBN 0-13-843087-X
- Leo Brodie: Thinking Forth - Prentice-Hall 1984, ISBN 0-13-917568-7
- Articles
- Byte Magazine August 1980 - Harks from a time when Byte used to have language specific issues, this one is the Forth issue and has a couple of now classic articles.
- Charles H. Moore & Geoffrey C. Leach: Forth - a Language for Interactive Computing - The original paper from 1970.
- Interviews
- The A-Z of Programming Languages: Forth - An interview with Charles H. Moore - From Computerworld
Links
- FIG - Forth Interest Group
- Forth resources on Taygeta.com - Outdated but extensive.
- USENET comp.lang.forth - Surprisingly popular
Standards
Most early FORTH standards were informal and based on books and articles by the original language author or on work by sundry Forth Interest Groups.
- FORTH-77 more commonly known as just F77 was developed by the European Forth User Group and most European implementations of FORTH in the 1970s and 80s derive from this standard.
- fig-FORTH was defined by the "fig-Forth Installation Manual" for the fig-FORTH 6502 version released by FIG in the latter half of the 70s, with an update in 1980. Most if not all fig-FORTH compatible releases reference this document rather than the F77 standard, although a few reference a later fig-FORTH for the IBM PC document.
- FORTH-79 more commonly known as just F79 is an extension to fig-FORTH and adds about 40 new functions most of them derived from the F77 standard, you can download the standard text here. It never became as popular as fig-FORTH and most IBM PC systems skipped this standard and went from fig to F84.
- The F83 standard was done by Henry Laxon and Mike Perry at the USA Forth Interest Group, this massively extends the Forth base, the language now had over 1000 functions in addition to an extensive standard library. The size however meant that the 8 bit implementations never bothered to follow the F83 standard and it was only on DOS where it became popular simply due to the existence of a public domain implementation from FIG. You can read the F83 standard here
- ANS Forth - 1994 draft - Aka ANSI Forth.
- Peter Knaggs: A truly International Standard - Fixes to the absolute lack of international support in ANS Forth. (1998).