Xah Programing Blog Archive 2012-04

i got 2 smart programers who asked/questioned me about negative sign in decimal notation of latitude/longitude notation.

ok, here's explanation.

here's the coordinate for San Francisco:

   latitude         longitude
 37°46′45.48″N     122°25′9.12″W

here's the decimal notation: 37.7793 -122.4192

lattitude is like y axis, going from -90° (south pole) to 90° (north pole). 0° is the equator.

In minute second notation, it usually uses “S” (South) for negative, and “N” (North) for positive, instead of positive/negative sign.

longitude, is like x-axis, but going from -180° to +180°. Negative is West (W), positive is East (E). 0° is artificially fixed at Greenwich, England. This line is called prime meridian. (Greenwich is in London) So, basically, any place east of london is positive, west of london is negative.

by convention, the order is latitude, longitude (contrary to math convention, where x is first, y second)

functional programing in perl is like using chopsticks at McDonalds: Best done at home.

random linux notes 2012-04-28

John Carmack Glorifying Functional Programing in 3k Words

John Carmack glorifying functional programing in 3k words

where was he ten years ago?

[see Object Oriented Programing (OOP) Jargons and Complexities]

updated AutoHotkey Example Scripts

updated Windows Keyboard Software Guide

Google Chrome Browser Special URL

Firefox AutoScroll on Linux

To turn on autoscroll feature on Linux, paste about:config in the URL field, then set general.autoScroll to true.

[see Firefox: Set Mouse Wheel Scroll Speed]

svn upgrade error “svn: E155019”

Recently i upgrade all packages in Cygwin. When i did a commit, i got:

svn: E155019: Can't upgrade '/cygdrive/c/Users/h3/ErgoEmacs_Source/ergoemacs/ergoemacs' as it is not a pre-1.7 working copy root, the root is '/cygdrive/c/Users/h3/ErgoEmacs_Source/ergoemacs'

Oh no! Error! My mind is psychologically conditioned to think i'll need to spend a hour or more to fix whatever problem is this. Apparently, svn 1.7 changed its repository metadata format. Luckily, the solution is simple:

Whew, that's not too bad.

[see svn Tutorial]

Why Tiling Window Manager Sucks

How to Use xmonad; xmonad Keybinding

created a new index, of articles on unix command line tutorial/essays. At Xah unix/linux tutorial .

Programing: Design Patterns Your Mom

random linux notes 2012-04-18

Linux: How to Install New Window Manager

Set Bash Shell Prompt to Color

Job Interview Questions for Senior Linux Sys Admins

random linux notes 2012-04

updated Computing: mega vs mibi, kilo vs kibi

updated Internet WIFI Speed Growth Rate

Why I Love PHP

i'll be going against the tide here. True, PHP is quite ugly, way inconsistent, and not as powerful.

But i'll have to say one thing. PHP is, in my opinion, the most useful, the most easy, the most comfortable and pleasurable language i've ever used. (in comparison to Perl, Python, Java, JavaScript DOM scripting.)

Also, i'd say PHP is the language that had the most impact on educating the masses about functional programing. Because, in PHP, everything is a function. Input, Output, that's it. No OOP shit. No currying, lambda jargon, tail recursion, complex mumbo jumbo. Exceedingly simple.

Also, PHP community is the one that lacks fanatics. For example, in Haskell, Scheme, when you ask a question, you get a bunch of garbage about monad, currying, combinator, call-with-continuation, tail recursion, “you doing it wrong!”, “why you want to do that?”, full proselytizations and often wrong info too. Same in Perl, Python. In PHP community, you never get that. Just straight answer.

Also, PHP doc is the best there is. No mumbo-jumbo jargons and shit that wants to make you believe.

Examples of Quality Documentation in Computing Industry

Keyboard Geeking: Backspace or Not Backspace? (Keys for Goto Previous Page in Windows and Linux)

in linux, the Backspace key is not used for goto previous page. For example, in Google Chrome or Firefox. The keys are Alt+ and Ctrl+[.

On Windows, you can use Backspace ⌫. And Shift+Backspace ⌫ for forward.

Xah Analysis: the Windows key is superior. (Sorry tech geekers of the unix faction.)

Reason:

The Backspace is not as logical. It's like, WTF? Backspace is for deleting backward. Especially so when you are posting a comment. The { Alt+, Alt+ } or { Ctrl+[, Ctrl+] } are more logical.

But the Backspace is more convenient, ergonomic, because it is a single key, and a big key.

The operation for “goto previous page” is one of the most needed key. Perhaps in top 5. (among {page up/down, goto file top/bottom, prev/next tab, close tab})

For such frequently needed key, convenient/ergonomic has far more priority than logicality.

Detail at: Keyboard Shortcut vs Launch Buttons .

See also:

aspell sucks: Dismal Vocabulary Size

Array Programing Language: APL, Mathematica

APL and Mathematica can both be categorized into a so-called Array programming language. It basically means, when a operand is a array/list, the operation is automatically mapped into the list. (as opposed to using a explicit “map” in lisp, perl, python.).

Here is APL implementation of normalizing a n-dimentional math vector.

normalize←{⍵÷((+/⍵⋆2)⋆0.5)}

Code by Tom Novelli. APL code can be run here: http://ngn.github.com/apl/web/index.html .

Here is Mathematica:

normalize = Function[#/Sqrt@(Plus@@(#^2))]

For detail, see: Programing Problem: Normalize a Vector of Any Dimension

[see Create TeX / APL Keyboard Layout]

updated: Programing Problem: Normalize a Vector of Any Dimension

Emacs Lisp vs Perl: Validate Local File Links

updated The Bug-Reporting Attitude

Microsoft XP Bug Report Panels

Bjoern Paschen wrote a improved, idiomatic, version of python multi find/replace code we did before. See: Python Problem: String Methods, Functions, Slashes, Backslashes .

updated ImageMagick Tutorial

Math Font, Unicode, Gothic Letters, Double Struck, 𝔄 𝔅 ℭ

updated What Characters Are Not Allowed in File Names?

updated On Unix Filename Characters Problem

updated The Nature of the Unix Philosophy

updated Problems of Symbol Congestion in Computer Languages; ASCII Jam vs Unicode

Python Problem: String Methods, Functions, Slashes, Backslashes

updated: Ergonomic Keyboard Layouts

Ryan Dahl, on History of Node.js 📺

User Interface Design: Peepshow Windows

updated Why You should Not Use the Jargons lisp-1 lisp-2

The Meaning of Lisperati and Emacsen

Lisperati means lispers, lisp coders.

however, i just tried to google it for some definite confirmation. I think i read it in the 1990s from The Jargon File or LISP FAQ in newsgroup.

Strange, didn't find it after 5 min. Not in wikipedia lisp article. Was sure it's in jargon file or Online Free Computing Dictionary. Neither. comp.lang.lisp group search turned out 2 or so results other than lisperati.com (Conrad Barski, the LAND OF LISP book guy and alien lisp logo guy). Tried google group search 1990 to 2000, no result. (am pretty sure it's there, but google group search has been faaked since about 2005)

btw, emacsen is the hacker's jargon for the plural of emacs.

(thanks to Tim Bradshaw and Yuriv Khan for a correction.)

Lisp at JPL, by Ron Garret 📺

ELisp: read-from-minibuffer Propels Deep Questions

Intro to Wolfram Language Pattern Matching for Lisp Programers

updated Best Unicode Fonts for Programer