2,498 karma · joined Jun 6, 2011 (15y ago) · 1,377 submissions
comment 4d ago · link · parent
JJ is much better, and I want the tooling to support it better, but it's not there yet in general.
comment 1w ago · link · parent
See https://github.com/joshka/qwertty-term/. I probably won't keep it updated though as tracking a moving target is tough.
Not quite sure I follow your improvements / need. I'm not really doing anything in the web gpu space though.
comment 1w ago · link · parent
Betamax now supports kitty image protocol pretty well. Should be even better when libghostty-vt for rust drops the 1.0 version. Happy to take issues on it if there's missing bits.
> Not sure if you do this with betamax, but it has been absolutely sick using ntrecord in agent loops. The LLMs make themselves tapes to get to a state and then can look at it to validate or improve. I don't even ask them anymore, they just do the whole thing themselves. I've fixed charting bugs and improved TUI browser conformance this way.
Yup - it's pretty neat to watch the agent build out Ratatui widgets like https://www.joshka.net/ratatui-diff/ with zero code being seen during the process and steering via only screenshots etc. Documented the process here: https://www.joshka.net/betamax/testing/visual-development/
comment 1w ago · link · parent
When I was using the Codex CLI, usually had the TUI open in a VSCode terminal window and would run 4-10 windows. The app cut that effort down a bunch.
I've since moved to using T3 Code, though I do use the ChatGPT app to access dots and ChatGPT Pro, but that's about it.
> Thanks for Ratatui, which certainly has a top tier name
The name predates my involvement in the project by about 1 week :D
> [1] Viewing the gloss README in the Gloss web viewer (Golang WASM in a Ghostty frame), press 't' to typeset it. Alpha release quality. https://nimbleterminal.github.io/gloss/app.html?src=https%3A...
neat :)
comment 1w ago · link · parent
I mention at the end of the post that I'm not wedded to anything in the protocol other than it's what I implemented as a PoC. The exact mechanism isn't the key part that matters. Only the outcome of colored border fragments matters to me.
One part of this though that is pretty necessary is detection of the available modes as the fallback characters to use have to be fairly manual.
comment 1w ago · link · parent
I added the ;) after posting to indicate some amount of good humor. Feel free to read it how you like, but I'm not here to provide insight to someone that literally said they didn't read the post as their first ever comment on this site. Was this your alt?
> No one said don't do anything new.
No. It's literally the first line of the comment I replied to:
> I'm specifically referring to maintainers trying to get new protocols (like border draw calls) into emulators.
> Multiple people said that a proposed new feature to a standard should have proved value, and that patching a standard and its related tools could be a sign the feature isn't as needed as you think.
For some actual insight - I don't think that requiring a standard to have proved itself is a good place to be here. It's literally what I'm asking for here. Find a way to prove this out. Does it work, does it fail in some bad ways. I don't care about the 'make this a standard part'. I literally wrote "I'm not attached to this being the exact solution, but I think it's a problem worth solving, and I'd like it to be more than one terminal's feature (and more than one weekend's worth of yak shaving)." in TFA.
We're living in an age where experimentation is cheap. We can look at ways to find out if these things are valuable by trying them. My blog post isn't about making a standard a standard, we're a long way from that here, it's about working out if it's something people would find interesting and useful in the terminal. As a library maintainer in that space, having seen many many terminal user interfaces, I feel identifying gaps like this is a necessary part that makes things move forward. One thing to note is that experimentation down a path doesn't mean that that path will be accepted / used / useful. We do that in software all the time - HTML blink tag, DHTML, Java Applets, ...
comment 1w ago · link · parent
I've made the point elsewhere that the actual spec is the the bit I care least about on this. There's multiple ways that are valid for actually doing it - DCS, ASC, SGR, CSI, Overtype, etc. - the point of it is to argue for the outcome borders that are are between the cells not using one.
comment 1w ago · link · parent
comment 1w ago · link · parent
comment 1w ago · link · parent
comment 1w ago · link · parent
- When you write cells, you don't have an area of the screen that you can treat as the current area, which makes screen readers have to treat the screen as characters and recompose those back into words to read. You lose any rectangular area concept and treat lines in the terminal as lines that the screen reader reads. Semantically you throw away all the layout information by writing to the terminal.
- When you write stuff to the screen and then write enough lines to the screen to push lines into the scrollback, you lose the ability to change those lines in future. You can move the cursor anywhere in the screen viewport, but not anywhere outside of it. Scrollback is dead text once written there. This is fine for most apps that need append logic, but less so where you have reasons to treat the terminal as a space where you update it or gain access to things like expanding info. e.g. pick up claude code or codex and think about how you collapse a diff or command output to headers and then expand it, in the viewport, not a problem, in the scrollback it's dead text written once.
- There's a mismatch in the way that wrapping works when applied to the screen. If you're wrapping text at the screen boundary, and letting the terminal select across lines, it hits the edge of the terminal, and wraps to the next line. There's no concept of the edge of a block, because cells are the base level primitive. This affects selecting text, copying it, etc.
- Resizing terminals after stuff has written requires repainting the existing screen and then taking care about what was written to the scrollback history. E.g. if you have 200x50 and resize to 200x49, the top line just entered the scrollback and is now part of the history that you can't edit. Unless you clear the entire scrollback and repaint. Again similar problem and reasons. Resizing to 199x50 is worse, because you lose a character on each line, and push stuff into scrollback. And also the opposite 200x51, you just pulled a line from the scrollback now, so now you have to consider what to write back to that line later - what was dead is now alive again. These problems make writing terminal coding agents that rely on having interactive parts of the screen and history parts of the screen tough.
- Scrolling in general. If you look at how each terminal scrolls, and how many lines it maps to each mouse scroll wheel action, it differs per terminal, and it differs based on mouse / trackpad use as well. The events you get are not standardized in count, frequency, acceleration, ... This makes doing anything related to scrolling when you own the entire screen and scroll state a pain as you're trying to emulate the terminal's native feel and that differs a bunch. So there's a strong missing abstraction over scroll state things instead of just plain mouse events. Having a terminal and app level collaborate to tell where the scroll is up to is the approach that seems to be necessary here.
A lot of this comes from the fact that terminals are a mix of standards tracing back many years, stacked on top of each other, implemented poorly or not at all, ECMA, VT, DEC, iTerm, Kitty, OSC, ASC, DCS, SGR, ... and they all deal in cells being the basic primitive rather than the higher level semantic thing you need to do a TUI that is region aware. That's a impedance mismatch that is hard to bridge without a new standard that just sidesteps it completely.
If you look at the history of Codex / Gemini / Claude Code, they've each run into this problem a bunch over time and solved various bits of it / ignored other bits of it.
comment 1w ago · link · parent
I think there was some discussion about this last time I mentioned the idea on hn a few weeks / months back. Trawl my history to find it pehaps.
comment 1w ago · link · parent
It solves the z-index problem neatly for an individual cell as you just render in order (first underneath, second over the top). But it doesn't solve the order for adjacent cells - borders that lie between cells. At least not easily. Not an insurmountable problem.
Some perspective if you're unaware. Fonts have the unicode line drawing characters, but fonts don't align super well and so a good terminal will draw those characters with line drawing algorithms instead of as a font. I've got a WIP PR that I need to land in VSCode's that pulls in xtermjs and ghostty's line drawing stuff so that it fixes up all the existing gaps on that as an example of this problem.
comment 1w ago · link · parent
The test app has a key to turn that off see https://github.com/joshka/ratatui/blob/joshka/cell-borders/C...
The side gaps were for for making it feel balanced in the screenshots and visualizations to be able to show where the borders line up with cells easily etc. It wouldn't be what I'd use in a real app.
One thing to note though is that some things which are "wrong" can be aesthetically pleasing to look at and may be the actual best UX in certain situations. There's a lot of new design principle work (especially in macOS / iOS) that is about things going past the edge, or being overlaid with floating things. Some of this is "wrong" some of it is wrong, and some of it sitting in in the useless gap beteen the two. ;)
comment 1w ago · link · parent
I used ratatui there mostly so that I could prove that it would work in real looking apps that do panels and similar stuff that benefits from borders.
But yeah, compat is key. It would probably go out to ghostty, rio, kitty pretty easily, terminal.app never, other terminals much slower. IDK about the windows / linux side of things.
comment 1w ago · link · parent
comment 1w ago · link · parent
comment 1w ago · link · parent
It's kind of funny, I posted this here and there at similar times. Expected to be spam flagged there due to the anti-AI brigade, but my submission here was the one that actually got hit (likely because I disclosed AI use in the post body is my guess).
comment 1w ago · link · parent
There's some bits that feel like they probably make sense to consider doing other ways, like how border placement works (inside, outside, on the border, etc.), and how the filling works - to make borders incorporate external or internal padding.
comment 1w ago · link · parent