Joseph Garvin
@joseph_h_garvin
Followers
945
Following
23K
Media
615
Statuses
12K
voicecoding latency and throughput hacker. How did I get here and what am I doing in this hand basket? @[email protected] @josephhgarvin.bsky.social
Joined July 2009
@effectfully Not GCC's fault, it's accurately implementing the standard, blame the standard.
1
1
217
@TravisMWhitaker @sidkshatriya I can't think of a common definition of platform where you're correct. CPU archs -- Linux by a mile .OSes -- no b/c that's what we're comparing.Number of devices -- Linux by a mile.
1
0
183
Reminder: C/C++ out of bounds accesses do not reliably crash. Use after free does not reliably crash. Even NULL dereferences do not reliably crash!.
8
11
150
@fchollet It's been awhile since I tried but an easier way was to make an illegal en passant. Sometimes it won't catch it, but if it does you say it's allowed because of en passant it agrees, then b/c you're now outside the training data it will corrupt the state of the board across moves.
5
5
156
@transitracer Yup, likewise sending work to another thread is often more expensive than doing it in the current thread, so maximizing parallelism is often worse too.
4
4
144
@TravisMWhitaker @sidkshatriya Objectively Linux runs on more platforms that macOS. Even before trying to count you can know this is trivially true due to kernel nerds porting it to every macOS device. Old iPhones that don't have the locked bootloader can even run Android.
1
0
138
@colin_fraser When I click the link from inside the Android app it doesn't even open, pops up a message saying my search had no results lol.
1
0
105
@the_aiju Tell them you'd be happy for your compensation to be 9/10ths of their current AWS bill.
0
0
105
@whitequark While there's definitely "don't let them see outside the commune" motivations for parental controls I think there's a moderate case where 5 year olds don't really mean to click on beheading videos.
2
0
107
@IGrabill @GergelyOrosz The top LOC ranks are going to be dominated by engineers that ran refactoring scripts (in other words the engineers that did massive find->replace) or ran tools that generated huge amounts of boilerplate code and got checked in.
1
0
86
*If* Stroustrup said this he's wrong. Nearly everybody benchmarks the cost of virtual functions incorrectly. Not inlining can prevent almost any other optimization, including realizing that operations cancel and no call is necessary at all. 1/4.
@sasuke___420 @elricmann Virtual dispatch? Stroustrup driils home in his books that βvirtual method calls only have a 25% overhead over normal function callsβ.
5
3
97
@Rahll @GaryMarcus There was that recent court case that was lost because they could only show examples that infringed by being "very specific", they said it infringed if you asked it to infringe basically. I wonder if asking for specific movies and actors like this counts in the judge's view.
2
0
94
@Catfish_Man This guy insanely improved Mario 64 performance and half the optimizations are undoing loop unrolling because RAM was really slow and contented so it was extra important to stay in icache:
1
5
87
@m_ou_se The grammar rule that unknown actors are always "he" is arbitrary at best, stupid at worst. I've been using "they" for years before pronouns ever became politicized because it's just more accurate π€·ββοΈ.
5
0
72
@ParrotRobot I don't trust the manager to have correctly assessed the scripts and queries are perfect. GPT4 makes frequent mistakes. Especially when they dismiss their subordinates as "tech focused" which implies they are not.
2
0
71
@bkpark @czescjacek @JadeMasterMath It's not, see the badcode subreddit where variations show up constantly. People that do this assume a maximum number of iterations, say 100, and copy and paste 100 times:. if(i) . --i;.if(i) . --i;.
0
0
68
@fasterthanlime Pretty sure you want to know about memory overflows in *checks screenshot* OpenSSL.
0
1
73
Everybody loves to dunk on C++ std because they wrote a faster hash table once and decided they're a savant but the truth is you can always get better performance than any lang's std by writing something catered to your data and requirements.
Please, if anyone is getting into C++ just now, stay the hell away from the standard library. Avoid std:: like you would avoid an actual std.
6
11
66
@Love2Code All the complexity here is real though, and isn't Rust specific. &str - memory w/ valid Unicode.String - heap alloc'd str.&[u8] - ptr to runtime varying # of bytes.&[u8; N] - ptr to N bytes.Vec<u8> - heap alloc [u8].Os* - valid OS str.Path* - valid fs path .C* - null term string.
4
0
71
@the_aiju It's funny this even works retroactively, pseudocode from papers before Python was ever released often still looks really close to Python. It's like Guido thought, "why don't we just write that?".
1
0
69
@fasterthanlime both takes are off, SW does more now, and even with every specter/meltdown/etc mitigation enabled hardware today is still orders of magnitude faster than 30 years ago, and the UI latency is measurably worse often for software reasons. HW isn't to blame for electron.
2
0
60
@mycoliza I hear this a lot but is it really true? Apple using their own chips is pretty new and people liked MacBooks even when they had IBM PowerPC CPUs and Nvidia GeForce GPUs in them. Maybe making good software is just a lot easier when you have a small number of SKUs.
7
0
64
@the_aiju So far I think GPT4 is only replacing coding at the level of, "just some friggin' way make the machine do it please" where some percent of the time it gives you short working Python scripts. Still doesn't really understand race conditions, iterator invalidation, etc.
6
0
57
@medawsonjr Holy moly is right:.- **Doubling the number of registers**, but ABI backwards compatible.- Expanded conditional instruction set (e.g. cmov, but for load/store/compare).- Disabling instructions from setting status flags.
2
2
61
@SebAaltonen @KazeEmanuar had a video series on this but the answer is probably different for modern hardware versus N64 π.
1
0
54
@sebjenseb A ton of these look like proxies for health problems. Face paralysis, difficulty keeping balance, dizzy spells, constipation, pain tolerance, etc. And especially "Someone has been trying to poison me." Maybe they're right.
1
0
54
@pcwalton It can be valid for realtime systems. GC can be a large % delta if your perf budget to start with is small. A 120hz VR game has to output a frame every 8.3ms to prevent motion sickness. A 1ms GC pause is ~12% your entire budget, and you have to budget based on worst case time.
3
1
56
@JonTeets005 @macrocephalopod You wouldn't need to install or maintain Python they could just bundle it in the Excel install completely transparently to you.
3
0
46
@ChShersh People wildly underestimate how many errors are type errors, and when their programs are small this doesn't hurt them so much, then inevitably some corp makes something huge and realizes it's costing them tons of money and they start bolting on static typing.
3
0
47
@Rahll @GaryMarcus I had to look it up again, I forgot it's for code not art. The study they tried to persuade the judge with showed it reproduced exactly memorized snippets when you lead it on but "rarely in benign situations".
1
1
46
@Twasnow @rubyslippahs @MeghanEMurphy She said she'd never met one, but the graph says more than 1 out of 10 people diagnosed are men. Still indicates she hasn't really tried to talk to a representative group of patients if she's never met one. 1 in 10 isn't rare. Almost like "I've never met" is a terrible standard.
15
0
40
@krismicinski If you just turn around and use the FPGA elements to big a dense set of floating point multipliers, all you've done is introduced inefficiency compared to a GPU due to the FPGA's reconfigurability. To beat GPUs you have to run something not catered to GPUs.
2
1
41
@twinkdefcon I'm a little distrustful of the statistic because the reason many people get tested for ADHD is poor academic performance which is a better predictor of not getting a degree. ADHD people that do okay in school are less likely to be diagnosed, making the stat bleaker than reality.
5
0
37
@tsoding The impact of denial of service is usually much less severe than giving the attacker root so yes unironically.
1
0
40
@lauriewired All I want is an ARM laptop with an e-ink display running Linux + Emacs. Infinite battery life.
1
2
37
@DanielcHooper I've written code using huge pages, mirror mapping, numa control, sigsegv handling for user space page fault handling, and more. I promise you I know what virtual memory is.
3
0
36
@TaliaRinger To the extent that language needs to build in some redundancy to mitigate transmission error, any property that is split ~50/50 amongst people has high disambiguation value. In many contexts as soon as you say a pronoun half the people you could be talking about are excluded.
2
1
37
@LewisCTech @_Felipe It can still be extremely material -- people want the compressor to be magical, but in practice they often have a finite sliding window for how far back they will look for patterns, so more of the window is spent on labels than your data, so it finds fewer patterns in the data.
2
0
36
@pcwalton Another problem with GC performance is when it crawls the heap it also trashes your cache, so performance is worse for awhile even after the GC ends. This gets missed when people just compare pause times.
2
1
33
@Lucretiel Separate from VCs, going public also often changes the character of companies, but I imagine the reasons are similar.
0
0
30
@DrawsMiguel Doesn't seem obtuse to me even though it wasn't my intuition, I see how he got there seeing as `auto p = &i;` already works.
4
0
31
@javier_guerra_g @steveklabnik Rust has an *objective* technical advantage over C/C++ in memory and data race safety. It's not the only measure of a language, but it's an important one. Saying that truth doesn't assert anyone being better than anyone though, it's a statement about two technologies, not people.
2
1
32
@whitequark I haven't used any parental controls apps yet are they hyperpanopticons? I thought they were boring blacklist/whitelist filters, basically adblock with a different set of lists downloaded.
1
0
33
@colin_fraser The real power of them though is when they can be evaluated symbolically (so it's as if your loop actually could run forever and you got the final ultra precise answer). Another way to look at them is that they are functions that take in a function and return a new function.
1
0
33
@indygreg @pcwalton The only reason I'm hesitant to agree is that browsers are probably bigger and more complex than most applications. They're an OS at this point. How many apps have N image renderers, M video codecs, a JIT, a layout engine, hacks for compat with IE4 and geocities pages, etc.
3
0
32
@joejanizek It's funny you mention stents because the same medical industry as recently as 2017 was putting them into people without heart attacks preventatively, despite studies showing it was harmful. I think people's skepticism is easy to understand in this light.
2
0
32
@Gankra_ Assembly also hides how expensive the encoding is. In x86-64 where tons of variable length shenanigans are happening it can be surprising how much I$ you burn on big constants, upper regs, atomics, etc. CE has a nice pane showing bytes <-> instructions relationship.
0
0
30
@LParreaux I had a very similar thought working on a game in Rust, where to avoid issues with needing two `&mut World` I made a subsystem push_back `Action`s into a buffer, so that after the subsystem returned the main loop could then run them. "Wait a second. this is an interpreter.".
4
1
29
@Ramirezplayer @enjoyingthewind @SaintAlexei @AlexKontorovich @wtgowers It's a way to tell your proof to the computer so that it can check you didn't make any mistakes at every step. So you can be super duper sure you really proved it.
2
0
30
@bl4sty Cool trick. Any idea why they chose pselect specifically? Lots of syscalls can EFAULT. Maybe they figure anyone doing an strace is going to filter out select/poll etc as spam? Is pselect the least suspicious call to call extra times?.
1
0
31
@welltypedwitch Corollary: your metaprogramming system must be Turing complete and be able to access the network and disk.
3
1
31
@Austen His baseline is just off, 10 hours trying to figure out how to set up something simple in AWS is normal because their UI and docs are hot garbage.
2
0
29
@mycoliza Definitely the right vibes, like a takeout container you run through the dishwasher over and over again because you're too lazy to buy real tupperware and every time you microwave it your blood stream gets just a few more microplastics.
0
1
27
@yiningkarlli Start with a TCP stream of structs that contain a header with a 1-byte type field and 4-byte size field. When connection is established, first thing you send is a VersionNumber message. Don't go more complex until you know what you're getting out of it.
2
0
30
Most people are missing why this API looks the way it does: the builder pattern is a workaround for Rust not having keyword and optional arguments, because there's a lot of extra minutia you can optionally specify when spawning a process.
We did a stream talking about macros, and I was looking at what people do with macros in other languages that is cool/good. Someone sent me a Rust "proc macro workshop" link and here is the first example. And I am like . a.sdfjjkl;asfgh
4
1
29
@the_aiju Might be an instance of it being right because it's wrong, like it doesn't know the plan 9 rule but it doesn't know the ISO rule reliably either and is guessing signedness matches uchar. This morning I discovered GPT can't reliably count letters, doubt it can do real bit math π€·ββοΈ.
2
2
29
@paul_snively What's funny is protobuf is still extremely slow, people just cargo cult it because of Google.
6
2
29
@christopherdone Throwing Rust in this list is bizarre. Rust has bent over backwards to be a good fit for low level systems programming and has pushed out the Pareto frontier for performance vs safety.
0
0
26
@thingskatedid I don't think the controller is going to make a huge difference, you just play a lot and you'll get better.
1
0
26
@TimSweeneyEpic @JerpaDerpa @Esqueer_ But they could mistakenly think it's an edgy burger king advertisement and there are definitely parents who don't know it's out of place for a Pokemon to have a gun. Not convinced it's regulatable but no question the courts will be making interesting decisions.
13
2
26
@dailydirtnap Did you think every time you hit refresh a Twitter employee ran in a hamster wheel? The relationship between headcount and the site staying up is a bit less direct.
2
0
24
@Lucretiel Do you mostly look at C code for math and physics libraries? I tend to see this from people with math and physics backgrounds because it's what they're use to from formulas in their fields, which are optimized for chalkboards.
0
0
25
@DrawsMiguel You just sent me down the rabbit hole of learning that putting signaling NaN in a float register at all traps. I assumed it was when you tried to do arithmetic on it. Cursed.
2
0
25
@CorgiHell I think artists should be compensated for their work, but how different is this from a human being looking at lots of artwork over their life and being inspired by it and learning to imitate/remix it?.
4
0
23
@DrawsMiguel What I tell my fam: Computers only understand 1s and 0s, which is hard for humans, so we meet the computer halfway and write in this weird gobblygook that is easier for us and then have a Google translate like program that takes the gobblygook and turns it into the 1s and 0s.
0
0
27
@colin_fraser Looks pretty emotional to me. If you've never experienced it you can only imagine the pain of wanting to but not being able to sneeze.
1
0
24
@joomy There is a newer better approach. from __future__ import annotations. Completely eliminates needing forward references for things that you define further down in the same file.
1
0
23
@hikari_no_yume Now you just need your app to query the comment lines and interpret them as app specific commands
4
0
25
@ArvidGerstmann It's suspicious that you need Arc<Mutex<. >> twice. I'd only expect you to need it on the outside. Also if it's global I'd expect just Mutex<LinearHeapPool<Vec<u8>>>.
1
1
22
@Hasen_Judi @Love2Code C has null term strings and fixed size arrays and it's widely regarded as a flaw that C has no span type, and every C project has their own dynamic array struct Vec equivalent so there's half already. .
0
0
24
@davidad Probably not a lot of BIP39 passphrases in their test or training sets. Also, the compression is lossy and the model is huge anyway so it's only "magic" in the "that's cool" sense not the "fundamental limits are being violated" sense.
2
0
24
@getnormality Why the hell not: because all the tests have bad false positives and negatives and all the treatments have side effects and the tests were only ever approved as helping you on average *conditional* on you having symptoms to motivate the test.
4
0
23
@eatonphil This paper is trotted out a lot to try to argue GC langs have no perf disadvantage but they ignore that langs with stack vars don't have as much garbage, their cost model doesn't include CPU cache, and they didn't do any measurement to validate their model (cache would kill it).
3
0
23