Xah Programing Blog Archive 2012-10

Started a blog in Chinese. 李杀網誌 Posts there will be in Chinese. (topic vary)

“this” and “self” are the top 2 manifest complexity in OOP.

See also: What are Object Oriented Programing Jargons and Complexities (OOP Model as Functional Programing)

just learned there's a new lang: Rust, developed by Mozilla Labs. Started in 2010. See bottom: Proliferation of Programing Languages .

thx to Alessandro Stamatto for comment at Language, Purity, Cult, and Deception

to my Chinese friends, i have now a weibo account [2012-10-25 http://www.weibo.com/xahlee/ ] . WILL post there regularly. 求关注! 求粉丝! 谢谢.

开微博第一个原因是,希望能推荐我个人的网页,希望大家喜欢。另一个原因是,希望能借微博,认识一下大陆的的国情,大陆的朋友.

PS Sina Weibo is a micro-blogging service in China. It's similar to twitter, but features more like Facebook. Of the past few day's use, i find the User Interface actually much better than Twitter, and faster too.

Perl installs a char encoding converter script at /usr/bin/piconv. Type piconv for help. You can also look at the code to see how it's done.

See also: Python: Convert File Encoding

thx to “fengxx” for tip.

Understanding Public-Key Cryptography for Beginner

python conference PyCon China 2012 logo
PyCon 2012 China logo. Designed by Riku (http://riku.wowubuntu.com/)

China Python Dragon Logo 蛇变龙

My misc scripts now on github. https://github.com/xahlee

A few random notes. Linux: BASH Shell Misc Tips

if you are on Windows, then AutoHotkey is indispensable. For example, the most useful is to set a single key, F9, to switch to emacs. See: AutoHotkey Tutorial. There are lots examples there. Also, i just put my ~50 AutoHotkey scripts on github. See: https://github.com/xahlee/autohotkey .

For Mac and Linux, you can do the same. See: How to Set Key to Switch to Browser .

want to start a blogs? See: The Ease of Making Money by Professional Blogging .

Rootkit removal for Windows

Discovered a excellent Windows rootkit (virus) detector. See: Windows: Best Anti-virus Software. (thx to Adi)

updated. ELisp: a Command to Execute/Compile Current File. Added code to save file if not saved. Thanks to Evgeniy Dolzhenko.

Tech Writing and Unix Humor

new. Linux: users and groups Admin (tutorial)

Nice linux tip: To find the name/pid of a window, type xprop, then click the window, then read WM_CLASS, _NET_WM_PID.

Updated at: Linux GUI Apps Command Line Names

thx to [ amirhoshangi ] https://twitter.com/amirhoshangi

Oracle VM VirtualBox Manager screenshot 2012-10-14
Oracle VM VirtualBox Manager screenshot. The left are your Virtual Machines. Click to select it. Then, the right shows that machine's config info. To change, click the Settings gear icon on top.

How to Install Linux on VirtualBox

xfce desktop screenshot 2012-10-15
screenshot of my linux desktop, running xfce.

My linux setup. Xah Linux Setup

Updated photo: The Idiocy of the Happy Hacking Keyboard

Unicode Text Art

Linux: Put Machine to Sleep by Command Line

updated: Modernization of Emacs (Simple Changes Emacs Should Adopt). If for nothing, you should watch Crockford's video there.

linux vim: so, i want to delete ending spaces. So, i did :%s/ +\n/\n/gc. That doesn't work. It turns out, “+” needs to be escaped, like this “\+”. Also, the “\n” is wrong. The correct way is :%s/ \+$/ /gc So, this means, vim regex isn't perl compatible. Wee, another regex to learn! viva Linux.

Ubuntu Linux: vim Location and Versions

Linux: Monitor Processes, Top Tutorial

discovered several recent books citing my site. For example, PostgreSQL 9.0 Official Documentation - Volume II. Server ... Page 38.

updated: Printed Citations to Xah Lee Site

linux dictionary app screenshot 2012-10-11
Linux dictionary, using dict.org

The open source dictionary dict.org and used by Linux haven't improved a bit. See: Problems of Open Source Dictionaries

Eric S Raymond wrote: How not to engage me! (hackers; programer culture)

Windows vs Linux vs Mac

it's so great to be back on unix. Been hardcore Solaris sys admin 10 years ago, but basically haven't done sys admin at that level since. Just got back to linux this month.

I switched from 19 years of Mac to Windows since 2009. [see Why I'm Switching from Mac to Windows] Since, i made a conscious decision to dive into Microsoft tech for real. Tried to learn PowerShell [see PowerShell Tutorial], installed Visual Studio, tried to use/learn the Windows sys admin GUI apps, the Registry, all efforts didn't go far. And didn't even got to any hardcore stuff such as .NET.

On Windows, i have very little idea what are all the processes that shows in Task Manager (actually i use Process Explorer, you should too). Am vague of the dir structure. No idea what files are in c:/Windows/. Don't know Windows startup procedure. Dunno Windows's networking mechanism. And don't want to think what muck is lurking in my Registry, and always wonder if i have some rootkit lurking in my system. Whole screen flash for a fraction of sec for no reason now and then… gah.

On unix, i basically know every file in OS, all processes, unix startup processes, how to monitor things, all logs, all shell commands… or can quickly find out if something i don't know. A Joy.

Of the past 3 years on Windows, i did learn something. Basically, a Power User type of thing. Have spent quite a lot time studying AutoHotkey [see AutoHotkey Tutorial] and Microsoft IntelliType Hacks. Compare to setting up elaborate keyboard automation on linux, i'd say Linux is better. And compare them to the Mac… on the Mac one become Power User without having to know any of the registry, drivers, devices, etc stuff. None. All just works.

For Windows power user tips i learned in past few years, see Microsoft Windows Tips .

updated Math Models of 3D Input Control

and SpaceNavigator 3D Mouse

Firefox Mouse Wheel Scroll Speed, Backspace for Previous Page, Autoscroll, Configurations

perl and python bundled help system

In terminal, type pydoc pydoc, or type python, then help().

In terminal, type perldoc perldoc.

detail: Perl, Python: How to use Bundled Help System

Linux: How to Get Wireless to Work

Ubuntu Linux Install Error: “'grub-install /dev/sdb' failed”

Command to Download YouTube Video

learned this linux command update-alternatives.

It's basically another system of {file alias, soft/hard link, Junction, virtual store} — a pest. For detail, see update-alternatives --help and man update-alternatives.

See also: File Aliases Considered Harmful

Bash Manual in Chapters; Using Emacs for Reading Info; Info Keys

from my dead Haskell learning notes 2005. Good for a look of what real world code of the lang looks like. Haskell: Real World Code Sample .

Haskell today is like Scheme Lisp ten year ago. Sure, lots of love from tech geekers, and great mouthings from all over. But ten years down the road, Haskell will be in the same state Scheme Lisp is — nobody ever heard of it. See: Language, Purity, Cult, and Deception .

If you want the functional future, i recommend OCaml Tutorial, F#, erlang. That's where real world gears and cams are made of.

New. Linux: Most Important Keybinding for {Bash, Man, Terminal}

updated. Windows Sys Admin App Command Line Program Names

learned a new linux command: “units”, for converting thousands type of units. apt-get install units.

updated: Linux: Set Bash Shell Prompt to Color

Syntax Highlighting Language in emacs, vim, Sublime Text

Microsoft cites ErgoEmacs!

learned a new option in git. git add -A ..

# commiting all files in current dir, including new or deleted file/dir
git add -A .
git commit . -m "summary of what you changed."

This is really good option. Because, you simply work on your working dir, including deleting files or dir the normal way, without using special version control commands to add/remove dir. Then, when you commit, git will just consider your working dir as is, including new/deleted files/dir.

updated: git Tutorial .

Retro-Put Backup Directories to git as Historical Commits

TypeScript Will Kill CoffeeScript and Dart!

updated: Dvorak Keyboard Layout

updated: Perl, Python: Using Modules/Packages/Library