Xah Programing Blog Archive 2016-07

[The piracy paradox at Udemy By Troy Hunt. At https://www.troyhunt.com/the-piracy-paradox-at-udemy/ , accessed on 2016-08-28 ]


hackers in the 1990s, are interested in literature, linguistics, nerd as walking encyclopedia. Today, i don't seem to see much.

Today's coder gone illiterate? or, perhaps social media and too much info made the real nerd hard to find?

doc by dummies, Technical writing at its worst

Revamped index. Collected criticism of computer lang docs.

Xah Python Tutorial Accolade

xah python tutorial praise 2016-08-22
Python: Learn Python in 1 Hour

MiniKanren relational language, name origin

[ MiniKanren ] [ 2016-08-22 https://en.wikipedia.org/wiki/MiniKanren ] relational language. The name “kan ren” came from Japanese 関连, which is Chinese, meaning “relations”. lol

html navigation panel implementation redone

redone navigation panel for all my sites.

2601 files changed.

and the following files created

  1. ./xahlee_info/comp/comp_lang_panel_index.html
  2. ./xahlee_info/comp/unicode_panel_index.html
  3. ./xahlee_info/comp/jargon_panel_index.html
  4. ./xahlee_info/python/python3_panel_index.html
  5. ./xahlee_info/golang/golang_panel_index.html
  6. ./xahlee_info/Netiquette_dir/netiquette_anthro_panel_index.html
  7. ./xahlee_info/linux/computer_networking_panel_index.html
  8. ./xahlee_info/linux/linux_misc_panel_index.html
  9. ./xahlee_info/linux/git_panel_index.html
  10. ./xahlee_info/java-a-day/java_panel_index.html
  11. ./xahlee_info/ocaml/ocaml_panel_index.html
  12. ./xahlee_info/UnixResource_dir/writ/netiquette_panel_index.html
  13. ./xahlee_info/UnixResource_dir/writ/anti_hacker_panel_index.html
  14. ./xahlee_info/clojure/clojure_instaparse_panel_index.html
  15. ./xahlee_info/clojure/clojure_panel_index.html
  16. ./xahlee_info/SpecialPlaneCurves_dir/_curves_robert_yates/curves_yates_panel_index.html
  17. ./xahlee_info/SpecialPlaneCurves_dir/curves_panel_index.html
  18. ./xahlee_info/3d/povray_panel_index.html
  19. ./xahlee_info/js/html_panel_index.html
  20. ./xahlee_info/js/svg_panel_index.html
  21. ./xahlee_info/js/js_panel_index.html
  22. ./xahlee_info/js/dom_panel_index.html
  23. ./xahlee_info/js/css_panel_index.html
  24. ./xahlee_info/ruby/ruby_panel_index.html
  25. ./xahlee_info/perl-python/python_panel_index.html
  26. ./xahlee_info/kbd/ergonomic_keyboards_panel_index.html
  27. ./xahlee_info/kbd/keyboard_design_panel_index.html
  28. ./xahlee_info/kbd/keyboard_layout_panel_index.html
  29. ./xahlee_info/kbd/keyboard_history_panel_index.html
  30. ./xahlee_info/kbd/mouse_panel_index.html
  31. ./xahlee_info/kbd/mac_keybinding_panel_index.html
  32. ./xahlee_info/kbd/keyboard_reviews_panel_index.html
  33. ./xahlee_info/kbd/trackball_panel_index.html
  34. ./xahlee_info/kbd/typing_rsi_panel_index.html
  35. ./xahlee_info/parser/parser_panel_index.html
  36. ./xahlee_info/powershell/powershell_panel_index.html
  37. ./xahlee_info/php/php_panel_index.html
  38. ./xahlee_org/sex/sex_panel_index.html
  39. ./ergoemacs_org/emacs/emacs_keys_panel_index.html
  40. ./ergoemacs_org/emacs/elisp_panel_index.html
  41. ./ergoemacs_org/emacs/elisp_command_examples_panel_index.html
  42. ./ergoemacs_org/emacs/emacs_modernization_panel_index.html
  43. ./ergoemacs_org/emacs/emacs_panel_index.html
  44. ./ergoemacs_org/emacs/elisp_script_examples_panel_index.html
  45. ./ergoemacs_org/misc/emacs_misc_panel_index.html
  46. ./xahmusic_org/piano/piano_panel_index.html
  47. ./xahmusic_org/music/chinese_songs_panel_index.html
  48. ./xahmusic_org/music/song_panel_index.html
  49. ./wordyenglish_com/arabian_nights/aladdin/aladdin_panel_index.html
  50. ./wordyenglish_com/arabian_nights/arabian_nights_panel_index.html
  51. ./wordyenglish_com/titus/titus_panel_index.html
  52. ./wordyenglish_com/flatland/flatland_panel_index.html
  53. ./wordyenglish_com/lit/lit_panel_index.html
  54. ./wordyenglish_com/lit/accent_panel_index.html
  55. ./wordyenglish_com/flatland_chinese/flatland_chinese_panel_index.html
  56. ./wordyenglish_com/monkey_king/monkey_king_panel_index.html
  57. ./wordyenglish_com/musing/writing_panel_index.html

For example, goto JavaScript in Depth and look at the side panel.

The change shouldn't be visible to user. It's the implementation that changed, for the side panel.

For those curious, here's the deal.

before, each page contains the whole static html side panel. That is, a list of links is duplicated in every file. The problem is, if you want to change the navigation bar, you have to change every file. You also have to make sure that every file's text is exactly the same. And, if one file happens to have a extra space, that causes problem in your find/replace script when you change the side panel.

now, the new implementation, the nav panel is a file by itself, and is embedded in each page as iframe.

The disadvantage using iframe is that each page now needs to make an extra http request. (but it's cached, good if the nav panel contains several images)

on the whole, i think with iframe is much better. The iframe solves a major issue about navigation panel i had, that is, it's not possible to keep the side panel code identical when articles are in different directories. (and the consequence of that is you cannot use find/replace anymore when you want to change side panel.)

here's a sampling, hope it's interesting.

after Shakespeare [see The Tragedy Of Titus Andronicus by Shakespeare] , Sir Richard Burton's arabian nights is the most fascinating literature and style i've read.

Read one: Story Of King Shahryar And His Brother, page 1

here's a story of The Arabian Nights, where girls fight to suck… The Arabian Nights: 70. ABU AL-ASWAD AND HIS SLAVE-GIRL

and this is the most wondrous scifi. finish in couple hrs, understand 4th dimension.

best short scifi. FLATLAND: A Romance of Many Dimensions

can finish in few hours. You'll understand 4th dimension. It's also a social philosophy, mock history, and a tragedy.

Weird Unicode Math Symbol: DIFFERENCE BETWEEN

Unicode Math Symbols ∑ ∫ π² ∞

Unicode Symbol Become Emoji

Microsoft release PowerShell on Linux and Open Source!

[PowerShell on Linux and Open Source! By Microsoft. At https://blogs.msdn.microsoft.com/powershell/2016/08/18/powershell-on-linux-and-open-source-2/ , accessed on 2016-08-19 ]


for a quick tutorial, see PowerShell Tutorial

pure speculation, but i suspect, any math proof related work/software traditionally done with #ocaml or #haskell can be done with golang easily.

in other words, i don't think there's any critical or foundational stuff in OCaml related to theorem proving.

“Propositions as Types” by Philip Wadler

see also

[Category Theory for the Working Hacker By Philip Wadler. At https://www.infoq.com/presentations/category-theory-propositions-principle?utm_source=twitter&utm_medium=link&utm_campaign=calendar , accessed on 2016-08-19 ]

why random number is critical in encryption?

yesterday i had a question answered that puzzled me for years. thanks to @johnkitchin @bren_fdez

Q: why random number is critical in encryption?

A: because symmetric cypher is used for payload, and the key is a random number.

understand Public-key Cryptography in 5 minutes Understanding Public-Key Cryptography for Beginner

learn Julia in y minutes. https://learnxinyminutes.com/docs/julia/

functional programers and Golang

i've heard a few functional programers in my circle criticize golang. I think it's more like “it's not my clan” type of thing

i've also heard a few functional programers in my circle loving rustlang. I think it's “i don't want golang to win cuz its from skynet”

golang is fantastic. Its spec is shorter than Scheme Lisp now.

the best golang tutorial is https://gobyexample.com/ by @mmcgrana , simple, concrete, by example, no more.

Composable Syntax

line diff and semantic diff

recently there's idea of semantic diff. not line diff. Note that, line diff originates from unix brain damage of line truncation.

actually, the very concept of diff should be ban'd, line or semantic. Am not sure the detail, but a haunch

Jargons of Software Industry

F Sharp's New Logo = Literally Bad Ass

ocaml haskell are not math language, julia is

am beginning to see, ocaml haskell isn't my thing. like C, they are still computer engineer's by-product, not mathematician's thing.

i want a lang that's Wolfram Language in design principle but efficient. A mathematician's lang. I think, Julia is my hope.

what's this math lang i speak of? it's a lang where concepts of computer engineering by-product does not surface in the lang. if so, it's explicit.

are there such lang? yes. APL, Matlab, Wolfram Language, Julia.

whatever relation of ocaml haskell has with math, is only a historical happenstance. As lisp is.

the major concepts of comp engineering by-product are: int float double long reference pointer. They should be ban'd.

one of the most garish by-product of computer engineering in languages is: main()!

you can judge if a computer language is stupid by whether it has the “main”. Surprise of surprise, haskell has it! no wonder.

Do KNOW, that the origin of ocaml is ML, which is from 1973. Ancient. haskell's concepts and demeanors, belongs to the same lineage.

see also A Class of Programing Languages: Math Languages

see also Is Math Important for Programers?

Agile is a cancer that we have to eliminate from the industry. — Erik Meijer

Erik Meijer on Xtreme Programing and Agile

What is Algebraic Data Types?

JuliaCon 2016 (Keynote) | Fortress Features and Lessons Learned | Guy Steele

What is Disjoint Union, Sum Type? (on its own page)

Seymour Papert died, 88. Inventor of non-paren lisp: Logo

Seymour Papert died, 88. Invented “logo”, probably first non-paren lisp. Logo pioneered “turtle graphics”, we see in Scratch and Processing languages today.

I never learned logo, but ~1992 read a lot story about it, fascinated. I was busy doing Mathematica, this Visual Dictionary of Special Plane Curves

particularly interesting about logo is that there's a 3 volumes book 〈Computer Science Logo Style〉 Buy at amazon by Brian Harvey, another lisp pillar.

Brian Harvey is another lisp pillar.

History of OCaml Syntax, and The Next 700 Programming Languages

OCaml Syntax Sucks (heavily expanded, on its own page.)

history of OCaml

http://adam.chlipala.net/mlcomp/ Comparing Objective Caml and Standard ML

how much does the OCaml team care about doc?

ocaml bad tutorial note about semicolon 2016-07-31
OCaml official tutorial, 2 full pages guesswork on ocaml semicolon, then include a correction.

OCAML Official Tutorial Suck (updated)

Functional Programing's Time Has Come

I've been doing FP since 1995, at Wolfram Research. Now, after 20 yrs, it is finally accepted in industry. OCaml, Haskell, are used at Facebook and Google … 😢

Pattern Matching, OCaml, Haskell, vs Wolfram Language

now i'm getting it. OCaml and Haskell's “pattern matching” are just “case” statements, while Wolfram Language pattern matching are actually BNF parser on symbols.

i always knew, that Haskell and OCaml's pattern matching is not the same as Mathematica. Now i know, it's not even in the same league.

discuss at https://plus.google.com/+XahLee/posts/KsqfHJv5wZJ

Linux: Firewall, iptables Tutorial

Computer Network Tutorial

now with navigation panel

Math Notation, Programing Language Syntax, and Thought

how does a modern massive multiplayer online game work?

how a game work? any tutorial recommendation? not interested in exact how-to tutorial nor framework recommendation. But how does it work, in general, explained to a programer.

for example, i know how web site work, all details, from server to client to protocols to lang and framework, database, components, all.

so i want to know how game works, especially understand how modern complex 3D game works. the skeleton, tech.

for example, As far as i know, i know about Tetris or writing a board-game. In Tetris, basically you have a loop… take user input, update screen, something like that. But in more complex games, such as 2D Mario or Donkey Kong… how does it work? and in complex 3D games today, [ The Legend of Zelda: Ocarina of Time ] [ 2016-07-27 https://en.wikipedia.org/wiki/The_Legend_of_Zelda:_Ocarina_of_Time ] , how does it work? the 3d graphics, the scene map, the AI, how it all work?

some one showed me this heavy site, deep dissecting a game engine. May not be exactly what i was looking for, but interesting anyway.

[DOOM3 SOURCE CODE REVIEW: INTRODUCTION (PART 1 OF 6) By Fabien Sanglard. At http://fabiensanglard.net/doom3/index.php , accessed on 2016-07-26 ]


paradox: currying, pointless programing, and referential transparency

just had a epiphany functional programing paradox, on currying, pointless programing, and referential transparency.

in haskell etc, you have currying, which relies on resolving variable in outer scope to work.

then, there's the idea that every function's variable/constants, must be passed thru parameter.

but these two conflicts.

i have yet to resolve it.

Practical Aspect of Expressiveness of a Language

Linux: How to Restart X11

doc by dummies, Technical writing at its worst (now with side nav panel. some are recent.)

Python Documentation Problems (old essays. now with side nav panel)

Jargons of Software Industry (old essays. now with side navigation panel)

History of Programing Languages in 1 Sentence

How Does a Unicode Character Get Mapped to a Glyph in a Font?

[Code-execution vuln resides in code used in cell towers, radios, and basebands. By Dan Goodin. At http://arstechnica.com/security/2016/07/software-flaw-puts-mobile-phones-and-networks-at-risk-of-complete-takeover/ , accessed on 2016-07-20 ]

[2016-07-20 https://github.com/programa-stic/security-advisories/tree/master/ObjSys/CVE-2016-5080 ]

[FLAWS IN WIRELESS MICE AND KEYBOARDS LET HACKERS TYPE ON YOUR PC By Andy Greenberg. At https://www.wired.com/2016/02/flaws-in-wireless-mice-and-keyboards-let-hackers-type-on-your-pc/#slide-1 , accessed on 2016-07-20 ]

Intro to POV-Ray (added navigation panel)

Clojure Instaparse Parser Tutorial (added navigation panel)

what kinda semantics is amendable to static analysis (so can compile fast code)? golang, rust, ocaml, are good to look into

linux desktop progress; creating linux theme = pain

linux i thought, after 2 decades, creating a theme is just parametrized gui tweak. Like, you'd just pick a color for different places, pick different background image for widget's look. but it's not like that at all. It's actually a major pain in the ass.

see this xfwm4 theme how-to at https://wiki.xfce.org/howto/xfwm4_theme

User Interface Design Criterions

Linux: PulseAudio Control Panel Command Line

What Languages to Hate

Of all languages, i have preferences of my own, but mostly, i voice agaist those that are lies by either marketing (example: java) or fashion (perl, now haskell).

have you heard of Teach Yourself Programming in Ten Years By Peter Norvig? that's widely cited, and most unreal article, loved by hackers.

The Condition of Industrial Programers: Learn LISP in 10 Days

but today, even #haskell is passé. It's like, we have a new shiny better-than-haskell language every month.

old articles navigation panel

What Languages to Hate

a decade old newsgroup rants now have side-panel index, for your reading pleasure.

swashbuckling thru all the idiocy of the world

[twitter quibbles]

next 4 hours, ocaml and js. ma like, gonna study myself to death, brace and blast thru all odds.

like, swashbuckling thru all the idiocy of the world and die a martyr.

the incredible crime of unix, is forgotten. new generation knows not an iota.

there's a change in past decade of IT industry, that unix/linux command line art is no longer a thing.

sys admin becomes dev ops, and that's like cloud stuff, and docker and semi python.

sometimes i wonder, aren't there computer scientist research on syntax stuff like those i care about.

i think the answer is yes, but rather considered unimportant and esoteric. To see them, one has to be in the field of parser and compiler.

you know? as in math, there are hundreds of branches and aspects, interest and take comes and go as fashion. Similarly is computer sci topics.

ocaml syntax abuse is dire

wow, ocaml syntax abuse is dire. = is both assignment and equality test, depends on context.

i get the sense that since Meta Language, most functional language syntax derives from it, and are ad hoc garbage, possibly worse than C. e.g. haskell

command line to suspend machine propertly (also lock), for xfce

# command to suspend machine
xfce4-session-logout --suspend