Khang Nguyen

Here are some projects I've worked on out of interest and to develop my skills as a programmer. These are either tools I use on a daily basis, or utilities that I feel the community strongly needs, but may or may not know if they want it yet.

Gitnu Oct 2021

Rust
Command Line Interface

Enumerate git status output

git-nu enumerates the status output so users can type numbers instead of filenames.

CI/CD using GitHub Actions which builds, tests, and deploys automatically to crates.io, where it has 16,000+ downloads.

Links: GitHub

Nvim Toggler Sep 2022

Lua
Neovim Plugin

Toggle opposites with two keystrokes

A neovim plugin that toggles between pairs of words.

Uses cases include flipping a boolean, or when writing CSS and toggling between opposites like vertical and horizontal.

This more powerful than vim’s built-in <cword>, as it can support toggles between pairs with spaces such as ’- [ ]’ and ’- [x]‘.

Links: GitHub

StatC Nov 2022

Rust
Command Line Interface
Statistics

Convenience routines for statistics calculations

StatC is a statistics calculator built for open-book exams, packaged neatly in a CLI app powered by clap.rs.

Deployed on crates.io, where it has 500+ downloads.

Links: GitHub

Wordle Apr 2023

Rust
Algorithms

Fast evaluation of solving wordle with Information Theory

The function calculating expected information gain runs in O(GA) time, where G is the number of guesses (12,974), and A is the number of answers (2,309).

This is calculated once per guess, and since all possible answers are simulated, the total runtime to find the average guesses required is O(A²G).

Caching is hence critical, and is implemented with a tree structure with guesses and outcomes (🟩🟩🟩🟨🟨) as nodes.

Links: GitHub