MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/shittyprogramming/comments/p0fmpk/this_program_prints_its_own_source_code/
r/shittyprogramming • u/[deleted] • Aug 08 '21
8 comments sorted by
9
Shorter version:
$ > a && . ./a $
2 u/[deleted] Aug 10 '21 even shorter: >:;. : 1 u/Alpha_wolf_80 Feb 14 '22 Someone explain me the code 1 u/[deleted] Feb 17 '22 >: -- overwrite (>) file called ":" with nothing ; --begin new command (like a newline) . : -- . is basixallt eq to the "source" command and it will source the ":" file
2
even shorter: >:;. :
1 u/Alpha_wolf_80 Feb 14 '22 Someone explain me the code 1 u/[deleted] Feb 17 '22 >: -- overwrite (>) file called ":" with nothing ; --begin new command (like a newline) . : -- . is basixallt eq to the "source" command and it will source the ":" file
1
Someone explain me the code
1 u/[deleted] Feb 17 '22 >: -- overwrite (>) file called ":" with nothing ; --begin new command (like a newline) . : -- . is basixallt eq to the "source" command and it will source the ":" file
>: -- overwrite (>) file called ":" with nothing ; --begin new command (like a newline) . : -- . is basixallt eq to the "source" command and it will source the ":" file
59
A non-empty program that takes no input and outputs its own source code is called a "quine." Quines are cool. Here are a bunch of them: https://codegolf.stackexchange.com/questions/69/golf-you-a-quine-for-great-good
3 u/UnrelatedString Aug 09 '21 always gets me that that’s question 69 3 u/andyrocks Aug 09 '21 Fun fact, "quine" is also the word for "woman" in the Doric dialect from North East Scotland.
3
always gets me that that’s question 69
Fun fact, "quine" is also the word for "woman" in the Doric dialect from North East Scotland.
4
See also the entry smr in the 1994 IOCCC.
9
u/Logofascinated Aug 08 '21
Shorter version:
59
u/souldeux Aug 08 '21
A non-empty program that takes no input and outputs its own source code is called a "quine." Quines are cool. Here are a bunch of them: https://codegolf.stackexchange.com/questions/69/golf-you-a-quine-for-great-good
4
u/Cosmologicon Aug 09 '21
See also the entry smr in the 1994 IOCCC.