High-Level Is the Goal

(bvisness.me)

64 points | by tobr 1 day ago

9 comments

  • jbritton 7 minutes ago
    The Reddit example is about two different design choices. The DOM is a tree of state that needs to stay in sync with your app state. So how to make that happen without turning your code into a mess. The old Reddit had to first construct the DOM and then for every state change, determine what DOM nodes need to change, find them and update them. Knowing what needs to change gets ugly in a lot of apps. The other alternative is to realize that constructing a DOM from any arbitrary state is pretty much the same as constructing it from initial state. But now you don’t have to track what DOM nodes must change on every state change. This is a massive reduction in code complexity. I will grant that there is something similar to the “expression” problem. Every time there is a new state element introduced it may affect the creation of every node in the DOM. As opposed to every time a UI element is added it may affect every state transition. The first Reddit can be fast, but you have to manage all the updates. The second is slow, but easier to develop. I’m not sure going any lower solves any of that. The React version can be made more efficient through intelligent compilers that are at better at detecting change and doing updates. The React model allows for tooling optimizations. These might well beat hand written changes. The web has complexity also of client/server with long delays and syncing client/server and DOM state, and http protocol. Desktop apps and game engines don’t have these problems.
  • cellis 2 hours ago
    While directionally correct, the article spends a lot of time glorifying jquery and not enough on what a horrible, no good, unoptimized mess of a framework jquery was, and by extension what kinds of websites were built back then. I remember those times well. The reason to use React isn't because it was new, far from it. It was because it won vs. Ember, Angular, et. al. in 2014-2015? as the best abstraction because it was easiest to reason about. It still wasn't great. In fact, still isn't great. But it's the best blend of many leaky abstractions we use to code against the browser apis.
    • twelvedogs 1 hour ago
      jquery was an unoptimised mess? it's like 30k minimised and just bridged a bunch of functionality that browsers lacked as well as providing a generic api that let you (often) ignore per-browser implementation and testing of your code

      there's no reason to blame it for the types of websites being made either, it doesn't really provide enough functionality to influence the type of site you use it on

  • cyber_kinetist 48 minutes ago
    I think the real conclusion is: someone has to make a native cross-platform desktop UI framework that doesn't suck. (Yeah Qt exists, but it really sucks...) Until then, everyone will default to just using the browser for a desktop app, and the beatings will continue.

    Because of this, I'm really looking forward for PanGUI to step up (https://www.pangui.io/), their UI framework is very promising and I would start using it in a heartbeat when the beta actually releases!

    • morganherlocker 2 minutes ago
      IDK, it seems like old reddit did just fine without even trying that hard. The DOM and surrounding JS API is already a high level GUI framework, and the post illustrates that it's perfectly capable of doing useful interactions >60fps. I personally love working with native code, but the modern browser is capable of producing fast interfaces that saturate human senses without it. If you write JS like a C programmer would, it will usually be quite fast, even if it's not optimal. If you write native apps in C++ like a modern JS programmer - frameworks and deps with abandon - it will be a stuttery mess.

      When the DOM is not enough, there's already WebGL and WASM. A vanishingly small sliver of use cases can't saturate human senses with these tools, and the slowest, jankiest websites tend to be the least deserving of them (ie: why is jira slow? It's literally a text box with a handful of buttons on the side!).

    • rubenvanwyk 18 minutes ago
      Never heard of PanGUI - glad to see its C#, will have to try it out.
    • relyks 24 minutes ago
      What about Flutter?
    • Dwedit 42 minutes ago
      There was WxWidgets.
      • cyber_kinetist 37 minutes ago
        The main consensus in the native space is that Qt is still miles ahead of any other cross-platform desktop framework (including WxWidgets). Doesn't mean that Qt is anywhere good - it's just the least worst option out of all.

        I hoped someday Flutter might be mature enough for desktop development, but so far they've focused most of their efforts on mobile and I don't think this will change in the future.

  • bot_user_7a2b99 12 minutes ago
    I really agree with the point about React and Redux. It is crazy that collapsing a comment can take 200ms just because of the framework overhead. We have way too much power in our computers to be okay with this kind of lag in basic UI tasks.
  • bobajeff 37 minutes ago
    For those interested here's the talk that this is from:

    https://www.youtube.com/watch?v=AmrBpxAtPrI

  • NooneAtAll3 3 hours ago
    While I am totally on board with the idea... the article doesn't really say what to actually do to help?

    "we at Handmade community" - and no link to that community anywhere

    blog itself? 2 posts a year, and 2025 posts aren't even on the blog itself (just redirects)

    Yes, tooling and toolmaking should be promoted - but promotion itself should also be accessible somehow?

    • bobajeff 18 minutes ago
      Yeah it's a call to action to improve the tooling but it's not the first one I've seen. Tooling really is under focused in many areas.

      It would be nice if every language and library had a great working repl and a Jupyter Lab kernel and good mdn-like documentation and w3schools-like tutorials.

    • cyber_kinetist 52 minutes ago
      This is probably the community he was talking about:

      https://handmade.network/

      Here's the manifesto: https://handmade.network/manifesto

    • cons0le 2 hours ago
      My exact complaint. What is the "handmade" community? At first I thought he was talking about woodworking or knitting.

      Also the reddit comparison is great, but I wish he would have talked about why the slop is there in the first place.

      I'm pretty sure new reddit isn't optimized for speed, it's optimized for analytics and datamining.

      I bet they use all those backend calls to get really granular session info. When something is super slow, it's not that it's unoptimized, but rather it's optimized for money over user experience.

  • B4CKlash 2 hours ago
    I enjoyed reading this article but I think the author overlooked that "low-level" languages aren't just less supported, they're also character-dense. You can accomplish more with less, simply because it's a higher level abstraction. If you choose to abstract through this problem, aren't you creating a high-level language?
  • publicdebates 3 hours ago
    Side note, but this article reads like a Wes Anderson film, if that makes any sense.
    • JellyBeanThief 3 hours ago
      I haven't seen his whole filmography, but I can see Asteroid City in this, yeah.
  • dfajgljsldkjag 2 hours ago
    This is a good reminder that abstractions are supposed to help us solve problems rather than just hide the details. I feel like I spend too much time fighting against tools that try to prevent me from seeing how things really work.