Latest / Talk Python To Me / #367: Say Hello to PyScript (WebAssembly Python)
Transcript
- 0:00Despite Python being overwhelmingly popular and reactions to it positive, there are major areas of computing where Python is not present, most notably on mobile and on the front-end side of the web.
- 0:11PyScript, a new project launched by Fabio Pliger from Anaconda, just might change that.
- 0:18It was made public and announced at PyCon just two weeks ago by Peter Wang and now has over 10,000 GitHub stars.
- 0:25But what is hype versus reality versus projected hopes and dreams?
- 0:30We're going to find out on this episode.
- 0:32Fabio is here to tell us all about his new project.
- 0:35This is Talk Python To Me, episode 367, recorded May 12, 2022.
- 0:53Welcome to Talk Python To Me, a weekly podcast on Python.
- 0:56This is your host, Michael Kennedy.
- 0:58Follow me on Twitter where I'm @mkennedy and keep up with the show and listen to past episodes at talkpython.fm.
- 1:04And follow the show on Twitter via at Talk Python.
- 1:07We've started streaming most of our episodes live on YouTube.
- 1:11Subscribe to our YouTube channel over at talkpython.fm/youtube to get notified about upcoming shows and be part of that episode.
- 1:19This episode is sponsored by Microsoft for Startups Founders Hub.
- 1:23Check them out at talkpython.fm/foundershub to get early support for your startup.
- 1:29And it's brought to you by us over at Talk Python Training.
- 1:32Did you know we have one of the largest course libraries for Python courses?
- 1:37They're all available without a subscription.
- 1:39So check it out over at talkpython.fm.
- 1:42Just click on courses.
- 1:44Transcripts for this and all of our episodes are brought to you by Assembly AI.
- 1:48Do you need a great automatic speech-to-text API?
- 1:50Get human-level accuracy in just a few lines of code.
- 1:53Visit talkpython.fm/assemblyai.
- 1:56Hey, before we jump into the interview with Fabio, creator of PyScript,
- 2:00I want to just tell you really quickly about this new YouTube video I made.
- 2:04After chatting with Fabio, but before this episode is released,
- 2:09I decided to play around with PyScript some more.
- 2:12It's really, really cool.
- 2:13Turns out that one of the things there's not a great example for is how do I take and build a regular web application,
- 2:21something you might do with Vue.js or something like that,
- 2:24with PyScript using Python on the front end.
- 2:28And is it possible to actually avoid downloading the CPython runtime as a WebAssembly that comes out of Pyodide and all those things
- 2:37and make your code sort of installed locally and run really fast and have actually a pretty great user experience?
- 2:44Well, it turns out the answer is yes.
- 2:46So I put together a 30-minute demo tutorial of that over on YouTube.
- 2:50If you want to dive in a little bit and see that in action, after you listen to this episode, be sure to jump over to YouTube.
- 2:56The link is at the bottom of the show notes in your podcast player on the episode page.
- 3:00Head on over to my personal YouTube channel and check out that video.
- 3:03I think you'll be pretty impressed.
- 3:05And it'll just make you want to do more stuff with PyScript, I'm sure.
- 3:08All right, let's chat with Fabio about PyScript.
- 3:10Fabio, welcome to Talk Python To Me.
- 3:14Thank you.
- 3:14I'm really happy to be here.
- 3:16Yeah, you're welcome.
- 3:17And I'm excited to have you here because I am quite excited about the PyScript announcement that you have put so much work into.
- 3:24I'm very excited about the possibility of finding Python in other places than where it has really great strongholds, right?
- 3:33For as much as Python is, the incredible growth of Python that Stack Overflow blogged about in 2017 and all the growth in different metrics.
- 3:43But by some metrics, first, most popular language or second, depending.
- 3:46But for all of that, there's still very notable places where Python is not.
- 3:52And what you're working on has the possibility to unlock one or more of those places or a whole different set of contingency.
- 4:00The people of data scientists, web developers, UI developers, maybe just for desktop even.
- 4:06So exciting.
- 4:07Yeah, I think it captured a lot of the things behind the project.
- 4:11Really happy to talk about all of those because, yeah, that's the reason we started it.
- 4:16So excited.
- 4:17Yeah, and it's super exciting.
- 4:19There's been some attempts at this and we're going to get into, I want to sort of start our conversation about the history of what has come before and so on.
- 4:28Before we do, though, let's just hear a bit about you.
- 4:31How did you get into programming in Python?
- 4:32So programming, I was being curious about a lot of things and probably doing too many things still today.
- 4:39Early on, I got into programming through friends who had computers and Commodore or things like that.
- 4:48We would pop on.
- 4:49I had a, in my dad at some point bought a, I don't even know the version.
- 4:54It was like similar to Commodore, but it was in Brazil, a gradient MSX or something.
- 5:01It was a local, like a national branded computer, but it allowed you to jump in and do basic stuff and programming.
- 5:09So I remember trying to play with my friends and try to code games.
- 5:13Of course, we never get anything done.
- 5:15But I always been passionate about computers and games and stuff like that.
- 5:19So into college, I took a computer science degree, dreaming to become a game developer also never happened because I got...
- 5:27I think it's really interesting that so many people want to get into game development and then they kind of see the sort of grinding mode of that industry, right?
- 5:35It's like both fascinating and has this great pull.
- 5:37Then you're like, but it's really hard on humans as well.
- 5:40Yes, it's a very hard industry and very competitive.
- 5:43My brother is an indie game developer and a lot of sleepless nights and working hard trying to get his thing out there.
- 5:53And so, yeah, I think...
- 5:55And through life, I also...
- 5:57Just life happened.
- 5:58I met my now wife and started to be a little more serious about, you know, gaming is great, but I also need to make plans for the future.
- 6:06So I ended up graduating and started to work for a company that's automation, like machines automation and big industries, many on pharmaceuticals.
- 6:17And I worked there for a while and I was in the team that would develop high level applications for analytics.
- 6:26And we would usually do for big pharmaceutical production lines.
- 6:30So providing all the charts and everything they need to say this production batch is valid for whatever FDA or whatever entity is approving them.
- 6:41A lot of paperwork, a lot of things.
- 6:43Eventually, at some point, my unit became a big part of the company.
- 6:47So my, at the time, the CEO of the company asked, hey, do you want a startup spinoff of our company?
- 6:55Just focus on software.
- 6:56So I did that.
- 6:58That sounds like a pretty fun challenge.
- 7:00Yes.
- 7:01Like do a startup without quite the risk of actually being a startup.
- 7:04Yeah.
- 7:05Yes.
- 7:06Like you're going to get paid.
- 7:07You know what I mean?
- 7:07Yes.
- 7:08You're going to get paid.
- 7:09It also, I think the startup reality in Italy, I was still in Italy at the time, is very different from here.
- 7:16It's really hard to have investors or, you know, to have, to collect money.
- 7:21And basically you need to, it boils down to you investing on yourself, in your own company, and then trying to get profit within a number of years.
- 7:30Okay.
- 7:30It's got to be way more bootstrapped, self-funded, you know, sort of thing, huh?
- 7:34Okay.
- 7:34Yeah.
- 7:35Do you think that's changed or is that still the same?
- 7:37I think it's changing.
- 7:38Yeah.
- 7:38The last 10 years, I think a lot changed just from like the industry in general became way stronger in Europe as well.
- 7:46There's a different mindset.
- 7:47And I think culturally, South Europe has this culture of a different way to see money and investments compared to the US, for instance.
- 7:58Sure.
- 7:58But eventually, like this experience led me to the Python community early on.
- 8:04I actually got into Python not by myself.
- 8:08I heard about the language.
- 8:09I was curious.
- 8:09But someone within the company said, oh, we, you know, the son of this customer is really big in the Python community.
- 8:17He could help us see if it's a good fit for our use case.
- 8:21And it was around early 2000s.
- 8:23And it was around early 2000s, maybe 2002, one.
- 8:25Pretty early days of Python, really.
- 8:27Yes.
- 8:27And early days of, you know, scientific Python as well.
- 8:31You know, the whole separation between Numerae and NumPy, numeric, all of that.
- 8:38So I started.
- 8:40I loved the language.
- 8:41I started to use it in our tools.
- 8:43It was a funny time where it was definitely unknown as a language.
- 8:48And to get into big companies, it was a little tricky on the QA point of view.
- 8:53And then, but it was interesting.
- 8:55Eventually, I started to get more engaged with community, started to go to meetups in Italy and everything.
- 9:02And then I think it was around 2004 or 2005, I started to go to my first conferences in Europe, love the community, started to, how can I get involved?
- 9:13So at that point, later, late 2000s, I started the, with a bunch of friends in the Italian community, we started the Python Italia Association, which is basically nonprofit trying to push the language.
- 9:26And the main focus was organizing the Python Italy conference.
- 9:31We started in 2007.
- 9:33Also that great, great community, a lot of work, but also paid back.
- 9:38I remember the first year we were like, let's do this thing.
- 9:41We were very passionate.
- 9:43And we ended up in negative.
- 9:44And all the members of the society.
- 9:46Yes.
- 9:47So just to say that big props to everyone in the community doing a lot of the community work, because it's a lot of work and it often is not paid or can even be out of each one.
- 9:59You might have to pay to do the work.
- 10:01Yes.
- 10:01With the opposite of getting paid.
- 10:02Yeah.
- 10:03Long story short, I started to be also more engaged with the European community.
- 10:09And we organized the European Python in 2011.
- 10:14So for three years in a row.
- 10:16And that got me into the European society.
- 10:18Eventually became chairman of that, which basically means your Python society is this European nonprofit that pretty much in line with the PSF, tried in different ways, but tries to engage with community, organize conferences, raise some money to invest back in the community through grants and things like this.
- 10:39And then I did that for a number of years.
- 10:43So eventually, well, back in the day when I was starting to learn Python, I also started to use a lot of the scientific libraries.
- 10:51And one of them was Chaco, which was a graphic plotting library for Python that Peter Wang developed with Brian VandenVen.
- 11:00I think he was in the show.
- 11:01Peter Wang being the CEO of Anaconda.
- 11:04Yes, today, CEO of Anaconda.
- 11:07And we met for the first time in person at EuroPython in Florence.
- 11:11And he was like, okay, we know each other from the internet for a while.
- 11:14Let's get more involved.
- 11:17That year, I was still trying to make my company be successful.
- 11:21It wasn't the right time.
- 11:23The following year, I met with Travis Oliphant, the other founder of Anaconda in Berlin.
- 11:29We just figured out, you know, like we're doing a lot of things that are similar.
- 11:32We're passionate about the same thing.
- 11:34So I eventually joined Anaconda in 2014.
- 11:37And then eventually that following year, I moved to the U.S.
- 11:41I joined the company full time.
- 11:42Fantastic.
- 11:43Well, it's quite the journey.
- 11:44Yes.
- 11:45This is interesting language.
- 11:46Let me just start participating in some of the meetups.
- 11:48Meetups become conferences.
- 11:50Conference become continent-wide conferences.
- 11:53And I think it's a pretty good takeaway for people who want to get more involved in the community.
- 11:58And like every one of those steps probably didn't feel massive other than maybe moving to the U.S.
- 12:03and joining Anaconda.
- 12:04But, you know, they all probably seem like really iterative and sort of incremental.
- 12:08But at the same time, it builds up to this really cool place where you're maybe building amazing Python things in the browser at Anaconda.
- 12:16Right.
- 12:17Yeah.
- 12:17My experience has very much been what, you know, a lot of people say.
- 12:21You come from the language, you stay for the community.
- 12:23That is really my experience.
- 12:26Yeah.
- 12:26And then, yeah.
- 12:27Anaconda allowed me to work on a lot of interesting things.
- 12:30Like, as you said, Python in the browser is the ultimate project.
- 12:33But when I joined, I started with being a core developer for Bokeh, which had some of that.
- 12:39Bokeh is a visualization library for Python on the browser.
- 12:42And with your project you have now, you can still put Bokeh in the browser.
- 12:45Exactly.
- 12:45It can stay in the browser.
- 12:48Exactly.
- 12:49Yes, exactly.
- 12:50Even more in the browser than before, I guess.
- 12:52Yeah.
- 12:52All right.
- 12:53Let's dive in.
- 12:53Now, before we dive in real quick, since you talked about gaming, want to be in game development and your brother and so on.
- 12:59Have you watched the documentary Power On, the story of Xbox?
- 13:02I haven't.
- 13:03No.
- 13:03This is a documentary that came out.
- 13:05It's a four-hour show.
- 13:07You can watch it on YouTube.
- 13:08Cool.
- 13:09And it's like the history of Xbox.
- 13:11Nice.
- 13:11And if you're just into, like, tech history documentaries, this thing is pretty interesting.
- 13:15But let's not talk about games.
- 13:16Let's talk about the birth and death of JavaScript.
- 13:19Have you seen this presentation?
- 13:21Yes.
- 13:21Great.
- 13:22It is so good, isn't it?
- 13:24Yes.
- 13:25One of my favorite funny talks, you know.
- 13:27The reason I bring this up is there's a lot of interesting building blocks that I suspect many people in the Python community are fully unaware of.
- 13:34There's been all these developments over in the JavaScript world.
- 13:38And Gary Bernhardt did this talk at PyCon 2014, the birth and death of JavaScript.
- 13:43And no, I'm not mispronouncing it.
- 13:45That's how it's done in the talk.
- 13:46It tells this hilarious story of the future of, like, weird human evolution and programming and JavaScript and how we don't do JavaScript, but everything's JavaScript.
- 13:55But what is the underlying theme is, like, an actual interesting technical history, how people started doing crazy stuff with JavaScript pre-WebAssembly.
- 14:04So there were compilers, like in Scriptum, that will compile C code to JavaScript.
- 14:10And then the JavaScript JITs have become so fast.
- 14:13So one of the examples was, like, Chrome running Firefox, running something else, like maybe like an embedded Windows.
- 14:20I can't remember what it was.
- 14:21But just there were, like, layers and layers of JavaScript doing wild stuff that we wouldn't imagine otherwise, right?
- 14:28Yeah.
- 14:28Yeah.
- 14:29And I think that's part of also one of the reasons with Peter we said, OK, this is the right time to try this out because the browsers became so powerful.
- 14:40And so they are basically, if you see from a different perspective, they are mini virtual machines.
- 14:46They have their own file system.
- 14:47They have their own isolation networking.
- 14:50A lot of the things, you can really see that as a VM.
- 14:54Like the JVM, like the .NET CLR, and to some degree, like Python, right?
- 14:58Right.
- 14:58Right.
- 14:59The CPython on a regular machine.
- 15:00Yeah.
- 15:01You can run full operating systems on top of, in the browser.
- 15:05And honestly, the explosion of interesting things in the last few years have been crazy and doesn't seem to decelerate at all.
- 15:13So the level of maturity is kind of encouraging.
- 15:16It is.
- 15:17And the performance, while not native performance, is not that far off.
- 15:21At least some of the examples that Gary gave, it was like 50%.
- 15:25You could run Doom at 50% speed when you compile it to the browser or something insane like that.
- 15:30Right.
- 15:30Yeah.
- 15:31It's good enough.
- 15:32It's more than good enough.
- 15:33Yeah.
- 15:33I mean, because the alternative so often is, well, we're going to send a request over to the server, and that might be native and fast, but it's also network latency, and it's also a shared compute resource.
- 15:43With a thousand other people.
- 15:44And here you are sitting on your MacBook Pro Max with 16 cores, and you're just waiting.
- 15:51Yeah.
- 15:51Yeah.
- 15:52That's actually one aspect that a lot of people don't consider.
- 15:56There is the performance in terms of how fast it goes.
- 16:01But there are a few aspects that you also need to consider overall in the overall experience.
- 16:07How long for the developer side of a point of view, how long before they can actually get in front of something usable or spinning up their environments and things like this.
- 16:17Then there's loading time versus execution time.
- 16:21Also very different.
- 16:22But from the eyes of the user, it kind of sums up.
- 16:25There are so many small niches or small verticals that we can work on in the whole JavaScript or browser ecosystem that I think we can make a lot of improvements the next few years.
- 16:37Yeah.
- 16:38You think of grid computing and distributed computing, part of the power of the cloud is that I could just go say, I need more.
- 16:47We have four servers, but a bunch of people showed up.
- 16:50So give me 20 servers and scale my Kubernetes cluster across that for now.
- 16:54And four to 20 is amazing.
- 16:57But four to 100 million is really different.
- 17:00If we can push a lot of that compute to everybody's personal computers, even our iPhones are like unimaginably fast little devices.
- 17:09Right.
- 17:10Like the whole M1 crazy transition is basically an iPhone chip with more voltage, you know, and better cooling.
- 17:16Right.
- 17:16There's not much more to it than that.
- 17:18So finding ways to execute more of our code on the clients is pretty interesting.
- 17:24Yeah.
- 17:25Totally agree.
- 17:26We already see that even on the server side, projects like BASC, where very popular pushing computing on nodes and, you know, the distributed architecture is very powerful and it is needed.
- 17:38We can have the possibility to make the same thing on the client side on the browser as well.
- 17:43Yeah.
- 17:43Yeah.
- 17:44DESC, for those out there who don't know, is a Pandas-like, NumPy-like API that you can just say, but run it distributed across these machines on the cluster automatically.
- 17:55You know, Matthew Rocklin started Coiled and, you know, former Anaconda alumni.
- 18:00A lot of tie-ins there.
- 18:02Yeah.
- 18:02Yeah.
- 18:03Cool.
- 18:03It's not the same thing in any way, but it is a way that really takes Python and gives it way more compute resources potentially.
- 18:11So are there any particular sort of set the stage with this compile-to-see and stuff, but is there any other sort of building blocks in the history of how we got to what you all built in the JavaScript stack that you want to call out?
- 18:25Yes, definitely.
- 18:26I think one major thing that, you know, I want to give props as much as we can, the Pyodide project, which is, you know, a runtime for Python on the browser.
- 18:36And they've been extremely, like, one of the reasons we could work on PyScript was because it has a level of maturity and performance right now that is really stable, right?
- 18:49And actually also been, they're a great community, very supportive.
- 18:54So a big shout out to them, Hood and Roman specifically, the two main core developers.
- 19:01And the whole work underneath that project as well, you know, like the progress of the MScript and WASM and WebAssembly, there is a huge community behind that.
- 19:14So actually, that's one of the principles that we try to, at the core of PyScript, is we don't want to reinvent anything that we don't need.
- 19:23We want to be really additive to the ecosystem, glue things together, provide nice and easy APIs and high-level APIs so that we can lower the barrier, basically give more accessibility to the tools, to the users, rather than reinventing something that's not needed.
- 19:40Yeah, so PyIodide.
- 19:42This project is a cool project.
- 19:45I interviewed Michael from the project about this way, way back, a couple years ago.
- 19:53But yeah, it uses this MScript and WebAssembly story to basically compile a port of CPython to run in WebAssembly in the browser, which is fantastic, right?
- 20:05I mean, that's, and to some degree, that's the building block that you all really needed, right?
- 20:09Yes, yeah.
- 20:10Yeah, definitely.
- 20:10Yeah.
- 20:11I must mention also, yeah, Michael Dropbom and Christian Himes, who has been also pushing a lot of the Python on WASM ecosystem.
- 20:20Yes.
- 20:21Yeah.
- 20:21There's a lot of good energy in the Python community to actually try to push that together, right?
- 20:27Yeah.
- 20:27And also Brett Cannon has been a big proponent of making that happen.
- 20:31I don't know how directly he evolved with the day-to-day, like, let's make it compile, but I know he's been really pushing on that effort as well.
- 20:37This portion of Talk Python To Me is brought to you by Microsoft for Startups Founders Hub.
- 20:44Starting a business is hard. By some estimates, over 90% of startups will go out of business in
- 20:50just their first year. With that in mind, Microsoft for Startups set out to understand
- 20:55what startups need to be successful and to create a digital platform to help them overcome those
- 21:00challenges. Microsoft for Startups Founders Hub was born. Founders Hub provides all founders at
- 21:06any stage with free resources to solve their startup challenges. The platform provides technology
- 21:12benefits, access to expert guidance and skilled resources, mentorship and networking connections,
- 21:18and much more. Unlike others in the industry, Microsoft for Startups Founders Hub doesn't
- 21:23require startups to be investor-backed or third-party validated to participate. Founders Hub is truly open
- 21:31to all. So what do you get if you join them? You speed up your development with free access to
- 21:35GitHub and Microsoft Cloud computing resources and the ability to unlock more credits over time.
- 21:41To help your startup innovate, Founders Hub is partnering with innovative companies like OpenAI,
- 21:46a global leader in AI research and development, to provide exclusive benefits and discounts.
- 21:51Through Microsoft for Startups Founders Hub, becoming a founder is no longer about who you know.
- 21:56You'll have access to their mentorship network, giving you a pool of hundreds of mentors across a range
- 22:01of disciplines and areas like idea validation, fundraising, management and coaching, sales and
- 22:07marketing, as well as specific technical stress points. You'll be able to book a one-on-one meeting
- 22:12with the mentors, many of whom are former founders themselves. Make your idea a reality today with the
- 22:17critical support you'll get from Founders Hub. To join the program, just visit talkpython.fm slash
- 22:23foundershub, all one word, no links in your show notes. Thank you to Microsoft for supporting the show.
- 22:28Let's get to your announcement. I mean, I didn't go to PyCon this year, mostly just not ready to be in a
- 22:38room with people from around the world for that long and to give the world a chance to try it out,
- 22:43then I'll see how it goes and do it next year. But I missed everyone there. And, but I got a lot of
- 22:47messages. One was friends saying, why aren't you here? Why can't we have a beer together? Which,
- 22:52sorry, I really missed that. And then the other is, have you heard of PyScript? Oh my goodness,
- 22:57this was the announcement. Like this, if there's any big piece of news that came out from presentations
- 23:02and talks and announcements, like this is the one. So PyScript, people can guess, but what is it?
- 23:07Tell us about this. So PyScript is a framework that allows users to basically use HTML tags to define,
- 23:16to run Python code and define different components. Those can be related to executing code, but also
- 23:24providing, defining your environments, what packages you want to install, et cetera, as well as some UI
- 23:31components that make things easier for users that are not familiar with HTML and CSS and all the styling
- 23:39of things. It's based on a Python runtime, which is Pyodide that allows Python execution on the browser.
- 23:48And it has interoperability capabilities with JavaScript as well. So you can use both Python libraries as well
- 23:56as JavaScript libraries in your code.
- 23:59Yeah. This is really great. And if people go to PyScript.net and scroll down and what is PyScript,
- 24:03it really calls all these out. Like if you're trying to present this to your boss or your team,
- 24:08you're like, this is something cool we should check out. Like they should definitely go to that list
- 24:11right there. Yeah.
- 24:12Yes. Yeah. That is, you know, the most immediate list of things. You know, there's a lot that we're
- 24:18working on and trying to provide as a tooling, but it's very, very new and very, you know, green,
- 24:25if I must say. So yeah.
- 24:27So maybe don't totally release a product on it just yet.
- 24:30Yes. Definitely. Very bad idea to release a product. This, you know, expect APIs, code and features to change.
- 24:38Actually, it's one of the things that we intentionally talked about before Python was, you know, should we have a versioning in place or something like this so that, you know, you would expect any project to go that goes out there to have versions and everything.
- 24:54Yeah. Yeah. So we intentionally said, no, let's wait because it is, or let's put a version like do not use in production dot zero dot one.
- 25:03Zero dot zero dot zero dot negative one.
- 25:05Yes. Mostly because, you know, with this, we want, we wanted to have something that is working, that is useful, that it can be used by and hacked on by users that they want, but also give the vision that we have in mind and for people to see the possibilities.
- 25:24And that was the main focus for the project until Python.
- 25:28Right.
- 25:28Now, a lot of the following things are just the things that we want to achieve in order to enable a community.
- 25:36And this is an open source project.
- 25:38It's not an, it started at Anaconda, but it's an open source project.
- 25:42We want to have a strong community, have contributors beyond the Anaconda team and build it together.
- 25:50Yeah. That was one of my questions I wanted to ask you about is it sounds like you all have a very strong vision of what this should be and where you want it to go.
- 25:58Yes.
- 25:59But from what you just said, it's, I was wondering, does that mean it's more source open than open source?
- 26:03And like, we're driving this way and we'll take PRs as long as it's on our, our roadmap or how open are you to people just jumping in and giving ideas and trying to build it up?
- 26:12Oh, yeah. Great question. We are very open. So it's worth also saying that right now we are at the stage where I don't think we've made it that easy for people to onboard and understand the vision, understand the project, and actually be able to contribute.
- 26:31We're missing a lot of documentation. So one of the biggest pushes that we we've been having after PyCon is to actually build up the documentation around those things so that anyone contributing have a easier time onboarding, understand the visions, and can give feedback based on those things.
- 26:49So as soon as we are also growing the team behind it that so there's a lot of small things that we are preparing for the being a community that is on itself or self organized and everything.
- 27:02So overall, I think that this is really a community project.
- 27:07Sure. Speaking of community, let me just pull up the GitHub page. So you're just shy of 10,000 stars.
- 27:12Yeah, crazy.
- 27:13That's, I don't know how old it is, but it's how long is this repo been public? Not that long, right?
- 27:18We actually made it public 10 minutes in during Peter's talk.
- 27:22Okay. So you're like half of Flask almost or half of closing in on FastAPI levels of numbers of stars. There's a lot of interest in this.
- 27:31Yes, which is really exciting, but also is somehow overwhelming, right? Like I'll be very honest.
- 27:37There's a lot of expectations as well, right?
- 27:40Yes. Yes. And so we are aware of all of that. I think the main thing really for us is to, you know,
- 27:48we want to make sure that our users have patience because we're trying to get to a stable state or at least, you know.
- 27:57It's less than two weeks old. Come on.
- 27:58Exactly. Yes.
- 27:59It's a baby.
- 28:01Yeah. I could talk about this for hours. But at the same time, we want to make sure that it's usable and we want to collect users' feedback to make it better.
- 28:10Actually, one thing that is very important is that it got a lot of interest and a lot of excitement from the Python community and some of the web community as well.
- 28:21But I really want to make sure that everyone understands the picture. The full picture is what Peter said, like programming for the 99%.
- 28:30So beyond developers, how can we have a tool that students can learn very fast, get to learning coding very fast or even non-developers?
- 28:42I would love my mom to write her recipe book with PyScrime, right? Because it's that easy.
- 28:47Yeah.
- 28:47And thinking about the possibility of shipping that in your phone or your mobile users in developing countries that do not have access to computers and things like this, but they have a phone.
- 28:58What we also hope is that the social impact of a tool like this could be very big. One can dream.
- 29:05Yeah. Yeah. One can dream for sure. So something maybe you could take inspiration from is the Swift Playgrounds, right? It seems like you can model that pretty well.
- 29:14And I feel like Swift was largely borrowing from Python in a lot of its ways. So it's time to borrow a little back from Swift.
- 29:20Yes.
- 29:21For people who don't know, Swift Playgrounds is like a little bit like a REPL, a little bit like Jupyter.
- 29:26But then on the right, you get kind of more iOS outputs, like little widgets and graphs and animations and whatever.
- 29:34But it seems like that could be a similar way that's sort of like Jupyter, but also a little more web playful.
- 29:41Right. Yes. And I would say we have no shame into like borrowing from others, right?
- 29:47I think that actually is how you can grow well.
- 29:51Like take what's successful from this community or this language, et cetera, and try to use that to make a better tool.
- 29:58Yeah. Because it's so early, because it's so fresh.
- 30:00Like one of the drawbacks, call it a drawback, one of the temporary limitations is people can't just jump in and build the next version of Gmail or whatever with it right now.
- 30:10But a benefit is so many people want to contribute to open source and they're like, I love Django.
- 30:15I'm going to contribute to that. Or I love Jupyter. I want to contribute to that.
- 30:18And then it's such a complex, highly leveraged, very polished system that like, well, contributing to that means you have like an insane level of understanding to make this little change that won't break everything else.
- 30:31Whereas this is pretty fresh, right? So if somebody wants to come along and build something like a Swift Playground equivalent, the door is open for, and I'm not sure how much you want to accept that, but like the door is open for people to be, to grab ideas that are lower hanging fruit at the moment.
- 30:46Yeah. The idea is also to allow users to extend the tool itself and without having to change the tool, like with extensions and things like this.
- 30:57Like in my mind, I see that as a sort of Minecraft for programmers, right? Like you can view your own blocks and then share with others and then they can share, they can.
- 31:08Right. I can check out my mod pack for this thing or whatever.
- 31:11Yeah. Yeah. Yeah. And yeah, the idea is to make it well, powerful, but also fun and hackable.
- 31:17Yeah. Very cool. All right. Now let's talk about, I know we talked to some of these things here, but let me just dive in a little bit on the bullet points to kind of do a wrap up summary before we move into the coding.
- 31:27So Python in the browser, this means it runs 100% in the browser through primarily WebAssembly, which is leveraging the Pyodide project. Yeah.
- 31:37Right. That's right. Okay. And the WebAssembly stuff runs, I think, even better than the JavaScript.
- 31:43The C code compiled to JavaScript because this is still more of a binary form and whatnot.
- 31:50That's pretty excellent. One of the things that really inspires me here, you spoke about this will allow us to do things on our phones and on lower end computers and do other things like that.
- 32:01where like now we have this possibility
- 32:02just if you have a browser, you can kind of do it.
- 32:04I totally agree and that's great.
- 32:06But what really gets me excited about where this could go
- 32:09is progressive web apps
- 32:11or something even like Electron.js, right?
- 32:15Where I build like a true desktop application
- 32:18like VS Code or Slack or whatever,
- 32:21but instead of having to write everything in JavaScript,
- 32:24you know, write it in Python, right?
- 32:25And just got to include the 2 meg or 3 meg WASM file
- 32:29with your, what is already a massive Chrome distribution.
- 32:32So no one would know anyway.
- 32:33Right.
- 32:33Anyways, all right.
- 32:34So yeah, the estimation.
- 32:36Think about this, like there's a way to sort of,
- 32:38this is what I was hinting at at the beginning as well.
- 32:40Like, oh my gosh, we can have things in our doc
- 32:43that are like modern looking,
- 32:44that are based on Python easily.
- 32:46Very exciting.
- 32:47Yes.
- 32:47Or Taskbar if you're a Windows person.
- 32:49Right.
- 32:50The whole story about the native apps
- 32:53and mobile and whatnot.
- 32:55Russell Keith-Magee, maintainer of beware,
- 32:58is he just joined Anaconda a few months ago.
- 33:00Oh, he did?
- 33:01Okay.
- 33:01I didn't know that.
- 33:02Excellent.
- 33:02Yes.
- 33:03And he's been sort of looking at the project,
- 33:05collaborating, contributing with some stuff.
- 33:07He actually made an example.
- 33:09One of the examples is written in Toga,
- 33:12which is the beware toolkit for UI design
- 33:15and stuff like this.
- 33:16And it's built in Toga,
- 33:18but has a PyScript backend
- 33:20so that it can render to PyScript directly.
- 33:24Pretty much like it can build for iOS or Android or Mac.
- 33:28But another interesting story is the opposite, right?
- 33:32Like, can we have an app,
- 33:33a PyScript app that then Toga can transform
- 33:36into an electron-like app
- 33:38that you can just run on your mobile?
- 33:40Lots of possibilities.
- 33:41Please do it.
- 33:42Do it.
- 33:42Do it.
- 33:43So many people would be happy, yeah.
- 33:45Yeah.
- 33:45If you're listening, that's for you.
- 33:47Yes.
- 33:48Oh, my goodness.
- 33:49Look, I think there are plenty of negatives
- 33:52about electron apps.
- 33:53Like, why does my password manager
- 33:56need 400 megs of RAM to run?
- 33:58But we have such a limited set of options
- 34:03for desktop and mobile apps and Python
- 34:06that for now, that would be massively welcome
- 34:08to do something like this.
- 34:10And then there's always possibilities of,
- 34:11well, do you actually have to ship Chrome
- 34:13in some like massive runtime
- 34:14or could there be a smaller host, right?
- 34:16Like there's layers of improvement.
- 34:18All right, next one, Python ecosystem.
- 34:19When you think about the history,
- 34:21this is not the first or the second time
- 34:23that someone has done Python in the browser.
- 34:25Like if you're familiar with,
- 34:26are you familiar with Anvil?
- 34:27Yes.
- 34:28I had Meredith on from Anvil
- 34:31to talk about both Anvil one time
- 34:34and then I think it was Sculpt,
- 34:35which is what they use.
- 34:37And Anvil has both a back end and front end
- 34:39that's all Python.
- 34:40A really interesting project.
- 34:42And they were using a JavaScript variant
- 34:45called Sculpt.
- 34:47And there's, I think,
- 34:48Brython is another one that you could choose.
- 34:50But one of the challenges of that
- 34:52is it's Python-like, right?
- 34:54It's not really the Python runtime.
- 34:56Do you maybe want to talk about
- 34:58like how that differs from the Python ecosystem,
- 35:01Python runtime that you all have?
- 35:02Right.
- 35:02That's exactly the difference, right?
- 35:04And probably the Pyodide folks
- 35:06would have a lot more to say.
- 35:08But the big difference is what you said.
- 35:10Like it's Python-like.
- 35:11For example, numerically,
- 35:12like JavaScript doesn't have integers.
- 35:14So your Python has to somehow fake integers
- 35:17if you're going to do things like that, right?
- 35:19Right.
- 35:20It's mimicking what you would expect with Python,
- 35:23but with the JavaScript.
- 35:24And it's not really a full-blown Python interpreter
- 35:28that you can also install your packages.
- 35:30The whole Python ecosystem is not supported.
- 35:33And I think that's the big difference
- 35:35that was the differentiator for Pyodide.
- 35:38And now that, you know,
- 35:39CPython actually compiles to Asm through M-Scripten,
- 35:43it's very exciting that we can...
- 35:45Is running the same VM or the same runtime
- 35:48that we get with CPython on our desktops,
- 35:51more or less, like a cut-down limited version,
- 35:53but it's not like a weird transpile to JavaScript
- 35:55and then run it.
- 35:56Yes, correct.
- 35:57With a few caveats, right?
- 36:00That's one of the things that I think is worth mentioning.
- 36:03It's the same CPython code,
- 36:05and it's the same thing you get in your local installation.
- 36:10A few things are different
- 36:11just because the browser as a VM,
- 36:13they work differently, right?
- 36:15Like file system is different on the browser.
- 36:18Sockets are different.
- 36:20Threading, probably.
- 36:20Threading, multiprocessing,
- 36:22pipes, and things like this, right?
- 36:24There are solutions for some of these
- 36:27that will require work
- 36:30and probably upstream
- 36:31with some of the parts of the standard libraries
- 36:35or the third-party packages,
- 36:37but they are just different.
- 36:39So we need to account for that.
- 36:40Sure.
- 36:41All right.
- 36:41So you can use, it says,
- 36:43many popular Python packages
- 36:44and stuff in the scientific data stack.
- 36:47Question from the audience,
- 36:48from Christopher Tyler says,
- 36:50my very limited understanding,
- 36:52since you're using PyDyde,
- 36:53is that there's a limitation
- 36:54on the libraries you can use,
- 36:56meaning can you import your own custom libraries?
- 36:59Generally, it's yes, right?
- 37:00But not universally, isn't it?
- 37:02Right.
- 37:02That's a great question.
- 37:03Let's talk first about the standard libraries
- 37:05and the third-party libraries
- 37:07that you have on PyPI, et cetera.
- 37:08So PyDyde ships with the standard library
- 37:12plus a set of packages that they ported.
- 37:15Most of these are,
- 37:17they use C extensions and things like that.
- 37:20So they need to be compiled.
- 37:21And so the PyDyde team took that work
- 37:25and took care of it.
- 37:26They're included in the distribution.
- 37:28There is a way for you to also build packages
- 37:32that depend on C extensions.
- 37:34They have a nice guide in their website
- 37:36that you can follow,
- 37:38and they will help with that.
- 37:39In general,
- 37:40you should expect your Python packages to work
- 37:44if you hip install them, right?
- 37:46Yeah.
- 37:46The caveat there is,
- 37:48do they have other dependencies
- 37:50that are C,
- 37:51depend on C extensions,
- 37:52and that will cascade in what work?
- 37:56Or do they rely on some of the things
- 37:58that I mentioned before,
- 37:59like multi-threat,
- 38:00multi-processing,
- 38:02and sockets and stuff?
- 38:03So in that case,
- 38:05the package may install,
- 38:06but it will raise an error
- 38:09because multi-processing is not supported
- 38:11or other things like this.
- 38:12What about simple stuff like async and await?
- 38:14Great question.
- 38:15It's not from a,
- 38:16like,
- 38:17what it expects of the operating system
- 38:18is pretty low,
- 38:19but it's also pretty advanced.
- 38:21Right.
- 38:21That is more of,
- 38:23I think it's less of the packaging problem
- 38:26and more of a philosophical problem
- 38:28in terms of how you compare Python
- 38:31to JavaScript, for instance, right?
- 38:32JavaScript,
- 38:33even if it's synchronous as a language,
- 38:36it has built the idioms over time
- 38:39to always try to be asynchronous
- 38:42because for obvious reasons,
- 38:44you don't want to,
- 38:45you don't want to block your browser
- 38:47or, you know,
- 38:47if you're doing something in your page
- 38:49and you block your Chrome on your phone.
- 38:51And that way,
- 38:51it seems like it should be a fantastic match
- 38:53for async and await.
- 38:54Yes.
- 38:55The waiting on I.O., yeah.
- 38:56Yes.
- 38:56It is a fantastic match
- 38:58and almost everything that you do
- 38:59that would be blocking in JavaScript,
- 39:02you would async await.
- 39:03In Python,
- 39:04we are used to do everything blocking
- 39:06and then when we want to do explicitly,
- 39:09we just,
- 39:10we use async.io
- 39:12or something different.
- 39:13So I think on that side of things,
- 39:16it's more of a,
- 39:17how you develop your Python code
- 39:20rather than the language and the package.
- 39:22You might have to have a mental model
- 39:24that matches closer to like
- 39:25what JavaScript traditionally has.
- 39:26Yes.
- 39:27Yeah.
- 39:27But, you know,
- 39:28you can use async await
- 39:29anywhere in your code
- 39:31in Pyodide and PyScript.
- 39:32Oh, sweet.
- 39:34Okay.
- 39:35I should have started on this list here
- 39:3740 minutes ago.
- 39:38But next question from Roller is,
- 39:41how would I pip install something
- 39:42into PyScript?
- 39:43Which is, you know,
- 39:44a follow-up from what Chris asked
- 39:46in this like Python ecosystem integration.
- 39:47Clearly, pip install a thing
- 39:49is like got to be at least 30%
- 39:51why Python is so popular.
- 39:53Right.
- 39:53Yeah.
- 39:54Not commenting on the packaging
- 39:56for Python or JavaScript.
- 39:57And they all,
- 39:58we all know that
- 39:59most people don't have problems with them.
- 40:02They all have idiosyncrasies,
- 40:03let's say.
- 40:04They all got their weirdnesses.
- 40:05Right.
- 40:05So Pyodide itself
- 40:07allows you to use MicroPip,
- 40:09which is,
- 40:09we will pip install
- 40:11your dependencies.
- 40:12Is it like an NPM-like thing
- 40:14where it creates like,
- 40:15instead of a node module,
- 40:16it creates something else?
- 40:17Yeah.
- 40:17It's like NPM,
- 40:19or it's more like pip
- 40:20really for Python.
- 40:21And it will go,
- 40:22and if it's a package
- 40:24provided by Pyodide itself,
- 40:26we will load that package
- 40:27for you.
- 40:28If it's a package
- 40:29that is not available there,
- 40:30it will check on IPI.
- 40:33And you can also specify
- 40:34the location of the package itself.
- 40:36So if you have your own repository,
- 40:38but you have your URL
- 40:40that points to a wheel file
- 40:42or a zip file,
- 40:43it will install from there.
- 40:44Yeah.
- 40:44And that wheel can be remote,
- 40:46just like you might have
- 40:46a CDN-pointed thing
- 40:48for JavaScript.
- 40:49Yes.
- 40:49Like, here's my wheel.
- 40:50Okay.
- 40:50Yeah.
- 40:51If it's pure Python, right?
- 40:52If it's C,
- 40:52then all bets are off.
- 40:53If it's C,
- 40:54you should have done your duty
- 40:57and ported it
- 40:58to WebAssembly.
- 40:59But the PyScript
- 41:01provides a layer
- 41:02on top of that
- 41:03where you can specify
- 41:05a tag called PyEnv
- 41:07and it accepts CMO format
- 41:10and you can specify
- 41:11your dependencies there
- 41:12and both for packages
- 41:14and also has
- 41:15an extra key called paths
- 41:17where you can actually provide
- 41:19the link to your modules,
- 41:20custom modules
- 41:21that you want to...
- 41:22effectively like the working
- 41:23directory of your Python.
- 41:25So when you type
- 41:26import filename
- 41:27or directory slash filename,
- 41:29it kind of mirrors that
- 41:30to the browser, right?
- 41:31Yes, exactly that.
- 41:32If you know how Python works,
- 41:34it's basically adding
- 41:35those files to your syspath.
- 41:37So it finds them.
- 41:39Interesting.
- 41:39Yeah.
- 41:40Cool, cool.
- 41:41All right.
- 41:41Another one that's really important here
- 41:42is Python with JavaScript.
- 41:44So it's not like you're locked
- 41:46into this PyScript little box, right?
- 41:49What I think this is another thing
- 41:51that makes me very optimistic
- 41:52for the future is
- 41:53you can communicate back
- 41:55to other JavaScript,
- 41:56to JavaScript events,
- 41:57button clicks to the DOM.
- 41:59So if here's another dream
- 42:01that I have is something
- 42:02like a Vue.js wrapper
- 42:05type of thing
- 42:06that I could do in Python
- 42:07and then do sort of model binding
- 42:10or attribute binding
- 42:11to the DOM
- 42:12and have that sort of stuff happening.
- 42:14And this is really important
- 42:16to make it a first class citizen
- 42:17that can work with
- 42:18all the stuff on the page.
- 42:19not like a canvas
- 42:20that was given or something.
- 42:21Yeah.
- 42:22Yeah.
- 42:22So before I go into this,
- 42:24I want to plus one
- 42:25on what you said
- 42:26around reactive
- 42:27sort of programming
- 42:29and components
- 42:30where they can be attributes
- 42:32that auto notify
- 42:33others' elements.
- 42:34That is definitely something
- 42:36that we would love
- 42:37to explore more.
- 42:38And there's a lot of interest.
- 42:39And on the Python
- 42:40with JavaScript side of things,
- 42:42I, after the keynote
- 42:43at PyCon,
- 42:45I saw a lot of videos
- 42:46coming up with like,
- 42:47oh, is JavaScript that
- 42:49now that Python
- 42:50can run on the browser
- 42:52and things like this.
- 42:53I think that narrative
- 42:55kind of looks at
- 42:57one side versus the other
- 42:59where we,
- 43:00what we really want to encourage
- 43:02is actually the two together.
- 43:04There is a ton
- 43:05of really great libraries
- 43:07in JavaScript.
- 43:08And there is a level
- 43:09of maturity in JavaScript
- 43:11on things on the browser
- 43:13or UI creation
- 43:14or, you know,
- 43:16drawing on Canvas
- 43:17or on the page
- 43:19that we are nowhere close
- 43:22to the 1% in Python.
- 43:23And all of a sudden,
- 43:25you can use those tools
- 43:26in Python and vice versa.
- 43:28All of a sudden,
- 43:29JavaScript users
- 43:30could use NumPy
- 43:31or SciPy
- 43:32and other things
- 43:33to power their applications, right?
- 43:34Wow, that's interesting.
- 43:35I hadn't really thought
- 43:36about the benefit others
- 43:37like outside of Python
- 43:39people may be receiving.
- 43:40But yeah,
- 43:40now Python becomes a thing
- 43:42so they could leverage.
- 43:43Yeah, exactly.
- 43:44I think if we start
- 43:45looking at this that way,
- 43:47then you can see
- 43:48how PyScript is a glue
- 43:49for building
- 43:50reacher applications,
- 43:52depending,
- 43:52like independently
- 43:53if you're a JavaScript developer
- 43:54or a Python developer.
- 43:56And we are starting
- 43:57with Python.
- 43:58It makes a lot of sense.
- 43:59But if there is
- 44:01a Rust implementation
- 44:02on WASM
- 44:03or an R,
- 44:04I'm sure
- 44:05that the Python
- 44:06scientific community
- 44:07would love to
- 44:08use R tools
- 44:09in the page
- 44:10with Python stuff
- 44:11and maybe JavaScript
- 44:12as well, right?
- 44:14Yeah.
- 44:14I think it's
- 44:15building together
- 44:16kind of movement
- 44:17that we want to push forward.
- 44:18Yeah.
- 44:19If I can look out
- 44:20and imagine a future,
- 44:22I don't know
- 44:23that there's a chance
- 44:24how much it would exist,
- 44:25but a really great future
- 44:26of like,
- 44:26well,
- 44:27we have WebAssembly.
- 44:28What if we really
- 44:29made WebAssembly
- 44:30more of a
- 44:31first-class citizen
- 44:32from a browser maker
- 44:34perspective?
- 44:35one thing
- 44:36I think would be
- 44:36fantastic is
- 44:37if instead of
- 44:38getting to the DOM
- 44:39through JavaScript
- 44:40and through the events
- 44:41through JavaScript
- 44:41is if all of the
- 44:43browser makers said,
- 44:44here's a WebAssembly
- 44:45native thing
- 44:47that you can use
- 44:47to bind to the DOM
- 44:49and to the events
- 44:50and basically control it,
- 44:52you know,
- 44:52you could have
- 44:53Rust in the browser,
- 44:54Python in the browser,
- 44:55C# in the browser,
- 44:56and they could all have
- 44:57this common API
- 44:58defined in
- 44:59maybe even
- 45:00an adapter type thing
- 45:02like,
- 45:02well,
- 45:02in C#
- 45:02it's classes
- 45:03and in Python
- 45:04it's,
- 45:04you know,
- 45:04Lambdas,
- 45:05I don't know,
- 45:05whatever,
- 45:06right?
- 45:06Like some variation
- 45:07that's more native
- 45:08to your world,
- 45:09but if there was
- 45:10some kind of interaction
- 45:11that we could build on,
- 45:12that would be even better,
- 45:13but we don't have that,
- 45:14so this integration
- 45:15with JavaScript
- 45:16and all of its
- 45:17modern features
- 45:18is fantastic.
- 45:19You still would want that,
- 45:20but it would be nice
- 45:21if there was a way,
- 45:22just put Python aside,
- 45:23like if I'm doing
- 45:24WebAssembly stuff
- 45:24that I could stay
- 45:25in WebAssembly,
- 45:26stay native
- 45:27to interact more
- 45:28with the browser.
- 45:29Yeah,
- 45:29and honestly,
- 45:30the interaction
- 45:31between the WebAssembly
- 45:33part of it
- 45:33and JavaScript,
- 45:34it's very fast.
- 45:35You know,
- 45:35I want to highlight
- 45:36one thing that you said.
- 45:37A lot of the future
- 45:39and how can this improve
- 45:41is on the,
- 45:42you know,
- 45:42browser folks to...
- 45:44It's on the vendors,
- 45:44yeah,
- 45:44it's on the shoulders
- 45:45to do it.
- 45:46Yes,
- 45:46because like
- 45:47the huge bottleneck
- 45:49that we have right now
- 45:50is that you still,
- 45:52like when you load
- 45:52your things,
- 45:53you still need
- 45:54to compile them
- 45:55and run them
- 45:56in WebAssembly.
- 45:57So there's a loading time
- 45:59right now
- 45:59is very high
- 46:00and we're working
- 46:01on optimizing things
- 46:02and there's a lot
- 46:03of great work
- 46:05from the CPython folks
- 46:06and the Pyodide folks
- 46:07to reduce the size
- 46:09of things that you're shipping
- 46:10by default.
- 46:11But ultimately,
- 46:12if you have a large
- 46:13scientific application,
- 46:14you still want to install
- 46:16NumPy
- 46:16and Vokey
- 46:18and other stuff like this
- 46:19and you will have
- 46:20a loading time.
- 46:20There is a loading time
- 46:21and, you know,
- 46:22I think that might mean
- 46:23it doesn't make sense
- 46:24for the homepage
- 46:25of Reddit
- 46:26or like your marketing page
- 46:29that needs to load
- 46:30super fast
- 46:31to have
- 46:32to be implemented in this.
- 46:33But if you're writing
- 46:34something like
- 46:35Google Maps,
- 46:36Gmail,
- 46:37like I go to those sites
- 46:39and then they spin
- 46:39and spin and spin
- 46:40for three seconds
- 46:41already,
- 46:41you know,
- 46:42like the first time
- 46:43you hit that,
- 46:44it does that.
- 46:44The second time
- 46:45it would just be cached.
- 46:46Right?
- 46:46All the stuff is off.
- 46:47The WebAssembly stuff
- 46:48is just off disk
- 46:49and if your expectation
- 46:51is this page
- 46:51might take two seconds
- 46:52to load sometimes,
- 46:53you're good,
- 46:54I think, honestly.
- 46:55Yeah.
- 46:55All that to say
- 46:56like this is the current state,
- 46:58right?
- 46:58I think there's a huge
- 46:59margin for improvement
- 47:00in the future
- 47:01and a lot of really great
- 47:03people are looking at it.
- 47:04Yeah.
- 47:04Okay.
- 47:05I agree
- 47:06and I think the momentum
- 47:07is just building.
- 47:08So let's look at some code
- 47:09and some examples
- 47:10so we can make this concrete
- 47:11for people over audio,
- 47:12which is tricky,
- 47:13but let's do it anyway.
- 47:14So you've got the GitHub page
- 47:16which has a bunch of examples
- 47:18and so what I want to do
- 47:20is kind of just pull up
- 47:20some of the examples here
- 47:22and let me remind myself
- 47:25what they are called.
- 47:26Let's do this one first,
- 47:28actually.
- 47:28I want to look at anti-gravity.
- 47:30So we all know the xkcd
- 47:33and if you go to the REPL
- 47:34and Python
- 47:35you type import anti-gravity,
- 47:36amazing stuff happens.
- 47:38And so here we have that
- 47:40equivalent in PyScript,
- 47:41but there's a couple of things
- 47:43that are really interesting
- 47:44about this.
- 47:44So let's pull this up.
- 47:45It says based on this thing
- 47:47and you give it a second
- 47:47and it says,
- 47:48the xkcd is,
- 47:50how are you flying?
- 47:51There's someone up there flying.
- 47:52They're like,
- 47:52Python,
- 47:52I just imported anti-gravity,
- 47:54right?
- 47:54It's great.
- 47:55But this is a variation.
- 47:56Maybe describe what just happened
- 47:58on the screen here.
- 47:59People can go to the demo
- 48:01and watch it,
- 48:02of course.
- 48:02This is,
- 48:03yeah.
- 48:03If they just check out the repo.
- 48:04This is a great,
- 48:05great example
- 48:06done by Philip Rudiger,
- 48:08his core contributor
- 48:10to PyScript
- 48:11but also contributor
- 48:12to Panel,
- 48:13the Holovie,
- 48:14he's done a lot
- 48:15of great stuff.
- 48:16And what's happening here
- 48:18is we're loading
- 48:19the SVG first
- 48:21and then there's
- 48:23another Python function
- 48:24that basically takes
- 48:25that statement
- 48:26and makes it float
- 48:27but basically changing
- 48:29coordinates.
- 48:29literally animates
- 48:30and flies up
- 48:31into the sky.
- 48:32Like it really takes off
- 48:33not just it's up there,
- 48:34right?
- 48:34Yes, yes.
- 48:35And for anyone
- 48:37wanting to check them out,
- 48:38the examples
- 48:39are also available
- 48:40on pyScript.net
- 48:41slash examples
- 48:42and you can run them.
- 48:44They are, okay.
- 48:44Directly there.
- 48:45Interesting.
- 48:46We'll link to that as well.
- 48:47So I said this is interesting.
- 48:49It's interesting
- 48:50for several reasons.
- 48:51One,
- 48:51if I go and look
- 48:52at my task manager
- 48:54in Vivaldi,
- 48:55this is doing like
- 48:5630% CPU
- 48:57constantly refreshing.
- 48:59I don't know
- 48:59what the frame rate is
- 49:00but it seems certainly
- 49:01passable in terms of
- 49:03there's cool animations
- 49:05going on
- 49:06on this rendering
- 49:07this canvas
- 49:08and it looks good, right?
- 49:09It doesn't seem like
- 49:10oh, this just isn't
- 49:11going to work.
- 49:11It's like the person
- 49:12doesn't like glitch.
- 49:13Right, right.
- 49:14You know what I mean?
- 49:15Yeah.
- 49:15The other one is
- 49:16it highlights many
- 49:17of the things
- 49:17that I think are
- 49:18pretty interesting here.
- 49:19Let me pull up
- 49:20the code for the example
- 49:22and this maybe
- 49:23will give us a chance
- 49:24to talk through
- 49:24the programming model.
- 49:25So first of all,
- 49:26the first thing
- 49:27that's interesting
- 49:27is it has this
- 49:28pyenv section
- 49:30and you have
- 49:31people maybe
- 49:32have seen examples
- 49:33and if you go
- 49:33to the home screen
- 49:34you can actually
- 49:35the pyscript.net
- 49:37it says
- 49:37there's new tag
- 49:40done through web components
- 49:41called py-script
- 49:42instead of just script
- 49:43and you can just
- 49:43write Python code
- 49:44directly in the browser
- 49:46but you only want to do
- 49:48that for so long
- 49:49until you want to
- 49:50read it across
- 49:51a couple pages
- 49:51or whatever.
- 49:52So what's really cool
- 49:53here is the
- 49:54implementation of this
- 49:54is actually a custom
- 49:56Python file
- 49:57on the server, right?
- 49:58Yeah, exactly.
- 49:59We've been working
- 50:01on that
- 50:02for some time
- 50:03the design of this
- 50:04because as you said
- 50:05there's a tension
- 50:06between allowing people
- 50:08to just drop things
- 50:09in the page
- 50:10and then have your
- 50:11Python code there
- 50:11and it just works
- 50:12to also
- 50:14suggesting
- 50:15better patterns
- 50:16to do this.
- 50:19Like you definitely
- 50:19don't
- 50:20from a quality
- 50:21point of view
- 50:21it's really hard
- 50:22to test anything
- 50:23that you just drop
- 50:23on the page
- 50:24you know
- 50:24a readability
- 50:25point of view
- 50:25or refactor it
- 50:27or anything, right?
- 50:28Right, right.
- 50:28But at the same time
- 50:29we really want this
- 50:30to be
- 50:31something that people
- 50:32can play with
- 50:33and hack with
- 50:34and then don't have
- 50:35too much to think
- 50:36to think about
- 50:37oh I need a file
- 50:38I need to name it
- 50:39Python
- 50:39you know all of that.
- 50:40If there was a
- 50:41npm install step
- 50:43and then there was
- 50:44a compile step
- 50:45and then a pack step
- 50:46like you would shave off
- 50:47like 75% of the people
- 50:49who just wanted
- 50:49to check it out.
- 50:50Right.
- 50:50So we allowed
- 50:52this pattern
- 50:52but you could also say
- 50:54like the same code
- 50:54could be
- 50:55the same thing
- 50:56in PyM
- 50:56and then in PyScript
- 50:57you could also have
- 50:59PyScript source equals
- 51:00in a Python file
- 51:02so you can run that
- 51:03from files as well.
- 51:04Right, yeah.
- 51:05So just like
- 51:06with the regular script tag
- 51:07you say source
- 51:08and it can do a thing
- 51:09on startup
- 51:09you know like
- 51:10jQuery did it
- 51:11$document.ready
- 51:14hook right at the top
- 51:15all the time
- 51:16like you could do
- 51:16the equivalent
- 51:17of something like that.
- 51:18Okay, this is cool
- 51:19but this is only part of it
- 51:20let me open up
- 51:21the other file
- 51:22the antigravity.py
- 51:23and this is the one
- 51:24this is the one
- 51:25that made me really happy
- 51:25because when I look at this
- 51:27it's
- 51:28you know how is that
- 51:29animation happening right?
- 51:30What you do is
- 51:30you set a timer
- 51:31do a callback
- 51:32you know where you are
- 51:33in JavaScript
- 51:33and it goes
- 51:34click, click, click, click, click
- 51:35let's see how often
- 51:37are you doing this?
- 51:38Do you remember
- 51:39what the target
- 51:40frame rate was here?
- 51:41I don't remember.
- 51:42Yeah, anyway
- 51:43there's some sort of time
- 51:43where you say
- 51:44run it this frequently
- 51:45and basically
- 51:47what you do
- 51:48is you go over here
- 51:49and you say
- 51:50this is Python
- 51:51you say document
- 51:52get element by ID
- 51:53alright
- 51:54first of all
- 51:54awesome
- 51:55with a ternary expression
- 51:56and then
- 51:58you go
- 51:58and
- 51:59add
- 52:00through the DOM parser
- 52:01you add
- 52:02the SVG in there
- 52:03that's amazing
- 52:04you do a replace child
- 52:06with some HTML stuff
- 52:07and then
- 52:08you go
- 52:09and you hook
- 52:09the set interval
- 52:10so set interval
- 52:11is the way to say
- 52:12set a callback
- 52:13on a timer
- 52:13in JavaScript
- 52:14and
- 52:15then you just call
- 52:16the Python function
- 52:17self.move
- 52:18right?
- 52:18So there's a really
- 52:20cool interaction
- 52:20between JavaScript
- 52:21that's happening
- 52:22at a high
- 52:23frequency
- 52:24that shows
- 52:25do some stuff
- 52:26in Python
- 52:26go over to JavaScript
- 52:28go through the DOM
- 52:29and then call back
- 52:30into Python
- 52:31when things that are
- 52:32interesting happen
- 52:32here is an interval
- 52:33but it could be
- 52:34a button click
- 52:34or a drop down
- 52:35select
- 52:36or whatever
- 52:36right?
- 52:36Right
- 52:37right
- 52:37and
- 52:38we're doing
- 52:39some work
- 52:39right now
- 52:40at
- 52:40providing
- 52:41a higher level
- 52:42interface
- 52:43that would
- 52:44be more
- 52:45Pythonic
- 52:45to those
- 52:46JavaScript
- 52:47you know
- 52:48the usual
- 52:48things that you
- 52:49would always
- 52:49do in JavaScript
- 52:50like selecting
- 52:51an element
- 52:51by ID
- 52:52or class
- 52:53or things
- 52:53like this
- 52:54like a CSS
- 52:55selector
- 52:55sort of
- 52:56right
- 52:56model
- 52:57or something
- 52:57yeah
- 52:57yeah
- 52:58exactly
- 52:58so I think
- 52:59the goal
- 53:00is to provide
- 53:01the simplest
- 53:01and more
- 53:02expressive
- 53:03or Pythonic
- 53:04interface
- 53:05that we
- 53:05could
- 53:05to hide
- 53:06some of
- 53:06that
- 53:07complexity
- 53:07because
- 53:08at the end
- 53:08a lot of
- 53:09Python users
- 53:10or new users
- 53:10will have to end up
- 53:12learning about
- 53:12JavaScript itself
- 53:13right
- 53:14I didn't want to learn
- 53:15JavaScript
- 53:16and here I am
- 53:16learning JavaScript
- 53:17I think what you're
- 53:18learning though
- 53:19is not
- 53:19you're not learning
- 53:20JavaScript
- 53:20what you're
- 53:21learning is
- 53:21the DOM
- 53:22API
- 53:22the APIs
- 53:23that JavaScript
- 53:23often consumes
- 53:25right
- 53:25correct
- 53:25right
- 53:25you have to
- 53:26learn that
- 53:26the DOM
- 53:27has a
- 53:28get element
- 53:28by tag
- 53:29name
- 53:29rather than
- 53:30I have to
- 53:31say
- 53:31I can't
- 53:32say var
- 53:33anymore
- 53:33var
- 53:34char
- 53:35they have
- 53:35to say
- 53:35let
- 53:36or else
- 53:36that'll
- 53:36complain
- 53:37you know
- 53:37what I mean
- 53:37like
- 53:37you're not
- 53:38learning
- 53:38the language
- 53:39nuances
- 53:39but you are
- 53:40learning the
- 53:41APIs
- 53:41that JavaScript
- 53:42people are
- 53:42very common
- 53:43familiar
- 53:44with
- 53:44and it's
- 53:44a great
- 53:44point
- 53:45like
- 53:45another
- 53:46thing
- 53:46for instance
- 53:47the set
- 53:47interval
- 53:48could be
- 53:48replaced
- 53:49with
- 53:49full
- 53:49Python
- 53:50and just
- 53:50say
- 53:50like
- 53:50from
- 53:51asyncio
- 53:51important
- 53:52sleep
- 53:53you know
- 53:53time sleep
- 53:53and then
- 53:54while
- 53:55just do a loop
- 53:56just do a loop
- 53:57and asyncio
- 53:58wait
- 53:58interesting
- 53:59no kidding
- 54:00okay
- 54:00like a while
- 54:01true
- 54:01exactly
- 54:02await sleep
- 54:03then move
- 54:04okay
- 54:04yeah this is
- 54:05really really
- 54:05neat
- 54:05I think
- 54:06this example
- 54:07is so simple
- 54:07it's playful
- 54:08and it's not
- 54:09just
- 54:10we put a graph
- 54:11on the page
- 54:12not to say
- 54:12that that's
- 54:13not important
- 54:13but it's
- 54:14different
- 54:14than what
- 54:14we've seen
- 54:15before
- 54:15often
- 54:16yeah
- 54:16honestly
- 54:17I really
- 54:18props to
- 54:18to fill
- 54:19it like
- 54:19in I don't
- 54:20know what
- 54:2050 lines
- 54:21of code
- 54:21or 40 lines
- 54:22of code
- 54:23yeah like
- 54:23yeah 45
- 54:24for the entire
- 54:25implementation
- 54:26of a flying
- 54:27anti-gravity
- 54:28right
- 54:28SKCV
- 54:29pretty neat
- 54:30pretty neat
- 54:30yeah
- 54:31and in Python
- 54:31those are not
- 54:3245 lines
- 54:33of JavaScript
- 54:34right
- 54:34cool
- 54:34okay
- 54:35audience question
- 54:36Marcel
- 54:37says
- 54:37would it accept
- 54:38loading data
- 54:39from a file
- 54:40for processing
- 54:40like you know
- 54:41we're pulling
- 54:42in modules
- 54:42but like
- 54:43what's the
- 54:43data story
- 54:44that's a
- 54:45really really
- 54:45great question
- 54:46I think the
- 54:47data story
- 54:47is yet to be
- 54:48told
- 54:48we're
- 54:49dedicating a
- 54:50lot of effort
- 54:51to that
- 54:51right now
- 54:52you can
- 54:52you can load
- 54:53data using
- 54:54fetch
- 54:55basically
- 54:56and you can
- 54:57fetch data
- 54:57and then read
- 54:58just like normal
- 54:58files
- 54:59PyDite provides
- 55:00a PyFetch
- 55:01wrapper around
- 55:02the JavaScript
- 55:03fetch
- 55:03but there
- 55:04is a lot
- 55:05that can be
- 55:06done
- 55:07and we are
- 55:07working on it
- 55:08to have
- 55:08better support
- 55:09and just
- 55:10how does the
- 55:11story for
- 55:11larger files
- 55:12look like
- 55:12can I do
- 55:13a panda
- 55:13read CSV
- 55:14and give
- 55:14it a URL
- 55:15or something
- 55:15like that
- 55:16that's a
- 55:16great question
- 55:17I'm not
- 55:17sure
- 55:17I don't
- 55:18know
- 55:18yeah I
- 55:18don't know
- 55:19I have no
- 55:19idea I really
- 55:20just wondering
- 55:21yeah
- 55:21yeah but
- 55:22yeah that's
- 55:22one of the
- 55:23stories that
- 55:23I think
- 55:24is needs
- 55:25more development
- 55:25right now
- 55:26you can pull
- 55:26files and read
- 55:27them with that
- 55:28method but
- 55:29there's more
- 55:30work to be
- 55:30done there
- 55:31yeah
- 55:31okay let's
- 55:32look at another
- 55:33demo here
- 55:34let's see
- 55:35give me
- 55:36so good
- 55:37okay
- 55:37this one's
- 55:38interesting too
- 55:38this panel
- 55:39I think it's
- 55:40panel stream
- 55:40is the one
- 55:41and this
- 55:42is one of
- 55:42those that
- 55:43is gonna
- 55:44take some
- 55:44time to
- 55:45load
- 55:45because
- 55:45under the
- 55:46hood it's
- 55:47installing
- 55:47panel
- 55:47and installing
- 55:49bokeh I
- 55:50think and
- 55:50other visualization
- 55:51libraries that
- 55:52are heavier
- 55:53right right
- 55:53right so
- 55:54well let's try it a
- 55:55second time right
- 55:56so
- 55:57what do you
- 55:59guess seven or
- 55:59eight seconds
- 56:00maybe it took
- 56:00that first time
- 56:01but if I
- 56:01hit it again
- 56:02it says it
- 56:02downloaded 3.6
- 56:03megs
- 56:05yeah
- 56:05tick tock
- 56:06you should
- 56:06have cached
- 56:07most of the
- 56:08things that you
- 56:08compiled
- 56:09but also if
- 56:10you have
- 56:10if you set
- 56:11your browser
- 56:12to not
- 56:13cache it
- 56:13will not
- 56:14change anything
- 56:15yeah well I
- 56:16think the
- 56:16the challenge
- 56:16is that I'm
- 56:17using just
- 56:18python-m
- 56:19HTTP server
- 56:20so I'm not
- 56:21really using a
- 56:21proper server
- 56:24for this
- 56:24yeah
- 56:24so that's not
- 56:25helping
- 56:25I'm gonna let
- 56:26that one load
- 56:27up while we're
- 56:27I'm pulling up
- 56:28another one here
- 56:29that I want to
- 56:29talk about
- 56:30yeah is there
- 56:31one that you
- 56:31think we should
- 56:32highlight in
- 56:32particular I
- 56:33mean we've
- 56:33got the
- 56:34matplotlib
- 56:34one which is
- 56:35pretty interesting
- 56:35over here
- 56:36that shows
- 56:38this
- 56:39the d3 one
- 56:40is pretty
- 56:40interesting as
- 56:41well
- 56:41the d3 one
- 56:42you said
- 56:43right
- 56:43okay
- 56:43d3 has been
- 56:44a library
- 56:45that python
- 56:46folks have
- 56:47always wanting
- 56:48to be using
- 56:50that one was
- 56:50super fast
- 56:51that one was
- 56:51two or three
- 56:52seconds
- 56:52right
- 56:53maybe less
- 56:54than two
- 56:54seconds
- 56:54yeah
- 56:54yeah
- 56:55and that
- 56:55should have
- 56:56basically the
- 56:57same loading
- 56:57time as
- 56:58javascript
- 56:58because we're
- 56:59not really
- 56:59importing
- 56:59much
- 57:00or installing
- 57:01new
- 57:01libraries
- 57:02and once I
- 57:02hit your
- 57:03your example
- 57:04server then it's
- 57:05cached it
- 57:05right
- 57:05yeah
- 57:06yeah
- 57:06the second
- 57:07time you do
- 57:07yes
- 57:08so yeah
- 57:09another one
- 57:10the webgl
- 57:11right down
- 57:13this one
- 57:13this also should
- 57:15load pretty fast
- 57:16and shows
- 57:16wrapping webgl
- 57:17oh yeah
- 57:18directly
- 57:19this one
- 57:19this one shows
- 57:20an example
- 57:20of
- 57:21codecahedrons
- 57:22or something
- 57:23a bunch
- 57:23sort of rotating
- 57:24spinning around
- 57:24it's a little bit
- 57:25like a 3d
- 57:26asteroid game
- 57:27with no
- 57:28spaceships
- 57:28something like
- 57:30that I guess
- 57:31maybe is a way
- 57:32to think of it
- 57:33and if I go to
- 57:34oh and also
- 57:34as I move my
- 57:35mouse it reacts
- 57:36to I didn't
- 57:36I hadn't moved
- 57:37my mouse
- 57:37so that's pretty
- 57:38cool
- 57:39I open up my
- 57:39little task
- 57:41manager thing
- 57:41I don't know
- 57:42if it shares
- 57:43but it says
- 57:43basically
- 57:44it shows you
- 57:45how hard it's
- 57:46working and it's
- 57:4720% CPU
- 57:48for this 3d
- 57:49rendering
- 57:50interaction thing
- 57:51that's
- 57:52if you probably
- 57:52try to do this
- 57:53in pure Python
- 57:54and like Pygame
- 57:54it might be more
- 57:55yeah
- 57:55I'm not sure
- 57:56about like
- 57:56the performance
- 57:57and you know
- 57:58like resources
- 57:59but it should
- 58:00be pretty much
- 58:01once you're
- 58:02using JavaScript
- 58:03things
- 58:04they should be
- 58:04pretty much
- 58:05the same
- 58:05as JavaScript
- 58:06pure JavaScript
- 58:07much like Python
- 58:08often just sort
- 58:09of orchestrates
- 58:10C code
- 58:10once you've loaded
- 58:11something into
- 58:11the C layer
- 58:12and you're kind
- 58:12of just
- 58:13instructing it
- 58:14through simple
- 58:14commands
- 58:15it's probably
- 58:15not very
- 58:16different here
- 58:16exactly
- 58:17yes
- 58:17all right
- 58:18cool
- 58:18all right
- 58:19so I strongly
- 58:20encourage people
- 58:20to go check
- 58:21out the demo
- 58:21code
- 58:22it's just under
- 58:23the example
- 58:23folders
- 58:24in the GitHub
- 58:25repo
- 58:25which we'll link
- 58:26to
- 58:26Fabio
- 58:26we're running
- 58:27low on time
- 58:27here
- 58:28there's so much
- 58:28so much more
- 58:29I want to talk
- 58:30to you about
- 58:30you drive
- 58:31yeah
- 58:31let me just
- 58:32see a couple
- 58:32of example
- 58:33or a couple
- 58:34of areas
- 58:34I want to
- 58:34talk about
- 58:35here
- 58:35I just want
- 58:36to quickly
- 58:37touch on
- 58:37security
- 58:38I think
- 58:38the security
- 58:38story is
- 58:39pretty simple
- 58:40but I do
- 58:40have one
- 58:41question
- 58:41so to some
- 58:42degree
- 58:43people might
- 58:43go oh
- 58:44my gosh
- 58:44it's compiled
- 58:45C and
- 58:46JavaScript
- 58:47in the browser
- 58:48like you know
- 58:49what madness
- 58:50are people
- 58:50going to
- 58:51unleash
- 58:51on the world
- 58:52right
- 58:52this is like
- 58:53ActiveX
- 58:54or some
- 58:54dreaded
- 58:55com thing
- 58:55all over
- 58:56again
- 58:56and really
- 58:57WebAssembly
- 58:58also has
- 58:59the same
- 58:59sandbox
- 59:00security
- 59:00as JavaScript
- 59:01right
- 59:01right
- 59:01actually a lot
- 59:02of the issues
- 59:03that we've
- 59:04been getting
- 59:04around security
- 59:05boils down
- 59:06to that
- 59:07people like
- 59:08not being
- 59:09used you
- 59:09know to
- 59:10seeing the
- 59:11browser as
- 59:12a VM
- 59:12so oh
- 59:13if I type
- 59:15OS list
- 59:16there and
- 59:16stuff like
- 59:16this I
- 59:17can I have
- 59:17access to
- 59:18the file
- 59:18system
- 59:18well you're
- 59:19having access
- 59:20to an
- 59:20ephemera
- 59:21file system
- 59:22in the
- 59:23browser
- 59:23here and
- 59:24not your
- 59:25local file
- 59:25system
- 59:26that is a
- 59:26very important
- 59:27aspect
- 59:28one thing
- 59:28that would
- 59:28make me
- 59:29super happy
- 59:30is if we
- 59:31had some
- 59:32beautiful
- 59:33Python API
- 59:34to the local
- 59:35data side
- 59:36of things
- 59:36so inside
- 59:37the browser
- 59:37in JavaScript
- 59:38you get
- 59:38access to
- 59:39what's it
- 59:40called
- 59:40local DB
- 59:41and there's
- 59:41like a
- 59:42there's
- 59:42different
- 59:42levels
- 59:43there's
- 59:43like a
- 59:43file
- 59:44sort of
- 59:45per site
- 59:46file storage
- 59:47thing
- 59:47that's tied
- 59:48to your
- 59:48user
- 59:48and then
- 59:49there's
- 59:49like an
- 59:50embedded
- 59:50SQLite
- 59:51like thing
- 59:51I mean
- 59:52if you had
- 59:52something like
- 59:53SQL model
- 59:54or some
- 59:55other
- 59:56proper ORM
- 59:57that would
- 59:57let you
- 59:57connect
- 59:58to query
- 59:59that
- 59:59I suspect
- 1:00:00that could
- 1:00:01probably be
- 1:00:01built pretty
- 1:00:02easily
- 1:00:02with a
- 1:00:03interoperability
- 1:00:04layer to
- 1:00:05figure out
- 1:00:05just how to
- 1:00:06translate that
- 1:00:07over to
- 1:00:07JavaScript
- 1:00:07but is it
- 1:00:08what do you
- 1:00:09think
- 1:00:09you know
- 1:00:10more than I do
- 1:00:10there are
- 1:00:11lots of
- 1:00:12possibilities
- 1:00:12and scenarios
- 1:00:13of you know
- 1:00:14using what
- 1:00:15the browser
- 1:00:15provides you
- 1:00:16like local
- 1:00:17storage
- 1:00:17or small
- 1:00:18instances of
- 1:00:19databases
- 1:00:20and stuff
- 1:00:20like that
- 1:00:21so that is
- 1:00:22almost
- 1:00:22shipped
- 1:00:23and default
- 1:00:24with all
- 1:00:25the browsers
- 1:00:25there are
- 1:00:26interesting
- 1:00:26projects
- 1:00:27well at
- 1:00:28least one
- 1:00:29that I've
- 1:00:29seen
- 1:00:30like
- 1:00:30Google
- 1:00:30project
- 1:00:31where
- 1:00:31from
- 1:00:32Google
- 1:00:32from the
- 1:00:33Chrome team
- 1:00:33that is
- 1:00:34experimenting
- 1:00:35with scenarios
- 1:00:36where you can
- 1:00:37actually
- 1:00:37allow apps
- 1:00:39to access
- 1:00:40your file
- 1:00:41system
- 1:00:41or other
- 1:00:42resources
- 1:00:42native
- 1:00:43resources
- 1:00:43right
- 1:00:44like and
- 1:00:44it's
- 1:00:44it goes
- 1:00:45through a
- 1:00:45process of
- 1:00:46approval
- 1:00:46but you
- 1:00:47can mount
- 1:00:48directories
- 1:00:49and use
- 1:00:50them from
- 1:00:50your browser
- 1:00:51as a local
- 1:00:52mount
- 1:00:52those are
- 1:00:53also
- 1:00:54very
- 1:00:54interesting
- 1:00:55scenarios
- 1:00:55that
- 1:00:56could
- 1:00:56open
- 1:00:56up
- 1:00:57a lot
- 1:00:57of
- 1:00:57different
- 1:00:58ways
- 1:00:58of
- 1:00:59interacting
- 1:00:59with
- 1:00:59PyScript
- 1:01:00maybe
- 1:01:00it would
- 1:01:01mean
- 1:01:01you can
- 1:01:01actually
- 1:01:02develop
- 1:01:03your
- 1:01:03PyScript
- 1:01:03app
- 1:01:04directly
- 1:01:04from
- 1:01:05your
- 1:01:05local
- 1:01:05machine
- 1:01:05and
- 1:01:06then
- 1:01:06serve
- 1:01:06it
- 1:01:06on the
- 1:01:07browser
- 1:01:07real
- 1:01:07time
- 1:01:08or
- 1:01:08your
- 1:01:09app
- 1:01:09could
- 1:01:09write
- 1:01:10files
- 1:01:10or
- 1:01:10do
- 1:01:11your
- 1:01:11models
- 1:01:12or
- 1:01:12computation
- 1:01:12of
- 1:01:12the
- 1:01:12browser
- 1:01:13and
- 1:01:13then
- 1:01:13write
- 1:01:14results
- 1:01:14your
- 1:01:14local
- 1:01:15files
- 1:01:15there's
- 1:01:16a lot
- 1:01:16that
- 1:01:16can
- 1:01:16be
- 1:01:16explored
- 1:01:17my
- 1:01:19security
- 1:01:20question
- 1:01:20outside
- 1:01:20of
- 1:01:21the
- 1:01:21sandbox
- 1:01:21let's
- 1:01:22not
- 1:01:22stress
- 1:01:23about
- 1:01:23it
- 1:01:23we
- 1:01:23already
- 1:01:23have
- 1:01:24had
- 1:01:24web
- 1:01:24assembly
- 1:01:24for
- 1:01:25a long
- 1:01:25time
- 1:01:25is
- 1:01:26this
- 1:01:26py
- 1:01:26env
- 1:01:27section
- 1:01:27here
- 1:01:27where
- 1:01:28you
- 1:01:28can
- 1:01:28say
- 1:01:28go
- 1:01:29find
- 1:01:29this
- 1:01:29file
- 1:01:29right
- 1:01:30and
- 1:01:30I'm
- 1:01:30thinking
- 1:01:31of
- 1:01:31my
- 1:01:32website
- 1:01:32which
- 1:01:32has
- 1:01:32a
- 1:01:32static
- 1:01:33files
- 1:01:33folder
- 1:01:35section
- 1:01:35where I
- 1:01:35might
- 1:01:36put
- 1:01:36this
- 1:01:36because
- 1:01:36that
- 1:01:36needs
- 1:01:36to
- 1:01:37be
- 1:01:37served
- 1:01:37up
- 1:01:37as
- 1:01:38effectively
- 1:01:38a
- 1:01:38static
- 1:01:39file
- 1:01:39to
- 1:01:39the
- 1:01:39front
- 1:01:40end
- 1:01:40but
- 1:01:40I've
- 1:01:40got
- 1:01:41my
- 1:01:41app
- 1:01:42py
- 1:01:42my
- 1:01:42various
- 1:01:43views
- 1:01:44and
- 1:01:44settings
- 1:01:45dot
- 1:01:45json
- 1:01:46and
- 1:01:46like
- 1:01:46if
- 1:01:47I
- 1:01:47put
- 1:01:47too
- 1:01:47many
- 1:01:47dot
- 1:01:47dot
- 1:01:48slashes
- 1:01:48there
- 1:01:48am I
- 1:01:48going to
- 1:01:49be able
- 1:01:49to get
- 1:01:49to
- 1:01:49other
- 1:01:49stuff
- 1:01:50or
- 1:01:50is
- 1:01:50it
- 1:01:50okay
- 1:01:51suppose
- 1:01:51this
- 1:01:52folder
- 1:01:52this
- 1:01:53file
- 1:01:53lives
- 1:01:54in
- 1:01:54static
- 1:01:54slash
- 1:01:55antigravity
- 1:01:56dot
- 1:01:56html
- 1:01:57but
- 1:01:57the
- 1:01:57rest
- 1:01:57of
- 1:01:58my
- 1:01:58app
- 1:01:58is
- 1:01:59like
- 1:01:59one
- 1:02:00directory
- 1:02:00up
- 1:02:00from
- 1:02:00that
- 1:02:02could
- 1:02:02I
- 1:02:02say
- 1:02:03my
- 1:02:03path
- 1:02:03to
- 1:02:04my
- 1:02:04module
- 1:02:04is
- 1:02:04dot
- 1:02:05dot
- 1:02:05dot
- 1:02:05slash
- 1:02:05app
- 1:02:06dot
- 1:02:06pi
- 1:02:06and
- 1:02:06then
- 1:02:07maybe
- 1:02:07read
- 1:02:07like
- 1:02:07some
- 1:02:08right
- 1:02:08source
- 1:02:08code
- 1:02:09with
- 1:02:09like
- 1:02:09a
- 1:02:09token
- 1:02:09that
- 1:02:10I
- 1:02:10put
- 1:02:11in
- 1:02:11there
- 1:02:11that
- 1:02:11I
- 1:02:11shouldn't
- 1:02:11have
- 1:02:11put
- 1:02:11in
- 1:02:12there
- 1:02:12but
- 1:02:12then
- 1:02:12now
- 1:02:12it's
- 1:02:12public
- 1:02:13yeah
- 1:02:13relative
- 1:02:13paths
- 1:02:14should
- 1:02:15work
- 1:02:15just
- 1:02:16fine
- 1:02:16there's
- 1:02:17also
- 1:02:17I
- 1:02:17think
- 1:02:18with
- 1:02:18PyScript
- 1:02:19the
- 1:02:19distinction
- 1:02:20between
- 1:02:21development
- 1:02:21time
- 1:02:22and
- 1:02:22deployment
- 1:02:23time
- 1:02:23or
- 1:02:24bundling
- 1:02:24time
- 1:02:24is
- 1:02:25a
- 1:02:25little
- 1:02:25more
- 1:02:26highlighted
- 1:02:27like
- 1:02:27as a
- 1:02:28developer
- 1:02:28I'd
- 1:02:29love
- 1:02:29to
- 1:02:29have
- 1:02:30those
- 1:02:30relative
- 1:02:31paths
- 1:02:31and
- 1:02:32explore
- 1:02:33and
- 1:02:33have
- 1:02:34full
- 1:02:34access
- 1:02:35to
- 1:02:35a lot
- 1:02:36of
- 1:02:36libraries
- 1:02:36but
- 1:02:37when
- 1:02:37I
- 1:02:37deploy
- 1:02:38I
- 1:02:38bundle
- 1:02:38my
- 1:02:39application
- 1:02:39one of
- 1:02:40the
- 1:02:40things
- 1:02:40that
- 1:02:40we
- 1:02:40are
- 1:02:41very
- 1:02:41interested
- 1:02:41in
- 1:02:42developing
- 1:02:43more
- 1:02:43is
- 1:02:43we
- 1:02:44should
- 1:02:44bundle
- 1:02:45that
- 1:02:45as
- 1:02:45one
- 1:02:46thing
- 1:02:46and
- 1:02:47paths
- 1:02:47should
- 1:02:47be
- 1:02:48absolute
- 1:02:48so
- 1:02:49there
- 1:02:49is
- 1:02:49no
- 1:02:50issues
- 1:02:50with
- 1:02:50what
- 1:02:51you're
- 1:02:51saying
- 1:02:51we
- 1:02:52could
- 1:02:52bundle
- 1:02:52the
- 1:02:53interpreter
- 1:02:53and
- 1:02:54your
- 1:02:54dependencies
- 1:02:55so
- 1:02:55that
- 1:02:55we
- 1:02:56can
- 1:02:56optimize
- 1:02:57size
- 1:02:58remove
- 1:02:58dependencies
- 1:02:59that
- 1:02:59you're
- 1:03:00not
- 1:03:00using
- 1:03:00so
- 1:03:01the
- 1:03:01loading
- 1:03:02time
- 1:03:02is
- 1:03:02smaller
- 1:03:02basically
- 1:03:03three
- 1:03:03shake
- 1:03:04like
- 1:03:04a lot
- 1:03:05of
- 1:03:05JavaScript
- 1:03:05libraries
- 1:03:06do
- 1:03:06so
- 1:03:07there
- 1:03:07are
- 1:03:07definitely
- 1:03:08patterns
- 1:03:08to
- 1:03:08explore
- 1:03:09in that
- 1:03:09scenario
- 1:03:10soon
- 1:03:10yeah
- 1:03:10okay
- 1:03:10yeah
- 1:03:11you
- 1:03:11definitely
- 1:03:12don't
- 1:03:12want to
- 1:03:12go
- 1:03:12dot dot
- 1:03:12slash
- 1:03:13app
- 1:03:13because
- 1:03:14somebody
- 1:03:14could
- 1:03:14then
- 1:03:15inject
- 1:03:15that
- 1:03:15but
- 1:03:15yeah
- 1:03:16it's
- 1:03:17interesting
- 1:03:17I'll be
- 1:03:18cool to
- 1:03:19see what
- 1:03:19you'll
- 1:03:19do
- 1:03:19there
- 1:03:19but
- 1:03:19definitely
- 1:03:20that's
- 1:03:20the
- 1:03:20only
- 1:03:21thing
- 1:03:21that's
- 1:03:21coming
- 1:03:21to
- 1:03:21mind
- 1:03:21like
- 1:03:22hmm
- 1:03:22I
- 1:03:22wonder
- 1:03:23what's
- 1:03:23gonna
- 1:03:23happen
- 1:03:23there
- 1:03:23oh
- 1:03:24so
- 1:03:24but
- 1:03:24if
- 1:03:24you do
- 1:03:25dot dot
- 1:03:25app
- 1:03:26you're
- 1:03:26still
- 1:03:26like
- 1:03:26it's
- 1:03:27basically
- 1:03:28on you
- 1:03:28to
- 1:03:29define
- 1:03:29what
- 1:03:30you're
- 1:03:30actually
- 1:03:30serving
- 1:03:31as
- 1:03:31your
- 1:03:31static
- 1:03:32file
- 1:03:32server
- 1:03:32if
- 1:03:33it's
- 1:03:33not
- 1:03:33accessible
- 1:03:34as a
- 1:03:34static
- 1:03:34file
- 1:03:35already
- 1:03:35this
- 1:03:36will
- 1:03:36just
- 1:03:36404
- 1:03:37yeah
- 1:03:37okay
- 1:03:37then
- 1:03:38right
- 1:03:38yeah
- 1:03:38then
- 1:03:38then
- 1:03:39flask
- 1:03:39pyramid
- 1:03:39friends
- 1:03:40have it
- 1:03:40covered
- 1:03:41yeah
- 1:03:41yeah
- 1:03:42exactly
- 1:03:42now
- 1:03:42it's
- 1:03:42just
- 1:03:43you're
- 1:03:44like
- 1:03:44it's
- 1:03:44not
- 1:03:44our
- 1:03:44responsibility
- 1:03:45but
- 1:03:45you
- 1:03:46shouldn't
- 1:03:46be
- 1:03:46allowing
- 1:03:47you
- 1:03:47know
- 1:03:47slash
- 1:03:47static
- 1:03:48slash
- 1:03:49dot
- 1:03:49slash
- 1:03:50app
- 1:03:50dot
- 1:03:50pi
- 1:03:50being
- 1:03:51served
- 1:03:51anyway
- 1:03:51right
- 1:03:52right
- 1:03:52okay
- 1:03:52cool
- 1:03:52the other
- 1:03:53thing
- 1:03:53is
- 1:03:54one
- 1:03:54of
- 1:03:55the
- 1:03:55things
- 1:03:55that
- 1:03:55Steve
- 1:03:55Dauer
- 1:03:56talked
- 1:03:56about
- 1:03:56recently
- 1:03:57is
- 1:03:57that
- 1:03:58they
- 1:03:59started
- 1:03:59enable
- 1:04:00the
- 1:04:01real
- 1:04:01the
- 1:04:02full
- 1:04:02c
- 1:04:03python
- 1:04:03to
- 1:04:03being
- 1:04:03built
- 1:04:04within
- 1:04:04mscripten
- 1:04:06web
- 1:04:06assembly
- 1:04:07targets
- 1:04:07is
- 1:04:08this
- 1:04:08of
- 1:04:09interest
- 1:04:09to
- 1:04:09you
- 1:04:09all
- 1:04:09does
- 1:04:10this
- 1:04:10supersede
- 1:04:12Pyiodide's
- 1:04:13version
- 1:04:14in some
- 1:04:14way
- 1:04:14is
- 1:04:15what
- 1:04:15Pyiodide's
- 1:04:16version
- 1:04:16actually
- 1:04:16is
- 1:04:16the
- 1:04:17Pyodide
- 1:04:17team
- 1:04:18and
- 1:04:18the
- 1:04:19c
- 1:04:19python
- 1:04:19team
- 1:04:21are
- 1:04:21collaborating
- 1:04:22on
- 1:04:23making
- 1:04:23the
- 1:04:24two
- 1:04:25making
- 1:04:25Pyodide
- 1:04:26basically
- 1:04:26use
- 1:04:27that
- 1:04:27as
- 1:04:27a
- 1:04:27baseline
- 1:04:28python
- 1:04:28that
- 1:04:29actually
- 1:04:30would
- 1:04:30be
- 1:04:30very
- 1:04:30helpful
- 1:04:31to
- 1:04:31the
- 1:04:31Pyodide
- 1:04:32team
- 1:04:32as
- 1:04:32well
- 1:04:32they
- 1:04:33would
- 1:04:33have
- 1:04:33way
- 1:04:33less
- 1:04:34things
- 1:04:34to
- 1:04:34maintain
- 1:04:35they
- 1:04:35can
- 1:04:35just
- 1:04:36delegate
- 1:04:36to
- 1:04:37improvements
- 1:04:37and
- 1:04:38optimizations
- 1:04:39that
- 1:04:39the
- 1:04:39c
- 1:04:39python
- 1:04:40core
- 1:04:40team
- 1:04:40is
- 1:04:40they're
- 1:04:41doing
- 1:04:41and
- 1:04:42can
- 1:04:42focus
- 1:04:43on
- 1:04:43the
- 1:04:43additional
- 1:04:44features
- 1:04:44of
- 1:04:45Pyodide
- 1:04:45so
- 1:04:46that
- 1:04:46actually
- 1:04:47we had
- 1:04:48a
- 1:04:48few
- 1:04:48they're
- 1:04:49building
- 1:04:49in the
- 1:04:49web
- 1:04:50assembly
- 1:04:50version
- 1:04:50because
- 1:04:50it
- 1:04:50didn't
- 1:04:51exist
- 1:04:51that's
- 1:04:51probably
- 1:04:52not
- 1:04:52what
- 1:04:52they
- 1:04:52want
- 1:04:52to
- 1:04:52do
- 1:04:53right
- 1:04:53exactly
- 1:04:53yes
- 1:04:54yes
- 1:04:54yeah
- 1:04:55yeah
- 1:04:55okay
- 1:04:55their
- 1:04:56real
- 1:04:56innovation
- 1:04:57I think
- 1:04:57in addition
- 1:04:58to just
- 1:04:58getting the
- 1:04:58web
- 1:04:59assembly
- 1:04:59thing
- 1:04:59working
- 1:04:59is
- 1:05:00like
- 1:05:00how
- 1:05:00do
- 1:05:01you
- 1:05:01bring
- 1:05:01these
- 1:05:01important
- 1:05:02C
- 1:05:03mixed
- 1:05:04C
- 1:05:05libraries
- 1:05:05in
- 1:05:06like
- 1:05:06numpy
- 1:05:06and
- 1:05:07such
- 1:05:07to
- 1:05:07the
- 1:05:08browser
- 1:05:08that
- 1:05:08otherwise
- 1:05:09wouldn't
- 1:05:09just
- 1:05:09drop
- 1:05:10in
- 1:05:10as
- 1:05:10you
- 1:05:11know
- 1:05:11python
- 1:05:11stuff
- 1:05:11running
- 1:05:12on top
- 1:05:12of
- 1:05:12the
- 1:05:12interpreter
- 1:05:13right
- 1:05:14that
- 1:05:14seems
- 1:05:15to be
- 1:05:15the
- 1:05:15most
- 1:05:16important
- 1:05:16thing
- 1:05:17that
- 1:05:17they
- 1:05:17brought
- 1:05:18to
- 1:05:18the
- 1:05:18table
- 1:05:19right
- 1:05:19not
- 1:05:20discounting
- 1:05:20that
- 1:05:20there
- 1:05:21was
- 1:05:21not
- 1:05:21a
- 1:05:21web
- 1:05:21assembly
- 1:05:22version
- 1:05:22and
- 1:05:22they
- 1:05:23made
- 1:05:23that
- 1:05:23also
- 1:05:23happen
- 1:05:24right
- 1:05:24like
- 1:05:24that's
- 1:05:24also
- 1:05:24super
- 1:05:25important
- 1:05:25but
- 1:05:26well
- 1:05:26yeah
- 1:05:26I guess
- 1:05:27what makes
- 1:05:28them more
- 1:05:28distinct
- 1:05:28of
- 1:05:28all
- 1:05:28the
- 1:05:29other
- 1:05:29attempts
- 1:05:29is
- 1:05:29that
- 1:05:29they
- 1:05:30are
- 1:05:30really
- 1:05:30focused
- 1:05:30on
- 1:05:30making
- 1:05:31sure
- 1:05:31that
- 1:05:31data
- 1:05:31science
- 1:05:32libraries
- 1:05:32work
- 1:05:33in
- 1:05:33this
- 1:05:33situation
- 1:05:33yes
- 1:05:34I think
- 1:05:34that
- 1:05:35is
- 1:05:35one
- 1:05:36of
- 1:05:36the
- 1:05:36main
- 1:05:37things
- 1:05:37that
- 1:05:37made
- 1:05:38high
- 1:05:39dive
- 1:05:39successful
- 1:05:39because
- 1:05:40a lot
- 1:05:41of
- 1:05:41times
- 1:05:41you
- 1:05:42would
- 1:05:42support
- 1:05:42just
- 1:05:42the
- 1:05:43language
- 1:05:43itself
- 1:05:44and
- 1:05:44then
- 1:05:44when
- 1:05:45you
- 1:05:45want
- 1:05:45to
- 1:05:45support
- 1:05:46more
- 1:05:46complex
- 1:05:47use
- 1:05:47cases
- 1:05:47like
- 1:05:48C
- 1:05:48dependencies
- 1:05:49you
- 1:05:49are
- 1:05:49too
- 1:05:49far
- 1:05:50in
- 1:05:50the
- 1:05:50process
- 1:05:50of
- 1:05:50your
- 1:05:51implementation
- 1:05:51and
- 1:05:52then
- 1:05:52you
- 1:05:52are
- 1:05:52like
- 1:05:52oh
- 1:05:52now
- 1:05:53we
- 1:05:53have
- 1:05:53to
- 1:05:54rewrite
- 1:05:54half
- 1:05:54of
- 1:05:54the
- 1:05:54code
- 1:05:55to
- 1:05:55refactor
- 1:05:55to
- 1:05:56account
- 1:05:56for
- 1:05:56a lot
- 1:05:57of
- 1:05:57the
- 1:05:57complexities
- 1:05:58yeah
- 1:05:58we
- 1:05:59got to
- 1:05:59backfill
- 1:06:00it
- 1:06:00so
- 1:06:00we
- 1:06:00have
- 1:06:00support
- 1:06:00for
- 1:06:01all
- 1:06:01these
- 1:06:01things
- 1:06:01how
- 1:06:01are
- 1:06:02we
- 1:06:02going
- 1:06:02to
- 1:06:02write
- 1:06:02our
- 1:06:02own
- 1:06:02numpy
- 1:06:02now
- 1:06:03or
- 1:06:03something
- 1:06:03right
- 1:06:04yeah
- 1:06:04and
- 1:06:04C
- 1:06:05extensions
- 1:06:05are
- 1:06:05always
- 1:06:06the
- 1:06:06place
- 1:06:07where
- 1:06:07most
- 1:06:07projects
- 1:06:08have
- 1:06:08a
- 1:06:08hard
- 1:06:08time
- 1:06:09right
- 1:06:09like
- 1:06:09historically
- 1:06:10the
- 1:06:11different
- 1:06:11implementations
- 1:06:11of
- 1:06:12python
- 1:06:12and
- 1:06:13dotnet
- 1:06:14or
- 1:06:14pipi
- 1:06:15or
- 1:06:15others
- 1:06:16C
- 1:06:17extensions
- 1:06:17has always
- 1:06:18been
- 1:06:18like
- 1:06:18the
- 1:06:18trouble
- 1:06:19kid
- 1:06:19it
- 1:06:20definitely
- 1:06:20is
- 1:06:21it's
- 1:06:21also
- 1:06:21tricky
- 1:06:22for
- 1:06:22thinking
- 1:06:24about
- 1:06:24reference
- 1:06:24counting
- 1:06:25versus
- 1:06:25other
- 1:06:25collection
- 1:06:26cleanup
- 1:06:27tie
- 1:06:27yeah
- 1:06:27it's
- 1:06:28an
- 1:06:28important
- 1:06:28boundary
- 1:06:29to be
- 1:06:29aware
- 1:06:29of
- 1:06:29but
- 1:06:30it's
- 1:06:30also
- 1:06:30really
- 1:06:30been
- 1:06:31a lot
- 1:06:31all right
- 1:06:31final
- 1:06:32final thing
- 1:06:32let's
- 1:06:32just wrap
- 1:06:33this up
- 1:06:33with
- 1:06:33what's
- 1:06:34next
- 1:06:34where
- 1:06:35you
- 1:06:35going
- 1:06:35so
- 1:06:35I
- 1:06:36think
- 1:06:36I
- 1:06:37hinted
- 1:06:37at
- 1:06:38a lot
- 1:06:38of
- 1:06:38those
- 1:06:39I
- 1:06:40think
- 1:06:40the
- 1:06:40main
- 1:06:40thing
- 1:06:41for
- 1:06:41us
- 1:06:41in
- 1:06:41the
- 1:06:42immediate
- 1:06:42future
- 1:06:42is
- 1:06:43really
- 1:06:43to
- 1:06:43work
- 1:06:44with
- 1:06:44the
- 1:06:44community
- 1:06:45and
- 1:06:46build up
- 1:06:46more
- 1:06:47of that
- 1:06:47side
- 1:06:48of
- 1:06:48things
- 1:06:48and
- 1:06:49then
- 1:06:49also
- 1:06:50work
- 1:06:51on
- 1:06:51documentation
- 1:06:51to
- 1:06:52put
- 1:06:52out
- 1:06:52the
- 1:06:53vision
- 1:06:53and
- 1:06:54what's
- 1:06:54next
- 1:06:55there
- 1:06:55are
- 1:06:55a bunch
- 1:06:56of
- 1:06:56things
- 1:06:56that
- 1:06:56are
- 1:06:57really
- 1:06:57interesting
- 1:06:57that
- 1:06:57we
- 1:06:58will
- 1:06:58be
- 1:06:58looking
- 1:06:58at
- 1:06:59a
- 1:06:59reactive
- 1:07:00layer
- 1:07:01or
- 1:07:01components
- 1:07:02to
- 1:07:02interact
- 1:07:03with
- 1:07:03each
- 1:07:03other
- 1:07:03and
- 1:07:04notify
- 1:07:04each
- 1:07:05other
- 1:07:05the
- 1:07:06story
- 1:07:06around
- 1:07:06data
- 1:07:07and
- 1:07:07how
- 1:07:08does
- 1:07:09working
- 1:07:09with
- 1:07:09data
- 1:07:10look
- 1:07:10like
- 1:07:10in
- 1:07:11PyScript
- 1:07:11a lot
- 1:07:12of
- 1:07:12development
- 1:07:13around
- 1:07:13the
- 1:07:14possibilities
- 1:07:14of
- 1:07:15using
- 1:07:15PyScript
- 1:07:16in
- 1:07:17a
- 1:07:17peer-to-peer
- 1:07:18or
- 1:07:19web
- 1:07:19three
- 1:07:19sort
- 1:07:20of
- 1:07:20scenario
- 1:07:20right
- 1:07:21what
- 1:07:21can
- 1:07:22we
- 1:07:22make
- 1:07:22to
- 1:07:22support
- 1:07:23applications
- 1:07:24talking
- 1:07:25to
- 1:07:25each
- 1:07:25other
- 1:07:25directly
- 1:07:26or
- 1:07:26you
- 1:07:27know
- 1:07:27using
- 1:07:27a
- 1:07:28mode
- 1:07:28where
- 1:07:28you
- 1:07:28work
- 1:07:28offline
- 1:07:29and
- 1:07:29online
- 1:07:30and
- 1:07:30you
- 1:07:30can
- 1:07:30you
- 1:07:31know
- 1:07:31make
- 1:07:31the
- 1:07:32experience
- 1:07:32better
- 1:07:33right
- 1:07:33like
- 1:07:33a
- 1:07:33little
- 1:07:33bit
- 1:07:33of
- 1:07:34a
- 1:07:34progressive
- 1:07:34web
- 1:07:34type
- 1:07:35of
- 1:07:35thing
- 1:07:36yeah
- 1:07:36yeah
- 1:07:37yeah
- 1:07:37I'd be
- 1:07:38super
- 1:07:38excited
- 1:07:38to see
- 1:07:38that
- 1:07:39come
- 1:07:39along
- 1:07:39yeah
- 1:07:39honestly
- 1:07:40one of
- 1:07:41the
- 1:07:41difficulties
- 1:07:42with
- 1:07:42this
- 1:07:43project
- 1:07:43is that
- 1:07:44it breaks
- 1:07:45so many
- 1:07:45patterns
- 1:07:46that we
- 1:07:46are used
- 1:07:47to
- 1:07:47you know
- 1:07:48both like
- 1:07:48oh I'm
- 1:07:48running my
- 1:07:49thing on
- 1:07:49my machine
- 1:07:50or in a
- 1:07:50server
- 1:07:51or I'm
- 1:07:52doing a
- 1:07:52web
- 1:07:52it means
- 1:07:53okay
- 1:07:53it means
- 1:07:54that I always
- 1:07:54have a
- 1:07:55server
- 1:07:55and a
- 1:07:55client side
- 1:07:56they have
- 1:07:57the network
- 1:07:57in between
- 1:07:58now
- 1:07:59we're
- 1:08:00shifting
- 1:08:00the
- 1:08:01paradigms
- 1:08:01and a
- 1:08:02lot of
- 1:08:02things are
- 1:08:03new
- 1:08:03so we
- 1:08:04can
- 1:08:04explore
- 1:08:04right
- 1:08:05the other
- 1:08:06thing
- 1:08:06that we're
- 1:08:07looking at
- 1:08:07well
- 1:08:08better support
- 1:08:09for the
- 1:08:10optimization
- 1:08:11loading times
- 1:08:12all of
- 1:08:13those things
- 1:08:13how can
- 1:08:14you
- 1:08:14can you
- 1:08:15hold
- 1:08:15state
- 1:08:15of your
- 1:08:16application
- 1:08:16so basically
- 1:08:17as it's
- 1:08:18it's
- 1:08:19it's
- 1:08:19running
- 1:08:19etc
- 1:08:20or if
- 1:08:20you
- 1:08:21just have
- 1:08:21a
- 1:08:21notebook
- 1:08:22like
- 1:08:22sort
- 1:08:23of
- 1:08:23workflow
- 1:08:24how can
- 1:08:25you save
- 1:08:25the state
- 1:08:25of your
- 1:08:26PyScript
- 1:08:26app
- 1:08:27and share
- 1:08:27with others
- 1:08:28and they
- 1:08:28can start
- 1:08:29from the
- 1:08:30same point
- 1:08:30you were
- 1:08:31okay
- 1:08:31those are
- 1:08:32all great
- 1:08:32things to be
- 1:08:33working towards
- 1:08:34is this
- 1:08:35tying in
- 1:08:35any way
- 1:08:36to
- 1:08:36Jupyter
- 1:08:37Lite
- 1:08:37and it's
- 1:08:38got similar
- 1:08:39goals
- 1:08:40I'm not sure
- 1:08:40if it has
- 1:08:41any similar
- 1:08:41foundations
- 1:08:42or anything
- 1:08:42maybe
- 1:08:43I'm very
- 1:08:44familiar with
- 1:08:44the Jupyter
- 1:08:45folks
- 1:08:46I work
- 1:08:47together
- 1:08:48with many
- 1:08:48of the
- 1:08:49core
- 1:08:49developers
- 1:08:49and
- 1:08:50historically
- 1:08:51Jupyter
- 1:08:51Lite
- 1:08:52is a
- 1:08:52great
- 1:08:52project
- 1:08:53that
- 1:08:53basically
- 1:08:54implements
- 1:08:55the
- 1:08:56Jupyter
- 1:08:56notebooks
- 1:08:56using
- 1:08:57Pyodide
- 1:08:58as a
- 1:08:59runtime
- 1:08:59or
- 1:09:00a
- 1:09:01shell
- 1:09:01yeah
- 1:09:02so
- 1:09:02it's
- 1:09:02not
- 1:09:02that
- 1:09:03far
- 1:09:03out
- 1:09:03of
- 1:09:04being
- 1:09:04maybe
- 1:09:04in
- 1:09:04a
- 1:09:04similar
- 1:09:05space
- 1:09:05but
- 1:09:06right
- 1:09:06yeah
- 1:09:07it's
- 1:09:07similar in
- 1:09:08that
- 1:09:08sense
- 1:09:08that
- 1:09:09it ties
- 1:09:10right into
- 1:09:11the Jupyter
- 1:09:12experience
- 1:09:13so it
- 1:09:13has
- 1:09:14it's
- 1:09:14locked
- 1:09:14into
- 1:09:15the
- 1:09:15notebook
- 1:09:15flow
- 1:09:16and
- 1:09:17altering
- 1:09:17notebooks
- 1:09:18and stuff
- 1:09:18like that
- 1:09:19where
- 1:09:20PyScript
- 1:09:20is more
- 1:09:21has a
- 1:09:22larger scope
- 1:09:23and it's
- 1:09:24really to
- 1:09:24author
- 1:09:25applications
- 1:09:25sure
- 1:09:26a little
- 1:09:26different
- 1:09:27okay
- 1:09:27very
- 1:09:28interesting
- 1:09:28all right
- 1:09:29well
- 1:09:29congratulations
- 1:09:30this seems
- 1:09:30like a pretty
- 1:09:31promising project
- 1:09:32and I know
- 1:09:32there's a lot of
- 1:09:33interest in it
- 1:09:34let me close it
- 1:09:34out with a
- 1:09:34comment from the
- 1:09:35audience
- 1:09:36Andre
- 1:09:36Muller
- 1:09:37said
- 1:09:37I tried
- 1:09:38Jinja
- 1:09:39the Jinja
- 1:09:40wheel
- 1:09:40just
- 1:09:41straight up
- 1:09:42with PyScript
- 1:09:42and it works
- 1:09:43straight away
- 1:09:44like no
- 1:09:44changes
- 1:09:45so that's
- 1:09:46that's kind
- 1:09:47of meta
- 1:09:47actually
- 1:09:48that's
- 1:09:48Jinja
- 1:09:48within PyScript
- 1:09:50within HTML
- 1:09:51love it
- 1:09:52yeah
- 1:09:52awesome
- 1:09:52all right
- 1:09:53well let me ask you
- 1:09:54the final two
- 1:09:54questions before
- 1:09:55we get out
- 1:09:55of here
- 1:09:56if you're
- 1:09:56gonna write
- 1:09:57some Python
- 1:09:57code
- 1:09:58what editor
- 1:09:58are you doing
- 1:09:59using these
- 1:10:00days
- 1:10:00I'm usually
- 1:10:01a mix
- 1:10:02between
- 1:10:02VS Code
- 1:10:03or PyCharm
- 1:10:04all right
- 1:10:04cool
- 1:10:04yeah
- 1:10:05both good
- 1:10:06and
- 1:10:06notable
- 1:10:08PyPI package
- 1:10:09or you know
- 1:10:10some other
- 1:10:10kind of maybe
- 1:10:11it doesn't come
- 1:10:11quite off
- 1:10:12PyPI
- 1:10:12maybe it comes
- 1:10:13off a CDN
- 1:10:13these days
- 1:10:14PyScript
- 1:10:15obviously
- 1:10:15what do you
- 1:10:16want to give a
- 1:10:16shout out to
- 1:10:17gave a lot
- 1:10:18of shout outs
- 1:10:18to Pyodide
- 1:10:19once again
- 1:10:20it's a great
- 1:10:21project
- 1:10:21I think
- 1:10:22I use
- 1:10:24notebooks
- 1:10:25and the whole
- 1:10:26Jupyter
- 1:10:26ecosystem
- 1:10:27a lot
- 1:10:27as well
- 1:10:28the whole
- 1:10:29scientific
- 1:10:29stack
- 1:10:29and a lot
- 1:10:30of the things
- 1:10:30that are
- 1:10:31around
- 1:10:32you know
- 1:10:33the many
- 1:10:33interesting
- 1:10:34projects
- 1:10:34like
- 1:10:35you know
- 1:10:35NumPy
- 1:10:36Pandas
- 1:10:37Dask
- 1:10:38the Bokeh
- 1:10:39Numba
- 1:10:39a lot of
- 1:10:41that ecosystem
- 1:10:41is really
- 1:10:42in my day-to-day
- 1:10:43kind of
- 1:10:44workflow
- 1:10:44yeah
- 1:10:45fantastic
- 1:10:45yeah
- 1:10:46well cool
- 1:10:46all right
- 1:10:47well
- 1:10:47once again
- 1:10:48congratulations
- 1:10:49on all the
- 1:10:50interest
- 1:10:51and excitement
- 1:10:51it's
- 1:10:52it's really
- 1:10:53taken off
- 1:10:54the last couple
- 1:10:54weeks
- 1:10:54so
- 1:10:54thanks for
- 1:10:55coming on
- 1:10:56the show
- 1:10:56and talking
- 1:10:56about it
- 1:10:57thank you
- 1:10:57so much
- 1:10:57for the
- 1:10:58opportunity
- 1:10:58I had a
- 1:10:59great time
- 1:10:59chatting
- 1:11:00about it
- 1:11:00yeah
- 1:11:00you bet
- 1:11:01and
- 1:11:01final call
- 1:11:01action
- 1:11:02people want
- 1:11:02to get
- 1:11:02started
- 1:11:02what do
- 1:11:03they do
- 1:11:03great
- 1:11:03question
- 1:11:04go to
- 1:11:04pyscript.net
- 1:11:05check the
- 1:11:06website
- 1:11:06we have links
- 1:11:07to the
- 1:11:07repo
- 1:11:08and
- 1:11:09to the
- 1:11:09you have
- 1:11:10very
- 1:11:10interesting
- 1:11:11install
- 1:11:11steps
- 1:11:12here
- 1:11:12right
- 1:11:13and it
- 1:11:13says
- 1:11:14no you don't
- 1:11:15install
- 1:11:15yes
- 1:11:16we hope
- 1:11:17people would
- 1:11:17click
- 1:11:18and actually
- 1:11:18see the
- 1:11:19easter egg
- 1:11:20which was
- 1:11:20good
- 1:11:21and yeah
- 1:11:22you know
- 1:11:22we want to
- 1:11:23really want to be
- 1:11:24inclusive
- 1:11:24community
- 1:11:25so if you have
- 1:11:25questions
- 1:11:26or have
- 1:11:27you want to
- 1:11:27report bugs
- 1:11:28or just
- 1:11:28ask where
- 1:11:29you can help
- 1:11:30just reach out
- 1:11:31either on
- 1:11:32on twitter
- 1:11:32or reach out
- 1:11:33on the repo
- 1:11:34open bugs
- 1:11:34there
- 1:11:35we are
- 1:11:35in the next
- 1:11:36you should expect
- 1:11:37more documentation
- 1:11:38on community
- 1:11:40engagement
- 1:11:41having a
- 1:11:42discussions
- 1:11:42group
- 1:11:43where people
- 1:11:44can actually
- 1:11:44ask questions
- 1:11:45more easily
- 1:11:46we're evaluating
- 1:11:47starting
- 1:11:47bi-weekly
- 1:11:48or something
- 1:11:49like that
- 1:11:49community
- 1:11:49call
- 1:11:50where we
- 1:11:50just
- 1:11:50are there
- 1:11:51for the
- 1:11:52community
- 1:11:52to ask
- 1:11:52questions
- 1:11:53live
- 1:11:53on a
- 1:11:53zoom
- 1:11:54or something
- 1:11:54like this
- 1:11:54so be
- 1:11:55patient
- 1:11:56we're
- 1:11:56getting there
- 1:11:57to support
- 1:11:58our community
- 1:11:59and allow
- 1:12:00people to
- 1:12:01actually contribute
- 1:12:01back
- 1:12:02well
- 1:12:02very exciting
- 1:12:03thanks for
- 1:12:04doing it
- 1:12:04thanks for
- 1:12:04being here
- 1:12:05thank you
- 1:12:05this has
- 1:12:08been another
- 1:12:08episode of
- 1:12:09talk python
- 1:12:10to me
- 1:12:10thank you
- 1:12:11to our
- 1:12:11sponsors
- 1:12:12be sure to
- 1:12:13check out
- 1:12:13what they're
- 1:12:13offering
- 1:12:13it really
- 1:12:14helps support
- 1:12:14the show
- 1:12:15starting a
- 1:12:16business is
- 1:12:17hard
- 1:12:17Microsoft for
- 1:12:18startups
- 1:12:18founders hub
- 1:12:20provides all
- 1:12:21founders at
- 1:12:21any stage with
- 1:12:22free resources
- 1:12:23and connections
- 1:12:24to solve
- 1:12:25startup challenges
- 1:12:26apply for free
- 1:12:27today at
- 1:12:28talk python.fm
- 1:12:29slash founders hub
- 1:12:30want to level up
- 1:12:32your python
- 1:12:32we have one of
- 1:12:33the largest
- 1:12:33catalogs of
- 1:12:34python video
- 1:12:35courses over
- 1:12:36at talk python
- 1:12:36our content
- 1:12:37ranges from
- 1:12:38true beginners
- 1:12:38to deeply
- 1:12:39advanced topics
- 1:12:40like memory
- 1:12:41and async
- 1:12:41and best of
- 1:12:42all there's
- 1:12:43not a subscription
- 1:12:43in sight
- 1:12:44check it out
- 1:12:45for yourself
- 1:12:45at training.talkpython.fm
- 1:12:47be sure to
- 1:12:48subscribe to the
- 1:12:49show open your
- 1:12:49favorite podcast
- 1:12:50app and search
- 1:12:51for python
- 1:12:52we should be
- 1:12:52right at the
- 1:12:53top you can
- 1:12:54also find the
- 1:12:54iTunes feed
- 1:12:55at slash
- 1:12:55iTunes the
- 1:12:56Google Play
- 1:12:57feed at
- 1:12:57/play
- 1:12:58and the
- 1:12:59direct RSS
- 1:12:59feed at
- 1:13:00/rss
- 1:13:01on talkpython.fm
- 1:13:02we're live
- 1:13:04streaming most of
- 1:13:05our recordings
- 1:13:05these days
- 1:13:06if you want
- 1:13:06to be part
- 1:13:07of the show
- 1:13:07and have your
- 1:13:07comments featured
- 1:13:08on the air
- 1:13:09be sure to
- 1:13:10subscribe to
- 1:13:10our YouTube
- 1:13:11channel at
- 1:13:11talkpython.fm
- 1:13:12slash YouTube
- 1:13:13this is your
- 1:13:15host Michael
- 1:13:15Kennedy
- 1:13:15thanks so much
- 1:13:16for listening
- 1:13:17I really
- 1:13:17appreciate it
- 1:13:18now get out
- 1:13:18there and write
- 1:13:19and write some
- 1:13:19Python code
- 1:13:20and write some
- 1:13:21and write some
- 1:13:21things like that.
- 1:13:22and write some
- 1:13:24and write some
- 1:13:25and write some
- 1:13:26things like that.
- 1:13:26And I'll see you next time.
- 1:13:27I'll see you next time.
- 1:13:28Bye.
- 1:13:28Bye.
- 1:13:28Bye.
- 1:13:29Bye.
- 1:13:29Bye.
- 1:13:30Bye.
- 1:13:30Bye.
- 1:13:31Bye.
- 1:13:31Bye.
- 1:13:32Bye.
- 1:13:32Bye.
- 1:13:33Bye.
- 1:13:33Bye.
- 1:13:33Bye.
- 1:13:33Bye.
- 1:13:33Bye.
- 1:13:33Bye.
- 1:13:34Bye.
- 1:13:34Bye.
- 1:13:35Bye.
- 1:13:35Bye.
- 1:13:36Bye.
- 1:13:36you
- 1:13:37you
- 1:13:37Thank you.
- 1:13:39Thank you.