News for hackers. Stuff that matters.
Re:Quine Relay by RyanZAG on Monday July 15, 2013 @06:02PM (#6048834)
That is both the most incredible thing I've ever seen, yet also by far the saddest thing I've ever seen. Props to the author for taking dedication to a whole new level.

Link to a description of what this actually is: https://github.com/mame/quine-relay

Re:Quine Relay by dustingetz on Monday July 15, 2013 @08:19PM (#6049348)
Its not sad at all. Really good programmers can do things that ordinary programmers think impossible. This code was probably generated. Here is a paper on quine generation[1], and the authors have a very popular talk where they livecode a quine generator; that is, they livecode a program that generates an infinite list of quines[2] (source code from talk [3]).

[1] http://users-cs.au.dk/danvy/sfp12/papers/byrd-holk-friedman-... [2] http://www.infoq.com/presentations/miniKanren [3] https://github.com/webyrd/quines

The talk is amazing and hilarious.

On point, if the code is not generated in this fashion, there is assuredly a "work smart not hard" trick that drastically simplifies the problem.

Re:Quine Relay by sampo on Monday July 15, 2013 @11:26PM (#6049860)
> This code was probably generated.

The code generator is included in the repo: src/code-gen.rb

Re:Quine Relay by skrebbel on Tuesday July 16, 2013 @02:10AM (#6050264)
If you think that anything about this is sad, then you simple don't love programming enough.

There's nothing wrong with not loving programming, but calling people who clearly do "sad" because of it, is a bit, well, sad.

Re:Quine Relay by GuiA on Monday July 15, 2013 @06:06PM (#6048859)
I'm sorry, how is that sad?
Re:Quine Relay by eksith on Monday July 15, 2013 @06:26PM (#6048927)
Indeed. That's a transmutation circle of awesome.
Re:Quine Relay by Sealy on Monday July 15, 2013 @07:30PM (#6049182)
I think he's referring to the relative uselessness of the code. Yes it would have taken a lot of time, talent and intellect to produce but from what I understand is of relatively little use?

Can someone correct me if I'm wrong?

Re:Quine Relay by eksith on Monday July 15, 2013 @07:45PM (#6049237)
There has been a spat of comments criticizing stories along the lines of "what use does it have?" As pointed out previously on all of them, and at the risk of sounding redundant, this is "Hacker News", not "Only Useful Things News" or even "Mildly Interesting News".

Looking at the front page of HN, I think it's pretty safe to say it's moved a fair distance from news of only VCs, startups and such to the realm of what we find interesting. This is interesting. It's not useful, particularly well built or even presentable at a sales meeting. But it is interesting.

Re:Quine Relay by brey on Monday July 15, 2013 @08:10PM (#6049317)
you've just described art.
Re:Quine Relay by bennyg on Tuesday July 16, 2013 @01:16AM (#6050156)
Came to say this, but I could not say it with the brevity you did.

What function is the Mona Lisa accomplishing behind layers of glass, with security guards posted 'round the clock, in a museum in France?

Re:Quine Relay by saraid216 on Tuesday July 16, 2013 @03:43AM (#6050448)
That's the entire point of a quine.
Re:Quine Relay by arianvanp on Tuesday July 16, 2013 @02:42PM (#6053878)
This dude's State Alchemist title is probably Fullcode Alchemist
Re:Quine Relay by hnriot on Monday July 15, 2013 @07:30PM (#6049184)
possibly that someone clearly very smart wasted his/her intellect doing this, rather than advancing the species by curing obesity, heart disease and cancer?
Re:Quine Relay by wpietri on Monday July 15, 2013 @09:33PM (#6049558)
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.
Re:Quine Relay by jbranchaud on Monday July 15, 2013 @11:00PM (#6049808)
+1, imagining the scoring algorithm you mention would even rank higher than the posting of that comment!
Re:Quine Relay by shawn-furyan on Tuesday July 16, 2013 @01:23AM (#6050175)
Very funny. I think it might be possible to come up with a sensible algorithm that yields such a result. If so, it would definitely have $time_spent in a denominator somewhere :)

[edited to improve wording]

Re:Quine Relay by aerolite on Tuesday July 16, 2013 @03:29AM (#6050424)
bitching about someone making a quine relay takes like 10 seconds, though.
Re:Quine Relay by saraid216 on Tuesday July 16, 2013 @03:45AM (#6050451)
That's because there's only ten seconds' worth of intelligence going into the bitching.

A truly worthwhile bitching would take at least an hour.

Re:Quine Relay by breadbox on Monday July 15, 2013 @07:44PM (#6049231)
I also know plenty of people who waste their intellect painting canvases, when they could be advancing the species by doing something practical. Shall we shed a tear for their wasted efforts as well? But of course not. Art is its own justification.

And this program, my friends? This is art.

Re:Quine Relay by SilasX on Monday July 15, 2013 @09:44PM (#6049589)
Still, I reserve the right to be a lot more impressed with this than a painting of a bunch of cans of Campbell's soup.
Re:Quine Relay by gambler on Monday July 15, 2013 @08:13PM (#6049326)
Art that only exists for the sake of existing, without intent to express, explore, or otherwise stimulate human mind - art of that sort is garbage. There are plenty of people who vehemently defend that garbage, but it doesn't make it any less wasteful use of human time and attention. Personally, I will never respect it simply because there was a lot of effort involved.
Re:Quine Relay by breadbox on Monday July 15, 2013 @08:28PM (#6049372)
"I will never respect it simply because there was a lot of effort involved."

Nor will I, or much of anyone else, I imagine. I respect it because it stimulates my mind. My imagination is moved by it in much the same way that it's moved by holding an acorn in my hand while contemplating a fully grown oak tree. Or studying the math that causes z <- z^2 + C to describe a ridiculously intricate shape. Or implementing my own minimal Lisp interpreter from scratch. Or trying to understand the Banach-Tarski paradox. These things stimulate my sense of wonder because they're like a magic trick, but there's no trickery involved. And when I contemplate them, I learn more about the world. Art cannot aspire to much more than that.

Re:Quine Relay by gambler on Tuesday July 16, 2013 @07:08PM (#6055318)
Nor will I, or much of anyone else, I imagine.

Yet people gladly upvote stories about computers implemented insite Minecraft and life-size spaceships made out of Lego blocks. Are you saying it has nothing to do with the difficulty involved? I doubt this story would be equally well received if there was some easy way to achieve the same result. If you take difficulty of the task out of the equation, what will be left? How much of what's left is genuine creativity and skill, and how much is mere patience?

Re:Quine Relay by breadbox on Wednesday July 17, 2013 @03:19AM (#6056525)
"Are you saying it has nothing to do with the difficulty involved?"

No, of course not. The "simply" was what I was disagreeing with.

Re:Quine Relay by eksith on Monday July 15, 2013 @10:57PM (#6049804)
http://www.lynetteabel.org/L-ABEL-Seminar-Appreciate.htm

   Eli Siegel explains in his great essay "The Serious Aspect of Snobbery":  
    Snobbery is the unwillingness to like something, unless at the same time it 
    makes one feel more important;...
    [It] is the inability or lack of desire to appreciate justly.
Re:Quine Relay by gambler on Tuesday July 16, 2013 @06:29PM (#6055157)
You using a quote of a quote to launch a personal attack, while explicitly doing the thing that you're accusing me of. That is, you assume that the motivation behind my comment is to feel superior to certain other people by excluding some things from the realm of "good art". Yet your comment explicitly divides people into "snobs" and "not snobs", makes a fairly obvious statement about superiority of one group and hints at the fact that you belong to the other group.
Re:Quine Relay by eksith on Tuesday July 16, 2013 @07:21PM (#6055364)

  >...art of that sort is garbage. There are plenty of people 
  who vehemently defend that garbage, but it doesn't make 
  it any less wasteful use of human time and attention.
...is your opinion. Opinion that as downvoters have noted, is full of snobbery. Not even mildly vindicated snobbery that's tolerated on this forum like picking your religion (I.E. favorite IDE, programming language etc...) which someone could assert with reasonable confidence with anecdotes of personal experience at least; it was wholly devoid of intellectual merit... and was snobbery.

That's not a personal attack. I don't know you personally and nor was it an attack. I felt it was merely an observation. But If you took an observation as an attack, then doesn't that speak to the validity of the quote?

I don't appreciate a whole swath of what is considered "modern art" either (though I do like Dada, if anything for it's quirkiness that I find interesting). But never have I called someone else's creation of time and effort "garbage" purely due to my lack of appreciation.

Re:Quine Relay by gambler on Tuesday July 16, 2013 @09:22PM (#6055664)
it was wholly devoid of intellectual merit...

I think the notion that purpose and intent behind art is far more important than the amount of effort involved in its creation has considerable amount of intellectual merit. Even more so considering how unpopular it is. Whether people choose to read the whole comment, or prefer to see "bla, bla, bla, garbage!" is a different matter.

Re:Quine Relay by eksith on Wednesday July 17, 2013 @12:01PM (#6058431)

  >Whether people choose to read the whole comment, or prefer to see "bla, bla, bla, garbage!" is a different matter.
Interesting that you assume we didn't read the rest of the comment. I assure you most of us do prefer to take things in context. It's OK to look up once instead of looking down all the time.

Purpose is ancillary to art. Art without purpose and merely is as art has been a cornerstone of creative expression since art has existed. The fact that you prefer to inject purpose behind it now has no bearing whatsoever on what people will consider artistic. You're not the arbiter of worth or taste.

Re:Quine Relay by snsr on Monday July 15, 2013 @08:38PM (#6049401)
That's a pretty caustic take on an inherently subjective matter: the appreciation of beauty.

Also, in what way is this exercise not exploratory?

Re:Quine Relay by romaniv on Tuesday July 16, 2013 @10:44AM (#6052188)
What does it explore?
Re:Quine Relay by jlgreco on Tuesday July 16, 2013 @12:51PM (#6053058)
The very nature of self-expression.

(If you are looking for other people to explain to you how to appreciate art, you are going to have a bad time.)

Re:Quine Relay by epidemian on Monday July 15, 2013 @08:27PM (#6049369)
> without intent to express, explore, or otherwise stimulate human mind

I hope you're just being sarcastic.

Re:Quine Relay by msutherl on Tuesday July 16, 2013 @01:01AM (#6050123)
Unlike the others, I completely agree. Art that does not "express, explore, or otherwise stimulate the human mind"[1] is the definition of boring.

I would however claim that the vast majority of art does stimulate the mind, though it may not stimulate yours without some additional effort. Indeed just about anything in the world is capable of stimulating your mind if you look closely enough at it, to paraphrase John Cage.

[1] ... or, if we take a 'vibrant matter' / 'object oriented ontology' view of the world, stimulate something.

Re:Quine Relay by Tobu on Wednesday July 17, 2013 @06:07AM (#6056918)
John Cage? You were quoting Gustave Flaubert:

> Pour qu’une chose soit intéressante, il suffit de la regarder longtemps.

http://flaubert.univ-rouen.fr/correspondance/conard/outils/1...

Re:Quine Relay by msutherl on Monday July 22, 2013 @12:49AM (#6081822)
No, I wasn't quoting anybody, I was paraphrasing John Cage. Here is the quote:

“If something is boring after two minutes, try it for four. If still boring, then eight. Then sixteen. Then thirty-two. Eventually one discovers that it is not boring at all.” ― John Cage

Re:Quine Relay by Falling3 on Monday July 15, 2013 @09:46PM (#6049596)
I'm am tired of these elitist views of art. You sir, know nothing of art.
Re:Quine Relay by voyou on Tuesday July 16, 2013 @05:09AM (#6050693)
On the contrary, to the extent something intends to "express, explore, or otherwise stimulate human mind," it isn't art - it's rhetoric, or science, or entertainment. Obviously lots of works of art were created for some end (renaissance paintings functioned as religious and political propaganda; Shakespeare's plays are entertaining), but they are art to the extent that they step back from that end, and display what Kant calls "purposiveness without particular purpose."
Re:Quine Relay by raldi on Monday July 15, 2013 @07:43PM (#6049228)
Do you feel the same way when someone bakes a cake, takes a walk, watches a sporting event, knits a sweater, or writes a poem?
Re:Quine Relay by ionforce on Monday July 15, 2013 @08:08PM (#6049312)
I think that people view art as a side effect of abundance. It is something that naturally arises given a surplus of some thing.

The point of contention here is that someone of that level of intellect has "wasted" their talent on art, rather than productivity, which "should" come first.

For varying definitions of "should" and "wasted", of course.

Re:Quine Relay by gambler on Monday July 15, 2013 @08:18PM (#6049344)
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.
Re:Quine Relay by raldi on Monday July 15, 2013 @09:03PM (#6049470)
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.

Re:Quine Relay by StavrosK on Tuesday July 16, 2013 @06:23AM (#6050875)
Man, fuck buttons.
Re:Quine Relay by newsit on Tuesday July 16, 2013 @05:28PM (#6054854)
Comment of the year :)
Re:Quine Relay by bennyg on Tuesday July 16, 2013 @01:21AM (#6050168)
Who cares about whether a person should build an Eiffel Tower out of matchsticks or go try to solve cancer? Pushing humanity forward is great - and so is finding personal happiness and growth through exploration. Don't knock one or the other; in fact, don't knock any at all. Both are ways to ascribe meaning to this meaningless place.
Re:Quine Relay by jlgreco on Tuesday July 16, 2013 @12:49PM (#6053046)
The sort of attitude he is demonstrating is backed by some sort of perverse notion that "smart" people somehow owe so much more to society than the rest of humanity that they should not have hobbies because that would delay them paying back their debt.

I don't know what could cause somebody to adopt such a twisted notion, but I think the roots of it go deeper than I care to know.

Re:Quine Relay by cpayne on Monday July 15, 2013 @11:52PM (#6049935)
It depends on the quality of cake you are eating. There's a massive difference between a chocolate birthday cake for a 4 yr old or Profiteroles http://en.wikipedia.org/wiki/Profiterole
Re:Quine Relay by scythe on Monday July 15, 2013 @08:28PM (#6049371)
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.

Re:Quine Relay by omoikane on Monday July 15, 2013 @09:08PM (#6049484)
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 by scott_s on Monday July 15, 2013 @07:39PM (#6049212)
Which is a silly notion. Everyone needs entertainment and to have fun. Some people do it in different ways than others.
Re:Quine Relay by wicknicks on Monday July 15, 2013 @08:42PM (#6049411)
I don't think people want to spend all their time trying to fight cancer or heart disease. Once in a while, you really need to get your mind to work on entirely useless things. IMO, that sort of mental workout makes people tackle the real hard problems better.
Re:Quine Relay by andyhmltn on Tuesday July 16, 2013 @04:04AM (#6050511)
So are you saying that if he had not spent his time doing this, he would have cured cancer? You're forgetting the amount of people this will inspire to go on and create amazing software.
Re:Quine Relay by chernevik on Wednesday July 17, 2013 @08:53AM (#6057332)
So the guy who did this must spend his time solving the problems people cause for themselves by eating too much, exercising too little? And smoking?

I don't think so.

Re:Quine Relay by Seeless on Tuesday July 16, 2013 @06:12PM (#6055089)
This wasn't made by a doctor or a biochemist.
Re:Quine Relay by Noxchi on Monday July 15, 2013 @07:42PM (#6049220)
The first two are already curable (with food).
Re:Quine Relay by lifeformed on Monday July 15, 2013 @07:50PM (#6049257)
Smart people are too burdened with the responsibility to save the world to spend on leisure.
Re:Quine Relay by nazgulnarsil on Tuesday July 16, 2013 @02:00AM (#6050239)
We don't owe you shit, it was like this when we got here.
Re:Quine Relay by kragen on Tuesday July 16, 2013 @02:10AM (#6050262)
Saying that hacking is "sad" is arrogantly elevating your own limited worldview over the worldview of hackers. Perhaps someday you could hope to become as awesome as the person you're criticizing, but first you have to realize that being a hacker is something worth aspiring to.
Re:Quine Relay by Keale2 on Tuesday July 16, 2013 @01:43PM (#6053409)
I feel like everybody is taking this comment the wrong way. It sounds like a compliment followed by a joke.

This is a relatively common form of humor. A great achievement followed by a realization of the cost of that achievement.

"I just won my 1000th game of <insert video game>! ...I should go outside."

Re:Quine Relay by pizza on Monday July 15, 2013 @10:01PM (#6049634)
art