chapters | ||
compile.sh | ||
install.sh | ||
LICENSE | ||
README.md | ||
xhartae.c |
xhartae
xhartae -- Program and book for learning the C programming language.
- This is still work in progress, and so far, this is the most complex project I have, be patient, I'll finish it.
- Everything related to my libraries is clean of all warning options on Clang, GCC and Valgrind.
Compile:
$ sh compile.sh
Install:
$ sudo sh install.sh
Use:
$ xhartae
This is the ultimate C programming language guide, brought to you by Ognjen 'xolatile' Milan Robovic. I'm not a native English speaker nor a real programmer, only a hobbyist, so this "book" will be full of grammatical mistakes, but not compiler warnings. Please be patient, C is a small language, even for the time when it was made, so if you ignore my rambling and focus on what's written outside of the comments, you'll easily learn it. Good luck and have fun...
With that being said, I'll tell you the honest truth. No amount of books or source code you read (that's written in C or any other language) will make you good in programming (in C or any other language). You get good in programming by writing the programs. Knowing what some statement, expression or library function will do is just a small advantage that's saving you the time in order not to read (read yet again...) some documentation or specification. Sure, you can write literal machine code for some CPU instruction set, but you still need to know what instructions are supported and how they translate to machine code. The sad thing about programming is that you need very small subset of information to achieve creating almost anything, and yet, you need huge set of informations to do it in more concise way. That's the tradeoff.
Either learn very small subset of "building materials" and "architecture", then proceed building sewers, roads, houses, malls, factories, skyscrapers and in the end create a town, or learn huge set of "pre-made houses, pre-made factories, pre-made road blocks", and create a same-looking town. If you use any kind of library functions, even the ones we'll use in some parts of this program, you'll end up as a "interior designer" rather than an "architect". C programming language is the minimal kind of tool that's widely supported and lets you write "quick assembly", we'll have entire chapter about assembly and machine code, so you can make your own language.
We're dealing with a low-level functional (and procedural) programming language called C. So, disengage all safety protocols, think twice, write once, enter the Great C and learn to sail on it after some practice. This will never be a book. It has no readers. It's not even printed. It's pages are files. It's cover is a folder. This will never be a book. I, for the most part, am having fun writing this, same as I have fun while programming. You won't get a job after reading this "book", only some knowledge.
How to read this book?
- First of all, read the "README.md" file in base directory. Run scripts there in the order they're listed.
- Now, make a copy of 'xhartae' folder somewhere, and run '$ xhartae' from there, or just read the source.
- Feel free to modify (edit) that copy, if you can't fix some error, just replace it with the original one.
When you read some book about a programming language, you can't modify it and recompile it. You can do it with this book, so it's not really a "book", but at the same time it is. If you fuck up something and don't know how to fix it, you'll easily replace that folder with the working one, which you can also download from my GitLain repository. If you're, for example, learning about switch statement, you can just write it inside this book, recompile it and run it. If compiler spits out warnings or error that you can't fix, just delete that part of the code, and go on with your life...
Why should you learn or use C programming language in 2023?
- C was inspiration for many newer programming languages for good reasons.
- C can interface with huge variety of other distinct programming languages.
- C can be a lot more readable, faster and easier if used well.
Goal of this so-called book?
- You'll be able to write your own compiler or interpretter, for your own language after reading this, and many more programs.
- You might learn something new. My target audience is people who don't know C languages, but maybe there's something new for you.
- You won't (hopefully) buy into big ideas and paradigms about programming, you'll just create programs, and have fun doing so.