Sunday, December 23, 2007

More Fun with C

Did you know that gcc isn't pre-installed with your Macintosh? I thought that they were, given that Terminal is, and that from terminal many of the command line staples exist. Today I managed to download and install the latest version of xcode. This opened up the way for me to play with some of the low level I/O stuff that I was talking about in yesterday's entry. I had a great time, and I'm well on my way to having my home-made I/O library to replace stdio.h. No, I am not planning to code without stdio, I just wanted to understand at the code level what it does. In my opinion, the best way to do that is to implement a toy library that does the same thing. That, and when you make a living working in high-level languages, it's a good idea to re-visit other languages and areas of the stack so that you don't loose fluency. There's something very satisfying about writing in C. My goal over the next few days is to finish implementing my own stdio.h, and then my own string.h. Again, it's just good to have first-hand experience with how things work in the lower levels. I really believe that it makes for better high level programs. Not every programmer needs to write the operating system, but every programmer needs to know how the operating system accomplishes its tasks.

No comments: