Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
* Summary Using [[https://adventofcode.com][Advent of Code]] as an excuse to learn some Swift (so the code here won't be idiomatic, or polished; it's a repository for exploring and understanding). * Usage ~main.swift~ is configured to run the code for both day one and day two. Can run a single day by commenting out the unnecessary ones. * Input data files Input files are user-specific, so if you're not me, you'll need to update the inputs in the ~Inputs~ directory. There should be one file per day. They can either be replaced in situ, or the Xcode build settings can be tweaked to specify alternative files. * Sample output #+BEGIN_EXAMPLE Day one: 5194970 Day two: Part 1: 11590668 Part2 : 2254 #+END_EXAMPLE * Swift resources ** General 1. [[https://swift.org/getting-started/][Swift getting started guide]] 2. [[https://docs.swift.org/swift-book/][The swift book]] 3. [[https://nshipster.com/swift-documentation/][Semi-official guide to docstrings in swift]] ** Swift linter in XCode: 1. [[https://github.com/realm/SwiftLint#xcode][SwiftLint]] ** References for particular days: *** Day 4: 1. Using an extension to split an int into an array of digits: [[https://www.hackingwithswift.com/example-code/language/how-to-split-an-integer-into-an-array-of-its-digits][from Hacking with Swift]] * Notes for a day ** TODO [0/3] Day 5: *** TODO Handle input *** TODO Opcode 3: copies input to address (both increment instruction pointer by 2 not 4) *** TODO Opcode 4: outputs value at address (both increment instruction pointer by 2 not 4)