News for hackers. Stuff that matters.
Re:Stack Graphs by parhamn on Thursday December 09, 2021 @01:37PM (#29501156)
Are there any editors that let you edit code in a structure closer to the way the language handles it (e.g. graphs/stacks)?

You could achieve a lot more than the conventional file-per-module approach. Off the top of my head benefits could include: much easier refactoring, comments bound to specific tokens, function level versioning, much smarter git diffs, and so much more.

The mapping graphs to flat-files thing feels especially silly when I do FE dev. Manipulating JSX doms on top of the JS function stack is a constant reminder of how the flattening step feels unnecessary.

Re:Stack Graphs by sweetsocks21 on Thursday December 09, 2021 @02:01PM (#29501462)
I don't know of any generic editor that can take a current (popular) language and do that. There is however a lot going on in this space, and I'll list some examples. Most are about editing the tree structure better, but some do branch out a bit more to the graph idea.

https://docs.darklang.com/structured-editing

https://hazel.org/

http://lighttable.com/

Emacs has some structural editing plugins like ParEdit

Many graph/node based editors like Blender shaders (3D), Reaktor (music)

https://www.unisonweb.org/ (this has some of the function versioning ideas)

https://enso.org/

Smalltalk

There's many many more, these are just some I remembered off the top of my head.

Re:Stack Graphs by parhamn on Thursday December 09, 2021 @02:37PM (#29501892)
I appreciate the links!
Re:Stack Graphs by hiaux0 on Thursday December 09, 2021 @01:47PM (#29501280)
The Dion editor [1] is trying to tackling this problem, if I understand correctly. [2] has some sweet GIFs for you.

[1]: https://dion.systems/dion_format.html

[2]: https://dion.systems/gallery.html

Re:Stack Graphs by ball_of_lint on Thursday December 09, 2021 @02:28PM (#29501796)
Lisp + SLIME is probably the closest thing that exists to what you're describing.