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