Live data from Hacker News

Pushup: a new compiler for making web apps in Go

github.com

91–100 of 121 posts

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

#91

When it comes to traditional web frameworks, the most important part is handling regular HTML forms. Reason being, a form is the only native mechanism your customers have to use to interact with your service. Forms are important. Specifically, validation and error handling. I think Laravel does it really well. It's been a while, but Laravel has a wrapper around HTML forms. This wrapper does everything you need: serve…

Any more info on this form wrapper for Laravel?

This is how it used to be - https://laravel.com/docs/4.2/html

I haven't used Laravel for many years. I couldn't find the equivalent functionality in the latest version of the framework, which is 9.x, but pretty sure they should have something similar.

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

#94
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.

OTOH I have an actual Finnish keyboard and caret is simply Shift-umlaut (the key has a caret over a pair of dots).

You still need to press space after that.

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

#95

When it comes to traditional web frameworks, the most important part is handling regular HTML forms. Reason being, a form is the only native mechanism your customers have to use to interact with your service. Forms are important. Specifically, validation and error handling. I think Laravel does it really well. It's been a while, but Laravel has a wrapper around HTML forms. This wrapper does everything you need: serve…

Regular HTML forms are hard. Source: I was the Drupal form API maintainer for a long time. Way too long.

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

#96

Earlier quoted context omitted.

Any more info on this form wrapper for Laravel?

This is how it used to be - https://laravel.com/docs/4.2/html I haven't used Laravel for many years. I couldn't find the equivalent functionality in the latest version of the framework, which is 9.x, but pretty sure they should have something similar.

Here's the latest equivalent of those docs: https://laravel.com/docs/9.x/blade#forms

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

#97

When it comes to traditional web frameworks, the most important part is handling regular HTML forms. Reason being, a form is the only native mechanism your customers have to use to interact with your service. Forms are important. Specifically, validation and error handling. I think Laravel does it really well. It's been a while, but Laravel has a wrapper around HTML forms. This wrapper does everything you need: serve…

Not yet, but that is the intent. As a long-time Django user I have a high bar for the kind of forms support a framework should provide. One of my thoughts/beliefs is that, as a compiler with complete control over the page, there is a lot Pushup can do on both the markup generation side as well as checks and validations. eg., automatic CSRF token insertion, compiler "warnings" for accessibility, etc.

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

#98

This looks really promising — at first blush, I like this a lot more than normal Go templating! That said: maybe it's just my bias as someone who primarily works with React, but I'm wondering why not just mimic JSX, which has been incredibly successful and has millions of people who already understand it. The big missing piece to me here is composability. How can I encapsulate reusable bits of markup, styles and pres…

I actually hacked together "JSX in go" over a few weeks a couple years ago, targeting wasm/GopherJS so the code could actually execute in the frontend. It was a really fun exercise in reading/understanding the internals of the go compiler. https://github.com/8byt/gox

I came across this during my initial research when starting Pushup, very impressive.

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

#99

Looks cool! Two questions: What does a Treeview look like - in a ".up" file, can I walk a tree (like io.fs.FS) ? Can I compile a Pushup app into a giant WASM hairball and run the whole thing in the browser ?

> What does a Treeview look like - in a ".up" file, can I walk a tree (like io.fs.FS) ?

Yes, you can just write normal Go code to traverse a filesystem and do with it whatever you like.

> Can I compile a Pushup app into a giant WASM hairball and run the whole thing in the browser ?

I haven't tried this so I don't know what would happen, and a lot would depend on what kind of JS host runtime support there was for anything that is doing a syscall.

But related to WASM, an idea I have is to add syntax to be able to split a Pushup page into client-side and server-side code, compile the client-side code to WASM, and use the Pushup compiler to generate the appropriate handoffs for any network calls between (AJAX, websocket, etc.)

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

#100

There's an interesting conversation to be had about developer ergonomics. For me, on a Mac, it's far more easier to use characters and symbols on the bottom of the keyboard. . It's even easy to use a select few symbols from the number row. !, @, #, $ uses my left pinky on the left shift, left hand middle (or index) finger on the number &, *, (, and ) use my left pinky on the left shift, right hand finger on the numbe…

> Also, what about IDE plugins?

An LSP server for Pushup syntax is on the informal roadmap.

Post reply on HN