Hacker News new | past | comments | ask | show | jobs | submit | leeoniya's comments login

maintainer of uPlot here :)

they're about same for line chart rendering when using decimation in both.


yep, looks like it!

yep, uWrap internally builds a lookup table for char pairs that differ significantly in width together from just adding their raw widths.

we needed something like this for virtualization of the Table panel, data-heavy dropdowns, and long list views in Grafana. so i guess that's a three-in-one?

i looked for the fastest thing i could find but canvas-hypertxt wasnt accurate enough and allocated an array of split lines per item, which is really wasteful when all you need is a line count. i forked it with some optimizations which improved perf by 60% but still suffered from the accuracy issues. so then decided to DIY my own strategy, and uWrap is the result.


> As an old school print designer, I would love to see a return to a web with multi-column text on desktop, that reformatted to single column on mobile, and graphics runarounds much more complicated in shape than what a float can do.

this has been possible for quite some time with CSS columns:

https://developer.mozilla.org/en-US/docs/Web/CSS/columns

plus media queries for desktop vs mobile layouts:

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_q...


Without sarcasm, that's great. Now what is there to prevent me from scrolling up and down on a 16:9 display to read the left column of a 10k letter text and then the right column?

I see it has "length" and "min/max-content" properties... even if there are sufficiently many <p>aragraphs (for vertical splitting), inevitably enough paragraphs will be single column due short length. So it becomes a mix and match between "here we were able to split into columns, and here you get a full width single column text flow"?

PS: Oh and don't get me on the CSS used to determine mobile layouts. My 9:16 4K often enough triggers that degraded experience of mobile.


> Now what is there to prevent me from scrolling up and down on a 16:9 display to read the left column of a 10k letter text and then the right column?

if the author decided on exactly 2 columns then, well, that's not a limitation of the tech. css columns support dynamic columns, but obviously the author would then need to specify a max height.

> My 9:16 4K often enough triggers that degraded experience of mobile.

again, sounds like incompetent authorship rather than a tech limitation.



<3

To be clear, the use case of this is anything where I have lots of text on a canvas? Like, a canvas based game with thought bubbles or something like that?


it's where you need to know the wrap points of some text given a width of the container. since Canvas does not offer text wrapping, that is one use case, because you have to wrap manually.

my use case is determining the height of a table cell given a specific column width and text that needs to be rendered inside.


vibe layoffs

"it's gonna be wild"

Gulf of America would like a word...


> remembering the compression rhythm with a Bee Gees' song mnemonic

i prefer the Queen song mnemonic :D


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: