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
| var d: [Int:Int] = Dictionary(minimumCapacity: 64) | |
| d[1] = 1 | |
| let idx = d.startIndex | |
| println(d[idx]) | |
| for i in 1 ..< 63 { | |
| d[1 + 64*i] = 1+64*i | |
| } |
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
| % otool -L librustc-4e7c5e5c.dylib | |
| librustc-4e7c5e5c.dylib: | |
| x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc-4e7c5e5c.dylib (compatibility version 0.0.0, current version 0.0.0) | |
| x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libgraphviz-4e7c5e5c.dylib (compatibility version 0.0.0, current version 0.0.0) | |
| x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librbml-4e7c5e5c.dylib (compatibility version 0.0.0, current version 0.0.0) | |
| x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_back-4e7c5e5c.dylib (compatibility version 0.0.0, current version 0.0.0) | |
| x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/librustc_llvm-4e7c5e5c.dylib (compatibility version 0.0.0, current version 0.0.0) | |
| x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libsyntax-4e7c5e5c.dylib (compatibility version 0.0.0, current version 0.0.0) | |
| x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-dar |
This file has been truncated, but you can view the full file.
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
| dyld: bind: librustrt-4e7c5e5c.dylib:0x109FA1010 = libsystem_c.dylib:___stack_chk_guard, *0x109FA1010 = 0x7FFF78DA1420 | |
| dyld: bind: librustrt-4e7c5e5c.dylib:0x109FCAE48 = libdyld.dylib:__tlv_bootstrap, *0x109FCAE48 = 0x7FFF8DB512FB | |
| dyld: bind: librustrt-4e7c5e5c.dylib:0x109FA1000 = libdyld.dylib:dyld_stub_binder, *0x109FA1000 = 0x7FFF8DB4F210 | |
| dyld: bind: libsync-4e7c5e5c.dylib:0x109E58000 = librustrt-4e7c5e5c.dylib:__ZN3vec32Vec$LT$T$GT$.MutableSeq$LT$T$GT$4push10_FILE_LINE20h447460f3c713aeaem7jE, *0x109E58000 = 0x109FA19E0 | |
| dyld: bind: libsync-4e7c5e5c.dylib:0x109E58008 = librustrt-4e7c5e5c.dylib:__ZN4util14ENFORCE_SANITY20h64f5d76e4f1568d43AaE, *0x109E58008 = 0x109F57B90 | |
| dyld: bind: libsync-4e7c5e5c.dylib:0x109E58010 = librustrt-4e7c5e5c.dylib:__ZN6option15Option$LT$T$GT$6unwrap10_FILE_LINE20hc8e72f136c9445fazOmE, *0x109E58010 = 0x109FC9D70 | |
| dyld: bind: libsync-4e7c5e5c.dylib:0x109ED8428 = librustrt-4e7c5e5c.dylib:__ZN9local_ptr8compiled10RT_TLS_PTR20h32738c8eba9842c5klaE, *0x109ED8428 = 0x109FCAE48 | |
| dyld: bind |
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
| librustc-4e7c5e5c.dylib: | |
| Load command 0 | |
| cmd LC_SEGMENT_64 | |
| cmdsize 632 | |
| segname __TEXT | |
| vmaddr 0x0000000000000000 | |
| vmsize 0x0000000000aea000 | |
| fileoff 0 | |
| filesize 11444224 | |
| maxprot 0x00000007 |
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
| tmp: | |
| Load command 0 | |
| cmd LC_SEGMENT_64 | |
| cmdsize 72 | |
| segname __PAGEZERO | |
| vmaddr 0x0000000000000000 | |
| vmsize 0x0000000100000000 | |
| fileoff 0 | |
| filesize 0 | |
| maxprot 0x00000000 |
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
| dyld: loaded: /Users/john/./tmp | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/librustc-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/libgraphviz-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/libgetopts-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/libflate-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/libtime-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/librbml-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/librustc_llvm-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/libnative-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/librustc_back-4e7c5e5c.dylib |
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
| dyld: loaded: /Users/john/./tmp | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/librustc-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/libgraphviz-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/libgetopts-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/libflate-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/libtime-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/librbml-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/librustc_llvm-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/libnative-4e7c5e5c.dylib | |
| dyld: loaded: /usr/local/lib/rustlib/x86_64-apple-darwin/lib/librustc_back-4e7c5e5c.dylib |
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
| var rot13key = [Character:Character]() | |
| let uppercase = Array("ABCDEFGHIJKLMNOPQRSTUVWXYZ") | |
| let lowercase = Array("abcdefghijklmnopqrstuvwxyz") | |
| for var i = 0; i < 26; i++ { | |
| rot13key[uppercase[i]] = uppercase[(i + 13) % 26] | |
| rot13key[lowercase[i]] = lowercase[(i + 13) % 26] | |
| } | |
| func rot13(s: String) -> String { | |
| return String(seq: map(s, { rot13key[$0] ?? $0 })) |
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
| extension Int : LogicValue { | |
| func getLogicValue() -> Bool { | |
| return self % 2 == 0 | |
| } | |
| } | |
| if !3 { | |
| let x = "odd is false" | |
| } |