WEBVTT 00:00:00.000 --> 00:00:06.000 - Hello, YouTube. Hello, Fabio. - Hi, Michael. How's it going? 00:00:06.000 --> 00:00:10.800 - I'm very excited to talk about PyScript and WebAssembly and the work that you've been 00:00:10.800 --> 00:00:16.760 doing. I think it's a big deal, and it's going to be really important for us, so let's kick 00:00:16.760 --> 00:00:21.880 off this podcast. Fabio, welcome to Talk Python to Me. 00:00:21.880 --> 00:00:27.400 - Thank you. I'm really happy to be here. Thank you for having me. 00:00:27.400 --> 00:00:28.960 - You're welcome and I'm excited to have you here 00:00:28.960 --> 00:00:33.600 because I am quite excited about the PyScript announcement 00:00:33.600 --> 00:00:36.300 that you have put so much work into. 00:00:36.300 --> 00:00:40.420 I'm very excited about the possibility of finding Python 00:00:40.420 --> 00:00:45.420 in other places than where it has really great strongholds. 00:00:45.420 --> 00:00:49.740 For as much as Python is, the incredible growth of Python 00:00:49.740 --> 00:00:54.220 that Stack Overflow blogged about in 2017 00:00:54.220 --> 00:00:56.980 and all the growth in different metrics, 00:00:56.980 --> 00:00:59.980 but by some metrics, first most popular language 00:00:59.980 --> 00:01:01.340 or second, depending. 00:01:01.340 --> 00:01:05.720 But for all of that, there's still very notable places 00:01:05.720 --> 00:01:07.100 where Python is not. 00:01:07.100 --> 00:01:09.700 And what you're working on has the possibility 00:01:09.700 --> 00:01:13.020 to unlock one or more of those places 00:01:13.020 --> 00:01:15.620 for a whole different set of contingency 00:01:15.620 --> 00:01:19.220 that people have data scientists, web developers, 00:01:19.220 --> 00:01:22.840 UI developers, maybe just for desktop even. 00:01:22.840 --> 00:01:24.400 So exciting. 00:01:25.420 --> 00:01:26.480 - Yeah, yeah. 00:01:26.480 --> 00:01:30.760 I think it captured a lot of the things behind the project 00:01:30.760 --> 00:01:34.140 and really happy to talk about all of those 00:01:34.140 --> 00:01:36.980 'cause yeah, that's the reason we started it. 00:01:36.980 --> 00:01:37.820 So next time. 00:01:37.820 --> 00:01:39.660 - Yeah, and it's super exciting. 00:01:39.660 --> 00:01:41.860 There's been some attempts at this 00:01:41.860 --> 00:01:43.180 and we're gonna get into, 00:01:43.180 --> 00:01:46.180 I wanna sort of start our conversation about the history 00:01:46.180 --> 00:01:49.780 of what has come before and so on. 00:01:49.780 --> 00:01:53.060 Before we do though, let's just hear a bit about you. 00:01:53.060 --> 00:01:55.020 How'd you get into programming in Python? 00:01:55.020 --> 00:02:03.580 So, programming, I think I always been, I was being curious about a lot of things and 00:02:03.580 --> 00:02:06.500 probably doing too many things still today. 00:02:06.500 --> 00:02:18.820 But early on, I got into programming through friends who had computers and Commodore or 00:02:18.820 --> 00:02:19.820 things like that. 00:02:19.820 --> 00:02:22.460 We would hop on. 00:02:22.460 --> 00:02:26.540 I had, in my bed at some point, bought a-- 00:02:26.540 --> 00:02:28.660 I don't even know the version. 00:02:28.660 --> 00:02:36.380 It was similar to Commodore, but it was in Brazil, a Gradient 00:02:36.380 --> 00:02:37.660 MSX or something. 00:02:37.660 --> 00:02:41.340 It was a local, a national branded computer. 00:02:41.340 --> 00:02:44.980 But it allowed you to jump in and do basic stuff 00:02:44.980 --> 00:02:46.980 and programming. 00:02:46.980 --> 00:02:49.180 So I remember trying to play with my friends 00:02:49.180 --> 00:02:52.100 and try to code games. 00:02:52.100 --> 00:02:54.500 Of course, we never got anything done. 00:02:54.500 --> 00:02:58.740 But I always been passionate about computers and gaming 00:02:58.740 --> 00:02:59.580 and stuff like that. 00:02:59.580 --> 00:03:04.300 So into college, I had to do a computer science degree, 00:03:04.300 --> 00:03:07.220 training to become a game developer. 00:03:07.220 --> 00:03:09.700 Also never happened because I got-- 00:03:09.700 --> 00:03:11.980 - I think it's really interesting that so many people 00:03:11.980 --> 00:03:13.500 want to get into game development, 00:03:13.500 --> 00:03:14.780 and then they kind of see 00:03:14.780 --> 00:03:20.300 the sort of grinding mode of that industry, right? 00:03:20.300 --> 00:03:22.300 It's like both fascinating and has this great pull, 00:03:22.300 --> 00:03:25.500 then you're like, but it's really hard on humans as well, right? 00:03:25.500 --> 00:03:29.940 Yes, it's a very hard industry and very competitive. 00:03:29.940 --> 00:03:33.300 My brother is an indie game developer 00:03:33.300 --> 00:03:39.700 and a lot of sleepless nights and working hard, 00:03:39.700 --> 00:03:42.140 trying to get his thing out there. 00:03:42.140 --> 00:03:43.980 And so, yeah, I think-- 00:03:43.980 --> 00:03:47.700 and through life, I also-- 00:03:47.700 --> 00:03:48.980 just life happened. 00:03:48.980 --> 00:03:52.820 I met my now wife and started to be a little more serious 00:03:52.820 --> 00:03:56.980 about gaming is great, but also need to make plans 00:03:56.980 --> 00:03:58.900 for the future. 00:03:58.900 --> 00:04:05.420 So I ended up graduating and started 00:04:05.420 --> 00:04:09.220 to work for a company that did automation, 00:04:09.220 --> 00:04:13.820 like machines automation in big industries, 00:04:13.820 --> 00:04:15.860 mainly on pharmaceuticals. 00:04:15.860 --> 00:04:22.740 And I worked there for a while, and I was in the team that 00:04:22.740 --> 00:04:26.300 would develop high-level applications for analytics. 00:04:26.300 --> 00:04:32.060 And we would usually do for big pharmaceutical production 00:04:32.060 --> 00:04:35.300 lines, so providing all the charts and everything 00:04:35.300 --> 00:04:40.740 they need to say this production batch is 00:04:40.740 --> 00:04:45.740 valid for whatever FDA or whatever entity is approving them. 00:04:45.740 --> 00:04:48.300 A lot of paperwork, a lot of things. 00:04:48.300 --> 00:04:50.260 Eventually, at some point, 00:04:50.260 --> 00:04:54.140 my unit became a big part of the company. 00:04:54.140 --> 00:04:56.740 My, at the time, 00:04:56.740 --> 00:04:59.500 the CEO of the company asked, "Hey, 00:04:59.500 --> 00:05:02.740 do you want to start a startup, 00:05:02.740 --> 00:05:04.460 spin off of our company, 00:05:04.460 --> 00:05:06.380 just focus on software?" 00:05:06.380 --> 00:05:08.820 I did that. 00:05:08.820 --> 00:05:12.100 - That sounds like a pretty fun challenge. 00:05:12.100 --> 00:05:12.940 - Yes. 00:05:12.940 --> 00:05:15.460 - Do a startup without quite the risk 00:05:15.460 --> 00:05:16.940 of actually being a startup. 00:05:16.940 --> 00:05:19.100 - Yeah, yeah. 00:05:19.100 --> 00:05:21.060 - You're gonna get paid, you know what I mean? 00:05:21.060 --> 00:05:23.160 - Yes, you're gonna get paid. 00:05:23.160 --> 00:05:28.160 It also, I think the startup reality in Italy, 00:05:28.160 --> 00:05:30.200 I was still in Italy at the time, 00:05:30.200 --> 00:05:31.540 it's very different from here. 00:05:31.540 --> 00:05:36.020 It's really hard to have investors or to have, 00:05:36.020 --> 00:05:40.740 to collect money and basically you need to, 00:05:40.740 --> 00:05:44.960 it boils down to you investing on your own company 00:05:44.960 --> 00:05:47.660 and then trying to get profit within a number of years. 00:05:47.660 --> 00:05:50.780 - Okay, it's gotta be way more bootstrap, self-funded, 00:05:50.780 --> 00:05:51.900 you know, sort of thing, huh? 00:05:51.900 --> 00:05:52.860 Okay. 00:05:52.860 --> 00:05:53.700 - Yeah, so eventually-- 00:05:53.700 --> 00:05:56.820 - Do you think that's changed or is that still the same? 00:05:56.820 --> 00:05:58.020 - I think it's changing. 00:05:58.020 --> 00:06:02.940 Yeah, in the last 10 years, I think a lot changed 00:06:04.940 --> 00:06:10.340 just from like the industry in general became way stronger in Europe as well. 00:06:10.340 --> 00:06:11.660 There's a different mindset. 00:06:11.660 --> 00:06:18.220 Um, and I think culturally South, South Europe has this culture of, of. 00:06:18.220 --> 00:06:22.740 The, a different way to see money, in investments compared 00:06:22.740 --> 00:06:25.740 to, to the U S for instance, or, yeah. 00:06:25.740 --> 00:06:32.740 Um, but eventually like this experience, led me to the Python community. 00:06:32.860 --> 00:06:42.700 early on. I actually got into Python not by myself. I heard about the language, I was curious, but 00:06:42.700 --> 00:06:51.420 someone within the company said, "Oh, the son of this customer is really big in the Python 00:06:51.420 --> 00:06:59.020 community. He could help us see if it's a good fit for our use case." And it was around early 00:06:59.020 --> 00:07:01.580 maybe 2000s, maybe 2001. 00:07:01.580 --> 00:07:05.340 - So early days of Python, really. 00:07:05.340 --> 00:07:06.380 - Yeah, yes. 00:07:06.380 --> 00:07:10.180 And early days of scientific Python as well. 00:07:10.180 --> 00:07:12.900 The whole, still the whole separation 00:07:12.900 --> 00:07:17.900 between NumPy and NumPy, and numeric, all of that. 00:07:17.900 --> 00:07:22.460 So I started, I loved the language, 00:07:22.460 --> 00:07:26.080 started to use it in our tools. 00:07:27.100 --> 00:07:34.440 It was a funny time where it was definitely unknown as a language and to get into big 00:07:34.440 --> 00:07:40.720 companies, it was a little tricky on the QA point of view. 00:07:40.720 --> 00:07:43.080 But it was interesting. 00:07:43.080 --> 00:07:50.140 Eventually I started to get more engaged with community, started to go to meetups in Italy 00:07:50.140 --> 00:07:51.140 and everything. 00:07:51.140 --> 00:07:56.140 And I think it was around 2004 or 2005, 00:07:56.140 --> 00:07:59.180 I started to go to my first conferences in Europe, 00:07:59.180 --> 00:08:01.620 loved the community, started to, 00:08:01.620 --> 00:08:05.180 how can I get involved? 00:08:05.180 --> 00:08:11.380 And so at that point, later, late 2000s, 00:08:11.380 --> 00:08:14.660 I started the, with a bunch of friends 00:08:14.660 --> 00:08:15.700 in the Italian community, 00:08:15.700 --> 00:08:19.020 we started the Python Italia Association, 00:08:19.020 --> 00:08:22.620 which is basically a non-profit trying to push the language. 00:08:22.620 --> 00:08:29.060 And the main focus was organizing the PyCon Italy conference. 00:08:29.060 --> 00:08:31.860 We started in 2007. 00:08:31.860 --> 00:08:38.700 Also that great, great community, a lot of work, but also paid back. 00:08:38.700 --> 00:08:42.860 You know, I remember the first year we were like, let's do this thing. 00:08:42.860 --> 00:08:47.460 We were very passionate and we end up in negative. 00:08:47.460 --> 00:08:50.060 and all the members of the society. 00:08:50.060 --> 00:08:54.340 Yes, so just to say that big props to everyone 00:08:54.340 --> 00:08:57.380 in the community doing a lot of the community work 00:08:57.380 --> 00:09:00.500 because it's a lot of work and it often is not paid 00:09:00.500 --> 00:09:02.540 or can even be out of-- 00:09:02.540 --> 00:09:04.740 - You might have to pay to do the work. 00:09:04.740 --> 00:09:05.580 - Yes, yes. - Or the opposite 00:09:05.580 --> 00:09:06.740 of getting paid. 00:09:06.740 --> 00:09:10.780 - Yeah, long story short, 00:09:10.780 --> 00:09:14.500 I started to be also more engaged 00:09:14.500 --> 00:09:26.260 the European community. And we organized the EuroPython in 2011. So for three years in a row, 00:09:26.260 --> 00:09:31.140 and that got me into the EuroPython Society. Eventually became chairman of that, which 00:09:31.140 --> 00:09:39.140 basically means EuroPython Society is this European non-profit that pretty much in line with 00:09:39.140 --> 00:09:42.480 with the PSF, tried in different ways, 00:09:42.480 --> 00:09:46.260 but tries to engage with the community, 00:09:46.260 --> 00:09:51.260 organize conferences, raise some money to invest back 00:09:51.260 --> 00:09:54.760 in the community through grants and things like this. 00:09:54.760 --> 00:10:00.040 And then I did that for a number of years. 00:10:00.040 --> 00:10:06.800 So eventually, well, back in the day, 00:10:06.800 --> 00:10:08.860 when I was starting to learn Python, 00:10:08.860 --> 00:10:12.880 I also started to use a lot of the scientific libraries 00:10:12.880 --> 00:10:15.060 and one of them was Chaco, 00:10:15.060 --> 00:10:20.060 which was a graphic plotting library for Python 00:10:20.060 --> 00:10:23.380 that Peter Wang developed with Brian Vindman, 00:10:23.380 --> 00:10:25.060 I think he was in the show. 00:10:25.060 --> 00:10:27.740 - Peter Wang being the CEO of Anaconda. 00:10:27.740 --> 00:10:30.700 - Yes, today, CEO of Anaconda. 00:10:30.700 --> 00:10:33.820 And we met for the first time in person 00:10:33.820 --> 00:10:35.140 at EuroPython in Florence. 00:10:35.140 --> 00:10:38.140 And he was like, okay, we know each other 00:10:38.140 --> 00:10:43.140 from the internet for a while, like, let's get more involved. 00:10:43.140 --> 00:10:45.580 And then at that year, 00:10:45.580 --> 00:10:49.540 I was still trying to make my company be successful. 00:10:49.540 --> 00:10:51.740 It wasn't the right time, 00:10:51.740 --> 00:10:54.940 but the following year met with Travis Olyphant, 00:10:54.940 --> 00:10:58.960 the other founder of Anaconda in Berlin. 00:10:58.960 --> 00:11:02.100 And we just figured out, you know, 00:11:02.100 --> 00:11:04.240 like we're doing a lot of things that are similar. 00:11:04.240 --> 00:11:05.780 We're passionate about the same thing. 00:11:05.780 --> 00:11:10.780 So I eventually joined Anaconda in 2014. 00:11:10.780 --> 00:11:12.060 - Yeah. 00:11:12.060 --> 00:11:13.840 - And then eventually that following year, 00:11:13.840 --> 00:11:17.060 I moved to the US and joined the company full time. 00:11:17.060 --> 00:11:18.760 - Fantastic. 00:11:18.760 --> 00:11:21.000 Well, it's quite the journey from just- 00:11:21.000 --> 00:11:22.200 - Yes. 00:11:22.200 --> 00:11:23.380 - This is interesting language. 00:11:23.380 --> 00:11:25.400 Let me just start participating in some of the meetups. 00:11:25.400 --> 00:11:26.760 Meetups become conferences, 00:11:26.760 --> 00:11:30.000 conference become continent wide conferences. 00:11:30.000 --> 00:11:34.760 And I think it's a pretty good takeaway 00:11:34.760 --> 00:11:37.640 for people who want to get more involved in the community. 00:11:37.640 --> 00:11:39.440 And like every one of those steps 00:11:39.440 --> 00:11:40.840 probably didn't feel massive 00:11:40.840 --> 00:11:43.840 other than maybe moving to the US and joining in the condo. 00:11:43.840 --> 00:11:46.840 But, you know, they all probably seem like really iterative 00:11:46.840 --> 00:11:49.080 and sort of incremental, but at the same time, 00:11:49.080 --> 00:11:53.240 it's, it builds up this really cool place where you're 00:11:53.240 --> 00:11:55.160 - Yeah, actually. - Maybe building 00:11:55.160 --> 00:11:58.400 amazing Python things in the browser at, in the condo. 00:11:58.400 --> 00:11:59.240 - Right, yeah. 00:11:59.240 --> 00:12:02.600 My experience has very much been what, you know, 00:12:02.600 --> 00:12:04.400 a lot of people say, you come from the language, 00:12:04.400 --> 00:12:05.560 to stay for the community. 00:12:05.560 --> 00:12:09.000 That is really my experience. 00:12:09.000 --> 00:12:10.200 Yeah, and then, yeah, 00:12:10.200 --> 00:12:14.800 Anaconda allowed me to work on a lot of interesting things 00:12:14.800 --> 00:12:17.720 like is Python on the browser is the ultimate project. 00:12:17.720 --> 00:12:21.640 But when I joined, I started with being a core developer 00:12:21.640 --> 00:12:24.240 for Bokeh, which had some of that Bokeh 00:12:24.240 --> 00:12:28.680 is a visualization library for Python on the browser. 00:12:28.680 --> 00:12:30.000 So, you know-- 00:12:30.000 --> 00:12:31.080 - And with your project you have now, 00:12:31.080 --> 00:12:33.200 you can still put Bokeh in the browser. 00:12:33.200 --> 00:12:34.040 - Exactly. 00:12:34.040 --> 00:12:34.880 (laughing) 00:12:34.880 --> 00:12:35.700 - There's a science. 00:12:35.700 --> 00:12:36.840 - You can stay in the browser. 00:12:36.840 --> 00:12:38.000 - Yes, exactly. 00:12:38.000 --> 00:12:41.040 Even more in the browser than before, I guess. 00:12:41.040 --> 00:12:42.280 All right, let's dive in. 00:12:42.280 --> 00:12:44.040 Now, before we dive in real quick, 00:12:44.040 --> 00:12:45.160 since you talked about gaming, 00:12:45.160 --> 00:12:47.840 wanna be in game development and your brother and so on, 00:12:47.840 --> 00:12:50.120 have you watched the documentary, 00:12:50.120 --> 00:12:52.880 "Power On, The Story of Xbox"? 00:12:52.880 --> 00:12:53.720 - I haven't. 00:12:53.720 --> 00:12:55.640 - This is a documentary that came out. 00:12:55.640 --> 00:12:57.320 It's a four hour show. 00:12:57.320 --> 00:12:58.720 You can watch it on YouTube. 00:12:58.720 --> 00:13:02.320 And it's like the history of Xbox. 00:13:02.320 --> 00:13:04.880 - And if you're just into like tech history documentaries, 00:13:04.880 --> 00:13:06.760 this thing is pretty interesting. 00:13:06.760 --> 00:13:08.240 But let's not talk about games. 00:13:08.240 --> 00:13:11.600 Let's talk about the birth and death of JavaScript. 00:13:11.600 --> 00:13:13.480 Have you seen this presentation? 00:13:13.480 --> 00:13:14.320 - Yes. 00:13:14.320 --> 00:13:16.040 - Oh my, it's so good, isn't it? 00:13:16.040 --> 00:13:20.280 - Yes, one of my favorites, plenty of talks, you know. 00:13:20.280 --> 00:13:22.720 - So, the reason I bring this up 00:13:22.720 --> 00:13:24.960 is there's a lot of interesting building blocks 00:13:24.960 --> 00:13:27.160 that I suspect many people in the Python community 00:13:27.160 --> 00:13:29.400 are fully unaware of, right? 00:13:29.400 --> 00:13:31.880 There's been all these developments 00:13:31.880 --> 00:13:33.320 over in the JavaScript world. 00:13:33.320 --> 00:13:36.800 And Gary Bernhardt did this talk at PyCon 2014, 00:13:36.800 --> 00:13:38.600 the birth and death of JavaScript. 00:13:38.600 --> 00:13:39.840 And no, I'm not mispronouncing it. 00:13:39.840 --> 00:13:42.120 That's how it's done in the talk. 00:13:42.120 --> 00:13:46.620 And it tells this hilarious story of the future 00:13:46.620 --> 00:13:50.880 of like weird human evolution and programming 00:13:50.880 --> 00:13:52.800 and JavaScript and how we don't do JavaScript, 00:13:52.800 --> 00:13:54.380 but everything's JavaScript. 00:13:54.380 --> 00:13:55.840 But what is the underlying theme 00:13:55.840 --> 00:13:58.400 is like a actual interesting technical history 00:13:59.360 --> 00:14:02.800 of how people started doing crazy stuff 00:14:02.800 --> 00:14:04.920 with JavaScript pre-WebAssembly. 00:14:04.920 --> 00:14:07.880 So there were compilers like in Scriptum 00:14:07.880 --> 00:14:11.720 that will compile C code to JavaScript 00:14:11.720 --> 00:14:13.920 and then the JavaScript Jits have become so fast. 00:14:13.920 --> 00:14:17.840 So one of the examples was like Chrome running Firefox 00:14:17.840 --> 00:14:21.400 running something else, like maybe like an embedded Windows. 00:14:21.400 --> 00:14:22.640 I can't remember what it was, 00:14:22.640 --> 00:14:26.720 but just there were like layers and layers of JavaScript 00:14:26.720 --> 00:14:29.760 doing wild stuff that we wouldn't imagine otherwise, right? 00:14:29.760 --> 00:14:38.600 >> Yeah. I think that's part of also one of the reasons with Peter, 00:14:38.600 --> 00:14:42.120 we said, "Okay, this is the right time to try this out," 00:14:42.120 --> 00:14:46.960 because the browsers became so powerful. 00:14:46.960 --> 00:14:52.080 They are basically, if you see from a different perspective, 00:14:52.080 --> 00:14:54.160 they are mini virtual machines. 00:14:54.160 --> 00:14:55.960 They have their own file system, 00:14:55.960 --> 00:14:59.520 they have their own isolation, networking, 00:14:59.520 --> 00:15:03.440 a lot of the things you can really see that as a VM. 00:15:03.440 --> 00:15:05.800 >> Like the JVM, 00:15:05.800 --> 00:15:08.980 like the.NET CLR and to some degree like Python, right? 00:15:08.980 --> 00:15:09.800 >> Right. 00:15:09.800 --> 00:15:12.180 >> The CPython on a regular machine. 00:15:12.180 --> 00:15:15.100 >> Yeah. You can run full operating systems 00:15:15.100 --> 00:15:18.040 on top of browser. 00:15:18.040 --> 00:15:22.120 Honestly, the explosion of interesting things in 00:15:22.120 --> 00:15:25.360 the last few years have been crazy 00:15:25.360 --> 00:15:28.640 and doesn't seem to decelerate at all. 00:15:28.640 --> 00:15:33.320 So the level of maturity is kind of encouraging. 00:15:33.320 --> 00:15:34.160 - It is. 00:15:34.160 --> 00:15:36.760 And the performance, while not native performance, 00:15:36.760 --> 00:15:37.820 is not that far off. 00:15:37.820 --> 00:15:40.360 At least some of the examples that Gary gave, 00:15:40.360 --> 00:15:43.240 it was like 50%. 00:15:43.240 --> 00:15:45.120 You could run Doom at 50% speed 00:15:45.120 --> 00:15:46.640 when you compile it to the browser 00:15:46.640 --> 00:15:48.600 or something insane like that. 00:15:48.600 --> 00:15:49.520 - Right. 00:15:49.520 --> 00:15:50.480 Yeah, it's good enough. 00:15:50.480 --> 00:15:52.200 I mean- - It's more than good enough. 00:15:52.200 --> 00:15:55.440 Yeah, I mean, because the alternative so often is, 00:15:55.440 --> 00:15:57.240 well, we're gonna send a request over to the server 00:15:57.240 --> 00:15:59.320 and that might be native and fast, 00:15:59.320 --> 00:16:00.720 but it's also network latency 00:16:00.720 --> 00:16:02.400 and it's also a shared compute resource 00:16:02.400 --> 00:16:04.000 with a thousand other people. 00:16:04.000 --> 00:16:07.240 And here you are sitting on your MacBook Pro Max 00:16:07.240 --> 00:16:10.760 with 16 cores, you know, and you're just waiting. 00:16:10.760 --> 00:16:12.720 - Yeah, yeah. 00:16:12.720 --> 00:16:15.800 That's actually one aspect that a lot of people 00:16:15.800 --> 00:16:16.840 don't consider. 00:16:16.840 --> 00:16:21.840 There is, you know, there's the performance 00:16:21.880 --> 00:16:24.320 in terms of how fast it goes. 00:16:24.320 --> 00:16:27.700 But there are a few aspects that you also 00:16:27.700 --> 00:16:31.160 need to consider overall in the overall experience. 00:16:31.160 --> 00:16:35.040 How long for the developer side of point of view, 00:16:35.040 --> 00:16:37.240 how long before they can actually 00:16:37.240 --> 00:16:40.300 get in front of something usable or speeding up 00:16:40.300 --> 00:16:42.240 their environments and things like this. 00:16:42.240 --> 00:16:46.800 Then there's loading time versus execution time, 00:16:46.800 --> 00:16:47.840 also very different. 00:16:47.840 --> 00:16:52.840 but from the eyes of the user, it kind of sums up. 00:16:52.840 --> 00:16:58.880 So there are so many small niches or small verticals 00:16:58.880 --> 00:17:04.520 that we can work on in the whole JavaScript 00:17:04.520 --> 00:17:07.080 or browser ecosystem that I think we can make 00:17:07.080 --> 00:17:10.160 a lot of improvements in the next few years. 00:17:10.160 --> 00:17:13.680 - Yeah, you think of grid computing 00:17:13.680 --> 00:17:15.160 and distributed computing, 00:17:15.160 --> 00:17:21.160 part of the power of the cloud is that I could just go say, I need more. 00:17:21.160 --> 00:17:24.920 We have four servers, but a bunch of people showed up. 00:17:24.920 --> 00:17:29.600 So give me 20 servers and scale my Kubernetes cluster across that for now. 00:17:29.600 --> 00:17:36.720 And four to 20 is amazing, but four to a hundred million is really different. 00:17:36.720 --> 00:17:41.320 If, if we can push a lot of that compute to everybody's personal computers, 00:17:41.560 --> 00:17:46.560 Even our iPhones are unimaginably fast little devices. 00:17:46.560 --> 00:17:49.060 Like the whole M1 crazy transition 00:17:49.060 --> 00:17:53.060 is basically an iPhone chip with more voltage 00:17:53.060 --> 00:17:53.960 and better cooling. 00:17:53.960 --> 00:17:55.860 There's not much more to it than that. 00:17:55.860 --> 00:18:01.640 So finding ways to execute more of our code 00:18:01.640 --> 00:18:05.320 on the clients is pretty interesting. 00:18:05.320 --> 00:18:08.040 - Yeah, totally agree. 00:18:08.040 --> 00:18:11.020 We already see that even on the server side, 00:18:11.020 --> 00:18:16.020 you know, projects like Bask, we're very popular, 00:18:16.020 --> 00:18:19.820 pushing the computing on nodes 00:18:19.820 --> 00:18:22.340 and you know, the distributed architecture 00:18:22.340 --> 00:18:25.020 is very powerful and is needed. 00:18:25.020 --> 00:18:29.040 You know, we can have the possibility to make the same thing 00:18:29.040 --> 00:18:31.860 on the client side on the browser as well. 00:18:31.860 --> 00:18:33.120 - Yeah. - Yeah. 00:18:33.120 --> 00:18:36.540 - Dask for those out there who don't know 00:18:36.540 --> 00:18:41.340 is a pandas-like, NumPy-like API that you can just say, 00:18:41.340 --> 00:18:43.380 but run it distributed across these machines 00:18:43.380 --> 00:18:45.700 on the cluster automatically. 00:18:45.700 --> 00:18:48.860 You know, Matthew Rocklin started Coiled, 00:18:48.860 --> 00:18:50.820 and you know, former Anaconda alumni, 00:18:50.820 --> 00:18:52.280 a lot of tie-ins there. 00:18:52.280 --> 00:18:55.180 - Yeah. - Yeah, cool. 00:18:55.180 --> 00:18:58.220 And so this is, it's not the same thing in any way, 00:18:58.220 --> 00:19:00.620 but it is a way that really takes Python 00:19:00.620 --> 00:19:04.140 and gives it way more compute resources, potentially. 00:19:04.140 --> 00:19:08.220 So are there any particular, 00:19:08.220 --> 00:19:11.180 I sort of set the stage with this compile to C and stuff, 00:19:11.180 --> 00:19:13.980 but is there any other sort of building blocks 00:19:13.980 --> 00:19:18.520 in the history of how we got to what you all built 00:19:18.520 --> 00:19:20.920 in the JavaScript stack that you wanna call out? 00:19:20.920 --> 00:19:23.220 - Yes, definitely. 00:19:23.220 --> 00:19:26.980 I think one major thing that, 00:19:26.980 --> 00:19:30.940 you know, I wanna give props as much as we can 00:19:30.940 --> 00:19:32.940 to the Pyodide project, 00:19:32.940 --> 00:19:37.940 which is a runtime for Python on the browser. 00:19:37.940 --> 00:19:40.340 And they've been extremely, 00:19:40.340 --> 00:19:45.340 like one of the reasons we could work on PyScript 00:19:45.340 --> 00:19:49.580 was because it has a level of maturity 00:19:49.580 --> 00:19:54.580 and performance right now that is really stable, right? 00:19:54.580 --> 00:19:59.780 And they actually also been, 00:19:59.780 --> 00:20:03.940 They're a great community, very supportive. 00:20:03.940 --> 00:20:07.180 So a big shout out to them, 00:20:07.180 --> 00:20:12.180 Hood and Roman specifically, the two main core developers. 00:20:12.180 --> 00:20:17.300 And the whole work underneath that project as well, 00:20:17.300 --> 00:20:21.860 you know, like the progress of the Emscripten 00:20:21.860 --> 00:20:23.680 and Wasm and WebAssembly, 00:20:23.680 --> 00:20:26.180 there's a huge community behind that. 00:20:26.180 --> 00:20:28.060 So actually that's one of the principles 00:20:28.060 --> 00:20:31.620 that we tried to, at the core of FireScript, 00:20:31.620 --> 00:20:36.620 is we don't want to reinvent anything that we don't need. 00:20:36.620 --> 00:20:40.740 We want to be really additive to the ecosystem, 00:20:40.740 --> 00:20:45.100 glue things together, provide nice and easy APIs 00:20:45.100 --> 00:20:49.180 and high-level APIs so that we can lower the barrier, 00:20:49.180 --> 00:20:51.660 basically give more accessibility to the tools, 00:20:51.660 --> 00:20:55.620 to the users, rather than reinventing something 00:20:55.620 --> 00:20:57.180 that's not needed. 00:20:57.180 --> 00:20:59.680 - Yeah, so PyIodide. 00:20:59.680 --> 00:21:03.220 This project is a cool project. 00:21:03.220 --> 00:21:08.220 I interviewed Michael from the project 00:21:08.220 --> 00:21:11.620 about this way back, a couple of years ago, 00:21:11.620 --> 00:21:14.660 but yeah, it uses this Emscripten 00:21:14.660 --> 00:21:19.460 and WebAssembly story to basically compile 00:21:19.460 --> 00:21:23.700 a port of CPython to run in WebAssembly in the browser, 00:21:23.700 --> 00:21:25.900 which is fantastic, right? 00:21:25.900 --> 00:21:27.900 I mean, that's, in some degree, 00:21:27.900 --> 00:21:31.220 that's the building block that you all really needed, right? 00:21:31.220 --> 00:21:32.740 - Yes, yeah, definitely. 00:21:32.740 --> 00:21:35.180 Yeah, I must mention also, yeah, 00:21:35.180 --> 00:21:39.060 Michael Dropbaum and Christian Himes, 00:21:39.060 --> 00:21:40.860 who has been also pushing a lot 00:21:40.860 --> 00:21:43.780 of the Python on Wasm ecosystem. 00:21:43.780 --> 00:21:44.740 - Yes. 00:21:44.740 --> 00:21:46.380 - Yeah, there's a lot of good energy 00:21:46.380 --> 00:21:47.820 in the Python community 00:21:47.820 --> 00:21:51.300 to actually try to push that together, right? 00:21:51.300 --> 00:21:54.180 - Yeah, and also Brett Cannon has been a big proponent 00:21:54.180 --> 00:21:55.620 of making that happen. 00:21:55.620 --> 00:21:58.620 I don't know how directly involved with the day-to-day, 00:21:58.620 --> 00:21:59.900 like let's make it compile, 00:21:59.900 --> 00:22:02.900 but I know he's been really pushing on that effort as well. 00:22:02.900 --> 00:22:06.020 And so let's get to your announcement. 00:22:06.020 --> 00:22:08.800 I mean, I didn't go to PyCon this year, 00:22:08.800 --> 00:22:12.500 mostly just not ready to be in a room 00:22:12.500 --> 00:22:14.900 with people from around the world for that long. 00:22:14.900 --> 00:22:17.660 And I thought to give the world a chance to try it out, 00:22:17.660 --> 00:22:19.340 then I'll see how it goes and do it next year. 00:22:19.340 --> 00:22:21.100 But I missed everyone there. 00:22:21.100 --> 00:22:24.540 But I got a lot of messages. 00:22:24.540 --> 00:22:27.180 One was friends saying, why aren't you here? 00:22:27.180 --> 00:22:28.660 Why can't we have a beer together? 00:22:28.660 --> 00:22:30.180 Sorry, I really missed that. 00:22:30.180 --> 00:22:33.020 And then the other is, have you heard of PyScript? 00:22:33.020 --> 00:22:34.860 Oh my goodness, this was the announcement. 00:22:34.860 --> 00:22:37.200 Like this, if there's any big piece of news 00:22:37.200 --> 00:22:40.460 that came out from presentations and talks and announcements, 00:22:40.460 --> 00:22:41.660 like this is the one. 00:22:41.660 --> 00:22:45.300 So PyScript, people can guess, but what is it? 00:22:45.300 --> 00:22:46.260 Tell us about this. 00:22:46.260 --> 00:22:51.940 - So PyScript is a framework that allows users 00:22:51.940 --> 00:22:56.900 to basically use HTML tags to define, 00:22:56.900 --> 00:23:03.980 to run Python code and define different components. 00:23:03.980 --> 00:23:07.860 Those can be related to executing code, 00:23:07.860 --> 00:23:11.980 but also providing, defining your environments, 00:23:11.980 --> 00:23:15.160 what packages you want to install, et cetera, 00:23:15.160 --> 00:23:20.160 as well as some UI components that make things easier 00:23:20.160 --> 00:23:28.160 make things easier for users that are not familiar with HTML and CSS and all the styling 00:23:28.160 --> 00:23:39.360 of things. It's based on a Python runtime, which is Pyodide, that allows Python execution 00:23:39.360 --> 00:23:44.360 on the browser and it has interoperability capabilities 00:23:44.360 --> 00:23:50.520 with JavaScript as well. 00:23:50.520 --> 00:23:54.660 So you can use both Python libraries 00:23:54.660 --> 00:23:59.080 as well as JavaScript libraries in your code. 00:23:59.080 --> 00:24:00.400 - Yeah, this is really great. 00:24:00.400 --> 00:24:02.920 And if people go to pyscript.net and scroll down 00:24:02.920 --> 00:24:06.120 and what is Pyscript, it really calls all these out. 00:24:06.120 --> 00:24:08.640 Like if you're trying to present this to your boss 00:24:08.640 --> 00:24:10.000 to your team, you're like, this is something cool 00:24:10.000 --> 00:24:11.720 we should check out, like, they should definitely 00:24:11.720 --> 00:24:13.440 go to that list right there, yeah? 00:24:13.440 --> 00:24:14.760 - Yes, yeah. 00:24:14.760 --> 00:24:18.880 And that is, you know, the most immediate list of things. 00:24:18.880 --> 00:24:23.160 You know, there's a lot that we're working on 00:24:23.160 --> 00:24:27.680 and trying to provide as a tooling, 00:24:27.680 --> 00:24:31.400 but it's very, very new and very, you know, 00:24:31.400 --> 00:24:33.480 green, if I must say. 00:24:33.480 --> 00:24:35.320 So, yeah. 00:24:35.320 --> 00:24:38.360 - So maybe don't totally release a product on it just yet? 00:24:38.360 --> 00:24:43.840 Yes, definitely very bad idea to release a product on this, 00:24:43.840 --> 00:24:48.200 you know, expect APIs, code and features to change. 00:24:48.200 --> 00:24:56.440 Actually, it's one of the things that we intentionally talked about before Python was, 00:24:56.440 --> 00:25:01.120 you know, should we have a versioning in place or something like this, 00:25:01.120 --> 00:25:06.520 so that, you know, you would expect any project to go that goes out there to have versions and everything. 00:25:06.520 --> 00:25:12.160 We intentionally said no, let's wait because it is, 00:25:12.160 --> 00:25:18.800 or let's put a version like do not use in production.0.0.0.1. 00:25:18.800 --> 00:25:24.760 >> Yes. Mostly because with this, 00:25:24.760 --> 00:25:28.880 we wanted to have something that is working, 00:25:28.880 --> 00:25:30.700 that is useful, 00:25:30.700 --> 00:25:36.160 that it can be used by and hacked on by users day one. 00:25:36.160 --> 00:25:41.160 but also give the vision that we have in mind 00:25:41.160 --> 00:25:44.000 and for people to see the possibilities. 00:25:44.000 --> 00:25:47.620 And that was the main focus for the project until PyCon. 00:25:47.620 --> 00:25:51.200 Now, a lot of the following things 00:25:51.200 --> 00:25:55.600 are just the things that we want to achieve 00:25:55.600 --> 00:25:58.120 in order to enable a community. 00:25:58.120 --> 00:26:02.080 And this is an open source project. 00:26:02.080 --> 00:26:04.640 It's not an, it started at Anaconda, 00:26:04.640 --> 00:26:05.960 but it's an open source project. 00:26:05.960 --> 00:26:09.760 We want to have a strong community, 00:26:09.760 --> 00:26:13.220 have contributors beyond the Anaconda team, 00:26:13.220 --> 00:26:16.360 and do it together, right? 00:26:16.360 --> 00:26:17.480 - Yeah, that was one of my questions 00:26:17.480 --> 00:26:20.960 I wanted to ask you about is, 00:26:20.960 --> 00:26:23.020 it sounds like you all have a very strong vision 00:26:23.020 --> 00:26:25.560 of what this should be and where you want it to go. 00:26:25.560 --> 00:26:27.760 - Yes. 00:26:27.760 --> 00:26:28.580 - But from what you just said, 00:26:28.580 --> 00:26:31.380 I was wondering, does that mean it's more source open 00:26:31.380 --> 00:26:32.220 than open source? 00:26:32.220 --> 00:26:34.040 And like, we're driving this way and we'll take PRs 00:26:34.040 --> 00:26:35.880 as long as it's on our roadmap, 00:26:35.880 --> 00:26:40.640 or how open are you to people just jumping in 00:26:40.640 --> 00:26:43.160 and giving ideas and trying to build it up? 00:26:43.160 --> 00:26:46.240 - Yeah, great question. 00:26:46.240 --> 00:26:47.140 We are very open. 00:26:47.140 --> 00:26:51.120 So it's worth also saying that right now 00:26:51.120 --> 00:26:55.360 we are at the stage where I don't think we've made it 00:26:55.360 --> 00:27:01.520 that easy for people to onboard and understand the vision, 00:27:01.520 --> 00:27:06.060 understand the project and actually be able to contribute. 00:27:06.060 --> 00:27:07.600 We're missing a lot of documentation. 00:27:07.600 --> 00:27:11.580 So one of the biggest pushes that we've been having 00:27:11.580 --> 00:27:16.420 after PyCon is to actually build up the documentation 00:27:16.420 --> 00:27:20.480 around those things so that, you know, 00:27:20.480 --> 00:27:23.480 anyone contributing have a easier time on boarding, 00:27:23.480 --> 00:27:27.280 understand the visions and can give feedback 00:27:27.280 --> 00:27:29.700 based on those things. 00:27:29.700 --> 00:27:34.700 So as soon as we are also growing the team behind it, 00:27:34.700 --> 00:27:38.540 so there's a lot of small things that we are preparing 00:27:38.540 --> 00:27:43.540 for being a community that is on itself 00:27:43.540 --> 00:27:49.900 or itself organized and everything. 00:27:49.900 --> 00:27:54.900 So overall, I think that this is really a community project. 00:27:54.900 --> 00:27:56.460 - Sure. 00:27:56.460 --> 00:27:57.300 Speaking of community, 00:27:57.300 --> 00:27:59.180 let me just pull up the GitHub page. 00:27:59.180 --> 00:28:02.160 - So you're just shy of 10,000 stars. 00:28:02.160 --> 00:28:03.000 - Yeah, crazy. 00:28:03.000 --> 00:28:05.020 - I don't know how old it is, 00:28:05.020 --> 00:28:08.460 but how long has this repo been public? 00:28:08.460 --> 00:28:09.820 Not that long. 00:28:09.820 --> 00:28:11.660 - No, we actually made it public 00:28:11.660 --> 00:28:14.900 10 minutes in during Peter's talk. 00:28:14.900 --> 00:28:15.740 So it-- 00:28:15.740 --> 00:28:19.700 - Okay, so you're like half a flask almost 00:28:19.700 --> 00:28:24.180 or half of closing in on FastAPI levels 00:28:24.180 --> 00:28:25.060 of numbers of stars. 00:28:25.060 --> 00:28:27.060 There's a lot of interest in this. 00:28:27.060 --> 00:28:29.380 - Yes, which is really exciting, 00:28:29.380 --> 00:28:32.020 but also it's somehow overwhelming, right? 00:28:32.020 --> 00:28:32.860 Like, I'll be very honest. 00:28:32.860 --> 00:28:34.780 - Yeah, probably there's a lot of expectations as well. 00:28:34.780 --> 00:28:35.700 Right? 00:28:35.700 --> 00:28:36.660 - Yes, yes. 00:28:36.660 --> 00:28:41.060 And so we are aware of all of that. 00:28:41.060 --> 00:28:44.500 I think the main thing really for us is to, 00:28:44.500 --> 00:28:50.460 you know, we wanna make sure that our users have patience 00:28:50.460 --> 00:28:55.460 because we're trying to get to a stable state 00:28:55.460 --> 00:28:57.140 or at least-- 00:28:57.140 --> 00:28:59.340 - It's less than two weeks old, come on. 00:28:59.340 --> 00:29:00.580 - Exactly, yes. 00:29:00.580 --> 00:29:06.860 I could talk about this for hours, 00:29:06.860 --> 00:29:12.940 but at the same time, we wanna make sure that it's usable 00:29:12.940 --> 00:29:17.460 and we wanna collect users' feedback to make it better. 00:29:17.460 --> 00:29:20.780 Actually, one thing that is very important 00:29:20.780 --> 00:29:24.660 is that it got a lot of interest 00:29:24.660 --> 00:29:27.060 and a lot of excitement from the Python community 00:29:27.060 --> 00:29:29.580 and some of the web community as well. 00:29:29.580 --> 00:29:34.180 But I really wanna make sure 00:29:34.180 --> 00:29:37.100 that everyone understands the picture, 00:29:37.100 --> 00:29:39.180 the full picture is what Peter said, 00:29:39.180 --> 00:29:42.040 like programming for the 99%. 00:29:42.040 --> 00:29:45.020 So beyond developers, 00:29:45.020 --> 00:29:48.920 how can we have a tool 00:29:48.920 --> 00:29:51.700 that students can learn very fast, 00:29:51.700 --> 00:29:54.220 get to learning coding very fast, 00:29:54.220 --> 00:29:56.620 or even non-developers. 00:29:56.620 --> 00:30:00.100 I would love my mom to write her recipe book with MyScript, 00:30:00.100 --> 00:30:02.220 because it's that easy. 00:30:02.220 --> 00:30:03.640 And thinking about the possibility 00:30:03.640 --> 00:30:08.100 of shipping that in your phone or your mobile, 00:30:08.100 --> 00:30:11.020 users in developing countries that do not have access 00:30:11.020 --> 00:30:13.820 to computers and things like this, but they have a phone. 00:30:13.820 --> 00:30:17.940 What we also hope is that the social impact 00:30:17.940 --> 00:30:21.700 of a tool like this could be very big. 00:30:21.700 --> 00:30:24.060 One can dream. 00:30:24.060 --> 00:30:25.460 - Yeah, one can dream for sure. 00:30:25.460 --> 00:30:29.220 So something maybe you could take inspiration from 00:30:29.220 --> 00:30:31.300 is the Swift Playgrounds. 00:30:31.300 --> 00:30:33.940 Right, it seems like you can model that pretty well. 00:30:33.940 --> 00:30:37.140 And I feel like Swift was largely borrowing from Python 00:30:37.140 --> 00:30:38.080 in a lot of its ways. 00:30:38.080 --> 00:30:40.740 So it's time to borrow a little back from Swift. 00:30:40.740 --> 00:30:43.060 For people who don't know, Swift Playgrounds 00:30:43.060 --> 00:30:45.500 is like a little bit like a REPL, 00:30:45.500 --> 00:30:47.080 a little bit like Jupyter, 00:30:47.080 --> 00:30:52.080 but then on the right you get kind of more iOS outputs, 00:30:52.520 --> 00:30:56.440 like little widgets and graphs and animations and whatever. 00:30:56.440 --> 00:31:00.640 But it seems like that could be a similar way 00:31:00.640 --> 00:31:02.120 that's sort of like Jupyter, 00:31:02.120 --> 00:31:06.140 but also a little more web playful. 00:31:06.140 --> 00:31:08.460 - Right, yes. 00:31:08.460 --> 00:31:13.320 And I would say we have no shame 00:31:13.320 --> 00:31:16.320 into like borrowing from others, right? 00:31:16.320 --> 00:31:20.760 I think that actually is how you can grow well, 00:31:20.760 --> 00:31:24.960 like take what's successful from this community 00:31:24.960 --> 00:31:26.040 or this language, et cetera, 00:31:26.040 --> 00:31:29.440 and try to use that to make a better tool. 00:31:29.440 --> 00:31:32.400 - Yeah, I mean, because it's so early, 00:31:32.400 --> 00:31:35.100 because it's so fresh, like one of the drawbacks, 00:31:35.100 --> 00:31:37.440 call it a drawback, one of the temporary limitations 00:31:37.440 --> 00:31:40.560 is people can't just jump in and build the next version 00:31:40.560 --> 00:31:43.160 of Gmail or whatever with it right now. 00:31:43.160 --> 00:31:46.280 But a benefit is so many people wanna contribute 00:31:46.280 --> 00:31:49.040 to open source, and they're like, I love Django, 00:31:49.040 --> 00:31:50.000 I'm gonna contribute to that, 00:31:50.000 --> 00:31:57.840 I love Jupyter. I want to contribute to that. And then it's such a complex, highly leveraged, 00:31:57.840 --> 00:32:02.740 very polished system that like, well, contributing to that means you have like an insane level 00:32:02.740 --> 00:32:06.800 of understanding to make this little change that won't break everything else. Whereas 00:32:06.800 --> 00:32:11.000 this is pretty fresh, right? So if somebody wants to come along and build something like 00:32:11.000 --> 00:32:16.480 a Swift playground equivalent, the doors open for and I'm not sure how much you want to 00:32:16.480 --> 00:32:19.900 But like the door is open for people to be, 00:32:19.900 --> 00:32:24.260 to grab ideas that are lower hanging fruit at the moment. 00:32:24.260 --> 00:32:26.500 - Yeah, yes. 00:32:26.500 --> 00:32:31.500 And the idea is also to allow users to extend 00:32:31.500 --> 00:32:36.500 the tool itself and without having to change the tool, 00:32:36.500 --> 00:32:41.020 like with extensions and things like this. 00:32:41.020 --> 00:32:46.020 Like in my mind, I see that as a sort of Minecraft 00:32:46.180 --> 00:32:47.700 for programmers, right? 00:32:47.700 --> 00:32:50.580 Like you can build your own blocks 00:32:50.580 --> 00:32:52.980 and then share with others and then they can share. 00:32:52.980 --> 00:32:56.100 - Right, check out my mod pack for this thing or whatever. 00:32:56.100 --> 00:32:57.660 - Yes, yeah, yeah. 00:32:57.660 --> 00:33:00.300 And yeah, the idea is to make it well, 00:33:00.300 --> 00:33:03.820 powerful, but also fun and hackable. 00:33:03.820 --> 00:33:04.900 - Yeah, very cool. 00:33:04.900 --> 00:33:07.220 All right, now let's talk about, 00:33:07.220 --> 00:33:08.740 I know we talked to some of these things here, 00:33:08.740 --> 00:33:11.260 but let me just dive in a little bit on the bullet points 00:33:11.260 --> 00:33:14.420 to kind of do a wrap up summary 00:33:14.420 --> 00:33:16.400 before we move into the coding. 00:33:16.400 --> 00:33:17.880 So Python in the browser, 00:33:17.880 --> 00:33:22.300 this means it runs 100% in the browser 00:33:22.300 --> 00:33:24.880 through primarily WebAssembly, 00:33:24.880 --> 00:33:27.800 which is leveraging the Pyodide project, yeah? 00:33:27.800 --> 00:33:30.200 - Right, that's right. - Okay. 00:33:30.200 --> 00:33:32.760 And the WebAssembly stuff runs, 00:33:32.760 --> 00:33:35.480 I think, even better than the JavaScript, 00:33:35.480 --> 00:33:36.320 (laughs) 00:33:36.320 --> 00:33:39.200 the C code compiled to JavaScript, 00:33:39.200 --> 00:33:41.960 'cause this is still more of a binary form and whatnot. 00:33:43.000 --> 00:33:45.520 That's pretty excellent. 00:33:45.520 --> 00:33:47.920 One of the things that really inspires me here, 00:33:47.920 --> 00:33:51.880 you spoke about this will allow us to do things 00:33:51.880 --> 00:33:54.220 on our phones and on lower end computers 00:33:54.220 --> 00:33:55.360 and do other things like that 00:33:55.360 --> 00:33:56.920 where like now we have this possibility 00:33:56.920 --> 00:33:59.900 just if you have a browser, you can kind of do it. 00:33:59.900 --> 00:34:01.320 I totally agree and that's great. 00:34:01.320 --> 00:34:05.840 But what really gets me excited about where this could go 00:34:05.840 --> 00:34:10.840 is progressive web apps or something even like ElectronJS 00:34:10.840 --> 00:34:17.360 even like electron JS, right, where I build like a true desktop application like VS Code 00:34:17.360 --> 00:34:23.200 or slack or whatever, but instead of having to write everything in JavaScript, you know, 00:34:23.200 --> 00:34:27.640 write it in Python, right? And just got to include the two meg or three meg wasm file 00:34:27.640 --> 00:34:32.320 with your what is already a massive Chrome distribution. So no one would know anyway. 00:34:32.320 --> 00:34:39.480 Right? Anyway, so yeah, there's like this way to sort of, this is what I was hinting 00:34:39.480 --> 00:34:41.800 at the beginning as well like oh my gosh, 00:34:41.800 --> 00:34:45.080 we can have things in our dock that are like modern looking 00:34:45.080 --> 00:34:48.080 that are based on Python. 00:34:48.080 --> 00:34:49.680 Easily. 00:34:49.680 --> 00:34:50.880 Very exciting. 00:34:50.880 --> 00:34:52.120 Yes. 00:34:52.120 --> 00:35:01.280 And the whole story about the native apps and mobile 00:35:01.280 --> 00:35:04.520 and whatnot. 00:35:04.520 --> 00:35:07.920 Russell Keith McGee, maintainer of B-Ware, 00:35:07.920 --> 00:35:11.320 is he just joined Anaconda a few months ago. 00:35:11.320 --> 00:35:13.220 >> He did. I didn't know that. Excellent. 00:35:13.220 --> 00:35:16.480 >> Yes. He's been looking at the project, 00:35:16.480 --> 00:35:18.760 collaborating, contributing with some stuff. 00:35:18.760 --> 00:35:21.140 He actually made an example. 00:35:21.140 --> 00:35:24.380 One of the examples is written in Toga, 00:35:24.380 --> 00:35:28.640 which is the Beware Toolkit for UI design and stuff like this. 00:35:28.640 --> 00:35:30.560 It's built in Toga, 00:35:30.560 --> 00:35:33.480 but it has a PyScript backend so that it 00:35:33.480 --> 00:35:37.980 can render to PyScript directly. 00:35:37.980 --> 00:35:43.100 Pretty much like it can build for iOS or Android or Mac. 00:35:43.100 --> 00:35:47.200 But another interesting story is the opposite. 00:35:47.200 --> 00:35:51.680 Can we have a PyScript app that then Toga can transform 00:35:51.680 --> 00:35:55.680 into an electron-like app that you can just run on your mobile? 00:35:55.680 --> 00:35:58.240 >> Do it. Please do it. 00:35:58.240 --> 00:36:00.720 So many people will be happy. 00:36:00.720 --> 00:36:04.160 - Yeah, if you're listening, that's for you. 00:36:04.160 --> 00:36:05.960 - Yes, oh my goodness. 00:36:05.960 --> 00:36:08.560 Look, I think there are plenty of negatives 00:36:08.560 --> 00:36:13.200 about electron apps, like why does my password manager 00:36:13.200 --> 00:36:15.920 need 400 megs of RAM to run? 00:36:15.920 --> 00:36:20.300 But we have such a limited set of options 00:36:20.300 --> 00:36:23.320 for desktop and mobile apps in Python 00:36:23.320 --> 00:36:26.920 that for now, that would be massively welcome 00:36:26.920 --> 00:36:28.520 to do something like this. 00:36:28.520 --> 00:36:29.980 And then there's always possibilities of, 00:36:29.980 --> 00:36:31.540 well, do you actually have to ship Chrome 00:36:31.540 --> 00:36:32.860 in some massive runtime, 00:36:32.860 --> 00:36:34.460 or could there be a smaller host? 00:36:34.460 --> 00:36:38.300 There's layers of improvement. 00:36:38.300 --> 00:36:40.560 All right, next one, Python ecosystem. 00:36:40.560 --> 00:36:41.900 When you think about the history, 00:36:41.900 --> 00:36:43.860 this is not the first or the second time 00:36:43.860 --> 00:36:46.100 that someone has done Python in the browser. 00:36:46.100 --> 00:36:50.300 If you're familiar with, are you familiar with Anvil? 00:36:50.300 --> 00:36:51.320 - Yes. 00:36:51.320 --> 00:36:56.320 - So I had Meredith Ahn from Anvil 00:36:57.660 --> 00:36:59.960 to talk about both Anvil one time 00:36:59.960 --> 00:37:03.360 and then I think it was Sculpt, which is what they use. 00:37:03.360 --> 00:37:05.400 And Anvil has both a backend and frontend 00:37:05.400 --> 00:37:09.720 that's all Python and really interesting project. 00:37:09.720 --> 00:37:14.720 And they were using a JavaScript variant called Sculpt. 00:37:14.720 --> 00:37:16.520 And there's, I think, 00:37:16.520 --> 00:37:19.080 Brython is another one that you could choose. 00:37:19.080 --> 00:37:23.840 But one of the challenges of that is it's Python-like, 00:37:23.840 --> 00:37:24.680 right? 00:37:24.680 --> 00:37:26.340 It's not really the Python runtime. 00:37:26.340 --> 00:37:28.420 Do you maybe want to talk about how that differs 00:37:28.420 --> 00:37:33.320 from the Python ecosystem, Python runtime that you all have? 00:37:33.320 --> 00:37:34.160 - Right. 00:37:34.160 --> 00:37:37.340 That's exactly the difference, right? 00:37:37.340 --> 00:37:39.100 Like, and probably the PyDive folks 00:37:39.100 --> 00:37:42.020 would have a lot more to say, 00:37:42.020 --> 00:37:43.620 but the big difference is what you said. 00:37:43.620 --> 00:37:47.700 Like, it's Python-like, and it will mimic-- 00:37:47.700 --> 00:37:48.740 - For example, numerically, 00:37:48.740 --> 00:37:50.740 like JavaScript doesn't have integers, 00:37:50.740 --> 00:37:53.840 so your Python has to somehow fake integers 00:37:53.840 --> 00:37:56.400 if you're gonna do things like that, right? 00:37:56.400 --> 00:37:57.740 - Right, yes. 00:37:57.740 --> 00:38:01.660 So it's mimicking what you would expect with Python, 00:38:01.660 --> 00:38:03.160 but with the JavaScript. 00:38:03.160 --> 00:38:09.200 And it's not really a full-blown Python interpreter 00:38:09.200 --> 00:38:12.980 that you can also install your packages. 00:38:12.980 --> 00:38:17.320 The whole Python ecosystem is not supported. 00:38:17.320 --> 00:38:18.660 And I think that's the big difference 00:38:18.660 --> 00:38:21.840 that was the differentiator for Pyodide. 00:38:21.840 --> 00:38:25.040 And now that, you know, CPython actually compiles 00:38:25.040 --> 00:38:30.040 to Wasm through Emscripten, it's very exciting. 00:38:30.040 --> 00:38:34.320 - It's running the same VM or the same runtime 00:38:34.320 --> 00:38:38.040 that we get with CPython on our desktops, more or less. 00:38:38.040 --> 00:38:39.240 Like a cut down limited version, 00:38:39.240 --> 00:38:42.000 but it's not like a weird transpiled to JavaScript 00:38:42.000 --> 00:38:43.360 and then run it thing. 00:38:43.360 --> 00:38:44.640 - Yes, correct. 00:38:44.640 --> 00:38:48.800 With a few caveats, right? 00:38:48.800 --> 00:38:53.200 That's one of the things that I think is worth mentioning. 00:38:53.200 --> 00:39:00.640 It's the same CPython code and it's the same thing you get in your local installation. 00:39:00.640 --> 00:39:05.340 A few things are different just because the browser as a VM, 00:39:05.340 --> 00:39:07.000 they work differently. 00:39:07.000 --> 00:39:10.180 File system is different on the browser. 00:39:10.180 --> 00:39:12.440 >> Threading probably. 00:39:12.440 --> 00:39:17.000 >> Threading, multiprocessing, pipes, and things like this. 00:39:17.000 --> 00:39:20.560 There are solutions for some of these 00:39:20.560 --> 00:39:25.560 that will require work and probably upstream 00:39:25.560 --> 00:39:30.760 with some of the parts of the standard libraries 00:39:30.760 --> 00:39:33.080 or the third party packages, 00:39:33.080 --> 00:39:36.080 but they are just different. 00:39:36.080 --> 00:39:38.000 So we need to account for that. 00:39:38.000 --> 00:39:39.200 - Sure. 00:39:39.200 --> 00:39:40.040 All right. 00:39:40.040 --> 00:39:43.520 So you can use, it says many popular Python packages 00:39:43.520 --> 00:39:46.240 and stuff in the scientific data stack. 00:39:46.240 --> 00:39:50.360 - Question from the audience from Christopher Tyler says, 00:39:50.360 --> 00:39:53.240 my very limited understanding since you're using Pyodide 00:39:53.240 --> 00:39:55.640 is that there's a limitation on the libraries you can use, 00:39:55.640 --> 00:40:00.000 meaning can you import your own custom libraries? 00:40:00.000 --> 00:40:01.040 Generally it's yes, right? 00:40:01.040 --> 00:40:03.640 But not universally, isn't it? 00:40:03.640 --> 00:40:05.960 - Right, that's a great question. 00:40:05.960 --> 00:40:10.960 So you can, let's talk first about the standard libraries 00:40:10.960 --> 00:40:14.880 and the third party libraries that you have, 00:40:14.880 --> 00:40:15.840 PyPI, et cetera. 00:40:15.840 --> 00:40:19.040 So PyAOdyte ships with the sender library 00:40:19.040 --> 00:40:21.920 plus a set of packages that they ported. 00:40:21.920 --> 00:40:28.920 Most of these, they use C extensions and things like that. 00:40:28.920 --> 00:40:31.620 So they need to be compiled. 00:40:31.620 --> 00:40:36.340 And so the PyOdyte team took that work and took care of it. 00:40:36.340 --> 00:40:38.200 They're included in the distribution. 00:40:38.200 --> 00:40:43.400 There is a way for you to also build packages 00:40:43.400 --> 00:40:45.480 that depend on C extensions. 00:40:45.480 --> 00:40:50.360 they have a nice guide in their website that you can follow 00:40:50.360 --> 00:40:52.320 and they will help with that. 00:40:52.320 --> 00:40:58.080 In general, you should expect pure Python packages to work 00:40:58.080 --> 00:41:01.100 if you pip install them, right? 00:41:01.100 --> 00:41:06.100 The caveat there is, do they have other dependencies 00:41:06.100 --> 00:41:09.960 that depend on C extensions 00:41:09.960 --> 00:41:13.140 and that will cascade in what work? 00:41:13.140 --> 00:41:16.280 Or do they rely on some of the things 00:41:16.280 --> 00:41:20.800 that I mentioned before, like multi-processing and sockets 00:41:20.800 --> 00:41:21.920 and stuff? 00:41:21.920 --> 00:41:25.080 So in that case, the package may install, 00:41:25.080 --> 00:41:29.040 but it will raise an error because multi-processing is not 00:41:29.040 --> 00:41:30.080 supported or other-- 00:41:30.080 --> 00:41:33.680 >>What about simple stuff like async and await? 00:41:33.680 --> 00:41:35.400 >>Great question. 00:41:35.400 --> 00:41:36.280 That is-- 00:41:36.280 --> 00:41:38.200 >>It's not-- from a like-- 00:41:38.200 --> 00:41:40.480 what it expects of the operating system is pretty low, 00:41:40.480 --> 00:41:43.640 but it's also pretty advanced. 00:41:43.640 --> 00:41:46.400 - Right, that is more of, 00:41:46.400 --> 00:41:48.800 I think it's less of the packaging problem 00:41:48.800 --> 00:41:52.360 and more of a philosophical problem 00:41:52.360 --> 00:41:55.440 in terms of how you compare Python to JavaScript, 00:41:55.440 --> 00:41:57.480 for instance, right? 00:41:57.480 --> 00:42:02.080 JavaScript, even if it's synchronous as a language, 00:42:02.080 --> 00:42:05.720 it has built the idioms over time 00:42:05.720 --> 00:42:08.760 to always try to be asynchronous. 00:42:08.760 --> 00:42:10.460 because for obvious reasons, 00:42:10.460 --> 00:42:14.140 you don't want to block your browser 00:42:14.140 --> 00:42:16.520 or if you're doing something in your page 00:42:16.520 --> 00:42:18.760 and you block your Chrome on your phone. 00:42:18.760 --> 00:42:21.420 - And that way it seems like it should be a fantastic match 00:42:21.420 --> 00:42:22.960 for async and await. 00:42:22.960 --> 00:42:23.800 - Yes. 00:42:23.800 --> 00:42:25.360 - The way to know, oh yeah. 00:42:25.360 --> 00:42:27.000 - Yes, it is a fantastic match 00:42:27.000 --> 00:42:30.360 and almost everything that you do that would be blocking 00:42:30.360 --> 00:42:32.620 in JavaScript, you would async await. 00:42:32.620 --> 00:42:37.140 In Python, we are used to do everything blocking. 00:42:37.140 --> 00:42:40.180 And then when we want to do explicitly, 00:42:40.180 --> 00:42:43.740 we just, we use async I/O or something different. 00:42:43.740 --> 00:42:48.340 So I think on that side of things, 00:42:48.340 --> 00:42:51.780 it's more of a how you develop your Python code 00:42:51.780 --> 00:42:52.860 rather than the... 00:42:52.860 --> 00:42:57.820 - You might have to have a mental model 00:42:57.820 --> 00:42:59.900 that matches closer to like what JavaScript 00:42:59.900 --> 00:43:01.300 traditionally has. 00:43:01.300 --> 00:43:02.380 - Yes, yeah. 00:43:02.380 --> 00:43:04.420 But you know, we can use async await 00:43:04.420 --> 00:43:07.220 anywhere in your code in PyDive, in PyScript. 00:43:07.220 --> 00:43:09.140 - Oh, sweet. 00:43:09.140 --> 00:43:12.460 Okay, I should have started on this list here 00:43:12.460 --> 00:43:14.000 40 minutes ago. 00:43:14.000 --> 00:43:16.140 But next question from Roller is, 00:43:16.140 --> 00:43:18.580 how would I pip install something in the PyScript? 00:43:18.580 --> 00:43:20.820 Which is, you know, a follow-up from what Chris asked 00:43:20.820 --> 00:43:22.820 in this like Python ecosystem integration. 00:43:22.820 --> 00:43:25.820 Clearly, pip install a thing is like, 00:43:25.820 --> 00:43:29.340 gotta be at least 30% why Python is so popular. 00:43:29.340 --> 00:43:30.900 - Right. 00:43:30.900 --> 00:43:35.220 Yeah, not commenting on the packaging for Python 00:43:35.220 --> 00:43:36.140 or JavaScript. 00:43:36.140 --> 00:43:41.260 And we all know that most people don't have problems with them. 00:43:41.260 --> 00:43:43.060 They all have idiosyncrasies, let's say. 00:43:43.060 --> 00:43:45.020 They all got their weirdnesses. 00:43:45.020 --> 00:43:46.140 Right. 00:43:46.140 --> 00:43:50.380 So Pyodyne itself allows you to use 00:43:50.380 --> 00:43:55.820 MicroPip, which is-- we will pip install your dependencies. 00:43:55.820 --> 00:43:58.180 So like an NPM-like thing, where it creates-- 00:43:58.180 --> 00:44:01.820 Instead of a node module, it creates something else. 00:44:01.820 --> 00:44:05.020 - Yeah, instead of a node, it's like NPM, 00:44:05.020 --> 00:44:07.340 or it's more like pip really for Python. 00:44:07.340 --> 00:44:10.740 And we'll go, and if it's a package provided 00:44:10.740 --> 00:44:14.980 by Pyodite itself, we will load that package for you. 00:44:14.980 --> 00:44:17.420 If it's a package that is not available there, 00:44:17.420 --> 00:44:19.900 it will check on IPI. 00:44:19.900 --> 00:44:24.540 And you can also specify the location of the package itself. 00:44:24.540 --> 00:44:27.300 So if you have your own repository, 00:44:27.300 --> 00:44:30.540 but you have your URL to that points to a wheel file 00:44:30.540 --> 00:44:32.580 or a zip file, it will install from there. 00:44:32.580 --> 00:44:33.840 - Yeah, and that wheel can be remote, 00:44:33.840 --> 00:44:36.360 just like you might have a CDN pointed thing 00:44:36.360 --> 00:44:39.460 for JavaScript, like here's my wheel, okay. 00:44:39.460 --> 00:44:40.740 If it's pure Python, right? 00:44:40.740 --> 00:44:43.340 If it's C, then all bets are off. 00:44:43.340 --> 00:44:47.080 - If it's C, you should have done your duty 00:44:47.080 --> 00:44:50.120 and ported it to WebAssembly. 00:44:50.120 --> 00:44:54.260 But the PyScript provides a layer on top of that, 00:44:54.260 --> 00:44:58.820 where you can specify a tag called PyEnv 00:44:58.820 --> 00:45:02.380 and it accepts YAML format 00:45:02.380 --> 00:45:04.620 and you can specify your dependencies there 00:45:04.620 --> 00:45:09.620 and both for packages and also has an extra key called paths 00:45:09.620 --> 00:45:14.060 where you can actually provide the link to your modules. 00:45:14.060 --> 00:45:18.740 - Effectively like the working directory of your Python. 00:45:18.740 --> 00:45:21.740 So when you type import file name or directory slash file 00:45:21.740 --> 00:45:24.780 it kind of mirrors that to the browser, right? 00:45:24.780 --> 00:45:25.900 - Yes, exactly that. 00:45:25.900 --> 00:45:27.900 If you know how Python works, 00:45:27.900 --> 00:45:31.420 it's basically adding those files to your sys path. 00:45:31.420 --> 00:45:34.060 So it finds them. 00:45:34.060 --> 00:45:35.300 - Yeah, cool, cool. 00:45:35.300 --> 00:45:37.740 All right, another one that's really important here 00:45:37.740 --> 00:45:40.900 is Python with JavaScript. 00:45:40.900 --> 00:45:42.260 So it's not like you're locked 00:45:42.260 --> 00:45:45.860 into this PyScript little box, right? 00:45:45.860 --> 00:45:47.380 What I think, this is another thing 00:45:47.380 --> 00:45:49.500 that makes me very optimistic for the future 00:45:49.500 --> 00:45:53.300 is you can communicate back to other JavaScript, 00:45:53.300 --> 00:45:56.120 to JavaScript events, button clicks to the DOM. 00:45:56.120 --> 00:45:59.960 So if, here's another dream that I have, 00:45:59.960 --> 00:46:04.960 is something like a Vue.js wrapper type of thing 00:46:04.960 --> 00:46:07.440 that I could do in Python, 00:46:07.440 --> 00:46:12.440 and then do sort of model binding or attribute binding 00:46:12.440 --> 00:46:15.460 to the DOM and have that sort of stuff happening. 00:46:15.460 --> 00:46:18.700 And this is really important to make it a first class citizen 00:46:18.700 --> 00:46:20.660 that can work with all the stuff on the page, 00:46:20.660 --> 00:46:23.500 not like a canvas it was given or something. 00:46:23.500 --> 00:46:25.300 - Yeah, yeah. 00:46:25.300 --> 00:46:27.060 So before I go into this, 00:46:27.060 --> 00:46:29.580 I wanna plus one on what you said 00:46:29.580 --> 00:46:33.340 around reactive sort of programming and components 00:46:33.340 --> 00:46:35.260 where they can be attributes 00:46:35.260 --> 00:46:38.940 that auto notify others elements. 00:46:38.940 --> 00:46:42.100 So that is definitely something 00:46:42.100 --> 00:46:44.260 that we would love to explore more 00:46:44.260 --> 00:46:46.420 and there's a lot of interest. 00:46:46.420 --> 00:46:49.140 And on the Python with JavaScript side of things, 00:46:49.140 --> 00:46:54.140 after the keynote at PyCon, I saw a lot of videos coming up 00:46:54.140 --> 00:46:59.860 with like, oh, is JavaScript that now that Python 00:46:59.860 --> 00:47:03.440 can run on the browser and things like this? 00:47:03.440 --> 00:47:08.440 I think that narrative kind of looks at one side 00:47:08.440 --> 00:47:13.940 versus the other, where what we really wanna encourage 00:47:14.700 --> 00:47:17.700 is actually the two together, right? 00:47:17.700 --> 00:47:21.460 There is a ton of really great libraries in JavaScript. 00:47:21.460 --> 00:47:24.780 And there is a level of maturity in JavaScript 00:47:24.780 --> 00:47:27.860 on things on the browser or UI creation, 00:47:27.860 --> 00:47:32.560 or drawing on canvas or on the page 00:47:32.560 --> 00:47:37.560 that we were nowhere close to the 1% in Python. 00:47:37.560 --> 00:47:41.040 And all of a sudden you can use those tools in Python 00:47:41.040 --> 00:47:42.740 and vice versa. 00:47:42.740 --> 00:47:46.620 all of a sudden JavaScript users could use NumPy or SciPy 00:47:46.620 --> 00:47:49.120 and other things to power their applications, right? 00:47:49.120 --> 00:47:50.300 So I think- - That's interesting. 00:47:50.300 --> 00:47:52.660 I really thought about the benefit others, 00:47:52.660 --> 00:47:55.940 like outside of Python people may be receiving, but yeah. 00:47:55.940 --> 00:47:57.140 - Yeah. - Now Python becomes 00:47:57.140 --> 00:47:59.060 a thing so they could leverage, yeah. 00:47:59.060 --> 00:48:03.540 - Exactly, I think if we start looking at this that way, 00:48:03.540 --> 00:48:05.900 then you can see how PyScript is a glue 00:48:05.900 --> 00:48:08.500 for building richer applications, 00:48:08.500 --> 00:48:09.900 depending like independently, 00:48:09.900 --> 00:48:12.680 if you're a JavaScript developer or Python developer, 00:48:12.680 --> 00:48:17.180 And we are starting with Python, it makes a lot of sense. 00:48:17.180 --> 00:48:22.180 But if there is a Rust implementation on Lasm or R, 00:48:22.180 --> 00:48:26.000 I'm sure that the Python scientific community 00:48:26.000 --> 00:48:30.520 will love to use R tools in the page with Python stuff 00:48:30.520 --> 00:48:33.440 and maybe JavaScript as well, right? 00:48:33.440 --> 00:48:34.380 - Yeah. 00:48:34.380 --> 00:48:38.600 - I think it's building together kind of movement 00:48:38.600 --> 00:48:40.760 that we wanna push forward. 00:48:40.760 --> 00:48:44.800 - Yeah, if I can look out and imagine a future, 00:48:44.800 --> 00:48:46.480 I don't know that there's a chance 00:48:46.480 --> 00:48:47.500 how much it would exist, 00:48:47.500 --> 00:48:49.000 but a really great future of like, 00:48:49.000 --> 00:48:51.280 well, we have WebAssembly. 00:48:51.280 --> 00:48:53.460 What if we really made WebAssembly 00:48:53.460 --> 00:48:55.660 more of a first-class citizen 00:48:55.660 --> 00:48:58.560 from a browser maker perspective? 00:48:58.560 --> 00:49:00.680 One things I think would be fantastic is 00:49:00.680 --> 00:49:03.920 if instead of getting to the DOM through JavaScript 00:49:03.920 --> 00:49:05.840 and through the events through JavaScript, 00:49:05.840 --> 00:49:07.920 is if all of the browser makers said, 00:49:07.920 --> 00:49:11.460 "Here's a WebAssembly native thing that you can use 00:49:11.460 --> 00:49:14.540 "to bind to the DOM and to the events 00:49:14.540 --> 00:49:17.060 "and basically control it." 00:49:17.060 --> 00:49:18.900 You could have Rust in the browser, 00:49:18.900 --> 00:49:20.860 Python in the browser, C# in the browser, 00:49:20.860 --> 00:49:24.260 and they could all have this common API defined 00:49:24.260 --> 00:49:27.020 and maybe even an adapter type thing, 00:49:27.020 --> 00:49:28.540 like, well, in C# it's classes, 00:49:28.540 --> 00:49:31.460 and in Python it's lambdas, I don't know, whatever, right? 00:49:31.460 --> 00:49:35.060 Like some variation that's more native to your world. 00:49:35.060 --> 00:49:36.980 But if there was some kind of interaction 00:49:36.980 --> 00:49:39.760 that we could build on, that would be even better, 00:49:39.760 --> 00:49:40.660 but we don't have that. 00:49:40.660 --> 00:49:42.300 So this integration with JavaScript 00:49:42.300 --> 00:49:45.620 and all of its modern features is fantastic. 00:49:45.620 --> 00:49:46.620 You still would want that, 00:49:46.620 --> 00:49:48.100 but it would be nice if there was a way, 00:49:48.100 --> 00:49:49.900 just put Python aside. 00:49:49.900 --> 00:49:51.300 Like if I'm doing WebAssembly stuff 00:49:51.300 --> 00:49:53.140 that I could stay in WebAssembly, 00:49:53.140 --> 00:49:56.980 stay native to interact more with the browser. 00:49:56.980 --> 00:49:59.260 - Yeah, and honestly, the interaction 00:49:59.260 --> 00:50:02.380 between the WebAssembly part of it and JavaScript, 00:50:02.380 --> 00:50:03.460 it's very fast. 00:50:05.220 --> 00:50:08.340 But I want to highlight one thing that you said. 00:50:08.340 --> 00:50:12.100 A lot of the future and how can this improve 00:50:12.100 --> 00:50:17.100 is on the browser folks. 00:50:17.100 --> 00:50:17.940 - It's on the vendors. 00:50:17.940 --> 00:50:19.340 Yeah, it's on their shoulders to do it. 00:50:19.340 --> 00:50:24.340 - Yes, 'cause like the huge bottleneck 00:50:24.340 --> 00:50:27.220 that we have right now is that you still, 00:50:27.220 --> 00:50:28.500 like when you load your things, 00:50:28.500 --> 00:50:30.160 you still need to compile them 00:50:30.160 --> 00:50:32.340 and run them in WebAssembly. 00:50:32.340 --> 00:50:36.380 So there's a, the loading time right now is very high 00:50:36.380 --> 00:50:38.700 and we're working on optimizing things. 00:50:38.700 --> 00:50:42.980 And there's a lot of work, great work from the CPython folks 00:50:42.980 --> 00:50:46.100 and the Pylite folks to reduce the size of things 00:50:46.100 --> 00:50:49.140 that you're shipping by default. 00:50:49.140 --> 00:50:52.500 But ultimately, if you have a large scientific application 00:50:52.500 --> 00:50:55.540 you still want to install NumPy and Bokeh 00:50:55.540 --> 00:50:58.960 and other stuff like this, and you will have a loading time. 00:50:58.960 --> 00:50:59.880 - There is a loading time. 00:50:59.880 --> 00:51:01.820 And, you know, I think that might mean 00:51:01.820 --> 00:51:05.580 it doesn't make sense for the homepage of Reddit 00:51:05.580 --> 00:51:10.420 or like your marketing page that needs to load super fast 00:51:10.420 --> 00:51:12.760 to have to be implemented in this. 00:51:12.760 --> 00:51:17.340 But if you're writing something like Google Maps, Gmail, 00:51:17.340 --> 00:51:19.420 or like I go to those sites and then they spend and spend 00:51:19.420 --> 00:51:22.060 and spend for three seconds already, you know, 00:51:22.060 --> 00:51:25.020 like the first time you hit that, it does that. 00:51:25.020 --> 00:51:26.860 The second time it would just be cached, right? 00:51:26.860 --> 00:51:31.100 All the stuff is off the WebAssembly stuff 00:51:31.100 --> 00:51:32.500 It's just off disk and it, 00:51:32.500 --> 00:51:36.300 if your expectation is this page might take two seconds 00:51:36.300 --> 00:51:40.140 to load sometimes, you're good, I think, honestly. 00:51:40.140 --> 00:51:41.780 - Yeah, yeah. 00:51:41.780 --> 00:51:44.020 All that to say like, this is the current state, right? 00:51:44.020 --> 00:51:47.260 I think there's a huge margin for improvement in the future 00:51:47.260 --> 00:51:50.500 and a lot of really great people are looking at it. 00:51:50.500 --> 00:51:51.340 - Yeah, okay. 00:51:51.340 --> 00:51:55.660 I agree and I think the momentum is just building. 00:51:55.660 --> 00:51:57.540 So let's look at some code and some examples 00:51:57.540 --> 00:52:00.660 so we can make this concrete for people over audio, 00:52:00.660 --> 00:52:02.180 which is tricky, but let's do it anyway. 00:52:02.180 --> 00:52:05.740 So you've got the GitHub page, 00:52:05.740 --> 00:52:08.300 which has a bunch of examples. 00:52:08.300 --> 00:52:10.300 And so what I wanna do is kind of just pull up 00:52:10.300 --> 00:52:14.800 some of the examples here and let me remind myself 00:52:14.800 --> 00:52:16.260 what they are called. 00:52:16.260 --> 00:52:19.040 Let's do this one first, actually. 00:52:19.040 --> 00:52:23.540 I wanna look at anti-gravity. 00:52:23.540 --> 00:52:27.660 So we all know the XKCD. 00:52:27.660 --> 00:52:29.220 And if you go to the REPL in Python, 00:52:29.220 --> 00:52:33.060 you type import anti-gravity, amazing stuff happens. 00:52:33.060 --> 00:52:37.380 And so here we have that equivalent in PyScript, 00:52:37.380 --> 00:52:38.460 but there's a couple of things 00:52:38.460 --> 00:52:39.500 that are really interesting about this. 00:52:39.500 --> 00:52:40.460 So let's pull this up. 00:52:40.460 --> 00:52:42.820 It says based on this thing, and you give it a second, 00:52:42.820 --> 00:52:47.700 and it says, the XKCD is, how are you flying? 00:52:47.700 --> 00:52:49.860 There's someone up there flying, like Python. 00:52:49.860 --> 00:52:51.660 I just imported anti-gravity, right? 00:52:51.660 --> 00:52:52.580 It's great. 00:52:52.580 --> 00:52:53.740 But this is a variation. 00:52:53.740 --> 00:52:56.860 Do maybe describe what just happened on the screen here. 00:52:56.860 --> 00:53:00.040 People can go to the demo and watch it, of course. 00:53:00.040 --> 00:53:02.200 They just check out the repo. 00:53:02.200 --> 00:53:07.040 This is a great, great example done by Philip Rudiger. 00:53:07.040 --> 00:53:10.200 His core contributor to PyScript, 00:53:10.200 --> 00:53:13.800 but also contributor to panel, HoloViews. 00:53:13.800 --> 00:53:16.520 OK, he's done a lot of great stuff. 00:53:16.520 --> 00:53:22.520 And what's happening here is we're loading the SVG first. 00:53:22.520 --> 00:53:25.080 And then there's another Python function 00:53:25.080 --> 00:53:30.080 that basically takes that the stickman and makes it float. 00:53:30.080 --> 00:53:32.240 But basically- 00:53:32.240 --> 00:53:34.880 - It literally animates and flies up into the sky. 00:53:34.880 --> 00:53:38.080 Like it really takes off, not just it's up there, right? 00:53:38.080 --> 00:53:39.000 - Yes, yes. 00:53:39.000 --> 00:53:42.880 And for anyone wanting to check them out, 00:53:42.880 --> 00:53:47.880 the examples are also available on PyScript.net/examples 00:53:47.880 --> 00:53:50.240 and you can run them directly there. 00:53:50.240 --> 00:53:51.080 - Interesting. 00:53:51.080 --> 00:53:56.080 - Yeah, cool. 00:53:56.080 --> 00:53:59.460 Okay, yeah, we'll link to that as well. 00:53:59.460 --> 00:54:01.660 So I said this is interesting. 00:54:01.660 --> 00:54:03.300 It's interesting for several reasons. 00:54:03.300 --> 00:54:07.460 One, if I go and look at my task manager in Vivaldi, 00:54:07.460 --> 00:54:11.340 this is doing like 30% CPU, constantly refreshing. 00:54:11.340 --> 00:54:12.420 I don't know what the frame rate is, 00:54:12.420 --> 00:54:16.380 but it seems certainly passable in terms of 00:54:16.380 --> 00:54:18.500 there's cool animations going on, 00:54:19.500 --> 00:54:21.600 on this rendering this canvas. 00:54:21.600 --> 00:54:24.660 It looks good, right? 00:54:24.660 --> 00:54:26.620 It doesn't seem like, oh, this just isn't gonna work. 00:54:26.620 --> 00:54:28.660 It's like the person doesn't like glitch. 00:54:28.660 --> 00:54:29.500 (laughs) 00:54:29.500 --> 00:54:30.780 - Right, right. - You know what I mean? 00:54:30.780 --> 00:54:31.820 - Yeah. - The other one is 00:54:31.820 --> 00:54:33.460 it highlights many of the things 00:54:33.460 --> 00:54:35.460 that I think are pretty interesting here. 00:54:35.460 --> 00:54:38.180 Let me pull up the code for the example. 00:54:38.180 --> 00:54:40.460 And this maybe will give us a chance 00:54:40.460 --> 00:54:42.360 to talk through the programming model. 00:54:42.360 --> 00:54:45.580 So first of all, the first thing that's interesting 00:54:45.580 --> 00:54:48.420 is it has this pie E and V section. 00:54:48.420 --> 00:54:52.500 and you have, people maybe have seen examples 00:54:52.500 --> 00:54:53.860 and if you go to the home screen, 00:54:53.860 --> 00:54:56.800 you can actually, the pyscript.net, 00:54:56.800 --> 00:55:00.460 it says there's new tag done through web components 00:55:00.460 --> 00:55:02.500 called py-script instead of just script 00:55:02.500 --> 00:55:06.940 and you can just write Python code directly in the browser. 00:55:06.940 --> 00:55:08.900 But you only wanna do that for so long 00:55:08.900 --> 00:55:12.500 until you wanna read it across a couple pages or whatever. 00:55:12.500 --> 00:55:14.740 So what's really cool here is the implementation of this 00:55:14.740 --> 00:55:18.760 is actually a custom Python file on the server, right? 00:55:18.760 --> 00:55:21.680 - Yeah, exactly. 00:55:21.680 --> 00:55:26.680 We are, we been working on that for some time, 00:55:26.680 --> 00:55:29.800 the design of this, 'cause as you said, 00:55:29.800 --> 00:55:33.440 there's a tension between allowing people 00:55:33.440 --> 00:55:35.360 to just drop things in the page 00:55:35.360 --> 00:55:36.920 and then have your Python code there. 00:55:36.920 --> 00:55:41.920 And it just works to also, you know, 00:55:42.000 --> 00:55:47.280 suggesting better patterns to do this. 00:55:47.280 --> 00:55:50.920 You definitely don't, from a quality point of view, 00:55:50.920 --> 00:55:53.960 it's really hard to test anything that you just drop on the page. 00:55:53.960 --> 00:55:55.520 A readability point of view. 00:55:55.520 --> 00:55:57.720 >> A refactor it or anything. 00:55:57.720 --> 00:56:00.520 >> Right. But at the same time, 00:56:00.520 --> 00:56:04.840 we really want this to be something that people can play with and hack 00:56:04.840 --> 00:56:08.520 with and then don't have too much to think about, 00:56:08.520 --> 00:56:10.920 oh, I need a file, I need to name it Python 00:56:10.920 --> 00:56:12.120 and all of that. 00:56:12.120 --> 00:56:14.640 - If there was a NPM install step 00:56:14.640 --> 00:56:17.520 and then there was a compile step and then a pack step, 00:56:17.520 --> 00:56:20.240 like you would shave off like 75% of the people 00:56:20.240 --> 00:56:22.000 who are just wanting to check it out. 00:56:22.000 --> 00:56:24.800 - Right, so we allow this pattern, 00:56:24.800 --> 00:56:27.920 but you could also say like the same code could be 00:56:27.920 --> 00:56:30.400 the same thing in PyEnv and then in PyScript, 00:56:30.400 --> 00:56:33.440 you could also have PyScript source equals 00:56:33.440 --> 00:56:34.920 in a Python file. 00:56:34.920 --> 00:56:37.900 So you can run that from files as well. 00:56:37.900 --> 00:56:42.020 - Right, yeah, so just like with the regular script tagging, 00:56:42.020 --> 00:56:44.820 say source, and it can do a thing on startup, 00:56:44.820 --> 00:56:49.820 you know, like jQuery did its $document.ready hook 00:56:49.820 --> 00:56:51.900 right at the top all the time. 00:56:51.900 --> 00:56:54.420 Like you could do the equivalent of something like that. 00:56:54.420 --> 00:56:56.340 Okay, this is cool, but this is only part of it. 00:56:56.340 --> 00:56:59.460 Let me open up the other file, the antigravity.py. 00:56:59.460 --> 00:57:01.100 And this is the one, this is the one 00:57:01.100 --> 00:57:04.460 that made me really happy because when I look at this, 00:57:04.460 --> 00:57:06.980 it's, you know, how is that animation happening, right? 00:57:06.980 --> 00:57:10.820 what you do is you set a timer to do a callback, 00:57:10.820 --> 00:57:12.180 you know, where you are in JavaScript, 00:57:12.180 --> 00:57:14.060 and it goes click, click, click, click, click. 00:57:14.060 --> 00:57:16.180 Let's see how often are you doing this? 00:57:16.180 --> 00:57:19.980 Do you remember what the target frame rate was here? 00:57:19.980 --> 00:57:21.060 I'm looking. 00:57:21.060 --> 00:57:22.300 - I don't remember. 00:57:22.300 --> 00:57:23.780 - Yeah, anyway, there's some sort of time 00:57:23.780 --> 00:57:26.420 where you say run it this frequently. 00:57:26.420 --> 00:57:30.180 And basically what you do is you go over here 00:57:30.180 --> 00:57:31.860 and you say, this is Python, 00:57:31.860 --> 00:57:35.400 you say document get element by ID. 00:57:35.400 --> 00:57:37.040 All right, first of all, awesome. 00:57:37.040 --> 00:57:38.860 With a ternary expression. 00:57:38.860 --> 00:57:44.840 And then you go and add through the DOM parser, 00:57:44.840 --> 00:57:46.940 you add the SVG in there. 00:57:46.940 --> 00:57:47.940 That's amazing. 00:57:47.940 --> 00:57:52.040 You do a replace child with some HTML stuff. 00:57:52.040 --> 00:57:57.040 And then you go and you hook this set interval. 00:57:57.040 --> 00:57:58.640 So set interval is the way to say, 00:57:58.640 --> 00:58:00.900 set a callback on a timer in JavaScript. 00:58:01.980 --> 00:58:06.540 and then you just call the Python function self.move. 00:58:06.540 --> 00:58:08.720 Right, so there's a really cool interaction 00:58:08.720 --> 00:58:13.100 between JavaScript that's happening at a high frequency 00:58:13.100 --> 00:58:17.260 that shows do some stuff in Python, 00:58:17.260 --> 00:58:20.580 go over to JavaScript, you know, go through the DOM 00:58:20.580 --> 00:58:22.080 and then call back into Python 00:58:22.080 --> 00:58:23.480 when things that are interesting happen. 00:58:23.480 --> 00:58:25.460 Here is an interval, but it could be a button click 00:58:25.460 --> 00:58:28.400 or a dropdown select or whatever, right? 00:58:28.400 --> 00:58:29.540 - Right, right. 00:58:29.540 --> 00:58:33.900 And we are also, we're doing some work right now 00:58:33.900 --> 00:58:36.960 at providing a higher level interface 00:58:36.960 --> 00:58:41.960 that would be more Pythonic to those JavaScript, 00:58:41.960 --> 00:58:45.500 the usual things that you would always do in JavaScript, 00:58:45.500 --> 00:58:48.820 like selecting an element by ID or class 00:58:48.820 --> 00:58:49.660 or things like this. 00:58:49.660 --> 00:58:53.620 - A CSS selector sort of model or something, yeah. 00:58:53.620 --> 00:58:54.520 - Yeah, exactly. 00:58:54.520 --> 00:58:57.820 So I think the goal is to provide the simplest 00:58:57.820 --> 00:59:02.420 and more expressive or Pythonic interface that we could 00:59:02.420 --> 00:59:04.200 to hide some of that complexity, 00:59:04.200 --> 00:59:07.500 because at the end, a lot of Python users or new users 00:59:07.500 --> 00:59:10.860 will have to end up learning about JavaScript itself. 00:59:10.860 --> 00:59:13.020 - You're like, I didn't wanna learn JavaScript 00:59:13.020 --> 00:59:14.660 and here I am learning JavaScript. 00:59:14.660 --> 00:59:16.100 I think what you're learning though is not, 00:59:16.100 --> 00:59:17.620 you're not learning JavaScript. 00:59:17.620 --> 00:59:20.420 What you're learning is the DOM API, 00:59:20.420 --> 00:59:23.460 the APIs that JavaScript often consumes. 00:59:23.460 --> 00:59:24.420 - Right, correct. - You have to learn 00:59:24.420 --> 00:59:27.820 that the DOM has a get element by tag name 00:59:27.820 --> 00:59:32.820 rather than I have to say, I can't say var anymore, 00:59:32.820 --> 00:59:36.980 var char, they have to say let or else it'll complain. 00:59:36.980 --> 00:59:37.820 You know what I mean? 00:59:37.820 --> 00:59:39.820 Like you're not learning the language nuances 00:59:39.820 --> 00:59:41.500 but you are learning the APIs 00:59:41.500 --> 00:59:43.820 that JavaScript people are very common. 00:59:43.820 --> 00:59:45.580 - Yeah, and it's a great point. 00:59:45.580 --> 00:59:47.700 Like another thing, for instance, 00:59:47.700 --> 00:59:50.660 the set interval could be replaced with full Python 00:59:50.660 --> 00:59:54.260 and just say like from async I/O import sleep, 00:59:54.260 --> 00:59:56.820 you know, time sleep, and then while-- 00:59:56.820 --> 00:59:57.900 - Let's do a loop. 00:59:57.900 --> 01:00:01.220 - There's do a loop and async await there. 01:00:01.220 --> 01:00:02.220 - Oh, no kidding, okay. 01:00:02.220 --> 01:00:04.260 Like a while true. 01:00:04.260 --> 01:00:05.300 - Exactly. 01:00:05.300 --> 01:00:07.500 - Await sleep, then move. 01:00:07.500 --> 01:00:09.260 Okay, yeah, this is really, really neat. 01:00:09.260 --> 01:00:13.660 I think this example is so simple, it's playful, 01:00:13.660 --> 01:00:18.380 and it's not just, we put a graph on the page. 01:00:18.380 --> 01:00:19.620 Not to say that that's not important, 01:00:19.620 --> 01:00:23.720 but it's different than what we've seen before often. 01:00:23.720 --> 01:00:26.780 - Yeah, honestly, really props to you, Philip. 01:00:26.780 --> 01:00:29.560 Like, and I don't know what, 50 lines of code 01:00:29.560 --> 01:00:31.280 or 40 lines of code. 01:00:31.280 --> 01:00:33.620 - Yeah, 45 for the entire implementation 01:00:33.620 --> 01:00:36.080 of a flying anti-gravity. 01:00:36.080 --> 01:00:39.300 - Right, pretty neat, yeah. 01:00:39.300 --> 01:00:43.580 - And in Python, those are not 45 lines of JavaScript. 01:00:43.580 --> 01:00:44.560 - Right. 01:00:44.560 --> 01:00:47.220 - Cool, okay, audience question. 01:00:47.220 --> 01:00:49.800 Marcel says, "Would it accept loading data 01:00:49.800 --> 01:00:52.020 "from a file for processing?" 01:00:52.020 --> 01:00:53.720 like, you know, we're pulling the modules, 01:00:53.720 --> 01:00:56.100 but like, what's the data story? 01:00:56.100 --> 01:00:58.720 - That's a really, really great question. 01:00:58.720 --> 01:01:02.780 I think the data story is yet to be told. 01:01:02.780 --> 01:01:05.680 We're dedicating a lot of effort to that. 01:01:05.680 --> 01:01:12.180 Right now you can load data using fetch basically, 01:01:12.180 --> 01:01:15.140 and you can fetch data and then read just like normal files. 01:01:15.140 --> 01:01:19.740 PyDite provides a PyFetch wrapper 01:01:19.740 --> 01:01:22.580 around the JavaScript fetch, 01:01:22.580 --> 01:01:26.460 but there is a lot that can be done 01:01:26.460 --> 01:01:29.580 and we are working on it to have better support 01:01:29.580 --> 01:01:31.380 and just, you know, 01:01:31.380 --> 01:01:34.260 how does the story for larger files look like? 01:01:34.260 --> 01:01:35.500 And-- 01:01:35.500 --> 01:01:38.020 - Can I do a Panda read CSV and give it a URL 01:01:38.020 --> 01:01:39.180 or something like that? 01:01:39.180 --> 01:01:41.380 - That's a great question. 01:01:41.380 --> 01:01:42.580 I'm not sure. - I don't know. 01:01:42.580 --> 01:01:43.420 - Yeah, I don't know. 01:01:43.420 --> 01:01:45.620 - I have no idea, I'm really just wondering, yeah. 01:01:45.620 --> 01:01:48.980 - Yeah, but yeah, that's one of the stories 01:01:48.980 --> 01:01:51.620 that I think needs more development. 01:01:51.620 --> 01:01:53.260 Right now you can pull files 01:01:53.260 --> 01:01:55.280 and read them with that method, 01:01:55.280 --> 01:01:58.460 but there's more work to be done there. 01:01:58.460 --> 01:02:00.420 - Yeah, okay, cool. 01:02:00.420 --> 01:02:03.660 Let's look at another demo here. 01:02:03.660 --> 01:02:05.940 Let's see, give me, I'm running out of time, so good. 01:02:05.940 --> 01:02:08.580 Okay, this one's interesting too. 01:02:08.580 --> 01:02:11.820 This panel, I think it's panel stream is the one. 01:02:11.820 --> 01:02:12.660 Number here. 01:02:12.660 --> 01:02:15.700 - And this is one of those 01:02:15.700 --> 01:02:17.700 that is gonna take some time to load 01:02:17.700 --> 01:02:20.500 because under the hood, it's installing panel 01:02:20.500 --> 01:02:23.700 and installing bouquet, I think, 01:02:23.700 --> 01:02:27.900 and other visualization libraries that are heavier. 01:02:27.900 --> 01:02:29.140 - Right, right, right. 01:02:29.140 --> 01:02:31.820 So, oops, I'm gonna get too wide, 01:02:31.820 --> 01:02:33.500 but maybe I'll zoom it out. 01:02:33.500 --> 01:02:34.460 There we go. 01:02:34.460 --> 01:02:35.700 Well, let's try it a second time, right? 01:02:35.700 --> 01:02:38.460 So, what do you guess? 01:02:38.460 --> 01:02:40.260 Seven or eight seconds maybe it took that first time, 01:02:40.260 --> 01:02:41.540 but if I hit it again, 01:02:41.540 --> 01:02:44.220 it says it downloaded 3.6 megs. 01:02:44.220 --> 01:02:46.500 And it's probably- 01:02:46.500 --> 01:02:48.320 - You should have cached most of the things 01:02:48.320 --> 01:02:49.320 that you compiled. 01:02:49.320 --> 01:02:54.460 But also if you set your browser to not cache, 01:02:54.460 --> 01:02:56.760 it will not change anything. 01:02:56.760 --> 01:02:59.300 - Yeah, well, I think the challenge is that I'm using 01:02:59.300 --> 01:03:02.280 just Python-M HTTP servers. 01:03:02.280 --> 01:03:07.280 I'm not really using a proper server for this. 01:03:07.280 --> 01:03:08.500 So that's not helping. 01:03:08.500 --> 01:03:10.820 I'm gonna let that one load up while we're, 01:03:10.820 --> 01:03:13.620 I'm pulling up another one here that I wanna talk about. 01:03:14.460 --> 01:03:16.840 - Yeah, is there one that you think we should highlight 01:03:16.840 --> 01:03:17.680 in particular? 01:03:17.680 --> 01:03:19.060 I mean, we've got the matplotlib one, 01:03:19.060 --> 01:03:23.340 which is pretty interesting over here that shows this. 01:03:23.340 --> 01:03:24.180 - Right. 01:03:24.180 --> 01:03:28.940 The D3 one is pretty interesting as well 01:03:28.940 --> 01:03:33.500 in the sense that for now- 01:03:33.500 --> 01:03:35.100 - The D3 one you said? 01:03:35.100 --> 01:03:36.100 - Yeah. - Right. 01:03:36.100 --> 01:03:37.180 - Okay. 01:03:37.180 --> 01:03:41.220 - D3 has been a library that Python folks 01:03:41.220 --> 01:03:44.360 have always wanting to be using. 01:03:44.360 --> 01:03:45.560 - That one was super fast. 01:03:45.560 --> 01:03:48.520 That one was two or three seconds. 01:03:48.520 --> 01:03:49.360 - Right. 01:03:49.360 --> 01:03:50.820 - Less than two seconds, yeah. 01:03:50.820 --> 01:03:53.700 - Yeah, and that should have basically 01:03:53.700 --> 01:03:55.440 the same loading time as JavaScript 01:03:55.440 --> 01:03:58.200 because we're not really importing much 01:03:58.200 --> 01:03:59.360 or installing new libraries. 01:03:59.360 --> 01:04:01.560 - And once I hit your example server, 01:04:01.560 --> 01:04:03.880 then it's cached it, right? 01:04:03.880 --> 01:04:06.760 - Yeah, yeah, the second time you do, yes. 01:04:06.760 --> 01:04:10.880 So another one, the WebGL, 01:04:10.880 --> 01:04:13.560 Right, right, right down. 01:04:13.560 --> 01:04:17.080 There you go. 01:04:17.080 --> 01:04:20.560 Yeah, this also should load pretty fast 01:04:20.560 --> 01:04:24.480 and shows wrapping WebGL directly. 01:04:24.480 --> 01:04:29.240 - So this, if people obviously listening don't know, 01:04:29.240 --> 01:04:32.920 this one shows an example of dodecahedrons or something, 01:04:32.920 --> 01:04:34.880 a bunch sort of rotating and spinning around. 01:04:34.880 --> 01:04:38.800 It's a little bit like a 3D asteroid game 01:04:38.800 --> 01:04:39.820 with no spaceships. 01:04:39.820 --> 01:04:41.060 (laughing) 01:04:41.060 --> 01:04:44.820 Something like that, I guess, maybe is a way to think of it. 01:04:44.820 --> 01:04:46.540 And if I go to, oh, and it also, 01:04:46.540 --> 01:04:48.460 as I move my mouse, it reacts to it. 01:04:48.460 --> 01:04:49.460 I hadn't moved my mouse. 01:04:49.460 --> 01:04:50.960 So that's pretty cool. 01:04:50.960 --> 01:04:58.220 I opened up my little task manager thing. 01:04:58.220 --> 01:05:00.700 Let's show me that. 01:05:00.700 --> 01:05:05.260 I don't know if it shares, but it says, 01:05:05.260 --> 01:05:07.580 basically, it shows you how hard it's working, 01:05:07.580 --> 01:05:12.580 and it's 20% CPU for this 3D rendering interaction thing. 01:05:12.580 --> 01:05:19.180 If you probably try to do this in pure Python 01:05:19.180 --> 01:05:22.340 and like Pygame, it might be more, you know? 01:05:22.340 --> 01:05:26.060 - Yeah, I'm not sure about like the performance 01:05:26.060 --> 01:05:28.340 and you know, like resources, 01:05:28.340 --> 01:05:29.820 but it should be pretty much, 01:05:29.820 --> 01:05:32.980 once you're using JavaScript things, 01:05:32.980 --> 01:05:35.700 they should be pretty much the same as JavaScript, 01:05:35.700 --> 01:05:37.140 pure JavaScript. 01:05:37.140 --> 01:05:39.940 Much like Python often just sort of orchestrates C code 01:05:39.940 --> 01:05:41.880 once you've loaded something into the C layer 01:05:41.880 --> 01:05:43.740 and you're kind of just instructing it 01:05:43.740 --> 01:05:44.680 through simple commands, 01:05:44.680 --> 01:05:46.880 it's probably not very different here. 01:05:46.880 --> 01:05:48.040 - Exactly, yes. 01:05:48.040 --> 01:05:49.180 - All right. - Yeah. 01:05:49.180 --> 01:05:51.560 - Cool, all right, so I strongly encourage people 01:05:51.560 --> 01:05:53.620 to go check out the demo code. 01:05:53.620 --> 01:05:56.560 It's just under the example folders in the GitHub repo, 01:05:56.560 --> 01:05:57.560 which we'll link to. 01:05:57.560 --> 01:06:00.920 Fabio, we're running low on time here. 01:06:00.920 --> 01:06:03.440 There's so much more I wanna talk to you about. 01:06:03.440 --> 01:06:06.080 - You drive. 01:06:06.080 --> 01:06:09.440 - Yeah, yeah, let me just see a couple of example 01:06:09.440 --> 01:06:11.740 or a couple of areas I wanna talk about here. 01:06:11.740 --> 01:06:15.320 I just wanna quickly touch on security. 01:06:15.320 --> 01:06:17.440 I think the security story is pretty simple, 01:06:17.440 --> 01:06:19.040 but I do have one question. 01:06:19.040 --> 01:06:21.240 So to some degree, people might go, 01:06:21.240 --> 01:06:26.240 "Oh my gosh, it's compiled C in Java script in the browser. 01:06:26.240 --> 01:06:30.480 What madness are people gonna unleash on the world? 01:06:30.480 --> 01:06:31.640 This is like ActiveX 01:06:31.640 --> 01:06:35.160 or some dreaded calm thing all over again." 01:06:35.160 --> 01:06:39.000 And really WebAssembly also has the same sandbox security 01:06:39.000 --> 01:06:40.640 as JavaScript, right? 01:06:40.640 --> 01:06:42.300 - Right, yes. 01:06:42.300 --> 01:06:44.960 So yeah, actually a lot of the issues 01:06:44.960 --> 01:06:47.480 that we've been getting around security 01:06:47.480 --> 01:06:52.480 boils down to that people like not being used 01:06:52.480 --> 01:06:56.320 to seeing the browser as a VM. 01:06:56.320 --> 01:07:01.320 So, oh, if I type OS, like list there and stuff like this, 01:07:03.320 --> 01:07:05.640 and I have access to the file system. 01:07:05.640 --> 01:07:09.240 Well, you're having access to an ephemera's file system 01:07:09.240 --> 01:07:13.280 in the browser and not your local file system. 01:07:13.280 --> 01:07:15.240 That is a very important aspect. 01:07:15.240 --> 01:07:20.160 - One thing that would make me super happy 01:07:20.160 --> 01:07:23.880 is if we had some beautiful Python API 01:07:23.880 --> 01:07:25.880 to the local data side of things. 01:07:25.880 --> 01:07:27.840 So inside the browser in JavaScript, 01:07:27.840 --> 01:07:30.160 you get access to, what's it called? 01:07:30.160 --> 01:07:33.480 local DB and there's like a, there's different levels. 01:07:33.480 --> 01:07:36.740 There's like a file sort of file per site, 01:07:36.740 --> 01:07:39.180 file storage thing that's tied to your user. 01:07:39.180 --> 01:07:43.020 And then there's like an embedded SQL light like thing. 01:07:43.020 --> 01:07:45.900 I mean, if you had something like SQL model 01:07:45.900 --> 01:07:49.940 or some other proper ORM that would let you connect 01:07:49.940 --> 01:07:52.820 to query that, I suspect that it could probably 01:07:52.820 --> 01:07:56.380 be built pretty easily with a interoperability layer 01:07:56.380 --> 01:07:59.660 to figure out just how to translate that 01:07:59.660 --> 01:08:01.660 to JavaScript, but do you is it? 01:08:01.660 --> 01:08:03.960 What do you think you know more now? 01:08:03.960 --> 01:08:07.620 Now that there are lots of possibilities and scenarios of, 01:08:07.620 --> 01:08:11.160 you know, using what the browser provides you like local storage 01:08:11.160 --> 01:08:15.960 or small instances of databases and stuff like that. 01:08:15.960 --> 01:08:22.460 The there so that is almost shipped and default with all the 01:08:22.460 --> 01:08:23.660 browsers. 01:08:23.660 --> 01:08:26.860 There are interesting projects. 01:08:26.860 --> 01:08:30.060 well, at least one that I've seen, like Google Project, 01:08:30.060 --> 01:08:33.380 where from Google, from the Chrome team, 01:08:33.380 --> 01:08:37.060 that is experimenting with scenarios 01:08:37.060 --> 01:08:42.140 where you can actually allow apps to access your file 01:08:42.140 --> 01:08:45.900 system or other resources, native resources. 01:08:45.900 --> 01:08:50.060 It goes through a process of approval. 01:08:50.060 --> 01:08:53.980 But you can mount directories and use them 01:08:53.980 --> 01:08:57.220 from your browser as a local mount. 01:08:57.220 --> 01:09:00.660 And those are also very interesting scenarios 01:09:00.660 --> 01:09:05.180 that could open up a lot of different ways 01:09:05.180 --> 01:09:06.740 of interacting with PyScript. 01:09:06.740 --> 01:09:09.260 Maybe it would mean you can actually 01:09:09.260 --> 01:09:12.620 develop your PyScript app directly from your local machine 01:09:12.620 --> 01:09:16.380 and then serve it on the browser real time, 01:09:16.380 --> 01:09:20.060 or your app could write files or do your models 01:09:20.060 --> 01:09:22.620 or computation on the browser and then write results 01:09:22.620 --> 01:09:24.300 to your local files. 01:09:24.300 --> 01:09:26.040 There's a lot that can be explored. 01:09:26.040 --> 01:09:28.900 - Yeah, very exciting. 01:09:28.900 --> 01:09:30.580 Okay, my security question though, 01:09:30.580 --> 01:09:32.180 outside of the, it's all the sandbox, 01:09:32.180 --> 01:09:33.620 let's not stress about it. 01:09:33.620 --> 01:09:36.540 We already have had WebAssembly for a long time. 01:09:36.540 --> 01:09:39.620 Is this pyenv section here where you can say, 01:09:39.620 --> 01:09:41.340 go find this file, right? 01:09:41.340 --> 01:09:43.180 And I'm thinking of, you know, my website, 01:09:43.180 --> 01:09:46.380 which has a static files, static files folder section 01:09:46.380 --> 01:09:47.260 where I might put this, 01:09:47.260 --> 01:09:48.780 'cause that needs to be served up 01:09:48.780 --> 01:09:51.540 as effectively a static file to the front end. 01:09:51.540 --> 01:09:55.300 But I've also got my app.py, my various views, 01:09:55.300 --> 01:09:57.180 and settings.json. 01:09:57.180 --> 01:10:02.700 And if I put too many dot dot slashes there, 01:10:02.700 --> 01:10:05.180 am I going to be able to get to other stuff, or is it OK? 01:10:05.180 --> 01:10:09.500 What do you mean? 01:10:09.500 --> 01:10:16.580 Suppose this folder, this file lives in static/antigravity.html. 01:10:16.580 --> 01:10:21.460 But the rest of my app is one directory up from-- 01:10:21.460 --> 01:10:22.520 - Oh yeah. - From that, 01:10:22.520 --> 01:10:25.100 like, could I say my path to my module is 01:10:25.100 --> 01:10:29.100 dot dot slash app dot pi and then maybe read like some- 01:10:29.100 --> 01:10:30.100 - Right. - Source code 01:10:30.100 --> 01:10:33.060 with like a token that I've, you know, 01:10:33.060 --> 01:10:34.400 put in there that I shouldn't have put in there, 01:10:34.400 --> 01:10:36.500 but then now it's public. 01:10:36.500 --> 01:10:40.020 - Yeah, relative paths should work just fine. 01:10:40.020 --> 01:10:44.540 There's also, I think with PyScript, 01:10:44.540 --> 01:10:47.860 the distinction between development time 01:10:47.860 --> 01:10:50.140 and deployment time or bundling time 01:10:50.140 --> 01:10:54.700 is a little more highlighted. 01:10:54.700 --> 01:10:59.140 As a developer, I'd love to have those relative paths 01:10:59.140 --> 01:11:04.820 and explore and have full access to a lot of libraries. 01:11:04.820 --> 01:11:08.300 But when I deploy, I bundle my application, 01:11:08.300 --> 01:11:11.380 one of the things that we are very interested in developing 01:11:11.380 --> 01:11:15.020 more is we should bundle that as one thing. 01:11:15.020 --> 01:11:19.140 And the path should be absolute so there is no issues 01:11:19.140 --> 01:11:20.980 with what you're saying. 01:11:20.980 --> 01:11:24.700 We could bundle the interpreter and your dependencies 01:11:24.700 --> 01:11:28.020 so that we can optimize size, 01:11:28.020 --> 01:11:30.900 remove dependencies that you're not using. 01:11:30.900 --> 01:11:33.500 So, you know, the loading time is smaller, 01:11:33.500 --> 01:11:34.640 basically three shake, 01:11:34.640 --> 01:11:38.420 like a lot of JavaScript libraries do. 01:11:38.420 --> 01:11:41.940 So yeah, there are definitely patterns to explore 01:11:41.940 --> 01:11:43.100 and that's an area to. 01:11:43.100 --> 01:11:44.980 - Yeah, okay. 01:11:44.980 --> 01:11:47.860 I mean, yeah, you definitely don't wanna go dot dot slash 01:11:47.860 --> 01:11:50.380 app because somebody could then inject that. 01:11:50.380 --> 01:11:54.420 But it's interesting. 01:11:54.420 --> 01:11:56.700 I'll be cool to see what you all do there. 01:11:56.700 --> 01:11:59.980 But definitely, that's the only thing that's come to mind. 01:11:59.980 --> 01:12:02.220 I wonder what's going to happen there. 01:12:02.220 --> 01:12:05.220 Let's see. 01:12:05.220 --> 01:12:07.060 [INTERPOSING VOICES] 01:12:07.060 --> 01:12:15.260 App, it's basically on you to define what you're actually 01:12:15.260 --> 01:12:18.320 serving as a static file server, right? 01:12:18.320 --> 01:12:23.740 - I see, so if it's not accessible as a static file already 01:12:23.740 --> 01:12:26.040 this will just 404? 01:12:26.040 --> 01:12:26.880 - Yeah. 01:12:26.880 --> 01:12:31.440 - Okay, then Flask Pyramid friends have it covered. 01:12:31.440 --> 01:12:32.940 Yeah. - Yeah, exactly. 01:12:32.940 --> 01:12:34.500 - Okay, now I see where it's, 01:12:34.500 --> 01:12:36.580 so it's just, you're like, it's not our responsibility, 01:12:36.580 --> 01:12:39.860 but you shouldn't be allowing, you know, 01:12:39.860 --> 01:12:43.860 slash static slash dot dot slash app.py 01:12:43.860 --> 01:12:45.560 being served anyway, right? 01:12:45.560 --> 01:12:46.640 - Right. - Okay, cool. 01:12:46.640 --> 01:12:49.600 The other thing is, one of the things 01:12:49.600 --> 01:12:51.560 that Steve Dower talked about recently 01:12:51.560 --> 01:12:56.560 is that they started enable the real, the full CPython 01:12:56.560 --> 01:13:03.700 to being built within scripting WebAssembly targets. 01:13:03.700 --> 01:13:06.880 Is this of interest to you all? 01:13:06.880 --> 01:13:09.160 Does this-- - Very much. 01:13:09.160 --> 01:13:13.200 - Is this super speed PyIoDyed's version in some way? 01:13:13.200 --> 01:13:15.560 is what Pyodide's version actually is? 01:13:15.560 --> 01:13:22.120 - So the Pyodide team and the CPython on Wasm team 01:13:22.120 --> 01:13:28.480 are collaborating on making the two, 01:13:28.480 --> 01:13:31.000 making Pyodide basically use that 01:13:31.000 --> 01:13:33.200 as a baseline Python interpreter. 01:13:33.200 --> 01:13:36.040 That actually would be very helpful 01:13:36.040 --> 01:13:38.720 to the Pyodide team as well. 01:13:38.720 --> 01:13:41.840 They would have way less things to maintain. 01:13:41.840 --> 01:13:46.240 they can just delegate to the improvements 01:13:46.240 --> 01:13:50.240 and optimizations that the CPython core team 01:13:50.240 --> 01:13:54.820 they're doing and can focus on the additional features 01:13:54.820 --> 01:13:55.660 of Pyodide. 01:13:55.660 --> 01:13:59.500 So that actually is, we had a-- 01:13:59.500 --> 01:14:01.520 - Right, they're building in the WebAssembly version 01:14:01.520 --> 01:14:02.560 'cause it didn't exist. 01:14:02.560 --> 01:14:04.680 That's probably not what they wanted to do, right? 01:14:04.680 --> 01:14:06.580 - Exactly, yes, yes. 01:14:06.580 --> 01:14:08.120 - Yeah, okay. 01:14:08.120 --> 01:14:09.800 Their real innovation, I think, 01:14:09.800 --> 01:14:11.640 in addition to just getting the WebAssembly thing 01:14:11.640 --> 01:14:18.000 working is like, how do you bring these important C mixed C 01:14:18.000 --> 01:14:22.920 libraries in like NumPy and such to the browser that otherwise 01:14:22.920 --> 01:14:25.960 wouldn't just drop in as you know, Python stuff running on 01:14:25.960 --> 01:14:31.080 top of the interpreter. Right, that that seems to be the most 01:14:31.080 --> 01:14:34.760 important thing that they're, they brought to the table. 01:14:34.760 --> 01:14:37.040 Right, 01:14:37.040 --> 01:14:40.160 exactly. Not discounting that, like there was not a WebAssembly 01:14:40.160 --> 01:14:42.000 and they made that also happen, right? 01:14:42.000 --> 01:14:46.000 Like that's also super important, but I guess 01:14:46.000 --> 01:14:48.520 what makes them more distinct of all the other attempts 01:14:48.520 --> 01:14:50.180 is that they're really focused on making sure 01:14:50.180 --> 01:14:53.560 the data science libraries work in this situation. 01:14:53.560 --> 01:14:57.640 - Yes, I think that is one of the main things 01:14:57.640 --> 01:15:02.640 that made PyDive successful because it, you know, 01:15:02.640 --> 01:15:08.600 a lot of times you would support just the language itself 01:15:08.600 --> 01:15:12.400 And then when you want to support more complex use cases, 01:15:12.400 --> 01:15:14.840 like C dependencies, you are too far 01:15:14.840 --> 01:15:17.280 in the process of your implementation. 01:15:17.280 --> 01:15:20.240 And then you're like, oh, now we have to rewrite half 01:15:20.240 --> 01:15:23.480 of the code to refactor, to account for, you know, 01:15:23.480 --> 01:15:26.560 a lot of the complexities. 01:15:26.560 --> 01:15:28.520 - We got to backfill it so we have support 01:15:28.520 --> 01:15:29.340 for all these things. 01:15:29.340 --> 01:15:31.840 How are we going to write our own NumPy now or something? 01:15:31.840 --> 01:15:32.680 - Right, yeah. 01:15:32.680 --> 01:15:37.440 And C extensions are always the place 01:15:37.440 --> 01:15:39.880 where most projects have a hard time, right? 01:15:39.880 --> 01:15:44.560 Like historically, the different implementations of Python 01:15:44.560 --> 01:15:48.680 and .NET or PyPI or others. 01:15:48.680 --> 01:15:52.960 CX Nations has always been like the trouble kid. 01:15:52.960 --> 01:15:53.800 - It definitely is. 01:15:53.800 --> 01:15:55.860 It's also tricky for the GIL. 01:15:55.860 --> 01:15:58.260 It's also tricky for thinking about reference counting 01:15:58.260 --> 01:16:00.880 versus other collection cleanup type. 01:16:00.880 --> 01:16:03.360 Yeah, it's an important boundary to be aware of, 01:16:03.360 --> 01:16:05.320 but it's also really been a lot. 01:16:05.320 --> 01:16:06.540 All right, final thing. 01:16:06.540 --> 01:16:09.420 Let's just wrap this up with what's next, 01:16:09.420 --> 01:16:10.380 where you're going. 01:16:10.380 --> 01:16:16.260 - So I think I hinted at a lot of those, 01:16:16.260 --> 01:16:20.340 I think the main thing for us in the immediate future 01:16:20.340 --> 01:16:23.540 is really to work with the community 01:16:23.540 --> 01:16:28.540 and build up more of that side of things. 01:16:28.540 --> 01:16:33.140 And then also work on documentation 01:16:33.140 --> 01:16:37.380 to put out also the vision and what's next. 01:16:37.380 --> 01:16:39.460 There are a bunch of things that are really interesting 01:16:39.460 --> 01:16:41.500 that we will be looking at, right? 01:16:41.500 --> 01:16:44.940 Like a reactive layer or components 01:16:44.940 --> 01:16:49.060 to interact with each other and notify each other. 01:16:49.060 --> 01:16:55.340 The story around data and what, 01:16:55.340 --> 01:16:59.120 how does working with data look like in PyScript? 01:17:00.260 --> 01:17:03.340 a lot of development around the possibilities 01:17:03.340 --> 01:17:07.660 of using PyScript in a peer-to-peer 01:17:07.660 --> 01:17:11.060 or web three sort of scenario, right? 01:17:11.060 --> 01:17:14.940 What can we make to support applications 01:17:14.940 --> 01:17:16.380 talking to each other directly, 01:17:16.380 --> 01:17:20.940 or using a mode where you work offline and online 01:17:20.940 --> 01:17:25.140 and you can make the experience better. 01:17:25.140 --> 01:17:28.900 - Right, like a little bit of a progressive web app 01:17:28.900 --> 01:17:31.780 - Exactly. - Tiny thing, yeah. 01:17:31.780 --> 01:17:34.180 I'd be super excited to see that come along. 01:17:34.180 --> 01:17:39.180 - Yeah, honestly, one of the difficulties with this project 01:17:39.180 --> 01:17:44.180 is that it breaks so many patterns that we are used to, 01:17:44.180 --> 01:17:46.500 both like, oh, I'm running my thing on my machine 01:17:46.500 --> 01:17:49.040 or on a server, or I'm doing a web. 01:17:49.040 --> 01:17:51.640 It means, okay, it means that I always have a server 01:17:51.640 --> 01:17:56.580 and a client side, and they have the network in between. 01:17:56.580 --> 01:18:01.980 Now we're shifting the paradigms and a lot of things are new, 01:18:01.980 --> 01:18:04.480 so we can explore. 01:18:04.480 --> 01:18:06.600 The other thing that we're looking at, 01:18:06.600 --> 01:18:11.340 well, better support for the optimization, loading times, 01:18:11.340 --> 01:18:13.940 all of those things. 01:18:13.940 --> 01:18:17.340 How can you hold state of your application? 01:18:17.340 --> 01:18:20.660 So basically, as it's running, et cetera, 01:18:20.660 --> 01:18:25.500 or if you just have a notebook-like workflow, 01:18:25.500 --> 01:18:28.080 how can you save the state of your PyScript app 01:18:28.080 --> 01:18:29.320 and share with others? 01:18:29.320 --> 01:18:32.120 And they can start from the same point you were. 01:18:32.120 --> 01:18:37.880 - Yeah, those are all great things to be working towards. 01:18:37.880 --> 01:18:43.320 Is this tying in any way to JupyterLite? 01:18:43.320 --> 01:18:46.020 I mean, it's got similar goals. 01:18:46.020 --> 01:18:49.020 I'm not sure if it has any similar foundations or anything. 01:18:51.500 --> 01:18:56.500 Maybe I'm very familiar with the Jupyter folks. 01:18:56.500 --> 01:18:59.500 I work together with many of the core developers 01:18:59.500 --> 01:19:03.860 and historically, JupyterLite is a great project 01:19:03.860 --> 01:19:08.260 that basically implements the Jupyter notebooks 01:19:08.260 --> 01:19:13.260 using Pyodide as a runtime or a shell. 01:19:13.260 --> 01:19:16.200 - Yeah, so it's not that far out 01:19:16.200 --> 01:19:19.260 of being maybe in a similar space, but yeah. 01:19:19.260 --> 01:19:21.740 - Right, it's similar in that sense 01:19:21.740 --> 01:19:26.620 that it ties right into the Jupyter experience. 01:19:26.620 --> 01:19:30.180 So it has it's locked into the notebook flow 01:19:30.180 --> 01:19:33.620 and authoring notebooks and stuff like that, 01:19:33.620 --> 01:19:38.020 where PyScript is more, has a larger scope 01:19:38.020 --> 01:19:40.660 and it's really to author applications 01:19:40.660 --> 01:19:43.140 and a little different. 01:19:43.140 --> 01:19:45.020 - Okay, very interesting. 01:19:46.580 --> 01:19:49.500 All right, well, congratulations. 01:19:49.500 --> 01:19:51.140 This seems like a pretty promising project 01:19:51.140 --> 01:19:53.020 and I know there's a lot of interest in it. 01:19:53.020 --> 01:19:56.520 Let me close it out with a comment from the audience. 01:19:56.520 --> 01:19:59.540 Andre Mueller said, "I tried Jinja. 01:19:59.540 --> 01:20:03.840 "The Jinja wheel just straight up with PyScript 01:20:03.840 --> 01:20:06.660 "and it works straight away, like no changes." 01:20:06.660 --> 01:20:10.300 So that's kind of meta actually. 01:20:10.300 --> 01:20:13.980 Jinja within PyScript within HTML. 01:20:13.980 --> 01:20:14.820 Love it. 01:20:14.820 --> 01:20:15.900 - Yeah. 01:20:15.900 --> 01:20:17.220 - Awesome. 01:20:17.220 --> 01:20:19.020 All right, well, let me ask you the final two questions 01:20:19.020 --> 01:20:20.500 before we get out of here. 01:20:20.500 --> 01:20:22.140 If you're gonna write some Python code, 01:20:22.140 --> 01:20:24.440 what editor are you doing using these days? 01:20:24.440 --> 01:20:32.000 - It's usually a mix between VS Code or PyCharm. 01:20:32.000 --> 01:20:33.800 - All right, cool. 01:20:33.800 --> 01:20:35.900 Yeah, both good. 01:20:35.900 --> 01:20:40.900 And notable PyPI package or some other kind of, 01:20:40.900 --> 01:20:42.660 maybe it doesn't come quite off PyPI, 01:20:42.660 --> 01:20:45.180 maybe it comes off a CDN these days. 01:20:45.180 --> 01:20:47.180 Hi, script, obviously. 01:20:47.180 --> 01:20:49.180 What do you want to give a shout out to? 01:20:49.180 --> 01:20:55.020 - Well, I gave a lot of shout outs to Piodyde. 01:20:55.020 --> 01:20:58.060 Once again, it's a great project. 01:20:58.060 --> 01:21:01.540 I think I use notebooks 01:21:01.540 --> 01:21:05.000 and the whole Jupyter ecosystem a lot as well. 01:21:05.000 --> 01:21:07.460 The whole scientific stack 01:21:07.460 --> 01:21:10.380 and a lot of the things that are around, 01:21:10.380 --> 01:21:13.420 you know, the many interesting projects like, 01:21:14.260 --> 01:21:19.260 you know, NumPy, Pandas, Dask, Bokeh, Numba. 01:21:19.260 --> 01:21:24.300 A lot of that ecosystem is really 01:21:24.300 --> 01:21:27.160 in my day-to-day kind of workflow. 01:21:27.160 --> 01:21:28.620 - Yeah, fantastic. 01:21:28.620 --> 01:21:29.460 - Yeah. 01:21:29.460 --> 01:21:31.540 - Cool, cool. 01:21:31.540 --> 01:21:34.140 All right, well, once again, congratulations 01:21:34.140 --> 01:21:37.180 on all the interest and excitement. 01:21:37.180 --> 01:21:39.640 It's really taken off the last couple of weeks. 01:21:39.640 --> 01:21:43.060 So thanks for coming on the show and talking about it. 01:21:43.060 --> 01:21:44.860 Thank you so much for the opportunity. 01:21:44.860 --> 01:21:46.620 I had a great time chatting about it. 01:21:46.620 --> 01:21:48.540 - And final call action, people want to get started. 01:21:48.540 --> 01:21:49.380 What do they do? 01:21:49.380 --> 01:21:51.900 - Great, great question. 01:21:51.900 --> 01:21:54.540 Go to PyScript.net, check the website. 01:21:54.540 --> 01:21:57.620 We have links to the repo and to the-- 01:21:57.620 --> 01:22:01.060 - Very interesting install steps here. 01:22:01.060 --> 01:22:04.040 And it says, ah, no, you don't install it. 01:22:04.040 --> 01:22:06.360 - Yes, we hope people would click 01:22:06.360 --> 01:22:10.220 and actually see the Easter egg, which was good. 01:22:11.200 --> 01:22:17.080 And yeah, we really want to be an inclusive community. 01:22:17.080 --> 01:22:19.960 So if you have questions or you want to report bugs, 01:22:19.960 --> 01:22:22.520 or just ask where you can help, just 01:22:22.520 --> 01:22:26.440 reach out either on Twitter or reach out 01:22:26.440 --> 01:22:29.560 on the repo, open bugs there. 01:22:29.560 --> 01:22:32.360 In the next few weeks, you should 01:22:32.360 --> 01:22:37.760 expect more documentation on community engagement, 01:22:37.760 --> 01:22:39.940 having a discussions group 01:22:39.940 --> 01:22:43.620 where people can actually ask questions more easily. 01:22:43.620 --> 01:22:46.800 We're evaluating starting bi-weekly 01:22:46.800 --> 01:22:48.460 or something like that community call 01:22:48.460 --> 01:22:50.500 where we just are there for the community 01:22:50.500 --> 01:22:53.800 to ask questions live on a Zoom or something like this. 01:22:53.800 --> 01:22:55.060 So be patient. 01:22:55.060 --> 01:22:59.220 We're getting there to support our community 01:22:59.220 --> 01:23:02.820 and allow people to actually contribute back. 01:23:02.820 --> 01:23:04.820 - Cool, well, very exciting. 01:23:04.820 --> 01:23:05.660 Thanks for doing it. 01:23:05.660 --> 01:23:06.900 Thanks for being here. 01:23:06.900 --> 01:23:07.720 Thank you. 01:23:07.720 --> 01:23:08.560 - Thank you. 01:23:08.560 --> 01:23:10.300 - You bet, bye.