Patchwork Security is a hobby project by me. A 25 years old cybersecurity expert. I just recently finished my bachelors degree. I will focus on content such a programming, security and basically anything I find interesting to post.

Advent of Code 2024

Day 1 - Historian Hysteria

As most years I try to do the advent of code challenges. Sadly I haven’t posted anything except the first day last year. Although this, this years language will be nim. Nim is a “statically typed compiled systems programming language”. Nim can be thought of as Python but compiled. There are some quicks here and there but overall the language is fully functional. Some problems the language currently faces is that there a people who write malware with it, as it is easy to code with and can cross-compile. [Read More]

Advent of Code 2024

Day 2 - Red-Nosed Reports

Let’s move on with advent of code day 2. A little harder than yesterday, but still managable. Part 1 The unusual data (your puzzle input) consists of many reports, one report per line. Each report is a list of numbers called levels that are separated by spaces. The engineers are trying to figure out which reports are safe. The Red-Nosed reactor safety systems can only tolerate levels that are either gradually increasing or gradually decreasing. [Read More]

What is a Monoid?

The hero of programming: The Monoid

What is a Monoid? When talking about monoids its important to first understand what it means to be a monoid. A monoid, mathematically speaking is a structure with a binary operation, that has a neutral or identity element, is closed, and obeys the law of associativity, but that definition without any context is not easy to understand. For example: What is a binary operation? What does closed mean? What is a identity / neutral element? [Read More]

Advent of Code 2023

Day 1 - Trebuchet?!

Today we are talking about the first challenge in the advent of code of 2023. I know I am late but I thought that now that I am learning the rust programming language the advent of code challenges would be a nice way of improving and learning it. Part 1 The first challenge is called trebuchet?! and the goal is to extract the first and last number from a line, to concatenate them and convert them to a number. [Read More]