ColorForth

Last updated
colorForth
Paradigm Procedural, stack-oriented
Designed by Charles H. Moore
Developer Charles H. Moore
First appeared1990s
Stable release
July 31, 2001;22 years ago (2001-07-31) [1]
Typing discipline Typeless
License Public domain [1]
WebsiteArchived at
colorforth.github.io
Influenced by
Forth

colorForth is a programming language from the Forth language's creator, Charles H. Moore, developed in the 1990s. The language combines elements of Moore's earlier Forth systems and adds color as a way of indicating how words should be interpreted. Program text is tokenized as it is edited; the compiler operates on the tokenized form, so there is less work at compile-time.

An idiosyncratic programming environment, the colors simplify Forth's semantics, speed compiling, and are said to aid Moore's own poor eyesight: colorForth uses different colors in its source code (replacing some of the punctuation in standard Forth) to determine how different words are treated.

colorForth was originally developed as the scripting language for Moore's own VLSI CAD program OKAD, [2] with which he develops custom Forth processors. As the language gained utility, he rewrote his CAD program in it, spruced up the environment, and released it to the public. It has since gained a small following, spurred much debate in the Forth community, and sprung offshoots for other processors and operating environments. The language's roots are closer to the Forth machine languages Moore develops for his processors than to the mainstream standardized Forths in more widespread use.

The language comes with its own tiny (63K) operating system. Practically everything is stored as source code and compiled when needed. The current colorForth environment is limited to running on Pentium grade PCs with limited support for lowest-common-denominator motherboards, AGP video, disk, and network hardware.

Coloring in colorForth has semantic meaning. Red words start a definition and green words are compiled into the current definition. Thus, colorForth would be rendered in standard Forth as:

 : color forth ;

Yellow words are executed. The transition from green, to yellow, and back again can be used while defining words, to transition between compiling words into the current definition, executing words immediately (manipulating the data stack during compilation), and back again (adding the top of the data stack to the current definition) -- in other words, precomputing a value during compilation (a functionality that other languages use macros or optimizing compilers for). [3]

Moore developed Forth in the early 1970s and created a series of implementations of the language. In the 1980s he diverged from the standardization of the language, instead continuing to evolve it. He developed a series of Forth-like languages, each extreme in its simplicity: Machine Forth, OKAD, colorForth.

Moore has stated that color is only one option for displaying the language.[ citation needed ] One of Moore's papers on colorForth was printed in black and white, but used italics and other typographical conventions to present source code.

Related Research Articles

In computing, a compiler is a computer program that translates computer code written in one programming language into another language. The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a low-level programming language to create an executable program.

Forth is a procedural, stack-oriented programming language and interactive environment designed by Charles H. "Chuck" Moore and first used by other programmers in 1970. Although not an acronym, the language's name in its early years was often spelled in all capital letters as FORTH. The FORTH-79 and FORTH-83 implementations, which were not written by Moore, became de facto standards, and an official standardization of the language was published in 1994 as ANS Forth. A wide range of Forth derivatives existed before and after ANS Forth. The free software Gforth implementation is actively maintained, as are several commercially supported systems.

<span class="mw-page-title-main">Jupiter Ace</span> British home computer of the early 1980s

The Jupiter Ace by Jupiter Cantab was a British home computer released in 1982. The Ace differed from other microcomputers of the time in that its programming environment used Forth instead of the more popular BASIC. This difference, along with limited available software and poor character based graphic display, limited sales and the machine was not a success.

<span class="mw-page-title-main">Macro (computer science)</span> Rule for substituting a set input with a set output

In computer programming, a macro is a rule or pattern that specifies how a certain input should be mapped to a replacement output. Applying a macro to an input is known as macro expansion. The input and output may be a sequence of lexical tokens or characters, or a syntax tree. Character macros are supported in software applications to make it easy to invoke common command sequences. Token and tree macros are supported in some programming languages to enable code reuse or to extend the language, sometimes for domain-specific languages.

PL/I is a procedural, imperative computer programming language initially developed by IBM. The PL/1 ANSI standard, X3.53-1976, was published in 1976. It is designed for scientific, engineering, business and system programming. It has been in continuous use by academic, commercial and industrial organizations since it was introduced in the 1960s.

<span class="mw-page-title-main">UCSD Pascal</span> Programming language released in 1977

UCSD Pascal is a Pascal programming language system that runs on the UCSD p-System, a portable, highly machine-independent operating system. UCSD Pascal was first released in 1977. It was developed at the University of California, San Diego (UCSD).

In computer science, threaded code is a programming technique where the code has a form that essentially consists entirely of calls to subroutines. It is often used in compilers, which may generate code in that form or be implemented in that form themselves. The code may be processed by an interpreter or it may simply be a sequence of machine code call instructions.

<span class="mw-page-title-main">Interpreter (computing)</span> Program that executes source code without a separate compilation step

In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program. An interpreter generally uses one of the following strategies for program execution:

  1. Parse the source code and perform its behavior directly;
  2. Translate source code into some efficient intermediate representation or object code and immediately execute that;
  3. Explicitly execute stored precompiled bytecode made by a compiler and matched with the interpreter Virtual Machine.
<span class="mw-page-title-main">Application binary interface</span> Binary interface between two program units

In computer software, an application binary interface (ABI) is an interface between two binary program modules. Often, one of these modules is a library or operating system facility, and the other is a program that is being run by a user.

In computer science, a compiler-compiler or compiler generator is a programming tool that creates a parser, interpreter, or compiler from some form of formal description of a programming language and machine.

In computer engineering, a hardware description language (HDL) is a specialized computer language used to describe the structure and behavior of electronic circuits, and most commonly, digital logic circuits.

VME is a mainframe operating system developed by the UK company International Computers Limited. Originally developed in the 1970s to drive ICL's then new 2900 Series mainframes, the operating system is now known as OpenVME incorporating a Unix subsystem, and runs on ICL Series 39 and Trimetra mainframe computers, as well as industry-standard x64 servers.

In software engineering, porting is the process of adapting software for the purpose of achieving some form of execution in a computing environment that is different from the one that a given program was originally designed for. The term is also used when software/hardware is changed to make them usable in different environments.

<span class="mw-page-title-main">Charles H. Moore</span> American computer engineer (born 1938)

Charles Havice Moore II, better known as Chuck Moore, is an American computer engineer and programmer, best known for inventing the Forth programming language in 1968. He cofounded FORTH, Inc., with Elizabeth Rather in 1971 and continued to evolve the language with an emphasis on simplicity. Beginning in the early 1980s, he shifted focus to designing stack machines in hardware conjoined with Forth-like languages to run on them. He developed the Novix NC4000 and Sh-Boom, then the minimal instruction set MuP21, and i21. In the 2000s he created a series of low-power chips containing up to 144 individual stack processors. He has implemented his own tools for processor design.

The Burroughs Large Systems Group produced a family of large 48-bit mainframes using stack machine instruction sets with dense syllables. The first machine in the family was the B5000 in 1961, which was optimized for compiling ALGOL 60 programs extremely well, using single-pass compilers. The B5000 evolved into the B5500 and the B5700. Subsequent major redesigns include the B6500/B6700 line and its successors, as well as the separate B8500 line.

<span class="mw-page-title-main">CMS-2</span>

CMS-2 is an embedded systems programming language used by the United States Navy. It was an early attempt to develop a standardized high-level computer programming language intended to improve code portability and reusability. CMS-2 was developed primarily for the US Navy’s tactical data systems (NTDS).

Write once, compile anywhere (WOCA) is a philosophy taken by a compiler and its associated software libraries or by a software library/software framework which refers to a capability of writing a computer program that can be compiled on all platforms without the need to modify its source code. As opposed to Sun's write once, run anywhere slogan, cross-platform compatibility is implemented only at the source code level, rather than also at the compiled binary code level.

<span class="mw-page-title-main">Parallax Propeller</span> Multi-core microcontroller

The Parallax P8X32A Propeller is a multi-core processor parallel computer architecture microcontroller chip with eight 32-bit reduced instruction set computer (RISC) central processing unit (CPU) cores. Introduced in 2006, it is designed and sold by Parallax, Inc.

<span class="mw-page-title-main">Cosmos (operating system)</span> Toolkit for building GUI and command-line based operating systems

C# Open Source Managed Operating System (Cosmos) is a toolkit for building GUI and command-line based operating systems, written mostly in the programming language C# and small amounts of a high level assembly language named X#. Cosmos is a backronym, in that the acronym was chosen before the meaning. It is open-source software released under a BSD license.

<span class="mw-page-title-main">History of compiler construction</span>

In computing, a compiler is a computer program that transforms source code written in a programming language or computer language, into another computer language. The most common reason for transforming source code is to create an executable program.

References

  1. 1 2 "colorForth Status". September 2002. Archived from the original on 2016-03-10.
  2. "OKAD II (Oh CAD Two)". 2001-07-01. Retrieved 2017-06-08.
  3. "PreParsed Word Format (colorforth.com)". December 2001. Archived from the original on 2011-09-06.