Show HN: A pure-Ruby X11 terminal

(github.com)

8 points | by vidarh 16 hours ago

4 comments

  • a96 57 minutes ago
    • vidarh 51 minutes ago
      Languages evolve. Nobody I know goes around bothering saying "terminal emulator". The last time I touched an X terminal was 30 years ago - I have no intention of bothering with the distinction.
  • kunley 1 hour ago
    I just connected the dots. You're the guy who constructed a direct Ruby-to-assembly compiler some time ago, right?
    • vidarh 58 minutes ago
      Yeah, it's languished for years. I did a stint last autumn to get it to start passing more of Rubyspec, but haven't had time to take it further.

      github.com/vidarh/writing-a-compiler-in-ruby

      It's self-hosting apart from the GC (which is a sore spot - I really want to rewrite the GC in Ruby too), glibc for a handful of functions and syscalls, and using gas/ld to assemble and link.

  • jsrcout 5 hours ago
    > Why? Because I can.

    Always the best reason.

    • vidarh 52 minutes ago
      I find I have to specify this for some of these projects, because rewriting basic stuff like this often has a lot of people asking what the point is...

      But I love small rewrites (this is <3k lines of code for the terminal itself; the font renderer is 600-700 lines or so; the X11 bindings a bit larger) as a means to explore what is really actually needed for the things I do...

  • porridgeraisin 4 hours ago
    > This shows Rubyterm running on my Ruby based WM, running Rubyterm with a text-based-backend that renders a a terminal to text (so it can run in any terminal), running my editor Re editing the Rubyterm example. The text is rendered using the pure-Ruby TrueType font renderer Skrift, and connected to my X11 server using the Pure-X11 Ruby X11 bindings

    Cool

    • vidarh 59 minutes ago
      Thanks. I just re-targeted my editor to use this code to render using the text-based-backend or optionally using the X11 backend, so now I can layer the same renderer even more times...