Xah Programing Blog

Syntactic obsession, imperative despisal, unicode love ๐Ÿงก, hacker hate.

On RSS (webfeed) and Blogging

revived and updated all my webfeeds for my blogs.

there are 12 of them.

xah webfeeds 2023-12-01
xah webfeeds 2023-12-01

you can find them on xahlee.info and xahlee.org , except on 3 of them, hidden from easy access as filter of the superficial drama seekers.

xah webfeed subscribe 2023-12-01
xah webfeed subscribe 2023-12-01

if you are a blogger, see

Asking ChatGPT to Suggest a Tagline for Web Dev Blog

asking chatgpt to suggest a tagline for my webdev blog. Though, the answers it gave lacks sting and poetic quality.

chatgpt suggest tagline 2023-11-30
chatgpt suggest tagline 2023-11-30

I decided on: โ€œCODING CANCERโ€

xah webdev blog coding cancer 2023-12-01
xah webdev blog coding cancer 2023-12-01
favicon
xah site logo
sum
sum
Microsoft visual cpp error 023-11-15
Microsoft visual cpp error 023-11-15.
msvc redist 2023-11-17 yRBPN
msvc redist 2023-11-17 yRBPN

Microsoft Windows update problem

Microsoft Windows defender ad 2023-11-08 b2Kc
Microsoft Windows defender ad 2023-11-08 b2Kc

.chm file, opened by Microsoftยฎ HTML Help at C:/Windows/hh.exe

now YouTube ads bypass ad blocker ublockOrigin

lambda calculus 2023-10-28 r6v4
lambda calculus 2023-10-28 r6v4
combinator s wolfram 2023-10-28
combinator s wolfram 2023-10-28
combinator 2023-10-28 fVqs
combinator 2023-10-28 fVqs
YouTube adblock 2023-10-20
YouTube adblock 2023-10-20

machine learning to solve polynomial

xah thanks surfing around 2023-10-01 fm3Q
xah thanks surfing around 2023-10-01 fm3Q
xah thanks surfing around 2023-09-25 3tdM
xah thanks surfing around 2023-09-25 3tdM

Aza Raskin

Aza Raskin, not a good person. connection with usa deepstate, and obsession of โ€œhelping humanityโ€, like the rise of Google Empire, and responsible for the downfall of Firefox user interface since about 2010.

Aza Raskin 2023-09-22 182251
Aza Raskin 2023-09-22 182251
Aza Raskin 2023-09-22 193836
Aza Raskin 2023-09-22 193836
Aza Raskin 2023-09-22 202141
Aza Raskin 2023-09-22 202141

WolframLang is back

Mathematica 13.2 2023-09-22
Mathematica 13.2 2023-09-22

hackers, tech geekers, ripgrep

xah discord hacker ripgrep 2023-08-26 1
xah discord hacker ripgrep 2023-08-26 1
xah discord hacker ripgrep 2023-08-26 2
xah discord hacker ripgrep 2023-08-26 2
// extreme js functional programing

// before

for (
  let xkey of xsstr.split(/ +/).reduce(
    (xmap, xstr) =>
      f_map_filter(
        xmap,
        (k, v) => (v.indexOf(xstr) !== -1),
      ),
    UNICODE_DATA_MAP,
  ).keys()
) {
  if (xFoundChars.length <= MAX_RESULT_COUNT) {
    xFoundChars.push(xkey);
  }
}

// after

xFoundChars = [
  ...(xsstr.split(/ +/).reduce(
    (xmap, xstr) =>
      f_map_filter(
        xmap,
        (k, v) => (v.indexOf(xstr) !== -1),
      ),
    UNICODE_DATA_MAP,
  ).keys()),
];

minor update on my 8 years old clojure tutorial. mostly cleaning up formatting, and separate sections into their own pages.

git doc sucks 2023-07-03 b88F
git doc sucks 2023-07-03 b88F
xah lee site file count 2023-06-28 9xrcp
xah lee site file count 2023-06-28 9xrcp
xtodo

Google Deepmind Claims it Discovered Faster Sorting Algorithm

have not updated my webfeed for 2 months. busy. check Xah Programing Blog, posts are there.

xtodo repost
xtodo

for programers. here are few critical article for programing language syntax designers. and if you are a lisp fan or WolframLang fan. you get an in-depth understanding of syntax issues.


repost

Generative Art, Raytracing, Myers-Briggs, Personality Test, Psychology, Lex Fridman Xah Talk Show 2022-11-24 Generative Art, Raytracing, Myers-Briggs, Personality Test, Psychology, Lex Fridman

get sha256 hash of a file

Get-FileHash -Algorithm SHA256 filename

# get sha256 hash of a file
Get-FileHash filename
PowerShell get file hash sha256 2023-05-02
PowerShell get file hash sha256 2023-05-02
xtodo

misc updates

updated.

Programing Exercise: Show Difference of Sorting Unicode Characters by Code Point vs Code Unit

/* unicode exercise.
2023-04-04
come up with example to demonstrate sorting by code unit and code point
*/

const xx = ["๏ฌ","๐Ÿ˜†"];
console.log( xx.sort() )
// [ "๐Ÿ˜†", "๏ฌ" ]

const yy = ["๏ทฝ","๐Ÿ˜†"];
console.log( yy.sort() )
// [ "๐Ÿ˜†", "๏ทฝ" ]

/*

๐Ÿ˜† codepoint 128518
name: SMILING FACE WITH OPEN MOUTH AND TIGHTLY-CLOSED EYES

๏ฌ codepoint 64257
name: LATIN SMALL LIGATURE FI

๏ทฝ
codepoint 65021
name: ARABIC LIGATURE BISMILLAH AR-RAHMAN AR-RAHEEM

*/

JavaScript. the other example to demonstrate sorting by code unit and code point, is bismilla ๏ทฝ . Unicode Arabic ุด Unicode: Arabic ุด

js sort bismilla 2023-04-03 163406
js sort bismilla 2023-04-03 163406

Microsoft Windows snip and sketch problems and shareX

on Microsoft Windows, the screenshot software snip n sketch sucks. it has multiple problems. 10% of time you got error saying app cannot open. does not auto-save. and when you manually save, it takes a whopping second to popup a save dialog. and then with offensive โ€œplease wait while we let ink dryโ€.

shareX been using for 2 years, but also have sundry problems. major problem is that it has a delay when you start to drag a region with touchscreen or drawing tablet. this means, you cannot select a precise region. (workaround is to double click on the starting point then drag) but it's builtin drawing tool also does not support stylus or touchscreen well. also a delay problem, so you cannot use it to write anything. (it's also using jagged bitmap lines.) its user interface is extremely complex and sucks donkey ass, with tiny font you cannot read.

currently trying flameshot. ok, flameshot also got the delay problem. in flameshot, no delay when starting to select a region. great. but when u start to write notes, there's a 0.3 sec delay. e.g. try to write the word โ€œwithโ€ in cursive, the dot and horizontal line for letter t won't appear, unless you wait for a fraction of sec before each stroke. much better than sharex and simpler, but still sucks.

one major problem i found with the elaborate setup i eventually did with sharex and have it launch paint.net is that, after u write something in paint.net, it won't copy result into clipboard. u have to do select all and copy, if u want the screenshot with notes u've written on it, to paste somewhere. this select all and copy, is a major problem when u on a tablet sans keyboard

gosh. some a simple need, no satisfactory solution.

here's a summary. all i want, is do a screenshot, select region of interest, and write some notes on it with touchscreen or drawing tablet, and have the final result auto saved and auto copied to clipboard. all this done on a tablet (Microsoft surface pro 4), sans a keyboard.

actually, Microsoft snip and sketch is the solution. except Microsoft is pretty lousy, that the app fails to start 1 in 20 times or so. and once a month, it completely fail to start, unless u restart windows. but so far, all other complex solutions, seems require more work.

ai bot chats a hogwash.

google bard ai chat xah lee 2023-04-02
google bard ai chat xah lee 2023-04-02

xtodo review/repost

xtodo

Steve Yegge has a new blog

xtodo
xtodo

minor updates and new

xtodo

some old articles.

What is functional programing

Let me give u a quick guide about functional programing. There's an academic definition. Basically, ur code mostly are just function calls. Function here means like mathematical function. The important thing is, no side effects, means, the function's behavior purely depends on its arguments. Same args, same output, always. And this practically means, don't use global vars, etc in ur subroutine. That's the academic def of fp. Which then can get more complex. This is when, u hear currying, first class citizen, monad, referential transparency, and faaks like that.

the above is academic view of functional programing. which often is a math based view.

now, let me give practical view, which is more or less how i began it. the practical view, is that, when you write a subroutine, any lang, you notice, usually it's better if you no use global vars inside it. because that makes your subroutine behavior less predicable, more bug prone, etc.

i notice, it's nice, if you always write your subroutine such that the behavior just depends on the parameters. aka known as no-side effects, or, pure function.

this also makes your subroutine independent, you can move it from code to code. and, once you write subroutines that way, it becomes widely usable across, aka code-reuse.

once you started to write your code this way, in any lang, after a few years, gradually, you'll notice other things you tend to do. e.g. you want the lang to be able to take a subroutine as arg, or output a subroutine. (this is known as function being 'first class' object, academic speak a la scheme lisp)

also now, if most or all your subroutines are side-effect free, that's called referential transparency, academic speak. meaning, you can just move any function to any other place.

once you are used to moving function around, you notice, why not other things, such as if statements. i.e. you want if statement to be expression, e.g. like c's (test ? doTrue : doFalse) so that you can move if expression just like you mave functions about.

and then, why not make for-loop as expression, or any other. basically, you started to want all statement being expressions. this is why, in many functional programing languages, everything are expressions.

The AI Threat, Year 2023

the ai threat 2023-03-16 SxMqX
the ai threat 2023-03-16 SxMqX

File path functions in various langs. You can compare their design.

Short History of Ocaml

xtodo rss

major updates.

Windows terminal wt not found

updated.

reposts and minor updates

updates and repost

misc updates.

added new images

misc minor updates

updated.

updated.

misc updates

how much you make on YouTube

xahlee youtube money 2023-01-05 2D8Bm
xahlee youtube money 2023-01-05 2D8Bm

updated or new

xtodo
xtodo

more js updates. worked in past week.

massive update on my JavaScript tutorial in past week

JavaScript Regex Functions, major rewrite. they are very confusing, badly designed.

some new custom functions

one example of the worst JavaScript function design. Cannot say which is worse, JavaScript or Python. JavaScript: String.prototype.match (tech writing aspect: page rewritten with clarity. compare it to mozilla mdn (i have not looked))

updates

lots JavaScript in depth updates.

xtodo
๐Ÿ”