Golfing a program (it seems) tends to produce many, many more different versions of a source code file than "normal" programming. I've found that I end up with a directory full of variations that I distinguish with a number in the filename. But,... there's gotta be something better.


josh@Z1 ~
$ l *.ps
3d5c.ps          foo.ps       lsyg2.ps           revcam.ps    tearay2.ps
6502.ps          ftree.ps     lsyg3.ps           rottxt.ps    textrect.ps
7seg.ps          ftreeg.ps    lsyg4.ps           scan.ps      tok.ps
7seg2.ps         func.ps      lsyg4bin.ps        seq.ps       trapez.ps
7seg3.ps         fx.ps        lsyg4g.ps          sin1x.ps     tree.ps
a8086.ps         g.ps         lsyg5.ps           sol.ps       tri.ps
ab.ps            g2.ps        lsyg5g.ps          sort.ps      triforce.ps
abbr.ps          glas.ps      lsys.ps            spiral.ps    trig.ps
ayb.ps           glasses.ps   lsysg.ps           split.ps     trig2.ps
aybg.ps          gol.ps       lsysga.ps          sqrt.ps      ubf.ps
b8086.ps         gol2.ps      lsys-recursive.ps  stems.ps     ubf1.ps
bb.ps            gol2a.ps     mandel2.ps         stemsg.ps    ubf2.ps
bez.ps           goto.ps      map.ps             stemsga.ps   ubf3.ps
beziertrees2.ps  gridcal.ps   mat.ps             stickman.ps  ubf4.ps
bitfont.ps       hello.ps     ncat.ps            sunf.ps      ubf5.ps
cal3.ps          hershey.ps   parens.ps          swar.ps      ubf6.ps
chess.ps         hsc.ps       pastelforests.ps   tea.ps       um.ps
circ.ps          hsvrgb.ps    pathtext.ps        tea0.ps      ve6a.ps
cp437.ps         hsvrgb2.ps   pbm.ps             tea1.ps      ve6a-sq.ps
cv.ps            img.ps       pbm2.ps            tea1a.ps     ve6a-xpostlogo.ps
dancingmen.ps    japsh.ps     pi.ps              tea2.ps      xor.ps
deadfish.ps      jpgsz.ps     poly42.ps          tea3.ps      xorb.ps
derivefont.ps    lcd.ps       polygon.ps         tea4.ps      xorw.ps
det.ps           lcd-dump.ps  prof.ps            teamath.ps   xpostlogo.ps
dig.ps           logic.ps     qbf.ps             tearay.ps    xw.ps
dragon.ps        logicg.ps    qsort.ps           tearay0.ps   xwg.ps
ennead.ps        lsyg.ps      ray.ps             tearay1.ps

Would the different variants be more ... explorable ... in a VCS? And is there a normal way to structure it so that the versions are more parallel, since they're not necessarily "incremental refinements" with respect to one another?

  • \$\begingroup\$ many of these have been posted here \$\endgroup\$ Commented Jan 25, 2014 at 21:18
  • 2
    \$\begingroup\$ I usually keep multiple versions in the same file, with all but one commented out at a given time. This "poor man's version control" works well enough for me, given the typically short size of code-golf solutions. \$\endgroup\$
    – FireFly
    Commented Jan 26, 2014 at 17:10

1 Answer 1


Git sounds perfect for you, with regard to nonlinear histories. Branching is git's heart and soul.

  • \$\begingroup\$ oh, alright already... bullet, meet teeth. \$\endgroup\$ Commented Jan 25, 2014 at 22:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .