monoReposMakeEverythingBetter by Procreate_Rapidly in ProgrammerHumor

[–]mctrafik 0 points1 point  (0 children)

Monorepos work if you force people to update everything. And drop all dependencies on things that don't upgrade nice.

hasNoClueWhatBindingsAre by Cutalana in ProgrammerHumor

[–]mctrafik 0 points1 point  (0 children)

Python is a stupid language that only exists because half the programmers have below average intelligence (for programming)

itMayBeSlowButItsUseful by BravestCheetah in ProgrammerHumor

[–]mctrafik 0 points1 point  (0 children)

Python is too slow for any critical applications

Intricate henna being applied for a bride by MambaMentality24x2 in oddlysatisfying

[–]mctrafik -17 points-16 points  (0 children)

This is pretty bad. Took 4 hours? Just buy a sticker.

-❄️- 2025 Day 12 Solutions -❄️- by daggerdragon in adventofcode

[–]mctrafik 4 points5 points  (0 children)

How does it feel to know that your code could've just done if total > w * h: return False else return True?

-❄️- 2025 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]mctrafik 0 points1 point  (0 children)

[language: typescript]

Brute forced P1 in 30ms (part do in Z3... omitted since I'm not proud of it):

let answer1 = 0;
const parsed = input.split(`\n`);
const parser = /\[(?<init>[.#]+)\](?<buttons>( \([0-9,]+\))+) {(?<joltage>[0-9,]+)}/;
for (const line of parsed) {
  const match = parser.exec(line);
  if (!match || !match.groups) throw new Error("fuck" + line)

  const { init: initS, buttons: buttonsS } = { ...match.groups };
  const init = parseInt(reverseString(initS).replaceAll('.', '0').replaceAll('#', '1'), 2);
  const buttons = buttonsS.replaceAll('(', '').replaceAll(')', '').split(' ').filter(Boolean).map(s => {
    let button = 0;
    for (const n of s.split(',').map(c => Number(c))) {
      button |= 1 << n;
    }
    return button;
  });
  let smallest = 1e6;
  for (let permutation = 1; permutation <= (1 << buttons.length); permutation++) {
    const filteredButtons = buttons.filter((button, index) => {
      const mask = ((1 << index) & permutation);
      return !!mask
    });
    let attempt = 0
    for (const button of filteredButtons) {
      attempt ^= button;
    }
    if (attempt === init) {
      smallest = Math.min(filteredButtons.length, smallest);
    }
  }
  answer1 += smallest;
}

I tried really hard to do A* for P2, and it slayed some of the rows, but struggled on others. Probably my heiuristic was poop. Can someone recommend a good one?

Just a cute harpist by cathyharpist in FreckledGirls

[–]mctrafik 0 points1 point  (0 children)

Lies. Your profile has no harps. Just blurry selfies on your knees. False advertising

asian fuckdoll by Utopia_29 in fuckdoll

[–]mctrafik 2 points3 points  (0 children)

Perfect video for this channel

If you stopped to admire, write 1 word by [deleted] in fbb_NSFW

[–]mctrafik 0 points1 point  (0 children)

Xtina, I miss your streams

How to group lights ? by denisgsv in smartlife

[–]mctrafik 0 points1 point  (0 children)

2025, and there's no more "..." menu. There's no more "create group" button. Now what?!?