Entradas

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

Lin Clark on WebAssembly

 Web assembly is a tool dedicated to improve navigating around the web, where we basically have 3 different programming languages working together, but this was an accident, and the integration of this languages is not as efficient as we would like.  Web assembly is a tool dedicated to fix this, where web assembly is designed to be as efficient as possible, that can run very fast for cpu or gpu intensive applications like videogames, video/photo editors or parsers. Web assembly is a standard impulsed by a lot of companies like unity, unreal and the multiple web browser developers. Right now we are at the limit of javascript. Javascript is to slow to run modern applications and optimizing javascript can break your code in multiple web engines and optimizing the web engine interpreter can easily break a lot of javascript code.   Web assembly is a set of instructions to compile our code to run on any supported web browser, similar in a lot of things to code compiled with java running in m

Building Server-Side Web Language Processors

 In the paper, the author talks about his experience in teaching to undergraduate students in multiple computing science courses. The web is a tool that most computing science students will need to use, web development can look boring for most students, but showing them the web working can increase the interest in web development for most students, another advantage in web development is compatibility and excitement. Web development means that any person with a functional web browser can experience everything you have done compared to any other type of program, where you may need an interpreter(python, java, ruby, etc), specific libraries or run a binary that people could refuse to run due to security concerns. Characteristics of a web language: Must specifications for other languages can fit perfectly in web development, but certain specifications are much more important like compact syntax, garbage collection etc.   Hypertext Transfer Protocol:  HTTP allows to transfer data between a

Mother of Compilers

 Early computers were more about the engineering process than logic, and given the circumstances of the era, computers, mechanical computers and not human computers were considered something that only male could dominate and understand, but software was something where females could demonstrate their abilities. Ada Countess of Lovelace was the first women dedicated to programming.  She worked on COBOL, one of the oldest but still relevant programming languages and helped computing to be everything it is now, she was in computers when computers were not even a thing, programming was not a thing, programs were something, but the process to input code into a machine was hard and expensive to do.   She was curious when she was young, studying harder than most of other students in high school, and doing much more than was expected for a women.  When the US entered to the second world war, she was assigned to the US Naval Reserve. They knew how smart and valuable to the team she could become

Episode 61: Internals of GCC

 As a programmer, you need to make sure that your code will run as best as possible (with a good performance and good compatibility) with the CPU  your program is intended to run, this means that a good compiler for your code is needed, that's where GCC can be used, using GCC you can generate the front end and the back end with little modifications to run in any platform. A compiler will pass multiple times the code to implement everything needed, from the multiple front end implementation that may not be available in C for example, that natively does not support polymorphism, but can be implemented with the correct extensions, or this multiple passes can be used to optimize depending on the platform, operating system or CPU architecture (x86, arm, RISC V etc). Also, the language will delete "garbage code" in the lowest level of your code, will look for small machine code instructions and replace them with faster, better and more secure instructions, increasing the effici

The Hundred-Year Language

 We were supposed to drive flying cars 5 years ago, right?,   The legacy of some old programming languages is something to be analyzed, because these new languages can be better understood if we, as programmers understand how and why these languages came to be and how can they be improved and what characteristics or tools are lacking. A hard decision for other people is to decide the language to learn or maybe what language use for a project that will be need to be maintained in the future. The operators in a language are one of the most important things about a language, these operators are are the axioms of a language,other parts of the language can be replaced or improved relatively easy, but modifying the axioms of a language can drastically change everything that make this language unique and useful, but sometimes this happens.  The languages change, they adopt different things and merge with others, adopting things from others and maybe, this new construction or creature will be