We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

User talk:NevilleDNZ

From Esolang
Jump to navigation Jump to search

Puzzle code suggestion: Electronic Telomerase

I'm not sure if there is a solution, but...

Wrap specimen of code in a quine within built in limit on reproduction.

Details:

This Electronic Telomerase code operates in two modes - Mitosis, and Meiosis:

Mitosis - When standard input is empty:

 1st. run code specimen (genome).
 2nd. Decrement the internal count-down counter.
   - IF counter is > 0 THEN behave like the original quine
   - ELSE some appropriate form of death - eg empty program? FI

Meiosis - When standard input is not empty:

 1st. replace the code specimen with the new genome (stand input).
 2nd. reset the internal count-down counter to 255
 3rd. otherwise behaves like a regular quine.

Ideally, this code is portable to Non ASCII run time environments.

Test case suggestion:

Initial Mitosis yields a "# hello, world #" comment.
Run 3 times...
First Meiosis test replaces "# hello world #" with a "# G'day, mate! #" comment.
Run in Mitosis 3 times...
Second Meiosis test replaces "# G'day, mate! #" with "# Top o' the mornin' to you! #" comment.
Run in Mitosis 255 times...

etc...

NevilleDNZ 04:14, 22 September 2010 (UTC)