Entradas

Ruby and the Interpreter Pattern

In order to have a better understand of how a compiler works is to understand the language design and patterns. I think that SIF is a very interesting tool that allows us to get an overall knowledge about design patterns. S-expressions are parenthesis prefixed, like Clojure, language that we see last semester, and has many useful features in order to accomplish this goal, such as ease of adding new language construct and writing a parser to it. Basically, the interpreter first creates a tree with each element of the source code, giving to each element a specific node type. Then, each node has a specific function or task to do. Also, a context is provided to the function that consists basically in a variable table. So, the interpreter uses a string as the source code. Later, it uses the Ruby regular expression API to scan the input, then the syntax analysis is performed and finally the tree is constructed. So, I think that an interpreter is a reduced version of a comp...

The Hundred-Year Language

Trying to predict anything is a difficult task. In the case of programming languages is not the exception. We, as future computer professionals, have to have in mind that the same way that the species evolve, the programming languages evolve too. So, can we really imagine how the programming languages will be in hundred years? I think that it is almost impossible to predict. Indeed, trying to predict how the society will be is pretty difficult. Do we will have flying cars? Or at least computers? So, the interesting thing about this is that today we can’t predict what will happen in hundred years, but we can start to analyze which languages have more future than others. Paul Graham mentioned that Java is one of these languages that doesn’t seem to have future. We can analyze a programming language by its successors and how it is designed to be adapted. Another way that the programming languages have to survive is combining them with another newer. It is important to h...

Making Compiler Design Relevant for Students

It’s true that almost nobody will be a compiler designer or developer. So, what is the importance for a computer science student to take the compiler design course? There are more about than the compiler itself. The techniques that we learn in this course could be applied in many ways. Although the objective of the course is to learn how to translate high level language into low level assembly or machine code, we can use the basics and principles of the 4 compiler phases to do more than a compiler, which involves: Lexical Analysis, Semantic Analysis, Code Generation and Optimization. One of the examples that author of   “Making Compiler Design Relevant for Students who will (Most Likely) Never Design a Compiler” gives is to make a translator from LaTex to HTML. Indeed, I had a related experience. I started working about 7 months ago, and one of my first tasks was to make a parser that receives a SQL file and outputs a PHP file with the corresponding SQL instructi...

About me

My name is Oscar Allan Ruiz Toledo. I'm 23 years old. At the present, I'm studying the 7th semester of B.S. Computer Science & Technology at ITESM CEM. In the other hand, I'm a Software Engineer Intern at a FinTech called Konfio. I have heard that this course is one of the most difficult courses in the whole career, so I like challenges and I'm very excited because I'm sure that this course will be extremely challenging.  One of my hobbies is to play soccer and video games. Also, I like to go to the cinema and the theater. I recently enjoyed 'The Greatest Showman' movie.  Moreover, I like to watch TV series on Netflix. One of my favorite series, and I strongly recommend, is Breaking Bad.