Skip to content

Instantly share code, notes, and snippets.

@shlomiv
Last active December 15, 2015 12:59
Show Gist options
  • Save shlomiv/5264147 to your computer and use it in GitHub Desktop.
Save shlomiv/5264147 to your computer and use it in GitHub Desktop.
gloss
(def c (finite-frame (prefix :int16)
[:uuid :int32 (repeated (finite-frame (prefix :int16) (string :utf8)) :prefix :none)]))
(def p (encode c [:uuid 1000 ["ass" "hole"]]))
(let [fp (contiguous p)
s (.limit fp)
arr (.array fp)]
(doseq [i (range s)]
(print (aget arr i) " ")))
(decode c p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment