News for hackers. Stuff that matters.
Re:Show HN: Quinesnake – A quine that plays snake over its o... by eps on Friday April 26, 2019 @04:12AM (#19755612)
This is spectacular!

You had me at

    ./quinesnake.cpp
The rest is just the icing on a cake :)
Re:Show HN: Quinesnake – A quine that plays snake over its o... by codetrotter on Friday April 26, 2019 @08:59PM (#19763067)
So it’s not just a quine, but a polyglot quine even. They are the best :)
Re:Show HN: Quinesnake – A quine that plays snake over its o... by gitgud on Friday April 26, 2019 @03:40AM (#19755504)
A quine is a computer program which takes no input and produces a copy of its own source code as its only output. The standard terms for these programs in the computability theory and computer science literature are "self-replicating programs", "self-reproducing programs", and "self-copying programs".

So it's a self-replicating game of snake? Sounds very much like a worm virus. Very nice project though!

Re:Show HN: Quinesnake – A quine that plays snake over its o... by muthdra on Friday April 26, 2019 @10:50PM (#19763451)
Not exactly. It prints exactly it's own source code as output but it doesn't run it again. You can run a quine output manually as it's by definition the same code that printed it but it lacks the ability to keep executing continuously like a worm virus would require. I guess you could make a worm virus that's also a quine but that would be a whole other problem.
Re:Show HN: Quinesnake – A quine that plays snake over its o... by Sniffnoy on Saturday April 27, 2019 @12:00AM (#19763694)
This is really neat! Unfortunately the color isn't working for me for some reason, which makes locating the initial food quite difficult. Any idea what could cause that?
Re:Show HN: Quinesnake – A quine that plays snake over its o... by taylorconor on Saturday April 27, 2019 @04:13AM (#19764468)
Oh that sucks, the whole point of programs like these is that they should still be portable. Could you make a GitHub issue (or email me) with your platform, shell, compiler version and curses version?
Re:Show HN: Quinesnake – A quine that plays snake over its o... by Sniffnoy on Saturday April 27, 2019 @03:05PM (#19767086)
Sure thing!
Re:Show HN: Quinesnake – A quine that plays snake over its o... by gatherhunterer on Thursday April 25, 2019 @08:38PM (#19753852)
Are there resources for making a quine that improve the development process or is it exactly as insanely tedious as it looks? Because this looks pretty impressive.
Re:Show HN: Quinesnake – A quine that plays snake over its o... by taylorconor on Friday April 26, 2019 @04:58AM (#19755774)
Unfortunately it's a pretty manual, tedious and frustrating process, especially when the code is minified and you want to squeeze it into as small a source file as possible.
Re:Show HN: Quinesnake – A quine that plays snake over its o... by austinjp on Friday April 26, 2019 @08:52PM (#19763033)
Gratifying to read the author say that creating something as mind-boggling this was tedious and frustrating.

It's great, by the way :)

Re:Show HN: Quinesnake – A quine that plays snake over its o... by klyrs on Friday April 26, 2019 @08:42PM (#19762988)
A generic (pseudo) quine is:

   s = "print escape(s)\n{payload}"
   print "s = "
   print escape(s)
   {payload}
So if you wanna do extra stuff on top of being a quine, just write that program and bootstrap with escape()
Re:Show HN: Quinesnake – A quine that plays snake over its o... by techslave on Thursday April 25, 2019 @11:11PM (#19754528)
We don’t do this, that and the other thing because they are easy, we do it because they are hard.

The tedium is part of the difficulty. Making it easier is not inspirational. Although buildings the tooling to do so would itself be quite the challenge ...

Re:Show HN: Quinesnake – A quine that plays snake over its o... by akkartik on Friday April 26, 2019 @11:52PM (#19763669)
Re:Show HN: Quinesnake – A quine that plays snake over its o... by User23 on Saturday April 27, 2019 @06:48PM (#19768108)
Re:Show HN: Quinesnake – A quine that plays snake over its o... by gatherhunterer on Saturday April 27, 2019 @06:08PM (#19767926)
Thanks for the reference.
Re:Show HN: Quinesnake – A quine that plays snake over its o... by atum47 on Thursday April 25, 2019 @07:08PM (#19753374)
Very cool
Re:Show HN: Quinesnake – A quine that plays snake over its o... by purplezooey on Saturday April 27, 2019 @11:09AM (#19765893)
A quine produces a copy of its own source, but quinine is the stuff they put in tonic water.