Giter VIP home page Giter VIP logo

brainfuckide's Introduction

Graphical Brainfuck IDE

An intuitive, featureful and visually appealing Brainfuck IDE/debugger built in Godot

Standalone builds for Linux, Windows and Mac available here.

About

Brainfuck is a relatively well known esoteric programming language made up of only 8 single-character commands (+, -, >, <, ,, ., [ and ]). While there are numerous Brainfuck interpreters and compilers, this project aims to make Brainfuck simple, easy and fun.

Features

  • REPL-like behavior
  • Variety of input methods
  • Useful sample code
  • Animated real-time data tape with adjustable zoom
  • IO panel
  • Speed-of-execution controls
  • Optional 8bit mode

Contributing

Pull requests welcome! All you need to do to get started is clone this repo and download the Godot game engine (NOTE: you currently need Godot 2. For porting to godot 3 see #4). If you haven't used it before, Godot has integrated code and UI editors, and its scripting language, GDScript, is quite similar to Python. Any of the help wanted issues would be great to start out on.

Screenshots

screenshot 0 screenshot 1 recording

brainfuckide's People

Contributors

anonymousellama21 avatar edcdecl avatar maxr1998 avatar wmww avatar

Stargazers

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

brainfuckide's Issues

Hangs when given non-halting programs

The IDE will hang if told to "skip to end" with a non-halting program.

Example program:

+[>+]

Actions taken: Program input, run. IDE told to "skip to end."

Expected result: IDE stops after program runs too long or otherwise indicates that it cannot be "skipped to end."

Actual result: IDE runs program at high speed, using an entire CPU core. If user attempts to stop program using the "reset everything" button, IDE hangs.

Port to Godot 3

Godot 3 is not backwards compatible with Godot 2 projects. We need to port to be able to use the new editor.

Optimize brainfuck runtime

The current implementation of brainfuck is extremely slow. This is mostly due to it not being optimized (Its also implemented in a slow scripting language, but compared to the potential speedup of simple optimizations, this is negligible). Complex programs should run efficiently if desired, but optimizations must remain optional, as the user will often want to see their unoptimized brainfuck run one command at a time.

Persistent settings and code

We need the ability to load and save brainfuck source files. It would also be nice to keep settings and/or open file persistent across closing and reopening the IDE. I've no idea how to do this, but Godot probably makes it somewhat painless. It may or may not be a good idea to wait on #4 (Port to Godot 3) for this.

Clean up code

Most of this project was written over a couple of days for a single lightning talk. As you might imagine, the code isn't the best. Here are some low hanging fruit:

  • Many names are in CamelCase, but some are in snake_case. All should be in snake_case (except maybe types?) as that's Godot standard.
  • Node paths are hard coded all over the place, instead of exported to the editor

Decouple frontend and branfuck runtime

data_display.gd currently manages both the internal representation of the data tape, and the visual display representation. Other bits of the brainfuck runtime (parsing and interpreting) are scattered throughout the code base. Purposed solution:

  1. design a clean interface between the runtime and the rest of the code, this should support:
    • Adding instructions to the queue
    • Dequeueing and running one instruction at a time
    • Running many instructions as fast as possible
    • Fetching a portion of the data tape for display
    • Endless loop handling
    • more?
  2. Implement this in GDScript
  3. Port the visual frontend to use it

Advantages:

  • Cleaner code
  • Easier to add optimizations (see #5)
  • Frontend can be designed such that it does not create nodes for every data cell in use (this allows for brainfuck programs with much larger memory requirements to run)
  • brainfuck implementations can be interchangeable (even 3rd party ones could be added)

Low resolution

Can you go into godot and change the scaling type to stretch?

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.