Live data from Hacker News

Clay – UI Layout Library

nicbarker.com

91–95 of 95 posts

Re: Clay – UI Layout Library

#91

Earlier quoted context omitted.

By the same metric c++ qwidgets is amazing to write UIs and by keeping everything in c++ there is easily less abstraction, I can easily navigate my code, not jump between two different systems. There really is no great reason why qml objects couldn’t be c++ classes/functions. Decoupling does what for me, but introduce more syntax, documentation, and learning curves. You should give writing a Kde6 Kirigami app a try a…

I'm very fond of QML's syntax, so can't quite understand why you don't like it. It has a learning curve, but I studied all the basics in a day (it's just so simple and intuitive, imo). Not sure how "QML in C++" would look like, but it doesn't sound pretty. Recently someone published a declarative UI inside C++[1] (without a different syntax) but I felt a bit off with this approach. Maybe that's something you mean? [1…

I don’t know how else to explain it that compared to qwidgets where everything can be handled in code. Qml might be all the things it claims , elegance, separation of concerns, simple syntax, etc, but that still doesn’t eclipse my initial issue that it’s an unnecessary abstraction. You might not think it’s pretty but I think it’s pretty to only use c++.

Re: Clay – UI Layout Library

#92

Nice! It's pretty cool what you can make in a few thousand lines. Though Flex isn't my favorite as I prefer full CSS Grid. So I ended up making a CSS Grid layout library that I'm proud of in pure Nim (1). Though I'll have to checkout Clay and compare some of the layout algorithms. It's neat to see boxes resizing themselves using an algorithm you implemented. Wonder if I could expose a C interface? The reason I like C…

Cool! I also have a standalone implementation of CSS Grid [1]. Implemented in Rust in my case (and we also support Flexbox and Block layout). Looks like the licenses are both MIT (although you may want to add a LICENSE file to make that easier to find) so feel free to steal bits if you want. We aim to be fully web compatible, although we're not quite there yet. One thing we have that you may be particularly intereste…

Would be so awesome if single header file also includes the grid layout algorithm.

I think a new framework for lightweight native app development can be built on top. Lightweight flutter sort of.

Re: Clay – UI Layout Library

#93
post #61

This is basically what Flutter web is doing - its own canvas, rendering UI, and leveraging Wasm

If Android had provided an defining UI API like this entirely in C without using Java, Android would have 100% monopolized the mobile OS market. So fast, efficient.

Re: Clay – UI Layout Library

#94
post #93
post #61

This is basically what Flutter web is doing - its own canvas, rendering UI, and leveraging Wasm

If Android had provided an defining UI API like this entirely in C without using Java, Android would have 100% monopolized the mobile OS market. So fast, efficient.

Somehow I don't think it's that easy. But yeah, the way Java was used and with XML etc was horrible. Android development continues to be pretty horrible to this day, but due to a variety of reasons.

If I need to target Android natively today, I first consider Flutter (non-web).

For iOS only apps there's little reason to stay away from Swift.

Re: Clay – UI Layout Library

#95

Cool, so if i look for 'clay', i'll find your lib?

"clay ui" or "clay layout" will find it, which seems ok to me.

"clay ui" actually fails. My top hit is: https://clayui.com/docs/get-started/how-to-use-clay which is a completely different UI library from what I can tell, and probably had the name first too as the Git repo has commits from 4 years ago.
Post reply on HN