Xah Programing Blog Archive 2020-08

repost.

zsh color prompt

finally set my zsh prompt

See also

closure, a wart in coding hipster's brain.

xah challenge: is there a use of closure other than the function with side effect?

massive update of golang tutorial. Golang Tutorial

Jargon: Hash Table, Dictionary, Map, Association List

Between the programing language jargons map vs hash, i think map is winning over. Probably because the word makes more sense than the implementation oriented “hash table”. While pythons “dictionary” jargon, seems too unprofessional.

Linux: Sort Lines
minor update.

git homepage 2008 2020-12-21 VHkFJ
git 2008 2020-12-21.
modern software history

updated.

Python vs Golang

Python is more readable. 0.8 as much code. But 5 times slower. Can't compile. More complex. And more coding error.

python vs golang 2020-12-20 FsXk9
python vs golang 2020-12-20

python code formatter. https://github.com/psf/black

Git pager is annoying

faak git 2020-12-16 zDJ2d
faak git 2020-12-16

to set no paper, see added to Git: Frequently Asked Questions

Pointer and Reference Considered Harmful

Unicode: Unit Symbols ㎜ ㎝ ㎡ ㎥ ㎐

xahlee citations google scholar 2020-12-08 fNNb4
xahlee citations from Google Scholar 2020-12-08

god, spent 4 hours reading stephen wolfram. got so much to say, but don't have time to write about it due to real life duties.

[Where Did Combinators Come From? Hunting the Story of Moses Schönfinkel By Stephen Wolfram. At https://writings.stephenwolfram.com/2020/12/where-did-combinators-come-from-hunting-the-story-of-moses-schonfinkel/ ]

such a spectacular research. and that is almost like every of Wolfram's blog.

And spend 1 hour reading this, haven't finished yet. Spectacular, it is.

[Combinators: A Centennial View By Stephen Wolfram. At https://writings.stephenwolfram.com/2020/12/combinators-a-centennial-view/ ]

and as i've explained it here, gave me inspiration, answered my big questions. [ What is Ontology of Programing Language? ]

it's like that every time i read Wolfram. Inspires me, and also made me sad. daily, i diddle and fight with the idiotic hacker faaks. wasted my life for that.

petty emacs and lisp tutorials.

last 2 hours spend on reading about acting. that's some rl thing. a task.

What is Ontology of Programing Language? major update.

A friend, Hexstream, trying to revive Common Lisp. https://github.com/sponsors/Hexstream

Chess vs Chinese Chess

User Interface Design: Peepshow Windows

Firefox menu 2020-11-16 9SXwD
Firefox menu 2020-11-16 9SXwD

The milen gen UI faak. You can't discover the key shortcuts for copy paste zoom etc. You got more fuzzy nested menus like “More”, needs more work to use. This began with Google, Chrome.

ID System, Number Base vs Number of Digits

xah talk show molochness clojure 2020-11-14 3gDSX
xah talk show molochness clojure 2020-11-14 3gDSX

Guile scheme lisp, is python a lisp?, JetBrain vs Emacs editor, why clojure java. 2019-08-25

[A History of Clojure By Rich Hickey. At https://download.clojure.org/papers/clojure-hopl-iv-final.pdf ]

local copy clojure-hopl-iv-final.pdf

Linux: Extract tar zip gzip lzip bzip2 xz rar
minor update.

comparing QT, GTK, WxWidgets, JavaFX, Electron. [Sad state of cross platform GUI frameworks By Royalsloth. At https://blog.royalsloth.eu/posts/sad-state-of-cross-platform-gui-frameworks/ ]

libreoffice open source 2020-10-29 gdp4P
libreoffice open source 2020-10-29 gdp4P
libreoffice open source 2020-10-29 7k7jf
libreoffice open source 2020-10-29 7k7jf
libreoffice open source 2020-10-29 xMt2f
libreoffice open source 2020-10-29 xMt2f
Microsoft 365 install 2020-10-29 Y85CD
Microsoft 365 install 2020-10-29 Y85CD
Microsoft 365 2020-10-29 JYGFx
Microsoft 365 2020-10-29 JYGFx

Share File from Windows to Mac via wifi

Best Graphing Calculator

NEVER max window. Lol. Max window was designed when monitors are small. Today, max window has basically 1 use. When u really want to see one thing full screen, such as a movie. Or, use it temporarily, usually no more than a minute, in a toggle. To temporarily see long text sans wrap for logical line clarity. Or, when studying unicode or emoji, zoom in super big, then max window to have a view of the whole.

Why Tiling Window Manager Sucks (xmonad, ratpoison, dwm, etc)

the concept of strategy, tactics, style, are emergent phenomenon in chess/go, they do not really exist.

the concept in chess, especially go, such as tactics, strategy, opening, are not mathematically defined, and, are a emergent phenomenon. They, do not directly relate to the win/lose nature of the game.

whey do only only when the game is completely solved in some strong or weak sense.

so, in traditional teaching of those tactics or view of the game state, often, it has mistakes, but we don't know it.

only someone or comp, who always can beat you, THAT, is the BEST teacher, by absolute definition.

though, often we wish such god can 'explain' the moves, but the problem lies, 'explanation' is not part of the game.

in other words, a more mathematical expression of my view, is that, tactics, strategy, of board games, does not truly exist, except in very simple games such as tic tac toe.

here, the words tactics and strategy, takes on the meaning of absolute heuristics that can always lead to win. in other words, optimal move.

and not local optimal, as by greedy algorithm.

in a similar vein, 'style' of play, such as defensive, attacking style, does not really exist. because, there really is just best move. Style arise due to the fact we do not understand the game.

as example, in alpha zero, it has played moves that consider beginner mistakes, no pro go player would play. but, all htese world champions, lost to alpha zero.

same for alpha zero playing against strongest traditional algorithm chess comp 2 years ago. chess comp lost all games.

chess being a less perfect game than go. Most games will result in draw by skilled players.

in go, perhaps one day, when it is completely solved, in weak or strong sense, and we look at the moves, we'll know, that there is only sequence of optimal moves. and the concept of 'style' does not exist.

JavaScript spread operator, its special place in the relation of syntax and semantics

theory of the decade: of the relations of all syntax and their semantics , of a computer language, the javascript spread operator or mathematica's Splice function is special, in that it cannot be defined declaratively.

@jagen a bit hard to explain. and am not sure how to fully express it or if theres actually something. But try to think of redefining the spread operator as a function.

then, try to explain the function or 'define its semantics declaratively as in math'.

another way or context: consider a largely term rewriting system, or symbolic pattern matching, such as Wolfram Lang. (or consider the theoretical def of lang as formal languages). Now, every function or syntax in the lang, can be explained in terms of string replacement. In this case, the splice operator simply removes the outer bracket.

but since most industry lang are not term rewriting system or hard to explain in terms of formal lang, but still, most functions can be explained or declaratively define, in terms of input, output. Now, how to explain the splice operator that way.

another way to put it: the splice operator, or such function, doesn't really have a 'output'.

it is somewhat a in-between step. Unless, we create a new concept, such as something like intangible iterator.

for example in comparison. let's explain the function length(x). It returns the number of element of its argument. So, here, we have a fully independent and declarative explanation/definition of the length function.

remember, the question is not about implementation. NOT about algorithm. The question is specifically that spread operator CANNOT be defined declaratively.

without introducing new concepts or outside of its input.

and therefore, it is special, among the relation of syntax and semantics.

just to give more context or trying to explain what i mean: for example, string functions , can be easily explained declaratively, in terms of its input, and independent of any other complex extraneous concept. Many other functions, such as array/list manipulation functions, too, can be simply explained declaratively via it's input. On the other hand, most actual construct of for-loop, cannot be explained in such a way. it is algorithmic in nature. further, many OOP lang concepts or method or constructs, such as 'new', closure, iterator, cannot be easily explained/defined declaratively. Again, they are algorithmic in nature.

at heart of this discussion, touches on the deep problem of converting algorithm to/from declarative system. A unsolved and i think theoretically undecidable problem, but extremely practical.

Further explanation. One example of algorithmic vs declarative, is GCD, greatest common denominator. we have ancient algorithm, and we have declarative math definition. But, it is not trivial, to convert between them.

and this is why, most programers dunno what they talking about, LITERALLY.

because, theoretically, sometimes it is impossible.

to explain/define algorithm in a declarative way.

and this touches upon Curry-Howard isomorphism.

i find it being special, because it is a operator/function that cannot be explained declaratively.

sans introducing bag of extraneous or complex concepts, or step-by-step things (algorithm)

and as a curious and practical issue for us curious lang lovers for example, suppose we love functional form and don't like operator form much, so, we might want to rewrite our own splice in js as a function. But, we cannot, without actually calling the builtin 3 dots or we have to redefine what array is in JavaScript internal.

the Splice[] in Mathematica has exactly the same issue.

In fact, it is the Splice[] in Mathematica introduced aroud i think 1999, that gave me this thought/problem.

because it cannot be explained 'normally'.

It needs to be explained by diving into internal or such.

Since Mathematica is mostly a term rewriting system, we can simply say its Splice just remove the outer brackets. That goes 1 step, but still, we cannot explain what is the output of such function. Such a function must always be used inside another function.

(and cease to be a function in math or functional programing sense.)

Unless, we introduce a new concept, such as “spliced ‘object’”.

research homework for you :slight_smile: : define a minimal scheme, R4RS, declaratively as a piece of mathematics. All its functions and operators and semantics. Use minimal number of concepts. Nary 1 algorithm.

resort it to a formal language if needs be.

namely, just a set of strings. Nothing else. No cpu, no binary digits, no int, float, 'numbers'.

and nest lambda as church numeral if you need to.

Xah Talk Show 2020-10-03 Dumang Dk6 Keyboard, Idiocy of Typography, emacs, python MapThread

JavaScript coding challenge today. write a python zip https://docs.python.org/3.3/library/functions.html#zip

also, Mathematica has far more advanced MapThread https://reference.wolfram.com/language/ref/MapThread.html

xah thanks runneypo 2020-10-02 x3Ww5
xah thanks runneypo 2020-10-02 Xah Talk Show 2020-09-23 Emacs Lisp Format JavaScript, the Idiocy of Formatting Style Guide

Xah Discord Artwork
major update.

Iosevka font

someone showed me this font today https://typeof.net/Iosevka/

which began my wrath.

Every once in a while, i need to repost this. The complete idiocy of programers with their obsession on font and typography.

actually, if you read Wikipedia Iosevka, it's pretty good.

losevka font is now a fail. I thought it's LOSEVKA, but it is actually IOSEVKA. The fact that it's website uses a version of losevka font that does not distinguish l with I much is a fail. The choice of I for the name's first letter is also a fail. And having a million version of the font is another fail.

Software Skin Cancer

Xah Talk Show vids 2020-09-26 nBKvX
Xah Talk Show vids 2020-09-26

Xah Talk Show 2020-09-23 Emacs Lisp Format JavaScript, the Idiocy of Formatting Style Guide

ditch grep ag ripgrep. Roll your own. (repost) Golang: Find String (grep) Script

Xah Lee YouTube revenue 2019-09-16 to 2020-09-14 DmHr4
Xah Lee YouTube revenue 2019-09-16 to 2020-09-14

1 year, $419.
The $323, 77% of the revenue , is from superchat. thank you guys.
of that, $200 is from a single guy. and now i don't remember his name

Xah Talk Show 2020-09-10 Programing, Philosophy of Too Many Libraries, Algorithmic Mathematical Art

Unicode: APL Symbols ⍋ ⍟ ⍝

New version of ∑ Xah Code is out. Buy it. Over 3 thousand articles on programing language tutorial, math, keyboard. 3.5 giga bytes. If you bought before, email me to get update.

Parallel Programing Problem: asciify-string

Fundamental Problems of Lisp
old popular article.

Unicode: Shavian Alphabet 𐑕
minor update

Encrypt/Decrypt ROT13 Cipher

Xah Talk Show 2020-08-10, emacs, braille, python vs ruby vs perl vs emacs lisp

todo

Unicode: Braille ⠮
now can convert both ways

Unicode Ligature

Unix History 2000, Software
repost

xah lee thank you for your money

i want to thank all my patreons and those who donated.

xah lee patreon 2020-08-01 7pYgj
xah lee patreon 2020-08-01