Xah Programing Blog Archive 2020-08
why is gpu more powerful?
Now, am thinking, gpu is much more powerful than cpu is due to historical reasons, namely, the design baggage of x86. If itanium was successful, today we might not have gpu at all. Does any think so?
Apparently, the answer is No.
zsh color prompt
finally set my zsh prompt
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.
- hash: elisp, perl, ruby.
- dictionary: python.
Linux: Sort Lines
- Python 3: Walk Directory, List Files
- Python 2: Walk Directory, List Files
- Python 2 and Python 3 Difference
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 code formatter. [2020-12-17 https://github.com/psf/black ]
Git pager is annoying
to set no paper, see added to git Frequently Asked Questions
Pointer and Reference Considered Harmful
Unicode: Unit Symbols ㎜ ㎝ ㎡ ㎥ ㎐
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. [2020-11-30 https://github.com/sponsors/Hexstream ]
Chess vs Chinese Chess
UI Design: Peepshow Windows
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
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: untar unzip gunzip unrar etc
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/ ]
- Which Programing Language Has Best Documentation?
- Linux: Bash Manual in Chapters, Using Emacs for Info
- Emacs: Have You Read Emacs Manual?
- Emacs Manual Sucks by Examples
- Problems of Emacs Manual
- Why PDF Sucks
- Why Open Source Documentation is of Low Quality
- Why Python's Documentation Sucks
- Python Doc Problem: os.system
- Reading Programing Language Specs
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.
@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)
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
also, Mathematica has far more advanced MapThread https://reference.wolfram.com/language/ref/MapThread.html
Xah Discord Artwork
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.
- Donald Knuth, Steve Jobs, and the Idiocy of Typography
- The TeX Pestilence: Why TeX/LaTeX Sucks
- The Moronicities of Typography: Hyphen, Dash, Quotation Marks, Apostrophe
- Meaning of Font Size
- Unicode: Punctuations • ✓ ™
- Font Size problem
actually, if you read Wikipedia [ Iosevka ] [ 2020-09-30 https://en.wikipedia.org/wiki/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
ditch grep ag ripgrep. Roll your own. (repost) Golang: Find String (grep) Script
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.
Shavian Alphabet 𐑕
Encrypt/Decrypt ROT13 Cipher
Xah Talk Show 2020-08-10, emacs, braille, python vs ruby vs perl vs emacs lisp
Unicode Braille ⠮
now can convert both ways
Unix History 2000, Software
xah lee thank you for your money
i want to thank all my patreons and those who donated.