no more linux communities, please

a warning: this post begins with a request that is entirely hypocritical. i run a forum for gnu/linux, but it is rarely used and probably close to pointless.

im completely fed up with the gnu/linux community. for all the problems that gnu/linux has (its still better than windows) its nothing compared to its communities.

i think two words sums them all up perfectly:

  • friendly
  • fake

 

the “friendliest” community i dare not name, as they troll the internet stalking all critics, and never leave them alone. they constantly drive their developers further and further from the support forums, to the point where the developers hide and/or are accused of doing things in secret (which is entirely untrue, incidentally. they are just trying to work in peace without the throngs of wankers.)

a caveat: i only get to know the forums dedicated to “easy” distros or minimal ones. all the fancy stuff: gentoo, lfs, pentest distros, firmware replacements– they might all be really nice people.

and of course, individuals. you can find those anywhere. on the “very friendly” distro forums, i spent half my time talking to nice people in pm. posting publically was absolutely pointless, everyone had their own ideas for applications and questions and tips and howtos, and i had mine, though i couldnt get past the “new breed” of fanboy. i was a regular from a decade ago, but i refused to say which one, and no one guessed.

the debian community was just getting over years of being “like ubuntu, except unfriendly” when it decided to unleash douchebag+ init on all its users. now the word that sums up debian is “presumptuous.” not only does it make terrible choices for defaults, but its fans gloat month after month that soon you wont have choices (because why should you?) debian has abandoned its mission, and made gnome, red hat and microsoft higher priorities.

i doubt i will ever go back to the devuan community. it has all the charm of a trip to the dentist, though i still like steve litt (its ok if it isnt mutual, steve. youve always a fan in me) and the author of refracta is always good people, for the record. 95% of that community is brilliant, but the other 5 is enough to keep me away from refracta.

then theres open source– the group of corporate fanboys that co-opted the free software movement, so microsoft could join. they constantly slander free software supporters, but i suppose thats the cost of critiquing something that is pretty extremely dishonest to begin with. cmon guys, even osi-co-founder (and author of the debian free software guidelines) bruce perens had to leave and write a letter about how open-source had lost its way and become cynical. since then its only gotten worse.

i would compare the ubuntu forums to a cult, but i dont want to be unfair to cults. its mostly a cult of personality where if you dont like the design decisions of their great leader, which always drag users through years of things they dont want, are told in short: “get with it, or go pound sand,” and then the things that cost those users are invariably abandoned a few years later (ubuntu edge, mir, unity, upstart– perhaps shuttleworth is more like john scully than his obvious idol steve jobs.)

but ubuntu is not about community— the community is about shuttleworth, and the whole thing tastes corporate. well lets be fair– its startup culture for a startup company thats been trying to pivot for more than a decade now. perhaps walesopedia and shubuntu have a similar nature.

twitter is the same– you either get bullies and trolls or you get pseudo-fascists that try in vain to fight them though at least do a great job of making it hostile to (even the most obvious examples of) free speech. and speaking of fascism, lets not even talk about facebook.

then there are the libre-people. you know, politically we have the most in common, but in terms of execution, theyre pretty much like you cant do that on televisions firing squad leader, who occasionally steps in front of the condemned before yelling “fire!”

while they talk about the value of coding and automation, they take forever to find volunteers to customize things by hand, so you can do your part for free software– by running outdated versions of things that someone finally got around to removing the non-free parts of.

except linux-libre. i mean, at least thats mostly automated and up to date, but debian still has its own similar kernel (for now at least.)

anyway, love the idea, but with so little priority given to updates, most of this stuff is a lost cause– albeit one that always matters. the point of engaging with a community like that– i got tired of the double standard about documentation (the gnu fdl is not libre! nor is it dfsg compatible) and left for debian. (oops.)

wherever you go, its the “face” of community. the face, but not more. insiders are happy, some people get free tech support, everyone else is going to get crapped on. all of which is fine, unless you for some reason wanted a community.

with unlimited examples of how pointless it is, trying to find community in these so-called communities, you might wonder exactly what i want from them? well the old “sjw” trick never works, i dont think we need 5 more codes-of-conduct to argue about until someone finally pulls rank and plays favourites, so im not asking them for heavier policing or stricter rules.

basically, i give up. its been close enough to 15 years, and im completely fed up with all of you, everywhere. ive tried. im not interested anymore.

i still have the pleasure of dealing with individuals, who make using gnu/linux a less lonely endeavor. very recently i gave someone im teaching a free laptop, and we installed my own fig os distro on it. but i doubt fig os will ever have a “community” online, and if it did, it would probably suck like the others do. because gnu/linux communities just suck. hard. at least every one ive ever been to.

i did go to a lug, just once. a guy let me play with his xo-1 laptop (awesome!) and there was a pretty boring (but informative) talk about btrfs, or something like it. but i didnt find any douchebags at that meeting, and the chance to use an xo-1 was totally worth the trip. also, ive been to a lug meeting.

my advice if you ever feel the way i do is to join a forum, make a handful of friends, and get the hell out of there before it gets completely stupid, and the stupidity gets in your face. because it always will, unless you kiss the right arses or have nothing to say. get a few friends and tell the rest of the world “thanks for the software– love to stay and chat, but i have a colonoscopy id rather go to.”

results may vary, naturally.

 

 

different approaches to science

im of the opinion that only one of these approaches is “truly scientific,” but its useful to look at all of them, if only for the purpose of debate or clarification.

the first approach to examine is “fringe science.” if youve been accused of it, please dont turn away yet. you may not know where im going with this. what i consider “fringe science” is when people are too focused on the questions of science, and throw out any answers that go against whatever answers they are most excited about. everyone has this attitude to some degree, and a science ought to temper it. people who engage in fringe science have the answers they want, and are only interested in the possibilities that will prove them right.

at the opposite end, you have the scientific orthodoxy. rooted in academia, scientific orthodoxy is intended to “weed out” everything fringe, everything unsupported, everything unproven. at this level, it can keep science “pure.” what i consider “scientific orthodoxy” is when people are too focused on the answers of science, and are not very interested in questions that go to new (or undeveloped) places in our knowledge. if fringe science is like impressionist painting, then orthodoxy is like a digital telescope– it can go so far, at great resolution, but it has no imagination to fuel new theories so much as showcase what it knows.

fringe science has too little in the way of discipline or serious study, while orthodoxy is uncreative and doesnt want to advance without following the great orthodoxy. i believe both of these attitudes are real and unscientific; the first thing the orthodoxy does with brilliant new ideas is throw them out on the street, and  the first thing the fringe does is explain why the new idea “proves” all theyve ever said before.

but then you have the truly brilliant scientific minds, which are tempered by scientific practice and also incredibly creative. no “genius” is perfect, and the best science makes mistakes (and learns from them.) the hallmark of a true scientist is an open mind, and also an honest thirst for knowledge and for understanding things as close to accurately as possible. science is not “getting the answer right” but “finding answers.” and that means looking for them, not the mere recital of facts.

people who speak of science tend to lean towards orthodoxy or lean towards the fringe. that seems to satisfy most people, so perhaps 60 or more percent of people that use the word “science” are happy with a fringe or orthodox attitude. but a smaller percentage of people care about both the questions and the answers– these to me are the “true scientists” of the world. of course you can point out that the phrase “true scientist” is itself a fallacy– thats fine, but we can probably agree that science at least has a useful definition; and by extension, definitions that fall short of useful.

scientists are explorers, but they are also navigators. they dont merely set out, but use the world around them to find out where they are. they dont just invent claims, they also try them out rigorously. they dont just try out claims and dispute things, but they also come up with ideas (fueled by both knowledge and imagination.) and they dont mock creative thinking, because they rely on it themselves.

which isnt to say that “fringe science” doesnt exist, but its the stuffed-shirt orthodoxy that talks about it as much as anyone, as if creativity is something that should be stamped out rather than channeled through a more scientific process. getting everyone else to shut up about their ideas is a true hallmark of orthodoxy, not of science.

 

 

 

figbuzz: a programming language for writing fizzbuzz (requires python 2)

figbuzz is a program written in python– it translates a language called “figbuzz” into python. if this sounds a lot like fig, theres a good reason. figbuzz is a stripped-down fig compiler.

at 955 lines, figbuzz contains all the block functions of fig, plus the commands needed to write fizzbuzz, plus a command called “ismultipleof”. this demo (included in the download) will look familiar to those who know my fizzbuzz program written in fig:

#### license: creative commons cc0 1.0 (public domain)
#### http://creativecommons.org/publicdomain/zero/1.0/
for fb 1 100 1
    while
        ifmultipleof fb 5
            ifmultipleof fb 3
                now "fizzbuzz" print
                break
                fig
            fig
        ifmultipleof fb 5
            now "buzz" print
            break
            fig
        ifmultipleof fb 3
            now "fizz" print
            break
            fig
        now fb print
        break
        wend
    next

 

save the above program as fb.figb (or whatever-you-like.figb) and figbuzz will translate it into whatever-you-like.figb.py

figbuzz is not only an over-the-top fizzbuzz demo, its also a slightly more manageable version of fig to experiment with. everything is there, minus more than 50 of the usual commands.

figbuzz does not do graphics, figbuzz does not do colour. figbuzz does not require libraries, figbuzz only needs python 2.

(fig only needs python 2 in gnu/linux and mac os/x, but in windows it requires colorama.)

here is the source for figbuzz:

#!/usr/bin/env python
# coding: utf-8 
#### license: creative commons cc0 1.0 (public domain) 
#### http://creativecommons.org/publicdomain/zero/1.0/ 
proginf = "figbuzz 0.1, apr 2017 mn"
# a version of fig just for writing fizzbuzz
import sys
import os
from sys import stdin, stdout
from os import popen

buf = []

cmdhelp = [("timer", "input (shared-line) change main variable to number of seconds past midnight")

,("print", "output (shared-line) output main variable to the screen (aka stdout)")
,("prints", "output (shared-line) put main var to screen; like print but (s)tays on line.")
,("while", "loop --\\own\\line mark the start of a loop (will keep going without break)")
,("break", "loop --\\own\\line put in the middle of a loop to exit (stop looping)")
,("for var strt stop step", "loop --\\own\\line start a for loop, changing var from strt to stop, by step")
,("forin var array", "loop --\\own\\line loop through each item in array; for each, set var to item")
,("iftrue ckvar", "conditional --\\own\\line run lines between iftrue and fig if ckvar is \"non-zero\"")
,("ifequal var1 var2", "conditional --\\own\\line run lines between ifequal and fig if var1 equals var2")
,("ifmore var1 var2", "conditional --\\own\\line run lines between ifmore and fig if var1 is > var2")
,("ifless var1 var2", "conditional --\\own\\line run lines between ifless and fig if var1 is < var2")
,("ifmultipleof var1 var2", "conditional --\\own\\line run lines between ifless and fig if var1 is divisible evenly by var2")
,("try", "conditional --\\own\\line put code that might not work between try and except")
,("except", "conditional --\\own\\line if code between try/except fails, run the code after except")
,("resume", "conditional --\\own\\line mark the end of try / except / resume command block")
,("else", "conditional --\\own\\line after if- line, before fig. run lines if condition isnt true")
,("function name p1 p2 ...¦", "function --\\own\\line define function named name with optional params p1,p2, etc")
,("fig/next/nextin/wend", "fig (interchangeable) function --\\own\\line finalise a block (started by if/while/function/for/forin")
,("pass", "function --\\own\\line blocks (for/next, etc) require something inside lines; pass works / does nothing")
,("str", "function (shared-line) convert main variable from number to string")
,("not", "function (shared-line) change main variable to zero if non-zero; or -1 if zero")
,("#", "comment (can\\share) place at beginning (or end) of line, prior to a comment")
,("():;|=,. ( ) : ; | = , .", "optional (shared-line) use in a shared line (and some others) for aesthetics/notation")
,("system", "function (shared-line) put on (usually at the end of) a line to stop the program")
,("end", "function (shared-line) interchangeable with system which ends the program")
,("return var", "function (shared-line) (optional) exit current function, returning value var")
,("swap var1 var2", "function (shared-line) change contents of var1 to contents of var2 and vice-versa")
,("plus numstrarr", "math (shared-line) change main variable to itself plus num or string or arr")
,("minus numeric", "math (shared-line) change main variable to itself minus numeric")
,("divby numeric", "math (shared-line) change main variable to itself divided by numeric")
,("times numeric", "math (shared-line) change main variable to itself times numeric")
,("sgn", "math (shared-line) change main variable to 0 if 0, to -1 if < 0, or 1 if > 0.")
,("int", "math (shared-line) change main variable from decimal (aka \"float\") to integer")
,("mod denominator", "math (shared-line) change main variable to: main var modulus denominator")]

def chelp(f):
    ck = 0 ; print "" 
    for p in cmdhelp:
        rcmd = p[0]
        if f in rcmd.split()[0]:
            ck = 1
            rd = p[1].split()
            rcat = rd[0] ; rd.remove(rd[0])
            rt = rd[0] ; rd.remove(rd[0])

            cde = rcmd.split(" ")
            print "" 
            stdout.write("    " + colour(14,0)+ cde[0])
            cda = cde.remove(cde[0])
            for c in cde:
                stdout.write(" " + colour(0, 7)+ " " + c + " " + colour(7,0)+" ") ; stdout.flush()
            print "" 
            print "" 
            print colour(3,0) + "        category:", rcat, rt.replace("\\", " ") 
            print "" 
            print "        " + colour(7,0) + " ".join(rd) 
            print "" 
        colour(7,0);
    return ck

def outfilewrite(outb, p):
    outb += [p]
    #global vrck 
    #vrck += p.strip()
    #if inle: print colour(5, 0) + p.rstrip() ; p=raw_input() ; quit()

def colour(f, b):
    stdout.write("")
    return ""

def bcolour(b):
    stdout.write("")
    return ""

def sgn(p):
    p = float(p)
    if p > 0: return 1
    if p < 0: return -1
    return 0

def left(p, s):
    return p[:s]

def right(p, s):
    return p[-s:]

def leftfour(p):
    try: 
        if left(p, 4) == chr(32) * 4: p = right(p, len(p) - 4)
    except:
        pass
    return p

def atleast(s, p):
    if p < s: return s
    else: return p

def figfsp(p):
    pp = "" ; flg = 0 
    fsp = figfsplit(p)    
    for fp in enumerate(fsp):
        if flg == 0 and fp[1] in cmds.keys():
            pp += colour(8,0) + "_" + colour(7,0) + " " ; flg = cmds[fp[1]]
            if flg < 0: flg = flg * -1
            else: flg = flg + 1
        pp += fp[1] + " "
        if flg > 0:
            flg -= 1 
            if flg == 0 and fp[0] + 1 < len(fsp):
                pp += colour(8,0) + "_" + colour(7,0) + " "
    return pp.rstrip().replace(colour(8,0) + "_" + colour(7,0) + " " + colour(8,0) + 
    "_" + colour(7,0), colour(8,0) + "__" + colour(7,0)).replace(colour(8,0) + "_" + 
    colour(7,0),colour(8,0) + "__" + colour(7,0))

def figfsplit(p):
    # return p.split() # that was fine when strings weren't tokens
    # we have to make this 3 tokens: variable "hello, world!" #comment not string

    px = [] 
    pxc = -1 # could use len(px) -1 instead?

    inquotes = 0
    remarked = 0
    inspc = "" ; vnspc = ""

    #print "->", p

    for l in p:
        if inquotes == 0 and remarked == 0 and l == "#":
            remarked = 1
            pxc += 1 ; px += [""]
        if remarked == 1:
            px[pxc] += l

        if remarked == 0:
            if l == "\"":
                if inquotes == 0:
                    inquotes = 1 ; pxc += 1 ; px += [""]
                else: inquotes = 0 #; px[pxc] += l
        if inquotes == 1: px[pxc] += l

        if remarked == 0 and inquotes == 0:
            if vnspc not in "1234567890-" + chr(32) and l[0] == ".": l = " "
            vnspc = l
            if l[0] in "():;|=,": l = " "
            if inspc != " " and l == " ": pxc += 1 ; px += [""]
            if l != " ":
                if pxc == -1: pxc += 1 ; px += [""]
                px[pxc] += l.lower() 
            inspc = l
    #print "->", px[:]
    while ('') in px: px.remove('')
    while (':') in px: px.remove(':')
    for p in range(len(px)):
        if px[p][0] != "#":
            if right(px[p], 1) == ":":
                lenpx = len(px[p]) - 1
                if lenpx > 0:
                    px[p] = left(px[p], lenpx)
    return px[:]

def nob(p, s):
    r = ""
    if s == len(p) - 1:
        if len(p):
            if p[s].rstrip() != ".": r = p[s].rstrip()
        if len(r):
            if r[-1:] == ".": r = left(r, len(r) - 1)
    pfig = ""
    try: pfig = left(p[s], 3)
    except: pfig = ""
    if pfig.lower() == "fig" and p[s].lower() != "fig": return "figg"
    try: 
        if r != "": return r
        else: return p[s]
    except: return ""

def snobl(p):
    if "\"" in p: return p
    else: return p.lower()

def snob(p, s):
    r = ""
    if s == len(p) - 1:
        if len(p):
            if p[s].rstrip() != ".": r = p[s].rstrip()
        if len(r):
            if r[-1:] == ".": r = left(r, len(r) - 1)
    pqt = ""
    try: pqt = left(p[s], 3)
    except: pqt = ""
    if pqt.lower() == "fig" and p[s].lower() != "fig": return "figg"
    try: 
        if r != "": return snobl(r)
        else: return snobl(p[s])
    except: return ""

def lnob(p, s):
    r = ""
    if s == len(p) - 1:
        if len(p):
            if p[s].rstrip() != ".": r = p[s].rstrip()
        if len(r):
            if r[-1:] == ".": r = left(r, len(r) - 1)
    pfig = ""
    try: pfig = left(p[s], 3)
    except: pfig = ""
    if pfig.lower() == "fig" and p[s].lower() != "fig": return "figg"
    try: 
        if r != "": return r.lower()
        else: return p[s].lower()
    except: return ""

def getmore(p, s):
    try:
        for t in range(1, s + 1):
            if len(p) == 1: p = []
            p = right(p, len(p) - 1)
        while "" in p: p.remove("")
        for prx in range(len(p)):
            if p[prx][0] == "#":
                p.remove(p[prx])
        return p
    except: return []

def getlmore(p, s):
    try:
        for t in range(1, s + 1):
            if len(p) == 1: p = []
            p = right(p, len(p) - 1)
        while "" in p: p.remove("")
        return p
    except: return []

def lc():
    global linecount
    global flen
    es = " \x1b[0;37;40m"
    return "\x1b[0;37;44m" + right(chr(32) * flen + str(linecount), flen) + es

def wr(p):
    global buf
    buf += [p + "\n"]

colour(11, None) ; print proginf; colour(7, None) ; print

addtoout = [0]
addto = [0]

addtoout[0] = """import sys, os
from sys import stdin, stdout
from os import chdir as figoch
from os import popen as figpo
from os import system as figsh
from os import name as figosname
figsysteme = 0
figfilehandles = {}
figfilecounters = {}
"""

addtoout += [0] ; addto += [0]

addtoout[1] = """from sys import stdout
def fignonz(p, n=None):
    if n==None:
        if p == 0: return 1
    else:
        if p == 0: return n
    return p

def fignot(p):
    if p: return 0
    return -1

figbac = None
figprsbac = None
sub = None
def fignone(p, figbac):
    if p == None: return figbac
    return p
    return -1

\n"""
addtoout += [0] ; addto += [0]

addtoout[2] = ""
addtoout += [0] ; addto += [0]

addtoout[3] = ""

addtoout += [0] ; addto += [0]

# -2: print(variable, etc)
# -1: print(variable), 0: variable = int(variable), 1: variable=left(variable, etc)

cmds = {"str":0,
"prints":-1,"system":-1, "end":-1, 
"print":-1, 
"plus":1, "times":1, "divby":1, "minus":1,  
"int":0, "swap":-3, "return":-2, "mod":1, "not":0, "sgn":0}

funcs = {"function" : -1, "iftrue" : -2, "ifmultipleof" : -3, "ifequal" : -3, "ifless" : -3, 
"ifmore" : -3, "try":0, "except":0, "resume":0, "else":0}

ufunc = {}

#addfuncs = addtoout[0] + addtoout[1] + addtoout[3] + """
addfuncs = """

def figsgn(p):
    p = float(p)
    if p > 0: return 1
    if p < 0: return -1
    return 0

def figstr(p): return str(p)

def figprint(p): print p


def figprints(p): stdout.write(str(p)) ; sys.stdout.flush()

def figint(p): return int(p)

def figplus(p, s): 
    if type(p) in (float, int):
        if type(s) in (float, int):
            p = p + s
        else:
            p = p + s # float(s) if you want it easier
        if p == float(int(p)): p = int(p)
    else:
        if type(p) == str: p = p + s # str(s) if you want it easier
        if type(p) == list: 
            if type(s) == tuple:
                p = p + list(s)
            elif type(s) == list:
                p = p + s[:]
            else:
                p = p + [s]
        if type(p) == tuple: 
            if type(s) == tuple:
                p = tuple(list(p) + list(s))
            elif type(s) == list:
                p = tuple(list(p) + s[:])
            else:
                p = tuple(list(p) + [s])
    return p

def figtimes(p, s):
    if type(p) in (float, int):
        p = p * s # float(s) if you want it easier
        if p == float(int(p)): p = int(p)
    else:
        if type(p) == list:
            p = p[:] * s # figval(s)
        else:
            p = p * s # figval(s) if you want it easer
    return p
def figdivby(p, s):
    p = float(p) / s
    if p == float(int(p)): p = int(p)
    return p
def figminus(p, s): return p - s

def figmod(p, s): 
    return p % s

def figfunction(p, s): return p
def figend(x): quit()

def figsystem(x): quit()
\n"""

demo = """
for fb 1 100 1
    while
        ifmultipleof fb 5
            ifmultipleof fb 3
                now "fizzbuzz" print
                break
                fig
            fig
        ifmultipleof fb 5
            now "buzz" print
            break
            fig
        ifmultipleof fb 3
            now "fizz" print
            break
            fig
        now fb print
        break
        wend
    next
"""

p = ""
try: p = right(sys.argv, 1)[0]
except: pass
if not ".figb" in p.lower():
    if p.lower() == "help":
        stdout.write("\n    type (any) part of the command you want help on." +
        "\n\n    fig will show all matches.\n\n\n    ")
        helpf = chelp(raw_input())
        if not helpf: print(colour(14,0)+"\n    no commands match your search.") ; print("")
        colour(7,0)
    #try: inputfile = stdin.read().replace(chr(13), "").split("\n")
    #except: 
    #print "need an input file to do anything..."; print ; quit()
        quit()
    else:
        print "using built-in demo source, translating to demo.figb.py..." ; print
        p = "demo.figb"
        inputfile = demo.replace(chr(13), "").split("\n")
else:
    try:
        inputfile = open(p).read().replace(chr(13) + chr(10), 
        chr(10)).replace(chr(13), chr(10)).split(chr(10))
    except: print "couldn't open \"" + p + "\", exiting." ; print ; quit()
try: outfile = open(p + ".py", "w")
except: print "couldn't write to \"" + p + ".py" "\", exiting." ; print ; quit()
outname = p + ".py"

flen = len(str(len(inputfile)))

linecount = 0
indent = 0
inlinep = 0
inle = 0
errorin = 0
errorsrc = ""
error = ""
mode = 0
figraphics = -1 # -1 = uninitialised, 0 = textmode, 1 = initialised
vrs = []
vr = ""
outb = []
ingfx = 0
linesoutc = 0

for p in inputfile:
    linecount += 1 ; vrop = 0 ; vrcl = 0

    if linecount == 1: 
        outfile.write("#!/usr/bin/env python" + "\n# encoding: utf-8\n")
        if "," in proginf: 
            outfile.write("# figbuzz translator version: " + proginf.split(",")[0] + "\n")
    if inlinep:
        if p.lower().strip() == "fig":
            inlinep = 0
            print lc() + p
            indent = atleast(0, indent - 4)
        else:
            print lc() + colour(2, None) + p + colour(7, None)
            #% write copied lines of inline python
            outfilewrite(outb, chr(32) * atleast(0, indent - 4) + 
            leftfour(p) + "\n")

    elif mode == "output the following:":
        if p.lower().strip() == "display":
            mode = 0
            print lc() + p
        else:
            wr(chr(32) * atleast(0, indent) + "print \"" + p.replace(chr(34), 
            "\" + chr(34) + \"").replace(chr(92), "\" + chr(92) + \"") + "\"")
            print lc() + p.replace(chr(34), "\" + chr(34) + \"").replace(chr(92), 
            "\" + chr(92) + \"") 

    elif mode == 0:
        x = figfsplit(p.lstrip())
        lp = p.lower()
        if not len(p):
            print lc() + ""
            #% write copied blank lines from inline python
            outfilewrite(outb, "\n")

        if len(p.lstrip()):

            e = 0

            if p.lstrip()[0] == "#":
                if linecount == 1:
                    es = 0
                    try: 
                         if p.lstrip()[1] == "!": es = 1
                    except: es = 0
                    if not es:
                        wr(p)
                        print lc(), figfsp(p)
                    else: print lc() + "[this first comment isn't copied over]"
                    es = 0 
                else:
                    #% write comments
                    #print colour(14, 0) + p + colour(7,0) ; znul = raw_input()  #$ 
                    outfilewrite(outb, chr(32) * atleast(0, indent) + p + "\n")
                    print lc(), figfsp(p)

            elif lnob(x, 0) == "figg":
                 e = 2

            elif lp.rstrip() == "python":
                if 1 == 0:    
                    indent += 4
                    inlinep = 1
                    print lc() + p

            else:
                if not lnob(x, 0) == "figg":
                    if lnob(x, 0) != "fig" and not lnob(x, 
                    0) in cmds.keys() and not lnob(x, 
                    0) in funcs.keys() + ["forin", "for", "function", "nextin",
                    "next", "while", "wend"] + ["break", "pass"]: 
                        if not lnob(x, 0) in vrs: vrs += [lnob(x, 0)[:]] # main vars, also func params, etc
                        #% write variable
                        #var: print colour(14, 0) + "variable:" + lnob(x, 0) + colour(7,0) ; znul = raw_input()  #$
                        outfilewrite(outb, "\n")
                        outfilewrite(outb, chr(32) * atleast(0, indent) + 
                        "figlist = 0\n") 

                        outfilewrite(outb, chr(32) * atleast(0, indent) + 
                        "try: figlist = int(type(" + lnob(x, 0) + ") == list)\n")

                        outfilewrite(outb, chr(32) * atleast(0, indent) + 
                        "except NameError: pass\n")
                        outfilewrite(outb, chr(32) * atleast(0, indent) + 
                        "if not figlist: " + lnob(x, 0) + " = 0 \n")

                    if lnob(x, 0) == "fig":
                        #print lc () + p
                        #% write? its whitespace
                        #$
                        indent = atleast(0, indent - 4) 
                    if lnob(x, 0) == "wend":
                        #print lc () + p
                        #% write? its whitespace
                        #$
                        indent = atleast(0, indent - 4) 
                    if lnob(x, 0) == "next":
                        #print lc () + p
                        #% write? its whitespace
                        #$
                        indent = atleast(0, indent - 4) 
                    if lnob(x, 0) == "nextin":
                        #print lc () + p
                        #% write? its whitespace
                        #$
                        indent = atleast(0, indent - 4) 
                    if lnob(x, 0) == "try":
                        #print lc () + p
                        #% write try line
                        #$
                        outfilewrite(outb, chr(32) * atleast(0, indent) + "try:\n")
                        indent = atleast(0, indent + 4) 
                    if lnob(x, 0) == "else":
                        #print lc () + p
                        #% write else line
                        #$
                        outfilewrite(outb, chr(32) * atleast(0, indent - 4) + 
                        "else:\n")
                    if lnob(x, 0) == "except":
                        #print lc () + p
                        indent = atleast(0, indent - 4) 
                        #% write except line
                        #$
                        outfilewrite(outb, chr(32) * atleast(0, indent) + 
                        "except:\n")
                        indent = atleast(0, indent + 4) 
                    if lnob(x, 0) == "resume":
                        #print lc () + p
                        #% write? its whitespace
                        #$
                        indent = atleast(0, indent - 4) 
                    if lnob(x, 0) == "while":
                        #print lc () + p
                        #% write simple loop
                        #$
                        outfilewrite(outb, chr(32) * atleast(0, indent) + 
                        "while 1:\n")
                        indent += 4 
                    if lnob(x, 0) == "function" and len(getmore(x, 1)) > 0:
                        #print lc () + p
                        mkf = []
                        funcname = getlmore(x, 1)[0]
                        prm = 1
                        while 1:
                            try:
                                aprm = getlmore(x, 1)[prm]
                                if len(aprm): 
                                    if aprm[0] != "#":
                                        mkf += [aprm]
                                        if aprm not in vrs: vrs += [aprm[:]]
                                prm += 1
                            except: break
                        ufunc[funcname] = mkf[:] #; print ufunc # #
                        #print ufunc
                        #print len(ufunc[funcname])
                        #% write func def
                        #$ print colour(14,0)+ "def " +  funcname + "(" + ", ".join(mkf) + "):" + colour(7,0)
                        outfilewrite(outb, chr(32) * atleast(0, indent) + "def " +
                        funcname + "(" + ", ".join(mkf) + "):\n")
                        indent += 4

                    if lnob(x, 0) == "for" and len(getmore(x, 1)) == 4:
                        #print lc () + p
                        gmro = getlmore(x, 1)[0]
                        gmrt = getlmore(x, 1)[1]
                        gmrh = getlmore(x, 1)[2]
                        gmrf = getlmore(x, 1)[3]
                        if gmro not in vrs: vrs += [gmro[:]]
                        if "." not in gmrf and (gmrf.strip()) not in ("0", 
                        "0.0", "-0") and "." not in gmrt and "." not in gmrh: 
                            #% write standard for loop
                            #$
                            outfilewrite(outb, chr(32) * atleast(0, indent) 
                            + "for "
                            + gmro + " in range(int(float(" + gmrt + 
                            ")), int(float(" + gmrh + ")) + figsgn(" + gmrf + 
                            "), fignonz(int(float(" + gmrf + ")))):\n")
                        else:
                            #% write for loop that allows floating step
                            #$
                            outfilewrite(outb, chr(32) * atleast(0, indent) + gmro 
                            + " = float(" + gmrt + ") - float(" + gmrf + ")\n" + 
                            chr(32) * atleast(0, indent) + "while 1:\n" + chr(32) *
                            atleast(0, indent + 4) + gmro + " += float(" + gmrf +
                            ")\n" + chr(32) * atleast(0, indent + 4) + "if " + 
                            gmrf +
                            " > 0 and " + gmro + " > float(" + gmrh + "): break\n" 
                            + chr(32) * atleast(0, indent + 4) + "elif " + gmrf + 
                            " <= 0 and " + gmro + 
                            " < float(" + gmrh + "): break\n")
                        indent += 4

                    if lnob(x, 0) == "forin" and len(getmore(x, 1)) == 2:
                        #print lc () + p
                        gmro = getlmore(x, 1)[0]
                        gmrt = getlmore(x, 1)[1]
                        if gmro not in vrs: vrs += [gmro[:]]
                        #% write forin command with params
                        #$
                        outfilewrite(outb, chr(32) * atleast(0, indent) + "for " +
                        gmro + " in " + gmrt + ":\n")
                        indent += 4

                    if lnob(x, 0) == "break":
                        #print lc () + p
                        #% write break command
                        #$ print
                        outfilewrite(outb, chr(32) * 
                        atleast(0, indent) + "break\n") 

                    if lnob(x, 0) == "pass":
                        #print lc () + p
                        #% write pass command
                        #$ print
                        outfilewrite(outb, chr(32) *
                        atleast(0, indent) + "pass\n") 

                    if lnob(x, 0) == "iftrue":
                        #print lc () + p
                        #% write iftrue
                        #$ print colour(14,0) + "if " +    snob(x, 1) + " > " + snob(x, 2) + ":\n"+ " ; " +colour(7,0)
                        outfilewrite(outb, chr(32) * atleast(0, indent) + "if " + 
                        snob(x, 1) + ":\n") ; indent += 4

                    if lnob(x, 0) == "ifequal" and len(getmore(x, 1)) == 2:
                        #print lc () + p
                        #% write ifequal
                        #$ print colour(14,0) + "if " +    snob(x, 1) + " > " + snob(x, 2) + ":\n"+ " ; " +colour(7,0)
                        outfilewrite(outb, chr(32) * atleast(0, indent) + "if " + 
                        snob(x, 1) + " == " + snob(x, 2) + ":\n") ; indent += 4

                    if lnob(x, 0) == "ifless" and len(getmore(x, 1)) == 2:
                        #print lc () + p
                        #% write ifless
                        #$ print colour(14,0) + "if " +    snob(x, 1) + " > " + snob(x, 2) + ":\n"+ " ; " +colour(7,0)
                        outfilewrite(outb, chr(32) * atleast(0, indent) + "if " +
                        snob(x, 1) + " < " + snob(x, 2) + ":\n") ; indent += 4

                    if lnob(x, 0) == "ifmultipleof" and len(getmore(x, 1)) == 2:
                        #print lc () + p
                        #% write ifless
                        #$ print (colour(14,0) + "if " +    float(snob(x, 1)) + " / " + 
                        #snob(x, 2) + " == int(" +  snob(x, 1) + " / " + snob(x, 2) + "):\n"+ 
                        #" ; " +colour(7,0))
                        outfilewrite(outb, chr(32) * atleast(0, indent) + "if float(" +
                        snob(x, 1) + ") / " + snob(x, 2) + " == int(" + snob(x, 1) + " / " + 
                        snob(x, 2) + "):\n") ; indent += 4

                    if lnob(x, 0) == "ifmore" and len(getmore(x, 1)) == 2:
                        #print lc () + p
                        #% write ifmore
                        #$ print colour(14,0) + "if " +    snob(x, 1) + " > " + snob(x, 2) + ":\n"+ " ; " +colour(7,0)
                        outfilewrite(outb, chr(32) * atleast(0, indent) + "if " + 
                        snob(x, 1) + " > " + snob(x, 2) + ":\n") ; indent += 4

                    if lnob(x, 0) in cmds.keys(): # + ufunc.keys():
                        e = 4 ; shln = lnob(x, 0) 

                    if lnob(x, 0) != "fig" and lnob(x, 
                    0) not in funcs.keys() + ["forin", "for", "function", 
                    "nextin", "next", "while", "wend"] + ["break", "pass"]:

                        #print lc () + p
                        vr = lnob(x, 0)
                        #print vr, type(vr)
                        #print getlmore(x, 1)
                        prsc = 0
                        cstrctr = 0
                        csbuf = []
                        vrcs = ""
                        for prs in getlmore(x, 1):                            
                            #$ print prs 
                            if "fig" in prs:
                                if prs[:3] == "fig": e = 2 ; break ; break
                            if prs in funcs.keys():
                                e = 3 ; shln = prs
                            prsc += 1
                            if cstrctr > 0:
                                vrcs += prs
                                cstrctr -= 1
                                if cstrctr == 0:

                                    if lnob(x, prsc - 1) == "return":
                                        #% write return command
                                        #$ print colour(14,0) +vrcs + " ; " +colour(7,0)
                                        outfilewrite(outb, chr(32) * atleast(0, 
                                        indent) + vrcs)

                                    elif lnob(x, prsc - 2) == "swap":
                                        vrcs = lnob(x, prsc - 1) + ", " + lnob(x,
                                        prsc - 0) + " = " + lnob(x, 
                                        prsc - 0) + ", " + lnob(x, prsc - 1)
                                        #% write swap of 2 vars in python syntax
                                        #$ print colour(14,0) +vrcs + " ; " +colour(7,0)
                                        outfilewrite(outb, chr(32) * atleast(0,
                                        indent) + vrcs + " ; ")
                                    else:

                                        if figprsbac in ufunc.keys():
                                            #% write parametered func call 
                                            #$ print colour(14,0)+  vrcs + ") ; " + lnob(x, 0) + " = fignone(" + lnob(x, 0) + ", figbac) ; " +colour(7,0)
                                            outfilewrite(outb, chr(32) * atleast(0,
                                            indent) + vrcs + ") ; " + lnob(x, 0) +
                                            " = fignone(" + lnob(x, 0) +
                                            ", figbac) ; ") ; vrcl += 1
                                        else:
                                            #% write builtin func call assignment
                                            #$ print colour(14,0)+  vr + " = " +  vrcs + ") ; "  +colour(7,0)
                                            outfilewrite(outb, chr(32) *
                                            atleast(0, indent) + vrcs + ") ; ") ; vrcl += 1
                                else:
                                    vrcs += ", " #; print "*"
                                    #if 
                                continue

                            if prs.lower() in funcs.keys() + ["forin", "for",
                            "function", "nextin", "next", "while", 
                            "wend"] + ["break", "pass"]:
                                e = 3
                            figprsbac = None

                            if cstrctr == 0:
                                if not prs.lower() in vrs:
                                    if prs.lower()[0] in "abcdefghijklmnopqrstuvwxyz":
                                        if not prs.lower() in ufunc.keys():
                                            if not prs.lower() in funcs.keys():
                                                if not prs.lower() in cmds.keys():
                                                    e = 5 ; shln = prs

                            if prs.lower() in vrs and cstrctr == 0: 
                                #and len(getmore(x, 1)) == 1:
                                #% write lefthand variable assignment
                                #$ print colour(14,0)+  vr + " = " + prs.lower()  +colour(7,0)
                                outfilewrite(outb, chr(32) * atleast(0, indent) +
                                vr + " = " + prs.lower() + "\n")

                            if prs[0] == "\"":
                                #% write string assignment (any place in shared line)
                                outfilewrite(outb, chr(32) * atleast(0, indent) +
                                vr + " = " + prs + " ; ")

                            if prs[0] in ".1234567890-":
                                #% write numerics
                                outfilewrite(outb, chr(32) * atleast(0, indent) + 
                                vr + " = " + prs + " ; ")

                            if prs[0] == "#": 
                                #% write trailing comments #$ print colour(14, 0) + prs  + colour(7,0)
                                outfilewrite(outb, prs + "\n") ; break


                            if prs.lower() in ufunc.keys():
                                #% write pre-func-call var backup for sub-style behavior #$ print colour(14, 0) + "figbac = " + lnob(x,0) + " ; " + colour(7,0)
                                outfilewrite(outb, chr(32) * atleast(0, indent) +
                                "figbac = " + lnob(x,0) + " ; " ) # ##
                                figprsbac = prs.lower()	

                                cstrctr = len(ufunc[prs])
                                #print cstrctr
                                if cstrctr == 0:
                                    #% write zero-param func/?sub call
                                    #$ print colour(14, 0) + vr + " = " + prs.lower() + "() ; " + lnob(x, 0) + " = fignone(" + lnob(x, 0) + ", figbac) ; " + colour(7,0)
                                    outfilewrite(outb, chr(32) * 
                                    atleast(0, indent) + 
                                    vr + " = " + prs.lower() + "() ; " + lnob(x, 0) +
                                            " = fignone(" + lnob(x, 0) + ", figbac) ; ") # #
                                else:
                                    #print "y"
                                    vrop += 1
                                    vrcs = vr + " = " + prs.lower() + "(" 
                                    #$ print colour(4, 0) + vr + " = " + prs.lower() + "(" + colour(7,0) #$
                                    #multiparameter  


                            if prs.lower() in cmds.keys():
                                if prs.lower() in ["display", "pset", "line"]: 
                                    ingfx = 1
                                ##print prs	
                                cstrctr = cmds[prs]
                                ##print cstrctr
                                if cstrctr == -1:
                                    #% write zero-param subs
                                    #print colour(14, 0) + "fig" +  prs.lower() + "(" + vr 
                                    #+ ") ; " + colour(7,0) ; #znul = raw_input()  #$
                                    outfilewrite(outb, chr(32) * 
                                    atleast(0, indent) + "fig" + 
                                    prs.lower() + "(" + vr + ") ; " ) ; vrcl += 1

                                if cstrctr == 0:
                                    #% write zero-param functions 
                                    #print colour(14, 0) + vr + " = fig" + prs.lower() 
                                    #+ "(" + vr + ") ; "+ colour(7,0) ; #znul = raw_input()  #$
                                    outfilewrite(outb, chr(32) * atleast(0,
                                    indent) + vr +
                                    " = fig" + prs.lower() + "(" + vr + ") ; " ) ; vrcl += 1

                                if cstrctr < -1:
                                    if prs == "return":

                                        cstrctr = abs(cstrctr) - 1
                                        vrcs = "return " #parameter
                                    else:
                                        cstrctr = abs(cstrctr) - 1
                                        if prs == "swap": vrcs = "swap "
                                        else:
                                            vrop += 1
                                            vrcs = "fig" + prs.lower() + "(" + vr 
                                            vrcs += ", " #multiparameter  
                                else:
                                    vrop += 1
                                    vrcs = vr + " = fig" + prs.lower() + "(" + vr 
                                    vrcs += ", " #multiparameter  

                        if vrop == vrcl and e == 0: 
                            print lc(), figfsp(p)

                        #% finish each line with lf
                        outfilewrite(outb, "\n")
                    else:
                        print lc() + p
                else:
                    e = 2

            if e == 1: 
                e = 0 
                if not len(error):
                    error = "error: problem in command structure or details."
                    errorin = linecount
                    errorsrc = p
                print lc() + colour(14, 0) + str(p) + colour(7, 0)
                break

            if e == 2:
                e = 0
                if not len(error):
                    error = "error: cannot create variable or function beginning"
                    error += " with \"fig\""
                    errorin = linecount
                    errorsrc = p
                print lc() + colour(14, 0) + p + colour(7, 0)
                break

            if e == 3:
                e = 0
                if not len(error):
                    error = "error: single-line command \"" + shln + "\" not on own line"
                    errorin = linecount
                    errorsrc = p
                print lc() + colour(14, 0) + p + colour(7, 0)
                break

            if e == 4:
                e = 0
                if not len(error):
                    error = "error: shared-line function \""
                    error += shln + "\" cannot be used to start a line"
                    errorin = linecount
                    errorsrc = p
                print lc() + colour(14, 0) + p + colour(7, 0)
                break

            if e == 5:
                e = 0
                if not len(error):
                    error = "error: variable or function not created, but referenced... \""
                    error += shln + "\" needs to be set before first use"
                    errorin = linecount
                    errorsrc = p
                print lc() + colour(14, 0) + p + colour(7, 0)
                break

    if vrcl != vrop: 
                e = 0 
                if not len(error):
                    error = "error: a command has the wrong number of parameters."
                    errorin = linecount
                    errorsrc = p
                print lc() + colour(14, 0) + str(p) + colour(7, 0)
                break

if ingfx == 0: addtoout[3] = ""
outfile.write(addtoout[0] + addtoout[1] + addtoout[3] + addfuncs)
for outsb in outb: outfile.write(outsb)
outfile.close()

print
if errorin:
    print error ; colour(14, None) ; print "error in line " + str(errorin) + ":"
    colour(7, None)
    print errorsrc
    #from os import system as stf ; p = stf("touch e")
else:
    try: os.system("chmod +x \"" + outname + "\"")
    except: pass
    colour (11, None) ; print "translation complete. ", ; colour(7, None)
    print "here's a python script you can run: ", 
    print colour(11, None) + outname + colour(7, None)
print

 

there is no perfect language for coding

you can joke that x is “perfect” or that a language is close enough, but theres no such thing.

if i were to pick a perfect language, i would probably single out python. but its not the fastest, i dont like the direction its going in, its not the best language for low-level tasks like writing drivers or an operating system (youd probably want c for that) and its not even the best language for teaching first-time coders, but it does pretty well in that regard.

then theres fig. its designed for teaching, it addresses a number of things that make python less ideal sometimes, its heavily integrated with python (even allows inline python code and translates into python code) but its got tons of design decisions that are for a range of specific uses. i love using fig and i use it all the time, but its good for what its good for– it isnt perfect either.

one of the surest ways to improve (or ruin) a language is to try to make it perfect. people dont know (im not sure they can know) what “perfect” would be, but that doesnt stop them from trying. occasionally, that effort goes well. more often, it seems like they break more than they fix.

this is subjective of course, but thats really the point– the cons are subjective, but so are the pros. and so really no language can be “perfect.” people could never agree what that would even mean, and many notions of perfection are so impractical, they might as well be impossible.

the more elaborate your notion of quality is, the more work it takes to maintain it if you update it. the amount of work that will actually get done depends on the level of resources and interest towards that effort.

this is a highly variable thing, more than people seem to realize. they take for granted that monumental efforts require monumental interest– whether to volunteer time, or spend money, or both. and that level of interest can change any time the nature of the result changes.

some people clearly build large languages on the assumption that there will be substantial interest– at least their own. its difficult to predict the amount of interest even you will have in something in the future. im still very interested in fig, 2 years later. and ive been using python for most of a decade.

but if trends are easy to predict, no one is releasing much data on them– or almost no one is paying much attention to the data. if any language were perfect, the data probably wouldnt be as spread out as it is.

 

 

 

the world has got bigger problems than selfies

i hate anti-millennialism. its so arrogant and hypocritical, every generation sooner or later gets around to blaming everything on the people that come after them. its probably disappointment that they dont get to live carbon-copy-like, vicariously through the next generation. any reasonable person couldve told you that.

i dont believe this generation is more self-centered, per se. at times, its spread out more superficially– due to global communication, social diseases like facebook, and ever-increasing population growth. for an older generation to talk about this like its just a millennial thing is a serious case of not-looking-in-the-mirror. (perhaps thats why they hate selfies, they havent looked at themselves in ages.)

anyway, ive been sick of it since it started, and im not even a millennial. (im close though.) and while i think privacy is important, i dont think selfies are the real problem here.

the biggest problem i can find in society isnt the “narcissism” of a self-portrait. i mean, self-portraits are celebrated; heres a whole lot of classic examples, for those who think “millennials” invented the idea: https://en.wikipedia.org/wiki/Self-portrait

perhaps theyre trying to say that photography isnt art; but it can be, and you dont get good without practice.

i actually find the act of selfies (not the product) kind of annoying; people are always whipping cameras out, but it isnt the part where they aim the camera at themselves that i find annoying. im not anti-selfie, but i dont really love them in public. its not like theyre going to go anywhere any time soon in any case.

the real problem in my opinion, is the narcissism of people needing to find something wrong with every other person. thats the kind of mindset that makes selfies a “problem.”

its simple prejudice; once you can blame an entire group of people (like a generation) for all the ills of the world, it becomes a sort of hobby to find little bits of “proof” everywhere. but thats more narcissistic than any self-portrait, i think.

 

 

fig 4.2: (backwards compatibly) supports british and aussie spelling

t "hello" colortext 5 print

t "hello" colourtext 5 print

# both lines work; both are supported in help system

download on figs support forum: http://unofficialdistros.freeforums.org/fig-4-2-colortext-and-colourtext-both-valid-commands-t95.html

 

the future: a love story

i didnt know what he was doing or why he was here, though something seemed familiar about him. and at the same time, i was sure we had never met. he walked in, stopped, and handed me his key along with a handwritten letter. i examined the letter. it was from me.

“hello, mr. setzer,” he said. “youve been expecting me.”

“i dont know that i have,” i replied. “who are you, and what exactly do you want?”

“please read the letter.”

it was certainly my handwriting and style. i knew it could be fake, but what it said made sense to me. at the same time, it was foreign.

hes here to talk to you about the future.

 

 

with love,

you

 
“why dont i remember writing this?”

“im here to find out. my name is phil sanchez, you sent me this key and this letter about 2 weeks ago.”

he hands me another letter, also in my handwriting.

mr. sanchez,

please come visit me at my home address, in two weeks. do not announce yourself. use this key, and return it to me when we meet.

 
i looked over the rest of it.

“i dont remember sending this.”

“i know. ive been researching your situation. you are correct that we havent met or spoken before. i wanted to meet you, but before i could reach out to you i got this letter. as it says, you were expecting me already.”

“since 11 weeks ago.”

“right. and i had never even heard of you back then, but i was reading about you by the time i got the letter.”

“so you think i knew something about the future.”

“yes, and when it comes to the past, everything seems to be fine. but youre remembering other things as well.”

“things that havent happened yet.”

“right. some of the things you remember, happen weeks or months later. but you remember them as if they have already.”

“and then when they happen…”

“when they do happen, you forget that you knew about them ahead of time.”

“unless i make myself a note.”

“…unless you make a note.”

“youre leaving something out.”

when she walked in the door moments later, i was sure i was in love. i didnt know who she was, and it didnt matter. she was perfect. there was something unique about the way she took in our surroundings. she did seem a little nervous, but i could tell she knew more about what was going on than i did.

“i got your letter.”

“you too?”

“you gave it to phil, to send to me.”

“and your name?”

“alex. here, read it…”

she hands me a letter. i read my own writing:

11 wks. completely in love.

 

i looked into her eyes. she reminded me a little of scarlet johannson.

“alright, guys. i still dont know 100% what this is about. phil, heres my phone number. thank you, lets talk later. alex, would you care to join me for indian?”

“how did you know i wanted indian food?”

“your guess is as good as mine.”