Latest / Talk Python To Me / #564: EVE Online Departs for Python 3
Transcript
- 0:00Michael Kennedy: Every ship in EVE Online eventually undocks and leaves the station.
- 0:04Michael Kennedy: This time, it's the whole game.
- 0:06Michael Kennedy: EVE is run on Python 2 since its launch in 2003.
- 0:10Michael Kennedy: All 2.4 million lines of it on a custom stackless interpreter that stopped at Python 3.8.
- 0:18Michael Kennedy: And stackless Python was mothballed last year.
- 0:21Michael Kennedy: Now it's destination Python 3 for EVE Online.
- 0:24Michael Kennedy: The route runs through 6,500 lines of division that decide who wins a fight
- 0:29Michael Kennedy: and 100 gigabytes of pickled Python objects that have to survive the jump intact.
- 0:34Michael Kennedy: Kristinn Sigurbergsen was on the show 10 years ago,
- 0:37Michael Kennedy: and he's back, this time with Jamie Bannister,
- 0:39Michael Kennedy: who is flying the EVE Online migration right now,
- 0:42Michael Kennedy: and Thomas Darling, who took EVE Frontier through the jump first.
- 0:47Michael Kennedy: In EVE, a destroyed ship is gone for good.
- 0:49Michael Kennedy: There are no do-overs, and the universe has to stay online the entire time.
- 0:54Michael Kennedy: That's a serious migration.
- 0:56Michael Kennedy: This is Talk Python To Me, episode 564, recorded Thursday, September 10th, 2026.
- 1:20Michael Kennedy: Welcome to Talk Python To Me, the number one Python podcast for developers and data scientists.
- 1:24Michael Kennedy: This is your host, Michael Kennedy.
- 1:26Michael Kennedy: I'm a PSF fellow who's been coding for over 25 years.
- 1:31Michael Kennedy: Let's connect on social media.
- 1:32Michael Kennedy: You'll find me and Talk Python on Mastodon, BlueSky, and X.
- 1:35Michael Kennedy: The social links are all in your show notes.
- 1:38Michael Kennedy: You can find over 10 years of past episodes at talkpython.fm.
- 1:42Michael Kennedy: And if you want to be part of the show, you can join our recording live streams.
- 1:45Michael Kennedy: That's right.
- 1:46Michael Kennedy: We live stream the raw uncut version of each episode on YouTube.
- 1:50Michael Kennedy: Just visit talkpython.fm/youtube to see the schedule of upcoming events.
- 1:54Michael Kennedy: Be sure to subscribe there and press the bell so you'll get notified anytime we're recording.
- 1:59Michael Kennedy: This episode is sponsored by Sentry's Seer.
- 2:02Michael Kennedy: If you're tired of debugging in the dark, give Seer a try.
- 2:05Michael Kennedy: There are plenty of AI tools that help you write code, but Sentry's Seer is built to
- 2:09Michael Kennedy: help you fix it when it breaks.
- 2:11Michael Kennedy: Visit talkpython.fm/sentry and use the code talkpython26, all one word, no spaces,
- 2:17Michael Kennedy: for $100 in Sentry credits.
- 2:20Michael Kennedy: And it's also brought to you by Talk Python Courses.
- 2:24Michael Kennedy: Course completion certificates are now live.
- 2:26Michael Kennedy: If you finished a course, there's a certificate waiting for you on your account page right now.
- 2:31Michael Kennedy: Download it as a PDF or add it to your LinkedIn profile with one click under licenses and certifications.
- 2:37Michael Kennedy: Same section as your formal degrees.
- 2:39Michael Kennedy: Visit training.Talk Python.fm slash account to see what you've already earned.
- 2:45Michael Kennedy: Kristinn, Jamie, and Thomas, welcome to Talk Python To Me.
- 2:49Michael Kennedy: Kristinn, welcome back.
- 2:51Michael Kennedy: Jamie Thomas, hello.
- 2:52Michael Kennedy: Welcome to the show.
- 2:53Kristinn Þór Sigurbergsson: Hello.
- 2:53Kristinn Þór Sigurbergsson: Hello, Michael.
- 2:54Kristinn Þór Sigurbergsson: Hello.
- 2:55Kristinn Þór Sigurbergsson: Great to be back.
- 2:56Michael Kennedy: Yeah, yeah.
- 2:56Michael Kennedy: Great to have you all here.
- 2:57Michael Kennedy: So I'm really excited to be talking about EVE Online again.
- 3:02Michael Kennedy: When was it we?
- 3:03Michael Kennedy: I think it was 2016, 17.
- 3:06Michael Kennedy: It was a while ago.
- 3:07Kristinn Þór Sigurbergsson: I think it was 2016.
- 3:10Kristinn Þór Sigurbergsson: And I think we did even brought up the discussion point of the Python 3 upgrade.
- 3:16Kristinn Þór Sigurbergsson: So it's been on the table for a while.
- 3:18Michael Kennedy: Well, we're here to talk about upgrading EVE Online to Python 3.
- 3:22Michael Kennedy: Well, Virgin, are you going to start at 3.0 and work your way through all of them,
- 3:26Michael Kennedy: or are you going to do a little bit of a skip ahead?
- 3:29Thomas Dähling: So we are going to Python 3.12.
- 3:33Thomas Dähling: That's what we updated to.
- 3:34Thomas Dähling: We first did a step in between to stackless Python 3.8.
- 3:38Thomas Dähling: But when we did the work, 3.8 was already end of life, so to speak,
- 3:43Thomas Dähling: and stackless Python didn't go any further.
- 3:45Thomas Dähling: So we decided to go to 3.12 and have now worked on our infrastructure pipelines a little bit that any upcoming updates are a lot easier.
- 3:53Thomas Dähling: So we have plans to go to 3.15 later this year, for example.
- 3:57Michael Kennedy: Oh, fantastic. That's really neat. I'm going to be excited to hear about that.
- 4:00Michael Kennedy: Probably some cool performance benefits there and profiling and other types of benefits that you get from those last few versions there.
- 4:08Michael Kennedy: We're going to dive into why stackless and all that.
- 4:12Michael Kennedy: There's a lot of history here, and it's a really, really big project.
- 4:15Michael Kennedy: Before we get to the project itself and the upgrade and so on,
- 4:20Michael Kennedy: let's just start with a quick introduction for each of you.
- 4:24Michael Kennedy: I'll let you do that for yourselves.
- 4:25Michael Kennedy: Kristinn, you go first.
- 4:26Michael Kennedy: We'll go around the squares on the screen here.
- 4:30Kristinn Þór Sigurbergsson: Okay.
- 4:30Kristinn Þór Sigurbergsson: My name is Kristinn Seupersson.
- 4:32Kristinn Þór Sigurbergsson: I'm a director of gameplay engineering for eFrontier,
- 4:36Kristinn Þór Sigurbergsson: which shares the same technology stack as eOnline.
- 4:41Kristinn Þór Sigurbergsson: I've previously been everything from a game designer to software engineer to technical director of E1 Line and later technical director of platform or SEAR technology segment as well.
- 4:51Kristinn Þór Sigurbergsson: So I was part of the team that did the migration for 2.5.3 for Frontier and now I'm the primary benefit from it.
- 5:03Jamie Bannister: So I'm Jamie. I've been an engineer on EVE for about 16 years, mostly on gameplay.
- 5:11Jamie Bannister: But that has let me work across almost all the different aspects of the game,
- 5:15Jamie Bannister: from the front end of the client all the way through to the back.
- 5:18Jamie Bannister: So I've kind of seen all of the guts and the glory inside EVE.
- 5:23Jamie Bannister: So I'm at the moment working on the actual migration project for EVE Online itself,
- 5:28Jamie Bannister: building on kind of what the others have done previously.
- 5:31Michael Kennedy: Excellent. Thomas?
- 5:33Thomas Dähling: Yeah, I'm Thomas Delling. I'm a principal programmer on the platform segment for Fenris
- 5:39Thomas Dähling: Creations. And I have been leading the initial Python 3 transition for Carbon, like getting
- 5:45Thomas Dähling: us out of 2.7 onto Python 3.
- 5:48Michael Kennedy: Amazing. What a big project, y'all. What a big project. I think where we should start
- 5:53Michael Kennedy: is just what is EVE Online? And I have, of course, EVE Frontier pulled up. But tell us,
- 6:00Michael Kennedy: what is EVE Online? Whoever wants to take this one.
- 6:03Jamie Bannister: So Eve Online, it's an MMORPG in the classic sense.
- 6:09Jamie Bannister: It's been going since 2003.
- 6:12Jamie Bannister: So it's a massively multiplayer online game set in the far future
- 6:17Jamie Bannister: where humanity has gone through the wormhole to a new system
- 6:21Jamie Bannister: and society has kind of collapsed and then rebuilt in a new form.
- 6:25Jamie Bannister: It's a very, what we would call in gaming, an open world sandbox.
- 6:30Jamie Bannister: So we support all sorts of gameplay professions from mining, trading, piracy, a lot of combat.
- 6:38Jamie Bannister: I think the distinctive factor is the game is full, kind of full loss.
- 6:44Jamie Bannister: If you kill someone's ship, that's a ship removed from the game.
- 6:47Jamie Bannister: There's no kind of getting things back.
- 6:50Jamie Bannister: Nothing lasts forever.
- 6:51Jamie Bannister: So the game is built on creation and destruction.
- 6:54Michael Kennedy: A big part of it, if I understand it right, is kind of the economy and just the society.
- 6:59Michael Kennedy: Like there's a society that forms from the players.
- 7:03Jamie Bannister: Yeah, the economy I think,
- 7:06Jamie Bannister: and before I joined to work on the game,
- 7:09Jamie Bannister: I was a big player as well,
- 7:11Jamie Bannister: and the economy was a big part of it for me.
- 7:13Jamie Bannister: It's been used by, or been studied by economists,
- 7:17Jamie Bannister: because it's, if you think,
- 7:19Jamie Bannister: the data that we have on a big, real,
- 7:21Jamie Bannister: on our economy is more accurate and detailed
- 7:24Jamie Bannister: than you can kind of get from studying
- 7:26Jamie Bannister: the real world economies,
- 7:27Jamie Bannister: where you've always got imprecise data.
- 7:29Jamie Bannister: So we have every single transaction.
- 7:31Jamie Bannister: We know everything that's going on.
- 7:33Jamie Bannister: You see all the money as it moves around the game.
- 7:36Michael Kennedy: That's super interesting.
- 7:37Jamie Bannister: Yeah, very, very rich simulation.
- 7:39Michael Kennedy: What if we lived in a society where there was zero privacy and 100% data sharing?
- 7:44Michael Kennedy: It would be creepy from a human perspective, right?
- 7:47Michael Kennedy: Just like governments and alt-territarism and all that kind of stuff.
- 7:52Michael Kennedy: But from an economics perspective, you have perfect data, right?
- 7:56Jamie Bannister: Yes, yeah.
- 7:57Jamie Bannister: and it's interesting how real world things have come up in the game like there's no formal mechanic
- 8:03Jamie Bannister: for banks for example but players themselves have built banks they've built uh kind of loan schemes
- 8:10Jamie Bannister: organizations have got their own way of paying their members for turning up to operations so they
- 8:19Jamie Bannister: they have all the equivalent of like we have welfare groups we have um very centralized
- 8:24Jamie Bannister: democratic groups, communist groups, all those kind of different social phenomena have reappeared
- 8:30Michael Kennedy: in the game kind of organically. So interesting. And many online games are, you go here, you find a
- 8:38Michael Kennedy: server, you join 40 people, and you go have an experience, right? But this is a single, unified,
- 8:44Michael Kennedy: one world that everybody is in. They can all interact, all that kind of stuff, right? Yeah.
- 8:49Jamie Bannister: So we take place where we call it a single shard.
- 8:52Jamie Bannister: So yeah, like you say, it's one universe.
- 8:55Jamie Bannister: Any two people in the game, if they go to the same place,
- 8:58Jamie Bannister: they will meet and see each other.
- 9:00Jamie Bannister: And so we have, I think our largest kind of player group
- 9:06Jamie Bannister: is about 15,000 characters.
- 9:10Jamie Bannister: And so all of those potentially could get together
- 9:12Jamie Bannister: and go to one place at one time and have a huge fight.
- 9:15Jamie Bannister: I think we have two Guinness World Records for the most,
- 9:19Michael Kennedy: uh people taking part in a pvp fight wow how do you coordinate that as a as a group you know what
- 9:26Michael Kennedy: i mean like how do you coordinate just the conversations amongst the people without it
- 9:32Jamie Bannister: just being a cacophony um between in turn ourselves i mean with the players i mean with the players
- 9:38Michael Kennedy: if there's 1500 people in like uh some sort of action how can you have conversations and
- 9:44Michael Kennedy: communication without it being they built built their own solutions for a lot of this um so they've
- 9:51Jamie Bannister: replicated a lot of a chain of command that you get from from real kind of real world and some of
- 9:55Jamie Bannister: the bigger groups they have their own it departments uh that take care of of things a lot of groups use
- 10:02Jamie Bannister: uh discord for kind of coordination but they have and various other kind of voice uh systems they
- 10:08Jamie Bannister: have uh what's called an fc which is like a fleet commander so that's the person uh giving the orders
- 10:14Jamie Bannister: and kind of directing the troops.
- 10:16Jamie Bannister: And then it kind of, there's a hierarchy, if you like,
- 10:19Jamie Bannister: of communication that goes down.
- 10:21Jamie Bannister: So yeah, the bigger groups have built
- 10:24Jamie Bannister: very complex kind of command and control systems
- 10:28Jamie Bannister: with themselves.
- 10:29Michael Kennedy: I guess that makes sense, but wow.
- 10:31Michael Kennedy: And you think of a real army,
- 10:33Michael Kennedy: if there's a thousand people,
- 10:34Michael Kennedy: they don't all just get onto the same audio channel.
- 10:37Michael Kennedy: They do have certain people who talk to each other
- 10:39Michael Kennedy: and then they give commands down the line.
- 10:42Michael Kennedy: And interesting.
- 10:42Jamie Bannister: They replicate the processes like scouts filtering information up.
- 10:46Jamie Bannister: They'll have then some people gather that information and feed it into the FC,
- 10:50Jamie Bannister: who makes the calls of where they're going to go, what they kind of do next.
- 10:54Jamie Bannister: Yeah.
- 10:54Michael Kennedy: Kristinn, Thomas, you guys want to add anything to that overview before we dive in?
- 11:00Kristinn Þór Sigurbergsson: Yeah, I would say that this doesn't really happen by its own.
- 11:03Kristinn Þór Sigurbergsson: There are a lot of people that play EVE online that spend an incredible amount of time orchestrating all this.
- 11:11Kristinn Þór Sigurbergsson: not only just the fights themselves, but the reasons behind the fight, gathering everybody up.
- 11:17Kristinn Þór Sigurbergsson: So it is really fascinating to see. And to some extent, these people are playing the game,
- 11:22Kristinn Þór Sigurbergsson: but they're not actually in the game because they are managing the spreadsheets and
- 11:28Kristinn Þór Sigurbergsson: the communications and all of that. And to some extent in certain circles, like people have
- 11:34Kristinn Þór Sigurbergsson: put their experience in managing these larger corporations in EVE onto their CV and it has
- 11:42Michael Kennedy: helped them get a job. That's a level of commitment there. Yeah, I can now function as a full
- 11:50Michael Kennedy: logistics operation person because I've done it for a thousand people in EVE Online.
- 11:56Thomas Dähling: Very much so. Yeah, very much. Crazy. Thomas? Oh, I've got nothing more to add there. I think
- 12:01Thomas Dähling: they both described it really well.
- 12:03Thomas Dähling: It can sometimes be almost more like a job than a game
- 12:06Thomas Dähling: if you want it to be.
- 12:07Thomas Dähling: You learn a lot of valuable things.
- 12:10Thomas Dähling: You meet a lot of great people that way as well, right?
- 12:12Thomas Dähling: I mean, over the 20 years, so many people
- 12:14Thomas Dähling: that met each other.
- 12:15Thomas Dähling: We even had a wedding at one of our FanFests,
- 12:18Thomas Dähling: I believe.
- 12:20Michael Kennedy: We've actually had a few, I think.
- 12:22Michael Kennedy: Thomas, you gave a great talk
- 12:24Michael Kennedy: at FanFest about upgrading
- 12:25Michael Kennedy: and inspiring the folks.
- 12:28Michael Kennedy: That video is online.
- 12:30Michael Kennedy: I'll link to it in the show notes.
- 12:31Michael Kennedy: We'll maybe get to that in a little bit later.
- 12:33Michael Kennedy: So that sounds like a really cool gathering.
- 12:36Michael Kennedy: You know, I really, the last couple of years,
- 12:38Michael Kennedy: I've really enjoyed just diving into games.
- 12:41Michael Kennedy: And my daughter is getting older.
- 12:42Michael Kennedy: And one of the things she really likes to do
- 12:44Michael Kennedy: is sit down and play games together.
- 12:46Michael Kennedy: Not even online, it's too big,
- 12:48Michael Kennedy: but sort of cooperative stuff and just sort of exploring.
- 12:51Michael Kennedy: And I think that there's,
- 12:53Michael Kennedy: well, I know that studies have shown
- 12:55Michael Kennedy: that there's more loneliness.
- 12:57Michael Kennedy: There's fewer third places that people find themselves at and all that.
- 13:02Michael Kennedy: Having something like this where you can gather and be with people and immerse yourself in,
- 13:07Michael Kennedy: I think it's really neat, honestly.
- 13:08Michael Kennedy: As long as you don't take it too far, you know, still go to work and stuff.
- 13:11Jamie Bannister: Yeah, yeah.
- 13:12Jamie Bannister: I mean, before I joined and as a player, we would organize meetup events at different places around the UK where I was from.
- 13:22Jamie Bannister: And so I got to know a lot of people.
- 13:24Jamie Bannister: I travel to a lot of places just for the purpose of meeting up with other EVE players.
- 13:29Jamie Bannister: So for a lot of people, EVE or a lot of games like this,
- 13:35Jamie Bannister: they can be your primary social connection to a lot of them.
- 13:38Michael Kennedy: Let me take us back 35 years or something like that to the days of BBSs.
- 13:46Michael Kennedy: Have any of you guys done BBSs? Remember them?
- 13:49Jamie Bannister: Yeah, I used to play the MUDs back in the day.
- 13:51Michael Kennedy: Oh, I used to play MUDs as well.
- 13:53Michael Kennedy: Though that's not what I'm thinking of.
- 13:54Michael Kennedy: But actually, MUDs have a really interesting multi-user dungeons.
- 13:58Michael Kennedy: They have some really interesting analogies as well.
- 14:00Michael Kennedy: But I was thinking of Trade Wars.
- 14:03Michael Kennedy: Have any of y'all played Trade Wars from the BBS days?
- 14:06Michael Kennedy: I know of it.
- 14:07Jamie Bannister: I've never played it.
- 14:09Michael Kennedy: It's really interesting.
- 14:10Michael Kennedy: It was this multiplayer thing way back in the 90s.
- 14:13Michael Kennedy: And you would dial in and you'd have to take turns because only one phone could be connected to the BBS at the time, at a time.
- 14:21Michael Kennedy: And it was really, it has some real similar vibes.
- 14:24Michael Kennedy: It's, you know, you travel to different planets.
- 14:26Michael Kennedy: There's mining, there's an economy, there's trade.
- 14:28Michael Kennedy: Anyway, I feel like this is like, what if it could be real?
- 14:32Michael Kennedy: Instead of just a little sort of simple game,
- 14:33Michael Kennedy: what if you could make it real with all the nuances
- 14:37Michael Kennedy: and intricacies of reality and multiplayer?
- 14:39Michael Kennedy: And it's just the realization of what that thing should have become.
- 14:43Michael Kennedy: Yeah.
- 14:45Jamie Bannister: Because Eve was heavily inspired by a game called Elite,
- 14:49Jamie Bannister: which was one of the very early 3D space games.
- 14:52Jamie Bannister: And that had a big world, a big universe of systems.
- 14:57Jamie Bannister: Trading was a big part of it.
- 14:58Jamie Bannister: And so there's definitely links from there.
- 15:01Jamie Bannister: And also classic role-playing games as well.
- 15:04Jamie Bannister: Our character stats have similar kind of perception,
- 15:07Jamie Bannister: intelligence, charisma sort of stats.
- 15:09Jamie Bannister: Interesting.
- 15:10Michael Kennedy: Almost a D&D sort of.
- 15:12Michael Kennedy: Very much, yeah.
- 15:13Jamie Bannister: Yeah, you can tell there were D&D players
- 15:14Jamie Bannister: in the very early EVE designers, for sure.
- 15:18Michael Kennedy: This portion of Talk Python To Me is brought to you by Sentry and Sear AI.
- 15:23Michael Kennedy: There are plenty of AI tools that help you write code,
- 15:25Michael Kennedy: but Sentry's Seer is built to help you fix it when it breaks.
- 15:29Michael Kennedy: The difference is context.
- 15:31Michael Kennedy: Sear isn't just guessing based on syntax.
- 15:33Michael Kennedy: It's analyzing your actual Sentry data,
- 15:36Michael Kennedy: your stack traces, logs, and failure patterns.
- 15:38Michael Kennedy: Because it has the full context,
- 15:40Michael Kennedy: it can A, spot buggy code in review
- 15:43Michael Kennedy: and help prevent issues before they happen,
- 15:45Michael Kennedy: and B, identify the root cause of production errors.
- 15:49Michael Kennedy: It can even draft a fix and hand the work off to an agent-like cursor to open a PR for you.
- 15:54Michael Kennedy: Seer turns Sentry into a complete loop.
- 15:56Michael Kennedy: You have your traces, errors, logs, and replays to see the problem, and now AI to help solve it.
- 16:01Michael Kennedy: Join millions of devs at companies like Claude, Disney+, and even Talk Python, who use Sentry to move faster.
- 16:08Michael Kennedy: Check them out at talkpython.fm/sentry and use code talkpython26, all one word, for $100 in Sentry credits.
- 16:17Michael Kennedy: Thank you to Sentry for supporting Talk Python.
- 16:20Michael Kennedy: We're going to also talk about this thing called Eve Frontier, which is a little different,
- 16:26Michael Kennedy: but very much inspired, shares a lot of the code base.
- 16:28Michael Kennedy: So give us a quick comparison to Eve Frontier, which I'm sure fewer people know about.
- 16:33Kristinn Þór Sigurbergsson: Yeah, sure.
- 16:34Kristinn Þór Sigurbergsson: So what matters for the tech is that we've essentially forked Eve Online, the code base,
- 16:41Kristinn Þór Sigurbergsson: and are sharing a lot of the underlying tech.
- 16:44Kristinn Þór Sigurbergsson: We've made a lot of modifications.
- 16:45Kristinn Þór Sigurbergsson: We haven't been kind of pulling in stuff lately because it's just, it's become too different.
- 16:53Kristinn Þór Sigurbergsson: Where it differs from EVE Online is maybe if you play EVE Online, you very much come into a society.
- 17:00Kristinn Þór Sigurbergsson: Part of it is definitely player built, but part of it is also kind of NBC built.
- 17:05Kristinn Þór Sigurbergsson: The environment is there's a police, there's everything.
- 17:08Kristinn Þór Sigurbergsson: Whereas in Frontier, you're more coming into like an unbuilt, uninhabited zone
- 17:12Kristinn Þór Sigurbergsson: and you're the first kind of writers in that universe.
- 17:15Kristinn Þór Sigurbergsson: And it's up to the players to build that society up
- 17:20Kristinn Þór Sigurbergsson: and kind of build up all of that infrastructure.
- 17:23Kristinn Þór Sigurbergsson: It doesn't really differ from even a lot of like the design paradigms.
- 17:29Kristinn Þór Sigurbergsson: I think both games aim to give players as much player agency as they possibly can.
- 17:34Kristinn Þór Sigurbergsson: But this also allows us to make like a lot more dramatic changes in the gameplay itself.
- 17:42Kristinn Þór Sigurbergsson: it's very hard to change the gameplay on evil line for example very drastically because honestly
- 17:47Kristinn Þór Sigurbergsson: like after 20 years that's the game that people are playing they don't really like they didn't
- 17:51Kristinn Þór Sigurbergsson: play it for 20 years to change all of it so uh we've been doing that it's more survival
- 17:58Kristinn Þór Sigurbergsson: survival based it's more like uh like a survival game than it is uh uh not necessarily more than
- 18:05Kristinn Þór Sigurbergsson: an mmo but it definitely has a lot more survival elements to it uh yeah and the environments are
- 18:10Kristinn Þór Sigurbergsson: a little bit more kind of claustrophobic and smaller.
- 18:13Kristinn Þór Sigurbergsson: Obviously, that's very hard in a space game
- 18:15Kristinn Þór Sigurbergsson: because space is pretty vast.
- 18:17Michael Kennedy: Yeah, amazing.
- 18:18Michael Kennedy: Okay, really, really neat.
- 18:20Michael Kennedy: Now let's talk about the reason that I reached out to you,
- 18:24Michael Kennedy: which is I saw this article or post from you all
- 18:27Michael Kennedy: that said the move to Python 3 begins.
- 18:29Michael Kennedy: And, you know, credit to you all.
- 18:31Michael Kennedy: This is a really fun article that it's like,
- 18:34Michael Kennedy: it's told as sort of the next phase of a game
- 18:37Michael Kennedy: or something where it's kind of a mission in the game, I guess.
- 18:42Michael Kennedy: But a mission for you all, right?
- 18:44Jamie Bannister: Yeah, I think that we kind of got a little bit cheeky with the heading
- 18:48Jamie Bannister: because it isn't necessarily the beginning
- 18:51Jamie Bannister: because, like we were saying earlier, Frontier itself is already on Python 3.
- 18:57Jamie Bannister: But this is specifically for EVE Online itself.
- 19:00Jamie Bannister: It's now actively moving to Python 3.
- 19:02Jamie Bannister: And a lot of it is building up on the tech that we've developed
- 19:07Jamie Bannister: ready and kind of start to prove out through Frontier. But yeah, this is kind of our big
- 19:12Jamie Bannister: formal announcement that the legacy of 20 plus years of code, we're now kind of actively working
- 19:20Michael Kennedy: to migrate. I think we should start maybe with a little bit of the architecture and just a big
- 19:26Michael Kennedy: tech picture of EVE Online. When we spoke, Kristinn, way back in the day, you were doing a bunch of
- 19:32Michael Kennedy: interesting things. I think you must have been the single largest deployment of Python,
- 19:37Michael Kennedy: a Python app on Windows?
- 19:39Michael Kennedy: Is that correct?
- 19:40Michael Kennedy: I would say yes, right?
- 19:41Michael Kennedy: What else would it be?
- 19:42Michael Kennedy: That seems very plausible.
- 19:44Kristinn Þór Sigurbergsson: I think it was a very kind of like a niche environment.
- 19:48Kristinn Þór Sigurbergsson: And what I'd often run into is that I would try to take some libraries
- 19:52Kristinn Þór Sigurbergsson: and try to use them and they just wouldn't work on Windows.
- 19:54Kristinn Þór Sigurbergsson: Like somebody broke it and nobody cared
- 19:57Kristinn Þór Sigurbergsson: because they weren't really using it on Windows,
- 19:59Kristinn Þór Sigurbergsson: except we were.
- 20:01Kristinn Þór Sigurbergsson: Obviously, like at that time, like 10 years ago,
- 20:03Kristinn Þór Sigurbergsson: we couldn't really use a lot of, especially native Python
- 20:07Kristinn Þór Sigurbergsson: libraries.
- 20:08Kristinn Þór Sigurbergsson: I can't even remember if we had removed-
- 20:10Kristinn Þór Sigurbergsson: we must have removed.
- 20:11Kristinn Þór Sigurbergsson: We had our own importer as well, which
- 20:13Kristinn Þór Sigurbergsson: made it also difficult to use third party libraries.
- 20:17Kristinn Þór Sigurbergsson: But I think we fixed that.
- 20:20Thomas Dähling: Yeah, there's a lot of-
- 20:21Thomas Dähling: I mean, it's a very old project.
- 20:23Thomas Dähling: And a lot of the early beginnings in the code base
- 20:25Thomas Dähling: were before a lot of the things in Python
- 20:27Thomas Dähling: actually being standardized to a degree.
- 20:30Thomas Dähling: plus the special circumstances of having a packaged program
- 20:35Thomas Dähling: with its own Python interpreter
- 20:37Thomas Dähling: just makes certain things more interesting.
- 20:39Thomas Dähling: Like, you know, as Kristen alluded to,
- 20:40Thomas Dähling: like you can't just import a random public package
- 20:44Thomas Dähling: because we don't have pip as an example, right?
- 20:47Thomas Dähling: Or uv these days.
- 20:48Thomas Dähling: But like, there's a lot of interesting problems
- 20:51Thomas Dähling: you need to solve when you have such a large deployment,
- 20:53Thomas Dähling: for sure.
- 20:53Michael Kennedy: Yeah, there was a lot of custom stuff.
- 20:55Michael Kennedy: When did this first get created?
- 20:56Michael Kennedy: So I know we spoke in 2016,
- 20:58Michael Kennedy: but it's been around for more like 20 years, right?
- 21:00Michael Kennedy: So 2005, 2006?
- 21:04Michael Kennedy: I think it's earlier than that.
- 21:06Kristinn Þór Sigurbergsson: It's like the game is released that 2003,
- 21:10Kristinn Þór Sigurbergsson: the development started in 99, I think.
- 21:15Kristinn Þór Sigurbergsson: They didn't really choose Python.
- 21:18Kristinn Þór Sigurbergsson: I don't know the exact date of that,
- 21:21Kristinn Þór Sigurbergsson: but like there was, that is an interesting story as well.
- 21:25Kristinn Þór Sigurbergsson: Like why they chose Python,
- 21:26Kristinn Þór Sigurbergsson: which was actually rather new at the time.
- 21:29Michael Kennedy: Yeah, I was actually wondering about that as well.
- 21:32Michael Kennedy: I'm glad you chose Python.
- 21:33Michael Kennedy: I think it's really cool.
- 21:34Michael Kennedy: And I'm sure you all really enjoy working on it.
- 21:36Michael Kennedy: And this has got to be an exciting project to say.
- 21:39Michael Kennedy: We're moving to 3.15.
- 21:41Michael Kennedy: We can use uv.
- 21:42Michael Kennedy: We can import libraries, like all the exciting stuff.
- 21:46Michael Kennedy: But at the time, it was pretty new.
- 21:48Michael Kennedy: And we said, well, we could run this much faster and easier if we wrote it,
- 21:52Michael Kennedy: I don't know, with C++, Java, C#, something like that, right?
- 21:57Jamie Bannister: I think a lot of the core libraries, they are in C++, so our physics engine, which we call Destiny, that's all C++. Trinity, our graphics engine, similarly. But yeah, most of our kind of higher level, all the gameplay logic, a lot of the network stack that we have, that's all built, or clustering stack, that's all built in Python.
- 22:25Kristinn Þór Sigurbergsson: Yeah, probably add to that as well is that like the time when we started or not me, even though I've been here for a very long time, it hasn't been that long.
- 22:37Kristinn Þór Sigurbergsson: But when they started writing EVE, like that was around the.com era and kind of the older listeners probably remember that era.
- 22:45Kristinn Þór Sigurbergsson: But the programming resources were scarce and heavily sought after.
- 22:49Kristinn Þór Sigurbergsson: So very expensive.
- 22:51Kristinn Þór Sigurbergsson: So part of the reason why they chose Python was to get more junior people and even designers
- 22:57Kristinn Þór Sigurbergsson: to be able to write sequential code in Python in order to speed up development.
- 23:04Kristinn Þór Sigurbergsson: It was all about development speed.
- 23:06Jamie Bannister: Especially in Iceland, right, where you've got a much smaller pool of people to work from.
- 23:12Michael Kennedy: Honestly, that's kind of a cool success story, right?
- 23:15Michael Kennedy: Like bring more people in to help build the thing that we're building.
- 23:19Thomas Dähling: Yeah, absolutely.
- 23:21Thomas Dähling: Yeah, absolutely. And as Kristin just said, allowing people to write sequential, simple, straightforward Python code as well, which then led to us discovering stackless Python, integrating that one, and then building an abstraction on top that people don't realize that they are writing code that runs asynchronously.
- 23:40Thomas Dähling: And it enabled us to scale to the degree that we're able to scale with thousands of people being in the same solar system and so on.
- 23:47Michael Kennedy: Yeah, you needed concurrency before Python was inspired by concurrency.
- 23:52Michael Kennedy: Maybe we should talk a little bit about free-threaded Python later,
- 23:56Michael Kennedy: as well as the possibilities there.
- 23:58Michael Kennedy: But I just want to kind of touch on this historical angle a little bit more.
- 24:02Michael Kennedy: To me, there's two really significant milestones that matured Python.
- 24:07Michael Kennedy: I'm sure there are more, but these are the ones that stand out in my mind.
- 24:10Michael Kennedy: They both are around 2006 or so time frame.
- 24:14Michael Kennedy: So one is Django coming to Python, really making it a first class way to build web apps.
- 24:21Michael Kennedy: People start building on top of that.
- 24:23Michael Kennedy: That puts a lot of pressure to make Python operate a little bit differently, right?
- 24:28Michael Kennedy: 10 years later, we've got Instagram running the largest Django deployment in the world
- 24:32Michael Kennedy: and doing things like trying to juggle weird memory stuff by turning off the GC, for example,
- 24:39Michael Kennedy: entirely and other things along those lines.
- 24:41Michael Kennedy: The other one around 2006 as well is the invention of NumPy and then later Jupyter and the whole data science stack, which also put really hard computational pressure on Python rather than, say, the parallelism of web apps and so on.
- 24:56Michael Kennedy: You all were before both of those, right?
- 24:58Michael Kennedy: So it was early, early days.
- 25:00Jamie Bannister: Yeah.
- 25:01Jamie Bannister: I mean, what we also found was, or what I found in some of work here is the original developers had to invent a lot of things which didn't exist.
- 25:11Jamie Bannister: So like the containerized system, a way to kind of cluster an application across multiple
- 25:19Jamie Bannister: CPUs and notes.
- 25:21Jamie Bannister: There wasn't really a lot of easy off the shelf frameworks for that kind of thing.
- 25:24Jamie Bannister: So they had to roll their own.
- 25:27Jamie Bannister: Even logging and telemetry systems, there weren't great ones of those.
- 25:32Jamie Bannister: So what we found from the early years is we have a lot of in-house tools, which we made
- 25:39Jamie Bannister: or the people at the time made, which are now using the models that you see being replicated
- 25:48Jamie Bannister: by much more popular systems.
- 25:50Jamie Bannister: So whether it be Redis for a storage system or your containers as well.
- 25:56Jamie Bannister: The way that maybe we can talk about this a bit more in a bit is the way we distribute
- 26:00Jamie Bannister: EVE as an application across about 200 nodes in our server cluster.
- 26:07Jamie Bannister: And each of those has certain jobs to do.
- 26:11Jamie Bannister: And so we have to deploy and configure all of those as one giant cluster.
- 26:16Jamie Bannister: And we have our own coordination tools that have been built over the years.
- 26:20Jamie Bannister: Nowadays, if you were starting this from scratch,
- 26:22Jamie Bannister: you would have so many off-the-shelf solutions that we just didn't have the options for.
- 26:26Michael Kennedy: Oh, you just set up Kubernetes and then do this auto-scaling thing.
- 26:30Michael Kennedy: And it's, oh, yeah, it's just easy.
- 26:33Kristinn Þór Sigurbergsson: I would also like to add, I feel like the data scientists kind of grabbing onto Python and
- 26:40Kristinn Þór Sigurbergsson: I feel like pushing it towards Python 3 because I think without that army going into Python
- 26:48Kristinn Þór Sigurbergsson: 3, I feel like it mirrors the rationale of why we chose to go into stackless Python.
- 26:53Kristinn Þór Sigurbergsson: You were giving basically a tool to a bunch of people that aren't really programmers,
- 26:57Kristinn Þór Sigurbergsson: but they need to write code.
- 26:59Kristinn Þór Sigurbergsson: So I feel like that is an interesting thing.
- 27:03Michael Kennedy: Yeah, you know, I've forgotten the 2v3 wars and all that.
- 27:07Michael Kennedy: Now, yeah, it's easy to forget the details of that from, it's been a while now, actually,
- 27:12Michael Kennedy: but you're right.
- 27:13Michael Kennedy: It was the data scientists that were going into Python 3, and the rest of the folks were
- 27:18Michael Kennedy: kind of dragging their feet because they had existing code bases that needed to keep running
- 27:23Michael Kennedy: and keep being migrated, whereas the data science projects are more frequently like,
- 27:27Michael Kennedy: we'll start a new project to answer this question
- 27:31Michael Kennedy: or to study this new bit of data.
- 27:32Michael Kennedy: So they had many more opportunities
- 27:35Michael Kennedy: to choose the most modern tools.
- 27:37Michael Kennedy: And I think, honestly, we should give the data scientists
- 27:40Michael Kennedy: a little bit more credit of making the two to three change happen.
- 27:44Michael Kennedy: All right, well, let's talk stackless Python
- 27:46Michael Kennedy: because this is one of the foundations
- 27:49Michael Kennedy: that you all had to migrate from.
- 27:51Michael Kennedy: And the journey begins,
- 27:55Michael Kennedy: The move to Python 3 begins article talks about upgrading from 2.5 to 2.7 not too long ago.
- 28:02Michael Kennedy: And then finally up to 3.8.
- 28:06Michael Kennedy: What is it about Stackless Python?
- 28:07Michael Kennedy: I know it has strong origins with you all because some of the core developers worked on it and refined it there.
- 28:14Michael Kennedy: But this far down the line, I imagine there's a lot of people that don't know what this is.
- 28:19Thomas Dähling: Yeah, absolutely.
- 28:21Thomas Dähling: Stackless Python itself was a very great solution at the time, right?
- 28:25Thomas Dähling: I mean, it's basically Golang's GoRoutines, but in Python,
- 28:28Thomas Dähling: before things like this co-routine model
- 28:32Thomas Dähling: became so popular as it is in recent years.
- 28:35Thomas Dähling: A big problem that we faced was, on the one hand,
- 28:40Thomas Dähling: that because of the customizations
- 28:42Thomas Dähling: we had to do to the network stack to make all the magic of people
- 28:46Thomas Dähling: writing sequential code, but it does end up not blocking
- 28:49Thomas Dähling: the main process.
- 28:51Thomas Dähling: That was a big learning curve for a lot of people.
- 28:54Thomas Dähling: And also always something that even the experienced developers
- 28:58Thomas Dähling: tended to forget about in a moment.
- 29:00Thomas Dähling: And they're like, oh, yeah, hang on, there's a DB call.
- 29:02Thomas Dähling: Of course, that we yield.
- 29:03Thomas Dähling: I need to put a lock here or whatever.
- 29:06Thomas Dähling: So the model in itself is great, but it
- 29:09Thomas Dähling: comes with a few learning hurdles, I want to say.
- 29:15Thomas Dähling: And it served us really well.
- 29:17Thomas Dähling: One problem that we had over the years
- 29:20Thomas Dähling: that had become more and more interesting, especially
- 29:22Thomas Dähling: last 15 years, I want to say, is that we relied on a heavily customized version of it. So stackless
- 29:28Thomas Dähling: Python itself is a fork of the CPython interpreter with a lot of changes in the interpreter. And
- 29:35Thomas Dähling: we put some changes on top because doing a real-time game of sorts requires some solutions that go
- 29:43Thomas Dähling: very far down the tech stack to be performant. Like if you want to get certain metrics, if you want
- 29:47Thomas Dähling: to control how memory is allocated and so on and so forth right so all these customizations and
- 29:53Thomas Dähling: also meant that made it very difficult for us to like always go to the next newer version of python
- 29:58Thomas Dähling: as the article current calls out like you know there was some code that was still python 2.5
- 30:02Thomas Dähling: when we did the native extension porting to python 3 we discovered things from python 2.3 that we were
- 30:07Thomas Dähling: still using that shouldn't have been used but we somehow kept around on our customized version of
- 30:12Thomas Dähling: of Stackless Python.
- 30:14Michael Kennedy: This portion of Talk Python is brought to you by Talk Python courses.
- 30:18Michael Kennedy: Here's the thing that always bug me.
- 30:19Michael Kennedy: You finish one of our courses, that's hours of video,
- 30:23Michael Kennedy: a pile of code you actually wrote,
- 30:24Michael Kennedy: and real skills you didn't have a month before,
- 30:27Michael Kennedy: and then nothing happens.
- 30:28Michael Kennedy: No paper, no credential, nothing to show for it.
- 30:31Michael Kennedy: So we fixed it.
- 30:32Michael Kennedy: Every Talk Python course now generates a completion certificate automatically.
- 30:36Michael Kennedy: Go to your account page in your dashboard section,
- 30:39Michael Kennedy: scroll down to your completed courses and click certificate.
- 30:42Michael Kennedy: That's the whole process.
- 30:44Michael Kennedy: Two things you can do with these course completion certificates,
- 30:47Michael Kennedy: download the full PDF,
- 30:48Michael Kennedy: which is handy if your employer reimburses training
- 30:51Michael Kennedy: or gives you credit for finishing it.
- 30:53Michael Kennedy: Or you can make the certificate public and hit share on LinkedIn,
- 30:57Michael Kennedy: which adds it to your LinkedIn profile under licenses and certifications.
- 31:01Michael Kennedy: Not a poster that scrolls away in a day,
- 31:02Michael Kennedy: an actual credential sitting on your profile
- 31:05Michael Kennedy: where your manager and recruiters can see it.
- 31:07Michael Kennedy: Plus, if you've been taking our courses for a while, you've probably earned several of these without even knowing they existed.
- 31:13Michael Kennedy: Just visit training.Talk Python.fm slash account and collect them.
- 31:18Michael Kennedy: Thanks to all of you who have taken a Talk Python course.
- 31:21Michael Kennedy: It's a great way to support the podcast.
- 31:24Thomas Dähling: Another aspect certainly is that stack lists had become like a sort of niche project in the ecosystem overall.
- 31:32Thomas Dähling: With Python 3, we have async.io built on the twisted model.
- 31:37Thomas Dähling: And even in the Python 2 world, G event
- 31:40Thomas Dähling: had become a lot more famous than Stackless Python,
- 31:43Thomas Dähling: presumably because you could just import
- 31:45Thomas Dähling: G event in a standard CPython interpreter,
- 31:47Thomas Dähling: while Stackless Python is more complicated to get started with.
- 31:53Thomas Dähling: So-
- 31:53Michael Kennedy: So Stackless Python is basically its own runtime.
- 31:56Thomas Dähling: Yeah, it's basically-
- 31:57Thomas Dähling: Yeah.
- 31:57Thomas Dähling: Yeah, very much that.
- 31:58Thomas Dähling: It's like its own Python runtime.
- 32:00Thomas Dähling: You kind of need your own.
- 32:01Thomas Dähling: Like, it has a stackless lib, so to speak,
- 32:04Thomas Dähling: which basically monkey patches similar to what
- 32:06Thomas Dähling: Gvent does all of the threading and socket modules and so on
- 32:10Thomas Dähling: to be able to do them in non-blocking fashion.
- 32:12Thomas Dähling: And yeah, all these things.
- 32:14Michael Kennedy: So that's really, I mean, that's what made it possible.
- 32:17Michael Kennedy: That's really awesome.
- 32:18Michael Kennedy: One thing, just, I don't know if you all know this,
- 32:20Michael Kennedy: but how is it possible that it says it's forked from CPython on GitHub
- 32:25Michael Kennedy: when CPython itself didn't go to GitHub until like the 20s,
- 32:29Michael Kennedy: you know, 2020, I don't know what it was,
- 32:31Michael Kennedy: but maybe some GitHub magic, I don't know.
- 32:34Thomas Dähling: Oh, it's git magic.
- 32:35Thomas Dähling: You will find on GitHub there are repositories where there are commits from Abraham Lincoln and various other historical figures because you can just make up all the history, right?
- 32:45Thomas Dähling: Interesting.
- 32:45Michael Kennedy: Yeah, it is nice, though, actually, that it shows it.
- 32:48Michael Kennedy: If you go to the repo now, it says that it was archived in 2025, which, you know, not every project is meant to last forever.
- 32:57Michael Kennedy: But it made it possible for you.
- 32:58Michael Kennedy: Although I'm sure that you would think, you know, all right.
- 33:02Michael Kennedy: You're like, wouldn't it be cool if we could use, I don't know, libraries like Pydantic or FastAPI or AIO Redis or I don't know, whatever, right?
- 33:11Michael Kennedy: Anything that is new and fancy.
- 33:13Michael Kennedy: And then you go back and you look and you're like, well, but not here.
- 33:17Michael Kennedy: Not on Stackless, right?
- 33:18Michael Kennedy: Like that was one of the major problems, wasn't it?
- 33:21Thomas Dähling: Yes, this was a major headache for us.
- 33:24Thomas Dähling: But for every native extension-
- 33:26Thomas Dähling: or not just native extensions-- for every Python package
- 33:28Thomas Dähling: we took on, we had to take a really close look
- 33:32Thomas Dähling: about how can we integrate it in our stack.
- 33:34Thomas Dähling: Again, we didn't have a package manager.
- 33:36Thomas Dähling: We still don't have it, but we're working on it.
- 33:39Thomas Dähling: And that just meant that you would take the zip file
- 33:41Thomas Dähling: from PyPy, for example, extract it into our environment,
- 33:45Thomas Dähling: and then see what happens.
- 33:47Thomas Dähling: If that then happened to be something that
- 33:48Thomas Dähling: had a native extension, well, good luck.
- 33:51Thomas Dähling: Does this support our minimum spec environment?
- 33:53Thomas Dähling: does this run on all our environments?
- 33:55Thomas Dähling: Does this work with our version of the forked Python interpreter?
- 34:00Thomas Dähling: And we have discovered a few cases
- 34:04Thomas Dähling: where we took on modules that were built for 2.7.18,
- 34:08Thomas Dähling: and they then corrupted memory because in 2.7.6,
- 34:12Thomas Dähling: the memory layout of the PyType object changed,
- 34:14Thomas Dähling: and we didn't have that change.
- 34:16Thomas Dähling: And yeah, things like that.
- 34:17Thomas Dähling: So we had to fight the way forward.
- 34:20Jamie Bannister: Jamie, you want to jump in?
- 34:21Jamie Bannister: Yeah, no, I was just going to say when it comes to support as well,
- 34:25Jamie Bannister: because we support Mac and we have in the past,
- 34:28Jamie Bannister: but we don't now support Linux as well.
- 34:30Jamie Bannister: So sometimes with a native extension,
- 34:34Jamie Bannister: we've got to figure out does it even support all of our clients?
- 34:38Jamie Bannister: Our servers run on a Windows cluster.
- 34:42Jamie Bannister: Most of our players are running on Windows clients.
- 34:45Jamie Bannister: Mac is also kind of a smaller majority.
- 34:48Jamie Bannister: And like I say, we used to also support Linux.
- 34:51Jamie Bannister: So keeping all of those in sync as well with all of these extensions has been problematic at times.
- 34:57Michael Kennedy: Yeah.
- 34:58Michael Kennedy: Sure, that's an understatement.
- 34:59Michael Kennedy: Earlier, when you guys mentioned how you deploy as an app, or.app,.exe, whatever, or to your server clusters, how do you do that?
- 35:09Michael Kennedy: That's honestly one of the biggest challenges of Python that many attempts have been made, but I honestly don't think that there's a good answer, a really foolproof answer yet.
- 35:18Michael Kennedy: And until it's built into CPython itself with a --build flag or something, I think it's going to be 90, 95% solutions.
- 35:28Michael Kennedy: But you all have something that works.
- 35:29Michael Kennedy: What are you doing?
- 35:31Thomas Dähling: So effectively, I mean, with Python 3, this all got a lot easier because you can initialize the interpreter a lot more straightforward.
- 35:38Thomas Dähling: But what we have been doing for the last 20 years is effectively we are embedding the Python interpreter in a custom binary that we have, a custom library that we use.
- 35:48Thomas Dähling: And from that moment onwards, we basically just heavily
- 35:52Thomas Dähling: customize what paths are available to the interpreter
- 35:55Thomas Dähling: and what environment variables are considered,
- 35:57Thomas Dähling: all these little things.
- 36:00Thomas Dähling: And then we package up the remaining things
- 36:02Thomas Dähling: that we need in a way that it fits this layout that we set up
- 36:05Thomas Dähling: in the embedded interpreter.
- 36:07Thomas Dähling: But yeah, it's also more like a 75% solution than a real one
- 36:12Thomas Dähling: because the Python build process in itself
- 36:14Thomas Dähling: requires some system-specific paths.
- 36:17Thomas Dähling: We had to go to great lengths to patch that out.
- 36:20Thomas Dähling: Not necessarily in the best way possible either,
- 36:22Thomas Dähling: but it gets us there.
- 36:24Michael Kennedy: If you're shipping it, that's off you all.
- 36:27Michael Kennedy: That's pretty impressive.
- 36:28Kristinn Þór Sigurbergsson: It was kind of like that we have a solution for our players,
- 36:31Kristinn Þór Sigurbergsson: but also we built a lot of tools for game designers
- 36:35Kristinn Þór Sigurbergsson: to use and stuff like that.
- 36:36Kristinn Þór Sigurbergsson: And it's convenient to write them in Python
- 36:38Kristinn Þór Sigurbergsson: because we can share some of the code base of the actual game,
- 36:41Kristinn Þór Sigurbergsson: game logic, for example, when we're creating static data.
- 36:44Kristinn Þór Sigurbergsson: And that has been like a very painful experience of distributing Python,
- 36:50Kristinn Þór Sigurbergsson: like Python, basically a Python script to developers,
- 36:54Kristinn Þór Sigurbergsson: because there is really amazing how much people can mess with their environment
- 36:59Kristinn Þór Sigurbergsson: by just changing the Python path, running the wrong version of Python.
- 37:04Kristinn Þór Sigurbergsson: It's been a struggle for years, honestly.
- 37:07Jamie Bannister: Even if we get a new hire, the first few days are often spent setting the machines up.
- 37:13Jamie Bannister: And inevitably, as Windows slightly changes from release to release, it will or won't come with certain things.
- 37:21Jamie Bannister: Sometimes we have to disable the built-in Python that ships with Windows just so that we can use our own specific Python 2.7 versus Python 3.
- 37:31Jamie Bannister: So that's also quite a lot of fun that we have to get started out.
- 37:36Michael Kennedy: What about things like uv Run or uvx in the future?
- 37:41Michael Kennedy: There's some interesting possibilities there,
- 37:43Michael Kennedy: potentially.
- 37:44Thomas Dähling: Absolutely.
- 37:45Thomas Dähling: And as I said, we are working on it.
- 37:47Thomas Dähling: We are exploring the angle there.
- 37:50Thomas Dähling: Because it is still a bit of a hassle of getting things
- 37:54Thomas Dähling: into our special environment for the game itself.
- 37:58Thomas Dähling: We have historically had also the issue
- 38:00Thomas Dähling: that we were using a different built environment
- 38:02Thomas Dähling: than the standard Python distributions, right?
- 38:05Thomas Dähling: Partially because there's a lot of code
- 38:07Thomas Dähling: that would need to be migrated.
- 38:08Thomas Dähling: Partially because it works.
- 38:11Thomas Dähling: We don't want to spend resources on that at the moment,
- 38:14Thomas Dähling: partially because, well, especially with Stackless Python,
- 38:18Thomas Dähling: you could only go so far until there's a new compiler version
- 38:21Thomas Dähling: that then breaks some internals, and you would have
- 38:22Thomas Dähling: to do major rewrites.
- 38:24Thomas Dähling: So these issues have existed, but we
- 38:28Thomas Dähling: want to be able to be in a place where a developer can also
- 38:31Thomas Dähling: just say, "uv install this package into my game environment,"
- 38:35Thomas Dähling: then be able to use it.
- 38:37Thomas Dähling: Needs to solve a few things, like if it's a native extension,
- 38:40Thomas Dähling: needs to find the right build environment and so on, which is non-trivial, unfortunately.
- 38:45Michael Kennedy: What workflows do you think, do you see becoming possible that were much, much harder once you
- 38:50Michael Kennedy: have nice package managers and maybe more reuse, right? For example, you could ship versions of
- 38:57Michael Kennedy: things more easily than, you know, as one monolithic element. Yeah, for sure. I mean, for example,
- 39:03Thomas Dähling: we recently open-sourced basically the game engine, right? And there is, I can see a world where you
- 39:09Thomas Dähling: can just uv install or pip install these things into your custom interpreter to get going or into
- 39:15Thomas Dähling: your Python interpreter to get going without requiring our custom interpreter. For our internal
- 39:21Thomas Dähling: workflows, I don't think, I mean, sure, the acquisition of an external package will definitely
- 39:27Thomas Dähling: get a lot easier, but many of the other workflows probably won't change that much since we,
- 39:33Thomas Dähling: I was in 2011 or 12 or so, we added an interpreter mode to the game engine itself, so you can
- 39:38Thomas Dähling: can basically start the game engine with a special flag, and then it basically starts
- 39:42Thomas Dähling: the Python REPL, and you get as much of the standard Python interpreter behavior as possible.
- 39:49Michael Kennedy: That's cool. So you can kind of poke around that in the game memory and values and data
- 39:54Michael Kennedy: structures as you want, right?
- 39:56Kristinn Þór Sigurbergsson: I guess the director in me doesn't really, it doesn't see it as all negative that there's
- 40:03Kristinn Þór Sigurbergsson: a bit of a hassle to add a new dependency.
- 40:07Michael Kennedy: I was thinking about that too, Kristinn. I was. And you can see these headlines of all the supply chain issues and you're like, well, I mean, we should worry about it, but not to the degree that other people with 200 dependencies do, right?
- 40:19Kristinn Þór Sigurbergsson: Yeah, definitely. And I'm not arguing necessarily for making it hard, but you can see a reality when you have a large development team and people just kind of flippantly add the dependency that causes issue. It's very vulnerable to individual mistakes.
- 40:38Michael Kennedy: Yeah, and also just duplication of now there's three libraries that kind of handle the same thing, but not entirely.
- 40:45Kristinn Þór Sigurbergsson: On the flip side, if it's harder to upgrade,
- 40:48Kristinn Þór Sigurbergsson: you're also less likely to actually upgrade it out of the.
- 40:53Michael Kennedy: What libraries or tools or experiences
- 40:56Michael Kennedy: did you all see out there and you're like,
- 40:58Michael Kennedy: all right, we have to upgrade.
- 41:00Michael Kennedy: Were there certain packages you're like,
- 41:02Michael Kennedy: oh gosh, we really, really would benefit
- 41:04Michael Kennedy: from using this one or having this feature
- 41:08Michael Kennedy: like the JIT or something in Python
- 41:10Michael Kennedy: that makes such a difference
- 41:11Michael Kennedy: that it's worth all this effort.
- 41:13Thomas Dähling: So, I mean, Jamie, maybe you can talk
- 41:15Thomas Dähling: about the Python side a little bit,
- 41:16Thomas Dähling: but from the game engine perspective,
- 41:20Thomas Dähling: the main driver for really wanting
- 41:22Thomas Dähling: to get the upgrade project pushed through
- 41:25Thomas Dähling: was the native backline that we worked on in the early 2020s.
- 41:31Thomas Dähling: It has just like Python 2.7 was not a way of silicon
- 41:35Thomas Dähling: to begin with.
- 41:36Thomas Dähling: Then a lot of other changes that had happened,
- 41:39Thomas Dähling: like macOS behaves very different with Unicode
- 41:42Thomas Dähling: than Windows does when it comes to system calls and so on.
- 41:45Thomas Dähling: Historically, before we had the native MacWords,
- 41:47Thomas Dähling: clientists would go through a translation layer similar to Wine for Linux.
- 41:52Thomas Dähling: So we really pushed for it because we just saw that,
- 41:56Thomas Dähling: okay, if we don't go up to Python 3,
- 41:58Thomas Dähling: we are stuck with having a small team that is dedicated to nothing else
- 42:04Thomas Dähling: but maintaining the Python interpreter.
- 42:07Thomas Dähling: That seemed like it's one possible solution,
- 42:10Thomas Dähling: but not necessarily the best one if you want to just go
- 42:14Thomas Dähling: rapidly than to add new features or iterate
- 42:17Thomas Dähling: on other existing functionality.
- 42:19Jamie Bannister: I think for me as a gameplay programmer who's mostly
- 42:23Jamie Bannister: using the Python framework that we have,
- 42:26Jamie Bannister: things that we've sorely been lacking for a long time
- 42:28Jamie Bannister: is a good way of type declaration.
- 42:31Jamie Bannister: It's sort of there in Python 2.7 if you're using the right IDE,
- 42:37Jamie Bannister: but it's not consistent.
- 42:38Jamie Bannister: That gets a lot better as you move through the Python 3 versions.
- 42:41Jamie Bannister: Another thing we end up making a lot of is what's effectively a data class,
- 42:46Jamie Bannister: where we just want to kind of define a small packet of data in a particular structure
- 42:50Jamie Bannister: and pass it around and do things.
- 42:52Jamie Bannister: Having kind of the language support that at a more fundamental level
- 42:57Jamie Bannister: is kind of something I'm really looking forward to getting.
- 42:59Michael Kennedy: Yeah, that's really neat.
- 43:00Michael Kennedy: And think about such a large code base.
- 43:02Michael Kennedy: Was it 2.4 million lines of code, something like that?
- 43:06Michael Kennedy: That's non-trivial.
- 43:06Michael Kennedy: I mean, that's kind of the scenario that typed Python is perfect for
- 43:11Michael Kennedy: and could have been invented for before AI was a thing,
- 43:14Michael Kennedy: which also helps.
- 43:15Michael Kennedy: But having the ability to use tools like Pyrefly or TY
- 43:19Michael Kennedy: and ask the question in an automated way,
- 43:21Michael Kennedy: is our code still consistent?
- 43:23Michael Kennedy: That's pretty neat, right?
- 43:24Jamie Bannister: Yeah, I think given the size of our code base
- 43:27Jamie Bannister: and the fact that we have reasonable test coverage,
- 43:32Jamie Bannister: but we don't have complete by any means.
- 43:34Jamie Bannister: So the more we can put in a kind of leverage from the language
- 43:38Jamie Bannister: to help prove correctness and find issues,
- 43:41Jamie Bannister: that's going to lead to a better product and less issues.
- 43:44Michael Kennedy: Yeah.
- 43:44Michael Kennedy: Last question before we actually get into the details of the migration and how you all did it.
- 43:49Michael Kennedy: What about free-threaded Python?
- 43:51Michael Kennedy: You started with this concept of high concurrence,
- 43:55Michael Kennedy: so much so we need concurrency that we're going to get our own runtime and maintain it.
- 43:59Michael Kennedy: Are you considering free-threaded Python?
- 44:01Michael Kennedy: Is this interesting in any way?
- 44:03Michael Kennedy: Or is it all asyncio driven?
- 44:06Michael Kennedy: What are you considering here?
- 44:08Thomas Dähling: We are looking at it.
- 44:09Thomas Dähling: I've actually just been to Europe iPhone back in July and attended some of the very
- 44:15Thomas Dähling: interesting presentations on where 3.30 is heading.
- 44:19Thomas Dähling: There is a lot of work ahead of us to adopt it,
- 44:22Thomas Dähling: because there are many places which just implicitly rely on the GIL for synchronization.
- 44:27Thomas Dähling: We will need to identify those.
- 44:29Thomas Dähling: There are some interesting parts where I think we could benefit from it
- 44:34Thomas Dähling: when it comes to our resource loading system, for example.
- 44:38Thomas Dähling: But yeah, it's on our radar.
- 44:40Thomas Dähling: We are interested.
- 44:41Thomas Dähling: It's not necessarily going to be the biggest performance improvement
- 44:46Thomas Dähling: that we could possibly get, I think.
- 44:49Thomas Dähling: But once it's there, we also have more possibility
- 44:52Thomas Dähling: or more options to explore as well
- 44:54Thomas Dähling: and what we might be able to do different.
- 44:56Michael Kennedy: Yeah.
- 44:56Michael Kennedy: I imagine that AsyncIO, given how much network, Redis, etc.,
- 45:00Michael Kennedy: stuff you do, will give you a pretty mega boost
- 45:03Michael Kennedy: as well as just the performance of CPython
- 45:06Michael Kennedy: has gotten so much better, right?
- 45:08Thomas Dähling: Yeah, we've gotten, like, what was it,
- 45:10Thomas Dähling: 15% to 20% improvement across the board for most things.
- 45:14Thomas Dähling: Like, there's the one-
- 45:16Thomas Dähling: like, string handling obviously changed.
- 45:18Thomas Dähling: You can't really compare that with Python 2,
- 45:20Thomas Dähling: because now it's all Unicode.
- 45:22Thomas Dähling: That always bears a little bit of overhead
- 45:24Thomas Dähling: compared to operating on bytes directly.
- 45:27Thomas Dähling: But so far, we have been very happy with the performance
- 45:31Thomas Dähling: improvements that have gotten-- that we basically
- 45:33Thomas Dähling: gotten for free, right?
- 45:35Thomas Dähling: On the topic of async I/O, though, unfortunately,
- 45:38Thomas Dähling: we can't really benefit from that because you
- 45:40Thomas Dähling: need to annotate your functions with async and so on.
- 45:45Thomas Dähling: And with the 2.4 million lines of Python code
- 45:48Thomas Dähling: written without that in mind, it had become quite quickly
- 45:51Thomas Dähling: quite clear that, unfortunately, that one
- 45:55Thomas Dähling: is out of the window for us.
- 45:56Thomas Dähling: Interesting.
- 45:58Kristinn Þór Sigurbergsson: We did discuss it at the time, whether it was just
- 46:03Kristinn Þór Sigurbergsson: completely out of scope of everything that we were doing.
- 46:07Michael Kennedy: You know, one thing in terms of colored functions,
- 46:10Michael Kennedy: that is one thing I just talked to Joe from the Gradient Project
- 46:14Michael Kennedy: about Tone.io, which is a multi-threaded async runtime in Python
- 46:19Michael Kennedy: written in Rust, but implemented in Rust.
- 46:22Michael Kennedy: But it has this way of running without necessarily decorating the thread.
- 46:26Michael Kennedy: Anyway, maybe, I don't know, maybe it's interesting.
- 46:28Michael Kennedy: Who knows?
- 46:29Thomas Dähling: I attended his talk at EuroPython.
- 46:31Thomas Dähling: Oh, yeah, yeah.
- 46:32Thomas Dähling: And it looked interesting.
- 46:36Thomas Dähling: But on the other hand, we are doing a lot of similar things
- 46:39Thomas Dähling: underneath the hood already.
- 46:40Thomas Dähling: So basically, all of the I/O already
- 46:43Thomas Dähling: happens on multiple worker threads in the background.
- 46:45Thomas Dähling: Interesting.
- 46:46Thomas Dähling: Yeah.
- 46:47Thomas Dähling: Really just that we have-
- 46:48Thomas Dähling: I mean, the main reason why-
- 46:50Thomas Dähling: the main way that we facilitated Stackless back then
- 46:53Thomas Dähling: at the new schedule and what you'll know
- 46:54Thomas Dähling: is that it acts as a synchronization point
- 46:56Thomas Dähling: to get the data from those worker threads
- 46:59Thomas Dähling: into the main thread that's running Python.
- 47:00Thomas Dähling: And I've looked at Toneio a little bit, but even that is not very straightforward to integrate
- 47:06Thomas Dähling: in our stack, unfortunately. So doing comparisons is a bit difficult.
- 47:10Michael Kennedy: Yeah, honestly, and the free-threaded stuff, honestly, it scares me. I used to do tons of
- 47:16Michael Kennedy: concurrent programming, threads, events, signal, locks, all that kind of stuff. It's not my code
- 47:22Michael Kennedy: that scares me. It's all the libraries that are written in Python that, like you all said,
- 47:27Michael Kennedy: a lot of people assume the GIL was a thing and how many of those have some little latent race
- 47:33Michael Kennedy: condition that when they figure out what it is they're gonna put locks on it then it'll become
- 47:36Michael Kennedy: a latent lock a deadlock you know what i mean like just having faith that all the foundational
- 47:41Michael Kennedy: stuff has really been through the ringer of pre-threading i don't know scares me i'm optimistic
- 47:46Thomas Dähling: for it and i want it to exist but it scares me yeah there's a lot of work for sure you know also
- 47:50Thomas Dähling: like the other side that the single threaded use case shall not degrade in performance either
- 47:54Thomas Dähling: you know
- 47:55Thomas Dähling: it's
- 47:56Thomas Dähling: there are many things
- 47:57Thomas Dähling: but that being said
- 47:58Thomas Dähling: like
- 47:59Thomas Dähling: even with the
- 47:59Thomas Dähling: asynchronous programming
- 48:00Thomas Dähling: that we
- 48:01Thomas Dähling: that we use
- 48:01Thomas Dähling: underneath the hood
- 48:02Thomas Dähling: we are already
- 48:02Thomas Dähling: in the world
- 48:03Thomas Dähling: of having to be careful
- 48:04Thomas Dähling: what we put a lock on
- 48:05Thomas Dähling: and whatnot
- 48:06Thomas Dähling: right
- 48:07Michael Kennedy: for you guys
- 48:08Michael Kennedy: you all are in this world
- 48:10Michael Kennedy: but I think
- 48:11Michael Kennedy: 99% of the Python people
- 48:13Michael Kennedy: don't even think about locks
- 48:14Michael Kennedy: and
- 48:15Michael Kennedy: race conditions
- 48:16Michael Kennedy: you know
- 48:16Michael Kennedy: and that's
- 48:17Michael Kennedy: I think that's where
- 48:18Michael Kennedy: we're going to
- 48:19Michael Kennedy: have to
- 48:19Michael Kennedy: as a community
- 48:20Michael Kennedy: work through the issues
- 48:22Michael Kennedy: to make these
- 48:23Michael Kennedy: dependencies
- 48:24Michael Kennedy: stable
- 48:24Thomas Dähling: Yeah, absolutely.
- 48:26Thomas Dähling: There is actually-- I think there is a community effort going on,
- 48:29Thomas Dähling: as far as I remember, where-
- 48:32Thomas Dähling: is the URL really rb-free-threaded yet or something?
- 48:35Thomas Dähling: So there's a project where they basically
- 48:37Thomas Dähling: track all of the public libraries in PyPy
- 48:40Thomas Dähling: and how they behave under free-threaded Python already.
- 48:43Thomas Dähling: So we also-- well, I keep an eye on that as well
- 48:46Thomas Dähling: to see where that is happening and where there may be some
- 48:49Thomas Dähling: of our dependencies in there.
- 48:50Michael Kennedy: There's the compatibility, the free-threading compatibility
- 48:53Michael Kennedy: status checker.
- 48:54Michael Kennedy: It's got the tested in CI, the PyPI release,
- 48:58Michael Kennedy: when it was first supported, the free threading bit.
- 49:00Michael Kennedy: It's very data science heavy though, isn't it?
- 49:03Thomas Dähling: Yeah, I guess it's once again the data scientists
- 49:04Thomas Dähling: that are leading the way here.
- 49:06Thomas Dähling: I guess they're also mostly benefiting from a free thread in Python,
- 49:08Thomas Dähling: given that they are doing a lot of number crunching.
- 49:11Michael Kennedy: Right, exactly.
- 49:12Michael Kennedy: Because I think async.io, even though it may not apply to you all,
- 49:15Michael Kennedy: does solve the problem of I got to talk to the database
- 49:17Michael Kennedy: a whole bunch of times concurrently or to microservices concurrently
- 49:23Michael Kennedy: because it's the IO bit,
- 49:25Michael Kennedy: but when you got to do computation,
- 49:26Michael Kennedy: it doesn't help you a bit.
- 49:28Michael Kennedy: So yeah, you're right.
- 49:29Michael Kennedy: I think that's fundamentally why.
- 49:30Michael Kennedy: All right, let's talk the actual migration.
- 49:34Michael Kennedy: So you all started by just making sure,
- 49:36Michael Kennedy: well, first converting everything to run
- 49:39Michael Kennedy: in two and three, right?
- 49:41Michael Kennedy: Tell us about that.
- 49:43Jamie Bannister: Yeah.
- 49:45Jamie Bannister: All right, so I'm going to take this.
- 49:47Jamie Bannister: So a lot of the work that kind of came our way
- 49:52Jamie Bannister: was to take our 2.4 million lines of code that we have
- 49:57Jamie Bannister: and bring it forward so that we can eventually end up
- 50:00Jamie Bannister: everything on Python 3.
- 50:01Jamie Bannister: What we found is, like we mentioned earlier on,
- 50:04Jamie Bannister: we still have a lot of code that was technically 2.4, 2.5,
- 50:10Jamie Bannister: or using 2.4 and 2.5 kind of idioms,
- 50:13Jamie Bannister: which are no longer suitable in Python 3.
- 50:15Jamie Bannister: So the very first step that we've taken
- 50:18Jamie Bannister: is what we're calling legacy to 2.7,
- 50:20Jamie Bannister: which is get all of those legacy bits of code up to 2.7 standard,
- 50:25Jamie Bannister: because a lot of those changes then become more forwards compatible into 3.
- 50:30Jamie Bannister: We've actually already released and deployed the first part of that a few weeks ago.
- 50:36Jamie Bannister: That was around the time that we wrote that blog.
- 50:38Jamie Bannister: And for a lot of that, we use these Futurize scripts,
- 50:43Jamie Bannister: all the fixes from Futurize.
- 50:44Jamie Bannister: And what they do is they take one particular idiom of Python
- 50:49Jamie Bannister: and update it to Python 3.
- 50:51Jamie Bannister: There's a subset of those which you can run
- 50:54Jamie Bannister: whilst still being 2.7 compatible.
- 50:58Jamie Bannister: And so those are the ones that we've done so far.
- 51:00Michael Kennedy: Yeah, and you just basically got them all moved
- 51:04Michael Kennedy: to a way that theoretically would run on Python 3
- 51:07Michael Kennedy: because for people who don't know,
- 51:08Michael Kennedy: some of the older ways of working in Python 2
- 51:10Michael Kennedy: were literally incompatible,
- 51:12Michael Kennedy: like ways of declaring exceptions,
- 51:15Michael Kennedy: handling some of the string stuff.
- 51:19Jamie Bannister: Yeah, the big one we found a lot of was testing membership in a dictionary.
- 51:24Jamie Bannister: So now you do if X in Y.
- 51:27Jamie Bannister: In the older Pythons, you would do if there was a has key function.
- 51:32Jamie Bannister: That is no longer supported in Pyth 3.
- 51:35Jamie Bannister: But we still have a lot of code, or we did have a lot of code that was using has key.
- 51:39Jamie Bannister: So we had to change all of those to using the in state in operator.
- 51:43Jamie Bannister: So that's the kind of thing that we've kind of done in this first phase.
- 51:48Jamie Bannister: What we found was we were actually 94% of our code was technically Python 3 syntactically valid.
- 51:58Jamie Bannister: We've now got up to 99.8%.
- 52:02Jamie Bannister: So that's syntactically valid.
- 52:03Jamie Bannister: It doesn't mean it's going to do the right thing when you put it in Python.
- 52:07Jamie Bannister: The classic example is division.
- 52:09Jamie Bannister: Being a game that does a lot of things with a lot of numbers,
- 52:13Jamie Bannister: we have about 6,500 lines that feature a division.
- 52:17Jamie Bannister: some of those are going to break if we just switch to Python 3 without doing anything with them
- 52:23Jamie Bannister: because the way it changes from integer to float division.
- 52:28Jamie Bannister: So that's going to be part of the next phase that we're going to get into.
- 52:31Michael Kennedy: Yeah, that was one of the main deals.
- 52:33Michael Kennedy: If you have x slash y in Python 2, that would do basically integer division, truncate it.
- 52:40Michael Kennedy: They take the floor of it more or less, right?
- 52:42Michael Kennedy: And then those just become floating point numbers, which that's terrible for like this thing equal,
- 52:46Michael Kennedy: equal that thing and all, it's-
- 52:48Michael Kennedy: And if you're doing a lot of damage calculations,
- 52:51Jamie Bannister: you've got one ship shooting another ship,
- 52:54Jamie Bannister: that can make a lot of difference
- 52:55Jamie Bannister: if suddenly your damage changes
- 52:57Jamie Bannister: and now I should have won this fight
- 52:58Jamie Bannister: and now I've lost it because the maths
- 53:00Jamie Bannister: is working out differently.
- 53:01Jamie Bannister: So that's gonna be important for us to get right.
- 53:04Michael Kennedy: Yeah, absolutely.
- 53:05Michael Kennedy: Okay, so what next, what happened after that?
- 53:08Michael Kennedy: You got it working on Python 2, but syntactically Python 3?
- 53:12Jamie Bannister: Yeah, okay, so the next phase,
- 53:13Jamie Bannister: which we're now in at the moment,
- 53:17Jamie Bannister: is we've forked the Python 2 branch into a Python 3 branch.
- 53:24Jamie Bannister: Immediately, many, many things failed.
- 53:26Jamie Bannister: All of our tests started showing up red and so on.
- 53:30Jamie Bannister: And so what we're calling that is our Python 3 unstable.
- 53:33Jamie Bannister: And so from there, we need to work through,
- 53:36Jamie Bannister: get all of our tests passing, start getting that more stable.
- 53:40Jamie Bannister: At the same time, we've got what we're calling a 2.7 unstable branch,
- 53:45Jamie Bannister: where we're kind of introducing a lot of the shims and the adapters.
- 53:49Jamie Bannister: So this is where we can have code that's going to maybe fork if 2 do this, if 3 do this.
- 53:55Jamie Bannister: The downside of that is it's going to be a lot slower.
- 53:57Jamie Bannister: So that's more of a compatibility proof versus a releasable version.
- 54:02Jamie Bannister: But that is going to be our middle ground for code that we can then say,
- 54:06Jamie Bannister: we can put this into 2.7 and make it 4.0 compatible,
- 54:10Jamie Bannister: or this is going to be breaking compatible,
- 54:11Jamie Bannister: so we need to put it on the three side.
- 54:14Jamie Bannister: And yeah, that's our next however many months of work.
- 54:18Jamie Bannister: But the other big angle of it,
- 54:20Jamie Bannister: which is really worth calling out,
- 54:22Jamie Bannister: is it's not just the runtime code.
- 54:24Jamie Bannister: We have a lot of data that is either data at rest
- 54:29Jamie Bannister: or data going across a network that is serialized Python.
- 54:33Jamie Bannister: We need to get all of that compatible.
- 54:34Jamie Bannister: So if we have, for example, Python 2 Alt-Star classes
- 54:39Jamie Bannister: and we want to serialize that to send it to your Python 3 node.
- 54:43Jamie Bannister: Well, that's not going to work because Python 3 is going to,
- 54:46Jamie Bannister: what's this?
- 54:46Jamie Bannister: I don't know what to do with it.
- 54:47Jamie Bannister: So as well as changing runtime code,
- 54:49Jamie Bannister: there's a lot of data at rest and data on the network that we also need to change.
- 54:53Michael Kennedy: Right.
- 54:53Michael Kennedy: You did mention that you're using Redis,
- 54:55Michael Kennedy: and one of the real common things to do is just to pickle the objects
- 54:59Michael Kennedy: and put them into Redis.
- 55:01Michael Kennedy: Yeah.
- 55:01Michael Kennedy: But you know what?
- 55:02Michael Kennedy: Memory shape changes from version to version.
- 55:05Jamie Bannister: I've literally been writing a blog that's going to come out
- 55:08Jamie Bannister: in the next week or two, a public blog,
- 55:11Jamie Bannister: talking about exactly that problem that we have here.
- 55:14Kristinn Þór Sigurbergsson: Is that the agent blog?
- 55:17Jamie Bannister: Yes.
- 55:17Jamie Bannister: So in EVE, we have a bunch of NPCs
- 55:23Jamie Bannister: that we call agents, nothing to do with LLM agents.
- 55:25Jamie Bannister: These are just characters and they have memory.
- 55:28Jamie Bannister: So when you talk to them,
- 55:30Jamie Bannister: it's going to remember that you talked to them.
- 55:32Jamie Bannister: And then later on, you're going to come back
- 55:33Jamie Bannister: and they'll give you a mission or to go,
- 55:35Jamie Bannister: go and fetch me this or go and kill this.
- 55:38Jamie Bannister: it saves that bit of memory in the database.
- 55:40Jamie Bannister: The way it saves it is as a serialized Python block,
- 55:44Jamie Bannister: so that when it comes back, we can kind of reload the memory
- 55:48Jamie Bannister: or reload that bit of memory from the disk.
- 55:51Jamie Bannister: We have those going back now for 20 years.
- 55:54Jamie Bannister: I think there's about 100 gigabytes of Python memory in the DB,
- 55:57Jamie Bannister: of agent memory in the DB in the form of pickled Python objects.
- 56:02Jamie Bannister: So that's a big part we need to go through.
- 56:07Jamie Bannister: Because we can't just write a database script
- 56:09Jamie Bannister: that's going to do those, right?
- 56:10Jamie Bannister: Because a SQL script isn't going to be able to
- 56:13Jamie Bannister: serialize and deserialize Python objects.
- 56:15Michael Kennedy: It has no idea, yeah.
- 56:16Michael Kennedy: Yeah.
- 56:16Michael Kennedy: Are you considering moving to something
- 56:19Michael Kennedy: that's version independent, like msgspec,
- 56:23Michael Kennedy: or Pydantic, or JSON?
- 56:26Jamie Bannister: Some of these things, what we want to do
- 56:27Jamie Bannister: is change the format to probably protobuf,
- 56:31Jamie Bannister: because we use that for a lot of our
- 56:34Jamie Bannister: kind of communications and storage as well,
- 56:37Jamie Bannister: either protobuf or flat buffer,
- 56:39Jamie Bannister: depending on the size.
- 56:41Jamie Bannister: But yeah, a big part of our internal and external APIs
- 56:45Jamie Bannister: are all built on top of protobuf.
- 56:47Jamie Bannister: They would probably use that.
- 56:48Michael Kennedy: Yeah, so that'd be really natural.
- 56:49Michael Kennedy: Maybe you could even just not even deserialize it,
- 56:51Michael Kennedy: just give me the stuff and shoot it back over the network
- 56:54Michael Kennedy: if it wants in that format anyway,
- 56:56Michael Kennedy: digitally, I guess.
- 56:57Michael Kennedy: All right, we'll get really short on time.
- 56:58Michael Kennedy: Maybe just take us through the remaining arc
- 57:01Michael Kennedy: of what you all planned out,
- 57:04Michael Kennedy: What's still in the story to be told?
- 57:07Jamie Bannister: So, yeah, so we've got the data formats that we need to change.
- 57:12Jamie Bannister: We've got the runtime code.
- 57:14Jamie Bannister: Once we've got those worked out,
- 57:16Jamie Bannister: some of the things we want to start doing are what we call a mix mode,
- 57:19Jamie Bannister: which is where we take our cluster of 200 nodes plus all of our clients,
- 57:24Jamie Bannister: all of which are 2.7 at the moment,
- 57:27Jamie Bannister: and start to be able to selectively replace one piece of those
- 57:31Jamie Bannister: with the Python 3 equivalent.
- 57:33Jamie Bannister: So rather than doing a big deployment day where we say,
- 57:36Jamie Bannister: okay, this is the moment, we want to incrementally do it,
- 57:40Jamie Bannister: kind of spread that risk and that load at the time.
- 57:42Michael Kennedy: Can you imagine the stress of just
- 57:45Jamie Bannister: Oh yeah.
- 57:45Jamie Bannister: Pushing the whole thing.
- 57:46Jamie Bannister: I've been there for those big deployments,
- 57:50Jamie Bannister: very stressful.
- 57:51Jamie Bannister: So by doing this, we can spread that risk
- 57:53Jamie Bannister: and that load over a lot of time,
- 57:55Jamie Bannister: but it also means we're developing a lot of tools
- 57:58Jamie Bannister: to support this project that aren't necessarily
- 58:01Jamie Bannister: Absolutely required, but they're going to give us a lot better abilities.
- 58:06Jamie Bannister: So like this ability to deploy a kind of a heterogeneous mix of types of builds and even mixed.
- 58:15Jamie Bannister: Do we want to do some nodes on Linux and some on Windows, for example?
- 58:19Jamie Bannister: By doing these tools, that's going to give us a lot of these options.
- 58:21Michael Kennedy: Yeah, give you more deployment options and so on, right?
- 58:24Michael Kennedy: That's pretty interesting.
- 58:25Michael Kennedy: It's an interesting consequence.
- 58:26Michael Kennedy: I didn't really consider coming along, but yeah, it makes sense.
- 58:29Michael Kennedy: All right.
- 58:29Michael Kennedy: Kristinn, what else do you want to say about this?
- 58:31Kristinn Þór Sigurbergsson: migration from maybe from the director high level yeah it's i mean i think it helps a lot that we
- 58:38Kristinn Þór Sigurbergsson: did this for frontier first because one of the problems we had when we started this is that like
- 58:42Kristinn Þór Sigurbergsson: we could start migrating the python code but none of the python code would really work without the
- 58:47Kristinn Þór Sigurbergsson: C++ modules being um importable to python as well and we could start in the python C++ modules but
- 58:55Kristinn Þór Sigurbergsson: like they wouldn't really make sense without the python glue kind of tying it together so
- 59:00Kristinn Þór Sigurbergsson: it was really convenient to do this on a project
- 59:03Kristinn Þór Sigurbergsson: like Frontier where the
- 59:05Kristinn Þór Sigurbergsson: risk of breaking
- 59:07Kristinn Þór Sigurbergsson: things is a
- 59:09Kristinn Þór Sigurbergsson: lot less and like the
- 59:10Kristinn Þór Sigurbergsson: first release we did we had hourly
- 59:13Kristinn Þór Sigurbergsson: downtime because after like
- 59:14Kristinn Þór Sigurbergsson: one and a half, two hours
- 59:16Kristinn Þór Sigurbergsson: the process would just
- 59:18Kristinn Þór Sigurbergsson: some of the process, some process somewhere
- 59:20Kristinn Þór Sigurbergsson: would just stop responding at all and we were
- 59:22Kristinn Þór Sigurbergsson: like a bit in the dark there
- 59:24Kristinn Þór Sigurbergsson: it was like a
- 59:27Kristinn Þór Sigurbergsson: very stressful time
- 59:28Kristinn Þór Sigurbergsson: and it turned out to be something really really stupid so as it obviously would have but so i think
- 59:36Kristinn Þór Sigurbergsson: i think the team city or the build system helped us a lot obviously being a game with you can
- 59:42Kristinn Þór Sigurbergsson: imagine we don't have a robust robust suite of unit tests for all of our code base like
- 59:49Kristinn Þór Sigurbergsson: i mean even automated tests wasn't really like a big when we started doing this and a lot of the
- 59:54Kristinn Þór Sigurbergsson: code was written in the first place.
- 59:56Kristinn Þór Sigurbergsson: So doing like an incremental thing was kind of hard.
- 1:00:00Kristinn Þór Sigurbergsson: But what we did do when we started,
- 1:00:03Kristinn Þór Sigurbergsson: we started just running down the build system
- 1:00:05Kristinn Þór Sigurbergsson: and just getting further and further
- 1:00:07Kristinn Þór Sigurbergsson: into like an actual build.
- 1:00:09Michael Kennedy: So, yeah.
- 1:00:10Michael Kennedy: Yeah, it's hard to test graphics and physics and stuff
- 1:00:14Michael Kennedy: through automated tests to some degree, right?
- 1:00:17Kristinn Þór Sigurbergsson: And when we started, when I, at least when I started,
- 1:00:19Kristinn Þór Sigurbergsson: I started talking to Thomas about this
- 1:00:22Kristinn Þór Sigurbergsson: when I was a technical director in Yves
- 1:00:24Kristinn Þór Sigurbergsson: and then we were thinking about it for Yves
- 1:00:26Kristinn Þór Sigurbergsson: and it just, the entire concept of doing it
- 1:00:29Kristinn Þór Sigurbergsson: just felt so, just so daunting and like big
- 1:00:33Kristinn Þór Sigurbergsson: that I like couldn't imagine how we would do it.
- 1:00:36Kristinn Þór Sigurbergsson: We did have a good plan, I think,
- 1:00:38Kristinn Þór Sigurbergsson: and that plan kind of,
- 1:00:41Kristinn Þór Sigurbergsson: we more or less did that for Frontier,
- 1:00:44Kristinn Þór Sigurbergsson: but obviously like the stakes are higher for Yves Online.
- 1:00:47Kristinn Þór Sigurbergsson: So like it's a difficult thing.
- 1:00:49Jamie Bannister: And I can do a big difference
- 1:00:51Jamie Bannister: So a critical thing for EVE is it's an online game,
- 1:00:54Jamie Bannister: so the servers need to be running every single day.
- 1:00:58Jamie Bannister: We can't afford to be taking the server down for a few hours every day.
- 1:01:05Jamie Bannister: We need to kind of keep the product up.
- 1:01:06Jamie Bannister: So that's where Frontier kind of running ahead of us was really, really helpful
- 1:01:09Jamie Bannister: because they could prove a lot of this out
- 1:01:12Jamie Bannister: before they got to the point where they needed to be online 24-7.
- 1:01:15Michael Kennedy: Yeah, it gives you a lot of flexibility to do all that testing, doesn't it?
- 1:01:20Thomas Dähling: Yeah, absolutely.
- 1:01:21Thomas Dähling: especially because the transition to Python 3 is like an all or nothing step. You can't just put
- 1:01:25Thomas Dähling: like one of your-- you can't just put the base interpreter on Python 3 and then keep all your
- 1:01:30Thomas Dähling: native extensions to Python 2, right? You need to go all the way. Otherwise, it just doesn't work.
- 1:01:36Thomas Dähling: That was actually the thing that gave-- I think that was the initial very biggest concern that we
- 1:01:40Thomas Dähling: had, like, can we actually pull this off by doing this push out all at once? And I think it was also
- 1:01:45Thomas Dähling: the main reason why we did this intermediate step of going to Python 3.8, stackless Python 3.8 first,
- 1:01:50Thomas Dähling: because then we knew, okay, we are only changing the Python major version.
- 1:01:55Thomas Dähling: We're not also changing the async library underneath the hood,
- 1:01:58Thomas Dähling: which a lot of the code still has some timing dependency somewhere, right?
- 1:02:02Thomas Dähling: And all these things.
- 1:02:04Thomas Dähling: Yeah, 100%.
- 1:02:05Michael Kennedy: Well, congratulations for Frontier and good luck on EVE Online.
- 1:02:10Michael Kennedy: It sounds, honestly, it sounds like a really exciting project.
- 1:02:13Michael Kennedy: Just a lot of fun to work on,
- 1:02:15Michael Kennedy: even if it means you can't sleep quite as well at night for a little while.
- 1:02:18Michael Kennedy: It's a little stressful.
- 1:02:19Kristinn Þór Sigurbergsson: It is exciting.
- 1:02:23Kristinn Þór Sigurbergsson: I am proud of the team for delivering it to Frontieras.
- 1:02:27Kristinn Þór Sigurbergsson: I'm sure I'll be proud of Eve when they deliver this.
- 1:02:30Kristinn Þór Sigurbergsson: What I was fascinated by was that when I started looking into it, I wanted kind of like the war
- 1:02:36Kristinn Þór Sigurbergsson: stories and I didn't really find a lot of people that had done it.
- 1:02:40Kristinn Þór Sigurbergsson: And I'm sure a lot of people have done a very painful Python 3 migration.
- 1:02:44Kristinn Þór Sigurbergsson: So my running theory was that nobody really wanted to talk about it after they had done.
- 1:02:49Kristinn Þór Sigurbergsson: some traumatic experience and just let it go.
- 1:02:54Michael Kennedy: Exactly, exactly.
- 1:02:55Michael Kennedy: All right, well, let's close out the show.
- 1:02:58Michael Kennedy: People who are maybe trying to accomplish the same thing,
- 1:03:01Michael Kennedy: they have some older code base,
- 1:03:02Michael Kennedy: they're trying to migrate even from maybe like old three
- 1:03:05Michael Kennedy: to new three, something like that.
- 1:03:07Michael Kennedy: Give them really quickly just some parting advice
- 1:03:11Michael Kennedy: and also people interested in EVE online.
- 1:03:13Michael Kennedy: Kristi, you wanna go first?
- 1:03:15Michael Kennedy: So parting advice for people that wanna do this.
- 1:03:18Kristinn Þór Sigurbergsson: One of the things that I didn't mention is that we actually used a contractor for a lot
- 1:03:23Kristinn Þór Sigurbergsson: of the stuff called Recon Digital.
- 1:03:26Kristinn Þór Sigurbergsson: They deserve a shout as well.
- 1:03:27Kristinn Þór Sigurbergsson: They did a really good job kind of migrating most of the Python code.
- 1:03:30Kristinn Þór Sigurbergsson: And one of the reasons for it was also that developing a live game, we kind of knew that
- 1:03:36Kristinn Þór Sigurbergsson: Frontier, the development team, would get immediately derailed when they had to do some
- 1:03:42Kristinn Þór Sigurbergsson: feature work and not supporting Python 3.
- 1:03:44Kristinn Þór Sigurbergsson: So that was one of the things.
- 1:03:46Kristinn Þór Sigurbergsson: So what I would probably argue there is like secure the resources, like make them untouchable
- 1:03:52Kristinn Þór Sigurbergsson: while you're doing this migration.
- 1:03:53Kristinn Þór Sigurbergsson: Because once you start, you have to finish it.
- 1:03:55Kristinn Þór Sigurbergsson: If you pause it, it's almost wasted effort.
- 1:03:58Jamie Bannister: Yeah, that's a good point.
- 1:04:00Jamie Bannister: Yeah, I was going to actually say something similar to that.
- 1:04:03Jamie Bannister: Because we've got one group working on pushing ahead with the migration, we've still got a
- 1:04:08Jamie Bannister: whole bunch of developers adding features to the game every day.
- 1:04:11Jamie Bannister: So they're adding those features against our 2.7.
- 1:04:14Jamie Bannister: And so we're putting a lot of work into trying to make sure that they have the new code they're
- 1:04:20Jamie Bannister: adding is as forward compatible as possible.
- 1:04:24Jamie Bannister: So a big thing we've rolled out this week is a new linter.
- 1:04:28Jamie Bannister: So we're getting and we're going to progressively ratchet up the strictness of it.
- 1:04:35Jamie Bannister: So those kind of tools to kind of do code quality inspection, I think, are going to be
- 1:04:39Jamie Bannister: really important for us going forward.
- 1:04:40Thomas Dähling: Yeah, 100% agree.
- 1:04:43Thomas Dähling: Yeah, very much that.
- 1:04:44Thomas Dähling: I would add the age-old advice of have really good test coverage.
- 1:04:48Thomas Dähling: It helps a lot.
- 1:04:50Thomas Dähling: But also, touching upon what Jamie just said,
- 1:04:53Thomas Dähling: if you have a product that's live and you need to migrate it,
- 1:04:56Thomas Dähling: make sure that you do this in a separate branch
- 1:04:59Thomas Dähling: but have constantly ongoing migrations from the Python 2
- 1:05:02Thomas Dähling: side to the Python 3 side so that you discover
- 1:05:04Thomas Dähling: all of these new pain points that may pop up as soon as possible.
- 1:05:08Thomas Dähling: This helped us on Frontier as well,
- 1:05:11Thomas Dähling: where sometimes things would come in that were clearly not
- 1:05:14Thomas Dähling: Python 3 compatible, and then we could fix it up right away.
- 1:05:17Thomas Dähling: And the more frequent you do these integrations,
- 1:05:19Thomas Dähling: like the less painful they are.
- 1:05:21Thomas Dähling: If you do it once a month, oh my god.
- 1:05:23Thomas Dähling: Like there was a period where we only did it
- 1:05:25Thomas Dähling: like every other week, and we would basically
- 1:05:27Thomas Dähling: spend a whole day just resolving all of the issues.
- 1:05:29Thomas Dähling: So do it frequent, do it often, keep it small.
- 1:05:32Thomas Dähling: Keep it small.
- 1:05:33Michael Kennedy: Good advice.
- 1:05:34Michael Kennedy: Do it in small, small bite-sized bits.
- 1:05:36Michael Kennedy: Yeah, absolutely.
- 1:05:36Michael Kennedy: All right, you guys, thank you for being here.
- 1:05:38Michael Kennedy: Everyone listening, check out Eve Online, eveonline.com.
- 1:05:41Michael Kennedy: Very cool game, very cool ecosystem.
- 1:05:45Michael Kennedy: Check out the video I linked that says This Is Eve.
- 1:05:47Michael Kennedy: It's got some great graphics to inspire you as well.
- 1:05:50Michael Kennedy: Bye, everyone.
- 1:05:50Michael Kennedy: Thank you.
- 1:05:51Michael Kennedy: Thank you.
- 1:05:52Michael Kennedy: Thank you.
- 1:05:53Michael Kennedy: This has been another episode of Talk Python To Me.
- 1:05:55Michael Kennedy: Thank you to our sponsors.
- 1:05:56Michael Kennedy: Be sure to check out what they're offering.
- 1:05:58Michael Kennedy: It really helps support the show.
- 1:06:00Michael Kennedy: This episode is sponsored by Sentry's Seer.
- 1:06:03Michael Kennedy: If you're tired of debugging in the dark, give Seer a try.
- 1:06:06Michael Kennedy: There are plenty of AI tools that help you write code,
- 1:06:08Michael Kennedy: but Sentry's Seer is built to help you fix it when it breaks.
- 1:06:12Michael Kennedy: Visit talkpython.fm/century and use the code talkpython26, all one word, no spaces,
- 1:06:18Michael Kennedy: for $100 in Century credits.
- 1:06:20Michael Kennedy: And it's also brought to you by Talk Python Courses.
- 1:06:24Michael Kennedy: Course completion certificates are now live.
- 1:06:26Michael Kennedy: If you finished a course, there's a certificate waiting for you on your account page right now.
- 1:06:31Michael Kennedy: Download it as a PDF or add it to your LinkedIn profile with one click under licenses and
- 1:06:36Michael Kennedy: certifications.
- 1:06:37Michael Kennedy: Same section as your formal degrees.
- 1:06:40Michael Kennedy: Visit training.Talk Python.fm slash account to see what you've already earned.
- 1:06:44Michael Kennedy: If you or your team needs to learn Python, we have over 270 hours of beginner and advanced
- 1:06:50Michael Kennedy: courses on topics ranging from complete beginners to async code, Flask, Django, HTMX, and even
- 1:06:56Michael Kennedy: LLMs.
- 1:06:57Michael Kennedy: Best of all, there's no subscription in sight.
- 1:06:59Michael Kennedy: Browse the catalog at talkpython.fm.
- 1:07:02Michael Kennedy: And if you're not already subscribed to the show on your favorite podcast player, what
- 1:07:06Michael Kennedy: are you waiting for?
- 1:07:07Michael Kennedy: Just search for Python in your podcast player.
- 1:07:09Michael Kennedy: we should be right at the top.
- 1:07:10Michael Kennedy: If you enjoyed that geeky rap song,
- 1:07:12Michael Kennedy: you can download the full track.
- 1:07:13Michael Kennedy: The link is actually in your podcast blur show notes.
- 1:07:16Michael Kennedy: This is your host, Michael Kennedy.
- 1:07:18Michael Kennedy: Thank you so much for listening.
- 1:07:19Michael Kennedy: I really appreciate it.
- 1:07:20Michael Kennedy: I'll see you next time.
- 1:07:31I thought of me.
- 1:07:34Can we break the roll?
- 1:07:37Upgrade the code.
- 1:07:39No fear of getting old.
- 1:07:42We tapped into that modern vibe overcame each storm.
- 1:07:46Talk Python and me, async is the norm.