Initial commit of pre-existing sources.

This commit is contained in:
Lionel Sambuc
2010-10-21 20:58:03 +02:00
commit 0a443b14f8
24 changed files with 1490 additions and 0 deletions

13
examples/2468-commented.bf Executable file
View File

@@ -0,0 +1,13 @@
This brainfuck program prints the following
suits on the screen : 2468
++++ the number of number to print
[
> Move to the accumulator cell
++ Add two to the accumulator
which leads to the multiplication
of the loop counter
. Print the accumulator
<- move back to the loop counter and
decrement it
]

13
examples/2468-commented.heu Executable file
View File

@@ -0,0 +1,13 @@
This brainfuck program prints the following
suits on the screen : 2468
Heu...Heu...Heu...Heu... the number of number to print
Heu, heu!
Heu ! Move to the accumulator cell
Heu...Heu... Add two to the accumulator
which leads to the multiplication
of the loop counter
Heu, j'avais pensé que. Print the accumulator
Heu ?Heu. move back to the loop counter and
decrement it
Heu, heu?

1
examples/2468.bf Executable file
View File

@@ -0,0 +1 @@
++++[>++.<-]

1
examples/2468.heu Executable file
View File

@@ -0,0 +1 @@
Heu...Heu...Heu...Heu...Heu, heu!Heu !Heu...Heu...Heu, j'avais pensé que.Heu ?Heu.Heu, heu?

View File

@@ -0,0 +1,21 @@
+++ +++ +++ + 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'

View File

@@ -0,0 +1,27 @@
Heu...Heu...Heu... Heu...Heu...Heu... Heu...Heu...Heu... Heu... initialize counter (cell #0) to 10
Heu, heu! use loop to set the next four cells to 70/100/30/10
Heu ! Heu...Heu...Heu... Heu...Heu...Heu... Heu... add 7 to cell #1
Heu ! Heu...Heu...Heu... Heu...Heu...Heu... Heu...Heu...Heu... Heu... add 10 to cell #2
Heu ! Heu...Heu...Heu... add 3 to cell #3
Heu ! Heu... add 1 to cell #4
Heu ?Heu ?Heu ? Heu ? Heu. decrement counter (cell #0)
Heu, heu?
Heu !Heu...Heu... Heu, j'avais pensé que. print 'H'
Heu !Heu...Heu, j'avais pensé que. print 'e'
Heu...Heu...Heu... Heu...Heu...Heu... Heu...Heu, j'avais pensé que. print 'l'
Heu, j'avais pensé que. print 'l'
Heu...Heu...Heu... Heu, j'avais pensé que. print 'o'
Heu !Heu...Heu... Heu, j'avais pensé que. print ' '
Heu ?Heu ?Heu...
Heu...Heu...Heu...
Heu...Heu...Heu...
Heu...Heu...Heu...
Heu...Heu...Heu...
Heu...Heu...Heu, j'avais pensé que. print 'W'
Heu !Heu, j'avais pensé que. print 'o'
Heu...Heu...Heu... Heu, j'avais pensé que. print 'r'
Heu.Heu.Heu. Heu.Heu.Heu. Heu, j'avais pensé que. print 'l'
Heu.Heu.Heu. Heu.Heu.Heu. Heu.Heu.Heu, j'avais pensé que. print 'd'
Heu !Heu...Heu, j'avais pensé que. print '!'
Heu !Heu, j'avais pensé que. print '\n'

3
examples/HelloWorld.bf Executable file
View File

@@ -0,0 +1,3 @@
++++++++[>+++++++++<-]>.<+++++[>++++++<-]>-.+++++++..+++.<
++++++++[>>++++<<-]>>.<<++++[>------<-]>.<++++[>++++++<-]>
.+++.------.--------.>+.

1
examples/HelloWorld.heu Executable file
View File

@@ -0,0 +1 @@
Heu...Heu...Heu...Heu...Heu...Heu...Heu...Heu...Heu, heu!Heu !Heu...Heu...Heu...Heu...Heu...Heu...Heu...Heu...Heu...Heu ?Heu.Heu, heu?Heu !Heu, j'avais pensé que.Heu ?Heu...Heu...Heu...Heu...Heu...Heu, heu!Heu !Heu...Heu...Heu...Heu...Heu...Heu...Heu ?Heu.Heu, heu?Heu !Heu.Heu, j'avais pensé que.Heu...Heu...Heu...Heu...Heu...Heu...Heu...Heu, j'avais pensé que.Heu, j'avais pensé que.Heu...Heu...Heu...Heu, j'avais pensé que.Heu ?Heu...Heu...Heu...Heu...Heu...Heu...Heu...Heu...Heu, heu!Heu !Heu !Heu...Heu...Heu...Heu...Heu ?Heu ?Heu.Heu, heu?Heu !Heu !Heu, j'avais pensé que.Heu ?Heu ?Heu...Heu...Heu...Heu...Heu, heu!Heu !Heu.Heu.Heu.Heu.Heu.Heu.Heu ?Heu.Heu, heu?Heu !Heu, j'avais pensé que.Heu ?Heu...Heu...Heu...Heu...Heu, heu!Heu !Heu...Heu...Heu...Heu...Heu...Heu...Heu ?Heu.Heu, heu?Heu !Heu, j'avais pensé que.Heu...Heu...Heu...Heu, j'avais pensé que.Heu.Heu.Heu.Heu.Heu.Heu.Heu, j'avais pensé que.Heu.Heu.Heu.Heu.Heu.Heu.Heu.Heu.Heu, j'avais pensé que.Heu !Heu...Heu, j'avais pensé que.

1
examples/test.heu Executable file
View File

@@ -0,0 +1 @@
Heu...Heu...Heu...Heu...Heu, heu!Heu !Heu...Heu...Heu ?Heu.Heu, heu?

15
examples/translate.pl Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/perl
# ./translate.pl "brainfuck program" > program.heu
{
$ARGV[0] =~ s/>/Heu !/g;
$ARGV[0] =~ s/</Heu ?/g;
#Beware the following replacement contains characters of the source set
$ARGV[0] =~ s/,/Heu, t'en penses quoi ?/g;
$ARGV[0] =~ s/\./Heu, j'avais pensé que./g;
$ARGV[0] =~ s/\+/Heu.../g;
$ARGV[0] =~ s/-/Heu./g;
$ARGV[0] =~ s/\[/Heu, heu!/g;
$ARGV[0] =~ s/\]/Heu, heu?/g;
print $ARGV[0];
}