Simple and short Lisp that encompasses all features?
Posted: Tue Aug 30, 2016 8:29 pm
As a hobby, I'm trying to come up with a way to display lisp code without the parentheses. My idea is to present it as a type of tree, like the following first draft, modeled after an abstract syntax tree but not allowed to branch left and right (visually), only to the right, in order to fit in a text editor. (A software text editor would be able to collapse branches just like they currently do with code folding).
This way, you would just follow the tree down, even if it had multiple branches, top to bottom and left to right.
You would immediately be able to tell how complicated a lisp is just by its vertical and horizontal size.
You would immediately be able to tell how nested a lisp is just by it's right to left size.
You would quickly be able to tell how branched a lisp is based on the number of conditionals.
However to truly make it robust, I need a starting lisp that isn't too hard to play around with, but also represents each feature.
Perhaps I need one lisp per feature instead.
I'm not a lisper, I was hoping someone good at lisp could help me get started with some arbitrary examples to use as test cases while building tree drafts.
Code: Select all
(+ 3 7 (* (+ 5 10))
+
├─3
├─7
└─*
└─+
├─5
└─10
You would immediately be able to tell how complicated a lisp is just by its vertical and horizontal size.
You would immediately be able to tell how nested a lisp is just by it's right to left size.
You would quickly be able to tell how branched a lisp is based on the number of conditionals.
However to truly make it robust, I need a starting lisp that isn't too hard to play around with, but also represents each feature.
Perhaps I need one lisp per feature instead.
I'm not a lisper, I was hoping someone good at lisp could help me get started with some arbitrary examples to use as test cases while building tree drafts.