[erlang-questions] Beginners tutorials

Fri Jun 13 18:20:56 CEST 2014



-----Original Message-----
From: "Gordon Guthrie" <gordon@REDACTED>
Sent: Friday, June 13, 2014 11:58am
To: "Mark Allen" <mallen@REDACTED>
Cc: "Erlang" <erlang-questions@REDACTED>
Subject: Re: [erlang-questions] Beginners tutorials

I have taken a bit more radical approach.

People traditionally comparing Erlang to other languages - and Erlang
loses because of its weak spot - it has a prolog syntax in a world
dominated by c-like syntaxes.

I decided to compare Erlang/OTP with other ways of building
multi-machine clusters.

Here's my hell world attempt:

Thoughts comments, welcome


On 12/06/2014, Mark Allen <mallen@REDACTED> wrote:
> I started http://introducingerlang.com right after EF2014 in San Francisco.
> It's intended to be a really short and simple introduction to Erlang for
> people who know how to program in other languages but don't know Erlang. I
> have a mostly documented OTP application (uses Gordon Guthrie's "literate
> Erlang" markup) with a supervisor, gen_server and application modules here:
> https://github.com/introducingerlang/todolist/tree/master/src_md
> I would welcome any help finishing the documentation of the modules in that
> repo or extending/correcting/fixing the web content that's already there. I
> can add you directly to the github organization.
> Thanks,
> Mark
> From: Joe Armstrong <erlang@REDACTED<mailto:erlang@REDACTED>>
> Date: Thursday, June 12, 2014 9:54 AM
> To: Erlang
> <erlang-questions@REDACTED<mailto:erlang-questions@REDACTED>>
> Subject: [erlang-questions] Beginners tutorials
> Re: Garrett's great talk at EUC2014
> The point has been made many times before that
> "There are no easy Erlang getting started guides"
> So I thought I'd take a look at Node.js.
> The node js home page (node.js) starts with a simple example
> <quote>
> var http = require('http');
> http.createServer(function (req, res) {
>   res.writeHead(200, {'Content-Type': 'text/plain'});
>   res.end('Hello World\n');
> }).listen(1337, '');
> console.log('Server running at');
> To run the server, put the code into a file example.js and execute it with
> the node program from the command line:
> % node example.js
> Server running at
> </endquote>
> It's pretty easy to knock up an almost identical example in Erlang - using
> any of the well-known web
> servers in the background, unfortunately this has not been done, or if it
> has been done
> it's not easy to find the examples (or if there are examples I can't find
> them)
> I was vaguely thinking of making some examples that are more-or-less
> isomorphic to the
> node.js examples and then applying small transformation steps to turn then
> from idiomatic node.js code to idiomatic Erlang code.
> Although I could find a simple hello world example in node.js I could not
> find a tutorial that
> started with a simple example and then built on it in very small steps
> adding routing, authentication,
> database access and so on.
> Does anybody know of some examples of node.js that could be used for this.
> Cheers
> /Joe

Gordon Guthrie
CEO hypernumbers

t: hypernumbers
+44 7776 251669
erlang-questions mailing list

More information about the erlang-questions mailing list