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

#304: Build your own text adventure language in Python

Published Wed, Oct 5, 2022, recorded Wed, Oct 5, 2022
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by Compiler Podcast from RedHat

Brian #1: Ten tasty ingredients for a delicious pull request

  • on wagtail blog, from LB
  • Great tips for helping out with open source projects.
  • But even for closed source, there’s good stuff there to know for people transitioning to single person projects to working on a team.
  • The tips
    • Read the [development] instructions. The contributing guide, etc.
    • Read the issue and comments
    • Create a fresh branch for your contribution
    • Keep the changes focused
    • Write unit tests
      • also, extending tests for untested or under-tested features are a great way to contributes
    • Give your pull request a name with context
    • Reference the issue being fixed or resolved in the pull request
    • Review & fix the CI failures
    • Push to the same branch with fixes and do not open a new pull request
    • Be patient. (Article lists this as “Eagerness balanced with patience”).

Michael #2: textX

  • via Rhet Turnbull
  • textX is a meta-language for building Domain-Specific Languages (DSLs) in Python. It is inspired by Xtext.
  • In a nutshell, textX will help you build your textual language in an easy way. You can invent your own language or build a support for already existing textual language or file format.
  • From a single language description (grammar), textX will build a parser and a meta-model (a.k.a. abstract syntax) for the language

Brian #3: Reasoning about asyncio.Semaphore

  • Guido van Rossum
  • Article uses a fast food restaurant analogy to reason about concurrency, asyncio, locks, and semaphores.
  • A lock is like a single table restaurant with buzzers handed out to people waiting.
  • A semaphore is like the same thing but with more than one table.
  • Great discussion of the complexities of the Semaphore implementation.
  • Also of concurrency.
  • But almost as important, it’s an excellent example of utilizing a fairly easy to visualize analogy to reason about a complex problem. It also hits parts of the problem difficult to fit into the analogy, and pragmatically abandons the analogy when necessary.

Michael #4: Turnstile

  • A user-friendly, privacy-preserving alternative to CAPTCHA
  • I created a Python library based on Pydantic to validate the forms: (should I make this proper package and GitHub repo?)



  • Choosing a place to host your Python application.
  • Kicking around the idea of starting cohort based pytest training, possibly starting mid Dec.
    • Please let me know if you think this is a good idea and you might be interested.
    • message me @brianokken


  • Cppfront project aims to modernize C++
  • New pyscript (will cover in more depth soon)
  • NextDNS follow up
    • Yes, it’s basically PiHole in the Cloud with tons of options
    • Currently outdoing my NordVPN protections
    • Try with
    • Had to manually set DNS-over-HTTPS in Vivaldi to work with VPN
    • Add additional blocking lists
  • Got a Feather ESP32-S2 and put CircuitPython on it

Joke: Getting help with code

Want to go deeper? Check our projects