Xah's Programing Blog Archive 2013-01

learned that the ⌘ Cmd key and ❖ Win are really identical in keyboard hardware. They send out the same scancode. Similarly, ⌥ Opt and Alt are identical. Updated: Difference Between Apple & PC keyboards

updated Python, Ruby, Perl: Formatting Strings

try ErgoEmacs!

breaking news from the emacs department. Even if you are not a emacs user, this might be interesting.

ErgoEmacs version 2.0 release candidate is out. http://code.google.com/p/ergoemacs/downloads/list

ErgoEmacs is a emacs with modernish interface, meaning, the keys for common commands such as open, close, save, copy, cut, paste, select all, are the same for any app on {Microsoft Windows, Mac OS X, Linux}

so, this means, you can use emacs right away, while, explore the power you constantly hear elite hackers talk about. Give it a shot.

much thanks to the Window programing guru David Capello (David wrote wrote many apps for Microsoft Windows, the most popular is probably the pixel editor aseprite http://www.aseprite.org/ check it out.)

Symbol, Semantics, Design: Unicode for “e.g.” (exempli gratia)

real world coding-painting rubik cube
“Coding While Learning it at College” vs “Coding for a Project in a Real Job”

used as cover image for my article index Complexity & Tedium of Software Engineering

spat with the redoubtable lisper, computer scientist Richard Fateman. Programing Language Systematic Syntax: Lisp vs Mathematica

my linux question. Ubuntu Linux: What's the Command Line Equivalent to Update Manager

Python Scope Complexity, Shallow Copy, Deep Copy, Circular List, and the Garbage Underneath Computer Languages

updated. How to Use Unison for Syncing Files (Unison tutorial)

note that Unison is written in OCaml 〔☛ OCaml Tutorial〕.

Updated. AutoHotkey Example Scripts

for much more on keys and tools, see latest at Xah Emacs Blog

updated: Windows: Best Anti-virus Software

on its own page. XML Syntax is Inferior Lisp Syntax?

new. Ruby: Quoting Long String and Heredoc

Truly Ergonomic Computer Keyboard-207 nopalmrest front left
“Truly Ergonomic keyboard”

I'm now a avid fan of the Truly Ergonomic Keyboard.

Philosophy Keybinding Efficiency: Home/End, Page Up/Down, and Key Chords

new. Perl Basics. A bit rough, but i gotta start somewhere.

make the number keypad useful!

if you use a full keyboard with number pad, you should use it for function keys. Indispensible.

if you often work on laptop, then, i recommend F11 F12 for prev/next tab, and F10 for close. (【Ctrl+⇧ Shift+t】 un-close last closed, in Firefox, Google Chrome.)

rid of any key combos.

and, within emacs, you can easily set keys too. F11 F12 for prev/next user buffer, and F10 for close current buffer. (the commands are in ergoemacs-mode)

“recursion” — a central theme in this song. Björk — Bachelorette

here's recursion bonanza.

On the news, that there's a new zero-day exploit of Java. How to Disable {Java, JavaScript, Flash} in Web Browsers

What's a zero-day exploit?

software defects that are vulnerable to hacking or virus attacks are sensitive to whether they are exposed to public for the first time. Because, once a virus or hack exploited that defect, companies or software experts will respond to it and more than likely to fix it. So, this means, the first time a virus or defect are exploited, it's the most damage done, that's Zero-day exploit.

coded this interview problem. Luhn Algorithm

old article, still relevant: Why Must Software be Rewritten for Multi-Core Processors?

Aaron Swartz (of Reddit fame) killed himself yesterday.

Aaron's mom comment on Hacker News at http://news.ycombinator.com/item?id=5047398

discussion of Aaron's death on Hacker News http://news.ycombinator.com/item?id=5046845

Unicode Icons for Food and Drink

Unicode: Food & Drink 🍕 🍎 🍒 🍷

On my Microsoft Windows 7 machine, only Firefox display them well (missing just 2 characters).

All other browsers, Google Chrome, Safari, Opera, Internet Explorer 9, got nothing.

I do have Unicode 6 fonts installed (Symbola, Segoe UI Symbol). Somehow these browsers are not picking it up. 〔☛ Best Unicode Fonts for Programing〕 〔☛ Unicode 6 Emoticons and Supporting Fonts

On Linux, default setup of Ubuntu 12.04, none of them shows up in Firefox.

What's your experience? (tell me your OS, browser, their versions, and whether you have installed special fonts yourself.)

Python script to generate thumbnails from inline image links in HTML files. https://github.com/xahlee/xah_generate_thumbnail

A personal script. Now dumping to github.

The script is used to generate thumbnails for my gallery pages, example

Second Life, the Worst Hack in Universe

A Perl lib that emulates 30 list/tree manipulation functions in Mathematica. Tree::Matica Perl module

been thinking of reviving the project and port it to Python, Ruby. You are welcome to do so!

What Happens When You Name Your Functions/Variables as Math Symbols? See new section at bottom: Programing Style: Variable Naming: English Words Considered Harmful (programing practice; computer language design)

What's Windows CLSID? Second Life UUID?

lisp-1 vs lisp-2

One of the tenets of Scheme is that there's only one way to name things. It's very non-Schemey to say that there are identifiers that are used for functions and there are identifiers that are used for data structures and there are identifiers used for processes or whatever it is. The whole point in Scheme is that this is one uniform way to refer to things. At the end of the day they're all procedures. They're all objects.

From 〔Hal Abelson Q&A By Peter Seibel. @ www.codequarterly.com…

“lisp-1 vs lisp-2”? One of the things that lispers forever ado about.

broken lambda in Python

You have to contend with Python's broken notion of lambda but other than that it's not really that different [from teaching computer science using Scheme Lisp].

From 〔Hal Abelson Q&A By Peter Seibel. @ www.codequarterly.com…

Python's broken lambda… Indeed.

part of the problem of lambda in Python is this:

syntactically, lambda is a way to define a function, which may be arbitrarily complex. But due to Python syntax choice of indentation, so full lambda will need indentation, and thus cannot be a inline argument to other functions.

the other issue is that Guido doesn't like functional programing.

so, the take-away of this is that, syntax is fundamental in programing languages, as i have always advocated. And, syntax is the MOST important part of language. It influences thought and what sort of program comes out.

perm url Why Python Has Broken Lambda

a new poem, for Ruby!

there is a Python, pithy
mighty, lissome, and tabby
algorithms it puffs
conundrums it snuffs
and cherished by those savvy

there is a camel, kooky
ugly, loathsome, ungainly
hacking it supports
TIMTOWTDI it sports
and transports DWIM-wit's fancy

there is a gem, named Ruby
simply shiny and pretty
objectively beautiful
functionally magical
code a web of Rails happy

perm home: Xah's Perl & Python & Ruby Tutorial

Recently updated: linux man page tips: Linux: man page Tutorial

new: Ruby: Predefined Variables

See the bottom of the file for some Ruby quirks.

Ruby's predefined var is similar to Perl. In Perl, you can see the doc of them all by perldoc perlvar. But for Ruby, i haven't been able to find doc of these. Looks like it's not really documented.

Added Ruby. Python, Ruby, Perl: Formatting Strings

Intro to Reading Ruby Doc: What's M, C, ::, # ?

blog comments powered by Disqus