The FALSE Programming Language

I designed this language in ‘93 with two particular objectives: confusing everyone with an obfuscated syntax, and designing an as powerful language as possible with a tiny implementation: in this case a compiler executable of just 1024 bytes (!), written in pure 68000 assembler.

Here’s a couple of example programs to give a taste of what False looks like:

  • Copy Files

    { copy.f: copy file. usage: copy < infile > outfile  }
    
    ß[^$1_=~][,]#
    
    • Factorial
    { factorial program in false! }
    
    [$1=~[$1-f;!*]?]f:          { fac() in false }
    
    "calculate the factorial of [1..8]: "
    ß^ß'0-$$0>~\8>|$
    "result: "
    ~[\f;!.]?
    ["illegal input!"]?"
    "
    
  • Prime Numbers

    { writes all prime numbers between 0 and 100 }
    
    99 9[1-$][$@$@$@$@/*=[1-$$[%1-$@]?0[$.' ,]?]?]#
    

    Not just toy programs have been written in False, the list of programs in the distribution includes various useful convertion utilities, a compression program, Life, an expression evaluator, a module ripper, queens, tic-tac-toe, a html-table generator, and, probably the biggest False program ever, a complete working BreakOut clone.

    If you want to look at all of this yourself, get the full False 1.2b distribution zip or lha (includes all source, including the compiler and portable interpreter). Or just have a read of the documentation. A dos port of the portable False interpreter can be found here. wikipedia entry.

    False implementations and languages inspired by it

    False has inspired other people to implement similarly perverse languages. Some of them are:

    • “Brainfuck” by Urban Mueller. If you enjoy compilers just because of their size, make sure you get a look at this! (an executable in less than 256 bytes!) [get it from aminet, or go here]. Here’s a recent talk where he explains how he was inspired to create Brainfuck when he saw False. This is helloworld:
    >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-]
    
    <.#>+++++++++++[<+++++>-]<.>++++++++[<+++>-]<.+++.------.--------.[-]>++++++++[
    <++++>-]<+.[-]++++++++++.
    
    • “Y” by Thomas Fischbacher. Very similar to False (syntax too), yet with some more powerful constructs. Comes with (portable) interpreter in C++ [get it from aminet]
    • “Befunge” by Chris Pressey. Comes with interpreter and debugger in C. Code is different from False, but looks equally beautiful. have a look at Befunge. factorial looks like this:
                                        v
    >v"Please enter a number (1-16) : "0<
    ,:             >$*99g1-:99p#v_.25*,@
    ^_&:1-99p>:1-:!|10          <
            ^     <
    
    • “Bloop” by Ben Schaeffer (Yaxman). An as yet unreleased language with features from False (and another pet language of mine, “Yax”). Ben also made a true x86 version of False (by translating the 68k code), but I lost the code (silly me).
    • Ben Hoyt has made a full implementation of False as both interpreter and compiler (for 386 DOS) written in ANSI-Forth! the source code is something to be seen. Get the archive (local copy).
    • FALSE for Android.
    • False-Commander: Windows tool to program keyboard and mouse actions using FALSE programming language.
    • FALSE in JS on npm.
    • Willow Fung has made an implementation of a False-like language for Palm OS & mobile phones (based on MIDP 2.0). Get it here (local copy).
    • Stevan Apter has implemented False in K, and it looks scary. He also made a new language, F (Functional False) .
    • Strictly False.
    • Ian Osgood’s javascript FALSE interpreter and his own Befalse language and DUP.
    • FALSE code samples at rosettacode
    • Additional FALSE related languages on the esolangs wiki: True, BogusForth, Shelta, Owl and Betterave