This file contains 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
// Open-ended range operators | |
// | |
// 100... is equivalent to 100...Int.max | |
// ...-100 is equivalent to Int.min...-100 | |
// ..<3 is equivalent to Int.min..<3 | |
import Swift | |
/// Conforming types provide static `max` and `min` constants. | |
protocol MinMaxType { |
This file contains 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
$ cat test.js | |
function foo () { while (true) { } } | |
function bar () { return foo(); } | |
bar(); | |
$ node test.js & | |
$ gdb attach $(pidof node) | |
0x00000bf778c63d5f in ?? () | |
(gdb) b v8::internal::Runtime_StackGuard | |
Breakpoint 1 at 0x84a1f0 | |
(gdb) print 'v8::V8::TerminateExecution'(0) |
This file contains 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 <objc/runtime.h> | |
#import <stdlib.h> | |
// declare some of the Objective-C runtime's private parts where we can see them | |
typedef struct _NXMapTable NXMapTable; | |
extern NXMapTable *gdb_objc_realized_classes; | |
extern void *NXMapInsert(NXMapTable *table, const void *key, const void *value); | |
@implementation NSObject (Poser) |