Code Monkey home page Code Monkey logo

kaforkl's Introduction

KaForkL

About

KaForkL is an image based turing complete interpretor language. The different color channels define directions to walk, commands, values and variables.

The language

Red

The red value defines the direction for the processor to take. If multiple directions are given the processor will fork and process all the given commands starting north and forking clockwise.

Green

The green value refers to a position on the variable stack. There are 256 possible variables.

Blue

Defines a byte value. Depending on the used command a value is interpreted as an integer or char.

Alpha

The alpha value of a pixel defines a command:

  • Simple Operations
    • 0: Just fork
    • 1: Jump, use variable as jump width
    • 2: Jump, use value as jump width
  • IO operations
    • 10: Write value
    • 11: Write variable content
    • 12: Copy variable to stack position
    • 15: Read to variable
    • 16: Read value into variable
  • Conditional statements
    • 20: Only fork if value equals variable
    • 21: Only fork if value not equals variable
    • 22: Only fork if value is lower then variable
    • 23: Only fork if value is greater then variable
    • 24: Only fork if value is lower then or equal variable
    • 25: Only fork if value is greater then or equal variable
  • Calculations
    • 30: Shift variable by value to left
    • 31: Shift variable by value to right
    • 32: Combine variable and value by logical and
    • 33: Combine variable and value by logical or
    • 34: Combine variable and value by logical xor
    • 35: Add value to variable
    • 36: Substract value from variable
    • 37: Multiply variable by value
    • 38: Modulo variable by value
    • 38: Divide variable by value
  • Image manipulations
    • 40: Write value to red channel
    • 41: Write value to green channel
    • 42: Write value to blue channel
    • 43: Write value to alpha channel
    • 45: Write variable content to red channel
    • 46: Write variable content to green channel
    • 47: Write variable content to blue channel
    • 48: Write variable content to alpha channel

The interpretor

You can call the interpretor on command line using:

bin/kaforkl image

The default stating point will be the top left coordinate 0,0, but you may specify other starting points using the parameter -s:

bin/kaforkl -s 12,45 image

You may specify an offset which will be removed from all input values. This will not reduce the number of available variables:

bin/kaforkl -s 12,45 -o 43 image

kaforkl's People

Contributors

kore avatar

Stargazers

 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.