From gunilla@REDACTED Fri Sep 1 16:07:39 2006 From: gunilla@REDACTED (Gunilla Arendt) Date: Fri, 01 Sep 2006 16:07:39 +0200 Subject: Small typo in erlc help text: erlc -? In-Reply-To: <20060711161506.D48335A1E5@mail.erlangsystems.com> References: <20060711161506.D48335A1E5@mail.erlangsystems.com> Message-ID: <44F83EAB.6010300@erix.ericsson.se> Hi, Thanks for pointing this out. / Gunilla, Erlang/OTP team Trap Exit wrote: > Just a small note on the help text for erlc in R11B-0: > > Where I think: > -pa path add path to then of Erlang's code path > Should be: > -pz path add path to the end of Erlang's code path > > Did not find any hits on google so I posted tho this mailinglist. > From mbj@REDACTED Mon Sep 4 12:46:18 2006 From: mbj@REDACTED (Martin Bjorklund) Date: Mon, 04 Sep 2006 12:46:18 +0200 (CEST) Subject: [erlang-bugs] filelib bug Message-ID: <20060904.124618.29792694.mbj@tail-f.com> There's a bug in filelib:wildcard/2, as illustrated by this example: Eshell V5.5.1 (abort with ^G) 1> filelib:wildcard("foo*", "/tmp"). ["foo.1","foo.2","foo.3","fooa","foobaz.log","foobaz.sh"] this is correct. but then i try: 2> filelib:wildcard("foo*", "//tmp"). ["oo.1","oo.2","oo.3","ooa","oobaz.log","oobaz.sh"] 3> filelib:wildcard("foo*", "/tmp/"). ["oo.1","oo.2","oo.3","ooa","oobaz.log","oobaz.sh"] which obviously is wrong. a simple fix is to do a filename:join() on the Cwd in filelib. /martin From mbj@REDACTED Mon Sep 4 13:08:25 2006 From: mbj@REDACTED (Martin Bjorklund) Date: Mon, 04 Sep 2006 13:08:25 +0200 (CEST) Subject: [erlang-bugs] dialyzer bug Message-ID: <20060904.130825.51837088.mbj@tail-f.com> When I check this module with dialyzer: -module(a). -export([a/0]). a() -> F = fun(F, WaitTime) -> receive after WaitTime -> ok end, F(F, 3000) end, F(F, 1000). I get: {a,'-a/0-fun-0-',2}: Trying to use fun with type ((((none(),none()) -> none()),1000 | 3000) -> none()) with arguments (((((none(),none()) -> none()),1000 | 3000) -> none()),3000)! /martin From Tobias.Lindahl@REDACTED Tue Sep 5 09:38:09 2006 From: Tobias.Lindahl@REDACTED (Tobias Lindahl) Date: Tue, 05 Sep 2006 09:38:09 +0200 Subject: [erlang-bugs] dialyzer bug In-Reply-To: <20060904.130825.51837088.mbj@tail-f.com> References: <20060904.130825.51837088.mbj@tail-f.com> Message-ID: <44FD2961.2010102@it.uu.se> I've got this kind of bug reported before, but unfortunately it is not an easy one to fix. I have fixed in my development version and it will make an otp patch release somewhere in the reasonably near future. In the mean time, might I suggest that you make the self-recursive function a named function that can make a ordinary tail call to itself. It might be interesting to name this function to tell the world what it is up to. If nothing else you will make Dialyzer give you the slightly more interesting report that the function never returns. Tobias Martin Bjorklund wrote: > When I check this module with dialyzer: > > -module(a). > -export([a/0]). > > a() -> > F = fun(F, WaitTime) -> > receive after WaitTime -> ok end, > F(F, 3000) > end, > F(F, 1000). > > I get: > > {a,'-a/0-fun-0-',2}: Trying to use fun with type ((((none(),none()) -> none()),1000 | 3000) -> none()) with arguments (((((none(),none()) -> none()),1000 | 3000) -> none()),3000)! > > > /martin > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://www.erlang.org/mailman/listinfo/erlang-bugs From mickael.remond@REDACTED Tue Sep 12 11:08:22 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Tue, 12 Sep 2006 11:08:22 +0200 Subject: [erlang-bugs] order of the parameters for erl on Windows Message-ID: <20060912090822.GA31659@memphis> Hello, it seems to me that the order of the command-line parameter (erl and werl) on Microsoft Windows is important. When having a complex command-line, if I put the -sname parameter first, the erl emulator ignore it and do not start in networked mode. Example: erl.exe sname default@REDACTED -detached -env ERL_MAX_PORT=32000 -env EJABBERD_MSGS_PATH "../lib/ejabberd-1.1.1/priv/msgs/" -env EJABBERD_CONFIG_PATH "../conf/ejabberd.cfg" -env EJABBERD_SO_PATH "../lib/ejabberd-1.1.1/priv/lib/windows/" -env EJABBERD_LOG_PATH "../logs/ejabberd.log" -kernel inetrc '"../conf/inetrc.win"' -mnesia dir '"../database/default"' -sasl sasl_error_logger {file,"../logs/sasl.log"} -setcookie test -s ejabberd If I put this option at the end of the line, this is working as expected: erl.exe -detached -env ERL_MAX_PORT=32000 -env EJABBERD_MSGS_PATH "../lib/ejabberd-1.1.1/priv/msgs/" -env EJABBERD_CONFIG_PATH "../conf/ejabberd.cfg" -env EJABBERD_SO_PATH "../lib/ejabberd-1.1.1/priv/lib/windows/" -env EJABBERD_LOG_PATH "../logs/ejabberd.log" -kernel inetrc '"../conf/inetrc.win"' -mnesia dir '"../database/default"' -sasl sasl_error_logger {file,"../logs/sasl.log"} -sname default@REDACTED -setcookie test -s ejabberd I have not seen this behaviour on Linux. Is it a known behaviour on Windows ? Thank you ! -- Micka?l R?mond http://www.process-one.net/ From sgolovan@REDACTED Tue Sep 12 12:47:25 2006 From: sgolovan@REDACTED (Sergei Golovan) Date: Tue, 12 Sep 2006 14:47:25 +0400 Subject: [erlang-bugs] order of the parameters for erl on Windows In-Reply-To: <20060912090822.GA31659@memphis> References: <20060912090822.GA31659@memphis> Message-ID: On 9/12/06, Mickael Remond wrote: > Hello, > > it seems to me that the order of the command-line parameter (erl and > werl) on Microsoft Windows is important. > When having a complex command-line, if I put the -sname parameter first, > the erl emulator ignore it and do not start in networked mode. > > Example: > erl.exe sname default@REDACTED -detached -env ERL_MAX_PORT=32000 -env EJABBERD_MSGS_PATH I see typo on the first line. sname instead of -sname. Could it be that erlang doesn't start in distributed mode because of this typo? > "../lib/ejabberd-1.1.1/priv/msgs/" -env EJABBERD_CONFIG_PATH > "../conf/ejabberd.cfg" -env EJABBERD_SO_PATH > "../lib/ejabberd-1.1.1/priv/lib/windows/" -env EJABBERD_LOG_PATH > "../logs/ejabberd.log" -kernel inetrc '"../conf/inetrc.win"' -mnesia dir > '"../database/default"' -sasl sasl_error_logger > {file,"../logs/sasl.log"} -setcookie test > -s ejabberd -- Sergei Golovan From mickael.remond@REDACTED Tue Sep 12 13:49:39 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Tue, 12 Sep 2006 13:49:39 +0200 Subject: [erlang-bugs] order of the parameters for erl on Windows In-Reply-To: References: <20060912090822.GA31659@memphis> Message-ID: <20060912114939.GB815@memphis> Hello Sergei, * Sergei Golovan [2006-09-12 14:47:25 +0400]: > I see typo on the first line. sname instead of -sname. Could it be > that erlang doesn't start in distributed mode because of this typo? Ah yes. I have introduced the typo when composing the mail. So this is not the source of the problem. Have you seen this behaviour yourself already ? -- Micka?l R?mond http://www.process-one.net/ From ulf.wiger@REDACTED Wed Sep 13 14:31:11 2006 From: ulf.wiger@REDACTED (Ulf Wiger (TN/EAB)) Date: Wed, 13 Sep 2006 14:31:11 +0200 Subject: [erlang-bugs] localtime_to_universaltime(DistantFuture) Message-ID: 1> erlang:localtime_to_universaltime({{2038,1,19},{3,14,7}},true). {{2038,1,19},{1,14,7}} 2> erlang:localtime_to_universaltime({{2038,1,19},{3,14,8}},true). {{1969,12,31},{23,59,59}} 3> erlang:localtime_to_universaltime({{2060,1,1},{12,0,0}},true). {{1969,12,31},{23,59,59}} 4> os:getenv("TZ"). "MET" It would seem as if the future for Erlang ends at 3:14:7 MET, Jan 19 2038. BR, Ulf W (Courtesy Johan Tj?der who's been having fun with QuickCheck) From luna@REDACTED Thu Sep 14 09:47:10 2006 From: luna@REDACTED (Daniel Luna) Date: Thu, 14 Sep 2006 09:47:10 +0200 (CEST) Subject: [erlang-bugs] Port is not closed correctly Message-ID: otp_src_R11B-1/lib/crypto> grep "self[^(]" */*rl src/crypto_server.erl: Port ! {self, close}, Should probably be "self()". /Luna -- Daniel Luna | Top reasons that I have a beard: luna@REDACTED | a) Laziness. http://www.update.uu.se/~luna/ | b) I can. Don't look at my homepage (it stinks).| c) I can get away with it. From luna@REDACTED Thu Sep 14 10:09:08 2006 From: luna@REDACTED (Daniel Luna) Date: Thu, 14 Sep 2006 10:09:08 +0200 (CEST) Subject: [erlang-bugs] Strange compiler crash with defines Message-ID: I found this error a couple of years ago, but forgot to send it in. > cat error.erl -undef(ASSERT). -define(ASSERT, ?MODULE). ?ASSERT(). > erlc error.erl =ERROR REPORT==== 14-Sep-2006::09:49:13 === Error in process <0.21.0> with exit value: {{case_clause,{'EXIT',{function_clause,[{epp,check_uses,[undefined,[{atom,'MODULE'},{atom,'ASSERT'}],{dict,7,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[[{atom,'MACHINE'}],[{atom,'MODULE'}|undefined],[{atom,'LINE'}],[{atom,'FILE'}]],[],[],[],[],[[{... ./error.erl:none: internal error in parse_module; [snip] /Luna -- Daniel Luna | Top reasons that I have a beard: luna@REDACTED | a) Laziness. http://www.update.uu.se/~luna/ | b) I can. Don't look at my homepage (it stinks).| c) I can get away with it. From ugglan@REDACTED Sun Sep 17 00:50:07 2006 From: ugglan@REDACTED (=?ISO-8859-1?Q?Tobias_L=F6fgren?=) Date: Sun, 17 Sep 2006 00:50:07 +0200 Subject: [erlang-bugs] Possible bug in inets http:request? Message-ID: <5c402a550609161550l109e70cmc162757dd6c7a068@mail.gmail.com> (Posted this to erlang-questions first by mistake, sorry for crossposting.) I'm using inets http:request to construct REST calls to a web service and noticed some odd behaviour which boiled down to this: When the response contains nothing, ie. complete headers, but a zero-length body, the function hangs for some time. To try it out: http:request("http://combubo.com/test.txt"). The call returns after ~ 15 seconds. Other servers take minutes to break the connection. I located this in httpc_response.erl: whole_body(Body, Length) -> case size(Body) of N when N < Length, N > 0-> {?MODULE, whole_body, [Body, Length]}; N when N >= Length, Length > 0 -> %% Potential trailing garbage will be thrown away in %% format_response/1 Some servers may send a 100-continue %% response without the client requesting it through an %% expect header in this case the trailing bytes may be %% part of the real response message. {ok, Body}; _ -> {?MODULE, whole_body, [Body, Length]} end. and it seems this code doesn't handle the case of Length == 0, so I simply changed it to: case size(Body) of N when N < Length, N >= 0-> {?MODULE, whole_body, [Body, Length]}; N when N >= Length, Length >= 0 -> which seems to work fine for me, empty body responses now return right away. Anyone know if I might have broken anything else by this patch, am I completely barking up the wrong tree? /Tobias -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjinux@REDACTED Sun Sep 17 20:20:48 2006 From: jjinux@REDACTED (Shannon -jj Behrens) Date: Sun, 17 Sep 2006 11:20:48 -0700 Subject: [erlang-bugs] tutorial bug Message-ID: I've found a simple bug in the tutorial: http://www.erlang.org/doc/doc-5.5.1/doc/getting_started/conc_prog.html It says: which is received by the client which in turn does exit(normal) and terminates. If keysearch returns {value,From,Name} we know that the user is logged on and is his name (peter) is in variable Name. We now call: I think"{value,From,Name}" should be "{value {From, Name}}". Happy Hacking! -jj From toby@REDACTED Sun Sep 17 21:24:30 2006 From: toby@REDACTED (Toby Thain) Date: Sun, 17 Sep 2006 15:24:30 -0400 Subject: [erlang-bugs] building otp_src_R10B-10 on Solaris 10 - doesn't find openssl Message-ID: <875A2D8D-0E72-4471-BCE0-5A984BA3AD25@smartgames.ca> ./configure does not detect the bundled openssl in /usr/sfw/bin/openssl checking for OpenSSL >= 0.9.7 in standard locations... no configure: warning: No (usable) OpenSSL found, skipping ssl, ssh and crypto applications ... ********************************************************************* ********************** APPLICATIONS DISABLED ********************** ********************************************************************* crypto : No usable OpenSSL found ssh : No usable OpenSSL found ssl : No usable OpenSSL found $ which openssl /usr/sfw/bin/openssl Works in otp_src_R11B-1. This wouldn't be such a problem if there was a way to specify the location. --T From toby@REDACTED Sun Sep 17 22:26:02 2006 From: toby@REDACTED (Toby Thain) Date: Sun, 17 Sep 2006 16:26:02 -0400 Subject: [erlang-bugs] building otp_src_R10B-10 on Solaris 10 - doesn't find openssl (correction) Message-ID: Correction: ./configure --with-ssl=/usr/sfw does seem to work. This workaround is hinted at (without details) in the README, but is unfortunately not described in ./configure --help. --T