Xah Programing Blog Archive 2022-01

xahlee YouTube followers 2022-05-27 WhcGq
xahlee YouTube followers 2022-05-27 WhcGq
writing will be 2022-05-27 Q5VYp
starting to hate the “will be” form in tech writing. thinking of changing them, but hundreds to go thru case by case.

split to multi pages

WolframLang ParaPlot 2022-05-13 6qSt
WolframLang ParaPlot 2022-05-13 6qSt
WolframLang ParaPlot 2022-05-13 R7Xb
WolframLang ParaPlot 2022-05-13 R7Xb
WolframLang ParaPlot 2022-05-13 MxM4
WolframLang ParaPlot 2022-05-13 MxM4

Wolfram Language Tutorial

more updates

the incredible windows crap. when u empty trash, then u alt+f4 to close window, this mysterious fuck popus up.

windows empty trash 2022-05-06
windows empty trash 2022-05-06

Clojure: Variable Name Conventions

updates

writing issue, true/false vs boolean

now i wonder, in my lang tutorials, those pages on boolean true/false, should i change the title from true/false to boolean.

true false 4hDg
true false 4hDg

result

major update

me on hackernews. thanks guys. https://news.ycombinator.com/item?id=30976337 (local copy hacker_news_xah_code_2022-04-10.txt )

added a topic box:

let me explain. Xah Master!

functional programing is rather advanced concept, many coders of 5+ year still struggle to understand. Also, as dion says, there's nuances and context. It is not a exact mathematical concept. But let me try!

suppose you have

x = 3
define f() { return x+1}
print(f()) #this calls f
# result is 4

now, this is C C++ bash and most others. (by the way, they are called imperative style/lang or procedural. again, not exact concept, and don't worry about them.)

the problem is, the function depends on the variable x outside of it. That means, if you move the function to other place, or change some code outside the f definition, its behavior changes.

now, here's a functional programing style to do the same:

define f(x) { return x+1}
print(f(3)) #this calls f
# result is 4

this way, the function now is a independent unit. you can move it to different position, or to different file, and it behaves the same.

this is the essence, of “functional programing”. Here, the “function”, take the math sense of function. It takes in a value, return a value. doesn't matter where function is called, or whatever outside of it is changed, it behaves the same. (since in math, it's abstract. function is a general abstract concept, not tied to a position, or a file location.)

updates

updates

syntax highlight js

updated

should i have a single blog, or merge the multiple? e.g. merge js blog, emacs blog, to programing blog, merge arts, music, writing, blogs to a generic non-tech blog?

updated or new.

much update, for phone.

and other updates

updated or new

Web Design: Serif or Sans-Serif?

windows killing the unix Ctrl+d exit habit, 40 years of ancient baggage. good thing.

Windows terminal ctrl d no exit 2022-02-17
Windows terminal ctrl d no exit 2022-02-17

See also: Linux: Terminal Control Sequence Keys

freenode death irc 2022-02-15 N6XX
freenode death irc 2022-02-15 N6XX

great articles

the problem with nim

the problem with nim is that it's niche. I never looked into exactly because of that, and i probably will find it a great lang. But the thing is, for every nim user, there's ten thousand golang users. That is a very critical fact about programing lang, a social fact. For example, i'd highly recommend Scheme lisp otherwise. But scheme lisp stayed forever niche in past 20 years. Never gonna see the light of the day.

certain social factors of a lang can never change. And i think nim is gonna be forever niche, like Scheme Lisp.

golang on the other hand, has the big advantage, of invented by a well known coding god celeb of unix community fame, and from google, and massive backed by the biggest empire on earth, and already deployed massively in mission critical apps.

See also: Why I Love Golang

Apache Rewrites History: Why is it Named Apache?

working on these for past hours

xah html mode 2022-01-30
xah html mode 2022-01-30

Gah. Need a drink, or something. Super complex. Dealing with paths and url. The main problem is this:. Suppose u have a file full path. U want to press a button in ur fav editor, and it becomes a html link. Now, suppose ur domain is xahlee . Info, and the path is ~/web/xahlee_info/x.html. Now theres 2 choices result.

<a href="http://xahlee.info/x.html">

or it can be

<a href="x.html">
<a href="./x.html">
<a href="../x.html">
<a href="../cat/x.html">

Immediately, several problems. Some is about user pref. e.g. Fully qualified url or relative path? And if relative path, relative to parent dir, or relative to web root dir? And there's the ./name.js issue. e.g. For js file link, if it is a js lib, it is required, to have dot slash in front.

Some of these issues, r user preference. So, u might now need a variable to specify that pref. e.g. Http or https? Prefer fully qualified url , or relative link? Relative to parent, or to web root dir? And do u want always begin with ./ or only for js lib link?

Now, suppose u have another domain, say, ergoemacs.org. Now, suppose, on a file in ergoemacs, u paste a path to a file in xahlee.info, and u want to make it a link. Now, obviously, the link cannot use relative path, since they r in diff domain. However, locally, on your local file system, relative links work just fine.

So, now, u have several problems. U need a way, to determine, if a path belongs to a given domain. And u need a function that determines, the path, and the dir the current file is in, are of the same domain. (If so, relative links works, else, need fully qualified url ).

Just the above, needs few days working out. And writing the above, aka the analysis of the problem, came from years of experience working with html.

The other issues are:.

Ok. That pretty much summarize the main issues. Not trivial.

CSS: font-size

Programing Language Design: Why You Need Operators

PowerShell: Toggle Dark Theme 📜

ASCII Characters

PowerShell: Function Inline Doc
new