Live data from Hacker News

Pushup: a new compiler for making web apps in Go

github.com

61–70 of 121 posts

Re: Pushup: a new compiler for making web apps in Go

#62

I don't like it. It looks like early php. This doesnt mean it is bad. I'm working on a web framework as well based on wasm in the browser. It's perfect except it's not really usuable/production ready due to high memory consumption of the go->wasm implementation. My hope is that one day there will be support for GC in wasm and somehow the issue will go away.

Interesting! Do you have a link?

Re: Pushup: a new compiler for making web apps in Go

#63
post #27

Earlier quoted context omitted.

"Pushup uses file-based routing, so adding a page adds a route to your app." Make sure to have a clean way of escaping that and having some richer concept of how to route. This was the original way routing worked, back in the ASP (not ASP.net, the predecessor), CGI, original PHP days. We moved away from it for good reasons. It works well early but has scaling problems over time. I'm not saying don't have it as a defa…

I have the same instinct (JSP / JSF had the same concept) but I must say, making pages as files in next.js is really nice. You can have all your dynamism within them, but having a simple way to do overall routing is lovely.

Next.js routing limits have been for me the number one reason not to use it unfortunately.

Re: Pushup: a new compiler for making web apps in Go

#64
post #63

Earlier quoted context omitted.

I have the same instinct (JSP / JSF had the same concept) but I must say, making pages as files in next.js is really nice. You can have all your dynamism within them, but having a simple way to do overall routing is lovely.

Next.js routing limits have been for me the number one reason not to use it unfortunately.

Can you share more? With Middleware, you can run any arbitrary code to control routing: https://twitter.com/nextjs/status/1610663442825854980. And with the `app` directory (beta), we're reimagining the Next.js routing system from the ground up: https://beta.nextjs.org/docs/routing/fundamentals.

Re: Pushup: a new compiler for making web apps in Go

#65
post #42

Earlier quoted context omitted.

It is nice. It is easy. There's a reason we started there. Then, suddenly after a certain amount of scaling, it isn't. And it's not like that's an impossible situation either, but you end up with all the consequences of building a framework to do X and then having to build an inner platform[1] to do some other Y inside of X instead. [1]: A technical term: https://en.wikipedia.org/wiki/Inner-platform_effect

Sure. It's a tradeoff either way - ergonomics for common cases or not. I imagine in your case you're constructing lots of custom logic anyway, whether it's in an API gateway (or similar) component to put the auth logic before the application, or put the logic in some before_request handler in the web application.

Curious if you're explored the new `app` directory (beta), which includes a new routing system in Next.js? Open to feedback: https://beta.nextjs.org/docs/routing/fundamentals

Re: Pushup: a new compiler for making web apps in Go

#66
post #6

It's a nice idea. I'm going to dig a little deeper in the design and developer experience choices. That being said, I am a little curious -- what is the intended use case here? The reason I am asking is because I've been doing lots of web-development, with Go as a primary backend lang, for the last 9 years but never have I seriously felt the need to do serve the UI from Go. I guess there is some advantage reducing n…

The imagined use-case for Pushup is the same niche that Rails, Django, and Flask apps occupy, which is a wide range but broadly I would describe as page-oriented, HTML-first, server-side frontends. I started Pushup because I asked myself, I like programming in Go and think (like you) it's great for web backends - but what is holding it back from being a great full-stack web dev language or environment? net/http is a…

I have to be honest, I don't like the aesthetics. I know that's a trivial point, but if you're working in something for a living it matters. The suggestions elsewhere of using "" or similar look better to my eyes. I'd also be concerned that by the time there are enough features in it to support more complex sites, the learning curve will be enough that you may as well use Go directly. I could easily be wrong about that, and I know others will see value, so YMMV as we say.

That isn't to say I have any negative comment about your project on its own terms and merits, just that it isn't for me.

However I do thank you for the link to the "mildly dynamic" page. In addition to Go I also do C#, Node, Python, and others. Those others include PHP (on and off since PHP 3). For serious stuff I'm usually managed (or persuaded) into using anything other than PHP, but on the odd times I do use it the feeling is quite different from the rest and hard to explain. It feels like that linked page comes closest to explaining it for me, so cheers!

Re: Pushup: a new compiler for making web apps in Go

#67
post #9

Earlier quoted context omitted.

I’m Finnish. The caret is not always easy to type in my experience on international keyboards. Not sure what the added value is of creating yet another convention here, as there are so many already with each new templating language.

same in french. it's a dead key on our keyboard, so it's basically two keystrokes instead of one to type it. to be fair most special characters are behind AltGr on azerty, soooo...

Admittedly ^ on a US keyboard also involves two keys.

Re: Pushup: a new compiler for making web apps in Go

#68

Earlier quoted context omitted.

Have you looked into using TinyGo[0]? It's a Go-for-embedded compiler and can compile Go to WASM as well. It's supposed to result in much smaller artifacts. [0]: https://tinygo.org/docs/guides/webassembly/

In my experience, TinyGo is far from ready for prime time, mainly because of its lack of support for JSON marshaling/unmarshaling. I run Go code in Cloudflare Workers, and just use the regular-ol' WASM targets (GOOS=js/GOARCH=wasm)

Huh, CF Workers used to limit the payload to 1MB, and any slightly nontrivial golang js/wasm artifact (not tinygo) I’ve ever built was >2MB compressed, so the idea of running those on CF Workers was dead on arrival. However, apparently the limit was raised to 5MB for paid plans some time last year.

Re: Pushup: a new compiler for making web apps in Go

#69
post #26
post #9

Earlier quoted context omitted.

I’m Finnish. The caret is not always easy to type in my experience on international keyboards. Not sure what the added value is of creating yet another convention here, as there are so many already with each new templating language.

Oh yes it's pretty hard to type on a German keyboard as well. In most editors you will need two keystrokes.

For German devs it makes sense to use a no dead keys keyboard layout IMHO. You rarely need the accents anyways and it saves a lot of time when coding. I made the switch a long time ago and don't regret it. For the occasional word like "Expose", I just leave off the accent and that's that.
Post reply on HN