100+ results for 'brainfuck'
Not the results you expected?
brainfuck_spec.rb (https://github.com/seandmccarthy/rbfk.git) Ruby · 127 lines
1 require File.expand_path(File.join('..', '..', 'lib', 'brain_fuck'), __FILE__)
3 describe BrainFuck do
4 describe "The Brain Fuck instruction set" do
5 before :each do
6 @bf = BrainFuck.new(StringIO.new(''))
7 end
31 it "should read a char into the current memory location" do
32 bf = BrainFuck.new(StringIO.new(''), input_stream: StringIO.new('A'))
33 bf.execute(',')
34 expect(bf.memory[0]).to eq 65
README.md (https://github.com/eevee/project-euler.git) Markdown · 110 lines
css.bf (https://github.com/FabianM/brainfuck.git) Brainfuck · 210 lines
2 hyphens in this introduction)
4 This is an implementation of CSS decryption in the Brainfuck
5 programming language
16 one iteration
18 CSS is the encryption used on DVDs and Brainfuck is a Turing
19 complete programming language which actually resembles a
20 Turing machine to no small degree: in particular it uses a
brainfuck.h (https://github.com/FabianM/brainfuck.git) C Header · 303 lines
144 * @return The instruction that is removed.
145 */
146 BrainfuckInstruction * brainfuck_remove(struct BrainfuckState *, struct BrainfuckInstruction *);
148 /**
153 * @return The instruction that is given.
154 */
155 BrainfuckInstruction * brainfuck_add(struct BrainfuckState *state, struct BrainfuckInstruction *);
157 /**
162 * @return The instruction that is given.
163 */
164 BrainfuckInstruction * brainfuck_add_first(struct BrainfuckState *state, struct BrainfuckInstruction *);
166 /**
183 * @return The instruction that is given.
184 */
185 BrainfuckInstruction * brainfuck_insert_after(struct BrainfuckState *, struct BrainfuckInstruction *,
186 struct BrainfuckInstruction *);
brainfuck.rb (https://github.com/vybirjan/MI-RUB-ukoly.git) Ruby · 149 lines
1 require_relative '../lib/brainfuck_ast.rb'
2 require_relative '../lib/brainfuck_interpreter.rb'
3 require_relative '../lib/brainfuck_parser.rb'
4 require_relative '../lib/bf_c_translator.rb'
6 def print_help
7 puts "Brainfuck interpreter, arguments:"
8 puts " -help - prints this help"
9 puts " -i - start in interactive mode"
10 puts " <input file> - parse brainfuck code from input file"
11 puts " <input file> -to_c - optional argument, parses brainfuck code from file, converts"
brainfuck.html.markdown (https://gitlab.com/perlilja/learnxinyminutes-docs) Markdown · 81 lines
beef.html (https://gitlab.com/chch/manpages) HTML · 71 lines
1 <html>
2 <head><meta charset=utf-8/>
3 <title>beef - flexible Brainfuck interpreter</title></head>
4 <body><pre>
10 NAME
11 beef - flexible Brainfuck interpreter
18 DESCRIPTION
19 beef is a Brainfuck interpreter written in C. It is written with flexi‐
20 bility and portability in mind: it is not the smallest nor the fastest
21 Brainfuck interpreter on Earth, but it has some options to control his
brainfuck_parser.rb (https://github.com/vybirjan/MI-RUB-ukoly.git) Ruby · 123 lines
1 require_relative 'brainfuck_ast.rb'
3 INC_POINTER = '>'
11 NEW_LINE = "\n"
13 class BrainfuckParseError < RuntimeError
15 attr_reader :line
23 end
25 class BrainfuckParser
27 def initialize
70 if(!@loop_starts.empty?)
71 start = @loop_starts.pop
72 raise BrainfuckParseError.new("Unexpected end of file - unclosed loop found", start.line, start.column)
73 end
test_spec.rb (https://github.com/loicfrering/travis-build.git) Ruby · 207 lines
hudvark.sh (https://github.com/jimmyskull/Hudvark.git) Shell · 171 lines
challenge_text.md (https://gitlab.com/kbrgl/DailyProgrammerChallenges) Markdown · 65 lines
57 We often see people solving these problems in weird languages here at /r/dailyprogrammer, and this bonus is for all you crazy people:
59 Solve this problem in [brainfuck](http://en.wikipedia.org/wiki/Brainfuck). You don't have to read the values from input, you can "hard-code" the colors and dimensions in your program. You can pick whatever colors and dimensions you like, as long as both the width and the height is larger than 100 pixels. You can also output the image in whatever format you want (I imagine that one of the binary Netpbm formats will be the easiest). Good luck!
61 #Finally
index.js (https://github.com/pythonzhichan/django-beginners-guide.git) JavaScript · 154 lines
17 hljs.registerLanguage('bash', require('./languages/bash'));
18 hljs.registerLanguage('basic', require('./languages/basic'));
19 hljs.registerLanguage('brainfuck', require('./languages/brainfuck'));
20 hljs.registerLanguage('cal', require('./languages/cal'));
21 hljs.registerLanguage('capnproto', require('./languages/capnproto'));
cond_test.py (https://bitbucket.org/lifthrasiir/esotope-bfc) Python · 205 lines
brainfuckSpec.js (https://gitlab.com/bxt/brainfuck-debugger) JavaScript · 413 lines
by-clive-gifford.bf (https://github.com/cagataycali/awesome-brainfuck.git) Brainfuck · 399 lines
1 Brainfuck Self Interpreter: by Clive Gifford
3 Version 1: 01 December 2006 (one trip between code and data per op)
28 Other info:
30 The input must consist of valid brainfuck code (to be interpreted) which
31 must always be followed by an exclamation mark and then any associated data
32 Input can also include "comments" (if desired) except for exclamation mark
36 then we finally have the input for the very top level to finish things off
38 The underlying brainfuck machine determines the possible range of values in
39 the data cell values and what happens if an attempt is made to go outside the
40 supported range but this interpreter does not more than 8 bit data itself
bfinterpreter.py (https://github.com/TinnedTuna/gbf.git) Python · 159 lines
4 import tape
5 """
6 Brainfuck interpreter
8 Uses a bre-built map of where to jump as an optimization. Code must be
34 def preprocess_program(self, input_code=None):
35 """
36 Preprocess the brainfuck
38 Remove comments, split each individual instruction into the
54 for inst, command in enumerate(input_program):
55 if command in (">","<","+","-",".",",","#",):
56 # Ignore all normal brainfuck characters.
57 pass
58 elif (command=="["):
Test.hx (git://github.com/andyli/hxBF.git) Haxe · 146 lines
1 import hxBF.BrainFuck;
3 import haxe.io.BytesOutput;
6 /*
7 Tests are from http://www.lordalcol.com/brainfuckjs/
8 */
9 class Test extends haxe.unit.TestCase{
30 var out = new BytesOutput();
31 var bf = new BrainFuck(p, out).run();
32 this.assertEquals("Hello World!\n", out.getBytes().toString());
33 }
38 var out = new BytesOutput();
39 var bf = new BrainFuck(p, new StringInput("3+2"), out).run();
40 this.assertEquals("5", out.getBytes().toString());
41 }
mk.js (https://github.com/OmerGimenez/pfc-pj.git) JavaScript · 67 lines
reify_brainf_ck.scala (https://github.com/pedrofurla/scala.git) Scala · 85 lines
credits.html (https://bitbucket.org/luksak/editarea.git) HTML · 76 lines
output.bf (https://gitlab.com/8wiw/text2brainfuck) Brainfuck · 81 lines
respect-CFLAGS-LDFLAGS.patch (https://github.com/1000timesdead/portage.git) Patch · 102 lines
__init__.py (https://gitlab.com/technomancer7/aos) Python · 83 lines
mk.js (https://gitlab.com/iv-cms/iv-cms-5) JavaScript · 60 lines
RingedCache.class.php (https://github.com/suquant/soloweb-onphp.git) PHP · 308 lines
bfasm.asm (https://bitbucket.org/joanbrugueram/8085emujs.git) Assembly · 181 lines
1 ; Brainfuck JIT compiler (not an optimizing one)
2 ; Sample program requires text view
40 jmp jit_dst
42 ; BRAINFUCK ASSEMBLER FUNCTION
43 ; Inputs:
44 ; - DE: [Input] Pointer into Brainfuck source code (terminated by zero)
47 ; The assembled program code requires two parameters before being executed:
48 ; - DE: Pointer to text output memory
49 ; - HL: Pointer to Brainfuck memory
50 bfasm:
51 ; Dispatch assembler handler from brainfuck character
config.py (https://github.com/ProgVal/Supybot-plugins.git) Python · 52 lines
33 from supybot.i18n import PluginInternationalization, internationalizeDocstring
35 _ = PluginInternationalization('Brainfuck')
37 def configure(advanced):
41 # registry as appropriate.
42 from supybot.questions import expect, anything, something, yn
43 conf.registerPlugin('Brainfuck', True)
46 Brainfuck = conf.registerPlugin('Brainfuck')
47 # This is where your configuration variables (if any) should go. For example:
48 # conf.registerGlobalValue(Brainfuck, 'someConfigVariableName',
Brainfuck.hs (https://gitlab.com/PoroCYon/robcyon-v3) Haskell · 86 lines
BrainfuckTokenManager.java (https://gitlab.com/bog/qbic) Java · 307 lines
1 /* Generated By:JJTree&JavaCC: Do not edit this line. BrainfuckTokenManager.java */
2 package com.bog.model.ast;
4 /** Token Manager. */
5 public class BrainfuckTokenManager implements BrainfuckConstants
6 {
145 protected char curChar;
146 /** Constructor. */
147 public BrainfuckTokenManager(SimpleCharStream stream){
148 if (SimpleCharStream.staticFlag)
149 throw new Error("ERROR: Cannot use a static CharStream class with a non-static lexical analyzer.");
153 /** Constructor. */
154 public BrainfuckTokenManager(SimpleCharStream stream, int lexState){
155 this(stream);
156 SwitchTo(lexState);
PyFuck.py (https://github.com/FDeSousa/PyTerpreter.git) Python · 192 lines
2012-07-09-A-plea-for-less-XML-configuration-files.markdown (https://github.com/nikic/nikic.github.com.git) Markdown · 86 lines
text2bf.py (https://gitlab.com/8wiw/text2brainfuck) Python · 214 lines
brainfuck_ast.rb (https://github.com/vybirjan/MI-RUB-ukoly.git) Ruby · 243 lines
css-classes-reference.rst (https://github.com/themr0c/themr0ctalks.git) ReStructuredText · 464 lines
brainfuck.coffee (https://github.com/1337/brainfuck.js.git) CoffeeScript · 141 lines
58 when "["
59 # while condition intercepted by code termination in ']'
60 index += (new BrainFuck(@code.substring(index + 1))).run()
61 when "]"
62 if stack[pointer] is 0
107 while js.length > 0
108 brainfuck_buffer += moveChar(charAt, js[0])
109 charAt = js[0]
110 js = js.substring(1)
115 BrainFuck.to_js = (bf) ->
116 # run bf as js.
117 runtime = new BrainFuck(bf)
140 # lazy
141 window.BrainFuck = BrainFuck
gonzui-1.2-r2-gentoo.patch (https://github.com/1000timesdead/portage.git) Patch · 238 lines
Memory.cs (https://gitlab.com/wipiano/BrainfuckNancy) C# · 141 lines
brainfuck_example.bf (https://gitlab.com/8wiw/text2brainfuck) Brainfuck · 706 lines
Brainfuck.hs (git://github.com/rickardlindberg/brainfuck.git) Haskell · 137 lines
tests.bf (https://github.com/FabianM/brainfuck.git) Brainfuck · 68 lines
r-fxxk_spec.rb (https://github.com/masarakki/r-fxxk.git) Ruby · 68 lines
1 require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
3 class Ook < Brainfuck
4 nxt 'Ook. Ook?'
5 prv 'Ook? Ook.'
16 end
18 describe Brainfuck do
19 context 'default Brainfuck' do
20 subject { Brainfuck.new }
21 its(:nxt) { should eq '>' }
22 its(:prv) { should eq '<' }
34 context 'customize in initialize' do
35 subject { Brainfuck.new(nxt: 'M', prv: 'O', inc: 'N', dec: 'A', get: 'm', put: 'o', opn: 'n', cls: 'a') }
36 its(:nxt) { should eq 'M' }
37 its(:prv) { should eq 'O' }
pygments.html (https://github.com/fluxsaas/fluxsaas.github.com.git) HTML · 122 lines
addToDatabase.sh (https://github.com/simon-weber/Programming-Language-Identification.git) Shell · 152 lines
rpn.bf (https://github.com/FabianM/brainfuck.git) Brainfuck · 156 lines
6 Hello everybody,
8 I discovered brainfuck about a year ago, and in my first period of
9 interest I wrote a calculator program with addition, subtraction,
10 multiplication and division. It uses the reverse polish notation, so it
25 So now I am looking for a new project. Some ideas I have had are:
26 write an interpreter for another language in brainfuck, implement the
27 encryption algorithm RC4, or perhaps a library of sorts, with various
28 useful algorithms and data structures. If anybody has any ideas, things
AssemblyInfo.cs (https://gitlab.com/hakopi/BrainfuckNancy) C# · 38 lines
6 // アセンブリに関連付けられている情報を変更するには、
7 // これらの属性値を変更してください。
8 [assembly: AssemblyTitle("BrainfuckCore")]
9 [assembly: AssemblyDescription("")]
10 [assembly: AssemblyConfiguration("")]
11 [assembly: AssemblyCompany("")]
12 [assembly: AssemblyProduct("BrainfuckCore")]
13 [assembly: AssemblyCopyright("Copyright © 2016")]
14 [assembly: AssemblyTrademark("")]
36 [assembly: AssemblyFileVersion("1.0.0.0")]
38 [assembly:InternalsVisibleTo("BrainfuckCoreTest")]
setup.py (https://github.com/openhatch/oh-mainline.git) Python · 90 lines
__init__.py (https://gitlab.com/somiyagawa/ANNIS) Python · 92 lines
gentoo.patch (https://github.com/dlazzari/openembedded.git) Patch · 105 lines
bf_c_translator.rb (https://github.com/vybirjan/MI-RUB-ukoly.git) Ruby · 53 lines
bf2clj.clj (https://github.com/takano32/brainfuck.git) Clojure · 58 lines
Brainfuck.hs (https://github.com/RaphaelJ/Haskell.git) Haskell · 77 lines
brainfuck.scm (https://github.com/msullivan/LazyK.git) Scheme · 188 lines
1 ;; Brainfuck in Lazy K.
2 ;; Copyright 2002 Ben Rudiak-Gould. Distributed under the GPL.
3 ;;
4 ;; This is not a Brainfuck interpreter, but a direct translation of
5 ;; Brainfuck instructions into Lazy K code, just as
8 ;; [ while (*p) {
9 ;;
10 ;; and so on is a direct translation of Brainfuck instructions into
11 ;; C code. A Brainfuck program such as .[.+] is equivalent to
26 ;; output, which causes Lazy K execution to terminate.
27 ;;
28 ;; The Brainfuck memory store is unbounded in extent in both directions from
29 ;; the origin, and is initialized to all zeroes. It is represented as
30 ;; (cur,left,right), where cur holds the current cell and left and right are
__init__.py (https://github.com/SMU-SIS/StoryServer.git) Python · 94 lines
bf2lazy.c (https://github.com/msullivan/LazyK.git) C · 43 lines
mandelbrot.bf (https://github.com/HexHive/printbf.git) Brainfuck · 146 lines
brain_fuck.rb (https://github.com/seandmccarthy/rbfk.git) Ruby · 237 lines
1 #!/usr/bin/env ruby -w
3 class BrainFuck
4 DEFAULT_MEMORY_SIZE = 30_000
5 DEFAULT_EXEC_LIMIT = 1_000_000 # Stop badly constructed scripts going forever
203 src = program_input_stream.read
204 if ook?(src) # Probably Ook
205 BrainFuck.ook_to_bf(src) #.gsub(/[\r\n]/, ' '))
206 elsif spoon?(src) # Probably Spoon
207 BrainFuck.spoon_to_bf(src)
Readme.md (https://github.com/ForNeVeR/BetterFuck.git) Markdown · 100 lines
4 About
5 -----
6 BetterFuck is a Brainfuck language compiler into managed code (CLR). Compiled
7 programs are ordinary CLR assemblies and therefore can be executed under MS .NET
8 or Mono runtimes.
10 Usage
11 -----
12 To use compiler, first save your Brainfuck code to plain text file (encoding
13 does not matter, but it is recommended to use UTF-8 with or without BOM for any
14 purposes). File extension does not matter either, but it is common practice to
15 use `.b` extension for Brainfuck sources. If you're new to Brainfuck, see below
16 for additional information about Brainfuck language.
26 Here `BFuck.Compiler.dll`, `BFuck.Console.exe` and `BFuck.Runtime.dll` are
27 necessary BetterFuck libraries and `source.b` is user-written Brainfuck source
28 file. For this example, we'll use simple source:
README.md (https://bitbucket.org/vollingerm/compliers.git) Markdown · 50 lines
1 # RUM Lab
3 [RUM](http://esolangs.org/wiki/RUM) is an extension of [pbrain](http://esolangs.org/wiki/Pbrain), which in turn is an extension of [Brainfuck.](http://esolangs.org/wiki/Brainfuck)
5 In this lab, we will write a compiler (among other things) for RUM. Use RUM.java as a starting point for completing these steps; if you'd like to use a language other than Java, please let me know first and let's work something out.
48 (++++++++++<[>+>+<<-]>>[<<+>>-])>::::::::::::::<<<<<<<--------.>>>---------.+++++++..>---------.<<<<<<<------.<--------.>>>>>---.>>>.+++.<.--------.<<<<<<<+.
50 Try to see if it works with one of [these programs](http://esoteric.sange.fi/brainfuck/bf-source/prog/), particularly one that accepts input from the user.
README.md (https://gitlab.com/oytunistrator/nit) Markdown · 34 lines
1 # Brainfuck
3 Brainfuck is as its name implies a simple Brainfuck interpreter written in Nit.
5 It has almost as much purposes as the language itself, except it provides a good example for Nit programs that work while being concise.
13 * One data pointer to select where to write/read data
15 Brainfuck a small instruction set, only eight instructions :
17 * `>`: Increments the data pointer
26 ## How to use
28 First, compile the interpreter with the Nit compiler/interpreter, and launch the program on a brainfuck source file for interpretation.
30 Example:
Brainfuck.hs (https://github.com/DasIch/Brainfuck.git) Haskell · 102 lines
r-fxxk.rb (https://github.com/masarakki/r-fxxk.git) Ruby · 109 lines
1 class Brainfuck
2 def initialize(options = {})
3 self.class.default_mapping.each do |key, default|
26 def compile(src)
27 Brainfuck.new.translate(self, src)
28 end
44 def hello_world
45 translate(Brainfuck, '>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-]<.>+++++++++++[<+++++>-]<.>++++++++[<+++>-]<.+++.------.--------.[-]>++++++++[<++++>-]<+.[-]++++++++++.')
46 end
108 # For backwards compatibility.
109 BrainFuck = Brainfuck
Node.java (https://gitlab.com/bog/qbic) Java · 39 lines
App.js (https://gitlab.com/bxt/brainfuck-debugger) JavaScript · 117 lines
__init__.py (https://github.com/fbesser/ProgValSupybot-plugins.git) Python · 66 lines
README.md (https://github.com/reinventingthewheel/assembler.git) Markdown · 55 lines
run_tests.py (https://gitlab.com/thomasave/Parsodus) Python · 107 lines
Interpreter.cs (https://gitlab.com/wipiano/BrainfuckNancy) C# · 65 lines
brainfuck.lisp (https://github.com/derrida/cl-ffff.git) Lisp · 105 lines
build.gradle (https://github.com/mcandre/mcandre.git) Gradle · 51 lines
bf.asm (https://github.com/willscott/Porcupine.git) Assembly · 115 lines
gsm0503_mapping.c (https://gitlab.com/nrw_noa/libosmocore) C · 305 lines
build.sh (https://github.com/gauthamzz/John-Cena.git) Shell · 605 lines
201 # -------------------------------------
202 # Brainfuck
203 BUILD-START "Brainfuck" "johncena.bf"
204 case "$(BUILD-FIND brainfuck)" in
205 brainfuck)
207 BUILT true
208 else
209 INTERPRETED-WRAP brainfuck "${OBJ}/${SRC_FILENAME}" > "${OUT_FILE}"
210 chmod +x "${OUT_FILE}"
211 cp "${SRC_FILE}" "${OBJ}/${SRC_FILENAME}"
218 # -------------------------------------
219 # Brainfuck (Custom)
220 BUILD-START "Brainfuck (Args)" "johncena.custom.bf"
mk.js (https://github.com/patspam/webgui_old.git) JavaScript · 67 lines
DreamTester.Designer.cs (https://reflectivecs.svn.codeplex.com/svn) C# · 210 lines
README.md (https://github.com/1337/brainfuck.js.git) Markdown · 40 lines
1 # Brainfuck for Web 2.0
3 ## What does this contain?
4 * **js2brainfuck**: turn js code into brainfuck.
5 * **brainfuck2js**: run brainfuck code in your browser.
6 * **brainfuck.bf**: `brainfuck.js` converted by `brainfuck.js`.
8 ### Bonuses
9 * **chinese** to brainfuck converter: allows you to code in chinese.
10 * **sleep** to brainfuck converter: allows you to code in sleep.
StepDefinition.java (https://github.com/eivindingebrigtsen/cucumber-jvm.git) Java · 49 lines
projects.markdown (https://github.com/leocassarani/rubinius.git) Markdown · 107 lines
bf.php (https://gitlab.com/billyprice1/Stikked) PHP · 113 lines
8 * Date Started: 2009/10/31
9 *
10 * Brainfuck language file for GeSHi.
11 *
12 * CHANGES
38 ************************************************************************************/
39 $language_data = array (
40 'LANG_NAME' => 'Brainfuck',
41 'COMMENT_SINGLE' => array(),
42 'COMMENT_MULTI' => array(),
HaskFuck.hs
(git://github.com/alexsparrow/HaskFuck.git)
Haskell · 193 lines
✨ Summary
This Haskell program implements a Brainfuck interpreter. It reads a Brainfuck program from input, executes it by iterating through the instructions, and prints the output to the console. The program uses monad transformers to manage state and I/O, allowing for modular and reusable code. It supports basic Brainfuck commands and can be run from an input file or a predefined test program.
This Haskell program implements a Brainfuck interpreter. It reads a Brainfuck program from input, executes it by iterating through the instructions, and prints the output to the console. The program uses monad transformers to manage state and I/O, allowing for modular and reusable code. It supports basic Brainfuck commands and can be run from an input file or a predefined test program.
This Haskell program implements a Brainfuck interpreter. It reads a Brainfuck program from input, executes it by iterating through the instructions, and prints the output to the console. The program uses monad transformers to manage state and I/O, allowing for modular and reusable code. It supports basic Brainfuck commands and can be run from an input file or a predefined test program.
This Haskell program implements a Brainfuck interpreter. It reads a Brainfuck program from input, executes it by iterating through the instructions, and prints the output to the console. The program uses monad transformers to manage state and I/O, allowing for modular and reusable code. It supports basic Brainfuck commands and can be run from an input file or a predefined test program.
1 {-
2 Experimental (i.e. not working properly) brainfuck interpreter in Haskell
3 The test program below works but others may not
4 The , (comma) command has not been implemented yet
18 import System.Environment
20 -- Brainfuck program for testing purposes
21 test = unlines [
22 "+++++ +++++ initialize counter (cell #0) to 10",
43 ]
45 -- Brainfuck command type
46 data Cmd = Next | Prev | Inc | Dec | Out | In | Start | End deriving Show
52 -- Shared environment
53 -- cmdStream : List of brainfuck commands in program
54 -- memArray : Mutable array used for brainfuck memory
users_controller_test.rb (https://github.com/jbillsx/zena.git) Ruby · 149 lines
brainfuck.y (https://gitlab.com/lily-mara/schwift) Happy · 85 lines
BrainfuckCore.v (git://github.com/whitequark/bfcpu2.git) V · 307 lines
skill_edit_page.html (https://github.com/4pcbr/fb_gh.git) HTML · 124 lines
AssemblyInfo.cs (https://gitlab.com/hakopi/BrainfuckNancy) C# · 36 lines
6 // アセンブリに関連付けられている情報を変更するには、
7 // これらの属性値を変更してください。
8 [assembly: AssemblyTitle("BrainfuckNancy")]
9 [assembly: AssemblyDescription("")]
10 [assembly: AssemblyConfiguration("")]
11 [assembly: AssemblyCompany("")]
12 [assembly: AssemblyProduct("BrainfuckNancy")]
13 [assembly: AssemblyCopyright("Copyright © 2016")]
14 [assembly: AssemblyTrademark("")]
BrainfuckInterpreter.scala (https://gitlab.com/eobandob/solveet) Scala · 47 lines
bfbf.bf (https://github.com/FabianM/brainfuck.git) Brainfuck · 275 lines
bfcl.bf (https://github.com/FabianM/brainfuck.git) Brainfuck · 586 lines
text.bf (https://github.com/FabianM/brainfuck.git) Brainfuck · 620 lines
lost-kingdom.bf (https://github.com/FabianM/brainfuck.git) Brainfuck · 691 lines
SimpleParser.cs (https://ironbrainfuck.svn.codeplex.com/svn) C# · 360 lines
bf2go.go (git://github.com/creamdog/bf2go.git) Go · 161 lines
7 )
9 type brainfuck struct {
10 SourceFile *os.File
11 DestFile *os.File
21 out,_ := os.OpenFile(dest,os.O_CREATE|os.O_RDWR|os.O_TRUNC,0666)
23 bf := &brainfuck{in,out,make([]byte,1),1,1,debug}
25 bf.SourceFile.Seek(0,0)
31 }
33 func (bf *brainfuck) initalizeOutputFile() {
34 bf.DestFile.WriteString("package main\n")
35 bf.DestFile.WriteString("import (\n")
org.segin.bfinterpreter.yml (https://gitlab.com/bugvillage-cloned-to-participate/fdroiddata) YAML · 49 lines
cs.js (https://gitlab.com/iv-cms/iv-cms-5) JavaScript · 60 lines
rot13.bf (https://github.com/darrenclark/mindfudge.git) Brainfuck · 30 lines
rules.html (https://github.com/pjcj/perlweb.git) HTML · 53 lines
29 <p>I'm hoping that people will still write these things after all the rewards
30 have reached TPF. So please don't be annoyed if you find your article is
31 sitting next to one or more other takes on why Brainfuck is better than perl,
32 or if we declare one or more joint winners. The principal purpose of this
33 exercise is to have fun.</p>
Brainfuck.hs (git://github.com/rickardlindberg/brainfuck.git) Haskell · 117 lines
esoteric.py (https://gitlab.com/vladvesa/sublimetext-php-plugins) Python · 114 lines
14 Number, Punctuation, Error
16 __all__ = ['BrainfuckLexer', 'BefungeLexer', 'RedcodeLexer']
19 class BrainfuckLexer(RegexLexer):
20 """
21 Lexer for the esoteric `BrainFuck <http://www.muppetlabs.com/~breadbox/bf/>`_
23 """
25 name = 'Brainfuck'
26 aliases = ['brainfuck', 'bf']
27 filenames = ['*.bf', '*.b']
28 mimetypes = ['application/x-brainfuck']
30 tokens = {
dbf2c.bf (https://github.com/FabianM/brainfuck.git) Brainfuck · 35 lines
numwarp.bf (https://github.com/FabianM/brainfuck.git) Brainfuck · 37 lines
bf.cpp (https://github.com/herumi/xbyak.git) C++ · 211 lines
10 #endif
12 class Brainfuck : public Xbyak::CodeGenerator {
13 public:
14 int getContinuousChar(std::istream& is, char c)
23 return count;
24 }
25 Brainfuck(std::istream& is) : CodeGenerator(100000)
26 {
27 // void (*)(void* putchar, void* getchar, int *stack)
196 int mode = argc == 3 ? atoi(argv[2]) : 0;
197 try {
198 Brainfuck bf(ifs);
199 if (mode == 0) {
200 static int stack[128 * 1024];
bfi.java (https://github.com/songhead95/loonix.git) Java · 336 lines
8 /** This class is a brainfuck interpreter written by Sven Stucki.<br>
9 * It lets you execute a bf program step-by-step for easy debugging or visualization or it can interpret the whole program at once.<br>
10 * Release date: 2.7.2009
22 /** Output of the brainfuck programm goes here, default = System.out **/
23 public PrintStream ps; // Output stream
24 /** Input of the brainfuck programm is read from here, default = System.in **/
27 /** This points to the currently selected memory cell **/
28 public int mp; // Memory pointer
29 /** This array represents the memory of the brainfuck program **/
30 public int[] cell; // Memory
cgbfi.bf (https://github.com/FabianM/brainfuck.git) Brainfuck · 199 lines
short.bf (https://github.com/FabianM/brainfuck.git) Brainfuck · 71 lines
1 Although brainfuck is basically useless, it isn't quite so crashingly useless
2 as people usually say. Some small tasks can be done fairly concisely.
3 (Some of these are fairly UNIX-specific.)
5 Do nothing, terminate successfully.
6 (Also called "true".)
7 (This is the shortest brainfuck quine as well.)
9 +[>.+<]
13 +++++++.
14 Beep.
15 (Small binary data files are easy to make with brainfuck and a pipe, too.)
17 ,[.[-],]
45 +++++[>+++++++++<-],[[>--.++>+<<-]>+.->[<.>-]<<,]
46 Translate text to brainfuck that prints it.
48 >>,[>>,]<<[[-<+<]>[>[>>]<[.[-]<[[>>+<<-]<]>>]>]<<]
spec.scm (https://gitlab.com/wilfred/guile) Scheme · 43 lines
1 ;;; Brainfuck for GNU Guile.
3 ;; Copyright (C) 2009, 2010 Free Software Foundation, Inc.
20 ;;; Code:
22 (define-module (language brainfuck spec)
23 #:use-module (language brainfuck compile-tree-il)
24 #:use-module (language brainfuck compile-scheme)
25 #:use-module (language brainfuck parse)
26 #:use-module (system base language)
27 #:export (brainfuck))
brainfuck-pt.html.markdown (https://gitlab.com/perlilja/learnxinyminutes-docs) Markdown · 84 lines
1 ---
2 language: brainfuck
3 contributors:
4 - ["Prajit Ramachandran", "http://prajitr.github.io/"]
9 ---
11 Brainfuck (não capitalizado excepto no início de uma frase) é uma linguagem de
12 programação Turing-completa extremamente simples com apenas 8 comandos.
15 Qualquer caractere excepto "><+-.,[]" (não contar com as aspas) é ignorado.
17 Brainfuck é representado por um vector com 30 000 células inicializadas a zero
18 e um ponteiro de dados que aponta para a célula actual.
32 [ e ] formam um ciclo while. Obviamente, devem ser equilibrados.
34 Vejamos alguns programas básicos de brainfuck.
36 ++++++ [ > ++++++++++ < - ] > +++++ .
JJTBrainfuckState.java (https://gitlab.com/bog/qbic) Java · 123 lines
1 /* Generated By:JavaCC: Do not edit this line. JJTBrainfuckState.java Version 5.0 */
2 package com.bog.model.ast;
4 public class JJTBrainfuckState {
5 private java.util.List<Node> nodes;
6 private java.util.List<Integer> marks;
10 private boolean node_created;
12 public JJTBrainfuckState() {
13 nodes = new java.util.ArrayList<Node>();
14 marks = new java.util.ArrayList<Integer>();
196-commented.bf (https://github.com/smacdo/brainfreeze.git) Brainfuck · 123 lines
Menus.java (https://gitlab.com/bog/qbic) Java · 128 lines
25 private MenuItem quit;
27 private Menu brainfuck_menu;
28 private MenuItem execute;
52 // brainfuck menu
53 {
54 this.brainfuck_menu = new Menu("Brainfuck");
55 this.execute = new MenuItem("Execute");
56 this.brainfuck_menu.getItems().addAll(this.execute);
59 this.menu_bar.getMenus().addAll(this.file_menu
60 , this.brainfuck_menu);
62 disableTabRelated(true);
README.md (https://github.com/vbmacher/emuStudio.git) Markdown · 42 lines
Module.cs (https://gitlab.com/wipiano/BrainfuckNancy) C# · 51 lines
3 using Nancy;
4 using Nancy.ModelBinding;
5 using BrainfuckNancy.Extensions;
6 using BrainfuckNancy.Models;
7 using BrainfuckCore;
8 using BrainfuckCore.Exception;
10 namespace BrainfuckNancy.Modules
11 {
12 public class Module : NancyModule
32 .SetResult(success);
33 }
34 catch (BrainfuckException e)
35 {
36 result
brainfuck.php (https://github.com/F5/zetacomponents.git) PHP · 131 lines
33 **/
35 class BrainFuck implements ezcTemplateCustomBlock, ezcTemplateCustomFunction
36 {
37 public static function getCustomBlockDefinition( $name )
39 switch ( $name )
40 {
41 case "brainfuck":
42 $def = new ezcTemplateCustomBlockDefinition();
43 $def->class = __CLASS__;
66 switch ( $name )
67 {
68 case "brainfuck":
69 $def = new ezcTemplateCustomFunctionDefinition();
70 $def->class = __CLASS__;
brainfuck.js (https://gitlab.com/thejeshgn/lib_files) JavaScript · 120 lines
1 // https://www.npmjs.com/package/brainfuck-javascript
2 // 0.1.7
3 (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.brainfuck = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
9 };
11 var brainfuck = function(source, input, maxIterations) {
12 var output = [];
13 var input_cur = 0;
108 });
110 return brainfuck(a_source, a_input, maxIterations);
111 };
brainfuck.php (https://github.com/nbartels/php-brainfuck.git) PHP · 136 lines
3 /*
4 Brainfuck interpreter Class
6 This program is free software; you can redistribute it and/or modify
20 */
22 class Brainfuck {
24 protected $data = array();
48 public function execute() {
49 $this->brainfuck_interpret($this->source, $this->source_index, $this->data, $this->data_index, $this->input, $this->input_index, $this->output);
50 return $this;
51 }
README.md (https://github.com/Thuva4/Algorithms.git) Markdown · 105 lines
8 Language | BrainFuck | C | C# | C++ | Crystal | Go | Haskell | Java | JavaScript | Kotlin | Perl | Python | Racket | Ruby | Rust | Scala | Swift|
9 ---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
10 AStar Search | | | | :+1: | | | | | | | | :+1: | | | | | |
ScalaStepDefinition.scala (https://gitlab.com/chiavegatto/cucumber-jvm) Scala · 85 lines
Brainfuck.hs (git://github.com/rickardlindberg/brainfuck.git) Haskell · 106 lines
Makefile (https://github.com/avsm/openbsd-ports.git) Makefile · 41 lines
article.md (https://github.com/pluralsight/guides.git) Markdown · 61 lines
1 ## What is Brainfuck?
2 Despite it's name, Brainfuck is a highly esoteric programming language. Essentially, it works just using a stack, assumedly with an infinite size. The language itself is extremely simple, consisting of only 6 characters. Due to it's extremely small size, programs written in Brainfuck are extremely small, and almost impossible to read. Below is a table of the characters used, and what they do
4 #### Table of Commands
17 ### Hello World Example
18 To give an idea of what a Brainfuck program looks like, check out the Hello World example below
19 ```none
20 +++++ +++ Set Cell #0 to 8