This gist started Wednesday 29th August. We have until Friday 7th September to upgrade to Elm 0.19. This is a bunch of notes which I'm keeping track of to eventually turn into an article later on. Hope it helps your upgrade.
428 Elm files.
The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).
My take-aways are:
You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.
Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse
Download the appropriate Kali Linux .iso
I used a 64 bit .iso image, downloaded via HTTP. I downloaded the amd64 weekly version, as the pool linux headers (needed below for installation of wireless drivers) were ahead of the stable release kernel.
Download the SHA256SUMS and SHA256SUMS.gpg files from the same location.
How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?
These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.
By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.
Author: Chris Lattner
| # Note: You MUST have curl 7.47+ with http/2 support compiled in | |
| curl -v \ | |
| -d '{"aps":{"alert":"<message>","badge":42}}' \ | |
| -H "apns-topic: <bundle id>" \ | |
| -H "apns-priority: 10" \ | |
| --http2 \ | |
| --cert <certificate file> \ | |
| https://api.development.push.apple.com/3/device/<device token> |
Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.
This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.
This is a curated list of iOS (Swift & ObjC) frameworks which are inspired by React and Elm.
| #!/bin/bash | |
| component=$1 | |
| version=$(/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' Info.plist) | |
| IFS="." read major minor patch <<< "$version" | |
| echo "$version" | |
| if [[ "$component" = 'major' ]]; then |
| extension String { | |
| /// Truncates the string to length number of characters and | |
| /// appends optional trailing string if longer | |
| func truncate(length: Int, trailing: String? = nil) -> String { | |
| if self.characters.count > length { | |
| return self.substringToIndex(self.startIndex.advancedBy(length)) + (trailing ?? "") | |
| } else { | |
| return self | |
| } | |
| } |