Skip to content

Exploring AST based code editing via a custom sturcture editor

Notifications You must be signed in to change notification settings

betawave/kodama

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kodama

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.

What's a Kodama?

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.

What is the purpose and plan of this project?

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:

  1. 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:
    1. stop project if not promising
    2. continue with 2. if interesting
  2. Implement a Rust-Kodama and integrate it into Emacs
  3. 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.

What is the purpose and structure of this repository?

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.

Related Work

Software - Projects, Products & Extensions

Ideas - Papers, Blogposts, Forums & Talks

Tangentially Related

Footnotes

  1. See TODO

  2. See TODO

  3. See TODO

  4. See TODO

  5. See TODO

  6. See TODO

  7. See TODO

  8. See TODO

  9. See TODO

  10. See TODO

  11. See TODO ~ Mention Idris

  12. See TODO ~ Maybe same as above

About

Exploring AST based code editing via a custom sturcture editor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages