Ratty – A terminal emulator with inline 3D graphics

(ratty-term.org)

360 points | by orhunp_ 5 hours ago

54 comments

  • pjmlp 3 hours ago
    UNIX still trying to catch up with Xerox workstations in the REPL experience, or general Lisp machines for that matter.

    Inline graphics from 1981,

    https://youtu.be/o4-YnLpLgtk?t=376

    • steezeburger 1 hour ago
      That's not 3d
      • pjmlp 15 minutes ago
        The example on the linked video it isn't, correct.

        Here is another video, this time with S-PACKAGE used to develop Nintendo 64.

        https://www.youtube.com/watch?v=gV5obrYaogU

        Which given the REPL capabilities, you can easily embedd them on it, just like the other video.

    • pocksuppet 3 hours ago
      Or TempleOS.
      • mghackerlady 2 hours ago
        People joke about templeos a lot, but it had some really neat ideas (holy-c is a pretty nice language)
        • tombert 12 minutes ago
          I've dug around the TempleOS codebase a bit, and while it certainly is impressive for a single guy's work, I think there's been an overcorrection where people act like Terry was some hyper genius instead of "a pretty smart guy".

          I kind of got the impression that whenever Terry didn't know how to do something, he would just convince himself that that's not what God wanted anyway and stop doing it.

        • nurettin 1 hour ago
          It should have been HolyBasic. Mistyping a HolyC indirection in an editor causes the OS to crash.
          • pjmlp 15 minutes ago
            We would still have an issue with bad POKEs though.
      • Onavo 3 hours ago
        That was a work of art. Also Oberon.
        • em-bee 1 hour ago
          and plan9

          also smalltalk

          we used oberon in one class in university. i don't remember much unfortunately.

        • whywhywhywhy 2 hours ago
          >work of art

          more like theopneustos

          • d-us-vb 49 minutes ago
            Even Terry Davis wasn't that bold.
            • drakythe 40 minutes ago
              Given that Terry described the manic episodes as "a revelation from God" I think theopneustos is an accurate description. It just means "God Breathed" or "Inspired by God"
      • jszymborski 1 hour ago
        I came here to mention how it reminded me of the sick 3D icons TempleOS had in its terminal
  • joouha 1 hour ago
    It's very interesting to learn about the newly proposed glyph protocol [1] in the linked blog post. I was bemoaning the lack of exactly this here about 6 months ago [2]!

    [1] https://rapha.land/introducing-glyph-protocol-for-terminals/

    [2] https://news.ycombinator.com/item?id=45805072

  • CTDOCodebases 2 hours ago
    "Don't worry, all of these dependencies are worth it."

    That had me in stitches.

  • noelwelsh 3 hours ago
    I like this. No reason the terminal should only support text. Data science notebooks show one way the terminal can evolve. Lots of interesting stuff happening in this space, with Kitty probably being the most aggressive innovator here [1]. I'm not sure there is an overall vision, though.

    [1]: https://sw.kovidgoyal.net/kitty/protocol-extensions/

    • joouha 1 hour ago
      No evolution necessary! With my project, euporie [1], you can have use your data science notebooks with graphical image outputs, HTML, LaTeX, etc, all in the terminal.

      [1] https://github.com/joouha/euporie

    • panki27 1 hour ago
      I managed to get `pyvista` to render arbitrary 3D shapes directly to the terminal using kitty graphics. It's a giant hack, only way to make it performant is using shm.

      https://git.theresno.cloud/panki/kglobe

    • bcjdjsndon 3 hours ago
      Terry A Davis already did this. It was as crazy then as it is now
      • ch4s3 2 hours ago
        The person who built this directly cites Terry as the inspiration.
      • Wololooo 2 hours ago
        Obligatory Temple OS unhinged video.

        https://www.youtube.com/watch?v=o48KzPa42_o

        Joking apart, the whole thing was both an exercise in madness and genius. Sometimes I wonder what he would have done if he had not gone crazy. We will never know...

    • alias_neo 3 hours ago
      I wonder if something like this could work for thumbnails in the terminal; I prefer to browse my filesystem from a terminal rather than the point and click file manager typically, and it would be really useful if I could have a grid-style `ls` with terminal based renders of the 3d models (thinking STL/STEP, 3D printing) in that directory. Bonus points if I could preview/rotate the model to inspect it.
      • em-bee 31 minutes ago
        as a compromise i started using nemo/nautilus with a plugin that puts a terminal at the bottom of each tab. so i have a graphical view of the terminal but a commandline in the same folder right next to it. the two don't interact other than being able drag and drop filenames from the filemanager into the terminal, so it is far from what we really want, but it's a small start.
      • noelwelsh 2 hours ago
        eza [1] is a step in that direction. It lacks the interactivity, however.

        [1]: github.com/eza-community/eza

      • calvinmorrison 2 hours ago
        You can do this with thumbnails using sixels already
        • kjs3 1 hour ago
          You could probably do something interesting with Tek 4014 emulation, but I think you're right that sixel would be slick.
    • the_other 2 hours ago
      Mix this 3d graphics, with data science notebooks, with local LLMs, and perhaps an integrated coding harness, with visibility over your personal data and you’d have something absurdly good.

      This might overtake “a haiku+macOS mashup” as my idealised computing future.

      • miah_ 2 hours ago
        At that point you've re-invented emacs.
        • em-bee 11 minutes ago
          well, almost. if emacs offers a graphical file manager i'll consider using it. this seems to be a start: https://github.com/emacs-eaf/eaf-file-manager. the file manager needs to also integrate with a terminal though so i can run unix commands in the same directory. and it needs to support mouse-based operations too. finally, and that's the real kicker, i'd like a better integration of the terminal output and the graphical display by supporting the passing of structured data that the display knows how to handle without terminal escape codes. those need to go away. (which is why sixels are not a solution either)
        • mghackerlady 2 hours ago
          Greenspun’s Tenth Rule of Programming states that any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.
    • sublinear 2 hours ago
      > push the state of terminal emulators forward

      What's overlooked here are the insane political and economic forces that were required to get anywhere close to the (sort of!) consistent implementation of plain text we have today. These projects try to piggyback off that success yet only contribute back harm. We have standards for a reason.

      I'm not saying people can't have fun, but don't try to start a cyberpunk-inspired revolution and then blame the side effects of groupthink and software rot on everyone else when it goes sideways.

  • sigseg1v 4 hours ago
    Seems... really good?!

    Questions:

    - rendering capabilities of this seem like it should also be able to handle 2d well, or am I mistaken? every solution I see for getting high quality 2d images or rasterization in terminal is all pretty bad. Could this do better than other solutions or is there a fundamental limit being hit somewhere?

    - What happens with ssh given that this is gpu accelerated?

    • the_gipsy 56 minutes ago
      The kitty graphics protocol is pretty good. Ghostty implements it fully.
    • berkes 3 hours ago
      There are quite a few GPU powered terminal emulators around already.

      Is that what you're looking for?

      • jetbalsa 2 hours ago
        I think they are looking for full 2d graphics, bitmaps, sprites and the likes.
  • amelius 3 hours ago
    Terminal is slowly becoming a full featured web browser.
    • iugtmkbdfil834 3 hours ago
      Always has been meme incoming. Also, more seriously, the purpose of a tool is to do a job. The question becomes whether this tool can be made useful. I.. honestly don't know, but I will be finding out soon:D
    • microflash 2 hours ago
      Or Terminal is already a full featured web browser?

      https://hyper.is/

    • yagizdagabak 1 hour ago
      i have been waiting for this.
    • tekla 2 hours ago
      Isn't there a Terminal that renders everything with React?

      Super slow, but I guess thats what web devs want.

      • EMM_386 2 hours ago
        There are terminal libraries that do this:

        https://github.com/vadimdemedes/ink

        Which is what Claude Code CLI uses (or was using?) and it caused many issues such as flickering, thrashing, and latency.

    • shevy-java 3 hours ago
      And rightfully so! \o/
  • Panzerschrek 30 minutes ago
    The question is - why do we still need the terminal abstraction at all?
    • pjmlp 14 minutes ago
      I would argue that a proper REPL is much better.
    • dkersten 28 minutes ago
      That’s what I came here to ask. Their demo looks like Compiz back in the day: ok, cool, you have 3d effects, but… why? What does it do for me?

      Compiz 3d effects were ultimately a useless gimmick and I predict this is too.

      • reaperducer 6 minutes ago
        Lack of imagination doesn't mean this isn't innovation.

        It's the ability to convey more information in less space.

        Top-of-my-head notion: The cursor spins (or changes in another way) to reflect CPU use, or bandwidth use, instead of taking up space elsewhere on the screen.

  • HumblyTossed 20 minutes ago
    How long until we have a web browser in a terminal (not just Lynx, but a full on web browser)?
    • PUSH_AX 13 minutes ago
      Soon it will just be browsers all the way down.
    • mghackerlady 10 minutes ago
      there was a project that rendered firefox to the terminal through box drawing characters. When libweb is more complete I kinda want to do something similar
  • iugtmkbdfil834 4 hours ago
    Rip Terry. May you never be forgotten.

    edit: But your spirit lives on ( based on the project:D )

    • arusahni 32 minutes ago
      As do his sprites.
  • liamwire 2 hours ago
    You had me at spinning rat cursor
  • pelagicAustral 4 hours ago
    Can I really render a 3D rat on my terminal? If I can then I'm sold.
    • mghackerlady 2 hours ago
      I saw it this morning on reddit, the I beam was replaced with a spinning rat for the demonstration. It was very cool B)
    • sevenzero 4 hours ago
      This is exactly what I thought as well.
  • arkwin 2 hours ago
    We are one step closer to the terminal in the movie Hackers, and I am all for it.
  • injidup 19 minutes ago
    Anybody remember "wobbly windows"? It never sticks.
    • mghackerlady 8 minutes ago
      I have wobbly windows on whenever I use KDE. I like how it gives the movements more momentum, though I have it turned down by a lot so it isn't distracting
  • darkwater 3 hours ago
    What would happen when you use `cat` in Ratty then?
  • basilikum 4 hours ago
    This looks a lot like it'd qualify for a ShowHN. Add "ShowHN: " to the beginning of the title and it should show up in /show
  • rs545837 45 minutes ago
    Damn this was really fun to use.
  • chakintosh 38 minutes ago
    People complain about token limits

    Then spend their tokens on abominations like this

    Make it make sense

    • Gracana 0 minutes ago
      > Make it make sense

      It's not hypocrisy when different people do different things.

    • torben-friis 31 minutes ago
      I much prefer seeing tokens used for silly fun stuff, rather than sad get-rich-quick attempts like filling YouTube and Spotify with LLM crap.
    • gosub100 7 minutes ago
      Did this developer complain about token limits?
    • kspacewalk2 32 minutes ago
      I mean... Why not?
  • hartjer 20 minutes ago
    "Your scientists were so preoccupied with whether or not they could, they didn't stop to think if they should." - Jeff Goldblum (OG Jurassic Park)
  • gorgoiler 1 hour ago
    Hah, reminds me of the Quantel broadcast equipment on the 1990s. Why fade to black when you can fade to 3d butterfly!?
  • mohamedkoubaa 3 hours ago
    Emojis in a terminal are a step too far for me. This is just... Indulgent.
  • lackoftactics 2 hours ago
    Hantavirus inspired?
    • xrd 1 hour ago
      You should know that using a TERMINAL instead of a BROWSER ON THE DANGEROUS INTERNET is the ONLY WAY to *avoid* viruses!
  • Bluescreenbuddy 7 minutes ago
    Another terminal to murder your battery life
  • brunoborges 25 minutes ago
    Cool... why?
  • namar0x0309 1 hour ago
    More of this please! Outside the box thinking! Yes and yes!
  • 2ndorderthought 4 hours ago
    I actually see some use cases for this. It's one of those should be nonsense projects that somehow isn't.
    • panzi 3 hours ago
      What use cases do you see?
      • 2ndorderthought 3 hours ago
        Checking 3d models in a directory inside my terminal to see what's what without opening an application and clicking 100 times.
        • a96 2 hours ago
          .. over ssh. In a tmux. After disconnecting and reconnecting.
      • drob518 3 hours ago
        Yea, gotta be honest here; I’m struggling to see many use cases here other than 3d graphs. I really don’t need a spinning 3d rat cursor.
      • jayGlow 2 hours ago
        we could bring back the 3d file browser and render it in the terminal now.

        https://youtu.be/dFUlAQZB9Ng?si=3fE-vE8xF5rSVhRR

      • herrj 1 hour ago
        pranking your co-workers
      • avaer 3 hours ago
        Game development.
  • silon42 3 hours ago
    IMO, next crazy step is for terminal to just have wayland or X11 protocol ? (/s or not?)
  • semiinfinitely 12 minutes ago
    temple OS?
  • tootie 27 minutes ago
    Make me think of the infamous Unix scene in Jurassic Park.
  • voidUpdate 4 hours ago
    I was going to comment how it reminded me of TempleOS and the author should look into that, but the accompanying blog post explains how it was inspired by it https://blog.orhun.dev/introducing-ratty/
    • iwontberude 4 hours ago
      [flagged]
      • hailruda 4 hours ago
        User name doesn’t checkout.

        Any technical reason for such a strong opinion?

        • iwontberude 4 hours ago
          He constantly used the N word to describe black people and always was warning people about how evil black people were. I’m not making this up, go watch his streams.
          • iugtmkbdfil834 4 hours ago
            Hold up.. is that your definition of a technical reason?
            • iwontberude 4 hours ago
              Yes and I can appreciate why you don’t see it as technical, but software should be made to help users. I was brought up the ACM way.
      • AntiUSAbah 4 hours ago
        It looks like he has schizophrenia which I would argue is a mental illness, a strong one.

        Why are you so invested in TempleOS?

        • iwontberude 4 hours ago
          Mental illness is no excuse for vile white Christian nationalism and hate against blacks. Miss me with that ignorance.

          It’s clear how hateful he is from just watching his streams. It’s not a tick or a symptom of a clinical issue, it’s a deep seated belief that was only exposed to us because of his schizophrenia.

          Yes I have empathy for him and I also recognize that he is a menace and probably is better unknown. We are spoiled for choice anyways.

          • AntiUSAbah 4 hours ago
            So just to be clear, a human being can't think properly / straight anymore, has issues forming a coherent worldview, has regularly crazy maniac phases were he would drive like 100 miles, dismantle his car, throw away his keys but you do not accept any of this as a reasonable excuse that that particular human is not able to break out or even manifests stereotypical thoughts?

            The mental base mode you are born, is a community of christians, parents forming your mind etc. and you have to break out of this, formulate your own independet worldview. A lot of people can't do that today. All religios people in fact.

            Plenty of woman can't break out of absuve relationships, familys protecting someone inside the family even if they are rapists due to "family is family; what would others think of us" etc. and thats were you draw the line for that Human being?

            • bonsai_spool 3 hours ago
              > Plenty of woman can't break out of absuve relationships, familys protecting someone inside the family even if they are rapists due to "family is family; what would others think of us" etc. and thats were you draw the line for that Human being?

              I think you're being fair overall, but I would also say that OP in this thread reply is highlighting something worthwhile. If Terry were a misogynist, I don't think this thread would have taken as long to recall his abnormal behavior. But that's just, like, my opinion.

      • rvz 4 hours ago
        It is just software. TempleOS and this project just looks cool.
  • randusername 2 hours ago
    Here's the bit from the blog post about it:

    > When I first got introduced to [TempleOS], I was shocked and impressed by the flashy colors, graphical sprites and uncomprehensible UI. There are so many things that makes it so unique, weird and fascinating at the same time, somehow.... Basically, the command line becomes the direct interface for everything. You can write code, interact with the system and render graphics all in the same place, which is why TempleOS feels so unusual compared to conventional operating systems.

    I think this could be a really cool approach. I enjoy tools like Chafa, imgcat, etc but something always feels a little clunky about the separation between text and images. Paradoxically having text and non-text all jumbled up like this feels better somehow.

  • wolvoleo 1 hour ago
    This would be nice in VR
  • kandros 21 minutes ago
    Expect to see Orhun in here before clicking, not disappointed
  • whywhywhywhy 2 hours ago
    I was gonna comment here "real TempleOS vibes" then the TempleOS logo appeared a moment later in the demo video.
  • sgt 2 hours ago
    How do I enter zoom mode or pan mode?
  • neomantra 4 hours ago
    Really fun project! Dude, I spent the last week implementing Kitty Graphics and Clipboard protocols in ghostty-web in the Canvas render.

    Then I added WebGL and WebGPU renderers [1], including support for Kitty.

    Then I see this this project on a Monday morning... so now I have to implement Ratty Graphics Protocol?!?! [2].

    ETA: I looked into this; Ghostty would need patched to support Ratty since Ghostty-Web now defers APC handling there. It would also require pulling in a 3D engine like three.js or otherwise implementing file parsing, lighting, etc. Finally, since local filenames are part of the protocol, a browser would need some file resolver helper, either to get the data over the APC channel or via a URL.

    [1] https://github.com/NimbleMarkets/ghostty-web/tree/nm-webgpu

    [2] https://github.com/orhun/ratty/blob/main/protocols/graphics....

    • kokey 1 hour ago
      I am a bit surprised that I had to look hard for someone to mention Ghostty in the comments.
  • olivierestsage 2 hours ago
    In a world of slop, one truly noble project emerges
  • gosub100 1 hour ago
    Has anyone tried to create 3D fonts? It sounds like a ton of work but might look cool if done correctly.

    You could also do really cool text highlights by working with light sources and shader effects

    Another feature I'm looking for is smooth scrolling when you hit enter. I've had debates before where they claim it's not possible, that the text must jump one line. But I think it's possible, by shifting the frame buffer up.

  • austinrm 20 minutes ago
    Excited to see others equally inspired by TempleOS’ 3D feature :)

    I tried something similar a few months ago that acts more as a library to ratatui than a separate terminal emulator [0].

    Was surprised how far one can get using some off the shelf characters like half-block when rasterizing.

    The Glyph protocol mentioned in the blog post is interesting … perhaps custom glyphs could help smooth some of the (literal) rough edges from the low effective resolution of a terminals character grid.

    [0] https://github.com/limlabs/ratatui-3d

  • drakythe 38 minutes ago
    My first reaction: "But why?"

    My second reaction: "Oh wait is that TempleOS being cited? This is either awesome or terrible."

  • nickcageinacage 3 hours ago
    so cool. well done
  • iugtmkbdfil834 3 hours ago
    Dude. Congrats. You actually made a compelling argument to put rust on my machine:P
  • BaardFigur 2 hours ago
    Reminds me of TempleOS
  • lioeters 2 hours ago
    > inserted 3D objects in the demo above are actually from the TempleOS codebase itself

    Brilliant. The dream lives on! This is the best form of paying respects.

    It's walking a fine line between madness and genius, and who knows if it'll ever be practical, but more important is the sense of wonder and "fuck yeah" as King Terry expressed so eloquently.

  • shevy-java 3 hours ago
    This is a great idea. I always wanted KDE konsole to e. g. show images inlined as is. This is possible via magick six:-, but I wanted this to be natively. I want the terminal to be able to work with any data and display it in any way. No need to simulate the 1980s era anymore (except for backwards/legacy support). So great idea here really.
    • berkes 3 hours ago
      Kitty and several other terminal emulators, have built in graphics display already. IIRC, this is called the kitty protocol, but I might be mistaken.
    • anthk 3 hours ago
      I did that with Sixels, no Rust needed, no 3D crap, no ad-hoc addons, just old vt340 support in XTerm.

      That's how I read images under a remote pubnix with tut using a Mastodon account over plain SSH.

      Chafa and XTerm. It works.

      • kjs3 1 hour ago
        I would like to subscribe to your newsletter.
  • Lucasoato 4 hours ago
    Imagine this with VR dev environments!
  • infoinlet 3 hours ago
    [flagged]
  • specwiseai 2 hours ago
    [flagged]
  • openclawclub 4 hours ago
    [dead]
  • user5589 2 hours ago
    [flagged]
  • tester121 3 hours ago
    [dead]
  • cgaooo 1 hour ago
    [dead]
  • soupspaces 3 hours ago
    [dead]
  • rullelito 2 hours ago
    Can anyone explain why this is novel? It seems pretty basic?