Live data from Hacker News

Libui: GUI library in C

github.com

41–50 of 186 posts

Re: Libui: GUI library in C

#41
post #29

These APIs are notoriously hard to get right and coherent, and releasing at such an early stage will make it hard to change anything when building up on this. That said I do not know of any cross platform library in C, so this does seem to fill a niche.

Umm, Gtk?

Gtk (at least from 3 onwards) doesn't even aim to be cross-desktop on Linux, let alone cross-platform. Meaning, your gtk apps will always look and behave according to the Gnome conventions on all platforms, which could be what you want, depending on what cool-aid you're drinking ;) .

Re: Libui: GUI library in C

#42
post #26
post #11

Juce is another interesting UI lib https://www.juce.com/ Works with Windows, Mac OS, Linux, iOS and Android. Strangely, juce seems to have a revamped website that has no pictures or screenshots of the juce user interface and its widgets. Weird. Not sure how effective that marketing is...

I know, we always do this, but... I hate this website. I feel like I'm looking at a Medium post, stuff is popping around as I scroll, hero carousel, unclear Metro-style tiles that turn black and disappear the text on mouse-over, the works. Spent way too much time trying to figure out where the API docs and examples were hidden.

Agreed 110%.

Gimme a screenshot of something built with it, a snippet of a Hello World, tell me where it runs, point me to the docs, and point me to a download.

I can't use scrolling pictures of people looking at code(!), I'm not about to watch a keynote, I don't want a "developer story", I don't want links to "companies using"! I shouldn't need to click twice to get to "features," that ought to be the first thing I see!

The remainder might well be useful for some audiences, and as jumping-off point to get a sense of the ecosystem and community around the software, but put it at least a little bit below the fold.

Re: Libui: GUI library in C

#43
post #16

I was recently thinking that operating systems should ditch their custom desktops in favor of a browser based UI. Microsoft tried this idea out and it didn't work a few years back but it still seems to me that a browser based OS UI would be far more effective than things like Gnome and KDE and all that stuff. Edit: well I guess Google had the same idea long ago and called it ChromeOS - browser as OS interface.

We would have to probably ditch the content creation applications we have right now too. I mean, Electron and web based apps are nice for stuff like a weather widget, simple music player or a gallery application, but I don't see it being used for 3D editing applications, audio editing applications and similar uses. There aren't even any good UI frameworks for doing html desktop like looking applications, most are designed for mobile with their big buttons and touch optimization.

Re: Libui: GUI library in C

#44
post #16

I was recently thinking that operating systems should ditch their custom desktops in favor of a browser based UI. Microsoft tried this idea out and it didn't work a few years back but it still seems to me that a browser based OS UI would be far more effective than things like Gnome and KDE and all that stuff. Edit: well I guess Google had the same idea long ago and called it ChromeOS - browser as OS interface.

Imagine I want to display a menu in a browser. The right behavior for a menu is to open in such a way that it's visible. Normally menus expand down and to the right, but if there's not enough space in these directions, they will expand in up and/or left. Try to move a Windows app so that its menu is very close to the bottom of the screen -- it will start opening its menus up. (Not to mention that they open outside of the app's window.)

In a browser menus are not like that. Normally they're imitated with CSS: a JavaScript or even a CSS selector swaps CSS classes from visible to invisible. There's no support for real menu behavior; you either have to do this all by yourself (probably pre-build the menu offscreen to measure it and then decide where to place it) or give up and use sub-par menus-like imitations And this is the only glitch here; there's lots of them (submenu behavior, shortcuts, behavior of text fields, etc.) In the standard GUI these things are implemented for you and polished long time ago; in browsers they simply do not exist.

And CSS is not that good even as a high-level layout engine.

Re: Libui: GUI library in C

#45
post #16

I was recently thinking that operating systems should ditch their custom desktops in favor of a browser based UI. Microsoft tried this idea out and it didn't work a few years back but it still seems to me that a browser based OS UI would be far more effective than things like Gnome and KDE and all that stuff. Edit: well I guess Google had the same idea long ago and called it ChromeOS - browser as OS interface.

We would have to probably ditch the content creation applications we have right now too. I mean, Electron and web based apps are nice for stuff like a weather widget, simple music player or a gallery application, but I don't see it being used for 3D editing applications, audio editing applications and similar uses. There aren't even any good UI frameworks for doing html desktop like looking applications, most are des…

> 3D editing applications

You can do 3D editing on the web, at least in a fairly basic way.

http://threejs.org/editor/

Re: Libui: GUI library in C

#46
post #29

These APIs are notoriously hard to get right and coherent, and releasing at such an early stage will make it hard to change anything when building up on this. That said I do not know of any cross platform library in C, so this does seem to fill a niche.

Umm, Gtk?

Gtk doesn't use native controls. While grandparent didn't mention that detail, I think it's the deciding factor here.

Re: Libui: GUI library in C

#47
post #26

Earlier quoted context omitted.

I know, we always do this, but... I hate this website. I feel like I'm looking at a Medium post, stuff is popping around as I scroll, hero carousel, unclear Metro-style tiles that turn black and disappear the text on mouse-over, the works. Spent way too much time trying to figure out where the API docs and examples were hidden.

Agreed 110%. Gimme a screenshot of something built with it, a snippet of a Hello World, tell me where it runs, point me to the docs, and point me to a download. I can't use scrolling pictures of people looking at code(!), I'm not about to watch a keynote, I don't want a "developer story", I don't want links to "companies using"! I shouldn't need to click twice to get to "features," that ought to be the first thing I…

Judging from all the jobs listed on the Juce careers page it looks like they got a bunch of investment money and spent it on "going corporate".

Here's what Sensei Jeff has to say about that: https://blog.codinghorror.com/if-it-looks-corporate-change-i...

Re: Libui: GUI library in C

#48
post #33

andlabs (Pietro) is writing this library in C as a support for the Go ui library he's been building. https://github.com/andlabs/ui However, as others have pointed out, this will be very useful for many other languages as well. I would love to see a Renaissance of native cross platform apps.

Me too

Re: Libui: GUI library in C

#49
post #16

I was recently thinking that operating systems should ditch their custom desktops in favor of a browser based UI. Microsoft tried this idea out and it didn't work a few years back but it still seems to me that a browser based OS UI would be far more effective than things like Gnome and KDE and all that stuff. Edit: well I guess Google had the same idea long ago and called it ChromeOS - browser as OS interface.

> I was recently thinking that operating systems should ditch their custom desktops in favor of a browser based UI. Why? > it still seems to me that a browser based OS UI would be far more effective than things like Gnome and KDE and all that stuff. How so? My needs haven't changed. I still need a UI that provides a searchable launch menu, some quick-launch buttons, window management, etc. Rendering a bunch of things…

because we're on the topic of cross-platform UI frameworks.

Re: Libui: GUI library in C

#50
post #24

This is so funny. Yesterday there was another discussion on how C needs to be replaced due to security/corectness concerns (the K&R topic), today people are fascinated by a UI(!!!) library built in it. And they actually consider using this library.

C is simply the Correct Tool For the Job when writing cross-platform (native) UI's. It's simple, it's callable from almost any other language, and all OS GUI API's are already in C. There has been a lot of negativity/arguments against C here lately, which in my opinion has been very exaggerated. Seriously, how often do you guys write GUI apps that _also need to be secure_? An application isn't secure just because you…

Any app i write needs to be secure as much as reasonably possible.

If you communicate over a Network with not fully trusted remote endpoints, and handle text you have a fair chance of remote code execution in C. A git front end. A text editor. Anything written in C has a fair chance to making a mistake.

Your very basic attitude is an example to the problem the industry is having!

We will always make mistakes, no matter how hard we try, but not caring for such an important topic from upstart is a not simply a mistake, but an outright sin!

Security, robustness are some examples which are way too hard to add to a software when not taken into account upfront at design time!

C is not the right tool for these tasks.

Post reply on HN