Videos uploaded by user “Thomas Ballinger”
Getting started with event loops: the magic of select
Somebody who knew Python asked me what an event loop was, and instead of rambling in a text box I decided to ramble in a video. I'm not sure why this is a popular video! I was answering one person't question and the video doesn't make much sense outside of this context. In this video we write a little chat client in Python that needs to use two different blocking calls concurrently: reading a line of user input and reading messages from a server. How can we do two "blocking" things (waiting for the user to type and waiting for messages to come in over the wire) at once? Should we switch to nonblocking apis for both of these, and just poll for each and switch between them really fast? No! Let's block on both of them at the same time with select! Then draw the rest of the owl and tada, an event loop!
Views: 2456 Thomas Ballinger
Scaring the bugs out of bpython
bpython is close to the 0.14 release. I'm going to look for bugs and fix them, and while I wait for bugs to crop up I'll prototype new features (this will be less exciting than it sounds). I'm trying out streaming because I find it useful to go meta and watch my process later. But you can watch too!
Views: 330 Thomas Ballinger
Adding parens to methods: Python object model madness
Skip to 14:35 when I actually get started: http://www.youtube.com/watch?v=jECXI8OQ0S4&t=14m35s We hit properties, descriptors, old- and new-style classes, mro, and other Python details while trying to implement safe attribute lookup for bpython autocompletion. I also try to write tests first, but have some trouble with this.
Views: 1203 Thomas Ballinger
Python code review and refactoring
I'll code review some small projects in Python, maybe being a little too fancy in order to demonstrate Python language features I like. If you know some Python but want to learn more, check this out!
Views: 1529 Thomas Ballinger
First Haskell program that does something
Tom tries to Haskell https://github.com/thomasballinger/hs
Views: 1344 Thomas Ballinger
How to use color in the terminal
Skip to https://www.youtube.com/watch?v=1HS6oZRyzcc&t=408 when the audio starts! Want to know how to make your terminal battleship game have color output? Or how to find out the current width of your terminal? Or print a progress bar or spinner for your scraper? Of course you do!
Views: 1693 Thomas Ballinger
Method Binding in Python
An early practice run of method binding in Python
Views: 79 Thomas Ballinger
How terminals work and how to do more than print with them
An informal talk about how terminals work and how to harness their power for awesome
Views: 687 Thomas Ballinger
Attribute Lookup in Python part 2
We're reimplementing attribute lookup in Python without triggering the descriptors.
Views: 580 Thomas Ballinger
Restoring terminal state in Python
Let's work on https://github.com/thomasballinger/rlundo, undo for arbitrary command line interfaces (so long as they use readline). Tonight I'll work on restoring the terminal to its previous state after an undo. There'll be vt100 terminal emulation, tmux scripting, test-driven development, and lots of terminal layout work.
Views: 318 Thomas Ballinger
Terminal Whispering version T minus 11 days
Terminal talk 0.7 - I've made more progress on writing my terminal talk, I'd like to try it out again! Please ask questions about terminals! Tell me to clarify things!
Views: 211 Thomas Ballinger