Monday, 28 September 2009

Python-based RPN Evaluator

This program evaluates logic expressions out of a textfile with Reveresed Polish Notation (RPN) syntax.

Example world file:

wind and red have the value of 1, sun and rain 0 since they are prefixed by "/".
Here's the syntax to run the program: "python".
It quits when an empty expression occurs.

Example usage:
Logical Expression: rain sun &
Logical Expression: sun red |
Logical Expression: sun wind ^
Logical Expression: winter sun &
*** Error while evaluating: Bad name: 'winter'.
Logical Expression: sun red
*** Error while evaluating: Unbalanced expression: 'sun red'.
Logical Expression: sun red red |
*** Error while evaluating: Unbalanced expression: 'sun red red |'.
Logical Expression:


Find the source code here.

Friday, 25 September 2009

Download all SMBC Comics

Simple regex-based bruteforce program to save all comics from You'll need and my source code.

Tuesday, 15 September 2009

Google Cheat Sheet 0.11

Wrote a Google Cheat Sheet:

It's simple and contains every working function in Google Search, Groups, News, Calculator. What's missing? Query suggestions...