Typing costs of non-English keyboard layouts in programming languages
Typing costs of non-English keyboard layouts in programming languages
Posted Apr 30, 2020 14:12 UTC (Thu) by NAR (subscriber, #1313)In reply to: Typing costs of non-English keyboard layouts in programming languages by mbunkus
Parent article: Improving Python's SimpleNamespace
This is the reason why I use "hunglish" layout: English layout, extra Hungarian characters available by AltGr (mostly) on the right side of the keyboard (e.g. 0-=[];'\), so it's fairly easy to type them. I never understood people who can use Hungarian layout for programming...
BTW Elixir has maps (the usual associative arrays) in the language. It has also structs, but those are implemented using maps with a special __struct__
field containing the type and the field names of the structs are keys in the map (as atoms). The generic syntax for accessing maps is the usual map[key]
, while for structs it is struct.attribute
. So far so good, it's probably what people from other languages expect. However, for some reason if the keys of a map are atoms, the "struct syntax" also works - which sometimes drives me nuts as I can't tell by looking at code like this:
some.thing
that it's accessing a struct or a map. It also has an interesting interplay with command line expansion - it is possible to create atom names with space (crazy idea, but possible):
iex(8)> m3 = %{:"a b" => "c"}
%{"a b": "c"}
Then when I type m3.
followed by TAB, the shell helpfully extends the field name, so I get
iex(9)> m3.a b
** (CompileError) iex:9: undefined function b/0
Of course, m3."a b"
or m3[:"a b"]
works.
Posted May 4, 2020 12:14 UTC (Mon)
by ballombe (subscriber, #9523)
[Link] (1 responses)
Posted May 4, 2020 12:58 UTC (Mon)
by mathstuf (subscriber, #69389)
[Link]
% cat /etc/udev/99-kb-capslock.hwdb
which means that it also works on the TTY and not just when X is running (and apps can't sniff the fact that it is Caps Lock behind my back and do the wrong thing).
Typing costs of non-English keyboard layouts in programming languages
Typing costs of non-English keyboard layouts in programming languages
evdev:input:b0011v0001p0001eAB41-*:
KEYBOARD_KEY_70039=backspace