From joelr1@REDACTED Sat Oct 1 09:44:53 2005 From: joelr1@REDACTED (Joel Reymont) Date: Sat, 1 Oct 2005 09:44:53 +0200 Subject: Partial SSL Message-ID: <4BF07CF1-4A88-42E6-935E-10DDFBD3E4DB@gmail.com> Folks, There's a way to do SSL where you do the initial handshake and then enable/disable encryption of the connection at will. This is possible with OpenSSL but is it possible with Erlang's implementation? I need this for a poker protocol. The folks who built it in C++ apparently realized that going SSL all the way generated too much traffic for them so they handshake and then enable SSL for their most important packets. From my reading into SSL I think the server sends the public key, the client uses that to encrypt its block/session key (asymetric encryption) and once the server decodes the session key using its private key the session key is used from then on. Maybe I could just implement the handshake in Erlang with my modified crypto driver and skip the SSL module. What do you recon? Thanks, Joel -- http://wagerlabs.com/ From surindar.shanthi@REDACTED Sat Oct 1 13:56:01 2005 From: surindar.shanthi@REDACTED (Surindar Sivanesan) Date: Sat, 1 Oct 2005 17:26:01 +0530 Subject: Regarding client-server communication Message-ID: <42ea5fb60510010456w6ae92ca4mae84916964e551c@mail.gmail.com> Hai all, When I'm working in client-server communication using gen_tcp module,I have sent message from client to server and server got that message.As an acknowledgement i sent message from server to client but client doesn't receive it.The recv( ) BIF in the client side returns {error,einval}.It is to be noted that i got the socket in the server side by using listen( ) and accept( ) BIFs and i got socket in the client side by using connect( ) BIF. I encounter the same problem when using gen_udp module for client-server communication.But here server itself not receive the message from the client.Here i use different port to open it in the client and server side.Also I'm not able to get the logic of client-server communication using gen_udp module. If anybody know how to come out of this problem, please reply. -- with regards, S.Surindar -------------- next part -------------- An HTML attachment was scrubbed... URL: From nm@REDACTED Sun Oct 2 20:13:51 2005 From: nm@REDACTED (Gaspar Chilingarov) Date: Sun, 2 Oct 2005 23:13:51 +0500 (AMST) Subject: Vim and Erlang syntax files update [2005-10-02] Message-ID: <53656.217.113.1.123.1128276831.squirrel@webmail.web.am> Hi there! I'm pleased to announce update of vim syntax files for vim: What is included in this package -- o little improvments and corrections of the erlang functions dictionary (for autocompleting) o bunch of definitions added in the end of ftplugin/erlang.vim file for general editing - like restoring cursor position on load, fold operations, buffer switching and etc. o in bonus/ directory there are small erl file, which allow you to write unit tests on your own (without setting up test_server), but still remain (practically) compatible with tests server in terms of exported functoins. It will require minimal changes to switch projecto to test_server later. o ftplugin/erlang.vim now allow you to use templates. I've defined only two yet -- for writing test cases, and for generating gen_server standard module callbacks. o some another improvments, which I do not remember :) Please send me any suggestions or reports about found misatakes. Distribution file in here -- http://www.nothing.am/erlang/vim-erlang-20051002.tgz In case if server do not respond (it have hardware problems sometimes) do not hesitate to contact me and request files by e-mail :) -- Gaspar Chilingarov System Administrator t +37491 419763 w www.netter.am e nm@REDACTED From casper2000a@REDACTED Mon Oct 3 05:59:05 2005 From: casper2000a@REDACTED (Eranga Udesh) Date: Mon, 3 Oct 2005 09:59:05 +0600 Subject: Release and Application Config Message-ID: <20051003034922.2153940000D@mail.omnibis.com> Hi, I have a ".app" file with "env" parameter for a certain application. When I changed that and run the application in shell mode, changes are available in the next run. But after I made the release, even though I change the .app file "env" parameter in the release directory, changes don't appear in the next run of the release in embedded mode. To apply the changes what I am currently do is re-create and re-install the release. Do .app parameters get cached in .boot or some other binary file? How can I change that without have to re-create and re-install the release? Thanks in advance, - Eranga From tpatro@REDACTED Mon Oct 3 08:54:40 2005 From: tpatro@REDACTED (Tamas Patrovics) Date: Mon, 3 Oct 2005 08:54:40 +0200 Subject: ESense 1.9 released Message-ID: Changes https://sourceforge.net/project/shownotes.php?group_id=139206&release_id=360761 Files https://sourceforge.net/projects/esense/ Homepage http://esense.sourceforge.net/ From tobbe@REDACTED Sat Oct 1 08:59:50 2005 From: tobbe@REDACTED (tobbe) Date: Sat, 1 Oct 2005 08:59:50 +0200 Subject: Jungerl fails to compile - UCS References: Message-ID: <20051001065950.B740646E39@bang.trapexit.org> Great! I've fixed it in Jungerl now. Cheers, Tobbe _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From enrique.marcote@REDACTED Sat Oct 1 13:28:58 2005 From: enrique.marcote@REDACTED (Enrique Marcote) Date: Sat, 1 Oct 2005 13:28:58 +0200 Subject: Help with learning Erlang In-Reply-To: <433A683A.50000@ituniv.se> References: <200509271713.04668.JMBALADO@terra.es> <433A683A.50000@ituniv.se> Message-ID: <868840700510010428o52ba6e01tbad1c5977d0bdd8b@mail.gmail.com> Erlang is becoming quite popular here at the University of A Coru?a thanks to the group Thomas mentions. Please Jose, feel free to contact me outside the list if you want. I'll be glad to talk to you. Best regards, Quique On 9/28/05, Thomas Arts wrote: > > Hi Jose > > There is a pretty strong group at the University of A Coruna that is > very well capable of > teaching Erlang. Why not take a course there? > Look for LFCIA. > > There are even people there that used Erlang for AI! > /Thomas > > Jose Balado wrote: > > > Hi, I am Jose Balado from Santiago de Compostela, (Galicia, Spain), and > would > >like to know if there is somebody, preferably near to meet in person, to > help > >me with learning Erlang or perhaps interested in learning it with me. > > > > I am studying second course of "Tecnico superior en administracion de > >sistemas informaticos", sorry but I don't know the equivalent degree in > >Europe. I would like to do a final proyect for this course with Erlang if > I > >be able to persuade the teacher, so any help to this matter will be > greatly > >appereciated. > > > > I would like to program some basic artificial intelligence problems > using > >Erlang and I am trying to do with Erlang the problems from Ivan Bratko > book > >"Prolog programming for articificial intelligence". I studied logic and a > >little prolog in my philosopy studies. I have a bachelor degree in > philosopy. > > > > Hey, I think only a bachelor degree in philosophy should be allowed to > be PhD > >"Doctor of Philosophy" :-) > > > > If anyone is willing to make a team with me please, let me know. > > > > > >Thank you very much, > >Jose > > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay@REDACTED Mon Oct 3 09:51:43 2005 From: jay@REDACTED (Jay Nelson) Date: Mon, 03 Oct 2005 00:51:43 -0700 Subject: ICFP 2005 conference Message-ID: <4340E30F.7080504@duomark.com> I wrote an article for this year's conference in Tallin. Unfortunately, I was not able to attend the conference and make the presentation. The topic was "A Stream Library using Erlang Binaries". The article should be posted soon on the erlang website, but it is also available along with the briefing I intended to give at http://www.duomark.com/erlang/ Comments, critiques and contributions are welcome. jay From thomasl_erlang@REDACTED Mon Oct 3 11:14:57 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Mon, 3 Oct 2005 02:14:57 -0700 (PDT) Subject: ICFP 2005 conference In-Reply-To: <4340E30F.7080504@duomark.com> Message-ID: <20051003091457.71109.qmail@web34403.mail.mud.yahoo.com> --- Jay Nelson wrote: > I wrote an article for this year's conference in > Tallin. Unfortunately, > I was not able to attend the conference and make the > presentation. The > topic was "A Stream Library using Erlang Binaries". > > The article should be posted soon on the erlang > website, but it is also > available along with the briefing I intended to give > at > http://www.duomark.com/erlang/ > > Comments, critiques and contributions are welcome. I found the paper very interesting -- in essence, a "global" approach to working with binaries (by using BIFs on 'bulk' binaries), rather than the "local" approach of bit syntax. It didn't hurt that the performance results were fairly impressive either. There were some rough edges to some details, but I think those can be smoothed out. Ideally, there should be some way to compile bit syntax into these sorts of BIFs. The bit syntax notation still is far more pleasant to use than BIF calls, and probably more flexible too. (Which is really a risk: if the compiler can't map to fast BIFs, there may be inexplicable performance drops, which can be quite annoying. But I digress.) At the same session at the workshop, the Hipe group presented a paper on bit-aligned binaries. For some algorithms, such as compression/decompression, this seems useful indeed; likewise, some of the messier protocols may suddenly become more pleasant to implement. Maybe the two can be combined somehow? Best, Thomas __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From chandrashekhar.mullaparthi@REDACTED Mon Oct 3 11:25:34 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Mon, 3 Oct 2005 10:25:34 +0100 Subject: Release and Application Config In-Reply-To: <20051003034922.2153940000D@mail.omnibis.com> References: <20051003034922.2153940000D@mail.omnibis.com> Message-ID: Hi, On 03/10/05, Eranga Udesh wrote: > Hi, > > I have a ".app" file with "env" parameter for a certain application. When I > changed that and run the application in shell mode, changes are available in > the next run. > > But after I made the release, even though I change the .app file "env" > parameter in the release directory, changes don't appear in the next run of > the release in embedded mode. To apply the changes what I am currently do is > re-create and re-install the release. > > Do .app parameters get cached in .boot or some other binary file? Yes - that is correct. They are in the boot file. You can examine the contents of the boot file as follows. 1> {ok, Bin} = file:read_file("myapp.boot"). 2> io:format("~p~n", [binary_to_term(Bin)]). > How can I > change that without have to re-create and re-install the release? Store your environment variables in a file called sys.config and invoke your system with the -config flag. erl -boot myapp.boot -config sys cheers Chandru From wilson.sh.tam@REDACTED Mon Oct 3 09:24:40 2005 From: wilson.sh.tam@REDACTED (Wilson Tam) Date: Mon, 3 Oct 2005 15:24:40 +0800 Subject: httpc pipeline problem. Message-ID: <7E7D2FDF-01B5-47D1-8396-1FF74BE69B5A@gmail.com> Hi, I recently upgrade my Erlang to R10B-7 with inet-4.5.1. The http:request pipeline seems not working with 'post' mode. For 'get' is fine. I have written a small problem to show the problem. After run the program and read the log from my Apache log. I saw that, 'get' is reusing the connection. But 'post' is not. Can anyone help? Thanks. - wilson == code ======= -module(testpipeline). -behaviour(gen_server). -export([start_link/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2]). -export([code_change/3, terminate/2]). -define(HOWALL_INTERVAL, 500). start_link(Url) -> gen_server:start_link({local, testpipeline}, testpipeline, [Url], []). init(Url) -> timer:send_after(2000, poll), http:set_options([{pipeline_timeout, 60000000}, {max_sessions, 10}]), {ok, Url}. terminate(_, _State) -> ok. code_change(_OldVsn, State, _Extra) -> {ok, State}. handle_call(_, _, State) -> {reply, ok, State}. handle_cast(_, _S) -> {noreply, _S}. handle_info(poll, S) -> testpost(S), testget(S), timer:send_after(2000, poll), {noreply, S}. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% testpost([S]) -> case http:request(post, {S, [], "application/x-www-form- urlencoded", []}, [], []) of {ok, {{_Version, _Code, _ReasonPhrase}, _Headers, Body}} -> io:format("~p~n", [Body]); {error, Reason} -> io:format("Error: ~p~n", [Reason]) end. testget([S]) -> case http:request(get, {S, []}, [], []) of {ok, {{_Version, _Code, _ReasonPhrase}, _Headers, Body}} -> io:format("~p~n", [Body]); {error, Reason} -> io:format("Error: ~p~n", [Reason]) end. == code end === From chandrashekhar.mullaparthi@REDACTED Mon Oct 3 12:18:53 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Mon, 3 Oct 2005 11:18:53 +0100 Subject: dbg match spec Message-ID: Hi, If I had code like this: -module(dbg_test). -export([test/1]). test(N) when integer(N) -> io:format("Integer -> ~p~n", [N]); test({'A', X, Y}) -> io:format("A: X -> ~p, Y -> ~p~n", [X,Y]); test(L) -> io:format("L -> ~p~n", [L]). how would I write a dbg command to print out a trace when the second clause is matched? I've tried: dbg:tpl(dbg_test, test, 1, [{'$1',[{'==',{element,1,'$$'},'A'}],[call]}]). but it doesn't work. whereas this does: dbg:tpl(dbg_test, test, 1, [{'_',[],[call]}]). but it is not quite what I want...I want to single out the second clause. cheers Chandru From vipin@REDACTED Mon Oct 3 12:46:55 2005 From: vipin@REDACTED (vipin) Date: Mon, 03 Oct 2005 16:16:55 +0530 Subject: maximum number of simultaneous SSL connections ??? Message-ID: <43410C1F.8060803@picopeta.com> Hi all !!! What is the maximum number of simultaneous SSL connections on Linux system ? I've a erlang process which runs as a TCP server, the server listen on a defined port and spawns up a new child process to handle each client request. When the server is hit hard, the clients receive an 'esslconnect' error. Server stops creating any new SSL connection after it reaches a limit of 1018 even after setting the 'ulimit -n 10000' for the current shell. I'm getting the same error even after setting the 'ERL_MAX_PORTS' to some number (say 10000). Your suggestions would be welcome. Cheers, Vipin From bjorn@REDACTED Mon Oct 3 12:54:12 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 03 Oct 2005 12:54:12 +0200 Subject: maximum number of simultaneous SSL connections ??? In-Reply-To: <43410C1F.8060803@picopeta.com> References: <43410C1F.8060803@picopeta.com> Message-ID: It is 1024, but it will probably be changed in a future release. /Bj?rn vipin writes: > Hi all !!! > > What is the maximum number of simultaneous SSL connections on Linux > system ? > I've a erlang process which runs as a TCP server, the server listen on > a defined port and spawns up a new child process to handle each client > request. When the server is hit hard, the clients receive an > 'esslconnect' error. Server stops creating any new SSL connection > after it reaches a limit of 1018 even after setting the 'ulimit -n > 10000' for the current shell. > > I'm getting the same error even after setting the 'ERL_MAX_PORTS' to > some number (say 10000). > > Your suggestions would be welcome. > > Cheers, > Vipin -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From joelr1@REDACTED Mon Oct 3 12:55:43 2005 From: joelr1@REDACTED (Joel Reymont) Date: Mon, 3 Oct 2005 12:55:43 +0200 Subject: BEA offers real-time version of WebLogic server In-Reply-To: <1128093505.1412.141.camel@xam> References: <99D8D70E-A990-43D0-8FA7-89CD2DC1A297@gmail.com> <20050928163734.GA25942@vailsys.com> <1128093505.1412.141.camel@xam> Message-ID: <1EAF4814-6EC4-4EF7-88FF-85B933144B68@gmail.com> Massimo, Are you using HiPE at all or is this just plain-vanilla Erlang code? Thanks, Joel On Sep 30, 2005, at 5:18 PM, Massimo Cesaro wrote: > And this advantages, more than compensate the supposed lack of > performance compared with native C code; sometimes we found that > rethinking to algorithms with the Erlang point of view actually > outperformed plain vanilla C/C++ code. > > Massimo > -- http://wagerlabs.com/idealab From ulf.wiger@REDACTED Mon Oct 3 13:09:36 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 3 Oct 2005 13:09:36 +0200 Subject: dbg match spec Message-ID: Sorry Chandru, I can't figure it out either. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of chandru > Sent: den 3 oktober 2005 12:19 > To: erlang-questions@REDACTED > Subject: dbg match spec > > > Hi, > > If I had code like this: > > -module(dbg_test). > -export([test/1]). > > test(N) when integer(N) -> > io:format("Integer -> ~p~n", [N]); > test({'A', X, Y}) -> > io:format("A: X -> ~p, Y -> ~p~n", [X,Y]); > test(L) -> > io:format("L -> ~p~n", [L]). > > how would I write a dbg command to print out a trace when the second > clause is matched? > > I've tried: > > dbg:tpl(dbg_test, test, 1, > [{'$1',[{'==',{element,1,'$$'},'A'}],[call]}]). > > but it doesn't work. whereas this does: > > dbg:tpl(dbg_test, test, 1, [{'_',[],[call]}]). > > but it is not quite what I want...I want to single out the > second clause. > > cheers > Chandru > From joelr1@REDACTED Mon Oct 3 13:24:42 2005 From: joelr1@REDACTED (Joel Reymont) Date: Mon, 3 Oct 2005 13:24:42 +0200 Subject: maximum number of simultaneous SSL connections ??? In-Reply-To: <43410C1F.8060803@picopeta.com> References: <43410C1F.8060803@picopeta.com> Message-ID: <324243F1-AF71-4C27-811E-C7FBCB965B89@gmail.com> You are not on Mac OSX, are you? I was in the same situation with regular TCP connections (I don't think this is an issue with SSL) until I changed FD_SETSIZE in sys/types.h (I think) and recompiled Erlang. You can go up to 10240 under Mac OSX apparently. On Oct 3, 2005, at 12:46 PM, vipin wrote: > I'm getting the same error even after setting the 'ERL_MAX_PORTS' > to some number (say 10000). -- http://wagerlabs.com/idealab From joelr1@REDACTED Mon Oct 3 13:29:51 2005 From: joelr1@REDACTED (Joel Reymont) Date: Mon, 3 Oct 2005 13:29:51 +0200 Subject: maximum number of simultaneous SSL connections ??? In-Reply-To: References: <43410C1F.8060803@picopeta.com> Message-ID: This is a big bummer, btw, because I went out of my way to get my poker server to accept more than 1000 connections and I'm back to square one now that I need SSL :-(. Regardless of SSL I cannot get above 3-4K connections (roughly) with regular TCP so I guess I have to start hacking OTP instead of complaining... On Oct 3, 2005, at 12:54 PM, Bjorn Gustavsson wrote: > It is 1024, but it will probably be changed in a future release. -- http://wagerlabs.com/idealab From siri.hansen@REDACTED Mon Oct 3 13:19:33 2005 From: siri.hansen@REDACTED (Siri Hansen (EAB)) Date: Mon, 3 Oct 2005 13:19:33 +0200 Subject: dbg match spec In-Reply-To: References: Message-ID: <17217.5061.668023.351542@gargle.gargle.HOWL> Hi Chandru - Hope you are well!! I'm sending from an address which is not member of the erlang list, so this might not come out on the list - but anyway... You could try dbg:tpl(dbg_test, test, 1, [{[{'A','_','_'}],[],[]}]). or dbg:tpl(dbg_test, test, 1, [{['$1'],[{'==',{element,1,'$1'},'A'}],[]}]). (But what is the 'call' command you put in the match spec body?) BR /siri chandru wrote: > Hi, > > If I had code like this: > > -module(dbg_test). > -export([test/1]). > > test(N) when integer(N) -> > io:format("Integer -> ~p~n", [N]); > test({'A', X, Y}) -> > io:format("A: X -> ~p, Y -> ~p~n", [X,Y]); > test(L) -> > io:format("L -> ~p~n", [L]). > > how would I write a dbg command to print out a trace when the second > clause is matched? > > I've tried: > > dbg:tpl(dbg_test, test, 1, [{'$1',[{'==',{element,1,'$$'},'A'}],[call]}]). > > but it doesn't work. whereas this does: > > dbg:tpl(dbg_test, test, 1, [{'_',[],[call]}]). > > but it is not quite what I want...I want to single out the second clause. > > cheers > Chandru From joelr1@REDACTED Mon Oct 3 13:35:59 2005 From: joelr1@REDACTED (Joel Reymont) Date: Mon, 3 Oct 2005 13:35:59 +0200 Subject: maximum number of simultaneous SSL connections ??? In-Reply-To: References: <43410C1F.8060803@picopeta.com> Message-ID: Bjorn, How can it be changed now, i.e. where in OTP is this hardcoded? Thanks, Joel On Oct 3, 2005, at 12:54 PM, Bjorn Gustavsson wrote: > It is 1024, but it will probably be changed in a future release. > -- http://wagerlabs.com/idealab From Lennart.Ohman@REDACTED Mon Oct 3 13:44:25 2005 From: Lennart.Ohman@REDACTED (=?iso-8859-1?Q?Lennart_=D6hman?=) Date: Mon, 3 Oct 2005 13:44:25 +0200 Subject: SV: dbg match spec References: Message-ID: Hi, but are you allowed to have a '$1' variable to match the entire list of arguments? And if you are, then '$$' must expand to a list of a list ('$$' means a list of all $variable bindings). Hence it must be [[{'A',foo,bar}]] of which then element 1 will not be applicable!? >[{'$1',[{'==',{element,1,'$$'},'A'}],[call]}]). Best Regards, Lennart ------------------------------------------------------------- Lennart Ohman phone : +46-8-587 623 27 Sj?land & Thyselius Telecom AB cellular: +46-70-552 6735 Sehlstedtsgatan 6 fax : +46-8-667 8230 SE-115 28 STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED ________________________________ Fr?n: owner-erlang-questions@REDACTED genom Ulf Wiger (AL/EAB) Skickat: m? 2005-10-03 13:09 Till: chandru; erlang-questions@REDACTED ?mne: RE: dbg match spec Sorry Chandru, I can't figure it out either. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of chandru > Sent: den 3 oktober 2005 12:19 > To: erlang-questions@REDACTED > Subject: dbg match spec > > > Hi, > > If I had code like this: > > -module(dbg_test). > -export([test/1]). > > test(N) when integer(N) -> > io:format("Integer -> ~p~n", [N]); > test({'A', X, Y}) -> > io:format("A: X -> ~p, Y -> ~p~n", [X,Y]); > test(L) -> > io:format("L -> ~p~n", [L]). > > how would I write a dbg command to print out a trace when the second > clause is matched? > > I've tried: > > dbg:tpl(dbg_test, test, 1, > [{'$1',[{'==',{element,1,'$$'},'A'}],[call]}]). > > but it doesn't work. whereas this does: > > dbg:tpl(dbg_test, test, 1, [{'_',[],[call]}]). > > but it is not quite what I want...I want to single out the > second clause. > > cheers > Chandru > -------------- next part -------------- An HTML attachment was scrubbed... URL: From casper2000a@REDACTED Mon Oct 3 14:09:25 2005 From: casper2000a@REDACTED (Eranga Udesh) Date: Mon, 3 Oct 2005 18:09:25 +0600 Subject: Release and Application Config In-Reply-To: Message-ID: <20051003115940.C105D40004A@mail.omnibis.com> Hi Chandru, Thanks for the advice. Crystal clear. - Eranga -----Original Message----- From: chandru [mailto:chandrashekhar.mullaparthi@REDACTED] Sent: Monday, October 03, 2005 3:26 PM To: Eranga Udesh Cc: Erlang Questions Subject: Re: Release and Application Config Hi, On 03/10/05, Eranga Udesh wrote: > Hi, > > I have a ".app" file with "env" parameter for a certain application. When I > changed that and run the application in shell mode, changes are available in > the next run. > > But after I made the release, even though I change the .app file "env" > parameter in the release directory, changes don't appear in the next run of > the release in embedded mode. To apply the changes what I am currently do is > re-create and re-install the release. > > Do .app parameters get cached in .boot or some other binary file? Yes - that is correct. They are in the boot file. You can examine the contents of the boot file as follows. 1> {ok, Bin} = file:read_file("myapp.boot"). 2> io:format("~p~n", [binary_to_term(Bin)]). > How can I > change that without have to re-create and re-install the release? Store your environment variables in a file called sys.config and invoke your system with the -config flag. erl -boot myapp.boot -config sys cheers Chandru From ulf.wiger@REDACTED Mon Oct 3 14:23:58 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 3 Oct 2005 14:23:58 +0200 Subject: dbg match spec Message-ID: Aargh! That's what the problem was! This single statement from the ERTS match spec guide: "In ETS the match head is a tuple() (or a single match variable) while it is a list (or a single match variable) when tracing." Having used match specifications mostly for ets, I forgot about this little detail. It's not exactly intuitively obvious... (: /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Siri > Hansen (EAB) > Sent: den 3 oktober 2005 13:20 > To: chandru; erlang-questions@REDACTED > Subject: Re: dbg match spec > > > Hi Chandru - Hope you are well!! > > I'm sending from an address which is not member of the erlang list, so > this might not come out on the list - but anyway... > > You could try > > > dbg:tpl(dbg_test, test, 1, [{[{'A','_','_'}],[],[]}]). > > or > > dbg:tpl(dbg_test, test, 1, > [{['$1'],[{'==',{element,1,'$1'},'A'}],[]}]). > > > (But what is the 'call' command you put in the match spec body?) > > BR > /siri > > > > chandru wrote: > > Hi, > > > > If I had code like this: > > > > -module(dbg_test). > > -export([test/1]). > > > > test(N) when integer(N) -> > > io:format("Integer -> ~p~n", [N]); > > test({'A', X, Y}) -> > > io:format("A: X -> ~p, Y -> ~p~n", [X,Y]); > > test(L) -> > > io:format("L -> ~p~n", [L]). > > > > how would I write a dbg command to print out a trace when the second > > clause is matched? > > > > I've tried: > > > > dbg:tpl(dbg_test, test, 1, > [{'$1',[{'==',{element,1,'$$'},'A'}],[call]}]). > > > > but it doesn't work. whereas this does: > > > > dbg:tpl(dbg_test, test, 1, [{'_',[],[call]}]). > > > > but it is not quite what I want...I want to single out the > second clause. > > > > cheers > > Chandru > From bjorn@REDACTED Mon Oct 3 15:47:05 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 03 Oct 2005 15:47:05 +0200 Subject: maximum number of simultaneous SSL connections ??? In-Reply-To: References: <43410C1F.8060803@picopeta.com> Message-ID: It can be changed by redefining FD_SETSIZE when compiling C part of the ssl application. We, however, will try to rewrite the code so that it can use poll() on platforms that support it. /Bjorn Joel Reymont writes: > Bjorn, > > How can it be changed now, i.e. where in OTP is this hardcoded? > > Thanks, Joel > > On Oct 3, 2005, at 12:54 PM, Bjorn Gustavsson wrote: > > > > It is 1024, but it will probably be changed in a future release. > > > > -- > http://wagerlabs.com/idealab > > > > > > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From ulf.wiger@REDACTED Mon Oct 3 17:21:09 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 3 Oct 2005 17:21:09 +0200 Subject: guard syntax Message-ID: Is there a profound reason why I can't write a guard like this: is_one(X) when erlang:'=='(X,1) -> true; is_one(X) -> false. Since this works: is_one(X) when X == 1 -> true; ... and erlang:'=='(X,1) and X == 1 appear to be the same thing? (And yes, I happen to have a certain case where it would be convenient -- not that I couldn't live without it =) /Uffe From csanto@REDACTED Mon Oct 3 18:14:36 2005 From: csanto@REDACTED (Corrado Santoro) Date: Mon, 03 Oct 2005 18:14:36 +0200 Subject: guard syntax In-Reply-To: References: Message-ID: <434158EC.8000003@diit.unict.it> Ulf Wiger (AL/EAB) wrote: > Is there a profound reason why I can't write a guard like this: > > is_one(X) when erlang:'=='(X,1) -> true; > is_one(X) -> false. > > Since this works: > > is_one(X) when X == 1 -> true; > ... > > and erlang:'=='(X,1) and X == 1 appear to be the same thing? It seems that erlang:'==' is equivalent to a function call while == is a BIF, and it's not possible to use function calls in guards. Am I right? --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 7382144 Int. (5) 8035 +39 095 7382380 +39 095 7382365 +39 095 7382364 VoIP: sip:8035@REDACTED Fax: +39 095 7382397 EMail: csanto@REDACTED Personal Home Page: http://www.diit.unict.it/users/csanto NUXI Home Page: http://nuxi.iit.unict.it ====================================================== From vipin@REDACTED Tue Oct 4 07:56:40 2005 From: vipin@REDACTED (vipin) Date: Tue, 04 Oct 2005 11:26:40 +0530 Subject: maximum number of simultaneous SSL connections ??? In-Reply-To: References: <43410C1F.8060803@picopeta.com> Message-ID: <43421998.4090904@picopeta.com> Is there any encryption mechanism which could be used temporarily in place of SSL? (until you find a permanent solution for this problem) Since i need a secure connection between a server and a client. And also server must be in a position to handle a large number of clients simultaneosly (>10000). -- Vipin Bjorn Gustavsson wrote: >It is 1024, but it will probably be changed in a future release. > >/Bj?rn > >vipin writes: > > > >>Hi all !!! >> >>What is the maximum number of simultaneous SSL connections on Linux >>system ? >>I've a erlang process which runs as a TCP server, the server listen on >>a defined port and spawns up a new child process to handle each client >>request. When the server is hit hard, the clients receive an >>'esslconnect' error. Server stops creating any new SSL connection >>after it reaches a limit of 1018 even after setting the 'ulimit -n >>10000' for the current shell. >> >>I'm getting the same error even after setting the 'ERL_MAX_PORTS' to >>some number (say 10000). >> >>Your suggestions would be welcome. >> >>Cheers, >>Vipin >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony@REDACTED Tue Oct 4 08:43:00 2005 From: tony@REDACTED (Tony Rogvall) Date: Tue, 4 Oct 2005 08:43:00 +0200 Subject: maximum number of simultaneous SSL connections ??? In-Reply-To: References: <43410C1F.8060803@picopeta.com> Message-ID: 3 okt 2005 kl. 15.47 skrev Bjorn Gustavsson: > It can be changed by redefining FD_SETSIZE when compiling C part of > the ssl application. We, however, will try to rewrite the code so that > it can use poll() on platforms that support it. > I think we should start thinking of integrating ssl with inet_drv ? Then ssl will be better supported and a bit more efficient. When it comes to number of connection it will be a better match with that of number of gen_tcp sockets. Further more it is a lot easier to implement stuff such as Upgrade/Start TLS. Just a thought. /Tony From massimo.cesaro@REDACTED Mon Oct 3 17:36:59 2005 From: massimo.cesaro@REDACTED (Massimo Cesaro) Date: 03 Oct 2005 17:36:59 +0200 Subject: BEA offers real-time version of WebLogic server In-Reply-To: <1EAF4814-6EC4-4EF7-88FF-85B933144B68@gmail.com> References: <99D8D70E-A990-43D0-8FA7-89CD2DC1A297@gmail.com> <20050928163734.GA25942@vailsys.com> <1128093505.1412.141.camel@xam> <1EAF4814-6EC4-4EF7-88FF-85B933144B68@gmail.com> Message-ID: <1128353820.1411.253.camel@xam> We use plain-vanilla Erlang for development and debugging, and HiPE for production systems. BTW, we run our applications on both mono and dual CPU systems, although we currently stick to the mono thread BEAM for shipping systems. I should add that to communicate with the hardware (which we also designed and developed) we are using Erlang port drivers. The fact of not using Erlang for every single task into the system is not a source of problem for us. The idea is to use the language best suited to solve the problem, but we take every measure to minimize non-Erlang code in our system. Regards, Massimo On Mon, 2005-10-03 at 12:55, Joel Reymont wrote: > Massimo, > > Are you using HiPE at all or is this just plain-vanilla Erlang code? > > Thanks, Joel > > On Sep 30, 2005, at 5:18 PM, Massimo Cesaro wrote: > > > And this advantages, more than compensate the supposed lack of > > performance compared with native C code; sometimes we found that > > rethinking to algorithms with the Erlang point of view actually > > outperformed plain vanilla C/C++ code. > > > > Massimo > > > > -- > http://wagerlabs.com/idealab > > > > From joelr1@REDACTED Tue Oct 4 10:59:35 2005 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 4 Oct 2005 10:59:35 +0200 Subject: maximum number of simultaneous SSL connections ??? In-Reply-To: <43421998.4090904@picopeta.com> References: <43410C1F.8060803@picopeta.com> <43421998.4090904@picopeta.com> Message-ID: <4424D28D-7C71-4A67-A21F-0195C612B4A4@gmail.com> Vipin, You could encrypt/decrypt manually. It would go like this: 1) Send RSA public key to the client 2) Have client generate a session key and send it back encrypted 3) Decrypt session key on the server using server's public key 4) Have server and client use block encryption like RC5-CBC for the rest of the session The advantage of this approach is that you can encrypt just the packets you want which will save you a bit of traffic. Joel On Oct 4, 2005, at 7:56 AM, vipin wrote: > Is there any encryption mechanism which could be used temporarily > in place of SSL? (until you find a permanent solution for this > problem) > Since i need a secure connection between a server and a client. > And also server must be in a position to handle a large number of > clients simultaneosly (>10000). -- http://wagerlabs.com/idealab From rvg@REDACTED Tue Oct 4 12:59:53 2005 From: rvg@REDACTED (Rudolph van Graan) Date: Tue, 4 Oct 2005 12:59:53 +0200 Subject: Mnesia Bug with select and disc_only_copies tables Message-ID: <2EBD5DF9-386E-4403-850D-31D599969F68@patternmatched.com> Hey there, Think I found a bug in mnesia select. If you use select(Tab, MatchSpec, NObjects, Lock) on a disc_only table, it never returns any rows (I.e. using NObjects to limit the number of rows). The same query works if you use disc_copies instead. Regards, Rudolph van Graan From ulf.wiger@REDACTED Tue Oct 4 15:49:47 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 4 Oct 2005 15:49:47 +0200 Subject: compile:forms/1 crashes Message-ID: Using compiler-4.3.9 (the latest one). I'm trying to generate some code, and am experiencing the lack of user-friendliness in compile:forms/1. Just about all errors in the generated forms manifest themselves as crashes in erl_lint or other. Below is a crash from beam_dead. I'm not sure whether this is a bug in my generated code, or in the compiler. /Uffe (foo@REDACTED)92> rdbms_validate:codegen([person], 1). [{attribute,1,module,rdbms_jit}, ... (foo@REDACTED)93> io:format("~p~n", [v(92)]). [{attribute,1,module,rdbms_jit}, {attribute,2,export,[{validate,2}]}, {function,3, validate, 2, [{clause,3, [{atom,3,person},{var,3,'Object'}], [], [{call,3,{atom,3,validate_person},[{var,3,'Object'}]}]}]}, {function,4, validate_person, 2, [{clause,4, [{atom,4,person}, {tuple,4, [{var,4,person}, {var,4,'V_id'}, {var,4,'V_name'}, {var,4,'V_addr'}, {var,4,'V_age'}]}], [], [{'if',6, [{clause,6, [], [[{op,6, '=/=', {var,6,'V_id'}, {atom,6,'#.[].#'}}]], [{atom,6,true}]}, {clause,7, [], [[{atom,7,true}]], [{call, 8, {atom,8,throw}, [{tuple, 8, [{atom,8,type_error}, {atom,8,id}, {tuple, 9, [{atom,9,expected}, {atom,9,not_null}]}]}]}]}]}, {'if',8, [{clause,8, [], [[{call, 8, {atom,8,is_integer}, [{var,8,'V_age'}]}]], [{atom,8,true}]}, {clause,9, [], [[{atom,9,true}]], [{call, 10, {atom,10,throw}, [{tuple, 10, [{atom,10,type_error}, {atom,10,age}, {tuple, 11, [{atom,11,expected}, {atom,11,integer}]}]}]}]}]}, {call,10,{atom,10,validate_oid},[{var,10,'V_id'}]}, {call,11,{atom,11,validate_string},[{var,11,'V_name'}]}, {'if',12, [{clause,12, [], [[{op,12, '=<', {integer,12,0}, {var,12,'V_age'}}, {op,12, '=<', {var,12,'V_age'}, {integer,12,100}}]], [{atom,12,true}]}, {clause,13, [], [[{atom,13,true}]], [{call, 14, {atom,14,throw}, [{tuple, 14, [{atom,14,value_error}, {atom,14,age}, {tuple, 15, [{atom,15,expected}, {tuple, 15, [{atom,15,inclusive}, {integer,15,0}, {integer,15,100}]}]}]}]}]}]}]}]}] ok (foo@REDACTED)94> compile:forms(v(92)). .:none: internal error in beam_dead; crash reason: {{case_clause,{'EXIT',{function_clause, [{dict,fetch_val,[5,[]]}, {beam_clean,find_all_used,3}, {beam_clean,module,2}, {beam_dead,module,2}, {compile, '-select_passes/2-anonymous-2-', 2}, {compile, '-internal_comp/4-anonymous-1-', 2}, {compile,fold_comp,3}, {compile,internal_comp,4}]}}}, [{compile,'-select_passes/2-anonymous-2-',2}, {compile,'-internal_comp/4-anonymous-1-',2}, {compile,fold_comp,3}, {compile,internal_comp,4}, {compile,internal,3}]} .:4: Warning: variable 'V_addr' is unused .:4: Warning: variable person is unused error From ulf.wiger@REDACTED Tue Oct 4 15:59:48 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 4 Oct 2005 15:59:48 +0200 Subject: compile:forms/1 crashes Message-ID: Ok, pretty-printing the generated code, I found three bugs. :) ... :( Still, if compile:forms/1 is going to be a documented function, it could do with some front-end that catches errors and tries to give less vitriolic feedback. /Uffe > -----Original Message----- > From: Ulf Wiger (AL/EAB) > Sent: den 4 oktober 2005 15:50 > To: 'erlang-questions@REDACTED' > Subject: compile:forms/1 crashes > > > Using compiler-4.3.9 (the latest one). > > I'm trying to generate some code, and am experiencing the > lack of user-friendliness in compile:forms/1. > Just about all errors in the generated forms manifest themselves > as crashes in erl_lint or other. Below is a crash from beam_dead. > > I'm not sure whether this is a bug in my generated code, or in > the compiler. > > /Uffe > > > (foo@REDACTED)92> rdbms_validate:codegen([person], 1). > [{attribute,1,module,rdbms_jit}, > ... > (foo@REDACTED)93> io:format("~p~n", [v(92)]). > [{attribute,1,module,rdbms_jit}, > {attribute,2,export,[{validate,2}]}, > {function,3, > validate, > 2, > [{clause,3, > [{atom,3,person},{var,3,'Object'}], > [], > > [{call,3,{atom,3,validate_person},[{var,3,'Object'}]}]}]}, > {function,4, > validate_person, > 2, > [{clause,4, > [{atom,4,person}, > {tuple,4, > [{var,4,person}, > {var,4,'V_id'}, > {var,4,'V_name'}, > {var,4,'V_addr'}, > {var,4,'V_age'}]}], > [], > [{'if',6, > [{clause,6, > [], > [[{op,6, > '=/=', > {var,6,'V_id'}, > {atom,6,'#.[].#'}}]], > [{atom,6,true}]}, > {clause,7, > [], > [[{atom,7,true}]], > [{call, > 8, > {atom,8,throw}, > [{tuple, > 8, > [{atom,8,type_error}, > {atom,8,id}, > {tuple, > 9, > [{atom,9,expected}, > > {atom,9,not_null}]}]}]}]}]}, > {'if',8, > [{clause,8, > [], > [[{call, > 8, > {atom,8,is_integer}, > [{var,8,'V_age'}]}]], > [{atom,8,true}]}, > {clause,9, > [], > [[{atom,9,true}]], > [{call, > 10, > {atom,10,throw}, > [{tuple, > 10, > [{atom,10,type_error}, > {atom,10,age}, > {tuple, > 11, > > [{atom,11,expected}, > > {atom,11,integer}]}]}]}]}]}, > > {call,10,{atom,10,validate_oid},[{var,10,'V_id'}]}, > > {call,11,{atom,11,validate_string},[{var,11,'V_name'}]}, > {'if',12, > [{clause,12, > [], > [[{op,12, > '=<', > {integer,12,0}, > {var,12,'V_age'}}, > {op,12, > '=<', > {var,12,'V_age'}, > {integer,12,100}}]], > [{atom,12,true}]}, > {clause,13, > [], > [[{atom,13,true}]], > [{call, > 14, > {atom,14,throw}, > [{tuple, > 14, > [{atom,14,value_error}, > {atom,14,age}, > {tuple, > 15, > > [{atom,15,expected}, > {tuple, > 15, > > [{atom,15,inclusive}, > > {integer,15,0}, > > {integer,15,100}]}]}]}]}]}]}]}]}] > ok > (foo@REDACTED)94> compile:forms(v(92)). > .:none: internal error in beam_dead; > crash reason: {{case_clause,{'EXIT',{function_clause, > [{dict,fetch_val,[5,[]]}, > {beam_clean,find_all_used,3}, > {beam_clean,module,2}, > {beam_dead,module,2}, > {compile, > > '-select_passes/2-anonymous-2-', > 2}, > {compile, > > '-internal_comp/4-anonymous-1-', > 2}, > {compile,fold_comp,3}, > > {compile,internal_comp,4}]}}}, > [{compile,'-select_passes/2-anonymous-2-',2}, > {compile,'-internal_comp/4-anonymous-1-',2}, > {compile,fold_comp,3}, > {compile,internal_comp,4}, > {compile,internal,3}]} > .:4: Warning: variable 'V_addr' is unused > .:4: Warning: variable person is unused > error > > From dgud@REDACTED Tue Oct 4 16:13:54 2005 From: dgud@REDACTED (Dan Gudmundsson) Date: Tue, 4 Oct 2005 16:13:54 +0200 Subject: Mnesia Bug with select and disc_only_copies tables In-Reply-To: <2EBD5DF9-386E-4403-850D-31D599969F68@patternmatched.com> References: <2EBD5DF9-386E-4403-850D-31D599969F68@patternmatched.com> Message-ID: <17218.36386.765716.288444@rian.du.uab.ericsson.se> Rudolph van Graan writes: > Hey there, > > Think I found a bug in mnesia select. > > If you use > > select(Tab, MatchSpec, NObjects, Lock) > > on a disc_only table, it never returns any rows (I.e. using NObjects > to limit the number of rows). The same query works if you use > disc_copies instead. > > Regards, > > Rudolph van Graan hi See the manual: For efficiency the NObjects is a recommendation only and the result may contain anything from an empty list to all avail- able results. (it is written because of dets :-) It works here: 1> mnesia:start(). 2> mnesia:create_table(a, []). {atomic,ok} 6> mnesia:change_table_copy_type(schema, node(), disc_copies). {atomic,ok} 7> [mnesia:dirty_write({a, N,N}) || N <- lists:seq(1,1000)]. 8> mnesia:change_table_copy_type(a, node(), disc_only_copies). {atomic,ok} 14> P = ets:fun2ms(fun({a,_,A}) when A > 990 -> A end). 16> F = fun('$end_of_table', _, Acc) -> Acc; ({Recs,Cont}, Fun,Acc) -> R = mnesia:select(Cnt), Fun(R, Fun, Recs ++Acc) end. 17> mnesia:transaction(fun() -> Cont = mnesia:select(a, P, 10, read), F(Cont, F, []) end). {atomic,[996,997,1000,998,994,992,993,995,999,991]} /Dan From rvg@REDACTED Tue Oct 4 17:01:29 2005 From: rvg@REDACTED (Rudolph van Graan) Date: Tue, 4 Oct 2005 17:01:29 +0200 Subject: Mnesia Bug with select and disc_only_copies tables In-Reply-To: <17218.36386.765716.288444@rian.du.uab.ericsson.se> References: <2EBD5DF9-386E-4403-850D-31D599969F68@patternmatched.com> <17218.36386.765716.288444@rian.du.uab.ericsson.se> Message-ID: > > See the manual: > > For efficiency > the NObjects is a recommendation only and the result > may contain anything from an empty list to all avail- > able results. Does "Empty list" here mean "empty" even though the query matched results? Or does it mean "Empty" when there was no results? For me "recommendation" means that the query should return *at most* NObjects if any results matched, or if the continuation mechanism fails (for dets) *all* the data. But not nothing. My experience shows that by only removing the NObjects argument, the query worked, otherwise it did not return *any* data. The same query without NObjects did return data. I haven't had time to dig around too much, but your code runs here as well. My table has indices, which might be part of the issue. I am happy if the query *ignores* the NObject, but not for it to return no data. Do you want me to try and narrow this down to a reproducable scenario? > > (it is written because of dets :-) > > It works here: > > 1> mnesia:start(). > 2> mnesia:create_table(a, []). > {atomic,ok} > 6> mnesia:change_table_copy_type(schema, node(), disc_copies). > {atomic,ok} > 7> [mnesia:dirty_write({a, N,N}) || N <- lists:seq(1,1000)]. > 8> mnesia:change_table_copy_type(a, node(), disc_only_copies). > {atomic,ok} > 14> P = ets:fun2ms(fun({a,_,A}) when A > 990 -> A end). > 16> F = fun('$end_of_table', _, Acc) -> Acc; > ({Recs,Cont}, Fun,Acc) -> > R = mnesia:select(Cnt), > Fun(R, Fun, Recs ++Acc) > end. > 17> mnesia:transaction(fun() -> > Cont = mnesia:select(a, P, 10, read), > F(Cont, F, []) > end). > {atomic,[996,997,1000,998,994,992,993,995,999,991]} Regards, Rudolph From bjorn@REDACTED Tue Oct 4 17:03:10 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 04 Oct 2005 17:03:10 +0200 Subject: compile:forms/1 crashes In-Reply-To: References: Message-ID: There is a bug in erl_lint in R10B and earlier. It will do some validation only when it encounters an {eof,Line} term. If {eof,Line} is missing, it will, for instance, not validate local function calls. The workaround is to always include an {eof,Line} term as the last form in the list. The bug in erl_lint has already been fixed in our internal R11B development branch. We might fix it in R10B-8 too. /Bj?rn "Ulf Wiger (AL/EAB)" writes: > Using compiler-4.3.9 (the latest one). > > I'm trying to generate some code, and am experiencing the > lack of user-friendliness in compile:forms/1. > Just about all errors in the generated forms manifest themselves > as crashes in erl_lint or other. Below is a crash from beam_dead. > > I'm not sure whether this is a bug in my generated code, or in > the compiler. > > /Uffe > > > (foo@REDACTED)92> rdbms_validate:codegen([person], 1). > [{attribute,1,module,rdbms_jit}, > ... > (foo@REDACTED)93> io:format("~p~n", [v(92)]). > [{attribute,1,module,rdbms_jit}, > {attribute,2,export,[{validate,2}]}, > {function,3, > validate, > 2, > [{clause,3, > [{atom,3,person},{var,3,'Object'}], > [], > [{call,3,{atom,3,validate_person},[{var,3,'Object'}]}]}]}, > {function,4, > validate_person, > 2, > [{clause,4, > [{atom,4,person}, > {tuple,4, > [{var,4,person}, > {var,4,'V_id'}, > {var,4,'V_name'}, > {var,4,'V_addr'}, > {var,4,'V_age'}]}], > [], > [{'if',6, > [{clause,6, > [], > [[{op,6, > '=/=', > {var,6,'V_id'}, > {atom,6,'#.[].#'}}]], > [{atom,6,true}]}, > {clause,7, > [], > [[{atom,7,true}]], > [{call, > 8, > {atom,8,throw}, > [{tuple, > 8, > [{atom,8,type_error}, > {atom,8,id}, > {tuple, > 9, > [{atom,9,expected}, > {atom,9,not_null}]}]}]}]}]}, > {'if',8, > [{clause,8, > [], > [[{call, > 8, > {atom,8,is_integer}, > [{var,8,'V_age'}]}]], > [{atom,8,true}]}, > {clause,9, > [], > [[{atom,9,true}]], > [{call, > 10, > {atom,10,throw}, > [{tuple, > 10, > [{atom,10,type_error}, > {atom,10,age}, > {tuple, > 11, > [{atom,11,expected}, > {atom,11,integer}]}]}]}]}]}, > {call,10,{atom,10,validate_oid},[{var,10,'V_id'}]}, > {call,11,{atom,11,validate_string},[{var,11,'V_name'}]}, > {'if',12, > [{clause,12, > [], > [[{op,12, > '=<', > {integer,12,0}, > {var,12,'V_age'}}, > {op,12, > '=<', > {var,12,'V_age'}, > {integer,12,100}}]], > [{atom,12,true}]}, > {clause,13, > [], > [[{atom,13,true}]], > [{call, > 14, > {atom,14,throw}, > [{tuple, > 14, > [{atom,14,value_error}, > {atom,14,age}, > {tuple, > 15, > [{atom,15,expected}, > {tuple, > 15, > [{atom,15,inclusive}, > {integer,15,0}, > {integer,15,100}]}]}]}]}]}]}]}]}] > ok > (foo@REDACTED)94> compile:forms(v(92)). > .:none: internal error in beam_dead; > crash reason: {{case_clause,{'EXIT',{function_clause, > [{dict,fetch_val,[5,[]]}, > {beam_clean,find_all_used,3}, > {beam_clean,module,2}, > {beam_dead,module,2}, > {compile, > '-select_passes/2-anonymous-2-', > 2}, > {compile, > '-internal_comp/4-anonymous-1-', > 2}, > {compile,fold_comp,3}, > {compile,internal_comp,4}]}}}, > [{compile,'-select_passes/2-anonymous-2-',2}, > {compile,'-internal_comp/4-anonymous-1-',2}, > {compile,fold_comp,3}, > {compile,internal_comp,4}, > {compile,internal,3}]} > .:4: Warning: variable 'V_addr' is unused > .:4: Warning: variable person is unused > error > > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From " bengt.kleberg"@REDACTED Tue Oct 4 16:32:53 2005 From: " bengt.kleberg"@REDACTED (Bengt Kleberg) Date: Tue, 04 Oct 2005 16:32:53 +0200 Subject: Mnesia Bug with select and disc_only_copies tables In-Reply-To: <17218.36386.765716.288444@rian.du.uab.ericsson.se> References: <2EBD5DF9-386E-4403-850D-31D599969F68@patternmatched.com> <17218.36386.765716.288444@rian.du.uab.ericsson.se> Message-ID: <43429295.5030804@ericsson.com> On 2005-10-04 16:13, Dan Gudmundsson wrote: ...deleted > See the manual: > > For efficiency > the NObjects is a recommendation only and the result > may contain anything from an empty list to all avail- > able results. > does it mean that even if there are one or more objects in the table, the result list may still be empty? i have understood the manual as ''if there are no objects, the result will be an empty list. if there are some objects, the result may contain anything from a _one_ object list to all available results.'' am i wrong, again :-( bengt From dgud@REDACTED Wed Oct 5 08:35:01 2005 From: dgud@REDACTED (Dan Gudmundsson) Date: Wed, 5 Oct 2005 08:35:01 +0200 Subject: Mnesia Bug with select and disc_only_copies tables In-Reply-To: References: <2EBD5DF9-386E-4403-850D-31D599969F68@patternmatched.com> <17218.36386.765716.288444@rian.du.uab.ericsson.se> Message-ID: <17219.29717.528172.476919@rian.du.uab.ericsson.se> Rudolph van Graan writes: > > > > See the manual: > > > > For efficiency > > the NObjects is a recommendation only and the result > > may contain anything from an empty list to all avail- > > able results. > > > Does "Empty list" here mean "empty" even though the query matched > results? Or does it mean "Empty" when there was no results? For me > "recommendation" means that the query should return *at most* > NObjects if any results matched, or if the continuation mechanism > fails (for dets) *all* the data. But not nothing. It means that for this invocation there where no matching results, keep on looping until $end_of_table is reached. NObjects in the dets case means how many objects dets should read from file, i.e. read NObjects objects, run the match spec on them return the matching ones. So in example below, the empty list could have been returned 100 times before returning the expected result in the last call. > > My experience shows that by only removing the NObjects argument, the > query worked, otherwise it did not return *any* data. The same query > without NObjects did return data. > > I haven't had time to dig around too much, but your code runs here as > well. My table has indices, which might be part of the issue. I am > happy if the query *ignores* the NObject, but not for it to return no > data. > > Do you want me to try and narrow this down to a reproducable scenario? That whould be nice, you can email me directly /Dan > > > > > > (it is written because of dets :-) > > > > It works here: > > > > 1> mnesia:start(). > > 2> mnesia:create_table(a, []). > > {atomic,ok} > > 6> mnesia:change_table_copy_type(schema, node(), disc_copies). > > {atomic,ok} > > 7> [mnesia:dirty_write({a, N,N}) || N <- lists:seq(1,1000)]. > > 8> mnesia:change_table_copy_type(a, node(), disc_only_copies). > > {atomic,ok} > > 14> P = ets:fun2ms(fun({a,_,A}) when A > 990 -> A end). > > 16> F = fun('$end_of_table', _, Acc) -> Acc; > > ({Recs,Cont}, Fun,Acc) -> > > R = mnesia:select(Cnt), > > Fun(R, Fun, Recs ++Acc) > > end. > > 17> mnesia:transaction(fun() -> > > Cont = mnesia:select(a, P, 10, read), > > F(Cont, F, []) > > end). > > {atomic,[996,997,1000,998,994,992,993,995,999,991]} > Regards, > > Rudolph From " bengt.kleberg"@REDACTED Wed Oct 5 09:03:05 2005 From: " bengt.kleberg"@REDACTED (Bengt Kleberg) Date: Wed, 05 Oct 2005 09:03:05 +0200 Subject: Mnesia Bug with select and disc_only_copies tables In-Reply-To: <17219.29717.528172.476919@rian.du.uab.ericsson.se> References: <2EBD5DF9-386E-4403-850D-31D599969F68@patternmatched.com> <17218.36386.765716.288444@rian.du.uab.ericsson.se> <17219.29717.528172.476919@rian.du.uab.ericsson.se> Message-ID: <43437AA9.5080609@ericsson.com> On 2005-10-05 08:35, Dan Gudmundsson wrote: ...deleted > It means that for this invocation there where no matching results, > keep on looping until $end_of_table is reached. > > NObjects in the dets case means how many objects dets should read from > file, i.e. read NObjects objects, run the match spec on them return the > matching ones. is this behaviour the same for mnesia? (i notice you are writing ''in the dets case'' above). bengt From dgud@REDACTED Wed Oct 5 10:28:13 2005 From: dgud@REDACTED (Dan Gudmundsson) Date: Wed, 5 Oct 2005 10:28:13 +0200 Subject: Mnesia Bug with select and disc_only_copies tables In-Reply-To: <43437AA9.5080609@ericsson.com> References: <2EBD5DF9-386E-4403-850D-31D599969F68@patternmatched.com> <17218.36386.765716.288444@rian.du.uab.ericsson.se> <17219.29717.528172.476919@rian.du.uab.ericsson.se> <43437AA9.5080609@ericsson.com> Message-ID: <17219.36509.411415.389698@rian.du.uab.ericsson.se> Bengt Kleberg writes: > On 2005-10-05 08:35, Dan Gudmundsson wrote: > ...deleted > > It means that for this invocation there where no matching results, > > keep on looping until $end_of_table is reached. > > > > NObjects in the dets case means how many objects dets should read from > > file, i.e. read NObjects objects, run the match spec on them return the > > matching ones. > > is this behaviour the same for mnesia? (i notice you are writing ''in > the dets case'' above). That is the behaviour on disc_only_tables. From lennart.ostman@REDACTED Wed Oct 5 10:25:39 2005 From: lennart.ostman@REDACTED (=?iso-8859-1?Q?Lennart_=D6stman?=) Date: Wed, 5 Oct 2005 10:25:39 +0200 Subject: xmerl and entity references Message-ID: <001901c5c986$5e88c730$3201010a@cellpoint.se> Hi We are using xmerl 0.17. I believe my question is also valid for the latest xmerl version. We have some problem with the fact that XML input with entity references (amp, lt etc) will generate a deep list. As stated in comment above scan_entity_ref/2 in xmerl_scan.erl: "At some suitable point, we should flatten these, so that application-level processors should not have to be aware of this detail." Is that about to be implemented? If not, we see two solutions for us (application-level processors) right now: 1. Traverse the xmerl tuple once again and flatten "everything". 2. Only flatten a few specific values About nr 1: Is their a function that traverse a generic xmlElement() tuple? Any input are appreciated. Best regards Lennart ?stman CellPoint From joelr1@REDACTED Wed Oct 5 12:58:53 2005 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 5 Oct 2005 12:58:53 +0200 Subject: Little-endian doubles Message-ID: <39A043EC-E53C-435E-B3E7-CE9DF1B91DB9@gmail.com> Folks, How would you unpack a little-endian double sent to you from Win32 as a binary? Thanks, Joel -- http://wagerlabs.com/idealab From joelr1@REDACTED Wed Oct 5 13:09:01 2005 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 5 Oct 2005 13:09:01 +0200 Subject: Little-endian doubles In-Reply-To: <39A043EC-E53C-435E-B3E7-CE9DF1B91DB9@gmail.com> References: <39A043EC-E53C-435E-B3E7-CE9DF1B91DB9@gmail.com> Message-ID: It looks like I can do this: <> and replace 32 with 64. Where would I plug the little-endian, though? Can I just say little- float? Thanks, Joel On Oct 5, 2005, at 12:58 PM, Joel Reymont wrote: > Folks, > > How would you unpack a little-endian double sent to you from Win32 > as a binary? -- http://wagerlabs.com/idealab From rasmussen.bryan@REDACTED Wed Oct 5 13:09:51 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Wed, 5 Oct 2005 13:09:51 +0200 Subject: idx-tsunami on Windows XP? Message-ID: <3bb44c6e0510050409m62e3902ep617442b4a64ef6dd@mail.gmail.com> has anybody tested IDX-Tsunami on Windows XP? If so what have your experiences been, any quick installation pointers? Am wondering if it would make more sense for me to try to put linux under my vmware or to proceed with trying to install on my vmware windows. Would prefer to not have to install linux first as my last linux install under my current vmware did not go too well. From joelr1@REDACTED Wed Oct 5 13:18:13 2005 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 5 Oct 2005 13:18:13 +0200 Subject: Little-endian doubles In-Reply-To: References: <39A043EC-E53C-435E-B3E7-CE9DF1B91DB9@gmail.com> Message-ID: This is embarrasing as you can just do <> I didn't know that floats can be unsigned, though :-). Mea maxima culpa, Joel On Oct 5, 2005, at 1:09 PM, Joel Reymont wrote: > It looks like I can do this: > > <> > > and replace 32 with 64. > > Where would I plug the little-endian, though? Can I just say little- > float? -- http://wagerlabs.com/idealab From per.gustafsson@REDACTED Wed Oct 5 13:19:32 2005 From: per.gustafsson@REDACTED (Per Gustafsson) Date: Wed, 05 Oct 2005 13:19:32 +0200 Subject: Little-endian doubles In-Reply-To: References: <39A043EC-E53C-435E-B3E7-CE9DF1B91DB9@gmail.com> Message-ID: <4343B6C4.9070406@it.uu.se> You can write it like this: <> signed has no meaning for floats. Per > It looks like I can do this: > > <> > > and replace 32 with 64. > > Where would I plug the little-endian, though? Can I just say little- > float? > > Thanks, Joel > > On Oct 5, 2005, at 12:58 PM, Joel Reymont wrote: > >> Folks, >> >> How would you unpack a little-endian double sent to you from Win32 >> as a binary? > > > -- > http://wagerlabs.com/idealab > > > > > From rvg@REDACTED Wed Oct 5 13:46:04 2005 From: rvg@REDACTED (Rudolph van Graan) Date: Wed, 5 Oct 2005 13:46:04 +0200 Subject: stdlib Timer bug Message-ID: <4844A014-6B4D-45F7-89B8-A8B961088044@patternmatched.com> Hi there, {ok,TRef} = timer:apply_interval(2000,null,go,[]); go() -> TS = calendar:now_to_local_time(now()), io:format("Tick ~p\n",[TS]). This works as expected: Tick {{2005,10,5},{13,39,8}} Tick {{2005,10,5},{13,39,10}} Tick {{2005,10,5},{13,39,12}} Tick {{2005,10,5},{13,39,14}} Tick {{2005,10,5},{13,39,16}} Tick {{2005,10,5},{13,39,18}} Tick {{2005,10,5},{13,39,20}} Now I put the machine to sleep and wait 20s Now the timer tries to catch up with the system and posts events for the time the machine was sleeping: Tick {{2005,10,5},{13,39,39}} Tick {{2005,10,5},{13,39,39}} Tick {{2005,10,5},{13,39,39}} Tick {{2005,10,5},{13,39,39}} Tick {{2005,10,5},{13,39,39}} Tick {{2005,10,5},{13,39,39}} Tick {{2005,10,5},{13,39,39}} Tick {{2005,10,5},{13,39,39}} Tick {{2005,10,5},{13,39,39}} And now it continues as per usual Tick {{2005,10,5},{13,39,40}} Tick {{2005,10,5},{13,39,42}} Tick {{2005,10,5},{13,39,44}} Tick {{2005,10,5},{13,39,46}} Tick {{2005,10,5},{13,39,48}} Tick {{2005,10,5},{13,39,50}} My issue is that if a machine sleeps for 5 hours or more, we can get millions of these events in the queue. Obviously, it is not an issue on "always on" type systems and is only visible on my laptop. However, I still think there should be a patch for timer to skip ahead if it is too far behind and not to try and make things worse. On my test system, this effect basically destroys my VM as each timer message launches a new process which essentially kills the OS. Suggestions? Rudolph van Graan From erlang@REDACTED Wed Oct 5 18:12:54 2005 From: erlang@REDACTED (Michael McDaniel) Date: Wed, 5 Oct 2005 09:12:54 -0700 Subject: xmerl and entity references In-Reply-To: <001901c5c986$5e88c730$3201010a@cellpoint.se> References: <001901c5c986$5e88c730$3201010a@cellpoint.se> Message-ID: <20051005161253.GL11584@delora.autosys.us> Maybe the following by Tobbe will help... http://www.trapexit.org/docs/howto/howto_rss_aggregator.html ~Michael On Wed, Oct 05, 2005 at 10:25:39AM +0200, Lennart ?stman wrote: > Hi > > We are using xmerl 0.17. I believe my question is > also valid for the latest xmerl version. > > We have some problem with the fact that XML input with > entity references (amp, lt etc) will generate a deep list. > > As stated in comment above scan_entity_ref/2 in xmerl_scan.erl: > > "At some suitable point, we should flatten these, so that > application-level > processors should not have to be aware of this detail." > > Is that about to be implemented? > > If not, we see two solutions for us (application-level processors) right > now: > 1. Traverse the xmerl tuple once again and flatten "everything". > 2. Only flatten a few specific values > > About nr 1: Is their a function that traverse a generic xmlElement() > tuple? > > Any input are appreciated. > > Best regards > Lennart ?stman > CellPoint -- Michael McDaniel Portland, Oregon, USA http://autosys.us +1 503 283 5284 From erlang@REDACTED Wed Oct 5 18:37:24 2005 From: erlang@REDACTED (Michael McDaniel) Date: Wed, 5 Oct 2005 09:37:24 -0700 Subject: stdlib Timer bug In-Reply-To: <4844A014-6B4D-45F7-89B8-A8B961088044@patternmatched.com> References: <4844A014-6B4D-45F7-89B8-A8B961088044@patternmatched.com> Message-ID: <20051005163724.GM11584@delora.autosys.us> Entering the following into google turns up some interesting discussions about clock changes. "clock changes" site:www.erlang.org I seem to remember an environment variable or flag that can be set to change timer behaviour from gradual synchronization to instant synchronization with system clock. However, I cannot find any reference, and may be remembering incorrectly. ~Michael On Wed, Oct 05, 2005 at 01:46:04PM +0200, Rudolph van Graan wrote: > Hi there, > > {ok,TRef} = timer:apply_interval(2000,null,go,[]); > > go() -> > TS = calendar:now_to_local_time(now()), > io:format("Tick ~p\n",[TS]). > > This works as expected: > > Tick {{2005,10,5},{13,39,8}} > Tick {{2005,10,5},{13,39,10}} > Tick {{2005,10,5},{13,39,12}} > Tick {{2005,10,5},{13,39,14}} > Tick {{2005,10,5},{13,39,16}} > Tick {{2005,10,5},{13,39,18}} > Tick {{2005,10,5},{13,39,20}} > > Now I put the machine to sleep > and wait 20s > > Now the timer tries to catch up with the system and posts events for > the time the machine was sleeping: > > Tick {{2005,10,5},{13,39,39}} > Tick {{2005,10,5},{13,39,39}} > Tick {{2005,10,5},{13,39,39}} > Tick {{2005,10,5},{13,39,39}} > Tick {{2005,10,5},{13,39,39}} > Tick {{2005,10,5},{13,39,39}} > Tick {{2005,10,5},{13,39,39}} > Tick {{2005,10,5},{13,39,39}} > Tick {{2005,10,5},{13,39,39}} > > And now it continues as per usual > > Tick {{2005,10,5},{13,39,40}} > Tick {{2005,10,5},{13,39,42}} > Tick {{2005,10,5},{13,39,44}} > Tick {{2005,10,5},{13,39,46}} > Tick {{2005,10,5},{13,39,48}} > Tick {{2005,10,5},{13,39,50}} > > My issue is that if a machine sleeps for 5 hours or more, we can get > millions of these events in the queue. Obviously, it is not an issue > on "always on" type systems and is only visible on my laptop. > However, I still think there should be a patch for timer to skip > ahead if it is too far behind and not to try and make things worse. > On my test system, this effect basically destroys my VM as each timer > message launches a new process which essentially kills the OS. > > Suggestions? > > Rudolph van Graan > From mickael.remond@REDACTED Wed Oct 5 22:04:18 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Wed, 05 Oct 2005 22:04:18 +0200 Subject: Meta-Erlang (was RE: Erlang vs Java revisited) In-Reply-To: <200509300311.j8U3BPFW331059@atlas.otago.ac.nz> References: <200509300311.j8U3BPFW331059@atlas.otago.ac.nz> Message-ID: <434431C2.2040608@erlang-fr.org> Richard A. O'Keefe wrote: > The Java reflection API, including the new stuff that's needed to > do program transformation, is about as think as the local phone book. > I come to praise Erlang, not to bury Java, but the effect that the > syntactic complexity and irregularity of a language has on code that > manipulates that language is important. Consider the whole > StringTemplate, er, scratches head for polite term, thingy. To my > mind, it's a typically overcomplicated response to the fact that > Java is pretty much hopeless at expressing data structures in source > code. Working on the same kinds of things in Scheme, I never needed > more than backquote and maybe a few calls to a mapping function. Regarding Java approach to "metaprogrammation", I found this link: Language Oriented Programming: The Next Programming Paradigm http://www.onboard.jetbrains.com/is1/articles/04/10/lop/ I thought it could interest the Erlang mailing list. This article is kind of ironic. I followed the tutorial and found that it was a nice demonstration of why not to use this approach in Java. This stuff is terribly complicated, and I suspect hardly maintenable. That's funny. -- Micka?l R?mond (cathing up with his email backlog) -------------- next part -------------- A non-text attachment was scrubbed... Name: mickael.remond.vcf Type: text/x-vcard Size: 256 bytes Desc: not available URL: From mickael.remond@REDACTED Wed Oct 5 22:39:52 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Wed, 05 Oct 2005 22:39:52 +0200 Subject: idx-tsunami on Windows XP? In-Reply-To: <3bb44c6e0510050409m62e3902ep617442b4a64ef6dd@mail.gmail.com> References: <3bb44c6e0510050409m62e3902ep617442b4a64ef6dd@mail.gmail.com> Message-ID: <43443A18.8090508@erlang-fr.org> bryan rasmussen wrote: > > has anybody tested IDX-Tsunami on Windows XP? If so what have your > > experiences been, any quick installation pointers? > > > > Am wondering if it would make more sense for me to try to put linux > > under my vmware or to proceed with trying to install on my vmware > > windows. Would prefer to not have to install linux first as my last > > linux install under my current vmware did not go too well. Hello, We did not at all try to make Tsunami work under Windows. We think about starting to "port" it slowly, but it has some dependancies so will not make simple and quick. For example, it use the slave module to start distant node for clustering benchmark. This is not working on Windows, from what I understand. If we put clustering apart, this will be a little bit easier. I have a collegue that has set-up a VMWare to do its benchmarking. His feedback is that it work well. Better than other tools, without the VMWare layer. Please, let me know if we can help you getting started. Cheers, -- Micka?l R?mond -------------- next part -------------- A non-text attachment was scrubbed... Name: mickael.remond.vcf Type: text/x-vcard Size: 256 bytes Desc: not available URL: From yunwen@REDACTED Wed Oct 5 21:34:29 2005 From: yunwen@REDACTED (Yunwen Ye) Date: Wed, 5 Oct 2005 13:34:29 -0600 (MDT) Subject: Reminder: ASE05 early registration ends Oct. 7 Message-ID: <20051005193429.5733298583C@l3d.cs.colorado.edu> Early registration ends this Friday! ----------------------------------------------------------- Call for Participation 20th IEEE/ACM International Conference on AUTOMATED SOFTWARE ENGINEERING (ASE 2005) November 7-11, 2005 Long Beach, California, USA http://www.ase-conference.org/ ========================================================== Early Registration Deadline: October 7, 2005 Regsitration website: http://www.isr.uci.edu/ase2005/ConferenceRegistration.html ========================================================== The IEEE/ACM International Conference on Automated Software Engineering brings together researchers and practitioners to share ideas on the foundations, techniques, tools, and applications of automated software engineering technology. ASE 2005 features three keynotes, a technical program, four half-day tutorials, four workshops, and a doctoral sympoisum. For details, please visit the conference website http://www.ase-conference.org/ From erlang@REDACTED Thu Oct 6 08:41:03 2005 From: erlang@REDACTED (Peter-Henry Mander) Date: Thu, 06 Oct 2005 07:41:03 +0100 Subject: EUC - Stockholm nightlife (23 hours of it!) Message-ID: <1128580863.7692.21.camel@hymir.newport-networks.com> Hi gurus, ladies & gentlemen, Last year, the evening before the 10th EUC Bjarne D?cker invited me and other newcomers to join him and friends on a stroll and a meal to discover Stockholm's less tourist-stricken streets and alleys. Thanks Bjarne, it was a great idea! May I suggest that those of us arriving the day before should meet up (preferably indoors at this time of year!) and enjoy some food and drink? Can someone act as guide this year? Pete. From rasmussen.bryan@REDACTED Thu Oct 6 10:32:34 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Thu, 6 Oct 2005 10:32:34 +0200 Subject: idx-tsunami on Windows XP? In-Reply-To: <3bb44c6e0510060106x55910a11g81ab2246e00d5c34@mail.gmail.com> References: <3bb44c6e0510050409m62e3902ep617442b4a64ef6dd@mail.gmail.com> <43443A18.8090508@erlang-fr.org> <3bb44c6e0510060106x55910a11g81ab2246e00d5c34@mail.gmail.com> Message-ID: <3bb44c6e0510060132m4fd1bb1bw95e88abc86b00090@mail.gmail.com> oops, looking through the repos documentation I see Tsunami is the one thing not supported on windows. :( I think it actually will make most sense for me to get linux running on the vmware. one reason being that I've been having a running vmware battle with our IT support division and this will help me to get all sorts of necessary upgrades as a matter of necessity. Thanks. On 10/6/05, bryan rasmussen wrote: > Hi, > reading through some stuff on Repos I got the understanding that it > includes Tsunami, is that then a subset of IDX-Tsunami? As Repos is > supposed to work under Windows then it should work as well. > No matter what I do I will have to get it to work under VMWare, given > that the organization I work for has a requirement for everything not > in the standard work package be installed under VMWare. > > > > On 10/5/05, Mickael Remond wrote: > > bryan rasmussen wrote: > > > > has anybody tested IDX-Tsunami on Windows XP? If so what have your > > > > experiences been, any quick installation pointers? > > > > > > > > Am wondering if it would make more sense for me to try to put linux > > > > under my vmware or to proceed with trying to install on my vmware > > > > windows. Would prefer to not have to install linux first as my last > > > > linux install under my current vmware did not go too well. > > > > Hello, > > > > We did not at all try to make Tsunami work under Windows. We think about > > starting to "port" it slowly, but it has some dependancies so will not > > make simple and quick. For example, it use the slave module to start > > distant node for clustering benchmark. This is not working on Windows, > > from what I understand. > > If we put clustering apart, this will be a little bit easier. > > > > I have a collegue that has set-up a VMWare to do its benchmarking. His > > feedback is that it work well. Better than other tools, without the > > VMWare layer. > > > > Please, let me know if we can help you getting started. > > > > Cheers, > > > > -- > > Micka?l R?mond > > > > > > > From orbitz@REDACTED Thu Oct 6 13:37:58 2005 From: orbitz@REDACTED (orbitz@REDACTED) Date: Thu, 6 Oct 2005 07:37:58 -0400 Subject: Little-endian doubles In-Reply-To: References: <39A043EC-E53C-435E-B3E7-CE9DF1B91DB9@gmail.com> Message-ID: <968d7d97c948b42871c62deebb555be8@ezabel.com> http://ortdotlove.net/docs/erlang-doc/programming_examples-5.4.3.pdf Page 23, section Segments On Oct 5, 2005, at 7:09 AM, Joel Reymont wrote: > It looks like I can do this: > > <> > > and replace 32 with 64. > > Where would I plug the little-endian, though? Can I just say > little-float? > > Thanks, Joel > > On Oct 5, 2005, at 12:58 PM, Joel Reymont wrote: > >> Folks, >> >> How would you unpack a little-endian double sent to you from Win32 as >> a binary? > > -- > http://wagerlabs.com/idealab > > > > > From alex.arnon@REDACTED Thu Oct 6 21:38:27 2005 From: alex.arnon@REDACTED (Alex Arnon) Date: Thu, 6 Oct 2005 22:38:27 +0300 Subject: Meta-Erlang (was RE: Erlang vs Java revisited) In-Reply-To: <434431C2.2040608@erlang-fr.org> References: <200509300311.j8U3BPFW331059@atlas.otago.ac.nz> <434431C2.2040608@erlang-fr.org> Message-ID: <944da41d0510061238k576058ceqf89babc4aeeafcc7@mail.gmail.com> On 10/5/05, Mickael Remond wrote: > > Richard A. O'Keefe wrote: > > The Java reflection API, including the new stuff that's needed to > > do program transformation, is about as think as the local phone book. > > I come to praise Erlang, not to bury Java, but the effect that the > > syntactic complexity and irregularity of a language has on code that > > manipulates that language is important. Consider the whole > > StringTemplate, er, scratches head for polite term, thingy. To my > > mind, it's a typically overcomplicated response to the fact that > > Java is pretty much hopeless at expressing data structures in source > > code. Working on the same kinds of things in Scheme, I never needed > > more than backquote and maybe a few calls to a mapping function. > > Regarding Java approach to "metaprogrammation", I found this link: > > Language Oriented Programming: The Next Programming Paradigm > http://www.onboard.jetbrains.com/is1/articles/04/10/lop/ > > I thought it could interest the Erlang mailing list. > > This article is kind of ironic. I followed the tutorial and found that > it was a nice demonstration of why not to use this approach in Java. > This stuff is terribly complicated, and I suspect hardly maintenable. > > That's funny. > > -- > Micka?l R?mond > (cathing up with his email backlog) > > > Why anyone would use Java as anything other than a backend OO assembly, is beyond me. /rant off :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From mickael.remond@REDACTED Fri Oct 7 09:27:09 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Fri, 07 Oct 2005 09:27:09 +0200 Subject: Low pain massively multiplayer systems: Peer review requested In-Reply-To: <125AF8D4-D919-4401-9503-CDEFA46371BB@gmail.com> References: <125AF8D4-D919-4401-9503-CDEFA46371BB@gmail.com> Message-ID: <4346234D.9020907@erlang-fr.org> Joel Reymont wrote: > Folks, > > I wrote for http://www.gamedev.net and would like to request your > review. I'm looking for critique and suggestions on language, grammar, > ease of reading the article, etc. Of course you are welcome to point > out any other mistakes as well. > > The article can be found at http://wagerlabs.com/w/PowerStrip > > This article will also serve as the base for my presentation at the > Erlang conference, although I'll probably focus more on card logic > implementation with a modified gen_fsm module. If you are interested you can also look at: http://www.erlang-projects.org/Public/projects/games/game_development_usi/view Good reading, -- Micka?l R?mond http://www.3pblog.net/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mickael.remond.vcf Type: text/x-vcard Size: 266 bytes Desc: not available URL: From chandrashekhar.mullaparthi@REDACTED Fri Oct 7 11:57:56 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Fri, 7 Oct 2005 10:57:56 +0100 Subject: integer to binary Message-ID: Hi, I want to convert an integer to a binary without having to guess/figure-out how many bytes are required to fit that integer. There doesn't seem to be a way to do this with the bit syntax. 11> <<12345678901:40>>. <<2,223,220,28,53>> 12> <<12345678901:48>>. <<0,2,223,220,28,53>> In the example above, the integer will fit in 5 bytes but I can't think of a way to specify this without trial and error. Any suggestions? I can write a function which will figure out how many bytes are required but it'll be nice to have a built-in way of doing it. cheers Chandru From sean.hinde@REDACTED Fri Oct 7 12:39:29 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Fri, 7 Oct 2005 11:39:29 +0100 Subject: integer to binary In-Reply-To: References: Message-ID: This thread might help http://forums.trapexit.org:81/phpBB/viewtopic.php?t=4660 Sean On 7 Oct 2005, at 10:57, chandru wrote: > Hi, > > I want to convert an integer to a binary without having to > guess/figure-out how many bytes are required to fit that integer. > There doesn't seem to be a way to do this with the bit syntax. > > 11> <<12345678901:40>>. > <<2,223,220,28,53>> > > 12> <<12345678901:48>>. > <<0,2,223,220,28,53>> > > In the example above, the integer will fit in 5 bytes but I can't > think of a way to specify this without trial and error. Any > suggestions? I can write a function which will figure out how many > bytes are required but it'll be nice to have a built-in way of doing > it. > > cheers > Chandru > From matthias@REDACTED Fri Oct 7 12:44:06 2005 From: matthias@REDACTED (Matthias Lang) Date: Fri, 7 Oct 2005 12:44:06 +0200 Subject: integer to binary In-Reply-To: References: Message-ID: <17222.20854.613535.305569@cors.corelatus.se> chandru writes: > I want to convert an integer to a binary without having to > guess/figure-out how many bytes are required to fit that integer. > There doesn't seem to be a way to do this with the bit syntax. > > 11> <<12345678901:40>>. > <<2,223,220,28,53>> > > 12> <<12345678901:48>>. > <<0,2,223,220,28,53>> > > In the example above, the integer will fit in 5 bytes but I can't > think of a way to specify this without trial and error. Any > suggestions? If having the binary represent the integer in "the usual way" isn't a requirement, then you can always do 1> term_to_binary(1234567890). <<131,110,4,0,210,2,150,73>> and if you don't mind being tripped up by the odd rounding problem, there's always Bits = math:log(My_integer) / math:log(2) efficiency is probably not that great either. Matthias From chandrashekhar.mullaparthi@REDACTED Fri Oct 7 12:54:29 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Fri, 7 Oct 2005 11:54:29 +0100 Subject: integer to binary In-Reply-To: References: Message-ID: On 07/10/05, Sean Hinde wrote: > This thread might help > > http://forums.trapexit.org:81/phpBB/viewtopic.php?t=4660 > > Sean I did see this thread. All a bit of a bodge :-) Ideally I'd like to see this support added to the bit syntax. The runtime system knows the exact size of the integer so it should be easy enough for it to create a binary of the right size. Failing that, a size/1 BIF to give the size of an integer. > On 7 Oct 2005, at 10:57, chandru wrote: > > > Hi, > > > > I want to convert an integer to a binary without having to > > guess/figure-out how many bytes are required to fit that integer. > > There doesn't seem to be a way to do this with the bit syntax. > > From bjorn@REDACTED Fri Oct 7 13:45:55 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 07 Oct 2005 13:45:55 +0200 Subject: integer to binary In-Reply-To: References: Message-ID: It is actually easier not to use the bit syntax. For positive numbers the following function will do the trick: int_to_bin(I) -> int_to_bin(I, []). int_to_bin(0, [B|Acc]) when B < 256 -> list_to_binary([B|Acc]); int_to_bin(N, Acc) -> int_to_bin(N bsr 8, [N band 16#ff|Acc]). /Bj?rn chandru writes: > Hi, > > I want to convert an integer to a binary without having to > guess/figure-out how many bytes are required to fit that integer. > There doesn't seem to be a way to do this with the bit syntax. > > 11> <<12345678901:40>>. > <<2,223,220,28,53>> > > 12> <<12345678901:48>>. > <<0,2,223,220,28,53>> > > In the example above, the integer will fit in 5 bytes but I can't > think of a way to specify this without trial and error. Any > suggestions? I can write a function which will figure out how many > bytes are required but it'll be nice to have a built-in way of doing > it. > > cheers > Chandru > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bjorn@REDACTED Fri Oct 7 14:44:02 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 07 Oct 2005 14:44:02 +0200 Subject: integer to binary In-Reply-To: References: Message-ID: Actually, as Mattias Lang pointed out in a email to me, the guard test is unecessary. So here is a better version of the code, with a better name and validity tests so that you'll know if you pass it values it isn't designed to handle: unsigned_to_bin(I) when is_integer(I), I >= 0 -> unsigned_to_bin(I, []). unsigned_to_bin(0, Acc) -> list_to_binary(Acc); unsigned_to_bin(N, Acc) -> unsigned_to_bin(N bsr 8, [N band 16#ff|Acc]). /Bjorn Bjorn Gustavsson writes: > It is actually easier not to use the bit syntax. > For positive numbers the following function will do the trick: > > int_to_bin(I) -> > int_to_bin(I, []). > > int_to_bin(0, [B|Acc]) when B < 256 -> > list_to_binary([B|Acc]); > int_to_bin(N, Acc) -> > int_to_bin(N bsr 8, [N band 16#ff|Acc]). > > /Bj?rn > > chandru writes: > > > Hi, > > > > I want to convert an integer to a binary without having to > > guess/figure-out how many bytes are required to fit that integer. > > There doesn't seem to be a way to do this with the bit syntax. > > > > 11> <<12345678901:40>>. > > <<2,223,220,28,53>> > > > > 12> <<12345678901:48>>. > > <<0,2,223,220,28,53>> > > > > In the example above, the integer will fit in 5 bytes but I can't > > think of a way to specify this without trial and error. Any > > suggestions? I can write a function which will figure out how many > > bytes are required but it'll be nice to have a built-in way of doing > > it. > > > > cheers > > Chandru > > > > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From sean.hinde@REDACTED Fri Oct 7 15:16:32 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Fri, 7 Oct 2005 14:16:32 +0100 Subject: integer to binary In-Reply-To: References: Message-ID: <1E1F041D-E7CA-47F5-A970-95B9211C8494@gmail.com> On 7 Oct 2005, at 11:54, chandru wrote: > On 07/10/05, Sean Hinde wrote: > >> This thread might help >> >> http://forums.trapexit.org:81/phpBB/viewtopic.php?t=4660 >> >> Sean >> > > I did see this thread. All a bit of a bodge :-) But very fast :-) Sean From bjarne@REDACTED Sat Oct 8 09:59:54 2005 From: bjarne@REDACTED (=?iso-8859-1?Q?Bjarne_D=E4cker?=) Date: Sat, 8 Oct 2005 09:59:54 +0200 Subject: Erlang/OTP User Conference 2005 References: <20051003091457.71109.qmail@web34403.mail.mud.yahoo.com> Message-ID: <00bc01c5cbde$7a1c9940$450969d4@segeltorp> Dear Erlang friends All Erlang developers, researchers, users, programmers, and other interested persons are hereby cordially invited to the 11th International Erlang/OTP User Conference, in Stockholm on November 10. Please see the invitation and call for papers at http://www.erlang.se/euc/05/ Dead-line for submissions is October 15. Welcome Bjarne D?cker (EUC chairman) =================================== Hotell ?lvsj? offers Ericsson rebate rates for people attending the EUC for the two nights November 9-10 and November 10-11. Please see their home page http://www.hotellalvsjo.nu/eng/index.htm When you contact them you have to mention the code word "Erlang" ! There happens to be other events going on at the same time so you should book rather soon. The Stockholm international fair is located in ?lvsj? too. ?lvsj? is a rather boring suburban place but it is only five minutes walk to the Ericsson conference centre where the EUC takes place. There is also a commuter train station in ?lvsj? and the trains only take seven minutes to Stockholm central. From rasmussen.bryan@REDACTED Sun Oct 9 20:49:30 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Sun, 9 Oct 2005 20:49:30 +0200 Subject: acces to filesystem from repos wings? Message-ID: <3bb44c6e0510091149l27d1d83bw1943df7af2b898f5@mail.gmail.com> I suppose this will turn out to be important in other repos applications as well, but in wings if I want to import an image it won't allow me to navigate out of the mounted iso file. Anyway to get around this? From sanjaya@REDACTED Mon Oct 10 06:02:52 2005 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Mon, 10 Oct 2005 10:02:52 +0600 Subject: xmerl, ets,(mnisia) Too many db tables Message-ID: <002201c5cd4f$7e44dd80$6cfaa8c0@seshanmobile> Hi ...!!! I got the below error after running my system about 30-45 min. But I'm sure that I'm not using any database in my code. But the error referes to ** Too many db tables **. I have try to search the community replies & found that another person get the similer error when using mnisia. But in my case I don't use mnesia at all. So ... I dig down to my xml server & parser. Found that in xmerl it self uses exacly the same code as error shows (i.e Tab = ets:new(rules, [set, public]), ) This occurs when I try to increase the load of xml parssing. i.e. I have set my dialout thread to check the dialout calls every second (earlier was 15 seconds), so each check should pass the xml file (or parse_error.xml ). Also each of that dialout call need to pass 5-6 xml files to initiate a call. Except to that dialout thing, all the call flow running on the xml & all xml files should pass. So the xml processing is high in the system. As I have wrote about, the system works properly about 30-45 min without any problem & later gives the below error. =ERROR REPORT==== 9-Oct-2005::17:41:43 === ** Too many db tables ** ***Failed to Parse parse_error.xml, {error,{'EXIT', {system_limit, [{ets,new,[rules,[set,public]]}, {xmerl_scan,initial_state,2}, {xmerl_scan,int_string,4}, {xmerl_scan,file,2}, {ivr_xml_psr,parseXMLFile_parse_error,1}, {ivr_xml_svr,do_passError,1}, {ivr_xml_svr,handle_info, 2}, {gen_server,handle_msg,6}]}}} It continues up to several time & system crashes giving below error reports =ERROR REPORT==== 9-Oct-2005::17:43:00 === Mnesia(omni_ivr@REDACTED): ** ERROR ** (ignoring core) ** FATAL ** mnesia_recover crashed: {system_limit, [{ets, new, [mnesia_transient_decision, [{keypos, 2}, set, public]]}, {mnesia_recover, create_transient_decision, 0}, {mnesia_recover, do_allow_garb, 0}, {mnesia_recover, handle_cast, 2}, {gen_server, handle_msg, 6}, {proc_lib, init_p, 5}]} state: {state, <0.51.0>, undefined, undefined, undefined, 0, true, []} =SUPERVISOR REPORT==== 9-Oct-2005::17:43:00 === Supervisor: {local,mnesia_kernel_sup} Context: child_terminated Reason: shutdown Offender: [{pid,<0.52.0>}, {name,mnesia_monitor}, {mfa,{mnesia_monitor,start,[]}}, {restart_type,permanent}, {shutdown,3000}, {child_type,worker}] =SUPERVISOR REPORT==== 9-Oct-2005::17:43:00 === Supervisor: {local,mnesia_kernel_sup} Context: shutdown Reason: reached_max_restart_intensity Offender: [{pid,<0.52.0>}, {name,mnesia_monitor}, {mfa,{mnesia_monitor,start,[]}}, {restart_type,permanent}, {shutdown,3000}, {child_type,worker}] ------------------------------------------------- =ERROR REPORT==== 9-Oct-2005::17:43:10 === ** Generic server mnesia_monitor terminating ** Last message in was {'EXIT',<0.51.0>,killed} ** When Server state == {state,<0.51.0>,[],[],true,[],undefined,[]} ** Reason for termination == ** killed =CRASH REPORT==== 9-Oct-2005::17:43:10 === crasher: pid: <0.52.0> registered_name: mnesia_monitor error_info: killed initial_call: {gen,init_it, [gen_server, <0.51.0>, <0.51.0>, {local,mnesia_monitor}, mnesia_monitor, [<0.51.0>], [{timeout,infinity}]]} ancestors: [mnesia_kernel_sup,mnesia_sup,<0.48.0>] messages: [] links: [<0.20.0>] dictionary: [] trap_exit: true status: running heap_size: 987 stack_size: 21 reductions: 6172 neighbours: =ERROR REPORT==== 9-Oct-2005::17:43:10 === Mnesia(omni_ivr@REDACTED): ** ERROR ** mnesia_event got unexpected event: {'EXIT', <0.53.0>, killed} ----------------------------------------------------------------------------------- =CRASH REPORT==== 9-Oct-2005::17:43:10 === crasher: pid: <0.50.0> registered_name: mnesia_event error_info: killed initial_call: {gen,init_it, [gen_event, <0.49.0>, <0.49.0>, {local,mnesia_event}, [], [], []]} ancestors: [mnesia_sup,<0.48.0>] messages: [] links: [] dictionary: [] trap_exit: true status: running heap_size: 233 stack_size: 21 reductions: 203 neighbours: nms_adi_drv.c (239): stop nms_adi_drv.c (476): finish na_drv.c (558): stop na_drv.c (2164): finish ctaError: CTAERR_NOT_IMPLEMENTED =CRASH REPORT==== 9-Oct-2005::17:43:10 === crasher: pid: <0.47.0> registered_name: [] error_info: killed initial_call: {application_master,init, [<0.5.0>, <0.46.0>, {appl_data, mnesia, [mnesia_dumper_load_regulator, mnesia_event, mnesia_fallback, mnesia_controller, mnesia_kernel_sup, mnesia_late_loader, mnesia_locker, mnesia_monitor, mnesia_recover, mnesia_substr, mnesia_sup, mnesia_tm], undefined, {mnesia_sup,[]}, [mnesia, mnesia_backup, mnesia_bup, mnesia_checkpoint, mnesia_checkpoint_sup, mnesia_controller, mnesia_dumper, mnesia_event, mnesia_frag, mnesia_frag_hash, mnesia_frag_old_hash, mnesia_index, mnesia_kernel_sup, mnesia_late_loader, mnesia_lib, mnesia_loader, mnesia_locker, mnesia_log, mnesia_monitor, mnesia_recover, mnesia_registry, mnesia_schema, mnesia_snmp_hook, mnesia_snmp_sup, mnesia_subscr, mnesia_sup, mnesia_sp, mnesia_text, mnesia_tm], [], infinity, infinity}, normal]} ancestors: [<0.46.0>] messages: [] links: [<0.5.0>] dictionary: [] trap_exit: true status: running heap_size: 987 stack_size: 21 reductions: 1484 neighbours: =INFO REPORT==== 9-Oct-2005::17:43:12 === application: mnesia exited: killed type: permanent =INFO REPORT==== 9-Oct-2005::17:43:12 === "Application preparing to stop." module: ivr_app =ERROR REPORT==== 9-Oct-2005::17:43:12 === "IVR_APP_FSM terminated" shutdown idle ...... Terninate all the 60 channels ..... same as this =INFO REPORT==== 9-Oct-2005::17:43:12 === "Application stopped." module: ivr_app Is this the internal bug of xmerl ??? Why this happens ??? What should I do to avoid this ??? What is the proper way to handle xmerl to pass this kind of heavy xml passing situations ?? Thanks in advance, Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.wiger@REDACTED Mon Oct 10 10:08:35 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 10 Oct 2005 10:08:35 +0200 Subject: xmerl, ets,(mnisia) Too many db tables Message-ID: xmerl creates an ets table to keep DTD rules etc. They should be deleted in the cleanup/1 function in xmerl_scan.erl. A possibility is that you're starting more XML processing than you can finish, and that you eventually get too many rules tables as a result of that. A quick fix is to set the environment variable ERL_MAX_DB_TABLES to a higher value (default is 1400). You can set this to a much higher value than that -- say 32000, or higher still. It will raise the ceiling, but you could still run out of tables, of course. (You should try to find a way to limit the load on your system anyway.) Another option is to tell xmerl_scan not to use ets at all. I haven't actually tested this, but it should work, modulo minor bug fixes (... one of which is in xmerl_scan -- see below): Take the default rules read/write/delete functions from xmerl_scan: rules_write(Context, Name, Value, #xmerl_scanner{rules = T} = S) -> case ets:lookup(T, {Context, Name}) of [] -> ets:insert(T, {{Context, Name}, Value}); _ -> ok end, S. rules_read(Context, Name, #xmerl_scanner{rules = T}) -> case ets:lookup(T, {Context, Name}) of [] -> undefined; [{_, V}] -> V end. rules_delete(Context,Name,#xmerl_scanner{rules = T}) -> ets:delete(T,{Context,Name}). and write your own versions that use dict instead: my_rules_write(Context, Name, Value, #xmerl_scanner{rules = Dict1} = S) -> Dict2 = case dict:find(Dict, {Context,Name}) of error -> dict:store({Context,Name}, Value, Dict1); {ok, _} -> Dict1 end, S#xmerl_scanner{rules = Dict2}. my_rules_read(Context, Name, #xmerl_scanner{rules = Dict}) -> case dict:find(Dict, {Context, Name}) of error -> undefined; {ok, V} -> V end. my_rules_delete(Context, Name, #xmerl_scanner{rules = Dict}=S) -> S#xmerl_scanner{rules = dict:erase({Context,Name}, Dict)}. Then pass the following option to xmerl_scan for each invocation: {rules, dict:new(), fun my_rules_read/3, fun my_rules_write/4, ""} Performance should be pretty much the same as before, except xmerl_scan will no longer use ets tables. ... Of course, for this to actually work, one would have to be able to also parameterize the rules_delete_fun the same way, but there is no way to do that. :( /Uffe -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED]On Behalf Of Sanjaya Vitharana Sent: den 10 oktober 2005 06:03 To: erlang-questions@REDACTED Subject: xmerl, ets,(mnisia) Too many db tables Hi ...!!! I got the below error after running my system about 30-45 min. But I'm sure that I'm not using any database in my code. But the error referes to ** Too many db tables **. I have try to search the community replies & found that another person get the similer error when using mnisia. But in my case I don't use mnesia at all. So ... I dig down to my xml server & parser. Found that in xmerl it self uses exacly the same code as error shows (i.e Tab = ets:new(rules, [set, public]), ) This occurs when I try to increase the load of xml parssing. i.e. I have set my dialout thread to check the dialout calls every second (earlier was 15 seconds), so each check should pass the xml file (or parse_error.xml ). Also each of that dialout call need to pass 5-6 xml files to initiate a call. Except to that dialout thing, all the call flow running on the xml & all xml files should pass. So the xml processing is high in the system. As I have wrote about, the system works properly about 30-45 min without any problem & later gives the below error. =ERROR REPORT==== 9-Oct-2005::17:41:43 === ** Too many db tables ** ***Failed to Parse parse_error.xml, {error,{'EXIT', {system_limit, [{ets,new,[rules,[set,public]]}, {xmerl_scan,initial_state,2}, {xmerl_scan,int_string,4}, {xmerl_scan,file,2}, {ivr_xml_psr,parseXMLFile_parse_error,1}, {ivr_xml_svr,do_passError,1}, {ivr_xml_svr,handle_info, 2}, {gen_server,handle_msg,6}]}}} It continues up to several time & system crashes giving below error reports =ERROR REPORT==== 9-Oct-2005::17:43:00 === Mnesia(omni_ivr@REDACTED): ** ERROR ** (ignoring core) ** FATAL ** mnesia_recover crashed: {system_limit, [{ets, new, [mnesia_transient_decision, [{keypos, 2}, set, public]]}, {mnesia_recover, create_transient_decision, 0}, {mnesia_recover, do_allow_garb, 0}, {mnesia_recover, handle_cast, 2}, {gen_server, handle_msg, 6}, {proc_lib, init_p, 5}]} state: {state, <0.51.0>, undefined, undefined, undefined, 0, true, []} =SUPERVISOR REPORT==== 9-Oct-2005::17:43:00 === Supervisor: {local,mnesia_kernel_sup} Context: child_terminated Reason: shutdown Offender: [{pid,<0.52.0>}, {name,mnesia_monitor}, {mfa,{mnesia_monitor,start,[]}}, {restart_type,permanent}, {shutdown,3000}, {child_type,worker}] =SUPERVISOR REPORT==== 9-Oct-2005::17:43:00 === Supervisor: {local,mnesia_kernel_sup} Context: shutdown Reason: reached_max_restart_intensity Offender: [{pid,<0.52.0>}, {name,mnesia_monitor}, {mfa,{mnesia_monitor,start,[]}}, {restart_type,permanent}, {shutdown,3000}, {child_type,worker}] ------------------------------------------------- =ERROR REPORT==== 9-Oct-2005::17:43:10 === ** Generic server mnesia_monitor terminating ** Last message in was {'EXIT',<0.51.0>,killed} ** When Server state == {state,<0.51.0>,[],[],true,[],undefined,[]} ** Reason for termination == ** killed =CRASH REPORT==== 9-Oct-2005::17:43:10 === crasher: pid: <0.52.0> registered_name: mnesia_monitor error_info: killed initial_call: {gen,init_it, [gen_server, <0.51.0>, <0.51.0>, {local,mnesia_monitor}, mnesia_monitor, [<0.51.0>], [{timeout,infinity}]]} ancestors: [mnesia_kernel_sup,mnesia_sup,<0.48.0>] messages: [] links: [<0.20.0>] dictionary: [] trap_exit: true status: running heap_size: 987 stack_size: 21 reductions: 6172 neighbours: =ERROR REPORT==== 9-Oct-2005::17:43:10 === Mnesia(omni_ivr@REDACTED): ** ERROR ** mnesia_event got unexpected event: {'EXIT', <0.53.0>, killed} ----------------------------------------------------------------------------------- =CRASH REPORT==== 9-Oct-2005::17:43:10 === crasher: pid: <0.50.0> registered_name: mnesia_event error_info: killed initial_call: {gen,init_it, [gen_event, <0.49.0>, <0.49.0>, {local,mnesia_event}, [], [], []]} ancestors: [mnesia_sup,<0.48.0>] messages: [] links: [] dictionary: [] trap_exit: true status: running heap_size: 233 stack_size: 21 reductions: 203 neighbours: nms_adi_drv.c (239): stop nms_adi_drv.c (476): finish na_drv.c (558): stop na_drv.c (2164): finish ctaError: CTAERR_NOT_IMPLEMENTED =CRASH REPORT==== 9-Oct-2005::17:43:10 === crasher: pid: <0.47.0> registered_name: [] error_info: killed initial_call: {application_master,init, [<0.5.0>, <0.46.0>, {appl_data, mnesia, [mnesia_dumper_load_regulator, mnesia_event, mnesia_fallback, mnesia_controller, mnesia_kernel_sup, mnesia_late_loader, mnesia_locker, mnesia_monitor, mnesia_recover, mnesia_substr, mnesia_sup, mnesia_tm], undefined, {mnesia_sup,[]}, [mnesia, mnesia_backup, mnesia_bup, mnesia_checkpoint, mnesia_checkpoint_sup, mnesia_controller, mnesia_dumper, mnesia_event, mnesia_frag, mnesia_frag_hash, mnesia_frag_old_hash, mnesia_index, mnesia_kernel_sup, mnesia_late_loader, mnesia_lib, mnesia_loader, mnesia_locker, mnesia_log, mnesia_monitor, mnesia_recover, mnesia_registry, mnesia_schema, mnesia_snmp_hook, mnesia_snmp_sup, mnesia_subscr, mnesia_sup, mnesia_sp, mnesia_text, mnesia_tm], [], infinity, infinity}, normal]} ancestors: [<0.46.0>] messages: [] links: [<0.5.0>] dictionary: [] trap_exit: true status: running heap_size: 987 stack_size: 21 reductions: 1484 neighbours: =INFO REPORT==== 9-Oct-2005::17:43:12 === application: mnesia exited: killed type: permanent =INFO REPORT==== 9-Oct-2005::17:43:12 === "Application preparing to stop." module: ivr_app =ERROR REPORT==== 9-Oct-2005::17:43:12 === "IVR_APP_FSM terminated" shutdown idle ...... Terninate all the 60 channels ..... same as this =INFO REPORT==== 9-Oct-2005::17:43:12 === "Application stopped." module: ivr_app Is this the internal bug of xmerl ??? Why this happens ??? What should I do to avoid this ??? What is the proper way to handle xmerl to pass this kind of heavy xml passing situations ?? Thanks in advance, Sanjaya Vitharana From bertil@REDACTED Mon Oct 10 10:27:37 2005 From: bertil@REDACTED (Bertil Karlsson) Date: Mon, 10 Oct 2005 10:27:37 +0200 Subject: xmerl, ets,(mnisia) Too many db tables In-Reply-To: <002201c5cd4f$7e44dd80$6cfaa8c0@seshanmobile> References: <002201c5cd4f$7e44dd80$6cfaa8c0@seshanmobile> Message-ID: <434A25F9.4030505@erix.ericsson.se> This error is due to a bug that has been removed. xmerl uses sofs:family_to_digraph(Set, [acyclic]) to check for recursions in entities. This call creats digraphs that we (I) forgot to remove. The next patch/release has this bugfix. /Bertil Sanjaya Vitharana wrote: > Hi ...!!! > > I got the below error after running my system about 30-45 min. But I'm > sure that I'm not using any database in my code. But the error referes > to ** Too many db tables **. I have try to search the community replies > & found that another person get the similer error when using mnisia. But > in my case I don't use mnesia at all. > > So ... I dig down to my xml server & parser. Found that in xmerl it self > uses exacly the same code as error shows (i.e Tab = ets:new(rules, [set, > public]), ) > > This occurs when I try to increase the load of xml parssing. > i.e. I have set my dialout thread to check the dialout calls every > second (earlier was 15 seconds), so each check should pass the xml file > (or parse_error.xml ). Also each of that dialout call need to pass 5-6 > xml files to initiate a call. > > Except to that dialout thing, all the call flow running on the xml & all > xml files should pass. So the xml processing is high in the system. > > As I have wrote about, the system works properly about 30-45 min without > any problem & later gives the below error. > > > =ERROR REPORT==== 9-Oct-2005::17:41:43 === > ** Too many db tables ** > > ***Failed to Parse parse_error.xml, {error,{'EXIT', > {system_limit, > > [{ets,new,[rules,[set,public]]}, > > {xmerl_scan,initial_state,2}, > > {xmerl_scan,int_string,4}, > {xmerl_scan,file,2}, > > {ivr_xml_psr,parseXMLFile_parse_error,1}, > > {ivr_xml_svr,do_passError,1}, > > {ivr_xml_svr,handle_info, 2}, > > {gen_server,handle_msg,6}]}}} > > > It continues up to several time & system crashes giving below error reports > > > > =ERROR REPORT==== 9-Oct-2005::17:43:00 === > Mnesia(omni_ivr@REDACTED ): ** ERROR ** (ignoring > core) ** FATAL ** mnesia_recover crashed: {system_limit, > > [{ets, > > new, > > [mnesia_transient_decision, > > [{keypos, > > 2}, > > set, > > public]]}, > > {mnesia_recover, > > create_transient_decision, > > 0}, > > {mnesia_recover, > > do_allow_garb, > > 0}, > > {mnesia_recover, > > handle_cast, > > 2}, > > {gen_server, > > handle_msg, > > 6}, > > {proc_lib, > > init_p, > > 5}]} state: {state, > > <0.51.0>, > > undefined, > > undefined, > > undefined, > > 0, > > true, > > []} > > =SUPERVISOR REPORT==== 9-Oct-2005::17:43:00 === > Supervisor: {local,mnesia_kernel_sup} > Context: child_terminated > Reason: shutdown > Offender: [{pid,<0.52.0>}, > {name,mnesia_monitor}, > {mfa,{mnesia_monitor,start,[]}}, > {restart_type,permanent}, > {shutdown,3000}, > {child_type,worker}] > > > =SUPERVISOR REPORT==== 9-Oct-2005::17:43:00 === > Supervisor: {local,mnesia_kernel_sup} > Context: shutdown > Reason: reached_max_restart_intensity > Offender: [{pid,<0.52.0>}, > {name,mnesia_monitor}, > {mfa,{mnesia_monitor,start,[]}}, > {restart_type,permanent}, > {shutdown,3000}, > {child_type,worker}] > > ------------------------------------------------- > > =ERROR REPORT==== 9-Oct-2005::17:43:10 === > ** Generic server mnesia_monitor terminating > ** Last message in was {'EXIT',<0.51.0>,killed} > ** When Server state == {state,<0.51.0>,[],[],true,[],undefined,[]} > ** Reason for termination == > ** killed > > =CRASH REPORT==== 9-Oct-2005::17:43:10 === > crasher: > pid: <0.52.0> > registered_name: mnesia_monitor > error_info: killed > initial_call: {gen,init_it, > [gen_server, > <0.51.0>, > <0.51.0>, > {local,mnesia_monitor}, > mnesia_monitor, > [<0.51.0>], > [{timeout,infinity}]]} > ancestors: [mnesia_kernel_sup,mnesia_sup,<0.48.0>] > messages: [] > links: [<0.20.0>] > dictionary: [] > trap_exit: true > status: running > heap_size: 987 > stack_size: 21 > reductions: 6172 > neighbours: > > =ERROR REPORT==== 9-Oct-2005::17:43:10 === > Mnesia(omni_ivr@REDACTED ): ** ERROR ** > mnesia_event got unexpected event: {'EXIT', > > <0.53.0>, > > killed} > > ----------------------------------------------------------------------------------- > =CRASH REPORT==== 9-Oct-2005::17:43:10 === > crasher: > pid: <0.50.0> > registered_name: mnesia_event > error_info: killed > initial_call: {gen,init_it, > [gen_event, > <0.49.0>, > <0.49.0>, > {local,mnesia_event}, > [], > [], > []]} > ancestors: [mnesia_sup,<0.48.0>] > messages: [] > links: [] > dictionary: [] > trap_exit: true > status: running > heap_size: 233 > stack_size: 21 > reductions: 203 > neighbours: > nms_adi_drv.c (239): stop > nms_adi_drv.c (476): finish > na_drv.c (558): stop > na_drv.c (2164): finish > ctaError: CTAERR_NOT_IMPLEMENTED > > =CRASH REPORT==== 9-Oct-2005::17:43:10 === > crasher: > pid: <0.47.0> > registered_name: [] > error_info: killed > initial_call: {application_master,init, > [<0.5.0>, > <0.46.0>, > {appl_data, > mnesia, > [mnesia_dumper_load_regulator, > mnesia_event, > mnesia_fallback, > mnesia_controller, > mnesia_kernel_sup, > mnesia_late_loader, > mnesia_locker, > mnesia_monitor, > mnesia_recover, > mnesia_substr, > mnesia_sup, > mnesia_tm], > undefined, > {mnesia_sup,[]}, > [mnesia, > mnesia_backup, > mnesia_bup, > mnesia_checkpoint, > mnesia_checkpoint_sup, > mnesia_controller, > mnesia_dumper, > mnesia_event, > mnesia_frag, > mnesia_frag_hash, > mnesia_frag_old_hash, > mnesia_index, > mnesia_kernel_sup, > mnesia_late_loader, > mnesia_lib, > mnesia_loader, > mnesia_locker, > mnesia_log, > mnesia_monitor, > mnesia_recover, > mnesia_registry, > mnesia_schema, > mnesia_snmp_hook, > mnesia_snmp_sup, > mnesia_subscr, > mnesia_sup, > mnesia_sp, > mnesia_text, > mnesia_tm], > [], > infinity, > infinity}, > normal]} > ancestors: [<0.46.0>] > messages: [] > links: [<0.5.0>] > dictionary: [] > trap_exit: true > status: running > heap_size: 987 > stack_size: 21 > reductions: 1484 > neighbours: > > =INFO REPORT==== 9-Oct-2005::17:43:12 === > application: mnesia > exited: killed > type: permanent > > =INFO REPORT==== 9-Oct-2005::17:43:12 === > "Application preparing to stop." > module: ivr_app > > =ERROR REPORT==== 9-Oct-2005::17:43:12 === > "IVR_APP_FSM terminated" > shutdown > idle > > ...... Terninate all the 60 channels ..... same as this > > =INFO REPORT==== 9-Oct-2005::17:43:12 === > "Application stopped." > module: ivr_app > > > Is this the internal bug of xmerl ??? Why this happens ??? What should I > do to avoid this ??? What is the proper way to handle xmerl to pass this > kind of heavy xml passing situations ?? > > > Thanks in advance, > Sanjaya Vitharana From chandrashekhar.mullaparthi@REDACTED Mon Oct 10 10:49:59 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Mon, 10 Oct 2005 09:49:59 +0100 Subject: xmerl, ets,(mnisia) Too many db tables In-Reply-To: References: Message-ID: Hi, On 10/10/05, Ulf Wiger (AL/EAB) wrote: > > xmerl creates an ets table to keep DTD rules etc. > They should be deleted in the cleanup/1 function in xmerl_scan.erl. > > A possibility is that you're starting more XML processing than you > can finish, and that you eventually get too many rules tables as a > result of that. > > A quick fix is to set the environment variable ERL_MAX_DB_TABLES > to a higher value (default is 1400). You can set this to a much higher > value than that -- say 32000, or higher still. It will raise the ceiling, but > you could still run out of tables, of course. You can also specify an ETS table to use so that a new ETS table is not created every time you parse some XML. This is what we did in our app. %% This is done in the init function of a gen_server. Create an ETS table which xmerl can use. ets:new(esaspub_xmerl_rules, [named_table, set, public]). %% We also parse the DTD once in the init function. catch xmerl_scan:string("\n" "\n" "", [{fetch_fun, dtd_fetch_fun()}, {rules, esaspub_xmerl_rules}]), dtd_fetch_fun() -> fun(_, State) -> {ok, {string, ?TPG_REQUEST_DTD}, State} end. And then every time we wanted to parse some XML xmerl_scan:string(Xml, [{rules, esaspub_xmerl_rules}, {fetch_fun, dtd_fetch_fun(), undefined}]) That made sure only one ETS table was used. Did you forget about this feature Uffe :-) cheers Chandru > > > -----Original Message----- > From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED]On Behalf Of Sanjaya Vitharana > Sent: den 10 oktober 2005 06:03 > To: erlang-questions@REDACTED > Subject: xmerl, ets,(mnisia) Too many db tables > > > Hi ...!!! > > I got the below error after running my system about 30-45 min. But I'm sure that I'm not using any database in my code. But the error referes to ** Too many db tables **. I have try to search the community replies & found that another person get the similer error when using mnisia. But in my case I don't use mnesia at all. > > So ... I dig down to my xml server & parser. Found that in xmerl it self uses exacly the same code as error shows (i.e Tab = ets:new(rules, [set, public]), ) > > This occurs when I try to increase the load of xml parssing. > i.e. I have set my dialout thread to check the dialout calls every second (earlier was 15 seconds), so each check should pass the xml file (or parse_error.xml ). Also each of that dialout call need to pass 5-6 xml files to initiate a call. > > Except to that dialout thing, all the call flow running on the xml & all xml files should pass. So the xml processing is high in the system. > > As I have wrote about, the system works properly about 30-45 min without any problem & later gives the below error. > From matthias@REDACTED Mon Oct 10 12:01:08 2005 From: matthias@REDACTED (Matthias Lang) Date: Mon, 10 Oct 2005 12:01:08 +0200 Subject: Erlang reference card? In-Reply-To: <42B02402.8000901@redstarling.com> References: <20050615110005.25D2E46ACB@bang.trapexit.org> <42B02402.8000901@redstarling.com> Message-ID: <17226.15332.131602.593813@antilipe.corelatus.se> ke.han writes (five months ago): > I often find the Erlang docs to be lacking usage examples and common > answers which may or may not be found through mail list archives. > Attaching user feedback to the original docs may help. > I have seen posts on this mail list before asking how the Erlang docs > are generated. No answers where given. If its not too hard, perhaps a > MySQL like onlike doc facility can be added to trapexit. > thanks, ke han I'm cleaning out my 700-question backlog in erlang-questions, and I came across the above. I don't think anyone answered the implied question. Here's what I think I know: - the source for the official Erlang documentation (manpages, reference manual, etc.) is some SGML format - the SGML source is not distributed with open source Erlang. I don't know if this is for practical or business reasons. - the tools which transform the SGML into HTML (and PDF) are "non-free". Regardless of how it's all put together, maintaining the official documentation must be a huge job. I'm happy that someone at OTP takes care of it for us. Matthias From matthias@REDACTED Mon Oct 10 12:43:59 2005 From: matthias@REDACTED (Matthias Lang) Date: Mon, 10 Oct 2005 12:43:59 +0200 Subject: stdlib Timer bug In-Reply-To: <20051005163724.GM11584@delora.autosys.us> References: <4844A014-6B4D-45F7-89B8-A8B961088044@patternmatched.com> <20051005163724.GM11584@delora.autosys.us> Message-ID: <17226.17903.920523.703570@antilipe.corelatus.se> Michael McDaniel writes: > I seem to remember an environment variable or flag that can > be set to change timer behaviour from gradual synchronization > to instant synchronization with system clock. > However, I cannot find any reference, and may be remembering > incorrectly. Your memory is correct. It's the +c flag for the emulator. It's documented on the 'erl' manpage: http://erlang.se/doc/doc-5.4.8/erts-5.4.8/doc/html/erl.html Matthias From ulf.wiger@REDACTED Mon Oct 10 12:43:01 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 10 Oct 2005 12:43:01 +0200 Subject: xmerl, ets,(mnisia) Too many db tables Message-ID: Chandru wrote: > %% This is done in the init function of a gen_server. Create an ETS > table which xmerl can use. > ets:new(esaspub_xmerl_rules, [named_table, set, public]). > > %% We also parse the DTD once in the init function. > catch xmerl_scan:string("\n" > " \"http://www.t-mobile.co.uk/dtd/apitk_V1.0.dtd\">\n" > "", > [{fetch_fun, dtd_fetch_fun()}, > {rules, esaspub_xmerl_rules}]), > > dtd_fetch_fun() -> > fun(_, State) -> > {ok, {string, ?TPG_REQUEST_DTD}, State} > end. > > And then every time we wanted to parse some XML > > xmerl_scan:string(Xml, [{rules, esaspub_xmerl_rules}, {fetch_fun, > dtd_fetch_fun(), undefined}]) > > That made sure only one ETS table was used. Did you forget about this > feature Uffe :-) Well... no, but I had forgotten how easy it was. ;) /Uffe From thomasl_erlang@REDACTED Mon Oct 10 13:25:16 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Mon, 10 Oct 2005 04:25:16 -0700 (PDT) Subject: cond revisited Message-ID: <20051010112516.58645.qmail@web34412.mail.mud.yahoo.com> The current proposal for cond has a variable binding rule I have found unsatisfying: in the following pseudo-code cond Expr1 -> Body1; Rest end this is translated basically into a nested case: case Exprs1 of true -> Body1; false -> end But this means the bindings made in Exprs1 are seen not only in Body but also in Rest (ie, all subsequent clauses). I find this unintuitive, so I would like to propose a translation of cond into case which avoids this problem*. Here we go. Assume that we have cond Exprs -> Body; Rest_clauses end 1. We first compute the variables exported from Exprs into Body (and afterwards) as X1,...,Xn. 2. We then take advantage of a property of fun:s, that they do not export variable bindings at all. So we can write (fun() -> Exprs end)() which evaluates Exprs without exporting any variable bindings. Note that the extra (fun ..)() call easily can be removed at compile time, so there is no extra cost. If we were content with not exporting variables from Exprs to Body at all, we could stop with that. But Richard Carlsson has convinced me that this was not enough. If we DID stop, we would simply get case (fun() -> Exprs end)() of true -> Body; ... end but to get the variable bindings out, we need to do a bit more. 3. Since we want X1,...,Xn to be visible in Body, we then ensure that they are passed correctly. Let CondGuard be the code: (fun() -> case Exprs of true -> {true, X1,...,Xn}; false -> false end)() The above expression is then wrapped in the following: case CondGuard of {true, X1,....,Xn} -> Body; false -> end This ensures that the variables X1,...,Xn are seen only in Body. The final clause of the cond can look like case ... ... false -> exit(cond_clause) end That's all. The translation is a bit more involved than the one currently used, and the compiler will have to work a bit harder. But note that this can compile to *quite efficient* code after some simplifications have been done. A barebones example: cond X = f(A), Y = g(B), X =< Y -> h(X,Y); X = f(A,B), Y = g(A,B), X > Y -> i(X,Y) end becomes (omitting begin ... end pairs) case (fun() -> case X = f(A), Y = g(B), X =< Y of true -> {true,X,Y}; false -> false )() of {true, X, Y} -> h(X,Y); false -> case (fun() -> case X = f(A,B), Y = g(A,B), X > Y of true -> {true, X, Y}; false -> false end)() of {true, X, Y} -> i(X,Y); false -> exit(cond_clause) end end which can quickly be simplified by beta reduction and case-of-case optimization into case X1 = f(A), Y1 = g(B), X1 =< Y1 of true -> {true, X, Y} = {true, X1, Y1}, h(X,Y); false -> case X2 = f(A,B), Y2 = g(A,B), X2 > Y2 of true -> {true, X, Y} = {true, X2, Y2}, i(X,Y); false -> exit(cond_clause) end end The compiler then simplifies the matching of {true,...} and eliminates the copies. You end up with basically the case-statement you would have written by hand. And there you are. Best, Thomas __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From tim@REDACTED Mon Oct 10 13:37:37 2005 From: tim@REDACTED (Tim Bates) Date: Mon, 10 Oct 2005 21:07:37 +0930 Subject: Inverse match on ets? Message-ID: <434A5281.7060201@bates.id.au> Hi folks, I want to be able to store patterns in an ets table and retrieve those that match a given example, like this eg: Stored in ets: {{record, a, '_'}, <0.57.0>} {{record, b, '_'}, <0.59.0>} {{record, '_', 7}, <0.62.0>} get_matching_pids({record, a, 7}) -> [<0.57.0>, <0.62.0>] Sort of like a match-spec but in reverse, where the unbound elements are in the table. Any suggestions on how I might implement get_matching_pids/1? Thanks, Tim. -- Tim Bates tim@REDACTED From rvg@REDACTED Mon Oct 10 13:44:22 2005 From: rvg@REDACTED (Rudolph van Graan) Date: Mon, 10 Oct 2005 13:44:22 +0200 Subject: stdlib Timer bug In-Reply-To: <17226.17903.920523.703570@antilipe.corelatus.se> References: <4844A014-6B4D-45F7-89B8-A8B961088044@patternmatched.com> <20051005163724.GM11584@delora.autosys.us> <17226.17903.920523.703570@antilipe.corelatus.se> Message-ID: <976C83B5-7EEA-442C-8F1B-1F247515CB18@patternmatched.com> I've made a simple patch for the issue which solves it on my machine: in timer.erl: 231,237c231 < NewTime = case (SysTime - Time) of < I when I > (Interv * 4)-> < %% RvG Don't try to catch up on events < SysTime - (Interv * 2); < I -> < Time + Interv < end, --- > NewTime = Time + Interv, In this case, we only catch up if we are less than 4 intervals behind Rudolph van Graan On 10 Oct 2005, at 12:43 PM, Matthias Lang wrote: > Michael McDaniel writes: > > >> I seem to remember an environment variable or flag that can >> be set to change timer behaviour from gradual synchronization >> to instant synchronization with system clock. >> However, I cannot find any reference, and may be remembering >> incorrectly. >> > > Your memory is correct. It's the +c flag for the emulator. It's > documented on the 'erl' manpage: > > http://erlang.se/doc/doc-5.4.8/erts-5.4.8/doc/html/erl.html > > Matthias > > From ulf.wiger@REDACTED Mon Oct 10 14:04:45 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 10 Oct 2005 14:04:45 +0200 Subject: Inverse match on ets? Message-ID: Here's an example, but it depends a bit on how generic you want the function to be. 1> ets:new(tab, [bag,public,named_table]). tab 2> ets:insert(tab, {{record,a,'_'},pid(0,57,0)}). true 3> ets:insert(tab, {{record,b,'_'},pid(0,59,0)}). true 4> ets:insert(tab, {{record,'_',7},pid(0,62,0)}). true 6> F = fun({record,X,Y}) -> ets:select(tab, [{{{record,'$1','$2'},'$3'}, [{'or',{'==','$1',X},{'==','$2',Y}}], ['$3']}]) end. #Fun 7> catch F({record,a,7}). [<0.57.0>,<0.62.0>] BTW, I wouldn't recommend using '_' as a regular value inside an ets table. While it works, it may complicate select patterns somewhat. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Tim Bates > Sent: den 10 oktober 2005 13:38 > To: erlang-questions@REDACTED > Subject: Inverse match on ets? > > > Hi folks, > I want to be able to store patterns in an ets table and > retrieve those > that match a given example, like this eg: > > Stored in ets: > {{record, a, '_'}, <0.57.0>} > {{record, b, '_'}, <0.59.0>} > {{record, '_', 7}, <0.62.0>} > > get_matching_pids({record, a, 7}) -> [<0.57.0>, <0.62.0>] > > Sort of like a match-spec but in reverse, where the unbound > elements are > in the table. Any suggestions on how I might implement > get_matching_pids/1? > > Thanks, > Tim. > > -- > Tim Bates > tim@REDACTED > From tim@REDACTED Mon Oct 10 14:29:57 2005 From: tim@REDACTED (Tim Bates) Date: Mon, 10 Oct 2005 21:59:57 +0930 Subject: Inverse match on ets? In-Reply-To: References: Message-ID: <434A5EC5.7070501@bates.id.au> Ulf Wiger (AL/EAB) wrote: > Here's an example, but it depends a bit on how generic you want the function to be. Thanks Ulf, but I was hoping for something a lot more general than that. I want processes to be able to register their interest in a particular type of message, and the messages are somewhat free-form. I guess another way to do it, that I'll fall back on, is to have a callback function for each process and use Erlang's compiled pattern-matching to select the messages I'm interested in. Tim. -- Tim Bates tim@REDACTED From ulf.wiger@REDACTED Mon Oct 10 14:45:16 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 10 Oct 2005 14:45:16 +0200 Subject: Inverse match on ets? Message-ID: Apologies. I replied before fully understanding what you were after. Ok, so how about this? 1> ets:new(filters, [public,named_table]). filters 2> ets:insert(filters, {pid(0,56,0), {record,a,'_'},[], [true]}). true 3> ets:insert(filters, {pid(0,57,0), {record,b,'_'},[], [true]}). true 4> ets:insert(filters, {pid(0,62,0), {record,'_',7},[], [true]}). true 5> catch ets:foldl(fun({Pid,MS,G,R}, Acc) -> [{Pid,ets:test_ms({record,a,7},[{MS,G,R}])}|Acc] end, [], filters). [{<0.62.0>,{ok,true}},{<0.57.0>,{ok,false}},{<0.56.0>,{ok,true}}] /Uffe > -----Original Message----- > From: Tim Bates [mailto:tim@REDACTED] > Sent: den 10 oktober 2005 14:30 > To: Ulf Wiger (AL/EAB) > Cc: erlang-questions@REDACTED > Subject: Re: Inverse match on ets? > > > Ulf Wiger (AL/EAB) wrote: > > Here's an example, but it depends a bit on how generic you > want the function to be. > > Thanks Ulf, but I was hoping for something a lot more general > than that. > I want processes to be able to register their interest in a > particular > type of message, and the messages are somewhat free-form. > > I guess another way to do it, that I'll fall back on, is to have a > callback function for each process and use Erlang's compiled > pattern-matching to select the messages I'm interested in. > > Tim. > > -- > Tim Bates > tim@REDACTED > From anders.nygren@REDACTED Mon Oct 10 22:35:04 2005 From: anders.nygren@REDACTED (Anders Nygren) Date: Mon, 10 Oct 2005 15:35:04 -0500 Subject: ic with java backend Message-ID: Hi After some traumatic experiences making interfaces between Erlang and Java I finally discovered ic. The problem I am having now is that I can not figure out how to supervise the Java server. I have been trying to do erlang:monitor(process,{Proc,Node}) but I just get a down message immediately. So is there any way to supervice the java server generated by ic? /Anders Nygren From robert.balogh@REDACTED Tue Oct 11 13:23:53 2005 From: robert.balogh@REDACTED (=?iso-8859-1?Q?R=F3bert_Balogh_=28IJ/ETH=29?=) Date: Tue, 11 Oct 2005 13:23:53 +0200 Subject: Erlang on Palm Tungsten T3 Message-ID: hej, I'd like to ask You, is it possible to use Erlang on Palm OS? thanks for Your help, br, /Robi From peter.c.marks@REDACTED Tue Oct 11 14:17:14 2005 From: peter.c.marks@REDACTED (Peter Marks) Date: Tue, 11 Oct 2005 08:17:14 -0400 Subject: Erlang on Symbian? Message-ID: <239d02ca0510110517t367c0941k2a9cb44fded3db78@mail.gmail.com> Hello, Has anyone ported or thought of porting erlang to the Symbian OS? Thanks, Peter From richardc@REDACTED Tue Oct 11 14:39:38 2005 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 11 Oct 2005 14:39:38 +0200 Subject: Closing parenthesis optional for -define? In-Reply-To: References: Message-ID: <434BB28A.4010809@csd.uu.se> It seems that nobody answered this before, so here goes: Tamas Patrovics wrote: > This code (note the lack of a closing parenthesis in the -define line) > can be compiled and works as expected. Is it a feature? Well, I think it was at least documented in the unfinished draft Erlang Specification that it works that way. It appears to be a "feature", since there's this line in lib/stdlib/src/epp.erl: macro_expansion([{dot,_Ld}]) -> []; %Be nice, allow no right paren! but I must say that it's not a practice I would recommend. I'd rather vote for the removal of the above line, so that all macro definitions must include the closing parenthesis. (Note that there is no issue of balancing parentheses here - the macro definition is unambiguously terminated by the final period+whitespace token, which is right now only optionally preceded by a close parenthesis.) > epp_dodger chokes on it with a syntax error.. Well, it pretends that it sees proper Erlang function definitions and does not try to look at the end of a 'define' and fix it up with any missing close parenthesis. I don't particularly feel like implementing that feature either. Bj?rn, can this be killed, please? /Richard ---- "Having users is like optimization: the wise course is to delay it." -- Paul Graham From anindya@REDACTED Tue Oct 11 14:43:17 2005 From: anindya@REDACTED (Anindya Mozumdar) Date: Tue, 11 Oct 2005 18:13:17 +0530 Subject: Change not reflected when using ets:update_counter Message-ID: <434BB365.1050200@picopeta.com> Hi, I am using ets:update_counter/3 to update a field in a table which has been created as follows : mnesia:create_table(my_table,[{disc_copies, [node()]},{attributes, record_info(fields, my_table)}]) While ets:tab2list/1 confirms that the change has actually taken place, it is lost when I stop and start mnesia again ? Is there any way I can ensure that the change persists when I stop mnesia ? Thanks, Anindya. From hakan@REDACTED Tue Oct 11 15:18:37 2005 From: hakan@REDACTED (Hakan Mattsson) Date: Tue, 11 Oct 2005 15:18:37 +0200 (CEST) Subject: Change not reflected when using ets:update_counter In-Reply-To: <434BB365.1050200@picopeta.com> References: <434BB365.1050200@picopeta.com> Message-ID: On Tue, 11 Oct 2005, Anindya Mozumdar wrote: AM> I am using ets:update_counter/3 to update a field in a table which has AM> been created as follows : AM> AM> mnesia:create_table(my_table,[{disc_copies, [node()]},{attributes, AM> record_info(fields, my_table)}]) AM> AM> While ets:tab2list/1 confirms that the change has actually taken place, it AM> is lost when I stop and start mnesia again ? Is there any way I can ensure AM> that the change persists when I stop mnesia ? You should use mnesia:dirty_update_counter/3. Avoid using ets to directly access Mnesia tables. /H?kan From chandrashekhar.mullaparthi@REDACTED Tue Oct 11 15:30:54 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Tue, 11 Oct 2005 14:30:54 +0100 Subject: Change not reflected when using ets:update_counter In-Reply-To: <434BB365.1050200@picopeta.com> References: <434BB365.1050200@picopeta.com> Message-ID: On 11/10/05, Anindya Mozumdar wrote: > Hi, > I am using ets:update_counter/3 to update a field in a table which > has been created as follows : > > mnesia:create_table(my_table,[{disc_copies, [node()]},{attributes, > record_info(fields, my_table)}]) > > While ets:tab2list/1 confirms that the change has actually taken place, > it is lost when I stop and start mnesia again ? Is there any way I can > ensure that the change persists when I stop mnesia ? You have to use mnesia:dirty_update_counter to update counter values in mnesia tables. ETS is a volatile storage mechanism. If you call ETS functions directly, it will bypass mnesia mechanisms to flush changes to disk. Chandru From serge@REDACTED Wed Oct 12 20:29:26 2005 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 12 Oct 2005 14:29:26 -0400 Subject: run_erl problem on RedHat ES 4 Message-ID: <434D5606.8070501@hq.idt.net> OTP Team: We ran accross the following issue with run_erl: ~>cat /etc/redhat-release Red Hat Enterprise Linux ES release 4 (Nahant) ~>cat /proc/version Linux version 2.6.9-5.ELsmp (bhcompile@REDACTED) (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 SMP Wed Jan 5 19:30:39 EST 2005 >erts-5.4.9/bin/run_erl var/tmp/test var/log/test "ls" run_erl [17489] Wed Oct 12 14:25:11 2005 Could not open pty master Apparently this version of Linux doesn't have any /dev/pty devices installed: >ls -l /dev/p* lrwxrwxrwx 1 root root 3 Aug 29 17:05 /dev/par0 -> lp0 crw-rw---- 1 root lp 99, 0 Aug 29 13:04 /dev/parport0 crw-rw---- 1 root lp 99, 1 Aug 29 13:04 /dev/parport1 crw-rw---- 1 root lp 99, 2 Aug 29 13:04 /dev/parport2 crw-rw---- 1 root lp 99, 3 Aug 29 13:04 /dev/parport3 crw-r----- 1 root kmem 1, 4 Aug 29 13:03 /dev/port crw------- 1 root root 108, 0 Aug 29 13:04 /dev/ppp crw-rw-rw- 1 root tty 5, 2 Oct 12 14:26 /dev/ptmx /dev/pts: total 0 crw--w---- 1 dkorsun tty 136, 0 Sep 20 18:02 0 crw--w---- 1 dkorsun tty 136, 1 Oct 12 10:38 1 crw--w---- 1 serge tty 136, 2 Oct 12 14:26 2 Is this an oversight in run_erl, or you could recommend a work-around? Thanks. -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From ernie.makris@REDACTED Wed Oct 12 22:33:57 2005 From: ernie.makris@REDACTED (Ernie Makris) Date: Wed, 12 Oct 2005 16:33:57 -0400 Subject: run_erl problem on RedHat ES 4 References: <434D5606.8070501@hq.idt.net> Message-ID: <025601c5cf6c$459cd1d0$4601a8c0@hercules> This is what I use. Can the otp team include this in the next release? Fedora run_erl is broken out of the box. Jouni Ryn? originally sent a patch to me and I added a fix to it in order to close the fds properly as it wasn't working on redhat or fedora. Here it is: +++ run_erl.c 2005-10-07 15:19:00.000000000 -0400 @@ -45,6 +45,8 @@ #if !defined(NO_SYSLOG) #include #endif +#include +#include #if defined(O_NONBLOCK) # define DONT_BLOCK_PLEASE O_NONBLOCK @@ -803,6 +805,7 @@ static int open_pty_master(char **ptyslave) { int mfd; + int sfd; char *major, *minor; static char majorchars[] = "pqrstuvwxyzabcdePQRSTUVWXYZABCDE"; @@ -818,6 +821,15 @@ /* http://www.xcf.berkeley.edu/~ali/K0D/UNIX/PTY/code/upty.h.html */ { + static char ttyname[] = " "; + if (0 == openpty(&mfd, &sfd, ttyname, NULL, NULL)) { + close(sfd); + *ptyslave = ttyname; + return mfd; + } + } + + { /* New style devpts or devfs /dev/pty/{m,s}{0,1....} */ static char ptyname[] = "/dev/pty/mX"; You also have to modify the Makefile to add -lutil for the compilation of run_erl. Thanks Ernie ----- Original Message ----- From: "Serge Aleynikov" To: "Erlang Questions" Sent: Wednesday, October 12, 2005 2:29 PM Subject: run_erl problem on RedHat ES 4 > OTP Team: > > We ran accross the following issue with run_erl: > > ~>cat /etc/redhat-release > Red Hat Enterprise Linux ES release 4 (Nahant) > ~>cat /proc/version > Linux version 2.6.9-5.ELsmp (bhcompile@REDACTED) (gcc > version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 SMP Wed Jan 5 19:30:39 > EST 2005 > > >erts-5.4.9/bin/run_erl var/tmp/test var/log/test "ls" > run_erl [17489] Wed Oct 12 14:25:11 2005 > Could not open pty master > > Apparently this version of Linux doesn't have any /dev/pty devices > installed: > > >ls -l /dev/p* > lrwxrwxrwx 1 root root 3 Aug 29 17:05 /dev/par0 -> lp0 > crw-rw---- 1 root lp 99, 0 Aug 29 13:04 /dev/parport0 > crw-rw---- 1 root lp 99, 1 Aug 29 13:04 /dev/parport1 > crw-rw---- 1 root lp 99, 2 Aug 29 13:04 /dev/parport2 > crw-rw---- 1 root lp 99, 3 Aug 29 13:04 /dev/parport3 > crw-r----- 1 root kmem 1, 4 Aug 29 13:03 /dev/port > crw------- 1 root root 108, 0 Aug 29 13:04 /dev/ppp > crw-rw-rw- 1 root tty 5, 2 Oct 12 14:26 /dev/ptmx > > /dev/pts: > total 0 > crw--w---- 1 dkorsun tty 136, 0 Sep 20 18:02 0 > crw--w---- 1 dkorsun tty 136, 1 Oct 12 10:38 1 > crw--w---- 1 serge tty 136, 2 Oct 12 14:26 2 > > Is this an oversight in run_erl, or you could recommend a work-around? > > Thanks. > > -- > Serge Aleynikov > R&D Telecom, IDT Corp. > Tel: (973) 438-3436 > Fax: (973) 438-1464 > serge@REDACTED From serge@REDACTED Wed Oct 12 22:37:21 2005 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 12 Oct 2005 16:37:21 -0400 Subject: run_erl problem on RedHat ES 4 In-Reply-To: <025601c5cf6c$459cd1d0$4601a8c0@hercules> References: <434D5606.8070501@hq.idt.net> <025601c5cf6c$459cd1d0$4601a8c0@hercules> Message-ID: <434D7401.8030500@hq.idt.net> Thanks a lot! Ernie Makris wrote: > This is what I use. Can the otp team include this in the next release? > Fedora run_erl is broken out of the box. > Jouni Ryn? originally sent a patch to me and I added a fix to it in > order to close the fds properly > as it wasn't working on redhat or fedora. > > Here it is: > +++ run_erl.c 2005-10-07 15:19:00.000000000 -0400 > @@ -45,6 +45,8 @@ > #if !defined(NO_SYSLOG) > #include > #endif > +#include > +#include > > #if defined(O_NONBLOCK) > # define DONT_BLOCK_PLEASE O_NONBLOCK > @@ -803,6 +805,7 @@ > static int open_pty_master(char **ptyslave) > { > int mfd; > + int sfd; > char *major, *minor; > > static char majorchars[] = "pqrstuvwxyzabcdePQRSTUVWXYZABCDE"; > @@ -818,6 +821,15 @@ > /* http://www.xcf.berkeley.edu/~ali/K0D/UNIX/PTY/code/upty.h.html */ > > { > + static char ttyname[] = " "; > + if (0 == openpty(&mfd, &sfd, ttyname, NULL, NULL)) { > + close(sfd); > + *ptyslave = ttyname; > + return mfd; > + } > + } > + > + { > /* New style devpts or devfs /dev/pty/{m,s}{0,1....} */ > > static char ptyname[] = "/dev/pty/mX"; > > You also have to modify the Makefile to add -lutil for the compilation > of run_erl. > > Thanks > Ernie > > > ----- Original Message ----- From: "Serge Aleynikov" > To: "Erlang Questions" > Sent: Wednesday, October 12, 2005 2:29 PM > Subject: run_erl problem on RedHat ES 4 > > >> OTP Team: >> >> We ran accross the following issue with run_erl: >> >> ~>cat /etc/redhat-release >> Red Hat Enterprise Linux ES release 4 (Nahant) >> ~>cat /proc/version >> Linux version 2.6.9-5.ELsmp (bhcompile@REDACTED) >> (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 SMP Wed Jan 5 >> 19:30:39 EST 2005 >> >> >erts-5.4.9/bin/run_erl var/tmp/test var/log/test "ls" >> run_erl [17489] Wed Oct 12 14:25:11 2005 >> Could not open pty master >> >> Apparently this version of Linux doesn't have any /dev/pty devices >> installed: >> >> >ls -l /dev/p* >> lrwxrwxrwx 1 root root 3 Aug 29 17:05 /dev/par0 -> lp0 >> crw-rw---- 1 root lp 99, 0 Aug 29 13:04 /dev/parport0 >> crw-rw---- 1 root lp 99, 1 Aug 29 13:04 /dev/parport1 >> crw-rw---- 1 root lp 99, 2 Aug 29 13:04 /dev/parport2 >> crw-rw---- 1 root lp 99, 3 Aug 29 13:04 /dev/parport3 >> crw-r----- 1 root kmem 1, 4 Aug 29 13:03 /dev/port >> crw------- 1 root root 108, 0 Aug 29 13:04 /dev/ppp >> crw-rw-rw- 1 root tty 5, 2 Oct 12 14:26 /dev/ptmx >> >> /dev/pts: >> total 0 >> crw--w---- 1 dkorsun tty 136, 0 Sep 20 18:02 0 >> crw--w---- 1 dkorsun tty 136, 1 Oct 12 10:38 1 >> crw--w---- 1 serge tty 136, 2 Oct 12 14:26 2 >> >> Is this an oversight in run_erl, or you could recommend a work-around? >> >> Thanks. >> >> -- >> Serge Aleynikov >> R&D Telecom, IDT Corp. >> Tel: (973) 438-3436 >> Fax: (973) 438-1464 >> serge@REDACTED > > > > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From anindya@REDACTED Thu Oct 13 06:13:52 2005 From: anindya@REDACTED (Anindya Mozumdar) Date: Thu, 13 Oct 2005 09:43:52 +0530 Subject: Change not reflected when using ets:update_counter In-Reply-To: References: <434BB365.1050200@picopeta.com> Message-ID: <434DDF00.4030304@picopeta.com> chandru wrote: >> I am using ets:update_counter/3 to update a field in a table which >>has been created as follows : >> >>mnesia:create_table(my_table,[{disc_copies, [node()]},{attributes, >>record_info(fields, my_table)}]) >> > You have to use mnesia:dirty_update_counter to update counter values > in mnesia tables. > Chandru > Thanks for the info. However, the ets:update_counter function allows me to specify a position which needs to be updated with an increment. The mnesia:update_counter function does not seem to have this facility. Is there any way I can specify the position to update ? What is my_table has two integer fields, and I want to update different fields in different situations ? Anindya. From serge@REDACTED Thu Oct 13 14:02:07 2005 From: serge@REDACTED (Serge Aleynikov) Date: Thu, 13 Oct 2005 08:02:07 -0400 Subject: run_erl problem on RedHat ES 4 In-Reply-To: <025601c5cf6c$459cd1d0$4601a8c0@hercules> References: <434D5606.8070501@hq.idt.net> <025601c5cf6c$459cd1d0$4601a8c0@hercules> Message-ID: <434E4CBF.8050008@hq.idt.net> If this patch is included in the OTP distribution, I would like to request a feature to be able to customize the name of run_erl's "erlang.log.X" log files by introducing a new environment variable. Thanks, Serge Ernie Makris wrote: > This is what I use. Can the otp team include this in the next release? > Fedora run_erl is broken out of the box. > Jouni Ryn? originally sent a patch to me and I added a fix to it in > order to close the fds properly > as it wasn't working on redhat or fedora. > > Here it is: > +++ run_erl.c 2005-10-07 15:19:00.000000000 -0400 > @@ -45,6 +45,8 @@ > #if !defined(NO_SYSLOG) > #include > #endif > +#include > +#include > > #if defined(O_NONBLOCK) > # define DONT_BLOCK_PLEASE O_NONBLOCK > @@ -803,6 +805,7 @@ > static int open_pty_master(char **ptyslave) > { > int mfd; > + int sfd; > char *major, *minor; > > static char majorchars[] = "pqrstuvwxyzabcdePQRSTUVWXYZABCDE"; > @@ -818,6 +821,15 @@ > /* http://www.xcf.berkeley.edu/~ali/K0D/UNIX/PTY/code/upty.h.html */ > > { > + static char ttyname[] = " "; > + if (0 == openpty(&mfd, &sfd, ttyname, NULL, NULL)) { > + close(sfd); > + *ptyslave = ttyname; > + return mfd; > + } > + } > + > + { > /* New style devpts or devfs /dev/pty/{m,s}{0,1....} */ > > static char ptyname[] = "/dev/pty/mX"; > > You also have to modify the Makefile to add -lutil for the compilation > of run_erl. > > Thanks > Ernie > > > ----- Original Message ----- From: "Serge Aleynikov" > To: "Erlang Questions" > Sent: Wednesday, October 12, 2005 2:29 PM > Subject: run_erl problem on RedHat ES 4 > > >> OTP Team: >> >> We ran accross the following issue with run_erl: >> >> ~>cat /etc/redhat-release >> Red Hat Enterprise Linux ES release 4 (Nahant) >> ~>cat /proc/version >> Linux version 2.6.9-5.ELsmp (bhcompile@REDACTED) >> (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 SMP Wed Jan 5 >> 19:30:39 EST 2005 >> >> >erts-5.4.9/bin/run_erl var/tmp/test var/log/test "ls" >> run_erl [17489] Wed Oct 12 14:25:11 2005 >> Could not open pty master >> >> Apparently this version of Linux doesn't have any /dev/pty devices >> installed: >> >> >ls -l /dev/p* >> lrwxrwxrwx 1 root root 3 Aug 29 17:05 /dev/par0 -> lp0 >> crw-rw---- 1 root lp 99, 0 Aug 29 13:04 /dev/parport0 >> crw-rw---- 1 root lp 99, 1 Aug 29 13:04 /dev/parport1 >> crw-rw---- 1 root lp 99, 2 Aug 29 13:04 /dev/parport2 >> crw-rw---- 1 root lp 99, 3 Aug 29 13:04 /dev/parport3 >> crw-r----- 1 root kmem 1, 4 Aug 29 13:03 /dev/port >> crw------- 1 root root 108, 0 Aug 29 13:04 /dev/ppp >> crw-rw-rw- 1 root tty 5, 2 Oct 12 14:26 /dev/ptmx >> >> /dev/pts: >> total 0 >> crw--w---- 1 dkorsun tty 136, 0 Sep 20 18:02 0 >> crw--w---- 1 dkorsun tty 136, 1 Oct 12 10:38 1 >> crw--w---- 1 serge tty 136, 2 Oct 12 14:26 2 >> >> Is this an oversight in run_erl, or you could recommend a work-around? >> >> Thanks. >> >> -- >> Serge Aleynikov >> R&D Telecom, IDT Corp. >> Tel: (973) 438-3436 >> Fax: (973) 438-1464 >> serge@REDACTED > > > > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From rasmussen.bryan@REDACTED Fri Oct 14 14:56:36 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Fri, 14 Oct 2005 14:56:36 +0200 Subject: repos start jeai errors Message-ID: <3bb44c6e0510140556t5dc3799as8f660a36fb20306@mail.gmail.com> Hi, when I start jeai in repos I get errors at =INFO REPORT==== 14-Oct-2005::14:47:07 === Yaws: Listening to 127.0.0.1:6180 for servers - http://localhost:6180 under ../../lib/jeai-1.0b5/yaws/www ** exited: {badarg,[{ets,lookup,[config,hosts]}, {ejabberd_config,get_global_option,1}, {jeai,create_sample_users,0}, {jeai,start,0}, {repos,do_start,1}, {erl_eval,do_apply,5}, {shell,exprs,6}, {shell,eval_loop,3}]} ** 2> =ERROR REPORT==== 14-Oct-2005::14:47:07 === Error in process <0.30.0> with exit value: {badarg,[{ets,lookup,[config,hosts]}, {ejabberd_config,get_global_option,1},{jeai,create_sample_users,0},{jeai,start,0 },{repos,do_start,1},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]} =ERROR REPORT==== 14-Oct-2005::14:47:31 === ERROR erlang code crashed: File: ../../lib/jeai-1.0b5/yaws/www/index.yaws:2 Reason: {badarg,[{ets,lookup,[translations,{"en-us","User"}]}, {translate,translate,2}, {m1,out,1}, {yaws_server,deliver_dyn_part,8}, {yaws_server,aloop,3}, {yaws_server,acceptor0,2}, {proc_lib,init_p,5}]} Req: {http_request,'GET',{abs_path,"/"},{1,1}} ERROR erlang code crashed: File: ../../lib/jeai-1.0b5/yaws/www/login.yaws:2 Reason: {badarg,[{ets,lookup,[translations,{"en-us","Main"}]}, {translate,translate,2}, {jeai_web,template,3}, {yaws_server,deliver_dyn_part,8}, {yaws_server,aloop,3}, {yaws_server,acceptor0,2}, {proc_lib,init_p,5}]} Req: {http_request,'GET',{abs_path,"/login.yaws"},{1,1}} when I go to the following url: http://127.0.0.1:6180/ I receive ERROR erlang code crashed: File: ../../lib/jeai-1.0b5/yaws/www/index.yaws:2 Reason: {badarg,[{ets,lookup,[translations,{"en-us","User"}]}, {translate,translate,2}, {m1,out,1}, {yaws_server,deliver_dyn_part,8}, {yaws_server,aloop,3}, {yaws_server,acceptor0,2}, {proc_lib,init_p,5}]} Req: {http_request,'GET',{abs_path,"/"},{1,1}} Any explanation as to what this is? From mickael.remond@REDACTED Fri Oct 14 15:20:00 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Fri, 14 Oct 2005 15:20:00 +0200 Subject: repos start jeai errors In-Reply-To: <3bb44c6e0510140556t5dc3799as8f660a36fb20306@mail.gmail.com> References: <3bb44c6e0510140556t5dc3799as8f660a36fb20306@mail.gmail.com> Message-ID: <434FB080.3020907@erlang-fr.org> bryan rasmussen wrote: > Hi, when I start jeai in repos I get errors at > > Any explanation as to what this is? This seems to be a bug in J-EAI. We will investigate it and try to fix it in a new release. It seems that it try to translate the user interface to en-us (probably the language declared by your web browser), but fails to do so. Thank you for the report ! -- Micka?l R?mond From sebastian@REDACTED Fri Oct 14 17:28:17 2005 From: sebastian@REDACTED (Sebastian Bello) Date: Fri, 14 Oct 2005 13:28:17 -0200 Subject: ODBC and a remote Oracle database Message-ID: <004801c5d0d3$e8e250f0$dc00a8c0@INSWITCH244> Hi all, I'm trying to access a remote Oracle database from Erlang through ODBC. I define the DSN pointing to a TNS Service Name which points to a remote Oracle database (and use Oracle's ODBC driver). Using the connection string "DSN=ev;UID=test;PWD=test" I get error {error,"No SQL-driver information available. Connection to database failed."} The same configuration works fine when ran in the machine where Oracle runs. Should a different connection string be used? Any other suggestions? Thanks, Sebastian- Prepaid Expertise - Programmable Switches Powered by Ericsson Licensed Technology Sebasti?n Bello - Engineer - Development Center - IN Switch Solutions Inc. Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0 4 93655773 / emea@REDACTED IN SWITCH ASIA Phone: +92 51 2800397/8- Fax: +92 51 2800399/ inswasia@REDACTED e-mail: sebastian@REDACTED -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1429 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: logoparafondo.gif Type: image/gif Size: 16886 bytes Desc: not available URL: From adam.aquilon@REDACTED Fri Oct 14 17:45:04 2005 From: adam.aquilon@REDACTED (Adam Aquilon) Date: Fri, 14 Oct 2005 17:45:04 +0200 Subject: ODBC and a remote Oracle database In-Reply-To: <004801c5d0d3$e8e250f0$dc00a8c0@INSWITCH244> Message-ID: <001501c5d0d6$3f27f850$4a01010a@cellpoint.se> Hi! I'm hardly an expert at ODBC or the erlang interface, but maybe it could be that the local machine is lacking the odbc drivers? Or maybe the config files. Are you using some kind of Oracle-provided ODBC client library? Oracle also have their own OCI library -- Oracle Call Interface. I seem to remember that the "tnsnames.ora" file was involved in that interface. We use the "unixODBC-2.2.3-6" package on old RedHat 9 servers. It depends on config info in "/etc/odbc.ini" and "/etc/odbcinst.ini". They contain settings like server, port, database name, driver shareable object library etc. Hope that helps, /Adam Aquilon _____ From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Sebastian Bello Sent: Friday, October 14, 2005 5:28 PM To: erlang-questions@REDACTED Subject: ODBC and a remote Oracle database Hi all, I'm trying to access a remote Oracle database from Erlang through ODBC. I define the DSN pointing to a TNS Service Name which points to a remote Oracle database (and use Oracle's ODBC driver). Using the connection string "DSN=ev;UID=test;PWD=test" I get error {error,"No SQL-driver information available. Connection to database failed."} The same configuration works fine when ran in the machine where Oracle runs. Should a different connection string be used? Any other suggestions? Thanks, Sebastian- Prepaid Expertise - Programmable Switches Powered by Ericsson Licensed Technology Sebasti?n Bello - Engineer - Development Center - IN Switch Solutions Inc. Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0 4 93655773 / emea@REDACTED IN SWITCH ASIA Phone: +92 51 2800397/8- Fax: +92 51 2800399/ inswasia@REDACTED e-mail: sebastian@REDACTED -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1429 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: logoparafondo.gif Type: image/gif Size: 16886 bytes Desc: not available URL: From serge@REDACTED Fri Oct 14 18:32:23 2005 From: serge@REDACTED (Serge Aleynikov) Date: Fri, 14 Oct 2005 12:32:23 -0400 Subject: ODBC and a remote Oracle database In-Reply-To: <004801c5d0d3$e8e250f0$dc00a8c0@INSWITCH244> References: <004801c5d0d3$e8e250f0$dc00a8c0@INSWITCH244> Message-ID: <434FDD97.5030706@hq.idt.net> Make sure that Oracle client and the ODBC is configured properly: If you are on Windows/UNIX, try: tnsping DATABASE_ALIAS If this doesn't return "ok", it means that your client is missing configuration in tnsnames.ora, which is usually found in: $ORACLE_HOME/network/admin Otherwise make sure that ODBC has a DSN entry for the database you are trying to connect to. Verify it by using: On Windows: Control Panel\Administrative Tools\Data Sources (ODBC) On Unix: run ODBCConfig (if you are using unixODBC) Serge Sebastian Bello wrote: > Hi all, > > I'm trying to access a remote Oracle database from Erlang through ODBC. > I define the DSN pointing to a TNS Service Name which points to a remote > Oracle database (and use Oracle's ODBC driver). Using the connection > string "DSN=ev;UID=test;PWD=test" I get error > {error,"No SQL-driver information available. Connection to database > failed."} > The same configuration works fine when ran in the machine where Oracle runs. > > Should a different connection string be used? Any other suggestions? > Thanks, > Sebastian- > > > > *Prepaid Expertise - Programmable Switches > Powered by Ericsson Licensed Technology > Sebasti?n Bello - Engineer - Development Center - IN Switch Solutions Inc. > Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 > Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 > IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0 4 93655773 / > emea@REDACTED > IN SWITCH ASIA Phone: +92 51 2800397/8- Fax: +92 51 2800399/ > inswasia@REDACTED > e-mail: sebastian@REDACTED > * > > ** > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From sebastian@REDACTED Fri Oct 14 18:33:02 2005 From: sebastian@REDACTED (Sebastian Bello) Date: Fri, 14 Oct 2005 14:33:02 -0200 Subject: ODBC and a remote Oracle database References: <001501c5d0d6$3f27f850$4a01010a@cellpoint.se> Message-ID: <005f01c5d0dc$f3576260$dc00a8c0@INSWITCH244> Adam, I installed the Oracle 9.2 Runtime, which includes client software. I'm using Oracle's driver, and am running on a Windows box. Sebastian- ----- Original Message ----- From: Adam Aquilon To: 'Sebastian Bello' Cc: erlang-questions@REDACTED Sent: Friday, October 14, 2005 1:45 PM Subject: RE: ODBC and a remote Oracle database Hi! I'm hardly an expert at ODBC or the erlang interface, but maybe it could be that the local machine is lacking the odbc drivers? Or maybe the config files. Are you using some kind of Oracle-provided ODBC client library? Oracle also have their own OCI library -- Oracle Call Interface. I seem to remember that the "tnsnames.ora" file was involved in that interface. We use the "unixODBC-2.2.3-6" package on old RedHat 9 servers. It depends on config info in "/etc/odbc.ini" and "/etc/odbcinst.ini". They contain settings like server, port, database name, driver shareable object library etc. Hope that helps, /Adam Aquilon ---------------------------------------------------------------------------- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Sebastian Bello Sent: Friday, October 14, 2005 5:28 PM To: erlang-questions@REDACTED Subject: ODBC and a remote Oracle database Hi all, I'm trying to access a remote Oracle database from Erlang through ODBC. I define the DSN pointing to a TNS Service Name which points to a remote Oracle database (and use Oracle's ODBC driver). Using the connection string "DSN=ev;UID=test;PWD=test" I get error {error,"No SQL-driver information available. Connection to database failed."} The same configuration works fine when ran in the machine where Oracle runs. Should a different connection string be used? Any other suggestions? Thanks, Sebastian- Prepaid Expertise - Programmable Switches Powered by Ericsson Licensed Technology Sebasti?n Bello - Engineer - Development Center - IN Switch Solutions Inc. Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0 4 93655773 / emea@REDACTED IN SWITCH ASIA Phone: +92 51 2800397/8- Fax: +92 51 2800399/ inswasia@REDACTED e-mail: sebastian@REDACTED -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1429 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: logoparafondo.gif Type: image/gif Size: 16886 bytes Desc: not available URL: From sebastian@REDACTED Fri Oct 14 18:41:13 2005 From: sebastian@REDACTED (Sebastian Bello) Date: Fri, 14 Oct 2005 14:41:13 -0200 Subject: ODBC and a remote Oracle database References: <004801c5d0d3$e8e250f0$dc00a8c0@INSWITCH244> <434FDD97.5030706@hq.idt.net> Message-ID: <006c01c5d0de$17c94270$dc00a8c0@INSWITCH244> Serge, tnsping works fine: C:\oracle\ora92\bin>tnsping TEST TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 14-OCT-20 05 14:40:17 Copyright (c) 1997 Oracle Corporation. All rights reserved. Used parameter files: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = INSWITCH-APP)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = TEST))) OK (30 msec) And yes, the DSN is defined in Control Panel\Administrative Tools\Data Sources. Sebastian- ----- Original Message ----- From: "Serge Aleynikov" To: "Sebastian Bello" Cc: "Erlang Questions" Sent: Friday, October 14, 2005 2:32 PM Subject: Re: ODBC and a remote Oracle database > Make sure that Oracle client and the ODBC is configured properly: > > If you are on Windows/UNIX, try: > > tnsping DATABASE_ALIAS > > If this doesn't return "ok", it means that your client is missing > configuration in tnsnames.ora, which is usually found in: > $ORACLE_HOME/network/admin > > Otherwise make sure that ODBC has a DSN entry for the database you are > trying to connect to. Verify it by using: > > On Windows: Control Panel\Administrative Tools\Data Sources (ODBC) > On Unix: run ODBCConfig (if you are using unixODBC) > > Serge > > Sebastian Bello wrote: > > Hi all, > > > > I'm trying to access a remote Oracle database from Erlang through ODBC. > > I define the DSN pointing to a TNS Service Name which points to a remote > > Oracle database (and use Oracle's ODBC driver). Using the connection > > string "DSN=ev;UID=test;PWD=test" I get error > > {error,"No SQL-driver information available. Connection to database > > failed."} > > The same configuration works fine when ran in the machine where Oracle runs. > > > > Should a different connection string be used? Any other suggestions? > > Thanks, > > Sebastian- > > > > > > > > *Prepaid Expertise - Programmable Switches > > Powered by Ericsson Licensed Technology > > Sebasti?n Bello - Engineer - Development Center - IN Switch Solutions Inc. > > Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 > > Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 > > IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0 4 93655773 / > > emea@REDACTED > > IN SWITCH ASIA Phone: +92 51 2800397/8- Fax: +92 51 2800399/ > > inswasia@REDACTED > > e-mail: sebastian@REDACTED > > * > > > > ** > > > > -- > Serge Aleynikov > R&D Telecom, IDT Corp. > Tel: (973) 438-3436 > Fax: (973) 438-1464 > serge@REDACTED -------------- next part -------------- An HTML attachment was scrubbed... URL: From erlang@REDACTED Fri Oct 14 21:38:44 2005 From: erlang@REDACTED (Michael McDaniel) Date: Fri, 14 Oct 2005 12:38:44 -0700 Subject: ODBC and a remote Oracle database In-Reply-To: <434FDD97.5030706@hq.idt.net> References: <004801c5d0d3$e8e250f0$dc00a8c0@INSWITCH244> <434FDD97.5030706@hq.idt.net> Message-ID: <20051014193844.GQ8098@delora.autosys.us> Perhaps ODBCINI and ODBCSYSINI need setting, pointing to proper files describing the (remote) server/database? >From within an application I do os:putenv("ODBCINI", "/etc/unixODBC/odbc.ini") , os:putenv("ODBCSYSINI", "/etc/unixODBC/odbcinst.ini") , ~Michael On Fri, Oct 14, 2005 at 12:32:23PM -0400, Serge Aleynikov wrote: > Make sure that Oracle client and the ODBC is configured properly: > > If you are on Windows/UNIX, try: > > tnsping DATABASE_ALIAS > > If this doesn't return "ok", it means that your client is missing > configuration in tnsnames.ora, which is usually found in: > $ORACLE_HOME/network/admin > > Otherwise make sure that ODBC has a DSN entry for the database you are > trying to connect to. Verify it by using: > > On Windows: Control Panel\Administrative Tools\Data Sources (ODBC) > On Unix: run ODBCConfig (if you are using unixODBC) > > Serge > > Sebastian Bello wrote: > >Hi all, > > > >I'm trying to access a remote Oracle database from Erlang through ODBC. > >I define the DSN pointing to a TNS Service Name which points to a remote > >Oracle database (and use Oracle's ODBC driver). Using the connection > >string "DSN=ev;UID=test;PWD=test" I get error > > {error,"No SQL-driver information available. Connection to database > >failed."} > >The same configuration works fine when ran in the machine where Oracle > >runs. > > > >Should a different connection string be used? Any other suggestions? > >Thanks, > > Sebastian- > > > > > > > >*Prepaid Expertise - Programmable Switches > >Powered by Ericsson Licensed Technology > >Sebasti?n Bello - Engineer - Development Center - IN Switch Solutions Inc. > >Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 > >Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 > >IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0 4 93655773 / > >emea@REDACTED > >IN SWITCH ASIA Phone: +92 51 2800397/8- Fax: +92 51 2800399/ > >inswasia@REDACTED > >e-mail: sebastian@REDACTED > >* > > > >** > > > > -- > Serge Aleynikov > R&D Telecom, IDT Corp. > Tel: (973) 438-3436 > Fax: (973) 438-1464 > serge@REDACTED -- Michael McDaniel Portland, Oregon, USA http://autosys.us +1 503 283 5284 From cyberlync@REDACTED Sat Oct 15 01:22:03 2005 From: cyberlync@REDACTED (Eric Merritt) Date: Fri, 14 Oct 2005 16:22:03 -0700 Subject: Issue with xmerl_eventp:stream_sax Message-ID: Guys, I have a little issue with the stream sax stuff from xmerl. Well formed xml is giving me the following error and I don't really know why. If you need me to I can supply examples of the callback module and the xml. Thanks! Error in process <0.31.0> with exit value: {badarg,[{xmerl_scan,scan_prolog,3},{xmerl_scan,scan_document,2},{xmerl_scan,string,2},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]} ** exited: {badarg,[{xmerl_scan,scan_prolog,3}, {xmerl_scan,scan_document,2}, {xmerl_scan,string,2}, {erl_eval,do_apply,5}, {shell,exprs,6}, {shell,eval_loop,3}]} ** From jahakala@REDACTED Sat Oct 15 13:00:04 2005 From: jahakala@REDACTED (Jani Hakala) Date: Sat, 15 Oct 2005 14:00:04 +0300 Subject: Issue with xmerl_eventp:stream_sax In-Reply-To: (Eric Merritt's message of "Fri, 14 Oct 2005 16:22:03 -0700") References: Message-ID: <87fyr3yrij.fsf@pingviini.kortex.jyu.fi> Eric Merritt writes: > Guys, > > I have a little issue with the stream sax stuff from xmerl. Well > formed xml is giving me the following error and I don't really know > why. If you need me to I can supply examples of the callback module > and the xml. Thanks! > Do you have something like in the beginning of the document? Last time I tested xmerl_eventp:stream_sax that line caused problems for some reason. After removing (altough there should have been no need to) I was able to do something with xmerl_eventp:stream_sax. Jani Hakala From serge@REDACTED Sat Oct 15 13:51:34 2005 From: serge@REDACTED (Serge Aleynikov) Date: Sat, 15 Oct 2005 07:51:34 -0400 Subject: erl_match question Message-ID: <4350ED46.2060008@hq.idt.net> Hi, I am trying to convert an application that uses erl_interface to use ei. I don't see an ei's analog of erl_match(Pattern, Term). Is the proper way of writing an ei application to mix ei & erl_interface, or ei is supposed to be a replacement for erl_interface? In a later case, how would I implement pattern matching in ei? Thanks. Serge From rasmussen.bryan@REDACTED Sat Oct 15 21:27:02 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Sat, 15 Oct 2005 21:27:02 +0200 Subject: Issue with xmerl_eventp:stream_sax In-Reply-To: <87fyr3yrij.fsf@pingviini.kortex.jyu.fi> References: <87fyr3yrij.fsf@pingviini.kortex.jyu.fi> Message-ID: <3bb44c6e0510151227p30af51dfgeceb140b0627fabf@mail.gmail.com> An xml parser is not obligated to accept any encoding but UTF-8 and UTF-16, perhaps this was the problem? On 10/15/05, Jani Hakala wrote: > Eric Merritt writes: > > > Guys, > > > > I have a little issue with the stream sax stuff from xmerl. Well > > formed xml is giving me the following error and I don't really know > > why. If you need me to I can supply examples of the callback module > > and the xml. Thanks! > > > Do you have something like > > > in the beginning of the document? Last time I tested > xmerl_eventp:stream_sax that line caused problems for some > reason. After removing (altough there should have been no need to) I > was able to do something with xmerl_eventp:stream_sax. > > Jani Hakala > > From emil.hellman@REDACTED Sun Oct 16 00:32:28 2005 From: emil.hellman@REDACTED (Emil Hellman) Date: Sun, 16 Oct 2005 00:32:28 +0200 Subject: Change not reflected when using ets:update_counter In-Reply-To: <434DDF00.4030304@picopeta.com> References: <434BB365.1050200@picopeta.com> <434DDF00.4030304@picopeta.com> Message-ID: > Thanks for the info. However, the ets:update_counter function allows me > to specify a position which needs to be updated with an increment. The > mnesia:update_counter function does not seem to have this facility. The dets module provides disk based term storage. It works as ets tables, but writes stuff to files instead. So check it out :) > Is there any way I can specify the position to update ? What is my_table > has two integer fields, and I want to update different fields in > different situations ? > Anindya. > > >From what I gather the dets:update_counter function takes 3 arguments.Key, Name and Increment. Increment is either an integer (and the function then updates the element directly after the key) or a tuple with {Pos, Incr} where Pos is the postition you want to update and Incr the amount you want to increment the counter with. Hope that helps... From cyberlync@REDACTED Sun Oct 16 06:29:49 2005 From: cyberlync@REDACTED (Eric Merritt) Date: Sat, 15 Oct 2005 21:29:49 -0700 Subject: Issue with xmerl_eventp:stream_sax In-Reply-To: <87fyr3yrij.fsf@pingviini.kortex.jyu.fi> References: <87fyr3yrij.fsf@pingviini.kortex.jyu.fi> Message-ID: Actually it has without the encoding. I didn't think to try it without the line at all. I will try it now. Thanks, Eric On 10/15/05, Jani Hakala wrote: > Eric Merritt writes: > > > Guys, > > > > I have a little issue with the stream sax stuff from xmerl. Well > > formed xml is giving me the following error and I don't really know > > why. If you need me to I can supply examples of the callback module > > and the xml. Thanks! > > > Do you have something like > > > in the beginning of the document? Last time I tested > xmerl_eventp:stream_sax that line caused problems for some > reason. After removing (altough there should have been no need to) I > was able to do something with xmerl_eventp:stream_sax. > > Jani Hakala > > From serge@REDACTED Sun Oct 16 18:46:44 2005 From: serge@REDACTED (Serge Aleynikov) Date: Sun, 16 Oct 2005 12:46:44 -0400 Subject: erl_call In-Reply-To: <4350ED46.2060008@hq.idt.net> References: <4350ED46.2060008@hq.idt.net> Message-ID: <435283F4.7040701@hq.idt.net> Attached please find a patch to erl_call utility that accomplishes the following: - added support for using SSH for remote start of a node (-ssh option) - added an ability to do a pattern match on a result of an function call using -a option. erl_call will exit with 0 if pattern match succeeded and with 1 otherwise. Extended syntax: -a 'Pattern = Mod:Fun(Args)' E.g.: -a '{_, _, _} = erlang:now()' There are still quite a few /* FIXME */ comments in the original source of erl_call.c. Are they going to be addressed anytime soon? I hope that this patch can make it in the distribution. Serge -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED -------------- next part -------------- A non-text attachment was scrubbed... Name: erl_call.patch.tar.gz Type: application/x-gzip Size: 17740 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: erl_call.patch URL: From jay@REDACTED Mon Oct 17 08:33:49 2005 From: jay@REDACTED (Jay Nelson) Date: Sun, 16 Oct 2005 23:33:49 -0700 Subject: London erlang-over-beer Message-ID: <435345CD.1080300@duomark.com> I will be in London from Oct 23 - Nov 6. Drop me an email if you are interested in meeting up for a beer and some erlang stories. Maybe we can get a small group together. jay From gordonguthrie@REDACTED Mon Oct 17 11:07:38 2005 From: gordonguthrie@REDACTED (Gordon Guthrie) Date: Mon, 17 Oct 2005 10:07:38 +0100 Subject: Erlang In Edinburgh - Saturday 22nd October Message-ID: <1129540058.435369da6cecb@backawinner.gg> Folks There will be an Erlang meet-up in Edinburgh the evening of Saturday 22nd October. Francesco Ceasarini is up training and there are folk coming from all over Scotland. We'll kick off at the Cafe Royal - we should be able to stay there all night, and it's very central (in addition there will be some money behind the bar)... For those of you unfamiliar with it: http://www.edinburghpubguide.co.uk/PubDetails/Cafe_Royal__The_72.html In case you get lost my mobile is 07776 251669 I look forward to meeting new folk interested in Erlang next weekend. Gordon ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From rasmussen.bryan@REDACTED Mon Oct 17 11:34:18 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Mon, 17 Oct 2005 11:34:18 +0200 Subject: repos start jeai errors In-Reply-To: <434FB080.3020907@erlang-fr.org> References: <3bb44c6e0510140556t5dc3799as8f660a36fb20306@mail.gmail.com> <434FB080.3020907@erlang-fr.org> Message-ID: <3bb44c6e0510170234x66ff52cdr2ed23ceae7942e01@mail.gmail.com> probably is the language declared by my browser. what language choice would annul this bug? Cheers Bryan Rasmussen On 10/14/05, Mickael Remond wrote: > bryan rasmussen wrote: > > Hi, when I start jeai in repos I get errors at > > > > Any explanation as to what this is? > > This seems to be a bug in J-EAI. We will investigate it and try to fix > it in a new release. > It seems that it try to translate the user interface to en-us (probably > the language declared by your web browser), but fails to do so. > > Thank you for the report ! > > -- > Micka?l R?mond > > > > From cyberlync@REDACTED Mon Oct 17 20:57:59 2005 From: cyberlync@REDACTED (Eric Merritt) Date: Mon, 17 Oct 2005 11:57:59 -0700 Subject: Issue with xmerl_eventp:stream_sax In-Reply-To: <3bb44c6e0510151227p30af51dfgeceb140b0627fabf@mail.gmail.com> References: <87fyr3yrij.fsf@pingviini.kortex.jyu.fi> <3bb44c6e0510151227p30af51dfgeceb140b0627fabf@mail.gmail.com> Message-ID: Well removing the solved the problem. However, I can't believe that the prolog isn't supported in xmerl sax. This is especially so with the fact that the DOM parser handles it just fine. Whats up there I wonder? On 10/15/05, bryan rasmussen wrote: > An xml parser is not obligated to accept any encoding but UTF-8 and > UTF-16, perhaps this was the problem? > > On 10/15/05, Jani Hakala wrote: > > Eric Merritt writes: > > > > > Guys, > > > > > > I have a little issue with the stream sax stuff from xmerl. Well > > > formed xml is giving me the following error and I don't really know > > > why. If you need me to I can supply examples of the callback module > > > and the xml. Thanks! > > > > > Do you have something like > > > > > > in the beginning of the document? Last time I tested > > xmerl_eventp:stream_sax that line caused problems for some > > reason. After removing (altough there should have been no need to) I > > was able to do something with xmerl_eventp:stream_sax. > > > > Jani Hakala > > > > > > From francesco@REDACTED Mon Oct 17 22:23:17 2005 From: francesco@REDACTED (Francesco Cesarini (Erlang Training & Consulting)) Date: Mon, 17 Oct 2005 21:23:17 +0100 Subject: Obfuscated Erlang/OTP competition @ the User Conference Message-ID: <43540835.3030204@erlang-consulting.com> The news with this year's Erlang User Conference (The program will be announced soon) is that we are organizing an Erlang Obfuscated Programming Competition in conjunction with it. The goal of this competition is to write the most obfuscated Erlang program, providing a safe forum for poor coding practices and programming styles. The winners will be announced during the conference, and their code will be posted on our site. The deadline for your submissions is November 4th. Entries will be judged by a panel of "subject matter experts", who will pick the most hideously elegant submission. You can read more about the competition at http://www.erlang-consulting.com/obfuscatederlang_fs.html Get those submissions coming in!!! Francesco -- http://www.erlang-consulting.com From ulf.wiger@REDACTED Tue Oct 18 10:15:41 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 18 Oct 2005 10:15:41 +0200 Subject: call for a lightweight xml parser Message-ID: I feel that I'm allowed to gripe a bit about xmerl, since I wrote the thing initially. (: xmerl has evolved into a mostly-complete xml parser that has quite a lot of hooks and gadgets -- good for tools that somehow operate on XML without realtime requirements (e.g. edoc et al). Leaving that aside for a moment, my own current need is to have a lightweight xml parser that handles reasonable XML chunks in a message-passing protocol. I wrote a small XML parser. It's good enough for what I want right now, so I'm probably going to leave it alone. I timed it on a small XML-like string (no header, and no DTD stuff): 18> timer:tc(vccXml,simple_xml,[""]). {20,{simple_xml,[{"protocol",[{"vsn","1.0"},{"name","vccBasic"}],[]}]}} Running the same string through xmerl: 15> timer:tc(xmerl_scan,string,[""]). {410, {{xmlElement,protocol, protocol, [], {xmlNamespace,[],[]}, [], 1, [{xmlAttribute,value,[],[],[],[],1,[],"vccBasic",false}], [], [], "/home/etxuwig/work/erlang/vcc-0.36", undeclared}, []}} Personally, I'd rather write my own incomplete parser than pay half a millisecond just to parse a string of 37 characters... Perhaps xmerl could include an 'xmerl_lite' parser that handles the type of XML that you're most likely to encounter in a packet, no entity refs, no strange encodings, etc.? I've included my own light parser below. It's limited in that it doesn't strictly do one-character at a time(*), and it should perhaps handle some more stuff (e.g. the form) in order to be sufficiently generic. See it as a suggestion. (*) I don't need that at the moment, and my current objective is not to write an XML parser. I run {packet,4} semantics, and will always get the complete string. Someone else may have a more complete, and equally lightweight parser to contribute? /Uffe =================================== -module(vccXml). -export([simple_xml/1]). -define(WHITESPACE(H), H==$\s; H==$\r; H==$\n; H==$\t). -define(bad_xml(T), erlang:error({bad_xml, string:substr(T, 1, 5)})). simple_xml(Bin) when is_binary(Bin) -> {simple_xml, simple_xml(strip(binary_to_list(Bin)), [])}; simple_xml(Str) -> {simple_xml, simple_xml(strip(Str), [])}. simple_xml("<" ++ Str, Acc) -> {Str1, Acc1} = xml_tag(strip(Str), [], Acc), simple_xml(Str1, Acc1); simple_xml([], Acc) -> lists:reverse(Acc). xml_tag("/>" ++ T, TagAcc, Acc) -> {strip(T), [{lists:reverse(TagAcc), [], []}|Acc]}; xml_tag(">" ++ Str, TagAcc, Acc) -> xml_content(strip(Str), lists:reverse(TagAcc), [], [], Acc); xml_tag([H|T], TagAcc, Acc) when ?WHITESPACE(H) -> xml_attributes(strip(T), [], [], lists:reverse(TagAcc), Acc); xml_tag([H|T], TagAcc, Acc) -> xml_tag(T, [H|TagAcc], Acc). xml_attributes("=" ++ T, TagAcc, AAcc, Tag, Acc) -> xml_attr_value(strip(T), lists:reverse(TagAcc), AAcc, Tag, Acc); xml_attributes([H|T], TagAcc, AAcc, Tag, Acc) when ?WHITESPACE(H) -> case strip(T) of "=" ++ T1 -> xml_attr_value(strip(T1), lists:reverse(TagAcc), AAcc, Tag, Acc); _ -> ?bad_xml(T) end; xml_attributes([H|T], TagAcc, AAcc, Tag, Acc) -> xml_attributes(T, [H|TagAcc], AAcc, Tag, Acc). xml_attr_value("\"" ++ T1, ATag, AAcc, Tag, Acc) -> {Str, T2} = scan_string(T1, []), case strip(T2) of "/>" ++ T3 -> {strip(T3), [{Tag, [{ATag, Str}|AAcc], []}|Acc]}; ">" ++ T3 -> xml_content( strip(T3), Tag, [], lists:reverse( [{ATag, Str}|AAcc]), Acc); T3 -> xml_attributes(T3, [], [{ATag, Str}|AAcc], Tag, Acc) end; xml_attr_value(T, _, _, _, _) -> ?bad_xml(T). xml_content(" Str1 = strip_prefix(Tag ++ ">", Str), {Str1, [{Tag, Attrs, lists:reverse(CAcc)}|Acc]}; xml_content("<" ++ Str, Tag, CAcc, Attrs, Acc) -> {Str1, CAcc1} = xml_tag(Str, [], CAcc), xml_content(Str1, Tag, CAcc1, Attrs, Acc); xml_content([H|T], Tag, CAcc, Attrs, Acc) -> xml_text(T, [H], Tag, CAcc, Attrs, Acc). xml_text("<" ++ _ = Str, TAcc, Tag, CAcc, Attrs, Acc) -> xml_content(Str, Tag, [{text, lists:reverse(strip(TAcc))}|CAcc], Attrs, Acc); xml_text([H|T], TAcc, Tag, CAcc, Attrs, Acc) -> xml_text(T, [H|TAcc], Tag, CAcc, Attrs, Acc). strip_prefix([H|T1], [H|T2]) -> strip_prefix(T1, T2); strip_prefix([], T) -> T; strip_prefix(_, T) -> ?bad_xml(T). strip([H|T]) when ?WHITESPACE(H) -> strip(T); strip(Str) -> Str. scan_string("\"" ++ T, Acc) -> {lists:reverse(Acc), T}; scan_string([H|T], Acc) -> scan_string(T, [H|Acc]); scan_string([], Acc) -> ?bad_xml(lists:reverse(Acc)). From ulf.wiger@REDACTED Tue Oct 18 12:40:51 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 18 Oct 2005 12:40:51 +0200 Subject: call for a lightweight xml parser Message-ID: Ulf Wiger wrote: > > I timed it on a small XML-like string (no header, and no > DTD stuff): > > 18> timer:tc(vccXml,simple_xml,[" vsn=\"1.0\"/>"]). > {20,{simple_xml,[{"protocol",[{"vsn","1.0"},{"name","vccBasic" > }],[]}]}} > > Running the same string through xmerl: > > 15> timer:tc(xmerl_scan,string,[""]). > {410, [...] Hmmm, I didn't notice until now that I had actually pasted in a _shorter_ XML string into the xmerl example. Add another 20 us or so to the 410 us above. (: /Uffe From serge@REDACTED Tue Oct 18 13:24:40 2005 From: serge@REDACTED (Serge Aleynikov) Date: Tue, 18 Oct 2005 07:24:40 -0400 Subject: how to capture io:format's output using ei? Message-ID: <4354DB78.2010609@hq.idt.net> All, Perhaps someone can point me in the right direction. I need to ensure that io:format/[1,2] functions' output can get properly displayed by the remote rpc caller written in ei (or erl_interface). When I run a distributed Erlang session below, the output gets captured correctly: ~> erl -noshell -sname t -eval \ 'rpc:call(tt@REDACTED, io, format, ["Test string~n"])' -s init stop Test string ~> However, using erl_call (written using ei) doesn't display the output. (Well, I know why it doesn't - by looking at the implementation of the '-a' option that uses ei_print_term, but it's not clear how to make sure that the console output gets redirected): ~> ./erl_call -sname tt@REDACTED -a 'io format ["Test string~n"]' -r ~> Any idea how to accomplish this? Thanks. Serge From james.hague@REDACTED Tue Oct 18 16:56:36 2005 From: james.hague@REDACTED (James Hague) Date: Tue, 18 Oct 2005 09:56:36 -0500 Subject: call for a lightweight xml parser In-Reply-To: References: Message-ID: Ulf Wiger wrote: >Perhaps xmerl could include an 'xmerl_lite' parser that handles >the type of XML that you're most likely to encounter in a packet, >no entity refs, no strange encodings, etc.? I agree with the need for a simple XML parser. The XML I typically deal with is for self-contained data files and is very simple. No namespaces, for example. I don't need support for tag attributes either, but that's more extreme than most people are willing to go. Writing a parser for this restricted XML subset was pleasant to do in Erlang. From ulf.wiger@REDACTED Tue Oct 18 17:50:24 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 18 Oct 2005 17:50:24 +0200 Subject: how to capture io:format's output using ei? Message-ID: Serge Aleynikov wrote: > > When I run a distributed Erlang session below, the output > gets captured > correctly: > > ~> erl -noshell -sname t -eval \ > 'rpc:call(tt@REDACTED, io, format, ["Test string~n"])' -s init > stop > Test string > ~> > > However, using erl_call (written using ei) doesn't display [...] > > ~> ./erl_call -sname tt@REDACTED -a 'io format ["Test > string~n"]' -r > ~> Interestingly, if you remove the "~n", it seems to work. That is, all of these work on my R10B: > erl_call -v -sname io@REDACTED -a 'io format [user,"hello\n",[]]' > erl_call -v -sname io@REDACTED -a 'io format [user,hello,[]]' > erl_call -v -sname io@REDACTED -a 'io format [hello]' > erl_call -v -sname io@REDACTED -a 'io format ["hello"]' but as soon as there's a tilde in there, nothing happens. /Uffe From serge@REDACTED Tue Oct 18 19:25:16 2005 From: serge@REDACTED (Serge Aleynikov) Date: Tue, 18 Oct 2005 13:25:16 -0400 Subject: how to capture io:format's output using ei? In-Reply-To: References: Message-ID: <43552FFC.9060903@hq.idt.net> Interesting... Though in my case even if I use "~n" then nothing gets returned. If I use "\n" then, 'ok' gets returned, however, a "Test string\n" gets printed in the shell window of the tt@REDACTED node: devlinuxpro2> ./erl_call -sname tt@REDACTED -a 'io format ["Test string~n"]' devlinuxpro2> (tt@REDACTED)9> (tt@REDACTED)9> devlinuxpro2> ./erl_call -sname tt@REDACTED -a 'io format ["Test string\n"]' ok <-- the result of a call got printed devlinuxpro2> (tt@REDACTED)9> Test string\n <-- this is printed in the shell (tt@REDACTED)9> So, the original question still stands: could you tell how to redirect the output when using the ei's rpc call? Thanks. Serge Ulf Wiger (AL/EAB) wrote: > Serge Aleynikov wrote: > >>When I run a distributed Erlang session below, the output >>gets captured >>correctly: >> >>~> erl -noshell -sname t -eval \ >> 'rpc:call(tt@REDACTED, io, format, ["Test string~n"])' -s init >>stop >>Test string >>~> >> >>However, using erl_call (written using ei) doesn't display > > [...] > >>~> ./erl_call -sname tt@REDACTED -a 'io format ["Test >>string~n"]' -r >>~> > > > > Interestingly, if you remove the "~n", it seems to work. > > That is, all of these work on my R10B: > > >>erl_call -v -sname io@REDACTED -a 'io format [user,"hello\n",[]]' >>erl_call -v -sname io@REDACTED -a 'io format [user,hello,[]]' >>erl_call -v -sname io@REDACTED -a 'io format [hello]' >>erl_call -v -sname io@REDACTED -a 'io format ["hello"]' > > > but as soon as there's a tilde in there, nothing happens. > > /Uffe From rasmussen.bryan@REDACTED Tue Oct 18 20:22:52 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Tue, 18 Oct 2005 20:22:52 +0200 Subject: call for a lightweight xml parser In-Reply-To: References: Message-ID: <3bb44c6e0510181122w33ec859tf829ee7e63055c82@mail.gmail.com> I've found a lite parser that will handle malformed xml useful, for working with non-mission critical data, and data in formats that are often malformed (for example RSS) On 10/18/05, James Hague wrote: > Ulf Wiger wrote: > > >Perhaps xmerl could include an 'xmerl_lite' parser that handles > >the type of XML that you're most likely to encounter in a packet, > >no entity refs, no strange encodings, etc.? > > I agree with the need for a simple XML parser. The XML I typically > deal with is for self-contained data files and is very simple. No > namespaces, for example. I don't need support for tag attributes > either, but that's more extreme than most people are willing to go. > Writing a parser for this restricted XML subset was pleasant to do in > Erlang. > From ulf@REDACTED Tue Oct 18 21:49:23 2005 From: ulf@REDACTED (Ulf Wiger) Date: Tue, 18 Oct 2005 21:49:23 +0200 Subject: how to capture io:format's output using ei? In-Reply-To: <43552FFC.9060903@hq.idt.net> References: <43552FFC.9060903@hq.idt.net> Message-ID: Den 2005-10-18 19:25:16 skrev Serge Aleynikov : > Interesting... > > Though in my case even if I use "~n" then nothing gets returned. If I > use "\n" then, 'ok' gets returned, however, a "Test string\n" gets > printed in the shell window of the tt@REDACTED node: > > devlinuxpro2> ./erl_call -sname tt@REDACTED -a 'io format ["Test > string~n"]' > devlinuxpro2> > > (tt@REDACTED)9> > (tt@REDACTED)9> > > devlinuxpro2> ./erl_call -sname tt@REDACTED -a 'io format ["Test > string\n"]' > ok <-- the result of a call got printed > devlinuxpro2> > > (tt@REDACTED)9> Test string\n <-- this is printed in the shell > (tt@REDACTED)9> Yes, this was exactly what I got too. Something in the chain chokes on the tilde. Remove it, and you can get a printout of sorts, but io:format/2 without tildes is a bit limited... > So, the original question still stands: could you tell how to redirect > the output when using the ei's rpc call? I have not looked into ei at all. The standard way to make sure that io gets executed on the remote node is to either set the group leader of the remote process to some standard group leader on the remote node (per default in an rpc:call(), the group leader is the calling process, which makes sense if the remote node e.g. doesn't have io capabilities). If you specify the destination in the io:format/3 call: io:format(user, "Hello~n", []) then the locally registered process 'user' will be used to handle the output. Note that on a node started with -noshell, whereis(user) -> undefined. This means nothing will get printed ;-), but rpc:call(Remote, io, format, [user,"...",[]]) will still return 'ok'. Again, this is how it works with normal rpc. Don't know about ei. /Uffe -- Ulf Wiger From cyberdanx@REDACTED Tue Oct 18 22:54:00 2005 From: cyberdanx@REDACTED (Chris Campbell) Date: Tue, 18 Oct 2005 21:54:00 +0100 Subject: Speedbar support? Message-ID: Hi, Does anyone know of erlang support for emacs speedbar? Regards, Chris From vlad.xx.dumitrescu@REDACTED Wed Oct 19 09:19:49 2005 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Wed, 19 Oct 2005 09:19:49 +0200 Subject: Speedbar support? Message-ID: <11498CB7D3FCB54897058DE63BE3897CA6607E@esealmw105.eemea.ericsson.se> Hi, There is support for erlang in the CEDET tools at http://cedet.sourceforge.net/semantic.shtml Regards, Vlad > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Chris Campbell > Sent: Tuesday, October 18, 2005 10:54 PM > To: erlang-questions@REDACTED > Subject: Speedbar support? > > Hi, > > Does anyone know of erlang support for emacs speedbar? > > > Regards, > Chris > From gordonguthrie@REDACTED Wed Oct 19 10:36:55 2005 From: gordonguthrie@REDACTED (Gordon Guthrie) Date: Wed, 19 Oct 2005 09:36:55 +0100 Subject: Erlang In Edinburgh - Saturday 22nd October In-Reply-To: <1129540058.435369da6cecb@backawinner.gg> References: <1129540058.435369da6cecb@backawinner.gg> Message-ID: <1129711015.435605a7bd7d8@backawinner.gg> Kurt Wilkin has wisely pointed out that I never put a time in my post - 7:30pm... Apols Quoting Gordon Guthrie : > Folks > > There will be an Erlang meet-up in Edinburgh the evening of Saturday 22nd > October. Francesco Ceasarini is up training and there are folk coming from > all > over Scotland. > > We'll kick off at the Cafe Royal - we should be able to stay there all night, > > and it's very central (in addition there will be some money behind the > bar)... > > For those of you unfamiliar with it: > > http://www.edinburghpubguide.co.uk/PubDetails/Cafe_Royal__The_72.html > > In case you get lost my mobile is 07776 251669 > > I look forward to meeting new folk interested in Erlang next weekend. > > Gordon > > ------------------------------------------------- > This mail sent through IMP: http://horde.org/imp/ > > ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From rprice@REDACTED Wed Oct 19 10:38:43 2005 From: rprice@REDACTED (Roger Price) Date: Wed, 19 Oct 2005 10:38:43 +0200 (CEST) Subject: GS server dies in SuSE Linux OSS 10.0 Message-ID: I upgraded a PC to SuSE Linux OSS 10.0. I then installed Erlang R10B-7 and tried to start GS, but the GS server died immediately: Erlang (BEAM) emulator version 5.4.9 [source] [hipe] Eshell V5.4.9 (abort with ^G) 1> S = gs:start() . {error,backend_died} Roger From rasmussen.bryan@REDACTED Wed Oct 19 10:47:54 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Wed, 19 Oct 2005 10:47:54 +0200 Subject: repos start jeai errors In-Reply-To: <3bb44c6e0510170234x66ff52cdr2ed23ceae7942e01@mail.gmail.com> References: <3bb44c6e0510140556t5dc3799as8f660a36fb20306@mail.gmail.com> <434FB080.3020907@erlang-fr.org> <3bb44c6e0510170234x66ff52cdr2ed23ceae7942e01@mail.gmail.com> Message-ID: <3bb44c6e0510190147k3b824aa9u3b2e73688951d166@mail.gmail.com> well I went ahead and removed the en-us from my browser (firefox) tried to restart and got the following =CRASH REPORT==== 19-Oct-2005::10:33:30 === crasher: pid: <0.43.0> registered_name: [] error_info: "invalid return value from ejabberd_app:start(normal,[]) -> {'EX IT',\n {{badmatch,{aborted,{no_exists,acl}}} ,\n [{ejabberd_config,set_opts,1},\n {ejabberd_app,start,2},\n {application_master,start_it_old,4}]}}" initial_call: {application_master,init, [<0.5.0>, <0.42.0>, {appl_data, ejabberd, [ejabberd, ejabberd_sup, ejabberd_auth, ejabberd_router, ejabberd_sm, ejabberd_s2s, ejabberd_local, ejabberd_listeners, ejabberd_iq_sup, ejabberd_service_sup, ejabberd_s2s_out_sup, ejabberd_s2s_in_sup, ejabberd_c2s_sup, ejabberd_mod_roster, ejabberd_mod_echo, ejabberd_mod_pubsub, ejabberd_mod_irc, ejabberd_mod_muc, ejabberd_offline, random_generator], undefined, {ejabberd_app,[]}, [acl, configure, cyrsasl, cyrsasl_digest, cyrsasl_plain, ejabberd, ejabberd_app, ejabberd_auth, ejabberd_c2s, ejabberd_config, ejabberd_listener, ejabberd_logger_h, ejabberd_local, ejabberd_router, ejabberd_s2s, ejabberd_s2s_in, ejabberd_s2s_out, ejabberd_service, ejabberd_sm, ejabberd_sup, ejabberd_tmp_sup, gen_iq_handler, gen_mod, jd2ejd, jlib, mod_configure, mod_disco, mod_echo, mod_last, mod_offline, mod_private, mod_register, mod_roster, mod_stats, mod_time, mod_vcard, mod_version, randoms, sha, shaper, translate, xml, xml_stream], [], infinity, infinity}, normal]} ancestors: [<0.42.0>] messages: [{'EXIT',<0.44.0>,normal}] links: [<0.42.0>,<0.5.0>] dictionary: [] trap_exit: true status: running heap_size: 987 stack_size: 21 reductions: 73 neighbours: =INFO REPORT==== 19-Oct-2005::10:33:32 === application: ejabberd exited: "invalid return value from ejabberd_app:start(normal,[]) -> {'EXIT', \n {{badmatch,{aborted,{no_exists,acl}}},\n [{ejabberd_config,set_opts,1},\n {ejabberd_app,start,2},\n {application_master,start_it_old,4}]}}" type: temporary .... etc. etc. stuff that worked, change log path to C:\WINDOWS/Temp etc. =INFO REPORT==== 19-Oct-2005::10:33:33 === Yaws: Listening to 127.0.0.1:6180 for servers - http://localhost:6180 under ../../lib/jeai-1.0b5/yaws/www ** exited: {badarg,[{ets,lookup,[config,hosts]}, {ejabberd_config,get_global_option,1}, {jeai,create_sample_users,0}, {jeai,start,0}, {repos,do_start,1}, {erl_eval,do_apply,5}, {shell,exprs,6}, {shell,eval_loop,3}]} ** 2> =ERROR REPORT==== 19-Oct-2005::10:33:33 === Error in process <0.30.0> with exit value: {badarg,[{ets,lookup,[config,hosts]}, {ejabberd_config,get_global_option,1},{jeai,create_sample_users,0},{jeai,start,0 },{repos,do_start,1},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]} One thing is that I'm running this as windows XP in Vmware 5.0 and not from a cd but off the iso file through Daemon tools. Could this be causing the problems. Also I have a normal erlang installed: erl5.4.5 On 10/17/05, bryan rasmussen wrote: > probably is the language declared by my browser. what language choice > would annul this bug? > > Cheers > Bryan Rasmussen > > On 10/14/05, Mickael Remond wrote: > > bryan rasmussen wrote: > > > Hi, when I start jeai in repos I get errors at > > > > > > Any explanation as to what this is? > > > > This seems to be a bug in J-EAI. We will investigate it and try to fix > > it in a new release. > > It seems that it try to translate the user interface to en-us (probably > > the language declared by your web browser), but fails to do so. > > > > Thank you for the report ! > > > > -- > > Micka?l R?mond > > > > > > > > > From bjorn@REDACTED Wed Oct 19 11:00:07 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 19 Oct 2005 11:00:07 +0200 Subject: call for a lightweight xml parser In-Reply-To: References: Message-ID: Why not try to include a faster parser in the xmerl application? xmerl could by default use a fast, slim-lined parser, and as soon as it encounters something it can't handle, it can revert to the slower but more complete parser. I think that would be a much better from the user's point of view, than to introdue Yet Another XML parser for Erlang. /Bj?rn "Ulf Wiger (AL/EAB)" writes: > I feel that I'm allowed to gripe a bit about xmerl, since I > wrote the thing initially. (: > > xmerl has evolved into a mostly-complete xml parser > that has quite a lot of hooks and gadgets -- good for > tools that somehow operate on XML without realtime > requirements (e.g. edoc et al). > > Leaving that aside for a moment, my own current need > is to have a lightweight xml parser that handles reasonable > XML chunks in a message-passing protocol. > > I wrote a small XML parser. It's good enough for what I > want right now, so I'm probably going to leave it alone. > I timed it on a small XML-like string (no header, and no > DTD stuff): > > 18> timer:tc(vccXml,simple_xml,[""]). > {20,{simple_xml,[{"protocol",[{"vsn","1.0"},{"name","vccBasic"}],[]}]}} > > Running the same string through xmerl: > > 15> timer:tc(xmerl_scan,string,[""]). > {410, > {{xmlElement,protocol, > protocol, > [], > {xmlNamespace,[],[]}, > [], > 1, > [{xmlAttribute,value,[],[],[],[],1,[],"vccBasic",false}], > [], > [], > "/home/etxuwig/work/erlang/vcc-0.36", > undeclared}, > []}} > > Personally, I'd rather write my own incomplete parser than > pay half a millisecond just to parse a string of 37 characters... > > Perhaps xmerl could include an 'xmerl_lite' parser that handles > the type of XML that you're most likely to encounter in a packet, > no entity refs, no strange encodings, etc.? > > I've included my own light parser below. It's limited in that it > doesn't strictly do one-character at a time(*), and it should perhaps > handle some more stuff (e.g. the form) in order to be > sufficiently generic. See it as a suggestion. > > (*) I don't need that at the moment, and my current objective is not to > write an XML parser. I run {packet,4} semantics, and will always > get the complete string. > > Someone else may have a more complete, and equally lightweight > parser to contribute? > > /Uffe > > =================================== > > -module(vccXml). > > -export([simple_xml/1]). > > -define(WHITESPACE(H), H==$\s; H==$\r; H==$\n; H==$\t). > -define(bad_xml(T), erlang:error({bad_xml, string:substr(T, 1, 5)})). > > simple_xml(Bin) when is_binary(Bin) -> > {simple_xml, simple_xml(strip(binary_to_list(Bin)), [])}; > simple_xml(Str) -> > {simple_xml, simple_xml(strip(Str), [])}. > > simple_xml("<" ++ Str, Acc) -> > {Str1, Acc1} = xml_tag(strip(Str), [], Acc), > simple_xml(Str1, Acc1); > simple_xml([], Acc) -> > lists:reverse(Acc). > > xml_tag("/>" ++ T, TagAcc, Acc) -> > {strip(T), [{lists:reverse(TagAcc), [], []}|Acc]}; > xml_tag(">" ++ Str, TagAcc, Acc) -> > xml_content(strip(Str), lists:reverse(TagAcc), [], [], Acc); > xml_tag([H|T], TagAcc, Acc) when ?WHITESPACE(H) -> > xml_attributes(strip(T), [], [], lists:reverse(TagAcc), Acc); > xml_tag([H|T], TagAcc, Acc) -> > xml_tag(T, [H|TagAcc], Acc). > > > xml_attributes("=" ++ T, TagAcc, AAcc, Tag, Acc) -> > xml_attr_value(strip(T), lists:reverse(TagAcc), AAcc, Tag, Acc); > xml_attributes([H|T], TagAcc, AAcc, Tag, Acc) when ?WHITESPACE(H) -> > case strip(T) of > "=" ++ T1 -> > xml_attr_value(strip(T1), lists:reverse(TagAcc), AAcc, Tag, Acc); > _ -> > ?bad_xml(T) > end; > xml_attributes([H|T], TagAcc, AAcc, Tag, Acc) -> > xml_attributes(T, [H|TagAcc], AAcc, Tag, Acc). > > xml_attr_value("\"" ++ T1, ATag, AAcc, Tag, Acc) -> > {Str, T2} = scan_string(T1, []), > case strip(T2) of > "/>" ++ T3 -> > {strip(T3), [{Tag, [{ATag, Str}|AAcc], []}|Acc]}; > ">" ++ T3 -> > xml_content( > strip(T3), Tag, [], lists:reverse( > [{ATag, Str}|AAcc]), Acc); > T3 -> > xml_attributes(T3, [], [{ATag, Str}|AAcc], Tag, Acc) > end; > xml_attr_value(T, _, _, _, _) -> > ?bad_xml(T). > > > > > xml_content(" > Str1 = strip_prefix(Tag ++ ">", Str), > {Str1, [{Tag, Attrs, lists:reverse(CAcc)}|Acc]}; > xml_content("<" ++ Str, Tag, CAcc, Attrs, Acc) -> > {Str1, CAcc1} = xml_tag(Str, [], CAcc), > xml_content(Str1, Tag, CAcc1, Attrs, Acc); > xml_content([H|T], Tag, CAcc, Attrs, Acc) -> > xml_text(T, [H], Tag, CAcc, Attrs, Acc). > > xml_text("<" ++ _ = Str, TAcc, Tag, CAcc, Attrs, Acc) -> > xml_content(Str, Tag, [{text, lists:reverse(strip(TAcc))}|CAcc], > Attrs, Acc); > xml_text([H|T], TAcc, Tag, CAcc, Attrs, Acc) -> > xml_text(T, [H|TAcc], Tag, CAcc, Attrs, Acc). > > strip_prefix([H|T1], [H|T2]) -> > strip_prefix(T1, T2); > strip_prefix([], T) -> > T; > strip_prefix(_, T) -> > ?bad_xml(T). > > > strip([H|T]) when ?WHITESPACE(H) -> > strip(T); > strip(Str) -> > Str. > > > scan_string("\"" ++ T, Acc) -> > {lists:reverse(Acc), T}; > scan_string([H|T], Acc) -> > scan_string(T, [H|Acc]); > scan_string([], Acc) -> > ?bad_xml(lists:reverse(Acc)). > > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From ulf.wiger@REDACTED Wed Oct 19 11:07:54 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 19 Oct 2005 11:07:54 +0200 Subject: call for a lightweight xml parser Message-ID: Agreed. This is roughly what I had in mind. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Bjorn > Gustavsson > Sent: den 19 oktober 2005 11:00 > To: erlang-questions@REDACTED > Subject: Re: call for a lightweight xml parser > > > Why not try to include a faster parser in the xmerl application? > > xmerl could by default use a fast, slim-lined parser, and as soon > as it encounters something it can't handle, it can revert to the > slower but more complete parser. > > I think that would be a much better from the user's point of view, > than to introdue Yet Another XML parser for Erlang. > > /Bj?rn From rasmussen.bryan@REDACTED Wed Oct 19 11:11:56 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Wed, 19 Oct 2005 11:11:56 +0200 Subject: repos start jeai errors In-Reply-To: <3bb44c6e0510190147k3b824aa9u3b2e73688951d166@mail.gmail.com> References: <3bb44c6e0510140556t5dc3799as8f660a36fb20306@mail.gmail.com> <434FB080.3020907@erlang-fr.org> <3bb44c6e0510170234x66ff52cdr2ed23ceae7942e01@mail.gmail.com> <3bb44c6e0510190147k3b824aa9u3b2e73688951d166@mail.gmail.com> Message-ID: <3bb44c6e0510190211n4733dc81xb305991d9773a20f@mail.gmail.com> I've been able to start yaws seperately, which I wasn't able to before. However http://127.0.0.1:6080/~user/ returns a 404, http://127.0.0.1:6080/ Yaws server is up and running ! As I understand it if the whole jeai had been installed this would be a login page? On 10/19/05, bryan rasmussen wrote: > well I went ahead and removed the en-us from my browser (firefox) > tried to restart > and got the following > > > =CRASH REPORT==== 19-Oct-2005::10:33:30 === > crasher: > pid: <0.43.0> > registered_name: [] > error_info: "invalid return value from ejabberd_app:start(normal,[]) -> {'EX > IT',\n {{badmatch,{aborted,{no_exists,acl}}} > ,\n [{ejabberd_config,set_opts,1},\n > {ejabberd_app,start,2},\n > {application_master,start_it_old,4}]}}" > initial_call: {application_master,init, > [<0.5.0>, > <0.42.0>, > {appl_data, > ejabberd, > [ejabberd, > ejabberd_sup, > ejabberd_auth, > ejabberd_router, > ejabberd_sm, > ejabberd_s2s, > ejabberd_local, > ejabberd_listeners, > ejabberd_iq_sup, > ejabberd_service_sup, > ejabberd_s2s_out_sup, > ejabberd_s2s_in_sup, > > ejabberd_c2s_sup, > ejabberd_mod_roster, > ejabberd_mod_echo, > ejabberd_mod_pubsub, > ejabberd_mod_irc, > ejabberd_mod_muc, > ejabberd_offline, > random_generator], > undefined, > {ejabberd_app,[]}, > [acl, > configure, > cyrsasl, > cyrsasl_digest, > cyrsasl_plain, > ejabberd, > ejabberd_app, > ejabberd_auth, > ejabberd_c2s, > ejabberd_config, > ejabberd_listener, > ejabberd_logger_h, > ejabberd_local, > ejabberd_router, > ejabberd_s2s, > ejabberd_s2s_in, > ejabberd_s2s_out, > ejabberd_service, > ejabberd_sm, > ejabberd_sup, > ejabberd_tmp_sup, > gen_iq_handler, > gen_mod, > jd2ejd, > jlib, > mod_configure, > mod_disco, > mod_echo, > mod_last, > mod_offline, > mod_private, > mod_register, > mod_roster, > mod_stats, > mod_time, > mod_vcard, > mod_version, > randoms, > sha, > shaper, > translate, > xml, > xml_stream], > [], > infinity, > infinity}, > normal]} > ancestors: [<0.42.0>] > messages: [{'EXIT',<0.44.0>,normal}] > links: [<0.42.0>,<0.5.0>] > dictionary: [] > trap_exit: true > status: running > heap_size: 987 > stack_size: 21 > reductions: 73 > neighbours: > > =INFO REPORT==== 19-Oct-2005::10:33:32 === > application: ejabberd > exited: "invalid return value from ejabberd_app:start(normal,[]) -> {'EXIT', > \n {{badmatch,{aborted,{no_exists,acl}}},\n > [{ejabberd_config,set_opts,1},\n > {ejabberd_app,start,2},\n > {application_master,start_it_old,4}]}}" > type: temporary > .... etc. etc. stuff that worked, change log path to C:\WINDOWS/Temp etc. > > > =INFO REPORT==== 19-Oct-2005::10:33:33 === > Yaws: Listening to 127.0.0.1:6180 for servers > - http://localhost:6180 under ../../lib/jeai-1.0b5/yaws/www > ** exited: {badarg,[{ets,lookup,[config,hosts]}, > {ejabberd_config,get_global_option,1}, > {jeai,create_sample_users,0}, > {jeai,start,0}, > {repos,do_start,1}, > {erl_eval,do_apply,5}, > {shell,exprs,6}, > {shell,eval_loop,3}]} ** > 2> > =ERROR REPORT==== 19-Oct-2005::10:33:33 === > Error in process <0.30.0> with exit value: {badarg,[{ets,lookup,[config,hosts]}, > {ejabberd_config,get_global_option,1},{jeai,create_sample_users,0},{jeai,start,0 > },{repos,do_start,1},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]} > > > One thing is that I'm running this as > > windows XP in Vmware 5.0 and not from a cd but off the iso file > through Daemon tools. Could this be causing the problems. Also I have > a normal erlang installed: erl5.4.5 > > > > > > On 10/17/05, bryan rasmussen wrote: > > probably is the language declared by my browser. what language choice > > would annul this bug? > > > > Cheers > > Bryan Rasmussen > > > > On 10/14/05, Mickael Remond wrote: > > > bryan rasmussen wrote: > > > > Hi, when I start jeai in repos I get errors at > > > > > > > > Any explanation as to what this is? > > > > > > This seems to be a bug in J-EAI. We will investigate it and try to fix > > > it in a new release. > > > It seems that it try to translate the user interface to en-us (probably > > > the language declared by your web browser), but fails to do so. > > > > > > Thank you for the report ! > > > > > > -- > > > Micka?l R?mond > > > > > > > > > > > > > > > From rasmussen.bryan@REDACTED Wed Oct 19 12:32:40 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Wed, 19 Oct 2005 12:32:40 +0200 Subject: repos start jeai errors In-Reply-To: <3bb44c6e0510190211n4733dc81xb305991d9773a20f@mail.gmail.com> References: <3bb44c6e0510140556t5dc3799as8f660a36fb20306@mail.gmail.com> <434FB080.3020907@erlang-fr.org> <3bb44c6e0510170234x66ff52cdr2ed23ceae7942e01@mail.gmail.com> <3bb44c6e0510190147k3b824aa9u3b2e73688951d166@mail.gmail.com> <3bb44c6e0510190211n4733dc81xb305991d9773a20f@mail.gmail.com> Message-ID: <3bb44c6e0510190332v122a8d55j4c328e67d8661c33@mail.gmail.com> well silly me, I moved it out of Daemon Tools iso into the normal file system and it worked. On 10/19/05, bryan rasmussen wrote: > I've been able to start yaws seperately, which I wasn't able to before. However > http://127.0.0.1:6080/~user/ returns a 404, http://127.0.0.1:6080/ > Yaws server is up and running ! > As I understand it if the whole jeai had been installed this would be > a login page? > > On 10/19/05, bryan rasmussen wrote: > > well I went ahead and removed the en-us from my browser (firefox) > > tried to restart > > and got the following > > > > > > =CRASH REPORT==== 19-Oct-2005::10:33:30 === > > crasher: > > pid: <0.43.0> > > registered_name: [] > > error_info: "invalid return value from ejabberd_app:start(normal,[]) -> {'EX > > IT',\n {{badmatch,{aborted,{no_exists,acl}}} > > ,\n [{ejabberd_config,set_opts,1},\n > > {ejabberd_app,start,2},\n > > {application_master,start_it_old,4}]}}" > > initial_call: {application_master,init, > > [<0.5.0>, > > <0.42.0>, > > {appl_data, > > ejabberd, > > [ejabberd, > > ejabberd_sup, > > ejabberd_auth, > > ejabberd_router, > > ejabberd_sm, > > ejabberd_s2s, > > ejabberd_local, > > ejabberd_listeners, > > ejabberd_iq_sup, > > ejabberd_service_sup, > > ejabberd_s2s_out_sup, > > ejabberd_s2s_in_sup, > > > > ejabberd_c2s_sup, > > ejabberd_mod_roster, > > ejabberd_mod_echo, > > ejabberd_mod_pubsub, > > ejabberd_mod_irc, > > ejabberd_mod_muc, > > ejabberd_offline, > > random_generator], > > undefined, > > {ejabberd_app,[]}, > > [acl, > > configure, > > cyrsasl, > > cyrsasl_digest, > > cyrsasl_plain, > > ejabberd, > > ejabberd_app, > > ejabberd_auth, > > ejabberd_c2s, > > ejabberd_config, > > ejabberd_listener, > > ejabberd_logger_h, > > ejabberd_local, > > ejabberd_router, > > ejabberd_s2s, > > ejabberd_s2s_in, > > ejabberd_s2s_out, > > ejabberd_service, > > ejabberd_sm, > > ejabberd_sup, > > ejabberd_tmp_sup, > > gen_iq_handler, > > gen_mod, > > jd2ejd, > > jlib, > > mod_configure, > > mod_disco, > > mod_echo, > > mod_last, > > mod_offline, > > mod_private, > > mod_register, > > mod_roster, > > mod_stats, > > mod_time, > > mod_vcard, > > mod_version, > > randoms, > > sha, > > shaper, > > translate, > > xml, > > xml_stream], > > [], > > infinity, > > infinity}, > > normal]} > > ancestors: [<0.42.0>] > > messages: [{'EXIT',<0.44.0>,normal}] > > links: [<0.42.0>,<0.5.0>] > > dictionary: [] > > trap_exit: true > > status: running > > heap_size: 987 > > stack_size: 21 > > reductions: 73 > > neighbours: > > > > =INFO REPORT==== 19-Oct-2005::10:33:32 === > > application: ejabberd > > exited: "invalid return value from ejabberd_app:start(normal,[]) -> {'EXIT', > > \n {{badmatch,{aborted,{no_exists,acl}}},\n > > [{ejabberd_config,set_opts,1},\n > > {ejabberd_app,start,2},\n > > {application_master,start_it_old,4}]}}" > > type: temporary > > .... etc. etc. stuff that worked, change log path to C:\WINDOWS/Temp etc. > > > > > > =INFO REPORT==== 19-Oct-2005::10:33:33 === > > Yaws: Listening to 127.0.0.1:6180 for servers > > - http://localhost:6180 under ../../lib/jeai-1.0b5/yaws/www > > ** exited: {badarg,[{ets,lookup,[config,hosts]}, > > {ejabberd_config,get_global_option,1}, > > {jeai,create_sample_users,0}, > > {jeai,start,0}, > > {repos,do_start,1}, > > {erl_eval,do_apply,5}, > > {shell,exprs,6}, > > {shell,eval_loop,3}]} ** > > 2> > > =ERROR REPORT==== 19-Oct-2005::10:33:33 === > > Error in process <0.30.0> with exit value: {badarg,[{ets,lookup,[config,hosts]}, > > {ejabberd_config,get_global_option,1},{jeai,create_sample_users,0},{jeai,start,0 > > },{repos,do_start,1},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]} > > > > > > One thing is that I'm running this as > > > > windows XP in Vmware 5.0 and not from a cd but off the iso file > > through Daemon tools. Could this be causing the problems. Also I have > > a normal erlang installed: erl5.4.5 > > > > > > > > > > > > On 10/17/05, bryan rasmussen wrote: > > > probably is the language declared by my browser. what language choice > > > would annul this bug? > > > > > > Cheers > > > Bryan Rasmussen > > > > > > On 10/14/05, Mickael Remond wrote: > > > > bryan rasmussen wrote: > > > > > Hi, when I start jeai in repos I get errors at > > > > > > > > > > Any explanation as to what this is? > > > > > > > > This seems to be a bug in J-EAI. We will investigate it and try to fix > > > > it in a new release. > > > > It seems that it try to translate the user interface to en-us (probably > > > > the language declared by your web browser), but fails to do so. > > > > > > > > Thank you for the report ! > > > > > > > > -- > > > > Micka?l R?mond > > > > > > > > > > > > > > > > > > > > > > From serge@REDACTED Wed Oct 19 13:50:15 2005 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 19 Oct 2005 07:50:15 -0400 Subject: how to capture io:format's output using ei? In-Reply-To: References: <43552FFC.9060903@hq.idt.net> Message-ID: <435632F7.1020704@hq.idt.net> Uffe, Thank you for your comments. Perhaps someone from the ei's OTP support team can shed some light on this issue. The open question is: As Uffe pointed out we can register a local process 'user' using ei's ei_publish() function (along with bind() and listen() on an open socket). However, then it forces us to use io:format(user, Format, Args) function on the server node, and if I understand this correctly, the output of io:format/2 won't be sent to the remote C client caller. Is there a "correct" (i.e. preferred) way of doing this in C, so that output of both io:format/[2,3] could be captured at the remote node invoking the ei_rpc(), and that io:format/[2,3] would understand tildes? Thanks. Serge Ulf Wiger wrote: > Den 2005-10-18 19:25:16 skrev Serge Aleynikov : > >> Interesting... >> >> Though in my case even if I use "~n" then nothing gets returned. If >> I use "\n" then, 'ok' gets returned, however, a "Test string\n" gets >> printed in the shell window of the tt@REDACTED node: >> >> devlinuxpro2> ./erl_call -sname tt@REDACTED -a 'io format ["Test >> string~n"]' >> devlinuxpro2> >> >> (tt@REDACTED)9> >> (tt@REDACTED)9> >> >> devlinuxpro2> ./erl_call -sname tt@REDACTED -a 'io format ["Test >> string\n"]' >> ok <-- the result of a call got printed >> devlinuxpro2> >> >> (tt@REDACTED)9> Test string\n <-- this is printed in the shell >> (tt@REDACTED)9> > > > Yes, this was exactly what I got too. > Something in the chain chokes on the tilde. Remove it, and you > can get a printout of sorts, but io:format/2 without tildes is > a bit limited... > > >> So, the original question still stands: could you tell how to >> redirect the output when using the ei's rpc call? > > > I have not looked into ei at all. The standard way to make sure that > io gets executed on the remote node is to either set the group leader > of the remote process to some standard group leader on the remote > node (per default in an rpc:call(), the group leader is the calling > process, which makes sense if the remote node e.g. doesn't have io > capabilities). > > If you specify the destination in the io:format/3 call: > > io:format(user, "Hello~n", []) > > then the locally registered process 'user' will be used to > handle the output. Note that on a node started with -noshell, > whereis(user) -> undefined. This means nothing will get > printed ;-), but rpc:call(Remote, io, format, [user,"...",[]]) > will still return 'ok'. > > Again, this is how it works with normal rpc. Don't know about ei. > > /Uffe From serge@REDACTED Wed Oct 19 13:57:11 2005 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 19 Oct 2005 07:57:11 -0400 Subject: erlang license Message-ID: <43563497.1090803@hq.idt.net> Hi, Could you point me in the right direction regarding becoming a licensed user? I tried to email edu@REDACTED (which is the contact stated at the erlang.se site), but the delivery failed. Thanks, Serge -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From bmk@REDACTED Wed Oct 19 14:45:40 2005 From: bmk@REDACTED (Micael Karlberg) Date: Wed, 19 Oct 2005 14:45:40 +0200 Subject: erlang license In-Reply-To: <43563497.1090803@hq.idt.net> References: <43563497.1090803@hq.idt.net> Message-ID: <43563FF4.2030104@erix.ericsson.se> Actually, it first states: "To obtain a license or for further information, contact us at sales@REDACTED" But at the bottom of the page is the (at the moment incorrect) text: "If you have any further questions use edu@REDACTED" Anyway, try: sales@REDACTED /BMK Serge Aleynikov wrote: > Hi, > > Could you point me in the right direction regarding becoming a licensed > user? I tried to email edu@REDACTED (which is the contact > stated at the erlang.se site), but the delivery failed. > > Thanks, > > Serge > From serge@REDACTED Wed Oct 19 14:48:37 2005 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 19 Oct 2005 08:48:37 -0400 Subject: erlang license In-Reply-To: <43563FF4.2030104@erix.ericsson.se> References: <43563497.1090803@hq.idt.net> <43563FF4.2030104@erix.ericsson.se> Message-ID: <435640A5.4050900@hq.idt.net> That's exactly what I did - after not hearing back from sales@REDACTED (I made three attempts in the past two months) I send another email (that failed) to the second contact. :-( Micael Karlberg wrote: > Actually, it first states: > > "To obtain a license or for further information, contact us at > sales@REDACTED" > > But at the bottom of the page is the (at the moment incorrect) text: > > "If you have any further questions use edu@REDACTED" > > Anyway, try: sales@REDACTED > > /BMK > > Serge Aleynikov wrote: > >> Hi, >> >> Could you point me in the right direction regarding becoming a >> licensed user? I tried to email edu@REDACTED (which is the >> contact stated at the erlang.se site), but the delivery failed. >> >> Thanks, >> >> Serge >> > From mickael.remond@REDACTED Wed Oct 19 14:54:53 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Wed, 19 Oct 2005 14:54:53 +0200 Subject: repos start jeai errors In-Reply-To: <3bb44c6e0510190147k3b824aa9u3b2e73688951d166@mail.gmail.com> References: <3bb44c6e0510140556t5dc3799as8f660a36fb20306@mail.gmail.com> <434FB080.3020907@erlang-fr.org> <3bb44c6e0510170234x66ff52cdr2ed23ceae7942e01@mail.gmail.com> <3bb44c6e0510190147k3b824aa9u3b2e73688951d166@mail.gmail.com> Message-ID: <4356421D.2050701@erlang-fr.org> bryan rasmussen wrote: > well I went ahead and removed the en-us from my browser (firefox) > tried to restart > and got the following How are you starting J-eai in REPOS ? do you use: repos.sh and then jeai:start() ? -- Micka?l R?mond From cyberdanx@REDACTED Wed Oct 19 23:00:12 2005 From: cyberdanx@REDACTED (Chris Campbell) Date: Wed, 19 Oct 2005 22:00:12 +0100 Subject: restarting child processes Message-ID: Hi, I'm playing with the supervisor behaviour but for some reason it always terminates after a problem with the child. The program is a little contrieved to learn about the behaviour. The child is to terminate if it doesn't receive a message within 750ms. The supervisor should restart it indefinitely, instead it terminates. Here is the child module. % swf_kid.erl -module(swf_kid). -export([start_child/0, child_work/0, stop_child/1]). start_child() -> child_work(). child_work() -> receive stop -> io:format("stopping!~n"), ok; Others -> child_work() after 750 -> io:format("child exiting~n"), exit(blah) end. stop_child(C) -> C ! stop. and here is the supervisor. % swf_supervisor.erl -module(swf_supervisor). -behaviour(supervisor). -export([start_link/0, init/1]). start_link() -> supervisor:start_link(swf_supervisor, []). init(_X) -> {ok, {{one_for_one, 50, 1}, [{kid, {swf_kid, start_child, []}, permanent, brutal_kill, worker, []}]}}. This gives the following error (with sasl)... > swf_supervisor:start_link(). child exiting =SUPERVISOR REPORT==== 19-Oct-2005::21:52:53 === Supervisor: {<0.256.0>,swf_supervisor} Context: start_error Reason: {'EXIT',blah} Offender: [{pid,undefined}, {name,kid}, {mfa,{swf_kid,start_child,[]}}, {restart_type,permanent}, {shutdown,brutal_kill}, {child_type,worker}] ** exited: shutdown ** Why isn't the child being restarted? Regards, Chris From lennart.ohman@REDACTED Wed Oct 19 23:27:15 2005 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Wed, 19 Oct 2005 23:27:15 +0200 Subject: restarting child processes In-Reply-To: Message-ID: Hi Chris, the childprocess (or worker) crashes in its init-phase. You can se this by examining the Context field in the supervisor report (start_error). The supervisor will then consider itself to be a failure and crash in its own initphase. As a note, your child is actually not a proper OTP process either, or to put it in a more polite way :-) one can say that you have choose to role-your-own by not using for instance the gen_server behaviour. The convention is that you write code for a gen_server by having a start_link function which calls gen_server:start_link. Then you must have an init function in the call-back module mentioned in the gen_server:start_link call. The init function must return one of a set of allowed return values. When for instance {ok,InitialLoopDataStructure} is returned, the gen_server process enters its working state and will be restarted (if configured so in the supervisor) in case it "missbehaves". Best Regards, Lennart ------------------------------------------------------------- Lennart Ohman office : +46-8-587 623 27 Sjoland & Thyselius Telecom AB cellular: +46-70-552 67 35 Sehlstedtsgatan 6 fax : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Chris Campbell Sent: Wednesday, October 19, 2005 11:00 PM To: erlang-questions@REDACTED Subject: restarting child processes Hi, I'm playing with the supervisor behaviour but for some reason it always terminates after a problem with the child. The program is a little contrieved to learn about the behaviour. The child is to terminate if it doesn't receive a message within 750ms. The supervisor should restart it indefinitely, instead it terminates. Here is the child module. % swf_kid.erl -module(swf_kid). -export([start_child/0, child_work/0, stop_child/1]). start_child() -> child_work(). child_work() -> receive stop -> io:format("stopping!~n"), ok; Others -> child_work() after 750 -> io:format("child exiting~n"), exit(blah) end. stop_child(C) -> C ! stop. and here is the supervisor. % swf_supervisor.erl -module(swf_supervisor). -behaviour(supervisor). -export([start_link/0, init/1]). start_link() -> supervisor:start_link(swf_supervisor, []). init(_X) -> {ok, {{one_for_one, 50, 1}, [{kid, {swf_kid, start_child, []}, permanent, brutal_kill, worker, []}]}}. This gives the following error (with sasl)... > swf_supervisor:start_link(). child exiting =SUPERVISOR REPORT==== 19-Oct-2005::21:52:53 === Supervisor: {<0.256.0>,swf_supervisor} Context: start_error Reason: {'EXIT',blah} Offender: [{pid,undefined}, {name,kid}, {mfa,{swf_kid,start_child,[]}}, {restart_type,permanent}, {shutdown,brutal_kill}, {child_type,worker}] ** exited: shutdown ** Why isn't the child being restarted? Regards, Chris From cyberdanx@REDACTED Wed Oct 19 23:59:11 2005 From: cyberdanx@REDACTED (Chris Campbell) Date: Wed, 19 Oct 2005 22:59:11 +0100 Subject: restarting child processes In-Reply-To: References: Message-ID: On 19/10/05, Lennart Ohman wrote: > Hi Chris, > the childprocess (or worker) crashes in its init-phase. You > can se this by examining the Context field in the supervisor > report (start_error). The supervisor will then consider itself > to be a failure and crash in its own initphase. Ok. Thanks. > As a note, your child is actually not a proper OTP process either, > or to put it in a more polite way :-) one can say that you have > choose to role-your-own by not using for instance the gen_server > behaviour. [snip] Ok, I rewrote it so it uses gen_server however it never times out. % swf_kid.erl -module(swf_kid). -behaviour(gen_server). -export([start_link/0, terminate/2]). -export([init/1, handle_cast/2, handle_info/2, handle_call/3]). start_link() -> io:format("Child starting~n"), gen_server:start_link(swf_kid, [{timeout, 750}], []). init(_A) -> process_flag(trap_exit, true), {ok, []}. handle_cast(_A, S) -> {noreply, S}. handle_call(_R, _F, S) -> {reply, dont_care, S}. handle_info(timeout, S) -> io:format("Child exiting!~n"), {stop, arghh, S}. terminate(shutdown, _S) -> ok. % swf_supervisor.erl -module(swf_supervisor). -behaviour(supervisor). -export([start_link/0, init/1]). start_link() -> supervisor:start_link(swf_supervisor, []). init(_X) -> {ok, {{one_for_one, 50, 1}, [{kid, {swf_kid, start_link, []}, permanent, brutal_kill, worker, [swf_kid]}]}}. From lennart.ohman@REDACTED Thu Oct 20 00:06:35 2005 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Thu, 20 Oct 2005 00:06:35 +0200 Subject: restarting child processes In-Reply-To: Message-ID: I guess from your code that you hope the child process will stop on its own!? The problem then is that the so called server side timeout (what when I teach OTP call the gen_server gets bored :-) is controlled by having for instance init return {ok,LoopData,TimeOut}. Changing your code would then be: start_link() -> io:format("Child starting~n"), gen_server:start_link(swf_kid, [{timeout, 750}], []). init([{timeout,T}]) -> process_flag(trap_exit, true), {ok, [],T}. Since you seem to want to forward the timeout as a parameter from the supervisor to the newly created gen_server process. /Lennart ------------------------------------------------------------- Lennart Ohman office : +46-8-587 623 27 Sjoland & Thyselius Telecom AB cellular: +46-70-552 67 35 Sehlstedtsgatan 6 fax : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED -----Original Message----- From: Chris Campbell [mailto:cyberdanx@REDACTED] Sent: Wednesday, October 19, 2005 11:59 PM To: Lennart Ohman Cc: erlang-questions@REDACTED Subject: Re: restarting child processes On 19/10/05, Lennart Ohman wrote: > Hi Chris, > the childprocess (or worker) crashes in its init-phase. You > can se this by examining the Context field in the supervisor > report (start_error). The supervisor will then consider itself > to be a failure and crash in its own initphase. Ok. Thanks. > As a note, your child is actually not a proper OTP process either, > or to put it in a more polite way :-) one can say that you have > choose to role-your-own by not using for instance the gen_server > behaviour. [snip] Ok, I rewrote it so it uses gen_server however it never times out. % swf_kid.erl -module(swf_kid). -behaviour(gen_server). -export([start_link/0, terminate/2]). -export([init/1, handle_cast/2, handle_info/2, handle_call/3]). start_link() -> io:format("Child starting~n"), gen_server:start_link(swf_kid, [{timeout, 750}], []). init(_A) -> process_flag(trap_exit, true), {ok, []}. handle_cast(_A, S) -> {noreply, S}. handle_call(_R, _F, S) -> {reply, dont_care, S}. handle_info(timeout, S) -> io:format("Child exiting!~n"), {stop, arghh, S}. terminate(shutdown, _S) -> ok. % swf_supervisor.erl -module(swf_supervisor). -behaviour(supervisor). -export([start_link/0, init/1]). start_link() -> supervisor:start_link(swf_supervisor, []). init(_X) -> {ok, {{one_for_one, 50, 1}, [{kid, {swf_kid, start_link, []}, permanent, brutal_kill, worker, [swf_kid]}]}}. From ke.han@REDACTED Thu Oct 20 02:05:55 2005 From: ke.han@REDACTED (ke.han) Date: Thu, 20 Oct 2005 08:05:55 +0800 Subject: erlang license In-Reply-To: <435640A5.4050900@hq.idt.net> References: <43563497.1090803@hq.idt.net> <43563FF4.2030104@erix.ericsson.se> <435640A5.4050900@hq.idt.net> Message-ID: <4356DF63.1080402@redstarling.com> Serge Aleynikov wrote: > That's exactly what I did - after not hearing back from > sales@REDACTED (I made three attempts in the past two months) > I send another email (that failed) to the second contact. :-( I did the same thing. A few months ago I sent a request to the sales address. No response ;-(. Can someone at Ericsson please find out who is supposed to be receiving these emails and find out why they don't respond? thanks, ke han. >> > > From samuel@REDACTED Thu Oct 20 08:28:09 2005 From: samuel@REDACTED (Samuel Rivas) Date: Thu, 20 Oct 2005 08:28:09 +0200 Subject: restarting child processes In-Reply-To: References: Message-ID: <20051020062809.GA24220@riker.dc.fi.udc.es> Lennart Ohman wrote: > the childprocess (or worker) crashes in its init-phase. You > can se this by examining the Context field in the supervisor > report (start_error). The supervisor will then consider itself > to be a failure and crash in its own initphase. > As a note, your child is actually not a proper OTP process either, > or to put it in a more polite way :-) one can say that you have > choose to role-your-own by not using for instance the gen_server > behaviour. Well, the serious problem is not not using the gen_server behaviour, a supervisor can start other processes if you follow the instructions in the manual. The main issue is that start_child() is not starting any process at all. So, paraphrasing the manual: "The start function must create and link to the child process, and should return {ok,Child} or {ok,Child,Info} where Child is the pid of the child process and Info an arbitrary term which is ignored by the supervisor." Whereas start_child simply goes into a receive block and crashes after 750 ms. Thus, it is not the child process who is crashing but the supervisor process itself. Regards. -- Samuel From matthias@REDACTED Thu Oct 20 08:56:51 2005 From: matthias@REDACTED (Matthias Lang) Date: Thu, 20 Oct 2005 08:56:51 +0200 Subject: erlang license In-Reply-To: <435640A5.4050900@hq.idt.net> References: <43563497.1090803@hq.idt.net> <43563FF4.2030104@erix.ericsson.se> <435640A5.4050900@hq.idt.net> Message-ID: <17239.16307.594402.189434@antilipe.corelatus.se> Serge Aleynikov writes: > That's exactly what I did - after not hearing back from > sales@REDACTED (I made three attempts in the past two months) > I send another email (that failed) to the second contact. :-( Wildly offtopic, but this reminds me of "desperately seeking tkaurich". We use c6xxx DSPs from Texas Instruments. Interesting DSPs, they execute 8 instructions in parallel for each clock and _all_ the problems of making sure that results are ready in time for following instructions are left to the C compiler---like RISC taken a step further. Compiler bugs, i.e. incorrect object code, are not infrequent, but the excellent bang/buck and bang/W make them a winner anyway. In spite of paying a hefty per-seat fee for the compiler _and_ paying (note 1) a compulsory yearly support fee, support is poor. TI seem to spend the entire support budget on building ticketing systems designed to prevent my questions from reaching someone with a clue. Q: The compiler generates incorrect object code for this snippet of code. When can I have a fix? A: Have you considered diagnosing your problem with our industry-leading graphical Visual Tuner Edition Debugger Edition 2.0++? (the above example may be slightly exaggerated to improve clarity...) One day, I noticed that the linux (!) version of the compiler had a username in the distribution tarfile---files were owned by 'tkaurich'. 30 seconds on google and I found a personal website for a Tim Kaurich who works for TI, complete with pictures of his baby, house, cat and dog. But no email address. I gave up. The point? "professional" support systems, such as the maze of automated reply systems and clunky erratas TI have, are often really crap compared to ad-hoc support systems like 'erlang-questions'. But we all knew that already, and I just used the mailing list to vent my spleen. Matthias (footnote 1) if anyone from TI is reading this, I'm pretty sure I haven't paid for support for the past year or two. I've tried, but your system for accepting VISA card payments seems to lose my payments somewhere along the line and nobody ever chases it up. Actually, given that we buy DSPs for several orders of magnitude more than your support fee, maybe you could consider just making the tools and support free (as in beer). From csanto@REDACTED Thu Oct 20 10:28:31 2005 From: csanto@REDACTED (Corrado Santoro) Date: Thu, 20 Oct 2005 10:28:31 +0200 Subject: Allocation in erl_interface Message-ID: <4357552F.1010103@diit.unict.it> Dear all, I'm using ports to perform a communication between an erlang program and a C one. In the C program, I'm using erl_XXX function to extract data from incoming messages; I'm wondering if each call to a erl_XXX function (e.g. erl_element, erl_hd, erl_tail) perform a new allocation, so the return term must be then deallocated by means of erl_free_term. Any suggestion? --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 +39 095 7387035 +39 095 7382365 +39 095 7382364 VoIP: sip:7035@REDACTED Fax: +39 095 7382397 EMail: csanto@REDACTED Personal Home Page: http://www.diit.unict.it/users/csanto NUXI Home Page: http://nuxi.iit.unict.it ====================================================== From matthias@REDACTED Thu Oct 20 11:57:37 2005 From: matthias@REDACTED (Matthias Lang) Date: Thu, 20 Oct 2005 11:57:37 +0200 Subject: Allocation in erl_interface In-Reply-To: <4357552F.1010103@diit.unict.it> References: <4357552F.1010103@diit.unict.it> Message-ID: <17239.27153.100047.928974@antilipe.corelatus.se> Corrado Santoro writes: > In the C program, I'm using erl_XXX function to extract data from > incoming messages; I'm wondering if each call to a erl_XXX function > (e.g. erl_element, erl_hd, erl_tail) perform a new allocation, so the > return term must be then deallocated by means of erl_free_term. I've never passed erlang terms to C programs; I prefer to let the Erlang side adapt itself to C. But the manual says: | Normally it is the programmer's responsibility to free each Erlang | term that has been returned from any of the erl_interface | functions. See erl_free_term and erl_free_compound in http://erlang.se/doc/doc-5.4.8/lib/erl_interface-3.5.4/doc/html/erl_malloc.html#erl_free/1 Matthias From ola.a.andersson@REDACTED Thu Oct 20 15:22:40 2005 From: ola.a.andersson@REDACTED (Ola Andersson A (AL/EAB)) Date: Thu, 20 Oct 2005 15:22:40 +0200 Subject: Obfuscated Erlang/OTP competition @ the User Conference Message-ID: <148408C0A2D44A41AB295D74E18399755DBB2B@esealmw105.eemea.ericsson.se> What? Do you mean that it is actually possible to write obfuscated erlang code? =:O *total shock and disbelief* /OLA. > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of > Francesco Cesarini (Erlang Training & Consulting) > Sent: den 17 oktober 2005 22:23 > To: Erlang mailing list > Subject: Obfuscated Erlang/OTP competition @ the User Conference > > The news with this year's Erlang User Conference (The program > will be announced soon) is that we are organizing an Erlang > Obfuscated Programming Competition in conjunction with it. > The goal of this competition is to write the most obfuscated > Erlang program, providing a safe forum for poor coding > practices and programming styles. The winners will be > announced during the conference, and their code will be > posted on our site. > > The deadline for your submissions is November 4th. Entries > will be judged by a panel of "subject matter experts", who > will pick the most hideously elegant submission. You can read > more about the competition at > > http://www.erlang-consulting.com/obfuscatederlang_fs.html > > Get those submissions coming in!!! > > Francesco > -- > http://www.erlang-consulting.com > > From james.hague@REDACTED Thu Oct 20 16:00:51 2005 From: james.hague@REDACTED (James Hague) Date: Thu, 20 Oct 2005 09:00:51 -0500 Subject: Quad-core Macs: More reason for a multi-CPU aware Erlang Message-ID: Apple introduced a Power Mac with two dual-core CPUs on Wednesday. Yes, it's expensive, but I suspect machines like this will start being common in the next year. More incentive to get cracking on multi-CPU support for Erlang :) http://www.apple.com/powermac/ From cyberdanx@REDACTED Thu Oct 20 16:38:45 2005 From: cyberdanx@REDACTED (Chris Campbell) Date: Thu, 20 Oct 2005 15:38:45 +0100 Subject: Quad-core Macs: More reason for a multi-CPU aware Erlang In-Reply-To: References: Message-ID: I don't understand. Surely it is easy to take advantage of multiple cpus given that distribution is fairly easy with Erlang? Does the runtime support memory mapped pages between nodes on the same machine? This was the preferred way to use multiple cpus in Oz. Oz isn't Erlang, but I would assume the same strategy here. Start a main process, that spawns new nodes to parallelise computations on different cores. The developer is in full control of what is sent off for computation elsewhere and it doesn't involve unnecessarily complicating the runtime and scheduler. Note, I'm fairly new to Erlang so maybe there is some complication I'm not aware of. Regards, Chris From huss01@REDACTED Thu Oct 20 22:15:50 2005 From: huss01@REDACTED (=?ISO-8859-1?Q?H=E5kan_Huss?=) Date: Thu, 20 Oct 2005 22:15:50 +0200 Subject: Obfuscated Erlang/OTP competition @ the User Conference In-Reply-To: <148408C0A2D44A41AB295D74E18399755DBB2B@esealmw105.eemea.ericsson.se> References: <148408C0A2D44A41AB295D74E18399755DBB2B@esealmw105.eemea.ericsson.se> Message-ID: "The determined Real Programmer can write Fortran programs in any language." :-) /H?kan 2005/10/20, Ola Andersson A (AL/EAB) : > What? Do you mean that it is actually possible to write obfuscated > erlang code? =:O > *total shock and disbelief* > /OLA. > > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED] On Behalf Of > > Francesco Cesarini (Erlang Training & Consulting) > > Sent: den 17 oktober 2005 22:23 > > To: Erlang mailing list > > Subject: Obfuscated Erlang/OTP competition @ the User Conference > > > > The news with this year's Erlang User Conference (The program > > will be announced soon) is that we are organizing an Erlang > > Obfuscated Programming Competition in conjunction with it. > > The goal of this competition is to write the most obfuscated > > Erlang program, providing a safe forum for poor coding > > practices and programming styles. The winners will be > > announced during the conference, and their code will be > > posted on our site. > > > > The deadline for your submissions is November 4th. Entries > > will be judged by a panel of "subject matter experts", who > > will pick the most hideously elegant submission. You can read > > more about the competition at > > > > http://www.erlang-consulting.com/obfuscatederlang_fs.html > > > > Get those submissions coming in!!! > > > > Francesco > > -- > > http://www.erlang-consulting.com > > > > > From cyberdanx@REDACTED Fri Oct 21 02:39:18 2005 From: cyberdanx@REDACTED (Chris Campbell) Date: Fri, 21 Oct 2005 01:39:18 +0100 Subject: multiply matrices using erlang and mnesia Message-ID: Hi, I'm playing with mnesia right now and am wondering the best way to solve this problem with it. The idea is to multiply matrices by adding jobs of rows to complete to the database which workers will take on and complete, putting the resulting row back in the database for retrieval by the initiator. Putting work up is easy. The trick is to get work out to the workers (really, letting them know a job has arrived) and let the process that posted the work know it's done. What's the best way to go about this using mnesia? It has pattern matching, which allows picking the correct entries but I'm not sure how to let the workers know about the job short of polling the db periodically for new jobs. The program is just a toy based on a lecture at uni on tuplespaces. We went through an example use to multiply large matrices. I want to adapt this to erlang and mnesia to see what it'd look like. Regards, Chris From chandrashekhar.mullaparthi@REDACTED Fri Oct 21 10:08:53 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Fri, 21 Oct 2005 09:08:53 +0100 Subject: multiply matrices using erlang and mnesia In-Reply-To: References: Message-ID: Hi, On 21/10/05, Chris Campbell wrote: > Hi, > > Putting work up is easy. The trick is to get work out to the workers > (really, letting them know a job has arrived) and let the process that > posted the work know it's done. What's the best way to go about this > using mnesia? It has pattern matching, which allows picking the > correct entries but I'm not sure how to let the workers know about the > job short of polling the db periodically for new jobs. If you make sure jobs are inserted in an ordered set then you can have a dedicated process taking the first job out of the table and spawning a worker process. One of the items in the table can be the process id of the process which needs the result. Once the table is empty, you can either the poll the table periodically or subscribe to mnesia table events. hth Chandru From ulf.wiger@REDACTED Fri Oct 21 09:42:54 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 21 Oct 2005 09:42:54 +0200 Subject: multiply matrices using erlang and mnesia Message-ID: You could do it in a few different ways: - Mnesia has an event mechanism. Each worker calls: mnesia:subscribe({table, Tab, simple}), and then receives messages of the following form: {mnesia_table_event, {write, NewRecord, ActivityId}} (the record tag is always set to the table name here) - You can write a wrapper function that inserts the jobs in the table: Result = mnesia:activity(transaction, fun() ... end), tell_workers(Result, ...) Note that mnesia:activity() will EXIT upon abort, in case nothing got written. - The 'rdbms' contrib has commit triggers. These will only fire if you actually use 'rdbms' as the activity module, though (this can be set as default in mnesia, but it can also be over-ridden by the calling function.) The subscribe function will of course always work. The other solutions can be bypassed by a rogue program. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Chris Campbell > Sent: den 21 oktober 2005 02:39 > To: erlang-questions@REDACTED > Subject: multiply matrices using erlang and mnesia > > > Hi, > > I'm playing with mnesia right now and am wondering the best way to > solve this problem with it. The idea is to multiply matrices by > adding jobs of rows to complete to the database which workers will > take on and complete, putting the resulting row back in the database > for retrieval by the initiator. > > Putting work up is easy. The trick is to get work out to the workers > (really, letting them know a job has arrived) and let the process that > posted the work know it's done. What's the best way to go about this > using mnesia? It has pattern matching, which allows picking the > correct entries but I'm not sure how to let the workers know about the > job short of polling the db periodically for new jobs. > > The program is just a toy based on a lecture at uni on tuplespaces. > We went through an example use to multiply large matrices. I want to > adapt this to erlang and mnesia to see what it'd look like. > > > > Regards, > Chris > From mbj@REDACTED Fri Oct 21 11:28:40 2005 From: mbj@REDACTED (Martin Bjorklund) Date: Fri, 21 Oct 2005 11:28:40 +0200 (CEST) Subject: edoc question Message-ID: <20051021.112840.08327279.mbj@tail-f.com> How do I specify that a parameter to a function should be a certain record? I'd like to write %% @type Foo = #foo{} but that doesn't work. I end up with %% @type Foo = tuple() %% @end %% Foo is really a #foo{} or %% @type ... %% @end %% type Foo = #foo{} I tried another variant, to use edoc comments like this: % % @type Foo = #foo{} but it seems as edoc parses the expression even if it's commented out? /martin From richardc@REDACTED Fri Oct 21 11:47:57 2005 From: richardc@REDACTED (Richard Carlsson) Date: Fri, 21 Oct 2005 11:47:57 +0200 Subject: edoc question In-Reply-To: <20051021.112840.08327279.mbj@tail-f.com> References: <20051021.112840.08327279.mbj@tail-f.com> Message-ID: <4358B94D.9040506@csd.uu.se> Martin Bjorklund wrote: > How do I specify that a parameter to a function should be a certain > record? > > I'd like to write > > %% @type Foo = #foo{} > > but that doesn't work. Right now there is no support for the #foo{} syntax in edoc, ... But! - I've recently added it, and it will be in R10-8! (Quite possibly without any documentation, but you should be able to use it, as in your example above.) Note that I recommend using names like foo() for datatypes in Erlang, rather than variable names such as Foo, which are more typically used as type variables (i.e., that are bound to some data type). > I tried another variant, to use edoc comments like this: > > % % @type Foo = #foo{} > > but it seems as edoc parses the expression even if it's commented out? Hm. It shouldn't. Can you produce a test case? /Richard ---- "Having users is like optimization: the wise course is to delay it." -- Paul Graham From mbj@REDACTED Fri Oct 21 12:20:07 2005 From: mbj@REDACTED (Martin Bjorklund) Date: Fri, 21 Oct 2005 12:20:07 +0200 (CEST) Subject: edoc question In-Reply-To: <20051021.121307.41175866.mbj@tail-f.com> References: <20051021.112840.08327279.mbj@tail-f.com> <4358B94D.9040506@csd.uu.se> <20051021.121307.41175866.mbj@tail-f.com> Message-ID: <20051021.122007.130218598.mbj@tail-f.com> Martin Bjorklund wrote: > > Hm. It shouldn't. Can you produce a test case? > > %%%-------------------------------------------------------------------- > %%% edoc types > %%% @type session_handler() = pid() > % % @type cs() = #cs{} > %%% @end > %%%-------------------------------------------------------------------- > > The error I get is: > at line 41: syntax error before: '%' If you instead put the commented line after @end, it works. %%%-------------------------------------------------------------------- %%% edoc types %%% @type session_handler() = pid() %%% @end % % @type cs() = #cs{} FIXME fix in R10-8 %%%-------------------------------------------------------------------- /martin From richardc@REDACTED Fri Oct 21 12:40:31 2005 From: richardc@REDACTED (Richard Carlsson) Date: Fri, 21 Oct 2005 12:40:31 +0200 Subject: edoc question In-Reply-To: <20051021.122007.130218598.mbj@tail-f.com> References: <20051021.112840.08327279.mbj@tail-f.com> <4358B94D.9040506@csd.uu.se> <20051021.121307.41175866.mbj@tail-f.com> <20051021.122007.130218598.mbj@tail-f.com> Message-ID: <4358C59F.80202@csd.uu.se> Martin Bjorklund wrote: >%%%-------------------------------------------------------------------- >%%% edoc types >%%% @type session_handler() = pid() >% % @type cs() = #cs{} >%%% @end >%%%-------------------------------------------------------------------- > >The error I get is: > at line 41: syntax error before: '%' I thought as much. (I've been bitten by this myself once, so it's something that maybe should be fixed somehow.) What happens is of course that the first @type is not terminated by the second, "out-commented" @type. Instead, that line becomes part of the content of the first tag, effectively '...pid() % @type...'. So maybe I should check for this sort of thing when I look for the end of a tag. Hopefully, it's a change that won't break existing docs. I'll put it on the todo-list. Meanwhile... just don't do that. :-) > If you instead put the commented line after @end, it works. > > %%%-------------------------------------------------------------------- > %%% edoc types > %%% @type session_handler() = pid() > %%% @end > % % @type cs() = #cs{} FIXME fix in R10-8 > %%%-------------------------------------------------------------------- Exactly. /Richard ---- "Having users is like optimization: the wise course is to delay it." -- Paul Graham From mbj@REDACTED Fri Oct 21 12:13:07 2005 From: mbj@REDACTED (Martin Bjorklund) Date: Fri, 21 Oct 2005 12:13:07 +0200 (CEST) Subject: edoc question In-Reply-To: <4358B94D.9040506@csd.uu.se> References: <20051021.112840.08327279.mbj@tail-f.com> <4358B94D.9040506@csd.uu.se> Message-ID: <20051021.121307.41175866.mbj@tail-f.com> Richard Carlsson wrote: > But! - I've recently added it, and it will be in R10-8! Great! > Note that I recommend using names like foo() for datatypes > in Erlang, rather than variable names such as Foo, which are > more typically used as type variables (i.e., that are bound > to some data type). Yeah, the example was from a function definition. > > I tried another variant, to use edoc comments like this: > > > > % % @type Foo = #foo{} > > > > but it seems as edoc parses the expression even if it's commented out? > > Hm. It shouldn't. Can you produce a test case? %%%-------------------------------------------------------------------- %%% edoc types %%% @type session_handler() = pid() % % @type cs() = #cs{} %%% @end %%%-------------------------------------------------------------------- The error I get is: at line 41: syntax error before: '%' /martin From ulf.wiger@REDACTED Fri Oct 21 15:33:02 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 21 Oct 2005 15:33:02 +0200 Subject: edoc question Message-ID: Richard Carlsson wrote: > But! - I've recently added it, and it will be in R10-8! How about the things I mentioned in this thread http://www.erlang.org/ml-archive/erlang-questions/200509/msg00239.html (edoc - how to set up links?) Is that being addressed? I was going to push for integrating edoc into our build environment, but held off on it, since so many links were broken. /Uffe From R.CALSADA@REDACTED Fri Oct 21 15:32:40 2005 From: R.CALSADA@REDACTED (Calsada, Rebecca) Date: Fri, 21 Oct 2005 08:32:40 -0500 Subject: Novice Erlang Questions Message-ID: Hello, My name is Rebecca Calsada. I work for a company in Chicago. It has come to my attention that the company is using "Erlang" to create service levels for people in phone teams. Unsurprisingly, the management on site doesn't know what Erlang is. As an employee, I want to know what it is that I am judge by. My research, on line, led me to this very informative site: http://www.erlang.org/faq/t1.html I found this e-mail address there. Though I have read the FAQ thoroughly, I don't feel confident in my knowledge. The main reason why I'm seeking answers is that the upper management is creating criteria for the phone teams to meet that are unrealistic. Broad questions are: What is Erlang mostly used for? Is it best for phone centers where each call is almost always identical? (Information center, catalog ordering...) Is Erlang good for a call center where each call is unpredictable in length and difficulty? Thank you for taking the time to read this! I can also be reached at Rcalsada248@REDACTED -------------- next part -------------- An HTML attachment was scrubbed... URL: From richardc@REDACTED Fri Oct 21 15:54:05 2005 From: richardc@REDACTED (Richard Carlsson) Date: Fri, 21 Oct 2005 15:54:05 +0200 Subject: edoc question In-Reply-To: References: Message-ID: <4358F2FD.506@csd.uu.se> Ulf Wiger (AL/EAB) wrote: > (edoc - how to set up links?) > > Is that being addressed? Not really - I didn't have time to do much about that before R10-8 (which is about to be released quite soon). http access is working better now, in any case. > I was going to push for integrating edoc into our build > environment, but held off on it, since so many links were > broken. I still think you can do that, e.g. if you generate the documentation for all the standard applications, then copy them to some shared location, and either set the default url to point to that location, or include it in the doc_path option, or both. It's a workaround until we can add automatic linkage to the OTP library documentation. /Richard ---- "Having users is like optimization: the wise course is to delay it." -- Paul Graham From lennart.ohman@REDACTED Fri Oct 21 16:00:01 2005 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Fri, 21 Oct 2005 16:00:01 +0200 Subject: Novice Erlang Questions In-Reply-To: Message-ID: Hi Rebecca, it seems sound to want to understand what the criterias of ones job is, and how to be able to best meet them. I suspect that what you are looking for is not actually the Erlang you have found here, but rather the measurement unit and calucation model Erlang. It can for instance helps an engineer to estimate how many telephone lines needed to serve a certain function. There might of course be someone reading this list who can answer you, though I believe you will find better answers at www.erlang.com (which deals with the "Erlang formula" rather than the programming language Erlang, which this list is about). Best Regards, Lennart ------------------------------------------------------------- Lennart Ohman?????????????????? office? : +46-8-587 623 27 Sjoland & Thyselius Telecom AB? cellular: +46-70-552 67 35 Sehlstedtsgatan 6?????????????? fax???? : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN??? email?? : lennart.ohman@REDACTED ________________________________________ From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Calsada, Rebecca Sent: Friday, October 21, 2005 3:33 PM To: erlang-questions@REDACTED Subject: Novice Erlang Questions Hello, ? My name is Rebecca Calsada.? I work for a company in Chicago.? It has come to my attention that the company is using ?Erlang? to create service levels for people in phone teams.? Unsurprisingly, the management on site doesn?t know what Erlang is.? As an employee, I want to know what it is that I am judge by. ? My research, on line, led me to this very informative site: http://www.erlang.org/faq/t1.html I found this e-mail address there. ? Though I have read the FAQ thoroughly, I don?t feel confident in my knowledge.? The main reason why I?m seeking answers is that the upper management is creating criteria for the phone teams to meet that are unrealistic.? ? Broad questions are: ??????????? What is Erlang mostly used for? ??????????? Is it best for phone centers where each call is almost always identical? (Information center, catalog ordering ) ??????????? Is Erlang good for a call center where each call is unpredictable in length and difficulty? ? Thank you for taking the time to read this! ? I can also be reached at Rcalsada248@REDACTED ? From serge@REDACTED Fri Oct 21 16:37:16 2005 From: serge@REDACTED (Serge Aleynikov) Date: Fri, 21 Oct 2005 10:37:16 -0400 Subject: edoc question In-Reply-To: <4358F2FD.506@csd.uu.se> References: <4358F2FD.506@csd.uu.se> Message-ID: <4358FD1C.8010400@hq.idt.net> How about the patch I sent you that creates a menu link to the "overview" page? Did you include that one? Serge Richard Carlsson wrote: > Ulf Wiger (AL/EAB) wrote: > >>(edoc - how to set up links?) >> >>Is that being addressed? > > > Not really - I didn't have time to do much about that before R10-8 > (which is about to be released quite soon). http access is working > better now, in any case. > > >>I was going to push for integrating edoc into our build >>environment, but held off on it, since so many links were >>broken. > > > I still think you can do that, e.g. if you generate the > documentation for all the standard applications, then copy > them to some shared location, and either set the default url to > point to that location, or include it in the doc_path option, > or both. It's a workaround until we can add automatic linkage > to the OTP library documentation. > > /Richard > > ---- > "Having users is like optimization: the wise course is to delay it." > -- Paul Graham From luke@REDACTED Sat Oct 22 18:06:04 2005 From: luke@REDACTED (Luke Gorrie) Date: 22 Oct 2005 18:06:04 +0200 Subject: Obfuscated Erlang/OTP competition @ the User Conference References: <148408C0A2D44A41AB295D74E18399755DBB2B@esealmw105.eemea.ericsson.se> Message-ID: H?kan Huss writes: > "The determined Real Programmer can write Fortran programs in any > language." :-) C I OBJECT TO THIS STEREOTYPE THAT FORTRAN PROGRAMMERS ARE SOMEHOW 000100 C FIXED IN THEIR WAYS AND UNABLE TO ADAPT TO NEW SURROUNDINGS. I ST 000200 C ARTED OUT PROGRAMMING IN FORTRAN ON A TOPS-10 SYSTEM AND OTHER SI 000300 C MILAR MACHINES. ALTHOUGH, I MUST ADMIT, I STILL HAVE SOME BAD HA 000400 C BITS I PICKED UP FROM THOSE OLD DAYS, BY AND LARGE I BELIEVE I HA 000500 C VE OVERCOME MOST OF THE WORST ONES. 000600 (*) "Bad Habbits" http://www.python.org/doc/Humor.html From yunwen@REDACTED Fri Oct 21 20:18:03 2005 From: yunwen@REDACTED (Yunwen Ye) Date: Fri, 21 Oct 2005 12:18:03 -0600 (MDT) Subject: ASE05 on-line registration ends Oct. 28 Message-ID: <20051021181803.5E2E7A4B2D4@l3d.cs.colorado.edu> Call for Participation 20th IEEE/ACM International Conference on AUTOMATED SOFTWARE ENGINEERING (ASE 2005) November 7-11, 2005 Long Beach, California, USA http://www.ase-conference.org/ ========================================================== Online Registration Deadline: October 28, 2005 Regsitration website: http://www.isr.uci.edu/ase2005/ConferenceRegistration.html ========================================================== The IEEE/ACM International Conference on Automated Software Engineering brings together researchers and practitioners to share ideas on the foundations, techniques, tools, and applications of automated software engineering technology. ASE 2005 features three keynotes, a technical program, four half-day tutorials, three workshops, and a doctoral sympoisum. For details, please visit the conference website http://www.ase-conference.org/ From nhn@REDACTED Fri Oct 21 20:58:32 2005 From: nhn@REDACTED (Henrik Nilsson) Date: Fri, 21 Oct 2005 19:58:32 +0100 Subject: TFP2006: call for papers Message-ID: <43593A58.6070006@cs.nott.ac.uk> Apologies for multiple copies. /Henrik -- Henrik Nilsson School of Computer Science and Information Technology The University of Nottingham nhn@REDACTED This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: TFP2006-CFP.txt URL: From richardc@REDACTED Mon Oct 24 14:08:56 2005 From: richardc@REDACTED (Richard Carlsson) Date: Mon, 24 Oct 2005 14:08:56 +0200 Subject: edoc question In-Reply-To: <4358FD1C.8010400@hq.idt.net> References: <4358F2FD.506@csd.uu.se> <4358FD1C.8010400@hq.idt.net> Message-ID: <435CCED8.8050500@csd.uu.se> Serge Aleynikov wrote: > How about the patch I sent you that creates a menu link to the > "overview" page? Did you include that one? Not yet. I listed it along with other things I wanted to fix in the presentation, but didn't get around to it before R10-8. I'll try to do that for R10-9, sometime later this year I think. /Richard From tomasz.sterna@REDACTED Mon Oct 24 15:40:40 2005 From: tomasz.sterna@REDACTED (Tomasz Sterna) Date: Mon, 24 Oct 2005 15:40:40 +0200 Subject: erlang ODBC module and large query/response Message-ID: <747d68aa0510240640k220b056bt@mail.gmail.com> I have a problem getting very long fields from my PostgreSQL database by erlang. When I make a query, I get only 8215 characters of a long field. INSERTing this kind of data is also erroneus. Here is what i did so far: First I recompiled unixODBC with: #define SQL_MAX_MESSAGE_LENGTH 1048576 My test C application returns whole field data now. But when testing from erlang I get only 8215 characters of field data: $ erl Erlang (BEAM) emulator version 5.4.9 [source] [hipe] [threads:0] [kernel-poll] Eshell V5.4.9 (abort with ^G) 1> {ok, Ref} = odbc:connect("DSN=ejabberd;", [{scrollable_cursors,off}]). {ok,<0.38.0>} 2> odbc:sql_query(Ref, "SELECT * FROM users WHERE username='smoku'"). {selected,["username","password"],[{"smoku","xxxxxxxx"}]} 3> odbc:sql_query(Ref, "SELECT * FROM vcard WHERE username='smoku'"). {selected,["username","vcard"], [{"smoku", "\r\nTomasz Sterna\r\nsmoku\r\n\r\nimage/png\r\n\r\niVBORw0[.BASE64_DATA.]67vSHQi"}]} Any idea on how to overcome this limitation? -- smk From serge@REDACTED Mon Oct 24 15:43:00 2005 From: serge@REDACTED (Serge Aleynikov) Date: Mon, 24 Oct 2005 09:43:00 -0400 Subject: edoc question In-Reply-To: <435CCED8.8050500@csd.uu.se> References: <4358F2FD.506@csd.uu.se> <4358FD1C.8010400@hq.idt.net> <435CCED8.8050500@csd.uu.se> Message-ID: <435CE4E4.1030303@hq.idt.net> Thanks! Richard Carlsson wrote: > Serge Aleynikov wrote: > >>How about the patch I sent you that creates a menu link to the >>"overview" page? Did you include that one? > > > Not yet. I listed it along with other things I wanted to fix > in the presentation, but didn't get around to it before R10-8. > I'll try to do that for R10-9, sometime later this year I think. > > /Richard > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From camster@REDACTED Mon Oct 24 17:38:11 2005 From: camster@REDACTED (Richard Cameron) Date: Mon, 24 Oct 2005 16:38:11 +0100 Subject: gen_server and priority queues Message-ID: <8449BCFC-4F8E-4238-97CE-C5E4D8812AF8@citeulike.org> I want to implement a server which processes messages in order of priority. I know I can do this in pure Erlang as: handle(high, State) -> receive {high,Msg} -> do(Msg,State) after 0 -> handle(medium, State) end; handle(medium, State) -> receive {medium,Msg} -> do(Msg, State) after 0 -> handle(low, State) end; handle(low, State) -> receive {_,Msg} -> do(Msg, State) end. ... but what I really want is to be able to do this within OTP's gen_server behaviour. Is there a nice way to do this, or do I just need to roll my own server and then attach it to my supervision tree with a bridge? Richard. From ulf@REDACTED Mon Oct 24 18:16:29 2005 From: ulf@REDACTED (Ulf Wiger) Date: Mon, 24 Oct 2005 18:16:29 +0200 Subject: gen_server and priority queues In-Reply-To: <8449BCFC-4F8E-4238-97CE-C5E4D8812AF8@citeulike.org> References: <8449BCFC-4F8E-4238-97CE-C5E4D8812AF8@citeulike.org> Message-ID: You can't to it with gen_server - at least not in any acceptable way. Just today, I was toying with the idea of hacking gen_server to support this. :) You don't need a bridge. Just make sure to start your process with proc_lib:start_link/3, and acknowledging with proc_lib:init_ack/2. Then you need to handle system messages as well. You could also use plain_fsm. See jungerl. /Uffe Den 2005-10-24 17:38:11 skrev Richard Cameron : > > I want to implement a server which processes messages in order of > priority. I know I can do this in pure Erlang as: > > handle(high, State) -> > receive {high,Msg} -> > do(Msg,State) > after 0 -> > handle(medium, State) > end; > handle(medium, State) -> > receive {medium,Msg} -> > do(Msg, State) > after 0 -> > handle(low, State) > end; > handle(low, State) -> > receive {_,Msg} -> > do(Msg, State) > end. > > ... but what I really want is to be able to do this within OTP's > gen_server behaviour. Is there a nice way to do this, or do I just need > to roll my own server and then attach it to my supervision tree with a > bridge? > > Richard. -- Ulf Wiger From james.hague@REDACTED Mon Oct 24 18:51:40 2005 From: james.hague@REDACTED (James Hague) Date: Mon, 24 Oct 2005 11:51:40 -0500 Subject: Quad-core Macs: More reason for a multi-CPU aware Erlang In-Reply-To: References: Message-ID: On 10/20/05, Chris Campbell wrote: > I don't understand. Surely it is easy to take advantage of multiple > cpus given that distribution is fairly easy with Erlang? Does the > runtime support memory mapped pages between nodes on the same machine? Yes, you can start up multiple nodes on the same machine and communicate between them. On the other hand, Erlang is all about lightweight processes. It sure would be nice to have the standard Erlang implementation automatically deal with machines containing 2 or 4 or more processors. There was a discussion about this several months ago on this mailing list. A proof-of-concept implementation was created some years back, but never turned into production code. James From xpdoka@REDACTED Mon Oct 24 23:08:31 2005 From: xpdoka@REDACTED (Dominic Williams) Date: Mon, 24 Oct 2005 23:08:31 +0200 Subject: gen_server and priority queues In-Reply-To: <8449BCFC-4F8E-4238-97CE-C5E4D8812AF8@citeulike.org> References: <8449BCFC-4F8E-4238-97CE-C5E4D8812AF8@citeulike.org> Message-ID: <435D4D4F.5000202@dominicwilliams.net> Richard Cameron wrote: > > I want to implement a server which processes messages in order of > priority. I know I can do this in pure Erlang as: > > handle(high, State) -> > receive {high,Msg} -> > do(Msg,State) > after 0 -> > handle(medium, State) > end; > handle(medium, State) -> > receive {medium,Msg} -> > do(Msg, State) > after 0 -> > handle(low, State) > end; > handle(low, State) -> > receive {_,Msg} -> > do(Msg, State) > end. Isn't this overkill? I was under the impression that: receive {high, Msg} -> ...; {medium, Msg} -> ...; {low, Msg} -> ...; end, pulls higher priority messages out of the queue? Cheers, Dominic Williams http://www.dominicwilliams.net ---- From matthias@REDACTED Tue Oct 25 06:29:18 2005 From: matthias@REDACTED (Matthias Lang) Date: Tue, 25 Oct 2005 06:29:18 +0200 Subject: gen_server and priority queues In-Reply-To: <435D4D4F.5000202@dominicwilliams.net> References: <8449BCFC-4F8E-4238-97CE-C5E4D8812AF8@citeulike.org> <435D4D4F.5000202@dominicwilliams.net> Message-ID: <17245.46238.686524.745185@antilipe.corelatus.se> Dominic wrote: > I was under the impression that: > > receive > {high, Msg} -> > ...; > {medium, Msg} -> > ...; > {low, Msg} -> > ...; > end, > > pulls higher priority messages out of the queue? Before Marc Feeley set me straight at an EUC years ago, I carried the same _incorrect_ impression around for a couple of years without ever running into a situation where a program's behaviour was affected in a way that mattered enough for me to notice reality. For the practically minded: -module(dominic). -export([go/0]). go() -> Pid = spawn_link(fun() -> rx() end), Pid ! low, Pid ! high, io:fwrite("both messages sent\n"). rx() -> timer:sleep(1000), receive high -> io:fwrite("received high\n"); low -> io:fwrite("received low\n") end. For those who still doubt, plus language lawyers, the erlang reference manual explains 'receive' in section 1.6.10: | Receives messages sent to the process using the send operator (!). The | patterns Pattern are sequentially matched against the first message in | time order in the mailbox, then the second, and so on. http://www.erlang.se/doc/doc-5.4/pdf/reference_manual-5.4.pdf Matthias From joe.armstrong@REDACTED Tue Oct 25 09:30:36 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Tue, 25 Oct 2005 09:30:36 +0200 Subject: Survey of parallel systems Message-ID: If you use Erlang, why not tell http://www.plm.eecs.uni-kassel.de/parasurvey/ About it /Joe From camster@REDACTED Tue Oct 25 11:14:37 2005 From: camster@REDACTED (Richard Cameron) Date: Tue, 25 Oct 2005 10:14:37 +0100 Subject: gen_server and priority queues In-Reply-To: <435D4D4F.5000202@dominicwilliams.net> References: <8449BCFC-4F8E-4238-97CE-C5E4D8812AF8@citeulike.org> <435D4D4F.5000202@dominicwilliams.net> Message-ID: <5E54FEA1-CD2A-402F-B46E-3EA0D6C5E17D@citeulike.org> On 24 Oct 2005, at 22:08, Dominic Williams wrote: > Isn't this overkill? I was under the impression that: > > receive > {high, Msg} -> > ...; > {medium, Msg} -> > ...; > {low, Msg} -> > ...; > end, > > pulls higher priority messages out of the queue? I thought that too, and it did take me a while to notice that priority queues were actually all explained in the erlang book on page 76. Another gotcha (which I fell for too) was to write this: handle(high, State) -> receive {high,Msg} -> do(Msg,State) after 0 -> handle(medium, State) end; handle(medium, State) -> receive {medium,Msg} -> do(Msg, State) after 0 -> handle(low, State) end; handle(low, State) -> receive {low,Msg} -> do(Msg, State) end. ... the difference being the last recieve is for {low,Msg} and not {_,Msg}. That can get itself into a horrible mess in which it ignores high or medium priority messages until at least one low priority one arrives in the inbox. Richard. From it4hian@REDACTED Tue Oct 25 11:21:09 2005 From: it4hian@REDACTED (Andreas Hillqvist) Date: Tue, 25 Oct 2005 11:21:09 +0200 Subject: gen_server and priority queues In-Reply-To: <8449BCFC-4F8E-4238-97CE-C5E4D8812AF8@citeulike.org> References: <8449BCFC-4F8E-4238-97CE-C5E4D8812AF8@citeulike.org> Message-ID: <435DF905.5030101@ituniv.se> Why not write: handle(State) -> handle([high, medium, low], State). handle([], State) -> receive {_Priority, Msg} -> do(Msg, State) end; handle([Priority | Tail], State) -> receive {Priority, Msg} -> do(Msg, State) after 0 -> handle(Tail, State) end. Simplifies management of priorities. Richard Cameron skrev: > > I want to implement a server which processes messages in order of > priority. I know I can do this in pure Erlang as: > > handle(high, State) -> > receive {high,Msg} -> > do(Msg,State) > after 0 -> > handle(medium, State) > end; > handle(medium, State) -> > receive {medium,Msg} -> > do(Msg, State) > after 0 -> > handle(low, State) > end; > handle(low, State) -> > receive {_,Msg} -> > do(Msg, State) > end. > > ... but what I really want is to be able to do this within OTP's > gen_server behaviour. Is there a nice way to do this, or do I just > need to roll my own server and then attach it to my supervision tree > with a bridge? > > Richard. > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: priorityqueues.erl URL: From kenneth.lundin@REDACTED Tue Oct 25 11:39:50 2005 From: kenneth.lundin@REDACTED (Kenneth Lundin (AS/EAB)) Date: Tue, 25 Oct 2005 11:39:50 +0200 Subject: Quad-core Macs: More reason for a multi-CPU aware Erlang Message-ID: <4AFFBE68BCD2C04EB6EEA03FBC9CF4BE014EED3D@esealmw115.eemea.ericsson.se> Hi, Just to put an end on all speculations regarding multi-CPU aware Erlang I can reveal that we are working on a runtime system with multiple schedulers (running on different threads) which will take advantage of multi-CPU HW on operating systems which support that. With this solution applications running in one Erlang node can take advantage of multi-CPU HW without need to change a single line of code. More information about this will be presented at the Erlang User Conference the 10:th of November. There is no promise regarding when this will be released but a qualified guess would be within 12 months. /Regards Kenneth Lundin (Product Manager of Erlang/OTP at Ericsson) -------------- next part -------------- An HTML attachment was scrubbed... URL: From ke.han@REDACTED Tue Oct 25 13:51:48 2005 From: ke.han@REDACTED (ke.han) Date: Tue, 25 Oct 2005 19:51:48 +0800 Subject: Quad-core Macs: More reason for a multi-CPU aware Erlang In-Reply-To: <4AFFBE68BCD2C04EB6EEA03FBC9CF4BE014EED3D@esealmw115.eemea.ericsson.se> References: <4AFFBE68BCD2C04EB6EEA03FBC9CF4BE014EED3D@esealmw115.eemea.ericsson.se> Message-ID: <435E1C54.5080109@redstarling.com> WOOO-HOOO....you've just made my day!!! Just to know Ericsson is working toward a real product furthers my resolve that Erlang is the right choice for the future (...of a wide variety of applications). Although I can't make it to the conference this year, I look forward to the posted presentation. thanks for the heads up, ke han Kenneth Lundin (AS/EAB) wrote: > Hi, > > Just to put an end on all speculations regarding multi-CPU aware Erlang > I can reveal that > we are working on a runtime system with multiple schedulers (running on > different threads) which will > take advantage of multi-CPU HW on operating systems which support that. > With this solution applications running in one Erlang node can take > advantage of multi-CPU HW without > need to change a single line of code. > More information about this will be presented at the Erlang User > Conference the 10:th of November. > > There is no promise regarding when this will be released but a qualified > guess would be within 12 months. > > /Regards Kenneth Lundin (Product Manager of Erlang/OTP at Ericsson) From serge@REDACTED Tue Oct 25 14:16:56 2005 From: serge@REDACTED (Serge Aleynikov) Date: Tue, 25 Oct 2005 08:16:56 -0400 Subject: Quad-core Macs: More reason for a multi-CPU aware Erlang In-Reply-To: <4AFFBE68BCD2C04EB6EEA03FBC9CF4BE014EED3D@esealmw115.eemea.ericsson.se> References: <4AFFBE68BCD2C04EB6EEA03FBC9CF4BE014EED3D@esealmw115.eemea.ericsson.se> Message-ID: <435E2238.4060008@hq.idt.net> Thanks for the update Ken! This is great news and we are all patiently waiting. ;-) Serge Kenneth Lundin (AS/EAB) wrote: > Hi, > > Just to put an end on all speculations regarding multi-CPU aware Erlang > I can reveal that > we are working on a runtime system with multiple schedulers (running on > different threads) which will > take advantage of multi-CPU HW on operating systems which support that. > With this solution applications running in one Erlang node can take > advantage of multi-CPU HW without > need to change a single line of code. > More information about this will be presented at the Erlang User > Conference the 10:th of November. > > There is no promise regarding when this will be released but a qualified > guess would be within 12 months. > > /Regards Kenneth Lundin (Product Manager of Erlang/OTP at Ericsson) From rasmussen.bryan@REDACTED Tue Oct 25 14:53:25 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Tue, 25 Oct 2005 14:53:25 +0200 Subject: jeai admin password Message-ID: <3bb44c6e0510250553t5795fe01rc16421d991b9b838@mail.gmail.com> well I changed my jeai password from the default, I saved the text I used in my personal passwords file but now when I'm getting a invalid password user id, is it possible to look up somewhere what the current username passwords are? Cheers Bryan Rasmussen From serge@REDACTED Tue Oct 25 20:06:40 2005 From: serge@REDACTED (Serge Aleynikov) Date: Tue, 25 Oct 2005 14:06:40 -0400 Subject: gen_server and priority queues In-Reply-To: <17245.46238.686524.745185@antilipe.corelatus.se> References: <8449BCFC-4F8E-4238-97CE-C5E4D8812AF8@citeulike.org> <435D4D4F.5000202@dominicwilliams.net> <17245.46238.686524.745185@antilipe.corelatus.se> Message-ID: <435E7430.1070702@hq.idt.net> Matthias, I actually run your example (modified to add the recursive call at the end), and got: 7> c(dominic). {ok,dominic} 8> test1:go(). both messages sent ok received low received high exited 9> I believe your point was that the high priority message will get process first, but this is not the case according to this printout. Serge ------------------------------ -module(dominic). -export([go/0]). go() -> Pid = spawn_link(fun() -> rx() end), Pid ! low, Pid ! high, io:fwrite("both messages sent\n"). rx() -> timer:sleep(1000), receive high -> io:fwrite("received high\n"); low -> io:fwrite("received low\n") after 10000 -> io:fwrite("exited\n"), exit(normal) end, rx(). ------------------------------ Matthias Lang wrote: > Dominic wrote: > > I was under the impression that: > > > > receive > > {high, Msg} -> > > ...; > > {medium, Msg} -> > > ...; > > {low, Msg} -> > > ...; > > end, > > > > pulls higher priority messages out of the queue? > > Before Marc Feeley set me straight at an EUC years ago, I carried the > same _incorrect_ impression around for a couple of years without ever > running into a situation where a program's behaviour was affected in a > way that mattered enough for me to notice reality. > > For the practically minded: > > -module(dominic). > -export([go/0]). > > go() -> > Pid = spawn_link(fun() -> rx() end), > Pid ! low, > Pid ! high, > io:fwrite("both messages sent\n"). > > rx() -> > timer:sleep(1000), > receive > high -> io:fwrite("received high\n"); > low -> io:fwrite("received low\n") > end. > > For those who still doubt, plus language lawyers, the erlang reference > manual explains 'receive' in section 1.6.10: > > | Receives messages sent to the process using the send operator (!). The > | patterns Pattern are sequentially matched against the first message in > | time order in the mailbox, then the second, and so on. > > http://www.erlang.se/doc/doc-5.4/pdf/reference_manual-5.4.pdf > > Matthias > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From rpettit@REDACTED Tue Oct 25 20:19:13 2005 From: rpettit@REDACTED (Rick Pettit) Date: Tue, 25 Oct 2005 13:19:13 -0500 Subject: gen_server and priority queues In-Reply-To: <435E7430.1070702@hq.idt.net> References: <8449BCFC-4F8E-4238-97CE-C5E4D8812AF8@citeulike.org> <435D4D4F.5000202@dominicwilliams.net> <17245.46238.686524.745185@antilipe.corelatus.se> <435E7430.1070702@hq.idt.net> Message-ID: <20051025181913.GA8235@vailsys.com> On Tue, Oct 25, 2005 at 02:06:40PM -0400, Serge Aleynikov wrote: > Matthias, > > I actually run your example (modified to add the recursive call at the > end), and got: > > 7> c(dominic). > {ok,dominic} > 8> test1:go(). > both messages sent > ok > received low > received high > exited > 9> > > I believe your point was that the high priority message will get process > first, but this is not the case according to this printout. Actually, I believe it perfectly illustrates his point (which, btw, was that the _low_ priority will be processed first, regardless of the pattern clause order in the receive). -Rick > ------------------------------ > -module(dominic). > -export([go/0]). > > go() -> > Pid = spawn_link(fun() -> rx() end), > Pid ! low, > Pid ! high, > io:fwrite("both messages sent\n"). > > rx() -> > timer:sleep(1000), > receive > high -> io:fwrite("received high\n"); > low -> io:fwrite("received low\n") > after 10000 -> > io:fwrite("exited\n"), > exit(normal) > end, > rx(). > ------------------------------ > > Matthias Lang wrote: > >Dominic wrote: > > > I was under the impression that: > > > > > > receive > > > {high, Msg} -> > > > ...; > > > {medium, Msg} -> > > > ...; > > > {low, Msg} -> > > > ...; > > > end, > > > > > > pulls higher priority messages out of the queue? > > > >Before Marc Feeley set me straight at an EUC years ago, I carried the > >same _incorrect_ impression around for a couple of years without ever > >running into a situation where a program's behaviour was affected in a > >way that mattered enough for me to notice reality. > > > >For the practically minded: > > > > -module(dominic). > > -export([go/0]). > > > > go() -> > > Pid = spawn_link(fun() -> rx() end), > > Pid ! low, > > Pid ! high, > > io:fwrite("both messages sent\n"). > > > > rx() -> > > timer:sleep(1000), > > receive > > high -> io:fwrite("received high\n"); > > low -> io:fwrite("received low\n") > > end. > > > >For those who still doubt, plus language lawyers, the erlang reference > >manual explains 'receive' in section 1.6.10: > > > > | Receives messages sent to the process using the send operator (!). The > > | patterns Pattern are sequentially matched against the first message in > > | time order in the mailbox, then the second, and so on. > > > > http://www.erlang.se/doc/doc-5.4/pdf/reference_manual-5.4.pdf > > > >Matthias > > > > -- > Serge Aleynikov > R&D Telecom, IDT Corp. > Tel: (973) 438-3436 > Fax: (973) 438-1464 > serge@REDACTED From serge@REDACTED Tue Oct 25 20:31:31 2005 From: serge@REDACTED (Serge Aleynikov) Date: Tue, 25 Oct 2005 14:31:31 -0400 Subject: gen_server and priority queues In-Reply-To: <20051025181913.GA8235@vailsys.com> References: <8449BCFC-4F8E-4238-97CE-C5E4D8812AF8@citeulike.org> <435D4D4F.5000202@dominicwilliams.net> <17245.46238.686524.745185@antilipe.corelatus.se> <435E7430.1070702@hq.idt.net> <20051025181913.GA8235@vailsys.com> Message-ID: <435E7A03.6040301@hq.idt.net> Sorry I misunderstood Matthias' point. Thanks for clarification, though, as I was also under impression that the order of pattern clauses mattered! Serge Rick Pettit wrote: > On Tue, Oct 25, 2005 at 02:06:40PM -0400, Serge Aleynikov wrote: > >>Matthias, >> >>I actually run your example (modified to add the recursive call at the >>end), and got: >> >>7> c(dominic). >>{ok,dominic} >>8> test1:go(). >>both messages sent >>ok >>received low >>received high >>exited >>9> >> >>I believe your point was that the high priority message will get process >>first, but this is not the case according to this printout. > > > Actually, I believe it perfectly illustrates his point (which, btw, was that > the _low_ priority will be processed first, regardless of the pattern clause > order in the receive). > > -Rick > > >>------------------------------ >> -module(dominic). >> -export([go/0]). >> >> go() -> >> Pid = spawn_link(fun() -> rx() end), >> Pid ! low, >> Pid ! high, >> io:fwrite("both messages sent\n"). >> >> rx() -> >> timer:sleep(1000), >> receive >> high -> io:fwrite("received high\n"); >> low -> io:fwrite("received low\n") >> after 10000 -> >> io:fwrite("exited\n"), >> exit(normal) >> end, >> rx(). >>------------------------------ >> >>Matthias Lang wrote: >> >>>Dominic wrote: >>> >>>>I was under the impression that: >>>> >>>>receive >>>> {high, Msg} -> >>>> ...; >>>> {medium, Msg} -> >>>> ...; >>>> {low, Msg} -> >>>> ...; >>>>end, >>>> >>>>pulls higher priority messages out of the queue? >>> >>>Before Marc Feeley set me straight at an EUC years ago, I carried the >>>same _incorrect_ impression around for a couple of years without ever >>>running into a situation where a program's behaviour was affected in a >>>way that mattered enough for me to notice reality. >>> >>>For the practically minded: >>> >>> -module(dominic). >>> -export([go/0]). >>> >>> go() -> >>> Pid = spawn_link(fun() -> rx() end), >>> Pid ! low, >>> Pid ! high, >>> io:fwrite("both messages sent\n"). >>> >>> rx() -> >>> timer:sleep(1000), >>> receive >>> high -> io:fwrite("received high\n"); >>> low -> io:fwrite("received low\n") >>> end. >>> >>>For those who still doubt, plus language lawyers, the erlang reference >>>manual explains 'receive' in section 1.6.10: >>> >>> | Receives messages sent to the process using the send operator (!). The >>> | patterns Pattern are sequentially matched against the first message in >>> | time order in the mailbox, then the second, and so on. >>> >>> http://www.erlang.se/doc/doc-5.4/pdf/reference_manual-5.4.pdf >>> >>>Matthias >>> >> >>-- >>Serge Aleynikov >>R&D Telecom, IDT Corp. >>Tel: (973) 438-3436 >>Fax: (973) 438-1464 >>serge@REDACTED > > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From garry@REDACTED Tue Oct 25 20:42:30 2005 From: garry@REDACTED (Garry Hodgson) Date: Tue, 25 Oct 2005 14:42:30 -0400 (EDT) Subject: Quad-core Macs: More reason for a multi-CPU aware Erlang In-Reply-To: <4AFFBE68BCD2C04EB6EEA03FBC9CF4BE014EED3D@esealmw115.eemea.ericsson.se> References: <4AFFBE68BCD2C04EB6EEA03FBC9CF4BE014EED3D@esealmw115.eemea.ericsson.se> Message-ID: <2005102514391130265577@k2.sage.att.com> "Kenneth Lundin (AS/EAB)" wrote: > Just to put an end on all speculations regarding multi-CPU aware Erlang I can reveal that > we are working on a runtime system with multiple schedulers (running on different threads) which will > take advantage of multi-CPU HW on operating systems which support that. > With this solution applications running in one Erlang node can take advantage of multi-CPU HW without > need to change a single line of code. excellent news!!! thanks for posting it, rather than following the industry standard of keeping everyone in the dark. > More information about this will be presented at the Erlang User Conference the 10:th of November. can't wait. > There is no promise regarding when this will be released but a qualified guess would be within 12 months. take your time, get it right. ---- Garry Hodgson, Technical Consultant, AT&T Labs Your love, your anger, your kindness, your hate. All of it creates the future for you and your children. What kind of future are you creating today? From micke@REDACTED Tue Oct 25 20:43:00 2005 From: micke@REDACTED (Michael Fogeborg) Date: Tue, 25 Oct 2005 20:43:00 +0200 Subject: OTP competitors ? Message-ID: <6.2.1.2.0.20051025204058.04919bc8@mail.online.no> http://www.opencloud.com/slee/intro.html --- From vances@REDACTED Tue Oct 25 22:12:36 2005 From: vances@REDACTED (Vance Shipley) Date: Tue, 25 Oct 2005 16:12:36 -0400 Subject: mnesia:dirty_update_counter/3 Message-ID: <20051025201236.GN80659@feeble.motivity.ca> Is there a good reason why we mnesia:dirty_update_counter/3 doesn't have the full syntax of ets:update_counter/3? In ets we can maintain a counter which wraps at a threshold: ets:update_counter(Tab, Key, {Pos,Incr,Threshold,SetValue}) But in mnesia we can only do a simple increment: dirty_update_counter(Tab, Key, Incr) -Vance From md1matso@REDACTED Tue Oct 25 23:19:33 2005 From: md1matso@REDACTED (Mats-Ola Persson) Date: Tue, 25 Oct 2005 23:19:33 +0200 Subject: wxErlang release Message-ID: Hi! I would just like to announce that the wxErlang project has finally (!) been accepted at sourceforge.net! You can download wxErlang at wxerlang.sourceforge.net Any comments are appreciated.. I would also like to involve other developers in the project, if you want to help me or if you've made a bug fix, mail me. Some words of caution: Building wxErlang is a mess.. the current version has been built on Mac OS X and GTK+ (Linux) wxErlang is more or less a big hack at the moment, a lot of bugs, and probably a lot of memory leaks wxErlang is slow on most platforms, but especially Motif. Probably due to a crappy implementation of wxWidgets' Motif back end. Regards Mats-Ola Persson From yerl@REDACTED Wed Oct 26 00:34:36 2005 From: yerl@REDACTED (Yerl) Date: Wed, 26 Oct 2005 00:34:36 +0200 Subject: wxErlang release In-Reply-To: References: Message-ID: <435EB2FC.40102@club-internet.fr> Excellent news. It's really what Erlang needs, a very good and portable GUI. Thanks and good luck /yerl Mats-Ola Persson a ?crit : > Hi! > > I would just like to announce that the wxErlang project has finally > (!) been accepted at sourceforge.net! > You can download wxErlang at wxerlang.sourceforge.net > > Any comments are appreciated.. > > I would also like to involve other developers in the project, if you > want to help me or if you've made a bug fix, mail me. > > Some words of caution: > Building wxErlang is a mess.. the current version has been built on > Mac OS X and GTK+ (Linux) > wxErlang is more or less a big hack at the moment, a lot of bugs, and > probably a lot of memory leaks > wxErlang is slow on most platforms, but especially Motif. Probably > due to a crappy implementation of wxWidgets' Motif back end. > > Regards > Mats-Ola Persson > From mickael.remond@REDACTED Wed Oct 26 08:05:42 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Wed, 26 Oct 2005 08:05:42 +0200 Subject: jeai admin password In-Reply-To: <3bb44c6e0510250553t5795fe01rc16421d991b9b838@mail.gmail.com> References: <3bb44c6e0510250553t5795fe01rc16421d991b9b838@mail.gmail.com> Message-ID: <435F1CB6.1040401@erlang-fr.org> bryan rasmussen wrote: > well > > I changed my jeai password from the default, I saved the text I used > in my personal passwords file but now when I'm getting a invalid > password user id, is it possible to look up somewhere what the current > username passwords are? Everything is stored in a Mnesia database. As Repos is supposed to run from the CDROM, the data are in a tmp directory. Otherwise, you can try creating a new user with command line tools (ejabberdctl) and try promoting this new user admin in the configuration file: j-eai_xmpp.cfg I hope this helps, -- Micka?l R?mond From tobbe@REDACTED Wed Oct 26 09:36:51 2005 From: tobbe@REDACTED (tobbe) Date: Wed, 26 Oct 2005 09:36:51 +0200 Subject: jeai admin password References: Message-ID: <20051026073651.1076F5905F@bang.trapexit.org> I wrote a little program the other day that may be useful if you want to inspect what Mnesia is "hiding". It is a Yaws appmod that automagically displays all Mnesia tables in your system. You can then search on fields and also control what fields to show in the result. You'll find it here: http://www.trapexit.org/download/ymnesia.erl To set it up: 1. Make sure ymnesia.beam can be found in your path. 2. Add ymnesia as an Yaws appmod to your yaws.conf 3. Point your browser to: http:///ymnesia/ Cheers, Tobbe _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From bjarne@REDACTED Wed Oct 26 09:59:33 2005 From: bjarne@REDACTED (=?iso-8859-1?Q?Bjarne_D=E4cker?=) Date: Wed, 26 Oct 2005 09:59:33 +0200 Subject: Erlang/OTP User Conference, November 10, 2005 References: <005d01c54436$260aec60$8f1f69d4@segeltorp> Message-ID: <008101c5da03$34758040$4f0969d4@segeltorp> Dear Erlang friends All Erlang developers, researchers, users, programmers, and other interested persons are hereby cordially invited to the 11th International Erlang/OTP User Conference, in Stockholm on November 10. Unfortunately the e-mail address euc@REDACTED has not been working properly but that has now been rectified. You are also welcome to send mails directly to me at bjarne@REDACTED Please see the invitation and call for papers at http://www.erlang.se/euc/05/ Welcome Bjarne D?cker (EUC chairman) -------------- next part -------------- An HTML attachment was scrubbed... URL: From rasmussen.bryan@REDACTED Wed Oct 26 15:32:17 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Wed, 26 Oct 2005 15:32:17 +0200 Subject: indexing ejabberb xml messages -jeai Message-ID: <3bb44c6e0510260632j4f262f53mc4af2bd442a6ef66@mail.gmail.com> We should be getting ahold of a google Web appliance in here http://www.google.com/enterprise/ what I'm thinking about is using it to crawl the jeai installation. It can do a normal http crawl with security restrictions because I can give it an administrator's password username to allow it to do the crawl. The thing I'm wondering about is, is the xml content of messages findable? i.e. as more than escaped xml in a pre tag under the message trace side of a user. Another solution would be to use the google desktop crawler to do indexing, but that's not preferable as I don't want to run the JEAI on Windows, and the Google Desktop is very resource hungry. From bjorn@REDACTED Wed Oct 26 15:37:26 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 26 Oct 2005 15:37:26 +0200 Subject: Erlang/OTP R10B-8 has been released Message-ID: Bug fix release : otp_src_R10B-8 Build date : 2005-10-25 This is a bug fix release 8 for the R10B release. You can download the full source distribution from http://www.erlang.org/download/otp_src_R10B-8.tar.gz http://www.erlang.org/download/otp_src_R10B-8.readme Note: To unpack the TAR archive you need a GNU TAR compatible program. For instance, on MacOS X before 10.3 you must 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-8.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-8.tar.gz http://www.erlang.org/download/otp_doc_man_R10B-8.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 -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From naidu.lokesh@REDACTED Wed Oct 26 17:03:54 2005 From: naidu.lokesh@REDACTED (Lokesh Naidu) Date: Wed, 26 Oct 2005 17:03:54 +0200 Subject: TCP/IP open Socket problem Message-ID: <8c8aa78a0510260803k31073dbdy48285eb6cc12e437@mail.gmail.com> Hi, TCP/IP client in Erlang communicates with a Server. Some times when the connection is lost b/w Client and Server., the socket from the Server side remains open. Client socket is closed using gen_tcp:close function. Also the port is free(checked using netstat). Now new Socket can't be opened with the same port no. from the client. Is it possible to close the previous session from Client (Server side socket )? -- Regards, Lokesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From ke.han@REDACTED Wed Oct 26 19:29:39 2005 From: ke.han@REDACTED (ke.han) Date: Thu, 27 Oct 2005 01:29:39 +0800 Subject: kqueue vs epoll experience?? Message-ID: <435FBD03.7040305@redstarling.com> Hello list, I'm trying to make a decision as to whether to set up my next production server on freeBSD (5 or 6 series) or Linux (2.6.x kernel). I will require the large socket handling efficiency of kqueue or epoll.. I have read lots on the ejabberd and erlang sites and lists and understand what it takes to use kernel polling on freeBSD or Linux with erlang. What I cannot find is any recommendations or experience reports which tips the hand in either direction. So, assuming all other things being equal ;-), can anyone give me there two cents as to whether its more wise to use the erlang supported freeBSD kqueue or the Linux 2.6 erlang patch set for /dev/epoll ??? What worries me is the patch set for erlang/linux being marked as experimental whereas the erlang/freeBSD support is not labeled as such. thanks for any advice...ke han From sean.hinde@REDACTED Wed Oct 26 20:11:05 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Wed, 26 Oct 2005 19:11:05 +0100 Subject: kqueue vs epoll experience?? In-Reply-To: <435FBD03.7040305@redstarling.com> References: <435FBD03.7040305@redstarling.com> Message-ID: Hi, To the best of my knowledge epoll in Linux 2.6 is not (yet) supported by Erlang. There is support for kpoll, but kpoll didn't ever appear in the released Linux versions. If kqueue works well then I would go with that Sean On 26 Oct 2005, at 18:29, ke.han wrote: > Hello list, > I'm trying to make a decision as to whether to set up my next > production server on freeBSD (5 or 6 series) or Linux (2.6.x > kernel). I will require the large socket handling efficiency of > kqueue or epoll.. > I have read lots on the ejabberd and erlang sites and lists and > understand what it takes to use kernel polling on freeBSD or Linux > with erlang. > What I cannot find is any recommendations or experience reports > which tips the hand in either direction. > So, assuming all other things being equal ;-), can anyone give me > there two cents as to whether its more wise to use the erlang > supported freeBSD kqueue or the Linux 2.6 erlang patch set for /dev/ > epoll ??? What worries me is the patch set for erlang/linux being > marked as experimental whereas the erlang/freeBSD support is not > labeled as such. > thanks for any advice...ke han > From alex.arnon@REDACTED Wed Oct 26 20:28:51 2005 From: alex.arnon@REDACTED (Alex Arnon) Date: Wed, 26 Oct 2005 20:28:51 +0200 Subject: Quad-core Macs: More reason for a multi-CPU aware Erlang In-Reply-To: <4AFFBE68BCD2C04EB6EEA03FBC9CF4BE014EED3D@esealmw115.eemea.ericsson.se> References: <4AFFBE68BCD2C04EB6EEA03FBC9CF4BE014EED3D@esealmw115.eemea.ericsson.se> Message-ID: <944da41d0510261128k2abb4662mc942927425a33189@mail.gmail.com> On 10/25/05, Kenneth Lundin (AS/EAB) wrote: > > Hi, > Just to put an end on all speculations regarding multi-CPU aware Erlang I > can reveal that > we are working on a runtime system with multiple schedulers (running on > different threads) which will > take advantage of multi-CPU HW on operating systems which support that. > With this solution applications running in one Erlang node can take > advantage of multi-CPU HW without > need to change a single line of code. > More information about this will be presented at the Erlang User > Conference the 10:th of November. > There is no promise regarding when this will be released but a qualified > guess would be within 12 months. > /Regards Kenneth Lundin (Product Manager of Erlang/OTP at Ericsson) > Thank you, I can't wait!!! :) And indeed, do take your time with this. A stable production VM is all-important. Cheers, Alex. -------------- next part -------------- An HTML attachment was scrubbed... URL: From paris@REDACTED Wed Oct 26 20:31:03 2005 From: paris@REDACTED (Javier =?iso-8859-1?Q?Par=EDs_Fern=E1ndez?=) Date: Wed, 26 Oct 2005 20:31:03 +0200 Subject: TCP/IP open Socket problem In-Reply-To: <8c8aa78a0510260803k31073dbdy48285eb6cc12e437@mail.gmail.com> References: <8c8aa78a0510260803k31073dbdy48285eb6cc12e437@mail.gmail.com> Message-ID: <20051026183103.GA14090@dc.fi.udc.es> Hi, On Wed, Oct 26, 2005 at 05:03:54PM +0200, Lokesh Naidu wrote: > Hi, > > TCP/IP client in Erlang communicates with a Server. Some times when the > connection is lost b/w Client and Server., the socket from the Server side > remains open. Client socket is closed using gen_tcp:close function. Also > the port is free(checked using netstat). Now new Socket can't be opened > with the same port no. from the client. Is it possible to close the > previous session from Client (Server side socket )? You would have to force an RST message, which I don't think it's possible from userspace. However, is is normal TCP behaviour that you cannot open a new connection with the same port numbers in a short time, to prevent confusion between old and new connections. In your case it would be easier to just make the client use another port. Best Regards, Javier. From klacke@REDACTED Wed Oct 26 21:10:34 2005 From: klacke@REDACTED (Claes Wikstrom) Date: Wed, 26 Oct 2005 21:10:34 +0200 Subject: Erlang/OTP R10B-8 has been released In-Reply-To: References: Message-ID: <435FD4AA.1020503@hyber.org> Bugreport: # uname -a Linux harr 2.6.11-gentoo-r5 #2 Wed Apr 27 00:08:44 CEST 2005 i686 Intel(R) Celeron(R) CPU 2.40GHz GenuineIntel GNU/Linux # cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 3 model name : Intel(R) Celeron(R) CPU 2.40GHz ......... Plain configure, no extra flags I get: # erlgdb .... (gdb) bt #0 0xb7e0ac06 in __pthread_sighandler () from /lib/libpthread.so.0 #1 #2 0xb7f03671 in fts_children () from /lib/libc.so.6 #3 0x080ecac7 in check_io (do_wait=1) at sys/unix/sys.c:2506 #4 0x080ed57b in erl_sys_schedule (runnable=0) at sys/unix/sys.c:3366 #5 0x0809cb8a in schedule (p=0x0, calls=0) at beam/erl_process.c:477 #6 0x080d3f47 in process_main () at beam/beam_emu.c:1148 #7 0x0807639f in erl_start (argc=4, argv=0x0) at beam/erl_init.c:902 #8 0x08065d8b in main (argc=-4, argv=0xfffffffc) at sys/unix/erl_main.c:28 (gdb) quit where the debug script is: # cat ~/bin/erlgdb #!/bin/sh BREAK_POINT=main gdb_exec=/tmp/erlgdb.$$ export ROOTDIR=/usr/local/src/otp_src_R10B-8 export BINDIR=${ROOTDIR}/bin/i686-pc-linux-gnu # to find inet_gethost export PATH=${BINDIR}:${PATH} echo "echo ERLGDB RUNNING\\n" > $gdb_exec echo "break $BREAK_POINT" >> $gdb_exec echo "directory $ROOTDIR/erts/emulator/beam" >> $gdb_exec echo "run -- -root $ROOTDIR" >> $gdb_exec gdb -x $gdb_exec ${BINDIR}/beam rm $gdb_exec Rebuilding with: # ./configure --disable-hipe Fixes the problem (or ehhum, doesn't coredump) What the exact problem is, I have no idea. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From ft@REDACTED Wed Oct 26 21:45:07 2005 From: ft@REDACTED (Fredrik Thulin) Date: Wed, 26 Oct 2005 21:45:07 +0200 Subject: proto_dist inet_ssl STILL broken in R10B-8? Message-ID: <200510262145.07986.ft@it.su.se> Is anyone able to use SSL proto_dist in R10B-7 or R10B-8? I am not, and I am wondering if it is A) just me B) officially broken C) unofficially broken $ /pkg/erlang/R10B-8/bin/erl \ -proto_dist inet_ssl \ -ssl_dist_opt client_certfile cert.comb \ -ssl_dist_opt server_certfile cert.comb \ -ssl_dist_opt verify 2 \ -boot ~/path/to/R10B-8-compiled/start_ssl \ -name a ... nothing happens, it just hangs there. /Fredrik ---------- Forwarded Message ---------- Subject: Fwd: proto_dist inet_ssl broken in R10B-7? Date: Saturday 10 September 2005 10.26 From: Fredrik Thulin To: erlang-bugs@REDACTED Hi I got a private reply from someone saying they have the exact same problem, so I therefor conclude that it is not just me but a bug that appeared in R10B-7. Hence this post to erlang-bugs@REDACTED /Fredrik ---------- Forwarded Message ---------- Subject: proto_dist inet_ssl broken in R10B-7? Date: Friday 02 September 2005 11.39 From: Fredrik Thulin To: erlang-questions@REDACTED Hi Is it just me, or is -proto_dist inet_ssl broken in R10B-7? R10B-6 : $ /pkg/erlang/R10B-6/bin/erl \ -proto_dist inet_ssl \ -ssl_dist_opt client_certfile cert.comb \ -ssl_dist_opt server_certfile cert.comb \ -ssl_dist_opt verify 2 \ -boot ~/path/to/R10B-6-compiled/start_ssl \ -name a Erlang (BEAM) emulator version 5.4.8 [source] [hipe] Eshell V5.4.8 (abort with ^G) (a@REDACTED)1> $ /pkg/erlang/R10B-7/bin/erl \ -proto_dist inet_ssl \ -ssl_dist_opt client_certfile cert.comb \ -ssl_dist_opt server_certfile cert.comb \ -ssl_dist_opt verify 2 \ -boot ~/path/to/R10B-7-compiled/start_ssl \ -name a R10B-7 just hangs. Same cert.comb. R10B-6 start_ssl.rel : %% Erlang OTP R10B-6 library versions %% File to get Erlang distribution using SSL started {release, {"Yxa foo","0.0"}, {erts, "5.2"}, [{kernel,"2.10.9"}, {stdlib,"1.13.8"}, {ssl, "3.0.7"} ] }. R10B-7 start_ssl.rel : %% Erlang OTP R10B-7 library versions %% File to get Erlang distribution using SSL started {release, {"Yxa foo","0.0"}, {erts, "5.2"}, [{kernel,"2.10.10"}, {stdlib,"1.13.9"}, {ssl, "3.0.7"} ] }. /Fredrik ------------------------------------------------------- ------------------------------------------------------- From francesco@REDACTED Wed Oct 26 22:13:21 2005 From: francesco@REDACTED (Francesco Cesarini (Erlang Training & Consulting)) Date: Wed, 26 Oct 2005 21:13:21 +0100 Subject: Obfuscated Erlang/OTP competition @ the User Conference In-Reply-To: <148408C0A2D44A41AB295D74E18399755DBB2B@esealmw105.eemea.ericsson.se> References: <148408C0A2D44A41AB295D74E18399755DBB2B@esealmw105.eemea.ericsson.se> Message-ID: <435FE361.8040607@erlang-consulting.com> Oh dear, if in total shock and disbelief, than you should stay well away from the Erlang user conference, as it will give you goosebumps when we present the winners. I would class the submissions handed in so far as both elegant and abusive! A one liner submitted has in fact been used in a live network... And the author has not told us what it does. We should maybe have a competition to figure it out ;-) You still have November 4th for your submissions, so hurry... Regards,, Francesco -- http://www.erlang-consulting.com Ola Andersson A (AL/EAB) wrote: > What? Do you mean that it is actually possible to write obfuscated > erlang code? =:O > *total shock and disbelief* > /OLA. > > > >>-----Original Message----- >>From: owner-erlang-questions@REDACTED >>[mailto:owner-erlang-questions@REDACTED] On Behalf Of >>Francesco Cesarini (Erlang Training & Consulting) >>Sent: den 17 oktober 2005 22:23 >>To: Erlang mailing list >>Subject: Obfuscated Erlang/OTP competition @ the User Conference >> >>The news with this year's Erlang User Conference (The program >>will be announced soon) is that we are organizing an Erlang >>Obfuscated Programming Competition in conjunction with it. >>The goal of this competition is to write the most obfuscated >>Erlang program, providing a safe forum for poor coding >>practices and programming styles. The winners will be >>announced during the conference, and their code will be >>posted on our site. >> >>The deadline for your submissions is November 4th. Entries >>will be judged by a panel of "subject matter experts", who >>will pick the most hideously elegant submission. You can read >>more about the competition at >> >>http://www.erlang-consulting.com/obfuscatederlang_fs.html >> >>Get those submissions coming in!!! >> >>Francesco >>-- >>http://www.erlang-consulting.com >> >> > > > From francesco@REDACTED Wed Oct 26 22:46:16 2005 From: francesco@REDACTED (Francesco Cesarini (Erlang Training & Consulting)) Date: Wed, 26 Oct 2005 21:46:16 +0100 Subject: catch link(Pid) when trapping exits Message-ID: <435FEB18.3060707@erlang-consulting.com> In a process trapping exists, catch link(Pid) of a non existing pid returns true. If we are not trapping exists, the return value is {'EXIT', {noproc, .....}} Looking into this "feature", my guess is that executing exit(Pid, Reason) when trapping exists returns true. I would however expect the same behavior in both cases, however.... 11> catch exit(hello). {'EXIT',hello} 12> catch exit(self(), hello). true 13> flush(). Shell got {'EXIT',<0.44.0>,hello} ok Is this a bug or a feature? Francesco -- http://www.erlang-consulting.com From raimo@REDACTED Thu Oct 27 10:26:48 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 27 Oct 2005 10:26:48 +0200 Subject: catch link(Pid) when trapping exits References: <435FEB18.3060707@erlang-consulting.com> Message-ID: francesco@REDACTED (Francesco Cesarini Erlang Training & Consulting) writes: > In a process trapping exists, > > catch link(Pid) > > of a non existing pid returns true. If we are not trapping exists, the > return value is {'EXIT', {noproc, .....}} > >From erl -man erlang: link(Pid) -> true Types Pid = pid() | port() Creates a link between the calling process and another process (or port) Pid, if there is not such a link already. If a process attempts to create a link to itself, nothing is done. Returns true. Does not fail, but sends an exit signal with reason noproc to the calling process if Pid does not exist. This means that, unless the calling process is trapping exits (see process_flag/2), it will exit if it tries to link to a non-existing process. It is all there, really. Only it was written before exceptions were invented as a concept in Erlang, uses the term "exit signal" in a confusing way and lies about "does not fail". Ok, it is maybe dead wrong, but the intention was right. So, what happens is: link(Pid) -> true if Pid exists or the caller has process_flag(trap_exit, true). error(noproc) otherwise The enclosing catch evaluates to {'EXIT',{noproc,Stackdump}} for error(noproc). Weird behaviour, in my opinion.. > Looking into this "feature", my guess is that executing exit(Pid, > Reason) when trapping exists returns true. I would however expect the > same behavior in both cases, however.... > > 11> catch exit(hello). > {'EXIT',hello} > 12> catch exit(self(), hello). > true > 13> flush(). > Shell got {'EXIT',<0.44.0>,hello} > ok > > Is this a bug or a feature? > This is a feature. exit/1 causes an exception of class 'exit' in the calling process, which when enclosed in a catch evaluates to {'EXIT',Reason} - no stacktrace since it is of class 'exit'. exit/2 sends an exit signal to the target process. And if the target process (self()) traps exits, it becomes a regular message. > Francesco > -- > http://www.erlang-consulting.com > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From rasmussen.bryan@REDACTED Thu Oct 27 10:55:45 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Thu, 27 Oct 2005 10:55:45 +0200 Subject: access ejabberd xmpp Message-ID: <3bb44c6e0510270155o7d70dea7ha20e7a8f7d77ecea@mail.gmail.com> I'm running JEAI on Repos, I would like to run a seperate process to query ejabberd for the xml value of messages. This is different than the Message Trace functionality of JEAI, If you can point me to the code in JEAI that gets the message trace then I can use it. From raimo@REDACTED Thu Oct 27 11:43:57 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 27 Oct 2005 11:43:57 +0200 Subject: catch link(Pid) when trapping exits References: <435FEB18.3060707@erlang-consulting.com>, Message-ID: Raimo Niskanen writes: Alright, that was only almost right: link(Pid) -> error(noproc) if Pid is local and does not exist and caller has process_flag(trap_exit, false) true otherwise And if the Pid dies, or even was remote and did not exist (those cases can not be discriminated), the caller will get an exit signal that can be converted to a regular message with process_flag(trap_exit, true). Let us see how long this explanation holds together... > francesco@REDACTED (Francesco Cesarini Erlang Training & Consulting) writes: > > > In a process trapping exists, > > > > catch link(Pid) > > > > of a non existing pid returns true. If we are not trapping exists, the > > return value is {'EXIT', {noproc, .....}} > > > > From erl -man erlang: > > link(Pid) -> true > > Types > Pid = pid() | port() > > Creates a link between the calling process and another > process (or port) Pid, if there is not such a link > already. If a process attempts to create a link to > itself, nothing is done. Returns true. > > Does not fail, but sends an exit signal with reason > noproc to the calling process if Pid does not exist. > This means that, unless the calling process is trapping > exits (see process_flag/2), it will exit if it tries to > link to a non-existing process. > > It is all there, really. Only it was written before exceptions > were invented as a concept in Erlang, uses the term > "exit signal" in a confusing way and lies about "does not fail". > Ok, it is maybe dead wrong, but the intention was right. > So, what happens is: > > link(Pid) -> true if Pid exists or the caller has > process_flag(trap_exit, true). > error(noproc) otherwise > > The enclosing catch evaluates to {'EXIT',{noproc,Stackdump}} > for error(noproc). > > Weird behaviour, in my opinion.. > > > Looking into this "feature", my guess is that executing exit(Pid, > > Reason) when trapping exists returns true. I would however expect the > > same behavior in both cases, however.... > > > > 11> catch exit(hello). > > {'EXIT',hello} > > 12> catch exit(self(), hello). > > true > > 13> flush(). > > Shell got {'EXIT',<0.44.0>,hello} > > ok > > > > Is this a bug or a feature? > > > > This is a feature. > > exit/1 causes an exception of class 'exit' in the calling process, > which when enclosed in a catch evaluates to > {'EXIT',Reason} - no stacktrace since it is of class 'exit'. > > exit/2 sends an exit signal to the target process. And if > the target process (self()) traps exits, it becomes > a regular message. > > > Francesco > > -- > > http://www.erlang-consulting.com > > > > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From francesco@REDACTED Thu Oct 27 11:34:26 2005 From: francesco@REDACTED (Francesco Cesarini (Erlang Training & Consulting)) Date: Thu, 27 Oct 2005 10:34:26 +0100 Subject: catch link(Pid) when trapping exits In-Reply-To: References: <435FEB18.3060707@erlang-consulting.com> Message-ID: <43609F22.4010406@erlang-consulting.com> > It is all there, really. Only it was written before exceptions > were invented as a concept in Erlang, uses the term > "exit signal" in a confusing way and lies about "does not fail". > Ok, it is maybe dead wrong, but the intention was right. > So, what happens is: > > link(Pid) -> true if Pid exists or the caller has > process_flag(trap_exit, true). > error(noproc) otherwise > > The enclosing catch evaluates to {'EXIT',{noproc,Stackdump}} > for error(noproc). > > Weird behaviour, in my opinion.. Exactly my point. Would it not be better to return error(noproc) even if trapping exits instead of exit(Pid, Reason)? Francesco -- http://www.erlang-consulting.com From raimo@REDACTED Thu Oct 27 11:53:51 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 27 Oct 2005 11:53:51 +0200 Subject: catch link(Pid) when trapping exits References: <435FEB18.3060707@erlang-consulting.com>, , <43609F22.4010406@erlang-consulting.com> Message-ID: francesco@REDACTED (Francesco Cesarini Erlang Training & Consulting) writes: Yes it would. Even better would be to never do error(noproc) but always let a failing link send the exit signal even if the process does not exist at the time of the call to link(Pid). As always - it can not be changed now due to the Backwards Compatibility Ghost. > > It is all there, really. Only it was written before exceptions > > were invented as a concept in Erlang, uses the term > > "exit signal" in a confusing way and lies about "does not fail". > > Ok, it is maybe dead wrong, but the intention was right. > > So, what happens is: > > link(Pid) -> true if Pid exists or the caller has > > process_flag(trap_exit, true). > > error(noproc) otherwise > > The enclosing catch evaluates to {'EXIT',{noproc,Stackdump}} > > for error(noproc). Weird behaviour, in my opinion.. > > Exactly my point. Would it not be better to return error(noproc) even > if trapping exits instead of exit(Pid, Reason)? > > Francesco > -- > http://www.erlang-consulting.com > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From heinrich@REDACTED Thu Oct 27 14:34:21 2005 From: heinrich@REDACTED (Heinrich Venter) Date: Thu, 27 Oct 2005 14:34:21 +0200 Subject: Inets HTTP client stability Message-ID: Hi all. I am about to develop an app that will act as an http gateway for some of the services we are running. For the incoming http requests I plan to use httpd from inets. For the outgonig leg it would thus make sense to use the http client from inets. My question is wether any one else is using the inets http client for medium to high volume outgoing traffic? I know of two instances where people chose to create a java node to make http connections, instead of using inets. Is it worth the risk to try the inets solution first, or should I budget the time to make a java node and try to upgrade to inets later? Any one with experience in this regard? The requirements for the http client will be that many connections will be made to a series of speciffic URLs. -]-[einrich -------------- next part -------------- An HTML attachment was scrubbed... URL: From mikpe@REDACTED Thu Oct 27 15:01:57 2005 From: mikpe@REDACTED (Mikael Pettersson) Date: Thu, 27 Oct 2005 15:01:57 +0200 Subject: Erlang/OTP R10B-8 has been released In-Reply-To: <435FD4AA.1020503@hyber.org> References: <435FD4AA.1020503@hyber.org> Message-ID: <17248.53189.452146.809679@alkaid.it.uu.se> Claes Wikstrom writes: > > Bugreport: > > # uname -a > Linux harr 2.6.11-gentoo-r5 #2 Wed Apr 27 00:08:44 CEST 2005 i686 Intel(R) Celeron(R) CPU 2.40GHz GenuineIntel GNU/Linux > # cat /proc/cpuinfo > processor : 0 > vendor_id : GenuineIntel > cpu family : 15 > model : 3 > model name : Intel(R) Celeron(R) CPU 2.40GHz > ......... > > Plain configure, no extra flags > > I get: > > # erlgdb > > .... > > (gdb) bt > #0 0xb7e0ac06 in __pthread_sighandler () from /lib/libpthread.so.0 > #1 > #2 0xb7f03671 in fts_children () from /lib/libc.so.6 > #3 0x080ecac7 in check_io (do_wait=1) at sys/unix/sys.c:2506 > #4 0x080ed57b in erl_sys_schedule (runnable=0) at sys/unix/sys.c:3366 > #5 0x0809cb8a in schedule (p=0x0, calls=0) at beam/erl_process.c:477 > #6 0x080d3f47 in process_main () at beam/beam_emu.c:1148 > #7 0x0807639f in erl_start (argc=4, argv=0x0) at beam/erl_init.c:902 > #8 0x08065d8b in main (argc=-4, argv=0xfffffffc) at sys/unix/erl_main.c:28 > (gdb) quit > > > > where the debug script is: > > > # cat ~/bin/erlgdb > #!/bin/sh > > BREAK_POINT=main > > gdb_exec=/tmp/erlgdb.$$ > > export ROOTDIR=/usr/local/src/otp_src_R10B-8 > export BINDIR=${ROOTDIR}/bin/i686-pc-linux-gnu > # to find inet_gethost > export PATH=${BINDIR}:${PATH} > > echo "echo ERLGDB RUNNING\\n" > $gdb_exec > echo "break $BREAK_POINT" >> $gdb_exec > echo "directory $ROOTDIR/erts/emulator/beam" >> $gdb_exec > echo "run -- -root $ROOTDIR" >> $gdb_exec > gdb -x $gdb_exec ${BINDIR}/beam > rm $gdb_exec > > > Rebuilding with: > > # ./configure --disable-hipe > > Fixes the problem (or ehhum, doesn't coredump) > What the exact problem is, I have no idea. Here we go again. There have been some reports from Gentoo and Ubuntu users that a HiPE-enabled system on x86 breaks for them. However: 1) There's no breakage on RedHat/Fedora-based systems. I just tried your gdb thing on FC4/x86 and everything works just fine. 2) We (the HiPE group) don't run Gentoo/Ubuntu/${random distro} so we can't debug issues on them. 3) So far no Gentoo/Ubuntu user has volunteered to debug their systems. So I'm getting to the point where I'm considering changing erts/configure.in to not auto-enable HiPE/x86 except on Fedora and Solaris. For the record, the problem is most likely in HiPE/x86' code to override certain libc signal setup procedures in order to enforce the use of SIGALTSTACK. This is very delicate libc-dependent code. See erts/emulator/hipe/hipe_x86_signal.c for details. /Mikael From erlang@REDACTED Thu Oct 27 15:10:36 2005 From: erlang@REDACTED (Peter Lund) Date: Thu, 27 Oct 2005 15:10:36 +0200 Subject: Inets HTTP client stability In-Reply-To: References: Message-ID: <4360D1CC.7060409@lundata.se> It sound very odd to switch to java for making incoming/outgoing http. If inets doesn't fullfill your needs, it would be more natural to go for yaws (Klackes webserver) and ibrowse (Chandrus http client) written in erlang.... /Peter Heinrich Venter wrote: > Hi all. > > I am about to develop an app that will act as an http gateway for some > of the services we are running. For the incoming http requests I plan > to use httpd from inets. For the outgonig leg it would thus make > sense to use the http client from inets. > My question is wether any one else is using the inets http client for > medium to high volume outgoing traffic? I know of two instances where > people chose to create a java node to make http connections, instead > of using inets. > Is it worth the risk to try the inets solution first, or should I > budget the time to make a java node and try to upgrade to inets later? > Any one with experience in this regard? > > The requirements for the http client will be that many connections > will be made to a series of speciffic URLs. > > -]-[einrich From erlang@REDACTED Thu Oct 27 15:10:36 2005 From: erlang@REDACTED (Peter Lund) Date: Thu, 27 Oct 2005 15:10:36 +0200 Subject: Inets HTTP client stability In-Reply-To: References: Message-ID: <4360D1CC.7060409@lundata.se> It sound very odd to switch to java for making incoming/outgoing http. If inets doesn't fullfill your needs, it would be more natural to go for yaws (Klackes webserver) and ibrowse (Chandrus http client) written in erlang.... /Peter Heinrich Venter wrote: > Hi all. > > I am about to develop an app that will act as an http gateway for some > of the services we are running. For the incoming http requests I plan > to use httpd from inets. For the outgonig leg it would thus make > sense to use the http client from inets. > My question is wether any one else is using the inets http client for > medium to high volume outgoing traffic? I know of two instances where > people chose to create a java node to make http connections, instead > of using inets. > Is it worth the risk to try the inets solution first, or should I > budget the time to make a java node and try to upgrade to inets later? > Any one with experience in this regard? > > The requirements for the http client will be that many connections > will be made to a series of speciffic URLs. > > -]-[einrich From rasmussen.bryan@REDACTED Thu Oct 27 15:32:43 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Thu, 27 Oct 2005 15:32:43 +0200 Subject: can one reload all modules files in repos at each start Message-ID: <3bb44c6e0510270632l7db601dxf34dd121e4541c6f@mail.gmail.com> Hi, As I'm doing a bunch of editing in repos I would like to just force a reload of all modules/files, recompilation etc. at each repos:start. can that be done? From thomasl_erlang@REDACTED Thu Oct 27 16:01:17 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Thu, 27 Oct 2005 07:01:17 -0700 (PDT) Subject: can one reload all modules files in repos at each start In-Reply-To: <3bb44c6e0510270632l7db601dxf34dd121e4541c6f@mail.gmail.com> Message-ID: <20051027140117.32292.qmail@web34415.mail.mud.yahoo.com> --- bryan rasmussen wrote: > Hi, > As I'm doing a bunch of editing in repos I would > like to just force a > reload of all modules/files, recompilation etc. at > each repos:start. > can that be done? Vladimir Sekissov once wrote a fine utility/function that enables you to reload the modules that have changed since last loaded. (It doesn't work perfectly, but for the usual case it's fine.) I rewrote this mildly, and now use l() and nl() all the time. I have enclosed the relevant parts of my user_default. Feel free to use it as you will. Best, Thomas __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs -------------- next part -------------- A non-text attachment was scrubbed... Name: ex_user_default.erl Type: application/octet-stream Size: 1719 bytes Desc: 2702038738-ex_user_default.erl URL: From peterl@REDACTED Thu Oct 27 15:09:15 2005 From: peterl@REDACTED (Peter Lund) Date: Thu, 27 Oct 2005 15:09:15 +0200 Subject: Inets HTTP client stability In-Reply-To: References: Message-ID: <4360D17B.1010608@synap.se> It sound very odd to switch to java for making incoming/outgoing http. If inets doesn't fullfill your needs, it would be more natural to go for yaws (Klackes webserver) and ibrowse (Chandrus http client) written in erlang.... /Peter Heinrich Venter wrote: > Hi all. > > I am about to develop an app that will act as an http gateway for some > of the services we are running. For the incoming http requests I plan > to use httpd from inets. For the outgonig leg it would thus make > sense to use the http client from inets. > My question is wether any one else is using the inets http client for > medium to high volume outgoing traffic? I know of two instances where > people chose to create a java node to make http connections, instead > of using inets. > Is it worth the risk to try the inets solution first, or should I > budget the time to make a java node and try to upgrade to inets later? > Any one with experience in this regard? > > The requirements for the http client will be that many connections > will be made to a series of speciffic URLs. > > -]-[einrich From hp@REDACTED Thu Oct 27 14:51:12 2005 From: hp@REDACTED (HP Wei) Date: Thu, 27 Oct 2005 08:51:12 -0400 (EDT) Subject: unsubscribe request In-Reply-To: References: Message-ID: unsubscribe erlang-questions thanks HP From bjarne@REDACTED Thu Oct 27 18:31:01 2005 From: bjarne@REDACTED (=?iso-8859-1?Q?Bjarne_D=E4cker?=) Date: Thu, 27 Oct 2005 18:31:01 +0200 Subject: Welcome to EUC'2005 !!! References: <435FD4AA.1020503@hyber.org> Message-ID: <002a01c5db13$d2a94f60$bb0b69d4@segeltorp> Dear Erlang friends, All Erlang developers, researchers, users, programmers, and other interested persons are hereby cordially invited to the 11th International Erlang/OTP User Conference, in Stockholm on November 10. Please see the invitation and conference program at http://www.erlang.se/euc/05/ All EUC's are improvements of the earlier ones but this will surely be the best one of all. Welcome to a great event. Not to be missed if you want to be "with it" !!! Bjarne EUC chairman From erlang@REDACTED Thu Oct 27 20:38:06 2005 From: erlang@REDACTED (Michael McDaniel) Date: Thu, 27 Oct 2005 11:38:06 -0700 Subject: Inets HTTP client stability In-Reply-To: References: Message-ID: <20051027183806.GN12411@delora.autosys.us> On Thu, Oct 27, 2005 at 02:34:21PM +0200, Heinrich Venter wrote: > Hi all. > > I am about to develop an app that will act as an http gateway for some of the > services we are running. For the incoming http requests I plan to use httpd > from inets. For the outgonig leg it would thus make sense to use the http > client from inets. > My question is wether any one else is using the inets http client for medium to > high volume outgoing traffic? I know of two instances where people chose to > create a java node to make http connections, instead of using inets. > Is it worth the risk to try the inets solution first, or should I budget the > time to make a java node and try to upgrade to inets later? > Any one with experience in this regard? > > The requirements for the http client will be that many connections will be made > to a series of speciffic URLs. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I have successfully been using http:request/4 for doing POSTs for a few months now in a production system. I am very happy with the results (and Erlang!). See code below... The production system is not supporting heavy traffic (though the customer hopes to make more sales!); however, during testing I was very pleased. The destination server is provided by another company, and their testing server could not keep up with my load testing. At one point I had between 800-900 http:request/4s backed up retrying as described below. All the POSTs eventually were successful with a response from the test server. An abbreviated version of the code is below... -define(DEFAULT_TIMEOUT, 2000). MyFun(Timeout, Body) -> case (catch http:request(post, {"http://example.com/path/" , [ {"Date", httpd_util:rfc1123_date()} , {"Host", "example.com"} , {"Accept", "text/xml/html"}, {"User-Agent", "Demo Erlang Client"} ], "text/xml; charset=utf-8", Body }, [{keepalive, false}, {nodelay,true}], [])) of {ok, Result} -> {ok, Result} ; {error, Reason} -> Result = null , mylogger:log_error(?MODULE, ?LINE, 'MyFun, http:request', "failed, see /tmp/my.log"), {ok, Io} = file:open('/tmp/my.log', [append]) , io:fwrite(Io, "~26p, ~p~n", [erlang:localtime(), Reason]) , file:close(Io) , if TimeOut > 8192000 -> % milliseconds timer:sleep(TimeOut/8) , ?MODULE:MyFun(?DEFAULT_TIMEOUT,Body); true -> timer:sleep(TimeOut) , ?MODULE:MyFun(2*TimeOut,Body) end end , %%% Do something with Result ... end. Of course you could give up eventually but I "know" I'll eventually be able to get where I'm POSTing to, hence the endless retries. You may prefer to spawn rather than serialize the repeat fun calls as I have done. Please anyone mention if there are more accepted/efficient ways of accomplishing the above. I still consider myself very novice with Erlang and Erlang idioms. I have not yet started using OTP yet, and still am writing "pure" Erlang. I have a new project coming up and will probably dabble with OTP on that one. ~Michael From jabba@REDACTED Thu Oct 27 21:40:18 2005 From: jabba@REDACTED (Jani Launonen) Date: Thu, 27 Oct 2005 22:40:18 +0300 (EEST) Subject: Erlang thesis online (in Finnish) Message-ID: Hello all, my diploma thesis "CORBA-v?liohjelmiston vikasietoisuuden lis??minen passiivisella replikointistrategialla" ("Improving Fault Tolerance of CORBA Middleware by Passive Replication Strategy") is about changing Orber internals and taking advantage of Mnesia replication to store CORBA object's state. The thesis is available online, but is in Finnish, so it will be just a curiosity to most of the Erlang-list members as I've counted just a couple of Finnish in the list (hello Jouni, hello Jani H.!). Just in case there's other Finnish-speaking lurkers around... http://www.ee.oulu.fi/~jabba/diplomityo.pdf There's abstract in English, but it doesn't tell too much of the dirty details of course. I want to acknowledge especially Niclas Eklund for his great and usually blindingly fast help concerning Orber basics and internals --- without Niclas' help my thesis about Orber wouldn't exist! Also big thanks to Dan Gudmundsson for ansvering Mnesia questions. Naturally everyone involved in developing Erlang/OTP tools and documentation or anyway improving Erlang deserve thanks! -+-+-+- Jani Launonen From nm@REDACTED Fri Oct 28 00:25:55 2005 From: nm@REDACTED (Gaspar Chilingarov) Date: Fri, 28 Oct 2005 03:25:55 +0500 (AMST) Subject: parse external files -- which library files call ? Message-ID: <59301.217.113.1.123.1130451955.squirrel@webmail.web.am> Hi all! I need to have files in plaintext format, describing some forms functionality - which i need to load, parse and generate html from them. files will look like this: {form, personalinfo, [ {firstname, string}, {lastname, string}, {submit, button} ], fun (List) -> validateForm(List) end } so, I need them parse info valid erlkang terms - tuples, lists, funs, etc. I understand , that such functionality already is in library :) but , hm, I've missed where ) or maybe i should RTFS parts of yaws? thanks in advance :) -- Gaspar Chilingarov System Administrator t +37491 419763 w www.netter.am e nm@REDACTED From robert.virding@REDACTED Fri Oct 28 00:58:22 2005 From: robert.virding@REDACTED (Robert Virding) Date: Fri, 28 Oct 2005 00:58:22 +0200 Subject: catch link(Pid) when trapping exits In-Reply-To: <43609F22.4010406@erlang-consulting.com> References: <435FEB18.3060707@erlang-consulting.com> <43609F22.4010406@erlang-consulting.com> Message-ID: <43615B8E.1090402@telia.com> No, no, no it should definitely NOT return error(noproc). The reason is that the whole process communication mechanism, including links, was originally designed to be asynchronous on the sending side. Sending a message is asychronous, ou don't wait in the send to find out if it arrived. Link/1 works the same way. The call does not wait until the link is set up but just sends the request and continues. If the process does not exist the caller is notified by a noproc exit signal from the non-existent process (yes I know but from who else could it receive it?). The important point is that in bothe cases the call is asynchronous. This also means, mostly importantly, that both calls function the same way irrespective of whether the other process is local or remote. This was also an original goal. If this has significantly changed since then then someone has missed the original intentions. Robert Francesco Cesarini (Erlang Training & Consulting) wrote: >> It is all there, really. Only it was written before exceptions >> were invented as a concept in Erlang, uses the term >> "exit signal" in a confusing way and lies about "does not fail". >> Ok, it is maybe dead wrong, but the intention was right. >> So, what happens is: >> >> link(Pid) -> true if Pid exists or the caller has >> process_flag(trap_exit, true). >> error(noproc) otherwise >> >> The enclosing catch evaluates to {'EXIT',{noproc,Stackdump}} >> for error(noproc). >> Weird behaviour, in my opinion.. > > > Exactly my point. Would it not be better to return error(noproc) even > if trapping exits instead of exit(Pid, Reason)? > > Francesco > -- > http://www.erlang-consulting.com > > From sean.hinde@REDACTED Fri Oct 28 01:04:08 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Fri, 28 Oct 2005 00:04:08 +0100 Subject: parse external files -- which library files call ? In-Reply-To: <59301.217.113.1.123.1130451955.squirrel@webmail.web.am> References: <59301.217.113.1.123.1130451955.squirrel@webmail.web.am> Message-ID: On 27 Oct 2005, at 23:25, Gaspar Chilingarov wrote: > Hi all! > > I need to have files in plaintext format, describing some forms > functionality - > which i need to load, parse and generate html from them. > > files will look like this: > > {form, personalinfo, > [ {firstname, string}, > {lastname, string}, > {submit, button} > ], > fun > (List) -> validateForm(List) > end > } > > > so, I need them parse info valid erlkang terms - tuples, lists, > funs, etc. > I understand , that such functionality already is in library :) > but , hm, I've > missed where ) (dcr@REDACTED)25> {ok, B, _}=erl_scan:string(A). {ok,[{'{',1}, {atom,1,form}, {',',1}, {atom,1,personalinfo}, {',',1}, {'[',2}, etc... (dcr@REDACTED)28> erl_parse:parse_exprs(B ++ [{dot,1}]). {ok,[{tuple,1, [{atom,1,form}, {atom,1,personalinfo}, {cons,2, {tuple,2,[{atom,2,firstname},{atom,2,string}]}, {cons,3, {tuple,3,[{atom,3,lastname},{atom,3,string}]}, {cons,4,{tuple,4,[{atom,4|...},{atom|...}]}, {nil,5}}}}, {'fun',6, {clauses,[{clause,7, [{var,7,'List'}], [], [{call,7,{atom|...}, [...]}]}]}}]}]} This sort of thing? Sean From elrang@REDACTED Thu Oct 27 20:56:37 2005 From: elrang@REDACTED (Michael McDaniel) Date: Thu, 27 Oct 2005 11:56:37 -0700 Subject: Erlang/OTP R10B-8 has been released In-Reply-To: <17248.53189.452146.809679@alkaid.it.uu.se> References: <435FD4AA.1020503@hyber.org> <17248.53189.452146.809679@alkaid.it.uu.se> Message-ID: <20051027185636.GO12411@delora.autosys.us> On Thu, Oct 27, 2005 at 03:01:57PM +0200, Mikael Pettersson wrote: > Claes Wikstrom writes: > > > > Bugreport: > > > > # uname -a > > Linux harr 2.6.11-gentoo-r5 #2 Wed Apr 27 00:08:44 CEST 2005 i686 Intel(R) Celeron(R) CPU 2.40GHz GenuineIntel GNU/Linux > > # cat /proc/cpuinfo > > processor : 0 > > vendor_id : GenuineIntel > > cpu family : 15 > > model : 3 > > model name : Intel(R) Celeron(R) CPU 2.40GHz > > ......... > > > > Plain configure, no extra flags > > > > I get: > > > > # erlgdb > > > > .... > > > > (gdb) bt > > #0 0xb7e0ac06 in __pthread_sighandler () from /lib/libpthread.so.0 > > #1 > > #2 0xb7f03671 in fts_children () from /lib/libc.so.6 > > #3 0x080ecac7 in check_io (do_wait=1) at sys/unix/sys.c:2506 > > #4 0x080ed57b in erl_sys_schedule (runnable=0) at sys/unix/sys.c:3366 > > #5 0x0809cb8a in schedule (p=0x0, calls=0) at beam/erl_process.c:477 > > #6 0x080d3f47 in process_main () at beam/beam_emu.c:1148 > > #7 0x0807639f in erl_start (argc=4, argv=0x0) at beam/erl_init.c:902 > > #8 0x08065d8b in main (argc=-4, argv=0xfffffffc) at sys/unix/erl_main.c:28 > > (gdb) quit > > > > > > > > where the debug script is: > > > > > > # cat ~/bin/erlgdb > > #!/bin/sh > > > > BREAK_POINT=main > > > > gdb_exec=/tmp/erlgdb.$$ > > > > export ROOTDIR=/usr/local/src/otp_src_R10B-8 > > export BINDIR=${ROOTDIR}/bin/i686-pc-linux-gnu > > # to find inet_gethost > > export PATH=${BINDIR}:${PATH} > > > > echo "echo ERLGDB RUNNING\\n" > $gdb_exec > > echo "break $BREAK_POINT" >> $gdb_exec > > echo "directory $ROOTDIR/erts/emulator/beam" >> $gdb_exec > > echo "run -- -root $ROOTDIR" >> $gdb_exec > > gdb -x $gdb_exec ${BINDIR}/beam > > rm $gdb_exec > > > > > > Rebuilding with: > > > > # ./configure --disable-hipe > > > > Fixes the problem (or ehhum, doesn't coredump) > > What the exact problem is, I have no idea. > > Here we go again. There have been some reports from Gentoo and Ubuntu > users that a HiPE-enabled system on x86 breaks for them. However: > 1) There's no breakage on RedHat/Fedora-based systems. I just tried > your gdb thing on FC4/x86 and everything works just fine. > 2) We (the HiPE group) don't run Gentoo/Ubuntu/${random distro} so we > can't debug issues on them. > 3) So far no Gentoo/Ubuntu user has volunteered to debug their systems. > > So I'm getting to the point where I'm considering changing erts/configure.in > to not auto-enable HiPE/x86 except on Fedora and Solaris. > > For the record, the problem is most likely in HiPE/x86' code to > override certain libc signal setup procedures in order to enforce > the use of SIGALTSTACK. This is very delicate libc-dependent code. > See erts/emulator/hipe/hipe_x86_signal.c for details. > > /Mikael ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Oh, dear. My "Ubuntu release 5.10" is not breaking, so I do not know what I could do to help. Let me know, though, if there is something I can do to help. *Because*, my new "desktop of choice" is Ubuntu distro (as you may know, based on Debian), and I would like to have it be a "first class" Erlang platform because I am now doing all my development on the new laptop. I have been using SuSE for years and just switched to Ubuntu because I was concerned what Novell might do with SuSE. The Ubuntu installed easily and "everything" just works on my Dell 700m. (except movies; I keep getting "codec not installed" for whatever movie format I try and since watching vids is *so* far down on my list, I haven't seriously done troubleshooting for that issue). Erlang R10B-8 seems to be working just fine on my installation. Here is my Ubuntu release 5.10 information ... $ uname -a Linux delora 2.6.12-9-386 #1 Mon Oct 10 13:14:36 BST 2005 i686 GNU/Linux $ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 13 model name : Intel(R) Pentium(R) M processor 1.60GHz stepping : 6 cpu MHz : 598.161 cache size : 2048 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov pat clflush dts acpi mmx fxsr sse sse2 ss tm pbe est tm2 bogomips : 1185.79 $ ./configure --with-odbc --x-includes=/usr/local/include \ --x-libraries=/usr/lib --with-ssl === === === message here about no java === === === $ make $ sudo make install ; echo "remember to untar the new docs" $ $ erl Erlang (BEAM) emulator version 5.4.10 [source] [hipe] Eshell V5.4.10 (abort with ^G) 1> q() ok 2> $ $ ~~Michael From raimo@REDACTED Fri Oct 28 09:35:48 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 28 Oct 2005 09:35:48 +0200 Subject: catch link(Pid) when trapping exits References: , <43609F22.4010406@erlang-consulting.com>, <43615B8E.1090402@telia.com> Message-ID: robert.virding@REDACTED (Robert Virding) writes: I have dug into the archives... This was introduced fairly recently, in R9B, in conjunction with the rewrite for more than 255 remote nodes. We will look into this and decide what to do. > No, no, no it should definitely NOT return error(noproc). > > The reason is that the whole process communication mechanism, > including links, was originally designed to be asynchronous on the > sending side. Sending a message is asychronous, ou don't wait in the > send to find out if it arrived. Link/1 works the same way. The call > does not wait until the link is set up but just sends the request and > continues. If the process does not exist the caller is notified by a > noproc exit signal from the non-existent process (yes I know but from > who else could it receive it?). > > The important point is that in bothe cases the call is > asynchronous. This also means, mostly importantly, that both calls > function the same way irrespective of whether the other process is > local or remote. This was also an original goal. > > If this has significantly changed since then then someone has missed > the original intentions. > > Robert > > > Francesco Cesarini (Erlang Training & Consulting) wrote: > > >> It is all there, really. Only it was written before exceptions > >> were invented as a concept in Erlang, uses the term > >> "exit signal" in a confusing way and lies about "does not fail". > >> Ok, it is maybe dead wrong, but the intention was right. > >> So, what happens is: > >> > >> link(Pid) -> true if Pid exists or the caller has > >> process_flag(trap_exit, true). > >> error(noproc) otherwise > >> > >> The enclosing catch evaluates to {'EXIT',{noproc,Stackdump}} > >> for error(noproc). Weird behaviour, in my opinion.. > > > > > > Exactly my point. Would it not be better to return error(noproc) > > even if trapping exits instead of exit(Pid, Reason)? > > > > Francesco > > -- > > http://www.erlang-consulting.com > > > > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From nm@REDACTED Fri Oct 28 09:44:53 2005 From: nm@REDACTED (Gaspar Chilingarov) Date: Fri, 28 Oct 2005 12:44:53 +0500 Subject: licensing issues Message-ID: <4361D6F5.5000408@web.am> Hi there! I wonder are there any legal issues with selling products build with erlang? Does it require commertial license or it is only for support, patches & etc mentioned on erlang.se site? -- Gaspar Chilingarov System Administrator t +37491 419763 (mob) t +37410 240399 (office) w www.web.am i 63174784 e nm@REDACTED From matthias@REDACTED Fri Oct 28 10:18:15 2005 From: matthias@REDACTED (Matthias Lang) Date: Fri, 28 Oct 2005 10:18:15 +0200 Subject: licensing issues In-Reply-To: <4361D6F5.5000408@web.am> References: <4361D6F5.5000408@web.am> Message-ID: <17249.57031.656322.958880@antilipe.corelatus.se> Gaspar Chilingarov writes: > I wonder are there any legal issues with selling products build with > erlang? Does it require commertial license or it is only for support, > patches & etc mentioned on erlang.se site? Here is what the FAQ has to say on the subject: | The Open Source Erlang Licence is essentially the Mozilla (Netscape) | Public Licence with a few modifications to make it compatible with | Swedish law. | | As far as I understand, this means you can obtain Erlang for free, use | it to build cool systems and sell them without Ericsson coming around | to charge you money. For an authoritative statement, you'll need a | lawyer. The actual licence is in the file "EPLICENCE" at the top of the distribution. It can also be read here: http://www.erlang.org/EPLICENSE Here is what the FAQ doesn't say, but I wish it did: | There is a fee for posting questions to the erlang | mailing list without first making a reasonable attempt to | find the answer yourself, for instance by checking the FAQ. That | fee is one pint of beer for each person in attendance at the | next Erlounge you attend. ;-) Matthias From martin@REDACTED Fri Oct 28 11:35:20 2005 From: martin@REDACTED (Martin Carlson) Date: Fri, 28 Oct 2005 10:35:20 +0100 (BST) Subject: Inets HTTP client stability In-Reply-To: <20051027183806.GN12411@delora.autosys.us> References: <20051027183806.GN12411@delora.autosys.us> Message-ID: I would probably opt at yaws/ibrowse or a simple gen_tcp. To my knowlage yaws/ibrowse. The java node seems to me like a really odd choice since Erlang is designed for concurrency and have excelent network support. Martin ------------------------- Martin Carlson www.erlang-consulting.com On Thu, 27 Oct 2005, Michael McDaniel wrote: > On Thu, Oct 27, 2005 at 02:34:21PM +0200, Heinrich Venter wrote: >> Hi all. >> >> I am about to develop an app that will act as an http gateway for some of the >> services we are running. For the incoming http requests I plan to use httpd >> from inets. For the outgonig leg it would thus make sense to use the http >> client from inets. >> My question is wether any one else is using the inets http client for medium to >> high volume outgoing traffic? I know of two instances where people chose to >> create a java node to make http connections, instead of using inets. >> Is it worth the risk to try the inets solution first, or should I budget the >> time to make a java node and try to upgrade to inets later? >> Any one with experience in this regard? >> >> The requirements for the http client will be that many connections will be made >> to a series of speciffic URLs. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > I have successfully been using http:request/4 for doing POSTs for a > few months now in a production system. I am very happy with the > results (and Erlang!). > > See code below... > > The production system is not supporting heavy traffic (though the customer > hopes to make more sales!); however, during testing I was very pleased. > > The destination server is provided by another company, and their > testing server could not keep up with my load testing. At one point I > had between 800-900 http:request/4s backed up retrying as described > below. All the POSTs eventually were successful with a response from the > test server. An abbreviated version of the code is below... > > > -define(DEFAULT_TIMEOUT, 2000). > MyFun(Timeout, Body) -> > > case (catch http:request(post, > {"http://example.com/path/" , > [ > {"Date", httpd_util:rfc1123_date()} , > {"Host", "example.com"} , > {"Accept", "text/xml/html"}, > {"User-Agent", "Demo Erlang Client"} > ], "text/xml; charset=utf-8", Body }, > [{keepalive, false}, {nodelay,true}], [])) of > {ok, Result} -> {ok, Result} ; > {error, Reason} -> > Result = null , > mylogger:log_error(?MODULE, ?LINE, > 'MyFun, http:request', "failed, see /tmp/my.log"), > {ok, Io} = file:open('/tmp/my.log', [append]) , > io:fwrite(Io, "~26p, ~p~n", > [erlang:localtime(), Reason]) , > file:close(Io) , > if TimeOut > 8192000 -> % milliseconds > timer:sleep(TimeOut/8) , > ?MODULE:MyFun(?DEFAULT_TIMEOUT,Body); > true -> > timer:sleep(TimeOut) , > ?MODULE:MyFun(2*TimeOut,Body) > end > end , > > %%% Do something with Result ... > > end. > > Of course you could give up eventually but I "know" I'll eventually be > able to get where I'm POSTing to, hence the endless retries. > > You may prefer to spawn rather than serialize the repeat fun calls as > I have done. > > Please anyone mention if there are more accepted/efficient ways of > accomplishing the above. I still consider myself very novice with > Erlang and Erlang idioms. I have not yet started using OTP yet, > and still am writing "pure" Erlang. I have a new project coming up > and will probably dabble with OTP on that one. > > ~Michael > > > > > > > From martin@REDACTED Fri Oct 28 11:39:21 2005 From: martin@REDACTED (Martin Carlson) Date: Fri, 28 Oct 2005 10:39:21 +0100 (BST) Subject: parse external files -- which library files call ? In-Reply-To: <59301.217.113.1.123.1130451955.squirrel@webmail.web.am> References: <59301.217.113.1.123.1130451955.squirrel@webmail.web.am> Message-ID: You are probably looking for file:consult or file:eval. Martin ------------------------- Martin Carlson www.erlang-consulting.com On Fri, 28 Oct 2005, Gaspar Chilingarov wrote: > Hi all! > > I need to have files in plaintext format, describing some forms functionality - > which i need to load, parse and generate html from them. > > files will look like this: > > {form, personalinfo, > [ {firstname, string}, > {lastname, string}, > {submit, button} > ], > fun > (List) -> validateForm(List) > end > } > > > so, I need them parse info valid erlkang terms - tuples, lists, funs, etc. > I understand , that such functionality already is in library :) but , hm, I've > missed where ) > > or maybe i should RTFS parts of yaws? > > thanks in advance :) > > -- > Gaspar Chilingarov > System Administrator > > t +37491 419763 > w www.netter.am > e nm@REDACTED > > From raimo@REDACTED Fri Oct 28 10:56:44 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 28 Oct 2005 10:56:44 +0200 Subject: Dead subscribers Message-ID: I will clean out some subscribers of this list who's mail addresses constatnly bounces with permanent failures that clog my inbox. I do not know why I post this notice, since the ones concerned will never get it, but I do not know where else to post it... -- / Raimo Niskanen, Mailing list trashcan @ Erlang/OTP, Ericsson AB From nm@REDACTED Fri Oct 28 11:14:48 2005 From: nm@REDACTED (Gaspar Chilingarov) Date: Fri, 28 Oct 2005 14:14:48 +0500 Subject: (was licensing issues) hm, sorry, my fault ;) In-Reply-To: <17249.57031.656322.958880@antilipe.corelatus.se> References: <4361D6F5.5000408@web.am> <17249.57031.656322.958880@antilipe.corelatus.se> Message-ID: <4361EC08.30605@web.am> Matthias Lang wrote: > Gaspar Chilingarov writes: > > > I wonder are there any legal issues with selling products build with > > erlang? Does it require commertial license or it is only for support, > > patches & etc mentioned on erlang.se site? > > Here is what the FAQ has to say on the subject: > > | The Open Source Erlang Licence is essentially the Mozilla (Netscape) > | Public Licence with a few modifications to make it compatible with > | Swedish law. > | > | As far as I understand, this means you can obtain Erlang for free, use > | it to build cool systems and sell them without Ericsson coming around > | to charge you money. For an authoritative statement, you'll need a > | lawyer. > > The actual licence is in the file "EPLICENCE" at the top of the > distribution. It can also be read here: > > http://www.erlang.org/EPLICENSE > > Here is what the FAQ doesn't say, but I wish it did: > > | There is a fee for posting questions to the erlang > | mailing list without first making a reasonable attempt to > | find the answer yourself, for instance by checking the FAQ. That > | fee is one pint of beer for each person in attendance at the > | next Erlounge you attend. ;-) > > Matthias > -- Gaspar Chilingarov System Administrator t +37491 419763 (mob) t +37410 240399 (office) w www.web.am i 63174784 e nm@REDACTED From heinrich@REDACTED Fri Oct 28 11:21:27 2005 From: heinrich@REDACTED (Heinrich Venter) Date: Fri, 28 Oct 2005 11:21:27 +0200 Subject: Inets HTTP client stability Message-ID: >I would probably opt at yaws/ibrowse or a simple gen_tcp. Why not the standard inets httpd/http? I will not be serving actual web pages. Instead it will only be used for http based protocols. Yaws seems a bit of overkill for something like this. -]-[einrich From nm@REDACTED Fri Oct 28 11:44:13 2005 From: nm@REDACTED (Gaspar Chilingarov) Date: Fri, 28 Oct 2005 14:44:13 +0500 Subject: parse external files -- SOLVED In-Reply-To: References: <59301.217.113.1.123.1130451955.squirrel@webmail.web.am> Message-ID: <4361F2ED.9090108@web.am> >> On 27 Oct 2005, at 23:25, Gaspar Chilingarov wrote: >> Hi all! >> >> I need to have files in plaintext format, describing some forms >> functionality - >> which i need to load, parse and generate html from them. >> >> files will look like this: >> >> {form, personalinfo, >> [ {firstname, string}, >> {lastname, string}, >> {submit, button} >> ], >> fun >> (List) -> validateForm(List) >> end >> } >> >> >> so, I need them parse info valid erlkang terms - tuples, lists, funs, >> etc. >> I understand , that such functionality already is in library :) but , >> hm, I've >> missed where ) > Sean Hinde wrote: > (dcr@REDACTED)25> {ok, B, _}=erl_scan:string(A). > {ok,[{'{',1}, > {atom,1,form}, > {',',1}, > {atom,1,personalinfo}, > {',',1}, > {'[',2}, > etc... > > (dcr@REDACTED)28> erl_parse:parse_exprs(B ++ [{dot,1}]). > {ok,[{tuple,1, > [{atom,1,form}, > {atom,1,personalinfo}, > {cons,2, > {tuple,2,[{atom,2,firstname},{atom,2,string}]}, > {cons,3, > {tuple,3,[{atom,3,lastname},{atom,3,string}]}, > {cons,4,{tuple,4,[{atom,4|...},{atom|...}]}, > {nil,5}}}}, > {'fun',6, > {clauses,[{clause,7, > [{var,7,'List'}], > [], > [{call,7,{atom|...}, [...]}]}]}}]}]} > I should do one more step -- just call erl_eval:exprs/2 on result, returned from erl_parse:parse_exprs so whole code shoudl look like this - toErlangStructure(Text) -> {ok, Tokens, _} = erl_scan:string(Text), {ok, ParsedForm} = erl_parse:parse_exprs(Tokens), Bindings = erl_eval:new_bindings(), {value, ErlangTerms, _NewBinding} = erl_eval:exprs(ParsedForm, Bindings), ErlangTerms. some binding processign should be done, of course, but in general that's it :) thanks all for replies. -- Gaspar Chilingarov System Administrator t +37491 419763 (mob) t +37410 240399 (office) w www.web.am i 63174784 e nm@REDACTED From cyberdanx@REDACTED Fri Oct 28 11:47:41 2005 From: cyberdanx@REDACTED (Chris Campbell) Date: Fri, 28 Oct 2005 10:47:41 +0100 Subject: Erlang/OTP R10B-8 has been released In-Reply-To: <20051027185636.GO12411@delora.autosys.us> References: <435FD4AA.1020503@hyber.org> <17248.53189.452146.809679@alkaid.it.uu.se> <20051027185636.GO12411@delora.autosys.us> Message-ID: I just built it on Ubuntu Breezy too and tried the script Claes posted. No problems with it at all... danx@REDACTED:~/tmp/otp_src_R10B-8$ erlgdb [snip] ERLGDB RUNNING Breakpoint 1 at 0x8065cfc: file sys/unix/erl_main.c, line 28. [Thread debugging using libthread_db enabled] [New Thread -1210304832 (LWP 12784)] [Switching to Thread -1210304832 (LWP 12784)] Breakpoint 1, main (argc=4, argv=0xbfd9c984) at sys/unix/erl_main.c:28 28 erl_start(argc, argv); (gdb) bt #0 main (argc=4, argv=0xbfd9c984) at sys/unix/erl_main.c:28 > Oh, dear. My "Ubuntu release 5.10" is not breaking, so I do not know > what I could do to help. Let me know, though, if there is something > I can do to help. It's possible the libc problem is 'fixed' in Breezy (if that is the problem). danx@REDACTED:~/tmp/otp_src_R10B-8$ uname -a Linux arwen 2.6.12-9-686 #1 Mon Oct 10 13:25:32 BST 2005 i686 GNU/Linux danx@REDACTED:~/tmp/otp_src_R10B-8$ cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 31 model name : AMD Athlon(tm) 64 Processor 3200+ stepping : 0 cpu MHz : 1005.110 cache size : 512 KB fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 1 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow lahf_lm bogomips : 1990.65 > *Because*, my new "desktop of choice" is Ubuntu distro (as you may know, > based on Debian), and I would like to have it be a "first class" Erlang > platform because I am now doing all my development on the new laptop. > I have been using SuSE for years and just switched to Ubuntu because > I was concerned what Novell might do with SuSE. The Ubuntu installed > easily and "everything" just works on my Dell 700m. (except movies; > I keep getting "codec not installed" for whatever movie format I try > and since watching vids is *so* far down on my list, I haven't > seriously done troubleshooting for that issue). apt-get install win32codecs. <-- legally dubious depending on location. you might need to add backports to repository, not sure. There's an FAQ on the ubuntu wiki. Chris From klacke@REDACTED Fri Oct 28 12:42:18 2005 From: klacke@REDACTED (Claes Wikstrom) Date: Fri, 28 Oct 2005 12:42:18 +0200 Subject: Inets HTTP client stability In-Reply-To: References: Message-ID: <4362008A.2020509@hyber.org> Heinrich Venter wrote: >>I would probably opt at yaws/ibrowse or a simple gen_tcp. > > Why not the standard inets httpd/http? > I will not be serving actual web pages. Instead it will only be used > for http based protocols. Yaws seems a bit of overkill for something > like this. If your're not serving webpages, you don't need a webserver - thus yaws isn't needed. There are (to my knowledge) 2 http clients avilable for erlang. - inets that come with otp, I've tried to use it a couple of times but found it unstable and not ok. - ibrowse from jungerl, just fine /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From martin@REDACTED Fri Oct 28 13:46:05 2005 From: martin@REDACTED (Martin Carlson) Date: Fri, 28 Oct 2005 12:46:05 +0100 (BST) Subject: Inets HTTP client stability In-Reply-To: References: Message-ID: If you looking for passing http requests from one end to another, why not use a pure tcp based solution, you can still inspect the data and headers. I can't see any real reason to parse the protocol pass it through the system then assemble it again. The reason i suggest yaws is that it is known to handle high volumes. I been doing some work with inets and from my point of view it is a messy beast. Martin ------------------------- Martin Carlson www.erlang-consulting.com On Fri, 28 Oct 2005, Heinrich Venter wrote: >> I would probably opt at yaws/ibrowse or a simple gen_tcp. > Why not the standard inets httpd/http? > I will not be serving actual web pages. Instead it will only be used > for http based protocols. Yaws seems a bit of overkill for something > like this. > > -]-[einrich > From matthias@REDACTED Fri Oct 28 13:10:10 2005 From: matthias@REDACTED (Matthias Lang) Date: Fri, 28 Oct 2005 13:10:10 +0200 Subject: Inets HTTP client stability In-Reply-To: References: Message-ID: <17250.1810.946124.670129@antilipe.corelatus.se> Martin Carlson writes: > If you looking for passing http requests from one end to another, > why not use a pure tcp based solution, you can still inspect the > data and headers. I can't see any real reason to parse the protocol > pass it through the system then assemble it again. Without getting into the details of what needs to be parsed and what doesn't need to be parsed, it's probably worth spending a few minutes playing with the undocumented {packet, http} format in gen_tcp. Matthias From sean.hinde@REDACTED Fri Oct 28 14:09:02 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Fri, 28 Oct 2005 13:09:02 +0100 Subject: Inets HTTP client stability In-Reply-To: <17250.1810.946124.670129@antilipe.corelatus.se> References: <17250.1810.946124.670129@antilipe.corelatus.se> Message-ID: <2FD0C2D8-A457-40E6-AB7F-1466022ABE5E@gmail.com> On 28 Oct 2005, at 12:10, Matthias Lang wrote: > Martin Carlson writes: > > >> If you looking for passing http requests from one end to another, >> why not use a pure tcp based solution, you can still inspect the >> data and headers. I can't see any real reason to parse the protocol >> pass it through the system then assemble it again. >> > > Without getting into the details of what needs to be parsed and what > doesn't need to be parsed, it's probably worth spending a few minutes > playing with the undocumented {packet, http} format in gen_tcp. > > Matthias > There is a tutorial on this subject at trapexit.org. If you look at the tutorial then try to spot the bug in the implementation there ! Sean From ulf.wiger@REDACTED Fri Oct 28 14:08:01 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 28 Oct 2005 14:08:01 +0200 Subject: parse external files -- which library files call ? Message-ID: Martin Carlson > You are probably looking for file:consult or file:eval. Agreed, but don't forget file:script(). It does the same thing as file:eval(), but returns the value of the last expression, rather than just 'ok'. A nice way to generate data to be read later using file:consult() is io:format(FileDescr, "~p.~n", [Term]), alt. lists:foreach(fun(X) -> io:format(FD, "~p~n", [X]) end, Terms). /Uffe From mikpe@REDACTED Fri Oct 28 14:32:41 2005 From: mikpe@REDACTED (Mikael Pettersson) Date: Fri, 28 Oct 2005 14:32:41 +0200 Subject: Erlang/OTP R10B-8 has been released In-Reply-To: References: <435FD4AA.1020503@hyber.org> <17248.53189.452146.809679@alkaid.it.uu.se> <20051027185636.GO12411@delora.autosys.us> Message-ID: <17250.6761.103898.546273@alkaid.it.uu.se> Chris Campbell writes: > I just built it on Ubuntu Breezy too and tried the script Claes > posted. No problems with it at all... That's two positives for Ubuntu, and I've received positive confirmation for SuSE as well in private email. So Gentoo is the only distribution where things are known to be broken. If someone were to write a shell script test to detect a Gentoo system then I could use that to prevent breaking Erlang/OTP for Gentoo users on x86. /Mikael From thomasl_erlang@REDACTED Fri Oct 28 14:37:11 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Fri, 28 Oct 2005 05:37:11 -0700 (PDT) Subject: Quote Message-ID: <20051028123711.76767.qmail@web34408.mail.mud.yahoo.com> Is Erlang becoming politically correct? Has the world gone mad? (from an overview of OOPSLA'05): "I have no idea whether X10's approach is correct, after all I'm a muppet when it comes to concurrency, but language based approaches to the problem seems interesting. (I'd better mention Erlang before the reproachful emails begin.) " -- Martin Fowler http://martinfowler.com/bliki/OOPSLA2005.html Best, Thomas __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From ft@REDACTED Fri Oct 28 14:54:21 2005 From: ft@REDACTED (Fredrik Thulin) Date: Fri, 28 Oct 2005 14:54:21 +0200 Subject: Erlang/OTP R10B-8 has been released In-Reply-To: <17250.6761.103898.546273@alkaid.it.uu.se> References: <17250.6761.103898.546273@alkaid.it.uu.se> Message-ID: <200510281454.21449.ft@it.su.se> On Friday 28 October 2005 14.32, Mikael Pettersson wrote: > Chris Campbell writes: > > I just built it on Ubuntu Breezy too and tried the script Claes > > posted. No problems with it at all... > > That's two positives for Ubuntu, and I've received positive > confirmation for SuSE as well in private email. So Gentoo is > the only distribution where things are known to be broken. Lunar Linux (your $random distribution ;) ) has the same problem. Have to compile without HiPE. /Fredrik From t.punter@REDACTED Fri Oct 28 15:15:06 2005 From: t.punter@REDACTED (Punter, H.T.) Date: Fri, 28 Oct 2005 15:15:06 +0200 Subject: VVSS2005 - Call for Participation and Posters Message-ID: <9F38CF35D80CAE409B979F3EB5242B4A036EE059@winex2.campus.tue.nl> Dear Mr/Mrs, VVSS2005 is the 2nd European Symposium about Verification and Validation of Software Systems (also known as Software Testing). It will take place on 24th of November 2005 in Eindhoven, the Netherlands. Herewith we invite you to register for the VVSS2005 symposium as well as to submit a Poster for the Poster session (still open). VVSS2005 offers you 30 presentations, 2 keynote presentations, a tool exhibition and poster sessions to get an overall picture of the most recent developments in Verification and Validation (V&V). There will be presentations of (Test)Experts from e.g., Atos Origin, Collis, Deloitte, Gartner, Ordina & Sogeti as well as from top-3 testing tool vendors: Compuware, Mercury and IBM Rational. Furthermore, V&V-researchers from a.o. Fraunhofer Gesellschaft, CEA List, KU Leuven will be available for you. Normal the entrance will be ? 195,-. But as you register before the first of November the entrance will be ? 150,-. ? See for further details about the online program and registration www.laquso.com/VVSS2005/ ? Receive the full-color program brochure by post by sending an e-mail to vvss2005@REDACTED (with in body your name, post address and the text "send brochure"). VVSS2005 is organized by LaQuSo - the Laboratory for Quality Software, a cooperation of Technische Universiteit Eindhoven and Radboud Universiteit Nijmegen. With this symposium LaQuSo intends to provide you with an independent forum of national as well as international speakers where innovations in testing are presented. Presentations address academics as well as practitioners. Extension of deadline for Poster submission: Submitting a Poster to VVSS2005 Poster session is still possible. Please submit a one-page long abstract to be included in the Proceedings. Works in progress, Ph.D. summaries, experience reports, and system descriptions are welcome. For further information please contact: - Teade Punter (t.punter@REDACTED) or - Marko van Eekelen (marko@REDACTED) Please submit your abstract to vvss2005@REDACTED Date: 24 November 2005 Place: Auditorium, Technische Universiteit Eindhoven, the Netherlands Program and registration: www.laquso.com/VVSS2005/ Information: vvss2005@REDACTED Looking forward to welcome you in Eindhoven on 24th of November. LaQuSo ? Laboratory for Quality Software P.S. apologies for multiple copies. From erlang@REDACTED Fri Oct 28 16:39:19 2005 From: erlang@REDACTED (Michael McDaniel) Date: Fri, 28 Oct 2005 07:39:19 -0700 Subject: Erlang/OTP R10B-8 has been released In-Reply-To: <17250.6761.103898.546273@alkaid.it.uu.se> References: <435FD4AA.1020503@hyber.org> <17248.53189.452146.809679@alkaid.it.uu.se> <20051027185636.GO12411@delora.autosys.us> <17250.6761.103898.546273@alkaid.it.uu.se> Message-ID: <20051028143918.GR12411@delora.autosys.us> On Fri, Oct 28, 2005 at 02:32:41PM +0200, Mikael Pettersson wrote: > Chris Campbell writes: > > I just built it on Ubuntu Breezy too and tried the script Claes > > posted. No problems with it at all... > > That's two positives for Ubuntu, and I've received positive > confirmation for SuSE as well in private email. So Gentoo is > the only distribution where things are known to be broken. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I've used various releases of Erlang with various releases of SuSE since April 2004 with no problems. Production boxes are running on SuSE. ~Michael > > If someone were to write a shell script test to detect a > Gentoo system then I could use that to prevent breaking > Erlang/OTP for Gentoo users on x86. > > /Mikael From rickard.s.green@REDACTED Sat Oct 29 00:37:43 2005 From: rickard.s.green@REDACTED (Rickard Green) Date: Sat, 29 Oct 2005 00:37:43 +0200 Subject: catch link(Pid) when trapping exits In-Reply-To: References: <435FEB18.3060707@erlang-consulting.com> <43609F22.4010406@erlang-consulting.com> <43615B8E.1090402@telia.com> Message-ID: <4362A837.7000406@ericsson.com> No, this behavior was there before R9B, e.g. R5B01: /usr/local/otp/releases/otp_beam_sunos5_r5b01_patched/bin/erl Erlang (BEAM) emulator version 4.8.2.8 Eshell V4.8.2.8 (abort with ^G) 1> catch link(pid(0,1234,0)). {'EXIT',{noproc,{shell,evaluator,[link,[<0.1234.0>]]}}} 2> process_flag(trap_exit,true). false 3> catch link(pid(0,1234,0)). true 4> flush(). Shell got {'EXIT',<0.1234.0>,noproc} ok 5> It was introduced before OTP. I had a quick look at the R1 code and it was present there too. Regards, Rickard Green, Erlang/OTP Raimo Niskanen wrote: > robert.virding@REDACTED (Robert Virding) writes: > > I have dug into the archives... > > This was introduced fairly recently, in R9B, in conjunction > with the rewrite for more than 255 remote nodes. > > We will look into this and decide what to do. > > >>No, no, no it should definitely NOT return error(noproc). >> >>The reason is that the whole process communication mechanism, >>including links, was originally designed to be asynchronous on the >>sending side. Sending a message is asychronous, ou don't wait in the >>send to find out if it arrived. Link/1 works the same way. The call >>does not wait until the link is set up but just sends the request and >>continues. If the process does not exist the caller is notified by a >>noproc exit signal from the non-existent process (yes I know but from >>who else could it receive it?). >> >>The important point is that in bothe cases the call is >>asynchronous. This also means, mostly importantly, that both calls >>function the same way irrespective of whether the other process is >>local or remote. This was also an original goal. >> >>If this has significantly changed since then then someone has missed >>the original intentions. >> >>Robert >> >> >>Francesco Cesarini (Erlang Training & Consulting) wrote: >> >> >>>>It is all there, really. Only it was written before exceptions >>>>were invented as a concept in Erlang, uses the term >>>>"exit signal" in a confusing way and lies about "does not fail". >>>>Ok, it is maybe dead wrong, but the intention was right. >>>>So, what happens is: >>>> >>>>link(Pid) -> true if Pid exists or the caller has >>>> process_flag(trap_exit, true). >>>> error(noproc) otherwise >>>> >>>>The enclosing catch evaluates to {'EXIT',{noproc,Stackdump}} >>>>for error(noproc). Weird behaviour, in my opinion.. >>> >>> >>>Exactly my point. Would it not be better to return error(noproc) >>>even if trapping exits instead of exit(Pid, Reason)? >>> >>>Francesco >>>-- >>>http://www.erlang-consulting.com >>> >>> > > From vlad_dumitrescu@REDACTED Sat Oct 29 20:09:08 2005 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Sat, 29 Oct 2005 20:09:08 +0200 Subject: Trapexit and wiki Message-ID: Hi, Just in case nobody noticed, Trapexit isn't working (probably a bad case of access rights flu) and the wiki (erlang.sics.se) has been spammed (but at least the guy was polite, he wrote "Sorry about this" before doing it). regards, Vlad From robert.virding@REDACTED Sun Oct 30 14:10:54 2005 From: robert.virding@REDACTED (Robert Virding) Date: Sun, 30 Oct 2005 14:10:54 +0100 Subject: catch link(Pid) when trapping exits In-Reply-To: References: , <43609F22.4010406@erlang-consulting.com>, <43615B8E.1090402@telia.com> Message-ID: <4364C65E.6080808@telia.com> You have made a modification which goes against fundamental principle (asynchronous message passing and transparency of local remote processes) of the process communication mechanism. We, Joe, Mike and I, probably never wrote down the priinciples but they were there. Although sometimes we aourselves weren't completely consistent either (registered processes). Robert Raimo Niskanen wrote: >robert.virding@REDACTED (Robert Virding) writes: > >I have dug into the archives... > >This was introduced fairly recently, in R9B, in conjunction >with the rewrite for more than 255 remote nodes. > >We will look into this and decide what to do. > > > >>No, no, no it should definitely NOT return error(noproc). >> >>The reason is that the whole process communication mechanism, >>including links, was originally designed to be asynchronous on the >>sending side. Sending a message is asychronous, ou don't wait in the >>send to find out if it arrived. Link/1 works the same way. The call >>does not wait until the link is set up but just sends the request and >>continues. If the process does not exist the caller is notified by a >>noproc exit signal from the non-existent process (yes I know but from >>who else could it receive it?). >> >>The important point is that in bothe cases the call is >>asynchronous. This also means, mostly importantly, that both calls >>function the same way irrespective of whether the other process is >>local or remote. This was also an original goal. >> >>If this has significantly changed since then then someone has missed >>the original intentions. >> >>Robert >> >> >>Francesco Cesarini (Erlang Training & Consulting) wrote: >> >> >> >>>>It is all there, really. Only it was written before exceptions >>>>were invented as a concept in Erlang, uses the term >>>>"exit signal" in a confusing way and lies about "does not fail". >>>>Ok, it is maybe dead wrong, but the intention was right. >>>>So, what happens is: >>>> >>>>link(Pid) -> true if Pid exists or the caller has >>>> process_flag(trap_exit, true). >>>> error(noproc) otherwise >>>> >>>>The enclosing catch evaluates to {'EXIT',{noproc,Stackdump}} >>>>for error(noproc). Weird behaviour, in my opinion.. >>>> >>>> >>>Exactly my point. Would it not be better to return error(noproc) >>>even if trapping exits instead of exit(Pid, Reason)? >>> >>>Francesco >>>-- >>>http://www.erlang-consulting.com >>> >>> >>> >>> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From raimo@REDACTED Mon Oct 31 09:20:38 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 31 Oct 2005 09:20:38 +0100 Subject: catch link(Pid) when trapping exits References: <43615B8E.1090402@telia.com>, , <4362A837.7000406@ericsson.com> Message-ID: Sorry, I read the source wrong. Should have tried instead. It is an old behaviour. rickard.s.green@REDACTED (Rickard Green) writes: > No, this behavior was there before R9B, e.g. R5B01: > > /usr/local/otp/releases/otp_beam_sunos5_r5b01_patched/bin/erl > Erlang (BEAM) emulator version 4.8.2.8 > > Eshell V4.8.2.8 (abort with ^G) > 1> catch link(pid(0,1234,0)). > {'EXIT',{noproc,{shell,evaluator,[link,[<0.1234.0>]]}}} > 2> process_flag(trap_exit,true). > false > 3> catch link(pid(0,1234,0)). > true > 4> flush(). > Shell got {'EXIT',<0.1234.0>,noproc} > ok > 5> > > It was introduced before OTP. I had a quick look at the R1 code and it > was present there too. > > Regards, > Rickard Green, Erlang/OTP > > Raimo Niskanen wrote: > > robert.virding@REDACTED (Robert Virding) writes: > > I have dug into the archives... > > This was introduced fairly recently, in R9B, in conjunction > > with the rewrite for more than 255 remote nodes. > > We will look into this and decide what to do. > > > >>No, no, no it should definitely NOT return error(noproc). > >> > >>The reason is that the whole process communication mechanism, > >>including links, was originally designed to be asynchronous on the > >>sending side. Sending a message is asychronous, ou don't wait in the > >>send to find out if it arrived. Link/1 works the same way. The call > >>does not wait until the link is set up but just sends the request and > >>continues. If the process does not exist the caller is notified by a > >>noproc exit signal from the non-existent process (yes I know but from > >>who else could it receive it?). > >> > >>The important point is that in bothe cases the call is > >>asynchronous. This also means, mostly importantly, that both calls > >>function the same way irrespective of whether the other process is > >>local or remote. This was also an original goal. > >> > >>If this has significantly changed since then then someone has missed > >>the original intentions. > >> > >>Robert > >> > >> > >>Francesco Cesarini (Erlang Training & Consulting) wrote: > >> > >> > >>>>It is all there, really. Only it was written before exceptions > >>>>were invented as a concept in Erlang, uses the term > >>>>"exit signal" in a confusing way and lies about "does not fail". > >>>>Ok, it is maybe dead wrong, but the intention was right. > >>>>So, what happens is: > >>>> > >>>>link(Pid) -> true if Pid exists or the caller has > >>>> process_flag(trap_exit, true). > >>>> error(noproc) otherwise > >>>> > >>>>The enclosing catch evaluates to {'EXIT',{noproc,Stackdump}} > >>>>for error(noproc). Weird behaviour, in my opinion.. > >>> > >>> > >>>Exactly my point. Would it not be better to return error(noproc) > >>>even if trapping exits instead of exit(Pid, Reason)? > >>> > >>>Francesco > >>> -- > >>>http://www.erlang-consulting.com > >>> > >>> > > > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From mbj@REDACTED Fri Oct 28 16:53:22 2005 From: mbj@REDACTED (Martin Bjorklund) Date: Fri, 28 Oct 2005 16:53:22 +0200 (CEST) Subject: Erlang/OTP R10B-8 has been released In-Reply-To: <17250.6761.103898.546273@alkaid.it.uu.se> References: <20051027185636.GO12411@delora.autosys.us> <17250.6761.103898.546273@alkaid.it.uu.se> Message-ID: <20051028.165322.23015994.mbj@tail-f.com> Mikael Pettersson wrote: > Chris Campbell writes: > > I just built it on Ubuntu Breezy too and tried the script Claes > > posted. No problems with it at all... > > That's two positives for Ubuntu, and I've received positive > confirmation for SuSE as well in private email. So Gentoo is > the only distribution where things are known to be broken. Well, it works just fine on my Gentoos (both desktop and laptop)! /martin From mbj@REDACTED Fri Oct 28 16:55:48 2005 From: mbj@REDACTED (Martin Bjorklund) Date: Fri, 28 Oct 2005 16:55:48 +0200 (CEST) Subject: Quote In-Reply-To: <20051028123711.76767.qmail@web34408.mail.mud.yahoo.com> References: <20051028123711.76767.qmail@web34408.mail.mud.yahoo.com> Message-ID: <20051028.165548.03111435.mbj@tail-f.com> Thomas Lindgren wrote: > > Is Erlang becoming politically correct? Don't worry: http://www.lightreading.com/boards/message.asp?msg_id=126203 /martin From renyix1@REDACTED Sat Oct 29 00:37:53 2005 From: renyix1@REDACTED (Renyi Xiong) Date: Fri, 28 Oct 2005 15:37:53 -0700 Subject: clusters In-Reply-To: Message-ID: Hello Joe, If I understand correctly, we need to rebuild the whole mnesia database each time we add a new node pair. Cause the hash key is dependant on the number of nodes. Is that right? Renyi. >From: "Joe Armstrong (AL/EAB)" >To: "Renyi Xiong" >CC: >Subject: RE: clusters >Date: Mon, 24 Oct 2005 09:59:22 +0200 > >Hello Renyi, > >Interesting question - I'll give a short answer (actually why not post this >to the >Erlang list - (to join the list follow the instruction in >http://www.erlang.org/faq.html) > >I've no idea what the windows 2003 clusting service is :-) > >Firstly - let E = # exposed servers. I = # internal servers U = # users > >questions > > - is E + I large > - is U very large (ie outside the mnesia adress space?) > - how many U's/machine do you allocate > >IMHO you can get a long way with a pool of PC's - assume a transaction >takes >50 ms. CPU - then you can do 1,7 M transactions/day. So if we have 1.7 M >users >doing one transaction/day then if each needs (say) 10KB data you'd need 17G >of data. > >ie a low-end PC (1 Gmemory, 2GHz processor, 80 G disk) could easly handle >(say) 1.5M users > >Now you need at least TWO PC's (fault-tolerence) > >So if you make them in pairs each pair can handle 1.5M users - use a >replictaed mnesia >disk/ram table. > >Now you want to scale up ... > >Easy. > >The unit of scaling is the pair I have just described. > >Call these pairs P1, P2, P3, ..... In each pair the machine with the lowest >IP is the >primary - the other is the take-over machine. > >Assume a user makes a HTTP request to the primary in ANY pair - all you now >need to >do is figure out which of the Pairs P1 .. Pn is "the correct machine" (ie >the one that stores their data) - then send them an HTTP re-direct to the >correct machine. > >If the address space is small you can just use a ram-replicated mnesia >table for the >redicrection table. > >If it is very large use consistent hashing. Call the IP address of the >primaries in >in the pairs Ip1, Ip2, ... Ipn. Assume the user Key is K. > >Compute hash values of Ip1, Ip2, ... K using some hash algorithm. Say >md5(X) mod 2^32 > >Call theses IpH1, IpH2, .... KH - now the data corresponding to key K is >found on the >machine with hash IpHk where k is the smallest value in IpHk such that IpHk > > KH > >(look up the "chord" algorithm for details) > >- here's what I'd do > >Phase A > - build a basic pair of processors (as I have described) > - deploy it (it will take some time to get millions of customers) > >Phase B > - when you get more customers build more pairs > - user mnesia and a ram replicated dispatch table > >Phase C > - when you get outside the addressing limits of mnesia (G users) > - make a layer with consistent hashing to replace the mnesia replicated >table > >I hope you make it to C > >/Joe > > > > -----Original Message----- > > From: Renyi Xiong [mailto:renyix1@REDACTED] > > Sent: den 22 oktober 2005 04:54 > > To: Joe Armstrong (AL/EAB) > > Cc: bdoyle@REDACTED > > Subject: > > > > > > Hello Joe, > > > > I'm a programmer working for Brian. I have a question for you > > in terms of > > concurrent programming. > > > > On client side, customers only see fixed number of servers > > based on IP > > addresses. My understanding is these exposed servers are > > listening for > > client requests, dispatching transactions to internal > > variable number of > > ERLANG servers, collecting replies and forwarding them to clients. > > > > So one of our jobs here is to write an ERLANG program to > > implement a kind of > > clustering service or ERLANG already has such kind of server > > included?(like > > WIndows 2003 clustering service?) > > > > Thanks, > > Renyi. > > > > > > From cschatz@REDACTED Sun Oct 30 21:15:22 2005 From: cschatz@REDACTED (Charles F. Schatz) Date: Mon, 31 Oct 2005 09:15:22 +1300 Subject: Bug in odbc app: size-speciifed varchar() and char() not recognised Message-ID: <001301c5dd8e$a85367a0$6001a8c0@linkworks.lan> Using erlang/odbc on win2k with postgreSQL 8.0.4 installed, accessing a database on my local machine or an external machine, an error crops up when issuing a query or describe command for columntypes {sql_char, size()} and {sql_varchar, size()}. Both types are reported as ODBC_UNSUPPORTED_TYPE. This also happens under cygwin on win2k. Configuring ODBC connections under win2k odbc manager, an eight byte integer can be made to show up as a varchar upon fetch, which is correctly recognised by the erlang odbc application. Does anyone out here know what might be the problem? Cheers, Charles F. Schatz From nick@REDACTED Mon Oct 31 09:56:59 2005 From: nick@REDACTED (Niclas Eklund) Date: Mon, 31 Oct 2005 09:56:59 +0100 (MET) Subject: Erlang thesis online (in Finnish) In-Reply-To: Message-ID: Hello! Thanks Jani! I should point out that has Jani contributed a lot to the Erlang/CORBA community by evaluating new features, benchmarking, interoperability tests with other open source ORB:s, suggesting new features etc etc. Thanks again Jani! /Niclas On Thu, 27 Oct 2005, Jani Launonen wrote: > Hello all, > > my diploma thesis "CORBA-v?liohjelmiston vikasietoisuuden lis??minen > passiivisella replikointistrategialla" ("Improving Fault Tolerance of CORBA > Middleware by Passive Replication Strategy") is about changing Orber > internals and taking advantage of Mnesia replication to store CORBA > object's state. The thesis is available online, but is in Finnish, so it > will be just a curiosity to most of the Erlang-list members as I've counted > just a couple of Finnish in the list (hello Jouni, hello Jani H.!). Just in > case there's other Finnish-speaking lurkers around... > > http://www.ee.oulu.fi/~jabba/diplomityo.pdf > > There's abstract in English, but it doesn't tell too much of the dirty > details of course. > > I want to acknowledge especially Niclas Eklund for his great and usually > blindingly fast help concerning Orber basics and internals --- without > Niclas' help my thesis about Orber wouldn't exist! Also big thanks to Dan > Gudmundsson for ansvering Mnesia questions. Naturally everyone involved in > developing Erlang/OTP tools and documentation or anyway improving Erlang > deserve thanks! > > -+-+-+- > Jani Launonen From cyberdanx@REDACTED Mon Oct 31 10:58:13 2005 From: cyberdanx@REDACTED (Chris Campbell) Date: Mon, 31 Oct 2005 09:58:13 +0000 Subject: Erlang Jobs in Scotland? was Re: Erlang In Edinburgh - Saturday 22nd October Message-ID: Hi, I'm just wondering if there were any jobs in Scotland since there was an erlang meet in Edinburgh last week? I graduated in July but decided to have a break before beginning work. It's a long shot, but I just thought I'd ask. Regards, Chris From tobbe@REDACTED Mon Oct 31 11:02:32 2005 From: tobbe@REDACTED (tobbe) Date: Mon, 31 Oct 2005 11:02:32 +0100 Subject: Trapexit and wiki References: Message-ID: <20051031100232.4D42E412CB@bang.trapexit.org> Ok, it is up and running again. Cheers, Tobbe _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From joe.armstrong@REDACTED Mon Oct 31 11:14:07 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Mon, 31 Oct 2005 11:14:07 +0100 Subject: Inets HTTP client stability Message-ID: If you just want to handle HTTP ie parse the protocol and send a response then I have a very simple web server that does this and nothing else: http://www.sics.se/~joe/tutorials/web_server/web_server.html It's three small modules http_driver.erl (converts HTTP messages to erlang terms) tcp_server.erl (handles tcp connections) web_server.erl (a web server) The web server and driver is 326 lines of code (including comments) Also web_server.sh (shell script to start and stop the web_server) I also describe some trickery to ensure that your seb server is started correctly when the system boots (ie what to put in your /etc/rc.d/rc.local ... - this is specific to red-hat - but if you have understood the principles it is easy to modify for any other OS (excepting windoze)) Processing HTTP is *extremely* easy - often *integrating* something like Apache/tomcat/yaws with your application is more difficult that implementing from scratch the sub-set of HTTP that you application will process - in such cases implementation an HTTP parser and a little bit of socket magic will get you up-and-running quicker than the time taken to read the the tomcat/apache/yaws manual. /Joe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Claes Wikstrom > Sent: den 28 oktober 2005 12:42 > To: Heinrich Venter > Cc: erlang-questions@REDACTED > Subject: Re: Inets HTTP client stability > > > Heinrich Venter wrote: > >>I would probably opt at yaws/ibrowse or a simple gen_tcp. > > > > Why not the standard inets httpd/http? > > I will not be serving actual web pages. Instead it will > only be used > > for http based protocols. Yaws seems a bit of overkill for something > > like this. > > If your're not serving webpages, you don't need a webserver - thus > yaws isn't needed. > > There are (to my knowledge) 2 http clients avilable for erlang. > > - inets that come with otp, I've tried to use it a couple of times > but found it unstable and not ok. > > - ibrowse from jungerl, just fine > > > > /klacke > > > -- > Claes Wikstrom -- Caps lock is nowhere and > http://www.hyber.org -- everything is under control > cellphone: +46 70 2097763 > From ulf.wiger@REDACTED Mon Oct 31 09:42:17 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 31 Oct 2005 09:42:17 +0100 Subject: catch link(Pid) when trapping exits Message-ID: Robert Virding wrote: > Although sometimes we aourselves weren't completely consistent either (registered processes). With this I assume that you mean the RegName ! Msg construct? /Uffe -------------- next part -------------- An HTML attachment was scrubbed... URL: From hakan@REDACTED Mon Oct 31 11:43:00 2005 From: hakan@REDACTED (Hakan Mattsson) Date: Mon, 31 Oct 2005 11:43:00 +0100 (CET) Subject: clusters In-Reply-To: References: Message-ID: Take a look at the "linear hashing" algorithm and its relative "linear hashing star". With linear hashing you may add nodes smoothly without rebuilding the entire database. We are using that for fragmented tables in Mnesia: http://erlang.se/doc/doc-5.4.8/lib/mnesia-4.2.2/doc/html/part_frame.html When you add a new fragment you only need to split one of the old fragments, regardless of the total number of existing fragments. If you plan to outgrow Mnesia, it might be a good idea to customize the hash algorithm for fragmented tables with one that fits your needs: http://erlang.se/doc/doc-5.4.8/lib/mnesia-4.2.2/doc/html/application_frame.html I don't know how the "chord" algorithm works, but if it can handle addition of new nodes smoothly, it might be a good candidate for your customized mnesia_frag_hash implementation. /H?kan On Fri, 28 Oct 2005, Renyi Xiong wrote: RX> Date: Fri, 28 Oct 2005 15:37:53 -0700 RX> From: Renyi Xiong RX> To: erlang-questions@REDACTED RX> Cc: joe.armstrong@REDACTED, bdoyle@REDACTED RX> Subject: RE: clusters RX> RX> Hello Joe, RX> RX> If I understand correctly, we need to rebuild the whole mnesia RX> database each time we add a new node pair. Cause the hash key RX> is dependant on the number of nodes. Is that right? RX> RX> Renyi. RX> RX> RX> > From: "Joe Armstrong (AL/EAB)" RX> > To: "Renyi Xiong" RX> > CC: RX> > Subject: RE: clusters RX> > Date: Mon, 24 Oct 2005 09:59:22 +0200 RX> > RX> > Hello Renyi, RX> > RX> > Interesting question - I'll give a short answer (actually why not post RX> > this to the RX> > Erlang list - (to join the list follow the instruction in RX> > http://www.erlang.org/faq.html) RX> > RX> > I've no idea what the windows 2003 clusting service is :-) RX> > RX> > Firstly - let E = # exposed servers. I = # internal servers U = # users RX> > RX> > questions RX> > RX> > - is E + I large RX> > - is U very large (ie outside the mnesia adress space?) RX> > - how many U's/machine do you allocate RX> > RX> > IMHO you can get a long way with a pool of PC's - assume a transaction RX> > takes RX> > 50 ms. CPU - then you can do 1,7 M transactions/day. So if we have 1.7 M RX> > users RX> > doing one transaction/day then if each needs (say) 10KB data you'd need RX> > 17G of data. RX> > RX> > ie a low-end PC (1 Gmemory, 2GHz processor, 80 G disk) could easly handle RX> > (say) 1.5M users RX> > RX> > Now you need at least TWO PC's (fault-tolerence) RX> > RX> > So if you make them in pairs each pair can handle 1.5M users - use a RX> > replictaed mnesia RX> > disk/ram table. RX> > RX> > Now you want to scale up ... RX> > RX> > Easy. RX> > RX> > The unit of scaling is the pair I have just described. RX> > RX> > Call these pairs P1, P2, P3, ..... In each pair the machine with the RX> > lowest IP is the RX> > primary - the other is the take-over machine. RX> > RX> > Assume a user makes a HTTP request to the primary in ANY pair - all you RX> > now need to RX> > do is figure out which of the Pairs P1 .. Pn is "the correct machine" (ie RX> > the one that stores their data) - then send them an HTTP re-direct to the RX> > correct machine. RX> > RX> > If the address space is small you can just use a ram-replicated mnesia RX> > table for the RX> > redicrection table. RX> > RX> > If it is very large use consistent hashing. Call the IP address of the RX> > primaries in RX> > in the pairs Ip1, Ip2, ... Ipn. Assume the user Key is K. RX> > RX> > Compute hash values of Ip1, Ip2, ... K using some hash algorithm. Say RX> > md5(X) mod 2^32 RX> > RX> > Call theses IpH1, IpH2, .... KH - now the data corresponding to key K is RX> > found on the RX> > machine with hash IpHk where k is the smallest value in IpHk such that RX> > IpHk > KH RX> > RX> > (look up the "chord" algorithm for details) RX> > RX> > - here's what I'd do RX> > RX> > Phase A RX> > - build a basic pair of processors (as I have described) RX> > - deploy it (it will take some time to get millions of customers) RX> > RX> > Phase B RX> > - when you get more customers build more pairs RX> > - user mnesia and a ram replicated dispatch table RX> > RX> > Phase C RX> > - when you get outside the addressing limits of mnesia (G users) RX> > - make a layer with consistent hashing to replace the mnesia RX> > replicated table RX> > RX> > I hope you make it to C RX> > RX> > /Joe RX> > RX> > RX> > > -----Original Message----- RX> > > From: Renyi Xiong [mailto:renyix1@REDACTED] RX> > > Sent: den 22 oktober 2005 04:54 RX> > > To: Joe Armstrong (AL/EAB) RX> > > Cc: bdoyle@REDACTED RX> > > Subject: RX> > > RX> > > RX> > > Hello Joe, RX> > > RX> > > I'm a programmer working for Brian. I have a question for you RX> > > in terms of RX> > > concurrent programming. RX> > > RX> > > On client side, customers only see fixed number of servers RX> > > based on IP RX> > > addresses. My understanding is these exposed servers are RX> > > listening for RX> > > client requests, dispatching transactions to internal RX> > > variable number of RX> > > ERLANG servers, collecting replies and forwarding them to clients. RX> > > RX> > > So one of our jobs here is to write an ERLANG program to RX> > > implement a kind of RX> > > clustering service or ERLANG already has such kind of server RX> > > included?(like RX> > > WIndows 2003 clustering service?) RX> > > RX> > > Thanks, RX> > > Renyi. From klacke@REDACTED Mon Oct 31 12:39:44 2005 From: klacke@REDACTED (Claes Wikstom) Date: Mon, 31 Oct 2005 12:39:44 +0100 Subject: Inets HTTP client stability In-Reply-To: References: Message-ID: <43660280.7020808@hyber.org> Joe Armstrong (AL/EAB) wrote: > > Processing HTTP is *extremely* easy - ..... I'd like to state the opposite - Processing HTTP is very hard since HTTP is a complex protocol. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From richardc@REDACTED Mon Oct 31 13:04:52 2005 From: richardc@REDACTED (Richard Carlsson) Date: Mon, 31 Oct 2005 13:04:52 +0100 Subject: Nicer error messages Message-ID: <43660864.8080408@csd.uu.se> Here is a smallish hack (attached diff) which improves the readability of error messages in the Erlang shell. As an example: Eshell V5.5 (abort with ^G) 1> 17 ++ []. =ERROR REPORT==== 31-Oct-2005::12:42:16 === Error in process <0.30.0> with exit value: {badarg,[{erlang,'++',[17,[]]},{erl_eval,eval_op,3},{erl_eval,expr,5},{shell,exprs,6},{shell,eval_loop,3}]} ** exited: badarg ** in function erlang:'++'/2 called as '++'(17,[]) in call from erl_eval:eval_op/3 in call from erl_eval:expr/5 in call from shell:exprs/6 in call from shell:eval_loop/3 2> (Note that the =ERROR REPORT=... part of the above is printed by the error logger, not the shell, and is not affected by this hack.) The OTP folks weren't too keen on including this, so I'm posting it here. Let's see if you like it enough to make them change their mind. /Richard ---- "Having users is like optimization: the wise course is to delay it." -- Paul Graham -------------- next part -------------- A non-text attachment was scrubbed... Name: shell.diff Type: text/x-patch Size: 2318 bytes Desc: not available URL: From heinrich@REDACTED Mon Oct 31 13:24:25 2005 From: heinrich@REDACTED (Heinrich Venter) Date: Mon, 31 Oct 2005 14:24:25 +0200 Subject: Inets HTTP client stability Message-ID: >Joe Armstrong (AL/EAB) wrote: >> Processing HTTP is *extremely* easy - ..... Klacke wrote >I'd like to state the opposite - Processing HTTP is very hard since HTTP is a complex protocol. I suspect both statements are true. If you know the behavior of the clients you will be talking to, it should be very easy to just do something sockety and have it done with. If on the other hand you don't know the nature of the clients, a lot of weird and wonderful things can happen (like chunking, not quite conformant packets etc) I have decided to go with inets httpd because: - I don't know the nature of the clients, except that in general they will not be browsers, so I expect wierdnes - In future I might have to support SOAP. The only (mostly) working SAOP interface has an inets:httpd module already written. For the outgoing client: - My demands on the client will be simple GET/POST requests - The responses on the requests in general will be simple It might be worth while to do a simple sockety thing for the client instead of using inets or ibrowse. But since I already have inets as part of the picture, I might as well use what it offers. Just to give a clearer idea of what I am trying to do: I am writing a gateway application that will expose an http interface to some of our internal systems. It will accept incoming messages as GET/POST and pass the data to our application. The applicatino may independantly generate messages that need to be delivered to a host that exposes a similar http interface. In other words, the external in and out interfaces are http, while the internal interfaces will be Erlang messages among others. There is a need for some internal queueing in the gateway to prevent flooding. -]-[einrich From ulf.wiger@REDACTED Mon Oct 31 13:30:12 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 31 Oct 2005 13:30:12 +0100 Subject: Quote Message-ID: That one was different, at least! "Tons of groups forced to write software in Erlang"... It's amazing how people's perspectives can differ. (: And here I was thinking that people who didn't want to program in Erlang had lots of different places to choose from. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of > Martin Bjorklund > Sent: den 28 oktober 2005 16:56 > To: thomasl_erlang@REDACTED > Cc: erlang-questions@REDACTED > Subject: Re: Quote > > Thomas Lindgren wrote: > > > > Is Erlang becoming politically correct? > > Don't worry: > > http://www.lightreading.com/boards/message.asp?msg_id=126203 > > > > /martin > From hakan@REDACTED Mon Oct 31 13:36:24 2005 From: hakan@REDACTED (Hakan Mattsson) Date: Mon, 31 Oct 2005 13:36:24 +0100 (CET) Subject: clusters In-Reply-To: References: Message-ID: On Mon, 31 Oct 2005, Hakan Mattsson wrote: HM> Date: Mon, 31 Oct 2005 11:43:00 +0100 (CET) HM> From: Hakan Mattsson HM> To: Renyi Xiong HM> Cc: erlang-questions@REDACTED, joe.armstrong@REDACTED, bdoyle@REDACTED HM> Subject: RE: clusters HM> HM> HM> Take a look at the "linear hashing" algorithm and its HM> relative "linear hashing star". With linear hashing you HM> may add nodes smoothly without rebuilding the entire HM> database. HM> HM> We are using that for fragmented tables in Mnesia: HM> HM> http://erlang.se/doc/doc-5.4.8/lib/mnesia-4.2.2/doc/html/part_frame.html Both links in my previous post was intended to point into individual pages and not the enclosing frames. Here it should be a link to: http://erlang.se/doc/doc-5.4.8/lib/mnesia-4.2.2/doc/html/Mnesia_App_D.html#11 HM> HM> When you add a new fragment you only need to split one HM> of the old fragments, regardless of the total number of HM> existing fragments. HM> HM> If you plan to outgrow Mnesia, it might be a good idea HM> to customize the hash algorithm for fragmented tables HM> with one that fits your needs: HM> HM> http://erlang.se/doc/doc-5.4.8/lib/mnesia-4.2.2/doc/html/application_frame.html and here a link to: http://erlang.se/doc/doc-5.4.8/lib/mnesia-4.2.2/doc/html/mnesia_frag_hash.html /H?kan HM> HM> I don't know how the "chord" algorithm works, but if it HM> can handle addition of new nodes smoothly, it might be a HM> good candidate for your customized mnesia_frag_hash HM> implementation. HM> HM> /H?kan HM> HM> On Fri, 28 Oct 2005, Renyi Xiong wrote: HM> HM> RX> Date: Fri, 28 Oct 2005 15:37:53 -0700 HM> RX> From: Renyi Xiong HM> RX> To: erlang-questions@REDACTED HM> RX> Cc: joe.armstrong@REDACTED, bdoyle@REDACTED HM> RX> Subject: RE: clusters HM> RX> HM> RX> Hello Joe, HM> RX> HM> RX> If I understand correctly, we need to rebuild the whole mnesia HM> RX> database each time we add a new node pair. Cause the hash key HM> RX> is dependant on the number of nodes. Is that right? HM> RX> HM> RX> Renyi. HM> RX> HM> RX> HM> RX> > From: "Joe Armstrong (AL/EAB)" HM> RX> > To: "Renyi Xiong" HM> RX> > CC: HM> RX> > Subject: RE: clusters HM> RX> > Date: Mon, 24 Oct 2005 09:59:22 +0200 HM> RX> > HM> RX> > Hello Renyi, HM> RX> > HM> RX> > Interesting question - I'll give a short answer (actually why not post HM> RX> > this to the HM> RX> > Erlang list - (to join the list follow the instruction in HM> RX> > http://www.erlang.org/faq.html) HM> RX> > HM> RX> > I've no idea what the windows 2003 clusting service is :-) HM> RX> > HM> RX> > Firstly - let E = # exposed servers. I = # internal servers U = # users HM> RX> > HM> RX> > questions HM> RX> > HM> RX> > - is E + I large HM> RX> > - is U very large (ie outside the mnesia adress space?) HM> RX> > - how many U's/machine do you allocate HM> RX> > HM> RX> > IMHO you can get a long way with a pool of PC's - assume a transaction HM> RX> > takes HM> RX> > 50 ms. CPU - then you can do 1,7 M transactions/day. So if we have 1.7 M HM> RX> > users HM> RX> > doing one transaction/day then if each needs (say) 10KB data you'd need HM> RX> > 17G of data. HM> RX> > HM> RX> > ie a low-end PC (1 Gmemory, 2GHz processor, 80 G disk) could easly handle HM> RX> > (say) 1.5M users HM> RX> > HM> RX> > Now you need at least TWO PC's (fault-tolerence) HM> RX> > HM> RX> > So if you make them in pairs each pair can handle 1.5M users - use a HM> RX> > replictaed mnesia HM> RX> > disk/ram table. HM> RX> > HM> RX> > Now you want to scale up ... HM> RX> > HM> RX> > Easy. HM> RX> > HM> RX> > The unit of scaling is the pair I have just described. HM> RX> > HM> RX> > Call these pairs P1, P2, P3, ..... In each pair the machine with the HM> RX> > lowest IP is the HM> RX> > primary - the other is the take-over machine. HM> RX> > HM> RX> > Assume a user makes a HTTP request to the primary in ANY pair - all you HM> RX> > now need to HM> RX> > do is figure out which of the Pairs P1 .. Pn is "the correct machine" (ie HM> RX> > the one that stores their data) - then send them an HTTP re-direct to the HM> RX> > correct machine. HM> RX> > HM> RX> > If the address space is small you can just use a ram-replicated mnesia HM> RX> > table for the HM> RX> > redicrection table. HM> RX> > HM> RX> > If it is very large use consistent hashing. Call the IP address of the HM> RX> > primaries in HM> RX> > in the pairs Ip1, Ip2, ... Ipn. Assume the user Key is K. HM> RX> > HM> RX> > Compute hash values of Ip1, Ip2, ... K using some hash algorithm. Say HM> RX> > md5(X) mod 2^32 HM> RX> > HM> RX> > Call theses IpH1, IpH2, .... KH - now the data corresponding to key K is HM> RX> > found on the HM> RX> > machine with hash IpHk where k is the smallest value in IpHk such that HM> RX> > IpHk > KH HM> RX> > HM> RX> > (look up the "chord" algorithm for details) HM> RX> > HM> RX> > - here's what I'd do HM> RX> > HM> RX> > Phase A HM> RX> > - build a basic pair of processors (as I have described) HM> RX> > - deploy it (it will take some time to get millions of customers) HM> RX> > HM> RX> > Phase B HM> RX> > - when you get more customers build more pairs HM> RX> > - user mnesia and a ram replicated dispatch table HM> RX> > HM> RX> > Phase C HM> RX> > - when you get outside the addressing limits of mnesia (G users) HM> RX> > - make a layer with consistent hashing to replace the mnesia HM> RX> > replicated table HM> RX> > HM> RX> > I hope you make it to C HM> RX> > HM> RX> > /Joe HM> RX> > HM> RX> > HM> RX> > > -----Original Message----- HM> RX> > > From: Renyi Xiong [mailto:renyix1@REDACTED] HM> RX> > > Sent: den 22 oktober 2005 04:54 HM> RX> > > To: Joe Armstrong (AL/EAB) HM> RX> > > Cc: bdoyle@REDACTED HM> RX> > > Subject: HM> RX> > > HM> RX> > > HM> RX> > > Hello Joe, HM> RX> > > HM> RX> > > I'm a programmer working for Brian. I have a question for you HM> RX> > > in terms of HM> RX> > > concurrent programming. HM> RX> > > HM> RX> > > On client side, customers only see fixed number of servers HM> RX> > > based on IP HM> RX> > > addresses. My understanding is these exposed servers are HM> RX> > > listening for HM> RX> > > client requests, dispatching transactions to internal HM> RX> > > variable number of HM> RX> > > ERLANG servers, collecting replies and forwarding them to clients. HM> RX> > > HM> RX> > > So one of our jobs here is to write an ERLANG program to HM> RX> > > implement a kind of HM> RX> > > clustering service or ERLANG already has such kind of server HM> RX> > > included?(like HM> RX> > > WIndows 2003 clustering service?) HM> RX> > > HM> RX> > > Thanks, HM> RX> > > Renyi. From sean.hinde@REDACTED Mon Oct 31 13:55:31 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Mon, 31 Oct 2005 12:55:31 +0000 Subject: Broken gen:call/3? Message-ID: <75E64A82-E2B7-4B0D-8BCC-2831DCCD67F6@gmail.com> Hi, This behaviour seems broken to me: 1. One process is linked to another (for supervision reasons), and a gen_*:call/2 synchronous request is made from one to the other. 2. The called process crashes while handling the call. 3. gen:call consumes *both* it's own monitor 'DOWN' message *and* the 'EXIT' message arising from the link Result: calling process doesn't get 'EXIT' message, and hence doesn't know about the crash. It does not then function well as a supervisor... Sean From raimo@REDACTED Mon Oct 31 15:18:47 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 31 Oct 2005 15:18:47 +0100 Subject: Broken gen:call/3? References: <75E64A82-E2B7-4B0D-8BCC-2831DCCD67F6@gmail.com> Message-ID: Aaah, well, yes.. This is an old flaw. Once upon a time there were only links to supervise other processes, so the only way to know if a server died during a library call e.g inside gen_server:call after sending the request while receiving the response, was that an 'EXIT' message was received instead; and then the library code for gen_server:call would have to trap exit messages and set a link to the server. But that can not be done by library code, since there can be only one link between any pair of processes. Possibly exit message trapping could be done, but there is a time window after receive before disabling exit message trapping that can not be controlled, so the library code can not be sure to not accidentally convert a link exit to an exit message. So, it was then designed so that _if_ the calling process had activated exit message trapping _and_ set a link to the server, then the gen_server:call could receive the 'EXIT' message and return an error code as a result of the server call. Later, when monitors was introduced we could not change the behaviour of gen_server:call to not consume 'EXIT' messages at all (which would be the right(TM) way, in the precence of monitors); the result would be passing undesired 'EXIT' messages onto old calling applications. So, there we are today. The calling process should check the result from gen_server:call plus receive 'EXIT' messages. Or set a monitor of its own. sean.hinde@REDACTED (Sean Hinde) writes: > Hi, > > This behaviour seems broken to me: > > 1. One process is linked to another (for supervision reasons), and a > gen_*:call/2 synchronous request is made from one to the other. > > 2. The called process crashes while handling the call. > > 3. gen:call consumes *both* it's own monitor 'DOWN' message *and* the > 'EXIT' message arising from the link > > Result: calling process doesn't get 'EXIT' message, and hence doesn't > know about the crash. It does not then function well as a supervisor... > > Sean -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From sean.hinde@REDACTED Mon Oct 31 15:53:31 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Mon, 31 Oct 2005 14:53:31 +0000 Subject: Broken gen:call/3? In-Reply-To: References: <75E64A82-E2B7-4B0D-8BCC-2831DCCD67F6@gmail.com> Message-ID: <2F0F0ECD-3C52-4D94-9180-52C4BDAC5606@gmail.com> Indeed ! I wonder how much code there is out there which is currently broken because the author did not realise this happens vs code which would be broken if it was changed. My guess, based on the assumption that people would expect to have to handle 'EXIT' messages if they have chosen to link, is that this behaviour hides many more latent bugs than would be introduced if it were changed.. Sean On 31 Oct 2005, at 14:18, Raimo Niskanen wrote: > Aaah, well, yes.. This is an old flaw. > > Once upon a time there were only links to supervise other > processes, so the only way to know if a server died during > a library call e.g inside gen_server:call after sending > the request while receiving the response, was that an > 'EXIT' message was received instead; and then the library > code for gen_server:call would have to trap exit messages > and set a link to the server. > > But that can not be done by library code, since there can > be only one link between any pair of processes. Possibly > exit message trapping could be done, but there is a time > window after receive before disabling exit message trapping > that can not be controlled, so the library code can not > be sure to not accidentally convert a link exit to an > exit message. > > So, it was then designed so that _if_ the calling process > had activated exit message trapping _and_ set a link to the > server, then the gen_server:call could receive the 'EXIT' > message and return an error code as a result of the server call. > > Later, when monitors was introduced we could not change > the behaviour of gen_server:call to not consume 'EXIT' > messages at all (which would be the right(TM) way, in > the precence of monitors); the result would be passing > undesired 'EXIT' messages onto old calling applications. > > So, there we are today. The calling process should check > the result from gen_server:call plus receive 'EXIT' messages. > Or set a monitor of its own. > > sean.hinde@REDACTED (Sean Hinde) writes: > > >> Hi, >> >> This behaviour seems broken to me: >> >> 1. One process is linked to another (for supervision reasons), and a >> gen_*:call/2 synchronous request is made from one to the other. >> >> 2. The called process crashes while handling the call. >> >> 3. gen:call consumes *both* it's own monitor 'DOWN' message *and* the >> 'EXIT' message arising from the link >> >> Result: calling process doesn't get 'EXIT' message, and hence doesn't >> know about the crash. It does not then function well as a >> supervisor... >> >> Sean >> > > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > From cyberlync@REDACTED Mon Oct 31 21:25:27 2005 From: cyberlync@REDACTED (Eric Merritt) Date: Mon, 31 Oct 2005 12:25:27 -0800 Subject: Undocumented {packet,http} and gen_tcp:recv/3 timeout Message-ID: Guys, I am play with Sean's code from 'A fast web server demonstrating some undocumented Erlang features' over at trapexit. As I have been playing with this I have come across something I have a question about. The gen_tcp:recv/3 will wait until the set timeout unless headers are sent with the request. Is this the correct behavior? Is the proper way to handle this to set some low value for the timeout argument? Thanks for your input, Eric