Skip to content

Instantly share code, notes, and snippets.

@cessor
Created May 19, 2014 14:57
Show Gist options
  • Select an option

  • Save cessor/e7f4a1a04b0c8de9e391 to your computer and use it in GitHub Desktop.

Select an option

Save cessor/e7f4a1a04b0c8de9e391 to your computer and use it in GitHub Desktop.
Oneline Brainfuck Subset Parser
print''.join(map(chr,reduce(lambda x,y: x
+[x[-1]+y],[l.count('+')-l.count('-') for
l in """++++++++++++++-+-+-+-+-+-+-+-+-+-
+++++++++++++++++++++++++++++++++++++++++
++++++++++++.++++++++++++++++++++++++++++
+++++++.----.++++++++++++++++++++.-.-----
------.---.+++++++++++++++.---------.----
-----------------------------------------
-------------------------------.+++++++++
+++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++.++++++++++.------
-----------------------------------------
------------------------------------.++++
+++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++.+++.+++++++++++++++
..---------------.+++++++++++++.---------
-----------------------------------------
--------------------------------.++++++++
+++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++.-----
-------.-------.+++++++++++++.-----------
-----------------------------------------
--------------------------.++++++++++++++
+++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++.----------
----.+++++.+++++++++++++.----------------
-----------------------------------------
------------------ +-+-+-+-+-+-+-+-+-+-+-
====== Thank you for traveling with =====
deutsche Bahn =""".split('.')],[0])[1:]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment