Live data from Hacker News

Google Mesop: Build web apps in Python

github.com

61–70 of 78 posts

Re: Google Mesop: Build web apps in Python

#61

What's with the obsession of writing web apps in Python? > Build custom UIs without writing Javascript/CSS/HTML Why? These three were built for the web and work flawlessly. I doubt that an abstraction built on top of these will result in faster development times. The State Management guide[1] explains state and then explains the usage. If you know Python and want to build a UI with it you'll have to read the guides.…

Counterpoint: you have made a fun and interesting thing in Python that works great in your command line/Jupyter notebook. You want to share it with your non-developer friends/anyone who might be interested, so you need some kind of interactive GUI, and the easiest one is a web page of some kind. But you don't want to learn a whole new stack because web development is really not Your Thing.

So you use something like Dash, Streamlit, or this, which allows you to do everything in Python and put up something that looks reasonably professional but does not require a great deal of time or effort. Or get serious and do it in Flask or Django.

From your other comment: But you don't need that. You can create amazing user experiences with a plain HTML, CSS and a JS file.

What do you consider the best example material for that? The reason us Python programmers (many of whom are amateurs) are so leery of Javascript et al is because most commercial websites are so hideously complicated, and most of us are just not interested in front end stuff or we would have started out with Javascript in the first place.

I've said it before, what most Python programmers want for UI is something like Visual Basic used to do - just a simple canvas with a palette of standard UI components that can be thrown together like Lego and doesn't look like a complete mess.

Re: Google Mesop: Build web apps in Python

#62

Earlier quoted context omitted.

It appeals to me. I don't write fronted code, but sometimes I want a frontend, even if it's really dinky. This seems way more approachable to me than learning JS/all the shit you have to deal with to write a non-toy ui

Let's say you want a frontend for your server and have never written HTML before. Where so you start? If you have decided on using Python for the UI you have a handful of libraries each with their own documentation. To get started you need to choose one and then read the guides. If you decide to use HTML you have a whole lot more resources. I'd argue you'll be able to make a frontend faster using this approach. I und…

While you may be able to create amazing experiences in JavaScript, JavaScript still has multiple problems:

1. It is inconsistent [1]

2. It does not have many features that programmers love and other languages have.

3. It has a community that holds different values from what other programmers value themselves.

If people want to continue development in JavaScript, they can. But since JavaScript has a monopoly on the (fairly large) 'frontend development for the web' market, there will always be attempts to find an alternative.

[1] https://www.destroyallsoftware.com/talks/wat

Re: Google Mesop: Build web apps in Python

#63

Earlier quoted context omitted.

Let's say you want a frontend for your server and have never written HTML before. Where so you start? If you have decided on using Python for the UI you have a handful of libraries each with their own documentation. To get started you need to choose one and then read the guides. If you decide to use HTML you have a whole lot more resources. I'd argue you'll be able to make a frontend faster using this approach. I und…

While you may be able to create amazing experiences in JavaScript, JavaScript still has multiple problems: 1. It is inconsistent [1] 2. It does not have many features that programmers love and other languages have. 3. It has a community that holds different values from what other programmers value themselves. If people want to continue development in JavaScript, they can. But since JavaScript has a monopoly on the (f…

1. I write both Python and JavaScript and find Python to be vastly more inconsistent. [1]

2. What are the missing JavaScript features that could be useful for web development?

3. I don't understand what you mean by this.

Finding alternatives are great. My point is that JavaScript/HTML/CSS are great and it's worth learning them if you want to work on frontends.

[1] https://stackoverflow.com/questions/66947264/why-do-python-s...

Re: Google Mesop: Build web apps in Python

#65

What's with the obsession of writing web apps in Python? > Build custom UIs without writing Javascript/CSS/HTML Why? These three were built for the web and work flawlessly. I doubt that an abstraction built on top of these will result in faster development times. The State Management guide[1] explains state and then explains the usage. If you know Python and want to build a UI with it you'll have to read the guides.…

> > Build custom UIs without writing Javascript/CSS/HTML

> Why? These three were built for the web and work flawlessly.

Because you are throwing a Web UI on something written in Python for other reasons, and don't want to add 3 additional languages to the mix to do that.

Re: Google Mesop: Build web apps in Python

#66

Earlier quoted context omitted.

It appeals to me. I don't write fronted code, but sometimes I want a frontend, even if it's really dinky. This seems way more approachable to me than learning JS/all the shit you have to deal with to write a non-toy ui

Let's say you want a frontend for your server and have never written HTML before. Where so you start? If you have decided on using Python for the UI you have a handful of libraries each with their own documentation. To get started you need to choose one and then read the guides. If you decide to use HTML you have a whole lot more resources. I'd argue you'll be able to make a frontend faster using this approach. I und…

I'm not trying to make an argument for "Python for the UI" in general. I just looked at their demo page, and thought "huh I could probably turn my debug script in to an okay looking UI in an hour with this". Maybe you are right that I could make something okay looking with plain HTML/CSS/JS in less time (including the time to figure out HTML/CSS/JS?)

Re: Google Mesop: Build web apps in Python

#67
post #20

Do note that this is not an officially supported Google product, as per the disclaimer.

The official documentation for releasing personal projects at Google is externally available: https://opensource.google/documentation/reference I believe many of the repos in the @google GitHub org are people's personal projects (and hence not officially staffed/supported, as disclaimed). In the linked Show HN, the authors confirm it's a 20% side project.

some of them; others are internal tools used at google that the company is happy to let the devs open source, but which are not official google "products". my main project when I was at google was in that category: https://github.com/google/pytype - it was not an "official google product" in that google was not officially supporting it for external users, but it's an extensively used product within google and developing it was my full time job.

Re: Google Mesop: Build web apps in Python

#68

What's with the obsession of writing web apps in Python? > Build custom UIs without writing Javascript/CSS/HTML Why? These three were built for the web and work flawlessly. I doubt that an abstraction built on top of these will result in faster development times. The State Management guide[1] explains state and then explains the usage. If you know Python and want to build a UI with it you'll have to read the guides.…

Counterpoint: you have made a fun and interesting thing in Python that works great in your command line/Jupyter notebook. You want to share it with your non-developer friends/anyone who might be interested, so you need some kind of interactive GUI, and the easiest one is a web page of some kind. But you don't want to learn a whole new stack because web development is really not Your Thing. So you use something like D…

That's a great question. And I completely agree. It's become extremely common to obfuscate client code or throw together 5 NPM packages into a frontend framework to justify "rapid development".

Here are a few websites that have great UX and readable source code. For each, you can view source and understand how the page is structured, styled and made interactive:

- https://tour.gleam.run, interactive code tutorial

- https://sivers.com, ecommerce

- https://www.geoffreylitt.com, personal website

I enjoy doing this and have recreated a few projects that I liked by reading their source:

- https://sudoku-aj.netlify.app inspired by https://sudoku.com

- https://imgbar.pages.dev inspired by https://imgflip.com

- https://logo-lang.pages.dev inspired by https://www.transum.org/software/Logo

Web technologies are amazing. It's one thing to say that it's hard because you're not familiar with it and another that they are objectively bad. I disagree with the second statement.

If people want a drag and drop solution for building UIs that's great. I'm sure no-code solutions exist for that. Again, my disagreement is on the point that somehow building UIs with Python is better.

Re: Google Mesop: Build web apps in Python

#69

Earlier quoted context omitted.

Let's say you want a frontend for your server and have never written HTML before. Where so you start? If you have decided on using Python for the UI you have a handful of libraries each with their own documentation. To get started you need to choose one and then read the guides. If you decide to use HTML you have a whole lot more resources. I'd argue you'll be able to make a frontend faster using this approach. I und…

I'm not trying to make an argument for "Python for the UI" in general. I just looked at their demo page, and thought "huh I could probably turn my debug script in to an okay looking UI in an hour with this". Maybe you are right that I could make something okay looking with plain HTML/CSS/JS in less time (including the time to figure out HTML/CSS/JS?)

I agree on making a demo for an existing Python project. I have used Gradio and I think it's amazing!

I disagree on the using something like this to start making a UI. When you know that your project requires a complex frontend, you're better of starting with HTML.

Re: Google Mesop: Build web apps in Python

#70

For some clarity on the support here: at Google it’s very easy to publish arbitrary code on the Google GitHub, and a bit of a pain to get permission to publish (new) projects on your personal GitHub. It’s also not too tricky to take a project with you (i.e. transfer ownership) if you leave. For these reasons, many googlers just publish their hobby projects on GitHub under the Google org. That’s most likely what this…

Oh that makes it more clear, thanks!
Post reply on HN