These are daily programming puzzles? How long do they take on average? Also, I know somebody who is just starting out at coding. Would it be too hard for them? They are brand new, learning about loops
For someone just starting out they would get stuck on this very first problem, it involves recursion. People 'get' recursion, but coding it is something different.
Advent of Code 2019
51–60 of 124 posts
Re: Advent of Code 2019
#52the word advent is religious.
Re: Advent of Code 2019
#53Self promotion, but as this is my first year doing advent of code I'm solving all of the problems using awk[1], the solutions will be published here[2] [1]: https://man.openbsd.org/awk [2]: https://jo.ie/advent-of-awk-2019.html
> | awk '{print $}'
The solution to the first exercise looks surprisingly clean. It will be interesting to see how they continue as the challenges get harder. Bookmarked!Re: Advent of Code 2019
#54I like everything about this except the name. the word advent is religious.
If you are religious, look upon this as a similar thing which reminds you of the season, building in anticipation of the final day.
If you are not religious, it's just a word with no special meaning other than the time of year. Same goes if you are not of a Christian religion.
Re: Advent of Code 2019
#55For example, here is the Nim communities effort: https://forum.nim-lang.org/t/5588
Re: Advent of Code 2019
#56Many of the comments are about the event as a whole, but I'd like to commend the author for the day 1 puzzle, which I think is very cleverly written. Many people (including myself) use these as an opportunity to try out learning a new language, and the first puzzle does a good job of making sure you know enough basic operations for some of the puzzles coming up. The puzzle itself wasn't very difficult, you could do i…
Learning new environments can be painful so it’s good it starts off easy. I’m trying to solve them with Swift Playgrounds on the iPad, for example. And I can’t figure out how to create a simple text file for the data.
func calcFuel(_ mass:Int) -> Int {mass / 3 - 2}
let z0 = massList.map(calcFuel).reduce(0, +)
or simply ... let z1 = massList.map({$0 / 3 - 2}).reduce(0, +)
Any idea how to read the data on the iPad?Re: Advent of Code 2019
#57I like everything about this except the name. the word advent is religious.
Otherwise, it's just a normal word which means "the arrival of a notable person, thing, or event".
Re: Advent of Code 2019
#58One line bash solutions: https://pastebin.com/QnKJEXxt
input.map(&(-> (f) {->(g) {g.(g)}.(->(g) { f.(->(*args) {g.(g).(*args)})})}.(->(f) { ->(n) { n Re: Advent of Code 2019
#59I like everything about this except the name. the word advent is religious.
Re: Advent of Code 2019
#60Earlier quoted context omitted.
That one wiped me out for a week too, and caused borderline psychological problems. Ultimately though I realised that if I followed the description word by word, and made no assumptions, then I got the right solution. Still, a nightmare: you could pass all the examples, or even some alternate real sample data, and still get it wrong if you got the ordering slightly incorrect.
Yeah, it's really frustrating when the text summary is vague and underspecified. It makes it hard to understand exactly the result the author is looking for, which isn't the fun kind of puzzle.