Skip to content
0:00 / 0:00

#racket#fructure#structuredediting

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

Racket

5K subscribers • 11 videos on Hallway

YouTube
  • Recommended by 3 people: 2 on Hacker News and 1 in engineering communities.
  • Presented by Andrew Blinn

Intermediate. Assumes working knowledge.

9.8K views7 years ago3 recommendations

Programming languagesTools and practiceVim, Emacs and editorsLisp and ClojureLanguage design and type systems

Andrew Blinn presents Fructure, an experimental structured editing engine in Racket that allows editing code directly via its AST structure.

Fructure is a prototype for an extensible structured editing engine. In structured editing, core edit actions reflect the extended selves of the objects you're bringing to life (grammatical programs with semantic properties), as opposed to the shape of their serialization (text files). Editing abstractions like cursors and code-folding are reimagined as syntactic scaffolding in a meta-grammar of syntactic affordances. Fructure lets language providers specify syntactic forms and semantic refactorings as production and transformation rules in a tiny term-rewriting DSL. Lessening reliance on after-the-fact correction or ad-hoc autocompletion, program creation consists rather of a guided search in the space of valid programs. Over the hood, my emphasis is on visual and kinetic appeal; creating a fun, fluid editing process with an eye to discoverability.

Why it's here

3 people recommend this

What people say. Highly recommended as an inspiring demonstration of structured editing and alternative, non-textual ways of manipulating code.

u/bjzabaPikelet, Unnamed Binary DDLin r/ProgrammingLanguages • Recommends

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

disposedtrolleyon Hacker News • Recommends

On “MicroBlocks: Scratch and Smalltalk-inspired MCU VM for live embedded programming”

I've seen a few attempts at "structure editors" which are keyboard driven but limit what you can type so it's always syntactically correct. Fructure is an example which looked promising! link to this video

loosetypeson Hacker News • Recommends

On “Hazel: A live functional programming environment featuring typed holes”

For folks interested in this sort of thing, Andrew Blinn gave a neat talk1 pertaining to structured editing at Racketcon, which credits Cyrus’ work with Hazel. 1 link to this video

u/bigamogiwotunin r/ProgrammingLanguages • Mentions

On “How could we get Lisp-style homoiconicity and macros in a language with C-style syntax?”

I maintain that the only problem with Lisp's syntax is that we're editing trees using software designed to edit text. Structural editors (example) (which effectively don't exist yet) will strongly encourage simple Lisp-like AST structures, I'm betting.

disconcisionon Hacker News • Mentions

On “How can we develop transformative tools for thought?”

…ike the current state of haptic input is not quite up to reifying this yet, though it is improving very rapidly these days! So I'm trying to tackle some of the software side, and seeing what can be done towards this goal with extant input devices. What I've done is pretty rudimentary so far, but I have a talk about it here if anyone is interested: link to this video…

TuringTeston Hacker News • Mentions

On “How can we develop transformative tools for thought?”

…I'd rather have a "structure editor"1 for editing a textual language (like the spreadsheet, but with a tree representation instead of a grid one), which added enhanced visual representations over the base tree. You know, like the IDEs developers use, but with a functional reactive language that mixed code and data, like the spreadsheet does. 1 link to this video…

threatofrainon Hacker News • Mentions

On “Lisp Programming in Vim with Slimv or Vlime”

In my mind the main reason why Vim still has relevance today is for seat-of-your-pants SSH'ing, which admittedly shouldn't be done but it still is. Outside of that... I still have hope for structural editing but I don't see Vim as the innovator in that space anymore. link to this video

spaethnlon Hacker News • Mentions

On “Simula: A VR window manager for Linux”

I'm not sure I agree with the parent, but to give an example for a non-rectangular UI for manipulating (programming) text: Combine structural editing1 overlaid on some kind of 3d graph that shows how your entire codebase fits together. 1 link to this video

disconcisionon Hacker News • Mentions

On “Snap is Scheme disguised as Scratch [pdf]”

using a lisp here simplifies things from implementation and interaction model perspectives. you already have a simple, canonical AST out of the box, which in-principle suffices to support the entire language, not just a toy version. so it makes sense lisps are attractive targets for getting something rolling in this space, though it's certainly debatable whether it's long-term the best choice. (my own efforts in this space (a structured editor in racket), which i was able to get going as a novice programmer: link to this video )