Live data from Hacker News

The world's smallest self-replicating program

ioccc.org

31–40 of 65 posts

Re: The world's smallest self-replicating program

#32
post #8

Earlier quoted context omitted.

Meh. Empty program doesn't replicate itself. It's similar to recent rule-nitpick discussion about selling for 0$. Selling for 0$ isn't selling and nothing isn't replicating itself. Definition of replicate is: to repeat or copy (something) exactly Empty program doesn't copy or repeat anything. Entry rejected. EDIT: It's not reddit, downvotes doesn't go here for disagreeing. The problem is posed in natural language and…

The empty set is a subset of the empty set.

Don't forget that the empty set is also the subset of the empty set, making them equal. ;)

Re: The world's smallest self-replicating program

#33
I'm not sure I understand how it's "self replicating"? An empty file, compiled or not, won't replicate itself. The Makefile to compile the empty c file is also rather large, but even it must be executed in a loop.

Can someone explain the basis of this contest and how this c file is "self-replicating"?

Re: The world's smallest self-replicating program

#34
post #33

I'm not sure I understand how it's "self replicating"? An empty file, compiled or not, won't replicate itself. The Makefile to compile the empty c file is also rather large, but even it must be executed in a loop. Can someone explain the basis of this contest and how this c file is "self-replicating"?

I think what they were referring to was a quine

Re: The world's smallest self-replicating program

#35
post #27
post #11

Earlier quoted context omitted.

Not sure about the copyright, but I wouldn't be surprised if someone patented it in the US.

Actually, there was a story about somebody selling 0-byte executable for DOS allowing you to resume programs because of some peculiarity.

I'll be darned if I can find the URL to the story, but it is a brilliant application of giving the customer what they wanted.

The short of it is that when you dropped back to the command line, early versions of DOS didn't clear the memory. That meant that the program really just went into stasis, but in practice it meant restarting; see, the program ran off the floppy then, so to save or load to another disk was tricky. Because memory would be executed from the same address, you could insert this disk with an empty executable that would get DOS to send execution to that address, which happens to be the program already in memory.

This had the huge boon of allowing you to drop to the command line, do something, and the resume working! Apparently they sold the disks for like $5 (or pounds) each, and the customers were extremely pleased. And the programmer was got a kick out of having rather impressive return per byte written :)

Re: The world's smallest self-replicating program

#36
post #33

I'm not sure I understand how it's "self replicating"? An empty file, compiled or not, won't replicate itself. The Makefile to compile the empty c file is also rather large, but even it must be executed in a loop. Can someone explain the basis of this contest and how this c file is "self-replicating"?

I think what they were referring to was a quine

yes, but is using an external program (make and cp) really count? I wouldn't consider that really as "self-replicating".

Re: The world's smallest self-replicating program

#37
post #33

I'm not sure I understand how it's "self replicating"? An empty file, compiled or not, won't replicate itself. The Makefile to compile the empty c file is also rather large, but even it must be executed in a loop. Can someone explain the basis of this contest and how this c file is "self-replicating"?

If you also look into the Makefile accompanied, it's just copying itself to smr file and giving it executable rights. So smr.c when built outputs it's source code.

The makefile is not large. It's a makefile for all the entries for 1994 competition. And it's only 4 lines for smr.c

Re: The world's smallest self-replicating program

#38
post #36

Earlier quoted context omitted.

I think what they were referring to was a quine

yes, but is using an external program (make and cp) really count? I wouldn't consider that really as "self-replicating".

every self replicating entry in the competition is compiled with other binaries.

Re: The world's smallest self-replicating program

#39

phiX174 virus - one of the world's smallest self-replicating programs :-) http://www.ncbi.nlm.nih.gov/nuccore/NC_001422.1 Enterobacteria phage phiX174 sensu lato, complete genome 5386 bp ss-DNA

Hehe funny that you mention phiX174 in the context of programming, that virus is amazing... Part of the reason phiX174 is so small is that it is "compressed" by having overlapping genes; in one area, three genes overlap in the same place! This is possible because there are 6 valid reading frames (direction and start point) for reading DNA: {forward or backward} x {address % 3 == 0, 1, or 2}. In college I actually got…

Hm, I used to work for Clyde Hutchison (and Ham Smith)... They told me that it didn't work when they made a naive decompression. Was there something they missed?

Re: The world's smallest self-replicating program

#40

phiX174 virus - one of the world's smallest self-replicating programs :-) http://www.ncbi.nlm.nih.gov/nuccore/NC_001422.1 Enterobacteria phage phiX174 sensu lato, complete genome 5386 bp ss-DNA

Hehe funny that you mention phiX174 in the context of programming, that virus is amazing... Part of the reason phiX174 is so small is that it is "compressed" by having overlapping genes; in one area, three genes overlap in the same place! This is possible because there are 6 valid reading frames (direction and start point) for reading DNA: {forward or backward} x {address % 3 == 0, 1, or 2}. In college I actually got…

That's pretty amazing. I'm guessing DNA compactness is a survival advantage for viruses, and that's how this emerged? Is gene overlap common in other species?
Post reply on HN