Git Product home page Git Product logo

fkys-rs's Introduction

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)

fkys-rs's People

Contributors

ognevny avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.