Archive for October 23, 2015

Friday, October 23, 2015

Dark Corners of Unicode

Lexy Munroe (via Ole Begemann):

This is a particularly aggravating problem because most programming languages have facilities for comparing and changing the case of text built in, and most of them are extremely naïve about it. You can’t even correctly change the case of English-looking text without knowing what locale it came from — the title-case of “istanbul” may actually be “İstanbul” depending on language, because of Turkish’s dotted “i”.


There’s a character called U+200D ZERO WIDTH JOINER, which is used to combine otherwise distinct characters in some languages (but has fairly general semantics). Apple has made creative use of this character to compose emoji together. The report on emoji has some examples. So now the length of some text is completely arbitrary, based on whatever arbitrary ligatures the font includes.


Arguably, 16-bit faux strings are worse than 8-bit faux strings. It becomes pretty obvious pretty quickly that 8 bits is not enough to fit more than some European alphabets, and anyone but the most sheltered programmer is forced to deal with it the first time they encounter an em dash. But 16 bits covers the entire BMP, which contains all current languages, some ancient languages, dingbats, mathematical symbols, and tons of punctuation. So if you have 16-bit faux strings, it’s very easy to think you have all of Unicode automatically handled and then be sorely mistaken.

See also Nicolas Seriot’s Unicode Hacks (via Cédric Luthi).

Clang Is the Next WebKit

Guy English:

Clang appears to be following the same path that WebKit has. Apple switched over to Clang years ago and the pace of development of Objective-C accelerated immediately. A few years ago Clang became the default compiler for FreeBSD, displacing GCC. In early May Microsoft announced that they’re Bringing Clang to Windows. According to The Register, Microsoft will have a release of Visual Studio that uses Clang as the front-end to their compiler in November.

So then the next question is whether Microsoft will feel the need to fork Clang, as Google did with WebKit.

Lisp Implemented in sed and Make

SedLisp (via Matthew Kane Parker, comments):

Though this Lisp implementation does not support eval function, we can implement eval on top of this interpreter - eval.l is the implementation.

MakeLisp (comments):

GNU make has two builtin functions, $(shell) and $(guile), which make the implementation less interesting. For example, GNU make lacks arithmetic operations, but you can easily add two numbers by $(shell expr 3 + 4) or $(guile (+ 3 4)). So, makelisp does not use either of them, except a single $(shell cat /dev/stdin) function call to make it easier for users to pass Lisp programs to makelisp.

Sorkin and Boyle’s “Steve Jobs”

John Gruber:

If you want to see a movie where Steve Wozniak is begging Steve Jobs to thank the Apple II engineering team on stage in 1998’s iMac introduction, and in which Jobs blames Woz for the Newton, go buy a ticket.

See also: Rick Tetzeli.


Russ Cox (via Arq Backup):

This software reads backups written by Arq. It is not affiliated with or connected to Haystack Software.


Arqfs creates a virtual file system using the FUSE file system layer. On OS X, it requires OSXFUSE.

Here’s the archived code repository.