Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| #!/bin/bash | |
| # | |
| # Build a virtual environment suitable for running appengine. | |
| # This uses virtualenvwrapper to make the virtual environment. | |
| # Which you can activate with 'workon appengine' | |
| # | |
| # Everyone loves one-liners! | |
| # Mac one-liner: | |
| # $ curl -s https://raw.github.com/gist/3021613 | bash | |
| # |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
| #!/bin/bash | |
| while : | |
| do | |
| clear | |
| git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $* | |
| sleep 1 | |
| done |
| // Taken from the commercial iOS PDF framework http://pspdfkit.com. | |
| // Copyright (c) 2013 Peter Steinberger. All rights reserved. | |
| // Licensed under MIT (http://opensource.org/licenses/MIT) | |
| // | |
| // You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it. | |
| #import <objc/runtime.h> | |
| #import <objc/message.h> | |
| // Compile-time selector checks. |
When Swift was first announced, I was gratified to see that one of the (few) philosophies that it shared with Objective-C was that exceptions should not be used for control flow, only for highlighting fatal programming errors at development time.
So it came as a surprise to me when Swift 2 brought (What appeared to be) traditional exception handling to the language.
Similarly surprised were the functional Swift programmers, who had put their faith in the Haskell-style approach to error handling, where every function returns an enum (or monad, if you like) containing either a valid result or an error. This seemed like a natural fit for Swift, so why did Apple instead opt for a solution originally designed for clumsy imperative languages?
I'm going to cover three things in this post: