Giter Club home page Giter Club logo

qqq-lang's Introduction

???

This is the ??? programming language. Have you ever been writing a play, essay, or other work of literature and thought to yourself, "Man, wouldn't it be great if I could embed a program in this using punctuation?" Well now you can.

Overview

??? is a trivial Brainfuck substitution, meaning that a trivial replacement of operators will result in an equivalent BF program. Unsurprisingly, this means that ??? works the same way as BF: It operates on an array of memory cells (also called the tape), each initially set to 0, and has a pointer initially pointing to the first memory cell. It also means that it's a Turing complete language.

There are only three distinctions between how BF and ??? work in practice:

  • In ???, traveling left of the starting cell is a no-op.
  • In BF, loops are constructed using [ and ]. ??? uses a single character for loop boundaries, namely ", with ' as a toggle between open and closed.
  • When printing to STDOUT, ??? prints unprintable characters using their hex representations. Printable characters appear normally.

Commands

Command Description
; Move the pointer to the right
- Move the pointer to the left
. Increment the memory cell under the pointer
, Decrement the memory cell under the pointer
! Output the character signified by the cell at the pointer
? Input a character and store it in the cell at the pointer
" Jump to the matching " if the cell under the pointer is 0
' Toggles whether subsequent " commands start or end a loop

Initially, " begins a loop.

Notes

The creators of the language would like to extend a special thank you to Stack Exchange users aditsu, Doorknob, Reto Koradi, and Martin Ender for inspiration and suggesting improvements/fixes.

qqq-lang's People

Contributors

ararslan avatar brainsteel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

qqq-lang's Issues

Inconsistent detection of mismatched brackets

The code is supposed to begin by checking for mismatched brackets but this seems not to work consistently. An example is the following code:

;?"';?"."-"',-";"';";"-,"';"-!;;"--."

This contains " ' " " which is the equivalent of [ ] ] (in terms of Brainfuck brackets). Rather than throwing an exception as expected, the code simply enters an infinite loop.

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.