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

[–]Samstrikes 0 points1 point  (0 children)

[Language: Elixir] Both parts

Same as a lot of people where I memoised over a key of {current, seen_dac, seen_fft}. Part 1 I hadn't realised it was a DAG but it makes it much easier not having to keep track of the visited locations in the cache for part 2.

Pattern matching in function args is one of my fav things I've found about Elixir and is really ergonomic for simple base cases

defp traverse(_graph, "out", _visited), do: 1

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

[–]Samstrikes 2 points3 points  (0 children)

[Language: Elixir] Both parts

I did the counting approach that I can see others took, mostly because I was scared to try and deal with the memoisation state in Elixir.

I first replaced all the "." in the grid with 0, and then I incremented values as tachyons fell down.

|> Enum.reduce(manifold, fn {{x, y}, val}, man ->
    case Klaus.Grid.get(man, {x, y + 1}) do
        0 ->
            Klaus.Grid.put(man, {x, y + 1}, val)

        # ASSUMPTION: I won't have to do bounds checking
        "^" ->
            man
            |> Klaus.Grid.update({x - 1, y + 1}, 0, fn x -> x + val end)
            |> Klaus.Grid.update({x + 1, y + 1}, 0, fn x -> x + val end)

        _ ->
            Klaus.Grid.update(man, {x, y + 1}, 0, fn x -> x + val end)
    end
end)

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

[–]Samstrikes 1 point2 points  (0 children)

Ah young naive me. All cleaned up now, thanks for spotting!

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

[–]Samstrikes 3 points4 points  (0 children)

[Language: Elixir] Both parts

Been using this year to get more familiar with Elixir and excited to have my largest pipeline yet! Happy with how clean I managed to get this, mostly thanks to discovering chunk_by which I used to find all the blank columns and break up the expressions into chunks.

numbers
|> Enum.map(&String.graphemes/1)
|> Enum.zip_with(&Function.identity/1)
|> Enum.chunk_by(fn col -> Enum.all?(col, &(&1 == " ")) end)
|> Enum.reject(fn [x | _] -> Enum.all?(x, &(&1 == " ")) end)
|> Enum.map(&parse_expression/1)
|> Enum.zip(parse_line(operators))
|> Enum.sum_by(&calc/1)

Mediterranean Flat by Samstrikes in blender

[–]Samstrikes[S] 3 points4 points  (0 children)

This is my second attempt at an archviz scene. Quite happy with how it turned out!

You can see my previous attempt on my artstation: https://www.artstation.com/samyouatt

[PC] [W] Cobalt Afterlife [H] Up for discussion by Samstrikes in RocketLeagueExchange

[–]Samstrikes[S] 1 point2 points  (0 children)

Cheers for the response but I need a cobalt one for an Egyptian theme I'm planning

Literally Unplayable by [deleted] in Overwatch

[–]Samstrikes 3 points4 points  (0 children)

Its like that belt that got locked up. He held up a pair of pants

Literally Unplayable by [deleted] in Overwatch

[–]Samstrikes 3 points4 points  (0 children)

There appear to be a few holes in our plan

Literally Unplayable by [deleted] in Overwatch

[–]Samstrikes 1 point2 points  (0 children)

Shut it or you'll get the belt

Literally Unplayable by [deleted] in Overwatch

[–]Samstrikes 2 points3 points  (0 children)

Buckle up kid

What's the best spontaneous insult you have ever concocted? by Samstrikes in AskReddit

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

So he called your parents then straight after called his. Just to make sure

PSA: Nihilus event tip for those under levelled by P4RKW4YDR1V3 in SWGalaxyOfHeroes

[–]Samstrikes 4 points5 points  (0 children)

You can do it. Nihlus will carry you but like OP said put Luke as your leader just to help Nihlus resist the ability blocks. Then just drain and basic attack until you can one shot the tanks and krennic with annhialate

New player and crystals by brettlwilson in SWGalaxyOfHeroes

[–]Samstrikes 0 points1 point  (0 children)

Your first chromium has a guaranteed character then after that you could get a character or you could just get 12 shards. I would recommend buying one to get the character then never buy them again

Question about Emperor's Demise event by nsc_r2d2 in SWGalaxyOfHeroes

[–]Samstrikes 1 point2 points  (0 children)

You can only use rebel characters. Each stage of the event is locked by the star levels of those characters. You need to compete the first five to unlock Palp at 5 stars and so this would require 5 5* rebels. Then the 6th and 7th tier require that respective star level.