I came across an interesting problem in Nim: how to get the address of an object, defined as the memory location of the first byte of the object, in a printable form (uint/string), such that it can be included in a $ operator.
I tried
cast[ByteAddress](this.unsafeAddr)
but then I get something that seems to be the same for a lot of objects at the same time, so it can't be the real address.