Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; l33tsp34k:
- ; (display (l33t "You know, I truly wanna kill whomever came up with entries for M, N, Y and W."))
- (define (l33t s)
- (apply string-append
- (map (lambda (c)
- (let ((trns (assoc c l33t-table)))
- (if trns
- (vector-ref (cdr trns) (random! (vector-length (cdr trns))))
- (string c))))
- (upper (string->list s)))))
- (define l33t-table
- (map (lambda (x) (cons (car x) (apply vector (cdr x))))
- '((#\A "4" "@" "/-\\" "/\\" "^" "aye" "∂" "ci" "λ" "Z")
- (#\B "8" "|3" "6" "13" "|3" "ß" "]3")
- (#\C "(" "<" "¢" "{" "©" "sea" "see")
- (#\D "|)" "[)" "∂" "])" "I>" "|>" "0" "ð" "cl")
- (#\E "3" "£" "&" "€" "[-" "ə")
- (#\F "|=" "]=" "}" "ph" "(=" "ʃ")
- (#\G "6" "9" "&" "(_+" "C-" "gee" "jee" "(γ," "cj")
- (#\H "|-|" "#" "]-[" "[-]" ")-(" "(-)" ":-:" "}{" "}-{" "aych")
- (#\I "!" "1" "|" "eye" "3y3" "ai" "¡")
- (#\J "_|" "_/" "]" "¿" "</" "_)" "ʝ")
- (#\K "X" "|<" "|X" "|{" "ɮ")
- (#\L "1" "7" "|_" "£" "|" "|_" "lJ" "¬")
- (#\M "44" "/\\/\\" "|\\/|" "em" "|v|" "IYI" "IVI" "[V]" "^^" "nn"
- "//\\\\//\\\\" "(V)" "(\\/)" "/|\\" "/|/|" ".\\\\" "/^^\\" "/V\\" "|^^|" "AA")
- (#\N "|\\|" "/\\/" "//\\\\//" "И" "[\\]" "<\\>" "{\\}" "//" "₪" "[]\\[]" "]\\[" "~")
- (#\O "0" "()" "oh" "[]" "¤" "Ω")
- (#\P "|*" "|o" "|º" "|>" "|\"" "?" "9" "[]D" "|7" "q" "þ" "¶" "℗" "|D")
- (#\Q "0_" "0," "(,)" "<|" "cue" "9" "¶")
- (#\R "|2" "2" "/2" "I2" "|^" "|~" "lz" "®" "|2" "[z" "|`" "l2" "Я" ".-" "ʁ")
- (#\S "5" "$" "z" "§" "es")
- (#\T "7" "+" "-|-" "1" "']['" "†")
- (#\U "|_|" "(_)" "Y3W" "M" "µ" "[_]" "\\_/" "\\_\\" "/_/")
- (#\V "\\/" "√" "\\\\//")
- (#\W "\\/\\/" "vv" "'//" "\\\\'" "\\^/" "(n)" "\\X/" "\\|/" "\\_|_/"
- "\\\\//\\\\//" "\\_:_/" "]I[" "UU" "Ш" "ɰ" "₩" "JL")
- (#\X "%" "><" "Ж" "}{" "ecks" "×" "*" ")(" "ex")
- (#\Y "j" "`/" "`(" "-/" "'/" "Ψ" "φ" "λ" "Ч" "¥")
- (#\Z "2" "≥" "~/_" "%" "ʒ" "7_"))))
- ; ok, so I'm being a masochist for not simply using R6RS or some other...
- ; I'm a gluton for punishment... :p
- (define upper
- (let ((ups "ABCDEFGHIJKLMNOPQRSTUVWXYZ")
- (lows (let* ((s "abcdefghijklmnopqrstuvwxyz") (sz (string-length s)))
- (let f ((i 0))
- (if (= i sz) `()
- (cons (cons (string-ref s i) i)
- (f (+ 1 i))))))))
- (lambda (ls)
- (map (lambda (c) (let ((r (assoc c lows))) (if r (string-ref ups (cdr r)) c)))
- ls))))
- (define random!
- (let ((seed 42))
- (lambda (upto)
- (let ((n (+ 3 (* 2 seed))))
- (set! seed (+ 1 (modulo n seed) seed))
- (modulo n upto)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement