Sign in

Andrea Giammarchi

@webreflection.bsky.social
942 followers 32 following 201 posts
PostsRepliesMedia
Andrea Giammarchi @webreflection.bsky.social · 25/06/2026
ProcessingInstruction is coming back (for good!) so who am I for not providing already a polyfill? github.com/ungap/proces... see merged issue from @WHATWG at the top of the README to know more or follow up, if interest 👋
github.com
GitHub - ungap/processing-instruction: A polyfill for ProcessingInstruction attributes
A polyfill for ProcessingInstruction attributes. Contribute to ungap/processing-instruction development by creating an account on GitHub.
000
Andrea Giammarchi @webreflection.bsky.social · 24/06/2026
are you still doing the awkward atob/btoa dance to convert to and from base64? you can stop it now, it's fully supported on modern environments and it can be polyfilled in here: github.com/ungap/base64...
github.com
GitHub - ungap/base64: Uint8Array.fromBase64 and Uint8Array.prototype.toBase64 polyfill.
Uint8Array.fromBase64 and Uint8Array.prototype.toBase64 polyfill. - ungap/base64
022
Andrea Giammarchi @webreflection.bsky.social · 09/06/2026
TFW you are tired of reusing always the same pattern to enable/disable debugging and you'd like to have some tiny tool to deal with it ... because it's an awesome pattern 🥰 github.com/WebReflectio...
github.com
GitHub - WebReflection/devbugger: A tree-shaking friendly D&&BUG pattern with a tiny CLI helper to toggle the debugging flag on or off.
A tree-shaking friendly D&&BUG pattern with a tiny CLI helper to toggle the debugging flag on or off. - WebReflection/devbugger
020
Andrea Giammarchi @webreflection.bsky.social · 02/06/2026
new in DS4 Chat: * bootstrap with your own system prompt * highlight out of the box for code * auto scrolling when images or other transformations happen as answer, right after the answer ends (load event for images) github.com/WebReflectio...
120
Andrea Giammarchi @webreflection.bsky.social · 27/05/2026
Preact-like signals in 0.5K with all tests and benchmarks + 100% code coverage up and running, in case you'd like to explore signals without paying any "bloat tax" (not that Preact or alien-signals are bloated, yet this is 0.5K) github.com/WebReflectio...
github.com
GitHub - WebReflection/signals: A minimalistic Preact-like signals implementation.
A minimalistic Preact-like signals implementation. - WebReflection/signals
3112
Andrea Giammarchi @webreflection.bsky.social · 21/05/2026
unobtrusive and "as fast as it can be" polyfill for both Map and WeakMap methods such as getOrInsert and getOrInsertComputed: github.com/ungap/map-ex... Fully typed too 👋
github.com
GitHub - ungap/map-extensions: Latest `getOrInsert` and `getOrInsertComputed` Map and WeakMap extensions.
Latest `getOrInsert` and `getOrInsertComputed` Map and WeakMap extensions. - ungap/map-extensions
100
Andrea Giammarchi @webreflection.bsky.social · 18/05/2026
if you have any interest in a possible future where JSON can serialize and deserialize more than just 5 types, follow this space/proposal 👋 es.discourse.group/t/jsonregist...
es.discourse.group
JSONRegistry - Allows branded instances in regular JSON
I've written so many serializer/encoder/decoder but I feel like going back to basics every single time, although this time I think I've nailed a prototype that works well with both native JSON API and...
030
Andrea Giammarchi @webreflection.bsky.social · 16/05/2026
CORS landed in ds4 so it's now very simple to chat with it through this little (and fun) project from any mobile or desktop machine with a browser: github.com/WebReflectio...
github.com
GitHub - WebReflection/ds4-chat: DeepSeek 4 Flash Chat
DeepSeek 4 Flash Chat. Contribute to WebReflection/ds4-chat development by creating an account on GitHub.
000
Andrea Giammarchi @webreflection.bsky.social · 14/05/2026
my work and AI are not different topics anymore, here my TL;DR summary for May (busy times, I might not update that space as frequently as I've previously done) 👋 webreflection.github.io/standup/2026...
webreflection.github.io
14th of May, 2026
Updates around my OSS contributions.
130
Andrea Giammarchi @webreflection.bsky.social · 14/05/2026
getOrInsertComputed in Map/WeakMap is actually pretty cool, it simplifies caching a lot and it's not limited to synchronous values, example: const cache = new Map; const asText = async page => fetch(page).then(r => r.text()); await cache.getOrInsertComputed('index', asText);
000
Andrea Giammarchi @webreflection.bsky.social · 23/04/2026
tired of the forward and backward tone/engagement around MutationObserver being able to snitch into Shadow DOM Roots? github.com/WebReflectio...
github.com
GitHub - WebReflection/shadow-observer: A MutationObserver that automatically picks up Shadow Roots when/if needed.
A MutationObserver that automatically picks up Shadow Roots when/if needed. - WebReflection/shadow-observer
020
Andrea Giammarchi @webreflection.bsky.social · 15/04/2026
D1 is awesome but its API a bit "outdated" to me ... so I've written and tested template literals tags for it and I am pretty pleased with the result (and ergonomics). github.com/WebReflectio...
github.com
GitHub - WebReflection/d1-tags: Tagged-template helpers for Cloudflare D1
Tagged-template helpers for Cloudflare D1. Contribute to WebReflection/d1-tags development by creating an account on GitHub.
001
Andrea Giammarchi @webreflection.bsky.social · 09/04/2026
am I the only one seeing a repeatable pattern out of this story? AI is awesome if you know what to ask and what to build, it still requires knowledge around that "what", right? undark.org/2026/04/01/s...
undark.org
Why Swedish Schools Are Bringing Back Books
Amid declining test scores, the country has pivoted away from screens and invested in back-to-basics school materials.
010
Andrea Giammarchi @webreflection.bsky.social · 08/04/2026
updated to GNOME 50 and emoji-copy isn't working anymore? there you go: github.com/FelipeFTN/Em...
github.com
Gnome 50 Support · Issue #141 · FelipeFTN/Emoji-Copy
Please add Gnome 50 support
000
Andrea Giammarchi @webreflection.bsky.social · 30/03/2026
whenever I read posts like "don't us JS Array reduce" I'm like: const gcd = (a, b) => (b ? gcd(b, a % b) : a); const lcm = (a, b) => (a * b) / gcd(a, b); [2, 3, 4, 5].reduce((p, c) => lcm(p, c)); // 60 [12, 18, 36].reduce((p, c) => gcd(p, c)); // 6 I mean ... 🤷
200
Andrea Giammarchi @webreflection.bsky.social · 28/03/2026
apparently my account has been compromised on bsky ... it's honestly the only service out there that never offered me (until today), or enforced, 2FA, it was kinda inevitable, yet my deepest apologies if my account spam/scammed you by any mean 🙏
100
Andrea Giammarchi @webreflection.bsky.social · 12/03/2026
in case anyone is interested, I am documenting what I am working on regularly (each week) with links and every other detail needed to understand where I come from and where I am heading. This is OSS to me, nobody can blame me for not being transparent 😇 github.com/WebReflectio...
github.com
GitHub - WebReflection/standup: Updates around my OSS contributions.
Updates around my OSS contributions. Contribute to WebReflection/standup development by creating an account on GitHub.
010
Andrea Giammarchi @webreflection.bsky.social · 10/03/2026
in today "nobody asked for it, thanks!" news, the recent issue filed against flatted module (333M downloads per months) kinda "scared" me to the point I rewrote the whole thing in a binary friendly format: flatted-view: please test it, thank you 🙏 github.com/WebReflectio...
github.com
GitHub - WebReflection/flatted-view: Flatted like approach brought to Uint8Array compatible values.
Flatted like approach brought to Uint8Array compatible values. - WebReflection/flatted-view
000
Andrea Giammarchi @webreflection.bsky.social · 08/03/2026
flatted is out with a tiny yet important update for the JS variant: if you stringify 50K objects that point to each other you no longer have call stack recursion error on parse, it just works 🥳
000
Andrea Giammarchi @webreflection.bsky.social · 02/03/2026
in today "good morning OSS" news, @golang receives its first *flatted* implementation, making flatted now usable in JS, TS, Python, PHP and, ultimately Go 🥳 Huge thank to Harald Fielker for helping out (writing everything), lets' go beyond 300M Downloads! github.com/WebReflectio...
github.com
GitHub - WebReflection/flatted: A fast and minimal circular JSON parser.
A fast and minimal circular JSON parser. Contribute to WebReflection/flatted development by creating an account on GitHub.
000
Andrea Giammarchi @webreflection.bsky.social · 27/02/2026
dear followers, I need to ask you a little favor: I am trying to fix the Web around SharedArrayBuffer and the ability to synchronize any task from a never blocking Worker, I need you to tell me if this page is blank or shows "async" as channel, thank you! webreflection.pythonanywhere.com
webreflection.pythonanywhere.com
reflected ffi
200
Andrea Giammarchi @webreflection.bsky.social · 17/02/2026
there's one primitive missing on the Web and that's the ability to synchronously make a Worker busy while querying the main thread ... in coincident I've solved that but the missing primitive is hurting a lot (for debugging reasons) so ... here I am again: github.com/WebReflectio...
github.com
GitHub - WebReflection/reflected: coming soon
coming soon. Contribute to WebReflection/reflected development by creating an account on GitHub.
010
Andrea Giammarchi @webreflection.bsky.social · 06/02/2026
today I’ve quickly glued together two libraries that makes custom elements without shadow dom as fast and as simple as it can get and for every browsers … after reading the N post about ShadowDOM issues with CSS. You can stop that madness already 👋 github.com/WebReflectio...
github.com
GitHub - WebReflection/elements: HTML & SVG Custom Elements.
HTML & SVG Custom Elements. Contribute to WebReflection/elements development by creating an account on GitHub.
321
Andrea Giammarchi @webreflection.bsky.social · 04/02/2026
JS Proxy are wonderful, penalized by TS inability to actually understand/deal with these but the things that these unlock are incredible! It might be a niche use case but if you need cached results, here my next go-to library: github.com/WebReflectio...
github.com
GitHub - WebReflection/cached-proxy: A cached Proxy with optional timeouts per property to simplify complex remote scenarios.
A cached Proxy with optional timeouts per property to simplify complex remote scenarios. - WebReflection/cached-proxy
010
Andrea Giammarchi @webreflection.bsky.social · 28/01/2026
this might be handy for any "forever waiting" pattern that requires instant reactivity + it doesn't leak compared to the original post that inspired it 😇 github.com/WebReflectio...
github.com
GitHub - WebReflection/gen-q: An efficient queue implementation for JavaScript.
An efficient queue implementation for JavaScript. Contribute to WebReflection/gen-q development by creating an account on GitHub.
120
Andrea Giammarchi @webreflection.bsky.social · 22/01/2026
a common complain about our minimalistic TOML parser is that it wouldn't support trailing commas ... well, v0.4.0 does now, keeping it ~540bytes after brotli 🥳 github.com/WebReflectio...
github.com
GitHub - WebReflection/basic-toml: A simple TOML subset parser.
A simple TOML subset parser. Contribute to WebReflection/basic-toml development by creating an account on GitHub.
020
Andrea Giammarchi @webreflection.bsky.social · 14/11/2025
"Let's Call The Whole Thing Off" 🎶🎵 github.com/WebReflectio...
github.com
GitHub - WebReflection/packatoon: Pack JSON collections as TOON like format
Pack JSON collections as TOON like format. Contribute to WebReflection/packatoon development by creating an account on GitHub.
000
Andrea Giammarchi @webreflection.bsky.social · 10/11/2025
if you use Proxies and you bind methods returned on `get` trap, please read carefully why that's a bad idea and how to avoid doing that: es.discourse.group/t/reflect-se...
es.discourse.group
Reflect.set(...args, receiver) throwing for no reason
I swear I read binding before and because that’s a delicate topic I’d like to explain to future readers how not to bind methods because: obj.method === obj.method should always be true obj.method in...
000
Andrea Giammarchi @webreflection.bsky.social · 10/11/2025
so ... TOON is basically JSONH but 14 years later? ... cool 🙄 medium.com/medialesson/... github.com/WebReflectio...
medium.com
JSON vs TOON — A new era of structured input?
Why structure matters more than ever
110
Reposted by Andrea Giammarchi
Jake Archibald @jakearchibald.com · 07/11/2025
I guess the idea that a customer might be away from home isn't intuitive to A FUCKING AIRLINE
31013
Reposted by Andrea Giammarchi
Jake Archibald @jakearchibald.com · 07/11/2025
Great, so www.britishairways.com 🎉 Displays in geo language rather than user language 🎉 The language picker is at the bottom of a long page 🎉 The language picker is in the current language, so in order to select "United Kingdom", I need to know what that is in German
A list of locations in German
261588
Andrea Giammarchi @webreflection.bsky.social · 07/11/2025
cleaning up signals effects automatically on vanilla DOM cases might be tricky ... the fact an inner node contains references to its parent makes it hard to do so via FinalizationRegistry but thanks to Proxy/WeakRef it's possible to make it easy: weaky 🥳 github.com/WebReflectio...
github.com
GitHub - WebReflection/weaky: An easy way to avoid leaks.
An easy way to avoid leaks. Contribute to WebReflection/weaky development by creating an account on GitHub.
010
Andrea Giammarchi @webreflection.bsky.social · 31/10/2025
brainstorming uhtml v5 and if you have hints/ideas/comments you are more than welcome to chime in 🙏 github.com/WebReflectio...
github.com
Re-thinking uhtml v5 · WebReflection uhtml · Discussion #160
So, I've clearly made a mistake in current v5 implementation: I've introduced a hybrid model where both render and reactivity via signals was backed in at the same time if signals are meant to defi...
030
Andrea Giammarchi @webreflection.bsky.social · 30/10/2025
a quick introduction to regurlator 😇 www.youtube.com/watch?v=BJKm...
youtube.com
Introducing Regurlator Web Extension
YouTube video by Andrea Giammarchi
231
Andrea Giammarchi @webreflection.bsky.social · 29/10/2025
regurlator is out 🥳 chromewebstore.google.com/detail/regur...
chromewebstore.google.com
regurlator - Chrome Web Store
A RegExp URL Redirector
000
Andrea Giammarchi @webreflection.bsky.social · 28/10/2025
tired of looking for "Open in Browser" links ??? I did create WebJeans and Woom (local only) but the pattern is always the same so I've put an end to this pointless struggle and published regurlator extension: you are in charge, you can redirect anything! github.com/WebReflectio...
github.com
GitHub - WebReflection/regurlator: A RegExp URL Redirector.
A RegExp URL Redirector. Contribute to WebReflection/regurlator development by creating an account on GitHub.
020
Andrea Giammarchi @webreflection.bsky.social · 24/10/2025
this bug is the reason I am trying to provide a basic utility that would take care of everything out of the box as the dance to persist users' choice on local FileSystem access is nearly unbearable and convoluted in branches and operations to do ... 🥲 issues.chromium.org/issues/45453...
issues.chromium.org
Chromium
000
Andrea Giammarchi @webreflection.bsky.social · 24/10/2025
watch out developer.mozilla.org/en-US/docs/W... returns true while live-debugging because typing in devtools automatically activate transient mode. This might be a huge source of confusion and WYSI-NOT-WYG 👋
developer.mozilla.org
UserActivation: isActive property - Web APIs | MDN
The read-only isActive property of the UserActivation interface indicates whether the current window has transient user activation.
000
Andrea Giammarchi @webreflection.bsky.social · 23/10/2025
TIL: if you store in IndexedDB a granted FileSystemX handler you should als store with it options because if you close and reopen the browser, or create a new session, that handler will not work unless you check again against its permissions. Only then it prompts: once or always?
110
Andrea Giammarchi @webreflection.bsky.social · 22/10/2025
Davie504 is suing Suno AI and for very valid and good reasons: www.youtube.com/watch?v=RNHx...
youtube.com
I'm Suing
YouTube video by Davie504
000
Andrea Giammarchi @webreflection.bsky.social · 18/10/2025
TIL: event.intercept(...) after navigation.addEventListener('navigate', ...) 🤯 developer.mozilla.org/en-US/docs/W...
developer.mozilla.org
NavigateEvent: intercept() method - Web APIs | MDN
The intercept() method of the NavigateEvent interface intercepts this navigation, turning it into a same-document navigation to the destination URL.
010
Andrea Giammarchi @webreflection.bsky.social · 17/10/2025
best honest video I've seen around Linux as developer: www.youtube.com/watch?v=GQJZ...
youtube.com
Apple Introduces The Year Of The Linux Desktop!
YouTube video by ThePrimeTime
000
Andrea Giammarchi @webreflection.bsky.social · 14/10/2025
in which I've found a way to have "protected" properties only the class owner can handle. these can also be orchestrated as accessor: static a(self, ..._) { if (_.length) [self.#a] = _; return self.#a; }
class A {
  #a;
  constructor(a) {
    this.#a = a;
  }

  // allowed to reach #a
  static a(self) {
    return self.#a;
  }
}

const a = A.a;

// removed to avoid reaching #a
// outside this module scope
delete A.a;

const ref = new A('secret');

// in here we can reach #a
a(ref); // 'secret'
240
Andrea Giammarchi @webreflection.bsky.social · 07/10/2025
Web extensions can query tabs and each tab can have a unique identifier that persist across refreshes but it's unique per tab (just like sessionStorage) if you need similar unique identifier on the server (uid per tab persistent on refreshes) here a demo: webreflection.github.io/session/
webreflection.github.io
@webreflection/session
110
Andrea Giammarchi @webreflection.bsky.social · 22/09/2025
I need to ask this: how is it possible that `sessionStorage` cannot be replicated, as unique tab identity, on the server? My exploration tells me is entirely a browsers’ fault and nothing else … who has a reliable solution out there? (Nobody to my understanding) 🤦
000
Andrea Giammarchi @webreflection.bsky.social · 18/09/2025
A Service Worker nightmare used as fallback to sync blocking POST messages to circumvent the absence of SharedArrayBuffer, it needs hacks to resurrect such SW on occasions (open/close devtools, as example). On iOS / iPadOS devices that SW dies and there's nothing one can do 🤦
010
Andrea Giammarchi @webreflection.bsky.social · 16/09/2025
TIL ... WebNN (Neural Network) API ... I feel like this is needed "yesterday" already, hope to see it implemented soon in all relevant browsers www.w3.org/TR/webnn/
w3.org
Web Neural Network API
110
Andrea Giammarchi @webreflection.bsky.social · 12/09/2025
I've lost the count of times I've written: el.append( Object.assign( document.createElement('div'), { textContent: '...', className: '...', onclick: ... } ) ) so I've written a minimalistic helper that does just that and very little more 😇 github.com/WebReflectio...
github.com
GitHub - WebReflection/element: A minimalistic DOM element creation library.
A minimalistic DOM element creation library. Contribute to WebReflection/element development by creating an account on GitHub.
020
Andrea Giammarchi @webreflection.bsky.social · 05/09/2025
mixed feelings around JS prototype pollution ability: it has been playing really well for polyfills to date but it allows any malicious code to observe/intercept everything the env does, especially `await` operations via Promise.prototype.then pollution Any other PL like that? 🤔
020
Andrea Giammarchi @webreflection.bsky.social · 23/08/2025
is this a @TauriApps alternative that actually just needs node/bun ffi and for some reason I had no idea about it? 🤔 github.com/saucer/saucer
github.com
GitHub - saucer/saucer: 🛸 A modern, cross-platform C++ webview library
🛸 A modern, cross-platform C++ webview library. Contribute to saucer/saucer development by creating an account on GitHub.
010