Live data from Hacker News

Web browser as GUI, with your preferred language in the backend

github.com

1–10 of 187 posts

Re: Web browser as GUI, with your preferred language in the backend

#2
Off topic rant: can anyone explain why the syntax highlighting of Zig on Github turns every single word brown? I know they incorporated tree sitter, and for some reason the default syntax rules really dislike coloring identifiers in black.

Look at the code example in this project README or its source.

For a long time something bugged me about the language whenever I glanced at it, and it's all because Github and its stupid syntax coloring. I hate the rainbow vomit approach to syntax highlighting that's all the vogue these days. It should be a sprinkle on top, not the main course.

Re: Web browser as GUI, with your preferred language in the backend

#6
post #3

Offtopic, but: why do people insist that Edge is a meaningfully different browser from Chrome? I'm not even going to ask about the table at the end that lists that it supports exactly two different browsers while listing 10.

This is a good point. The only reason I can think of is that it is the default browser installed on Windows, which gives it automatic distribution.

Re: Web browser as GUI, with your preferred language in the backend

#7
post #2

Off topic rant: can anyone explain why the syntax highlighting of Zig on Github turns every single word brown ? I know they incorporated tree sitter, and for some reason the default syntax rules really dislike coloring identifiers in black. Look at the code example in this project README or its source. For a long time something bugged me about the language whenever I glanced at it, and it's all because Github and its…

> every single word

I’m not seeing that.

Re: Web browser as GUI, with your preferred language in the backend

#8
post #3

Offtopic, but: why do people insist that Edge is a meaningfully different browser from Chrome? I'm not even going to ask about the table at the end that lists that it supports exactly two different browsers while listing 10.

I would have thought at the browser level access to WebUI would not necessarily be a given as it seems that access is outside the browser engine. Glad to be corrected.

Re: Web browser as GUI, with your preferred language in the backend

#9
This is definitely the way to go! The browser is not only good at network requests and sandboxing but comes with the most powerful layouting system and rendering engine.

So yes, leveraging browsers just for the front-end of a local-first app is such a good direction to go. Generally apps tend to bundle their own browser runtime to leverage this component. Even the lighter weight electron alternatives tend to either implement a part of the browser runtime themselves or at least need separate webview instances. But I already have a browser installed and why can't my local apps integrate with my installed browser to expose their functionality? This project looks like a good step into that direction.

Re: Web browser as GUI, with your preferred language in the backend

#10
post #2

Off topic rant: can anyone explain why the syntax highlighting of Zig on Github turns every single word brown ? I know they incorporated tree sitter, and for some reason the default syntax rules really dislike coloring identifiers in black. Look at the code example in this project README or its source. For a long time something bugged me about the language whenever I glanced at it, and it's all because Github and its…

> every single word I’m not seeing that.

A better name for the color would probably be orange, at least in dark theme. Look at... variable names, field accesses, basically literally everything that is not a keyword or symbol. It's not all supposed to be colored. There's no plain white text anywhere!
Post reply on HN