Xah Programing Blog

Syntactic obsession, imperative despisal, unicode ♥, hacker hate

Xah Programing Blog Archive

the story of Ò Ó Ô Õ Ö Ō Ŏ Ő Ɵ Ơ Ǒ Ȍ Ȏ Ȫ Ȭ Ȯ Ȱ Ǫ Ǭ Ø Ǿ Ṍ Ṏ Ṑ Ṓ Ọ Ỏ Ố Ồ Ổ Ỗ Ộ Ớ Ờ Ở Ỡ Ợ

Unicode Latin

Unicode Invert Text Ɐ

Facebook Embedding Tracking Data Inside Photos You Download

transpose matrix in python

aa = [[1, 2, 3], ['a', 'b', 'c']]
bb = [list(col) for col in zip(*aa)]
print(bb)
# [[1, 'a'], [2, 'b'], [3, 'c']]
aa = [ [1, 2, 3], ['a', 'b', 'c'] ]
bb = [[x[i] for x in aa] for i in range(len(aa[0]))]
print(bb)

Unicode IPA æ

bitcoin ₿ key is 34 chars. is there a standard where to split? like every 5 chars or 10?

Why is Array Access Constant Time updated

Bitcoin: A Peer-to-Peer Electronic Cash System

Bitcoin: A Peer-to-Peer Electronic Cash System by Satoshi Nakamoto bitcoin_m4kgn.pdf

Unicode: Greek Alphabet α β γ updated.

Deseret Alphabet 𐐃

Xah Talk Show schedule

ok, finally i have a schedule. Thx to BartholomewJS's incessant prompts. 😇

All time is San Francisco time.

topic is undecided. But basically the subject is going to be any of:

go YouTube xahlee sub + 🔔

Shavian Alphabet 𐑕

math font converter

unicode math font convert 2019-08-15 hw66m
Math Font ℤ

lol, this thread. https://twitter.com/FakeUnicode/status/1029861801507213312

but am thinking, perhaps it's the other way round. 𝔰𝔬𝔣𝔱𝔴𝔞𝔯𝔢 𝔰𝔥𝔬𝔲𝔩𝔡 𝔰𝔲𝔭𝔭𝔬𝔯𝔱 𝔲𝔫𝔦𝔠𝔬𝔡𝔢 𝔪𝔞𝔱𝔥 𝔣𝔬𝔫𝔱. and it's a matter of time.

things evolve. once the 𝔲𝔫𝔦𝔠𝔬𝔡𝔢 𝔪𝔞𝔱𝔥 𝔣𝔬𝔫𝔱 𝔠𝔥𝔞𝔯𝔰 is out of the door, people use it however they like, just like 🤷. Even mathematicians, few would know the difference of ∆ Δ ∂ δ ∑ Σ µ μ.

gitorious.org cert expired. probably a ghost town by now.

Helicopter Rotor

Chinese Prosperity Symbols

🉠 luck 🉡 prosperity 🉢 longevity 🉣 happiness 🉤 marriage 🉥 wealth

added to Unicode Cultural Religious Symbols ☭

Christian Feast Symbols

there is these: 🕃 🕄 , meaning Orthodox typicon symbol for lower rank feast.

also 🕀 🕁 🕂. Apparently, there's Orthodox Church, and has ranking of feasts.

and there is 🕅, meaning Orthodox typicon symbol for difficult sections. Apparently used for bible reading or something.

added to Unicode Cultural Religious Symbols ☭

Om Symbol, in Hinduism and Buddhism

🕉 OM SYMBOL. Meaning Almighty God in Hinduism. See also: Unicode Devanagari अ

and here's a 🕉 Om chant song 六字真言頌 six-syllabled Sanskrit mantra “Om mani padme hum”

here's om in tamil: Unicode Tamil அ

perl6 unicode operators

perl6 unicode 2019-08-09 79fkn
perl6 unicode [source docs.perl6.org]

See also: Unicode in Function Names and Operator Symbol

Python Syntax Soup: x in y

Homotopy Type Theory

that guy, Vladimir Voevodsky, i think spend only few years and invented homotopy type theory. So i think one have a chance getting acquainted with the whole logic/proof/foundation if reading say 2 hours for 4 years. Much thanks to @johncarlosbaez for showing me much math.

Unicode BISMILLAH

added to Unicode Arabic ش

note the word bismillah is in the lyrics of Bohemian Rhapsody Queen ♪ Bohemian Rhapsody

Category Theorists, Do You Speak Formal Logic?

my complaint about category theory: On wikipedia, even graduate level math subjects, are well written with formal definition given. If i persist, i can see myself understand it after days. Not so with category theory.

e.g. Wikipedia category theory page doesn't give proper definition (maybe it's there, but typically hard to tell). Then, category books tend to talk chapters after chapter informally and drag in lots of wishy washy analogies. i lost patience.

xah talk show 2019-08-01 programing languages and their culture. perl python ruby

JavaScript, why there's no "use js2015" pragma to clean up the language?

usa internet speed map

binary, hexadecimal, converter (added a tutorial)

camelCase vs snake_case (updated)

See also: Computer Languages Characters Frequency

Can Lisp Macro Change Lisp Syntax?

Perl Books Survey 2002 (updating some dead links)

Scripting: Higher Level Programming for the 21st Century

programing language where you can copy paste any function anywhere

i really want a language where you can copy paste any function definition in any project and use in another project. doesn't seem to exist. For this to work, the function param must encode any dependency, of global var and libs.

for text processing, golang code is 1.5 or 2 times longer than python

for text processing, golang code is 1.5 or 2 times longer than python. python is about 1.5 times longer than emacs lisp.

elisp is shorter due to elisp designed for text processing. no need to deal with bytes, encoding, opening file, file handle, etc, even backup is just turn on a var. and one has cursor position, buffer etc.

python is shorter than golang due to golang is lower level, and typed. much more declaration, handling low level stuff, byte/string conversion, and notorious golang error checking problem.

See also: Text Processing: Emacs Lisp vs Perl

Unix Pipe as Functional Language (minor update)

JavaScript/DOM String Hell and Symbolic Languages (updated)

LISP, What Does Symbolic Language Mean? (Finished update.)

gnu head heckert gnu
Free Software, Communism, Ideologies, Policies

video of Daniel Friedman. programing language researcher

https://vimeo.com/161794995 that's Daniel Friedman, one of the few experts on programing language design. haven't seen him before. #lisp #scheme

programing lang design is mostly a community of amateurs. Because, it has relatively little practical value and little theoretical value, in contrast to actual coding or math.

Xah Talk 2019-07-19 lisp syntax, sexp, meta-expression, Mathematica, meaning of sugar syntax

racket2 lisp ditching parenthesis

nested heterogenus data in typed lang. Or, important json data to golang.

run into a problem with golang, or typed lang in general. In json, or python ruby perl JavaScript, you can have arbitrary nested map/array. In golang, you can't due to types. you have to declare or create the structure before hand. How's this done? going to look into.

@kerukeion right. but the issue to me seems to be the declaration part. e.g. i was coding a script, in python etc i'd just code the nesting. But in go, seems i need to first think about, design, then declare, the structure first. am now wondering, when importing json, what does go json lib do? gonna look into.

began to read #golang json lib https://golang.org/pkg/encoding/json/ incomprehensible. In python you just python_obj = json.loads(str) in JavaScript you just js_obj = JSON.parse(str) This is interesting issue about typed lang importing structure from dynamic lang.

todo. read about unicode 12

golang tried to have a try

golang tried to have a try https://github.com/golang/go/issues/32437

if golang start to have a try or even the jargon “exception”, i'll stop using golang. i'd rather type if err != nil { panic(err) } every 10 lines.

which programing language is easier to learn?

golang ≿ ruby ≿ php ≿ scheme ≿ python ≿ emacs lisp ≿ JavaScript ≿ java ≿ clojure ≿ perl ≿ ocaml ≿ haskell

which programing language has best doc?

golang ≿ ruby ≿ php ≿ scheme ≿ java ≿ emacs lisp ≿ perl ≿ clojure ≿ python ≿ ocaml ≿ haskell ≿ JavaScript

which programing language is more popular?

java ≿ JavaScript ≿ php ≿ python ≿ ruby ≿ golang ≿ perl ≿ clojure ≿ ocaml ≿ haskell ≿ scheme ≿ emacs lisp

which programing language is more powerful or expressive (but remain readable)? This one is hard to say.

ruby ≿ scheme ≿ python ≿ perl ≿ php ≿ JavaScript ≿ clojure ≿ golang ≿ java ≿ ocaml ≿ haskell ≿ emacs lisp.

by the way, the only way to know and judge a programing language is to actually learn it and code it for say 6 months. Years of reading other people's blogs are useless, unless the gap or nature is big, such as C vs haskell.

todo. to read. https://github.com/golang/go/wiki/SliceTricks

todo

https://twitter.com/xah_lee/status/1149475035733565440

https://hackage.haskell.org/package/pipes-4.3.11/docs/Pipes-Tutorial.html

Proliferation of Computing Languages updated.

in APL, A ⍟ B means Logarithm of B to base A. I think APL's symbolic operators rather idiotic.

APL Symbols Meaning and Code Example

todo. question for haskell coders. Say I need to gen a list of file paths, 50k of them. I can var global mylist; and f(root) to populate it. But if f is pure function we do mylist = f(root), it double memory requirement. How does pure func lang code this?

todo move conicsEtynomogy.txt

fuck emoji

fuck emoji 2019-07-09 hrsxm

Unicode Symbol Become Emoji

Problem of Declarative Animation

Egyptian Hieroglyph 2019-07-05 b4rp3
Egyptian Hieroglyph 𓂀

youtube-dl --update, be careful!

when you use youtube-dl --update you have to be careful. because who knows if author changed or got brought out.

haskell making invalid state not representable by type

gabriel gonzalez error message 2019-07-01 h8nq3
gabriel gonzalez on error message 2019-07-01 https://twitter.com/GabrielG439/status/1145355462537166849

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

todo

greek music notation 2019-06-26 mdk4t
greek music notation 2019-06-26 mdk4t

todo

unicode banum letter phase-e men 2019-06-26 qk2dp
unicode banum letter phase-e men 2019-06-26 qk2dp
unicode linear b garment 2019-06-26 qsk5g
Unicode linear b garment
𐂪 𐂫

Unicode Linear B 𐂂

Indent Free Coding Style

am starting to have a new coding style, indentless style

screenshot 2019-06-24 st895
screenshot 2019-06-24 st895

golang, low level lang, require you to code lots basic functions and for every input type

one thing annoying about go is that you have to write little functions, like print array by line. and you have to write this for each type of array, string, struct. very tedious.

screenshot 2019-06-22 tr76m
screenshot 2019-06-22 tr76m

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(😪+😟+😵 💨 💪 🚗 🏭 🗩 🗪 🗫 🗬 🗭 📈 📉 🗮 🗯 💢 🔥 🤬 💩);

todo look into unicode

PᗣᗧMᗣN

thx to https://twitter.com/Iceland_jack

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 ∑ ∫ π² ∞

screenshot 2019-06-21 hth25
screenshot 2019-06-21 hth25

updated

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.

screenshot 2019-01-04 c0e4a

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

2017-04-23 https://twitter.com/fleontrotsky/status/856217970913271809

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

2017-04-19 https://twitter.com/leifbattermann/status/854592033452945409

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

2017-04-20 https://twitter.com/SegunOlulana/status/855047691692199936

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.

Xah Programing Blog Archive

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