Xah Programing Blog

Syntactic obsession, imperative despisal, unicode love ♥, hacker hate

Blog Archive

emacs lisp, cmd.exe, PowerShell, pwsh, complexities

the situation of cross-platform powershell

the situation of powershell... the new cross platform one, probably will not be picked up on mac and linux and on windows, most will not move to the pwsh. the most important force is, what's the default. so on windows, default is powershell (not the cross platform pwsh) and on linux and mac, it's bash as default scripting. all installers relies heavily on what's default. so that means, the cross platform powershell, will not become popular anytime soon it can function as better alternative, but as far as shell scripting goes, today there's too many alts, such as any of python ruby perl even deno js and golang, can all function as alt installer scripts. some of them, such as deno js and golang, are even more cross platform.

Great Software for Windows

uninstall gnu find util

choco uninstall findutil

It installs a useless “Code.exe” that gets in the way of VS Code.exe. And the unix find xargs locate updatedb are not useful on Windows . Use PowerShell Get-ChildItem . -Recurse -name -include *html
PowerShell vs Bash

The Microsoft Snip and Sketch app is a pain and the ass. Doesn't support standard key to close window, toggle full screen.

updated. why Microsoft Windows is now my main machine. bottom.
Why I'm Switching from Mac to Windows

since now Microsoft Windows is my main, am diving into PowerShell headstrong

Need is the best way to learn. Since am now on Windows, have picked up pwsh daily, due to need. E.g. Unix find, unzip, replacement. Rsync wget curl to be gone soon. powershell is a properly designed shell, unlike the unix faaks. proper name, proper pipe, syntax, docs.

PowerShell vs Bash

Spaceship Cuneiform 𒁷 Unicode Cuneiform 𒁷

git newline config on Microsoft Windows

git config --global core.autocrlf true
Convert LF to CRLF when check out.
git config --global core.autocrlf input
Convert CRLF to LF when check in.
git config --global core.autocrlf false
Do nothing.

put to index Practical git in 1 Hour

Xah Windows Setup

put into index

how to call a unix command in Windows installed via chocolatey

for some commands, such as the find of gnu fileutils, you have to call it with full path, like this:

C:\ProgramData\chocolatey\bin\find.exe . -name "*jpg"

because some unix commands such as find, it has a cmd.exe command of the same name.

in emacs lisp, you have to use slash instead. C:/ProgramData/chocolatey/bin/find.exe . -name "*jpg"

apparently, imagemagick's command convert is named magick on Microsoft Windows

it's installed at C:\Program Files\ImageMagick-7.0.10-Q16-HDRI

the correct syntax: magick.exe convert -scale 50% x1.png x2.png

See also ImageMagick Tutorial

put into index
pngquant 2021-01-10 RVw2w
pngquant 2021-01-10

User Interface Design: Peepshow Windows

Math vs Programing, What-is vs How-to

demo Mathematica in livestream

soon am going to live demo Mathematica in livestream. lots things. will take me a month to warm up. been some 15 years. gonna demo not just most powerful functional programing, symbolic pattern matching, auto typesetting (beats the hell of TeX) but also veture into crypto, machine learning, neuro network, and interactive 3d graphics

Wolfram Language, Mathematica Wolfram Language, Mathematica

Mathematica is super expensive. but, it beats the hell out of python jupyter sagemath etc by a magnitude. Even just consider it as a super graphing calc as personal tool. it's free with Raspberry Pi. one easy way to explore.

object oriented programing reuse

java oop reuse 2021-01-05 MQzBB
very old, draft article, year 2006. to be part of OOP's Jargons and Complexities

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.

screenshot 2020-12-31 gw8hG
2020-12-31 answer from Scott Bilik
lunarus lunarus on gpu 2020-12-31 ZQFCm
lunarus on gpu 2020-12-31


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

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 2008 2020-12-21 193528 6hQRw
git 2008 2020-12-21.
modern software history


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

review maybe What Character Encoding Do Chinese Sites Use?

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


[A fork() in the road (unix fork considered harmful) By Andrew Baumann Microsoft Research, Jonathan Appavoo Boston University, Orran Krieger Boston University, Timothy Roscoe Eth Zurich. At https://www.microsoft.com/en-us/research/uploads/prod/2019/04/fork-hotos19.pdf ]

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's 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's 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: Compression How-to: tar gzip bzip2 xz 7zip rar zip
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/ ]

Blog Archive

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