Jump to content

Forth: Difference between revisions

From EDM2
Ak120 (talk | contribs)
mNo edit summary
Ak120 (talk | contribs)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
An imperative, hierarchical stack based language with an almost quasi-religious following. Like so 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 70's, unlike most contemporary languages.
'''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.


==History==
==History==
Line 13: Line 13:


==OS/2 implementations==
==OS/2 implementations==
*[[C-Forth]] - Open Source - Discontinued
*[[C-Forth]] - Open Source
*[[FIG Forth]] - Status unknown
*[[FIG Forth]] - Status unknown
*[[FORTH/2]] - Shareware - Discontinued
*[[FORTH/2]] - Shareware
*FORTH32 - Shareware - Discontinued
*FORTH32 - Shareware
*[[LMI Forth-83]] - Commercial - Discontinued - Cross development tool that runs on top of UR/FORTH.
*[[LMI Forth-83]] - Commercial - Cross development tool that runs on top of UR/FORTH
*Portable Forth Environment - Open Source - Current
*[[Portable Forth Environment]] - Open Source
*[[UR/Forth]] - Commercial - Discontinued
*[[UR/Forth]] - Commercial
 
===OS/2 editors with Forth support===
* [[jEdit]] - Java based - FORTH syntax highlighting built in


==DOS implementations==
==DOS implementations==
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2">
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2">
*Ale Forth - Freeware - Discontinued
''Open Source''
*BBL - Freeware - Discontinued
*[//home.hccnet.nl/a.w.m.van.der.horst/forthimpl.html ciforth]
*bigForth - Commercial - Discontinued
*[//www.colorforth.com/cf.htm ColorForth]
*[[C-Forth]] - Open Source - Discontinued
*eForth
*[http://home.hccnet.nl/a.w.m.van.der.horst/forthimpl.html ciforth] - Open source - Current
*[[FIG Forth]]
*[http://www.colorforth.com/cf.htm ColorForth] - Open source - Current
*F-PC
*eForth - Open source - Sort of current
*f83
*[[FIG Forth]] - Open Source - Discontinued
*Gforth
*F-PC - Open source - Discontinued
*HENCE4TH
*hForth
*MiniForth - Open source
*OOF
*Portable Forth Environment
*[http://pygmy.utoh.org/pygmyforth.html Pygmy Forth]
*ThisForth
*volksFORTH
*Zen
''Freeware''
*Ale Forth
*BBL
*TCOM
*TIMBRE
*4THCMP
''Commercial''
*bigForth
*[[C-Forth]]
*[[Fifth]] - Freeware/Commercial
*[[Fifth]] - Freeware/Commercial
*Forth Express - Commercial - Discontinued
*Forth Express
*Forthmacs - Commercial - Discontinued
*Forthmacs
*FORTH32 - Shareware - Discontinued
*FORTH32
*f83 - Open source - Discontinued
*Golden Porcupine Forth - Shareware
*Gforth - Open source - Discontinued
*Hierarchical Music Specification Language
*Golden Porcupine Forth - Shareware - Discontinued
*HS/FORTH
*HENCE4TH - Open source - Discontinued
*[[LMI Forth-83]] - Cross development tool that runs on top of UR/FORTH.
*hForth - Open source - Discontinued
*MicroMotion MasterFORTH
*Hierarchical Music Specification Language - Commercial - Discontinued
*MMS Forth
*HS/FORTH - Commercial - Discontinued
*Modular Forth
*[[LMI Forth-83]] - Commercial - Discontinued - Cross development tool that runs on top of UR/FORTH.
*PowerForth
*MiniForth - Open source - Discontinued
*polyFORTH
*MMS Forth - Commercial - Discontinued
*TURBO-Forth
*Modular Forth - Commercial - Discontinued
*UniForth
*OOF - Open source - Discontinued
*[[UR/Forth]]
*Portable Forth Environment - Open Source - Current
*WPForth
*PowerForth - Commercial - Discontinued
*polyFORTH - Commercial - Discontinued
*[http://pygmy.utoh.org/pygmyforth.html Pigmy Forth] - Open source
*TCOM - Freeware - Discontinued
*ThisForth - Open source - Discontinued
*TIMBRE - Freeware - Discontinued
*TURBO-Forth - Commercial - Discontinued
*UniForth - Commercial - Discontinued
*[[UR/Forth]] - Commercial - Discontinued
*WPForth - Commercial - Discontinued
*Zen - Open source - Discontinued
*4THCMP - Freeware - Discontinued
</div>
</div>


==Win-OS/2 implementations==
==Win-OS/2 implementations==
*Forthmacs - Commercial - Discontinued
*Forthmacs - Commercial
*ProForth - Commercial - Discontinued
*ProForth - Commercial
*WinForth - Commercial - Discontinued
*WinForth - Commercial


==Java implementations==
==Java implementations==
*Delta Forth - Open source - Discontinued
*Delta Forth - Open source
*J2EE Forth - Open source - Discontinued
*J2EE Forth - Open source
*Misty Beach Forth
 
;Editor support
* [[jEdit]] - Java based - FORTH syntax highlighting built in


==JavaScript implementations==
==JavaScript implementations==
* wForth - Open source - Discontinued
* wForth - Open source
* [https://github.com/eatonphil/jsforth jsForth] - Very minimalistic but works, intended for use in a browser rather than stanadalone - Open source - Discontinued
* [https://github.com/eatonphil/jsforth jsForth] - Very minimalistic but works, intended for use in a browser rather than stand-alone - Open source


==Publications==
==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
* [http://archive.org/details/byte-magazine-1980-08 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.
* [http://archive.org/details/byte-magazine-1980-08 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: [http://www.ultratechnology.com/4th_1970.html Forth - a Language for Interactive Computing] - The original paper from 1970.
* Charles H. Moore & Geoffrey C. Leach: [http://www.ultratechnology.com/4th_1970.html Forth - a Language for Interactive Computing] - The original paper from 1970.


;Interviews
;Interviews
* [http://www.computerworld.com.au/article/250530/a-z_programming_languages_forth/ The A-Z of Programming Languages: Forth] - An interview with Charles H. Moore - From [[Computerworld]].
* [http://www.computerworld.com.au/article/250530/a-z_programming_languages_forth/ The A-Z of Programming Languages: Forth] - An interview with Charles H. Moore - From [[Computerworld]]
 
====Tutorials and other learning material====
* [http://www.wulfden.org/downloads/Forth_Resources/LB__StartingForth.pdf Starting Forth] - Free tutorial in PDF format.


==Links==
==Links==
Line 96: Line 104:
==Standards==
==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.
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 1970's and 80's derive from this standard.
* 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 latter half of the 70's 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. You can read the [http://www.forth-ev.de/wiki/doku.php/projects:fig-forth_installation_manual text here].
* [[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 the derived from the F77 standard, you can download the standard [https://www.complang.tuwien.ac.at/forth/standards/Forth-79.pdf text here]. It never became as popular as fig-FORTH and most IBM PC systems skipped this standard and went from fig to F84.
* 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 [https://www.complang.tuwien.ac.at/forth/standards/Forth-79.pdf 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 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]] were it became popular simply due to the existence of a [[public domain]] implementation from FIG. You can read [http://forth.sourceforge.net/standard/fst83/ the F83 standard here]
* 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 [http://forth.sourceforge.net/standard/fst83/ the F83 standard here]
* [https://www.taygeta.com/forth/dpans.html ANS Forth] - 1994 draft - Aka ANSI Forth.
* [https://www.taygeta.com/forth/dpans.html ANS Forth] - 1994 draft - Aka ANSI Forth.
* Peter Knaggs: [http://www.rigwit.co.uk/papers/national.pdf A truly International Standard] - Fixes to the absolute lack of international support in ANS Forth. (1998).
* Peter Knaggs: [http://www.rigwit.co.uk/papers/national.pdf A truly International Standard] - Fixes to the absolute lack of international support in ANS Forth. (1998).


[[Category:Programming Languages]] [[Category:Forth]]
[[Category:Programming Languages]][[Category:Forth]]

Latest revision as of 13:37, 5 September 2022

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.

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

DOS implementations

Open Source

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
Interviews

Links

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).