Coder Social home page Coder Social logo

2lang's Introduction

2 Lang

The worlds most efficient systems programming language

Reserved Symbols & Words

// this is a comment and will be ignored

#macroKey value

Is a macro. At compile time, it will replace all instances of #key with the value.

You can also define interpolated functions in this manner as all arguments will be accessible via the $ symbol

e.g.

#printNewLine PRINT "$1\n"

@/path/fileName.2

Will import a file to be used

By using currying, you are able to create functions which take two arguments.

Standard Library (@lib/std.2) Symbols & Words

PRINT "message"

The print keyword is used to print out text to the screen (planned; not currently functional)


;

The semi-column is an execute command. It will execute all commands in the CPU registers.

Conventions

As there is currently no syntax highlighting, we write in all capital letters (similar to SQL)

Examples

Hello World program

@lib/std.2
PRINT "Hello World!"

Cheat Hello World program

@lib/helloWorld.2
HELLO_WORLD

Localized macro example

#MY_MACRO 11011001
MY_MACRO

will produce

11011001

Macro with parameter example

#USE_PARAMETER 0000 $
USE_PARAMETER 1111

should replace $ with 1111

Compiler

Preserve the intermediary binary output

$ cargo r <filePath> -p
>

Take in an intermediary binary (.bin file)

$ cargo r <filePath> -b
>

Run in debug mode (log file reads, etc...)

$ cargo r <filePath> -d
>

2lang's People

Contributors

hudson-newey 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.