Bytes #85 - Render me, tenderly

Render me, tenderly

Issue #85.January 31, 2022.2 Minute read.

This week we're checking in on Deno, praying for faster type checking, and anthropomorphizing new icon libraries. Welcome to #85.


Deno Nuggets

Backup Monetization Strategy

Checking in on Deno

The case for Deno was simple: Ryan Dahl had built Node almost a decade earlier -- but after re-watching one of Heath Ledger's greatest films, he decided there were 10 things he hated about the OG JavaScript runtime. So, he built a new-and-improved runtime from scratch that used V8 and Rust, was "secure by default," and didn't need any of those heavy node_modules.

Deno v1 was ~~hatched~~ born in May 2020, and the hype meter was instantly cranked up to eleven. Every blogger was writing think pieces about it, every newsletter was newslettering about it, and every YouTuber was making videos about how it was the next big thing.

Fast forward to today, and it turns out that Deno hasn't killed off Node (despite what some thoughtfluencers on Twitter would have you believe). But even though there's definitely less Deno buzz now than there was back in Summer 2020 (and more Covid WTF?), last year was still a big year for the Deno team:

  • They formed Deno the Company, raised $4.9m, and launched the first beta of Deno Deploy. (More VC-backed open source projects monetizing via a serverless cloud product, yayyy 😬)

  • They used some of that cash to pay to join the TC39 Working Group -- which is a kind of like paying to ~~have friends in college~~ join a fraternity, but with crazier hazing rituals (don't ask).

  • They shipped 11 minor releases that introduced new features like a moire optimized core, native HTTP server bindings, and more.

  • They started working on Node.js compatibility, which will allow Deno to seamlessly run npm packages developed for Node. This is a big shift from Deno's early stance of (and I quote), "Node modules are the devil." But it turns out that being detached from the npm ecosystem is a bug, not a feature, when you're trying to get developers to use your runtime.

Bottom Line: Deno might still be the future of server-side JavaScript, and they've made lots of progress already -- but it's clear that they're not replacing Node overnight. And with venture capital involved, the clock is always ticking.


Thanos Meme

The jank is... inevitable [sponsored]

Clerk.dev -- user management, now with less pain!

There's only one lesson I hope my kids learn from me: "the best code is the code that you don't have to write/maintain." ("Be a good person" was a close second place.)

So if any of my offspring ever builds an app, they better use Clerk.dev for all their user management garbage.

Clerk has all the front-end components and back-end logic you need to quickly set up all types of auth, session management, user profiles, B2B features, etc.

It also integrates super smoothly with React, Expo, Next, and Gatsby to save you even more time.

Your users don't care how your user management system works -- they just want it to work, so they can get busy losing money on NFTs, gambling on virtual horses, or whatever it is your app does.

👉 Check out Clerk.dev's free tier and stop worrying about the boring code nobody cares about.


Typechecking meme

If you're gonna drink, I'd rather you do it in the house

Type checking is finally getting an upgrade (we hope)

JavaScript build tools have gotten a lot faster in the past couple years, thanks to hot new projects like SWC, esbuild, and others -- written in languages like Rust and Go.

But TypeScript's type checker, tsc is still slow ~~AF~~ ATDM (As The Dune Movie). Good news though: this week, the folks behind SWC announced that they're working on a Go port of the type checker.

But why is it slow? Stripping out all the TypeScript code so that browsers can run the compiled JavaScript is already super easy (and fast) -- Babel, esbuild, and SWC do this without breaking a sweat.

The hard (and slow) part is checking the code for type errors. So far, tsc (a CLI tool provided by the TypeScript team) is the only tool that can do this. It's what powers your VS Code error highlights and autocompletion and outputs the .d.ts files that libraries use to share their types. But it's written in JavaScript -- which leaves lots of room for performance improvements.

Why hasn't anyone built a faster version? Believe me, people have tried. The teams behind SWC and Deno have been working on it for over 2 years, with nothing to show for it. Turns out that TypeScript has inherited lots of gnarly, weird bits of JavaScript -- which makes the type checker a minefield of edge cases.

What makes this latest attempt any different?

  • Instead of rewriting tsc, the SWC team will port it, so the structure and behavior of the code will be the same as its JS counterpart (much smoother transition).

  • Vercel is bankrolling the whole project with the promise to open-source it. And as we all know, ~~Daddy Warbucks~~ Guillermo has pretty deep pockets these days.

  • Earlier failed attempts at a Rust rewrite should provide valuable insights for this new effort in Go.

  • It's Evan Wallace-approved.

Bottom Line: If they can pull this off, we should start a GoFundMe to pay for a Cameo of Jeff Goldblum saying his most iconic line.


Cool Bits

  1. Did you know that when React first launched, people really didn't like it? True story, so true, in fact - that I spent 60 hours making this video to tell it. I bring you The Story of React. If anyone has a connection at the Hallmark Channel, lmk.

  2. The annual State of JavaScript report needs you to take this survey, so that they can crown 2021's JavaScript Prom King & Queen. The theme of this year's dance is "Render me, tenderly" -- so please dress accordingly.

  3. The CSS Tricks crew wrote an in-depth Beginner's Guide to npm, just in time for you to be able run all the npm packages you want in Deno.

  4. Alan Dávalos wrote about the baseline for web development in 2022. TLDR -- we're all overusing JavaScript, so I guess Astro is the only thing that can save our little broken bodies.

  5. Recoil v0.6 was just released with improved support for React 18 features like concurrent rendering and transitions. It must feel nice to be so ahead of schedule, since we all know React 18 won't actually come out until June (2023).

  6. Chirpy wrote about deciding to open source its Disqus-style comment system, which differentiates itself from Disqus by not sharing the personal data of 10 million+ users without their consent.

  7. Gluegun is a cool toolkit for building TypeScript-powered command-line apps that's named after my favorite tool for bedazzling my True Religion jeans.

  8. Iconoir is an open source library of 1,000+ SVG Icons that are all free to use. Since it's called Iconoir, I assume that the icons have the same dark-and-mysterious vibe as a big-city detective with a troubled past who isn't afraid to get his hands dirty if it helps him catch the bad guys -- until one day he wakes up, takes a long drag of a cigarette and thinks to himself, "What if I'm the bad guy? What if I've become the very thing I swore to defend this city against when I first put on the badge all those years ago?" But then he pops another Xanax and buries those thoughts deep, because darnit -- he's got a city to save.

Join Bytes

Delivered to 105,502 developers every Monday