|
|
|
|
|
by js2
1293 days ago
|
|
Use DYLD_LIBRARY_PATH and DYLD_PRINT_LIBRARIES when running the compiled binary to see what's actually being loaded. It doesn't appear that DYLD_LIBRARY_PATH influences the output of otool -L. I wasn't able to get `swift repl` to use anything but the system runtime, maybe because it's signed. Maybe it can be made to work by stripping the out the signing but to be quite honest, I'm done with this at this point. I've been happily using Python to solve AoC. Y'all gluttons for punishment doing this in Swift: def part2():
total = 0
group = []
for line in INPUT.splitlines():
group.append(line.strip())
if len(group) < 3:
continue
common = list(set(group[0]) & set(group[1]) & set(group[2]))
group = []
assert len(common) == 1
c = common[0]
p = ascii_letters.index(c) + 1
# print(c, p)
total += p
print(total)
|
|