Maruf
Rahman

Scheme Interpreter

This application is written in Python and is an interpreter for the Scheme programming language. In case you forgot, Scheme is the programming language where you see forests of parentheses- it is easy to get lost. However, it is a simple and cool programming language. Thanks to Professor John Denero for providing the skeleton code for this project.

To try it out, download the zipped folder on the left and click on the 'run-scheme.bat' file (Windows Batch File). Please, note that the application requires Python3 to be installed in the computer.

In addition to the interactive mode, the application also interprets .scm files. Instead of running the batch file, the following command should be run on the terminal from the application's directory:

python3 scheme.pyc file.scm

Hog

Hog is a dice game where two players alternate turns trying to reach 100 points first. On each turn, the current player chooses some number of dice to roll, up to 10. That player's score for the turn is the sum of the dice outcomes, unless any of the dice comes up a 1, in which case the score for the turn is only 1 point (the Pig out rule).

Special rules:
Free bacon: A player who chooses to roll zero dice scores one more than the absolute difference in the digits of the opponent's two-digit score.
Hog wild: If the sum of both players' total scores is a multiple of seven (e.g., 14, 21, 35), then the current player rolls four-sided dice instead of the usual six-sided dice.
Swine swap: If at the end of a turn one of the player's total score is exactly double the other's, then the players swap total scores.

Thanks to Professor John Denero for providing the skeleton code for this project. To try it out, download the zipped folder on the right and click on the 'play-hog.bat' file (Windows Batch File). Please, note that the application requires Python3 to be installed in the computer.

Firewall

This application was run by the firewall of a VM provided by UC Berkeley and set up in my personal computer. The application reads rules from a configuration file and controls packet traffic accordingly.

Rules format: [verdict] [protocol] [external_IP_address/country_code] [external_port/range]
e.g.
drop icmp any 8
drop tcp au any

DNS query packets can also be controlled:
drop dns *.example.com

On startup, the application saves all the rules in data structures and applies them every time it encounters a packet.