cib icon indicating copy to clipboard operation
cib copied to clipboard

stdin

Open arasouli91 opened this issue 6 years ago • 4 comments

User's program can now take stdin. There is an Input pane with a textarea for the input. The input needs to be in there before the program runs.

You can see in the commits that I reverted my changes from the Edge compatibility pull request, because I made the mistake of doing those changes in my forked master branch and I wasn't sure if you wanted to merge it. So, this pull request is just for stdin.

arasouli91 avatar Jun 24 '18 20:06 arasouli91

Hello,

I'm trying to get stdin to work without any success.. I tried to apply the changes to the precompiled cib (gh-pages branch). I made the changes to the process-runtime.js, process.js and index.html (instead of clang.html, because of the precompiled branch) files as noted in the "Files changed" tab.

Unfortunately I can't get stdin to work, am I missing something?

Thank you!

christosnc avatar Nov 10 '18 01:11 christosnc

Checking the commits, I think there is a typo:

In the Clang.html file

Line 438: "userInput:" In front of "document.get...." Line 493: "userInput:" Instead of "inputText:"

Changing these still can't get it to work. The emModule.stdin doesn't seem to get called by clang behind.

christosnc avatar Nov 11 '18 00:11 christosnc

Thanks for catching that. That was definitely an issue.

I just copied these contents of clang.html and process-runtime.js into the files in the gh-pages branch and everything works fine. Not sure why it isn't working for you. Try downloading the gh-pages branch, downloading these two files from here, paste them in there, and open up clang.html. I am using Firefox. A recent Chrome update seems to have broken cib to an extent.

arasouli91 avatar Nov 12 '18 21:11 arasouli91

Yes, thank you, I got it working too! I don't know what the issue was.

Yeah, unfortunately chrome gives "RuntimeError: memory access out of bounds", I am using Safari.

christosnc avatar Nov 20 '18 16:11 christosnc