ApeScript

Last updated

ApeScript is an interpreted procedural dynamic-typed language. It was developed for the Noble Ape Simulation through mid-2005 by Tom Barbalet. ApeScript was designed with the following specifications;

In computer science, an interpreter is a computer program that directly executes, i.e. performs 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 and immediately execute this;
  3. explicitly execute stored precompiled code made by a compiler which is part of the interpreter system.

Procedural programming is a programming paradigm, derived from structured programming, based upon the concept of the procedure call. Procedures, also known as routines, subroutines, or functions, simply contain a series of computational steps to be carried out. Any given procedure might be called at any point during a program's execution, including by other procedures or itself. The first major procedural programming languages first appeared circa 1960, including Fortran, ALGOL, COBOL and BASIC. Pascal and C were published closer to the 1970s.

Noble Ape

Noble Ape is an artificial life development project launched in June, 1996 by Tom Barbalet. It was designed to be a forum for a diversity of contributors to work towards a coherent cognitive simulation development environment.

Contents

ApeScript is defined in the Noble Ape Simulation manual.

Additional ApeScript tutorials are on the Noble Ape site.

Example

Some example ApeScript from the tutorials includes;

function ( actual_one ){    run ( actual_two );    number_a = number_a + 26; }  function ( actual_two ){    number_a = number_b * 234; }  function ( actual_three ){    number_a = number_b - 10;    number_a = number_a * 21;    number_a = number_a + 127; }  function ( actual_four ){    run ( actual_one);    number_a = number_a * 20; }  function ( direct_one ){ run ( actual_one ); } function ( direct_two ){ run ( actual_two ); } function ( direct_three ){ run ( actual_three ); } function ( direct_four ){ run ( actual_four ); }  function ( being ){     number_b = time;     which_function = time & 3;    offset_function = direct_two - direct_one;    which_function = which_function * offset_function;    which_function = which_function + direct_one;     run( which_function );    number_result = number_a; }

Debug

ApeScript also has the option of debug output. This shows the values and the variables in a single cycle run of ApeScript. The above example produced the following debug output;

function( being ){    number_b = 942 ;    which_function = 2 ;    offset_function = 15 ;    which_function = 30 ;    which_function = 151 ;    run( which_function ){       run( actual_three ){          number_a = 932 ;          number_a = 19572 ;          number_a = 19699 ;          }       }       number_result = 19699 ;    }

Through the latter part of 2005, Tom Barbalet continued to develop ApeScript as modular code that could be removed and easily ported to other applications.

Tom Barbalet is the creator of Noble Ape, editor of Biota.org and chair of the IGDA Intellectual Property Rights SIG.

Related Research Articles

JavaScript programming language

JavaScript, often abbreviated as JS, is a high-level, interpreted programming language that conforms to the ECMAScript specification. JavaScript has curly-bracket syntax, dynamic typing, prototype-based object-orientation, and first-class functions.

VBScript is an Active Scripting language developed by Microsoft that is modeled on Visual Basic. It allows Microsoft Windows system administrators to generate powerful tools for managing computers with error handling, subroutines, and other advanced programming constructs. It can give the user complete control over many aspects of their computing environment.

Verilog, standardized as IEEE 1364, is a hardware description language (HDL) used to model electronic systems. It is most commonly used in the design and verification of digital circuits at the register-transfer level of abstraction. It is also used in the verification of analog circuits and mixed-signal circuits, as well as in the design of genetic circuits. In 2009, the Verilog standard was merged into the SystemVerilog standard, creating IEEE Standard 1800-2009. Since then, Verilog is officially part of the SystemVerilog language. The current version is IEEE standard 1800-2017.

AppleScript scripting language created by Apple Inc

AppleScript is a scripting language created by Apple Inc. that facilitates automated control over scriptable Mac applications. First introduced in System 7, it is currently included in all versions of macOS as part of a package of system automation tools. The term "AppleScript" may refer to the language itself, to an individual script written in the language, or, informally, to the macOS Open Scripting Architecture that underlies the language.

Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the software is improved to pass the new tests, only. This is opposed to software development that allows software to be added that is not proven to meet requirements.

JTAG is an industry standard for verifying designs and testing printed circuit boards after manufacture.

NWScript is the scripting language developed by BioWare for the role-playing video game Neverwinter Nights. It is based on the C programming language and is implemented in the Aurora toolset. Neverscript, an open source 3rd party editor, has been created for the Mac OS X and Linux versions of NWN because the Aurora toolset has not been ported to those platforms.

MBASIC is the Microsoft BASIC implementation of BASIC for the CP/M operating system. MBASIC is a descendant of the original Altair BASIC interpreters that were among Microsoft's first products. MBASIC was one of the two versions of BASIC bundled with the Osborne 1 computer. The name "MBASIC" is derived from the disk file name MBASIC.COM of the BASIC interpreter.

Claytronics is an abstract future concept that combines nanoscale robotics and computer science to create individual nanometer-scale computers called claytronic atoms, or catoms, which can interact with each other to form tangible 3D objects that a user can interact with. This idea is more broadly referred to as programmable matter. Claytronics has the potential to greatly affect many areas of daily life, such as telecommunication, human-computer interfaces, and entertainment.

thinBasic is a BASIC-like computer programming language interpreter with a central core engine architecture surrounded by many specialized modules. Although originally designed mainly for computer automation, thanks to its modular structure it can be used for wide range of tasks.

A read–eval–print loop (REPL), also termed an interactive toplevel or language shell, is a simple, interactive computer programming environment that takes single user inputs, evaluates them, and returns the result to the user; a program written in a REPL environment is executed piecewise. The term is usually used to refer to programming interfaces similar to the classic Lisp machine interactive environment. Common examples include command line shells and similar environments for programming languages, and is very characteristic of scripting languages.

IP Pascal is an implementation of the Pascal programming language using the IP portability platform, a multiple machine, operating system and language implementation system.

An instruction set simulator (ISS) is a simulation model, usually coded in a high-level programming language, which mimics the behavior of a mainframe or microprocessor by "reading" instructions and maintaining internal variables which represent the processor's registers.

Libcwd is a C++ library, written by Carlo Wood, to add run-time debugging support for C++ applications, particularly for code developed with the GNU Compiler Collection. The functionality that the library adds to an application can be divided into three categories:

  1. Ostream-based debug output.
  2. Run-time access to debug information.
  3. Run-time access to memory allocation administration.
Mathomatic

Mathomatic is a free, portable, general-purpose computer algebra system (CAS) that can symbolically solve, simplify, combine, and compare algebraic equations, and can perform complex number, modular, and polynomial arithmetic, along with standard arithmetic. It does some symbolic calculus, numerical integration, and handles all elementary algebra except logarithms. Trigonometric functions can be entered and manipulated using complex exponentials, with the GNU m4 preprocessor. Not currently implemented are general functions like f(x), arbitrary-precision and interval arithmetic, and matrices.

Morfik Technology Pty Ltd. is an Australian software company that was acquired by Altium in 2010.

EICASLAB is a software suite providing a laboratory for automatic control design and time-series forecasting developed as final output of the European ACODUASIS Project IPS-2001-42068 funded by the European Community within the Innovation Programme. The Project - during its lifetime - aimed at delivering in the robotic field the scientific breakthrough of a new methodology for the automatic control design.

Cosmos (operating system) open source operating system building kit

C# Open Source Managed Operating System (Cosmos) is a toolkit for building 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.

Field of Chaos is a compilation of two novella works written by Tom Barbalet in 1993. The first novella deals with a fictionalized account of Barbalet's experiences writing anti computer virus software for the Australian government. This anti-viral software was the basis of Barbalet's Noble Ape cognitive simulation. The second novella is a non-fiction account of Barbalet's experiences in a revolutionary commune in Elands in northern New South Wales.