Rust™®️ drama

Issue #179.April 17, 2023.2 Minute read.
Bytes

Today’s issue: Beano for your (html) bloating, The Rust Anthem of Allegiance, and Tetris lawsuits.

Welcome to #179


Eyeballs logo

The Main Thing

Salad Fingers with a Rust logo

We'll see you in court 🫡

️Rust™®️ drama

With so much division online these days, it’s really nice when the entire tech community is able to come together and rally around a common cause.

We saw that exact thing happen last week with Rust. Except in this case, everyone was rallying together to tell Rust how much they hate it — or at least how much they hate the Rust️ Foundation’s new trademark policy, which reads like it was drafted by the lawyers at Oracle, Disney, and Jim Carrey’s character in Liar Liar.

Here are a few of the highlights lowlights from the new policy:

  • No using the name “Rust” or the Rust logo to sell any products (stickers, shirts, hats, books, courses, consulting services, etc.), and no using the word “Rust” in any domain names.

  • No adapting the Rust logo or colors in any way besides changing the size.

  • Rust “User Groups” (like Discords and Subreddits, I guess?) are only allowed to use the word Rust if they formally adopt and enforce a “robust Code of Conduct” and focus the majority of their discussion on Rust topics.

  • You can only use the word “Rust” in the title of a blog post or video if you include a boilerplate statement about how “this material has not been reviewed or endorsed by the Rust Foundation” at the very beginning.

  • You can only use the Rust logo and the word “Rust” for a conference or event if it’s not for profit, prohibits the carrying of firearms, complies with local health regulations, and starts by having everyone stand and sing the Rust Foundation’s Anthem of Allegiance (ok fine, I made up the last part)

  • No using the word “Rust” in the name of any third-party software tool, library, plugin, or package — unless you contact the Rust Foundation and acquire (aka purchase) a license to do so.

  • Towards the end, they encourage everyone to please report any potential violations they see to the Rust Inquisitorial Squad Foundation. Because nothing helps foster a vibrant OSS community like tattling on each other over potential trademark disputes 🥴.

Bottom Line: How many of their own policies did The Rust Foundation break when they promoted this shady crypto sponsor who was promising 187% annual returns last year? 😬

        

courier logo

Our Friends
(With Benefits)

pasta on fire in a pot on the stove

When you try to whip up a notification system from scratch

Courier takes the pain out of notifications

There are two things I wouldn’t wish on my worst enemy: 1) facing the wrath of the Rust foundation, and 2) building notifications from scratch.

Thankfully, Courier’s got you covered (for the second one). Their intuitive notification API lets you easily manage templates and routing logic for over 50 service providers like Twilio, Sendgrid, APN, Firebase, and Slack — all from one centralized platform.

It also handles all of the security and scalability stuff for you, and makes it easy to quickly add new channels and change providers.

Companies like Vanta and LaunchDarkly used Courier to save an average of 480 engineering hours a year. One CEO said that, “It’s probably saved us more pain (and time!) than any other single platform that we use.” 😱

Check it out, and save yourself some pain. They even let you send your first 10,000 notifications of every month for free, no credit card required.


Tip logo

The Tip

Sponsored by Datadog

They give you every tool you need to detect, diagnose, and resolve issues — all in one unified platform. Try their 14-day free trial.

Have you ever used Array’s fill method? Probably not. Defined, fill “fills all the elements of an array from a start index to an end index with a static value”. It sounds pretty useless, but I’ve found one scenario where it’s helpful.

As you start to make your code more functional, you naturally start to avoid using regular for loops in favor of .map, .reduce, etc. Let’s say our use case was we wanted to execute a function an arbitrary amount of times, say 10. How could we do this and avoid using a for loop? Your first intuition might be to use an Array constructor with .map.

Array(10).map(() => {
  
})

You’ll notice if you run that code it won’t work. When you do Array(10), you’re creating an array of 10 unset or “empty” values. Unfortunately, when you use any of the array methods, they won’t work on an array with empty values.

This is where .fill comes into play. If you do Array(10).fill(), you’ll then get an array with 10 undefined, not empty elements.

Array(10).fill().map(() => {
  
})

Not super useful, but good to know it exists if you need it.


Cool Bits logo

Cool Bits

  1. OXC is a JavaScript oxidation compiler that’s creating a suite of tools in R*st — like an AST, parser, linter, and transpiler.

  2. Airplane.dev is the developer platform for building custom internal tools faster than you can say “Bytes is the defining literary work of my generation.” Their code-first approach makes it easy to build customer onboarding flows, admin operations UIs, customer support apps, and more. [sponsored]

  3. Sam Rose wrote this Animated guide to HTTP load balancing algorithms. The animation isn’t quite as intricate as The Super Mario Bros movie, but it was probably a little more educational.

  4. Nike wrote a practical guide for craftspeople seeking to avoid the most common pitfalls when designing modern frontend applications. As a craftperson 🎩 myself, I found it helpful.

  5. LangChainJS just announced Support for Multiple New Environments (Vercel, Workers, Supabase Edge Functions, etc.) for its language model framework.

  6. Elise Hein wrote about Fighting inter-component HTML bloat. Right now, I’m fighting my own bloating issues after smashing two pints of Jeni’s ice cream.

  7. Nuxt 3.4 launched last week, with new features like support for the View Transitions API and object-syntax Nuxt plugins.

  8. Sveltris is some black magic that lets you piece together React primitives, like hooks and components, with Svelte. No word yet on if The Rust Foundation’s lawyers will be suing on behalf of the makers of Tetris.