JRaccoon

joined 1 year ago
[–] [email protected] 63 points 8 months ago* (last edited 8 months ago) (8 children)

I remember reading an article about how we're already able to simulate basic tastes, like sweetness and sourness, digitally. So just you wait, we might have lickable HTML elements in the future

[–] [email protected] 13 points 8 months ago (1 children)

Hieman yllätys kyllä. Kellään tän vuoden artisteista ei ole realistisia mahdollisuuksia menestyä viisuissa, joten meemiarvoltaan parhaan artistin lähettäminen saattaa olla jopa järkevin vaihtoehto.

[–] [email protected] 2 points 9 months ago

So nice to be able to play more Portal after all these years

[–] [email protected] 2 points 10 months ago* (last edited 10 months ago)

TypeScript

GitHub link

It's nice to have a quick easy one for a change

Code

import fs from "fs";

const rows = fs.readFileSync("./09/input.txt", "utf-8")
    .split(/[\r\n]+/)
    .map(row => row.trim())
    .filter(Boolean)
    .map(row => row.split(/\s+/).map(number => parseInt(number)));

console.info("Part 1: " + solve(structuredClone(rows)));
console.info("Part 2: " + solve(structuredClone(rows), true));

function solve(rows: number[][], part2 = false): number {
    let total = 0;
    for (const row of rows) {
        const sequences: number[][] = [row];
        while (sequences[sequences.length - 1].some(number => number !== 0)) { // Loop until all are zero
            const lastSequence = sequences[sequences.length - 1];
            const newSequence: number[] = [];
            for (let i = 0; i < lastSequence.length; i++) {
                if (lastSequence[i + 1] !== undefined) {
                    newSequence.push(lastSequence[i + 1] - lastSequence[i]);
                }
            }
            sequences.push(newSequence);
        }

        // For part two just reverse the sequences
        if (part2) {
            sequences.forEach(sequence => sequence.reverse());
        }

        // Add the first zero manually and loop the rest
        sequences[sequences.length - 1].push(0);
        for (let i = sequences.length - 2; i >= 0; i--) {
            sequences[i].push(part2
                ? sequences[i][sequences[i].length - 1] - sequences[i + 1][sequences[i + 1].length - 1]
                : sequences[i][sequences[i].length - 1] + sequences[i + 1][sequences[i + 1].length - 1]
            );
        }
    
        total += sequences[0].reverse()[0];
    }

    return total;
}

[–] [email protected] 1 points 10 months ago

Nokia E71 with the full QWERTY keyboard. Loved it, even though the keys were too small to comfortable use. I guess technically speaking that's still a smartphone so before that I had some Samsung flip phone, can't remember the exact model

[–] [email protected] 2 points 11 months ago

Oma innostus ko. peliä kohtaan loppui kun kahden tunnin jälkeen peli kaatui ja kävi ilmi, että automaattitallennus ei ole oletuksena päällä..

[–] [email protected] 4 points 11 months ago

Good luck, because last time they tried to replace the Start menu with a new UI went so well..

[–] [email protected] 2 points 1 year ago (1 children)

A robot vacuum. Just a cheap no-brand one and it's by no means perfect but does actually help with day-to-day cleaning. Meaning I can get away manually vacuuming way less often.

[–] [email protected] 5 points 1 year ago

Seems to be a cut-down version from the Direct, so nothing new in this one.

[–] [email protected] 1 points 1 year ago

They recently added it as a experimental feature and it has been working fairly well, at least for Java. As far as I recall, each user needs to activate it themselves via settings. Far from optimal but better than nothing.

[–] [email protected] 6 points 1 year ago (2 children)

Just gave F-Zero 99 a go. It's surprisingly fun and polished for a "free" game

[–] [email protected] 3 points 1 year ago

Meillä työnantaja tarjosi tuota vaihtoehtoa, jossa koko lysti menee työnantajan piikkiin, eli ei vähennetä palkasta. Kahden vuoden jälkeen pyörän sai lunastaa itselleen maksamalla 25% alkuperäisestä hinnasta, jonka jälkeen myin lähes iskemättömän (alle 500 km ajettu) pyörän kaverialennuksella, mutta kuitenkin niin, että itse jäin hyvin voitolle.

view more: ‹ prev next ›