diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..f158952 --- /dev/null +++ b/readme.md @@ -0,0 +1,14 @@ +# Strath - The String Math Language +## What is it? +Strath is an esolang that has a cryptic syntax and allows you to do math with strings, add them, multiply them, and even multiply with floats! + +Rust developers hate it, Python devdelopers fear it, and C devselopers make it blink. + +## How to Strath +### Comments + +### If, else if/elif, else + +### Variable Types + +### Working With Variables diff --git a/sm-test-files/animals-example/cat.sm b/sm-test-files/animals-example/cat.sm index 8127c44..a993167 100644 --- a/sm-test-files/animals-example/cat.sm +++ b/sm-test-files/animals-example/cat.sm @@ -30,7 +30,7 @@ ?>$/+meowingVolume >> 20\? | ( ¡<=/"MEOW!!!"\!; ) - >?/ \? | ( + >?/\? | ( !<=/"Error: weird as fuck meowing volume."\!; ) ) diff --git a/sm-test-files/animals-example/dog.sm b/sm-test-files/animals-example/dog.sm index e69de29..f8740ed 100644 --- a/sm-test-files/animals-example/dog.sm +++ b/sm-test-files/animals-example/dog.sm @@ -0,0 +1,45 @@ +&& import via &=> +¡&=> "animal.sm"! + +&& inherit via ::: +++dog:::animal ( + ¡+}}float{{ barkVolume!; + + ### /}}string{{ name\ /}}float{{ speed\ /}}float{{ barkVolume\ | ( + && ## calls the super + ¡##/name, speed\!; + ¡+barkVolume < barkVolume!; + ) + + +#meow /\ | ( + ¿??€/+barkVolume >> 0\? | ( + ¡<=/"*silence*"!; + ) + ?>$/+barkVolume >> 0\? | ( + ¡<=/"bak"\!; + ) + ?>$/+barkVolume >> 2\? | ( + ¡<=/"bark"\!; + ) + ?>$/+barkVolume >> 5\? | ( + ¡<=/"Bark."\!; + ) + ?>$/+barkVolume >> 10\? | ( + ¡<=/"Bark!!"\!; + ) + ?>$/+barkVolume >> 20\? | ( + ¡<=/"BARK!!!"\!; + ) + >?/\? | ( + !<=/"Error: weird as fuck bark volume."\!; + ) + ) + +#pissOnFloor /}}bool{{ needsToGo\ | ( + ¿??€/needsToGo true\ | ( + ¡<= "The dog pissed on the floor!"!; + ) + >?/\? | ( + ¡<= "The dog didn't piss on the floor!"!; + ) + ) +)