Earlier quoted context omitted.
> At the end is answered why python can't be directly included in Firefox or other browsers(the presenter/main developer works for Mozilla) Direct link to answer: https://youtu.be/PiBfOFqDIAI?t=1611
"If we ship Python inside of Firefox, no one is going to use it because it's not available in Chrome, it's not available in Internet Explorer." Oh yeah? Try me.
PyPy.js: A fast, compliant Python implementation for the web
81–90 of 144 posts
Re: PyPy.js: A fast, compliant Python implementation for the web
#82Re: PyPy.js: A fast, compliant Python implementation for the web
#83Re: PyPy.js: A fast, compliant Python implementation for the web
#84Earlier 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?
Potentially just one JIT, right? asm.js is AOT compiled on Firefox.
Re: PyPy.js: A fast, compliant Python implementation for the web
#85Earlier quoted context omitted.
it's systematically translating the PyPy interpreter to the Javascript, so it has to get semantics right. However I'm not sure if the drawbacks can be addressed in the current JS model, notably: very slow warmup, huge download size (that's primarily PyPy fault though), the lack of good JS access.
> However I'm not sure if the drawbacks can be addressed in the current JS model, notably: very slow warmup, huge download size Only for the first time loading it. It would be great if some big organization (looks at Google) hosts the "standard" version of the file, much like jquery, so that it would be cached and ready to be used on the local machine most of the time.
Re: PyPy.js: A fast, compliant Python implementation for the web
#86Earlier quoted context omitted.
> 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.
Purescript is a Haskell-like language that is designed to output to javascript. It looks quite nice and has seen a lot of attention lately. It's even in GSoC.
A slightly less-hellish but still annoying problem is that I often poke at things directly from the console when bugs happen, and this helps me a lot in debugging. However poking at the console requires using JavaScript, which is fine, but it would drive me nuts to have to code in one language (e.g. CoffeeScript, TypeScript, Python) and debug in another (JavaScript) and switch my brain back and forth every few minutes. So I've ended up largely sticking with writing code directly in JavaScript.
Any good solutions to this? Are there replacements to the Chrome JavaScript console that supports those other languages?
Re: PyPy.js: A fast, compliant Python implementation for the web
#87So does this mean that since I'm better at Python than Javascript, I can now use this to make my web frontends in Python? Because that would be pretty sweet.
weren't you already able to do it with pyjamas/pyjs?
Pyjamas was based on GWT, right? So, a Java Framework translated to Python. It's as nice as running a pack of deer on a road with a truck.
Awful
Re: PyPy.js: A fast, compliant Python implementation for the web
#88Earlier quoted context omitted.
> In the end, we need a lightweight yet properly defined and highlevel language.... Even lua would be a joy!
Out of curiosity, what would make Lua valuable to add in browsers by default? It is similarly prototype-based, has the same closure design, is dynamically typed, has an object system fairly similar to JS (with the type of arrays and hashtables both mixed), and its number system is also based on floating-point numbers… I honestly don't see how we can justify the cost of adding Lua to browsers. I see the merit of Lua-t…
Lua 5.3 has both integer and floating-point types.
Re: PyPy.js: A fast, compliant Python implementation for the web
#89Earlier quoted context omitted.
Purescript is a Haskell-like language that is designed to output to javascript. It looks quite nice and has seen a lot of attention lately. It's even in GSoC.
The problem I have with "output to Javascript" languages is that debugging becomes hell. Line numbers no longer correspond to each other, for example. A slightly less-hellish but still annoying problem is that I often poke at things directly from the console when bugs happen, and this helps me a lot in debugging. However poking at the console requires using JavaScript, which is fine, but it would drive me nuts to hav…
Re: PyPy.js: A fast, compliant Python implementation for the web
#90Earlier quoted context omitted.
weren't you already able to do it with pyjamas/pyjs?
No, no, no!!! Pyjamas was based on GWT, right? So, a Java Framework translated to Python. It's as nice as running a pack of deer on a road with a truck. Awful