Recent submissions

Comment · 9 months ago
I've been working on Yetty, a terminal emulator that uses WebGPU to render not just text, but also images, PDFs, plots, and interactive widgets directly in the terminal grid.

  The core idea is "cards" – rich content blocks that occupy terminal cells and scroll with your output, similar to Jupyter notebooks but in a proper terminal. You can display a
  matplotlib plot, and it scrolls up with your shell history.

  What's implemented:

   - MSDF font rendering (crisp at any zoom)
   - Bitmap glyphs for color emojis
   - Shader glyphs for animated spinners
   - Cards: images, PDFs, plots, vector graphics (SVG/Lottie), ImGui widgets
   - OSC escape sequences and RPC for card creation
   - Builds on Linux (macOS/Windows untested but should work)

  What's honest:

   - Test coverage is limited (we're moving fast)
   - Currently builds with Dawn backend only (wgpu-native may not work)
   - It's not a daily-driver replacement for your terminal yet
   - Documentation is sparse

  Built with libvterm, Dawn/WebGPU, FreeType, msdfgen, and GLFW. MIT licensed.

  Looking for contributors and feedback. If you've ever wished your terminal could show inline graphics without hacks, I'd love to hear your thoughts.

  GitHub: https://github.com/zokrezyl/yetty (https://github.com/zokrezyl/yetty)
Comment · 10 months ago
It's fine and thank you! I am playing arround with the idea, in theory all is good.. Only thing is that things like "first non ..." often involve branching that corrupts the prediction ability of the CPU. Therefore I kindly invited you to show it in code.
Comment · 10 months ago
Do you mind trying out your solution? The code is in https://github.com/zokrezyl/yaal-cpp-poc Thanks a lot!

Obviously if your solutions gets closed to the memory bandwith limit, we will proudly mention it!

Comment · 10 months ago
Thanks for the suggestion. Indeed, that would be the first approach. That is how I started. This is however not considering the state (am I inside a 'statement' or not)

statement meaning string from first non-space till next EOL or EOF.

Problem starts when you need to cover the "corner cases". Without the corner cases the algo is not algo.

Comment · 10 months ago
Comment · 10 months ago
Comment · 10 months ago
thanks for pointing out! I tried the borrowing trick from the previous segment, was pretty obvious, but for some reason failed as could not avoid at least one conditinonal... will try again.
Comment · 10 months ago
Comment · 10 months ago
I do not have one "implementation" but have been trying with different approaches that all delivered under 50% of memory bandwith... I guess if anyone can purpose a solution should be from scratch... The problem is that all approaches I tried end up generating unpredictable branches that do not allow the CPU to optimally keep loading text from memory.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton