Akagi201
7/13/2015 - 3:35 PM

oc.md

cmd build

$ cat hello.m
#import <Foundation/Foundation.h>

int main(int argc, char **argv) {
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    NSLog(@"Hello world!");
    [pool drain];
    
    return 0;
}
$ clang -framework Foundation -o hello hello.m
$ ./hello 
2011-03-27 00:00:41.422 hello[661:903] Hello world!

repl

$ python
>>> from Foundation import *
>>> print NSDate.date()
2011-03-27 00:01:56 -0700