Xah Programing Blog Archive 2016-03

BETWEEN

Unicode: Math Symbols ∑ ∫ π² ∞

starting a dedicated keyboard blog. See

Subscribe Xah keyboard Blog

Subscribe there. I'll not duplicate keyboard stuff here. Thanks.

a dedicated keyboard blog allows me to freely post any keyboard related stuff quickly without dithering.

had a clarity, about designing my JavaScript svg library.

JavaScript Dot Notation, Namespace or Object System?

sigil for my φvariable ξnames

fret about whether i should continue using funky sigil for my variable names. As in:

xd.drawCircle = function (φcontainer, φcenter, φr, φstyle) {
    let ξcir = document.createElementNS("http://www.w3.org/2000/svg", "circle");
    ξcir.setAttribute("cx", φcenter[0]);
    ξcir.setAttribute("cy", φcenter[1]);
    ξcir.setAttribute("r", φr);

    if (φstyle !== undefined) { ( ξcir.setAttribute("style", φstyle)); };

    if ( φcontainer === undefined ) {
        return ξcir;
    } else {
        return φcontainer.appendChild (ξcir);
    };
};

the problem, is people. Other people.

you see, it's like the many english spelling reform. It is sound and good, except, the masses, idiots, will not have it, and is doom'd to failure.

the reason i want to do it is here: Sigil for Variable Names and Variable Naming: English Words Considered Harmful.

but i thought about it more due to the my dilemma of continuing the practice, in JavaScript or any lang other than emacs lisp. I took a walk, talking to myself, for 30 min. Here's some more insights.

the essential good of it, is that it embeds semantic info into syntax. That is, you can tell if a variable is a function parameter, or local variable, or not global, just by its name.

This is in general called sigil. (most popularized by perl, followed by ruby.)

there are other examples of widely accepted practice of embedding semantic info in syntax. For example, in Java and python, class names starts with capital letters. This is a strong convention, everyone follows. It is important, because, classes, variable, methods, have very different semantics. Being able to tell by a glance saves you time or error.

also read, if you are inclined:

but i think am going to stop this geek char sigil practice. My emacs lisp code base are full of it, it's hopeless. For lisp, i probably should push on my way, as lisp is weird already and lisp people are weird. But for my JavaScript code, which there isn't much, am thinking of stopping this φsigil ξthing, while the night is young!

the problem, is that whenever it is exposed and seen by other people, it's a problem. You'll need to do explanations, and you'll win yourself a weirdo badge. And, other consequences. For example, the jslint won't accept names that start with Unicode char.

unless, i keep my code to myself only. Imagine, i, am the greatest coder, couldn't care less what other coder do or say. I just churning out my own code that rules the world. Well, it hasn't happened yet.

Google Plus https://plus.google.com/+XahLee/posts/Ei5eKe8T49i

Ontology of Postfix Notation, Method Chaining, and Unix Pipe

24-hours Watch, 00 Start at Top or Bottom?

new language, Kotlin, from JetBrains. Runs on Java Virtual Machine. Similar to Java, but designed to improve java.

Proliferation of Programing Languages

The Complexity of Java Access Specifiers (oldbie, new home)

Clojure's Ring, Compojure, hiccup, perfect doc!

Clojure's Ring, Compojure, hiccup's docs are SUPERB! all by the same guy. Clear, concrete, + example! a rarity in industry.

by the way, the code are written by the same guy too. The guy is James Reeves, aka [ @weavejester ] https://twitter.com/weavejester. github at https://github.com/weavejester

see also Clojure: Essential Libs for Web App

HTTP Protocol Tutorial (new)

Python: GET Webpage Content

Perl: GET Web Page Content (on its own page)

Clojure: Essential Libs for Web App

Mac, press Fn+ for page down. It actually sends the same signal as PageDown key.

and

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 is Function, What is 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.

List of Keylogging Software

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 3 to x” vs “set x to 3”

The Sad Story of OAuth 2.0 and Open Standards, IETF

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

Java: Interface new. Now, simple tutorial.

Clojure's Popularity, a Tango with Java

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

Iterator, Enumerator, Abstraction Went Wrong

Why Clojure is Dense

clojure Rich Hickey a stateful transducer 2014-09-17
A Stateful Transducer. [image source https://github.com/matthiasn/talk-transcripts/blob/master/Hickey_Rich/Transducers/00.36.36.jpg]

Why Clojure is Dense

Artificial Neural Network is Nasty

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, 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 Grammar Complexity of Conlang and Complang

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

OCAML Official Tutorial Suck