Khafra retweeted
JUST IN: Riemann Hypothesis has been solved.
alpo.ge/remark.pdf
Containers are Cloudflare's most underrated product, by far. Ignore the ai-first marketing, they're a fantastic product whenever you need something that would typically/previously require a VPS.
1
83
Khafra retweeted
Due to AI, I have disabled external pull requests on all my repos.
Open source, as we have known it, was fun while it lasted. (It’s been 15 years for me)
I will still maintain projects and handle issues.
Don't use the global WebSocket in node. Coming from the person who originally implemented it, you really should not be using it.
Use ws. You'll get a more consistent API since it doesn't pretend to be something it isn't.
2
124
I love @Cloudflare DurableObjects, but having incidents every 9 days on average since January is unacceptable. 20 incidents this year alone!
new.cloudflarestatus.com/his…
3
3
134
Node apparently will have native .zip support, possibly in v27. I never thought I'd see the day, there were quite a few critics in the feature request (from 2022!).
github.com/nodejs/node/pull/…
If anyone's interested, it's possible to get canvaskit-wasm working on Cloudflare Workers with 2 simple patches:
1. handle __dirname being undefined
2. implement the missing instantiateWasm hook
gist.github.com/KhafraDev/88…
1
211
Khafra retweeted
Yesterday I spent the entire day “coding” with my AI. Together we built a solid architecture. What did I do next?
I told the AI: drop the worktree, delete everything.
In a sense, you could say I wasted my whole Saturday. I tried something, and instead of letting the AI keep working on it, I chose to say no.
Knowing when to say no, and then moving on, is an important skill. It applies just as much to a career. Many people stay stuck because they are told to do X, Y, and Z and cannot bring themselves to refuse. They waste years meeting other people’s expectations, only to realize later that they have been had.
I have said no to many offers in my life. In a few cases, saying yes would have made me several times richer. I have no regrets. Had I said yes to everything, I would have been lost in pure mediocrity.
You need focus. You must decide what actually needs to be done and do that, rather than everything else you might do.
This remains true even if you are a junior in a bureaucratic setting. There are always moments when saying no is necessary for your own good.
The same logic applies to AI coding. Your AI will happily generate enormous piles of code. It will offer to refactor the same code multiple times. It costs only a few tokens, why not say yes?
Because that path leads straight to mediocrity.
By saying no you will miss out. Perhaps the AI would have built a feature that truly mattered for your career.
Sure.
But you still have to say no a lot.
Be picky. Be decisive. Have good taste.
I'm going to step away from maintaining undici (node's fetch/EventSource/WebSocket). AI has made maintaining it miserable. Every terrible idea now has free reign while taking up my time and piece-by-piece breaking down my patience and enjoyment.
I had Fable whip this POC up... unfortunately node:quic isn't totally feature complete yet :)
![import { WebTransport } from 'undici' const wt = new WebTransport( 'https://127.0.0.1:4443/webtransport/handlers/echo.py', { headers: { origin: 'https://127.0.0.1' }, serverCertificateHashes: [{ algorithm: 'sha-256', value: Buffer.from( 'CLFmbBhHj2Mj4oEH4DdPJqFb1bB9AEABCcqRdIZtGTo=', 'base64' ) }] } ) await wt.ready.then(() => console.log('Connected!')) const writer = wt.datagrams.createWritable().getWriter() const reader = wt.datagrams.readable.getReader() await writer.write(new TextEncoder().encode('hello')) const { value } = await reader.read() console.log('Received:', new TextDecoder().decode(value))](https://pbs.twimg.com/media/HNJ3O3VXsAAigu5.png?name=small&format=webp)
ALT import { WebTransport } from 'undici' const wt = new WebTransport( 'https://127.0.0.1:4443/webtransport/handlers/echo.py', { headers: { origin: 'https://127.0.0.1' }, serverCertificateHashes: [{ algorithm: 'sha-256', value: Buffer.from( 'CLFmbBhHj2Mj4oEH4DdPJqFb1bB9AEABCcqRdIZtGTo=', 'base64' ) }] } ) await wt.ready.then(() => console.log('Connected!')) const writer = wt.datagrams.createWritable().getWriter() const reader = wt.datagrams.readable.getReader() await writer.write(new TextEncoder().encode('hello')) const { value } = await reader.read() console.log('Received:', new TextDecoder().decode(value))
3
528
This will probably cut my Cloudflare costs in half. Had Fable rewrite a bunch of workers to use this last night.
nitter.cf/Cloudflare/status/2074…
We are launching Workers Cache, a regionally tiered cache that sits directly in front of your Worker entrypoints. Infinitely composable, configured via standard HTTP headers. cfl.re/44IVyfI
2
247
Khafra retweeted
Workers Cache — Your Cloudflare Worker now has its own tiered cache in front of it:
blog.cloudflare.com/workers-…
Workers Cache is a programmable tiered cache between Workers — even between code running in the same Worker
we’ve seen pretty much every approach to caching over the years from our customers, and Workers Cache is the direct result of everything we’ve learned
it takes all the workarounds and clever hacks we’ve seen to make sites and APIs fast, and simplifies them down to writing JavaScript and returning Cache-Control headers
you can use for so much — for us this is like shipping 12 different things on the same day
first up — you can use it to place your app near your database, cache its responses, and run code in front close to users:
In the next version of undici (probably), Response.prototype.textStream() and Request.prototype.textStream() will be implemented
github.com/nodejs/undici/pul…
2
7
793
















