Live data from Hacker News

Native all the way, until you need text

justsitandgrin.im

11–20 of 328 posts

Re: Native all the way, until you need text

#12
I don’t recall ever struggling with NSTextView. I never really got into Swift, but I’ve never found Cocoa / Objective C to have any of the problems the author mentioned.

Not exactly sure what “streaming” text is, but serial terminal software has been handling incremental text rendering and updating for decades, without performance struggles.

Re: Native all the way, until you need text

#14

I just wish there was a native Markdown renderer / editor library in C that I can use cross-platform - in the style of something like IMGUI (where the library outputs a list of primitives for you to render yourself in any graphics API). Or well... since we now have Claude I might have a jab at this someday in my free time.

For just rendering (no editing) you could use https://github.com/litehtml/litehtml (C) or https://github.com/DioxusLabs/blitz (Rust).

Both are actually lightweight HTML rendering libraries, so you need to compile markdown to HTML to use them. But there are many libraries for that.

Re: Native all the way, until you need text

#16
post #4

How is "performance" defined? Does it take into account the amount of memory required in each case?

The purpose of limiting memory use is so your computer does not become laggy as you run out of memory. We don’t do it for its own sake. But then, what’s the point in using an inherently laggy technique to save memory?

Was going to answer almost the same.

This is my pet project, a desktop app for working with xAI models & capabilities, so by "performance" I mostly mean "pleasant to use" (as it goes, simple & opinionated). Technically speaking, something like: stable FPS, no visible lags, and the ability to scroll smoothly while the model is streaming.

Regarding the parent comment: yes, memory is important, and I absolutely get the point. There should be a red line, for sure. But I will not sacrifice UX, productivity, and simple pleasure from using software just to save a few hundred megabytes of RAM (or even a few gigabytes) especially for an app I spend hours with behind the screen.

Memory consumption can & should be optimised with proper engineering for sure. As lags & inadequate performance in basic SDK-level primitives are much harder (impossible?) to fix from the outside.

Re: Native all the way, until you need text

#17

Show your code, or show you the door. There are so many native Mac and iOS apps out there right now perfectly capable of rendering Markdown and streaming text. You just gotta wonder what is this guy’s excuse.

Without web view ? Share the code ?

Re: Native all the way, until you need text

#19
If you're on macOS, WebKit is a native OS framework. Using WebKit to render Markdown seems completely appropriate.

Now, if you're rendering everything with WebKit, that's ridiculous, in the same way rendering everything with PDFKit would be ridiculous. But for a Markdown view, WebKit seems like a logical choice. There's no need to subsequently flip the table and replace everything with a Chromium web app.

Re: Native all the way, until you need text

#20
post #4

How is "performance" defined? Does it take into account the amount of memory required in each case?

The purpose of limiting memory use is so your computer does not become laggy as you run out of memory. We don’t do it for its own sake. But then, what’s the point in using an inherently laggy technique to save memory?

The purpose of not wasting memory is so we have free memory to use productively.

What's the point of having 64-128GB of RAM if we're using apps that eat 10GB to do the same things we were doing 20 years ago using a few MB?

Post reply on HN