From d253a3182859c7c989449122a60d5f362f19ded0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 9 Nov 2021 08:12:11 -0800 Subject: rename grapheme to code-point-utf8 Longer name, but it doesn't lie. We have no data structure right now for combining multiple code points. And it makes no sense for the notion of a grapheme to conflate its Unicode encoding. --- mu.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mu.md') diff --git a/mu.md b/mu.md index cfecadf0..428a28d0 100644 --- a/mu.md +++ b/mu.md @@ -80,7 +80,7 @@ You can store several types in these registers: - (addr T) (address into memory) - byte (uses only 8 bits) - code-point (Unicode) - - grapheme (code-point encoded in UTF-8) + - code-point-utf8 (code-point encoded in UTF-8) There's one 32-bit type you _cannot_ store in these registers: - float @@ -579,9 +579,9 @@ are a few functions to help with them: # bytes append-byte s: (addr stream byte), var: int # write lower byte of var var/eax: byte <- read-byte s: (addr stream byte) - # 32-bit graphemes encoded in UTF-8 - write-grapheme out: (addr stream byte), g: grapheme - g/eax: grapheme <- read-grapheme in: (addr stream byte) + # 32-bit code-point-utf8s encoded in UTF-8 + write-code-point-utf8 out: (addr stream byte), g: code-point-utf8 + g/eax: code-point-utf8 <- read-code-point-utf8 in: (addr stream byte) ``` You can check if a stream is empty or full: -- cgit 1.4.1-2-gfad0