Jump to content

Forth: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Description==
'''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.
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.


==A list of OS/2 implementations of Forth==
==History==
* [[C-Forth]] - Open Source - Discontinued.
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.
* [[FIG Forth]] - Status unknown
* [[FORTH/2]] - Shareware - Discontinued
* [[LMI Forth-83]] - Commercial - Discontinued - Cross development tool that runs on top of UR/FORTH.
* [[Portable Forth Environment]] - Open Source - Current
* [[UR/Forth]] - Commercial - Discontinued.


====Libraries, extensions and bindings====
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.
*


====Editors with Forth support====
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.
*
 
==A list of DOS implementations of Forth==
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.
* [[Ale Forth]] - Freeware - Discontinued.
 
* [[BBL]] - Freeware - Discontinued.
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.
* [[bigForth]] - Commercial - Discontinued.
 
* [[C-Forth]] - Open Source - Discontinued.
==OS/2 implementations==
* [http://home.hccnet.nl/a.w.m.van.der.horst/forthimpl.html ciforth] - Open source - Current.
*[[C-Forth]] - Open Source
* [http://www.colorforth.com/cf.htm ColorForth] - Open source - Current.
*[[FIG Forth]] - Status unknown
* [[eForth]] - Open source - Sort of current .....
*[[FORTH/2]] - Shareware
* [[FIG Forth]] - Open Source - Discontinued.
*FORTH32 - Shareware
* [[F-PC]] - Open source - Discontinued.
*[[LMI Forth-83]] - Commercial - Cross development tool that runs on top of UR/FORTH
* [[Forth Express]] - Commercial - Discontinued.
*[[Portable Forth Environment]] - Open Source
* [[Forthmacs]] - Commercial - Discontinued.
*[[UR/Forth]] - Commercial
* [[f83]] - Open source - Discontinued.
 
* [[GForth]] - Open source - Discontinued.
==DOS implementations==
* [[Golden Porcupine Forth]] - Shareware - Discontinued.
<div style="column-count:2;-moz-column-count:2;-webkit-column-count:2">
* [[HENCE4TH]] - Open source - Discontinued.
''Open Source''
* [[hForth]] - Open source - Discontinued.
*[//home.hccnet.nl/a.w.m.van.der.horst/forthimpl.html ciforth]
* [[Hierarchical Music Specification Language]] - Commercial - Discontinued.
*[//www.colorforth.com/cf.htm ColorForth]
* [[HS/FORTH]] - Commercial - Discontinued.
*eForth
* [[LMI Forth-83]] - Commercial - Discontinued - Cross development tool that runs on top of UR/FORTH.
*[[FIG Forth]]
* [[MiniForth]] - Open source - Discontinued.
*F-PC
* [[MMS Forth]] - Commercial - Discontinued.
*f83
* [[Modular Forth]] - Commercial - Discontinued.
*Gforth
* [[OOF]] - Open source - Discontinued.
*HENCE4TH
* [[Portable Forth Environment]] - Open Source - Current
*hForth
* [[PowerForth]] - Commercial - Discontinued.
*MiniForth - Open source
* [[polyFORTH]] - Commercial - Discontinued.
*OOF
* [http://pygmy.utoh.org/pygmyforth.html Pigmy Forth] - Open source.
*Portable Forth Environment
* [[TCOM]] - Freeware - Discontinued.
*[http://pygmy.utoh.org/pygmyforth.html Pygmy Forth]
* [[ThisForth]] - Open source - Discontinued.
*ThisForth
* [[TIMBRE]] - Freeware - Discontinued.
*volksFORTH
* [[TURBO-Forth]] - Commercial - Discontinued.
*Zen
* [[UniForth]] - Commercial - Discontinued.
''Freeware''
* [[UR/Forth]] - Commercial - Discontinued.
*Ale Forth
* [[WPForth]] - Commercial - Discontinued.
*BBL
* [[Zen]] - Open source - Discontinued.
*TCOM
* [[4THCMP]] - Freeware - Discontinued.
*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
</div>
 
==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
* [https://github.com/eatonphil/jsforth jsForth] - Very minimalistic but works, intended for use in a browser rather than stand-alone - Open source


==A list of Forth implementations that run under WinOS/2==
* [[Forthmacs]] - Commercial - Discontinued.
* [[ProForth]] - Commercial - Discontinued.
* [[WinForth]] - Commercial - Discontinued.
==A list of Forth implementations that run under Java==
* [[Delta Forth]] - Open source - Discontinued.
* [[J2EE Forth]] - Open source - Discontinued.
==A list of Forth implementations in JavaScript==
* [[wForth]] - Open source - Discontinued.
==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.


====Local articles====
;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]]
=====Code snippets=====
*  


====Tutorials and other learning material====
* [http://www.wulfden.org/downloads/Forth_Resources/LB__StartingForth.pdf Starting Forth] - Free tutorial in PDF format.
==Links==
==Links==
* [http://www.forth.org FIG] - Forth Interest Group
* [http://www.forth.org FIG] - Forth Interest Group
* [https://www.taygeta.com/forth.html Forth resources on Taygeta.com] - Outdated but extensive.
* [https://www.taygeta.com/forth.html Forth resources on Taygeta.com] - Outdated but extensive.
====USENET====
* USENET [news:comp.lang.forth comp.lang.forth] - Surprisingly popular
* [news:comp.lang.forth comp.lang.forth] - Surprisingly popular - Go to the [https://groups.google.com/forum/#!forum/comp.lang.forth Google groups version] if your ISP does not offer USENET access or you are otherwise newsgroup challenged in any way.
====Built with Forth====
* [[Raidfile]] - A DOS in-memory database.


==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.
* 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 [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 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.
==Forth history==
* 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).
* Invented by Charles H. Moore in 1968.
 
[[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).