mykl

joined 1 year ago
MODERATOR OF
[–] mykl@lemmy.world 1 points 7 months ago* (last edited 7 months ago) (1 children)

We stayed in Sheerness (where this flight took place), and when my girlfriend saw this she immediately asked “Did pigs fly before women did?”. And the answer turned out to be no, women beat pigs by two weeks: “Sarah Van Deman … was the woman who flew with Wilbur Wright on October 27, 1909” source

[–] mykl@lemmy.world 0 points 8 months ago (1 children)

Yes. Yes I was in danger.

[–] mykl@lemmy.world 0 points 8 months ago (1 children)

I had to give Uiua another go today. (run it here)

{"Card 1: 41 48 83 86 17 | 83 86  6 31 17  9 48 53"
 "Card 2: 13 32 20 16 61 | 61 30 68 82 17 32 24 19"
 "Card 3:  1 21 53 59 44 | 69 82 63 72 16 21 14  1"
 "Card 4: 41 92 73 84 69 | 59 84 76 51 58  5 54 83"
 "Card 5: 87 83 26 28 32 | 88 30 70 12 93 22 82 36"
 "Card 6: 31 18 13 56 72 | 74 77 10 23 35 67 36 11"}

LtoDec ← ∧(+ ×10:) :0
StoDec ← LtoDec▽≥0. ▽≤9. -@0

# Split on spaces, drop dross, parse ints
≡(⊜□≠0.⊐∵(StoDec)↘ 2⊜(□)≠@\s.⊔)

# Find matches
≡(/+/+⊠(⌕)⊃(⊔⊢↙ 1)(⊔⊢↙¯1))

# part 1
/+ⁿ:2-1 ▽±..

# part 2 - start with matches and initial counts
=..:
# len times: get 1st of each, rotate both, add new counts
⍥(⬚0+↯: ⊙⊙∩(↻1) ⊙:∩(⊢.))⧻.
/+⊙;
 

Am I in danger?

[–] mykl@lemmy.world 0 points 8 months ago (1 children)

Yeah it looks like the better solutions generally took that route. I convinced myself that the symbols were going to all have different rules in part 2, so ended up thinking about it way too hard for day 3 😀

 

Thanks Homer.

1
Day 1 solutions (adventofcode.com)
submitted 8 months ago* (last edited 8 months ago) by mykl@lemmy.world to c/adventofcode@lemmy.world
 

How was day one for everyone? I was surprised at how tricky it was to get the right answer for part two. Not the usual easy start I've seen in the past. I'd be interested to see any solutions here.

 

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to last year's challenges. You can read, run and edit today's solution by following the post link.

Today was the final challenge for the year, and as usual was quite simple and had only one part. This involved parsing and process numbers written in what I learned was called "balanced base five" notation.

Thanks for following along, now we just need to wait a few days to see what this year holds!

 

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to last year's challenges. You can read, run and edit today's solution by following the post link.

Today had us running round a maze with moving obstacles. Treating time as a dimension allowed me to build a graph and find the shortest path. Part 2 just required doing this three times. This took me closer than I like to a full second runtime, but not close enough to make me re-think my solution.

 

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to last year's challenges. You can read, run and edit today's solution by following the post link.

Today was a kinda variant of Conway's Game of Life: we had to move elves around according to a set of rules while avoiding collisions and observe the size of the bounding box after 10 rounds. Part 2 asked us to run until the pattern stagnated. Nothing clever in my solution as most of the challenge seemed to be in understanding the rules correctly :-)

 

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to last year's challenges. You can read, run and edit today's solution by following the post link.

Today started quite easily: build a map and then follow some directions to navigate around it. Part 2? The map is now wrapped around a cube. Oof. I dealt with it by setting up logic for an "ideal" cube layout, and then mapping the provided definition onto that. Oddly, my solution for part2 seems to run faster than part1 despite all the added complexity...

 

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to last year's challenges. You can read, run and edit today's solution by following the post link.

Today was again quite an easy one, requiring us to build up a tree of values and operations on those values. Part 1 had us evaluate the root value, and part 2 required us to change the value of a specific node to ensure that both branches below the root node evaluated to the same value. The linear nature of the operations allowed me to just try two different values and then interpolate the correct answer.

 

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to last year's challenges. You can read, run and edit today's solution by following the post link.

Today came as a welcome relief after two tricky days! We had to jumble a file according to some simple rules. The biggest challenge was interpreting the instructions correctly; the solution itself took only a few lines. Part two just added a key and increased the number of iterations. My original approach still ran in under a second (0.7s) so I didn't bother looking into it any further, and just enjoyed the free time :-)

1
submitted 9 months ago* (last edited 9 months ago) by mykl@lemmy.world to c/adventofcode@lemmy.world
 

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to last year's challenges. You can read, run and edit today's solution by following the post link.

Today was a sudden increase in difficulty (for me anyway). We had to find the best route for opening a system of valves to maximise the total flow through the network. Part two repeated the exercise, but with the addition of a friendly elephant to help with the work.

I was able to simplify the network enough to solve part 1 in a reasonable time, but had to hack my solution for part 2 terribly to get it under a second. Reading some other solutions, I missed out on some key approaches including pre-calculating minimum paths between all pairs of valves (e.g. using the Floyd–Warshall algorithm), aggressive caching of intermediate states, and separating out my movements from the elephant's movements.

Go and read @hal9001@lemmy.world's Clojure solution for a much more thoughtful approach :smile:

1
submitted 9 months ago* (last edited 9 months ago) by mykl@lemmy.world to c/adventofcode@lemmy.world
 

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to last year's challenges. You can read, run and edit today's solution by following the post link.

Today had us finding the surface area of a cluster of cubes, first in total, then excluding any internal voids. Nice and easy compared to the last couple of days!

 

As a warmup for this year's Advent of Code, I'm re-reading and posting my solutions to last year's challenges. You can read, run and edit today's solution by following the post link.

Today's challenge had us building a simple Tetris clone with the additional twist that a regular sequence of jets of air blow the falling pieces sideways. Part two asked us to model this for a bazillion cycles, so we needed to keep an eye on the pattern of landed blocks and look for the same pattern to repeat.

[–] mykl@lemmy.world 0 points 1 year ago (1 children)

Issue confirmed, for all the text fields on that screen: https://github.com/liftoff-app/liftoff/issues/435

This should be resolved in the next build. Thanks!

[–] mykl@lemmy.world 1 points 1 year ago

Looks like it 🙁. If you can bear to open this post again could you edit the title to add [SOLVED]? Thanks!

[–] mykl@lemmy.world 0 points 1 year ago (1 children)

Correct!

Despite having used the things this is meant for myself for many years, I had never even seen one of these. Brute force and a screwdriver always worked for my simple needs 😀

[–] mykl@lemmy.world 0 points 1 year ago* (last edited 1 year ago) (1 children)

!wiki

Hmm, some work to be done still 😀

view more: next ›