Petr Skocik (@pskocik) profile picture

Interested in high performance software, systems, langs & making better tools. I also like to work out. https://teapaw.org/t.co/zsqhoMpOWB

Czech Republic
Joined August 2011
Photo by Petr Skocik (@pskocik)Photo by Petr Skocik (@pskocik)Photo by Petr Skocik (@pskocik)Photo by Petr Skocik (@pskocik)Photo by Petr Skocik (@pskocik)Photo by Petr Skocik (@pskocik)Photo by Petr Skocik (@pskocik)Photo by Petr Skocik (@pskocik)Photo by Petr Skocik (@pskocik)Photo by Petr Skocik (@pskocik)
Petr Skocik retweeted
the more i watch people flail around desperately looking for yet another hype-cycle to avoid disciplined responsibility the more i realise that ownership-first development is the way.
10
3
92
1,702
There's something magnetic about going below an interface or security boundary, into ID 0, into a compiler, PID 0, or the kernel, in order to implement a solution. But what I think is underrated is solving the problem just as well or better without requiring the extra privilege.
3
11
395
I know December's looming, but I didn't quite expect this follow. I better be getting candy Dec 6. 😆 (Yeah, that's the right date. I'm Czech, so candy from St. Nick, Dec 6 (or coal from the devil), and gifts from Jesus himself, Dec 24.)
7
197
This is why you benchmark (teapaw.org/pskocik/status/2119089…) & disassemble (teapaw.org/pskocik/status/2119743…) your shit, kids: so you KNOW when you've written better code & when you haven't, without having to resort to fallacious appeals to authority. I can still often write better code than AI.
The creator of Node.js says AI writes “better C++ than he ever could,” and you’re still throwing around “vibe coded” like it’s a bad thing/insult. Easiest way to tell someone isn’t technical and gets all their opinions from X instead of firsthand experience.
1
15
1,154
This is why I: - like langs that DON'T hide complex codegen under simple constructs (this can't happen in C) - couldn't care less about your "elegant & expressive" snippets from your new syslang unless you also show me the corresponding codegen Yes, I do read the assembly.
AI bros do not want you to read assembly! 🤡 Here is what you are missing if you listen to them. Welcome to the case where dumb C++ code wins over a "smart and optimized" code. Here are two implementation of an ECS helper that assigns an id for a component by type. Both approaches work in my game. The first ("dumb") version is what I have had for a while. But look! It has an extra if check and stupid manual assignments. Surely, we can simplify it with a post-increment! Oh, wow, we are so smart. 🤡 Lets do that and compare the generated assembly for both. Surely, the smart case will have less code, be faster, be awesome, and let us feel how smart we are!
9
1
81
8,590
I actually prefer elegant assembly output over elegant high-level language input. I love making asm output short and pretty. I can sacrifice some shortness/prettiness for meaningful performance gains, but short and pretty asm is usually very fast too.
1
7
659
Petr Skocik retweeted
If you’re an outsider or a weirdo. You are only going to become more valuable as time goes on. The normal people or insiders are all going to be replaced by ai. Only the outsiders are going to be the ones who can generate novel insight that ai won’t be able to do. Stay weird.
38
153
24
1,495
32,632
Petr Skocik retweeted
Get out of Tech
81
143
11
2,955
123,238
Petr Skocik retweeted
Replying to @valyala
You can't outsource understanding
1
2
29
3,960
Petr Skocik retweeted
This is exactly my experience with AI-assisted coding.
Was reviewing Claude's code and noticed a sus-looking if condition. Ask it what is this, and it dumped a 2 paragraphs of some very plausible bullshit. If I hadn't known this part of the codebase by heart (because I wrote it by hand) I would've taken it. But I pushed back and told it how it's supposed to be. After it "You're absolutely right"ed me - it did the change, but also changed come completely unrelated code, because, in its opinion, it follows a similar pattern (it's not, there is only some superficial similarity). I got so triggered by it (it was towards the end of the day and I was already kinda tired) that I just rage-nuked all unstaged changes and started rewriting it all by hand. It wasn't much, about 150 lines of code, but while rewriting it my eyes fell on some other code, unrelated to the task, that tingled my spidey-sense. And indeed - there was a bug, actual user-facing bug, and the only reason I spotted it is because it was on the way of me manually navigating to the part I actually needed. This makes me think how many other opportunities to improve the project I miss when I only look at the diffs.
33
41
4
1,423
333,068
Petr Skocik retweeted
This is why I *love* benchmarking. When - Intel Manual says X - AI says X - Multiple authorities on the internet say X - Benchmark says !X The benchmarks is right and all the others are wrong. Wanna know what your CPU likes? Ask the CPU. brainyquote.com/quotes/richa…
1
2
6
153
AI boosters would never know. Protected by their strategy of not reading the code and never questioning the delusions that the mighty AI might happily them in.
Replying to @pskocik
It's funny, these AIs have the knowledge but oftentimes they don't easily connect two and two together until you do.
1
2
299
This is why I *love* benchmarking. When - Intel Manual says X - AI says X - Multiple authorities on the internet say X - Benchmark says !X The benchmarks is right and all the others are wrong. Wanna know what your CPU likes? Ask the CPU. brainyquote.com/quotes/richa…
1
2
6
153
Petr Skocik retweeted
you either die a hero or live long enough to become a "you're falling behind" AI poster
things are moving so fast that if you’re not thinking at least 3-6 months ahead, you’re already behind
8
11
292
4,615
Petr Skocik retweeted
12
538
22
8,935
107,708
The compiler (or as 🇨🇿's say kompilator) is out there. It can't be bargained with. It can't be reasoned with. And it absolutely will not stop until the syntactical and semantic checks pass! 🥰🤖
Replying to @MatejKnopp
Never had a compiler say “oh yeah, you’re right”
7
354
Clang may be vindicated. The 3-offseted load following a 4-byte store doesn't really seem to cause a store-forwarding failure on my Comet Lake CPU (despite violating Rule 41 of the Intel Optimization Manual). A small store followed by a bigger overlapping load is still a big nono
Intel even lists the 3-offseted loads following as causing store-forwarding failure but it doesn't match my Comet Lake benchmarks.
1
1
8
1,002
I chatted with ChatGPT about this and first it was like I SHOULD be getting a store-forwarding failure with the offsetted load but then I told it I wasn't and to track where Rule 41 stopped mattering. Apparently Sandy Bridge and this is in documented in Agner's µarch Manual.
1
4
122
It's funny, these AIs have the knowledge but oftentimes they don't easily connect two and two together until you do.
1
4
363
TIL that macos __getdirentries64 returns not only batched entries but also has a flag for the EOF already brought it to fff which cut our directory reads sometimes by HALF
3
1
18
2,245