PyData Seattle 2023

Carl Kadie

Ph.D. in CS and Machine Learning. Retired Microsoft & Microsoft Research. Volunteer, open-source projects related to ML, Genomics, Python, and Rust.

The speaker's profile picture

Sessions

04-27
10:15
45min
A Perfect, Infinite-Precision, Game Physics in Python
Carl Kadie

This fun and visual talk shows how to create a perfect (but impractical) physics engine in Python. The key is Python’s SymPy, a free package for computer algebra.

The physics engine turns parts of physics, mathematics, and even philosophy into Python programming. We’ll learn about:

  • Simulating 2-D Newtonian physics such as Newton’s Cradle and the two-ball drop
  • Having the computer solve math problems too hard for us to personally solve
  • The surprising (even to physicists) non-determinism of a billiards break
  • Thoughts on making the simulator more practical

If you are an enthusiast interested in what Python can do in other fields, or an expert interested in the limits of simulation and programming, this talk is for you!

Kodiak Theatre
04-28
14:15
45min
Nine Rules for Writing Python Extensions in Rust
Carl Kadie

Python extensions let you speed up your code by calling fast code written in other languages. Traditionally, you would write your extensions in C/C++. Rust offers an alternative to C/C++ with these benefits:

  • As fast as C/C++
  • Much better memory safety and security than C/C++
  • Most loved programming language since 2016
  • Multithreading without needing a runtime

In this talk, we’ll cover nine rules that I learned as I ported our open-source genomics extension from C++ to Rust. This will help you get started and help you organize your project.

If you’re a seasoned extension writer frustrated with C/C++, or a beginner looking to write your first extension, this talk is for you!

Hood