Xah Programing Blog Archive 2019-03

Microsoft Ceases JavaScript Tutorial and Reference

apparently Microsoft no longer have a text version of their JavaScript tutorial and reference. It existed for 15+ years. Now defunct. Their reference link now point to mozilla. [http://msdn.microsoft.com/en-us/library/hbxc2t98.aspx]

See also: Examples of Quality Documentation in Computing Industry

original jargon file on bug

Programing Idioms and Style

Why is Array Access Constant Time

Computer Languages Characters Frequency (added haskell)

github: abuse detected

if you search github with JavaScript off, you get abuse detected.

github abuse detection 2019-05-13 nn82f
github abuse detection 2019-05-13

Google Chrome 59 (~2017-07)

chrome now has new dev features.

Press F12, then press Ctrl+Shift+p

And it'll show command menu.

Type “screenshot” to do a screenshot.

The file is saved in your download folder.

take screenshot in Firefox by command line

goto web dev console ⌘ command ⌥ option k

:screenshot --fullpage filename

The file is saved in your download folder.

Firefox removed the Shift+F2 to get to a command line. Removed that feature entirely. Truly annoying. since ~2010, user interface changes unpredictably. The trend began with Google.

2019-04-12 Note, the Developer Toolbar (aka GLCI) feature has been removed around 2019-08. Now, to do a screenshot, use the triple dot showing in the url field.

to take a screenshot in Firefox, press Shift+F2

Xah Talk Show 2019-05-10 mouse, spin wheel, linux, closure, perl, lisp

Golang: Closure

java the trap

java 8 211 license 2019-05-08 g2s4b
java 8 211 license 2019-05-08

Java, the open source farce. From a trap, to rms embracement, to sold soul, to corp struggle.

java 8 211 license 2019-05-08 j8ypd
java 8 211 license 2019-05-08

Java, Sun Microsystems, the crimes of humanity. year 2002. Jargons of Software Industry

Microsoft linux

Microsoft linux 2019-05-08 srk2z
Microsoft linux 2019-05-08

iterator generator abomination

the whole iterable iterator generator generator function in JavaScript is a abomination. In fact, these concepts, are abomination.

see JS: Iterable

Programing Elegance vs Simplicity

Brendan Eich on Fixing JavaScript String Methods Fail on Emoji

Official Java Tutorial on Interface, the Inanity

i wish i had documented how around y2k, at the height of object oriented programing (and OOP based database!), lots idiotic articles about how anything with a hierarchy is OOP.

Optional Function Parameters in Computer Language Docs (the idiocy thereof) (added a new example)

just noticed, unicode does not have the classic Soviet flag with Hammer and Sickle .

Unicode: Flags 🏁

gonna be offline for 2 days.

brave browser just crashed for me for the first time. and i lost 10 old existing tabs. They are my todos, but now i don't know what they are.

maybe that's god's way of telling me, if you don't do now, it's never gonna be done. forget your old todos.

Google Do Evil (new item added)

https://dlive.tv

https://www.minds.com

todo to read http://slade.jnanam.net/

Golang: String, Byte Slice, Rune Slice (more update)

Russ Cox (a dev of golang) wrote a article “generics dilemma” in 2009 https://research.swtch.com/generic Does that fairly capture the situation? and, are there updates?

Unicode UTF8 History, by Rob Pike

Why Tiling Window Manager Sucks (xmonad, ratpoison, dwm, etc)

linux. this article, gracing hackernews, reddit, 4chan again.

Golang: Function (updated)

Google Plus is officially closed down today

here's some old articles about it

With Google Plus gone, a chunk of web history is practically erased. Here's a famous article by Steve Yegge, year 2011 Steve Yegge's Google Platforms Rant . By the way, he quit Google.

remove google plus links 2019-04-03 kxg3g
removed 679 links to Google Plus on my sites

Unicode: Ethiopic

Golang: String (minor update)

The TeX Pestilence: Why TeX/LaTeX Sucks video added.

i won't be adding xah talk show videos here. For additions, see Xah Talk Show 📺

more python 3 update:

Python: Copy Nested List, Shallow/Deep Copy (updated to python 3)

Unicode: Cyrillic Ж, Russian Alphabet

Python: Compress/Decompress Gzip Files (updated to python 3)

more python updates

Python: Convert File Encoding (python 2 and 3)

Python: Count Word Frequency

more python 2 to 3 update. 70% complete.

[Open Source Doesn't Make Money Because It Isn't Designed To Make Money By Ian Bicking. At http://www.ianbicking.org/blog/2019/03/open-source-doesnt-make-money-by-design.html ]

What is Disjoint Union, Sum Type?

more python 2 to 3 updates:

Python: File Path Functions (updated to python 3)

Xah Talk Show 📺

a new index page. starting to collect all the videos i've done.

converting my python tutorial from 2 to 3. going well. 50% complete. here's one article. Python Understanding Sort Python: Sort

todo. old rant. dated 2006 or so. not sure where to put it yet.

Python's “sort” method's optional parameters: “key” and “reverse”

Most of the time, sorting is done for a list of atomic element such as [3,2,4]. This is simply done by myList.sort() without any argument. Other than simple list, sort is frequently used on matrixes (For example, [[2,6],[1,3],[5,4]]). For matrixes, almost always a particular column is used for the basis of ordering. For example, if we want to sort by second column, we do: li.sort(lambda x, y: cmp(x[1],y[1])). Since this is frequently used, Python provides a somewhat shorter syntax for it, by specifying the column used as the ordering “key”.

li=[[2,6],[1,3],[5,4]]
li.sort(key=lambda x:x[1] ) # is equivalent to the following
#li.sort(lambda x, y: cmp(x[1],y[1]))
print li; # prints [[1, 3], [5, 4], [2, 6]]

Because the Python compiler is not very refined, this specialized syntax is algorithmically a order of magnitude faster than the general form lambda x, y: cmp(x[1],y[1]).

That is to say, the programer must now learn 2 syntaxes for the ordering function, one general and one specialized, and he must choose the right one otherwise he will be penalized by a magnitude of slow down. This also means that, in order to make the right choice of the syntax, the programer must known in advance of the nature of the list to be sorted.

Another idiosyncratic provision is the optional “reverse” argument. This parameter is necessary when using the “key” parameter. Normally, when using the order comparison function lambda(x,y), the ascending/descending nature can be changed by simply switching the parameters x and y. But now a single key=lambda(x) can't provide that, thus another optional parameter “reverse” is provided.

The following are equivalent:

Of course, one can reverse a list by the reverse() method for lists. But li.sort(…).reverse() is algorithmically another order of magnitude slower since Python compiler is not smart.

The official doc on Python's sort method is at (bottom): http://python.org/doc/2.4/lib/typesseq-mutable.html

Don Hopkins has put up his famous article The X-Windows Disaster on his blog now. https://donhopkins.medium.com/the-x-windows-disaster-128d398ebd47

todo. remove reference links in js pages, example: JS: Prototype and Inheritance

G H Hardy, a Mathematician's Apology is a old mathematician's rant. here's some info https://en.wikipedia.org/wiki/A_Mathematician's_Apology Hardy is a elite, pompous type of guy. (remind me my youth) He wrote the book when he felt he's done for. It reeks negativity, discouragement, and his pompousness.

The “Patterns Of Software” by Richard P Gabriel guy is a programer (lisp language) and entrepreneur of his rather failed company. It's also kinda a negative, apologetic, tale, and i find bad advertise and no insight. i wrote a review in 1998 http://xahlee.info/comp/bookReviewRichardGabriel.html

come to think of it, these 2 books i dislike for the same reason.

brave browser has a new bug. when you open a new tab and type fast, the first letter you typed got wiped out.

xah blogger history 2019-03-16 h59tc
xah blogger history 2019-03-16

blogger. history. how many dead links are there?

and by next month, there will be another billion link corpses, Google Plus.

the python community is blowing up with things like jupiter spyder numpy scipy numba pandas etc things for machine learning/data science. is there similar for #ruby?

jupiter
A notebook interface
numpy
Lib for doing math matrixes.
scipy
Lib for doing scientific computation. Example: optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing, Ordinary Differential Equations.
numba
Python compiler creating fast code.
pandas
Data manipulation and analysis. Example: numerical tables, time series. (like the lang R)
Spyder
IDE for scientific programming.
IPython
Interactive python interface. (better than python's builtin)
SymPy
Symbolic math

Python 2 and Python 3 Difference (updated)

updated.

todo. from Aaron Hall @aaronchall

Even in batteries-included-Python world, there are external libs you'll be expected to use. requests is one. others include:

Rule of thumb: If Anaconda gives it to you by default, trust it's worth coding with.

python anaconda

installing python anaconda. what a stupid name.

anaconda 2019-03-13 w7r7q
anaconda 2019-03-13

whopping 2.6 gigabytes.

i heard, from friends, this is good python distro. It includes everything. especially for machine learning, math packages, etc. seems good.

after you install anaconda, then you have /Users/xah/anaconda3/bin/python then you can just use that python. ignore everything else. lol this is for those of you dinosaurs like me.

Unicode: Braille ⠮

sgi logo 2683m-s289x217
SGI Logo Visual Illusion

minor update.

Unicode: Korean 한국인

Unicode: Japanese Writing System の

Unicode: Chinese 中文

new, on their own pages

Linux: Convert File Encoding with iconv (minor update)

Unicode: Linear B 𐂂

Designing Data-Intensive Applications

came across this book

[Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems By Martin Kleppmann. At Buy at amazon ]