Latest / Talk Python To Me / #213: WebAssembly and CPython
Transcript
- 0:00On the last episode, we explored Pyodide, a project whose goal is to bring the CPython
- 0:04scientific stack to the browser via WebAssembly. This time, I meet up with Brett Cannon,
- 0:09one of the more well-known and prolific core developers, to explore what role WebAssembly
- 0:14has for CPython in general and what opportunities might exist for Python and WebAssembly at the
- 0:19moment. This is Talk Python To Me, episode 213, recorded on-site at PyCon on May 3rd, 2019.
- 0:26Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the
- 0:45ecosystem, and the personalities. This is your host, Michael Kennedy. Follow me on Twitter,
- 0:49where I'm @mkennedy. Keep up with the show and listen to past episodes at talkpython.fm,
- 0:54and follow the show on Twitter via at Talk Python. This episode is brought to you by
- 0:58Microsoft. Be sure to check out what they're offering during their segments.
- 1:02It really helps support the show. Hey, folks. Thanks for listening in today.
- 1:06Just a quick heads up on the audio on this one. We recorded it live on the Expo floor hall at PyCon
- 1:11in Cleveland this year. I think the audio is actually amazing and came out great, but you will hear our
- 1:16voices straining a bit to talk over the crowd, and my voice in particular has a little road wear from
- 1:21all that conferencing. So sorry for my fading voice, but you'll enjoy the conversation with
- 1:26Brett for sure. Brett, welcome back to Talk Python.
- 1:30Thank you, Michael. Glad to be here.
- 1:31It's great to have you here. It's been too long. I mean, what has it been like? Three episodes?
- 1:35Has it even been that many? I don't know if it's even gone that far.
- 1:38I know. I don't think it has. But we're back together because we had a great show talking about
- 1:44the steering council, the future of Python governance, and all that kind of stuff. And then we hung up.
- 1:49Well, we stopped the recording. And I just threw this offhand comment about, oh, and what do you
- 1:54think about WebAssembly? Yeah. I mean, this happens every time I come on your show. We end up chatting
- 1:59after the hangup. And then it comes up, oh, we should have brought that up while we actually had
- 2:03the microphones recording. Yeah. And so we're going to be here at PyCon. We're recording live from the
- 2:08PyCon Expo Hall Center here. And that's what the background noise is everyone hears. So we're
- 2:14going to talk a little bit about WebAssembly. And I guess maybe we should start with what is this
- 2:19WebAssembly? Why is it interesting? To me, it seems like WebAssembly is starting to gain some traction.
- 2:25Yeah. So I'm going to preface all of this as I'm a fan and keep up on this out of interest. I actually
- 2:32almost made something similar to this, my PhD thesis, except my PhD supervisor, Eric Wellstetter,
- 2:38was smart enough to say, no, that's a bit ambitious for one PhD because that's going to take three or
- 2:44four other PhD students. And he didn't want to dedicate that much time of his life to the topic.
- 2:48I'll be your advisor, but come on, not for life.
- 2:51Exactly. So I'm just going to fully admit, I could quite possibly say something wrong about this.
- 2:55But basically to explain what WebAssembly is, is the browser vendors all got together realizing that
- 3:00while JavaScript is nice, it's not the end of the world and the best answer necessary for everyone.
- 3:05and they want a more lower level kind of target for languages in browser. And so they basically
- 3:11designed an assembly language specifically for the web. And the key thing here is you can think of it as
- 3:18basically like x86 or ARM or RISC or any of those other chips that have the low level assembly commands
- 3:25that the CPU actually executes. But the key thing here is it was designed to be performant,
- 3:31but also verifiable to be safe because as we know on the web, you can't trust everything that
- 3:36could send to your browser. So they very much made sure it was fast and verifiable, which is
- 3:39and cross-platform, which is also very cool.
- 3:41Yeah, I think that's the first danger when you think, all right, we have this binary thing and
- 3:47we're going to download it and execute it in your browser. They're like, oh my God, is this ActiveX?
- 3:52Is this calm? Is this the thing that's going to hack all the machines?
- 3:56We all know you do not download a random binary off the internet and run it and expect not to get
- 4:03some nasty malware installed on your machine. And the same goes for WebAssembly. You don't want
- 4:07a buffer overflow in your browser, right? That's hard enough just for the browser vendors to do with
- 4:13the render. The last thing you want is the JavaScript or anything else you download to just make
- 4:16a button flash to actually cause a buffer overflow and suddenly take over your machine.
- 4:22Right. So WebAssembly is kind of this assembly language. It's faster, it's binary, but it's run
- 4:29within the same sandbox as JavaScript.
- 4:31Yes, from my understanding.
- 4:32More or less.
- 4:33Yeah.
- 4:33But there's some really interesting things. A lot of things that compile to see can be made to compile
- 4:38to WebAssembly.
- 4:39Yeah. And that was actually the original way they tested this idea was there was a project called
- 4:43asim.js and they created a tool for LLVM called mscripten. And what they did was they just came
- 4:50up with a subset of JavaScript that you could actually compile C down to. And it was basically
- 4:55typed arrays to simulate a stack in memory and a bunch of other stuff. And they basically made it
- 5:02work. And they were able to show that if you added certain markers to tell the JavaScript's
- 5:07execution engines that, hey, you know what? This is actually asim.js, not normal JavaScript.
- 5:11They could actually get really good performance out of it. And that was enough of a motivation
- 5:14for them to go like, okay, let's make this a real thing. Let's not do kind of a weird little
- 5:18subset of JavaScript. Let's like do a proper assembly language that will still get us the
- 5:22exact same compile target and safety with even better performance.
- 5:27Right. Let's not try to treat JavaScript truly as assembly language, but make something that
- 5:31executes like binary bits, right?
- 5:33Exactly. Everyone's already compiled to JavaScript and knows it's possible, but let's actually take
- 5:37it to the next level and actually compile to a reasonable target.
- 5:40That's awesome. Did you happen to catch the birth and death of JavaScript by Gary Barnhart?
- 5:45No, I didn't.
- 5:46Oh my gosh. So this is such an insightful thing. So people out there listening, they're interested.
- 5:50They should definitely Google that. Maybe I'll put it in the show notes.
- 5:53It's a talk he did at PyCon, I think 2015. And it imagines a future where JavaScript takes over the
- 6:01world, talks about the future, like 2030, going down this Asm.js world and things being compiled
- 6:07deeper and deeper and deeper in the world, just being all JavaScript. And it's both super insightful
- 6:11because it talks about these things and predicts stuff. He's got examples of like having Quake,
- 6:17which is written in C run in Chrome, but then recompile Chrome to run in Firefox. So like
- 6:23Firefox is running Chrome, Chrome is running Quake, all like nested together in this, like it's
- 6:28turtles all the way down with JavaScript.
- 6:30Well, actually, I don't know if you caught Dan Callahan's keynote at PyCon US in 2018,
- 6:34but he did something similar where he showed a VR of a computer in a basement running similar
- 6:41Windows 3.1 running a browser in it. So you can go very deep with this stuff.
- 6:46Right. And so many of those were these sort of these proof of concepts into some JavaScript
- 6:51world. But WebAssembly is like, well, that's cool. Let's make that official.
- 6:54Yes.
- 6:54That's the stage for what the heck is WebAssembly. Now the big question is, CPython, right in its name,
- 7:01we know it's written in C. What are the possibilities for it being interacting with,
- 7:08doing interesting things with WebAssembly?
- 7:10There's basically two current projects that I'm aware of. So one is Pyodide,
- 7:15which I believe you'll have an episode out on this, if not already.
- 7:18Due to time shifting. It's not out yet, but it's out before this. So people will have heard of that.
- 7:23So go back and listen to that episode. But basically, someone at Mozilla has taken CPython
- 7:27and the scientific Python stack, so SciPy, NumPy, Pandas, all those.
- 7:32Which are heavily C underneath, right?
- 7:34Oh, and more, right? Because this also includes Fortran stuff.
- 7:37Like, this is deep level stuff, right?
- 7:39SciPy is crazy to compile.
- 7:41But what they did was, is they actually compiled that whole stack down to WebAssembly.
- 7:46And they got it running.
- 7:47And if I remember correctly from the blog post, they said it was three or four to 12 times slower,
- 7:54which is not great.
- 7:56I mean, compared to some things, but it was still actually fairly performant to the point that they actually,
- 8:01Mozilla has a demo, I believe, of Jupyter Notebook style workflow for data science exploration that actually works reasonably well.
- 8:09Yeah.
- 8:10And what's cool about that project is they've actually compiled the libraries that you need.
- 8:14So you can import NumPy, you can import Pandas in the browser.
- 8:19It'll go get the WebAssembly equivalent, suck that down on demand, by the way, which is cool.
- 8:24It doesn't even suck it all down in front.
- 8:26It's like, wait till you hit the import statement.
- 8:28And it sucks it down and it runs.
- 8:30So that's pretty cool.
- 8:31But to me, what that feels like, and not to take anything away from it, it's super cool,
- 8:34is that feels like, let's take the compilers we have and point them at the version we have
- 8:40and make them run in this place best we can.
- 8:43But it's not saying, what if we imagined what a CPython-developed for WebAssembly could be?
- 8:51Yes.
- 8:52It's very much a, let's take what we have already and see if we can make it work.
- 8:56Not a, let's make this a target of something.
- 8:59And what does that look like?
- 9:01That's a good question.
- 9:02That is a good question.
- 9:03So I think it's, I mean, it's super noble.
- 9:04It's awesome that they've done it.
- 9:06And like having Quake run in the browser, it proves it could be done.
- 9:09Yes.
- 9:09But size, size matters sometimes on the web.
- 9:12Right.
- 9:12And they fully admit in the PyoDiode project, I believe the download for the interpreter is
- 9:1740 megs, roughly.
- 9:19So it's not small.
- 9:21We might all be living with one multi-meg pages now, unfortunately.
- 9:26But they're not 40 megs.
- 9:28No one's that crazy.
- 9:29So there's definitely issues.
- 9:31Now, I'm also going to say that not all use cases for WebAssembly necessarily require a
- 9:36smaller download size.
- 9:36So for instance, if we were doing an Electron app.
- 9:39Like Visual Studio Code.
- 9:40Visual Studio Code.
- 9:41Or something else.
- 9:42Slack or any other Electron app I can see out on the shore floor from someone sponsoring PyCon.
- 9:47They don't have that download size restriction.
- 9:50They could totally just embed a 40 meg version and be done with it.
- 9:53Right.
- 9:53The Electron JS apps, for people who don't know, already embed the binaries of Chrome plus the
- 9:59binaries of Node.
- 10:00So throw in a few more megabytes of WebAssembly.
- 10:03Who cares, right?
- 10:03Whatever.
- 10:04But obviously, if we wanted this to be on the web or in more size restricted situations,
- 10:10like we're talking more embedded space or you're embedding it in a smaller, more native desktop
- 10:16app, like think Blender or something.
- 10:19That's where you start to care about the size.
- 10:20So directly compiling and see Python.
- 10:22While great is a great solution for today, it might not be if we want to potentially expand
- 10:29the possibilities in the future.
- 10:30Right.
- 10:31And Python is doing awesome.
- 10:32I mean, we've seen the stack overflow, the incredible growth of Python article.
- 10:36Yep.
- 10:37I mean, look around PyCon this year.
- 10:39Like to me, when I walked in here, I felt like, wow, Python's grown up a little bit.
- 10:43Like these booths are a little more corporate, a little more pro.
- 10:46They're like taller.
- 10:46I don't know what that means, but they're like twice as tall as last year.
- 10:49Yeah.
- 10:49I mean, I was kind of shocked when I came in here and I saw stuff hanging from the ceiling.
- 10:53I saw people with walls put up and these aren't just like custom for the booth walls.
- 10:59I mean, this is really slick stuff coming in here.
- 11:02So yeah, Python's definitely come a long way since I started using it.
- 11:05Yeah.
- 11:05And so my point is, that's amazing.
- 11:07But how far would it go if it could be in mobile, if it could be on the front end of web,
- 11:14if it could be the foundation of these Electron JSA?
- 11:17I mean, there's like lots of growth.
- 11:19There's headroom here for more.
- 11:20Yeah.
- 11:21And if you get a chance, watch Russell Keith-Magee's keynote from PyCon US 2019.
- 11:28It was on Friday.
- 11:29He did a really good job of outlining why this is a potentially great growth opportunity for Python.
- 11:36We're in a lot of spaces, right?
- 11:38As I said, we're embedded.
- 11:39We do scripting.
- 11:41We do some desktop apps.
- 11:43We do web.
- 11:44We do data science.
- 11:46But for instance, we haven't really tapped into the mobile space or the web space front end.
- 11:51Obviously, we got backhand covered.
- 11:53So there's definitely opportunity for us to grow the community and help bring more people in.
- 11:57Because I've been told we have one of the best communities in the world.
- 12:00So I'd like to honestly do this just so we can get more people actually in and participating and off of communities that they might not be happy with.
- 12:07Yeah.
- 12:07And to me, it feels like WebAssembly kind of holds the key to unlocking some of those possibilities.
- 12:12Yeah.
- 12:13I think it's a definite possibility.
- 12:15I don't think we can necessarily claim it's definitely a panacea or that it's an obvious black swan event.
- 12:20Another reference to Russell's keynote.
- 12:22But I think there's definitely enough there to make it a very interesting possibility worth looking into.
- 12:27Okay.
- 12:28So I guess let's think about you are on the core dev team.
- 12:32You are also on the steering council.
- 12:34You obviously don't make all the decisions, but you're in a place to have some internal insights.
- 12:38What would need to happen?
- 12:39Or is there any possibility of CPython having an official WebAssembly story?
- 12:46I don't know.
- 12:48So in any official capacity, I have to say, I don't know.
- 12:52Personally, I would love to see it.
- 12:54One thing I can say is we've had some very initial discussions on the steering council about kind of coming up with a vision document of what would it take to make Python two times faster?
- 13:05Right.
- 13:05And kind of like outlining like what do we view as necessary?
- 13:09What do we view as acceptable?
- 13:10What do we view as total fertile ground?
- 13:13And we don't care what you do.
- 13:15And we've just started talking about this.
- 13:17So there's nothing specific there.
- 13:19But I mean, you could theoretically think of some company going like, oh, okay, I've read this document.
- 13:24I see kind of where you're going.
- 13:25We're going to take a stab at it and we're going to try to make a WebAssembly Python.
- 13:29Now, who knows what that means?
- 13:31That could either mean let's see what happens if we didn't do see Python to WebAssembly, but we still had an interpreter that was more restricted to make the size smaller.
- 13:39Or someone could even do a straight Python to WebAssembly compilation target.
- 13:43Now, I don't know what we'd have to give up for that.
- 13:45For instance, for my reading of the spec, WebAssembly doesn't provide a way to directly execute on the fly compiled WebAssembly like actual assembly does.
- 13:55Right.
- 13:55That's how JITs work.
- 13:56They actually write to a memory point and you basically treat it like a function pointer in C and that just magically gets executed.
- 14:02There is no equivalent from what I can tell in WebAssembly.
- 14:05So that would potentially make eval and exec a problem if we were trying to compile Python straight to WebAssembly.
- 14:11But I think there's opportunity there to explore all this stuff and see where it goes because there's general excitement from what I've been seeing and hearing from people about this idea, not just for Python, but the overall tech community as a really clear, cool opportunity.
- 14:26I mean, Cloudflare is doing JavaScript on the edge computing, but it's JavaScript, but you can compile the WebAssembly.
- 14:32And then recently Fastly came out and just said, we're doing straight WebAssembly.
- 14:36That's all we're doing for their edge computing.
- 14:38There just seems to be a real kind of conglomeration of people, at least in the web space around this as a thing.
- 14:44And obviously, we all know the web's got a lot of money and a lot of push.
- 14:47So I think it's worth at least considering and taking a look.
- 14:50Yeah, that's a super interesting point.
- 14:51There's definitely a huge, huge number of users there.
- 14:54I mean, Flask, we consider Flask to be like one of the more popular things, right?
- 14:58It's got 41,000 GitHub stars.
- 15:00Just Vue.js has 140,000.
- 15:04I mean, like the scale is massive, right?
- 15:06So the days are early, I think.
- 15:08So if we could tap into the whole WebAssembly space at the early days, you know, how much could we make Python a first class citizen there?
- 15:17Yeah, I mean, and that's really what I would love someone who has the time and resources to actually look into, right?
- 15:24Like really doing the research, finding out how possible it is.
- 15:27What would we gain?
- 15:28What could we make it as fast to see Python if it is slower or faster by how much?
- 15:34It's something I would just love for someone to just go out and try.
- 15:39Yeah, it's super interesting.
- 15:40I mean, we talked about Pyodide, and that's really great.
- 15:42But that's super focused on getting the scientific stack on the client side in the browser.
- 15:47Yeah, and I believe Mozilla even admits that it's fully a proof of concept.
- 15:50It's to show that this is possible.
- 15:52I don't know how far they plan to take it.
- 15:54So I don't know where they could even push it.
- 15:56But I mean, it'd be great to see.
- 15:57Yeah, another one that's really interesting that's not anything to do with Python but comes from your home base in the Microsoft world is Blazor.
- 16:05Are you familiar with Blazor?
- 16:06A little bit.
- 16:07Yeah, so Blazor is take the .NET CLR, which is also JIT-based, and take C# and turn that into a front-end single-page app framework through WebAssembly.
- 16:18So if they were able to get the CLR and all the UI bits down, it seems like the CLR and CPython are sort of comparable in size and complexity, ignoring the libraries.
- 16:29I think it definitely shows that with the resourcing, it's definitely possible to use WebAssembly as a target, even as it is, which the WebAssembly team and the website and everything are very clear that this is very much a minimum viable product.
- 16:43And they are still very much working towards it.
- 16:45Like, they just announced something called WASI, W-A-S-I, which adds a system interface.
- 16:50That's what the S-I stands for, to WebAssembly, because they realize that with a portable target, you can now actually start using this for more desktop application and execution, right?
- 16:58So basically, if you start to treat WebAssembly as kind of the world's common interpreter layer, and you start targeting that, it starts to really open up.
- 17:06And in order to make that work, you really have to have that layer of basically POSIX on Unix would cover.
- 17:11And so they're very much working towards that.
- 17:14It's still early days, but once again, there's definite possibility there.
- 17:17Absolutely.
- 17:18So let's bring it back to your original statement.
- 17:19What if you could make CPython two times, well, Python two times faster?
- 17:24What are some of the ideas you have there?
- 17:25For Python, it's in general or specifically for WebAssembly?
- 17:28Let's start with in general.
- 17:29I think the key thing there is going to be really outline exactly what is like things we just cannot give up, right?
- 17:37Like compatibility, at what level?
- 17:41Where would we go?
- 17:42Like, okay, if we gave this up, the community would just never even contemplate it.
- 17:47It just would break way too much code, whatever.
- 17:48It just wouldn't work.
- 17:49Right.
- 17:49If C extensions went away, that's probably a bridge too far.
- 17:52Exactly.
- 17:52Right.
- 17:53Like, what would we be okay with transitioning, right?
- 17:57Like we've done two to three and we know how difficult that was, but we also know why that was difficult.
- 18:01If we had ways to automate bridging and such so that that pain wasn't there, that's a possibility.
- 18:08I think it's PEP554 that is multiple sub-interpreters.
- 18:11Yeah.
- 18:11Eric Snow's PEP.
- 18:12Yep.
- 18:12Would it be possible to maybe use that as a compatibility layer these days?
- 18:17Right?
- 18:18Like you take the stuff that runs over here and you got to do an eval.
- 18:20So we're going to do the eval and another.
- 18:22That's an interesting idea.
- 18:23I honestly have not thought about it.
- 18:24That's all I know.
- 18:25I haven't really thought much about it either.
- 18:26But it seems like you might be able to have like a compatible older CPython that handles the cases that's not as fast.
- 18:33And then like a proper, maybe like a jitting.
- 18:36That comes tricky because all that's running in the same process.
- 18:39So suddenly you're getting a multiprocessing scenario and that always has its own kind of worms that if you're not really aware of how it's working and what the edge cases are, it can really show my problem.
- 18:49So I don't know.
- 18:50Maybe it's not worth pursuing.
- 18:51Yeah, probably not.
- 18:52Yeah.
- 18:52I know a lot of people want that idea of when we're doing the two to three bridging and no one ever really got to work properly.
- 18:58So I'm going to assume in any other scenario, it just ain't going to work.
- 19:00It just wasn't worth the trouble.
- 19:01Okay.
- 19:02Interesting.
- 19:03I honestly don't know.
- 19:04Like I know there's Rust Python and people are working on that.
- 19:06I've always been curious to see what Rust could give us in terms of safety and performance.
- 19:10I also know though, some people don't want to go that route because at least in CPython's case, Rust is not available on every platform where there's a C compiler.
- 19:18And so there and the embedding story is there, but it's not necessarily quite as straightforward if you don't put in the work to do that.
- 19:25I mean, you can give FFIs through C through Rust, but that's an extra layer of work.
- 19:30Right.
- 19:30Maybe slower too with another layer.
- 19:32So I think the key thing here is also don't focus too much on CPython itself.
- 19:36I mean, if we're talking website, we're talking basically a whole new thing.
- 19:40So I totally up and just even first proof of concept for whatever.
- 19:43I would want people to try anything and don't tie yourself to CPython as necessarily the starting point.
- 19:48Tie yourself to CPython as kind of the way to test your compatibility.
- 19:52Although I would still say, don't tie yourself to every edge case and every little potential bug.
- 19:58Because Guido has even said before he retired that really small edge casey parts of the language that no one really uses would be up for consideration from being deprecated and removed from language if it made a massive performance difference.
- 20:11So people have also never done that exploration.
- 20:13So we even have that potential, regardless of WebAssembly, of ways to potentially speed up Python.
- 20:20This portion of Talk Python To Me is brought to you by Microsoft.
- 20:23For ultimate developer productivity in the cloud, use Azure extensions for Visual Studio Code.
- 20:28You can deploy and debug your serverless Python apps directly from your editor.
- 20:32On Azure, you can run your Python apps as serverless code on Linux web apps and functions or on top of managed Kubernetes and easily connect data from database services, including Postgres and MySQL.
- 20:44You can also use Azure DevOps to create cross-platform builds of your Python packages with hosted macOS, Linux, and Windows build machines.
- 20:52And publish them to Azure Artifacts for your own hosted PyPI feed.
- 20:56Azure DevOps is free for open source projects and many are using it already.
- 21:00Get started for free at talkpython.fm/Microsoft.
- 21:04We've had a lot of progress, right?
- 21:07Yes.
- 21:08From 3.5, maybe 3.4, let's say 3.4 to 3.7.
- 21:11Yes.
- 21:12The stuff that Victor Stenner was doing and other people, you would hear, oh, dictionaries got this much faster.
- 21:18Function calls got 20% faster, bound methods or whatever, right?
- 21:21Year over year, that stuff's compounding as well, right?
- 21:24And I don't think we've even necessarily hit all the low-hanging fruit, but I do believe that we're reaching a point where I think on the team,
- 21:30we're realizing that our goal from years back of keeping the interpreter simple, specifically to make it easier to contribute to,
- 21:40by making it easier to comprehend how it works.
- 21:42Basically, Python's so big, we can't really do that anymore.
- 21:45I think we've hit the point now where we don't worry about whether a single individual can fully comprehend how the entire interpreter works,
- 21:52because we realize that so many people rely on it.
- 21:54We need to keep it maintainable, obviously, but we don't need to keep it simple.
- 21:59And that's a very key distinction.
- 22:01And so I think there's opportunity there, once again, if someone had the time and resources to really dig into that
- 22:06and see what would be possible to actually speed up CPython itself and obviously whatever crazy thing someone might do.
- 22:13What's the possibility, likelihood of some kind of JIT making it a point?
- 22:18I know you worked on Pigeon.
- 22:19Yep.
- 22:19Which maybe, I lived in a different country when we last spoke about Pigeon.
- 22:24Maybe tell people quickly about what that is.
- 22:25Pigeon, for those of you who don't know, and it's spelled P-Y-J-I-O-N,
- 22:29was a project with Dino Veland, who was a co-worker at the time, now at Facebook, and myself worked on back in 2016, I believe?
- 22:38Yeah, I think it was 2016, yeah.
- 22:39Where we looked at what it would take to jet CPython executable bytecode using .NET.
- 22:46And we got the project to the point where we developed a PEP for adding a hook into CPython to allow you to override the eval loop,
- 22:55the actual function that you pass commands through.
- 22:58Which is like 3,000 lines switch.
- 23:00It's an impressive thing.
- 23:01It's a very large thing.
- 23:03Eval.c, yeah, that's it.
- 23:04Eval.c has got a, it's quite the impressive function.
- 23:07But basically, we tried a way to hook into it such that if we took some Python bytecode and compiled it down into .NET IR,
- 23:14which is stack-based as well, which made the translation, I'm not going to say straightforward, but at least possible,
- 23:19we did it and we managed to hit the Python benchmark suite pretty much even.
- 23:24Unfortunately, once, after we did our PyCon talk, work got in the way and we just weren't able to pursue it any farther.
- 23:31Yeah, I remember you said it got even and that's pretty good.
- 23:33How much more do you think it could have gotten better?
- 23:35A lot?
- 23:36Or is it kind of like...
- 23:37That's one of those things where with JITs, you just never know.
- 23:40Like if you talk to the PyPy folks, they'll fully admit, I'm sure, that PyPy is excellent and can go really fast if it works for you.
- 23:46But for some people, they need very deterministic performance because JITs always work on hot code and such.
- 23:51And it can be very variant based on the current workload.
- 23:53Right.
- 23:53With the reference counting in CPython, it's pretty predictable.
- 23:57Yeah, exactly. So I don't know what PyJint could have been had we put more time into it because JITs, by definition, are very load dependent.
- 24:06And so there's just no way to even speculate.
- 24:08How much does a GC and generational garbage collectors are required around JITs?
- 24:14I mean, most of that unpredictability has more to do with the garbage collection side of things than they do with the JIT.
- 24:20Because you could pre-JIT stuff and things like that if you had to.
- 24:24I don't think it necessarily really ties into it specifically.
- 24:26So for those of you who don't know, CPython uses reference counting to do its memory management, which basically means we keep track of the number of places an object is referred to in your Python code.
- 24:35So every time you do an assignment, the count goes up by one.
- 24:38And every time a variable goes away, goes down by one.
- 24:42And basically when an object hits zero, we garbage collect it.
- 24:44Yeah.
- 24:44It's very straightforward.
- 24:45But the nice thing about it is it's very deterministic, right?
- 24:49So if you define your dunder del on an object, you can actually see that execute fairly quickly after you actually delete the object.
- 24:56With garbage collection, you don't get that.
- 24:57So really the bigger problem with that has always been the C API.
- 25:00Because it's very directly exposed for C extensions to be able to properly manage the memory that they need for any objects they create.
- 25:07And that has always been a stumbling block for things like the GIL because in order to control that kind of stuff, there's overhead.
- 25:15And the real key thing is the global interpreter lock exists specifically for reference counting because that's how we make sure you don't accidentally stomp on each other when like two threads try to both increment or decrement.
- 25:27And you don't want to lose all of those because if you get the count wrong, that's a memory and that's not a good time.
- 25:32It's either a crash or it's a memory like depending on which way the race condition runs.
- 25:35Yeah, whichever badness you want, choose one.
- 25:37Yeah, okay.
- 25:38You just don't get to choose though because one of the threads will choose for you, which is the problem.
- 25:41So I honestly don't know from a JIT perspective if it really specifically matters depending on how you decide to handle it.
- 25:48But getting off of a rust kind of opens things up because it gets rid of that single point of contention with the GIL.
- 25:53Right, okay.
- 25:54That's interesting.
- 25:56I think the GIL gets more negativity than it deserves, honestly.
- 25:59It's one of those things where if you're IO bound, it doesn't matter.
- 26:02And if you're CPU bound, it can, but only if your load is that high that this is really a critical thing.
- 26:08Right.
- 26:08So there may be some C library that's already doing parallelism for you or...
- 26:12Yeah.
- 26:12And if you look at Eric Snow's work with subinterpreters, there's the potential there that if Eric can get it all working to have per interpreter gills,
- 26:23which would then give you per thread interpreters, which would then let you have GIL release because basically each interpreter in its own thread running on our gill, which should still have its contention.
- 26:34But it's equivalent to basically running completely free threads, which would help a lot.
- 26:40And it doesn't require us to completely rewrite every extension.
- 26:43And we don't have to try to detangle all this world.
- 26:47And we get to keep the very straightforward and determinist reference counting.
- 26:50That's all really interesting.
- 26:51And I guess sort of a roundabout.
- 26:53The reason I was asking about a lot of these things is if your goal is to make Python run twice as fast, there's all these options, but there's all these limitations because of the history of the implementation of C for Python and the C, you know, Val.c and all that.
- 27:08What if it was written in something like Rust or something else?
- 27:12I guess let me also preface that with like Rust is all about compiling to WebAssembly.
- 27:17So could you get your one benefit and then unlock this other WebAssembly world at the same time?
- 27:22I think it's definitely possible from my understanding.
- 27:25I don't know what kind of restrictions your Rust code has to be placed on it in order to compile down to WebAssembly.
- 27:31But I think it's definitely there.
- 27:32For some people, CPython is just a Python interpreter.
- 27:36And it's not a critical aspect that it has this extensive C API that allows you to do these C extensions.
- 27:42And for others, it is.
- 27:43And that also varies based on people who embed CPython and a C or C++ application and those who don't.
- 27:49Like design apps that have an automation or whatever.
- 27:52Yeah, like Blender is a perfect example.
- 27:54Blur Maya, a lot of the 3D, the special effects tooling in movies often embed CPython specifically because they want Python embedded as a scripting tool.
- 28:03So for those people, that would matter if the hypothetical Rust implementation didn't provide those kind of hooks.
- 28:10But for others, it wouldn't.
- 28:12This is one of those things where for me personally, I've always viewed it as Python the language as implemented by CPython the interpreter.
- 28:21And so I view the key component as the language.
- 28:24And we just happen to have this CPython implementation, which, by the way, is really great for embedding as a thing.
- 28:31But I don't think that necessarily means that CPython, in my personal view, as like special or in some way untouchable or unreplaceable in terms of at least having other options.
- 28:42I mean, PyPy exists and it does have users, right?
- 28:45There's a reason it's there.
- 28:46It doesn't work for everybody.
- 28:47And that's fine.
- 28:48The key question is, is does the community and do other people who have the time and resources to put in the work to look at making Python faster, whether it's through WebAssembly or through Rust or through helping make CPython go faster, do they have the stomach and the, honestly, gumption to take some of these paths and try to make it happen?
- 29:06That I don't know.
- 29:07And honestly, I can't answer that until the community as a whole kind of comes forward and says, we're going to give this a shot and we see what happens.
- 29:13Yeah, I mean, that's a really big question.
- 29:15We just kind of put to bed this whole Python 2, Python 3 saga.
- 29:20And I know it's a totally different story, but it's kind of just churn and fatigue for some folks.
- 29:26And so, you know, how much do you want to like rattle that cage?
- 29:30Maybe just let things settle for a while.
- 29:32I don't know.
- 29:32I know for a long time, a lot of people have hoped that once Python 2 was laid to rest, that the mental, honestly, the cumulative mental capacity of the community would suddenly be freed up because suddenly all this Python 2 stuff would kind of just go away.
- 29:48The weight is off us.
- 29:49Yeah, the bite of our collective brain that had to still deal with Python 2 would now be free to just try to make Python 3, which then honestly is just going to be Python, just make Python faster and better.
- 30:00And I would like to think and hope that that's going to happen, but I honestly don't know.
- 30:04Once again, that's going to come down to the community coming forward and saying, you know what?
- 30:08We want to help make this happen and we're going to work with everyone as necessary to make that a thing.
- 30:13Yeah, well, maybe we're entering a period of where lots of flowers will bloom.
- 30:16Some of them will wither.
- 30:18Some of them will grow into trees or whatever.
- 30:20But, you know, for example, taking CPython itself and just compiling it to WebAssembly and getting it to run, say, in like an Electron JS app, like that would be a huge win for deployment, I think, because all you deploy is this little WebAssembly binary and it just loads up in the Chrome.
- 30:36And maybe that unlocks one area of growth.
- 30:38Maybe Pyodide does something for the data science and there's a bunch of different areas.
- 30:43And eventually we find what's working, find ways to adapt them.
- 30:47I don't know.
- 30:47What do you think?
- 30:47I'm honestly, one thing I'm curious about with WebAssembly is whether the phone OSs are going to start potentially adopting it as a target as well, right?
- 30:55Like I could imagine a world where Android and iOS suddenly started allowing WebAssembly as a compiled target versus specifically Swift and the raw C stuff on iOS.
- 31:06Or the equivalent on Android or its art on JIT.
- 31:09And I don't know if WebAssembly will catch that much.
- 31:13But if it does, that really opens it even to an even greater extent in terms of the usefulness and potential importance of WebAssembly.
- 31:19Because if you get that, then suddenly you have the web and you have mobile.
- 31:23And with Wazoo, you get desktop.
- 31:25That's a crazy amount of the user base in terms of just flat out computer users.
- 31:31It's just crazy.
- 31:32Yeah.
- 31:32I mean, the three places I see missing the huge growth opportunities are desktop, mobile, and front end and web browsers.
- 31:38Yeah.
- 31:38That kind of hits them all.
- 31:39Yeah.
- 31:39Yeah.
- 31:40And once again, I'm just going to keep harping on this.
- 31:43It's really going to come down to the community coming forward.
- 31:45And I do want to say I personally really hope that whatever the community does do, we're able to work together as a community.
- 31:52Like, I don't want to see fragmentation of, oh, I've done this thing, this version of Python that's slightly different.
- 31:58And, oh, this person over here has done a version of Python that's slightly different.
- 32:01And we haven't talked as a community about what we care about.
- 32:03And try to also pull everyone together to kind of work towards a common goal versus, oh, I think we should do it this way.
- 32:09No, I think we should do it that way.
- 32:10Okay.
- 32:10Well, I'll re-implement Python with a garbage collector over here.
- 32:13And, oh, here.
- 32:14And I'll do it a different way over here.
- 32:16And there's no way for them to work together.
- 32:18I understand experimenting with different ways, but I would still want them to hopefully end up in the same spot together such that we're just not wasting time and energy.
- 32:26Because as you commented earlier, we already did that with the Python 2 to 3 transition.
- 32:30It was somewhat painful, but we got through it.
- 32:32And there was reasons for it.
- 32:33And I don't regret it.
- 32:34But I also don't want to ever purposely do that again if we can avoid it.
- 32:40And so my big hope is we can get the community to come together as a group to try to decide how we want to make this happen.
- 32:46Yeah, I definitely second that.
- 32:47I don't want to dictate much is my key point.
- 32:49And I can't speak for my other steering council members, but I don't think they want to either.
- 32:54I think our key goal in anything, if anything does come out, is how can we help shepherd the community towards a single point and try to give guidance to help make sure that everyone is able to work together as a community.
- 33:05I think that sounds great.
- 33:06One of the things that might be cool, you talked about maybe eval not working, for example.
- 33:11And is that a problem?
- 33:13I don't even know how much of a problem that would be.
- 33:16I don't know.
- 33:16I mean, for instance, for a long time, named tuples required it.
- 33:19Yes, I remember.
- 33:20Yeah.
- 33:20Yeah.
- 33:21And a lot of people didn't know that.
- 33:22And then that just got changed, I believe, in 3.6, perhaps?
- 33:27Maybe 3.7?
- 33:28Yeah.
- 33:28Versus blur for me.
- 33:29Yeah.
- 33:29So yes, for the longest time component that a lot of people use in the starting library would not have worked.
- 33:34So it really, it's one of those things, as I said, I don't know.
- 33:38Edge case stuff.
- 33:39I think the team would be open to ditching things that really can be shown as like, yeah, not a lot of people use this.
- 33:46And boy, is it a pain to implement.
- 33:47Let's really consider getting rid of it because it's just not important enough to keep around for that performance boost.
- 33:52One of the thoughts I was having is, what if there's like a, something like a subset standard Python language, like, okay, maybe we can't have meta classes, or we can't have eval, or something that's kind of edge.
- 34:05Or maybe, I don't know.
- 34:06But if you target like this subset, it's guaranteed to run in some WebAssembly world, in CPython, maybe in PyPy, maybe like we're a...
- 34:15Well, so have you heard about mypyc?
- 34:16I've heard of it, yeah.
- 34:17Yeah.
- 34:17So for those of you who don't know, the mypy team has implemented a tool called mypyc, where basically they can take a subset of Python that's fully typed, run it through mypy, and they use mypy as actually a compiler front end to drive it to a Python C extension backend,
- 34:35and actually emit a Python extension for your Python code.
- 34:38And it was originally written for mypy, I assume because Dropbox wanted mypy to run faster.
- 34:43But they've actually gotten mypy to run four times faster than what Guido's told me.
- 34:48Wow.
- 34:48At Dropbox by doing this.
- 34:50Now, they fully admit it.
- 34:52It was fully written for mypy, and it's got a very specific subset, and it's very targeted.
- 34:55But that does tie into your whole, like, what happens if we make it so that, if you care, just type Python end to end for your code, and then pass it through something like mypyc.
- 35:05And hit that target.
- 35:06I mean, some people have done that with Cython, but Cython is very much...
- 35:09It's kind of got its own little bit of syntax.
- 35:10It's got its own syntax.
- 35:11It's got its own syntax.
- 35:12You've got to, like, do its style, you know.
- 35:14Well, they've actually added type hint support for it.
- 35:17Which is awesome, yeah.
- 35:17Which is great.
- 35:18But Cython is also typically targeted much lower constructs like C-level ints, right?
- 35:24And void stars and structs and that kind of thing.
- 35:27While mypyc is targeting a higher level, not such a C-level bridge like Cython, but very much specific.
- 35:32This is just normal Python.
- 35:34We just want Python faster.
- 35:35Yeah.
- 35:36So it's a slightly different opportunity from what Cython's been targeting all these years.
- 35:39And done a good job at them.
- 35:41Cython definitely deserves credit for what they've done.
- 35:42Absolutely.
- 35:43So there's a lot of possibilities.
- 35:44I don't know if WebAssembly has to be here or not, but it seems like it could be.
- 35:48I think it's definitely worth a consideration.
- 35:49I think, as you...
- 35:51Hopefully people can tell through the excitement in our voices.
- 35:53I think both Michael and I obviously think it's a great thing.
- 35:58And I think it's a very cool piece of tech.
- 36:00And I like the motivation behind it.
- 36:01And I think they seem to be driving it for the right reasons.
- 36:04And I think it's definitely worth looking at.
- 36:06I think it's just a question of what benefits will Python get as a community?
- 36:10And will that be enough to cover...
- 36:12Tick five boxes or tick two boxes?
- 36:15Right, right, right.
- 36:16Or 10 boxes even because we just don't know.
- 36:17It's enticing enough that I really do hope someone gives it a solid go.
- 36:21Yeah, I concur.
- 36:22And one of my bits of excitement is around how it seems to let languages interoperate.
- 36:28If you can get something to get down to WebAssembly, you can get it to play with other things that it might not, right?
- 36:34If I can compile CPython to WebAssembly, I can now get it to do JavaScript-y things with JavaScript and work with other stuff and Rust.
- 36:42If I can get it there, I can get it in the space as well.
- 36:44There seems like it could be a cool integration layer.
- 36:47Oh, most definitely.
- 36:48If you look at the WebAssembly spec, what it actually specs out in the MVP,
- 36:51is basically unassigned and assigned ints, both 32 and 64, floats and functions, plus imports at the module level.
- 37:01But the key point is because they're specifying at the function level,
- 37:04if you wrote something in JavaScript and had it compiled down to a WebAssembly function...
- 37:09If you could export that function.
- 37:10Exactly.
- 37:11So now at the WebAssembly level, it's available.
- 37:13So as long as your code, as long as Python knows how to work with WebAssembly code, it can do that.
- 37:18And actually, there is a WebAssembly implementation called Wasmr, which I believe you talked about on Python Bytes.
- 37:24Yes, we did talk about it on Python Bytes.
- 37:26And Wasmr is super exciting.
- 37:27Tell people about that.
- 37:28Yeah.
- 37:29It's like the reverse of what we're talking about in a sense.
- 37:31Yeah, yeah, exactly.
- 37:31So it's a WebAssembly implementation.
- 37:33But one of the interesting things they've done is they've defined their own basic kind of C API.
- 37:37And so what they're letting other languages that can do C API work is they allow you to actually use it like an extension.
- 37:45So what Wasmr has is they actually have a C extension for Python that will actually let you load WebAssembly code into Wasmr.
- 37:52And then make calls through Python into Wasmr itself to do execution on your behalf and then come back.
- 37:57Kind of like what your idea was earlier, Michael, about could we somehow use a sub-interpreter to do backwards compatibility?
- 38:03This is actually using kind of like almost a multiprocessing kind of like out through an extension call to have some WebAssembly get executed on your behalf and then come back into Python.
- 38:11Yeah, it's really cool.
- 38:13To me, when I saw it, I felt like it's a little bit like what Node.js did.
- 38:16So JavaScript was stuck in the browser and it lived in the browser and it's a web thing.
- 38:19But then Node.js came along.
- 38:20All of a sudden, we could take this stuff and bring it to run on the desktop or on a server.
- 38:26And it brought it.
- 38:26So this lets us take anything that would run in WebAssembly and now bring it into your Python application on the server side.
- 38:33And run it.
- 38:33And that's just that's a pretty exciting, different take on this angle here.
- 38:37Yeah, I mean, I think it's a very clever way to try to start that bridging of showing people the benefits of WebAssembly, but also just making it useful today.
- 38:47Right.
- 38:47Because like there's plenty of great stuff being written in JavaScript or any other language that can target WebAssembly, Rust.
- 38:54And there's no reason why you can't reach for it through that mechanism.
- 38:57So I think, once again, it acts even just at some levels of proof of concept to show what the possibilities are.
- 39:03If as a technical community, all up, what would happen if all languages and tooling and all that started to actually start to tackle the WebAssembly as a target and try to actually work towards that as a common goal?
- 39:16It's early days, but it's exciting to imagine what might happen.
- 39:18It feels very utopian, amazing if we could have it.
- 39:22And it's kind of cool and exciting because it seems not totally bonkers to actually aim for it.
- 39:27So, yeah.
- 39:28People have always said that JavaScript is the assembly language of the Web, but maybe WebAssembly actually is going to be what we get to.
- 39:33This portion of Talk Python is sponsored by Microsoft and Visual Studio Code.
- 39:40Visual Studio Code is a free, open-source, and lightweight code editor that runs on Mac, Linux, and Windows with rich Python support.
- 39:48Download Visual Studio Code and install the Python extension to get coding with support for tools you love like Jupyter, Black Formatting, Pilot, pytest, and more.
- 39:56And just announced this month, you can now work with remote Python code bases using the new Visual Studio Code remote extensions.
- 40:04Use the full power of Visual Studio Code when coding in containers, in Windows subsystem for Linux, and over SSH connections.
- 40:10Yep, that's right.
- 40:11Auto completions, debugging, the terminal, source control, your favorite extensions.
- 40:15Everything works just right in the remote environment.
- 40:18Get started with Visual Studio Code now at talkpython.fm/Microsoft.
- 40:23I think that pretty much covers it for WebAssembly.
- 40:27I do like these two projects that are out there, and I want to see more.
- 40:30I guess maybe we should throw a little love to Rust Python as well, which is a cool project.
- 40:35And you mentioned it earlier, but its goal is to, let's see if we can rewrite CPython in Rust.
- 40:40And there's a lot of options.
- 40:41Like, what if we reimagined what CPython was supposed to do with some compatibility in mind?
- 40:47Or, I don't know, something like, but for WebAssembly, right?
- 40:50There's some options.
- 40:51Yeah, and the only clarification I make is I don't think it's a target from CPython to Rust.
- 40:56I think they're doing a full Python itself, re-implementation, right?
- 41:00So it's not like they're taking CPython and slowly implementing bits of Rust, kind of like what Mozilla is doing with Firefox.
- 41:07And it's kind of like an inside-out kind of growth of Rust.
- 41:11They're doing it fully Rust from scratch.
- 41:13Yeah.
- 41:13I mean, with the amount of tooling and work that Rust is pulling into the WebAssembly world as something they very specifically care about,
- 41:19it does potentially open that implementation if they manage to reach a level of compatibility that people are happy with to get us Python in WebAssembly, potentially.
- 41:29Yeah, it's very exciting.
- 41:30Awesome.
- 41:31All right, well, let's talk about just a couple of other things while I got you stuck here on the Expo floor hall.
- 41:36Sure.
- 41:36We talked about the 2 to 3 thing.
- 41:37Yep.
- 41:38Let's just talk a little bit about sunsetting the whole Python 2 thing next.
- 41:42Yes.
- 41:43Where are we right now?
- 41:44It is May.
- 41:45Seven months from now, we're going to be officially at the sunset.
- 41:48Like, what's the plan?
- 41:50Is that just going to happen?
- 41:52Is there something happening to, like, shepherd that?
- 41:55The steering council is just starting to get ourselves out from the pile of open peps that we started off dealing with when we first got elected.
- 42:03And so we're just starting to have conversations among ourselves of, okay, what do we think we can do if we can somehow help direct some energy in the world and such?
- 42:13And so we've just started just, like, very much, I mean just, started having conversations with the PSF about seeing if we could potentially get some funding for, like, a PM to help us with the sunsetting of Python 2.7.
- 42:26Because, like, if you go to the python.org website, it says Python 2, Python 3 everywhere.
- 42:30But you know what?
- 42:30Come January 1st, 2020, it just should say Python.
- 42:33All the little, oh, two here, three there, all that should just go away because now it's just Python 3, which will just be Python.
- 42:41Well, the biggest one is if I go search for a function that's in the standard library and I click on the result in Google, there's a high probability that says 2.7 or pull down the dropdown to get to the 3.7 or whatever.
- 42:52Yeah, and how do we handle that, right?
- 42:54Do we do it with redirects?
- 42:55Do we just totally get rid of it?
- 42:56What are our options?
- 42:58I don't know.
- 42:59But it's definitely something we should look into.
- 43:01And I think we're hoping we can get some, basically, professional help to get that done.
- 43:04Because, obviously, that's going to be potentially a slight slog and asking a bunch of volunteer core developers to go through the website and all our documentation and just remove every mention of 2.7.
- 43:15I don't think that's going to go well.
- 43:17Command F.
- 43:18Yeah.
- 43:18Put 2.7.
- 43:19Type 3.7.
- 43:20Let's really test VS Code's global search and replace.
- 43:24The other thing, though, is there's going to be some decisions that have to be made.
- 43:28And someone's going to have to stay on top of this, right?
- 43:29This is very much going to be a detail-oriented thing to keep a massive to-do list of things to get done.
- 43:34And once again, asking a single volunteer to try to act as the contact point coordinator for that is probably going to be way too much.
- 43:39So I'm hoping this initial conversation will go somewhere and we're going to hopefully be able to get a PM or something to help us kind of make this happen.
- 43:47Yeah, it sounds like a great plan.
- 43:49And also, honestly, I guess it's kind of a nice first step to see what it's like for there to potentially be hired help to help Python Dev.
- 43:54And who knows where that can lead.
- 43:56That can lead to a lot of good places.
- 43:57I mean, we saw the whole PyPI.org relaunch because there was a little funding brought in there.
- 44:03And that had been kind of been chipped at for a long, long time.
- 44:06And then, you know, six months later.
- 44:08I've personally said that I think there's possibility, but we've not had those conversations yet.
- 44:13Among even the steering council, let alone Python Dev all up, what that potentially could look like or mean.
- 44:18But I think there's some potential opportunity there.
- 44:20Yeah.
- 44:20If this works out, everyone's amenable.
- 44:22And honestly, once again, we can get the funding.
- 44:25Yeah.
- 44:25Minor thing, funding.
- 44:26Yeah.
- 44:26Money.
- 44:27It's just a thing.
- 44:28Just paper.
- 44:28Come on.
- 44:29Yeah.
- 44:29All right.
- 44:29And then you're on the VS Code team, specifically the Python side.
- 44:33You guys probably made some announcements or have something going on here.
- 44:36Anything you want to share?
- 44:37Actually, it was kind of cool.
- 44:38We've been working with the VS Code team for a while now to land some support for remote editing.
- 44:44Actually, it was mainly driven by the VS Code team.
- 44:46They basically talked to us about some of our needs to make sure they got addressed.
- 44:49We helped test it for them because the Python extension is the number one extension of VS Code.
- 44:53That doesn't come with it out of the box.
- 44:55Yeah.
- 44:55One of the things that drives me crazy, people say, I'm going to use some really subpar editor because I need something that's always available to me no matter what.
- 45:04Even if I'm going to use SSH in over terminal.
- 45:06So I'm going to choose a least common denominator option rather than maybe among all the tooling.
- 45:11So what's really great is VS Code has developed a system, but it leaves them in the insiders build right now while they work out any kinks from the public announcement.
- 45:19But basically, they've launched three extensions that let you use Windows 10's WSL support, Docker, both remote and local, and SSH.
- 45:28And so basically what it does is it runs more or less a headless VS Code on the remote location of where your code is to get proper IntelliSense, paths, all that stuff that's normally really hairy to do on the translation side.
- 45:42If your development platform is different from the development position of your code, they just basically run VS Code on that point.
- 45:49And then you basically get a GUI front end on your actual desktop, which it's a really slick solution.
- 45:55And I'm honestly really appreciative of the VS Code team for letting us actually announce that here at PyCon.
- 46:00It was not a thing that they announced anywhere else.
- 46:02We actually got to announce it here because VS Code team itself has been very supportive of us and the work we've done on the extension.
- 46:08So thanks to them for that.
- 46:09Yeah.
- 46:09Well, that sounds pretty awesome.
- 46:11I mean, that's part of the Electron.js suite aspect, right?
- 46:14It's kind of already like two tier.
- 46:16It's just now the tier is far, far away.
- 46:18Yeah, exactly.
- 46:19I mean, the analogy I use, and I think it's kind of, it feels a little like it cheapens it a little too much for the amount of work in the VS Code teams.
- 46:27But it's almost like running an X11, right?
- 46:29We've got the headless version running on the remote machine and you just get it on the other end.
- 46:33Yeah, pretty cool.
- 46:34So yeah, it's awesome.
- 46:35I'm extremely happy, if for any other reason, that it closed out our top two feature requests on our issue tracker
- 46:40that have been there since they joined the team and the extension moved over under Microsoft.
- 46:45Yeah.
- 46:45Now you can stop talking about it.
- 46:46Yeah.
- 46:47Now we just got to start with the next new number one and number two feature request.
- 46:51Can you make it write my code for me?
- 46:52Yeah.
- 46:52No.
- 46:53No, we don't.
- 46:53I don't know if we want that.
- 46:54No, probably not.
- 46:55Probably not.
- 46:56But people keep saying it's going to happen.
- 46:57I don't know.
- 46:57We'll see.
- 46:58Yeah.
- 46:58I actually had a prof in my master's program at CalPots, San Luis Obispo, who said, oh, yeah,
- 47:03like in 10 years, code will be running itself.
- 47:05And I hate to break it to you, Dr. Fisher.
- 47:08It's 10 years now.
- 47:09It didn't quite happen.
- 47:10And yeah, I'm quickly approaching 20 and it still doesn't quite look like it's going to happen.
- 47:15Yeah, there's a lot happening here at PyCon and a lot of people typing a lot of keyboards
- 47:18doing cool stuff.
- 47:19Yeah.
- 47:19All right, Brett.
- 47:19Well, thanks for coming back and following up this discussion because it was a lot of
- 47:22fun.
- 47:22And I think WebAssembly and Rust have some pretty amazing possibilities.
- 47:26We'll see where it goes.
- 47:28I think the future is bright if the community decides to make it so.
- 47:31And so I'm optimistic and hopeful that it will.
- 47:34And I'm really excited to see where things potentially end up.
- 47:37All right, cool.
- 47:38Well, thanks for being on the show and enjoy the conference.
- 47:40Thanks, Michael.
- 47:40You too.
- 47:40Bye.
- 47:41Bye.
- 47:41This has been another episode of Talk Python To Me.
- 47:45Our guest on this episode was Brett Cannon, and it's been brought to you by Microsoft.
- 47:49If you're a Python developer, Microsoft has you covered.
- 47:53From VS Code and their modern editor plugins to Azure Pipelines for continuous integration
- 47:58and serverless Python functions on Azure.
- 48:00Check them out at talkpython.fm/Microsoft.
- 48:04Want to level up your Python?
- 48:06If you're just getting started, try my Python Jumpstart by Building 10 Apps course.
- 48:11Or if you're looking for something more advanced, check out our new async course that digs into
- 48:16all the different types of async programming you can do in Python.
- 48:19And of course, if you're interested in more than one of these, be sure to check out our
- 48:23Everything Bundle.
- 48:24It's like a subscription that never expires.
- 48:26Be sure to subscribe to the show.
- 48:28Open your favorite podcatcher and search for Python.
- 48:31We should be right at the top.
- 48:32You can also find the iTunes feed at /itunes, the Google Play feed at /play,
- 48:37and the direct RSS feed at /rss on talkpython.fm.
- 48:41This is your host, Michael Kennedy.
- 48:43Thanks so much for listening.
- 48:44I really appreciate it.
- 48:45Now get out there and write some Python code.
- 48:47I really appreciate it.