navigation

MrCoder

“C’est en forgeant qu’on devient forgeron.” (french proverb)


Goal

This little corner of the web is dedicated to learn computer science by coding stuff. We will go together, step by step, through different themes of computer science, building along the way softwares to thoroughly understand the different subjects. I hope this will be helpful for some of you and that you will have fun learning.

Site structure

I will use text, videos and code to explain the different subjects:

  • Videos are in french with english subtitles.
  • Code is on github.

Go to the left panel or look at the themes below to choose your subject and let’s dive into the vast and beautiful world of computer science!

Subjects overview

  • MiniJava transpiler
    • We transform a MiniJava source file, which is a subset of Java, into a C source file. We then use gcc to translate the C file into an executable one.
      To do this transpiling, we first do a lexical analysis of the MiniJava source file, then a syntax analysis, then we typecheck the code and finally, we generate a C source file from the abstract syntax tree of MiniJava. The most difficult parts for the code generation are the class and dynamic binding representations and the inclusion of a garbage collector.
      The transpiler is written in OCaml using Menhir for the parser.