Skip to content(if available)orjump to list(if available)

Pantograph: A Fluid and Typed Structure Editor

conartist6

Super 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 : )

conartist6

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!

onemoresoop

I 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?

rybla

Currently, we've only instantiated the system for the simply-typed SML-like language that you can use in the tutorial (https://pantographeditor.github.io/Pantograph). Going through that tutorial will also give you a tour of the language features in there.

The next phase of work is on instantiating more complicated languages and type systems, to see how the framework can be extended. In theory, a lot (such as the entirety of SML) could be instantiated currently, but it would be quite cumbersome (here's what the implementation of the currently instantiated language looks like https://github.com/jeprinz/pantograph/blob/main/src/Language...). So we're working on trimming down the formalism and developing new abstractions to make things easier, and to support some more advanced typing systems that actually would have problems with the current system.

makizar

(ninth RacketCon): Andrew Blinn - Fructure: A Structured Editing Engine in Racket

https://youtu.be/CnbVCNIh1NA?si=JZxjUdTLbBp6IEaK

rybla

Pantograph is a new kind of structure editor where you directly edit a typed program. In order to accomplish this, it introduces a new kind of selection -- tree selection -- and a automatic typed refactoring system.

The link is the Pantograph tutorial. Follow the [about] link from the tutorial for more information on Pantograph's implementation and published formalization.

Yoric

That is nice!

Would this work well with weirder type-based features, such as typeclasses, regions, etc?

rybla

Thanks! We're working on extending the system to support more advanced type systems. In theory, the current system could already support these kinds of features (but not in quite as slick a way as modern languages, most likely), but it would be very cumbersome, so the work is in trimming down the formalization and taking advantage of new abstractions. Check out the implementation for a look at how defining the actual language (and typing rules) works currently https://github.com/jeprinz/pantograph/blob/main/src/Language...

null

[deleted]