Rust Project Structure for rust-canto

Lessons from vibe coding

Background

I created my first crate rust-canto even though I didn’t know Rust, so that I can bring automatic Cantonese word segmentation and romanizations into Typst.

This is a great idea. Moving from a complex xtask workspace to a streamlined build.rs and build.sh workflow is a common evolution for Rust projects, especially when targeting WebAssembly.

Five lessons learnt from chat bot

1. Avoid the “Crates.io Path Dependency” Trap

  • The Problem: Using a Workspace with a local helper crate.

    [Read More]

Typst Package for Jyutcitzi

Background

As a native Cantonese speaker, I found it inconvenient to repeat all the time when I have to teach others how to speak my language. I acquired Jyutping (粵拼) a couple of years ago. It’s a popular phonetic system for the Cantonese language. However, some of my fellow countrymen aren’t fond of this romanization scheme.

A soft “introduction” to “Introduction to Jyutcitzi”

Recently, I’ve heard of another phonetic system called Jyutcit (粵切). It’s basically a “cutting sound method” (切音法). Each syllable is “initial + final”. To compose a sound, we take two syllables, from which we keep

[Read More]

Cantonese vs Mandarin for Reading Tang Poems

Comparison using Du Mu's poem

This is a linkblog to a post on Discuss HK which claims how Mandarin (普通話) messes up the flat and oblique tones (平仄) of the regulate verse (近體詩) below.

《山行》 杜牧
遠上寒山石徑斜,白雲生處有人家。
停車坐愛楓林晚,霜葉紅於二月花。

Cantonese (粵語) Mandarin (普通話)
仄仄平平仄仄平
仄平平仄仄平平
平平仄仄平平仄
仄仄平平仄仄平
仄仄平平仄平
平平仄仄平平
平平仄仄平平仄
仄仄平平仄仄平

However, Kimery has checked the Mandarin pinyin (拼音) and (s)he doesn’t found such problem except for some characters with entering tone (入聲). Luckily, such characters are located at the odd numbered position of a verse. Eventually, (after considering other factors,) that won’t harm the variation of tones in principle.

[Read More]