Skip to content
This repository has been archived by the owner on Jan 31, 2021. It is now read-only.
/ 42-DrQuine Public archive

A collection of quines made with several languages

License

Notifications You must be signed in to change notification settings

kibotrel/42-DrQuine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

42-DrQuine

CodeFactor GitHub

This project aims to teach how quines are made and work.

Install

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

Usage

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