marcel's recent activity

  1. Comment on What a bunch of A-list celebs taught me about how to use my phone in ~tech

    marcel
    Link Parent
    The "real-time" category was supposed to fix this issue but they get around it by saying "this coupon will expire in an hour" and now it's considered real-time. Live activities actually improved...

    The "real-time" category was supposed to fix this issue but they get around it by saying "this coupon will expire in an hour" and now it's considered real-time.

    Live activities actually improved the situation for me. I just disable notifications entirely and then if I order something the progress is up at the top.

    5 votes
  2. Comment on JavaScript bloat in 2024 in ~comp

    marcel
    Link Parent
    We have compilers, lots of them actually. Hundreds! uglify-js (included by default in the popular bundlers) will fold constant expressions, shake dead code, you can even enable unsafe math...

    We have compilers, lots of them actually. Hundreds! uglify-js (included by default in the popular bundlers) will fold constant expressions, shake dead code, you can even enable unsafe math optimizations and others. Google has been using Closure for decades and its results are pretty remarkable.

    There's even domain specific optimizers optimize concatenation of CSS class names, optimize react expressions (and a brand new one from the react team). Tons of em.

    You just have to care though. It's frankly easier to launch a 20MB website and then have a big meeting to fix it once it gets too bad. JavaScript isn't an "only one way to do it" language though and if you pull in a bunch of packages from npm each of those packages might pull in their own favorite library which gets out of hand quickly. It's led to a lot of teams being able to build pretty complex projects very quickly, at the cost of some bytes.

    6 votes
  3. Comment on What programming/technical projects have you been working on? in ~comp

    marcel
    Link
    I'm pretty proud of this nodejs loader I built, dynohot. If you've ever used import.meta.hot in Vite or Webpack, it's like that but directly in nodejs. My team is using it to hot reload our...

    I'm pretty proud of this nodejs loader I built, dynohot. If you've ever used import.meta.hot in Vite or Webpack, it's like that but directly in nodejs. My team is using it to hot reload our development GraphQL server, for example.

    It's crazy to me that, for more than a decade, the best we've had is nodemon which just sends a SIGHUP to your process whenever a file changes. So now, we can just reload a subtree of the module graph and its dependents to instantly update only the parts of the application that changed. This is something that I've wanted to build for many years but never got around to it because I thought "someone else will surely do it" but no one ever did.

    It was fun getting deep into the JavaScript specification since I had to implement the linkage algorithm in a novel way to make relinkage of a running application possible.

    I've found it tough to get the word out though. I really consider it a high quality module that would be helpful for a lot of teams, but I don't really have a strong Twitter presence or anything.

    5 votes