Generate Programs in Increasing size

CJam, 10 bytes


Test it here.


{"_~" e# Generalised quine framework, leaves the block and the string "_~"
      e# on the stack. 
+     e# Prepend the block to the string.
_     e# Duplicate the resulting array.

JavaScript, 62 61 37 bytes

Thanks to @Doᴡɴɢᴏᴀᴛ for the help!

Original [37 bytes]:


Child [74 bytes]:


Grandchild [148 bytes]:


Alternate (with printing to console, and as a full program):

Original [61 bytes]:


Child [122 bytes]:


Grandchild [244 bytes]:


How it works!

1.   f=_=>   Define function f as console.log(...)

2.   ;f()   Run function f.

3.   (in function f)  

  • console.log(...)   Print the following:

    • f=   literal text "f="
    • ${'_'.repeat((0+f).length+5)   "_" repeated for the length of f, altered to account for characters not included in the stringification of f
    • +f}   The stringification of function f
    • ;f()   literal text ";f()"


  • console.log is necessary instead of alert because alert doesn't seem to play well with really long strings (at least on my machine/browser configuration)
  • The _'s are inserted into the name of the (unused) parameter of function f, to ensure that they are included in the stringification of f.
  • Main improvement (aside from getting rid of the console.log) of the first solution over the second: adding 10 to the function instead of 0 to cast it to string makes it one byte longer, eliminating the need to add 1 to the length afterwards, saving a byte.

Minkolang 0.15, 19 14 bytes


Original, child, grandchild.


"66*2-      $O.    Standard quine formulation

      r            Reverse stack
       I           Push length of stack
        D          Pop n and duplicate top of stack n times
         d         Duplicate top of stack
          r        Reverse stack

What the bit in between rs does is duplicate the ending period enough times to fulfill the doubling criterion. . is the "stop program" character, so the many periods at the end do nothing except be there.