Skip to content

Instantly share code, notes, and snippets.

View jacksonh's full-sized avatar
🎯
Focusing

Jackson Harper jacksonh

🎯
Focusing
View GitHub Profile
csharp> Console.WriteLine ("empty int array: {0}", new int[0]);
empty int array: System.Int32[]
csharp> Console.WriteLine ("empty string array: {0}", new string[0]);
System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
at System.String.FormatHelper (System.Text.StringBuilder result, IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
at System.String.Format (IFormatProvider provider, System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
at System.String.Format (System.String format, System.Object[] args) [0x00000] in <filename unknown>:0
at System.IO.TextWriter.Write (System.String format, System.Object[] arg) [0x00000] in <filename unknown>:0
at System.IO.TextWriter.WriteLine (System.String format, System.Object[] arg) [0x00000] in <filename unknown>:0
at System.IO.SynchronizedWriter.WriteLine (System.String format, System.Object[] value) [0x000
var words = [ "tea", "dog", "eat", "god", "ate", "bratwurst" ]
//
// pair each word with a unique key of the letters in that word
// by sorting the letters of the word
//
let pairs = words.map { (word) -> (key : String, word : String) in
let key = String (seq: sorted (word))
return (key : key, word: word)
0 MapKit _contains(objc_object*, MKQuadTrieNode*) + 91
1 MapKit _insertionNodeForItem(objc_object*, MKQuadTrieNode*) + 258
2 MapKit -[MKQuadTrie contains:] + 24
3 MapKit -[MKAnnotationManager _removeAnnotation:updateVisible:removeFromContainer:] + 58
4 MapKit -[MKAnnotationManager removeAnnotation:] + 28
5 MapKit -[MKMapView(UserPositioning) stopUpdatingUserLocation] + 158
{
meta = {
limit = 1000;
next = "<null>";
offset = 0;
previous = "<null>";
"total_count" = 1;
};
objects = (
{
{
meta = {
limit = 1000;
next = "<null>";
offset = 0;
previous = "<null>";
"total_count" = 1;
};
objects = (
{
@jacksonh
jacksonh / introrx.md
Last active August 29, 2015 14:06 — forked from staltz/introrx.md

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.

MonkeySpace Europe

Here are some of the things I'm looking forward to at MonkeySpace this year.

Let's talk Mvvm by Stuart Lodge: I've really been getting in to the MVVM pattern lately, but have a lot of questions about how best to structure things. Excited to see how people have been using the pattern for years architect their apps.

ReactiveUI - Because Reasons by Brendan Forster: Again, I'm using Reactive a lot now and want to hear from more experienced users.

Reaching the Chinese App Market by Jonathan Peppers: Ummm hell yeah. So much potential there and it'll be amazing to hear from someone that has had success in that market. I imagine even if you aren't focusing on China, the general internationalization discussion will be beneficial.

- (RACSignal *)foo
{
return [[self someSignal] flattenMap] flattenMap:^RACStream *(id value) {
// ... some logic in here
// But for some reason I've decided to return foo again
return [self foo];
}];
}
int main(int argc, char* argv[])
{
@autoreleasepool {
@try {
int retVal = UIApplicationMain(argc, argv, nil, @"AppDelegate");
return retVal; }
@catch (NSException *exception) {
NSLog (@"UNHANDLED EXCEPTION:\n%@", exception);
}
}
### Keybase proof
I hereby claim:
* I am jacksonh on github.
* I am jacksonh (https://keybase.io/jacksonh) on keybase.
* I have a public key whose fingerprint is 4EE5 BEC0 8593 764A CAB1 193E 3E32 D568 F1A7 A420
To claim this, I am signing this object: