Valentin Ignatev✓

@valigo

programmer, speedrunner, father, immigrant alt: @valigo_ru https://t.co/KnVpup9T96 | https://t.co/U02QuCReZC | https://t.co/kwWcXroCbY

349 Following15K Followers13.6K Posts
  1. Valentin Ignatev✓@valigo
    There are many ways to kill performance in a multithreaded program. My favorite one is false sharing, because you can get 10x performance just by moving some bytes around. So let's look into it. 00:00 - When multiple threads is not even faster 04:23 - CPU L1 cache primer 09:40 - Getting ALL the performance 15:35 - Looking at disassembler 20:29 - How to find cache line address 22:38 - false sharing in disassembly 25:00 - closing words
    Download
    255995539.5K
  2. Valentin Ignatev✓@valigo
    Based-based-based, although I'd say 3-5 years instead of 2, because you also need to learn how to solve maintainability problems which you never deal with in short-lived projects.
    rygo6 @_rygo6
    A lot of programming is now like long division or solving a derivative. Where in early math classes it's important you spend a month grinding through long division. Or spend multiple months calculating derivatives by hand then calculating integrals by hand. To drill into your muscle memory a deeper instinct about what exactly is happening. Because then out in the real world you never do that EVER. You use the calculator. BUT despite the fact you use the calculator you still have a deeper instinct on what exactly you are doing. When wolfram spits you back an anti-derivative, you'll immediately have a deeper instinct on what exactly that fully means and how to make the best use of it. A lot of programming is like that now. It just makes no sense to type it all out line-by-line. However, there is probably two years' worth of manual C programming every student should do before they get to use an LLM. My short list of this would probably be: - Implement a Vulkan renderer from scratch in C that can load some mesh and let you walk around. Type out all of the matrix math calculations. Type out all of the bindings and descriptors. Type the GLSL by hand. - You need to implement some complex compute shader by hand that forces you to have to figure out the branchless implementation of something complex. Implementing Ambient Occlusion or some fractal is probably good. - Implement a parser. Either JSON or a simple subset of C is fine. Where you have to fully parse through everything, distinguish tokens, collect them in a data structure. - Implement a SPSC queue and a pool with generational handles from scratch in C. - Implement some intricate immediate mode GUI for an app by hand with animations and hover effects and all the modern pizzazz. - Implement a player controller for some game. 2D or FPS game or a racing game that "feels" comparable to something in a modern game. - Implement some backend CRUD API for doing database operations entirely by hand. I think after someone goes through all of those I'd have a base level of trust they could crap out a bunch of LLM code with adequate instinct to keep it under control.
    32973.5K
  3. rygo6✓@_rygo6
    A lot of programming is now like long division or solving a derivative. Where in early math classes it's important you spend a month grinding through long division. Or spend multiple months calculating derivatives by hand then calculating integrals by hand. To drill into your muscle memory a deeper instinct about what exactly is happening. Because then out in the real world you never do that EVER. You use the calculator. BUT despite the fact you use the calculator you still have a deeper instinct on what exactly you are doing. When wolfram spits you back an anti-derivative, you'll immediately have a deeper instinct on what exactly that fully means and how to make the best use of it. A lot of programming is like that now. It just makes no sense to type it all out line-by-line. However, there is probably two years' worth of manual C programming every student should do before they get to use an LLM. My short list of this would probably be: - Implement a Vulkan renderer from scratch in C that can load some mesh and let you walk around. Type out all of the matrix math calculations. Type out all of the bindings and descriptors. Type the GLSL by hand. - You need to implement some complex compute shader by hand that forces you to have to figure out the branchless implementation of something complex. Implementing Ambient Occlusion or some fractal is probably good. - Implement a parser. Either JSON or a simple subset of C is fine. Where you have to fully parse through everything, distinguish tokens, collect them in a data structure. - Implement a SPSC queue and a pool with generational handles from scratch in C. - Implement some intricate immediate mode GUI for an app by hand with animations and hover effects and all the modern pizzazz. - Implement a player controller for some game. 2D or FPS game or a racing game that "feels" comparable to something in a modern game. - Implement some backend CRUD API for doing database operations entirely by hand. I think after someone goes through all of those I'd have a base level of trust they could crap out a bunch of LLM code with adequate instinct to keep it under control.
    161842016.4K
  4. Valentin Ignatev✓@valigo
    Think about it a bit differently: If true, this means that the worst part about web - frontend - is dead. Traditionally, MOST of a web project's budget would be blown on research and implementation of user-facing web UI. And web UIs are horrible. Having clean backend-driven features that are exposed to agents honestly sounds like a dream if you're a backend guy. And then if a user really wants nasty react dashboard - they can just ask their claude to make it. If you ask me - kill SaaS web UI, leave user-facing UI to fast and beautiful native applications.
    Theo - t3.gg @theo
    If I have to go to a dashboard to use your product, I'm not going to use your product. If anything, I'm more likely to tell Claude to rebuild your product.
    74643.8K
  5. Theo - t3.gg✓@theo
    If I have to go to a dashboard to use your product, I'm not going to use your product. If anything, I'm more likely to tell Claude to rebuild your product.
    326872.8K214K
  6. Valentin Ignatev✓@valigo
    Buckle up son, we're dumpster-diving into beautiful world of Android dev! Android so exciting because of all the different vendors and implementations you have to support. And they often disagree on very basic things, such as setting surface refresh rate. As you know, modern phones have screens going up to 120hz, and once you are used to it there's no coming back. So engineers (not to be confused with vibe sloppers) really want to make apps efficient enough to sustain 120fps load if they want them to feel good. Especially games! Historically, since about 2014, you would set preferredRefreshRate on WindowManager's LayoutParams, which you would get from a set of predefined supported numbers. This sets refresh rate of the entire display in somewhat authoritarian way. About a year later, they also added preferredDisplayModeId, which combines refresh reate and screen resolution, similarly to how display modes work on Wayland and X11. But recently (in 2020), a new set of APIs got introduced, that lets you set refresh rate not for entire screen, but per-surface of your app. This allows more granularity, integrates with a new fancy Android frame pacer, and is better for batter life. Even better - this family of APIs is exposed in NDK - so you can easily use it from C/Rust/Jai/Odin without having to go through Java (as you have to with preferredRefreshRate). And an official documentation _really_ recommends you to use new API, and even says that when you use it simultaneously with an old preferredRefreshRate rate, that old one is completely ignored! Direct quote from Google's official Android dev portal: "preferredRefreshRate is ignored for Surfaces that use setFrameRate(). In general use setFrameRate() if possible." Here's the issue though. The documentation for this new modern API says, I quote (with emphasis added): "On devices that are capable of running the display at different refresh rates, the system **MAY CHOOSE** a display refresh rate to better match this surface's frame rate." So it's really a vote kind of API. Technically, you kindly ask the device to give you the refresh rate, but it might say NO for no visible reason. And, in fact, many devices do. A lot of Chinese Android builds even go as far as to only allow changing refresh rate for some predefined white list of applications. Very elitistic! But much more of them still obey good old preferredRefreshRate/preferredDisplayModeId from 2014, even though they still might refuse for legitimate reasons (such as battery efficiency mode). So it remains to be the only reliable way to get the refresh rate you actually want, and this is why most programs (knowingly, or through some underlying framework they are written it) still use it. This is how all this technological research and advancements get completely crushed by lousy implementations, and all it does is just adding more pain for the developers.
    50572K
  7. Valentin Ignatev✓@valigo
    God, grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to not write yet another file picker for Linux
    1221533.3K
  8. Valentin Ignatev✓@valigo
    People who say that AI is so good they don't even read the code anymore should roll their own crypto
    1401792.9K
  9. Valentin Ignatev✓@valigo
    It's that day again!
    Download
    John Romero 🤘🏽 @romero
    Hi Sandy. Are you well? This is wrong. On January 1, 1993, we sent a press release saying that multiplayer would be in DOOM, a full 8 months before you joined the company. We knew deathmatch would be huge. In that press release, in January 1993, we said multiplayer would be "the number one cause of decreased productivity in businesses around the world." We were sure of it, and we needed no convincing. I understand you are proud of your work on DOOM, and you should be, but please also respect the accuracy of your statements, particularly around game history. My concern is that these false statements are designed to trigger replies (like this one), reposts, and outrage discussion, all with the view of increasing your followers and subscriptions, particularly since this false deathmatch story (among others) is so easily disproved. I’ve even welcomed you to reach out to me ahead of time. You seem to appreciate game history as much as I do. Could you not also make yours accurate?
    221162.6K49.5K
  10. John Romero 🤘🏽✓@romero
    Posts @SandyofCthulhu
    Hi Sandy. Are you well? This is wrong. On January 1, 1993, we sent a press release saying that multiplayer would be in DOOM, a full 8 months before you joined the company. We knew deathmatch would be huge. In that press release, in January 1993, we said multiplayer would be "the number one cause of decreased productivity in businesses around the world." We were sure of it, and we needed no convincing. I understand you are proud of your work on DOOM, and you should be, but please also respect the accuracy of your statements, particularly around game history. My concern is that these false statements are designed to trigger replies (like this one), reposts, and outrage discussion, all with the view of increasing your followers and subscriptions, particularly since this false deathmatch story (among others) is so easily disproved. I’ve even welcomed you to reach out to me ahead of time. You seem to appreciate game history as much as I do. Could you not also make yours accurate?
    2141.1K20.1K1.1M
  11. Valentin Ignatev✓@valigo
    Posts @valigo
    Also very cool to see this little meme picture I made being used by people I literally never seen
    20451.8K
  12. Valentin Ignatev✓@valigo
    This part of formal verification wasn't intuitive to me. Formal verification only proves what is asked to be proven. A prove that code does something does not automatically imply that this code doesn't do anything else (for example, doesn't have a RCE bug). Makes sense after Fil said it explicitly, but I never thought of it!
    Filip Jerzy Pizło @filpizlo
    @NinadSachania @valigo Formal verification doesn't establish bug freedom. It only proves a theorem. A large fraction of bugs - including security bugs - are because the programmer's intent was wrong. Formally verifying doesn't prevent bugs in those cases.
    101634.3K
  13. Filip Jerzy Pizło✓@filpizlo
    Posts @NinadSachania
    @NinadSachania @valigo Formal verification doesn't establish bug freedom. It only proves a theorem. A large fraction of bugs - including security bugs - are because the programmer's intent was wrong. Formally verifying doesn't prevent bugs in those cases.
    33404.7K
  14. Valentin Ignatev✓@valigo
    Can formal verification fully replace fuzzing? Genuine question.
    4009416.4K
  15. Valentin Ignatev✓@valigo
    All this time gdpr was just for crushing small business. Who would have thought
    International Cyber Digest @IntCyberDigest
    ‼️ EU governments approved a GDPR change to let companies train AI on Europeans' personal data without consent. It makes AI training a possible "legitimate interest", judged case by case. Parliament must still agree. Max Schrems calls it a "digital expropriation" of Europeans.
    12203206.4K
  16. International Cyber Digest✓@IntCyberDigest
    ‼️ EU governments approved a GDPR change to let companies train AI on Europeans' personal data without consent. It makes AI training a possible "legitimate interest", judged case by case. Parliament must still agree. Max Schrems calls it a "digital expropriation" of Europeans.
    Download
    2921.7K7K586K
  17. Valentin Ignatev✓@valigo
    Microsoft is offering buyouts to 60000 workers. It doesn't mean that they will lay off all 60k, but this number just doesn't sit in my head. This is 50 times (FIFTY TIMES) more than an entire town I was born and grew up in. I just can't even grasp the scale of what's happening.
    20631810.6K
  18. Valentin Ignatev✓@valigo
    This video about comparing binary sizes of C and Rust hello worlds just refuses to go. It has its 4th "to the moon" moment already. I guess it just gets reposted every few month when there's C vs Rust holy war. Sad that it's one of the lowest effort videos that I've done.
    Download
    60732.7K
  19. Valentin Ignatev✓@valigo
    Posts @valigo
    I've used "cache size" and "cache line size" somewhat lousy here. Every time I say "cache size" assume "cache LINE size" haha. Total size of L1 cache per core is 64KB, but it's irrelevant for the video, so hopefully not too much confusion!
    00131.7K
  20. Valentin Ignatev✓@valigo
    Can somebody explain me what are dots/grok bot kind of products about? Is it like a managed vm with a model and a web UI? Is it like Zapier? Usually if I don't understand a product then it's just not for me, but I see a lot of type about them on the timeline, so I'm interested
    2216110.3K
  21. Valentin Ignatev✓@valigo
    Recorded first video in 4 months. It's so hard to do man, no wonder I stopped!
    Download
    1031626.9K
  22. Valentin Ignatev✓@valigo
    Chiming in on AI disclosure on Steam. So, the purpose of the review system is not to know if game is good or not, even if it sounds counter-intuitive. Review system exists so that people can form an opinion about whether they want to buy the game or not, for WHATEVER REASON. For example, Ukrainians use Steam reviews to warn other Ukrainians in case a game is made by Russians, so they don't put money into Russian pockets. Does it have anything to do with a quality of a game? No. Does it suck to be on receiving end of such a review? Yes! Does it serve a purpose to inform an audience with specific requirement? YES, absolutely! Not removing such reviews is, objectively, a pro-consumer move by Valve, even if you see it as absolutely unfair as a neutral observer (or even not so neutral, I'm a Russian citizen after all, but I support Valve here). Other such examples would be different anti-woke curators. Exactly the same principle. AI disclosure is just this. There is a high demand from consumers to know whether a game has AI assets. So Valve lets consumers know. I guess that when consumer stop being interested in whether AI was used - Valve might remove the disclosure. So, TLDR is that AI disclosure, as of 2026, is a consistent pro-consumer move by Valve. If they didn't do it, there would just be many curators to indicate games with AI use.
    293155718.1K
  23. Valentin Ignatev✓@valigo
    "These pathetic slugs, these reckless, retarded, shit for brain morons have endangered the whole internet for nothing. Fuck them with a broom"
    Download
    Daniel Colascione @dcolascione
    These people should be shot into the sun. For trivial perf win, they turned off one of the few ways to mitigate bugs in unsafe code. These pathetic slugs, these reckless, retarded, shit for brain morons have endangered the whole internet for nothing. Fuck them with a broom.
    71434418.4K
  24. Daniel Colascione✓@dcolascione
    These people should be shot into the sun. For trivial perf win, they turned off one of the few ways to mitigate bugs in unsafe code. These pathetic slugs, these reckless, retarded, shit for brain morons have endangered the whole internet for nothing. Fuck them with a broom.
    132558343.3K
  25. Valentin Ignatev✓@valigo
    LLMs are great at finding bugs, but they aren't very good at fixing them, or writing good code in general. LLM will implement a "simple fix" without questioning the current architecture, they always have "will do my captain" attitude. I'm afraid that those who mindlessly use LLMs to fix current wave of security issues will just introduce new ones, more subtle but not less dangerous. Remember that coworker with an attitude of "this code is shit, we need to rewrite all of it" that everybody on your team hated? You must be this coworker for an LLM now if you use them heavily. Instead of relying on their "simple fixes", try to rearchitect your stuff in a way that makes entire family of bugs impossible.
    36153919.3K
  26. Valentin Ignatev✓@valigo
    Been using RAD debugger as my main on Linux for some time now, and it's absolutely amazing. It's in alpha, so there are some crashes and bugs, but it's already so good I can't see going back to VSCode or CLion for debugging.
    11112958.4K