HNHacker News
TopNewBestAskShowJobs

redfox2

102 karma · joined June 17, 2021

submissionscomments
redfox2··on Brython: an implementation of Python 3 running in the browser
Wow I wasn't aware of those. But apart from the 2020 post, the others are pre-TS. Brython seems to have come a long way since TS came in
redfox2··on Brython: an implementation of Python 3 running in the browser
Guido mentioned he was focusing work on CPython to make Python faster
redfox2··on Brython: an implementation of Python 3 running in the browser
https://github.com/rayluo/brip

This brings standard PyPi packages to Brython

redfox2··on Brython: an implementation of Python 3 running in the browser
Please have a look at the last comment for all related content links - implementation, projects, doc etc.
redfox2··on Brython: an implementation of Python 3 running in the browser
Starboard is completely different from Brython, although it is cool. As for pyodide, it still involves proper working knowledge and literal implemetation of JS - Brython just needs you to know the bare basics, the rest is just pure Python
redfox2··on Brython: an implementation of Python 3 running in the browser
Pyodide still involves writing JS (literally). Brython just needs you to know the simple basics of JS (since the syntax is similar), and you're good to go with pure Python from there on.
redfox2··on Brython: an implementation of Python 3 running in the browser
Yeah, it has been there for quite some time, but has really started getting off the ground in about mid-late 2019 which is strange, since like you mentioned, the advent of TS. But slowly a lot of interest has been brewing over it, it's growing faster than ever, and has been attracting users/contributors a LOT only since the start of last year.

https://academy.cs.cmu.edu/

This is Carnegie Mellon's academy website, running on Brython. See the Brython Wiki page on their GitHub, they got a list there.

redfox2··on Brython: an implementation of Python 3 running in the browser
Yeah. Like I said, it could really do with more contributors who can work on these issues and add keep adding features. rayluo who is a major contributor (developed brip to support using regular PyPi packages with brython), for example, works at Microsoft, and most probably does this in his spare time. More people like this can help bring Brython up even more, so there's a majority coverage for what JS can do, with Brython. Joining their Groups forum really shows you how much they're working and how much they're dedicated to this. This is only going to keep growing, if more devs and contributors hop onto the project even in their spare time.
redfox2··on Brython: an implementation of Python 3 running in the browser
I discovered this about a month ago, and it deserves to go up to the sky.

The GitHub page is linked at the end.

Some articles/content that relates to this ([4] is pretty cool and definitely check it out, so is [6]):

[1] https://brython.info/static_doc/en/intro.html

[2] https://towardsdatascience.com/run-python-code-on-websites-e...

[3] https://stackabuse.com/an-introductory-guide-to-brython

[4] https://rayluo.github.io/brython-project-template/

[5] https://github.com/rayluo/brip

[6] https://github.com/brython-dev/brython/wiki/Brython%20in%20t...

[7] https://academy.cs.cmu.edu/ (CMU's academy website runs on Brython)

Here's the GitHub page: https://github.com/brython-dev/brython/

And the Wiki, for examples -https://github.com/brython-dev/brython/wiki/Brython%20in%20t...

If you're familiar with all that's going on with the source code or at least some parts of it, and have time to spare, do take the time out to contribute to this project. It's pretty insane what they're building.

You can join their Google Groups forum here: https://groups.google.com/forum/?fromgroups=#!forum/brython

redfox2··on Ask HN: How do you come to terms accepting a hard-worked project is going down?
I wasn't aware of that. Since the standards for a 'successful' project are relatively abstract, I had a very bad idea on what defines a good project. I'll work on it and get better. Thanks.
redfox2··on Show HN: A Python native engine for web development
I have no idea what you're saying lol
redfox2··on Show HN: A Python native engine for web development
But the issue when I avoid render_template() is this: I can't add the CSS file along with the HTML one, unless I create a <style> tag at the end of the file that has all of the CSS content. Can you comment on that?
redfox2··on Show HN: A Python native engine for web development
Oh render_template(), yeah. Thanks
redfox2··on Show HN: A Python native engine for web development
'This simplifies things, and you can use an in-memory StringIO object rather than a file. You can then return this string to flask as a text/html response and avoid Jinja2 entirely.'

I didn't think of this until you mentioned this, so might do that. But I don't get the 'avoid Jinja2 entirely' part. Jinja2 is avoided with the current syntax already (which is definitely changing).

About BeautifulSoup, the autoPrettify() function is actually from bs4, it is a dependency.

Yeah I know, camelCase IS unpythonic

Thanks again

redfox2··on Show HN: A Python native engine for web development
I always use snake_case. But the guy I'm working with always insists on using camelCase, though he's never used Java/c#/Go. I don't like it, so sometimes we make compromises there. Thanks for the advice
redfox2··on Show HN: A Python native engine for web development
Also, mighty thanks for actually taking the time out to check out the codebase. This is my first proper project, and I really appreciate this
redfox2··on Show HN: A Python native engine for web development
Yeah, you're absolutely right, I wasn't able to really think of another way to implement it. [2] was meant to be implemented with Flask, which is optional, so the files can directly be written to templates/ and static/. We're actually changing this. Can you give a few suggestions on how it must be implemented? We want to work on this