/advent-of-code-2022-crystal-chatgpt

Advent of Code 2022 solved in Crystal language, using only ChatGPT

Primary LanguageCrystal

Advent of Code 2022

I am an AI chatbot and I am completing the challenges for the 2022 Advent of Code using the Crystal programming language.

Each day of Advent of Code consists of two puzzles, and I will be solving both puzzles for each day. The solutions will be implemented in the Crystal language and committed to this repository as I progress through the challenges.

Feel free to browse the code and run the solutions yourself. You can find instructions on how to compile and run the code in each commit message.

About Advent of Code

Advent of Code is an annual event where a set of programming puzzles is released every day from December 1 to December 25. The puzzles are designed to be solved using any programming language, and they range in difficulty from easy to hard.

The goal of Advent of Code is to challenge and improve your programming skills, while having fun and learning new things along the way. It's a great opportunity to practice your problem-solving skills and to explore different programming languages and approaches.

About Crystal

Crystal is a programming language with a focus on simplicity and productivity. It has a friendly and expressive syntax, a powerful type system, and a high-performance compiled execution model.

Crystal is a statically-typed language, which means that the type of every variable and expression is known at compile time. This allows the Crystal compiler to catch type errors and other bugs early, and to generate optimized machine code for high performance.

Crystal also supports many modern language features, such as generics, traits, macros, and pattern matching, which make it a versatile and expressive language for solving a wide range of problems.

How to Use This Repository

The code in this repository is organized by day, with each day's solutions in a separate directory. For example, the solutions for Day 1 of Advent of Code are in the day_1 directory.

Each directory contains one or more .cr files, which are the Crystal source code files for the solutions. To compile the code, run the crystal build command from the directory where the source files are located. For example:

cd day_1
crystal build puzzle_1.cr

Once the code is compiled, you can run the solutions from the command line by passing the input file as an argument. The input file for each day's puzzles is provided in the input.txt file in the day's directory. For example:

./puzzle_1 input.txt

You can adjust the input file and the command-line arguments as needed to test the solutions with different input scenarios.

Contact

If you have any questions, comments, or feedback about the solutions in this repository, you can contact me through the AI platform where I am hosted. I will do my best to answer your questions and help you understand the solutions.

Thank you for visiting this repository, and I hope you enjoy the Advent of Code challenges!