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. Object Oriented Programing (OOP) 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

Purpose of Logo and Principle of Logo Design

What do you think of people using OOP languages to program in functional style?
Xah Talk Show 2021-04-01 Basics of Wolfram Language. Richard Stallman. Functional Programing in Java Perl Python
Jonathan Blow on category theory 2021-04-02
Jonathan Blow on category theory 2021-04-02

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 lisp 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

set(ref(x),newVal)

or have var stand as symbol by default, and when we want value, we say

val(x)

. 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.

right. 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.

Windows 10 update types 2021-03-15
Windows 10 update types 2021-03-15

Arcade Video Games, 1980s

xah thanks mma stream 2021-03-12
xah thanks mma stream 2021-03-12 [see Xah Talk Show 2021-03-11 demo of Wolfram Language Mathematica]

Google search now seems to suggest time points in videos.

Google search youtube 2021-03-11
Google search youtube 2021-03-11

updated.

and also repost:

finally, download Mathematica.

Wolfram Language download 2021-03-10
Wolfram Language download 2021-03-10
Wolfram Language install 2021-03-10
Wolfram Language install 2021-03-10

first run of Mathematica, after a decade of inactivity

Wolfram Language notebook 2021-03-10
Wolfram Language notebook 2021-03-10

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 Language doc 2021-03-10
Wolfram Language doc 2021-03-10

Wolfram products and pricing are confusing. When in doubt, just buy Mathematica, ignore all others.

Wolfram products 2021-03-10
Wolfram products 2021-03-10

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.

macOS malware hunting 2021-03-10
macOS malware hunting 2021-03-10

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, 2017 to 2021

lisp cons

Death of a Troll, My Memory of Erik Naggum (1965 to 2009)

xahlee why lisp cons 2021-03-06 100649
xahlee why lisp cons 2021-03-06 100649

See also: Fundamental Problems of Lisp

xtodo add the lisp cons to some page

Programing Language and Its Machine major update.

xtodo blog

win32 zabbix virus, found in wikileak's zip file, around 2015

win32 zabbix virus
win32 zabbix virus

Xah Lee Online History

D3.js Visualization, a Quasi Science
repost

Public-Key Cryptography for Beginner
updated

choco whois install fail 2021-02-21
choco whois install fail 2021-02-21. hash not match!

Syntax Soup

Command to Delete EXIF Data in Image Files
minor update.

The Voodoo of Mechanical Sympathy

How to Input Unicode/Emoji
updated

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 charmap 2021-02-16
Windows 10 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.

Windows 10 bitmapped font bn7ww
Windows 10 bitmapped font

major interface violation in discord. it should be radio buttons, not checkboxes.

discord checkbox radio button 2019-10-10 gt4g9
discord checkbox radio button 2019-10-10
xtodo

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 Link Problem, _blank noopener noreferrer

Xah Lee Site Article Count
on its own page

VirtualBox 2021-02-06 053519 VirtualBox 2021-02-06 053538 VirtualBox 2021-02-06 054815
virtual box
Wolfram Language Jupyter 2021-02-06
use Wolfram for Juyter with wolfram engine and wolframScript
Google Group screws newsgroup history 2021-02-09
Google Group screws newsgroup history 2021-02-09

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.

major update.

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

pngquant sucks

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?
added

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
updated

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 Code.exe. And the unix find xargs locate 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"


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 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 Object Oriented Programing (OOP) Jargons and Complexities