函数式编程的两种路线

Posted on: Sun, 08/26/2018 - 07:30 By: Huahai

可能很多人没有意识到,函数式编程(FP)有两种非常不同的路线。

一条路线,为类型疯狂。这条路线的语言以Haskell为代表。这种FP,一切以类型为
中心,编程的主要任务,是要把类型搞对了,让编译器高兴,号称是“如果程序编译通
过了,程序就是对的”。这条线来自学术界,有很长的历史,是FP的主流路线,有很多
其他FP语言以此为模版。科班出身的同学们说到FP,说的就是这条路线的FP。可能他们
上学的时候学过Haskell,甚至可能还给Haskell课当过助教,但是他们恨死了Haskell
。所以这些同学们,是打死不信FP能实用的。

Backup Discourse with External PostgreSQL Server

Posted on: Sun, 01/21/2018 - 05:58 By: Huahai

Discourse is a modern forum software that is quite popular in the technology circle. One can install a Discourse server easily with the recommended method of using docker. All the services needed by the Discourse server, e.g. Postgresql and Redis, will be running inside a docker container, which is fine for a small installation. However, if one has already an external Postgresql server running, e.g.

FreeIPA in AWS EC2

Posted on: Thu, 12/07/2017 - 23:34 By: Huahai

Show how to install and configure freeIPA server and clients in AWS EC2 using Route53. Point out several important issues.

Ecobee3 installation with K wire

Posted on: Fri, 12/01/2017 - 06:13 By: Huahai

How to install Ecobee3 smart thermostat when one of the existing wire connection is labeled K on the old device? This is problematic because K wire does not appear in the Ecobee3's documentation, nor in the on screen menu. I found a solution: simply connect the K wire to Y1, then enable the G connection on Ecobee3 configuration screen.​

Tips for Traveling with a Baby in Japan - Diaper Bag for Air Travel

Posted on: Wed, 01/11/2017 - 01:09 By: yunyao

The list of items contained in our diaper bag for air travel, annotated with how essential each item was based on our experience as follows:

*** Must have

**   Nice to have

*     Not needed

For travel gear that may not fit in your diaper bag, please visit this page.

  • Portable changing pad (***)

This is definitely essential for both in the airports as well as on the airplane. We like our JJ Cole Collections Changing Clutch.

Tips for Traveling with a Baby in Japan - Travel Gears

Posted on: Mon, 01/09/2017 - 06:50 By: yunyao

We traveled with Boyan, our 13-month son last month to Japan (for those who are wondering, yep, he is the main reason why this blog has been so quiet in the past couple of years. :-)) and spent a unforgettable 10 days there. Before I went there, I searched over the web for tips, but they seemed to scattered around. I therefore decided to share our experience and hope it will be useful for others.

To make the information most useful, I will just list items we brought with us for the trip and comment on how essential each item was based on our experience denoted in the following way:

*** Must have

**   Nice to have

*     Not needed

1. Travel Gears

Subscribe to