Thanks @jlp765 and @dataman. I decided to go with the following for now.
proc guid():string=
result = ""
const l = 8
let f = open("/dev/urandom")
var a:array[l, byte]
discard readBytes(f, a, 0, l)
close(f)
for b in a: result.add(toHex(b))
But I must admit, I'm rather surprised a C style sprintf or Lisp style format is missing in Nim's stdlib (I'm assuming it's missing since I couldn't find it so far). I'm just a beginner in Nim otherwise I'd write one myself. Perhaps hopefully soon.
