Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/applejag/adventofcode-2020-fsharp

My attempt at Advent of Code 2020 using F# https://adventofcode.com/2020
https://github.com/applejag/adventofcode-2020-fsharp

advent-of-code advent-of-code-2020 advent-of-code-fsharp dotnet-5 fsharp

Last synced: about 2 months ago
JSON representation

My attempt at Advent of Code 2020 using F# https://adventofcode.com/2020

Awesome Lists containing this project

README

        

# Advent of Code 2020 via F#

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

## Running it

- Install .NET 5.0

- Run with the `dotnet` CLI inside the project you wish to run.
For day 1, you would run:

```sh
cd src/Day01

# To run it on "input.txt" in current working directory
dotnet run

# To run it on some other file, example:
dotnet run -- sample.txt
```

## Adding a new puzzle solution

There is a template project, named `DayXX`. To make a new one, you may first
set the following environment variable:

```sh
# If using bash, zsh, sh, dash, ash...
AOC_DAY=03

# If using fish
set AOC_DAY 03

# If using PowerShell
$AOC_DAY='03'
```

Then run the following commands:

```sh
cp -r "src/DayXX" "src/Day$AOC_DAY"
mv "src/Day$AOC_DAY/DayXX.fsproj" "src/Day$AOC_DAY/Day$AOC_DAY.fsproj"
dotnet sln add "src/Day$AOC_DAY"
```