←back to thread

248 points dogacel | 3 comments | | HN request time: 1.039s | source
Show context
3eb7988a1663 ◴[] No.43688279[source]
It is a bit terse, but there is a 20-line Python implementation which cleared up the ideas for me: https://github.com/susam/mintotp
replies(4): >>43688338 #>>43688730 #>>43689457 #>>43689797 #
1. SkiFire13 ◴[] No.43689457[source]
Those `>Q` and `>L` just make it more confusing for me, they just feel like a different language in the language...
replies(2): >>43689735 #>>43690191 #
2. lucb1e ◴[] No.43689735[source]
Perhaps you could contribute a version in a language that uses more descriptive names, something like BitPacker.WriteInt64 for >Q if I'm guessing correctly what that means (I'd equally need to check the docs to know what format these letters represent, but I don't find it too confusing when you know it's simply some binary / byte array version of the same thing)
3. woadwarrior01 ◴[] No.43690191[source]
They are well documented and essentially are a DSL with the Python struct module for specifying memory representations of packed structures.

https://docs.python.org/3/library/struct.html#format-charact...