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
to whom it might concern, this is AI running locally on my home network out of github.com/antirez/ds4 used by a DGX Spark 🥳
github.com
GitHub - antirez/ds4: DeepSeek 4 Flash local inference engine for Metal and CUDA
DeepSeek 4 Flash local inference engine for Metal and CUDA - antirez/ds4
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 · 28/05/2026
bsky.app/profile/did:...
010
Andrea Giammarchi @webreflection.bsky.social · 28/05/2026
TIL: mastro! worth saying: it looks like it does much more, it's not just the core behind, it has tons of extra functionalities well integrated with "signals" as primitive. long story short: please do let me know how that worked 🙏
120
Andrea Giammarchi @webreflection.bsky.social · 28/05/2026
oh ... sometimes AI really delivers ... I am working on a pure Python wheel that provides exact same contract around the whole API, that took *ONE MINUTE* because 100% code coverage was in there and JS can translate easily to Python 🥳 github.com/WebReflectio...
github.com
Added a pure Python port of this library by WebReflection · Pull Request #2 · WebReflection/signals
What the description states, this is still a WIP but I want to check CI. This might be published as PyPI package under my name but, most importantly, I want this to be consumable by PyScript and it...
000
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
if you are wondering why this is "as fast as it can be" it's pretty simple: ref.has(k) ? ref.get(k) : (ref.set(k, v), v) checks the map twice for k. This polyfill checks the map twice only if get returned undefined, then it sets anyway so it's 1 check for known keys VS usually 2!
010
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
It shouldn’t happen ever again but glad you didn’t post that, I was on vacation around that time, it wouldn’t have helped me 👋
000
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 · 31/03/2026
if one liner is hard to read I bet one would struggle more with a lengthy loop surrounded by logic that’s possibly error prone, ask AI what gum does and learn recursion for simple tasks?
000
Andrea Giammarchi @webreflection.bsky.social · 30/03/2026
what's to maintain in: [2, 3, 4, 5].reduce(lcm); [12, 18, 36].reduce(gcd); ???
100
Andrea Giammarchi @webreflection.bsky.social · 30/03/2026
if you pay attention that works also as: [2, 3, 4, 5].reduce(lcm); [12, 18, 36].reduce(gcd); 🥳
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 · 28/02/2026
or let's do it the other way around ... show me a single case where Shadow DOM and slots are better than anything I can do with that library and let's compare
110
Andrea Giammarchi @webreflection.bsky.social · 28/02/2026
Vue, React, Svelte, everything built with these + Tailwind CSS are the examples ... anything built with Shadow DOM is the counter example. I prefer the former, not sure what you are asking exactly
200
Andrea Giammarchi @webreflection.bsky.social · 27/02/2026
if the channel is *message*, you're all good, if it's *broadcast* you're still good! if it's *xhr* you are on the slow path but it should still work, if it states *async* please let me know what platform/target/OS/device is it so I can investigate/rule that out of the project: 🙏
100
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 · 23/02/2026
the innerHTML is a (arguably lame) example of anything else you can do, there just to prove the live test page is working anywhere you can try. the advantage of not having ShadowDOM is: * all CSS reset/libraries work out of the box * no JS is needed to render components (ignore innerHTML) * easier
110
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 · 16/02/2026
even with shadow dom *SOME* style cascades anyway, it's misleading and bloat prone since its appearance on the Web, here you just style components contents like you would style any regular element on the web because ... those are real elements of the web
000
Andrea Giammarchi @webreflection.bsky.social · 07/02/2026
I’ve fixed a few hiccups here and there, mostly related to the ability to style [is=“ce-name”] even if created at runtime + ability to automatically create regular custom elements that extend HTML.Element. The /auto variant on CDN lazy load for Safari in less than blink too 🥳
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 · 29/01/2026
live demo on codepen: codepen.io/WebReflectio... try to compare its code with the original one 😉
000
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 · 26/11/2025
> I would probably only replace partial parts of the document and not a nav with a search input in it. agreed, but that's *not* how specs work ... these need to address all edge cases too or ... good luck
100
Andrea Giammarchi @webreflection.bsky.social · 20/11/2025
this is *very* close to a SSR hydration concept and while I welcome this feature as I think it's awesome for HN or X like streams (or chats or list-items, or ...) I wonder what happens if the page had an input in that <nav>, somebody started typing in it (a11y tools too) and that gets replaced ... 🤔
110
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
Andrea Giammarchi @webreflection.bsky.social · 07/11/2025
VPN providers being like ... en.wikipedia.org/wiki/Sickos#...
en.wikipedia.org
Sickos - Wikipedia
010
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