top | item 46097105

(no title)

gray_-_wolf | 3 months ago

I am very happy that we get the advent of code again this year, however I have read the FAQ for the first time, and I must admit I am not sure I understand the reasoning behind this:

> If you're posting a code repository somewhere, please don't include parts of Advent of Code like the puzzle text or your inputs.

The text I get, but the inputs? Well, I will comply, since I am getting a very nice thing for (almost) free, so it is polite to respect the wishes here, but since I commit the inputs (you know, since I want to be able to run tests) into the repository, it is bit of a shame the repo must be private.

discuss

order

gerikson|3 months ago

If enough inputs are available online, someone can presumably collect them and clone the entire project without having access to the puzzle input generation code, which is the "secret sauce" of the project.

losvedir|3 months ago

Are you saying that we all have different inputs? I've never actually checked that, but I don't think it's true. My colleagues have gotten stuck in the same places and have mentioned aspects of puzzles and input characteristics and never spoken past each other. I feel like if we had different inputs we'd have noticed by now.

sevenseacat|3 months ago

I use git-crypt to encrypt the inputs in my public repo https://www.agwa.name/projects/git-crypt/ :)

rawling|3 months ago

I don't push my solutions publicly, but I made an input downloader so you can input your cookie from your browser and load (and cache) the inputs rather than commit them.

yesbabyyes|3 months ago

This is not surprising at all, to me. Just commit the example input and write your test cases against that. In a nicely structured solution, this works beautifully with example style tests, like python or rust doctests, or even running jsdoc @example stanzas as tests with e.g. the @linus/testy module.

gray_-_wolf|3 months ago

> Just commit the example input

The example input(s) is part of the "text", and so committing it is also not allowed. I guess I could craft my own example inputs and commit those, but that exceed the level of effort I am willing to expend trying to publish repository no one will likely ever read. :)

jedimastert|3 months ago

The inputs are part of the validation that you did the question, so they're kind of a secret.

MyOutfitIsVague|3 months ago

I make my code public, and keep my inputs in a private submodule.