Live data from Hacker News

Libui: a portable GUI library for C

github.com

141–150 of 164 posts

Re: Libui: a portable GUI library for C

#141

Earlier quoted context omitted.

> Besides, how can you submit a pull request for documentation when there’s no documentation for you to understand the code with? By reading the code? You're posing it as some kind of impossible paradox, but with the full source code available you have a pretty readable specification of how it works.

It’s very hard to understand an unfamiliar codevase. The documentation doesn’t have to be super-fine grained, it just has to give a helping hand in understanding the high level design and use of the code. I can usually figure out api parameters, but that’s often not enough to use the code and certainly not enough to document it. Don’t get me wrong, I’m talking extremes here and I don’t expect a lot from someone’s pas…

You're going off on a tangent.

The question wasn't "is it harder to figure out what the code does by reading it than reading well written documentation?", it was "how can you submit a pull request for documentation when there’s no documentation for you to understand the code with", and the obvious answer is: by reading the code—in fact, that's ongoing work by some of the project's contributors.

Re: Libui: a portable GUI library for C

#142
One thing I have noticed about programmers in general, and this thread tended to remind me of it, is that everyone has high expectations of other's documentation, but when put on the spot, rarely meet those expectations themselves.

At my most recent stint in a software company once of the most frequently heard retorts about absent documentation was "the code IS the documentation".

Yet often these same people were the first to complain when another developer or operations staff hadn't documented something and they'd got themselves into a pickle trying to guess what was going on rather than read the code themselves.

Often the people most vocal about documentation are the worst at preparing it themselves in my experience, a form of projection onto others. YMMV.

Re: Libui: a portable GUI library for C

#143
post #7

Earlier quoted context omitted.

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

It may have changed since I last gave it a shot previously one annoyance I had with Qt was binary distribution. Getting it all packaged up correctly for each platform is much less than straightforward and if your app isn’t FOSS it’s exacerbated by LGPL linking requirements. It should really be a simple, single button process.

> Getting it all packaged up correctly for each platform is much less than straightforward and if your app isn’t FOSS it’s exacerbated by LGPL linking requirements.

Electron also has LGPL dependencies (Blink, FFMPEG) and libui depends on GTK which is also under LGPL so...

Re: Libui: a portable GUI library for C

#144

No Documentation? Documentation as an afterthought is not a good sign that this was well thought out. How about a white paper? A tutorial? Just code?

A whitepaper for some dude’s personal project, the sense of entitlement is astonishing.

I am sorry -- I assumed since this reached the top page of HN that this was a bit more serious that just some dude's personal project. This portable graphics API thing has been tried 10000x and they are almost never useful for any significant app you want to write. I see one of these and I hope that maybe someone has figured it out -- one glance and I see no documentation nor any rational as to why this effort is unique, then I know this is not a serious offering.

Re: Libui: a portable GUI library for C

#145
post #68

How does it compare to wxwidgets? I have used neither of these. I need a platform independent(mac/Linux/windows) GUI for a upcoming project and I was comparing Qt and wxwidgets and decided to use wxwidgets. Now wonder whether I can use libui instead of wxwidgets?

wxWidgets is a lot more mature. If you are fine with a C++ API instead of plain C, I'd go with wxWidgets.

Re: Libui: a portable GUI library for C

#147
Judging from the comments here, it appears I have completely failed at properly getting across just how early this thing is in development. I've since updated my README with a status report.

As for documentation, that is an active WIP. I have recently pinned down a documentation style I like, and applied it to the newest APIs; all that's left to do really is to spread it to the older APIs as well, and write a tool to turn that documentation into HTML, because I have not found a documentation tool that operates how I want it to.

Re: Libui: a portable GUI library for C

#148

Earlier quoted context omitted.

A whitepaper for some dude’s personal project, the sense of entitlement is astonishing.

I am sorry -- I assumed since this reached the top page of HN that this was a bit more serious that just some dude's personal project. This portable graphics API thing has been tried 10000x and they are almost never useful for any significant app you want to write. I see one of these and I hope that maybe someone has figured it out -- one glance and I see no documentation nor any rational as to why this effort is uni…

I do intend on this being a serious offering; it just wasn't an offering I was ready to make yet when people jumped on it.

What have people not yet figured out about cross-platform graphics? If we knew exactly what was wrong, we could fix it...

Re: Libui: a portable GUI library for C

#149

What a surprise, so there are alternatives to Electron garbage! Who knew!

Ironically this library is small, easy to compile, written in C++ with a C interface, and unbelievably slow. Try out the test.exe and watch everything slow to a crawl. It is worse than Atom about the speed of the slowest modern program I've ever seen - the ethereum wallet.

I assume you are using the Windows version. The slowness is a bug that I have to fix; there are several issues about it, and a few ideas of how to fix it. You can comment out some code in container.cpp if you want to have it go fast but also be ugly (the code has to do with transparency of standard controls on tabbed backgrounds).

Re: Libui: a portable GUI library for C

#150
post #112

Earlier quoted context omitted.

No, C doesn't have namespaces as a language feature. Guess why all the function names start with ui .

But ui is a super common prefix. I've seen it used for user-interface variable and function names and also in Microsoft-world in projects that abuse Hungarian notation (unsigned int). Clearly it must not be a problem, I just don't understand how people work around it.

I don't know, but I do know I'm in the middle of making sure any non-static symbol name in libui either has a prefix of ui[capital letter] or uipriv[capital letter] to at least ameliorate this madness.
Post reply on HN