Skip to content

Instantly share code, notes, and snippets.

@bouk
Last active June 26, 2019 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bouk/63357cca57ca8839cb6a43acaa1d17ef to your computer and use it in GitHub Desktop.
Save bouk/63357cca57ca8839cb6a43acaa1d17ef to your computer and use it in GitHub Desktop.
Quines
package main
import "fmt"
func main() {
p := "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tp := %q\n\tfmt.Printf(p, p)\n}"
fmt.Printf(p, p)
}
d = DATA.read
puts d, "__END__", d
__END__
d = DATA.read
puts d, "__END__", d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment