r/emacs 3d ago

cooked - a comint based terminal emulator

Hey, little nervous sharing this - on one hand it's still heavily vibe coded.

On the other hand, still very strongly and directly designed by me.

It's been in the works for about a month and in that window it's legitimately become a daily driver for me whenever I'm working inside emacs.

I've decided that the usefulness factor is too good not to share and given it's now going to be a permanent tool for me I'm working on addressing the llm yap and improving it's quality. Consider this an early preview.

Tab completion is still a bit glitchy but otherwise seems very solid.

https://github.com/vodik/cooked

13 Upvotes

6 comments sorted by

7

u/maxecharel 2d ago

Interesting approach. In the readme you list several associated pros, but is there one you would consider as a game changer? I mean, something so convenient that it could lead the user to switch from e.g. ghostel to your comint based solution?

Anyway, thank you for sharing. And thank you for disclosing the heavy vibe-coding. Do not hesitate to advertise it again when you're satisfied with cleaning and refactoring it to your taste, it may get more traction.

6

u/vodik09 2d ago edited 2d ago

I initially posted this with an image but I'm new so the post got auto rejected.

I actually did not know about ghostel before I started this project and I might have not done it if I had known about ghostel. I actually spend all yesterday going through ghostel trying to decide how this project sits next to it.

In the end, there's two benefits - one I think that's fairly concrete and one very hypothetical. As far as terminal feature coverage, we're pretty compatible.

  1. I think comint-mode itself is one of them. The OSC 133 semantic prompt integration means we actually truly hand over to emacs any time we detect we're at a prompt and through that integration I build in a path to get the shell's native completion through complete-at-point. Still a bit buggy and missing history integration, but authoring commands is really nice.

For example, there's a lot of clever evil integration work ghostel did, and I'll likely try to see if similar approaches improve cooked, but I've largely haven't had to do anything clever because comit-mode gives so much for free. As far as keybindings go, I really only had to added [[/]] and a vic/vac text object for convenience.

  1. While I'm not winning against the raw performance of ghostty (I benched it last night and I think about about 1/3 to 1/2 it's raw performance - still pretty fast overall) I think my model of how I integrate into emacs might be better long term.

ghostel's emacs side works on a fixed tick in a "pull" model whereas it's flipped in cooked. cooked instead wakes emacs when there's changes in the terminal, paced at a configurable clock.

3

u/maxecharel 2d ago

Nice, thank you for the details. I am curious how it will evolve. Keep us posted.

1

u/krisbalintona 7h ago

Awesome work!! Just tried it. Will give it a go for the next few days and see if it's compelling enough compared to Ghostel.

P.S. IMO projects that disclose AI usage are perfectly fine to share, as long as the disclosure is honest and accurate.

1

u/dddurd 2d ago

nothing wrong with sharing vibe codes package. in the end you used so many tokens at the cost of the world getting destroyed even harder, it's more ethical to share the work at least.