HACKER Q&A
📣 kosolam

Modern C Libraries


Starting a new project in C. A utility program that connects to a web service, parses json response, does some calculations and inserts into rocksdb. What libraries, frameworks would you recommend I use today in a new C project so that my developer experience is comfortable and I don’t need to develop standard functionality and rather rely on good libraries


  👤 krapp Accepted Answer ✓
If you want a comfortable developer experience without having to "develop standard functionality," choose another language. C is the "now code the rest of the owl" of programming languages.

Otherwise: libcurl for the requests, json-c[0] for the JSON handling. SDL2[1] for window handling/events/other glue stuff if necessary. I don't know what rocksdb is but I assume it has its own C API library.

[0]https://github.com/json-c/json-c

[1]https://github.com/libsdl-org/SDL


👤 legends2k
There's an awesome C list of libraries and frameworks [1]. Pick one that suits your needs.

Time and again folks say such and such isn't suitable tool to do something. While some of those admonitions are true, if you're doing something to learn, feel free to ignore those and enjoy your learning. There're folks who learn assembly even today and learn a great deal of other things than assembly and have fun too.

As for C, it'd recommend most folks know the basics since many "modern" languages totally don't teach you those, and in fact hide the details from you that things feel like magic to you eventually if you keep using these high-level languages. This is okay as long as you can know the basics and map them back when needed.

[1]: https://github.com/oz123/awesome-c


👤 nuc1e0n
C isn't really what I'd choose for such things, but if you insist I remember libcurl was quite easy to work with.

👤 ahazred8ta