Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
AdventOfCode
Hacky solutions for [Advent of Code](https://adventofcode.com), working on past problems (by AllanTaylor314)
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
Nim
Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
-
adventofcode
My solutions for https://adventofcode.com/ programming mini puzzles - written mostly as sjasmplus script (to exercise the tool and collect ideas for future development of the script language, not because it's a best choice for the task, quite opposite) (by ped7g)
-
adventOfCode
Advent of code solutions, probably mostly in C++, but maybe in Rust in the (near) future. (by osalbahr)
-
adventofcode
This repo is designed to keep track of my attempts at advent of code. Starting with 2021, might try earlier years (by ClementPinard)
-
Advent_of_Code
A repo revolving around attempting to solve the Advent of Code puzzles with single-statement t-sql (by adimcohen)
-
advent-of-code-go
All 8 years of adventofcode.com solutions in Go/Golang; 2015 2016 2017 2018 2019 2020 2021 2022
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
TypeScript - For P1 thought about multiple data structures, but settled for simple Set, P2 was easy.
Python 3, 13/11
Part 1 : I just implemented a very careful simulation, using a set to store elves positions and a few auxiliary functions to check all directions.
Python [762/731]
Rust solution [326/300]
Typescript (2125/1930)
perl5 848/769 [coding video] [visualization]
Javascript
Elixir 1554/1502 code, reflections
You're likely running into this issue. The issue it's duped on has more information, tl;dr; proc runRound(grid: var Grid[bool], fs: seq[proc(p: Point): Point {.nimcall.}]) = should work.
Both Parts ~ 25s
Java
Part 1, Part 2 (6.6s with CPython, 3.9 with PyPy)
Python straight forward implementation with two sets and two dicts. Always love cellular automata/Game of Life AoC tasks.
Python3 without any imports definitely not optimised as it takes 5s, but hopefully just about readable
Python 3:
Here is another take in Clojure: Github. It is very slow though, with all the sets I am handling.
C# (not great leaderboard position on either part because I started almost 4 hours late)
Haskell, pretty slow at 9 s.
Part 1
Here's the code: https://github.com/colinleroy/aoc2022/blob/master/a2tools/src/aoc/day23/day23.c
Haskell
(Related to the first issue, see github issues #45840 and #68995)
Typescript
Nim
Better late then never. Each round I generate a treemap that holds the elves for a proposed position. For part 2 I set the target round to the max usize and break when the treemap is empty. https://github.com/Convez/AdventOfCode2022/blob/main/day23/src/main.rs I'm sure the update of the elf position can be optimized more, but I'm already late for day 24 :D
code
Python