News for hackers. Stuff that matters.
Re:Show HN: HN Avatars in 357 bytes by bertman on Monday March 14, 2022 @07:11AM (#30670935)
>MAKE. THIS. PERMANENT!

I second this. (Also I wanted to see what my avatar looks like, sry)

Re:Show HN: HN Avatars in 357 bytes by gaetgu on Monday March 14, 2022 @11:33AM (#30673620)
Truly unacceptable. (I look like an alien head!)
Re:Show HN: HN Avatars in 357 bytes by ChrisClark on Monday March 14, 2022 @02:08PM (#30675821)
But Space Invaders is a classic!
Re:Show HN: HN Avatars in 357 bytes by amanzi on Monday March 14, 2022 @08:30PM (#30680310)
Only commenting so I can see my avatar...
Re:Show HN: HN Avatars in 357 bytes by riidom on Monday March 14, 2022 @08:36PM (#30680356)
How dare you, you cyan flower vase on wheels :) I'm a spiky small yellow watchtower, yay.
Re:Show HN: HN Avatars in 357 bytes by jimmydorry on Monday March 14, 2022 @10:33PM (#30681101)
And me? A green butterfly?
Re:Show HN: HN Avatars in 357 bytes by riidom on Tuesday March 15, 2022 @05:22AM (#30683230)
Yup. Or a trophy/ a goblet maybe? Not sure if green stands for 1st, 2nd or 3rd price though, up to you to decide :)
Re:Show HN: HN Avatars in 357 bytes by arispen on Tuesday March 15, 2022 @06:05AM (#30683489)
hi everyone :) I am a happy jumping frog :)
Re:Show HN: HN Avatars in 357 bytes by cugs on Tuesday March 15, 2022 @05:41PM (#30692154)
Commenting to see mine. Edit: Excellent! It's a blob.
Re:Show HN: HN Avatars in 357 bytes by 2fast4you on Wednesday March 16, 2022 @12:17PM (#30700709)
Let's see what mine is Edit: I love it! A little bug :)
Re:Show HN: HN Avatars in 357 bytes by stemlord on Wednesday March 16, 2022 @10:54PM (#30707118)
Looks like Shrek's forehead. Posting for my own avatar reveal...
Re:Show HN: HN Avatars in 357 bytes by ashishwt on Friday March 18, 2022 @07:50AM (#30720973)
I am an inverted android?
Re:Show HN: HN Avatars in 357 bytes by simcop2387 on Monday March 14, 2022 @12:48PM (#30674706)
This should be pretty easy to make into a userscript if browsers still support that. I haven't checked on that in half a decade or so

also i wanted to see mine too

Re:Show HN: HN Avatars in 357 bytes by romellem on Monday March 14, 2022 @12:29PM (#30674449)
This is fun, and can easily be added as a userscript. I might look to do that a little later.
Re:Show HN: HN Avatars in 357 bytes by notsound on Monday March 14, 2022 @12:41PM (#30674615)
// ==UserScript== // @name HN icons // @namespace https://news.ycombinator.com/* // @version 0.1 // @description try to take over the world! // @author some people on HN // @match https://news.ycombinator.com/* // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw== // @grant none // ==/UserScript==

(function() { // Initial concept is from: https://news.ycombinator.com/item?id=30668137 (tomxor) // The script we are using is from: https://news.ycombinator.com/item?id=30670079 (onion2k) 'use strict'; let observer = new IntersectionObserver( (entries) => { entries.forEach((entry, i) => { if (entry.isIntersecting) { const p = 2; const c = document.createElement('canvas'); const x = c.getContext('2d'); c.width = 18; c.height = 14; const s = entry.target.innerText; const r = 1;

            if (s) {
            for (
                let s = entry.target.innerText, r = 1, i = 28 + s.length;
                i--;

            ) {
                // xorshift32
                (r ^= r << 13), (r ^= r >>> 17), (r ^= r << 5);
                const X = i & 3,
                Y = i >> 2;
                if (i >= 28) {
                // seed state
                r += s.charCodeAt(i - 28);
                x.fillStyle =
                    '#' + ((r >> 8) & 0xffffff).toString(16).padStart(0, 6);
                } else {
                // draw pixel
                if (r >>> 29 > (X * X) / 3 + Y / 2)
                    x.fillRect(p * 3 + p * X, p * Y, p, p),
                    x.fillRect(p * 3 - p * X, p * Y, p, p);
                }
            }
            }

            entry.target.prepend(c);
        } else {
            if (entry.target.firstChild.tagName === 'CANVAS')
            entry.target.firstChild.remove();
        }
        });
    },
    { rootMargin: '0px 0px 0px 0px' }
    );

    document.querySelectorAll('.hnuser').forEach((user) => {
    observer.observe(user);
    });
})();
Re:Show HN: HN Avatars in 357 bytes by mkoryak on Monday March 14, 2022 @02:14PM (#30675915)
the header formatting is broken. You should make a think on pastebin instead
Re:Show HN: HN Avatars in 357 bytes by notsound on Tuesday March 15, 2022 @04:49PM (#30691478)
Re:Show HN: HN Avatars in 357 bytes by dormento on Tuesday March 15, 2022 @05:51PM (#30692281)
Works a treat. Thanks, weird semaphore thing!
Re:Show HN: HN Avatars in 357 bytes by david927 on Monday March 14, 2022 @10:56AM (#30673164)
How dare you! Edit: ooooh, mine's a beetle!