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
Solutions in Scala for the annual [Advent of Code (adventofcode.com)](https://adventofcode.com/) challenge.
4
4
@@ -9,6 +9,7 @@ See earlier editions:
9
9
-[2021](/2021/README.md)
10
10
-[2022](/2022/README.md)
11
11
-[2023](/2023/README.md)
12
+
-[2024](/2024/README.md)
12
13
13
14
## Website
14
15
@@ -19,7 +20,7 @@ The [Scala Advent of Code](https://scalacenter.github.io/scala-advent-of-code/)
19
20
20
21
## Setup
21
22
22
-
We use Visual Studio Code with Metals to write Scala code, and scala-cli to compile and run it.
23
+
We use Visual Studio Code with Metals to write Scala code, and Scala-CLI to compile and run it. (Scala-CLI has been the default `scala` command since Scala 3.5.)
23
24
24
25
You can follow these [steps](https://scalacenter.github.io/scala-advent-of-code/setup) to set up your environement.
25
26
@@ -28,39 +29,39 @@ You can follow these [steps](https://scalacenter.github.io/scala-advent-of-code/
28
29
After you clone the repository, open a terminal and run:
29
30
```
30
31
$ cd scala-advent-of-code
31
-
$ scala-cli setup-ide 2024
32
-
$ mkdir 2024/input
33
-
$ code 2024
32
+
$ scala setup-ide 2025
33
+
$ mkdir 2025/input
34
+
$ code 2025
34
35
```
35
36
36
-
`code 2024` will open Visual Studio Code and start Metals. If not you may have to go to the Metals pane and click
37
+
`code 2025` will open Visual Studio Code and start Metals. If not you may have to go to the Metals pane and click
37
38
the button labelled "Start Metals".
38
39
39
-
When you navigate to a file, e.g. `2024/src/day01.scala` metals should index the project, and then display code lenses
40
+
When you navigate to a file, e.g. `2025/src/day01.scala`, Metals should index the project, and then display code lenses
40
41
above each of the main methods `part1` and `part2`, as shown in this image:
41
42

42
43
43
-
To run a solution, first copy your input to the folder `2024/input`.
44
+
To run a solution, first copy your input to the folder `2025/input`.
44
45
Then click `run` in VS Code which will run the code and display the results of the program. Or `debug`,
45
46
which will let you pause on breakpoints, and execute expressions in the debug console.
46
47
47
48
### How to run a solution with command line
48
49
49
-
To run a solution, first copy your input to the folder `2024/input`.
50
+
To run a solution, first copy your input to the folder `2025/input`.
50
51
51
52
In a terminal you can run:
52
53
```
53
-
$ scala-cli 2024 -M day01.part1
54
+
$ scala 2025 -M day01.part1
54
55
Compiling project (Scala 3.x.y, JVM)
55
56
Compiled project (Scala 3.x.y, JVM)
56
57
The solution is 64929
57
58
```
58
59
59
60
Or, to run another solution:
60
61
```
61
-
$ scala-cli 2024 -M <dayX>.<partX>
62
+
$ scala 2025 -M <dayX>.<partX>
62
63
```
63
64
64
65
## Contributing
65
66
66
-
-Please do not commit your puzzle inputs, we can not accept them as they are protected by copyright
67
+
Please do not commit your puzzle inputs; we can not accept them, as they are protected by copyright
0 commit comments