Earlier quoted context omitted.
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 F…
Yoga: A cross-platform layout engine
151–160 of 168 posts
Re: Yoga: A cross-platform layout engine
#152Using the name "Yoga" for your software is cultural appropriation. Facebook should not do it. It is equivalent of naming a sports team Rednecks.
Is Yoga a derogatory term? I've never heard it used in such a way, so I think that's quite the false equivalence.
Re: Yoga: A cross-platform layout engine
#153Re: Yoga: A cross-platform layout engine
#154Earlier quoted context omitted.
Is Yoga a derogatory term? I've never heard it used in such a way, so I think that's quite the false equivalence.
Does not matter. It is not a good idea to use other people's cultural heritage to name "things". In fact the downvotes here suggest how deeply prejudiced and racist people are on HN.
Is it fair to generalize like this across all the members of HN? You might argue that this is the case for those that down-voted, but everyone?
Re: Yoga: A cross-platform layout engine
#155Earlier quoted context omitted.
This is one of the reasons companies seek patents, called a defensive patent strategy. The goal is to discourage competitors from suing you for patent violations by making sure you own a patent your competitors are likely to have violated. It creates a kind of "mutually assured destruction" that discourages either party from launching a patent war (this only works against real competitors, not against patent trolls,…
Let's say I have a patent for a technology outside of React, and even outside of software, such as some hardware patent. Why should me suing for infringement of that patent preclude me from using React when it (the patent infringement and React) are completely independent?
Re: Yoga: A cross-platform layout engine
#156It seems ... smallish, which was a pleasant surprise. The core Yoga/ folder contains six files which is certainly fewer than I expected.
Didn't have time to do a full read-through, but one thing that I couldn't ignore is the use of a pointer-hiding typedef for the core layout node:
typedef struct YGNode *YGNodeRef;
I'm really opposed to "hiding the asterisk" in C, since whether or not a thing is a pointer typically matters, and code becomes harder to read when you need to think about this more.Even stranger, though, is that then most function protypes look like this:
void YGNodeMarkDirty(const YGNodeRef node);
So, you have a function called "mark" which really sounds like a mutating, modifying, operation. But it's declared to take a constant node reference!Peeking at the code, what it does boils down to:
if (!node->isDirty) {
node->isDirty = true;
...
}
So it really is modifying, there's no trickery involved (like having node be a handle or indirect reference). It then recurses upwards through the chain of parent nodes, like you'd expect.This works since the "const" here doesn't apply to the pointed-at object (it's distinct from the un-typedef:ed version "const struct YGNode * node"), it applies to the reference.
So the code jumps through these hoops and adds a const to the external interface, which doesn't matter, all it does is say "yeah, this function won't re-assign the reference variable to point at something else". Which, in my opinion, is not very useful information, as opposed to "this function doesn't write to the object you pass in" which you'd get with the non-asterisked version.
Can anyone shed some light on why one would do this?
Re: Yoga: A cross-platform layout engine
#157Earlier quoted context omitted.
Nope, I am refering to ConstraintLayout. RelativeLayout does not use Cassowary (even though for an API consumer, this is just an implementation detail). Actually, CL one of the reasons behind the creation of RL is to improve on RL : - remove the need to nest for complex layouts. Nesting has some intrinsic measure/layout overhead. CL solves this by allowing way more types of relative constraint. The only remaining rea…
This is incredible! is this going to be paired with a wysiwyg tool... because i have a feeling that writing the constraints is going to get frustrating very quickly.
The previous layout editor was pretty much unusable. Even though XML is ugly it is still efficient to work with (especially since the IDE auto completes all the cruft), so almost nobody was using the old layout editor.
The new one is still in beta and has some rough edges but it sounds like this will actually be useable and maybe even faster than editing the XML in some cases.
Re: Yoga: A cross-platform layout engine
#158> Yoga also does not support styling properties that have no impact on layout, such as color or background properties. Does that mean that Yoga is too low level to be used directly by application developers? Who's the intended audience?
Re: Yoga: A cross-platform layout engine
#159I made a similar library earlier this year. It builds as C or C++ and is only two files (MIT license): https://github.com/randrew/layout The API is similar to Yoga. I hadn't seen Yoga before, and I'm surprised at how similar it is. It seems like Yoga is about the same age (or older?) than my Layout library. It's meant to be easily embedded into existing software, such as game engines, OpenGL-based tools, custom GUI l…
Re: Yoga: A cross-platform layout engine
#160Cool to see Facebook release code in C! I clicked the "C" tag in the blog post, and this is the only post referencing C. Heh. Anyway, finally code from an Internet Giant in a language I care about enough to go and take a look at. It seems ... smallish, which was a pleasant surprise. The core Yoga/ folder contains six files which is certainly fewer than I expected. Didn't have time to do a full read-through, but one t…