Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book


Transcript #156: All the programming LOLs

Return to episode page view on github
Recorded on Wednesday, Nov 6, 2019.

00:00 Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.

00:04 This is episode 156, recorded November 6, 2019.

00:11 And we're recording from a special place here at Microsoft Ignite in Florida.

00:15 Live, you might be able to hear some background noise, and that's because it's right here.

00:19 And Brian is not here because he couldn't get away, he should have come to the conference.

00:23 So I have not one, but two special guests.

00:25 Dan Bader, hey Dan.

00:27 Hey, how's it going, Mike?

00:27 Great to have you here. And Cecil Philip.

00:29 Hey, what's going on, everybody?

00:29 Hey, welcome back, both of you.

00:31 Been on Independently now together, very quite close together in this little recording area we put together.

00:36 Cecil and I were sharing a mic, so we get to like snuggle up here on the couch.

00:41 You guys will be fast friends after this.

00:42 Yeah, we're getting some intimate time together while we record this podcast.

00:45 All right, awesome.

00:47 Well, let's start by thanking DigitalOcean for sponsoring the show.

00:50 Check them out at pythonbytes.fm/digitalocean.

00:53 More on that later.

00:55 Dan, there's a lot of debate about how you create a virtual environment.

00:58 I know both you guys are fans of virtual environment, but there's VENV, there's virtual environment, there's poetry, there's all these things.

01:06 You've got a recommendation for us, huh?

01:07 Yeah, so I wanted to call out or like showcase an article that Brett Cannon published recently.

01:15 So basically it's about a best practice you can apply when you're running commands like pip install.

01:21 Though what Brett recommends in his article is instead of running pip install and whatever library you want to install, instead you can run python -m pip and then run whatever command you want to run.

01:34 Because Brett likes to type a lot or what?

01:36 Because he enjoys typing so much.

01:38 And that's probably why we should all use that.

01:42 So the reason is that if you use this other form like -m, it will basically load a module and execute it.

01:49 You know exactly which Python environment this will affect.

01:53 So if you just go pip install, it would be possible that pip actually points to a different environment, maybe not the one that you think it does point to.

02:01 So maybe you're accidentally installing something into your Python 2 environment, but you wanted to go into your Python 3 environment.

02:06 That happened to me when I was new.

02:08 I'm like, "Why is request not here?

02:09 I don't understand what is going on." - So frustrating. - Yeah, I think I typed pip instead of pip3 or something silly.

02:14 I was new and young. I didn't know what I was doing.

02:17 I just really like this article because it gave some pretty clear recommendations, and I'm pretty much on board with all of them.

02:23 And if you follow this format, whenever you run pip install, you will always just be 100% sure that you're actually installing stuff in the right environment, because if you hit the wrong environment, you have to go and uninstall stuff.

02:36 Maybe you end up upgrading something that you didn't want to upgrade, and it can get messy.

02:41 And so I just felt like, yeah, that's a good recommendation there, and an article worth reading, because Brett goes into a lot of the backstory and why this is a good idea.

02:49 That's really cool. My first thought is, I need to alias this So that pip just means Python 3-in-pip.

02:56 Cecil, I know that you are a fan of virtual environments.

02:59 Do you do anything special, or do you just run Python 3--

03:03 do you just do pip directly, or do you use something like Poetry or something else like that?

03:06 -I'm actually a big fan of pipenv, actually.

03:10 So we do this live stream randomly, and we actually showed that off in our last episode, how you could use pyenv and pipenv.

03:18 For our students, it was really important for us to have that background information.

03:21 But then now they know how these little bits and pieces go together.

03:25 And having one command line tool that'll be able to orchestrate all of that stuff for us is a game changer.

03:31 - Yeah, that's awesome.

03:32 So you're doing, with Brian Clark, you're doing a Twitch livestream programming series, which is really fun.

03:38 We're going to talk about it on Talk Python further down the road, like pretty much in real-time close, but in release time far apart sort of thing.

03:46 But yeah, so it seems like there's a lot of beginners in that world.

03:50 And so this is probably a tricky concept for them.

03:52 - Yeah, it totally is.

03:53 And so using something like it was so much less for them to worry about in terms of like installing and setting up and like, what's the right combination of commands I need to use?

04:02 What order I need to run them in?

04:03 If I made a mistake, like how do I back out of it and like restart over?

04:06 That one command, it just kind of allows us to manage environments and manage packages and it just makes it so much easier.

04:12 - Super cool.

04:13 Well, we are here at Microsoft Ignite, which is, I had no sense of the scale of this place until I came here, 29,000 people.

04:20 - Yep, Ignite is massive, man, I know.

04:22 Because Ignite is so much more than just a developer audience.

04:25 It's developers, it's IT folks, it's CTOs, and all these different types of folks, all at one conference.

04:32 So when you bring all those people together, you get a pretty massive turnout.

04:35 - And you get a lot of steps in.

04:37 - You get a lot of steps in, man.

04:38 So as you can imagine, a conference center is humongous.

04:41 And so there's sessions all across the conference center, there's sessions across the street and down the street.

04:47 So I mean, sometimes you gotta do a little bit of walking.

04:49 - That's right.

04:50 The reason I bring all this up is there was a pretty big announcement here that's quite close to Visual Studio Code, which is one of the most popular Python code editors these days.

05:00 So, you know, tell us about it.

05:01 - Yeah, yeah, yeah.

05:02 So like you said, like Visual Studio Code that runs on our desktop runs on Linux, Mac, Windows, and then the Python extension has something like, I don't know, like 24 million?

05:11 - Yeah, I don't know.

05:11 It's got a many, many, many, it's--

05:13 - Tons of millions of downloads.

05:13 - It's by 2X the most popular thing for Visual Studio Code, way over C#, way over C++, it's massive.

05:19 - Right, definitely, and so the Python extension is easily the most popular extension for Visual Studio Code by leaps and bounds.

05:26 But one of the big things that we had announced this week was our new Visual Studio Online environment.

05:32 And this is the real Visual Studio Online and not the old one.

05:35 And when I say that, I mean, so we used to have a product called Visual Studio Online, but that was essentially what turned into Azure DevOps.

05:42 The Visual Studio Online used to be our CI/CD.

05:45 - Yeah, it was hardly even Visual Studio.

05:46 It was like the continuous integration story and like TFS and like all the source control bits and all that.

05:51 - It was source control, it was ticket management, it was bills and those types of things.

05:54 - That name was hijacked.

05:56 - Yeah, and so now we're repurposing the name.

05:58 And now Visual Studio Online is exactly what you think it is, right?

06:01 It's Visual Studio Online.

06:03 More specifically, it's Visual Studio Code Online.

06:06 - Right, which is so interesting because Visual Studio Code is an Electron.js app, so it's got like this front end and this back end already on your machine, like got Node and then Chrome, like packaged into one thing, but now you just put like lots of distance and stuck part of it in the cloud, right?

06:21 - Yeah, totally.

06:21 And so the background of it is a little bit of, so we had Visual Studio Code, and we also have some extensions that allow you to do what we call like remote sessions and remote debugging into different environments.

06:32 So for instance, I could have Visual Studio Code in my machine, and I could debug into a Docker container, I can debug into a Linux machine, I could debug into a workspace that's not on my local machine, But then not only can I do that, I can have my environment specific settings and tools I have installed, extensions and those types of things on that environment and not on my machine.

06:52 So all that happens is that when I start to remotely connect to that machine, I'll just have all those additional things just added to my currently working workspace.

06:59 So we're like, okay, well, if we can do that, what if we just created like a completely online experience for that?

07:05 So kind of like what you said, right?

07:06 Like, you know, Visual Studio Code is built on web technology.

07:08 It's, you know, JavaScript and CSS and you know, those types of things.

07:12 And essentially they just, they took the editor and they took all the tooling and they put it in a web browser.

07:16 - Yeah, it's so cool.

07:18 It's really a nice experience.

07:19 And you get basically an Ubuntu machine and like you get like a little Docker.

07:24 Is it Docker or just straight VM or what do you get?

07:26 - Honestly, I have no idea what type of machine is running on.

07:29 - But you get some machine with a terminal like your stuff lives on, right?

07:31 - Yeah, you get a machine with a terminal.

07:33 So essentially what you do is you go in and you could like create a new environment or if you have an already existing Git repo, there's some markup that you could add to your markdown file that'll add a button in your markdown.

07:43 - Oh, is it like the launch binder for notebooks, but instead you launch in VS Code?

07:48 - Right, you know you see launch binder, or if you might have seen the thing that says build succeeded or something like that?

07:53 Like those little tabs, those little buttons you can add into your Git repo?

07:57 So you can add one of those that just says create environment.

07:59 And what will happen is per person, you'll get an individualized environment for yourself.

08:05 So if I have my GitHub repo, and Dan can click the button and you can click the button, I can click the button, but we'll have three different environments pointing to the same repository.

08:15 I see.

08:16 So it's like spin up a little dev machine, but it links back to the source control.

08:18 Right.

08:19 Which is great, right?

08:20 Because when you think about companies that have situations where it takes really long time for us to do setup, but I got to install dependencies and I, you know, like there's multiple things that need to happen before I can be even started to become productive.

08:31 Right.

08:32 I got to install this OSS thing and I got to install like SSL and like stuff has to happen right before work can actually happen.

08:39 and now we could have these predefined environments where I could just be like, "Hey, just create this environment "for this particular code project." And now we could just get to work.

08:47 And it's running in the browser.

08:48 I don't have to install anything on my machine if I don't want to, and I have everything I want right there, just running inside of the cloud.

08:54 - That's super cool.

08:55 You could use it from an iPad.

08:56 You could use it from a Chromebook, other places where it's hard to run code, right?

08:59 - I've had teammates that have run it from iPads, from their cell phones, from all over the place.

09:05 - Hey Siri, refactor this.

09:07 - It's really cool if you remember the keynote, Amanda Silva was telling us a story about how she ran it from inside the airplane.

09:14 Like she was debugging the demo that she showed using the project for the demo.

09:19 - On the airplane WiFi?

09:20 - On the airplane, which, on airplane WiFi.

09:22 If anybody's used airplane WiFi, we know that's not like the most--

09:25 - Yeah, that's sipping through a straw.

09:26 - The most high bandwidth situation.

09:28 - That's cool, man.

09:29 - But it was super cool.

09:30 - So people can try this now, right?

09:31 And the link is in the show notes.

09:32 - Yeah, people can definitely try it out now.

09:34 Let us know what you think about it.

09:35 I ran it myself personally just the other day.

09:38 The Ubuntu machine that it comes with comes with Python 3.8 by default, which is great, so I didn't have to install it or do anything with it.

09:45 And I think that's also really cool 'cause Python 3.8 is like what, like two or three weeks old as of today?

09:49 - Yeah, it's brand new, yeah.

09:51 It still has that new Python smell.

09:53 - These are brand new, fresh machines and images that you get to run your code on, so I think this is really cool.

09:59 - That's a great one, thanks for sharing that.

10:00 Now before we get on to another one, let me tell you about DigitalOcean and their sponsoring the show.

10:05 All of our infrastructure runs on DigitalOcean, super, super happy.

10:08 We ship like 15 terabytes of data through there.

10:11 We have millions of requests and just love, love using it.

10:15 So if you want some like we got going on here, check them out at pythonbytes.fm/digitalocean.

10:20 Now this last one, speaking of Python 3.8 and 3.9, the next version of Python should come a lot quicker because we've now switched from an 18-month release cycle to a 12-month release cycle.

10:33 So this is a project that LucasLing has been working on for a long time, trying to make this happen, now that he's in charge of the release management.

10:40 And so Brett Cannon, speaking of Brett Cannon from earlier, he sent out a message from, officially from the steering council, which is a cool way to announce things, that after a long discussion on changing the cycle, we've decided to accept HEP 602, and it's now yearly, which I think is great, because it's just weird to have, like, alternating times of the year, or like this, it just seemed, one, really long, and two, kind of weird.

11:03 What do you guys think about this?

11:04 I think this is a good change because it kind of puts everything on a very regular cadence in the year.

11:11 So when you think about when PyCon is happening in the year I guess if you have this sort of 18 month release cycle you're always kind of in a different phase of development and preparing that release.

11:22 But if it's on a 12 month fixed cycle then you can always say "Okay, we're going to get ready to finalize" or "We're in this phase getting ready to a beta version" or whatever during that time, which I think makes planning a lot easier for everyone.

11:35 And yeah, I can understand the rationale for that, going to a 12-month cycle.

11:42 Makes sense to me.

11:43 I'm actually pretty happy to see this.

11:45 I think what I hope to see out of this is just, we'll be able to see new features faster, try them out faster, and you won't have to wait until those official releases come out on that longer cadence.

11:55 I think it's the same with most development environments, unless it's an official release.

12:00 Most people really don't play around with the betas and the alphas as much.

12:04 And so it's only when the official releases come out where you get most of the developers and companies really jumping on new features.

12:10 So I think with this shorter cadence now we should be able to get more feedback and I guess people to be able to iterate faster on some of these new cool things that are coming out in the language.

12:20 Yeah, we don't have to have as much patience.

12:21 We can get right to the cool new features that are coming out.

12:23 Yeah, exactly.

12:24 Yeah, so I'm really excited about this.

12:25 I actually linked not to the official announcement directly but to a Reddit thread because the Reddit thread has a bunch of feedback and it's I would say it's pretty mixed It's like 50/50 positive negative. It's really it's an interesting look and it's just side of what people are thinking Intersected with the weirdo reddit world. So that's that's pretty cool. But my you know that people are saying well, it's gonna be shorter So there's not as much time for testing. So I'm concerned about quality But there was a lot of pressure on that 16th and 17th month to get your feature in because if you don't get it it's a year and a half, you got to wait if you miss that deadline.

12:59 So you're going to scramble, get that in.

13:01 Now it takes the pressure off a little bit.

13:03 So I think it's actually a pretty positive thing.

13:05 Dan, you want to tell us about this next one?

13:07 Another release story?

13:08 - Yeah, sure.

13:09 So I feel like this is the Brett Cannon and Lukasz Lange episode of Python Bytes.

13:15 So yeah, I've got another cool announcement.

13:17 So Black, which is the uncompromising code formatter for Python code, just had a new release.

13:23 So this version is called 1910 beta 0 or B0.

13:28 And the way I understand it or the way I interpret Lukasz's Twitter feed, they're actually getting ready for releasing a stable version or stable release of Black, the first actual stable release for Black Friday this year, which is kind of a beautiful thing how the naming scheme is working out there.

13:47 And so maybe if you're listening, you don't know what Black, the uncompromising code formatter is.

13:53 So it is essentially a tool that enforces a certain Python formatting standard or like a style guide. So it will reformat your code to be PEP 8 compliant and it will reformat your code and it would also call you out on anything that's misformatted or not following the standard. So it's a really great way to establish a consistent code style in a large code base and then put that in place on on a CI system, continuous integration, and it just makes sure that you never have to argue about code formatting in a pull request again, ever again.

14:29 If there's ever a problem, you just run Black again, and it's great. And honestly, it's one of my favorite tools. I put it into every Python codebase that I work with. It's been super stable, even though it is still in beta, technically, but I've been running it in production, if you will, very happily, pretty much since it came out.

14:45 And if you just want to try it out, there's also an interactive playground on web at black.now.sh.

14:51 - That's really cool, I didn't know about that.

14:53 - Yeah, it's pretty cool.

14:53 Like you can just copy and paste a bunch of code there, or just enter code, and it will show you what Black would do to the code, and how it would reformat it.

15:00 And yeah, highly recommend it.

15:02 It's honestly one of my favorite, most favorite tools there.

15:05 - Yeah, super cool.

15:05 It'd be great to have that come out, and be basically totally stable.

15:08 Cecil, do you guys use that on your live stream?

15:10 - I think by default, we use this thing called AutoPep8.

15:14 So when I said by default, we use Visual Studio Code, as you can imagine.

15:17 - Yeah.

15:18 when you save it, auto-formats it, based on if you have that setting turned on or not.

15:23 And if you don't have a formatter installed, it'll ask you at the bottom which one you want to use, and then it'll install one.

15:30 So it's Blacksun option, I think there's one called YAPF, or I'm not quite sure how you pronounce that one, but there's that one.

15:38 - Yet another formatter or something.

15:40 - Right, right, right.

15:41 And then I think the default one that it uses is AutoPep8.

15:44 So if you just click OK, it'll just use AutoPep8, or you could select one of the other options as well.

15:50 But I'm kind of interested to try this out.

15:51 And I want to kind of see, what does the configuration look like?

15:54 And how can you tweak the settings and those types of things?

15:56 - Yeah, cool.

15:57 I think it takes away a lot of the debate.

15:59 My understanding is it's kind of like the Model T.

16:01 You can have it in color as long as you want it in black.

16:05 Right, so there's not a lot of debate about the format.

16:07 It's just like, it does what it does.

16:08 - Exactly, so speaking of formatting options, there's basically none.

16:12 So, which is kind of cool because it prevents any arguments that you otherwise might have with a team about preferences.

16:20 So yeah, it's like a philosophical choice there that you're making with this tool, I guess.

16:24 - Pretty cool.

16:25 Cecil, you also talked, when you talked about Visual Studio Code, you just start by pointing to GitHub repo, and you can like, once you load it up, you can navigate around within Visual Studio Code, right?

16:34 - Yep.

16:34 So I mean, I think everything that we do as developers, like at one point in time, like, touches GitHub.

16:41 Like, I think it's almost impossible today to write code that wasn't on GitHub or touched GitHub or use something that was associated with GitHub at some point.

16:48 If it wasn't for the weekends, imagine the streaks.

16:50 Right? Exactly.

16:52 So GitHub is obviously a super important tool for us, for our industry.

16:56 And they've been releasing tons of cool features over the past couple of months.

17:00 And one of the features I want to highlight today is their code navigation.

17:04 So inside of it, what you could do now is, if you go to their...

17:08 If you click on a file and you go to a code view, you could essentially click on functions and you could see things like, where was it referenced and where the definition of the function was.

17:18 And so you can imagine if I had one super huge code file that I have open and I'm just looking at it in the default browser inside of github.com, it makes it so much easier now for me to jump and see where was that defined and whatever the case is. So now navigation within the browser is super easy.

17:33 That click and go to definition is so cool because otherwise it'll even go cross-file, I think, within a repo. It's pretty killer.

17:39 It's really cool. And not only it supports Python, obviously, but it supports tons of other languages.

17:43 Like, I think it supports Go, it supports JavaScript, Ruby, PHP.

17:48 Again, like there's tons of language support, right?

17:50 But obviously, like we're gonna be a little bit biased and we're gonna, you know, make sure we try out the Python support inside of there.

17:55 - Yeah, that's right.

17:56 We tried it out.

17:57 I even linked to a file where we know that it works from one of my courses.

18:00 So this last one I wanna talk about, it's gonna sound like a joke, but I really mean it as like a legitimate thing.

18:07 I got a joke for you later.

18:09 This thing I wanna highlight is called lul_commits.

18:12 like laugh out loud commits and the subtitle is selfies for software developers.

18:16 So the idea is you install this thing and whenever you do a get commit, it will take the get commit message, it will take a screenshot or take a shot of you with your webcam and then it will generate like a, a meme like in picture with your commit message on there.

18:33 So it will give you like this crazy, you know, like you could make a face, like you're happy or sad.

18:39 Did it work out?

18:39 Did it not?

18:40 Why are you, are you fixing a bug?

18:41 Is it a fun new feature?

18:42 And so you can do this really cool, like sort of meme looking picture here.

18:46 And then you can get plugins for like Slack and Twitter and stuff.

18:49 And you'd like you to like post these pictures back up to like say your team Slack.

18:53 So someone not just knows there's a commit, but they can see how you felt about it.

18:56 They can see the message.

18:58 What do you guys think about this?

18:59 - I don't know how I'd never heard about this until you mentioned it.

19:02 But this is like the coolest thing ever.

19:04 This is gonna make like committing codes so much fun.

19:06 - I know, I'm gonna pay so much attention to the get commit message now.

19:09 - You're just gonna be committing like all day, every day.

19:11 I'm like, I gotta get this committed.

19:12 I gotta get this committed.

19:14 But I think this is super cool, man.

19:15 I definitely want to try this out.

19:16 - Yeah, it looks pretty fun.

19:17 It's very understated.

19:19 It describes itself as being the single most useful piece of software known to mankind and stuff.

19:27 But in all seriousness, it's fun.

19:29 It talks about a Lul repository where you commit these or you can create animated GIFs of your commits over time and all sorts of weirdness.

19:36 So it's pretty fun.

19:37 I just thought maybe this will make working in teams a little more fun.

19:41 Dan, what do you think?

19:42 - I think this is awesome.

19:43 Like just looking at the website there, apparently you can have little, you can write your own plugins or there's different filter options so you can get like a unique style for your commits.

19:52 I'm wondering if, you know, how frustrating this could be if you're accidentally maybe lull committing something where, I don't know, you know, you're waking up in the middle of the night and just got to get some code out and maybe sitting there not really dressed yet or whatever.

20:04 But that's part of the fun, I guess.

20:07 Okay, I'm not going to go into details of how I like to work, but.

20:10 (laughing)

20:12 - Awesome. - This is great, yeah.

20:13 - Yeah, yeah, it's pretty funny.

20:14 But yeah, it seems like it actually could foster a little bit of team humor, but also connection, rather than just a dull commit log.

20:20 So it looks fun.

20:21 That's it for our main items.

20:23 Dan, anything else you wanna just throw out there quick?

20:24 - I would love to, you know, speaking of the latest release of Python 3.8, which just happened two weeks ago, I think.

20:31 So at RealPython, we've just released an article highlighting all the new features in Python 3.8 and kind of going over all the nice and interesting features that are in there like the walrus assignment expressions and also stuff like the syntax warning that's going to, you know, it's a new type of warning that's going to tell you about maybe some cases where you're using the is comparison instead of the double equals sign and stuff like that where previously you would need a linter to highlight that now actually Python is going to call you out on that stuff which is pretty cool and yeah that's something we just published on RealPython, Geron and Hjelle did a fantastic job there and I found that personally also very helpful just getting up to speed with the latest changes.

21:08 - Awesome, your articles are great.

21:09 Bookacles, like we gotta give them like a proper name.

21:12 They're a little bit longer than ours.

21:13 - A bookacle, yeah, I like that.

21:15 - Yeah, the course too.

21:16 That's great, so very nice there.

21:18 Cecil, anything for you?

21:19 What are you up to these days?

21:20 - Sure, I definitely wanna call out the weekly stream that we do.

21:23 Me and my buddy, Brian Clark, do a very introductory learning Python stream every Wednesday.

21:29 It's at 11 a.m. Eastern Standard Time.

21:31 And essentially, we've just been going from the very bare bones all the way up to covering different features of Python and things like, you know, what's a function and what's a for loop and like, you know, some of those types of things.

21:43 Again, we just try to be very beginner friendly, try to be just open to everyone.

21:47 But it's a really fun time, right?

21:48 Because it's not just me and Brian, like going back and forth, talking to each other about Python, but we get tons of questions from the community, tons of questions from folks inside of the stream.

21:57 - Yeah, it's super interactive, like way more than even webcasts or something like that.

22:00 It's really cool.

22:01 - Yeah, super interactive.

22:02 You know, it's really cool when they ask a question like, "Hey, what if I change this to this thing?" Or, "What if I remove this line?" Or, "What if we try to do things a different way?" You know, we can do all of that on stream, it gets recorded, and then now not only are they learning from us teaching them, but we're also learning too because now there's just all of these different perspectives and scenarios that we're trying out live.

22:21 - Have you heard about this library?

22:23 It does it all together or whatever.

22:24 - Yeah, exactly, exactly.

22:24 - Awesome, yeah, so I'll definitely throw a link to that in the show notes.

22:27 All right, last for me, the Python Software Foundation yearly survey is out.

22:32 So this is the biggest survey that gives us a look inside the trends and it's in partnership probably with JetBrains.

22:37 It was last year.

22:38 I don't know if it is this year, but I'm guessing that's the case.

22:40 And, they just do a super good analysis and yeah, please go fill it out because it lets us know, you know, what the world's up to.

22:49 We already did ours.

22:51 So it's your turn now.

22:52 Be sure to get, get to that.

22:53 And also I want to announce a new course on Anvil.

22:56 I don't know if you all are familiar with Anvil.

22:57 Anvil is a web framework, but it's not like Flask or Django.

23:01 You know, some people think, should I do Anvil?

23:02 Should I do a flask?

23:03 Django, this is really different.

23:04 Like if you've ever tried to build web apps and you're like, I don't want to do JavaScript.

23:08 CSS is like a nightmare.

23:10 I don't really want to work with databases.

23:12 All this deployment is a challenge, like all that kind of stuff.

23:15 You're like, I just want to do Python.

23:16 Maybe for like an internal app or something cool like that for your company.

23:19 This is a framework that will like run in the cloud.

23:23 It will let you write server side Python code, design the UI with a drag and drop like widget-y type thing, very much like ASP.NET Web Forms, that's all actually way back in the day.

23:33 And the big deal is the front end runs Python in the browser super well.

23:39 It is ridiculously cool.

23:41 You build a SPA, a single page app, in Python, which is actually kind of a dream.

23:45 So check it out at talkpython.fm/anvil.

23:48 The course is free, you can play around with it.

23:50 I thought I'd just put this one out here for people to get exposure to the courses.

23:53 - That actually sounds pretty cool.

23:54 Do you know if it's doing like a web assembly thing, or is it like translating Python to--

23:57 I had a Meredith, the guy behind the show and another guy on the show.

24:02 And I'm so sorry, I forgot his name on to talk Python to talk about sculpt.

24:05 They're using sculpt, which is a JavaScript implementation of the interpreter.

24:09 So it doesn't compile it to JavaScript.

24:11 It has like a JavaScript run time.

24:13 That is like CPython, I believe, but it's not using web assembly.

24:17 The reason it's not using web assembly is the interaction between the dom and web assembly is actually very slow.

24:23 And this is like a super chatty communication between the.

24:26 the Python bits and the web UI, and it's actually slower in WebAssembly until they can improve that cross WebAssembly DOM story.

24:34 - Got it. Okay.

24:35 - But it's primed for a good WebAssembly story, isn't it?

24:37 - It kind of feels like that's what it would be.

24:39 - It should be.

24:40 - But I guess I completely understand, right?

24:41 Because you'd go from Python to JavaScript, and then JavaScript to WebAssembly.

24:46 - To WebAssembly, yeah.

24:47 - There's this whole interpreter on top of an interpreter on top of an interpreter thing that's going on.

24:51 - Yeah, yeah.

24:52 And so if you have a fire and forget, something happens in WebAssembly, it's fast and good.

24:55 If you're doing super quick back and forth between the DOM, apparently that's slow.

24:58 Alright, so last thing, time for a joke.

25:01 Now I told you my lul commits was legit.

25:04 I got another lul for you, lulcode.

25:07 So lulcode is this official language specification.

25:11 Last time I checked it was on level 2.

25:13 1.2 was...

25:14 No, no, hold on, I think it's at a different level now.

25:17 Anyway, it's an official language based on lulcode.

25:21 So this meme is passing a little bit in time, but you know, there's like the lolcats with all the weird like cat speak on the images with like a funny cat like hi world with HAI world, you know, and like weird stuff.

25:34 So this is like a programming language derived out of that.

25:36 And it's a joke, but you can literally run it like there's a commands for getting started.

25:41 You get clone the repository, you see make it and then you're ready to lolcat it, lolcode it.

25:48 So I just want to call out a few things of the language features here because they're pretty incredible. Yeah, we're on the spec 1.2 right now for the language.

25:54 So if you have a, like a comment, you'd have something like I has a VAR.

25:58 And then if you want to have a comment, you say BTW, by the way, VAR is null and untyped, things like that.

26:04 It has some really funny like error handling.

26:08 So you have a try catch, but you don't say try and catch you.

26:10 You like do the good parties.

26:12 And then the good part is awesome.

26:14 Thanks.

26:15 And then the, the, the catch part or the accept part is no.

26:19 Oh no.

26:20 Let's see, the if statements are pretty awesome, like, "Oh really?" "Yeah, really." And then else if is "Maybe." And then the else is "No way." But the best, I think, really has got to be the switch statement.

26:35 So, maybe a little not safe at work, but it's just letters, so I'll just say them out.

26:40 If you want to do a switch statement where maybe you have R or Y or G or B as colors, like as strings, you could say color WTF question mark, oh my god, quote R, and then you have your block, oh my god, quote Y, you have your block of code, and then the default case is OMGWTF, that's the default in this way.

27:00 So this is just such a crazy language, but the thing that's even more crazy is somebody built an interpreter or a compiler for it.

27:06 - I think what's even crazier is that there's a spec here, and as we're looking at this spec, we're literally like scrolling and scrolling and scrolling.

27:13 Like there is 507 lines of specification here that defines how this language even works.

27:19 I think I got to try this out, man.

27:20 Like this is crazy.

27:21 It's a joke, but you could-- it's probably Turing complete as well.

27:24 Yeah, apparently this got started in 2007, and it's the latest update to the spec is from 2014.

27:31 So it's super cool that this has been maintained and updated since then.

27:35 How about that? A practical joke for you all.

27:37 Yeah. Is there a just-in-time compiler for that?

27:39 Oh, yeah. I don't know.

27:40 I actually don't even know what the performance looks for a LOL code, but it's probably pretty funny.

27:45 - Are you gonna port talkpython.fm to that, the LOL code?

27:49 - Yeah, I'm thinking about rewriting the websites, and this is a real strong contender right now.

27:53 - Nice, nice.

27:53 - 'Cause I'd just be laughing every day.

27:55 Like, it's a bug, but it's hilarious, look at it.

27:57 All right, guys, well, thank you so much for being on the show.

27:59 It's been really good to have you both here.

28:00 - It's been great, thank you.

28:01 - Yeah, thank you, man, this has been awesome.

28:02 - Yeah, bye, guys.

28:03 Thank you for listening to Python Bytes.

28:05 Follow the show on Twitter via @pythonbytes.

28:07 that's Python Bytes as in B-Y-T-E-S.

28:10 And get the full show notes at PythonBytes.fm.

28:14 If you have a news item you want featured, just visit PythonBytes.fm and send it our way.

28:18 We're always on the lookout for sharing something cool.

28:20 On behalf of myself and Brian Okken, this is Michael Kennedy.

28:24 Thank you for listening and sharing this podcast with your friends and colleagues.

Back to show page