-
Notifications
You must be signed in to change notification settings - Fork 88
Add article for day 8 #914
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: website
Are you sure you want to change the base?
Conversation
|
let's merge on Thursday to leave time for feedback, which I've asked for on Discord |
spamegg1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall
docs/2025/puzzles/day08.md
Outdated
|
|
||
| ```scala | ||
| /** A junction box in 3D space with an associated circuit ID. */ | ||
| class Box(val x: Long, val y: Long, val z: Long, var circuit: Int): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it look more natural / beginner-friendly as
case class Box(x: Long, y: Long, z: Long, var circuit: Int)I think it's fine either way, just a thought.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The question is: do we want two boxes that have the same coordinates and same circuit to be ==? I am not sure.
Also, I thought it would impact .pairs, but .combinations actually doesn't use ==. Whereas we use case class or class, we have:
val b1 = Box(1, 2, 3, 0)
val b2 = Box(1, 2, 3, 0)
assert(Seq(b1, b1).pairs.size == 1)
assert(Seq(b1, b2).pairs.size == 1)So, I am fine with a case class.
|
|
||
| ## Final Code | ||
|
|
||
| See the complete code on [GitHub](https://github.com/scalacenter/scala-advent-of-code/blob/main/2025/src/day08.scala). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link is currently missing, I guess the file will be included later on?
Should we just show the whole code here in the article instead? (unless it's too long) Most other articles do that, even though it's a bit repetitive. Again, it's fine either way I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link should work once we merge #912. In general, I prefer to avoid duplicating sources of truth; it’s safer if readers consult the original file directly (which can be CI-tested/linted) rather than a Markdown copy that may drift out of sync. That’s just a general principle though, given that this repo has no CI 😄
|
Thanks for the review @spamegg1! |
No description provided.