You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
2.(recommended) Install the[rust-analyzer](https://rust-analyzer.github.io/manual.html) extension for your code editor.
31
-
3.(optional) Install a native debugger. If you are using VS Code,[CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) is a good option.
2. (recommended) Install the[rust-analyzer](https://rust-analyzer.github.io/manual.html) extension for your code editor.
31
+
3. (optional) Install a native debugger. If you are using VS Code,[CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) is a good option.
32
32
33
33
---
34
34
@@ -166,6 +166,9 @@ cargo read <day>
166
166
1. Install[`aoc-cli`](https://github.com/scarvalhojr/aoc-cli/) via cargo:`cargo install aoc-cli --version 0.12.0`
167
167
2. Create an`.adventofcode.session` file in your home directory and paste your session cookie. To retrieve the session cookie, press F12 anywhere on the Advent of Code website to open your browser developer tools. Look in_Cookies_ under the_Application_ or_Storage_ tab, and copy out the`session` cookie value.[^1]
168
168
169
+
>**Note**
170
+
>Create the`.adventofcode.session` file (note the dot) in your home directory (/home/alice on Linux, C:\Users\Alice on Windows, /Users/Alice on macOS).
171
+
169
172
Once installed, you can use the[download command](#download-input--description-for-a-day) and automatically submit solutions via the[`--submit` flag](#submitting-solutions).
170
173
171
174
###Automatically track ⭐️ progress in the readme
@@ -182,13 +185,13 @@ Go to the leaderboard page of the year you want to track and click _Private Lead
182
185
183
186
Go to the_Secrets_ tab in your repository settings and create the following secrets:
184
187
185
-
-`AOC_USER_ID`: Go to[this page](https://adventofcode.com/settings) and copy your user id. It's the number behind the`#` symbol in the first name option. Example:`3031`.
186
-
-`AOC_YEAR`: the year you want to track. Example:`2021`.
187
-
-`AOC_SESSION`: an active session[^2] for the advent of code website. To get this, press F12 anywhere on the Advent of Code website to open your browser developer tools. Look in your Cookies under the Application or Storage tab, and copy out the`session` cookie.
188
+
-`AOC_USER_ID`: Go to[this page](https://adventofcode.com/settings) and copy your user id. It's the number behind the`#` symbol in the first name option. Example:`3031`.
189
+
-`AOC_YEAR`: the year you want to track. Example:`2021`.
190
+
-`AOC_SESSION`: an active session[^2] for the advent of code website. To get this, press F12 anywhere on the Advent of Code website to open your browser developer tools. Look in your Cookies under the Application or Storage tab, and copy out the`session` cookie.
188
191
189
192
Go to the_Variables_ tab in your repository settings and create the following variable:
190
193
191
-
-`AOC_ENABLED`: This variable controls whether the workflow is enabled. Set it to`true` to enable the progress tracker.
194
+
-`AOC_ENABLED`: This variable controls whether the workflow is enabled. Set it to`true` to enable the progress tracker.
192
195
193
196
✨ You can now run this action manually via the_Run workflow_ button on the workflow page. If you want the workflow to run automatically, uncomment the`schedule` section in the`readme-stars.yml` workflow file or add a`push` trigger.
194
197
@@ -198,23 +201,23 @@ Uncomment the respective sections in the `ci.yml` workflow.
3. Click_Debug_ next to the unit test or the_main_ function.[^4]
207
+
4. The debugger will halt your program at the specific line and allow you to inspect the local stack.[^5]
205
208
206
209
##Useful crates
207
210
208
-
-[itertools](https://crates.io/crates/itertools): Extends iterators with extra methods and adaptors. Frequently useful for aoc puzzles.
209
-
-[regex](https://crates.io/crates/regex): Official regular expressions implementation for Rust.
211
+
-[itertools](https://crates.io/crates/itertools): Extends iterators with extra methods and adaptors. Frequently useful for aoc puzzles.
212
+
-[regex](https://crates.io/crates/regex): Official regular expressions implementation for Rust.
210
213
211
214
A curated list of popular crates can be found on[blessred.rs](https://blessed.rs/crates).
212
215
213
216
Do you have aoc-specific crate recommendations?[Share them!](https://github.com/fspoettel/advent-of-code-rust/edit/main/README.md)
214
217
215
218
##Common pitfalls
216
219
217
-
-**Integer overflows:** This template uses 32-bit integers by default because it is generally faster - for example when packed in large arrays or structs - than using 64-bit integers everywhere. For some problems, solutions for real input might exceed 32-bit integer space. While this is checked and panics in`debug` mode, integers[wrap](https://doc.rust-lang.org/book/ch03-02-data-types.html#integer-overflow) in`release` mode, leading to wrong output when running your solution.
220
+
-**Integer overflows:** This template uses 32-bit integers by default because it is generally faster - for example when packed in large arrays or structs - than using 64-bit integers everywhere. For some problems, solutions for real input might exceed 32-bit integer space. While this is checked and panics in`debug` mode, integers[wrap](https://doc.rust-lang.org/book/ch03-02-data-types.html#integer-overflow) in`release` mode, leading to wrong output when running your solution.