Hmm, a Short JS or Golfed JS standard should be ratified.
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.
Well, I have done just about all I can to do to make the Matrix digital rain, but I am sadly 100 bytes over. I am out of time to kill, but if you aren't, please take this off of my hands. :)
I think this idea is cool, but I cant read this inline javascript. To the creators of this site, please add an option to view the code formatted with prettier
This is great, I've been tempted by js1k a number of times but the concept of a deadline and 1k limit is actually quite procrastonation inducing for me... 140 bytes forces me to experiment and not over think.
Truly amazing website. Being transition to learn JS/Typescript lately, I come to understand how powerful this scripting language is to power the whole Internet.
27 comments
[ 4.7 ms ] story [ 66.7 ms ] threadEdit: 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.
https://www.dwitter.net/d/10398
https://www.dwitter.net/d/10354
Edit:
Here is a much nicer version with white droplets. I think I'm done for today
https://www.dwitter.net/d/10356
why does he not use
u=t=>
<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.
https://github.com/lionleaf/dwitter/wiki
some write-ups:
http://jsriffs.blogspot.com/
http://zozuar.org/txt/chalice/
http://zozuar.org/txt/sc/