Bulgu

From Esolang
Jump to navigation Jump to search

Bulgu is a minimalistic language designed around self-modification. It was created by User:revcompgeek on Apr 12, 2010. The main idea is using commands to search through memory (both code and data) to move a pointer around. Jumping involves using this pointer, so making decisions and loops requires moving the pointer between the data being modified and the code to jump to.

Instructions

:   change delimiter to next char and skip it
;   change delimiter to char at pointer
[]  move pointer to prev/next char
{}  move pointer to prev/next delimiter

*   move the pointer to the marker
~   swap the pointer with the marker

+-  add/subtract 1 to char at pointer
&_  add/subtract char at marker to char at pointer

%   compare char at pointer to char at marker (result saved)
swap the pointer with the Program Counter if
>   greater
<   less
=   equal

IO
.,  input/output char at pointer

Information

The delimiter starts as " " (a space)

Examples

Hello World!

:|}}}]~|*.]~{{%<>{[.}}=
|Hello World!|