Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am thorough with programming and have come across languages including BASIC, FORTRAN, COBOL, LISP, LOGO, Java, C++, C, MATLAB, Mathematica, Python, Ruby, Perl, JavaScript, Assembly and so on. I can't understand how people create programming languages and devise compilers for it. I also couldn't understand how people create OS like Windows, Mac, UNIX, DOS and so on. The other thing that is mysterious to me is how people create libraries like OpenGL, OpenCL, OpenCV, Cocoa, MFC and so on. The last thing I am unable to figure out is how scientists devise an assembly language and an assembler for a microprocessor. I would really like to learn all of these stuff and I am 15 years old. I always wanted to be a computer scientist someone like Babbage, Turing, Shannon, or Dennis Ritchie.


I have already read Aho's Compiler Design and Tanenbaum's OS concepts book and they all only discuss concepts and code in a high level. They don't go into the details and nuances and how to devise a compiler or operating system. I want a concrete understanding so that I can create one myself and not just an understanding of what a thread, semaphore, process, or parsing is. I asked my brother about all this. He is a SB student in EECS at MIT and hasn't got a clue of how to actually create all these stuff in the real world. All he knows is just an understanding of Compiler Design and OS concepts like the ones that you guys have mentioned (i.e. like Thread, Synchronization, Concurrency, memory management, Lexical Analysis, Intermediate code generation and so on)

share|improve this question
7  
Commenters: comments are meant for seeking clarification, not for extended discussion. If you have a solution, leave an answer. If your solution is already posted, please upvote it. If you'd like to discuss this question with others, please use chat. See the FAQ for more information. –  user8 Jun 18 '11 at 22:42
add comment

closed as too broad by Anna Lear Oct 23 '13 at 19:17

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

33 Answers

Making your own (simple) compiler isn't much difficult. Try http://briancbecker.com/bcbcms/site/proj/comptut.html. It is an incomplete tutorial but it gives you a great start to build a compiler in C++. You may also find Let's Build a Compiler useful but I don't know Pascal so I couldn't understand it much.

One good thing about BCB Compiler Tutorial is that it doesn't teach much theory and doesn't use all those confusing terms like Lexer, Parsing, etc. Very good for beginners.

share|improve this answer
add comment

If you want to take a thorough look at operating systems, get Understanding the Linux Kernel. There won't be any questions left.

share|improve this answer
add comment

Please don't listen to these people. Assembler isn't worth anything on its own, nor is any other language, nor is any other knowledge for that matter. The only thing that counts, is that you have fun completing projects. You can go from there, it is completely unnecessary to learn all the low level stuff before you have the faintest idea that you even need to go that deep.

Go through this tutorial and build your own language: http://llvm.org/docs/tutorial/

Learn everything about the llvm and clang compiler toolchain. You are going to be just fine, and you'll actually achieve something instead of reading thousands of pages of meaningless theory.

Don't let these people discourage you. It is absolutely not necessary to go to college. Most "experts" and professors know near nothing, trust me. Go to college because it's a life lesson, not to learn something. You can learn on your own.

share|improve this answer
3  
And the final piece of advice - never take advice from someone who thinks that experts and professors don't know anything. He was the guy sitting at the back playing games on his laptop during lectures ... if he bothered to attend :-) –  Stephen C Aug 23 '12 at 23:34
add comment

protected by Community Jul 28 '12 at 22:24

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.