Xah's Programing Blog

On programing, languages, functional programing, Unicode, keyboard, hacker culture, ….

Want to master JavaScript in a week? Buy Xah JavaScript Tutorial.

if you stutter in grammar, have a style tumor you can't incise, or in the plight of sufferage of prolixness, follow wordy english for treatment.

in programing languages, statements should be ban'd. Only expression should be allowed. Programing Language Syntax Soup

fingerprint authentication problem
fingerprint authentication problem. With fingerprint, somebody can unlock it while you sleep, or the cops and FBI.

list comprehension, python, semantics & syntax, and the hacker idiocies

Guido wants to remove {lambda, map, reduce} in python. He wants us to use list comprehension exclusively. see Lambda in Python 3000.

if you don't know what list comprehension is, see Python Tutorial: List Comprehension

list comprehension is no good. see Computer Language Design: What's List Comprehension and Why is It Harmful?

still, the python hacker idts defend it by “its faster”. In which, python compiler idcy comes forward to defend python language idcy, like a snake eating its tail.

however, there's one important semantic advantage of list comprehension. That is, using expressions to build complicated list. The advantage is seen especially with multiple variables. This would be nested map, which is cumbersome. This is also why, Mathematica has the Table[] construct http://reference.wolfram.com/language/ref/Table.html, which is a functional form of list comprehension. (in Common Lisp, the analogous is its loop. However, only Mathematica's syntax is functional. Python and Common Lisp loop syntax are imperative warts on drugs.)

by the way, idts will start to talk about list comprehension as analogous to math's set comprehension and stuff. U no unstand.

math's set comprehension is a idiocy, first of all. see:

or Google search for “calculational proof” by Dijkstra or others, or “calculational math”.

secondly, list comprehension has nothing to do with math's set notation, unless you are talking about purely declarative functional languages or proof system language that actually have some form of comprehension, such as coq or HOL, see:

by the way also, “list comprehension” is one of those fuzzy thing. Any lang that does loop with a non-“for loop” syntax is likely be seen as “list comprehension”. So, on pages such as Wikipedia, you have one hundred languages all trying to demo its list comprehension. Like, “regardless how idtc i am, also ran is my very advanced feature the list comprehension, witness.”.

linux tip: change display resolution, orientation, by command line

you can use the command xrandr to control display resolution, orientation, etc. See man xrandr. (warning: i haven't tried. Use at your own risk.)

thanks to Thomas Funk. see: https://plus.google.com/+XahLee/posts/VQAnaduNVSm

Linux Tutorial: How to Fetch Websites by Command Line? wget, curl, HEAD, GET (updated)

Linus's new keyboard: CM Storm

so, Linus got a new keyboard, and it's Cooler Master Storm.

Cooler Master Storm QuickFire Rapid Keyboard SGK-4000-GKCL1-US
Cooler Master Storm QuickFire Rapid Keyboard

See https://plus.google.com/+XahLee/posts/Tted66P1qy2

you can still buy this classic. IBM Model M keyboard, Unicomp (updated)

this is best for Mac users. Keyboard: Matias Mini Tactile Pro Review (updated)

Keyboard: What's the Difference Between Alt Graph Key, Compose Key, Dead Key? (updated)

Keyboard revolution is here. Introducing, the Axios Keyboard ⌨

programing pains and idiocy: trim whitespace

in emacs, there's a command that trim whitespace. But, wouldn't it be great if when a file is saved, the command auto runs? But then, when working in a team, if you do that, and commit, people will frown upon, as consequences of diff and log all become spurious. Thus, born is various whitespace clean packages, that trim only if the file before edit is whitespace clean, or trim only on the lines you edited.

it's, like, becoming, idioticer and idioticer.

there are several problems here. The core is the most idiotic concept, that code are based on lines of 70 chars or so, which originated from punch cards, and insisted by unix C idiots, and glorified by hacker idiots about style guides and style guide checkers banana.

spurious software complexity that spun out of nowhere. Like, these days, you spend most of the time on the side things of coding. Time to learn the tools, work around the tools, follow new rules due to tools.

Programing Language Syntax Soup

a new index page Computer Keyboard Layouts & Keybinding Tools & Tips ⌨

does linux tiling window really suck? a challenge

a coder i respect highly, Yuri Khan, commented on my article about tiling windows.

i know at least that Yuri is expert at python and JavaScript, and also a master of keyboard config, like myself. He has commented on my blogs for over a year, and that's how i know. Often, i learn something from him, either something technical in a language, or history, Russian programing keyboard or typing issues, etc.

sometimes we disagree. He loves python, i hate python.

anyway, he commented on my tiling windows rant on how he finds it useful. (as a lot hackers do. I despise tiling windows, as i despise most hacker's love, such as the The Idiocy of Happy Hacking Keyboard)

i updated my tiling windows article, to include a alternative workflow, and i challenge anyone to use it for a week, and see if they still find tiling window or workspace useful.

here: Why Tiling Window Manager Sucks (xmonad, ratpoison, dwm, …)

if you don't know how to set the keys, just ask me by leaving a comment there.

you must do this. How to Set Key to Switch to Browser (updated)

another new index page. Computer Keyboard Layouts & Keybinding Design & Analysis ⌨

new index page. Design of Computer Keyboards ⌨. Separated out from Computer Keyboards, Layouts, Hotkeys, Macros, RSI ⌨

new index page: Linux Rants & Ravings, separated out from Xah Linux Tutorial.

What is Gamma in Digital Images

What is High Dynamic Range Image (HDRI)? (updated)

ROCCAT Ryos MK Advanced Mechanical Gaming Keyboard

discovered:

ROCCAT Ryos MK Keyboard
ROCCAT Ryos MK Advanced Mechanical Gaming Keyboard. amazon

ROCCAT is known as a linux friendly brand. The keyboard driver is available for Linux. No need for Microsoft Windows to set the programable keys.

Repeated “the” Typos in Programing Docs

Linux: Compression How-to: tar gzip bzip2 xz 7zip rar zip (minor update)

Should You Type Space After Comma? and Tiny Space Bar on Japanese Keyboards (minor update)

i needed this recently. GNU Privacy Guard (GPG) Tutorial

Command Line Tool to View Comments in Image Files

What's the Difference Between JPEG JFIF EXIF?

Linux: How to Swap Caps Lock & Escape Keys?

Linux: Show X11 Keycode & Keysym ⌨ (on tis own page)

Linux: How to Find Keyboard Scancode of a Key? ⌨ (on its own page)

Keyboard Layouts Fight! Dvorak, Colemak, Workman, NEO, Bépo, … (minor update)

the most powerful shell command. Master it. Linux: Traverse Directory: find, xargs (minor update)

Linux: How to List & Install Font (repost)

Standard Fonts on Linuxes (repost)

Linux Pain: Google Chrome Korean Font Scrunched Up

Linux: Control Sound Level with Command Line (updated)

UtechSmart Venus Mouse

UtechSmart venus mouse
UtechSmart venus mouse. amazon

new addition. See: Best Mouse for Programers: 17 Buttons

the mouse that killed all other mouses

one cheapo mouse, 5 buttons, 1.5 year battery life, $9.97! TeckNet® M002 2.4G Nano Cordless Optical Mouse

Most Popular Page on xahlee.info

the most popular page on my site is JavaScript: Get Elements by ID, Tag, Name, Class, CSS Selector
13.3% visitors are viewing that page. 13k page views in past 30 days.

the second most popular is The Idiocy of Happy Hacking Keyboard 1.2% of page visits. 1.2k page views in past 30 days.

3rd most popular is Unicode Arrows → ⇒ ⇄ ↑ ↩ ⤢ ↱ ↷ ↻ ► ☛ 1.2% of page visits.

4th most popular is Mac OS X: How to Create Keyboard Layout and Keybinding ⌨ 1% of page visits.

comment at https://plus.google.com/+XahLee/posts/acGmeFmEBcU

Chromebook is actually just a Google Chrome browser, that's ALL. The most popular now is this cheap one: Acer c720 chromebook

Verbosity in Tutorials

there's a JavaScript tutorial named 〈Eloquent JavaScript〉 at http://eloquentjavascript.net/ for example, here's chapter 3 on functions, the first 3 paragraphs:

You've seen function values, such as alert, and how to call them. Functions are the bread and butter of JavaScript programming. The concept of wrapping a piece of program in a value has many uses. It is a tool to structure larger programs, to reduce repetition, to associate names with subprograms, and to isolate these subprograms from each other.

The most obvious application of functions is defining new vocabulary. Creating new words in regular, human-language prose is usually bad style. But in programming, it is indispensable.

Typical adult English speakers have some 20,000 words in their vocabulary. Few programming languages come with 20,000 commands built in. And the vocabulary that is available tends to be more precisely defined, and thus less flexible, than in human language. Therefore, we usually have to add some of our own vocabulary to avoid repeating ourselves too much.

a lot tutorials are like that. Not all, but most, filled with hand-holding passages. I always find such tutorial annoying. I like them concise, actually as close to symbolic logic as possible, for example:

but it's very rare to find such style. (disclaimer: i wrote the above)

do you like the verbose type with a guided intro? why or why not?

comment at https://plus.google.com/+XahLee/posts/TfM49gLtHmp

Xah Programing Blog Archive 2014-06

Intro to Linux Window Manager, Desktop Environment (Gnome, KDE, Xfce, xmonad, …) (updated)

Linux: Most Useful Common GUI Apps (on its own page)

Linux: How to Sync X11 Primary Selection & Clipboard? (on its own page)

Linux: Shell Commands for GUI Apps (updated)

if linux xfce, if you scroll mouse wheel while pointer is on a window's title, it'll roll up the window. Very annoying. Here's how to disable that.

# disable mouse wheel scroll rolling up a window when pointer on window title
xfconf-query -c xfwm4 -p /general/mousewheel_rollup -s false

keyboard day today. Updated: Maltron Keyboard Review

Datadesk Smartboard Keyboard Review. One of the best, and cheap!

Keyboards Size Comparison: Maltron, Kinesis, Microsoft Ergonomic

see bottom, for a collection of hand exercise toys for repetitive strain injury. How to Avoid the Emacs Pinky Problem

my JavaScript tutorial is on the 8th page of Google search. First few pages are all big commerical sites with money to burn. Help me move it to top. Share on social networks, or link from your blog. Thank you. Xah JavaScript Tutorial

the idiocy of java interface. What's Interface in Java?

Computing Culture: What's Hacker? (repost)

Ergonomixx Mykey keyboard. Function keys in a circle! Vintage Ergonomic Keyboards

Linux: ImageMagick Command Line Tutorial (old goodie)

new video review. Microsoft Sculpt Ergonomic Keyboard Review

(Knowledge + Love) / Disrespectfulness

another keyboard layout: Coleman!

another keyboard layout: Coleman! it's a mix of Colemak & Workman, and presumably “better”! http://omidnikta.github.io/colman/

see also: Keyboard Layouts Fight! Dvorak, Colemak, Workman, NEO, Bépo, …

xah's rumination extempore, on meta syntax, formal language, and logic

slanted font for variable?

i've now succumbed to the pop. The sample code syntax on my site:「code ‹var›」, now don't have the special brackets. Instead, coloring and italitics are relied on.

Examples:

the convention of italics for var names is historical. It's purely a rendering issue. It helps reading, but doesn't function as formal language. For example, if you use ‹var›, it has formal semantics as part of the text. But the extra brackets is confusing for vast majority of readers.

this mouse, Logitech Wireless Marathon Mouse M705 With 3-year Battery Life , the packaging is $30% of the mouse.

Xah's {Python, Perl, Ruby} Tutorial

now my Xah's {Python, Perl, Ruby} Tutorial is just $14.99. This is a Xah Style tutorial. Meaning, it's example based, practical, concise. No babbling about software engineering, patterns, agile, unit testing, coding style, nor inane holding-hands humor and tale and patting-your-back introduction.

You want to learn the language? If you have the will, you will. And my tutorial helps you in just that. You learn exactly about the language, with warning and notes about practical efficiency & idioms, and links to the official documentation when appropriate. Buy it. Share. Thanks.

change'd my site's “see also” unicode marker from 〔☛ link〕 to 〔➤ link〕. For detail, see: Semantics & Symbols: Examples of Unicode Symbols Usage

New, SVG background. Nice! Netiquette Anthropology: a Tale of Tech Geekers

see also Xah SVG Tutorial

Logitech Trackman Marble Mouse (updated)

A video review of Slimblade vs L-Trac Trackball. See bottom there.

major reorg. all you don't need to know about software engineering

Linux: Virus Scanner for Linux

Complete guide to choosing a mouse. Which one is for you? Computer Mouse, Trackball, Input Devices

Logitech Trackman Marble Mouse (updated)

Past Articles by Date