That’s right, run PyGame (in all it’s Pythonic glory) IN THE BROWSER! All in all, it’s a rough draft. The code isn’t fully documented because really, it’s ported from other places where there IS documentation (pygame, gamejs, etc.) Anywhere where the functions/classes don’t QUITE act like their pygame equivalent I make a note of though, so that you aren’t tripped up.
These are posts from previous incarnations of my blog. They catalog old writing, (abandoned) projects, and else-wise content I have written in the past that others have found engaging or useful. You'll notice the sidebars reflect the content of the archival posts rather than my current blog; for current posts click on the logo above.
Editors Note, February 14th 2022: This project is now ABANDONED and no longer supported or updated. asherwunk/phabstractic now implements a…
I decided that, for future projects, I needed to port asherwunk/phabstractic to the Python programming language (pyabstractic). Well, phabstractic relies on a couple packages itself that are in the PHP domain. One of these packages is zend-config, which is part of the Zend Framework programming library.
Observers and Publisher design patterns are very important in that they enable a certain amount of reactive programming. When you only want something to execute or occur when a particular event occurs it makes more sense to just test for state change then to hard code in an if clause for every step.
Doubly linked lists are important data structures for they enable a range of data to be stored in sequential order in memory without necessarily having to be spaced next to each other, or worry about a particular size. There are many advantages to storing data outside of an array like this, including the dynamic nature of its allocation and flexibility of editing the order of elements (including the addition and subtraction of elements).
Object stores, associative arrays, and Maps are important data structures. They are useful in statistical analysis, as well as for in memory database storage, such as a Redis implementation. The advantage of a map is that you don’t have to remember cryptic index values, as well it allows you to establish an abstract association between two data objects.
Priority Queues are very useful and usually, are implemented using heaps. This Priority Queue is implemented using an array that sorts itself rather than an overly complicated binary tree or heap. A priority queue is very useful for event-oriented programming, multitasking processes, and online message queues.
Self-sorting lists can be very handy. For instance, we could easily implement a priority queue by utilizing a sorted list, and that’s something we’re going to do, simply using the comparison method on competing priorities. Self-sorting arrays make putting everything in order in a messaging queue fairly simple.
Lists are very important pieces of software engineering and implementation. With a restrictions predicate we are able to ensure variables in PHP are specific types. If we combine these two things we get a restricted list.
“In computer science, a stack is an abstract data type that serves as a collection of elements, with two principal operations: push, which adds an element to the collection, and pop, which removes the most recently added element that was not yet removed.”