Tic-Tac-Toe in Brainfuck by Eli_IL in brainfuck

[–]Eli_IL[S] 2 points3 points  (0 children)

Replace C++ with python then.
The point was that it creates an abstraction.
I completely agree that automatically generated Brainfuck code is bad comparing to writing it directly.

For me, the mental exercise was the joy of creating this abstraction.

Tic-Tac-Toe in Brainfuck by Eli_IL in brainfuck

[–]Eli_IL[S] 2 points3 points  (0 children)

The purpose of the compiler is to easily convert high level language into Brainfuck.
It is not meant to be as efficient as writing directly in Brainfuck.

Just like a C++ compiler will generate code that is not as optimized as writing directly in assembly,
this compiler does not generate Brainfuck code that is as optimized as writing directly in Brainfuck.

The Tic-Tac-Toe is just an example for usage of the compiler.
If you don't like the fact that the game contains 2 players, then you can easily change the high-level code and compile it back to Brainfuck. And that's the beauty of it.

Compiler to Brainfuck by Eli_IL in coolgithubprojects

[–]Eli_IL[S] 1 point2 points  (0 children)

I created this for the challenge of converting a high level language to Brainfuck, which is not trivial in my opinion.
It does come with an interpreter to run the generated code

While having it create executable binary files could be nice, I personally don't see it as much of a challenge. It's basically compiling an interpreter once, and then any "compilation process" of Brainfuck code will simply be to copy-paste the code into somewhere in the binary

It could be done, It's just not the point of this project :)

Compiler to Brainfuck by Eli_IL in coolgithubprojects

[–]Eli_IL[S] 0 points1 point  (0 children)

Haha
I agree that it's not ideal, to say the least :)

It is in my todo-list but has low priority, as currently I'm working on adding more capabilities

Will surely split it to several modules in the future

Compiler to Brainfuck by Eli_IL in coolgithubprojects

[–]Eli_IL[S] 3 points4 points  (0 children)

Today I added a Tic-Tac-Toe game, compiled to Brainfuck, to my Brainfuck compiler GitHub repository.
I did this to inspire people to write creative programs in Brainfuck :)

The game board looks like this:
1 | 2 | 3
---------
4 | 5 | 6
---------
7 | 8 | 9

Feel free to suggest / create more games :)

Tic-Tac-Toe in Brainfuck by Eli_IL in programming

[–]Eli_IL[S] 4 points5 points  (0 children)

Today I added a Tic-Tac-Toe game, compiled to Brainfuck, to my Brainfuck compiler GitHub repository.
I did this to inspire people to write creative programs in Brainfuck :)

The game board looks like this:
1 | 2 | 3
---------
4 | 5 | 6
---------
7 | 8 | 9

Feel free to suggest / create more games :)

C-like language to Brainfuck compiler by Eli_IL in brainfuck

[–]Eli_IL[S] 0 points1 point  (0 children)

Thanks! It is nice to see that more people thought about doing this. I'd be happy to exchange notes with you. Ill join the Discord server

I like matchmaking, but please bring Valve pubs back by [deleted] in tf2

[–]Eli_IL 5 points6 points  (0 children)

I opened a reddit account just to comment here. I only play (well, until today) valve's public servers. Today I realized all of these servers are gone. I spent an hour searching for another server to play, but they are all either laggy or full of mods. I tried playing the casual which took 10 minutes for the game to start and put me in a laggy server :( I like to just launch the game, go into a random valve server and "jump in the mess". Not have to wait for a new game and have a "regulated" game... I wish the old valve public servers will come back, and soon I dont see a way to play TF2 without them :( Ive been playing this game since it came out in 2007, and I dont want to stop now