Hello world. Is there in Nim an equivalent of nodejs's buffers ? A structured 
type that allows doing all kinds of binary operations on groups of bytes ? I'm 
thinking of something like this:
    
    
    var
      ba1 = initByteArr(234, 69, 43, 20)
      ba2 = initByteArr(0x1A, 0x4F, 0xF5, 0xBD)
      ba3 = initByteArr()
    
    readBytes(someFile, ba3, 0, 4)
    
    echo ba1 xor ba2
    echo ba2 and ba3
    echo ba1 & b2 # Concatenation
    
    
    Run

Reply via email to