[[!meta title="Programming with steno]]

Programming with steno

Daniel Alejandro Tapia (I like "thou" for the second person and "ou" for the third) - I'm also on emacs.ch @SequentialDesign, z111.513.321@gmail.com

Format: 26-min talk; Q&A: ask questions via Etherpad/IRC; we'll e-mail the speaker and post answers on this wiki page after the conference
Status: All done

Duration: 25:03 minutes

Description

Talk about what stenotypy is and give a brief history. Then onto the challenges of using stenotypy in Emacs and how I overcame them. Also talk about the advantages of using stenotypy in Emacs and in general.

This talk uses two pieces of media under a Creative Commons license:

Discussion

Questions and answers

  • Q:I found your screen dimensions and battlestation picture interesting. Do you have any place where I can read more about it?
    • A:
  • Q:I missed the first part of the talk.  This is Excalamus.  How do you handle 1-up and repeat type issues? Suppose you need to move 5 characters to the right.  Do you make 5 separate "right arrow" strokes?
    • A:
  • Q: How did you get into stenotypy, and was that before/during/after you started programming and using Emacs?
    • A:
  • Q:I recently switched to using my homerow index finger keys as shift on hold. It feels very nice from an ergonomic perspective, but I'm having trouble with consistent shift inputs. Did you have similar experiences when starting to use double function keys?
    • A:

Notes

  • So much good stuff here, thanks for sharing! +1
  • I appreciate the large text on this one
  • What a fantastic presentation.
  • Yes, ou's doing a great job and setting a good pace
  • I have not gone that far with keyboard but I have been using Keymouse (keymouse.com) for a few years and it is killer one for Emacs :).
  • Other than Daniel and myself, anyone else in the Emacs community using steno?
    • I played with it but haven't had the time to practice. I have a Georgi and some Elisp to help with things like defining chords, looking things up, etc.
  • I set a metronome and did typey type for 10-15 minutes until I had the basic lessons complete at 90% accuracy and 70wpm. Not that I write that fast now...
  • If gpg can perform notarization then maybe Emacs can do legal transcriptions?

Transcript

Stenotypy is a system of typing where you press multiple keys at the same time, letting you send more than one letter at a time. This is a video from the 1920s. The man is holding a stenotype, a device used for stenotypy. This particular one is called Grandjean. It's made for the French language. In this demonstration, the man is going to be dictating a passage, first, slowly and then quickly. The lady on the left doesn't have trouble keeping up. She's using stenotypy. The lady on the right is a good typist, but she can't keep up when the dictation gets faster. I'm nowhere near as fast as this lady. She's extremely skilled. I'm not even a tenth of what she is. I don't use Grandjean, I use Melani, which is a system for Castilian and Italian. If I want to make the word solo, I press S, O, L, which is made by two keys, and O. Here's what that looks like. The hyphen between S and O means that the S is on the left side, and the rest of the letters are on the right side. If I want to write the word sólo, which is just like the previous word, but with the first O accented, I would press the asterisk key. In Melani, the asterisk is used to put an accent on a letter. If you speak English, then you would likely use the Ireland system. S-E-T makes the word set. In Ireland, you can make a long vowel sound by pressing the two thumb keys on the other side of the vowel you want to make long. S-long-E-T makes the word seat. This is me programming. After a few lines, I'll explain what's going on. In GNU Emacs, you can create abbreviations that expand to strings. For example, you can create an abbrev, like btwx, that will expand to "by the way" when you succeed btwx with a space or some punctuation. Here that's what I'm doing. I type d and then emacs, which expands to this. But this is a different kind of expansion from a simple string like by the way. This one has structure. It has interesting points that I can jump to. It's called a skeleton. This is the skeleton. The part that I want you to focus on is the @ symbols. Those are the interesting points that I jump to. So, at one interesting point, I can write the name of the function, at another interesting point, the arguments if the function will need them, the doc string, and finally the body. When I get to the body, I use stenotypy to write the words of the functions I'm looking for. Then I call a completion framework to choose from a list of candidates. This completion framework doesn't care what order the words are in or how many words I use. This completion framework is called Corfu, which stands for COmpletion in Region FUnction. And I'm using a package called Orderless to make it stronger. Here, I use another skeleton, the same one as before. This time, it has an argument. Then, when I get to the body, I write another skeleton, one that has an interesting point between the quotes and creates a new line right underneath it. I typed i and then emacs, and I got the interactive skeleton. Now, I use another skeleton, but these ones differ because it prompts me for a string, and I can make the skeleton as long as I want. If I keep entering text in the prompt, then Emacs will keep making the skeleton bigger. When I enter an empty string, it knows to stop asking, and it sends me to the point I've designated to go to when a skeleton is created. That's what the underscore means. I type c and then Emacs, and I get the condition skeleton. And then I use Corfu and Orderless to program. On two functions, I use a dabbrev. A dabbrev is a dynamic abbreviation. Here's how it works. If I have three strings that begin with S-T, string, strawberry, and stop, I can write S-T and then call dabbrev expand. First, this will give me stop because I'm nearest to the word stop. Then when I call it again, I'll get strawberry. And if I call it a third time, I'll get string. If I start off with S-T-R, then I'll get strawberry first and then string. I used dabbrev twice in this function. If you read the top of the screen, you can see which commands I use and how I invoke them. Finally, I use one last skeleton to map the function I just wrote to a hotkey. In this case, C-o. Here we can see what the function I just wrote does. It opens a line with the line below indented if it isn't blank. I've kept the old behavior with an argument of zero and done something for when I use a negative argument. You can see the interesting points. I could jump to any of them or cycle through them. I normally use a 9-to-16 setup. To me, Emacs, and computing in general, is much more pleasant to use that way. When I stenotype a word, a space is sent immediately afterwards. Orderless treats spaces as delimiters. This is very helpful because I can enter commands with stenotypy, without having to worry about whether words are in the right order. Lem, spelled L-E-M, is another Emacs. It's extremely powerful. But Lem doesn't have skeletons, not yet at least. So I'm going to program the traditional way. Nothing fancy, just left-to-right programming. With Plover, you have dictionaries. I added Fibonacci to my dictionary. I made my own dictionary from scratch. But if you don't want to do that, there are free dictionaries available that have many words already in them, saving you lots of time. The reason I made my dictionary from scratch is because I wanted to know my system inside and out. On one stroke, I typed T. And, on the next stroke, I stenotyped coalton. And then I got (coalton-toplevel and a new line. It's similar to what I did in GNU Emacs when I expanded a skeleton. This is actually not stenotypy, but a different kind of steno, known as serial steno. Plover is capable of this as well. Here are some things that Plover can do. Plover can glue words, like if you need to make a compound word. It can break a compound word. You can press keys to turn off Plover or to turn it back on. You can case words the way you want, uppercase, lowercase, capitalize. You can change your stenotype layout, like, say, if you want to use Grandjean for French, Melani for Castilian, and Ireland for English. All of that's possible. Here I should note that I'm using a Plover plugin called Full Keyboard Steno. It makes my entire keyboard into a stenotype. Lem also has a completion feature built in. But I didn't need it for the code that I wrote. It's quite good. In summary, if you add in the symbols that you're going to need when you're programming, you'll be fine. Even without skeletons, Plover is nice to use for programming. The search tool is the primary way of navigating in Emacs. Every Emacser can be measured by their skill with the search tool. C-s begins a forward search. The s stands for search. I'm reading Aesop's Fables, and I want to look for the word fox. So I press C-s and type fox. If I want to go back to the beginning of the word fox, I press C-r, which stands for reverse search. With Stenotypy, spaces are added to the end of words, so sometimes that causes problems. We can remedy that by changing the way Emacs interprets our whitespace. When I press C-M-s [alt control s], whitespace is interpreted as a wildcard. It's a function I made myself. fox mask will take me to the fox and the mask. The whitespace is a wildcard. For me, Ctrl-s makes the whitespace literal. I like having both options available to me: literal whitespace and wildcard whitespace. Say I want to find the cat and the fox, one of my favorite fables. I write cat fox, but I don't get what I want. I've written a function that reverses the order of my search query. Now I get what I want. Searching like this is very convenient. In Lem, we can do something similar. I want to read The Fox and the Lion. I search for Lion Fox. Notice those words are capitalized. Now I'm going to transform the last two words into a regular expression so that the order doesn't matter. And now I can find the fable I'm looking for. I did this with a plugin called Retro Stringop, op meaning operation. I can perform any operation on the last n words. Let's look at that. The 2 means that I want to do something to the last two words. The operation I'm performing is Python code. To be honest, I don't know any Python, but string manipulation is easy to understand. If you do know Python, then you can make your own plugins and even help with the development of Plover. A feature I like in Lem is that when you gracefully exit search with Enter or C-m, what you searched for is highlighted. You can cycle through the results, the highlights, and you can toggle the highlights on or off. 1978, John Kulp designs a keyboard known as the Space Cadet Keyboard. This keyboard has many distinctive qualities, one being the modifiers, numbering seven in total: Shift, Control, Meta, Super, Hyper, Greek, and Top. This keyboard influences the development of Emacs. 2000, designer Kiyoshi Kimura and programmer Yoji Hagia release SandS, a program that lets you turn your spacebar into a dual-function key, sending space on tap and acting as the Shift modifier on hold. This idea, the dual-function key, later revolutionizes typing. These two concepts, the space cadet modifiers and the dual-function key, can be combined. I use a program called Kanata to put all the modifiers on my homerow. When I tap the letter a, I get an a. If I hold it down for longer than 200 milliseconds, it acts as the Meta modifier, and really I can add as many layers to my keyboard as I want. I don't use a little stenotype. Thanks to Full Keyboard Steno, the Plover plugin, I use my whole keyboard. I have an alternative keyboard layout on it, so, even when I'm typing in the traditional way, it feels amazing. My layout is called Kuron, and I lay it over Melani so that I have both available to me at all times. I don't get them confused because I set them off with the way I press keys. If I press one key at a time, I'm using Kuron, my keyboard layout. If I press multiple keys at the same time and let them go quickly, then I'm using stenotypy, in my case Melani. And if I hold one key longer than 200 milliseconds, then I'm activating it as a modifier key or a layer key. I always know what state I'm in by the way I press my keys. It's impossible for me to get confused. Holding multiple modifiers is not a problem because the keycaps used for stenotypy are flat and square. Pressing two or more keys at once with the same finger is easy. Notice how close they are to each other. In stenotypy, the homerow is the border between the two rows of keys. It took me a while to get used to it, but now that I am used to it, I quite like it. So if I have to press a hotkey with all six modifiers, Shift, Control, Meta, Alt, Hyper, Super, it's easy. Thanks to Kanata, I have a Greek layer on my board. Additionally, I have alpha, beta, and gamma layers that send sequences of keys that I can use as hotkeys in both GNU Emacs and Lem. Maybe you noticed a few while I was programming. Now it's possible to bring the Space Cadet to any keyboard and to build on its wonderful ideas. Here I'll note that another Emacser, Excalamus, has made a page called Plover with Emacs, with information on how to use Emacs with the standard stenotype, the one that has two rows, the one I call a little stenotype. While I use my full keyboard, I understand how a small board can be useful. Finger movement is greatly reduced, leading to a very ergonomic typing experience. In fact, all of the speed records are set with this stenotype, the standard stenotype. There are many great ideas on this page. Thank you, Excalamus. Special thanks to Richard Stallman, the creator of GNU Emacs and the Free Software Foundation, Sasaki Ryosuke, first name Ryosuke, the creator and lead developer of Lem, Mirabai Knight, the creator of the Open Steno Project, which oversees the development of Plover, and jtroo, the creator and lead developer of Kanata. The views expressed in this talk are solely my own. I have no connection to any of the parties mentioned herein and therefore cannot be seen as representing them in any capacity. What I've said cannot be taken as medical advice. I used the TranSide theme for GNU Emacs in this talk. It's beautiful and functional. I love how the code looks, and I can read the comments. In Lem, I used Gruber. Again, the comments are readable, and the code looks nice. When I first started using Emacs, I used the Wheatgrass theme. Another theme that I love is os1. It's a light, warm, modern theme for Emacs inspired by film palettes. Regarding typography, for programming, I used JuliaMono, which was designed by Cormullion. It's extensive, and it's beautiful. For graphics, I used PromptFont, which was made by Yukari Hafner. She's very talented. I really like her work, including this font. There are so many packages that I love in Emacs. If I talked about all of them, my talk would last for days, so I'm only going to mention three. Keycast. At the top of the screen, you can see the commands I'm executing and how I'm invoking those commands. That's Keycast. Rainbow Delimiters is another one I like. It lets me know visually when my parentheses are out of balance. Very helpful when I'm programming in Lisp. Moodline is another. The modeline is where I can see relevant information about the file I'm working on. Moodline only gives me the information I want. I'm not really worried about too many things, just the file name, the mode I'm in, and where I am in the file.

Captioner: daniel

Questions or comments? Please e-mail z111.513.321@gmail.com