18
submitted 1 year ago* (last edited 1 year ago) by gerikson@awful.systems to c/notawfultech@awful.systems

Rules: no spoilers.

The other rules are made up as we go along.

Share code by link to a forge, home page, pastebin (Eric Wastl has one here) or code section in a comment.

you are viewing a single comment's thread
view the rest of the comments
[-] swlabr@awful.systems 3 points 1 year ago

a,b, not much to sayThe hardest part has finding the right dart ascii library to use (by default dart treats everything as UTF-16, which is horrible for this sort of thing) and the right data structure (linked hash map, which is a map that remembers insertion order.)

[-] gerikson@awful.systems 4 points 1 year ago

spoiler

"you have linked hash maps? LUXURY!"

In my code I had to resort to this sorting

for my $lens ( sort { $Boxes->[$idx]{$a}{pos} <=> $Boxes->[$idx]{$b}{pos} }  keys %{ $Boxes->[$idx] } )

Perl at its best!

[-] swlabr@awful.systems 2 points 1 year ago

I am so mad that I don’t know Perl, honestly.

[-] gerikson@awful.systems 3 points 1 year ago

It's a nice language! And I believe it's what AoC is made in. Certainly a lot of stuff seems tailor-made for the language.

this post was submitted on 01 Dec 2023
18 points (100.0% liked)

NotAwfulTech

384 readers
1 users here now

a community for posting cool tech news you don’t want to sneer at

non-awfulness of tech is not required or else we wouldn’t have any posts

founded 1 year ago
MODERATORS