Edgy Script: a modern, slow, barely-documented programming language for no purpose.
This projects contains three modules:
- e80, the interpreter and native provider API
- esrun, the script that runs a given ES-Script
- esdk, which is a collection of java classes that provide a sdk for Edgy Scripts
- The classical Hello World:
use stdio;
print("Hello World!\n");
- A stupidly long version of the Hello World:
use stdio;
var hello = "Hello";
var world = "World";
print(hello + " " + world + "!\n");
# better: printf "%s %s!\n", hello, world
// should not make a real performance difference though
- An enhanced Hello World with more features:
use stdio;
print("What is your name? ");
var name = $string[input()];
print("Hello World, " + name + " here!\n");
- Enhanced Hello World with Easteregg
use stdio;
printf("What is your name? ");
var name = $[input()];
if name == "Stormtrooper":
print("These are not the droids you are looking for!");
else:
print("Hello World, " + name + " here!\n")
Code inside $TYPE[]
is evaluated at runtime as Edgy Script code, and optionally being cast to the non-bligtory TYPE, input
is a function of stdio
that returns user input upon pressing ENTER
.
Comments are either made by putting //
or #
in front of a line or /*
and */
at the beginning of lines to have everythign in between (inclusively) commented.
A ;
at the end of a line is allowed and considered good practice but not needed.
On Linux and MacOS, you can use one of the install scripts, on Windows (not supported yet), follow these steps:
- Make sure that git, maven and Java are installed properly on your system
- Clone the repo
- type
git clone https://www.github.com/edgelord314/edgy-script
into a CLI
- type
- Build e80 and the esdk using maven
- cd into the repo (
cd edgy-script
) - cd into the e80 project (
cd e80
) - build it using maven (
mvn clean install
) - cd into the sdk project (
cd ../esdk
) - build it using maven (still
mvn clean install
)
- cd into the repo (
- Run a script using esrun/esrun.sh
- cd into the esrun project (
cd ../esrun
) - run the script using the esrun script (
./esrun.sh path-to-file.et
)
- cd into the esrun project (