Conway's Game of Life - Code Golfed [JS/Canvas]
Here’s my attempt to fit Conway’s Game of Life into tweet length. Unfortunately I’m 77 characters over at 358.
Paste this code into a blank HTML file and it should work (with some very minor visual issues!).
<canvas/><script>b=document.all[3].getContext("2d");s=50;z=s*s;m=[];n=[];g=(x,y)=>m[x*s+y%s];for(i=z;--i;m[i]=new Date&1);setInterval(()=>{for(i=z;--i;)x=i/s|0,x=g(x,i-1)+g(x+1,i-1)+g(x+1,i)+g(x+1,i+1)+g(x,i+1)+g(x-1,i+1)+g(x-1,i)+g(x-1,i-1),n[i]=3==x||m[i]&&2==x;for(i=z;--i;)b.fillStyle=(m[i]=n[i])?'red':'tan',b.fillRect(i/s*10,i%s*10,10,10)},s)</script>