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

stdin #13

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

stdin #13

wants to merge 11 commits into from

Conversation

arasouli91
Copy link

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.

@christosnc
Copy link

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
Copy link

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.

The property for the input text in the object that is passed to the worker should be userInput not inputText
@arasouli91
Copy link
Author

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.

@christosnc
Copy link

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.

kkoomen added a commit to kkoomen/cib that referenced this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants