Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Challenges

Comments on Obligatory Quine Challenge

Post

Obligatory Quine Challenge

+9
−0

Rules

Using your language of choice, golf a quine.

A quine is a non-empty computer program which takes no input and produces a copy of its own source code as its only output.

No cheating -- that means that you can't just read the source file and print it. Also, in many languages, an empty file is also a quine: that isn't considered a legit quine either.

Additionally, your quine may not consist of only one data section. This includes HTML programs without tags (thus only printing their source), and the Golfscript program 1.

Scoring

The shortest program in bytes wins. Trailing newlines must be counted if your program outputs one.

History
Why does this post require moderator attention?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

General comments (5 comments)
General comments
Razetime‭ wrote over 3 years ago

Might wanna change the name to something better, just sayin'

Moshi‭ wrote over 3 years ago · edited over 3 years ago

"that means that you can't just read the source file and print it"

Does JavaScript "toString()" count as reading the source file?

manassehkatz‭ wrote over 3 years ago

I posted a PHP simplistic answer that was rejected based on a reference to SE rules. Can we get those rules (a) at a minimum linked inside this question (the only link is to a Wikipedia definition, which since Wikipedia can change beyond our control is not definitive) and (b) preferably spell out all the rules somewhere on Codidact (Meta to start, eventually a Help/FAQ page). And if that info. is already on Codidact, include a link here.

lyxal‭ wrote over 3 years ago

I've asked a meta question regarding whether or not we should import the FAQ questions from SE, which includes a comprehensive definition of a valid quine.

Jo King‭ wrote over 3 years ago

I was also thinking of reposting the quine question, but you beat me to it. One thing that I was thinking of changing was to allow function submissions, which would let some answers be somewhat distinct from the old question.