Unix Shell Scripting
While building a simple HTTP Server in Racket, I wanted to automatically restart the server when I changed the source file.
To achieve this, I wrote a simple shell script.
Continue reading →Racket HTTP Server 2 - Reading the Path
Previously, I wrote a simple HTTP server in Racket. The next step I will take with this project is to figure out how to extract the HTTP method and path from the request.
The handle method's first argument, in
, is an input port, from which the request can be read. We can read the first line from the request using the read-line
function:
Adding TLS/SSL to a web service with Nginx
As I previously mentioned, it is almost always better to use a battle-hardened old favourite for security software, rather than to roll your own.
With Nginx, you can add SSL/TLS support in front of your web server, using tried and tested software.
Continue reading →Using Template Haskell to bundle data into an executable at compile time
Often, a program will rely on static data - lookup tables, files to serve, initial values for internal data structures, and so on. Template Haskell can be used to load files, and execute code, at compile time.
This is a very gentle introduction to the otherwise often intimidating world of Template Haskell. For the sake of simplicity, I am keeping a narrow focus: loading a file, and then manipulating the data from that file, both at compile time.
Continue reading →Racket HTTP Server
When I start playing with a new language, I like to have a look at how I could build a simple HTTP server in that language.
Racket's racket/tcp
library provides us with functions for managing TCP connections. Using this, we can implement a server.
Mycs - Logistics Optimisation - Declarative Constraint Programming
Using Constraint Programming / MiniZinc for Manufacturing Optimisation
Used Declarative Constraint Programming (with MiniZinc) to optimise the assignment of Purchase Orders to Manufacturers, increasing Supply Chain cost-efficiency while also introducing checks and safeguards. Built a RESTful API wrapper in Go to allow the constraint solver to be accessed over the network.
Continue reading →Implementing a Feistel Cipher in Haskell
I was reading about Feistel Ciphers, and thought it would be fun to implement a toy one. I have shared it below.
Wikipedia Feistel Cipher ArticleGithub Gist: Haskell Feistel Cipher
Continue reading →Mycs - New Refunds Processing System
Development of a New Refunds Processing System
Built a new Refunds Tracking and Processing System for Mycs GmbH, a major European Retailer of Custom Furniture.
Continue reading →Erlang-Style Actor Model in Haskell
An Erlang-Style Actor Model implemented in Haskell
Continue reading →Remove unwanted pre-installed android apps without root
Note: Unfortunately, this does not remove absolutely all traces of the software (/malware!). But, it does remove them completely from view, and reduces the amount of disk space they consume. I am not aware of any better solution without rooting the device. If you are aware of a better solution, please get in touch!
Continue reading →