All Projects → Property404 → Hdbf

Property404 / Hdbf

Licence: gpl-3.0
Hyper-Dimensional Brainfuck

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Hdbf

Zepto
A schemy Lisp backed by Haskell
Stars: ✭ 60 (-31.03%)
Mutual labels:  interpreter
Oh
A new Unix shell.
Stars: ✭ 1,206 (+1286.21%)
Mutual labels:  interpreter
Pebakery
PEBakery is a script engine that specializes in customizing the Windows Preinstalled Environment (WinPE/WinRE).
Stars: ✭ 80 (-8.05%)
Mutual labels:  interpreter
Sablejs
🏖️ The safer and faster ECMA5.1 interpreter written by JavaScript
Stars: ✭ 60 (-31.03%)
Mutual labels:  interpreter
Mini Interpreter
A Simple Scripting Language
Stars: ✭ 72 (-17.24%)
Mutual labels:  interpreter
Smallbasic
SmallBASIC is a fast and easy to learn BASIC language interpreter ideal for everyday calculations, scripts and prototypes. SmallBASIC includes trigonometric, matrices and algebra functions, a built in IDE, a powerful string library, system, sound, and graphic commands along with structured programming syntax
Stars: ✭ 78 (-10.34%)
Mutual labels:  interpreter
Reoscript
JavaScript-like script language engine for .NET Application. Easy to plug in .NET Application and making API extension for script. Enhanced syntax and features are also available such as lambda expression, call setTimeout with arguments, etc...
Stars: ✭ 57 (-34.48%)
Mutual labels:  interpreter
Aceto
A programming language based on a 2D Hilbert curve grid
Stars: ✭ 83 (-4.6%)
Mutual labels:  interpreter
Ntphp
Ever wanted to execute PHP in your kernel driver? Look no further!
Stars: ✭ 76 (-12.64%)
Mutual labels:  interpreter
Rs Monkey Lang
Monkey Programming Language written in Rust.
Stars: ✭ 80 (-8.05%)
Mutual labels:  interpreter
Birlscript
Interpretador da linguagem BirlScript
Stars: ✭ 62 (-28.74%)
Mutual labels:  interpreter
Joker
Small Clojure interpreter, linter and formatter.
Stars: ✭ 1,161 (+1234.48%)
Mutual labels:  interpreter
Goto
Goto is an interpreted programming language written in go.
Stars: ✭ 79 (-9.2%)
Mutual labels:  interpreter
Flashforth
FlashForth development
Stars: ✭ 60 (-31.03%)
Mutual labels:  interpreter
Xstateful
A wrapper for xstate that stores state, handles transitions, emits events for state changes and actions/activities, and includes an optional reducer framework for updating state and invoking side-effects
Stars: ✭ 81 (-6.9%)
Mutual labels:  interpreter
Tiny Lisp
A tiny lisp compiler written in JS
Stars: ✭ 58 (-33.33%)
Mutual labels:  interpreter
Python lite
[WIP] A simple, lightweight implementation of python3 language.
Stars: ✭ 77 (-11.49%)
Mutual labels:  interpreter
Abrvalg
Python-like programming language interpreter written in Python
Stars: ✭ 83 (-4.6%)
Mutual labels:  interpreter
Internettools
XPath/XQuery 3.1 interpreter for Pascal with compatibility modes for XPath 2.0/XQuery 1.0/3.0, custom and JSONiq extensions, XML/HTML parsers and classes for HTTP/S requests
Stars: ✭ 82 (-5.75%)
Mutual labels:  interpreter
Tagha
Minimal, low-level, fast, and self-contained register-based bytecode virtual machine/runtime environment.
Stars: ✭ 79 (-9.2%)
Mutual labels:  interpreter

Hyper-Dimensional Brainfuck

Hyper-Dimensional Brainfuck is an infinite-dimensional version of the Brainfuck programming language. Instead of a tape, we have a "world." Lines within the world are called "vectors," and act very much like the Brainfuck tape. You can switch between vectors using the ^ and V commands.

Commands:

+ - increment value of current cell
- - decrement value of current cell
> - shift positively along current vector
< - shift negatively along current vector
^ - switch to a vector, parallel to the next dimensional axis, that passes through the current cell
V - switch to a vector, parallel to the previous dimension axis, that passes through the current cell
. - print out contents of current cell
, - replace contents of current cell with input from STDIN
[ - skip past matching ] if current cell values zero
] - return to matching [

Debug Commands (enabled with -d):
# - print out coordinates and value of current cell
? - print out current coordinates

Interdimensional Travel

The ^ and V commands do not change the current cell, but only the direction in which the pointer will travel. Note that ^V and V^ is useless code, because they cancel each other out. A good way to think about this is a simple array of nodes, storing the cell's values and coordinates. For example, the list at the start of a program may be {(0)=0} where the cell at position 0 is equal to 0. At the end of the program, the list may be {(0)=5,(0,1)=2,(1,1,1)=3,(1,5)=7, ...}

The < and > commands will actually switch to a different node in the array. For example, starting at coordinate (0), ^>>>^^>> will go to the cell at position (0,3,0,2)

In our notation, (0) is the same coordinate as (0,0,0,0) or (0,0,0,0,0,0,0,0,0,0,0)

Example:

Let's say we're only considering a 2-dimensional plane of the world:

[0,1][1,1]
[0,0][1,0]

You start at 0,0. To shift to 1,0, you would use >. To switch to 1,1 from there, you would use ^>. From there, to switch to 0,1, you would just use V<, and to switch back to 0,0, you use ^<

Now let's consider a three dimensional cube, specifically a 3x3x3 cube.
To go from the bottom, left, front corner of the cube, i.e (0,0,0) to the top, right, back corner, i.e. (2,2,2) You would do the following:

>>^>>^>>

For a 4x4x4x4 tesseract:
>>>^>>>^>>>^>>>

Install:

git clone https://github.com/Property404/hdbf
cd hdbf
make
sudo make install
# test
hdbf ./examples/LostKingdom.b

Command Line Usage:

hdbf somefile.hdbf //Run some file
hdbf -o somefile.hdbf // Run optimized version of some file
hdbf -b somefile.hdbf // Run some file as pure brainfuck
hdbf -d somefile.hdbf // Run some file in debug mode
hdbf -di "+++++++>^^+++#" // Run command in debug mode
hdbf --help // Display help
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].