Brainfuck

Brainfuck: Random Stuff

Deutsche Version dieser Seite

Welcome to the wonderful world of brainfuck programming. Or rather, said in the incredible programming language that is the subject of this page:

     
            >+++++++[<++++++++++++>-]<+++.++++++++++++++.+++++++.---------.+
            +++++++++++.--.--------.>++++++[<----------->-]<---.>+++++++[<++
            ++++++++++>-]<.-----.>++++++[<------------->-]<-.>+++++++[<+++++
            +++++++>-]<.------------.---.>++++++[<----------->-]<---.>++++++
            +[<++++++++++++>-]<+++.--------.-.----------.+.+++++++++++++.---
            ---------.+++++++++++++++.---------.>+++++[<--------------->-]<-
            .>+++++++[<++++++++++++>-]<+++.--------.+++.------.--------.>+++
            +++[<----------->-]<--.>++++++[<+++++++++++++>-]<+.---------.>++
            +++++[<---------->-]<.>++++++[<+++++++++++>-]<.>++++[<++++>-]<.>
            ++++[<---->-]<-.++++++++.+++++.--------.+++++++++++++++.>+++[<--
            ---->-]<.++++++++.>+++++[<--------------->-]<.>++++++++[<+++++++
            +++>-]<.++.---.--------.+++++++++++.>++++[<---->-]<-.+++++++++++
            +..----.+++++.-------.>+++++++[<-------->-]<-.>++++++[<------>-]
            <.----------
        

Brainfuck is an incredibly easy to learn and incredibly anoying to program in language, most probably created around 1993. Its author is Urban Mueller from Switzerland, who also wrote the original interpreter for brainfuck and a compiler for the Amiga.

The language includes two mathematical functions (+ and -), functions for character input and output (, and .), means of moving a memory pointer forward and backward (> and <) as well as a special loop command ([]). These functions make up the entire set of elements that can occur in that language.

Following our excitement as we rediscovered this language in December, 1999 at the Chaos Computer Club Cologne, we implement some software tools (e.g. compiler, assembler, interpreter) and we now fantasize about building a brainfuck machine that actually implements the language in hardware. Brainfuck hardware is still a dream (although we have collected some thoughts on a possible design and did a fairly complete sketch of an imaginary microprocessor), however, it doesn't need to remain mere blue sky mining: If you're interessted in building this device, please subscribe to the mailinglist. However, please note: This only remotely resembles the concept of a "useful" project -- brainfuck is not meant to be used for real the application development, but rather caters pervert hacking obsessions in the realm of programming. The name of the language is the name of the game.

Software

aidbf-0.1.tar.gz; Klaus Reimer's brainfuck interpreter sporting a debugger and a bunch of nifty gadgets.

nbfc-0.1.tar.gz; "new brainfuck compiler": A brainfuck-to-C and brainfuck-to-Java-compiler.

nbfc.man.html: nbcf's man page. Includes a description of the brainfuck programming language.

bfa-0.2.tar.gz: Klaus Reimer's amazing brainfuck assembler --- finally a comfortable way of coding! (old version; bfa-0.1.tar.gz). Contains an impressive McDonald"s simulation (in German) as an example application.

bfi.c:The original brainfuck interpreter

bfi.c.patch: Short and sweet, but necessary patch: Get more memory for brainfuck programmes and stop getting segfaults under LinuxPPC.

brainfuck-samples.tar.gz: Brainfuck source code for learning: "Hello World", primes etc.

Theory

The idea behind brainfuck is the so-called Turing machine. It can be proven that all computable problems can be solved with a Turing machine -- that doesn't mean, however, that these solutions will be archived in a particular compfortable or easy way, especially compared to solutions possible in languages like Lisp, Perl or C or even assembly language. The Turing machine is the invention of British computer scientist Alan Turing, who lived a rather fascinating life (after breaking the code of The German "Enigma chipher in World War II, he, despite being one of the fathers of the modern computer, later fell prey to British society's homophobia). See the following links for an overview of the idea of the Turing machine.

Alan Turing Homepage

Turing or rather, more specifically: information on the Turing machine See what Yahoo! knows about Turing machines

Was Yahoo zum Thema Turing-Maschinen weiss

Mailing list

If you are really interested in this, please do subscribe to our mailing list "friends-of-brainfuck". The best way to do so would be to use the list's web interface. Please note: Postings to the list are in German at the moment, but we will happily switch to English as soon as we get a more international group of subscribers.

Links

Ryan Kusnery's Brainfuck compiler for MS-DOS, written in Brainfuck and a debugger and other tools

Frans Faases page on brainfuck including a online BF interpreter in JavaScript, a tutorial and miscellanous other things.

99 bottles of beer in BF.

a program, that prints its own source code.

brainfuck.pl, a Perl brainfuck interpreter by Marko Nippula.

A mirror of the brainfuck homepage that was apparemtly taken down.

by johl, Nik 2002-09-07
Der Clubstatus wird geladen...
Der Club ist offen:
It's a secret to everybody.
Der Club ist geschlossen:
[...] even the word "hopeless" has "hope" in it. Plus, if you rearrange the letters it spells "peeslosh".
Der Clubstatus konnte nicht geladen werden.
content
Brainfuck: Random Stuff
Software
Theory
Mailing list
Links
Kontakt
Direkter Draht: mail@koeln.ccc.de
IRC: #cccc auf hackint (Web)
(Bei Anfragen bitte ERST das F.A.Q. lesen.)
Newsletter
Oder immer up-to-date mit unserem Newsletter.
Zur Newsletter-Anmeldung