Bio Mariano Guerra is an Informations System Engineer from Cordoba Argentina, creator of the efene programming language and emesene instant messenger. His interests are learning and promoting python and erlang, listening a lot of music, traveling and working and promoting open source projects.
The Erlang Factory is an event that focuses on Erlang - the computer language that was designed to support distributed, fault-tolerant, soft-realtime applications with requirements for high availability and high concurrency. The main part of the Factory is the conference - a two-day collection of focused subject tracks with an enormous opportunity to meet the best minds in Erlang and network with experts in all its uses and applications.
I’m Mariano Guerra, I’m 24 years old. I’m a software engineer from Argentina, from Cordoba. Lately I’ve been doing some projects for myself, since I got my degree a month ago. Mainly I’m a Python programmer and I have some projects made in Python, like Emesene, the instant messenger and now I’m becoming an Erlang programmer and I started with this project Efene.
Efene is a programming language that I started working on because for people like me. I’m not a computer scientist, I’m a software engineer, so the languages I learned before are more mainstream, like Java, C++, C and Python. For me, going to functional programming like Erlang is not so easy as for the people that you can see at this conference that have a computer scientist degree. They see a lot of functional programming and a lot of syntax that is not like the mainstream languages.
Since I like Erlang I thought that it will be great to have a language that is easier for new comers to functional programming to start coding and not having to learn the concepts of functional programming and also a new syntax. That’s when you want to learn functional programming it’s a great deal like learning Lisp and having to work with parentheses or stuff like that. I want to make it easier for people like me to start with Erlang.
Yes. My project is a compiler that compiles the syntax of Efene to bytecode in the Erlang Virtual Machine using all the tools that Erlang provides to transform from a language to the bytecode. And you can also convert to Erlang, if you just want to see how it looks like or you have to port your things to Erlang or just for fun.
I try to maintain Efene as a functional programming language. Reia is another project that runs on the Erlang Virtual Machine and it tries to do object oriented programming like Ruby in the Erlang Virtual Machine, but I just want a functional programming language that is easy in the syntax for people coming from mainstream languages, adding some syntactic sugar for things that I feel are a little weird for me or that could be improved.
It’s just for example records. You have to write a hash and the record name and I just did you would write in an object oriented language with dots or I made syntactic sugar for something that I call objects that are not objects in fact, but wrap around a record and make it a friendlier at runtime. You don’t have to write which kind of record it is and you can query the fields and see if this object does have a field, get the name of the object at runtime so you can do more introspection and libraries that can work with different objects instead of writing all at compile time.
Yes. You say "person" if it’s an object that has all these fields and it creates something that is in fact a closure around a record that gives you getters and setters and gives you some function like "Convert this object to a record", "Convert this object to a list of fields. Give me the fields", "Is this field available in this object?" and stuff like that for example makes it very easy to write object to JSON and JSON to object and to make a mapper for MongoDB, for example. Since I have all this information at runtime in records you lost at compile time, for me it’s easier to write shorter code that does a lot.
Yes, all the features in Erlang. Some people ask me if you can do concurrency or you can use the libraries. You can use everything, in fact, I said you can convert to Erlang and you will see that the code is almost the same. The thing that changes is the syntax and in some places, like in objects, in Erlang you will see a lot of code that is automatically generated. In fact, there is a parse transform in Erlang that you write the record automatically it generates the accessors. It’s something like that. If you see the code after the parse transform, you will see that a lot of code was generated.
So yes, you can do concurrency, you can use all the libraries, the performance is almost the same. In the test cases I check that an expression in Efene generates the same bytecode as in Erlang, so you can be sure that it won’t be slower or that you couldn’t use some library that you have already available or you already wrote.
For me it was really easy, not because I know very much, because I learn a lot of Erlang writing Efene, but because the tools and the libraries and the documentation for Erlang is really good, for the languages I know it’s one of the best. It has all the tools that Erlang uses to make Erlang available to you, like the lexers, parsers, the libraries to generate bytecode, pretty printers for code. I just reuse a lot of the Erlang code and the documentation is also really good and also the community helps every time. For me, if I wanted to write a DSL for something, I would consider Erlang to be the first language because of the tools that are available.
I was impressed that there were only two or three languages. Maybe when someone starts, it creates a movement like in the JVM it started with (I think) Groovy or something like that and now you have 10 languages. When someone starts, they see that it’s possible and you can do stuff that is better for your background or what you like. I think it will start to become more like a platform of a lot of languages designed for different needs and the common Erlang runtime or libraries for everyone.
Right now I have almost all the features from Erlang implemented in Efene. There is documentation that says how Erlang transforms everything to an abstract format. All that abstract format is supported by Efene, so everything you can write in Erlang you can write in Efene and it will work the same. All this is covered by test cases, except a spec, the spec to write the API for a function. That’s the future, I have to work on that. Stability-wise I started working on libraries and the tutorial that builds a web application, so I’m eating my dog food, I’m writing code in Efene.
In fact, until 0.4 Efene was written in Efene and it became a re-write I had to do because some things I learned were not so right. Now it’s written in Erlang, but I think I will start porting it again to Efene because I think the syntax is stable now and I think I want to do backward incompatible changes for now, until 1.0. I will see later.
I get some comments in the documentation and people are trying it, compiling examples, compiling the tutorial, but not using it for production or with a specific goal, they are just trying the language. I have to learn how to get at least a small community because I want to hear some feedback before I get to 1.0 because then I can’t make some changes that now are possible, but then, if someone starts coding, I don’t want to break everything they wrote at the moment. I want to hear some feedback from people. If someone wants to give me feedback, the page at GitHub or I have a comment system in the documentation so they can ask questions.
Some years ago I heard an interview from Joe Armstrong and a lot of things he said were really new to me, but really interesting, different from what I saw at the university about threads and concurrency and locks. All the things he said made sense for me, so I got the book he wrote, at that moment and read it and I wanted to do something with Erlang but I couldn’t find some project. I learn things by doing projects. I didn’t know what to do, I tried to make the people that I worked for to let me use Erlang, but I couldn’t, so I started Efene as a way to try Erlang and I’m more convinced now that it’s a good language to know and to learn and to use for different things.