Skip to content

Instantly share code, notes, and snippets.

@xatier
Last active December 12, 2015 04:28
Show Gist options
  • Save xatier/4714257 to your computer and use it in GitHub Desktop.
Save xatier/4714257 to your computer and use it in GitHub Desktop.
brianfuck on iPad mini
anyasu:~ root# uname -a
Darwin anyasu 13.0.0 Darwin Kernel Version 13.0.0: Wed Oct 10 23:30:00 PDT 2012; root:xnu-2107.2.34~2/RELEASE_ARM_S5L8942X iPad2,5 arm P105AP Darwin
anyasu:~ root# cat hw.b
+++++ +++++ initialize counter (cell #0) to 10
[ use loop to set the next four cells to 70/100/30/10
> +++++ ++ add 7 to cell #1
> +++++ +++++ add 10 to cell #2
> +++ add 3 to cell #3
> + add 1 to cell #4
<<<< - decrement counter (cell #0)
]
> ++ . print 'H'
> + . print 'e'
+++++ ++ . print 'l'
. print 'l'
+++ . print 'o'
> ++ . print ' '
<< +++++ +++++ +++++ . print 'W'
> . print 'o'
+++ . print 'r'
----- - . print 'l'
----- --- . print 'd'
> + . print '!'
> . print '\n'
anyasu:~ root# ./bf.pl --file hw.b
Hello World!
anyasu:~ root#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment