Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
TRAC (programming language)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Programming language (1964)}} {{Infobox programming language | name = TRAC | logo = | paradigm = [[general-purpose macro processor]] | year = 1964 | designer = [[Calvin Mooers]] | developer = | latest_release_version = T2001<ref>{{Cite web|url=http://tracfoundation.org/spec/index.htm|title=TRAC T2001 Specification|date=February 5, 2005|archive-url=https://web.archive.org/web/20050205151038/http://tracfoundation.org/spec/index.htm |archive-date=2005-02-05 }}</ref> | latest_release_date = {{start date and age|2001|11|17}} <ref>{{Cite web|url=https://sourceforge.net/projects/trac2001/|title=Trac 2001 programming language|date=March 8, 2013|website=SourceForge}}</ref> | implementations = | typing = | influenced_by = Macro SAP<ref name="hopl">{{cite encyclopedia |title=TRAC β A man-machine string manipulating language |encyclopedia=HOPL: Online Historical Encyclopaedia of Programming Languages |url=http://hopl.murdoch.edu.au/showlanguage.prx?exp=276|archive-url=https://web.archive.org/web/20090813125040/http://hopl.murdoch.edu.au/showlanguage.prx?exp=276 |archive-date=August 13, 2009}}</ref> | influenced = [[SAM76]], [[ML/I]]<ref name="hopl"/> | operating_system = | license = | website = }} '''TRAC''' (for '''T'''ext '''R'''eckoning '''A'''nd '''C'''ompiling) '''Language''' is a [[programming language]] developed between 1959β1964 by [[Calvin Mooers]] and first implemented on the [[PDP-1]] in 1964 by [[L. Peter Deutsch]].<ref name="T64">{{Cite web|url=http://tracfoundation.org/t64tech.htm|archive-url = https://web.archive.org/web/20010408052535/http://tracfoundation.org/t64tech.htm|archive-date = 2001-04-08|title = Coding Supply β Everything a Programmer Needs}}</ref> It was one of three "first languages" recommended by [[Ted Nelson]] in ''[[Computer Lib]]''. TRAC T64 was used until at least 1984, when Mooers updated it to TRAC T84.<ref name="T64"/> == Language description == TRAC is a purely text-based language β a kind of [[General-purpose macro processor|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{{fact or opinion|date=October 2024}}. 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{{vague|date=October 2024}} than older macro languages. TRAC is a text-processing language,<ref> David Walden. [http://walden-family.com/texland/macro-memories-v07.pdf "Macro Memories, 1964β2013"]. 2014. </ref> also called a string processing language.<ref> Carol Loeb Mir. [https://files.eric.ed.gov/fulltext/ED082489.pdf "A Comparison of String Handling in Four Programming Languages"]. 1972. </ref> 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 programming language|APL]] or [[LISP]], an [[expression orientation|expression oriented]] language (in contrast to more typical [[procedure orientation|procedure-oriented]] languages) but, unlike APL, it completely lacks operators. In most respects, it is a case of pure [[functional programming]]. 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.<ref name="trac_paper"> {{cite book |first1=C.N. |last1=Mooers |author-link=Calvin Mooers |first2=L.P. |last2=Deutsch |author-link2=L. Peter Deutsch |chapter=TRAC, A Text-Handling Language |title=Proceeding ACM '65 Proceedings of the 1965 20th national conference |pages=229β246 |year=1965 |doi=10.1145/800197.806048 |s2cid=40013081 }} </ref><ref name="kay_thesis"> {{cite thesis |author-link=Alan Kay |first=Alan |last=Kay |url=http://www.mprove.de/diplom/gui/kay69.html |title=The Reactive Engine |type=PhD |year=1969 |publisher=University of Utah }} </ref><ref> Klaas van Schelven. [http://www.expressionsofchange.org/dont-say-homoiconic/ "Don't say 'Homoiconic'"]. </ref> 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]] 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]].<ref name="trac_paper"/><ref>[[Douglas McIlroy|McIlroy, M.D.]], Macro Instruction Extensions of Compiler Languages. CACM 3, No. 4 (1960), 214β220.</ref><ref>Eastwood, D.E. and McIlroy, M.D., Macro Compiler Modification of SAP. Bell Telephone Laboratories Computation Center, 1959.</ref><ref>McIlroy, M.D., Using SAP Macro Instructions to Manipulate Symbolic Expressions. Bell Telephone Laboratories Computation Center (1960)</ref> == 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 [[Digital Equipment Corporation|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."<ref>{{cite journal|last1=Mooers|first1=Calvin|title=Oral history interview with Calvin N. Mooers and Charlotte D. Mooers|url=http://conservancy.umn.edu/handle/11299/107510|website=Charles Babbage Institute|date=22 June 1993|hdl=11299/107510 }}</ref><ref>{{cite web | url=https://archive.org/stream/dr_dobbs_journal_vol_01#page/n121/mode/2up/ | title=Dr. Dobb's Journal - Vol 1 | year=1976 }}</ref> The name has since been used several times for unrelated [[information technology]] projects, including a current [[Open-source software|open source]] project management system called [[Trac]]. == Influence and usage == TRAC was later implemented on the [[PDP-8]], [[PDP-10]], 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]] extension language named MINT ('''M'''INT '''I'''s '''N'''ot '''T'''RAC). This language is used by the [[FreeDOS]] editor [[FreeMACS]]. * [[John Walker (programmer)|John Walker]] implemented an embeddable extension language library DIESEL <ref>{{Cite web|url=https://www.fourmilab.ch/diesel/|title=DIESEL - Dumb Interpretively Evaluated String Expression Language|website=www.fourmilab.ch}}</ref> ('''D'''umb '''I'''nterpretively '''E'''valuated '''S'''tring '''E'''xpression '''L'''anguage) originally for menu macro processing in [[AutoCAD]].<ref>{{Cite web|url=https://www.fourmilab.ch/nav/topics/components.html#diesel|title=Software Components / Embedded Systems|website=www.fourmilab.ch}}</ref> TRAC was used by [[FTP Software]] 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:<ref>[https://web.archive.org/web/20050214150205/http://tracfoundation.org/trac64/T64manual.htm The Beginner's Manual for TRAC Language (1972) (archived)] by Calvin N. Mooers.</ref> <pre> #(DS,PROG.A,( #(PS,(WHAT IS YOUR NAME? )) #(DS,NAME,##(RS)) #(PS,( GOODBYE)) ))' </pre> 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:<ref>[https://web.archive.org/web/20200102193613/http://www.thocp.net/software/languages/trac.html TRAC information page (archived)], at [[The History of Computing Project]], with small code sample and photo of C. M. Mooers.</ref> <pre>:(s,fibo,( :(ei,<1>, 1, 0,( :(ei,<1>, 2, 1,( :(aa, :(ri,fibo,:(as, <1>,1)),:(ri,fibo,:(as, <1>,2))) )) )) ))` :(mw,fibo)'</pre> ==See also== * [[TTM (programming language)]], a programming language inspired by TRAC ==References== {{Reflist}} ==External links== *[https://web.archive.org/web/20050324000031/http://tracfoundation.org/ The TRAC Foundation] (Archived) *[http://dl.acm.org/citation.cfm?id=365230.365270 TRAC, a procedure-describing language for the reactive typewriter] in the Communications of the ACM, Volume 9 Issue 3, March 1966. *[http://world.std.com/~awalker/cnmlist.html Andrew Walker's TRAC Information page] *[http://hopl.info/showlanguage2.prx?exp=276 TRAC entry] in the [[HOPL]] [https://web.archive.org/web/20110220044217/http://hopl.murdoch.edu.au/ Encyclopedia of Computer Languages] *[http://sourceforge.net/projects/trac2001 A TRAC implementation project] on [[SourceForge]]. *[http://purl.umn.edu/107510 Oral history interview with Calvin N. Mooers and Charlotte D. Mooers] at the [[Charles Babbage Institute]]. Interview discusses information retrieval and programming language research from World War II through the early 1990s. [[Category:Macro programming languages]] [[Category:Text-oriented programming languages]] [[Category:Homoiconic programming languages]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite thesis
(
edit
)
Template:Cite web
(
edit
)
Template:Fact or opinion
(
edit
)
Template:Infobox programming language
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Template:Vague
(
edit
)