Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hangs when given non-halting programs #1

Open
ghost opened this issue May 28, 2018 · 4 comments
Open

Hangs when given non-halting programs #1

ghost opened this issue May 28, 2018 · 4 comments
Labels

Comments

@ghost
Copy link

ghost commented May 28, 2018

The IDE will hang if told to "skip to end" with a non-halting program.

Example program:

+[>+]

Actions taken: Program input, run. IDE told to "skip to end."

Expected result: IDE stops after program runs too long or otherwise indicates that it cannot be "skipped to end."

Actual result: IDE runs program at high speed, using an entire CPU core. If user attempts to stop program using the "reset everything" button, IDE hangs.

@wmww
Copy link
Owner

wmww commented May 29, 2018

Pull requests welcome, but I probably won't look into this at the moment. There's a lot of improvements I'd like to make, but I haven't been doing much brainfuck development or tooling lately.

@wmww
Copy link
Owner

wmww commented May 29, 2018

It's on the line, but I guess it is a bug.

@wmww
Copy link
Owner

wmww commented Jul 30, 2018

Hmm... looks like reset hangs even on long programs, like:

load 1000 into position 2
++++++++++
[
    >++++++++++
    [
        >++++++++++
    <-]
<-]

move to position 2
>>

move 1000 spaces to the right
[[>+<-]>-]

@wmww
Copy link
Owner

wmww commented Jul 30, 2018

Ah, it's a memory issue, not a logic error (as can be seen by +[+] being resetable after clicking 'skip to end' and waiting, and +[>+] being resetable if you click reset within a few moments of 'skip to end' (before the tape gets too long). I tried a simple fix, but it just broke everything. You'll have to wait for #6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant