<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Op 19-8-2015 om 1:39 schreef Steve
Davis:<br>
</div>
<blockquote
cite="mid:2A5408F7-968F-4A0A-AEA5-0BD6BEF33F9F@gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">Hi Roelof,</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">Here you go:</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">1> [[{sorted, lists:sort(X)}, {count,
length(X)}] || X <- [inet:module_info(exports)]].</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">...</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">
<div style="margin: 0px;" class="">2> [get_rc/0].
</div>
<div style="margin: 0px;" class="">** exception error: an error
occurred when evaluating an arithmetic expression</div>
<div style="margin: 0px;" class=""> in operator '/'/2</div>
<div style="margin: 0px;" class=""> called as get_rc / 0</div>
</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">What the book/lesson is trying to teach is
probably not how to do basic operations on lists (which is
notionally the point of the exercise). It’s actually trying to
get you to reach for the right tool to do the job by getting you
to explore the platform libraries and the power of the platform
for yourself.</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">Yes, I cheated above and used a comprehension
above to present the answers you want, and also showed what
happens when you get what you originally asked for. Likely you
didn’t learn much from that, since what I typed in was born of
spending time with the libraries and knowing what to do with a
problem I’m presented with and understanding what erlang tells
you when you get it “wrong".</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">You need to be patient and find your own
solutions to things, since if you are merely taking others’
solutions, you will never become a “power user”. It’s a hard
slog, I don’t deny that.</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">However, the REPL, particularly in your early
learning lets you try things out instantly, and is invaluable
help in breaking down a problem. You can try individual steps
extremely easily - and in a way that is simply not possible with
non-functional languages.</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">If it’s any help or encouragement, it took me
months to “grok” erlang and its unfamiliar ways, but once I had,
I realized what I was missing. Each day, even after a few years,
I learn something new and positive about the platform. It’s also
been an empowerment in my relationship to computers; I can
express concepts that would be essentially intractable in many
popular languages.</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">I wish you well in your journey (one that I have
personally experienced) and offer the thought that it’s likely
more rewarding, and more empowering in the long term, to sit
with a problem, read the documentation that comes with Erlang
(which is extremely good despite its many critics) and *find
your own solution* than to look outside for help too quickly. </div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">Sure if you get totally stuck, there’s help
here.</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">I can promise you that the long path and all the
hard work to becoming an “erlang ninja” will be worth every
second.</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class=""><br class="">
</div>
<div style="margin: 0px; font-size: 11px; font-family: 'Courier
New';" class="">/s</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
</blockquote>
<br>
Thanks, <br>
<br>
<br>
Im experimenting al lot with this exercise. I think im now working
~4 days on it.<br>
I will experiment on the way you and Rick Petit has suggested. <br>
<br>
Its a long and difficult way to learn Erlang but it's also a fun
way.<br>
<br>
Roelof<br>
<br>
<br /><br />
<hr style='border:none; color:#909090; background-color:#B0B0B0; height: 1px; width: 99%;' />
<table style='border-collapse:collapse;border:none;'>
<tr>
<td style='border:none;padding:0px 15px 0px 8px'>
<a href="https://www.avast.com/antivirus">
<img border=0 src="http://static.avast.com/emails/avast-mail-stamp.png" alt="Avast logo" />
</a>
</td>
<td>
<p style='color:#3d4d5a; font-family:"Calibri","Verdana","Arial","Helvetica"; font-size:12pt;'>
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
<br><a href="https://www.avast.com/antivirus">www.avast.com</a>
</p>
</td>
</tr>
</table>
<br />
</body>
</html>