See what you can create with 140 characters of JavaScript and a canvas
dwitter.net
dwitter.net
Edit: If you hit "New dweet" it tells you.
u(t) is called 60 times per second.
t: Elapsed time in seconds.
S: Shorthand for Math.sin.
C: Shorthand for Math.cos.
T: Shorthand for Math.tan.
R: Function that generates rgba-strings, usage ex.: R(255, 255, 255, 0.5)
c: A 1920x1080 canvas.
x: A 2D context for that canvas.
they could shorten every setter and function so c.width could just be w() or c.w= and c.fillStyle could just be fs(style) or c.fs=
They arbitrary shorten somethings but not others seems well... arbitrary
Like jQuery.
"But that's cheating!", people will say. I disagree; JS is verbose, but it's so widespread that if we can shorten it will result in new levels of compact creativity that we are missing out on. And JS is so full of frameworks, something like this wouldn't set that much precedent.
with(x)for(fillStyle="#000",fillRect(0,0,1e4,1e4),font="32px m",i=0;1920>i;i+=32)for(j=0,a=((2166136261*i^16777619)+960*t)%2160;b=255*(32>a-j),1080>j&&j<a;j+=42)fillStyle=R(b,765+j-a+b,b,1),fillText(String.fromCharCode((i+j)%85+12353),i,j); with(x)for(fillStyle="#000",font="2em m",fillRect(i=0,o=32,n=1920,n);n>i;i+=o)for(j=0,a=((2e7*i^1e9)+n*t)%n;n>j&&j<a;j+=o)fillStyle=R(b=n*(o>a-j),n/2+j-a,b),fillText(j%9,i,j) for(x.fillRect(i=0,0,n=c.width=540,n);n>i;i+=o)for(o=12,j=0,a=((n*i^1e7)+n*t)%n;j<a;j+=o)x.fillStyle=R(b=n*(o>a-j),n/2+j-a,b),x.fillText(j%9,i,j)https://www.dwitter.net/d/10354
Edit:
Here is a much nicer version with white droplets. I think I'm done for today
<div id=B text=snow bgColor=0><script>Ô=setInterval("m='';c=Math.cos;for(ô=0;ô<65;)m+='<p style=position:absolute;top:'+(42+(z=399/(73-(++ô+Ô++&63)))c(ô.9))+'%;left:'+(50+z*c(ô))+(z>>3?'%>.':'%;color:#456>.');B.innerHTML=m",49)</script>
Check tutorials for 64 KB, 4 KB and such.
Think of 140 characters as trying to do 140 byte executables.
The basic idea is to first create whatever you want to achieve, without thinking too much about the size.
Then you iterate the algorithm, reducing the size until it achieves the desired goal.
In the process it helps to make use of typical demoscene technics, namely packers/minifiers, procedural generation.
why does he not use
u=t=>