In this entry, we've taken a detour from the programmer biographies and the software engineering radio to dive into a paper by the one and only, Ariel Ortiz.
Everytime I'm met with a paper, I must admit I do get a little intimidated. This one, however, links concepts from each one of Mr. O's classes, which did made me go: "Hey, that's pretty neat".
The S-Expression Interpreter Framework is, as stated by the paper, a tool for teaching language design and implementation. Written in Ruby, of course, as well as employing the interpreter pattern, but it uses S-Expressions, so it looks like LISP, On top of all that, it's an interpreter, so what we get is a bunch of combined topics that should spark interest in an undergrad of my semester (it also reminds me of a flavoured water joke, made by a popular mexican comedy show of the 70's).
So, how does the SIF work? Well, as we've seen, in the interpreter it consists of two phases. During the first, we take the given code (text) and it is parsed into an Abstract Syntax Tree (AST). In the next phase, the tree is then evaluated. A regex API is then used to scan a string which turns the S-Expression into a format that is understood by Ruby, using a Regex API. At the end, the AST is built. I obviously did not go into very much detail, but the reading itself is brief and the main takeaway is the functionality.
In the end, these inside looks into the planning of educational material is very interesting. When multiple concepts from different courses are brought together in this fashion, you really start to imagine how oneself might apply it later on in future projects. Overall, I really enjoyed looking back at the programming languages course. Despite struggling a bit with the problem sets, the satisfaction of acing an exam and really getting the lispy logic into your brain was a semester highlight.
Everytime I'm met with a paper, I must admit I do get a little intimidated. This one, however, links concepts from each one of Mr. O's classes, which did made me go: "Hey, that's pretty neat".
The S-Expression Interpreter Framework is, as stated by the paper, a tool for teaching language design and implementation. Written in Ruby, of course, as well as employing the interpreter pattern, but it uses S-Expressions, so it looks like LISP, On top of all that, it's an interpreter, so what we get is a bunch of combined topics that should spark interest in an undergrad of my semester (it also reminds me of a flavoured water joke, made by a popular mexican comedy show of the 70's).
So, how does the SIF work? Well, as we've seen, in the interpreter it consists of two phases. During the first, we take the given code (text) and it is parsed into an Abstract Syntax Tree (AST). In the next phase, the tree is then evaluated. A regex API is then used to scan a string which turns the S-Expression into a format that is understood by Ruby, using a Regex API. At the end, the AST is built. I obviously did not go into very much detail, but the reading itself is brief and the main takeaway is the functionality.
In the end, these inside looks into the planning of educational material is very interesting. When multiple concepts from different courses are brought together in this fashion, you really start to imagine how oneself might apply it later on in future projects. Overall, I really enjoyed looking back at the programming languages course. Despite struggling a bit with the problem sets, the satisfaction of acing an exam and really getting the lispy logic into your brain was a semester highlight.
Comments
Post a Comment