5 local it
= setmetatable({}, { __index
=table })
6 --local ot = setmetatable({}, { __index=table })
8 local f
= assert(io
.open(fn
, 'r'))
16 print('read\t '..tostring(#it
)..' lines')
19 local j
= math
.random(i
, #it
)
20 it
[i
], it
[j
] = it
[j
], it
[i
]
21 io
.write('shuffled '..tostring(i
)..' lines\r')
26 local f
= assert(io
.open(fn
..'.shf', 'w'))
27 for i
, l
in ipairs(it
) do
28 io
.write('written\t '..tostring(i
)..' lines\r')
34 print('written\t '..tostring(#it
)..' lines')