Xah's Programing Blog

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

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

Unicode Cross ✚ ✙ ✝ ✞ ✟ ⛨ ♰ ☯ ☠ (major update)

Unicode Stars ★ ✪ ✭ ✡ ⛤ ❉ ❄ ✿ 🌟 🌠 (new page)

Unicode Weather Symbols ☂ ☃ ⛈ 🌞 🌀 🌈 🌁 (major update)

gittorious closing down. github vs gitlab?

GitLab logo
GitLab logo

What's the difference between github & gitlab? the latter is full open source, and free private hosting.

gitorious closing down. Bought by GitLab. A page in code hosting history.

github, gitlab, gitorious, gitcafe, all written in Ruby. 〔➤ Xah Ruby Tutorial

A new mouse from Logitech, Logitech MX Master Wireless Mouse. This mouse has some quite interesting features that are not in any other mouse in history.

logitech mx master wireless mouse
“Logitech MX Master Wireless Mouse” amazon

see Logitech MX Master Wireless Mouse

for Microsoft Windows, AutoHotkey: Swap Caps Lock, Alt, Control Keys (updated)

computer language char distribution 2015-04-18
Computer Languages Characters Frequency (now you can enter your own source code and get punctuation usage statistics)

discovered a new keylogging software. See: List of Keylogging Software (thanks to comment by Ran Viz)

Linux: Move File to Trash by Command (minor update)

Unicode: Punctuation & Printer's Symbols † ¶ © ® ™ ☙ (minor update)

Unicode: Currency Symbols $ € ¥ £ ¢


PowerShell Tutorial

What's Mouse DPI? Does Mouse DPI Matter in Gaming? (major rewrite)

Unicode: Food, Pizza, Banana, Cake, Beer 🍕 🍌 🍰 🍺 (updated)

Java: Reading and Writing to a File

Linux: Convert File Encoding with iconv (new, on its own page)

Perl: Convert File Encoding (new, on its own page)

Python: Converting File's Encoding (updated)

Logitech created a new one, g300s. Logitech G300s Gaming Mouses

PHP Tutorial by Example (minor update)

PHP: Object Oriented Programing Tutorial (updated formatting)

Python: Reading & Writing File (minor update)

Python: Example of Sets, Union, Intersection (rewrote)

How to Improve Python Doc; Notes on Rewriting Python Regex Doc (repost)

Discovered some cheap numerical keypads. $10 or $15. See List of Programable Keypads

For how, see Keyboard: How to set Number Keypad as Function Keys for Windows, Linux, Mac (major rewrite)

For why, see: Keyboard: Increase Productivity Using Function Keys (major rewrite)

Neal Stephenson at Google Talk 📺 (repost)

new keyboard curiosity. Point of Sale KSI Keyboard

I do not recommend this mouse.

CM Recon mouse 2015 556
CM Storm Recon Mouse Review

python os.path.walk() is deprecated, and removed in Python 3. Use os.walk() Python: Traverse Directory

Python: How to Read & Parse JSON (minor update)

new addition. Keyboards Without Numeric Keypad, Under $30

Useful AutoHotkey Scripts (minor update)

Unicode in Ruby, Perl, Python, JavaScript, Java, Emacs Lisp, Mathematica (minor update)

Evolution of Laptop Keyboards, No More Page Up/Down Keys!

Unix/Linux Shell Shebang: Who Gets to Use the First Char? (repost)

Linux: Set Keyboard Repeat Rate by Command (minor update)

Linux: Xbindkeys Tutorial ⌨. New.

new finding, cheap ergonomic mouse. Ergonomic Mouse, Vertical Mouse

The Worst Programing Language Tutorial & Documentation Styles (new, on its own page)

Why You Should Swap Mouse Middle-Click & Right-Click? (new, on its own page)

How to Add/Change Firefox Keyboard Shortcuts (minor update)

Linux: How to Swap Mouse Buttons (updated)

repost. Microsoft's TypeScript Will Kill CoffeeScript & Dart❕. Reminder: if you are going to use a wrapper language for JavaScript, TypeScript is better than CoffeeScript or Google Dart.

Linux: How to Set F2 F3 F4 to Cut Copy Paste Globally ⌨

Now you can buy the Truly Ergonomic Keyboard on amazon. See the amazon links in Truly Ergonomic Keyboard

Computing and Its People (major redesign)

every year, i must recommend this for better operational efficiency: Mouse Hover to Auto-Raise Window

and ban double-click: Single-click Open File in Windows & Linux

Linux: How to Find System Info (repost)

new. Linux Keybinding Tutorial Index

Linux: 「wmctrl」 Add Keyboard Shortcuts to Switch to App ⌨ (new. On its own page)

Linux: LXDE: How to Change/Add Keyboard Shortcuts ⌨ (new)

Linux: LXDE Set Key Repeat Rate ⌨ (new)

Ubuntu Linux: Command Line Equivalent to Update Manager (updated)

Linux: LXDE Keyboard Shortcuts ⌨

Notes on A New Kind of Science

Why is Pluto not a planet? Ceres, Pallas, Juno, Vesta, Eris …. Unicode Astronomy & Astrology Symbols ☿ ♆ ♋ 🌙 🌛 🌝 🌞 (major update)

Lots mouse from China are making inroads in USA market. For a 18-buttons mouse, this is half the price than Logitech or Razer. Redragon Perdition 18-Buttons Mouse 红龙 灭世 鼠标

Installing Cygwin Tutorial (repost)


CM Storm Recon Mouse. Added a photo gallery and review.

Linux: Command to View/Delete Metadata in Image Files (major rewrite)

Linux: Shell Commands for GUI Apps (repost)

Linux: How to Set Default App? (minor update)

now on Reddit. See link to reddit at bottom. Programing Challenge: Constructing a Tree Given Its Edges

Python: Function to Get Number of Args of Function

in Python, it is impossible to write a function to get a function's number of args.

# python 2
# get number of args of a function. works for user-defined function only
# code by John Smith

def get_number_of_args(func):
    return len(func.func_code.co_varnames)

def g(a, b): pass

print (get_number_of_args(g))   # 2

it is possible for user-defined functions, at least in python 2. But not for builtin functions.

if possible, it should be here:

In 1961, the IBM 7094 became the first computer to sing, singing the song Daisy Bell. 《2001: A Space Odyssey》 🎶 Daisy Bell in 《2001: A Space Odyssey》 🎶

The Unix Pestilence (some update of logos)

Unicode Smilies (◔ ◡ ◔) (repost)

Why Python's Lambda is Broken and Can't be Fixed (repost)

Bondi Blue iMac Girl, 1999

Cheap Gaming Mouse

List of Programable Keypads (updated)

AutoHotkey Syntax Problems (minor update)

there once was high-level graphics API Fahrenheit, QuickDraw 3D, but was killed by C,C++,unix hacker idiots.

little debian girl
“でびあんでしょう” (i'm Debian)

Windows: Keyboard Layout Tools, Key Macro Tools ⌨ (minor update)

Best Mouse for Programers: 17 Buttons (repost)

Ruby: Quoting Long String and Heredoc

spec with invalid HTML

if you search for the string ">><", you find them in these spec docs:

The Pain of Ampersand in HTML

new photos. Logitech G710+ Mechanical Keyboard

the Nature of Associative Property of Algebra (updated)

Java Tutorial: “this” Keyword (updated)

The “static” Keyword in Java (updated)

Java constructor complexity. Java Constructor's Return Type (updated)

Java Tutorial: Constructor (updated)

Java Tutorial: Arrays (updated)

Updated utf-8 usage on the web, from 2010 to 2015. See: Unicode Basics: What's Character Set, Character Encoding, UTF-8?

Java Array Syntax Soup (new)

Logitech G710+ Mechanical Keyboard (minor update)

Go Board Game as Cellular Automata

Keyboard RSI: 《Biomechanics of the Upper Limbs: Mechanics, Modeling and Musculoskeletal Injuries》. See bottom: Computer Keyboard Design Flaws

The Nature of Idioms in Programing Languages

History of Emacs & vi Keys (Keyboard Influence on Keybinding Design) (minor update)

you probably heard of emacs org mode. It's a markup, similar to markdown, but much more. Also supported by github. See: Emacs: Org Mode Markup Cheatsheet

Markdown Tutorial (minor update)

jbm has written a review comparing ergodox, truly ergonomic keyboard, and the new esrille. See bottom: Esrille New Keyboard (M-Type & TRON) from Japan

2015-02-05 tweeter spam on lang design

start coding, next 4 hours. but before i do so, let me talk about 2 aspects of judging a lang's design

when you judge whether you like a lang, there are 2 aspects. 1. consider the mistakes of the lang. 2. the lang design, by the creator.

every lang has mistakes. To see this, consider python2 to 3, perl4, and before, and perl6 is extension. js, and now es6 with strict, etc.

so, every lang has mistakes. But, if we ignore it for a moment, lang still remain its design characteristic. eg python3, perl6, ruby2, java8

now, the mistake part, can be big or small. We can say, eg look at python2, what % is considered a mistake. Do same for lang X.

so, diff langs, we can consider some percentage that are mistakes. But important thing is, even if all mistake fixed, still is a design X.

if a lang has huge amount of mistakes, then, that heavily influence whether we like it. Typically, large % of mistakes means no like.

but, typically, mistakes of langs, are comparable among langs. e.g. they all just a small percentage, not huge gap between langs.

so, to consider whether you really like lang x in comparison to other langs, you should not consider a lang's mistakes.

this way, you are judging weather you like lang x, not fooled in judgement just because it has some mistakes that are popularly known.

in other words, you want to consider whether you like lang x's design and philosophy.

now, js has lots mistakes/warts. e.g. number, array, and many detail of its prototype system. Many hacker idiots, focus on these.

php, has lots mistakes. its inconsistent sloppy naming of functions. again, hacker idiots focus on it.

python has mistakes. in particular, strings are bytes, not unicode chars, but fixed in python3.

but after you ignore the mistakes, you can then really judge, the lang's design, and see whether u like it, the design, its “philosophy”.

the above, concludes a section. That is, in judging a lang's design, it's more meaningful to not include the lang's mistakes.

now, when judging a lang, there's design aspect, but also practicality aspect, implementation, speed, field, lib size, popularity, etc.

most of these points are trivial questions. popularity, field, size of lib, speed, all can easily verified and agreed upon.

so, the tricky question, is again, the design/philosophy of the lang. What does it mean to say lang x is better than y?

but also, whether somebody like/disklike lang x is of no value. Because, each person has own habits, view, IQ, need.

whether you or someone like/dislike a lang has no value to the judgement of design of a lang.

finally, then, what is a better design of a lang? That would be another topic another day. On the meaning, on how to measure, on perception.

What Made Lambda Calculus So Powerful?

Functional Programing: is Real World Stateful?

old article. A Lambda Logo Tour (and why LISP languages using λ as logo should not be looked upon kindly)

Esrille keyboard can be ordered now outside Japan. See its home page: http://www.esrille.com/keyboard/. My review at: Esrille New Keyboard (M-Type & TRON) from Japan

Past Articles by Date