Converting DFA to Regular Expression

September 25, 2019 1 minute read

This post originated from Lab 1 of course Compilers: Principles that I’m currently taking, in which we were required to write a flex program to parse a subset of the C language. The multiline comment /* */ was the most troublesome to handle for most of us (excluding me, for sure).

How I saved a lost commit from GitHub

June 7, 2019 2 minute read

Earlier today I force-pushed to my repository USTC-RV-Chisel for testing purposes, without noticing that my local ref origin/master is 1 commit behind the actual master on GitHub. My friend pushed his work (1 commit) to it, and now it’s lost.

Build a minimal Linux system and run it in QEMU

April 7, 2019 6 minute read

Linux is the #1 open-source operating system nowadays, and many people are running a Linux distro, such as Ubuntu or Arch. Linux is also the most popular choice for a server OS.

Bootstrapping Make

February 25, 2019 4 minute read

Have C or C++ project to build? You may think, “Yeah this is very easy, I’ll just call the compiler to do so”, and yes, let’s take a look at an example.

Programming the On-Board SPI Flash of Digilent Nexys4 DDR

November 16, 2018 less than 1 minute read

This semester I have the course “Experiments of Digital Circuits”, the content of which is designing digital circuits using Vivado software, and writing Verilog code. Most of the lab papers require generating bitstream for the project and downloading it to Nexys4 DDR board to verify the functiona...

Alpha-Beta Pruning

May 23, 2018 4 minute read

As described in a previous article, Alpha-Beta pruning can be used to speed up minimax heuristic searching by pruning branches that will never be reached.

Making a Reversi game with Python

May 10, 2018 3 minute read

As a casual attempt to accomplish a Grand Assignment, I created a Reversi game with Python. The project is open-source on GitHub and you can view it with the link above.