Live data from Hacker News

Quine Relay

github.com

81–90 of 187 posts

Re: Quine Relay

#81
post #28
post #21

Earlier quoted context omitted.

And: https://github.com/mame/quine-relay/blob/master/QR.rb This project isn't code, it's art. Edit: Heh, Brainfuck, Whitespace, Logo... and notice they're all in alphabetical order?

Brainfuck is fairly practical compared to Unlambda and INTERCAL.

Perhaps my favorite paragraph on all of wikipedia:

INTERCAL has many other features designed to make it even more aesthetically unpleasing to the programmer: it uses statements such as "READ OUT", "IGNORE", "FORGET", and modifiers such as "PLEASE". This last keyword provides two reasons for the program's rejection by the compiler: if "PLEASE" does not appear often enough, the program is considered insufficiently polite, and the error message says this; if too often, the program could be rejected as excessively polite. Although this feature existed in the original INTERCAL compiler, it was undocumented.

Re: Quine Relay

#82
I feel awful for pointing this out, but the author spelled Copyright incorrectly in the last line.

Fortunately, he can correct it without blowing out his Ascii art by deleting the extra space between '##' and 'Quine'.

I'd issue a pull request myself, but it'd be like me putting soy sauce on a piece of Jiro Ono's sushi. I am completely unworthy.

Re: Quine Relay

#83
post #67
post #38

Earlier quoted context omitted.

possibly that someone clearly very smart wasted his/her intellect doing this, rather than advancing the species by curing obesity, heart disease and cancer?

This criticism could also be applied to, say, the entirety of pure mathematics. What is sad is that the author probably has no plan to explain how it was accomplished, which prevents anyone from learning from this.

The author has explained it, here: http://d.hatena.ne.jp/ku-ma-me/20130715/p1

In the "spoiler" section:

""" Normally quines are made like this:

   s = (something that generates your own source code)

   puts s
At the same time, a Ruby program that outputs a Perl program looks like this:

   puts "print(\"...\");"
If you combine these with quine methods, you get a multi-quine that goes between Ruby and Perl:

   s = (something that generates your own source code)

   puts "print(\"#{ s }\");"
Theoretically you just repeat this process. Except, there are the following practical problems:

   - Need proper escaping

      + Lots of old languages do not support C style of escape sequences.

      + Depending on languages, you need to escape interpolations.

   - Cobol and Fortran programs have troublesome constraints

      + Need 7 spaces on the left and less than 80 columns per line, etc.

   - Naive escaping will cause intermediate files to get too large.

      + JVM Strings have 64K size limit.

      + Languages like Intercal and Whitespace will become unbearably slow.
In order to avoid these, Perl requires something like ppencode, Java needs LZW compression to avoid string size limits. Cobol's line length limit was satisfied using Closure generator, Fortran's line length limit was satisfied using Coffeescript generator. People who are interested should see the generated code. """

In general, there isn't any standard method to making quines. You just keep on tweaking the code until the input and output matches, mostly by trial and error.

Re: Quine Relay

#84
post #23

Earlier quoted context omitted.

What is unclear to me is how the final program manages to represent the entire code (thus the entire language loop). Wouldn't doing that make the source code recursive and infinite? Or am I missing something important?

https://github.com/mame/quine-relay/blob/master/src/code-gen... This is a neat project but somehow the implementation is a lot less mind bending than the definition. Which is rather the opposite of what I experienced when I first heard of a Quine and figured out how to write one ( http://en.wikipedia.org/wiki/Quine_(computing) , Turbo Pascal in my case, heh). This smacks of something else, perhaps art.

Look at that Wikipedia article under "Multiquines"

Re: Quine Relay

#86
post #80
post #61

Earlier quoted context omitted.

The effort involved in doing this is incomparable with the things you just mentioned. This is nothing like baking a cake, more like spending thousands of dollars to build a life-sized Eiffel Tower out of matchsticks.

You have no idea how long it took to write this program. I bet it's less than the amount of time a typical baseball fan spends watching games over the course of a season. P.S. Knitting a sweater takes forever too. Especially if it has buttons.

[deleted]

Re: Quine Relay

#88
post #40

why did you choose that order, is there a reason for it?

I think it's just alphabetical, so no particular path through the languages that he saw as easier/harder

I think the code has a generator framework, so the fact that they are alphabetical may just be convenient/arbitrary; the code could be generated to run in any order (I think).

Re: Quine Relay

#89
post #26

Earlier quoted context omitted.

The symbol of note is not "The Star of David", but instead Ouroboros, the eternal snake... symbolized by a snake eating his own tail. I believe he chose the symbol Ouroboros to represent the "immortality through change" of the code. In one story... Ouroboros was an immortal snake who constantly shed his skin, and took on many forms. Similarly, this code constantly changes form, yet is immortal. While it changes form,…

> The Star of David is incidental. As far as I know... it was added to the Ouroboros symbol in the anime/manga Full Metal Alchemist, but that rendition is perhaps the most famous artistic rendition of Ouroboros in recent culture. Wheel of Time series begs to differ.

The author, Yusuke Endoh, is Japanese though, so it stands to reason that he might be more exposed to a Japanese representation.

Re: Quine Relay

#90
post #38
post #4

Earlier quoted context omitted.

I'm sorry, how is that sad?

possibly that someone clearly very smart wasted his/her intellect doing this, rather than advancing the species by curing obesity, heart disease and cancer?

If I make a ranked list of all the ways that people spend their time, I cannot imagine a sensible scoring algorithm that puts making a quine relay lower in value than posting an internet comment bitching about somebody making a quine relay.
Post reply on HN