Comment

Comment by TeMPOraL

Imagine an array bool[100] initialized with false. Set every (100/N) elements to true, where 0 < N <= 100. Associate that array with the %N statement. Give it also a counter, incremented each time the statement is encountered. Execute statement when array[counter % 100] == true, skip otherwise.

I think this fits the specification, isn't a perverse interpretation, and clearly isn't a meaningful PRNG either.

parent TeMPOraL 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton