Hi there! Welcome to my website, here you'll find all my blog posts, videos and personal projects.

By Kimserey Lam with

Blog Posts

Looking for a specific post? Checkout the Blog Index.

Private Blob Storage With Minio

Jun 14th, 2019

Minio is a open source distriubted storage. Few weeks ago, I showed how we could use it to store Microsoft Orleans actor states by implementing a grain storage backed with Minio. Today we will see how we can install two parts of Minio, the Minio server and the Minio client and we can update it when need be.


Nondeterministic Evaluation

Jun 7th, 2019

We recently looked into a simple metacircular evaluator interpreting a part of Lisp. We saw that it was possible to reimplement some of the functionalities by parsing Lisp expressions. We also saw that by slightly changing the order of application, we were able to turn our language into a lazy language. Today we will look into nondeterministic evaluation, also called ambiguous evaluation, another concept which can be made available to the language by re-modeling our evaluator in the same way as we did to introduce laziness.


Lazy Evaluation

May 31st, 2019

Last week we implemented a metacircular evaluator in Racket, evaluating a subset of Racket language. We saw that the main functions part of an evaluator are eval evaluating the meaning of an expression and apply, applying a procedure to arguments. We wrote the evaluator following the order of execution of arguments and procedures from Lisp. Lisp being an applicative-order language, when provided a procedure with parameters, the parameters get evaluated before the procedure is applied. As opposed to normal-order languages, also called lazy languages, which delay the evaluation of arguments until the result of the procedure application is required. Today we will see the implication of this slight change in order of application by modifying our evaluator created last week, transforming it into a lazy evaluator.


Metacircular Evaluator In Lisp

May 23rd, 2019

In previous posts, we explored the concepts of abstraction, mutability, and closure. A common point to all of them is that they were made available by programming languages. In fact, programming languages can themselves be seen as a very low level abstraction composed by a set of expressions. A programming language is written by composing functions together, like any other program, and interpreting the meaning of expressions given. Today we will look at how we can create an evaluator by implementing a metacircular evaluator supporting a subset of the syntax of Lisp.


Algorithm Optimization With Dynamic Programming

May 17th, 2019

Dynamic programming (DP), is an algorithm design technique used to turn exponential complexity problems into polynomial complexity problems. Described as careful brute force (Erik Demaine - MIT course 6.006), problems are deconstructed into overlaping subproblems, solved indepedently with brute force, subproblems solutions are then cached and reused. The reusability aspect being a major contributor to the optimization due to the overlapping nature of the subproblems.


Nginx Proxy Pass

May 10th, 2019

In a previous post, we saw how we could host an ASP.NET Core application behind Nginx. We saw that Kestrel works as a selfhost webserver and that in order to get request forwarded to it, we need to proxy them using the location and proxy_pass directives. Today we will look into some details regarding path handling, ensuring that our requests are forwarded properly.


Nginx Gzip

May 3rd, 2019

When building single page applications, like Angular applications, where the entire application is sent over HTTP, compressing static files before serving them can provide a major boost in performance, drastically reducing latency. One of the most common compression algorithm widely supported by reverse proxies and browsers is Gzip. Today we will see how we can enable gzip compression on Nginx.


Angular Webpack Proxy Dev Server

Apr 26th, 2019
Proxy Calls

Angular CLI provides an easy way to host Angular applications during development by using Webpack dev server. Due to the fact that Webpack dev server is a web server, our frontend gets hosted on a separate web server which causes CORS issues if we want to call endpoints on a backend which we also host locally for development. Today we will see how we can use one of the features of Webpack dev server to setup a proxy during development which will proxy calls from the Angular application to our local backend hence by passing the CORS issue.


Delayed Evaluation And Infinite Stream

Apr 19th, 2019

In our previous post on mutability, we discussed the fact that time was to be taken into consideration when mutability was involved. We observed objects lifetime as instant by instant, computing and assigning objects states for each instant. Another way to look at time is to consider the state as a discrete set of values. From this perspective, we can see the time as being an infinite sequence, a stream, and the state can also be seen as a stream computed out of time.



Apr 12th, 2019

PowerShell is versatile command line shell which comes with a powerful scripting language. It is now even more available than before with the new PowerShell Core which makes it available on Linux. Even though the main commands in the scripting language have been around for ages, I always see myself having to re-learn how to use it every time I need to write a script.


The Cost And Benefit Of Mutability

Apr 5th, 2019

Mutability is a topic of high interest in the view of developers adventuring themselves in functional programming languages where it is generally unwelcomed and, in some instances, made voluntarily hard to implement. In contrast, object oriented programming has assignment at its core. Objects are represented as entity with a state modifiable over the lifetime of the application.


Understand Data Abstraction With Examples

Mar 29th, 2019

Data abstraction allows us to think about complex systems in term of their properties rather than their implementations. Reasoning in term of properties provides a ground of assumptions which can be used to create new systems. In common programming languages, abstraction is present everywhere, as interfaces, as abstract and regular classes, as functions, as function signatures, as user interfaces, etc. All of theses tools provide a way to build layers of abstraction which we can work on top of to create new functionalities by manipulating data on the appropriate layer.


Angular Progressive Web App

Mar 22nd, 2019
Angular Progressive Web App manifest.json file

Progressive Web App allows an Angular website to be installed locally and be available on the app drawer and on the home screen of a phone. Today we will see how to use Angular Progressive Web App module to transform our app into a mobile app.


Cloudwatch Alarm On Disk Space

Mar 15th, 2019
CloudWatch Alarm on disk space used

Few weeks ago we saw how to configure CloudWatch to monitor upstream response time from logs. We create a CloudWatch configuration which allowed us to create metrics by parsing the logs and create a dashboard out of it. Building up from there, today we will see how we can monitor disk used space and trigger an alarm when the remaining disk space is critical.


Cycle Detection With Floyd Tortoise And Hare

Mar 6th, 2019
Floyd's Tortoise and Hare

Floyd’s Tortoise and Hare is a cycle detection algorithm operating on a linked list. The algorithm is based on two pointers, the tortoise and the hare, moving on the linked list at a different speed. The algorithm can be used to find cycle existence, deduces the beginning of the cycle, and the length of a cycle. Today we will explore the mathematical proof behind the algorithm and we will implement it in Racket.

Racket Python
More Posts

Designed, built and maintained by Kimserey Lam.