Skip to content

Commit 3262414

Browse files
committed
improved the readme even more
1 parent 953235d commit 3262414

File tree

1 file changed

+25
-38
lines changed

1 file changed

+25
-38
lines changed

README.md

Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,50 @@
11
# WHAT IS BRAINFUCK?
22

3-
Brainfuck is an esoteric language that is turing-complete and works with cells.
4-
Even though it isn't very useful, it's an interesting experience every passionate programmer should
5-
experience.
3+
Brainfuck is a turing-complete, esoteric language that uses only 8 commands.
64

75
# HOW DO I BRAINFUCK?
86

9-
This version of brainfuck has only 8 instructions, and those are:
7+
mempo = memory pointer
108

11-
```
12-
+ --> Adds 1 to the cell it's in.
9+
The instructions for writting in brainfuck are the following:
1310

14-
- --> Removes 1 to the cell it's in.
11+
'''
12+
+ --> Adds 1 to the value on the mempo is in.
1513

16-
> --> Changes the cell it's in by 1.
14+
- --> Removes 1 to the value on the mempo is in.
1715

18-
< --> Changes the cell it's in by -1.
16+
> --> Changes the mempo by 1.
1917
20-
, --> Allows for ascii input.
18+
< --> Changes the mempo by -1.
2119

22-
. --> Echoes the ascii value of the cell.
20+
. --> Outputs ASCII(char) value.
2321

24-
[ --> Starts a loop.
22+
, --> Inputs ASCII(char) value.
2523

26-
] --> Goes to the last open bracket if it doesn't end on 0 / null.
27-
```
24+
[ --> Starts a loop.
2825

29-
Every character other than those is (hopefully) ignored.
30-
31-
# WHY?
26+
] --> Ends a loop if the value of the mempo it's in equals to 0, otherwise it restarts.
27+
'''
3228

33-
Why i did it? Because I was bored. Why does this language exists in the first place? I guess someone felt the same way ~15 years before me.
29+
Every character other than those is (hopefully) ignored.
3430

3531
# ERRORS
36-
If it doesn't work, depending on the exit it can be the following:
37-
38-
0 - No problems on the code, have you checked that it's well written?
39-
40-
1 - There is an unfinished loop.
41-
42-
2 - You are trying to access a negative cell position.
43-
44-
3 - 1 & 2.
45-
46-
4 - Not enough input or not input at all.
32+
If it doesn't work, depending on the return it can be the following:
4733

48-
5 - 1 & 4
34+
'''
35+
0 - No problems on the code, check it's well written or mail me.
4936

50-
6 - 2 & 4
37+
1 - There is an unfinished loop, somewhere.
5138

52-
7 - 1 & 2 & 4
39+
2 - You ar etrying to access a negative mempo.
5340

54-
# TODO
55-
[x] Make it to interpret brainfuck(only in the python version atm).
41+
3 - 1 & 2
5642

57-
[ ] Make it to COMPILE brainfuck.
43+
4 - Not enough input.
5844

59-
[ ] Add more stuff to the TODO.
45+
5 - 1 & 4
6046

61-
# AUTHOR NOTE
47+
6 - 2 & 4
6248

63-
Hope you enjoy playing with this, it's possible to do some impressive stuff.
49+
7 - 1 & 2 & 4
50+
'''

0 commit comments

Comments
 (0)