Live data from Hacker News

A Python 3 implementation for client-side web programming

brython.info

71–80 of 120 posts

Re: A Python 3 implementation for client-side web programming

#71

Very impressive work! Issues with the examples: I got nobody walking on the 3d walker (Chrome on Ubuntu); also it was psychedelic fun clicking into negative territory on the pie chart.

I also enjoyed the negative territory over there : )

Re: A Python 3 implementation for client-side web programming

#72
While I would like to see Python in the browser, this isn't it. I would still prefer coffeescript or dart over brython. Both languages aren't that hard to learn, and brython is lacking many features which would make Python more pleasant to deal with...

However, because of performance reasons, the very features that make python unique, especially the type system, are more javascript-like than python-like.

What I would like to see is a Python-implementation which is mostly feature complete, along the lines of emscripten, but still has direct access to the dom or other javascript objects.

Re: A Python 3 implementation for client-side web programming

#73
post #64

Earlier quoted context omitted.

You could also block all images and CSS; that would make for a really terrible web experience though. Why limit yourself intentionally? As a web developer I'm not going to accommodate for users that intentionally turn off features that we've been fighting for years to standardize on.

I don't know. I think a lot of pages would be better with much less "design". You know, pages like HN where the text content is the most interesting part. Or most blogs.

Well, alrighty. I have no problem with you turning off CSS/images. But if you do, just please don't ask web developers to accommodate users like yourself. If you can disable those features, you also know how to re-enable them.

Re: A Python 3 implementation for client-side web programming

#74
post #59
post #39

Earlier quoted context omitted.

A better question: Is python really any better than JavaScript? Sure, it has advantages here and there. But there are things I like about JavaScript that are better than python. For example, having anonymous functions that are more than a single expression inside a lambda. Yes, I know you can declare a function inside another and you get a closure. But, JavaScript's syntax is just nicer.

Obligatory https://www.destroyallsoftware.com/talks/wat

Wow. I had never seen that. There are literally tears streaming down my face I was laughing so hard.

Re: A Python 3 implementation for client-side web programming

#75
post #39

Earlier quoted context omitted.

That's a silly complaint. Doesn't every language designer feel that their product is better than the thing it desires to replace?

A better question: Is python really any better than JavaScript? Sure, it has advantages here and there. But there are things I like about JavaScript that are better than python. For example, having anonymous functions that are more than a single expression inside a lambda. Yes, I know you can declare a function inside another and you get a closure. But, JavaScript's syntax is just nicer.

JavaScript's syntax being 'nicer' seems pretty subjective.

Re: A Python 3 implementation for client-side web programming

#76

For the curious, here's eight other fun implementations of "Python in JavaScript" to explore: https://github.com/jashkenas/coffee-script/wiki/List-of-lang...

One not mentioned in that list is Empythoned, which is the actual CPython engine compiled to JS using Emscripten.

Repo: https://github.com/replit/empythoned

Live demo: http://repl.it/languages/Python

Re: A Python 3 implementation for client-side web programming

#77
post #34
post #30

I can't believe all the negative comments here. Someone has implemented Python in JavaScript. I personally think that is incredible.

I think it's the hubris that's putting people off: > Brython is designed to replace Javascript as the scripting language for the Web

"It will" would register as hubris, but "designed to" seems harmless to me.

Re: A Python 3 implementation for client-side web programming

#78
post #43

IMHO, This comment page is an interesting example to how unreasonably emotional programmers can be about their technology. It looks as though, some developers are almost insulted by the idea, that someone tried to replace a language that is so commonly accepted, and that they have worked so hard to master. This also happens in many other fields of science/technology, but I'm always surprised to see it among programme…

If Chrome, Firefox and maybe even IE came out with support for python as a client side scripting language, the very same people here on this comment thread would happily jump on it and try to use it. The point is not about replacing one with another, but HOW it is done.

Re: A Python 3 implementation for client-side web programming

#79
post #28
post #26

Earlier quoted context omitted.

Javascript is a prerequisite of the modern web. Refusing to accept that is absurd.

>Javascript is a prerequisite of the modern web. Citation needed.

It is part of the HTML5 spec, which is what modern browsers implement. Not supporting Javascript is not a design goal of the HTML5 project.

Re: A Python 3 implementation for client-side web programming

#80
I don't mean to rain on anyone's parade, but how come opalrb hasn't gotten this much attention on HN (although it is a bit different from this)?

There seems to be this gah a fucking ruby developer/thing, again motif going on around HN (was hurtful at first) that makes it harder to discover cool and new ruby things!

P.S: although Python is nit my goto language, I still find this brilliant!

Post reply on HN