The science, tools, strategies, patterns and tools behind the creation and processing of languages

What if sketching on a whiteboard was a form of programming_

What if sketching on a whiteboard was a form of programming?

There are different possible notations for languages: textual and graphical are the two larger families. We can define graphical notations for formal languages. For example we can define a graphical notation to define state machines. A Domain Specific Language for state machines can be defined using JetBrains MPS. However the user would have to edit […]

Raising the level of abstraction_ what if we tried to do that bottom up_

Raising the level of abstraction: what if we tried to do that bottom up?

It is clear that software development is going in the direction of raising the level of abstraction since it was born. The reason is simple: we can juggle with so many concepts in our mind. If we are busy thinking about what we stored in the EAX register it is difficult to think about the […]

A book on creating languages and supporting tools

From some time I have been working on a book about creating languages. Why? Because I think that languages are extremely useful tools and by creating languages and supporting tools we have the power to change completely how people and organization works. I have seen the effect languages can have on productivity in real companies […]

Parsing any language in 5 minutes

Parsing Any Language in Java in 5 Minutes Using ANTLR: for Example Python

I like processing code for several purposes, like static analysis or automated refactoring. The interesting part to me is to reason on the models you build from the Abstract Syntax Tree (AST). To get there you need a way to get the AST from your source files. This can be done easily using ANTLR and the […]

Getting started with Jetbrains MPS_ how to define a simple language

Getting started with Jetbrains MPS: how to define a simple language (screencast)

I am blessed (or cursed) with having many different interests in software development. However my deepest love is with language engineering. There are different tools and techniques but Jetbrains MPS is particularly fascinating. To help people getting started or just get the feeling of how it is to develop with Jetbrains MPS I recorded this short screencast. […]

dynamic, static, optional, structural typing and engineering challenges

Dynamic, static, optional, structural typing and engineering challenges

How an engineer should NOT look at technical matters Dynamic versus static typing is one of those confrontations that seams to attracts zealots. It really sadden me to see how people tend to defend vehemently their side simply because they are not able to understand the other position. In my opinion if you do not get […]

Alternatives to global variables and passing the same value over a long chain of calls

Alternatives to global variables and passing the same value over a long chain of calls

The old, good global variables are the wrong solution to a real problem: you want some information to be available in a large context. In Object-Oriented languages like Java we often do not have something we call a global variable. We instead lie to ourself using public static variables or singletons and denying they are exactly […]

Representing relationships as first-class citizens in an Object-oriented programming language

Representing relationships as first-class citizens in an Object-oriented programming language

As beginners we used to write very large functions and then giant God classes. As we improve our skills, our classes become smaller but more numerous: we get a swarm of small, focuses classes that collaborate to create the final system. In other words we shift the complexity from the relations between the components of a class to the […]

Turin Programming Language for the JVM: building advanced lexers with ANTLR

Turin Programming Language for the JVM: Building Advanced Lexers with ANTLR

As I wrote in my last post, I recently started working on a new programming language named Turin. A working compiler for an initial version of the language is available on GitHub. I am currently improving the language and working on a Maven and an IntelliJ plugins. Here and in the next posts I will go over the […]

Turin Programming Language for the JVM: building advanced lexers with ANTLR

Creating a Programming Language for the JVM: the Turin Programming Language

Because you know, in the end everyone wants to create his own programming language. I have been interested in parsers and languages for a while. I worked with Xtext, Jetbrains MPS, created a few DSLs etc. etc. I also wrote my PhD thesis on this topic but so far I did not get started creating […]