From francesco@REDACTED Mon Nov 1 09:04:10 2004 From: francesco@REDACTED (Francesco Cesarini (Erlang Consulting)) Date: Mon, 01 Nov 2004 08:04:10 +0000 Subject: Who is a Programmer? In-Reply-To: <5.1.0.14.1.20041029092406.00bd3160@online.no> References: <200410290153.i9T1rlfK030202@atlas.otago.ac.nz> <5.1.0.14.1.20041029092406.00bd3160@online.no> Message-ID: <4185EDFA.1080609@erlang-consulting.com> Funny enough, early next year, we will have a student who will write a thesis on presenting Erlang/OTP to management and non technical staff. It will be an interesting mix of Psychology, pretty graphics and colorful ppt slides and a little technology. I will keep you posted on the outcome. Francesco -- http://www.erlang-consulting.com Michael Fogeborg wrote: > Trying to promote Erlang where I work I find this comment very interesting. > > Maybe its the managers I should give a one day course in "modelling" > with Erlang? > I can't call it programming 'cause that's something they don't do... but > modelling is > done by them all the time. How many of you have "sold" Erlang before ? > Need input! > > > References: > > http://www.erlang.org/ml-archive/erlang-questions/200010/msg00075.html > > http://www.erlang.org/ml-archive/erlang-questions/200010/msg00078.html > > > On Thu, 12 Oct 2000, Ulf Wiger wrote: > > >On Thu, 12 Oct 2000, Sean Hinde wrote: > > > >>I see Erlang/OTP as a step towards having the Excel of my trade - > >>allowing me to implement telecoms logic and databases in a safe and > >>simple way as an "end user". > > > >This is in line with Mike W's idea of Erlang as "an executable > >modelling language". > > > >Funny - one of the camps resisting Erlang has been those trying to > >move development more towards high-level graphical modelling tools > >like Rational Rose, possibly thinking that this is the way out of the > >Software Crisis. To them (I imagine) Erlang represents a hacker > >culture; to you (and me), Erlang is a way for us system architects > >to become the programming gurus we never thought we'd be. (: > > > From bjorn@REDACTED Mon Nov 1 09:39:44 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 01 Nov 2004 09:39:44 +0100 Subject: Matching elements of records In-Reply-To: <200410290153.i9T1rlfK030202@atlas.otago.ac.nz> References: <200410290153.i9T1rlfK030202@atlas.otago.ac.nz> Message-ID: IMHO, it is still a matter of taste. (For the record, I prefer the variable to the right.) "Richard A. O'Keefe" writes: [...] > > (A) Consistency with other functional programming languages, ... > ML, Haskell The best of the arguments. > > (B) The linguistic argument. In fact this has two versions. One is > "heavy constituent comes later". The other is "most salient > constituent comes first". To me, when you have an as-pattern, > the most salient part is the name. That's the "topic"; the > restrictive pattern is the "comment". In a head, I see the matching as the most important thing, and binding to a variable as an afterthought just because I'll need the entire term later (perhaps much later) in the body. > > (C) CONSISTENCY WITH USE (1) OF = IN ERLANG. > > To me it is simply inconsistent to bind X in the body of a function > by writing > X = [Y|Ys] This is how you build a new list in a body. > and then to turn around and do the exact OPPOSITE in the head of > a function by writing > [Y|Ys] = X > That's the way you do matching in a body. Why would you want a matching in head look like it was an assignment X = [Y|Ys] in a body? I prefer [Y|Ys]=X which is can be seen to be a matching regardless of context. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From ingela@REDACTED Mon Nov 1 12:01:45 2004 From: ingela@REDACTED (Ingela Anderton) Date: Mon, 1 Nov 2004 12:01:45 +0100 Subject: IPv6 incorrect setup (or resolver bug? or http client bug?) References: <16767.39572.922748.132308@antilipe.corelatus.se> Message-ID: <16774.6041.222241.576900@gargle.gargle.HOWL> Matthias Lang wrote: > Hi, > > I know very little about IP6. > > The 'inet' man page: > > http://www.erlang.se/doc/doc-5.4/lib/kernel-2.10/doc/html/inet.html > > says that inet:getaddr/2 is prepared for inet6. Trying it out on some > debian machines I have, none of which are configured for IP6, by > evaluating > > inet:getaddr("172.16.2.2", inet6) > > gives me varying results: > > Host Erlang release Result > ---------------------------------------------------------------------- > antilipe R9C {ok,{172,16,2,2}} > cors R10B {ok,{172,16,2,2}} > cors R9C {error, timeout} > > Is 172.16.2.2 an ip6 address? No, it is a ipv4 address. > Why am I asking this? > > I tried to use the http client (on cors, with R10B). Here's what > happened: > > http:request(get, {"http://172.16.2.2:1234", []}, [], []). > {error,eafnosupport} > > digging in the http client code a bit, I can see that > http_transport:connect() calls inet:getaddr(Host, inet6), apparently > to decide whether the host supports IP6 or not. This is the most reasonable way for the http-client to determine this. We want it to be transparent to the user if the hostname they give happens to translate into an ipv4 or ipv6-address. > Things which seem wrong: > > 1. inet:getaddr(Host, inet6) doesn't seem to be a reliable > way to determine whether the TCP socket should use inet6 > option, but http_transport thinks it is. It works on solaris, windows, freebsd and on some linux platforms. We have lately become aware that on some other linuxplatforms and on 64-bit platforms it does not seem to work. We are looking in to this. > 2. the inet documentation seems to say that inet_getaddr(Host, > inet6) isn't implemented yet, yet http_transport uses it It is supposed to be implemented but the documentation is lagging. It was implemented some time ago by a person no longer working with OTP. It appears some more extensive testing of this functionality is needed and also the documentation needs updating. You can always work around the problem for now by changing the call in http_transport:connect/0 to inet:getaddr(Host, inet) -- /m.v.h Ingela Ericsson AB - OTP team From rprice@REDACTED Mon Nov 1 12:50:01 2004 From: rprice@REDACTED (Roger Price) Date: Mon, 1 Nov 2004 12:50:01 +0100 (CET) Subject: A wish. Was: Matching elements of records In-Reply-To: Message-ID: On 1 Nov 2004, Bjorn Gustavsson wrote: > "Richard A. O'Keefe" writes: > > (A) Consistency with other functional programming languages, ... > > ML, Haskell > The best of the arguments. I wish Erlang had the keyword "as" so that I could write f(X as [Y|Ys]) instead of f(X=[Y|Ys]). Roger From matthias@REDACTED Mon Nov 1 13:17:08 2004 From: matthias@REDACTED (Matthias Lang) Date: Mon, 1 Nov 2004 13:17:08 +0100 Subject: IPv6 incorrect setup (or resolver bug? or http client bug?) In-Reply-To: <16774.6041.222241.576900@gargle.gargle.HOWL> References: <16767.39572.922748.132308@antilipe.corelatus.se> <16774.6041.222241.576900@gargle.gargle.HOWL> Message-ID: <16774.10564.93756.683892@antilipe.corelatus.se> Matthias> Is 172.16.2.2 an ip6 address? Ingela> No, it is a ipv4 address. I've read up a little on IP6 addressing since Friday. To satisfy my curiosity, can someone tell me what inet:getaddr("172.16.2.2", inet6) returns in R10B on a machine which supports IP6. (I'm expecting an error, or ::172.16.2.2, or an encoded version of ::172.16.2.2). Come to think of it, what does inet:getaddr("localhost", inet6) return? > You can always work around the problem for now by changing > the call in http_transport:connect/0 to inet:getaddr(Host, inet) Thanks. Another workaround is to use a machine name instead of a dotted quad. Matt From chandrashekhar.mullaparthi@REDACTED Mon Nov 1 17:46:48 2004 From: chandrashekhar.mullaparthi@REDACTED (Chandrashekhar Mullaparthi) Date: Mon, 1 Nov 2004 16:46:48 +0000 Subject: SSL problem In-Reply-To: <20041028142228.302BA38095@spy23.spymac.net> References: <20041028142228.302BA38095@spy23.spymac.net> Message-ID: <9F67C4DE-2C25-11D9-9905-000A95865434@t-mobile.co.uk> Can you post what HttpBalanceMessage is? On 28 Oct 2004, at 15:22, Miguel Rodr?guez Rubinos wrote: > > But I received it. But now when I try to send data to the server > (before 'pkix' I > couldn't), > > ssl:send(CSock, HttpBalanceMessage), > > it replies to me with: > > -- > HTTP/1.1 400 Bad Request > Server: iPlanet-Web-Proxy-Server/3.6-SP5 > > Your browser sent a message this server could not understand. > -- > > I don't know how to solve this, could you help me? > > > Thanks a lot, > > Miguel > From ok@REDACTED Tue Nov 2 03:22:19 2004 From: ok@REDACTED (Richard A. O'Keefe) Date: Tue, 2 Nov 2004 15:22:19 +1300 (NZDT) Subject: Matching elements of records Message-ID: <200411020222.iA22MJpf065762@atlas.otago.ac.nz> Bjorn Gustavsson wrote: Why would you want a matching in head look like it was an assignment X = [Y|Ys] in a body? Because it *IS* an assignment in a head, of course. In both cases, the topic, the thing being introduced, the thing you push onto your personal working memory because you think you will need it again, is the variable that is being bound. From ft@REDACTED Tue Nov 2 07:35:12 2004 From: ft@REDACTED (Fredrik Thulin) Date: Tue, 2 Nov 2004 07:35:12 +0100 Subject: bug in docs or in ets:info/1? Message-ID: <200411020735.12865.ft@it.su.se> Hi It seems to me that the documentation of ets:info/1 isn't in sync with the code, or even more probably the other way around. The R10B-0 documentation says that ets:info/1 returns a list of tuples, when it is in fact returning a tuple containing a number of tuples. I think a list of tuples would be more suitable. Eshell V5.4 (abort with ^G) 1> L = ets:info(inet_cache). {{memory,277}, ... {protection,public}} 2> is_list(L). false 3> is_tuple(L). true 4> Documentation : >info(Tab) -> [{Item,Value}] | undefined > >Types: > >Tab = tid() | atom() >Item, Value - see below > >Returns information about the table Tab as a list of {Item,Value} >tuples: The fix in ets.erl seems pretty obvious, but maybe there are concerns with code that is expecting the current format? /Fredrik From ingela@REDACTED Tue Nov 2 09:07:13 2004 From: ingela@REDACTED (Ingela Anderton) Date: Tue, 2 Nov 2004 09:07:13 +0100 Subject: IPv6 incorrect setup (or resolver bug? or http client bug?) References: <16767.39572.922748.132308@antilipe.corelatus.se> <16774.6041.222241.576900@gargle.gargle.HOWL> <16774.10564.93756.683892@antilipe.corelatus.se> Message-ID: <16775.16433.40417.975529@gargle.gargle.HOWL> Matthias Lang wrote: > > Matthias> Is 172.16.2.2 an ip6 address? > > Ingela> No, it is a ipv4 address. > > I've read up a little on IP6 addressing since Friday. To satisfy my > curiosity, can someone tell me what > > inet:getaddr("172.16.2.2", inet6) $ erl Erlang (BEAM) emulator version 5.4.1 [hipe] [threads:0] [kernel-poll] Eshell V5.4.1 (abort with ^G) 1> inet:getaddr("172.16.2.2", inet6). {ok,{0,0,0,0,0,65535,44048,514}} > returns in R10B on a machine which supports IP6. (I'm expecting an > error, or ::172.16.2.2, or an encoded version of ::172.16.2.2). > > Come to think of it, what does > > inet:getaddr("localhost", inet6) > > return? 2> inet:getaddr("localhost", inet6). {ok,{0,0,0,0,0,65535,32512,1}} 3> inet:getaddr("localhost", inet). {ok,{127,0,0,1}} -- /m.v.h Ingela Ericsson AB - OTP team From paris@REDACTED Tue Nov 2 09:29:02 2004 From: paris@REDACTED (Javier =?iso-8859-1?Q?Par=EDs_Fern=E1ndez?=) Date: Tue, 2 Nov 2004 09:29:02 +0100 Subject: Matching elements of records In-Reply-To: <200411020222.iA22MJpf065762@atlas.otago.ac.nz> References: <200411020222.iA22MJpf065762@atlas.otago.ac.nz> Message-ID: <20041102082902.GA947@dc.fi.udc.es> Hi, On Tue, Nov 02, 2004 at 03:22:19PM +1300, Richard A. O'Keefe wrote: > Bjorn Gustavsson wrote: > Why would you want a matching in head look like it was an assignment > > X = [Y|Ys] > > in a body? > > Because it *IS* an assignment in a head, of course. > In both cases, the topic, the thing being introduced, > the thing you push onto your personal working memory because you > think you will need it again, is the variable that is being bound. Just curious, but what is in your opinion the difference between assignment and matching in a functional language? I see none. Regards. From erlang@REDACTED Tue Nov 2 09:55:09 2004 From: erlang@REDACTED (Peter-Henry Mander) Date: Tue, 2 Nov 2004 08:55:09 +0000 Subject: Matching elements of records In-Reply-To: <20041102082902.GA947@dc.fi.udc.es> References: <200411020222.iA22MJpf065762@atlas.otago.ac.nz> <20041102082902.GA947@dc.fi.udc.es> Message-ID: <20041102085509.571aa29d.erlang@manderp.freeserve.co.uk> On Tue, 2 Nov 2004 09:29:02 +0100 > Just curious, but what is in your opinion the difference between > assignment and matching in a functional language? I see none. There _IS_ none. There are only bound and unbound variables. How they are written is pretty much up to you! (Or those who impose a coding style) However, I have been bitten when I _forgot_ that I already bound a variable... which is a good argument for keeping functions short and sweet. Pete. -- "The Tao of Programming flows far away and returns on the wind of morning." From vances@REDACTED Tue Nov 2 10:06:56 2004 From: vances@REDACTED (Vance Shipley) Date: Tue, 2 Nov 2004 04:06:56 -0500 Subject: lists:keymerge/3 Message-ID: <20041102090656.GD13419@frogman.motivity.ca> Is this a bug or am I missing something? 1> lists:keymerge(1, [{1,foo}], [{1,a},{2,b},{3,c}]). [{1,foo},{1,a},{2,b},{3,c}] I would have expected it to return: [{1,foo},{2,b},{3,c}] -Vance From vlad_dumitrescu@REDACTED Tue Nov 2 10:11:46 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Tue, 2 Nov 2004 10:11:46 +0100 Subject: Matching elements of records References: <200411020222.iA22MJpf065762@atlas.otago.ac.nz> <20041102082902.GA947@dc.fi.udc.es> Message-ID: From: "Javier Par?s Fern?ndez" > Just curious, but what is in your opinion the difference between > assignment and matching in a functional language? I see none. In my view, assignment X = [Y, Z] is creating a new entity from several existing ones. Matching [Y, Z] = X splits an existing entity into its components. regards, /Vlad From bjorn@REDACTED Tue Nov 2 10:25:27 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 02 Nov 2004 10:25:27 +0100 Subject: Matching elements of records In-Reply-To: References: <200411020222.iA22MJpf065762@atlas.otago.ac.nz> <20041102082902.GA947@dc.fi.udc.es> Message-ID: Yes, that was exactly the distinction I had in mind. In the assignment case, more heap space will be allocated. In the matching case, no heap space will be allocated (except when matching binaries, but they are strange creatures). /Bj?rn "Vlad Dumitrescu" writes: > From: "Javier Par?s Fern?ndez" > > Just curious, but what is in your opinion the difference between > > assignment and matching in a functional language? I see none. > > In my view, assignment X = [Y, Z] is creating a new entity from several existing > ones. > Matching [Y, Z] = X splits an existing entity into its components. > > regards, > /Vlad > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bengt.kleberg@REDACTED Tue Nov 2 10:41:20 2004 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 02 Nov 2004 10:41:20 +0100 Subject: lists:keymerge/3 In-Reply-To: <20041102090656.GD13419@frogman.motivity.ca> References: <20041102090656.GD13419@frogman.motivity.ca> Message-ID: <41875640.6070606@ericsson.com> Vance Shipley wrote: > Is this a bug or am I missing something? > > 1> lists:keymerge(1, [{1,foo}], [{1,a},{2,b},{3,c}]). > [{1,foo},{1,a},{2,b},{3,c}] this seems to be according to the documentation: ''When elements in the input lists compare equal, elements from List1 are picked before elements from List2.'' > I would have expected it to return: > > [{1,foo},{2,b},{3,c}] perhaps (???) this is what you get from lists:ukeymerge(N, List1, List2) bengt From sean.hinde@REDACTED Tue Nov 2 11:02:05 2004 From: sean.hinde@REDACTED (Sean Hinde) Date: Tue, 2 Nov 2004 10:02:05 +0000 Subject: IPv6 incorrect setup (or resolver bug? or http client bug?) In-Reply-To: <16775.16433.40417.975529@gargle.gargle.HOWL> References: <16767.39572.922748.132308@antilipe.corelatus.se> <16774.6041.222241.576900@gargle.gargle.HOWL> <16774.10564.93756.683892@antilipe.corelatus.se> <16775.16433.40417.975529@gargle.gargle.HOWL> Message-ID: <4032CED5-2CB6-11D9-AF62-000A95927CCE@mac.com> On 2 Nov 2004, at 08:07, Ingela Anderton wrote: > > Matthias Lang wrote: >> >> Matthias> Is 172.16.2.2 an ip6 address? >> >> Ingela> No, it is a ipv4 address. >> >> Come to think of it, what does >> >> inet:getaddr("localhost", inet6) >> >> return? > 2> inet:getaddr("localhost", inet6). > {ok,{0,0,0,0,0,65535,32512,1}} > 3> inet:getaddr("localhost", inet). > {ok,{127,0,0,1}} Interesting. on Mac OS X: 1> inet:getaddr("localhost", inet6). {ok,{0,0,0,0,0,0,0,1}} Sean From ft@REDACTED Tue Nov 2 11:28:03 2004 From: ft@REDACTED (Fredrik Thulin) Date: Tue, 2 Nov 2004 11:28:03 +0100 Subject: IPv6 incorrect setup (or resolver bug? or http client bug?) In-Reply-To: <4032CED5-2CB6-11D9-AF62-000A95927CCE@mac.com> References: <16767.39572.922748.132308@antilipe.corelatus.se> <16775.16433.40417.975529@gargle.gargle.HOWL> <4032CED5-2CB6-11D9-AF62-000A95927CCE@mac.com> Message-ID: <200411021128.04071.ft@it.su.se> On Tuesday 02 November 2004 11.02, Sean Hinde wrote: ... > Interesting. on Mac OS X: > > 1> inet:getaddr("localhost", inet6). > {ok,{0,0,0,0,0,0,0,1}} Localhost is 127.0.0.1 in IPv4 and ::1 in IPv6, so the above seems correct to me. In IPv6 addresses, :: expands to 'as many zeros as possible', so ::1 is really 0000:0000:0000:0000:0000:0000:0000:0001 and 2001:6b0:5:300::53 (one of our nameservers) is just a shorter way of saying 2001:06b0:0005:0300:0000:0000:0000:0053. /Fredrik From ingela@REDACTED Tue Nov 2 14:10:10 2004 From: ingela@REDACTED (Ingela Anderton) Date: Tue, 2 Nov 2004 14:10:10 +0100 Subject: IPv6 incorrect setup (or resolver bug? or http client bug?) References: <16767.39572.922748.132308@antilipe.corelatus.se> <16774.6041.222241.576900@gargle.gargle.HOWL> <16774.10564.93756.683892@antilipe.corelatus.se> <16775.16433.40417.975529@gargle.gargle.HOWL> <4032CED5-2CB6-11D9-AF62-000A95927CCE@mac.com> Message-ID: <16775.34610.726257.279241@gargle.gargle.HOWL> Sean Hinde wrote: > > On 2 Nov 2004, at 08:07, Ingela Anderton wrote: > > > > > Matthias Lang wrote: > >> > >> Matthias> Is 172.16.2.2 an ip6 address? > >> > >> Ingela> No, it is a ipv4 address. > >> > >> Come to think of it, what does > >> > >> inet:getaddr("localhost", inet6) > >> > >> return? > > 2> inet:getaddr("localhost", inet6). > > {ok,{0,0,0,0,0,65535,32512,1}} > > 3> inet:getaddr("localhost", inet). > > {ok,{127,0,0,1}} > > Interesting. on Mac OS X: > > 1> inet:getaddr("localhost", inet6). > {ok,{0,0,0,0,0,0,0,1}} Well on any machine that acctualy support ipv6: $ erl Erlang (BEAM) emulator version 5.4.1 [hipe] [threads:0] [kernel-poll] Eshell V5.4.1 (abort with ^G) 1> inet:getaddr("localhost", inet6). {ok,{0,0,0,0,0,0,0,1}} 2> On a machine that does not $ erl Erlang (BEAM) emulator version 5.4.1 [hipe] [threads:0] [kernel-poll] Eshell V5.4.1 (abort with ^G) 1> inet:getaddr("localhost", inet6). {ok,{0,0,0,0,0,65535,32512,1}} 2> I guess that would be the ipv6 tunneled version of the ipv4 address 127.0.0.1. -- /Ingela Ericsson AB - OTP team From vances@REDACTED Tue Nov 2 15:14:05 2004 From: vances@REDACTED (Vance Shipley) Date: Tue, 2 Nov 2004 09:14:05 -0500 Subject: lists:keymerge/3 In-Reply-To: <41875640.6070606@ericsson.com> References: <20041102090656.GD13419@frogman.motivity.ca> <41875640.6070606@ericsson.com> Message-ID: <20041102141405.GE13419@frogman.motivity.ca> On Tue, Nov 02, 2004 at 10:41:20AM +0100, Bengt Kleberg wrote: } } this seems to be according to the documentation: } ''When elements in the input lists compare equal, elements from List1 } are picked before elements from List2.'' The only logical interpretation of that statement is that elements with the same key are picked from List1. If you interpret it that the whole tuple must be equal for this statement to apply then it would be impossible to prove which list was chosen. } perhaps (???) this is what you get from } } lists:ukeymerge(N, List1, List2) No, it does the same thing. -Vance From bengt.kleberg@REDACTED Tue Nov 2 15:34:15 2004 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 02 Nov 2004 15:34:15 +0100 Subject: lists:keymerge/3 In-Reply-To: <20041102141405.GE13419@frogman.motivity.ca> References: <20041102090656.GD13419@frogman.motivity.ca> <41875640.6070606@ericsson.com> <20041102141405.GE13419@frogman.motivity.ca> Message-ID: <41879AE7.3040603@ericsson.com> Vance Shipley wrote: > On Tue, Nov 02, 2004 at 10:41:20AM +0100, Bengt Kleberg wrote: > } > } this seems to be according to the documentation: > } ''When elements in the input lists compare equal, elements from List1 > } are picked before elements from List2.'' > > The only logical interpretation of that statement is that elements > with the same key are picked from List1. If you interpret it that > the whole tuple must be equal for this statement to apply then it > would be impossible to prove which list was chosen. i interpreted it as meaning that _both_ elements are taken. the one from list1 first, the one from list2 after. note: i am not a native english speaker. does not merge mean that all elements are kept? if not, why is there a umerge function? bengt From ft@REDACTED Tue Nov 2 15:50:11 2004 From: ft@REDACTED (Fredrik Thulin) Date: Tue, 2 Nov 2004 15:50:11 +0100 Subject: IPv6 incorrect setup (or resolver bug? or http client bug?) In-Reply-To: <16775.34610.726257.279241@gargle.gargle.HOWL> References: <16767.39572.922748.132308@antilipe.corelatus.se> <4032CED5-2CB6-11D9-AF62-000A95927CCE@mac.com> <16775.34610.726257.279241@gargle.gargle.HOWL> Message-ID: <200411021550.12084.ft@it.su.se> On Tuesday 02 November 2004 14.10, Ingela Anderton wrote: ... > Well on any machine that acctualy support ipv6: > > $ erl > Erlang (BEAM) emulator version 5.4.1 [hipe] [threads:0] [kernel-poll] > > Eshell V5.4.1 (abort with ^G) > 1> inet:getaddr("localhost", inet6). > {ok,{0,0,0,0,0,0,0,1}} > 2> > > On a machine that does not > > $ erl > Erlang (BEAM) emulator version 5.4.1 [hipe] [threads:0] [kernel-poll] > > Eshell V5.4.1 (abort with ^G) > 1> inet:getaddr("localhost", inet6). > {ok,{0,0,0,0,0,65535,32512,1}} > 2> > > I guess that would be the ipv6 tunneled version of the ipv4 address > 127.0.0.1. That is an IPv4-in-IPv6 address. 32512 = 0x7f00. 0x7f = 127 decimal. the last two words (32512, 1) is actually the same as 127.0.0.1. /Fredrik From vances@REDACTED Tue Nov 2 16:29:07 2004 From: vances@REDACTED (Vance Shipley) Date: Tue, 2 Nov 2004 10:29:07 -0500 Subject: /binary problem in R10B Message-ID: <20041102152907.GG13419@frogman.motivity.ca> The following was taken verbatim from the programming examples however it is giving me an error using R10B. Eshell V5.4 (abort with ^G) 1> A = 1, B = 17, C = 42, 1> Bin2 = <>. <<1,17,0,42>> 2> <> = Bin2. ** exited: {{illegal_pattern,{bin,1, [{bin_element, 1, {var,1,'D'}, {integer,1,16}, [integer,{unit,1},unsigned,big]}, {bin_element, 1, {var,1,'E'}, {integer,1,8}, [integer,{unit,1},unsigned,big]}, {bin_element, 1, {var,1,'F'}, {atom,1,all}, [binary,{unit,8},unsigned,big]}]}}, [{erl_eval,expr,3}]} ** Checking with R9C-0 I see that it works as expected. Eshell V5.3 (abort with ^G) 1> A = 1, B = 17, C = 42, 1> Bin2 = <>. <<1,17,0,42>> 2> <> = Bin2. <<1,17,0,42>> -Vance From jay@REDACTED Tue Nov 2 17:43:01 2004 From: jay@REDACTED (Jay Nelson) Date: Tue, 02 Nov 2004 08:43:01 -0800 Subject: lists:keymerge/3 Message-ID: <4187B915.2050609@duomark.com> Try the following (it's the best I could think of offhand, but it hasn't been tested): listreplace([], Result) -> Result; listreplace([{Key, Value} = Tuple | More] , List2) -> Newlist = lists:keyreplace(Key, 1, List2, Tuple), listreplace(More, Newlist). You'll want to do lists:keysort(1,List2) before sending it in to listreplace. I subscribe to Bjorn's approach of ordering the variable names. The most important point is the pattern of the tuple, I label it as an afterthought because I found after I started writing the function that I needed a handle for the whole term. It is a matter of style (or conformity, depending on your co-conspirators). jay From ulf.wiger@REDACTED Tue Nov 2 17:53:36 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 2 Nov 2004 17:53:36 +0100 Subject: /binary problem in R10B Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F540292E@ESEALNT442.al.sw.ericsson.se> Perhaps it would be a good idea to design test cases verifying all examples in the documentation? ;-) /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Vance Shipley > Sent: den 2 november 2004 16:29 > To: erlang-questions@REDACTED > Subject: /binary problem in R10B > > > > The following was taken verbatim from the programming examples > however it is giving me an error using R10B. > > Eshell V5.4 (abort with ^G) > 1> A = 1, B = 17, C = 42, > 1> Bin2 = <>. > <<1,17,0,42>> > 2> <> = Bin2. > ** exited: {{illegal_pattern,{bin,1, > [{bin_element, > 1, > {var,1,'D'}, > {integer,1,16}, > > [integer,{unit,1},unsigned,big]}, > {bin_element, > 1, > {var,1,'E'}, > {integer,1,8}, > > [integer,{unit,1},unsigned,big]}, > {bin_element, > 1, > {var,1,'F'}, > {atom,1,all}, > > [binary,{unit,8},unsigned,big]}]}}, > [{erl_eval,expr,3}]} ** > > Checking with R9C-0 I see that it works as expected. > > Eshell V5.3 (abort with ^G) > 1> A = 1, B = 17, C = 42, > 1> Bin2 = <>. > <<1,17,0,42>> > 2> <> = Bin2. > <<1,17,0,42>> > > > -Vance > From mrrubinos@REDACTED Tue Nov 2 17:57:17 2004 From: mrrubinos@REDACTED (Miguel Rodríguez Rubinos) Date: Tue, 02 Nov 2004 09:57:17 -0700 Subject: SSL problem Message-ID: <20041102165719.2A42438068@spy23.spymac.net> Hi, thank you for your responses. At the end it works, but I had to have a look to RFC 2616 at 14.23. "A client MUST include a Host header field in all HTTP/1.1 request messages." And my requests didin't have it. Now, they look like this POST anURI HTTP/1.1 Host: Machine:Port Accept: text/plain Content-length: xxxx Thanks a lot, Miguel ________________________________________________ Miguel Rodr?guez Rubinos NomaSystems Edificio de Servicios Generales de Investigaci?n Campus de Elvi?a s/n 15071 A Coru?a Spain http://www.nomasystems.com ________________________________________________ On Tue Nov 2 8:11 , Chandrashekhar Mullaparthi sent: >Can you try sending the URI has http://anURI in the POST line instead >of https://anURI ?? Maybe your webserver is choking on that. > >cheers >Chandru > >On 2 Nov 2004, at 15:03, Miguel Rodr?guez Rubinos wrote: > >> Hi, >> >> here is the HttpBalanceMessage >> >> HttpBalanceMessage: >> >> "POST https://anURI >> HTTP/1.1\r\n >> Accept: text/plain\r\n >> Content-length: 1001\r\n\r\n >> >> >> " >> >> ________________________________________________ >> >> Miguel Rodr?guez Rubinos >> >> NomaSystems >> >> Edificio de Servicios Generales de Investigaci?n >> Campus de Elvi?a s/n >> 15071 A Coru?a >> >> Spain >> >> http://www.nomasystems.com >> ________________________________________________ >> >> On Mon Nov 1 9:46 , Chandrashekhar Mullaparthi >> chandrashekhar.mullaparthi@REDACTED> sent: >> >>> Can you post what HttpBalanceMessage is? >>> >>> >>> On 28 Oct 2004, at 15:22, Miguel Rodr?guez Rubinos wrote: >>> >>> >>>> >>>> But I received it. But now when I try to send data to the server >>>> (before 'pkix' I >>>> couldn't), >>>> >>>> ssl:send(CSock, HttpBalanceMessage), >>>> >>>> it replies to me with: >>>> >>>> -- >>>> HTTP/1.1 400 Bad Request >>>> Server: iPlanet-Web-Proxy-Server/3.6-SP5 >>>> >>>> Your browser sent a message this server could not understand. >>>> -- >>>> >>>> I don't know how to solve this, could you help me? >>>> >>>> >>>> Thanks a lot, >>>> >>>> Miguel >>>> >>> >> >> >> ---- Get Urchin 6 On Demand web analytics. Because you can't wait to >> be found. >> http://www.urchin.com/? >> utm_campaign=U6OD&utm_medium=email&source=spymac.com&content=cantwait > ---- Get Urchin 6 On Demand web analytics. Because you can't wait to be found. http://www.urchin.com/?utm_campaign=U6OD&utm_medium=email&source=spymac.com&content=cantwait From vances@REDACTED Tue Nov 2 18:19:44 2004 From: vances@REDACTED (Vance Shipley) Date: Tue, 2 Nov 2004 12:19:44 -0500 Subject: /binary problem in R10B In-Reply-To: <37FB7AA6F5F9814FB634A7BF4C35A6F540292E@ESEALNT442.al.sw.ericsson.se> References: <37FB7AA6F5F9814FB634A7BF4C35A6F540292E@ESEALNT442.al.sw.ericsson.se> Message-ID: <20041102171944.GA16374@frogman.motivity.ca> I keep looking at this thinking I must be doing something wrong as it couldn't possibly be that broken. Maybe this works on the PC platform. I have tested on Solaris SPARC and OS X. An example from the reference manual: Eshell V5.4 (abort with ^G) 1> <> = <<1,17,42:16>>. ** exited: {{illegal_pattern,{bin,1, [{bin_element, 1, {var,1,'G'}, {integer,1,8}, [integer,{unit,1},unsigned,big]}, {bin_element, 1, {var,1,'H'}, {atom,1,all}, [binary,{unit,8},unsigned,big]}]}}, [{erl_eval,expr,3}]} ** From matthias@REDACTED Tue Nov 2 18:37:28 2004 From: matthias@REDACTED (Matthias Lang) Date: Tue, 2 Nov 2004 18:37:28 +0100 Subject: /binary problem in R10B In-Reply-To: <20041102171944.GA16374@frogman.motivity.ca> References: <37FB7AA6F5F9814FB634A7BF4C35A6F540292E@ESEALNT442.al.sw.ericsson.se> <20041102171944.GA16374@frogman.motivity.ca> Message-ID: <16775.50648.264761.481584@antilipe.corelatus.se> Vance Shipley writes: > I keep looking at this thinking I must be doing something wrong as > it couldn't possibly be that broken. Remember, the shell isn't the same thing as the compiler. In older versions, the shell didn't handle records and there's a history of the shell not quite doing the same thing as the compiler with binaries. I tried your examples and they work just fine when compiled as proper programs. Matthias From vances@REDACTED Tue Nov 2 18:42:50 2004 From: vances@REDACTED (Vance Shipley) Date: Tue, 2 Nov 2004 12:42:50 -0500 Subject: /binary problem in R10B In-Reply-To: <16775.50648.264761.481584@antilipe.corelatus.se> References: <37FB7AA6F5F9814FB634A7BF4C35A6F540292E@ESEALNT442.al.sw.ericsson.se> <20041102171944.GA16374@frogman.motivity.ca> <16775.50648.264761.481584@antilipe.corelatus.se> Message-ID: <20041102174250.GB16374@frogman.motivity.ca> On Tue, Nov 02, 2004 at 06:37:28PM +0100, Matthias Lang wrote: } } I tried your examples and they work just fine when compiled as proper } programs. Ah, right. I feel better now. :) -Vance From tony@REDACTED Tue Nov 2 23:04:45 2004 From: tony@REDACTED (Tony Rogvall) Date: Tue, 2 Nov 2004 23:04:45 +0100 Subject: IPv6 incorrect setup (or resolver bug? or http client bug?) In-Reply-To: <200411021550.12084.ft@it.su.se> Message-ID: <34B84220-2D1B-11D9-9BE1-000A95EB4F88@rogvall.com> tisdagen den 2 november 2004 kl 15.50 skrev Fredrik Thulin: > > That is an IPv4-in-IPv6 address. > > 32512 = 0x7f00. 0x7f = 127 decimal. the last two words (32512, 1) is > actually the same as 127.0.0.1. > > FYI 1> inet_parse:ntoa({0,0,0,0,0,65535,32512,1}). "::FFFF:127.0.0.1" /Tony From david.nospam.hopwood@REDACTED Wed Nov 3 00:41:39 2004 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Tue, 02 Nov 2004 23:41:39 +0000 Subject: lists:keymerge/3 In-Reply-To: <41879AE7.3040603@ericsson.com> References: <20041102090656.GD13419@frogman.motivity.ca> <41875640.6070606@ericsson.com> <20041102141405.GE13419@frogman.motivity.ca> <41879AE7.3040603@ericsson.com> Message-ID: <41881B33.6050303@blueyonder.co.uk> Bengt Kleberg wrote: > Vance Shipley wrote: > >> On Tue, Nov 02, 2004 at 10:41:20AM +0100, Bengt Kleberg wrote: >> } } this seems to be according to the documentation: >> } ''When elements in the input lists compare equal, elements from >> List1 } are picked before elements from List2.'' >> The only logical interpretation of that statement is that elements >> with the same key are picked from List1. If you interpret it that the >> whole tuple must be equal for this statement to apply then it would be >> impossible to prove which list was chosen. > > i interpreted it as meaning that _both_ elements are taken. the one from > list1 first, the one from list2 after. > > note: i am not a native english speaker. "are picked before" is ambiguous in English. It could either mean "are picked in preference to" or "are placed earlier than". Without testing it I would have assumed the former. The documentation should be changed to say more precisely what was intended. -- David Hopwood From ok@REDACTED Wed Nov 3 02:43:27 2004 From: ok@REDACTED (Richard A. O'Keefe) Date: Wed, 3 Nov 2004 14:43:27 +1300 (NZDT) Subject: lists:keymerge/3 Message-ID: <200411030143.iA31hRQn314445@atlas.otago.ac.nz> Vance Shipley was surprised that 1> lists:keymerge(1, [{1,foo}], [{1,a},{2,b},{3,c}]). actually does a _merge_ like its name says and returns [{1,foo},{1,a},{2,b},{3,c}] The thing that distinguishes a merge from other operations is that - unlike append, it requires and returns ordered lists - unlike union, its result contains ALL the elements of the inputs. The documentation is really quite clear: Returns the sorted list formed by merging List1 and List2. The merge is performed on the Nth element of each tuple. Both List1 and List2 must be key-sorted prior to evaluating this function; otherwise the result is undefined (and probably unexpected). >>>>When elements in the input lists compare equal, elements from List1 >>>>are picked before elements from List2. In short, it's not a bug. It would not be hard to write a keyunion/3 function if it proved useful. From tobbe@REDACTED Wed Nov 3 08:56:48 2004 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Wed, 03 Nov 2004 08:56:48 +0100 Subject: /binary problem in R10B In-Reply-To: <16775.50648.264761.481584@antilipe.corelatus.se> References: <37FB7AA6F5F9814FB634A7BF4C35A6F540292E@ESEALNT442.al.sw.ericsson.se> <20041102171944.GA16374@frogman.motivity.ca> <16775.50648.264761.481584@antilipe.corelatus.se> Message-ID: <41888F40.1060004@nortelnetworks.com> Matthias Lang wrote: >Vance Shipley writes: > > > I keep looking at this thinking I must be doing something wrong as > > it couldn't possibly be that broken. > >Remember, the shell isn't the same thing as the compiler. In older >versions, the shell didn't handle records and there's a history of the >shell not quite doing the same thing as the compiler with binaries. > >I tried your examples and they work just fine when compiled as proper >programs. > >Matthias > > But this used to work: -------------- kiwi:work> erl Erlang (BEAM) emulator version 5.3.6.2.b1 [source] [hipe] Eshell V5.3.6.2.b1 (abort with ^G) 1> <> = <<1,17,42:16>>. <<1,17,0,42>> ------------- and it is very convenient to have it working! Looks like a bug to me... -- Tobbe From samuel@REDACTED Wed Nov 3 09:52:21 2004 From: samuel@REDACTED (Samuel Rivas) Date: Wed, 3 Nov 2004 09:52:21 +0100 Subject: /binary problem in R10B In-Reply-To: <20041102171944.GA16374@frogman.motivity.ca> References: <37FB7AA6F5F9814FB634A7BF4C35A6F540292E@ESEALNT442.al.sw.ericsson.se> <20041102171944.GA16374@frogman.motivity.ca> Message-ID: <20041103085221.GA14689@crusher.lfcia.pri> Vance Shipley wrote: > > I keep looking at this thinking I must be doing something wrong as > it couldn't possibly be that broken. Maybe this works on the PC > platform. I have tested on Solaris SPARC and OS X. It's broken on Linux too -- Samuel From bjorn@REDACTED Wed Nov 3 10:21:57 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 03 Nov 2004 10:21:57 +0100 Subject: /binary problem in R10B In-Reply-To: <37FB7AA6F5F9814FB634A7BF4C35A6F540292E@ESEALNT442.al.sw.ericsson.se> References: <37FB7AA6F5F9814FB634A7BF4C35A6F540292E@ESEALNT442.al.sw.ericsson.se> Message-ID: "Ulf Wiger (AL/EAB)" writes: > Perhaps it would be a good idea to design test cases > verifying all examples in the documentation? ;-) > Yes, it is a good idea. :) As pointed out in another answer, the bug only occurs in the shell. The compiler generates correct code. There will be correction for the bug in a future release. /Bjorn > /Uffe > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Vance Shipley > > Sent: den 2 november 2004 16:29 > > To: erlang-questions@REDACTED > > Subject: /binary problem in R10B > > > > > > > > The following was taken verbatim from the programming examples > > however it is giving me an error using R10B. > > > > Eshell V5.4 (abort with ^G) > > 1> A = 1, B = 17, C = 42, > > 1> Bin2 = <>. > > <<1,17,0,42>> > > 2> <> = Bin2. > > ** exited: {{illegal_pattern,{bin,1, > > [{bin_element, > > 1, > > {var,1,'D'}, > > {integer,1,16}, > > > > [integer,{unit,1},unsigned,big]}, > > {bin_element, > > 1, > > {var,1,'E'}, > > {integer,1,8}, > > > > [integer,{unit,1},unsigned,big]}, > > {bin_element, > > 1, > > {var,1,'F'}, > > {atom,1,all}, > > > > [binary,{unit,8},unsigned,big]}]}}, > > [{erl_eval,expr,3}]} ** > > > > Checking with R9C-0 I see that it works as expected. > > > > Eshell V5.3 (abort with ^G) > > 1> A = 1, B = 17, C = 42, > > 1> Bin2 = <>. > > <<1,17,0,42>> > > 2> <> = Bin2. > > <<1,17,0,42>> > > > > > > -Vance > > > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From robert.virding@REDACTED Thu Nov 4 00:05:56 2004 From: robert.virding@REDACTED (Robert Virding) Date: Thu, 4 Nov 2004 00:05:56 +0100 Subject: Matching elements of records References: <200411020222.iA22MJpf065762@atlas.otago.ac.nz> Message-ID: <006801c4c1f9$b0464830$8200a8c0@Rovir> Seeing people have been referring to me I might enter the argument as well. :-) Firstly, it doesn't really matter the meaning is the same either way. It is just a matter of choosing the style which seems clearer to you. I prefer [X|Y] = Z because that to my Erlang eyes is a match and I am using in within a match, so for me it seems more consistent. A match within a match within a match ... I like consistency. Now unfortunately I don't think you can fix the order even if you would want to and could decide which direction. Do I hear some say "backwards compatibility". The problem is that the syntax is much more flexible than just = or = As Joe mentioned in an earlier mail you can do = = . You can in fact use the syntax anywhere within a pattern not just at the top level. So for example you can have [a|[b|X]=Y] {a,X,[A,B={I,J,K},C]=Y,e} It is truly the ultimate "have your cake and eat it" of matching. Actually it was easier to implement in the general case than to special case it. If it hasn't been changed. Robert ----- Original Message ----- From: "Richard A. O'Keefe" To: ; Sent: Tuesday, November 02, 2004 3:22 AM Subject: Re: Matching elements of records > Bjorn Gustavsson wrote: > Why would you want a matching in head look like it was an assignment > > X = [Y|Ys] > > in a body? > > Because it *IS* an assignment in a head, of course. > In both cases, the topic, the thing being introduced, > the thing you push onto your personal working memory because you > think you will need it again, is the variable that is being bound. > > From ok@REDACTED Thu Nov 4 03:38:35 2004 From: ok@REDACTED (Richard A. O'Keefe) Date: Thu, 4 Nov 2004 15:38:35 +1300 (NZDT) Subject: lists:keymerge/3 Message-ID: <200411040238.iA42cZ6b102072@atlas.otago.ac.nz> David Hopwood wrote: "are picked before" is ambiguous in English. As a native speaker of English, I have to disagree. "before" does not mean "instead of". It can, in certain very unusual contexts, have that reading, but this is very far from a common reading. It would certainly be a highly unusual way to say it if that was what was meant. There is a fairly strong Gricean implication that if someone had _meant_ "instead of" or "in preference to" they would have said so, instead of using a term which almost invariably implies "both". Don't forget the context: we are talking about LISTS (so "before" can be expected to mean "earlier in left-to-right spatial order"), and that's precisely what it DOES mean in this instance. Without testing it I would have assumed the former. In the context of a MERGE, "instead of" would be such an astonishingly dumb and buggy thing to do that it would require a very strong explicit statement to override our expectation that ALL the elements of BOTH lists are eventually included. The documentation should be changed to say more precisely what was intended. That would do little harm, but as it stands, it really is pretty hard to misunderstand, if you know what a merge is. (And if you don't know what a merge is, you have no grounds for surprise at what you get.) From A.BETIS@REDACTED Thu Nov 4 11:15:31 2004 From: A.BETIS@REDACTED (BETIS Alexandre) Date: Thu, 4 Nov 2004 11:15:31 +0100 Subject: Dumb question about the test_server Message-ID: Hello to all, I have a very dumb question. I am using the test_server app to validate my software. I am having a ball :). Yet, I encounter the following problem. A newcomer is about to join me. We will be developping on a unique UNIX server. What happens is that when I run the test_server twice, the second test_server launched just crashes. Obviously, this is due to some name registration clash done at init time by the test server. This typically happens when two different users logged onto the development server launch the test server at the same moment from the UNIX shell. Before I start diggin' into the test_server code, I would like to know if anyone could suggest a way to handle this? I tried to -name the process, but that doesn't seem to help. Thanks, -- Alex " Ce message et ses pi?ces jointes sont confidentiels et exclusivement r?serv?s ? leurs destinataires qui s'assureront de l'absence de virus. CSEE Transport n'assume aucune responsabilit? au titre de ce message s'il est alt?r?, d?form?, falsifi?, ind?ment utilis? par des tiers ou encore s'il a caus? des dommages ou pertes de toute nature. This e-mail and any attached files are confidential and exclusively intended for its addressees who will conduct appropriate virus checks. CSEE Transport shall not be liable for the message if altered, changed, falsified, unduly used by third parties nor for any damage or loss." From vlad_dumitrescu@REDACTED Thu Nov 4 12:38:55 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Thu, 4 Nov 2004 12:38:55 +0100 Subject: Dumb question about the test_server References: Message-ID: From: "BETIS Alexandre" > This typically happens when two different users logged onto > the development server launch the test server at the same > moment from the UNIX shell. Hi, My guess is that you should only start one instance of the test server (possibly when starting the node) and both use it for your testing. It supports running multiple test suits. regards, Vlad From erlang@REDACTED Thu Nov 4 12:36:41 2004 From: erlang@REDACTED (Inswitch Solutions - Erlang Evaluation) Date: Thu, 4 Nov 2004 09:36:41 -0200 Subject: Transaction protocol Message-ID: <035301c4c262$a680f7f0$1e00a8c0@design> Hi, I need to manage transactions between two Erlang nodes connected by an IP network with firewalls and other network devices in the middle. - I need to have the transaction parties state synchronised despite of network failure, any ideas about best standards for this? - Has someone implemented or used a transaction protocol in Erlang, such as 2 phase commit, 3 phase comit or other? thanks, Eduardo Figoli INSwitch Solutions -------------- next part -------------- An HTML attachment was scrubbed... URL: From mpquique@REDACTED Thu Nov 4 18:59:19 2004 From: mpquique@REDACTED (Enrique Marcote =?iso-8859-1?q?Pe=F1a?=) Date: Thu, 4 Nov 2004 18:59:19 +0100 Subject: what about? Zope and Erlang Message-ID: <200411041859.19748.mpquique@udc.es> Hello, I read about the proposal Micka?l R?mond made to the list, about a Zope like application server in Erlang. Has any work been done in that direction? Is it available anywhere? Best regards, -- Quique http://www.des.udc.es/~mpquique/ From mickael.remond@REDACTED Thu Nov 4 22:29:04 2004 From: mickael.remond@REDACTED (Mickael Remond) Date: Thu, 04 Nov 2004 22:29:04 +0100 Subject: Timebomb In-Reply-To: <47113.193.15.249.14.1099033998.squirrel@www69.webcows.se> References: <61158.193.15.249.14.1098945106.squirrel@www69.webcows.se> <4180A6B2.8000800@erlang-fr.org> <1098999976.418168a8ad4e9@imp.online.net> <47113.193.15.249.14.1099033998.squirrel@www69.webcows.se> Message-ID: <418A9F20.6010101@erlang-fr.org> Peter L wrote: > Now it works (with proxying and reverse proxying if that is involved), > accessing the Timebomb page and logging in to the Metafrog site, all > over HTTP 1.0 using only port 80 from my Netscape 7.2 client. > > I created my metafrog account to test logging in. I was able to change > my password, but I was not able to update my user data, logging in like > I described above. Instead I got: > > ============================ > Not Found > The requested URL /error/HTTP_BAD_GATEWAY.html.var was not found on this > server. > Yaws 1.42 Server at metafrog.erlang-projects.org > ============================ Hello, The problem should be solved now (I hope so). -- Micka?l R?mond http://www.erlang-projects.org/ From mickael.remond@REDACTED Thu Nov 4 22:58:09 2004 From: mickael.remond@REDACTED (Mickael Remond) Date: Thu, 04 Nov 2004 22:58:09 +0100 Subject: what about? Zope and Erlang In-Reply-To: <200411041859.19748.mpquique@udc.es> References: <200411041859.19748.mpquique@udc.es> Message-ID: <418AA5F1.4000108@erlang-fr.org> Enrique Marcote Pe?a wrote: > Hello, > > I read about the proposal Micka?l R?mond made to the list, about a Zope like > application server in Erlang. Has any work been done in that direction? Is > it available anywhere? This is still an idea, but no real progress, yet. This is still a good idea, but I am convinced now that this can be implemented the Erlang way by using processus. Instead of making object available throught various protocol such as HTTP/HTML, we are currently investigating the idea of adding an interface layer to process from various protocol, including HTTP/HTML. I think this could be simpler and cleaner. Are you interested by such a tool ? Do you have any particular ideas / requirements ? -- Micka?l R?mond http://www.erlang-projects.org/ From mpquique@REDACTED Fri Nov 5 02:30:04 2004 From: mpquique@REDACTED (Enrique Marcote =?iso-8859-1?q?Pe=F1a?=) Date: Fri, 5 Nov 2004 02:30:04 +0100 Subject: what about? Zope and Erlang Message-ID: <200411050230.04424.mpquique@udc.es> On Thursday 04 November 2004 22:58, Mickael Remond wrote: > Enrique Marcote Pe?a wrote: > > Hello, > > > > I read about the proposal Micka?l R?mond made to the list, about a Zope > > like application server in Erlang. Has any work been done in that > > direction? Is it available anywhere? > > This is still an idea, but no real progress, yet. > This is still a good idea, but I am convinced now that this can be > implemented the Erlang way by using processus. Instead of making object > available throught various protocol such as HTTP/HTML, we are currently > investigating the idea of adding an interface layer to process from > various protocol, including HTTP/HTML. I think this could be simpler and > cleaner. > > Are you interested by such a tool ? Do you have any particular ideas / > requirements ? Hi Micka?l, We may be facing a large project by the next year, related to content management, so I started day dreaming with the possibility of using Erlang there. I believe that what we need is a Zope + Plone like solution. We are currently using typo3 for ourselves, mainly because we find it very easy for the end users, and that's very important for us. But we feel typo3 might not be appropriate for a large scale project with lots of extra requirements (developments), like the one I mentioned. It'll be great to have an erlang solution for this kind of applications. We are certainly very interested on it, so please, let us know any progress, either on the design or the implementation stage, in order to move on the same direction (If we ever start working on this, I'll let you know). Best, -- Quique http://www.des.udc.es/~mpquique/ From vlad_dumitrescu@REDACTED Tue Nov 9 09:33:09 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Tue, 9 Nov 2004 09:33:09 +0100 Subject: Debugger Message-ID: Hi, I am beginning to look at the debugger, in order to try to see how to use it from Java (the Erlide Eclipse plugin). >From the first look, it seems to me that the debugger proper and the ui are not easily separable. Or maybe I am trying to separate them in the wrong place. Before digging into the dirt, I'd like to ask if my target is the right one: is it enough to replace the dbg_ui_* modules? Are the messages to look for all in dbg_ui_trace? I will certainly come back with more detailed questions, and ask for tips and tricks, but for now I think this is about it. regards, Vlad From samuel@REDACTED Tue Nov 9 09:55:26 2004 From: samuel@REDACTED (Samuel Rivas) Date: Tue, 9 Nov 2004 09:55:26 +0100 Subject: lists:keymember Message-ID: <20041109085526.GA2283@crusher.lfcia.pri> Shouldn't this fail with a badarg? The argument does not complain with the description of the function ("keymember(Key, N, Tuplelist) [...] Tuplelist = [tuple()]") 1> lists:keymember(foo, 1, [foo]). false -- Samuel From ulf.wiger@REDACTED Tue Nov 9 11:17:52 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 9 Nov 2004 11:17:52 +0100 Subject: lists:keymember Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F540293C@ESEALNT442.al.sw.ericsson.se> This is consistent with e.g. lists:keysearch/3. The functions operating on tuple lists do not enforce any notion that the list cannot contain anything but tuples. If you want such a function, then keymember(Key,Pos,List) -> lists:foldl( fun(T,Bool) when is_tuple(T) -> Bool or (element(Pos,T) == Key); (_,_) -> erlang:error(badarg) end, false, List). would do the trick, but note that it always has to traverse the entire list. If it would bail out as soon as it came across the key it's looking for, it would not consistently fail for lists that are not of type [tuple()] -- only for those that have a non-tuple before an object that satisfies the search, or for lists that have non-tuples and no tuple T where element(Pos, Tuple) == Key. Example: keymember(2,1,[{1,a},{2,b}]) -> true keymember(2,1,[{1,a},{3,c}]) -> false keymember(2,1,[{1,a},{3,c},foo]) -> exit(badarg) keymember(2,1,[{1,a},{2,b},foo]) -> true keymember(2,1,[{1,a},foo,{2,b}]) -> exit(badarg) /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Samuel Rivas > Sent: den 9 november 2004 09:55 > To: erlang-questions@REDACTED > Subject: lists:keymember > > > Shouldn't this fail with a badarg? The argument does not > complain with > the description of the function ("keymember(Key, N, Tuplelist) [...] > Tuplelist = [tuple()]") > > 1> lists:keymember(foo, 1, [foo]). > false > > -- > Samuel > From samuel@REDACTED Tue Nov 9 11:57:15 2004 From: samuel@REDACTED (Samuel Rivas) Date: Tue, 9 Nov 2004 11:57:15 +0100 Subject: lists:keymember In-Reply-To: <37FB7AA6F5F9814FB634A7BF4C35A6F540293C@ESEALNT442.al.sw.ericsson.se> References: <37FB7AA6F5F9814FB634A7BF4C35A6F540293C@ESEALNT442.al.sw.ericsson.se> Message-ID: <20041109105715.GA3086@crusher.lfcia.pri> I see the performance issue. What surprised me was the fact that the function call did not fail even when the whole list had to be traversed. In a "let-it-crash" approach I would have implemented that function as keymember(_K, _N, []) -> false; keymember(K, N, [H|T]) -> case element(N, H) of K -> {value, H}; _ -> keymember(K, N, T) end. I see the behaviour of the OTP implementation is achieved by means of a guard instead of the case block, but I found the result a little astonishing. Perhaps I am going too far in my "crashing-all" philosophy :) Regards -- Samuel From richardc@REDACTED Tue Nov 9 14:51:29 2004 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 09 Nov 2004 14:51:29 +0100 Subject: Patch to handle packages in debugger Message-ID: <4190CB61.9020905@csd.uu.se> I have attached an updated version of lib/debugger/src/int.erl which should make it possible to use the debugger with modules using the package system (i.e., with module names like 'foo.bar.baz'). For those of you who prefer patches, there is also a diff attached. (If you're asking "what are packages?", see: http://www.erlang.se/publications/packages.html They _still_ haven't been properly included in the Erlang/OTP documentation, but they have been implemented since R8...) Let me know if something is still not working properly. /Richard -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: int.erl URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff URL: From richardc@REDACTED Tue Nov 9 16:36:44 2004 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 09 Nov 2004 16:36:44 +0100 Subject: Abstract modules - take 'em for a spin! Message-ID: <4190E40C.6060508@csd.uu.se> It has not been announced offically, but abstract (i.e., parameterized) modules were in fact included in R10. Go ahead and try them out! For details, see http://user.it.uu.se/~richardc/articles/absmods.pdf (Erlang workshop paper 2003). /Richard From hakan@REDACTED Tue Nov 9 16:53:51 2004 From: hakan@REDACTED (Hakan Mattsson) Date: Tue, 9 Nov 2004 16:53:51 +0100 (CET) Subject: Transaction protocol In-Reply-To: <035301c4c262$a680f7f0$1e00a8c0@design> Message-ID: On Thu, 4 Nov 2004, Inswitch Solutions - Erlang Evaluation wrote: EF> I need to manage transactions between two Erlang nodes connected by an EF> IP network with firewalls and other network devices in the middle. EF> - I need to have the transaction parties state synchronised despite of EF> network failure, any ideas about best standards for this? There is no best all-purpose standard for this. It depends on what you want to achieve and how much application specific knowledge you can make use of. It is much simpler to implement specific recovery protocols for a certain type of application than a generic one. EF> - Has someone implemented or used a transaction protocol in Erlang, EF> such as 2 phase commit, 3 phase comit or other? Yes, both the 2 phase commit and the 3 phase commit (as well as a few other) commit protocols are implemented i Mnesia. Take a look at mnesia_tm:multi_commit/4. Read also about the "lightweight" (2ph) and "heavyweight" (3ph) transaction protocols in: http://www.erlang.org/~hakan/mnesia_internals_slides.pdf The hard part is not the implementation of the commit protocol, it is the recovery of the persistent data when the nodes are re-connected. /H?kan From ulf.wiger@REDACTED Tue Nov 9 17:30:34 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 9 Nov 2004 17:30:34 +0100 Subject: Abstract modules - take 'em for a spin! Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F5402940@ESEALNT442.al.sw.ericsson.se> So, in your paper, there's a chapter (8) with "Implementation Notes". How much of that has actually been done? Regards, Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of > Richard Carlsson > Sent: den 9 november 2004 16:37 > To: erlang-questions > Subject: Abstract modules - take 'em for a spin! > > > It has not been announced offically, but abstract (i.e., > parameterized) modules were in fact included in R10. > Go ahead and try them out! > > For details, see http://user.it.uu.se/~richardc/articles/absmods.pdf > (Erlang workshop paper 2003). > > /Richard > From richardc@REDACTED Tue Nov 9 18:19:33 2004 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 09 Nov 2004 18:19:33 +0100 Subject: Abstract modules - take 'em for a spin! In-Reply-To: <37FB7AA6F5F9814FB634A7BF4C35A6F5402940@ESEALNT442.al.sw.ericsson.se> References: <37FB7AA6F5F9814FB634A7BF4C35A6F5402940@ESEALNT442.al.sw.ericsson.se> Message-ID: <4190FC25.8060108@csd.uu.se> Ulf Wiger (AL/EAB) wrote: > So, in your paper, there's a chapter (8) with > "Implementation Notes". How much of that has actually > been done? All the functionality is there. Calls on the form 'M:F(...)', i.e., with known arity, are much faster than before regardless of whether M is an atom or an abstract module. (Previously, they were just compiled into calls to erlang:apply/3, which is slower since the arguments must be put in a list.) However, apply/3 also works with abstract modules, although spawn/3 does not seem to work yet. (You can use 'spawn(fun () -> M:F(...) end)' to get around this, at least for now.) There is currently no caching of previously looked-up pointers, but that is a fairly simple thing to add later if even more speedup is needed. Abstract modules are marked as if containing the attribute '-abstract(true).'. *Do not* assume that the representation of abstract modules is known (currently a simple tuple). A new proper datatype might be added later, as was done with funs. /Richard From csanto@REDACTED Tue Nov 9 19:11:41 2004 From: csanto@REDACTED (Corrado Santoro) Date: 09 Nov 2004 19:11:41 +0100 Subject: Abstract modules - take 'em for a spin! In-Reply-To: <4190E40C.6060508@csd.uu.se> References: <4190E40C.6060508@csd.uu.se> Message-ID: <1100023901.2275.4.camel@csanto.diit.unict.it> On Tue, 2004-11-09 at 16:36, Richard Carlsson wrote: > It has not been announced offically, but abstract (i.e., > parameterized) modules were in fact included in R10. > Go ahead and try them out! Wow! A feature that someone (like) me expected to appear! But I think that something is still missing. I only took a brief look at the paper, but it seems that inheritance is not yet supported. Do you think that it could an interesting feature for Erlang? Ciao, --Corrado -- ====================================================== Eng. Corrado Santoro, Ph.D. University of Catania - Engineering Faculty Department of Computer Science and Telecommunications Engineering Viale A. Doria, 6 - 95125 CATANIA (ITALY) Tel: +39 095 7382380 Fax: +39 095 7382397 +39 095 7382365 +39 095 7382364 EMail: csanto@REDACTED Personal Home Page: http://www.diit.unict.it/users/csanto NUXI Home Page: http://nuxi.iit.unict.it ====================================================== From sean.hinde@REDACTED Tue Nov 9 19:32:41 2004 From: sean.hinde@REDACTED (Sean Hinde) Date: Tue, 9 Nov 2004 18:32:41 +0000 Subject: Transaction protocol In-Reply-To: References: Message-ID: On 9 Nov 2004, at 15:53, Hakan Mattsson wrote: > On Thu, 4 Nov 2004, Inswitch Solutions - Erlang Evaluation wrote: > > The hard part is not the implementation of the commit protocol, it is > the recovery of the persistent data when the nodes are re-connected. > Maybe it is time to re-evaluate the decision to never attempt to merge updates after a partition in Mnesia. This could take the form of a table property that declares hat this table is safe to merge on re-connect and that some small errors due to time differences between machines are acceptable. The current assumption that all tables must return to a consistent state by copying everything starts to fall down when we get to very large tables (ref Per Bergquist talk at EUC as well as our own experience). If both nodes have free run for a significant time then currently all updates on one node will be lost - in many cases this is worse than potentially losing some consistency between multiple tables updated in one transaction, and in many other cases (simple updates to single tables) there would be no loss of consistency, and much less loss of updates. Sean From hal@REDACTED Tue Nov 9 22:34:58 2004 From: hal@REDACTED (Hal Snyder) Date: Tue, 09 Nov 2004 15:34:58 -0600 Subject: Transaction protocol In-Reply-To: (Sean Hinde's message of "Tue, 9 Nov 2004 18:32:41 +0000") References: Message-ID: <87vfceso3h.fsf@ghidra.vail> Sean Hinde writes: ... > Maybe it is time to re-evaluate the decision to never attempt to > merge updates after a partition in Mnesia. This could take the form > of a table property that declares hat this table is safe to merge on > re-connect and that some small errors due to time differences > between machines are acceptable. What is done with other large distributed database technologies? What to do after partitioning is a requirements problem for any replicating store, not just mnesia. We know there is no single solution - it depends on the application (as Lennart pointed out when he was consulting here). Not being a DB expert, I wonder how the issue is handled with other replicating databases. From bjorn@REDACTED Wed Nov 10 14:46:13 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 10 Nov 2004 14:46:13 +0100 Subject: Erlang/OTP R10B-1 is out Message-ID: Bug fix release : otp_src_R10B-1 Build from snapshot : 2004-11-10 This is a bug fix release 1 for the R10B release. You can download the full source distribution from http://www.erlang.org/download/otp_src_R10B-1.tar.gz http://www.erlang.org/download/otp_src_R10B-1.readme (this file) Note: To unpack the TAR archive you need a GNU TAR compatible program. For instance, on MacOS X you need to use the 'gnutar' command; you can't use the 'tar' command or StuffIt to unpack the sources. For installation instructions please read the README that is part of the distribution. The Windows binary distribution can be downloaded from http://www.erlang.org/download/otp_win32_R10B-1.exe The documentation at http://www.erlang.org will be updated. You can also download the complete HTML documentation or the Unix manual files http://www.erlang.org/download/otp_doc_html_R10B-1.tar.gz http://www.erlang.org/download/otp_doc_man_R10B-1.tar.gz For some OTP applications there are more detailed release notes in the HTML documentation. We also want to thank those that sent us patches, suggestions and bug reports, The OTP Team --- compiler -------------------------------------------------------- OTP-5198 A few minor issues code generation issues were corrected. Although the generated code was correct, it was slightly slower and larger than it needed to be. A debug printout (that could be seen in rare circumstances) has been removed. not record_test(not_a_tuple, RecordTag) and similar expressions in a guard would fail. New options basic_validation and strong_validation to do a quick check of the code of a module. (Mainly useful for code generators.) The inline option was not recognized if it appeared in a -compile() directive inside the module. Corrected some bugs in the undocumented feature "parameterized modules". OTP-5224 When the undocumented feature "parameterized modules" was used, the ?MODULE macro did not work correctly. --- erts ------------------------------------------------------------ OTP-5203 The ethread library was unnecessarily rebuilt multiple times during the build process, also a debug version of the library was build during the install phase. These unnecessary builds have now been removed. Note, the content of the installed Erlang/OTP system is not effected at all by this change. OTP-5211 The emulator could fail to clear the memory segment cache. This could potentially cause memory allocation to unnecessarily fail when memory usage was close to its maximum. This bug has now been fixed. OTP-5216 std_alloc (std short for standard) was sometimes called def_alloc (def short for default). std_alloc is now everywhere refered to as std_alloc. OTP-5217 A documentation bug has been corrected in the erts_alloc(3) documentation. It was stated that some of the memory allocators present were by default disabled. This is true for Erlang/OTP R9C, but is not true for Erlang/OTP R10B. In R10B all memory allocators present are enabled by default. OTP-5221 The emulator now closes all open files and sockets immediately after receiving an USR1 signal. This causes the emulator to unregister at epmd as early as possible. OTP-5229 Try/catch support in the emulator slightly updated. OTP-5209 If one used select/3 and select/1 on a non-fixed table and deleted objects simultaneously, the emulator could crash. Note that the result of such simultaneous operations on tables that are not in a fixed state is still undefined, but the emulator crash is, needless to say, fixed. OTP-5233 Arithmetic with big numbers could crash the emulator. The HiPE native code compiler and run-time code in the emulator has been updated. (Note: Native code is still not supported.) Eliminated a few bugs that could crash the hybrid emulator (which is not supported). OTP-5210, You can now start Erlang with the -remsh flag which gives you a OTP-5248 remote initial shell instead of a local one. Example: erl -sname this_node -rsh other_node@REDACTED --- hipe ------------------------------------------------------------ OTP-5233 The HiPE native code compiler and run-time code in the emulator has been updated. (Note: Native code is still not supported.) Eliminated a few bugs that could crash the hybrid emulator (which is not supported). --- inets ------------------------------------------------------------ OTP-5101 A programming error could cause a badmatch in the http-client when the http response was chunk decoded. OTP-5239 The parsing of HTTP messages was missing a base case. This caused unexpected behavior when the separator CR and LF where received in different tcp packets. --- kernel ------------------------------------------------------------ OTP-5208 The documentation for the auth:open/1 function which no longer exists has been removed. (Thanks to Miguel Barreiro.) OTP-5212 If /etc/hosts specified two hosts with the same IP address (on separate lines), only the last host would be registered by inet_db during inet configuration. This has been corrected now so that both aliases are registered with the same IP address. OTP-5214 The top level group leader used to be listed as job #1 in the job list in JCL mode. Since there is no shell associated with this process that can be connected to, it will no longer be listed. OTP-5218 The possibility to start the erlang shell in parallell with the rest of the system has been reintroduced for backwards compatibility. Note that this old behaviour is error prone and should not be used unless for some reason necessary. OTP-5222 The documentation for BIFs that take I/O lists have been clarified. Those are list_to_binary/1, port_command/2, port_control/3. Documentation for all is_* BIFs (such as is_atom/1) has been added. Removed the documentation for erlang:float_to_binary/2 which was removed from the run-time system several releases ago. OTP-5226 The shell commands rr/1,2,3 now accepts wildcards when reading record definitions from BEAM files. OTP-5227 Corrected the crc32/3 function in the undocumented and unsupported zlib module. --- megaco ------------------------------------------------------------ OTP-5193 Minor error handling improvement to the text encoder. OTP-5186 The megaco text codec failed to properly encode a message containing no or an empty terminationAudit list or possibly a terminationAudit list with only an "empty" emptyDescriptor (e.g. an AuditDescriptor without any values; auditToken is either asn1_NOVALUE or []). This effected AmmsReply and auditOther (AuditResult) and both v1 and v2. OTP-5201 Version 2 codec corrections: Incorrectly transformed (encoded and decoded) IndAudStreamDescriptor (binary), encoded IndAudMediaDescriptor and IndAudStreamDescriptor (text). Incorrectly decoded IndAudMediaDescriptor (text). --- pman ------------------------------------------------------------ OTP-5191 The pman 'trace shell' functionality was broken as has now been fixed. Furthermore, pman could not correctly find the pid of the active shell if more than one shell process was running on the node. This has also been corrected. --- snmp ------------------------------------------------------------ OTP-5187 [agent] Added functions to get a list of all mibs loaded into an agent (see snmpa:which_mibs) and to get the (full path) file name of a loaded mib (see snmpa:whereis_mib). OTP-5196 [manager] The wrong default value (1024) was used for the net-if option recbuf. If no value is specified, then the OS default shall be used. Improvements and new features: OTP-5242 [manager] When the net_if process failed to send a message, for whatever reason, this is just dropped. And the user is "left hanging". Now, if the request is syncroneous, it will return with a proper reason (see snmpm:g, snmpm:gn and snmpm:s), and if the request was asynchroneous, the new callback function, handle_error (see snmpm_user) is called. Reported Fixed Bugs and Malfunctions: OTP-5225 [manager] The arguments CtxName and Port was swapped in the function snmpm:g/6. OTP-5241 [manager] TRAP receive failes for unknown agent due to failing message size calculation. Incompatibilities: OTP-5242 [manager] Introduced a new callback function in the behaviour snmpm_user. --- stdlib ------------------------------------------------------------ OTP-5213 The man page for the lists module has been updated with decscription of the new zip, unzip, and partition/2 functions (introduced in R10B-1). OTP-5214 The top level group leader used to be listed as job #1 in the job list in JCL mode. Since there is no shell associated with this process that can be connected to, it will no longer be listed. OTP-5218 The possibility to start the erlang shell in parallell with the rest of the system has been reintroduced for backwards compatibility. Note that this old behaviour is error prone and should not be used unless for some reason necessary. OTP-5226 The shell commands rr/1,2,3 now accepts wildcards when reading record definitions from BEAM files. OTP-5209 If one used select/3 and select/1 on a non-fixed table and deleted objects simultaneously, the emulator could crash. Note that the result of such simultaneous operations on tables that are not in a fixed state is still undefined, but the emulator crash is, needless to say, fixed. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From heinrich@REDACTED Wed Nov 10 14:57:17 2004 From: heinrich@REDACTED (Heinrich Venter) Date: Wed, 10 Nov 2004 15:57:17 +0200 Subject: SNMP OTP-MIB error Message-ID: Hi Starting to use SNMP for the first time here, and I am a bit stumped with this one. I start erlang with snmp and load the OTP-MIB. I use NET-SNMP version: 5.1.1 (that came with Redhat Fedora 2) and I then it dies on me! Am I doing something wrong or missing a step somewhere? # snmpwalk -v 3 -m OTP-MIB -M /usr/local/lib/erlang/lib/otp_mibs-1.0.2/mibs:/usr/share/snmp/mibs -u initial devel:4000 otp Error in packet. Reason: (genError) A general failure occured Failed object: OTP-REG::otp 1> application:start(crypto). ok 2> application:start(snmp). ok 3> otp_mib:load(snmp_master_agent). ok 4> snmp:info(snmp_master_agent). [{vsns,[v3]}, {loaded_mibs,[{'SNMP-MPD-MIB',true, "/usr/local/lib/erlang/lib/snmp-3.4.8/priv/mibs/SNMP-MPD-MIB.bin"}, {'SNMPv2-MIB',true, "/usr/local/lib/erlang/lib/snmp-3.4.8/priv/mibs/SNMPv2-MIB.bin"}, {'OTP-MIB',true, "/usr/local/lib/erlang/lib/otp_mibs-1.0.2/priv/mibs/OTP-MIB.bin"}, {'SNMP-FRAMEWORK-MIB',true, "/usr/local/lib/erlang/lib/snmp-3.4.8/priv/mibs/SNMP-FRAMEWORK-MIB.bin"} ]}, {subagents,[]}, {tree_size_bytes,876}, {process_memory,54572}, {db_memory,[{mib,839},{node,4832},{tree,1146}]}] 5> =ERROR REPORT==== 10-Nov-2004::15:49:15 === ** User error: Invalid return value {'EXIT',{aborted,{no_exists,[time_stamp,erlNodeTable]}}} from {otp_mib,erl_node_table,[]} (get_next) Click here for more information. http://asp1.rocketseed.com/RocketSeed/mail/433a32353a3737313736333a33303639373a2d323a313831 Bought to you by Launchpad. http://asp1.rocketseed.com/RocketSeed/mail/433a32353a3737313736333a33303639373a2d323a313438 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MTk2LjMwLjc5LjE1NQ== Type: image/gif Size: 557 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MTk2LjMwLjc5LjE1NQ== Type: image/gif Size: 16459 bytes Desc: not available URL: From richardc@REDACTED Wed Nov 10 15:20:08 2004 From: richardc@REDACTED (Richard Carlsson) Date: Wed, 10 Nov 2004 15:20:08 +0100 (MET) Subject: Abstract modules - take 'em for a spin! In-Reply-To: <1100023901.2275.4.camel@csanto.diit.unict.it> References: <4190E40C.6060508@csd.uu.se> <1100023901.2275.4.camel@csanto.diit.unict.it> Message-ID: On Tue, 9 Nov 2004, Corrado Santoro wrote: > On Tue, 2004-11-09 at 16:36, Richard Carlsson wrote: > > It has not been announced offically, but abstract (i.e., > > parameterized) modules were in fact included in R10. > > Go ahead and try them out! > Wow! A feature that someone (like) me expected to appear! > > But I think that something is still missing. I only took a brief look > at the paper, but it seems that inheritance is not yet supported. Do > you think that it could an interesting feature for Erlang? Maybe. Inheritance does not really become interesting until you start to make systematic use of plug-ins, and up until now, the framework for callback modules has been rather primitive (passing around plain module names), and not _that_ much used. It would not be hard to allow some form of 'extends' declaration in modules, and make the runtime system redirect calls to the parent module if the called function is not defined in the called module. If you want to experiment with this, you could easily do it by changing the default error handler module for a process, from the normal 'error_handler' to your own module, which would inspect the 'module_info()' of the called module, and redirect the call to the declared parent, if you had written '-extends(my_parent)'. (This would have a fairly large overhead, and I don't recommend it for serious work.) /Richard Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://user.it.uu.se/~richardc/ "Having users is like optimization: the wise course is to delay it." -- Paul Graham From csanto@REDACTED Wed Nov 10 15:33:45 2004 From: csanto@REDACTED (Corrado Santoro) Date: 10 Nov 2004 15:33:45 +0100 Subject: Modules Inheritance (was Re: Abstract modules - take 'em for a spin!) In-Reply-To: References: <4190E40C.6060508@csd.uu.se> <1100023901.2275.4.camel@csanto.diit.unict.it> Message-ID: <1100097224.2151.10.camel@csanto.diit.unict.it> On Wed, 2004-11-10 at 15:20, Richard Carlsson wrote: > Inheritance does not really become interesting until you > start to make systematic use of plug-ins, and up until now, the > framework for callback modules has been rather primitive (passing > around plain module names), and not _that_ much used. > > It would not be hard to allow some form of 'extends' declaration > in modules, and make the runtime system redirect calls to the parent > module if the called function is not defined in the called module. > > If you want to experiment with this, you could easily do it by > changing the default error handler module for a process, from the > normal 'error_handler' to your own module, which would inspect the > 'module_info()' of the called module, and redirect the call to the > declared parent, if you had written '-extends(my_parent)'. (This > would have a fairly large overhead, and I don't recommend it for > serious work.) Yes, very insteresting. I made something similar with my Erlang agent platform eXAT (see http://www.diit.unict.it/users/csanto/exat). I included a module able to support virtual inheritance in Erlang programs, but I used a 'call' function to perform method invocation. The function traverses the inheritance tree in order to find the declaration of the invoked method. Yes... it has a litte overhead :-))) Anyway, the one thing that I found very instering with such an approach is that you can perform method overriding by even re-defining a *single method clause*. This cannot be done by any O-O programming language and I think is very powerful. However, I didn't konw the 'error_handler' function, and I'll take a loot at the documentation in order to improve my 'object' module, even if a native mechanism is preferrable. Well, maybe in future OTP releases... Ciao, --Corrado -- ====================================================== Eng. Corrado Santoro, Ph.D. University of Catania - Engineering Faculty Department of Computer Science and Telecommunications Engineering Viale A. Doria, 6 - 95125 CATANIA (ITALY) Tel: +39 095 7382380 Fax: +39 095 7382397 +39 095 7382365 +39 095 7382364 EMail: csanto@REDACTED Personal Home Page: http://www.diit.unict.it/users/csanto NUXI Home Page: http://nuxi.iit.unict.it ====================================================== From heinrich@REDACTED Wed Nov 10 15:49:30 2004 From: heinrich@REDACTED (Heinrich Venter) Date: Wed, 10 Nov 2004 16:49:30 +0200 Subject: SNMP OTP-MIB error Message-ID: > Starting to use SNMP for the first time here, and I am a bit stumped > with this one. Just starte Mnesia and it works fine -]-[ Click here for more information. http://asp1.rocketseed.com/RocketSeed/mail/433a32353a3737313936393a33303639373a2d323a313831 Bought to you by Launchpad. http://asp1.rocketseed.com/RocketSeed/mail/433a32353a3737313936393a33303639373a2d323a313438 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MTk2LjMwLjc5LjE1NQ== Type: image/gif Size: 557 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: MTk2LjMwLjc5LjE1NQ== Type: image/gif Size: 16459 bytes Desc: not available URL: From vlad_dumitrescu@REDACTED Wed Nov 10 16:00:56 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 10 Nov 2004 16:00:56 +0100 Subject: Erlang/OTP R10B-1 is out References: Message-ID: Hi, Tried it on Windows, out of the box: (no error logger present) error: Error in process <0.1.0> with exit value: {badarg,[{erl_prim_loader,check_file_result,2},{init,get_boot,1},{init,get_boot, 2},{init,do_boot,3}]} {"init terminating in do_boot",{badarg,[{erl_prim_loader,check_file_result,2},{init,get_boot,1},{init, get_boot,2},{init,do_boot,3}]}} regards, Vlad From bjorn@REDACTED Wed Nov 10 16:18:09 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 10 Nov 2004 16:18:09 +0100 Subject: Erlang/OTP R10B-1 is out In-Reply-To: References: Message-ID: Which version of Windows? /Bj?rn "Vlad Dumitrescu" writes: > Hi, > > Tried it on Windows, out of the box: > > (no error logger present) error: Error in process <0.1.0> with exit value: > {badarg,[{erl_prim_loader,check_file_result,2},{init,get_boot,1},{init,get_boot, > 2},{init,do_boot,3}]} > > {"init terminating in > do_boot",{badarg,[{erl_prim_loader,check_file_result,2},{init,get_boot,1},{init, > get_boot,2},{init,do_boot,3}]}} > > regards, > Vlad > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From vlad_dumitrescu@REDACTED Wed Nov 10 17:52:17 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 10 Nov 2004 17:52:17 +0100 Subject: Erlang/OTP R10B-1 is out References: Message-ID: From: "Bjorn Gustavsson" > Which version of Windows? Both Win2k and WinXP SP2 Home, with all the latest patches. /Vlad From bjorn@REDACTED Wed Nov 10 18:18:30 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 10 Nov 2004 18:18:30 +0100 Subject: Erlang/OTP R10B-1 is out In-Reply-To: References: Message-ID: "Vlad Dumitrescu" writes: > From: "Bjorn Gustavsson" > > Which version of Windows? > > Both Win2k and WinXP SP2 Home, with all the latest patches. The same setup that I have tested on here. I'll test on my PC at home. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From vlad_dumitrescu@REDACTED Wed Nov 10 20:22:29 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 10 Nov 2004 20:22:29 +0100 Subject: Erlang/OTP R10B-1 is out References: Message-ID: ----- Original Message ----- From: "Bjorn Gustavsson" > The same setup that I have tested on here. I'll test on my > PC at home. BTW I tried to compile from sources, and building with "./otp_build boot" works fine (and the result is runnable too), but when trying "./otp_build boot -a" I get after a while === Entering application ssl make[3]: Entering directory `/home/Vlad/otp_src_R10B-1/lib/ssl/pkix' cp -p PKIX1Explicit88.hrl PKIX1Implicit88.hrl PKIX1Algorithms88.hrl PKIXAttributeCertificate.hrl SSL-PKIX.hrl ../include cp -p PKIX1Explicit88.hrl PKIX1Implicit88.hrl PKIX1Algorithms88.hrl PKIXAttributeCertificate.hrl SSL-PKIX.hrl ../include cp -p PKIX1Explicit88.hrl PKIX1Implicit88.hrl PKIX1Algorithms88.hrl PKIXAttributeCertificate.hrl SSL-PKIX.hrl ../include cp -p PKIX1Explicit88.hrl PKIX1Implicit88.hrl PKIX1Algorithms88.hrl PKIXAttributeCertificate.hrl SSL-PKIX.hrl ../include cp -p PKIX1Explicit88.hrl PKIX1Implicit88.hrl PKIX1Algorithms88.hrl PKIXAttributeCertificate.hrl SSL-PKIX.hrl ../include make[3]: Leaving directory `/home/Vlad/otp_src_R10B-1/lib/ssl/pkix' make[3]: Entering directory `/home/Vlad/otp_src_R10B-1/lib/ssl/src' make[3]: Nothing to be done for `opt'. make[3]: Leaving directory `/home/Vlad/otp_src_R10B-1/lib/ssl/src' make[3]: Entering directory `/home/Vlad/otp_src_R10B-1/lib/ssl/c_src' make -f win32/Makefile TYPE=opt make[4]: Entering directory `/home/Vlad/otp_src_R10B-1/lib/ssl/c_src' make[4]: Nothing to be done for `debug'. make[4]: Leaving directory `/home/Vlad/otp_src_R10B-1/lib/ssl/c_src' make[3]: Leaving directory `/home/Vlad/otp_src_R10B-1/lib/ssl/c_src' === Skipping subdir doc/src, it is missing make[3]: Entering directory `/home/Vlad/otp_src_R10B-1/lib/ssl/examples/certs' make -f win32/Makefile TYPE=opt make[4]: Entering directory `/home/Vlad/otp_src_R10B-1/lib/ssl/examples/certs' erl -noinput -pa ebin -run make_certs all /c/program/OpenSSL/bin/openssl \ -s erlang halt make[4]: *** [done] Error 1 make[4]: Leaving directory `/home/Vlad/otp_src_R10B-1/lib/ssl/examples/certs' make[3]: *** [opt] Error 2 make[3]: Leaving directory `/home/Vlad/otp_src_R10B-1/lib/ssl/examples/certs' make[2]: *** [opt] Error 2 make[2]: Leaving directory `/home/Vlad/otp_src_R10B-1/lib/ssl' make[1]: *** [opt] Error 2 make[1]: Leaving directory `/home/Vlad/otp_src_R10B-1/lib' make: *** [libs] Error 2 R10B-0 compiles fine in the same environment. regards, Vlad From vlad_dumitrescu@REDACTED Wed Nov 10 20:35:23 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 10 Nov 2004 20:35:23 +0100 Subject: Erlang/OTP R10B-1 is out References: Message-ID: Me again :-) It seems that (again under Windows) the new -remsh feature doesn't work with erl, but only with werl. Erl does something for a couple of seconds, then displays a local console. under Linux it works as advertised. regards, Vlad From bjorn@REDACTED Thu Nov 11 07:12:09 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 11 Nov 2004 07:12:09 +0100 Subject: Problem running on Windows In-Reply-To: References: Message-ID: We have located the problem. Starting the emulator will fail if you install in a directory with a short name, such as C:\Program\erl5.4.2 Installing in a directory with a longer name works; for instance C:\Program Files\erl5.4.2 works fine. /Bj?rn "Vlad Dumitrescu" writes: > Hi, > > Tried it on Windows, out of the box: > > (no error logger present) error: Error in process <0.1.0> with exit value: > {badarg,[{erl_prim_loader,check_file_result,2},{init,get_boot,1},{init,get_boot, > 2},{init,do_boot,3}]} > > {"init terminating in > do_boot",{badarg,[{erl_prim_loader,check_file_result,2},{init,get_boot,1},{init, > get_boot,2},{init,do_boot,3}]}} > > regards, > Vlad > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From vlad_dumitrescu@REDACTED Thu Nov 11 09:14:45 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Thu, 11 Nov 2004 09:14:45 +0100 Subject: Problem running on Windows References: Message-ID: From: "Bjorn Gustavsson" > Starting the emulator will fail if you install in a directory > with a short name, such as > C:\Program\erl5.4.2 > Installing in a directory with a longer name works; for instance > C:\Program Files\erl5.4.2 > works fine. Yes, it works now. Thanks! For reference, it's not enough to copy from C:\Program\erl5.4.2 to C:\Program Files\erl5.4.2 after the installation, but one needs to reinstall from scratch. regards, Vlad From svg@REDACTED Thu Nov 11 18:22:30 2004 From: svg@REDACTED (Vladimir Sekissov) Date: Thu, 11 Nov 2004 22:22:30 +0500 (YEKT) Subject: Yet another tip of the day In-Reply-To: <4190FC25.8060108@csd.uu.se> References: <37FB7AA6F5F9814FB634A7BF4C35A6F5402940@ESEALNT442.al.sw.ericsson.se> <4190FC25.8060108@csd.uu.se> Message-ID: <20041111.222230.74748249.svg@surnet.ru> Good day, I've added this code to my _user_default.erl_ when slightly tired to load every recompiled module manually. Now I can do after _make_ finished: 48> mm(). [user_default, tacacs_tests] 49> [l(M) || M <- mm()]. [{module,user_default},{module,tacacs_tests}] 50> mm(). [] ---------------------------- code ---------------------------- mm() -> modified_modules(). modified_modules() -> [M || {M, _} <- code:all_loaded(), module_modified(M) == true]. module_modified(Module) -> case code:is_loaded(Module) of {file, preloaded} -> false; {file, Path} -> CompileOpts = proplists:get_value(compile, Module:module_info()), CompileTime = proplists:get_value(time, CompileOpts), Src = proplists:get_value(source, CompileOpts), module_modified(Path, CompileTime, Src); _ -> false end. module_modified(Path, PrevCompileTime, PrevSrc) -> case find_module_file(Path) of false -> false; ModPath -> {ok, {_, [{_, CB}]}} = beam_lib:chunks(ModPath, ["CInf"]), CompileOpts = binary_to_term(CB), CompileTime = proplists:get_value(time, CompileOpts), Src = proplists:get_value(source, CompileOpts), not (CompileTime == PrevCompileTime) and (Src == PrevSrc) end. find_module_file(Path) -> case file:read_file_info(Path) of {ok, _} -> Path; _ -> %% may be the path was changed? case code:where_is_file(filename:basename(Path)) of non_existing -> false; NewPath -> NewPath end end. --- Best Regards, Vladimir Sekissov From bjorn@REDACTED Fri Nov 12 06:32:08 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 12 Nov 2004 06:32:08 +0100 Subject: Yet another tip of the day In-Reply-To: <20041111.222230.74748249.svg@surnet.ru> References: <37FB7AA6F5F9814FB634A7BF4C35A6F5402940@ESEALNT442.al.sw.ericsson.se> <4190FC25.8060108@csd.uu.se> <20041111.222230.74748249.svg@surnet.ru> Message-ID: Excellent idea! Very useful. To my user_default.erl, I also added: lm() -> [c:l(M) || M <- mm()]. /Bjorn Vladimir Sekissov writes: > Good day, > > I've added this code to my _user_default.erl_ when slightly tired to > load every recompiled module manually. > > Now I can do after _make_ finished: > > 48> mm(). > [user_default, tacacs_tests] > > 49> [l(M) || M <- mm()]. > [{module,user_default},{module,tacacs_tests}] > > 50> mm(). > [] > > ---------------------------- code ---------------------------- > mm() -> > modified_modules(). > > modified_modules() -> > [M || {M, _} <- code:all_loaded(), module_modified(M) == true]. > > module_modified(Module) -> > case code:is_loaded(Module) of > {file, preloaded} -> > false; > {file, Path} -> > CompileOpts = proplists:get_value(compile, Module:module_info()), > CompileTime = proplists:get_value(time, CompileOpts), > Src = proplists:get_value(source, CompileOpts), > module_modified(Path, CompileTime, Src); > _ -> > false > end. > > module_modified(Path, PrevCompileTime, PrevSrc) -> > case find_module_file(Path) of > false -> > false; > ModPath -> > {ok, {_, [{_, CB}]}} = beam_lib:chunks(ModPath, ["CInf"]), > CompileOpts = binary_to_term(CB), > CompileTime = proplists:get_value(time, CompileOpts), > Src = proplists:get_value(source, CompileOpts), > not (CompileTime == PrevCompileTime) and (Src == PrevSrc) > end. > > find_module_file(Path) -> > case file:read_file_info(Path) of > {ok, _} -> > Path; > _ -> > %% may be the path was changed? > case code:where_is_file(filename:basename(Path)) of > non_existing -> > false; > NewPath -> > NewPath > end > end. > > --- > Best Regards, > Vladimir Sekissov > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From samuel@REDACTED Fri Nov 12 08:43:05 2004 From: samuel@REDACTED (Samuel Rivas) Date: Fri, 12 Nov 2004 08:43:05 +0100 Subject: Yet another tip of the day In-Reply-To: <20041111.222230.74748249.svg@surnet.ru> References: <37FB7AA6F5F9814FB634A7BF4C35A6F5402940@ESEALNT442.al.sw.ericsson.se> <4190FC25.8060108@csd.uu.se> <20041111.222230.74748249.svg@surnet.ru> Message-ID: <20041112074305.GA17759@crusher.lfcia.pri> Vladimir Sekissov wrote: > I've added this code to my _user_default.erl_ when slightly tired to > load every recompiled module manually. > [...] If you used the erlang make you would be able to do make:all([load]). I actually have a function called make/0 in my user_default to do that. -- Samuel From bjorn@REDACTED Fri Nov 12 10:51:17 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 12 Nov 2004 10:51:17 +0100 Subject: Erlang/OTP R10B-1a is out Message-ID: Bug fix release : otp_src_R10B-1a Build from snapshot : 2004-11-11 The R10B-1a releases fixes a problem on Windows that the emulator could not be started if Erlang/OTP was installed in a directory with a short name, such as C:\Program\erl5.4.2 This is a bug fix release 1a for the R10B release. You can download the full source distribution from http://www.erlang.org/download/otp_src_R10B-1a.tar.gz http://www.erlang.org/download/otp_src_R10B-1a.readme (this file) Note: To unpack the TAR archive you need a GNU TAR compatible program. For instance, on MacOS X you need to use the 'gnutar' command; you can't use the 'tar' command or StuffIt to unpack the sources. For installation instructions please read the README that is part of the distribution. The Windows binary distribution can be downloaded from http://www.erlang.org/download/otp_win32_R10B-1a.exe The documentation at http://www.erlang.org will be updated. You can also download the complete HTML documentation or the Unix manual files http://www.erlang.org/download/otp_doc_html_R10B-1a.tar.gz http://www.erlang.org/download/otp_doc_man_R10B-1a.tar.gz For some OTP applications there are more detailed release notes in the HTML documentation. We also want to thank those that sent us patches, suggestions and bug reports, The OTP Team --- compiler -------------------------------------------------------- OTP-5198 A few minor issues code generation issues were corrected. Although the generated code was correct, it was slightly slower and larger than it needed to be. A debug printout (that could be seen in rare circumstances) has been removed. not record_test(not_a_tuple, RecordTag) and similar expressions in a guard would fail. New options basic_validation and strong_validation to do a quick check of the code of a module. (Mainly useful for code generators.) The inline option was not recognized if it appeared in a -compile() directive inside the module. Corrected some bugs in the undocumented feature "parameterized modules". OTP-5224 When the undocumented feature "parameterized modules" was used, the ?MODULE macro did not work correctly. --- erts ------------------------------------------------------------ OTP-5203 The ethread library was unnecessarily rebuilt multiple times during the build process, also a debug version of the library was build during the install phase. These unnecessary builds have now been removed. Note, the content of the installed Erlang/OTP system is not effected at all by this change. OTP-5211 The emulator could fail to clear the memory segment cache. This could potentially cause memory allocation to unnecessarily fail when memory usage was close to its maximum. This bug has now been fixed. OTP-5216 std_alloc (std short for standard) was sometimes called def_alloc (def short for default). std_alloc is now everywhere refered to as std_alloc. OTP-5217 A documentation bug has been corrected in the erts_alloc(3) documentation. It was stated that some of the memory allocators present were by default disabled. This is true for Erlang/OTP R9C, but is not true for Erlang/OTP R10B. In R10B all memory allocators present are enabled by default. OTP-5221 The emulator now closes all open files and sockets immediately after receiving an USR1 signal. This causes the emulator to unregister at epmd as early as possible. OTP-5229 Try/catch support in the emulator slightly updated. OTP-5209 If one used select/3 and select/1 on a non-fixed table and deleted objects simultaneously, the emulator could crash. Note that the result of such simultaneous operations on tables that are not in a fixed state is still undefined, but the emulator crash is, needless to say, fixed. OTP-5233 Arithmetic with big numbers could crash the emulator. The HiPE native code compiler and run-time code in the emulator has been updated. (Note: Native code is still not supported.) Eliminated a few bugs that could crash the hybrid emulator (which is not supported). OTP-5210, You can now start Erlang with the -remsh flag which gives you a OTP-5248 remote initial shell instead of a local one. Example: erl -sname this_node -remsh other_node@REDACTED --- hipe ------------------------------------------------------------ OTP-5233 The HiPE native code compiler and run-time code in the emulator has been updated. (Note: Native code is still not supported.) Eliminated a few bugs that could crash the hybrid emulator (which is not supported). --- kernel ------------------------------------------------------------ OTP-5208 The documentation for the auth:open/1 function which no longer exists has been removed. (Thanks to Miguel Barreiro.) OTP-5212 If /etc/hosts specified two hosts with the same IP address (on separate lines), only the last host would be registered by inet_db during inet configuration. This has been corrected now so that both aliases are registered with the same IP address. OTP-5214 The top level group leader used to be listed as job #1 in the job list in JCL mode. Since there is no shell associated with this process that can be connected to, it will no longer be listed. OTP-5218 The possibility to start the erlang shell in parallell with the rest of the system has been reintroduced for backwards compatibility. Note that this old behaviour is error prone and should not be used unless for some reason necessary. OTP-5222 The documentation for BIFs that take I/O lists have been clarified. Those are list_to_binary/1, port_command/2, port_control/3. Documentation for all is_* BIFs (such as is_atom/1) has been added. Removed the documentation for erlang:float_to_binary/2 which was removed from the run-time system several releases ago. OTP-5226 The shell commands rr/1,2,3 now accepts wildcards when reading record definitions from BEAM files. OTP-5227 Corrected the crc32/3 function in the undocumented and unsupported zlib module. --- megaco ------------------------------------------------------------ OTP-5193 Minor error handling improvement to the text encoder. OTP-5186 The megaco text codec failed to properly encode a message containing no or an empty terminationAudit list or possibly a terminationAudit list with only an "empty" emptyDescriptor (e.g. an AuditDescriptor without any values; auditToken is either asn1_NOVALUE or []). This effected AmmsReply and auditOther (AuditResult) and both v1 and v2. OTP-5201 Version 2 codec corrections: Incorrectly transformed (encoded and decoded) IndAudStreamDescriptor (binary), encoded IndAudMediaDescriptor and IndAudStreamDescriptor (text). Incorrectly decoded IndAudMediaDescriptor (text). --- pman ------------------------------------------------------------ OTP-5191 The pman 'trace shell' functionality was broken as has now been fixed. Furthermore, pman could not correctly find the pid of the active shell if more than one shell process was running on the node. This has also been corrected. --- snmp ------------------------------------------------------------ OTP-5187 [agent] Added functions to get a list of all mibs loaded into an agent (see snmpa:which_mibs) and to get the (full path) file name of a loaded mib (see snmpa:whereis_mib). OTP-5196 [manager] The wrong default value (1024) was used for the net-if option recbuf. If no value is specified, then the OS default shall be used. Improvements and new features: OTP-5242 [manager] When the net_if process failed to send a message, for whatever reason, this is just dropped. And the user is "left hanging". Now, if the request is syncroneous, it will return with a proper reason (see snmpm:g, snmpm:gn and snmpm:s), and if the request was asynchroneous, the new callback function, handle_error (see snmpm_user) is called. Reported Fixed Bugs and Malfunctions: OTP-5225 [manager] The arguments CtxName and Port was swapped in the function snmpm:g/6. OTP-5241 [manager] TRAP receive failes for unknown agent due to failing message size calculation. Incompatibilities: OTP-5242 [manager] Introduced a new callback function in the behaviour snmpm_user. --- stdlib ------------------------------------------------------------ OTP-5213 The man page for the lists module has been updated with decscription of the new zip, unzip, and partition/2 functions (introduced in R10B-1). OTP-5214 The top level group leader used to be listed as job #1 in the job list in JCL mode. Since there is no shell associated with this process that can be connected to, it will no longer be listed. OTP-5218 The possibility to start the erlang shell in parallell with the rest of the system has been reintroduced for backwards compatibility. Note that this old behaviour is error prone and should not be used unless for some reason necessary. OTP-5226 The shell commands rr/1,2,3 now accepts wildcards when reading record definitions from BEAM files. OTP-5209 If one used select/3 and select/1 on a non-fixed table and deleted objects simultaneously, the emulator could crash. Note that the result of such simultaneous operations on tables that are not in a fixed state is still undefined, but the emulator crash is, needless to say, fixed. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From ulf.wiger@REDACTED Fri Nov 12 11:32:01 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 12 Nov 2004 11:32:01 +0100 Subject: Yet another tip of the day Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F5402944@ESEALNT442.al.sw.ericsson.se> Boy, this made me jump a bit. (: I obviously don't keep up with RFCs as well as I should. In my mind, TACACS has always stood for Tactical Air Command Access Control System, as described e.g. at http://neil.franklin.ch/Usenet/alt.folklore.computers/19980124_How_Jerry_Pournelle_was_kicked_off_the_Arapanet "TACACS is a login system based on encrpytion codes recorded on little paper cards which authorized MILNET TAC users are being issued. To be a MILNET TAC user, you must have a personal TACACS account and be issued one of these cards, so that you can type your login code to the TAC and make it happy. People establish TACACS accounts and get cards by contacting me to get registered." A Russian using Erlang to try to hack into TACACS, and flaunting it on a public discussion list? What's the world coming to, I thought. Now, I understand that for most of the world, TACACS stands for Terminal Access Controller Access Control System (RFC 1492). I sincerely hope that's the TACACS you're playing with. (: (: /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of > Vladimir Sekissov > Sent: den 11 november 2004 18:23 > To: erlang-questions@REDACTED > Subject: Yet another tip of the day > > > Good day, > > I've added this code to my _user_default.erl_ when slightly tired to > load every recompiled module manually. > > Now I can do after _make_ finished: > > 48> mm(). > [user_default, tacacs_tests] > > 49> [l(M) || M <- mm()]. > [{module,user_default},{module,tacacs_tests}] > > 50> mm(). > [] > > ---------------------------- code ---------------------------- > mm() -> > modified_modules(). > > modified_modules() -> > [M || {M, _} <- code:all_loaded(), module_modified(M) == true]. > > module_modified(Module) -> > case code:is_loaded(Module) of > {file, preloaded} -> > false; > {file, Path} -> > CompileOpts = proplists:get_value(compile, > Module:module_info()), > CompileTime = proplists:get_value(time, CompileOpts), > Src = proplists:get_value(source, CompileOpts), > module_modified(Path, CompileTime, Src); > _ -> > false > end. > > module_modified(Path, PrevCompileTime, PrevSrc) -> > case find_module_file(Path) of > false -> > false; > ModPath -> > {ok, {_, [{_, CB}]}} = beam_lib:chunks(ModPath, ["CInf"]), > CompileOpts = binary_to_term(CB), > CompileTime = proplists:get_value(time, CompileOpts), > Src = proplists:get_value(source, CompileOpts), > not (CompileTime == PrevCompileTime) and (Src == PrevSrc) > end. > > find_module_file(Path) -> > case file:read_file_info(Path) of > {ok, _} -> > Path; > _ -> > %% may be the path was changed? > case code:where_is_file(filename:basename(Path)) of > non_existing -> > false; > NewPath -> > NewPath > end > end. > > --- > Best Regards, > Vladimir Sekissov > From joe@REDACTED Fri Nov 12 14:21:13 2004 From: joe@REDACTED (Joe Armstrong) Date: Fri, 12 Nov 2004 14:21:13 +0100 (CET) Subject: Tip of the day Message-ID: Yikes: Put This in your .emacs file ; Enabling time-stamp will update a time-stamp line every time you ; save a buffer. The time-stamp string must be either: ; Time-stamp: <2004-11-12 14:20:49 joe>; ; and it must occur within the first 8 lines of the buffer. (if (not (memq 'time-stamp write-file-hooks)) (setq write-file-hooks (cons 'time-stamp write-file-hooks))) (setq time-stamp-active t) Then put this in somewhere in the first 8 lines of of your Erlang code (or any other file for that matter) %% Time-stamp: <> When you save the file the <> will be updated with a time stamp. Very nice /Joe Uummm. ( I quite often manually change time stamps in files.) Say I do this in ten files/day and it takes ten seconds per file this is a saving of 100 seconds/day - If I program for 300 days of the year this is 30000 seconds/year = 8.3 hours/year If I program for 55 years = 19 days/lifetime. Wow From kostis@REDACTED Fri Nov 12 18:57:55 2004 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 12 Nov 2004 18:57:55 +0100 (MET) Subject: New Dialyzer release Message-ID: <200411121757.iACHvtpH029498@spikklubban.it.uu.se> We are very proud to announce the release of Dialyzer v1.1.0, which can be downloaded from: http://www.it.uu.se/research/group/hipe/dialyzer/ Notable features of this release of the Dialyzer tool are: 1. Dialyzer works with Erlang/OTP **R10B-1** (on platforms where HiPE support is available) and it does not require an installation of a separate Erlang/OTP system. 2. Dialyzer now has a command-line interface, in addition to an enhanced GUI. 3. Analysis also starts from source as well as from bytecode. 4. Dialyzer v1.1.0 finds considerably more discrepancies in Erlang code than Dialyzer v1.0.* Enjoy! Kostis Sagonas and Tobias Lindahl. From luke@REDACTED Fri Nov 12 23:00:00 2004 From: luke@REDACTED (Luke Gorrie) Date: 12 Nov 2004 23:00:00 +0100 Subject: Tip of the day References: Message-ID: Joe Armstrong writes: > Put This in your .emacs file Another nice command is for signing comments with a timestamp: (defun sign-comment () "Insert a timestamped signature (for comments)." (interactive) (push-mark) (insert (concat "-" (user-login-name) (format-time-string " (%d/%b/%Y)")))) When I run the command it inserts "-luke (13/Nov/2004)", which is nice after a comment about something "temporary." From richardc@REDACTED Sun Nov 14 16:54:39 2004 From: richardc@REDACTED (Richard Carlsson) Date: Sun, 14 Nov 2004 16:54:39 +0100 Subject: Compiler crash using abstract modules In-Reply-To: <4196E373.9060700@cisco.com> References: <4190E40C.6060508@csd.uu.se> <4196E373.9060700@cisco.com> Message-ID: <41977FBF.5010703@csd.uu.se> Mark Scandariato wrote: > Compiling: > > -module(foo, [A]). > -export([bar/1]). > -record(s, {a}). > bar(S) when S#s.a == 0 -> any_term. > > Produces: > > 4> c(foo). > ./foo.erl:none: internal error in expand_module; > crash reason: {function_clause,[{sys_expand_pmod, There had been some code rot in the expansion module, due to changes in other parts of the compiler. The attached file (lib/compiler/src/sys_expand_pmod.erl) should fix this, as well as some other problems I found when going over the code. /Richard -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sys_expand_pmod.erl URL: From richardc@REDACTED Mon Nov 15 07:43:19 2004 From: richardc@REDACTED (Richard Carlsson) Date: Mon, 15 Nov 2004 07:43:19 +0100 Subject: Compiler crash using abstract modules In-Reply-To: <4197BDA1.60504@cisco.com> References: <4190E40C.6060508@csd.uu.se> <4196E373.9060700@cisco.com> <41977FBF.5010703@csd.uu.se> <4197BDA1.60504@cisco.com> Message-ID: <41985007.2000601@csd.uu.se> Mark Scandariato wrote: > New problem: is_record(X, record) in a guard. > > bar(S) when is_record(S, s) -> any_term. Apply the attached patch to the previously posted sys_expand_pmod.erl. /Richard -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff URL: From mpquique@REDACTED Mon Nov 15 22:33:04 2004 From: mpquique@REDACTED (Enrique Marcote =?iso-8859-1?q?Pe=F1a?=) Date: Mon, 15 Nov 2004 22:33:04 +0100 Subject: JMS <--> erlang Message-ID: <200411152233.05083.mpquique@udc.es> Hi, We are thinking about using JMS for communicating an erlang application with J2ME clients. Do you find it doable? Like/dislike the idea. Better alternatives? XMPP? I'd appreciate a lot to to hear your opinions, guidelines... Is anyone working on something like this? Thank you very much. Best regards, -- Quique http://www.des.udc.es/~mpquique/ From mickael.remond@REDACTED Mon Nov 15 23:04:08 2004 From: mickael.remond@REDACTED (Mickael Remond) Date: Mon, 15 Nov 2004 23:04:08 +0100 Subject: Aegis Erlang example project Message-ID: <419927D8.8060708@erlang-fr.org> Hello, For those interested in Aegis for software change and configuration management, I have made a small example project that show how aegis can be use to develop Erlang software. More information on the Aegis Erlang example project at: http://www.erlang-projects.org/Public/news/aegis_erlang_example/view Aegis website is at: http://aegis.sourceforge.net/ From the website: Aegis is a transaction-based software configuration management system. It provides a framework within which a team of developers may work on many changes to a program independently, and Aegis coordinates integrating these changes back into the master source of the program, with as little disruption as possible. Cheers, -- Micka?l R?mond http://www.erlang-projects.org/ From mickael.remond@REDACTED Mon Nov 15 23:08:03 2004 From: mickael.remond@REDACTED (Mickael Remond) Date: Mon, 15 Nov 2004 23:08:03 +0100 Subject: JMS <--> erlang In-Reply-To: <200411152233.05083.mpquique@udc.es> References: <200411152233.05083.mpquique@udc.es> Message-ID: <419928C3.3080206@erlang-fr.org> Enrique Marcote Pe?a wrote: > Hi, > > We are thinking about using JMS for communicating an erlang application with > J2ME clients. Do you find it doable? Like/dislike the idea. Better > alternatives? XMPP? I never liked the JMS protocol as being defined as a Java based protocol with all other languages being "second class citizen". XMPP could be a good bet. Another option could be to have a dedicated server acting as a router of regarding messages sent as UBF, ASN.1, XML-RPC messages. Maybe if you could tell us a bit more about what your are trying to do we could provide more contextuals advices. I hope this helps, however. -- Micka?l R?mond http://www.erlang-projects.org/ From mpquique@REDACTED Tue Nov 16 01:11:27 2004 From: mpquique@REDACTED (Enrique Marcote =?iso-8859-1?q?Pe=F1a?=) Date: Tue, 16 Nov 2004 01:11:27 +0100 Subject: JMS <--> erlang In-Reply-To: <419928C3.3080206@erlang-fr.org> References: <200411152233.05083.mpquique@udc.es> <419928C3.3080206@erlang-fr.org> Message-ID: <200411160111.27833.mpquique@udc.es> On Monday 15 November 2004 23:08, Mickael Remond wrote: > Enrique Marcote Pe?a wrote: > > Hi, > > > > We are thinking about using JMS for communicating an erlang application > > with J2ME clients. Do you find it doable? Like/dislike the idea. Better > > alternatives? XMPP? > > I never liked the JMS protocol as being defined as a Java based protocol > with all other languages being "second class citizen". > I knew it Micka?l, I saw your "Use XMPP!" post while doing some googling :-) > XMPP could be a good bet. Another option could be to have a dedicated > server acting as a router of regarding messages sent as UBF, ASN.1, > XML-RPC messages. > > Maybe if you could tell us a bit more about what your are trying to do > we could provide more contextuals advices. > We'll need to send (push) around 20000 messages per day (100 bytes each) from an erlang based system to J2ME devices. Messages must be acknowledged and responded back from the handsets, thus communication occurs in both directions. We also need to be able to broadcast a message to a group of handsets. We'll be developing the J2ME clients too. We are planning to use GPRS for communications, since SMS would be too expensive. Which MOM shall we use? A priori we don't have any restrictions... but the development time, of course. > I hope this helps, however. Thanks a lot. Best regards, -- Quique http://www.des.udc.es/~mpquique/ From valentin@REDACTED Wed Nov 17 02:06:30 2004 From: valentin@REDACTED (Valentin Micic) Date: Wed, 17 Nov 2004 03:06:30 +0200 Subject: JMS <--> erlang References: <200411152233.05083.mpquique@udc.es> <419928C3.3080206@erlang-fr.org> <200411160111.27833.mpquique@udc.es> Message-ID: <017501c4cc41$acc5a0f0$0100a8c0@MONEYMAKER2> > We are planning to use GPRS for communications, since SMS would be too expensive. Why not USSD? Valentin. From A.BETIS@REDACTED Wed Nov 17 12:46:44 2004 From: A.BETIS@REDACTED (BETIS Alexandre) Date: Wed, 17 Nov 2004 12:46:44 +0100 Subject: Yet another dumb test_server question Message-ID: Hi, Still using the test_server, I have been trying lately to use the debugger in the middle of a test case. To do this, I intended to - break the test case using ?t:break("DEBUG TIME!") - launch the debugger, interpret the applicative modules (ii(my_module)) - resume debugger and step through the scenario Problem is that the module interpretation fails and crashes the ts-spawned terminal completely. It is complaining about hipe_bifs being called from the code server... I suspect something about the paths used by the ts for loading code. I have tried starting the app (application:start()) manually, the interpretation works ok... I have tried changing the working dir from the ts terminal, also... Has anyone encountered this problem before? Thanks, -- Alex " Ce message et ses pi?ces jointes sont confidentiels et exclusivement r?serv?s ? leurs destinataires qui s'assureront de l'absence de virus. CSEE Transport n'assume aucune responsabilit? au titre de ce message s'il est alt?r?, d?form?, falsifi?, ind?ment utilis? par des tiers ou encore s'il a caus? des dommages ou pertes de toute nature. This e-mail and any attached files are confidential and exclusively intended for its addressees who will conduct appropriate virus checks. CSEE Transport shall not be liable for the message if altered, changed, falsified, unduly used by third parties nor for any damage or loss." From kramer@REDACTED Wed Nov 17 22:20:40 2004 From: kramer@REDACTED (Reto Kramer) Date: Wed, 17 Nov 2004 13:20:40 -0800 Subject: crypto and ssl modules under OSX Message-ID: <88694DF8-38DE-11D9-8EBC-000393B64312@acm.org> I'm trying to build the R9C-2 ssl and crypto under OSX 10.3.4. Can some BSD/Mac guru out there help me figure out how to change the ld switches (under OSX, the R option of the -Wl switch is not available). Thanks, - Reto from: otp_src_R9C-2/otp_src_R9C-2/lib/crypto/c_src/Makefile.in $(LIBDIR)/crypto_drv.so: $(OBJS) $(INSTALL_DIR) $(LIBDIR) $(CC) $(LDFLAGS) -L$(SSL_LIBDIR) -Wl,-R$(SSL_LIBDIR) \ -o $@ $^ $(LDLIBS) -lcrypto === Entering application crypto make[3]: Nothing to be done for `opt'. make -f powerpc-apple-darwin7.5.0/Makefile TYPE=opt /usr/bin/install -c -d ../priv/lib/powerpc-apple-darwin7.5.0 gcc -bundle -flat_namespace -undefined suppress -lbundle1.o -L/usr/lib -Wl,-R/usr/lib \ -o ../priv/lib/powerpc-apple-darwin7.5.0/crypto_drv.so ../priv/obj/powerpc-apple-darwin7.5.0/crypto_drv.o -lcrypto ld: unknown flag: -R/usr/lib === Skipping subdir doc/src, it is missing === Leaving application crypto # From mpquique@REDACTED Wed Nov 17 23:07:03 2004 From: mpquique@REDACTED (Enrique Marcote =?iso-8859-1?q?Pe=F1a?=) Date: Wed, 17 Nov 2004 23:07:03 +0100 Subject: JMS <--> erlang In-Reply-To: <017501c4cc41$acc5a0f0$0100a8c0@MONEYMAKER2> References: <200411152233.05083.mpquique@udc.es> <200411160111.27833.mpquique@udc.es> <017501c4cc41$acc5a0f0$0100a8c0@MONEYMAKER2> Message-ID: <200411172307.03092.mpquique@udc.es> On Wednesday 17 November 2004 02:06, Valentin Micic wrote: > > We are planning to use GPRS for communications, since SMS would be too > > expensive. > > Why not USSD? > > Valentin. Mmm. You think It could be cheaper than GPRS? Wouldn't it be closer to SMS cost? When we discarded SMS, we started to focus on GPRS and didn't even think about USSD. Thank you. I will consider it. Best regards, -- Quique http://www.des.udc.es/~mpquique/ From mrrubinos@REDACTED Thu Nov 18 10:22:42 2004 From: mrrubinos@REDACTED (Miguel Rodríguez Rubinos) Date: Thu, 18 Nov 2004 02:22:42 -0700 Subject: Crypto: 3DES CBC mode Message-ID: <20041118092242.C0F803804A@spy23.spymac.net> Hi all, I'm working with Crypto module and I have a question I can't find in documentation. In DES3 CBC mode, what's the block size? In the other side of communication some people working with Java told me they worked with 1024 block size and I don't know what's the size of block that I'm using. I hope this wasn't a dumb question. Thanks in advance, Miguel ________________________________________________ Miguel Rodr?guez Rubinos NomaSystems Edificio de Servicios Generales de Investigaci?n Campus de Elvi?a s/n 15071 A Coru?a Spain http://www.nomasystems.com ________________________________________________ From goran.bage@REDACTED Thu Nov 18 10:28:37 2004 From: goran.bage@REDACTED (Goran Bage) Date: Thu, 18 Nov 2004 10:28:37 +0100 Subject: Unused index in mnesia table Message-ID: <419C6B45.7090503@mobilearts.se> Hello, We found a problem with mnesia tables with an index that is unused. Loading a moderately sized table (40.000 entries) took forever (5-10 min). It turns out that the loading time grows fast with the table size (quadratic?) if an index is unused. To check it out I wrote the attached module and tested loading tables of different sizes, this is what I got just running each case once. N Time 100 6 1000 62 10000 9878 20000 49939 50000 328575 Removing the unused index solved the problem. The reason I added an unused index was that we will use it later on, so that is what you get for trying to think ahead :-) -- -- Goran ------------------------- May the Snow be with you ---- Goran Bage, MobileArts, www.mobilearts.se Tj?rhovsgatan 56, SE-116 28 Stockholm, Sweden email:goran.bage@REDACTED, phone: +46 733 358405 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: mtest.erl URL: From peter@REDACTED Thu Nov 18 12:34:51 2004 From: peter@REDACTED (Peter H|gfeldt) Date: Thu, 18 Nov 2004 12:34:51 +0100 (MET) Subject: crypto and ssl modules under OSX In-Reply-To: <88694DF8-38DE-11D9-8EBC-000393B64312@acm.org> Message-ID: Just remove the -R switch from the Makefile. In R10B the -R switch is not included for OSX (or is it called Darwin?). /Peter On Wed, 17 Nov 2004, Reto Kramer wrote: > I'm trying to build the R9C-2 ssl and crypto under OSX 10.3.4. Can some > BSD/Mac guru out there help me figure out how to change the ld switches > (under OSX, the R option of the -Wl switch is not available). > > Thanks, > - Reto > > from: otp_src_R9C-2/otp_src_R9C-2/lib/crypto/c_src/Makefile.in > > $(LIBDIR)/crypto_drv.so: $(OBJS) > $(INSTALL_DIR) $(LIBDIR) > $(CC) $(LDFLAGS) -L$(SSL_LIBDIR) -Wl,-R$(SSL_LIBDIR) \ > -o $@ $^ $(LDLIBS) -lcrypto > > > === Entering application crypto > make[3]: Nothing to be done for `opt'. > make -f powerpc-apple-darwin7.5.0/Makefile TYPE=opt > /usr/bin/install -c -d ../priv/lib/powerpc-apple-darwin7.5.0 > gcc -bundle -flat_namespace -undefined suppress -lbundle1.o -L/usr/lib > -Wl,-R/usr/lib \ > -o ../priv/lib/powerpc-apple-darwin7.5.0/crypto_drv.so > ../priv/obj/powerpc-apple-darwin7.5.0/crypto_drv.o -lcrypto > ld: unknown flag: -R/usr/lib > === Skipping subdir doc/src, it is missing > === Leaving application crypto > > # > From peter@REDACTED Thu Nov 18 12:46:45 2004 From: peter@REDACTED (Peter H|gfeldt) Date: Thu, 18 Nov 2004 12:46:45 +0100 (MET) Subject: Crypto: 3DES CBC mode In-Reply-To: <20041118092242.C0F803804A@spy23.spymac.net> Message-ID: Hi, The block size of DES is 64 bits. See also the crypto(3) manual page and http://csrc.nist.gov/publications/fips/fips81/fips81.htm . /Peter On Thu, 18 Nov 2004, Miguel Rodr?guez Rubinos wrote: > Hi all, > > I'm working with Crypto module and I have a question I can't find in > documentation. In DES3 CBC mode, what's the block size? In the other side of > communication some people working with Java told me they worked with 1024 block > size and I don't know what's the size of block that I'm using. > > I hope this wasn't a dumb question. > > Thanks in advance, > > Miguel > > ________________________________________________ > > Miguel Rodr?guez Rubinos > > NomaSystems > > Edificio de Servicios Generales de Investigaci?n > Campus de Elvi?a s/n > 15071 A Coru?a > > Spain > http://www.nomasystems.com > ________________________________________________ > From dgud@REDACTED Thu Nov 18 12:09:31 2004 From: dgud@REDACTED (Dan Gudmundsson) Date: Thu, 18 Nov 2004 12:09:31 +0100 Subject: Unused index in mnesia table In-Reply-To: <419C6B45.7090503@mobilearts.se> References: <419C6B45.7090503@mobilearts.se> Message-ID: <16796.33515.544194.322626@rian.du.uab.ericsson.se> How unique was the index keys? If all index keys are the same you will get a quadratic insertion time, i.e. a long linked list with a reference to the real keys. That is usually the problem when indecies are slow, in your example below all records will have undefined on the index position. I.e. index 'undefined' points to a list with all keys. /Dan Goran Bage writes: > Hello, > > We found a problem with mnesia tables with an index that is unused. > Loading a moderately sized table (40.000 entries) took forever > (5-10 min). It turns out that the loading time grows fast with the > table size (quadratic?) if an index is unused. To check it out I > wrote the attached module and tested loading tables of different > sizes, this is what I got just running each case once. > N Time > 100 6 > 1000 62 > 10000 9878 > 20000 49939 > 50000 328575 > > Removing the unused index solved the problem. The reason I added an > unused index was that we will use it later on, so that is what you > get for trying to think ahead :-) > > -- > -- Goran > ------------------------- May the Snow be with you ---- > Goran Bage, MobileArts, www.mobilearts.se > Tj?rhovsgatan 56, SE-116 28 Stockholm, Sweden > email:goran.bage@REDACTED, phone: +46 733 358405 > > > %%%------------------------------------------------------------------- > %%% File : mtest.erl > %%% Author : Goran Bage > %%% Description : > %%% > %%% Created : 18 Nov 2004 by Goran Bage > %%%------------------------------------------------------------------- > -module(mtest). > > -export([create/0, > fill/1, > test/0 > ]). > > %%-------------------------------------------------------------------- > %% Records > %%-------------------------------------------------------------------- > -record(item, {key, > index, > data}). > > %%==================================================================== > %% External functions > %%==================================================================== > create() -> > mnesia:create_schema([node()]), > mnesia:start(), > {atomic, ok} = > mnesia:create_table(item, > [{attributes, record_info(fields, item)}, > {index, [index]}, > {type, set}, > {disc_copies, [node()]}]). > > test() -> > mnesia:stop(), > mnesia:start(), > {Time, V} = timer:tc(mnesia, wait_for_tables, [[item], 10*60*1000]), > N = length(mnesia:dirty_all_keys(item)), > io:format("Size = ~w, Time = ~w, Res = ~p\n", [N, Time, V]). > > > fill(N) -> > I = length(mnesia:dirty_all_keys(item)), > fill(I, N), > ok. > > > %%==================================================================== > %% Internal functions > %%==================================================================== > > fill(I, N) when I < N -> > mnesia:dirty_write(#item{key = I, data = any}), > fill(I+1, N); > fill(_, _) -> > ok. From goran.bage@REDACTED Thu Nov 18 13:26:54 2004 From: goran.bage@REDACTED (Goran Bage) Date: Thu, 18 Nov 2004 13:26:54 +0100 Subject: Unused index in mnesia table In-Reply-To: <16796.33515.544194.322626@rian.du.uab.ericsson.se> References: <419C6B45.7090503@mobilearts.se> <16796.33515.544194.322626@rian.du.uab.ericsson.se> Message-ID: <419C950E.3020904@mobilearts.se> Dan Gudmundsson wrote: > How unique was the index keys? They were all the same as you noticed, I was aware of the fact that all were the same and undefined. But I did not know this was a problem and maybe there are others that may get the same problem, or am I the only one that plan ahead :-) > > If all index keys are the same you will get a quadratic insertion time, > i.e. a long linked list with a reference to the real keys. Quadratic was my guess looking at the figures. > > That is usually the problem when indecies are slow, in your example > below all records will have undefined on the index position. > > I.e. index 'undefined' points to a list with all keys. That I didn't know. > > /Dan > > Goran Bage writes: > > Hello, > > > > We found a problem with mnesia tables with an index that is unused. > > Loading a moderately sized table (40.000 entries) took forever > > (5-10 min). It turns out that the loading time grows fast with the > > table size (quadratic?) if an index is unused. To check it out I > > wrote the attached module and tested loading tables of different > > sizes, this is what I got just running each case once. > > N Time > > 100 6 > > 1000 62 > > 10000 9878 > > 20000 49939 > > 50000 328575 > > > > Removing the unused index solved the problem. The reason I added an > > unused index was that we will use it later on, so that is what you > > get for trying to think ahead :-) > > > > -- > > -- Goran > > ------------------------- May the Snow be with you ---- > > Goran Bage, MobileArts, www.mobilearts.se > > Tj?rhovsgatan 56, SE-116 28 Stockholm, Sweden > > email:goran.bage@REDACTED, phone: +46 733 358405 > > > > > > %%%------------------------------------------------------------------- > > %%% File : mtest.erl > > %%% Author : Goran Bage > > %%% Description : > > %%% > > %%% Created : 18 Nov 2004 by Goran Bage > > %%%------------------------------------------------------------------- > > -module(mtest). > > > > -export([create/0, > > fill/1, > > test/0 > > ]). > > > > %%-------------------------------------------------------------------- > > %% Records > > %%-------------------------------------------------------------------- > > -record(item, {key, > > index, > > data}). > > > > %%==================================================================== > > %% External functions > > %%==================================================================== > > create() -> > > mnesia:create_schema([node()]), > > mnesia:start(), > > {atomic, ok} = > > mnesia:create_table(item, > > [{attributes, record_info(fields, item)}, > > {index, [index]}, > > {type, set}, > > {disc_copies, [node()]}]). > > > > test() -> > > mnesia:stop(), > > mnesia:start(), > > {Time, V} = timer:tc(mnesia, wait_for_tables, [[item], 10*60*1000]), > > N = length(mnesia:dirty_all_keys(item)), > > io:format("Size = ~w, Time = ~w, Res = ~p\n", [N, Time, V]). > > > > > > fill(N) -> > > I = length(mnesia:dirty_all_keys(item)), > > fill(I, N), > > ok. > > > > > > %%==================================================================== > > %% Internal functions > > %%==================================================================== > > > > fill(I, N) when I < N -> > > mnesia:dirty_write(#item{key = I, data = any}), > > fill(I+1, N); > > fill(_, _) -> > > ok. > -- -- Goran ------------------------- May the Snow be with you ---- Goran Bage, MobileArts, www.mobilearts.se Tj?rhovsgatan 56, SE-116 28 Stockholm, Sweden email:goran.bage@REDACTED, phone: +46 733 358405 From keymon@REDACTED Thu Nov 18 17:22:36 2004 From: keymon@REDACTED (Hector Rivas Gandara) Date: Thu, 18 Nov 2004 17:22:36 +0100 Subject: C++ API to comunicate with erlang Message-ID: <419CCC4C.2070809@wanadoo.es> Hi, is there a C++ API, similar to jinterface, to comunicate with erlang nodes instead of ei or erl_interface? -- Greets H?ctor From keymon@REDACTED Thu Nov 18 20:53:31 2004 From: keymon@REDACTED (Hector Rivas Gandara) Date: Thu, 18 Nov 2004 20:53:31 +0100 Subject: Link a process from a cnode Message-ID: <419CFDBB.4070302@wanadoo.es> In the EI library, you can receive a message with link/unlink/exit signals. But I didn't find how to send an link/unlink/exit message. How can I link/unlink an erlang process from C? -- Saudos H?ctor From sean.hinde@REDACTED Thu Nov 18 23:59:10 2004 From: sean.hinde@REDACTED (Sean Hinde) Date: Thu, 18 Nov 2004 22:59:10 +0000 Subject: crypto and ssl modules under OSX In-Reply-To: References: Message-ID: <75597826-39B5-11D9-AF62-000A95927CCE@mac.com> I have submitted a patch for this more times than I care to remember. In addition the correct mechanism is described in Erlang/OTPs very own README file. Please try to get this right for OS X next time. Sean On 18 Nov 2004, at 11:34, Peter H|gfeldt wrote: > > Just remove the -R switch from the Makefile. In R10B the -R switch is > not included for OSX (or is it called Darwin?). > > /Peter > > > On Wed, 17 Nov 2004, Reto Kramer wrote: > >> I'm trying to build the R9C-2 ssl and crypto under OSX 10.3.4. Can >> some >> BSD/Mac guru out there help me figure out how to change the ld >> switches >> (under OSX, the R option of the -Wl switch is not available). >> >> Thanks, >> - Reto >> >> from: otp_src_R9C-2/otp_src_R9C-2/lib/crypto/c_src/Makefile.in >> >> $(LIBDIR)/crypto_drv.so: $(OBJS) >> $(INSTALL_DIR) $(LIBDIR) >> $(CC) $(LDFLAGS) -L$(SSL_LIBDIR) -Wl,-R$(SSL_LIBDIR) \ >> -o $@ $^ $(LDLIBS) -lcrypto >> >> >> === Entering application crypto >> make[3]: Nothing to be done for `opt'. >> make -f powerpc-apple-darwin7.5.0/Makefile TYPE=opt >> /usr/bin/install -c -d ../priv/lib/powerpc-apple-darwin7.5.0 >> gcc -bundle -flat_namespace -undefined suppress -lbundle1.o -L/usr/lib >> -Wl,-R/usr/lib \ >> -o ../priv/lib/powerpc-apple-darwin7.5.0/crypto_drv.so >> ../priv/obj/powerpc-apple-darwin7.5.0/crypto_drv.o -lcrypto >> ld: unknown flag: -R/usr/lib >> === Skipping subdir doc/src, it is missing >> === Leaving application crypto >> >> # >> > From sean.hinde@REDACTED Fri Nov 19 00:05:34 2004 From: sean.hinde@REDACTED (Sean Hinde) Date: Thu, 18 Nov 2004 23:05:34 +0000 Subject: Unused index in mnesia table In-Reply-To: <419C950E.3020904@mobilearts.se> References: <419C6B45.7090503@mobilearts.se> <16796.33515.544194.322626@rian.du.uab.ericsson.se> <419C950E.3020904@mobilearts.se> Message-ID: <5A77FCE2-39B6-11D9-AF62-000A95927CCE@mac.com> On 18 Nov 2004, at 12:26, Goran Bage wrote: > Dan Gudmundsson wrote: >> How unique was the index keys? > > They were all the same as you noticed, I was aware of the fact that > all were the same and undefined. But I did not know this was a problem > and maybe there are > others that may get the same problem, or am I the only one that plan > ahead :-) This one also caused me much confusion several years ago, and still trips up certain members of the team have here ;-) I think it should really have a prominent warning in the documentation. My normal solution in the case where many rows will have the same value of secondary key, but it is still needed for the few rows which are different is to store a suitably tagged copy of the primary key in the secondary index field instead of blanks. Sean From sean.hinde@REDACTED Fri Nov 19 00:20:58 2004 From: sean.hinde@REDACTED (Sean Hinde) Date: Thu, 18 Nov 2004 23:20:58 +0000 Subject: Creating GIFs in Erlang Message-ID: <8133EDB0-39B8-11D9-AF62-000A95927CCE@mac.com> Hi, Despite various posts referring to nearly finished solutions I couldn't find a pre-built solution to create gifs. So, here is gif_sh.erl (_sh merely to distinguish it from various other part finished donated gif.erl files lying around my system). There is even some documentation. I'll post it all up in the Jungerl sometime. Credit to the Wings3d team for providing the basis of the LZW algorithm - thanks guys. Sean -------------- next part -------------- A non-text attachment was scrubbed... Name: gif_sh.erl Type: application/octet-stream Size: 15529 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From keymon@REDACTED Fri Nov 19 10:13:29 2004 From: keymon@REDACTED (Hector Rivas Gandara) Date: Fri, 19 Nov 2004 10:13:29 +0100 Subject: Link a process from a cnode In-Reply-To: <419CFDBB.4070302@wanadoo.es> References: <419CFDBB.4070302@wanadoo.es> Message-ID: <419DB939.9010304@wanadoo.es> Hector Rivas Gandara wrote: > How can I link/unlink an erlang process from C? Well, in the Erlang/Otp source I've found this file: /lib/erl_interface/src/not_used/send_link.c with the link/unlink implementation and this wonder comment: /* FIXME not used? */ And in the /lib/erl_interface/src/README.internal a wonderer comment: * src/not_used/ Strange, some files are not used.... Any problem with this implementation? why is not used? -- Saudos H?ctor From cabrero@REDACTED Fri Nov 19 12:43:14 2004 From: cabrero@REDACTED (David Cabrero Souto) Date: Fri, 19 Nov 2004 12:43:14 +0100 Subject: possible bug in xmerl_xpath Message-ID: <20041119114314.GA445@sandbox.alfa21.pri> Hi everybody. I came acrross this: Xpath expression that select nodes of type text() don't work, ie. "contexto/text()", "child::text()", "descendant::text()", ... In function xmerl_xpath:node_test/3 where it says: node_test(({node_type, NT}, #xmlNode{node = N}, _Context) -> case {NT, N} of {text, {_Data}} -> true; ... it should (I think) say: node_test({node_type, NT}, #xmlNode{node = N}, _Context) -> case {NT, N} of {text, #xmlText{}} -> true; ... That little patch fixed the problem for me. Regards. David ----- From ulf.wiger@REDACTED Fri Nov 19 13:39:01 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 19 Nov 2004 13:39:01 +0100 Subject: Creating GIFs in Erlang Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F540296B@ESEALNT442.al.sw.ericsson.se> Nice, My own attempt back in 1997 foundered on the LZW part. Doing it without the bit syntax was... painful. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Sean Hinde > Sent: den 19 november 2004 00:21 > To: Erlang Questions > Subject: Creating GIFs in Erlang > > > Hi, > > Despite various posts referring to nearly finished solutions > I couldn't > find a pre-built solution to create gifs. > > So, here is gif_sh.erl (_sh merely to distinguish it from > various other > part finished donated gif.erl files lying around my system). > > There is even some documentation. I'll post it all up in the Jungerl > sometime. > > Credit to the Wings3d team for providing the basis of the LZW > algorithm > - thanks guys. > > Sean > > From richardc@REDACTED Sat Nov 20 18:05:57 2004 From: richardc@REDACTED (Richard Carlsson) Date: Sat, 20 Nov 2004 18:05:57 +0100 Subject: Swedish translations of telecomm terms Message-ID: <419F7975.1090108@csd.uu.se> A question to the Swedish-speaking subset of all you who know the telecom lingo: I'm trying to help a friend with some translations for Gnumeric, and apparently they have some traffic formulae in there. Does anybody have decent Swedish translations of the following terms? "offered traffic" "carried traffic" "traffic capacity" (trafikkapacitet?) "number of circuits" (kretsar? kopplingar?) "traffic loads" (trafikbelastning?) "grade of service (GOS)" I thought I'd better ask the pros. /Richard From raimo@REDACTED Tue Nov 23 13:46:57 2004 From: raimo@REDACTED (Raimo Niskanen) Date: 23 Nov 2004 13:46:57 +0100 Subject: List quiet Message-ID: Just testing if the mailing list is alive - it has bee so quiet for a while. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From ulf.wiger@REDACTED Tue Nov 23 14:16:40 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 23 Nov 2004 14:16:40 +0100 Subject: List quiet Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F5402981@ESEALNT442.al.sw.ericsson.se> We're all very busy building stuff... ;-) /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Raimo Niskanen > Sent: den 23 november 2004 13:47 > To: erlang-questions@REDACTED > Subject: List quiet > > > Just testing if the mailing list is alive - it has bee so > quiet for a while. > > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > From carsten@REDACTED Tue Nov 23 14:47:04 2004 From: carsten@REDACTED (Carsten Schultz) Date: Tue, 23 Nov 2004 14:47:04 +0100 Subject: Noise (was: Re: List quiet) In-Reply-To: References: Message-ID: <20041123134703.GE31806@penne.localnet> On Tue, Nov 23, 2004 at 01:46:57PM +0100, Raimo Niskanen wrote: > Just testing if the mailing list is alive - it has bee so quiet for a while. SCNR :-) Carsten -- Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin http://carsten.codimi.de/ PGP/GPG key on the pgp.net key servers, fingerprint on my home page. From bjorn@REDACTED Tue Nov 23 15:44:59 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 23 Nov 2004 15:44:59 +0100 Subject: Any reason to keep the socks* modules? Message-ID: There are four unsupported and undocumented modules in kernel: socks5.erl socks5_auth.erl socks5_tcp.erl socks5_udp.erl We are thinking about removing them in the next patch for the kernel application and from R10B-2. The reason is that there is at least one bug (found by Dialyzer), and probably many more. Does anyone have a good reason for keeping them? Does anyone actually use them? /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From erlang@REDACTED Wed Nov 24 10:33:24 2004 From: erlang@REDACTED (Peter-Henry Mander) Date: Wed, 24 Nov 2004 09:33:24 +0000 Subject: remote execution of funs in shell =/= in erts Message-ID: <20041124093324.4cb0288a.erlang@manderp.freeserve.co.uk> Hi Gurus, After going through the checklist for setting up communicating nodes (same Erlang cookies, up to date /etc/hosts file etc...) I tried to execute a function on the remote node from the shell, which worked nicely: (test@REDACTED)2> spawn('test@REDACTED',fun() -> group_leader(whereis(init),self()),io:format("wow!~n",[]) end). <4394.54.0> The other end obliged with: (test@REDACTED)2> wow! But using a compiled beam only reproduced the desired results if the two beams matched, i.e. the same source was compiled on both nodes. If there's a mismatch it won't work, reporting that: =ERROR REPORT==== 24-Nov-2004::09:03:48 === Error in process <0.40.0> on node 'test@REDACTED' with exit value: {{badfun,#Fun},[{error_handler,undefined_lambda,3}]} ** exited: {{badfun,#Fun}, [{error_handler,undefined_lambda,3}]} ** When both nodes have equivalent beams everything works as it does with the shell example. So I guess that there's a difference between how the shell executes remote funs and how the Erlang runtime executes remote funs. How do nodes communicate what appears to be version information or beam digest or checksums beween them? Is this documented (otherwise than by reading code :-)? Is it possible for the runtime to execute a remote fun without the corresponding beam being available on the remote node, like the shell appears to do? Pete. --------------------------- -module(test_remote). -export([test/0]). test()-> spawn_link('test@REDACTED',fun f/0). f()-> group_leader(whereis(init),self()),io:format("wow!~n",[]). -- "The Tao of Programming flows far away and returns on the wind of morning." From erlang@REDACTED Wed Nov 24 13:13:49 2004 From: erlang@REDACTED (Peter-Henry Mander) Date: Wed, 24 Nov 2004 12:13:49 +0000 Subject: remote execution of funs in shell =/= in erts In-Reply-To: <25c896ad48cf97e036887f3d93dab592@tombob.com> References: <20041124093324.4cb0288a.erlang@manderp.freeserve.co.uk> <25c896ad48cf97e036887f3d93dab592@tombob.com> Message-ID: <20041124121349.1427b854.erlang@manderp.freeserve.co.uk> Hi Robert, Nope! This code must be the same and compiled on both nodes: -module(test_remote). -export([test/0]). test()-> spawn_link('test@REDACTED', fun() -> group_leader(whereis(init),self()), io:format("wow!~n",[]) end). Otherwise I get this: (test@REDACTED)2> test_remote:test(). <4592.44.0> ** exited: {undef,[{#Fun,[]}]} ** Instead of this: (test@REDACTED)3> test_remote:test(). <4592.45.0> with the remote node doing this: (test@REDACTED)2> wow! It would seem that the shell sends a self-contained function closure (lambda) to the remote node, but erts doesn't. I also found out that the two instances of test_remote must be equivalent on both nodes, otherwise it fails. i.e. if there's a different version of synonymous modules on each node, it fails. Pete. On Wed, 24 Nov 2004 11:45:14 0000 Robert Raschke wrote: > Hi Pete, > > > (test@REDACTED)2> spawn('test@REDACTED',fun() -> group_leader(whereis(init),self()),io:format("wow!~n",[]) end). > > <4394.54.0> > > > [...snip...] > > > > -module(test_remote). > > -export([test/0]). > > test()-> spawn_link('test@REDACTED',fun f/0). > > f()-> group_leader(whereis(init),self()),io:format("wow!~n",[]). > > > > These two are not exactly the same. What happens if you run > > -module(test_remote). > -export([test/0]). > test()-> spawn_link('test@REDACTED',fun() -> group_leader(whereis(init),self()),io:format("wow!~n",[]) end). > > ? > > My initial guess would be that the "other" side does not know what f/0 is. > > Robby > -- "The Tao of Programming flows far away and returns on the wind of morning." From mpquique@REDACTED Thu Nov 25 13:25:19 2004 From: mpquique@REDACTED (Enrique Marcote =?iso-8859-1?q?Pe=F1a?=) Date: Thu, 25 Nov 2004 13:25:19 +0100 Subject: ODBC + MySQL Message-ID: <200411251325.19391.mpquique@udc.es> Hi, I'm trying to get the ODBC driver running with mysql. I could finally compile the driver and the port without any errors. Now at least I can start the odbc application, but when I try to connect to the DB I get the following error: odbc:connect("DSN=MySQL;UID=uid;PWD=pwd", []). {error,connection_closed} =ERROR REPORT==== 25-Nov-2004::12:40:57 === ** Generic server <0.40.0> terminating ** Last message in was {#Port<0.114>,{exit_status,23}} ** When Server state == {state,#Port<0.114>, {<0.30.0>,#Ref<0.0.0.95>}, <0.30.0>, undefined, on, undefined, undefined, on, connecting, undefined, 0, [#Port<0.112>,#Port<0.113>], #Port<0.115>, #Port<0.116>} ** Reason for termination == ** {port_exit,collecting_of_driver_information_faild} I'm using the same setup (DSN, UID and PWD) with the isql utility and works fine. Any help will be greatly appreciated. Thanks in advance. Best, -- Quique http://www.des.udc.es/~mpquique/ From svg@REDACTED Thu Nov 25 15:02:06 2004 From: svg@REDACTED (Vladimir Sekissov) Date: Thu, 25 Nov 2004 19:02:06 +0500 (YEKT) Subject: ODBC + MySQL In-Reply-To: <200411251325.19391.mpquique@udc.es> References: <200411251325.19391.mpquique@udc.es> Message-ID: <20041125.190206.59681091.svg@surnet.ru> Good day, mpquique> odbc:connect("DSN=MySQL;UID=uid;PWD=pwd", []). Try: odbc:connect("DSN=MySQL;UID=uid;PWD=pwd", [{trace_driver, on},{{scrollable_cursors, off}]). Check `SQL.LOG' file after. Best Regards, Vladimir Sekissov From matthias@REDACTED Thu Nov 25 20:43:33 2004 From: matthias@REDACTED (Matthias Lang) Date: Thu, 25 Nov 2004 20:43:33 +0100 Subject: remote execution of funs in shell =/= in erts In-Reply-To: <20041124093324.4cb0288a.erlang@manderp.freeserve.co.uk> References: <20041124093324.4cb0288a.erlang@manderp.freeserve.co.uk> Message-ID: <16806.13797.224893.56852@antilipe.corelatus.se> Peter-Henry Mander writes: > So I guess that there's a difference between how the shell executes > remote funs and how the Erlang runtime executes remote funs. How do > nodes communicate what appears to be version information or beam digest > or checksums beween them? Is this documented (otherwise than by reading > code :-)? There are quite a few questions there. I don't know enough about the ERTS internals to answer all of them confidently, but I'll have a go. Yes, there's a difference between funs made in the shell and funs made in code. An easy way to see that is to run term_to_binary() on the 'same' fun made two different ways: 8> io:fwrite("~w", [term_to_binary(e:a())]). <<131,112,0,0,0,66,1,119,221,89,18,158,97,22,203,233,28,220,41,82,49,106,16,0,0,0,0,0,0,0,0,100,0,1,101,97,0,98,5,195,163,107,103,100,0,13,110,111,110,111,100,101,64,110,111,104,111,115,116,0,0,0,46,0,0,0,0,0>>ok 9> io:fwrite("~w", [term_to_binary(fun(X) -> 2 * X end)]). <<131,112,0,0,0,227,1,242,35,237,99,76,83,218,107,189,28,220,154,229,136,183,25,0,0,0,1,0,0,0,3,100,0,8,101,114,108,95,101,118,97,108,97,5,98,3,208,36,215,103,100,0,13,110,111,110,111,100,101,64,110,111,104,111,115,116,0,0,0,46,0,0,0,0,0,104,3,100,0,4,101,118,97,108,104,2,100,0,5,115,104,101,108,108,100,0,10,108,111,99,97,108,95,102,117,110,99,108,0,0,0,1,103,100,0,13,110,111,110,111,100,101,64,110,111,104,111,115,116,0,0,0,22,0,0,0,0,0,106,106,108,0,0,0,1,104,5,100,0,6,99,108,97,117,115,101,97,1,108,0,0,0,1,104,3,100,0,3,118,97,114,97,1,100,0,1,88,106,106,108,0,0,0,1,104,5,100,0,2,111,112,97,1,100,0,1,42,104,3,100,0,7,105,110,116,101,103,101,114,97,1,97,2,104,3,100,0,3,118,97,114,97,1,100,0,1,88,106,106>> (e:a() is the 'same' fun as the one I entered in the shell). Taking a quick look at the source (erl_fun.h), it appears that a 'normal' fun includes an MD5sum of the module which created it, which tallys with your observations. Taking an educated guess, a 'shell fun' is actually a parse tree. I would be surprised if it's possible to execute a compiled fun without making the exact same code available at the other node, but you don't necessarily have to do that via a filesystem. > Is it possible for the runtime to execute a remote fun without > the corresponding beam being available on the remote node, like the > shell appears to do? I don't think there's a clean way of doing it. One dirty way is to use erl_scan, erl_parse and erl_eval. I'd guess that's what the shell does. Matt From raimo@REDACTED Fri Nov 26 09:03:57 2004 From: raimo@REDACTED (Raimo Niskanen) Date: 26 Nov 2004 09:03:57 +0100 Subject: remote execution of funs in shell =/= in erts References: <20041124093324.4cb0288a.erlang@manderp.freeserve.co.uk>, <16806.13797.224893.56852@antilipe.corelatus.se> Message-ID: Congratulations on your educated guesses, they are perfectly correct! To elaborate some more: erl_eval has got a bunch of compiled funs itself, of all arities up to 20 that it uses when evaluating funs. When they are evaluated they are called with the actual arguments of the emulated call and they get they emulated environment as well as the parse tree code to evaluate as their actual environment. So when the shell evaluates a fun of arity N, it always calls the same fun of arity N that is compiled in the module erl_eval, but with different environment depending on the emulated fun's code and bound variables, and since erl_eval almost certainly exists on the remote node, it can be remote called - the parse tree gets sent to the remote node. If you have different versions of erl_eval on the nodes you cannot do remote fun evaluation. And, if you try to evaluate a fun with more than 20 arguments in the shell (in erl_eval) it will fail. matthias@REDACTED (Matthias Lang) writes: > Peter-Henry Mander writes: > > > So I guess that there's a difference between how the shell executes > > remote funs and how the Erlang runtime executes remote funs. How do > > nodes communicate what appears to be version information or beam digest > > or checksums beween them? Is this documented (otherwise than by reading > > code :-)? > > There are quite a few questions there. I don't know enough about the > ERTS internals to answer all of them confidently, but I'll have a go. > > Yes, there's a difference between funs made in the shell and funs made > in code. An easy way to see that is to run term_to_binary() on the > 'same' fun made two different ways: > > 8> io:fwrite("~w", [term_to_binary(e:a())]). > <<131,112,0,0,0,66,1,119,221,89,18,158,97,22,203,233,28,220,41,82,49,106,16,0,0,0,0,0,0,0,0,100,0,1,101,97,0,98,5,195,163,107,103,100,0,13,110,111,110,111,100,101,64,110,111,104,111,115,116,0,0,0,46,0,0,0,0,0>>ok > 9> io:fwrite("~w", [term_to_binary(fun(X) -> 2 * X end)]). > <<131,112,0,0,0,227,1,242,35,237,99,76,83,218,107,189,28,220,154,229,136,183,25,0,0,0,1,0,0,0,3,100,0,8,101,114,108,95,101,118,97,108,97,5,98,3,208,36,215,103,100,0,13,110,111,110,111,100,101,64,110,111,104,111,115,116,0,0,0,46,0,0,0,0,0,104,3,100,0,4,101,118,97,108,104,2,100,0,5,115,104,101,108,108,100,0,10,108,111,99,97,108,95,102,117,110,99,108,0,0,0,1,103,100,0,13,110,111,110,111,100,101,64,110,111,104,111,115,116,0,0,0,22,0,0,0,0,0,106,106,108,0,0,0,1,104,5,100,0,6,99,108,97,117,115,101,97,1,108,0,0,0,1,104,3,100,0,3,118,97,114,97,1,100,0,1,88,106,106,108,0,0,0,1,104,5,100,0,2,111,112,97,1,100,0,1,42,104,3,100,0,7,105,110,116,101,103,101,114,97,1,97,2,104,3,100,0,3,118,97,114,97,1,100,0,1,88,106,106>> > > (e:a() is the 'same' fun as the one I entered in the shell). > > Taking a quick look at the source (erl_fun.h), it appears that a > 'normal' fun includes an MD5sum of the module which created it, which > tallys with your observations. Taking an educated guess, a 'shell fun' > is actually a parse tree. > > I would be surprised if it's possible to execute a compiled fun > without making the exact same code available at the other node, but > you don't necessarily have to do that via a filesystem. > > > Is it possible for the runtime to execute a remote fun without > > the corresponding beam being available on the remote node, like the > > shell appears to do? > > I don't think there's a clean way of doing it. One dirty way is to use > erl_scan, erl_parse and erl_eval. I'd guess that's what the shell > does. > > Matt -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From vances@REDACTED Thu Nov 25 16:08:12 2004 From: vances@REDACTED (Vance Shipley) Date: Thu, 25 Nov 2004 10:08:12 -0500 Subject: abstract syntax in the repository? In-Reply-To: References: <41A3A8CA.24139.8F7E7F@localhost> Message-ID: <20041125150812.GH87561@frogman.motivity.ca> james@REDACTED (James Hague) writes: > > I couldn't seem to get the right vim settings to match those used in > the Erlang source, so a bit of manual reformatting will be necessary. As a devout vim user myself I have thought often about how to accomodate both religions. The one method which seems like it has potential is to store only the abstract syntax itself in the source code repository. When you check out a source module you run it through syntax_tools to format it the way you want it. I would want 132 columns with tab only indentation. The rest of you can have the standard emacs mode. I figure it's either a fabulous idea or an unworkable one. What do you think? -Vance From richardc@REDACTED Fri Nov 26 15:27:49 2004 From: richardc@REDACTED (Richard Carlsson) Date: Fri, 26 Nov 2004 15:27:49 +0100 (MET) Subject: Core Erlang specification 1.0.3 In-Reply-To: <20041125150812.GH87561@frogman.motivity.ca> References: <41A3A8CA.24139.8F7E7F@localhost> <20041125150812.GH87561@frogman.motivity.ca> Message-ID: I'd like to inform those interested that a new revision of the Core Erlang specification is available at http://www.it.uu.se/research/group/hipe/cerl/ (Changes include specifiation of how binary-syntax is handled, and how the try/catch-construct works on the core language level.) If you don't feel like reading the whole thing, there are a couple of quick-references in the appendices. >From OTP/Erlang R10 and onwards, to compile a .erl source file to Core Erlang, pass the flag to_core to the compiler. A .core file will be generated instead of a .beam file. For example: 1> c(my_module, to_core). To compile a Core Erlang module my_module.core to a .beam file, pass the flag from_core to the compiler. For example: 1> c(my_module, from_core). Enjoy, /Richard Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://user.it.uu.se/~richardc/ "Having users is like optimization: the wise course is to delay it." -- Paul Graham From bengt.kleberg@REDACTED Fri Nov 26 16:10:29 2004 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Fri, 26 Nov 2004 16:10:29 +0100 Subject: abstract syntax in the repository? In-Reply-To: <20041125150812.GH87561@frogman.motivity.ca> References: <41A3A8CA.24139.8F7E7F@localhost> <20041125150812.GH87561@frogman.motivity.ca> Message-ID: <41A74765.6030202@ericsson.com> Vance Shipley wrote: ...deleted > accomodate both religions. The one method which seems like it > has potential is to store only the abstract syntax itself in the > source code repository. When you check out a source module you > run it through syntax_tools to format it the way you want it. when i worked at dynasoft we used ''indent'' with company default settings before checkin to the repository. at checkout i could ''un-indent'' with my own settings. at ericsson i write code with tabs, and then format (syntax_tools) to the ''correct'' layout before checkin. i have not considered un-formatting when checking out... bengt From ingela@REDACTED Fri Nov 26 17:37:26 2004 From: ingela@REDACTED (Ingela Anderton) Date: Fri, 26 Nov 2004 17:37:26 +0100 Subject: ODBC + MySQL References: <200411251325.19391.mpquique@udc.es> Message-ID: <16807.23494.450932.491334@gargle.gargle.HOWL> Enrique Marcote Pe?a wrote: > get the following error: > > odbc:connect("DSN=MySQL;UID=uid;PWD=pwd", []). > {error,connection_closed} > =ERROR REPORT==== 25-Nov-2004::12:40:57 === > ** Generic server <0.40.0> terminating > ** Last message in was {#Port<0.114>,{exit_status,23}} > ** When Server state == {state,#Port<0.114>, > {<0.30.0>,#Ref<0.0.0.95>}, > <0.30.0>, > undefined, > on, > undefined, > undefined, > on, > connecting, > undefined, > 0, > [#Port<0.112>,#Port<0.113>], > #Port<0.115>, > #Port<0.116>} > ** Reason for termination == > ** {port_exit,collecting_of_driver_information_faild} > > > I'm using the same setup (DSN, UID and PWD) with the isql utility and works > fine. > > Any help will be greatly appreciated. Thanks in advance. As I pointed out before on this mailing list and as stated in the documentation: The Erlang ODBC application is designed using the version 3.0 of the ODBC-standard, however using the option {scrollable_cursors, off} for a connection has been known to make it work for at least some 2.X drivers. Using a 2.X odbc driver without disabling scrollable cursors typically results in the crash above. -- /Ingela Ericsson AB - OTP team From erlang@REDACTED Sat Nov 27 12:32:09 2004 From: erlang@REDACTED (Peter-Henry Mander) Date: Sat, 27 Nov 2004 11:32:09 +0000 Subject: Jungerl anonymous checkout problems Message-ID: <20041127113209.2389d020.erlang@manderp.freeserve.co.uk> Hi Gurus, I'm trying to do a cvs co on jungerl, but with no joy. The reply is: [1038] cvs -d:pserver:anonymous@REDACTED:/cvsroot/jungerl login Logging in to :pserver:anonymous@REDACTED:2401/cvsroot/jungerl CVS password: <> cvs [login aborted]: unrecognized auth response from cvs.sourceforge.net: M PserverBackend::PserverBackend() Connect (Connection refused) I'm not sure whether the failure is at my end or whether anonymous access has been changed. Pete. -- "The Tao of Programming flows far away and returns on the wind of morning." From vlad_dumitrescu@REDACTED Sat Nov 27 22:25:44 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Sat, 27 Nov 2004 22:25:44 +0100 Subject: Jungerl anonymous checkout problems References: <20041127113209.2389d020.erlang@manderp.freeserve.co.uk> Message-ID: Hi Pete, >From SF status page: ( 2004-11-23 08:07:38 - Project CVS Service ) On 2004-11-23 a disk failure on the anonymous CVS server for projects starting with the letters: e, h, i, j, o and v is causing anonymous CVS, ViewCVS and tarballs for these projects to be unavailable. We are currently working on this issue and do not have an ETA for resolution. regards, Vlad From per@REDACTED Sun Nov 28 06:43:59 2004 From: per@REDACTED (Per Bergqvist) Date: Sun, 28 Nov 2004 06:43:59 +0100 Subject: Synapse is hiring Message-ID: <41A9659F.7040407@synap.se> Hi, (Sorry for posting something like this. Would like to make this offer to the Erlang community first. Hope you excuse me.) Due to the strong demand for our products we are looking for 1-2 more brilliant colleagues to our Professional Service group located in Stockholm. The jobs includes QA activities, 3rd line support to direct customer and channel partners globally, customisations and installation projects. With the job goes a lot of travelling to exotic places ;-) We believe that a fairly young person (~25 yrs) is best fitted for the task but we are not discriminating anybody for age. Some or all of the following are qualifying: - Erlang development - Solaris and Linux management - SS7 (in particular TietoEnator/Ericsson stack). - GSM - IP networking - Security (ssl, ssh) - Software verification - Consulting experience - Language skills (english mandatory, spanish, french, arabic or chinese highly wanted) - Experience from GSM networks operations. - Availability with short notice Remember this is a wish list, I don't expect you to have everything above, we will provide the training required to fill in the blanks ... Important is of course that you have truly professional, optimistic and positive attitude to our customers. You will be one of the most visible parts of the company and for us customer really is king. We always try to go that extra mile that makes the customer remember Synapse as the excellent partner of choice and it will be your job to live up to that trust. We would like you start as soon as possible. If you think this is something for you, please drop me an email. Once again, remember that willingness to travel is a must. Best Regards Per Per Bergqvist Managing Director Synapse Mobile Networks Mobile: +46 709 686 685 From parault2@REDACTED Sun Nov 28 16:09:23 2004 From: parault2@REDACTED (Pat29) Date: Sun, 28 Nov 2004 16:09:23 +0100 Subject: newby questions Message-ID: <001301c4d55c$3efc82e0$3c6efea9@BLUESKY> Hello, Sorry for these questions but i had been learning Erlang (2 weeks) with the french book and i got the following error after launched this command on WinXP SP2 D:\Pat29\erlang\Erlang Book\ch8\ex1\src>erl -sname database -pa ebin {error_logger,{{2004,11,28},{14,47,58}},'Protocol: ~p: register/listen error: ~p ~n',[inet_tcp,enotsock]} {error_logger,{{2004,11,28},{14,47,58}},crash_report,[[{pid,<0.18.0>},{registere d_name,net_kernel},{error_info,{error,badarg}},{initial_call,{gen,init_it,[gen_s erver,<0.15.0>,<0.15.0>,{local,net_kernel},net_kernel,{database,shortnames,15000 },[]]}},{ancestors,[net_sup,kernel_sup,<0.8.0>]},{messages,[]},{links,[<0.15.0>] },{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size, 233},{stack_size,21},{reductions,293}],[]]} {error_logger,{{2004,11,28},{14,47,58}},supervisor_report,[{supervisor,{local,ne t_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{ pid,undefined},{name,net_kernel},{mfa,{net_kernel,start_link,[[database,shortnam es]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]} {error_logger,{{2004,11,28},{14,47,58}},supervisor_report,[{supervisor,{local,ke rnel_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefine d},{name,net_sup},{mfa,{erl_distribution,start_link,[]}},{restart_type,permanent },{shutdown,infinity},{child_type,supervisor}]}]} {error_logger,{{2004,11,28},{14,47,58}},crash_report,[[{pid,<0.7.0>},{registered _name,[]},{error_info,{shutdown,{kernel,start,[normal,[]]}}},{initial_call,{appl ication_master,init,[<0.5.0>,<0.6.0>,{appl_data,kernel,[application_controller,e rl_reply,auth,boot_server,code_server,disk_log_server,disk_log_sup,erl_prim_load er,error_logger,file_server,file_server_2,fixtable_server,global_group,global_na me_server,heart,init,kernel_config,kernel_sup,net_kernel,net_sup,rex,user,os_ser ver,ddll_server,erl_epmd,inet_db,pg2],undefined,{kernel,[]},[application,applica tion_controller,application_master,application_starter,auth,code,code_aux,packag es,code_server,dist_util,erl_boot_server,erl_distribution,erl_prim_loader,erl_re ply,erlang,error_handler,error_logger,file,file_server,old_file_server,file_io_s erver,prim_file,global,global_group,global_search,group,heart,inet6_tcp,inet6_tc p_dist,inet6_udp,inet_config,inet_hosts,inet_gethost_native,inet_tcp_dist,init,k ernel,kernel_config,net,net_adm,net_kernel,os,ram_file,rpc,user,user_drv,user_su p,disk_log,disk_log_1,disk_log_server,disk_log_sup,dist_ac,erl_ddll,erl_epmd,ert s_debug,gen_tcp,gen_udp,prim_inet,inet,inet_db,inet_dns,inet_parse,inet_res,inet _tcp,inet_udp,pg2,seq_trace,socks5,socks5_auth,socks5_tcp,socks5_udp,wrap_log_re ader,zlib,otp_ring0],[],infinity,infinity},normal]}},{ancestors,[<0.6.0>]},{mess ages,[{'EXIT',<0.8.0>,normal}]},{links,[<0.6.0>,<0.5.0>]},{dictionary,[]},{trap_ exit,true},{status,running},{heap_size,610},{stack_size,21},{reductions,1080}],[ ]]} {error_logger,{{2004,11,28},{14,47,58}},std_info,[{application,kernel},{exited,{ shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]} {"Kernel pid terminated",application_controller,shutdown} Crash dump was written to: erl_crash.dump Kernel pid terminated (application_controller) (shutdown) D:\Pat29\erlang\Erlang Book\ch8\ex1\src> Also when i tried this command (and some GUI applications) D:\erl5.4.2.1\bin>erl Execution user profile in HOME/.erlang Eshell V5.4.2.1 (abort with ^G) 1> toolbar:start(). =ERROR REPORT==== 28-Nov-2004::15:28:15 === Error in process <0.34.0> with exit value: {{badmatch,{error,enotsock}},[{gstk_p ort_handler,init,2}]} I looked at the gstk_port_handler.erl file: %% ------------------------------------------------------------ %% INTERFACE FUNCTIONS %% ------------------------------------------------------------ % Note: gs is not a true application so this doesn't work :-( % Communication protocol between Erlang backend and wish program % that can be set in the application environment, e.i. tested % with "erl -gs backend_comm socket" % % backend_comm = socket | port I tried first D:\erl5.4.2.1\bin>erl -gs bachend_com socket but failed. D:\erl5.4.2.1\bin>erl -gs backend_comm port worked fine. Sorry again but i don't understand. Perhaps it's the same problem ([inet_tcp,enotsock] backend_comm socket) ? Best regards. From matthias@REDACTED Sun Nov 28 22:05:47 2004 From: matthias@REDACTED (Matthias Lang) Date: Sun, 28 Nov 2004 22:05:47 +0100 Subject: newby questions In-Reply-To: <001301c4d55c$3efc82e0$3c6efea9@BLUESKY> References: <001301c4d55c$3efc82e0$3c6efea9@BLUESKY> Message-ID: <16810.15787.662985.290523@antilipe.corelatus.se> Pat29 writes: > Sorry for these questions but i had been learning Erlang (2 weeks) > with the french book and i got the following error after launched > this command on WinXP SP2 > D:\Pat29\erlang\Erlang Book\ch8\ex1\src>erl -sname database -pa ebin > > {error_logger,{{2004,11,28},{14,47,58}},'Protocol: ~p: register/listen > error: ~p ~n',[inet_tcp,enotsock]} [...] > {{badmatch,{error,enotsock}},[{gstk_port_handler,init,2}]} It's saying that it tried to open a TCP socket and the operating system replied 'no way, Jos?'. If this was happening on a unix machine, I'd say "have you compiled a kernel without sockets or without IP networking?", but since it's windows I'm clueless. I'm guessing that if you start non-distributed Erlang (i.e. just run 'erl') and then do this: 1> gen_tcp:listen(0, []). {ok,#Port<0.82>} your setup will reply {error, enotsock} instead of {ok, Port}. Right? Can you do anything else with TCP on that machine, for instance does 'telnet' work? Maybe someone who actually uses windows can give you some more specific tips. (Is it possible to remove/disable/break TCP and/or sockets on a windows machine?) Matthias From mickael.remond@REDACTED Mon Nov 29 09:19:30 2004 From: mickael.remond@REDACTED (Mickael Remond) Date: Mon, 29 Nov 2004 09:19:30 +0100 Subject: newby questions In-Reply-To: <16810.15787.662985.290523@antilipe.corelatus.se> References: <001301c4d55c$3efc82e0$3c6efea9@BLUESKY> <16810.15787.662985.290523@antilipe.corelatus.se> Message-ID: <41AADB92.4060307@erlang-fr.org> Matthias Lang wrote: > Pat29 writes: > > > Sorry for these questions but i had been learning Erlang (2 weeks) > > with the french book and i got the following error after launched > > this command on WinXP SP2 > > > D:\Pat29\erlang\Erlang Book\ch8\ex1\src>erl -sname database -pa ebin > > > > {error_logger,{{2004,11,28},{14,47,58}},'Protocol: ~p: register/listen > > error: ~p ~n',[inet_tcp,enotsock]} > > [...] > > > {{badmatch,{error,enotsock}},[{gstk_port_handler,init,2}]} > > It's saying that it tried to open a TCP socket and the operating > system replied 'no way, Jos?'. If this was happening on a unix > machine, I'd say "have you compiled a kernel without sockets or > without IP networking?", but since it's windows I'm clueless. > > I'm guessing that if you start non-distributed Erlang (i.e. just run > 'erl') and then do this: > > 1> gen_tcp:listen(0, []). > {ok,#Port<0.82>} > > your setup will reply {error, enotsock} instead of {ok, Port}. Right? > > Can you do anything else with TCP on that machine, for instance does > 'telnet' work? I have already been encountering some strange problem with Erlang on Windows XP when testing the Erlang REPOS CDROM (http://www.erlang-projects.org/Public/projects/workgroups/repos/erlang_repos_1.0/view). On some Windows XP computers, we encountered the same symptom (unable to open a socket). On other Windows XP computers the REPOS CDROM is working. Networking, for example with telnet, was working properly on the computer. We tried to play with the Firewall setting without any luck. Does someone now if the socket API has changed in Windows XP ? -- Micka?l R?mond http://www.erlang-projects.org/ From vlad_dumitrescu@REDACTED Mon Nov 29 10:23:39 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Mon, 29 Nov 2004 10:23:39 +0100 Subject: newby questions References: <001301c4d55c$3efc82e0$3c6efea9@BLUESKY> <16810.15787.662985.290523@antilipe.corelatus.se> <41AADB92.4060307@erlang-fr.org> Message-ID: From: "Mickael Remond" > Does someone now if the socket API has changed in Windows XP ? If it works on some machines and don't on others, then it can't be an API change, can it? It has to be something with specific setup. Is XP SP2 installed on the machines that don't work? SP2 introduces some security features that break many applications (like enabling the firewall). However IIRC the latest SP2 releases fix this (I didn't install until it was stable and never had any problems). regards /Vlad From mickael.remond@REDACTED Mon Nov 29 14:35:06 2004 From: mickael.remond@REDACTED (Mickael Remond) Date: Mon, 29 Nov 2004 14:35:06 +0100 Subject: newby questions In-Reply-To: References: <001301c4d55c$3efc82e0$3c6efea9@BLUESKY> <16810.15787.662985.290523@antilipe.corelatus.se> <41AADB92.4060307@erlang-fr.org> Message-ID: <41AB258A.1020909@erlang-fr.org> Vlad Dumitrescu wrote: > From: "Mickael Remond" > >>Does someone now if the socket API has changed in Windows XP ? > > > If it works on some machines and don't on others, then it can't be an API > change, can it? It has to be something with specific setup. It could that socket API has been enhanced to support the new security feature of Windows. The old API could only work in certain context. I do not use Windows so that's just a guess. > Is XP SP2 installed on the machines that don't work? SP2 introduces some > security features that break many applications (like enabling the firewall). > However IIRC the latest SP2 releases fix this (I didn't install until it was > stable and never had any problems). The problem appeared on a machine without Service Pack 2. -- Micka?l R?mond http://www.erlang-projects.org/ From parault2@REDACTED Mon Nov 29 20:53:19 2004 From: parault2@REDACTED (Pat29) Date: Mon, 29 Nov 2004 20:53:19 +0100 Subject: newby questions Message-ID: <001601c4d64d$13db1fd0$3c6efea9@BLUESKY> Hello, Hi Matthias, It's right. D:\Pat29\erlang\Erlang Book\ch8\ex1>erl Eshell V5.4.2.1 (abort with ^G) 1> gen_tcp:listen(0,[]). {error,enotsock} 2> q(). ok 3> D:\Pat29\erlang\Erlang Book\ch8\ex1> Hi Damien, Sorry, it's the same thing with werl. Hi Micka?l, I tried to modify the SP2 firewall setting but without success. Even using a raw method (without the firewall), i had the same problem. I downloaded the repos1.0 to try and i will give you some informations later. In a first shell, i launch epmd D:\erl5.4.2.1\erts-5.4.2.1\bin>epmd -d -d epmd: Mon Nov 29 19:28:47 2004: epmd running - daemon = 0 epmd: Mon Nov 29 19:28:47 2004: try to initiate listening port 4369 epmd: Mon Nov 29 19:28:47 2004: starting epmd: Mon Nov 29 19:28:47 2004: entering the main select() loop and in a second shell, the following command seen working sometimes but always without a new node. D:\erl5.4.2.1\erts-5.4.2.1\bin>erl -sname ping Eshell V5.4.2.1 (abort with ^G) 1>nodes(known). [nonode@REDACTED] 2> q(). ok 3> D:\erl5.4.2.1\erts-5.4.2.1\bin> Problem with the API sockets ? Many thanks for all peoples. Pat. From vlad_dumitrescu@REDACTED Mon Nov 29 21:57:10 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Mon, 29 Nov 2004 21:57:10 +0100 Subject: newby questions References: <001601c4d64d$13db1fd0$3c6efea9@BLUESKY> Message-ID: Hi, > In a first shell, i launch epmd > > D:\erl5.4.2.1\erts-5.4.2.1\bin>epmd -d -d > and in a second shell, the following command seen working sometimes > but always without a new node. > D:\erl5.4.2.1\erts-5.4.2.1\bin>erl -sname ping > Eshell V5.4.2.1 (abort with ^G) > 1>nodes(known). > [nonode@REDACTED] If you have two nodes up, they don't get to know about each other unless told so. One way is to do in one of them erl -sname a erl -sname b (a@REDACTED)1> net_adm:ping(b@REDACTED). <--- this! (a@REDACTED)1> nodes(). [b@REDACTED] regards, Vlad From richardc@REDACTED Tue Nov 30 10:54:08 2004 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 30 Nov 2004 10:54:08 +0100 Subject: New test release of EDoc - feedback wanted In-Reply-To: References: <4190E40C.6060508@csd.uu.se> <1100023901.2275.4.camel@csanto.diit.unict.it> Message-ID: <41AC4340.60907@csd.uu.se> Yep - it's an updated EDoc! 0.6a - or something. http://user.it.uu.se/~richardc/edoc/ (Note: _requires_ updated syntax tools, found in the same location above.) Self-generated docs at: http://user.it.uu.se/~richardc/edoc/doc/edoc/ Go ahead and test it, and it will be included in R10-2 in a couple of weeks (I hope). Let me know what you think about the new features. News: - Better usage documentation. - All or most options documented (there's a lot of them). - Wiki-style verbatim quoting! - New way of scanning source code can handle almost all programs without requiring preprocessing! - Try-expressions properly supported by syntax tools. - Other stuff I can't remember. Enjoy! /Richard From vances@REDACTED Tue Nov 30 11:50:44 2004 From: vances@REDACTED (Vance Shipley) Date: Tue, 30 Nov 2004 05:50:44 -0500 Subject: rb:show/1 problem Message-ID: <20041130105044.GA18568@frogman.motivity.ca> Folks, There is a problem with rb:show/1 in R10B which appears after you run it with an integer() argument. It prints the report the first time but the next time it prints the error below. -Vance rb: ERROR! A report on bad form was encountered. It can not be printed to the log. Details: "2004-11-30 05:37:41" {{{2004,11,30},{5,37,41}}, {info_report,<0.33.0>, {<0.36.0>, progress, [{supervisor,{local,sasl_safe_sup}}, {started, [{pid,<0.37.0>}, {name,alarm_handler}, {mfa,{alarm_handler,start_link,[]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}]}]}}} rb: Can not reopen standard_io. Logging aborted. From ulf.wiger@REDACTED Tue Nov 30 14:11:26 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 30 Nov 2004 14:11:26 +0100 Subject: New test release of EDoc - feedback wanted Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F54029B4@ESEALNT442.al.sw.ericsson.se> Richard Carlsson wrote: > Yep - it's an updated EDoc! 0.6a - or something. > > http://user.it.uu.se/~richardc/edoc/ How do the syntax_tools and xmerl archives in that same location compare with the ones in OTP R10B? Regards, Uffe From richardc@REDACTED Tue Nov 30 15:14:46 2004 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 30 Nov 2004 15:14:46 +0100 Subject: New test release of EDoc - feedback wanted In-Reply-To: <37FB7AA6F5F9814FB634A7BF4C35A6F54029B4@ESEALNT442.al.sw.ericsson.se> References: <37FB7AA6F5F9814FB634A7BF4C35A6F54029B4@ESEALNT442.al.sw.ericsson.se> Message-ID: <41AC8056.70303@csd.uu.se> Ulf Wiger (AL/EAB) wrote: > Richard Carlsson wrote: > >>Yep - it's an updated EDoc! 0.6a - or something. >> >> http://user.it.uu.se/~richardc/edoc/ > > How do the syntax_tools and xmerl archives in that > same location compare with the ones in OTP R10B? The R10B version did not have the new verbatim-quoting (at least not officially and in the current form), nor the improved scanning, nor proper try-expression support. Some EDoc options were changed before they were documented, so if you have used a previously undocumented option, you might want to see what the new documentation says about it. /Richard From richardc@REDACTED Tue Nov 30 15:14:02 2004 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 30 Nov 2004 15:14:02 +0100 Subject: EDoc - plugins wanted In-Reply-To: <41AC4340.60907@csd.uu.se> References: <4190E40C.6060508@csd.uu.se> <1100023901.2275.4.camel@csanto.diit.unict.it> <41AC4340.60907@csd.uu.se> Message-ID: <41AC802A.5000902@csd.uu.se> If anybody out there uses things like DocBook and would like EDoc to generate that kind of output: you're most welcome to start hacking new plugins! It's pretty easy to modify (copies of) the edoc_doclet and edoc_layout modules to do things a bit differently. (And don't forget to send them to me when you have something that works.) /Richard From ulf.wiger@REDACTED Tue Nov 30 15:58:17 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 30 Nov 2004 15:58:17 +0100 Subject: parallel LC Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F54029B5@ESEALNT442.al.sw.ericsson.se> For those of you who like to extend the Erlang language, there's a really nifty feature in the language Cryptol (http://www.cryptol.net). Cryptol is THE programming language if you want to implement crypto algorithms. The nifty feature I had in mind is called 'parallel list comprehension'. Example: [| (x, y) || x <- xs || y <- ys|] if xs = [1 2 3 4] and ys [a b c d], we'd get [(1 a) (2 b) (3 c) (4 d)] which happens to work just like (the undocumented) lists:zip([1,2,3,4], [a,b,c,d]) in Erlang. The resulting list will be the same length as the shortest list in the parallel comprehension (which differs slightly from lists:zipwith/3 and lists:zipwith3/4) Implementing parallel LC in Erlang would be a breeze... it's just a matter of hacking some transform code in the compiler. Unfortunately, if I read the source correctly, the transform for list comprehensions is done in Core Erlang, and I'm afraid I'm not up to speed on that. So, anyone up for a weekend hack? (-: /Uffe