LabVIEW Architects Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

Advent of Code - 2022

StefanLemmens_0-1669190522340.png

 

 

It's almost December so Advent of Code is coming soon. For those who haven't heard about it you can read this https://adventofcode.com/2022/about
Advent of Code is an annual set of Christmas-themed computer programming challenges that follow an Advent calendar and can be solved using any programming language. It's mostly about problem solving skills. It was a lot of fun solving it last year using LabVIEW together with a group of other enthousiasts. We competed on a private leaderboard for LabVIEW developers and discussed the problems and solutions on a Discord server. It was very inspiring and educational to see how others solve the same problems in a different way.


If you plan on solving it in LabVIEW and want to see how fellow LabVIEW programmers are doing send me a message to get access to the board.

Or you can find all the info in the attached slide.

 

Good luck and have fun.

Stefan Lemmens

Message 1 of 6
(2,827 Views)

Hey Stefan,

 

I haven't got round to really doing much on this this year thanks to work, but I've had an enjoyable hour or so this week dusting off my rusty skills. The AoC (and Project Euler) are fantastic opportunities to develop muscle memory for making algorithms.

 

I found something curious when using Sets to solve one of the problems this time. I happened to look into Set Intersection.vim:

 

Screenshot 2022-12-23 104301.png

There's a Diagram Disable structure hiding in, where the default output (an empty Set) is feeding the shift register, rather than a constant empty set. The Disable case shows y' output of Swap Values wired into the SR. A bit of debug code left over? Something that's edited in the VIM for another case? A constant abducted by aliens?

 

Merry Christmas to you and to all other LVers out there!

---
CLA
0 Kudos
Message 2 of 6
(2,695 Views)

It's a VIM, e.g. it's logic works independent of the input type of set that it's given. That set could contain a string, a number, an array, a cluster, any type at all, and the loop needs to insert those values into a new set.

 

That diagram disable is using type propagation to give an empty set of the same type as whatever ends up being connected to the input 🙂

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 3 of 6
(2,684 Views)

A smart way of adapting - thanks for the explanation 🙂

---
CLA
0 Kudos
Message 4 of 6
(2,673 Views)

Thanks for sharing the info about Advent of Code! I did it for the first time last year and really enjoyed the daily programming challenges. It was a fun way to practice problem solving and learn new techniques.

The LabVIEW-specific leaderboard and Discord you set up sound awesome. Seeing different solutions in LabVIEW would be really interesting. I'm still new to the language so that kind of community sharing would be super valuable.

 

I definitely plan to participate in AoC again this year. Will reach out to join the LabVIEW group - solving the challenges in LabVIEW specifically would be a great learning experience.

 

Appreciate you organizing things and spreading the word! Advent of Code is such a unique and fun us federal holidays 2024 tradition for programmers. Looking forward to seeing how the 2024 calendar edition compares to last year. Time to start brushing up on algorithms and data structures!

0 Kudos
Message 5 of 6
(2,095 Views)

Hi,

 

thanks for your feedback and enthusiasm. You're welcome to join the leaderboard and the Discord server.
If you follow the instructions in the pdf attached to this topic you can still join both.

The leaderboard and Discord remain the same from year to year.
So you can still add your score to last years leaderboard to see how you performed and also see the discussions and solutions on the Discord.

 

Best regards,

Stefan

0 Kudos
Message 6 of 6
(2,074 Views)