erlang sucks

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 - 3 - 4 - 5 - 6 - 7 | Next >

Re: erlang sucks

by Thomas Lindgren :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


--- "Ulf Wiger (TN/EAB)" <ulf.wiger@...>
wrote:

> Raoul Duke skrev:
>
> > this has nothing to do with the reality of Erlang
> :-) but presumably
> > in a sufficiently powerful type system you could
> constrain the guards
> > to be safe?
>
> Given the state of type checking in Erlang nowadays,
> this might indeed
> be ripe for some research and prototyping.

Marking functions as safe/pure is straightforward when
you have the whole program -- just mark the uncertain
cases as impure -- so you could easily verify that a
certain software release only uses safe guards.

As far as I can see, the main problem would be
piecemeal use of code, such as in ad hoc hot code
loading. But even here, it seems you could reject the
module at load time by (a) enclosing suitable
annotations with the beam file and (b) a quick bit of
load-time analysis.

Best,
Thomas




      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: erlang *****

by Bugzilla from bekesa@sch.bme.hu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I was following this topic and was waiting for the right time to throw
in my ideas :-)

> case X of
> _ when X == abc; X == xyz ->
> do_abc_or_xyz();

> I don't much like the _ when business.
Yes, I agree, but while you suggest using 'if' in similar cases, I
suggest a different solution.

The point here is that you want do have the same result in several
cases, but you can't do it with the 'case' construct. You use guards
instead of pattern matching, because the logic "OR" operator (;) can be
used with guards, while it cannot be used with patterns.

Pattern matching basically tests whether a term is a member of a subset
of terms. So a pattern describes a subset of terms. Patterns and guards
together do the same, they describe a subset of terms by deselecting
values that don't satisfy the guards.

The ; operator means union. The pattern
Pattern when Guard1; Guard2
describes the subset of terms:
(Pattern when Guard1) UNION (Pattern when Guard2)

Why don't we extend the notion of patterns to somehow describe the union
set operation?

We already can describe the intersection of patterns:
Pattern1=Pattern2
describes the subset
Pattern1 INTERSECTION Pattern2

I think there is no '\/' operator in Erlang, so
Pattern1 \/ Pattern2 could mean Pattern1 UNION Pattern2

Let's see some example uses:
{a,_,_} \/ {b,_,_}
[ a \/ b | Tail ]
{a,X,_} when is_integer(X) \/ {X,b,_} when X>3

The union of patterns matches if (at least) one of the patterns matches.
The union pattern binds only the names that are present in each pattern.
Other names are considered unsafe.

There is one more basic set operation: subtraction. With the use of
guards, you can subtract a subsets from a set described by a pattern:
A positive guard subtracts the terms that don't satisfy the guard,
negated guards subtract the terms that do.
But you cannot subtract a subset of terms described by a pattern.
I've already suggested a pattern-match-test operator. It does have other
uses as well, but it is also useful for subtracting subsets:
Let "Pattern ~= Expression" semantically mean
case Expression of Pattern -> true; _ -> false end
You'll want to use this in guards:

Pattern1 when not (Pattern2 ~= Pattern1)
means
Pattern1 MINUS Pattern2

Of course the syntax might seem terrible, there are probably better
symbols for set operations.

The addition of these two constructs would:
- amend patterns to be a complete syntax for describing a subset of
terms
- allow programmers to avoid duplicated code
- only _extend_ Erlang, not changing the behaviour of existing programs
- almost entirely obsolate the 'if' construct

However, in order to fully obsolate 'if', we'd need some case-like
construct that can check multiple expressions.
This is what Richard A. O'Keefe suggested:

> This can be handled pretty closely by
>         case E1 of true -> S1;
>         case E2 of true -> S2;
>         ...
>         case En of true -> Sn
>         end ... end end
> All that's really needed here is an equivalent of Algol 68's "ouse",
> which was to 'case' as 'elif' was to 'if'.  So add it!
>
>         case E1 of true -> S1
>         ouse E2 of true -> S2
>         ...
>         ouse En of true -> Sn
>         end

I don't have a better syntax proposal, but I completely agree.

Besides:
> The differences really boil down to this:
>     guards are for INDEXING.

Yes, patterns and guards not only have to be expressive, they also have
to be very efficient.

You might think that the above idea of extending pattern matching with
the union operator ruins the clever indexing of patterns. It does not,
because the decision diagram does not have to be a tree, i.e. union'd
patterns might have independent paths in the decision diagram, but end
in the same leaf (function or case clause).

        Georgy
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: erlang sucks

by Ulf Wiger (TN/EAB) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thomas Lindgren skrev:

> --- "Ulf Wiger (TN/EAB)" <ulf.wiger@...>
> wrote:
>
>> Raoul Duke skrev:
>>
>>> this has nothing to do with the reality of Erlang
>> :-) but presumably
>>> in a sufficiently powerful type system you could
>> constrain the guards
>>> to be safe?
>> Given the state of type checking in Erlang nowadays,
>> this might indeed
>> be ripe for some research and prototyping.
>
> Marking functions as safe/pure is straightforward when
> you have the whole program -- just mark the uncertain
> cases as impure -- so you could easily verify that a
> certain software release only uses safe guards.
>
> As far as I can see, the main problem would be
> piecemeal use of code, such as in ad hoc hot code
> loading. But even here, it seems you could reject the
> module at load time by (a) enclosing suitable
> annotations with the beam file and (b) a quick bit of
> load-time analysis.

...or mark calls to external functions as impure/unsafe.

I think this is a reasonable restriction.

BR,
Ulf W
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: erlang *****

by Vlad Dumitrescu-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Fri, Mar 14, 2008 at 12:57 PM, Andras Georgy Bekes <bekesa@...> wrote:
>  Why don't we extend the notion of patterns to somehow describe the union
>  set operation?

That's a very good idea, I think. I mean not only the union operation,
but the whole proposal. Maybe you should prepare an EEP -- pattern
matching is one of the main strengths of Erlang as a language and
improving it would affect positively all the code base. [and it's a
backward-compatible change]

I see a couple of additional (future) steps:

** Since something new is added to the language, we could look at
removing something: the guards, by allowing inlined guard expressions
in the pattern itself, like for example
    {integer(X), _, X>3, atom(Y), Z!=[X,Y]}
or
    {integer(X>3), _, X, atom(Y), Z!={X,Y]}
would be equivalent to
    {X, _, X, Y} when is_integer(X), X>3, is_atom(Y), not(Z ~=[X, Y]).


** And from here I think only the '?' and '*' operators (i.e. the
optional marker and the Kleene closure) are missing in order to get a
pattern language with full regular expression power. But that can wait
for a little while, maybe :-)

best regards,
Vlad

--
Some people see things that are and ask, Why?
Some people dream of things that never were and ask, Why not?
Some people have to go to work and don't have time for all that.
--- George Carlin
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: erlang sucks

by Rick Pettit :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Mar 14, 2008 at 09:07:58AM +0100, Mats Cronqvist wrote:
> Richard A. O'Keefe wrote:
> >
> >I don't know what the acronym "DRY" stands for.
> Don't Repeat Yourself. Popularized by the Pragmatic Programmers.

I'm still a bit fuzzy on the difference between DRY and SPOT (single point of
truth).

I've got the book around here someplace--maybe I need a review :-)

-Rick

P.S. Naturally if DRY == SPOT then DRY wins (less typing, and we all know that
     laziness is a virtue).
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: erlang rules!!

by fess-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



Hi,

just changing the subject on this thread,  so I don't have to  
repeatedly be told in my inbox that erlang sucks.

of course, it probably won't work because people will keep replying  
to the old thread, and then every few minutes my mail will inform me  
that erlang sucks.

*grin*

--fess
"erlang high school football rules!"


_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Parent Message unknown Re: erlang sucks!!

by Sean Hinde :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> just changing the subject on this thread,  so I don't have to  
> repeatedly be told in my inbox that erlang sucks.
>
> of course, it probably won't work because people will keep replying  
> to the old thread, and then every few minutes my mail will inform me  
> that erlang sucks.
>

I'm sure Erlang will survive the accusation :-)

Sean
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: erlang sucks

by Michael Campbell-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rick Pettit wrote:
> On Fri, Mar 14, 2008 at 09:07:58AM +0100, Mats Cronqvist wrote:
>> Richard A. O'Keefe wrote:
>>> I don't know what the acronym "DRY" stands for.
>> Don't Repeat Yourself. Popularized by the Pragmatic Programmers.
>
> I'm still a bit fuzzy on the difference between DRY and SPOT (single point of
> truth).


Don't forget the (tongue in cheek) converse "WET" principal... "Write
Everything Twice".  =)
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Erlang GUIs

by David Mercer-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Speaking of which, what are the best ways of creating GUIs to interact with
Erlang?  Gs?  Run Yaws or Erlyweb or something and use the web browser?  I
heard Joe once mention using Flash as the UI front end?

What is the state of the art right now?

Thanks.

Cheers,

David

-----Original Message-----
From: erlang-questions-bounces@...
[mailto:erlang-questions-bounces@...] On Behalf Of Erik Reitsma
Sent: Thursday, March 13, 2008 03:06
To: Bengt Kleberg
Cc: Erlang mailing list
Subject: Re: [erlang-questions] erlang sucks

If you count libraries: after rewriting a GUI from iv to tcl I gave up
when tcl was removed. I guess gs has been around long enough to consider
it, but then again there are still GUI alternatives floating around, and
I am afraid they will become better than gs and gs will be replaced.

*Erik.

> Out of interest:
> Does anybody know of _anything_ that has been removed, ever?
>
>
> bengt
>
> On Wed, 2008-03-12 at 16:53 +0100, Mats Cronqvist wrote:
> > Hynek Vychodil wrote:
> > >
> > >
> > > On Wed, Mar 12, 2008 at 3:02 PM, Mats Cronqvist
> > > <mats.cronqvist@...
> <mailto:mats.cronqvist@...>> wrote:
> > >
> > >       or are you saying there is a need for several
> 'and'? in that case i
> > >     disagree.
> > >
> > > ...
> > > I think there is no way to change it, because if you
> remove 'andalso'
> > > and use 'and' in programmers manner lazy behaviour, you
> will break
> > > some legacy code a vice versa. This change is impossible.
> You can be
> > > not agree with it. You can argue against it, but it is
> all what you
> > > can do with it.
> >   if you go back a few posts, you'll see that i try to make it very
> > clear that nothing will be removed (at least not for the
> next few years).
> >  
> >   mats
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@...
> > http://www.erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@...
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: Erlang GUIs

by Bob Cowdery-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

David

I've tried three approaches, all of which work well depending on what
you want to do. There are of course other approaches.

wxErlang is an interface to the wxWidgets library and although it's
coverage is not 100% yet I've found it stable and good enough to write
reasonably complex GUI's. This is good if you want to stay entirely in
the Erlang world.

Java and Swing using the jInterface library. This also works very well
if you don't mind straying away from Erlang and don't mind some code
bloat in the interfacing.

Yaws and Erlyweb make a good pair but it depends on your interface
complexity and usability. You might actually end up with a good bit of
your ui code in java script using perhaps one of the Ajax libraries like
DoJo.

Just my pennyworth.

- Bob

On Fri, 2008-03-14 at 17:17 -0500, David Mercer wrote:

> Speaking of which, what are the best ways of creating GUIs to interact with
> Erlang?  Gs?  Run Yaws or Erlyweb or something and use the web browser?  I
> heard Joe once mention using Flash as the UI front end?
>
> What is the state of the art right now?
>
> Thanks.
>
> Cheers,
>
> David
>
> -----Original Message-----
> From: erlang-questions-bounces@...
> [mailto:erlang-questions-bounces@...] On Behalf Of Erik Reitsma
> Sent: Thursday, March 13, 2008 03:06
> To: Bengt Kleberg
> Cc: Erlang mailing list
> Subject: Re: [erlang-questions] erlang sucks
>
> If you count libraries: after rewriting a GUI from iv to tcl I gave up
> when tcl was removed. I guess gs has been around long enough to consider
> it, but then again there are still GUI alternatives floating around, and
> I am afraid they will become better than gs and gs will be replaced.
>
> *Erik.
>
> > Out of interest:
> > Does anybody know of _anything_ that has been removed, ever?
> >
> >
> > bengt
> >
> > On Wed, 2008-03-12 at 16:53 +0100, Mats Cronqvist wrote:
> > > Hynek Vychodil wrote:
> > > >
> > > >
> > > > On Wed, Mar 12, 2008 at 3:02 PM, Mats Cronqvist
> > > > <mats.cronqvist@...
> > <mailto:mats.cronqvist@...>> wrote:
> > > >
> > > >       or are you saying there is a need for several
> > 'and'? in that case i
> > > >     disagree.
> > > >
> > > > ...
> > > > I think there is no way to change it, because if you
> > remove 'andalso'
> > > > and use 'and' in programmers manner lazy behaviour, you
> > will break
> > > > some legacy code a vice versa. This change is impossible.
> > You can be
> > > > not agree with it. You can argue against it, but it is
> > all what you
> > > > can do with it.
> > >   if you go back a few posts, you'll see that i try to make it very
> > > clear that nothing will be removed (at least not for the
> > next few years).
> > >  
> > >   mats
> > > _______________________________________________
> > > erlang-questions mailing list
> > > erlang-questions@...
> > > http://www.erlang.org/mailman/listinfo/erlang-questions
> >
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@...
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> >
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@...
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@...
> http://www.erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: Erlang GUIs

by harveyd :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I would certainly put a vote in for yaws / a server based application
with a flash / javascript front end.

Both flash and javascript have widget libraries that are at least as
easy to use and powerful than their desktop counterparts.

If you are planning to have a heavily customised interface i would suggest
something like jquery / dojo / prototype.

If you are planning on using a more familiar widget set then extjs or
flex are probably better places to start looking.

if you need more os intergration than traditional flash / js can
do Adobe Air is another product to look at. (or the previously
mentioned swing / wxwidgets)

On 15/03/2008, Bob Cowdery <bob@...> wrote:
David

I've tried three approaches, all of which work well depending on what
you want to do. There are of course other approaches.

wxErlang is an interface to the wxWidgets library and although it's
coverage is not 100% yet I've found it stable and good enough to write
reasonably complex GUI's. This is good if you want to stay entirely in
the Erlang world.

Java and Swing using the jInterface library. This also works very well
if you don't mind straying away from Erlang and don't mind some code
bloat in the interfacing.

Yaws and Erlyweb make a good pair but it depends on your interface
complexity and usability. You might actually end up with a good bit of
your ui code in java script using perhaps one of the Ajax libraries like
DoJo.

Just my pennyworth.


- Bob


On Fri, 2008-03-14 at 17:17 -0500, David Mercer wrote:
> Speaking of which, what are the best ways of creating GUIs to interact with
> Erlang?  Gs?  Run Yaws or Erlyweb or something and use the web browser?  I
> heard Joe once mention using Flash as the UI front end?
>
> What is the state of the art right now?
>
> Thanks.
>
> Cheers,
>
> David
>
> -----Original Message-----
> From: erlang-questions-bounces@...
> [mailto:erlang-questions-bounces@...] On Behalf Of Erik Reitsma
> Sent: Thursday, March 13, 2008 03:06
> To: Bengt Kleberg
> Cc: Erlang mailing list
> Subject: Re: [erlang-questions] erlang sucks
>
> If you count libraries: after rewriting a GUI from iv to tcl I gave up
> when tcl was removed. I guess gs has been around long enough to consider
> it, but then again there are still GUI alternatives floating around, and
> I am afraid they will become better than gs and gs will be replaced.
>
> *Erik.
>
> > Out of interest:
> > Does anybody know of _anything_ that has been removed, ever?
> >
> >
> > bengt
> >
> > On Wed, 2008-03-12 at 16:53 +0100, Mats Cronqvist wrote:
> > > Hynek Vychodil wrote:
> > > >
> > > >
> > > > On Wed, Mar 12, 2008 at 3:02 PM, Mats Cronqvist
> > > > <mats.cronqvist@...
> > <mailto:mats.cronqvist@...>> wrote:
> > > >
> > > >       or are you saying there is a need for several
> > 'and'? in that case i
> > > >     disagree.
> > > >
> > > > ...
> > > > I think there is no way to change it, because if you
> > remove 'andalso'
> > > > and use 'and' in programmers manner lazy behaviour, you
> > will break
> > > > some legacy code a vice versa. This change is impossible.
> > You can be
> > > > not agree with it. You can argue against it, but it is
> > all what you
> > > > can do with it.
> > >   if you go back a few posts, you'll see that i try to make it very
> > > clear that nothing will be removed (at least not for the
> > next few years).
> > >
> > >   mats
> > > _______________________________________________
> > > erlang-questions mailing list
> > > erlang-questions@...
> > > http://www.erlang.org/mailman/listinfo/erlang-questions
> >
> > _______________________________________________
> > erlang-questions mailing list
> > erlang-questions@...
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> >
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@...
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@...
> http://www.erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions



--
* http://hypernumbers.com
* http://arandomurl.com/
* http://www.flickr.com/photos/daleharvey/
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: Erlang GUIs

by Mariano Guerra :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/3/15 Dale Harvey <harveyd@...>:

> I would certainly put a vote in for yaws / a server based application
> with a flash / javascript front end.
>
> Both flash and javascript have widget libraries that are at least as
> easy to use and powerful than their desktop counterparts.
>
> If you are planning to have a heavily customised interface i would suggest
> something like jquery / dojo / prototype.
>
> If you are planning on using a more familiar widget set then extjs or
> flex are probably better places to start looking.
>
> if you need more os intergration than traditional flash / js can
> do Adobe Air is another product to look at. (or the previously
> mentioned swing / wxwidgets)

Hi, im new here, I started learning erlang by reading the book of joe
armostrong.

I think a good approach will be to write some kind of wrapper or
utility library around XUL[1] to output a feature rich GUI over a web
server, then you have the best of both worlds.  A great and unified
GUI and all written on erlang (some javascript will be needed but
that's not a problem I guess).

Here are some nice examples (requires a gecko based browser);
* http://www.faser.net/mab/chrome/content/mab.xul
* http://xulplanet.com/testcases/example-viewer.xul
* firefox/seamonkey/thunderbird/songbird
* http://songbirdnest.com/

you can use XulRunner[2] or Prism[3] to run "desktop applications" or
just give the user an URL.

by using this as the GUI library you have a lot of advantages, you
have a desktop look and feel, transition to a web applications is
realy easy, you dont have bindings, the GUI is described on separated
files, platform independence etc.

Hope that helps :P

[1] http://www.xulplanet.com/
[2] http://developer.mozilla.org/es/docs/XULRunner
[3] http://wiki.mozilla.org/Prism
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: Erlang GUIs

by Roberto Saccon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mariano, XUL sounds interesting in theory, but there might be show-stoppers:

Is there any Erlang XPCOM interface ?

XUL is  XML, which requires tools for efficient editing, does such a
tool exist and does it fit into your workflow ?

regards
Roberto


On Sun, Mar 16, 2008 at 6:12 PM, Mariano Guerra
<luismarianoguerra@...> wrote:

> 2008/3/15 Dale Harvey <harveyd@...>:
>
> > I would certainly put a vote in for yaws / a server based application
>  > with a flash / javascript front end.
>  >
>  > Both flash and javascript have widget libraries that are at least as
>  > easy to use and powerful than their desktop counterparts.
>  >
>  > If you are planning to have a heavily customised interface i would suggest
>  > something like jquery / dojo / prototype.
>  >
>  > If you are planning on using a more familiar widget set then extjs or
>  > flex are probably better places to start looking.
>  >
>  > if you need more os intergration than traditional flash / js can
>  > do Adobe Air is another product to look at. (or the previously
>  > mentioned swing / wxwidgets)
>
>  Hi, im new here, I started learning erlang by reading the book of joe
>  armostrong.
>
>  I think a good approach will be to write some kind of wrapper or
>  utility library around XUL[1] to output a feature rich GUI over a web
>  server, then you have the best of both worlds.  A great and unified
>  GUI and all written on erlang (some javascript will be needed but
>  that's not a problem I guess).
>
>  Here are some nice examples (requires a gecko based browser);
>  * http://www.faser.net/mab/chrome/content/mab.xul
>  * http://xulplanet.com/testcases/example-viewer.xul
>  * firefox/seamonkey/thunderbird/songbird
>  * http://songbirdnest.com/
>
>  you can use XulRunner[2] or Prism[3] to run "desktop applications" or
>  just give the user an URL.
>
>  by using this as the GUI library you have a lot of advantages, you
>  have a desktop look and feel, transition to a web applications is
>  realy easy, you dont have bindings, the GUI is described on separated
>  files, platform independence etc.
>
>  Hope that helps :P
>
>  [1] http://www.xulplanet.com/
>  [2] http://developer.mozilla.org/es/docs/XULRunner
>  [3] http://wiki.mozilla.org/Prism
>
>
> _______________________________________________
>  erlang-questions mailing list
>  erlang-questions@...
>  http://www.erlang.org/mailman/listinfo/erlang-questions
>



--
Roberto Saccon
http://rsaccon.com
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: Erlang GUIs

by Mariano Guerra :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Mar 16, 2008 at 8:25 PM, Roberto Saccon <rsaccon@...> wrote:
> Mariano, XUL sounds interesting in theory, but there might be show-stoppers:
>
>  Is there any Erlang XPCOM interface ?
>
>  XUL is  XML, which requires tools for efficient editing, does such a
>  tool exist and does it fit into your workflow ?
>

 I was thinking on XUL as a replacement for the HTML over yaws
solution not as a replacement for wxWindows, if you use some kind of
template engine, and open Prism pointing to for example
http://127.0.0.1:1337 and using async calls to some kind of REST
service or erlang replacement of that (JSON could work nice here :)),
you have a web application running locally that looks like a destop
application, just replacing the URL you have a website :).

you will have some javascript there, but well, if you do the HTML
solution you will have it to, and using wxWindows means to have a
binding to another library that is not fully implemented and may have
problems with concurrent calls (I dont know if that will happen, but
for example GTK doesn't support threads very well)

also, with this solution you have the best of both worlds I guess.. a
web app with native look and feel.

I don't know if that answer your question.
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: erlang *****

by Richard O'Keefe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 15 Mar 2008, at 12:57 am, Andras Georgy Bekes wrote:
> Why don't we extend the notion of patterns to somehow describe the  
> union
> set operation?

Consider
        f(a\/b, a\/b, ..., a\/b) -> ...


If f has n arguments, this expresses 2**n matches.
At first sight, this is great.  Expressiveness is always nice.
But there is a question about how costly it is.
At second glance, what's the problem?  We match one argument,
then move on.  But now consider

        f({X,_}\/{_,X},
          {Y,X}\/{X,Y},
          ...
          {Z,W}\/{W,Z}
        )

I don't have a proof, but my gut feeling is that the combination
of compiling and executing clauses with "or" patterns has to be NP.
So this most definitely does "ruin efficiency".

You could hack around this by requiring that if a head variable is
bound in a disjunctive pattern it is not matched by any other head
pattern.  But there are limits to the artificial restrictions that
are tolerable.  If you want each pattern to commit as soon as it has
matched, then I believe you have to define the order in which the
patterns are matched, which is not something Erlang has hitherto needed.

I note that my abstract pattern proposal *already* gives you disjunctive
patterns, BUT in such a way that the disjunctions can't interact like  
this.

_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: erlang *****

by Matthew Dempsky-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 3/14/08, Andras Georgy Bekes <bekesa@...> wrote:
>  I think there is no '\/' operator in Erlang, so
>  Pattern1 \/ Pattern2 could mean Pattern1 UNION Pattern2

The "or" and "+" operators have no valid semantics in patterns.  I
think either of those would be much more aesthetically pleasing than
"\/" for this hypothetical pattern-union operator.  E.g.,

    case X of
        a or b -> f();
        c or d -> g()
    end.
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: Erlang GUIs

by Mickaël Rémond :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I think that regarding XUL, the best example of what can be achieve with Erlang is the OneTeam instant messaging client.
If you do it well you can make it run the same from a web browser without installing anything or as a standalone client.
XUL is quite hard because it is undocumented, but you can build really nice interface with it.

More information on: 



Le 16 mars 08 à 23:45, Mariano Guerra a écrit :
On Sun, Mar 16, 2008 at 8:25 PM, Roberto Saccon <rsaccon@...> wrote:
Mariano, XUL sounds interesting in theory, but there might be show-stoppers:

Is there any Erlang XPCOM interface ?

XUL is  XML, which requires tools for efficient editing, does such a
tool exist and does it fit into your workflow ?


I was thinking on XUL as a replacement for the HTML over yaws
solution not as a replacement for wxWindows, if you use some kind of
template engine, and open Prism pointing to for example
http://127.0.0.1:1337 and using async calls to some kind of REST
service or erlang replacement of that (JSON could work nice here :)),
you have a web application running locally that looks like a destop
application, just replacing the URL you have a website :).

you will have some javascript there, but well, if you do the HTML
solution you will have it to, and using wxWindows means to have a
binding to another library that is not fully implemented and may have
problems with concurrent calls (I dont know if that will happen, but
for example GTK doesn't support threads very well)

also, with this solution you have the best of both worlds I guess.. a
web app with native look and feel.

I don't know if that answer your question.
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

-- 
Mickaël Rémond




_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: Erlang GUIs

by Mickaël Rémond :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

Le 14 mars 08 à 23:17, David Mercer a écrit :
Speaking of which, what are the best ways of creating GUIs to interact with
Erlang?  Gs?  Run Yaws or Erlyweb or something and use the web browser?  I
heard Joe once mention using Flash as the UI front end?

Joe talked about Flash after I made him a quick demo on a Flash server in Erlang. With that you can do real push from the server to the client, as well as other very funny stuff.
More to come ...

-- 
Mickaël Rémond




_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: erlang sucks

by attila.rajmund.nohl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, 13 Mar 2008, Rick Pettit wrote:

> On Thu, Mar 13, 2008 at 11:41:10AM +0000, Alp?r J?ttner wrote:
>>> Maybe it is due to the fact that most of them know C/C++/Java/Python.
>>> Maybe Erlang syntax is not so intuitive and easy as one could expect
>>> from a modern and powerful languages.
>>> Maybe because the standard library is not so rich and not so
>>> consistent as expected from a mature language.
>>
>> I cannot agree with it. I grew up in the C/C++ world and also had known
>> Python before I met Erlang, still I find it very intuitive. I'm also
>> _very_ impressed by the simplicity and the expressive power. (I'm not a
>> student though...)
>>
>> I think, the major obstacle for newcomers is not the syntax, but the
>> immutable data structures, the impossibility of variable rebinding, and
>
> These "features" make it much easier to write buggy code (and much harder to
> find such buggy code). The developers you speak of need to take off their
> blinders if they ever hope to see the light.

I don't think that immutable variables make it easier to write less
buggier code. On the contrary, I often see code like this:

HR1=f(HugeRecord),
...
g(HR1).

Then someone adds a line to modify the HugeRecord and forgets to update
the call to 'g':

HR1=f(HugeRecord),
HR2=f2(HR1),
...
g(HR1).

Now we have a stupid bug.

  Bye,NAR
--
"Beware of bugs in the above code; I have only proved it correct, not
   tried it."
_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions

Re: erlang sucks

by Richard Carlsson-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

attila.rajmund.nohl@... wrote:

> On the contrary, I often see code like this:
>
> HR1=f(HugeRecord),
> ...
> g(HR1).
>
> Then someone adds a line to modify the HugeRecord and forgets to update
> the call to 'g':
>
> HR1=f(HugeRecord),
> HR2=f2(HR1),
> ...
> g(HR1).
>
> Now we have a stupid bug.

Only if you don't compile with warn_unused_vars. This tends to catch
practically all errors of that category.

     /Richard


_______________________________________________
erlang-questions mailing list
erlang-questions@...
http://www.erlang.org/mailman/listinfo/erlang-questions
< Prev | 1 - 2 - 3 - 4 - 5 - 6 - 7 | Next >