Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visualize s-expressions in real-time

I want to write Lisp/Scheme/Clojure code like this

(map inc (range 0 5)) 

And have it visualized somewhat like this

map -- inc
   \\
       range -- 0
           \  
             -- 5

I want to see the tree change in real-time as I manipulate my expression. As trees become large the layout will become important.

Are there any tools that do this? I suspect something might exist in the Emacs world.

like image 446
MRocklin Avatar asked Nov 04 '22 10:11

MRocklin


1 Answers

the Light Table project is aiming to create an IDE with this sort of visibility as one of it's more important features. The idea is that it displays the evaluations results right next to the code it's self. Not quite a tree view like you are asking though it's a similar concept.

For a less intrusive change the tools.trace package can help make things more visible

like image 159
Arthur Ulfeldt Avatar answered Nov 15 '22 12:11

Arthur Ulfeldt