LOLGraphics
- This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
Paradigm(s) | procedural, imperative |
---|---|
Designed by | Bloody Wall Software |
Appeared in | 2020, 2021 |
Type system | static, strong |
Memory system | segment-based |
Dimensions | one-dimensional |
Computational class | Unknown |
Major implementations | download from itch.io |
Dialects | None |
Influenced by | LOLCODE, Assembly |
File extension(s) | .lulz |
LOLGraphics is an esoteric programming language loosely based on lolcode only with graphics. Version 0.1 with only 4 commands was released in itch.io in December 9th, 2020, and the final version 3.4 was released in June 1st 2021. According to a commenter in the itch page, the language is taught as part of the school curriculum in Eritrea, however the reliability of the source is under debate.
The interpreter and the editor were both implemented in java. All codes are saved with a .lulz extension. If you run the code you will be greeted by a screen with three main components: an area for graphics (takes up most of the window), a console for outputting text, and an area for input.
One notable feature is that if you download LOLGraphics version x.y, you are really downloading all versions until x.y including. Every code starts with the line HAI x.y, and this is the first line that the code checks, then it opens this version of the interpreter. That way, updates to the language that changed the way things work didn’t break codes written in old versions.
Multiple example programs exist in the editor. One example code available is the “8462 demo”, in which you control a cheeseburger on the graphics panel that can be moved up, down, left, right, and in diagonals by pressing keys on the numpad. The input must be typed in the input field and will be read using the command PLZ READ ONE BYTE
which takes whatever is in the input field at the moment the command is run. This is in contrast to PLZ ASK TEH USR 2 GIMME A ONE BYTE
which activates the input button, then pauses the code and waits for the user to type his input and press it.
Code structure
The language is not case sensitive, before the code is moved to the interpreter all the letters are converted to capital ones. To make a one line comment you need to start it with BTW, and a multiple lines comment begins with OBTW and ends with TLDR.
HAI 3.4 0 1
BTW the line above specifies the version of LOLGraphics running, and the delay in between commands. 0 milliseconds before the first one and 100 milliseconds (0.1 sec) in between 2 commands. This feature was only added in version 2.3. In 2.2, you have those values by default and can’t change them, and before that there was no delay and the commands just ran one after the other.
IM IN UR CODE EXECUTIN UR KOMANDZ
BTW the line above is necessary.
OBTW
your code goes here
TLDR
IM OUTTA UR CODE
BTW ends the program
IM IN UR SUBPROGRAM DAT IZ NAME
BTW creates a subprogram called name
BTW subprograms were only added in version 2.0
OBTW
The code for your subprogram
You can use variables defined in the main program and variables defined in the main program can be used here.
TLDR
IM OUTTA UR SUBPROGRAM
BTW exits from the subprogram and goes to the line next to the line the subprogram was called in
Hello World
The following code uses version 0.1 since the command existed even back then. If you open it using a later version of the editor, it will run using LOLGraphics Interpreter 0.1.
HAI 0.1 IM IN UR CODE EXECUTIN UR KOMANDZ PLZ PRINT TEXT HAI WORLD! IM OUTTA UR CODE
Truth-Machine
HAI 3.4 0 10
IM IN UR CODE EXECUTIN UR KOMANDZ
I HAS A ONE BYTE DAT IZ CALLED X
PLZ PRINT ONE BYTE X
PLZ ASK TEH USR 2 GIMME A ONE BYTE X
PLZ ASK CEILIN CAT 2 NOD
WHILE CEILIN CAT IZ NODDIN PLZ RUN PRINT
IM OUTTA UR CODE
IM IN UR SUBPROGRAM DAT IZ KALLED PRINT
PLZ PRINT ONE BYTE X
PLZ ASK CEILIN KAT 2 CHEK IZ [X]==1
IM OUTTA UR SUBPROGRAM