Live data from Hacker News

Pushup: a new compiler for making web apps in Go

github.com

101–110 of 121 posts

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

#101
post #53
post #26

Earlier quoted context omitted.

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

But don't you need 4 keystrokes for the common alternative, {} enclosed template expressions? Same as french, nordic, and probably lots of other european intl layouts. (Or even better against the {{ }} ones requiring 6)

"{" on a french keyboard is two key presses but at the same time (alt gr and 4), while ^ is two key presses one after the other, which makes it a bit slower. Most editors will also insert the corresponding } when you create a {. That makes in my experience {} faster than ^ and {{}} as fast as ^.

{} is still a common complaint in my circle of programmer friends and everyone has seriously thought even once about switching to an english/american keyboard, but then there's the issue of switching back when writing stuff in french (é by itself almost ruins the idea).

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

#103
post #61

Nice seeing going this forward. I built something similar in the past, that can be used as a base for such framework utilizing yaegi (from the creators of traefik): https://github.com/Eun/yaegi-template

well that is interesting. Is there a way to use different delimiter instead of "<$" .

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

#105
post #9

Pushup creator here. We're interested in feedback on the design. Pushup introduces a new lightweight template syntax that mixes Go code and HTML in the same page; pages are then compiled down to pure Go, relying on the net/http package. Pushup uses file-based routing, so adding a page adds a route to your app. The template language has an "inline partials" feature to make it easier support for modern hypermedia libra…

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.

Many templating engines allow to customize the delimiters. Quite useful sometimes.

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

#106
post #61

Nice seeing going this forward. I built something similar in the past, that can be used as a base for such framework utilizing yaegi (from the creators of traefik): https://github.com/Eun/yaegi-template

well that is interesting. Is there a way to use different delimiter instead of "<$" .

Yes, you can just specify different start- and endrunes: https://github.com/Eun/yaegi-template/blob/master/template.g...

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

#107
post #101
post #53

Earlier quoted context omitted.

But don't you need 4 keystrokes for the common alternative, {} enclosed template expressions? Same as french, nordic, and probably lots of other european intl layouts. (Or even better against the {{ }} ones requiring 6)

"{" on a french keyboard is two key presses but at the same time (alt gr and 4), while ^ is two key presses one after the other, which makes it a bit slower. Most editors will also insert the corresponding } when you create a {. That makes in my experience {} faster than ^ and {{}} as fast as ^. {} is still a common complaint in my circle of programmer friends and everyone has seriously thought even once about switch…

I use a Spanish keyboard but with US layout on top. I normally let autocorrect deal with special Spanish characters, but just switch layout if I’m writing something longer.

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

#108

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 anyt…

Ideally then, the client side could run in disconnected mode. But then you encounter DB sync issues. And I wonder what htmx does then.

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

#109

Earlier quoted context omitted.

I'm using a lot of reflection and I believe tinygo has had some issues with the reflect package. I'm not really ready to dig into Tinygo issues. I've spent a lot of time dealing with Go's own reflect issue(i.e [0]) in its default implementation. https://github.com/golang/go/issues/15924

TinyGo does indeed have problems with the reflect package, as well as many others, one which I've managed to help with [1]. The developers have been very helpful, but the reflect package is still a big missing piece. Your framework sounds interesting. Do you develop it in the open? [1] https://github.com/tinygo-org/tinygo/issues/3274

Lack of reflection also creates issues for (for example) XML decoding, but I found that it's possible to delete reflection code from the source and compile it with basic decoding support. No annotations - but this is OK because Go's XML annotations are evil.
Post reply on HN