Fabio Spampinato's Avatar

Fabio Spampinato

@fabiospampinato

Trying to write good software.

136
Followers
53
Following
45
Posts
06.11.2024
Joined
Posts Following

Latest posts by Fabio Spampinato @fabiospampinato

Fortunately in 2022 they added new prefixes ๐Ÿ˜‚ I don't know if I like the sound of "rontomatch" and "quectomatch" that much though.

20.10.2025 17:02 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Post image Post image

Zeptomatch v2.1.0 update ๐Ÿฅณ:

- Partial matching, for traversing the filesystem easily _and_ efficiently.
- Roughly 2x faster single-glob matching, and 4x faster multi-glob matching (it's dependent on the specific globs though).
- Now roughly ~10x faster than minimatch.

github.com/fabiospampin...

20.10.2025 11:01 ๐Ÿ‘ 21 ๐Ÿ” 4 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 1

The thing to understand is that this stuff is just not well optimized ๐Ÿคฃ

30.04.2025 17:50 ๐Ÿ‘ 4 ๐Ÿ” 0 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 0

On the other hand regexes in my experience have been a rare glimmer of beauty in the programming world. A pleasure to work with, expressive, powerful, compact, predictable execution, predictable-enough performance, and a correct implementation (as far as I've seen at least), which is huge.

01.04.2025 10:09 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

CSS itself is messy, there's no visible link between how "contain: paint" and "position: absolute" interact, you just need to know, and there are thousands of possible interactions like that to consider. A ton of new (buggy!) features have been added. The tooling was never there. Perf is a gamble.

01.04.2025 10:09 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

That's not accurate for me: the DOM barely changed for me in the past 10 years and its understandable (but ugly), I don't care for the Shadow DOM, I use my own framework with a lot of nonsense deleted (imo, of course) that other "modern" approaches bet on, I don't use stuff that abstracts CSS etc.

01.04.2025 10:09 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

That said I haven't seen something as expressive and easy to use as CSS, a ton of very nice features got implemented for it in recent times, and fundamentally it seems to be tackling a much harder problem than a regex engine is, so I'll cut it some slack.

01.04.2025 08:58 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Also there is a lack of tooling for understanding what work CSS is actually causing, or why that needs to happen, its performance is much less predictable than the performance of a regex engine, and CSS work can happen for ~any reason, it's not like a regex that _you_ explicitly execute somewhere.

01.04.2025 08:58 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

CSS on the other hand is a mess of hundreds of properties, potentially all interacting with each other in very non obvious ways. Last week I reported 2 Chrome bugs about some CSS features messing things up when used together, I've never seen anything like that for regexes, that would be insane.

01.04.2025 08:58 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 0

There's a huge difference here though: the people that don't like CSS are right ๐Ÿคฃ

One can run most regexes in their head, sometimes with some effort, and when that's not possible tools exist to step through the execution and stuff like that, the understandability of regexes is a solved problem.

01.04.2025 08:58 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Very similar for visual stuff: for apps the UI doesn't want to attract attention away from the usefulness, for art the UI wants to attract the attention and there's no "usefulness".

29.03.2025 12:16 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

At least you got a good number, it might have been annoying if you had gotten -73

18.03.2025 01:16 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Somebody in Chrome should probably look into optimizing ::highlight() selectors because that stuff should go at the speed of light (we know all the matches from the start because the user told us), but it doesn't seem to be, at all.

17.03.2025 19:19 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

I don't get how capturing tracing information from a Chrome instance containing only one tab that is not even filling the screen with content and is using about 400 body elements could possibly take over a minute (I had to kill it).

Did Chrome hire people trying to make things slower or something?

17.03.2025 18:44 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Download images: 3831ms
Download webfonts: 1912ms
JS execution: 34ms
DOM reflows: 1109ms
Ad loading: 2019ms

Someone who can write a JS-to-native transpiler please help, my webpage performance is dying

17.03.2025 15:58 ๐Ÿ‘ 25 ๐Ÿ” 4 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

In general Meta seems to give employees kind of a lot of freedom, like if you have the time you can submit PRs for ~anything. You can have even more freedom if you don't care too much if you get fired because what you didn't wasn't valued enough ๐Ÿคฃ

15.03.2025 21:07 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

I joined a team that was meant to work on this kind of stuff, unfortunately there has been an internal reorg and we are supposed to be doing something else now. I'm ~finishing up some past work at the moment, will see how it goes after that ๐Ÿคทโ€โ™‚๏ธ

15.03.2025 21:05 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Needless to say that that I have zero selectors matching on the value of that style attribute. And actually that kind of thing may be a huge area to explore for optimizations: what if there was a way to attach styles and ~classes that can't be targeted by anything else?

15.03.2025 16:39 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Very interesting how just changing an inline style on an element, which changes the "cursor" being rendered, triggers a style/layout/paint recalc for the entire page in Chrome ๐Ÿ™ƒ

By far the biggest structural performance issue on the web is how rendering works, imo. What are we doing about that?

15.03.2025 16:38 ๐Ÿ‘ 3 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Borderline criminal the size of an avocado seed.

14.03.2025 22:48 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Did you consider porting tsc from typescript to javascript?? The port could have been fully automated, which would have been a huge advantage compared to porting to go.

13.03.2025 08:34 ๐Ÿ‘ 19 ๐Ÿ” 0 ๐Ÿ’ฌ 2 ๐Ÿ“Œ 0

I'd love to eventually ditch inputs for a use case of mine in order to make them little 1-line editors, with support for multiple cursors and other editor stuff.

09.03.2025 00:49 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

GraphQL+Relay? Or was it a partial downgrade?

08.03.2025 17:30 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

I wonder how much of a difference profit-wise would be for Tesco to use different baskets. The have ones that are very heavy (metal instead of plastic), oddly shaped (they could carry much more stuff without feeling bigger), and with unergonomic handles (thin metal ones that dig into your hands).

05.03.2025 14:36 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Is there any on-demand CI where you send them the commands to execute and they just run them and give you stdout/stderr back?

I'd like to add support for executing my tests ~anywhere to my test runner, but I don't want a github-style CI thing, I just want an extra --flag and my existing workflows.

04.03.2025 22:19 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

I touched moss, does it count?

23.02.2025 23:06 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0

Do all of these include copious amounts of pasta, or did I misunderstand?

23.02.2025 15:27 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Post image

Your outie hates each re-render equally

22.02.2025 02:10 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Thought brought to you by having spent like two hours trying to actually instantiate an existing tooltip component over a range of text... unfortunately they made this tooltip not a controlled component, so I have no way to tell it to actually render something that doesn't mess something else up ๐Ÿ™ƒ

20.02.2025 22:40 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Some incentives are interestingly different with signals: if you make a component a controlled component or not then updating it costs the same, but with a VDOM if the state lives in the parent now updating it is potentially much more expensive, so you are kinda incentivized to do the wrong thing ๐Ÿค”

20.02.2025 22:38 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 1 ๐Ÿ“Œ 0