Of course this also means that every single AI was trained with this, and it adds even more TOCTOU issues...
Posts by Clément Grégoire
I keep seeing `if(file_exists(path)) do_something(path)` and similar.
This infuriates me.
STOP FUCKING DOING 2 SYSCALLS THIS IS BOTH SLOW AND NON ATOMIC.
FFS please... I've even seen it in teaching materials, do everyone a favor and read en.wikipedia.org/wiki/Time-of...
At least in userland you can actually get saved by the kernel 😂
Oh I'm not blaming the kernel, every lock internally starts as a spinlock... And this is a very hard place to get code right given it executes user code in kernel mode 😅
I'm just amused such issues can appear there too, and will definitely use it next time someone shows me a (bad) spinlock!
And @rovarma.bsky.social even kindly linked to my article☺️
Oh mah!
Look, spinlocks are at it again (this time in the kernel, there's no escape!)
I was going to say the same thing, they make it look like this was hard while Linux had RCU for more than 20years now 🤷
Oh nice it makes sense!
Sounds like a lot of work and tiny details to get that working.
Wonder if you'll be able to optimize out things such as spinloops :p
So in theory even allocations are expected to be "stable" and replay at the same memory address? Cool!
Oh I think I get it now(or maybe not), you need to replay from scratch/dump then? Then the tool will fake/replay kernel interactions? I suppose it requires so kind of determinism of the code in the first place? I suppose "records... intrinsics" means you record atomic operations too?
Yeah, access to old versions has been like this for a while sadly... Good luck 😅
Sounds nice! But my first questions with time travel debugging are always :
- what's the overhead?
- how long ago can I go in the past on big games? (for example UE based)
- what about gpu sync?
You'd lack most other perf counters provided by vtune though.
You could probably add it to tracy pretty "easily" since we already support it on Linux, you'd only need to add it to the kernel etw session and do the proper translation to Tracy's event buffers.
Well, my guess is that it's mostly under documented. ETW can collect certain PMU events since win8 I believe, but for those not known to ETW you need driver support. It also (iirc) only allows sampling, not direct access through code.
I've long been opposed to exceptions for reasons, but I have to admit there are use cases.
I don't really agree with most of what is said in the article, but it does make some points.
cedardb.com/blog/excepti...
Dear frontend developers:
Stop fucking using buttons instead of links! I want to be able to copy, open in new tab,... Well, have links be links and not buttons.
Thanks.
Ever wrote spin-locks or had to debug them?
I have, and I got tired of seeing (and writing) crappy ones, so I did a real investigation this time.
Spoiler: trust your OS.
siliceum.com/en/blog/post...
Can we all agree that OpenSSL sucks by requiring perl to build in 2026?
I'm not even asking for CMake support, just no stupid dependencies!
Cup arrived right before Christmas, thanks @matt.godbolt.org
It's getting harder and harder to optimize for new CPUs, we now have NUMA on consumer CPUs...
My "No Graphics API" blog post is live! Please repost :)
www.sebastianaaltonen.com/blog/no-grap...
I spend 1.5 years doing this. Full rewrite last summer and another partial rewrite last month. As Hemingway said: "First draft of everything is always shit".
Did I mention I hate the webdev ecosystem ?
Luckily the @vite.dev's team got it right in rollup... so it's time for us to switch to rollup and dump esbuild.
Still, web dev sucks.
As if it was not already wasteful for Objects imports (this is only really needed for non-Object types)...
It creates one such object PER file doing any import, even if you only need 1 export from the original !
Now let's say you have a SDK with ~780 exports & 171files...
That's 120000 functions!
Today a new episode of "Web sucks"!
When handling import of an external library, ESBuild generates some kind of import table for the whole library.
But since it needs to mimick ESM modules, it creates the "exports" object using Getters instead of properties.
Movie you’ve watched more than six times with a gif. Hard mode: no Stars (Wars nor Trek), LOTR, or Marvel, Disney Animated or Pixar.
Nice to finally see the busy/wait/idle for gpu queues, bubbling was a major issue for a previous client of mine (mitigated by fixing the command list merging, I think it's now OK upstream)
Depends on your OS, on Linux it's easy, on windows you need to juggle with power plans (I've got an internal tool for that, I need to release someday...)
Yep, same as the CPU and other things.
Though it still matters to sometimes profile without stabilizing your machine as it's the "end-user experience", and things such as power change latency can actually kill the perf of your app.
But 90%of the time please do stabilize your machine.