Lessons Learnt from Solving AoC in One Second
blog.sulami.xyz
Lessons Learnt from Solving AoC in One Second
1–5 of 5 posts
Re: Lessons Learnt from Solving AoC in One Second
#2The CSS file has a comment This below keeps the regular scrollbar for scrolling the page, if present, because that one makes sense to be there. but it doesn't seem to be taking effect for me.
Regarding the AoC i'm very impressed with adding the extra time constraint on yourself.
Re: Lessons Learnt from Solving AoC in One Second
#3Sorry - if this is your website, could you please not hide the scrollbar? The CSS file has a comment This below keeps the regular scrollbar for scrolling the page, if present, because that one makes sense to be there. but it doesn't seem to be taking effect for me. Regarding the AoC i'm very impressed with adding the extra time constraint on yourself.
Re: Lessons Learnt from Solving AoC in One Second
#4Sorry - if this is your website, could you please not hide the scrollbar? The CSS file has a comment This below keeps the regular scrollbar for scrolling the page, if present, because that one makes sense to be there. but it doesn't seem to be taking effect for me. Regarding the AoC i'm very impressed with adding the extra time constraint on yourself.
Sure thing, I'll have a look at it tomorrow. Would you be so kind and share your browser/OS so I can try to reproduce?
Re: Lessons Learnt from Solving AoC in One Second
#5Now I just take the whole stdin and pass it into a parser written in `nom`. If it's line-by-line, it's a trivial: `separated_list1(tag("\n"), parse_line)`, not more difficult than iterating through lines, parsing each, and combining them. If the input isn't line-by-line, a proper parser is way more cleaner than anything I've done before.
And there has never been a performance problem for me. (To be fair, AOC doesn't have truly giant input size)