Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/applejag/adventofcode-2023-zig

My attempt at Advent of Code 2023 using Zig
https://github.com/applejag/adventofcode-2023-zig

advent-of-code advent-of-code-2023 advent-of-code-zig zig ziglang

Last synced: 4 days ago
JSON representation

My attempt at Advent of Code 2023 using Zig

Awesome Lists containing this project

README

        

# Advent of Code 2022 via Zig

[![REUSE status](https://api.reuse.software/badge/github.com/applejag/adventofcode-2023-zig)](https://api.reuse.software/info/github.com/applejag/adventofcode-2023-zig)

This repo contains my attempt at Advent of Code 2023
().

## Running

Requires Zig v0.12.0-dev.1769, 2023-12-01 (or later):

```console
$ zig build run
info: Usage: adventofcode-2023-zig [flags]

Flags:
-d, --day=int Advent calendar day. Number between 1 and 5
-p, --part=int Part of day, 1 or 2 (default 1)
```

```console
$ zig build run -- --day 1
info: Running day 01 part 1
info: Sum = 54990
```

The code to run the different days are a bit overkill, but I wanted to try
how far I could get with Zig's type system.

On the plus side, very far! On the down side, the LSP starts failing to
understand quite quickly once you do some inline switches and comptime.

## License

This repository is licensed under multiple licenses, following the
[REUSE](https://reuse.software/) specification (version 3.0).

- All Zig files uses BSD-3-Clause
- Some documentation uses CC-BY-4.0
- Other miscellaneous files uses CC0-1.0

See the file header or accompanying `.license` file on a per-file basis
for a more exact answer.