implement sort with block
implement sformat builtin and use it in logs