We hold these truth to be [argument-necessitating], that code is not text and should not be treated as such1, that code in textual representation has advantages which need to be retained2, that we should not parse but serialize3, that code - as well as thought - should be freed from the shakles of sequential narratives implied by text files and pages4, that syntax is bliss5, that metaprogramming should be a right of all programming languages and not a feature of a few6, that in the context of current human-machine interface in use during programming one should rarely leave the home row - i.e. typing is preferable to pointing and clicking7, that intuition builds on abstraction8, that learnabilty of a user interface requires immediate observability of cause and effect with intermediate steps in case of complex, composite actions9, that usability is strongly linked to familiarity and is therefore a conservative metric10, that the syntax system should aid in the development of corrent programs and not merely reject faulty ones11, that language tooling should be able to process partially completed programs - i.e. programs with holes - and expose language information to help fill these gaps12 [...]
On a serious note, all that we are saying in this repository is not based on empirical data or extensive research. We are only some dude(tt)s with personal experiences, ideas and prefrences.
NOTE: Try Emacs' evil-tree-edit
for hands-on experience of structure x modal editing!
If you have a python project under active developmend at hand and you want to experience how structure editing compbined with modal editing might feel, have a go with evil-tree-edit
!
It is by far not complete or polished but is easy to install and its feature set is advanced enough to get a good impression.
In this project we aim for a similar interface, but our idea goes beyond tree-edit
as we suggest that text might not be the best representation for code which remains unchallenged by projects like tree-edit
, etc.
A Kodama - originally the name of japanese tree spirits - is a program for interfacing with some kind of tree structure. Specifically, a [LANG]-Kodama may be used to work with a [LANG] syntax tree representing a program. It may be used to create, destroy, modify and show a particular syntax tree.
Via the Kodama project we want to explore the ideas behind structure editors and how they may be combined with other code editing ideas like Vim's modal editing, Emacs' unlimeted extensibilty, etc.
Project Agenda:
- Implement a very basic tree Kodama and CLI editor frontend to evaluate most abstract editing experience.
For further reasoning of this step see TODO. After evaluation either:
- stop project if not promising
- continue with 2. if interesting
- Implement a Rust-Kodama and integrate it into Emacs
- Reimplement the Rust-Kodama using the initial Rust-Kodama (i.e. bootstrap). This should provide us with real world experience into the usability of the concept.
The purpose of this repository is threefold:
First of, in src, it contains the code that we use for exploring the abtract/minimal tree Kodama, the initial Rust-Kodama and finally the bootstrapped Rust-Kodama.
Secondly, in TODO, it contains notes where we describe the concepts we find and explore. This is also where our evaluations and experiences will be documented.
Lastly, in TODO, it contains standards documents which describe the interfaces a program should implement to call itself a Kodama.
- Project - Sapling: Very Similar Project - Vi like Structure Editor written in Rust
- only works with JSON, can not load or save
- [Maybe;To be checked] Tree Sitter
- Emacs Extension - tree-edit
- interactive structure editing, usable but rough and below usefulness vs. pain threshhold
- [To be checked] nVim Plugin - Architext: Structure Editing in Vim
- Emacs Extension - tree-edit
- (dead) Project - Fructure: Very Nice Structure Editing Prototype with many good ideas!
- seems to be dead
- Best UI so far
- real eye-candy
- interaction design is superb and should be an inspiration
- subset of scheme only
- (dead?) Project - Programtree
- Project - Forest: Structure Editor for TypeScript
- Emacs Extension - GopCaml Structure Editor for OCaml
- [Maybe;To be checked] Product - Treefrog
- Paper - Programming environments based on structured editors : the Mentor experience
- Paper - Structure Editors: Old Hat or Future Vision?, free download
- Msc. Thesis - Forest: Structure Editor for TypeScript, pdf, talk on youtube
- Paper by Huet - The Zipper, pdf
- [TODO] Paper - Robust Projectional Editing
- List - List of Projectional Editors
- List - Awesome Structure Editors
- Blogpost - Martin Fowler: ProjectionalEditing
- Subreddit - Projectional Programming
- [Maybe;To be checked] Language Server Protocol
- [Maybe;To be checked] Proposed Msc. Project @ Uni Tübingen: Refactoring Macros