Xah Programing Blog Archive 2024-06
- ImageMagick Tutorial major update.
- ImageMagick is a command line tool to process images. it can convert, resize, crop, rotate, flip, change color, etc.
The Ills of Iterators, Generators, Iterable
- In programing language, iterators, generators, iterable, should be ban'd.
- They screw the fundamental concept of math function.
- They are not functions. They are state machine tricks, a side effect of computer engineering, like int float double long and references.
- I think SICP, racket scheme lisp, and haskell are idiotic in seeding that thought.
- Not only screw function concept, but also make things very complex.
- By the way, which lang first implemented the lazy list specifically?
- And what was the history of iterators, generators, iterable, their specific meaning at the time, in what lang?
- Need to do research on this.
how to find out which shell am on
echo $0
- on this, i think it has to do with a particular lang design.
- that is, restrict flexibility and expressiveness.
- go is designed with that in mind too.
- java, i think actually achieves only one way to do a thing, closest possible, as python wishes and claim to be
- a question i have is, is it possible, to have a lang that's expressive to the extreme, yet given as a fact it's well design, to still have the property that it be suitable in a large team.
- in other words, is expressiveness, somehow, fundamentally in conflict with the property of the lang suitable for large code base and team over decades.
minor update
AI bots showdown: grok vs brave leo ai vs llama
- Have used a lot grok ai in past months.
- Also the brave browser's leo ai.
- And used the llama from deepinfra.
- i must say, grok ai is the best.
- for computer related question as well as general.
- Python, the most doltish language on earth.
- That Guido Van Rossum, is a haughty dunce of the century.
- Wit, the python pop method.
minor updates.
updated.
xx = Table[ f[x,y], {x, 1, 4000}, {y, 1, 4000}]; Dimensions[ xx ] {xtime,yy} = Timing @ RotateLeft[ xx ] Dimensions[ yy ] addOne = Function[{x}, x + 1] addOne[3]
- Computer Science.
- The Reference Concept in programing languages, the most nasty concept.
- A by-product of computer engineering, for efficiency purposes, but creates lots confusion and errors.
lots updates.
updates
<span class="comment-delimiter">(* </span><span class="comment">swapping list items in Wolfram language. no need temp var.</span><span class="comment-delimiter"> *)</span> xlist = {3,4,5} {xlist[[1]], xlist[[2]]} = {xlist[[2]], xlist[[1]]} xlist <span class="comment-delimiter">(* </span><span class="comment">{4, 3, 5}</span><span class="comment-delimiter"> *)</span>
Advent of Code, thoughts
- spent 4 hours on the Advent of Code 2024 day 5, and not done yet
- Xah Talk Show 2024-12-05 Ep602, Wolfram Language, Advent of Code 2024, Day 5
- stuck for the first time.
- working on it, and gonna continue aoc today at noon
- also, aoc is not trivial. got stung quite a few times.
- having done a lot aoc livestream by now.
- learned, should limit to 1 hour. so, as time goes by, increasingly pace speed, try to at least have a solution to part 1, in 1 hour.
- also, don't worry about efficiency or elegance. the aoc no care. it usually takes tremendous time to think about non-naive algo and efficiency for aoc problems. but the time spend on those, usually has no way to show quality. it just care for the answer, a number.
- just try to quickly get the solution. then, later, improve efficiency or diff algo. but usually, once u got a solution, u no longer interested. lol

Computer Science. Advanced. Equality in a Term Rewriting System
I realized why Wolfram language Equal function does not return False even for obvious cases. because, if it become False right away, the expression became inert. leaving the expression as is, allows you to do more term rewriting computation with it.
- Learn Perl in the good old fashioned way.
- Perl, was the most popular scripting language for about 10 years.
- Top 3 most popular language. C, cpp, perl.
- From about 1998 to 2008.
- But ultimately, too much unix voodoo of anti-formality and anti computer science, it died.
- Perl Tutorial
- ancient perl script, new index page
- Perl Scripts Index
new and updates.
Grok bot generated code
Amazingly, this is from grok bot on x.com. It works.

- Dear new followers and the online social network chaos zoomers.
- I write computer language tutorials as my hobby and livelihood, since 1996.
- There are a lot programing language tutorials on the web and videos since about 2015.
- But most are copy-pasta cheapo pen for money.
- They are often super shallow, misleading, or outright incorrect.
- Check out a mathematician style.
- Concreteness, concision, example based, no extraneous jargon, no comp sci pretension, no story telling, no hugging zen dojo ninja no joke.
- you can find it at xahlee . info
YouTube gonna stop Odysee Sync 2024
- from odysee.
- youtube may be banning sync anytime soon.
- so now, if you do livestream, u need to also record a local copy, then upload.

- xah lee odysee
- https://odysee.com/@XahLee:b
minor updates
- Xah Talk Show Ep590
- C lang and C plus plus and Rust bit diddlers.
- The John Carmack bit diddler, and Lex Fridman deepstate agent.
- Donald Knuth literate programing idolatry.
- and Linus Torvald one million per month vs Code of Conduct.
From 15 years ago. Trying to understand how does Microsoft Windows do system scripting.
By the way, looking back, basically you do not. You just use Windows graphical user interface admin apps. But today, you do, by PowerShell.
mega updates
updates
updates
updates
- 🆕 Python: String Prefix Character (u f r b)
- Python: Quote String
- Python: f-String (Format, Template)
minor update
some old blog, on its own pages now.
- 🆕 Creative domain names, .cx, .io
- 🆕 Programing Language: Self-Reference Problem in String Syntax (2024)
minor updates:
minor updates
minor updates.
removed triple equal sign in examples. it's easier to understand.
updates
updates
minor update
minor update
some old blog, on its own pages now.
major updates
lots updates.
minor updates
what happens when artificial intelligence becomes sentient?
MacOS, where is voice memo stored
xtodomore updates
updates
popular ssh client for Microsoft Windows in the 90s and y2k's.
xtodofuck windows. constantly popping up stuff to interrupt you, including ads. and btw, if u r a linux fanboy, it's worse, by wasting ur time. and far more idiotic ui.

fucking Microsoft Windows, everytime the Windows update kicks in automatically, your computer becomes unusable, even with a fast ssd drive.


updates
updated and many others
updates.
- 🆕 Python: Raw String (r-prefix)
- 🆕 Python: Join String
- 🆕 Python: f-String (Format, Template)
- 🆕 Python: Print with Percent Format String
- 🆕 Python: Triple Quote String
- 🆕 Python: String, Check Case, Char Class
- Python: Format String (Convert to String)
- Python: Print
- Python: Quote String
- Python: String Operations and Methods
- 🆕 Python: Search Substring
- 🆕 Python: Split String
- 🆕 Python: Letter Case Conversion

updates
- Scryer Prolog. recommended by emily e.
- https://www.scryer.pl/
- https://github.com/mthom/scryer-prolog
- John McCarthy LISP, 1960. Recursive Functions of Symbolic Expressions
- History of Lisp, 1960 to 1980
- History. Evolution of Lisp, Guy Steele, Richard Gabriel, 1993
- SRFI 17: Generalized set!
- By Per Bothner.
- https://srfi.schemers.org/srfi-17/srfi-17.html
minor updates and new
- Golang: Array
- Golang: Slice
- Golang: Slice of Slice
- Golang: Append to Slice
- Golang: Cut Slice (Delete Elements)
- Golang: Copy Slice
- Golang: Clear Slice
- Golang: Nested Slice
- Golang: Slice of Strings to String
- Golang: Iterate Array, Map
- Golang: Print Slice, Array
- Golang: String, Byte Slice, Rune Slice
- Golang: Convert Value to String
- Golang: Function as Argument
- Golang: Function Return Function
- Golang: Function
- Golang: Variadic Function
- Golang: Map
- Golang: Walk Dir (old) 👎
- Golang: Pointer
- Golang: Print, Format
- Golang: Print String as Byte, Char, Integer
- Golang: Regular Expression
- Golang: String Backslash Escape
- Golang: String Functions
- Golang: System Call
- Golang: Basic Types
- Golang: Variables
updates.