From j.khaldi@REDACTED Mon May 10 11:02:58 2004 From: j.khaldi@REDACTED (JK) Date: Mon, 10 May 2004 11:02:58 +0200 Subject: Delphi on the client and Erlang on the server Message-ID: Hi All, did somebody write something to use a Delphi application on the client connected to an application server written in Erlang. Just not to begin from zero. Thanks! // jilani -- Jilani Khaldi http://jkhaldi.oltrelinux.com http://www.archsf.org From j.khaldi@REDACTED Mon May 10 11:03:06 2004 From: j.khaldi@REDACTED (JK) Date: Mon, 10 May 2004 11:03:06 +0200 Subject: Erlang, Strings, Mnesia? In-Reply-To: References: <4075674E.9000309@cableone.net> Message-ID: On Thu, 08 Apr 2004 23:43:20 +0200, Ulf Wiger wrote: > On Thu, 08 Apr 2004 09:53:02 -0500, Jimmie Houchin > wrote: > >> Hello, >> >> I am trying to understand whether or not Erlang is right or a good >> option for a website I am building. >> >> Currently I am processing 422,000 files with 6.6gb of text to place in a >> database. I will have to regularly parse and process large volumes of >> textual data. > > I guess that mySql would do a better job in this case. Even Firebird (http://www.ibphoenix.com) and Ruby (http://www.ruby- lang.org/en/) are eccellent tools to do the job. // jilani -- Jilani Khaldi http://jkhaldi.oltrelinux.com http://www.archsf.org From dustin@REDACTED Sat May 1 11:09:26 2004 From: dustin@REDACTED (Dustin Sallings) Date: Sat, 1 May 2004 02:09:26 -0700 Subject: fsm and networks Message-ID: <3EEEC020-9B4F-11D8-86D0-000A957659CC@spy.net> I'm implementing a process that speaks the postgres FE/BE protocol. gen_fsm seemed like the right thing to do, but I'm having a problem that's leading me to believe I'm doing something wrong. Postgres' protocol is one in which the client speaks first, so I basically do the following in my init/1: ok = gen_tcp:send(Socket, makeString(Announcement)), {ok, connected, #pginfo{conninfo=Conninfo, socket=Socket, sstat=dict:new()}}. From there, I get a message via handle_info/3, which I deal with in the following way: handle_info({tcp, _Port, Data}, State, Info) -> handle_packet(Data, State, Info). dealWithRemaining([Type|Data], State, Info) -> gen_fsm:send_event(self(), {data_arrived, Type, Data}); dealWithRemaining([], _State, _Info) -> []. handle_packet([Type|Data], State, Info) -> {Len, Rest} = getInt32(Data), {FullData, Extra} = getAllData(Len-4, Rest, Info), assert(length(FullData)+4 == Len, "Incorrect data length"), dealWithRemaining(Extra, State, Info), handle_packet(Type, Len, FullData, State, Info). This works just fine except in a couple of circumstances. For one, I don't quite know how to tell (or preferably wait until) I'm in the right state to issue queries. I am not ready after init is finished. The server will send me an authentication request of some sort, I respond (via a handle_packet/5), and the server sends a few more things over and eventually a command letting me know it's ready to accept queries. Ideally, init could block while this stuff occurs, but a variety of commands could arrive before the server's ready. Similarly, I have the following: execute(Fsm, Query) -> gen_fsm:sync_send_event(Fsm,{execute,Query}). and its corresponding ready_for_query({execute, Query}, Pid, Info) -> io:format("Executing query: ~p~n", [Query]), ok = gen_tcp:send(Info#pginfo.socket, [$Q|makeString(Query ++ "\0")]), {reply, ok, query_pending, Info}. I'm not sure how to go about getting the results from this query. Right now, I just return, and let the handle_packet/5 print out the various stuff the DB sends back. Any ideas on how to do this stuff? -- SPY My girlfriend asked me which one I like better. pub 1024/3CAE01D5 1994/11/03 Dustin Sallings | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE L_______________________ I hope the answer won't upset her. ____________ From vances@REDACTED Sat May 1 19:09:05 2004 From: vances@REDACTED (Vance Shipley) Date: Sat, 1 May 2004 13:09:05 -0400 Subject: fsm and networks In-Reply-To: <3EEEC020-9B4F-11D8-86D0-000A957659CC@spy.net> References: <3EEEC020-9B4F-11D8-86D0-000A957659CC@spy.net> Message-ID: <20040501170905.GE15716@frogman.motivity.ca> On Sat, May 01, 2004 at 02:09:26AM -0700, Dustin Sallings wrote: } } I don't quite know how to tell (or preferably wait until) I'm in the } right state to issue queries. I am not ready after init is finished. } The server will send me an authentication request of some sort, I } respond (via a handle_packet/5), and the server sends a few more things } over and eventually a command letting me know it's ready to accept } queries. Ideally, init could block while this stuff occurs, but a } variety of commands could arrive before the server's ready. Your FSM isn't really an FSM when you don't track state. The following may seem inefficient but it solves your problem: init(Args) -> ... {ok, wait_for_auth, StateData}. wait_for_auth(Packet, StateData) -> ... {next_state, wait_for_queries, StateData}. wait_for_queries(Packet, StateData) -> ... {next_state, wait_for_queries, StateData}. handle_info({tcp, _Port, Packet}, StateName, StateData) -> gen_fsm:send_event(self(), Packet), {next_state, StateName, StateData}. } Similarly, I have the following: } } execute(Fsm, Query) -> } gen_fsm:sync_send_event(Fsm,{execute,Query}). } } and its corresponding } } ready_for_query({execute, Query}, Pid, Info) -> } io:format("Executing query: ~p~n", [Query]), } ok = gen_tcp:send(Info#pginfo.socket, [$Q|makeString(Query ++ } "\0")]), } {reply, ok, query_pending, Info}. } } I'm not sure how to go about getting the results from this query. } Right now, I just return, and let the handle_packet/5 print out the } various stuff the DB sends back. execute(Fsm, Query) -> gen_fsm:sync_send_event(Fsm, Query). wait_for_queries(Query, From, StateData) -> gen_tcp:send(...), % store From in NewStateData {next_state, wait_for_queries, NewStateData}. wait_for_queries(ReplyPacket, StateData) -> ... % find appropriate From in StateData gen_fsm:reply(From, Reply), {next_state, wait_for_queries, StateData}; -Vance From dustin@REDACTED Mon May 3 02:24:27 2004 From: dustin@REDACTED (Dustin Sallings) Date: Sun, 2 May 2004 17:24:27 -0700 Subject: fsm and networks In-Reply-To: <20040501170905.GE15716@frogman.motivity.ca> References: <3EEEC020-9B4F-11D8-86D0-000A957659CC@spy.net> <20040501170905.GE15716@frogman.motivity.ca> Message-ID: <3CDBA89B-9C98-11D8-992A-000A957659CC@spy.net> On May 1, 2004, at 10:09, Vance Shipley wrote: > Your FSM isn't really an FSM when you don't track state. Hmm...I guess I'm a bit confused, then. Is gen_fsm not good for this task? I imagined there would be a few different states: connected -- first connected, but not authenticated authenticated -- connected and authenticated ready_for_query -- you know, ready for a query query_pending -- a query has been issued and results are coming back The state is changed by the server (connected is initial state). Postgres has a command that arrives from the back end indicating the state. query_pending is the exception in that it's client-driven, but the server will send a message indicating when it's ready for queries again. This is primarily an exercise in learning OTP, but hey, I need a postgres driver, too and I've always wanted to implement the protocol. I can get two out of three without OTP, but I figured I'd go for three. -- SPY My girlfriend asked me which one I like better. pub 1024/3CAE01D5 1994/11/03 Dustin Sallings | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE L_______________________ I hope the answer won't upset her. ____________ From dustin@REDACTED Mon May 3 04:16:48 2004 From: dustin@REDACTED (Dustin Sallings) Date: Sun, 2 May 2004 19:16:48 -0700 Subject: build problem on IRIX 6.2 Message-ID: I've fixed a few C problems with building on IRIX (moving stuff around to make it valid C). I got the thing built, but I'm getting an error as soon as it tries to start building .erl files: erlc -W -bbeam +debug_info -I../include -o../ebin application.erl (no error logger present) error: Error in process <0.3.0> with exit value: {{,{'EXIT',no_heart}},[{heart,init,2}]} Any clues? Is IRIX really that heartless? -- SPY My girlfriend asked me which one I like better. pub 1024/3CAE01D5 1994/11/03 Dustin Sallings | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE L_______________________ I hope the answer won't upset her. ____________ From anders_nygren2002@REDACTED Mon May 3 04:31:16 2004 From: anders_nygren2002@REDACTED (Anders Nygren) Date: Sun, 02 May 2004 21:31:16 -0500 Subject: Building on SuSE 9.0 Message-ID: <4095AEF4.4080102@yahoo.se> Hi I am trying to build R9C on SuSE 9.0 and get the following error. cd erts/emulator && ERL_TOP=/usr/local/src/otp_src_R9C-0 make generate depend make[1]: Entering directory `/usr/local/src/otp_src_R9C-0/erts/emulator' LANG=C /usr/bin/perl utils/beam_makeops -outdir i686-pc-linux-gnu \ -emulator /usr/local/src/otp_src_R9C-0/lib/compiler/src/genop.tab beam/ops.tab hipe/hipe_ops.tab LANG=C /usr/bin/perl utils/make_tables -src i686-pc-linux-gnu -include i686-pc-linux-gnu beam/atom.names beam/bif.tab hipe/hipe_bif0.tab hipe/hipe_bif1.tab hipe/hipe_bif2.tab LANG=C /usr/bin/perl utils/make_version -o i686-pc-linux-gnu/erl_version.h 5.3 i686-pc-linux-gnu LANG=C /usr/bin/perl utils/make_driver_tab -o i686-pc-linux-gnu/driver_tab.c /usr/local/src/otp_src_R9C-0/erts/obj.beam/i686-pc-linux-gnu/efile_drv.o /usr/local/src/otp_src_R9C-0/erts/obj.beam/i686-pc-linux-gnu/ddll_drv.o /usr/local/src/otp_src_R9C-0/erts/obj.beam/i686-pc-linux-gnu/inet_drv.o /usr/local/src/otp_src_R9C-0/erts/obj.beam/i686-pc-linux-gnu/zlib_drv.o /usr/local/src/otp_src_R9C-0/erts/obj.beam/i686-pc-linux-gnu/ram_file_drv.o /usr/local/src/otp_src_R9C-0/erts/obj.beam/i686-pc-linux-gnu/ttsl_drv.o LANG=C /usr/bin/perl utils/make_preload -old /usr/local/src/otp_src_R9C-0/lib/kernel/ebin/otp_ring0.beam /usr/local/src/otp_src_R9C-0/lib/kernel/ebin/init.beam /usr/local/src/otp_src_R9C-0/lib/kernel/ebin/prim_inet.beam /usr/local/src/otp_src_R9C-0/lib/kernel/ebin/prim_file.beam /usr/local/src/otp_src_R9C-0/lib/kernel/ebin/erl_prim_loader.beam /usr/local/src/otp_src_R9C-0/lib/kernel/ebin/erlang.beam > i686-pc-linux-gnu/preload.c LANG=C /usr/bin/perl utils/make_alloc_types -src beam/erl_alloc.types -dst i686-pc-linux-gnu/opt/erl_alloc_types.h hipe unix m4 -DTARGET=i686-pc-linux-gnu hipe/hipe_x86_asm.m4 > i686-pc-linux-gnu/hipe_x86_asm.h gcc -g -O3 -I/usr/local/src/otp_src_R9C-0/erts/ -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes -DHIPE_ARCHITECTURE=x86 -Ibeam -Isys/unix -Isys/common -Ii686-pc-linux-gnu -Ii686-pc-linux-gnu/opt -Izlib -Ihipe -c hipe/hipe_mkliterals.c -o /usr/local/src/otp_src_R9C-0/erts/obj.beam/i686-pc-linux-gnu/hipe_mkliterals.o hipe/hipe_mkliterals.c:10:20: config.h: No such file or directory make[1]: *** [/usr/local/src/otp_src_R9C-0/erts/obj.beam/i686-pc-linux-gnu/hipe_mkliterals.o] Error 1 make[1]: Leaving directory `/usr/local/src/otp_src_R9C-0/erts/emulator' make: *** [depend] Error 2 So a config.h is missing, what config.h do I have linux:/usr/local/src/otp_src_R9C-0 # find . -name config.h ./lib/erl_interface/src/i686-pc-linux-gnu/config.h ./lib/erl_interface/src/config.h ./erts/i686-pc-linux-gnu/config.h Any Ideas what is missing? /Anders Nygren From Arnaud.Gotlieb@REDACTED Mon May 3 09:44:13 2004 From: Arnaud.Gotlieb@REDACTED (Arnaud Gotlieb) Date: Mon, 03 May 2004 09:44:13 +0200 Subject: Deadlines of the 6 satellite workshops of ICLP'04 (held in Saint-Malo, France) Message-ID: <4095F84D.5080608@irisa.fr> Please distribute and accept our apologies if you receive multiple copies ******************************************************* Dear all, The deadlines for submission of papers to the six satellite workshops of the 20th INTERNATIONAL CONFERENCE ON LOGIC PROGRAMMING ( http://www.irisa.fr/manifestations/2004/ICLP04 ) are now approaching. Cordially, Arnaud Gotlieb (Publicity chair ICLP'04) Satellite workshops CICLOPS'04 : Colloquium on Implementation of Constraint and LOgic Programming Systems http://clip.dia.fi.upm.es/Conferences/CICLOPS-2004/ Workshop Coordination : Manuel Carro : mcarro@REDACTED Submission deadline : May 7, 2004 COLOPS'04 : 2nd International Workshop on COnstraint & LOgic Programming in Security http://www.info.ucl.ac.be/people/fsp/colops2004/ Workshop Coordination : Frank Valencia : Frank.Valencia@REDACTED Submission deadline : June 27, 2004 MultiCPL'04 : 3rd International Workshop on Multiparadigm Constraint Programming Languages http://uebb.cs.tu-berlin.de/MultiCPL04/ Workshop Coordination : Petra Hofstedt : ph@REDACTED Submission deadline : May 9, 2004 TeachLP'04 : First International Workshop on Teaching Logic Programming http://www.ida.liu.se/~ulfni/teachLP2004/ Workshop Coordination : Dietmar Seipel : seipel@REDACTED Submission deadline : June 20, 2004 WLPE'04 : 14th Workshop on Logic Programming Environments http://clip.dia.fi.upm.es/Conferences/WLPE04/ Workshop Coordination : Susana Mu?oz-Hern?ndez : susana@REDACTED Jos? Manuel G?mez-Perez : jgomez@REDACTED Submission deadline : May 7, 2004 PPSWR'04 : Principles and Practice of Semantic Web Reasoning http://www.pms.informatik.uni-muenchen.de/PPSWR04 Workshop Coordination : Hans J?rgen Ohlbach, (program chair) : ohlbach@REDACTED Sebastian Schaffert, (proceedings chair) : wastl@REDACTED Submission deadline : May 15, 2004 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony@REDACTED Mon May 3 10:40:55 2004 From: tony@REDACTED (Tony Rogvall) Date: Mon, 03 May 2004 10:40:55 +0200 Subject: compiler bug In-Reply-To: <20040429.133244.129321451.mbj@bluetail.com> References: <20040429.133244.129321451.mbj@bluetail.com> Message-ID: <1083573655.9256.2.camel@bulldog> On Thu, 2004-04-29 at 13:32, Martin Bjorklund wrote: > Hi, > > Found this on R9B and R9C. Maybe known already... > > Consider this module: > > Hello ? Hello ? Any one? Is there a patch? this looks like serious stuff! /Tony > -module(x). > -compile(export_all). > > -record(state, {ena = true}). > > y() -> > spawn_link(?MODULE, loop, [#state{}]). > > loop(S) -> > receive > _ when S#state.ena == false -> > io:format("here 1\n"), > loop(S); > test -> > io:format("here 2\n"), > loop(S); > X -> > io:format("here 3 ~p\n", [X]), > loop(S) > end. > > Sending 'test' to this process should print "here 2". But: > > 9> P=x:y(). > <0.53.0> > 10> P ! test. > here 3 true > test > > > NOTE that the X argument has been bound to the value of 'ena' in the > record! If you look at the x.S file, you'll see the problem... > > > /martin > > > > > From mikpe@REDACTED Mon May 3 11:45:24 2004 From: mikpe@REDACTED (Mikael Pettersson) Date: Mon, 3 May 2004 11:45:24 +0200 (MEST) Subject: build problem on IRIX 6.2 Message-ID: <200405030945.i439jOQq016525@harpo.it.uu.se> On Sun, 2 May 2004 19:16:48 -0700, Dustin Sallings wrote: > I've fixed a few C problems with building on IRIX (moving stuff around >to make it valid C). I got the thing built, but I'm getting an error >as soon as it tries to start building .erl files: > >erlc -W -bbeam +debug_info -I../include -o../ebin application.erl >(no error logger present) error: Error in process <0.3.0> with exit >value: {{,{'EXIT',no_heart}},[{heart,init,2}]} I don't know whether IRIX 6.2 is an old or new release, but having to fix C problems is not a good sign. Your best bet is probably to install gcc and try again using the original non-hacked sources. gcc-3.3.3, gcc-3.2.3, and gcc-2.95.3 should all work; gcc-3.0.x is known to be broken. Installing updated GNU make and perl wouldn't hurt either. From mikpe@REDACTED Mon May 3 11:44:51 2004 From: mikpe@REDACTED (Mikael Pettersson) Date: Mon, 3 May 2004 11:44:51 +0200 (MEST) Subject: Building on SuSE 9.0 Message-ID: <200405030944.i439ipnH016520@harpo.it.uu.se> On Sun, 02 May 2004 21:31:16 -0500, Anders Nygren wrote: >I am trying to build R9C on SuSE 9.0 and get the following >error. ... >gcc -g -O3 -I/usr/local/src/otp_src_R9C-0/erts/ -DHAVE_CONFIG_H -Wall >-Wstrict-prototypes -Wmissing-prototypes -DHIPE_ARCHITECTURE=x86 -Ibeam >-Isys/unix -Isys/common -Ii686-pc-linux-gnu -Ii686-pc-linux-gnu/opt >-Izlib -Ihipe -c hipe/hipe_mkliterals.c -o >/usr/local/src/otp_src_R9C-0/erts/obj.beam/i686-pc-linux-gnu/hipe_mkliterals.o >hipe/hipe_mkliterals.c:10:20: config.h: No such file or directory >make[1]: *** >[/usr/local/src/otp_src_R9C-0/erts/obj.beam/i686-pc-linux-gnu/hipe_mkliterals.o] >Error 1 >make[1]: Leaving directory `/usr/local/src/otp_src_R9C-0/erts/emulator' >make: *** [depend] Error 2 The missing config.h is supposed to be generated at the end of the ./configure step. Either you didn't execute ./configure before make, or your system is broken somehow. From bjorn@REDACTED Mon May 3 11:57:58 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 03 May 2004 11:57:58 +0200 Subject: compiler bug In-Reply-To: <1083573655.9256.2.camel@bulldog> References: <20040429.133244.129321451.mbj@bluetail.com> <1083573655.9256.2.camel@bulldog> Message-ID: I've found the bug and I have a preliminary correction. There will be a patch for the commercial customers first, and then the correction will be included in OTP-R9C-1. /Bjorn Tony Rogvall writes: > On Thu, 2004-04-29 at 13:32, Martin Bjorklund wrote: > > Hi, > > > > Found this on R9B and R9C. Maybe known already... > > > > Consider this module: > > > > > Hello ? Hello ? > > Any one? Is there a patch? this looks like serious stuff! > > /Tony > > > > -module(x). > > -compile(export_all). > > > > -record(state, {ena = true}). > > > > y() -> > > spawn_link(?MODULE, loop, [#state{}]). > > > > loop(S) -> > > receive > > _ when S#state.ena == false -> > > io:format("here 1\n"), > > loop(S); > > test -> > > io:format("here 2\n"), > > loop(S); > > X -> > > io:format("here 3 ~p\n", [X]), > > loop(S) > > end. > > > > Sending 'test' to this process should print "here 2". But: > > > > 9> P=x:y(). > > <0.53.0> > > 10> P ! test. > > here 3 true > > test > > > > > > NOTE that the X argument has been bound to the value of 'ena' in the > > record! If you look at the x.S file, you'll see the problem... > > > > > > /martin > > > > > > > > > > > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From dustin@REDACTED Mon May 3 19:55:19 2004 From: dustin@REDACTED (Dustin Sallings) Date: Mon, 3 May 2004 10:55:19 -0700 Subject: build problem on IRIX 6.2 In-Reply-To: <200405030945.i439jOQq016525@harpo.it.uu.se> References: <200405030945.i439jOQq016525@harpo.it.uu.se> Message-ID: <0AD834B2-9D2B-11D8-83DC-000393CFE6B8@spy.net> On May 3, 2004, at 2:45, Mikael Pettersson wrote: > I don't know whether IRIX 6.2 is an old or new release, but > having to fix C problems is not a good sign. Your best bet > is probably to install gcc and try again using the original > non-hacked sources. gcc-3.3.3, gcc-3.2.3, and gcc-2.95.3 > should all work; gcc-3.0.x is known to be broken. This was my first computer, so it's pretty old. :) I was kind of hoping to avoid having to install gcc since I've gone so many years without it. Well, that and I'm not really sure how much I care about erlang on this system yet. :) > Installing updated GNU make and perl wouldn't hurt either. otp won't even begin to build without gnu make, it seems. I think I've got a recent perl on that machine, but I don't know for sure. I've got it built on my Macs, NetBSD machines, and Solaris 8 box, though. That should get me going. -- Dustin Sallings From jelia04@REDACTED Mon May 3 16:29:07 2004 From: jelia04@REDACTED (JELIA'04) Date: Mon, 3 May 2004 15:29:07 +0100 Subject: JELIA'04 - Deadline Reminder Message-ID: /------------------------------------------------------------------/ DEADLINE REMINDER 9th European Conference on Logics in Artificial Intelligence JELIA'04 Lisbon, Portugal, September 27-30 http://centria.di.fct.unl.pt/~jelia2004 Submission deadline: May 9th (abstracts due May 6th) /------------------------------------------------------------------/ From dustin@REDACTED Mon May 3 23:11:46 2004 From: dustin@REDACTED (Dustin Sallings) Date: Mon, 3 May 2004 14:11:46 -0700 Subject: gen_event and multiple handler ``instances'' Message-ID: <7C6B8300-9D46-11D8-83DC-000393CFE6B8@spy.net> I'm making my away around the OTP modules (it seems that I need just about every one of them for a simple application I'm writing) and I've got a question regarding gen_event. It seems that gen_event doesn't want you to have multiple handlers from the same module registered. I was hoping for something more like NSNotificationCenter (if you're familiar with Objective C) where I could register something more like a process. Does something exist that is more suited to my needs? Essentially, my app consists of a multicast listener that watches for environmental data updates on my network and transforms those into events. I have another process that is a TCP listener that accepts connections and sends the updates across it, essentially transforming the local multicast to TCP unicast. I thought I could get away with the following: init([Socket|Args]) -> error_logger:info_msg("Starting event handler with: ~p~n", [Socket]), {ok, Socket}. This does seem to do what I want, but it's unclear to me how I'd go about deleting the handler when the socket disconnects: 3> gen_event:which_handlers(temp_listener_events). [lemp_handler,lemp_handler] Currently, I just let the handler crash and get a giant error message, but it seems like there would be a better way. Any ideas? -- Dustin Sallings From vances@REDACTED Mon May 3 23:57:32 2004 From: vances@REDACTED (Vance Shipley) Date: Mon, 3 May 2004 17:57:32 -0400 Subject: gen_event and multiple handler ``instances'' In-Reply-To: <7C6B8300-9D46-11D8-83DC-000393CFE6B8@spy.net> References: <7C6B8300-9D46-11D8-83DC-000393CFE6B8@spy.net> Message-ID: <20040503215732.GI18911@frogman.motivity.ca> Dustin, When you add a handler you may specify an identifier so that you can address a specific instance of a handler: gen_event:add_handler(temp_listener_events, {lemp_handler, 1}, Args) gen_event:add_handler(temp_listener_events, {lemp_handler, foo}, Args) gen_event:which_handler(temp_listener_events). [{lemp_handler, 1}, {lemp_handler, foo}] -Vance On Mon, May 03, 2004 at 02:11:46PM -0700, Dustin Sallings wrote: } } It seems that gen_event doesn't want you to have multiple handlers } from the same module registered. I was hoping for something more like } NSNotificationCenter (if you're familiar with Objective C) where I } could register something more like a process. Does something exist } that is more suited to my needs? From yerl@REDACTED Tue May 4 00:35:15 2004 From: yerl@REDACTED (yerl@REDACTED) Date: Tue, 4 May 2004 00:35:15 CEST Subject: Install Crypto API Problem Message-ID: Hi All, I got some problems when trying to use the crypto api provided by otp. This is what I try: $ erl Erlang (BEAM) emulator version 5.3 [source] [hipe] [threads:0] Eshell V5.3 (abort with ^G) 1> crypto:start(). ** exited: {undef,[{crypto,start,[]}, {erl_eval,do_apply,5}, {shell,eval_loop,2}]} ** 2> I installed Erlang with OpenSSL >= 0.9.7. See attached file (configure.log). Need Help!! Any ideas? Regards, Yerl -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: configure.log URL: From robert.virding@REDACTED Tue May 4 00:38:51 2004 From: robert.virding@REDACTED (Robert Virding) Date: Tue, 4 May 2004 00:38:51 +0200 Subject: user-defined operators References: Message-ID: <00d001c4315f$68b282c0$8200a8c0@Rovir> Now that the argument seems to have died down, although it has only gone a month, I can come along with my opinion. I think we should add user-defined operators of the type: Arg1 `op` Arg2 --> op(Arg1, Arg2) `op` Arg --> op(Arg) This is what have understood the basic suggestion to be, if I am wrong then tell me gently. It is really just syntactic sugar so I don't really see what the problem is. At the moment I don't realy see the need for it, but who knows after a year. I think the only interesting question is when the transformation should be made, immediately so you don't see the original operator version or later. But this is just details. !! I don't like because it is too much a special case of something general. Robert ----- Original Message ----- From: "Hakan Mattsson" To: "Richard A. O'Keefe" Cc: Sent: Friday, April 02, 2004 10:54 AM Subject: Re: user-defined operators > On Fri, 2 Apr 2004, Richard A. O'Keefe wrote: > > > operation. It's a function d--nit! > > > Then what the h**l is the point of opposing them? > > > Well, gee, if I wasn't already taking that for granted, there would be > > Please, drop this infected thread. > > /H?kan > > > > > From robert.virding@REDACTED Tue May 4 00:45:08 2004 From: robert.virding@REDACTED (Robert Virding) Date: Tue, 4 May 2004 00:45:08 +0200 Subject: basic questions regarding message sequence guarantees... References: <0HWN00DM3KQEV5@gsbims.uchicago.edu> <409042D1.8050103@theheartofgold.org> Message-ID: <012201c43160$48f90fc0$8200a8c0@Rovir> It's quite easy to describe a case where this could happen. N.B. the BEAM does not *define* the Erlang semantics, it (hopefully) just not break them. Robert ----- Original Message ----- From: "Anders Ramsell" To: Sent: Thursday, April 29, 2004 1:48 AM Subject: Re: basic questions regarding message sequence guarantees... > > Kris Prieb wrote: > > 2.) Now suppose ?B? is monitoring ?A?. Suppose also that another > > process ?C? is monitoring ?A? and that a ?Down? message from ?A? to ?C? > > will trigger ?C? to send a message to ?B.? > > > > My understanding is that Erlang does _/not/_ guarantee that A?s ?Down? > > message to B will arrive before C?s message to B. Is this correct? > > > > I have been thinking of asking about a variation of this question > myself. In my scenario a process A first sends a message 'first' to a > process B. After that it sends another message 'second' to an > intermediary process C. When the process C receives the 'second' message > and only then it will send a message 'second' to process B. > > In this scenario we know that two messages are sent from process A. Not > just one of them. We also know in what order those messages are sent and > that each message sent from process A will result in exactly one message > being recieved by process B. > > Is it really possible in this scenario for the message 'second' to be > recieved by the process B before it receives the message 'first'? > > A C B > | | | > | | |----> | (received second) > | | | | > | first | | | > | ------------------------------------> | (received first) > | second | | | > | ----------------> | (received | | > | | second) | | > | | -----------| | > | | | > > > It seems funny that a detour can end up being a shortcut. > > In some cases it could be useful to know (if that is in fact the case) > that the order of the messages 'first' and 'second' in the above > scenario will be preserved. > > Of course if in fact such a guarantee can be made it seems to me that it > would be broken by (almost?) any change to the scenario. I.e. not > knowing or changing the order of the sends from process A, process C > sending a 'second' message to process B without receiving one from > process A, etc. But now I'm rambling... > > -- > Anders Ramsell > > From dustin@REDACTED Tue May 4 00:48:25 2004 From: dustin@REDACTED (Dustin Sallings) Date: Mon, 3 May 2004 15:48:25 -0700 Subject: gen_event and multiple handler ``instances'' In-Reply-To: <20040503215732.GI18911@frogman.motivity.ca> References: <7C6B8300-9D46-11D8-83DC-000393CFE6B8@spy.net> <20040503215732.GI18911@frogman.motivity.ca> Message-ID: On May 3, 2004, at 14:57, Vance Shipley wrote: > When you add a handler you may specify an identifier so that > you can address a specific instance of a handler: > > gen_event:add_handler(temp_listener_events, {lemp_handler, 1}, Args) > gen_event:add_handler(temp_listener_events, {lemp_handler, foo}, > Args) > > gen_event:which_handler(temp_listener_events). > [{lemp_handler, 1}, {lemp_handler, foo}] I apologize for cluttering up this list, I've really got to get better at reading these docs as the man page does say that and it solves my problem perfectly. Thanks a lot! -- Dustin Sallings From goran.bage@REDACTED Tue May 4 09:12:35 2004 From: goran.bage@REDACTED (Goran Bage) Date: Tue, 04 May 2004 09:12:35 +0200 Subject: www.erlang.org Message-ID: <40974263.70801@mobilearts.se> Has Ericsson cut outside access to www.erlang.org off again or is it gone for some other reason? -- -- Goran ------------------------- May the Snow be with you ---- Goran Bage, MobileArts, www.mobilearts.se Tj?rhovsgatan 56, SE-116 28 Stockholm, Sweden email:goran.bage@REDACTED, phone: +46 733 358405 From fredrik.linder@REDACTED Tue May 4 13:40:59 2004 From: fredrik.linder@REDACTED (Fredrik Linder) Date: Tue, 4 May 2004 13:40:59 +0200 Subject: mnesia doc + rdbms Message-ID: Hi OTP Folks and Ulf Wiger, OTP Folks: I just noticed that the documentation of mensia:activity/X does not mension that also the foldl, foldr and select functions need to be implemented in the ActivityMod. (H) Ulf Wiger: The same issue but for rdbms. :-) Do you have any plans, or ideas of how to implement this? Cheers /Fredrik From ulf.wiger@REDACTED Tue May 4 13:54:46 2004 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Tue, 04 May 2004 13:54:46 +0200 Subject: mnesia doc + rdbms In-Reply-To: References: Message-ID: On Tue, 4 May 2004 13:40:59 +0200, Fredrik Linder wrote: > Hi OTP Folks and Ulf Wiger, > > OTP Folks: I just noticed that the documentation of mensia:activity/X > does not mension that also the foldl, foldr and select functions need to > be implemented in the ActivityMod. > (H) > Ulf Wiger: The same issue but for rdbms. :-) Do you have any plans, or > ideas of how to implement this? I didn't, until now. (: I'll look into it, but won't commit to any schedule. /Uffe -- Ulf Wiger From etalle@REDACTED Tue May 4 08:58:45 2004 From: etalle@REDACTED (Sandro Etalle) Date: Tue, 4 May 2004 08:58:45 +0200 (MEST) Subject: LOPSTR'04 call for papers (extended deadlines!) Message-ID: <200405040658.i446wjK28226@demeter.cs.utwente.nl> LOPSTR 2004 Verona, Italy, August 26-28, 2004 http://www.sci.univr.it/~lopstr04 CALL FOR PAPERS ******** EXTENDED DEADLINES ******* full papers: May 7, 2004 extended abstracts: May 17, 2004 The aim of the LOPSTR series is to stimulate and promote international research and collaboration on logic-based program development, and the workshop is open to contributions in logic-based program development in any language paradigm. Starting this year, LOPSTR will put extra emphasis to the field of verification; in fact LOPSTR will also incorporate the VCL (verification in computational logic) workshop series. LOPSTR'04 will be held at the University of Verona http://www.univr.it co-located with SAS 2004 http://www.sci.univr.it/~sas04, the International Static Analysis Symposium, PEPM 2004 http://www.sci.univr.it/~pepm04 - ACM SIGPLAN 2004 Workshop on Partial Evaluation and Semantics Based Program Manipulation, and PPDP 2004 http://www.sci.univr.it/~ppdp04 - 6th ACM-SIGPLAN International Conference on Principles and Practice of Declarative Programming. Past workshops were held in Manchester, UK (1991, 1992, 1998), Louvain-la-Neuve, Belgium (1993), Pisa, Italy (1994), Arnhem, the Netherlands (1995), Stockholm, Sweden (1996), Leuven, Belgium (1997), Venice, Italy (1999), London, UK (2000), Paphos, Cyprus (2001), Madrid, Spain (2002), Uppsala, Sweden (2003). Since 1994 the proceedings have been published in the LNCS series of Springer-Verlag. LOPSTR also aims to be a lively, friendly forum for presenting and discussing work in progress, so it is a real workshop in the sense that it is also intended to provide useful feedback to authors on their preliminary research. Formal proceedings of the workshop are produced only after the workshop, so that authors can incorporate this feedback in the published papers. Scope of the Workshop We solicit extended abstracts and full papers. Topics of interest cover all aspects of logic-based program development, all stages of the software life cycle, and issues of both programming-in-the-small and programming-in-the-large. The following is a non-exhaustive list of topics: * specification * synthesis * verification * transformation * specialisation * analysis * optimisation * composition * reuse * applications and tools * proofs as programs * component-based software development * agent-based software development * software architectures * design patterns and frameworks * program refinement and logics for refinement Submission Guidelines Authors can either submit extended abstracts (short papers) describing work in progress or they can choose to submit full papers. Contributions should be written in English and should be submitted electronically in Postscript or PDF format at http://profs.sci.univr.it/~lopstr04/index.html. Authors are also asked to send the title and abstract of their submission three days before the deadline to lopstr04@REDACTED Prospective authors who have difficulties for the electronic submission may contact the chairman at lopstr04@REDACTED Extended abstracts should not exceed 6 pages in llncs format and may describe work in progress. Promising abstracts relevant to the scope of LOPSTR will be selected for presentation at the workshop. The submission deadline for extended abstract is May 17, 2004 (extended, strict). Full papers should not exceed 16 pages (including references) in llncs format. These papers will be judged using ordinary conference quality criteria and accepted papers will have to be presented at the workshop and will automatically appear in the pre-proceedings as well as in the final collection of papers, published in the LNCS series. The submission deadline for full papers is May 7, 2004 (extended, strict). Accepted papers and abstracts will be collected in informal pre-proceedings which will be available at the workshop. After the workshop, authors of extended abstract which are judged mature for publication will be invited to submit full papers. These will be reviewed according to the usual refereeing procedures, and accepted papers will be published in the final collection of papers (together with the accepted full papers) which is expected to be published in the Lecture Notes in Computer Science series by Springer-Verlag. All the full papers accepted before the workshop will automatically appear in that book as well; there will be no additional refereeing (although authors will be given a chance to revise their paper, if they so wish, based upon the feedback from the LOPSTR event). Program Committee * Gilles Barthe (France) * Annalisa Bossi (Italy) * Maurice Bruynooghe (Belgium) * Francisco Bueno (Spain) * Giorgio Delzanno (Italy) * Tom Ellman (USA) * Sandro Etalle (The Netherlands) program chair * Norbert Fuchs (Switzerland) * Gopal Gupta (USA) * Patricia M. Hill (UK) * Kung-Kiu Lau (UK) * Fabio Martinelli (Italy) * Alberto Pettorossi (Italy) * Andreas Podelski (Germany) * C.R. Ramakrishnan (USA) * Abhik Roychoudhury (Singapore) * Wim Vanhoof (Belgium) * German Vidal (Spain) Important dates * submission deadline for full papers: May 7, 2004 (extended, strict) * submission deadline for extended abstracts: May 17, 2004 (extended, strict) * Notification: June 6 * Camera-ready: June 16 Sponsor Lopstr 2004 is sponsored by the Association for Logic Programming (ALP) http::/www.cwi.nl/projects/alp From peter@REDACTED Tue May 4 11:37:03 2004 From: peter@REDACTED (Peter H|gfeldt) Date: Tue, 4 May 2004 11:37:03 +0200 (MET DST) Subject: Install Crypto API Problem In-Reply-To: Message-ID: Hi, your log only shows output from `configure'. You have to run `make' too. If you still have problems, show us the output from `make'. /Peter On Tue, 4 May 2004 yerl@REDACTED wrote: > Hi All, > I got some problems when trying to use the crypto api provided by otp. This is what I try: > > $ erl > Erlang (BEAM) emulator version 5.3 [source] [hipe] [threads:0] > > Eshell V5.3 (abort with ^G) > 1> crypto:start(). > ** exited: {undef,[{crypto,start,[]}, > {erl_eval,do_apply,5}, > {shell,eval_loop,2}]} ** > 2> > > > > I installed Erlang with OpenSSL >= 0.9.7. See attached file (configure.log). > > Need Help!! Any ideas? > > Regards, > Yerl > > From joe@REDACTED Tue May 4 15:16:58 2004 From: joe@REDACTED (Joe Armstrong) Date: Tue, 4 May 2004 15:16:58 +0200 (CEST) Subject: The Xref magic spell? Message-ID: I have a directory with some Erlang modules in it. These modules calls things in the standard libraries. Is there a simple one-liner/script/anything that runs Xref on the code in my directory and warns me about possibly missing functions? I got this far: > {ok, P} = xref:start(a). ... > xref:add_directory(P, ".", []). Skipping ./base64.beam (no debug information) Skipping ./ec4.beam (no debug information) ... After a cursory reading of the xref manual it seems that modules have to be debug compiled, but there appears to be no flag in erlc to do this. Any ideas?? Thanks /Joe From joe@REDACTED Tue May 4 15:29:45 2004 From: joe@REDACTED (Joe Armstrong) Date: Tue, 4 May 2004 15:29:45 +0200 (CEST) Subject: Xref - answered :-) Message-ID: To answer my own question. It seems like xref:d("."). does what I want. I RTFM :-) /Joe From vlad_dumitrescu@REDACTED Tue May 4 16:32:15 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Tue, 4 May 2004 16:32:15 +0200 Subject: "Open" distribution Message-ID: Hi, In light of the recent exchanges about Erlang as P2P palatform, I got an interesting idea (or so I think) and wonder why it isn't already implemented like this. I think that the distribution mechanism could be exposed in a more "programmable" form, which would be more like it is for a C node, for example. A node could register itself with epmd as several virtual nodes, each one with it's own port and cookie, more or less like a C node can do. This way, gatewaying between several networks would be easier. Maybe this is possible today too, but I find net_adm and friends a bit unfriendly - why not have something like a gen_distribuition module? regards, Vlad From mlogan@REDACTED Tue May 4 18:31:54 2004 From: mlogan@REDACTED (Martin J. Logan) Date: 04 May 2004 11:31:54 -0500 Subject: gen leader Message-ID: <1083688314.2139.284.camel@dhcp-lom-194-186.futuresource.com> This message is directed at the authors of gen_leader. I have been playing with the gen_leader code of jungerl fame. This code is just what is needed obviate all of our "global" problems. I do have one question about the gen_leader code. If I start a gen_leader in a node cluster consisting of a single node() the single gen_leader process will not elect itself leader. I have to fake it by saying gen_leader:start_link(leader, [node(), fake_node], [], gen_leader_callback, Args, Options). What is the reason that gen_leader wants another gen_leader to dominate and is not content to be his own boss:-) Cheers, Martin P.S how does jungerl become erlpan i.e more people know, love, and use it? From anders_nygren2002@REDACTED Tue May 4 02:32:08 2004 From: anders_nygren2002@REDACTED (Anders Nygren) Date: Mon, 03 May 2004 19:32:08 -0500 Subject: Building on SuSE 9.0 In-Reply-To: <200405030944.i439ipnH016520@harpo.it.uu.se> References: <200405030944.i439ipnH016520@harpo.it.uu.se> Message-ID: <4096E488.8080204@yahoo.se> Mikael Pettersson wrote: > On Sun, 02 May 2004 21:31:16 -0500, Anders Nygren wrote: > >>I am trying to build R9C on SuSE 9.0 and get the following >>error. > > ... > >>gcc -g -O3 -I/usr/local/src/otp_src_R9C-0/erts/ -DHAVE_CONFIG_H -Wall >>-Wstrict-prototypes -Wmissing-prototypes -DHIPE_ARCHITECTURE=x86 -Ibeam >>-Isys/unix -Isys/common -Ii686-pc-linux-gnu -Ii686-pc-linux-gnu/opt >>-Izlib -Ihipe -c hipe/hipe_mkliterals.c -o >>/usr/local/src/otp_src_R9C-0/erts/obj.beam/i686-pc-linux-gnu/hipe_mkliterals.o >>hipe/hipe_mkliterals.c:10:20: config.h: No such file or directory >>make[1]: *** >>[/usr/local/src/otp_src_R9C-0/erts/obj.beam/i686-pc-linux-gnu/hipe_mkliterals.o] >>Error 1 >>make[1]: Leaving directory `/usr/local/src/otp_src_R9C-0/erts/emulator' >>make: *** [depend] Error 2 > > > The missing config.h is supposed to be generated at the > end of the ./configure step. Either you didn't execute > ./configure before make, or your system is broken somehow. > I have run ./configure and at the end it says creating i686-pc-linux-gnu/config.h Or is it someother config.h that is missing? So I assume something is broken on my system. Its a fresh install of SuSE 9.0, so my guess is that I am missing some libraries but I can't figure out which. /Anders Nygren From kostis@REDACTED Tue May 4 20:21:54 2004 From: kostis@REDACTED (Kostis Sagonas) Date: Tue, 4 May 2004 20:21:54 +0200 (MEST) Subject: Building on SuSE 9.0 In-Reply-To: Mail from 'Anders Nygren ' dated: Mon, 03 May 2004 19:32:08 -0500 Message-ID: <200405041821.i44ILsrR021599@spikklubban.it.uu.se> > I have run ./configure and at the end it says > creating i686-pc-linux-gnu/config.h > Or is it someother config.h that is missing? This is the config.h. If you believe the message you get your gcc cannot find this file. This is because the first line should read: gcc -g -O3 -I/usr/local/src/otp_src_R9C-0/erts/i686-pc-linux-gnu -DHAVE_CONFIG_H -Wall rather than: gcc -g -O3 -I/usr/local/src/otp_src_R9C-0/erts/ -DHAVE_CONFIG_H -Wall so something is skrewed up during configure. Also, check that the config.h file does indeed exist (I'm showing the beginning of mine below) and that it has the right permissions. Kostis. ===================================================================== /* i686-pc-linux-gnu/config.h. Generated automatically by configure. */ /* config.h.in. Generated from configure.in by autoheader. */ /* * Erlang emulator options. */ /* Define if you don't want the fix allocator in Erlang */ /* #undef NO_FIX_ALLOC */ /* Define if floating points exceptions are non-existing/not reliable */ /* #undef NO_FPE_SIGNALS */ /* Defined if no found C compiler can handle jump tables */ /* #undef NO_JUMP_TABLE */ /* Define if you wish to redefine FD_SETSIZE to be able to select on more fd */ /* #undef REDEFINE_FD_SETSIZE */ /* Define if you do not have a high-res. timer & want to use times() instead */ #define CORRECT_USING_TIMES 1 /* * HiPE enable or not. */ /* Define to enable HiPE. */ #define HIPE 1 From thomasl_erlang@REDACTED Tue May 4 22:24:37 2004 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Tue, 4 May 2004 13:24:37 -0700 (PDT) Subject: lex generator Message-ID: <20040504202437.84208.qmail@web41904.mail.yahoo.com> I just added a lexical analyser generator to jungerl as lib/smart_exceptions/src/lex.erl (sorry about the unobvious location). Usage: 1. Generate a lexing table from a collection of regexp rules. (Regexps compatible with the regexp module; see comments and examples in lex.erl for more info.) lex:regexps_to_table([Regexp_rule]) -> Table Generating a lexer from rules is fast, e.g. 55 ms on my AMD 1300+ for the lex:erlang_lex/0 specification found in lex.erl. You can of course generate and use any number of lex tables if you wish. 2. Use the table to lex a string into tokens lex:longest(Table, String) -> [Token] longest/2 is the provided driver function. I haven't measured its speed, but it seems reasonable for interactive use. You can use longest/2 as a template for writing other lex-driver functions. A somewhat realistic example lexer inspired by erl_scan is provided (lex:real_erlang_lex/0), along with some other examples/tests. Best, Thomas __________________________________ Do you Yahoo!? Win a $20,000 Career Makeover at Yahoo! HotJobs http://hotjobs.sweepstakes.yahoo.com/careermakeover From yerl@REDACTED Tue May 4 23:47:34 2004 From: yerl@REDACTED (yerl@REDACTED) Date: Tue, 4 May 2004 23:47:34 CEST Subject: Install Crypto API Problem Message-ID: Hi, The complete compilation logs (configure + make) are in the attached file. Lot of thanks Yerl ----Message d'origine---- >Date: Tue, 4 May 2004 11:37:03 +0200 (MET DST) >De: Peter H|gfeldt >A: yerl@REDACTED >Copie ?: erlang-questions@REDACTED >Sujet: Re: Install Crypto API Problem > > >Hi, > >your log only shows output from `configure'. You have to run `make' too. >If you still have problems, show us the output from `make'. > >/Peter > >On Tue, 4 May 2004 yerl@REDACTED wrote: > >> Hi All, >> I got some problems when trying to use the crypto api provided by otp. This is what I try: >> >> $ erl >> Erlang (BEAM) emulator version 5.3 [source] [hipe] [threads:0] >> >> Eshell V5.3 (abort with ^G) >> 1> crypto:start(). >> ** exited: {undef,[{crypto,start,[]}, >> {erl_eval,do_apply,5}, >> {shell,eval_loop,2}]} ** >> 2> >> >> >> >> I installed Erlang with OpenSSL >= 0.9.7. See attached file (configure.log). >> >> Need Help!! Any ideas? >> >> Regards, >> Yerl >> >> > > From ulf.wiger@REDACTED Tue May 4 23:48:23 2004 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Tue, 04 May 2004 23:48:23 +0200 Subject: gen leader In-Reply-To: <1083688314.2139.284.camel@dhcp-lom-194-186.futuresource.com> References: <1083688314.2139.284.camel@dhcp-lom-194-186.futuresource.com> Message-ID: On 04 May 2004 11:31:54 -0500, Martin J. Logan wrote: > This message is directed at the authors of gen_leader. I have been > playing with the gen_leader code of jungerl fame. This code is just what > is needed obviate all of our "global" problems. Nice to hear it. I too think that gen_leader is a very nice behaviour. I would like to see Thomas Arts & co work out a solution to the bug they found in the leader election algorithm, before I start pushing for it, though. (: > I do have one question > about the gen_leader code. If I start a gen_leader in a node cluster > consisting of a single node() the single gen_leader process will not > elect itself leader. I have to fake it by saying > gen_leader:start_link(leader, [node(), fake_node], [], > gen_leader_callback, Args, Options). > > What is the reason that gen_leader wants another gen_leader to dominate > and is not content to be his own boss:-) I guess performing a leader election among a set of one seemed... a bit superfluous, but it could surely be added as a special case. (: /Uffe -- Ulf Wiger From joe@REDACTED Wed May 5 11:25:18 2004 From: joe@REDACTED (Joe Armstrong) Date: Wed, 5 May 2004 11:25:18 +0200 (CEST) Subject: Middle men wanted Message-ID: I'm collecting middle men - let me explain. Cheers /Joe (warning long text) What is a middle man? ===================== TCP application protocols (as defined in RFCs) are a pain to program - I want therefore a number of device drivers (I call them middle men) to isolate the protocols from the programs which respond to the protocols. A middle man sits between a TCP socket and an erlang program. It converts the protocol packets - into Erlang terms in a transparnt manner. ie for every protocl messgae there is exactly one Erlang term and vice. versa. Note: the same middle_man is used for both the client and the server software :-) +-----------------+ TCP packets | Middle man | Erlang terms ---->-----------| |----->------ | | TCP packets | | Erlang terms ----<-----------| |-----<------ +-----------------+ The middle man does packet re-assembly etc for TCP packets and parsing. So for example: if a HTTP middle man recives a GET ..... request, it will parse the entire request and send a {get," ..."} message to it's output. What do I want? =============== I have written the following middle men eterm (erlang terms) http estream (erlang binary representaion of terms) xml (generic) I am writing: xmlrpc soap I want: IRC, NNTP, POP2, .... Why do I want middle men and where is this leading? =================================================== I have made a erlang deamon that acts as a "polyport" - ie just open port 1234 (say) on the server and start talking in any protocol you feel like - the port analyses the input and starts the appropriate middle man. Using the esteam protocol a client can then do the following: {ok, S} = session:start("host", Port, estream) This opens a estream connection to Host,Port session:rpc(S, {apply, [M,F,A]}) do an rpc on the server. Now the server code is like this: loop(Client) -> receive {From, {apply,{M,F,A}} -> Val = (catch apply(M,F,A)), From ! {send, Val} end. This is *very* powerful (see security later) So suppose I want to transfer a file from a clien to a server. The client code is {ok, S} = session:start("host", Port, estream), {ok, B} = file:read_file(File), session:rpc(S, {apply, {file,write_file,[Bin]}}), session:close(S) Which transfers a file from the client to the server - this works despite the fact there is no file server (ie like FTP) running on the server. <> I don't allow applies until the client has authenticated itself <<>> Soon - all nodes in planetlab will offer polyport servers :-) Writing a server ================ Middle men make writing servers very easy. For example, my HTTP server now looks like this: server(Client) -> receive {Client, closed} -> exit(handler_closed); {Client, {msg, Request}} -> Response = generate_response(Request), Client ! {msg, Response}, server(Client); Other -> io:format("Mod http:unexpected message:~p~n",[Other]) end. generate_response({_, Vsn, F, Args, Env}) -> F1 = "." ++ F, case file:read_file(F1) of {ok, Bin} -> case classify(F) of html -> {header(html),[Bin]}; jpg -> {header(jpg),[Bin]}; gif -> {header(jpg),[Bin]}; _ -> {header(text),[body("white"),"
",Bin,"
"]} end; _ -> show({no_such_file,F,args,Args,cwd,file:get_cwd()}) end. Middle men API ============== The middle man is started with a call like this: M:start(Args, Client, Socket, Bin) (Args is ignored) Client is a Pid to whom all decoded messages should be sent. Socket is the TCP socket Bin is the first data packet that was sent to the socket then the connection was extablised. The middle man protocol is handled in a control loop like this: The loop handles the following messages {tcp, Socket, Bin} -- data from the socket {tcp_closed, Socket} -- socket closed close -- request to close the socket {send, Term} -- request to send the term Term {'DOWN',_,process,Client,_} -- the Client dies And is something like this loop(Client, Socket, Cont) -> receive {tcp, Socket, Bin} -> received(Client, Socket, Bin, Cont); {tcp_closed, Socket} -> Client ! {self(), closed}; close -> gen_tcp:close(Socket); {send, Term} -> ... format the term ... B = format_term(Term), gen_tcp:send(Socket ,B), loop(Client, Socket, Cont); {'DOWN',_,process,Client,_} -> gen_tcp:close(Socket); Other -> ed_log:error({middle_man_eterm,funny,msg,Other}) end. At the end I have included a middle man that converts between the textual and internal form of Erlang terms. Middle man example ================== -module(ed_middle_man_eterm). %% Copyright (C) 2004 by Joe Armstrong (joe@REDACTED) %% All rights reserved. %% The copyright holder hereby grants the rights of usage, distribution %% and modification of this software to everyone and for any purpose, as %% long as this license and the copyright notice above are preserved and %% not modified. There is no warranty for this software. -compile(export_all). start(Args, Client, Socket, <<"erl\r\n",B/binary>>) -> erlang:monitor(process, Client), received(Client, Socket, binary_to_list(B), []); start(Args, Client, Socket, <<"erl\r",B/binary>>) -> erlang:monitor(process, Client), received(Client, Socket, binary_to_list(B), []); start(Args, Client, Socket, <<"erl\n",B/binary>>) -> erlang:monitor(process, Client), received(Client, Socket, binary_to_list(B), []). received(Client, Socket, Str, Cont) -> case erl_scan:tokens(Cont, Str, 1) of {more, C1} -> loop(Client, Socket, C1); {done, Result, Rest} -> case Result of {ok, Toks, _} -> case erl_parse:parse_term(Toks) of {ok, Term} -> Client ! {self(), Term}; _ -> exit(bad_term) end; E -> exit(bad_term) end, received(Client, Socket, Rest, []) end. %% ---> {tcp,Socket,Bin} %% ---> {tcp_closed, Socket} %% ---> close %% ---> {send, X} %% ---> {'DOWN',_,_,_,_} (from client) loop(Client, Socket, Cont) -> receive {tcp, Socket, Bin1} -> received(Client, Socket, binary_to_list(Bin1), Cont); {tcp_closed, Socket} -> Client ! {self(), closed}; close -> gen_tcp:close(Socket); {send, Term} -> B = io_lib:format("~p",[Term]), io:format("Sending:~p~n",[Term]), gen_tcp:send(Socket ,[B,".\n"]), loop(Client, Socket, Cont); {'DOWN',_,process,Client,_} -> gen_tcp:close(Socket); Other -> ed_log:error({middle_man_eterm,funny,msg,Other}) end. From erlang@REDACTED Wed May 5 11:50:56 2004 From: erlang@REDACTED (Peter-Henry Mander) Date: Wed, 5 May 2004 10:50:56 +0100 Subject: Middle men wanted In-Reply-To: References: Message-ID: <20040505105056.25e6652d.erlang@manderp.freeserve.co.uk> Hi Joe, Would you be interested in a SIP middleman? (Pending the outcome of the Open-Source battle I'm currently waging, as you may recall... Middlemen of a different ilk!) It's not a C driver though, the codec is pure Erlang. Is there a way to produce a driver almost directly from Erlang code, like an Erlang compiler that emits C code? Failing that, any hints about how to automate the process? Pete. On Wed, 5 May 2004 11:25:18 +0200 (CEST) Joe Armstrong wrote: > > > I'm collecting middle men - let me explain. > > Cheers > > /Joe > > (warning long text) > > > What is a middle man? > ===================== > > TCP application protocols (as defined in RFCs) are a pain to program > - I want therefore a number of device drivers (I call them middle men) > to isolate the protocols from the programs which respond to the > protocols. > > > A middle man sits between a TCP socket and an erlang program. It > converts the protocol packets - into Erlang terms in a transparnt > manner. ie for every protocl messgae there is exactly one Erlang term > and vice. versa. > > Note: the same middle_man is used for both the client and the server > software :-) > > > +-----------------+ > TCP packets | Middle man | Erlang terms > ---->-----------| |----->------ > | | > TCP packets | | Erlang terms > ----<-----------| |-----<------ > +-----------------+ > > > The middle man does packet re-assembly etc for TCP packets and > parsing. > > So for example: if a HTTP middle man recives a > > > GET ..... > > request, it will parse the entire request and send a {get," ..."} > message > to it's output. > > > What do I want? > =============== > > I have written the following middle men > > eterm (erlang terms) > http > estream (erlang binary representaion of terms) > xml (generic) > > I am writing: > > xmlrpc > soap > > I want: > > IRC, NNTP, POP2, .... > > Why do I want middle men and where is this leading? > =================================================== > > I have made a erlang deamon that acts as a "polyport" - ie just open > port 1234 (say) on the server and start talking in any protocol you > feel like - the port analyses the input and starts the appropriate > middle man. > > Using the esteam protocol a client can then do the following: > > {ok, S} = session:start("host", Port, estream) > > This opens a estream connection to Host,Port > > session:rpc(S, {apply, [M,F,A]}) > > do an rpc on the server. > > Now the server code is like this: > > loop(Client) -> > receive > {From, {apply,{M,F,A}} -> > Val = (catch apply(M,F,A)), > From ! {send, Val} > end. > > This is *very* powerful (see security later) > > So suppose I want to transfer a file from a clien to a server. The > client code is > > {ok, S} = session:start("host", Port, estream), > {ok, B} = file:read_file(File), > session:rpc(S, {apply, {file,write_file,[Bin]}}), > session:close(S) > > Which transfers a file from the client to the server - this works > despite the fact > there is no file server (ie like FTP) running on the server. > > <> I don't allow applies until the client has > authenticated itself <<>> > > Soon - all nodes in planetlab will offer polyport servers :-) > > Writing a server > ================ > > Middle men make writing servers very easy. > > For example, my HTTP server now looks like this: > > server(Client) -> > receive > {Client, closed} -> > exit(handler_closed); > {Client, {msg, Request}} -> > Response = generate_response(Request), > Client ! {msg, Response}, > server(Client); > Other -> > io:format("Mod http:unexpected message:~p~n",[Other]) > end. > > generate_response({_, Vsn, F, Args, Env}) -> > F1 = "." ++ F, > case file:read_file(F1) of > {ok, Bin} -> > case classify(F) of > html -> > {header(html),[Bin]}; > jpg -> > {header(jpg),[Bin]}; > gif -> > {header(jpg),[Bin]}; > _ -> > {header(text),[body("white"),"
",Bin,"
" > ]} > end; > _ -> > show({no_such_file,F,args,Args,cwd,file:get_cwd()}) > end. > > > Middle men API > ============== > > The middle man is started with a call like this: > > M:start(Args, Client, Socket, Bin) > > (Args is ignored) > > Client is a Pid to whom all decoded messages should be sent. > Socket is the TCP socket > Bin is the first data packet that was sent to the socket > then the connection was extablised. > > The middle man protocol is handled in a control loop like this: > > The loop handles the following messages > > {tcp, Socket, Bin} -- data from the socket > {tcp_closed, Socket} -- socket closed > close -- request to close the socket > {send, Term} -- request to send the term Term > {'DOWN',_,process,Client,_} -- the Client dies > > > And is something like this > > loop(Client, Socket, Cont) -> > receive > {tcp, Socket, Bin} -> > received(Client, Socket, Bin, Cont); > {tcp_closed, Socket} -> > Client ! {self(), closed}; > close -> > gen_tcp:close(Socket); > {send, Term} -> > ... format the term ... > B = format_term(Term), > gen_tcp:send(Socket ,B), > loop(Client, Socket, Cont); > {'DOWN',_,process,Client,_} -> > gen_tcp:close(Socket); > Other -> > ed_log:error({middle_man_eterm,funny,msg,Other}) > end. > > At the end I have included a middle man that converts between the > textual and internal form of Erlang terms. > > > > Middle man example > ================== > > -module(ed_middle_man_eterm). > > > %% Copyright (C) 2004 by Joe Armstrong (joe@REDACTED) > %% All rights reserved. > %% The copyright holder hereby grants the rights of usage, > distribution%% and modification of this software to everyone and for > any purpose, as%% long as this license and the copyright notice above > are preserved and%% not modified. There is no warranty for this > software. > > -compile(export_all). > > start(Args, Client, Socket, <<"erl\r\n",B/binary>>) -> > erlang:monitor(process, Client), > received(Client, Socket, binary_to_list(B), []); > start(Args, Client, Socket, <<"erl\r",B/binary>>) -> > erlang:monitor(process, Client), > received(Client, Socket, binary_to_list(B), []); > start(Args, Client, Socket, <<"erl\n",B/binary>>) -> > erlang:monitor(process, Client), > received(Client, Socket, binary_to_list(B), []). > > received(Client, Socket, Str, Cont) -> > case erl_scan:tokens(Cont, Str, 1) of > {more, C1} -> > loop(Client, Socket, C1); > {done, Result, Rest} -> > case Result of > {ok, Toks, _} -> > case erl_parse:parse_term(Toks) of > {ok, Term} -> > Client ! {self(), Term}; > _ -> > exit(bad_term) > end; > E -> > exit(bad_term) > end, > received(Client, Socket, Rest, []) > end. > > %% ---> {tcp,Socket,Bin} > %% ---> {tcp_closed, Socket} > %% ---> close > %% ---> {send, X} > %% ---> {'DOWN',_,_,_,_} (from client) > > loop(Client, Socket, Cont) -> > receive > {tcp, Socket, Bin1} -> > received(Client, Socket, binary_to_list(Bin1), Cont); > {tcp_closed, Socket} -> > Client ! {self(), closed}; > close -> > gen_tcp:close(Socket); > {send, Term} -> > B = io_lib:format("~p",[Term]), > io:format("Sending:~p~n",[Term]), > gen_tcp:send(Socket ,[B,".\n"]), > loop(Client, Socket, Cont); > {'DOWN',_,process,Client,_} -> > gen_tcp:close(Socket); > Other -> > ed_log:error({middle_man_eterm,funny,msg,Other}) > end. > > > > > -- "The Tao of Programming flows far away and returns on the wind of morning." From thomas.arts@REDACTED Wed May 5 11:53:09 2004 From: thomas.arts@REDACTED (Thomas Arts) Date: Wed, 5 May 2004 11:53:09 +0200 Subject: gen leader References: <1083688314.2139.284.camel@dhcp-lom-194-186.futuresource.com> Message-ID: <008401c43286$c5c16990$0e2d1081@ituniv398> Dear Martin I am very glad to read that you can actually use the gen_leader code and that it works fine for you. A while ago I posted a warning that there still is a bug in the code that might cause you a daedlock, but we are near to having a fix for that. New code has been written based on a different algorithm (Scott D Stroller, "Leader Election in Distributed Systems with Crash Failures, 1997). We are verifying the code at the moment, not to make the same mistake again :0). The reason why we excluded the one node case for the leader election algorithm is that we saw it as an implementation to support fault tolerance. In case of 1 node, there is no fault tolerance and a leader election for it seemed useless to us. Best regards Thomas --- Dr Thomas Arts Program Manager Software Engineering and Management IT-university in Gothenburg Box 8718, 402 75 Gothenburg, Sweden http://www.ituniv.se/ Tel +46 31 772 6031 Fax +46 31 772 4899 ----- Original Message ----- From: "Martin J. Logan" To: Sent: Tuesday, May 04, 2004 6:31 PM Subject: gen leader > This message is directed at the authors of gen_leader. I have been > playing with the gen_leader code of jungerl fame. This code is just what > is needed obviate all of our "global" problems. I do have one question > about the gen_leader code. If I start a gen_leader in a node cluster > consisting of a single node() the single gen_leader process will not > elect itself leader. I have to fake it by saying > gen_leader:start_link(leader, [node(), fake_node], [], > gen_leader_callback, Args, Options). > > What is the reason that gen_leader wants another gen_leader to dominate > and is not content to be his own boss:-) > > Cheers, > Martin > > P.S how does jungerl become erlpan i.e more people know, love, and use > it? > > From joe@REDACTED Wed May 5 12:04:45 2004 From: joe@REDACTED (Joe Armstrong) Date: Wed, 5 May 2004 12:04:45 +0200 (CEST) Subject: Middle men wanted In-Reply-To: <20040505105056.25e6652d.erlang@manderp.freeserve.co.uk> Message-ID: On Wed, 5 May 2004, Peter-Henry Mander wrote: > Hi Joe, > > Would you be interested in a SIP middleman? (Pending the > outcome of the Open-Source battle I'm currently waging, as you may > recall... Middlemen of a different ilk!) > Yes ! hang on a bit - I think what I'll do is generalise the code I posted earlier into a gen_middle_man so that specific middle men can be added as plugin's ... watch this space ... /Joe > It's not a C driver though, the codec is pure Erlang. Is there a way to > produce a driver almost directly from Erlang code, like an Erlang > compiler that emits C code? Failing that, any hints about how to > automate the process? > > Pete. > > On Wed, 5 May 2004 11:25:18 +0200 (CEST) > Joe Armstrong wrote: > > > > > > > I'm collecting middle men - let me explain. > > > > Cheers > > ... From erlang@REDACTED Wed May 5 12:21:41 2004 From: erlang@REDACTED (Peter-Henry Mander) Date: Wed, 5 May 2004 11:21:41 +0100 Subject: Middle men wanted In-Reply-To: References: <20040505105056.25e6652d.erlang@manderp.freeserve.co.uk> Message-ID: <20040505112141.285b5966.erlang@manderp.freeserve.co.uk> So I gather that the "drivers" may be pure Erlang, and are not required to be C drivers? Pete. On Wed, 5 May 2004 12:04:45 +0200 (CEST) Joe Armstrong wrote: > On Wed, 5 May 2004, Peter-Henry Mander wrote: > > > Hi Joe, > > > > Would you be interested in a SIP middleman? (Pending the > > outcome of the Open-Source battle I'm currently waging, as you may > > recall... Middlemen of a different ilk!) > > > > Yes ! > > hang on a bit - I think what I'll do is generalise the code > I posted earlier into a gen_middle_man so that specific middle men > can be added as plugin's ... > > watch this space ... > > /Joe > > > > > It's not a C driver though, the codec is pure Erlang. Is there a way > > to produce a driver almost directly from Erlang code, like an Erlang > > compiler that emits C code? Failing that, any hints about how to > > automate the process? > > ... -- "The Tao of Programming flows far away and returns on the wind of morning." From bry@REDACTED Wed May 5 12:29:47 2004 From: bry@REDACTED (bry@REDACTED) Date: Wed, 5 May 2004 12:29:47 CET Subject: xsl xmerl Message-ID: <200405051229421.SM01012@Debug> a propos the xslt like transformations in erlang that mikael karrlson did looking over them, it seems like there's nothing to keep a transformation from doing anything other than transformation. for example one could have a transformation that starts other processes, actually does stuff, and as its output has a description of what it did. correct? From joe@REDACTED Wed May 5 13:07:36 2004 From: joe@REDACTED (Joe Armstrong) Date: Wed, 5 May 2004 13:07:36 +0200 (CEST) Subject: Middle men wanted In-Reply-To: <20040505112141.285b5966.erlang@manderp.freeserve.co.uk> Message-ID: On Wed, 5 May 2004, Peter-Henry Mander wrote: > > So I gather that the "drivers" may be pure Erlang, and are not required > to be C drivers? > Yes - I'd prefer them to be pure Erlang /Joe From mickael.remond@REDACTED Wed May 5 13:09:10 2004 From: mickael.remond@REDACTED (=?iso-8859-15?Q?Micka=EBl_R=E9mond?=) Date: Wed, 05 May 2004 13:09:10 +0200 Subject: Middle men wanted In-Reply-To: References: Message-ID: Joe, I like this idea *a lot* ! This is something that once you think about it is really needed :-) > I have written the following middle men > > eterm (erlang terms) > http > estream (erlang binary representaion of terms) > xml (generic) > > I am writing: > > xmlrpc > soap Nice, Great ! > I want: > > IRC, NNTP, POP2, .... I can contribute some middle men, as time allow. I will dig into my existing code to see what I already have. As the initiator of Manderlbot, I should be able to quickly convert the IRC code to middle men. I am needing a small NNTP server, so I might dig this one. -- Micka?l R?mond http://www.erlang-projects.org/ From vlad_dumitrescu@REDACTED Wed May 5 13:50:24 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 5 May 2004 13:50:24 +0200 Subject: Middle men wanted References: Message-ID: ----- Original Message ----- From: "Joe Armstrong" > I'm collecting middle men - let me explain. Cool! Would the Subversion protocol be of interest? [http://subversion.tigris.org] Slighly related, I think there is another similar technology that isn't yet made available: a proxy server. If I remember correctly, you wrote one when working with the X server, Joe; and I have one that I wrote when trying to talk to Gnutella. I think it would be useful to have one published, and I'll try to find my old code. It could use the same protocol plugins as gen_middle_man to provide protocol specific functionality (logging, tracing, etc) regards, Vlad From mikael.karlsson@REDACTED Wed May 5 14:10:36 2004 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Wed, 5 May 2004 14:10:36 +0200 Subject: xsl xmerl In-Reply-To: <200405051229421.SM01012@Debug> References: <200405051229421.SM01012@Debug> Message-ID: <200405051410.36789.mikael.karlsson@creado.com> I have two opposite answers :-) 1. Sure you can do anything you like, it's plain erlang function pattern matching, so what you write in your function body is up to you. I guess one should make sure to return something that makes sense in the transformation process. 2. Doing things like that is to have sideeffects and I heard somewhere that this is not the proper way of doing functional programming. One reason is that the order of how things are executed are not really defined in the transformation. Regards Mikael onsdag 05 maj 2004 17:29 skrev bry@REDACTED: > a propos the xslt like transformations in > erlang that mikael karrlson did looking over > them, it seems like there's nothing to keep > a transformation from doing anything other > than transformation. > > for example one could have a transformation > that starts other processes, actually does > stuff, and as its output has a description > of what it did. > correct? From mickael.remond@REDACTED Wed May 5 14:06:45 2004 From: mickael.remond@REDACTED (=?iso-8859-15?Q?Micka=EBl_R=E9mond?=) Date: Wed, 05 May 2004 14:06:45 +0200 Subject: xsl xmerl In-Reply-To: <200405051229421.SM01012@Debug> References: <200405051229421.SM01012@Debug> Message-ID: On Wed, 5 May 2004 12:29:47 CET, wrote: > a propos the xslt like transformations in > erlang that mikael karrlson did looking over > them, it seems like there's nothing to keep > a transformation from doing anything other > than transformation. > > for example one could have a transformation > that starts other processes, actually does > stuff, and as its output has a description > of what it did. > correct? Yes. This is correct. But I think being able to do other thing is a strength. What is your problem with that ? -- Micka?l R?mond http://www.erlang-projects.org/ From ulf.wiger@REDACTED Wed May 5 14:30:40 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 5 May 2004 14:30:40 +0200 Subject: Middle men wanted Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F54026E4@ESEALNT442.al.sw.ericsson.se> > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Joe Armstrong > Sent: den 5 maj 2004 11:25 > To: erlang-questions@REDACTED > Subject: Middle men wanted > > > > > I'm collecting middle men - let me explain. > > Cheers > > /Joe > > (warning long text) Perhaps you could add some thinking about how to handle issues like fault tolerance, in-service upgrade, etc... you know, that OTP framework that you and some others invented a few years ago. ;) There's not necessarily much discrepancy there, but I believe it would be helpful to reveal how you've thought about it. Proposing a uniform way of reporting unexpected things would also be good; in one part of your examples, you use io:format/2, while in another, you use something called ed_log:error/1. /Uffe From joe@REDACTED Wed May 5 14:46:24 2004 From: joe@REDACTED (Joe Armstrong) Date: Wed, 5 May 2004 14:46:24 +0200 (CEST) Subject: Middle men wanted In-Reply-To: Message-ID: I've now made gen_middle_man (appended) The plugins are easy (see middle_man_eterm - appended) and middle_man_http. A middle man must export start(Args, Bin) -> {[Msg], Cont} Args is ignored (for now) Bin = initial data sent to the port Msg = message to sent to the client Cont = continuation to be called in received/2 received(Bin, Cont) -> {[Msg], Cont'} return values as above term_to_bin(Term) -> IOList serialise Term. IOList is sent to the socket With this structure handing sockets in a generic way is easy. Open a socket and call gen_middle_man(.....,Mod) to handle the input With this abstraction *all* servers connected to TCP ports see streams of Erlang terms. Now we can do some fun things. Here is an example: Here is some server code: handler0(Client) -> receive {Client, {fac, N}} when integer(N) -> J = fac(N), reply(Client, J), handler0(Client); ... Now here are three client dialogues: Try number one: telnet localhost 1288 Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. erl. <--- this says we're to use the eterm middle man {fac,25}. <--- the query 15511210043330985984000000. <--- response Number two: telnet localhost 1288 <---- same port Trying 127.0.0.1... Connected to localhost.localdomain. Escape character is '^]'. <---- this says use XML <--- the query starts here fac 10 <--- the response starts here reply 3628800 Number three (uses estream and an erlang client) $ erl Erlang (BEAM) emulator version 5.3 [source] [hipe] 1> {ok, S} = session:start("localhost", 1288). {ok,<0.33.0>} 2> session:rpc(S, {fac,10}). 3628800 So the *same* server is polylingual - ie the port understands erlang terms, XML expressions or Erlang binaries - and it's really easy to write. I'll be adding soap and xmlrpc real soon :-) Cheers /Joe -module(middle_man_http). %% Copyright (C) 2004 by Joe Armstrong (joe@REDACTED) %% All rights reserved. %% The copyright holder hereby grants the rights of usage, distribution %% and modification of this software to everyone and for any purpose, as %% long as this license and the copyright notice above are preserved and %% not modified. There is no warranty for this software. -export([start/2, received/2, term_to_bin/1]). -import(lists, [map/2, reverse/1]). start(Vsn, Bin) -> received(Bin, {header, []}). received(Bin, Cont) -> received(binary_to_list(Bin), Cont, []). received(Data, {header, Buff}, L) -> case scan_header(Data, Buff) of {no, Buff1} -> {reverse(L), {header, Buff1}}; {yes, Header, After} -> got_header(Header, After, L) end; received(Data, {post, Buff, Len, X}, L) -> case collect_chunk(Len, Data, Buff) of {yes,PostData,After} -> Args2 = parse_uri_args(PostData), {Op,Vsn,URI,Args1,Env} = X, Request = {Op,Vsn,URI,Args1++Args2,Env}, received(After, {header,[]}, [X|L]); {no,Buff1, Len1} -> State = {post, Buff1, Len1, X}, {reverse(L), State} end. got_header(Header, After, L) -> %% We've got the header - parse it case parse_header(Header) of Result = {Op, ContentLen, Vsn, URI, Args, Env} -> case ContentLen of 0 -> received(After, {header, []}, [{Op,Vsn,URI,Args,Env}|L]); _ -> State = {post, [], ContentLen, {Op,Vsn,URI,Args,Env}}, received(After, State, L) end; Other -> io:format("Oops ~p ~n", [Other]), exit(debug) end. collect_chunk(0,New,Buf) -> {yes, reverse(Buf), New}; collect_chunk(N, [H|T], Buff) -> collect_chunk(N-1,T,[H|Buff]); collect_chunk(N, [], Buff) -> {no, Buff, N}. scan_header([$\n|T], [$\r,$\n,$\r|L]) -> {yes, reverse(L), T}; scan_header([H|T], L) -> scan_header(T, [H|L]); scan_header([], L) -> {no, L}. %%---------------------------------------------------------------------- parse_header(Str) -> {ok, Fields} = regexp:split(Str, "\r\n"), PRequest = parse_request(hd(Fields)), %% Args = "KeyWord: Str" .. PArgs = map(fun isolate_arg/1, tl(Fields)), make_return_value({PRequest, PArgs}). make_return_value({{Op,Vsn,{URI,Args}}, Env}) -> {Op, content_length(Env), Vsn, URI, Args, Env}. content_length([{"content-length",Str}|T]) -> list_to_integer(Str); content_length([_|T]) -> content_length(T); content_length([]) -> 0. urlencoded2str([$%,Hi,Lo|T]) -> [decode_hex(Hi, Lo)|urlencoded2str(T)]; urlencoded2str([$+|T]) -> [$ |urlencoded2str(T)]; urlencoded2str([H|T]) -> [H|urlencoded2str(T)]; urlencoded2str([]) -> []. isolate_arg(Str) -> isolate_arg(Str, []). isolate_arg([$:,$ |T], L) -> {httpd_util:to_lower(reverse(L)), T}; isolate_arg([H|T], L) -> isolate_arg(T, [H|L]). %% decode_hex %% decode_hex(Hex1, Hex2) -> hex2dec(Hex1)*16 + hex2dec(Hex2). hex2dec(X) when X >=$0, X =<$9 -> X-$0; hex2dec($A) -> 10; hex2dec($B) -> 11; hex2dec($C) -> 12; hex2dec($D) -> 13; hex2dec($E) -> 14; hex2dec($F) -> 15; hex2dec($a) -> 10; hex2dec($b) -> 11; hex2dec($c) -> 12; hex2dec($d) -> 13; hex2dec($e) -> 14; hex2dec($f) -> 15. parse_request(Str) -> {ok, Args} = regexp:split(Str, " "), case Args of ["POST", URI, Vsn] -> {post, parse_vsn(Vsn) ,parse_uri(URI)}; ["GET", URI, Vsn] -> {get, parse_vsn(Vsn), parse_uri(URI)}; _ -> oops end. parse_vsn("HTTP/1.0") -> {1,0}; parse_vsn(X) -> X. %% A typical URI looks %% like %% URI = "/a/b/c?password=aaa&invisible=A+hidden+value" parse_uri(URI) -> case string:tokens(URI, "?") of [Root] -> {Root, []}; [Root, Args] -> {Root, parse_uri_args(Args)} end. parse_uri_args(Args) -> Args1 = string:tokens(Args, "&;"), map(fun(KeyVal) -> case string:tokens(KeyVal, "=") of [Key, Val] -> {urlencoded2str(Key), urlencoded2str(Val)}; [Key] -> {urlencoded2str(Key), ""}; _ -> io:format("Invalid str:~p~n",[KeyVal]), {"error", "error"} end end, Args1). term_to_bin({Headers, Data}) -> B1 = list_to_binary(Data), Len = size(B1), Headers1 = [Headers,"Content-Length ",integer_to_list(Len),"\r\n\r\n"], [Headers1, B1]. -module(middle_man_eterm). %% Copyright (C) 2004 by Joe Armstrong (joe@REDACTED) %% All rights reserved. %% The copyright holder hereby grants the rights of usage, distribution %% and modification of this software to everyone and for any purpose, as %% long as this license and the copyright notice above are preserved and %% not modified. There is no warranty for this software. -export([start/2, received/2, term_to_bin/1]). start(_, <<"erl.\r\n",B/binary>>) -> received(B, []); start(_, <<"erl.\r",B/binary>>) -> received(B, []); start(_, <<"erl.\n",B/binary>>) -> received(B, []); start(_, _) -> exit(protocol). received(Bin, Cont) -> received(binary_to_list(Bin), Cont, []). received(Str, Cont, L) -> case erl_scan:tokens(Cont, Str, 1) of {more, C1} -> {lists:reverse(L), C1}; {done, Result, Rest} -> case Result of {ok, Toks, _} -> case erl_parse:parse_term(Toks) of {ok, Term} -> io:format("sending:~p~n",[Term]), received(Rest, [], [Term|L]); _ -> exit(bad_term) end; E -> exit(bad_term) end end. term_to_bin(Term) -> io_lib:format("~p.\n",[Term]). ---- gen_middle man --- -module(gen_middle_man). %% Copyright (C) 2004 by Joe Armstrong (joe@REDACTED) %% All rights reserved. %% The copyright holder hereby grants the rights of usage, distribution %% and modification of this software to everyone and for any purpose, as %% long as this license and the copyright notice above are preserved and %% not modified. There is no warranty for this software. -export([start/5]). start(Args, Client, Socket, Bin, Mod) -> erlang:monitor(process, Client), {Msgs, Cont} = Mod:start(Args, Bin), send_messages(Client, Msgs), loop(Client, Socket, Cont, Mod). send_messages(Client, []) -> void; send_messages(Client, [H|T]) -> Client ! {self(), H}, send_messages(Client, T). %% ---> {tcp,Socket,Bin} %% ---> {tcp_closed, Socket} %% ---> close %% ---> {send, X} %% ---> {'DOWN',_,_,_,_} (from client) loop(Client, Socket, Cont, Mod) -> receive {tcp, Socket, Bin} -> case Mod:received(Bin, Cont) of {Msgs, Cont1} -> send_messages(Client, Msgs), loop(Client, Socket, Cont1, Mod) end; {tcp_closed, Socket} -> %% revese the order (sneaky) Client ! {closed, self()}; close -> gen_tcp:close(Socket); {send, Term} -> B = Mod:term_to_bin(Term), gen_tcp:send(Socket ,B), loop(Client, Socket, Cont, Mod); {'DOWN',_,process,Client,_} -> gen_tcp:close(Socket); Other -> ed_log:error({middle_man_eterm,funny,msg,Other}) end. From joe@REDACTED Wed May 5 15:03:05 2004 From: joe@REDACTED (Joe Armstrong) Date: Wed, 5 May 2004 15:03:05 +0200 (CEST) Subject: Middle men wanted In-Reply-To: <37FB7AA6F5F9814FB634A7BF4C35A6F54026E4@ESEALNT442.al.sw.ericsson.se> Message-ID: On Wed, 5 May 2004, Ulf Wiger (AL/EAB) wrote: > > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Joe Armstrong > > Sent: den 5 maj 2004 11:25 > > To: erlang-questions@REDACTED > > Subject: Middle men wanted > > > > > > > > > > I'm collecting middle men - let me explain. > > > > Cheers > > > > /Joe > > > > (warning long text) > > > Perhaps you could add some thinking about how to handle issues > like fault tolerance, in-service upgrade, etc... you know, that > OTP framework that you and some others invented a few years ago. ;) Well it's like this (rolling up sleeves) What I'm trying to do is make distributed Erlang work with an very large number of nodes (but not as we do things today) In distributed Erlang all nodes now about all other nodes. This doesn't work if there are very large numbers of nodes. I now want to ask what nodes should node J know about? - to answer this I'm experimenting with the following (this was previously posted to the planet lab mailing list) >> Assume we number the machines 1..N where N = 2^K (a K of 10 or 11 >>should do) >> >> Define the neighbors of N to be all machines with a Manhattan >>distance of 1 from N. >> >> I'll give an example in base 2^4. >> >> Machine 6 has a binary address 0110 in base 16 >> >> The following machines have a Manhattan distance 1 from 0110 >> >> 1110 0010 0100 0111 (ie machines 14, 2, 8 and 7) >> >> These are formed by changed one bit at a time from 0110 >> >> Thus "Manhattan" neighbors of machine 6 are 14,2,8 and 7 >> >> Each machine has *exactly* four neighbors. >> >> In 2^11 each machine has *exactly* 11 neighbors. >> >> This give a very nice way of connecting all the nodes together. In a >>fully saturated net of 2^11 nodes all machines have exactly 11 >>neighbors which are symmetrically placed (they are all edges of an >>11-D hyper cube). >> >> You can use this structure to broadcast changes to all nodes, gather >>statistics etc. >> >> If the address space is not fully saturated you can include nodes at >>a Manhattan distance of 2 etc. - this arrangement has the properties >>that: >> >> 1) it should relatively easy to ensure that there are always >>sufficient number of "nearby" nodes (in Manhattan space) to any given >>node to ensure that individual nodes do not become disconnected from >>the network. >> >> 2) The system is symmetric - ie there is no hierarchy and all nodes >>have exactly the same number of neighbors. >> >> 3) Any two nodes are a maximum of K hops apart. >> >> 4) Operations on the entire network can be done in log time. >> >> --- >> >> I have made an experimental "empty" server which uses this kind of >>network. >> >> The idea is to have a null server which becomes a placeholder for a >>real server. The empty server can be sent a higher order function to >>paramertise it and to tell it to become a specific server. Thus I can >>send a "become an HTTP server" function to the empty server, and it >>turns into an HTTP server. >> >> I will be making this available fairly soon - turning this into a >>name server etc. is pretty easy. >> >> I can offer simple XML services - but if you want to really have fun >>you'll need to run an Erlang client :-) Now so far, I've made the polyprotocol ports and the apply server. So all I have to do is let each node chat to it's Manhattan neighbors. This gets me started and gets the network strongly connected. In (say) a network of 2^32 nodes each node would be permanently connected to it's 32 Manhattan distance 1 neighbors - or if they do not exists to distance 2 neighbors etc. The purpose of this is just to make sure that individual nodes do not get disconnected from the network - for this to happen all 32 nodes must fail (or the local link go down) - then I'd add routing etc. as different and logically separated overlays ... After this I'll add error correction etc Then I'll add leadership elections And then a layer with distributed hash tables (like chord, tapestry etc) and then (finally) the applications BWT Mike pointed this out to me: http://msdn.microsoft.com/longhorn/default.aspx?pull=/msdnmag/issues/04/01/indigo/default.aspx (don't say I told you so :-) /Joe > > There's not necessarily much discrepancy there, but I believe it > would be helpful to reveal how you've thought about it. > Proposing a uniform way of reporting unexpected things would > also be good; in one part of your examples, you use io:format/2, > while in another, you use something called ed_log:error/1. > > /Uffe > From jeinhorn@REDACTED Wed May 5 15:22:17 2004 From: jeinhorn@REDACTED (Jeffrey M. Einhorn) Date: 05 May 2004 08:22:17 -0500 Subject: gen leader In-Reply-To: <008401c43286$c5c16990$0e2d1081@ituniv398> References: <1083688314.2139.284.camel@dhcp-lom-194-186.futuresource.com> <008401c43286$c5c16990$0e2d1081@ituniv398> Message-ID: <1083763337.10035.102.camel@dhcp-lom-194-199.futuresource.com> Thomas, The ability of the gen_leader to work in single node environment is particularly useful to us when we run unit/acceptance tests, which frequently test only one node at a time. thanks for your time, -jeff einhorn On Wed, 2004-05-05 at 04:53, Thomas Arts wrote: > Dear Martin > > I am very glad to read that you can actually use the gen_leader code > and that it works fine for you. A while ago I posted a warning that there > still is a bug in the code that might cause you a daedlock, but we are > near to having a fix for that. New code has been written based on a > different algorithm (Scott D Stroller, "Leader Election in Distributed > Systems > with Crash Failures, 1997). We are verifying the code at the moment, > not to make the same mistake again :0). > > The reason why we excluded the one node case for the leader > election algorithm is that we saw it as an implementation to > support fault tolerance. In case of 1 node, there is no fault > tolerance and a leader election for it seemed useless to us. > > Best regards > Thomas > > > --- > Dr Thomas Arts > Program Manager > Software Engineering and Management > IT-university in Gothenburg > Box 8718, 402 75 Gothenburg, Sweden > http://www.ituniv.se/ > > Tel +46 31 772 6031 > Fax +46 31 772 4899 > > > ----- Original Message ----- > From: "Martin J. Logan" > To: > Sent: Tuesday, May 04, 2004 6:31 PM > Subject: gen leader > > > > This message is directed at the authors of gen_leader. I have been > > playing with the gen_leader code of jungerl fame. This code is just what > > is needed obviate all of our "global" problems. I do have one question > > about the gen_leader code. If I start a gen_leader in a node cluster > > consisting of a single node() the single gen_leader process will not > > elect itself leader. I have to fake it by saying > > gen_leader:start_link(leader, [node(), fake_node], [], > > gen_leader_callback, Args, Options). > > > > What is the reason that gen_leader wants another gen_leader to dominate > > and is not content to be his own boss:-) > > > > Cheers, > > Martin > > > > P.S how does jungerl become erlpan i.e more people know, love, and use > > it? > > > > From micke@REDACTED Wed May 5 15:35:32 2004 From: micke@REDACTED (micke) Date: Wed, 5 May 2004 15:35:32 +0200 Subject: Message Oriented Programming? Message-ID: <409C7858@epostleser.online.no> http://www.jot.fm/issues/issue_2004_05/column1 Lisp is mentioned... but not Erlang... From hakan@REDACTED Wed May 5 15:48:33 2004 From: hakan@REDACTED (Hakan Mattsson) Date: Wed, 5 May 2004 15:48:33 +0200 (MEST) Subject: Middle men wanted In-Reply-To: <37FB7AA6F5F9814FB634A7BF4C35A6F54026E4@ESEALNT442.al.sw.ericsson.se> Message-ID: On Wed, 5 May 2004, Ulf Wiger (AL/EAB) wrote: Uffe> Perhaps you could add some thinking about how to handle issues Uffe> like fault tolerance, in-service upgrade, etc... you know, that Uffe> OTP framework that you and some others invented a few years ago. ;) Uffe> Uffe> There's not necessarily much discrepancy there, but I believe it Uffe> would be helpful to reveal how you've thought about it. Uffe> Proposing a uniform way of reporting unexpected things would Uffe> also be good; in one part of your examples, you use io:format/2, Uffe> while in another, you use something called ed_log:error/1. This middle man plugin architecture is quite interesting, but why not take it a step further and make it independent of the actual transport (in this case TCP/IP)? In the Megaco application there are three types of plugins: - transport (TCP, UDP, SCTP, ...) - encoding (text pretty/compact, ASN.1 BER/PER, erlang binaries, ...) - user logic (gateway, controller, proxy, ...) The architecture is explained here: http://www.erlang.org/project/megaco/download/LATEST_MEGACO_DOC/html/megaco_architecture.html#2.2 http://www.erlang.org/project/megaco/download/LATEST_MEGACO_DOC/index.html Even if this application (of course) is biased towards the Megaco/H.248 protocol, its architecture is rather generic. It was not designed to be a generic man in the middle framework, but it almost is. /H?kan From bengt.kleberg@REDACTED Wed May 5 16:30:03 2004 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Wed, 05 May 2004 16:30:03 +0200 Subject: Xref - answered :-) In-Reply-To: References: Message-ID: <4098FA6B.9030505@ericsson.com> Joe Armstrong wrote: >To answer my own question. > >It seems like xref:d("."). does what I want. > > > greetings, while i am sure there is a logical explanation i have trouble with xref:d/1. when using xref:d("/beam/directory") i get [{deprecated,[]},{undefined,[]}] when i use my own solution (involving xref:add_directory() (or even xref:add_module() in case of problems) and xref:m()) i get [{cnhBlockedIci,[{cnhSpRh,check_and_set_blocked_ici,2}, {cnhSpRh,release_blocked_ici,2}]}] the latter result is the correct one (i have filtered away ({deprecated,[]}) . any suggestion where i am going wrong here? i have included my code. note that this code is supposed to be started from a unix ocmmand line like this: erl +A 2 -sasl sasl_error_logger false -noshell -q -s erlxrd main /beam/directory bengt -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: erlxrd.erl URL: From joe@REDACTED Wed May 5 16:31:55 2004 From: joe@REDACTED (Joe Armstrong) Date: Wed, 5 May 2004 16:31:55 +0200 (CEST) Subject: Middle men wanted In-Reply-To: Message-ID: On Wed, 5 May 2004, Hakan Mattsson wrote: > On Wed, 5 May 2004, Ulf Wiger (AL/EAB) wrote: > > Uffe> Perhaps you could add some thinking about how to handle issues > Uffe> like fault tolerance, in-service upgrade, etc... you know, that > Uffe> OTP framework that you and some others invented a few years ago. ;) > Uffe> > Uffe> There's not necessarily much discrepancy there, but I believe it > Uffe> would be helpful to reveal how you've thought about it. > Uffe> Proposing a uniform way of reporting unexpected things would > Uffe> also be good; in one part of your examples, you use io:format/2, > Uffe> while in another, you use something called ed_log:error/1. > > This middle man plugin architecture is quite interesting, but why not > take it a step further and make it independent of the actual transport > (in this case TCP/IP)? > Well my middle men were the things that talked to TCP streams. For HTTP/IRC/NNTP/POP3 etc just one layer works fine and I hadn't thought any further than this. As somebody pointed out many new protocols (like SOAP) are layered onto (say) HTTP - so a multi-tyred approach might be better. a chain of processes. In the case of SOAP there could be several processes involved. raw data gathering -> HTTP parsing -> SOAP parsing -> ... etc Cheers /Joe > In the Megaco application there are three types of plugins: > > - transport (TCP, UDP, SCTP, ...) > - encoding (text pretty/compact, ASN.1 BER/PER, erlang binaries, ...) > - user logic (gateway, controller, proxy, ...) > > The architecture is explained here: > > http://www.erlang.org/project/megaco/download/LATEST_MEGACO_DOC/html/megaco_architecture.html#2.2 > http://www.erlang.org/project/megaco/download/LATEST_MEGACO_DOC/index.html > > Even if this application (of course) is biased towards the > Megaco/H.248 protocol, its architecture is rather generic. > It was not designed to be a generic man in the middle framework, > but it almost is. > > /H?kan > From mlogan@REDACTED Wed May 5 16:56:13 2004 From: mlogan@REDACTED (Martin J. Logan) Date: 05 May 2004 09:56:13 -0500 Subject: gen leader In-Reply-To: <008401c43286$c5c16990$0e2d1081@ituniv398> References: <1083688314.2139.284.camel@dhcp-lom-194-186.futuresource.com> <008401c43286$c5c16990$0e2d1081@ituniv398> Message-ID: <1083768973.2139.306.camel@dhcp-lom-194-186.futuresource.com> The gen leader is a nice and quite useful piece of code. I am eager to get my hands on the updated version. As far as the one node situation is concerned my thoughts are I have a cluster of nodes and by virtue of the fact that I am using the gen leader I would like there to be a leader. A cluster of nodes to me is one or many distributed nodes. Say I am using the gen_leader:leader_call to achieve something if I cannot elect a leader even in the trivial case of a single node then I have to do have a case statement case nodes() of [] -> use the standard gen_leader:call Nodes -> use the gen_leader:leader_call end, I must then also add code to handle these two cases in my gen leader callback module. For me it would be easier just to have the leader say "oh there is no one else around... well then I am the leader" Martin On Wed, 2004-05-05 at 04:53, Thomas Arts wrote: > Dear Martin > > I am very glad to read that you can actually use the gen_leader code > and that it works fine for you. A while ago I posted a warning that there > still is a bug in the code that might cause you a daedlock, but we are > near to having a fix for that. New code has been written based on a > different algorithm (Scott D Stroller, "Leader Election in Distributed > Systems > with Crash Failures, 1997). We are verifying the code at the moment, > not to make the same mistake again :0). > > The reason why we excluded the one node case for the leader > election algorithm is that we saw it as an implementation to > support fault tolerance. In case of 1 node, there is no fault > tolerance and a leader election for it seemed useless to us. > > Best regards > Thomas > > > --- > Dr Thomas Arts > Program Manager > Software Engineering and Management > IT-university in Gothenburg > Box 8718, 402 75 Gothenburg, Sweden > http://www.ituniv.se/ > > Tel +46 31 772 6031 > Fax +46 31 772 4899 > > > ----- Original Message ----- > From: "Martin J. Logan" > To: > Sent: Tuesday, May 04, 2004 6:31 PM > Subject: gen leader > > > > This message is directed at the authors of gen_leader. I have been > > playing with the gen_leader code of jungerl fame. This code is just what > > is needed obviate all of our "global" problems. I do have one question > > about the gen_leader code. If I start a gen_leader in a node cluster > > consisting of a single node() the single gen_leader process will not > > elect itself leader. I have to fake it by saying > > gen_leader:start_link(leader, [node(), fake_node], [], > > gen_leader_callback, Args, Options). > > > > What is the reason that gen_leader wants another gen_leader to dominate > > and is not content to be his own boss:-) > > > > Cheers, > > Martin > > > > P.S how does jungerl become erlpan i.e more people know, love, and use > > it? > > > > From bengt.kleberg@REDACTED Wed May 5 17:04:08 2004 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Wed, 05 May 2004 17:04:08 +0200 Subject: gen leader In-Reply-To: <1083768973.2139.306.camel@dhcp-lom-194-186.futuresource.com> References: <1083688314.2139.284.camel@dhcp-lom-194-186.futuresource.com> <008401c43286$c5c16990$0e2d1081@ituniv398> <1083768973.2139.306.camel@dhcp-lom-194-186.futuresource.com> Message-ID: <40990268.30402@ericsson.com> Martin J. Logan wrote: ...deleted >Say I am using >the gen_leader:leader_call to achieve something if I cannot elect a >leader even in the trivial case of a single node then I have to do have >a case statement > >case nodes() of > [] -> use the standard gen_leader:call > Nodes -> use the gen_leader:leader_call >end, > >I must then also add code to handle these two cases in my gen leader >callback module. For me it would be easier just to have the leader say >"oh there is no one else around... well then I am the leader" > > fwiw: gen_leader is supposed to add safety be beeing redundant. currently we know that a successfull selection of a leader assures redundancy. if/when a single leader is also successfull, it will then be neccessary to find out if there is more than one node. bengt From bry@REDACTED Wed May 5 17:06:49 2004 From: bry@REDACTED (bry@REDACTED) Date: Wed, 5 May 2004 17:06:49 CET Subject: Middle men wanted Message-ID: <200405051706500.SM01012@Debug> > As somebody pointed out many new protocols (like SOAP) are layered > onto (say) HTTP - so a multi-tyred approach might be better. > > a chain of processes. In the case of SOAP there could be several > processes involved. > > raw data gathering -> HTTP parsing - > SOAP parsing -> ... > > The thing i was trying to convey about SOAP, which has my vote for worst technology of the last five years, is that in the current incarnation it is supposed to transport agnostic. It does not need to run over http although it almost invariably does. The reason for this agnosticity is i suppose the urgency in finding some selling point for the monstrosity that SOAP is, this is why recently I was at a WEB SERVICES discussion group, and when I argued against SOAP as being mostly useless and plain xml over http as being a better and easier solution in most cases the argument against this was that of course SOAP was meant to run over all sorts of protocols (which again i just don't trust, it seems unlikely that you would build useful applications this way). As an example of the stupidity of SOAP and as something that has some pertinency to middle man in demonstrating likely stumbling points I should think: http://www.w3.org/TR/2004/WD-soap12-rep- 20040428/ soap over http? nooooooo, it's http over soap. From ulf.wiger@REDACTED Wed May 5 17:13:11 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 5 May 2004 17:13:11 +0200 Subject: gen leader Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F54026EA@ESEALNT442.al.sw.ericsson.se> I agree that it would be useful to be able to start gen_leader with only one candidate node, e.g. for testing. Currently, there is no provision for adding candidates, even though it _can_ be done through a code_change (which should then be performed in a stable system state, and synchronized across all candidate nodes.) /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Bengt Kleberg > (AL/EAB) > Sent: den 5 maj 2004 17:04 > To: erlang-questions@REDACTED > Subject: Re: gen leader > > > Martin J. Logan wrote: > ...deleted > > >Say I am using > >the gen_leader:leader_call to achieve something if I cannot elect a > >leader even in the trivial case of a single node then I have > to do have > >a case statement > > > >case nodes() of > > [] -> use the standard gen_leader:call > > Nodes -> use the gen_leader:leader_call > >end, > > > >I must then also add code to handle these two cases in my gen leader > >callback module. For me it would be easier just to have the > leader say > >"oh there is no one else around... well then I am the leader" > > > > > > fwiw: gen_leader is supposed to add safety be beeing redundant. > currently we know that a successfull selection of a leader assures > redundancy. if/when a single leader is also successfull, it > will then be > neccessary to find out if there is more than one node. > > > bengt > From joe@REDACTED Wed May 5 17:14:21 2004 From: joe@REDACTED (Joe Armstrong) Date: Wed, 5 May 2004 17:14:21 +0200 (CEST) Subject: Middle men wanted In-Reply-To: <200405051706500.SM01012@Debug> Message-ID: > The thing i was trying to convey about SOAP, > which has my vote for worst technology of > the last five years, .... Oh, I though that was UML :-) /Joe From Mark.Geib@REDACTED Wed May 5 17:19:01 2004 From: Mark.Geib@REDACTED (Geib, Mark) Date: Wed, 05 May 2004 09:19:01 -0600 Subject: problem running erlang program in background Message-ID: <1083770340.27973.12.camel@bilbo.dev.uplink> I am having trouble on Linux running an erlang program in background. I have been using the command.. "nohup erl -s module start -noshell &" on other systems that are running linux. However, when I do the same with a new erlang program I get a message like.. [root@REDACTED mgtest]# nohup erl -s tcp_sniffer start -noshell & [1] 18929 [root@REDACTED mgtest]# nohup: appending output to `nohup.out' [1]+ Stopped nohup erl -s tcp_sniffer start -noshell [root@REDACTED mgtest]# and it will not run. Any ideas..? Thanks, Mark. From Susan.Bates@REDACTED Wed May 5 17:46:01 2004 From: Susan.Bates@REDACTED (Susan Bates) Date: Wed, 05 May 2004 16:46:01 +0100 Subject: 4 LECTURERS IN COMPUTER SCIENCE Message-ID: <40990C39.3000909@durham.ac.uk> UNIVERSITY OF DURHAM DEPARTMENT OF COMPUTER SCIENCE 4 Lecturer Posts Up to 4 appointments will be made at the level of Lecturer. It is expected that applicants will range from young researchers who have just completed their PhDs through to established academics with internationally-leading research profiles. Common to all appointments will be a high quality research portfolio or demonstrable potential of such. All positions are tenable from 1st September 2004 or from a mutually acceptable date thereafter. Further particulars can be obtained from the University's jobs pages at: https://jobs.dur.ac.uk/home.asp The Department of Computer Science has recently appointed 8 new members of academic staff, 7 of whom are due to arrive in Durham in summer 2004 and 1 at a later date (see http://www.durham.ac.uk/computer.science for more details). This second phase of our recruitment will take the number of full-time permanent academic staff up to 20, with the intention being to increase this number to 25 by 2006. The appointments will be split across the 2 research groups, which are Theoretical Computer Science, and Software Engineering and Distributed Systems. 2 Lectureships will support the new Professor of Computer Science, Professor Hajo Broersma, and 2 Lectureships will support the Software Engineering and Distributed Systems research group. As regards the 2 Lectureships in Theoretical Computer Science, applications are welcomed from candidates with research interests ranging across the subject, but applications are particularly encouraged from candidates with research interests in: algorithmic graph theory; computational complexity; graph theory and combinatorics; communications networks; and probabilistic and randomised algorithms. As regards the 2 Lectureships in Software Engineering and Distributed Computing, applications are welcomed from candidates whose research interests lie within the broad area covered by these subjects. However, applicants with research interests in visualisation and distributed architectures as they relate to e-Science or in inter-disciplinary applications are particular welcome. Applicants unsure as to whether their research expertise falls under that described above are encouraged to informally contact Professor Iain Stewart who can provide advice and guidance. As mentioned earlier, the first phase of our reorganisation commenced with the advertisement of positions in October 2003. Given that about 7 months have elapsed since then and previous applicants personal details may have changed considerably in that time, previous applicants for the positions advertised in October 2003 are encouraged to re-apply if they feel that their situation merits it. Again, any previous applicants who are undecided should contact Professor Iain Stewart for advice and guidance. Further details on the University of Durham can be found via the web-pages at http://www.durham.ac.uk, and on the Department of Computer Science via the web-pages at http://www.durham.ac.uk/computer.science. Informal enquiries about any of the positions may be made to Professor Iain Stewart: telephone +44 (0)191 3341720; e-mail i.a.stewart@REDACTED From dustin@REDACTED Thu May 6 03:45:12 2004 From: dustin@REDACTED (Dustin Sallings) Date: Wed, 5 May 2004 18:45:12 -0700 Subject: problem running erlang program in background In-Reply-To: <1083770340.27973.12.camel@bilbo.dev.uplink> References: <1083770340.27973.12.camel@bilbo.dev.uplink> Message-ID: <038C279D-9EFF-11D8-91FE-000A957659CC@spy.net> On May 5, 2004, at 8:19, Geib, Mark wrote: > I am having trouble on Linux running an erlang program in background. Why not just use -detached? -- SPY My girlfriend asked me which one I like better. pub 1024/3CAE01D5 1994/11/03 Dustin Sallings | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE L_______________________ I hope the answer won't upset her. ____________ From dustin@REDACTED Thu May 6 07:40:22 2004 From: dustin@REDACTED (Dustin Sallings) Date: Wed, 5 May 2004 22:40:22 -0700 Subject: systools and scripts Message-ID: I'm trying to use a makefile to build my application, but I can't figure out how to run systools from the erl commandline. I want to run the following command: systools:make_script("environ", [local]). ...but I can't seem to express that. I've just added another module to my build system that creates the .boot and the .tar.gz, but is this necessary? -- SPY My girlfriend asked me which one I like better. pub 1024/3CAE01D5 1994/11/03 Dustin Sallings | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE L_______________________ I hope the answer won't upset her. ____________ From mikael.karlsson@REDACTED Thu May 6 07:27:16 2004 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Thu, 6 May 2004 07:27:16 +0200 Subject: systools and scripts In-Reply-To: References: Message-ID: <200405060727.16865.mikael.karlsson@creado.com> Starting with erl -s or erl -run makes it possible to pass arguments as atoms or lists. So in your case I guess you would have to write some "glue" module that takes only atoms (or strings) and pass them on to the make_script with right types: erl -pa `pwd` -s mygluemodule make_script environ local -s erlang halt Or is there a better way? /Mikael torsdag 06 maj 2004 07:40 skrev Dustin Sallings: > I'm trying to use a makefile to build my application, but I can't > figure out how to run systools from the erl commandline. I want to run > the following command: > > systools:make_script("environ", [local]). > > ...but I can't seem to express that. > > > I've just added another module to my build system that creates the > .boot and the .tar.gz, but is this necessary? > > -- > SPY My girlfriend asked me which one I like better. > pub 1024/3CAE01D5 1994/11/03 Dustin Sallings > > | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE > > L_______________________ I hope the answer won't upset her. ____________ From bengt.kleberg@REDACTED Thu May 6 08:44:23 2004 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Thu, 06 May 2004 08:44:23 +0200 Subject: problem running erlang program in background In-Reply-To: <1083770340.27973.12.camel@bilbo.dev.uplink> References: <1083770340.27973.12.camel@bilbo.dev.uplink> Message-ID: <4099DEC7.9070704@ericsson.com> Geib, Mark wrote: >I am having trouble on Linux running an erlang program in background. > >I have been using the command.. >"nohup erl -s module start -noshell &" > > > there is no reason why my following suggestions should help (ie i have read the manual and your command line should work as it is). then, on the other hand, i have several programs written for The Great Win32 Computer Language Shootout (http://dada.perl.it/shootout/) tha run fine on my machine (solaris) but refuse to work under windows. so there might be some magic going on, hence these suggestions :-) 1 try the flag -noinput 2 put the flag -s (and its arguments) last on the command line bengt From dustin@REDACTED Thu May 6 08:50:12 2004 From: dustin@REDACTED (Dustin Sallings) Date: Wed, 5 May 2004 23:50:12 -0700 Subject: systools and scripts In-Reply-To: <200405060727.16865.mikael.karlsson@creado.com> References: <200405060727.16865.mikael.karlsson@creado.com> Message-ID: <9FBD032A-9F29-11D8-91FE-000A957659CC@spy.net> On May 5, 2004, at 22:27, Mikael Karlsson wrote: > erl -pa `pwd` -s mygluemodule make_script environ local -s erlang > halt > > Or is there a better way? That's pretty much what I did. It just seems unnecessary. -- SPY My girlfriend asked me which one I like better. pub 1024/3CAE01D5 1994/11/03 Dustin Sallings | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE L_______________________ I hope the answer won't upset her. ____________ From dustin@REDACTED Thu May 6 09:10:00 2004 From: dustin@REDACTED (Dustin Sallings) Date: Thu, 6 May 2004 00:10:00 -0700 Subject: io:format without IoDevice Message-ID: <634BC500-9F2C-11D8-91FE-000A957659CC@spy.net> Is there an sprintf like thing available? I'm a little dissatisfied with float_to_list for my output needs. I'd also like to feed through some of the other stuff ~p does. -- SPY My girlfriend asked me which one I like better. pub 1024/3CAE01D5 1994/11/03 Dustin Sallings | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE L_______________________ I hope the answer won't upset her. ____________ From bengt.kleberg@REDACTED Thu May 6 09:13:18 2004 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Thu, 06 May 2004 09:13:18 +0200 Subject: erlang at slashdot In-Reply-To: <9FBD032A-9F29-11D8-91FE-000A957659CC@spy.net> References: <200405060727.16865.mikael.karlsson@creado.com> <9FBD032A-9F29-11D8-91FE-000A957659CC@spy.net> Message-ID: <4099E58E.9080801@ericsson.com> greetings, presumably most of the ErlangQuestions readers have already seen this: http://developers.slashdot.org/developers/04/05/06/032213.shtml?tid=126&tid=156 which is really about http://www.dadgum.com/james/performance.html and the latter even includes a reference to _Great Computer Language Shootout bengt _ From vlad_dumitrescu@REDACTED Thu May 6 09:32:08 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Thu, 6 May 2004 09:32:08 +0200 Subject: io:format without IoDevice References: <634BC500-9F2C-11D8-91FE-000A957659CC@spy.net> Message-ID: From: "Dustin Sallings" > Is there an sprintf like thing available? I'm a little dissatisfied > with float_to_list for my output needs. I'd also like to feed through > some of the other stuff ~p does. Yes, you can use io_lib:format. regards, Vlad From mikael.karlsson@REDACTED Thu May 6 09:57:26 2004 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Thu, 6 May 2004 09:57:26 +0200 Subject: systools and scripts In-Reply-To: <9FBD032A-9F29-11D8-91FE-000A957659CC@spy.net> References: <200405060727.16865.mikael.karlsson@creado.com> <9FBD032A-9F29-11D8-91FE-000A957659CC@spy.net> Message-ID: <200405060957.26478.mikael.karlsson@creado.com> Have you checked the builder program. Qoute from from doc: >> This program compiles .rel, .script, .boot and sys.config files for erlang applications. It supports incremental and recursive builds, and is intended to be (much) easier and safer to use than doing it all manually. << It can be checked out from the jungerl project at sourceforge.net Otherwise Joes old ermake might be handy: http://www.erlang.org/user.html#ermake-2.0 Thu 06 maj 2004 08:50, Dustin Sallings: > On May 5, 2004, at 22:27, Mikael Karlsson wrote: > > erl -pa `pwd` -s mygluemodule make_script environ local -s erlang > > halt > > > > Or is there a better way? > > That's pretty much what I did. It just seems unnecessary. > From tobbe@REDACTED Thu May 6 09:55:55 2004 From: tobbe@REDACTED (=?ISO-8859-1?Q?Torbj=F6rn_T=F6rnkvist?=) Date: Thu, 06 May 2004 09:55:55 +0200 Subject: io:format without IoDevice In-Reply-To: <634BC500-9F2C-11D8-91FE-000A957659CC@spy.net> References: <634BC500-9F2C-11D8-91FE-000A957659CC@spy.net> Message-ID: <4099EF8B.9080003@nortelnetworks.com> Dustin Sallings wrote: > > Is there an sprintf like thing available? I'm a little > dissatisfied with float_to_list for my output needs. I'd also like to > feed through some of the other stuff ~p does. Try: io_lib:format/2 BTW: Would be fun if there were more traffic on the Erlang chat. (To try, use e.g chatzilla, click on freenode, choose a nickname, type: /join erlang) Cheers, Tobbe From thomas.arts@REDACTED Thu May 6 10:59:19 2004 From: thomas.arts@REDACTED (Thomas Arts) Date: Thu, 6 May 2004 10:59:19 +0200 Subject: gen leader References: <1083688314.2139.284.camel@dhcp-lom-194-186.futuresource.com> <008401c43286$c5c16990$0e2d1081@ituniv398> <1083768973.2139.306.camel@dhcp-lom-194-186.futuresource.com> <40990268.30402@ericsson.com> Message-ID: <02d301c43348$6aac38b0$0e2d1081@ituniv398> Hi Bengt > fwiw: gen_leader is supposed to add safety be beeing redundant. > currently we know that a successfull selection of a leader assures > redundancy. if/when a single leader is also successfull, it will then be > neccessary to find out if there is more than one node. I liked your reasoning, but I am not sure this claim holds. If you give an existing and a non-existing node name, a leader will be selected. However, there is no redundancy! I would like the gen_leader to be changed such that your claim is tru, since I think it is a really important observation. An observation I haven't thought of before. It is not part of the algorithm, but should be ensured from outside. Since the assurance of the redundancy comes partly from outside the algorithm it is possible to combine that claim with the wish to be able to test with one node. Just ensure that the redundancy is only guaranteed for two nodes and more. The one node case is then a special case. Cheers Thomas --- Dr Thomas Arts Program Manager Software Engineering and Management IT-university in Gothenburg Box 8718, 402 75 Gothenburg, Sweden http://www.ituniv.se/ Tel +46 31 772 6031 Fax +46 31 772 4899 From peter@REDACTED Thu May 6 15:49:51 2004 From: peter@REDACTED (Peter H|gfeldt) Date: Thu, 6 May 2004 15:49:51 +0200 (MET DST) Subject: systools and scripts In-Reply-To: <200405060957.26478.mikael.karlsson@creado.com> Message-ID: There is a module `target_system.erl' listed in the `System Principles' User's Guide. That module might be handy. /Peter > Have you checked the builder program. > Qoute from from doc: > >> > This program compiles .rel, .script, .boot and sys.config files for erlang > applications. It supports incremental and recursive builds, and is intended > to be (much) easier and safer to use than doing it all manually. > << > It can be checked out from the jungerl project at sourceforge.net > > Otherwise Joes old ermake might be handy: > http://www.erlang.org/user.html#ermake-2.0 > > Thu 06 maj 2004 08:50, Dustin Sallings: > > On May 5, 2004, at 22:27, Mikael Karlsson wrote: > > > erl -pa `pwd` -s mygluemodule make_script environ local -s erlang > > > halt > > > > > > Or is there a better way? > > > > That's pretty much what I did. It just seems unnecessary. > > > From mlogan@REDACTED Thu May 6 17:16:41 2004 From: mlogan@REDACTED (Martin J. Logan) Date: 06 May 2004 10:16:41 -0500 Subject: gen leader In-Reply-To: <02d301c43348$6aac38b0$0e2d1081@ituniv398> References: <1083688314.2139.284.camel@dhcp-lom-194-186.futuresource.com> <008401c43286$c5c16990$0e2d1081@ituniv398> <1083768973.2139.306.camel@dhcp-lom-194-186.futuresource.com> <40990268.30402@ericsson.com> <02d301c43348$6aac38b0$0e2d1081@ituniv398> Message-ID: <1083856600.2139.341.camel@dhcp-lom-194-186.futuresource.com> Thomas, Bengt, I agree with what you say. There are contexts in which a programmer simply wants leader election, not for any promise of redundancy, but instead for selecting a single location among one or many potential locations as a place to direct certain operations. In this context the issue of redundancy can be viewed as a separate one, in that operations should continue whether or not there is any redundancy or ever was redundancy. If redundancy is to be assured, then knowing that the leader election scheme will always find a single leader among candidates, one simple has to check for the existence of other candidates. My situation right now seems to warrant a split because in my test scenario there are times when I care little about fault tolerance. The single node case is simply the case where I don't check, in my own code, for the existence of other candidates because I don't care whether they are there or not. Cheers, Martin On Thu, 2004-05-06 at 03:59, Thomas Arts wrote: > Hi Bengt > > > fwiw: gen_leader is supposed to add safety be beeing redundant. > > currently we know that a successfull selection of a leader assures > > redundancy. if/when a single leader is also successfull, it will then be > > neccessary to find out if there is more than one node. > > I liked your reasoning, but I am not sure this claim holds. If you give > an existing and a non-existing node name, a leader will be selected. > However, there is no redundancy! > I would like the gen_leader to be changed such that your claim is > tru, since I think it is a really important observation. An observation > I haven't thought of before. It is not part of the algorithm, but should > be ensured from outside. > > Since the assurance of the redundancy comes partly from outside > the algorithm it is possible to combine that claim with the wish to > be able to test with one node. Just ensure that the redundancy is > only guaranteed for two nodes and more. The one node case is > then a special case. > > Cheers > Thomas > > > --- > Dr Thomas Arts > Program Manager > Software Engineering and Management > IT-university in Gothenburg > Box 8718, 402 75 Gothenburg, Sweden > http://www.ituniv.se/ > > Tel +46 31 772 6031 > Fax +46 31 772 4899 > > From vances@REDACTED Thu May 6 19:23:10 2004 From: vances@REDACTED (Vance Shipley) Date: Thu, 6 May 2004 13:23:10 -0400 Subject: systools and scripts In-Reply-To: References: Message-ID: <20040506172310.GC31652@frogman.motivity.ca> Dustin, Here's what I use in my make files. The erlc program recognizes .rel files and builds .boot files automatically. -Vance ERLC = erlc ERLCFLAGS = +no_debug_info +warn_unused_vars -W -v EMULATOR = beam %.boot:%.rel $(ERLC) $< %.tar.gz: all %.boot $(ERL) -noshell -run systools make_tar $* -run init stop From dustin@REDACTED Thu May 6 20:17:53 2004 From: dustin@REDACTED (Dustin Sallings) Date: Thu, 6 May 2004 11:17:53 -0700 Subject: systools and scripts In-Reply-To: <20040506172310.GC31652@frogman.motivity.ca> References: <20040506172310.GC31652@frogman.motivity.ca> Message-ID: On May 6, 2004, at 10:23, Vance Shipley wrote: > Here's what I use in my make files. The erlc program recognizes > .rel files and builds .boot files automatically. Oh, excellent. Your makefile sample got rid of a whole module for me. Thanks! -- Dustin Sallings From gerd@REDACTED Thu May 6 21:44:39 2004 From: gerd@REDACTED (Gerd Flaig) Date: Thu, 06 May 2004 21:44:39 +0200 Subject: jungerl/builder example? Message-ID: Hi, following Mikael Karlsson's suggestion, I took a look at builder (in jungerl). Do people still use it or do you use your own release creation tools? If somebody could show a small but complete example demonstrating automatic release creation (using builder or other tools), this would be really nice. Goodbyte, Gerd. -- Gerd Flaig Technik gerd@REDACTED Bei Schlund + Partner AG Brauerstra?e 48 D-76135 Karlsruhe Physics is like sex: sure, it may give some practical results, but that's not why we do it. -- Richard Feynman From dustin@REDACTED Thu May 6 22:45:16 2004 From: dustin@REDACTED (Dustin Sallings) Date: Thu, 6 May 2004 13:45:16 -0700 Subject: jungerl/builder example? In-Reply-To: References: Message-ID: <47DE1AFB-9F9E-11D8-B0A2-000393CFE6B8@spy.net> On May 6, 2004, at 12:44, Gerd Flaig wrote: > following Mikael Karlsson's suggestion, I took a look at builder (in > jungerl). Do people still use it or do you use your own release > creation tools? > > If somebody could show a small but complete example demonstrating > automatic release creation (using builder or other tools), this would > be really nice. Here's my Makefile: http://bsdboy.west.spy.net/cgi-bin/viewarch.cgi/dustin@REDACTED projects-2004/environ--head--1.0--patch-22/Makefile?cmd=text -- Dustin Sallings From roger.larsson@REDACTED Thu May 6 23:23:12 2004 From: roger.larsson@REDACTED (Roger Larsson) Date: Thu, 6 May 2004 23:23:12 +0200 Subject: OT? -NO! Essay: Programming as if Performance Mattered Message-ID: <200405062323.12433.roger.larsson@norran.net> http://www.dadgum.com/james/performance.html http://developers.slashdot.org/developers/04/05/06/032213.shtml?tid=126&tid=156 /RogerL -- Roger Larsson Skellefte? Sweden From kurtw@REDACTED Fri May 7 00:20:00 2004 From: kurtw@REDACTED (Kurt at DBC) Date: Fri, 07 May 2004 10:20:00 +1200 Subject: OT? -NO! Essay: Programming as if Performance Mattered In-Reply-To: <200405062323.12433.roger.larsson@norran.net> References: <200405062323.12433.roger.larsson@norran.net> Message-ID: <409ABA10.2010203@dbc.co.nz> Roger Larsson wrote: > http://www.dadgum.com/james/performance.html > http://developers.slashdot.org/developers/04/05/06/032213.shtml?tid=126&tid=156 > > /RogerL > D'oh beaten! And thanks James, a good read. How does it feel to be /.famous ? (: Cheers, Kurt. From anders_nygren2002@REDACTED Fri May 7 00:49:22 2004 From: anders_nygren2002@REDACTED (Anders Nygren) Date: Thu, 06 May 2004 17:49:22 -0500 Subject: Building on SuSE 9.0 In-Reply-To: <200405041821.i44ILsrR021599@spikklubban.it.uu.se> References: <200405041821.i44ILsrR021599@spikklubban.it.uu.se> Message-ID: <409AC0F2.4080406@yahoo.se> Kostis Sagonas wrote: > > I have run ./configure and at the end it says > > creating i686-pc-linux-gnu/config.h > > Or is it someother config.h that is missing? > > This is the config.h. If you believe the message you get your gcc > cannot find this file. This is because the first line should read: > > gcc -g -O3 -I/usr/local/src/otp_src_R9C-0/erts/i686-pc-linux-gnu -DHAVE_CONFIG_H -Wall > > rather than: > > gcc -g -O3 -I/usr/local/src/otp_src_R9C-0/erts/ -DHAVE_CONFIG_H -Wall > > so something is skrewed up during configure. In case anybody cares, something was wrong with my OTP installation. I deleted everything and reinstalled OTP and now it works. /Anders From erlang@REDACTED Fri May 7 10:17:45 2004 From: erlang@REDACTED (Peter-Henry Mander) Date: Fri, 7 May 2004 09:17:45 +0100 Subject: OT? -NO! Essay: Programming as if Performance Mattered In-Reply-To: <409ABA10.2010203@dbc.co.nz> References: <200405062323.12433.roger.larsson@norran.net> <409ABA10.2010203@dbc.co.nz> Message-ID: <20040507091745.1e999ebe.erlang@manderp.freeserve.co.uk> Hehe :-) how does it feel to be flamebait James? After reading the article, I had a poke around for myself, and found this in lists.erl (R9C) which made me curious: %% reverse(L) reverse all elements in the list L. Is now a BIF! reverse([] = L) -> L; reverse([_] = L) -> L; reverse([A, B]) -> [B, A]; reverse([A, B | L]) -> lists:reverse(L, [B, A]). Is it a BIF, or is it not? What is the purpose of these four clauses? Surely the BIF should handle these cases, or is this a tweak for optimisation? How does Erlang know to call this definition of lists:reverse/1 in lists.erl instead of the BIF definition? Another thing in http://www.dadgum.com/james/shootout.html mentioned the cost of inter-module calls, where replacing lists:append/2 with ++. Surely this cost must be vanishingly small, specially if the module is loaded and ready to go? And a third: "Changing element 50 of a 1,000,000 element tuple results in a new 1,000,000 element tuple." I've written some code to seek and replace tagged tuples in a tree-like Erlang term by following a path defined as a list of tag atoms which lead to the tagged tuple to replace. Is there a way I can represent a potentially large term in a way that avoids copying the whole term for each replacement e.g. using ets to represent the tree allowing in-place changes, followed by recreating the whole modified term when modifications are finished? Or maybe I should write an algorithm that makes multiple modifications in a single sweep... It's Friday. Maybe I need to relax and try not to worry! :-) Pete. On Fri, 07 May 2004 10:20:00 +1200 Kurt at DBC wrote: > Roger Larsson wrote: > > > http://www.dadgum.com/james/performance.html > > http://developers.slashdot.org/developers/04/05/06/032213.shtml?tid=126&tid=156 > > > > /RogerL > > > > D'oh beaten! > > And thanks James, a good read. > How does it feel to be /.famous ? (: > > Cheers, Kurt. -- "The Tao of Programming flows far away and returns on the wind of morning." From bjorn@REDACTED Fri May 7 10:42:03 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 07 May 2004 10:42:03 +0200 Subject: OT? -NO! Essay: Programming as if Performance Mattered In-Reply-To: <20040507091745.1e999ebe.erlang@manderp.freeserve.co.uk> References: <200405062323.12433.roger.larsson@norran.net> <409ABA10.2010203@dbc.co.nz> <20040507091745.1e999ebe.erlang@manderp.freeserve.co.uk> Message-ID: Peter-Henry Mander writes: > Hehe :-) how does it feel to be flamebait James? > > After reading the article, I had a poke around for myself, and found > this in lists.erl (R9C) which made me curious: > > %% reverse(L) reverse all elements in the list L. Is now a BIF! > > reverse([] = L) -> > L; > reverse([_] = L) -> > L; > reverse([A, B]) -> > [B, A]; > reverse([A, B | L]) -> > lists:reverse(L, [B, A]). > > Is it a BIF, or is it not? What is the purpose of these four > clauses? Surely the BIF should handle these cases, or is this a tweak > for optimisation? How does Erlang know to call this definition of > lists:reverse/1 in lists.erl instead of the BIF definition? Actually, it is lists:reverse/2 that is a BIF. (The comment is somewhat unclear.) The definition of for reverse/1 used to be: reverse(L) -> lists:reverse(L, []). but was changed to speed up reversal of short lists. Measurements show that the four-clause reverse/1 indeed is faster, but trying to special-case reverse more than 2 elements is slower than calling the BIF. > > Another thing in http://www.dadgum.com/james/shootout.html mentioned the > cost of inter-module calls, where replacing lists:append/2 with ++. > Surely this cost must be vanishingly small, specially if the module is > loaded and ready to go? Yes, inter-module calls are very cheap. As James guessed in his article, code such as "foo" ++ L is rewritten by the compiler to [$f,$o,$o|L] while no similar optimization is done if you call lists:append/2. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From richardc@REDACTED Fri May 7 11:34:18 2004 From: richardc@REDACTED (Richard Carlsson) Date: Fri, 7 May 2004 11:34:18 +0200 (MEST) Subject: OT? -NO! Essay: Programming as if Performance Mattered In-Reply-To: References: <200405062323.12433.roger.larsson@norran.net> <409ABA10.2010203@dbc.co.nz> <20040507091745.1e999ebe.erlang@manderp.freeserve.co.uk> Message-ID: On Fri, 7 May 2004, Bjorn Gustavsson wrote: > As James guessed in his article, code such as > > "foo" ++ L > > is rewritten by the compiler to > > [$f,$o,$o|L] > > while no similar optimization is done if you call lists:append/2. Here's the fix (they are just different names for the same function). =================================================================== RCS file: lib/compiler/src/sys_core_fold.erl,v retrieving revision 1.21 diff -u -r1.21 sys_core_fold.erl --- lib/compiler/src/sys_core_fold.erl 28 Apr 2004 16:38:58 -0000 1.21 +++ lib/compiler/src/sys_core_fold.erl 7 May 2004 09:29:57 -0000 @@ -673,6 +673,8 @@ fold_call_1(Call, M, F, Args); fold_call(Call, _M, _N, _Args) -> Call. +fold_call_1(Call, lists, append, [Arg1,Arg2]) -> + eval_append(Call, Arg1, Arg2); fold_call_1(Call, erlang, length, [Arg]) -> eval_length(Call, Arg); fold_call_1(Call, erlang, '++', [Arg1,Arg2]) -> Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://user.it.uu.se/~richardc/ "Having users is like optimization: the wise course is to delay it." -- Paul Graham From ulf.wiger@REDACTED Fri May 7 13:51:32 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 7 May 2004 13:51:32 +0200 Subject: large tuples (was RE: OT? -NO! Essay: Programming as if Performan ce Mattered) Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F54026F6@ESEALNT442.al.sw.ericsson.se> > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Peter-Henry > Mander > Sent: den 7 maj 2004 10:18 > To: erlang-questions@REDACTED > Subject: Re: OT? -NO! Essay: Programming as if Performance Mattered > > And a third: "Changing element 50 of a 1,000,000 element tuple results > in a new 1,000,000 element tuple." I've written some code to seek and > replace tagged tuples in a tree-like Erlang term by following a path > defined as a list of tag atoms which lead to the tagged tuple to > replace. > > Is there a way I can represent a potentially large term in a way that > avoids copying the whole term for each replacement e.g. using ets to > represent the tree allowing in-place changes, followed by > recreating the > whole modified term when modifications are finished? The 'lines' contrib on jungerl can actually be used for this. It's basically a tuple tree with array semantics. (There is also a 'dynarray' contrib on erlang.org, but lines is at least as efficient and more sophisticated.) The idea was to use it for e.g. editors, where you want an array of lines, but the lines.erl module doesn't really care how a "line" is represented -- it can be any erlang term. You can either create a new empty array, or dimension it for a default number of lines/elements. After this, you can use update/insert/append/delete to modify the array. For large arrays, it is _much_ more efficient than to update a tuple. As far as I know, the lines module has a user base of 1: Joe Armstrong decided to use it for some "emacs clone" (or rather perhaps a pico_emacs, right?) /Uffe From ulf.wiger@REDACTED Fri May 7 14:08:06 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 7 May 2004 14:08:06 +0200 Subject: jungerl/builder example? Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F54026F7@ESEALNT442.al.sw.ericsson.se> I don't have a pre-packaged example, but thought I'd show the contents of some files in an experimental build I did a while back: ========================= First, some directory listings $> pwd /home/etxuwig/work/temp/cathroot $> ls BUILD_OPTIONS patches cath_start.sh README install.beam scripts install.erl server-patch-src-0434.tgz install.sh testf lib ubf_log.txt mnesia $> ls scripts cath.boot cath.rel cath.start cath_load.script cath.load cath.script cath_load.boot sys.config That is, builder will create a cath.start shell script, as well as a cath_load script (same as cath_start, except that only basic applications are started - good for e.g. database install, etc.) ========================= The BUILD_OPTIONS script configuring ========================= builder's environment. $> cat BUILD_OPTIONS CATHROOT = case os:getenv("CATHROOT") of undefined -> exit({undefined, "CATHROOT"}); Value -> Value end. [{app_dir, {find_latest, cath}}, {apps, [rdbms, ubf_server, cath]}, {path, [CATHROOT ++ "/lib/*/ebin" | code:get_path()]}, {out_dir, CATHROOT ++ "/scripts"}, {{config,ubf_server}, [{ubf_server, [ %{port, 8800}, {services, [{8800, [{"file_server",file_plugin,[]}, {"irc_server",irc_plugin,[]}, {"test_server",test_plugin,[]}, {"cath_server",'cath.server.ubf_plugin', administrator} ]}, {8888, [{"cath_server",'cath.server.ubf_plugin', viewer}]} ]} ]} ]}, {erl_opts, "-sname cath -pa " ++ filename:join(CATHROOT, "patches")} ]. ========================= The shell script triggering the install. $> cat install.sh #!/bin/sh -fvx CATHROOT=$1 if [ "${CATHROOT}" = "" ]; then echo "useage: install " exit fi export CATHROOT \rm -f $CATHROOT/scripts/* \rm -rf $CATHROOT/mnesia/* erl -nostick -pa $CATHROOT/patches -pa $CATHROOT -s install start $CATHROOT chmod 755 cath_start.sh echo "Initializing database..." erl -sname cath -boot $CATHROOT/scripts/cath_load -config $CATHROOT/scripts/sys -boot_var CATH $CATHROOT -s install mnesia $CATHROOT echo "Done." ========================= The shell script triggering the install. $> cat lib/cath-0.8/src/cath.app.src [ {description, "Track&Field Admin Prototype"}, {id, "anon"}, {registered, []}, {applications, [kernel, stdlib, sasl, mnesia, rdbms, ubf_server]}, {env, []}, {mod, {'cath.server.application', []}}, {start_phases, [{go, []}]} ]. Hope this wasn't too confusing. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Gerd Flaig > Sent: den 6 maj 2004 21:45 > To: erlang-questions > Subject: jungerl/builder example? > > > Hi, > > following Mikael Karlsson's suggestion, I took a look at builder (in > jungerl). Do people still use it or do you use your own release > creation tools? > > If somebody could show a small but complete example demonstrating > automatic release creation (using builder or other tools), this would > be really nice. > > Goodbyte, Gerd. > -- > Gerd Flaig Technik gerd@REDACTED > Bei Schlund + Partner AG Brauerstra?e 48 D-76135 Karlsruhe > Physics is like sex: sure, it may give some practical results, > but that's not why we do it. -- Richard Feynman > From ekarttun@REDACTED Fri May 7 14:29:13 2004 From: ekarttun@REDACTED (Einar Karttunen) Date: Fri, 7 May 2004 15:29:13 +0300 Subject: Inserting without overwriting with mnesia or ets Message-ID: <20040507122913.GC6442@melkinkari.cs.Helsinki.FI> Hello I need a way to insert into ets/mnesia and fail if the key already exists. These failures should be very rare and exceptional, but not checking for them could corrupt data... Is there an efficient solution to this? The naive approach is not very good: insert(K,V) -> fun() -> case mnesia:wread(K) of [Exist] -> {abort, Exist}; _ -> mnesia:write(V) end end. - Einar Karttunen From ulf.wiger@REDACTED Fri May 7 14:44:48 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 7 May 2004 14:44:48 +0200 Subject: Inserting without overwriting with mnesia or ets Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F54026F9@ESEALNT442.al.sw.ericsson.se> The solution below is perhaps not fast, but it's generic. Iff you know that the table exists as a ram_copy locally (+ you know that the object cannot have been created earlier in the same transaction, in which case it would exist temporarily in another ets table - and that the object could not be in the process of being created in another simultaneous transaction, etc.), you can "cheat" and use ets:member/2, but you need to make sure you understand the implications of this, and determine whether it is safe to do so in _your_ case. Then you should highlight the code with comments reminding yourself that you've done something dirty. Given that some of the above conditions hold, you could check with mnesia:dirty_read/1, which works on all types of tables and even if the table is remote, but still has the same problems re. transaction safety. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Einar Karttunen > Sent: den 7 maj 2004 14:29 > To: erlang-questions@REDACTED > Subject: Inserting without overwriting with mnesia or ets > > > Hello > > I need a way to insert into ets/mnesia and fail if the > key already exists. These failures should be very rare > and exceptional, but not checking for them could corrupt > data... Is there an efficient solution to this? > > The naive approach is not very good: > > insert(K,V) -> > fun() -> > case mnesia:wread(K) of > [Exist] -> {abort, Exist}; > _ -> mnesia:write(V) > end > end. > > - Einar Karttunen > From Zoltan.Toth@REDACTED Fri May 7 14:49:22 2004 From: Zoltan.Toth@REDACTED (Zoltan Peter Toth) Date: Fri, 07 May 2004 14:49:22 +0200 Subject: Inserting without overwriting with mnesia or ets In-Reply-To: <20040507122913.GC6442@melkinkari.cs.Helsinki.FI> References: <20040507122913.GC6442@melkinkari.cs.Helsinki.FI> Message-ID: <409B85D2.40900@eth.ericsson.se> Einar Karttunen wrote: > Hello > > I need a way to insert into ets/mnesia and fail if the > key already exists. These failures should be very rare > and exceptional, but not checking for them could corrupt > data... Is there an efficient solution to this? > > The naive approach is not very good: > > insert(K,V) -> > fun() -> > case mnesia:wread(K) of > [Exist] -> {abort, Exist}; > _ -> mnesia:write(V) > end > end. Hi, If you have a RAM copy of your table on this host, you can check the existence of the key in the ETS table holding the RAM copy. (It has the same name as the mnesia table). That should be very fast. Of course it's more decent to access that table via mnesia:ets(...) :) Would that help ? Zoltan From luke@REDACTED Fri May 7 14:59:43 2004 From: luke@REDACTED (Luke Gorrie) Date: Fri, 07 May 2004 14:59:43 +0200 Subject: large tuples In-Reply-To: <37FB7AA6F5F9814FB634A7BF4C35A6F54026F6@ESEALNT442.al.sw.ericsson.se> (Ulf Wiger's message of "Fri, 7 May 2004 13:51:32 +0200") References: <37FB7AA6F5F9814FB634A7BF4C35A6F54026F6@ESEALNT442.al.sw.ericsson.se> Message-ID: "Ulf Wiger (AL/EAB)" writes: > The 'lines' contrib on jungerl can actually be used for this. > It's basically a tuple tree with array semantics. [...] > As far as I know, the lines module has a user base of 1: > Joe Armstrong decided to use it for some "emacs clone" > (or rather perhaps a pico_emacs, right?) I have something similar in the Jungerl too, cord.erl in the Ermacs editor. IIRC it's basically the same design as lines.erl except that it operates on contiguous/linear text rather than lines. Internally it breaks it into a tree with size-bounded binaries on the leaves. An excellent paper about how to easily write balanced trees in a functional language is: "Implementing sets efficiently in a functional language" http://www.swiss.ai.mit.edu/~adams/BB/ If you wanted a more tuple-like data structure then I think you could use the gb_trees module (in OTP) with the element-number for your key. The 'dict' module (a hashtable) may work well too. BTW, the other day I was going to convert some ETS code over to use gb_trees, but it was missing a 'next' function that I needed. I think gb_trees:iterator(Tree, KeyToStartFrom) would be a nice feature (for implementing SNMP 'get_next'). Cheers, Luke From hal@REDACTED Fri May 7 16:27:48 2004 From: hal@REDACTED (Hal Snyder) Date: Fri, 07 May 2004 09:27:48 -0500 Subject: ex11 + ssh X11 forwarding In-Reply-To: (Joe Armstrong's message of "Tue, 17 Feb 2004 20:48:03 +0100 (CET)") References: Message-ID: <87hdusb9cr.fsf@ghidra.vail> Joe Armstrong writes: > I have totally rewritten the Xauthentication routines :-) and use > unix domain sockets now. Joe you are a wizard and a rabble rouser what with UBF, ex11, your new army of middlemen, and so many other interesting creations. I am still plodding along absorbing the ideas from the last couple brainstorms. Specifically, the latest ex11 downloaded seems to have trouble when going through an ssh-forwarded connection. If I open an xterm and ssh to a remote host with X11 forwarding enabled, I can run xeyes and emacs-with-X and such, but ex11 is no go until going back to manually specified DISPLAY of my workstation and xhost +remote_host back on the workstation. ssh to remote_host with X11 forwarding enabled gives you DISPLAY in the remote session of remote_host:13.0 or such. ISTR talk of a fix for this. Is there one, or are there hints where to start digging re xauth and such? From erlang@REDACTED Fri May 7 17:07:38 2004 From: erlang@REDACTED (Peter-Henry Mander) Date: Fri, 7 May 2004 16:07:38 +0100 Subject: ex11 + ssh X11 forwarding In-Reply-To: <87hdusb9cr.fsf@ghidra.vail> References: <87hdusb9cr.fsf@ghidra.vail> Message-ID: <20040507160738.018fab90.erlang@manderp.freeserve.co.uk> Hi Hal, I'm curious, I don't have this ssh problem, ex11 X11 forwarding works fine over ssh. I think I'm using the current release, i.e. http://www.sics.se/~joe/ex11/download/release-2.tgz I get: [1007] echo $DISPLAY localhost:11.0 on a ssh xterm launched with ssh -f remote_host xterm which leads me to believe you may be unnecessarily specifying a DISPLAY, it should look as if the display is local. If I run the ex11 demo, it pops up with no problem. Pete. On Fri, 07 May 2004 09:27:48 -0500 Hal Snyder wrote: > Joe Armstrong writes: > > > I have totally rewritten the Xauthentication routines :-) and use > > unix domain sockets now. > > Joe you are a wizard and a rabble rouser what with UBF, ex11, your new > army of middlemen, and so many other interesting creations. > > > I am still plodding along absorbing the ideas from the last couple > brainstorms. Specifically, the latest ex11 downloaded seems to have > trouble when going through an ssh-forwarded connection. If I open an > xterm and ssh to a remote host with X11 forwarding enabled, I can run > xeyes and emacs-with-X and such, but ex11 is no go until going back to > manually specified DISPLAY of my workstation and xhost +remote_host > back on the workstation. > > ssh to remote_host with X11 forwarding enabled gives you DISPLAY in > the remote session of remote_host:13.0 or such. > > > ISTR talk of a fix for this. Is there one, or are there hints where to > start digging re xauth and such? -- "The Tao of Programming flows far away and returns on the wind of morning." From mlogan@REDACTED Fri May 7 17:57:42 2004 From: mlogan@REDACTED (Martin J. Logan) Date: 07 May 2004 10:57:42 -0500 Subject: systools and scripts In-Reply-To: References: Message-ID: <1083945462.2139.367.camel@dhcp-lom-194-186.futuresource.com> I wrote the following function that will apply any function from the command line. %%-------------------------------------------------------------------- %% @doc Allows any function to be called from the command line via erl -s %% all arguments should be passed in the following manner: %% erl -s mod func "arg1. " "arg2. "... %%
%% Variables: 
%%  MFSList - a list containing the mod func and a list of args to apply
comming via erl -s
%%
%% Types:
%%  MFAList = [Mod, Func|Args] Example [file, list_dir, '"/var/log". ']
%%
%% Example Invocation:
%%  erl -pz ../ebin/ -s fs_lib s_apply io format "\"hello ~p\". "
"[world]. "
%%   
%% 
%% @spec s_apply(MFAList) -> void() %% @end %%-------------------------------------------------------------------- s_apply([Mod, Func|Args]) -> io:format("fs_lib:s_apply args before parsing: ~w~n", [Args]), TokedArgs = lists:map(fun(ArgAtom) -> {ok, Toks, Line} = erl_scan:string(atom_to_list(ArgAtom), 1), {ok, Term} = erl_parse:parse_term(Toks), Term end, Args), io:format("apply the following: apply(~w, ~w, ~p)~n", [Mod, Func, TokedArgs]), apply(Mod, Func, TokedArgs). so to run this function from the command line for a function like io:format("hello ~p~n", [world]). you would invoke erl -pz ../ebin/ -s fs_lib s_apply io format "\"hello ~p\". " "[world]. " notice that all the arguments for the function that you want applied are strings containing terms. The containing strings are terminated with a . I'm trying to use a makefile to build my application, but I can't > figure out how to run systools from the erl commandline. I want to run > the following command: > > systools:make_script("environ", [local]). > > ...but I can't seem to express that. > > > I've just added another module to my build system that creates the > .boot and the .tar.gz, but is this necessary? > > -- > SPY My girlfriend asked me which one I like better. > pub 1024/3CAE01D5 1994/11/03 Dustin Sallings > | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE > L_______________________ I hope the answer won't upset her. ____________ From hal@REDACTED Fri May 7 19:28:17 2004 From: hal@REDACTED (Hal Snyder) Date: Fri, 07 May 2004 12:28:17 -0500 Subject: ex11 + ssh X11 forwarding In-Reply-To: <20040507160738.018fab90.erlang@manderp.freeserve.co.uk> (Peter-Henry Mander's message of "Fri, 7 May 2004 16:07:38 +0100") References: <87hdusb9cr.fsf@ghidra.vail> <20040507160738.018fab90.erlang@manderp.freeserve.co.uk> Message-ID: <87vfj89mfi.fsf@ghidra.vail> Peter-Henry Mander writes: > I'm curious, I don't have this ssh problem, ex11 X11 forwarding > works fine over ssh. I think I'm using the current release, > > i.e. http://www.sics.se/~joe/ex11/download/release-2.tgz > > I get: > > [1007] echo $DISPLAY > localhost:11.0 > > on a ssh xterm launched with > > ssh -f remote_host xterm > > which leads me to believe you may be unnecessarily specifying a > DISPLAY, it should look as if the display is local. Thanks for the reply. I am running release-2.tgz as well. $ md5 release-2.tgz MD5 (release-2.tgz) = 2684971c44c5c8f9d130ebf85adfedb5 I am not doing anything special to override default ssh X11 forwarding. (Names "remote" "wrkstn" below are X11 client and server respectively.) $ echo $DISPLAY localhost:10.0 $ xeyes ... works ... $ cd ~/ex11/release-2 $ gmake cd lib; make cd widgets; make erl -pa '../lib' -s example0 start Erlang (BEAM) emulator version 5.3 [source] [hipe] [threads:0] Eshell V5.3 (abort with ^G) 1> ex11_lib_driver:start Host="localhost:10.0" Host="remote" Screen=10 calling xauth:display2cookie Host="remote" Screen=10 ex11_lib_xauth:display2cookie Address="remote" PossNames=["127.0.0.1", "remote", "localhost", "127.0.0.1", "localhost.my.domain", "remote", "remote.local."] Required Number=10 Found address="remote.local" skipping record name="remote.local" family=256 skipping record name="192.168.149.80" family=0 skipping record name="remote.local" family=256 ... skipping record name="wrkstn.local" family=256 Trying brute force method L=[[89,182,... And the demo does not appear. But it appears if I set DISPLAY on remote to wrkstn:0.0 then do xhost +remote on wrkstn. Workstation (X11 server) is OpenBSD-2.7+ OpenSSH_2.9.9 XFree86 Version 3.3.6 Remote system (X11 client) is FreeBSD-5.0 OpenSSH_3.5p1 XFree86 Version 4.2.1 > If I run the ex11 demo, it pops up with no problem. Puzzling. From joe@REDACTED Fri May 7 23:55:20 2004 From: joe@REDACTED (Joe Armstrong) Date: Fri, 7 May 2004 23:55:20 +0200 (CEST) Subject: ex11 + ssh X11 forwarding In-Reply-To: <87hdusb9cr.fsf@ghidra.vail> Message-ID: (Hi Hal) Let me try and give a quick answer here. The ex11 initialization is a total pain in what I believe you Americans call the butt - just when I think it works on all know machines - it fails. This is (I think) because many machines are mis configured but miraculously the standard X libraries account for all the different forms of mis-configuration. Just when I thought things were working ex11 bombed on a machine that returned a fully qualified hostname whereas the machine where I had tested return just the first part of the hostname.... The X forwarding through SSL works fine on my test machine (home + work) but is also know to fail. On some systems UNIX domain sockets work on other they don't On some machine ... etc. All this has been seriously delaying the next release (This is a shame since I've implemented a emacs-widget, a canvas widget, list selector widget, map widget ....etc.) ((Oh and even erlpoint - my humble attempt at a power point clone)) What I will do is the following: I'll re-write the initialization to produce a nice error report in a file and ask people to send it to me if initialization fails. If you guys (and this is mean in the American sence of the word and is not intended as a gender specific reference) can run this on as many machines as possible I should be able to figure out some code that works on all machine no matter how screwed up their configuration files are. Some other stuff that I just got working is my "polyport" server - a polyport is a port which understands a heck of a lot of different protocols. This means you can send Erlang terms/Erlang binaries/XML terms/and HTTP request all to the same port and the polyport figures out which middle man to call and bob's your uncle .. Utopian bliss. I have a polyport server running on one of the planet lab nodes - unfortunately it dies when I log out - even though I've nohup'ed it. My goal is to implement a P2P IRC/distributed file systems on planet lab and interface it through polyports ((Why? - so people using "other languages" TM (poor sods) can write their own clients using (horrors) XML or some other daft stuff. Programming a polyport server (or client) in Erlang is a doodle, and the XML is for free as it were. The trick (if it can be called a trick) is to just to replace the Erlang external term format with an XML representation, then you get an XML interface for free. So far my polyport acts as a web server and a factorial machine. If you send the port {fac, 100} it replies 93326215443944152681699238856266700490715968264381621468592963895217599993229915 608941463976156518286253697920827223758251185210916864000000000000000000000000. and if you send it fac 20 it replies 2432902008176640000 Which appeals to my sense of humor. -oOo- I guess if you've been reading this list you'll now realise why I want to start collecting middle men :-) It also prompts the following question: How many differnt protocols can we distiguish my parsing the first line of the protocol?? So far I can detect the difference between Erlang terms HTTP and XML but I guess this breaks down quickly :-( It's a pity the people who wrote all those RFC's didn't have the benefit of hindsight It is late - and I must go and sleep Let the force be with you /Joe On Fri, 7 May 2004, Hal Snyder wrote: > Joe Armstrong writes: > > > I have totally rewritten the Xauthentication routines :-) and use > > unix domain sockets now. > > Joe you are a wizard and a rabble rouser what with UBF, ex11, your new > army of middlemen, and so many other interesting creations. > > > I am still plodding along absorbing the ideas from the last couple > brainstorms. Specifically, the latest ex11 downloaded seems to have > trouble when going through an ssh-forwarded connection. If I open an > xterm and ssh to a remote host with X11 forwarding enabled, I can run > xeyes and emacs-with-X and such, but ex11 is no go until going back to > manually specified DISPLAY of my workstation and xhost +remote_host > back on the workstation. > > ssh to remote_host with X11 forwarding enabled gives you DISPLAY in > the remote session of remote_host:13.0 or such. > > > ISTR talk of a fix for this. Is there one, or are there hints where to > start digging re xauth and such? > From vlad_dumitrescu@REDACTED Sat May 8 22:51:03 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Sat, 8 May 2004 22:51:03 +0200 Subject: [ANN] Release of Otp.Net framework Message-ID: Hi all, I have converted jinterface to C#, and since it works I thought I'd release it. The code can be found on Jungerl, the lib/otp.net directory. The release notes are appended. There's no docs, since it's working just like jinterface. Please let me know if someone starts using it. I hope the make process of jungerl won't choke -- I didn't write any Makefile, but used Borland's C#Builder. I wonder about the copyright licence from the original code. Since it's a direct translation, I think the original developer is still Ericsson, so I left the original notice in place. If anyone thinks it should be otherwise, let me know. regards, Vlad Release notes ------------- V 0.2, May 2004 / Vlad Dumitrescu --------------------------------- This is a direct conversion from the Java code of jinterface-1.2.1.1 (from R9C-0). It should therefore be pretty stable and deserve a version number closer to 1, but I'd like first to have it tested by more people. I used a CloneObject class written by Amir Harel (http://www.codeproject.com/csharp/cloneimpl_class.asp). There's no copyright notice accompanying the code, so I contacted the author (no answer yet). I've been using Borland's C#Builder. There are some VisualStudio files, but they aren't current. I'll try to fix them when I get to work (where I have MS tools). Known issues: - OtpSelf.accept() won't work, because of some issues with member visibility in System.Net.Sockets.TcpClient. The workaround is to always initiate connections from the C# node. [*] - If running the test program several times in a row, sometimes it succeeds to connect, sometimes it doesn't. I haven't figured out if it's a real problem or a timeout in the Erlang node (not allowing connections to be made too often). - tracing level can now only be set in the code, because I don't know what would be the replacement for .properties files in C#. - I am not sure about the thread synchronization stuff in GenericQueue. It really hits me to rediscover how gory it can be to do concurrency in anything else than Erlang! Have fun! /Vlad From hal@REDACTED Sun May 9 01:29:49 2004 From: hal@REDACTED (Hal Snyder) Date: Sat, 08 May 2004 18:29:49 -0500 Subject: Inserting without overwriting with mnesia or ets In-Reply-To: <37FB7AA6F5F9814FB634A7BF4C35A6F54026F9@ESEALNT442.al.sw.ericsson.se> ("Ulf Wiger's message of "Fri, 7 May 2004 14:44:48 +0200") References: <37FB7AA6F5F9814FB634A7BF4C35A6F54026F9@ESEALNT442.al.sw.ericsson.se> Message-ID: <87u0yqxzte.fsf@ghidra.vail> "Ulf Wiger (AL/EAB)" writes: > The solution below is perhaps not fast, but it's generic. Just to make sure I'm on the same page with you guys, let me rephrase things a little. Feel free to correct if I missed something. I guess the thread is about distributed atomic test-and-set. The "generic approach" below is needlessly slow if a. updates always happen on one node b. replicas are kept on other nodes for reliability only in which case you don't want the overhead of locking the replicas when doing test-and-set. A faster approach would be to take a process somewhere, give it a table (mnesia or ets or hash) updated by no other process and put it in a receive loop to provide ACID test-and-set to the rest of the system. Or does some class of mnesia calls already provide the aforesaid serialization? Next comes a question about mnesia and dirty ops, which I think is mostly answered by Ulf's previous reply: under what conditions is a sequence of dirty reads and writes from a single process to a mnesia table consistent, i.e. each read or write sees the table as if all previous updates have completed in order, if no other process writes to the table? The answer seems to be: a. table exists as ram_copy locally (+ .. ) as in next paragraph b. remote tables too? Doesn't that get into questions of message ordering as discussed recently on this list? > Iff you know that the table exists as a ram_copy locally (+ you know > that the object cannot have been created earlier in the same > transaction, in which case it would exist temporarily in another ets > table - and that the object could not be in the process of being > created in another simultaneous transaction, etc.), you can "cheat" > and use ets:member/2, but you need to make sure you understand the > implications of this, and determine whether it is safe to do so in > _your_ case. Then you should highlight the code with comments > reminding yourself that you've done something dirty. > > Given that some of the above conditions hold, you could check with > mnesia:dirty_read/1, which works on all types of tables and even if > the table is remote, but still has the same problems re. transaction > safety. ... [generic solution] >> [mailto:owner-erlang-questions@REDACTED]On Behalf Of Einar Karttunen >> Sent: den 7 maj 2004 14:29 >> To: erlang-questions@REDACTED >> Subject: Inserting without overwriting with mnesia or ets >> The naive approach is not very good: >> >> insert(K,V) -> >> fun() -> >> case mnesia:wread(K) of >> [Exist] -> {abort, Exist}; >> _ -> mnesia:write(V) >> end >> end. From dustin@REDACTED Sun May 9 05:44:54 2004 From: dustin@REDACTED (Dustin Sallings) Date: Sat, 8 May 2004 20:44:54 -0700 Subject: distributed app problem on OS X Message-ID: <3B90BAA0-A16B-11D8-8575-000A957659CC@spy.net> I'm having a problem with my distributed app which I believe I've narrowed down to inet_db's lookup mechanism. My .erlang has inet_db:set_lookup([native]) which allows me to interactively attach to nodes and do whatever I need to do, but it isn't processed until *after* my application is started (or, at least, after the sync_nodes_timeout). Is there a way to more directly configure the resolution? -- SPY My girlfriend asked me which one I like better. pub 1024/3CAE01D5 1994/11/03 Dustin Sallings | Key fingerprint = 87 02 57 08 02 D0 DA D6 C8 0F 3E 65 51 98 D8 BE L_______________________ I hope the answer won't upset her. ____________ From fritchie@REDACTED Sun May 9 06:43:16 2004 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Sat, 08 May 2004 23:43:16 -0500 Subject: ex11 + ssh X11 forwarding In-Reply-To: Message of "Fri, 07 May 2004 23:55:20 +0200." Message-ID: <200405090443.i494hGYg046678@snookles.snookles.com> >>>>> "ja" == Joe Armstrong writes: ja> How many differnt protocols can we distiguish my parsing the first ja> line of the protocol?? I've been catching up on my erlang-questions reading, and the very first question that hit me while reading the "middle man" discussion is: how do you deal with protocols where the server (the thing being contacted by the client/initiator) is supposed to say the first thing? NNTP, SMTP, LMTP, IMAP4, and POP3 all have the server send a message immediately after the client establishes a TCP connection between the two. I'd guess that you'd require either: 1. The cia_recently_declassified_clairvoyance_has_remaining_bugs.erl module. 2. Some sort of hint to the polyglot that when a transport protocol session is established (for those that are indeed session-centric) that you need to speak up first and, by the way, here are some hint(s) of what you might say to get the conversation started. -Scott From ulf.wiger@REDACTED Sun May 9 10:13:36 2004 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Sun, 09 May 2004 10:13:36 +0200 Subject: Inserting without overwriting with mnesia or ets In-Reply-To: <87u0yqxzte.fsf@ghidra.vail> References: <37FB7AA6F5F9814FB634A7BF4C35A6F54026F9@ESEALNT442.al.sw.ericsson.se> <87u0yqxzte.fsf@ghidra.vail> Message-ID: On Sat, 08 May 2004 18:29:49 -0500, Hal Snyder wrote: > Just to make sure I'm on the same page with you guys, let me rephrase > things a little. Feel free to correct if I missed something. > > I guess the thread is about distributed atomic test-and-set. The > "generic approach" below is needlessly slow if > > a. updates always happen on one node > b. replicas are kept on other nodes for reliability only Actually, the "generic approach" is needlessly slow unless one has to account for the possibility of multiple processes simultaneously performing the test-and-set operation, and there is no practical way to serialize the operations using a server (see below.) A very simple and useful pattern in Erlang is to create a test-and-set server, which serializes all accesses to the resource in question. The server can then opt to use dirty operations or ets, depending on storage criteria. In some cases, one may still want to use transactions for their rollback semantics (another aspect on atomicity), but in this particular case, that doesn't add much benefit. This solution is very easy to understand, and it is also quite fast. > Next comes a question about mnesia and dirty ops, which I think is > mostly answered by Ulf's previous reply: under what conditions is a > sequence of dirty reads and writes from a single process to a mnesia > table consistent, i.e. each read or write sees the table as if all > previous updates have completed in order, if no other process writes > to the table? The sequence is consistent if no other process writes to the table, and provided that the sequence runs to completion. (: > The answer seems to be: > > a. table exists as ram_copy locally (+ .. ) as in next paragraph No, whether it is ram, disc, or disc_only doesn't matter for dirty ops. They will also honour indeces. Storage and location independence, as well as replication support are basically what you gain from using dirty ops instead of ets. > b. remote tables too? Doesn't that get into questions of message ordering > as discussed recently on this list? Dirty operations support remote tables; ets operations don't. Not really, as long as the criterion that only one process is updating the resource still holds. /Uffe -- Ulf Wiger From rvg@REDACTED Mon May 10 09:03:32 2004 From: rvg@REDACTED (Rudolph van Graan) Date: Mon, 10 May 2004 09:03:32 +0200 Subject: Is erlang too small? Message-ID: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> It goes like this... Recently, we've been working on a number of projects, two of which needed some XML and some needed http interaction (using http requests). In both cases, I've run into some bugs somewhere in Erlang which I just didn't want to trace, mostly because of a lack of time. I am not saying the http or xml contribs don't work - they did, but we ran into some issues the cause of which was difficult to understand, that we had to abandon the specific (erlang only) approach. For another difficult interface we needed to implement some SOAP rpc calls to a service, but again, there was no useful erlang code to help us with this. Initially, we tried doing everything in pure erlang and almost succeeded. Now I find myself building more and more Java helpers, which strictly speaking should not have been necessary. The next problem will be relational databases. Some projects just need to communicate with these beasts and again I see us using a java interface between erlang and the database. Now an odbc interface does exist, but it is not complete enough to warrant us building a full scale system using it. We will probably end up building a java database layer to handle our queries. So... What can we (as a community) do to make sure erlang can communicate with things in the real (internet) world? One cannot escape Soap, nor communicating with relational db's. Personally, I think that the open source guys do a great job, but can we follow and stay up to date with all the important developments? How does one make sure that erlang does evolve? My opinion is that we must focus on the important internet interfaces and make sure they work? Examples: XML, SOAP, Database (Not internet, but still) SMTP, HTTP (XML and HTTP does have erlang components and I appreciate the author's efforts, but they still need a lot of work in order to keep up with all the specifications out there) My feeling is that the only way forward is to get away from the one-author-per-interface model, and to get a larger support base in place. Rudolph van Graan Telecommunications Specialist Pattern Matched Technologies E-Mail: rvg@REDACTED Mobile: +27 82 905 7496 Fax: +27 12 667 5342 Web: www.patternmatched.com -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2112 bytes Desc: not available URL: From francesco@REDACTED Mon May 10 08:59:03 2004 From: francesco@REDACTED (Francesco Cesarini) Date: Mon, 10 May 2004 07:59:03 +0100 Subject: Erlang Workshop in Snowbird, Utah: NEW SUBMISSION DATES Message-ID: <409F2836.4000100@erlang-consulting.com> Please note that the deadline for submissions to the ACM SIGPLAN Erlang Workshop has been moved forward one week to May 31. This is to co-ordinate with author notification of the ICFP which is on May 26, allowing authors who have not had their papers accepted in the conference to submit them to the workshop. For more information, visit the workshop web site AT http://www.erlang.se/workshop/2004/ or contact any of the committee members. Regards, Francesco Cesarini -- http://www.erlang-consulting.com From ekarttun@REDACTED Mon May 10 11:14:41 2004 From: ekarttun@REDACTED (Einar Karttunen) Date: Mon, 10 May 2004 12:14:41 +0300 Subject: Is erlang too small? In-Reply-To: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> References: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> Message-ID: <20040510091441.GA15698@melkinkari.cs.Helsinki.FI> On 10.05 09:03, Rudolph van Graan wrote: > SMTP, Yaws source has a functional SMTP client module... For me the main problem is the flat module namespace - it is very hard to find the correct module. This could be solved even without any real changes by adding a "category" header to modules. -module(foo). -category([bar]). Now just make all documentation generation tools look for it and most of the problem is solved. As for various small usefull things a standard way of creating hex presentations of strings/binaries would be nice like: hex(Bin) when binary(Bin) -> hex(binary_to_list(Bin)); hex([]) -> ""; hex([H|T]) -> [A,B] = if H == 0 -> "00"; H < 16 -> [$0,element(H,{$1,$2,$3,$4,$5,$6,$7,$8,$9,$A,$B,$C,$D,$E,$F})]; true -> erlang:integer_to_list(H,16) end, [A,B|hex(T)]. Yaws has something similar too. Sha1 checksums would be nice. - Einar Karttunen From mickael.remond@REDACTED Mon May 10 12:27:29 2004 From: mickael.remond@REDACTED (=?iso-8859-15?Q?Micka=EBl_R=E9mond?=) Date: Mon, 10 May 2004 12:27:29 +0200 Subject: Is erlang too small? In-Reply-To: <20040510091441.GA15698@melkinkari.cs.Helsinki.FI> References: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> <20040510091441.GA15698@melkinkari.cs.Helsinki.FI> Message-ID: On Mon, 10 May 2004 12:14:41 +0300, Einar Karttunen wrote: > For me the main problem is the flat module namespace - it is very > hard to find the correct module. This could be solved even without > any real changes by adding a "category" header to modules. You are not doomed to use a flat namespace. Package have been introduced in Erlang. The mechanism is not yet very popular, mainly because of old habits (to speak about myself), but packages work: http://www.erlang.se/publications/packages.html -- Micka?l R?mond http://www.erlang-projects.org/ From magnus.thoang@REDACTED Mon May 10 12:34:56 2004 From: magnus.thoang@REDACTED (=?ISO-8859-1?Q?Magnus_Tho=E4ng?=) Date: Mon, 10 May 2004 12:34:56 +0200 Subject: Is erlang too small? In-Reply-To: <20040510091441.GA15698@melkinkari.cs.Helsinki.FI> References: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> <20040510091441.GA15698@melkinkari.cs.Helsinki.FI> Message-ID: <409F5AD0.1020000@ericsson.com> Einar Karttunen wrote: > On 10.05 09:03, Rudolph van Graan wrote: ... some suggestions ... > Sha1 checksums would be nice. There are interface functions for the OpenSSL SHA-1 functions here: crypto:sha/1, OR crypto:sha_init/0, crypto:sha_update/2, crypto:sha_final/1 -- Magnus Tho?ng ?L/EAB/UPD/EP Multi Service Gateway Ericsson AB Core Network Development Tel: + 46 8 719 22 41 Fax: + 46 8 719 77 50 From ekarttun@REDACTED Mon May 10 12:36:08 2004 From: ekarttun@REDACTED (Einar Karttunen) Date: Mon, 10 May 2004 13:36:08 +0300 Subject: Is erlang too small? In-Reply-To: References: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> <20040510091441.GA15698@melkinkari.cs.Helsinki.FI> Message-ID: <20040510103608.GB15698@melkinkari.cs.Helsinki.FI> On 10.05 12:27, Micka?l R?mond wrote: > You are not doomed to use a flat namespace. Package have been introduced > in Erlang. The mechanism is not yet very popular, mainly because of old > habits (to speak about myself), but packages work: > > http://www.erlang.se/publications/packages.html That does not really help. Currently there are tons of modules on the toplevel and moving them deeper into a hierarchy would break all code. Of course one can do sensible things with one's own code but that is little help as long as the whole bundled library is a single huge namespace. In my opinion the real problem is not so much technical, but organisation of documentation. Currently if I need some functionality, it is quite hard to find it. Of course this is a nonissue for people with many years of experience with the library, but it makes things harder for newbies. - Einar Karttunen From mickael.remond@REDACTED Mon May 10 13:02:16 2004 From: mickael.remond@REDACTED (=?iso-8859-15?Q?Micka=EBl_R=E9mond?=) Date: Mon, 10 May 2004 13:02:16 +0200 Subject: Is erlang too small? In-Reply-To: <20040510103608.GB15698@melkinkari.cs.Helsinki.FI> References: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> <20040510091441.GA15698@melkinkari.cs.Helsinki.FI> <20040510103608.GB15698@melkinkari.cs.Helsinki.FI> Message-ID: On Mon, 10 May 2004 13:36:08 +0300, Einar Karttunen wrote: > On 10.05 12:27, Micka?l R?mond wrote: >> You are not doomed to use a flat namespace. Package have been introduced >> in Erlang. The mechanism is not yet very popular, mainly because of old >> habits (to speak about myself), but packages work: >> >> http://www.erlang.se/publications/packages.html > > That does not really help. Currently there are tons of modules on the > toplevel and moving them deeper into a hierarchy would break all code. > Of course one can do sensible things with one's own code but that is > little help as long as the whole bundled library is a single huge > namespace. I agree, but you do not need to invent new mechanism built into the language. The mechanism is already there and just need to be used. > In my opinion the real problem is not so much technical, but > organisation of documentation. Currently if I need some functionality, > it is quite hard to find it. Of course this is a nonissue for > people with many years of experience with the library, but it > makes things harder for newbies. I agree. We are trying to help with this on Erlang-projects. Something like CPAN for Erlang is already in discussion, althought it will take some time to emerge. -- Micka?l R?mond http://www.erlang-projects.org/ From vlad_dumitrescu@REDACTED Mon May 10 13:41:40 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Mon, 10 May 2004 13:41:40 +0200 Subject: Is erlang too small? References: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> <20040510091441.GA15698@melkinkari.cs.Helsinki.FI> <20040510103608.GB15698@melkinkari.cs.Helsinki.FI> Message-ID: From: "Einar Karttunen" > In my opinion the real problem is not so much technical, but > organisation of documentation. Currently if I need some functionality, > it is quite hard to find it. Of course this is a nonissue for > people with many years of experience with the library, but it > makes things harder for newbies. I agree too, and would also like to bring up the issue of all the small utility functions that lie outspread through the different applications - the worst is that many of those applications aren't in the standard libraries. There have been improvements, and some utilities/improvements found their way into the standard libraries, but there's still work to do. The above sounds a little negative which I didn't intend, so I want also to add a token of appreciation for the OTP team. Thanks! No library is ever perfect and there are always things that startle newbies. Don't be afraid to ask here - this lists' members are very helpful. I remember someone complained we are too helpful, as people get help here instead of hiring consultants ;-) /Vlad From ingela@REDACTED Mon May 10 15:20:41 2004 From: ingela@REDACTED (Ingela Anderton) Date: Mon, 10 May 2004 15:20:41 +0200 Subject: Is erlang too small? References: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> Message-ID: <16543.33193.184455.685941@gargle.gargle.HOWL> Rudolph van Graan wrote: > Now an odbc interface does exist, but it is not > complete enough to warrant us building a full scale system using it. We > will probably end up building a java database layer to handle our > queries. I am not making any promsies, but was it that you feel is missing in the odbc interface? The latest odbc (2.0 will make it to open source soon) has the following releas notes. * Erlang ODBC now handles batches of queries and can return multiple result sets. (Own Id: OTP-4642) (Aux Id: seq7766) * The old interface that became deprecated in odbc 1.0 has now been removed. (*** POTENTIAL INCOMPATIBILITY ***) (Own Id: OTP-4794) * Erlang ODBC now supports parameterized queries for the most common ODBC data types. (Own Id: OTP-4821) * SQL_NUMERIC and SQL_DECIMAL columns are converted to integer and float values if possible. (Own Id: OTP-4826) * Result sets are now by default returned as a list of tuples which is the most intuitive and useful mapping. To keep some degree of backwards compatibility you may turn this off to get the old behavior that result sets are returned as lists of lists. However do not use this in new code as it is considered a deprecated feature that eventually will disappear. (*** POTENTIAL INCOMPATIBILITY ***) (Own Id: OTP-4850) -- / Ingela Ericsson AB - OTP team From kent@REDACTED Mon May 10 16:26:03 2004 From: kent@REDACTED (Kent Boortz) Date: Mon, 10 May 2004 16:26:03 +0200 Subject: Is erlang too small? In-Reply-To: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> (Rudolph van Graan's message of "Mon, 10 May 2004 09:03:32 +0200") References: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> Message-ID: Rudolph van Graan writes: > So... What can we (as a community) do to make sure erlang can > communicate with things in the real (internet) world? One cannot > escape Soap, nor communicating with relational db's. Personally, I > think that the open source guys do a great job, but can we follow and > stay up to date with all the important developments? How does one make > sure that erlang does evolve? > > My opinion is that we must focus on the important internet interfaces > and make sure they work? Examples: > > XML, > SOAP, > Database (Not internet, but still) > SMTP, > HTTP > > (XML and HTTP does have erlang components and I appreciate the > author's efforts, but they still need a lot of work in order to keep > up with all the specifications out there) > > My feeling is that the only way forward is to get away from the > one-author-per-interface model, and to get a larger support base in > place. Do you by "one-author-per-interface model" refer to how the the OTP team work? With the work load and responsibility of quality to the paying customers there will always be a controversy between the demand for features from the OpenSource community and the needs of the paying customers. As I see it there are two ways to contribute to Erlang - Do your own thing, like yaws. It is not part of the main OTP distribution and not supported by the OTP team. - Work as close as possible to the OTP development model and try to convince the OTP team to add your code. In short I think this require you to follow the rules o A functionality that lack test cases doesn't exist!! The "write code and wait for someone to report bugs" model of development isn't enough for OTP, the code has to be tested with lots of test cases. The OTP team should release *all* test suites to make it easy to add your test cases. It is very easy to add tests for the test server (it is OpenSource). o A functionality that lack documentation doesn't exists!! There is for example a http client that has no documentation and no test cases. When I tried it there is an obvious bug that the most simple test cases would have caught. For small changes submit plain text documentation that the responsible in the OTP team can add. For a new application or a larger addition you should write documentation in SGML. This require that the OTP team release the documentation tools or at least the DTD:s. o For code that may require special changes on Windows it should have been tested on Windows as well, including running the test suites. o Code that isn't 100% portable across Unix platforms should be written in a way that new targets are easy to add and that the code is easy to exclude for unsupported platforms. o Code that uses Java or other language should use the most "common" version of that language/compiler/development kit. For Java it means the most "common" JDK found or that it is tested on several JDK versions. The version of third party products used in the OTP testing is documented in the README for the binary releases. I'm not sure it is documented in the OpenSource release, if not it should be added so that OpenSource developer can know how to test the code before submission. o Do careful changes to existing code. Write comments and change logs so that changes can easily be understood. A huge patch on existing code will require extensive work from the OTP team and there may not be time to do it. If you change ugly indentation or other whitespace you are doomed ;-) o Make sure the code you add compiles without warnings. o You must think as an OTP member ;-) This code I write will run in a telephony station or similar product used by tousands or millions of users that will be very unsatisfied if you introduced a bug that prevent them for using the service. The commercial view is not as different than the OpenSource one, it is all about making others happy ;-) I can't speak for the OTP team, just my opinion, kent -- Kent Boortz, Senior Software Developer MySQL AB, www.mysql.com Office: +46 702 279 11 71 Are you MySQL certified? www.mysql.com/certification From spearce@REDACTED Tue May 11 05:47:48 2004 From: spearce@REDACTED (Shawn Pearce) Date: Mon, 10 May 2004 23:47:48 -0400 Subject: Is erlang too small? In-Reply-To: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> References: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> Message-ID: <20040511034748.GB15019@spearce.org> Rudolph van Graan wrote: > It goes like this... Recently, we've been working on a number of > projects, two of which needed some XML and some needed http interaction > (using http requests). In both cases, I've run into some bugs somewhere > in Erlang which I just didn't want to trace, mostly because of a lack > of time. [snip] You mention switching to Java. Yet today I spent 9 hours debugging what looks to be a bug in the Java garbage collector. My nice, clean(*) Java application that used a steady 20 MB of memory has now suddenly begun to use about 5 MB per window the user opens. And when the user closes the window, the JVM happily keeps the memory leaked. I spent the entire day trying to track down who holds the final reference(s) to the object graph to get the data cleaned up - to no avail. What a waste of a day. Now I've just got to document this as a known bug and move on, we just don't have this kind of time to waste on debugging high quality tools such as Java. So all day long I sat there going "*!*@#*@&*!* if this was in Erlang I wouldn't be having this problem! @#!*!*!* Java!". And I get home and read your skipping out of Erlang to Java because Erlang doesn't work sometimes. :) (*) - Here I mean "nice, clean" as in the damn thing doesn't currently consume 1 GB of memory to complete a simple task, but instead actually seems to run reasonably well for about 10 minutes at a time. Until I added this new feature that is. As far as the things you mentioned that need better support in Erlang (perhaps just more documented support?), every one of these is a "core" CPAN module. (By "core" I mean one that is very heavily used in almost all Perl projects eventually.) Aside from using Perl for CGI programming on UNIX boxes back in the day, CPAN is what made Perl Perl. Its relatively clean DBI, LWP, XML::*, MD5, and MIME modules were very critical to Perl's success as a language. I'm not sure how CPAN is governed, but somehow its worked well at keeping a nice namespace where good packages occupy the "good" names, and the rest is kept out. Wasn't jungerl trying to provide an CEAN (Comprenshive Erlang Archive Network)? Its a good place to start, but I haven't even tried jungerl as its just too much to download. :) I know one problem with Erlang is I just can't get a full time project going in Erlang. So I don't put a whole lot of effort into things I was trying to do, like gen_serial. :) I suspect many people here have similiar issues; they just can't dedicate the amount of time needed to make good libraries for Erlang. They get it close enough for their needs and move on. -- Shawn. I know not how I came into this, shall I call it a dying life or a living death? -- St. Augustine From bjarne@REDACTED Tue May 11 08:14:26 2004 From: bjarne@REDACTED (=?Windows-1252?Q?Bjarne_D=E4cker?=) Date: Tue, 11 May 2004 08:14:26 +0200 Subject: TeknLic seminar, Kista, Stockholm Message-ID: <001f01c4371f$3707fa00$a10e69d4@segeltorp> Seminarium (TeknLic) http://www.it.kth.se/visa.html?artikelid=238 Titel: Reasoning about Side-Effect Free Erlang Code in Modal ?-calculus Based Verification Framework Respondent: Gennady Chugunov Tid: Fredag 14 maj 2004, 10.00 Plats: Sal D, Forum, Isafjordsgatan 39, Kista -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.wiger@REDACTED Tue May 11 08:32:11 2004 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Tue, 11 May 2004 08:32:11 +0200 Subject: Is erlang too small? In-Reply-To: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> References: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> Message-ID: On Mon, 10 May 2004 09:03:32 +0200, Rudolph van Graan wrote: > It goes like this... Recently, we've been working on a number of > projects, two of which needed some XML and some needed http interaction > (using http requests). In both cases, I've run into some bugs somewhere > in Erlang which I just didn't want to trace, mostly because of a lack > of time. I am not saying the http or xml contribs don't work - they > did, but we ran into some issues the cause of which was difficult to > understand, that we had to abandon the specific (erlang only) approach. > For another difficult interface we needed to implement some SOAP rpc > calls to a service, but again, there was no useful erlang code to help > us with this. Of course you are aware that all of the components above (xmerl - I guess, http client, SOAP) are unsupported contributions? This doesn't invalidate your point, though. These components are immature, partly because they are not heavily used (or actively maintained) by commercial Erlang users. This is bound to change, as the requirements for the "traditional Erlang- based products" also evolve. I don't see SOAP coming strong in the telecoms world, but XML is certainly becoming more and more important. I am still hopeful that other markets will begin to drive Erlang development in a more significant way than today. This will surely broaden the selection of commercial-grade components. /Uffe -- Ulf Wiger From ekarttun@REDACTED Tue May 11 11:20:04 2004 From: ekarttun@REDACTED (Einar Karttunen) Date: Tue, 11 May 2004 12:20:04 +0300 Subject: Opening files in an exclusive mode Message-ID: <20040511092004.GA27701@melkinkari.cs.Helsinki.FI> Hello I want to open files for writing in an exclusive mode i.e. fail if they already exist. In C the equivalent is open(name, O_CREAT|O_EXCL|O_WRONLY). The file module does not seem to allow for this. Of course I could first try opening for reading and then open for write if the first open failed. This creates a hole for races though. An another approach would be to have one erlang process creating the files and so avoid the races. This would not protect from external races though... What would be the best solution? - Einar Karttunen From vlad@REDACTED Tue May 11 15:43:24 2004 From: vlad@REDACTED (Vlad Balin) Date: Tue, 11 May 2004 17:43:24 +0400 Subject: Binaries In-Reply-To: Message-ID: Hi there! Could tell me please, which GC technique is used for binaries? Is it differs from one for other types, such as tuples and lists, or the same "stop-and-copy" algorithm? Thanks, Vlad Balin. From gefla@REDACTED Fri May 7 02:29:50 2004 From: gefla@REDACTED (Gerd Flaig) Date: Fri, 07 May 2004 02:29:50 +0200 Subject: jungerl/builder example? References: Message-ID: <87wu3p84g1.fsf@juliet.pond.sub.org> Gerd Flaig writes: > If somebody could show a small but complete example demonstrating > automatic release creation (using builder or other tools), this would > be really nice. perhaps I should clarify this a little: I'm specifically looking for information regarding real-world usage of SASL. How do you manage releases and up/downgrades? We're currently creating glue scripts to automatically determine applications that changed between releases (based on release tags in CVS), bump their versions, insert app versions in .rel files, make the relup file and finally the tar archive. Hmm. Maybe there even is a way to automatically create appup-skeletons based on the list of changed modules, tags in the module source, xref, ...? Goodbyte, Gerd. -- The last thing one knows in constructing a work is what to put first. -- Blaise Pascal From Erik.Stenman@REDACTED Tue May 11 16:46:32 2004 From: Erik.Stenman@REDACTED (Erik Stenman) Date: Tue, 11 May 2004 16:46:32 +0200 Subject: Binaries In-Reply-To: Message-ID: <200405111445.i4BEjAu65454@hades.cslab.ericsson.net> Vlad Balin wrote: > Could tell me please, which GC technique is used for > binaries? Is it differs from one for other types, such as > tuples and lists, or the same "stop-and-copy" algorithm? Large binaries are reference counted and shared among all processes on one Erlang node. They are not copied, neither by GC nor by message passing. (The reference count causes a small overhead to the normal GC to keep track of when a reference to a binary dies.) Smaller binaries are kept on the process heap and are GC:ed by the same mechanism as other Erlang terms. I think that in the current system a binary is considered small if it is smaller than 64 words, but this is a vague memory only, you'd better look in the source to be sure. Erik -------------------------------------- I'm Happi, you should be happy. Praeterea censeo 0xCA scribere Erlang posse. From vlad@REDACTED Tue May 11 17:28:07 2004 From: vlad@REDACTED (Vlad Balin) Date: Tue, 11 May 2004 19:28:07 +0400 Subject: Binaries In-Reply-To: <200405111445.i4BEj8KP032327@cqgigw.cqg.com> Message-ID: Excellent. It looks like it's quite easy to implement copy elimination for large (ref-counted) binaries, if we allow modifications of binaries. Has anyone thought about it? Is it planned to do? -----Original Message----- From: Erik Stenman [mailto:Erik.Stenman@REDACTED] Sent: Tuesday, May 11, 2004 6:47 PM To: erlang-questions@REDACTED Subject: RE: Binaries Vlad Balin wrote: > Could tell me please, which GC technique is used for > binaries? Is it differs from one for other types, such as > tuples and lists, or the same "stop-and-copy" algorithm? Large binaries are reference counted and shared among all processes on one Erlang node. They are not copied, neither by GC nor by message passing. (The reference count causes a small overhead to the normal GC to keep track of when a reference to a binary dies.) Smaller binaries are kept on the process heap and are GC:ed by the same mechanism as other Erlang terms. I think that in the current system a binary is considered small if it is smaller than 64 words, but this is a vague memory only, you'd better look in the source to be sure. Erik -------------------------------------- I'm Happi, you should be happy. Praeterea censeo 0xCA scribere Erlang posse. From ulf.wiger@REDACTED Tue May 11 17:51:07 2004 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Tue, 11 May 2004 17:51:07 +0200 Subject: jungerl/builder example? In-Reply-To: <87wu3p84g1.fsf@juliet.pond.sub.org> References: <87wu3p84g1.fsf@juliet.pond.sub.org> Message-ID: On Fri, 07 May 2004 02:29:50 +0200, Gerd Flaig wrote: > perhaps I should clarify this a little: > > I'm specifically looking for information regarding real-world usage of > SASL. How do you manage releases and up/downgrades? At least in AXD 301, downgrades are simply performed by installing a mnesia fallback and rebooting the system. ;) Upgrades are hopefully perfectly smooth, but the sheer size of the AXD 301 code base (> 1000 modules, 2 million lines of code) makes that a challenge sometimes, so we have several different kinds of upgrade actions: - smooth - restart one processor at a time - restart only user applications on one processor at a time - restart user applications on all processors simultaneously - reboot all processors - export configuration data via SNMP, convert it off-line, re-install the system, re-import the configuration data (OK, that's only been done once, when all else failed, in a fairly early release of AXD 301.) > We're currently creating glue scripts to automatically determine > applications that changed between releases (based on release tags in > CVS), bump their versions, insert app versions in .rel files, make the > relup file and finally the tar archive. > > Hmm. Maybe there even is a way to automatically create appup-skeletons > based on the list of changed modules, tags in the module source, xref, > ...? Indeed. In AXD 301, appup files are normally generated automatically, based on the application version (which is automatically stamped in the app file based on ClearCase release labels.) We always upgrade a whole application at a time. This makes the appup file fairly easy to generate, since the default sequence is rather obvious: - pre-load all modules in the application - suspend all processes using any modules in the application - load the code - call code_change functions - resume the processes - synch with other processors involved. Then there are all sorts of special hooks to defer some code changes until last in the upgrade, to never resume some processes if there will be a reboot at the end, to call code change functions in applications that have no processes, etc. These hooks are defined as special environment variables, and are used if found in the app file. In order to allow designers to release their own hand-crafted appup files, we put the automatically generated appup files on /tmp/ Each ebin directory either has a real appup file present, or a symbolic link to /tmp/.appup (which will not exist until it's generated during upgrade.) This is done because (1) the code tree is read-only for the applications, and (2) OTP doesn't allow patching of app and appup files. /Uffe -- Ulf Wiger From jeinhorn@REDACTED Tue May 11 17:16:51 2004 From: jeinhorn@REDACTED (Jeffrey M. Einhorn) Date: 11 May 2004 10:16:51 -0500 Subject: Is erlang too small? In-Reply-To: <20040511034748.GB15019@spearce.org> References: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> <20040511034748.GB15019@spearce.org> Message-ID: <1084288611.13050.74.camel@dhcp-lom-194-199.futuresource.com> Would the maintenance cost to actually include common libraries like xmerl and edoc be prohibitive? The Java Community Process and Python Enhancement Proposals are examples of two very successful initiatives that have helped increase the productivity of developers that use those languages. The inclusion of common libraries(xmerl) sets a standard that provides consistency in the development of software that deals with XML. Another benefit of rolling open-source library projects into the languages core is that these libraries receive an immediate increase in visibility. This increase in visibility often leads to major improvements to the libraries after they are initially included. In addition these additional standard libraries increase the marketing power of a language by providing new features that can lure new developers into trying the language. The CPAN approach does provide a rich set of libraries, but it suffers from several key shortcomings. First their are often lots of libraries that do similar things, which often leads to a lack of consistency in how common tasks are accomplished. Secondly because developers have to go out of their way to actually install a CPAN module leads to many modules that are not used very often and suffer a lower quality as a result. In summation as an Erlang developer I would like to see its user base continue to grow and I feel including additional libraries would help that cause by making current developers more effective and increasing the features that might convince new developers to give the language a try. Thanks for Erlang/OTP, -jeff einhorn On Mon, 2004-05-10 at 22:47, Shawn Pearce wrote: > Rudolph van Graan wrote: > > It goes like this... Recently, we've been working on a number of > > projects, two of which needed some XML and some needed http interaction > > (using http requests). In both cases, I've run into some bugs somewhere > > in Erlang which I just didn't want to trace, mostly because of a lack > > of time. [snip] > > You mention switching to Java. Yet today I spent 9 hours debugging what > looks to be a bug in the Java garbage collector. My nice, clean(*) Java > application that used a steady 20 MB of memory has now suddenly begun to > use about 5 MB per window the user opens. And when the user closes the > window, the JVM happily keeps the memory leaked. I spent the entire day > trying to track down who holds the final reference(s) to the object graph > to get the data cleaned up - to no avail. What a waste of a day. Now > I've just got to document this as a known bug and move on, we just don't > have this kind of time to waste on debugging high quality tools such > as Java. > > So all day long I sat there going "*!*@#*@&*!* if this was in Erlang I > wouldn't be having this problem! @#!*!*!* Java!". > > And I get home and read your skipping out of Erlang to Java because > Erlang doesn't work sometimes. :) > > (*) - Here I mean "nice, clean" as in the damn thing doesn't currently > consume 1 GB of memory to complete a simple task, but instead actually > seems to run reasonably well for about 10 minutes at a time. Until > I added this new feature that is. > > > As far as the things you mentioned that need better support in Erlang > (perhaps just more documented support?), every one of these is a "core" > CPAN module. (By "core" I mean one that is very heavily used in almost > all Perl projects eventually.) > > Aside from using Perl for CGI programming on UNIX boxes back in the day, > CPAN is what made Perl Perl. Its relatively clean DBI, LWP, XML::*, > MD5, and MIME modules were very critical to Perl's success as a language. > I'm not sure how CPAN is governed, but somehow its worked well at keeping > a nice namespace where good packages occupy the "good" names, and the > rest is kept out. > > > Wasn't jungerl trying to provide an CEAN (Comprenshive Erlang Archive Network)? > Its a good place to start, but I haven't even tried jungerl as its just too > much to download. :) > > > I know one problem with Erlang is I just can't get a full time project > going in Erlang. So I don't put a whole lot of effort into things I > was trying to do, like gen_serial. :) I suspect many people here have > similiar issues; they just can't dedicate the amount of time needed to > make good libraries for Erlang. They get it close enough for their > needs and move on. > > From 08.55088832@REDACTED Tue May 11 21:25:50 2004 From: 08.55088832@REDACTED (Kenneth Lundin) Date: Tue, 11 May 2004 21:25:50 +0200 Subject: Is erlang too small? Message-ID: <000001c4378d$c4a858a0$a6b7fea9@snabbis> As xmerl was mentioned earlier in this thread I just want to mention that the xmerl package will indeed be part of the R10B release of Erlang/OTP, which is planned for delivery the 4:th quarter 2004. /Kenneth Lundin Product Manager of Erlang/OTP at Ericsson From Zoltan.Toth@REDACTED Wed May 12 07:46:44 2004 From: Zoltan.Toth@REDACTED (Zoltan Peter Toth) Date: Wed, 12 May 2004 07:46:44 +0200 Subject: Is erlang too small? In-Reply-To: References: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> Message-ID: <40A1BA44.3010609@eth.ericsson.se> Hi, I think the hierarchical namespace feature ("packages") is something useful. Are there any plans to extend tool support for that ? In particular, - extending the erlc to generate a directory tree containing the beam files (like javac puts class files under the directory given via the -d option) - extending edoc to generate documentation and links in the proper hierarchy. (like javadoc does) Btw, any plans to make edoc part of OTP ? Cheers, Zoltan (Sorry for mentioning Java here, stones may be banging on my helmet, so taking refuge :) ) From joe@REDACTED Wed May 12 12:04:19 2004 From: joe@REDACTED (Joe Armstrong) Date: Wed, 12 May 2004 12:04:19 +0200 (CEST) Subject: Announce EX11 release 2.5 Message-ID: As promised version 2.4 of ex11 (X11 graphics for Erlang) see http://www.sics.se/~joe/ex11/ for general info and http://www.sics.se/~joe/ex11/download/release-2.5.tgz for the code The latest release is release-2.5 - this is an "in between" release. release-2.5 contains many undocumented widgets, the intention of release-2.5 it merely to test that the initialization routines work correctly. If you run release-2.5 and initialization does not work can you please mail the file startup_error_report to me. If it works you'll know - try out the new widgets (emacs, lifts, font selector ...) Please run in all possible modes - ie with ssl forwarding etc. Cheers /Joe From richardc@REDACTED Wed May 12 12:14:57 2004 From: richardc@REDACTED (Richard Carlsson) Date: Wed, 12 May 2004 12:14:57 +0200 Subject: Is erlang too small? In-Reply-To: <40A1BA44.3010609@eth.ericsson.se> References: <2632EE2A-A250-11D8-AF77-000A956D87EE@patternmatched.com> <40A1BA44.3010609@eth.ericsson.se> Message-ID: <40A1F921.7090807@csd.uu.se> Zoltan Peter Toth wrote: > I think the hierarchical namespace feature ("packages") is something > useful. > Are there any plans to extend tool support for that ? In particular, > - extending the erlc to generate a directory tree containing the beam files > (like javac puts class files under the directory given via the -d option) > > - extending edoc to generate documentation and links in the proper > hierarchy. This is already working in the new beta version. Get it at: http://user.it.uu.se/~richardc/edoc/ and report any problems to me. There are still a few things to be ironed out. /Richard PS. I wouldn't mind if edoc was included in the OTP distribution, (together with the syntax tools and xmerl, which it needs). From joe@REDACTED Wed May 12 12:44:39 2004 From: joe@REDACTED (Joe Armstrong) Date: Wed, 12 May 2004 12:44:39 +0200 (CEST) Subject: Publicity needed: was Re: Is erlang too small? In-Reply-To: <1084288611.13050.74.camel@dhcp-lom-194-199.futuresource.com> Message-ID: On 11 May 2004, Jeffrey M. Einhorn wrote: > In summation as an Erlang developer I would like to see its user base > continue to grow and I feel including additional libraries would help > that cause by making current developers more effective and increasing > the features that might convince new developers to give the language a > try. > Thanks for Erlang/OTP, > -jeff einhorn Well I guess all of us in this list agree about that. IMHO - To get the user base to grow we need to publicize what we've got and not necessarily write new applications. What I think we're lacking now is good flashy documentation. Example: I talked to Klacke last Sunday - we were out doing a high speed two-wheeled bikers survey of the leafy lanes near Stockholm (Erlang Bikers rule :-) - I said "what yaws needs is lots of flashy examples" He said (paraphrased) "yup, not only Yaws - Tobbe has node a great samba release, it's in jugerl, it beats the socks off anything else" We need to publicize this stuff. This means lots of nice pretty web pages - that get googled. Now how do we get high up in the google hit list? - I know the answer to this one. 1) Your HTML should be validated spiders give up on unparsable data 2) the meta data in you page header is very important for indexing purposes This is how I start my pages Joe Armstrong SICS home page This layout increase the probability that you get indexed After that words in

...

etc get indexed then

...

etc. Then Google assigns high weights to sites that are referenced a lot. ---- so here's what I propose --- 1) All of us who have place for a web server start a web server on the machine or machines they have access to 2) We all choose the *same* template I highly recommend "Blue Haze" see http://www.sics.se/~joe/erlang/ The Home link should point to the same page The reason for using the same template is so that people will think we have made a gigantic web site. 3) We cross link each other - to increase our google ratings 4) We write out mete data properly etc again to up the index hits I made a start here see http://www.sics.se/~joe/erlang/ So let's do an experiment: Each of you who has some project to report on make you own web server - base it on http://www.sics.se/~joe/erlang/ and send me the link I'll edit these into my web page and we'll see how it goes Comments? Cheers /Joe From mickael.remond@REDACTED Wed May 12 12:56:03 2004 From: mickael.remond@REDACTED (=?iso-8859-15?Q?Micka=EBl_R=E9mond?=) Date: Wed, 12 May 2004 12:56:03 +0200 Subject: Announce EX11 release 2.5 In-Reply-To: References: Message-ID: On Wed, 12 May 2004 12:04:19 +0200 (CEST), Joe Armstrong wrote: > The latest release is release-2.5 - this is an "in between" > release. release-2.5 contains many undocumented widgets, the intention > of release-2.5 it merely to test that the initialization routines work > correctly. > > If you run release-2.5 and initialization does not work can you > please mail the file startup_error_report to me. > > If it works you'll know - try out the new widgets (emacs, lifts, font > selector ...) Hello, I did not manage to make the previous version work (I did not dig into X11 configuration). However, this new version is working very well for me. I just issued make and everything worked. This is good news for the next steps of this project. -- Micka?l R?mond http://www.erlang-projects.org/ From vlad_dumitrescu@REDACTED Wed May 12 13:20:26 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 12 May 2004 13:20:26 +0200 Subject: Announce EX11 release 2.5 References: Message-ID: > However, this new version is working very well for me. I just issued make > and everything worked. Hi, cool stuff! It worked for me too - with the small issue that the makefile should detect windows/cygwin systems and not try to compile unixdom. Otherwise, no problems! /Vlad From rprice@REDACTED Wed May 12 13:55:43 2004 From: rprice@REDACTED (Roger Price) Date: Wed, 12 May 2004 13:55:43 +0200 (CEST) Subject: Publicity needed In-Reply-To: Message-ID: On Wed, 12 May 2004, Joe Armstrong wrote: > What I think we're lacking now is good flashy documentation. > Comments? Yessir!, not just web pages, but a third edition of "Concurrent Programming in Erlang". > 1) Your HTML should be validated > spiders give up on unparsable data An excellent recommendation. > This is how I start my pages > That's almost true Joe. That's HTML 4, and your page http://www.sics.se/~joe/erlang/ is in XHTML 1, but that's not a problem. > > 2) We all choose the *same* template Another excellent recommendation: a common "Erlang community" stylesheet. > I highly recommend "Blue Haze" see http://www.sics.se/~joe/erlang/ This style sheet seems to me to be over-engineered and vicious in its attempts to circumvent structural markup. Too much of the structure of the document is in the classes of the style sheet: