Hacker Newsnew | past | comments | ask | show | jobs | submit | sethaurus's commentslogin

What you're missing is that each segment (typically a word) only needs to be measured once, in the setup phase. The canvas gets thrown away after that, and subsequent layout passes all reuse the cached measurements.

If you only perform layout once, it doesn't save any work. If you need to reflow many times, it saves a lot.


Are you sure the browser doesn't similarly cache it's own layout calculations?

I'm sure the browser does do that, and plenty of other optimisations too!

This thing isn't trying to do standard text layout faster than the browser, it's trying to enable more exotic/dynamic/custom layouts while keeping reasonable performance. Take a look at the demos linked in the repo's readme; those are things which the browser's layout engine can't do on its own.


It's a matter of integrity. Support or oppose whoever you like, but if you change your principles based on the person in question, then you don't have principles at all.

Are you pro or anti touchdown? Do you support or oppose winning? Is supporting my allies winning and enemies losing wrong?

Why not, people are different and principles can account for that. It might mean that your alignment isn't fully lawful.

The world became a much more fun and interesting place for me when I stopped rejecting things on the basis of cringe.


Good for you. Have you seen her performance art?


I saw a docco about her and found it entertaining and interesting. I haven't seen her work in person, have you?


> Or do they tag things and say "Customer X signed up on this date, so he is bound by T&C number 12, whereas this other customer signed up a year later and is bound by T&C number 13". That seems unwieldy since there is a common infrastructure.

If the company would like their T&C to carry the force of a binding contract upon me, then yes, keeping track of my agreement seems like the absolute bare minimum they must do.

Either these things are real contracts or they are not. The idea that it's too onerous for a company to keep track of its contractual agreements is absurd. That's giving them all the benefits of a real contract with none of the obligations.


That's what it would mean to place them above unpaid developers in the illustration, yes.


For anyone seeking more details on this act, it is embodied as "18 U.S. Code §1030 - Fraud and related activity in connection with computers"[0], and applies specifically to the United States of America, a nation not involved in any way with this incident.

[0]: https://www.law.cornell.edu/uscode/text/18/1030


Thrilled to see someone else using a triple-em dash in the wild⸻keep holding the line.


Upload progress. The Fetch API offers no way observe and display progress when uploading a file (or making any large request). jQuery makes this possible via the `xhr` callback.


It's silly to treat this like a totalizing partisan issue where everything must be clearly "pro-ai" or "anti-ai".

Browsers are currently incentivised to add a bunch of new features outside their traditional role. Some people prefer to keep the browser's role simple. It's not ideological and it's not "hating".


It doesn't matter if a library is written in TS or JS; you cannot meaningfully protect against other code calling you incorrectly.

Sure, you can check if they gave you a string instead of a number. But if you receive an array of nested objects, are you going to traverse the whole graph and check every property? If the caller gives you a callback, do you check if it returns the correct value? If that callback itself returns a function, do you check that function's return type too? And will you check these things at every single function boundary?

This kind of paranoid runtime type-checking would completely dominate the code, and nobody does it. Many invariants which exist at compile-time cannot be meaningfully checked at runtime, even if you wanted to. All you can do is offer a type-safe interface, trust your callers to respect it, and check for a few common mistakes at the boundary. You cannot protect your code against other code calling it incorrectly, and in practice nobody does. This is equally true for JS and TS.


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

Search: