Skip to content

NiumXp/pyfuck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pyfuck

One line Brainfuck interpreter in Python

Note

The implementation don't use

  • +, - (only to do -1, etc...), <, >, etc...;
  • No keywords, except lambda;
  • No ' and ";
  • No numbers, except 0.

I don't know why, but the code doesn't work correctly...

How to use

from pyfuck import brainfuck

code = """
++++++++++[>++++++++>+++++++++++>++
++++++++>++++>+++>++++++++>++++++++
++++>+++++++++++>++++++++++>+++++++
++++>+++>+<<<<<<<<<<<<-]>-.>--.>---
.>++++.>++.>---.>---.>.>.>+.>+++.>.
"""
code = brainfuck(code)
code.exec()  # Ola, Mundo!
code.a == [0, 79, 108, 97, 44, 32, 77, 117, 110, 100, 111, 33, 10, 0, ...]

About

One line Brainfuck interpreter in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages