TITLE: PyCon Day 1
AUTHOR: Eugene Wallingford
DATE: April 22, 2023 6:38 PM
DESC:
-----
BODY:
One of great benefits of a virtual conference is accessibility. I
can hop from Iowa to Salt Lake City with the press of a button.
The competing cost to virtual conference is that I am accessible
... from elsewhere.
On the first day of PyCon, we had a transfer orientation session
that required my presence in virtual Iowa from 10:00 AM-12:00 noon
local time. That's 9:00-11:00 Mountain time, so I missed Ned
Batchelder's keynote and the opening set of talks. The rest of the
day, though, I was at the conference. Virtual giveth, and virtual
taketh away.
Talk 1: Inside CPython 3.11's New Specializing, Adaptive Interpreter
As I said yesterday, I don't know Python -- tools, community, or
implementation -- intimately. That means I have a lot to learn
in any talk. In this one, Brandt Bucher discussed the adaptive
interpreter that is part of Python 3.11, in particular how the
compiler uses specialization to improve its performance based on
run-time usage of the code.
Midway through the talk, he referred us to a talk on tomorrow's
schedule. "You'll find that the two talks are not only complementary,
they're also mutually recursive." I love the idea of mutually
recursive talks! Maybe I should try this with two sessions in
one of my courses. To make it fly, I will need to make some videos...
I wonder how students would respond?
This
online Python disassembler
by @pamelafox@fosstodon.org popped
up in the chat room. It looks like a neat tool I can use in my
compiler course. (Full disclosure: I have been following Pamela on
Twitter and Mastodon for a long time. Her posts are always
interesting!)
Talk 2: Build Yourself a PyScript
PyScript is
a Javascript module
that enables you to embed Python
in a web page, via WebAssembly. This talk described how PyScript
works and showed some of the technical issues in writing web apps.
Some of this talk was over my head. I also do not have deep
experience programming in the web. It looks like I will end up
teaching a beginning web development course this fall (more later),
so I'll definitely be learning more about HTML, CSS, and Javascript
soon. That will prepare me to be more productive using tools like
PyScript.
Talk 3: Kill All Mutants! (Intro to Mutation Testing)
Our test suites are often not strong enough to recognize changes
in our code. The talk introduced mutation testing, which modifies
code to test the suite. I didn't take a lot of notes on this one,
but I did make a note to try mutation testing out, maybe in
Racket.
Talk 4: Working with Time Zones: Everything You Wish You Didn't Need to Know
Dealing with time zones is one of those things that every software
engineer seems to complain about. It's a thorny problem with both
technical and social dimensions, which makes it really interesting
for someone who loves software design to think about.
This talk opened with example after example of how time zones
don't behave as straightforwardly as you might think, and
then discussed Python's newest time zone library, pytz.
My main takeaways from this talk: pytz looks useful, and I'm
glad I don't have to deal with time zones on a regular basis.
Talk 5: Pythonic Functional (iter)tools for your Data Challenges
This is, of course, a topic after my heart. Functional programming
is a big part of my programming languages course, and I like being
able to show students Python analogues to the Racket ideas they are
learning. There was not much new FP content for me here, but I did
learn some new Python functions from itertools that I can
use in class -- and in my own code.
I enjoyed the Advent of Code segment of the talk, in which the
speaker applied Python to some of the 2021 challenges. I use an
Advent of Code challenge or two each year in class, too. The early
days of the month usually feature fun little problems that my
students can understand quickly. They know how to solve them
imperatively in Python, but we tackle them functionally in Racket.
Most of the FP ideas needed to solve them in Python are similar, so
it was fun to see the speaker solve them using itertools.
Toward the end, the solutions got heavy quickly, which must be how
some of my students feel when we are solving these problems in class.
~~~~~
Between work in the morning and the conference afternoon and evening,
this was a long day. I have a lot of new tools to explore.
-----