Open kisielk opened 10 years ago
plus - the switch makes me twitch.
Also, that algorithm is a joke. Huffman would probably work better/easier.
Interesting, I hadn't heard of De Brujin Graphs, I'll have to read up on it.
I was thinking of using a radix tree as the data structure for commands, but this sounds interesting.
radix tree or huffman encoding would be significantly more sane than De Brujin Graphs
I started looking into this (and had a hard drive failure: so I'm starting again). Part of this to me means redoing the command switch (mode/normal.go) as a map.
This allows us to separate out an interface for things like movements, etc, and do some more functional things on these sets
It also lets us configure the keybindings and do something like. and seperate out the keystroke into a structure. This lets us do interesting things with the key bindings to get robust shortest unique strings and composed commands.
http://en.wikipedia.org/wiki/De_Bruijn_graph
There are some older algos that are simple to implement (did some playing with them for some gene sequencing work) and would possibly give us a fast and robust method of composing commands in various modes.