This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GHCi, version 7.10.3: http://www.haskell.org/ghc/ :? for help | |
Prelude> 1 + 2 | |
3 | |
Prelude> minimum(100,1) | |
1 | |
Prelude> minimum(1,100) | |
100 | |
Prelude> let splat = splitAt 5 [0..10] | |
Prelude> splat | |
([0,1,2,3,4],[5,6,7,8,9,10]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Swift | |
struct SetGenerator<T : Hashable> : Generator { | |
var dictGenerator : DictionaryGenerator<T, Void> | |
init(_ d : Dictionary<T,Void>) { | |
dictGenerator = d.generate() | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// % clang -framework Foundation -o ObjCSuper ObjCSuper.m SuperTrampoline.s | |
// % ./ObjCSuper | |
// | |
// 2014-02-15 23:03:32.498 ObjCSuper[1296:507] Subclass impl | |
// 2012014-02-15 23:03:32.498 ObjCSuper[1296:507] Subclass impl4-02-15 23:03:32.500 ObjCSuper[1296:507] b respondsToSelector:@selector(retain)? YES | |
// 2014-02-15 23:03:32.500 ObjCSuper[1296:507] b respondsToSelector:@selector(subclassMethod)? YES | |
// 2014-02-15 23:03:32.501 ObjCSuper[1296:507] Superclass impl | |
// 2014-02-15 23:03:32.501 ObjCSuper[1296:507] b_super respondsToSelector:@selector(retain)? YES | |
// 2014-02-15 23:03:32.501 ObjCSuper[1296:507] b_super respondsToSelector:@selector(subclassMethod)? NO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: https://devforums.apple.com/message/866487#866487 | |
typedef int (*PYStdWriter)(void *, const char *, int); | |
static PYStdWriter _oldStdWrite; | |
int __pyStderrWrite(void *inFD, const char *buffer, int size) | |
{ | |
if ( strncmp(buffer, "AssertMacros: queueEntry", 24) == 0 ) { | |
return 0; |