GithubHelp home page GithubHelp logo

tiny's Introduction

Tiny Language C/C++ Library

Copyright (c) 2016 Naveen Venkat | All Rights Reserved

The following content is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

CONTENTS

I. Brief

II. Variables

  • _P
  • TINY_RAMBUFF
  • TINY_MODE
  • CDV
  • DP

III. Functions

IV. Additional Content

V. Contribute to the project

I. BRIEF

Tiny Language is a library written for C/C++. Inspired by the turing complete language Brainf**k Language (hereafter called BFlang), Tiny aims to bring a BFlang like functionalities to the C/C++ environment. With sophisticated controls and smart memory management, Tiny is perfect to create your own recipe for programming.

Q. Why should you use it?

A. Tiny uses the most basic operations on data like increment and decrement. So you could be totally reliable on your code and write functionalities from basic. Tiny is great for people who like to write code from scratch. No dependencies. Just pure C code.

Quick Reference:

Command Description
L Move the pointer to the left (Left)
R Move the pointer to the right (Right)
U Increment the current pointed cell by 1 (Up)
D Decrement the current pointer cell by 1 (Down)
I Read a single character into the current cell (Input)
O Print the character at the current cell (Output)
LOOP The block following it will be looped until a 0 occurs at the current cell when loop condition is checked

IMPORTANT Note:

  • Give a space between two functions. For eg. write R U L and not RUL
  • Current Data Value is abbreviated as CDV.
  • Data Pointer is abbreviated as DP.

II. VARIABLES

1. char* _P

The Data Pointer

2. TINY_RAMBUFF

Determines the memory occupied (in bytes)

3. TINY_MODE

Determines whether increment / decrement of CDV can be done outside the limits of 1 byte (-128 to 127, both inclusive).

  • open - No limits. This means if CDV = 127, an increment would give -128 (8 bit binary addition)
  • locked - Arithmetic done within limits. If CDV = -128, further decrement will not occur

4. LOOP

Alias name for while(*_P)

5. CDV

Alias name for *_P

6. DP

Alias name for _P

III. FUNCTIONS

1. O:

  • Def: void _O();
  • "Output"
  • Prints the ASCII character at the CDV

2. I:

  • Def: void _I();
  • "Input"
  • Input one character from standard input at the CDV

3. U:

  • Def: void _U();
  • "Up"
  • Increments the CDV by 1 (8 bit binary addition)
  • If TINY_MODE is locked, increments within range

4. D:

  • Def: void _D();
  • "Down"
  • Decrements the CDV by 1 (8 bit binary subtraction)
  • If TINY_MODE is locked, decrements within range

5. L:

  • Def: void _L();
  • "Left"
  • Moves the DP backward by 1 byte (move left)

6. R:

  • Def: void _R();
  • "Right"
  • Moves the DP forward by 1 byte (move right)

7. LOOP:

  • It's an alias for while(*_P)
  • Loops till CDV is 0
  • Can be used to create loop blocks like so:
    • LOOP{ U U U }
    • This logically increments CDV by 3.

IV. ADDITIONAL CONTENT

  1. Comments can be used normally.
  2. C Labels can be used to mark processes.
  3. Code written as shown in demo.cpp makes it look intuitive.

V. CONTRIBUTE

You can contribute to the project by submitting code to improve the language. You will be mentioned in the Contributors list.

Visit serverprocessor.wordpress.com/tiny/contribute or mail your source code to [email protected].

https://github.com/nmakes/tiny

tiny's People

Contributors

harsh-bansal avatar nmakes avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.