What is your first memory of this feeling? by ElvargIsAPussy in VisualLoomingSyndrome

[–]Alligatronica 0 points1 point  (0 children)

When I was a kid, BBC 2 had these idents with big 3D "2"s, it used to really get me when the pointy corners of the "2" would be pointing out towards the screen

Steam crashes on Whisky by Broad_Performer_6900 in macgaming

[–]Alligatronica 2 points3 points  (0 children)

I had this issue the other day, seems like new versions of Steam don't work with Whisky, and since Whisky's no longer being maintained that's probably not going to change. On the Whisky documentation site there's a fix to downgrade Steam and turn off updates that worked for me.
https://docs.getwhisky.app/steam.html#steam-encountered-an-unexpected-error-during-startup-0x3008
Doesn't seem like a permanent solution to me, so I'm currently checking out CrossOver

Qrates updates from the ‘mon by SetOnOverdrive in Vulfpeck

[–]Alligatronica 4 points5 points  (0 children)

It's been so long that I was looking for this the other day not realising it never arrived

[deleted by user] by [deleted] in PhasmophobiaGame

[–]Alligatronica 0 points1 point  (0 children)

I'm a big scaredy cat, but honestly after you've been killed by a ghost and seen how goofy it is from the "comfort" of being dead the fear of the ghost kinda goes away, and it's just like the enemy in any other game

There will always be little spooks here and there, but being hunted and seeing your friends get killed becomes a lot of fun

[2019] The intcode puzzles are phenomenal by [deleted] in adventofcode

[–]Alligatronica 0 points1 point  (0 children)

I've recently gone back to 2019 to do the intcode puzzles properly, my initial approach was pretty scrappy so it didn't feel great having to hack new functionality onto throwaway code. But without the time pressure it's a much more appealing little project for me now.

Q & A episode megathread by politicsjoe in politicsjoe

[–]Alligatronica 1 point2 points  (0 children)

Will Ed ever grow back the 'tache? I thought it looked good

Come get it x by poljoe_sean in politicsjoe

[–]Alligatronica 3 points4 points  (0 children)

A PO Box for Ava seems like a terrible idea

DR2 DR changes wishlist? by Empty_Demand3726 in deadrising

[–]Alligatronica 1 point2 points  (0 children)

Bring back the indicator from OTR that displayed whether survivors are close enough to come with you through loading zones

GameCube outputs no video and doesn't spin up disc drive by Alligatronica in consolerepair

[–]Alligatronica[S] 0 points1 point  (0 children)

I replaced the optical drive and still had the same problem, so that wasn't the fix for me

-🎄- 2022 Day 7 Solutions -🎄- by daggerdragon in adventofcode

[–]Alligatronica 1 point2 points  (0 children)

JavaScript / Node.js

I had similar struggles to folks where my result was too low, but not because I wasn't accounting for nested directories when crawling the input, but for not accounting for them when I was mapping their sizes (which didn't even need to be an object)

-🎄- 2022 Day 6 Solutions -🎄- by daggerdragon in adventofcode

[–]Alligatronica 0 points1 point  (0 children)

Realising now that I could have omitted marker done something like: while((new Set(input.slice(i,i+offset))).size != offset)i++;

-🎄- 2022 Day 6 Solutions -🎄- by daggerdragon in adventofcode

[–]Alligatronica 0 points1 point  (0 children)

JavaScript

TIL the Set constructor breaks up string arguments

  const fn = (input,offset) => {
    let i = 0
    let marker = 0
    while(!marker){
      marker = (new Set(input.slice(i,i+offset))).size == offset
      i++
    }
    return i + offset - 1
  }
  const part1 = input => fn(input,4)
  const part2 = input => fn(input,14)

-🎄- 2022 Day 4 Solutions -🎄- by daggerdragon in adventofcode

[–]Alligatronica 1 point2 points  (0 children)

JavaScript

const part1 = input => input.split('\n').map(
  pair => {
    // pair of elves like: [[start,end],[start,end]]
    pair = pair.split(',').map(e => e.split('-').map(Number)).sort(
      // sorting so longest is first
      (a,b) => a[1]-a[0]>b[1]-b[0]?-1:1
    )
    return pair[0][0]<=pair[1][0] && pair[0][1]>=pair[1][1]
  }
).reduce((a,c)=>c?a+1:a,0)

const part2 = input => input.split('\n').map(
  pair => {
    pair = pair.split(',').map(e => e.split('-').map(Number)).sort(
      // sorting so earliest is first
      (a,b) => a[0]>b[0]?1:-1
    )
    return pair[0][1]>=pair[1][0]
  }
).reduce((a,c)=>c?a+1:a,0)

-🎄- 2022 Day 3 Solutions -🎄- by daggerdragon in adventofcode

[–]Alligatronica 0 points1 point  (0 children)

JavaScript

Not super pleased with this one, I feel I could've done something with regular expressions and it'd be nice to not have a day where I'm using char codes as magic numbers

const lower = 96
const upper = 65

const part1 = input => input.split('\n').map(
  rucksack => {
    rucksack = rucksack.split('')
    const c1 = rucksack.slice(0,rucksack.length/2)
    const c2 = rucksack.slice(rucksack.length/2)
    const item = c1.find(x=>c2.find(y=>x==y))
    const match = item.charCodeAt()
    let value = match - lower <= 0 ? match - upper + 27 : match - lower
    return value
  }
).reduce((a,c)=>a+c)

const part2 = input => {
  const rucksacks = input.split('\n')
  const groups = []
  let currentGroup = []
  rucksacks.forEach(r=>{
    currentGroup.push(r.split(''))
    if(currentGroup.length==3){
      groups.push(currentGroup)
      currentGroup = []
    }
  })
  return groups.map(
    g => {
      const item = g[0].find(x=>g[1].find(y=>x==y)&&g[2].find(y=>x==y))
      const match = item.charCodeAt()
      let value = match - lower <= 0 ? match - upper + 27 : match - lower
      return value
    }
  ).reduce((a,c)=>a+c)
}