User talk:NevilleDNZ: Difference between revisions
Content added Content deleted
(→Algol language file: Indeed the ">" is wrong.) |
|||
Line 56: | Line 56: | ||
Currently I am taking a look at MIPS (to add it along side to MMIX), but when I get satisfied (or tired) of it, I will pick Algol68 and see what I can do with it! —[[User:ShinTakezou|ShinTakezou]] 18:37, 8 June 2010 (UTC) |
Currently I am taking a look at MIPS (to add it along side to MMIX), but when I get satisfied (or tired) of it, I will pick Algol68 and see what I can do with it! —[[User:ShinTakezou|ShinTakezou]] 18:37, 8 June 2010 (UTC) |
||
== 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 arguments are provided when run: |
|||
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 argv is provided to program: |
|||
1st. replace the code specimen with the new genome (argv). |
|||
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: |
|||
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... |
|||
[[User:NevilleDNZ|NevilleDNZ]] 02:48, 19 July 2010 (UTC) |