- Introduction to Functional Programming Johannes Weiß - https://vimeo.com/100786088
- ReactiveCocoa at MobiDevDay Andrew Sardone - https://vimeo.com/65637501
- The Future Of ReactiveCocoa Justin Spahr-Summers - https://www.youtube.com/watch?v=ICNjRS2X8WM
- Enemy of the State Justin Spahr-Summers - https://www.youtube.com/watch?v=7AqXBuJOJkY
- WWDC 2014 Session 229 - Advanced iOS Application Architecture and Patterns Andy Matuschak - https://developer.apple.com/videos/play/wwdc2014/229/
- Functioning as a Functionalist Andy Matuschak - https://www.youtube.com/watch?v=rJosPrqBqrA
- Controlling Complexity in Swift Andy Matuschak - https://realm.io/news/andy-matuschak-controlling-complexity/
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
void (^benchmark)(const char *str) = ^(const char *str) { | |
const long count = 10000000; | |
NSDate *start = [NSDate date]; | |
for (long i = 0; i < count; i++) { | |
(void)[[NSString alloc] initWithUTF8String:str]; | |
} |
@interface PSPDFWindow () | |
@property (nonatomic, strong) UIViewController *realRootViewController; | |
@end | |
@implementation PSPDFWindow | |
- (void)setHidden:(BOOL)hidden { | |
[super setHidden:hidden]; | |
// Workaround for rdar://19592583 |
// ideally we would define this inside the tree struct | |
private class _Node<T: Comparable> { | |
var _value: T | |
var _left: _Node<T>? = nil | |
var _right: _Node<T>? = nil | |
init(value: T) { _value = value } | |
} |
See this SO discussion.
- https://github.com/simonwhitaker/swmath — define new functions which utilize clang function overloading
-> <ViewController:0x79634cd0>: -[UIViewController presentViewController:<NavigationController: 0x7ba7dab0> animated:1 completion:(null)] | |
--> <ViewController:0x79634cd0>: -[UIViewController _transitionCoordinator] | |
---> <ViewController:0x79634cd0>: -[UIViewController _presentationController] | |
===> (null) | |
---> <ViewController:0x79634cd0>: -[UIViewController presentedViewController] | |
----> <ViewController:0x79634cd0>: -[UIViewController childModalViewController] | |
====> (null) | |
===> (null) | |
---> <ViewController:0x79634cd0>: -[UIViewController childModalViewController] | |
===> (null) |
Season's Greetings, NSHipsters!
As the year winds down, and we take a moment to reflect on our experiences over the past months, one thing is clear: 2014 has been an incredible year professionally for Apple developers. So much has happened in such a short timespan, and yet it's hard to remember our relationship to Objective-C before Swift, or what APIs could have captivated our imagination as much as iOS 8 or WatchKit.
It's an NSHipster tradition to ask you, dear readers, to send in your favorite tips and tricks from the past year for publication over the New Year's holiday. This year, with the deluge of new developments—both from Cupertino and the community at large—there should be no shortage of interesting tidbits to share.
Submit your favorite piece of Swift or Objective-C trivia, framework arcana, hidden Xcode feature, or anything else you think is cool, and you could have it featured in the year-end blowout article. Just comment on this gist below!
If you're wondering about what to post, look to
// | |
// CollectionViewDataSource.swift | |
// Khan Academy | |
// | |
// Created by Andy Matuschak on 10/14/14. | |
// Copyright (c) 2014 Khan Academy. All rights reserved. | |
// | |
import UIKit |
This document is a collection of concepts and strategies to make large Elm projects modular and extensible.
We will start by thinking about the structure of signals in our program. Broadly speaking, your application state should live in one big foldp
. You will probably merge
a bunch of input signals into a single stream of updates. This sounds a bit crazy at first, but it is in the same ballpark as Om or Facebook's Flux. There are a couple major benefits to having a centralized home for your application state:
- There is a single source of truth. Traditional approaches force you to write a decent amount of custom and error prone code to synchronize state between many different stateful components. (The state of this widget needs to be synced with the application state, which needs to be synced with some other widget, etc.) By placing all of your state in one location, you eliminate an entire class of bugs in which two components get into inconsistent states. We also think yo