1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
      060p070                                                           p'O80v
    pb2*90p4$4>                                                         $4$>v>
  v4$>4$>4$>4$>#                                                        ARGH>!
 <{[BEFUNGE_97]}>                                                       FUNGE!
 ##:-:##   #####*         4$*>4$      >060p>    60g80g -!#v_  60g1+     60p60v
 #vOOGAH               **>4$>^!!eg    nufeB^    $4$4$4 $4<v#<<v-*2a::   v7-1g<
 #>70g>90g-!          #@_^Befunge!!   123456    123456 VvVv!#!>Weird!   >0ggv*
  ^$4$4p07+1g07      ,a<$4<   <$4$4<  <$4$4<    <$4$4< <<#<*-=-=-=-=-*  -=-=v*
   ::48*-#v_>,4$>    4$4$4     $4$4$  4$4$4$    4$4$4$ 4$^*!*   XXXXXX   XXX> 
     BOINK>$60g1-7  0g+d2*     %'A+,1 $1$1$1    $1$1$1 $>^<$     HAR!!!  8888 
        Befunge_is  such_a     pretty langua    ge,_is n't_i     t?_It_  8888 
           looks_so much_l     ike_li ne_noi    se_and it's_     STILL_  88 
Turing-     Complet e!_Cam     ouflag e_your    code!! Confu     se_the       
hell_out   of_every one_re     ading_ your_co  de._Oh, AND_y     ou.:-) ,o88o.
 Once_this_thing_i   s_code   d,_rea  ding_it_back_ver ges_on   the_imp 888888
  ossible._Obfusc     ate_the_obfus    cated!_Befunge_ debuggers_are__  888888
   your_friends!       By:_Alexios     Chouchou las... X-X-X-X-X-X-X!   888888
      -=*##*=-           \*****/         9797*  -=97=- !@-*=  *****     ‘"88P
                                                       *!@-*                  
                                                       =*!@-                  
                                                       -=*!@                  
                                                       @-=*!                  

A pseudo-quine in Befunge-93 (from esolangs wiki)

Chris Pressey, esolang pioneer, has posted notes marking the 25 year anniversary of his revolutionary creation, Befunge-93.

The appearance of Befunge, alongside FALSE (by Wouter van Oortmerssen, interviewed here) and brainfuck, all in 1993, proved to be the watershed moment for language experimentalism that would eventually become a movement (joinging INTERCAL which had been recently revived). The term esolang (or even "esoteric programming language") would appear years later, its first use on the Befunge mailing list, where much of the early discussions of the form took place.

Pressey's notes offer some lesser-known aspects of the language, but also an occasion to newly consider it apart from its influence and legacy. The impetus for Befunge was to design the language most difficult to write a compiler for, similar to brainfuck's conceit as the Turing Complete language for which the smallest compiler could be written (Turing Complete is essential -- the compiler for, say, Unnecessary or other languages that challenge basic assumptions of what's required to make a language, would be much smaller). Compiling code is the act of translating from a source language into a target language, usually machine code. Befunge challenges this in two ways. First, its most famous feature, it's a 2D language, so code is not read linearly (left-to-right, top-to-bottom), but sometimes vertically, sometimes backwards, and sometimes off the page on the right side, to appear on the left, like a Pac Man board (thus giving the program space a toroidal topology). While that makes it challenging to do AOT compilation, probably the second feature is even more challenging: it's self-altering, meaning it changes its own source code as it runs. Writing an interpreter for Befunge, however is far easier; the interpreter written (by Pressey) in VB.NET is concise. An interpreter executes as it runs, taking away this difficulty, although interpreters are often slower (interpreted languages include Javascript and Python).  There are also Befunge pseudo-compilers.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
052*"*** nooM eht morf epacsE ***">:v                  v       <
>v                                ^,_                  v  >v
""            >:v1 "Big explosion. You're awake in"*25 <  ""
 .            ^,_                                      v  er
Ne  >:v1 "Cage. One rod of South wall is breaking. s>" << 'e
od  ^,_>~"s"-v                                            sh
 a     ^     _                                         v   T
wc          >:v1 "Zoo room. Door at East is open. en>" < <o
ai>:v       ^,_>~:"n"-v                                   n.
yr^,_>~"n"-v   |  -"e"_$                                ^ ee
.r   ^     _   >                                       v   t
 a  >:v1 "Corridor. Way lead to North and South. nsw>" <  La
nB  ^,_>~:"w"-v                                           el
>" >-  |v-"n":_$                                         ^vP
">^^"s" _$                                             v  e
^      <v"to diving-Dresses room. Sluice at West. dw>" <  rg
v,_@    >" eloh roolf ni llaF">:v0          _    v        .n
>:^1 "Vacoom. You're dead."<  ^,_~:"w"-!v   -              i
 v!-"w"~_, v               ^           $_"d"^             ly
v_     1^!:< "Ready to exit. Sluice at West. w>" <        el
> ">ew .tseW ta etalP gniylF .ecafrus nooM">:v   ^  $_"w"v>F   | !-"l"<
                                           ^,_~:"e"-!^   -""v,_>~:"e"-|
                                             ^0          _^>>:^       $
^                                                                     <

A minimalist text-adventure game in Befunge by Dmitry M Litvinov

In his 25 year update, Pressey notes some things that were new to me:

  • There's a purely functional version of Befunge called Flobnar.
  • Befunge-93 has always been named Befunge-93, it was not changed to this to differentiate from later variations (you'll excuse me if I still call it Befunge for short). This was to parody languages like COBOL-85.
  • While it was well-understood that Befunge-93 is not Turing Complete (due to the size constraints of Befunge programs; I believe it was also part of the motivation to create Funge-98), Pressey claims here that Befunge-93 is not even PDA (Push-Down Automaton) complete which differs from what the esolangs wiki says currently. I have no idea what computational class this makes it (DFA?). Programs of PDA or less complexity can be expressed in Befunge-93, but not all programs in this class, due to the finite limit of the playfield. So Befunge-93 is PDA but not PDA-complete (thanks to ais523 for the clarification).

Funge-98 (of which Befunge-98 is a dialect), is a larger set of languages, some in many dimensions. Where Befunge brought code into the 2D space, Funge-98 is a system that allows code to be written in any number of dimensions, should we find ways to represent it. In the piece, Pressey remarks on the relative unpopularity of non-2D Fungues, the Unefunges, Trefunges, and all the Funges of greater dimensionality. Befunge is much easier to look at, of course, than a Tefunge program, although there have been attempts at a Trefunge editor (no longer online). Pressey has noted that the other dimensionalities have not become nearly as popular as Befunge. Perhaps it's time to revisit Trefunge -- a 3D IDE for it would have my vote for hot VR app of 2019).

Apart from its mailing list establishing the early esolang community and creating the space for the new medium to develop, Befunge, perhaps more than FALSE, entrenched the stack-based model as a dominant one for esolangs of unusual lexicons (e.g. Piet, my Time Out, and a great many others). In terms of 2D space, some esolangers have picked up where Pressey left off in exploring strange topologies (see the recent interview with Martin Ender). But more than that, Befunge's example opened the possibilities of programming languages as an expressive medium and its mailing list created the first platform to discuss them.

Some Befunge-93 projects and resources

For more on Unefunges, Trefunges, Nefunges, and all other Funge languages, see Pressey's original post or my 2015 interview with him