Cole’s Random Notes

Partition Methods of Quicksort

Generally speaking, Quicksort can use two types of partition methods. The first of which partitions the array into 3 parts: =(<=pivot), (pivot), (>pivot)=. And the latter partitions the array into 2 parts. I will introduce two coresponding algorithms: Hoare’s and Lomuto partition algorithm.

July 11, 2022 · 3 min · Sduby

Build a website with Hugo & Github Pages & Cloudflare

Build a website with Hugo+Github Pages+Cloudflare

July 6, 2022 · 4 min · Sduby

Build a Modern Tetris Game With Bevy and Rust

Todo List Stage 1 A frame displaying our game 10x20 game board All 7 kinds of pieces: I, J, L, O, S, T, Z Spawn a piece Move the pieces left, right, and down Detect collisions Freeze the pieces and spawn new ones Stage 2

1 min

Hello World

Hello World!!

1 min · Sduby

Use Mold Linker in Rust

Use Mold Linker in Rust Mold linker is a fast and memory-efficient linker. It is a drop-in replacement for GNU ld and lld. It is a good choice for Rust projects. (5x faster than GNU ld and 2x faster than lld) Add the following to your Cargo config at YOUR_WORKSPACE/.cargo/config.toml: [target.x86_64-unknown-linux-gnu] linker = "clang" rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold"] mold does not yet support MacOS, but can use zld as an alternative: brew install michaeleisel/zld/zld...

1 min