Live data from Hacker News

Skulpt: client side Python without preprocessing

skulpt.org

41–49 of 49 posts

Re: Skulpt: client side Python without preprocessing

#42

Earlier quoted context omitted.

(Contributor to skulpt and pypy.js here) That is a difficult question to ask and I think the original developer of pypy.js Ryan Kelly is most suited to answer it. There are some people that have tried feeding the asm.js from pypy.js to the asm.js -> wasm compiler. Which with a lot of fiddling may work for the non-jitted version. But if you want all the pypy speed you'll want to jit wasm to the browser. I would love t…

As Albert-Jan and I discussed at PyCon this weekend, the long-term future for Skulpt quite possibly involves compiling to WASM rather than Javascript. This is very unlikely to happen until every modern browser supports WASM. Neither Trinket's educational mission nor Anvil's "web apps for the world" mission are compatible with leaving users behind just because their workplace or school runs IE. The runtime can be rema…

What @meredydd means is, leaving the compiler written in javascript but emitting wasm, so compiling python into wasm with javascript. Too many compilers! :P

Re: Skulpt: client side Python without preprocessing

#45
creator of http://pythontutor.com/ here ... skulpt is great and i know one of its maintainers quite well. one use case that's important is using it to distribute self-contained zero-install tutorials onto computers such as school machines and those in less-well-resourced parts of the world without good Internet access. you can deliver an HTML/CSS/JS zip file on a USB stick or CD-ROM and get lessons up and running even without Internet access.

that said, though, one reason I haven't made the plunge to Skulpt and still choose to run Python server-side is that as students get more advanced, they will inevitably run into edge cases and other weird behavior where skulpt will not match CPython, and the error messages and other outputs they get will become inconsistent with expectations. that's why i still continue to run CPython server-side in a sandbox for http://pythontutor.com/

Re: Skulpt: client side Python without preprocessing

#46
post #2

Hi there! One of the Skulpt maintainers here. (Also founder of Anvil - https://anvil.works . Never thought I'd have two projects on the front page at once!) Feel free to ask any questions about the gory internals and how it works. You might also enjoy my talk from PyCon US this summer, about how Skulpt compiles blocking Python code into non-blocking Javascript: https://anvil.works/blog/pycon-talk

It would be good if there was some compatibility between Skulpt and Brython an equivalent to Pip that worked on both would be great.

Re: Skulpt: client side Python without preprocessing

#47
post #40

Earlier quoted context omitted.

Python dev and trainer here. Skulp is terrible as a python implementations go. Error reporting is meh. Many advanced features are not supported. Brython is a much better alternative. More complete and robust. However, i advise against running a js python in general. Exposing secured and isolated jupyter notebooks is much better for learning.

High School CS teacher here. Repl.it has always done me a treat, I've have had one or two odd bugs but 99% fine and they're adding nice features aimed at education too.

Thanks for mentioning that. I'd never heard of it; playing with it now, and it seems very nice indeed!

Re: Skulpt: client side Python without preprocessing

#48
post #32

Earlier quoted context omitted.

Could be worth it in many cases. Something more "app like" than "website like" where users would tolerate a longer initial startup time.

Apps are already slow enough as it is don't you think ?

Depends which ones you're talking about. I get the feeling we're talking at cross purposes.

Re: Skulpt: client side Python without preprocessing

#49

Earlier quoted context omitted.

(Contributor to skulpt and pypy.js here) That is a difficult question to ask and I think the original developer of pypy.js Ryan Kelly is most suited to answer it. There are some people that have tried feeding the asm.js from pypy.js to the asm.js -> wasm compiler. Which with a lot of fiddling may work for the non-jitted version. But if you want all the pypy speed you'll want to jit wasm to the browser. I would love t…

As Albert-Jan and I discussed at PyCon this weekend, the long-term future for Skulpt quite possibly involves compiling to WASM rather than Javascript. This is very unlikely to happen until every modern browser supports WASM. Neither Trinket's educational mission nor Anvil's "web apps for the world" mission are compatible with leaving users behind just because their workplace or school runs IE. The runtime can be rema…

> This is very unlikely to happen until every modern browser supports WASM

WASM ships in every evergreen browser today: http://caniuse.com/#feat=wasm

Only significant browser missing it is IE; only Edge has support.

Post reply on HN