Andrea Giammarchi

Web, Mobile, IoT: all JS things since 00's - opinions are my own ™

Andrea Giammarchiwebreflection
2025-06-19
Andrea Giammarchiwebreflection
2025-06-17

Biggest milestone? A round trip worker to main and back of 2MB ArrayBuffer inside F32 went down from 150ms to just 2ms 🤯

Everything else is 0.x time 🍻

github.com/WebReflection/coinc

Andrea Giammarchiwebreflection
2025-06-10

I am factoring out coincident/window (soon to be updated) to fully separate concerns and provide a standalone sub-project to nail that part of the stack.

If interested, I started explaining what's behind the scene here 👋
github.com/WebReflection/refle

Andrea Giammarchiwebreflection
2025-05-21

@mauve Babel, Firefox, Chrome/ium, all there already and it's an official proposal I believe advanced to stage 2 or 3 github.com/tc39/proposal-expli ... JSC/Safari will hopefully come soon!

Andrea Giammarchiwebreflection
2025-05-21

nice and clean via Explicit Resource Management 🥳

v8.dev/features/explicit-resou

using timeout = {
  $: setTimeout(() => controller.abort('timeout'), 5000),
  [Symbol.dispose]() {
    clearTimeout(this.$);
  }
};
Andrea Giammarchiwebreflection
2025-05-20

if interested, this is the related "bug" filed at WHATWG:

github.com/whatwg/html/issues/

Andrea Giammarchiwebreflection
2025-05-20

… and just like that, turns out that Error cause is cloned in Chromium and ignored in WebKit (or at least Bun) 🤦

It’s always the same: I find a cool/elegant way to solve issues via native APIs … native APIs are not the same across engines 😭

Here is WHATWG specs to blame 😢

Andrea Giammarchiwebreflection
2025-05-19

@_O we already do that, coincident project handles everything but the ad-hoc crawling to resolve the same issue everyone else has in similar projects is extremely annoying, redundant, slow … and unless there is a standard way to do that (my proposal) we’ll all look like fools 😢

Andrea Giammarchiwebreflection
2025-05-19

hopefully I've explained it all in this post ... please help me out landing this proposal, the polyfill is already code-covered 100% and it works shamelessly workers to NodeJS or main thread context 🥳

webreflection.medium.com/survi

Andrea Giammarchiwebreflection
2025-05-19

@rbuckton yes, because nobody can use Proxies or other user-land classes right now and Structs won't solve that neither

Andrea Giammarchiwebreflection
2025-05-19

for the time being this proposal landed in my own repo but if it lands in WHATWG and TC39 it would be **HUGE** 🥳

github.com/WebReflection/seria

Andrea Giammarchi boosted:
Terence EdenEdent
2025-05-17

Hey, 90s kids! Your bedroom is now in a museum!

(Prague's National Museum, if you want to make a complaint.)

Typical 1990s bedroom. CRT monitor, modem, vhs and floppy disks.
Andrea Giammarchiwebreflection
2025-05-16

a utility to safely invoke?

before 2016:
const { call } = Function;
const apply = call.bind(call, Function.apply);
apply(callback, context, args);

after 2016:
const { apply } = Reflect;
apply(callback, context, args);

I often forget myself I can just trap Reflect utilities🤦

Andrea Giammarchiwebreflection
2025-05-16

my ugly workaround is similar to:

let name=($,_={}.toString.call($).slice(8,-1))=>(_ in self)?_:name(Object.getPrototypeOf($));

and then

if (name(ref) === 'Object') ... loop props to do things

does anyone has a better/faster way around? 🤔

Andrea Giammarchiwebreflection
2025-05-16

there is one particular dance JS engines do on structured-clone algorithm to understand if a reference is a plain object (or degraded as such) or an instance of a native class (also degraded, but less so) and I wonder where on earth is that API to know if an object is "literal" !

Andrea Giammarchiwebreflection
2025-05-16

I am tired of working around this simple requirement that is mandatory for anyone dealing with proxies and `postMessage` related dances so that, at least until Symbol.toStructuredClone won't exist on the JS/Web platform, here's my solution:
github.com/WebReflection/is-pr

Andrea Giammarchiwebreflection
2025-05-08

this is just beautiful ... goodbye clunky JS based carousels 🥳
chrome.dev/carousel-configurat

Andrea Giammarchiwebreflection
2025-05-06

TIL Atomics.pause() ... which erased 10 seconds (!!!) from CI in testing PyScript and Pyodide from a worker 😱
the feature detected fast-path landed already in coincident, works with sabayon polyfill around, forces Firefox to not use it or it dies forever🤦but it's a good news 🥳

Andrea Giammarchiwebreflection
2025-04-30

is *I* can polyfill SAB, Atomics.wait and Atomics.waitAsync for all browsers I wonder what is it that's holding Browsers' vendors to actually ship something able to provide that same SharedArrayBuffer feature w/out Spectre and Meltdown paranoia behind 🤔

github.com/WebReflection/sabay

Andrea Giammarchiwebreflection
2025-04-30

I can see already every single npm module being updated with

//# allFunctionsCalledOnLoad

on top of it 😅

v8.dev/blog/explicit-compile-h

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst