Sadly, "import antigravity" doesn't work
(However, it took about 10 seconds to execute. Maybe that's the network I'm on, but even so...)
31–40 of 144 posts
Sadly, "import antigravity" doesn't work
(However, it took about 10 seconds to execute. Maybe that's the network I'm on, but even so...)
Earlier quoted context omitted.
> ... access to the full javascript model .... How is the JS model accessed?
See nosir's comment.
Sample code to execute some Javascript code inside PyPy.js. I couldn't find any examples. import js js.eval("console.log(\"hi!\")")
Or this: import js js.globals.console.log('hi!')
import js
js.globals.console.log('hi!'*5)This is glorious. From https://github.com/rfk/pypyjs/blob/master/CONTRIBUTING.rst : > We have the following major components in the PyPy repo: >> An "emscripten" build platform definition, which teaches pypy's rpython toolchain how to compile things with emscripten: ./deps/pypy/rpython/translator/platform/emscripten_platform/. >> An rpython JIT backend that emits asmjs at runtime: ./deps/pypy/rpython/jit/backend/asmj…
Glorious indeed. At least three levels of abstraction, two JITs, and a host of supporting code. Can we add some more layers like an emulator or get recursive by getting something like Pyasm running inside it?
Earlier quoted context omitted.
Glorious indeed. At least three levels of abstraction, two JITs, and a host of supporting code. Can we add some more layers like an emulator or get recursive by getting something like Pyasm running inside it?
I work on a machine that has two hypervisors, one third in plan, and more abstraction layers than a lasagna software. It is still very very efficient.
Earlier quoted context omitted.
weren't you already able to do it with pyjamas/pyjs?
Quite possibly. To be honest I never looked into it.
It makes me want to gouge my eyes out, but it's not really that hard to get productive in. CoffeeScript is even better, if you aren't averse to adding another dependency on top of everything else.
I watched the presentation in Pycon 2015[1], and I really liked how honest/aware they are about the challenges and tradeoffs (so far, the performance it's pretty bad compared to javascript, and the download size is still an issue). At the end is answered why python can't be directly included in Firefox or other browsers(the presenter/main developer works for Mozilla) [1] https://www.youtube.com/watch?v=PiBfOFqDIAI
> python can't be directly included in Firefox or other browsers So Python is a bad candidate, but there are better candidates out there. For example, jsofocaml (using OCaml in the browser) looks quite promising. In the end, we need a lightweight yet properly defined and highlevel language, and the ML languages as well as the LISP languages are great candidates for that.
Although I appreciate that this isn't technically "written in JavaScript" but it follows the principle.