This repository was archived by the owner on Jun 23, 2022. It is now read-only.
Replies: 3 comments 1 reply
|
Not very clever (except for the raw string trickery), but it works. main(){char c[99]=R"(printf("main(){char c[99]=R\"("),printf("%s)\";",c),printf("%s",c);})";printf("main(){char c[99]=R\"("),printf("%s)\";",c),printf("%s",c);} |
0 replies
|
A slightly more clever Bash script: for f in *;do if [ -f "$f" ]&&[[ -n $(sed -n '/^for f in/p;q' "$f") ]];then cat "$f";fi;done |
0 replies
|
"Optimized" for size of source. Not optimized for anything else… including cleaning up after itself or basic error handling. package main
import _ "embed"
import "os"
//go:embed main.go
var q []byte
func main(){f,_:=os.Open("main.go");f.Write(q)} |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The classic coding golf problem: the quine. Write a program that produces itself as output!
All reactions