The ISlash Programming Language
ISlash is a dynamically typed, interpreted programming language with no real use that I created for fun, which runs on top of Golang. The language somewhat resembles Assembly but it is simpler to understand and more high-level.
My main goal when creating ISlash was learning Golang (Go), as I had never used that language before. The name ‘ISlash’ is a pun with my last name ‘Ibarra’, because ‘barra’ means ‘slash’ in portuguese, which is my native language.
|string||Strings are declared with double quotes. Ex: “Hello!”|
|number||Numbers may or may not have decimal places. Ex: 1, 2.3|
In ISlash, although there is not a boolean data type, numbers can be used to represent boolean values:
|Boolean Value||Numbers Range|
|true||numbers ≥ 1|
|false||numbers < 0|
Instructions are not case sensitive.
|INCREMENT||++ operator (Adds 1).|
|DECREMENT||— operator (Subtracts 1).|
|ENDIF||Closes if statements.|
|LENGTH||Gets the length of a string.|
|GETCHAR||Gets the nth char of a string|
|SAY||Prints to screen.|
|INPUT||Gets user input.|
|ENDWHILE||Closes while statements.|
Below, ISlash language features will be explained:
Comments can be made using the
# character at the beginning of lines:
# This is a comment! say "Cool!"
ISlash allows the interpolation of Strings using the
declare name "Arthur" declare age 20 say "My name is $(name) and I am $(age) years old."
New Lines in Strings
To represent new lines, use the
say "Hi!\nThis is in a new line!"
Example programs using the ISlash language can be found inside the programs folder.
In the example below, we are calculating the sum of the first 20 integer numbers.
To try the ISlash language, follow the steps being described below:
Clone this repository.
git clone https://github.com/ArthurSudbrackIbarra/ISlash-Programming-Language.git
- Go to the repository directory.
- Start the Docker container:
docker compose up -d
- Enter inside the Docker container that you started:
docker exec -it islash-container /bin/bash
- Run the ISlash programs you wish with:
islash <PATH_TO_MY_PROGRAM> # Example: islash myProgram.isl
NOTE: All files inside the ‘programs’ directory are shared between your host machine and the Docker ISlash container using a bind mount volume, so you can modify the .islash files or create new ones in your host machine and then run them from inside the container.
Language Support in VSCode
The ISlash language support Visual Studio Code extension will be released soon…
To completely delete all the resources that ISlash created in your machine, use the following commands:
- Stop the container.
docker compose down
- Delete the container.
docker rm islash-container
- Delete the container image.
docker rmi islash/islash-programming-language:v1