[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/g/ guide me on C

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 3
Thread images: 1

File: d42dfab2eca2f5c4647aaaa8ca1b0cf4.jpg (100KB, 650x1087px) Image search: [Google]
d42dfab2eca2f5c4647aaaa8ca1b0cf4.jpg
100KB, 650x1087px
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.
Thread posts: 3
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.