Entradas

Mostrando las entradas de noviembre, 2021

Language Design and Implementation using Ruby and the Interpreter Pattern

 The interpreter pattern can be an interesting tool to tech students to understand the characteristics and intrinsic of a compiler, using the ruby regular expression API can help to scan all the code, detect all the respective "S-expressions" and generate  the respective three for the interpreter pattern. Ruby is an excellent tool for this, having a simple and precise sintaxis, the datatypes in ruby are clearly defined and differentiated from other data types, the primitives are also procedures that allow to bind variables defined previously.  SIF: s expression interpreter framework,  this framework has a series of rules that allow it to be used in teaching: Code blocks: this technique allows a block of code to be easily identified, encased by curly braces, usually this block codes are for one specific part or structure of our code, the evaluation is based around symbols, lists and values that need to be evaluated in order to execute the code. The lists are used

Reflections on Trusting Trust

 Unix was one of the first operating systems to be popular in the entire industry that allowed professionals to do all kind of stuff, an interesting program that Ken talks about is a self replicating program, where executing the program generates a new exact copy of itself, but is not necessarily copying it self.  The first one were created in Fortran, but this programs can be built in multiple programming languages, including C and many others.  The chicken and egg problem is a relatively hard to solve problem for a lot of situations, where you need "A" (an chicken) to create "B"(an egg), but this "B" only can be created by "B",. So you have a contradiction that in theory can not be solved. Fortunately, for a compiler, you can use a temporary "B" and use it to generate "A", then use "A" to replace "B". In  this example, the compiler for C is written in C. Where new tools and functionality is added to the c