Ben Chuanlong Du's Blog

It is never too late to learn.

Async in Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  1. Minimizing usage of async Rust. Refactor coded as much as possible to be in sync functions, and have async just be little "router wrappers" for waiting on stuff and feeding it …

The ripgrep Command Is a Better Alternative to the find Command

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Installation on Debian/Ubuntu Based Linux Distributions

wajig install ripgrep 

Installation on macOS

brew install ripgrep 

List Files

There are 2 ways to list files using ripgrep. The first way is file name (globbing pattern) based and the second way is file content (regex pattern) based.

Useful Rust Crates for String

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

indoc

The indoc crate provides a procedural macro for indented string literals. The indoc!() macro takes a multiline string literal and un-indents it at compile time so the leftmost non-space character …

Useful Rust Crates for Database

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Neon

Neon is a serverless open-source alternative to AWS Aurora Postgres. It separates storage and compute and substitutes the PostgreSQL storage layer by redistributing data across a cluster of nodes.

sqlx …

LLM in Rust

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

  • llm

    llm is an ecosystem of Rust libraries for working with large language models - it's built on top of the fast, efficient GGML library for machine learning.

  • llama2.rs

  • ollama-rs

    A …