Try saving this Normal HTML File and open it in a text/hex editor: https://0b5vr.com/domain/domain.html
eval(unescape(escape`<<97 wide characters>>`.replace(/u../g,'')))
Can't they just have the same agreement that Ford Prefect had with Mr Prosser? "So, assuming I'm going to use this lossless compression technique to fit 194 characters into a 140 character tweet... how about you just show the 194 characters and say that I fitted into 140 characters?"I suppose you could make the same argument about size-based competitions at demo parties; the limit is strictly 4096 bytes but everyone + their dog is using Crinkler to compress a 12-20KB executable down to that size. In fact, part of the effort is in aligning data and tweaking constants with Crinkler's algorithm in mind, to make the raw data more amenable to compression! But at least then, it's not a constant compression (turning any 194 ASCII characters into 97 Unicode characters which with embedded decoder makes exactly 140 characters)
Dwitter used the definition of what Twitter at the time used. The solution of https://beta.dwitter.net/ mitigates the lack of accessibility of the encoding, while keeping the fixed target at the same time introducing a new practical target.
The Math.sin css color encoder were concessions to practicality, there has been much discussion as to whether a Dwitter 2 should simply include additional characters required to the same preconfig and let people do it themselves, and let them use the characters for something else if they can think of something.
I'd like something like this just to see how creative people get in doing that. How small can you make a bit of JavaScript that copies every static method of Math to window?
and creativity is the goal here. No matter how people stretch the system, it can't be denied they have been doing so creatively.
js_func`string`
is valid JS and calls `js_func` as a tagged template literal, passing it a TemplateStringsArray. Going to use "console.log`weeee`" in my code now.e.g. https://github.com/developit/htm and https://lit.dev/docs/components/rendering/
https://gisthost.github.io/?8d537c4a3b2331e7c6c45d31f1900330
The Trashcan in that sampler is stored as
TRASH: Q`!B>#Z>!F>#F:V:V>!>B#^BZfBf3`
decoded to a SVG D path by function Q([e]){let c,t,n,d="",l=0,o=c=>e.charCodeAt(l++)-33;for(;l<e.length;d+=t<20?(c=1&t?100:10,"MmLlHhVvCcSsQqTtAaZz"[t]):t<71?t-45+" ":71==t?(n=o(),e.slice(l,l+=n)):(94*(t-72)+o()-1033)/c+" ")t=o();return d}
which can be turned into an image by function simpleImage(p="M-22 -22 h44 v44 h-44 Z",w=64,h=w,o={}){let{background:b="#0000",stroke:s="#000f",fill:f="#fffa",thickness:t=w/32,transform:m=[1,0,0,1,0,0],scale:c=1,angle:a=0}=o;const C=new OffscreenCanvas(w,h),X=C.getContext("2d");let P=new Path2D(p);m instanceof DOMMatrix||(m=new DOMMatrix(m));m.translateSelf(w/2,h/2);m.rotateSelf(a);m.scaleSelf(c,c);let T=new Path2D;T.addPath(P,m);P=T;X.fillStyle=b;X.fillRect(0,0,w,h);X.fillStyle=f;X.strokeStyle=s;X.lineWidth=t;X.stroke(P);X.fill(P);return C}
The Sampler contains all of the images in the html file and still comes out to be only 13k. Probably quite a bit less if you removed the ray tracer and scenes.sql`SELECT * FROM users WHERE id = ${userId}`
const q = gql` query GetUser { user(id: ${userId}) { name email } } `;
https://xcancel.com/search?q=%23%E3%81%A4%E3%81%B6%E3%82%84%...
Apologies for the quick reboot of the servers. I learned from last time this happened and resized the digitalocean droplet.
You start a topic by pasting a dataset or a link to some JSON csv, xml, sql files, etc, then add a description or some other rage bate to start a conversation.
Seems much fun and a great way to start getting into coding.
The halting problem can just be figured out experimentally in production. Users might need to earn or lose privileges over time as things escalate. Admins might approve a script and allow running it without prompts or pressing the button.
Perhaps entire applications can be written this way. I much enjoyed old php code with discussions in threaded comments. (The cache will save us.)
Reminds me of Richard
https://stackoverflow.com/questions/184618/what-is-the-best-...
[1] https://youtu.be/JsAetmgJRss?si=AxIFySX7ktzu5GL5&t=193
[2] https://github.com/jed/140bytes/wiki/Byte-saving-techniques
if(!window.g){gc=document.createElement('canvas');g=gc.getContext('webgl');c.parentNode.replaceChild(gc,c);k=Object.keys(g.__proto__);d='void main(){gl_';str = `g395(g41,g318())g310(g41,new Float32Array([0,0.5,0,-0.5,-0.5,0,0.5,-0.5,0]),g46);a=g322(g139)g382(a,'attribute vec3 c;${d}Position=vec4(c,1);}')g313(a);b=g322(g138)g382(b,'${d}FragColor=vec4(1,0,1,0);}')g313(b);d=g320()g302(d,a)g302(d,b)g376(d)g393(d)g435(0,3,g128,0,0,0)g406(0)g404(g12,0,3)`.replace(/g(\d+)/g,"\ng.\${k[$1]}");eval("eval(`"+str+"`)")}
I assume there are far more advanced methods than what I managed to do, so it's probably possible to actually get that to 140 characters.
Clever math does the heavy lifting on dwitter.net
https://x.com/search?q=%23postcart%20%23pico8
maybe #tweetcart is a better hash tag
Fractals: https://www.dwitter.net/h/fractal
Dynamical systems / chaos: https://www.dwitter.net/h/chaos
Strange attractors: https://www.dwitter.net/h/attractor
Spiral-based generative art: https://www.dwitter.net/h/spiral
Fireworks simulation: https://www.dwitter.net/h/fireworks
Procedural scenes: https://www.dwitter.net/h/scene
Wavelets (3D and 2D): https://www.dwitter.net/h/wavelet
And the most popular dweets: https://www.dwitter.net/top/all
I’m not saying that to disparage the content mind you; it is amazing. Just wondering which potential rules could make similar results and “normal”/readable code, as that would be awesome to see.
Tried AI for a standalone html page snippet renderer[0].
I tried just feeding it snippets one by one and that worked, but the raymarching ones it could not get going until I gave it the dwitter github repos. Now most, but not all (simple to fix manually though), work.
Also interesting to see Claude is terrible at trying to write the art (the demos itself) and seeing what it tries to do; not surprising given the challenge.
[0] https://claude.ai/public/artifacts/d8b357df-5982-48c6-be58-7...
It's the weekend! Take a journey back in time...
dang•10h ago
Show HN: A Stargate in 140 chars of JavaScript - https://news.ycombinator.com/item?id=25088683 - Nov 2020 (55 comments)
Dwitter – A social network for short JavaScript demos - https://news.ycombinator.com/item?id=13700698 - Feb 2017 (71 comments)