Transcript #126: WebAssembly comes to Python
Return to episode page view on github00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to
00:04 your earbuds. This is episode 126, recorded April 17th, 2019. I'm Michael Kennedy.
00:10 And I'm Brian Okken.
00:11 And Brian, we have a special guest, don't we?
00:13 Yes.
00:13 Yeah, Cecil, Cecil Phillip. Welcome to the show, man.
00:16 Thank you so much for having me on. Appreciate it.
00:18 It's great to have you on the show. You've been on Talk Python. I've been on your podcast
00:21 away from the keyboard, so we might as well round this thing out, right?
00:24 Yeah, we may as well go for the trifecta.
00:25 Yeah, exactly, exactly. So super excited to have you here. We've got a bunch of cool stuff to cover. Before we get to it, just want to say thank you to DigitalOcean
00:33 for sponsoring this episode like they do many. Check them out at pythonbytes.fm/DigitalOcean.
00:38 More on that later. Brian, there's some really interesting news around Python being used for
00:46 X, where X's find the Higgs boson or get the Nobel Prize in economics or something else, right?
00:54 You got a new one for us on that incredible list.
00:56 Well, yeah, I was actually, I was the last of the list. I was surprised nobody else took it,
00:59 but in the news recently, there's a picture of a black hole, which is cool. And it's really neat
01:06 that there's a bunch of Python involved in it. And of course, this is a big team with lots of
01:11 software and whatnot, but a couple people did some digging. I'm linking to a quick write-up from Mike
01:16 Driscoll. So the Python used to take the photo of the black hole. He's referencing a paper, which is a
01:22 paper from the Event Horizon team. It includes references to lots of our favorites like NumPy and
01:29 SciPy, Pandas, Jupyter, Matt Plotlib, and AstroPy. So yeah, lots of Python used in astronomy and in this
01:37 black hole picture.
01:38 That's so cool. And the reason this is a big deal is this is literally the first picture of a black hole
01:43 ever, right? Yeah. One of the reasons why I linked this article as well is that links to a TED talk
01:48 from a couple of years ago, basically of how they took some of the concepts around how this picture
01:53 was generated, not the technical part, but just in high level concepts and that there's a lot of people
01:59 involved in it. And it's a pretty big deal. And I'm looking forward to every time anybody ever,
02:04 ever asked me for the rest of my life. So what can you do with Python? I can say, well,
02:09 we helped with the entire picture of the black hole thing. So whatever you need it for,
02:15 we could probably handle it.
02:16 Yeah, that's pretty awesome. I wonder if it was used in the detection of the gravitational waves
02:22 for black holes as well. So maybe that'd be a nice way to round it out. But I honestly don't
02:27 remember there. Cecil, are you into astronomy?
02:29 I am a little bit, to be honest with you. We actually have the Kennedy Space Center that's pretty
02:33 close by. I'm in Florida for everybody that's listening that doesn't know. And so it's definitely
02:37 something that we'd love to go over and do. There's like a little observatory in there,
02:41 if you've ever been. Yeah.
02:42 So it's really kind of interesting to, you know, take the little one over and like see how excited
02:45 he gets over like stars and planets and those types of things.
02:49 That's so cool. I've definitely been to Kennedy Space Center as well, taking my daughter there.
02:52 And it's a great place. And it's so awesome that Python and all these tools, I mean, this is like
02:57 the big hitters list of all the data science and Python used for this real cool discovery.
03:03 Yeah, this is amazing. You should definitely get, I can't remember her name at the moment,
03:05 but the girl that they attributed to taking the pictures on your show.
03:09 Yes, Dr. Bowen? Bowman? Yeah, I almost have it right. Katie Bowman.
03:13 There you go. Yeah.
03:13 That's right. And she, yeah, I've invited her to the show to talk Python. It would be great to have
03:18 her come and talk about this because it's so exciting. You know, what's really unfortunate is
03:22 there was such a weird internet backlash against her in particular. There were so many trolls and other
03:30 weird stuff. For example, I tried originally to reach out to her through Twitter and somebody had
03:35 set up a fake account with pictures of her and video posts and all sorts of stuff to make it look
03:40 real. But it got suspended because apparently it was, I don't know what the deal is, you know,
03:45 sorry that she had to go through that, but it's awesome. This is the stuff she's doing,
03:48 which is really cool.
03:49 Yeah, that's really sad to see. I mean, it's, we all have a very supportive community in developer
03:54 relations in general, but you're always going to have one or two folks that are going to just,
03:59 you know, just try and be nasty for no reason. You know, I think what she's done was, you know,
04:02 totally amazing. And I think she deserves all the credit that she gets for it.
04:05 Absolutely. The problem is, you know, you take 1% of 1% of 1% of people who are absolute jerks,
04:12 and then you put them on the internet where they can, you know, reach out to you all the time.
04:16 It feels like there's way more jerks than there actually are, but yeah, I still got to deal with it. It's a bummer.
04:20 Definitely.
04:20 Yeah.
04:21 Cool. So Cecil, something I'm super excited about is WebAssembly and the possibility to bring
04:27 various, you think, desktop or native code to browsers, right? So you don't have to just go,
04:33 well, does it compile to JavaScript and run in JavaScript? Like, WebAssembly means you don't
04:37 have to, right?
04:37 Yeah, exactly. So just for everyone that might be listening, so WebAssembly essentially is this
04:42 new standard that are in, that's in most modern browsers today. And essentially it allows you to
04:47 target somewhat of a virtual machine, right? But essentially it's running in the browser.
04:51 And so if whatever your language of choice happens to be can compile down into WebAssembly,
04:57 then you could run it in the browser. What I actually ran into when I was on Reddit was this
05:01 thing called Wasmer. And what this is, is a project that'll allow you to take that WebAssembly
05:06 output, right? And run it in a Python application, which is kind of interesting.
05:11 Yeah, that's like the opposite of what I expected actually.
05:13 Right. It's actually pretty interesting. So this is not Python running on WebAssembly in the browser,
05:17 although I'm pretty sure there's a few products that can do that. This is Python taking the WebAssembly
05:22 output, the .wasm file, W-A-S-M file, and running it in your Python application, which is interesting.
05:29 So if you think about, again, WebAssembly is, you know, allows us to run these different languages in
05:34 the browser. So if we have these different languages targeting WebAssembly, and then we have a Python
05:39 module that allows us to run that executable, essentially like we could run any language on
05:45 Python, right? Or at least we'll have that ability to interoperate between all these things, just using
05:50 WebAssembly as like that common language, I guess, that we're all speaking.
05:53 That's so cool. So what we have in Python now is you can compile stuff to C, and then use the C
06:00 extensions and bring it in and run it. But this means anything that compiles to WebAssembly can now
06:05 execute sort of natively in Python, regardless of whether there's like decent integration between
06:10 those two languages.
06:10 Yeah, I think that's really interesting, right? And so this is like the essence of cross-platform
06:14 software development, right? Like when you think about it.
06:16 You know what I thought about when you said this is like, I was thinking like, oh, this is kind of like
06:20 node. I can take stuff that used to be on the web, but now I can run it like locally, but running it
06:26 instead of like JavaScript, I run it like Python, but it takes anything that kind of was on the web,
06:30 which is pretty wild.
06:31 Exactly. So the folks that are really behind this WebAssembly movement was actually Mozilla.
06:35 And so they already have some implementations of their Rust programming language that targets
06:40 WebAssembly. So I could write Rust that targets, you know, that builds down to that, this .wasm file,
06:45 and then run it in my browser. So now you imagine I could write something in Rust or C or
06:50 something like that, that targets this WebAssembly file, and I could just run it in Python, right?
06:53 So, you know, if there so happens to be something that's missing or a module that I want to use,
06:57 like I could totally just bring it into my Python application and just use it.
07:00 I'm pretty excited about this.
07:01 Thinking I can use some of the awesome Python testing tools to test my WebAssembly projects.
07:07 Yeah, probably too. That'd be pretty interesting to try out. I ran this a little bit yesterday just
07:11 to try it out, and it actually works pretty well. And so now as the WebAssembly community just
07:15 starts to grow, you can imagine as these different runtimes and languages want to start a target
07:19 WebAssembly, you know, that just kind of opens up the world to everybody else, right? Because
07:24 now I can just pull those into my Python application and just run them.
07:26 I love it. This is a super cool find. Yeah, I mean, I don't know how much of the, is it this now,
07:31 but I can see a future where there will be stuff that's like WebAssembly only. You know,
07:35 once the adoption is greater, you're like, oh, that's only available in WebAssembly. Like,
07:39 well, now it's also available in Python. I love it. And Brian, I think you totally could,
07:42 right? There's an example here that's a Rust function that takes two numbers and returns the values
07:47 and things like that. And then the Python example of calling it. So yeah, you could wrap that up in
07:51 pytest, I think. Yeah. Pretty sweet. Yeah. Cecil, that's a really, really cool one. The next one I
07:56 want to talk about is called Cooked Input. And this one is a really cool little project. Do you remember
08:02 Bullet, Brian? Yeah.
08:04 Cecil, I don't know if you caught this one, but Bullet is this library that lets you basically create
08:09 dropdown combo boxes in the terminal with like arrow control. So you can like, and scroll bars
08:17 and stuff. So you can say, I would like to get the, ask the user for this. And here's the five options.
08:22 And then the five options is like a dropdown with like the thing. And you can like arrow through it
08:26 and stuff like that. And also has some features to say, I want a number from you, like with some
08:30 limitations. So Cooked Input is like that latter half to the extreme. So you can do all sorts of cool
08:35 stuff. And the name comes from the idea of like Python 2, the way you got input from the user was
08:40 raw underscore input. So validated input is Cooked Input, not raw input. Yeah. That kind of thing.
08:45 Oh, I like that. Nice. Yeah. It's funny, right? So the idea is you can ask for all sorts of stuff
08:51 and it has this cleaning and this converting option and then this validation option. So I could go and say,
08:58 I'd like to say, go to the user and get a string called what I asked the prompt is, what is your name?
09:04 And of course you could do that with input, but here you can specify, like, I would like
09:07 whatever they type to be transformed to cap words. So like if you type your name, all lowercase or like
09:13 a, it'll put just first capitalized first letters and everything else is lowercase.
09:17 Or you can say like, I would like to get an integer. How old are you? And the minimum is one,
09:21 you know, it just keeps asking the question and tells you what's wrong until it gives you the answer.
09:26 So it's a really nice way to get input from the user on the terminal. That's like pre-validated.
09:31 That's pretty interesting. So let's say, could I do something like, I don't want to say a very bad
09:36 word here. Use regex and do something like get like my date formatted a certain way or four numbers
09:43 inputted a certain way.
09:44 Yeah. It has all these different validators and some of the validators have to do with dates and
09:48 other types of things. So like, give me an email address, give me a date and, you know, give me,
09:53 you know, give an example of like the, you know, year, month, day or whatever. And it'll,
09:57 it won't let the user go on until they answer it correctly.
10:00 That's pretty cool. Pretty nice. Brian, what do you think? You like it?
10:01 You're bringing up bullet. Is it a reason? Is it just a similar project or?
10:07 I bring it up because it's another utility or library that like takes just get standard input
10:13 from the user on the terminal and makes it a lot better.
10:16 Yeah. Okay.
10:16 Right. It's kind of like a, not exactly a competitor, but a similar, but different take on that idea.
10:22 Probably can use them together. Like if you wanted to do these free form entries, get it through,
10:27 Yeah. And then drop downs. Yeah. I wouldn't see why you couldn't do that. This also sort of came
10:32 inspired by bullet because our listeners are awesome. Anytime we mentioned something that we
10:37 thought was like, Oh, here's this new unique thing we've never heard of. They're like, and here's five
10:40 other amazing ones. You also haven't heard of and talked about yet. Right. Yeah. So pretty cool.
10:44 All right. Before we get to the next one, let me tell you all about digital ocean. So digital ocean run our
10:50 infrastructure. They're really great. Super happy with them. And one of the things they've recently done is
10:55 launched their digital ocean marketplace, which is cool. So you just go to the marketplace and you say,
10:59 I'm like a, a pre-configured Linux machine that's set up to run Django properly, like with micro whiskey
11:05 and G unicorn and all that, or I want a MongoDB server, or I want a ghost server or whatever. And you
11:10 just say, I want one of those. And bam, it just creates the whole virtual machine droplet ready to go
11:15 pre-configured. So they've got like GitLab enterprise, engine X, Postgres, cert bot, all that kind of stuff
11:21 that you might need. So quite cool. I would just, one of the things you can get at digital ocean to get
11:26 started more easily and quicker. So check them out at pythonbytes.fm/digital ocean, get a $100
11:31 credit for new users. Brian, you're starting to be a fan of PyCharm these days, right? I'm slowly,
11:36 slowly wearing off on you. Is that right? Oh no, I've been using it for a while,
11:40 but I use it with VI mode, of course, because I can't unlearn Vim. It's just built into my head now.
11:48 So one of the things I've been trying to do is use more Jupyter Notebooks for various presentations and
11:55 tutorials and stuff, and just playing with stuff, especially with big data sets. But it bugged me that
12:00 maybe there's a way to use VI within a web browser, but I don't know how to do it. But I can do it within
12:07 PyCharm. And so the neat thing that I'm announcing right now, I guess I'm not really announcing it,
12:13 I just want to highlight it, is that JetBrains and PyCharm have, they've announced that they're
12:19 working with the Anaconda group to get more support for things like Conda environments and
12:25 notebooks into PyCharm. And I'm using the 2019.1.1 recently, the most recent build,
12:35 and the pro version, of course, but it makes it so that I can just edit my notebooks within
12:40 PyCharm with the UFM emulation, all my normal things that I have hooked up to PyCharm.
12:45 And it just works great. I love it.
12:48 That's super cool. And they have a special distribution for PyCharm for Anaconda,
12:52 which has even better support. Now, I don't do much with Anaconda. I'm a fan of it,
12:56 but I just don't have a use case for it. So I don't know a whole lot about it,
13:00 but that sounds pretty cool.
13:00 I don't use it myself either, but I know that a lot of people, especially if they're behind
13:04 firewalls and stuff, it's just an easier install for other people to put that on there.
13:09 That's pretty cool.
13:10 Cecil, you ever use PyCharm or being at Microsoft, are you mostly on the Visual Studio Code side of
13:15 the world these days?
13:16 To be honest with you, I'm still a big PyCharm user.
13:18 Like I was using PyCharm prior to coming to Microsoft, and I still use it a little bit.
13:22 I do use our Python extension for Visual Studio Code, depending.
13:27 That's getting nicer and nicer. Yeah.
13:29 Yeah, it's getting better and better. And people love it, obviously, because it's free and it's
13:32 open source and you can contribute back to it. But honestly, I'm still a PyCharm guy. I think when
13:38 you think about IDEs versus editors, there's a different use case for those. There's a group of
13:43 folks that just need an editor, making really quick changes or just kind of going through,
13:49 like, you know, I guess your run of the mill edits, builds, view type lifecycle. But I think
13:54 when it comes down to debugging and really getting deep introspection into what's happening into
13:58 your application, that you honestly can't beat like the, you know, the power of an IDE.
14:02 Yeah, I'm with you.
14:03 I'm sorry, Brian. I know you're like a VI guy. I apologize.
14:05 I'm 100% in PyCharm now.
14:08 Do you just have it set up in VI mode? Yeah, I tried that for a minute that I was like,
14:12 whoa, somebody broke my PyCharm. I got to disable this extension here.
14:16 That was when we were playing with AceJump, which is really cool. But that's a different
14:20 topic for a different time. Yeah. So over at Azure, you guys have some interesting stuff going on there.
14:27 And one of the big trends, I don't know if it's really where the world is, but it's certainly where
14:32 a lot of the hype and excitement is, is around serverless code, right?
14:37 Yeah, definitely. So serverless is where we hide your servers from you. I'm like, so, so it's essentially
14:43 like we're just taking the burden away from you in terms of like capacity planning, right? So that
14:49 means that the servers are still there, but essentially all you need to do as a company,
14:53 as a developer is just, you just need to give us your code or, you know, upload it to GitHub or what
14:57 have you. And then we'll take care of deploying it, scaling it and doing all those types of things.
15:02 So again, like you'd have to worry about this is how many virtual machines I need, or this is how
15:06 much RAM I need and worry about backups and some of those types of things. But along with serverless,
15:11 like you start to see like some interesting workloads that people want to build with them,
15:14 right? So a lot of folks use it for APIs or the mobile backends to your web applications.
15:20 Actually, I found a really interesting article yesterday, and this is on dev.2, which is a really
15:25 cool online community for developers of, you know, this guy that created this serverless solution
15:30 using Python, and it connected it to our Raspberry Pi to get like telemetry data. And so he connected
15:36 the Raspberry Pi to this other offer we have called Azure IoT hubs. And that allows you to do
15:41 two-way communication to your IoT device. And so we connected to that, and then we send information
15:47 over into Azure functions. And then now he has like this real-time chart of telemetry showing up in
15:53 web browser, which I thought was pretty cool. So the pieces that he has connected to this are pretty
15:56 straightforward. Right? So he uses, again, he uses Python, he uses D3 for actually generating
16:03 the charts.
16:03 Oh, nice. Yeah. D3 is beautiful. Yeah. Yeah. And he has this thing called C3, which I never heard
16:08 about before. So C3 sits on top of D3 and makes D3 easier specifically for creating charts.
16:14 Okay. Nice.
16:15 If anybody's ever used D3, you know, it's not like the easiest learning curve thing. And you could do
16:20 more than just create charts, but like there's a charting library on top of that, which I think is
16:23 actually pretty cool. But again, this article is pretty interesting. Again, it uses Visual Studio Code and
16:27 the Python extension. It uses functions, serverless functions. And then it shows you how you can take
16:33 telemetry from an IoT device, specifically a Raspberry Pi, push it up into the cloud. And now you're getting
16:38 like this real-time telemetry. So if you think about it, like, I don't know, maybe you have like a garden
16:43 in your yard and you want to have like moisture sensor or even a heat sensor or anything like that.
16:48 Like you could start to get like interesting telemetry from your house or from your different devices
16:52 and then push it up into a real-time chart using Python.
16:55 That's a really cool use case. And I like the way they lay it out. What's really interesting to me
16:59 is the two-way communication. Like calling into your Raspberry Pi seems more interesting than it
17:05 talking out or more impressive, I guess.
17:08 Yeah. So when you think about it, I mean, messaging is a hard thing to do sometimes,
17:12 particularly when you're talking about a device that you don't necessarily have close by, right?
17:17 And so definitely IoT Hub helps a lot with this. But I think for this particular use case,
17:22 it's just using it one way, but you can go both ways if you need to.
17:24 Yeah, that's pretty cool. I like it. So if anybody wants to create a cool IoT thing,
17:29 here's a nice little write-up with Python and Azure.
17:32 Yeah.
17:33 What would you create with IoT if you could? Like Brian and I talk about this every now and then.
17:37 I always like, it's so cool, but I actually can't think of anything I want to build that's,
17:41 you know, not already out there. Like what would you build with some sort of IoT stuff if you had
17:45 some time and energy?
17:46 I have two co-workers that actually built some interesting things. And I think I might copy them. So
17:51 I'm going to call them out a little bit. So one of my co-workers lives in Tampa. And so he's in the
17:55 barbecue and he has like a professional grade barbecue grill in his backyard. He has like
18:01 multiples of them. So we went over to his house one day for barbecue. And I'm like, dude, like what are
18:06 all these wires you have attached to this grill? He has a sensor attached to the grill that's, you know,
18:10 checking temperature and whatnot. And he had a Raspberry Pi. Could you not like hanging from the grill
18:17 that was connected to his Wi-Fi in his house? And it was pushing telemetry to Grafana that was running
18:23 on a server in his house. If folks on the letter listening don't know what Grafana is, Grafana is
18:28 essentially like an open source dashboard. You know, you send us some information and it just
18:32 generates a chart for you. So he has this Grafana chart that's like in his house. And so he could look
18:38 and see, oh, well, this is what temperature the steak is. And this is what temperature like the
18:42 sausages are. I thought it was super cool.
18:44 That's pretty awesome. Brian, have you come up with any IoT things yet?
18:46 Actually, I'm intrigued by this whole barbecue thing. And it sounds great to me. You could even
18:51 have extra probes in there to just to probe your meat while it's cooking.
18:55 What's cool with the two-way communication now is that so now he could look at it and be like,
18:58 okay, this is hot enough. And then he could turn it down. Because again, it's you could do
19:03 bi-directional communication with your device, right? So when you say it's getting too hot or maybe it's
19:07 not hot enough. The IoT device, again, because it's connected to the temperature gauge,
19:11 like he could adjust it. But he doesn't have to be right next to his grill.
19:15 That's cool.
19:15 Yeah. And you could do a feedback loop, a control loop and have like an AI actually cook your food
19:21 for you then.
19:21 Yes, exactly. You could do like 10 good grillings and then just like feed it to like some ML and go,
19:27 do more of that. That was good.
19:30 I actually like that. So maybe that's my project now. I'm going to have ML cook food for me. That'll
19:34 be awesome.
19:34 That actually would be incredible. I would love to have some ML cooked barbecue with you. That'd be
19:39 great. All right. The last one is not nearly as fun as machine learning cooked barbecue, but it's
19:43 pretty useful. So in Python, the whole threading parallelism story is a little bit complicated,
19:49 right? We've got threads, but they can only do IO bound stuff. They can't really do computational
19:53 stuff because of the GIL. We've got async and await, and that's really even better for
19:58 IO driven concurrency, but it also doesn't work with the computational stuff. So if you really want
20:03 to do computational concurrency, you have to use multiprocessing or C or something like that.
20:07 Right. But the way you've exchanged data while those are running has been somewhat limited,
20:13 like certain structures can be shared and you wait for the response to come back from the thing
20:19 you're running over there. So new in Python 3.8, there's a new set of modules called
20:27 multiprocessing dot shared memory. And the idea is you can create shared memory segments that are
20:32 directly shared with all the multiprocessing sub processes that are running in your parallel work.
20:38 So if you're doing any multiprocessing, it's pretty cool. And a lot of it's fairly complicated. You're
20:43 like reading, writing bytes directly, which sounds kind of gnarly, but there's also a shareable list,
20:49 which is pretty cool. You can throw stuff on the list, you can pull stuff off the list and it's shared,
20:53 just like straight shared memory across the various processes, which I thought was a pretty cool
20:58 addition.
20:58 I'm wondering, so does it control access to who's writing? Because I'm guessing multiple people can't write to it at the same time.
21:03 So I'm guessing there must be like some type of control that says this person's writing first and then this person's writing second kind of thing.
21:10 One would hope there's some serialized like shared critical section or something that doesn't let it like corrupt the shared memory.
21:16 But yeah, it's still pretty cool.
21:18 I haven't looked, but I would guess so. I didn't see anything in the documentation about
21:22 explicitly programming for that. It was just like you put something in the list, you get something out of the list. But I bet internally, it's probably down at the sea level or something. It's pretty careful about that.
21:31 Sure.
21:32 At the very least, this is a building block that we can build things like that on top of.
21:35 It's pretty cool. And it's nice to see, you know, new stuff coming in the threading world or parallelism world in Python. So this is like I said, brand new in 3.8. So it's cool.
21:43 Yeah, nice.
21:44 Indeed. All right. Well, guys, that's it for our main items. But there's always a few extra things at the end to talk about. So Brian, what do you got that you want to throw out there?
21:52 Well, I'm just totally gearing up and getting excited for PyCon. I just got my stickers ordered. So I'm going to have also bring in a bunch of copies of the pytest book, try to sell some of those there. I only took like four last year and they sold out.
22:06 So I'll bring more.
22:07 On your way to the booth, right? People mobbed you and got your book before you could even set them down.
22:12 Yeah, I was going to bring a whole bunch, but it turns out that like a whole bunch of books is heavy. So I'll bring some.
22:18 That sounds good.
22:19 Also, I've never done live interviews for testing code. I think it'd be fun to do some live interviews. You've done those before. So I'll pick your brain on how to do that best and get some of those set up.
22:29 Absolutely. I'm super excited about some live recordings at PyCon. I'm sure you and I will do some open session live Python bytes, but there'll also be some other stuff happening as well.
22:38 I actually just bought some two little cool desktop mic holders for exactly that to bring to PyCon.
22:44 So we'll see how they work.
22:45 Nice.
22:45 How about you, Cecil?
22:46 In terms of sharing. So I actually found a workshop online that I thought was pretty cool.
22:51 So, you know, everybody's always talking about machine learning and I want to get into it, but I don't know what exactly I could do with it.
22:58 So I found this interesting Python workshop and it's called attendee detector workshop.
23:03 Okay.
23:04 So essentially you go through this process of creating a Flast application, but essentially what you do is like, you know, you upload a picture of like, let's say a group of people or the audience or the background or what have you.
23:14 And using machine learning, like it'll help you like pick out the people that are in like the faces of the people that are in that picture that you put out.
23:22 And then it'll tell you like if they're smiling, if they're happy, if they're sad or what have you.
23:27 So I think it's pretty cool.
23:28 So you can imagine again as a speaker or I don't know, maybe you go to a basketball game or something, you take a picture and you can be like, hey, I don't really think these people are really interested to like what you're saying, what's going on here.
23:38 Or, hey, like they're like somebody just scored like some points, right?
23:42 Like I'm really super excited about it.
23:43 But I think it's a really interesting practical application of using machine learning, but also something that's very approachable because I think it's something that we all could relate to.
23:50 I think that's awesome.
23:51 It would be really cool to get a camera and point it on your audience while you're doing a presentation and just have like a little meter of like audience engagement as like that only you see while you're presenting something unrelated to this.
24:01 And it'll show you like the faces of the people that aren't paying attention.
24:04 So you can like walk by them and like stir.
24:06 You've been singled out by the AI.
24:10 We have to talk.
24:11 Exactly.
24:12 I thought that was pretty cool.
24:13 So I put that on the extras.
24:15 Another thing I wanted to talk about too.
24:17 So I've actually downloaded your Talk Python mobile app.
24:21 I have it on my phone, actually.
24:22 Nice.
24:23 So I took it with me when I was traveling last week.
24:25 And I actually say I actually pretty like it.
24:26 I know we've been working on this probably for a while.
24:29 And we spoke about doing offline video content and whatnot for your show.
24:33 So I'm really happy to see that this came out, man.
24:35 This is super cool.
24:35 Yeah, thanks.
24:36 I'm really happy the way it came out as well.
24:38 And it's really fun.
24:39 Even I am experiencing going through my courses differently.
24:43 You might think, well, why would you do that?
24:45 But I have other authors.
24:46 I'm going through their content.
24:47 They're going through mine, right?
24:48 Like I'm kind of a student as well.
24:50 And it's super fun.
24:51 We almost have the iOS version out, just the Android currently.
24:54 But yeah, it's super, super close.
24:56 So that was a fun project.
24:57 Let's see.
24:57 I do have a couple of other things I want to throw out as well.
24:59 There's an interesting interview with Guido Van Rossum on MIT's AI podcast.
25:06 This was sent over by Tony Cappanelli.
25:08 Thanks for sharing that with us.
25:10 And this is just, you know, it's not really worth going through the whole thing.
25:12 But it's a different look at his perspective.
25:15 Like his perspective on science fiction and on machine learning and on just all sorts of stuff.
25:21 So if you've got an hour or something, you want to just catch up with Guido and sort of a historical look on what he did and his accomplishments.
25:28 It's pretty cool.
25:29 Another one, Cecil, in the whole Microsoft realm is Visual Studio IntelliCode for VS Code.
25:36 Which is pretty awesome.
25:37 So we talked about some other projects that are like this.
25:40 But this is, I think, a more legitimate one.
25:43 So IntelliCode is like autocomplete, IntelliSense.
25:46 But actually is based on the usage of your code.
25:50 So this works for Python, among other things.
25:52 And it goes through, like, say, popular libraries on GitHub.
25:55 So when you go to your, if you install this extension, say, in VS Code, and you go to, you hit, you know, regex dot.
26:02 The stuff that shows up in the list first is not just alphabetical, but is actually the most commonly used things for, like, say, popular libraries that use regex and stuff like that.
26:14 So it kind of shows you, and it's contextual as well.
26:17 So it's pretty cool that people can check that out and install that.
26:19 And then finally, my buddy Dan Koster sent me this yesterday.
26:23 It just made me laugh.
26:24 Somebody had gotten, was running a Craigslist thing and gotten a message.
26:28 Hey, you know, here's my proposal or something to your Craigslist ad.
26:32 Click here to sign up and, you know, fill it out or whatever.
26:35 And it turned out to be a complete scam.
26:37 It was like craigslist.somerandomdomain.com.
26:40 And he's like, all right, well, I could just ignore this.
26:43 Or I could write a program to destroy this guy.
26:45 And so it's a video of him going through, figuring out where the, like, basically what it does is it shows you a fake Craigslist login to steal your credentials.
26:54 So he used requests and some other APIs to actually go and just overflow the guy's database.
27:00 You know, just generate like 100 million fake logins and just blast them into his database.
27:05 So that's enjoyable.
27:07 Anyone who feels like a little bit of schadenfreude, you can watch that.
27:11 It's pretty good.
27:11 Nice.
27:12 Nice.
27:12 I love that.
27:13 Yeah, it's pretty short and sweet.
27:14 It is Python 2, so it's a bit of a knock on it.
27:17 But still, it's all good and funny.
27:19 Speaking of funny, Brian, what do you got for us, man?
27:21 Okay, well, I used our PyJoke, which I probably used it too much, but whatever.
27:26 You can't use PyJoke too much.
27:27 And Cecil, we got to tell you, the way we get our jokes these days, sometimes people send them to us.
27:32 But we found that there's a package called PyJokes.
27:35 And if you pip install PyJokes, you can just go to your terminal and just type PyJoke anytime you need a developer joke.
27:40 Are you serious?
27:41 So it's just a package and it'll just randomly generate jokes?
27:43 Exactly.
27:44 It's beautiful.
27:44 Do you know if it's like machine learning jokes or is it like just static jokes and they just give you one?
27:48 I think it's static.
27:49 Oh, okay.
27:49 Yeah, it's just a list.
27:50 But there's quite a few.
27:51 Here's one.
27:52 To understand recursion, you must first understand recursion.
27:55 It's very meta.
27:56 But I wanted to make a comment on that because we teach recursion to new computer science people all the time.
28:03 And I don't use it.
28:04 I never use it.
28:05 It blows up your stack.
28:07 I don't think I've used it once in 23 years.
28:09 And I've never needed a Fibonacci sequence generator.
28:13 There's that.
28:14 Yeah, I kind of felt that way when I learned CS.
28:16 I'm like, this is cool and mind-blowing.
28:17 But will I ever use this?
28:19 After I saw your comment here, I decided to think about it.
28:21 I probably have legitimately professionally used recursion like five times.
28:24 Yeah, I can attest to that.
28:25 I've probably done similar, to be honest with you.
28:28 It's not zero, but it's not very high given the number of years that I've been doing this.
28:33 Same for you, huh, Cecil?
28:34 Yeah, because when you think about it, what would you use recursion for, right?
28:36 And it's probably, more commonly, you'd probably use it for processing of lists of things.
28:41 You know, and breaking up lists of things into different pieces.
28:43 Now, most programming languages have things that are in the box in their standard library that'll help you do that.
28:48 So, I really haven't had the need to go down that rabbit hole.
28:50 Exactly.
28:51 I agree.
28:51 All right.
28:53 I have one for you as well.
28:54 I have two, actually, because I had to run Pyjoke as we were talking about it.
28:58 So, here's one.
28:59 I really like this one.
29:00 A programmer was found dead in the shower.
29:03 Next to their body was a bottle of shampoo.
29:05 With the instructions, lather, rinse, repeat.
29:08 They just did it until they died.
29:13 An infinite loop.
29:13 And then, this one's special for you, Brian, because I just ran it and it came up in Pyjoke.
29:18 How do you know whether a person is a Vim user?
29:20 I don't know how.
29:21 Don't worry.
29:21 They'll tell you.
29:22 Well, I use Vim.
29:26 Oh, man.
29:29 I love our jokes so good.
29:31 Oh, man.
29:34 This is crazy.
29:35 All right.
29:35 It is.
29:36 All right, guys.
29:36 Brian, thank you as always.
29:38 Cecil, thank you for being here.
29:39 It was a lot of fun to have you on the show.
29:40 Sure.
29:41 Definitely.
29:41 Thank you so much for having me on.
29:42 Appreciate it.
29:43 You bet.
29:43 Bye, guys.
29:43 Bye, everyone.
29:44 Bye.
29:44 Bye.
29:44 Thank you for listening to Python Bytes.
29:46 Follow the show on Twitter via at Python Bytes.
29:49 That's Python Bytes as in B-Y-T-E-S.
29:52 And get the full show notes at pythonbytes.fm.
29:55 If you have a news item you want featured, just visit pythonbytes.fm and send it our way.
29:59 We're always on the lookout for sharing something cool.
30:02 On behalf of myself and Brian Okken, this is Michael Kennedy.
30:05 Thank you for listening and sharing this podcast with your friends and colleagues.