Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

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

closed as too broad by Adam 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.

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
Maybe not too helpful, but I recommend going through (Steve Yegge's blog), and (Steve Yegge's other blog). – KK. Oct 24 '11 at 13:20
Learn as many programming languages as you can. That way you will learn from their concepts as well as their mistakes. Why be content with dwarfs, when you can stand on the shoulder of giants? – sbi Oct 24 '11 at 13:54

33 Answers 33

Coursera is offering a free 10-week course on compilers soon. You can also have a look at the lecture videos here. The lecture videos include the following topics:

  • The Cool Programming Language
  • Lexical analysis
  • Finite Automata
  • Parsing
  • Top-Down Parsing
  • Bottom-Up Parsing
  • Semantic Analysis and Type Checking
  • Cool Type Checking
  • Runtime Organization
  • Code Generation
  • Opertational Semantics
  • Local Optimization
  • Global Optimization
  • Register Allocation
  • Garbage Collection
  • Java

You may also be interested in some podcasts about compiler construction.

share|improve this answer

Making your own (simple) compiler isn't much difficult. Try 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

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:

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
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

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.