Day 5 of advent of code done. Today was the dumbest parser yet. It was a few characters off of being valid yaml, but alas.
Today was also the “datasets so large they overflow common data structures” day. So iterating over all the generated elements took 900 seconds or so in Typescript.
I *almost* didn’t do it, but after doing the parser the actual algorithm was super easy once you read the dozen paragraphs it took to explain how the obfuscated input worked.
I love programming -_-
Day 4 of Advent of Code done with Typescript. Lessons learned:
1. console.log() is super slow, I thought a recursive function was blocked, but it was just really slow. I took out the logging and it came back in a few seconds
2. typescript has "sets" but they don't have a built in way to do intersections... I know an array of unique values can be useful for the uniqueness, but comparisons are a pretty valuable part of sets.
3. I still hate typescript and I refuse to learn the difference between var and let until it bites me
My biggest problem with Advent of Code is that the largest amount of difficulty comes from parsing their irregular inputs.
This is why most systems have regular inputs with quality parsers now. I have plenty of shit to say about JSON but it's not
467..114..
...*......
..35..633.
......#...
617*......
.....+.58.
..592.....
......755.
...$.*....
.664.598..
Like... seriously... this is the input for a problem of "collect the right numbers and add them up", which is basically what the past two days were, the increasing difficulty is the dumbness of the inputs.
Day 1 on Advent of Code done with Typescript. I hate it. It really is just javascript with some shitty typing added on top and kinda-sorta some QoL improvements.
I'm not really looking forward to tons of string parsing with this garbage.
But this is how we grow as programmers, right? By challenging ourselves?
It’s time to pick another shitty language* I don’t already know to do Advent of Code.
I did Elixir last year so I don’t want to do another functional language. Typescript has some direct application to some work I’m doing, but only kinda.
Maybe it’s the year to learn Rust and then pretend like everything should be written in it?
Should I go super cozy and try Perl 6? I know Perl, but from back in the 5.0053 days.
Decisions, decisions.
*all programming languages are shitty
Would have been nice if the early talk about BG3 involved talking about more than bear sex and genital choice.
If anyone had said, "The opening cinematic has a mind flayer spell jammer ship fighting with 3 dragons" I wouldn't have hesitated to buy it.
Instead I had to be convinced over and over that it wasn't just a sexual deviance simulator.
Fiddling with matrix bots only to find that there's no case insensitive match on simple responses (like help) but only on active commands. Ok, simple enough pull request. Write two lines of python, 6 lines of comments, 4 lines of tests.
Try to run the tests and now I'm fighting with python dev environments because python is terrible.