News for hackers. Stuff that matters.
Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by lo5 on Monday March 13, 2023 @08:12PM (#35145277)
Looks similar to Nitro https://nitro.h2o.ai/ and Wave https://wave.h2o.ai/ - both open source. Nitro already works with WebAssembly via Pyodide. (Author here)
Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by haolez on Monday March 13, 2023 @09:51PM (#35146272)
Hey! What's the difference between Nitro and Wave? Wave seems like a great fit for my usage.
Re:Launch HN: Pynecone (YC W23) – Web Apps in Pure Python by lo5 on Tuesday March 14, 2023 @12:43AM (#35147535)
Nitro has no events or callbacks. To display a page, you call a function, and the return value of the function is a tuple of inputs entered by the user. You then deal with those inputs, and display another page, and so on. There’s no ceremony. Like the readme shows, a seven page app is just seven statements one after the other. This paradigm makes it possible to write incredibly compact code.

As an example, here is a macOS calculator clone in ~50 lines of Python: https://twitter.com/crunchingdata/status/1563300652918325249...