Pile is a scripting language composed of  more than 75 primitives including basic string manipulations tools, user interaction, math operations and stack management.


Beyond the basics, functions can be defined in scripts to group primitives and augment the language with your own tools.

Entire scripts can be imported in other scripts, as a means to share common functionality with other scripts. The imported code is also executed on the current stack so that variable and function initializations can occur.


Imports are done using <MyScript> syntax. But this importation can also be specialized to add template code to a different local group.

For example, <earth Planet> imports the Planet script and replaces any dot syntax within the imported code with 'earth'.

Thus, Planet.name becomes earth.name

You can use this syntax on multiple templates: <mercury venus earth RockyPlanet>


And you can keep adding specialization to your templates: <mercury venus earth Planet>. At which point, 'earth' contains template code for both Planet and RockyPlanet.


These templates can be accessed using (eg) 'earth.name ?' where 'name' could be a data member of Planet. Likewise for functions.


A Pile script can also be interpreted as a true class. Any data member set and any function defined in that script, is scoped and only exist within the confines of the script definition and it’s instances. An instantiated script class is placed on stack for immediate consumption, or placed into collection objects or set as a variable.


The 'Planet instantiate' syntax loads the Planet script as an instance. Any subsequent instantiation actually produces distinct objects with their own content, but all share the global scope stack. The '@' shorthand reduces this syntax to '@Planet'.


Templates can apply within a class Pile script and instances inherit from it all, making Pile a true object language as of v2.3.