@nim_lang (to copy and paste)
import random, unicode
randomize()
const
l = 5000
s = "▁▂▃▄▅▆▇█".toRunes
var
t = newStringOfCap(l)
z = 0
for i in 1 .. l:
z += sample([-1, 1])
if z < 0:
z += 2
elif z >= static len(s):
z -= 2
t &= s[z]
echo t
import random, unicode
randomize()
const
l = 5000
s = "▁▂▃▄▅▆▇█".toRunes
var
t = newStringOfCap(l)
z = 0
for i in 1 .. l:
z += sample([-1, 1])
if z < 0:
z += 2
elif z >= static len(s):
z -= 2
t &= s[z]
echo t
Feb 6, 2022 · 9:30 PM UTC
0
0
2




