Underscores are stupid? Get a Japanese keyboard
recursive-design.com
recursive-design.com
def create_set_and_get(initial_value=0) # Note the default value of 0
closure_value = initial_value
return Proc.new {|x| closure_value = x}, Proc.new { closure_value }
end
...we could write (excuse my Chinese)... 做 创_去_和_来(先_值=0)
闭_值 = 先_值
回 程.新 {|x| 闭_值 = x}, 程.新 { 闭_值 }
终
Oh look: all the "words" are a single character each! Why not get rid of all those silly grammar symbols in between them (just like in Chinese and Japanese writing)... 做创去和来(先值=0)
闭值=先值
回程新{|x|闭值=x},程新{闭值}
终
Now there's tons of whitespace on the righthand side, so why not make it all a single line, with spaces instead of newlines... 做创去和来(先值=0) 闭值=先值 回程新{|x|闭值=x},程新{闭值} 终
A lot terser! Makes all the talk about semicolons and underscores sound a little silly to some people, doesn't it?سجل للذهاب والمجيء (القيمة الأولى = 0) = 1 قيمة مغلقة قيمة جديدة مقابل {| X | قيمة وثيقة = س}، {تشنغ عتبة نهاية}
English info: http://www.chinesepython.org/english/english.html.
[0] http://msdn.microsoft.com/en-us/goglobal/bb964665.aspx
[1] https://dl.dropbox.com/s/zwx8un3kp5f8q3k/Apple%20Keyboard%20...
Ruby - Saving 34% (6,613 keystrokes) PHP - Saving 52% (105,250 keystrokes)
Those percentages are not the most helpful. They represent a relationship between the positive delta and the negative delta, rather than a savings for the project (which I feel is the first implication in a percentage saved).
Note that the percentages below are only relative to
these 2 sets of 3 characters, and don’t represent the
total percentage of keystrokes saved.
The percentages are only really there to provide an easier way to compare the (relatively small) Ruby sample, and the (relatively large) PHP sample. Simply saying that one project saved 6000 strokes vs. the other with 100,000 strokes seemed a bit meaningless given the relative sizes of the projects, and doing a full-on frequency analysis of modifier key usage seemed like more trouble that it was worth... perhaps in hindsight I should have done it anyway.zokier provided an interesting link to a previous discussion below (http://news.ycombinator.com/item?id=2973776, specifically http://news.ycombinator.com/item?id=2977303) which does a much more thorough analysis of Finnish/Swedish vs. US layouts - I'd like to run his code using the Japanese layout when I get a chance.
Especially the methodology I used then to compare Finnish/Swedish and US layouts seems similar to his.
A recent article I've read somewhere explains it very well!
Ironically, my sentence was sarcastic. :)
OT: As far as you guys know, is there a language-agnostic keyboard for programmers?
0 70015
1 51196
2 34396
3 27248
4 28487
5 18818
6 14918
7 12900
8 12680
9 12231
! 8811
" 65196
£ 22
$ 10677
% 7848
^ 2890
& 15019
* 78756
( 164996
) 164418
121.73935896998462% fewer keystrokes
EDIT: scratch that, I was including my node_modules folders.keycode 48 = quotedbl apostrophe quotedbl apostrophe
keycode 66 = Tab Caps_Lock NoSymbol Caps_Lock
keycode 20 = underscore minus underscore minus
It takes a pretty good stab at whether you want a dash or an underscore, based on context.
It's a whole lot easier on the wrists.
(The only problem is you start to wish you had it everywhere, not just in Emacs.)
Which is the cruelest joke of most of emacs' functionality, for me.
Well, there's tradition and there's tradition... Traditional Unix systems usually had ctrl there, and the old Symbolics/"MIT space cadet" keyboard actually had what I believe is the equivalent of backspace ("rub out") in that location. The modern location of caps lock seems to be a PCism.
Edit: Forgot to mention, notably even the Apple II and III had ctrl there, I don't think Apple switched to the "modern" layout until the Mac:
http://www.flickr.com/photos/suburbia_org_uk/4820757193/
http://www.old-computers.com/museum/photos/Apple_III_Keyboar...
http://bitbucket.org/cheater/us_split/overview
It's just like qwerty, but better, because it inflicts less pain.
I didn't even know, but Apple started using it with iPads! http://www.gottabemobile.com/2012/02/03/ipads-split-keyboard...