Pantograph: A Fluid and Typed Structure Editor
11–20 of 26 posts
Re: Pantograph: A Fluid and Typed Structure Editor
#12Super cool work! I'm always excited and a little terrified to see other people who share my sensibilities about which direction is forward in code editing : )
I'm taking my own stab at the same problem over in this org: https://github.com/bablr-lang/ . It makes my head spin seeing the problem domain expressed in such a different way!
Re: Pantograph: A Fluid and Typed Structure Editor
#13Re: Pantograph: A Fluid and Typed Structure Editor
#14Re: Pantograph: A Fluid and Typed Structure Editor
#15Would anyone use this for real programming, if it supported your favorite programming language? I know "supported" is a loaded word there, but just take that to mean: supports all the basic edits you need, in composition, to make any complex edit, but not fancy refactors or fancy language-specific stuff.
Re: Pantograph: A Fluid and Typed Structure Editor
#16Would anyone use this for real programming, if it supported your favorite programming language? I know "supported" is a loaded word there, but just take that to mean: supports all the basic edits you need, in composition, to make any complex edit, but not fancy refactors or fancy language-specific stuff.
- Thanks to formatters like gofmt and prettier when I edit code I can do so with exactly zero concern for spacing, new lines, alignment, indent, etc. Close to structure editors where, in my understanding, the way code is stored and the way it is presented may be completely independent.
- Mass-renaming like what is provided by LSPs and other refactoring tools also go in this direction of thinking about symbols and their identity, rather than their text name.
- Tree-sitter lets traditionally text-oriented tools be re-created to be structure-aware, for example difftastic for diffs or ast-grep for structured search-and-replace.
I didn’t quite understand how the structure editor shown here works with types though, and though I’d love to edit my Typescript in a structure editor that just couldn’t work if my inputs got delayed by the Typescript type system figuring things out. I would take enforced type correctness if it can be instant, but I’d still use structure editing without type awareness.
Re: Pantograph: A Fluid and Typed Structure Editor
#17I like the idea. Reminds me of a talk about syntax editor in racket but I forget what it was named. What languages can pantograph support?
(ninth RacketCon): Andrew Blinn - Fructure: A Structured Editing Engine in Racket https://youtu.be/CnbVCNIh1NA?si=JZxjUdTLbBp6IEaK
Re: Pantograph: A Fluid and Typed Structure Editor
#18This is like what Chime [0][1] did, but it seems dead now, unfortunately. [0]: https://www.chimehq.com/ [1]: https://github.com/ChimeHQ/Chime
Re: Pantograph: A Fluid and Typed Structure Editor
#19Super cool work! I'm always excited and a little terrified to see other people who share my sensibilities about which direction is forward in code editing : )
Re: Pantograph: A Fluid and Typed Structure Editor
#20Earlier quoted context omitted.
I'm taking my own stab at the same problem over in this org: https://github.com/bablr-lang/ . It makes my head spin seeing the problem domain expressed in such a different way!
Looks interesting, but I'm having trouble finding where to start reading about what's involved. Do you have a suggestion?
The best place to get started is to see how CSTML works in the playground: https://bablr.org/playground. It's meant to be a self-describing format. It can be streamed, and we have a btree-backed storage format for it that makes incremental editing of immutable trees a breeze.