Created
November 20, 2013 17:04
-
-
Save Fitzsimmons/7566862 to your computer and use it in GitHub Desktop.
Clojure Confusion
This file contains 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
Sometimes it works... | |
Digest: [18 8c ab df 4a 78 3a 31 2e 9a 57 94 a8 b 76 42 6c 12 3d 83] | |
Offset: 3 | |
Excerpt: [df 4a 78 3a] | |
Unsigned: [5f 4a 78 3a] | |
Squashed: 5f4a783a | |
------------------ | |
But sometimes it gives up part way and fills the rest of the Long with 1s. | |
Digest: [fd f8 d7 e1 2f fa b7 c3 83 52 96 82 19 da 1f f3 c3 53 fa 71] | |
Offset: 1 | |
Excerpt: [f8 d7 e1 2f] | |
Unsigned: [78 d7 e1 2f] | |
Squashed: ffffffffffffe12f | |
------------------ | |
Which doesn't really make a ton of sense because when I run the exact same thing manually, it works as expected. | |
(format "%x" (shift-byte-vector-into-long [0x78 0xd7 0xe1 0x2f])) | |
"78d7e12f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment