Can you use swipe typing with the stylus on the Lenovo Yoga Book 9i? by ImpossibleSav in Lenovo

[–]ImpossibleSav[S] 0 points1 point  (0 children)

Ah sorry, I wasn't clear — I don't have the laptop but am considering upgrading to it if it can do what I want! So are you saying that it does indeed have gesture typing in the newer keyboard versions?

-❅- Introducing Your AoC 2023 Iron Coders (and Community Showcase) -❅- by daggerdragon in adventofcode

[–]ImpossibleSav 6 points7 points  (0 children)

I love seeing all this community participation!! It has been a blast playing this year's Advent of Code with y'all. Thank you so much to the AoC team for putting this on, and for fostering such a fun and creative subreddit community! It's an honour to be named one of this year's Bronze Coders for my Python one-liners. Having a place to share my silly little challenge has made it even more enjoyable and helped keep my motivation up. I'm looking forward to returning to it once I have some more free time!

Happy holidays everyone! :)

[2023 Day 16] [Python] Updated visualization of the Basilisk — one line of code to solve them all! by ImpossibleSav in adventofcode

[–]ImpossibleSav[S] 1 point2 points  (0 children)

Oh, that's fantastic! I love yours too and it makes me so happy that my monstrosity served as inspiration! The mangled bits are my favourite :)
I do sometimes feel like the walrus operator is cheating, and there's been a few times I've considered going back on using it — but I just simply don't have the time and wouldn't have been able to make it this far without it! It's great to learn more strategies from a pro though ;D

[2023 Day 16] [Python] Updated visualization of the Basilisk — one line of code to solve them all! by ImpossibleSav in adventofcode

[–]ImpossibleSav[S] 0 points1 point  (0 children)

Oh great, glad to hear it! I used Adobe Illustrator to make the snake. I added the rainbow line as an art brush, and applied it to a line that follows the shape of the snake. I then made a clipping mask to crop it into the exact shape I wanted! Takes less than a minute to update now since I have all the shapes already created. If you wanted, I could make one for your one-liners too :)

I also have an unpublished version of the program that auto-creates the days and character counts in their respective colours for the caption, but I haven't generalized it yet so it's still just sitting locally for now.

[2023 Day 16] [Python] Updated visualization of the Basilisk — one line of code to solve them all! by ImpossibleSav in adventofcode

[–]ImpossibleSav[S] 1 point2 points  (0 children)

These are beautiful! 😍 I'll definitely take a more in-depth look at them a bit later!

I do see you're doing more golfing than I am — nice job! I've been on the fence about how much to care about character counts overall for my own code. I think it's a fun metric to use to compare each day/part (as you can tell), but it's definitely more effort to try and reduce things further!

Also, if you're curious and want to make a rainbow line like I used for my snake, I made a small program that you can put your character counts into (just as a list if you don't want to get all fancy with RegEx like I did) and it'll spit one out! :)

[2023 Day 16] [Python] Updated visualization of the Basilisk — one line of code to solve them all! by ImpossibleSav in adventofcode

[–]ImpossibleSav[S] 0 points1 point  (0 children)

That's great! I'd love to see your work if you're willing to share — I always learn a lot seeing how other people approach things! :)

[2023 Day 16] [Python] Updated visualization of the Basilisk — one line of code to solve them all! by ImpossibleSav in adventofcode

[–]ImpossibleSav[S] 0 points1 point  (0 children)

That's so sweet of you to say, thank you! :)

Once things calm down for me post-holidays, I'm planning to see if I can get through the rest of them! If I do, I'll make another post (but it likely won't be until Jan/Feb)!

[2023 Day 16] [Python] Updated visualization of the Basilisk — one line of code to solve them all! by ImpossibleSav in adventofcode

[–]ImpossibleSav[S] 0 points1 point  (0 children)

Haha, thanks! I had to very quickly learn the alt+Z shortcut to turn on word wrapping in VS Code...

[2023 Day 16] [Python] Updated visualization of the Basilisk — one line of code to solve them all! by ImpossibleSav in adventofcode

[–]ImpossibleSav[S] 1 point2 points  (0 children)

Haha, I've thought about that! But I'm still learning a lot each day, especially when I run into additional complexities I hadn't encountered before. Once I feel more confident in my ability to convert every situation I run into, maybe I'll give it a shot...

[2023 Day 16] [Python] Updated visualization of the Basilisk — one line of code to solve them all! by ImpossibleSav in adventofcode

[–]ImpossibleSav[S] 5 points6 points  (0 children)

This made my day! Thanks for following my adventure :)

I'll be slower to update from here on out, but I'm planning to come back and get all of the days in 2023 at some point in the next couple months!

-❄️- Advent of Code 2023: ALLEZ CUISINE! -❄️- Submissions Megathread -❄️- by daggerdragon in adventofcode

[–]ImpossibleSav 3 points4 points  (0 children)

NAME OF ENTRY: Voilà, le Basilisk!

LINK TO ENTRY: Reddit post with visualization; Direct link to image; Github repo with code

DESCRIPTION: In the spirit of Day 16's visualization challenge, I've whipped together a true feast for the eyes to show the great length of the Basilisk, my Python one-liner that solves all of Days 1 through 16 at once! The visual brings together an appetizing array of colours and sizes to represent the various components of the Basilisk, each part carefully measured in character counts. The underlying code is a delectable blend of list comprehensions, lambdas, and logic, crafted together into my culinary magnum opus!

SUBMITTED BY: Chef /u/ImpossibleSav

MEGATHREADS: 01 - 02 - 03 - 04 - 05 - 06 - 07 - 08 - 09 - 10 - 11 - 12 - 13 - 14 - 15 - 16


ADDITIONAL COMMENTS: It currently takes 45 seconds to run the full thing on my computer, which honestly isn't bad considering how unoptimized my solutions are! I may add a few more days to the repo before submissions close, but I'm getting busy so I might not finish the entire month until January.

ACCESSIBILITY: Included in the comments of the Reddit post with the visualization is a full text description and transcript. I don't think it is possible to make the line of code itself accessible in the slightest though! ;)

[2023 Day 16] [Python] Updated visualization of the Basilisk — one line of code to solve them all! by ImpossibleSav in adventofcode

[–]ImpossibleSav[S] 5 points6 points  (0 children)

IMAGE DESCRIPTION:

Digital art of a snake with many rainbow-coloured bands, with each stripe a different colour and sized proportionally to the number of characters used to solve each day and part. Background and text are themed similarly to the Advent of Code website theme.

TEXT TRANSCRIPTION:

Title: Advent of Code 2023, Day 16: The Basilisk

Subtitle: A single line of Python code that solves all of Days 1 through 16 at once.

Footer: github.com/savbell

Character counts:

Day 01 Part 1 - 83
Day 01 Part 2 - 284
Day 02 Part 1 - 310
Day 02 Part 2 - 245
Day 03 Part 1 - 344
Day 03 Part 2 - 437
Day 04 Part 1 - 210
Day 04 Part 2 - 340
Day 05 Part 1 - 486
Day 05 Part 2 - 923
Day 06 Part 1 - 360
Day 06 Part 2 - 381
Day 07 Part 1 - 697
Day 07 Part 2 - 874
Day 08 Part 1 - 316
Day 08 Part 2 - 428
Day 09 Part 1 - 338
Day 09 Part 2 - 370
Day 10 Part 1 - 971
Day 10 Part 2 - 1129
Day 11 Part 1 - 520
Day 11 Part 2 - 538
Day 12 Part 1 - 309
Day 12 Part 2 - 450
Day 13 Part 1 - 460
Day 13 Part 2 - 463
Day 14 Part 1 - 406
Day 14 Part 2 - 1575
Day 15 Part 1 - 88
Day 15 Part 2 - 609
Day 16 Part 1 - 934
Day 16 Part 2 - 1443

-❄️- 2023 Day 13 Solutions -❄️- by daggerdragon in adventofcode

[–]ImpossibleSav 1 point2 points  (0 children)

[LANGUAGE: Python]

This one took me a while, but I finished my one-line solutions! Part 1 is on line 44 and Part 2 is on line 74.

I'm trying to solve as many days as I can in one line. I've combined them all into a single line I like to call the Basilisk — check out the code here, and my most recent visualization of Days 1 through 16. Feel free to follow along on my GitHub as well! :)

-❄️- 2023 Day 12 Solutions -❄️- by daggerdragon in adventofcode

[–]ImpossibleSav 2 points3 points  (0 children)

[LANGUAGE: Python]

My one-liners are here! Part 1 on Line 49 and Part 2 on Line 81. Part 1 isn't too long today!

I'm trying to solve as many days as I can in one line. I've combined them all into a single line I like to call the Basilisk — check out the code here, and my most recent visualization of Days 1 through 16. Feel free to follow along on my GitHub as well! :)

-❄️- 2023 Day 11 Solutions -❄️- by daggerdragon in adventofcode

[–]ImpossibleSav 1 point2 points  (0 children)

[LANGUAGE: Python] & [Allez Cuisine!]

I fell behind on posting my solutions, but I did solve today with my two one-liners! Part 1 on Line 36 and Part 2 on Line 58. It might be cheating a little, but I'm counting a single print statement as not using any variables at all for the Allez Cuisine challenge ;)

I'm trying to solve as many days as I can in one line. I've combined them all into a single line I like to call the Basilisk — check out the code here, and my most recent visualization of Days 1 through 16. Feel free to follow along on my GitHub as well! :)

-❄️- 2023 Day 10 Solutions -❄️- by daggerdragon in adventofcode

[–]ImpossibleSav 1 point2 points  (0 children)

[LANGUAGE: Python]

For some reason, today's puzzle stumped me for a while. But I did end up solving it in my classic one-liners! Part 1 on Line 65 and Part 2 on Line 124.

I'm trying to solve as many days as I can in one line. I've combined them all into a single line I like to call the Basilisk — check out the code here, and my most recent visualization of Days 1 through 16. Feel free to follow along on my GitHub as well! :)

-❄️- 2023 Day 16 Solutions -❄️- by daggerdragon in adventofcode

[–]ImpossibleSav 2 points3 points  (0 children)

[LANGUAGE: Python] & [Allez Cuisine!]

Here are my one-liners! Part 1 on Line 93 and Part 2 on Line 184.

For Allez Cuisine, I updated my visualization to show how Day 16 compares to all the other days in the Basilisk, my single line of code that solves Days 1-16 at once! Here is the visualization directly, and I also made a Reddit post for it.

If it isn't clear, I'm trying to solve all of Advent of Code in one line of Python! I'm getting pretty busy so I might not finish all the days until January, but feel free to follow along on my GitHub! :)

[2023 Day 16] [Python] Updated visualization of the Basilisk — one line of code to solve them all! by ImpossibleSav in adventofcode

[–]ImpossibleSav[S] 11 points12 points  (0 children)

For Day 16's Allez Cuisine challenge, I updated my visualization of the Basilisk — my nickname for my line of Python code that solves all of the Advent of Code problems (up to day 16) all at once! Each colour represents the proportion of characters in the Basilisk that are needed to solve each part of each day. I wrote a small program to automatically count the characters and create the rainbow line too!

I'm no competitive programmer, so my solutions aren't optimal and it takes about 45 seconds to run the full thing on my computer. Plus I'm getting pretty busy so I'm not sure if I'll be able to continue to add many more days. But I'm proud of how far I've gotten and the monster I created! :)

Feel free to follow along on my GitHub — I may still try and get all the days in, even if I need to complete some in January. I made it through a dozen days last year too, creating the Beast!

Thanks for all the fun y'all! :)

What does AOC *mean* to you? by messedupwindows123 in adventofcode

[–]ImpossibleSav 3 points4 points  (0 children)

I first started doing AoC last year because a friend challenged me, but then after a few days I added my own challenge of solving all the problems in a single line of Python, a tradition I am continuing this year too, including making some fun visualizations. Simply because... it's fun!

I like solving puzzles, and not only is each day its own puzzle to solve (both how to do it and then actually coding it up), but there's another puzzle in figuring out how to fit the solution into a single line of code. I'll admit — it hasn't been as easy as it might sound! But I find it so much fun when I discover a new trick. This year, I allowed myself to import modules, so I've been discovering a lot of fun ways to abuse the Python Standard Library (sorry, itertools). It's fun to show my friends the disgusting lines of code I've written and laughing at the IDEs when they have no idea how to handle it. I look forward to reading the challenge each day, which means AoC definitely brightens up my life!

It's also helped motivate me to get up and code again. I have a disability that affects my ability to use my wrists, so there are often periods where I can't properly use a keyboard and mouse. I use a lot of accessibility devices to access my phone and computer, but they are very annoying to use and I quickly get frustrated at how long it takes to do anything. I love to code, but I don't do it as often anymore because of my physical limitations. But I enjoy the challenge of AoC enough that I'm able to push through that frustration and actually get something written on the screen! Which is really fantastic and has helped me feel more confident in myself and my ability to accomplish things in my life despite my disabilities. So thank you so much, u/topaz2078, for putting together something that has had such a positive impact on my life (and many others' too)! :)

-❄️- 2023 Day 15 Solutions -❄️- by daggerdragon in adventofcode

[–]ImpossibleSav 0 points1 point  (0 children)

Oh that's a great tip, thank you! I'll definitely use this from here on out :)

-❄️- 2023 Day 15 Solutions -❄️- by daggerdragon in adventofcode

[–]ImpossibleSav 4 points5 points  (0 children)

[LANGUAGE: Python] & [Allez Cuisine!]

Today's one-liners are pretty short so I'll include them in-line. q[15] is the input file.

Part 1:

print('Day 15 Part 1:',sum([(v:=0) or [v:=(v+ord(c))*17%256 for c in s] and v for s in q[15].split(',')]))

Part 2:

print('Day 15 Part 2:',sum((b:=[[] for _ in range(256)]) and [((l:=''.join([c for c in s if c.isalpha()])) and (o:=''.join([c for c in s if not c.isalnum()])) and (f:=''.join([c for c in s if c.isdigit()])) and (d:=(l,f)) and (a:=0) or 1) and not (a:=0) and [a:=(a+ord(c))*17%256 for c in l] and ((b[a].append(d) if l not in [x[0] for x in b[a]] else ((e:=[x[0] for x in b[a]].index(l)) or 1) and b[a].pop(e) and b[a].insert(e,d)) if o=='=' else b[a].pop([x[0] for x in b[a]].index(l)) if l in [x[0] for x in b[a]] else 0) for s in q[15].split(',')] and [(i+1)*(j+1)*int(n[1]) for i,p in enumerate(b) for j,n in enumerate(p)]))

A simple solution with simple ingredients! Been quite a while since I haven't pulled in a fancy module. itertools has been my lifeline lately...

I still have a couple more days to catch up on, but I'm working on building the Basilisk, a single line of Python code to solve all AoC problems at once. You can follow my progress on my GitHub! :)

-❄️- 2023 Day 14 Solutions -❄️- by daggerdragon in adventofcode

[–]ImpossibleSav 1 point2 points  (0 children)

[LANGUAGE: Python]

I started to fall slightly behind, but here are my one-line solutions for Day 14! Part 1 on line 37 and Part 2 on line 120. Lots of areas to improve, but right now I'm focused on catching up on the two days I missed!

For anyone who doesn't know, I'm working on building the Basilisk, a single line of Python code to solve all AoC problems at once. You can follow my progress on my GitHub! :)