I would accept discord/irc over mailing list. But nothing beats a proper forum website.
And no, subreddit is not a proper forum.
janAkali
He's a redneck, but in a good way.
In theory this issue can be solved with LD_PRELOAD trick. E.g. redirect all/most/some fopen
calls to "$HOME" to some other directory. But before I try to tackle it myself: is there already a similar solution like that?
I thought about this for some time. An anarchy would always collapse into governed state.
First, imagine the perfect scenario where there no authority and world is just a lot of tiny city-sized communities. It would take just a single bad actor to form a state, start invading neighboring communities and growing in power. In response - other communities would be forced to group into increasingly bigger states to have a chance to oppose influence from bigger/richer states.
This thought experiment also works if violent takeover is replaced by economic one. Think of cartels and monopolies.
Reminds me of mongolian tea: VERY strong, 70/30 milk and water, teaspoon of butter and a pinch of salt (enough to taste it and a little more).
I don't drink it often, because it's reallly unhealthy. But it's really good beverage for cold winter nights or after tiring work. It gives you a boost of energy, without the usual sugar fatigue that comes after drinking sweetened coffee/energy drinks.
That ad is targeted to Dragons.
I guess it's just a real handwriting on a note with everything around inpainted.
Yes the compiler/interpreter can figure it out on the fly, that's what we mean by untyped languages.
Are there untyped languages? You probably meant 'dynamically typed languages'.
But even statically typed languages can figure out most types for you from the context - it's called 'type inference'.
Nim
My whole solution can be expressed in just two words: Ordered HashTable
Total runtime: 0.068 line-seconds (40 LOC * 1.7 ms)
Puzzle rating: exceptionally confusing description 4/10
Code: cleaned up solution with types
Snippet:
proc getHash(s: string): int =
for c in s:
result = ((result + c.ord) * 17) mod 256
proc solve(lines: seq[string]): AOCSolution[int] =
var boxes: array[256, OrderedTable[string, int]]
for line in lines:
block p1:
result.part1 += line.getHash()
block p2:
if line.endsWith('-'):
var name = line.strip(leading=false, chars={'-'})
boxes[getHash(name)].del(name)
else:
let (name, _, value) = line.partition("=")
boxes[getHash(name)][name] = value[0].ord - '0'.ord
for bi, box in boxes:
if box.len < 1: continue
for vi, val in enumerate(box.values):
result.part2 += (bi+1) * (vi+1) * val
It's Nim, but I have no idea why you can't do this in Rust:
Full solution: https://codeberg.org/Archargelod/aoc23-nim/src/branch/master/day_05/solution.nim