mb21
@mb21.bsky.social
63 followers 97 following 460 posts
Hacking on https://mastrojs.github.io – a static site generator that runs in your browser, and accompanying web dev intro course. https://github.com/mb21/
Posts Media Videos Starter Packs
Reposted by mb21
mastrojs.bsky.social
With all the excitement of view transitions coming to Firefox (which is great!), just be aware that cross-document view transitions for MPAs are “level 2” and thus only in Chrome and Safari so far. But I’m sure it won’t be long, and it’s just a progressive enhancement. No reason to not add it now!
mb21.bsky.social
There was a time when programs weren’t written in interpreted languages like Java, JS, Python etc. when real programmers compiled C or Rust to real binaries! *shakes at sky*
mb21.bsky.social
compiled binary programs?
mb21.bsky.social
AFAIK cross-document view transitions are not supported on Firefox yet?
mb21.bsky.social
Cannot wait till Node.js supports it natively.
mb21.bsky.social
This. If you had big money, you could just pay the big names to come over.
mb21.bsky.social
:q!

what else do you need to know?!
mb21.bsky.social
Maybe if you know the React runtime inside out, it’s different. But that’s always been documented as React internals that I shouldn’t worry about as a web dev. And for a long time I took the docs word for it, because on my MacBook with fiber, my website was fast. Until you look at real-world stats.
mb21.bsky.social
Easy reasoning about your program’s correctnes is what I like most about Haskell. Okay, arguably reasoning about performance is not great in Haskell either (e.g. space leaks). But performance just matters a lot more if your code runs on underpowered Android phones.
mb21.bsky.social
As someone who likes Haskell, I don’t see React being very FP. Sure, as long as you don’t have a hook in your component, it’s a pure function. But the React runtime, useEffect footguns, and coarse rerendering system (as opposed to e.g. signals) make it very hard to reason about your program.
mb21.bsky.social
haha, yeah but that’s an implementation detail of your browser! I totally made a website without HTML ;-)

Same goes for the error page the browser throws up when I send it invalid UTF-8 or do a redirect loop!
mb21.bsky.social
Nice! That being said, cannot wait for if/else which might make this more self-explanatory without the comment?
mb21.bsky.social
haha, let me know when you’ve arrived!
electric ones are much better AFAIK, and only up to a certain power draw is allowed I think.
mb21.bsky.social
I’ve just seen this the other day, but cannot find it anymore. I think it was even served with text/plain content-type.
mb21.bsky.social
Fun facts, the city of Zürich just agreed to ban them! (With the exception of electric ones)
mb21.bsky.social
This and Mastodon. All depends on who you follow :-)
mb21.bsky.social
This. Nowadays unfortunately also feels like the most apt description of React to me.
mb21.bsky.social
I just appended to the thread, don’t want to force you in a discussion you don’t wanna have!
was just sharing that for me as a ts package publisher, JSR is a massive step up over NPM. does the search suck? absolutely.
same for Deno and its stdlib. are they perfect? no. but so much better than nodes.
mb21.bsky.social
On the plus side, Node has since implemented some APIs like URLPatterns and can now run TypeScript directly as well. On the minus side, where’s the equivalent to Deno.serve ?!
But overall it still feels like the right order to do things. For node I’ll just add some polyfills for now.
mb21.bsky.social
Really? But Deno implements the node stdlib as well now, what’s the issues?
It’s funny, I’m just going through the reverse process. Having built a package Deno-first and now trying to make it run on Node as well.