Developing Emacs extensions in Go
kiwanami
2017/06/28
Slide 2
Slide 2 text
Topics
●
Emacs and extension?
●
Why do I choose go?
●
Design and implementation of go-elrpc
Slide 3
Slide 3 text
Me
●
Masashi Sakurai
●
@kiwanami
●
Software Developer
– Software engineer for medical/hospital systems
●
OSS
– Emacs Lisp, JavaScript
●
Go
– 2016/12 -
Slide 4
Slide 4 text
Emacs and Extensions
Slide 5
Slide 5 text
Emacs?
●
TEXT EDITOR!
– Since mid-1970s and continues actively as of 2017.
●
Extensible, Customizable!
Slide 6
Slide 6 text
Emacs start up screen
Slide 7
Slide 7 text
Editing code
Slide 8
Slide 8 text
Split windows and color customize
Slide 9
Slide 9 text
IDE like window layout
Slide 10
Slide 10 text
Database integration
Slide 11
Slide 11 text
Web browser and Data analysing with jupyter
Slide 12
Slide 12 text
Reading and Writing Mails
Slide 13
Slide 13 text
Schedule management with calendar services
Slide 14
Slide 14 text
Cacoo Integration
Slide 15
Slide 15 text
3D FPS(First person sampo) game
Slide 16
Slide 16 text
Online Multi-player 3D FPS
Slide 17
Slide 17 text
Emacs is Great !!
Slide 18
Slide 18 text
Emacs Extension
●
Pure Emacs Lisp
●
“Dynamic module”
– Since Emacs 25.1
– include “emacs-module.h”
– not popular yet...
●
IPC
– STDOUT/IN, TCP Socket, D-bus
– Hard to implement...
Ok, EPC solves problem?
●
Yes.
– Emacs gets powers through other languages.
●
But,
Installing other language environment and
package system is very difficult...
– perl/CPAN, ruby/gem, node/npm, etc
Slide 21
Slide 21 text
Go may solve the problem
●
Easy deploying
– One binary
●
Fast and static typing
– Comparing with LL
●
Easy to learn
– Simple language and GC
– Concurrency
→ go bindign : go-elrpc
Slide 22
Slide 22 text
No content
Slide 23
Slide 23 text
Desing and Implementation
go-elrpc
Slide 24
Slide 24 text
EPC overview
Slide 25
Slide 25 text
go-elrpc overview
●
S-exp encoding/decoding
– parsing s-exps and serializing data values
– type conversion
●
RPC stack
– TCP stream
– async and sessions
– bi-directional