Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> ChatGPT can do it.

This is truly the kind of suggestion that makes me wonder about the energy efficiency of websites.

To me it seems, that many web developers/designers are so happy with the fact that what they are doing actually works, they often forget other (more boring?) considerations like stability, maintainability, resilience, efficiency and such.

We have a LEGO set with infinite pieces and a good website in my eyes doesn't try to use as many as possible of those, but to use just as many as needed while still getting what you aim for.



Additional thought: The problem space of how to break a specific text depending on the size of a window is sort of limited as well. So if someone had the idea to solve this using machine learning, the best idea would be to run these calculations once (per page, serverside), and then just use a lookup table or something of the sorts after. Just store the line break positions for each text on the page for all possible widths that make sense and check that table when rendering.

This has the advantage that a human typesetter could output to this format as well or they could correct the machine generated output.

As there is a limited number of ways to break text the table wouldn't even have to store all pixel widths, just those at which the words break differently.




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

Search: