Giter Club home page Giter Club logo

grok-language's Introduction

Grok-Language

Grok is a two-dimensional, stack-based language inspired by Befunge, ><>, and the Vim editor.


Documentation

The Issues page lists planned/possible additions to the language and/or interpreter, as well as known bugs. If you come across any undocumented bugs, feel free to make a note of them and I'll squash them.


Getting Started

The PyGrok interpreter requires Python 3 or higher.

$ PyGrok.py --help
usage: PyGrok.py [-h] (<script file> | -c <code>) [<options>]

    Execute a Grok script.
    Executing a script is as easy as:
        PyGrok.py <script file>
    You can also execute code directly using the -c/--code flag:
        PyGrok.py -c '1z23zzq'
        > 132
    The -v and -s flags can be used to prepopulate the stack:
        PyGrok.py echo.grk -s "hello, world" -v 32 49 50 51 -s "456"
        > hello, world 123456

optional arguments:
  -h, --help            show this help message and exit

code:
  script                .grk file to execute
  -c <code>, --code <code>
                        string of instructions to execute

options:
  -s <string>, --string <string>
  -v <number> [<number> ...], --value <number> [<number> ...]
                        push numbers or strings onto the stack before execution starts
  -t <seconds>, --tick <seconds>
                        define a tick time, or a delay between the execution of each instruction
  -a, --always-tick     make every instruction cause a tick (delay), even whitespace and skipped instructions
  -e, --show-errors     disable "You don't grok Grok." error message and show true error message

The official specification can be found at Esolangs.org

grok-language's People

Contributors

amiller42 avatar lyxal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

lyxal

grok-language's Issues

Online interpreter does not timeout

Currently, the if the online interpreter takes too long to execute, it does not timeout. I am actively working on figuring out why, but it the meantime, try not to fall into any infinite loops, ok?

Possible PyGrok Additions / Improvements

  • Flag to disable trailing newline
  • Flag to enable integer division instead of float division
  • Flag to enable implicit input and/or output Probably not gonna happen
  • Flag to make subsequent : commands act as no-ops

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.