SAM76

Last updated

SAM76 is a macro programming language used from the late 1970s to the present 2007 initially ran on CP/M.

Contents

The SAM76 language is a list and string processor designed for interactive and user-directed applications, including artificial intelligence programming, and permits high portability from machine to machine. The language shares certain features in common with LISP, Forth, and shell programming languages of the UNIX operating system. Claude A. R. Kagan, the language's developer, sought to combine within a single interpretive processor, the characteristics of two different string and general-purpose macro generators and the provisions to embed multiple infix operator mathematical systems.

SAM76 was designed to:

The language was based around the idea of programming with macros. A user will define a macro (a code word that can be defined by the user to invoke a specific set of instructions to perform a routine within the program) to execute a set of instructions, usually in either machine or assembly language, and use the macro in the program. In this way, a user need only define a routine once and then when that particular operation, or string is required, the user can substitute is with the macro name.

Since then the language has been rewritten in C and compiles on Windows, Unix, Linux, and similar operating systems. The source code is available online and still compiles and runs as of 2006.

Characteristics of the SAM76 language

The SAM76 language follows a well defined syntax which is easy to learn and to read. It relies heavily, however, on a system of symbols to replace the pseudo English words of BASIC and Pascal.

The SAM76 interpreter also provides for a highly reactive and interactive language that can almost converse with the user from task to task. Consequently, the language has the capability of performing complex operations in program control, text editing and manipulation, gaming, simulation, and mathematics.

Because it has features similar to LISP, Forth and other list processors, SAM76 also has the capability of functioning as a query language, providing powerful human machine interaction that uses keyboard data from an interaction to modify and shape future responses. The language is also capable of growing by extension. Because, like LISP and Logo, there is almost no difference between procedures and data structures, procedures can be treated as data and be acted upon by other procedures, even procedures defined by different users. The new procedures that are mapped or created behave as if they were language primitives or inherent functions of the language. Like Logo, this means that new users can create their own separate vocabularies which can be saved and executed, adding to the language vocabulary and providing for individual customization.

See also

Related Research Articles

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 lower level language to create an executable program.

Common Lisp (CL) is a dialect of the Lisp programming language, published in ANSI standard document ANSI INCITS 226-1994 (R2004). The Common Lisp HyperSpec, a hyperlinked HTML version, has been derived from the ANSI Common Lisp standard.

An interpreted language is a type of programming language for which most of its implementations execute instructions directly and freely, without previously compiling a program into machine-language instructions. The interpreter executes the program directly, translating each statement into a sequence of one or more subroutines, and then into another language.

Lisp (programming language) Programming language

Lisp is a family of computer programming languages with a long history and a distinctive, fully parenthesized prefix notation. Originally specified in 1958, Lisp is the second-oldest high-level programming language in widespread use today. Only Fortran is older, by one year. Lisp has changed since its early days, and many dialects have existed over its history. Today, the best-known general-purpose Lisp dialects are Clojure, Common Lisp, and Scheme.

Macro (computer science) rule or pattern that specifies how a certain input sequence should be mapped to a replacement output sequence according to a defined procedure

A macro in computer science is a rule or pattern that specifies how a certain input sequence should be mapped to a replacement output sequence according to a defined procedure. The mapping process that instantiates (transforms) a macro use into a specific sequence is known as macro expansion. A facility for writing macros may be provided as part of a software application or as a part of a programming language. In the former case, macros are used to make tasks using the application less repetitive. In the latter case, they are a tool that allows a programmer to enable code reuse or even to design domain-specific languages.

Programming language Language designed to communicate instructions to a machine

A programming language is a formal language, which comprises a set of instructions that produce various kinds of output. Programming languages are used in computer programming to implement algorithms.

Scheme is a programming language that supports multiple paradigms, including functional and imperative programming. It is one of the three main dialects of Lisp, alongside Common Lisp and Clojure. Unlike Common Lisp, Scheme follows a minimalist design philosophy, specifying a small standard core with powerful tools for language extension.

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 science, a preprocessor is a program that processes its input data to produce output that is used as input to another program. The output is said to be a preprocessed form of the input data, which is often used by some subsequent programs like compilers. The amount and kind of processing done depends on the nature of the preprocessor; some preprocessors are only capable of performing relatively simple textual substitutions and macro expansions, while others have the power of full-fledged programming languages.

Hygienic macros are macros whose expansion is guaranteed not to cause the accidental capture of identifiers. They are a feature of programming languages such as Scheme, Dylan and Rust. The general problem of accidental capture was well known within the Lisp community prior to the introduction of hygienic macros. Macro writers would use language features that would generate unique identifiers or use obfuscated identifiers in order to avoid the problem. Hygienic macros are a programmatic solution to the capture problem that is integrated into the macro expander itself. The term "hygiene" was coined in Kohlbecker et al.'s 1986 paper that introduced hygienic macro expansion, inspired by the terminology used in mathematics.

In some programming languages, eval is a function which evaluates a string as though it were an expression and returns a result; in others, it executes multiple lines of code as though they had been included instead of the line including the eval. The input to eval is not necessarily a string; it may be structured representation of code, such as an abstract syntax tree, or of special type such as code. The analog for a statement is exec, which executes a string as if it were a statement; in some languages, such as Python, both are present, while in other languages only one of either eval or exec is.

Factor (programming language) programming language

Factor is a stack-oriented programming language created by Slava Pestov. Factor is dynamically typed and has automatic memory management, as well as powerful metaprogramming features. The language has a single implementation featuring a self-hosted optimizing compiler and an interactive development environment. The Factor distribution includes a large standard library.

CMUCL is a free Common Lisp implementation, originally developed at Carnegie Mellon University.

Extensible programming is a term used in computer science to describe a style of computer programming that focuses on mechanisms to extend the programming language, compiler and runtime environment. Extensible programming languages, supporting this style of programming, were an active area of work in the 1960s, but the movement was marginalized in the 1970s. Extensible programming has become a topic of renewed interest in the 21st century.

In computer programming, homoiconicity is a property of some programming languages. A language is homoiconic if a program written in it can be manipulated as data using the language, and thus the program's internal representation can be inferred just by reading the program itself. For example, a Lisp program is written as a regular Lisp list, and can be manipulated by other Lisp code. In homoiconic languages, all code can be accessed and transformed as data, using the same representation. This property is often summarized by saying that the language treats "code as data".

Emacs Family of text editors

Emacsor EMACS 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, self-documenting, real-time display editor". Development of the first Emacs began in the mid-1970s, and work on its direct descendant, GNU Emacs, continues actively as of 2019.

A scripting or script language is a programming language for a special run-time environment that automates the execution of tasks; the tasks could alternatively be executed one-by-one by a human operator. Scripting languages are often interpreted.

Speakeasy (computational environment) numerical computing interactive environment also featuring an interpreted programming language

Speakeasy is a numerical computing interactive environment also featuring an interpreted programming language. It was initially developed for internal use at the Physics Division of Argonne National Laboratory by the theoretical physicist Stanley Cohen. He eventually founded Speakeasy Computing Corporation to make the program available commercially.

Command-line interface Type of computer interface based on entering text commands and viewing text output

A command-line interface (CLI) processes commands to a computer program in the form of lines of text. The program which handles the interface is called a command-line interpreter or command-line processor. Operating systems implement a command-line interface in a shell for interactive access to operating system functions or services. Such access was primarily provided to users by computer terminals starting in the mid-1960s, and continued to be used throughout the 1970s and 1980s on VAX/VMS, Unix systems and personal computer systems including MS-DOS, CP/M and Apple DOS.