# Xah Programing Blog Archive 2016-03

Mac, press 【`Fn`+`↓`】 for page down.
It actually sends the same signal as
`Page Down` key.

and

- 【
`Fn`+`←`】 sends`Home` - 【
`Fn`+`→`】 sends`End`

### nice doc = auto code

i imagine one day lang are so well doc'd that coding is simply read the doc and type functions you need together, once! and done.

### Functional Notation vs Operator, Ultimate Superiority

suddenly, am thinking of the ultimate answer to the question of superiority of functional notation vs operator notation once for all

this is because, when i read, John Baez's post here

[Zamolodchikov Tetrahedron Equation By John Baez. At http://blogs.ams.org/visualinsight/2016/03/15/zamolodchikov-tetrahedron-equation/ , Accessed on 2016-03-29 ] (also here, more chatty at: https://plus.google.com/117663015413546257905/posts/QCrdfbbMYhZ )

the article title is daunting, and it immediately talks about 4D space and monoidal category and morphism.

but, actually just ignore those jargons. look at the image of braids. It says:

In other words, we can slide a crossing of two strands under a third strand. In topology this is called the third Reidemeister move, one of three basic ways of changing a picture of a knot without changing the topology of the knot.

now that's the beauty of math. Because, all those equations and symbols, are used only, and necessarily, to capture this simple concepts in a precise and efficient way. In the case here, is braids and movements.

but i digress.

what i personally got a omg moment at this point, is that, notice how he said in the Google Plus post:

My blog article explains it, with pictures. But in simple terms, the idea is this. When you think of the commutative law

xy = yx

as a process rather than an equation,

There! “**consider communicative law as a process!**”

Now, that got me thinking. Because, i have thought about this myself. See:

the Nature of Associative Property of Algebra

in which, i realized the nature of associative law, and in general, the kinda nature of context these laws arise. So, i was thinking now, if thinking of it as a process would give me some more enlightenment.

but immediately, the associative law `(a⊕b)⊕c == a⊕(b⊕c)`

don't have a analogous way as a process to turn it into a braid. You just get 3 staight lines.

i need to think about this some other time. Now I need to do something else.

wait, but back to the title. Why is it some ultimate solution of functional notation vs operator?

you need to read this first: What's Function, What's Operator?

because, notation, and syntax, is my obsession. And, basically, i am suddently prompted at this point to think about whether perhaps there's a way so that one of the notation can be eliminated without picking up disadvantages.

my immediate thought is that, perhaps functional notation can be dropped. Certainly not the other way around, because pure functional notation is too cumbersome (lisp is good example. you can't write math, in lisp). So, perhaps, somehow, operator notation is supreme… well but one immediate problem is that in general operators can only be for binary function. That is, 2 args, on the left and right sides. But, actually we could have match-fix notation. (see match-fix explained here Concepts and Confusions of Prefix, Infix, Postfix and Lisp Notations) But the issue with match fix is that, then we have to have a way to still use function names. That is, we can't device thousands type of brackets. So, in order to still have names, then have XML or lisp-like things… but oh, we back. Ok. Stopping here now.

Python: Class and Object (updated. made it passable. Never worked with python object. New, learned about python supporting multi-inheritance, and the diamond problem.)

TCP/IP Tutorial for Beginner (updated)

### “set value to variable” vs “set variable to value”

which is correct? “set value to variable” vs “set variable to value”

as native speaker, you'd say the first.

Assign a value to a variable is correct. Alternatively, you could say assign a variable a value.

Compare assign and give:

Give a value to a variable vs. give a variable a value

〔from http://english.stackexchange.com/questions/51343/assign-a-variable-to-a-value-or-the-other-way-round 〕

But, there's problem.

when we have `x = 4`

, it's natural that we say give x a value. Or simply, set x to 4, corresponding naturally to `x = 4`

.

Sessions, and Token Based Auth

been a long time i've worked on web app. That's a review about sessions.

exposition on the ridiculousness of Sun Microsystem's official tutorial on java interface, now moved to here: Official Java Tutorial on Interface, the Inanity

What's Interface in Java? new. Now, simple tutorial.

Java Tutorial: Collection, Map. This is especially for Clojure coders who don't know Java. Because clojure doc constantly mention Java stuff.

### Why Clojure is Dense

Marbel Machine, Mechanical Music Box. any programer must see this.

Clojure Leiningen Tutorial (major rewrite)

Clojure: Function Chaining (major rewrite)

Clojure: Destructure Binding (major rewrite)

clojure's binding form is powerful, but with lots of sugar syntax.

clojure the language is fond of sugar syntaxes. It's like, a situation when one is enamored with icons in user interface. Gradually, you have more and more beautiful icons instead of text/menu, and it's all patently obvious to you what they mean. But to outsiders, it's completely incomprehensible. See for example Clojure: Magic Characters ' \ @ ^ # ` ~ .

in Wolfram Language, Mathematica, there's also lots of syntax, but you can press a button in editor to see the StandardForm. Not so in Clojure. Some of them are special form, some are macro, some of them reader macro, same are just by design (namespace, java access syntax, etc).

See also Formal Definition of Systematic Grammar, and On Constructed Languages, Computer Languages, and Their Grammar Complexity

How Java Package Works. Java: Package (major rewrite)

Ask me question on patreon