Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html class="client-nojs" lang="en" dir="ltr">
- <head>
- <meta charset="UTF-8"/>
- <title>Brainfuck - Wikipedia</title>
- <script>document.documentElement.className = document.documentElement.className.replace( /(^|\s)client-nojs(\s|$)/, "$1client-js$2" );</script>
- <script>(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Brainfuck","wgTitle":"Brainfuck","wgCurRevisionId":892262183,"wgRevisionId":892262183,"wgArticleId":4086,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["CS1 French-language sources (fr)","Articles with example C code","All articles with unsourced statements","Articles with unsourced statements from June 2014","Articles with Curlie links","Non-English-based programming languages","Esoteric programming languages","Programming languages created in 1993"],"wgBreakFrames":false,"wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgMonthNamesShort":["","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"wgRelevantPageName":"Brainfuck","wgRelevantArticleId":4086,"wgRequestId":"XLGfCQpAAEIAAEIz0r0AAABG","wgCSPNonce":false,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgFlaggedRevsParams":{"tags":{}},"wgStableRevisionId":null,"wgBetaFeaturesFeatures":[],"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsReferencePreviews":false,"wgPopupsShouldSendModuleToUser":true,"wgPopupsConflictsWithNavPopupGadget":false,"wgVisualEditor":{"pageLanguageCode":"en","pageLanguageDir":"ltr","pageVariantFallbacks":"en","usePageImages":true,"usePageDescriptions":true},"wgMFDisplayWikibaseDescriptions":{"search":true,"nearby":true,"watchlist":true,"tagline":false},"wgRelatedArticles":null,"wgRelatedArticlesUseCirrusSearch":true,"wgRelatedArticlesOnlyUseCirrusSearch":false,"wgWMESchemaEditAttemptStepOversample":false,"wgPoweredByHHVM":true,"wgULSCurrentAutonym":"English","wgNoticeProject":"wikipedia","wgCentralNoticeCookiesToDelete":[],"wgCentralNoticeCategoriesUsingLegacy":["Fundraising","fundraising"],"wgWikibaseItemId":"Q244627","wgScoreNoteLanguages":{"arabic":"العربية","catalan":"català","deutsch":"Deutsch","english":"English","espanol":"español","italiano":"italiano","nederlands":"Nederlands","norsk":"norsk","portugues":"português","suomi":"suomi","svenska":"svenska","vlaams":"West-Vlams"},"wgScoreDefaultNoteLanguage":"nederlands","wgCentralAuthMobileDomain":false,"wgVisualEditorUnsupportedEditParams":["undo","undoafter","veswitched"],"wgEditSubmitButtonLabelPublish":true});mw.loader.state({"ext.gadget.charinsert-styles":"ready","ext.globalCssJs.user.styles":"ready","ext.globalCssJs.site.styles":"ready","site.styles":"ready","noscript":"ready","user.styles":"ready","ext.globalCssJs.user":"ready","ext.globalCssJs.site":"ready","user":"ready","user.options":"ready","user.tokens":"loading","ext.cite.styles":"ready","ext.pygments":"ready","ext.math.styles":"ready","mediawiki.legacy.shared":"ready","mediawiki.legacy.commonPrint":"ready","mediawiki.toc.styles":"ready","wikibase.client.init":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","ext.wikimediaBadges":"ready","ext.3d.styles":"ready","mediawiki.skinning.interface":"ready","skins.vector.styles":"ready"});mw.loader.implement("user.tokens@0tffind",function($,jQuery,require,module){/*@nomin*/mw.user.tokens.set({"editToken":"+\\","patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"});
- });RLPAGEMODULES=["ext.cite.ux-enhancements","ext.math.scripts","site","mediawiki.page.startup","mediawiki.page.ready","mediawiki.toc","mediawiki.searchSuggest","ext.gadget.teahouse","ext.gadget.ReferenceTooltips","ext.gadget.watchlist-notice","ext.gadget.DRN-wizard","ext.gadget.charinsert","ext.gadget.refToolbar","ext.gadget.extra-toolbar-buttons","ext.gadget.switcher","ext.centralauth.centralautologin","ext.popups","ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.eventlogger","ext.uls.init","ext.uls.compactlinks","ext.uls.interface","ext.quicksurveys.init","ext.centralNotice.geoIP","ext.centralNotice.startUp","skins.vector.js"];mw.loader.load(RLPAGEMODULES);});</script>
- <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.3d.styles%7Cext.cite.styles%7Cext.math.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cmediawiki.legacy.commonPrint%2Cshared%7Cmediawiki.skinning.interface%7Cmediawiki.toc.styles%7Cskins.vector.styles%7Cwikibase.client.init&only=styles&skin=vector"/>
- <script async="" src="/w/load.php?lang=en&modules=startup&only=scripts&skin=vector"></script>
- <meta name="ResourceLoaderDynamicStyles" content=""/>
- <link rel="stylesheet" href="/w/load.php?lang=en&modules=ext.gadget.charinsert-styles&only=styles&skin=vector"/>
- <link rel="stylesheet" href="/w/load.php?lang=en&modules=site.styles&only=styles&skin=vector"/>
- <meta name="generator" content="MediaWiki 1.33.0-wmf.25"/>
- <meta name="referrer" content="origin"/>
- <meta name="referrer" content="origin-when-crossorigin"/>
- <meta name="referrer" content="origin-when-cross-origin"/>
- <link rel="alternate" href="android-app://org.wikipedia/http/en.m.wikipedia.org/wiki/Brainfuck"/>
- <link rel="alternate" type="application/x-wiki" title="Edit this page" href="/w/index.php?title=Brainfuck&action=edit"/>
- <link rel="edit" title="Edit this page" href="/w/index.php?title=Brainfuck&action=edit"/>
- <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"/>
- <link rel="shortcut icon" href="/static/favicon/wikipedia.ico"/>
- <link rel="search" type="application/opensearchdescription+xml" href="/w/opensearch_desc.php" title="Wikipedia (en)"/>
- <link rel="EditURI" type="application/rsd+xml" href="//en.wikipedia.org/w/api.php?action=rsd"/>
- <link rel="license" href="//creativecommons.org/licenses/by-sa/3.0/"/>
- <link rel="canonical" href="https://en.wikipedia.org/wiki/Brainfuck"/>
- <link rel="dns-prefetch" href="//login.wikimedia.org"/>
- <link rel="dns-prefetch" href="//meta.wikimedia.org" />
- <!--[if lt IE 9]><script src="/w/load.php?lang=en&modules=html5shiv&only=scripts&skin=vector&sync=1"></script><![endif]-->
- </head>
- <body class="mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject mw-editable page-Brainfuck rootpage-Brainfuck skin-vector action-view">
- <div id="mw-page-base" class="noprint"></div>
- <div id="mw-head-base" class="noprint"></div>
- <div id="content" class="mw-body" role="main">
- <a id="top"></a>
- <div id="siteNotice" class="mw-body-content"><!-- CentralNotice --></div>
- <div class="mw-indicators mw-body-content">
- </div>
- <h1 id="firstHeading" class="firstHeading" lang="en">Brainfuck</h1>
- <div id="bodyContent" class="mw-body-content">
- <div id="siteSub" class="noprint">From Wikipedia, the free encyclopedia</div>
- <div id="contentSub"></div>
- <div id="jump-to-nav"></div>
- <a class="mw-jump-link" href="#mw-head">Jump to navigation</a>
- <a class="mw-jump-link" href="#p-search">Jump to search</a>
- <div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="mw-parser-output"><div role="note" class="hatnote navigation-not-searchable">Not to be confused with <a href="/wiki/Brain_Fuck_Scheduler" title="Brain Fuck Scheduler">Brain Fuck Scheduler</a> or <a href="/wiki/Mindfuck_(disambiguation)" class="mw-redirect mw-disambig" title="Mindfuck (disambiguation)">Mindfuck</a>.</div>
- <table class="infobox vevent" style="width:22em"><caption class="summary">Brainfuck</caption><tbody><tr><th scope="row"><a href="/wiki/Programming_paradigm" title="Programming paradigm">Paradigm</a></th><td><a href="/wiki/Esoteric_programming_language" title="Esoteric programming language">esoteric</a>, <a href="/wiki/Imperative_programming" title="Imperative programming">imperative</a>, <a href="/wiki/Structured_programming" title="Structured programming">structured</a></td></tr><tr><th scope="row"><a href="/wiki/Software_design" title="Software design">Designed by</a></th><td>Urban Müller</td></tr><tr><th scope="row">First appeared</th><td>September 1993</td></tr><tr><th scope="row"><a href="/wiki/Type_system" title="Type system">Typing discipline</a></th><td>typeless</td></tr><tr><th scope="row"><a href="/wiki/Filename_extension" title="Filename extension">Filename extensions</a></th><td>.b, .bf</td></tr><tr><th colspan="2" style="text-align:center;background-color: #eee;">Influenced by</th></tr><tr><td colspan="2" style="text-align:center"><a href="/wiki/P%E2%80%B2%E2%80%B2" title="P′′">P′′</a>, <a href="/wiki/Esoteric_programming_language#FALSE" title="Esoteric programming language">FALSE</a></td></tr></tbody></table>
- <p><b>Brainfuck</b> is an <a href="/wiki/Esoteric_programming_language" title="Esoteric programming language">esoteric programming language</a> created in 1993 by <a href="/w/index.php?title=Urban_M%C3%BCller&action=edit&redlink=1" class="new" title="Urban Müller (page does not exist)">Urban Müller</a>, and is notable for its extreme minimalism.
- </p><p>The language consists of only eight simple commands and an <a href="/wiki/Instruction_pointer" class="mw-redirect" title="Instruction pointer">instruction pointer</a>. While it is fully <a href="/wiki/Turing_completeness" title="Turing completeness">Turing complete</a>, it is not intended for practical use, but to challenge and amuse <a href="/wiki/Programmers" class="mw-redirect" title="Programmers">programmers</a>. Brainfuck simply requires one to break commands into microscopic steps.
- </p><p>The language's name is a reference to the slang term <i><a href="https://en.wiktionary.org/wiki/brainfuck" class="extiw" title="wikt:brainfuck">brainfuck</a></i>, which refers to things so complicated or unusual that they exceed the limits of one's understanding.
- </p>
- <div id="toc" class="toc"><input type="checkbox" role="button" id="toctogglecheckbox" class="toctogglecheckbox" style="display:none" /><div class="toctitle" lang="en" dir="ltr"><h2>Contents</h2><span class="toctogglespan"><label class="toctogglelabel" for="toctogglecheckbox"></label></span></div>
- <ul>
- <li class="toclevel-1 tocsection-1"><a href="#History"><span class="tocnumber">1</span> <span class="toctext">History</span></a>
- <ul>
- <li class="toclevel-2 tocsection-2"><a href="#P′′:_Brainfuck's_formal_"parent_language""><span class="tocnumber">1.1</span> <span class="toctext">P′′: Brainfuck's formal "parent language"</span></a></li>
- <li class="toclevel-2 tocsection-3"><a href="#The_Infinite_Abacus:_Brainfuck's_"grand-parent"_language"><span class="tocnumber">1.2</span> <span class="toctext">The Infinite Abacus: Brainfuck's "grand-parent" language</span></a></li>
- </ul>
- </li>
- <li class="toclevel-1 tocsection-4"><a href="#Language_design"><span class="tocnumber">2</span> <span class="toctext">Language design</span></a>
- <ul>
- <li class="toclevel-2 tocsection-5"><a href="#Commands"><span class="tocnumber">2.1</span> <span class="toctext">Commands</span></a></li>
- </ul>
- </li>
- <li class="toclevel-1 tocsection-6"><a href="#Examples"><span class="tocnumber">3</span> <span class="toctext">Examples</span></a>
- <ul>
- <li class="toclevel-2 tocsection-7"><a href="#Adding_two_values"><span class="tocnumber">3.1</span> <span class="toctext">Adding two values</span></a></li>
- <li class="toclevel-2 tocsection-8"><a href="#Hello_World!"><span class="tocnumber">3.2</span> <span class="toctext">Hello World!</span></a></li>
- <li class="toclevel-2 tocsection-9"><a href="#ROT13"><span class="tocnumber">3.3</span> <span class="toctext">ROT13</span></a></li>
- </ul>
- </li>
- <li class="toclevel-1 tocsection-10"><a href="#Portability_issues"><span class="tocnumber">4</span> <span class="toctext">Portability issues</span></a>
- <ul>
- <li class="toclevel-2 tocsection-11"><a href="#Cell_size"><span class="tocnumber">4.1</span> <span class="toctext">Cell size</span></a></li>
- <li class="toclevel-2 tocsection-12"><a href="#Array_size"><span class="tocnumber">4.2</span> <span class="toctext">Array size</span></a></li>
- <li class="toclevel-2 tocsection-13"><a href="#End-of-line_code"><span class="tocnumber">4.3</span> <span class="toctext">End-of-line code</span></a></li>
- <li class="toclevel-2 tocsection-14"><a href="#End-of-file_behavior"><span class="tocnumber">4.4</span> <span class="toctext">End-of-file behavior</span></a></li>
- </ul>
- </li>
- <li class="toclevel-1 tocsection-15"><a href="#Derivatives"><span class="tocnumber">5</span> <span class="toctext">Derivatives</span></a></li>
- <li class="toclevel-1 tocsection-16"><a href="#See_also"><span class="tocnumber">6</span> <span class="toctext">See also</span></a></li>
- <li class="toclevel-1 tocsection-17"><a href="#References"><span class="tocnumber">7</span> <span class="toctext">References</span></a></li>
- <li class="toclevel-1 tocsection-18"><a href="#External_links"><span class="tocnumber">8</span> <span class="toctext">External links</span></a></li>
- </ul>
- </div>
- <h2><span class="mw-headline" id="History">History</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=1" title="Edit section: History">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
- <p>In 1992, Urban Müller, a Swiss physics student, took over a small online archive for <a href="/wiki/Amiga" title="Amiga">Amiga</a> software.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[1]</a></sup> The archive grew more popular, and was soon mirrored around the world. Today, it is the world's largest Amiga archive, known as <a href="/wiki/Aminet" title="Aminet">Aminet</a>.
- </p><p>Müller designed Brainfuck with the goal of implementing it with the smallest possible <a href="/wiki/Compiler" title="Compiler">compiler</a>,<sup id="cite_ref-2" class="reference"><a href="#cite_note-2">[2]</a></sup> inspired by the 1024-byte compiler for the <a href="/wiki/Esoteric_programming_language#FALSE" title="Esoteric programming language">FALSE programming language</a>.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3">[3]</a></sup> Müller's original compiler was implemented in machine language and compiled to a binary with a size of 296 bytes. He uploaded the first Brainfuck compiler to Aminet in 1993. The program came with a "Readme" file, which briefly described the language, and challenged the reader "Who can program anything useful with it? <a href="/wiki/Emoticon" title="Emoticon">:)</a>". Müller also included an interpreter and some quite elaborate examples. A second version of the compiler used only 240 bytes.<sup id="cite_ref-4" class="reference"><a href="#cite_note-4">[4]</a></sup>
- </p><p>As Aminet grew, the compiler became popular among the Amiga community, and in time it was implemented for other platforms. Several brainfuck compilers have been made smaller than 200 bytes, and one is only 100 bytes.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5">[5]</a></sup>
- </p>
- <h3><span id="P.E2.80.B2.E2.80.B2:_Brainfuck.27s_formal_.22parent_language.22"></span><span class="mw-headline" id="P′′:_Brainfuck's_formal_"parent_language"">P′′: Brainfuck's formal "parent language"</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=2" title="Edit section: P′′: Brainfuck's formal "parent language"">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
- <p>Except for its two I/O commands, Brainfuck is a minor variation of the formal programming language <a href="/wiki/P%E2%80%B2%E2%80%B2" title="P′′">P′′</a> created by <a href="/wiki/Corrado_B%C3%B6hm" title="Corrado Böhm">Corrado Böhm</a> in 1964, which in turn is explicitly based on the <a href="/wiki/Turing_machine" title="Turing machine">Turing machine</a>. In fact, using six symbols equivalent to the respective Brainfuck commands <code>+</code>, <code>-</code>, <code><</code>, <code>></code>, <code>[</code>, <code>]</code>, Böhm provided an explicit program for each of the basic functions that together serve to compute any <a href="/wiki/Computable_function" title="Computable function">computable function</a>. So the first "Brainfuck" programs appear in Böhm's 1964 paper – and they were programs sufficient to prove <a href="/wiki/Turing_completeness" title="Turing completeness">Turing completeness</a>.
- </p>
- <h3><span id="The_Infinite_Abacus:_Brainfuck.27s_.22grand-parent.22_language"></span><span class="mw-headline" id="The_Infinite_Abacus:_Brainfuck's_"grand-parent"_language">The Infinite Abacus: Brainfuck's "grand-parent" language</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=3" title="Edit section: The Infinite Abacus: Brainfuck's "grand-parent" language">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
- <p>A version with explicit memory addressing rather without stack and a conditional jump was introduced by <a href="/wiki/Joachim_Lambek" title="Joachim Lambek">Joachim Lambek</a> in 1961 under the name of the Infinite Abacus,<sup id="cite_ref-lambek_6-0" class="reference"><a href="#cite_note-lambek-6">[6]</a></sup> consisting of an infinite number of cells and two instructions:
- </p>
- <ul><li><code>X+</code> (increment cell X)</li>
- <li><code>X- else jump T</code> (decrement X if it is positive else jump to T)</li></ul>
- <p>He proves the Infinite Abacus can compute any computable recursive function by programming <a href="/wiki/Stephen_Cole_Kleene" title="Stephen Cole Kleene">Kleene</a> set of basic <a href="/wiki/M-recursive_function" class="mw-redirect" title="M-recursive function">μ-recursive function</a>.
- </p><p>His machine was simulated by Melzac's machine<sup id="cite_ref-melzak_7-0" class="reference"><a href="#cite_note-melzak-7">[7]</a></sup> modeling computation via arithmetic rather than logic mimicking a human operator moving pebbles on an abacus, hence the requirement that all numbers must be positive. Melzac, whose <a href="/wiki/One_instruction_set_computer" title="One instruction set computer">one instruction set computer</a> is equivalent to an Infinite Abacus, gives programs for multiplication, gcd, n<sup>t</sup> prime number, representation in base b, sorting by magnitude, and shows how to simulate an arbitrary Turing machine.
- </p>
- <h2><span class="mw-headline" id="Language_design">Language design</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=4" title="Edit section: Language design">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
- <p>The language consists of eight <a href="/wiki/Command_(computing)" title="Command (computing)">commands</a>, listed below. A brainfuck program is a sequence of these commands, possibly interspersed with other characters (which are ignored). The commands are executed sequentially, with some exceptions: an <a href="/wiki/Program_Counter" class="mw-redirect" title="Program Counter">instruction pointer</a> begins at the first command, and each command it points to is executed, after which it normally moves forward to the next command. The program terminates when the instruction pointer moves past the last command.
- </p><p>The brainfuck language uses a simple machine model consisting of the program and instruction pointer, as well as an array of at least 30,000 <a href="/wiki/Byte" title="Byte">byte</a> cells initialized to zero; a movable <a href="/wiki/Pointer_(computer_programming)" title="Pointer (computer programming)">data pointer</a> (initialized to point to the leftmost byte of the array); and two streams of bytes for input and output (most often connected to a keyboard and a monitor respectively, and using the <a href="/wiki/ASCII" title="ASCII">ASCII</a> character encoding).
- </p>
- <h3><span class="mw-headline" id="Commands">Commands</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=5" title="Edit section: Commands">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
- <p>The eight language commands each consist of a single character:
- </p>
- <table class="wikitable">
- <tbody><tr>
- <th style="text-align:center;">Character
- </th>
- <th align="left">Meaning
- </th></tr>
- <tr>
- <td style="text-align:center"><code>></code>
- </td>
- <td>increment the <a href="/wiki/Pointer_(computer_programming)" title="Pointer (computer programming)">data pointer</a> (to point to the next cell to the right).
- </td></tr>
- <tr>
- <td style="text-align:center"><code><</code>
- </td>
- <td>decrement the data pointer (to point to the next cell to the left).
- </td></tr>
- <tr>
- <td style="text-align:center"><code>+</code>
- </td>
- <td>increment (increase by one) the byte at the data pointer.
- </td></tr>
- <tr>
- <td style="text-align:center"><code>-</code>
- </td>
- <td>decrement (decrease by one) the byte at the data pointer.
- </td></tr>
- <tr>
- <td style="text-align:center"><code>.</code>
- </td>
- <td>output the byte at the data pointer.
- </td></tr>
- <tr>
- <td style="text-align:center"><code>,</code>
- </td>
- <td>accept one byte of input, storing its value in the byte at the data pointer.
- </td></tr>
- <tr>
- <td style="text-align:center"><code>[</code>
- </td>
- <td>if the byte at the data pointer is zero, then instead of moving the <a href="/wiki/Program_Counter" class="mw-redirect" title="Program Counter">instruction pointer</a> forward to the next command, <a href="/wiki/Branch_(computer_science)" title="Branch (computer science)">jump</a> it <i>forward</i> to the command after the <i>matching</i> <code>]</code> command.
- </td></tr>
- <tr>
- <td style="text-align:center"><code>]</code>
- </td>
- <td>if the byte at the data pointer is nonzero, then instead of moving the instruction pointer forward to the next command, jump it <i>back</i> to the command after the <i>matching</i> <code>[</code> command.
- </td></tr></tbody></table>
- <p>(Alternatively, the <code>]</code> command may instead be translated as an unconditional jump <b>to</b> the corresponding <code>[</code> command, or vice versa; programs will behave the same but will run more slowly, due to unnecessary double searching.)
- </p><p><code>[</code> and <code>]</code> match as parentheses usually do: each <code>[</code> matches exactly one <code>]</code> and vice versa, the <code>[</code> comes first, and there can be no unmatched <code>[</code> or <code>]</code> between the two.
- </p><p>Brainfuck programs can be translated into <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a> using the following substitutions, assuming <code>ptr</code> is of type <code> char*</code> and has been initialized to point to an array of zeroed bytes:
- </p>
- <table class="wikitable">
- <tbody><tr>
- <th style="text-align:center;">brainfuck command
- </th>
- <th style="text-align:left;"><a href="/wiki/C_(programming_language)" title="C (programming language)">C</a> equivalent
- </th></tr>
- <tr>
- <td style="text-align:center;">(Program Start)</td>
- <td><code class="mw-highlight" dir="ltr"><span class="kt">char</span> <span class="n">array</span><span class="p">[</span><span class="n">INFINITELY_LARGE_SIZE</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span><span class="mi">0</span><span class="p">};</span></code><br /><code class="mw-highlight" dir="ltr"><span class="kt">char</span> <span class="o">*</span><span class="n">ptr</span><span class="o">=</span><span class="n">array</span><span class="p">;</span></code>
- </td></tr>
- <tr>
- <td style="text-align:center;"><code>></code></td>
- <td><code class="mw-highlight" dir="ltr"><span class="o">++</span><span class="n">ptr</span><span class="p">;</span></code>
- </td></tr>
- <tr>
- <td style="text-align:center;"><code><</code></td>
- <td><code class="mw-highlight" dir="ltr"><span class="o">--</span><span class="n">ptr</span><span class="p">;</span></code>
- </td></tr>
- <tr>
- <td style="text-align:center;"><code>+</code></td>
- <td><code class="mw-highlight" dir="ltr"><span class="o">++*</span><span class="n">ptr</span><span class="p">;</span></code>
- </td></tr>
- <tr>
- <td style="text-align:center;"><code>-</code></td>
- <td><code class="mw-highlight" dir="ltr"><span class="o">--*</span><span class="n">ptr</span><span class="p">;</span></code>
- </td></tr>
- <tr>
- <td style="text-align:center;"><code>.</code></td>
- <td><code class="mw-highlight" dir="ltr"><span class="n">putchar</span><span class="p">(</span><span class="o">*</span><span class="n">ptr</span><span class="p">);</span></code>
- </td></tr>
- <tr>
- <td style="text-align:center;"><code>,</code></td>
- <td><code class="mw-highlight" dir="ltr"><span class="o">*</span><span class="n">ptr</span><span class="o">=</span><span class="n">getchar</span><span class="p">();</span></code>
- </td></tr>
- <tr>
- <td style="text-align:center;"><code>[</code></td>
- <td><code class="mw-highlight" dir="ltr"><span class="k">while</span> <span class="p">(</span><span class="o">*</span><span class="n">ptr</span><span class="p">)</span> <span class="p">{</span></code>
- </td></tr>
- <tr>
- <td style="text-align:center;"><code>]</code></td>
- <td><code class="mw-highlight" dir="ltr"><span class="p">}</span></code>
- </td></tr></tbody></table>
- <p>As the name suggests, Brainfuck programs tend to be difficult to comprehend. This is partly because any mildly complex task requires a long sequence of commands, and partly it is because the program's text gives no direct indications of the program's <a href="/wiki/State_(computer_science)" title="State (computer science)">state</a>. These, as well as Brainfuck's inefficiency and its limited input/output capabilities, are some of the reasons it is not used for serious programming. Nonetheless, like any Turing complete language, Brainfuck is theoretically capable of computing any computable function or simulating any other computational model, if given access to an unlimited amount of memory.<sup id="cite_ref-8" class="reference"><a href="#cite_note-8">[8]</a></sup> A variety of Brainfuck programs have been written.<sup id="cite_ref-9" class="reference"><a href="#cite_note-9">[9]</a></sup> Although Brainfuck programs, especially complicated ones, are difficult to write, it is quite trivial to write an interpreter for Brainfuck in a more typical language such as C due to its simplicity. There even exist Brainfuck interpreters written in the Brainfuck language itself.<sup id="cite_ref-10" class="reference"><a href="#cite_note-10">[10]</a></sup><sup id="cite_ref-11" class="reference"><a href="#cite_note-11">[11]</a></sup>
- </p><p>Brainfuck is an example of a so-called <a href="/wiki/Turing_tarpit" title="Turing tarpit">Turing tarpit</a>: It can be used to write <i>any</i> program, but it is not practical to do so, because Brainfuck provides so little abstraction that the programs get very long or complicated.
- </p>
- <h2><span class="mw-headline" id="Examples">Examples</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=6" title="Edit section: Examples">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
- <h3><span class="mw-headline" id="Adding_two_values">Adding two values</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=7" title="Edit section: Adding two values">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
- <p>As a first, simple example, the following code snippet will add the current cell's value to the next cell: Each time the loop is executed, the current cell is decremented, the data pointer moves to the right, that next cell is incremented, and the data pointer moves left again. This sequence is repeated until the starting cell is 0.
- </p>
- <div class="mw-highlight mw-content-ltr" dir="ltr"><pre><span></span><span class="k">[</span><span class="nb">-</span><span class="nv">></span><span class="nb">+</span><span class="nv"><</span><span class="k">]</span><span class="c"></span>
- </pre></div>
- <p>This can be incorporated into a simple addition program as follows:
- </p>
- <div class="mw-highlight mw-content-ltr" dir="ltr"><pre><span></span><span class="nb">++</span><span class="c"> Cell c0 = 2</span>
- <span class="nv">></span><span class="c"> </span><span class="nb">+++++</span><span class="c"> Cell c1 = 5</span>
- <span class="k">[</span><span class="c"> Start your loops with your cell pointer on the loop counter (c1 in our case)</span>
- <span class="nv"><</span><span class="c"> </span><span class="nb">+</span><span class="c"> Add 1 to c0</span>
- <span class="nv">></span><span class="c"> </span><span class="nb">-</span><span class="c"> Subtract 1 from c1</span>
- <span class="k">]</span><span class="c"> End your loops with the cell pointer on the loop counter</span>
- <span class="c">At this point our program has added 5 to 2 leaving 7 in c0 and 0 in c1</span>
- <span class="c">but we cannot output this value to the terminal since it is not ASCII encoded!</span>
- <span class="c">To display the ASCII character "7" we must add 48 to the value 7</span>
- <span class="c">48 = 6 * 8 so let's use another loop to help us!</span>
- <span class="nb">++++</span><span class="c"> </span><span class="nb">++++</span><span class="c"> c1 = 8 and this will be our loop counter again</span>
- <span class="k">[</span><span class="c"></span>
- <span class="nv"><</span><span class="c"> </span><span class="nb">+++</span><span class="c"> </span><span class="nb">+++</span><span class="c"> Add 6 to c0</span>
- <span class="nv">></span><span class="c"> </span><span class="nb">-</span><span class="c"> Subtract 1 from c1</span>
- <span class="k">]</span><span class="c"></span>
- <span class="nv"><</span><span class="c"> </span><span class="nt">.</span><span class="c"> Print out c0 which has the value 55 which translates to "7"!</span>
- </pre></div>
- <h3><span id="Hello_World.21"></span><span class="mw-headline" id="Hello_World!">Hello World!</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=8" title="Edit section: Hello World!">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
- <p>The following program prints <a href="/wiki/Hello_world_program" class="mw-redirect" title="Hello world program">"Hello World!"</a> and a newline to the screen:
- </p>
- <div class="mw-highlight mw-content-ltr" dir="ltr"><pre><span></span><span class="k">[</span><span class="c"> This program prints "Hello World!" and a newline to the screen</span><span class="nt">,</span><span class="c"> its</span>
- <span class="c"> length is 106 active command characters</span><span class="nt">.</span><span class="c"> </span><span class="k">[</span><span class="c">It is not the shortest</span><span class="nt">.</span><span class="k">]</span><span class="c"></span>
- <span class="c"> This loop is an "initial comment loop"</span><span class="nt">,</span><span class="c"> a simple way of adding a comment</span>
- <span class="c"> to a BF program such that you don't have to worry about any command</span>
- <span class="c"> characters</span><span class="nt">.</span><span class="c"> Any "</span><span class="nt">.</span><span class="c">"</span><span class="nt">,</span><span class="c"> "</span><span class="nt">,</span><span class="c">"</span><span class="nt">,</span><span class="c"> "</span><span class="nb">+</span><span class="c">"</span><span class="nt">,</span><span class="c"> "</span><span class="nb">-</span><span class="c">"</span><span class="nt">,</span><span class="c"> "</span><span class="nv"><</span><span class="c">" and "</span><span class="nv">></span><span class="c">" characters are simply</span>
- <span class="c"> ignored</span><span class="nt">,</span><span class="c"> the "</span><span class="k">[</span><span class="c">" and "</span><span class="k">]</span><span class="c">" characters just have to be balanced</span><span class="nt">.</span><span class="c"> This</span>
- <span class="c"> loop and the commands it contains are ignored because the current cell</span>
- <span class="c"> defaults to a value of 0; the 0 value causes this loop to be skipped</span><span class="nt">.</span><span class="c"></span>
- <span class="k">]</span><span class="c"></span>
- <span class="nb">++++++++</span><span class="c"> Set Cell #0 to 8</span>
- <span class="k">[</span><span class="c"></span>
- <span class="c"> </span><span class="nv">></span><span class="nb">++++</span><span class="c"> Add 4 to Cell #1; this will always set Cell #1 to 4</span>
- <span class="c"> </span><span class="k">[</span><span class="c"> as the cell will be cleared by the loop</span>
- <span class="c"> </span><span class="nv">></span><span class="nb">++</span><span class="c"> Add 2 to Cell #2</span>
- <span class="c"> </span><span class="nv">></span><span class="nb">+++</span><span class="c"> Add 3 to Cell #3</span>
- <span class="c"> </span><span class="nv">></span><span class="nb">+++</span><span class="c"> Add 3 to Cell #4</span>
- <span class="c"> </span><span class="nv">></span><span class="nb">+</span><span class="c"> Add 1 to Cell #5</span>
- <span class="c"> </span><span class="nv"><<<<</span><span class="nb">-</span><span class="c"> Decrement the loop counter in Cell #1</span>
- <span class="c"> </span><span class="k">]</span><span class="c"> Loop till Cell #1 is zero; number of iterations is 4</span>
- <span class="c"> </span><span class="nv">></span><span class="nb">+</span><span class="c"> Add 1 to Cell #2</span>
- <span class="c"> </span><span class="nv">></span><span class="nb">+</span><span class="c"> Add 1 to Cell #3</span>
- <span class="c"> </span><span class="nv">></span><span class="nb">-</span><span class="c"> Subtract 1 from Cell #4</span>
- <span class="c"> </span><span class="nv">>></span><span class="nb">+</span><span class="c"> Add 1 to Cell #6</span>
- <span class="c"> </span><span class="k">[</span><span class="nv"><</span><span class="k">]</span><span class="c"> Move back to the first zero cell you find; this will</span>
- <span class="c"> be Cell #1 which was cleared by the previous loop</span>
- <span class="c"> </span><span class="nv"><</span><span class="nb">-</span><span class="c"> Decrement the loop Counter in Cell #0</span>
- <span class="k">]</span><span class="c"> Loop till Cell #0 is zero; number of iterations is 8</span>
- <span class="c">The result of this is:</span>
- <span class="c">Cell No : 0 1 2 3 4 5 6</span>
- <span class="c">Contents: 0 0 72 104 88 32 8</span>
- <span class="c">Pointer : ^</span>
- <span class="nv">>></span><span class="nt">.</span><span class="c"> Cell #2 has value 72 which is 'H'</span>
- <span class="nv">></span><span class="nb">---</span><span class="nt">.</span><span class="c"> Subtract 3 from Cell #3 to get 101 which is 'e'</span>
- <span class="nb">+++++++</span><span class="nt">..</span><span class="nb">+++</span><span class="nt">.</span><span class="c"> Likewise for 'llo' from Cell #3</span>
- <span class="nv">>></span><span class="nt">.</span><span class="c"> Cell #5 is 32 for the space</span>
- <span class="nv"><</span><span class="nb">-</span><span class="nt">.</span><span class="c"> Subtract 1 from Cell #4 for 87 to give a 'W'</span>
- <span class="nv"><</span><span class="nt">.</span><span class="c"> Cell #3 was set to 'o' from the end of 'Hello'</span>
- <span class="nb">+++</span><span class="nt">.</span><span class="nb">------</span><span class="nt">.</span><span class="nb">--------</span><span class="nt">.</span><span class="c"> Cell #3 for 'rl' and 'd'</span>
- <span class="nv">>></span><span class="nb">+</span><span class="nt">.</span><span class="c"> Add 1 to Cell #5 gives us an exclamation point</span>
- <span class="nv">></span><span class="nb">++</span><span class="nt">.</span><span class="c"> And finally a newline from Cell #6</span>
- </pre></div>
- <p>For "readability", this code has been spread across many lines and blanks and comments have been added. Brainfuck ignores all characters except the eight commands <code>+-<>[],.</code> so no special syntax for comments is needed (as long as the comments do not contain the command characters). The code could just as well have been written as:
- </p>
- <div class="mw-highlight mw-content-ltr" dir="ltr"><pre><span></span><span class="nb">++++++++</span><span class="k">[</span><span class="nv">></span><span class="nb">++++</span><span class="k">[</span><span class="nv">></span><span class="nb">++</span><span class="nv">></span><span class="nb">+++</span><span class="nv">></span><span class="nb">+++</span><span class="nv">></span><span class="nb">+</span><span class="nv"><<<<</span><span class="nb">-</span><span class="k">]</span><span class="nv">></span><span class="nb">+</span><span class="nv">></span><span class="nb">+</span><span class="nv">></span><span class="nb">-</span><span class="nv">>></span><span class="nb">+</span><span class="k">[</span><span class="nv"><</span><span class="k">]</span><span class="nv"><</span><span class="nb">-</span><span class="k">]</span><span class="nv">>></span><span class="nt">.</span><span class="nv">></span><span class="nb">---</span><span class="nt">.</span><span class="nb">+++++++</span><span class="nt">..</span><span class="nb">+++</span><span class="nt">.</span><span class="nv">>></span><span class="nt">.</span><span class="nv"><</span><span class="nb">-</span><span class="nt">.</span><span class="nv"><</span><span class="nt">.</span><span class="nb">+++</span><span class="nt">.</span><span class="nb">------</span><span class="nt">.</span><span class="nb">--------</span><span class="nt">.</span><span class="nv">>></span><span class="nb">+</span><span class="nt">.</span><span class="nv">></span><span class="nb">++</span><span class="nt">.</span><span class="c"></span>
- </pre></div>
- <h3><span class="mw-headline" id="ROT13">ROT13</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=9" title="Edit section: ROT13">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
- <p>This program enciphers its input with the <a href="/wiki/ROT13" title="ROT13">ROT13</a> cipher. To do this, it must map characters A-M (<a href="/wiki/ASCII" title="ASCII">ASCII</a> 65-77) to N-Z (78-90), and vice versa. Also it must map a-m (97-109) to n-z (110-122) and vice versa. It must map all other characters to themselves; it reads characters one at a time and outputs their enciphered equivalents until it reads an EOF (here assumed to be represented as either -1 or "no change"), at which point the program terminates.
- </p><p>The basic approach used is as follows. Calling the input character <i>x</i>, divide <i>x</i>-1 by 32, keeping quotient and remainder. Unless the quotient is 2 or 3, just output <i>x</i>, having kept a copy of it during the division. If the quotient is 2 or 3, divide the remainder ((<i>x</i>-1) modulo 32) by 13; if the quotient here is 0, output <i>x</i>+13; if 1, output <i>x</i>-13; if 2, output <i>x</i>.
- </p><p>Regarding the division algorithm, when dividing <i>y</i> by <i>z</i> to get a quotient <i>q</i> and remainder <i>r</i>, there is an outer loop which sets <i>q</i> and <i>r</i> first to the quotient and remainder of 1/<i>z</i>, then to those of 2/<i>z</i>, and so on; after it has executed <i>y</i> times, this outer loop terminates, leaving <i>q</i> and <i>r</i> set to the quotient and remainder of <i>y</i>/<i>z</i>. (The dividend <i>y</i> is used as a diminishing counter that controls how many times this loop is executed.) Within the loop, there is code to increment <i>r</i> and decrement <i>y</i>, which is usually sufficient; however, every <i>z</i>th time through the outer loop, it is necessary to zero <i>r</i> and increment <i>q</i>. This is done with a diminishing counter set to the divisor <i>z</i>; each time through the outer loop, this counter is decremented, and when it reaches zero, it is refilled by moving the value from <i>r</i> back into it.
- </p>
- <div class="mw-highlight mw-content-ltr" dir="ltr"><pre><span></span><span class="c"> </span>
- <span class="nb">-</span><span class="nt">,</span><span class="nb">+</span><span class="k">[</span><span class="c"> Read first character and start outer character reading loop</span>
- <span class="c"> </span><span class="nb">-</span><span class="k">[</span><span class="c"> Skip forward if character is 0</span>
- <span class="c"> </span><span class="nv">>></span><span class="nb">++++</span><span class="k">[</span><span class="nv">></span><span class="nb">++++++++</span><span class="nv"><</span><span class="nb">-</span><span class="k">]</span><span class="c"> Set up divisor (32) for division loop</span>
- <span class="c"> (MEMORY LAYOUT: dividend copy remainder divisor quotient zero zero)</span>
- <span class="c"> </span><span class="nv"><</span><span class="nb">+</span><span class="nv"><</span><span class="nb">-</span><span class="k">[</span><span class="c"> Set up dividend (x minus 1) and enter division loop</span>
- <span class="c"> </span><span class="nv">></span><span class="nb">+</span><span class="nv">></span><span class="nb">+</span><span class="nv">></span><span class="nb">-</span><span class="k">[</span><span class="nv">>>></span><span class="k">]</span><span class="c"> Increase copy and remainder / reduce divisor / Normal case: skip forward</span>
- <span class="c"> </span><span class="nv"><</span><span class="k">[[</span><span class="nv">></span><span class="nb">+</span><span class="nv"><</span><span class="nb">-</span><span class="k">]</span><span class="nv">>></span><span class="nb">+</span><span class="nv">></span><span class="k">]</span><span class="c"> Special case: move remainder back to divisor and increase quotient</span>
- <span class="c"> </span><span class="nv"><<<<<</span><span class="nb">-</span><span class="c"> Decrement dividend</span>
- <span class="c"> </span><span class="k">]</span><span class="c"> End division loop</span>
- <span class="c"> </span><span class="k">]</span><span class="nv">>>></span><span class="k">[</span><span class="nb">-</span><span class="k">]</span><span class="nb">+</span><span class="c"> End skip loop; zero former divisor and reuse space for a flag</span>
- <span class="c"> </span><span class="nv">></span><span class="nb">--</span><span class="k">[</span><span class="nb">-</span><span class="k">[</span><span class="nv"><</span><span class="nb">-</span><span class="nv">></span><span class="nb">+++</span><span class="k">[</span><span class="nb">-</span><span class="k">]]]</span><span class="nv"><</span><span class="k">[</span><span class="c"> Zero that flag unless quotient was 2 or 3; zero quotient; check flag</span>
- <span class="c"> </span><span class="nb">++++++++++++</span><span class="nv"><</span><span class="k">[</span><span class="c"> If flag then set up divisor (13) for second division loop</span>
- <span class="c"> (MEMORY LAYOUT: zero copy dividend divisor remainder quotient zero zero)</span>
- <span class="c"> </span><span class="nv">></span><span class="nb">-</span><span class="k">[</span><span class="nv">></span><span class="nb">+</span><span class="nv">>></span><span class="k">]</span><span class="c"> Reduce divisor; Normal case: increase remainder</span>
- <span class="c"> </span><span class="nv">></span><span class="k">[</span><span class="nb">+</span><span class="k">[</span><span class="nv"><</span><span class="nb">+</span><span class="nv">></span><span class="nb">-</span><span class="k">]</span><span class="nv">></span><span class="nb">+</span><span class="nv">>></span><span class="k">]</span><span class="c"> Special case: increase remainder / move it back to divisor / increase quotient</span>
- <span class="c"> </span><span class="nv"><<<<<</span><span class="nb">-</span><span class="c"> Decrease dividend</span>
- <span class="c"> </span><span class="k">]</span><span class="c"> End division loop</span>
- <span class="c"> </span><span class="nv">>></span><span class="k">[</span><span class="nv"><</span><span class="nb">+</span><span class="nv">></span><span class="nb">-</span><span class="k">]</span><span class="c"> Add remainder back to divisor to get a useful 13</span>
- <span class="c"> </span><span class="nv">></span><span class="k">[</span><span class="c"> Skip forward if quotient was 0</span>
- <span class="c"> </span><span class="nb">-</span><span class="k">[</span><span class="c"> Decrement quotient and skip forward if quotient was 1</span>
- <span class="c"> </span><span class="nb">-</span><span class="nv"><<</span><span class="k">[</span><span class="nb">-</span><span class="k">]</span><span class="nv">>></span><span class="c"> Zero quotient and divisor if quotient was 2</span>
- <span class="c"> </span><span class="k">]</span><span class="nv"><<</span><span class="k">[</span><span class="nv"><<</span><span class="nb">-</span><span class="nv">>></span><span class="nb">-</span><span class="k">]</span><span class="nv">>></span><span class="c"> Zero divisor and subtract 13 from copy if quotient was 1</span>
- <span class="c"> </span><span class="k">]</span><span class="nv"><<</span><span class="k">[</span><span class="nv"><<</span><span class="nb">+</span><span class="nv">>></span><span class="nb">-</span><span class="k">]</span><span class="c"> Zero divisor and add 13 to copy if quotient was 0</span>
- <span class="c"> </span><span class="k">]</span><span class="c"> End outer skip loop (jump to here if ((character minus 1)/32) was not 2 or 3)</span>
- <span class="c"> </span><span class="nv"><</span><span class="k">[</span><span class="nb">-</span><span class="k">]</span><span class="c"> Clear remainder from first division if second division was skipped</span>
- <span class="c"> </span><span class="nv"><</span><span class="nt">.</span><span class="k">[</span><span class="nb">-</span><span class="k">]</span><span class="c"> Output ROT13ed character from copy and clear it</span>
- <span class="c"> </span><span class="nv"><</span><span class="nb">-</span><span class="nt">,</span><span class="nb">+</span><span class="c"> Read next character</span>
- <span class="k">]</span><span class="c"> End character reading loop</span>
- </pre></div>
- <h2><span class="mw-headline" id="Portability_issues">Portability issues</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=10" title="Edit section: Portability issues">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
- <p>Partly because Urban Müller did not write a thorough language specification, the many subsequent brainfuck interpreters and compilers have come to use slightly different dialects of brainfuck.
- </p>
- <h3><span class="mw-headline" id="Cell_size">Cell size</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=11" title="Edit section: Cell size">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
- <p>In the classic distribution, the cells are of 8-bit size (cells are bytes), and this is still the most common size. However, to read non-textual data, a brainfuck program may need to distinguish an <a href="/wiki/End-of-file" title="End-of-file">end-of-file</a> condition from any possible byte value; thus 16-bit cells have also been used. Some implementations have used 32-bit cells, 64-bit cells, or <a href="/wiki/Bignum" class="mw-redirect" title="Bignum">bignum</a> cells with practically unlimited range, but programs that use this extra range are likely to be slow, since storing the value <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle n}">
- <semantics>
- <mrow class="MJX-TeXAtom-ORD">
- <mstyle displaystyle="true" scriptlevel="0">
- <mi>n</mi>
- </mstyle>
- </mrow>
- <annotation encoding="application/x-tex">{\displaystyle n}</annotation>
- </semantics>
- </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b" class="mwe-math-fallback-image-inline" aria-hidden="true" style="vertical-align: -0.338ex; width:1.395ex; height:1.676ex;" alt="n"/></span> into a cell requires <span class="mwe-math-element"><span class="mwe-math-mathml-inline mwe-math-mathml-a11y" style="display: none;"><math xmlns="http://www.w3.org/1998/Math/MathML" alttext="{\displaystyle O(n)}">
- <semantics>
- <mrow class="MJX-TeXAtom-ORD">
- <mstyle displaystyle="true" scriptlevel="0">
- <mi>O</mi>
- <mo stretchy="false">(</mo>
- <mi>n</mi>
- <mo stretchy="false">)</mo>
- </mstyle>
- </mrow>
- <annotation encoding="application/x-tex">{\displaystyle O(n)}</annotation>
- </semantics>
- </math></span><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/34109fe397fdcff370079185bfdb65826cb5565a" class="mwe-math-fallback-image-inline" aria-hidden="true" style="vertical-align: -0.838ex; width:4.977ex; height:2.843ex;" alt="O(n)"/></span> time as a cell's value may only be changed by incrementing and decrementing.
- </p><p>In all these variants, the <code>,</code> and <code>.</code> commands still read and write data in bytes. In most of them, the cells wrap around, i.e. incrementing a cell which holds its maximal value (with the <code>+</code> command) will bring it to its minimal value and vice versa. The exceptions are implementations which are distant from the underlying hardware, implementations that use bignums, and implementations that try to enforce portability.
- </p><p>It is usually easy to write brainfuck programs that do not ever cause integer wraparound or overflow, and therefore don't depend on cell size. Generally this means avoiding increment of +255 (unsigned 8-bit wraparound), or avoiding overstepping the boundaries of [-128, +127] (signed 8-bit wraparound) (since there are no comparison operators, a program cannot distinguish between a signed and unsigned <a href="/wiki/Two%27s_complement" title="Two's complement">two's complement</a> fixed-bit-size cell and negativeness of numbers is a matter of interpretation). For more details on integer wraparound, see the <a href="/wiki/Integer_overflow" title="Integer overflow">Integer overflow</a> article.
- </p>
- <h3><span class="mw-headline" id="Array_size">Array size</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=12" title="Edit section: Array size">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
- <p>In the classic distribution, the array has 30,000 cells, and the pointer begins at the leftmost cell. Even more cells are needed to store things like the millionth <a href="/wiki/Fibonacci_number" title="Fibonacci number">Fibonacci number</a>, and the easiest way to make the language Turing complete is to make the array unlimited on the right.
- </p><p>A few implementations<sup id="cite_ref-12" class="reference"><a href="#cite_note-12">[12]</a></sup> extend the array to the left as well; this is an uncommon feature, and therefore portable brainfuck programs do not depend on it.
- </p><p>When the pointer moves outside the bounds of the array, some implementations will give an error message, some will try to extend the array dynamically, some will not notice and will produce <a href="/wiki/Undefined_behavior" title="Undefined behavior">undefined behavior</a>, and a few will move the pointer to the opposite end of the array. Some tradeoffs are involved: expanding the array dynamically to the right is the most user-friendly approach and is good for memory-hungry programs, but it carries a speed penalty. If a fixed-size array is used it is helpful to make it very large, or better yet let the user set the size. Giving an error message for bounds violations is very useful for debugging but even that carries a speed penalty unless it can be handled by the operating system's memory protections.
- </p>
- <h3><span class="mw-headline" id="End-of-line_code">End-of-line code</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=13" title="Edit section: End-of-line code">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
- <p>Different operating systems (and sometimes different programming environments) use subtly different versions of ASCII. The most important difference is in the code used for the end of a line of text. MS-DOS and Microsoft Windows use a <a href="/wiki/Newline#Representations" title="Newline">CRLF</a>, i.e. a 13 followed by a 10, in most contexts. UNIX and its descendants (including GNU/Linux and Mac OS X) and Amigas use just 10, and older Macs use just 13. It would be difficult if brainfuck programs had to be rewritten for different operating systems. However, a unified standard was easy to create. Urban Müller's compiler and his example programs use 10, on both input and output; so do a large majority of existing brainfuck programs; and 10 is also more convenient to use than CRLF. Thus, brainfuck implementations should make sure that brainfuck programs that assume newline = 10 will run properly; many do so, but some do not.
- </p><p>This assumption is also consistent with most of the world's sample code for <a href="/wiki/C_(programming_language)" title="C (programming language)">C</a> and other languages, in that they use '\n', or 10, for their newlines. On systems that use CRLF line endings, the C standard library transparently remaps "\n" to "\r\n" on output and "\r\n" to "\n" on input for streams not opened in binary mode.
- </p>
- <h3><span class="mw-headline" id="End-of-file_behavior">End-of-file behavior</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=14" title="Edit section: End-of-file behavior">edit</a><span class="mw-editsection-bracket">]</span></span></h3>
- <p>The behavior of the <code>,</code> command when an <a href="/wiki/End-of-file" title="End-of-file">end-of-file</a> condition has been encountered varies. Some implementations set the cell at the pointer to 0, some set it to the C constant EOF (in practice this is usually -1), some leave the cell's value unchanged. There is no real consensus; arguments for the three behaviors are as follows.
- </p><p>Setting the cell to 0 avoids the use of negative numbers, and makes it marginally more concise to write a loop that reads characters until EOF occurs. This is a language extension devised by Panu Kalliokoski.
- </p><p>Setting the cell to -1 allows EOF to be distinguished from any byte value (if the cells are larger than bytes), which is necessary for reading non-textual data; also, it is the behavior of the C translation of <code>,</code> given in Müller's readme file. However, it is not obvious that those C translations are to be taken as normative.
- </p><p>Leaving the cell's value unchanged is the behavior of Urban Müller's brainfuck compiler. This behavior can easily coexist with either of the others; for instance, a program that assumes EOF = 0 can set the cell to 0 before each <code>,</code> command, and will then work correctly on implementations that do either EOF = 0 or EOF = "no change". It is so easy to accommodate the "no change" behavior that any brainfuck programmer interested in portability should do so.
- </p>
- <h2><span class="mw-headline" id="Derivatives">Derivatives</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=15" title="Edit section: Derivatives">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
- <p>Many people have created brainfuck equivalents (languages with commands that directly map to brainfuck) or brainfuck derivatives (languages that extend its behavior or map it into new semantic territory).
- </p><p>Some examples:
- </p>
- <ul><li><b>Pi</b>, which maps brainfuck into errors in individual digits of <a href="/wiki/Pi" title="Pi">Pi</a>.<sup id="cite_ref-13" class="reference"><a href="#cite_note-13">[13]</a></sup></li>
- <li><b>VerboseFuck</b>, which looks like a traditional programming language, only what appears as parameters or expressions are actually parts of longer commands that cannot be altered.<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This seems to be something someone just made up as a joke last month, not mentioned in any independent reliable source. (June 2014)">citation needed</span></a></i>]</sup></li>
- <li><b>DerpPlusPlus</b>, in which the commands are replaced with words such as 'HERP', 'DERP', 'GIGITY', etc.<sup id="cite_ref-14" class="reference"><a href="#cite_note-14">[14]</a></sup></li>
- <li><b>Ook!</b>, which maps brainfuck's eight commands to two-word combinations of "Ook.", "Ook?", and "Ook!", jokingly designed to be "writable and readable by orang-utans" according to its creator, a reference to <a href="/wiki/The_Librarian_(Discworld)#Librarian" class="mw-redirect" title="The Librarian (Discworld)">the orang-utan Librarian</a> in the novels of <a href="/wiki/Terry_Pratchett" title="Terry Pratchett">Terry Pratchett</a>.<sup id="cite_ref-15" class="reference"><a href="#cite_note-15">[15]</a></sup><sup id="cite_ref-Paloque-Bergès2009_16-0" class="reference"><a href="#cite_note-Paloque-Bergès2009-16">[16]</a></sup></li>
- <li><b>Ternary</b>, similar in concept to Ook! but instead consisting of permutations of the ASCII characters 0, 1, and 2.<sup id="cite_ref-17" class="reference"><a href="#cite_note-17">[17]</a></sup></li>
- <li><b>BodyFuck</b>, a BrainFuck implementation based on a <a href="/wiki/Gesture_recognition" title="Gesture recognition">gesture-controlled system</a> so that programmer's movements are captured by a video camera and converted into the 8 possible characters.<sup id="cite_ref-18" class="reference"><a href="#cite_note-18">[18]</a></sup></li></ul>
- <p>However, there are also unnamed minor variants (or dialects), possibly formed as a result of inattention, of which some of the more common are:<sup class="noprint Inline-Template Template-Fact" style="white-space:nowrap;">[<i><a href="/wiki/Wikipedia:Citation_needed" title="Wikipedia:Citation needed"><span title="This claim needs references to reliable sources. (June 2014)">citation needed</span></a></i>]</sup>
- </p>
- <ul><li>forbidding, rather than ignoring, any non-command characters in brainfuck programs</li>
- <li>introducing a comment marker which comments out the rest of the line</li>
- <li>various alterations of the loop semantics, sometimes destroying Turing completeness</li>
- <li>requiring a special character to mark the end of the program</li></ul>
- <h2><span class="mw-headline" id="See_also">See also</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=16" title="Edit section: See also">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
- <ul><li><a href="/wiki/JSFuck" title="JSFuck">JSFuck</a> – an esoteric JavaScript programming language with a very limited set of characters</li></ul>
- <h2><span class="mw-headline" id="References">References</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=17" title="Edit section: References">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
- <div class="reflist columns references-column-width" style="-moz-column-width: 30em; -webkit-column-width: 30em; column-width: 30em; list-style-type: decimal;">
- <ol class="references">
- <li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="http://de4.aminet.net/docs/misc/5000.txt">"Aminet hits 5000 files"</a>. Urban Müller. 1993-09-24<span class="reference-accessdate">. Retrieved <span class="nowrap">2015-05-03</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Aminet+hits+5000+files&rft.pub=Urban+M%C3%BCller&rft.date=1993-09-24&rft_id=http%3A%2F%2Fde4.aminet.net%2Fdocs%2Fmisc%2F5000.txt&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><style data-mw-deduplicate="TemplateStyles:r886058088">.mw-parser-output cite.citation{font-style:inherit}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation .cs1-lock-free a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .citation .cs1-lock-limited a,.mw-parser-output .citation .cs1-lock-registration a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .citation .cs1-lock-subscription a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration{color:#555}.mw-parser-output .cs1-subscription span,.mw-parser-output .cs1-registration span{border-bottom:1px dotted;cursor:help}.mw-parser-output .cs1-ws-icon a{background:url("//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Wikisource-logo.svg/12px-Wikisource-logo.svg.png")no-repeat;background-position:right .1em center}.mw-parser-output code.cs1-code{color:inherit;background:inherit;border:inherit;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;font-size:100%}.mw-parser-output .cs1-visible-error{font-size:100%}.mw-parser-output .cs1-maint{display:none;color:#33aa33;margin-left:0.3em}.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration,.mw-parser-output .cs1-format{font-size:95%}.mw-parser-output .cs1-kern-left,.mw-parser-output .cs1-kern-wl-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right,.mw-parser-output .cs1-kern-wl-right{padding-right:0.2em}</style></span>
- </li>
- <li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="http://www.muppetlabs.com/~breadbox/bf/">"The Brainfuck Programming Language"</a>. Muppetlabs.com<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-10-30</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=The+Brainfuck+Programming+Language&rft.pub=Muppetlabs.com&rft_id=http%3A%2F%2Fwww.muppetlabs.com%2F~breadbox%2Fbf%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="http://strlen.com/false/index.html">"Wouter's Wiki : False Language"</a>. Strlen.com. 2013-08-03<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-10-30</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Wouter%27s+Wiki+%3A+False+Language&rft.pub=Strlen.com&rft.date=2013-08-03&rft_id=http%3A%2F%2Fstrlen.com%2Ffalse%2Findex.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-4">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="https://web.archive.org/web/20051106213924/http://www.aminet.net/package.php?package=dev%2Flang%2Fbrainfuck-2.lha">"dev/lang/brainfuck-2.lha"</a>. Aminet. Archived from <a rel="nofollow" class="external text" href="http://www.aminet.net/package.php?package=dev/lang/brainfuck-2.lha">the original</a> on 2005-11-06<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-10-30</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=dev%2Flang%2Fbrainfuck-2.lha&rft.pub=Aminet&rft_id=http%3A%2F%2Fwww.aminet.net%2Fpackage.php%3Fpackage%3Ddev%2Flang%2Fbrainfuck-2.lha&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="https://github.com/peterferrie/brainfuck">"BRAINFCK IN 100 BYTES!"</a>. github.com<span class="reference-accessdate">. Retrieved <span class="nowrap">2016-03-22</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=BRAINFCK+IN+100+BYTES%21&rft.pub=github.com&rft_id=https%3A%2F%2Fgithub.com%2Fpeterferrie%2Fbrainfuck&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-lambek-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-lambek_6-0">^</a></b></span> <span class="reference-text"><cite class="citation web">J. Lambek (1961). <a rel="nofollow" class="external text" href="https://cms.math.ca/10.4153/CMB-1961-032-6">"How to program an infinite abacus"</a>. <i>Canadian Mathematical Bulletin</i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Canadian+Mathematical+Bulletin&rft.atitle=How+to+program+an+infinite+abacus&rft.date=1961&rft.au=J.+Lambek&rft_id=https%3A%2F%2Fcms.math.ca%2F10.4153%2FCMB-1961-032-6&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-melzak-7"><span class="mw-cite-backlink"><b><a href="#cite_ref-melzak_7-0">^</a></b></span> <span class="reference-text"><cite class="citation web">Z. A. Melzak (1961). <a rel="nofollow" class="external text" href="https://cms.math.ca/10.4153/CMB-1961-031-9">"An informal arithmetical approach to computability and computation"</a>. <i>Canadian Mathematical Bulletin</i>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Canadian+Mathematical+Bulletin&rft.atitle=An+informal+arithmetical+approach+to+computability+and+computation&rft.date=1961&rft.au=Z.+A.+Melzak&rft_id=https%3A%2F%2Fcms.math.ca%2F10.4153%2FCMB-1961-031-9&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-8"><span class="mw-cite-backlink"><b><a href="#cite_ref-8">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="http://www.iwriteiam.nl/Ha_bf_Turing.html">"BF is Turing-complete"</a>. Iwriteiam.nl<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-10-30</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=BF+is+Turing-complete&rft.pub=Iwriteiam.nl&rft_id=http%3A%2F%2Fwww.iwriteiam.nl%2FHa_bf_Turing.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-9"><span class="mw-cite-backlink"><b><a href="#cite_ref-9">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="http://esoteric.sange.fi/brainfuck/bf-source/prog/">"Index of /brainfuck/bf-source/prog"</a>. Esoteric.sange.fi. 2002-01-22<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-10-30</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Index+of+%2Fbrainfuck%2Fbf-source%2Fprog&rft.pub=Esoteric.sange.fi&rft.date=2002-01-22&rft_id=http%3A%2F%2Fesoteric.sange.fi%2Fbrainfuck%2Fbf-source%2Fprog%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-10">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="http://www.iwriteiam.nl/Ha_bf_inter.html">"BF interpreter written in BF"</a>. Iwriteiam.nl<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-10-30</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=BF+interpreter+written+in+BF&rft.pub=Iwriteiam.nl&rft_id=http%3A%2F%2Fwww.iwriteiam.nl%2FHa_bf_inter.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-11"><span class="mw-cite-backlink"><b><a href="#cite_ref-11">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="http://www.hevanet.com/cristofd/dbfi.b">"brainfuck interpreter"</a>. Daniel B. Cristofani.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=brainfuck+interpreter&rft.pub=Daniel+B.+Cristofani&rft_id=http%3A%2F%2Fwww.hevanet.com%2Fcristofd%2Fdbfi.b&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-12"><span class="mw-cite-backlink"><b><a href="#cite_ref-12">^</a></b></span> <span class="reference-text"><cite class="citation web">Bolognani, Andrea. <a rel="nofollow" class="external text" href="http://kiyuko.org/software/beef">"Beef –"</a>. Kiyuko.org<span class="reference-accessdate">. Retrieved <span class="nowrap">2013-10-30</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=Beef+%E2%80%93&rft.pub=Kiyuko.org&rft.aulast=Bolognani&rft.aufirst=Andrea&rft_id=http%3A%2F%2Fkiyuko.org%2Fsoftware%2Fbeef&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-13"><span class="mw-cite-backlink"><b><a href="#cite_ref-13">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="https://esolangs.org/wiki/Pi">"Pi - Esolang"</a>. <i>esolangs.org</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2019-03-19</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=esolangs.org&rft.atitle=Pi+-+Esolang&rft_id=https%3A%2F%2Fesolangs.org%2Fwiki%2FPi&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-14">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="https://github.com/TheRaz/DerpPlusPlus">"TheRaz/DerpPlusPlus"</a>. Github.com<span class="reference-accessdate">. Retrieved <span class="nowrap">2015-04-08</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=TheRaz%2FDerpPlusPlus&rft.pub=Github.com&rft_id=https%3A%2F%2Fgithub.com%2FTheRaz%2FDerpPlusPlus&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-15"><span class="mw-cite-backlink"><b><a href="#cite_ref-15">^</a></b></span> <span class="reference-text"><cite class="citation web">Morgan-Mar, David (2009-03-21). <a rel="nofollow" class="external text" href="http://www.dangermouse.net/esoteric/ook.html">"Ook!"</a>. <i>DM's Esoteric Programming Languages</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2014-06-28</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=DM%27s+Esoteric+Programming+Languages&rft.atitle=Ook%21&rft.date=2009-03-21&rft.aulast=Morgan-Mar&rft.aufirst=David&rft_id=http%3A%2F%2Fwww.dangermouse.net%2Fesoteric%2Fook.html&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-Paloque-Bergès2009-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-Paloque-Bergès2009_16-0">^</a></b></span> <span class="reference-text"><cite class="citation book">Paloque-Bergès, Camille (2009). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=HQt00bhlSqsC&pg=PA73"><i>Poétique des codes sur le réseau informatique</i></a> (in French). Paris: <a href="/wiki/%C3%89ditions_des_archives_contemporaines" title="Éditions des archives contemporaines">Éditions des archives contemporaines</a>. p. 73. <a href="/wiki/International_Standard_Book_Number" title="International Standard Book Number">ISBN</a> <a href="/wiki/Special:BookSources/978-2-914610-70-4" title="Special:BookSources/978-2-914610-70-4">978-2-914610-70-4</a>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=book&rft.btitle=Po%C3%A9tique+des+codes+sur+le+r%C3%A9seau+informatique&rft.place=Paris&rft.pages=73&rft.pub=%C3%89ditions+des+archives+contemporaines&rft.date=2009&rft.isbn=978-2-914610-70-4&rft.aulast=Paloque-Berg%C3%A8s&rft.aufirst=Camille&rft_id=https%3A%2F%2Fbooks.google.com%2Fbooks%3Fid%3DHQt00bhlSqsC%26pg%3DPA73&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-17">^</a></b></span> <span class="reference-text"><cite class="citation web"><a rel="nofollow" class="external text" href="https://github.com/zerosum0x0/ternary">"Ternary Programming Language"</a>. <i>Ternary Programming Language</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2015-06-14</span></span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=unknown&rft.jtitle=Ternary+Programming+Language&rft.atitle=Ternary+Programming+Language&rft_id=https%3A%2F%2Fgithub.com%2Fzerosum0x0%2Fternary&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- <li id="cite_note-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-18">^</a></b></span> <span class="reference-text"><cite class="citation web">Hanselmann, Nik. <a rel="nofollow" class="external text" href="http://nik.works/bodyfuck/">"There is no hardware"</a><span class="reference-accessdate">. Retrieved <span class="nowrap">2 February</span> 2016</span>.</cite><span title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=unknown&rft.btitle=There+is+no+hardware.&rft.aulast=Hanselmann&rft.aufirst=Nik&rft_id=http%3A%2F%2Fnik.works%2Fbodyfuck%2F&rfr_id=info%3Asid%2Fen.wikipedia.org%3ABrainfuck" class="Z3988"></span><link rel="mw-deduplicated-inline-style" href="mw-data:TemplateStyles:r886058088"/></span>
- </li>
- </ol></div>
- <h2><span class="mw-headline" id="External_links">External links</span><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Brainfuck&action=edit&section=18" title="Edit section: External links">edit</a><span class="mw-editsection-bracket">]</span></span></h2>
- <ul><li><a rel="nofollow" class="external text" href="https://curlie.org/Computers/Programming/Languages/Brainfuck">Brainfuck</a> at <a href="/wiki/Curlie" class="mw-redirect" title="Curlie">Curlie</a></li>
- <li><a rel="nofollow" class="external text" href="http://www.bf.doleczek.pl/">Brainfuck</a> interpreter on-line in <a href="/wiki/JavaScript" title="JavaScript">JavaScript</a> with collection of programs</li>
- <li><a rel="nofollow" class="external text" href="https://github.com/zk-phi/bfbuilder">Brainfuck IDE</a> - A brainfuck development environment with interactive debugger</li>
- <li><a rel="nofollow" class="external text" href="http://tunn.us/bf/generator.php">Brainfuck generator</a> - A text to brainfuck generator</li>
- <li><a rel="nofollow" class="external text" href="https://github.com/pablojorge/brainfuck">Brainfuck collection</a> of Interpreters and scripts</li>
- <li><a rel="nofollow" class="external text" href="https://www.vanheusden.com/misc/blog/2016-05-19_brainfuck_cobol_compiler.php">Brainfuck</a> to COBOL, C, ASM, PL/1, ... compiler</li></ul>
- <!--
- NewPP limit report
- Parsed by mw1346
- Cached time: 20190413083301
- Cache expiry: 2592000
- Dynamic content: false
- CPU time usage: 0.336 seconds
- Real time usage: 0.442 seconds
- Preprocessor visited node count: 1518/1000000
- Preprocessor generated node count: 0/1500000
- Post‐expand include size: 30624/2097152 bytes
- Template argument size: 1790/2097152 bytes
- Highest expansion depth: 11/40
- Expensive parser function count: 3/500
- Unstrip recursion depth: 1/20
- Unstrip post‐expand size: 68736/5000000 bytes
- Number of Wikibase entities loaded: 1/400
- Lua time usage: 0.156/10.000 seconds
- Lua memory usage: 4 MB/50 MB
- -->
- <!--
- Transclusion expansion time report (%,ms,calls,template)
- 100.00% 342.488 1 -total
- 47.71% 163.386 1 Template:Reflist
- 37.45% 128.247 17 Template:Cite_web
- 16.60% 56.859 2 Template:Citation_needed
- 15.87% 54.368 1 Template:Infobox_programming_language
- 14.50% 49.653 2 Template:Fix
- 13.65% 46.748 1 Template:Infobox
- 10.56% 36.164 1 Template:Distinguish
- 8.37% 28.679 4 Template:Category_handler
- 4.97% 17.027 2 Template:Delink
- -->
- <!-- Saved in parser cache with key enwiki:pcache:idhash:4086-0!canonical!math=5 and timestamp 20190413083355 and revision id 892262183
- -->
- </div><noscript><img src="//en.wikipedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" title="" width="1" height="1" style="border: none; position: absolute;" /></noscript></div>
- <div class="printfooter">Retrieved from "<a dir="ltr" href="https://en.wikipedia.org/w/index.php?title=Brainfuck&oldid=892262183">https://en.wikipedia.org/w/index.php?title=Brainfuck&oldid=892262183</a>"</div>
- <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Help:Category" title="Help:Category">Categories</a>: <ul><li><a href="/wiki/Category:Non-English-based_programming_languages" title="Category:Non-English-based programming languages">Non-English-based programming languages</a></li><li><a href="/wiki/Category:Esoteric_programming_languages" title="Category:Esoteric programming languages">Esoteric programming languages</a></li><li><a href="/wiki/Category:Programming_languages_created_in_1993" title="Category:Programming languages created in 1993">Programming languages created in 1993</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">Hidden categories: <ul><li><a href="/wiki/Category:CS1_French-language_sources_(fr)" title="Category:CS1 French-language sources (fr)">CS1 French-language sources (fr)</a></li><li><a href="/wiki/Category:Articles_with_example_C_code" title="Category:Articles with example C code">Articles with example C code</a></li><li><a href="/wiki/Category:All_articles_with_unsourced_statements" title="Category:All articles with unsourced statements">All articles with unsourced statements</a></li><li><a href="/wiki/Category:Articles_with_unsourced_statements_from_June_2014" title="Category:Articles with unsourced statements from June 2014">Articles with unsourced statements from June 2014</a></li><li><a href="/wiki/Category:Articles_with_Curlie_links" title="Category:Articles with Curlie links">Articles with Curlie links</a></li></ul></div></div>
- <div class="visualClear"></div>
- </div>
- </div>
- <div id="mw-navigation">
- <h2>Navigation menu</h2>
- <div id="mw-head">
- <div id="p-personal" role="navigation" aria-labelledby="p-personal-label">
- <h3 id="p-personal-label">Personal tools</h3>
- <ul>
- <li id="pt-anonuserpage">Not logged in</li><li id="pt-anontalk"><a href="/wiki/Special:MyTalk" title="Discussion about edits from this IP address [n]" accesskey="n">Talk</a></li><li id="pt-anoncontribs"><a href="/wiki/Special:MyContributions" title="A list of edits made from this IP address [y]" accesskey="y">Contributions</a></li><li id="pt-createaccount"><a href="/w/index.php?title=Special:CreateAccount&returnto=Brainfuck" title="You are encouraged to create an account and log in; however, it is not mandatory">Create account</a></li><li id="pt-login"><a href="/w/index.php?title=Special:UserLogin&returnto=Brainfuck" title="You're encouraged to log in; however, it's not mandatory. [o]" accesskey="o">Log in</a></li> </ul>
- </div>
- <div id="left-navigation">
- <div id="p-namespaces" role="navigation" class="vectorTabs" aria-labelledby="p-namespaces-label">
- <h3 id="p-namespaces-label">Namespaces</h3>
- <ul>
- <li id="ca-nstab-main" class="selected"><span><a href="/wiki/Brainfuck" title="View the content page [c]" accesskey="c">Article</a></span></li><li id="ca-talk"><span><a href="/wiki/Talk:Brainfuck" rel="discussion" title="Discussion about the content page [t]" accesskey="t">Talk</a></span></li> </ul>
- </div>
- <div id="p-variants" role="navigation" class="vectorMenu emptyPortlet" aria-labelledby="p-variants-label">
- <input type="checkbox" class="vectorMenuCheckbox" aria-labelledby="p-variants-label" />
- <h3 id="p-variants-label">
- <span>Variants</span>
- </h3>
- <ul class="menu">
- </ul>
- </div>
- </div>
- <div id="right-navigation">
- <div id="p-views" role="navigation" class="vectorTabs" aria-labelledby="p-views-label">
- <h3 id="p-views-label">Views</h3>
- <ul>
- <li id="ca-view" class="collapsible selected"><span><a href="/wiki/Brainfuck">Read</a></span></li><li id="ca-edit" class="collapsible"><span><a href="/w/index.php?title=Brainfuck&action=edit" title="Edit this page [e]" accesskey="e">Edit</a></span></li><li id="ca-history" class="collapsible"><span><a href="/w/index.php?title=Brainfuck&action=history" title="Past revisions of this page [h]" accesskey="h">View history</a></span></li> </ul>
- </div>
- <div id="p-cactions" role="navigation" class="vectorMenu emptyPortlet" aria-labelledby="p-cactions-label">
- <input type="checkbox" class="vectorMenuCheckbox" aria-labelledby="p-cactions-label" />
- <h3 id="p-cactions-label"><span>More</span></h3>
- <ul class="menu">
- </ul>
- </div>
- <div id="p-search" role="search">
- <h3>
- <label for="searchInput">Search</label>
- </h3>
- <form action="/w/index.php" id="searchform">
- <div id="simpleSearch">
- <input type="search" name="search" placeholder="Search Wikipedia" title="Search Wikipedia [f]" accesskey="f" id="searchInput"/><input type="hidden" value="Special:Search" name="title"/><input type="submit" name="fulltext" value="Search" title="Search Wikipedia for this text" id="mw-searchButton" class="searchButton mw-fallbackSearchButton"/><input type="submit" name="go" value="Go" title="Go to a page with this exact name if it exists" id="searchButton" class="searchButton"/> </div>
- </form>
- </div>
- </div>
- </div>
- <div id="mw-panel">
- <div id="p-logo" role="banner"><a class="mw-wiki-logo" href="/wiki/Main_Page" title="Visit the main page"></a></div>
- <div class="portal" role="navigation" id="p-navigation" aria-labelledby="p-navigation-label">
- <h3 id="p-navigation-label">Navigation</h3>
- <div class="body">
- <ul>
- <li id="n-mainpage-description"><a href="/wiki/Main_Page" title="Visit the main page [z]" accesskey="z">Main page</a></li><li id="n-contents"><a href="/wiki/Portal:Contents" title="Guides to browsing Wikipedia">Contents</a></li><li id="n-featuredcontent"><a href="/wiki/Portal:Featured_content" title="Featured content – the best of Wikipedia">Featured content</a></li><li id="n-currentevents"><a href="/wiki/Portal:Current_events" title="Find background information on current events">Current events</a></li><li id="n-randompage"><a href="/wiki/Special:Random" title="Load a random article [x]" accesskey="x">Random article</a></li><li id="n-sitesupport"><a href="https://donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&utm_medium=sidebar&utm_campaign=C13_en.wikipedia.org&uselang=en" title="Support us">Donate to Wikipedia</a></li><li id="n-shoplink"><a href="//shop.wikimedia.org" title="Visit the Wikipedia store">Wikipedia store</a></li> </ul>
- </div>
- </div>
- <div class="portal" role="navigation" id="p-interaction" aria-labelledby="p-interaction-label">
- <h3 id="p-interaction-label">Interaction</h3>
- <div class="body">
- <ul>
- <li id="n-help"><a href="/wiki/Help:Contents" title="Guidance on how to use and edit Wikipedia">Help</a></li><li id="n-aboutsite"><a href="/wiki/Wikipedia:About" title="Find out about Wikipedia">About Wikipedia</a></li><li id="n-portal"><a href="/wiki/Wikipedia:Community_portal" title="About the project, what you can do, where to find things">Community portal</a></li><li id="n-recentchanges"><a href="/wiki/Special:RecentChanges" title="A list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li><li id="n-contactpage"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us" title="How to contact Wikipedia">Contact page</a></li> </ul>
- </div>
- </div>
- <div class="portal" role="navigation" id="p-tb" aria-labelledby="p-tb-label">
- <h3 id="p-tb-label">Tools</h3>
- <div class="body">
- <ul>
- <li id="t-whatlinkshere"><a href="/wiki/Special:WhatLinksHere/Brainfuck" title="List of all English Wikipedia pages containing links to this page [j]" accesskey="j">What links here</a></li><li id="t-recentchangeslinked"><a href="/wiki/Special:RecentChangesLinked/Brainfuck" rel="nofollow" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li><li id="t-upload"><a href="/wiki/Wikipedia:File_Upload_Wizard" title="Upload files [u]" accesskey="u">Upload file</a></li><li id="t-specialpages"><a href="/wiki/Special:SpecialPages" title="A list of all special pages [q]" accesskey="q">Special pages</a></li><li id="t-permalink"><a href="/w/index.php?title=Brainfuck&oldid=892262183" title="Permanent link to this revision of the page">Permanent link</a></li><li id="t-info"><a href="/w/index.php?title=Brainfuck&action=info" title="More information about this page">Page information</a></li><li id="t-wikibase"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q244627" title="Link to connected data repository item [g]" accesskey="g">Wikidata item</a></li><li id="t-cite"><a href="/w/index.php?title=Special:CiteThisPage&page=Brainfuck&id=892262183" title="Information on how to cite this page">Cite this page</a></li> </ul>
- </div>
- </div>
- <div class="portal" role="navigation" id="p-coll-print_export" aria-labelledby="p-coll-print_export-label">
- <h3 id="p-coll-print_export-label">Print/export</h3>
- <div class="body">
- <ul>
- <li id="coll-create_a_book"><a href="/w/index.php?title=Special:Book&bookcmd=book_creator&referer=Brainfuck">Create a book</a></li><li id="coll-download-as-rdf2latex"><a href="/w/index.php?title=Special:ElectronPdf&page=Brainfuck&action=show-download-screen">Download as PDF</a></li><li id="t-print"><a href="/w/index.php?title=Brainfuck&printable=yes" title="Printable version of this page [p]" accesskey="p">Printable version</a></li> </ul>
- </div>
- </div>
- <div class="portal" role="navigation" id="p-lang" aria-labelledby="p-lang-label">
- <h3 id="p-lang-label">Languages</h3>
- <div class="body">
- <ul>
- <li class="interlanguage-link interwiki-ast"><a href="https://ast.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Asturian" lang="ast" hreflang="ast" class="interlanguage-link-target">Asturianu</a></li><li class="interlanguage-link interwiki-ca"><a href="https://ca.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Catalan" lang="ca" hreflang="ca" class="interlanguage-link-target">Català</a></li><li class="interlanguage-link interwiki-cs"><a href="https://cs.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Czech" lang="cs" hreflang="cs" class="interlanguage-link-target">Čeština</a></li><li class="interlanguage-link interwiki-da"><a href="https://da.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Danish" lang="da" hreflang="da" class="interlanguage-link-target">Dansk</a></li><li class="interlanguage-link interwiki-de"><a href="https://de.wikipedia.org/wiki/Brainfuck" title="Brainfuck – German" lang="de" hreflang="de" class="interlanguage-link-target">Deutsch</a></li><li class="interlanguage-link interwiki-et"><a href="https://et.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Estonian" lang="et" hreflang="et" class="interlanguage-link-target">Eesti</a></li><li class="interlanguage-link interwiki-es"><a href="https://es.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Spanish" lang="es" hreflang="es" class="interlanguage-link-target">Español</a></li><li class="interlanguage-link interwiki-eo"><a href="https://eo.wikipedia.org/wiki/Brainfuck_(programlingvo)" title="Brainfuck (programlingvo) – Esperanto" lang="eo" hreflang="eo" class="interlanguage-link-target">Esperanto</a></li><li class="interlanguage-link interwiki-eu"><a href="https://eu.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Basque" lang="eu" hreflang="eu" class="interlanguage-link-target">Euskara</a></li><li class="interlanguage-link interwiki-fa"><a href="https://fa.wikipedia.org/wiki/%D8%A8%D8%B1%DB%8C%D9%86%E2%80%8C%D9%81%D8%A7%DA%A9" title="برینفاک – Persian" lang="fa" hreflang="fa" class="interlanguage-link-target">فارسی</a></li><li class="interlanguage-link interwiki-fr"><a href="https://fr.wikipedia.org/wiki/Brainfuck" title="Brainfuck – French" lang="fr" hreflang="fr" class="interlanguage-link-target">Français</a></li><li class="interlanguage-link interwiki-ko"><a href="https://ko.wikipedia.org/wiki/%EB%B8%8C%EB%A0%88%EC%9D%B8%ED%8D%BD" title="브레인퍽 – Korean" lang="ko" hreflang="ko" class="interlanguage-link-target">한국어</a></li><li class="interlanguage-link interwiki-id"><a href="https://id.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Indonesian" lang="id" hreflang="id" class="interlanguage-link-target">Bahasa Indonesia</a></li><li class="interlanguage-link interwiki-is"><a href="https://is.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Icelandic" lang="is" hreflang="is" class="interlanguage-link-target">Íslenska</a></li><li class="interlanguage-link interwiki-it"><a href="https://it.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Italian" lang="it" hreflang="it" class="interlanguage-link-target">Italiano</a></li><li class="interlanguage-link interwiki-he"><a href="https://he.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Hebrew" lang="he" hreflang="he" class="interlanguage-link-target">עברית</a></li><li class="interlanguage-link interwiki-hu"><a href="https://hu.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Hungarian" lang="hu" hreflang="hu" class="interlanguage-link-target">Magyar</a></li><li class="interlanguage-link interwiki-ms"><a href="https://ms.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Malay" lang="ms" hreflang="ms" class="interlanguage-link-target">Bahasa Melayu</a></li><li class="interlanguage-link interwiki-nl"><a href="https://nl.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Dutch" lang="nl" hreflang="nl" class="interlanguage-link-target">Nederlands</a></li><li class="interlanguage-link interwiki-ja"><a href="https://ja.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Japanese" lang="ja" hreflang="ja" class="interlanguage-link-target">日本語</a></li><li class="interlanguage-link interwiki-no"><a href="https://no.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Norwegian" lang="no" hreflang="no" class="interlanguage-link-target">Norsk</a></li><li class="interlanguage-link interwiki-pa"><a href="https://pa.wikipedia.org/wiki/%E0%A8%AC%E0%A9%8D%E0%A8%B0%E0%A9%87%E0%A8%A8%E0%A8%AB%E0%A8%BC%E0%A9%B1%E0%A8%95" title="ਬ੍ਰੇਨਫ਼ੱਕ – Punjabi" lang="pa" hreflang="pa" class="interlanguage-link-target">ਪੰਜਾਬੀ</a></li><li class="interlanguage-link interwiki-pl"><a href="https://pl.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Polish" lang="pl" hreflang="pl" class="interlanguage-link-target">Polski</a></li><li class="interlanguage-link interwiki-pt"><a href="https://pt.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Portuguese" lang="pt" hreflang="pt" class="interlanguage-link-target">Português</a></li><li class="interlanguage-link interwiki-ro"><a href="https://ro.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Romanian" lang="ro" hreflang="ro" class="interlanguage-link-target">Română</a></li><li class="interlanguage-link interwiki-ru"><a href="https://ru.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Russian" lang="ru" hreflang="ru" class="interlanguage-link-target">Русский</a></li><li class="interlanguage-link interwiki-sk"><a href="https://sk.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Slovak" lang="sk" hreflang="sk" class="interlanguage-link-target">Slovenčina</a></li><li class="interlanguage-link interwiki-sl"><a href="https://sl.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Slovenian" lang="sl" hreflang="sl" class="interlanguage-link-target">Slovenščina</a></li><li class="interlanguage-link interwiki-sr"><a href="https://sr.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Serbian" lang="sr" hreflang="sr" class="interlanguage-link-target">Српски / srpski</a></li><li class="interlanguage-link interwiki-fi"><a href="https://fi.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Finnish" lang="fi" hreflang="fi" class="interlanguage-link-target">Suomi</a></li><li class="interlanguage-link interwiki-sv"><a href="https://sv.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Swedish" lang="sv" hreflang="sv" class="interlanguage-link-target">Svenska</a></li><li class="interlanguage-link interwiki-th"><a href="https://th.wikipedia.org/wiki/%E0%B8%A0%E0%B8%B2%E0%B8%A9%E0%B8%B2%E0%B9%80%E0%B8%9A%E0%B8%A3%E0%B8%99%E0%B8%9F%E0%B8%B1%E0%B8%81" title="ภาษาเบรนฟัก – Thai" lang="th" hreflang="th" class="interlanguage-link-target">ไทย</a></li><li class="interlanguage-link interwiki-tg"><a href="https://tg.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Tajik" lang="tg" hreflang="tg" class="interlanguage-link-target">Тоҷикӣ</a></li><li class="interlanguage-link interwiki-tr"><a href="https://tr.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Turkish" lang="tr" hreflang="tr" class="interlanguage-link-target">Türkçe</a></li><li class="interlanguage-link interwiki-uk"><a href="https://uk.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Ukrainian" lang="uk" hreflang="uk" class="interlanguage-link-target">Українська</a></li><li class="interlanguage-link interwiki-vi"><a href="https://vi.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Vietnamese" lang="vi" hreflang="vi" class="interlanguage-link-target">Tiếng Việt</a></li><li class="interlanguage-link interwiki-zh"><a href="https://zh.wikipedia.org/wiki/Brainfuck" title="Brainfuck – Chinese" lang="zh" hreflang="zh" class="interlanguage-link-target">中文</a></li> </ul>
- <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q244627#sitelinks-wikipedia" title="Edit interlanguage links" class="wbc-editpage">Edit links</a></span></div> </div>
- </div>
- </div>
- </div>
- <div id="footer" role="contentinfo">
- <ul id="footer-info">
- <li id="footer-info-lastmod"> This page was last edited on 13 April 2019, at 08:33<span class="anonymous-show"> (UTC)</span>.</li>
- <li id="footer-info-copyright">Text is available under the <a rel="license" href="//en.wikipedia.org/wiki/Wikipedia:Text_of_Creative_Commons_Attribution-ShareAlike_3.0_Unported_License">Creative Commons Attribution-ShareAlike License</a><a rel="license" href="//creativecommons.org/licenses/by-sa/3.0/" style="display:none;"></a>;
- additional terms may apply. By using this site, you agree to the <a href="//foundation.wikimedia.org/wiki/Terms_of_Use">Terms of Use</a> and <a href="//foundation.wikimedia.org/wiki/Privacy_policy">Privacy Policy</a>. Wikipedia® is a registered trademark of the <a href="//www.wikimediafoundation.org/">Wikimedia Foundation, Inc.</a>, a non-profit organization.</li>
- </ul>
- <ul id="footer-places">
- <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Privacy_policy" class="extiw" title="wmf:Privacy policy">Privacy policy</a></li>
- <li id="footer-places-about"><a href="/wiki/Wikipedia:About" title="Wikipedia:About">About Wikipedia</a></li>
- <li id="footer-places-disclaimer"><a href="/wiki/Wikipedia:General_disclaimer" title="Wikipedia:General disclaimer">Disclaimers</a></li>
- <li id="footer-places-contact"><a href="//en.wikipedia.org/wiki/Wikipedia:Contact_us">Contact Wikipedia</a></li>
- <li id="footer-places-developers"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute">Developers</a></li>
- <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Cookie_statement">Cookie statement</a></li>
- <li id="footer-places-mobileview"><a href="//en.m.wikipedia.org/w/index.php?title=Brainfuck&mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">Mobile view</a></li>
- </ul>
- <ul id="footer-icons" class="noprint">
- <li id="footer-copyrightico">
- <a href="https://wikimediafoundation.org/"><img src="/static/images/wikimedia-button.png" srcset="/static/images/wikimedia-button-1.5x.png 1.5x, /static/images/wikimedia-button-2x.png 2x" width="88" height="31" alt="Wikimedia Foundation"/></a> </li>
- <li id="footer-poweredbyico">
- <a href="//www.mediawiki.org/"><img src="/static/images/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" srcset="/static/images/poweredby_mediawiki_132x47.png 1.5x, /static/images/poweredby_mediawiki_176x62.png 2x" width="88" height="31"/></a> </li>
- </ul>
- <div style="clear: both;"></div>
- </div>
- <script>(window.RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgPageParseReport":{"limitreport":{"cputime":"0.336","walltime":"0.442","ppvisitednodes":{"value":1518,"limit":1000000},"ppgeneratednodes":{"value":0,"limit":1500000},"postexpandincludesize":{"value":30624,"limit":2097152},"templateargumentsize":{"value":1790,"limit":2097152},"expansiondepth":{"value":11,"limit":40},"expensivefunctioncount":{"value":3,"limit":500},"unstrip-depth":{"value":1,"limit":20},"unstrip-size":{"value":68736,"limit":5000000},"entityaccesscount":{"value":1,"limit":400},"timingprofile":["100.00% 342.488 1 -total"," 47.71% 163.386 1 Template:Reflist"," 37.45% 128.247 17 Template:Cite_web"," 16.60% 56.859 2 Template:Citation_needed"," 15.87% 54.368 1 Template:Infobox_programming_language"," 14.50% 49.653 2 Template:Fix"," 13.65% 46.748 1 Template:Infobox"," 10.56% 36.164 1 Template:Distinguish"," 8.37% 28.679 4 Template:Category_handler"," 4.97% 17.027 2 Template:Delink"]},"scribunto":{"limitreport-timeusage":{"value":"0.156","limit":"10.000"},"limitreport-memusage":{"value":4190581,"limit":52428800}},"cachereport":{"origin":"mw1346","timestamp":"20190413083301","ttl":2592000,"transientcontent":false}}});mw.config.set({"wgBackendResponseTime":102,"wgHostname":"mw1271"});});</script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement