Xah Programing Blog
Do Programing Languages Need the Concept of Call Stack?
This article, explains Object Oriented Programing concepts in terms of functions. OOP's Jargons and Complexities
This one, shows different programing language have different meaning of “object”. Meaning of Object in Computer Languages
This one, shows the eedeosy of how object oriented programing created side effect concept of “this” and “dispatch”. Polymorphism, Dispatch, and the Tale of Poly-Tinting
- Why Python Lambda is Broken and Can't be Fixed Why Python Lambda is Broken and Can't be Fixed
- it was Hal Abelson said python lambda is broken.
- Abelson didn't claim the reason python lambda being broken is due to python syntax. (I claimed that)
- i claim python lambda is broke due to the layout syntax, because, for good functional programing language, you need lambda that is not crippled. That is, lambda needs to be a proper way of defining any function. Python lambda is a crippled version, more specifically, designed to only be used for short inline functions of half a line length of code.
- i claim, the real, core, gist of the reason Guido do not want to extend python lambda to full function, is due it will “break” the python syntax (see guido's article on that)
- i claim, having a cripple lambda, (and another way to define function fully), the situation, makes python not a good functional programing language. (among other reasons. Such as, its use and encouragement of list comprehension as opposed to functional style of filter/map, and tons of idioms in python 3 design that favor C-like produral constructs and syntax, and removing functional counter-parts.)
Purpose of Logo and Principle of Logo Design
Very well said. It was so in 1990s and still so today.
My recommendation for category theory. Never learn it if you are a programer. If you are a mathematician, maybe. (you probably already know you no want it.) For programer or mathematician, better to learn homotopy type theory.
the usefulness of category theory for programing is even less than the usefulness of Object Oriented Programing (which is little value with massive religion).
saga of updating nvidia driver
Thx to @Ido @Lunarus @Frenzie for help. Here's a bit tip and summary, in case any find useful. Press win+x m, to open device driver manager. Click Display driver, u see this..
U can see version, and click driver detail, and update driver. But they are effectively useless. To find version, u wanna open the ... (wait. Faak. Seems now my window key doesn't work anymore. The driver update fucked it up). Shit. Gonna restart windows now..
amazing. not just win key not work, but clicking on it no work neither. restart now. ok. restarted. fixed. now i continue the nvidia saga :slight_smile:. to find nvidia driver info etc, u wanna start the nvidia control panel. then click the Help menu, system info, u get..
Which gives the “real” version info. Note there are lots versions. The whole thing has a version number, e.g. 457.51. Then, each component, those dll etc, each has a version number. It is one of these component version, that matches the version ireported n the windows device manager driver for nvidia. Then, to update driver, goto nvidia.com site (don't search. Rather just go directly to that url. Cuz if u search, u get random nvidia sites faak). once on nvidia site, click the Drivers, and suffer the insufferable confusion ball of nvadia graphics card model name and pick the one that is your graphics card. And enjoy the confusing “notebook” version faak. If u downloaded the wrong one, suffer thru it, maybe it'll faaakup ur windows and u no longer can see screen. But, after u survive, learn the lesson how Windows is a faaaked up world and be careful to study and find the right nvidia graphics card model number of ur machine and start over. Alternative, u can, like linux eeediots, first spend an hour to stackoverflow to learn how to find what is ur driver or window bits version. Now, once u downloaded the drive, note that it also bundled the nvidia experience faak. U no need it. It's a software that monitors what u do on your comp..
Luckily, now, click the installer, it provides a option, to not install the experience faaak. After about 5 min, ur nvidia driver should be updated. You may notice that your windows all changed size and position magically. But be happy that things r better, u no need restart and ur screen don't go blank. However, now ur Windows key and Windows menu is broken. You need to restart!. After that, if u still see your screen! It's time to pop a champagne and celebrate the successful update!..
Static Typing, Dynamic Typing, Mathematical Typing (Java, Python, Haskell, Lisp, Wolfram Language)
Let me say some about typing in programing lang. Static typing, is a computer engineering byproduct. It is a idiotic but necessary hack, embraced by c c++ java etc all static langs. Just that these people don't understand why it's a engineering byproduct. Now, the strict type checking static type of haskell, ocaml, etc, is of a different nature. They are really not types as a computer byproduct. Rather, they contains the seed of concept, or revolved to the concept, of programing with type theory of math. That is, types such as int float r no longer just needed for the implementation of programing lang to be fast. Rather, var types are used as its own thing, as a feature or approach of a lang, with basis in type theory of math. Now, let me mention another great "type system", which doesn't exist anywhere except Wolfram Lang. Here, var doesn't have types. Value does. (just like many dynamic lang). However, the types are not int float etc, which are byproduct of computer engineering. The types are: precise number, approximate number (machine precision number. Similar to “float” but infinite precision), complex number, string, symbol. That is, the type here capture what's really diff in math, as different type of things.
Xah Talk Show 2021-03-26 Why Wolfram Language is a Artificial Intelligence Language
programers, computer scientists, mathematicians
That's the thing. You need to be a mathematician, say, math major with 3 years of university completed. Then, you know what math is about or math writing. Haskell doc has nothing to do with math the conventional meaning of math whatsoever. Nor has it to do with any faaaaking computer science. But, the problem is, the hacker edeeots, they think they are elite, know stuff, but in fact they know nothing of even theoretical computer science, they just only know how to drivel terminologies like lambda calculus and turing machine and halting problem. They see haskell, they think, wow, this is serious math. Lol. And whenever actual theoretical comp science articles shows up, none of these hacker faaks mention it or wanna read it. For example, lots of Stephen Wolfram's writings. E.g. Recently i posted about his combinator article. It's not just about Wolfram. Basically, any real math stuff of theoretical comp sci, blogs online or whatever, they get no repost. While, any article about unix or lisp macro or haskell hacker news crap, you see a million of these linux idiots citing it and getting excited all discussing it. And let me tell you why that happens. It's not a big deal. But as i get older, i learned and know why: basically, it comes down to diff communities. Programers, in general, are just programers. They r not comp scientists nor mathematicians or anything. They dunno nothing about anything other than coding. This is why, the behave idiotically and says idiotic things about math or theoretical comp sci. (for example, about haskell doc) if you are a mathematician, or look into that community, you see entirely a diff picture. Likewise theoretical comp sci community. Programing, comp sci, math, are related subject of course. But, it matters significantly which camp you are in, which subject you know. There are people who knows all 3. But, that's relatively rare. On the other hand, this applies to mathematicians too. Most mathematicians, knows a faak about programing. They'd hard pressed to explain what is oop or algorithm. And you can see mathematicians drivel when you see them talk about programing langs. (most of them don't, btw, because most mathematicians look down on programing, or even computer oriented proof theory, or even proof systems/theory.)
repost, minor updates
Xah Talk Show 2021-03-21 Wolfram Language Mathematica Demo/Tutorial. Transformation of the Plane
lisp coding style: don't use list, macro, setf
Omg. Crap code became crapier. This is crap:
(setf (nth 2 modifier) (not (nth 2 modifier)))
This is craper:
(defmacro not! (place) `(setf ,place (not ,place)))
this is easier to understand and faster:
(let ( (modifier [3 4 5 6])) (aset modifier 2 (not (aref modifier 2))))
in coding lisp: one, try to avoid list. use vector instead, unless if you want to keep growing the list. two, do not use setf. and avoid using lisp macros.
the reason to avoid list is explained here Guy Steele Says: Don't Iterate, Recurse, and Get rid of cons!
the reason to avoid setf has to do with perspective of programing language. Using setf is typical C lang like thinking. (the nerd hacker faaak) Using setq is more like math thinking, or API thinking.
Catze says: How do generalised places promote C-like thinking?
first, consider this in just about any lang:
x = 3 vs say
x + 1
now, the x there, has 2 diff meanings. In other words, the meaning of a expression depends on where it is placed.
i don't know if there's a term for this, but maybe: context dependent semantical syntax. (diff from content dependent syntax)
it is arguably better, to not have context dependent semantical syntax.
now, skip the why for now. So, if we compare setq or the normal x = 1 in most langs, vs the 'generalized setq', the setf, one sees that, the latter is pushing for the context dependent semantical syntax.
as to why should we prefer context independent semantical syntax, we can compare functional programing vs procedural. In functional programing, every function can be move to any place. It is a unit of independent code. In hacker jargon, another perspective is referential transparency. In the same way, context independent semantical syntax makes expressions as units of independent code.
From the perspective of functional purity I agree, but that wasn't the goal when CL was designed.
now, as to solve this problem of designing a lang with context insensitive expressions, what we can do in x = 1 situation, is something like
or have var stand as symbol by default, and when we want value, we say
. Which design to go depends on the lang.
Вероника Заглотова say: In your opinion, why is math thinking better than C lang thinking (whatever it means), in your opinion?
not necessarily better. but better in long term. C thinking or the typical hacker thinking can be captured as they think of the whole implementation on a physical machine. cpu, ram, etc (cache etc). While math thinking, is considering programing/algorithm's essence. C style hacker thinking has immediate advantages. Namely, fast code, with lots neat tricks/hacks. But long term, it fails. Math thinking, captures the essence of things, and we can address and automate any detail as time goes on.
Catze say: Even Setq breaks the idea of contextless evaluation; the first argument is an unevaluated symbol which differs from normal semantics. It was introduced so programmers didn't have to quote the first argument.
x = 1 exist in just about any lang. But i learned from a guy in discussion, there's a lang i forgot what name, that has this idea, of syntactically distinguishing a var and its value.
btw, lisp was invented, precisely as anti hacker thinking. but by 1990s, the lisp fanatics eeedeeots no unstand. The lispers we see today are just C heads in lisp syntax. That's why they love setf etc.
it's the same type who'd also love C, C++, rust. and anti golang. they wanna hack. Hack is the word.
Jacob L says: so the goal of math thinking would be a higher level of abstraction, which creates less room for error in low level stuff (because you dont need to think about it)?
btw, the syntactical distinction of variable vs its value idea, is common in shell-like langs. Bash, Powershell.
there, a var name x by itself is not value. If you want value, prefix dollar sign $x.
i wouldn't call it "higher level of abstraction". but more precisely, thinking and clarify what's what. Meaning, relations, etc, drill them down to have precise understanding. Throw away anything irrelevant. That's what math is about. In some sense, we say math is about abstraction. But more correct perspective, is that math dice things to understand the gist of things.
once we understand the gist of things, and if they are complex, we may create abstractions, to better organize the understanding. understanding is the main thing.
“Abstraction” is not a goal. “Abstraction” is a word programers like, often abused.
bash, powershell does that. but the lang that guy told me was i think Forth .... probably not forth but something old, and not too obscure. maybe i can find it on my site... ok. i remember it was on twitter i think, or maybe mastodon, around 2018 maybe. or, maybe it Self? Icon?
History of Notebook User Interface
lisp root of Mathematica
PowerShell vs Bash updated
Windows update problems
Windows (feature) update (version 20H2) screwed up some settings. Hover activate window was 0.5 sec and it became something like 0.1 second. [see Windows: Mouse Hover to Activate Window] Mouse pointer size becomes super big. Also, my machine is set to sleep after 30 minutes, now it doesn't.
i hear all sort of bad things from my programer friends about how Windows feature update often screw up things majorly. Better wait for few months.
I also learned that Windows update has several types.
- Feature update → Major update to Microsoft Windows. Often takes a long time. do not install right away. Wait for few months.
- Quality update → bug fixes and security update.
- Driver update
- Definition update → often for viruses checking.
- Other update
Arcade Video Games, 1980s
Google search now seems to suggest time points in videos.
and also repost:
Xah Talk Show 2021-03-11 demo of Wolfram Language Mathematica
finally, download Mathematica.
first run of Mathematica, after a decade of inactivity
By the way, for the graphics feature of Mathematica alone, $300 is worth it. Am gonna start to demo, perhaps in my next livestream. All the most basic features of Mathematica of y2k.
getting familiar with the wolfram doc. apparently, the doc is exactly the same as on the website. e.g. https://reference.wolfram.com/language/#Geometry for each box, you have a list, each is a GUIDE, and the guide lists relevant functions.
Wolfram products and pricing are confusing. When in doubt, just buy Mathematica, ignore all others.
more Wolfram Language
malware hunting on mac
Got notice that a macOS server am helping admin is part of ddos attack. So, i need to find out what's wrong.
malware hunting on mac https://www.sentinelone.com/blog/malware-hunting-macos-practical-guide/
reading. Mathematica version history. starting with version 3, year 1996. https://www.wolfram.com/mathematica/quick-revision-history.html
xahlee info site stat
add to some page or index
Death of a Troll, My Memory of Erik Naggum (1965 to 2009)
See also: Fundamental Problems of Lispadd the lisp cons to some page
Programing Language and Its Machine major update.
Mac and Windows File Conversion
Xah Lee Online History
D3.js Visualization, a Quasi Science
Public-Key Cryptography for Beginner
Linux: Command to View/Delete Metadata in Image Files
The Voodoo of Mechanical Sympathy
How to Input Unicode
Microsoft Windows user interface design: mouse wheel does not always work
Gosh idiotic Microsoft Windows 10. Sometimes your mouse wheel doesn't work. For example, when in charmap.
Windows 10, still have lots old baggage with bitmapped GUI
it's incredible, in Microsoft Windows 10, it's common to see these old gui with bitmapped font.
major interface violation in discord. it should be radio buttons, not checkboxes.
idiotic Microsoft Windows 10, when you use Alt+Escape it hides the previous window. faaking idiotic extreme.
user interface design, to duplicate or not
[on whether site should open link in new window, and nerd opinion being no, let user decide.]
That's what typical nerd thinks, but i think does not fit reality at all. First of all, opening new window has a ton of proper use. For example, help/explain on links in a form, or show big picture, or go to external site (e.g. Done by facebook and twitter or youtube), which is actually appropriate because user often do want remain on the site, or for example on my site, link to amazon. (some of these are today done by in-page popup using js, such as view bigger photo.). But i began to think in past year, that possibly ALL links should open new window, except if it's a single page app. Because this is in fact i think more than 50% of clicks nerds do. It is also easier to manage. Because browsing history has tons of problems, well known. And widely talked about. I did a survey here, most nerds control click to open new window all the time. Also, interesting to note, in china, almost all sites, defaults to opening new links in new window, even links to the site itself. Also, as far as the notion let the user control, it falls flat on its face. Vast majority users (99%), do not even know wtf is a keyboard shortcut, or wtf is a software, or wtf is a browser. This is why, thing migrated to the phone, and also, we see vast UI that duplicate basic browser function such as going to top of page (can be done by just pressing Home). This is not caused by phone btw, it was so 15 years ago. And we see tons of UI widgets that duplicate basic browser function, even in NERD sites created by NERDS.
Frenzie: you mean like font size?.
XahLee: yes exactly. that too.
I think there's a tension in design, on one end is rely on basic functionality and not duplicate things, this side am on. On the other extreme, is to have as much functionality widget on the page or thing itself without any assumption. I think things are following the latter trend in past 20 years. Mac tends to be follow no-duplicate philosophy. Windows follow no-assumption philosophy. That's why the Win10 System Settings has one hundred spider web ways to get to the same panel. And , this no assumption way, apparently creates more massive users. Cuz most users dunno and no want to learn. This applies to programers too, for example, on programing languages or habits, or in areas programers not familiar with such as math or law. You start to prefer things or pages sans any assumption that you knew the basics.
while studying bitcoin. There is a nasty thought. It seems there's a tendency for it to be centralized, by the dealers. In fact, already is. More than 51% r controlled by 1 minter. (and they agreed to spread that). So, this indicate a central flaw, not bitcoin but humanity, like many other things that began decentralized such as internet)
this means, even if bitcoin became the number one money use in 10 years, it may still become centralized. We just have new overlords, instead of central banks or gov.
Another bout of the complexity and tedium of software engineering. How 10 minute job became 4 hours. HTML _blank noopener noreferrer Problem
Xah Lee Site Article Count
on its own page
Death of Newsgroups
Artificial Neural Network is Nasty
Technology, Past and Future
Share File from Android to Windows via BlueTooth
Minor update. Lots more to come in coming months.
best programing language for next 20 years
Starting my road to Mathematica. Been out for about 20 years. here's some random notes.
the best languages to learn today for the next 20 year are: golang, PowerShell, Mathematica.
golang is C++ replacement. Not replacing much now, and that's because momentum and habit. Wait for C++ coders to die, it will. [see Why I Love Golang]
PowerShell or the pwsh, is far better shell than bash and unix bag friends. [see Why I Love Powershell]
Mathematica, is the programing language far beyond any other in the computing industry. A magnitude beyond all existing. It is more than a programing language, because it is really a computational knowledge base. Asides from math functions, such as solving equations or integration symbolically and hundreds other special math functions only a handful mathematician understands, it also embodies just about every practical algorithm in computer science. So, given a algorithm, you might write it in lang X for a hour or days, but Mathematica has it as part of the language, just call a function. Mathematica has few thousand functions builtin, not even needing to load a library.
my Mathematica notes that's 20 years old, mostly done in 1990s. Wolfram Language, Mathematica. Now revising them.
new and updated.
- Windows Script Host
Wolfram Language free! https://writings.stephenwolfram.com/2019/05/launching-today-free-wolfram-engine-for-developers/
Why Windows User Interface Suck
Windows Elevation Prompt Design Problem
Dave Cutler, Windows NT creator.
[WinFS, Integrated/Unified Storage, and Microsoft – Part 1 By Halberenson. At https://hal2020.com/2013/02/14/winfs-integratedunified-storage-and-microsoft-part-1/ ]read
Now been on windows for a month. Still haven't installed linux yet. Seems i no need it. PowerShell does better, replacing unix command bags. Especially unix find grep diff.
Microsoft Windows Sleep
who is behind archive.today
studying archive.today. who's behind it?
This guy. Seems one man operation. Seems a nerd, against big brother, a good guy https://twitter.com/archiveis
crypto money notes
Microsoft Word Shortcuts
Chess vs Chinese Chess
emacs lisp, cmd.exe, PowerShell, pwsh, complexities
git newline config on Microsoft Windows
added to git Frequently Asked Questions
history of unix fanaticism. The most frequently asked question, year 2002. Is Mac OS X Unix? Is Mac OS X Unix
Python: Unicode Tutorial 🐍
One Language to Rule Them All? Or, What Language to Use for Find Replace?
Will the cross-platform PowerShell (aka PowerShell Core) be popular?
The situation of powershell... The new cross platform one
pwsh, probably will not become popular on mac and linux.
And on windows, most will not move to pwsh.
The most critical force of popularity for shell is default availability.
So on windows, default is PowerShell (not the cross platform pwsh),
and on linux and mac, it's bash for scripting.
All installers rely heavily on default availability.
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
Windows, uninstall gnu find util
choco info findutil
The findutil installs a useless
Code.exe that gets in the way of VS Code's
And the unix
updatedb are not useful on Windows . Use PowerShell
Get-ChildItem . -Recurse -include *html
see PowerShell vs Bash
Microsoft Snip and Sketch App User Interface Problem
The Microsoft Snip and Sketch app is a pain and the ass. Doesn't support standard key to close window such as Ctrl+w , nor F11 toggle full screen.
updated. why Microsoft Windows is now my main machine. bottom.
Why I'm Switching from Mac to Windows
Spaceship Cuneiform 𒁷 Unicode Cuneiform 𒁷
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 convert ...
magick identify ...
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.