
Little Forms – an open source minimalistic GUI widget library written in plain C - networked
http://runtimelegend.com/rep/lforms/index
======
BruceM
Blendish ([https://bitbucket.org/duangle/oui-
blendish/overview](https://bitbucket.org/duangle/oui-blendish/overview)) is
pretty amazing and lightweight (by itself).

It works with NanoVG, so it is useful in environments where you're already
running OpenGL.

~~~
buserror
Thats a very nice find, thanks for the link. I'm not entirely sure about
putting everything into a header file -- and marking load of pretty big
functions as 'inline' but well, it simplifies the build a lot it seems!

------
phoogathrw
I really like this guy's approach to open source projects:
[http://runtimelegend.com/abitopen.txt](http://runtimelegend.com/abitopen.txt)

Assuming this approach would relieve a lot of the stress I've experienced on
my more popular projects. I'm seriously considering it.

~~~
chei0aiV
Most of the benefit of open source projects is that they are open to
collaboration, I would avoid even using a project with policies like that if I
knew about them.

~~~
em3rgent0rdr
understandable, athough I can also understand his position.

Actually I think he himself just wants to not collaborate, but I don't see
anything saying that you can't copy his code and then collaborate with others.

There are also other benefits of open source other than collaboration, such as
security from being able to review the code, and being able to run in a
totally free system.

------
fizixer
Just. Amazing!

As someone who is Gtk, Qt, C++ averse, I thought I'll have to settle on
something like FLTK. This is another option in my basket.

Is it tied to X or fairly independent? Because Wayland is an upcoming standard
which aims to be a lot more cruft-free.

~~~
RightWingRabble
Why are you Qt averse? Is it the C++ or something to have to do with Qt
itself?

~~~
LukeShu
I'm not the user you're asking, but:

\- It used to be that Qt was _massive_ ; because it existed before ubiquitous,
usable STL implementations, Qt had to essentially also ship its own C++
standard library. Which meant that you couldn't use standard C++ strings, you
had to use QString, and so on. This is less true with Qt 4 & 5, but
reputations stick around.

\- Often-times C++ APIs are a pain, even if you are using C++, many people
have the opinion that the API exposed should be C.

~~~
prewett
STL strings are also next to useless. startsWith(), endsWith(), split(), case-
insensitive find, stringify a number, numericify a string, easily construct a
formated string, properly handles unicode (wstring does not), all require
extra code. QString has a function for each of those.

And the STL data structures are sometimes kind of unwieldy:

    
    
       if (dict.find(key) != dict.end()) { ... }
    

is lame compared to the easily understood:

    
    
       if (dict.contains(key)) { ... }
    

Not to mention all the stupid inconsistencies:

    
    
        // std::vector has no sort function, haha!
    
        std::sort(std_vector.begin(), std_vector.end());
    
        // std::sort doesn't work on std::list, haha!
    
        std_list.sort();
    

And my favorite annoyance, the fact that std::vector::size() returns unsigned
int, despite the fact that for practical purposes you aren't going to get
anywhere near even 2 billion elements without running out of memory (or other
performance problems), so I'm stuck writing

    
    
       for (unsigned int idx = 0;  idx < v.size();  ++idx) {...}
    

or omitting the "unsigned" and getting lots of compiler warnings. I get why
they would have done it; I would have done it too. Until I used Qt, then I
like how everything is simply int. I suppose if you are doing physics
simulations or something you might need something different, but it's the rare
GUI program that needs unsigned int for size.

~~~
eps
vector::size() actually returns _size_t_ , which is exactly the right way to
go about, because why should a size() function be able to ever return negative
numbers?

~~~
prewett
Good point about size_t, although technically it's std::size_t.

I agree, STL has done the "right" thing with sizes; of course negative sizes
are meaningless. The problem is, Qt's way is so much nicer to use, even though
it is obviously "wrong." Type three characters, done. Putting "int" in your
headers, it's obvious what's going on--you're getting a number back. I suppose
std::size_t is obvious, but it's hard to read, and I hate typing underscores.
Again, more correct, but I hate doing it, which is just another reason why Qt
is such fun to use compare to STL.

------
vurtun
Another lightweight ANSI C library is
[https://github.com/vurtun/zahnrad](https://github.com/vurtun/zahnrad). It is
platform and render backend independent, has no dependencies and is
configurable.

------
Gracana
I wanted something like this and was reading about GUI toolkits when I decided
to take a moment to check HN. Talk about good timing!

On the other hand... I kind of want vector graphics, and cairo would be really
great for that, and if I use cairo, well I might as well use gtk, and... hmm.
I see why these things end up with lots of features.

------
_RPM
Plan C is just great. I always can get excited about software if its written
in C. I still havent figured out why though.

~~~
frik
C syntax is simple and elegant. Same can be said to Go and Lua, the later two
have additionally very good inbuilt string support. The BNF of these languages
fits on one page

------
joejoint
wow, I dreamed I was in 2015 with powerful pocket size computers showing
flashing GUIs with multitouch support. Darn.. I just woke up, I'm back in the
80's

