Live data from Hacker News

Show HN: Stretch – A high-performance cross-platform layout engine in Rust

vislyhq.github.io

41–50 of 59 posts

Re: Show HN: Stretch – A high-performance cross-platform layout engine in Rust

#41

Interesting! It seems this is a rewrite of Yoga, by the same author, seen by another comment in this thread. So why start again using flex box as a layout engine? For example, there isn't really a good, equally as rich, grid layout engine yet. Also curious what the intended goal with conformance is, as the README states this project has a secondary intent to be more in line with the CSS spec? Personally for me any la…

Interesting. Overall, I love iOS constraint engine and really really really miss it when I port things to Android. It's not a universal solution, there's always a point where you flip and do your own layoutSubviews on complex stuff. How does this compare?

Re: Show HN: Stretch – A high-performance cross-platform layout engine in Rust

#42
post #8

> Stretch is tested against Chrome to ensure 100% web compatibility Erm, no. That’s testing Chrome compatibility (though it’s probably the only one easy enough to test). Chrome is often rushing ahead to implement features that are either not standardized yet, or will not be standardized, or break exisiting standards and compatibility.

Ironic, too, since Rust is a Mozilla project, designed in large part to keep Firefox competitive with Chrome by allowing low-level optimizations, yet preventing most problems with memory leaks.

Re: Show HN: Stretch – A high-performance cross-platform layout engine in Rust

#44

Earlier quoted context omitted.

> Chrome is, however, proprietary and driving further that way. Given that all the relevant bits are in Chromium (sans Widevine, which is a whole subject on its own) this is not a strong argument.

Forking Chromium won’t help you if Chrome’s market share is so overwhelmingly large that it can basically force its ideas down the web’s throat.

If you're worried about there being a browser monoculture, being able to fork is useful but not sufficient. For example, suppose Microsoft's new browser gets a large enough share that they (along with Firefox) can veto some of Chrome's changes? Since they have enough technical competence and resources to maintain a branch, upstream doesn't control what they release; they can take changes or not. And they also have ways to gain significant user share.

We are probably past the point where a scrappy new open source browser could gain enough developer talent and user share to be relevant, though. Particularly since it can't be done without mixing in some proprietary code for DRM.

So there may be competition, and a significant chunk of open source code will be involved, but it won't satisfy the folks who want a pure open source browser.

Re: Show HN: Stretch – A high-performance cross-platform layout engine in Rust

#45

Interesting! It seems this is a rewrite of Yoga, by the same author, seen by another comment in this thread. So why start again using flex box as a layout engine? For example, there isn't really a good, equally as rich, grid layout engine yet. Also curious what the intended goal with conformance is, as the README states this project has a secondary intent to be more in line with the CSS spec? Personally for me any la…

Interesting. Overall, I love iOS constraint engine and really really really miss it when I port things to Android. It's not a universal solution, there's always a point where you flip and do your own layoutSubviews on complex stuff. How does this compare?

Have you tried ConstraintLayout ?

It is based on Cassowary constraint resolution algorithm just as Apple's AutoLayout.

Is it missing something compared to Apple's solution ?

Re: Show HN: Stretch – A high-performance cross-platform layout engine in Rust

#46
post #9

Earlier quoted context omitted.

It's the "IE6 Only" of the modern web. I really hoped we (as an industry) would have learned enough from that pain, but I guess not. Institutional Knowledge seems to suffer from serious memory loss.

The problem with IE was that it wasn't standards compliant. Oftentimes it seemed they even did so on purpose. Chrome appears to follow the standards nicely. We don't need quirks mode settings to render websites "designed for Chrome".

First, quirks mode wasn't for websites "designed for IE". IE6 already had a quirks mode and a standards mode. Quirks mode was for websites designed for Netscape 3 or so.

For the rest, I work on Gecko (the rendering engine in Firefox). We get a fair number of bug reports about sites that work in Chrome but break in Firefox because Firefox is following the spec and Chrome is not.

Chrome is definitely closer to the standards than IE was, but that's at least in part because of all the changes standards have been making recently to match Chrome when Chrome makes it clear that they have no plans to implement what the standard says. When IE tried that sort of thing, people just wrote standards that didn't match implementation reality. That had its own drawbacks in terms of leading to standards so divorced from reality they were useless (see XHTML 2.0, for example)....

Re: Show HN: Stretch – A high-performance cross-platform layout engine in Rust

#47

Earlier quoted context omitted.

> Just to be clear, we are not working on it. However it is something I would like to start looking into sometime soon :) I hear you, but this is very different to "we're never going to implement this". I might look into contributing, but I've never implemented any layout engine, so I'm not sure how much help I would be!

I would love to help talk through how to start and the process i used for the flexbox implementation :) start a PR / Issue and we can discuss :)

As someone else who knows nothing about how layout engines work, kudos to this response. I understand time and attention don’t scale well and I hope you don’t get overwhelmed but this kind of attitude in open source is the greatest.

Re: Show HN: Stretch – A high-performance cross-platform layout engine in Rust

#49
post #48

I wonder what it would look like to put this in wasm and draw it to a full screen canvas, circumventing the dom entirely. I wonder if there would be any benefits.

Of course there are: user cannot block ads, cannot copy text, cannot change scale, robots cannot index the page, it will take more time to load and will work slower.

Re: Show HN: Stretch – A high-performance cross-platform layout engine in Rust

#50

Earlier quoted context omitted.

The problem with IE was that it wasn't standards compliant. Oftentimes it seemed they even did so on purpose. Chrome appears to follow the standards nicely. We don't need quirks mode settings to render websites "designed for Chrome".

First, quirks mode wasn't for websites "designed for IE". IE6 already had a quirks mode and a standards mode. Quirks mode was for websites designed for Netscape 3 or so. For the rest, I work on Gecko (the rendering engine in Firefox). We get a fair number of bug reports about sites that work in Chrome but break in Firefox because Firefox is following the spec and Chrome is not. Chrome is definitely closer to the stan…

Could you share the specifics of your example with the Chrome team refusing to implement already existing standards?
Post reply on HN