Grilled Cheese

ExploreLog inSign up
Terms of UsePrivacy PolicyCommunity StandardsHelpGet the app

Grilled Cheese is a product of Village Compute

Version devBuilt at: 2026-12-03 22:42:33 EST

PhotosVideosAllPeople
LatestRanked
Load more
@slbarth.bsky.socialDec 4, 2026, 7:50 PM

I just completed "Dusty Shed" - Day 1 - Advent of Code 2026 #AdventOfCode adventofcode.com/2026/day/1

adventofcode.comDay 1 - Advent of Code 2026
?Unknown authorDec 4, 2026, 7:30 PM

I just completed "Perilous Pier" - Day 4 - Advent of Code 2026 #AdventOfCode adventofcode.com/2026/day/4

adventofcode.comDay 4 - Advent of Code 2026
@maklem.leuchtstark.dev.ap.brid.gyDec 4, 2026, 7:26 PM

AoC Tag 4 geschafft. 🥳
Dieses mal sogar mit ein paar Tests.

github.com/maklem/adven…

#AdventOfCode #AdventOfCode2026 #golang

github.comadvent-of-code-2026/04/04_test.go at main · maklem/advent-of-code-2026Contribute to maklem/advent-of-code-2026 development by creating an account on GitHub.
?Unknown authorDec 4, 2026, 7:23 PM

🎄 #AdventOfCode day 4

This one was a bit scarier at first, but it was a lot of fun in the end.

Here is my 🐫 #OCaml solution, and then another more elegant one (although a bit less efficient) inspired by the approach of a colleague.

let rec set l i v =
  if i = 0 then v :: List.tl l
  else List.hd l :: set (List.tl l) (i - 1) v

let rec patlen bc =
  let s = String.(trim (replace_all ~sub:"?" ~by:" " bc)) in
  let len = String.length s in
  if len < 2 then 1 else
  let lst = List.of_seq (String.to_seq s) in
  let rec checklen n =
    if n = len then n else
    let rec checkpat pat =
      let rec check i p l =
        match p, l with
        | _, [] -> n
        | [], l -> check 0 pat l
        | x :: p, c :: l when c = ' ' || c = x -> check (i + 1) p l
        | ' ' :: _, c :: _ -> checkpat (set pat i c)
        | _ -> checklen (n + 1)
      in check 0 pat lst
    in checkpat (List.take n lst)
  in checklen 1

let () =
  let barcodes = In_channel.input_lines stdin in
  Printf.printf "%d\n%d\n"
    List.(map patlen barcodes |> fold_left (+) 0)
    (String.concat "" barcodes |> patlen)
let rec single = function
  | [] -> true
  | x :: y :: _ when x <> y -> false
  | _ :: l -> single l

let minarg f = let rec loop n = if f n then n else loop (n+1) in loop 1

let foldable bc n =
  let l = String.length bc in
  let rec sub i =
    if i >= l then [] else
    if bc.[i] <> '?' then bc.[i] :: sub (i+n) else sub (i+n)
  in List.for_all single (List.init n sub)

let () =
  let barcodes = In_channel.input_lines stdin in
  Printf.printf "%d\n%d\n"
    List.(map (fun bc -> minarg (foldable bc)) barcodes |> fold_left (+) 0)
    (minarg (foldable (String.concat "" barcodes)))
@gereleth.bsky.socialDec 4, 2026, 7:15 PM

My algorithm for #AdventOfCode 2026 day 3 was double counting the squares and I couldn't figure out why. And `return total // 2` was totally bothering me.

So I adapted some old animation code to show the process. Helped me spot and correct the problem =)

?Unknown authorDec 4, 2026, 7:12 PM

I just completed "Perilous Pier" - Day 4 - Advent of Code 2026 #AdventOfCode adventofcode.com/2026/day/4

adventofcode.comDay 4 - Advent of Code 2026
@actualpanda.bsky.socialDec 4, 2026, 7:09 PM

I just completed "Perilous Pier" - Day 4 - Advent of Code 2026 #AdventOfCode adventofcode.com/2026/day/4

adventofcode.comDay 4 - Advent of Code 2026
@toptags.bsky.socialDec 4, 2026, 7:00 PM

🌟 BlueSky trending tags (1h) #16-30:

#fursuit #wip #furry #ephemerialap #ai #bolton #ambient #blender #alexasks #adventofcode #hazbinhotelalastor #festivaloflights #deepsleep #bg3 #noai

👇 #1-15 trending tags

TTrending Tags@trendtags.bsky.socialDec 4, 2026, 7:00 PM

🌟 BlueSky trending tags (1h): #boldandbeautiful #furfest #artadventcalendar #blender3d #mff2026 #mff26 #bara #fotovorschlag #ocarinaoftime $nvda #godotengine #cdnpoli #bssint2026 #mlp #mff

@phdemetri.bsky.socialDec 4, 2026, 6:52 PM

Day 4 of #adventofcode was really hard for me, so I asked claude and as penance I wrote a blog post

dpananos.github.io/posts/2026-1...

dpananos.github.ioAdvent of Code Day 4 Solution – Demetri Pananos Ph.D
?Unknown authorDec 4, 2026, 6:47 PM

I've completed "Perilous Pier" - Day 4 - Advent of Code 2026 #AdventOfCode adventofcode.com/2026/day/4

My solution to part 1 took me way too long - bad.
But it did make part 2 completely trivial - good.

Complete with a visual.

Photo, no description
@iamharisahsan.bsky.socialDec 4, 2026, 6:43 PM

I just completed "Perilous Pier" - Day 4 - Advent of Code 2026
#AdventOfCode

You want to see the code?
Follow me on GitHub..
github.com/Haris-Mughal

and find code there.. :)

adventofcode.com/2026/day/4

Photo, no description
?Unknown authorDec 4, 2026, 6:36 PM

I just completed "Perilous Pier" - Day 4 - Advent of Code 2026 #AdventOfCode adventofcode.com/2026/day/4

adventofcode.comDay 4 - Advent of Code 2026
@yawni.is-a-furry.de.ap.brid.gyDec 4, 2026, 6:31 PM

I've completed "Foggy Forest" - Day 3 - Advent of Code 2026 #AdventOfCode adventofcode.com/2026/day/3

@smylers.ukDec 4, 2026, 6:14 PM

#AdventOfCode Day 4 suits solving in Vim keystrokes quite well — a pattern to find barcodes that are incompatible with repetitions of a particular size, with a keyboard macro that adds extra dots to the pattern for the next size up and loops till done: old.reddit.com/r/adventofco...

:%s/^/+1 ⟨Ctrl+M⟩{O\v(\l)%(.)*\1@!\l⟨Ctrl+[⟩
qaqqayiW:v/⟨Ctrl+R⟩0/s/ .*⟨Ctrl+M⟩
/ ⟨Ctrl+M⟩:g//norm ⟨Ctrl+A⟩⟨Ctrl+M⟩{$F)yhp;p@aq@a
{ddvGJ0@v
?Unknown authorDec 4, 2026, 6:09 PM

I just completed "Foggy Forest" - Day 3 - Advent of Code 2026 #AdventOfCode adventofcode.com/2026/day/3
The code is here: github.com/schwidom/Adv...
In #SWI #Prolog using #CHR again. The execution time led to some ideas for optimization, maybe later. But the CHR code is very tiny which is also ok.

adventofcode.comDay 3 - Advent of Code 2026
@paul-warner.bsky.socialDec 4, 2026, 6:08 PM

I just completed "Perilous Pier" - Day 4 - Advent of Code 2026 #AdventOfCode adventofcode.com/2026/day/4

Part 2 was really easy, not sure what I did wrong in part 1 to make it what way! Please by gentle, I'm learning JS...
github.com/warnerpr/adv...

adventofcode.comDay 4 - Advent of Code 2026
@randy.pubDec 4, 2026, 5:45 PM

Nice clean solution for Day 4 of #adventofcode in #julialang. This one felt a lot better than yesterdays, got part 2 for free using my part 1 solution:

function solve(str)
    p = Dict(k => findall(k, str) for k in "roygbv" if findall(k, str) != [])
    isempty(p) && return 1

    for l in length(keys(p)):length(str) 
        y = vcat([v for (k, v) in Dict(k => unique(v .% l) for (k, v) in p)]...) 
        length(Set(y)) == length(y) && return l
    end
end

println(sum(solve.(readlines("data/4.txt")))) # Part 1
println(solve(*(readlines("data/4.txt")...))) # Part 2
@ghostaldev.comDec 4, 2026, 5:03 PM

"Perilous Pier", day 4 of #AdventOfCode was hard work on little sleep. I did the first part using a recursive backtracking approach, which worked after some diffident head scratching, but it wouldn't scale for part b. Then I realized chunking and masking was waaaaay more efficient 🤦‍♂️😅

adventofcode.comDay 4 - Advent of Code 2026