So I've read the k&r book on C and am comfortable with basics, but I have no one to answer me how to use C in real world.
best way to write parsers? so far only looked at lex+yacc
other build tool than posix makefile? tried meson today and it's so simple in comparison
best JSON library?
how to learn threading and async? there are so many thread implementations... or fuck it and split into processes with io
how to write tests?
what debugging/analysis tools to learn? tried gdb but don't really know what to use it for
compilation flags for best warnings/errors? does it differ on clang vs gcc? -W -Wall -Wextra -Werror -pedantic -std=c99 or append something?
other crypto libraries that libsodium to be aware of?
best db operating on file? or is sqlite the only?
how to get hashtable?
and any random tips, please feed me with wisdoms
>>62138385
>best way to write parsers? so far only looked at lex+yacc
That's a decent start.
>how to learn threading and async? there are so many thread implementations... or fuck it and split into processes with io
Start with the mechanism your OS provides, i.e. epoll/kqueue/iocp/whatever solaris has. Write a thread pool if you want. Learn pthreads if you're on a POSIX platform.
>how to write tests?
As you would any other program.
>what debugging/analysis tools to learn? tried gdb but don't really know what to use it for
When you need gdb, you will know. Also try valgrind, tsan, asan etc.
>compilation flags for best warnings/errors? does it differ on clang vs gcc? -W -Wall -Wextra -Werror -pedantic -std=c99 or append something?
That sounds reasonable.
>best db operating on file? or is sqlite the only?
sqlite is fine, well tested and generally well understood. Use a plain text file if you can get away with it, though.
>how to get hashtable?
Use one that fits your requirements and use case. If N is small, use a list.
>and any random tips, please feed me with wisdoms
Write code, submit for review, learn, repeat.
>>62138385
>other build tool than posix makefile? tried meson today and it's so simple in comparison
cmake is pretty friendly.
>best JSON library?
jansson works ok.
>how to learn threading and async? there are so many thread implementations... or fuck it and split into processes with io
use pthreads if they're available. use whatever is native to windows if you're in windows.
>how to write tests?
gtest works ok for me. maybe not for everyone.
>what debugging/analysis tools to learn? tried gdb but don't really know what to use it for
gdb and valgrind. not really optional.
>compilation flags for best warnings/errors? does it differ on clang vs gcc? -W -Wall -Wextra -Werror -pedantic -std=c99 or append something?
you can be as autistic as you like with your warnings.
>other crypto libraries that libsodium to be aware of?
no idea I haven't needed much crypto for my work
>best db operating on file? or is sqlite the only?
just use sqlite
>how to get hashtable?
plenty of implementations floating around. find one that suits your needs.
>and any random tips, please feed me with wisdoms
valgrind is really great. use it often.