[erlang-questions] Two beautiful programs - or web programming made easy

Joe Armstrong erlang@REDACTED
Sat Feb 12 13:23:58 CET 2011

On Sat, Feb 12, 2011 at 1:15 PM, Ulf Wiger

> Well, I read those links not as an indictment of websockets per se, but of
> the UPGRADE-based handshake. I think Joe is definitely on to something here,
> and this sort of setup fits Erlang beautifully.
> Essentially, Joe may have found a way to dust off his ex11 idea[1], in a
> context where it is much more likely to succeed. ;-)
> (But please, Joe, leave out the !! this time - one revolution at a time.)

!! would be evil in this context. As soon as you get outside erlang !! is
! is good because it creates no dependencies, the message either gets there
it does not. Code that can deal with this uncertainty will be good, other
code is

It's actually pretty awe-inspiring to say

Pid ! button("click me") and see a button just appear in the browser

Great fun.

The great thing is that we can now abstract the interface

button("text") means return a thing that when evaluated makes a button
this code return Javascript, but it could equally well return xul, or html,
or llvm assembler
it doesn't matter - as long as the eval end knows how to eval it. So the top
code can be written entirely without knowledge of what's going on under the



> BR,
> Ulf W
> [1]  http://ftp.sunet.se/pub/lang/erlang/workshop/2004/ex11.pdf
> On 12 Feb 2011, at 12:46, Masklinn wrote:
> > On 2011-02-12, at 12:33 , Joe Armstrong wrote:
> >>
> >> You'll need something like Google chrome to run them.
> > Warning: the status of the (currently broken [0]) WebSockets is unsure:
> Firefox and Opera already dropped it, it is unknown whether Chrome and
> Safari will keep it enabled by default. Chrome-wise, they've kept it for now
> but they plan on disabling it as soon as they hear of an exploit in the
> wild[1]
> >
> > Also, it's going to be a complete and utter pain to debug: even the more
> modern JS debuggers of Firefox (via Firebug) and Webkit have insane amounts
> of trouble finding and debugging dynamically evaluated code.
> >
> > [0] http://www.ietf.org/mail-archive/web/hybi/current/msg04744.html
> > [1] http://codereview.chromium.org/5643005/
> > ________________________________________________________________
> > erlang-questions (at) erlang.org mailing list.
> > See http://www.erlang.org/faq.html
> > To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
> >
> Ulf Wiger, CTO, Erlang Solutions, Ltd.
> http://erlang-solutions.com

More information about the erlang-questions mailing list