ft is a monorepo of all my projects related to 42. It's mainly meant for personal archiving, but I also share some cool stuff.
This is a monorepo, meaning these projects are tightly coupled and share dependencies to work properly.
Why Bazel instead of Make? The 42 curriculum relies heavily on GNU Make to teach students the fundamentals of compilation. However, maintaining 30+ nearly identical Makefiles in a monorepo quickly becomes tedious. Because I enjoy DevOps and reproducibility, I migrated this repository to Bazel. I now only generate a standard Makefile and clean the repo right before pushing a project for grading.
Caution
A natural side effect of this Bazel setup is that it makes it harder to blindly copy-paste my projects and submit them as your own. While deterring cheating wasn't my primary technical goal, I fully support the result. Copying defeats the core principles of 42 and goes against what I personally believe in. This repository is meant to serve as an example of what you can build at this school, not as a shortcut. It's called a school for a reason. Learn; Write your own tests; and "By Odin! By Thor! Use your brain!".
Projects statuses
| Milestone | Project | Finished | Grade |
|---|---|---|---|
| 0 | ![]() |
✅ (with bonuses) |
125 |
| 1 | ![]() |
✅ (with bonuses) |
125 |
![]() |
✅ | 100 | |
![]() |
✅ | 100 | |
| 2 | ![]() |
✅ (with bonuses) |
125 |
![]() |
✅ | 100 | |
![]() |
✅ (with bonuses) |
125 | |
| 3 |
![]() with @maximart |
✅ | 101 |
![]() |
✅ | 100 | |
| 4 |
![]() with @maximart |
✅ (with bonuses) |
125 |
![]() CPP 00-04 |
✅ | (various grades) | |
![]() |
✅ | 100 | |
| 5 |
![]() with @maximart & @nahamida |
✅ | 125 |
![]() |
✅ | 90 | |
![]() CPP 05-09 |
✅ | (various grades) | |
| 6 |
![]() with @vblanc, @enpassel & @scottene |
✅ | 125 |
fdf![]() |
cub3d (and its 3DS port)![]() |
|---|
During a boring weekend, I set up a Bazel target to cross-compile a 3DS homebrew app. If you have a modded 3DS on hand, you can compile it and try yourself. It's very limited, laggy, and crashes on quit though. You have been warned.
A program to flex on your friends by visualizing your push_swap algorithm in
Minecraft. It uses Valence to control the game packets
and visualize the sorting algorithm on your 1.20.1 client.
A simple script to convert a BMP image into a fdf file. It currently only works for bitmap images smaller than 255 * 255, because I don't really know how to reliably get the width of the image in the header.
You can convert PNG images to BMP using convert using
ImageMagick, or online with
EzGIF.
Note
Did you read the foreword?
You can build all of the projects in this monorepo using Bazel.
- Run
bazel query ...to list all projects. - Run
bazel build //milestone-2/fdf:fdfto makefdf(orbazel build fdf, there are aliases). - Most importantly, run
bazel build //...to make all projects at once (as well as the required external libs).
As per Bazel fashion, building the entirety of the repo at once is pretty fast.
If you use an IDE or LSP server and the constant clangd type errors appearing
when browsing this repo hurt your eyes, I might have a solution for you. The
compile_commands.json file! It instructs your LSP server on where to locate
the headers, and in which order, and how your compiling system (Bazel in this
case) manages your compilation.
To compile this file for the whole project using Bazel:
bazel run //:refresh_compile_commandsNote
The compile_commands.json is gitignore'd for your inconvenience :-)
This project's dev dependencies are managed using
nix-direnv. There is a central
flake.nix file whose main purpose is exposing devShells.
I might eventually package the projects of this repo into this flake when I find the time.
This project is licensed under the MIT License. See the LICENSE file for details.

















