Skip to content

Instantly share code, notes, and snippets.

@emekoi
Last active March 7, 2016 05:37
Show Gist options
  • Save emekoi/14d59f0ba80c03abed1a to your computer and use it in GitHub Desktop.
Save emekoi/14d59f0ba80c03abed1a to your computer and use it in GitHub Desktop.
moonscript file for generating random binary data images.
math.randomseed os.time!
export yes = false
export x_counter = 0
export x = if yes == true then 0 else 1
while true
x_counter +=1
if x_counter > 500 then break
io.write(if (x_counter % math.random(1,5)) > 1 then print math.random(0,3) else print math.random(0,1),print math.random(0,1),if (x_counter % math.random(1,5)) > 1 then print math.random(0,3) else print math.random(0,1),if (x_counter % math.random(1,5)) > 1 then print math.random(0,3) else print math.random(0,1),if (x_counter % math.random(1,5)) > 1 then print math.random(0,3) else print math.random(0,1),if (x_counter % math.random(1,5)) > 1 then print math.random(0,3) else print math.random(0,1),if (x_counter % math.random(1,5)) > 1 then print math.random(0,3) else print math.random(0,1),print math.random(0,1),if (x_counter % math.random(1,5)) > 1 then print math.random(0,3) else print math.random(0,1),if (x_counter % math.random(1,5)) > 1 then print math.random(0,3) else print math.random(0,1),if (x_counter % math.random(1,5)) > 1 then print math.random(0,3) else print math.random(0,1),if (x_counter % math.random(1,5)) > 1 then print math.random(0,3) else print math.random(0,1),print math.random(0,1),if (x_counter % math.random(1,5)) > 1 then print math.random(0,3) else print math.random(0,1),if (x_counter % math.random(1,5)) > 1 then print math.random(0,3) else print math.random(0,1),print math.random(0,1))
return nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment