[-] Zikeji@programming.dev 5 points 2 months ago

My first thought was to take it apart and fix whatever the problem is, I've fixed issues like this before.

But I also bought it to be plug and play - disassembling to fix what is either a shipping issue or manufacturing defect is not plug and play. So I decided I would use this opportunity to see how the support experience is. So far my consensus is I'm glad I haven't had any issues with my Steam Deck...

[-] Zikeji@programming.dev 5 points 2 months ago

I read about and see videos about the humans right violations that are happening in Pakistan, Ukraine, and other parts of the world and I know if I were put through some of that, having seen videos and read shit ain't going to mean jack shit.

[-] Zikeji@programming.dev 5 points 7 months ago* (last edited 7 months ago)

Half a year ago I accidentally git cloned to a folder named ~, so naturally I did rm -rf ~.

Mistakes were made. Fortunately I backup my ~ so it was just annoying.

[-] Zikeji@programming.dev 5 points 7 months ago

My first ever appointment for depression I was given the wrong address and ended up in an unfamiliar area of the city at a location that looked like it had been abandoned. The office didn't pick up my repeated calls. Then I had to drive through rush hour traffic home, my 35 minute drive there was 1 hour 30 minutes back, alone with my thoughts. Questioning my sanity.

They callously tried to charge me a no show fee as well.

I let it set me back years. I still count my making it home as a minor miracle. Not sure what point I'm trying to convey, for some reason this post made me relive that experience.

I guess just don't give up. Call, explain, hopefully they can fit you in.

[-] Zikeji@programming.dev 5 points 9 months ago

Javascript

I generally like trying the brute force approach first (though in the latter days it just wastes time). After exhausting 32GB of RAM I changed approaches.

Admittedly I don't really understand these algorithms as well as I would like, and I also will admit I inadvertently was LLM assisted :(. When I was trying to figure out what algo I should use and the AI summary in Google's search spoiled me. But I did learn alot.

One interesting observation, unrelated to the solution itself, is the solutions runs about 30% faster in Firefox than it does via Node (25.2.1 and 24.11.1) on my machine.

Code

const input = require('fs').readFileSync('input-day9.txt', 'utf-8');

/** @type {Array<[number, number]} */
const points = input.split("\n").map(r => r.split(',').map(v => parseInt(v, 10)));

let largest = 0;
let largestInside = 0;
for (const [startX, startY] of points) {
    for (const [nextX, nextY] of points) {
        if (startX === nextX && startY === nextY) continue;

        const minX = Math.min(startX, nextX);
        const maxX = Math.max(startX, nextX);
        const minY = Math.min(startY, nextY);
        const maxY = Math.max(startY, nextY);

        const area = (maxX - minX + 1) * (maxY - minY + 1);
        if (area > largest) {
            largest = area;
        }

        if (area <= largestInside) continue;

        // center point check, ala https://en.wikipedia.org/wiki/Even%E2%80%93odd_rule
        const centerX = (minX + maxX) / 2;
        const centerY = (minY + maxY) / 2;
        let inside = false;
        for (const [i, [aX, aY]] of points.entries()) {
            const [bX, bY] = points[i - 1] ?? points[points.length - 1];
            if (centerX === aX && centerY === aY) {
                inside = true;
                break;
            }
            if ((aY > centerY) !== (bY > centerY)) {
                const slope = (centerX - aX) * (bY - aY) - (bX - aX) * (centerY - aY);
                if (slope === 0) {
                    inside = true;
                    break;
                }
                if ((slope < 0) !== (bY < aY)) {
                    inside = !inside;
                }
            }
        }

        if (!inside) continue;

        // check for edge intersections, ala https://en.wikipedia.org/wiki/Line%E2%80%93line_intersection
        let intersects = false;
        for (const [i, [aX, aY]] of points.entries()) {
            const [bX, bY] = points[i - 1] ?? points[points.length - 1];

            if (aX === bX) {
                if (aX > minX && aX < maxX) {
                    const wallMinY = Math.min(aY, bY);
                    const wallMaxY = Math.max(aY, bY);

                    if (Math.max(minY, wallMinY) < Math.min(maxY, wallMaxY)) {
                        intersects = true;
                        break;
                    }
                }
            } else if (aY === bY) {
                if (aY > minY && aY < maxY) {
                    const wallMinX = Math.min(aX, bX);
                    const wallMaxX = Math.max(aX, bX);

                    if (Math.max(minX, wallMinX) < Math.min(maxX, wallMaxX)) {
                        intersects = true;
                        break;
                    }
                }
            }
        }

        if (intersects) continue;

        if (area > largestInside) {
            largestInside = area;
        }
    }
}

console.log(`Part 1 Answer: ${largest}`);
console.log(`Part 2 Answer: ${largestInside}`);

[-] Zikeji@programming.dev 5 points 9 months ago

Streaming like movies and TV, or like Twitch?

And free as in the legal free ones, or illegal free ones?

[-] Zikeji@programming.dev 5 points 2 years ago

When I was young, around 10, I was bored. We had one shitty desktop and no internet 99% of the time (we had dial up but only 1 landline, and my mom used the phone alot). We were also homeschooled, and the software teaching us was on that computer. I found the software documentation which was in HTML, and used that to make my own "website".

Even before then though I had a draw to tinkering with computers. After a bit I convinced my mom to get me intro to C++ by Bjarne Stroustrup, and messed with that for a good year or so. Then we upgraded to DSL when I was around 13 and I got into Roblox and learned Lua, then other languages.

[-] Zikeji@programming.dev 5 points 2 years ago

To be fair, a lot of the game breaking launch bugs that hurt the game for me were with PVP (specifically, the instanced wars). I do know there were others but those PVP bugs are what I'll always remember. The lag, the broken healing, the hatchet exploit, and a few others.

[-] Zikeji@programming.dev 5 points 3 years ago

It's a deterrent. Which is a pretty apt comparison for robots.txt and user agent blocking.

[-] Zikeji@programming.dev 5 points 3 years ago

The real conspiracy is the website exists to steal API keys.

[-] Zikeji@programming.dev 5 points 3 years ago

I am aware of how a public facing IP address works, and how little information it does give, by itself. It is still a privacy concern, and can be used in conjunction with other data to launch social engineering attacks or to help narrow down other data.

view more: โ€น prev next โ€บ

Zikeji

0 post score
0 comment score
joined 3 years ago