Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I hadn't written one until ~30 mins ago [1]. I cheated and looked at a Java quine (not particularly elegant, but easy to see what is going on.), but I wrote one for Virgil. Just think string substitution; a string with a hole in it and you substitute a copy of the string, quoted into the hole. Just one substitution suffices.

[1] https://github.com/titzer/virgil/blob/master/apps/Quine/Quin...



You should put SPOILER tags on that.


Nice, this Go version satisfies gofmt:

https://github.com/62726164/quine




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: