5 ms·
I'm learning ye ol' C as well. I usually concentrate on pure C, and try not to rely too much on libs. But your post got me thinking. "I'm developing on Linux a
by NAFV_P 13y ago
I'm learning ye ol' C as well. I usually concentrate on pure C, and try not to rely too much on libs. But your post got me thinking.
"I'm developing on Linux and Mac (I use homebrew)." I don't know about Mac, but at least you're on Linux, I found C on Windows to be more annoying.
IMO, the ideology behind C expects you to do more of the code by yourself, especially regarding the infrastructure. As an example, a few months ago I typed up a program to compute the square root of two without using <math.h>.
I'm at the point where I rely less on books or stinkoverflow and read other people's code. It might be an idea to look at what libraries other coders use. Right now I'm snooping around github.
- girvo 13y ago> Right now I'm snooping around github. I just spent an hour doing the same! I did see ccan on the front page here, that has some great snippets in it. > IMO, the ideology behind C expects you to do more of the code by yourself, especially regarding the infrastructure. See, I agree with you here, that's why I asked whether my mindset was wrong perhaps. The thing is though, I come from other languages where reinventing the wheel is seen as a really dumb idea, but perhaps in C it is the right way to go? I'm honestly not sure! Cheers for the reply, it made me feel less lost ;)
- NAFV_P 13y agoI came across one called "Simple Directmedia Layer" or SDL, I found an example using it to create some simple graphics in a teach linux magazine. You can download it via apt-get (this is Ubuntu, it might be a different command on another distro). There is a libsdl1.2-dev and a libsdl2.0-dev. Hope that gives you a pointer (pun not intended).
- NAFV_P 13y agoYour welcome, I'm learning Python as well, love the bignum. "The thing is though, I come from other languages where reinventing the wheel is seen as a really dumb idea, but perhaps in C it is the right way to go? I'm honestly not sure!" They often say that about assembly, and I think I may have to pull my foot out one day and learn it. The C programming mindset requires one to think like a machine. Very few people are born with that skill, it has to be beaten into programmers with a keyboard. BTW I only started learning coding last year, but I started with C++. Did you do the same or jump straight to C? I tend to agree more with Stallman and Torvalds these days: "A horrible language".
- jmspring 13y agoThere are a lot of libraries out there and over the last dozen or so years, based on functionality, some have become much easier to work with than the same functionality was awhile back. Then again, some libraries like libcurl have generally been quite good and straightforward to use. As someone mentioned, CCAN was on the front page, but generally there hasn't been the same sort of organized directory to find the C library best for a particular problem. For myself, I go off of what I've used before, what others maybe have recommended, or sometimes just search for something that does most of what I want. If I need to write it, so be it.