mitxela.com forum
Welcome. Please log in or register.

Problems using the Brainfuck compiler "Infrabuck"
Tearzz Posted: 27 Sep 2018, 08:48 PM
Avatar


Member
Posts: 5
Joined: 27-September 18
So. I've been using the Infrabuck compiler a couple of times. I have this in the file I'm trying to compile:
++++++++[->+++++++++<]>.

which is just the ASCII character "H". 8*9=72

I've called the compiler multiple times by doing:
bf test.bf output.exe
and it compiled successfully. But now, with the exact same script, and the exact same command to call the compiler, it simply hangs.

It makes the output.exe file, but the output.exe doesn't actually return "H" like it used to, it simply returns nothing... and if I don't force stop the Infrabuck in the console by doing CTRL+C, it hangs without showing anything, and in the task manager it's using about 20% CPU.

-------------
[top]
mit Posted: 27 Sep 2018, 09:06 PM
Avatar
yeah whatever

Admin
Posts: 538
Joined: 4-May 16
Interesting. It used to work and now it doesn't? Is there perhaps another file in the same directory with the name bf? What else changed between when it worked and it didn't?

Last edit by mit at 27 Sep 2018, 09:07 PM

-------------
[top]
Tearzz Posted: 27 Sep 2018, 09:23 PM
Avatar


Member
Posts: 5
Joined: 27-September 18
Huh, that's interesting. I got it to work again.
So what I did is, I was getting a bit tired that I had to compile it, and then run it after by calling it... So I took the original bf.exe file and renamed it to bfck.exe, then I made a Windows Batch file called bf.bat which contains:
@echo off
set file=%1
set output=output.exe

"D:\Projects\Brainfuck Projects\Compiler\bfck.exe" "%file%" "%output%" && goto Run

:Run
@echo off
cls
"%output%"


The funny thing is, that the first few times I called my script it worked perfectly fine. It compiled and then it ran the compiled exe. I'm not sure what went wrong.

-------------
[top]
mit Posted: 27 Sep 2018, 10:07 PM
Avatar
yeah whatever

Admin
Posts: 538
Joined: 4-May 16
Cool. Well, I'm glad it's working for you.

I don't actually use the compiler very much, I mostly use the javascript interpreter so I can see the memory and stuff, then stick it into the compiler once I've finished and want it to run really fast.

-------------
[top]

Sign in to post a reply.