Stream: beginners

Topic: Structured code editing


view this post on Zulip notramo (Nov 06 2026 at 16:56):

What happened to the structured code editor that was added to a previous version of Roc?

view this post on Zulip notramo (Nov 06 2026 at 16:56):

Is it lost in the rewrite?

view this post on Zulip notramo (Nov 06 2026 at 16:56):

Or was removed earlier because it turned out to be a bad idea?

view this post on Zulip notramo (Nov 06 2026 at 17:01):

I'm experimenting with a tree editor written in Roc, but I can't find good UX patterns.

view this post on Zulip notramo (Nov 06 2026 at 17:02):

The goal would be to create a generic tree editor, just like Helix or Neovim can edit any text-based language.

view this post on Zulip Richard Feldman (Nov 06 2026 at 17:25):

it was originally a major part of the plan for the language, then it got put on hold to focus on the compiler, and right now its future is uncertain

view this post on Zulip Richard Feldman (Nov 06 2026 at 17:27):

one of the original motivations behind it was "let's have an ecosystem of package-specific editor plugins that everyone ships as part of their packages" but the premise behind that motivation was that everyone in the ecosystem would be using editors

view this post on Zulip Richard Feldman (Nov 06 2026 at 17:27):

but if a very large proportion of the community is not interacting with code that way, the premise doesn't work anymore. So I'm not saying we should definitely not do it, but rather that the premises have changed, so the future is uncertain...plus there is still plenty of compiler work that's higher-priority :sweat_smile:

view this post on Zulip Richard Feldman (Nov 06 2026 at 17:28):

also, I wouldn't recommend trying to resurrect the code there - what's in the commit history was never more than a proof-of-concept, never really got off the ground

view this post on Zulip notramo (Nov 06 2026 at 17:51):

I think, tree-based editing would not be successful if it would be tied to just one language. Users should be able to use the same editor for editing a bunch of other files, e.g. linter configs, database schema files, etc.

view this post on Zulip notramo (Nov 06 2026 at 17:51):

So I think, the goal should be to have a generic tree editor, and even the language itself should be a plugin, just like LSP for text-based files.

view this post on Zulip notramo (Nov 06 2026 at 17:53):

And ideally, multiple editors should be compatible with these plugins. Some users would use TUI editors, some would use GUI, just like with text-based editors: Helix, Flow, Zed, VS Code, etc.

view this post on Zulip notramo (Nov 06 2026 at 17:54):

But most of the users want to choose editors based on workflow, and if e.g. a Roc-specific tree editor is GUI-only, it won't catch on among TUI/CLI users.

view this post on Zulip Steve Howell (Nov 06 2026 at 17:57):

Most developers are gonna learn how to do prompt engineering and not waste their time fiddling around in code editors. I realize some folks don't have the budget yet for agents, but there are already free-ish models.

view this post on Zulip notramo (Nov 06 2026 at 17:59):

Agents just mess up things all the time. There's no LLM that's trained to stop and ask the user if something can not be implemented cleanly.

view this post on Zulip notramo (Nov 06 2026 at 18:00):

Prompting does not work that well, because it's out of distribution. This workflow is basically nonexistent in the training data.

view this post on Zulip notramo (Nov 06 2026 at 18:03):

Also, the process of hand-coding a reference implementation for a spec can help the designers to find weaknesses or problems in the design.

view this post on Zulip notramo (Nov 06 2026 at 18:03):

LLMs just work with whatever they are given in the harness, no matter whether it's a good design, or needs refinement.

view this post on Zulip notramo (Nov 06 2026 at 18:07):

For example, I'm working on a Markdown-like markup language, with reduced ambiguity and simpler grammar. I hand-wrote the tokenizer, which helped me find many ambigous parts in the spec. No matter how many LLM reviews I ran on the spec, using multiple models, none of them catched these problems.

view this post on Zulip Steve Howell (Nov 06 2026 at 18:16):

see #contributing > markdown It's built entirely without a code editor.

view this post on Zulip notramo (Nov 06 2026 at 18:20):

Yes, and it took only a few seconds for me to find a bug.

view this post on Zulip Steve Howell (Nov 06 2026 at 18:20):

What's the bug?

view this post on Zulip notramo (Nov 06 2026 at 18:21):

- List item with
  no line break.
  However, it renders
  on multiple lines.

view this post on Zulip Steve Howell (Nov 06 2026 at 18:21):

which mode?

view this post on Zulip Steve Howell (Nov 06 2026 at 18:22):

As I state pretty clearly in the other topic, it's my own dialect of markdown optimized for chat.

view this post on Zulip notramo (Nov 06 2026 at 18:23):

So is it intended behavior?

view this post on Zulip Steve Howell (Nov 06 2026 at 18:24):

Probably. I don't know exactly what you're reporting here. You can show a screenshot.

view this post on Zulip notramo (Nov 06 2026 at 18:26):

Oh, it's caused by the "chat" mode. It renders on a single line in "reflow" mode.

view this post on Zulip notramo (Nov 06 2026 at 18:26):

Anyways, a good specification is useful for ensuring consistent behavior accross different implementations. Hand-writing the code helps with this.

view this post on Zulip Steve Howell (Nov 06 2026 at 18:27):

The markdown is pretty battle-tested for real world use. It passes most of the common markdown suite of tests in the repo, but there are deliberate departures from the spec, many of them informed by the Zulip markdown, which I have worked on in pre-LLM days.

view this post on Zulip Steve Howell (Nov 06 2026 at 18:27):

notramo said:

Anyways, a good specification is useful for ensuring consistent behavior accross different implementations. Hand-writing the code helps with this.

They already exist in the wild.

view this post on Zulip notramo (Nov 06 2026 at 18:28):

Also, Markdown is quite a bad format. There's a reason why Djot was created. But that's also not sufficient for some use cases.

view this post on Zulip Steve Howell (Nov 06 2026 at 18:36):

notramo said:

Also, Markdown is quite a bad format. There's a reason why Djot was created. But that's also not sufficient for some use cases.

I couldn't agree more. My chat audience is mostly folks that also use Zulip, so that's why I don't stray too far from markdown, but I do have intentional departures.

view this post on Zulip Steve Howell (Nov 06 2026 at 18:38):

See https://ficd.sh/blog/markdown-preformatting/ from @Daniel (who joined yesterday, this is from his blog). It will probably resonate. :smile:

view this post on Zulip notramo (Nov 06 2026 at 18:44):

But a simple markup parser is not very good demonstration of the architecting capabilities of LLMs.

view this post on Zulip notramo (Nov 06 2026 at 18:45):

Some problems can be vibe-coded yet still result in high-quality software. Other problems can not.

view this post on Zulip Daniel (Nov 06 2026 at 18:49):

Steve Howell said:

See https://ficd.sh/blog/markdown-preformatting/ from Daniel (who joined yesterday, this is from his blog). It will probably resonate. :smile:

Haha, it's been a while since I thought about that post. These days, I've been using Djot for personal notes, as well as for a video game guide I'm working on.

view this post on Zulip Daniel (Nov 06 2026 at 18:56):

Personally I'm not a fan of LLMs, because using them does not spark joy. But the topic of agents aside (I imagine it's off-topic here; and I have so much LLM fatigue I'd rather not talk about them any more), as someone that's spent a lot of time thinking and writing about text editors, I agree with @notramo that tree-based editing will only be successful if it's generic enough.

The success of the LSP and tree-sitter parsers, in my opinion, is that people can add support for languages to the editors they already know and love. For example, if I couldn't configure Kakoune (my weapon of choice) with a decent Roc editing experience, I don't think I would engage much with the language.

view this post on Zulip Steve Howell (Nov 06 2026 at 19:01):

notramo said:

But a simple markup parser is not very good demonstration of the architecting capabilities of LLMs.

You brought up the markdown processor as something that was out of reach of an LLM. It's not. I've written a perfectly good markdown processor with the exact architecture I needed, and it passes a zillion tests, and it's battle-tested.

view this post on Zulip notramo (Nov 06 2026 at 19:13):

I didn't mean it's out of reach for an LLM. I meant that an LLM is going to go through with any bad design, and hack around it, instead of stopping and telling the user that the architecture is bad.

view this post on Zulip notramo (Nov 06 2026 at 19:14):

Most importantly, it's not possible to effectively prompt an LLM to stop on bad design. Too much false positives, where the agent stops on obvious things, yet it misses so many actual problems.

view this post on Zulip Dan G Knutson (Nov 06 2026 at 19:21):

I think some of the features originally planned for editor plugins are still useful in a world where you assume direct code editing is way less common. In particular:

  1. Having higher-level editing options (similar to LSP code actions, but maybe more ambitious) is useful for an agent as well as a human. An LSP-like compiler API can offer things like code search tools to agents and humans, for example.
  2. In a world where most people are generating most code via LLMs, I think editor plugins for stuff like visually editing constants (like a color picker plugin) or inspecting unit test execution are still useful as tools for understanding generated code.

Basically, things that would have been useful without LLMs for understanding or interacting with a large codebase someone else wrote are now useful for everyone.

view this post on Zulip Richard Feldman (Nov 06 2026 at 19:26):

for #1 we already plan to make more general/flexible versions of what can be done with LSP today - that's why the cli says experimental-lsp instead of lsp - the plan is that in the future there will be a more general thing that lsp can be implemented in userspace on top of, kinda like roc glue today

view this post on Zulip Steve Howell (Nov 06 2026 at 19:30):

notramo said:

Most importantly, it's not possible to effectively prompt an LLM to stop on bad design. Too much false positives, where the agent stops on obvious things, yet it misses so many actual problems.

I have so much evidence to the contrary. It takes about two seconds to have an agent build you a design review tool.

view this post on Zulip notramo (Nov 06 2026 at 19:31):

It is going to have a ton of false positives, and miss many actual problems.

view this post on Zulip Steve Howell (Nov 06 2026 at 19:34):

notramo said:

It is going to have a ton of false positives.

Like reporting a bug that's an intended feature? Oh wait, that was you.

view this post on Zulip notramo (Nov 06 2026 at 19:34):

I spent less than a minute on that.

view this post on Zulip Richard Feldman (Nov 06 2026 at 19:40):

keep it civil please :slight_smile:

view this post on Zulip notramo (Nov 06 2026 at 19:40):

I think neither of us meant it as insult.

view this post on Zulip notramo (Nov 06 2026 at 19:41):

Sometimes phrasing can be misunderstood, possibly due to terseness, but I think most of us here know to assume good intent from each other.

view this post on Zulip Steve Howell (Nov 06 2026 at 19:42):

I was being mildly snarky, but I agree, I am not insulted by anything in this conversation. It's a healthy debate. I don't have a ton to add, though.

view this post on Zulip notramo (Nov 06 2026 at 19:43):

I think some friendly roasting is okay, if the other person knows how to handle it. I didn't get offended at all by Steve's remarks.

view this post on Zulip notramo (Nov 06 2026 at 20:11):

Steve Howell said:

You're making a strawman here. I always collaborate with LLMs on design; I never set them loose totally on their own.

Because LLMs are not capable to come up with good designs on their own, so human oversight is necessary during architecture design. Similarly, they make bad decisions when writing the actual code, so human review is necessary there too. A good high-level design doesn't automatically result in a correct implementation. Writing the code is also a bunch of architectural decisions, just smaller ones. Every lineof code is an architectural decision.

view this post on Zulip Steve Howell (Nov 06 2026 at 20:24):

I don't know why you feel the need to tell me that human oversight is important during design when I literally mentioned collaboration twice.

view this post on Zulip notramo (Nov 06 2026 at 20:25):

Not just during design.

view this post on Zulip notramo (Nov 06 2026 at 20:25):

During actually writing the code, too.

view this post on Zulip notramo (Nov 06 2026 at 20:26):

You said you write 0% of the code, and you only contribute to the designs.

view this post on Zulip Steve Howell (Nov 06 2026 at 20:28):

notramo said:

You said you write 0% of the code, and you only contribute to the designs.

You're exaggerating what I claimed. I write 0% of my code in text editors. I'm still involved in the process.

view this post on Zulip notramo (Nov 06 2026 at 20:31):

So basically you still read the code? How do you navigate in the Claude Code UI, e.g. goto definition?

view this post on Zulip Steve Howell (Nov 06 2026 at 20:32):

I had Claude build a code review tool.

view this post on Zulip notramo (Nov 06 2026 at 20:32):

What do you do in situations where prompting is more effort than actually changing the code? Some small changes that are not that obvious.

view this post on Zulip Steve Howell (Nov 06 2026 at 20:34):

I explain the code smells to Claude and tell it to fix them. For general smells, I have Claude write shale scripts to do automatic linting.

view this post on Zulip notramo (Nov 06 2026 at 20:37):

That seems like a good workflow. But it's not for everyone, and not suitable for every problem.

view this post on Zulip notramo (Nov 06 2026 at 20:37):

I think, there's potential in LLM integration into editors.

view this post on Zulip notramo (Nov 06 2026 at 20:38):

A smarter editor, that figures out what you want to do, based on the editing interactions, and provides smart suggestions.

view this post on Zulip notramo (Nov 06 2026 at 20:38):

Basically, to use the user's text editing interactions as a way of prompting.

view this post on Zulip notramo (Nov 06 2026 at 20:39):

Something like the Codeium Supercomplete, but unfortunately it was bought by the Devin team, and got cancelled.

view this post on Zulip Steve Howell (Nov 06 2026 at 20:48):

I'm actually claiming that my LLM workflow is suitable for nearly ever problem. I started coding in the mid-80s, and I have thousands of manual contributions to the very system that is enabling this conversation (Zulip). So I'm not exactly a rookie. The second half of 2026 has been my most productive year for building code, by far, because I have never had a tool as effective as the LLMs. The markdown processor is a good example. I guarantee you that my Roc parser is higher quality than Zulip's, and I know this from first-hand experience on both sides.

It's not even a fair fight. One of the things that made me an effective coder in pre-LLM days is that I used the right tools for the job, such as linters. Claude can run a linter just as easily as I can. Claude doesn't just build apps for me; it builds all my tools where it can't find existing tools that are suitable for the job.

view this post on Zulip Steve Howell (Nov 06 2026 at 20:49):

I encourage you to poke holes in the markdown code.

view this post on Zulip removewingman (Nov 06 2026 at 21:12):

Steve Howell said:

I'm actually claiming that my LLM workflow is suitable for nearly ever problem. I started coding in the mid-80s, and I have thousands of manual contributions to the very system that is enabling this conversation (Zulip). So I'm not exactly a rookie. The second half of 2026 has been my most productive year for building code, by far, because I have never had a tool as effective as the LLMs. The markdown processor is a good example. I guarantee you that my Roc parser is higher quality than Zulip's, and I know this from first-hand experience on both sides.

It's not even a fair fight. One of the things that made me an effective coder in pre-LLM days is that I used the right tools for the job, such as linters. Claude can run a linter just as easily as I can. Claude doesn't just build apps for me; it builds all my tools where it can't find existing tools that are suitable for the job.

What are your thoughts on the Zig Community? Zig and the ecosystem around it are a good example for coding without AI (or using it as a Reviewer/Helper at maximum). They have delivered so much value over and over again, whilest building a really awesome and stable community around it. imo this and collaboration is really important for the longevity of something.

view this post on Zulip notramo (Nov 06 2026 at 21:14):

Some thoughts on this can be found in this thread: #show and tell > roc on a unikernel (venting about LLM policies)

view this post on Zulip Steve Howell (Nov 06 2026 at 21:36):

Yeah, I already posted there, so I won't belabor the point. I have a patched version of zig with three bug fixes, so they're not perfect. Don't get me wrong--zig is an amazing piece of work. I built my own programming language on top of it. i built a unikernel on top of it. I built a bunch of toys on it. I have written complex game algorithms on top of it.

view this post on Zulip notramo (Nov 06 2026 at 21:39):

I encourage you to poke holes in the markdown code.

The problem is not the implementation itself. The problem is that vibe-coding can't help a designer find weaknesses in the spec. Since your Markdown flavor is loosely specified, and it has one implementation, it's basically correct, because there's nothing to compare to. And compliance is just one thing. If you wanted your Markdown flavor to be strictly specified, hand-coding would have turned out lot of issues in the spec. But it's okay for a loosely specified grammar.

view this post on Zulip notramo (Nov 06 2026 at 21:42):

So, it's not about the implementation, it's mostly about the spec.

view this post on Zulip Steve Howell (Nov 06 2026 at 21:50):

I didn't need a spec to write a markdown processor (with or without an LLM). It's a very close dialect to Zulip's markdown, which I know intimately. The test suites are the spec. The test suites are drawn from several sources, including a corpus of Zulip messages.

view this post on Zulip Steve Howell (Nov 06 2026 at 21:51):

I encourage you to play with the REPL and find something that's broken. You may disagree on my dialect choices, but I didn't write a markdown processor to illustrate a point about LLMs. I wrote it to have a markdown processor.

view this post on Zulip Zak Kohler (Nov 06 2026 at 21:52):

The original inventor of markdown even memorably (for better or worse), actively, fought and refused specification because "the spec is what my implementation does" and considered specification an anti feature.

view this post on Zulip Steve Howell (Nov 06 2026 at 21:56):

Yup. And markdown isn't the original art in this space. Depending how broadly you define the genre, you can probably go back to the 70s at least. Certainly wiki markup pre-dates markdown, and it was super similar. You have an inline syntax that is mostly intuitive, and users kinda figure it out.

view this post on Zulip notramo (Nov 06 2026 at 21:56):

Anyways, the point is: code editing is going to stay for a while in many users' workflows.

view this post on Zulip notramo (Nov 06 2026 at 21:57):

So I think, it's worth improving.

view this post on Zulip Steve Howell (Nov 06 2026 at 22:04):

I think you're building a better horse. Which is fair--people still ride horses.

I've mentioned elsewhere that I have a lot of nostalgia for the old way of writing software. And I have nostalgia in general: see #show and tell > BASIC (1964), in Roc (2026)

view this post on Zulip Steve Howell (Nov 06 2026 at 22:04):

So good luck with the project. It should be fun. :smile:

view this post on Zulip notramo (Nov 06 2026 at 22:10):

I think that programming languages are going to become increasingly insignificant, and coding will only remain a fun activity, a hobby. Just like horse riding is a hobby nowadays. Why not get the most fun out of our hobbies?

view this post on Zulip Steve Howell (Nov 06 2026 at 22:21):

I think programming languages are as important as ever. That's why I am a happy Roc user (nothing else quite hits its sweet spots for a major class of the types of programs I write) as well the author of #off topic > shale programming language.

I would agree with a weaker version of your statement, though. Certain things that I would fuss about it in programming languages (mostly syntax) no longer bother me as much.

view this post on Zulip notramo (Nov 06 2026 at 22:22):

I think programming languages are as important as ever.

For some workflows and tasks, yes.

view this post on Zulip notramo (Nov 06 2026 at 22:23):

Basically everything depends on the tasks.

view this post on Zulip notramo (Nov 06 2026 at 22:23):

I have programs that I have vibe-coded and never looked at the code at all, didn't even open a single file from the project.

view this post on Zulip notramo (Nov 06 2026 at 22:26):

On the other hand, sometimes I hand-write code, and don't use an LLM at all.

view this post on Zulip notramo (Nov 06 2026 at 22:28):

That's why I am a happy Roc user (nothing else quite hits its sweet spots for a major class of the types of programs I write)

Why is it that good fit for your workflow? What aspects does it improve? If I coded in a similar workflow, I would probably pick Rust, because it has very large amount of training data and LLMs can write it quite well.

view this post on Zulip notramo (Nov 06 2026 at 22:29):

Or, phrased differently: what makes Roc better than Rust for your workflow?

view this post on Zulip Steve Howell (Nov 06 2026 at 22:42):

I use both languages. I'm not really anti-Rust, but I have more pre-LLM literacy with zig, golang, and Odin, so I would tend to reach for those for things like platform code or dev tools. I now use shale for my dev tools, and that has zig under the hood.

My love of Roc goes back to its Elm lineage. I absolutely loved Elm when I was first learning it, but it's just too restricted in what it does. Roc is more versatile. It's also just a lot of small decisions that Richard Feldman and others have made. Roc has good "taste." I love opaque types in particular.

view this post on Zulip Steve Howell (Nov 06 2026 at 22:46):

Regarding training data, I find that Claude is an absolute sponge when it comes to learning languages. An example of this is my private chat program, which is written in zig. Claude's training was clearly out of date for zig 0.16 (at the time), but it was smart enough to read the zig standard library and immediately grok things like the new I/O system. I also have shale, which cold agents grok completely from quick immersion and a few small docs.

view this post on Zulip Steve Howell (Nov 07 2026 at 01:24):

Going back to Roc, this is my mantra to the agents: If we just get the types right, then almost everything else will be correct by construction. Either correct by construction or in their wheelhouse (algorithms, trig, etc.).

view this post on Zulip Anton (Nov 07 2026 at 07:17):

We still need to improve our caching but I really like our potential there due to the pure/impure split. There may be a lot about a language that many people will no longer care about but I'm sure they will care about iteration speed: fast tests, fast CI and hot reloading.

view this post on Zulip Steve Howell (Nov 07 2026 at 11:25):

Yeah, iteration speed is a huge factor. It's an area where I'm a lot less willing to compromise. So I haven't really written any Python this year, even though I am more literate with Python than any other language I can think of.


Last updated: Nov 26 2026 at 20:35 UTC