
Learn You Some Erlang: Three new chapters available - bandris
http://learnyousomeerlang.com/modules
======
thejay
Great for those of us who are still learning erlang.

On this token does anyone have any tutorial that actually goes through
building a complete erlang program and not snippets of code here and there?

~~~
mr_dbr
[http://www.stifflog.com/2007/05/09/erlang-for-the-
practical-...](http://www.stifflog.com/2007/05/09/erlang-for-the-practical-
man/)

Not the best tutorial ever, but I found it helpful.. It describes a fairly
simple, but non-trivial task (creating an RSS feed from your email inbox,
generating the RSS feed, and directly interacting with the POP3 protocol over
SSL)

Also, most of the code will require slight modification to work with the most
recent version of Erlang. This seems like a bad thing, but it forces you to
actually understand the code and determine what broke, rather than just copy-
and-pasting everything.. For example, the regexp module had changed name, so I
prodded around the erlang library code to see where it went, and if the
arguments had changed - in doing so I realised how simple (most of) the code
was, something I wouldn't have done if the tutorial was "better"..

~~~
thejay
Great link, thanks! Not the biggest complete-app example but certainly shows
me how things could/should stick together.

------
mononcqc
Hey, I hope you guys enjoy these chapters as much as you enjoyed the first
ones (the reviews were pretty good!)

I'm still accepting criticism and fixes if you see any mistake or whatever.
Have a nice read :)

~~~
gtani
You did a really nice job. The language needed a gentle intro.

Cesarini/Thompson book is excellent, aside from typo's but it's like drinking
from a firehose. Good for people who like ruby, python, scheme DSL /
metaprogramming tricks, challenging for everybody else.

One thing, can you give more vertical space between lines in source code
listings (the bits in Courier font; also listing of shell/interpreter
sessions). They're jammed tightly together in Firefox 3.0.14, winXP SP 3.

------
systems
The syntax is bit radical, I spent like 10 minutes online before getting why

    
    
        1> 1+1
    

returns nothing, its because its missing a . (i.e. a dot) it should be

    
    
        1> 1+1 .
        2
    

which returns 2 as expected

~~~
mononcqc
If you go back to <http://learnyousomeerlang.com/starting-out-for-real> :

In the Erlang shell, expressions have to be terminated with a period followed
by whitespace (line break, a space etc.)

Maybe I should try to make it even more apparent (or add a picture). I can
remember being stumped by the same thing when I first got to try the shell.

~~~
gtani
one of the trickiest things i found about basic erlang syntax was difference
between "," and "and" and "andalso" as guard clause separators.

~~~
mononcqc
You'll be glad to know I explain the differences in the Syntax in function
chapter of the book. [http://learnyousomeerlang.com/syntax-in-
functions#guards-gua...](http://learnyousomeerlang.com/syntax-in-
functions#guards-guards)

Scroll down to the 'note' to see it. I don't explain 'and' vs 'andalso'
though, but they are mentioned in an earlier chapter: 'and' will evaluate both
its arguments, but 'andalso' will only do so when needed.

I still don't understand why Erlang doesn't allow the nesting of "," and ";"
(which would make 'andalso' and 'orelse' useless in guards). There seems to be
no plan to change that, even if big names [in the community] like Richard
O'Keefe would like the same thing.

~~~
gtani
reading this thread a few times helped

[http://www.nabble.com/Reading%2C-Learning%2C-Confused-
to1854...](http://www.nabble.com/Reading%2C-Learning%2C-Confused-
to18544670.html#a18544670)

~~~
mononcqc
Yeah, it's where I got the difference too. I decided to add it to LYSE after
that.

~~~
gtani
one other thing i noted:

(Modules page just above "More about modules") you talk about compiling to
Hipe, but it doesn't say that you ahve to ./configure it in. This seems to be
a common configure:

./configure --enable-hipe --enable-smp-support --enable-threads

