0:05After much consideration and conversation with my family, I've decided to say something nice about Open AI. Please respect my privacy at this time.
0:19Yes, I am going to be saying something quite nice about OpenAI because I just got done reading about their SlopGit implementation. Now, if you're unfamiliar, there's this new thing that's been happening, which is that GitHub is super unreliable. Also, it's pretty slow if you have like 10,000 things trying to push to it per hour.
0:36And so, therefore, a new solution is needed, but everybody uses Git, so everybody's going to continue to use Git. That means Cursor had their own version of which we went over like a month ago. And now, OpenAI has their new version. And honestly, some of the ideas kind of blew my mind. It was It's just really clever. So, that means I'm going to have to say something nice about Open AI. Also, I intentionally didn't wear any headphones because I'm going to get a haircut later today and this these little sweet goldilocks going on here, they're going to be leaving me,
1:05okay? They're not going to be nearly as long and or potentially gone completely. Guy, I'm I'm 40 years old and I'm losing the battle, okay? Like, there just comes a point in every man's life that he has to stop trying to hold on to his moldy youth, okay? I I can't have a scullet.
1:22Okay. All right. So before we talk about the open AI, I first have to say thank you to the sponsors. Look at all these engineers sitting at their neat little desks. It takes dirty work to keep a code base clean. Every day sickos are out there committing unreed code. And when that happens, llinters won't save you. You need someone like me.
1:47Feature free scrumbag. Who you calling scrumbag? What's this slop you're trying to push? Unnecessary comments, global state, nested turnaries. H my bad. I didn't even read the code yet.
1:59You disgust me. Step away from the keyboard.
2:02Is that a mouse? HE'S MERGING A PROD. YOU HAVE THE RIGHT TO REMAIN SILENT. Anything you post to GitHub, Channon will be used against you. You have the right to a debugger. But if you cannot afford one, a public stack trace will be made available to you.
2:16And one more code criminal off the streets where they belong. HR.
2:23Look, I didn't even I know I didn't review any of the code, but I was going to have Code Rabbit review it from the start with oneclick fixes and stall enforcement. I don't need Merge Cop. I would never merge unreviewed code, but a first pass with Code Rabbit always makes things go faster. Actually, you can try it too at code rabbit.ai AI to understand how open AAI did their slopkit which by the way I will say again what you're about to see is quite impressive but to understand how it works you need to understand a basic
2:52little bit about how say GitHub or other git servers work. So in gitland two gits communicate via pack files. There is the client in which sends up a pack file to the server. Now the server then takes this pack file, stores it in whatever representation, say a local version running of get and there we go. And so when I ask for data back as the client, the client sends down pack files. Now pack files, they pretty much just contain what commits have, okay? It has
3:20blobs, it has trees, it has refs, it has objects. These are all git isisms.
3:26They're git internals for how all this crap is stored on your system. If you want, go look in the.git folder. you will see a bunch of things that kind of look like shaws kind of sprinkled out throughout there. Now, an interesting facet about git is that say I have a branch called foo and I have three commits onto it a c and f. If I want to push up to a server, what actually happens is I go like this. I go to the server first and I say, "Hey yo bro, I want to push up foo. What do you have for foo?" And then it's going to respond back with something like, "Hey, I
3:55actually have foo a so why don't you send me the rest?" And so that means the client's going to crunch and it's going to create this kind of optimally stored file again the pack file containing C and F for foo and then send that specific file to the server. The server will then integrate this perfectly well formatted C and F commits into whatever system and however it chooses to store stuff. And when you do a push, say to GitHub, you use something called a threephase commit. A three-phase commit
4:25is pretty simple because git is spread out a lot among many machines on GitHub.
4:28So if you are going to do this, you first send up your pack file, the thing you want to change to all of the machines. If they all say, "Hey, yeah, this actually is a good image of the universe. We can merge this in." You get kind of the check mark. So then you attempt to lock each one of these machines. And if the majority of the machines come back saying, "Hey, I'm locked again. You're good to go." Then finally, you send up the commit and it does all the merging and all the fantastic stuff. And bada bing bada boom, your commits now up on the servers. This is called a three-phase commit. Now, there's several reasons why
4:58this is slow, but one of the obvious ones is this right here, the locking phase. When you have to lock all the servers, no other push can happen. But that's kind of silly, right? Because if I'm pushing to foo and somebody's pushing to bar, why can't they happen at the same time? That plus some other interesting optimizations lead to this type of performance. If you see right here, there is 10,000 pushes acknowledged, 10,000 fetches against each one of these different style three-phase commit kind of like your GitHub approach. This object wall store,
5:26which I think is some sort of like jab at cursor maybe, I'm not really sure.
5:30And then Po, the new slopkit of Open AI, but when you see it play, you can see right here, Po finishes in like almost no time comparatively to everything else takes way, way longer. So obviously these optimizations, they have to be pretty fantastic. So, OpenAI takes a different approach and it actually relaxes two constraints. By relaxing two constraints, you can actually speed up Git a whole bunch. Now, the two constraints are repositorywide consistency. Now, that may sound like a scary word, like why would you want that? But I want you just to put on your
6:00practical thinking hats for a second. If you were to go and say start on a new repository, and you said, "Hey, get fetch." And you get the latest master plus a bunch of other branches. And if your friend also did the exact same time, both got the latest master, but maybe some of the branches were at different versions. Maybe one was a little bit further in time than the other just because while both of you were uh fetching, one of you got it before a change came in, one of you got it after a change came in. It didn't really matter. You both just kind of got
6:29what you got in the order. It wouldn't actually practically make a difference, would it? Generally speaking, at least when I was at the the old Netflix, you know, I worked there that like there's thousands of branches. It did not really matter the state of any of those thousand of branches whether I was perfectly on time I was in sync with that exact push or if it would have happened 1 second later I would have got a new version. It just it just is practically don't care. And the second big constraint is unique pack files for every client. Now remember when I was describing the fact that when you push
6:58as a client you have to kind of say like hey I what do you have server and server's like I have fu a so then you send up foo cf. It turns out the inverse is also true. When a client goes, "Hey server, I need foo." The server is going to be like, "Yo, what do you have?" And then you say, "Here, here's what I have." And it's going to go, "Okay, I got you. Here is the exact set of pack file that will represent the smallest change for you to have up-to-date information, absolutely no redundancy, and that turns out to be kind of a CPU
7:31So, what if you just didn't do that?"
7:33So, here's the first idea of the new git store. Let's just say you are working on branch fu and you commit with a and then you want to push it up to the server.
7:41You're going to send up a pat file that contains a. And the reason being is the server will respond for any branch that's not the main branch, the master branch. It will respond with I don't have any thing. I I I have nothing. It doesn't matter. Send me everything. And so that means when you commit B and then you push up AB, you will actually send up A. Now you're thinking, couldn't this be a problem? What about duplicate information? And it turns out it's just not a problem. You can have pack files that have duplicate information. It actually doesn't matter. And that also
8:10means the inverse is true. If you had foo A and you went to the server and said, "Hey, I need to update FU A," it would actually send back to you a pack file that contains A and B because that was the latest pack file stored. It just reuses the pack files that were stored.
8:27So, it turns out by being a little bit less efficient, you don't have to do all of that nonsense. you can just simply say, "Hey, just send me what you got.
8:36I'm going to figure it out." Because it turns out that CPU and disk time when it really puts together for uh computing really complicated pack files actually makes a difference versus just yeah, send the whole thing. It's kind of wild to think we're in a day and age where we are now better to just send the whole damn thing across the network than to do some sort of really smart compute task because it turns out doing a really smart compute task tens of thousands of times actually takes a huge portion of the CPU and can actually slow down
9:05everybody else. But what makes this so clever is how the metadata store actually works. See the meta data store is where all the pack files go in. What traditionally happens on a three-phase commit is that your pack file is unpacked into a local repository, making sure it actually all works and there's no issues. Instead, Pando as the thing comes in just decodes it as it comes in, says yes, this could be stored in a local repository and then just wholesale shoves that into a metadata store which
9:33could be say sharted on a per branch or a group of branches. So, it's even shardable and everything. It's just a blob store. Now, here's the crazier part. It stores the packet URI so that you can get this exact packet out. That means when I do a get fetch and I get out say this particular branch, it sends me back down a pack file URI which is the URL to this exact pack file that was sent up by the client. It just stores it and then hands it back out. Sure, it's inefficient. Sure, it contains more
10:03objects and, you know, blobs and trees than you actually need to have. But at the same time it contains everything you need. So it's really really smart because the metadata store is very easily paralyzable and shardable and the fetching of pack files becomes really really efficient.
10:22It's just like a a mere read instead of trying to do this like calculation work and going to town and really trying to figure out the most optimal pack file I can send down to the CL. It's like bro no ain't nobody got time for that. just send the whole crap down because eventually these things will be compacted and when they get compacted, guess what? It will just do the dduping then. But then on top of all of that, what makes it even smarter is that instead of doing the three-phase commit style where you have a bunch of these machines that all have git running on
10:50them and then you say, "Hey, can I lock it?" Okay, cool. I can lock it. Now we have this whole repo nice wide lock. Okay, now let's push the change in. Instead, it goes, "Okay, what branch doing? Oh, you're doing bar. Okay, we're gonna lock bar.
11:04Oh, you're doing foo. Bar is locked. I don't care. Go right on. Go in foo. You can do it. This makes sense because the immutable nature of git perfectly works here. You do not need the lock foo if you're updating bar. You do not need the lock bar if you're updating foo. Branches can be independently updated.
11:24Of course, this is written in rust, the lord's language. You may have heard of it. and it was formally verified using lean parents towel would be proud. These formalized languages that are being kind of integrated more and more because agents can just slop crap together.
11:39Honestly, it's a lot more compelling than it ever has been. I will say me looking at some laws and trying to figure out a few things when it comes to bend was actually kind of fun because you can be like, "Hey, here's my law program. You can't break that." And it's just like, "Sure thing. Hey, I'm going to compile." Oh, yeah. I can't compile.
11:56It's broken. The law says I'm doing something I'm not allowed to do. I thought you might enjoy learning about Po, OpenAI's new slop git. Cuz honestly, there's some good ideas in there. Some really good ideas. Also, the fact that we are in the 20 26th year of our Lord.
12:11I know I screwed up that phrase, but you get the idea. Anyways, we're really far into this whole gift thing. It's been out since what, a year before Mean Girls, 2004. I know, kind of crazy, right? And we still don't have per branch locking. Kind of seems a little nuts. And I do have to say that that whole idea of like why do we care that we send the most minimal pack version like why? Our network's not constrained.
12:33It's almost never constrained. Just massively eating up the disc and doing a whole bunch of reads from disk. Like that's way slower than yo network send this thing out. And that's because typically you're sending out like 20k anyway. So it's like, okay, yeah, you saved 8K. Cool story, but you used 500 milliseconds to save 8K. Nice. You good job you. Yeah, you. You did a good job. You pat yourself ON THE BACK, BIG BOY.
12:57YOU PAT YOURSELF on the back. The name. Please don't call me a shill, you guys. You know what? I already know it. I already know it. You're going to be like, "Ah, he's an open AI shell now." Or, you know, you could shove that shield just clean up the rectum. Okay. A gen.