Patchwork Security is a hobby project by me. A 24 years old cybersecurity student. Soon to be working. I will focus on content such a programming, security and basically anything I find interesting to post.

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]