Re:PyPy.js: A fast, compliant Python implementation for the web
by Retr0spectrum on Wednesday May 06, 2015 @05:25AM
(#9497427)
Just playing around:
Edit: Here is a simple animation:
Here's a version you can paste in properly: http://pastebin.com/raw.php?i=67GadSUV
[ Parent
| on HN ]
Re:PyPy.js: A fast, compliant Python implementation for the web
by fragmede on Wednesday May 06, 2015 @05:59AM
(#9497550)
Sadly, if I paste that in, I get:
>>> import js
... c = js.globals.document.createElement("canvas")
...
debug: OperationError:
debug: operror-type: SyntaxError
debug: operror-value: ('EOL while scanning string literal', ('c callback', 1, 12, "r = c.push('import js\n", 0))
debug: OperationError:
debug: operror-type: KeyError
debug: operror-value: 'r'
And then the input window hangs. Strangely enough, if I type it in instead, it's okay.(ChromeOS v43 beta-channel)
Re:PyPy.js: A fast, compliant Python implementation for the web
by Retr0spectrum on Wednesday May 06, 2015 @06:15AM
(#9497596)
I think the only way around it is to paste each line separately. It seems to be caused by newline characters in the wrong place
Re:PyPy.js: A fast, compliant Python implementation for the web
by fragmede on Wednesday May 06, 2015 @01:05PM
(#9500098)
'that' refers to
import js
c = js.globals.document.createElement("canvas")
and not the pastebin.
The pastebin works for me, but only the first time. Subsequent runs result in: <RuntimeError object at 0x15d648>
RPython traceback:
...
Fatal RPython error: