Using Python Ruby Golang as Quick Calculator in Emacs
1 i now use golang as calculator. C-n new buffer, g3 inserts main template. type 1+2, space w j shows result.
2 many advantages of using lang instead of emacs Alt+x
calc. faster, more powerful, flexible, and saved result, editable.
3 you can use golang python ruby or nodejs etc. Either in eshell, or in a buffer and press a button to run it.
4 i used to use emacs calc for quicky back in 1999. switched to python ~2009. then switched to ruby, now golang.
5 for example, ruby, just Alt+x
irb, 1+3 enter.
6 but notebook interface is usually better than repl, cuz you have more powerful editing and saving features
7 e.g. Ctrl+n open new, type
p 1+2, Alt+x
xah-run-current-file, type x.rb, result shows 3
8 for lang require template such as golang “main” stuff, just type g3 and it inserts it. Using emacs abbrev.
For how to setup, see
put in a few bucks to my patreon. https://www.patreon.com/xahlee Thanks.
If you have a question, put $5 at patreon and message me.