ApeScript
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;
- 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 continued to develop ApeScript as modular code that could be removed and easily ported to other applications.
External links
- ApeScript Definition
- ApeScript Tutorials
- Noble Ape Simulation Page
- Noble Ape Mailout July 2003, Original Discussion of Scripting
- Noble Ape Mailout March 2005, Discussion of Scripting
- Noble Ape Mailout September 2005, Debugging ApeScript
- Noble Ape Mailout December 2005, Modular Porting
This article is issued from Wikipedia - version of the 8/10/2010. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.