Xah Programing Blog Archive 2021-01
Xah Talk Show 2021-04-24 Lisp and Wolfram Language Syntax Isomorphism and Design
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).
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?
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:
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 traffic
Death of a Troll, My Memory of Erik Naggum (1965 to 2009)
See also: Fundamental Problems of Lispxtodo add the lisp cons to some page
Programing Language and Its Machine major update.
- xtodo review Mac and Windows File Conversion
win32 zabbix virus, found in wikileak's zip file, around 2015
Xah Lee Online History
D3.js Visualization, a Quasi Science
Public-Key Cryptography for Beginner
Command to View/Delete Metadata in Image Files
The Voodoo of Mechanical Sympathy
How to Input Unicode/Emoji
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.
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. Now revising them.
new and updated.
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.
crypto money notes
Microsoft Word Shortcuts
Chess vs Chinese Chess
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
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
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
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"
in emacs lisp, you have to use slash instead.
C:/ProgramData/chocolatey/bin/find.exe . -name "*jpg"
UI 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 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.