I hereby claim:
- I am cmyr on github.
- I am cmyr (https://keybase.io/cmyr) on keybase.
- I have a public key whose fingerprint is EBDF 6E34 C4B6 E898 9B04 A3F8 9003 3316 D794 8447
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
WARNINGTAGS="FIXME:|\?\?\?:" | |
ERRORTAGS="\!\!\!:" | |
find "${SRCROOT}" \( -name "*.swift" -or -name "*.m" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($WARNINGTAGS).*\$" | perl -p -e "s/($WARNINGTAGS)/ warning: \$1/" | |
if [ "${CONFIGURATION}" = "Release" ] | |
then | |
find "${SRCROOT}" \( -name "*.swift" -or -name "*.m" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($ERRORTAGS).*\$" | perl -p -e "s/($ERRORTAGS)/ error: \$1/" |
const SSID_OPTS: i32 = _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_EACH | _SIDD_UNIT_MASK | |
| _SIDD_LEAST_SIGNIFICANT | _SIDD_NEGATIVE_POLARITY; | |
/// # Examples | |
/// | |
/// ``` | |
/// let one = "aaaaaaaaaaaaaaaa"; | |
/// let two = "aa3aaaaa9aaaEaaa"; | |
/// //NOTE: reversed | |
/// let exp = "0001000100000100"; |
2018-12-27
So I had a frustrating week, last week. I'd been spending much of december working on a long-standing feature for xi, line breaking / word wrap. That is; the ability to wrap lines of text to the width of the window, as needed. This is table stakes for a text editor (or a text view, or a web browser, or anything that displays text in a variable width window) but it's something we had until now only half-done.
This problem has some nuance. To back up: We have a string, and we have a width (of a window, say), and we need to determine how to break the string up so that it fits in the given window. To do this, we need to know two things at runtime: where in the string we are allowed to create a line break (the break opportunities), and the width required to draw various 'atoms' of the string, where an 'atom' is a sub-string that cannot contain a line break.