Xah Programing Blog 2019-06

semi functional languages, JavaScript, golang, for loop problem

when coding in a semi functional language, eg JavaScript or golang, you have the problem of avoiding for loop but can't. In golang u just can't. In js it's more complicated. ① map/forEach etc are loop by spec. ② iterable don't have forEach method unless you convert to array.

See also: Programing Language: Syntactic and Semantic Difference of Map Function

unicode missing emoji version of plain red heart

you have

That's why only some website make them emoji, cuz if in poker context, rendering it as emoji would be wrong. So you have this abominational situation where you need to insert a modifier char to make it emoji.

🖤 U+1F5A4: BLACK HEART ❤ U+2764: HEAVY BLACK HEART ♡ U+2661: WHITE HEART SUIT ♥ U+2665: BLACK HEART SUIT so, completely, comprehensively, confounding! the abomination of unicode.

See Unicode Symbol Become Emoji

question to xah 2019-06-28 k4fzk
question to xah 2019-06-28 k4fzk
unicode linear b garment 2019-06-26 qsk5g
Unicode linear b garment
𐂪 𐂫

Unicode Linear B 𐂂

LISP Infix Syntax Survey

What's Mathematica's Pattern Matching

this is the symbol in unicode that came from Mathematica ⧴ U+29F4: RULE-DELAYED

In Mathematica, there are 2 mechanisms for computation. ① by function. (like other langs) ② rule based syntactic transformation. You define a bunch of transformation rules. Then, when expression is eval'd, it transform by known rules until result don't change.

Mathematica rule transformation, aka pattern matching, is like regex, but on source code instead of string. Or, like parsing and grammar in BNF. Or, think of lisp macro as a primitive example. Note, SYMBOLIC pattern matching is very different in nature from haskell ocaml etc on type.

Unicode Tacks and Turnstiles

Unicode Reference symbols

me = sleep(⏾, 😪, 😴 , 💤, 🛌);
u👷 = goto work(😪+😟+😵 💨 💪 🚗 🏭 🗩 🗪 🗫 🗬 🗭 📈 📉 🗮 🗯 💢 🔥 🤬 💩);

why reference is harmful

with more experience of golang, i find that it's not as high level as perl python ruby lisp bash. kinda middle, between those and C. golang code is some 1.3 times longer than python. Dealing with “references vs copy” is more pronounced.

the concept of “reference”, is truly the worst concept in programing. It is the number 1 source of bugs. I got stung by it in golang since yester. 4 hours spent so far. unable yet to describe what's going on clearly.

things like references, int, float, double, etc, is what i call software engineering side effect; underneath mumble jumble. typically, the gaggle of industrial programers are excited by these. Thus, the current fad of rust.

the problem of references shows up most when you deal things like “slice”/assignment of array/list (or nested) and trying to modify it. Result is one bag of transparent spaghetti.

one obvious way to fix the reference confusion, is to make it always explicit. so, instead of var x = [3,4,5], make it x = ref([3,4,5]). something like that.

This is the reference problem of golang:

var aa = sliceX[:n]
var bb = append(aa, 3)
// sliceX is now modified, it has 3 at pos n. wtf!

to fix the code, one has to start to make copy of things. to fix this in low level langs, am thinking, make ALL ref explicit? so that programer always know which is a copy or not. i understand ref is necessary in low level langs, but the implicit confusion is what i object to.

golang slice append problem. very subtle.

golang append problem 2019-06-17 q8yss
golang append problem 2019-06-17 q8yss

Golang: Slice

Unicode Math Symbols ∑ ∫ π² ∞

updated

unicode look alike chars 2019-06-21 jx73y
unicode look alike chars 2019-06-21 jx73y

Unicode Bullet • Check Mark ✓ Dagger †, Trade Mark ™☙

unicode ocr 2019-06-19 66j2v
unicode ocr 2019-06-19 66j2v

updated

Unicode in Function Names and Operator Symbol

major update

math in JavaScript. doesn't taste good

math in js 2019-06-18 yrzsw
math in JavaScript. doesn't taste good.

this is when you need math langs, e.g. Julia, APL, Mathematica, Matlab. syntax matters.

screw programing langs that do not allow ⊕ in function names. e.g. JavaScript python golang java. those allow includes perl, ruby, emacs lisp, Mathematica.

fsf and open source has become a ideology weapon of big money corps, championed by google apple now Microsoft, with code of conduct. Each programmer is robbed into nothingness. only way to live is work for these corps.

Why I Love Golang

updated

Urbit, Decentralized Server Platform

i wonder how Curtis Yarvin a.k.a. Mencius Moldbug is doing.

i never understood what curtis yarvin is saying. he likes to play with writing with holier than thou tone, but am not sure any understand. i think only yhose who studied political history for few years. also, he's got a thing against Noam Chomsky. what gives?

Curtis Yarvin left urbit https://urbit.org/posts/a-founders-farewell/

intro to urbit https://urbit.org/primer/

“we created urbit to leave internet behind”

the official urbit intro is confusing, even to experienced programmers. wikipedia intro is better https://en.wikipedia.org/wiki/Urbit

Urbit is a decentralized personal server platform. Each person (a programer), runs it on his own machine. This system, replaces centralized cloud servers such as amazon, google. But also, replaces all web apps such as facebook, twitter, slack, etc, whole internet.

Urbit is a decentralized OS, written from scratch since 2002. The OS is called Arvo, written in new functional langs Noon and Nock. Address space based on Ethereum blockchain. Communication is encrypted p2p using UDP.

blogs as history, and nature of dead links

Google Chrome, SPDY Protocol, Browser War II

when you write blogs, you leave a trail of history. This is year 2010. Sometimes, even you forgot what you were talking about.

looking back 10 years ago, Google's tens of sites singing html5/webgl/webworker etc are now dead link. i used to hate dead urls. But now, i realize it's a necessary fact of life. Links living forever (say just 10 years), is not just an ideology, but impossible.

vast majority of websites, serves a commercial purpose. (e.g demo of html5, tutorial of tech now 10 years old, etc.) When that purpose is gone, or the company gone, link becomes dead, and necessarily so.

programing video goes dinosaur

looking back at some videos from 2012, 2013 etc, JavaScript tech talk. lol. millions of programing related videos must've gone dinosaur. this is new. before, only programing text or books, go dinosaur.

new version control system. written in rust https://pijul.org/

unicode box art 2019-06-12 nv9rm
unicode box art 2019-06-12 nv9rm

Unicode Box Art ░ ▒ ▓

git history 2019-06-12 q9cy5
the rise of git, year 2012.

Unicode Phoenician 𐤈

package manager for Microsoft Windows, scoop, chocolatey

seems there are lots new package managers for Microsoft Windows

new nav box

unicode search pot 2019-06-02 4p82h
unicode search pot 2019-06-02 4p82h

Unicode Search ∑ ♥ 😄

some testimonial for my stuff. I need to put them somewhere. put it here for now.

mogakumono xahlee 2019-01-04 c0e4a
mogakumono xahlee 2019-01-04 c0e4a

Just need to say. I love @xah_lee website. Choc full of useful info of useful information.

2017-04-23 twitter fleontrotsky

A lot of content here: http://xahlee.info/index.html Very impressive! By @xah_lee

2017-04-19 twitter leifbattermann

Yep. I'm Nigerian programmer living in Nigeria. I really enjoy your articles on ergonomics, emacs, programming languages etc

2017-04-20 twitter SegunOlulana

unicode lambda is named lamda, no b

unicode lambda lamda 2019-06-01 vpvwz
unicode lambda lamda 2019-06-01 vpvwz

interesting that in unicode, lambda is named lamda. However, there is a char named lambda: ƛ LATIN SMALL LETTER LAMBDA WITH STROKE

see Unicode: Greek Alphabet α β γ

here's interesting things about lambda

greek lambda 2019-06-02 398fk
greek lambda 2019-06-02 398fk

apparently, it's pronunced with b in ancient times.

pronunciation as [laːbdaː] (λάβδα) in Classical Greek times. In Modern Greek the name of the letter, Λάμδα, is pronounced [lamða].

also note, its relation with Latin letter L and Phoenician letter Lamd 𐤋 and the Cyrillic letter El Л л

phoenician 2019-06-02 sc7t3
phoenician 2019-06-02 sc7t3

copy a directory sans .git

this sucks major. there is still no command to copy a dir sans .git. unix cp command can't do neither.

added insult is that golang no have copy dir builtin.

If you have a question, put $5 at patreon and message me.