Live data from Hacker News

Skulpt: client side Python without preprocessing

skulpt.org

31–40 of 49 posts

Re: Skulpt: client side Python without preprocessing

#31
post #26

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.

I think it's important to distinguish user groups. No solution is best for all of them. For scientists or data analysts, jupyter notebooks are a great choice since they mirror the professional and research tools they'll use. For web development, an in-browser IDE like Cloud9 would be my choice to get an arbitrary room of adults up to speed. But for middle or high school audiences, or even adult beginners, solutions l…

> Jupyter notebook for instance can actually be a huge problem form someone trying to understand flow of control, since you can execute code blocks in an arbitrary order into the same runtime.

True. I usually don't let them know they can create several cells first. They use only one for a good part of the show.

Skulpt will lead to strange debugging sessions, and you really, really want them to learn how to debug autonomously asap. So having the same stacktrace in every env is very important.

Re: Skulpt: client side Python without preprocessing

#32
post #10

How long until we can compile Python to Web-assembly? EDIT: I just realized this can mean two things: 1. Compiling python source code to Web-assembly. 2. Compiling the python interpreter/compiler to Web-assembly.

The runtime is several Mo. Not worth it.

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

Re: Skulpt: client side Python without preprocessing

#34
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

Yesterday's discussion demonstrated quite a bit of interest in using Python everywhere:

Anvil: full stack web apps built only with Python | https://news.ycombinator.com/item?id=15584124 (Oct 2017, 195 comments) reply

Re: Skulpt: client side Python without preprocessing

#35
post #32

Earlier quoted context omitted.

The runtime is several Mo. Not worth it.

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 ?

Re: Skulpt: client side Python without preprocessing

#36
post #19
post #13

Earlier quoted context omitted.

I work as an engineer at https://datacamp.com , and we run the code directly on a server, but I've always thought it would be interesting to try building interactive programming exercises with Skulpt.

I'm a big fan of datacamp. You should definitely give this a try. It would be great to expand the reach of your lessons without the infrastructure overhead of every user hitting your server with their code. Hit up the skulpt dev listserve if you want some help. Or I'm at elliott@trinket.io. Plug: you could easily prototype this with Trinket embeds. Add #!/bin/python3 to the top of our Python (Skulpt) trinkets to get…

Thanks for the pointers, I'll definitely have to take another look at trinket.io! It would be cool to try some exercise submission + feedback with code highlighting all on the client side.

Re: Skulpt: client side Python without preprocessing

#39

Many people, especially kids, will at some point encounter an online learning tool where you can just run Python in the browser. Chances are the underlying interpreter is Skulpt. A short list of examples: - https://pythonroom.com : has a free online curriculum with more helpful error messages that kids can understand and real-time analytics for teachers - https://trinket.io : handles Python, turtle graphics, and pyga…

Yes, that kind of tool - that lets you run Python in a browser - can be useful. I had discovered, tried out and blogged about some of them earlier (also trinket.io, which you mention):

Codingbat, Progress Graphs and Michael Jordan:

(for Java and Python - when I tried it)

https://jugad2.blogspot.in/2013/02/codingbat-progress-graphs...

Online Python Tutor looks quite interesting:

(for Python)

https://jugad2.blogspot.in/2013/03/online-python-tutor-looks...

PythonMonk - learn Python in the browser:

(for Python)

https://jugad2.blogspot.in/2013/04/pythonmonk-learn-python-i...

glot.io, an open source pastebin with runnable snippets:

(for multiple languages)

https://jugad2.blogspot.in/2017/04/glotio-open-source-pasteb...

Some of them use emscripten, IIRC.

Edit: These tools are good for beginners to learn the basics of the language. For more complete learning, I still think the traditional method of using the command line tools such as the interpreter and a text editor, and an IDE, are useful and recommended. Interaction with the real OS is a part of the learning of any (at least industrial) programming language (maybe there are some specialized exceptions) - i.e. things such as files, databases, directories, users, processes, peripherals, etc. - and not much of that can be done in the browser-only environment that these tools have.

In fact, since I am a trainer too, I sometimes come across some of my students who do not know the basics of dealing with an operating system, even as a user. E.g. some of them can only use the PC via the GUI (e.g. in Windows) and are not familiar with the command line and its commands, or even with concepts such as drives, pathnames, filenames, absolute vs. relative paths, how to reference a file in dir B from dir A, etc. In such cases I always show them some of the basics of that stuff and give them references for further learning. And I tell them that if they do not learn that stuff (or look down on it, as a few of them tend to do), it is like knowing how to drive a car (programming) but not knowing how to walk from your house to the car and from the car to the shop - in other words, you are not fully capable to even use a car due to that :)

Re: Skulpt: client side Python without preprocessing

#40

Many people, especially kids, will at some point encounter an online learning tool where you can just run Python in the browser. Chances are the underlying interpreter is Skulpt. A short list of examples: - https://pythonroom.com : has a free online curriculum with more helpful error messages that kids can understand and real-time analytics for teachers - https://trinket.io : handles Python, turtle graphics, and pyga…

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.
Post reply on HN