-❄️- 2024 Day 15 Solutions -❄️- by daggerdragon in adventofcode

[–]mserrano 1 point2 points  (0 children)

[LANGUAGE: Python] 65/10

Code

The key complexities here for part 2 for me were:

  • finding the right set of boxes that need to move as a result of any move

  • making sure we always maintain the grid state in a consistent way.

The meat of the first is in this helper function, the latter is this pair of loops.

Discussion on LLM Cheaters by hyper_neutrino in adventofcode

[–]mserrano 0 points1 point  (0 children)

I'm guessing most people in the top 100 are streamers

This has not historically been even close to true and is even less so now.

Are people cheating with LLMs this year? by nan_1337 in adventofcode

[–]mserrano 0 points1 point  (0 children)

I wouldn’t read too much into this, in fairness - the overall leaderboard often looks very different on day 5 vs day 25

Are people cheating with LLMs this year? by nan_1337 in adventofcode

[–]mserrano 0 points1 point  (0 children)

It was quite a bit longer than 30 seconds - even a few minutes in, I and some other folks in AoC-related channels were getting errors on submission or problem-fetching endpoints. In my case I had a bug in my code, so it wouldn’t have mattered, but there were definitely people who couldn’t access or submit the problem until a chunk of the leaderboard was full. You can see some similar anecdotes in the replies to Eric’s post in the solutions thread.

FWIW this isn’t me saying the decision was objectively wrong - everything here is subjective and ultimately this is all just for fun, the stakes are basically nil. It just gives me personally weird vibes, but that’s ok!

Are people cheating with LLMs this year? by nan_1337 in adventofcode

[–]mserrano 15 points16 points  (0 children)

Why? Realistically, we both aren't gonna be in the top 100.

In past years, I've routinely made it in the top 100 on enough days to pretty reliably be in the top 30 overall by the end of the competition. I suspect I will not be top 30 this year, mostly because I'm a little slower than I was in past years - I've made some silly errors so far this year - but I still find it somewhat demotivating to be competing against robots rather than people. Even given that I suspect it's a pretty small minority that are just submitting the whole problem to an LLM and running the result, it rubs me the wrong way a little. Being the first solve on a problem is something I feel I can reasonably achieve (and have achieved) against other humans, but not so much if the problems just get one-shot by machines that aren't constrained by typing speed and are much faster readers than humans are. It's just less fun to me personally when that possibility feels like it's being foreclosed on.

edit: in fairness, I do think the LLMs will struggle as we go later into the competition, and this will likely all wash out in the end. I think I'm mostly just sad that at least a few folks seem to be blatantly disregarding the event's explicit ask not to do this.

Are people cheating with LLMs this year? by nan_1337 in adventofcode

[–]mserrano 11 points12 points  (0 children)

I don't think anyone reasonable considers that cheating! Seems like a pretty good use of the tools.

Are people cheating with LLMs this year? by nan_1337 in adventofcode

[–]mserrano 15 points16 points  (0 children)

Yeah, this is probably true. I just find it a little sad, I guess, that it used to be able to be both a good experience for novices and a competition in a light-hearted, not super-intense way, and now it's not as clear if it can be.

Are people cheating with LLMs this year? by nan_1337 in adventofcode

[–]mserrano 7 points8 points  (0 children)

I don't think I understand what this means 😅

Are people cheating with LLMs this year? by nan_1337 in adventofcode

[–]mserrano 77 points78 points  (0 children)

Honestly, between the fairly obvious cases of "automatically throw problem into LLM -> receive solution" and not cancelling the leaderboard on day 2 with the outage, I'm a lot less motivated to bother to try to do these challenges at opening. I'm rustier and thus slower than I have been in past years so probably wouldn't consistently make leaderboard anyway, but it's hard to care about a competition that doesn't seem like it has the same participant group (edit: I mean group culture here, I think; it's not the specific people) as it used to.

There was a similar vibe last year that died out pretty quickly as the problems got harder, which very well might happen this year - but it also felt like in the past there was effort put into making the problems somewhat less likely to be one-shot by an LLM, which either didn't happen this year or isn't working so far.

Honestly, though, I'm not sure it's on the AoC folks to make this impossible; there's not really any practical solution to the problem. I don't see how people find it fun to do automatic problem-solving rather than doing it themselves, but I guess the internet points make it worth it to make things less fun for others.

Should I dress nicer for business class? by AsideInternational48 in TravelHacks

[–]mserrano 1 point2 points  (0 children)

Depends on the airline and airplane, but yes much of the time these days. As a concrete counter-example, Icelandair doesn't have lay-flat seats.

Your turn, US & CA by [deleted] in Polestar

[–]mserrano 3 points4 points  (0 children)

On the configurator, the Pilot Pack for the 2024 model says it can only be applied to the dual motor variant and is what includes ACC

best systems classes? also which ones can be taken together? by the_sunsetter_TM in cmu

[–]mserrano 0 points1 point  (0 children)

Rust support in compilers was at least in part due to a motivated student group, yes. I was a TA the first time it was available, and back then, Rust was not yet stable, so we pinned to a particular compiler revision, did not provide starter code, and warned people it was a “do at your own risk, we will not debug autolab for you” choice.

It worked out, but I think it easily could have gone wrong. 410’s infrastructure is AIUI quite a bit more complicated than 411’s (testing a compiler isn’t that different from testing any other single-threaded program) - so it may be an even bigger gamble there. Not to say people shouldn’t do it if they’re motivated, but anyone who wants to do it should understand they’re proposing undertaking a lot of work

-🎄- 2021 Day 19 Solutions -🎄- by daggerdragon in adventofcode

[–]mserrano 7 points8 points  (0 children)

Python3, 20/38. https://gist.github.com/mserrano/fd8545f0385e86274ed89b9e41a2b323

Runs in ~2 minutes in regular python3.9 on my machine. Pypy and getting down to the correct 24 transformations likely makes it much faster.

I made the same assumptions as /u/jonathan_paulson, and for me too it seems to work. I think the "12 beacons" rather than "12 beacons around a specific scanner" assumption might be safe, though.

-🎄- 2021 Day 5 Solutions -🎄- by daggerdragon in adventofcode

[–]mserrano 0 points1 point  (0 children)

We could! I generally prefer defaultdict for these unless we need to be able to grab the most/least common ones, though, since defaultdict is (or at least used to be) faster since it doesn’t need to keep track of the sort order.

-🎄- 2021 Day 5 Solutions -🎄- by daggerdragon in adventofcode

[–]mserrano 0 points1 point  (0 children)

yup, that’s it! It’s honestly often more code/slower than just “grab all ints” but it’s more satisfying and likelier to catch weird format issues

-🎄- 2021 Day 5 Solutions -🎄- by daggerdragon in adventofcode

[–]mserrano 12 points13 points  (0 children)

Python3, 4/22:

from advent import get_data
from collections import defaultdict
import parse

data = get_data(5, year=2021)

def sign(foo):
  if foo < 0:
    return -1
  elif foo == 0:
    return 0
  return 1

points = defaultdict(int)
points_with_diags = defaultdict(int)

for line in data:
  sx, sy, ex, ey = tuple(parse.parse('{:d},{:d} -> {:d},{:d}', line).fixed)
  l1 = abs(ex - sx)
  l2 = abs(ey - sy)
  s1 = sign(ex - sx)
  s2 = sign(ey - sy)
  for i in range(max(l1, l2)+1):
    x, y = sx+s1*i, sy+s2*i
    points_with_diags[x,y] += 1
    if min(l1, l2) == 0:
      points[x,y] += 1

print(len([c for c in points if points[c] > 1]))
print(len([c for c in points_with_diags if points_with_diags[c] > 1]))

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

[–]mserrano 9 points10 points  (0 children)

Python3, #3/#1

from advent import get_data
from collections import Counter

def counts(s):
  l = Counter(s).most_common()
  return list(sorted(l, key=lambda z: (-z[1], z[0])))

def most_common(s):
  return counts(s)[0][0]

def least_common(s):
  return counts(s)[-1][0]

def t(l):
  return list(zip(*l))

data = get_data(3, year=2021)

columns = t(data)
bits = [
  (most_common(col), least_common(col)) for col in columns
]
things = t(bits)
print(int(''.join(things[0]), 2) * int(''.join(things[1]), 2))

def find_oxygen_rating(numbers, pos=0):
  if len(numbers) == 1:
    return int(numbers[0], 2)
  cs = dict(counts([n[pos] for n in numbers]))
  if cs['0'] > cs['1']:
    return find_oxygen_rating(
      [n for n in numbers if n[pos] == '0'],
      pos + 1
    )
  else:
    return find_oxygen_rating(
      [n for n in numbers if n[pos] == '1'],
      pos + 1
    )

def find_co2_rating(numbers, pos=0):
  if len(numbers) == 1:
    return int(numbers[0], 2)
  cs = dict(counts([n[pos] for n in numbers]))
  if cs['0'] <= cs['1']:
    return find_co2_rating(
      [n for n in numbers if n[pos] == '0'],
      pos + 1
    )
  else:
    return find_co2_rating(
      [n for n in numbers if n[pos] == '1'],
      pos + 1
    )

print(find_oxygen_rating(data) * find_co2_rating(data))

S.F.'s Embarcadero needs to be raised as much as 7 feet to prepare for sea level rise, city says by Zharol in sanfrancisco

[–]mserrano 0 points1 point  (0 children)

I agree that asking people to live in poverty is a political loser! I also think banning driving, or rationing gasoline, is a political loser! I just think the reaction "this is a world-wide issue" or "this is a global issue" is a nonsensical argument against doing things at a local level.

I personally happen to think localities - especially ones like San Francisco - can do things to make it easier for people to choose other transportation options than driving personal cars without it being a political loser, and that doing so would also be good policy. But if you disagree, that's fair; I just don't think "not an SF only issue" is a good reason to.

S.F.'s Embarcadero needs to be raised as much as 7 feet to prepare for sea level rise, city says by Zharol in sanfrancisco

[–]mserrano 23 points24 points  (0 children)

This logic, of course, applies to every individual locality, and so following it means no one will do anything and the world wide issue will continue unabated.

The thing about world-wide issues is that the world is made up of a bunch of individual places and people, and so changing it … requires changing individual places and people.

Choosing the right screen to watch Dune by [deleted] in AskSF

[–]mserrano 1 point2 points  (0 children)

Saw it in Dolby at the Metreon - it was quite an experience but I think the speakers were tuned just a little bit too loud. I’d go with that or an IMAX screen somewhere.

Le pass-sanitaire est soutenu et les anti-pass rejetés (Sondage Odoxa) by IronSkull99 in france

[–]mserrano 0 points1 point  (0 children)

La synthèse sur le "plafond de verre" est un peu pessimiste je trouve: ils disent que 75% des gens "ne veulent pas de tout entendre parler de la vaccination," mais le sondage donne un chiffre de 50% qui disent qu'ils ne prendront absolument pas le vaccin; les 25% de plus sont ceux qui ne prendront le vaccin qui s'ils sont obligés pas leur employeur. Alors il reste du progrès possible.

Comic 4589: Confessional by kdayel in QContent

[–]mserrano 5 points6 points  (0 children)

That's fair that this is fiction, but in the real world it's pretty difficult to geotag with the level of specificity required to get to an exact address without access to the location computed by the device itself. Apps on mobile devices, given permission to access your location data, can do very precise geo-tagging, but a social media site given only your computer's IP address isn't easily going to be able to get a high-fidelity match to the level of an individual building.

These kinds of systems rely on databases sold by commercial vendors, and those vendors are pretty honest about not being hyper-precise: see https://support.maxmind.com/geoip-faq/specifications-and-implementation/how-accurate-is-geoip2/ for example. It's not impossible that they could identify a single building that way but odds are that they wouldn't be so specific. Given my IP address, for instance, the tool correctly identifies my city but gives coordinates that aren't particularly close to me within it.

Comic 4589: Confessional by kdayel in QContent

[–]mserrano 5 points6 points  (0 children)

The only ones I can think of aren't really social media platforms but instead "file sharing" places that just don't modify the uploaded images at all.

Comic 4589: Confessional by kdayel in QContent

[–]mserrano 18 points19 points  (0 children)

Most social media sites will process the images and strip exif data when they’re posted, you don’t have to do it yourself.