Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple frontend and branfuck runtime #6

Open
wmww opened this issue Jul 30, 2018 · 0 comments
Open

Decouple frontend and branfuck runtime #6

wmww opened this issue Jul 30, 2018 · 0 comments

Comments

@wmww
Copy link
Owner

wmww commented Jul 30, 2018

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 Optimize brainfuck runtime #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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant