everything wrong with free software

 "obedience breeds foolishness"

### figured other pages: => the-wonders-of-modularity.html the-wonders-of-modularity *originally posted:* jul 2021 a simple editor written mostly in fig: (save as figured.fig and compile) ``` #### license: creative commons cc0 1.0 (public domain) #### http://creativecommons.org/publicdomain/zero/1.0/ proginf = "fig user-reprogrammable editor 0.1, jul 2021 mn" p "" arr mid 1 0 cmds "" arr mid 1 0 osg "" cksv 0 insp 1 dflags arr mid 1 0 python try: osg = (os.getenv("HOME") + "/figured/").replace("//", "/") os.chdir(osg) from glob import glob plugins = glob("*.py") except: plugins = [] import readline for each in plugins: try: sig = each.split(".")[0] if "." + sig not in cmds and sig != "figured": exec("from " + sig + " import " + sig) cmds += ["." + sig] except: pass fig while g lineinput gl g lcase ltrim rtrim glen gl len glcmd split gl " " mid 1 1 gld gl mid 1 1 instr gld "." not ifequal glcmd ".q" glcmd ".quit" next ifequal glcmd ".quit" break next ifequal glcmd ".g" glcmd ".goto" next ifequal glcmd ".goto" plen p len pm1 plen minus 1 tlen ".goto" len times -1 plus glen token g ltrim rtrim right tlen ltrim val try insp token minus 1 ifless insp 0 insp 0 next ifmore insp plen insp plen next except insp plen next next ifequal glcmd ".list" ck instr cmds ".llist" iftrue ck python llist(p, g) fig next next ifequal glcmd ".save" cksv 0 next forin e cmds el e lcase ifequal glcmd el python exec("text = " + e[1:] + "(p, g)") if type(text) == list: p = text cksv = 1 fig next next iftrue gld plen p len pbef p left insp prc plen minus insp paft "" arr mid 1 0 ifless insp plen paft p right prc next p pbef plus g plus paft now insp plus 1 swap now insp cksv 1 next ck instr cmds ".update" iftrue ck python update(p, g) fig next wend ck instr cmds ".save" iftrue ck iftrue cksv python save(p, g) fig next next ``` a "plugin" to display text: (save as update.fig, compile and copy to update.py) ``` #### license: creative commons cc0 1.0 (public domain) #### http://creativecommons.org/publicdomain/zero/1.0/ function update p g plen p len str len plus 1 c 0 now cls forin each p now c plus 1 swap now c cs c str now " " times plen plus cs plus " " right plen prints now each print next fig ``` another to count lines: (save as wcl.fig, compile and copy to wcl.py) ``` #### license: creative commons cc0 1.0 (public domain) #### http://creativecommons.org/publicdomain/zero/1.0/ function wcl p g now p len prints " lines" print lineinput fig ``` => https://wrongwithfreesw.neocities.org