MathCurvesSurfacesWallpaper GroupsGallerySoftwarePOV-Ray
ProgramingLinuxPerl PythonHTMLCSSJavaScriptPHPJavaEmacsUnicode ♥
Web Hosting by 1&1

Xah's Programing Blog

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

Computer Language Character Distribution

new. Computer Mouse, Trackball, Input Devices

keyboard design. updated. ErgoEmacs Keyboard

for keyboard freaks. updated. Exotic Ergonomic Keyboards

some intermediate git tips, on its own page: git Frequently Asked Questions

How to set git output non-interactive?

there's no way. Just send it to a file then view that file.

git log > 88888

If you are using emacs, you can place cursor on the file path then call ffap (see: Emacs: Open File Path Under Cursor Fast and Emacs: delete-current-file). Or install “magit” package for git. It's in MELPA repository. See A Guide on Emacs 24 Package System.

How to make git display date in ISO format?

Use --date=iso.

git log --date=iso

See also: git Tutorial

video review of the Truly Ergonomic keyboard. More info at Truly Ergonomic Computer Keyboard Review

Note: for those of you who know me, i got the keyboards free, but my opinion isn't bought, judge for yourself.

video. how i write blogs in emacs

Programing Craft: Intention vs Coolness

lots pictures now. Computer Keyboards, Layouts, Hotkeys, Macros, RSI ⌨

Been using the Truly Ergonomic keyboard for 5 months now. Added my experience here at bottom: Truly Ergonomic Computer Keyboard Review.

updated. Linux: Set Bash Shell Prompt to Color

updated. Python & Perl: Traverse Directory

uploaded several of my file utils in perl to github. https://github.com/xahlee/xahscripts/tree/master/file_util

Perl: General Function for Sorting Matrix

wrote that in 1999, and used it in production back then. In 2006, i wrote a Python version but was incorrect. Going to write a Python version again.

Ruby, JavaScript, versions welcome.

there's a fantastic heart-shaped keyboard. If you haven't seen it already, see at Keyboard Porn to Infinity ⌨ ∞. The guy plans to manufacture it. To keep updated for news, watch his website at http://launch.keyboard.io/

Perl: Sort List, Matrix, Object

Syntax = Most Important Aspect of a Programing Language

the quality of a programing language, can be judged by how much of it can be explained by its syntax alone.

with this criterion, the order are roughly: Mathematica ≻ PHP ≻ Lisp ≻ JavaScript ≻ Ruby? ≻ Perl ≻ Python ≻ Java.

this is also the most important criterion in judging a language.

If you have coded one of {Haskell, ML/OCaml/F#, erlang, Scala, Pascal/Ada, Lua, tcl, APL, SmallTalk, PostScript}, i'd be interested in your opinion on their placement in the above. (you should have coded in the lang for a few years)

new. Python 3: Sort List, Matrix, Object

Programing Language Design: Syntax Sugar Problem: Irregularity vs Convenience

One Thousand Function Keys, Redux

A new function keys keyboard manufacture. See: http://www.access-is.com/custom_keyboards.php

that's nice if you are the master of function keys. See also:

thx to David Rogoff

inspired from emacs lisp doc. Logic Writing Style: the Incongruousness of the Word “Actually”

Linux: Convert HTML to PDF

to convert HTML to PDF on Linux, you can use wkhtmltopdf. It's based on webkit, the web browser engine used by Safari an Google Chrome.

# install
sudo apt-get install wkhtmltopdf
wkhtmltopdf my_resume.html my_resume.pdf

if you just have one single file, you can also use libreoffice.

# install libreoffice
sudo apt-get install libreoffice

Type libreoffice to start it, then, open the HTML file, then use menu 〖File ▸ Export…〗.

updated. Perl & Python: Regex Example

on its own page. Tech Writing and Unix Humor

the Happy Hacking Keyboard, model “professional 2”, don't even have arrow keys. The Idiocy of Happy Hacking Keyboard

found a Chinese site with tons of photos on KBC Poker keyboard. See links at: KBC Poker Keyboard, Ducky Keyboard (thx to cloudsben)

swapping keys.

Unix Shell Util uniq Unicode Bug

updated. Unicode Full-Width Characters

updated. Unicode: Drawing Lines, Boxes, Shapes ┌ ┐ └ ┘ ├ ┤ ┬ ┴ ┼

Functional Programing Meta Language (ML) in Emacs Lisp!

Writing grep/sed in Python, Perl, Emacs Lisp

also updated. Python: Find/Replace by Regex Text Pattern

for a Perl version: Perl: Find/Replace on Multiple Files

emacs lisp version: How to Write grep in Emacs Lisp

want color diff?

sudo apt-get install colordiff

updated. Python: Find/Replace Strings on Multiple Files

updated. Emacs Lisp Mode Syntax Coloring Problem

updated. discovered big chunck of code in emacs lisp using math symbols as function/variable names. Programing Style: Variable Naming: English Words Considered Harmful

Why you need to swap middle/right mouse buttons, and how. Swap Mouse Buttons: Right-Click & Middle-Click

Emacs: new major modes for HTML, CSS, PHP, ELISP, and Lean Emacs LISP Manual

Emacs: project proposal.

Vote which one you want me to work on. Tell your friends please. http://pledgie.com/campaigns/19973

updated. Probably final form for a while. Linux Firewall Tutorial: iptables & netfilter

more update. Some important problems of XML syntax. Refresh page. Nested Syntax Design: XML vs LISP

every now and then, people will ask what's the best keyboard for emacs. I thought i'll start a article dedicated to that. Best Keyboard for Emacs

keyboard station one thousand function keys 2012-08-10
master station: one thousand function keys

detail: Keyboard Master: One Thousand Function Keys

XML Nested Syntax vs Lisp Nested Syntax

updated. New photo. Kinesis Contoured Keyboard Review and RSI

excursion. 2 hands pen-spinning, by yours truely.

2 hands pen spinning.
mark5 heart keyboard jesse 2013-04-19
mark5 heart keyboard jesse . img source ©cc

more fancy keyboards

JavaScript in 3 hours. More massive update. Array manipulation, and others. JavaScript Basics by Example

discovered a keyboard tool, KeyTweak. See: Microsoft Windows: Keyboard Layout and Key Macro Tools

JavaScript Function Constructor

JavaScript Variable Scope: Function Level vs Block Level

JavaScript: How to Create Tooltip/Balloon

spent the whole day improving this JavaScript app for Unicode. Unicode: Arrow Symbols ← → ↑ ↓.

facelift. Netiquette Anthropology: a Story of Tech Geekers

Hacker News hit. https://news.ycombinator.com/item?id=5536134Apache Rewrites History: Why is it Named “Apache”?

article hit Hacker News. https://news.ycombinator.com/item?id=5184907Why Python's Lambda is Broken and Can't be Fixed

updated. Keyboard Hardware Design Flaws

one of my article hit Hacker News. https://news.ycombinator.com/item?id=5517593

What Does it Means When a Programing Language Claims “Whitespace is Insignificant”?

updated. Computer Keyboard: Increase Productivity Using Function Keys

updated. Unicode ASCII Art Collection

for Unicode freaks. Allograph

updated. Keyboard Shortcut Design: Repeatable vs Non-Repeatable Commands and Keys

Banish Key Chords

updated. Unicode ASCII Art: Font Emulation

FSF Spread FUD on Microsoft

On the Terminology of Key Chord vs Key Combo

I have always wondered about this. You know that retrieving a indexed item of array takes O(1) time. Why is that? You have n things, and you want the kth item. It should be O(k) for kth item. It is impossible to get it with O(1).

The answer can't explained in software or algorithm. It really have to do with how the hardware is implemented. This article explains: 〔Why is Indexing Faster Than Binary Search By Yin Wang. @ yinwang0.wordpress.com…

Richard Stallman Lost It 📺

updated, on its own page. Linux: Job Control Tutorial

cum, money.
19dfoa3Q7oehm9MwCULQzBG8vqfCaeMazH
cum all you want on me.
i swallow.

#bitcoin

“when a man swallows, his destitution can be seen.” —Xah Lee

major revamp. Xah's CSS Tutorial

updated. Punctuation & Printer's Symbols in Unicode

on its own page. The classic mechanical keyboard. IBM Model M keyboard, Unicomp

TRON Operating System & Encoding

wow, Richard Stallman got into a quarrel with Linus on stage in FOSS'13 London and a riot started.

am very happy, that i've settled on this Unicode symbol to represent “e.g.” or “example”. The name of that symbol in Unicode is THREE DOT PUNCTUATION. See bottom: Symbol, Semantics, Design: Unicode for “e.g.” (exempli gratia)

updated. Python, Ruby, Perl: Formatting Strings

Language Syntax: Brackets vs Begin/End

A nice essay: 〈Programming Languages Have Social Mores Not Idioms〉. Added the link to the bottom of Programing: Why Idiomatic Programing Are Bad.

on its own page. Python Libs for Scientists

Using Voice to Code Faster than Keyboard 📺

Summery of My Typing & RSI Experience 1992 〜 2013

slight facelift. Xah's Java Tutorial

new. Apache HTTP Server Tutorial

3 articles on the statet of the onion. Perl is not dead, but is dead end.

Texinfo 5.0 in Perl By Dave Cross. @ perlhacks.com…

Perl is not Dead, it is a Dead End By Stevan Little. @ speakerdeck.com…

Goodnight, Parrot By Chromatic. @ www.modernperlbooks.com…

Microsoft Sculpt Comfort Keyboard. Space bar is now split into a ⌫ Backspace key.

diy ergonomic keyboard common 172 banner
the keyboard from outer space. img src

more at more fancy keyboards

more words added to the idiotic aspell. Go github at bottom to grab it. aspell's Dismal Vocabulary Size

Tech Humor: Apache vs Node.js vs NGINX 📺

hot from the oven. learn ngnix in 1 hour!

xah java logo
Xah's Java logo

updated. Xah's Java Logo

added a photo of Commodore 64 keyboard. Keyboard: Control vs Capslock Position

Open Source Rewrites History: Why is Apache Named “Apache”?

MERCURY ☿ VENUS ♀ EARTH ♁ ⊕ MARS ♂ JUPITER ♃ SATURN ♄ URANUS ♅ ⛢ NEPTUNE ♆ PLUTO ♇. Added some interesting notes about these symbols, see bottom. Unicode Ancient Astronomy Symbols ☿ ♆ 🌛 ♋ (you might need to refresh the page)

new collection. documentation idiocy collection

facelifted. Python Documentation Problems

updated. How to Improve Python Doc; Notes on Rewriting Python Regex Doc

After 8 years, Python doc haven't improved much. There are complaints about Python doc about every year in Python mailing list, and Python doc wiki constantly crop up, but the Python priests always flame and turn it down.

learned a new linux command. man lsmod. It shows the status of Linux kernel modules. Basically pretty print 〔/proc/modules〕

Unicode: Symbol to Represent Map Links

eureka, i just found the name of my lang. laputa!

PS Gulliver's Travels. PART III. A VOYAGE TO LAPUTA, BALNIBARBI, LUGGNAGG, GLUBBDUBDRIB, AND JAPAN.

How to Diagnose Computer Networking Problems

contour RollerMouse Free2
new fancy pointing device. Contour Roller Mouse.

on its own page. Annoying Invisible ZERO WIDTH NO-BREAK SPACE Character from Google Plus, Twitter

REPL Jargon

on its own page. USB3 Drive Speed

typematrix keyboard
TypeMatrix Keyboard Review

Docstring Convention: Python vs Emacs Lisp

updated on how to fix. Fix Defective Keys in Comfort Curve Keyboard

Should You Type Space After Comma? and Tiny Space Bar on Japanese Keyboards

ASCII Jam Problem: HTML Entities

much more info about the OMeta lang at bottom: Proliferation of Computing Languages

started to work on Linux firewall tutorial. Linux: iptables Basics

another keyboard layout. qwpr Keyboard Layout. Also, the Workman layout has a much improved home page, with a active forum. See bottom: Computer Keyboard Layouts: Dvorak vs Colemak vs Workman

lol. Perl added a say in v5.10 . It's like print but adds newline at the end. But you have to use v5.10; first. Quote from perldoc -f say.

say FILEHANDLE LIST
    say FILEHANDLE
    say LIST
    say     Just like "print", but implicitly appends a newline. "say LIST"
            is simply an abbreviation for "{ local $\ = "\n"; print LIST }".
            To use FILEHANDLE without a LIST to print the contents of $_ to
            it, you must use a real filehandle like "FH", not an indirect
            one like $fh.

            This keyword is available only when the "say" feature is
            enabled; see feature. Alternately, include a "use v5.10" or
            later to the current scope.

these days, Perl monger remnants try to revive Perl from death bed, and talk about “modern perl”. LOL. the very name is funny. Am guessing the next step would be post-modern Perl? or should it be post-post-modern Perl?

learned a new Linux command: watch. ⁖ watch ls.

this is useful when you want to run some command regularly and itself doesn't have auto-update.

thx to Ryuutei Sebastien BLANC

see also Linux: Most Frequently Used Shell Commands

I don't know much about Operating System. I was just wondering whether or why the networking component is part of the kernel. Then, found this fantastic map. Linux Kernel Map.

learning notes. Linux: What's Netfilter, iptables, Their Differences?

Linux networking. iptables man page.

ACCEPT means to let the packet through. DROP means to drop the packet on the floor.

Note that we drop it to the floor, not, river or lake, as Microsoft might.

Xah's Edu Corner of the Day

there are 2 types of firewalls. Complicated and Uncomplicated. Linux supports the uncomplicated type, called ufw, short for Uncomplicated Fire Wall. Type man ufw in terminal to read its doc.

the complicated type is related to the math concept of complex number.

PS this post is of import due to its affinity to the field of linguistics, category theory, the theory of archetype, and ontology.

added a video review of the mech4 mechanical keyboard. Real high quality keyboard. Gaming Keyboards: Levetron, BlackWidow, Sidewinder. Also added them is the BlackWidow from Razer.

added domino tiles, mahjong tiles. Sports & Games Icons ⚽ ⛷ 🏁 🂡 ♞

Unicode Symbols for Alt Key and Control Key

recently discovered proper symbol for the Alt key, and few others. Example:

btw, when you plugin a Mac keyboard into PC, or PC keyboard into Mac, you'll notice that Mac's ⌥ Opt = PC's Alt, and ⌘ Cmd = ❖ Win. I always wondered if the keys send the same signal or perhaps it's the OS that's doing the remapping. Answer: The keys send the same signal. So, this means the keys are just difference in key label, and the physical positions are swapped.

you can see all these here Unicode: Keyboard Symbols, UI Icons ↹ ⌫ ⌘ ✉ ✍ ⌖

heard a new language OMeta. Home page at http://tinlizzie.org/ometa/

from a comment at Pattern Matching vs Lexical Grammar Specification

now complete. Unicode Music Symbols 𝄞 ♩ ♪ ♫ ♬ 🎸 🎹 🎻 🎷

Linux: Chinese Input Setup

playing cards in Unicode. Sports & Games Icons ⚽ ⛷ 🏁 🂡 ♞

learned a new linux command tree. It prints a dir in a visual tree format, similar to pstree. You have to install: sudo apt-get install tree. See also Linux: Most Frequently Used Shell Commands.

A Emoji Tale: Good Night Gone Bad …

learned today that Apple's color font, is actually color font technology, not secondary step of replacing fonts by images. See screenshots here: Unicode: Food & Drink 🍕 🍎 🍒 🍷

Symbology

Unicode is such a beast. Y'know, it encompasses all written languages, including ancient dead ones. But that's not all. When you dig into Unicode symbols, you see the thousands of math symbols, printer's symbols, forgotten punctuations, ancient astronomy symbols…, some of which we use today but don't have any clue of their origin. ⁖ ….

See, for example: Unicode: Dingbats, Cultural Symbols

you might be curious, and started to read about what they are for. I started that way some 5 years ago. First due to my love with math symbols. After few years doing it casually, you realize, to really understand all the symbols, their origin, history, can take you few years to decades. Not even counting the alphabets of dead writing systems.

Unicode Gallery & Tutorial ∑ ∞ π © ™ § ☺ ♀ ♂ ♥

Unicode 6 Font for Linux

Unicode 6 added over 2k chars. 600 of them are emoticons, and many others are icons, pictographs. Unicode 6 came out in 2010, but there's still not that many fonts supporting all those pictogram. On Mac, it's most beautifully done. See screenshots at bottom of Unicode: Food & Drink 🍕 🍎 🍒 🍷. On Window, Microsoft came up with Segoe UI Symbol-12, in 2012, as part of Window update. On linux, nada, but you can download the free font Symbola, which is very high quality. See bottom here: Unicode 6 Emoticons and Supporting Fonts.

to install font on Ubuntu, just unzip it, and double click it should do.

all i ever needed to know about keyboard, i didn't learn in kindergarten. Three hundred fourty images of keyboards. Keyboard Image Index

JavaScript App for Unicode

wrote a JavaScript app. Goto Unicode Emoticons, Faces 😸, hover your mouse over (or click if you are on tablet). Unicode name and char number will show.

also created the following pages.

python tip. To get image dimension (width and height in pixels), you can do:

# -*- coding: utf-8 -*-
# Python

import Image

print Image.open("/home/xah/pictures/cat.jpg").size

but for Python 3, the image library isn't there yet.

updated. Unicode: Keyboard Symbols, Computing Icons

〈Prosody, Symbols, Idiosyncrasy〉, added to Symbol, Semantics, Design: Unicode for “e.g.” (exempli gratia)

Apple iMac Keyboard A1242
updated. Apple Computer Keyboards Review

Kinesis has a new generation of their split keyboard, Freestyle 2. 2-Piece Split Keyboards

Past Articles by Date

2013-022013-012012-122012-112012-102012-092012-082012-072012-052012-042012-032012-012011-122011-112011-092011-072011-062011-042011-012010-112010-092010-052010-01