Symex Mode: Editing Lisp Code in a Vim-like Way

preview_player
Показать описание
In this presentation from July 17 2019, Siddhartha Kasivajhula takes us through Symex Mode, which is a way to edit Lisp code in a Vim-like way, as an alternative to packages like paredit and lispy. Symex mode is based on a DSL that can express arbitrary tree navigations, the most common and useful of which are accessible via a modal interface implemented using the excellent Hydra package.

Рекомендации по теме
Комментарии
Автор

This is to make the presentation more accessible.
00:00 Intro
01:08 What's "SYMEX"? (Symbolic Expression)
03:00 (tree) Structure editing
04|32 symex.el: 1. structure editing DSL; 2. model interface
05:50 Annotated demo
07:00 spacial intuition of tree navigation k: up to parent, j: down to children, h: backward sibling, l: forward sibling
08:30 e: evaluate the expression under cursor
10:00 showed use of f key, not sure what it does?
19:44 Background DSLS: expressive and economical for the intended domain (world)
24:45 SYMEX DSL: DSL for the world of symex
25:45 symex (tree) DSL: 1. Navigation, 2. Transformations, 3. Computations
26:44: Move, and combination of moves (maneuvers, etc.)
29:01 Demo of move, maneuver, etc. f, b, preorder, postorder traversal example
33:18 Transformations: insert/append in/before/after, emit (barf), capture (slurp), raise, swallow/absorb, manicure (indent + tidy), split, merge, shift <->
34:00 Sounds symex packages paredit, lispy, evil-cleverparens (?). Plan to use AST, to have semantic proof implementation
38:00 traversals with side-effects (M-= traversal and indent properly) (M-e evaluate with trace, ie. traversal and evaluate and print out results, good learning device)
43:25 Interface, emacs vs. vim
45:00 Symex's model interface: always referring to a symex (not "in between"), and also the only object (noun) to deal with
46:30 Choice of evil or hydra as the interface means (long term : evil, short term via hydra)
48:00 Taking it to the next... level (many more DSL's for different domains/worlds, such as word mode, view mode, window mode, etc.) (regularized vim models, each with a very specific object to operate on, so that the required manipulations are focused, thus can be expressive enough while economic)
58:00 Next steps
01:04:45 References: paredit, lispy, evil, gremlin, evil-cleverparens, epistemic levels


Seems interesting alternative to lispy and more accessible

yubrshen
Автор

I got this intuition too, that many operations with ask computers to carry out, can be thought of analogs of the 4 movement operations, modulated with some granularity or magnitude specifier (char, word, expression, line, sentence, page) and a toggle between selecting something and dragging that selected thing around.

netom