Joseph Garvin Profile
Joseph Garvin

@joseph_h_garvin

698
Followers
2,200
Following
453
Media
9,989
Statuses

voicecoding latency and throughput hacker. How did I get here and what am I doing in this hand basket? @joseph_garvin @hachyderm .io @josephhgarvin .bsky.social

Joined July 2009
Don't wanna be here? Send us removal request.
@joseph_h_garvin
Joseph Garvin
11 months
@KentonVarda I'm skeptical the name change makes any difference legally.
4
1
404
@joseph_h_garvin
Joseph Garvin
10 months
@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
6
6
156
@joseph_h_garvin
Joseph Garvin
4 months
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!
@Nekrolm
Dmitry /Undefined Behavior/ Sviridkin
4 months
@seanbax I especially like this example of implicit null deref via memcpy
Tweet media one
3
3
46
8
11
154
@joseph_h_garvin
Joseph Garvin
2 years
@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
152
@joseph_h_garvin
Joseph Garvin
7 months
@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
108
@joseph_h_garvin
Joseph Garvin
4 months
@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
110
@joseph_h_garvin
Joseph Garvin
8 months
@the_aiju Tell them you'd be happy for your compensation to be 9/10ths of their current AWS bill
0
0
109
@joseph_h_garvin
Joseph Garvin
2 years
@Carnage4Life Is this inflation adjusted? 🤔
6
0
107
@joseph_h_garvin
Joseph Garvin
2 years
@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
95
@joseph_h_garvin
Joseph Garvin
2 years
@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
92
@joseph_h_garvin
Joseph Garvin
6 months
My TL is filled with people debating whether these 500 if/case statements in a row is bad code or good code and advocating different alternatives. Not enough people are reflecting on the trade offs. I'll give them then discuss an example from trading systems.🧵
Tweet media one
5
2
84
@joseph_h_garvin
Joseph Garvin
7 months
People have been speculating the Google 2x productivity stat for Rust vs C++ is due to it being greenfield projects. But in the video he brings says they are comparing with service rewrites... which I think is worse. It's not new code, it's porting! The old app is a great spec!
5
3
81
@joseph_h_garvin
Joseph Garvin
2 years
@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
74
@joseph_h_garvin
Joseph Garvin
6 months
@fasterthanlime Pretty sure you want to know about memory overflows in *checks screenshot* OpenSSL
0
1
76
@joseph_h_garvin
Joseph Garvin
4 months
@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
79
@joseph_h_garvin
Joseph Garvin
2 years
@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
73
@joseph_h_garvin
Joseph Garvin
1 year
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.
@Wassimulator
Wassim Alhajomar
1 year
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.
11
5
80
6
11
74
@joseph_h_garvin
Joseph Garvin
5 months
Most critiques of STL miss the main issue, that it solves a problem most programmers don't have: easy swapping of different container implementations. Which is a rare need easily addressed in other simpler ways, and the biggest gains come from catering them to each other!🧵
4
9
73
@joseph_h_garvin
Joseph Garvin
6 months
@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
71
@joseph_h_garvin
Joseph Garvin
4 months
@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
65
@joseph_h_garvin
Joseph Garvin
9 months
@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
67
@joseph_h_garvin
Joseph Garvin
2 years
@pcwalton Technically it existed earlier as a different op. I emailed rust-dev @mozilla .org in 2011 where I give feedback that rust shouldn't have both C ternary ? operator and have if as an expression because it uses up a useful character that could be used in the future 😁
1
5
64
@joseph_h_garvin
Joseph Garvin
2 years
@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.
7
0
59
@joseph_h_garvin
Joseph Garvin
1 year
@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
@joseph_h_garvin
Joseph Garvin
6 months
@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
56
@joseph_h_garvin
Joseph Garvin
2 years
@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.
4
1
56
@joseph_h_garvin
Joseph Garvin
1 year
Today in syntax horrors, this is valid C
Tweet media one
10
3
51
@joseph_h_garvin
Joseph Garvin
2 years
@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
48
@joseph_h_garvin
Joseph Garvin
1 year
@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
47
@joseph_h_garvin
Joseph Garvin
5 months
Wrote this code 9 months ago, took until now to bootstrap, can't remember how it works🤔
Tweet media one
@joseph_h_garvin
Joseph Garvin
5 months
In case it does affect the universe now is the right time for you all to send me your good vibes
0
0
3
11
0
47
@joseph_h_garvin
Joseph Garvin
9 months
@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
43
@joseph_h_garvin
Joseph Garvin
11 months
@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
42
@joseph_h_garvin
Joseph Garvin
4 months
@tsoding The impact of denial of service is usually much less severe than giving the attacker root so yes unironically
1
0
41
@joseph_h_garvin
Joseph Garvin
9 months
@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
41
@joseph_h_garvin
Joseph Garvin
6 months
@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.
4
0
38
@joseph_h_garvin
Joseph Garvin
9 months
@lauriewired All I want is an ARM laptop with an e-ink display running Linux + Emacs. Infinite battery life.
2
2
37
@joseph_h_garvin
Joseph Garvin
2 years
@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
@joseph_h_garvin
Joseph Garvin
3 months
@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
37
@joseph_h_garvin
Joseph Garvin
2 years
@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
35
@joseph_h_garvin
Joseph Garvin
4 months
@the_aiju You're right, GPT4o's answer is hysterically bad
Tweet media one
0
0
35
@joseph_h_garvin
Joseph Garvin
3 months
@Lucretiel Separate from VCs, going public also often changes the character of companies, but I imagine the reasons are similar.
0
0
33
@joseph_h_garvin
Joseph Garvin
10 months
@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
33
@joseph_h_garvin
Joseph Garvin
2 years
@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
33
@joseph_h_garvin
Joseph Garvin
4 months
@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
@joseph_h_garvin
Joseph Garvin
5 months
@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
34
@joseph_h_garvin
Joseph Garvin
2 years
@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
33
@joseph_h_garvin
Joseph Garvin
3 years
@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.
1
0
32
@joseph_h_garvin
Joseph Garvin
11 months
@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
31
@joseph_h_garvin
Joseph Garvin
1 year
QT so I can write a thread. We had a TEST env var that was supposed to make everything test environment. Loaded up a GUI to tweak symbol multiplier and to my surprise it changed all prod servers. The GUI was the only Java app, written by an ex-employee. What was it doing? 🧵
3
0
30
@joseph_h_garvin
Joseph Garvin
7 months
@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
@joseph_h_garvin
Joseph Garvin
4 months
@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
28
@joseph_h_garvin
Joseph Garvin
7 months
@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
@joseph_h_garvin
Joseph Garvin
2 years
@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
@joseph_h_garvin
Joseph Garvin
6 months
@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
@joseph_h_garvin
Joseph Garvin
10 months
@paul_snively What's funny is protobuf is still extremely slow, people just cargo cult it because of Google
6
2
29
@joseph_h_garvin
Joseph Garvin
2 years
@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
29
@joseph_h_garvin
Joseph Garvin
7 months
Fun fact: writes to pipes of size less than PIPE_BUF are atomic. So you can have multiple threads/processes write to the same pipe w/o random interleaving if you can keep them small, without needing a mutex. Sockets have no such guarantee. I use this to...
2
0
28
@joseph_h_garvin
Joseph Garvin
2 years
Every time I use std::lower_bound and std::upper_bound I reread the docs and still use them wrong the first several times.
5
0
28
@joseph_h_garvin
Joseph Garvin
5 months
@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
28
@joseph_h_garvin
Joseph Garvin
2 years
@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
26
@joseph_h_garvin
Joseph Garvin
2 years
@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
27
@joseph_h_garvin
Joseph Garvin
4 months
This is stupid, I can still see who liked my posts in my notifications but I can no longer see by clicking on the like number in the post
6
0
26
@joseph_h_garvin
Joseph Garvin
1 year
@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
@joseph_h_garvin
Joseph Garvin
2 years
@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
27
@joseph_h_garvin
Joseph Garvin
3 years
@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?
6
0
26
@joseph_h_garvin
Joseph Garvin
4 months
@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
27
@joseph_h_garvin
Joseph Garvin
4 months
C Twitter: perf is paramount! Shave every ms away! Also C Twitter: you don't need incremental builds! have the compiler redo all the work from scratch every time! As a perf oriented person I like... *checks notes* caching.
6
1
26
@joseph_h_garvin
Joseph Garvin
10 months
@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
25
@joseph_h_garvin
Joseph Garvin
1 year
@hikari_no_yume Now you just need your app to query the comment lines and interpret them as app specific commands
4
0
25
@joseph_h_garvin
Joseph Garvin
1 year
@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
25
@joseph_h_garvin
Joseph Garvin
5 months
Tweet media one
1
0
23
@joseph_h_garvin
Joseph Garvin
4 months
@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
@joseph_h_garvin
Joseph Garvin
4 months
Sure, the borrow checker can protect me from manual memory management mistakes but what can it do about logic errors induced by sleep deprivation from crying babies? I need the compiler technology.
4
2
23
@joseph_h_garvin
Joseph Garvin
3 months
@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.
5
0
24
@joseph_h_garvin
Joseph Garvin
7 months
@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
22
@joseph_h_garvin
Joseph Garvin
1 year
@zdimension_ On the one hand, I love this feature. On the other hand, I hate that the language is leading anybody other than compiler QA wonks to write types this tortuous.
0
0
23
@joseph_h_garvin
Joseph Garvin
2 years
@JustinHasAnIdea @AdamRackis Entertainment isn't negative value. Even the most cold blooded economist will say you need things for people to enjoy to incentivize them earning the money to pay for them. Also resting and relaxation are essential for people to be able to maintain productivity/sanity.
0
0
22
@joseph_h_garvin
Joseph Garvin
7 months
@alpha_convert Parameter when it's in the signature, argument when it's in the call site
0
0
21
@joseph_h_garvin
Joseph Garvin
7 months
@DrawsMiguel It's the syntax. "What if the pseudocode in the book was just the actual code?" Sig whitespace, builtin syntax for dict/list/set, no type annotations, to a new person it just looks radically simpler. I remember TAing and how many people were enraged by forgetting semicolons...
3
0
20
@joseph_h_garvin
Joseph Garvin
4 months
wat
Tweet media one
4
1
20
@joseph_h_garvin
Joseph Garvin
5 months
What's the youngest you can teach someone to code? Is 48 hours too soon? He's home now and there are computers here so we have all the ingredients.
Tweet media one
6
0
20
@joseph_h_garvin
Joseph Garvin
2 years
@mitsuhiko Bazel Ad Campaigns Bazel: for when a working Ctrl+C is too much to ask Bazel: for when you never want to build in two sandboxes at once Bazel: for when you want the puzzle of figuring out what flags to give your build system to get it to give the flags you want to the compiler
2
2
19
@joseph_h_garvin
Joseph Garvin
7 months
@the_aiju Drives me nuts too. Fp is deterministic and every op is off at most 1ULP. But you have to understand how you can magnify error, and early x86-32 confused ppl because accuracy changed across compiles b/c reg width and mem width didn't match, so reg spilling changed results.
0
0
20
@joseph_h_garvin
Joseph Garvin
2 years
@DrawsMiguel Programmers: int foo[x] // 1-d array int foo[x][y] // 2-d array int foo[x][y][z] // 3-d array int foo[x][y][z][w] // 4-d array ... Mathematicians: Point Circle Sphere Hypersphere Uh... Shit, Hypersphere
0
1
19
@joseph_h_garvin
Joseph Garvin
4 months
I finally thought of a language syntax that will make everyone happy: s-expressions with significant whitespace and trailing semicolons.
4
2
19
@joseph_h_garvin
Joseph Garvin
6 months
@dustriorg Not all heroes wear capes
Tweet media one
0
0
18
@joseph_h_garvin
Joseph Garvin
10 months
@welltypedwitch C++ is pretty good about standardizing time/space complexity
1
0
20
@joseph_h_garvin
Joseph Garvin
6 months
@mycoliza Isn't it going to be in some Russian nesting doll of docker/VM anyway?
0
0
20
@joseph_h_garvin
Joseph Garvin
2 years
@workingjubilee As a C++ dev picking up Rust the only pure syntax confusions I ran into were: * Turbofish * if/while let having LHS and RHS swapped compared to my intuition * Significance of last semicolon * Kwargs only for comptime args * Trait + 'lifetime
4
0
20
@joseph_h_garvin
Joseph Garvin
2 years
@ShriramKMurthi REPL is huge for learning. You can easily "just try things" without the ceremony of setting up a new project in an IDE.
3
0
20
@joseph_h_garvin
Joseph Garvin
10 months
@lauriewired I mean, Scylla is specifically designed to be a more performant drop in Cassandra replacement so that seems like a logical transition.
0
0
19
@joseph_h_garvin
Joseph Garvin
2 years
@copyconstruct "It's a bad argument for an engineer to point out taking on a billion dollars a year in interest payments will bankrupt the company, because the engineer has been taking a salary." This is how you sound.
0
0
18
@joseph_h_garvin
Joseph Garvin
2 years
@BillB It's interesting because the difficulty in answering only comes about because of OOP training people to think in terms of objects being the ones "performing" actions. The equivalent free function taking an explicit struct pointer named "this" wouldn't phase people at all.
0
0
19
@joseph_h_garvin
Joseph Garvin
6 months
@DanielcHooper These are not universally good, e.g. virtual memory lowers battery life and makes performance worse for everybody mostly due to backwards compatibility concerns rooted in the 80s. There are some neat perf tricks you can do with it but I'm pretty sure it's a net loss.
1
2
18
@joseph_h_garvin
Joseph Garvin
8 months
@mycoliza Common for games to want to disable the screensaver, maybe for that?
1
0
18
@joseph_h_garvin
Joseph Garvin
2 years
@ZachWeiner Calculus is key in lots of engineering, and derivatives are defined as limits, which say what happens when you keep growing a number "to infinity." This lets you simplify, you say this complex thing "converges" to this simple thing. You likely can't derive key formulas anymore.
2
0
19
@joseph_h_garvin
Joseph Garvin
2 years
@__phantomderp This is my #1 Rust beef: metaprogramming. Macros can't see through type aliases, and they can't force expansion of macro invocations passed into them, so they don't compose, and to top it all off the generics are very weak compared to C++11.
4
1
19