lunes, 28 de septiembre de 2020

Ruby and the Interpreter Pattern

 

This article was difficult to read for me because it is very technical, and I tend to be distracted easily. In addition, a need a more kinesthetic method for learning so just reading the application but not having anything I can do myself made it harder for me to learn the subject that was explained in the reading. That being said, I actually thanked a lot the small summarize put in each phase and the examples made it much clear for me.

The S-expression Interpreter Framework or SIF for short is a very useful tool to teach language design and language interpretation. It is based on the interpreter design pattern and it uses Ruby this allows to extend its capacities by adding primitive procedures and special forms. It is very useful to demonstrate different programming styles as well as advanced concepts of programming languages, such as variables, scopes, and continuations.

It explains the steps followed during the interpretation process. Something that helped me a lot was how the author explains the difference between the syntax interpretation and the semantics interpretation it made me realize that the order in which this two happen is very important. The syntax must be checked in the initialize method and the semantics in the interpreter method.

In conclusion, I think this was a very good lecture that I can relate to the current project we are doing in our Compiler design course. Even though, I don’t know Ruby I feel we could learn this quite fast since it is made to be easy and clear for the students and for me that is very important.

lunes, 21 de septiembre de 2020

Mother of Compilers

 Grace Hopper rules!!!

What a badass woman, to be able to do as much as she did during such difficult times for both the world and women in general. I can only imagine how hard it most have been for her to enter such a man dominated world that is the navy. I have always known that it is because of brave woman like her that I and many other girls are able to study and work in fields that used to be considered men oriented. It is nice to see that her work is being truly recognized, titles such as “The Queen of Code” and “Mother of Cobolt” are not to be ignored.

She must had gone through many difficulties since childhood, like the reading said many of her skills were ignored or diminish by others. However, she was able to move pass all the obstacles and do exactly what she wanted to do. In my opinion Grace Hopper was not “way ahead of her time” like people say, she was exactly at the place and time she needed to be and the people that surrounded her knew it. She began her career in computer science why before it was a complete field and she made developments that are still important today. I find very interesting how in the video they describe her as woman who didn’t care for titles and never tried to be become a symbol for feminist, she just wanted to do her job. I think that for a time where it was still expected for woman to have a certain lifestyle and man another Hopper was treated like an equal by other man.

“I’ve driven a large number of people at the base partially nuts, after all insisting on talking to computers in plain English was a totally ridiculous idea and you couldn’t do that, expect that it worked” - Grace Hopper

Hopper invented the first compiler in 1951 effectively allowing people to communicate with a computer in a simpler way. This allowed people that weren’t mathematicians geniuses to start using them. This first compiler became the bases for the programing language Cobolt, which became the biggest programing language all around the time. Now we don’t really use Cobolt anymore but the bases in which it was build are still very much present in today’s compilers.

To finish, I think Grace Hopper is an inspiration for everyone not just woman, she always tried her best and kept trying and trying until she succeed, no matter her job position, sex or even age she would keep working hard and would keep teaching others. I admire a lot that even at a very old age she was still trying to teach the young while also keep on learning herself. 

Grace Hopper, la mujer que hizo posible el futuro – TJ Times 

-Grace Hopper next to the UNIVAC computer-

lunes, 7 de septiembre de 2020

Internals of GCC

 

What makes compilers interesting? This is how podcast begins, in short words they are interesting because they make programs run smoothly and fast in your system. So, we already know what a compiler does, they translate a source file and it will produce a representation in order to make an object code for the desire language.

There is a new “gnu compiler collection” that is very useful because while it works in many OS it is very flexible and portable for different systems and languages, which makes it reliable to may programmers out there. It is composed of a language frontend that can be swapped for whatever you need, a middle end that manipulates the source and a backend that produces specific architecture.

The language frontend makes sure to understand the lexical and semantic parts of the language and checks for mistakes. One thing that I think I understood form the podcast is that this compiler tries to simplify as much as possible in order to be able to be as flexible and portable. The idea is to be able to boot it very simply with minimal set. This is why the front end is mostly written in C. I really liked how the host described the frontend “The frontend is basically a black box that take the input a return a tree”. Then we have the middle end here the program tries to fine the most optimal way to run through the architectural tree, it creates an equivalent tree representation from high level to low level such as the RTL which is a linear sequel of codes that are very simple that will be translated to the assembly language so that many low level optimizations can be made.  Something interesting that I never thought about is that the actual optimizations are easier to do while doing the registers and then tried to store the most optimal trees so that they don’t overlap and overworks the memory. In the backend according to the machine description the GCC makes like a template that will work with the machine and the code.  

At this point the basic architectural program that compare to the original source program is done and the driver program to run it. So, everything is done automatically. How nice I wish all programs were as friendly.

Lin Clark on WebAssembly

  This time we got to listen to a podcast for our Compiler Design Class. We listen to Lin Clark, a programmer that makes cartoons to simpl...