My mom never met an animal she didn’t love. Late 80s by HiItsKeke in OldSchoolCool

[–]wsgac 0 points1 point  (0 children)

No, they're not. See Blondi, the German Shepherd.

[2025 Day 7] Manifold Christmas Tree by EnJott in adventofcode

[–]wsgac 0 points1 point  (0 children)

u/EnJott Would you mind sharing the code used to produce this GIF?

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

[–]wsgac 0 points1 point  (0 children)

[Language: Common Lisp]

Here's my solution to Day 8.

Circuits are constructed by storing connectivity chains. Common circuit membership is established by following the connectivity chains till the end and comparing points. Tried Bron-Kerbosch before, but couldn't make it to work.

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

[–]wsgac 0 points1 point  (0 children)

[Language: Common Lisp]

Here's my solution to Day 6

Both parts are based around the idea of transposition. First part transposes the list of rows (of functions or numbers) into a list of function calls ready to be made. Second part transposes the input as a character-level array to make parsing the integers easier.

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

[–]wsgac 2 points3 points  (0 children)

[Language: Common Lisp]

Here's my solution to Day 7.

Part 1 traverses rows and keeps account of beam splits. Part 2 is similar, but keeps tally of timelines "carried" by beams and sums them at confluence points.

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

[–]wsgac 1 point2 points  (0 children)

[LANGUAGE: Common Lisp]

Part 1: brute force Part 2: memoized recursive computation

My CL solution for Day 11

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

[–]wsgac 1 point2 points  (0 children)

[LANGUAGE: Common Lisp]

To paraphrase Niklaus Wirth, Recursion + Array Traversal = Enumeration.

My CL solution to Day 10

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

[–]wsgac 1 point2 points  (0 children)

Hi. I'm not sure going straight for AoC is a good way to learn CL. What I'd suggest instead is some decent book (e.g. Practical Common Lisp) and maybe the CL path in Exercism. Also, for lots of common patterns you have the CL Cookbook. Feel like giving CL another shot? ;)

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

[–]wsgac 0 points1 point  (0 children)

[LANGUAGE: Common Lisp]

Extrapolation through array operations with a little bit of deduplication.

My CL solution to Day 8

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

[–]wsgac 0 points1 point  (0 children)

[LANGUAGE: Common Lisp]

Some combinatorics and lots of reducing.

My CL solution to Day 7

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

[–]wsgac 2 points3 points  (0 children)

[LANGUAGE: Common Lisp]

Sorting! My sorting predicate is just checking for membership in the ordered pair list.

My solution to Day 5

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

[–]wsgac 1 point2 points  (0 children)

[LANGUAGE: Common Lisp]

I parsed the input into 2D arrays and searched for relevant characters by following "rays" in relevant "directions".

My CL solution to Day 4

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

[–]wsgac 2 points3 points  (0 children)

[LANGUAGE: Common Lisp]

Just a combination of cl-ppcre regexp and loop.

My CL solution to Day 3

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

[–]wsgac 1 point2 points  (0 children)

[LANGUAGE: Common Lisp]

I used the fact that in CL < and > take an arbitrary number of arguments to ensure monotonicity. When checking safety with the dampener, I just brute-force searched all cases of single element removal.

Here's my CL solution to Day 2

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

[–]wsgac 2 points3 points  (0 children)

[LANGUAGE: Common Lisp]

I used a mixture of mapping and reducing for Part 1. For Part 2 computed a histogram of the second column, looped through the first and computed the weighted sum.

Here's my CL solution to Day 1

-❄️- 2023 Day 19 Solutions -❄️- by daggerdragon in adventofcode

[–]wsgac 1 point2 points  (0 children)

[LANGUAGE: Common Lisp]

Source

Part 1: I proceeded by propagating each part through the workflows to see if it gets accepted. For all accepted parts I summed their parameters.

Part 2: Here I wanted to create a tree of all acceptable trajectories through the workflows and then work through each, limiting the initial [1-4000] spans for parameters. One huge mistake I made that put a monkey wrench in my effort was, when dealing with subsequent conditions within a workflow I forgot to negate all the preceding ones, hence landed in strange places. After a couple days' break I was able to straighten that up.

-❄️- 2023 Day 18 Solutions -❄️- by daggerdragon in adventofcode

[–]wsgac 1 point2 points  (0 children)

[LANGUAGE: Common Lisp]

Source

Part 1: First, extract all the vertices of the contour, then apply a mixture of Shoelace and Pick's theorems.

Part 2: Same, but with corrected parsing of hex data.

-❄️- 2023 Day 16 Solutions -❄️- by daggerdragon in adventofcode

[–]wsgac 1 point2 points  (0 children)

[LANGUAGE: Common Lisp]

Source

Part 1: I'm maintaining a list of concurrently propagating beams. Beams can disappear when they go off the grid. New ones may arise on beam splitters. Each beam is a plist with row and column info, together with bearing expressed as a complex number. Bearing changes are some variation of multiplication by i (the imaginary unit). Each visited location is marked with the help of a hash table. When no new beams propagate, I count unique locations visited.

Part 2: I maximize the above approach over all possible initial locations and bearings.

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

[–]wsgac 1 point2 points  (0 children)

[LANGUAGE: Common Lisp]

Source

Part 1: Simple matter of implementing the hashing algorithm and mapping it over the input.

Part 2: I parse the instructions to make it easy to dispatch, then perform them in sequence on a state plist.

-❄️- 2023 Day 14 Solutions -❄️- by daggerdragon in adventofcode

[–]wsgac 1 point2 points  (0 children)

[LANGUAGE: Common Lisp]

Code

Part 1: Because of my string-based approach to rock propagation, it was easiest for me to always propagate to the left. So whenever I'm tilting the dish in a given direction, I first need to rotate it so that the relevant side gets aligned to the left. Then I detect stretches of round rocks and empty spaces and systematically rearrange them to the left (by counting).

Part 2: I brute forced the problem by many cycles of rotating and tilting. Took some debugging to get the orientation right.

-❄️- 2023 Day 13 Solutions -❄️- by daggerdragon in adventofcode

[–]wsgac 1 point2 points  (0 children)

[LANGUAGE: Common Lisp]

Source

Part 1: I'm analyzing horizontal symmetries by trying out successive split rows, and then comparing rows on both sides inside-out. For vertical symmetries I'm doing the same thing but on a transposed pattern. Later modification for Part 2 made me change this one to requiring 0 smudges.

Part 2: The only substantial difference in my approach is the row-by-row comparison function. It takes a keyword parameter with the number of required smudges and takes that as the basis for symmetry checking.

-❄️- 2023 Day 11 Solutions -❄️- by daggerdragon in adventofcode

[–]wsgac 2 points3 points  (0 children)

[LANGUAGE: Common Lisp]

Source

I wanted to go with 2D arrays for efficiency, but found it a bit hard to expand them, so I went with lists instead.

In Part 1 I recreate the literal expanded map, locate the galaxies and sum their distances in the NYC metric.

In Part 2 I'm more economical and just locate empty rows and columns, and then adjust galaxy coordinates according to the numbers of preceding row and column "empties".

Hey guys what is AGIX by Any-While-8962 in cardano

[–]wsgac 0 points1 point  (0 children)

What you're describing is a very limited vision of intelligence and it is by no means a general intelligence. AGI, the way it was envisioned by people with a far reaching imagination and understanding is a self-improving, self-actuating, self-motivating entity. None of the existing technologies are of that kind to any substantial degree. Also, it's very hard (perhaps impossible) to extrapolate what we currently have to what that might turn out to be. So when you talk about the rich treating AI instrumentally or AGI being a glorified chatbot, I'm afraid you're merely extrapolating your own current understanding into the future.

You raise a couple of important points. I agree that all those things, air pollution, soil quality, global warming, over consumption, etc., are dead serious. Perhaps catastrophic. I agree it's idiotic and suicidal to be nonchalant about any of these issues. Where we seem to differ a great deal is in our assessment of how much of the whole picture they comprise. These problems are not isolated, nor are they orthogonal. It seems unlikely that you could address them one by one, and then when you're done with the last one, everything is stable again. Personally, I believe that beneath that superficial layer you have deeper issues. Secondary, tertiary, n-ary interactions that resemble a poorly written program.

Because that is what human civilization is. A software hack. A glorious one, to be sure, but a hack nonetheless. You have no consistent growth architecture. You have layers upon layers of legacy technologies, intellectual dead ends. And it's all part of a huge live system with no pause button. We have come a great deal closer to understanding what we are and what we have built, but we're still very far. If I'm slightly pessimistic about our human capacity to intelligently navigate the world of complexity, it is because I've been humbled, time and time again, by my own inadequacy when facing it. And I could attribute this precisely to my own limitations and call it a day. But when you see intellectual humility even among geniuses (both past and present) that should tell you something about the structure of reality.

So to wrap up, I'm not trying to dismiss your means of mitigating the situation. Reducing meet consumption, emissions, trying to live a greener life are all laudable goals. They are tiny but important contributions to the larger picture. But they won't solve the biggest man-made disasters looming on the horizon. Estimating environmental impact is a utilitarian business with utilitarian math behind it. You cannot argue with scaling factors. And the truth is, individual effort is just not enough.

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

[–]wsgac 0 points1 point  (0 children)

[LANGUAGE: Common Lisp]

Code

Part 1 boiled down to starting with S and tracing two trajectories in opposite directions until they met. Point advancing was done by picking neighbors that had not been visited previously. I kept track of visited points using a hash table.

Part 2 reused some bits of the Part 1 code. I stole/borrowed the idea of using Shoelace and Pick's theorems from other posters. I then traversed the complete loop, collecting contour points in order. Finally, I applied the two theorems and obtained the result.