EXAPUNKS

EXAPUNKS

35 betyg
BRAINFUCK (MAKE AN INTERPRETER)
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Filstorlek
Lades upp
Uppdaterades
4.486 KB
27 aug, 2018 @ 3:53
27 aug, 2018 @ 4:02
2 ändringsnotiser ( visa )

Abonnera för att ladda ner
BRAINFUCK (MAKE AN INTERPRETER)

Beskrivning
20 kommentarer
Thunder 6 sep, 2022 @ 12:24 
It took me more than 2 hours but I finally did it.
Two EXAs and 140 lines.
Cool challenge
WakiMiko 29 maj, 2022 @ 13:22 
Really enjoyed this one!
Amitai 17 dec, 2020 @ 1:28 
Speaking of hardcoding, I've managed to cram all 11 test cases into 100 lines. My record is now 2050 cycles.
Amitai 27 nov, 2020 @ 14:37 
I've since managed to clear some space to hardcode the two worst tests, bringing me down to 74.5k, lowering the top percentile down from 81k. With 101 lines I'm able to hardcode the third test and get down to about 56k, so I'll have to figure out how to cut one more line. I'm interested to know what sort of speeds you can reach!
Grimmy  [skapare] 27 nov, 2020 @ 11:41 
@Amitai I think it can be faster without hardcoding. I didn’t optimize it for cycles, but my size solution is 504k/64/2, and surely those 36 lines can be spent making it much faster.
Amitai 26 nov, 2020 @ 14:26 
My second solution does half the work before runtime by first translating the program ( lke this ), and runs in 280k / 92 / 2. I believe this is about as fast as it can go, without hardcoding test 3?
Amitai 25 nov, 2020 @ 4:25 
Super cool level! This was my first experience with brainfuck, but writing an interpreter proved surprisingly easy. Coincidentally, I fit my solution in exactly 100 lines before any optimisation.
SoggyCrayons 23 aug, 2020 @ 8:56 
I was afraid that this was gonna be a thing ever since I saw the interpreter for SpaceChem.
God damnit internet <3
Unfortunate Swag 12 maj, 2020 @ 18:10 
(Had to split this into another comment)
More details if you don't mind spoilers:
I got stuck on the third one like most other people, but after looking at the table on Wikipedia [wikipedia.org] on loops I realized that I needed a counter in my bracket checking loops. My final issue was actually generating the file, which I accomplished by checking for the EOF on the data tape at the beginning of my main loop, copying 0 to F and seeking back 1 if so. I later improved this when I realized that the memory is only every expanded when > is called, so I put the check in that section which did not increase the size. I know that there is an optimization due to the limit on the amount of memory that is actually needed to solve, but I like that my interpreter handles this dynamically.
Unfortunate Swag 12 maj, 2020 @ 18:10 
Wow, I quite honestly thought this was going to take me ages, if I ever solved it. But the way this game makes you problem solve helped me solve this challenge as though it wasn't much more than a difficult level, and I did it in about 2 hours. When I realized I had done it, I just had a big, genuine smile on my face knowing that I had technically written my first language interpreter: a brainfuck interpreter, in a video game.

My only complaint: the cycle limit prevents your from running the ad infinitum, so you can't run the brainfuck brainfuck interpreter in your EXAPUNK brainfuck interpreter. :( Xzibit frowns upon me