Skip to content

Instantly share code, notes, and snippets.

@shakdwipeea
Created December 3, 2019 09:55
Show Gist options
  • Save shakdwipeea/d5dcf9f883450eee6b8e94a4421f0653 to your computer and use it in GitHub Desktop.
Save shakdwipeea/d5dcf9f883450eee6b8e94a4421f0653 to your computer and use it in GitHub Desktop.
(define data (list 0.0 -0.5 1.0 0.0 0.0
0.5 0.5 0.0 1.0 0.0
-0.5 0.5 0.0 0.0 1.0))
(define buffer-data (let (v (make-u8vector (* 15 4)))
(let lp ((rest data) (i 0))
(match rest
([x . rest]
(displayln "i:" i "x:" x)
(u8vector-float-set! v i x big)
(lp rest (1+ i)))
(else v))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment