An esoteric programming language
- Zig 100%
| examples | ||
| src | ||
| tests | ||
| .gitignore | ||
| build.zig | ||
| build.zig.zon | ||
| LICENSE | ||
| README.md | ||
Tip
Hosted on Forgejo and mirrored on GitLab for people without local accounts. Issues and MRs are welcome everywhere. Visit https://lovie.dev/code for more info.
Yap
An esoteric event driven programming language.
Running
Compile:
$ zig build --release=fast
Run:
$ ./zig-out/bin/yap examples/00-hello-world.yap
Hello, world!
Compile and run:
$ ./zig-out/bin/yap build examples/00-hello-world.yap
$ ./zig-out/bin/yap examples/00-hello-world.yapc
Hello, world!
Check out examples.
Have fun!
Backstory
I wanted to make a gimmicky language but was too lazy to implement loops. So I made an event queue and throw pushes event to the queue and terminates current event. When the runtime reaches the end of the file, it runs the next thing off of the queue.
Syntax
Expressions
VAR be VALUE- Assignyap VALUE|VAR- PrintVALUE|VAR reckons VALUE|VAR- Comparepeek VALUE|VAR pls CODE thx- If statementpeek VALUE|VAR pls CODE nah CODE thx- If statement with an else branch.throw VALUE- Push an event to the event queue.
Values
Yeah- TrueNope- False or None
Logic
flip VALUE|VAR- Noty VALUE|VAR- Andeither VALUE|VAR- Orneither VALUE|VAR- XorVALUE|VAR add VALUE|VAR- AdditionVALUE|VAR sub VALUE|VAR- SubtractionVALUE|VAR mul VALUE|VAR- MultiplicationVALUE|VAR dib VALUE|VAR- DivisionVALUE|VAR pow VALUE|VAR- PowerVALUE|VAR smaller VALUE|VAR- Less thanVALUE|VAR bigger VALUE|VAR- More than
Magic Vars
e|event- Current event