News for hackers. Stuff that matters.
Re:Brython – A Python 3 implementation for client-side web p... by zaro on Monday July 06, 2020 @06:17AM (#23746319)
So now we can write web apps in one of most inappropriate languages for frontend development.

White space significant, good luck minifying it.

No anonymous functions, yes you need to have name for that callback, even though it's simply disabling a button.

Webpack does a great job of handling assets by simply importing/require them in the code. Python import system, can't support that kind of importing.

And of course there is the performance. Python is generally slower than JS, and then on top of that you are running Python interpreter in the JS VM.

Re:Brython – A Python 3 implementation for client-side web p... by kabacha on Monday July 06, 2020 @07:29AM (#23746763)
> So now we can write web apps in one of most inappropriate languages for frontend development.

Implying that javascript was ever appropriate.

> White space significant, good luck minifying it.

Just gzip it. Minifying is highly overrated to begin with.

> No anonymous functions, yes you need to have name for that callback, even though it's simply disabling a button.

Lambdas are supported, what do you mean?

> Webpack does a great job of handling assets by simply importing/require them in the code. Python import system, can't support that kind of importing.

What does this even mean?

Re:Brython – A Python 3 implementation for client-side web p... by jbreckmckye on Monday July 06, 2020 @08:52AM (#23747332)
> Implying that JavaScript was ever appropriate

Can we please stop doing the 4chan-esque snarky >implying ? It's not discussion in good faith.

> Minifying is highly overrated to begin with

Compression is not magic and minifying has real world performance gains in JS projects at least - I don't see how Python would be different here.

> Lambdas are supported

If you want to write your event handlers - which in UI programming is a lot of your code - in a point-free style, then I think you'll be letting yourself in for a lot of hassle.

> Webpack... What does this even mean?

I don't know Python too well, but I assume this is about the ability of Webpack to overload import semantics with non-code dependencies (e.g. importing stylesheets, icons, bits of JSON). Presumably Brython does not support this.

You seem quite bullish about the strengths of this project. Exactly what problems do you feel it solves? Assuming that we already have tooling like Webpack and are able to write in either ES2020 or TypeScript, what do you think we gain from writing our UI code in Python?

Re:Brython – A Python 3 implementation for client-side web p... by VectorLock on Monday July 06, 2020 @11:17AM (#23748809)
>Compression is not magic and minifying has real world performance gains in JS projects at least - I don't see how Python would be different here.

How much are the gains with minifying (factoring out compression) anyways? I'm sure they're somewhat faster, but enough to justify the step/obfuscation (assuming obfuscation isn't a goal)

Re:Brython – A Python 3 implementation for client-side web p... by sillysaurusx on Monday July 06, 2020 @07:33AM (#23746782)
Lambdas are an awful limitation of Python. I find myself running into "no statements in lambdas" more often than not. I hate Python lambdas.

The rest of your points are fine though.

Re:Brython – A Python 3 implementation for client-side web p... by quietbritishjim on Monday July 06, 2020 @07:42AM (#23746837)
If a function is so long it requires multiple statements, is it really so bad to give it a name and a separate line of code from its use? Personally I'd find that clearer, even if the language didn't enforce it.

Edit: Just in case anyone isn't aware, in Python, nested named functions have precisely the same capture rules as lambdas, so it's never a problem to replace a Python lambda with a normal function (except personal preference about code style). This is particularly in contrast to JavaScript where arrow functions are so popular partly because of their different relationship with `this` to other functions. And normal nested functions defined with `def foo():` have a benefit: they have their name attached to the object, so a traceback involving it will be clearer, which isn't true for `foo = lambda ...` or `bar(fn=lambda...)`.

Re:Brython – A Python 3 implementation for client-side web p... by sillysaurusx on Monday July 06, 2020 @08:12AM (#23747052)
In practice? Yeah. It sucks. In Javascript, I'd simply add curly braces and be done with it.

Code is meant to be clear. And often times with Python lambdas, there's no reason to give the function a name. It's a callback. What would you name it? "Callback"? You're adding extra complexity for no gain.

But, whatever. It is what it is. Javascript has its own pile of limitations. I was just saying that Python isn't a flawless butterfly.

Re:Brython – A Python 3 implementation for client-side web p... by quietbritishjim on Monday July 06, 2020 @08:26AM (#23747139)
Yes just call it "callback" if necessary. In the situations I'm imagining, that would still make the code clearer than using one statement to cram in both the definition of the multi-statement function and the use of it in another function.

But maybe we're imagining different situations, and maybe that's the real reason we don't share the same point of view.

Re:Brython – A Python 3 implementation for client-side web p... by Drew_ on Monday July 06, 2020 @12:02PM (#23749274)
> It's a callback. What would you name it? "Callback"? You're adding extra complexity for no gain.

Anon callbacks are annoying for anybody who needs to debug performance. I don't see how naming functionality increases complexity either.

Re:Brython – A Python 3 implementation for client-side web p... by mlthoughts2018 on Monday July 06, 2020 @08:20AM (#23747101)
100% this. When I write Javascript or Scala, I do this anyway just because it’s a better way to structure code.

Nested anonymous functions that contain complex bodies and rely on scope closure of args or local variables inside the complex bodies of exterior anonymous functions needs to stop being a thing, in any language, anywhere. It’s a massive antipattern.

Same for using functional programming constructs like map or filter or reduce with complex multi-statement nested anonymous functions. “Inlining” your anonymous function when it’s not just a simple statement is simply a terrible idea across the board.

It’s like living in crazy town to see that style defended as reasonable or treated like it’s valuable for a use case, etc.

Re:Brython – A Python 3 implementation for client-side web p... by pansa2 on Monday July 06, 2020 @08:37AM (#23747223)
> It’s a massive antipattern.

Yes! I used to be on-the-fence about this, but then had to try and decipher code like YDKJS’s `run` [0]. Four levels of nested functions!

Python’s syntax makes this sort of thing impossible, which I now consider to be a good thing.

[0] https://github.com/getify/You-Dont-Know-JS/blob/1st-ed/async...

Re:Brython – A Python 3 implementation for client-side web p... by linkdd on Monday July 06, 2020 @08:52AM (#23747330)
Because you can write bad code using a pattern does not make it an anti-pattern.

Thanks to ES6, the async/await keyword for Promises help you get rid of the callback hell that Javascript can easily be.

Python support of asynchronous code is far behind Javascript and it is the basic requirement of frontend development.

Re:Brython – A Python 3 implementation for client-side web p... by jnwatson on Monday July 06, 2020 @09:37AM (#23747711)
Huh? Python async has been in the lead for quite a while now. The only thing it doesn’t have is anonymous inline function syntax.
Re:Brython – A Python 3 implementation for client-side web p... by linkdd on Monday July 06, 2020 @01:17PM (#23750087)
Node's design of Worker Thread, Promise and async/await makes an easier combo than Python + asyncio/trio which requires a lot of work to get it done.

But in the end, use what works for you, and if you need performance, you still have Go, Rust, and/or C++.

Re:Brython – A Python 3 implementation for client-side web p... by linkdd on Monday July 06, 2020 @08:48AM (#23747294)
Functional programming constructs helps you write simple code faster, and clarify the algorithm.

It is easier to rearrange, to test and to reason about, but it is harder to read.

Once your fast-written code works, you obviously need to optimize it where it's needed. And if you map/filter/reduce is your bottleneck, just get rid of it obviously.

But I highly doubt it will be your bottleneck.

Nested anonymous function that rely on scope closure is THE way to truly encapsulate your data, example: https://pastebin.com/JrAP6yGP

IMHO, the factory pattern is a clearer/easier pattern than Javascript's classes/prototypes.

Re:Brython – A Python 3 implementation for client-side web p... by heavyset_go on Monday July 06, 2020 @12:44PM (#23749705)
I've been writing Python professionally for a while now, and the one thing I always want to reach for are multi-line anonymous functions. However, I do appreciate how Python prevents some of the callback hell one can encounter in JavaScript codebases.

There is a difference between abusing anonymous functions, and situations where anonymous functions might be called for, where it just so happens that those functions require more than one line of code.

Re:Brython – A Python 3 implementation for client-side web p... by zaro on Tuesday July 07, 2020 @02:55AM (#23756463)
>If a function is so long it requires multiple statements, is it really so bad to give it a name and a separate line of code from its use? Personally I'd find that clearer, even if the language didn't enforce it.

Sometimes this is the case. But let's take for example filtering an array. Do you really want to give names for the callback that will filter? Also I find it more readable if the logic doing the filtering is right there where the filter call is, and not somewhere above.

Re:Brython – A Python 3 implementation for client-side web p... by EamonnMR on Monday July 06, 2020 @09:14AM (#23747522)
It sort of is a pain point because you need to move the code out of wherever the lambda was into its own block elsewhere. Breaks up the flow and is awkward. I'd love to see some kind of block lambda syntax in Python. The one drawback of whitespace syntax...
Re:Brython – A Python 3 implementation for client-side web p... by mixmastamyk on Monday July 06, 2020 @10:54AM (#23748549)
"Whitespace syntax" is not the problem. It is that Guido thinks that the anonymous callback style is harder to read and therefore something to avoid most of the time. I tend to agree.
Re:Brython – A Python 3 implementation for client-side web p... by EamonnMR on Tuesday July 07, 2020 @11:38PM (#23766666)
It's the problem inasmuch as the way you'd spell an anonymous block is non-obvious considering that it would have to work as an argument to a function or element of a literal and in both of those cases indentation is freeform.
Re:Brython – A Python 3 implementation for client-side web p... by mixmastamyk on Wednesday July 08, 2020 @01:52PM (#23772361)
Given that lambda won't accept more than one expression even on its own dedicated line, I think the discussion is moot.

I could imagine a working syntax as indentation already works properly between parens and brackets.

Re:Brython – A Python 3 implementation for client-side web p... by VectorLock on Monday July 06, 2020 @11:18AM (#23748830)
And I think a lot of people are starting to realize that "callback spaghetti" might not be the best structure to give your code either.
Re:Brython – A Python 3 implementation for client-side web p... by michaelcampbell on Monday July 06, 2020 @09:30AM (#23747639)
> > So now we can write web apps in one of most inappropriate languages for frontend development.

> Implying that javascript was ever appropriate.

No such implication was ever made. That 1 < 2 doesn't make 2 infinity.

Re:Brython – A Python 3 implementation for client-side web p... by captainbland on Monday July 06, 2020 @08:23AM (#23747122)
The only thing with 'just gzip it' is that actually minification+gzip does seem to give slightly better results than just gzipping it. This is partly going to be because there are some things that gzip doesn't know it can remove that a minifier does - e.g. comments. Presumably this difference is exacerbated if your codebase uses long/descriptive names and many long comments. Not that this is a particular problem for Python on the web of course because minifiers do exist for it.
Re:Brython – A Python 3 implementation for client-side web p... by marcosdumay on Monday July 06, 2020 @08:36AM (#23747213)
On Javascript, maybe so.

But Python has different character chain probabilities and will compress differently.

Re:Brython – A Python 3 implementation for client-side web p... by zaro on Tuesday July 07, 2020 @02:24AM (#23756292)
> Lambdas are supported, what do you mean?

Lambdas are not functions. You can't have statements in them, only expressions. So no, they don't cut it as anonymous functions.

>> Webpack does a great job of handling assets by simply importing/require them in the code. Python import system, can't support that kind of importing.

>What does this even mean?

It means that in JS you can do "require('./image.png')" and webpack will automatically handle the image for you. Python doesn't have any way to import anything that is not .py file.

Re:Brython – A Python 3 implementation for client-side web p... by beowulfey on Monday July 06, 2020 @07:53AM (#23746917)
This is some pretty intense negativity. What's wrong with doing something just for the hell of it? People will choose naturally whichever may be the most efficient methods.

There is no reason to shit on someone's work just because you think it was a bad idea. It's already done, and it can coexist in the universe with you.

Re:Brython – A Python 3 implementation for client-side web p... by shermheadryder on Monday July 06, 2020 @08:30AM (#23747172)
> What's wrong with doing something just for the hell of it?

That isn't the goal of this project though. From https://brython.info/static_doc/en/intro.html:

> Brython's goal is to replace Javascript with Python, as the scripting language for web browsers.

Given that stated aim, I feel like the original criticisms have their place here.

Re:Brython – A Python 3 implementation for client-side web p... by ZephyrP on Monday July 06, 2020 @09:06AM (#23747450)
> There is no reason to shit on someone's work just because you think it was a bad idea. It's already done, and it can coexist in the universe with you.

If zaro is wrong (and people pounce on him for being technically wrong), Brython will indirectly be vindicated. If he's right, it's the perfect opportunity for break down just how right he is; e.x, if future client-side languages will be shaped by their suitability for minification or if content compression obviates this.

I think even for new projects, this is good. Nobody arrogates themselves to the belief their project will be as influential as the most well known projects started just for fun (n.b "Just For Fun, Torvalds (2002)") and no critical commenter should pretend they are with replies that hide hostility behind concern for our future... but by the time news of it's development has reached us here, the sliver of chance that Brython will join their ranks is no longer microscopic. I'm reminded of early CoffeeScript (and even Javascript itself), which could have avoided numerous pitfalls with early constructive(!) criticism from cantankerous commentators.

No matter what, the armchair quarterbacks will be taken down a notch if they're wrong and are worth your time otherwise. Those early complaints help decide if your future is filled with a junkyard of half-baked software or manages to harness our collective wisdom (with a healthy dose of individual discretion) to refine itself into something elegant and powerful.

It's not that hard to see Brython doing just that either; you don't need to be Nostradamus to foretell a prophecy of an easy-to-use, "just works" implementation of Python3 in the browser profoundly altering the current landscape, shaping our future toolbox and even what software is thought possible.

Re:Brython – A Python 3 implementation for client-side web p... by hevelvarik on Monday July 06, 2020 @08:31AM (#23747177)
He could have presented less snarky, but the comment is appropriate and helpful. The comments are the low effort way to get a feel for the technical viability of the tech featured in the main post.
Re:Brython – A Python 3 implementation for client-side web p... by KaiserPro on Monday July 06, 2020 @06:32AM (#23746399)
> So now we can write web apps in one of most inappropriate languages for frontend development.

why should JS have all the fun!?

Re:Brython – A Python 3 implementation for client-side web p... by rburhum on Monday July 06, 2020 @08:10AM (#23747035)
You know, this idea that removing whitespace is the best way to reduce code size for delivery can be debunked by any student that takes a compiler class. That technique + gzip is a shortcut that we have taken as a defacto “right way” of delivering web code (of course taking out the whole conversation of WebAssembly). Perhaps something good can come up out of this - just like people pissed all over the idea of js on the server when node.js came out, perhaps this has the potential of doing the reverse on the client side. Stay open minded.
Re:Brython – A Python 3 implementation for client-side web p... by andybak on Monday July 06, 2020 @06:33AM (#23746408)
I'm not sure if any of the points you raise would be a deal breaker when set against the potential advantages for some people.

For example: "I have code that already exists in Python that I want to reuse in a browser" or "I am fluent and very productive in Python and I just need to get shit done".

I don't think anyone expects this to replace javascripts for normal public-facing web development. Do they?

Re:Brython – A Python 3 implementation for client-side web p... by giancarlostoro on Monday July 06, 2020 @07:56AM (#23746949)
> White space significant, good luck minifying it.

While I cant vouche for this implementation if you want to minify Python you compile it to bytecode and run that. Works wonders for embeded deployments of Python.

Re:Brython – A Python 3 implementation for client-side web p... by blumomo on Monday July 06, 2020 @06:41AM (#23746444)
Noone asks you to use Brython. People familiar with Python might prefer writing their frontend code in Python just because they are already familiar with it.

The following argument isn't necessary for folks who do want Python in frontend but still, not all of your points hold true, Python can handle multiple commands in a single line and it does have anonymous functions: lambda.

Re:Brython – A Python 3 implementation for client-side web p... by dghf on Monday July 06, 2020 @06:58AM (#23746544)
> Noone asks you to use Brython.

From the article:

> Brython is designed to replace Javascript as the scripting language for the Web.

So it does sound like they are asking people to use Brython instead of JavaScript.

> it does have anonymous functions: lambda.

But they're not fully featured functions, though, being restricted to a single expression.

Re:Brython – A Python 3 implementation for client-side web p... by blumomo on Monday July 06, 2020 @07:07AM (#23746597)
I would differentiate between marketing speak (designed to replace Javascript) and the practical implications of Brython (designed for folks who want to use Python in frontend)
Re:Brython – A Python 3 implementation for client-side web p... by jbreckmckye on Monday July 06, 2020 @08:57AM (#23747382)
If I were a JS developer who only wanted to write JS, but I needed to do a database query, should I look for a database that lets me write queries in JavaScript (or a language basically interchangeable with JS)? Or should I just learn SQL?

Sometimes as a programmer you need to learn new tools for new domains, and that's not necessarily a bad thing.

Re:Brython – A Python 3 implementation for client-side web p... by linkdd on Monday July 06, 2020 @09:08AM (#23747468)
This.

Too often I've seen companies stuck with an old framework just because their developers are used to it. That's how you get a microservice architecture in Java where each containers takes 300MB of space, and requires 1GB of memory.

Re:Brython – A Python 3 implementation for client-side web p... by Godel_unicode on Monday July 06, 2020 @01:21PM (#23750155)
I'm frankly amazed that the people who brought us node.js haven't also created a JS query language, furthering the spread of the triple-equals to new and greater heights.
Re:Brython – A Python 3 implementation for client-side web p... by 7952 on Monday July 06, 2020 @07:41AM (#23746831)
I wonder if those kind of anoymous functions could be replaced using coroutines? So an event handeler could look like...

  async for event in element.on("click"):
    console.log("click")
Re:Brython – A Python 3 implementation for client-side web p... by MattGaiser on Monday July 06, 2020 @08:30AM (#23747168)
We routinely dump 3Mb images on every webpage. I think we can spare a bit of space for spaces.
Re:Brython – A Python 3 implementation for client-side web p... by devxpy on Monday July 06, 2020 @07:37AM (#23746803)
A white space is just a newline and an indent.

The newline is mandatory, but the indents can be truncated easily using pyminifier - https://liftoff.github.io/pyminifier/

Re:Brython – A Python 3 implementation for client-side web p... by thefounder on Monday July 06, 2020 @07:25AM (#23746728)
Believe it or not most server-side developers find javascript ecosystem an awful experience so I doubt they care about Webpack or any of the JS "innovations". The speed is not really an issue given that most of the client apps just call DOM/Web API functions.
Re:Brython – A Python 3 implementation for client-side web p... by wutbrodo on Monday July 06, 2020 @12:04PM (#23749291)
Yea, there always seems to be a disconnect in these conversations between people who aren't yet used to Javascript's grotesqueness and those who are desensitized to it. Javascript was so horrible for so long, and remained horrible every time I tried it because "seriously, it's good now", that there's a fairly significant threshold to get me interested in using it when any other alternative is available.

Naturally, if I was making a decision for a company I worked at, I would do my due diligence and likely end up using JS for any of a number of reasons that don't have to do with how unpleasant and unproductive working in the language is. But for personal projects, I'd happily use something like this, short of discovering a show-stopping problem with it.

The thread OP comment just seems like classic defensiveness about JS; a project like this is never going to be literally perfect for corporate production use on day one or but it doesn't need to be to be useful. Even on the off chance that it were to grow into something widely useful, at that point you'd see a lot of powerful actors polishing off the rough edges. This is exactly what happened to Javascript: the only reason it's defensible at all is because of the millions of dollars poured into it and its ecosystem by companies like Google, Mozilla, etc

Re:Brython – A Python 3 implementation for client-side web p... by skocznymroczny on Monday July 06, 2020 @06:27AM (#23746371)
Couldn't you just sent the bytecode .pyc instead to fix the no minification issue?
Re:Brython – A Python 3 implementation for client-side web p... by meredydd on Monday July 06, 2020 @06:29AM (#23746381)
This is exactly what BeeWare's Batavia does: compile to bytecode server-side, then run a remarkably small interpreter in the browser. This is a substantial win: parsing is a CPU hog, and Brython's architecture does it every time the page loads.

That said, in order to support `eval` and friends, you still need a full-fat compiler in the browser. So the best route is probably to use a full-service Python->JS compiler, but compile most of the code ahead of time. That's where we're heading with Anvil (we use https://skulpt.org for the client side, but it's the same principle).

My colleague wrote up a pretty wide-ranging comparison of browser-based Python interpreters. It describes how (and why) Brython, Batavia, Skulpt, Transcrypt, and Pyodide differ, and the tradeoffs they're chasing:

https://anvil.works/blog/python-in-the-browser-talk

Re:Brython – A Python 3 implementation for client-side web p... by StavrosK on Monday July 06, 2020 @07:32AM (#23746781)
In twenty years of professional Python development, I've never used eval once. I'm not saying nobody ever needs it, but it's a niche feature that the vast majority of programs can do without, and is probably not worth the tradeoff.
Re:Brython – A Python 3 implementation for client-side web p... by _ZeD_ on Monday July 06, 2020 @08:26AM (#23747140)
have you ever used namedtuple? then you have: https://bugs.python.org/issue3974
Re:Brython – A Python 3 implementation for client-side web p... by duckerude on Monday July 06, 2020 @10:30AM (#23748261)
namedtuple could be implemented without exec/eval, and nowadays, it almost is.

This is the only part left that uses it, to create the constructor: https://github.com/python/cpython/blob/master/Lib/collection...

Even there it's not strictly necessary. You could accomplish the same thing with a variadic function that does its own argument parsing, it'd just be slower and not play as well with reflection. So you could port it to a Python implementation without eval().

Re:Brython – A Python 3 implementation for client-side web p... by danijar on Monday July 06, 2020 @10:24AM (#23748198)
It's necessary if you want to offer an interactive Python shell in the browser, e.g. for websites that teach programming or otherwise use programming as a means of user interaction.
Re:Brython – A Python 3 implementation for client-side web p... by airstrike on Monday July 06, 2020 @11:38AM (#23749042)
Which is like 0.0001% of the web
Re:Brython – A Python 3 implementation for client-side web p... by jononor on Monday July 06, 2020 @08:06AM (#23747013)
You probably have used a Python REPL though? Either on commandline or in iPython shell or similar. This relies on eval type functionality somewhere in the chain.
Re:Brython – A Python 3 implementation for client-side web p... by cellularmitosis on Monday July 06, 2020 @06:42AM (#23746455)
Whitespace isn't the important part of minification. Content-encoding: gzip can handle that.
Re:Brython – A Python 3 implementation for client-side web p... by weego on Monday July 06, 2020 @06:31AM (#23746391)
This is just a python interpreter. pyc is useless here
Re:Brython – A Python 3 implementation for client-side web p... by pletnes on Monday July 06, 2020 @06:41AM (#23746448)
The interpreter interprets bytecode, i.e .pyc
Re:Brython – A Python 3 implementation for client-side web p... by marcosdumay on Monday July 06, 2020 @08:44AM (#23747277)
That's a great list of non-issues.

The question being avoided is: how does the ergonomics of DOM and network access fit on both?

From the examples, it's mostly similar.

Re:Brython – A Python 3 implementation for client-side web p... by tzs on Monday July 06, 2020 @03:15PM (#23751618)
> White space significant, good luck minifying it

Would it be hard to define an alternate representation of Python code that uses curly braces instead of white space to use over the wire for delivery of front-end Python (with curly braces that occur in the original Python code escaped)?

This code, for example:

  def func(foo, bar):
    if foo < bar:
      foo += bar
    return foo * 3
might become on the wire:

  def func(foo, bar):{if foo < bar:{foo += bar}return foo * 3}
That could then be subject to the usual minimization approaches.

Going back from curly representation to significant white space is easy and fast, although you could probably build your tokenizer so that it never even has to bother. That could make the client side handling of this essentially free.

Re:Brython – A Python 3 implementation for client-side web p... by dfox on Monday July 06, 2020 @05:36PM (#23753065)
Both CPython's parser and Python language grammar works in terms of indents/dedents being represented by brace-like tokens, so this is trivially possible transformation.
Re:Brython – A Python 3 implementation for client-side web p... by dragonwriter on Monday July 06, 2020 @06:11PM (#23753388)
> White space significant, good luck minifying it.

Brython supports precompilation to JS, which is obviously minifiable.

> on top of that you are running Python interpreter in the JS VM.

No, you aren't. Brython is not a Python interpreter, but a compiler to JS. There are optimization issues from the need to maintain Python semantics interfering with optimizing the JS, but that's not the same as running a Python interpreter.

Re:Brython – A Python 3 implementation for client-side web p... by mesaframe on Monday July 06, 2020 @08:22AM (#23747111)
Well, you are just nit picking arguments to attack Python. If compared independently anyone would choose Python over JavaScript.
Re:Brython – A Python 3 implementation for client-side web p... by azangru on Monday July 06, 2020 @08:52AM (#23747333)
I would choose typescript over either; but if not given such an option, would choose javascript over python.
Re:Brython – A Python 3 implementation for client-side web p... by zaro on Tuesday July 07, 2020 @02:17AM (#23756257)
Same here.
Re:Brython – A Python 3 implementation for client-side web p... by hombre_fatal on Monday July 06, 2020 @05:54PM (#23753242)
Node shows that this is false. You live in a 2002 bubble if you still think anyone would choose any language over Javascript any time. Python to me only ranks above PHP and I wouldn't use it at all if it weren't for its math/ML subcommunities.
Re:Brython – A Python 3 implementation for client-side web p... by fiddlerwoaroof on Monday July 06, 2020 @02:26PM (#23751051)
I guess I'm not anyone, then: given a choice, I'd pick JavaScript over most non-Lisps
Re:Brython – A Python 3 implementation for client-side web p... by tcbasche on Monday July 06, 2020 @06:29AM (#23746377)
> White space significant, good luck minifying it

Surely it sends the bytecode to be run by the interpreter...

Re:Brython – A Python 3 implementation for client-side web p... by zaro on Tuesday July 07, 2020 @02:15AM (#23756247)
Did take a look at least one example? It's python code embedded in script tag. I don't see any byte code.
Re:Brython – A Python 3 implementation for client-side web p... by hxzhao on Monday July 06, 2020 @11:04AM (#23748684)
first of all, I don't think "most inappropriate languages for frontend development" is a thing, it is just a new way to do web dev that is different to what you used to be doing with. If you don't think it is an approach that you prefer/can accept, you can just move on continue with whatever you like. You should learn from the people who built Brython, they don't like the way how the current web is being built - hence they continue doing what they believe its right, BUT wihtout putting shit on other's people's work.
Re:Brython – A Python 3 implementation for client-side web p... by zaro on Tuesday July 07, 2020 @02:14AM (#23756240)
There are people who think images and JS are far too much for the Web (you can often read comments like that on HN) and want pure text only Web. Should we learn from them too?

I don't mean to put shit on any body's work. I am just noting several obvious flaws to the idea. Now it might sound like putting shit, I don't know, but I am not native speaker so sometimes I guess I am using the wrong tone/working.

The real question for me is why it's such a big deal? In the end its simply an opinion.

Re:Brython – A Python 3 implementation for client-side web p... by pjmlp on Monday July 06, 2020 @07:00AM (#23746562)
We already could do that back in 2000, provided the user had IE installed, via ActiveX. I have provided the links in another comment.