#interpreter #yourself #kill #language #github #f-cking #fkys

app fkys-rs

F*cking Kill Yourself lang interpreter written in Rust

9 releases

0.2.5 Oct 26, 2023
0.2.4 Oct 26, 2023
0.1.1 Oct 14, 2023
0.0.0 Oct 13, 2023

#93 in Programming languages

Download history 4/week @ 2024-02-20 12/week @ 2024-02-27 17/week @ 2024-03-12 10/week @ 2024-03-26 40/week @ 2024-04-02 1/week @ 2024-04-23 73/week @ 2024-04-30

53 downloads per month

WTFPL license

8KB
96 lines

workflow Status

FKYSoxide

this is a F*cking Kill Yourself lang interpretter, independently rewritten in Rust.

Syntax

e - exit programm
> - moves pointer right
< - moves pointer left
+ - increments cell
- - decrements cell
i - integer output mode (enabled by default)
c - character output mode
n - inserts newline
s - inserts space
o - prints the contents of the cell to the console
p - accepts input from the user into the cell
l - sets cell value to 125
[] - loop (runs while the cell != 0)
# - comments the rest of line

tabs, spaces and other symbols are just ignored

Installing

Simply run cargo install --locked fkys-rs in your terminal.

Usage

To run script, just pass fkysoxide <path-to-script>.

Code examples

Use + and - to increment or decrement the value in the current cell respectively.

This example makes the value of the cell equal to 3.

++++-

Use l to set the cell's value to 125

l---

Now the value of the cell at 0 is equal to 122.

Use o to output the current cell's value, use p to put the number from the stdin.

p---o

If we put 20, the code will output 17. Also use s to output space, and use n to go to the next line.

What if you want to output a text? You can do that. Use c to go into the text output mode, and use i to go back to the number output mode. When you are in the text output mode, numbers are converted to characters using the ASCII table. For example, the following code outputs Hello, world!

cl-----------------------------------------------------o
>l------------------------o+++++++oo+++o>+++++++++++
+++++++++++++++++++++++++++++++++os>l------o<<o+++o------o----
----o>-----------o

But if you remove the c at the beginning, the code will output this:

7210110810811144 11911111410810033

Loops repeat until the current cell's value doesn't equal to 0. For example, this sample outputs the whole ASCII table.

l[oscoin-]

You can comment the code line using #

++++ # 4
--- # 1

Use e to exit programm (code 0)

Dependencies

~1.3–1.9MB
~35K SLoC