At the end of my previous post, I think I lost most of the readers when I compared Web applications to DSLs, and then talked about implementing them as external or internal DSLs. For people with no actual experience with implementing DSLs this comparison is probably hard, and especially the distinction between internal and external DSLs. I remember having long conversations with fellow DSL researchers not agreeing if a certain DSL framework works with external or internal DSLs. So if I lost you there, don’t feel bad. It’s on me.
In this post I am going to demonstrate this equivalence between DSLs and Web apps by defining the logic of a simple Web application using Cedalion — a language designed to host DSLs. We are not going to implement a Web application here. Unfortunately, no actual application will come out of this exercise, but with a bit of imagination this exercise will demonstrate what the goal of my research is: I want Web applications to be as easy to implement as this!
Read More »
We ended part II of this tutorial at a point where our DSL allowed us to define functions. But these functions are limited. We easily defined a function that squares a number, but if we were to generalize this to say, raise a number by a given power, we were in for a problem. We could do this with recursion, of course, but recursion needs to stop at some point. For that, we need support for conditionals — a way to ask whether we need to stop or to carry on recursing.
In this part we will define the two necessary components: a >= predicate that compares expressions, and a conditional expression. We will focus on giving both the look and feel of their mathematical counterparts. To demonstrate our new abilities we will implement the factorial operator.Read More »
In Part I we started defining a small DSL in Cedalion. For now, our DSL consists of expressions, but the only type of expression we currently support is a constant. Not a very interesting DSL…
We will now change this, by adding some arithmetics into our expressions.Read More »
During the last few days I wrote a few tutorials on installing Cedalion and getting started with it. All tutorials are accompanied by videos. In this post I will guide the reader (you…) as you will implement your first DSL in Cedalion. To keep things simple, I’ll base this DSL on the one we implemented in Prolog in my previous post.Read More »
In my previous post I wrote about the two insights that lead to the development of Cedalion, and the first of them was realizing the true power of logic programming. In this post I would like to explain this.
I am assuming most reader have heard about logic programming, and maybe some of the readers even studied Prolog at one point in their life, but I cannot assume readers remember much of it. So I’ll try to take it slow…Read More »