Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
LAST TIME I WAS IN A PLAY GROUND I GOT BUSTED
typealias BOOLAEN = Bool
typealias LIKEON68K = UInt16
typealias LIKEONPENTIUM = UInt32
typealias STRING = String
typealias STRINGINDEX = String.Index
typealias BOOL = Bool
typealias UNICODESCALER = UnicodeScalar
typealias GONADS = String
typealias NUMBERSWITHDOTS = Double
typealias CH = Character
typealias AMANA = Range<STRINGINDEX>
typealias PENTIUMARRAY = Array<LIKEONPENTIUM>
extension STRING {
func HASLETTERS() -> BOOLAEN {
return !self.isEmpty
}
mutating func FIRSTLETTER() -> CH {
return self.removeAtIndex(self.startIndex)
}
}
class CHOCKLASS {
enum AWESOMELEVEL : LIKEON68K {
case ME = 0o177777, EVERYONEELSE
func SHOWIT() -> STRING {
var GREETS = (self == .EVERYONEELSE ? "LOSER" : "CHOCK")
var LEVEL = NUMBERSWITHDOTS(self.rawValue)
return "YOURE AWESOMELEVEL IS \(LEVEL) \(GREETS)"
}
}
class func ISITAWESOME(PERSON : STRING, WITHSEX : STRING) -> BOOL {
return (PERSON == "CHOCK" || WITHSEX == "YES")
}
class func FIX(var MESSEDUP : STRING) -> STRING {
var YOUREWELCOME = STRING()
while MESSEDUP.HASLETTERS() {
var PROBABLYWRONG = MESSEDUP.FIRSTLETTER()
switch PROBABLYWRONG {
case "a"..."z":
var MAGICALLETTERS = STRING(PROBABLYWRONG).unicodeScalars
var NUM = MAGICALLETTERS.removeAtIndex(MAGICALLETTERS.startIndex)
var BETTERNUM = NUM.value - 0x20
YOUREWELCOME += STRING(UNICODESCALER(BETTERNUM))
case "A"..."Z", " ":
YOUREWELCOME += STRING(PROBABLYWRONG)
default:
YOUREWELCOME += " DUH "
}
}
return YOUREWELCOME
}
class func SECURITY(var TOPSECRET : STRING) -> STRING {
var ROTWHATEVER = PENTIUMARRAY()
for MAGICALNUM in TOPSECRET.unicodeScalars {
ROTWHATEVER.append(MAGICALNUM.value)
}
ROTWHATEVER = ROTWHATEVER.reverse()
return "".join(ROTWHATEVER.map({STRING(UNICODESCALER($0))}))
}
private var PARTS : GONADS
init () {
self.PARTS = "HUGE"
}
class func SWAP<TYPE>(inout HOTT: TYPE, inout HOTTER: TYPE) {
let FLUFFER = HOTT
HOTT = HOTTER
HOTTER = FLUFFER
}
}
CHOCKLASS.ISITAWESOME("TED", WITHSEX: "M")
CHOCKLASS.ISITAWESOME("CHOCK", WITHSEX: "MUCHO")
CHOCKLASS.ISITAWESOME("BABS", WITHSEX: "YES")
var GIRLFRIEND = "CANDI"
var WIFE = "BABS"
CHOCKLASS.SWAP(&WIFE, HOTTER: &GIRLFRIEND)
var ME = CHOCKLASS()
ME.PARTS
CHOCKLASS.FIX("Am I crazy?")
CHOCKLASS.AWESOMELEVEL.ME.SHOWIT()
CHOCKLASS.AWESOMELEVEL.EVERYONEELSE.SHOWIT()
CHOCKLASS.SECURITY("SEKRET96")
CHOCKLASS.SECURITY(CHOCKLASS.FIX("My voice is my password."))
@getaaron

This comment has been minimized.

Copy link

getaaron commented Nov 13, 2014

Weird that playground doesn't show an integer overflow warning on line 24.

@chockenberry

This comment has been minimized.

Copy link
Owner Author

chockenberry commented Nov 13, 2014

@getaaron Yeah, I was surprised by that, too. It just wraps around, which is unlikely in practice. But THE CHOCK Is never unlikely with impractical matters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.