4 ms·
Single header, no dependencies, cross platform, immediate mode, and the GUI examples actually look good... that’s wild.
by azhenley 6y ago
Single header, no dependencies, cross platform, immediate mode, and the GUI examples actually look good... that’s wild.
- bitexploder 6y agoImGui is nice too. I use it for quick UI hacks in Python :)
- moonchild 6y agoShould clarify that you're referring (I presume) to dear imgui. Imgui in general refers to the immediate mode gui paradigm in general, as opposed to retained mode gui.
- bitexploder 6y agoYes that one. Though I have only ever seen dear imgui written as ImGui. It’s really sweet. I taught my 14 year old son the basics and he is making all sorts of weird GUIs now lol
- jki275 6y agoIt's really nice. I was surprised at how well it works. Downloaded it, ran make inside the example folder, and it built working examples.
- CyberRabbi 6y agoNot to mention written in C89. This person knows how to distribute code well. I love libraries like this, I wish we had more.
- tom_mellior 6y agoHow relevant is C89 really nowadays? As far as I understand it took MSVC a long time to catch up to C99, but it's been there for a long time now. Is the motivation more related to retrocomputing? I would expect that decades-old compilers for retro platforms might not be reliably C89 conforming either.
- tsegratis 6y agomsvc's still not hit C99, but to be fair, they're not aiming for it (last I checked a year or two ago)
- augustk 6y agohttps://en.wikipedia.org/wiki/C99#Implementations https://en.wikipedia.org/wiki/C99#Implementations Only 7 of the 24 compilers in the list fully implements C99 whereas I would guess all those compilers implement C89. If you want to write long-lived programs, C89 is a good choice.
- tom_mellior 6y agoThanks, though those numbers may be a bit misleading. It's probably feasible to have very widely portable programs in C99-except-obscure-pragmas. But MSVC in particular seems to be less far along than I thought. Oh well.
- augustk 6y agoAlso, the difference between C89 and C99 is not that big.
- CyberRabbi 6y agoIt’s not just retro computing, new hardware platforms bootstrap themselves by providing a c89 compiler. It’s just good form. Imo c99’s additional features are not worth losing nearly universal portability. It’s trivial to reimplement most of c99’s useful features with a small header if you must, as this library does.
- frkloovb 6y agoWhy is a single headerness so important here?
- bmn__ 6y agoFor the general reasons. https://github.com/nothings/stb#why-single-file-headers https://github.com/nothings/stb#why-single-file-headers
- spacechild1 6y agoIt's not important at all. “single-header-library“ in C basically means #including a .c file in disguise. It's for people who are too lazy to add a source directory to their build system...