librelist archives

« back to archive

interview about efene at the erlang factory

interview about efene at the erlang factory

From:
Mariano Guerra
Date:
2010-10-26 @ 20:12
http://www.infoq.com/interviews/guerra-efene-erlang

some things that I say are outdated today (the interview was made on
june) but overall the content is descriptive about the project.

some thing that changes is that now efene is more than just another
syntax for erlang, it adds some new syntactical constructs and
syntactic sugar not available in erlang.

let me know what you think

Re: [efene] interview about efene at the erlang factory

From:
Роман Пельвецкий
Date:
2010-10-28 @ 12:47
>
> it adds some new syntactical constructs and
> syntactic sugar not available in erlang.
>

what are they? i've found only structs and arrow operator in the blog.

Re: [efene] interview about efene at the erlang factory

From:
Mariano Guerra
Date:
2010-10-28 @ 13:05
2010/10/28 Роман Пельвецкий <ffindermeister@gmail.com>:
>> it adds some new syntactical constructs and
>> syntactic sugar not available in erlang.
>
> what are they? i've found only structs and arrow operator in the blog.
>

from the top of my head:

* "local" attributes: allow to "annotate" a function with some
attribute without having to specify the name/arity by hand
* metaprogramming
* range statement: 1..10 generates lists.seq(1, 10)
* if expression can contain function calls
* for expression
* possibility to process attributes in modules and generate code at
compile time (this is how spec and type work)
* structs
* arrow expressions
* fat arrow expressions

and not so syntactic sugar

* you don't have to declare the name of the module or the exports at
the top of the file
* you don't have to repeat the name of the function in every function clause

not all of them are super awesome (the range statement was introduced
because I needed the expression for spec and it made sense to have the
same statement in efene) but some of them can be handy to make the
code more readable and avoid typing.

Re: [efene] interview about efene at the erlang factory

From:
Роман Пельвецкий
Date:
2010-10-30 @ 20:57
> let me know what you think
>

I think that just another syntax is not a reason to people that have strong
skills in Erlang to switch to efene.
And that people can do finished projects that can be success stories for
others.
So, maybe efene need some "killer" features.

That features can be:
1. Strong static typing, that is used in most mainsteam languages like
C,C++, Java, C#.
Static typing is also a key feature to a generation of efficient code in
functional languages like Haskell and OCaml.

2. Linear types. This feature can bring real arrays and structures with
destructable updates, which are safe.
http://en.wikipedia.org/wiki/Linear_type_system

3. Interfaces. In erlang processes have no information about what other
processes can accept as a messages.
Of course you know what are they, because early efene versions were written
in Google Go.

So, now let me know what you think :)

With best regards, Roman

Re: [efene] interview about efene at the erlang factory

From:
Mariano Guerra
Date:
2010-10-30 @ 21:06
2010/10/30 Роман Пельвецкий <ffindermeister@gmail.com>:
>
>> let me know what you think
>
> I think that just another syntax is not a reason to people that have strong
> skills in Erlang to switch to efene.
> And that people can do finished projects that can be success stories for
> others.
> So, maybe efene need some "killer" features.
>
> That features can be:
> 1. Strong static typing, that is used in most mainsteam languages like
> C,C++, Java, C#.
> Static typing is also a key feature to a generation of efficient code in
> functional languages like Haskell and OCaml.
>
> 2. Linear types. This feature can bring real arrays and structures with
> destructable updates, which are safe.
> http://en.wikipedia.org/wiki/Linear_type_system
>
> 3. Interfaces. In erlang processes have no information about what other
> processes can accept as a messages.
> Of course you know what are they, because early efene versions were written
> in Google Go.
>
> So, now let me know what you think :)

the problem is that I can't touch the VM or the erlang runtime so I
can only work at the "code generation" level which is not really
powerful.

this means that static typing, interfaces and all that can't be done.

I think focusing efene as something that erlang doesn't cover well
could be a win.

I'm thinking on pushing efene as "a functional programming language
for the web", ruby got a lot of traction by having a framework like
RoR.

also, the web and desktop are my areas so I know what I would like to
see in efene to be useful.

not shure right now, will work to push the 1.0 release and then work
on documentation and promotion.

if you have some ideas let me know, unfortunately I can't make changes
at the core of the languages since I can't touch erlang runtime, so
differing a lot from erlang is something really hard to do.

Re: [efene] interview about efene at the erlang factory

From:
Роман Пельвецкий
Date:
2010-11-01 @ 06:49
> this means that static typing, interfaces and all that can't be done.
>
I think it is all compiler's work to check the type constraints.
The problem is stdlib and apps which are typeless at most.
Well, it is possible to go the Boo way. All parameters that has unspecified
types can be of type any().

if you have some ideas let me know, unfortunately I can't make changes
> at the core of the languages since I can't touch erlang runtime, so
> differing a lot from erlang is something really hard to do.
>

Mariano, where can I read about Erlang bytecode? and an implementation of
BEAM?
Just reading the sources will take too muchg time to figure out how things
work.

I've read somewhere that BEAM is a register based  virtual machine. Is there
a type specific opcodes for different types.
I.e. integer and floating point addition are two different opcodes or it
just one?

Is it possible to allocate virtual registers and memory at bytecode level?

Cheers, Roman

Re: [efene] interview about efene at the erlang factory

From:
Mariano Guerra
Date:
2010-11-07 @ 04:52
2010/11/1 Роман Пельвецкий <ffindermeister@gmail.com>:
>
>> this means that static typing, interfaces and all that can't be done.
>
> I think it is all compiler's work to check the type constraints.
> The problem is stdlib and apps which are typeless at most.
> Well, it is possible to go the Boo way. All parameters that has unspecified
> types can be of type any().

in erlang type check is made by dializer that is a program on it's
own, efene provides @type and @spec annotation to add type information
to help dializer catch more errors.

you can use that right now, more than that will make efene a
statically typed language I guess..

>> if you have some ideas let me know, unfortunately I can't make changes
>> at the core of the languages since I can't touch erlang runtime, so
>> differing a lot from erlang is something really hard to do.
>
> Mariano, where can I read about Erlang bytecode? and an implementation of
> BEAM?

efene and all the other languages on the erlang vm work at a higher
level, efene generates AST that is passed to a function that generates
bytecode, LFE uses core erlang, a subset of erlang to generate
bytecode. The only project that works at bytecode level is erjang but
AFAIK there is not much documentation about BEAM, you could talk with
the creator of erjang to get some links.

> Just reading the sources will take too muchg time to figure out how things
> work.

yep, as I said there is not much documentation about it (AFAIK).

> I've read somewhere that BEAM is a register based  virtual machine. Is there
> a type specific opcodes for different types.
> I.e. integer and floating point addition are two different opcodes or it
> just one?
>
> Is it possible to allocate virtual registers and memory at bytecode level?

I don't know a lot about this since I don't code at that level, but I
guess that the bytecode for addition is only one and the vm function
that makes the addition checks the types from the variables.

you can read the type definitions here:

https://github.com/erlang/otp/blob/dev/lib/erl_interface/include/ei.h

hope that helps

Re: [efene] interview about efene at the erlang factory

From:
Uwe Dauernheim
Date:
2010-10-26 @ 20:21
Cool, Mariano!

Will listen in to it later.

/Uwe

On 26.10.2010, at 22:12, Mariano Guerra wrote:

> http://www.infoq.com/interviews/guerra-efene-erlang
> 
> some things that I say are outdated today (the interview was made on
> june) but overall the content is descriptive about the project.
> 
> some thing that changes is that now efene is more than just another
> syntax for erlang, it adds some new syntactical constructs and
> syntactic sugar not available in erlang.
> 
> let me know what you think