Google Group
Working on exercises? Exchange questions, suggestions and solutions with other readers from the Erlang Programming Google Group
| Subscribe to Erlang Programming |
Title: Re: ch 19, eunit: Why use ?cmd("rm filename") instead of file:delete("filename")
Date/Time: Tue, 08 Jun 2010 13:57:35 UT
Description:
I figured out what that I was writing my test cases improperly and
that the ?cmd("rm...") fails every time.
Title: ch 19, eunit: Why use ?cmd("rm filename") instead of file:delete("filename")
Date/Time: Mon, 07 Jun 2010 22:19:39 UT
Description:
In chapter 19 the eunit tests use the ?cmd() macro instead of
file:delete/1. Why is this? I was getting a test exception using
this syntax(enoent) that went away when I switched to delete.
Some weirdness here: ?cmd is described as being OS dependent - I run
on Win7 so I tried using the "del" command to no avail, but now I
Title: Exercise 8-1 - trouble getting patched db to load in werl
Date/Time: Wed, 26 May 2010 17:07:27 UT
Description:
Is there some command or setting I need to change in the console to
get it to recognize/load the revised db.beam file?
I added the patches directory to the path as described (the only
difference being that I added it as a relative path "./patches", but
that is also how the "ebin" directory is in the path), and then I run
Title: Re: [Erlang Programming Book] Re: Using map/2 with a named function
Date/Time: Mon, 10 May 2010 16:41:39 UT
Description:
In the older releases of Erlang, {Module, Function} was also treated as
a fun. While depriciated, it still works for backward compatibility reasons:
1> Fun = {io, format}, Fun("Hello~n").
Hello
ok
2>
Francesco
------------------------------ ---------------------
------------------------------ ---------------------
Title: [Erlang Programming Book] Re: Using map/2 with a named function
Date/Time: Mon, 10 May 2010 16:31:56 UT
Description:
Ah yes. That must be the point. Thanks.
Ivan
--
Erlang Programming Website:
[link]
Title: Re: [Erlang Programming Book] Using map/2 with a named function
Date/Time: Mon, 10 May 2010 16:24:53 UT
Description:
2010/5/10 Ivan Uemlianin <i...@llaisdy.com>
It is true. How would you differenciate the function 'double' from the atom
'double'?
It's annoying... I know. I asked in #erlang in freenode irc channel.
--
Ale.
--
Erlang Programming Website:
[link]
Title: [Erlang Programming Book] Using map/2 with a named function
Date/Time: Mon, 10 May 2010 16:13:33 UT
Description:
Dear All
Using map wasn't as straightforward as I thought it would be. Running
this script:
-module(maptest).
-export([test/0]).
-export([double/1]).
double(N) ->
2 * N.
test() ->
List = [1,2,3,4,5],
lists:map(double, List).
Raises the error:
12> c(maptest).
{ok,maptest}
Title: [Erlang Programming Book] Exercise 15-2: A Simple HTTP Proxy
Date/Time: Wed, 05 May 2010 00:28:52 UT
Description:
Hello,
I tried following code(sorry for long code), and got many errors.
For example,
1) when I tried to show the page that has a lot of pictures, not all
pictures are shown.
2) sometimes connect methods is being sent, and I don't know how to
deal with it.
I would appreciate any suggestion.
Title: [Erlang Programming Book] if vs pattern matching and case
Date/Time: Fri, 23 Apr 2010 12:25:06 UT
Description:
Dear All
Apologies if everyone here subscribes to erlang-questions but there's
been an interesting discussion there on using pattern matching in the
function parameters, or case, instead of if:
The If expression
[link]
Title: [Erlang Programming Book] Re: Exercise 3-5 reversing
Date/Time: Thu, 22 Apr 2010 19:31:03 UT
Description:
I did it your way of course and eventually found out my first solution
did not work because erlang doesnot usually flatten the list
automatically.
--
Erlang Programming Website:
[link]
