Live data from Hacker News

Libui: a portable GUI library for C

github.com

81–90 of 164 posts

Re: Libui: a portable GUI library for C

#81
post #80

So what I can understand this is "just" a wrapper for existing GUI frameworks? Why is this better than just using GTK that already is portable?

Writing a GTK UI for macOS, for example, will make the interface look very different to the look and feel that the operation system is offering. If you use a library like libui, the ABI is the same for every major operating system, but the result matches what the OS is using. If you don't care about the look and feel of the interface then I guess this library is not for you. As someone who is responsible for maintaining the UI of a big application for three major systems (macOS, Windows and Linux) a library like this would have been a blessing years ago before the project started.

Re: Libui: a portable GUI library for C

#82

The same library for Go https://github.com/andlabs/ui

> libui was originally written as part of my package ui for Go.

> Now that libui is separate, package ui has become a binding to libui.

> As such, package ui is the only official binding.

From the README — https://github.com/andlabs/libui#language-bindings

Re: Libui: a portable GUI library for C

#86

Earlier quoted context omitted.

Documentation is part of code quality.

That's rarely been my experience. In fact, documentation usually exists because code quality is poor and it needs to be explained.

From my experience there’s little to no correlation at all.

One of the most beautiful C codebases I’ve seen - the SSH IPsec stack - had the most succinct yet comprehensive documentation. Linux kernel has virtually none of the latter but the quality is still very high. Then there’s something like Miranda IM - complete clusterfuck of the code, but really well documented. A lot Java code is that way too, but also with documentation rehashing trivial facts rather than explaining anything.

However, what does seem like a sign of a good code is longer intro comments in header files that explain the design rationale and how things fit together in general. It’s basically a level up from verbose API description, but when done right it makes the API obvious without any further detailing.

Re: Libui: a portable GUI library for C

#88
post #7

Earlier quoted context omitted.

Qt? Although it has its own problems, the end product is often way better than Electron.

There is also gtkmm

Not sure why I've been downvoted. What is wrong with gtkmm? It's a reasonable C++ binding to GTK+

Re: Libui: a portable GUI library for C

#90

A lot of the comments have mentioned the lack of documentation this project has, and then they've received replies of the form "you should submit a pull request, the author doesn't owe you anything". Here's my take on it: I don't owe the author anything either. But if I'm considering which project to use, I'd probably choose the one with documentation, since it signals better goals and higher code quality. It's absur…

I work for many years with FFMpeg that has no documentation and no code sample, and it's okay for me. I prefer that the developers keep their time optimizing the code rather than writing documentation that needs to be maintained and become a problem when not in sync. My state of mind is that if it's open source then just read the code.
Post reply on HN