Posts

Post not yet marked as solved
4 Replies
If you need a lot of shared memory, use a memory-mapped file instead. Create a file, then call mmap on it with permissions PROT_READ | PROT_WRITE and attributes MAP_FILE | MAP_SHARED. If you don't want the file to hang around in the filesystem, you can delete (unlink) it as soon as your process(es) have mapped it; the memory remains valid until the memory map is removed or all the processes exit.
Post marked as solved
3 Replies
It doesn't answer the question about when to use Lazy Stacks and when not to.  I think it did. First consider the "rule of thumb" while coding; then profile the app and if there are performance issues involving a particular Stack, try changing its laziness and see if that helps. Why not make all stacks Lazy stacks, and implement the above rule of thumb in the compiler?  Presumably because the decision about whether a Stack should be lazy is not one that can be made by an algorithm. If that rule of thumb were hardcoded, there would probably be cases where it turned out to be wrong, and the app developer wouldn't be able to do anything about it. Programming is full of situations where there are multiple ways to do something, with different performance characteristics. Should I implement this property as a precomputed value, or lazily evaluate it when it's accessed? Should I use a search tree or a hash table here? Etc.
Post not yet marked as solved
1 Replies
I'm pretty new to CloudKit, but I know that everything iOS sends to/from servers is encrypted, mostly with TLS/SSL. (Apple has been trying hard for years to get developers to stop using unencrypted HTTP connections; that's what the App Transport Security mechanism is for.)
Post marked as solved
2 Replies
As often happens, soon after posting a question I discovered a solution. Specifically, mbedTLS does have a function that enables callback-based root cert lookup. It's called `mbedtls_ssl_conf_ca_cb()` — with a name like that I don't know why it didn't leap out at me earlier 🙄So yes, using that function I can evaluate a cert passed to me by mbedTLS during the handshake, using the SecTrust API, and find and return the appropriate root cert. Problem solved!
Post marked as solved
11 Replies
You may not have overlooked it — the key sentence "To preview and interact with views from the canvas in Xcode, ensure your Mac is running macOS 10.15 beta" doesn't exist in the developer docs in Xcode, so it must have been added more recently. I didn't notice it when I looked at the tutorial online on Tuesday, so it may not have been online then either.This is disappointing — I was excited to try this out, but there's no way I'm installing the first developer beta of an OS (been burned that way before...)