ApeScript
Encyclopedia
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;
ApeScript is defined in the Noble Ape Simulation manual.
Additional ApeScript tutorials are on the Noble Ape site.
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.
Interpreter (computing)
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language...
procedural
Procedural programming
Procedural programming can sometimes be used as a synonym for imperative programming , but can also refer to a programming paradigm, derived from structured programming, based upon the concept of the procedure call...
dynamic-typed language. It was developed for the Noble Ape
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.-The Simulation:...
Simulation through mid-2005 by Tom Barbalet
Tom Barbalet
Tom Barbalet is the creator of Noble Ape, editor of Biota.org and co-chair of the IGDA Intellectual Property Rights SIG.Born in 1976 in Adelaide, South Australia, Barbalet developed a series of interpreters, compilers, anti-viral programs and the Schmuck Quest series of graphics/text adventure...
. ApeScript was designed with the following specifications;
- simple language,
- stable memory footprint,
- minimal crashes, and,
- small code size.
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
Tom Barbalet
Tom Barbalet is the creator of Noble Ape, editor of Biota.org and co-chair of the IGDA Intellectual Property Rights SIG.Born in 1976 in Adelaide, South Australia, Barbalet developed a series of interpreters, compilers, anti-viral programs and the Schmuck Quest series of graphics/text adventure...
continued to develop ApeScript as modular code that could be removed and easily ported to other applications.