Xah Programing Blog Archive 2019-03
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
Programing Language and Its Machine
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
java the trap
Java, the open source farce. From a trap, to rms embracement, to sold soul, to corp struggle.
Java, Sun Microsystems, the crimes of humanity. year 2002. Jargons of Software Industry
iterator generator abomination
Programing Elegance vs Simplicity
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)
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
- The Google Plus Song (humor)
- Nymwars: Google Plus Account Real Name Policy Debate
- Women in Tech: Today's Google Plus Recommendation?
- What Your Google Plus Strategy Should Be?
- Humor: Google Logo Boobs
- Google: DON'T BE EVIL vs DON'T DO EVIL
- The story of Fat Francis (aka Steven Williams, Boogie2988)
- Are Googlers the Minions of Google Marketing?
- Why I'm Removing Tech Blogger Celebrities and Googler on Google Plus
- What Your Google Plus Strategy Should Be?
- Google Evil
- Web Tech Gossip
- The Demise of orkut.com
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.
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 Ж
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 Manipulation (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,y)). 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 ) # is equivalent to the following #li.sort(lambda x, y: cmp(x,y)) 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,y).
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
key=lambda(x) can't provide that, thus another optional
parameter “reverse” is provided.
The following are equivalent:
li.sort(key=lambda x:x, reverse=True )
li.sort(lambda x, y: cmp(x,y), reverse=True)
li.sort(lambda x, y: cmp(y,x))
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):
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
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.
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?
- A notebook interface
- Lib for doing math matrixes.
- Lib for doing scientific computation. Example: optimization, linear algebra, integration, interpolation, special functions, FFT, signal and image processing, Ordinary Differential Equations.
- Python compiler creating fast code.
- Data manipulation and analysis. Example: numerical tables, time series. (like the lang R)
- IDE for scientific programming.
- Interactive python interface. (better than python's builtin)
- Symbolic math
Python 2 and Python 3 Difference (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:
- numpy and scipy
- flask or django
Rule of thumb: If Anaconda gives it to you by default, trust it's worth coding with.
installing python anaconda. what a stupid name.
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 Visual Illusion
Unicode Japanese の
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 ]