HNHacker News
TopNewBestAskShowJobs

esprehn

2,003 karma · joined July 18, 2011

submissionscomments
esprehn··on Caffeine, cocaine, and painkillers detected in sharks from The Bahamas
There's a whole movie about a snail that's super fast (Turbo). An adult version of that isn't so far fetched.
esprehn··on You can't cancel a JavaScript promise (except sometimes you can)
Yes, I was around during the original discussions. AbortSignal exists because TC39 was taking too long and cancelling fetch() is table stakes for a networking oriented platform like the web.

Those threads are a good example of what's wrong in TC39. A simple AbortSignal could have been added, but by the time it's reconciled with SES, large speculative APIs like Governers, or the original attempt to add a parallel throw mechanism just for cancellation, nothing actually gets done.

It's been 10 years since CancelToken was first discussed and we're still debating it.

esprehn··on Cambodia unveils statue to honour famous landmine-sniffing rat
I just can't help but imagine those long lived rats escaping and taking over our cities. We already struggle with the rat population and they only live 3 years, imagine if they lived 15.

Also I love rats and totally agree they're tough pets because they don't live long enough. We had many of them growing up and spent a fortune removing tumors.

esprehn··on You can't cancel a JavaScript promise (except sometimes you can)
AbortSignal is same thing on the Web. It's unfortunate TC39 failed to ever bring a CancelToken to the language to standardize the pattern outside browsers.
esprehn··on Pretext: TypeScript library for multiline text measurement and layout
The proposal already exists [1], but vendors would need to agree to both prioritize and ship it.

Right now Chrome is much more focused on AI related APIs (sigh) and not stuff like FontMetrics.

[1] https://drafts.css-houdini.org/font-metrics-api-1/

esprehn··on Pretext: TypeScript library for multiline text measurement and layout
The FontMetrics API solves this, hopefully browsers will ship it someday.

https://drafts.css-houdini.org/font-metrics-api-1/

RIP eae@.

esprehn··on I decompiled the White House's new app
It can request with a JS call. It can't passively collect it without you approving first. The article is written like calling that JS function will turn on location tracking without consent.
esprehn··on Show HN: I took back Video.js after 16 years and we rewrote it to be 88% smaller
This is very cool, but I'm confused why the React player is smaller than the HTML player. What's actually in the size comparison there?
esprehn··on Node.js worker threads are problematic, but they work great for us
The worker situation would be much better with inline workers (or modules).

https://github.com/tc39/proposal-module-declarations

Unfortunately the JS standards folks have refused so far to make this situation better.

Ex. it should just be `new Worker(module { ... })`.

esprehn··on The three pillars of JavaScript bloat
No one really does, but there's one particular individual who keeps pushing to support things like node 0.3 and who also maintains all those low level intrinsic packages.
esprehn··on Afroman found not liable in defamation case
2022. I'm not sure phones recorded useful video in 2002.
esprehn··on The MacBook Neo
Ah this is what I missed: https://daringfireball.net/linked/2026/03/12/macbook-neo-on-...

It's not just the menu bar icon (which can definitely be spoofed), but an on screen dot where the system is controlling pixels directly bypassing any OS level drawing on the screen.

Related: https://www.reddit.com/r/iphone/comments/1in0681/iphone_16_m...

esprehn··on The MacBook Neo
The missing camera light seems pretty serious. Any sandbox escape can turn on the camera and record without you noticing. Or your school or employer could. If you're in full screen mode the menu bar is hidden too. It's a very strange move for privacy centered Apple.
esprehn··on Making WebAssembly a first-class language on the Web
The web doesn't work without dynamic feature detection. I couldn't find anything in the component model about how this is expected to work.

The DOM is not a static interface, it changes both across browsers based on implemention status and also based on features enabled on a per page load basis.

The multi browser ecosystem also mainly works because of polyfills.

It's not clear how to polyfill random methods on a WIT interface or how to detect at runtime which methods exist.

OTOH the JS bridge layer we use today means you can load JS side polyfills and get wasm that's portable across browsers with no modifications. There's more to the ecosystem than just performance.

esprehn··on Nobody gets promoted for simplicity
Those verbs (reduced, decreased, increased) all assume the situation was "bad" already. Avoiding that in the initial design is what's poorly rewarded.

Building a system that's fast on day one will not usually be rewarded as well as building a slow system and making it 80% faster.

esprehn··on MacBook Air with M5
Have you used a MacBook as a daily driver since the M chips came out?
esprehn··on Zuckerberg's internal emails rendered as Facebook Messenger
This is really cool, but I wish it was sorted by date. It's difficult to see the narrative since it jumps around.
esprehn··on A better streams API is possible for JavaScript
Web Streams do feel rather painful compared to other languages. The author ends up basically describing kotlin flows which are great and I wish the web would adopt that model (Observables wanted to be that but the API is much worse than flows in practice).

Fwiw the original Streams API could have been simpler even without async iterators.

  interface Stream<T> {
    // Return false from the callback to stop early.
    // Result is if the stream was completed.
    forEach(callback: (chunk: T) => Promise<boolean | undefined>): Promise<boolean>
  }
Similarly adding a recycleBuffer(chunk) method would have gone a long way towards BYOB without all the ceremony.

If we're optimizing allocations we can also avoid all the {done,value} records and return a semaphore value for the end in the proposed API.

(Web) API design is really difficult and without a voice in the room pushing really hard on ergonomics and simplicity it's easy to solve all the use cases but end up with lots of awkward corners and costs later.

esprehn··on A better streams API is possible for JavaScript
Async call stacks is an optional feature when the devtools is open. There shouldn't be overhead from await like that?
esprehn··on Web Components: The Framework-Free Renaissance
On the inside, but not on the outside. Web Components standardize the interface for components to interact like MCP standardized the protocol but the server itself can be in and language. You can't just mix Solid, React and Vue components together but you can use any web component in a Lit app.
esprehn··on Zero-day CSS: CVE-2026-2441 exists in the wild
You joke, but a substantial portion of the Blink engine was (re)written in garbage collected C++ to a similar effect.
esprehn··on JavaScript-heavy approaches are not compatible with long-term performance goals
The slowness in a React app is not the DOM. Typical apps spend most of their time running component code long before any DOM mutations are committed.

If you look at DOM benchmarks it's extremely fast. Slow web pages come from slow layers on top.

esprehn··on The EU moves to kill infinite scrolling
I wish they would go after the fake spinning wheel discount pattern and the "app exclusive" or "better in the app" pattern. That's all a way to get people to install apps that will then bombard folks with notifications or slurp data off the device.
esprehn··on LinkedIn checks for 2953 browser extensions
Reading the fingerprint.js is interesting, it's not just the thousands of extensions. It looks like it's also probing for a long list of webgl extensions, fonts, and other capabilities. There's recaptcha v3 references in there too.

Perhaps an overly aggressive attempt to block bots.

esprehn··on Bugs Apple loves
This is never an issue with number of engineers, it's an issue of business priorities.

Large tech companies have plenty of engineers to fix bugs, but most of them are on projects trying to 10X things instead of paying down debt.

Apple used to be unique in it's immunity to it, they even shipped an OS update claiming it was only big fixes and not features which is unthinkable these days. Over time there's much less focus on polish from them though.

esprehn··on JavaScript's For-Of Loops Are Fast
Airbnb doesn't really follow that guide internally anymore. There's a lot of weird in there. I wish they'd publish the actual internal style and lint rules instead.
esprehn··on JavaScript engines zoo – Compare every JavaScript engine
The size difference is so large it makes me wonder if one is being compiled with ICU and the other without.
esprehn··on MongoBleed Explained Simply
In something like a database zeroing or poisoning on free is probably a good idea. (These days probably all allocators should do it by default.)

Allocators are an interesting place to focus on for security. Chris did amazing work there for Blink that eventually rolled out to all of Chromium. The docs are a fun read.

https://blog.chromium.org/2021/04/efficient-and-safe-allocat...

https://chromium.googlesource.com/chromium/src/+/master/base...

esprehn··on Testing shows automotive glassbreakers can't break modern automotive glass
I didn't know either, Google of just "EDC" figured it out though:

https://en.wikipedia.org/wiki/Everyday_carry

esprehn··on Meta Segment Anything Model 3
It's from 2014, over a decade old.

Relevant to that comic specifically: https://www.reddit.com/r/xkcd/comments/mi725t/yeardate_a_com...

← PreviousPage 2 of 18Next →