Python Bytes - #257 Python Launcher - Launching Python Everywhere
Episode Date: November 4, 2021Topics covered in this episode: Django 4.0 beta 1 released * py - The Python launcher* Model bakery Coverage goals, goals.py Extras Joke See the full show notes for this episode on the website a...t pythonbytes.fm/257
Transcript
Discussion (0)
Hello and welcome to Python Bytes, where we deliver Python news and headlines directly to your earbuds.
This is episode 257, recorded November 3rd, 2021.
Hey, it's November. Cool. I'm Brian Ocken.
I'm Michael Kennedy.
I'm Morley Sacarbo.
Well, welcome, Morley.
We haven't even really met other than a few seconds ago, so can you tell us who you are?
Yeah, my name is Morley Sacarbo, and I met Michael Kennedy a couple of weeks ago
at a Pi Bay event in San Francisco.
A fantastic Pi Bay event.
For people who cannot see it,
they should go to pibay.com and just see the graphics.
This is the conference outside at a food cart area.
So awesome, so great to see you there.
Right, and so I help Grace Law organize that event.
She and I have been working over the past couple of years and it's a fantastic community.
And I've been in San Francisco for the past three years.
And I'm actually, I work for the Defense Department.
And I do, I lead a software development team and we work on optimizing software processes.
And on the weekends i'm a
commercial pilot so i do fly and i do teach uh student pilots so that's generally speaking who
i am that's so awesome that's cool oh my side job is a professional pilot yeah including jets right
yeah i do fly a corporate jets that sounds so. I think that's so neat.
You know, it's good to get away from the keyboard
and the offices,
especially when
with COVID happening
and everything's harder
to get out around.
Like, you really get away.
You get up in the sky.
I do get away.
But you got to be careful, right?
Because you're going across
different ecosystem, right?
So you got to make sure
that you're well protected,
that you take in
all the precautions that are required to not get sick.
But it's an adventure.
I do like to get around sometimes.
Awesome.
And Teddy out in the live stream says,
you invited James Bond, I think.
I think we may have, actually.
Yeah.
Where do you park your Austin Martin?
No, seriously, let's kick this off, Brian.
With something also, Morley,
you also are involved with Django stuff, right?
In San Francisco?
Yes, just a little bit.
By the way, first off, I do want to say thank you very much, Michael.
So many years ago, I was overseas and I was in Qatar at a time and I got started learning
how to code.
And Python was the language that was, at least from my perspective, you know, something I can use in my data science perspective.
And working with you through TalkPython to me was extremely helpful for me, learning how to code, just being with the community.
And I think that was extremely helpful.
It's gotten me in different places only because I learned and started to learn how to code and got involved with your podcast many years ago.
So thank you for that.
That's amazing.
Thank you so much.
It means a lot.
And it's easy to forget.
Brian and I just sit here at our desk and chat about stuff.
But it really helps connect people, especially if they're new or they're coming from places where there's not a big community they can drop into.
It helps people get more integrated
quicker and i think that's yeah and it's it's just the way you guys talk right i mean it's just
you're talking to me as opposed to talking to an audience or you know a group of large you know
you know crowd or something like that so you know i'm listening to a podcast and i'm going
this is relatable and i can actually go out and in out and do a little bit more research on a package
on a topic that you guys are talking about.
So it's really good.
Yeah.
Nice.
Yeah, fantastic.
Speaking of packages, let's talk about Django.
Yeah, let's start with Django here.
So I don't do that much Django.
I do more on the micro framework side of things,
but Django is super important.
And when cool stuff happens there,
I want to make sure to give it a shout out.
So we're Django 4.
I mean, in beta, but still Django 4.
Morley, have you been tracking this?
Are you excited about this?
I am tracking it.
I'm excited about it.
Yep, absolutely.
Yep.
Yeah, super cool.
So Django 4.0 beta one was released.
I feel like it was Django 1 for a really long time
and then Django 2 and then, you know,
blow the doors off. We're going 3, 4,
5, 6. We're going to be at Django 20 soon
enough. But this is really good news.
The beta 1
so it means feature-free, bug fixes
only type of thing is out. And if
you're interested in this, you can
try it out now. Notable
changes here for
what's coming along. First of all, it's only
compatible with Python 3.8 and beyond, which is pretty fantastic. And if you want older support,
as in all the way back to 3.6, you got to go back to Django 3 series, 3.2. So I think that's
pretty interesting as well, the rapid adoption of new Python, right? This is like two years
of Python and not more. So things that
are new, there's stuff about time zones, which I'm not going to bore you with, but database stuff is
cool, right? One of the things that I think Django is really renowned for is its web front end plus
database integration, right? Wouldn't you say so, Morley? Yes, absolutely. Yeah. Yeah. Yeah. I think
it's the, not just the, well, you have an ORM that's built in, but you've got
the admin sections that know about the models and all kinds of stuff.
We're actually going to come back to that as well later in this episode.
But one of the new things is functional unique constraints.
So like I can only insert this record if there's not already one that matches, say the email
address for a user.
So now what you can do is you can create functionally unique constraints with expressions and database functions.
So for example, you could have an index, which is a unique constraint where you have the
lowercase of the first name, the lowercase of the second name, ascending, I guess, for
the index bit, but that doesn't really matter for the constraint. And then you can give it a name like first name, last name must be unique
constraint. And so that's pretty awesome, right? You can say, I can't have two users with the same
name. I'm not sure how practical that is, but you know, as an example, it makes good sense.
Yeah. Poor Joe Smith or Michael Kennedy for that matter, like probably gonna not make it in after a couple of hundred thousand users.
Let's see, they have the script password hasher.
So you do not,
hopefully you are not storing raw passwords.
Every time I see a website that says,
your password cannot be more than eight characters.
I'm like, that had better not be a varchar eight field.
I don't know what you're doing,
but I'm starting to get really worried
because the size of the output of a hash
is always the same size regardless of the input.
Anyway, so new password hasher that's more secure and recommended over what was previously the default of PBKDF2, right?
It's, however, not the default because you have to now install OpenSSL 1.0 or above, which is not super high, but it's still not super new version. All right.
Then Redis, there's now a dedicated built-in Redis cache as the caching tier.
So you can set up caching in Django and say cache here.
Now one of the options is Redis.
Yes, you could do that previously, but now it's like a built-in thing.
So you don't have to do that outside of.
That's cool.
Yeah, that's cool, right?
That's very cool.
Yeah.
And then template-based form rendering.
So enhanced customization of forms, form sets, errors list, and so on using the template engine.
So pretty cool.
Not a huge bunch of changes, but they all sound really nice.
Yeah, the support of which Python versions is pretty big.
But I mean, come on, people.
It's an application.
You can pick your whatever
python version you want so yeah that's right out there in the live stream alvaro hey says i guess
that dropping versions helps to reduce the number of wheels to build and also to test right probably
so ci is probably faster you can take advantage of some of the newer things and just count on
them being there which is great yeah also speaking of Also, speaking of versions, Sam Morley.
Hey, Sam.
Great to see you again.
Says getting my boss to agree to drop Python 3.4 was a task.
That's been a while since 3.4 is out.
I actually remember, I think, where I was.
I was out in Redlands, California.
That came out, which is pretty interesting.
Anyway, don't know why that came to my mind.
Is this stuff exciting to you, Morley? Someone
does more Django than probably Brian or me?
No, it's very exciting to me.
Just being able to see just the iterations
of Django is very,
very helpful to the community.
I started with Django 3, so
this few iterations
have been very helpful, especially Redis.
Absolutely. Yeah, the Redis is exciting.
Yeah, for sure. Brian?
Well, I have to apologize.
I don't remember who pushed us this way,
but somebody on Twitter said,
hey, you guys should maybe talk about Py once in a while,
like just Py itself, the P-Y, the application.
So Py or Py.exe, it's the Python launcher.
This has been bundled with Python 3.3 uh so it's been there for a while but i've kind to be honest i've been kind of ignored it because it's a windows only
thing and i work in multiple i do work on windows but i also work in mac and linux and multiple
environments so i really don't want to change my workflow just for one so but the idea is um
is that you just type
PI and it picks the latest version that you have installed on your system. Um, it's kind of neat,
but, um, I don't, I didn't really get the, get the feel for it, but then, uh, but then Brett
Cannon wrote this thing called PI launcher. That is the same thing. Um, but it works on
Mac and it works on Linux and it works on a bunch of other stuff like Arch Linux and really anything that Rust can run on.
I think it works on, which is like almost everything.
So this is pretty, this is pretty neat.
But why is it neat?
So I'm like, still, why did Brett spend time making this work?
And so I started changing my workflow for this.
And I got to say, it's kind of life changing.
The big thing is I don't have to care where Python's installed anymore.
So I have this set up on my Mac.
I've got it set up on, I included it in the install on Windows.
And then you just say, like, for instance you can say pi dash dash list and you
get like all of the so i don't have the example here you get all of the the versions listed out
and um and it lists it tells you where they are too but you don't really have to care um and in
the pi launcher version on linux or mac it shows the paths right away on the windows version you
have to say list paths,
but it's still pretty easy if you want to know where they are. But basically, you don't have to
care where things are anymore. So I also don't have to care where they are in the path, like
in my path variable. So the Python version I want, is it the first one, the second one? Did I install
something and mess it up? Like if I install Python 3.10,
but I also want to test on 3.6, so I installed 3.6 later, where does that show up in the path?
I don't have to care anymore because my workflow is mostly around virtual environments. So I say
like Python-mvnv, and I create a virtual environment, and I create it with the most
recent Python version,
no matter where they are in the path where they're located. And then if I want to test like a three,
something on three, eight or three, nine, I can either, I can just type a pie dash 3.8 or 3.9.
And then it just automatically runs that version. So I can run a script in Python three, eight
easily like that, or I can run it with, um, I can run a script in Python 3.8 easily like that,
or I can run it with, I can create a virtual environment, a 3.8 virtual environment really easily. And then I still don't, basically, I don't have to care where things are installed anymore.
And I love that. So yeah, the other thing that I really like, sorry, if I missed you
hearing you say this is once you create the virtual environment subsequent calls to pi
will use that environment long as you're either in that directory or in a subdirectory of other
so you don't have to activate the virtual environment like long as traversing up the
the hierarchy hits a dot v v e and v directories like okay that's the that's the most appropriate
python does it work that way? That's what it says.
Like, see the code sample right there?
Look right underneath the, what's the next paragraph, right?
It says, subsequent uses of Py will then use that virtual environment as long as it is the current or higher directory.
No environment activation required.
That's pretty cool.
Yeah. That's very cool.
That's very cool.
Yeah, it's so nice.
Because that way you can set up your file system.
You don't have to remember to activate it like certainly not common but it is not also uncommon that i'm like pip install this oh it
went to the wrong place you know what i mean yeah configuration is extremely important right so this
is this is very good yeah very good yeah yeah and zdocs on the live stream hey says what's the main
difference uh from this to PyEMV?
I think that that's one of them, right?
PyEMV, you've got to do PyEMV run.
You've got to like start the shell.
And it's kind of, and I think this one is sort of,
it's more like node packages or node modules.
Like as long as it finds something there,
like, okay, that's the project I'm in.
Let's run.
Yeah, and PyEMV does these shim things
to change which you can set up,
which one you find.
And it makes it weird to me.
It makes my system have state that I have to remember what I did.
Yeah, yeah, yeah.
I've activated Python 3.7, so now it stays that way until you change it, right?
So anyway, this has changed my life for the better, and it's great.
So thanks, Brett. And now I for the better and it's great. So thanks, Brett.
And now I use it on Windows too.
Fantastic.
All right.
Up next.
Oh, I almost closed what you're talking about, Marley.
Yeah, you're on the data science side of the world right now.
So bring us some data science news.
No, this is good, right?
So this is the State of AI Report 2021.
It's a pretty extensive report.
It comes out every year, just surveying across the world, really,
just the trends on data science.
And so at the very top there, it has the actual report.
It's a PowerPoint version.
But in this report, it highlights just the need for transformers being used not just for nlp
right so for you know looking at text but it's also looking at um uh audio it's also looking at
video and it's also looking at like you know protein transcription for example so it's um
transformers are going beyond um what they were intended to be, which was just primarily just NLP.
Right.
Yeah.
Give us a quick definition of a transformer.
This is, like you say, out of the natural language processing side of ML, right?
Right.
So it's basically a sequence to sequence.
It's taking text from, say, English and converting it into an equivalent text into French or
something else, right? So having a natural language processor transformer that can do that in a
rather efficient basis is the whole idea of transformer space. So it's basically taken again tokens or this sequence from one
language to another language.
And so what this is saying now is that it isn't just constrained to just NLP, right?
So now you can use it for looking at the language, looking at the language, looking at the language, looking at the language, looking at the to another language. And so what this is saying now is that it isn't just
constrained to just NLP, right?
So now you can use it for looking at large data sets
that are audio or large data sets that are imagery
and then converting that into something
that you intended to do.
So you're sticking those models,
transfer learning essentially,
taking the transfer learning from one model into another set of models.
That's essentially what this is talking.
The idea here is that you're moving away from just NLP that you use in it for
computer vision, as it says on there, and even protein structure prediction.
This is important to me because I actually, Michael, I don't know if
we're still in here early, I spent some time in Qatar and I was, I
was studying Arabic there, right?
So we would spend like hours just, just going through like that
transcription, um, uh, data sets and stuff.
So now, you know, having a transformer that can actually do that faster and
maybe more accurate than, um, and in the past, I think it's extremely helpful for
somebody like, and, uh, uh, the hogging phase transformer from a Python perspective, it's an extremely popular,
um, package on, um, GitHub and that most people it's, it's got about 53,000
likes at this point or stars at this point.
Wow.
That's, that's comparable to Django and flask level of popularity.
Yes, yes, yes.
And, uh, they formed partnership with AWS. And so now you can
spin up resources on AWS to use Huggins-based transformers. And again, those transformers
have models that you can use for transcription. You can use them for a vision, a computer vision,
or even like it's saying here for protein structure predictions. Yeah, cool. I'm very excited about what ML can do
for medicine and biology research.
I think, you know, machine learning
and like recommendation engines
and all sorts of stuff have good sides
and bad sides and all kinds of things.
But on the medical side,
it seems like it's mostly good, right?
If you could say, actually,
we can cure this disease
because we understand how to create something that will bind to this protein because now we know its actual shape.
Yeah. That's great. That's incredible, right? So predicting those shapes for
protein is extremely important. I studied chemistry in college and a little bit of
biochemistry when I was in college. And knowing the structures for proteins is extremely important,
but it takes a long time to model those structures, right?
Now you can do it pretty easily on Asian transformers.
It's a good thing.
Yeah, there's probably less well-known ways
around more like physical chemistry as well, right?
Like trying to understand different kinds of batteries
and things like that potentially,
you know, don't get all the press.
Well, I'm thinking that maybe we're not too terribly far away
from universal translators in AirPods. That would the press. Well, I'm, I'm thinking that maybe we're not too terribly far away from universal
translators and in AirPods.
That would be cool.
Yes.
Yeah.
That would be actually pretty amazing.
I mean, we're pretty close with Google translate.
You can speak to it and then show it to someone in their language and then they can, I can
think you can even make it read back and like you can really clumsily do it, but what you're
envisioning is just like natural conversation, right?
Yeah.
Yeah. And have it be in their voice too. Yeah. That's pretty cool. really clumsily do it but what you're envisioning is just like natural conversation right yeah yeah
and have it be in their voice too um yeah that's pretty cool that's pretty cool you know you got
to wait five seconds for it to calculate a deep fake then you can start talking well now but like
our kids are going to be like using these things probably yeah i know i think you're totally right
there absolutely awesome yeah yeah good pick there. Great. Before we thank our sponsor,
I want to just give a quick shout out
to John Sheehan's comment here
that Python Launcher,
the Py thing that Brian spoke about,
looks like a nice package
and a better alternative to the Py alias
I created on my Linux laptop.
Oh man, you and me both,
my ZSHRC is full of alias this, alias, that many of them starting with P to do something
with Python.
Yeah.
I mean, I, I used to list like, like makeup aliases for PI three, eight, PI three, nine,
just to, and then I couldn't remember if I had a dot in it or not.
Was it 3.8?
Yeah.
Anyway.
Yep.
Yep.
Cool.
All right.
Before we move on though, I do want to tell you about our sponsor shortcut.
Thank you. Shortcut formerlyhouse, for sponsoring the show. Check them out at shortcut.com slash pythonbytes. Or Brian, do you know what else that people can do now?
What? or link right here in your podcast player or in the podcast show notes. So that's pretty awesome. But however you get to them, thank you to Shortcut for sponsoring this episode. They've built simple
project management tools that grow with your engineering team and don't get too complex,
but are not too simplistic. So some of the highlights include team-based workflows. So
individual teams can use Shortcut's default workflows, or they can customize them. Organizational-wide goals and roadmaps let
like the overall organization define workflows and then tie these smaller team ones into the
larger workflow and kind of get a big organization-wide view. VCS, version control integration.
So it works with GitHub, GitLab, and Bitbucket, and it can tie them,
tie your items in your project management back over into what's happening there. And you can
even do that from the command line, which is cool. As almost all web apps should have, but many don't,
Shortcut has a bunch of keyboards, so you can use their power bar and use hotkeys all over their web app to just zoom around.
Because someone like Brian, who would rather be in Vim mode and not take his hands off the keyboard, can cruise around.
It does iteration planning and will automatically schedule how that should go along if you don't want to customize it.
So give it a try over at shortcut.com slash Pythonbytes because you shouldn't have to manage your project
management so yeah thank you to shortcut for sponsoring the show now let's go back to django
and i'm going to tie this together so morley has a background in django brian you have
clearly a bunch of testing so let's talk about testing django models okay okay yeah so one of
the problems you might need to do in your test is you
are going to create some data models and then you want to do stuff with them, right? You want to
pass them off to a function or whatever. And so that can be a bit of a hassle. So I want to tell
you about model bakery, which are smart fixtures for better parentheses Django tests. That's not
quite there, but for better tests for Django code. So the idea is
it's like Faker or Mockaroo or something like that, but for Django Aura models. And it specifically
understands things like relationships and whatnot. So pretty cool. You can come over here and do
things like you've got your Django model defined as it does right derives from models has fields which are
columns like email fields character field and so on and then when you want to use it you just go
to the baker and say make a you know in this case it's um like a shop like online e-commerce shop
so you say shop.purchase history is the namespace of the class and then guess what it'll populate
it with customers and emails and all
kinds of stuff. That's cool, right? Yeah, it is. It's very cool. Yeah. And then you could also set
up model to model relationships. So you can say, I want you to, when I create a purchase history,
for example, it also has a products. So you can say, make the model to model relationships for me
and mock those out as well. So then in your test you can work with uh your purchase history object and say dot products and then you know loop over them
do count whatever right it's like a collection of sub or related models that were baked up for you
yeah you can even go and say prepare when prepare something to bake when uh when you ask somebody
gives you a product i want you to uh or create
me a product of five of these and then as you make a purchase history also use those five as
the related object instead of guessing or randomizing or whatever it's cool right that's
very cool very cool yeah so if you're out there writing tests for django specifically the
relationships i think is where this is is pretty interesting. But it's kind of interesting all over, right?
I suspect it'll do things like create emails if the model says, here's an email field,
and it'll create integers if it says, here's an integer field, and just take care of that
for you.
That's very cool.
So is it another fake system, or is it using Faker or something under the hood?
Do you know?
Now, that is a good question what kind of project uh i could go find out i guess no no no like all right so let's
go check out the requirements here it's just django it has its only requirement is django
django wow it doesn't use like um baker or anything like that so i'm guessing it's its
own thing nice i seem like it yeah cool guessing it's its own thing. Nice.
I seem like it.
Yeah.
Cool.
It's very cool.
Yeah.
Thanks.
All right,
Brian,
you going to cover this next one for us or what?
Yeah,
I'll cover this one.
That's one of my goals.
So good.
Come back.
So Ned Batchelder is the maintainer for coverage.pi excellent tool and he's a great
person to have at the helm there uh but he um he's says that he's got uh had requests for like
one of the things you can do with coverage is you can incorporate it in your um your testing tool
chain and ci and stuff to say the coverage has to be at a certain level. So you can say it has to be a hundred percent if you want to do that, or you can say, well, at least what,
what is the current percentage? And we want to make sure that we don't drop it. So you like,
let's say you're at 75. You want to make sure that we don't drop below 75, but he's had requests for
profile thresholds, which is an interesting idea. But instead of giving us profile thresholds,
he's got like this proof of concept thing
called goals.py.
And it's just a snippet
that you can download yourself
and try it out.
But it's a little tiny script,
but it uses the coverage data
after the fact.
So coverage generates a report
and then you can do things on it.
But what this goals thing does is it kind of acts like another stage. So you can do things on it. But this, what this goals thing does
is it kind of acts like another stage. So you can, you can set up these in your pipeline to,
to check for these. And if, and it'll have a exit code that indicates to your CI system that it
failed. But for instance, you can say all of the, I want all my tests to be a hundred percent
covered, but my source code maybe 85% for those. And, but like maybe the HTML part of it,
I want to really want, or like all the code that is dealing with HTML that I want to make sure
that it's really tested. So I want 100% coverage there, but in general, you can 90%. So he has an
example set up to do just what I said of that that so there's these glob groups that you can say
you know the 85 for everything that's a python file except for the tests and then have a different
interesting test so the way you basically do is a cli thing and then you pass in yeah file patterns
like star.py or star HTML star.py or whatever.
Right.
And you can even do knots, which is interesting.
Yeah.
And one of the things he's talking about is just, he wants to,
wants to have people try this and say, is this kind of,
does this satisfy what you wanted or is there something else that's needed?
Do we really need profile?
I actually would hate to have profile.
Yeah. Yeah.
One quick way to like accomplish profile is just to put the file name as the pattern.
Right.
I mean, so it's like, this is a superset of profile testing.
Yeah.
Potentially.
But I, I believe that he's probably right that there's, um, and there's a link in here
to say, if you want to comment on this, go to the original feature request and do a comment,
but there, um, it's probably right that right that it's not really a profile thing.
It's that there's different sections of the system
that you want to have specifics.
Or like, for instance, with the not,
you could say, well, everything except for,
there's this one file that I know it's a problem,
but we don't care about it.
Maybe exclude that.
The developer who wrote it quit.
Nobody understands it.
We're not touching it.
Please don't complain to us about it. We have intention of touching it or maybe it's the splash screen
like you know some things throw up a splash image and you know really if that's wrong who cares
sort of thing but that's very cool yeah it's a good one nice find and i like the generalization
of it well done ned all right more like so there's a lot of stuff about economic news these days.
Yeah.
Especially DeFi and Ethereum and Bitcoin.
And NFTs, right?
So it's already out there.
Yeah.
My brother is an artist and worked for a long time doing just like insurance stuff and project management stuff.
And has now started getting into NFT stuff because finally putting his uh master's degree in art to use which is
fantastic yeah yeah it's it's a crazy world it's a crazy world and just the thought about like um
making digital assets involving digital scarcity right like the thing that's digital was you could
copy right right right right and and over the past i, I've been looking at this over the past six months or so, and I'm just curious.
I'm just, you know, where does this go in terms of like, how can you use digital assets as scarcity, but, you know, provide value eventually?
So artists can actually, you know, get paid or make use of their art, make it available out there
and get value from it.
So Ethereum, though,
is like one of those blockchains
that pretty much, I think about,
I want to say 80 to 90% of all NFTs
reside on Ethereum blockchain.
I think so, yeah.
I think it's definitely popular.
Yeah, and so, of course,
the language there is Solidity.
But to interface with,
um, the blockchain, there's this library called web3.py, right?
So instead of, instead of using, uh, JavaScript, uh, you can use, uh,
web, web3.py to actually interface with Ethereum blockchain.
So basically you can write smart contracts there, but you can also, um,
uh, get information from
the blockchain itself or post information into the blockchain.
So this is something I've found and I'm actually looking into it and I thought I want to share
that with the community.
Yeah, it's interesting.
Yeah.
So there's Ethereum.org slash Python for Python tutorials.
There's a quick start and so on.
Yeah.
Right. If you were allowed you can see uh what it takes
to actually get it installed and and use it for um some of the protocols that are required so it's
actually pretty good um i've used it just a couple of times i'm still playing around with it but i
think it's a instead of using something else if you're familiar with python uh this is a very
comfortable transition if you're curious about blockchain or Ethereum. So you could build your own platforms and your own integrations, not just own Ethereum coins.
Right. And so you can build your own smart contract, right? We should just logic,
essentially send ether or receive ether or if it's NFTs, again, how do you interface with the
blockchain with cryptography? So web3.py, I think, is extremely helpful.
Yeah, it's neat to see Python applied in so many different places.
Yep.
Everywhere.
Everywhere, right?
Yep.
Cool.
All right.
Awesome.
Yeah, that's a great find.
Pretty cool.
Yeah, pretty cool.
Brian, it's time for extras.
Extra, extra.
What you got for us? What
do you line up for us here? I actually don't have any extras today. No extra? There's no extra,
extra, extra read all about it? No. All right. I'll take care of it. I got you covered here,
as you might imagine. So I want to give people an update on McFly. I mentioned McFly a little
while ago. McFly is sweet. It allows you to install it and it's kind of like
reverse search of your shell commands, be that bash, zshell, phish, whatever, but way better,
right? You get like an Emacs interface to your history and you can delete it. You can edit your
history. So if you mistype something and you want to save it or you see like, oh, geez, put the
password in there. I want to get that out of my history file you can do that so you just hit ctrl r after you
install it and it gives you this this awesome interactive view uh i just want to tell people
that i've been playing with this and totally loving it like now i've taken it for a spin for
a while and i really really dig it i've even set up the uh fuzzy matching so it doesn't have to
exactly match what i've done in history which which is pretty cool. So I could now, with some experience, give that a thumbs up.
Nice. Nice. Nice.
Also, a couple of exciting things about Python Web Conference. If you're looking to speak somewhere
and you want that somewhere to be on the internet, you should check out Python Web Conf.
This is like a five-day conference. It's one of the biggest virtual conferences going these days, I think.
And it's interactive presentations or live presentations over the internet and then chat and so on.
So we've had Calvin, one of the organizers of it, on before.
And the news is they've extended their call for papers out to November 15th.
So you got 12 more days,
maybe 11 if I'm slow releasing this one.
And also I'm going to be talking about Flask and HTMX
over there because I'm still psyched about that.
So that's next year, early next year,
but people can check that out.
Nice.
All right.
What else have I got for us, Brian?
So the new MacBook Pros,
like the super expensive MacBook Pros have come out.
There's an interesting review.
I'm not super thrilled with it,
but over at ours, they usually do a pretty good job.
But I do want to read a fun quote from it.
And they say,
rest assured if you didn't like the direction
that Apple has been taking with the MacBook Pro
for the last five years,
this laptop feels like an explicit apology for all that.
The result is it's the best laptop money you can buy
for many use cases,
provided you have a lot of money. But one of the things that i found pretty interesting is the power supply for that
thing is 140 watts oh wow that's insane for a laptop that you carry around the power supply
wow so i came across this thing called anchor nano 2 65 watt and it's it's uh if you put it up next to uh that's not it's it's well hold on it's
barely bigger than the brick that used to charge an iphone like an american brick not a uk brick
which has got to be giant because the size of the plug right but it's like super small and light
and yeah it seems like it's not enough but with my i got a macbook pro max and i've been using it
and this 65 watt thing will
charge it just fine.
So unless you're doing like machine learning or video exporting or something that completely
nails it, like this will charge like 25% in an hour, even though it's supposed to take
140 watts, you can give it this little tiny thing.
So I haven't done enough to really give it a hundred percent.
Like absolutely.
That's going to work all the time.
But my new plan is to travel with this tiny little thing and a long USB-C or Thunderbolt cable.
Interesting, right?
That's pretty interesting.
Yeah.
Could you put two in there?
I don't think.
Maybe it'll catch fire if you do that.
I'm not going to do that.
But here you have the picture.
It's less than half the size of the charger, which is pretty interesting.
That's a 60-watt charger right there, not the 140 of the the charger which is pretty interesting yeah that's a 60 watt charger right there not the 140 watt charger 140 all right and finally i want to say
that if people who have an m1 not an m1 max or pro you can pretty much not have FOMO about this
thing like as far as i can tell my mac mini and my much more expensive MacBook pro are exactly the same speed. Oh really? Okay.
I think almost always, except one thing I found is for outputting video.
I found that I could re-encode or I could encode the videos for talk by them training
more efficiently.
And I re-encoded the entire library, which is like 20, 220, 230 hours in multiple formats.
It took 14 days of compute time. Not I got around to do
it in 14 days, like start it finished 14 days later. And it's actually three over three times
faster with the M1 max. So, so just like three or four days. Yeah. It's only five days, which is
still a long time, but it's way better than 13, 14 days.
13, 14 days.
Yeah.
So I think also this will have a really interesting knock-on effect for ML.
Right, right.
It's got like the onboard machine learning block and it's got a 32-core GPU.
I think there's a lot of stuff that's going to be coming along that's pretty interesting there.
What do you think?
No, no, no.
You're absolutely right.
I have a friend that works for Google, does the same thing with, that I do.
And, um, him and I were talking, I have just the, the little version of, uh,
MacBook Pro and I wasn't going to wait for another one to come out, but, uh,
it has a lot of the components and a lot of capacity that I need to do my works.
Instead of just putting your stuff on like AWS and now you can run them locally and it's, it's extremely powerful.
So this is, this is really good.
Especially the M1, M1, M1.
The new stuff is quite neat.
It's seriously impressive.
As Sam has said out there, I totally agree.
Very impressive.
Yeah.
Morley, anything else you want to throw out for people while you got the mic?
You know, I just want to say thanks to you and Brian,
right?
So again, I've been listening to you guys for a very long time and,
um,
I've come this far partly because I've been listening to you guys.
Just the encouragement.
I think you guys every day,
every time I listen to you guys,
you guys,
you guys are talking to me and not to a large group of audience.
I think it's extremely helpful to see you guys be part of the community and,
uh,
shout out to Pi,
Pi Bay in San Francisco.
Uh,
those guys
are real cool and michael thanks for coming out there and talking to us that was a great trip
a few weeks ago that's a few weeks ago so it was really good so well thank you guys for the work
that you guys do and uh um we'll continue to listen to you guys and be part of the community
yeah thanks yeah i really appreciate that thank you it's a lot of times we put stuff out there
and there's not a lot of feedback but you you know, people are out there listening. Then, then you meet folks and talk
to them. You're like, actually that it has an impact, which is really great.
You know, for me as a particular impact, right? So like, like I took a journey and that it's,
I am where I'm at today because again, partly because of the work that you guys do, I'm listening
to you guys doing a lot of the research and following up on a lot of the topics that you
guys have on the show. So it's, it's taken me a long way because um this gives i listen to you guys a lot
yeah thank you so much all right brian we ready for a joke with a smile well well i just wanted
to comment that maybe the next version of macbook pro might you might have to charge it in the
laundry room because that's the only one with a plug
that's strong enough yeah it gets a 240 volt yeah that's right yeah it's but the thing is it
almost never runs at that right it'll go for like 14 15 hours it's only if you're doing like insane
stuff and also you can plug in three thunderbolt usb three things and each one of those it'll
provide up to 15 watts of output from the laptop.
Oh, wow.
So I think it's also trying to pass.
Yeah, I think it's trying to pass through 45 watts.
So it needs a charger that can account for
how much does the Mac need plus 45 more watts?
Right.
Because you plugged it into all these Thunderbolt thingies.
Anyway, I've been trying to think about
why it really needs someone that's so high.
Chris May is going gonna hook us up to like a level three dc fast charger charge that thing up five
minutes on the car all right so this one comes to us from the veritable xk cd and it talks to us about programming standards. So how standards proliferate.
See AC chargers, very timely.
Character encodings, instant messaging, and so on.
I'm thinking network protocols.
Remember, this is a follow-on from the joke of what is soap?
And then rest.
What the heck was wrong with soap?
I know GPRC is better than REST.
The torture never ends.
Okay, so this is a follow-up from that.
And here it is a man and woman developer
sitting here talking.
It says, situation, there are 14 competing standards.
14, ridiculous.
We need to develop one universal standard
that covers everyone's use cases.
Yeah, soon.
Situation, there are 15 competing
standards yeah yep yeah yeah um the only thing going in the other direction is cellular standards
they seem to be oh really blessing um so but wi-fi is going crazy uh but anyway it's just one
standard but it comes out with a new version about every six months. Good thing they don't bake those into hardware and chips and stuff.
Oh, wait.
That's a good thing they do.
I'd be out of business if they didn't.
Exactly.
The testing never ends.
Fantastic.
Yeah.
Thanks, Michael.
Thanks, Morley.
This was a really fun episode.
Yep.
Thank you very much.
Thanks for the invite.
Appreciate it.
Thanks, everybody, on the chat and on the stream for watching. Bye, all. Bye. Bye. Thanks for the invite. Appreciate it. Thanks everybody on the chat and on the stream for watching.
Bye all.
Bye.
Bye.
Thanks for listening to Python Bytes.
Follow the show on Twitter via at Python Bytes.
That's Python Bytes as in B-Y-T-E-S.
Get the full show notes over at PythonBytes.fm.
If you have a news item we should cover, just visit PythonBytes.fm and click submit in the nav bar.
We're always on the lookout for sharing something cool. If you want to join us for the live recording, just visit the website and
click live stream to get notified of when our next episode goes live. That's usually happening at noon
Pacific on Wednesdays over at YouTube. On behalf of myself and Brian Ocken, this is Michael Kennedy.
Thank you for listening and sharing this podcast with your friends and colleagues.