Some mathematics, coding, and literature

👋 Welcome to Harry’s blog pages.

  • This blog is made by Hugo and Papermod, and is deployed with Github Pages.

Pick_phd_supervisors

Question to ask the supervisor: What do you expect from me? What is your expectation for your PhD students? How many months a year am I expected to work? As a Chinese student, can I travel back home around Chinese New Year? Schools and Supervisor list Edinburgh CDT Algebra, Geometry, and Quantum Field José Miguel Figueroa-O’Farrill Tom Leinster Pavel Safranov Darrick Lee Oxford Vidit Nanda Christopher Douglas

October 15, 2025 · 1 min · 67 words

Helpful Resources

This article lists some helpful resources on Rust. Blogs Rust Blog by Pretzelhammer Articles Stack Overflow AsRef<T> in Rust Answered by PretzelHammer.

September 28, 2025 · 1 min

Rust Testing

Reproducible testing is important for reliable software development. Rust has a powerful built-in testing features, so that test can be writting under the test modules, and invoked by cargo test. For more details, see rust doc. This blogs will focus on some convenient use cases. How to Write Tests. fn plus_one(x: i32) -> i32 { x + 1 } fn main() { } #[cfg(test)] mod tests{ #[test] fn it_works() { assert_eq!(2, super::plus_one(1)); } } And fire the test with cargo test. ...

September 10, 2025 · 1 min · 174 words

Docker for Development and Testing

Docker is a virtualisation tool. It can create lightweight, fast, isolated, and reproducible environments like virtual machines, in which an application can be tested reliably. An docker image is a snapshot of an operating system. A container is an instance of an image, behaving like a running virtual machine. Testing Process Say I want to test a rust project with file structure like . ├── Cargo.lock ├── Cargo.toml ├── src │ └── main.rs └── target ├── CACHEDIR.TAG └── debug In a brand new operating system, everything needed to test this project is the rust-cargo suite, besides the source code. So I want the container to have them. ...

September 7, 2025 · 2 min · 400 words

UV for Python Project Management

Issues of Reproducibility Python is notorious for its lack of reproducibility. (It is not the worst, the title of which shall be reserved, probably, for C++.) Clone any python repository with more then 1000 lines of code from GitHub and try to run it on your personal computer. The first step, which is how to execute the program, will be difficult enough. The nightmare, however, is to make sure your system has the correct version of python, compatible versions of each python package, each C library the python package relies on, and each driver and system software C library relies on. ...

May 5, 2025 · 2 min · 419 words

Error Handling in Rust

Error Handling in Rust Color Eyre This package is simply magical.

May 4, 2025 · 1 min · 11 words

Fancy Terminal

Graphics in the Terminal If terminal leaves you an impression of dullness, black-and-white, and text-only, your impression may be wrong. Terminal is capable of producing surprisingly smooth, user-friendly, and graphical interface. Check cmatrix, btop, cava , and, may be most astounding of all, the spinning doughnut. Most of these are achieved by exploiting ANSI escaped sequence and termios POSIX standards. This post is a short summary of common functionalities. For more, check Wikipeida and termios man page. ...

May 4, 2025 · 3 min · 471 words

Git Cheatsheet

Git Commands Multiple remote repositories git remote set-url <remote-name> --push --add <url> It seems like whenever this commmand is used, the original --push remote is removed. The work around is to use this command again and add the original --push remote url. TODO h3 for command name seems to be too large. Find a way to apply custom css only to this page. h4 seems just write for command name, it does not show in the TOC. ...

April 21, 2025 · 1 min · 77 words

Deploy Hugo Blog site with Github Pages

Blogging with Hugo, Papermod, and Github pages is easy. (Writing the articles, of course, is a different business). This is a short guide for how to create and maintain such a website. To create a static blogging websites only requires Create the HTML, CSS, Javascript files, which are downloaded by the browser uponing entering its domain name; Obtain a domain name and host the files on a server connected to internect with this domain name. Hugo and Papermod can read the markdown files and produce stylish webpages. (That is the HTML, CSS, and Javascript files.) Github pages is a free remote service hosting the file and provide the domain name. ...

April 12, 2025 · 6 min · 1102 words