Live data from Hacker News

Clay – UI Layout Library

nicbarker.com

81–90 of 95 posts

Re: Clay – UI Layout Library

#81
post #2

Looks very nice, I just watch a great YT video from the developer here https://www.youtube.com/watch?v=DYWTw19_8r4

It's so rare to see such a clear and intuitive explanation. This video is amazing.

Just watched some of his videos and they are really good. Kudos @nicoburns

Re: Clay – UI Layout Library

#83

Earlier quoted context omitted.

The developer is rediscovering the concept of a GUI library. The modern variant is the mouse-driven GUI developed by Xerox in the 1970s (and later commercialized by them as Xerox Star) which Jobs famously copied to create Apple’s Lisa, and Gates famously mimicked to create MS Windows. Since they determine the look and feel of a platform and their design determines the ease with which developers can create apps for th…

I swear to god, I thought this is AI generated response.

I’m still not sure it isn’t

Re: Clay – UI Layout Library

#86

I'm not a frontend person. Can anyone explain why this is better than using CSS directly or a CSS framework/library? Seems like added complexity when there are already hundreds of CSS frameworks available that seem like they do the same thing.

The main goal is to enable nice UI without the requirement of a whole web browser in order to get CSS. The fact that it can be used to layout web pages is just showing off to get the attention of the billion web devs out there.

Re: Clay – UI Layout Library

#87

Earlier quoted context omitted.

Qt has uic xml layout engine which was cumbersome to use, you weren’t discouraged from using c++ classes instead. The discouragement came later when Qt shifted towards qml (a bad shift as it’s just as unweildly, imo), now they discourage writing qml in c++ because the qml engine can get out of sync. Qt can prevent this but they want you to pay for a premium license for it. Slint is a sister to qt that does not have t…

Agreed that a C++ API for qml would be great. qml by itself is great though, I don't see why it is unweildy. If anything it's unpolished, there is stuff that is more difficult than it should be, but it's miles ahead of what there was before imo.

It is unwieldily because it abstracts logic into a different language and paradigm. You need double the cognitive understanding of qt now to know how it operates.

Re: Clay – UI Layout Library

#88

Earlier quoted context omitted.

Agreed that a C++ API for qml would be great. qml by itself is great though, I don't see why it is unweildy. If anything it's unpolished, there is stuff that is more difficult than it should be, but it's miles ahead of what there was before imo.

It is unwieldily because it abstracts logic into a different language and paradigm. You need double the cognitive understanding of qt now to know how it operates.

As someone with 10,000+ lines of C++ code and 10,000+ lines of QML code in his app[1] I can say this is false. It's actually much easier and straightforward to decouple the UI (QML) and logic (C++). It also makes such a great combo - QML is amazing to write UIs in and C++ is a fast, battle tested compiled language. I wrote a little bit about my app development if you're curious[2].

[1] https://get-notes.com

[2] https://rubymamistvalove.com/block-editor

Re: Clay – UI Layout Library

#89

Earlier quoted context omitted.

It is unwieldily because it abstracts logic into a different language and paradigm. You need double the cognitive understanding of qt now to know how it operates.

As someone with 10,000+ lines of C++ code and 10,000+ lines of QML code in his app[1] I can say this is false. It's actually much easier and straightforward to decouple the UI (QML) and logic (C++). It also makes such a great combo - QML is amazing to write UIs in and C++ is a fast, battle tested compiled language. I wrote a little bit about my app development if you're curious[2]. [1] https://get-notes.com [2] https…

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 and experience the absolute pleasure of adding another abstraction layer onto qml, c++ to muck things up. Qml is the cooler brother of Uic, but at least uic was optional.

Re: Clay – UI Layout Library

#90

Earlier quoted context omitted.

As someone with 10,000+ lines of C++ code and 10,000+ lines of QML code in his app[1] I can say this is false. It's actually much easier and straightforward to decouple the UI (QML) and logic (C++). It also makes such a great combo - QML is amazing to write UIs in and C++ is a fast, battle tested compiled language. I wrote a little bit about my app development if you're curious[2]. [1] https://get-notes.com [2] https…

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] https://github.com/brisklib/brisk

[2] https://news.ycombinator.com/item?id=42450963

Post reply on HN