- Author: Karoy Lorentey
- Version: 2020-04-13/1
- Document URL: https://gist.github.com/lorentey/cf8703b5974ebe8f85cfb92a6628880d
- Forum Thread: https://forums.swift.org/t/low-level-atomic-operations/34683
- Implementation:
- [swiftlang/swift#30553][implementation] (Atomic operations)
- [swiftlang/swift#26969][constantPR] (Constant-constrained ordering arguments)
Hello, I’ve been working on implementing, optimizing, and improving String in preparation for ABI stability, and I thought I’d share the current status of String in Swift 5 and some potential directions to go. This is the product of conversations with open source contributors and my colleagues on the Swift standard library team at Apple.
The primary area of focus is stabilizing String’s ABI, but we’d be remiss if we couldn’t also fit in performance and ergonomic improvements. String’s ergonomics in particular is one area where we think the status quo is woefully inadequate, and over half of this email is devoted to that topic. At the end, there’s a section about a community initiative that we hope can help users of String as well as guide future development.
(Note: I’m sending this to swift-dev because much of the contents revolve around implementation concerns. I’ll also cross-reference on swift-evolution and swift-users. See also the [StringManife
if ((*(int8_t *)guard variable for __dynamic_cast::use_strcmp == 0x0) && (___cxa_guard_acquire(guard variable for __dynamic_cast::use_strcmp, rsi, rdx, rcx, r8, r9) != 0x0)) { | |
rsi = *_NSGetProgname(); | |
rcx = 0x1; | |
if (strcmp("Adobe Illustrator", rsi) != 0x0) { | |
rsi = *_NSGetProgname(); | |
rdx = 0x13; | |
rcx = strncmp("Adobe Photoshop CS5", rsi, rdx) == 0x0 ? 0x1 : 0x0; | |
} | |
*(int8_t *)__dynamic_cast::use_strcmp = rcx; | |
___cxa_guard_release(guard variable for __dynamic_cast::use_strcmp, rsi, rdx, rcx, r8, r9); |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.
PSPDF_EXTERN BOOL PSPDFIsBlock(id _Nullable block) { | |
static Class blockClass; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
blockClass = [^{} class]; | |
while ([blockClass superclass] != NSObject.class) { | |
blockClass = [blockClass superclass]; | |
} | |
}); |
import Darwin | |
enum Signal: Int32 { | |
case HUP = 1 | |
case INT = 2 | |
case QUIT = 3 | |
case ABRT = 6 | |
case KILL = 9 | |
case ALRM = 14 | |
case TERM = 15 |
> $PROJECT_DIR/merge.swift; find $PROJECT_DIR/ -iname *.swift -not -name merge.swift -exec cat {} >> $PROJECT_DIR/merge.swift \; |