You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<script src="http://pypyjs.org/pypyjs-release/lib/Promise.min.js" type="text/javascript" charset="utf-8"></script>
<script src="http://pypyjs.org/pypyjs-release/lib/FunctionPromise.js" type="text/javascript" charset="utf-8"></script>
<script src="http://pypyjs.org/pypyjs-release/lib/pypyjs.js" type="text/javascript" charset="utf-8"></script>
<script>
// Send all VM output to the console.
pypyjs.stdout = pypyjs.stderr = function(data) {
console.log("[PYTHON] ", data);
}
// Display a helpful message and twiddle thumbs as it loads.
pypyjs.stdout("Loading PyPy.js.\n\n");
pypyjs.stdout("It's big, so this might take a while...");
pypyjs.ready().then(function() {
pypyjs.stdout('Welcome to PyPy.js!\n') ;
return pypyjs.repl(function (ps1) {
// wtf is this?
console.log(ps1);
return new Promise(function (resolve, reject) {
// if DOM event is raised, the text will go to stdin
// provided this is stdin, I mean, the hell I know?
function pypy_text(e) {
resolve(e.text);
window.removeEventListener("pypy_stdin", pypy_text);
}
window.addEventListener("pypy_stdin", pypy_text);
});
});
}).then(null, function(err) {
//jqconsole.Reset();
console.error("PyPy failed: ", err);
});
This is the full error:
This is the relevant code:
Here's the full file, as it appears on my disk: https://gist.github.com/Darker/4202e9c45d4386370f9b7adaed8b479d
I open it directly in the browser, without using http server.
The text was updated successfully, but these errors were encountered: