On Building Glue Systems

I spent most of my life building glue systems.

Sometimes, I got to work on a deep, sparkling project. But most of the time, my work is about gluing things together.

» Read More

Haxe and Programming for Many Machines

The title sounds obvious. We always program for a machine! A program won’t run itself!

» Read More

Predictable Performance of OCaml's Module System

OCaml’s module system can be a powerful tool for building generic code and structuring systems. Functors are functions from modules to modules and they serve an important role for the power of module system. However, I want to know if functors (and the module system) can be optimized away by the OCaml compiler. » Read More

Going through the OCaml compiler pipeline (manually)

Modern compilers usually composed by multiple stages: parsers, optimizers, linkers, and assemblers. Let’s go through it one by one to have a better understanding of the OCaml compiler. » Read More

A Taste of OCaml's Predictable Performance

eqaf, a constant-time compare function implementation in OCaml, is a great case to demonstrate the predictable performance of OCaml’s compiler. Why? » Read More

在 iPad 上布置軟體開發環境

五月買了 iPad Pro巧控鍵盤 後,大部分的需求 iPad Pro 都能直接滿足,除了寫程式以外。摸索了一陣子之後總算找到順手又省錢的寫程式方式了,這篇簡單記錄一下。

» Read More

Guide to Serve Machine Learning Models in Production

Here’s a simple checklist for people who deploy machine learning models to production. Based on my personal experience.

» Read More

The Golden Age of New Programming Languages

2020 is going to be the golden age of new programming languages.

» Read More

Cheney on the M.T.A

如果問軟體工程師他覺得簡潔又經典的文章,我想很多人會回答你這篇:Cheney on the M.T.A.

» Read More

Structured Concurrency

Thread 跟 Coroutine 是兩種常常用來處理 Concurrency 的工具。

使用這兩個工具時,很麻煩的一點就是需要手動管理他們的生命週期。本質上,Thread 跟 Coroutine 都是 global scope,不管你如何建立,他們都獨立在原本的程式順序之外。

常見的例子是,如果你在 main 建立一個新的 thread,main 並不會等 thread 結束,而需要你手動 join thread,在複雜的情況(例如 cancel、timeout)便相當容易出錯。

而 Structured Concurrency 就是試圖將 Thread 的生命週期與大家都很熟悉的 scope 結合。

» Read More