<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title>Terracrypt</title><id>https://www.terracrypt.net/feeds/tags/lisp.xml</id><subtitle>Tag: lisp</subtitle><updated>2026-03-01T20:46:16Z</updated><link href="https://www.terracrypt.net/feeds/tags/lisp.xml" rel="self" /><link href="https://www.terracrypt.net" /><entry><title>Visual structural editing for Guix (and Schemes in general)</title><id>https://www.terracrypt.net/posts/visual-structural-editing-for-guix-and-schemes-in-general.html</id><author><name>Jonathan Frederickson</name><email>jonathan@terracrypt.net</email></author><updated>2024-09-21T10:38:00Z</updated><link href="https://www.terracrypt.net/posts/visual-structural-editing-for-guix-and-schemes-in-general.html" rel="alternate" /><content type="html">&lt;p&gt;I've been noodling on structural editing for a while now. I'm fully bought into Lisps myself, but most of my friends and coworkers are skeptical, and I think a lot of their skepticism has to do (as usual) with all the parens. One of the points I make frequently is that with Lisp code being written as a nested data structure, the textual representation is just one of many possible representations. But it can be hard to get across what that means without concrete examples.&lt;/p&gt;&lt;p&gt;A few years back, I ran across &lt;a href=&quot;https://github.com/disconcision/fructure&quot;&gt;Fructure&lt;/a&gt; for Racket. To this day, it's still the structural editor with the most appealing visual display to me. But Fructure itself has a few drawbacks for my purposes:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;It's specifically targeting Racket. Racket is a wonderful Scheme, but I'm a Guix and Goblins user as well, and I would ideally like whichever editor I use to work with any Scheme, not just one.&lt;/li&gt;&lt;li&gt;It was a prototype, and its creator has mostly moved onto other projects.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In addition to these, I've been wanting a way to make Guix configuration as easy and painless as possible for new users. Having a sort of &amp;quot;command palette&amp;quot; available seems like it might be a good way to accomplish this.&lt;/p&gt;&lt;p&gt;So recently, I did a quick initial sketch of what such a system might look like:&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;../images/structural-scheme.png&quot; alt=&quot;Pencil mockup of a structural s-expression editor for Schemes, showing a Guix operating-system record. There is an expression palette that can be used to search for expressions and drag them into the structural editor.&quot; /&gt;&lt;/p&gt;&lt;p&gt;I have a few initial use cases in mind:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Guix configuration, as particularly mentioned. Guix data structures (like &lt;code&gt;operating-system&lt;/code&gt;
or &lt;code&gt;file-system&lt;/code&gt;) are written as Guix-specific record types, so there may be some metadata about expected values in each embedded in them that you can tap into somehow.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://dustycloud.org/tmp/interfaces.html&quot;&gt;Content-addressed interfaces&lt;/a&gt; from the Spritely folks. This can make it more clear which methods are available to use on a remote Goblins object, and tying that into a visual command palette seems like it could be very nice.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Obviously given the fact that there are two styles of very different interfaces here, this has to involve some sort of runtime checking. And we probably can't entirely infer which to use based solely on the source code, so there's probably some per-project editor configuration needed for this to work. But... I think this might be doable.&lt;/p&gt;&lt;p&gt;I need to look into this some more, but a good starting point might be the &lt;a href=&quot;https://nrepl.org/nrepl/usage/misc.html&quot;&gt;nREPL protocol&lt;/a&gt;. It seems pretty extensible, and already has support for symbol lookups and such. But need to look into this all some more!&lt;/p&gt;</content></entry></feed>