/brainfunc

A programming language like brainf*ck.

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Latest GitHub release GitHub commits since latest release

Brainfunc

A programming language like brainf*ck.

An introduction slide

Language specifications

  • Recommended extension: .bc
  • Environment: char buf[1000000],*ptr=buf;int main(){f__();}
  • Commands:
Command C equivalent
[_0-9A-Za-z]{} void f_[_0-9A-Za-z](void){}
> < ptr++; ptr--;
+ - (*ptr)++; (*ptr)--;
, . *ptr=getchar(); putchar(*ptr);
() if(*ptr){}
[_0-9A-Za-z] f_[_0-9A-Za-z]();
# //
  • Note: you receive -1 as EOF in the input.
  • Note: out of bounds array accesses have undefined behavior.

Brainfunc visualizer

A visualizer of Brainfunc. You can find it here.

  • Note: it is a beta version now.
  • Note: ad-blocks may disable indicating the cursor.

Special specifications

  • if (ptr == 100) ptr = 0;
  • if (ptr == -1) ptr = 99;

BCC

A compiler of Brainfunc. Here is a repository for homebrew.

Installing BCC

Execute the command below.

brew install shuzaei/brainfunc/brainfunc

Using BCC

bcc <filename> [output filename]

VSCode extension

Brainfunc language support.

Installing extension

Install from here.

Additional support

Copyright and license (summary)


    Copyright 2021 shuzaei

    Contact: shuzaei@gmail.com
    URL: https://github.com/shuzaei/brainfunc/
    
    License: GNU GPL v3.0