WinterJS; Echo-Chamber; So. Many. JS. Cheatsheets
Now that I’ve cranked out a couple JS/WASM chapters in the “Cooking With DuckDB” book, I’ve got JavaScript on the noggin’ so, today, we focus on three different (and fun!) JS-resources.
WinterJS

As if there weren’t enough choices in “server-side javascript”-land to already cause analysis paralysis, we have a new WASM-y entry into the field with the official release of WinterJS (announcement).
Before we talk aboot that, we need to kick back and learn about the Winter Community Group (WinterCG) — an organization within the World Wide Web Consortium (W3C) that focuses on developing standards and technologies related to Web Integration Technologies. Some key areas the group works on include:
- WebComponents: Encapsulated, reusable custom elements for web applications
- Service Workers: Scripts that run in the background, separate from web pages, enabling features like offline support, push notifications, background sync, etc.
- Web App Manifest: JSON files that provide metadata about web applications to enable app-like behaviors
- Import Maps: Mechanisms to control how JavaScript modules are resolved and loaded in a web page
The goal is to enable more powerful, feature-rich, and superfast web applications through these interoperable technologies and standards. The group collaborates with browser vendors, web developers, and other stakeholders in the web community to define and evolve these web platform capabilities.
There are plenty of WinterCG-compatible Javascript runtimes including Bun, Deno, and others (even Amazon’s llrt — mentioned in a recent Drop — has a long-term plan for WinterCG-compatibility). What’s so special about WinterJS?
Well, for starters, it is written in Rust, uses Mozilla’s SpiderMonkey engine, and can handle over 150,000 requests-per-second (pretty sure that can handle the traffic for any app that I might write). One especially cool feature of it, though, is that it can be compiled down to WebAssembly — specically, WASIX. This means it can squeeze into places other JS app servers cannot.
While I am loathe to encourage normalizing the use of curl-bash idioms, they do make it super easy to show you how to test this out:
$ # install wasmer
$ curl https://get.wasmer.io -sSfL | sh
$ mkdir -p test
$ cat<<EOF>test/simple.js
addEventListener('fetch', (req) => {
req.respondWith(new Response("'sup?"));
});
EOF
$ wasmer run wasmer/winterjs --net --mapdir=tests:tests tests/simple.js
$ # SEPARATE TAB/WINDOW
$ curl -s http://localhost:8080/
'sup?
You can also cargo install --git https://github.com/wasmerio/winterjs winterjs to have a proper local binary
It can run in a Cloudflare Workers environment or Wasmer Edge, and also supports many frameworks:
- Next.js
- Next.js React Server Components
- Hono (one I’m presently playing with off-and-on)
- Astro.build
- Remix.run
- Svelte
- Gatsby
- Nuxt
It turns out that the migration to WordPress borked Bonus Drop #36, but I just restored it (yay for writing locally in Markdown first!). That covers a self-hosted similar thing by Supabase. It’s not paywalled, so give that a read to see where WinterJS fits into things, and check back for when I get more of a chance to kick the tyres.
Echo-Chamber

This resource is just bonkers fun/cool and anyone can get started with it right after reading this section. I’m going to quote the author directly as it says it pretty plainly:
Echochamber.js is a 3rd-party script you can install to add a simple comment form to your blog post or website.
Why not just use disqus?
Because then there’d be a chance that someone would read the comments. You might have to read those comments. You don’t want that.
When a user submits a comment, echochamber.js will save the comment to the user’s LocalStorage, so when they return to the page, they can be confident that their voice is being heard, and feel engaged with your very engaging content. It does not make any HTTP requests. Since LocalStorage is only local, you and your database need not be burdened with other people’s opinions.
Super fun way to pwn verbose visitors!
So. Many. JS. Cheatsheets

Codeacademy has a great set of JavaScript cheatsheets that are done with a twist. This isn’t some simple three-column JS language map. The sheets have themes like “Create a Back-End App with JavaScript – SQL for Back-End Development” which give you a head start on digging into an area you’re not familiar with or get you started — quickly — in a new area.
They aren’t all-in-one solutions articles; and, you will most certainly have to put in some work and thought. But, they may help you get unstuck or get you pointed in the right direction faster than trying to burn through a tome, or hack-and-pray your way through a new project.
FIN
Remember, you can follow and interact with the full text of The Daily Drop’s free posts on Mastodon via @dailydrop.hrbrmstr.dev@dailydrop.hrbrmstr.dev ☮️
Leave a comment