Xah Programing Blog Archive 2015-07

What Does Formal Proof Mean?

the word “formal” in formal proof/grammar/lang, is sloppily used. Most people mean “rigorous”. It should mean: in a form of math formulas.

SVG pain. inverted y axes; text default scale is absolute

inverted y axes

the y coordinate is inverted from normal

Solution, attach all your drawing to a group, then apply transformation, like this:

`gp.setAttribute("transform", xd.translate(0, 2*ymin+ywidth) + xd.scale(1,-1) );`

but, the problem is, if you have text, the entire font gets inverted upside down too.

So this means, there isn't simple solution to work with “not invert” y axes. Maybe there's a attribute to make text not invert or something. Still don't have a nice solution.

the inverted y axes is a major pain, because it drains brain when you work with “normal” y-axes, such as in math plots. Either twist your brain, or, you need to remember to attach a transform to every of your drawing primitive. Or, group them and transform.

text default scale is absolute

you can use svg viewBox to specify your drawing's coordinate range. that is, xmin, xmax, ymin, ymax

this makes it convenient. For example, if your app is plotting basic math functions, you can work with coordinate x from -10 to 10, y from -10 to 10. Instead of pixels and whatever is the current width and heigh of view port

but, if you add text in your drawing, such as axies labels, the text default to font size 16px. So, you have to manually figure out what's the scaling from your view box to view port, and rescale all your text elements.

Linux: Set Default App (repost)

researched continuation whole day. it should be ban'd, together with closure.

continuation, is functional programer's version of goto. As such, it is not FP by definition. Similar is closure. #lisp

iterator, the worst shit in langs. It exits in shits like java, python. While function programers are laughing, but continuation, closure, is deeper shit.

closure, continuation, are the roads to Objects of OOP, and then onto complexity spaghetti lala land. #lisp #haskell

closure, continuation, are functional programer idiot's byproduct of computer engineering, similar to imperative's references and pointers.

continuation is like goto, but 100 times worse. Does it actually make things convenient and useful? If so, it's because the lang sucks. #lisp

closure, continuation, are concepts that doesn't exist in algorithm, or, math.

if closure is useful, it's because the language sucks. Same with #lisp macros.

What is Math? when things are stripped down to the minimal essence, it's called math.

JavaScript prototype inheritance system, is inevitably confusing. It's impossible to get a sense of hierarchy. goto comes to mind.

Microsoft Universal Foldable Keyboard is now available. For your phone or tablet.

Firefox extention is usually a XPI file. That is, a file with name ends in “.xpi”.

in the “+Add to Firefox” button, right click to save.

then, rename the “.xpi” file to “.zip”, then unzip it.

Python vs OCaml

Python to OCaml: Retrospective By Thomas Leonard. At http://roscidus.com/blog/blog/2014/06/06/python-to-ocaml-retrospective/ , accessed on 2015-07-14〕

OCaml: What You Gain By Thomas Leonard'S Blog. At http://roscidus.com/blog/blog/2014/02/13/ocaml-what-you-gain/ , accessed on 2015-07-14〕

a new lang. ATS (programming language)

remember in the 1990s, perl claims to make programing fun again? most of these scumbags are dead.

in this day and age, are there coders who don't know 3,4 language?

in 1990s, mastering 4 langs is god. In 2000s, you are super. Today, if you don't know 4 languages, you a idiot.

1990s, 精通4个语言是神。2000s,是厉害。如今，你不会4个语言，你是渣渣。