Skip to content

Solutions to Advent of Code 2020 in a variety of languages including Prolog, Elixir, Rust, and Clojure

Notifications You must be signed in to change notification settings

samarthkishor/Advent-of-Code-2020

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code 2020

My solutions for Advent of Code 2020.

Installation

I tried to use Nix to set up local development environments. For each day you can cd into the respective directory and use nix-shell to install all the dependencies you need. I ran into some issues with installing Clojure with Nix so this doesn’t apply for the days when I used that language.

Specific commands to run the programs for each day are specified below.

Solutions

Day 1: SWI Prolog

nix-shell --pure --run "swipl day1.pl"

Day 2: Clojure

  • Clojure: clojure day2.clj
  • Babashka: bb day2.clj

Day 3: Elixir

nix-shell --pure --run "elixir day3.exs"

Day 4: Elixir

nix-shell --pure --run "elixir day4.exs"

Day 5: SWI Prolog

nix-shell --pure --run "swipl day5.pl"

Day 6: Elixir

nix-shell --pure --run "elixir day6.exs"

Day 7: SWI Prolog (and a bit of Python)

nix-shell --pure --run "python3 parse.py && swipl day7.pl"

Day 8: Rust

nix-shell --pure --run "cargo run"

Day 9: SWI Prolog

nix-shell --pure --run "swipl day9.pl"

Day 10: SWI Prolog

nix-shell --pure --run "swipl day10.pl"

About

Solutions to Advent of Code 2020 in a variety of languages including Prolog, Elixir, Rust, and Clojure

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published