Better HN
topnewbestaskshowjobs
Log inSign up

trimental

14 karma · joined Aug 22, 2022 (4y ago) · 6 submissions

Submissions

comment 4y ago · link · parent

Just a little update on this PR #34 adds live reloading of files. I was considering adding support for vim-markdown-composer but its now easy to just `inlyne README.md` and have it automatically update as you write instead.

comment 4y ago · link · parent

Glyph rendering is done (through a rust crate called ab-glyph) by computing glyph vertices on the CPU, and then rendering and storing the glyph textures to the gpu. Layouts are calculated on the CPU.

comment 4y ago · link · parent

The terminal statement is false. In fact I contributed an Alacritty feature that stopped rendering when the window was occluded that cut CPU usage from ~10% to ~0.4% when not visible. There's also a misconception on what GPU's are useful for. Being the graphics processing unit they are much faster for processing images and glyph graphics then the cpu.

comment 4y ago · link · parent

Thanks for this. It's great to get suggestions on improvements.

LaTex rendering might be very easy or very hard depending on the rust ecosystem for it, so I'll look into that. And I'm not too surprised it doesn't work with vim markdown composer but if it's a simple enough mechanism it'd be a great feature. Vim bindings could very easily be done though :)

comment 4y ago · link · parent

Thanks for the question. Markdown files are basically html files with syntax sugar, and a lot of markdown files directly use html. So to properly render most files you need a basic html renderer at minimum. Although yes, you don't need the other features of a browser but typically most markdown renderers are either web-based (GitHub) or electron based (VS Code).

GPU rendering helps for scaling images, rendering text and drawing other primitives efficiently. It frees up CPU time, and can redraw many times faster in scrolls and resizes. This is why most browsers use the GPU when most web content is 2D. GPU's don't really crunch huge numbers but instead utilise parallelisation.

6.

Show HN: Inlyne, a GPU powered, browser-less, Markdown previewer(github.com ↗)

25 points · by trimental · 4y ago · 12 comments