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 Foundation | |
extension Int8 { | |
var asUInt16: UInt16 { | |
// return UInt16(Int16(self) & 0xff) | |
return UInt16(UInt8(bitPattern: self)) | |
} | |
} |
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 Foundation | |
let GlobalQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) | |
class EchoServer { | |
// let localQueue = dispatch_queue_create("\(EchoServer.self)", |
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 Foundation | |
struct IntList { | |
static let NIL = IntList() | |
var isEmpty: Bool { | |
return cell == nil | |
} | |
var head: Int? { |
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
// | |
// ToyGC.swift | |
// ToyGC | |
// | |
// Created by satoshia on 2015/08/31. | |
// Copyright © 2015 satoshia. All rights reserved. | |
// | |
import Darwin | |
import Foundation |