Skip to content

fraya/dylan-brainfuck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dylan Brainfuck

build

Brainfuck interpreter written in Opendylan programming language.

This is an exploration of Opendylan features (mainly multimethods) and is not trying to be "as fast as possible".

Installation

TODO

Execution

brainfuck-app

where:

  • program is a brainfuck program
  • optimization-level is a number between 0 and 4 (default 4):
    • 0: No optimization
    • 1: Remove comments
    • 2: Group similar instructions (e.g. ++ becomes +2)
    • 3: Replace pattern [-] with a reset to zero
    • 4: Precalculate jumps (e.g. [+>] becomes [3+>]0

Examples

In the directory examples there are several brainfuck programs.

TODO

General

  • Load a program from a <string>
  • Load a program from a file (<locator>)

Instructions

  • increment-data
  • decrement-data
  • increment-pointer
  • decrement-pointer
  • input
  • output
  • jump-forward
  • jump-backward

Optimizations

  • Remove comments
  • Group instructions
  • Replace [-] pattern for a reset to zero instruction.
  • Precomputed jumps

About

Brainfuck interpreter in Opendylan

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages