python Chatroom: Github Issues I've been avoiding Github's issue-tracker for quite a while now - mainly because I wasn't sure how it worked - but I decided to take the plunge with this project since it's become
python Chatroom: Server Improvements So I made some improvements to the chatroom server I wrote based on the code from the text game I'm developing. Here's some of the changes I've made: Created users persist between server
python Chatroom: Server Design Just a slight detour from the text-game work: I noticed that a lot of the functionality we were building into the server would be useful for an IRC-style chatroom. There's a very barebones
python Server-Client Demo I worked on this for a bit longer than I thought I was going to, but I've also got a sturdier product than I was expecting to have at this stage. I've pushed
python Starting Work on the Server To begin with, I want to describe in a bit more detail how I'm imagining the system to work. There will be one main executable file, server.py. It will output only debug
python A New Hope I'm making a new start on the text-based game I've been writing. The code at this point is spaghetti, and I can't develop anything at the speed I want to without relying on
python Python: Back in the Day So the other day I thought it'd be a great idea to take a look at the earliest version of Python that I could find. After a few broken links and a lot
notes Hashing with Chaining Notes taken from "8. Hashing with Chaining"; MIT OpenCourseware 6.006: Introduction to Algorithms. Dictionary: Abstract Data Type Maintain a set of items, each with a key. The interface looks like
notes Lower Bounds on Sorting Lower Bounds can also be important within Computer Science. We can use different comparison models to show that with certain algorithms, we can get linear time sometimes with a sort. Comparison Model: All
notes AVL Insert - Maintaining the AVL Invariant The algorithm for the insert operation on an AVL tree: Perform a standard BST insert: a. Traverse the tree looking for where to insert an item, then insert it there. Fix the AVL
python Parsing: Error Messages Part 2 Parsimonious, the library I'm using, provides a super useful class for visiting nodes in a parse tree called a NodeVisitor (appropriately enough). In order to use our generated parse trees for commands or
python Parsing: Error Messages and Accessibility At the moment, generate_parse_tree is returning a parse tree if it matches a valid command, or None if not. One way of getting more informative error messages (a la Zork) could
notes The Pumping Lemma (for Regular Languages) So apparently, this is the bit of formal logic at which all computer science undergrads quake in their boots. Guess I've got that to look forward to at uni. In the meantime, let's
notes Reverse Polish Notation Using brackets in computing is sometimes an unnecessary complication. Using post-fix expressions ensures that only one order of operation is needed. Postfix is another name for 'reverse Polish' notation. Infix: 38 + y Postfix:
notes Regular and Formal Languages Any language has an 'alphabet': the valid characters making up 'words' in this language. A notion expressing the rules governing the construction of a valid word in a language is known as a
python Text Game Update I really think I've got it! I've solved the problems that I faced earlier, neatly outlined by this webpage. Here's the first problem I faced: "Another fun case: some checks apply to
python Interactive Fiction Programming Or, some thoughts on how to implement Interactive Fiction in modern languages. The first thing to note is: it's difficult. Really difficult. But the worst part is, it starts out being easy... Getting