Giter VIP home page Giter VIP logo

piet_tool's Introduction

Piet_Tool

Description

Piet_Tool is an interpreter for the Piet programming language written in Rust. It has support for translating Piet programs into equivalent Forth code, which can then be run on a Forth interpreter or system.

Limitations

Piet_Tool is a work in progress and has some limitations. The main limitations are currently:

  • Some programs will run indefinitely. This is due to a bug in the way Piet_Tool handles termination conditions. This is a known issue and will be fixed in a future release.
  • The Forth translation is not very good. Some Piet programs will not translate correctly to Forth, or will just be translated in a way that is verbose and stupid. The translation feature is a work in progress.
  • The interpreter is not very fast. Piet programs can be slow to run, especially if they are large or complex. Not like anybody picks Piet for its speed though...
  • Programs that contain character or numerical input may not work. This is a work in progress.

Usage

To use Piet_Tool, you need to have Rust installed. You can install Rust by following the instructions on the Rust website.

Once you have Rust installed, you can clone this repository and run make install to build the Piet_Tool executable. You can then run Piet_Tool with the following command:

./piet_tool <image path>

<image path> is the path to a Piet program image file. Piet_Tool will then interpret the Piet program and output the result to the console.

You can provide a codel size to Piet_Tool with the -c flag. For example, to run a Piet program with a codel size of 10, you can use the following command:

./piet_tool -c 10 <image path>

You can also use the -f flag to output the Forth translation of the Piet program. For example, to output the Forth translation of a Piet program with a codel size of 10, you can use the following command:

./piet_tool -c 10 -f <image path>

This will output the Forth translation of the Piet to a file called (by default) out.f. You can specify a different output file with the -o flag.

The max execution steps can be set with the -s flag.

The debug level can be set with the -d flag. It takes values from 0 to 3, with 0 being no debug output and 3 being the most verbose (a full program trace).

Examples

The examples directory contains some example Piet programs that you can run with Piet_Tool. For example, you can run the hello_world.png program with the following command:

./target/release/piet_tool examples/hello_world.png

This will output Hello, World! to the console.

piet_tool's People

Contributors

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