| Author |
Message |
|
| Gleber |
Posted: Wed Jun 04, 2008 7:45 pm |
|
|
|
User
Joined: 15 May 2007
Posts: 75
|
I've stumbled upon this link few moments ago:
http://reia-lang.org/
And thought it will be interesing for fellow erlangers.
> Reia (pronounced RAY-uh) is a Python/Ruby-like mixed-paradigm language
> targeting the Erlang virtual machine (BEAM) and high-performance
> native compiler (HiPE). Reia aims to expose all the features and functionality
> of Erlang in a language more familiar to programmers of scripting
> languages, while improving string handling, regular expressions,
> linking with external libraries, and other tasks which are generally
> considered outside the scope of Erlang.
--
Gleb Peregud
http://gleber.pl/
Every minute is to be grasped.
Time waits for nobody.
-- Inscription on a Zen Gong
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post received from mailinglist |
|
|
| Back to top |
|
| dmitriid |
Posted: Thu Jun 05, 2008 10:28 am |
|
|
|
User
Joined: 17 Aug 2006
Posts: 213
|
On Jun 5, 2008, at 12:44 PM, Hynek Vychodil wrote:
> I feel it bad. Breaking single assignment is not good idea. In mine
> opinion it would be messy. References (aliasing) will work inside
> one process but doesn't outside by message passing. Or is there plan
> to enable aliasing between processes? Weird. There is not any word
> about it.
>
If my memory serves me right, Nemerle has a similar approach where
mutable variables must be explicitly declared as such
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post received from mailinglist |
|
|
| Back to top |
|
| Gleber |
Posted: Thu Jun 05, 2008 11:16 am |
|
|
|
User
Joined: 15 May 2007
Posts: 75
|
2008/6/5 Hynek Vychodil <vychodil.hynek@gmail.com>:
> I feel it bad. Breaking single assignment is not good idea. In mine opinion
> it would be messy. References (aliasing) will work inside one process but
> doesn't outside by message passing. Or is there plan to enable aliasing
> between processes? Weird. There is not any word about it.
>
> On Wed, Jun 4, 2008 at 9:42 PM, Gleb Peregud <gleber.p@gmail.com> wrote:
>>
>> I've stumbled upon this link few moments ago:
>>
>> http://reia-lang.org/
>>
>> And thought it will be interesing for fellow erlangers.
>>
>> > Reia (pronounced RAY-uh) is a Python/Ruby-like mixed-paradigm language
>> > targeting the Erlang virtual machine (BEAM) and high-performance
>> > native compiler (HiPE). Reia aims to expose all the features and
>> > functionality
>> > of Erlang in a language more familiar to programmers of scripting
>> > languages, while improving string handling, regular expressions,
>> > linking with external libraries, and other tasks which are generally
>> > considered outside the scope of Erlang.
>>
>> --
>> Gleb Peregud
>> http://gleber.pl/
>>
>> Every minute is to be grasped.
>> Time waits for nobody.
>> -- Inscription on a Zen Gong
According to http://wiki.reia-lang.org/wiki/Roadmap :
The First Milestone: Compile to Erlang AST
And I assume that Erlang AST does not permit mutable variables, hence
it will probably not include mutable variables (unless hidden by Reia
-> Erlang AST translator)
I'm not sure, but doesn't compiling to Core Erlang is better way of
implementing new language for Beam/HiPE VM?
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Thu Jun 05, 2008 12:29 pm |
|
|
|
Guest
|
"Gleb Peregud" <gleber.p@gmail.com> writes:
> According to http://wiki.reia-lang.org/wiki/Roadmap :
> The First Milestone: Compile to Erlang AST
> And I assume that Erlang AST does not permit mutable variables, hence
> it will probably not include mutable variables (unless hidden by Reia
> -> Erlang AST translator)
It should be trivial to implement mutable variables, simply by inventing
a new, unused variable name each time a mutable variable is assigned.
(Further references to the mutable variable should be changed to refer
to the new name, of course.)
/Bjorn
--
Bj |
|
|
| Back to top |
|
| Guest |
Posted: Thu Jun 05, 2008 1:23 pm |
|
|
|
Guest
|
Bjorn Gustavsson writes:
> "Gleb Peregud" <gleber.p@gmail.com> writes:
>
> > According to http://wiki.reia-lang.org/wiki/Roadmap :
> > The First Milestone: Compile to Erlang AST
> > And I assume that Erlang AST does not permit mutable variables, hence
> > it will probably not include mutable variables (unless hidden by Reia
> > -> Erlang AST translator)
>
> It should be trivial to implement mutable variables, simply by inventing
> a new, unused variable name each time a mutable variable is assigned.
> (Further references to the mutable variable should be changed to refer
> to the new name, of course.)
Define "mutable variable". I know of (at least) two different kinds:
1. Each variable binding starts a new scope, nested within but
otherwise independent of the previous/surrounding scope.
This is what SML's LET and Scheme's LET* implement.
It's still purely functional and can be implemented via
a simple renaming operation (alpha conversion).
2. A variable is bound to an updateable memory cell, and assignment
updates that cell, like in C/Pascal/etc. If these cells can escape
(e.g. via closures), then simple renaming doesn't suffice, and
you're really forced to have a mutable store. Stores can be
emulated in the Erlang VM, but it won't be cheap.
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post received from mailinglist |
|
|
| Back to top |
|
| vladdu |
Posted: Thu Jun 05, 2008 1:27 pm |
|
|
|
User
Joined: 28 Feb 2005
Posts: 397
Location: Gothenburg, Sweden
|
On Thu, Jun 5, 2008 at 2:23 PM, Bjorn Gustavsson <bjorn@erix.ericsson.se (bjorn@erix.ericsson.se)> wrote:
Quote: "Gleb Peregud" <gleber.p@gmail.com (gleber.p@gmail.com)> writes:
> According to http://wiki.reia-lang.org/wiki/Roadmap :
> The First Milestone: Compile to Erlang AST
> And I assume that Erlang AST does not permit mutable variables, hence
> it will probably not include mutable variables (unless hidden by Reia
> -> Erlang AST translator)
It should be trivial to implement mutable variables, simply by inventing
a new, unused variable name each time a mutable variable is assigned.
(Further references to the mutable variable should be changed to refer
to the new name, of course.)
The big problem with this matter is that Erlang doesn't have variable assignment, it has pattern matching. So if we encounter a reference to an old variable in a pattern, should the old variable be used to check if it matches, or should a new fresh variable be created and matched against the right side? This could be solved for example by using special characters to denote fresh matching, but IMO the resulting mess is worse than the issue that it was created to solve.
regards,
Vlad
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Thu Jun 05, 2008 1:36 pm |
|
|
|
Guest
|
Mikael Pettersson <mikpe@it.uu.se> writes:
> Bjorn Gustavsson writes:
> > It should be trivial to implement mutable variables, simply by inventing
> > a new, unused variable name each time a mutable variable is assigned.
> > (Further references to the mutable variable should be changed to refer
> > to the new name, of course.)
>
> Define "mutable variable". I know of (at least) two different kinds:
>
> 1. Each variable binding starts a new scope, nested within but
> otherwise independent of the previous/surrounding scope.
> This is what SML's LET and Scheme's LET* implement.
> It's still purely functional and can be implemented via
> a simple renaming operation (alpha conversion).
That was the kind of mutable variable I was thinking of, and it seems
to be the kind that REIA supports.
/Bjorn
--
Bj |
|
|
| Back to top |
|
| phil_robinson |
Posted: Fri Jun 06, 2008 12:17 pm |
|
|
|
User
Joined: 01 May 2007
Posts: 16
Location: Australia
|
2008/6/5 Vlad Dumitrescu <vladdu55@gmail.com>:
> The big problem with this matter is that Erlang doesn't have variable
> assignment, it has pattern matching. So if we encounter a reference to an
> old variable in a pattern, should the old variable be used to check if it
> matches, or should a new fresh variable be created and matched against the
> right side? This could be solved for example by using special characters to
> denote fresh matching, but IMO the resulting mess is worse than the issue
> that it was created to solve.
That's exactly what Reia pattern-matching does, with an asterisk in
front of the variable name to denote pattern matching instead of
binding a new value.
An example from the Reia pattern-matching documentation
(http://wiki.reia-lang.org/wiki/Pattern_matching):
>> foo = 42
42
>> (*foo, [bar, baz]) = (1, [2, 3])
NoMatch: right hand side value 1
I'm not yet sure how to handle multiple occurrences of a value,
though. Perhaps this is how it would be done:
>> (blub, *blub) = (42, 42)
I have only browsed the Reia site and haven't actually downloaded and
tried it - to be honest I'm more interested in LFE right now.
Cheers,
Philip
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Mon Jun 09, 2008 5:33 am |
|
|
|
Guest
|
Thus spake Gleb Peregud (gleber.p@gmail.com):
> I've stumbled upon this link few moments ago:
>
> http://reia-lang.org/
>
> And thought it will be interesing for fellow erlangers.
>
> > Reia (pronounced RAY-uh) is a Python/Ruby-like mixed-paradigm language
> > targeting the Erlang virtual machine (BEAM) and high-performance
> > native compiler (HiPE). Reia aims to expose all the features and functionality
> > of Erlang in a language more familiar to programmers of scripting
> > languages, while improving string handling, regular expressions,
> > linking with external libraries, and other tasks which are generally
> > considered outside the scope of Erlang.
I was quite interested until I saw that it supports multiple
assignments to a variable.
--
|Deryk Barker, Computer Science Dept. | Music does not have to be understood|
|Camosun College, Victoria, BC, Canada| It has to be listened to. |
|email: dbarker@camosun.bc.ca | |
|phone: +1 250 370 4452 | Hermann Scherchen. |
_______________________________________________
erlang-questions mailing list
erlang-questions@erlang.org
http://www.erlang.org/mailman/listinfo/erlang-questions
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Mon Jun 16, 2008 1:24 am |
|
|
|
Guest
|
On Wed, Jun 4, 2008 at 1:57 PM, Deryk Barker <dbarker@camosun.bc.ca (dbarker@camosun.bc.ca)> wrote:
Quote: I was quite interested until I saw that it supports multiple
assignments to a variable.
Hi everyone, I'm Reia's creator. |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|