Advertisement · 728 × 90

Posts by Andrea Giammarchi

Preview
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.

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...

4 days ago 0 1 0 0
Preview
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.

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...

1 week ago 1 0 0 0

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 👋

1 week ago 0 0 0 0
Preview
Gnome 50 Support · Issue #141 · FelipeFTN/Emoji-Copy Please add Gnome 50 support

updated to GNOME 50 and emoji-copy isn't working anymore? there you go:
github.com/FelipeFTN/Em...

1 week ago 0 0 0 0

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?

2 weeks ago 0 0 0 0

what's to maintain in:

[2, 3, 4, 5].reduce(lcm);
[12, 18, 36].reduce(gcd);

???

2 weeks ago 0 0 1 0

if you pay attention that works also as:

[2, 3, 4, 5].reduce(lcm);
[12, 18, 36].reduce(gcd);

🥳

2 weeks ago 0 0 0 0

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 ... 🤷

2 weeks ago 0 0 2 0

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 🙏

3 weeks ago 0 0 1 0
Advertisement
Preview
GitHub - WebReflection/standup: Updates around my OSS contributions. Updates around my OSS contributions. Contribute to WebReflection/standup development by creating an account on GitHub.

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...

1 month ago 1 0 0 0
Preview
GitHub - WebReflection/flatted-view: Flatted like approach brought to Uint8Array compatible values. Flatted like approach brought to Uint8Array compatible values. - WebReflection/flatted-view

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...

1 month ago 0 0 0 0

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 🥳

1 month ago 0 0 0 0
Preview
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.

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...

1 month ago 0 0 0 0

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

1 month ago 1 0 1 0

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

1 month ago 0 0 2 0

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: 🙏

1 month ago 0 0 1 0
reflected ffi

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

1 month ago 0 0 2 0
Advertisement

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

1 month ago 1 0 1 0
Preview
GitHub - WebReflection/reflected: coming soon coming soon. Contribute to WebReflection/reflected development by creating an account on GitHub.

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...

2 months ago 1 0 0 0

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

2 months ago 0 0 0 0

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 🥳

2 months ago 1 0 0 0
Preview
GitHub - WebReflection/elements: HTML & SVG Custom Elements. HTML & SVG Custom Elements. Contribute to WebReflection/elements development by creating an account on GitHub.

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...

2 months ago 2 1 3 0
Preview
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

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...

2 months ago 1 0 0 0
Post image

live demo on codepen:
codepen.io/WebReflectio...

try to compare its code with the original one 😉

2 months ago 0 0 0 0
Preview
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.

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...

2 months ago 2 0 1 0
Preview
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.

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...

2 months ago 2 0 0 0

> 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

4 months ago 0 0 1 0
Advertisement

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 ... 🤔

4 months ago 1 0 1 0
Preview
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.

"Let's Call The Whole Thing Off" 🎶🎵

github.com/WebReflectio...

5 months ago 0 0 0 0
Preview
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...

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...

5 months ago 0 0 0 0