« first day (4979 days earlier)      last day (194 days later) » 

05:31
@FélixAdriyelGagnon-Grenier im not entirely sure what you mean
        console.clear();

        var width           = 1;
        var height          = 1;

        var buffer          = new ArrayBuffer(width*height*4);
        var uint8           = new Uint8ClampedArray(buffer);
        var uint32          = new Uint32Array(buffer);
        var imageData       = new ImageData(uint8,width,height);

        var rint            = ()=>Math.floor(Math.random()*256);
        var hex             = (v,n=2)=>v.toString(16).padStart(n,'0');

        var red             = 00;
original integer values 0 64 32 255
hex values values 00 40 20 ff
color string 0x004020ff
color integer 4202751
back to hex 0x004020ff
4202751
0 255
1 32
2 64
3 0
original integer values 0 64 32 255
hex values values 00 40 20 ff
 
7 hours later…
12:54
@matt Felix's problem was that the hex values had their leading zeroes trimmed.
@FélixAdriyelGagnon-Grenier think of those values as their binary representations: RRRRRRRRGGGGGGGGBBBBBBBBAAAAAAAA
const red     = 00;
const green   = 64;
const blue    = 32;
const opacity = 255

let color = (red << 24) + (green << 16) + (blue << 8) + opacity;

console.log('Color value:', color);

const A = color & 0xFF;
color >>= 8;
const B = color & 0xFF;
color >>= 8;
const G = color & 0xFF;
color >>= 8;
const R = color & 0xFF;

console.log('Restored values:', R, G, B, A);
So, use bit shifting to literally shift the color to the right position in the number
And to retrieve it, again
13:27
When concatenating hex values, those leading zeroes do matter :D
 
2 hours later…
15:53
16:49
alright this is ridiculous
<canvas style=width:99% id=c onclick=setInterval('for(c.width=w=99,++t,i=6e3;i--;c.getContext`2d`.fillRect(i%w,i/w|0,1-d*Z/w+s,1))for(a=i%w/50-1,s=b=1-i/4e3,X=t,Y=Z=d=1;++Z<w&(Y<6-(32<Z&27<X%w&&X/9^Z/8)*8%46||d|(s=(X&Y&Z)%3/Z,a=b=1,d=Z/w));Y-=b)X+=a',t=9)>
you have to actually click the canvas to start, which you cant see but is there
City In A Bottle – A 256 Byte Raycasting System
 
1 hour later…
18:32
@matt indeed I meant that the leading zeroes would be trimmed, thanks
@Cerbrus I see, that does make sense, thanks
ok
@ParkingMaster, how was your move? did you get to check out that single character javascript encoding, i see the website is down now for some reason
19:06
19:37
@matt The move so far is annoying since my moving pods aren't arriving until next Thursday (or until Monday) and I got here on the 30th. It's kind of boring without all my tech or projects to build. However I did visit a lot of fun places here so far.
@matt Yeah, I saw the encoding with o's that you sent me. Pretty cool concept.
To encode a 5 byte script it probably takes thousands of o's lol

« first day (4979 days earlier)      last day (194 days later) »