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.

Internet WIFI Speed Growth Rate

A Class of Computer Languages: Math Lang

A Class of Programing Languages: Math Languages

extreme programing diagram-s263x238
Voodoo of Software Engineering

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.

[see SVG Coordinates, Viewport, viewBox]

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.

Learning Notes on Goto, Continuation, Coroutine

Sugar Syntax: Compiler Level vs User Level

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

JavaScript: Understanding Prototype and Inheritance

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

Logitech G910 Orion Spark Keyboard

abacus

this earphone, AKG K3003i, $1k. Buy it. Buy at amazon

Google Gmail Blocks Mozilla Thunderbird

Linux: How to Install Font, List Fonts

How to Download Source Code of Firefox Addon

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)

golang no exceptions 2015-07-14 13208
golang does not have exceptions. Screenshot from golang FAQ At https://golang.org/doc/faq .

Why I Hate Exceptions

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.

现在这个时代,还有人不精通3,4,个语言吗?

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

Sugar Syntax: Compiler Level vs User Level