Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cchudant/dr-quine
https://github.com/cchudant/dr-quine
Last synced: 14 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/cchudant/dr-quine
- Owner: cchudant
- Created: 2021-01-15T16:56:55.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-24T15:59:24.000Z (almost 4 years ago)
- Last Synced: 2024-11-08T18:53:17.109Z (2 months ago)
- Language: Assembly
- Size: 2.25 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dr-quine (42 cursus)
> A quine is a computer program (a kind of metaprogram) whose output and source code are identical. As a challenge or for fun, some programmers try to write the shortest quine in a given programming language. The operation that consist of simply opening the source file and displaying it is considered cheating. More generally, a program that uses any data entry cannot be considered a valid quine. A trivial solution is a program whose source code is empty. Indeed, theexecution of such a program produces for most languages no output, that is to say the source code of the program.
The C part is mandatory, but the Assembly part isn't. My ASM part is very ugly though.
## Running
### First
```sh
cd first/C
clang -Wall -Wextra -Werror Colleen.c -o Colleen ; ./Colleen
``````sh
cd first/ASM
nasm -f macho64 Colleen.s -o Colleen.o ; clang -Wall -Wextra -Werror Colleen.o -o Colleen ; ./Colleen
```### Second
```sh
cd second/C
clang -Wall -Wextra -Werror Grace.c -o Grace ; ./Grace
``````sh
cd second/ASM
nasm -f macho64 Grace.s -o Grace.o ; clang -Wall -Wextra -Werror Grace.o -o Grace ; ./Grace
```### Third
```sh
cd third/C
mkdir out
cd out
clang -Wall -Wextra -Werror ../Sully.c -o Sully ; ./Sully
``````sh
cd third/ASM
mkdir out
cd out
nasm -f macho64 ../Sully.s -o Sully.o ; clang -Wall -Wextra -Werror Sully.o -o Sully ; ./Sully
```## Ressources and further reading
[Wikipedia article for Quine (computing)](https://en.wikipedia.org/wiki/Quine_(computing))