Ask HN: 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
9 comments
[ 5.6 ms ] story [ 36.1 ms ] threadOtherwise: 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
Use gawk with curl/json extensions.
Develop gawk C api for rockdb or dump to file & upload data file to rockdb.
Use emscript compiled gawk in tab in web browser for gui / platform independence.
https://www.gnu.org/software/libc/manual/html_node/Regular-E...
Non-critical implimentation fun, use cello [1] for 'gawk' functionality in C with C++ objects/classes.
Compile C program with emscripten for use in web broswer for 'gui' & 'portability'!
[1] https://libcello.org/
You'll be doing a lot of tedious, error prone work to do this in C.
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