Hello and welcome to Python Bytes, where we deliver news and headlines directly to your earbuds.
This is episode 233, recorded May 12, 2021, and I'm Brian Okken.
I'm Michael Kennedy.
And I'm Marlene Mangami.
Well, welcome, Marlene. For people who don't know you, can you introduce who you are?
So I am a Pythonista, of course, and I am based in Hawaii, Zimbabwe.
I am also really involved with the Python community.
So I'm currently the vice chair of the PSA Board of Directors.
The board, I think, for about coming up on four years now, which is really exciting.
And it's been really a very cool experience for me.
I'm also a software engineer.
I work right now with the Rapids team at NVIDIA and have just been doing software engineering with them.
I will talk a bit about that later.
But yeah, I'm trying to think what else.
I'm also a very avid reader and just like doing other things besides software.
So yeah, that's pretty much me.
Cool.
That's awesome.
You're doing a bunch of cool stuff.
So I think Rapids seems like a really neat project to work on as well.
And of course, the Python community side is great.
So super happy to have you here.
Brian, you know, having a good readme is really important to a project, wouldn't you say?
Yeah, definitely.
And I, for some reason, I don't know, readmes are not difficult to write, but I freeze up.
It's a blank page syndrome.
I think often I've gone through and just like copied from some other project.
What's in there?
Readme.
But I don't think that that's like the best way to go about it, really, because sometimes you forget stuff.
So this was a, we have a recommendation from Johnny Metz.
It's a tool called readme.so.
And this is like totally fun.
It's just this interactive thing where you get to add stuff.
So we've got the title.
You can, there's on the left-hand side, there's a bunch of sections where you can select what you want to go into the readme.
And then it shows a preview on the right, but you can also see the raw markdown.
And then in the middle, there's an editor.
So you can actually just edit the whole thing here.
But really, I don't know if I really would project title.
What I'd probably do is go through and, you know, pick out to look at what sort of things I'd want.
So I'd probably maybe some acknowledgements if I took the, if I got some help from somebody, maybe an API reference.
If it's got a, if it's a library, how to contribute.
Oh, badges.
Definitely want badges.
Oh, yeah.
And then, you know, maybe like how to run tests if you want to contribute.
If there's other cool projects using it, I'd want to use by all these sort of things.
And then you can, the, the editor only selects, it only shows you the ones, the, the one at a time, which is nice.
But then you've got this, this whole generated, really nice looking readme with tables and everything like built in.
And you can either just copy it or download it and just run with it.
I think this is really great.
I'll probably use this in the future.
I really love this.
And I'm surprised about the psychological benefit of just showing the little, the section with the one heading.
So for like example, acknowledgements, you just have hash, hash acknowledgements.
And then the few things, even though you're editing the whole readme, it seems so much more like, oh, I'm going to just work on that section.
It's really cool.
Marlene, what do you think?
It's really, really cool.
I like it.
I think I'm going to try it out.
I have put no if it at all in this.
So I think it's, it's something I need to put more if it into.
And this looks like a really good way to do that.
So, yeah.
I think that it would also be great to just like, if you have an existing readme and you want to add some new sections, you're not quite sure how it should look.
Using this as a jumping point of just to grab sections of a readme to add to an existing one too.
This would be great.
Yeah.
This is really, really cool.
How do you, how do you, can you start with a new one?
Like, can I, well, sorry, let me take it back.
Can I start with an existing one?
Can I somehow upload an existing one?
I don't see.
I don't think so.
Wait, I can go to raw.
Hold on.
Oh, you can probably just drop it into raw.
Maybe.
Yes, you can drop it into the raw.
That's it.
Okay, perfect.
You go to raw, which it doesn't hide the sections.
It's just pure markdown.
And then you just throw it in there.
Okay.
But you can't edit there.
No, no, but you can flip it back.
I think probably once you edit it there.
I don't think you can edit.
So you can only edit in the, like the editor part.
So.
Yeah.
It still looks really, really cool.
I've, I've heard of platform as a service.
I've heard of infrastructure as a service.
I've heard of database as a service, but I guess now we have read me as a service.
I don't know.
You just go to the website.
Exactly.
That's pretty cool.
Yeah.
I'm, I'm, I'm pretty excited about this.
Actually, I, I might, I might play around with this, for my next project.
I've got some stuff that may end up on PyPI soon and it'd be cool to do it.
All right.
So I've got the next item and it's a bit of, a skateboarding dog type of thing.
It's not something I think a lot of us will take advantage of, but it's something that is
pretty interesting as we kind of look at how Python is finding its way into the larger
computing space.
Yeah.
And Oh, Sam Morley out there and the live stream before we move on says, it'd be
really cool if you could point this at a GitHub repo and edit your repo directly.
Uh, the read me directly on your repo.
Yes, absolutely.
That's fantastic.
Yeah.
That's a really good idea.
Really good idea.
All right.
Back to my skateboarding dog.
So there's a company called Sarah brass, and this was sent over to, to us by Galen
Swint, who is a PhD researcher who does high performance computing.
And stuff.
So in that world, I think this, this may be a real thing.
You look through the article here that talks about this announcement and it's like, well,
there's like these 12 customers or 15 customers of this, this chip.
But for those of you watching, there's, or you check out the article, there's a woman holding
a chip.
And normally we think of computer chips as little tiny things.
This is a 12 inch by 12 inch computer chip, or you want to go metric 30 centimeters by 30
centimeters.
It is a big, big computer chip.
And the idea is we've had small little chips come along to do special types of processing.
We've had GPUs come along and do, be adapted, I guess, for things like machine learning, training
machine learning models.
This thing just takes that idea to an entire new level.
So for example, I'm always going on and on and raving about my Mac mini, my M1, where,
it's a cheap little computer relative to Apple stuff, I guess.
Uh, but it's, it's super fast, but it has four performance cores and four efficiency cores.
That's it.
Uh, your GPU, if you've got a really high end one might have 4,000 cores.
This insane little chip here has 850,000 AI cores on one chip.
Is that insane?
What do you, what do you do think?
I, I'm, I'm curious how they, I mean, this is, this is some major advances in, in wafer technology,
because how do you get that big of a chip with no defects in it?
Yeah.
And they have apparently 100%, efficiency.
Well, first of all, one of the ways you do it is you use the TSMC foundry, who seems to
be taking over all these small high efficiency, type of things.
And so they had a previous one that they've more than doubled the core count for.
And another way to kind of appreciate like how much is going on in this chip, I, you know,
go back to my, my M1, it has a zero, zero, one, six brilliant transistors.
This has 2.6 trillion.
Or is that another way?
2,600 billion, a billion transistors versus 1.6 billion.
Like it's a 2,000 times more on this chip.
So super, super cool.
And now you may be wondering, all right, all this is interesting and tips are neat.
What is the Python angle?
Like, why would I bother putting this on here?
Cause you know, we don't really talk about chips that much, except for when I go on and
on about my M1.
Here's the deal.
If you scroll down in this article a little bit, you'll see user program, this insane machine
transparently in machine learning frameworks, such as specifically TensorFlow and PyTorch.
Isn't that crazy?
That's really interesting.
Isn't it?
Yeah.
I said, I was just thinking about you as I'm going through this, cause you're working on the
Rapids project, which is, it's not the same thing obviously, but it's kind of in that space,
right?
Yeah, it is.
Have you heard of this before?
No, I haven't heard of it.
This is, yeah, this is really big and I have not heard of it.
Yeah.
I will get into reading a bit more about it after.
Yeah.
Yeah, for sure.
So there's a lot of interesting things.
And one of the, I can't remember where exactly they spoke about it, but they basically say,
what you do is you program and TensorFlow and PyTorch as normal.
And then they have this custom compiler that, that rewrites, that extracts this execution
graph to actually scale out to the 850,000 cores to the developers don't have to think about
how they program against something like this.
I don't want to spend too much time on this because there's something, my next item is
super amazing.
I want to take the time to dive into it.
But there's another thing that's really interesting.
Just as you look at it, like this thing takes an insane amount of power.
Like, oh, for this one chip, you're going to need a four kilowatt power supply with up to
a peak power of 23 kilowatts.
Oh, wow.
When you plug in an electric car at one of the high speed home chargers, that's seven
kilowatts, just to give you a sense.
This is like insane amounts for one chip, right?
You could think of it as a supercomputer.
Like it's one chip.
So anyway.
Our entire lab doesn't draw that much.
So the reason I said it's a skateboarding dog thing is I don't think most of us will be
able to ever even interact with one of these, much less buy one.
They're going to be shipping in the later part of this year.
And the price is something like $3 million plus.
So this is certainly super computer level.
But I do think it opens the door for really interesting stuff going on in the high performance
Python space.
So yeah.
Glad that Galen sent it over.
Well, I'm totally going to put $25 into Dogecoin so that I can afford this later this year.
Oh, speaking of which.
Exactly.
Well, what about, I think maybe you get this and you create an AI that can more intelligently
mine Dogecoin and then you take over the world.
Just an investment.
Yeah.
Just an investment.
All right.
So speaking of large scale, high performance computing, Marlene, take it away.
Sure.
I have the next item, which is Rapid.
And I wanted to speak about this because I'm working on it.
And it's what I've been working on for, I think.
Yeah.
Wow.
It's been about a year since I have been with NVIDIA.
working as a software engineer there and working specifically on the Rapids project.
And so Rapids, I think, is really interesting because the goal of Rapids, similarly, like the
last thing Michael just showed us, is to speed up data science.
But this is what GPUs.
So I think it's really, it's been really cool to work on the Rapids project.
And I think it's really interesting as well because it's open source.
It's also, there's a lot of Python involved.
So it's, well, it's not entirely, it's not mostly Python.
Actually, there's a lot of C++ and Cuda code in there as well.
But I am not, you know, personally, I'm not, I'm not, my aim is not to learn Cuda.
It's to try and avoid that as much as possible.
And also avoid as much C++ as possible.
So that's a bit more reasonable.
But one of the goals of the Rapids project is to allow people who are Pythonistas to work
primarily with GPUs and to get those speed ups without having to know any Cuda code or
to know any C++.
And so I have been working primarily on the Python side of things and have really been enjoying it.
I work specifically on, with the QDF data frame library.
And QDF is basically a, it mirrors, it's a, it's a GPU data frame library that mirrors pandas.
So if you have a data set and you'd like to do computations on your data set or do different
operations on your data set, if you can do that with pandas, you should be able, hopefully,
to do the same thing with QDF.
But the good thing is that it will be, it will, it will probably be faster.
I actually can't definitively say that it will be faster because I remember when I first joined
the project as well, I was, I really, I'm very enthusiastic and I really enjoy sort of sharing
when I'm learning something new.
And I remember I was like going around and speaking and saying that, you know, QDF is
so much better than pandas because it's just so much faster.
And then my manager was just like, you need to stop saying that because it's not true all
of the time.
it's true most like some of the time.
So for smaller data sets, it's probably better to stick with pandas because.
Yeah.
There's always this overhead, right?
Like as you scale things out and stuff, there's probably like, well, how do we convert this over
and get it onto the GPU?
And if, if that process takes half the time of what just doing the computation, you might
as well just do the computation, right?
Exactly.
Like if you're already, if you're mainly doing, right, I agree.
Like if you're working with smaller data sets and you are fine with that and that works for
you and your time is not like being wasted a lot, then I would say, please go ahead and
stick with pandas.
But if you have, if you are working on like larger data sets and the larger your data sets
get, the more the difference is going to be in terms of your speed up.
So with very large data sets, QDF is going to take a much shorter time to do computations
and things like that.
Yeah.
You've actually put a really interesting example in the show notes here, right?
Showing how many zeros is that?
A hundred million items or something like that?
Yeah.
It's a hundred million.
I just kind of like randomly chose a number to try and make it like, I didn't also want to
take a number that was too big because I didn't want to spend like a long time doing it.
And I know like for a lot of data scientists, like I think increasingly people are working
with larger and larger data sets, just depending which field you're in.
For the example, I put it on the show notes and it's on the screen right now.
But if you take a Pandas sort of data frame and try and calculate the mean and you take
the same QDF data set and try and calculate the mean, it will take, I think I'm trying to
look at the notes.
It's 105 milliseconds for Pandas and it's like 1.83 milliseconds for QDF, which is just,
That's awesome.
And that's like a smaller scale, I would say, data sets compared to some people.
Yeah, just a hundred million.
It's just a hundred million.
So it's not a lot.
I mean, it depends.
But yeah, I think it's definitely significant once you get to a certain threshold, which is
pretty cool.
Yeah.
Over on the rapid site, it's a rapid site AI.
It says it scales out on multiple GPUs.
So seamlessly scale from a GPU workstation to multi GPU servers and multi node clusters working
with Dask as well.
So Dask is also kind of about scaling Pandas and combining those.
That's pretty awesome.
So I actually saw that you have a Dask course out.
Like I recently thought, yes, definitely going to take that because I mean, yeah, check it
out.
That one's awesome.
Yeah.
We put that together with Matthew Rocklin and team over at Coiled.
Yeah.
And that's actually free.
So people can just drop in and take that course.
I think maybe I can put it in the show notes at the end.
I think it just just announced.
Let's see.
Very cool.
No, that was a lot.
That was last week.
But yeah, this is super cool.
And this one is certainly within normal person's reach.
You get a GPU and you're good to go.
Right?
Yeah.
I think.
Yeah.
I mean, I'm just using it on my laptop with the GPU.
You can also use it like online.
So there's also a CoLab notebook on the rapid side.
I think that you can click and then you can like kind of experiment if you just wanted to
do it online.
Or I think you can use any sort of online GPU that you have access to.
So it's very, I think it's trying to make it more accessible, which is great.
Yeah.
That's super cool.
Yeah.
Very neat.
Well, like I said, I think this is a cool project to be working on.
So thanks for sharing it with us.
No problem.
Ryan, is it time for the next one?
Is it time for the next one?
Uh, yes.
This was a recommended by a listener, Ira Horeca, I think.
So mentioned this in, it's kind of a rabbit hole.
I spent a whole bunch of time playing with all this stuff last night.
He recommended Date Finder.
So this is a Python utility and it kind of is amazing.
So it's a combination of a couple of things.
But so he pointed us to a comcode video, which, you know, I'm totally a fan of comcode stuff
because they kind of go through some of the Python libraries and some of the other, a lot
of other things, but just have kind of a quick demo of what it does.
And I really appreciate that.
It actually, the demo here is better than the, the read me in the, date finder, read me.
So, so maybe I guess a pull request is necessary, but anyway.
So what is, what date finder does is it takes, I'm going to scroll down a little bit.
So, date finder takes, it parses dates or finds them.
So it, you give it a string or a bunch of, list of strings or something, and it can find,
find where the dates are in there.
So if you've got, if you've got a sentence or a paragraph or, an entire page that has
a whole bunch of dates in it, it'll find all of them and then return you a list of,
of dates that it found.
It actually does a whole bunch of things, but that's the default or the, the, the one that
we're talking about find dates.
There's a bunch of other, Leslie, less documented, features of, date finder,
but this, this is the one that is demonstrated here and it's pretty cool.
So what it does, it finds those dates and then you can, and then it converts them to
date times.
So find dates will find them and convert them to date times.
And it does that by passing them off to the date util library.
So, this is just kind of a really cool demo that the list, the little video is
a good demo, of showing, showing how to, how to do this.
I also really kind of liked this way to play.
So the, the video shows this way to play with things of, of it just had a list of strings
and then, used a comprehension to convert that, to, to call a function on a whole bunch
of strings.
And I thought this was just kind of a clever way to just play with a function that translates
things.
This is a neat thing to do.
I would have probably so hard.
Yeah.
It's super hard, but, normally because it's so picky, right?
You've got to go to the, the date time parsing language, almost look up.
So if I put percent D, D, D, D, D, that might mean the year, but if it's capital D, it might
mean something different.
So you might say month, day, comma year, but like, there's an example here with month, day,
year without the comma is like March 12, 2010.
But if they forget the comma, it won't parse.
And like all those things are really annoying about working with reading, converting strings
to dates.
And this looks like it just, it doesn't care.
It's nice.
Yeah.
And then it also, it's kind of a clean, nice, clean air face to it as well.
Um, the, and a limited documentation is just a focus tool, which is nice.
And it's interesting that this is just a focus tool that apparently a lot of people need
because according to GitHub, there's 662 projects using this.
So, it's used kind of all over the place.
The behind the scenes though, it's taking the, what the dates that it found to the, the strings
and passing those to date util.
So if you want to avoid the finding part, this actually is also a good library to look at for
the usage of how to use date util to easily convert, convert dates.
Uh, and date util is kind of an amazing tool as well.
Um, and it gives you a, I told you this was a rabbit hole.
One of the cool things about it is you, it isn't just parse dates, but you can do relative
dates.
You can say like today plus three weeks or something, and it'll figure that out.
Um, and then you can, or you can take two days, two dates and do, do date math with
it really well.
And also date util has an amazing time zone support, probably the best in Python.
So, this is pretty, pretty kind of cool.
Uh, also I think I was looking through the test code.
The test code for date util, has, is an, is kind of a neat mix of a unit test and pie
test.
Both of them are good examples of how to do both.
Um, and I, I like some of the newer stuff is using pie test with parameterization, but it's
good.
Yeah.
I like this a lot.
Marlene, what do you think?
Yeah, I like it.
I think it, I'm not actually working with dates quite often.
So I'm, I'm trying to think of use cases for myself other than like maybe converting time
zones, which is like a nightmare.
Um, so maybe, Oh, you can say that again.
Oh my gosh.
Maybe you said that, but it looks like it would be really useful for people that are, yeah.
Yeah.
I'm showing up some of the, some of the examples from date util of how to use it.
And it's based, I, I, I imagine this is one of the reasons why date finder is so used because,
um, this is non-trivial even to use date util.
So yeah, that's cool.
Cool.
All right.
Well, I got the next one and this one doesn't exactly come to us from Anthony Shaw, but I was
talking to Anthony about something else and he's like, Oh, have you heard of this?
Have you heard of cinder?
And, cinder is pretty awesome.
So Anthony's doing interesting work around Python and performance at the CPython level,
especially now, I think he's given a talk on pigeon or piston, piston.
I believe it is.
I'm not a hundred percent sure.
I might be remembering which one's wrong at PyCon, which is, you know, we're going to talk
more about that in just a second as well.
But cinder is a really interesting fork of CPython from Instagram.
So it's under the Facebook incubator project.
And I think we've mentioned it before.
I definitely have talked about it before other presentations that Instagram has done really
interesting things like disable the garbage collector, just turn it off a hundred percent.
And they got less memory usage, not more memory usage by just allowing the cycles to leak, which
is insane.
But this is like, speaking of insane, this takes it to a whole nother level.
So this is that they've been doing all these low level things inside of CPython.
This is based on three, eight.
Hopefully some of these ideas can be brought forward and shared with everyone because there's
a lot going on.
So let me just cruise down here.
I'll just read the little intro part because it's jam packed.
And then I'll go into some of the details.
So this is the internal performance oriented production version of CPython 3.8.
And it contains a number of performance optimizations.
I feel like performance is some sort of theme of this episode.
It includes bytecode inline caching, eager evaluations of coroutines, a JIT, just in time compiler,
an experimental bytecode compiler that uses type annotations in some incredibly interesting
ways to enter, to emit type specialized bytecode that performs better.
So just to give you an example, one of the reasons that math in the pure Python layer is slower
than say C++ or C# is C++ and C# work with just the value.
So if you have the value seven, you might have two or four bytes that represent the value seven
in Python, you have a py object pointer, which is like 28 bytes pointing out to a thing on
the heap that represents the number seven.
And it's a whole lot more work to interact with that and set the reference count on that
and so on instead of just working with the value seven.
Right.
So one of the things they do is they actually have typed the, they use Python type annotations
to understand, oh, this is an integer.
This is a long and so on type of thing and actually convert those to the,
the machine oriented numbers.
Right.
So just the value four instead of a pointer.
And then it will use what's called boxing.
If something else that's outside of this world needs it, it'll up level that to like a py long
object pointer type thing and hand it off.
So there's, there's all sorts of stuff like that going on.
Interestingly, the first question is, is this supported?
No, not supported.
But there's some interesting things going on here.
And all of this has to be taken within, with an understanding that it's in a very specific
context and that may or may not be useful for you.
You know, Brian had pointed out some articles and ideas around that.
You're not Instagram.
You're not Facebook.
You're not Netflix.
And so on.
Most of the time people are building much smaller software with different constraints.
So they start out by saying, look, Instagram uses a multi-process web server architecture
where the parent process starts, performs initialization, and then forks 10 worker processes
to handle requests.
This is super common.
Like for example, Talk Python training literally does exactly this.
It, it uses micro-wisgi.
It starts up and it creates 10 worker processes to handle like people wanting to take courses.
So it's not uncommon in the web, but it's, it's not how all Python code runs.
And so the first optimization they did is they created what are called immortal instances.
The reason they were so focused on the garbage collector and all those sorts of things was
when you fork these processes, initially there's a bunch of memory that can be shared and that
helps with cache locality that helps with overall memory usage, all sorts of things.
But as soon as something has changed about one of those items, it has to copy a whole page
of memory.
And they realized that when an object's reference count is modified in one of the processes, it
has to copy a replicate and sort of fork off a bunch of the memory that used to be shared
across all those processes.
So they created what they call immortal instances that cannot be, that don't participate in reference
counting or garbage collection.
And that prohibits their reference count number to change so they can be shared.
So they can mark like a whole bunch of the startup stuff as like, just don't even look at this
or change it and don't do reference counting on it.
So in their world, they may, it got things faster, but it doesn't always, they said it's
something a little bit slower in straight line code, but in this sort of fork world, it's
better.
The next one is shadow byte code, which is an inline caching implementation.
And it goes through applies in certain optimization cases for generic Python op codes.
And it'll observe those for functions that take a lot of time and dynamically replace those
with specialized op codes that it thinks are going to be better.
Another thing it does that's pretty interesting is it will eagerly evaluate coroutine.
So if I say this is an async method, and then in that method, I call a weight, some function
call normal Python is going to create a coroutine.
It's going to schedule it on the asyncio event loop, and it's going to get to it.
And that's a lot of overhead.
But maybe that function says inside.
The first thing is if this case just return the cached answer, otherwise go to the database,
await the response and so on.
And what they realized is if it's going to go through that first case, it's not actually
awaiting something.
So they'll actually execute the awaited thing up until it actually needs to become async.
So it'll like look or effectively look inside the function and say, is the path we're going
on this time going to be async or not?
And if the answer is no, it will run it without async, which means it skips all that context switching
and all that stuff, which is pretty crazy.
It also has the cinder JIT, which is a method in time JIT compiler.
I think C#, Java, maybe even JavaScript V8.
So it's enabled for every function that is called.
Actually, it's not.
Sorry.
If it is, it'll make it slow.
So you can basically say which functions should be optimized.
But they say it supports almost everything that Python can do.
And it has a 1.5 to 4 times speed up of the Python benchmarks, which is pretty interesting.
They also have this thing called strict modules, which is actually a static analyzer capable of
validating top level code to see if a module has side effects and can treat it differently.
If it doesn't, you can have an immutable strict module type that is sort of a replacement for
Python's regular module that behaves and loads differently and so on.
And then the thing I talked about, the numbers more broadly is under this category of static
Python.
It's an experimental byte co-compiler that makes use of type annotations to emit better
things.
And check this out.
It can deliver performance similar to mypyC or Cython.
And this thing will go up to seven times faster than regular Python for the Richards benchmarks.
And I don't know if the 4x improvement before is like in addition to this.
So you get 28 or you just get seven.
I don't really know.
But there's a lot of things going on here and a lot of different ideas about how this
works.
So I'm just scratching the surface on the details, but I feel like I've gone on and on about it.
That's really interesting.
I saw, I think, is there a talk about it at Python?
At PyCon?
I think that's...
It is coming up.
Yes.
They're going to give a talk on this at PyCon.
Yeah.
It was one of the talks I was looking forward to listening to.
Yeah.
Just because I think it's super interesting to be able to kind of play around with that they
were able to kind of make their own version of Python.
And it might...
I don't know.
Like, I think that there's...
Like you mentioned, Anthony, and I also know Victor, I think, and someone else who are also
working on, like, sub-interpreters and different things to make Python faster.
So I'm really curious to see if, like, the core devs or people will also be, like, listening
to this talk and maybe take some ideas from it.
It would be really cool to kind of see.
And I mean, it's always good to get speed-ups, even if they...
I don't know.
I don't know if it will help, like, general, like, normal Python users, but I think it's
always good to look into.
Yeah.
I agree.
I think some things here are absolutely transferable to regular general-purpose CPython,
and some of them might not be.
For example, the immortal instances, that might be a thing that just...
They do that, and it makes sense for their large-scale farm of servers.
But the JIT that takes the type information and does math many, many times faster, that...
Everybody would want that.
Like, we all work with numbers at some level or another.
Right?
Well, one of the things I love about the...
I mean, this kind of applies to all of these sort of speed-up projects.
One of the things I love about Python is just the generalness of it.
You can throw it.
Data structures can hold anything.
So it's...
But there are times where you really are using a huge array of floats or a huge array of integers
or a huge array of, like, a fixed data size.
Those are times where you...
I don't need it to be generic.
I just need it...
I need it to be fast.
So having something...
That's the part where I think it would be interesting to pull into regular Python.
But don't we get that with, like, some of the data science stuff anyway?
Some of the number...
With, like, NumPy and stuff?
Yeah, you do.
But you can't do generic programming with it, right?
You do, like, sort of matrix math type of things.
And this one...
Like, the answer used to be, okay, well, this function is slow.
This serialization deserialization section might be slow.
So rewrite that in Cython, for example.
And what's really cool about this is you can write regular Python and just put type annotations on it.
And then it goes as fast as Cython.
And you don't even have to do, like, a separate compiler, I believe, in this world, right?
Because they have...
The JIT just knows that.
And then we'll...
Like, as you run it, it'll just compile and run it.
So, which is...
I think it just sort of makes some of those ideas closer and more automatic for most people.
I kind of think I foresee a future where we have sort of some types that affect runtime.
There's, like, this tension that I sense in the Python core people of whether or not types should be just an afterthought or whether they should be really part of the runtime.
And I think there are some cases where having them be part of the runtime might be a good thing.
Yeah, and this is interesting because what they do is they define these static modules.
And then in there, they can treat them differently.
I feel like I always see on Twitter some people kind of, like, ranting about how they don't like that direction that Python is going in.
Like, the idea of putting in, like, annotations and things like that.
I've seen some people that are not super big fans of that.
I'm not really sure why.
I generally would like to understand, like, I think most people...
Or not most people.
But I think some people would prefer Python to maybe remain as it is.
But I do think that there's, like, just having it be a bit lesser in a couple of cases would be helpful.
So, I don't know.
I don't know if it's in that direction.
I'm with you.
And one of the things they point out in this readme announcing the project is that you can still do gradual typing.
So, you can, in some places, have no types.
In some places, have some types.
And the thing can convert and just deal with that automatically.
And I think that's the reason that the types are really welcome in Python is because you can use them if you want, but you don't have to.
As opposed to places like TypeScript, which said, well, JavaScript doesn't have types, so we're going to add this very strict type system.
And if you don't fit it exactly, we're going to not compile and complain, and it's going to be really not good.
This feels like it continues that forgiving nature of Python to let you opt into it.
But if you do, it can go faster.
That's the direction I'd like to see.
I personally would like to see types be really a full-fledged feature of Python.
I agree.
I love that they're optional, but if they're there, let's see how much we can do and improve things with them, right?
A hundred percent.
Yeah.
All right.
Marlene, you got the last one.
I got it on screen for you.
Okay.
Yes.
The last one for today is PyCon US, which I'm very excited about.
It started today, which is really great.
Are both of you attending?
I don't know if you're attending.
Yes, absolutely.
Okay.
Brian, are you attending?
Yay.
Yeah.
I think it's such a great event in terms of the fact that I know it's PyCon US, but it is, at the moment, it's the largest Python.
Python gathering, or largest Python on Earth, I think, which is very cool because it means that you can meet people from all around the world.
I remember, I'm really sad that it's not in person because last year, not last year, but the year before that, that's where I actually met you, Michael, for the first time.
I think we were literally, I think we were at a table with you and Anthony Shaw and Łukasz Langa.
And I was just randomly there.
But it was such a cool discussion.
And I really love the idea of being able to be in a room with people that are contributing to Python.
That's my favorite part of PyCon.
Yeah.
It was so nice to meet you as well.
That is actually my favorite part of PyCon.
Yeah.
It's the just, you happen to end up at a table or out for a beer or coffee with this group of people.
And you're like, wow, I got these connections and this experience that just, I wouldn't.
So I'm very much looking forward to coming back in person.
But there's a bunch of great talks coming up.
Exactly.
So this year, although it's online, the online platform is very cool.
And there's still lots of great talks to watch.
In the show notes, I put down a list of the talks that I'm excited to watch.
But I also want to just put in a word for the things that I will be doing at PyCon US this year.
And the first thing I'm going to be doing is I'm going to be hosting the diversity and inclusion work group discussion,
along with four other really amazing women that are part of the diversity and inclusion work group.
I do want to comment here because I got like, we got some comments about it, some feedback.
I posted a picture of like a group that's going to be having this discussion or hosting this panel and it's all women.
And someone was just like, why is it all women?
How is this diversity?
So I do want to throw it out there.
I just want to throw it out there that we did try, like the work group itself has a lot of,
it has a good balance of men and women in it.
But then when I asked people if they want to come on the panel, it was only like women that volunteered.
So it's not my fault.
And I am aware of that.
That's just a general or that's just general feedback there.
But I think the panel will be really exciting.
It's going to be on Saturday on the main stage at 12 p.m.
EST, I think.
If you're going to be there, I really would encourage you to attend.
There's going to be questions and answers.
And I just think it's such an important thing.
I know that sometimes diversity can seem like a really tiring thing to talk about, especially like recently.
I feel like sometimes people use it as like this buzzword and it can, and people can be like, oh my gosh, and just turn off when they hear the word diversity.
But I really do think it's important.
And particularly now as Python is growing in popularity, I think a few years ago, it was okay for the nucleus of Python to be based in the United States or based in Europe.
But it's growing so quickly.
Python for I don't know how many years now has been the most popular language in the world.
And I know even for me, I'm in Zimbabwe right now, and it's one of the most popular languages here where I live.
And so just providing the group, like our main purpose is to figure out how we can support the PSF to try and serve Pythonistas from around the world better and to connect the community better and have better representation and different things like that.
So very excited about that one.
That's awesome.
And thanks for your work here.
I definitely agree that we're stronger together, right?
And one thing I would really like to see, and I think we're getting there, is when people look at Python and programming in general, but generally the Python space, we have influence over that.
When people look at that world, I would like them to say, I can see myself being part of that.
I can see that I could belong there, right?
And if that's not the case, then how do we make that the case?
Exactly.
Absolutely.
I think exactly that.
And I would love to see that happening in the next two years.
I would love to see, you know, one of my things is I'd love to see more like women core developers and more like global core developers as well.
And also people on the board and different things.
And those are all goals that we are working towards.
Obviously, we don't know, like, the perfect way to achieve something or the perfect way to do things.
But it's something that I think is really great and exciting to work on.
So please attend if you are listening to this.
And let me know if you, like, came from this podcast.
It would be fantastic to see you there.
Maybe just comment.
Yeah, fantastic.
And then, oh, another thing that I am doing for, like, on this year as well is I will be, one, I will be in the, so there's, like, a lounge area.
Well, there's, like, a PSF booth.
And if you would like to just, if you're going to be there in the morning on Saturday or on Friday, I will be hanging out in the PSF booth.
And so, yeah, if you just want to talk about Python or the PSF or anything, I will be there.
And I will also be hosting the EMEA meeting.
So if you're in Europe, the Middle East, or Africa, there's a members meeting on Saturday.
I think it's at 10 a.m. Central African time.
I'm not sure what time that is in other places.
But I know it's at 10 a.m.
It's on the schedule, right?
It's on the schedule.
Yeah.
We can use the daytime thing.
I don't know.
Exactly.
Pull up the ripple.
Throw it into daytime.
Exactly.
Please do that.
So I will be hosting that.
And that's going to be in the morning.
And if you would like, even if you're not a member, you can watch it on the PSF YouTube channel.
It's going to be streaming there.
Or you could join.
There's a meetup link that I put in the show notes.
So people could join that way as well.
So, yeah, Python is going to be really exciting.
And I'm really looking forward to it.
So just encouraging people to come along for sure.
Yeah, it should be fun.
And even though it is super sad that it's not in person, it's not in Pittsburgh this year.
I think in some ways it's more accessible to people around the world, right?
They don't have to travel there.
They can just log in and attend it.
And that's so much less expensive than I flew to the U.S.
And I paid $1,000 for a hotel.
So there's a little silver lining, you know, out there in the live stream.
Sam Morley really says, I really wish I could go to PyCon in person.
Adam Parkin there says, me too, maybe in 2020.
I think so.
Finally, Sam also thinks it's great that we're having this diversity conversation and paying attention to it.
One of the things I've noticed in 2020 is all the regional, actually last year also, though.
But the 2020 and 2021, we've got all these PyCons going on all over the world.
I used to think of like PyCon U.S. as the PyCon and everything else is regional.
Now I think of PyCon U.S. as a regional conference also.
It's the regional one that's close to the people that are in the U.S.
It isn't necessarily better.
It's, I love it.
It's great.
Anybody from that's hosting it, yes, it's better.
But no, I like all of them.
And I was excited to get to participate and watch videos from all over the world this year.
That was pretty neat.
But yeah, I'm on board with, I want to get back to regional stuff.
I'd like to see people in person.
I can't wait.
Yeah, I will say for sure, like, even if people are feeling adventurous, there is a regional conference.
I didn't mention it before that I am also part of the organizing team for, which is PyCon Africa.
So if you would like to travel to another PyCon in a different part of the world, when we are able to travel and the world gets back to,
some form of free travel, definitely recommend also hopping over to PyCon Africa.
I think, like you said, I think PyCon US is fantastic.
And one of the neat things about that is that it's a conference that has been there for so long.
So a lot of people are going to be there.
But there are 100% are a lot of great conferences like PyCon Africa, which you should attend if you can.
I think they're really just as exciting.
And there's so many cool things that you get to experience.
Like, I think for me, it's like whenever I go to the US, like last year, I'd never been to Ohio before.
And like, I had like, I would never like in my, I would never have a reason that I would think to myself, let me go to America to go to Ohio.
But I feel like it was such a good experience for me.
And I really liked it.
And I was really surprised by that.
And so I think it's the same way.
Like, PyCon is a great way as well to like experience new places.
So yeah, definitely sticking in that.
Well, that wraps up our six.
Anybody got any extra information to share?
Nothing else for me, other than the fact that if you do want to reach out to me, you can reach out to me on Twitter.
I'm Marlene underscore ZW there.
I'm also Marlene underscore ZW on GitHub, I think.
And on my website.
My website is MarleneMangami.com.
So if you would like to reach out to me here, feel free to.
I'm always happy to like chat about PyCon.
Nice.
Cool.
So I got a couple.
One made me really excited.
This tweet from GitHub.
Is your fork behind?
You can now sync your parent repo with just a single click.
So check this out.
If you go to your fork now, next to contribute for your PRs and stuff, there is now a fetch upstream button.
And all you have to do is click it and then automatically your fork will become in sync with whatever you forked it from.
You just have to go and go check it out.
Add an upstream origin and then pull from that and then merge that wherever you want it to go to.
Over here, you just click this button and boom.
It's good to go.
So I think this will just lower the bar for people forking something.
They want to get the current one and then make a change to see if they could contribute back.
Here's one fewer steps in that process.
Do you have any idea if it stays in sync or if you have to?
No, it's a one-time type of thing, I believe.
It says there's this many changes we'll pull over and it basically just automatically does the process at that time.
Nice.
But still pretty nice.
You know, Flask 2.0 is out.
And that one was sent in to us from Adam Parkin that, hey, heads up, this is now actually live.
So very, very cool.
Actually, everything from Palettes has been updated.
So, yeah.
I happen to have spoken, done a podcast recording with David Lord, who runs Palettes, and Phil Jones, who does Core and contributes back to Palettes as well, about all the stuff coming in Flask 2.0, all the exciting stuff and their future plans as well.
So, yeah.
You can watch the live stream of that or wait a day or two until the episode is out and just listen at Talk Python as well.
But, yeah, very, very cool.
Yeah.
And then Adam also at the live stream again says, this is super sweet.
Always find it a headache to sync with upstream.
Yeah, about the GitHub thing.
That's cool.
Cool.
Close it out with a joke.
Well, I got a couple of things I wanted to mention.
Go for it.
Sorry.
I had Brett Cannon on last week on testing code and huge feedback from everybody that it was a great episode.
We talked about packaging.
I'll have Ryan Howard on this week talking about Playwright.
So that'll be fun.
And I wanted to mention a thank you to the 71 patrons that we have on Patreon.
So thank you for supporting the show.
Thanks.
Yeah.
Thank you, everyone.
How about a joke?
Yes.
Sorry for almost skipping over your extras.
Here.
No worries.
You ready?
Yeah.
So this one, I talked about that crazy giant ship thing.
And we've got Marlene doing rapid.
So I thought maybe some kind of machine learning joke.
Here's a bunch of robots in school.
And they go like little Android looking things.
Small ones because they're students.
They're kids.
And they're in machine learning class.
And there's a big box of dirty data.
Like a bunch of bits that are like kind of gray.
And I don't know.
They just have dirt on them.
And the teacher says, Robbie, stop misbehaving.
Or I will send you back to data cleaning.
Yeah.
That's where they're spending half the day anyway.
Yeah.
They actually spend most of their time there.
That's right.
I don't know who is drawing them.
Like one of the robots is looking the wrong way.
I was like, why is it drawn like that?
I don't understand.
Hey, a more concrete, really quick closeout question I see in the live stream here is
Akmos.
Is there a difference between QDF and pandas in terms of utilization?
Like in terms of how you actually use them?
Well, I don't think so.
For the most part, if when you're using QDF, the way it's built is to mirror pandas.
So the APIs are really similar.
So ideally, the methods that you would use when you're using pandas are exactly the same
methods that you would use when you're using QDF.
The only difference is like when you're creating a pandas data frame, for example,
you would use PD dot data frame, for example.
But then with QDF, you would say QDF dot data frame.
If you make it like into a variable or something like that, then the methods that you're going
to pull are going to be totally identical.
It's really easy to try.
Yeah, that's it.
Yeah, that's awesome.
Yeah.
And Dask has similar stuff as well, right?
You create a Dask data frame instead of a pandas data frame, but the API looks quite similar.
They're not always 100% compatible, but most of the mainstream things, right?
Definitely.
So yeah, it's built definitely to make it as easy as possible to switch between the two.
So it's very similar.
Yeah.
Thanks a lot, everybody, for showing up.
Yeah.
Thanks.
Thanks, Maya.
Thank you, Marlene.
It's really great to have you here.
No problem.
Thanks for having me.
Thank you 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.
And get the full show notes at pythonbytes.fm.
If you have a news item you want featured, just visit pythonbytes.fm and send it our way.
We're always on the lookout for sharing something cool.
On behalf of myself and Brian Okken, this is Michael Kennedy.
Thank you for listening and sharing this podcast with your friends and colleagues.