Show newer
Gruyère boosted
Gruyère boosted
Gruyère boosted

I know God is real and he loves us because A. All animals like being petted and B. Humans have a desire to pet all animals

If you like art and have the means to provide support for it, I recommend checking out this Kickstarter. A classical painter spent 10 weeks bumming around Japan making Japanese style watercolors. Now he’s making them available as postcards, an art book, signed and numbered woodblock prints and even the originals if you’re wanting to throw a lot of money down.

I’m in for the art book and may still put some money down for the postcards.

kickstarter.com/projects/14318

Gruyère boosted

Day 6 of Advent of Code completed in record time (less than an hour). Part 2 took me maybe 5 minutes of adjustment, which was surprising.

My knowledge of Typescript is no longer holding me back, I can largely manage without searching for common things.

I think my number of searches this time was 2. First to see if there was a built in zip() function like python has (no) and then second to verify the syntax of filter() on an array.

I feel like I'm back writing Perl again with lines like this:

Number(line.split(":")[1].trim().split(" ").filter((e) => e != "").join(""))

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 -_-

@beardalaxy GTA is a game about crime and in the trailer they don't show any white people... what could they mean by this?

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

Advent of Code Day 3 in typescript is done.

Today we did adjacency algorithms on a multidimensional character array. Part 1 was very messy but I cleaned it up a little better for Part 2. There's even some recursion running around.

@shironeko sure, the problem at hand involves parsing inputs to a data structure that allows you to evaluate adjacency.

To me, the data structure and adjacency algorithm are the more interesting parts of the problem and having to write a new parser every day for some new novel input just becomes a slog.

If they picked something standard over the series of problems, or at least just marginally changed it, so I could write a single parser that I could update and refine over the few weeks of the game, that feels like it would be better.

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 2 of Advent of Code in the bag. At least typescript/javascript supports `reduce()` on arrays

Gruyère boosted

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

Show older
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.