I am currently porting over some programs I wrote in C to work in a ulisp environment which utilize public key cryptography (ed25519). The public/private keys are 32 bytes long, and the the signatures are 64 bytes. I’m trying to figure out the best way to handle these in ulisp. I have no need to access the individual bytes, so it feels a bit strange to convert them to ulisp strings or arrays which contain pointers to each byte.
Is there a way in ulisp to have a symbol point to a contiguous array of memory if you know that it will be immutable, and therefore not need to have it’s elements accessed or mutated, and thus can be garbage collected entirely? Alternately, is there FFI function that can point to a C var or function directly that would accomplish this? Has there been thoughts to adding an array type that isn’t a binary tree, call it vector or something, and you give the total length of the array like one does in C?
Am I missing something, or should I just store the values as strings and just leave it there? It feels a bit inefficient both in memory and computation.
Can I store them as keywords?