Better HN
topnewbestaskshowjobs
Log inSign up

fadjfadjiiitlz

1 karma · joined Aug 3, 2022 (4y ago) · 1 submissions

Submissions

comment 4y ago · link · parent

* Fortunately the Unicode database contains a mapping of which characters are single width and which are double. Rich (and Textual) will look up this database for every character it prints. Its not a cheap operation, but with a bit of engineering effort and caching (see lru_cache) it is fast enough. *

A bitmap sounds suitably compact and fast. There are likely to be large intervals of double-only or single-only items so it may be even smaller.

Regarding your hiring it would be nice to actually get a reply, and say why if you don't want a person.