about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-11-07 17:34:47 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-11-07 17:34:51 -0800
commitd7389e15a86b2c9d6a35c578c325ee2c0dfa3926 (patch)
treecc78a7aad366dc1f4e4fc127f85f07300b0255b7
parent3ca102f0152f23718b72b35207e9272daf7514c3 (diff)
downloadmu-d7389e15a86b2c9d6a35c578c325ee2c0dfa3926.tar.gz
task 16: addressing sejo's feedback
I'm still not quite happy with this..
-rw-r--r--tutorial/index.md6
-rw-r--r--vocabulary.md9
2 files changed, 10 insertions, 5 deletions
diff --git a/tutorial/index.md b/tutorial/index.md
index c19af1ee..48173fbb 100644
--- a/tutorial/index.md
+++ b/tutorial/index.md
@@ -609,14 +609,14 @@ for a really complex example of this sort of _procedural graphics_.
 
 ## Task 16: a simple app
 
-We now know how to read keys from keyboard and draw on the screen. Look at
+We now know how to read keys from keyboard and draw on the screen. Try out
 [tutorial/counter.mu](https://github.com/akkartik/mu/blob/main/tutorial/counter.mu)
 which implements a simple counter app.
 
 <img alt='screenshot of the counter app' src='counter.png'>
 
-Do all the parts make sense? Read the extensive vocabulary of functions for
-[drawing text to screen](https://github.com/akkartik/mu/blob/main/vocabulary.md#printing-to-screen).
+Now look at its code. Do all the parts make sense? Reread the extensive
+vocabulary of functions for [drawing text to screen](https://github.com/akkartik/mu/blob/main/vocabulary.md#printing-to-screen).
 
 ---
 
diff --git a/vocabulary.md b/vocabulary.md
index f02b7fd3..27c9ea5f 100644
--- a/vocabulary.md
+++ b/vocabulary.md
@@ -43,6 +43,10 @@ how they work under the hood.
 - Code-points: integer representing a Unicode character. Must be representable
   in 32 bits as utf-8; largest supported value is 0x10000.
 
+Mu will let you convert between bytes, graphemes and code-points using `copy`,
+and trust that you know what you're doing. Be aware that doing so is only
+correct for English/Latin characters, digits and symbols.
+
 ### Functions
 
 The most useful functions from 400.mu and later .mu files. Look in
@@ -133,7 +137,7 @@ signatures.mu for their full type signatures.
 - `parse-decimal-int-from-slice`
 - `parse-decimal-int-from-stream`
 - `parse-array-of-decimal-ints`
-- `decimal-digit?`: checks if byte is in [0, 9]
+- `decimal-digit?`: checks if a grapheme is in [0, 9]
 
 #### printing to screen
 
@@ -250,7 +254,8 @@ Assertions for tests:
 #### events
 
 `read-key` reads a single key from the keyboard and returns it if it exists.
-Returns 0 if no key has been pressed.
+Returns 0 if no key has been pressed. Currently only support single-byte keys,
+which are identical to their code-point and grapheme representations.
 
 `read-line-from-keyboard` reads keys from keyboard, echoes them to screen
 (with given fg/bg colors) and accumulates them in a stream until it encounters