Xah Programing Blog
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
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
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
the correct syntax:
magick.exe convert -scale 50% x1.png x2.png
See also ImageMagick Tutorial
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
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
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 vs Golang
Python is more readable. 0.8 as much code. But 5 times slower. Can't compile. More complex. And more coding error.
review maybe What Character Encoding Do Chinese Sites Use?
python code formatter. https://github.com/psf/black
Git pager is annoying
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 ㎜ ㎝ ㎡ ㎥ ㎐
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
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: Compression How-to: tar gzip bzip2 xz 7zip rar zip
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
If you have a question, put $5 at patreon and message me.