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…
Yoga: A cross-platform layout engine
51–60 of 168 posts
Re: Yoga: A cross-platform layout engine
#52Re: Yoga: A cross-platform layout engine
#53Looks nice but the naming is wrong. We shouldn't expropriate well known names for tech solutions
I agree with you wholeheartedly about the naming. This is becoming a serious issue with many different things. Try to search for info about the visual studio "Code" editor for example. Facts and common sense are not fashionable in this age though unfortunately as evidenced by your (current) low vote on your comment.
Also:
It's not a "fact" that such names are a bad choice. It's an opinion. Personally I prefer evocative names, and that requires – almost by definition – to reuse words already in use.
It's also not "fashionable" or "trendy". To quote Aristoteles: "The young people today are rotten to the core, or they would have never named this software 'R'".
The alternative is the pharmaceutical naming system which includes a review to ensure that names are not just unique, but unlikely to confuse even with bad handwriting. The result is an endless stream of forgettable, but pronounceable, UUIDs with too many 'Z's.
(... and "Plan B", which is probably my favorite example of evocative naming).
Re: Yoga: A cross-platform layout engine
#54Say, I build a declarative tree describing a layout, and I render it. Now I remove one item from the tree. Can the layout engine efficiently remove the item from the view, and... (now it comes) provide an animation for it? As in, the item slowly losing opacity, then the surrounding items moving closer together? (Or a different animation depending on settings).
Of course, the opposite should also be possible (i.e., inserting an item).
Implement this, and we're a step beyond CSS, because so far this has not been possible (elegantly) in CSS. I.e., remove the element from the DOM tree, and it is gone immediately (without the animation). And no amount of CSS can fix this.
Re: Yoga: A cross-platform layout engine
#55Additionally, I'm a bit skeptical about the use of C here: this stuff tends to end up exposed to the user and security-sensitive.
[1]: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.207...
Re: Yoga: A cross-platform layout engine
#56Re: Yoga: A cross-platform layout engine
#57I 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's already cross-platform; cross-language would probably be a little much to ask :)
I'm not sure I follow; it's supported in multiple languages already. Am I missing something?
Re: Yoga: A cross-platform layout engine
#58Earlier quoted context omitted.
(Original author of css-layout here) I've spend a few months playing with Cassowary before working on css-layout and had long chats with its creator Greg Badros and the people behind https://gridstylesheets.org/ . Cassowary underlying abstraction is a linear inequation solver. So you give it a bunch of constraints of the form ax + by + cz + d ## There are two innovations in Cassowary: 1) There's a concept of strength…
HN Comments are ephemeral... this would make a nice blog post!
Re: Yoga: A cross-platform layout engine
#59I 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…