Created
May 12, 2016 11:32
-
-
Save mohayonao/c6a15285562b99ac5e91864775563027 to your computer and use it in GitHub Desktop.
beep
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
| "use strict"; | |
| const output = new Float32Array(8192).map((_, i) => Math.sin(i)); | |
| process.stdout.write(Buffer.from(output.buffer)); |
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 sys, math, struct | |
| output = [ math.sin(i) for i in range(8192) ] | |
| sys.stdout.write(struct.pack('8192f', *output)) |
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
| output = 8192.times.map {|i| Math.sin(i)} | |
| STDOUT.write output.pack('f*') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment