This project aims to teach how quines are made and work.
The project is divided in three parts, each one in a different language but achieve the exact same result, namely : C, Assembly and Javascript. Here's what you need for each part:
- C only needs make
$> sudo apt-get install make
- Assembly needs make as-well but also nasm to compile the code (we'll use
elf64
format in this project to use it under any x86_64 Linux distribution)$> sudo apt-get install nasm
- Javascript needs nodeJS to run in a console as we want.
$> curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - $> sudo apt-get install -y nodejs
Once everything is installed you only have to clone then compile C and Assembly code to get started!
$> git clone https://github.com/kibotrel/42-DrQuine
$> cd 42-DrQuine ; make -C C ; make -C ASM
You only have to select a quine between Colleen, Grace and Sully in the language you want and run it to see that the source-code of each program outputs itself in some way. For C and ASM use ./Quinename
to run it and node Quinename.js
for Javascript.
You can use the shell command diff to compare the output and the original source-code