TRAC (for Text Reckoning And Compiling) Language is a
programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
developed between 1959–1964 by
Calvin Mooers and first implemented on the
PDP-1
The PDP-1 (Programmed Data Processor-1) is the first computer in Digital Equipment Corporation's PDP series and was first produced in 1959. It is known for being the most important computer in the creation of hacker culture at the Massachusetts ...
in 1964 by
L. Peter Deutsch
L Peter Deutsch (born Laurence Peter Deutsch on August 7, 1946, in Boston, Massachusetts) is an American computer scientist and composer. He is the founder of Aladdin Enterprises and creator of Ghostscript, a free software PostScript and PDF int ...
.
It was one of three "first languages" recommended by
Ted Nelson
Theodor Holm Nelson (born June 17, 1937) is an American pioneer of information technology, philosopher, and sociologist. He coined the terms ''hypertext'' and ''hypermedia'' in 1963 and published them in 1965. According to his 1997 ''Forbes'' p ...
in ''
Computer Lib''. TRAC T64 was used until at least 1984, when Mooers updated it to TRAC T84.
Language description
TRAC is a purely text-based language — a kind of
macro language. Unlike traditional ''ad hoc'' macro languages of the time, such as those found in assemblers, TRAC is well planned, consistent, and in many senses complete. It has explicit input and output operators, unlike the typical implicit I/O at the outermost macro level, which makes it simultaneously simpler and more versatile than older macro languages.
TRAC is a text-processing language,
also called a string processing language.
Because of this the only data type available is a string of characters. Numbers are strings of digits, with integer arithmetic (without specific limits on maximum values) being provided through built-in ("primitive") functions which operate on their string representation. Arguably, one aspect of its completeness is that the concept of an error is limited to events like lack of file space and requesting expansion of a string longer than the interpreter's working storage; what would in many languages be described as illegal operations are dealt with in TRAC by defining a result (often a null string) for every possible combination of a function's argument strings.
TRAC is, like
APL or
LISP
Lisp (historically LISP, an abbreviation of "list processing") is a family of programming languages with a long history and a distinctive, fully parenthesized Polish notation#Explanation, prefix notation.
Originally specified in the late 1950s, ...
, an
expression oriented language (in contrast to more typical
procedure-oriented languages) but, unlike APL, it completely lacks operators. In most respects, it is a case of pure
functional programming
In computer science, functional programming is a programming paradigm where programs are constructed by Function application, applying and Function composition (computer science), composing Function (computer science), functions. It is a declarat ...
. It has, in common with LISP, a syntax that generally involves the presence of many levels of nested parentheses.
TRAC is
homoiconic: that is, a TRAC program can be represented and manipulated within the TRAC language itself.
[
][
]
The emphasis on strings as the single data type is so strong that TRAC provides mechanisms for handling the language's own syntactic characters either in their syntactic roles or like any other character, and
self-modifying code
In computer science, self-modifying code (SMC or SMoC) is source code, code that alters its own instruction (computer science), instructions while it is execution (computing), executing – usually to reduce the instruction path length and imp ...
has more the feel of a natural consequence of typical TRAC programming techniques than of being a special feature.
The main inspiration for TRAC came from three papers by
Douglas McIlroy.
Intellectual property
Mooers trademarked the name TRAC in an effort to maintain his control over the definition of the language, an unusual and pioneering action at the time. At one point, he brought an intellectual property infringement suit against
DEC, alleging that a contract to deliver a mini-computer with a TRAC interpreter violated his rights. "The first issue of
Dr. Dobb's Journal, one of the early publications in the personal computer field, has a vitriolic editorial against Mooers and his rapacity in trying to charge people for his computing language."
The name has since been used several times for unrelated
information technology
Information technology (IT) is a set of related fields within information and communications technology (ICT), that encompass computer systems, software, programming languages, data processing, data and information processing, and storage. Inf ...
projects, including a current
open source
Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
project management system called
Trac
Trac is an open-source, web-based project management and bug tracking system. It has been adopted by a variety of organizations for use as a bug tracking system for both free and open-source software and proprietary projects and products. Tr ...
.
Influence and usage
TRAC was later implemented on the
PDP-8,
PDP-10
Digital Equipment Corporation (DEC)'s PDP-10, later marketed as the DECsystem-10, is a mainframe computer family manufactured beginning in 1966 and discontinued in 1983. 1970s models and beyond were marketed under the DECsystem-10 name, especi ...
, and
PDP-11.
There have been various languages inspired by TRAC. To avoid any trouble with Mooers, they renamed primitives and/or used different metacharacters. In SAM76's case, primitives were added, according to Claude Kagan, "because TRAC is baby talk". In MINT's case, primitives were added to give access to a sophisticated text editor machinery.
* one perceived shortcoming of TRAC was lack of full extensibility: some TRAC primitive functions are sensitive to the distinction between a null (zero-character) argument and a nonexistent (non-delimited) one, but beyond its last non-null argument, a user-defined function cannot make the distinction.
SAM76 was a TRAC-like language which eliminated that limitation.
*
Russ Nelson implemented an
emacs
Emacs (), originally named EMACS (an acronym for "Editor Macros"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, s ...
extension language named MINT (MINT Is Not TRAC). This language is used by the
FreeDOS editor
FreeMACS.
*
John Walker implemented an embeddable extension language library DIESEL (Dumb Interpretively Evaluated String Expression Language) originally for menu macro processing in
AutoCAD.
TRAC was used by
FTP Software
FTP Software, Inc., was an American software company incorporated in 1986 by James van Bokkelen, John Romkey (co-author of the MIT PC/IP package), Nancy Connor, Roxanne van Bokkelen (née Ritchie), Dave Bridgham, and several other founding shar ...
in its PC/TCP product as the modem dialer scripting language.
TRAC was also used as a front end on Digital Productions Cray renderer for films, including ''
The Last Starfighter''.
Example program
This is an example of a simple program that asks the user's name and exits, written in TRAC T64:
#(DS,PROG.A,(
#(PS,(WHAT IS YOUR NAME?
))
#(DS,NAME,##(RS))
#(PS,(
GOODBYE))
))'
TRAC T84 uses a slightly different syntax and different names for its primitives. The following is a script to compute Fibonacci numbers, written in TRAC T84:
TRAC information page (archived)
at The History of Computing Project, with small code sample and photo of C. M. Mooers.
:(s,fibo,(
:(ei,<1>, 1, 0,(
:(ei,<1>, 2, 1,(
:(aa, :(ri,fibo,:(as, <1>,1)),:(ri,fibo,:(as, <1>,2)))
))
))
))`
:(mw,fibo)'
See also
* TTM (programming language), a programming language inspired by TRAC
References
{{Reflist
External links
The TRAC Foundation
(Archived)
TRAC, a procedure-describing language for the reactive typewriter
in the Communications of the ACM, Volume 9 Issue 3, March 1966.
TRAC entry
in the HOPLbr>Encyclopedia of Computer Languages
A TRAC implementation project
on SourceForge
SourceForge is a web service founded by Geoffrey B. Jeffery, Tim Perdue, and Drew Streib in November 1999. SourceForge provides a centralized software discovery platform, including an online platform for managing and hosting open-source soft ...
.
Oral history interview with Calvin N. Mooers and Charlotte D. Mooers
at the Charles Babbage Institute
The IT History Society (ITHS) is an organization that supports the history and scholarship of information technology by encouraging, fostering, and facilitating archival and historical research. Formerly known as the Charles Babbage Foundation, ...
. Interview discusses information retrieval and programming language research from World War II through the early 1990s.
Macro programming languages
Text-oriented programming languages
Homoiconic programming languages