Live data from Hacker News

Yoga: A cross-platform layout engine

code.facebook.com

121–130 of 168 posts

Re: Yoga: A cross-platform layout engine

#121
post #89
post #62

One thing I've thought about recently is Facebook's Patent grants, and it's one thing that makes me uneasy about using any open source technology from Facebook like React (I currently do but am thinking to move to Preact because of the nicer MIT license and that it's analogous to React in many ways) because they're generally given a patent grant. I'm not a lawyer so I don't know if the grant would hold up in court si…

I am curious to hear of anyone who has reviewed this license with their lawyers / legal departments and received a positive, non-cautionary response to go ahead and use the software and libraries covered under it.

Google hasn't specifically said they're using React (which uses the same terms on the patent licensing) but they did review and suggest changes originally and have stated that the current license meets their needs.

There are other companies (I would be betraying confidences to list who) that have looked at it and decided not to use it because of the strong retaliation clause. I should elaborate that those companies are not planning to sue FB as far as I know, but they want to preserve the opportunity to do so (i.e. they don't want to de-weaponize their patent portfolio with respect to FB).

Re: Yoga: A cross-platform layout engine

#122
Looks like a nice library, but maybe I'm missing one thing in the examples. In the examples they define an image and text views, but only in the iOS Obj-C example are they a native image or text view. How do you define the YogaNode to say be a TextBox in C#?

Re: Yoga: A cross-platform layout engine

#123
post #79

Earlier quoted context omitted.

I never said that you could lose your license for competing against Facebook, I said that you could lose your license if you have a patent and assert it against Facebook if it infringes. This is the patent grant from React, which is identical to the grant in the post's repo as well. The language in the patent grant is pretty clear and doesn't mention anything about React specifically: The license granted hereunder wi…

If you name React in your patent lawsuit against Facebook, your license for React is terminated. Other software licenses remained unaffected. That seems like a pretty reasonable stance for distributing an open source project.

If I am using React/Yoga/etc, and have a patent on FooTech, and Facebook starts using it tomorrow without license, and I sue them, then I have tripped clause (i).

The license granted hereunder will terminate, automatically and without notice, if you (or any of your subsidiaries, corporate affiliates or agents) initiate directly or indirectly, or take a direct financial interest in, any Patent Assertion: (i) against Facebook or any of its subsidiaries or corporate affiliates

At that point, I am infringing any patents that FB have on all of {React/Yoga/etc}. Thus opening myself up immediately to a counter-patent suit, even I infringe no other FB patents.

tl;dr any patent suit initiated by me (troll or legitimate), revokes all the patent grants for every FB product using this license.

Re: Yoga: A cross-platform layout engine

#124
post #79

Earlier quoted context omitted.

I never said that you could lose your license for competing against Facebook, I said that you could lose your license if you have a patent and assert it against Facebook if it infringes. This is the patent grant from React, which is identical to the grant in the post's repo as well. The language in the patent grant is pretty clear and doesn't mention anything about React specifically: The license granted hereunder wi…

If you name React in your patent lawsuit against Facebook, your license for React is terminated. Other software licenses remained unaffected. That seems like a pretty reasonable stance for distributing an open source project.

Both you and grandparent are wrong. I have consulted with lawyers on this (and the language is pretty clear as well). If you initiate a patent lawsuit against FB on any grounds, you lose patent protection for this library (or React, Reactive-Native, etc -- they share the same patent licensing terms).

If you counter-sue FB after they have initiated a patent suit against you, you are ok, as long as your counter-suit does not cover patents you were licensed via using React, Yoga, etc.

This type of patent language is called a "strong patent retaliation clause." What you are describing also exists (Apache uses it) and is called the "weak patent retaliation clause." They are not the same.

Re: Yoga: A cross-platform layout engine

#125
post #89

Earlier quoted context omitted.

I am curious to hear of anyone who has reviewed this license with their lawyers / legal departments and received a positive, non-cautionary response to go ahead and use the software and libraries covered under it.

The React wiki has a non exhaustive list of users[0] which includes some rather large companies (BBC, Airbnb, Automattic, Atlassian, eBay, Netflix, etc.). I presume most of those larger companies had their legal departments approve its use. [0] https://github.com/facebook/react/wiki/Sites-Using-React

That may be the case, but I personally would be surprised. My impression is that most companies don't do a good job of managing and monitoring dependency licensing.

I have seen tooling that analyzes licenses, but not for node or client-side javascript. Maybe I'm just in the dark.

Re: Yoga: A cross-platform layout engine

#126
post #62

One thing I've thought about recently is Facebook's Patent grants, and it's one thing that makes me uneasy about using any open source technology from Facebook like React (I currently do but am thinking to move to Preact because of the nicer MIT license and that it's analogous to React in many ways) because they're generally given a patent grant. I'm not a lawyer so I don't know if the grant would hold up in court si…

What's a hypothetical scenario that would be a problem?

I assume your company is not developing UX patents and the concern is more around developing a suite of products that use a FB library and dealing with unexpected costs or restrictions?

I would hate to avoid using what I thought were the most productive tools in anticipation of a very unlikely event. You'd essentially be paying a productivity penalty now, to try and avoid a productivity penalty in the future if you have to rewrite something.

The odds of a company like yours in a vertical getting sued by Facebook I would guess are vanishingly small.

Now if your core IP competes directly with FB I can see a little more risk because they could plausibly have strategic reasons to make your life difficult as well as a potential damages claim. However this would be a special case for only certain companies to worry about.

Re: Yoga: A cross-platform layout engine

#128
post #93

I like the concept and the C# code is just hands down the best example out of all of them (yet another reason I miss coding in C#). I'm curious though, will this be eventually ported to JavaScript? Yeah yeah I know "flexbox is already on the web!" but if you could write a layout in this fashion versus using style sheets then you could take it and directly apply it to any of your applications (even if you have to conv…

> will this be eventually ported to JavaScript? It has been ported already. https://www.npmjs.com/package/css-layout Oddly enough there's no git repository. Only the npm package has the pure JS code. And the last release was from last year. Fortunately it looks it was easy to port, if one needs a more recent version.

It's actually the exact opposite flow ;)

css-layout is the original project, it was written in JS and then automatically translated into Java & co. It had some bugs, and Facebook rewrote the thing directly to a native implementation but decided to drop JS as they were not using that variation internally. This is a shame as I love CSS-layout for calculating tween points in layout animations on the web. FB said at this point they have no plans for an official JS port of the new version aka yoga.

Re: Yoga: A cross-platform layout engine

#130
post #66

I like the concept and the C# code is just hands down the best example out of all of them (yet another reason I miss coding in C#). I'm curious though, will this be eventually ported to JavaScript? Yeah yeah I know "flexbox is already on the web!" but if you could write a layout in this fashion versus using style sheets then you could take it and directly apply it to any of your applications (even if you have to conv…

I'm not sure how you're supposed to use this from C# in real life, though. Ok, you have a layout engine. For what widgets? Windows.Forms? WPF? Xamarin Forms? Can those even use a third party layout engine? I'm slightly confused :)

Also Microsoft is using Yoga (previously known as css-layout) in React Native for Windows: https://github.com/ReactWindows/react-native-windows
Post reply on HN