m00nlight's Adventures in Functional & Logical Programming

Income inequality analysis and visualization 24 Nov 2018

Happy analytic with the unequal world. In the post, you can view and interact with the notebook to see the income inequality problem of the world & USA. Read more »

Prolog clp(fd) solve killer sudoku and greater killer sudoku 18 Nov 2018

We already see the power to use constraint programming to solve logical puzzle like sudoku using SWI-Prolog's clpfd package. In this post, I will show you how you can make very small modification to the sudoku solver to solve famous sudoku variants like killer sudoku and greater killer sudoku. Read more »

Story behind OMail: An email client with automatic mailing list management on Android 20 Oct 2018

This post describe the story behind why I build the OMail App on Android. And the feeling and thing I learn during the procedure. It is not about technique details, but the general thing about this application. Read more »

Automatic dataset preliminary analysis in Mathematica 14 Feb 2018

This post shows a tool built in Mathematica that can do automatic preliminary dataset analysis, and can help me to dig into the valuable part in the dataset which may need further analyzing. Read more »

The functional zipper structure 17 Dec 2017

The zipper structure is a purely functional structure which is very like the functional queue structure, and can support to change the current focus to left, right in a way which is as efficient as their imperative one. In this post, you will see a detailed explanation of the zipper structure and how to use it to solve the hackerrank "Tree Manager" problem. Read more »

Nonogram prolog clpb solution 22 Sep 2016

In this post, you will see how to solve the nonogram puzzle using prolog's constraint programming technique in boolean domain using SWI-prolog's clpb library. Read more »

Using CLP(FD) to solve factorial and fibonacci problems reversely 01 Jan 2016

Logic programming is widely know for its ability to run program backward. This post shows you how to use a more abstract programming model -- Constraint Logic Programming on Finite Domain(CLP(FD)) to run factorial and fibonacci program backward. Read more »

Minimal object oriented in functional programming with a bunch of lines 27 Nov 2015

A lot of programmers with object-oriented background do not understand that object-oriented and higher-order function are closely related. In this post, I will show that with the power of higher-order function and closure, how can we implement the core concepts of object-oriented in less than 100 lines of code Read more »

White Noise or not, does the stock prices have long term memory 02 Nov 2015

Traditional efficient market hypothesis(EMH) assume the fluctuations of stock market accord with normal distribution. Which is widely know as a wrong assumption. In this post, I will show you the stock prices not only do not fit into the beautiful bell curve, but also has long-term memory. Read more »

Raspberry pi 2 with Mathematica inside 01 Nov 2015

A few days ago, I ordered a raspberry pi 2 ultimate starter kit set from amazon. This Sat. it was delivered to me and I immediately start to make it as a small computer for my usage. Read more »

Is God a complexity system specialist? 14 Oct 2015

There are a lot of emergence phenomena in our everyday's life. All the amazing things are sometimes beyond our scope of congnition. I always doubt in some sense, the God is perhaps a complexity system specialist, since we can find so many clues in our daily life. Read more »

Why can't the existing machine learning approach bring to us real AI 16 May 2015

Will machine learning or recently hottest deep learning bring us true artificial intelligence in the near future? Read more »

Hackerrank nCr 11 Apr 2015

Calculate C(n, r) mod m where m is not a prime. Read more »

HackerRank Minimum Multiple 11 Apr 2015

The functional tree structure is a very similar purely functional Read more »

Hello JekyllBootstrap 04 Mar 2015

How to build a blog on github using jekyll from scratch. Read more »