From rasmussen.bryan@REDACTED Sun Jan 1 00:09:31 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Sun, 1 Jan 2006 00:09:31 +0100 Subject: install erlang Fedora core 1 Message-ID: <3bb44c6e0512311509u6d5af7b6if25bac7bd5cee2fd@mail.gmail.com> Hey, I'm installing erlang on Fedora core 1, which not only is an old fedora core version there, but this particular one is rather lacking in applications - haven't managed to get openssh openssl etc. installed yet., but those are as I understand the readme all optional right? at the end of make install I start to get failures and errors, the following: Compiler function systools:compile_rel/3 failed: {undef,[{systools,compile_rel, ["/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts/start_clean", "/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts/start_clean", {options,["/home/pantagruel/programmingLanguages/otp_src_R10B-8/lib/kernel/ebin", "/home/pantagruel/programmingLanguages/otp_src_R10B-8/lib/stdlib/ebin", "/home/pantagruel/programmingLanguages/otp_src_R10B-8/lib/sasl/ebin"], "/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts/tmp", undefined, [], 1, false, 999, [], "/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts/start_clean.script", "/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts/tmp"}]}, {erl_compile,compile_file,4}, {erl_compile,compile3,3}, {erl_compile,compiler_runner,1}]} make[3]: *** [/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts/start_clean.script] Error 1 make[3]: Leaving directory `/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts' make[2]: *** [release] Error 2 make[2]: Leaving directory `/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts' make[1]: *** [release] Error 2 make[1]: Leaving directory `/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts' make: *** [install.emulator] Error 2 ------------------------------------------------------------------------------------------------------------------------------ From rasmussen.bryan@REDACTED Sun Jan 1 00:30:16 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Sun, 1 Jan 2006 00:30:16 +0100 Subject: install erlang Fedora core 1 In-Reply-To: <3bb44c6e0512311509u6d5af7b6if25bac7bd5cee2fd@mail.gmail.com> References: <3bb44c6e0512311509u6d5af7b6if25bac7bd5cee2fd@mail.gmail.com> Message-ID: <3bb44c6e0512311530x7e4373a5ha48db4b465d59a5c@mail.gmail.com> never mind, it seems the install worked and I have a shell. Cheers, Bryan Rasmussen On 1/1/06, bryan rasmussen wrote: > Hey, I'm installing erlang on Fedora core 1, which not only is an old > fedora core version there, but this particular one is rather lacking > in applications - haven't managed to get openssh openssl etc. > installed yet., but those are as I understand the readme all optional > right? > > at the end of make install I start to get failures and errors, the following: > > Compiler function systools:compile_rel/3 failed: > {undef,[{systools,compile_rel, > > ["/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts/start_clean", > > "/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts/start_clean", > > {options,["/home/pantagruel/programmingLanguages/otp_src_R10B-8/lib/kernel/ebin", > > "/home/pantagruel/programmingLanguages/otp_src_R10B-8/lib/stdlib/ebin", > > "/home/pantagruel/programmingLanguages/otp_src_R10B-8/lib/sasl/ebin"], > > "/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts/tmp", > undefined, > [], > 1, > false, > 999, > [], > > "/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts/start_clean.script", > > "/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts/tmp"}]}, > {erl_compile,compile_file,4}, > {erl_compile,compile3,3}, > {erl_compile,compiler_runner,1}]} > make[3]: *** [/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts/start_clean.script] > Error 1 > make[3]: Leaving directory > `/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts' > make[2]: *** [release] Error 2 > make[2]: Leaving directory > `/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts/start_scripts' > make[1]: *** [release] Error 2 > make[1]: Leaving directory > `/home/pantagruel/programmingLanguages/otp_src_R10B-8/erts' > make: *** [install.emulator] Error 2 > > ------------------------------------------------------------------------------------------------------------------------------ > From vlad_dumitrescu@REDACTED Sun Jan 1 16:38:58 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Sun, 1 Jan 2006 16:38:58 +0100 Subject: Abstract form References: <11498CB7D3FCB54897058DE63BE3897C010A6C73@esealmw105.eemea.ericsson.se> <43B70001.4030200@telia.com> Message-ID: ----- Original Message ----- From: "Robert Virding" > abstract/1 takes an erlang data structure and converts it into its > abstract form. ... > The other one is for parsing the characters in a string. Hi, I read the manual, and I knew about the difference you so kindly point out. Do you mean that when converted to Erlang abstract format, the term [1,a,3] and the term represented by the string "[1,a,3]" are supposed to be represented differently? If yes and you know why it should be so, please explain because to me they look as they should be the same. regards, Vlad From joelr1@REDACTED Sun Jan 1 17:27:21 2006 From: joelr1@REDACTED (Joel Reymont) Date: Sun, 1 Jan 2006 16:27:21 +0000 Subject: Poker bots and nested state machines /Structured Network Programming reloaded/ Message-ID: <34E55D11-BC53-421E-BAEF-D7F94C6CA4F4@gmail.com> I went through Ulf Wiger's EUC presentation on Structured Network Programming and realized that I had to tackle something similar in my recent project. I would like to share my design and solicit feedback. I find my approach very easy to implement and use and Uffe's a bit complicated. I would appreciate comments on the merits of the our approaches among other things. The goal of my project is to be able to thoroughly test a poker server using poker bots. Each poker bot is to be scripted and excercise different parts of the server by talking the poker protocol consisting of 150+ binary messages. The poker server itself is written in C++ and runs on Windows. Easy scripting is an essential requirement since customer's QA techs are not programmers but need to be able to write the bots. Another key requirement is to be able to launch at least 4,000 poker bots from a single machine. It's worth noting that I started with Haskell and by the time I gave up 10-11 weeks later I was still troubleshooting core issues in my application. It took me 1 week to rewrite the app in Erlang. It's the end of that week and I'm already way past the state of the Haskell version. The Erlang code is about 1/3 of the Haskell code. I used the same approach to event handling in both apps. Each poker bot is a state machine. I managed to bang out wrappers to the 150+ packets rather quickly and elegantly (see http:// www.erlang.org/ml-archive/erlang-questions/200512/msg00279.html) and it took me about 2 days. Implementing the state machine proved to be more troublesome. My initial thinking was to give the customer a library of packet wrappers and the means to send and receive them. This failed miserably. Writing a robust poker bot state machine proved too complicated for the QA techs. I was then asked to provide a library of "code snippets" or LEGO blocks to assemble a poker bot with. This is a sample poker bot script that joins the lobby. Each poker bot script is a module with a single exported function. The module name is meant to be given to the controller which calls script/0 and passes it the user id, password and any other required arguments. -module(gotolobby). -export([script/3]). -include("records.hrl"). script(Bot, _, connected) when is_record(Bot, bot) -> %% common script initialization Bot1 = snippets:start_script(Bot), Bot2 = snippets:go_to_lobby(Bot1, [...]), %% set trace level Bot3 = bot:traceat(Bot2, 100), bot:trace(Bot3, 10, "Kicking off"), %% mark event as processed {eat, Bot3}; script(Bot, _, {joined_table, 0}) -> bot:trace(Bot, 10, "We are in the lobby"), timer:sleep(3000), % milliseconds %% stop the bot stop; script(Bot, _, Event) -> bot:trace(Bot, 100, "Skipping: ~w", [Event]), {skip, Bot}. I control the event loop and dispatch events by calling the script fun. Each script fun is a dispatcher or state machine with 3 possible return values: {eat, State}, {skip, State} and stop. The controller keeps a stack of dispatchers and events are propagated from the top of the stack to the bottom. If a dispatcher in the stack returns {skip, State} then the event is propagated to the next dispatcher and the new bot state is assumed to be State. On {eat, State} the dispatch sequence is complete and the controller goes on to the next iteration of the event loop. On stop the bot is stopped. If no dispatcher has eaten the event by the time the bottom of the stack is reached then the controller throws out the event. Dispatchers can be pushed on to the stack and popped from it. The first dispatcher that's pushed onto the stack is the bot script itself. It always stays there. I do not try to guard against extra stack pops, my assumption is that a qualified person will be writing the snippets and will match each push with a pop. Bot writers do not need to use push/pop at all. %%% Push a handler. Desc describes the handler (string, atom, etc.) %%% and is only used for debugging. push(Bot, Desc, Fun, Args) when is_record(Bot, bot), is_function(Fun), is_list(Args) -> Dispatchers = Bot#bot.dispatchers, Bot1 = Bot#bot { dispatchers = [{Desc, Fun, Args}|Dispatchers] }, Bot1. %%% Pop a handler pop(Bot) when is_record(Bot, bot) -> %% drop the head [_|Dispatchers] = Bot#bot.dispatchers, Bot1 = Bot#bot { dispatchers = Dispatchers }, Bot1. The reusable blocks of code (snippets, LEGO blocks) are implemented as dispatchers that are pushed onto the stack. By pushing snippets to the top of the stack they get to look at each event before the bot and decide whether to propagate the event or eat it. The controller event loop looks like this: %%% Dispatch event run(_, {keep_going, Bot}) when is_record(Bot, bot) -> receive {tcp, _, <>} -> Event = unpickle(Bot, Packet), run(Bot, handle(Bot, Event)); {script, Event} -> run(Bot, handle(Bot, Event)); Any -> run(Bot, handle(Bot, Any)) end; %%% Handle event handle(Bot, Event) when is_record(Bot, bot) -> %% let dispatchers in the stack take a look handle(Bot, Bot#bot.dispatchers, Event). handle(Bot, [], _) when is_record(Bot, bot) -> %% bottom of the dispatcher stack reached, %% throw out the event and keep going {keep_going, Bot}; handle(Bot, [{_, Fun, Args}|Rest], Event) when is_record(Bot, bot) -> case Fun(Bot, Args, Event) of {skip, Bot1} -> handle(Bot1, Rest, Event); {eat, Bot1 } -> {keep_going, Bot1}; stop -> stop; Other -> trace(Bot, 85, "handle: Unknown event: ~p~n", [Other]), erlang:error(unknown_event) end. Consider this section of the example bot code: script(Bot, _, connected) when is_record(Bot, bot) -> Bot1 = snippets:start_script(Bot), Bot2 = snippets:go_to_lobby(Bot1, [...]), Bot3 = bot:traceat(Bot2, 100), bot:trace(Bot3, 10, "Kicking off"), {eat, Bot3}; snippets:start_script/1 above pushes another handler onto the stack that handles common events that are used in all poker bots such as updating the number of players at the table. snippets:go_to_lobby/2 is a good snippet to look at. %%% Go to lobby. The lobby is table# 0 go_to_lobby(Bot, AffId) -> go_to_table(Bot, 0, AffId). %%% Join table go_to_table(Bot, 0, AffId) when is_record(Bot, bot), is_list(AffId) -> Bot1 = bot:push(Bot, "go_to_table", fun go_to_table/3, [0, AffId]), Cmd = #cl_connect_game { ... }, bot:send(Bot1, lobby, Cmd), Bot1; The fun above is meant to be invoked from poker bot scripts and pushes the go_to_table/3 dispatcher to the top of the stack. It also sends the "connect to table" packet to the poker server. go_to_table(Bot, Table, AffId) when is_record(Bot, bot), is_number(Table), is_list(AffId) -> Bot1 = bot:push(Bot, "go_to_table", fun go_to_table/3, [Table, AffId]), bot:reconnect(Bot1, Table); Joining a particular table is more complicated since separate connections to the poker server need to be maintained for the lobby and for each each table. Not my design, so just take it for granted ;-). bot:reconnect/2 closes the existing table connection and opens a new one. go_to_table(Bot, [Table, AffId], table_connected) -> Cmd = #cl_connect_game { ... }, bot:send(Bot, table, Cmd), {eat, Bot}; The table_connected event is posted once the table connection has been established, i.e. the custom SSL handshake has been completed. More on that below. The lobby connection goes through the encryption handshake when the bot starts so we only need to send the "connect to game" packet and there's no waiting for the table_connected event. go_to_table(Bot, [Table, _], #srv_connect_game_ok{}) -> bot:post(Bot, {joined_table, Table}), Bot1 = bot:pop(Bot), {eat, Bot1}; The table is considered connected when "srv_connect_game_ok" is received. That's when I post the {joined_table, Table} event and pop myself from the dispatcher stack. Take a look at the sample script at the beginning of the message. My nested "go to lobby" state machine is completely transparent to the user. It even looks like a synchronous call /Bot2 = snippets:go_to_lobby(Bot1, [...]/. go_to_table(Bot, _, _) -> {skip, Bot}. If I don't recognize the event then I just skip it which lets dispatchers further down in the stack take a look at it. This is a crucial ability. Two server connections (lobby and table) can be open at the same time so I can be receiving lobby messages while trying to connect to a table. Opening a new table connection requires going through a custom SSL handshake with the server. This eventually boils down to the following piece of code connect(Bot, Args) -> %% connect to the script server to get a client handle UtilSock = Bot#bot.util_sock, ?match(ok, gen_udp:send(UtilSock, ?SRV_IP, ?SRV_PORT, <>)), %% push handler Bot1 = bot:push(Bot, "handshake", fun handshake/3, Args), %% start script server connection timer bot:start_timer(Bot1, script_server_connect, 5000). I'm using a separate UDP server to keep track of SSL descriptors since I could not figure out a way to do this with the built-in Erlang SSL. I need to capture each packet in the standard SSL handshake and add my own header before sending it out. This lets me selectively use SSL encryption on the packets that require it and lessens the load on the server and network connections. Notice the bot:push/4 above. The state machine (dispatcher) stack is 3-deep at this point. The encryption handshake state machine is at the top, followed by the "connect to game" state machine and the poker bot state machine (gotolobby:script/3). Finally, I start a timer above to make sure that the encryption state machine does not run forever. Thanks, Joel -- http://wagerlabs.com/ From matthias@REDACTED Sun Jan 1 23:06:49 2006 From: matthias@REDACTED (Matthias Lang) Date: Sun, 1 Jan 2006 23:06:49 +0100 Subject: Abstract form In-Reply-To: References: <11498CB7D3FCB54897058DE63BE3897C010A6C73@esealmw105.eemea.ericsson.se> <43B70001.4030200@telia.com> Message-ID: <17336.21113.617178.651499@antilipe.corelatus.se> Vlad Dumitrescu writes: > I read the manual, and I knew about the difference you so kindly point out. ... Vlad Dumitrescu writes: > erl_parse:abstract([3,a,5]). ---> > {cons,0,{integer,0,3},{cons,0,{atom,0,a},{string,0,[5]}}} > erl_parse...("[3,a,5]"). ---> > > {cons,1,{integer,1,3},{cons,1,{atom,1,a},{cons,1,{integer,1,5},{nil,1}}}} Can you start by explaining what the above is supposed to mean? I can't make head or tail of it, yet "erl_parse" experts seem to know what you mean, which suggests there's some sort of known irritation. I got stuck here: 1> erl_parse...("[3,a,5]"). ** 1: syntax error before: '.' ** 1> erl_parse...("[3,a,5]"). ---> ** 1: syntax error before: '.' ** 1> ---> Matthias From vlad_dumitrescu@REDACTED Sun Jan 1 23:45:37 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Sun, 1 Jan 2006 23:45:37 +0100 Subject: Abstract form References: <11498CB7D3FCB54897058DE63BE3897C010A6C73@esealmw105.eemea.ericsson.se><43B70001.4030200@telia.com> <17336.21113.617178.651499@antilipe.corelatus.se> Message-ID: > > erl_parse...("[3,a,5]"). ---> > > > > {cons,1,{integer,1,3},{cons,1,{atom,1,a},{cons,1,{integer,1,5},{nil,1}}}} > > Can you start by explaining what the above is supposed to mean? I > can't make head or tail of it, yet "erl_parse" experts seem to know > what you mean, which suggests there's some sort of known irritation. I > got stuck here: I am sorry, those "..." were meant to mean that one should use erl_parse to parse the string. Somethink in the lines of {ok, T, _} = erl_scan:string("[3,a,5]"), erl_parse:parse_term(T). I apologize if it was unclear. regards, Vlad From joelr1@REDACTED Mon Jan 2 00:14:21 2006 From: joelr1@REDACTED (Joel Reymont) Date: Sun, 1 Jan 2006 23:14:21 +0000 Subject: Haskell vs. Erlang Message-ID: <0E43FCC3-8208-4C37-9D74-BD94C50D76E5@gmail.com> Folks, This is a postmortem of my latest project: http://wagerlabs.com/articles/2006/01/01/haskell-vs-erlang-reloaded Summary: 10-11 weeks of Haskell and then a 1-week Erlang rewrite. Thanks, Joel -- http://wagerlabs.com/ From neumann@REDACTED Mon Jan 2 01:04:41 2006 From: neumann@REDACTED (Francois-Denis Gonthier) Date: Sun, 1 Jan 2006 19:04:41 -0500 Subject: Fwd: Bug#328031: Debian Bug #328031, Erlang 10.b.9 compile bug on Debian GNU/Linux Message-ID: <200601011904.41513.neumann@lostwebsite.net> More informations from Jurij ---------- Forwarded Message ---------- Subject: Bug#328031: Debian Bug #328031, Erlang 10.b.9 compile bug on Debian GNU/Linux Date: Sunday 01 January 2006 17:41 From: Jurij Smakov To: 328031@REDACTED Hi, Ok, the situation is a bit more clear now... The problem is that erlang's build system assumes that sparc automatically means ultrasparc and (if hipe is enabled) automatically turns on all the ultrasparc-specific optimizations. That's a problem, because we, at this point, still support the 32-bit hardware, and so ultrasparc-optimized binaries will not work out of the box on older machines. I see two ways out of this situation. The easy one is to disable hipe on sparc. As I understand, that will turn off all the processor-specific optimizations and should build fine on the buildds. The harder one is to produce two sets of packages - one with hipe enabled and thus ultrasparc-optimized, the other one with hipe disabled, and thus suitable for sparc32 hardware. Whatever the decision is going to be, I'll be glad test out the packages and advise on the proper way to build them. Best regards, Jurij Smakov jurij@REDACTED Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC ------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From neumann@REDACTED Mon Jan 2 01:05:46 2006 From: neumann@REDACTED (Francois-Denis Gonthier) Date: Sun, 1 Jan 2006 19:05:46 -0500 Subject: Fwd: Re: Debian Bug #328031, Erlang 10.b.9 compile bug on Debian GNU/Linux SPARC Message-ID: <200601011905.46278.neumann@lostwebsite.net> Some more informations. Sorry if I seem to be spamming the newsgroup, but this is basically the only thing I can do to advance on this issue. ---------- Forwarded Message ---------- Subject: Re: Debian Bug #328031, Erlang 10.b.9 compile bug on Debian GNU/Linux SPARC Date: Saturday 31 December 2005 14:41 From: Jurij Smakov To: Francois-Denis Gonthier Cc: 328031@REDACTED On Fri, 30 Dec 2005, Francois-Denis Gonthier wrote: > tags 328031 + pending > thanks > > Hello all > > this patch has been sent to me through Debian Bug Tracking system by Jurij > Smakov. Hi Francois-Denis, I've done some additional investigation and it appears that the initial version of my patch might not be the proper fix. The deal is that buildds are operating in 32-bit mode (this is required to ensure that the resulting binaries run both on 32- and 64-bit hardware), so uname -m will actually return 'sparc' and not 'sparc64'. So it will require further work to figure out the right fix, since even with my current patch erlang is still likely to fail on buildds. I'll try to look at it within the next few days. Best regards, Jurij Smakov jurij@REDACTED Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC ------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From dgud@REDACTED Mon Jan 2 08:58:08 2006 From: dgud@REDACTED (Dan Gudmundsson) Date: Mon, 2 Jan 2006 08:58:08 +0100 Subject: Mnesia deadlock? In-Reply-To: References: Message-ID: <17336.56592.586029.984512@rian.du.uab.ericsson.se> Adam Aquilon writes: > Hi there! > > Hope someone out there (Klacke, Dan?) understands something about this: > We seemed to get a deadlock in Mnesia. All mnesia calls on one of the > nodes hung forever. > > > Setup: > > We have a system running on multiple nodes on a single host. > Mnesia version is 4.1.12. Without further looking at your logs. Oh No, don't use 4.1.12 (precompiled) and don't use the compiler from that release, that compiler produced broken code on mnesia_tm which wrote garbage on the heap (or somewhere else) which could cause really strange problems. Try upgrading compiler, recompile mnesia and try again. Other than that mnesia have had a couple fixes since 4.1.12 :-) it could be worth upgrading to something later. Nowadays the compiler have an inbuilt beam validator that checks that the produced code don't have such problems anymore. /Dan > > A cron job runs every minute to backup the Mnesia tables spread across > the nodes. (It does this by forking a new beam that does an rpc:call() > towards one of the nodes in the running system, and does an > mnesia:backup/1.) Admittedly, this is very often, but we only have > a small amount of data... :-) From adam.aquilon@REDACTED Mon Jan 2 12:36:26 2006 From: adam.aquilon@REDACTED (Adam Aquilon) Date: Mon, 2 Jan 2006 12:36:26 +0100 Subject: Mnesia deadlock? In-Reply-To: <17336.56592.586029.984512@rian.du.uab.ericsson.se> Message-ID: <004901c60f90$c42c9080$4a01010a@cellpoint.se> Thank you Dan and Klacke! We're currently looking at both using R10 and finding any potential deadlocks in transactions. See below for comments: Dan Gudmundsson wrote: ... > Oh No, don't use 4.1.12 (precompiled) and don't use the compiler from > that release, that compiler produced broken code on mnesia_tm which > wrote garbage on the heap (or somewhere else) which could > cause really > strange problems. > > Try upgrading compiler, recompile mnesia and try again. > > Other than that mnesia have had a couple fixes since 4.1.12 :-) > it could be worth upgrading to something later. > > Nowadays the compiler have an inbuilt beam validator that checks that > the produced code don't have such problems anymore. > > /Dan Thanks for the tip! We haven't upgraded before because of some extra packages that we must compile into the release (we make our own RPM's) which is a bit of a bother. Also, "the devil you know" is better than new, uncharted functionality when it comes to releases. But now it seems that it is time to start using R10 after all. Klacke wrote: ... > So - tip no 1, check for gen_server:calls inside your transactions. > Look closely on your user process (i.e <0.932.1> ) > and figure our what it's waiting for and why. What's the message > in the queue for that process !!! very suspicious. ... Unfortunately the VM ran out of memory during sunday morning and was autorestarted, so I can no longer examine the processes again without forcing another hang. I checked the crash dump and there weren't very many processes in the system, around 2300. Granted, this is more than normal, but not an enormous amount. This indicates that some process(es) were eating large gobs of heap space. Doesn't this speak against having a pure deadlock situation? (We are looking for receive stuff inside transactions anyway, just to be sure.) /Adam From bengt.kleberg@REDACTED Mon Jan 2 12:48:39 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Mon, 02 Jan 2006 12:48:39 +0100 Subject: loadtest - inets {'EXIT',{ebadf In-Reply-To: <000c01c60cfa$7a854730$5f00a8c0@wavenet.lk> References: <000c01c60cfa$7a854730$5f00a8c0@wavenet.lk> Message-ID: <43B91317.4040603@ericsson.com> On 2005-12-30 05:35, Sanjaya Vitharana wrote: ...deleted > When I compare the error with mod_log.erl (line 112 on transfer_log > part) 'EXIT' is not catch in the original code. Is it ok or a bug ? could you please explain this again? > I have try to put the 3000000 requests, but why this crashes in the > 63689 http call & onwards? It's perfectly works upto 63689 request. Also one thing to try is to allow erts to create more processes (since 63689 seems to be close to 64k). start erl with +P 3000000 bengt From rvg@REDACTED Mon Jan 2 15:09:10 2006 From: rvg@REDACTED (Rudolph van Graan) Date: Mon, 2 Jan 2006 16:09:10 +0200 Subject: Mnesia deadlock? In-Reply-To: <004901c60f90$c42c9080$4a01010a@cellpoint.se> References: <004901c60f90$c42c9080$4a01010a@cellpoint.se> Message-ID: Hi Adam, Haven't spoken to you for a while...! We have an internal rule that it is illegal to have *any* side effects apart from mnesia calls inside the transaction funs. Side effects include: 1. Sending/receiving messages 2. Any socket calls 3. Any file accesses 4. Any calls to gen_server processes 5. Any ets/dets calls etc Also look for nested transactions (dirty access context over syncronous transactions access contexts) etc. They can crash mnesia big time. We have been bitten a number of times by caused by side-effects which by nature is very difficult to trace. Symptoms include infinite recursions, deadlocks, hangs etc etc. Nasty stuff. A good rule of thumb is to think what will happen when the transaction fun is executed more than once. Will it change the result? If so, you have side effects. Regards, Rudolph On 02 Jan 2006, at 1:36 PM, Adam Aquilon wrote: > > Thank you Dan and Klacke! > We're currently looking at both using R10 and finding any potential > deadlocks in transactions. See below for comments: > > > Dan Gudmundsson wrote: > ... >> Oh No, don't use 4.1.12 (precompiled) and don't use the compiler from >> that release, that compiler produced broken code on mnesia_tm which >> wrote garbage on the heap (or somewhere else) which could >> cause really >> strange problems. >> >> Try upgrading compiler, recompile mnesia and try again. >> >> Other than that mnesia have had a couple fixes since 4.1.12 :-) >> it could be worth upgrading to something later. >> >> Nowadays the compiler have an inbuilt beam validator that checks that >> the produced code don't have such problems anymore. >> >> /Dan > > Thanks for the tip! > > We haven't upgraded before because of some extra packages that we > must compile into the release (we make our own RPM's) which is a > bit of a bother. Also, "the devil you know" is better than new, > uncharted functionality when it comes to releases. > > But now it seems that it is time to start using R10 after all. > > > Klacke wrote: > ... >> So - tip no 1, check for gen_server:calls inside your transactions. >> Look closely on your user process (i.e <0.932.1> ) >> and figure our what it's waiting for and why. What's the message >> in the queue for that process !!! very suspicious. > ... > > Unfortunately the VM ran out of memory during sunday morning and > was autorestarted, so I can no longer examine the processes again > without forcing another hang. > > I checked the crash dump and there weren't very many processes in > the system, around 2300. Granted, this is more than normal, but not > an enormous amount. This indicates that some process(es) were eating > large gobs of heap space. > > Doesn't this speak against having a pure deadlock situation? > > (We are looking for receive stuff inside transactions anyway, just > to be sure.) > > /Adam > > > From dgud@REDACTED Mon Jan 2 16:02:40 2006 From: dgud@REDACTED (Dan Gudmundsson) Date: Mon, 2 Jan 2006 16:02:40 +0100 Subject: Mnesia deadlock? In-Reply-To: References: <004901c60f90$c42c9080$4a01010a@cellpoint.se> Message-ID: <17337.16528.12143.745765@rian.du.uab.ericsson.se> Rudolph van Graan writes: > > Also look for nested transactions (dirty access context over > syncronous transactions access contexts) etc. They can crash mnesia > big time. > > Rudolph > That should be fixed in the later releases, see release notes. /Dan From david.nospam.hopwood@REDACTED Mon Jan 2 18:10:31 2006 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Mon, 02 Jan 2006 17:10:31 +0000 Subject: Representing money in software In-Reply-To: <43B5C9B7.30705@blueyonder.co.uk> References: <01ea01c60d6d$017acfe0$2100a8c0@INSWITCH241> <7FB36213-6C06-4D65-B14D-D665EB0847D0@citeulike.org> <029801c60d7a$49f17550$2100a8c0@INSWITCH241> <43B5C9B7.30705@blueyonder.co.uk> Message-ID: <43B95E87.3060206@blueyonder.co.uk> [resend to the list; I accidentally sent it only to the poster] David Hopwood wrote: > Erlang Questions wrote: > >>I was afraid about that. >>Unfortunately, these numbers represent money in my application :o( > > > It sounds like your basic problem is that you don't have an unambiguous > specification of how your application should handle money. This should > enumerate *all* of the monetary calculations that your app needs to implement, > and for each one, it should specify: > > - the range and precision of each input, > - the required precision that must be used for intermediate results, > - the rounding method, for any calculation that involves rounding. > > It should also specify the precision at which monetary amounts are displayed > and input at the user interface, and the formats used at interfaces to other > software and files/databases (including how multiple currencies are handled). > > Producing this specification is a separate activity from implementing it (even > if both happen to be done by the same person). In many cases, there are strict > legal requirements on how many decimal places or significant figures, or which > rounding method *must* be used [*]. So the spec should be signed off by someone > whose job it is to know what those requirements are (for all relevant countries > and situations), such as a qualified accountant. > > [The maximum amounts of money that can be involved in a calculation should be > chosen generously. You never know which countries that may seem stable now will > suffer from hyperinflation in the lifetime of the application.] > > > Given such a spec, you will almost certainly find that floating point > arithmetic is of no use whatever in implementing it correctly. > > Generally it's necessary to use integer arithmetic, with integers of sufficient > size to handle the maximum amount of money that may be involved at the required > precision. Always check for overflow at every intermediate step, and abort the > transaction (with a comprehensible error report) if overflow occurs. Even if > multiple currency support is not needed initially, it's a good idea to think > about what the upgrade path to that would be. > > > [*] For example, here are the requirements for conversion between the > national currencies that made up the euro: > > ARTICLE 4; The conversion rates shall be adopted as one euro expressed > in terms of each of the national currencies. They shall be adopted with > six significant figures. The conversion rates themselves must not be > rounded or truncated when making conversions. The conversion rates shall > be used for conversions either way between the euro and the national > currency units. Inverse rates derived from the conversion rates shall > not be used. Monetary amounts to be converted from one national currency > unit into another shall first be converted into a monetary amount > expressed in the euro unit, which amount may be rounded to not less than > three decimal places and shall then be converted into the other national > currency unit. No alternative method of calculation may be used, unless > it produces the same result. > > ARTICLE 5; Monetary amounts to be paid or accounted for, when a rounding > takes place after a conversion into the euro unit according to article 4, > shall be rounded up or down to the nearest cent, Monetary amounts to be > paid or accounted for which are converted into a national currency unit > shall be rounded up or down to the nearest sub-unit, or in the absence of > a sub-unit to the nearest unit or according to national law or practice > to a multiple or fraction of the sub-unit or unit of the national currency > unit. If the application of the conversion rates gives a result which is > exactly half-way, the sum shall be rounded up. > > To implement this, you could represent euro amounts as integer multiples > of 0.001 euro cents, for example. More generally, there is almost always > some fixed precision that can be used; variable-precision representations > (such as "floating decimal") are usually an overcomplication. -- David Hopwood From bfulg@REDACTED Mon Jan 2 20:26:36 2006 From: bfulg@REDACTED (Brent Fulgham) Date: Mon, 2 Jan 2006 11:26:36 -0800 Subject: Representing money in software In-Reply-To: <43B95E87.3060206@blueyonder.co.uk> References: <01ea01c60d6d$017acfe0$2100a8c0@INSWITCH241> <7FB36213-6C06-4D65-B14D-D665EB0847D0@citeulike.org> <029801c60d7a$49f17550$2100a8c0@INSWITCH241> <43B5C9B7.30705@blueyonder.co.uk> <43B95E87.3060206@blueyonder.co.uk> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Jan 2, 2006, at 9:10 AM, David Hopwood wrote: > [resend to the list; I accidentally sent it only to the poster] > > David Hopwood wrote: >> Erlang Questions wrote: >> >>> I was afraid about that. >>> Unfortunately, these numbers represent money in my application :o( >> >> >> It sounds like your basic problem is that you don't have an >> unambiguous >> specification of how your application should handle money. This >> should >> enumerate *all* of the monetary calculations that your app needs >> to implement, >> and for each one, it should specify: I used to write financial software for a living. We ALWAYS used integers to represent the amounts (US cents). Displays were shown in dollars by dividing by 100... I would recommend a shift to using pure integers (perhaps in tens or hundredths of a Euro) for your data. Thanks, - -Brent -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFDuX5tzGDdrzfvUpURAsz8AJ9f+MoLhzCr6rzKnWRgFR6t44bAAACfVdvX p5bRoCLhwFIvOoGqCF7+M+o= =qlB4 -----END PGP SIGNATURE----- From cyberlync@REDACTED Mon Jan 2 21:00:40 2006 From: cyberlync@REDACTED (Eric Merritt) Date: Mon, 2 Jan 2006 12:00:40 -0800 Subject: Seattle Area Erl-Lounge on Thursday January 18 at 7:30 Message-ID: Guys, Franceso Cesarini is going to be in town for a few days so it looks like its a good time to have an Erl-Lounge. So if you are the Seattle area and are interested in Erlang keep your schedules clear on Thursday January 18 at 7:30pm. The location is still undecided but it will be in the downtown/pioneer square/international district area. Suggestions are more then welcome. I will repost to the list when the location has been set. Feel free to just show up but if you are interested in attending I would appreciate an email just so I have some idea of how many people might show up. Thanks, Eric From andrae@REDACTED Tue Jan 3 02:26:57 2006 From: andrae@REDACTED (Andrae Muys) Date: Tue, 3 Jan 2006 11:26:57 +1000 Subject: Using trunc function in Erlang In-Reply-To: <029801c60d7a$49f17550$2100a8c0@INSWITCH241> References: <01ea01c60d6d$017acfe0$2100a8c0@INSWITCH241> <7FB36213-6C06-4D65-B14D-D665EB0847D0@citeulike.org> <029801c60d7a$49f17550$2100a8c0@INSWITCH241> Message-ID: <8AB9C4FF-8CB9-4FA9-B488-7A1E9B4344EA@internode.on.net> On 31/12/2005, at 5:50 AM, Erlang Questions wrote: > I was afraid about that. > Unfortunately, these numbers represent money in my application :o( > Never, under any circumstance, without exception, ever use floating point to represent money. You can use integers, fixed point, decimals, rationals or improper fractions. All provide various tradeoffs, but all are infinitely superior to floating point. Worse, as people have already mentioned, there can be legal ramifications as there are unavoidable errors in floating point calculations that cannot always be reconciled with statutory rounding requirements. Andrae Muys (who learnt this lesson the hard way, and once had to spend several painful months converting a financial application from floating point to decimal) -- Andrae Muys andrae@REDACTED Principal Kowari Consultant Netymon Pty Ltd From dietmar@REDACTED Tue Jan 3 12:46:48 2006 From: dietmar@REDACTED (Dietmar Schaefer) Date: Tue, 03 Jan 2006 12:46:48 +0100 Subject: time it takes to reastart gen_server Message-ID: <43BA6428.3010506@ast.dfs.de> Happy new year ! I am trying to develop a gen_server which starts a unix process do(ExtPrg) -> process_flag(trap_exit, true), %% to get informed when process terminates Port = open_port({spawn, ExtPrg}, [{packet, 2}]), %% ExtProg also includes parameter loop(Port). loop(Port) -> receive {'EXIT',Port,Reason} -> io:format("external program exited~n Reason=~p Port=~p~n",[Reason,Port]), %port program died gen_server:call(self(),stop) %% all work is done - go home end. This gen_server is supervised by a supervisor. init(_Args) -> case whereis(watchdog) of undefined -> %% register only once register(watchdog, self()); _ -> ok end, Xclock = {xclock,{xclock,start_link,["/usr/X11R6/bin/xclock"]}, permanent,brutal_kill,worker,[xclock]}, Xterm = {xterm,{xterm,start_link,["/usr/bin/xterm"]}, permanent,brutal_kill,worker,[xterm]}, {ok,{{one_for_one,1,6}, [Xclock,Xterm]}}. It takes 5 seconds to restart my xclock after I closed it. How can I fasten it up ? regards Dietmar From joelr1@REDACTED Tue Jan 3 13:36:48 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 3 Jan 2006 12:36:48 +0000 Subject: Logging to one process from thousands: How does it work? Message-ID: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> Folks, I have just rewrote some code from Haskell to Erlang and there's one thing that baffles me. I tried to approach Haskell the way I would code in Erlang and set up a logger thread with an unbounded message queue. I then launched a few hundred/thousand threads that traced to the logger periodically. This is no different than using disk_log in Erlang, I think. The Haskell logger thread got quickly overwhelmed with messages I think. The queue build-up was huge. How does it work with Erlang? Is the scheduler specially tuned somehow to give different priorities to different threads? The Haskell scheduler, I believe, is just round- robin. Thanks, Joel -- http://wagerlabs.com/ From raimo@REDACTED Tue Jan 3 14:03:42 2006 From: raimo@REDACTED (Raimo Niskanen) Date: 03 Jan 2006 14:03:42 +0100 Subject: Logging to one process from thousands: How does it work? References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> Message-ID: There is a small fix in the scheduler for the standard producer/consumer problem: A process that sends to a receiver having a large receive queue gets punished with a large reduction (number of function calls) count for the send operation, and will therefore get smaller scheduling slots. joelr1@REDACTED (Joel Reymont) writes: > Folks, > > I have just rewrote some code from Haskell to Erlang and there's one > thing that baffles me. > > I tried to approach Haskell the way I would code in Erlang and set up > a logger thread with an unbounded message queue. I then launched a > few hundred/thousand threads that traced to the logger periodically. > This is no different than using disk_log in Erlang, I think. > > The Haskell logger thread got quickly overwhelmed with messages I > think. The queue build-up was huge. How does it work with Erlang? Is > the scheduler specially tuned somehow to give different priorities to > different threads? The Haskell scheduler, I believe, is just round- > robin. > > Thanks, Joel > > -- > http://wagerlabs.com/ > > > > > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From joelr1@REDACTED Tue Jan 3 14:21:32 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 3 Jan 2006 13:21:32 +0000 Subject: Logging to one process from thousands: How does it work? In-Reply-To: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> Message-ID: <31207F4A-D118-41BE-8357-41024DA05995@gmail.com> To add to my list of questions... Are there any limits on the size of the receive queue in Erlang? Is there any blocking to prevent other processes from postingg to the message queue once it reaches a certain size? Is the receive queue a bottomless pit without any blocking? On Jan 3, 2006, at 12:36 PM, Joel Reymont wrote: > Folks, > > I have just rewrote some code from Haskell to Erlang and there's > one thing that baffles me. > > I tried to approach Haskell the way I would code in Erlang and set > up a logger thread with an unbounded message queue. I then launched > a few hundred/thousand threads that traced to the logger > periodically. This is no different than using disk_log in Erlang, I > think. > > The Haskell logger thread got quickly overwhelmed with messages I > think. The queue build-up was huge. How does it work with Erlang? > Is the scheduler specially tuned somehow to give different > priorities to different threads? The Haskell scheduler, I believe, > is just round-robin. -- http://wagerlabs.com/ From joelr1@REDACTED Tue Jan 3 14:41:05 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 3 Jan 2006 13:41:05 +0000 Subject: How does the scheduler assign priorities? In-Reply-To: References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> Message-ID: <0B5A726E-C047-43B9-A4C1-F4B9AA84A170@gmail.com> How does the scheduler assign priorities then? Is there a particular source code file that I should look at? I'm very interested in the logic behind it. So far it looks like a priority-based approach where priorities are assigned depending on the number of reductions. How many reductions does a process get before it is rescheduled? Is there a way to control that? Thanks, Joel On Jan 3, 2006, at 1:03 PM, Raimo Niskanen wrote: > There is a small fix in the scheduler for the standard > producer/consumer problem: A process that sends to a > receiver having a large receive queue gets punished > with a large reduction (number of function calls) > count for the send operation, and will therefore > get smaller scheduling slots. -- http://wagerlabs.com/ From joelr1@REDACTED Tue Jan 3 16:00:03 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 3 Jan 2006 15:00:03 +0000 Subject: How does the scheduler assign priorities? In-Reply-To: <0B5A726E-C047-43B9-A4C1-F4B9AA84A170@gmail.com> References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <0B5A726E-C047-43B9-A4C1-F4B9AA84A170@gmail.com> Message-ID: <7358DBB3-0A90-4A16-89D0-5840C2E0BD04@gmail.com> Google is my friend: http://www.erlang.org/ml-archive/erlang-questions/200104/msg00072.html On Jan 3, 2006, at 1:41 PM, Joel Reymont wrote: > How does the scheduler assign priorities then? Is there a > particular source code file that I should look at? I'm very > interested in the logic behind it. > > So far it looks like a priority-based approach where priorities are > assigned depending on the number of reductions. How many reductions > does a process get before it is rescheduled? Is there a way to > control that? -- http://wagerlabs.com/ From hedeland@REDACTED Tue Jan 3 16:14:27 2006 From: hedeland@REDACTED (Per Hedeland) Date: Tue, 3 Jan 2006 16:14:27 +0100 (CET) Subject: Bug in the inet driver's http mode Message-ID: <200601031514.k03FER42048744@tordmule.bluetail.com> Hi, This is one of those cases where *I* would say "No, that can't be - check your own code!" - but it seems I found a bug with the {packet, http} option. Of course this option isn't documented as far as I know, but I would have expected any bugs to be beaten out of it long ago anyway (e.g. yaws uses it, see below). But I guess HTTP headers with multiple continuation lines aren't all that common. Patch against R10B-9 below. I'm afraid I don't have a simple reproduction case - I could probably create one if absolutely necessary, but the bug is quite obvious from code inspection.:-) The symptom in our case was that yaws just hung in gen_tcp:recv/3 until Timeout when a http request had (among others) a header with about a dozen continuation lines (total header length ~ 700 bytes). --Per Hedeland --- otp_src_R10B-9/erts/emulator/drivers/common/inet_drv.c.orig Mon Dec 12 15:55:13 2005 +++ otp_src_R10B-9/erts/emulator/drivers/common/inet_drv.c Tue Jan 3 15:13:45 2006 @@ -5542,7 +5542,7 @@ if (plen < n) { if (SP(ptr2+1)) { ptr1 = ptr2+1; - len -= plen; + len = n - plen; } else goto done; From joelr1@REDACTED Tue Jan 3 17:48:16 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 3 Jan 2006 16:48:16 +0000 Subject: erl -make and hipe Message-ID: <32B4979D-4790-4393-A2F8-037657FC71A8@gmail.com> Folks, Is there a way to hipe-compile the source files with erl -make without inserting hipe annotations into every source file? Thanks, Joel -- http://wagerlabs.com/ From serge@REDACTED Tue Jan 3 19:12:29 2006 From: serge@REDACTED (Serge Aleynikov) Date: Tue, 03 Jan 2006 13:12:29 -0500 Subject: erl -make and hipe In-Reply-To: <32B4979D-4790-4393-A2F8-037657FC71A8@gmail.com> References: <32B4979D-4790-4393-A2F8-037657FC71A8@gmail.com> Message-ID: <43BABE8D.1020708@hq.idt.net> Wouldn't "erlc +native ..." work for you? Joel Reymont wrote: > Folks, > > Is there a way to hipe-compile the source files with erl -make without > inserting hipe annotations into every source file? > > Thanks, Joel > > -- > http://wagerlabs.com/ > > > > > > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From joelr1@REDACTED Tue Jan 3 19:47:27 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 3 Jan 2006 18:47:27 +0000 Subject: erl -make and hipe In-Reply-To: <43BABE8D.1020708@hq.idt.net> References: <32B4979D-4790-4393-A2F8-037657FC71A8@gmail.com> <43BABE8D.1020708@hq.idt.net> Message-ID: <80B767AD-1185-4882-B5C4-5005586E9D46@gmail.com> It surely would but does it have a -make option? :-) It looks like either erl -make or erlc +native but I could be wrong. On Jan 3, 2006, at 6:12 PM, Serge Aleynikov wrote: > Wouldn't "erlc +native ..." work for you? > -- http://wagerlabs.com/ From dizzyd@REDACTED Tue Jan 3 20:25:46 2006 From: dizzyd@REDACTED (Dave Smith) Date: Tue, 3 Jan 2006 12:25:46 -0700 Subject: erl -make and hipe In-Reply-To: <80B767AD-1185-4882-B5C4-5005586E9D46@gmail.com> References: <32B4979D-4790-4393-A2F8-037657FC71A8@gmail.com> <43BABE8D.1020708@hq.idt.net> <80B767AD-1185-4882-B5C4-5005586E9D46@gmail.com> Message-ID: <262AC3C5-D94A-48B5-88A3-63C0DB1A73BA@dizzyd.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Can you not just pass +native in the Options array in the makefile? I.e.. files("foo.erl", [native]) D. On Jan 3, 2006, at 11:47 AM, Joel Reymont wrote: > It surely would but does it have a -make option? :-) > > It looks like either erl -make or erlc +native but I could be wrong. > > On Jan 3, 2006, at 6:12 PM, Serge Aleynikov wrote: > >> Wouldn't "erlc +native ..." work for you? >> > > -- > http://wagerlabs.com/ > > > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDus+7s6zMNAt8YgcRAtLQAJoDMu6EkQFMhFUd77p5aCVUErbLpgCglq51 i+0RyyqBZp4Kn48GYcB3s6A= =tiRg -----END PGP SIGNATURE----- From david.nospam.hopwood@REDACTED Tue Jan 3 21:02:43 2006 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Tue, 03 Jan 2006 20:02:43 +0000 Subject: Logging to one process from thousands: How does it work? In-Reply-To: References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> Message-ID: <43BAD863.9060202@blueyonder.co.uk> > joelr1@REDACTED (Joel Reymont) writes: > >>I have just rewrote some code from Haskell to Erlang and there's one >>thing that baffles me. >> >>I tried to approach Haskell the way I would code in Erlang and set up >>a logger thread with an unbounded message queue. I then launched a >>few hundred/thousand threads that traced to the logger periodically. >>This is no different than using disk_log in Erlang, I think. >> >>The Haskell logger thread got quickly overwhelmed with messages I >>think. The queue build-up was huge. How does it work with Erlang? Is >>the scheduler specially tuned somehow to give different priorities to >>different threads? The Haskell scheduler, I believe, is just round- >>robin. Raimo Niskanen wrote: > There is a small fix in the scheduler for the standard > producer/consumer problem: A process that sends to a > receiver having a large receive queue gets punished > with a large reduction (number of function calls) > count for the send operation, and will therefore > get smaller scheduling slots. This makes the problem less likely to occur, but it isn't necessarily enough to prevent a message backlog in all cases. In principle, the right way to handle this is to provide back-pressure to the message sources, i.e. to allow the logging operation to block in each source. The simplest way to do that is to use bounded queues. -- David Hopwood From joelr1@REDACTED Tue Jan 3 22:02:29 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 3 Jan 2006 21:02:29 +0000 Subject: erl -make and hipe In-Reply-To: <262AC3C5-D94A-48B5-88A3-63C0DB1A73BA@dizzyd.com> References: <32B4979D-4790-4393-A2F8-037657FC71A8@gmail.com> <43BABE8D.1020708@hq.idt.net> <80B767AD-1185-4882-B5C4-5005586E9D46@gmail.com> <262AC3C5-D94A-48B5-88A3-63C0DB1A73BA@dizzyd.com> Message-ID: <3811A078-1F39-4482-AAF6-A15D7EB3D5D5@gmail.com> I'll try this, thanks. I don't have a makefile but I'll need to look into that. On Jan 3, 2006, at 7:25 PM, Dave Smith wrote: > Can you not just pass +native in the Options array in the makefile? > > I.e.. > > files("foo.erl", [native]) -- http://wagerlabs.com/ From joelr1@REDACTED Tue Jan 3 22:03:43 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 3 Jan 2006 21:03:43 +0000 Subject: Logging to one process from thousands: How does it work? In-Reply-To: <43BAD863.9060202@blueyonder.co.uk> References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <43BAD863.9060202@blueyonder.co.uk> Message-ID: How do you implement a bounded queue in Erlang without busy-waiting? On Jan 3, 2006, at 8:02 PM, David Hopwood wrote: > This makes the problem less likely to occur, but it isn't > necessarily enough > to prevent a message backlog in all cases. In principle, the right > way to > handle this is to provide back-pressure to the message sources, > i.e. to allow > the logging operation to block in each source. The simplest way to > do that is > to use bounded queues. -- http://wagerlabs.com/ From camster@REDACTED Tue Jan 3 22:58:35 2006 From: camster@REDACTED (Richard Cameron) Date: Tue, 3 Jan 2006 21:58:35 +0000 Subject: Logging to one process from thousands: How does it work? In-Reply-To: <43BAD863.9060202@blueyonder.co.uk> References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <43BAD863.9060202@blueyonder.co.uk> Message-ID: On 3 Jan 2006, at 20:02, David Hopwood wrote: > Raimo Niskanen wrote: >> A process that sends to a >> receiver having a large receive queue gets punished >> with a large reduction (number of function calls) >> count for the send operation > > This makes the problem less likely to occur, but it isn't > necessarily enough > to prevent a message backlog in all cases. If the amount of punishment a sender received increased with the queue length, would the maximum backlog asymptotically tend to a finite limit in the worst case? That's probably only true if you assume that the per-timeslice production and service rates are constant, which might very well be complete rubbish. I'm guessing the cost of pattern matching to do the "receive" on the message queue is going to increase with the queue length too. So, maybe it comes down to making sure that the punishments grow faster than the cost of performing the receives? Any idea what that cost is? Is the worst case linear, or can the virtual machine optimise for all cases? > In principle, the right way to > handle this is to provide back-pressure to the message sources, > i.e. to allow > the logging operation to block in each source. The simplest way to > do that is > to use bounded queues. Sounds like the reduction count punishment is a good way of providing that back-pressure, but still having "soft realtime" properties which more gradually degrade under load. I think with bounded queues it might also be possible to dream up scenarios where deadlocks can occur. What about a simple client/ server arrangement where the client sends a message to the server then happens to receive some other external (and unrelated) message which fills up its queue before the server responds. The server can't reply (its ! now blocks?) and the client can't process its message queue as it's sitting waiting for a reply from the server. Richard. From ulf@REDACTED Wed Jan 4 00:00:39 2006 From: ulf@REDACTED (Ulf Wiger) Date: Wed, 04 Jan 2006 00:00:39 +0100 Subject: Logging to one process from thousands: How does it work? In-Reply-To: References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <43BAD863.9060202@blueyonder.co.uk> Message-ID: Den 2006-01-03 22:03:43 skrev Joel Reymont : > How do you implement a bounded queue in Erlang without busy-waiting? Difficult, but you can achieve back-pressure by making the communication with the logger synchronous. /Uffe -- Ulf Wiger From joelr1@REDACTED Wed Jan 4 00:07:56 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 3 Jan 2006 23:07:56 +0000 Subject: How to find out what's going on Message-ID: <8A3DDD6E-665A-42B1-A40C-823085616013@gmail.com> Folks, I'm writing poker bots and my goal is to launch as many per VM as I can. The bots use a binary protocol to talk to the poker server. I'm tracing to a disk log periodically. Here I launched 10 bots and looked at the trace log for one of them. I have a separate module that analyzes the disk log. 22:52:46: <0.32.0>: Received: 0.000797s: srv_table_state 22:53:08: <0.32.0>: Received: 0.000110s: {srv_table_state, ...} You can see a difference of 22 seconds above. Normally this would not be cause for concern but the two traces are from two consecutive lines in the same module! trace(Bot, 90, "Received: ~.6. fs: ~p", [Seconds, Cmd1]), trace(Bot, 80, "Received: ~.6. fs: ~p", [Seconds, element(1, Cmd1)]); Trace itself is defined thusly: trace(Bot, Level, Format, Args) when Level =< Bot#bot.debug_level -> {_, Time} = erlang:localtime(), disk_log:alog(Bot#bot.log, {trace, self(), Format, Args, Time}); How do I find out where the 22 seconds went? Thanks, Joel -- http://wagerlabs.com/ From erlang@REDACTED Wed Jan 4 00:53:39 2006 From: erlang@REDACTED (Michael McDaniel) Date: Tue, 3 Jan 2006 15:53:39 -0800 Subject: How to find out what's going on In-Reply-To: <8A3DDD6E-665A-42B1-A40C-823085616013@gmail.com> References: <8A3DDD6E-665A-42B1-A40C-823085616013@gmail.com> Message-ID: <20060103235339.GG22908@delora.autosys.us> On Tue, Jan 03, 2006 at 11:07:56PM +0000, Joel Reymont wrote: > Folks, > > I'm writing poker bots and my goal is to launch as many per VM as I > can. The bots use a binary protocol to talk to the poker server. I'm > tracing to a disk log periodically. > > Here I launched 10 bots and looked at the trace log for one of them. > I have a separate module that analyzes the disk log. > > 22:52:46: <0.32.0>: Received: 0.000797s: srv_table_state > 22:53:08: <0.32.0>: Received: 0.000110s: {srv_table_state, ...} > > You can see a difference of 22 seconds above. Normally this would not > be cause for concern but the two traces are from two consecutive > lines in the same module! > > trace(Bot, 90, "Received: ~.6. fs: ~p", > [Seconds, Cmd1]), > trace(Bot, 80, "Received: ~.6. fs: ~p", > [Seconds, element(1, Cmd1)]); > > Trace itself is defined thusly: > > trace(Bot, Level, Format, Args) > when Level =< Bot#bot.debug_level -> > {_, Time} = erlang:localtime(), > disk_log:alog(Bot#bot.log, {trace, self(), Format, Args, Time}); > > How do I find out where the 22 seconds went? > > Thanks, Joel > > -- > http://wagerlabs.com/ > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ from disk_log docs ... "The alog/2 and balog/2 functions asynchronously append an item to a disk log." I'm guessing you are seeing the 22 seconds as that asynchronous write. Also from docs ... "The log/2 and blog/2 functions synchronously append a term to a disk log." Hmm, asynchronous *item* logging or synchronous *term* logging. I have not played with it but something to look at. ~Michael From sean.hinde@REDACTED Wed Jan 4 01:10:25 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Wed, 4 Jan 2006 00:10:25 +0000 Subject: How to find out what's going on In-Reply-To: <8A3DDD6E-665A-42B1-A40C-823085616013@gmail.com> References: <8A3DDD6E-665A-42B1-A40C-823085616013@gmail.com> Message-ID: Joel, Check the message queue length of the disk_log_server. disk_log:alog sends an async message to the disk_log_server. Try with disk_log:log instead and see if you get the same result. From what I have seen in the past the throughput under full load will increase dramatically - especially if combined with emulator thread pool (erl +A 10). To answer your question, the only way to really see where time is being spent in the emulator is to profile the emulator itself while running your program. If you figure out how to get profiling working with the gnu tools then a blog post on that would be quite interesting :-) Sean On 3 Jan 2006, at 23:07, Joel Reymont wrote: > Folks, > > I'm writing poker bots and my goal is to launch as many per VM as I > can. The bots use a binary protocol to talk to the poker server. > I'm tracing to a disk log periodically. > > Here I launched 10 bots and looked at the trace log for one of > them. I have a separate module that analyzes the disk log. > > 22:52:46: <0.32.0>: Received: 0.000797s: srv_table_state > 22:53:08: <0.32.0>: Received: 0.000110s: {srv_table_state, ...} > > You can see a difference of 22 seconds above. Normally this would > not be cause for concern but the two traces are from two > consecutive lines in the same module! > > trace(Bot, 90, "Received: ~.6. fs: ~p", > [Seconds, Cmd1]), > trace(Bot, 80, "Received: ~.6. fs: ~p", > [Seconds, element(1, Cmd1)]); > > Trace itself is defined thusly: > > trace(Bot, Level, Format, Args) > when Level =< Bot#bot.debug_level -> > {_, Time} = erlang:localtime(), > disk_log:alog(Bot#bot.log, {trace, self(), Format, Args, Time}); > > How do I find out where the 22 seconds went? > > Thanks, Joel > > -- > http://wagerlabs.com/ > > > > > From hedeland@REDACTED Wed Jan 4 01:36:22 2006 From: hedeland@REDACTED (Per Hedeland) Date: Wed, 4 Jan 2006 01:36:22 +0100 (CET) Subject: How to find out what's going on In-Reply-To: <8A3DDD6E-665A-42B1-A40C-823085616013@gmail.com> Message-ID: <200601040036.k040aMok051150@tordmule.bluetail.com> Joel Reymont wrote: > >22:52:46: <0.32.0>: Received: 0.000797s: srv_table_state >22:53:08: <0.32.0>: Received: 0.000110s: {srv_table_state, ...} > >You can see a difference of 22 seconds above. Normally this would not >be cause for concern but the two traces are from two consecutive >lines in the same module! > > trace(Bot, 90, "Received: ~.6. fs: ~p", > [Seconds, Cmd1]), > trace(Bot, 80, "Received: ~.6. fs: ~p", > [Seconds, element(1, Cmd1)]); Hm, are you sure? Seems to me the that if the first line was logged by the first trace call, the second trace call would have caused a badarg (from element(1, srv_table_state)). I.e. unless you did some copy'n'paste mistake here, it's more likely that the first line is logged by the second trace call, and the second line is logged by the first trace call the next time you run through this particular piece of code - we sure don't know what happened in between.:-) --Per Hedeland From joelr1@REDACTED Wed Jan 4 01:36:33 2006 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 4 Jan 2006 00:36:33 +0000 Subject: How to find out what's going on In-Reply-To: <20060103235339.GG22908@delora.autosys.us> References: <8A3DDD6E-665A-42B1-A40C-823085616013@gmail.com> <20060103235339.GG22908@delora.autosys.us> Message-ID: Just to make sure no one misses the point... The tracing code grabs the time BEFORE disk_log is used. Also, why would it spend 22 seconds in the asynchronous write? Isn't the write supposed to be asynchronous, i.e. write and finish right away? On Jan 3, 2006, at 11:53 PM, Michael McDaniel wrote: >> trace(Bot, Level, Format, Args) >> when Level =< Bot#bot.debug_level -> >> {_, Time} = erlang:localtime(), >> disk_log:alog(Bot#bot.log, {trace, self(), Format, Args, Time}); > > I'm guessing you are seeing the 22 seconds as that asynchronous > write. -- http://wagerlabs.com/ From joelr1@REDACTED Wed Jan 4 01:40:25 2006 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 4 Jan 2006 00:40:25 +0000 Subject: How to find out what's going on In-Reply-To: <200601040036.k040aMok051150@tordmule.bluetail.com> References: <200601040036.k040aMok051150@tordmule.bluetail.com> Message-ID: <635E66EB-51A2-4BC4-A43C-2F83A21E6E3F@gmail.com> I'm sure that I did not make any copy/paste mistakes. Indeed, the lines are printed in reverse order but could it be that disk_log does not guarantee the order? I did not look at the disk_log code but it seems more likely that the terms were logged in reverse order. The printout is from opening the disk log and printing all entries where pid is the one that I'm looking for. On Jan 4, 2006, at 12:36 AM, Per Hedeland wrote: >> trace(Bot, 90, "Received: ~.6. fs: ~p", >> [Seconds, Cmd1]), >> trace(Bot, 80, "Received: ~.6. fs: ~p", >> [Seconds, element(1, Cmd1)]); > > Hm, are you sure? Seems to me the that if the first line was logged > by the first trace call, the second trace call would have caused a > badarg (from element(1, srv_table_state)). I.e. unless you did some > copy'n'paste mistake here, it's more likely that the first line is > logged by the second trace call, and the second line is logged by the > first trace call the next time you run through this particular > piece of > code - we sure don't know what happened in between.:-) > > --Per Hedeland -- http://wagerlabs.com/ From joelr1@REDACTED Wed Jan 4 01:46:22 2006 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 4 Jan 2006 00:46:22 +0000 Subject: How to find out what's going on In-Reply-To: References: <8A3DDD6E-665A-42B1-A40C-823085616013@gmail.com> Message-ID: Why would throughput be better with synchronous logging as opposed to asynchronous? I'm afraid of tracing becoming a bottleneck if I make it synchronous, sort of like a lock that only lets one process through. Maybe my fears are unfounded, though. Also, how do I get hold of the disk_log pid to inspect the message queue length? I found pid2name(Pid) -> {ok, Log} | undefined but don't see a name2pid(Name) -> {ok, Pid}. On Jan 4, 2006, at 12:10 AM, Sean Hinde wrote: > Try with disk_log:log instead and see if you get the same result. > From what I have seen in the past the throughput under full load > will increase dramatically - especially if combined with emulator > thread pool (erl +A 10). > -- http://wagerlabs.com/ From sean.hinde@REDACTED Wed Jan 4 02:13:29 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Wed, 4 Jan 2006 01:13:29 +0000 Subject: How to find out what's going on In-Reply-To: References: <8A3DDD6E-665A-42B1-A40C-823085616013@gmail.com> Message-ID: <5CE4A2F8-A697-4850-92AE-B26F7A326FE0@gmail.com> On 4 Jan 2006, at 00:46, Joel Reymont wrote: > Why would throughput be better with synchronous logging as opposed > to asynchronous? Because it prevents the message queue to the disklog server growing and hence the CPU thrashing through the message queue every time a message is added to it. > > I'm afraid of tracing becoming a bottleneck if I make it > synchronous, sort of like a lock that only lets one process > through. Maybe my fears are unfounded, though. The whole system won't go faster than the disk logging, that is true. You could buy a faster disk array, or write a custom logger which aggregates say 100 messages then writes them to disk on one chunk. All other processes can run (the ones not waiting for the disk) if you have enabled the thread pool. > > Also, how do I get hold of the disk_log pid to inspect the message > queue length? I found pid2name(Pid) -> {ok, Log} | undefined but > don't see a name2pid(Name) -> {ok, Pid}. do i(). and look to see if there are any processes with large message queues. If there are none then you do not have this problem. > > On Jan 4, 2006, at 12:10 AM, Sean Hinde wrote: > >> Try with disk_log:log instead and see if you get the same result. >> From what I have seen in the past the throughput under full load >> will increase dramatically - especially if combined with emulator >> thread pool (erl +A 10). >> > > -- > http://wagerlabs.com/ > > > > > From sean.hinde@REDACTED Wed Jan 4 02:18:31 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Wed, 4 Jan 2006 01:18:31 +0000 Subject: How to find out what's going on In-Reply-To: <635E66EB-51A2-4BC4-A43C-2F83A21E6E3F@gmail.com> References: <200601040036.k040aMok051150@tordmule.bluetail.com> <635E66EB-51A2-4BC4-A43C-2F83A21E6E3F@gmail.com> Message-ID: <1B8775F2-83C5-48DF-9962-144728AB074C@gmail.com> On 4 Jan 2006, at 00:40, Joel Reymont wrote: > I'm sure that I did not make any copy/paste mistakes. Indeed, the > lines are printed in reverse order but could it be that disk_log > does not guarantee the order? I did not look at the disk_log code > but it seems more likely that the terms were logged in reverse order. No. messages between two processes arrive in the order they are sent. It does look like there might be a bug in your program. Also, I just noticed that you get this problem with only 10 bots. You are unlikely to run into scheduler issues with that many. Sean > > The printout is from opening the disk log and printing all entries > where pid is the one that I'm looking for. > > On Jan 4, 2006, at 12:36 AM, Per Hedeland wrote: > >>> trace(Bot, 90, "Received: ~.6. fs: ~p", >>> [Seconds, Cmd1]), >>> trace(Bot, 80, "Received: ~.6. fs: ~p", >>> [Seconds, element(1, Cmd1)]); >> >> Hm, are you sure? Seems to me the that if the first line was logged >> by the first trace call, the second trace call would have caused a >> badarg (from element(1, srv_table_state)). I.e. unless you did some >> copy'n'paste mistake here, it's more likely that the first line is >> logged by the second trace call, and the second line is logged by the >> first trace call the next time you run through this particular >> piece of >> code - we sure don't know what happened in between.:-) >> >> --Per Hedeland > > -- > http://wagerlabs.com/ > > > > > From raimo@REDACTED Wed Jan 4 10:01:10 2006 From: raimo@REDACTED (Raimo Niskanen) Date: 04 Jan 2006 10:01:10 +0100 Subject: Logging to one process from thousands: How does it work? References: , <43BAD863.9060202@blueyonder.co.uk>, Message-ID: Well, the existing implementation is just a small fix to prevent the beginner from getting stuck on a simple producer/consumer problem. Unfortunately the fix works so well that users are lured to think it is the complete solution, realizes it is not flawless, and starts making intricate improvement suggestions. The problem is not easily solved in the general case. So I guess it would be futile to try to implement the final solution in the runtime system. The existing implementation might be enough in many cases; to reduce the cost of pattern matching at the receive end - do no pattern matching, just always take the first message. The pattern matching cost at the receive end does not have to increase with queue lengt; if a message has been scanned and found not to match - the scan continues with new messages even after a schedule out. It is when entering a new receive statement the message queue is rescanned from the beginning. Each application will have to solve the problem using some kind of flow control. For a logger this is unpleasent but not impossible. E.g the client might have a counter in the process dictionary and do a synchronous log entry every 17 log entries. And if the logger always takes the first message, the existing implementation might be enough. Beware that the existing flow control only works for local sends so I guess a logger in a node cluster would have to use explicit flow control. camster@REDACTED (Richard Cameron) writes: > On 3 Jan 2006, at 20:02, David Hopwood wrote: > > > Raimo Niskanen wrote: > >> A process that sends to a > >> receiver having a large receive queue gets punished > >> with a large reduction (number of function calls) > >> count for the send operation > > > > This makes the problem less likely to occur, but it isn't > > necessarily enough > > to prevent a message backlog in all cases. > > If the amount of punishment a sender received increased with the > queue length, would the maximum backlog asymptotically tend to a > finite limit in the worst case? > > That's probably only true if you assume that the per-timeslice > production and service rates are constant, which might very well be > complete rubbish. I'm guessing the cost of pattern matching to do the > "receive" on the message queue is going to increase with the queue > length too. So, maybe it comes down to making sure that the > punishments grow faster than the cost of performing the receives? > > Any idea what that cost is? Is the worst case linear, or can the > virtual machine optimise for all cases? > > > In principle, the right way to > > handle this is to provide back-pressure to the message sources, > > i.e. to allow > > the logging operation to block in each source. The simplest way to > > do that is > > to use bounded queues. > > Sounds like the reduction count punishment is a good way of providing > that back-pressure, but still having "soft realtime" properties which > more gradually degrade under load. > > I think with bounded queues it might also be possible to dream up > scenarios where deadlocks can occur. What about a simple client/ > server arrangement where the client sends a message to the server > then happens to receive some other external (and unrelated) message > which fills up its queue before the server responds. The server can't > reply (its ! now blocks?) and the client can't process its message > queue as it's sitting waiting for a reply from the server. > > Richard. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From joelr1@REDACTED Wed Jan 4 12:01:53 2006 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 4 Jan 2006 11:01:53 +0000 Subject: How to recognize HiPE-compiled beams Message-ID: Folks, Is there a way to tell from within erl if a beam has been HiPE-compiled? Thanks, Joel -- http://wagerlabs.com/ From joelr1@REDACTED Wed Jan 4 12:11:26 2006 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 4 Jan 2006 11:11:26 +0000 Subject: erl -remsh Message-ID: I'm trying to connect to another node running on my machine that was started with erl -sname test. I tried this with erl -remsh test and erl -remsh test@. I received the following both times: *** ERROR: Shell process terminated! (^G to start new job) *** What am I missing? Thanks, Joel -- http://wagerlabs.com/ From hedeland@REDACTED Wed Jan 4 12:18:03 2006 From: hedeland@REDACTED (Per Hedeland) Date: Wed, 4 Jan 2006 12:18:03 +0100 (CET) Subject: How to find out what's going on In-Reply-To: <635E66EB-51A2-4BC4-A43C-2F83A21E6E3F@gmail.com> Message-ID: <200601041118.k04BI32c053380@tordmule.bluetail.com> Joel Reymont wrote: > >I'm sure that I did not make any copy/paste mistakes. Indeed, the >lines are printed in reverse order but could it be that disk_log does >not guarantee the order? I did not look at the disk_log code but it >seems more likely that the terms were logged in reverse order. It would be a really crappy logger if the order of calls from a single process wasn't preserved all the way down to the log entries. And as you pointed out elsewhere, the time was grabbed in the trace() function, and it was obviously later in the second logged line, since that lateness is what you're asking about... >The printout is from opening the disk log and printing all entries >where pid is the one that I'm looking for. And resulting in *only* those two lines, nothing before and/or after? I.e. it's not just that you're off-by-one when pairing up log entries? And of course, both pids and logs may wrap... (not likely that your pids wrapped though I guess). --Per Hedeland From joelr1@REDACTED Wed Jan 4 12:25:45 2006 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 4 Jan 2006 11:25:45 +0000 Subject: How to find out what's going on In-Reply-To: <200601041118.k04BI32c053380@tordmule.bluetail.com> References: <200601041118.k04BI32c053380@tordmule.bluetail.com> Message-ID: <73E99BDA-D0B0-4CF5-8916-DC5D7D48AFC5@gmail.com> No, I had more lines printed of course. I just pasted these two into the email. Maybe there's something wrong with the function that I use to traverse the log but wouldn't my timestamps not be sequential then? %%% Traverse disk log traverse(Fun, Acc) -> {ok, Log} = disk_log:open([{name, test}, {mode, read_only}]), Result = traverse(Log, Fun, Acc, disk_log:chunk(Log, start)), disk_log:close(Log), Result. traverse(_, _, Acc, eof) -> Acc; traverse(Log, Fun, Acc, {Cont, Terms}) -> Acc1 = Fun(Acc, Terms), traverse(Log, Fun, Acc1, disk_log:chunk(Log, Cont)). On Jan 4, 2006, at 11:18 AM, Per Hedeland wrote: >> The printout is from opening the disk log and printing all entries >> where pid is the one that I'm looking for. > > And resulting in *only* those two lines, nothing before and/or after? > I.e. it's not just that you're off-by-one when pairing up log entries? > And of course, both pids and logs may wrap... (not likely that your > pids > wrapped though I guess). -- http://wagerlabs.com/ From bengt.kleberg@REDACTED Wed Jan 4 12:34:03 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Wed, 04 Jan 2006 12:34:03 +0100 Subject: How to recognize HiPE-compiled beams In-Reply-To: References: Message-ID: <43BBB2AB.4010604@ericsson.com> On 2006-01-04 12:01, Joel Reymont wrote: > Folks, > > Is there a way to tell from within erl if a beam has been HiPE-compiled? i do not have a hipe compiled module available right now but my suggestion would be to use Module:module_info(compile) => [{options, Compile_options_list}, ...] surely the option to HiPE-compile will be present in Compile_options_list, would it not? bengt From karol.skocik@REDACTED Wed Jan 4 12:43:04 2006 From: karol.skocik@REDACTED (karol) Date: Wed, 4 Jan 2006 12:43:04 +0100 Subject: tags for all erlang symbols in emacs References: Message-ID: <20060104114304.BC896412B2@bang.trapexit.org> Hi, I am using XEmacs, and I would like to import all symbols Erlang provides to Emacs. I have used etags to do that, however it failed with segmentation fault. When I do that step by step for every file I believe I would work but it is very worky solution and also I would have loads of TAGS files which I will need to load one by one. How to you create/use tags for Erlang symbols in Emacs? Thanks, Karol _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From chaitanya.chalasani@REDACTED Wed Jan 4 12:50:48 2006 From: chaitanya.chalasani@REDACTED (Chaitanya Chalasani) Date: Wed, 4 Jan 2006 17:20:48 +0530 Subject: How to recognize HiPE-compiled beams In-Reply-To: References: Message-ID: <200601041720.49168.chaitanya.chalasani@gmail.com> Hi, On Wednesday 04 January 2006 16:31, Joel Reymont wrote: > Folks, > > Is there a way to tell from within erl if a beam has been HiPE-compiled? > > Thanks, Joel > > -- > http://wagerlabs.com/ The screenshot below might help you. 1> fact:module_info(). [{exports,[{module_info,1},{module_info,0},{start,1}]}, {imports,[]}, {attributes,[{vsn,[235774949298681110343635959375528815860]}]}, {compile,[{options,[{cwd,"/home/chaitanya/Documents/Workspace/erlang"}, {outdir,"/home/chaitanya/Documents/Workspace/erlang"}, {hipe,[verbose]}, native]}, {version,"4.3.11"}, {time,{2005,12,26,7,40,58}}, {source,"/home/chaitanya/Documents/Workspace/erlang/fact.erl"}]}] 2> q(). ok 3> chaitanya@REDACTED:~/Documents/Workspace/erlang> erlc fact.erl chaitanya@REDACTED:~/Documents/Workspace/erlang> erl Erlang (BEAM) emulator version 5.4.12 [source] [hipe] Eshell V5.4.12 (abort with ^G) 1> fact:module_info(). [{exports,[{start,1},{module_info,0},{module_info,1}]}, {imports,[]}, {attributes,[{vsn,[235774949298681110343635959375528815860]}]}, {compile,[{options,[{cwd,"/home/chaitanya/Documents/Workspace/erlang"}, {outdir,"/home/chaitanya/Documents/Workspace/erlang"}]}, {version,"4.3.11"}, {time,{2006,1,4,11,48,36}}, {source,"/home/chaitanya/Documents/Workspace/erlang/fact.erl"}]}] 2> -- Chaitanya Chalasani From bobbyqiu@REDACTED Wed Jan 4 10:37:44 2006 From: bobbyqiu@REDACTED (bobbyqiu@REDACTED) Date: Wed, 4 Jan 2006 17:37:44 +0800 Subject: A question about ERL Message-ID: <8E523FC208B8174790E69947E3079147065CF2@rnd-ex01.rnd.gdnt.local> Hi all, I am a new comer in the Erlang world. By looking at the following lines on an Erlang shell, I have one question regarding Erlang. Line 6 is not successful which says Hello is unbound. However, line 7 is okay. I am thinking that 'unbound' means that the Erlang shell can't determine the end of the string 'Hello'. But it is okay for string 'hello'. Can't a string with capital letter be used in such case? 6> io:format("this is a test!~w~n",[Hello]). ** 1: variable 'Hello' is unbound ** 7> io:format("this is a test!~w~n",[hello]). this is a test!hello ok 8> -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias@REDACTED Wed Jan 4 13:58:39 2006 From: matthias@REDACTED (Matthias Lang) Date: Wed, 4 Jan 2006 13:58:39 +0100 Subject: How does the scheduler assign priorities? In-Reply-To: <7358DBB3-0A90-4A16-89D0-5840C2E0BD04@gmail.com> References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <0B5A726E-C047-43B9-A4C1-F4B9AA84A170@gmail.com> <7358DBB3-0A90-4A16-89D0-5840C2E0BD04@gmail.com> Message-ID: <17339.50815.212197.883826@antilipe.corelatus.se> Joel Reymont writes: > Google is my friend: > > http://www.erlang.org/ml-archive/erlang-questions/200104/msg00072.html To get full points, you have to use it _before_ posting. For extra credit, make sure the question isn't in the FAQ and isn't covered by the Erlang reference manual. Matthias > On Jan 3, 2006, at 1:41 PM, Joel Reymont wrote: > > > How does the scheduler assign priorities then? Is there a > > particular source code file that I should look at? I'm very > > interested in the logic behind it. > > > > So far it looks like a priority-based approach where priorities are > > assigned depending on the number of reductions. How many reductions > > does a process get before it is rescheduled? Is there a way to > > control that? > > -- > http://wagerlabs.com/ > > > > From bengt.kleberg@REDACTED Wed Jan 4 14:05:46 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Wed, 04 Jan 2006 14:05:46 +0100 Subject: A question about ERL In-Reply-To: <8E523FC208B8174790E69947E3079147065CF2@rnd-ex01.rnd.gdnt.local> References: <8E523FC208B8174790E69947E3079147065CF2@rnd-ex01.rnd.gdnt.local> Message-ID: <43BBC82A.2010806@ericsson.com> On 2006-01-04 10:37, bobbyqiu@REDACTED wrote: > Hi all, > > I am a new comer in the Erlang world. By looking at the following lines > on an Erlang shell, I have one question regarding Erlang. > > Line 6 is not successful which says Hello is unbound. However, line 7 is > okay. I am thinking that 'unbound' means that the Erlang shell can't > determine the end of the string 'Hello'. But it is okay for string > 'hello'. Can't a string with capital letter be used in such case? 'hello' is not a string, but an atom. 'Hello' is not a string, but a variable (without a value, ie unbound). try: io:format("this is a test!~w~n",["Hello"]). bengt From lennart.ohman@REDACTED Wed Jan 4 14:12:24 2006 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Wed, 4 Jan 2006 14:12:24 +0100 Subject: A question about ERL In-Reply-To: <8E523FC208B8174790E69947E3079147065CF2@rnd-ex01.rnd.gdnt.local> Message-ID: Welcome to Erlang :-) I suggest you read the first chapters of Concurrent Programming in Erlang available at: http://www.erlang.org/download/erlang-book-part1.pdf It will explain a lot to you about atoms,variables and such. Good luck, Lennart ------------------------------------------------------------- Lennart Ohman?????????????????? office? : +46-8-587 623 27 Sjoland & Thyselius Telecom AB? cellular: +46-70-552 67 35 Sehlstedtsgatan 6?????????????? fax???? : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN??? email?? : lennart.ohman@REDACTED ________________________________________ From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of bobbyqiu@REDACTED Sent: Wednesday, January 04, 2006 10:38 AM To: erlang-questions@REDACTED Subject: A question about ERL Hi all, I am a new comer in the Erlang world. By looking at the following lines on an Erlang shell, I have one question regarding Erlang. Line 6 is not successful which says Hello is unbound. However, line 7 is okay. I am thinking that 'unbound' means that the Erlang shell can't determine the end of the string 'Hello'. But it is okay for string 'hello'.? Can't a string with capital letter be used in such case? 6> io:format("this is a test!~w~n",[Hello]). ** 1: variable 'Hello' is unbound ** 7> io:format("this is a test!~w~n",[hello]). this is a test!hello ok 8> From gunilla@REDACTED Wed Jan 4 14:42:10 2006 From: gunilla@REDACTED (Gunilla Arendt) Date: Wed, 04 Jan 2006 14:42:10 +0100 Subject: time it takes to reastart gen_server In-Reply-To: <43BA6428.3010506@ast.dfs.de> References: <43BA6428.3010506@ast.dfs.de> Message-ID: <43BBD0B2.20507@erix.ericsson.se> You don't have a gen_server, you have a plain Erlang process. The process calls "gen_server:call(self(), stop)" when the port is closed, thus sending a gen_server request to itself. But since the process is not a gen_server (and does not handle the request), no reply is received and the function call does not return until the default gen_server timeout expires (incidentally, after 5 seconds) and only then does the process terminate. Instead of calling "gen_server:call(self(), stop)", simply let the process terminate by -- for example -- returning an atom 'stop': ... receive {'EXIT',Port,Reason} -> io:format(...), stop; ... Also, I recommend you read "Design Principles" in the Erlang/OTP documentation to learn more about generic servers. / Gunilla Dietmar Schaefer wrote: > Happy new year ! > > > I am trying to develop a gen_server which starts a unix process > > > do(ExtPrg) -> process_flag(trap_exit, > true), %% to get informed when process terminates > Port = open_port({spawn, ExtPrg}, [{packet, 2}]), %% ExtProg > also includes parameter > loop(Port). > > > > loop(Port) -> > receive > {'EXIT',Port,Reason} -> io:format("external program exited~n > Reason=~p Port=~p~n",[Reason,Port]), %port program died > gen_server:call(self(),stop) %% all work is done - > go home > end. > > > > This gen_server is supervised by a supervisor. > > init(_Args) -> case whereis(watchdog) of > undefined -> %% register only once > register(watchdog, self()); > _ -> ok > end, > > > Xclock = {xclock,{xclock,start_link,["/usr/X11R6/bin/xclock"]}, > permanent,brutal_kill,worker,[xclock]}, > > Xterm = {xterm,{xterm,start_link,["/usr/bin/xterm"]}, > permanent,brutal_kill,worker,[xterm]}, > > {ok,{{one_for_one,1,6}, [Xclock,Xterm]}}. > > > It takes 5 seconds to restart my xclock after I closed it. > > How can I fasten it up ? > > regards > > > Dietmar > > From serge@REDACTED Wed Jan 4 14:45:49 2006 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 04 Jan 2006 08:45:49 -0500 Subject: erl -remsh In-Reply-To: References: Message-ID: <43BBD18D.30104@hq.idt.net> You need to provide a node name for the node you are starting, so that it starts in distributed mode: erl -remsh test@REDACTED -sname test1 Joel Reymont wrote: > I'm trying to connect to another node running on my machine that was > started with erl -sname test. I tried this with erl -remsh test and erl > -remsh test@. I received the following both times: > > *** ERROR: Shell process terminated! (^G to start new job) *** > > What am I missing? > > Thanks, Joel > > -- > http://wagerlabs.com/ > > > > > > From mats.cronqvist@REDACTED Wed Jan 4 16:24:21 2006 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Wed, 04 Jan 2006 16:24:21 +0100 Subject: Prolog interface and ASCII parsing In-Reply-To: References: Message-ID: <43BBE8A5.3070008@ericsson.com> like this? > {ok,Toks,_} = erl_scan:string("[{foo,bla},x]."). > {ok,Term} = erl_parse:parse_term(Toks). > Term. {ok,[{foo,bla},x]} mats Rupert Meese wrote: > Hi, > > I am trying to create an interface between parts of my system in Erlang > and prolog. However, I can not see a way of creating a communication > channel over which I can send from prolog an ACSII list to be parsed in > Erlang as an Erlang term. That is, in Erlang I can use file:read() to > read a term, but only from a file, not a pipe. I can create a link using > gen_tcp:*, open_port() etc. but receive binary objects or lists of bytes > that I can not see how parse as ASCII Erlang terms. > > Does anyone have any suggestions? > > Thanks > Rupert Meese From mats.cronqvist@REDACTED Wed Jan 4 16:42:43 2006 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Wed, 04 Jan 2006 16:42:43 +0100 Subject: tags for all erlang symbols in emacs In-Reply-To: <20060104114304.BC896412B2@bang.trapexit.org> References: <20060104114304.BC896412B2@bang.trapexit.org> Message-ID: <43BBECF3.3070509@ericsson.com> this version works; $ etags --version etags (GNU Emacs 21.4) Copyright (C) 1999 Free Software Foundation, Inc. and Ken Arnold This program is distributed under the same terms as Emacs mats p.s. if you're after the (x)emacs functionality of jumping to the function under point, i'd recommend using esense or distel. they can do everything tags can (without the need for a TAGS file), and more. i use both... karol wrote: > Hi, > I am using XEmacs, and I would like to import all symbols Erlang provides to Emacs. I have used etags to do that, however it failed with segmentation fault. When I do that step by step for every file I believe I would work but it is very worky solution and also I would have loads of TAGS files which I will need to load one by one. > How to you create/use tags for Erlang symbols in Emacs? > Thanks, > Karol > _________________________________________________________ > Sent using Mail2Forum (http://m2f.sourceforge.net) From rpettit@REDACTED Wed Jan 4 17:20:21 2006 From: rpettit@REDACTED (Rick Pettit) Date: Wed, 4 Jan 2006 10:20:21 -0600 Subject: Logging to one process from thousands: How does it work? In-Reply-To: <31207F4A-D118-41BE-8357-41024DA05995@gmail.com> References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <31207F4A-D118-41BE-8357-41024DA05995@gmail.com> Message-ID: <20060104162021.GA20605@vailsys.com> On Tue, Jan 03, 2006 at 01:21:32PM +0000, Joel Reymont wrote: > To add to my list of questions... > > Are there any limits on the size of the receive queue in Erlang? I entered your exact question into google and the first link that popped up was the Erlang FAQ--try reading that. You might even want to skip to the following section: 10.8.3. What limits does Erlang have? There you will find a link to even more information, and so on. -Rick > Is > there any blocking to prevent other processes from postingg to the > message queue once it reaches a certain size? > > Is the receive queue a bottomless pit without any blocking? > > On Jan 3, 2006, at 12:36 PM, Joel Reymont wrote: > > >Folks, > > > >I have just rewrote some code from Haskell to Erlang and there's > >one thing that baffles me. > > > >I tried to approach Haskell the way I would code in Erlang and set > >up a logger thread with an unbounded message queue. I then launched > >a few hundred/thousand threads that traced to the logger > >periodically. This is no different than using disk_log in Erlang, I > >think. > > > >The Haskell logger thread got quickly overwhelmed with messages I > >think. The queue build-up was huge. How does it work with Erlang? > >Is the scheduler specially tuned somehow to give different > >priorities to different threads? The Haskell scheduler, I believe, > >is just round-robin. > > -- > http://wagerlabs.com/ > > > > > From dizzyd@REDACTED Wed Jan 4 18:15:20 2006 From: dizzyd@REDACTED (Dave Smith) Date: Wed, 4 Jan 2006 10:15:20 -0700 Subject: Determine where a match fails Message-ID: <944B74DE-F83C-464F-9432-2F6ED35C2BE6@dizzyd.com> Greetings, Is there a way to determine the File/Line where a badmatch error is generated? Obviously, you get a stack trace with the function call, but more often than not, that's not quite descriptive enough, since all you get is the value that didn't match...something. Any guidance would be appreciated. :) Thanks. D. From sean.hinde@REDACTED Wed Jan 4 18:49:09 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Wed, 4 Jan 2006 17:49:09 +0000 Subject: Determine where a match fails In-Reply-To: <944B74DE-F83C-464F-9432-2F6ED35C2BE6@dizzyd.com> References: <944B74DE-F83C-464F-9432-2F6ED35C2BE6@dizzyd.com> Message-ID: <6618C56B-9EDF-4D80-BA46-F3B49FC1C2DC@gmail.com> On 4 Jan 2006, at 17:15, Dave Smith wrote: > Greetings, > > Is there a way to determine the File/Line where a badmatch error is > generated? Obviously, you get a stack trace with the function call, > but more often than not, that's not quite descriptive enough, since > all you get is the value that didn't match...something. > > Any guidance would be appreciated. :) You might like to try out the smart exceptions package from jungerl. I believe this adds such things. I've never actually tried it myself, but it might just do the job. Regards, Sean From erlang@REDACTED Wed Jan 4 19:01:16 2006 From: erlang@REDACTED (Michael McDaniel) Date: Wed, 4 Jan 2006 10:01:16 -0800 Subject: Determine where a match fails In-Reply-To: <944B74DE-F83C-464F-9432-2F6ED35C2BE6@dizzyd.com> References: <944B74DE-F83C-464F-9432-2F6ED35C2BE6@dizzyd.com> Message-ID: <20060104180116.GK22908@delora.autosys.us> On Wed, Jan 04, 2006 at 10:15:20AM -0700, Dave Smith wrote: > Greetings, > > Is there a way to determine the File/Line where a badmatch error is > generated? Obviously, you get a stack trace with the function call, > but more often than not, that's not quite descriptive enough, since > all you get is the value that didn't match...something. > > Any guidance would be appreciated. :) > > Thanks. > > D. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ What I use is to print to screen or log the line number using the line macro ?LINE I still have to know about where the problem is in the code, so it is not a complete solution. ~Michael From joelr1@REDACTED Wed Jan 4 19:53:22 2006 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 4 Jan 2006 18:53:22 +0000 Subject: Storing pids Message-ID: Folks, I'm logging trace messages to a disk_log and storing the process id. I'm trying to process the disk log once the original process/VM has quit and to find certain pids. I'm giving the disk_log analysis app an argument like 4234.34.0 and try to convert it from atom to list and then to pid. The conversion fails periodically and I'm trying to think of a better approach to this. I can think of converting the pid to list and storing that in the disk log instead of the pid. Is there a way to get the 3 components of the pid in Erlang with some BIF? Then I could store them as numbers. Any other suggestions? Thanks, Joel -- http://wagerlabs.com/ From david.nospam.hopwood@REDACTED Wed Jan 4 22:39:13 2006 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Wed, 04 Jan 2006 21:39:13 +0000 Subject: Logging to one process from thousands: How does it work? In-Reply-To: <20060104162021.GA20605@vailsys.com> References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <31207F4A-D118-41BE-8357-41024DA05995@gmail.com> <20060104162021.GA20605@vailsys.com> Message-ID: <43BC4081.2070601@blueyonder.co.uk> Rick Pettit wrote: > On Tue, Jan 03, 2006 at 01:21:32PM +0000, Joel Reymont wrote: > >>To add to my list of questions... >> >>Are there any limits on the size of the receive queue in Erlang? > > I entered your exact question into google and the first link that popped up > was the Erlang FAQ--try reading that. > > You might even want to skip to the following section: > > 10.8.3. What limits does Erlang have? > > There you will find a link to even more information, and so on. Neither the FAQ, nor the "Efficiency Guide" that it links to, actually answers Joel's question. The lack of any explicit statement about a receive queue limit might be inferred to mean that there is no limit other than heap sizes, but I wouldn't be sure of that without looking at the implementation. -- David Hopwood From ulf@REDACTED Wed Jan 4 23:04:52 2006 From: ulf@REDACTED (Ulf Wiger) Date: Wed, 04 Jan 2006 23:04:52 +0100 Subject: Storing pids In-Reply-To: References: Message-ID: Den 2006-01-04 19:53:22 skrev Joel Reymont : > I can think of converting the pid to list and storing that in the disk > log instead of the pid. Is there a way to get the 3 components of the > pid in Erlang with some BIF? Then I could store them as numbers. 1> erlang:pid_to_list(self()). "<0.34.0>" -- Ulf Wiger From rpettit@REDACTED Wed Jan 4 23:07:07 2006 From: rpettit@REDACTED (Rick Pettit) Date: Wed, 4 Jan 2006 16:07:07 -0600 Subject: Logging to one process from thousands: How does it work? In-Reply-To: <43BC4081.2070601@blueyonder.co.uk> References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <31207F4A-D118-41BE-8357-41024DA05995@gmail.com> <20060104162021.GA20605@vailsys.com> <43BC4081.2070601@blueyonder.co.uk> Message-ID: <20060104220707.GA29557@vailsys.com> On Wed, Jan 04, 2006 at 09:39:13PM +0000, David Hopwood wrote: > Rick Pettit wrote: > > On Tue, Jan 03, 2006 at 01:21:32PM +0000, Joel Reymont wrote: > > > >>To add to my list of questions... > >> > >>Are there any limits on the size of the receive queue in Erlang? > > > > I entered your exact question into google and the first link that popped up > > was the Erlang FAQ--try reading that. > > > > You might even want to skip to the following section: > > > > 10.8.3. What limits does Erlang have? > > > > There you will find a link to even more information, and so on. > > Neither the FAQ, nor the "Efficiency Guide" that it links to, actually answers > Joel's question. The lack of any explicit statement about a receive queue limit > might be inferred to mean that there is no limit other than heap sizes, but I > wouldn't be sure of that without looking at the implementation. My apologies. -Rick From sean.hinde@REDACTED Wed Jan 4 23:34:31 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Wed, 4 Jan 2006 22:34:31 +0000 Subject: Logging to one process from thousands: How does it work? In-Reply-To: <43BC4081.2070601@blueyonder.co.uk> References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <31207F4A-D118-41BE-8357-41024DA05995@gmail.com> <20060104162021.GA20605@vailsys.com> <43BC4081.2070601@blueyonder.co.uk> Message-ID: <173B360A-E278-420B-8E7B-F8899CAA8CF2@gmail.com> On 4 Jan 2006, at 21:39, David Hopwood wrote: > Rick Pettit wrote: >> On Tue, Jan 03, 2006 at 01:21:32PM +0000, Joel Reymont wrote: >> >>> To add to my list of questions... >>> >>> Are there any limits on the size of the receive queue in Erlang? >> >> I entered your exact question into google and the first link that >> popped up >> was the Erlang FAQ--try reading that. >> >> You might even want to skip to the following section: >> >> 10.8.3. What limits does Erlang have? >> >> There you will find a link to even more information, and so on. > > Neither the FAQ, nor the "Efficiency Guide" that it links to, > actually answers > Joel's question. The lack of any explicit statement about a receive > queue limit > might be inferred to mean that there is no limit other than heap > sizes, but I > wouldn't be sure of that without looking at the implementation. Maybe this is seen as rather basic for the FAQ (FAQs are normally written by people who have forgotten the process of learning..). It is explained very nicely in the chapter on Inter Process Communication in the Erlang book (p69) Sean From fritchie@REDACTED Wed Jan 4 23:37:49 2006 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Wed, 04 Jan 2006 16:37:49 -0600 Subject: Logging to one process from thousands: How does it work? In-Reply-To: Message of "Wed, 04 Jan 2006 00:00:39 +0100." Message-ID: <200601042237.k04MbnBi002952@snookles.snookles.com> >>>>> "uw" == Ulf Wiger writes: >> How do you implement a bounded queue in Erlang without >> busy-waiting? uw> Difficult, but you can achieve back-pressure by making the uw> communication with the logger synchronous. How about an unbounded queue that can raise its own priority? Then we take advantage of the 'high' vs. 'normal' scheduling behavior. I haven't actually tried *compiling* this code, but hopefully it gets the idea across. One potential problem could be that my_recursive_func() stops calling itself before the number of messages in the queue falls below the low water mark and then keeps its high priority. -define(WATERMARK_HIGH, 100). -define(WATERMARK_LOW, 5). my_recursive_func(MyState) -> {message_queue_len, Msgs} = process_info(self(), message_queue_len), if Msgs > ?WATERMARK_HIGH -> process_flag(priority, high); Msgs < ?WATERMARK_LOW -> process_flag(priority, normal); true -> ok end, %% Do real stuff here.... -Scott From david.nospam.hopwood@REDACTED Thu Jan 5 02:48:52 2006 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Thu, 05 Jan 2006 01:48:52 +0000 Subject: Can there be limits on message queue length? In-Reply-To: <173B360A-E278-420B-8E7B-F8899CAA8CF2@gmail.com> References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <31207F4A-D118-41BE-8357-41024DA05995@gmail.com> <20060104162021.GA20605@vailsys.com> <43BC4081.2070601@blueyonder.co.uk> <173B360A-E278-420B-8E7B-F8899CAA8CF2@gmail.com> Message-ID: <43BC7B04.9060101@blueyonder.co.uk> Sean Hinde wrote: > On 4 Jan 2006, at 21:39, David Hopwood wrote: >> Rick Pettit wrote: >>> On Tue, Jan 03, 2006 at 01:21:32PM +0000, Joel Reymont wrote: >>> >>>> To add to my list of questions... >>>> >>>> Are there any limits on the size of the receive queue in Erlang? >>> >>> I entered your exact question into google and the first link that >>> popped up was the Erlang FAQ--try reading that. >>> >>> You might even want to skip to the following section: >>> >>> 10.8.3. What limits does Erlang have? >>> >>> There you will find a link to even more information, and so on. >> >> Neither the FAQ, nor the "Efficiency Guide" that it links to, >> actually answers Joel's question. The lack of any explicit statement >> about a receive queue limit might be inferred to mean that there is >> no limit other than heap sizes, but I wouldn't be sure of that >> without looking at the implementation. > > Maybe this is seen as rather basic for the FAQ (FAQs are normally > written by people who have forgotten the process of learning..). More specifically, by people who are already too familiar with the system that the FAQ is about. That's understandable, but it means that a conscious effort should be taken not to simply dismiss questions as "too basic" or easily answered by Google, if they are not. (This is intended as constructive criticism.) > It is explained very nicely in the chapter on Inter Process > Communication in the Erlang book (p69) Maybe I'm being dense, but this does not seem to me to be either basic, or explained by p69 of the Erlang book. The most relevant paragraph of the latter says: # Erlang has a selective receive mechanism, thus no message arriving # unexpectedly at a process can block other messages to that process. # However, as any messages not matched by receive are left in the # mailbox, it is the programmer's responsibility to make sure that the # system does not fill up with such messages. This says that the programmer should ensure that a message queue does not "fill up". It doesn't say whether "filling up" would occur only as a result of heap limits, or whether it could occur at some smaller, implementation-dependent limit. (It also doesn't say whether it is only the recipient's heap that can act as the limit, or what happens if the recipient's heap is exhausted asynchronously.) There are other asynchronous message passing systems representing each of these possibilities, so it's not obvious. Hmm, the "Erlang specification" pointed to by the FAQ seems to be the "Erlang 4.7.3 Reference Manual, DRAFT (0.7)" dated February 1999. Is this really the most up-to-date written specification of Erlang? Anyway, this specification doesn't appear (by skimming section 10) to say whether there are, or are required not to be any limits (besides heap size) on message queue length. -- David Hopwood From sanjaya@REDACTED Thu Jan 5 07:47:07 2006 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Thu, 5 Jan 2006 12:47:07 +0600 Subject: loadtest - inets {'EXIT',{ebadf References: <000c01c60cfa$7a854730$5f00a8c0@wavenet.lk> <43B91317.4040603@ericsson.com> Message-ID: <007301c611c3$d8947260$5f00a8c0@wavenet.lk> Hi Bengt, Many thank for your quick reply & sorry for my late responce. I have worked on that error & finally found that the diskspace will creat this problem. When the disk partition is full, inets transfer_log function fails with the error I mentioned earlier. At the same time http calls with save request fails because of no disk space, and the mnesia node crashes without single entry added to the log (because no disk space). Auto restart of mnesia also fails & not a single entry can find in the log (because no disk space). Without log entries It takes some time to find the error :( because of symbolic link redirect the folder to the different partition & I was look to the false partition. But it's a great experience :) > > When I compare the error with mod_log.erl (line 112 on transfer_log > > part) 'EXIT' is not catch in the original code. Is it ok or a bug ? > > could you please explain this again? At the quick look to the original code I don't see something like below in the code case catch ..... of {'EXIT', _}-> .... ...... end so I just mentioned that. Any how the original code seams trying to add the log entry to the 'EXIT' signal as well. So ... it was my mistake :( Sanjaya Vitharana ----- Original Message ----- From: "Bengt Kleberg" To: Sent: Monday, 02 January 2006 05:48 pm Subject: Re: loadtest - inets {'EXIT',{ebadf > On 2005-12-30 05:35, Sanjaya Vitharana wrote: > ...deleted > > When I compare the error with mod_log.erl (line 112 on transfer_log > > part) 'EXIT' is not catch in the original code. Is it ok or a bug ? > > could you please explain this again? > > > > I have try to put the 3000000 requests, but why this crashes in the > > 63689 http call & onwards? It's perfectly works upto 63689 request. Also > > one thing to try is to allow erts to create more processes (since 63689 > seems to be close to 64k). start erl with +P 3000000 > > > bengt From thinus@REDACTED Thu Jan 5 09:02:03 2006 From: thinus@REDACTED (Thinus Pollard) Date: Thu, 5 Jan 2006 10:02:03 +0200 (SAST) Subject: Mnesia Load Message-ID: <25915.196.37.144.97.1136448123.squirrel@www.erlfinsys.net> Good day We have a problem(?) with mnesia loading times. This application runs on a dual xeon machine with a lot of memory. Upon startup we have to wait for all our tables to become available: =INFO REPORT==== 5-Jan-2006::09:19:49 === Waiting for mnesia to become available =INFO REPORT==== 5-Jan-2006::09:31:05 === Mnesia load done As you can see, it takes just over 11 minutes for it to load completely. A mnesia:dump_to_textfile() is about 116Mb in size. Is there any way to speed things up? Thanks Thinus mnesia:info() ---> Processes holding locks <--- ---> Processes waiting for locks <--- ---> Participant transactions <--- ---> Coordinator transactions <--- ---> Uncertain transactions <--- ---> Active tables <--- afm_connect : with 1 records occupying 364 words of mem afm_eft_hdr : with 1305 records occupying 96958 words of mem afm_adm_hdr : with 148 records occupying 11618 words of mem afm_eft_trl : with 1293 records occupying 98860 words of mem afm_adm_trl : with 98 records occupying 5895 words of mem afm_hdr : with 1355 records occupying 131865 words of mem afm_fti : with 21 records occupying 2196 words of mem afm_bin : with 67902 records occupying 17970584 words of mem afm_eft_det : with 101184 records occupying 22059861 words of mem afm_adm_det : with 80319 records occupying 11627724 words of mem schema : with 12 records occupying 1859 words of mem fsn_state : with 1 records occupying 304 words of mem ===> System info in version "4.1.12", debug level = none <=== opt_disc. Directory "/home/afm/afm/trunk/db_data/afm" is used. use fallback at restart = false running db nodes = ['afm@REDACTED'] stopped db nodes = [] master node tables = [] remote = [] ram_copies = [] disc_copies = [afm_adm_det, afm_adm_hdr, afm_adm_trl, afm_bin, afm_connect, afm_eft_det, afm_eft_hdr, afm_eft_trl, afm_fti, afm_hdr, fsn_state, schema] disc_only_copies = [] [{'afm@REDACTED',disc_copies}] = [fsn_state, schema, afm_adm_det, afm_eft_det, afm_bin, afm_fti, afm_hdr, afm_adm_trl, afm_eft_trl, afm_adm_hdr, afm_eft_hdr, afm_connect] 639 transactions committed, 0 aborted, 0 restarted, 309 logged to disc 0 held locks, 0 in queue; 0 local transactions, 0 remote 0 transactions waits for other nodes: [] ok From nick@REDACTED Thu Jan 5 09:09:08 2006 From: nick@REDACTED (Niclas Eklund) Date: Thu, 5 Jan 2006 09:09:08 +0100 (MET) Subject: Storing pids In-Reply-To: Message-ID: Keep in mind: http://erlang.se/doc/doc-5.4.12/lib/kernel-2.10.12/doc/html/erlang.html "pid_to_list(Pid) -> string() Returns a list which corresponds to the process Pid. This BIF is intended for debugging and for use in the Erlang operating system. It should not be used in application programs." /Nick On Wed, 4 Jan 2006, Ulf Wiger wrote: > Den 2006-01-04 19:53:22 skrev Joel Reymont : > > > I can think of converting the pid to list and storing that in the disk > > log instead of the pid. Is there a way to get the 3 components of the > > pid in Erlang with some BIF? Then I could store them as numbers. > > 1> erlang:pid_to_list(self()). > "<0.34.0>" > > -- > Ulf Wiger > _________________________________________________________________ We Are The ORBs. Resistance Is Futile. Prepare To Be Assimilated! _________________________________________________________________ From event@REDACTED Wed Jan 4 20:21:27 2006 From: event@REDACTED (event@REDACTED) Date: Wed, 04 Jan 2006 16:21:27 -0300 Subject: CFP: SELMAS 2006 - 5th Workshop on Software Engineering for Large-Scale Multi-Agent Systems Message-ID: <7.0.0.16.0.20060104162009.01f8f918@les.inf.puc-rio.br> ---------------------------------------------------------------------- SELMAS 2006 5th INTERNATIONAL WORKSHOP ON SOFTWARE ENGINEERING FOR LARGE-SCALE MULTI-AGENT SYSTEMS "Building Dependable Multi-Agent Systems" CALL FOR PAPERS workshop affiliated with ICSE 2006 Shanghai - China May 22-23, 2006 www.teccomm.les.inf.puc-rio.br/selmas2006/ *** IMPORTANT DATES Paper submission: February 1st, 2006 Author notification: March 1st, 2006 Camera ready copy: March 15th, 2006 ---------------------------------------------------------------------- Software is becoming present in every aspect of our lives, pushing us inevitably towards a world of ambient computing systems. Multi-agent systems (MAS) are a prominent technology which facilitates the modeling and development of large-scale distributed systems. MAS are intrinsically constricted as open systems and consisted of large numbers of cooperating entities, the so-called software agents. They employ semantically sophisticated interaction protocols as the flexible control layer that binds the pieces together into a reliable system of systems. However, the specific properties of MAS, such as autonomous and self-adaptation behaviors, can hinder the satisfaction of dependability requirements if proper techniques are not applied. Consequently, there will be a steadily increasing demand for distributed software systems with substantial scalability and performance requirements, demanding reliability specifications, and critical security prerequisites. This is a singular time for dependable distributed systems. At the same time, the traditional models we use to understand the relationship between a computational process and its environment are changing from the standard deterministic into ones that are more distributed and dynamic, more closely aligned with the practices of agent-oriented computing. *** TOPICS OF INTEREST Submitted papers should have a special emphasis on the impact of the agent technology in the development of large dependable systems. However, the workshop is intended to cover a wide range of topics on software engineering for large-scale multi-agent systems, from theoretical foundations to empirical studies. We also welcome the submission of papers in all aspects of agent-based software engineering, including the following (but not limited to): . Aspect-oriented techniques to MAS development . Comparative studies between the agent-oriented and other paradigms . Coordination architectures, infrastructures, and tools . Dependable agent systems . Design patterns, design principles, and architectural styles . Domain-specific languages . Exception handling and fault-tolerance techniques . Experiments and case studies . Formal methods for MAS . Frameworks and software architectures . Governance for MAS . Methodologies for agent-oriented analysis and design . Mobility and security issues . Modeling languages . Ontologies for MAS . Pitfalls and learned lessons in the construction of large MAS . Reflective software architectures . Requirements engineering . Software development environments . Software engineering techniques for resource-bounded MAS . Software reliability engineering . Testing and metrics . Trustability issues . Verification and validation techniques *** SUBMISSION GUIDELINES Papers must not exceed 08 (eight) pages, including all text, references, appendices, and figures. All submissions must be in Adobe Portable Document Format (PDF). Please follow ICSE 2006 Format and Submission Guidelines: http://www.isr.uci.edu/icse-06/cfp/paperformat.html Papers submitted to SELMAS must not have been simultaneously submitted to any other forum, nor should they have already been published elsewhere. The acceptance of a paper implies that at least one of its authors will register for the workshop to present it. Submitted papers will be reviewed based on originality, relevance, technical soundness and presentation. Papers must be submitted electronically using the Web page at the following address: http://www.teccomm.les.inf.puc-rio.br/selmas2006/cfp.htm It is the aim of the organizers to publish a post-workshop book as part of the Lecture Notes in Computer Science series of Springer-Verlag, following the tradition established for the previous SELMAS editions. *** ORGANIZING COMMITTEE Ricardo Choren, Military Institute of Engineering - Brazil Alessandro Garcia, Lancaster University - UK Holger Giese, Universitat Paderborn - Germany Ho-fung Leung, Chinese University of Hong Kong - China Carlos Lucena, PUC-Rio - Brazil Alexander Romanovsky, University of Newcastle upon Tyne - UK *** PROGRAM COMMITTEE MEMBERS Gul Agha, University of Illinois at Urbana-Champaign - USA Natasha Alechina, University of Nottingham - UK Carole Bernon, IRIT - France M. Brian Blake, Georgetown University - USA Rafael Bordini, University of Durham - UK Giacomo Cabri, Universita di Modena e Reggio Emilia - Italy Jaelson Castro, UFPE - Brazil Mehdi Dastani, Utrecht University - The Netherlands John Debenham, University of Technology, Sydney - Australia Rogerio de Lemos, University of Kent - UK Scott DeLoach, Kansas State University - USA Chiara Ghidini, ITC-irst - Italy Paolo Giorgini, University of Trento - Italy Mark Greaves, Vulcan, Inc. - USA Nicolas Guelfi, University of Luxembourg - Luxembourg Zahia Guessoum, LIP6 - France Giancarlo Guizzardi, Laboratory of Applied Ontology (ISTC-CNR) - Italy Brian Henderson-Sellers, University of Technology, Sydney - Australia Tom Holvoet, Katholieke Universiteit Leuven - Belgium Alexei Iliasov, University of Newcastle upon Tyne - UK Manuel Kolp, University of Louvain - Belgium Viviana Mascardi, Universita degli Studi di Genova - Italy Haralambos Mouratidis, University of East London - UK Andrea Omicini, Universita di Bologna - Italy Juan Pavon, Universidad Complutense de Madrid - Spain Omer Rana, Cardiff University - UK Gustavo Rossi, Universidad Nacional de La Plata - Argentina Ichiro Satoh, National Institute of Informatics - Japan John Shepherdson, British Telecommunications plc - UK Anand Tripathi, University of Minnesota - USA Danny Weyns, Katholieke Universiteit Leuven - Belgium Michael Winikoff, RMIT University - Australia *** IMPORTANT DATES Paper submission: February 1st, 2006 Authors notification: March 1st, 2006 Camera ready copy: March 15th, 2006 ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From erlang-questions@REDACTED Wed Jan 4 22:27:57 2006 From: erlang-questions@REDACTED (erlang-questions@REDACTED) Date: Wed, 4 Jan 2006 22:27:57 +0100 Subject: heart does not restart node launched with run_erl References: Message-ID: <20060104212757.8E03746DDE@bang.trapexit.org> Hi all, Ran into a weird problem. I have an embedded application that is started with run_erl from a .sh script. I also use heart to restart the application. HEART_COMMAND is set to launch the same start.sh script that was used to start the application initially. At the start, the process tree looks as follows: 3196 ? S 0:00 /home/drpdev/erts-5.4.10/bin/run_erl -daemon /home/drpdev/var/tmp/drp /home/drpdev/var/log/drp -exec /home/drpdev/bin/start_erl 3202 pts/2 Ssl+ 0:02 _ /home/drpdev/erts-5.4.10/bin/beam -- -root /home/drpdev -progname drip -- -home /home/drpdev -boot /home/drpdev/releases/1. 3222 ? Ss 0:00 _ heart -pid 3202 3227 ? Ss 0:00 _ inet_gethost 4 3228 ? S 0:00 | _ inet_gethost 4 3229 ? Ss 0:00 _ sh -s disksup To test the restart, I kill pid 3202 and see the following: 3222 ? Ss 0:00 heart -pid 3202 3196 ? S 0:00 /home/drpdev/erts-5.4.10/bin/run_erl -daemon /home/drpdev/var/tmp/drp /home/drpdev/var/log/drp -exec /home/drpdev/bin/start_erl 3202 ? Zs 0:02 _ [beam] Next, heart launches the script: 3253 ? S 0:00 /bin/bash /home/drpdev/bin/drip.sh start 3272 ? S 0:00 _ sleep 3 3196 ? S 0:00 /home/drpdev/erts-5.4.10/bin/run_erl -daemon /home/drpdev/var/tmp/drp /home/drpdev/var/log/drp -exec /home/drpdev/bin/start_erl 3202 ? Zs 0:02 _ [beam] The sleep 3 is right before it calls the run_erl command to start the embedded application. Note that the old run_erl (pid 3196) is still hanging around although the node itself (pid 3202) is defunct. When drip.sh calls run_erl, the old run_erl (pid 3196) goes away, but no new run_erl process appears. Application is not started either. erlang.log.1 does not showI see the following in the run_erl.log: ------- Pty master read; run_erl [3196] Wed Jan 4 15:59:37 2006 Pty master read; run_erl [3196] Wed Jan 4 16:00:46 2006 Pty master read; run_erl [3196] Wed Jan 4 16:00:51 2006 Pty master read; run_erl [3279] Wed Jan 4 16:00:54 2006 /home/drpdev/erts-5.4.10/bin/run_erl: pid is : 3279 run_erl [3196] Wed Jan 4 16:00:54 2006 FIFO read; run_erl [3196] Wed Jan 4 16:00:54 2006 OK run_erl [3196] Wed Jan 4 16:00:54 2006 Pty master read; run_erl [3196] Wed Jan 4 16:00:54 2006 Pty master read; run_erl [3196] Wed Jan 4 16:00:54 2006 Pty master read; run_erl [3196] Wed Jan 4 16:00:54 2006 Erlang closed the connection. ------- I am curious why new run_erl (pid 3279) process did not start. Also, why did the old run_erl (pid 3196) did not terminate until the new run_erl attempted to start? I verified that this is not a coincidence - old run_erl will remain hanging in the process list until a new run_erl is started. Please, let me know if anyone else experienced similar issue. If needed I can provide additional info/config files, but not sure at this point which ones. Thank you. Dmitry Korsun IDT Corp. _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From gunilla@REDACTED Thu Jan 5 09:34:08 2006 From: gunilla@REDACTED (Gunilla Arendt) Date: Thu, 05 Jan 2006 09:34:08 +0100 Subject: Determine where a match fails In-Reply-To: <944B74DE-F83C-464F-9432-2F6ED35C2BE6@dizzyd.com> References: <944B74DE-F83C-464F-9432-2F6ED35C2BE6@dizzyd.com> Message-ID: <43BCDA00.5090507@erix.ericsson.se> Have you tried the interpreter/Debugger? Compile the modules with the 'debug_info' option, then interpret them: 1> int:i(Mod). or 1> int:i([Mod1, ..., ModN]). or start the Debugger (debugger:start()) and use its GUI. Then run your program. When the error occurs, start the Debugger and double-click the terminated process. This will open an Attach Process window showing on which line in which module the process terminated *) and you can use the 'Up' button to traverse the call chain leading to the error. *) ...provided that the process did terminate while executing interpreted code... If the process is a gen_server or similar, the error will be caught and the process will terminate while in (uninterpreted) gen_server code. In this case, using the Debugger for stepping through the code may be an alternative. / Gunilla Dave Smith wrote: > Greetings, > > Is there a way to determine the File/Line where a badmatch error is > generated? Obviously, you get a stack trace with the function call, but > more often than not, that's not quite descriptive enough, since all you > get is the value that didn't match...something. > > Any guidance would be appreciated. :) > > Thanks. > > D. > > From ulf.wiger@REDACTED Thu Jan 5 10:21:39 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 5 Jan 2006 10:21:39 +0100 Subject: Can there be limits on message queue length? Message-ID: David Hopwood wrote: > Hmm, the "Erlang specification" pointed to by the FAQ seems > to be the "Erlang 4.7.3 Reference Manual, DRAFT (0.7)" dated > February 1999. > Is this really the most up-to-date written specification of Erlang? As far as ambitious specifications go, I guess it is. However, the Erlang Reference Manual (http://erlang.se/doc/doc-5.4.12/doc/reference_manual/part_frame.html) is at least much more up-to-date. > Anyway, this specification doesn't appear (by skimming > section 10) to say whether there are, or are required not to > be any limits (besides heap size) on message queue length. The most informative (and up-to-date) text on system limits is most likely the "System Limits" chapter (7.2) of the efficiency guide in the Erlang/OTP documentation: http://erlang.se/doc/doc-5.4.12/doc/efficiency_guide/advanced.html#7.2 I spotted at least one error in there: It says that the maximum number of processes can be 268435456, when in fact it was changed to 134217727 as of erts-5.4.9. The System Limits document doesn't say anything specific about message queues. As far as I can tell from erl_message.c, messsage buffers are pretty much handled like other objects on the process heap, i.e. limited only by available memory. /Uffe From ulf.wiger@REDACTED Thu Jan 5 10:37:01 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 5 Jan 2006 10:37:01 +0100 Subject: Mnesia Load Message-ID: Thinus Pollard wrote: > > As you can see, it takes just over 11 minutes for it to load > completely. > > A mnesia:dump_to_textfile() is about 116Mb in size. Are you sure? Summing the 'memory' info items below gives me 52 million words, or 208 megabytes. 11 minutes is still a lot. When playing with a 64-bit machine, I was able to load 5 million records from disk in about 27 seconds. That was one table occupying about 686 MB of RAM. Do you have a thread pool enabled? (+A 255, for example) /Uffe [...] > afm_connect : with 1 records occupying 364 words of mem > afm_eft_hdr : with 1305 records occupying 96958 words of mem > afm_adm_hdr : with 148 records occupying 11618 words of mem > afm_eft_trl : with 1293 records occupying 98860 words of mem > afm_adm_trl : with 98 records occupying 5895 words of mem > afm_hdr : with 1355 records occupying 131865 words of mem > afm_fti : with 21 records occupying 2196 words of mem > afm_bin : with 67902 records occupying 17970584 words of mem > afm_eft_det : with 101184 records occupying 22059861 words of mem > afm_adm_det : with 80319 records occupying 11627724 words of mem > schema : with 12 records occupying 1859 words of mem > fsn_state : with 1 records occupying 304 words of mem From maruthavanan_s@REDACTED Thu Jan 5 11:48:53 2006 From: maruthavanan_s@REDACTED (maruthavanan s) Date: Thu, 05 Jan 2006 10:48:53 +0000 Subject: Source from beam file Message-ID: An HTML attachment was scrubbed... URL: From joelr1@REDACTED Thu Jan 5 12:06:27 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 5 Jan 2006 11:06:27 +0000 Subject: Storing pids In-Reply-To: References: Message-ID: Yes, I'm aware of this and it's what I use. I'm now wondering if phash-ing the pids would be better than storing them. The issue is that the pids that were stored in the disk log seem to change depending on whether you just print them or convert them to a list. I get, say, 4000.34.0 when printing and 4001.34.0 when converting the same to a list. Thanks, Joel On Jan 4, 2006, at 10:04 PM, Ulf Wiger wrote: > 1> erlang:pid_to_list(self()). > "<0.34.0>" -- http://wagerlabs.com/ From bengt.kleberg@REDACTED Thu Jan 5 12:32:39 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Thu, 05 Jan 2006 12:32:39 +0100 Subject: Source from beam file In-Reply-To: References: Message-ID: <43BD03D7.5010305@ericsson.com> On 2006-01-05 11:48, maruthavanan s wrote: > Hi! > > Is it possible to get a source code from a beam file? if you what should > we do to achieve this.? if you mean ''find the source code used to produce the beam file'' you can do: Module:module_info( compile ) => [..., {source, Source_file}, ...] or do you mean reverse engineer the source from the beam? bengt From mats.cronqvist@REDACTED Thu Jan 5 12:40:23 2006 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Thu, 05 Jan 2006 12:40:23 +0100 Subject: Storing pids In-Reply-To: References: Message-ID: <43BD05A7.8000505@ericsson.com> fwiw, i always discard the first (node id) digit when logging pids. > tl(string:tokens(erlang:pid_to_list(self()),"<>.")). ["31","0"] mats Joel Reymont wrote: > Yes, I'm aware of this and it's what I use. I'm now wondering if > phash-ing the pids would be better than storing them. > > The issue is that the pids that were stored in the disk log seem to > change depending on whether you just print them or convert them to a > list. I get, say, 4000.34.0 when printing and 4001.34.0 when > converting the same to a list. > > Thanks, Joel > > On Jan 4, 2006, at 10:04 PM, Ulf Wiger wrote: > >> 1> erlang:pid_to_list(self()). >> "<0.34.0>" > > > -- > http://wagerlabs.com/ > > > > > From joelr1@REDACTED Thu Jan 5 13:15:29 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 5 Jan 2006 12:15:29 +0000 Subject: Storing pids In-Reply-To: <43BD05A7.8000505@ericsson.com> References: <43BD05A7.8000505@ericsson.com> Message-ID: Well, my intent is to log from different nodes so I can't discard the node id :-(. Thanks for the tip, though! On Jan 5, 2006, at 11:40 AM, Mats Cronqvist wrote: > fwiw, i always discard the first (node id) digit when logging pids. > > > tl(string:tokens(erlang:pid_to_list(self()),"<>.")). > ["31","0"] -- http://wagerlabs.com/ From mats.cronqvist@REDACTED Thu Jan 5 13:23:43 2006 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Thu, 05 Jan 2006 13:23:43 +0100 Subject: Storing pids In-Reply-To: References: <43BD05A7.8000505@ericsson.com> Message-ID: <43BD0FCF.9050503@ericsson.com> well, the node id number in the pid is worthless for logging (numbering is different on each erlang node). try this; > PID=self(). > [node(PID)|lists:map(fun erlang:list_to_integer/1, tl(string:tokens(erlang:pid_to_list(PID),"<>.")))]. [nonode@REDACTED,31,0] mats Joel Reymont wrote: > Well, my intent is to log from different nodes so I can't discard the > node id :-(. > > Thanks for the tip, though! > > On Jan 5, 2006, at 11:40 AM, Mats Cronqvist wrote: > >> fwiw, i always discard the first (node id) digit when logging pids. >> >> > tl(string:tokens(erlang:pid_to_list(self()),"<>.")). >> ["31","0"] > > > -- > http://wagerlabs.com/ > > > > > From joelr1@REDACTED Thu Jan 5 13:40:02 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 5 Jan 2006 12:40:02 +0000 Subject: Storing pids In-Reply-To: <43BD0FCF.9050503@ericsson.com> References: <43BD05A7.8000505@ericsson.com> <43BD0FCF.9050503@ericsson.com> Message-ID: <04CF5EA1-E218-4288-BFDA-483646AF85C4@gmail.com> It's not worthless if I'm just using it for tracking. All I want to do in the end is say "give me all the entries from this process" and supply the process id. If erlang:phash2 gives a unique number for each pid then maybe I can use pid hashes to identify processes in the disk log instead of the pids themselves. What do you think? On Jan 5, 2006, at 12:23 PM, Mats Cronqvist wrote: > well, the node id number in the pid is worthless for logging > (numbering is different on each erlang node). -- http://wagerlabs.com/ From mats.cronqvist@REDACTED Thu Jan 5 13:44:23 2006 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Thu, 05 Jan 2006 13:44:23 +0100 Subject: Storing pids In-Reply-To: <04CF5EA1-E218-4288-BFDA-483646AF85C4@gmail.com> References: <43BD05A7.8000505@ericsson.com> <43BD0FCF.9050503@ericsson.com> <04CF5EA1-E218-4288-BFDA-483646AF85C4@gmail.com> Message-ID: <43BD14A7.7040400@ericsson.com> granted. but what if you see something funny in the log, and the target node is still up? then you'd want to connect to is and do a process_info() or something, right? mats Joel Reymont wrote: > It's not worthless if I'm just using it for tracking. All I want to do > in the end is say "give me all the entries from this process" and > supply the process id. > > If erlang:phash2 gives a unique number for each pid then maybe I can > use pid hashes to identify processes in the disk log instead of the > pids themselves. > > What do you think? > > On Jan 5, 2006, at 12:23 PM, Mats Cronqvist wrote: > >> well, the node id number in the pid is worthless for logging >> (numbering is different on each erlang node). > > > -- > http://wagerlabs.com/ > > > > > From joelr1@REDACTED Thu Jan 5 13:54:32 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 5 Jan 2006 12:54:32 +0000 Subject: Storing pids In-Reply-To: <43BD14A7.7040400@ericsson.com> References: <43BD05A7.8000505@ericsson.com> <43BD0FCF.9050503@ericsson.com> <04CF5EA1-E218-4288-BFDA-483646AF85C4@gmail.com> <43BD14A7.7040400@ericsson.com> Message-ID: True, true. How about {erlang:phash2(self()), self()} then, where the hash is used for lookup and the pid can then be used for anything else... so long as the original node is still up? On Jan 5, 2006, at 12:44 PM, Mats Cronqvist wrote: > granted. but what if you see something funny in the log, and the > target node is still up? then you'd want to connect to is and do a > process_info() or something, right? -- http://wagerlabs.com/ From ulf.wiger@REDACTED Thu Jan 5 14:00:29 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 5 Jan 2006 14:00:29 +0100 Subject: Storing pids Message-ID: erlang:phash2 doesn't give a unique number. The idea of hash values is to efficiently identify a "bucket" in which to store the value. It's ok, for several values to occupy the same bucket, as long as there aren't too many. If a bucket overflows, the idea of linear hashing is to double the hash space and rehash cleverly. md5 would be more likely to give a unique value, but then I would much prefer Mats's solution. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Joel Reymont > Sent: den 5 januari 2006 13:40 > To: Mats Cronqvist (AL/EAB) > Cc: Erlang Users' List > Subject: Re: Storing pids > > It's not worthless if I'm just using it for tracking. All I > want to do in the end is say "give me all the entries from > this process" and supply the process id. > > If erlang:phash2 gives a unique number for each pid then > maybe I can use pid hashes to identify processes in the disk > log instead of the pids themselves. > > What do you think? > > On Jan 5, 2006, at 12:23 PM, Mats Cronqvist wrote: > > > well, the node id number in the pid is worthless for logging > > (numbering is different on each erlang node). > > -- > http://wagerlabs.com/ > > > > > > From joelr1@REDACTED Thu Jan 5 14:12:08 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 5 Jan 2006 13:12:08 +0000 Subject: Storing pids In-Reply-To: References: Message-ID: <1E4BD1B9-D03A-469B-A25B-0806E15E9558@gmail.com> md5 would probably be too slow. The simplest solution that I found was to just store the pid. The issue is that once I try to create a pid using list_to_pid it won't let me if the original node is down or otherwise. I'll try storing a tuple of 3 numbers (using Matt's approach) since I don't normally need to inspect the processes. If I do and the node is still up I'll surely have no problems with list_to_pid and the 3 numbers that I stored. On Jan 5, 2006, at 1:00 PM, Ulf Wiger ((AL/EAB)) wrote: > md5 would be more likely to give a unique value, > but then I would much prefer Mats's solution. -- http://wagerlabs.com/ From joelr1@REDACTED Thu Jan 5 14:29:47 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 5 Jan 2006 13:29:47 +0000 Subject: try... after and clean-up Message-ID: <6DA42879-4C97-41EF-8E20-D5657EF2B843@gmail.com> Folks, In the code below I can get exceptions from util:connect_script, util:connect or the very last run(..., handle( ... )) line. I'm opening 3 sockets in this code. Two of those sockets are in passive mode and have reader processes since the data I receive has the length of the packet in little-endian format and Erlang expects big- endian. I would like to clean up open sockets and socket reader processes when my exception is thrown. I thought that I could just enclose the block starting with Bot1 in a try... after but... Do I refer to Bot3 in the 'after' code? What if it did not get to Bot3 and an exception was thrown after Bot1? Any suggestions? Thanks, Joel --- run(Args) when is_record(Args, bot_args) -> Bot = #bot { poker_server = Args#bot_args.host, dispatchers = [{"script", Args#bot_args.script, Args#bot_args.script_args }], log = Args#bot_args.log, ignored = Args#bot_args.ignored, lobby_bot = Args#bot_args.lobby_bot }, Bot1 = notrace(Bot, [cl_ssl_handshake_data, srv_ssl_handshake_data, srv_update_hint_text, cl_handshake, srv_handshake, srv_news]), UtilSock = util:connect_script_server(), Bot2 = Bot1#bot { util_sock = UtilSock }, Bot3 = util:connect(Bot2, [lobby_con_wrap(), lobby_handle_wrap(), connected]), % event to post run(Bot3, handle(Bot3, handshake)). -- http://wagerlabs.com/ From joelr1@REDACTED Thu Jan 5 15:10:36 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 5 Jan 2006 14:10:36 +0000 Subject: try... after and clean-up In-Reply-To: <6DA42879-4C97-41EF-8E20-D5657EF2B843@gmail.com> References: <6DA42879-4C97-41EF-8E20-D5657EF2B843@gmail.com> Message-ID: <8A1752A4-C2D7-4636-BCA5-42FCBC8B0583@gmail.com> I'm basically looking to improve the error handling in the following code: run(Args) when is_record(Args, bot_args) -> Bot = #bot { poker_server = Args#bot_args.host, dispatchers = [{"script", Args#bot_args.script, Args#bot_args.script_args }], log = Args#bot_args.log, ignored = Args#bot_args.ignored, lobby_bot = Args#bot_args.lobby_bot }, Bot1 = notrace(Bot, [cl_ssl_handshake_data, srv_ssl_handshake_data, srv_update_hint_text, cl_handshake, srv_handshake, srv_news]), case catch(util:connect_script_server()) of UtilSock when is_port(UtilSock) -> Bot2 = Bot1#bot { util_sock = UtilSock }, case catch(util:connect(Bot2, [lobby_con_wrap(), lobby_handle_wrap(), connected])) of Bot3 when is_record(Bot3, bot) -> case catch(run(Bot3, handle(Bot3, handshake))) of ok -> ok; X -> util:error(Bot3, X) end; X -> util:error(Bot2, X) end; X -> util:error(Bot1, X) end. -- http://wagerlabs.com/ From hedeland@REDACTED Thu Jan 5 15:41:50 2006 From: hedeland@REDACTED (Per Hedeland) Date: Thu, 5 Jan 2006 15:41:50 +0100 (CET) Subject: Storing pids In-Reply-To: <1E4BD1B9-D03A-469B-A25B-0806E15E9558@gmail.com> Message-ID: <200601051441.k05EfoLB060042@tordmule.bluetail.com> Joel Reymont wrote: > >md5 would probably be too slow. > >The simplest solution that I found was to just store the pid. > >The issue is that once I try to create a pid using list_to_pid it >won't let me if the original node is down or otherwise. I'll try >storing a tuple of 3 numbers (using Matt's approach) since I don't >normally need to inspect the processes. If I do and the node is still >up I'll surely have no problems with list_to_pid and the 3 numbers >that I stored. Read again what Mats wrote some messages back: "numbering is different on each erlang node". This means that a) The numbers [4000, 34, 0] may represent one process on one node, and a totally different process on another - not very likely, but possible. More likely is that they don't represent any process at all on another node, i.e. b) Trying to interpret the numbers as a process on a different node than the one where they were obtained, or even interpreting the first number as a particular node, is unreliable or more likely impossible. Mats' suggestion of replacing the node number with the node name is definitely the way to go. Which just happens to be how pids are represented "on the wire", which just happens to mean that doing term_to_binary/1 on a pid will result in something that fits your bill perfectly. It can even be binary_to_term'ed back to the correct representation of the original pid on a different node. (It can, but I wouldn't bet my life on it...:-) --Per Hedeland From joelr1@REDACTED Thu Jan 5 15:57:12 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 5 Jan 2006 14:57:12 +0000 Subject: Storing pids In-Reply-To: <200601051441.k05EfoLB060042@tordmule.bluetail.com> References: <200601051441.k05EfoLB060042@tordmule.bluetail.com> Message-ID: Well, how do I dump all the log entries that have a certain pid then? Say, after all the nodes have gone down. I would need to create a pid first then convert to binary and then match on that binary. Unless of course I followed Matt's approach / node-name, pid2, pid3/. No? On Jan 5, 2006, at 2:41 PM, Per Hedeland wrote: > ... doing > term_to_binary/1 on a pid will result in something that fits your bill > perfectly. It can even be binary_to_term'ed back to the correct > representation of the original pid on a different node. (It can, but I > wouldn't bet my life on it...:-) -- http://wagerlabs.com/ From chandrashekhar.mullaparthi@REDACTED Thu Jan 5 17:11:05 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Thu, 5 Jan 2006 16:11:05 +0000 Subject: Logging to one process from thousands: How does it work? In-Reply-To: References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <43BAD863.9060202@blueyonder.co.uk> Message-ID: On 03/01/06, Ulf Wiger wrote: > Den 2006-01-03 22:03:43 skrev Joel Reymont : > > > How do you implement a bounded queue in Erlang without busy-waiting? > > Difficult, but you can achieve back-pressure by > making the communication with the logger synchronous. We've had the same problem of multiple processes sending log messages to one process. As other people have written, you can do caching before writing, use synchronous calls etc. But none of these will guarantee any protection. You can still overwhelm a process employing all these techniques. What will be nice though is support for bounded queues where a process can specify the maximum size for it's message queue. New messages which arrive once this max size id reached can then be thrown away by the runtime system. At the moment, the result of sending a message to a process is the message itself(*) - in the case of the recipient having a bounded queue, maybe the result can be an error (**) ? Chandru (*) Unless you are sending a message using the process name in which case the caller will exit with badarg. (**) I don't think anyone uses the return value of the ! operator so old code should be ok? From hedeland@REDACTED Thu Jan 5 17:20:05 2006 From: hedeland@REDACTED (Per Hedeland) Date: Thu, 5 Jan 2006 17:20:05 +0100 (CET) Subject: Storing pids In-Reply-To: Message-ID: <200601051620.k05GK5D6060558@tordmule.bluetail.com> Joel Reymont wrote: > >Well, how do I dump all the log entries that have a certain pid then? >Say, after all the nodes have gone down. Well, the binaries will be unique ("in principle"). Where do you get "a certain pid" from, and what form does it have? Something like text output giving the three numbers is useless in this situation, as already explained. If you just want to traverse the log, picking up new pids and all the other entries for the same pid as you go, it doesn't really matter what form the pids have, does it? --Per From joelr1@REDACTED Thu Jan 5 17:33:12 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 5 Jan 2006 16:33:12 +0000 Subject: Storing pids In-Reply-To: <200601051620.k05GK5D6060558@tordmule.bluetail.com> References: <200601051620.k05GK5D6060558@tordmule.bluetail.com> Message-ID: <9693198F-7A66-4B56-BA2F-5A7F836E26EC@gmail.com> What I want to do is dump the log entries belonging to a certain process, so I pass in the pid in the command line as, say, 4005.30.0. That goes into a "<4005.30.0>" list and then... I tried to convert it to pid but that is not fool-proof and fails sometimes. On Jan 5, 2006, at 4:20 PM, Per Hedeland wrote: > Well, the binaries will be unique ("in principle"). Where do you > get "a > certain pid" from, and what form does it have? Something like text > output giving the three numbers is useless in this situation, as > already > explained. If you just want to traverse the log, picking up new > pids and > all the other entries for the same pid as you go, it doesn't really > matter what form the pids have, does it? > > --Per -- http://wagerlabs.com/ From hedeland@REDACTED Thu Jan 5 17:49:13 2006 From: hedeland@REDACTED (Per Hedeland) Date: Thu, 5 Jan 2006 17:49:13 +0100 (CET) Subject: Storing pids In-Reply-To: <9693198F-7A66-4B56-BA2F-5A7F836E26EC@gmail.com> Message-ID: <200601051649.k05GnDWe060708@tordmule.bluetail.com> Joel Reymont wrote: > >What I want to do is dump the log entries belonging to a certain >process, so I pass in the pid in the command line as, say, 4005.30.0. >That goes into a "<4005.30.0>" list and then... I tried to convert it >to pid but that is not fool-proof and fails sometimes. Maybe you should just try reading the responses you get a bit more carefully, and give them some thought, before throwing out new questions? And that doesn't apply to only the immediately previous one below. --Per >On Jan 5, 2006, at 4:20 PM, Per Hedeland wrote: > >> Well, the binaries will be unique ("in principle"). Where do you >> get "a >> certain pid" from, and what form does it have? Something like text >> output giving the three numbers is useless in this situation, as >> already >> explained. If you just want to traverse the log, picking up new >> pids and >> all the other entries for the same pid as you go, it doesn't really >> matter what form the pids have, does it? >> >> --Per > >-- >http://wagerlabs.com/ > > > > > > From joelr1@REDACTED Thu Jan 5 17:56:51 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 5 Jan 2006 16:56:51 +0000 Subject: Storing pids In-Reply-To: <200601051649.k05GnDWe060708@tordmule.bluetail.com> References: <200601051649.k05GnDWe060708@tordmule.bluetail.com> Message-ID: Per, It's pretty clear to me what I need to do and what the different options are. I was just answering your question :-). Thanks, Joel On Jan 5, 2006, at 4:49 PM, Per Hedeland wrote: >> On Jan 5, 2006, at 4:20 PM, Per Hedeland wrote: >> >>> Well, the binaries will be unique ("in principle"). Where do you >>> get "a >>> certain pid" from, and what form does it have? Something like text >>> output giving the three numbers is useless in this situation, as >>> already >>> explained. -- http://wagerlabs.com/ From hedeland@REDACTED Thu Jan 5 18:09:25 2006 From: hedeland@REDACTED (Per Hedeland) Date: Thu, 5 Jan 2006 18:09:25 +0100 (CET) Subject: Storing pids In-Reply-To: Message-ID: <200601051709.k05H9PME060825@tordmule.bluetail.com> Joel Reymont wrote: > >It's pretty clear to me what I need to do and what the different >options are. > >I was just answering your question :-). It's just that your answer showed that it wasn't clear - what you say that you want to do, i.e. "take the three numbers and extract the entries for the corresponding pid", is impossible. --Per From joelr1@REDACTED Thu Jan 5 18:14:14 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 5 Jan 2006 17:14:14 +0000 Subject: Storing pids In-Reply-To: <200601051709.k05H9PME060825@tordmule.bluetail.com> References: <200601051709.k05H9PME060825@tordmule.bluetail.com> Message-ID: <3061908C-250A-498E-9B80-40642BE7EC1A@gmail.com> I resigned to just storing the pid and building it from a list for searching. Of course I also resigned to running all this in non- distributed mode. It works. Once I want to go distributed I will use Matt's approach. On Jan 5, 2006, at 5:09 PM, Per Hedeland wrote: > It's just that your answer showed that it wasn't clear - what you say > that you want to do, i.e. "take the three numbers and extract the > entries for the corresponding pid", is impossible. -- http://wagerlabs.com/ From sean.hinde@REDACTED Thu Jan 5 18:36:12 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Thu, 5 Jan 2006 17:36:12 +0000 Subject: Logging to one process from thousands: How does it work? In-Reply-To: References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <43BAD863.9060202@blueyonder.co.uk> Message-ID: Hi Chandru, On 5 Jan 2006, at 16:11, chandru wrote: > On 03/01/06, Ulf Wiger wrote: >> Den 2006-01-03 22:03:43 skrev Joel Reymont : >> >>> How do you implement a bounded queue in Erlang without busy-waiting? >> >> Difficult, but you can achieve back-pressure by >> making the communication with the logger synchronous. > > We've had the same problem of multiple processes sending log messages > to one process. As other people have written, you can do caching > before writing, use synchronous calls etc. But none of these will > guarantee any protection. You can still overwhelm a process employing > all these techniques. I'm not sure I see this. It is possible to overwhelm a whole system by sending it too much traffic (unless you have some overload protection which can push back against incoming traffic - {active, once} ?). It is also possible to overwhelm the disk subsystem, in which case you just need to buy more hardware. Both of these cases are normal out of capacity situations which Erlang has shown itself to be more than capable of handling. If the overall system is synchronous you should not see message queues fill up out of control. > > What will be nice though is support for bounded queues where a process > can specify the maximum size for it's message queue. New messages > which arrive once this max size id reached can then be thrown away by > the runtime system. At the moment, the result of sending a message to > a process is the message itself(*) - in the case of the recipient > having a bounded queue, maybe the result can be an error (**) ? Or make the message consumer drop events which it cannot handle. Just receiving a message takes very little time, and then you can guarantee that important messages do get handled. Sean From chandrashekhar.mullaparthi@REDACTED Thu Jan 5 19:20:36 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Thu, 5 Jan 2006 18:20:36 +0000 Subject: Logging to one process from thousands: How does it work? In-Reply-To: References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <43BAD863.9060202@blueyonder.co.uk> Message-ID: Hi Sean, On 05/01/06, Sean Hinde wrote: > Hi Chandru, > > On 5 Jan 2006, at 16:11, chandru wrote: > > > On 03/01/06, Ulf Wiger wrote: > >> Den 2006-01-03 22:03:43 skrev Joel Reymont : > >> > >>> How do you implement a bounded queue in Erlang without busy-waiting? > >> > >> Difficult, but you can achieve back-pressure by > >> making the communication with the logger synchronous. > > > > We've had the same problem of multiple processes sending log messages > > to one process. As other people have written, you can do caching > > before writing, use synchronous calls etc. But none of these will > > guarantee any protection. You can still overwhelm a process employing > > all these techniques. > > I'm not sure I see this. > > It is possible to overwhelm a whole system by sending it too much > traffic (unless you have some overload protection which can push back > against incoming traffic - {active, once} ?). > > It is also possible to overwhelm the disk subsystem, in which case > you just need to buy more hardware. Both of these cases are normal > out of capacity situations which Erlang has shown itself to be more > than capable of handling. > > If the overall system is synchronous you should not see message > queues fill up out of control. Not necessarily. If I decided to allow a 100msgs/sec into the system and if each of those messages generated a number of log entries, the message queues in the logger process quickly build up if your hard disk is not responsive at some point (using synchronous logging). The problem I have with this is I can't always guarantee that I will safely handle 100 msgs/sec. > Or make the message consumer drop events which it cannot handle. Just > receiving a message takes very little time, and then you can > guarantee that important messages do get handled. I suppose I could do this - but that'll mean invoking process_info(self(), message_queue_len) everytime I handle a new message. Is the message queue length actually incremented everytime a message is placed in a process' queue? Or is the length computed everytime I call process_info/2? cheers Chandru From sean.hinde@REDACTED Thu Jan 5 20:19:59 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Thu, 5 Jan 2006 19:19:59 +0000 Subject: Logging to one process from thousands: How does it work? In-Reply-To: References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <43BAD863.9060202@blueyonder.co.uk> Message-ID: <054CD750-10A7-463C-AD1B-3F789C4DAE39@gmail.com> On 5 Jan 2006, at 18:20, chandru wrote: > Hi Sean, > > On 05/01/06, Sean Hinde wrote: >> Hi Chandru, >> >> If the overall system is synchronous you should not see message >> queues fill up out of control. > > Not necessarily. If I decided to allow a 100msgs/sec into the system > and if each of those messages generated a number of log entries, the > message queues in the logger process quickly build up if your hard > disk is not responsive at some point (using synchronous logging). The > problem I have with this is I can't always guarantee that I will > safely handle 100 msgs/sec. Spawn is the async mechanism here then :-) Assuming that the disk subsystem can keep up on average, and you don't want to limit the input load by setting a maximum level of concurrency as well as msgs/s, then I guess what you want to achieve is to isolate the worker jobs from short term pauses in the disk logger. You could introduce an additional accumulator process which stores log messages while waiting for a separate disk log owning process to write the current chunk. The protocol to the disk log owning process could be "send async log message, but don't send any more until the disk log process confirms that the write is done with a message back". > >> Or make the message consumer drop events which it cannot handle. Just >> receiving a message takes very little time, and then you can >> guarantee that important messages do get handled. > > I suppose I could do this - but that'll mean invoking > process_info(self(), message_queue_len) everytime I handle a new > message. Is the message queue length actually incremented everytime a > message is placed in a process' queue? Or is the length computed > everytime I call process_info/2? I had in mind some local heuristic where the process could decide it is overloaded, but this could work also. A quick look at the source suggests this call is efficient. Sean From thomasl_erlang@REDACTED Fri Jan 6 00:04:41 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Thu, 5 Jan 2006 15:04:41 -0800 (PST) Subject: Determine where a match fails In-Reply-To: <6618C56B-9EDF-4D80-BA46-F3B49FC1C2DC@gmail.com> Message-ID: <20060105230441.28270.qmail@web34402.mail.mud.yahoo.com> --- Sean Hinde wrote: > > On 4 Jan 2006, at 17:15, Dave Smith wrote: > > > Greetings, > > > > Is there a way to determine the File/Line where a > badmatch error is > > generated? Obviously, you get a stack trace with > the function call, > > but more often than not, that's not quite > descriptive enough, since > > all you get is the value that didn't > match...something. > > > > Any guidance would be appreciated. :) > > You might like to try out the smart exceptions > package from jungerl. > I believe this adds such things. > > I've never actually tried it myself, but it might > just do the job. I use smart_exceptions for my development and find it very convenient; but note that there are a couple of limitations: 1. It doesn't handle variables exported out of expressions. This is due to three things: (i) the smart_exceptions functionality is provided by rewriting the code so that line and module (and other stuff) is added at most places where an exception can occur; (ii) the erlang compiler demands that all clauses export the same variables, even if some of them will never terminate normally; (iii) computing the exported variables of an expression is nontrivial. 2. On some R10 Erlang releases, using smart_exceptions triggered a compiler bug (which generated incorrect object code). I haven't seen this for recent R10 releases, however. (Finally, as an aside, a better solution would be for the compiler to insert the equivalent information and for the VM to use it when an exception occurs.) Best, Thomas __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From matthias@REDACTED Fri Jan 6 09:39:53 2006 From: matthias@REDACTED (Matthias Lang) Date: Fri, 6 Jan 2006 09:39:53 +0100 Subject: Logging to one process from thousands: How does it work? In-Reply-To: <43BC4081.2070601@blueyonder.co.uk> References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <31207F4A-D118-41BE-8357-41024DA05995@gmail.com> <20060104162021.GA20605@vailsys.com> <43BC4081.2070601@blueyonder.co.uk> Message-ID: <17342.11481.1229.75086@antilipe.corelatus.se> Joel Reymont wrote: >>> Are there any limits on the size of the receive queue in Erlang? David Hopwood wrote: > Neither the FAQ, nor the "Efficiency Guide" that it links to, > actually answers Joel's question. The FAQ says: "The Erlang language doesn't specify any limits, but different implementations have different limits on the number of processes, the maximum amount of RAM and so on." the intended implication is that anything which isn't listed in that table isn't, for practical purposes, limited in a way other than what you might reasonably expect. Matthias From matheus@REDACTED Fri Jan 6 12:58:29 2006 From: matheus@REDACTED (Matheus Degiovani) Date: Fri, 06 Jan 2006 08:58:29 -0300 Subject: Hello and Mersenne Twister Message-ID: <43BE5B65.5080302@clubtilt.net> Hello Everyone, My name is Matheus Degiovani and I have started studuying a bit of Erlang. I have recently finished my BS in Computer Science with a diploma thesis about Distributed Virtual Environments, so that would be my main interest. I wrote a small Mersenne Twister (I know someone wrote that in Erlang some time ago, but the download link went dead) and I was wondering if someone could maybe take a look, see if it's "right", if the design choices I made were correct and everything. Maybe I can post it here or there is a public archive for this list...? Thanks. -- Matheus Degiovani matheus@REDACTED http://www.tilt.net http://clubtilt.net "Nem mesmo os s?bios conseguem enxergar os dois lados" - Gandalf em O Senhor dos An?is de JRR Tolkien. From sean.hinde@REDACTED Fri Jan 6 20:57:43 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Fri, 6 Jan 2006 19:57:43 +0000 Subject: Logging to one process from thousands: How does it work? In-Reply-To: <054CD750-10A7-463C-AD1B-3F789C4DAE39@gmail.com> References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <43BAD863.9060202@blueyonder.co.uk> <054CD750-10A7-463C-AD1B-3F789C4DAE39@gmail.com> Message-ID: <23650144-5CB0-4FA4-A11B-77950EB11702@gmail.com> Hi Chandru, On 5 Jan 2006, at 19:19, Sean Hinde wrote: > > You could introduce an additional accumulator process which stores > log messages while waiting for a separate disk log owning process > to write the current chunk. The protocol to the disk log owning > process could be "send async log message, but don't send any more > until the disk log process confirms that the write is done with a > message back". OK. How about something like what follows at the end of this mail. I have made it spawn a new process to do the logging rather than have an additional permanent process and sending a message, but only because it is simpler for a proof of concept. The idea is to start this as well as open the disk logs, but route log writes via this. It would also be more efficient to have one of these processes per disk log - then writing out cached log requests could use disk_log:log_terms/2 It would be better again if the OTP disk log could be persuaded to send a notification when an async log request has actually been written - then there would be no need for the spawn. Sean %%%------------------------------------------------------------------- %%% File : nb_log.erl %%% Author : Sean Hinde <> %%% Description : %%% %%% Created : 6 Jan 2006 by Sean Hinde <> %%%------------------------------------------------------------------- -module(nb_log). -behaviour(gen_server). %% API -export([start_link/0, alog/2, balog/2, alog_terms/2, balog_terms/2]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(s, { status, cache }). -define(SERVER, ?MODULE). %%==================================================================== %% API %%==================================================================== %%-------------------------------------------------------------------- %% Function: start_link() -> {ok,Pid} | ignore | {error,Error} %% Description: Starts the server %%-------------------------------------------------------------------- start_link() -> gen_server:start_link({local, ?SERVER}, ?MODULE, [], []). alog(Log, Term) -> gen_server:call(?SERVER, {log, Log, {log, Term}}). balog(Log, Term) -> gen_server:call(?SERVER, {log, Log, {blog, Term}}). alog_terms(Log, Terms) -> gen_server:call(?SERVER, {log, Log, {log_terms, Terms}}). balog_terms(Log, Terms) -> gen_server:call(?SERVER, {log, Log, {blog_terms, Terms}}). %%==================================================================== %% gen_server callbacks %%==================================================================== init([]) -> process_flag(trap_exit, true), {ok, #s{ status = idle, cache = queue:new()}}. handle_call({log, Log, Msg}, _From, S) -> if S#s.status == idle -> spawn_link(fun() -> catch do_log(Log, Msg), exit(done) end), {reply, ok, S#s{ status = busy }}; S#s.status == busy -> Q = queue:in({Log, Msg}, S#s.cache), {reply, ok, S#s{ cache = Q} } end. handle_cast(_Msg, S) -> {noreply, S}. handle_info({'EXIT', _Pid, done}, S) -> case queue:is_empty(S#s.cache) of true -> {noreply, S#s{ status = idle }}; false -> spawn_link(fun() -> catch do_log_queue(S#s.cache), exit(done) end), {noreply, S#s{cache = queue:new() }} end; handle_info(_Info, S) -> io:format("Info = ~p~n",[_Info]), {noreply, S}. terminate(_Reason, _S) -> ok. code_change(_OldVsn, S, _Extra) -> {ok, S}. %%-------------------------------------------------------------------- %%% Internal functions %%-------------------------------------------------------------------- do_log(Log, {log, Term}) -> disk_log:log(Log, Term); do_log(Log, {blog, Term}) -> disk_log:blog(Log, Term); do_log(Log, {log_terms, Terms}) -> disk_log:log_terms(Log, Terms); do_log(Log, {blog_terms, Terms}) -> disk_log:blog_terms(Log, Terms). do_log_queue(Queue) -> lists:foreach(fun({Log, Entry}) -> do_log(Log, Entry) end, queue:to_list(Queue)). From lonnie_smith@REDACTED Fri Jan 6 22:40:47 2006 From: lonnie_smith@REDACTED (Lonnie Smith) Date: Fri, 06 Jan 2006 13:40:47 -0800 Subject: CosNaming_BindingIterator:destroy/1 errors Message-ID: <1136583647.27531.251269068@webmail.messagingengine.com> Hi - I'm trying to clean up my BindingIterators after a call to 'CosNaming_NamingContext':list/2, but getting some errors: > NS = corba:resolve_initial_references("NameService"). {'IOP_IOR',"IDL:omg.org/CosNaming/NamingContext:1.0", [{'IOP_TaggedProfile',0, {'IIOP_ProfileBody_1_0', {'IIOP_Version',1,0}, "vbox", 21012, "NameService"}}]} > {ok, BList, BIterator} = 'CosNaming_NamingContext':list(NS, 25). {ok,[{'CosNaming_Binding',[{'CosNaming_NameComponent',"road",[]}],ncontext}, {'CosNaming_Binding',[{'CosNaming_NameComponent',"trail",[]}],ncontext}, {'CosNaming_Binding',[{'CosNaming_NameComponent',"helper","Object"}], nobject}], {'IOP_IOR',[],[]}} > 'CosNaming_BindingIterator':destroy(BIterator). =ERROR REPORT==== 6-Jan-2006::13:28:20 === Error in process <0.30.0> with exit value: {{nocatch,{'EXCEPTION',{'INV_OBJREF',[],16#45520000,'COMPLETED_NO'}}},[{corba,raise,1},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]} ** exited: {{nocatch,{'EXCEPTION',{'INV_OBJREF',[],1163001856,'COMPLETED_NO'}}}, [{corba,raise,1}, {erl_eval,do_apply,5}, {shell,exprs,6}, {shell,eval_loop,3}]} ** It looks similar to the last problem I had with resolve_initial_services/1, where I had the call wrong. But I checked the man page for CosNaming_BindingIterator, and it does have a method, destroy/1. I also checked the sources and there is a destroy/1 and a destroy/2. So what am I doing wrong? Lonnie -- Lonnie Smith lonnie_smith@REDACTED -- http://www.fastmail.fm - IMAP accessible web-mail From serge@REDACTED Thu Jan 5 21:17:25 2006 From: serge@REDACTED (Serge Aleynikov) Date: Thu, 05 Jan 2006 15:17:25 -0500 Subject: help Message-ID: <43BD7ED5.1030805@hq.idt.net> Folks, I'd like to ask the Erlang community for some help. While we've done plenty of systems prototyping in Erlang, in a couple of weeks we are about to release a production system written almost entirely in Erlang in the internal network. I was talking to my manager, the CIO of the company, and he expressed some concerns about the fact that the system is implemented in Erlang. He understands all the benefits, and is not against this technology (I presented to him various papers from Ericsson describing the maturity and advantages of Erlang/OTP), but given the fact that the project will handle over one billion dollars of annual traffic, he wants to make sure that other companies indeed use this technology in production and that there are real people behind it. For this reason, I'd like to ask for some volunteers that use Erlang/OTP in production, so that he could call them for reference in order to eliminate his concern. As he has enough influence, so that the lack of his confidence in Erlang/OTP might jeopardize the project deployment, I would largely appreciate your help in terms of showing that the technology is indeed alive. As with many other senior executives, he believes more in speaking with real people rather than reading white papers. Regards, Serge -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From stevez@REDACTED Thu Jan 5 16:54:17 2006 From: stevez@REDACTED (Steve Zdancewic) Date: Thu, 05 Jan 2006 10:54:17 -0500 Subject: CFP: Programming Languages and Analysis for Security (PLAS) 2006 Message-ID: <43BD4129.6050508@cis.upenn.edu> Call for Papers PLAS 2006 ACM SIGPLAN Workshop on Programming Languages and Analysis for Security http://www.cis.upenn.edu/~stevez/plas06.html co-located with ACM SIGPLAN PLDI 2006 Conference on Programming Language Design and Implementation Ottawa, Canada, June 10, 2006 The goal of PLAS 2006 is to provide a forum for researchers and practitioners to exchange and understand ideas and to seed new collaboration on the use of programming language and program analysis techniques that improve the security of software systems. The scope of PLAS includes, but is not limited to: -- Language-based techniques for security -- Program analysis and verification (including type systems and model checking) for security properties -- Compiler-based and program rewriting security enforcement mechanisms -- Security policies for information flow and access control -- High-level specification languages for security properties -- Model-driven approaches to security -- Applications, examples, and implementations of these security techniques Submission: The deadline for submissions of technical papers is March 03, 2006. Papers must be formatted according the ACM proceedings format and should be no longer than 10 pages in this format. This 10 page limit includes everything (i.e., it is the total length of the paper). Email the submissions to stevez AT cis.upenn.edu. Submissions should be in PDF (preferably) or Postscript that is interpretable by Ghostscript and printable on US Letter and A4 sized paper. Templates for SIGPLAN-approved LaTeX format can be found at http://www.acm.org/sigs/sigplan/authorInformation.htm. We recommend using this format, which improves greatly on the ACM LaTeX format. Submitted papers must describe work unpublished in refereed venues, and not submitted for publication elsewhere (including journals and formal proceedings of conferences and workshops). See the SIGPLAN republication policy for more details http://www.acm.org/sigs/sigplan/republicationpolicy.htm Important dates: Submission deadline March 03, 2006 Notification of acceptance April 03, 2006 Final papers due April 24, 2006 Workshop June 10, 2006 Organizers: Steve Zdancewic, University of Pennsylvania, stevez AT cis.upenn.edu Vugranam C. Sreedhar, IBM T.J. Watson Research Center vugranam AT us.ibm.com Program Committee: Amal Ahmed, Harvard University, USA Anindya Banerjee, Kansas State University, USA Adriana Compagnoni, Stevens Institute of Technology, USA Elena Ferrari, University of Insubria at Como, Italy Michael Hicks, University of Maryland, USA Annie Liu, State University of New York at Stony Brook, USA Brigitte Pientka, McGill University, Canada Sriram Rajamani, Microsoft Research, India, Vugranam Sreedhar, IBM TJ Watson Research Center, USA Westley Weimer, University of Virginia, USA Steve Zdancewic, University of Pennsylvania, USA From alex.peake@REDACTED Sat Jan 7 01:57:59 2006 From: alex.peake@REDACTED (Alex Peake) Date: Fri, 6 Jan 2006 16:57:59 -0800 Subject: help References: <43BD7ED5.1030805@hq.idt.net> Message-ID: <001401c61325$6adca2c0$64020a0a@FEY> We have a system that will be in production April 1, 2006 if that is helpful Alex ----- Original Message ----- From: "Serge Aleynikov" To: "Erlang Questions" Sent: Thursday, January 05, 2006 12:17 PM Subject: help > Folks, > > I'd like to ask the Erlang community for some help. While we've done > plenty of systems prototyping in Erlang, in a couple of weeks we are > about to release a production system written almost entirely in Erlang > in the internal network. > > I was talking to my manager, the CIO of the company, and he expressed > some concerns about the fact that the system is implemented in Erlang. > He understands all the benefits, and is not against this technology (I > presented to him various papers from Ericsson describing the maturity > and advantages of Erlang/OTP), but given the fact that the project will > handle over one billion dollars of annual traffic, he wants to make sure > that other companies indeed use this technology in production and that > there are real people behind it. > > For this reason, I'd like to ask for some volunteers that use Erlang/OTP > in production, so that he could call them for reference in order to > eliminate his concern. As he has enough influence, so that the lack of > his confidence in Erlang/OTP might jeopardize the project deployment, I > would largely appreciate your help in terms of showing that the > technology is indeed alive. As with many other senior executives, he > believes more in speaking with real people rather than reading white papers. > > Regards, > > Serge > > > -- > Serge Aleynikov > R&D Telecom, IDT Corp. > Tel: (973) 438-3436 > Fax: (973) 438-1464 > serge@REDACTED > From danie@REDACTED Sat Jan 7 05:42:57 2006 From: danie@REDACTED (Danie Schutte) Date: Sat, 7 Jan 2006 06:42:57 +0200 Subject: help In-Reply-To: <001401c61325$6adca2c0$64020a0a@FEY> References: <43BD7ED5.1030805@hq.idt.net> <001401c61325$6adca2c0$64020a0a@FEY> Message-ID: <200601070642.57919.danie@erlfinsys.net> Hi Serge, I can give you some references from our clients. We only use Erlang, and it has been running in production for more than 3 years. Our clients are A grade banks and also some private companies that operate in the financial sector. Another example is the article from British Telecom, the reliability of the Ericsson switches, and the volumes of calls - which also translates to revenue. The CIO can even contact me, as we answer the same questions for other banks. In actual fact we start implementations in 5 new countries during January and February, so there is a reliable track record that Erlang can deliver. The one production system, which has been a pilot project for 12 months now :) - is handling 650 000 financial transactions a month, total value being managed by the system - about 30 000 000 USD per month. Kind regards Daniel On Saturday 07 January 2006 02:57, Alex Peake wrote: > We have a system that will be in production April 1, 2006 if that is > helpful > > Alex > > ----- Original Message ----- > From: "Serge Aleynikov" > To: "Erlang Questions" > Sent: Thursday, January 05, 2006 12:17 PM > Subject: help > > > Folks, > > > > I'd like to ask the Erlang community for some help. While we've done > > plenty of systems prototyping in Erlang, in a couple of weeks we are > > about to release a production system written almost entirely in Erlang > > in the internal network. > > > > I was talking to my manager, the CIO of the company, and he expressed > > some concerns about the fact that the system is implemented in Erlang. > > He understands all the benefits, and is not against this technology (I > > presented to him various papers from Ericsson describing the maturity > > and advantages of Erlang/OTP), but given the fact that the project will > > handle over one billion dollars of annual traffic, he wants to make sure > > that other companies indeed use this technology in production and that > > there are real people behind it. > > > > For this reason, I'd like to ask for some volunteers that use Erlang/OTP > > in production, so that he could call them for reference in order to > > eliminate his concern. As he has enough influence, so that the lack of > > his confidence in Erlang/OTP might jeopardize the project deployment, I > > would largely appreciate your help in terms of showing that the > > technology is indeed alive. As with many other senior executives, he > > believes more in speaking with real people rather than reading white > > papers. > > > Regards, > > > > Serge > > > > > > -- > > Serge Aleynikov > > R&D Telecom, IDT Corp. > > Tel: (973) 438-3436 > > Fax: (973) 438-1464 > > serge@REDACTED From chaitanya.chalasani@REDACTED Sat Jan 7 07:12:32 2006 From: chaitanya.chalasani@REDACTED (Chaitanya Chalasani) Date: Sat, 7 Jan 2006 11:42:32 +0530 Subject: help In-Reply-To: <43BD7ED5.1030805@hq.idt.net> References: <43BD7ED5.1030805@hq.idt.net> Message-ID: <200601071142.32197.chaitanya.chalasani@gmail.com> Dear Serge, We have a prepaid roaming platform completely built in erlang, including the billing engine that supports more than a million subscribers which is in production in 6 GSM networks. On Friday 06 January 2006 01:47, Serge Aleynikov wrote: > Folks, > > I'd like to ask the Erlang community for some help. While we've done > plenty of systems prototyping in Erlang, in a couple of weeks we are > about to release a production system written almost entirely in Erlang > in the internal network. > > I was talking to my manager, the CIO of the company, and he expressed > some concerns about the fact that the system is implemented in Erlang. > He understands all the benefits, and is not against this technology (I > presented to him various papers from Ericsson describing the maturity > and advantages of Erlang/OTP), but given the fact that the project will > handle over one billion dollars of annual traffic, he wants to make sure > that other companies indeed use this technology in production and that > there are real people behind it. > > For this reason, I'd like to ask for some volunteers that use Erlang/OTP > in production, so that he could call them for reference in order to > eliminate his concern. As he has enough influence, so that the lack of > his confidence in Erlang/OTP might jeopardize the project deployment, I > would largely appreciate your help in terms of showing that the > technology is indeed alive. As with many other senior executives, he > believes more in speaking with real people rather than reading white > papers. > > Regards, > > Serge -- Chaitanya Chalasani From jahakala@REDACTED Sat Jan 7 09:16:35 2006 From: jahakala@REDACTED (Jani Hakala) Date: Sat, 07 Jan 2006 10:16:35 +0200 Subject: mingw32 compiled otp R10B-9 Message-ID: <87lkxsjvvg.fsf@pingviini.kortex.jyu.fi> Hi, For those who are interested in such a thing: http://www.cc.jyu.fi/~jahakala/otp/ The patch probably messes up with the windows compilation using cygwin and MSVC. Some parts of the patch are actually not necessary as they are leftovers from my (futile) attempt to use a borland C/C++ compiler. I have tested only a couple of things, for example ssh_sshd. There might be things that don't work. ODBC part doesn't work as I don't have any odbc libraries installed. Short description (i.e. installed software) about the build environment: windows xp (pro) MinGW, MSYS, msysDTK cygwin (only for cygpath.exe which can be copied to MinGW directory) tcltk 8.4.1 j2sdk1.4.2 nsis 2.12 openssl-0.9.7b Jani Hakala -- University of Jyv?skyl?, Department of Physics From joelr1@REDACTED Sat Jan 7 10:49:28 2006 From: joelr1@REDACTED (Joel Reymont) Date: Sat, 7 Jan 2006 09:49:28 +0000 Subject: help In-Reply-To: <200601070642.57919.danie@erlfinsys.net> References: <43BD7ED5.1030805@hq.idt.net> <001401c61325$6adca2c0$64020a0a@FEY> <200601070642.57919.danie@erlfinsys.net> Message-ID: <26ADCFA0-5A9E-4193-8539-28756B435D98@gmail.com> Where is the article? On Jan 7, 2006, at 4:42 AM, Danie Schutte wrote: > Another example is the article from British Telecom, the > reliability of the > Ericsson switches, and the volumes of calls - which also translates to > revenue. -- http://wagerlabs.com/ From tobbe@REDACTED Sat Jan 7 11:23:50 2006 From: tobbe@REDACTED (=?ISO-8859-1?Q?Torbj=F6rn_T=F6rnkvist?=) Date: Sat, 07 Jan 2006 11:23:50 +0100 Subject: trapexit.org hacked and shutdown Message-ID: <43BF96B6.2030704@tornkvist.org> Hi all, Just want to inform you that the trapexit.org forums has been hacked. I have therefore shutdown that part of the site. I'm not sure how popular the forums was (perhaps I should analyse the logs...). I know there was some 70 registered users, which indicates a low interest (or a low user base... ;-) I've been running trapexit.org for almost a year now (uptime is 313 days) and I wonder how useful it has been for people. Should trapexit.org continue to live, or should I shut it down completely ? Anyway, I don't think I will have the time to run it alone. So if it is going to continue to live I will need help from a couple of volunteers. I got some ideas on how to improve the site but I don't have the time to do it alone. Cheers, Tobbe From mccratch@REDACTED Sat Jan 7 12:02:01 2006 From: mccratch@REDACTED (mccratch@REDACTED) Date: Sat, 7 Jan 2006 12:02:01 +0100 Subject: trapexit.org hacked and shutdown In-Reply-To: <43BF96B6.2030704@tornkvist.org> References: <43BF96B6.2030704@tornkvist.org> Message-ID: <20060107110200.GA1742@localhost.localdomain> Hi, I think it is quite useful to have a central point where one can begin to search for help, tools, documentation, examples, etc. As long as it is know to the userbase where to find it ... :) But I don't know if this should be trapexit.org or some other site. Another interesting idea, to run the site without doing all the stuff by a single person, would be to initiate a Wiki (well very popular these days, aren't they? :)). If I recall correctly the MLton project uses this aproach to manage the documentation. That would make it much easier to search for help. Instead of searching the forums or mailing-lists one could look at some howto, FAQ or so section or maybe adding the stuff after investigation. I don't know if here someone would really want this, but just this thought come up in my head right now. -- Matthias Kretschmer On Sat, Jan 07, 2006 at 11:23:50AM +0100, Torbj?rn T?rnkvist wrote: > Hi all, > > Just want to inform you that the trapexit.org forums has been hacked. > I have therefore shutdown that part of the site. > > I'm not sure how popular the forums was (perhaps I should > analyse the logs...). I know there was some 70 registered users, > which indicates a low interest (or a low user base... ;-) > > I've been running trapexit.org for almost a year now (uptime > is 313 days) and I wonder how useful it has been for people. > Should trapexit.org continue to live, or should I shut it down > completely ? > > Anyway, I don't think I will have the time to run it alone. So if it > is going to continue to live I will need help from a couple of > volunteers. I got some ideas on how to improve the site but > I don't have the time to do it alone. > > Cheers, Tobbe > > From mickael.remond@REDACTED Sat Jan 7 13:16:16 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Sat, 7 Jan 2006 13:16:16 +0100 Subject: trapexit.org hacked and shutdown In-Reply-To: <43BF96B6.2030704@tornkvist.org> References: <43BF96B6.2030704@tornkvist.org> Message-ID: <20060107121616.GA16522@memphis.process-one.net> Hello Torbj?rn, * Torbj?rn T?rnkvist [2006-01-07 11:23:50 +0100]: > Hi all, > > Just want to inform you that the trapexit.org forums has been hacked. > I have therefore shutdown that part of the site. > > I'm not sure how popular the forums was (perhaps I should > analyse the logs...). I know there was some 70 registered users, > which indicates a low interest (or a low user base... ;-) > > I've been running trapexit.org for almost a year now (uptime > is 313 days) and I wonder how useful it has been for people. > Should trapexit.org continue to live, or should I shut it down > completely ? I think Trapexit was very usefull. There is a lot of interesting tutorials on it. The erlmerge is also very interesting so I think it would be a pity to stop the project. > Anyway, I don't think I will have the time to run it alone. So if it > is going to continue to live I will need help from a couple of > volunteers. I got some ideas on how to improve the site but > I don't have the time to do it alone. We are also very busy but maybe we can find a way to make our efforts converge. Running such a site is time consuming and the burden surely have to be shared. I do not know yet how we could go further together, but let's think about it together :-) -- Micka?l R?mond From ernie.makris@REDACTED Sat Jan 7 16:34:19 2006 From: ernie.makris@REDACTED (Ernie Makris) Date: Sat, 07 Jan 2006 10:34:19 -0500 Subject: trapexit.org hacked and shutdown In-Reply-To: <43BF96B6.2030704@tornkvist.org> References: <43BF96B6.2030704@tornkvist.org> Message-ID: <43BFDF7B.80302@comcast.net> I used trapexit forums every week. The search feature was very fast and useful. Please bring them back! Also, try running a newer version of the bb software, and definitely run mod_security in front. It should eliminate most hack attempts. If you need help, let me know. Thanks Ernie Torbj?rn T?rnkvist wrote: > Hi all, > > Just want to inform you that the trapexit.org forums has been hacked. > I have therefore shutdown that part of the site. > > I'm not sure how popular the forums was (perhaps I should > analyse the logs...). I know there was some 70 registered users, > which indicates a low interest (or a low user base... ;-) > > I've been running trapexit.org for almost a year now (uptime > is 313 days) and I wonder how useful it has been for people. > Should trapexit.org continue to live, or should I shut it down > completely ? > > Anyway, I don't think I will have the time to run it alone. So if it > is going to continue to live I will need help from a couple of > volunteers. I got some ideas on how to improve the site but > I don't have the time to do it alone. > > Cheers, Tobbe > > > > From ernie.makris@REDACTED Sat Jan 7 16:41:11 2006 From: ernie.makris@REDACTED (Ernie Makris) Date: Sat, 07 Jan 2006 10:41:11 -0500 Subject: help In-Reply-To: <200601070642.57919.danie@erlfinsys.net> References: <43BD7ED5.1030805@hq.idt.net> <001401c61325$6adca2c0$64020a0a@FEY> <200601070642.57919.danie@erlfinsys.net> Message-ID: <43BFE117.2080905@comcast.net> Hi, I'm curious, are you using yaws? What are the front ends that deliver all those transactions? Also, are you using mnesia? I'm trying to figure out the best way to use mnesia and yaws in those types of scenarios. Thanks Ernie Danie Schutte wrote: >Hi Serge, > > I can give you some references from our clients. We only use Erlang, and >it has been running in production for more than 3 years. > >Our clients are A grade banks and also some private companies that operate in >the financial sector. > >Another example is the article from British Telecom, the reliability of the >Ericsson switches, and the volumes of calls - which also translates to >revenue. > >The CIO can even contact me, as we answer the same questions for other banks. >In actual fact we start implementations in 5 new countries during January and >February, so there is a reliable track record that Erlang can deliver. > >The one production system, which has been a pilot project for 12 months now :) >- is handling 650 000 financial transactions a month, total value being >managed by the system - about 30 000 000 USD per month. > >Kind regards >Daniel > > > From nick@REDACTED Sat Jan 7 17:27:27 2006 From: nick@REDACTED (Niclas Eklund) Date: Sat, 7 Jan 2006 17:27:27 +0100 (MET) Subject: CosNaming_BindingIterator:destroy/1 errors In-Reply-To: <1136583647.27531.251269068@webmail.messagingengine.com> Message-ID: Hello Lonnie! When you invoke the list operation requesting a list containing a list exceeding the number of existing entries, then the returned iterator will be a nil object reference. In this case you asked for 25, but only 4 existed. This is the reason why you got the INV_OBJREF exception. To avoid this you can use the corba_object:is_nil/1 operation to see if it's a valid reference (i.e. posible to invoke 'CosNaming_BindingIterator':destroy(BIterator)) or check the number of returned elements. IMHO, this is the common behavior amongst CosNaming implementations. /Niclas On Fri, 6 Jan 2006, Lonnie Smith wrote: > Hi - > > I'm trying to clean up my BindingIterators after a call to > 'CosNaming_NamingContext':list/2, but getting some errors: > > > NS = corba:resolve_initial_references("NameService"). > {'IOP_IOR',"IDL:omg.org/CosNaming/NamingContext:1.0", > [{'IOP_TaggedProfile',0, > {'IIOP_ProfileBody_1_0', > {'IIOP_Version',1,0}, > "vbox", > 21012, > "NameService"}}]} > > {ok, BList, BIterator} = 'CosNaming_NamingContext':list(NS, 25). > {ok,[{'CosNaming_Binding',[{'CosNaming_NameComponent',"road",[]}],ncontext}, > {'CosNaming_Binding',[{'CosNaming_NameComponent',"trail",[]}],ncontext}, > {'CosNaming_Binding',[{'CosNaming_NameComponent',"helper","Object"}], > nobject}], > {'IOP_IOR',[],[]}} > > 'CosNaming_BindingIterator':destroy(BIterator). > > =ERROR REPORT==== 6-Jan-2006::13:28:20 === > Error in process <0.30.0> with exit value: > {{nocatch,{'EXCEPTION',{'INV_OBJREF',[],16#45520000,'COMPLETED_NO'}}},[{corba,raise,1},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_loop,3}]} > > ** exited: > {{nocatch,{'EXCEPTION',{'INV_OBJREF',[],1163001856,'COMPLETED_NO'}}}, > [{corba,raise,1}, > {erl_eval,do_apply,5}, > {shell,exprs,6}, > {shell,eval_loop,3}]} ** > > > It looks similar to the last problem I had with > resolve_initial_services/1, where I had the call wrong. But I checked > the man page for CosNaming_BindingIterator, and it does have a method, > destroy/1. I also checked the sources and there is a destroy/1 and a > destroy/2. So what am I doing wrong? > > Lonnie > -- > Lonnie Smith > lonnie_smith@REDACTED > > -- > http://www.fastmail.fm - IMAP accessible web-mail > _________________________________________________________________ We Are The ORBs. Resistance Is Futile. Prepare To Be Assimilated! _________________________________________________________________ From serge@REDACTED Sat Jan 7 18:07:15 2006 From: serge@REDACTED (Serge Aleynikov) Date: Sat, 07 Jan 2006 12:07:15 -0500 Subject: help In-Reply-To: <43BFE117.2080905@comcast.net> References: <43BD7ED5.1030805@hq.idt.net> <001401c61325$6adca2c0$64020a0a@FEY> <200601070642.57919.danie@erlfinsys.net> <43BFE117.2080905@comcast.net> Message-ID: <43BFF543.7050706@hq.idt.net> Ernie, In this particular system we are not using yaws, but do use mnesia (a couple of disc_copies master nodes and several ram_copies replicated in geograpically distributed sites). The clients are custom host processes written in C that control Excel switches. There are over 200 such clients/switches clustered in multiple sites. The protocol between clients and back-end Erlang system is ASCII based (similar to http headers) over persistent TCP connections. The Erlang system consists of three layers: 1. Proxy (load balances transactions accross back-end servers) 2. Back-end servers joined by process groups. These also run mnesia ram_copies replicas. 3. Master mnesia database nodes (two nodes at two sites). The solution also has redundancy at OSI layers: 1,2,3,4,5. In the lab we were able to achieve the thoughput of 5000 transactions/second using a single proxy and multiple back-end servers. So in real life we'll be using multiple sites more for network redundancy reasons rather than performance, as the current throughput requirement is under 600 transactions/sec. I would say that the most complicated part of this project was not the design and development in Erlang, but getting all teams involved in QA, deployment, support, network provisioning, server support, etc. coordinated, so that the project can be successfully deployed. Yet, this is fairly common for large organizations... Ernie Makris wrote: > Hi, > > I'm curious, are you using yaws? What are the front ends that deliver > all those transactions? > Also, are you using mnesia? > I'm trying to figure out the best way to use mnesia and yaws in those > types of scenarios. > > Thanks > Ernie > > Danie Schutte wrote: > > >>Hi Serge, >> >> I can give you some references from our clients. We only use Erlang, and >>it has been running in production for more than 3 years. >> >>Our clients are A grade banks and also some private companies that operate in >>the financial sector. >> >>Another example is the article from British Telecom, the reliability of the >>Ericsson switches, and the volumes of calls - which also translates to >>revenue. >> >>The CIO can even contact me, as we answer the same questions for other banks. >>In actual fact we start implementations in 5 new countries during January and >>February, so there is a reliable track record that Erlang can deliver. >> >>The one production system, which has been a pilot project for 12 months now :) >>- is handling 650 000 financial transactions a month, total value being >>managed by the system - about 30 000 000 USD per month. >> >>Kind regards >>Daniel >> >> >> > > From danie@REDACTED Sat Jan 7 18:24:42 2006 From: danie@REDACTED (Danie Schutte) Date: Sat, 7 Jan 2006 19:24:42 +0200 Subject: help In-Reply-To: <43BFE117.2080905@comcast.net> References: <43BD7ED5.1030805@hq.idt.net> <200601070642.57919.danie@erlfinsys.net> <43BFE117.2080905@comcast.net> Message-ID: <200601071924.42768.danie@erlfinsys.net> Hi Ernie, yes we use yaws in quite a few "interfaces" - web and xml related. In terms of front end interfaces we provide a few options: 1. Traditional web pages served by yaws. 2. XML Interfaces where the customer has got his own "front ends" but want to talk XML to us - also yaws. 3. Flash frontends - that looks flashy ;) and interfaces with the backends with either direct url calls or xml calls - into yaws. 4. Certain interfaces that talk directly via tcp/ip to the backend (no yaws on these). (SMS, USSD, GPRS, WAP, (GSM and CDMA related)) and some other stuff. We have what we call a "bank in a box" so almost all / any financial interface / protocol is currently supported (and flavored :) ) Just as a matter of interested - the 650 000 transactions as I said was a pilot - the launch is estimated to start 16 January 2006 - and the 650 000 trans is estimated to be only about 2 - 3% of full production volume. Mnesia: Yes we use mnesia in an application called AFM Advanced File Management. The application is a "universal" file handler for pre-processing. All administrative and financial files are read, validated and submits the information for processing by the banking or any other system - receives feedback and updates the record and file statuses after processing and then generates the required output files. Mnesia is something we have liked since inception and used quite extensively - the only concern from financial auditors - is the security around mnesia - which you might have to deal with - and some resistance from DBA's :). Although I must admit that we are starting to utilize MySQL 5 quite extensively as well. ================== Using Mnesia and YAWS. I think it depends on the transactions and requirements. It is not just functionality and usability - audit trails and policies from certain financial institutions also restrict options and solutions. YAWS we found was not such a big concern from an auditing perspective, whereas Mnesia could be tough to get past the big audit firms. Some of the things that we have seen and was integrated solutions where the security for your web pages was kept in Mnesia - which work fine. We have since done a solution with a centralized credentials server - which can be utilized by both yaws other frontend and backend solutions - think LDAP / Kerberos - but "system specific" which runs on mnesia - but we are moving that to MySQL for policy reasons. If you want to discussed it, just drop me a mail - or maybe we can get together - we currently have guys travelling almost all over the world. There are various solutions and the Erlang community is one of the best in providing them. On Saturday 07 January 2006 17:41, Ernie Makris wrote: > Hi, > > I'm curious, are you using yaws? What are the front ends that deliver > all those transactions? > Also, are you using mnesia? > I'm trying to figure out the best way to use mnesia and yaws in those > types of scenarios. > > Thanks > Ernie > > Danie Schutte wrote: > >Hi Serge, > > > > I can give you some references from our clients. We only use Erlang, > > and it has been running in production for more than 3 years. > > > >Our clients are A grade banks and also some private companies that operate > > in the financial sector. > > > >Another example is the article from British Telecom, the reliability of > > the Ericsson switches, and the volumes of calls - which also translates > > to revenue. > > > >The CIO can even contact me, as we answer the same questions for other > > banks. In actual fact we start implementations in 5 new countries during > > January and February, so there is a reliable track record that Erlang can > > deliver. > > > >The one production system, which has been a pilot project for 12 months > > now :) - is handling 650 000 financial transactions a month, total value > > being managed by the system - about 30 000 000 USD per month. > > > >Kind regards > >Daniel From cyberlync@REDACTED Sun Jan 8 05:54:24 2006 From: cyberlync@REDACTED (Eric Merritt) Date: Sat, 7 Jan 2006 20:54:24 -0800 Subject: trapexit.org hacked and shutdown In-Reply-To: <43BF96B6.2030704@tornkvist.org> References: <43BF96B6.2030704@tornkvist.org> Message-ID: I used trap exit quite a lot and I would hate to see it go away. The only real criticism I ever had was that the name 'trap-exit' wasn't real intuitive for people not familiar with Erlang. However, the content was very useful though. > Hi all, > > Just want to inform you that the trapexit.org forums has been hacked. > I have therefore shutdown that part of the site. > > I'm not sure how popular the forums was (perhaps I should > analyse the logs...). I know there was some 70 registered users, > which indicates a low interest (or a low user base... ;-) > > I've been running trapexit.org for almost a year now (uptime > is 313 days) and I wonder how useful it has been for people. > Should trapexit.org continue to live, or should I shut it down > completely ? > > Anyway, I don't think I will have the time to run it alone. So if it > is going to continue to live I will need help from a couple of > volunteers. I got some ideas on how to improve the site but > I don't have the time to do it alone. > > Cheers, Tobbe > > > > From sanjaya@REDACTED Mon Jan 9 08:13:50 2006 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Mon, 9 Jan 2006 13:13:50 +0600 Subject: How To Use Erlang Driver Queue Message-ID: <012501c614ec$3e868b00$5f00a8c0@wavenet.lk> Hi...!!! How to use Erlang Driver Queue (ErlIOVec) to get Driver Side Events to emulator? I have tried with driver_output_term(...). But it's not work in the way i want, specially when I try to get the driverside events to emulator. Can't we use the driver_enq(...) function to directly put the messages to the queue, & get it from the emulator ? If it is possible, i'd like to know how this can be done. I have tried with driver_enq(...) to put the data, but don't receiced any event to the emulator. One thing I noted is, when stop the driver it calls flush. It seems the data I put into the queue was there till I stop the driver. I don't know i'm going in a proper way or not. So need any guidence from expert, because the documentation seems to be not enough to for this topic. Thanks in advance Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From casper2000a@REDACTED Mon Jan 9 08:33:46 2006 From: casper2000a@REDACTED (Eranga Udesh) Date: Mon, 9 Jan 2006 13:33:46 +0600 Subject: "COMPONENTS OF " asn In-Reply-To: <9693198F-7A66-4B56-BA2F-5A7F836E26EC@gmail.com> Message-ID: <20060109070643.BB7CE400395@mail.omnibis.com> Hi, I can't compile below definition. SIGNATURE{ToBeSigned} ::= SEQUENCE { algorithmIdentifier AlgorithmIdentifier, encrypted ENCRYPTED-HASH{ToBeSigned} } SIGNED{ToBeSigned} ::= SEQUENCE { toBeSigned ToBeSigned, COMPONENTS OF SIGNATURE{ToBeSigned} } It gives the error, {asn1, {illegal_COMPONENTS_OF, {undefined, {pt,{'Externaltypereference', 263, 'AuthenticationFramework', 'SIGNATURE'}, [{type, [], {'Externaltypereference', 263, 'AuthenticationFramework', 'ToBeSigned'}, [], [], no}]}}}} Error is "COMPONENTS OF" sub-type. Is it a non-supported feature in the Erlang ASN.1 compiler? Is there any workaround ways? Please advice soon. Thanks, - Eranga From casper2000a@REDACTED Mon Jan 9 10:30:12 2006 From: casper2000a@REDACTED (Eranga Udesh) Date: Mon, 9 Jan 2006 15:30:12 +0600 Subject: "CONTAINING" asn Message-ID: <20060109090309.B020140002A@mail.omnibis.com> Hi, Is "CONTAINING" type constraint implemented in Erlang ASN.1 compiler? If not, are there any workaround ways? Attached is the spec part. Please advice soon. Thanks, - Eranga -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: containing.txt URL: From rohini@REDACTED Mon Jan 9 10:58:21 2006 From: rohini@REDACTED (Rohini V) Date: Mon, 9 Jan 2006 15:28:21 +0530 Subject: auth init check failed Error Message-ID: <30BFDEA66FF4D41191EB00D0B765BC6F01916A13@medha.wsspl.com> Hi I started with the SNMP part of Erlang. Compiled the EX1-MIB, and made get requests, which works fine. But if I send any Set requests, I notice the following error : (agent@REDACTED)3> ** SNMP MASTER-AGENT DEBUG: Received PDU: {pdu,'set-request', 806285441, noError, 0, [{varbind,[1,3,6,1,3,7,1,0],'OCTET STRING',"Martin",1}]} from: {{127,0,0,1},5000} (agent@REDACTED)3> ** SNMP MASTER-AGENT ACM TRACE: check access for Pdu: {pdu,'set-request', 806285441, noError, 0, [{varbind,[1,3,6,1,3,7,1,0],'OCTET STRING',"Martin",1}]} Security model: 2 Community: public (agent@REDACTED)3> ** SNMP MASTER-AGENT ACM TRACE: View type: write (agent@REDACTED)3> ** SNMP MASTER-AGENT COMMUNITY-MIB TRACE: loop_c2v_row s -> [] valid tag for community index "public" (agent@REDACTED)3> ** SNMP MASTER-AGENT ACM TRACE: get mib view Security name: "initial" Context name: [] (agent@REDACTED)3> ** SNMP MASTER-AGENT VACM DEBUG: check that the contex t ([]) is known to us (agent@REDACTED)3> ** SNMP MASTER-AGENT GENERIC TRACE: table_get_elements -> entry with NameDb: {intContextTable,volatile} RowIndex: [] Cols: [1] FirstOwnIndex: 1 (agent@REDACTED)3> ** SNMP MASTER-AGENT GENERIC DEBUG: handle_table_get - > undefined (agent@REDACTED)3> ** SNMP MASTER-AGENT VACM DEBUG: check that SecModel ( 2) and SecName ("initial") is valid (agent@REDACTED)3> ** SNMP MASTER-AGENT GENERIC TRACE: table_get_elements -> entry with NameDb: {vacmSecurityToGroupTable,persistent} RowIndex: [2,7,105,110,105,116,105,97,108] Cols: [3,5] FirstOwnIndex: 1 (agent@REDACTED)3> ** SNMP MASTER-AGENT GENERIC TRACE: handle_table_get - > Res: ["initial",1] (agent@REDACTED)3> ** SNMP MASTER-AGENT VACM DEBUG: find an access entry and its view name (agent@REDACTED)3> ** SNMP MASTER-AGENT VACM TRACE: get_view_name -> Row: {1,"restricted",[],"restricted",3,1} (agent@REDACTED)3> ** SNMP MASTER-AGENT VACM TRACE: get_view_name -> not found when ViewType: write GroupName: "initial" ContextName: [] SecModel: 2 SecLevel: 1 (agent@REDACTED)3> ** SNMP MASTER-AGENT LOG: auth init check failed: noSuchView (agent@REDACTED)3> ** SNMP MASTER-AGENT DEBUG: Raw error status: authorizationError The vacm.conf file contains : {vacmSecurityToGroup, v2c, "initial", "initial"}. {vacmSecurityToGroup, usm, "initial", "initial"}. {vacmSecurityToGroup, v1, "initial", "initial"}. {vacmAccess, "initial", "", any, noAuthNoPriv, exact, "internet", "internet", "internet"}. {vacmAccess, "initial", "", usm, authNoPriv, exact, "internet", "internet", "internet"}. {vacmAccess, "initial", "", usm, authPriv, exact, "internet", "internet", "internet"}. {vacmViewTreeFamily, "internet", [1,3,6,1], included, null}. {vacmViewTreeFamily, "restricted", [1,3,6,1], included, null}. Please let me know if I am missing anything. Regards, Rohini From camster@REDACTED Mon Jan 9 11:27:31 2006 From: camster@REDACTED (Richard Cameron) Date: Mon, 9 Jan 2006 10:27:31 +0000 Subject: Size of float in disk_log Message-ID: <438B3223-C4B5-4835-B577-4F22F8AEAD3C@citeulike.org> I'm using the (extremely useful) disk_log module to dump out a timeseries of numerical data to the disk. It's running in internal mode and behaving wonderfully with just one minor gripe: It seems to use a *hell of a lot* of disk space. The main culprit seems to be trying to serialize floating point numbers (of which I have lots and lots, but I acknowledge that most telephony applications don't). Doing a unix "strings" on the log file yields lots of stuff like this: c1.79827350000000003553e+00 which I'm guessing is a factor of 27/8 (=3.4) more than dumping out the raw 64-bit double (under some appropriate endianness convention). Also, atoms seem to be getting dumped out textually every time. So a record with a #very_long_record_name_indeed{} is going to require lots of space on the disk every time it's written. If disk_logs are always read sequentially, is there any reason why these atoms couldn't be "interned" and represented by integers on subsequent appearances? Doing a bzip2 -9 on my log file yields a 97% reduction. I know I could use the disk_log's external format to roll-my-own format, but I don't think my requirements are terribly atypical. So, I suppose my questions are: 1) Has anyone already thought about tweaking disk_log to make it less disk-hungry, or 2) am I missing some vital point which means that there really isn't such a big problem here? I suppose one extreme alternative is to write a driver for the HDF5 library , although that's probably going to be of little use to anyone except those dealing with lots of numerical data. Richard. From joelr1@REDACTED Mon Jan 9 12:16:54 2006 From: joelr1@REDACTED (Joel Reymont) Date: Mon, 9 Jan 2006 11:16:54 +0000 Subject: Size of float in disk_log In-Reply-To: <438B3223-C4B5-4835-B577-4F22F8AEAD3C@citeulike.org> References: <438B3223-C4B5-4835-B577-4F22F8AEAD3C@citeulike.org> Message-ID: What about storing floats as ints with a given precision and dividing by 10,000 or 100,000 on read? Since records are tuples you can also replace the tag (element 1) with a number when storing and with a tag after retrieving the record. On Jan 9, 2006, at 10:27 AM, Richard Cameron wrote: > > I'm using the (extremely useful) disk_log module to dump out a > timeseries of numerical data to the disk. It's running in internal > mode and behaving wonderfully with just one minor gripe: > > It seems to use a *hell of a lot* of disk space. The main culprit > seems to be trying to serialize floating point numbers (of which I > have lots and lots, but I acknowledge that most telephony > applications don't). Doing a unix "strings" on the log file yields > lots of stuff like this: > > c1.79827350000000003553e+00 > . -- http://wagerlabs.com/ From Jouni.Ryno@REDACTED Mon Jan 9 12:40:54 2006 From: Jouni.Ryno@REDACTED (Jouni =?ISO-8859-1?Q?Ryn=F6?=) Date: Mon, 09 Jan 2006 13:40:54 +0200 Subject: Size of float in disk_log In-Reply-To: References: <438B3223-C4B5-4835-B577-4F22F8AEAD3C@citeulike.org> Message-ID: <1136806854.10823.46.camel@adic> Or change the floats first to binary ..., that helps too. <> = 3.14 (about). Jouni On Mon, 2006-01-09 at 11:16 +0000, Joel Reymont wrote: > What about storing floats as ints with a given precision and dividing > by 10,000 or 100,000 on read? > > Since records are tuples you can also replace the tag (element 1) > with a number when storing and with a tag after retrieving the record. > > On Jan 9, 2006, at 10:27 AM, Richard Cameron wrote: > > > > > I'm using the (extremely useful) disk_log module to dump out a > > timeseries of numerical data to the disk. It's running in internal > > mode and behaving wonderfully with just one minor gripe: > > > > It seems to use a *hell of a lot* of disk space. The main culprit > > seems to be trying to serialize floating point numbers (of which I > > have lots and lots, but I acknowledge that most telephony > > applications don't). Doing a unix "strings" on the log file yields > > lots of stuff like this: > > > > c1.79827350000000003553e+00 > > . > > -- > http://wagerlabs.com/ > > > > > -- Jouni Ryn? mailto://Jouni.Ryno@REDACTED/ http://www.geo.fmi.fi/~ryno/ Finnish Meteorological Institute http://www.fmi.fi/ Space Research http://www.geo.fmi.fi/ P.O.BOX 503 Tel (+358)-9-19294656 FIN-00101 Helsinki FAX (+358)-9-19294603 Finland priv-GSM (+358)-50-5302903 "It's just zeros and ones, it cannot be hard" From surindar.shanthi@REDACTED Mon Jan 9 13:18:21 2006 From: surindar.shanthi@REDACTED (Surindar Sivanesan) Date: Mon, 9 Jan 2006 17:48:21 +0530 Subject: Error in Supervisor model Message-ID: <42ea5fb60601090418i465ceb54s844f5148f3b08757@mail.gmail.com> Im new to OTP.When i start the supervisor, while it is creating child, it encounter error and the supervisor exit.Please give me the reason why this happens,Also give me the solutuon to this problem The supervisor code is -module(super). -compile(export_all). -behaviour(supervisor). start()-> supervisor:start_link({local,head},?MODULE,[]), init(Any)-> {ok,{ {one_for_one,1,60}, [test,{test,start,[]},permanent,brutal_kill,worker ,[test]} ] } }. The child code is -module(test). -compile(export_all). -behaviour(gen_fsm). start()-> gen_fsm:start_link({local,name},test,[],[]). init(A)-> {ok,free,[]}. But if i do the same coding with one loop in the child, the supervisor is not exiting. The child code is module(test). -compile(export_all). -behaviour(gen_fsm). start()-> gen_fsm:start_link({local,name},test,[],[]), loop(). init(A)-> {ok,free,[]}. loop()-> loop(). Please clarify this -- with regards, S.Surindar From lennart.ohman@REDACTED Mon Jan 9 15:08:32 2006 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Mon, 9 Jan 2006 15:08:32 +0100 Subject: Error in Supervisor model In-Reply-To: <42ea5fb60601090418i465ceb54s844f5148f3b08757@mail.gmail.com> Message-ID: Hi, hmm, how actually do you start "this" little example of yours? The reason for my suspisiousnes is that your childrenspecification seems wrong. If you look in the man-page for supervisor.erl you find that a childrenspecification is a list of the following tuple: child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules} Id = term() StartFunc = {M,F,A} M = F = atom() A = [term()] Restart = permanent | transient | temporary Shutdown = brutal_kill | int()>=0 | infinity Type = worker | supervisor Modules = [Module] | dynamic Module = atom() In your example it is just a list. Second: The example gen_fsm which do not crash, according to you, can never initialize. Who ever calls test:start/0 will never get a return value. "He" will infact instead "become" a never ending loop, since you have a call to loop/0 last in the start/0 function. I suggest you study and try out a few of the examples in: http://www.erlang.se/doc/doc-5.4.12/doc/design_principles/part_frame.html where you will find examples of both gen_fsm and supervisors you can copy and modify to experiment with. Good luck, Lennart ------------------------------------------------------------- Lennart Ohman office : +46-8-587 623 27 Sjoland & Thyselius Telecom AB cellular: +46-70-552 67 35 Sehlstedtsgatan 6 fax : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Surindar Sivanesan Sent: Monday, January 09, 2006 1:18 PM To: erlang-questions@REDACTED Subject: Error in Supervisor model Im new to OTP.When i start the supervisor, while it is creating child, it encounter error and the supervisor exit.Please give me the reason why this happens,Also give me the solutuon to this problem The supervisor code is -module(super). -compile(export_all). -behaviour(supervisor). start()-> supervisor:start_link({local,head},?MODULE,[]), init(Any)-> {ok,{ {one_for_one,1,60}, [test,{test,start,[]},permanent,brutal_kill,worker ,[test]} ] } }. The child code is -module(test). -compile(export_all). -behaviour(gen_fsm). start()-> gen_fsm:start_link({local,name},test,[],[]). init(A)-> {ok,free,[]}. But if i do the same coding with one loop in the child, the supervisor is not exiting. The child code is module(test). -compile(export_all). -behaviour(gen_fsm). start()-> gen_fsm:start_link({local,name},test,[],[]), loop(). init(A)-> {ok,free,[]}. loop()-> loop(). Please clarify this -- with regards, S.Surindar From chandrashekhar.mullaparthi@REDACTED Mon Jan 9 15:51:51 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Mon, 9 Jan 2006 14:51:51 +0000 Subject: Logging to one process from thousands: How does it work? In-Reply-To: <23650144-5CB0-4FA4-A11B-77950EB11702@gmail.com> References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <43BAD863.9060202@blueyonder.co.uk> <054CD750-10A7-463C-AD1B-3F789C4DAE39@gmail.com> <23650144-5CB0-4FA4-A11B-77950EB11702@gmail.com> Message-ID: Hi Sean, On 06/01/06, Sean Hinde wrote: > Hi Chandru, > > On 5 Jan 2006, at 19:19, Sean Hinde wrote: > > > > > You could introduce an additional accumulator process which stores > > log messages while waiting for a separate disk log owning process > > to write the current chunk. The protocol to the disk log owning > > process could be "send async log message, but don't send any more > > until the disk log process confirms that the write is done with a > > message back". > > OK. How about something like what follows at the end of this mail. I > have made it spawn a new process to do the logging rather than have > an additional permanent process and sending a message, but only > because it is simpler for a proof of concept. > > The idea is to start this as well as open the disk logs, but route > log writes via this. Thanks for this. I'll try to integrate it into our logger app and see how it behaves. cheers Chandru From sean.hinde@REDACTED Mon Jan 9 20:35:31 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Mon, 9 Jan 2006 19:35:31 +0000 Subject: Logging to one process from thousands: How does it work? In-Reply-To: References: <09706D44-BC28-476C-8C9F-DB382E6F28B5@gmail.com> <43BAD863.9060202@blueyonder.co.uk> <054CD750-10A7-463C-AD1B-3F789C4DAE39@gmail.com> <23650144-5CB0-4FA4-A11B-77950EB11702@gmail.com> Message-ID: <1B28BBC2-512F-4921-8814-38FC223E3588@gmail.com> On 9 Jan 2006, at 14:51, chandru wrote: > Hi Sean, > > On 06/01/06, Sean Hinde wrote: >> Hi Chandru, >> >> On 5 Jan 2006, at 19:19, Sean Hinde wrote: >> >>> >>> You could introduce an additional accumulator process which stores >>> log messages while waiting for a separate disk log owning process >>> to write the current chunk. The protocol to the disk log owning >>> process could be "send async log message, but don't send any more >>> until the disk log process confirms that the write is done with a >>> message back". >> >> OK. How about something like what follows at the end of this mail. I >> have made it spawn a new process to do the logging rather than have >> an additional permanent process and sending a message, but only >> because it is simpler for a proof of concept. >> >> The idea is to start this as well as open the disk logs, but route >> log writes via this. > > Thanks for this. I'll try to integrate it into our logger app and see > how it behaves. Great! Let us know how you get on.. It would be interesting to try to take care of logging errors some way (although async logging doesn't care about this normally). It would be Very Interesting Indeed to compare the "spawn and send result when done" solution to a solution having an additional permanent process with "send and send result when done". It is by no means obvious to me that the spawn solution should really be slower (i.e. no regular garbage collections required) Sean From serge@REDACTED Tue Jan 10 00:17:14 2006 From: serge@REDACTED (Serge Aleynikov) Date: Mon, 09 Jan 2006 18:17:14 -0500 Subject: trapexit.org hacked and shutdown In-Reply-To: <43BF96B6.2030704@tornkvist.org> References: <43BF96B6.2030704@tornkvist.org> Message-ID: <43C2EEFA.5050904@hq.idt.net> Hi Tobbe! I find trapexit.org very useful, and use it frequently for exploration of forums. It offers search speed much superior to the one at the mailing list site, and is a prominent time-saver. I also believe many people find the "How-To" section useful. Perhaps if several people volunteered for helping you with administration, the site could live? How about doing something similar to how jungerl.sourceforge.net is managed - having several admins covering site updates... Regards, Serge Torbj?rn T?rnkvist wrote: > Hi all, > > Just want to inform you that the trapexit.org forums has been hacked. > I have therefore shutdown that part of the site. > > I'm not sure how popular the forums was (perhaps I should > analyse the logs...). I know there was some 70 registered users, > which indicates a low interest (or a low user base... ;-) > > I've been running trapexit.org for almost a year now (uptime > is 313 days) and I wonder how useful it has been for people. > Should trapexit.org continue to live, or should I shut it down > completely ? > > Anyway, I don't think I will have the time to run it alone. So if it > is going to continue to live I will need help from a couple of > volunteers. I got some ideas on how to improve the site but > I don't have the time to do it alone. > > Cheers, Tobbe > > > > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From casper2000a@REDACTED Tue Jan 10 08:54:30 2006 From: casper2000a@REDACTED (Eranga Udesh) Date: Tue, 10 Jan 2006 13:54:30 +0600 Subject: ans1c and Camel In-Reply-To: <43C2EEFA.5050904@hq.idt.net> Message-ID: <20060110072726.DB3D54000A4@mail.omnibis.com> Hi, Does anybody have experience compiling Camel Ph 3 (ITU-T Q.1238) using Erlang ASN1C? Thanks in advance, - Eranga From matthias@REDACTED Tue Jan 10 11:44:22 2006 From: matthias@REDACTED (Matthias Lang) Date: Tue, 10 Jan 2006 11:44:22 +0100 Subject: trapexit.org hacked and shutdown In-Reply-To: <43C2EEFA.5050904@hq.idt.net> References: <43BF96B6.2030704@tornkvist.org> <43C2EEFA.5050904@hq.idt.net> Message-ID: <17347.36870.338456.838012@antilipe.corelatus.se> Serge Aleynikov writes: > It offers search speed much superior to the one at the > mailing list site The search script on erlang.org sucks. I didn't know about the trapexit one, I generally use either google (prefix the search with site:www.erlang.org/ml-archive), or, better still, the one at gmane: http://news.gmane.org/gmane.comp.lang.erlang.general Matthias From casper2000a@REDACTED Tue Jan 10 12:11:47 2006 From: casper2000a@REDACTED (Eranga Udesh) Date: Tue, 10 Jan 2006 17:11:47 +0600 Subject: "COMPONENTS OF " asn In-Reply-To: <43C38522.5060609@ericsson.com> Message-ID: <20060110104444.2DE5A400017@mail.omnibis.com> Hi Bertil, Thanks for the reply. I will see to change the spec and do a workaround. Anyway I am looking forward for a better solution/advice from you, once you find some time to go through that. Thanks, - Eranga -----Original Message----- From: Bertil Karlsson [mailto:bertil.karlsson@REDACTED] Sent: Tuesday, January 10, 2006 3:58 PM To: Eranga Udesh Cc: erlang-questions@REDACTED Subject: Re: "COMPONENTS OF " asn Hi, COMPONENTS OF is supported, but I think the embedded structure containes some uncovered functionality or it may reveal a bug. Since you have sent me your specs in a another mail I can track the error and will look into it later on. /Bertil Eranga Udesh wrote: >Hi, > >I can't compile below definition. > >SIGNATURE{ToBeSigned} ::= SEQUENCE { > algorithmIdentifier AlgorithmIdentifier, > encrypted ENCRYPTED-HASH{ToBeSigned} >} > >SIGNED{ToBeSigned} ::= SEQUENCE { > toBeSigned ToBeSigned, > COMPONENTS OF SIGNATURE{ToBeSigned} >} > >It gives the error, >{asn1, >{illegal_COMPONENTS_OF, >{undefined, >{pt,{'Externaltypereference', >263, >'AuthenticationFramework', >'SIGNATURE'}, >[{type, >[], >{'Externaltypereference', >263, >'AuthenticationFramework', >'ToBeSigned'}, >[], >[], >no}]}}}} > >Error is "COMPONENTS OF" sub-type. Is it a non-supported feature in the >Erlang ASN.1 compiler? Is there any workaround ways? > >Please advice soon. > >Thanks, >- Eranga > > > > From richardc@REDACTED Tue Jan 10 12:17:40 2006 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 10 Jan 2006 12:17:40 +0100 Subject: try... after and clean-up In-Reply-To: <8A1752A4-C2D7-4636-BCA5-42FCBC8B0583@gmail.com> References: <6DA42879-4C97-41EF-8E20-D5657EF2B843@gmail.com> <8A1752A4-C2D7-4636-BCA5-42FCBC8B0583@gmail.com> Message-ID: <43C397D4.3020101@csd.uu.se> Hi! The basic pattern should be something like this, for each individual resource: {ok, Handle} = allocate_resource(), try use_resource(Handle) after free_resource(Handle) end That is, you make sure that the 'try...after...end' is entered *if and only if* the resource has been allocated. (If the allocation failed, there is nothing to clean up.) It must not be possible to get an exception _after_ the resource has been successfully allocated, which prevents the free_resource() from being executed (e.g., if the allocate_resource() call above would return {true, Handle} rather than {ok, Handle}). If that happens, you won't even know _how_ to refer to the resource, since the handle will not be bound to any variable in scope when that exception is finally caught (somewhere else). Hence, don't put any unnecessary code between the allocation and the start of the 'try'. Assuming this is clear, the rest is easy. Preferably, you lift out each use_resource() section to a separate function rather than nesting, and maybe also put each allocate-use-free block like the above in separate functions. You could even abstract out the use-body, to get that functional feeling: with_x(F) -> {ok, R} = allocate_x(), try F(R) after free_x(R) end. ... with_x(fun (R) -> use_x(R, OtherArgs) end) ... A less ambitious rewrite of your code could look as follows: run(Args) when is_record(Args, bot_args) -> Bot = #bot { poker_server = Args#bot_args.host, dispatchers = [{"script", Args#bot_args.script, Args#bot_args.script_args }], log = Args#bot_args.log, ignored = Args#bot_args.ignored, lobby_bot = Args#bot_args.lobby_bot }, Bot1 = notrace(Bot, [cl_ssl_handshake_data, srv_ssl_handshake_data, srv_update_hint_text, cl_handshake, srv_handshake, srv_news]), try UtilSock = util:connect_script_server(), try Bot2 = Bot1#bot { util_sock = UtilSock }, Bot3 = util:connect(Bot2, [lobby_con_wrap(), lobby_handle_wrap(), connected]), % event to post try run(Bot3, handle(Bot3, handshake)) after %% cleanup Bot3 end after %% cleanup UtilSock end, after %% cleanup Bot1 end. Good luck! /Richard From dietmar@REDACTED Tue Jan 10 12:36:14 2006 From: dietmar@REDACTED (Dietmar Schaefer) Date: Tue, 10 Jan 2006 12:36:14 +0100 Subject: how to use supervisor:start_child? Message-ID: <43C39C2E.6020708@ast.dfs.de> Hi ! I can't get this to work ! I have a supervisor: init([]) -> case whereis(sup) of undefined -> %% register only once register(sup, self()); _ -> ok end, with a few ChildSpec: AChild = {xclock,{xclock,start_link,[]}, permanent,2000,worker,[xclock]}, StopChild = {stop_wrp,{stop_wrp,start_link,[]}, permanent,2000,worker,[stop_wrp]}, SimpleSup = {dynamic, {dynamic, start_link, []}, transient, 2000, worker, [dynamic]}, {ok,{{one_for_one,1,1}, [StopChild]}}. I I try to start_child supervisor:start_child(sup,[{dynamic, {dynamic, start_link, []},transient, 2000, worker, [dynamic]}]). I get {error,{invalid_child_spec,[{dynamic,{dynamic,start_link,[]}, transient, 2000, worker, [dynamic]}]}} How can this be? ( it should be valid because I can use it in the return value of supervisor:init) ok,{{one_for_one,1,1}, [SimpeSup]}}. Please give me a hint ! regards Dietmar From Lennart.Ohman@REDACTED Tue Jan 10 14:18:04 2006 From: Lennart.Ohman@REDACTED (=?iso-8859-1?Q?Lennart_=D6hman?=) Date: Tue, 10 Jan 2006 14:18:04 +0100 Subject: SV: how to use supervisor:start_child? References: <43C39C2E.6020708@ast.dfs.de> Message-ID: Hi Dietmar, first it is normally not necessary to register the supervisor your self in the init function. That is taken care of providing the supervisor:start_link function with the SupName parameter. Second, critisism against cryptic error return-values are many times well in place. Here however I believe the return-value you experience, invalid_child_spec, to be very accurate. If you look in the documentation for supervisor: http://www.erlang.se/doc/doc-5.4.12/lib/stdlib-1.13.11/doc/html/index.html you will find that ChildSpec shall be a child_spec() and not a list of child_spec(), as is required in the childrenspecification of a supervisor init return-value. This from the logical point that you are not starting an arbritray amount of children but just one. Good luck and happy hacking, /Lennart start_child(SupRef, ChildSpec) -> Result Types: SupRef = Name | {Name,Node} | {global,Name} | pid() Name = Node = atom() ChildSpec = child_spec() | [term()] Result = {ok,Child} | {ok,Child,Info} | {error,Error} Child = pid() | undefined Info = term() Error = already_present | {already_started,Child} | term() Dynamically adds a child specification to the supervisor SupRef which starts the corresponding child process. SupRef can be: * the pid, * Name, if the supervisor is locally registered, * {Name,Node}, if the supervisor is locally registered at another node, or * {global,Name}, if the supervisor is globally registered. ChildSpec should be a valid child specification (unless the supervisor is a simple_one_for_one supervisor, see below). The child process will be started by using the start function as defined in the child specification. ------------------------------------------------------------- Lennart Ohman phone : +46-8-587 623 27 Sj?land & Thyselius Telecom AB cellular: +46-70-552 6735 Sehlstedtsgatan 6 fax : +46-8-667 8230 SE-115 28 STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED ________________________________ Fr?n: owner-erlang-questions@REDACTED genom Dietmar Schaefer Skickat: ti 2006-01-10 12:36 Till: Erlang Questions ?mne: how to use supervisor:start_child? Hi ! I can't get this to work ! I have a supervisor: init([]) -> case whereis(sup) of undefined -> %% register only once register(sup, self()); _ -> ok end, with a few ChildSpec: AChild = {xclock,{xclock,start_link,[]}, permanent,2000,worker,[xclock]}, StopChild = {stop_wrp,{stop_wrp,start_link,[]}, permanent,2000,worker,[stop_wrp]}, SimpleSup = {dynamic, {dynamic, start_link, []}, transient, 2000, worker, [dynamic]}, {ok,{{one_for_one,1,1}, [StopChild]}}. I I try to start_child supervisor:start_child(sup,[{dynamic, {dynamic, start_link, []},transient, 2000, worker, [dynamic]}]). I get {error,{invalid_child_spec,[{dynamic,{dynamic,start_link,[]}, transient, 2000, worker, [dynamic]}]}} How can this be? ( it should be valid because I can use it in the return value of supervisor:init) ok,{{one_for_one,1,1}, [SimpeSup]}}. Please give me a hint ! regards Dietmar -------------- next part -------------- An HTML attachment was scrubbed... URL: From mickael.remond@REDACTED Tue Jan 10 14:31:15 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Tue, 10 Jan 2006 14:31:15 +0100 Subject: how to use supervisor:start_child? In-Reply-To: <43C39C2E.6020708@ast.dfs.de> References: <43C39C2E.6020708@ast.dfs.de> Message-ID: <20060110133115.GB16084@memphis.ilius.fr> * Dietmar Schaefer [2006-01-10 12:36:14 +0100]: > Hi ! > > I can't get this to work ! > dddd> I have a supervisor: > > init([]) -> > > case whereis(sup) of > undefined -> %% register only once > register(sup, self()); > _ -> ok > end, > > with a few ChildSpec: > AChild = {xclock,{xclock,start_link,[]}, > permanent,2000,worker,[xclock]}, > > StopChild = {stop_wrp,{stop_wrp,start_link,[]}, > permanent,2000,worker,[stop_wrp]}, > > SimpleSup = {dynamic, {dynamic, start_link, []}, > transient, 2000, worker, [dynamic]}, > > > {ok,{{one_for_one,1,1}, [StopChild]}}. > > > I I try to start_child > > supervisor:start_child(sup,[{dynamic, {dynamic, start_link, > []},transient, 2000, worker, [dynamic]}]). > > I get > > {error,{invalid_child_spec,[{dynamic,{dynamic,start_link,[]}, > transient, > 2000, > worker, > [dynamic]}]}} > > How can this be? > ( it should be valid because I can use it in the return value of > supervisor:init) > ok,{{one_for_one,1,1}, [SimpeSup]}}. Maybe you should try removing the surrounding list around the child spec: With the surrounding list it tries to consider the list as an extra parameter for the Child spec description defined at the start of the supervisor. The doc states: start_child(SupRef, ChildSpec) -> Result Types SupRef = Name | {Name, Node} | {global, Name} | pid() Name = Node = atom() ChildSpec = child_spec() | [term()] Result = {ok, Child} | {ok, Child, Info} | {error, Error} Child = pid() | undefined Info = term() Error = already_present | {already_started, Child} | term() So maybe using supervisor:start_child(sup,{dynamic, {dynamic, start_link, []},transient, 2000, worker, [dynamic]}). can help. It might not be the only problem however. I hope this helps, -- Micka?l R?mond http://www.process-one.net/ From surindar.shanthi@REDACTED Tue Jan 10 15:46:30 2006 From: surindar.shanthi@REDACTED (Surindar Sivanesan) Date: Tue, 10 Jan 2006 20:16:30 +0530 Subject: Supervisor model Message-ID: <42ea5fb60601100646l7719913cs5451c250d99a1cac@mail.gmail.com> While starting the supervisor,if i call the supervisor, it is working well. But when i spawn the same supervisor, the supervisor dies. What is the reason for this contradiction between calling and spawning -- with regards, S.Surindar -------------- next part -------------- An HTML attachment was scrubbed... URL: From bmk@REDACTED Tue Jan 10 16:46:50 2006 From: bmk@REDACTED (Micael Karlberg) Date: Tue, 10 Jan 2006 16:46:50 +0100 Subject: Server maintainance Message-ID: <43C3D6EA.2010702@erix.ericsson.se> Hi, We will performe server maintainance (www.erlang.org, ftp and mailing lists) on thursday, 2006-01-12. Sorry for the inconvenience. Regards, /BMK From vances@REDACTED Tue Jan 10 19:10:38 2006 From: vances@REDACTED (Vance Shipley) Date: Tue, 10 Jan 2006 13:10:38 -0500 Subject: Building HIPE on Solaris 10 Message-ID: <20060110181038.GD56361@frogman.motivity.ca> Folks, Has anyone had any success building R10B-9 on Solaris 10? My build is failing here: gcc -o /usr/local/src/otp_src_R10B-9/bin/sparc-sun-solaris2.10/beam.hybrid \ [...] -ldl -lm -lsocket -lnsl -lcurses -L../lib/internal/sparc-sun-solaris2.10 \ /usr/local/src/otp_src_R10B-9/erts/obj/sparc-sun-solaris2.10/libz.a \ -lethread -lpthread ld: fatal: relocation error: R_SPARC_32: file /usr/local/src/otp_src_R10B-9/erts/obj.hybrid.beam/sparc-sun-solaris2.10/hipe_sparc_glue.o: symbol : offset 0xfd61a86f is non-aligned I have a stock Solaris 10 installation with the Software Companion CD installed. The only change I had to make was to create a /usr/local/bin/m4 link to /usr/sfw/gm4 so that it used the GNU m4 instead of the Sun version in /usr/ccs/bin/m4. [It would be nice if erts/emulator/configure.in had a test to find and use a GNU m4 instead of having erts/emulator/Makfile.in hard coded to 'm4'.] $ m4 --version GNU m4 1.4.2 Also I noticed this: *** Omitted build of shared heap emulator *** since target is sparc-sun-solaris2.10 It goes on to build a "hybrid" emulator. Am I loosing out on something here? -Vance From w.a.de.jong@REDACTED Tue Jan 10 21:33:53 2006 From: w.a.de.jong@REDACTED (Willem de Jong) Date: Tue, 10 Jan 2006 21:33:53 +0100 Subject: XML Schema support Message-ID: <407d9ef80601101233r5c78d1e7p4702b79cf0c54ca1@mail.gmail.com> Hi, I have written a set of functions to deal with XML Schemas in Erlang. First you compile an XSD, and after that you can parse an XML document that conforms to the XSD. The result is an Erlang structure. I'll tell a little bit more about the functionality below, but the main point of this mail is to get some advice/input. I have no experience with open source software development, and I have no experience with Erlang besides these modules. My plan was to write a small program to find out a bit more about Erlang, but it got out of hand somewhat. As I said, I would welcome your feedback: - do you think this might be of use - if so, what would I need to make sure that it can really be used? - what would be the best way to publish it? The idea is probably best explained by an example. I am sorry if it is a bit long - XML documents in general are sort of long, and this is certainly true for XSDs. If XSD = and XML = Alice Smith 123 Maple Street Robert Smith 8 Oak Avenue Hurry, my lawn is going wild Then executing: Model = erlSom:compile(XSD, {"b", "http://www.example.com/PO1"}), erlSom:parse(XML, Model). Will give you: {'b:PurchaseOrderType',"1999-10-20", {'b:USAddress',"US","Alice Smith","123 Maple Street"}, {'b:USAddress',"US","Robert Smith","8 Oak Avenue"}, "Hurry, my lawn is going wild"} The parser supports the most essential elements of the XML Schema spec, such as: element, simple type, complex type, namespaces, attributes, minOccurs, maxOccurs, choice, element groups and 'any' (in a limited sense: the elements are simply ignored). There are also many things it doesn't support right now. Most important is probably that it doesn't support 'import': the XSD has to be in one file (and can, therfore, cover only 1 namespace). Besides that, there is also no support for: all, mixed, attributeGroup, facets, redefine, extension, restriction etc. Regards, Willem From klacke@REDACTED Tue Jan 10 23:33:40 2006 From: klacke@REDACTED (Claes Wikstrom) Date: Tue, 10 Jan 2006 23:33:40 +0100 Subject: XML Schema support In-Reply-To: <407d9ef80601101233r5c78d1e7p4702b79cf0c54ca1@mail.gmail.com> References: <407d9ef80601101233r5c78d1e7p4702b79cf0c54ca1@mail.gmail.com> Message-ID: <43C43644.9040501@hyber.org> Willem de Jong wrote: > > As I said, I would welcome your feedback: > - do you think this might be of use Absolutely, excellent tool!! and you've come a loong way. Maybe I think that the complexTypes should be records and a .hrl file with the appropriate record defs shpuld be generated. As you yourself wrote, XML documents tend to be large and anything which helps the programmer to visually understand the XML data is good. > - if so, what would I need to make sure that it can really be used? Publish it, document it, maintain it .... I know it's tedious. > - what would be the best way to publish it? Jungerl is probably the best. It's a common CVS repository at sourceforge for various bits and pieces of erlang code. 1. Get a soureforge account at http://sourceforge.net 2. Mail us your sourceforge unix id and you'll get an account so you can add your code in the Jungle. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From xlcr@REDACTED Wed Jan 11 07:21:15 2006 From: xlcr@REDACTED (Nick Linker) Date: Wed, 11 Jan 2006 12:21:15 +0600 Subject: Reply-To field in mail Message-ID: <43C4A3DB.9050905@mail.ru> Good day. There is a way to make the "erlang-questions" mailing list more convenient just by adding "Reply-To" field in the message header for the messages coming from the mailing list. After that one can just press the "Reply" button in his favourite mail client without having to fill the necessary fields manually. (As for me, I often reply to the sender directly instead of replying to the mailing list.) What do the Subscribers think about such feature? Best regards, Nick Linker. From irmatov@REDACTED Wed Jan 11 07:44:36 2006 From: irmatov@REDACTED (Timur Irmatov) Date: Wed, 11 Jan 2006 11:44:36 +0500 Subject: Reply-To field in mail In-Reply-To: <43C4A3DB.9050905@mail.ru> References: <43C4A3DB.9050905@mail.ru> Message-ID: <241d382f0601102244w3d1f219cqebf644c0773e97eb@mail.gmail.com> On 1/11/06, Nick Linker wrote: > Good day. > > There is a way to make the "erlang-questions" mailing list more > convenient just by adding "Reply-To" field in the message header for the > messages coming from the mailing list. After that one can just press the > "Reply" button in his favourite mail client without having to fill the > necessary fields manually. (As for me, I often reply to the sender > directly instead of replying to the mailing list.) > > What do the Subscribers think about such feature? http://www.unicom.com/pw/reply-to-harmful.html -- Timur Irmatov, xmpp:thor@REDACTED From erlang@REDACTED Wed Jan 11 08:15:19 2006 From: erlang@REDACTED (Michael McDaniel) Date: Tue, 10 Jan 2006 23:15:19 -0800 Subject: Reply-To field in mail In-Reply-To: <241d382f0601102244w3d1f219cqebf644c0773e97eb@mail.gmail.com> References: <43C4A3DB.9050905@mail.ru> <241d382f0601102244w3d1f219cqebf644c0773e97eb@mail.gmail.com> Message-ID: <20060111071519.GG17397@delora.autosys.us> On Wed, Jan 11, 2006 at 11:44:36AM +0500, Timur Irmatov wrote: > On 1/11/06, Nick Linker wrote: > > Good day. > > > > There is a way to make the "erlang-questions" mailing list more > > convenient just by adding "Reply-To" field in the message header for the > > messages coming from the mailing list. After that one can just press the > > "Reply" button in his favourite mail client without having to fill the > > necessary fields manually. (As for me, I often reply to the sender > > directly instead of replying to the mailing list.) > > > > What do the Subscribers think about such feature? > > http://www.unicom.com/pw/reply-to-harmful.html > > -- > Timur Irmatov, xmpp:thor@REDACTED ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ However, in some mailers, pressing g)roup reply (as described in unicom link above) sends a copy to the original author *and* the list. So the original author gets two copies unless the person replying drops the extra address. I find that annoying, though not an overriding reason to munge headers. The solution, yet again, is a mailer that handles mailing lists, such as mutt. In mutt I press L to reply only to the list. ~Michael From dmitriid@REDACTED Wed Jan 11 09:30:08 2006 From: dmitriid@REDACTED (Dmitrii Dimandt) Date: Wed, 11 Jan 2006 10:30:08 +0200 Subject: Reply-To field in mail In-Reply-To: <241d382f0601102244w3d1f219cqebf644c0773e97eb@mail.gmail.com> References: <43C4A3DB.9050905@mail.ru> <241d382f0601102244w3d1f219cqebf644c0773e97eb@mail.gmail.com> Message-ID: In Gmail, which conviniently creates threads based on mail subjects, i have to make a conscious effort and press Reply to All if I want my reply to appear on the list. Not a single other group I'm subscribed to uses the same "feature" On 1/11/06, Timur Irmatov wrote: > On 1/11/06, Nick Linker wrote: > > Good day. > > > > There is a way to make the "erlang-questions" mailing list more > > convenient just by adding "Reply-To" field in the message header for the > > messages coming from the mailing list. After that one can just press the > > "Reply" button in his favourite mail client without having to fill the > > necessary fields manually. (As for me, I often reply to the sender > > directly instead of replying to the mailing list.) > > > > What do the Subscribers think about such feature? > > http://www.unicom.com/pw/reply-to-harmful.html > > > -- > Timur Irmatov, xmpp:thor@REDACTED > From mbj@REDACTED Wed Jan 11 10:41:17 2006 From: mbj@REDACTED (Martin Bjorklund) Date: Wed, 11 Jan 2006 10:41:17 +0100 (CET) Subject: XML Schema support In-Reply-To: <407d9ef80601101233r5c78d1e7p4702b79cf0c54ca1@mail.gmail.com> References: <407d9ef80601101233r5c78d1e7p4702b79cf0c54ca1@mail.gmail.com> Message-ID: <20060111.104117.104047421.mbj@tail-f.com> Willem de Jong wrote: > As I said, I would welcome your feedback: > - do you think this might be of use Yes! > Then executing: > Model = erlSom:compile(XSD, {"b", "http://www.example.com/PO1"}), > erlSom:parse(XML, Model). > > Will give you: > {'b:PurchaseOrderType',"1999-10-20", > {'b:USAddress',"US","Alice Smith","123 Maple Street"}, > {'b:USAddress',"US","Robert Smith","8 Oak Avenue"}, > "Hurry, my lawn is going wild"} Just one small suggestion - instead of representing types as atoms :, I suggest you represent it as a tuple {NameSpace,Name}. NameSpace could very well be the full URN as an atom. This makes it much easier for an application to actually use the output and match on different elements. Thus instead of 'b:USAddress', you would get {'http://www.example.com/PO1','USAddress'}. Do you generate reccord definitions also as part of the compilation? /martin From vlad_dumitrescu@REDACTED Wed Jan 11 10:55:30 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 11 Jan 2006 10:55:30 +0100 Subject: [ANN] Erlide 0.3.6.1 Message-ID: I apologize for any inconvenience, the released 0.3.6 files from yesterday contained a build error. This is now corrected. regards, Vlad From mikpe@REDACTED Wed Jan 11 12:09:21 2006 From: mikpe@REDACTED (Mikael Pettersson) Date: Wed, 11 Jan 2006 12:09:21 +0100 Subject: Building HIPE on Solaris 10 In-Reply-To: <20060110181038.GD56361@frogman.motivity.ca> References: <20060110181038.GD56361@frogman.motivity.ca> Message-ID: <17348.59233.885893.535017@alkaid.it.uu.se> Vance Shipley writes: > Folks, > > Has anyone had any success building R10B-9 on Solaris 10? > > My build is failing here: > > gcc -o /usr/local/src/otp_src_R10B-9/bin/sparc-sun-solaris2.10/beam.hybrid \ > [...] > -ldl -lm -lsocket -lnsl -lcurses -L../lib/internal/sparc-sun-solaris2.10 \ > /usr/local/src/otp_src_R10B-9/erts/obj/sparc-sun-solaris2.10/libz.a \ > -lethread -lpthread > ld: fatal: relocation error: R_SPARC_32: file /usr/local/src/otp_src_R10B-9/erts/obj.hybrid.beam/sparc-sun-solaris2.10/hipe_sparc_glue.o: symbol : offset 0xfd61a86f is non-aligned We don't have Solaris 10 over here, but I remember seeing a similar error on Solaris 9. It occurred because some sysadmin had seen fit to install a gcc toolchain configured to use the GNU assembler but the Solaris linker, and it totally broke. My SPARC/Solaris9 gcc uses both the Solaris assembler and linker, and it works fine. /Mikael From joelr1@REDACTED Wed Jan 11 13:10:59 2006 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 11 Jan 2006 12:10:59 +0000 Subject: Bayesian and neural networks Message-ID: Folks, Has anyone done Bayesian networks in Erlang? What about neural networks? Thanks, Joel -- http://wagerlabs.com/ From Waldemar.Rachwal@REDACTED Wed Jan 11 14:52:53 2006 From: Waldemar.Rachwal@REDACTED (Rachwal Waldemar-AWR001) Date: Wed, 11 Jan 2006 13:52:53 -0000 Subject: Problem with creating a new row in SNMP table Message-ID: <08F651DD6835A74DAFA80915F0150CA62A510B@zuk35exm64.ds.mot.com> I have stuck at the attempt of creating a new row in my SNMP table. I'm giving 'inconsistentValue' on column (in the MIB : btsRowStatus = { btsEntry 114 }) which is of the RowStatus type. This is the first message I send to the agent, so the table should be empty. The value of btsRowStatus in SET-REQUEST is 4 which is createAndGo. The first and the last two varbinds in the PDU are simple variables (not table columns), but it should not matter, I assume (these vars are additional correlation tags and journal number required by the application). ACCESS rights of all of the columns, including btsRowStatus, are "cr-" create-read, so they should be okay? The agent chokes while applying table_func with 'is_set_ok': apply: snmp_generic,table_func,[is_set_ok, [466944,0,1], [{1,0}, {2,0}, {3,"4000M"}, ... {114,4}, <--- btsRowStatus, createAndGo(4), 3rd varbind {118,0}, {123,0}], {btsTable,volatile}] ... and the log after "apply:" ** SNMP A-SYMBOLIC-STORE LOG: table info: btsTable ** SNMP A-LOCAL-DB LOG: table btsTable get element: Indexes: [466944,0,1] Col: 1 ** SNMP A-SYMBOLIC-STORE LOG: table info: btsTable ** SNMP MASTER-AGENT-worker(<0.67.0>) SETLIB LOG: returned: {inconsistentValue,114} ** SNMP A-NET-IF LOG: reply pdu: {pdu,'get-response',5,inconsistentValue,3,[{varbind,[1,3,6,1,4,1,161,205 2,1,44,1,5,0],'Unsigned32',2147483653,1},{varbind,[1,3,6,1,4,1,161,2052, 1,44,1,6,0],'Unsigned32',2147483658,2},{varbind,[1,3,6,1,4,1,161,99,101, 1,3,1,1,1,114,466944,0,1],'INTEGER',4,3}... ** SNMP A-LOCAL-DB LOG: variable get: snmpEngineMaxMessageSize ** SNMP A-NET-IF INFO: time in agent: 261035 mysec 3> 3> 3> The full logs, from agent/erlang and manager/perl are attached to this mail. If MIBs are required to look at I can send them after some slimming as they are proprietary stuff :( Could anybody help? I have no idea what to do next :( BTW, I'm also curious what is the best way to tackle such sort of problems... (a big land of unknown code but you're determined to utilize it) Debugging, tracing? I read about, but have never used. Thanks, WR. -------------- next part -------------- A non-text attachment was scrubbed... Name: inconsistentValue.zip Type: application/x-zip-compressed Size: 4979 bytes Desc: inconsistentValue.zip URL: From tobbe@REDACTED Wed Jan 11 16:23:43 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Wed, 11 Jan 2006 16:23:43 +0100 Subject: ODBC/MySQL performance Message-ID: Hi, I just wonder if anyone has any experience of the performance of running the Erlang-ODBC interface towards a MySql server ? Is it good enough or is there a need for a faster driver ? Cheers, Tobbe From serge@REDACTED Wed Jan 11 16:46:43 2006 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 11 Jan 2006 10:46:43 -0500 Subject: LAMA: New application added to jungerl Message-ID: <43C52863.5010401@hq.idt.net> Folks, I added a new application in jungerl, called LAMA - Log and Alarm Management Application. I wrote it a couple of years ago, and now use in pretty much every system. I thought others could find it useful. It comes with edoc-generated documentation in doc/*.html. LAMA offers the following features: * Event handler logging of all error_logger's standard reports to syslog * Setting and clearing alarms that are logged to syslog * Defining map between alarms and SNMP traps, so that when an alarm is set/cleared, it will cause an associated SNMP trap to be sent to a configured SNMP manager, logged to syslog, and displayed on screen through a standard error_logger's report. * Standard macros to report errors of various priorities * Functions to process application configuration options * A module tracer for function call tracing Regards, Serge -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From mickael.remond@REDACTED Wed Jan 11 19:49:04 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Wed, 11 Jan 2006 19:49:04 +0100 Subject: ODBC/MySQL performance In-Reply-To: References: Message-ID: <20060111184904.GB21219@memphis.ilius.fr> * Torbj?rn T?rnkvist [2006-01-11 16:23:43 +0100]: > Hi, > > I just wonder if anyone has any experience of the performance > of running the Erlang-ODBC interface towards a MySql server ? I have made tests and the performance of a native driver are way ahead. > Is it good enough or is there a need for a faster driver ? We have modified the MySQL driver version provided by Yxa. The modified version will hopefully be integrated into the main Yxa code base if this version works with a reasonnable scope of MySQL versions. The new version can be downloaded for testing and feedback from: http://support.process-one.net/doc/display/CONTRIBS/Yxa Tell us if this work for you. There is a pending modification for transaction support with MySQL connection pooling that I do not have yet finished. Regarding performance, we think it is worth it. -- Micka?l R?mond http://www.process-one.net/ From rprice@REDACTED Wed Jan 11 20:29:13 2006 From: rprice@REDACTED (Roger Price) Date: Wed, 11 Jan 2006 20:29:13 +0100 (CET) Subject: Escapes within quoted atoms Message-ID: I've been reading chapter 2.1.2 in the Erlang book which talks about Atoms, and I have a question: \^A .. \^Z The given meaning is "control A to control Z (i.e. 0..26)" At first I thought this should read 0..25, but then maybe it's the Swedish alphabet 0..28. I checked the Swedish alphabet theory with the atom '\^?' (? is Latin capital A with diaeresis) in Eshell V5.4.9 and got an unexpected response: 5> '\^\304' . '\004' It is implicit in chapter 2.1.2 that \x => x if x has no other meaning, so why don't I see '\^?' => '^?'. Roger From tobbe@REDACTED Wed Jan 11 22:38:47 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Wed, 11 Jan 2006 22:38:47 +0100 Subject: LAMA: New application added to jungerl In-Reply-To: <43C52863.5010401@hq.idt.net> References: <43C52863.5010401@hq.idt.net> Message-ID: Very nice! If you you have the time, then I suggest that you also make an erlmerge package. It is very easy (basically you just add a Makefile target, build the package and upload it to trapexit.org). A description exist among the HowTo's. Also, if you check in your generated documentation in Jungerl, then it will automatically be available to read similar to (for example): http://www.trapexit.org/uc/jungerl/lib/yfront/doc/ Cheers, Tobbe Serge Aleynikov wrote: > Folks, > > I added a new application in jungerl, called LAMA - Log and Alarm > Management Application. I wrote it a couple of years ago, and now use > in pretty much every system. I thought others could find it useful. It > comes with edoc-generated documentation in doc/*.html. > > LAMA offers the following features: > > * Event handler logging of all error_logger's standard reports to syslog > * Setting and clearing alarms that are logged to syslog > * Defining map between alarms and SNMP traps, so that when an alarm is > set/cleared, it will cause an associated SNMP trap to be sent to a > configured SNMP manager, logged to syslog, and displayed on screen > through a standard error_logger's report. > * Standard macros to report errors of various priorities > * Functions to process application configuration options > * A module tracer for function call tracing > > Regards, > > Serge > From joelr1@REDACTED Wed Jan 11 23:52:07 2006 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 11 Jan 2006 22:52:07 +0000 Subject: Bayesian Erlang: Help with translation from Prolog Message-ID: Folks, I'm looking at http://www.ainewsletter.com/newsletters/ aix_0304.htm#code_corner and trying to translate the following from Prolog. Would someone kindly lend me a hand? Thanks, Joel P.S. First we represent the basic probability facts as Prolog facts: p(patient(cancer), 0.1). p(patient(smoker), 0.5). We then represent the conditional probabilities, using a ^ operator: cp(patient(smoker) ^ patient(cancer), 0.8). Next we write query rules that can be used to find various probabilities. There are three rules, covering the case where the probability is known, the conditional probability is known, or we can compute the conditional probability using Bayes theorem. Words beginning with upper case letters are variables in Prolog. Note that the third rule recursively calls itself to get the individual probabilities. getp(A,P) :- p(A,P), !. getp(A^B, P) :- cp(A^B, P), !. getp(A^B, P) :- cp(B^A, Pba), getp(A, Pa), getp(B, Pb), P is Pba * Pa / Pb. We now have a simple system for representing and querying knowledge expressed as probabilities. We can consult these facts and rules into a Prolog listener and try it: ?- getp(patient(cancer), P). P = 0.1 ?- getp(patient(smoker)^patient(cancer), P). P = 0.8 ?- getp(patient(cancer)^patient(smoker), P). P = 0.16 -- http://wagerlabs.com/ From joelr1@REDACTED Thu Jan 12 00:29:21 2006 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 11 Jan 2006 23:29:21 +0000 Subject: Escape from Zurg Message-ID: <53A09501-FA06-4BA4-BD33-D583F698BBAB@gmail.com> Here's another Prolog riddle from http://web.engr.oregonstate.edu/ ~erwig/zurg/. Please help me translate it! Thanks, Joel P.S. /* The Zurg Riddle */ time(buzz,5). time(woody,10). time(rex,20). time(hamm,25). toys([buzz,hamm,rex,woody]). cost([],0) :- !. cost([X|L],C) :- time(X,S), cost(L,D), C is max(S,D). split(L,[X,Y],M) :- member(X,L), member(Y,L), compare(<,X,Y), subtract(L,[X,Y],M). move(st(l,L1),st(r,L2),r(M),D) :- split(L1,M,L2), cost(M,D). move(st(r,L1),st(l,L2),l(X),D) :- toys(T), subtract(T,L1,R), member(X,R), merge_set([X],L1,L2), time(X,D). trans(st(r,[]),st(r,[]),[],0). trans(S,U,L,D) :- move(S,T,M,X), trans(T,U,N,Y), append([M],N,L), D is X + Y. cross(M,D) :- toys(T), trans(st(l,T),st(r,[]),M,D0), D0= References: Message-ID: This was an easy one. I'm wondering if backtracking can be implemented by catching pattern-matching exceptions, though. What do you think? -module(p). -compile([export_all]). p({patient, cancer}) -> 0.1; p({patient, smoker}) -> 0.5. cp({patient, smoker}, {patient, cancer}) -> 0.8; cp(_, _) -> none. getp({A, B}) when is_tuple(A), is_tuple(B) -> case cp(A, B) of none -> Pba = cp(B, A), Pa = getp(A), Pb = getp(B), Pba * Pa / Pb; X -> X end; getp(A) -> p(A). On Jan 11, 2006, at 10:52 PM, Joel Reymont wrote: > Folks, > > I'm looking at http://www.ainewsletter.com/newsletters/ > aix_0304.htm#code_corner and trying to translate the following from > Prolog. Would someone kindly lend me a hand? > > Thanks, Joel > -- http://wagerlabs.com/ From rohini@REDACTED Thu Jan 12 07:45:06 2006 From: rohini@REDACTED (Rohini V) Date: Thu, 12 Jan 2006 12:15:06 +0530 Subject: FW: auth init check failed Error Message-ID: <30BFDEA66FF4D41191EB00D0B765BC6F01916A33@medha.wsspl.com> Hey, Looks like solved this issue. I just opened the "Table Visualizer", and selected snmpa_vacm Table. Found that it has a default entry {1,"restricted","","restricted",3,1}}. Along with : {1,"internet","internet","internet",3,1}, {1,"internet","internet","internet",3,1} entries. I changed the default one to {1,"restricted","restricted","restricted",3,1}}. And set command is working now. :) Can anynody let me know, why it is taking the default entry.( even though I have not specified such entry in the below conf setting ) The config files which I used are attached herewith. And my vacm.conf file looked like this : {vacmSecurityToGroup, v2c, "initial", "initial"}. {vacmSecurityToGroup, usm, "initial", "initial"}. {vacmAccess, "initial", "", v2c, noAuthNoPriv, exact, "internet", "internet", "internet"}. {vacmAccess, "initial", "", usm, authNoPriv, exact, "internet", "internet", "internet"}. {vacmAccess, "initial", "", usm, authPriv, exact, "internet", "internet", "internet"}. {vacmViewTreeFamily, "internet", [1,3,6,1], included, null}. {vacmViewTreeFamily, "restricted", [1,3,6,1], included, null}. Regards Rohini <> > -----Original Message----- > From: Rohini V > Sent: Monday, January 09, 2006 3:28 PM > To: Erlang Questions (E-mail) > Subject: auth init check failed Error > > > Hi > > I started with the SNMP part of Erlang. > > Compiled the EX1-MIB, and made get requests, which works fine. > But if I send any Set requests, I notice the following error : > > (agent@REDACTED)3> ** SNMP MASTER-AGENT DEBUG: Received PDU: > {pdu,'set-request', > 806285441, > noError, > 0, > [{varbind,[1,3,6,1,3,7,1,0],'OCTET STRING',"Martin",1}]} > from: {{127,0,0,1},5000} > (agent@REDACTED)3> ** SNMP MASTER-AGENT ACM TRACE: check access for > Pdu: {pdu,'set-request', > 806285441, > noError, > 0, > [{varbind,[1,3,6,1,3,7,1,0],'OCTET > STRING',"Martin",1}]} > > Security model: 2 > Community: public > (agent@REDACTED)3> ** SNMP MASTER-AGENT ACM TRACE: View type: write > (agent@REDACTED)3> ** SNMP MASTER-AGENT COMMUNITY-MIB TRACE: > loop_c2v_row > s -> [] valid tag for community index "public" > (agent@REDACTED)3> ** SNMP MASTER-AGENT ACM TRACE: get mib view > Security name: "initial" > Context name: [] > (agent@REDACTED)3> ** SNMP MASTER-AGENT VACM DEBUG: check that the > contex > t ([]) is known to us > (agent@REDACTED)3> ** SNMP MASTER-AGENT GENERIC TRACE: > table_get_elements > -> entry with > NameDb: {intContextTable,volatile} > RowIndex: [] > Cols: [1] > FirstOwnIndex: 1 > (agent@REDACTED)3> ** SNMP MASTER-AGENT GENERIC DEBUG: > handle_table_get - > > undefined > (agent@REDACTED)3> ** SNMP MASTER-AGENT VACM DEBUG: check that > SecModel ( > 2) and SecName ("initial") is valid > (agent@REDACTED)3> ** SNMP MASTER-AGENT GENERIC TRACE: > table_get_elements > -> entry with > NameDb: {vacmSecurityToGroupTable,persistent} > RowIndex: [2,7,105,110,105,116,105,97,108] > Cols: [3,5] > FirstOwnIndex: 1 > (agent@REDACTED)3> ** SNMP MASTER-AGENT GENERIC TRACE: > handle_table_get - > > Res: > ["initial",1] > (agent@REDACTED)3> ** SNMP MASTER-AGENT VACM DEBUG: find an access > entry > and its view name > (agent@REDACTED)3> ** SNMP MASTER-AGENT VACM TRACE: get_view_name > -> Row: > > {1,"restricted",[],"restricted",3,1} > (agent@REDACTED)3> ** SNMP MASTER-AGENT VACM TRACE: get_view_name > -> not > found when > ViewType: write > GroupName: "initial" > ContextName: [] > SecModel: 2 > SecLevel: 1 > (agent@REDACTED)3> ** SNMP MASTER-AGENT LOG: > auth init check failed: noSuchView > (agent@REDACTED)3> ** SNMP MASTER-AGENT DEBUG: > Raw error status: authorizationError > > The vacm.conf file contains : > > {vacmSecurityToGroup, v2c, "initial", "initial"}. > {vacmSecurityToGroup, usm, "initial", "initial"}. > {vacmSecurityToGroup, v1, "initial", "initial"}. > {vacmAccess, "initial", "", any, noAuthNoPriv, exact, "internet", > "internet", "internet"}. > {vacmAccess, "initial", "", usm, authNoPriv, exact, "internet", > "internet", "internet"}. > {vacmAccess, "initial", "", usm, authPriv, exact, "internet", "internet", > "internet"}. > {vacmViewTreeFamily, "internet", [1,3,6,1], included, null}. > {vacmViewTreeFamily, "restricted", [1,3,6,1], included, null}. > > Please let me know if I am missing anything. > > Regards, > Rohini > -------------- next part -------------- A non-text attachment was scrubbed... Name: snmp.rar Type: application/octet-stream Size: 5853 bytes Desc: not available URL: From dietmar@REDACTED Thu Jan 12 09:23:43 2006 From: dietmar@REDACTED (Dietmar Schaefer) Date: Thu, 12 Jan 2006 09:23:43 +0100 Subject: open_port Message-ID: <43C6120F.7050608@ast.dfs.de> Hi ! Is there a way to distinguish the exit status of an unix process started by open_port ? No matter if my process terminates because of a devide by zero or I close it -> Reason is always normal handle_info({'EXIT', Port, Reason}, Port) -> io:format("External program exited Reason=~p Port=~p~n", [Reason, Port]), {stop, shutdown, noport}; Thanks regards Dietmar From matthias@REDACTED Thu Jan 12 09:41:09 2006 From: matthias@REDACTED (Matthias Lang) Date: Thu, 12 Jan 2006 09:41:09 +0100 Subject: open_port In-Reply-To: <43C6120F.7050608@ast.dfs.de> References: <43C6120F.7050608@ast.dfs.de> Message-ID: <17350.5669.659870.150938@antilipe.corelatus.se> If you add the "exit_status" option to the call to open_port, you get exactly what you asked for: 1> erlang:open_port({spawn, "/tmp/a.out"}, [exit_status]). #Port<0.79> 2> flush(). Shell got {#Port<0.79>,{exit_status,136}} 3> erlang:open_port({spawn, "/bin/true"}, [exit_status]). #Port<0.83> 4> flush(). Shell got {#Port<0.83>,{exit_status,0}} Matthias -------------------- Dietmar Schaefer writes: > Is there a way to distinguish the exit status of an unix process started > by open_port ? > > No matter if my process terminates because of a devide by zero or I > close it -> > Reason is always normal > > > handle_info({'EXIT', Port, Reason}, Port) -> > io:format("External program exited Reason=~p Port=~p~n", > [Reason, Port]), > {stop, shutdown, noport}; From olivier@REDACTED Thu Jan 12 12:21:29 2006 From: olivier@REDACTED (olivier) Date: Thu, 12 Jan 2006 12:21:29 +0100 Subject: 2 erl_interface questions Message-ID: <43C63BB9.7010307@dolphian.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I have two questions about the C linked-in port drivers: 1. What is the difference between -lerl_interface_st -lei_st and the versions without "_st" ? 2. With R10B-9 (R10B-8 also), I use the erl_* and ei_* functions to encode/decode terms on the C side. As per the documentation, I use: /* Initialize erl_interface. * XXX erl_init seems to block indefinitly. */ erl_init_malloc(NULL, 0); But, as the comment says, erl_init() blocks when initializing the driver. A workaround we found was to replace erl_init with: erl_init_marshal(); ei_init_resolve(); and it works just fine. Any suggestion ? Thanks in advance, - -- Olivier -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDxju5pqVXaJzJYNIRAqkNAJ9pBDZhYpmXfo74bCXjFxwoSOivIgCbBelu emc4hf5VuFR2pKxx6Vq1J6w= =QMZl -----END PGP SIGNATURE----- From jahakala@REDACTED Thu Jan 12 13:48:03 2006 From: jahakala@REDACTED (Jani Hakala) Date: Thu, 12 Jan 2006 14:48:03 +0200 Subject: 2 erl_interface questions In-Reply-To: <43C63BB9.7010307@dolphian.com> (olivier@dolphian.com's message of "Thu, 12 Jan 2006 12:21:29 +0100") References: <43C63BB9.7010307@dolphian.com> Message-ID: <874q49d33w.fsf@pingviini.kortex.jyu.fi> olivier writes: > Hello, > > I have two questions about the C linked-in port drivers: > > 1. What is the difference between -lerl_interface_st -lei_st and > the versions without "_st" ? > st probably stands for 'single threaded' > 2. With R10B-9 (R10B-8 also), I use the erl_* and ei_* functions > to encode/decode terms on the C side. As per the documentation, > I use: > I have understood that erl_interface is a little bit a legacy thing and ei should be used instead. Jani Hakala -- University of Jyv?skyl?, Department of Physics email: jani.hakala@REDACTED phone: +358 14 260 2383 fax: +358 14 260 2351 From adam.aquilon@REDACTED Thu Jan 12 14:46:46 2006 From: adam.aquilon@REDACTED (Adam Aquilon) Date: Thu, 12 Jan 2006 14:46:46 +0100 Subject: xmerl: Option {prolog,stop} removed between 0.17 and 1.0.3 ? Message-ID: Does anyone know why the {prolog,stop} option was removed somewhere between xmerl-0.17 and xmerl-1.0.3 ? Is there a replacement for it? --------------- I studied the changelogs available at sowap.sourceforge.net and the ones that are part of the 1.0.3 documentation, but could only find the addition of the feature in xmerl-0.16. There was no mention of it being removed (as far as I could see). When trying to run old code against 1.0.3, I got a 'function_clause' exception in xmerl_scan:initial_state([{prolog,stop}], ). There is no clause handling the {prolog,stop} option. Thanks in advance for any info on this, Adam Aquilon From joelr1@REDACTED Thu Jan 12 16:40:26 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 12 Jan 2006 15:40:26 +0000 Subject: hipe vs native compilation Message-ID: Folks, In this example I see hipe options: 1> fact:module_info(). [{exports,[{module_info,1},{module_info,0},{start,1}]}, {imports,[]}, {attributes,[{vsn,[235774949298681110343635959375528815860]}]}, {compile,[{options,[{cwd,"/home/chaitanya/Documents/Workspace/erlang"}, {outdir,"/home/chaitanya/Documents/Workspace/ erlang"}, {hipe,[verbose]}, native]}, {version,"4.3.11"}, {time,{2005,12,26,7,40,58}}, {source,"/home/chaitanya/Documents/Workspace/erlang/ fact.erl"}]}] I created a Emakefile that reads {'*',[native]}. I compiled and now get: 1> bot:module_info(compile). [{options,[error_summary,native]}, {version,"4.3.11"}, {time,{2006,1,12,15,31,58}}, {source,"/Users/joelr/Work/Dobro/SuperScript/src/bot.erl"}] I see no references to hipe, though. Should I? I'm running on Mac OSX 10.4.4. Thanks, Joel -- http://wagerlabs.com/ From joelr1@REDACTED Thu Jan 12 17:00:00 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 12 Jan 2006 16:00:00 +0000 Subject: Funs behaving differently after native compilation Message-ID: Folks, My funs seem to behave differently when the beams are compiled to native code. Is there an explanation to this? I am passing indeed passing funs as {M, F} and then calling them as per the code below. Why does it work when the code is byte-compiled and how do I work around these errors? monitor(self(), Sock, {gen_udp, close}) monitor(Sock, Closer) -> receive {'DOWN', _, process, _, _} -> Closer(Sock); Any -> io:format("Monitor: Unknown:~n~p~n", [Any]), monitor(sock, Closer) end. My make file: {'*',[native]}. The errors that I get when my code is compiled to native: =ERROR REPORT==== 12-Jan-2006::15:42:25 === Error in process <0.31.0> with exit value: {{'EXIT',{{badfun, {randomplay,script}},[]}},[]} =ERROR REPORT==== 12-Jan-2006::15:42:26 === Error in process <0.30.0> with exit value: {{'EXIT',{{badfun, {lobbybot,script}},[]}},[]} =ERROR REPORT==== 12-Jan-2006::15:42:26 === Error in process <0.32.0> with exit value: {{badfun,{gen_udp,close}},[]} Thanks, Joel -- http://wagerlabs.com/ From joelr1@REDACTED Thu Jan 12 17:03:12 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 12 Jan 2006 16:03:12 +0000 Subject: Funs behaving differently after native compilation In-Reply-To: References: Message-ID: I could certainly change things to Closer = fun(Sock) -> gen_udp:close(Sock) end, monitor(self(), Sock, Closer), for this particular case but I'm also passing the name of the module from the command like to invoke the script function in it. I don't see how I can construct a real fun from an atom that is the module name. On Jan 12, 2006, at 4:00 PM, Joel Reymont wrote: > Folks, > > My funs seem to behave differently when the beams are compiled to > native code. > > Is there an explanation to this? I am passing indeed passing funs > as {M, F} and then calling them as per the code below. > > Why does it work when the code is byte-compiled and how do I work > around these errors? > > monitor(self(), Sock, {gen_udp, close}) > > monitor(Sock, Closer) -> > receive > {'DOWN', _, process, _, _} -> > Closer(Sock); > Any -> > io:format("Monitor: Unknown:~n~p~n", [Any]), > monitor(sock, Closer) > end. -- http://wagerlabs.com/ From joelr1@REDACTED Thu Jan 12 17:20:58 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 12 Jan 2006 16:20:58 +0000 Subject: Funs behaving differently after native compilation In-Reply-To: References: Message-ID: I worked around this by calling apply(Module, ...). Apparently {M, F} is deprecated. Still, it's interesting that no error is reported and everything works fine when byte-compiled. On Jan 12, 2006, at 4:03 PM, Joel Reymont wrote: > I could certainly change things to > > Closer = fun(Sock) -> gen_udp:close(Sock) end, > monitor(self(), Sock, Closer), > > for this particular case but I'm also passing the name of the > module from the command like to invoke the script function in it. > > I don't see how I can construct a real fun from an atom that is the > module name. -- http://wagerlabs.com/ From richardc@REDACTED Thu Jan 12 17:34:37 2006 From: richardc@REDACTED (Richard Carlsson) Date: Thu, 12 Jan 2006 17:34:37 +0100 Subject: Funs behaving differently after native compilation In-Reply-To: References: Message-ID: <43C6851D.1010208@csd.uu.se> Joel Reymont wrote: > I could certainly change things to > > Closer = fun(Sock) -> gen_udp:close(Sock) end, > monitor(self(), Sock, Closer), > > for this particular case but I'm also passing the name of the module > from the command like to invoke the script function in it. > > I don't see how I can construct a real fun from an atom that is the > module name. You could do something like this: foo({M,F}) -> Closer = fun(Sock) -> M:F(Sock) end, monitor(self(), Sock, Closer) or if only the module name is changing: foo(M) -> Closer = fun(Sock) -> M:close(Sock) end, monitor(self(), Sock, Closer) etc. The OTP guys recently added dynamic-lookup "funs" on the form 'fun foo:bar/2', but it seems that you cannot create them using variables, as in "fun M:F/A" (which would be handy in my opinion). Perhaps this can be added? The advantage over tuples is that is_function/1 yields true for the funs, and that there is no confusion about the arity of the called function. (E.g., if you use {M,F}, and then change the number of arguments, but forget to update some call site, it might continue to "work" by calling the wrong function. Not good.) Also, analyses like those done by Dialyzer are more easily foiled by passing around atoms - or (shudder!), even manipulating strings and converting them to atoms and finally using those atoms to call a function! /Richard From richardc@REDACTED Thu Jan 12 17:38:15 2006 From: richardc@REDACTED (Richard Carlsson) Date: Thu, 12 Jan 2006 17:38:15 +0100 Subject: Funs behaving differently after native compilation In-Reply-To: References: Message-ID: <43C685F7.1030902@csd.uu.se> Joel Reymont wrote: > I worked around this by calling apply(Module, ...). Apparently {M, F} > is deprecated. Don't do that. Calling apply is generally much more inefficient, since it must traverse a list to push arguments on the stack. Unless your argument lists really vary in length (and then you should stop and ask yourself what the heck you are doing...), it is both faster and cleaner to just do Module:Function(...). /Richard From mikpe@REDACTED Thu Jan 12 17:47:20 2006 From: mikpe@REDACTED (Mikael Pettersson) Date: Thu, 12 Jan 2006 17:47:20 +0100 Subject: Funs behaving differently after native compilation In-Reply-To: References: Message-ID: <17350.34840.292035.945292@alkaid.it.uu.se> Joel Reymont writes: > Folks, > > My funs seem to behave differently when the beams are compiled to > native code. > > Is there an explanation to this? I am passing indeed passing funs as > {M, F} and then calling them as per the code below. > > Why does it work when the code is byte-compiled and how do I work > around these errors? > > monitor(self(), Sock, {gen_udp, close}) > > monitor(Sock, Closer) -> > receive > {'DOWN', _, process, _, _} -> > Closer(Sock); > Any -> > io:format("Monitor: Unknown:~n~p~n", [Any]), > monitor(sock, Closer) > end. > > My make file: > > {'*',[native]}. > > The errors that I get when my code is compiled to native: > > =ERROR REPORT==== 12-Jan-2006::15:42:25 === > Error in process <0.31.0> with exit value: {{'EXIT',{{badfun, > {randomplay,script}},[]}},[]} A simpler test module: ==snip== -module(bar). -compile(export_all). test1() -> bar1({?MODULE,f}, 42). test2() -> bar2({?MODULE,f}, 42). test3() -> bar3({?MODULE,f}, 42). bar1(MF, X) -> MF(X). bar2(MF, X) -> apply(MF, [X]). bar3({M,F}, X) -> M:F(X). f(42) -> ok. ==snip== In this module, test1() to test3() all work in BEAM mode, but only test2() and test3() work after compilation to native code: bar:test1() results in a badfun exception. HiPE could allow bar:test1() to work. The reason it doesn't is largely political: some people have strong opinions against the old-fashioned {M,F} functions, and since there are alternatives, there have been little incentive to extend the compiler to support them. A secondary reason is that it would cause code bloat for all MF(X)-like expressions. /Mikael From vances@REDACTED Thu Jan 12 18:06:18 2006 From: vances@REDACTED (Vance Shipley) Date: Thu, 12 Jan 2006 12:06:18 -0500 Subject: Building HIPE on Solaris 10 In-Reply-To: <17348.59233.885893.535017@alkaid.it.uu.se> References: <20060110181038.GD56361@frogman.motivity.ca> <17348.59233.885893.535017@alkaid.it.uu.se> Message-ID: <20060112170618.GC59339@frogman.motivity.ca> Mikael, That seems to be the problem: $ /usr/sfw/bin/gcc -v Reading specs from /usr/sfw/lib/gcc/sparc-sun-solaris2.10/3.4.3/specs Configured with: /gates/sfw10/builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++ --enable-shared Thread model: posix gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath) Thanks. -Vance On Wed, Jan 11, 2006 at 12:09:21PM +0100, Mikael Pettersson wrote: } } We don't have Solaris 10 over here, but I remember seeing a similar } error on Solaris 9. It occurred because some sysadmin had seen fit } to install a gcc toolchain configured to use the GNU assembler but } the Solaris linker, and it totally broke. My SPARC/Solaris9 gcc } uses both the Solaris assembler and linker, and it works fine. } } /Mikael From joelr1@REDACTED Thu Jan 12 18:42:43 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 12 Jan 2006 17:42:43 +0000 Subject: Funs behaving differently after native compilation In-Reply-To: <43C6851D.1010208@csd.uu.se> References: <43C6851D.1010208@csd.uu.se> Message-ID: <4E98FA3E-695F-428C-A25B-43F8211FEDF4@gmail.com> Thank you Richard! On Jan 12, 2006, at 4:34 PM, Richard Carlsson wrote: > You could do something like this: > > foo({M,F}) -> > Closer = fun(Sock) -> M:F(Sock) end, > monitor(self(), Sock, Closer) -- http://wagerlabs.com/ From w.a.de.jong@REDACTED Thu Jan 12 21:39:52 2006 From: w.a.de.jong@REDACTED (Willem de Jong) Date: Thu, 12 Jan 2006 21:39:52 +0100 Subject: XML Schema support In-Reply-To: <407d9ef80601101233r5c78d1e7p4702b79cf0c54ca1@mail.gmail.com> References: <407d9ef80601101233r5c78d1e7p4702b79cf0c54ca1@mail.gmail.com> Message-ID: <407d9ef80601121239t68e3d227l71e533f6a40a3605@mail.gmail.com> Hi, I am pleased that there seems to be some interest in my work, thanks for the feedback. It was enough to convince me that, if I publish this, one or two people will take the trouble to find out what it is and whether they can use it. I will try to prepare it for distribution: tie up some loose ends, prepare some documentation etc. In the mean time I will think about the way to publish it. I haven't made my mind up yet - I got the advise to put it on Jungerl, but for some reason I don't get a clear picture of what it is and how it is supposed to work. What would be the benefit of putting it there (compared to, for example, a separate sourceforge project ?) It looks like the focus of my project is shifting from being an Erlang trial to being an open source software project-trial... So I may take the liberty to experiment a little bit (with sourceforge etc.). All in all it will probably take a week or two (this is just a hobby project - I have to work during the day...). Regards, Willem From joelr1@REDACTED Fri Jan 13 01:35:47 2006 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 13 Jan 2006 00:35:47 +0000 Subject: Recursive list comprehension Message-ID: Folks, I'm trying to build a search space for future analysis. Does this look valid to you? transition(State) -> [{[Move] ++ Moves, Cost + Cost1} || {State1, Move, Cost} <- move(State), {Moves, Cost1} <- transition(State1)]. Thanks, Joel -- http://wagerlabs.com/ From xlcr@REDACTED Fri Jan 13 04:41:03 2006 From: xlcr@REDACTED (Nick Linker) Date: Fri, 13 Jan 2006 09:41:03 +0600 Subject: Bayesian Erlang: Help with translation from Prolog In-Reply-To: References: Message-ID: <43C7214F.1020307@mail.ru> Joel Reymont wrote: > This was an easy one. I'm wondering if backtracking can be > implemented by catching pattern-matching exceptions, though. What do > you think? > > -module(p). > > -compile([export_all]). > > p({patient, cancer}) -> 0.1; > p({patient, smoker}) -> 0.5. > > cp({patient, smoker}, {patient, cancer}) -> 0.8; > cp(_, _) -> none. > > getp({A, B}) > when is_tuple(A), > is_tuple(B) -> > case cp(A, B) of > none -> > Pba = cp(B, A), > Pa = getp(A), > Pb = getp(B), > Pba * Pa / Pb; > X -> > X > end; > > getp(A) -> p(A). > Sorry for the following dumb questions: why do you need Prolog? has the Prolog language any significant advantages comparing to other languages? With best regards, Linker Nick. From erlang@REDACTED Fri Jan 13 08:26:29 2006 From: erlang@REDACTED (Peter-Henry Mander) Date: Fri, 13 Jan 2006 07:26:29 +0000 Subject: Recursive list comprehension In-Reply-To: References: Message-ID: <1137137189.8784.9.camel@hymir.newport-networks.com> Hi Joel, Without more context, it's hard for me to see how this code terminates. What is the termination clause in this recursive function? And I doubt very much that it is tail recursive. It looks as if this function will consume vast amounts of memory if the calculation is long. Pete. On Fri, 2006-01-13 at 00:35 +0000, Joel Reymont wrote: > Folks, > > I'm trying to build a search space for future analysis. Does this > look valid to you? > > transition(State) -> > [{[Move] ++ Moves, Cost + Cost1} || > {State1, Move, Cost} <- move(State), > {Moves, Cost1} <- transition(State1)]. > > Thanks, Joel > > -- > http://wagerlabs.com/ > > > > > > From bengt.kleberg@REDACTED Fri Jan 13 09:37:15 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Fri, 13 Jan 2006 09:37:15 +0100 Subject: hipe vs native compilation In-Reply-To: References: Message-ID: <43C766BB.60804@ericsson.com> On 2006-01-12 16:40, Joel Reymont wrote: ...deleted > I created a Emakefile that reads > > {'*',[native]}. > > I compiled and now get: > > 1> bot:module_info(compile). > [{options,[error_summary,native]}, > {version,"4.3.11"}, > {time,{2006,1,12,15,31,58}}, > {source,"/Users/joelr/Work/Dobro/SuperScript/src/bot.erl"}] > > I see no references to hipe, though. Should I? I'm running on Mac OSX > 10.4.4. last time i heard the existing hipe targets where: sparc x86 unless you have a very new mac :-) you can not get native Mac OSX code. bengt, who might be mistaken since the hipe team is a talented and hard working group of people From kostis@REDACTED Fri Jan 13 10:02:14 2006 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 13 Jan 2006 10:02:14 +0100 (MET) Subject: hipe vs native compilation In-Reply-To: Mail from 'Bengt Kleberg ' dated: Fri, 13 Jan 2006 09:37:15 +0100 Message-ID: <200601130902.k0D92Eej019644@spikklubban.it.uu.se> > last time i heard the existing hipe targets where: > sparc > x86 > > unless you have a very new mac :-) you can not get native Mac OSX code. Your "last time" was probably quite long ago. HiPE currently supports: Sparc V8+ x86 running Linux or Solaris AMD64 running Linux PowerPC running Linux or Mac OSX In addition, an ARM port is currently under development and will appear soon to an Erlang/OTP version near you. Kostis From joelr1@REDACTED Fri Jan 13 10:32:37 2006 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 13 Jan 2006 09:32:37 +0000 Subject: Bayesian Erlang: Help with translation from Prolog In-Reply-To: <43C7214F.1020307@mail.ru> References: <43C7214F.1020307@mail.ru> Message-ID: <522C17D4-995F-4827-A6FD-BE431712A9E0@gmail.com> Yes. Try translating the following into Erlang: http://web.engr.oregonstate.edu/~erwig/zurg/zurg.pl Thanks, Joel On Jan 13, 2006, at 3:41 AM, Nick Linker wrote: > Sorry for the following dumb questions: why do you need Prolog? has > the Prolog language any significant advantages comparing to other > languages? -- http://wagerlabs.com/ From joelr1@REDACTED Fri Jan 13 10:38:19 2006 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 13 Jan 2006 09:38:19 +0000 Subject: Recursive list comprehension In-Reply-To: <1137137189.8784.9.camel@hymir.newport-networks.com> References: <1137137189.8784.9.camel@hymir.newport-networks.com> Message-ID: <5EEB938B-1996-40BD-8D3B-27A9E5C9FDBB@gmail.com> On Jan 13, 2006, at 7:26 AM, Peter-Henry Mander wrote: > Without more context, it's hard for me to see how this code > terminates. > What is the termination clause in this recursive function? > > And I doubt very much that it is tail recursive. It looks as if this > function will consume vast amounts of memory if the calculation is > long. My issue is that this comprehension just returns []. Period. I'm not looking for tail recursion, just a working list comprehension. I'm trying to translate the following from Prolog: http:// web.engr.oregonstate.edu/~erwig/zurg/zurg.pl. The original paper is at http://web.engr.oregonstate.edu/~erwig/zurg/ The code I came up with is below. Note the 1st clause of trans, that's the fun that I'm having trouble with. It terminates when there are no toys on the left side of the bridge and they have the flashlight with them (on the right). Ideally, this code should use lazy lists but I haven't gotten that far, I'm just trying to make the dumb backtracking work. -module(zurg). -compile([export_all]). time(buzz) -> 5; time(woody) -> 10; time(rex) -> 20; time(hamm) -> 25. toys() -> [buzz, hamm, rex, woody]. cost([]) -> 0; cost([H|T]) -> max(cost(H), cost(T)); cost(X) -> time(X). split(L) when is_list(L) -> [{[X, Y], L -- [X, Y]} || X <- L, Y <- L, X < Y]. %%% Generate new state, move and cost of that move move({st, l, L1}) when is_list(L1) -> [{{st, r, L2}, {r, M}, cost(M)} || {M, L2} <- split(L1)]; move({st, r, L1}) when is_list(L1) -> T = toys(), R = T -- L1, % these guys are on the left [{{st, l, lists:umerge([X], L1)}, {l, X}, cost(X)} || X <- R]; move(X) -> erlang:error(invalid_move, X). trans([{st, r, []}]) -> none; trans(S) -> [{[M1] ++ M2, C1 + C2} || {S1, M1, C1} <- move(S), {M2, C2} <- trans(S1)]. cross(D) -> T = toys(), [M || {M, D0} <- trans({st, l, T}), D0 =< D]. solution() -> cross(60). max(A, B) when is_number(A), is_number(B) -> if A > B -> A; true -> B end. -- http://wagerlabs.com/ From erik.reitsma@REDACTED Fri Jan 13 11:04:33 2006 From: erik.reitsma@REDACTED (Erik Reitsma (RY/ETM)) Date: Fri, 13 Jan 2006 11:04:33 +0100 Subject: HiPE on SPARC? (was: RE: hipe vs native compilation) Message-ID: <110BA8ACEE682C479D0B008B6BE4AEB10C1590@esealmw107.eemea.ericsson.se> > Your "last time" was probably quite long ago. HiPE currently > supports: > > Sparc V8+ I am running OTP R10B-9 on an UltraSPARC-IIi @ 440.141 Mhz, version 0 FPU running NetBSD 2.1. However, HiPE is disabled by default. So on which operating systems on UltraSPARC should HiPE be working? It says: Erlang (BEAM) emulator version 5.4.12 [64-bit] [source] Eshell V5.4.12 (abort with ^G) 1> os:type(). {unix,netbsd} 2> os:version(). {2,1,0} 3> *Erik. From mikpe@REDACTED Fri Jan 13 11:24:48 2006 From: mikpe@REDACTED (Mikael Pettersson) Date: Fri, 13 Jan 2006 11:24:48 +0100 Subject: HiPE on SPARC? (was: RE: hipe vs native compilation) In-Reply-To: <110BA8ACEE682C479D0B008B6BE4AEB10C1590@esealmw107.eemea.ericsson.se> References: <110BA8ACEE682C479D0B008B6BE4AEB10C1590@esealmw107.eemea.ericsson.se> Message-ID: <17351.32752.274095.967391@alkaid.it.uu.se> Erik Reitsma \(RY/ETM\) writes: > > Your "last time" was probably quite long ago. HiPE currently > > supports: > > > > Sparc V8+ > > I am running OTP R10B-9 on an UltraSPARC-IIi @ 440.141 Mhz, version 0 > FPU running NetBSD 2.1. However, HiPE is disabled by default. So on > which operating systems on UltraSPARC should HiPE be working? UltraSPARCs running Solaris with 32-bit user-space. From erlang@REDACTED Fri Jan 13 11:29:17 2006 From: erlang@REDACTED (Peter-Henry Mander) Date: Fri, 13 Jan 2006 10:29:17 +0000 Subject: Recursive list comprehension In-Reply-To: <5EEB938B-1996-40BD-8D3B-27A9E5C9FDBB@gmail.com> References: <1137137189.8784.9.camel@hymir.newport-networks.com> <5EEB938B-1996-40BD-8D3B-27A9E5C9FDBB@gmail.com> Message-ID: <1137148157.8784.50.camel@hymir.newport-networks.com> Hi Joel, I'm reading http://web.engr.oregonstate.edu/~erwig/papers/Zurg_JFP04.pdf I haven't read all of the paper but it probably gives good guidance in avoiding re-implementing backtracking in Erlang. Have you looked there? Since Erlang was derived from Prolog a long time ago, I think Dr. Joe & colleagues omitted backtracking because of rampant memory consumption and the possibly iffy use of red/green cut that I for one never properly understood. Erlang gains clarity without backtracking methinks. Pete. On Fri, 2006-01-13 at 09:38 +0000, Joel Reymont wrote: > On Jan 13, 2006, at 7:26 AM, Peter-Henry Mander wrote: > > > Without more context, it's hard for me to see how this code > > terminates. > > What is the termination clause in this recursive function? > > > > And I doubt very much that it is tail recursive. It looks as if this > > function will consume vast amounts of memory if the calculation is > > long. > > My issue is that this comprehension just returns []. Period. I'm not > looking for tail recursion, just a working list comprehension. > > I'm trying to translate the following from Prolog: http:// > web.engr.oregonstate.edu/~erwig/zurg/zurg.pl. The original paper is > at http://web.engr.oregonstate.edu/~erwig/zurg/ > > The code I came up with is below. Note the 1st clause of trans, > that's the fun that I'm having trouble with. It terminates when there > are no toys on the left side of the bridge and they have the > flashlight with them (on the right). > > Ideally, this code should use lazy lists but I haven't gotten that > far, I'm just trying to make the dumb backtracking work. > > -module(zurg). > > -compile([export_all]). > > time(buzz) -> 5; > time(woody) -> 10; > time(rex) -> 20; > time(hamm) -> 25. > > toys() -> [buzz, hamm, rex, woody]. > > cost([]) -> 0; > cost([H|T]) -> max(cost(H), cost(T)); > cost(X) -> time(X). > > split(L) > when is_list(L) -> > [{[X, Y], L -- [X, Y]} || X <- L, Y <- L, X < Y]. > > %%% Generate new state, move and cost of that move > > move({st, l, L1}) > when is_list(L1) -> > [{{st, r, L2}, {r, M}, cost(M)} || {M, L2} <- split(L1)]; > > move({st, r, L1}) > when is_list(L1) -> > T = toys(), > R = T -- L1, % these guys are on the left > [{{st, l, lists:umerge([X], L1)}, {l, X}, cost(X)} || X <- R]; > > move(X) -> > erlang:error(invalid_move, X). > > trans([{st, r, []}]) -> > none; > > trans(S) -> > [{[M1] ++ M2, C1 + C2} || {S1, M1, C1} <- move(S), {M2, C2} <- > trans(S1)]. > > cross(D) -> > T = toys(), > [M || {M, D0} <- trans({st, l, T}), D0 =< D]. > > solution() -> cross(60). > > max(A, B) > when is_number(A), > is_number(B) -> > if > A > B -> > A; > true -> > B > end. > > -- > http://wagerlabs.com/ > > > > > > From joelr1@REDACTED Fri Jan 13 11:41:50 2006 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 13 Jan 2006 10:41:50 +0000 Subject: Recursive list comprehension In-Reply-To: <1137148157.8784.50.camel@hymir.newport-networks.com> References: <1137137189.8784.9.camel@hymir.newport-networks.com> <5EEB938B-1996-40BD-8D3B-27A9E5C9FDBB@gmail.com> <1137148157.8784.50.camel@hymir.newport-networks.com> Message-ID: <17E5F158-79D4-4C54-9E62-31474C1B14AB@gmail.com> On Jan 13, 2006, at 10:29 AM, Peter-Henry Mander wrote: > I'm reading http://web.engr.oregonstate.edu/~erwig/papers/ > Zurg_JFP04.pdf > > I haven't read all of the paper but it probably gives good guidance in > avoiding re-implementing backtracking in Erlang. Have you looked > there? I believe that is the paper that I pointed to :-). Apart from a Haskell implementation that builds a lazy list I do not see any guidance in avoiding re-implementing backtracking in Erlang. > Since Erlang was derived from Prolog a long time ago, I think Dr. > Joe & > colleagues omitted backtracking because of rampant memory consumption > and the possibly iffy use of red/green cut that I for one never > properly > understood. Erlang gains clarity without backtracking methinks. That much I understand but it does not answer the question of why my recursive comprehention returns [] instead of a long list of results. Also, I _do_ want to implement backtracking in Erlang. I would like to use Erlang as a base for a future project that might require it and I do not want to switch to Haskell. Thanks, Joel -- http://wagerlabs.com/ From vlad_dumitrescu@REDACTED Fri Jan 13 11:58:21 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Fri, 13 Jan 2006 11:58:21 +0100 Subject: Recursive list comprehension References: <1137137189.8784.9.camel@hymir.newport-networks.com> <5EEB938B-1996-40BD-8D3B-27A9E5C9FDBB@gmail.com> Message-ID: Hi, ----- Original Message ----- From: "Joel Reymont" > trans([{st, r, []}]) -> > none; > trans(S) -> > [{[M1] ++ M2, C1 + C2} || {S1, M1, C1} <- move(S), {M2, C2} <- > trans(S1)]. Changing your trans function to trans({st, _, []}) -> [{[], 0}]; trans(S) -> [{[M1] ++ M2, C1 + C2} || {S1, M1, C1} <- move(S), {M2, C2} <- trans(S1)]. makes the result be (emacs@REDACTED)41> zurg:solution(). [[{r,[buzz,woody]},{l,buzz},{r,[hamm,rex]},{l,woody},{r,[buzz,woody]}], [{r,[buzz,woody]},{l,woody},{r,[hamm,rex]},{l,buzz},{r,[buzz,woody]}]] which I didn't check if it's correct, but looks like a step forward! regards, /Vlad From joelr1@REDACTED Fri Jan 13 12:16:09 2006 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 13 Jan 2006 11:16:09 +0000 Subject: Recursive list comprehension In-Reply-To: <89327D1B-B49A-4585-B04F-1266D06789BA@gmail.com> References: <1137137189.8784.9.camel@hymir.newport-networks.com> <5EEB938B-1996-40BD-8D3B-27A9E5C9FDBB@gmail.com> <89327D1B-B49A-4585-B04F-1266D06789BA@gmail.com> Message-ID: I will rephrase it a bit. Obviously my original version was wrong as trans is never given a list. That would mean to me that trans would never terminate. Why does it return [] then? Ignoring the position of the flash light makes no difference. This still works: trans({st, r, []}) -> [{[], 0}]; Serves me well for not paying attention and not seeing the obvious! Joel -- http://wagerlabs.com/ From joelr1@REDACTED Fri Jan 13 12:11:47 2006 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 13 Jan 2006 11:11:47 +0000 Subject: Recursive list comprehension In-Reply-To: References: <1137137189.8784.9.camel@hymir.newport-networks.com> <5EEB938B-1996-40BD-8D3B-27A9E5C9FDBB@gmail.com> Message-ID: <89327D1B-B49A-4585-B04F-1266D06789BA@gmail.com> On Jan 13, 2006, at 10:58 AM, Vlad Dumitrescu wrote: > ----- Original Message ----- > From: "Joel Reymont" >> trans([{st, r, []}]) -> >> none; > [...] > Changing your trans function to > > trans({st, _, []}) -> > [{[], 0}]; > [...] > makes the result be > > (emacs@REDACTED)41> zurg:solution(). > [[{r,[buzz,woody]},{l,buzz},{r,[hamm,rex]},{l,woody},{r, > [buzz,woody]}], > [{r,[buzz,woody]},{l,woody},{r,[hamm,rex]},{l,buzz},{r, > [buzz,woody]}]] The correct results according to SWI-Prolog: M = [r([buzz, woody]), l(buzz), r([hamm, rex]), l(woody), r([buzz, woody])] ; M = [r([buzz, woody]), l(woody), r([hamm, rex]), l(buzz), r([buzz, woody])] ; The above version does not take into account where the flashlight is but I suppose it's always with the toys so it does not matter. It still produces correct results. So the issue is that trans never terminates in my original version? Why would it return []? I'm baffled and can't see why just ignoring the position of the flashlight would make such a huge difference in the Erlang version :-(. Thanks, Joel -- http://wagerlabs.com/ From joelr1@REDACTED Fri Jan 13 12:21:19 2006 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 13 Jan 2006 11:21:19 +0000 Subject: Lazy recursive list comprehensions In-Reply-To: References: <1137137189.8784.9.camel@hymir.newport-networks.com> <5EEB938B-1996-40BD-8D3B-27A9E5C9FDBB@gmail.com> Message-ID: <1AAE0C06-C313-4778-8797-675E33415460@gmail.com> The following works thanks to Vlad and matches the Prolog version at http://web.engr.oregonstate.edu/~erwig/zurg/ almost word for word. This is very encouraging to me! The code builds a search space of 108 items in a list but the same approach to a different problem could produce a search space that is much larger. Is there a way to redesign the code to use "lazy list comprehensions" while keeping the elegance? Thanks, Joel P.S. The working code: -module(zurg). -compile([export_all]). time(buzz) -> 5; time(woody) -> 10; time(rex) -> 20; time(hamm) -> 25. toys() -> [buzz, hamm, rex, woody]. cost([]) -> 0; cost([H|T]) -> max(cost(H), cost(T)); cost(X) -> time(X). split(L) when is_list(L) -> [{[X, Y], L -- [X, Y]} || X <- L, Y <- L, X < Y]. %%% Generate new state, move and cost of that move move({st, l, L1}) when is_list(L1) -> [{{st, r, L2}, {r, M}, cost(M)} || {M, L2} <- split(L1)]; move({st, r, L1}) when is_list(L1) -> T = toys(), R = T -- L1, % these guys are on the left [{{st, l, lists:umerge([X], L1)}, {l, X}, cost(X)} || X <- R]; move(X) -> erlang:error(invalid_move, X). trans({st, r, []}) -> [{[], 0}]; trans(S) -> [{[M1] ++ M2, C1 + C2} || {S1, M1, C1} <- move(S), {M2, C2} <- trans(S1)]. cross(D) -> T = toys(), [M || {M, D0} <- trans({st, l, T}), D0 =< D]. solution() -> cross(60). max(A, B) when is_number(A), is_number(B) -> if A > B -> A; true -> B end. -- http://wagerlabs.com/ From erlang@REDACTED Fri Jan 13 12:20:55 2006 From: erlang@REDACTED (Peter-Henry Mander) Date: Fri, 13 Jan 2006 11:20:55 +0000 Subject: Recursive list comprehension In-Reply-To: <17E5F158-79D4-4C54-9E62-31474C1B14AB@gmail.com> References: <1137137189.8784.9.camel@hymir.newport-networks.com> <5EEB938B-1996-40BD-8D3B-27A9E5C9FDBB@gmail.com> <1137148157.8784.50.camel@hymir.newport-networks.com> <17E5F158-79D4-4C54-9E62-31474C1B14AB@gmail.com> Message-ID: <1137151255.8784.62.camel@hymir.newport-networks.com> On Fri, 2006-01-13 at 10:41 +0000, Joel Reymont wrote: > On Jan 13, 2006, at 10:29 AM, Peter-Henry Mander wrote: > > > I'm reading http://web.engr.oregonstate.edu/~erwig/papers/ > > Zurg_JFP04.pdf > > > > I haven't read all of the paper but it probably gives good guidance in > > avoiding re-implementing backtracking in Erlang. Have you looked > > there? > > I believe that is the paper that I pointed to :-) D'oh! I must learn to read the question! I blame a caffeine imbalance: either too much or too little :-\ Pete. From vlad_dumitrescu@REDACTED Fri Jan 13 12:22:22 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Fri, 13 Jan 2006 12:22:22 +0100 Subject: Recursive list comprehension In-Reply-To: Message-ID: > I will rephrase it a bit. Obviously my original version was > wrong as trans is never given a list. That would mean to me > that trans would never terminate. Why does it return [] then? It terminates because when it gets an argument of [{st, r, []}], the comprehension is applied and it returns [], of course. > Ignoring the position of the flash light makes no difference. > This still works: > > trans({st, r, []}) -> > [{[], 0}]; This is because it can't be on the left side without any toy, unless it is allowed to throw it to the other side after the batteries are dead :-) /Vlad From Waldemar.Rachwal@REDACTED Fri Jan 13 12:22:54 2006 From: Waldemar.Rachwal@REDACTED (Rachwal Waldemar-AWR001) Date: Fri, 13 Jan 2006 11:22:54 -0000 Subject: Problem with creating a new row in SNMP table Message-ID: <08F651DD6835A74DAFA80915F0150CA62A5114@zuk35exm64.ds.mot.com> Okay, found it. The row was incomplete and agent couldn't fill up it as missing variables were devoided of DEFVAL in the MIB, so the problem. WR. -----Original Message----- From: Rachwal Waldemar-AWR001 Sent: Wednesday, January 11, 2006 2:53 PM To: erlang-questions@REDACTED Subject: Problem with creating a new row in SNMP table I have stuck at the attempt of creating a new row in my SNMP table. I'm giving 'inconsistentValue' on column (in the MIB : btsRowStatus = { btsEntry 114 }) which is of the RowStatus type. This is the first message I send to the agent, so the table should be empty. The value of btsRowStatus in SET-REQUEST is 4 which is createAndGo. The first and the last two varbinds in the PDU are simple variables (not table columns), but it should not matter, I assume (these vars are additional correlation tags and journal number required by the application). ACCESS rights of all of the columns, including btsRowStatus, are "cr-" create-read, so they should be okay? The agent chokes while applying table_func with 'is_set_ok': apply: snmp_generic,table_func,[is_set_ok, [466944,0,1], [{1,0}, {2,0}, {3,"4000M"}, ... {114,4}, <--- btsRowStatus, createAndGo(4), 3rd varbind {118,0}, {123,0}], {btsTable,volatile}] ... and the log after "apply:" ** SNMP A-SYMBOLIC-STORE LOG: table info: btsTable ** SNMP A-LOCAL-DB LOG: table btsTable get element: Indexes: [466944,0,1] Col: 1 ** SNMP A-SYMBOLIC-STORE LOG: table info: btsTable ** SNMP MASTER-AGENT-worker(<0.67.0>) SETLIB LOG: returned: {inconsistentValue,114} ** SNMP A-NET-IF LOG: reply pdu: {pdu,'get-response',5,inconsistentValue,3,[{varbind,[1,3,6,1,4,1,161,205 2,1,44,1,5,0],'Unsigned32',2147483653,1},{varbind,[1,3,6,1,4,1,161,2052, 1,44,1,6,0],'Unsigned32',2147483658,2},{varbind,[1,3,6,1,4,1,161,99,101, 1,3,1,1,1,114,466944,0,1],'INTEGER',4,3}... ** SNMP A-LOCAL-DB LOG: variable get: snmpEngineMaxMessageSize ** SNMP A-NET-IF INFO: time in agent: 261035 mysec 3> 3> 3> The full logs, from agent/erlang and manager/perl are attached to this mail. If MIBs are required to look at I can send them after some slimming as they are proprietary stuff :( Could anybody help? I have no idea what to do next :( BTW, I'm also curious what is the best way to tackle such sort of problems... (a big land of unknown code but you're determined to utilize it) Debugging, tracing? I read about, but have never used. Thanks, WR. From vlad_dumitrescu@REDACTED Fri Jan 13 12:29:11 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Fri, 13 Jan 2006 12:29:11 +0100 Subject: Lazy recursive list comprehensions In-Reply-To: <1AAE0C06-C313-4778-8797-675E33415460@gmail.com> Message-ID: > The code builds a search space of 108 items in a list but the > same approach to a different problem could produce a search > space that is much larger. Is there a way to redesign the > code to use "lazy list comprehensions" while keeping the elegance? The only implementation of lazy lists that crosses my mind right now is using continuation-passing, and I don't think that keeps the elegance (but that is just a matter of taste, others might disagree). On the other hand, if the lazyness would be hidden somehow in a library, then the use of it could still be elegant. There would be no comprehensions, but that's not a big deal. /Vlad From joelr1@REDACTED Fri Jan 13 12:38:41 2006 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 13 Jan 2006 11:38:41 +0000 Subject: Lazy recursive list comprehensions In-Reply-To: References: Message-ID: On Jan 13, 2006, at 11:29 AM, Vlad Dumitrescu wrote: > On the other hand, if the lazyness would be hidden somehow in a > library, > then the use of it could still be elegant. There would be no > comprehensions, > but that's not a big deal. This was a huge deal for me yesterday when I tried a non- comprehension version of trans. Couldn't get it to work. Can you show me what it would look like? Thanks, Joel -- http://wagerlabs.com/ From mfs@REDACTED Fri Jan 13 12:54:00 2006 From: mfs@REDACTED (Mark Scandariato) Date: Fri, 13 Jan 2006 06:54:00 -0500 (GMT-05:00) Subject: hipe vs native compilation Message-ID: <9157758.1137153240244.JavaMail.root@mswamui-cedar.atl.sa.earthlink.net> -----Original Message----- >From: Kostis Sagonas >Sent: Jan 13, 2006 4:02 AM >To: bengt.kleberg@REDACTED, erlang-questions@REDACTED >Subject: Re: hipe vs native compilation > > > last time i heard the existing hipe targets where: > > sparc > > x86 > > > > unless you have a very new mac :-) you can not get native Mac OSX code. > >Your "last time" was probably quite long ago. HiPE currently supports: > > Sparc V8+ > x86 running Linux or Solaris > AMD64 running Linux > PowerPC running Linux or Mac OSX > >In addition, an ARM port is currently under development and will appear >soon to an Erlang/OTP version near you. > What flavor(s) of ARM will be supported? Thanks, Mark. >Kostis > From mikpe@REDACTED Fri Jan 13 13:05:32 2006 From: mikpe@REDACTED (Mikael Pettersson) Date: Fri, 13 Jan 2006 13:05:32 +0100 Subject: hipe vs native compilation In-Reply-To: <9157758.1137153240244.JavaMail.root@mswamui-cedar.atl.sa.earthlink.net> References: <9157758.1137153240244.JavaMail.root@mswamui-cedar.atl.sa.earthlink.net> Message-ID: <17351.38796.129112.992709@alkaid.it.uu.se> Mark Scandariato writes: > > -----Original Message----- > >From: Kostis Sagonas > >Sent: Jan 13, 2006 4:02 AM > >To: bengt.kleberg@REDACTED, erlang-questions@REDACTED > >Subject: Re: hipe vs native compilation > > > > > last time i heard the existing hipe targets where: > > > sparc > > > x86 > > > > > > unless you have a very new mac :-) you can not get native Mac OSX code. > > > >Your "last time" was probably quite long ago. HiPE currently supports: > > > > Sparc V8+ > > x86 running Linux or Solaris > > AMD64 running Linux > > PowerPC running Linux or Mac OSX > > > >In addition, an ARM port is currently under development and will appear > >soon to an Erlang/OTP version near you. > > > > What flavor(s) of ARM will be supported? XScale, i.e. ARMv5TE and no hardware FP. From vlad_dumitrescu@REDACTED Fri Jan 13 13:30:25 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Fri, 13 Jan 2006 13:30:25 +0100 Subject: Lazy recursive list comprehensions In-Reply-To: Message-ID: I think that the conversion of trans to not using comprehensions is trans({st, _, []}) -> [{[], 0}]; trans(S) -> Fun = fun({S1, M1, C1}) -> lists:map(fun({M2, C2}) -> {[M1|M2], C1+C2} end, trans(S1)) end, lists:flatmap(Fun, move(S)). At least, this returns the same result for zurg:solution() :-) /Vlad From joelr1@REDACTED Fri Jan 13 15:39:30 2006 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 13 Jan 2006 14:39:30 +0000 Subject: Time spent in the message queue Message-ID: Is there a universal way to find out how much time a message spent in the queue before being pulled out with receive? I'm currently appending a timestamp to the end of each message but this is rather crude. There's no way to do that with {tcp, ...} messages for example. Thanks, Joel -- http://wagerlabs.com/ From joelr1@REDACTED Fri Jan 13 16:38:52 2006 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 13 Jan 2006 15:38:52 +0000 Subject: Structuring an application Message-ID: Folks, I have an app that launches hundreds of poker bots against a poker server. Each bot needs to have a different user name and password. These can be obtained by asking a "name server". Each bot launches two socket readers, processes that loop reading packets in passive mode. The reason I do it this way is because packet length is given to me in little-endian order and is the length of the whole packet including the length itself. I would like to fail the poker bot when either of the two socket readers fail. I would also like to monitor the poker bot to update the failed counter when the bot fails. When all bots fail or exit cleanly then the supervisor should exit. How can I achieve this with standard OTP tools? I thought I could use a supervisor but there's no restart policy to let a child fail while others continue. Thanks, Joel -- http://wagerlabs.com/ From rpettit@REDACTED Fri Jan 13 16:57:41 2006 From: rpettit@REDACTED (Rick Pettit) Date: Fri, 13 Jan 2006 09:57:41 -0600 Subject: Structuring an application In-Reply-To: References: Message-ID: <20060113155741.GB24536@vailsys.com> On Fri, Jan 13, 2006 at 03:38:52PM +0000, Joel Reymont wrote: > Folks, > > I have an app that launches hundreds of poker bots against a poker > server. > > Each bot needs to have a different user name and password. These can > be obtained by asking a "name server". > > Each bot launches two socket readers, processes that loop reading > packets in passive mode. The reason I do it this way is because > packet length is given to me in little-endian order and is the length > of the whole packet including the length itself. > > I would like to fail the poker bot when either of the two socket > readers fail. I would also like to monitor the poker bot to update > the failed counter when the bot fails. When all bots fail or exit > cleanly then the supervisor should exit. > > How can I achieve this with standard OTP tools? I thought I could use > a supervisor but there's no restart policy to let a child fail while > others continue. I believe you are wrong here. From supervisor(3): A supervisor can have one of the following restart strate- gies: * one_for_one - if one child process terminates and should be restarted, only that child process is affected. Just out of curiousity, are you taking a crash course in Erlang for work, school, or fun? You ask a ton of questions :-) I don't mean to poke fun, just curious. -Rick From joelr1@REDACTED Fri Jan 13 17:07:14 2006 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 13 Jan 2006 16:07:14 +0000 Subject: Structuring an application In-Reply-To: <20060113155741.GB24536@vailsys.com> References: <20060113155741.GB24536@vailsys.com> Message-ID: <5D6017C4-8FB0-4802-A9F5-AF22EBB6E41A@gmail.com> Rick, Thanks for the tip. On Jan 13, 2006, at 3:57 PM, Rick Pettit wrote: > * one_for_one - if one child process terminates and > should be restarted, only that child process is > affected. What if I _do not_ want that child restarted, that's my issue. Is there a way to supervise without restarting within OTP or do I just have to use erlang:monitor? > Just out of curiousity, are you taking a crash course in Erlang for > work, > school, or fun? You ask a ton of questions :-) I wrote a poker server in Erlang last summer and didn't ask a lot of questions during that time. Then I was rooming with a distinguished member of the Erlang community so it was quicker to just ask him :D. I'm trying to use Erlang everywhere I can now which worked well during my bout with Haskell. I figure it does not hurt to ask questions and the more I ask, the more I learn. Joel -- http://wagerlabs.com/ From rpettit@REDACTED Fri Jan 13 17:17:03 2006 From: rpettit@REDACTED (Rick Pettit) Date: Fri, 13 Jan 2006 10:17:03 -0600 Subject: Structuring an application In-Reply-To: <5D6017C4-8FB0-4802-A9F5-AF22EBB6E41A@gmail.com> References: <20060113155741.GB24536@vailsys.com> <5D6017C4-8FB0-4802-A9F5-AF22EBB6E41A@gmail.com> Message-ID: <20060113161703.GA18757@vailsys.com> On Fri, Jan 13, 2006 at 04:07:14PM +0000, Joel Reymont wrote: > Rick, > > Thanks for the tip. Anytime. > On Jan 13, 2006, at 3:57 PM, Rick Pettit wrote: > > > * one_for_one - if one child process terminates and > > should be restarted, only that child process is > > affected. > > What if I _do not_ want that child restarted, that's my issue. Is > there a way to supervise without restarting within OTP or do I just > have to use erlang:monitor? > > >Just out of curiousity, are you taking a crash course in Erlang for > >work, > >school, or fun? You ask a ton of questions :-) > > I wrote a poker server in Erlang last summer and didn't ask a lot of > questions during that time. Then I was rooming with a distinguished > member of the Erlang community so it was quicker to just ask him :D. I can understand that--when I have had past opportunities to work with those who are more experienced than I, I tried to pull all the knowledge I could from them. That kind of learning is hard to beat. > I'm trying to use Erlang everywhere I can now which worked well > during my bout with Haskell. I figure it does not hurt to ask > questions and the more I ask, the more I learn. I agree, asking questions is a good thing. I try to look online first: google, Erlang FAQ, man pages, etc--but asking questions publically can at times be necessary, and generally leads to a better understanding of some topic for all subscribers. Good luck and have fun with future Erlang projects! -Rick From nick@REDACTED Fri Jan 13 17:17:51 2006 From: nick@REDACTED (Niclas Eklund) Date: Fri, 13 Jan 2006 17:17:51 +0100 (MET) Subject: Structuring an application In-Reply-To: <5D6017C4-8FB0-4802-A9F5-AF22EBB6E41A@gmail.com> Message-ID: Hello! Update Restart = permanent | transient | temporary in your child specification. For more information see the supervisor documentation. /Nick On Fri, 13 Jan 2006, Joel Reymont wrote: > Rick, > > Thanks for the tip. > > On Jan 13, 2006, at 3:57 PM, Rick Pettit wrote: > > > * one_for_one - if one child process terminates and > > should be restarted, only that child process is > > affected. > > What if I _do not_ want that child restarted, that's my issue. Is > there a way to supervise without restarting within OTP or do I just > have to use erlang:monitor? > > > Just out of curiousity, are you taking a crash course in Erlang for > > work, > > school, or fun? You ask a ton of questions :-) > > I wrote a poker server in Erlang last summer and didn't ask a lot of > questions during that time. Then I was rooming with a distinguished > member of the Erlang community so it was quicker to just ask him :D. > > I'm trying to use Erlang everywhere I can now which worked well > during my bout with Haskell. I figure it does not hurt to ask > questions and the more I ask, the more I learn. > > Joel > > -- > http://wagerlabs.com/ _________________________________________________________________ We Are The ORBs. Resistance Is Futile. Prepare To Be Assimilated! _________________________________________________________________ From tobbe@REDACTED Fri Jan 13 22:56:03 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Fri, 13 Jan 2006 22:56:03 +0100 Subject: Recursive list comprehension In-Reply-To: <17E5F158-79D4-4C54-9E62-31474C1B14AB@gmail.com> References: <1137137189.8784.9.camel@hymir.newport-networks.com> <5EEB938B-1996-40BD-8D3B-27A9E5C9FDBB@gmail.com> <1137148157.8784.50.camel@hymir.newport-networks.com> <17E5F158-79D4-4C54-9E62-31474C1B14AB@gmail.com> Message-ID: Joel Reymont wrote: > > On Jan 13, 2006, at 10:29 AM, Peter-Henry Mander wrote: > >> I'm reading http://web.engr.oregonstate.edu/~erwig/papers/ Zurg_JFP04.pdf >> >> I haven't read all of the paper but it probably gives good guidance in >> avoiding re-implementing backtracking in Erlang. Have you looked there? > > > I believe that is the paper that I pointed to :-). Apart from a Haskell > implementation that builds a lazy list I do not see any guidance in > avoiding re-implementing backtracking in Erlang. > >> Since Erlang was derived from Prolog a long time ago, I think Dr. Joe & >> colleagues omitted backtracking because of rampant memory consumption >> and the possibly iffy use of red/green cut that I for one never properly >> understood. Erlang gains clarity without backtracking methinks. > > > That much I understand but it does not answer the question of why my > recursive comprehention returns [] instead of a long list of results. > > Also, I _do_ want to implement backtracking in Erlang. I would like to > use Erlang as a base for a future project that might require it and I > do not want to switch to Haskell. Just for the fun of it; I actually wrote an extremely naive prolog interpreter in Erlang once. It must be the slowest Prolog in the world, so obviously it is of no use other than to play with... Anyway, you'll find it here if you'd care to take a look: http://www.tornkvist.org/epilogue/ Btw: I think I remember that Hans Nilsson did a much better 'backtracker' that he used for Mnemosyne. Cheers, Tobbe > > Thanks, Joel > > -- > http://wagerlabs.com/ > > > > > > From pupeno@REDACTED Sat Jan 14 08:27:40 2006 From: pupeno@REDACTED (Pupeno) Date: Sat, 14 Jan 2006 04:27:40 -0300 Subject: Format to a string. Message-ID: <200601140427.48595.pupeno@pupeno.com> Hello, Is it possible to io:format to a string ? How ? Thank you. -- Pupeno (http://pupeno.com) Vendemos: Kit del guitarrista: http://pupeno.com/vendo/#kit -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From matthias@REDACTED Sat Jan 14 08:58:39 2006 From: matthias@REDACTED (Matthias Lang) Date: Sat, 14 Jan 2006 08:58:39 +0100 Subject: Format to a string. In-Reply-To: <200601140427.48595.pupeno@pupeno.com> References: <200601140427.48595.pupeno@pupeno.com> Message-ID: <17352.44847.605041.505797@antilipe.corelatus.se> Pupeno writes: > Is it possible to io:format to a string ? How ? See io_lib:format and, possibly, lists:flatten Matthias From pupeno@REDACTED Sat Jan 14 17:44:09 2006 From: pupeno@REDACTED (Pupeno) Date: Sat, 14 Jan 2006 13:44:09 -0300 Subject: Using OTP Message-ID: <200601141344.14700.pupeno@pupeno.com> Hello, I've been trying for days to start working in a project of mine in Erlang not being able to see how it should be coded according to OTP. I've read the OTP Designs and principles, but that didn't really told me all I needed. What I am doing is a library to make servers[1], it is supposed to make abstractions over protocols like DNS, SMTP, POP3, etc leaving you only to worry about data handling. I'll show you what I want with a trivial example: the echo protocol[2]. Someone wants to write a echo server, so it would write this: -module(echo). -export([start/0, init/1, echo/1]). -behaviour(gen_echo). start() -> gen_echo:start(?MODULE, [], []). init(_Args) -> {10007, 10007}. echo(Data) -> string:concat("You said: ", Data). where start/0 would start the server, init/1 replies with the TCP and UDP ports to use (false or something like that in any of them would mean "don't use that transport, tcp or udp"). The function echo/1 is the real worker here. In the DNS example (one in which I worked on HaServers[1]), it would be query/1 and it would get a big record containing the data sent by the client. echo/1 replies another string which will be sent to the ip client (either by tcp, or udp, the good thing is that echo/1 doesn't worry about that). As you can see, this is a non-compliant echo server where the smart developer is doing some experimentation. In the DNS example, query/1 would return a record containing the a packet to be sent back. Another callback function possible for DNS would be transfer/N, which is triggered for transferring actions. Other protocols (smtp, pop3, imap4, which are my priorities after dns, in that order) would have other set of callbacks. Now, my gen_echo.erl looks like this: -module(gen_echo). -export([behaviour_info/1]). -export([start/3]). -export([tcpLoop/2, tcpHandler/1]). behaviour_info(callbacks) -> [{echo, 1}]; behaviour_info(_Args) -> undefined. start(Mod, Args, Options) -> {TCPPort, _UDPPort} = Mod:init(Args), {_, TCPLSocket} = gen_tcp:listen(TCPPort, [{active, once}, {packet, 0}]), spawn(?MODULE, tcpLoop, [Mod, TCPLSocket]). tcpLoop(Mod, TCPLSocket) -> {_, Socket} = gen_tcp:accept(TCPLSocket), TcpHandler = spawn(?MODULE, tcpHandler, [Mod]), gen_tcp:controlling_process(Socket, TcpHandler), tcpLoop(Mod, TCPLSocket). tcpHandler(Mod) -> receive {tcp, Socket, Data} -> gen_tcp:send(Socket, Mod:echo(Data)), inet:setopts(Socket, [{active, once}]), tcpHandler(Mod); {tcp_closed, Socket} -> io:format("~w closed.~n", [Socket]); Unknown -> io:format("Received unknow message ~w.~n", [Unknown]) end. I want to rewrite this as Erlangish and OTPish as possible, what do you recommend ? what should I do ? Some questions I have are: - Should gen_echo, gen_PROTOCOL, be a gen_server ? or another gen_X ? - Should gen_echo, gen_PROTOCOL, use gen (gen:start, etc, I see that gen_server uses it) ? - Should I write supervisors ? - Should all this be an application (ErServers, the temporary name for this will only be a library, it shouldn't provide any runable program except a couple of examples, any developed server should be packaged and developed separately) ? Any other tips and hints are welcome, I feel very lost here. -- Pupeno (http://pupeno.com) Vendemos: Kit del guitarrista: http://pupeno.com/vendo/#kit [1] For those of you that understand Haskell, I started working on Haskell and the result was HaServers http://software.pupeno.com/HaServers/ [2] RFC862. PS: All this will be free software. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From erlang@REDACTED Sat Jan 14 18:41:24 2006 From: erlang@REDACTED (Michael McDaniel) Date: Sat, 14 Jan 2006 09:41:24 -0800 Subject: Using OTP In-Reply-To: <200601141344.14700.pupeno@pupeno.com> References: <200601141344.14700.pupeno@pupeno.com> Message-ID: <20060114174124.GO5958@delora.autosys.us> I found a nice example by Lennart Ohman which helped me. Well, I first read OTP Design Principles over and over (and other documents), and worked with "plain Erlang" for many smaller programs (using bits and pieces of OTP but not the powerful supervisor). Then my mind was ready to understand, I think, and Lennart Ohman's example was very useful to me. Here is link to thread with example: http://www.erlang.org/ml-archive/erlang-questions/200510/msg00137.html google is your friend. ~Michael P.S. Many other examples and documentations helped me to understand; it is that my mind was (finally) ready to accept when I found the above example that gave me the final push into OTP principles. On Sat, Jan 14, 2006 at 01:44:09PM -0300, Pupeno wrote: > Hello, > I've been trying for days to start working in a project of mine in Erlang not > being able to see how it should be coded according to OTP. > I've read the OTP Designs and principles, but that didn't really told me all I > needed. > What I am doing is a library to make servers[1], it is supposed to make > abstractions over protocols like DNS, SMTP, POP3, etc leaving you only to > worry about data handling. > I'll show you what I want with a trivial example: the echo protocol[2]. > Someone wants to write a echo server, so it would write this: > > -module(echo). > -export([start/0, init/1, echo/1]). > -behaviour(gen_echo). > > start() -> > gen_echo:start(?MODULE, [], []). > > init(_Args) -> > {10007, 10007}. > > echo(Data) -> > string:concat("You said: ", Data). > > where start/0 would start the server, init/1 replies with the TCP and UDP > ports to use (false or something like that in any of them would mean "don't > use that transport, tcp or udp"). > The function echo/1 is the real worker here. In the DNS example (one in which > I worked on HaServers[1]), it would be query/1 and it would get a big record > containing the data sent by the client. echo/1 replies another string which > will be sent to the ip client (either by tcp, or udp, the good thing is that > echo/1 doesn't worry about that). As you can see, this is a non-compliant > echo server where the smart developer is doing some experimentation. In the > DNS example, query/1 would return a record containing the a packet to be sent > back. > Another callback function possible for DNS would be transfer/N, which is > triggered for transferring actions. Other protocols (smtp, pop3, imap4, which > are my priorities after dns, in that order) would have other set of > callbacks. > > Now, my gen_echo.erl looks like this: > > -module(gen_echo). > -export([behaviour_info/1]). > -export([start/3]). > -export([tcpLoop/2, tcpHandler/1]). > > behaviour_info(callbacks) -> > [{echo, 1}]; > behaviour_info(_Args) -> > undefined. > > start(Mod, Args, Options) -> > {TCPPort, _UDPPort} = Mod:init(Args), > {_, TCPLSocket} = gen_tcp:listen(TCPPort, [{active, once}, {packet, 0}]), > spawn(?MODULE, tcpLoop, [Mod, TCPLSocket]). > > tcpLoop(Mod, TCPLSocket) -> > {_, Socket} = gen_tcp:accept(TCPLSocket), > TcpHandler = spawn(?MODULE, tcpHandler, [Mod]), > gen_tcp:controlling_process(Socket, TcpHandler), > tcpLoop(Mod, TCPLSocket). > > tcpHandler(Mod) -> > receive > {tcp, Socket, Data} -> > gen_tcp:send(Socket, Mod:echo(Data)), > inet:setopts(Socket, [{active, once}]), > tcpHandler(Mod); > {tcp_closed, Socket} -> > io:format("~w closed.~n", [Socket]); > Unknown -> > io:format("Received unknow message ~w.~n", [Unknown]) > end. > > I want to rewrite this as Erlangish and OTPish as possible, what do you > recommend ? what should I do ? Some questions I have are: > - Should gen_echo, gen_PROTOCOL, be a gen_server ? or another gen_X ? > - Should gen_echo, gen_PROTOCOL, use gen (gen:start, etc, I see that > gen_server uses it) ? > - Should I write supervisors ? > - Should all this be an application (ErServers, the temporary name for this > will only be a library, it shouldn't provide any runable program except a > couple of examples, any developed server should be packaged and developed > separately) ? > Any other tips and hints are welcome, I feel very lost here. > -- > Pupeno (http://pupeno.com) > Vendemos: Kit del guitarrista: http://pupeno.com/vendo/#kit > > [1] For those of you that understand Haskell, I started working on Haskell and > the result was HaServers http://software.pupeno.com/HaServers/ > > [2] RFC862. > > PS: All this will be free software. From pupeno@REDACTED Sat Jan 14 20:09:46 2006 From: pupeno@REDACTED (Pupeno) Date: Sat, 14 Jan 2006 16:09:46 -0300 Subject: Using OTP In-Reply-To: <20060114174124.GO5958@delora.autosys.us> References: <200601141344.14700.pupeno@pupeno.com> <20060114174124.GO5958@delora.autosys.us> Message-ID: <200601141609.47145.pupeno@pupeno.com> On Saturday 14 January 2006 14:41, Michael McDaniel wrote: > I found a nice example by Lennart Ohman which helped me. > Well, I first read OTP Design Principles over and over (and other > documents), and worked with "plain Erlang" for many smaller > programs (using bits and pieces of OTP but not the powerful > supervisor). Then my mind was ready to understand, I think, and > Lennart Ohman's example was very useful to me. > > Here is link to thread with example: > > http://www.erlang.org/ml-archive/erlang-questions/200510/msg00137.html I understand the example, but again the example is about making a program (a gen_server) and its supervisor, similar to what is explained on OTP Design and Principles (which I understood, but took me a long time since the provided code doesn't run out of the box). What I am doing is slightly different. I am making a gen_ (gen_echo for example) from which other programs (like echo, supervised or not) can be done. That is, I am writing code analogous to gen_server. My question is if I should use gen_server, copy and paste it, or what. > google is your friend. I've searched a lot and read a lot of documents, but I am still missing some pieces (those that tie the rest of them). Thank you. -- Pupeno (http://pupeno.com) Vendemos: Kit del guitarrista: http://pupeno.com/vendo/#kit -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From joelr1@REDACTED Sat Jan 14 20:36:58 2006 From: joelr1@REDACTED (Joel Reymont) Date: Sat, 14 Jan 2006 19:36:58 +0000 Subject: Using OTP In-Reply-To: <200601141609.47145.pupeno@pupeno.com> References: <200601141344.14700.pupeno@pupeno.com> <20060114174124.GO5958@delora.autosys.us> <200601141609.47145.pupeno@pupeno.com> Message-ID: <1F307101-D767-4133-A64B-35EB98D2EBC3@gmail.com> On Jan 14, 2006, at 7:09 PM, Pupeno wrote: > What I am doing is slightly different. I am making a gen_ (gen_echo > for > example) from which other programs (like echo, supervised or not) > can be > done. That is, I am writing code analogous to gen_server. > My question is if I should use gen_server, copy and paste it, or what. I'm doing something similar for my poker test harness. I'm making the poker bot a gen_server so that it can be properly supervised, etc. Poker bots are given a "script" module to execute. The module exports just one function that the poker bot calls with tcp, etc. events. This is analogous to making a callback module for gen_server but simpler. I suppose there's no harm in making both your server harness _and_ the protocol handlers into gen_servers. Joel -- http://wagerlabs.com/ From joelr1@REDACTED Sat Jan 14 20:43:27 2006 From: joelr1@REDACTED (Joel Reymont) Date: Sat, 14 Jan 2006 19:43:27 +0000 Subject: Supervision tree and notification of child exit Message-ID: <600AFD4F-FE9D-4E58-818E-E683944790DE@gmail.com> Folks, I would like to use a supervision tree and get notified when a child crashes. I would like to know the error as well. Is there a way to achieve this within the supervisor module or would I need to roll a supervisor of my own? I'm coding a test harness and my goal is to log an entry with the pid and exit reason one a child exits. Thanks, Joel -- http://wagerlabs.com/ From rpettit@REDACTED Sun Jan 15 00:07:57 2006 From: rpettit@REDACTED (Rick Pettit) Date: Sat, 14 Jan 2006 17:07:57 -0600 Subject: Supervision tree and notification of child exit In-Reply-To: <600AFD4F-FE9D-4E58-818E-E683944790DE@gmail.com> References: <600AFD4F-FE9D-4E58-818E-E683944790DE@gmail.com> Message-ID: <20060114230757.GA15785@vailsys.com> On Sat, Jan 14, 2006 at 07:43:27PM +0000, Joel Reymont wrote: > Folks, > > I would like to use a supervision tree and get notified when a child > crashes. I would like to know the error as well. Is there a way to > achieve this within the supervisor module or would I need to roll a > supervisor of my own? > > I'm coding a test harness and my goal is to log an entry with the pid > and exit reason one a child exits. I asked a very similar question back in september--the entire thread is in the list archives and begins w/the following post: http://www.erlang.org/ml-archive/erlang-questions/200509/msg00457.html I received the most help from Serge Aleynikov. IIRC the following post helped the most: http://www.erlang.org/ml-archive/erlang-questions/200509/msg00470.html Hope that helps, -Rick From joelr1@REDACTED Sun Jan 15 00:51:50 2006 From: joelr1@REDACTED (Joel Reymont) Date: Sat, 14 Jan 2006 23:51:50 +0000 Subject: Supervision tree and notification of child exit In-Reply-To: <20060114230757.GA15785@vailsys.com> References: <600AFD4F-FE9D-4E58-818E-E683944790DE@gmail.com> <20060114230757.GA15785@vailsys.com> Message-ID: <0CBB8DD1-BA1B-4658-A9B3-4B2E5E669774@gmail.com> Thank you Rick! This is exactly what I'm looking for. And I agree with you that the supervisor could well have some sort of a hook for this since it's already catching child crashes. This list is a treasure-trove of information. Every time I go back to the archives I make it a point to scan that month's worth of postings. -- http://wagerlabs.com/ From ke.han@REDACTED Sun Jan 15 15:24:26 2006 From: ke.han@REDACTED (ke.han) Date: Sun, 15 Jan 2006 22:24:26 +0800 Subject: hipe vs native compilation In-Reply-To: <43C766BB.60804@ericsson.com> References: <43C766BB.60804@ericsson.com> Message-ID: <43CA5B1A.5000601@redstarling.com> Bengt Kleberg wrote: > On 2006-01-12 16:40, Joel Reymont wrote: > > last time i heard the existing hipe targets where: > sparc > x86 > > unless you have a very new mac :-) you can not get native Mac OSX code. Are you implying that the new iMac on Intel can magically compile to native code?? That is, there is no need to wait for a new erlang release that enables OSX-x86? I'm getting in a new iMac in a few weeks and would love to know. thanks, ke han From mikpe@REDACTED Sun Jan 15 17:41:06 2006 From: mikpe@REDACTED (Mikael Pettersson) Date: Sun, 15 Jan 2006 17:41:06 +0100 (MET) Subject: hipe vs native compilation Message-ID: <200601151641.k0FGf6sv012403@harpo.it.uu.se> On Sun, 15 Jan 2006 22:24:26 +0800, ke.han@REDACTED wrote: >Bengt Kleberg wrote: >> On 2006-01-12 16:40, Joel Reymont wrote: > >> >> last time i heard the existing hipe targets where: >> sparc >> x86 >> >> unless you have a very new mac :-) you can not get native Mac OSX code. > >Are you implying that the new iMac on Intel can magically compile to >native code?? That is, there is no need to wait for a new erlang >release that enables OSX-x86? > >I'm getting in a new iMac in a few weeks and would love to know. HiPE supports x86 on Linux and Solaris, and PowerPC on Linux and OSX (as well as a few other CPU/OS combinations not relevant here). Porting HiPE to the x86 version of OSX may or may not be doable; it depends on a number of things, including: - if the assembly language syntax is compatible with GAS - if the C calling conventions are compatible with SVR4 - if sigaction() et al can be overridden to enforce SA_ONSTACK /Mikael From bertil.karlsson@REDACTED Tue Jan 10 10:51:25 2006 From: bertil.karlsson@REDACTED (Bertil Karlsson) Date: Tue, 10 Jan 2006 10:51:25 +0100 Subject: "CONTAINING" asn In-Reply-To: <20060109090309.B020140002A@mail.omnibis.com> References: <20060109090309.B020140002A@mail.omnibis.com> Message-ID: <43C3839D.7060406@ericsson.com> Hi, The CONTAINING constraint is not coverd in the OTP asn1 compiler yet. In your example I think the intention is to embed the encoded value of BaseType at the place of the constraint. The only work around I can think of is to modify the spec so that the type of BaseType becomes a local type instead of a parameter. Then you have to pass the un-encoded value instead of BaseType. /Bertil Eranga Udesh wrote: >Hi, > >Is "CONTAINING" type constraint implemented in Erlang ASN.1 compiler? If >not, are there any workaround ways? Attached is the spec part. > >Please advice soon. > >Thanks, >- Eranga > > From g.fortino@REDACTED Mon Jan 9 23:28:33 2006 From: g.fortino@REDACTED (Giancarlo Fortino) Date: Mon, 9 Jan 2006 23:28:33 +0100 Subject: CFP: Multi-Agent Systems and Simulation 2006 (MAS&S'06) Message-ID: <007c01c6156c$296ba6d0$7f510b3e@kundera> ************************** CALL FOR PAPERS ************************** ------------------------------------------------------ Workshop on Multi-Agent Systems and Simulation (MAS&S) ------------------------------------------------------ to take place during The 4th Annual INDUSTRIAL SIMULATION CONFERENCE 2006 (ISC'06) June 5-7, 2006, Palermo, Italy http://biomath.ugent.be/~eurosis/conf/isc/isc2006/index.html ISC'06 ------ The Industrial Simulation Conference 2006 (ISC'06) aims to give a complete overview of industrial simulation related research and to provide an annual status report on present day industrial simulation research within the European Community and the rest of the world. The exchange of techniques and ideas among the different disciplines, universities and industry, which support the integration of simulation in the everyday workplace, is the basic premise at the heart of ISC'06. ISC'06 is sponsored by the EUROSIS (The European Multidisciplinary Society for Modelling and Simulation Technology), and is hosted by the University of Palermo, Palermo, Italy. Multi-Agent Systems and Simulation (MAS&S'06) ------------------------------------------------- Multi-agent systems (MAS) provide powerful models for representing real-world environments with an appropriate degree of complexity and dynamism. Several industrial experiences have already shown that the use of MAS offers advantages in manufacturing processes, e-Commerce, and network management. Since MAS in such contexts are to be tested before their actual deployment and execution, methodologies that support validation through simulation of the MAS under development are highly required. In fact, MAS simulation cannot only demonstrate that a MAS correctly behaves according to its specifications but can also support the analysis of emergent properties of the MAS under-test. In this track we are interested in the combined issues of multi-agent systems and simulation particularly in the context of Agent Oriented Software Engineering (AOSE). Areas of interest ----------------- We are interested in the following topic areas (although this list should not be treated as exclusive): * Agent-based simulation techniques and methodologies * Discrete-event simulation of Multi-Agent Systems * Simulation as Validation Tool for the development process of MAS * Agent-oriented Methodologies incorporating Simulation tools * MAS Simulation driven by formal models * MAS Simulation toolkits and frameworks * Testing vs. Simulation of MAS * Agents as modeling concept enabling communication between domain experts and simulationists * Industrial case studies based on MAS and simulation/testing * Agent Computational Economics/Agent Computational Finance Program Chairs -------------------- Giancarlo Fortino - Universit? della Calabria, Italy g.fortino@REDACTED Massimo Cossentino - ICAR/CNR and Universit? di Palermo, Italy cossentino@REDACTED Wilma Russo - Universit? della Calabria, Italy w.russo@REDACTED Workshop Program Committee -------------------------- Carol Bernon Institut de Recherche en Informatique de Toulouse, France Giuseppe Di Fatta University of Konstanz, Germany and ICAR/CNR (Palermo), Italy Salvatore Gaglio Universit? di Palermo, Italy Alfredo Garro Universit? della Calabria, Italy Paolo Giorgini Universit? di Trento, Italy Marie-Pierre Gleizes Institut de Recherche en Informatique de Toulouse, France Brian Henderson-Sellers Sydney University of Technology, Australia Franziska Kluegl University of Wuerzburg, Germany Renato Levy Intelligent Automation, Inc, USA Adolfo Lopez Paredes University of Valladolid, Spain Vito Morreale Engineering Ingegneria Informatica SpA, Italy Scott Moss Manchester Metropolitan University, UK Andrea Omicini Universit? di Bologna, Cesena, Italy Juan Pav?n Mestras Universidad Complutense Madrid, Spain Paolo Petta Austrian Research Institute for Artificial Intelligence, Austria Erwan Tranvouez University Paul Cezanne, LSIS, France Giuseppe Vizzari Universit? Milano-Bicocca, Italy Franco Zambonelli Universit? di Modena e Reggio Emilia, Italy Web Site -------- Most recent information about this track may be found at the MAS&S'06 web site at http://lisdip.deis.unical.it/workshops/mass06/index.htm. Submission Guidelines --------------------- Original papers from the above-mentioned or other related areas will be considered. This includes three categories of submissions: 1) original and unpublished research; 2) reports of innovative computing applications in the sciences, engineering, business, government, education and industry; and 3) reports of successful technology transfer to new problem domains. The following paper submission types are possible: - FULL PAPER (including abstract, conclusions, diagrams, references) During review,the submitted full papers can be accepted as a regular 5 page paper. If excellent, full papers can be accepted by the program committee as an extended (8-page) paper. - EXTENDED ABSTRACT (at least five pages) Participants may also submit a 5 page extended abstract for a regular (5 pages) or short (3 pages) paper or poster. - SHORT ABSTRACT (at least three pages) Participants may also submit a 3 page abstract for a short paper or poster. ONE PAGE ABSTRACTS ARE NOT ACCEPTED. Each submission will be reviewed by at least three members of the International Program Committee. All accepted papers will be published in the ISC'2006 Conference Proceedings. Submit your paper electronically at mailto:Philippe.Geril@REDACTED?subject=ISC2006-multiagent. Journal Special Issue --------------------- We have also planned to have a SPECIAL ISSUE on IJAOSE (International Journal on Agent Oriented Software Engineering, Inderscience) with the best papers presented and discussed to the workshop. Important Dates --------------- February 15, 2006: Submission of Papers March 30, 2006: Notification of Acceptance/ Rejection April 30, 2006: Submission of Camera-Ready Copies of Accepted Papers June 5-7, 2006: ISC'06 Takes Place From pete-expires-20060308@REDACTED Sat Jan 7 22:49:15 2006 From: pete-expires-20060308@REDACTED (Pete Kazmier) Date: Sat, 07 Jan 2006 16:49:15 -0500 Subject: trapexit.org hacked and shutdown References: <43BF96B6.2030704@tornkvist.org> Message-ID: <87vewvwvxg.fsf@coco.kazmier.com> Torbj?rn T?rnkvist writes: > I've been running trapexit.org for almost a year now (uptime > is 313 days) and I wonder how useful it has been for people. > Should trapexit.org continue to live, or should I shut it down > completely ? As a newcomer to the Erlang community, I've found trapexit.org to be *extremely* useful. It would be very unfortunate if such a valuable resource were no longer available. From bertil.karlsson@REDACTED Tue Jan 10 10:51:25 2006 From: bertil.karlsson@REDACTED (Bertil Karlsson) Date: Tue, 10 Jan 2006 10:51:25 +0100 Subject: "CONTAINING" asn In-Reply-To: <20060109090309.B020140002A@mail.omnibis.com> References: <20060109090309.B020140002A@mail.omnibis.com> Message-ID: <43C3839D.7060406@ericsson.com> Hi, The CONTAINING constraint is not coverd in the OTP asn1 compiler yet. In your example I think the intention is to embed the encoded value of BaseType at the place of the constraint. The only work around I can think of is to modify the spec so that the type of BaseType becomes a local type instead of a parameter. Then you have to pass the un-encoded value instead of BaseType. /Bertil Eranga Udesh wrote: >Hi, > >Is "CONTAINING" type constraint implemented in Erlang ASN.1 compiler? If >not, are there any workaround ways? Attached is the spec part. > >Please advice soon. > >Thanks, >- Eranga > > From bertil.karlsson@REDACTED Tue Jan 10 10:57:54 2006 From: bertil.karlsson@REDACTED (Bertil Karlsson) Date: Tue, 10 Jan 2006 10:57:54 +0100 Subject: "COMPONENTS OF " asn In-Reply-To: <20060109070643.BB7CE400395@mail.omnibis.com> References: <20060109070643.BB7CE400395@mail.omnibis.com> Message-ID: <43C38522.5060609@ericsson.com> Hi, COMPONENTS OF is supported, but I think the embedded structure containes some uncovered functionality or it may reveal a bug. Since you have sent me your specs in a another mail I can track the error and will look into it later on. /Bertil Eranga Udesh wrote: >Hi, > >I can't compile below definition. > >SIGNATURE{ToBeSigned} ::= SEQUENCE { > algorithmIdentifier AlgorithmIdentifier, > encrypted ENCRYPTED-HASH{ToBeSigned} >} > >SIGNED{ToBeSigned} ::= SEQUENCE { > toBeSigned ToBeSigned, > COMPONENTS OF SIGNATURE{ToBeSigned} >} > >It gives the error, >{asn1, >{illegal_COMPONENTS_OF, >{undefined, >{pt,{'Externaltypereference', >263, >'AuthenticationFramework', >'SIGNATURE'}, >[{type, >[], >{'Externaltypereference', >263, >'AuthenticationFramework', >'ToBeSigned'}, >[], >[], >no}]}}}} > >Error is "COMPONENTS OF" sub-type. Is it a non-supported feature in the >Erlang ASN.1 compiler? Is there any workaround ways? > >Please advice soon. > >Thanks, >- Eranga > > > > From vlad_dumitrescu@REDACTED Mon Jan 16 10:01:31 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Mon, 16 Jan 2006 10:01:31 +0100 Subject: Code repository Message-ID: Hi all, I feel that there should be a code repository for 3rd party Erlang code that is easily searchable and at a smaller granularity than jungerl. Jungerl contains many pearls, but if they happen to be in an application that I don't even know what is about, I'll never look there "just in case". What I'd like to have is a repository for general-use library code. One example would be the many times discussed httpd_utils. In the end, this code might find its way to the standard libraries, but in the meantime why reinvent the wheel just because one didn't know it was already invented? I have a few ideas about how this could be done[*], but I'd like to know how interesting something like this would be for the community. Also, somebody else could have better implementation ideas. best regards, Vlad [*] Authors annotate the code (in jungerl or elsewhere) and a tool will then extract and publish this information online (at trapexit, maybe). One way to annotate might be to choose a standard library module where these functions would best be found, if they were to be included in the standard libs. For example a mapwhile/3 function would be annotated with "lists". From event@REDACTED Tue Jan 10 15:37:43 2006 From: event@REDACTED (event@REDACTED) Date: Tue, 10 Jan 2006 09:37:43 -0500 Subject: ASP-06 at NMR-06 (2nd CFP) Message-ID: <20060110143742.GA29878@bud.cs.uky.edu> (apologies for miultiple copies) SECOND CALL FOR PAPERS ELEVENTH INTERNATIONAL WORKSHOP ON NON-MONOTONIC REASONING Lake District, England, May 30 - June 1, 2006 SPECIAL SESSION ON ANSWER SET PROGRAMMING In the 1980s researchers working in the area of nonmonotonic reasoning discovered that their formalisms could be used to describe the behavior of negation as failure in Prolog. This work has led to the creation of logic programming systems of a new kind - answer set solvers, and to the emergence of a new approach to solving combinatorial search problems, called answer set programming. The aim of the session is to facilitate interactions between researchers interested in the design and implementation of such declarative knowledge representation languages and researchers who work in the areas of knowledge representation and nonmonotonic reasoning. The session on answer set programming is a one-day event and the technical program forms a part of the Eleventh Non-monotonic Reasoning Workshop (NMR2006), to be held in the Lake District area of the UK collocated with the KR 2006 conference. Topics Authors are invited to submit original papers on answer set programming. The list of topics of interest includes but is not limited to: - Language extensions - Algorithms and data structures for ASP - Computational complexity analysis - Optimization techniques needed in ASP systems - Extensions to existing implementations - Performance analysis, benchmarking - Programming methodology - Program development environments - Standardization of system interfaces - Future challenges for ASP systems Session co-chairs Ilkka Niemela Helsinki University of Technology, (Ilkka.Niemela@REDACTED) Mirek Truszczynski University of Kentucky, (mirek@REDACTED) Program committee Marc Denecker, K.U.Leuven, Belgium Wolfgang Faber, University of Calabria, Italy Tomi Janhunen, Helsinki University of Technology, Finland Fangzhen Lin, Hong Kong University of Science and Technology, Hong Kong Inna Pivkina, New Mexico State University, USA Chiaki Sakama, Wakayama University, Japan Hans Tompits, Technische Universit?t Wien, Austria Kewen Wang, Griffith University, Australia Submission details All NMR-06 sessions have the same submission requirements. Submissions are limited to 9 pages using KR paper format. Send a PDF file with the submission to each of the organizers by e-mail. Important dates Submission of papers: 1 Feb 2006 Notification of acceptance: 1 April 2006 Final version (PDF File): 1 May 2006 ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From clima-vii@REDACTED Wed Jan 11 11:39:22 2006 From: clima-vii@REDACTED (=?ISO-2022-JP?B?Q0xJTUEtVklJ?=) Date: Wed, 11 Jan 2006 19:39:22 +0900 (JST) Subject: =?ISO-2022-JP?B?Q0xJTUEtVklJIFNlY29uZCBDYWxsIGZvciBQYXBlcnM=?= Message-ID: <200601111039.BZP44006@mp.nii.ac.jp> [Apologies for cross-postings. Please send to your colleagues.] CLIMA-VII News! --------------- - The CLIMA-VII submission page has been opened. - The link to the 2nd CLIMA contest has been added. - (Partial) financial support for students has been made. - Paper submission deadline has been extended to February 1st. ================= Second Call for Papers ================== CLIMA VII Seventh International Workshop on Computational Logic in Multi-Agent Systems May 8,9 2006 in association with AAMAS2006 (May 8 - 12, 2006) Future University, Hakodate, Japan http://www.fun.ac.jp/aamas2006/ http://research.nii.ac.jp/climaVII/ =========================================================== Aims and scope -------------- Multi-Agent Systems are communities of problem-solving entities that can perceive and act upon their environment to achieve their individual goals as well as joint goals. The work on such systems integrates many technologies and concepts in artificial intelligence and other areas of computing as well as other disciplines. Over recent years, the agent paradigm gained popularity, due to its applicability to a full spectrum of domains, from search engines to educational aids to electronic commerce and trade, e-procurement, recommendation systems, simulation and routing, to cite only some. Computational logic provides a well-defined, general, and rigorous framework for studying syntax, semantics and procedures for various tasks by individual agents, as well as interaction amongst agents in multi-agent systems, for implementations, environments, tools, and standards, and for linking together specification and verification of properties of individual agents and multi-agent systems. The purpose of this workshop is to discuss techniques, based on computational logic, for representing, programming and reasoning about agents and multi-agent systems in a formal way. We solicit unpublished papers on agents and multi-agent systems based upon or relating to computational logic. You can find further information regarding the previous edition of CLIMA in: http://clima.deis.unibo.it/ and the history of CLIMA in: http://research.nii.ac.jp/climaVII/about.html Topics ------ Relevant topics include, but are not limited to, the following: * logical foundations of (multi-)agent systems * extensions of logic programming for (multi-)agent systems * modal logic approaches to (multi-)agent systems * logic-based programming languages for (multi-)agent systems * non-monotonic reasoning in (multi-)agent systems * decision theory for (multi-)agent systems * agent and multi-agent hypothetical reasoning and learning * theory and practice of argumentation for agent reasoning and interaction * knowledge and belief representation and updates in (multi-)agent systems * operational semantics and execution agent models * model checking algorithms, tools, and applications for (multi-) agent logics * semantics of interaction and agent communication languages * distributed constraint satisfaction in multi-agent systems * temporal reasoning for (multi-)agent systems * distributed theorem proving for multi-agent systems * logic-based implementations of (multi-)agent systems * specification and verification of formal properties of (multi-) agent systems Submissions ----------- We welcome and encourage the submission of high quality, original papers, which are not simultaneously submitted for publication elsewhere. Papers should be written in English, formatted according to the Springer Verlag LNCS style, which can be obtained from http://www.springeronline.com and not exceed 16 pages including figures, references, etc. Each paper should include *some examples* illustrating the proposed techniques. Paper submission is electronic via the the online submission system: http://www.easychair.org/CLIMAVII/submit/ Authors who have difficulties with the electronic submission should contact the workshop chairs. Proceedings and post-workshop publications ------------------------------------------ A printed volume of the proceedings will be available at the workshop. Authors of papers presented at the workshop will be asked to extend their contributions, possibly incorporating the results of the workshop discussion, to be included in the workshop post-proceedings, after another round of refereeing. Springer Verlag has accepted in principle to publish the post-proceedings as a volume of the Lecture Notes in Artificial Intelligence series. CLIMA contest ------------- CLIMA VII will also host the second CLIMA contest, organized by Mehdi Dastani, Jurgen Dix, and Peter Novak: http://cig.in.tu-clausthal.de/index.php?id=clima7contest Financial Support for Students ------------------------------ We have some budget for partial economical support for traveling costs for promising students whose papers have been accepted to be presented at CLIMA VII. Please contact Ken Satoh (ksatoh at nii.ac.jp) for details. Important Dates --------------- - Submission Deadline: February 1, 2006 - Notification: February 19, 2006 - Camera Ready Copy Due: March 10, 2006 - CLIMA VII: May 8 and 9, 2006 Workshop Chairs --------------- Katsumi Inoue, National Institute of Informatics, Japan Ken Satoh, National Institute of Informatics, Japan Francesca Toni, Imperial College London, UK Email: clima-vii@REDACTED Programme Committee ------------------- Jose Julio Alferes, New University of Lisbon, Portugal Rafael H. Bordini, University of Durham, UK Gerhard Brewka, University of Leipzig, Germany Stefania Costantini, University of L'Aquila, Italy Juergen Dix, Technical University of Clausthal, Germany Patrick Doherty, Linkoping University, Sweden Phan Ming Dung, AIT, Thailand Thomas Eiter, Vienna University of Technology, Austria Klaus Fischer, DFKI, Germany Michael Fisher, The University of Liverpool, UK Michael Gelfond, Texas Technical University, USA James Harland, RMIT, Australia Hisashi Hayashi, Toshiba, Japan Wiebe van der Hoek, The University of Liverpool, UK Antonis Kakas, University of Cyprus, Cyprus Joao Leite, New University of Lisbon, Portugal Fangzhen Lin, Hong Kong University of Science and Technology, Hong Kong Paola Mello, University of Bologna, Italy John Jules Ch. Meyer, Utrecht University, The Netherlands Leora Morgenstern, IBM T.J. Watson Research Center, USA Naoyuki Nide, Nara Women's University, Japan Maurice Pagnucco, University of New South Wales, Australia Wojciech Penczek, Polish Academy of Sciences, Poland Enrico Pontelli, New Mexico State University, USA Fariba Sadri, Imperial College London, UK Chiaki Sakama, Wakayama University, Japan Abdul Sattar, Griffith University, Australia Hajime Sawamura, Niigata University, Japan Renate Schmidt, University of Manchester, UK Tran Cao Son, New Mexico State University, USA Kostas Stathis, City University London, UK Michael Thielscher, Dresden University of Technology, Germany Satoshi Tojo, Japan Advanced Institute of Science and Technology, Japan Paolo Torroni, University of Bologna, Italy Marina de Vos, University of Bath, UK Cees Witteveen, Delft University of Technology, The Netherlands Home page of CLIMA VII: http://research.nii.ac.jp/climaVII From event@REDACTED Wed Jan 11 15:50:27 2006 From: event@REDACTED (event@REDACTED) Date: 11 Jan 2006 14:50:27 +0000 Subject: 2nd CFP Workshop on logics for resource-bounded agents Message-ID: <200601111450.aa16849@pat.Cs.Nott.AC.UK> SECOND CALL FOR PAPERS WORKSHOP ON LOGICS FOR RESOURCE BOUNDED AGENTS http://www.cs.nott.ac.uk/~nza/LRBA06/ 7 - 11 August 2006 organized as part of the European Summer School on Logic, Language and Information (ESSLLI 2006) (http://esslli2006.lcc.uma.es/) 31 July - 11 August, 2005, Malaga, Spain Workshop organizers: Thomas Agotnes (agotnes@REDACTED) and Natasha Alechina (nza@REDACTED). Contact: bounded06@REDACTED Workshop purpose Logics of knowledge and belief, as well as other attitudes such as desire or intention, have been extensively studied. However, most of the treatments of knowledge and belief make strong and idealised assumptions about the reasoners. For example, traditional epistemic logic say that agents know all logical consequences of their knowledge. Similarly, logics of action and strategic interaction are usually based on game theoretic models which assume perfect rationality. Models based on such assumptions can be used to describe ideal agents without bounds on resources such as time, memory, etc, but they fail to accurately describe non-ideal agents which are computationally bounded. The workshop aims to provide a forum for advanced PhD students and researchers to present and discuss possible solutions to the problem of formally capturing the properties of knowledge, belief, action, etc. of non-idealised resource-bounded agents with colleagues and researchers who work in logic, computer science and other areas represented at ESSLLI. Workshop topics Topics include, but are not limited to, logical models of: - logically non-omniscient agents in general - explicit knowledge and belief - algorithmic knowledge - temporal logics of reasoning - active logics - knowledge and belief of reasoners with bounds on reasoning time - knowledge and belief of reasoners with bounded memory - knowledge and belief of reasoners with other resource bounds (e.g. bandwidth, sensing limitations) - other attitudes, such as desire, intention, etc., under bounded resources - limited awareness - paraconsistent logics - rational choice under bounded resources - games under bounded resources, e.g., - games with bounded recall - resource bounded reasoning about the structure of the game - incomplete information due to bounded resources Workshop details Authors are invited to submit a full paper either describing their published work (which should be instructive and interesting to PhD students working in the field and appropriate for presentation at the Summer School), or new and unpublished work. Submissions should not exceed 15 pages in LaTeX 11pt article style. The following formats are accepted: pdf, ps. Please submit on line at http://www.easychair.org/LRBA06/submit/ For any questions, please use bounded06@REDACTED The submissions will be reviewed by the workshop's programme committee and additional reviewers. The accepted papers will appear in the workshop proceedings published by ESSLLI. It is likely that a selection of (revised and expanded) versions of the workshop papers will appear in a special issue of a journal. Workshop format The workshop is part of ESSLLI and is open to all ESSLLI participants. It will consist of five 90-minute sessions held over five consequtive days in the second week of ESSLLI. There will be 2 slots for paper presentation and discussion per session. On the first day the workshop organizers will give an introduction to the topic. Workshop programme committee Thomas Agotnes (University of Bergen) Natasha Alechina (University of Nottingham) Johan van Benthem (University of Amsterdam) Michael Fisher (University of Liverpool) Chiara Ghidini (ITC-irst) Paul Harrenstein (Ludwig-Maximilians-Universitat Munchen) Wiebe van der Hoek (University of Liverpool) Jacek Malec (Lund University) Donald Perlis (University of Maryland) Luciano Serafini (ITC-irst) Important dates * Submissions: March 8, 2006 * Notification: April 21, 2006 * Final papers for proceedings: May 1, 2006 * Final programme: June 21, 2006 * Workshop dates: 7- 11 August, 2006 Local arrangements All workshop participants including the presenters will be required to register for ESSLLI. The registration fee for authors presenting a paper will correspond to the early student/workshop speaker registration fee. Moreover, a number of fee waiver grants might be made available by the organizing committee on a competitive basis and workshop participants are eligible to apply for those. There will be no reimbursement for travel costs and accomodation. Workshop speakers who have difficulty in finding funding should contact the local organising committee to ask for the possibilities of a grant. Further information: About ESSLLI-2006: http://esslli2006.lcc.uma.es/ About the workshop: http://www.cs.nott.ac.uk/~nza/LRBA06/ This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From ok@REDACTED Thu Jan 12 05:01:00 2006 From: ok@REDACTED (Richard A. O'Keefe) Date: Thu, 12 Jan 2006 17:01:00 +1300 (NZDT) Subject: Escapes within quoted atoms Message-ID: <200601120401.k0C410IR426555@atlas.otago.ac.nz> Roger Price wrote: \^A .. \^Z The given meaning is "control A to control Z (i.e. 0..26)" That should be *ONE* to twenty-six. NUL (16'00) is ^@ (control-at-sign) SOH (16'01) is ^A (control-A) ... SUB (16'1a) is ^Z (control-Z) It is implicit in chapter 2.1.2 that \x => x if x has no other meaning, so why don't I see '\^??' => '^??'. That refers to a single-character x, and \^ *does* have another meaning, so one would not expect \^ ever to pass through unaltered. (One would also not expect it not to pass through unaltered when followed by something that doesn't make sense.) Several other programming languages support something like \^ and the expectation is that you can get *all* of the C0 controls that way, plus DEL, which is traditionally \^?. One excessively trusting tokeniser I happen to have lying around does this: case '^': /* control */ c = getc(card); if (c < 0) goto ERROR; return c == '?' ? 127 : c&31; From mencl@REDACTED Thu Jan 12 17:38:54 2006 From: mencl@REDACTED (Vladimir Mencl) Date: Thu, 12 Jan 2006 17:38:54 +0100 (CET) Subject: CfP: FACS'06 - Formal Aspects of Component Software Message-ID: <20060112163854.1725BD9EBE@nenya.ms.mff.cuni.cz> [Our apologies should you receive multiple copies of this CfP.] ================================================================== Third International Workshop on Formal Aspects of Component Software (FACS'06), First Call for Papers Prague, Czech Republic September 20 -- 22, 2006 FACS'06 is the third in a series of workshops, founded by the International Institute for Software Technology of the United Nations University. The first FACS workshop was held in Pisa, Italy, in September 2003, collocated with FM'03. Subsequently, FACS'05 was held as a standalone event at the United Nations University in Macau, October 24-25, 2005. Workshop Scope and Topics ========================= Component-based software emerged as a promising paradigm to deal with the ever increasing need for mastering systems' complexity, their evolution and reuse, and driving software engineering into sound production and engineering standards. Soon, however, it became a popular technology long before consensual definitions and principles, let alone formal foundations, have been put forward. Issues like mathematical models for components, their interaction and composition, or rigorous approaches to verification, deployment, testing and certification remain open research questions and challenging opportunities for formal methods. Moreover, new challenges are raised by applications of this paradigm to safety-critical, mobile, and embedded systems. The objective of FACS'06 is to bring together researchers in the areas of component software and formal methods to promote a deep understanding of this paradigm and its applications. The workshop will also be interested in defining the common aspects of components and component-based development. It is expected that formal paper presentations will be followed by lively debate in a stimulating atmosphere. Possible topics include, but are not limited to: * formal models for software components and component interaction * design and verification methods for component software * component composition and deployment: models, calculi, languages * component testing * specification of extra-functional properties in component software * certification of components and software architectures * component software vs object orientation * components for real-time, safety-critical, secure and/or embedded systems * experience reports and case studies in component software * partial behavior models for software components * update and reconfiguration of component architectures * formal methods and modeling languages * trust models for components FACS'06 is the third in a series of workshops, founded by the International Institute for Software Technology of the United Nations University (UNU-IIST). The first FACS workshop was held in Pisa, Italy, in September 2003, collocated with FM'03. Next, FACS'05 was organized as a standalone event in October 2004 at UNU-IIST. This has been considered by the workshop participants as a very successful meeting with collaborative atmosphere and friendly discussion. Considering the persisting interest of the participants in the topics, FACS'06 was scheduled again as a separate event, this time to be hosted by the Charles University in Prague, Czech Republic, in September 2006. Program Committee ================= * Farhad Arbab (CWI, The Netherlands) * Luis Barbosa (Universidade do Minho, Portugal) * Frank S. de Boer, (PC Chair, CWI, The Netherlands) * Marcello Bonsangue (LIACS-Leiden University, The Netherlands) * Christiano Braga (Universidade Federal Fluminense, Brazil) * Manfred Broy (Technical University of Munich, Germany) * Carlos Canal (Universidad de Malaga, Spain) * Paolo Ciancarini (Universita di Bologna, Italy) * Thierry Coupaye (France Telecom R&D, France) * Joao Faria (Universidade do Porto, Portugal) * Jose Fiadeiro (University of Leicester, United Kingdom) * Susanne Graf (VERIMAG, France) * Martin Grosse-Rhode (Fraunhofer-ISST, Germany) * Rolf Hennicker (Ludwig-Maximilians-Universitaet Muenchen, Germany) * He Jifeng (East China Normal University, China) * Einar Broch Johnsen (Universitetet i Oslo, Norway) * Bengt Jonsson (Uppsala University, Sweden) * Mathai Joseph (Tata Consultancy Services Limited, India) * Atsushi Igarashi (Kyoto University, Japan) * Kung-Kiu Lau (The University of Manchester, United Kingdom) * Zhiming Liu (UNU-IIST, Macao) * Markus Lumpe (Iowa State University, USA) * Eric Madelaine (INRIA, Centre Sophia Antipolis, France) * Vladimir Mencl (PC Chair, UNU-IIST, Macao and Charles Univ., Czech Rep.) * Sun Meng (National University of Singapore, Singapore) * Frantisek Plasil (Charles University, Czech Republic) * Anders Ravn (Aalborg University, Denmark) * Ralf Reussner (University of Oldenburg, Germany) * Bernhard Schaetz (Technical University of Munich, Germany) * Joseph Sifakis (VERIMAG, France) * Jean-Bernard Stefani (INRIA Rhones-Alpes, France) * Carolyn Talcott (SRI International, USA) Important Dates =============== Submission deadline: June 11, 2006 Acceptance notification: July 23, 2006 Camera ready version due: Aug 20, 2006 Workshop: September 20-22, 2006 Submission & Proceedings ======================== Submissions to the workshop will be judged on the basis of originality, relevance, technical soundness and presentation quality. Papers should be written in English and not exceed 15 pages in ENTCS format. The workshop proceedings will be published in Electronic Notes in Theoretical Computer Science, Elsevier, as post-proceedings; in addition, informal workshop proceedings will be handed out to participants during the workshop. Submission of papers will be in electronic form via an online system; detailed instructions will be posted on the workshop website. The final version of the paper must be prepared in LaTeX, adhering to the ENTCS format instructions (http://www.entcs.org/final.html). Venue ===== Prague is a charming city with a long medieval history. The workshop will be held in School of Computer Science of the Charles University, which is located right in the Prague's most famous historical district of the Lesser Town ("Mala Strana") of Prague. The building itself has been recently carefully renovated, reconstructing the architectural style of a Jesuit College. The timing of the workshop may allow us to enjoy the nice sunny period, when the weather is not hot anymore, but the early fall sunshine makes sightseeing walks very enjoyable, emphasizing fine features of the Prague's many historic buildings. Contact Information =================== Program Committee Chairs ------------------------ Frank S. de Boer (CWI, The Netherlands) http://homepages.cwi.nl/~frb/ F.S.de.Boercwi.nl Vladimir Mencl (UNU-IIST, Macao SAR China and Charles University in Prague, Czech Republic) http://nenya.ms.mff.cuni.cz/~mencl/ menclnenya.ms.mff.cuni.cz Local Arrangements ------------------ Milena Zeithamlova (Action M Agency) milena@REDACTED http://www.action-m.com Past workshops -------------- * FACS'03, Pisa, Italy, September 8-9, 2003, http://www.iist.unu.edu/facs03/ * FACS'05, Macao, October 24-25, 2005, http://www.iist.unu.edu/facs05/ Sponsoring Organizations ------------------------ * United Nations University, International Institute for Software Technology (UNU-IIST), Macao SAR China * Charles University in Prague, Faculty of Mathematics and Physics, Department of Software Engineering, Czech Republic * Centrum voor Wiskunde en Informatica (CWI), The Netherlands Workshop website ---------------- http://www.iist.unu.edu/facs06/ ================================================================== From bertil.karlsson@REDACTED Fri Jan 13 13:27:18 2006 From: bertil.karlsson@REDACTED (Bertil Karlsson (AS/EAB)) Date: Fri, 13 Jan 2006 13:27:18 +0100 Subject: XML Schema support Message-ID: <63E39ADA42BF8B49BEAE3666683A248401D271D9@esealmw107.eemea.ericsson.se> Hi Willem and others, We have been planning support for XML Schema as part of the xmerl application. Our plan is to release something at the latest in the OTP-R11 release. So far I have been studying the standards and just started on the implemenation. It would be nice to have some discussion about this especially since there seems to be a user-contribution of a schema validator. Maybe we could do some cooperation in the area of this application. /Bertil -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Willem de Jong Sent: den 12 januari 2006 21:40 To: erlang-questions@REDACTED Subject: Re: XML Schema support Hi, I am pleased that there seems to be some interest in my work, thanks for the feedback. It was enough to convince me that, if I publish this, one or two people will take the trouble to find out what it is and whether they can use it. I will try to prepare it for distribution: tie up some loose ends, prepare some documentation etc. In the mean time I will think about the way to publish it. I haven't made my mind up yet - I got the advise to put it on Jungerl, but for some reason I don't get a clear picture of what it is and how it is supposed to work. What would be the benefit of putting it there (compared to, for example, a separate sourceforge project ?) It looks like the focus of my project is shifting from being an Erlang trial to being an open source software project-trial... So I may take the liberty to experiment a little bit (with sourceforge etc.). All in all it will probably take a week or two (this is just a hobby project - I have to work during the day...). Regards, Willem From bertil.karlsson@REDACTED Thu Jan 12 16:51:46 2006 From: bertil.karlsson@REDACTED (Bertil Karlsson) Date: Thu, 12 Jan 2006 16:51:46 +0100 Subject: xmerl: Option {prolog,stop} removed between 0.17 and 1.0.3 ? In-Reply-To: References: Message-ID: <43C67B12.3060504@ericsson.com> That option was removed before the first OTP-release. I cannot remember the reason why it was removed and I have not found any comments about it either. /Bertil Adam Aquilon wrote: > > Does anyone know why the {prolog,stop} option was removed somewhere > between xmerl-0.17 and xmerl-1.0.3 ? > > Is there a replacement for it? > > --------------- > > I studied the changelogs available at sowap.sourceforge.net and the ones > that are part of the 1.0.3 documentation, but could only find the > addition > of the feature in xmerl-0.16. There was no mention of it being removed > (as far as I could see). > > When trying to run old code against 1.0.3, I got a 'function_clause' > exception in xmerl_scan:initial_state([{prolog,stop}], ). > There is no clause handling the {prolog,stop} option. > > Thanks in advance for any info on this, > Adam Aquilon From tobbe@REDACTED Mon Jan 16 12:29:48 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Mon, 16 Jan 2006 12:29:48 +0100 Subject: Code repository In-Reply-To: References: Message-ID: There is already a 'msc' (misc) library in jungerl. Why not put single modules there and add html documentation to msc/doc. This way it will automatically be visible under http://www.trapexit/org/uc/jungerl/lib/msc/doc. It would also be possible to create erlmerge packages to be uploaded to trapexit.org (requires some adjustments so that single modules can be separated into different packages). Btw: Has anyone (apart from myself) tried erlmerge ? Personally, I find it extremely useful... ;-) Cheers, Tobbe Vlad Dumitrescu wrote: > Hi all, > > I feel that there should be a code repository for 3rd party Erlang code that > is easily searchable and at a smaller granularity than jungerl. Jungerl > contains many pearls, but if they happen to be in an application that I > don't even know what is about, I'll never look there "just in case". > > What I'd like to have is a repository for general-use library code. One > example would be the many times discussed httpd_utils. In the end, this code > might find its way to the standard libraries, but in the meantime why > reinvent the wheel just because one didn't know it was already invented? > > I have a few ideas about how this could be done[*], but I'd like to know how > interesting something like this would be for the community. Also, somebody > else could have better implementation ideas. > > best regards, > Vlad > > [*] Authors annotate the code (in jungerl or elsewhere) and a tool will then > extract and publish this information online (at trapexit, maybe). > One way to annotate might be to choose a standard library module where > these functions would best be found, if they were to be included in the > standard libs. For example a mapwhile/3 function would be annotated with > "lists". > From vlad.xx.dumitrescu@REDACTED Mon Jan 16 12:59:49 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Mon, 16 Jan 2006 12:59:49 +0100 Subject: Code repository Message-ID: <11498CB7D3FCB54897058DE63BE3897C01162A73@esealmw105.eemea.ericsson.se> > Torbjorn Tornkvist wrote: > > There is already a 'msc' (misc) library in jungerl. > Why not put single modules there and add html documentation > to msc/doc. This way it will automatically be visible under > http://www.trapexit/org/uc/jungerl/lib/msc/doc. Yes, I know, and it is also a possible solution. A problem is that if the code in msc is just a copy of the original (for example a part of httpd_util), it won't be maintained properly - it requires extra work and we're all lazy, right? :-) If we weren't, we would program in C++... Moving the generic parts of the original to a new module in msc requires the applications to be refactored, which also needs effort. I was thinking of an semi-automated solution, where the developer is only required to add a tag in the code, identifying it as a generic snippet. A tool could automagically extract the snippet into a database [*] and update it once in a while. Users would be able to browse/search the database (see http://pear.php.net/packages.php, for example) and use an erlmerge-like tool to retrieve the code into their local source tree. (exactly how to do this I haven't figured yet, it's just a thought in progress [tm]. Wild ideas I have plenty, like for example putting together snippets with same tags inside a single virtual module) [*] maybe even CVS? > Btw: Has anyone (apart from myself) tried erlmerge ? > Personally, I find it extremely useful... ;-) I tried it once to check if it really works, but after that I didn't need the applications that can be erlmerged. /Vlad From tobbe@REDACTED Mon Jan 16 13:30:50 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Mon, 16 Jan 2006 13:30:50 +0100 Subject: Code repository In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C01162A73@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C01162A73@esealmw105.eemea.ericsson.se> Message-ID: Vlad Dumitrescu XX (LN/EAB) wrote: >>Torbjorn Tornkvist wrote: >> >>There is already a 'msc' (misc) library in jungerl. >>Why not put single modules there and add html documentation >>to msc/doc. This way it will automatically be visible under >>http://www.trapexit/org/uc/jungerl/lib/msc/doc. > > > Yes, I know, and it is also a possible solution. > > A problem is that if the code in msc is just a copy of the original (for > example a part of httpd_util), it won't be maintained properly - it > requires extra work and we're all lazy, right? :-) If we weren't, we > would program in C++... > > Moving the generic parts of the original to a new module in msc requires > the applications to be refactored, which also needs effort. > > I was thinking of an semi-automated solution, where the developer is > only required to add a tag in the code, identifying it as a generic > snippet. A tool could automagically extract the snippet into a database > [*] and update it once in a while. Users would be able to browse/search > the database (see http://pear.php.net/packages.php, for example) and use > an erlmerge-like tool to retrieve the code into their local source tree. Yes, it could be nice to have this kind of ability to build up sort of like a recepie DB. I often finds my self searching through old code to find and reuse snippets of code. So if you can come up with a solution then why not. I can get you an account at trapexit.org if you want to put it there. But still, many reusable code libraries would be modules. --Tobbe > > (exactly how to do this I haven't figured yet, it's just a thought in > progress [tm]. Wild ideas I have plenty, like for example putting > together snippets with same tags inside a single virtual module) > > [*] maybe even CVS? > > >>Btw: Has anyone (apart from myself) tried erlmerge ? >>Personally, I find it extremely useful... ;-) > > > I tried it once to check if it really works, but after that I didn't > need the applications that can be erlmerged. > > /Vlad > From sanjaya@REDACTED Mon Jan 16 13:32:23 2006 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Mon, 16 Jan 2006 18:32:23 +0600 Subject: mnesia_frag ???? Message-ID: <006c01c61a98$e7012180$5f00a8c0@wavenet.lk> Hi .. !!! Can any one show me where I'm doing wrong, I'm trying to write a single record & retrive it using mnesia_frag. But it's not working :( for me. (vmdb@REDACTED)29> mnesia:table_info(profile_db, frag_properties). [{base_table,profile_db}, {foreign_key,undefined}, {hash_module,mnesia_frag_hash}, {hash_state,{hash_state,30,15,4}}, {n_fragments,30}, {node_pool,[vmdb@REDACTED]}] (vmdb@REDACTED)31> WriteFun1 = fun(DbFile, Rec) -> mnesia:write(DbFile, Rec, write)end. #Fun (vmdb@REDACTED)32> mnesia:activity(transaction, WriteFun1, [profile_db, {profile_db,777,"test",333,1234,5678,1234}], mnesia_frag). ok --- Here it shows as it works (vmdb@REDACTED)33> ReadFun = fun(Db,DBKey) -> mnesia:dirty_read(Db, DBKey)end. #Fun (vmdb@REDACTED)34> mnesia:activity(transaction, ReadFun, [profile_db,777], mnesia_frag). [] -- but empty list given when try to retrive (vmdb@REDACTED)35> mnesia:dirty_first(profile_db). '$end_of_table' --- since the db should contains only 2 records, I tried this. but :( (vmdb@REDACTED)36> Furthermore I have used below, to create the DB. -record(profile_db, {mobile_no, prof_details, type, last_update_date, first_creation_date, fax_no}). Res = mnesia:create_table(profile_db,[ {disc_copies, NodeList}, {type, ordered_set}, {index, [type, last_update_date, first_creation_date, fax_no]}, {frag_properties, [{n_fragments, 30}]}, {attributes, record_info(fields, profile_db)} ]), ---------------------------------------------------------------------------------------------------------------------------------------------------- consider the mnesia:info() result below, and note that the profile_db_frag2: with 1 records occupying 95 words of mem disc_copies = [schema] but I have used {disc_copies, NodeList} ---------------------------------------------------------------------------------------------------------------------------------------------------- (vmdb@REDACTED)43> mnesia:info(). ---> Processes holding locks <--- ---> Processes waiting for locks <--- ---> Participant transactions <--- ---> Coordinator transactions <--- ---> Uncertain transactions <--- ---> Active tables <--- profile_db : with 0 records occupying 70 words of mem profile_db_frag2: with 1 records occupying 95 words of mem ...... profile_db_frag13: with 1 records occupying 95 words of mem ....... profile_db_frag29: with 0 records occupying 70 words of mem profile_db_frag30: with 0 records occupying 70 words of mem schema : with 31 records occupying 4380 words of mem ===> System info in version "4.2.3", debug level = none <=== opt_disc. Directory "/usr2/omni_vm_prof/db/vmdb" is used. use fallback at restart = false running db nodes = [vmdb@REDACTED] stopped db nodes = [] master node tables = [] remote = [] ram_copies = [profile_db, profile_db_frag10, profile_db_frag11, ... profile_db_frag8, profile_db_frag9] disc_copies = [schema] disc_only_copies = [] [{vmdb@REDACTED,disc_copies}] = [schema] [{vmdb@REDACTED,ram_copies}] = [profile_db_frag30, profile_db_frag29, ..... profile_db_frag3, profile_db_frag2, profile_db] 12 transactions committed, 5 aborted, 0 restarted, 0 logged to disc 0 held locks, 0 in queue; 0 local transactions, 0 remote 0 transactions waits for other nodes: [] ok (vmdb@REDACTED)44> I have confused with the results, can anyone explane this ?? Thanks in advance. Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.wiger@REDACTED Mon Jan 16 13:41:51 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 16 Jan 2006 13:41:51 +0100 Subject: mnesia_frag ???? Message-ID: Don't use mnesia:dirty_read/2 as your read function. Try with mnesia:read({Tab, Key}) instead. Dirty_read() goes directly to the (base-) table, and has no concept of mnesia_frag. /Uffe ________________________________ From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Sanjaya Vitharana Sent: den 16 januari 2006 13:32 To: erlang-questions@REDACTED Subject: mnesia_frag ???? Hi .. !!! Can any one show me where I'm doing wrong, I'm trying to write a single record & retrive it using mnesia_frag. But it's not working :( for me. (vmdb@REDACTED)29> mnesia:table_info(profile_db, frag_properties). [{base_table,profile_db}, {foreign_key,undefined}, {hash_module,mnesia_frag_hash}, {hash_state,{hash_state,30,15,4}}, {n_fragments,30}, {node_pool,[vmdb@REDACTED]}] (vmdb@REDACTED)31> WriteFun1 = fun(DbFile, Rec) -> mnesia:write(DbFile, Rec, write)end. #Fun (vmdb@REDACTED)32> mnesia:activity(transaction, WriteFun1, [profile_db, {profile_db,777,"test",333,1234,5678,1234}], mnesia_frag). ok --- Here it shows as it works (vmdb@REDACTED)33> ReadFun = fun(Db,DBKey) -> mnesia:dirty_read(Db, DBKey)end. #Fun (vmdb@REDACTED)34> mnesia:activity(transaction, ReadFun, [profile_db,777], mnesia_frag). [] -- but empty list given when try to retrive (vmdb@REDACTED)35> mnesia:dirty_first(profile_db). '$end_of_table' --- since the db should contains only 2 records, I tried this. but :( (vmdb@REDACTED)36> Furthermore I have used below, to create the DB. -record(profile_db, {mobile_no, prof_details, type, last_update_date, first_creation_date, fax_no}). Res = mnesia:create_table(profile_db,[ {disc_copies, NodeList}, {type, ordered_set}, {index, [type, last_update_date, first_creation_date, fax_no]}, {frag_properties, [{n_fragments, 30}]}, {attributes, record_info(fields, profile_db)} ]), ------------------------------------------------------------------------ ------------------------------------------------------------------------ ---- consider the mnesia:info() result below, and note that the profile_db_frag2: with 1 records occupying 95 words of mem disc_copies = [schema] but I have used {disc_copies, NodeList} ------------------------------------------------------------------------ ------------------------------------------------------------------------ ---- (vmdb@REDACTED)43> mnesia:info(). ---> Processes holding locks <--- ---> Processes waiting for locks <--- ---> Participant transactions <--- ---> Coordinator transactions <--- ---> Uncertain transactions <--- ---> Active tables <--- profile_db : with 0 records occupying 70 words of mem profile_db_frag2: with 1 records occupying 95 words of mem ...... profile_db_frag13: with 1 records occupying 95 words of mem ....... profile_db_frag29: with 0 records occupying 70 words of mem profile_db_frag30: with 0 records occupying 70 words of mem schema : with 31 records occupying 4380 words of mem ===> System info in version "4.2.3", debug level = none <=== opt_disc. Directory "/usr2/omni_vm_prof/db/vmdb" is used. use fallback at restart = false running db nodes = [vmdb@REDACTED] stopped db nodes = [] master node tables = [] remote = [] ram_copies = [profile_db, profile_db_frag10, profile_db_frag11, ... profile_db_frag8, profile_db_frag9] disc_copies = [schema] disc_only_copies = [] [{vmdb@REDACTED,disc_copies}] = [schema] [{vmdb@REDACTED,ram_copies}] = [profile_db_frag30, profile_db_frag29, ..... profile_db_frag3, profile_db_frag2, profile_db] 12 transactions committed, 5 aborted, 0 restarted, 0 logged to disc 0 held locks, 0 in queue; 0 local transactions, 0 remote 0 transactions waits for other nodes: [] ok (vmdb@REDACTED)44> I have confused with the results, can anyone explane this ?? Thanks in advance. Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From vlad.xx.dumitrescu@REDACTED Mon Jan 16 13:46:49 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Mon, 16 Jan 2006 13:46:49 +0100 Subject: Code repository Message-ID: <11498CB7D3FCB54897058DE63BE3897C01162AA2@esealmw105.eemea.ericsson.se> > Yes, it could be nice to have this kind of ability to build > up sort of like a recepie DB. I often finds my self searching > through old code to find and reuse snippets of code. So if > you can come up with a solution then why not. I can get you > an account at trapexit.org if you want to put it there. Thanks, I'll get back to you when I have more than just ideas. > But still, many reusable code libraries would be modules. True. These could be handled in a similar way - tagged and automagically made searchable and erlmerge-able. /Vlad From rikard.johansson@REDACTED Mon Jan 16 14:01:41 2006 From: rikard.johansson@REDACTED (Rikard Johansson) Date: Mon, 16 Jan 2006 14:01:41 +0100 Subject: mnesia_frag ???? In-Reply-To: References: Message-ID: <43CB9935.2000701@mobilearts.com> As Ulf says, you should use mnesia:read within the ReadFun, ReadFun = fun(Db,DBKey) -> mnesia:read({Db, DBKey}) end. However, if you want "dirty access" you can use the 'sync_dirty' AccessContext. mnesia:activity(sync_dirty, ReadFun, [profile_db,777], mnesia_frag). /Rikard Ulf Wiger (AL/EAB) wrote: > > Don't use mnesia:dirty_read/2 as your read function. > Try with mnesia:read({Tab, Key}) instead. > > Dirty_read() goes directly to the (base-) table, and has no concept of > mnesia_frag. > > /Uffe > > ------------------------------------------------------------------------ > *From:* owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] *On Behalf Of *Sanjaya > Vitharana > *Sent:* den 16 januari 2006 13:32 > *To:* erlang-questions@REDACTED > *Subject:* mnesia_frag ???? > > Hi .. !!! > > Can any one show me where I'm doing wrong, I'm trying to write a > single record & retrive it using mnesia_frag. > > But it's not working :( for me. > > (vmdb@REDACTED)29 > > mnesia:table_info(profile_db, frag_properties). > [{base_table,profile_db}, > {foreign_key,undefined}, > {hash_module,mnesia_frag_hash}, > {hash_state,{hash_state,30,15,4}}, > {n_fragments,30}, > {node_pool,[vmdb@REDACTED]}] > (vmdb@REDACTED)31 > WriteFun1 = fun(DbFile, > Rec) -> mnesia:write(DbFile, Rec, write)end. > #Fun > (vmdb@REDACTED)32 > > mnesia:activity(transaction, WriteFun1, [profile_db, > {profile_db,777,"test",333,1234,5678,1234}], mnesia_frag). > ok --- Here it shows as it works > (vmdb@REDACTED)33 > ReadFun = fun(Db,DBKey) > -> mnesia:dirty_read(Db, DBKey)end. > #Fun > (vmdb@REDACTED)34 > > mnesia:activity(transaction, ReadFun, [profile_db,777], mnesia_frag). > [] -- but empty list given when try to retrive > (vmdb@REDACTED)35 > > mnesia:dirty_first(profile_db). > '$end_of_table' --- since the db should contains only 2 records, I > tried this. but :( > (vmdb@REDACTED)36 > > > > Furthermore I have used below, to create the DB. > > -record(profile_db, {mobile_no, prof_details, type, > last_update_date, first_creation_date, fax_no}). > > Res = mnesia:create_table(profile_db,[ > {disc_copies, NodeList}, > {type, ordered_set}, > {index, [type, last_update_date, > first_creation_date, fax_no]}, > {frag_properties, [{n_fragments, 30}]}, > {attributes, record_info(fields, profile_db)} > ]), > > ---------------------------------------------------------------------------------------------------------------------------------------------------- > consider the mnesia:info() result below, and note that the > profile_db_frag2: with 1 records occupying 95 words of mem > disc_copies = [schema] > but I have used {disc_copies, NodeList} > ---------------------------------------------------------------------------------------------------------------------------------------------------- > > (vmdb@REDACTED)43 > > mnesia:info(). > ---> Processes holding locks <--- > ---> Processes waiting for locks <--- > ---> Participant transactions <--- > ---> Coordinator transactions <--- > ---> Uncertain transactions <--- > ---> Active tables <--- > profile_db : with 0 records occupying 70 words of mem > profile_db_frag2: with 1 records occupying 95 words of mem > ...... > profile_db_frag13: with 1 records occupying 95 words of mem > ....... > profile_db_frag29: with 0 records occupying 70 words of mem > profile_db_frag30: with 0 records occupying 70 words of mem > schema : with 31 records occupying 4380 words of mem > ===> System info in version "4.2.3", debug level = none <=== > opt_disc. Directory "/usr2/omni_vm_prof/db/vmdb" is used. > use fallback at restart = false > running db nodes = [vmdb@REDACTED] > stopped db nodes = [] > master node tables = [] > remote = [] > ram_copies = [profile_db, > profile_db_frag10, > profile_db_frag11, > > ... > > profile_db_frag8, > profile_db_frag9] > disc_copies = [schema] > disc_only_copies = [] > [{vmdb@REDACTED,disc_copies}] = [schema] > [{vmdb@REDACTED,ram_copies}] = [profile_db_frag30, > profile_db_frag29, > > ..... > > profile_db_frag3, > profile_db_frag2, > profile_db] > 12 transactions committed, 5 aborted, 0 restarted, 0 logged to disc > 0 held locks, 0 in queue; 0 local transactions, 0 remote > 0 transactions waits for other nodes: [] > ok > (vmdb@REDACTED)44 > > > > I have confused with the results, can anyone explane this ?? > > Thanks in advance. > > Sanjaya Vitharana From ulf.wiger@REDACTED Mon Jan 16 15:03:13 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 16 Jan 2006 15:03:13 +0100 Subject: mnesia_frag ???? Message-ID: ...But I would strongly recommend against using dirty access in combination with fragmented tables. The thing about dirty access is that it's only at best semi-safe when multiple table copies are involved. Both read and write in fragmented tables are complex operations. While dirty will work most of the time, it can give you some really nasty surprises... /Uffe > -----Original Message----- > From: Rikard Johansson [mailto:rikard.johansson@REDACTED] > Sent: den 16 januari 2006 14:02 > To: Ulf Wiger (AL/EAB) > Cc: Sanjaya Vitharana; erlang-questions@REDACTED > Subject: Re: mnesia_frag ???? > > > > As Ulf says, you should use mnesia:read within the ReadFun, > > ReadFun = fun(Db,DBKey) -> mnesia:read({Db, DBKey}) end. > > However, if you want "dirty access" you can use the 'sync_dirty' > AccessContext. > > mnesia:activity(sync_dirty, ReadFun, [profile_db,777], mnesia_frag). > > /Rikard > > Ulf Wiger (AL/EAB) wrote: > > > > Don't use mnesia:dirty_read/2 as your read function. > > Try with mnesia:read({Tab, Key}) instead. > > > > Dirty_read() goes directly to the (base-) table, and has no > concept of > > mnesia_frag. > > > > /Uffe > > > > > -------------------------------------------------------------- > ---------- > > *From:* owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED] *On Behalf > Of *Sanjaya > > Vitharana > > *Sent:* den 16 januari 2006 13:32 > > *To:* erlang-questions@REDACTED > > *Subject:* mnesia_frag ???? > > > > Hi .. !!! > > > > Can any one show me where I'm doing wrong, I'm trying to write a > > single record & retrive it using mnesia_frag. > > > > But it's not working :( for me. > > > > (vmdb@REDACTED)29 > > > mnesia:table_info(profile_db, frag_properties). > > [{base_table,profile_db}, > > {foreign_key,undefined}, > > {hash_module,mnesia_frag_hash}, > > {hash_state,{hash_state,30,15,4}}, > > {n_fragments,30}, > > {node_pool,[vmdb@REDACTED]}] > > (vmdb@REDACTED)31 > WriteFun1 > = fun(DbFile, > > Rec) -> mnesia:write(DbFile, Rec, write)end. > > #Fun > > (vmdb@REDACTED)32 > > > mnesia:activity(transaction, WriteFun1, [profile_db, > > {profile_db,777,"test",333,1234,5678,1234}], mnesia_frag). > > ok --- Here it shows as it works > > (vmdb@REDACTED)33 > ReadFun = > fun(Db,DBKey) > > -> mnesia:dirty_read(Db, DBKey)end. > > #Fun > > (vmdb@REDACTED)34 > > > mnesia:activity(transaction, ReadFun, [profile_db,777], > mnesia_frag). > > [] -- but empty list given when try to retrive > > (vmdb@REDACTED)35 > > > mnesia:dirty_first(profile_db). > > '$end_of_table' --- since the db should contains only > 2 records, I > > tried this. but :( > > (vmdb@REDACTED)36 > > > > > > > Furthermore I have used below, to create the DB. > > > > -record(profile_db, {mobile_no, prof_details, type, > > last_update_date, first_creation_date, fax_no}). > > > > Res = mnesia:create_table(profile_db,[ > > {disc_copies, NodeList}, > > {type, ordered_set}, > > {index, [type, last_update_date, > > first_creation_date, fax_no]}, > > {frag_properties, [{n_fragments, 30}]}, > > {attributes, record_info(fields, > profile_db)} > > ]), > > > > > -------------------------------------------------------------- > -------------------------------------------------------------- > ------------------------ > > consider the mnesia:info() result below, and note that the > > profile_db_frag2: with 1 records occupying 95 > words of mem > > disc_copies = [schema] > > but I have used {disc_copies, NodeList} > > > > > ---------------------------------------------------------------------- > > > ---------------------------------------------------------------------- > > -------- > > > > (vmdb@REDACTED)43 > > > mnesia:info(). > > ---> Processes holding locks <--- > > ---> Processes waiting for locks <--- > > ---> Participant transactions <--- > > ---> Coordinator transactions <--- > > ---> Uncertain transactions <--- > > ---> Active tables <--- > > profile_db : with 0 records occupying 70 > words of mem > > profile_db_frag2: with 1 records occupying 95 > words of mem > > ...... > > profile_db_frag13: with 1 records occupying 95 > words of mem > > ....... > > profile_db_frag29: with 0 records occupying 70 > words of mem > > profile_db_frag30: with 0 records occupying 70 > words of mem > > schema : with 31 records occupying 4380 > words of mem > > ===> System info in version "4.2.3", debug level = none <=== > > opt_disc. Directory "/usr2/omni_vm_prof/db/vmdb" is used. > > use fallback at restart = false > > running db nodes = [vmdb@REDACTED] > > stopped db nodes = [] > > master node tables = [] > > remote = [] > > ram_copies = [profile_db, > > profile_db_frag10, > > profile_db_frag11, > > > > ... > > > > profile_db_frag8, > > profile_db_frag9] > > disc_copies = [schema] > > disc_only_copies = [] > > [{vmdb@REDACTED,disc_copies}] = [schema] > > [{vmdb@REDACTED,ram_copies}] = [profile_db_frag30, > > profile_db_frag29, > > > > ..... > > > > profile_db_frag3, > > profile_db_frag2, > > profile_db] > > 12 transactions committed, 5 aborted, 0 restarted, 0 > logged to disc > > 0 held locks, 0 in queue; 0 local transactions, 0 remote > > 0 transactions waits for other nodes: [] > > ok > > (vmdb@REDACTED)44 > > > > > > > I have confused with the results, can anyone explane this ?? > > > > Thanks in advance. > > > > Sanjaya Vitharana > > From event@REDACTED Mon Jan 16 12:46:50 2006 From: event@REDACTED (event@REDACTED) Date: Mon, 16 Jan 2006 11:46:50 +0000 Subject: Mochart IV CFP Message-ID: <43CB87AA.9030400@ucl.ac.uk> With apologies for multiple copies. ----------------------------------------------------------------- FIRST CALL FOR PAPERS MOCHART IV 4th International Workshop on Model checking and Artificial Intelligence Satellite workshop of ECAI 2006 Riva del Garda, 29 August 2006 http://ls5-www.cs.uni-dortmund.de/~edelkamp/mochart ----------------------------------------------------------------- The forth edition of the MOCHART workshop series aims at bringing together researchers interested in topics related to the use of formal verification by model checking and artificial intelligence techniques. Specifically, the workshop aims at providing a forum for discussing the growing interplay between state space exploration techniques that combine AI and traditional model checking methods. The theme of AI and multiagent systems is also expected to feature. The workshop will be held as a satellite workshop of ECAI06, the 17-th edition of the biannual European conference on Artificial Intelligence. Previous editions of the workshop were held in San Francisco in 2005 (as satellite workshop of Concur), Acapulco in 2003 (as satellite workshop of IJCAI03), Lyon in 2002 (as satellite workshop of ECAI02). WORKSHOP SPECIFIC THEMES Workshop themes include both applied and theoretical results on topics on the interplay between AI and model checking. Specifically, emphasis to to the following specific themes will be given: * Planning via model checking, * Model checking via planning techniques. * Verification of multiagent systems via model checking. * Model checking of AI systems. * Model checking for diagnosis systems and games. * Complexity of model checking algorithms and problems. * AI heuristics for model checking. * AI abstraction techniques for model checking. * Concurrency models in AI. * Case studies and tools related to any of these topics. PUBLICATION DETAILS Informal proceedings of the workshop, published by ECAI, will be made available to all workshop participants on the day. Springer Verlag have indicated their intention to publish post-proceedings in the LNAI series. IMPORTANT DATES * Submission deadline: 10 April 2006 * Notification of acceptance: 10 May 2006 * Final (workshop) versions due: 20 May 2006 SUBMISSION DETAILS Authors are invited to send original papers in ps or pdf format by 10 April 2006 by email to mochart4adastral.ucl.ac.uk. The paper should not exceed 15 pages, and should preferably formatted in LNCS article style. ORGANISERS Stefan Edelkamp (University of Dortmund, Germany) Alessio Lomuscio (University College London, UK) PROGRAM COMMITTEE Massimo Benerecetti (Universita' di Napoli, Italy) Armin Biere (Johannes Kepler University, Linz, Austria) Rafael H. Bordini (University of Durham, UK) Edmund Clarke (Carnegie Mellon University, USA) Alessandro Cimatti (IRST, Trento, Italy) Enrico Giunchiglia (Universita' di Genova, Italy) Joerg Hoffmann (MPI, Saarbrucken, Germany) Froduald Kabanza (Universite de Sherbrooke, Canada) Richard Korf (UCLA, USA) Stefan Leue (University of Konstanz, Germany) Ron van der Meyden (UNSW and NICTA, Australia) Charles Pecheur (Universite catholique de Louvain, Belgium) Wojciech Penczek (ICS PAS and Podlasie Academy, Poland) Mark D. Ryan (University of Birmingham, UK) Brian Williams (MIT, USA) Michael Wooldridge (University of Liverpool, UK) ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From " joe.armstrong"@REDACTED Mon Jan 16 15:18:30 2006 From: " joe.armstrong"@REDACTED (Joe Armstrong) Date: Mon, 16 Jan 2006 15:18:30 +0100 Subject: Code repository In-Reply-To: References: Message-ID: <43CBAB36.1010209@ericsson.com> I agree - there seems to be a gaps somewhere between CVS/souceforce jungerl and erlmerge. What I'd like to have is "something like apt-get" only done right. And when I say done right - I mean done *really really really ... right* But this is *difficult* (difficult means I've been thinking about this for a *long* time) - it means signing all the code making sure only *tested* compatible versions are checked in etc. At the "not theoretically sound but useful anyway" end of the spectrum is just a single depository for all denoted code. A minimal system (but useful anyway) is the following: - one tarball per contribution - tarballs are nameed app-NN.MM.tgz NN.MM are Major/Minor version numbers Inside the Tarball sould be a file called app-NN.MM.pub (The publish file). Suppose I made glurk-3.4 Inside glurk-3.4.tgz Id find the file glurk-3.4.pub this is just a list of terms like this: {author,"Joe Armstrong","joe.armstron@REDACTED","20050116"}. {name,"glurk"}. {vsn,"3.4"}. {summary,"A wonderfull program"}. <-- one line {keywords,["tree","cache"]}. {needs,["bar-3.4", "zip-6.7"]}. {abstract,"This is cache for guid it .... ... ..."}. {doc, "foo123.html"} <-- an html documetation file inside the tarball (This is pretty much the format of the stuff at http://www.erlang.org/user.html But unfortunately "We no longer accept new contributions" All the host site needs to arrange is a publically writable download area, and a script to unpack the pub files and format it neatly. Google will do the rest. This is basically hoe http://www.erlang.org/user.html works but without the automated upload bit. This is a kind of halfway house between a private depository and a full CVS/project like structure. I think you can basically have a large amount of unstructured and inconsistent data - or a small amount of well structured consistent data. The latter is provided for by sourceforce - but the former is unprovisioned. An alternative (even more unstructured) is to develop your code under a public_html root and throw google at it ... Cheers /Joe On 2006-01-16 10:01, Vlad Dumitrescu wrote: > Hi all, > > I feel that there should be a code repository for 3rd party Erlang code that > is easily searchable and at a smaller granularity than jungerl. Jungerl > contains many pearls, but if they happen to be in an application that I > don't even know what is about, I'll never look there "just in case". > > What I'd like to have is a repository for general-use library code. One > example would be the many times discussed httpd_utils. In the end, this code > might find its way to the standard libraries, but in the meantime why > reinvent the wheel just because one didn't know it was already invented? > > I have a few ideas about how this could be done[*], but I'd like to know how > interesting something like this would be for the community. Also, somebody > else could have better implementation ideas. > > best regards, > Vlad > > [*] Authors annotate the code (in jungerl or elsewhere) and a tool will then > extract and publish this information online (at trapexit, maybe). > One way to annotate might be to choose a standard library module where > these functions would best be found, if they were to be included in the > standard libs. For example a mapwhile/3 function would be annotated with > "lists". From xpdoka@REDACTED Mon Jan 16 17:06:28 2006 From: xpdoka@REDACTED (Dominic Williams) Date: Mon, 16 Jan 2006 17:06:28 +0100 (CET) Subject: Dynamically invoking unexported function Message-ID: <33791.212.155.207.253.1137427588.squirrel@www.geekisp.com> Hello, I would like to invoke a local function dynamically in a receive, like this: receive {Pid, Request, Arguments} -> ?MODULE:Request(Arguments); % (*) ... end, which would invoke e.g. foo({X,Y}) -> ... Unfortunately, (*) only seems to work on exported functions. Is that correct, and if so what is the rationale? If not, what am I missing? I came up with this to avoid exporting the functions that get called dynamically: receive {Pid, Request, Arguments} -> F = lookup (Request), % (**) F(Arguments); ... end, lookup (foo) -> fun ({X,Y}) -> ... end; lookup (bar) -> ... Apart from the slightly more verbose syntax, are there any serious downsides to this approach? (**) fun module:function/parity also only works on exported functions... Cheers, Dominic Williams http://www.dominicwilliams.net ---- From bengt.kleberg@REDACTED Mon Jan 16 17:22:31 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Mon, 16 Jan 2006 17:22:31 +0100 Subject: Dynamically invoking unexported function In-Reply-To: <33791.212.155.207.253.1137427588.squirrel@www.geekisp.com> References: <33791.212.155.207.253.1137427588.squirrel@www.geekisp.com> Message-ID: <43CBC847.4020709@ericsson.com> On 2006-01-16 17:06, Dominic Williams wrote: > Hello, > > I would like to invoke a local function dynamically in > a receive, like this: > > receive > {Pid, Request, Arguments} -> > ?MODULE:Request(Arguments); % (*) > ... > end, > > which would invoke e.g. > > foo({X,Y}) -> > ... > > Unfortunately, (*) only seems to work on exported > functions. Is that correct, and if so what is the > rationale? If not, what am I missing? have you tried: {Pid, Request, Arguments} -> Request(Arguments); % (*) bengt, who would like to suggest the variable name Argument, since this only works on an arity 1 Request From matheus@REDACTED Mon Jan 16 19:04:12 2006 From: matheus@REDACTED (Matheus Degiovani) Date: Mon, 16 Jan 2006 15:04:12 -0300 Subject: Find out erlang path Message-ID: <43CBE01C.3040008@clubtilt.net> Hello, Sorry for the simple question, I'm trying to build a release tar that includes the runtime system. I figured I have to add the {erts, Dir} tuple to the options when building the tar, but I can't seem to find any function that returns the current running erlang base directory (i.e. the base directory where the current version of Erlang was started). The only way to get it (so far, as I can think) is to read from the win32 registry, but that seems so cumbersome. Also, "erl_prim_loader:get_path()" returns a list of paths to (respectively) kernel and stdlib, but not directly to erlang... Thanks. -- Matheus Degiovani matheus@REDACTED http://www.tilt.net http://clubtilt.net "Nem mesmo os s?bios conseguem enxergar os dois lados" - Gandalf em O Senhor dos An?is de JRR Tolkien. From bengt.kleberg@REDACTED Mon Jan 16 18:13:42 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Mon, 16 Jan 2006 18:13:42 +0100 Subject: Find out erlang path In-Reply-To: <43CBE01C.3040008@clubtilt.net> References: <43CBE01C.3040008@clubtilt.net> Message-ID: <43CBD446.6060709@ericsson.com> On 2006-01-16 19:04, Matheus Degiovani wrote: > Hello, > > Sorry for the simple question, I'm trying to build a release tar that > includes the runtime system. I figured I have to add the {erts, Dir} > tuple to the options when building the tar, but I can't seem to find any > function that returns the current running erlang base directory (i.e. > the base directory where the current version of Erlang was started). is the output of file:get_cdw() what you want? it Returns {ok, Dir}, where Dir is the current working directory. so if you have not changed directory after start you should get the base directory where the current version of Erlang was started. or do you mean the location of the current version of Erlang? bengt From kenneth.lundin@REDACTED Mon Jan 16 18:46:46 2006 From: kenneth.lundin@REDACTED (Kenneth Lundin (AS/EAB)) Date: Mon, 16 Jan 2006 18:46:46 +0100 Subject: Find out erlang path Message-ID: <4AFFBE68BCD2C04EB6EEA03FBC9CF4BE014EEE3B@esealmw115.eemea.ericsson.se> Hi, You can call code:root_dir() which will return the path to the installation directory for Erlang. Try for example this in the Erlang shell: 1> ls(code:root_dir()). /Regards Kenneth -------------- next part -------------- An HTML attachment was scrubbed... URL: From Karl.Schmitt@REDACTED Mon Jan 16 18:53:37 2006 From: Karl.Schmitt@REDACTED (Karl.Schmitt@REDACTED) Date: Mon, 16 Jan 2006 18:53:37 +0100 Subject: WG: Find out erlang path Message-ID: Dear Matheus, I guess my answer is far to simple, because I am an absolute beginner to Erlang, but I know the following commands work on an Erlang prompt: % Provides current working directory {ok, Pwd} = file:get_cwd(). % Sets current working directory file:set_cwd(Pwd). Yours, Karl DFS Deutsche Flugsicherung GmbH Unternehmenszentrale Am DFS-Campus 10 D - 63225 Langen Tel.: +49-(0)6103-707-0 Internet: http://www.dfs.de -----BEGIN PGP PUBLIC KEY BLOCK----- Version: PGP 6.5.8 mQGiBECbVgwRBAD09k4R2DiCObeUeO+FZCBJ8OkjzEIQ3niUMHSwlQmX5prKCJQe NjEGvsS4Ex6qdYQ/awmXkNtOpsF0mN3aBoKUyRDF6KkkfsTNYQQ6WyK5RHu2Q4wQ G93DL+Ryhgs2oNH3Ou4FbEiYATJCl14fpxd08D0DCsmL0ZfeaZlZeBCUzwCg/8sY qJ2uSj5JgHWEp170menK6CUEAIlI3gXegKbBY1PFSpzNpjVGQJg9bQR4B6tqdASP nLfsQR+1BIIz0WFgiIickqPSRbGYP7slpw9onE43su3HVg2sBMI25Q5kK6WujPUG n72PDy8yogXCcYS807FcqMqKTqYjiRQxbcQn3gJaoTau0/HJTHF9jES89SyIDXdm CjphA/9FZ0tmotILaxyL53X8G01lf28NhykkGzbBTiIAsgTcvCx6b1GxBwUb/WlL KmWG3kjwSsZxtPzrUPN3Z83pavfCQI4E9tNI4mVgX9gtklKoVtJPglu2jPrJ+umZ UO78anBrsTnPzOJ954+uziMe3imsFAC8T2gAmgsAvZgZP98gBLQYREZTIEdtYkgg PHB1YmtleUBkZnMuZGU+iQBOBBARAgAOBQJAm1YMBAsDAQICGQEACgkQN3h5OLny dHrchQCgmuRvdqRthFARXOQatgKCc+5pWs4AoPkSU2XeYbNq4AVmv0BJOpRgOsCJ uQMNBECbVosQDADMHXdXJDhK4sTw6I4TZ5dOkhNh9tvrJQ4X/faY98h8ebByHTh1 +/bBc8SDESYrQ2DD4+jWCv2hKCYLrqmus2UPogBTAaB81qujEh76DyrOH3SET8rz F/OkQOnX0ne2Qi0CNsEmy2henXyYCQqNfi3t5F159dSST5sYjvwqp0t8MvZCV7cI fwgXcqK61qlC8wXo+VMROU+28W65Szgg2gGnVqMU6Y9AVfPQB8bLQ6mUrfdMZIZJ +AyDvWXpF9Sh01D49Vlf3HZSTz09jdvOmeFXklnN/biudE/F/Ha8g8VHMGHOfMlm /xX5u/2RXscBqtNbno2gpXI61Brwv0YAWCvl9Ij9WE5J280gtJ3kkQc2azNsOA1F HQ98iLMcfFstjvbzySPAQ/ClWxiNjrtVjLhdONM0/XwXV0OjHRhs3jMhLLUq/zzh sSlAGBGNfISnCnLWhsQDGcgHKXrKlQzZlp+r0ApQmwJG0wg9ZqRdQZ+cfL2JSyIZ Jrqrol7DVelMMm8AAgIL/2zbjaNlPL+13ZFiJwAGg0yj4zciLkp141Pwvn2OtY+B JZxnIfcPKINj2f5QiW4weqV9OMJ5EgZcx8aRxkk5uJsJv3S1JFUUNaSwCl0xynpr Spw5QsoCAQAhzmOlqj1tvCJW3bm3iniiud6UzGjbdpvU9oeiSOGMFYVpfGCHC5fb 4TnnsLcrmARXh3COKle27X7TGOROUWyxqKWdHvBsMEjO2ERF2A+nMEYz4dd8kezd Iiw9hjftJtp9GpCJ5CWq4jcyQ5Bb+D0IUqI0FdH9Mfe8ytMnDRwDPH1r9FaCNkaH Q+8Aqp20QbSHe03CaT8UbYziNCNdzCFt4QjDqAfDsTKEHGeBzKfBprsKbox6CURk IikAiUX0YE1P3bxH2ovP5bxEormlPfFN870QYNZYmo03hX41H6LnOaI4YaHzfiXG Plrm/mtkDryXoqA57f09vcQcAmS6Qa50qyqheGK49lSM9MndqXGWrmddtccE3qUJ /U1UAxqX11l80Yz8Wk+brokARgQYEQIABgUCQJtWiwAKCRA3eHk4ufJ0enLHAJ9R 3Z0uPt+U+qSJU/63IpU/y+Ho3QCgg571CpdVdsohBeaF21f4uckz3nU= =h1ys -----END PGP PUBLIC KEY BLOCK----- From sean.hinde@REDACTED Mon Jan 16 19:28:03 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Mon, 16 Jan 2006 18:28:03 +0000 Subject: Find out erlang path In-Reply-To: <43CBE01C.3040008@clubtilt.net> References: <43CBE01C.3040008@clubtilt.net> Message-ID: <3C9C0137-6236-4DBF-A81B-A30A411D299F@gmail.com> Hi, code:root_dir(). should give you what you need. If not then there are other related functions in the code module. Sean On 16 Jan 2006, at 18:04, Matheus Degiovani wrote: > Hello, > > Sorry for the simple question, I'm trying to build a release tar > that includes the runtime system. I figured I have to add the > {erts, Dir} tuple to the options when building the tar, but I can't > seem to find any function that returns the current running erlang > base directory (i.e. the base directory where the current version > of Erlang was started). > > The only way to get it (so far, as I can think) is to read from the > win32 registry, but that seems so cumbersome. Also, > "erl_prim_loader:get_path()" returns a list of paths to > (respectively) kernel and stdlib, but not directly to erlang... > > Thanks. > -- > Matheus Degiovani > matheus@REDACTED > http://www.tilt.net > http://clubtilt.net > > "Nem mesmo os s?bios conseguem enxergar os dois lados" - Gandalf em > O Senhor dos An?is de JRR Tolkien. From xpdoka@REDACTED Mon Jan 16 21:58:45 2006 From: xpdoka@REDACTED (Dominic Williams) Date: Mon, 16 Jan 2006 21:58:45 +0100 Subject: Dynamically invoking unexported function In-Reply-To: <43CBC847.4020709@ericsson.com> References: <33791.212.155.207.253.1137427588.squirrel@www.geekisp.com> <43CBC847.4020709@ericsson.com> Message-ID: <43CC0905.80704@dominicwilliams.net> Hi Bengt, > have you tried: > {Pid, Request, Arguments} -> > Request(Arguments); % (*) Indeed, that's what I started with. It produces a badfun runtime error when Request is an atom (a fact I might not have made clear from my first post). That syntax only works on funs. > bengt, who would like to suggest the variable name Argument, since > this only works on an arity 1 Request Well, I tend to name variables semantically and - as I hinted at with foo({X,Y}) - in my specific problem the variable actually gets bound to a tuple holding several arguments. Regards, Dominic Williams http://www.dominicwilliams.net ---- From thomaswhitcomb@REDACTED Tue Jan 17 02:10:00 2006 From: thomaswhitcomb@REDACTED (Tom Whitcomb) Date: Mon, 16 Jan 2006 20:10:00 -0500 Subject: sync'ing stdout Message-ID: <2C4B5E52.10343ED4.72A78FD1@netscape.net> I have a long running clause and I need to flush its stdout. I read TFM but I couldn't find a way to do it. Is the IoDevice for stdout available so I can file:sync(stdout)? Or, is there another way I should do it? Thanks for any help. Tom __________________________________________________________________ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp From jefcrane@REDACTED Tue Jan 17 04:55:33 2006 From: jefcrane@REDACTED (Jeff Crane) Date: Mon, 16 Jan 2006 19:55:33 -0800 (PST) Subject: Realtime Multiuser 2D Board Implementation Message-ID: <20060117035533.17245.qmail@web31513.mail.mud.yahoo.com> I feel a little embarassed asking this question, given the depth of other questions on this list but... I was interested in attempting to simulate a 10x10 tile board, then spawn about 5 clients at random locations and allow them to move about, just to see how erlang performs, then scale it by a factor of 10, then another 10. I read up on ball.erl and had to rewrite it from tk to gs. Read board.erl. As a veritable newbie, I cannot tell if I should go with - Design A Make up a tile module and spawn tiles when I bring the server up, using inter-server messaging to move the client-connections about. OR Design B I attempt to keep track with updates to a single canvas, a-la board.erl. Which is going to yield better response times and performance in scaling? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From sanjaya@REDACTED Tue Jan 17 06:17:35 2006 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Tue, 17 Jan 2006 11:17:35 +0600 Subject: mnesia_frag ???? References: Message-ID: <00c501c61b25$539aed80$5f00a8c0@wavenet.lk> HI .... /Uffe & bengt Many thanks for your quick replies. "...But I would strongly recommend against using dirty access in combination with fragmented tables." "Both read and write in fragmented tables are complex operations." If we use the original function without dirty, how it will effect to the efficiency of the huge table something like ~3G (3M rec x 1K). Also, how the number of fragments will effect to the table access?? since the operetions are complex (as you told), can the number of fragments degrade the performance (depending upon the numberof record / table size)? I mean the record access time against the number of fragments (I assume the number of records in the table as constant). And also refereing to the http://www.erlang.org/ml-archive/erlang-questions/200307/msg00052.html.ORIG if we change the access_module configuration parameter to mnesia_frag it says "> without doing any changes to your old code." So ... going back to the problem I faced with mnesia:dirty_read(Db, DBKey), the first thing come to my mind is, <> Refering to my original question I have used the {disc_copies, NodeList} , so why the mnesia:info() shows only the schema table as disc_copies??? Thanks in advance Sanjaya Vitharana ----- Original Message ----- From: "Ulf Wiger (AL/EAB)" To: "Rikard Johansson" Cc: "Sanjaya Vitharana" ; Sent: Monday, 16 January 2006 08:03 pm Subject: RE: mnesia_frag ???? ...But I would strongly recommend against using dirty access in combination with fragmented tables. The thing about dirty access is that it's only at best semi-safe when multiple table copies are involved. Both read and write in fragmented tables are complex operations. While dirty will work most of the time, it can give you some really nasty surprises... /Uffe > -----Original Message----- > From: Rikard Johansson [mailto:rikard.johansson@REDACTED] > Sent: den 16 januari 2006 14:02 > To: Ulf Wiger (AL/EAB) > Cc: Sanjaya Vitharana; erlang-questions@REDACTED > Subject: Re: mnesia_frag ???? > > > > As Ulf says, you should use mnesia:read within the ReadFun, > > ReadFun = fun(Db,DBKey) -> mnesia:read({Db, DBKey}) end. > > However, if you want "dirty access" you can use the 'sync_dirty' > AccessContext. > > mnesia:activity(sync_dirty, ReadFun, [profile_db,777], mnesia_frag). > > /Rikard > > Ulf Wiger (AL/EAB) wrote: > > > > Don't use mnesia:dirty_read/2 as your read function. > > Try with mnesia:read({Tab, Key}) instead. > > > > Dirty_read() goes directly to the (base-) table, and has no > concept of > > mnesia_frag. > > > > /Uffe > > > > > -------------------------------------------------------------- > ---------- > > *From:* owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED] *On Behalf > Of *Sanjaya > > Vitharana > > *Sent:* den 16 januari 2006 13:32 > > *To:* erlang-questions@REDACTED > > *Subject:* mnesia_frag ???? > > > > Hi .. !!! > > > > Can any one show me where I'm doing wrong, I'm trying to write a > > single record & retrive it using mnesia_frag. > > > > But it's not working :( for me. > > > > (vmdb@REDACTED)29 > > > mnesia:table_info(profile_db, frag_properties). > > [{base_table,profile_db}, > > {foreign_key,undefined}, > > {hash_module,mnesia_frag_hash}, > > {hash_state,{hash_state,30,15,4}}, > > {n_fragments,30}, > > {node_pool,[vmdb@REDACTED]}] > > (vmdb@REDACTED)31 > WriteFun1 > = fun(DbFile, > > Rec) -> mnesia:write(DbFile, Rec, write)end. > > #Fun > > (vmdb@REDACTED)32 > > > mnesia:activity(transaction, WriteFun1, [profile_db, > > {profile_db,777,"test",333,1234,5678,1234}], mnesia_frag). > > ok --- Here it shows as it works > > (vmdb@REDACTED)33 > ReadFun = > fun(Db,DBKey) > > -> mnesia:dirty_read(Db, DBKey)end. > > #Fun > > (vmdb@REDACTED)34 > > > mnesia:activity(transaction, ReadFun, [profile_db,777], > mnesia_frag). > > [] -- but empty list given when try to retrive > > (vmdb@REDACTED)35 > > > mnesia:dirty_first(profile_db). > > '$end_of_table' --- since the db should contains only > 2 records, I > > tried this. but :( > > (vmdb@REDACTED)36 > > > > > > > Furthermore I have used below, to create the DB. > > > > -record(profile_db, {mobile_no, prof_details, type, > > last_update_date, first_creation_date, fax_no}). > > > > Res = mnesia:create_table(profile_db,[ > > {disc_copies, NodeList}, > > {type, ordered_set}, > > {index, [type, last_update_date, > > first_creation_date, fax_no]}, > > {frag_properties, [{n_fragments, 30}]}, > > {attributes, record_info(fields, > profile_db)} > > ]), > > > > > -------------------------------------------------------------- > -------------------------------------------------------------- > ------------------------ > > consider the mnesia:info() result below, and note that the > > profile_db_frag2: with 1 records occupying 95 > words of mem > > disc_copies = [schema] > > but I have used {disc_copies, NodeList} > > > > > ---------------------------------------------------------------------- > > > ---------------------------------------------------------------------- > > -------- > > > > (vmdb@REDACTED)43 > > > mnesia:info(). > > ---> Processes holding locks <--- > > ---> Processes waiting for locks <--- > > ---> Participant transactions <--- > > ---> Coordinator transactions <--- > > ---> Uncertain transactions <--- > > ---> Active tables <--- > > profile_db : with 0 records occupying 70 > words of mem > > profile_db_frag2: with 1 records occupying 95 > words of mem > > ...... > > profile_db_frag13: with 1 records occupying 95 > words of mem > > ....... > > profile_db_frag29: with 0 records occupying 70 > words of mem > > profile_db_frag30: with 0 records occupying 70 > words of mem > > schema : with 31 records occupying 4380 > words of mem > > ===> System info in version "4.2.3", debug level = none <=== > > opt_disc. Directory "/usr2/omni_vm_prof/db/vmdb" is used. > > use fallback at restart = false > > running db nodes = [vmdb@REDACTED] > > stopped db nodes = [] > > master node tables = [] > > remote = [] > > ram_copies = [profile_db, > > profile_db_frag10, > > profile_db_frag11, > > > > ... > > > > profile_db_frag8, > > profile_db_frag9] > > disc_copies = [schema] > > disc_only_copies = [] > > [{vmdb@REDACTED,disc_copies}] = [schema] > > [{vmdb@REDACTED,ram_copies}] = [profile_db_frag30, > > profile_db_frag29, > > > > ..... > > > > profile_db_frag3, > > profile_db_frag2, > > profile_db] > > 12 transactions committed, 5 aborted, 0 restarted, 0 > logged to disc > > 0 held locks, 0 in queue; 0 local transactions, 0 remote > > 0 transactions waits for other nodes: [] > > ok > > (vmdb@REDACTED)44 > > > > > > > I have confused with the results, can anyone explane this ?? > > > > Thanks in advance. > > > > Sanjaya Vitharana > > From mikael.karlsson@REDACTED Tue Jan 17 06:48:19 2006 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Tue, 17 Jan 2006 06:48:19 +0100 Subject: Code repository In-Reply-To: References: Message-ID: <200601170648.20213.mikael.karlsson@creado.com> m?ndag 16 januari 2006 12:29 skrev Torbjorn Tornkvist: > Btw: Has anyone (apart from myself) tried erlmerge ? > Personally, I find it extremely useful... ;-) > > Cheers, Tobbe I think erlmerge is very useful, but it would be nice to have.. :-) 1. A possibility to install to a local user library instead of the ERL_LIB_DIR root. I guess this is more an Erlang/OTP issue than an erlmerge one? 2. If I integrate erlmerge in a running application, I think it should support "hot" application upgrade (appups). Does it do this today? /Mikael From bengt.kleberg@REDACTED Tue Jan 17 07:29:59 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 17 Jan 2006 07:29:59 +0100 Subject: Code repository In-Reply-To: <200601170648.20213.mikael.karlsson@creado.com> References: <200601170648.20213.mikael.karlsson@creado.com> Message-ID: <43CC8EE7.1030405@ericsson.com> On 2006-01-17 06:48, Mikael Karlsson wrote: ...deleted > I think erlmerge is very useful, but it would be nice to have.. :-) > > 1. A possibility to install to a local user library instead of the ERL_LIB_DIR > root. I guess this is more an Erlang/OTP issue than an erlmerge one? the latest (0.5) version can do this. it is not documented. it will be documented in the next versions README. > 2. If I integrate erlmerge in a running application, I think it should support > "hot" application upgrade (appups). Does it do this today? i was trying to add this for 0.6. it is taking too much time. instead i will checkin the small improvments i have managed to do. bengt From mikael.karlsson@REDACTED Tue Jan 17 08:05:43 2006 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Tue, 17 Jan 2006 08:05:43 +0100 Subject: Code repository In-Reply-To: <43CC8EE7.1030405@ericsson.com> References: <200601170648.20213.mikael.karlsson@creado.com> <43CC8EE7.1030405@ericsson.com> Message-ID: <200601170805.44073.mikael.karlsson@creado.com> Great thanks! I presume the version numbers are for erlmerge, not OTP ;-) Cheers Mikael tisdag 17 januari 2006 07:29 skrev Bengt Kleberg: > On 2006-01-17 06:48, Mikael Karlsson wrote: > ...deleted > > > I think erlmerge is very useful, but it would be nice to have.. :-) > > > > 1. A possibility to install to a local user library instead of the > > ERL_LIB_DIR root. I guess this is more an Erlang/OTP issue than an > > erlmerge one? > > the latest (0.5) version can do this. it is not documented. it will be > documented in the next versions README. > > > 2. If I integrate erlmerge in a running application, I think it should > > support "hot" application upgrade (appups). Does it do this today? > > i was trying to add this for 0.6. it is taking too much time. instead i > will checkin the small improvments i have managed to do. > > > bengt From vlad_dumitrescu@REDACTED Tue Jan 17 09:30:13 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Tue, 17 Jan 2006 09:30:13 +0100 Subject: Realtime Multiuser 2D Board Implementation In-Reply-To: <20060117035533.17245.qmail@web31513.mail.mud.yahoo.com> Message-ID: > I feel a little embarassed asking this question, given the > depth of other questions on this list but... Don't be! :-) > Design A > Make up a tile module and spawn tiles when I bring the server > up, using inter-server messaging to move the client-connections about. > > OR > > Design B > I attempt to keep track with updates to a single canvas, a-la > board.erl. > > Which is going to yield better response times and performance > in scaling? IMHO, if you are just exploring, you shouldn't think about performance yet. The design issue you raise is: should tiles be processes? Well, are the tiles "alive"? Do they have their own behaviour and activities to perform in parallel, or are they just receiver of events that they pass on to the board itself? Consider also that when displaying the board, you'll still need to gather all information to a single place. If the tiles don't do anything special, the choice is really between B and A+B. Hope this helps a little. Good luck! Regards, Vlad From ulf.wiger@REDACTED Tue Jan 17 10:08:48 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 17 Jan 2006 10:08:48 +0100 Subject: security advisories on yaws? Message-ID: As much as it pains me to say anything good about a Nortel product, I did come across this: http://secunia.com/product/3611/ During the period 2003-2006, only one security advisory was identified by Secunia on the Nortel Alteon SSL Accelerator 4.x, which uses Yaws, if I'm not mistaken. The one identified security hole was labeled "moderately critical", and has been fixed. Yaws 1.x also has a reported vulnerability(*) Moderately critical, and fixed. According to the logs, it seems to have been identified 2005-06-01, and a patch was issued on the 16th. The advisory was published on the 17th. http://secunia.com/product/5254/ (*) ...leading me to guess that the first issue was really not a Yaws vulnerability. Further digging revealed that it was due to insufficient input validation in the web interface, in combination with a cryptographically signed Java applet. Apache 2.x, which of course is used a lot more, has had 28 advisories during the same time, out of which 2 remain unpatched. IIS 5.x has had 9 advisories during the same time - one extremely critical, and two each of 'highly critical', 'moderately', 'less' and 'not'. Two remain unpatched. IIS 6.x has had two (1 less and 1 not critical), both fixed. Secunia warns against using their statistics to compare different products. Suffice it then to say that their statistics give no indication that Yaws would be any _less_ secure than the more established web servers. /Uffe From ulf.wiger@REDACTED Tue Jan 17 11:19:39 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 17 Jan 2006 11:19:39 +0100 Subject: mnesia_frag ???? Message-ID: Sanjaya Vitharana wrote: > > "...But I would strongly recommend against using dirty access > in combination with fragmented tables." > > "Both read and write in fragmented tables are complex operations." > > If we use the original function without dirty, how it will > effect to the efficiency of the huge table something like ~3G > (3M rec x 1K). There is a setup cost when using transactions, which you are paying anyway if you wrap the whole thing with mnesia:activity(transaction, fun() -> ... end, mnesia_frag). It's in the order of 110 usec on my 1 GHz SunBlade. The size of the table makes very little difference to performance, except of course while building or loading the table. Reads and writes are not affected much at all, esp. if type is 'set' (a hash table). Furthermore, there is no difference in this regard between read() and dirty_read(). The only differences are: - read() will request a lock on the object before reading, while dirty_read() will not. The cost of this operation will depend on how many replicas exist on the fragment where the object resides. If there's only one copy, the operation will amount to a gen_server:call(), a check for a table lock, and a check for an object lock, and finally, of course, an ets:insert in the lock table. - read() will perform a lookup in the local transaction store, whereas dirty_read() will not. All in all, a transaction-based read() on my SunBlade, using a fragmented table with 1000 fragments (no replicas), takes about 270 us, while a dirty read of the same object takes about 80 us. Doing the same thing with only 3 fragments takes about 240 usecs. So, there is a difference, but it's very small. > Also, how the number of fragments will effect to the table > access?? since the operetions are complex (as you told), can > the number of fragments degrade the performance (depending > upon the numberof record / table size)? I mean the record > access time against the number of fragments (I assume the > number of records in the table as constant). For all practical purposes, I don't think you will notice any degradation. > And also refereing to the > http://www.erlang.org/ml-archive/erlang-questions/200307/msg00 > 052.html.ORIG > if we change the access_module configuration parameter to > mnesia_frag it says "> without doing any changes to your old > code." This is almost partly true. If e.g. your code uses dirty_write() and dirty_read() directly, then -- as you have noticed -- the fragmentation functionality will not work as expected. The same thing goes for code that uses the older function mnesia:transaction(fun() -> ... end). Also, you will pay a (slight) performance penalty for using mnesia_frag on non-fragmented tables. It's about a few tens of microseconds per read/write operation. > Refering to my original question I have used the > {disc_copies, NodeList} , so why the mnesia:info() shows only > the schema table as disc_copies??? Your original post doesn't show the actual value of NodeList. If it's [], then mnesia will by default add {ram_copies, [node()]}. BR, /Uffe From joelr1@REDACTED Tue Jan 17 12:33:32 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 17 Jan 2006 11:33:32 +0000 Subject: Troubleshooting a high-load scenario Message-ID: Folks, I have a test harness that launches poker bots against a poker server. The harness is written in Erlang but the poker server is C++ on Windows. The poker server uses completion ports and async IO. I'm running into trouble with just 500 bots playing on the server, launched from the same VM. It appears that the bots get their commands up to 1 minute late. I'm trying to troubleshoot this and I'm looking for ideas. I would like to believe that it's not Erlang running out of steam but the C++ server :-). I read the packets manually since their length is little-endian and includes the whole packet (with the 4-byte length). I enabled {nodelay, true} on the socket since I always write complete packets to the socket. I use selective receive and used to have no flow control in my socket reader. It would just read packet length, read packet and send the whole packet to its parent. Message queues were filling up when I was doing that so I only read the next network message once the current one has been processed. I'm using the default socket buffer size for sending and receiving. I'm not sure what the default buffer size as it's not stated in 'man inet'. I do not have the source code for the poker server and I'm not sure what IOCP does in the scenario when I delay reading from the socket on my end. I'm being told by the client's techs that I could be getting the command 1 minute late because I'm reading it from the socket 1 minute late and the command sits in the network buffers all the while. How do I troubleshoot this scenario? The bots don't do much processing themselves, basically make a decision and shoot a command back. They don't even react to all commands. The server spits out packets all the time, though, since all bots in the game get game notifications and table state updates from the lobby. Thanks, Joel -- http://wagerlabs.com/ From ulf.wiger@REDACTED Tue Jan 17 12:43:19 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 17 Jan 2006 12:43:19 +0100 Subject: Troubleshooting a high-load scenario Message-ID: Joel Reymont wrote: > > I use selective receive and used to have no flow control in > my socket reader. It would just read packet length, read > packet and send the whole packet to its parent. Message > queues were filling up when I was doing that so I only read > the next network message once the current one has been processed. Have you tried setting your socket reader to high priority? process_flag(priority, high). I usually set middle-man processes to high priority since they don't originate any load anyway. They should do their thing and get out of the way as quickly as possible. Regards, Uffe From sanjaya@REDACTED Tue Jan 17 12:46:18 2006 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Tue, 17 Jan 2006 17:46:18 +0600 Subject: mnesia_frag ???? References: Message-ID: <013a01c61b5b$a10d38d0$5f00a8c0@wavenet.lk> Hi ... /Uffe Many thanks for your valuble replies. Hope, your info will help all the users of mnesia_frag. Regarding the NodeList, I have used it as {disc_copies, [node()]} to get the previous mentioned result. What I noted is {disc_copies, [node()]} or {disc_only_copies, [node()]} with the {frag_properties, [{n_fragments, 30}]} give the same result (no copies on disk / only ram copies). but when I replace frag_properties as {frag_properties, [{n_fragments, 30},{n_disc_copies, 1}]} OR {frag_properties, [{n_fragments, 30},{n_disc_only_copies, 1}]} it gives fragmented tables on disc profile_db.DCD profile_db_frag2.DCD profile_db_frag3.DCD ..... profile_db_frag29.DCD profile_db_frag30.DCD in adition "n_disc_only_copies" gives aditional index files on disk as well. That means, did the "n_disc_copies" override {disc_copies, [node()]} ????? I mean what is the difference between disc_copies value & n_disc_copies value on fragmented table (when both are used at same time)??? Also, what is the possibility to use the mnesia fragmented 3Gb (assumed) table on mechine with 2Gb (assumed) RAM (Less memory than the table size). If we use the disc_copies did the mnesia_frag handle it when the table grows more than 2Gb. In such situation what is the best way to get the best performance??? Did the mnesia/mnesia_frag & erlang take care of mechine with dual processors (with hyperthreading) to ge the best performance ??? OR what additional things we can try for to get the perfoemance max (if applicable)??? Thanks in advance Sanjaya Vitharana ----- Original Message ----- From: "Ulf Wiger (AL/EAB)" To: "Sanjaya Vitharana" Cc: Sent: Tuesday, 17 January 2006 04:19 pm Subject: RE: mnesia_frag ???? Sanjaya Vitharana wrote: > > "...But I would strongly recommend against using dirty access > in combination with fragmented tables." > > "Both read and write in fragmented tables are complex operations." > > If we use the original function without dirty, how it will > effect to the efficiency of the huge table something like ~3G > (3M rec x 1K). There is a setup cost when using transactions, which you are paying anyway if you wrap the whole thing with mnesia:activity(transaction, fun() -> ... end, mnesia_frag). It's in the order of 110 usec on my 1 GHz SunBlade. The size of the table makes very little difference to performance, except of course while building or loading the table. Reads and writes are not affected much at all, esp. if type is 'set' (a hash table). Furthermore, there is no difference in this regard between read() and dirty_read(). The only differences are: - read() will request a lock on the object before reading, while dirty_read() will not. The cost of this operation will depend on how many replicas exist on the fragment where the object resides. If there's only one copy, the operation will amount to a gen_server:call(), a check for a table lock, and a check for an object lock, and finally, of course, an ets:insert in the lock table. - read() will perform a lookup in the local transaction store, whereas dirty_read() will not. All in all, a transaction-based read() on my SunBlade, using a fragmented table with 1000 fragments (no replicas), takes about 270 us, while a dirty read of the same object takes about 80 us. Doing the same thing with only 3 fragments takes about 240 usecs. So, there is a difference, but it's very small. > Also, how the number of fragments will effect to the table > access?? since the operetions are complex (as you told), can > the number of fragments degrade the performance (depending > upon the numberof record / table size)? I mean the record > access time against the number of fragments (I assume the > number of records in the table as constant). For all practical purposes, I don't think you will notice any degradation. > And also refereing to the > http://www.erlang.org/ml-archive/erlang-questions/200307/msg00 > 052.html.ORIG > if we change the access_module configuration parameter to > mnesia_frag it says "> without doing any changes to your old > code." This is almost partly true. If e.g. your code uses dirty_write() and dirty_read() directly, then -- as you have noticed -- the fragmentation functionality will not work as expected. The same thing goes for code that uses the older function mnesia:transaction(fun() -> ... end). Also, you will pay a (slight) performance penalty for using mnesia_frag on non-fragmented tables. It's about a few tens of microseconds per read/write operation. > Refering to my original question I have used the > {disc_copies, NodeList} , so why the mnesia:info() shows only > the schema table as disc_copies??? Your original post doesn't show the actual value of NodeList. If it's [], then mnesia will by default add {ram_copies, [node()]}. BR, /Uffe From joelr1@REDACTED Tue Jan 17 12:48:10 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 17 Jan 2006 11:48:10 +0000 Subject: Troubleshooting a high-load scenario In-Reply-To: References: Message-ID: <40BBA5B7-DF3E-4B71-8255-32224FD7E7A4@gmail.com> Are you suggesting this _with_ the socket reader waiting for the message to be processed before reading the next one? On Jan 17, 2006, at 11:43 AM, Ulf Wiger ((AL/EAB)) wrote: > Have you tried setting your socket reader to high priority? > > process_flag(priority, high). > > > I usually set middle-man processes to high priority since > they don't originate any load anyway. They should do their > thing and get out of the way as quickly as possible. -- http://wagerlabs.com/ From ulf.wiger@REDACTED Tue Jan 17 12:57:52 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 17 Jan 2006 12:57:52 +0100 Subject: Troubleshooting a high-load scenario Message-ID: > Are you suggesting this _with_ the socket reader waiting for > the message to be processed before reading the next one? No. That seems a bit like reversed flow control anyway. Do you expect the server to overload the bots? Doesn't the majority of the load originate with the bots? /Uffe From joelr1@REDACTED Tue Jan 17 13:06:27 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 17 Jan 2006 12:06:27 +0000 Subject: Troubleshooting a high-load scenario In-Reply-To: References: Message-ID: The majority of the load originates with the server. It keeps sending moves by other players, table state updates, etc. etc. etc. How does that change your answer? On Jan 17, 2006, at 11:57 AM, Ulf Wiger ((AL/EAB)) wrote: > >> Are you suggesting this _with_ the socket reader waiting for >> the message to be processed before reading the next one? > > No. That seems a bit like reversed flow control anyway. > Do you expect the server to overload the bots? > Doesn't the majority of the load originate with the bots? > > /Uffe -- http://wagerlabs.com/ From joelr1@REDACTED Tue Jan 17 13:21:11 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 17 Jan 2006 12:21:11 +0000 Subject: Troubleshooting a high-load scenario In-Reply-To: References: Message-ID: <293D76D5-0980-4674-A251-63FE635F3EC1@gmail.com> Assume that there are 10 bots sitting at a table and playing. For every message that a bot sends to the poker server there will be at least 10 messages and probably more like 20-30 sent to each bot by the poker server. It appears that the bots cannot cope with such an influx of messages but I would like to be sure that the issue is indeed in my harness and not in the poker server. On Jan 17, 2006, at 11:57 AM, Ulf Wiger ((AL/EAB)) wrote: > >> Are you suggesting this _with_ the socket reader waiting for >> the message to be processed before reading the next one? > > No. That seems a bit like reversed flow control anyway. > Do you expect the server to overload the bots? > Doesn't the majority of the load originate with the bots? -- http://wagerlabs.com/ From matthias@REDACTED Tue Jan 17 14:28:17 2006 From: matthias@REDACTED (Matthias Lang) Date: Tue, 17 Jan 2006 14:28:17 +0100 Subject: Troubleshooting a high-load scenario In-Reply-To: <293D76D5-0980-4674-A251-63FE635F3EC1@gmail.com> References: <293D76D5-0980-4674-A251-63FE635F3EC1@gmail.com> Message-ID: <17356.61681.826854.540315@antilipe.corelatus.se> Joel Reymont writes: > It appears that the bots cannot cope with such an influx of messages > but I would like to be sure that the issue is indeed in my harness > and not in the poker server. Are you working to understand the system, or just twiddling random knobs in public in the hope of sudden "problem disappearance"? I'd _start_ with this experiment 1. Find a value N such that a) a load generator running N bots runs acceptably AND b) a load generator running M bots, where N < M < 2N, does not run acceptably. 2. Use two load generators (i.e. seperate, otherwise idle machines!), each running N bots. The system's behaviour in those two runs will most likely give you a strong indication of where the bottleneck is. But random twiddling is less ambitious and more amusing, especially for the audience. Next step: sniff the network and analyse the traffic. Matthias N.B. Your description of the problem leaves open the possibility of the number of messages being quadratically related to the number of subscribers. My experiment above is set up for a linear relation. From joelr1@REDACTED Tue Jan 17 14:50:54 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 17 Jan 2006 13:50:54 +0000 Subject: Troubleshooting a high-load scenario In-Reply-To: <200601171418.26114.roger.larsson@norran.net> References: <200601171418.26114.roger.larsson@norran.net> Message-ID: <7642BD2B-F1AC-4C5D-BE06-7908063789D4@gmail.com> On Jan 17, 2006, at 1:18 PM, Roger Larsson wrote: > Do you simulate decision time? If not you can easily create an > overload > by only a few bots. What do you mean by simulating decision time? My goal is to respond as fast as possible within the limits given by the server. I'm given 5, 15 or 30 seconds to responde, for example. > Use tcpdump to see when the messages actually arrives. I'll try this indeed. > Why selective receive here? Shouldn't all received messages be > processed? Yes, they should be processed. It's natural, though, to write receive {tcp, ... } -> ...; {script, ...} -> ...; {timeout, ...} -> ...; end as opposed to receive X -> process(X) end ... process({tcp, ...}) -> ...; process({script, ...}) -> ...; etc There seems to be a clear benefit to the latter approach when your queues start getting large. Is this correct? Thanks, Joel -- http://wagerlabs.com/ From joelr1@REDACTED Tue Jan 17 15:05:27 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 17 Jan 2006 14:05:27 +0000 Subject: Troubleshooting a high-load scenario In-Reply-To: <17356.61681.826854.540315@antilipe.corelatus.se> References: <293D76D5-0980-4674-A251-63FE635F3EC1@gmail.com> <17356.61681.826854.540315@antilipe.corelatus.se> Message-ID: <343ED554-EB55-4B00-9817-2826B571BD25@gmail.com> On Jan 17, 2006, at 1:28 PM, Matthias Lang wrote: > Are you working to understand the system, or just twiddling random > knobs in public in the hope of sudden "problem disappearance"? I'm trying to understand what knobs to twiddle. I'm having trouble with this and thus I'm asking the public. > I'd _start_ with this experiment > > 1. Find a value N such that > > a) a load generator running N bots runs acceptably I have established that 500 bots from one VM run fine. > AND b) a load generator running M bots, where N < M < 2N, > does not run acceptably. I have established that 1000 bots do not run fine on one VM. Running two VMs with 500 bots each fails also. > 2. Use two load generators (i.e. seperate, otherwise idle > machines!), each running N bots. We ran that and it appears that the bottleneck could be on the server. One machine running 500 bots is fine. Two machines running 500 bots is not. > Next step: sniff the network and analyse the traffic. I will look into that. > N.B. Your description of the problem leaves open the possibility of > the number of messages being quadratically related to the number of > subscribers. My experiment above is set up for a linear relation. Every bot gets notifications of other bots. So whenever 1 bot acts everyone else gets notification. 2 bots would generate 2 messages for every action, 10 bots would generate 10 messages, etc. Thanks, Joel -- http://wagerlabs.com/ From matthias@REDACTED Tue Jan 17 15:34:17 2006 From: matthias@REDACTED (Matthias Lang) Date: Tue, 17 Jan 2006 15:34:17 +0100 Subject: Troubleshooting a high-load scenario In-Reply-To: <343ED554-EB55-4B00-9817-2826B571BD25@gmail.com> References: <293D76D5-0980-4674-A251-63FE635F3EC1@gmail.com> <17356.61681.826854.540315@antilipe.corelatus.se> <343ED554-EB55-4B00-9817-2826B571BD25@gmail.com> Message-ID: <17357.105.485729.385372@antilipe.corelatus.se> Joel's test case #1 > I have established that 500 bots from one VM run fine. Joel's test case #2 > I have established that 1000 bots do not run fine on one VM. Running > two VMs with 500 bots each fails also. Joel's test case #3 > We ran that and it appears that the bottleneck could be on the > server. One machine running 500 bots is fine. Two machines running > 500 bots is not. Joel's model of the problem: > Every bot gets notifications of other bots. So whenever 1 bot acts > everyone else gets notification. 2 bots would generate 2 messages for > every action, 10 bots would generate 10 messages, etc. That's not linear. Yet you've chosen bot numbers as though the system was linear, which makes your results mostly useless. Here's a page which introduces the difference between linear and quadratic relations: http://chatterbeeshomework.homestead.com/chatterbeesmath3.html In test case #3, your bots have to deal with twice as many incoming messages per second as in test case #1. So the numbers you have chosen mean that your results don't allow you to conclude that the server is the problem. Or is there some throttling mechanism you're not telling us about? I.e. is there something which makes the bots' message generation rate decrease as you increase the number of bots? Matthias From joelr1@REDACTED Tue Jan 17 15:47:32 2006 From: joelr1@REDACTED (Joel Reymont) Date: Tue, 17 Jan 2006 14:47:32 +0000 Subject: Troubleshooting a high-load scenario In-Reply-To: <17357.105.485729.385372@antilipe.corelatus.se> References: <293D76D5-0980-4674-A251-63FE635F3EC1@gmail.com> <17356.61681.826854.540315@antilipe.corelatus.se> <343ED554-EB55-4B00-9817-2826B571BD25@gmail.com> <17357.105.485729.385372@antilipe.corelatus.se> Message-ID: On Jan 17, 2006, at 2:34 PM, Matthias Lang wrote: > Joel's model of the problem: >> Every bot gets notifications of other bots. So whenever 1 bot acts >> everyone else gets notification. 2 bots would generate 2 messages for >> every action, 10 bots would generate 10 messages, etc. I should clarify... Bots only respond to bet requests. That's all they do. The messages are generated by the poker server notifying other bots of changes in game and server state. > In test case #3, your bots have to deal with twice as many incoming > messages per second as in test case #1. So the numbers you have chosen > mean that your results don't allow you to conclude that the server is > the problem. I see what you are saying but... > Or is there some throttling mechanism you're not telling us about? > I.e. is there something which makes the bots' message generation rate > decrease as you increase the number of bots? I deal in tables. A table holds 10 bots. Only bots at this table get notified when another bot takes action. All bots get notified when a bot joins a table but that's once per test. The throttling mechanism is that the tables running on machine A have nothing to do with tables running on machine B unless bots from both machines join a single table. Even then bots are limited to receiving notifications of actions taken by bots sitting at the same table. Does this make my diagnosis correct? Joel -- http://wagerlabs.com/ From ulf.wiger@REDACTED Tue Jan 17 17:03:22 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 17 Jan 2006 17:03:22 +0100 Subject: Troubleshooting a high-load scenario Message-ID: I stick to my recommendation. As a rule, I don't think one gains much by having messages stay in the socket buffer, since you can't prioritize them, for example. It's usually better to have an agent suck the messages out of the buffer and get them as quickly as possible to a point where they can be parsed, tagged and prioritized. Once messages have been identified and prioritized, effective load control can take place. For example, your bots respond to bet requests, but could probably dispense with other messages rather cheaply. The efficiency of the bots will also increase if they can process more than one message per time slice. The efficiency of the socket reader also increases if it's allowed to read and dispatch several messages at once. /Uffe > -----Original Message----- > From: Joel Reymont [mailto:joelr1@REDACTED] > Sent: den 17 januari 2006 13:06 > To: Ulf Wiger (AL/EAB) > Cc: Erlang Questions > Subject: Re: Troubleshooting a high-load scenario > > The majority of the load originates with the server. It keeps > sending moves by other players, table state updates, etc. > etc. etc. How does that change your answer? > > On Jan 17, 2006, at 11:57 AM, Ulf Wiger ((AL/EAB)) wrote: > > > > >> Are you suggesting this _with_ the socket reader waiting for the > >> message to be processed before reading the next one? > > > > No. That seems a bit like reversed flow control anyway. > > Do you expect the server to overload the bots? > > Doesn't the majority of the load originate with the bots? > > > > /Uffe > > -- > http://wagerlabs.com/ > > > > > > From matthias@REDACTED Tue Jan 17 17:35:43 2006 From: matthias@REDACTED (Matthias Lang) Date: Tue, 17 Jan 2006 17:35:43 +0100 Subject: Troubleshooting a high-load scenario In-Reply-To: References: Message-ID: <17357.7391.538265.283487@antilipe.corelatus.se> Ulf Wiger (AL/EAB) writes: > As a rule, I don't think one gains much by > having messages stay in the socket buffer, > since you can't prioritize them, for example. There is one important gain: TCP flow control, i.e. in protocols which don't have some other means for flow control, you can make the remote socket block by letting the buffer fill. Assuming you're not using {active, true}. Matthias From ulf.wiger@REDACTED Tue Jan 17 17:43:44 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 17 Jan 2006 17:43:44 +0100 Subject: Troubleshooting a high-load scenario Message-ID: This is true. /U > -----Original Message----- > From: Matthias Lang [mailto:matthias@REDACTED] > Sent: den 17 januari 2006 17:36 > To: Ulf Wiger (AL/EAB) > Cc: Erlang Questions > Subject: RE: Troubleshooting a high-load scenario > > Ulf Wiger (AL/EAB) writes: > > > As a rule, I don't think one gains much by > having > messages stay in the socket buffer, > since you can't > prioritize them, for example. > > There is one important gain: TCP flow control, i.e. in > protocols which don't have some other means for flow control, > you can make the remote socket block by letting the buffer > fill. Assuming you're not using {active, true}. > > Matthias > From gefla@REDACTED Wed Jan 18 00:41:30 2006 From: gefla@REDACTED (Gerd Flaig) Date: Wed, 18 Jan 2006 00:41:30 +0100 Subject: Code repository References: <43CBAB36.1010209@ericsson.com> Message-ID: <877j8y5snp.fsf@kilo.pond.sub.org> Joe Armstrong <" joe.armstrong"@ericsson.com> writes: > What I'd like to have is "something like apt-get" only done right. that makes me curious. What is wrong with apt? Goodbyte, Gerd. -- The last thing one knows in constructing a work is what to put first. -- Blaise Pascal From pupeno@REDACTED Wed Jan 18 02:18:06 2006 From: pupeno@REDACTED (Pupeno) Date: Tue, 17 Jan 2006 22:18:06 -0300 Subject: Troubleshooting a high-load scenario In-Reply-To: <7642BD2B-F1AC-4C5D-BE06-7908063789D4@gmail.com> References: <200601171418.26114.roger.larsson@norran.net> <7642BD2B-F1AC-4C5D-BE06-7908063789D4@gmail.com> Message-ID: <200601172218.07065.pupeno@pupeno.com> On Tuesday 17 January 2006 10:50, Joel Reymont wrote: > > Use tcpdump to see when the messages actually arrives. > > I'll try this indeed. ethereal is another great tool to debug network applications. -- Pupeno (http://pupeno.com) Vendemos: Conocer y collecionar Monedas y Billetes de Todo el Mundo: http://pupeno.com/vendo/#monedas -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From cyberlync@REDACTED Wed Jan 18 02:55:54 2006 From: cyberlync@REDACTED (Eric Merritt) Date: Tue, 17 Jan 2006 17:55:54 -0800 Subject: Fwd: Seattle Area Erl-Lounge on Thursday January 19 at 7:00 Message-ID: I thought I would update the time and location on this. We will have it in Shinwa at 600 5th Ave S. Basically at the corner of South 5th ave and Sounth Weller Street at 7:00pm on Thursday. There is parking available in the Uwajimaya parking lot and Shinwa validates so parking shouldn't be an issue. T http://maps.google.com/maps?f=q&hl=en&q=600+5th+ave+s,+seattle&btnG=Search&ll=47.597858,-122.327528&spn=0.006106,0.022917 ---------- Forwarded message ---------- From: Eric Merritt Date: Jan 2, 2006 12:00 PM Subject: Seattle Area Erl-Lounge on Thursday January 18 at 7:30 To: Erlang Users' List Guys, Franceso Cesarini is going to be in town for a few days so it looks like its a good time to have an Erl-Lounge. So if you are the Seattle area and are interested in Erlang keep your schedules clear on Thursday January 19 at 7:90pm. The location is still undecided but it will be in the downtown/pioneer square/international district area. Suggestions are more then welcome. I will repost to the list when the location has been set. Feel free to just show up but if you are interested in attending I would appreciate an email just so I have some idea of how many people might show up. Thanks, Eric From cyberlync@REDACTED Wed Jan 18 04:45:14 2006 From: cyberlync@REDACTED (Eric Merritt) Date: Tue, 17 Jan 2006 19:45:14 -0800 Subject: Fwd: Seattle Area Erl-Lounge on Thursday January 19 at 7:00 In-Reply-To: References: Message-ID: <43CDB9CA.4000607@gmail.com> Eric Merritt wrote: Well due to some moderate confusion on my part I had the location right but the name wrong. The name of the place is 'Isami. Bar & Grill' The location and all other information is as I described previously. Sorry for the confusion. > I thought I would update the time and location on this. > > We will have it in Shinwa at 600 5th Ave S. Basically at the corner > of South 5th ave and Sounth Weller Street at 7:00pm on Thursday. > There is parking available in the Uwajimaya parking lot and Shinwa > validates so parking shouldn't be an issue. T > > http://maps.google.com/maps?f=q&hl=en&q=600+5th+ave+s,+seattle&btnG=Search&ll=47.597858,-122.327528&spn=0.006106,0.022917 > > ---------- Forwarded message ---------- > From: Eric Merritt > Date: Jan 2, 2006 12:00 PM > Subject: Seattle Area Erl-Lounge on Thursday January 18 at 7:30 > To: Erlang Users' List > > > Guys, > > Franceso Cesarini is going to be in town for a few days so it looks > like its a good time to have an Erl-Lounge. So if you are the Seattle > area and are interested in Erlang keep your schedules clear on > Thursday January 19 at 7:90pm. The location is still undecided but it > will be in the downtown/pioneer square/international district area. > Suggestions are more then welcome. I will repost to the list when the > location has been set. Feel free to just show up but if you are > interested in attending I would appreciate an email just so I have > some idea of how many people might show up. > > Thanks, > Eric > From pasalic@REDACTED Tue Jan 17 21:54:37 2006 From: pasalic@REDACTED (Emir Pasalic) Date: Tue, 17 Jan 2006 14:54:37 -0600 Subject: Call for Papers - GPCE'06 Message-ID: ------------------------------------------------------------------------ -- CALL FOR TECHNICAL PAPERS Fifth International Conference on Generative Programming and Component Engineering (GPCE'06) http://www.gpce.org/06/ October 22-26, 2006 Portland, Oregon (co-located with OOPSLA'06) Sponsored by ACM SIGPLAN, in cooperation with ACM SIGSOFT. Proceedings to be published by ACM Press. ------------------------------------------------------------------------ -- IMPORTANT DATES * Pre-submission: April 30, 2006 * Submission: May 5, 2006, 23:59, Apia time (firm deadline, no extensions) * Notification: June 28, 2005 SCOPE Generative and component approaches are revolutionizing software development similar to how automation and components revolutionized manufacturing. Generative Programming (developing programs that synthesize other programs), Component Engineering (raising the level of modularization and analysis in application design), and Domain-Specific Languages (elevating program specifications to compact domain-specific notations that are easier to write, maintain, and analyze) are key technologies for automating program development. GPCE provides a venue for researchers and practitioners interested in foundational techniques for enhancing the productivity, quality, and time-to-market in software development that stems from deploying standard componentry and automating program generation. In addition to exploring cutting-edge techniques for developing generative and component-based software, our goal is to foster further cross-fertilization between the software engineering research community and the programming languages community. ------------------------------------------------------------------------ -- SUBMISSIONS 10 pages in SIGPLAN proceedings style (sigplanconf.cls) reporting research results and/or experience related to the topics above (PC co-chairs can advise on appropriateness). We particularly encourage original high-quality reports on applying GPCE technologies to real-world problems, relating ideas and concepts from several topics, or bridging the gap between theory and practice. ------------------------------------------------------------------------ -- TOPICS GPCE seeks contributions in software engineering and in programming languages related (but not limited) to: * Generative programming Reuse, meta-programming, partial evaluation, multi-stage and multi-level languages, and step-wise refinement Semantics, type systems, symbolic computation, linking and explicit substitution, in-lining and macros, templates, and program transformation Runtime code generation, compilation, active libraries, synthesis from specifications, development methods, generation of non-code artifacts, formal methods, and reflection * Generative techniques for Product-line architectures Distributed, real-time and embedded systems Model-driven development and architecture * Component-based software engineering Reuse, distributed platforms and middleware, distributed systems, evolution, patterns, development methods, deployment and configuration techniques, and formal methods * Integration of generative and component-based approaches * Domain engineering and domain analysis Domain-specific languages (DSLs) including visual and UML-based DSLs * Separation of concerns Aspect-oriented and feature-oriented programming, Intentional programming and multi-dimensional separation of concerns * Industrial applications Reports on applications of these techniques to real-world problems are especially encouraged, as are submissions that relate ideas and concepts from several of these topics, or bridge the gap between theory and practice. The program committee is happy to advise on the appropriateness of a particular subject. ------------------------------------------------------------------------ -- General Chair Stanislaw Jarzabek (National University of Singapore, Singapore) Program Committee Program Chairs: Douglas Schmidt (Vanderbilt University, USA) Todd Veldhuizen (Indiana University, USA) Program Committee Members: Giuseppe Attardi (University of Pisa, Italy) Elisa Baniassad (Chinese University of Hong Kong, China) Don Batory (University of Texas at Austin, USA) Ira Baxter (Semantic Designs, USA) Shigeru Chiba (Tokyo Institute of Technology, Japan) Charles Consel (INRIA/LaBRI, France) Krzysztof Czarnecki (University of Waterloo, Canada) Aniruddha Gokhale (Vanderbilt University, USA) Jeff Gray (U. of Alabama Birmingham, USA) George Heineman (Worcester Polytechnic Institute, USA) Zhenjiang Hu (University of Tokyo, Japan) H.-Arno Jacobsen (University of Toronto, Canada) Oleg Kiselyov (FNMOC, USA) Fabio Kon (University of S?o Paolo, Brazil) Karl Lieberherr (Northeastern University, USA) Joe Loyall (BBN Technologies, USA) Mira Mezini (Darmstadt University of Technology, Germany) Torben ?. Mogensen (DIKU, Denmark) Emir Pasalic (Rice University, USA) Calton Pu (Georgia Tech, USA) Tim Sheard (Portland State University, USA) Yannis Smaragdakis (Georgia Tech, USA) Michael Stal (Siemens, Germany) Peri Tarr (IBM TJ Watson, USA) Peter Thiemann (Freiburg University, Germany) Eelco Visser (Utrecht University, The Netherlands) Workshops/Tutorials chairs: Christa Schwanninger (Siemens, Germany) Arno Jacobsen (University of Toronto, Canada) Publicity chair: Emir Pasalic (Rice University, USA) Steering Committee: Don Batory (University of Texas at Austin, USA) Krzysztof Czarnecki (University of Waterloo, Canada) Ulrich Eisenecker (University of Leipzig, Germany) Stanislaw Jarzabek (National University of Singapore, Singapore) Eugenio Moggi (University of Genoa, Italy) Greg Morrisett (Harvard University, USA) Frank Pfenning (Carnegie Mellon University, USA) Tim Sheard (Portland State University, USA) Yannis Smaragdakis (Georgia Tech, USA) Walid Taha (Rice University, USA) For additional information, clarification, or questions please feel free to contact the Program Committee Co-chairs (Gpce06-chairs-l@REDACTED). ------------------------------------------------------------------------ -- GPCE Tutorials and Workshops GPCE Tutorials, extending over a half or full day, give a deeper or broader insight than conventional lectures. GPCE Workshops provide intensive collaborative environments, where generative and component technologists meet to discuss and resolve challenging problems in the field. Tutorial and workshop proposals are due Mar 18, 2006. From joe.armstrong@REDACTED Wed Jan 18 09:30:07 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Wed, 18 Jan 2006 09:30:07 +0100 Subject: Code repository Message-ID: > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Gerd Flaig > Sent: den 18 januari 2006 00:42 > To: erlang-questions@REDACTED > Subject: Re: Code repository > > > Joe Armstrong <" joe.armstrong"@ericsson.com> writes: > > > What I'd like to have is "something like apt-get" only done right. > > that makes me curious. What is wrong with apt? > Total consistency. I can do apt-get install, or upgrade or something and having done this the application does not work - now in some cases this appears not to be a fault in the application itself, put in the packaging and in the tracking of dependencies which does not appear to be totally bulletproof. /Joe > Goodbyte, Gerd. > -- > The last thing one knows in constructing a work is what to put first. > -- Blaise Pascal > > From pupeno@REDACTED Wed Jan 18 16:43:55 2006 From: pupeno@REDACTED (Pupeno) Date: Wed, 18 Jan 2006 12:43:55 -0300 Subject: Code repository In-Reply-To: References: Message-ID: <200601181243.55628.pupeno@pupeno.com> On Wednesday 18 January 2006 05:30, Joe Armstrong (AL/EAB) wrote: > Total consistency. > > I can do apt-get install, or upgrade or something and having done this the > application does not work - now in some cases this appears not to be a > fault in the application itself, put in the packaging and in the tracking > of dependencies which does not appear to be totally bulletproof. In any case, when that happens, if it is not because the application requires further configuration to work, it should be considered as a bug and reported (if possible). -- Pupeno (http://pupeno.com) Vendemos: Conocer y collecionar Monedas y Billetes de Todo el Mundo: http://pupeno.com/vendo/#monedas -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From jmj@REDACTED Wed Jan 18 18:03:17 2006 From: jmj@REDACTED (Jean-Marie JACQUET) Date: Wed, 18 Jan 2006 18:03:17 +0100 (MET) Subject: Coordination 2006: Last call for papers Message-ID: <200601181703.k0IH3H810448@backus.info.fundp.ac.be> [ Our apologies for multiple copies ] ====================================================================== Last Call for Papers COORDINATION 2006 8th International Conference on Coordination Models and Languages http://www.cs.unibo.it/discotec06/Coordination06 as part of DisCoTec'06 - Distributed Computing Techniques co-located with DAIS'06 & FMOODS'06 http://www.cs.unibo.it/discotec06 Bologna, Italy 14-16 June 2006 ====================================================================== IMPORTANT DATES * Submission of papers: 22 January 2006 * Notification of acceptance: 7 March 2006 * Final version: 28 March 2006 * Conference: 14-16 June 2006 ====================================================================== CONFERENCE GOALS Modern information systems rely increasingly on combining concurrent, distributed, mobile, reconfigurable and heterogenous components. New models, architectures, languages, verification techniques are necessary to cope with the complexity induced by the demands of today's software development. Coordination languages have emerged as a successful approach, in that they provide abstractions that cleanly separate behavior from communication, therefore increasing modularity, simplifying reasoning, and ultimately enhancing software development. Building on the success of the previous editions, this conference provides a well-established forum for the growing community of researchers interested in models, languages, architectures, and implementation techniques for coordination. PREVIOUS EDITIONS The previous editions of COORDINATION took place in Cesena (Italy), Berlin (Germany), Amsterdam (Netherlands), Limassol (Cyprus), York (UK), Pisa (Italy) and Namur (Belgium). More details are available at http://www.coordination2005.org. TOPICS OF INTEREST They include but are not limited to: * Theoretical models and foundations for coordination: component composition, concurrency, mobility, dynamic aspects of coordination, emergent behavior. * Specification, refinement, and analysis of software architectures: patterns and styles, verification of functional and non-functional properties. * Coordination, architectural, and interface definition languages: implementation, interoperability, heterogeneity. * Multiagent systems and coordination: models, languages, infrastructures. * Dynamic software architectures: mobile code and agents, configuration, reconfiguration, self-organization. * Coordination and modern distributed computing: Web services, peer-to-peer networks, grid computing, context-awareness, ubiquitous computing. * Programming languages, middleware, tools, and environments for the development of coordinated applications * Industrial relevance of coordination and software architectures: programming in the large, domain-specific software architectures and coordination models, case studies. * Interdisciplinary aspects of coordination PROCEEDINGS The conference proceedings will be published by Springer, in the Lecture Notes in Computer Science (LNCS) series. Proceedings of previous editions of this conference are also available in the LNCS series as volumes 1061, 1282, 1594, 1906, 2315, 2949 and 3454. SUBMISSION INSTRUCTIONS Authors are invited to submit full papers electronically no later than 22 January 2006 through the online submission procedure available at at http://conferences.cs.unibo.it/Coordination06. Submissions must be formatted according to the LNCS guidelines (see http://www.springer.de/comp/lncs/authors.html) and must not exceed 15 pages in length. Papers that are not in the requested format or significantly exceed the mandated length may be rejected without going through the review phase. Submissions should explicitly state their contribution and their relevance to the theme of the conference. Other criteria for selection will be originality, significance, correctness, and clarity. Simultaneous or similar submissions to other conferences or journals are not allowed. CONFERENCE LOCATION The conference will be hosted by the Department of Computer Science of the University of Bologna. PROGRAM COMMITTEE Co-Chairs Paolo Ciancarini University of Bologna, Italy Herbert Wiklicky Imperial College London, UK Members Farhad Arbab CWI Amsterdam, The Netherlands Luis Barbosa Universidade do Minho, Portugal Antonio Brogi University of Pisa, Italy Wolfgang Emmerich University College London, UK Frank de Boer CWI & Utrecht University, The Netherlands Jean-Marie Jacquet University of Namur, Belgium Joost Kok Leiden University, The Netherlands Toby Lehman IBM Almaden, US D.C. Marinescu University of Central Florida, US Ronaldo Menezes Florida Institute of Technology, US Andrea Omicini University of Bologna, Italy Paolo Petta OeFAI, Austria Gian Pietro Picco Politecnico di Milano, Italy Ernesto Pimentel University of Malaga, Spain Rosario Pugliese University of Florence, Italy Gruia Catalin Roman Washington University, USA Robert Tolksdorf FU Berlin, Germany Emilio Tuosto University of Leicester, UK Carlos Varela Rensselaer Polytechnic Institute, US Alan Wood University of York, UK From the_Arioch@REDACTED Wed Jan 18 22:28:07 2006 From: the_Arioch@REDACTED (Arioch) Date: Thu, 19 Jan 2006 00:28:07 +0300 Subject: how to download jungerl as whole? Message-ID: Hello! Is there way to download Jungerl as one tarball ? Or is it just a kind of wiki with jus lots of links? From erlang@REDACTED Thu Jan 19 09:49:08 2006 From: erlang@REDACTED (Peter-Henry Mander) Date: Thu, 19 Jan 2006 08:49:08 +0000 Subject: Recursive list comprehension In-Reply-To: <200601190045.k0J0jQwL481740@atlas.otago.ac.nz> References: <200601190045.k0J0jQwL481740@atlas.otago.ac.nz> Message-ID: <1137660549.8054.75.camel@hymir.newport-networks.com> Hi Richard, I've cc'ed the list too, I like a good argument, and the more the merrier. Anyone else care to add oil to the flames? As you probably realised, I'm talking out of the other orifice since I know too little Prolog to make a qualified judgement. It's not long ago that I stumbled on FP and COP and I still don't always grok it, and logic programming ought to be my next learning curve to climb. Now that I've #include I can forge ahead and embarrass myself, again :-) On Thu, 2006-01-19 at 13:45 +1300, Richard A. O'Keefe wrote: > Peter-Henry Mander wrote: > Since Erlang was derived from Prolog a long time ago, I think > Dr. Joe & colleagues omitted backtracking because of rampant > memory consumption > > Er, WHAT "rampant memory consumption"? > Prolog-style backtracking is a way of ECONOMISING on memory, > by holding different things at different TIMES rather than in > different PLACES. I agree that it avoids *explicitly* holding terms of computation in your program code, but (and I speak from a C programming perspective with all the incumbent memory management paranoia) this information is _still_ being implicitly stored in memory to enable the backtracking mechanism to rewind to a previous decision branch in the search tree. A red or green cut (I believe) discards sub-trees that can be reclaimed as free memory. Otherwise if memory was not an issue, Prolog would not need cuts at all. > and the possibly iffy use of red/green cut that I for one never > properly understood. > > It is perfectly possible to have a language with backtracking but > without cuts. (The logic programming language Mercury, for example.) My point above echos yours. But I guess that Mercury either has very clever dead branch pruning to reclaim unreachable backtrack paths, or just doesn't care and guzzles memory. > Erlang gains clarity without backtracking methinks. > > Well, no. In fact, quite the opposite. > Lazy functional languages like Haskell can cope without backtracking > (at the price of taking lots more memory -- remember I said that > backtracking is a way of SAVING memory), but Erlang is not a lazy > language. For problems where backtracking search is appropriate, > Erlang is really rather clumsy. I'm really smelling the stink of my own fart here. Erlang is easier for my 'C' addled brain to cope with because there's no backtracking. But that's only because *I* don't fully understand how to apply it, not because the lack of backtracking is a virtue. If I learnt to use Prolog correctly, my perception will no doubt be inverted. Prolog is designed to solve problems like Zurg, I can't contest that. But I don't agree that Prolog somehow magically stores a search space in thin air. Backtracking needs memory, and please try hard to shake this perception, 'cos the argument will be great fun! :-) > The real issue is side effects. Side effects and backtracking search > are not a good match, because while you can undo variable bindings > easily enough, it's hard to tell a process on another machine "er, > that message I sent you half an hour ago? well, I didn't really mean it..." > (Not impossible. Time warp algorithms do something similar.) > And Erlang is just *full* of side effects (sends and receives count > as side effects here). I agree, side effects must be one of the reason Dr. Joe et al. omitted backtracking, not memory (sorry, another fart). But I'm not convinced that backtracking in Prolog has no memory cost. There seems to be mutual suspicion between FP/logic programmers and etch-bare-metal programmers. You imply that there's no cost at all in using the high level features of Prolog, and I don't believe so. An lisp/prolog weenie can write a program that is provably correct, something a 'C' programmer may not even believe is possible, but may require infinite resources to produce an answer (okay, I'm exaggerating wildly, just hear me through). A programmer whose professional obsession revolves around pointers and other low level resource management knows by experience that these wonderfully powerful tools *must* have a computational and resource cost. The lisp/prolog weenies seem blissfully unaware of this cost. I may be ignorant, maybe they're right to dismiss the cost as a sacrifice for provably correct programs, but Turing's infinite tape is still unavailable. Erlang bridges a gap between these two camps. The design of the language contains pragmatic compromises that keeps resource consumption low, and preserves enough of the functional paradigm to enable proof of correctness. So my question(s) changes: Is backtracking essential? How much do Erlang programmers suffer for not having backtracking? What other FP/logic features are unavailable in Erlang that would be cool to have, and more pertinently, why are they *NOT* included? Pete. From vlad_dumitrescu@REDACTED Thu Jan 19 09:51:23 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Thu, 19 Jan 2006 09:51:23 +0100 Subject: how to download jungerl as whole? In-Reply-To: Message-ID: Hi, You can check it out using anonymous CVS. Regards, Vlad > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Arioch > Sent: Wednesday, January 18, 2006 10:28 PM > To: erlang-questions@REDACTED > Subject: how to download jungerl as whole? > > Hello! > > Is there way to download Jungerl as one tarball ? > Or is it just a kind of wiki with jus lots of links? > From thomasl_erlang@REDACTED Thu Jan 19 11:25:17 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Thu, 19 Jan 2006 02:25:17 -0800 (PST) Subject: Recursive list comprehension In-Reply-To: <1137660549.8054.75.camel@hymir.newport-networks.com> Message-ID: <20060119102517.33481.qmail@web34402.mail.mud.yahoo.com> --- Peter-Henry Mander wrote: > Hi Richard, > > I've cc'ed the list too, I like a good argument, and > the more the > merrier. Anyone else care to add oil to the flames? > > As you probably realised, I'm talking out of the > other orifice since I > know too little Prolog to make a qualified > judgement. It's not long ago > that I stumbled on FP and COP and I still don't > always grok it, and > logic programming ought to be my next learning curve > to climb. Now that > I've #include I can forge ahead and > embarrass myself, > again :-) Well, you're up against one of the world's top tier experts on Prolog. Good luck :-) If you haven't seen this one yet, I can recommend it when you've mastered the basics: http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=8336 Regarding Erlang vs Prolog: From what I recall hearing, there were some concerns about backtracking and side effects (still apparent when we discuss guards, one may note), which may have been the deciding point. Another issue I can vividly imagine is that the "regular joe" programmers, for whom Erlang was intended, always have had a hard time writing useful Prolog -- probably even more so in the mid-80s. There are, of course, plenty of insiders around who can reminisce more effectively about this. Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From erlang@REDACTED Thu Jan 19 11:44:58 2006 From: erlang@REDACTED (Peter-Henry Mander) Date: Thu, 19 Jan 2006 10:44:58 +0000 Subject: Recursive list comprehension In-Reply-To: <20060119102517.33481.qmail@web34402.mail.mud.yahoo.com> References: <20060119102517.33481.qmail@web34402.mail.mud.yahoo.com> Message-ID: <1137667498.8054.109.camel@hymir.newport-networks.com> On Thu, 2006-01-19 at 02:25 -0800, Thomas Lindgren wrote: > > --- Peter-Henry Mander > wrote: > > > I've #include I can forge ahead and > > embarrass myself, > > again :-) > > Well, you're up against one of the world's top tier > experts on Prolog. Good luck :-) Fantastic! I can hardly better this for self-inflicted embarrassment. Oh well, I hope everyone else finds my silver foot as amusing as I do. Richard, I'll buy your book. I owe you at least that much for your patience. Pete. From ulf.wiger@REDACTED Thu Jan 19 16:56:33 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 19 Jan 2006 16:56:33 +0100 Subject: bizarre match specs Message-ID: I was toying around with using match specifications to search on filenames. The idea was basically to take a match specification and compile parts of it to a regexp-like thingie, and traverse a file tree. (There is a reason, which at least in my mind seems sound, but that's a long story.) Example: 1> MS = fun(Objs,Ms) -> Bin=ets:match_spec_compile(Ms), ets:match_spec_run(Objs, Bin) end. 2> L=[{"foo_a.erl",a},{"foo.erl",b},{"fooerl",c}]. [{"foo_a.erl",a},{"foo.erl",b},{"fooerl",c}] 3> MS(L,[{{"foo" ++ '$1','_'},[{'andalso',{'=/=','$1',[]},{'orelse',{'==','$1',".erl"},{'ore lse',{'andalso',{'=/=',{'tl','$1'},[]},{'orelse',{'==',{tl,'$1'},".erl"} ,{'andalso',{'=/=',{'tl',{'tl','$1'}},[]},{'==',{'tl',{'tl','$1'}},".erl "}}}}}}}],['$_']}]). [{"foo_a.erl",a},{"foo.erl",b}] Cool, eh? /: Obviously, it's too ground to be generally useful, and I haven't tested how deeply I can nest the guards before the whole thing chokes or gets totally useless. Boy, would I like to have a regexp pattern in the match spec, or perhaps 'let' and 'skipwhile' in the guards... ;-) {{"foo" ++ '$1', '_'}, [{'andalso',{'=/=','$1',[]}, {let, '$2', {skipwhile, {tl,'$1'}, {'=/=',{'hd','$2'},$\n} {'==', '$2', ".erl"}}}}], ['$_']} One could also imagine bit syntax expressions in match specifications, right? (: Or should I just look for thrills elsewhere? /Uffe From ulf.wiger@REDACTED Thu Jan 19 17:17:16 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 19 Jan 2006 17:17:16 +0100 Subject: bizarre match specs Message-ID: Oh, I apparently forgot to mention that I wanted to emulate the pattern "foo*.erl" using a match spec. The emulation currently only supports up to two characters matching the wildcard part, which was exactly what was needed for my test set. Since the pattern is recursive, we need only extend it further, until something breaks. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Ulf > Wiger (AL/EAB) > Sent: den 19 januari 2006 16:57 > To: Erlang Questions > Subject: bizarre match specs > > > I was toying around with using match specifications to search > on filenames. The idea was basically to take a match > specification and compile parts of it to a regexp-like > thingie, and traverse a file tree. > > (There is a reason, which at least in my mind seems sound, > but that's a long story.) > > Example: > > 1> MS = fun(Objs,Ms) -> Bin=ets:match_spec_compile(Ms), > ets:match_spec_run(Objs, Bin) end. > > 2> L=[{"foo_a.erl",a},{"foo.erl",b},{"fooerl",c}]. > [{"foo_a.erl",a},{"foo.erl",b},{"fooerl",c}] > > 3> MS(L,[{{"foo" ++ > '$1','_'},[{'andalso',{'=/=','$1',[]},{'orelse',{'==','$1',".e > rl"},{'ore > lse',{'andalso',{'=/=',{'tl','$1'},[]},{'orelse',{'==',{tl,'$1 > '},".erl"} > ,{'andalso',{'=/=',{'tl',{'tl','$1'}},[]},{'==',{'tl',{'tl','$ > 1'}},".erl > "}}}}}}}],['$_']}]). > [{"foo_a.erl",a},{"foo.erl",b}] > > Cool, eh? /: > > Obviously, it's too ground to be generally useful, and I > haven't tested how deeply I can nest the guards before the > whole thing chokes or gets totally useless. > > Boy, would I like to have a regexp pattern in the match spec, > or perhaps 'let' and 'skipwhile' in the guards... ;-) > > {{"foo" ++ '$1', '_'}, > [{'andalso',{'=/=','$1',[]}, > {let, '$2', > {skipwhile, {tl,'$1'}, > {'=/=',{'hd','$2'},$\n} > {'==', '$2', ".erl"}}}}], > ['$_']} > > One could also imagine bit syntax expressions in match > specifications, right? (: > > Or should I just look for thrills elsewhere? > > /Uffe > From joelr1@REDACTED Thu Jan 19 20:53:59 2006 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 19 Jan 2006 19:53:59 +0000 Subject: Uptick: A a new trading platform Message-ID: Folks, I'm restarting my Uptick project as a data and execution server on top of Erlang. http://groups.google.com/group/uptick/browse_thread/thread/ b485c20292f2008f Please feel free to join the group to contribute advice and comments! Trading systems are essentially processes that respond to quote messages. They must always be up and running. Market data and execution feeds are your basic protocol handlers and of course Mnesia is the data server, shared by all trading systems. I believe that Erlang is ideally positioned to run and monitor trading systems and scale up to trade as many markets as needed. I'm planning to create a front-end with AJAX on top of Yaws and use the canvas HTML component for drawing stock charts. The trading platform will be open source and I plan to make money on support, custom development and extra products built around the Uptick core. What do you think? Thanks, Joel -- http://wagerlabs.com/ From ok@REDACTED Fri Jan 20 03:24:04 2006 From: ok@REDACTED (Richard A. O'Keefe) Date: Fri, 20 Jan 2006 15:24:04 +1300 (NZDT) Subject: Recursive list comprehension Message-ID: <200601200224.k0K2O4IG488314@atlas.otago.ac.nz> I wrote: > Er, WHAT "rampant memory consumption"? > Prolog-style backtracking is a way of ECONOMISING on memory, > by holding different things at different TIMES rather than in > different PLACES. Peter-Henry Mander replied: I agree that it avoids *explicitly* holding terms of computation in your program code, but (and I speak from a C programming perspective with all the incumbent memory management paranoia) this information is _still_ being implicitly stored in memory to enable the backtracking mechanism to rewind to a previous decision branch in the search tree. For every variable that gets bound there is at most ONE word in the trail to enable it to be unbound. In practice, the trail is usually TINY in comparison with all the other data. For every choice point with outstanding untried choices, there are typically about 8 words. While one does prefer not to have too many choice points hanging around, the reason has nothing to do with their size: the space required for choice points is almost never of any practical concern. Back in the days when 4 megabytes was considered a lot of memory, people were running Prolog interpreters on serious problems quite happily. This even applied to Prolog interpreters (like "C Prolog") that did not have a garbage collector: BACKTRACKING RECLAIMS MEMORY QUICKLY AND CHEAPLY. A red or green cut (I believe) discards sub-trees that can be reclaimed as free memory. Otherwise if memory was not an issue, Prolog would not need cuts at all. Not to be insulting, but don't you think it would be a good idea to actually learn something about Prolog semantics and practice before pontificating about it? So-called "Green" cuts are cuts that have no *logical* effect but simply tell the compiler or interpreter about determinism it is too dumb to discover for itself. They *do* have memory implications, but that's not their main point. So-called "red" cuts have *nothing* to do with memory; the thing that *makes* them "red" is that THEY CHANGE THE SEMANTICS OF THE PROGRAM. If memory were infinite and free, Prolog would still need "red" cuts for the same reasons that they have always been used. > It is perfectly possible to have a language with backtracking but > without cuts. (The logic programming language Mercury, for example.) My point above echos yours. But I guess that Mercury either has very clever dead branch pruning to reclaim unreachable backtrack paths, or just doesn't care and guzzles memory. Why do you find it necessary to say bad things ("guzzles memory") about a system you aren't acquainted with? As it happens, Mercury has an *extremely* clever compiler. In both Prolog and Mercury, it is (usually) NOT backtracking that is responsible for using memory, but constructing data structures. What backtracking offers is fast cheap storage reclamation; faster than either GC *or* free(). If you are worried about memory use, then the languages to be frightened of are the ones like C and C++ with manual storage reclamation. Prolog is designed to solve problems like Zurg, I can't contest that. But I don't agree that Prolog somehow magically stores a search space in thin air. Straw man. Nobody ever said it did. What Prolog *does* do is that when it stops exploring a branch of the search space, it reclaims all the memory allocated along that branch in a single very cheap step. Backtracking needs memory, Yes, it needs memory. Of course it does. But what it needs is *LESS* memory. For example, the classical A* algorithm needs a lot of memory because it keeps around all the states you have visited in case you bump into them again. The IDA* algorithm (Iterative Deepening A*) uses backtracking *IN ORDER TO SAVE MEMORY*; that algorithm is to pay the price of repeated visits because it only needs to store the states along the current branch. That's an *exponential* saving in memory. Something like Haskell or Erlang working over a "spatial" representation of the search space has to rely on the garbage collector to reclaim parts of the search space that are no longer interesting. It is possible to set things up so that you are in effect running a backtracking search, so you don't *need* (much) more memory than a backtracking search would, BUT it takes the garbage collector time to notice this, so even with fairly clever programming you end up *temporarily* holding onto a few hundred percent more memory. and please try hard to shake this perception, 'cos the argument will be great fun! :-) Not for me. This is an old and well documented issue. I agree, side effects must be one of the reason Dr. Joe et al. omitted backtracking, not memory (sorry, another fart). But I'm not convinced that backtracking in Prolog has no memory cost. "no memory cost" COMPARED WITH *WHAT*? There seems to be mutual suspicion between FP/logic programmers and etch-bare-metal programmers. You imply that there's no cost at all in using the high level features of Prolog, and I don't believe so. That is an outright lie. I have never said, implied, hinted, or even accepted any such thing. There are ALWAYS costs in using the high level features of ANY language that HAS high level features. The question is always "what are the alternatives and what are THEIR costs"? A programmer whose professional obsession revolves around pointers and other low level resource management knows by experience that these wonderfully powerful tools *must* have a computational and resource cost. Henry Ledgard invented this wonderful term: "a P-sub-A programmer". This is a programmer who THINKS he is a professional but is REALLY an amateur. Your "professional" programmer seems to be a P-sub-A one. It is true that high level features have a cost. It is ALSO true that low level features have a cost. Your P-sub-A programmer isn't even CLOSE to worrying about the costs of the features HE is (ab)using. One of my favourite examples is a Prolog-vs-Fortran race. I had some data that I wished to analyse using a particular statistical technique. I had a textbook with a full listing of a Fortran program to do the analysis. So I typed the program in. It didn't work. I spent a couple of hours trying to debug it and got nowhere. So I wrote a program in Prolog to do the job. (It took me less time than failing to debug the Fortran code had.) That gave me the answer. COST ONE: time to market. A fast program that isn't finished yet isn't earning you money (or praise). A slow program that IS finished CAN earn you money and praise. But that's not the punch-line. The punch-line is that I went back to the Fortran program and proof-read it with extreme care and found the one typo that had caused the problems and got it going. Now Fortran was designed for numerical calculations like this. And the compiler was an optimising compiler with optimisation level set high. The Prolog program was faster! How did that happen? Well, the Prolog code being simpler and easier to debug, I had used a better data structure. COST TWO: time spent fighting low level details is time NOT spent choosing appropriate high level data structures. This is not rare. I have an example of a program that was first written in C and then rewritten in AWK. The AWK program is faster. Reason? Making the AWK program use memoisation took about five lines of AWK code. Changing the C program would have meant a lot more work. Then there is the fact that the alleged "costs" of high level features are sometimes imaginary. It's not unusual for me to find SML code compiled with the Mlton compiler running at close to the speed of C, certainly within a factor of two. (SML is a strict functional language with strong polymorphic types and mutable arrays.) When Mercury (a pure logic programming language with strong polymorphic types and strong mode/determinism checking) was still new, the Mercury team did some benchmarks and found Mercury running faster than C. I have text processing code where AWK (using a modified version of mawk-1.3.3) beats C. I have some other text processing code in a functional language that's a *lot* faster than the C code it was based on because it uses a "lazy concatenation" representation for strings that suits the problem at hand, a representation which would be quite impractical to use in C. As a practical matter, I have an XML processing toolkit written in Scheme. The tool-chain is (XML to S-expression converter in C) --> (Scheme program uses 'read' to read S-expression) -> (Scheme program uses list processing to transform the tree) -> (Scheme program calls a custom C function to write the tree as XML) and this runs about a factor of 10 or better faster than any XSLT processor I've been able to benchmark (and the Scheme code is about a factor of 6 or 7 shorter than XSLT). The lisp/prolog weenies seem blissfully unaware of this cost. Why do you find it necessary to slander ("weenies", "blissfully unaware") a group of people you don't even know? *Professional* programmers who use Lisp or Prolog (or Erlang!) *are* aware of costs (one way to tell a real professional programmer is that they actually *measure* their programs rather than relying on prejudice). They are also aware that low-level languages have costs of their own. I may be ignorant, You are. maybe they're right to dismiss the cost as a sacrifice for provably correct programs, But they *DON'T* dismiss cost as an issue. They just aren't one-eyed and prejudiced about it. They are aware that development time is a cost. They are aware that a high level language enlarges the scope of what you *CAN* program at all. They are aware that cheap ($1000) computers are now more than a thousand times faster than expensive ($1000000) mainframes of 25 years ago and have about a thousand times as much memory. They are aware that programs that give the wrong answers impose heavy costs on customers. They are aware that buffer overruns (far too frequent in C programs) create security holes that too many "black hats" will maliciously exploit, and that creates costs for all of us. They are aware that the *overall* cost of a computing system depends on more than just how fast you can do strcpy(); disc speed and data volume, and network speed and data volume, these are likely to be at least as important. There aren't just people running web servers in Erlang, SML, Scheme, Lisp, and Prolog, there are people *happily* running such web servers because they are fast *enough*, and the other costs (like security) are *less*. Erlang bridges a gap between these two camps. The design of the language contains pragmatic compromises that keeps resource consumption low, and preserves enough of the functional paradigm to enable proof of correctness. But you could say this of SML or Clean or Mercury or ... So my question(s) changes: Is backtracking essential? Once you have Turing equivalence, NO language feature is "essential". "Essential" is the wrong question. Backtracking is ***USEFUL***. Software engineers care about what will let them get usable working code in time, not about essences. Backtracking is useful for SOME problems. Those are the problems that Prolog is meant for. Backtracking is pretty much irrelevant to other problems. How much do Erlang programmers suffer for not having backtracking? Very little, because they mostly don't use Erlang for problems where it's useful. Just as they suffer very little from not having high speed floating-point vector operations, because they mostly don't use Erlang for doing heavy-duty statistical calculations. What other FP/logic features are unavailable in Erlang that would be cool to have, and more pertinently, why are they *NOT* included? >From logic programming, the only things missing are unification (and other forms of constraint solving) and backtracking search. Unification implies "instantaneous communication" between remote parts of the program, so doesn't suit Erlang's distributed style. Some functional languages have lazy evaluation. But that's a tricksy sort of control structure, and it is very hard to write reliable code that mixes lazy evaluation with side effects. (For a language that tries, see the statistics environment S-PLUS or its free cousin R.) List comprehension syntax *used* to be missing, but it's there now. Lambda-expressions *used* to be missing, but they're there now. >From some logic programming languages and from some functional languages, *the* big thing that's missing would be strong polymorphic type checking with typeclasses. The sticking point here is mixing that with hot loading, which is one of Erlang's strong points. There is an optional type checker for Erlang, in fact there have been several. Why are (or were) various features omitted? Basically because Erlang wasn't an academic research project. It had to become a usable tool for real commercial products very quickly, which meant it had to start *small*. Really good concurrent garbage collection, for example, was more important than streamlined syntax. From pupeno@REDACTED Fri Jan 20 03:34:12 2006 From: pupeno@REDACTED (Pupeno) Date: Thu, 19 Jan 2006 23:34:12 -0300 Subject: How to install an OTP like library Message-ID: <200601192334.17497.pupeno@pupeno.com> Hello, I have my OTP-like library in a state where I would like to install it. Are there any OTP-like libraries out there that are installable (and by installable I mean that you can run make install, scons install or whatever and get it installed in some system directory where erlang picks it up, like I would expect from any library or program). I'd be particularly interested in tarballs targeted to linux systems or alike. If packages like deb, rpm or ebuild exist, better. I am writting a SCons module to build erlang libraries and applications and hopefully, install them as well. Would it be ok to install to where the rest of erlang is, like /usr/lib/erlang/lib, or that is reserved only to erlang ? Thank you. -- Pupeno (http://pupeno.com) Vendemos: Conocer y collecionar Monedas y Billetes de Todo el Mundo: http://pupeno.com/vendo/#monedas -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From klacke@REDACTED Fri Jan 20 09:53:37 2006 From: klacke@REDACTED (Claes Wikstom) Date: Fri, 20 Jan 2006 09:53:37 +0100 Subject: Uptick: A a new trading platform In-Reply-To: References: Message-ID: <43D0A511.1000108@hyber.org> Joel Reymont wrote: > I believe that Erlang is ideally positioned to run and monitor trading > systems and scale up to trade as many markets as needed. I agree > I'm planning > to create a front-end with AJAX on top of Yaws and use the canvas HTML > component for drawing stock charts. It would be really nice to have some yaws/ajax libs that can be reused. I know tobbe has been doing quite a lot of ajax work with yaws lateley. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From joelr1@REDACTED Fri Jan 20 10:36:11 2006 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 20 Jan 2006 09:36:11 +0000 Subject: AJAX and Yaws In-Reply-To: <43D0A511.1000108@hyber.org> References: <43D0A511.1000108@hyber.org> Message-ID: <2507EF17-8530-4D1E-BDB2-9324BFBF86D3@gmail.com> On Jan 20, 2006, at 8:53 AM, Claes Wikstom wrote: > It would be really nice to have some yaws/ajax libs that > can be reused. I know tobbe has been doing quite a lot of > ajax work with yaws lateley. I'm curios, what type of AJAX libs would you create for Yaws? Wouldn't the libs have to be coded in JavaScript and live on the client? -- http://wagerlabs.com/ From g.fortino@REDACTED Fri Jan 20 10:28:39 2006 From: g.fortino@REDACTED (Giancarlo Fortino) Date: Fri, 20 Jan 2006 10:28:39 +0100 Subject: CfP UPGRADE-CDN'06 Message-ID: <003d01c61da3$f82ad830$2c1861a0@kundera> ************************** CALL FOR PAPERS ************************** ---------------------------------------------------------- Workshop on the Use of P2P, GRID and Agents for the Development of Content Distribution Networks (UPGRADE-CDN) ---------------------------------------------------------- to take place during 15th IEEE HPDC (High Performance Distributed Computing) June 28-31, 2006, Paris, France http://www.hpdc.org HPDC'06 ------- High-Performance Distributed Computing (HPDC) combines the advances in research and technologies in high speed networks, software, distributed computing and parallel processing to deliver high-performance, large-scale and cost-effective computational, storage and communication capabilities to a wide range of applications. The intent of this meeting is to provide a forum in which researchers report on new ideas and technical insights, application teams express the challenges of constructing wide area or scalable high performance applications, and technology creators report on future developments. UPGRADE-CDN'06 ------------------------------------------------- Content Distribution Networks (CDNs) have recently emerged to improve efficiency of static, time-dependent and/or rich media content delivery atop large-scale IP-based networks. Apart from network technology advances, design and implementation of robust and efficient CDNs in large-scale computing environments demand for emerging paradigms and software technology able to support the core functionalities of CDNs, namely distribution, management, discovery and delivery of content. Agent, P2P and GRID computing paradigm and technology have already demonstrated their suitability in supporting the development of high-performance systems over large-scale, dynamic and heterogeneous environments. Therefore we believe that their integrated use, which accounts for dynamism (P2P), robustness (GRID), and intelligence (Agents), can augment effectiveness and boost efficiency of the future content distribution infrastructures. Researchers involved in emerging distributed technologies such as P2P, Grids, intelligent and mobile agents may be interested in showing how such technologies can be adopted to support effective design and efficient implementation of high-performance CDNs. Also researchers from the CDN research area could be interested in the investigation of such innovative technologies that can be exploited to meet the more and more dynamic nature of CDNs. The workshop can be a place in which researchers can present and exchange their ideas and research results to facilitate the convergence of such technologies in CDNs. The outcome of the workshop should be twofold: - to investigate how P2P, Grid and Agent technologies can be usefully exploited in CDNs - to favour the convergence of such paradigms through experience in the well suited domain of CDNs In this workshop we are therefore interested in the combined issues of using P2P, GRID and Agent technology to support effective design and efficient implementation of high-performance content distribution networks. Areas of interest ----------------- We are interested in the following topic areas (although this list should not be treated as exclusive) which should be approached through the combined use of P2P, GRID and Agent technologies: * architectures for general-purpose content distribution networks * architectures for streaming content distribution networks * protocols and mechanisms for content and resource management * protocols and mechanisms for content and resource discovery * protocols and mechanisms for content delivery * protocols and mechanisms for content distribution * mechanisms for content-based request redirection * mechanisms for cooperative caching * frameworks and toolkits for the development of CDNs * novel applications based on CDNs Program Chairs -------------------- Giancarlo Fortino - Universit? della Calabria, Italy g.fortino@REDACTED Carlo Mastroianni - ICAR/CNR (Italian National Research Council), Italy mastroianni@REDACTED Carlo E. Palau - Universidad Politecnica de Valencia, Spain cpalau@REDACTED Workshop Program Committee -------------------------- Manuel Esteve Universidad Politecnica de Valencia, Spain Michael J. Freedman University of New York, USA Adriana Iamnitchi University of South Florida, USA Jiming Liu Hong Kong Baptist University, Honk Kong Michela Meo Politecnico di Torino, Italy Guillaume Pierre Vrije Universiteit, The Netherlands Omer Rana University of Cardiff, UK Wilma Russo Universit? della Calabria, Italy Giandomenico Spezzano ICAR/CNR (Italian National Research Council), Italy Cormac J. Sreenam University College Cork, Ireland Domenico Talia Universit? della Calabria, Italy Ian Taylor University of Cardiff, UK Rainer Unland University of Essen, Germany Eugenio Zimeo Universit? del Sannio, Italy Web Site -------- Most recent information about this track may be found at the UPGRADE-CDN'06 web site at http://lisdip.deis.unical.it/workshops/upgrade-cdn06/index.htm. Submission Guidelines --------------------- Original papers from the above-mentioned or other related areas will be considered. Please submit full papers: 6 pages maximum in IEEE Compute Science format. Please follow this link to submit your paper: https://ssl.linklings.net/conferences/hpdc2006/ Please remember you need to register before submitting your paper. Each submission will be reviewed by at least three members of the International Program Committee. A ll accepted papers will be published in the Workshop Proceedings. Publication ----------- The workshop proceedings will be published by the IEEE CS and distributed at the conference. Journal Special Issue --------------------- We have also planned to have a SPECIAL ISSUE on an International Journal with the best papers presented and discussed to the workshop. Important Dates --------------- February 28, 2006: Submission of Papers March 31, 2006 : Notification of Acceptance/ Rejection April 10, 2006 : Submission of Camera-Ready Copies of Accepted Papers June 20, 2006 : Workshop Takes Place. From chris.double@REDACTED Fri Jan 20 11:32:26 2006 From: chris.double@REDACTED (Chris Double) Date: Fri, 20 Jan 2006 23:32:26 +1300 Subject: AJAX and Yaws In-Reply-To: <2507EF17-8530-4D1E-BDB2-9324BFBF86D3@gmail.com> References: <43D0A511.1000108@hyber.org> <2507EF17-8530-4D1E-BDB2-9324BFBF86D3@gmail.com> Message-ID: > Wouldn't the libs have to be coded in JavaScript and live on the client? An approach might be something like that taken by Ruby on Rails. This would involve Erlang code that is run on the web server (in a .yaws file for example) that generates the javascript. This is what the code in jungerl is doing iirc. This makes for nice natural looking server code for generating html, to create 'ajax' links to other erlang functions which would then generate the html for the page when the user clicks on the link for example. I've written a web app that uses Backbase (http://www.backbase.com) which uses a declarative XML format instead of javascript to describe the ajax interaction. This can be described using Yaws' ehtml syntax and works quite nicely. All-in-all Yaws is very nice for Ajax based web design imho. Chris. -- http://www.bluishcoder.co.nz From chris.double@REDACTED Fri Jan 20 11:42:14 2006 From: chris.double@REDACTED (Chris Double) Date: Fri, 20 Jan 2006 23:42:14 +1300 Subject: Uptick: A a new trading platform In-Reply-To: References: Message-ID: > I believe that Erlang is ideally positioned to run and monitor > trading systems and scale up to trade as many markets as needed. I'm > planning to create a front-end with AJAX on top of Yaws and use the > canvas HTML component for drawing stock charts. You might be interested in server push options, where you can have the server pushing events to the html client. I have a very simple example using Yaws here: http://www.bluishcoder.co.nz/2005/11/pushing-events-to-browser-via-ajax.html I also describe other options for server based push at: http://www.bluishcoder.co.nz/2005/11/more-on-ajax-and-server-push.html I have an application that also needs to display charts using ajax from regular server events so would be interested in what you come up with. I was thinking of using a flash bridge like AFLAX. In my case I'm getting regular server updates of odds and dividends from TAB's for horse race meetings and displaying them in the browser. Chris. -- http://www.bluishcoder.co.nz From tobbe@REDACTED Fri Jan 20 13:04:40 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Fri, 20 Jan 2006 13:04:40 +0100 Subject: AJAX and Yaws In-Reply-To: References: <43D0A511.1000108@hyber.org> <2507EF17-8530-4D1E-BDB2-9324BFBF86D3@gmail.com> Message-ID: Chris Double wrote: >>Wouldn't the libs have to be coded in JavaScript and live on the client? > > > An approach might be something like that taken by Ruby on Rails. This > would involve Erlang code that is run on the web server (in a .yaws > file for example) that generates the javascript. This is what the code > in jungerl is doing iirc. I'm using the 'js' library in jungerl, which basically is using the prototype.js library (which is used by Ruby on Rails). It lets me do various AJAX related things in an easy way. I'm also using the 'yfront' library, which is an embryo for a Web-app building toolbox. For example, it contains a blog plugin that easily can be integrated into an existing Yaws/Mnesia application. Since it is in jungerl, anyone is welcome to add good stuff to it. And since I'm using erlmerge (heard this before... ?) it is easy to keep up with new versions of the libraries. Cheers, Tobbe From mickael.remond@REDACTED Fri Jan 20 18:18:58 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Fri, 20 Jan 2006 18:18:58 +0100 Subject: Mnesia delete objects Message-ID: <20060120171858.GA14043@memphis.ilius.fr> Hello, The Mnesia documentation says: If a table is of type bag, we may sometimes want to delete only some of the records with a certain key. This can be done with the delete_object/3 function. A complete record must be supplied to this function. My question is the following: Does this mean that delete_object is intended to be use only with bag table ? We have been reported that the delete_object function can break additionnal indexes when using delete_objet on a set table. (Some object can no more be found by the index after use of a delete object with this index). Thank you ! -- Micka?l R?mond http://www.process-one.net/ From cyberdanx@REDACTED Fri Jan 20 23:00:37 2006 From: cyberdanx@REDACTED (Chris Campbell) Date: Fri, 20 Jan 2006 22:00:37 +0000 Subject: Quicky: User_default Message-ID: Hi, How do you load user_default? The advice in the manual doesn't seem to work. .erlang is read (confirmed with io:format), but it doesn't load the user defaults file. Actually, it may load it but mm(), etc don't become available. This worked before, but I reinstalled everything and can't remember the fix. Cheers, Chris ~/.erlang code:load_abs("/home/danx/user_default.erl"). ~/user_default.erl -module(user_default). -export([mm/0, modified_modules/0, lm/0]). mm() -> modified_modules(). modified_modules() -> [M || {M, _} <- code:all_loaded(), module_modified(M) == true]. module_modified(Module) -> case code:is_loaded(Module) of {file, preloaded} -> false; {file, Path} -> CompileOpts = proplists:get_value(compile, Module:module_info()), CompileTime = proplists:get_value(time, CompileOpts), Src = proplists:get_value(source, CompileOpts), module_modified(Path, CompileTime, Src); _ -> false end. module_modified(Path, PrevCompileTime, PrevSrc) -> case find_module_file(Path) of false -> false; ModPath -> {ok, {_, [{_, CB}]}} = beam_lib:chunks(ModPath, ["CInf"]), CompileOpts = binary_to_term(CB), CompileTime = proplists:get_value(time, CompileOpts), Src = proplists:get_value(source, CompileOpts), not (CompileTime == PrevCompileTime) and (Src == PrevSrc) end. find_module_file(Path) -> case file:read_file_info(Path) of {ok, _} -> Path; _ -> %% may be the path was changed? case code:where_is_file(filename:basename(Path)) of non_existing -> false; NewPath -> NewPath end end. lm() -> [c:l(M) || M <- mm()]. From serge@REDACTED Fri Jan 20 23:20:24 2006 From: serge@REDACTED (Serge Aleynikov) Date: Fri, 20 Jan 2006 17:20:24 -0500 Subject: Quicky: User_default In-Reply-To: References: Message-ID: <43D16228.2060502@hq.idt.net> Try to specify it without ".erl" extension: code:load_abs("/home/danx/user_default"). I suggest that you also add a help function to your user_default.erl, so that the new command can be shown in the help/0 call within the shell: help() -> shell_default:help(), format("** user extended commands **~n"), format("mm() -- DESCRIBE THE COMMAND HERE\n"), true. Regards, Serge Chris Campbell wrote: > Hi, > > How do you load user_default? The advice in the manual doesn't seem > to work. .erlang is read (confirmed with io:format), but it doesn't > load the user defaults file. Actually, it may load it but mm(), etc > don't become available. This worked before, but I reinstalled > everything and can't remember the fix. > > > Cheers, > Chris > > ~/.erlang > > code:load_abs("/home/danx/user_default.erl"). > > ~/user_default.erl > > -module(user_default). > -export([mm/0, modified_modules/0, lm/0]). > > mm() -> > modified_modules(). > > modified_modules() -> > [M || {M, _} <- code:all_loaded(), module_modified(M) == true]. > > module_modified(Module) -> > case code:is_loaded(Module) of > {file, preloaded} -> > false; > {file, Path} -> > CompileOpts = proplists:get_value(compile, Module:module_info()), > CompileTime = proplists:get_value(time, CompileOpts), > Src = proplists:get_value(source, CompileOpts), > module_modified(Path, CompileTime, Src); > _ -> > false > end. > > module_modified(Path, PrevCompileTime, PrevSrc) -> > case find_module_file(Path) of > false -> > false; > ModPath -> > {ok, {_, [{_, CB}]}} = beam_lib:chunks(ModPath, ["CInf"]), > CompileOpts = binary_to_term(CB), > CompileTime = proplists:get_value(time, CompileOpts), > Src = proplists:get_value(source, CompileOpts), > not (CompileTime == PrevCompileTime) and (Src == PrevSrc) > end. > > find_module_file(Path) -> > case file:read_file_info(Path) of > {ok, _} -> > Path; > _ -> > %% may be the path was changed? > case code:where_is_file(filename:basename(Path)) of > non_existing -> > false; > NewPath -> > NewPath > end > end. > > lm() -> > [c:l(M) || M <- mm()]. > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From sam@REDACTED Fri Jan 20 23:38:30 2006 From: sam@REDACTED (Samuel Montgomery-Blinn) Date: Fri, 20 Jan 2006 17:38:30 -0500 Subject: AJAX and Yaws Message-ID: <43D16666.5040200@caveman.org> On the one hand, it could be nice to write Erlang and have this exported to the user as JavaScript code. This is the approach that Uncommon Web uses, with Lisp. A colleague of mine uses the UCW platform (http://common-lisp.net/project/ucw/), and instead of expressing JavaScript, he can write: ... :inline-javascript (js:js (defun toggle-display (id) (let ((element (document.get-element-by-id id))) (with-slots (display) (slot-value element 'style) (setf display (if (= display "none") "block" "none"))) (let ((formname (+ id "-form")) (textname (+ id "-text"))) (document[formname][textname].focus)))) ... As for me, I would express reservations on whether such a library is as useful as it might seem. It may save you (on its face) from having to write JavaScript functions, and being able to simply write Lisp, but in the end when you are debugging your functions, you will need the JavaScript skills anyway; only with such a library you would have to translate the resulting error back into the origin language (Lisp, Erlang, etc). In the PHP (and other similar languages) world there is a fairly nice library called SAJAX (http://www.modernmethod.com/sajax/). But again, the benefits of these libraries (perhaps rapid generation or prototype work, simplicity from the original author perspective) do generally have drawbacks in completeness. For example, to duplicate the logic of GMail keyboard keys, writing a javascript function in javascript was fairly straight-forward, but to do it in Erlang and have it translated into Javascript, hoping that the translation is as you intended it, and then debugging when perhaps the generated script is not correct... it seems it would be simpler to use the domain language (JavaScript) than Erlang. There are large libraries of Javascript code, some of them even useful; documentation for Javascript interaction with the HTML DOM is verbose and widespread. Do we want to document all of the DOM again, this time for Erlang->Javascript->DOM? That said, perhaps documenting an Erlang library would be as simple as declaring the Javascript that would result. But then to understand the documentation, you would already need to know Javascript, in which case you might as well write the script in Javascript anyway; this also lets you keep non-inline javascript (e.g. "mylib.js") and design your Javascript to be modular and re-usable for others, including those poor souls not using Erlang/Yaws. As an example of how I current use Yaws/AJAX: (somewhere in an ehtml clause...): {td, [], {input, [{type,checkbox},{onClick,"tdxToggleItem(this);"}],[]}}, The JavaScript function is defined in a library that is included in the HTML head section: Inside the JS library: function tdxToggleItem(src) { // ... // send update tdxSimpleItemUpdate(src.parentNode.parentNode.id,'complete',(src.checked*1)); // ... } Which eventually does the "AJAX" way of using an XMLHttpRequest object to communicate the action via queryvars to some other Yaws URI. Being able to shortcut the whole process by saying, perhaps: {td, [], {input, [{type,checkbox},{onClick,{mylib:myfun(E) ...}],[]}}, That would be the interesting part, but one which would either require heavy configuration or native Yaws support for such a thing. -Sam From cyberdanx@REDACTED Fri Jan 20 23:42:51 2006 From: cyberdanx@REDACTED (Chris Campbell) Date: Fri, 20 Jan 2006 22:42:51 +0000 Subject: Quicky: User_default In-Reply-To: <43D16228.2060502@hq.idt.net> References: <43D16228.2060502@hq.idt.net> Message-ID: On 20/01/06, Serge Aleynikov wrote: > Try to specify it without ".erl" extension: > > code:load_abs("/home/danx/user_default"). I tried that just now, mm(), etc aren't found. :| Actually it does work. I didn't realise you had to compile user_default. I figured it would read it as text. Thanks! From lonnie_smith@REDACTED Sat Jan 21 03:39:04 2006 From: lonnie_smith@REDACTED (Lonnie Smith) Date: Fri, 20 Jan 2006 18:39:04 -0800 Subject: erlang & mnesia & emacs - erlang.el Message-ID: <1137811144.4526.252376210@webmail.messagingengine.com> Hi - I am using the erlang.el file provided with the Erlang/OTP distrubution to develop in emacs. I was wondering what approaches people took to providing arguments to the shell emacs starts for me(eg. -snode, -mnesia dir, etc). I found the inferior-erlang-machine-options, which is used to set the options passed to the erlang shell at startup. I could hard code the options in the erlang.el file, but I'd rather have a hook where I could specify my options in my .emacs file or redefine my desired options in the mini-buffer. Has anyone implemented hooks that allow you to do this kind of on-the-fly customization? In the meantime, is there a interface I can use to specify Mnesia directory to use? I currently set it on the command line with, "-mnesia dir Dir", but it would need less emacs customization if I could change the behavior programatically. I saw mnesia:install_fallback/2, but that looks like it is a different beast and comes with some strong warnings. I've read a lot of the documentation and searched through rest with no mention, so I thought I'd ask. Thanks in advance, Lonnie -- Lonnie Smith lonnie_smith@REDACTED -- http://www.fastmail.fm - Access all of your messages and folders wherever you are From ernie.makris@REDACTED Sat Jan 21 04:17:06 2006 From: ernie.makris@REDACTED (Ernie Makris) Date: Fri, 20 Jan 2006 22:17:06 -0500 Subject: new erlang blog Message-ID: <43D1A7B2.6050708@comcast.net> Hi, I decided to start blogging about erlang dev topics. Thought people might be interested: http://devtopics.blogspot.com/ Thanks Ernie From pupeno@REDACTED Sat Jan 21 04:47:58 2006 From: pupeno@REDACTED (Pupeno) Date: Sat, 21 Jan 2006 00:47:58 -0300 Subject: erlang & mnesia & emacs - erlang.el In-Reply-To: <1137811144.4526.252376210@webmail.messagingengine.com> References: <1137811144.4526.252376210@webmail.messagingengine.com> Message-ID: <200601210048.05609.pupeno@pupeno.com> On Friday 20 January 2006 23:39, Lonnie Smith wrote: > Hi - > > I am using the erlang.el file provided with the Erlang/OTP distrubution > to develop in emacs. I was wondering what approaches people took to > providing arguments to > the shell emacs starts for me(eg. -snode, -mnesia dir, etc). > > I found the inferior-erlang-machine-options, which is used to set the > options passed to the erlang shell at startup. I could hard code the > options in the erlang.el file, but I'd rather have a hook where I could > specify my options in my .emacs file or redefine my desired options in > the mini-buffer. Has anyone implemented hooks that allow you to do this > kind of on-the-fly customization? Why not using the inferior-erlang-machine-options you mentioned ? I have (custom-set-variables <<<<>>>> '(inferior-erlang-machine-options (quote ("-sname" "emacs")) t) <<<<>>>>) in my .emacs. -- Pupeno (http://pupeno.com) Vendemos: Camara de fotos rusa ????? ET (ZENIT) con flash ?????: http://pupeno.com/vendo/#camara -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From pupeno@REDACTED Sat Jan 21 05:31:27 2006 From: pupeno@REDACTED (Pupeno) Date: Sat, 21 Jan 2006 01:31:27 -0300 Subject: Running an application from the (unix) command line Message-ID: <200601210131.31567.pupeno@pupeno.com> Hello, how do you run an application from the command line ? erl -s application start myapp doesn't seem to work. Thanks. -- Pupeno (http://pupeno.com) Vendemos: Kit del guitarrista: http://pupeno.com/vendo/#kit -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From lonnie_smith@REDACTED Sat Jan 21 07:06:06 2006 From: lonnie_smith@REDACTED (Lonnie Smith) Date: Fri, 20 Jan 2006 22:06:06 -0800 Subject: erlang & mnesia & emacs - erlang.el Message-ID: <1137823566.11227.252382720@webmail.messagingengine.com> On Friday 20 January 2006 19:47, Pupeno wrote: > Why not using the inferior-erlang-machine-options you mentioned ? I have > (custom-set-variables > <<<<>>>> > '(inferior-erlang-machine-options (quote ("-sname" "emacs")) t) > <<<<>>>>) > in my .emacs. Thanks, that works like a charm. I guess I forgot the disclaimer about being an emacs newbie without a clue. I would still love to find out if there is a way to set the mnesia directory programmatically. Lonnie -- Lonnie Smith lonnie_smith@REDACTED -- http://www.fastmail.fm - Accessible with your email software or over the web From pupeno@REDACTED Sat Jan 21 08:52:34 2006 From: pupeno@REDACTED (Pupeno) Date: Sat, 21 Jan 2006 04:52:34 -0300 Subject: Installing the .boot file. Message-ID: <200601210452.38159.pupeno@pupeno.com> where can I install my .boot file to be found ? $ erl -boot myapp {"init terminating in do_boot",{'cannot get bootfile','myapp.boot'}} I tried /usr/lib/erlang/release /usr/lib/erlang/releases/R10B /usr/lib/erlang/releases/0.0.0 (0.0.0 is the version of myapp). Myapp is installed on /usr/lib/erlang/lib/myapp-0.0.0/ and I can load it successfully, I can even run it by: application:start(myapp). Thank you. -- Pupeno (http://pupeno.com) Vendemos: Kit del guitarrista: http://pupeno.com/vendo/#kit -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From matthias@REDACTED Sat Jan 21 08:53:02 2006 From: matthias@REDACTED (Matthias Lang) Date: Sat, 21 Jan 2006 08:53:02 +0100 Subject: Running an application from the (unix) command line In-Reply-To: <200601210131.31567.pupeno@pupeno.com> References: <200601210131.31567.pupeno@pupeno.com> Message-ID: <17361.59486.223232.535924@antilipe.corelatus.se> Pupeno writes: > Hello, > how do you run an application from the command line ? > erl -s application start myapp > doesn't seem to work. Try following the instructions in the FAQ exactly: | 5.7. ...run an Erlang program directly from the unix shell? | | To run Erlang programs without running the Erlang shell, we just pass | some more switches to the Erlang virtual machine. Here's hello world | again: | | -module(hello). | -export([hello_world/0]). | | hello_world() -> | io:fwrite("hello, world\n"). | | | Save this as hello.erl, compile it and run it directly from the unix | (or msdos) command line: | | matthias >erl -compile hello | matthias >erl -noshell -s hello hello_world -s init stop | hello, world You find the rest of the FAQ at http://www.erlang.org/faq/t1.html and if you want to know the full details of command line passing, this part of the manual explains it: http://erlang.se/doc/doc-5.4.12/erts-5.4.12/doc/html/erl.html Matthias From ulf.wiger@REDACTED Sat Jan 21 11:49:31 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Sat, 21 Jan 2006 11:49:31 +0100 Subject: Installing the .boot file. Message-ID: Pupeno wrote: > where can I install my .boot file to be found ? > > $ erl -boot myapp > {"init terminating in do_boot",{'cannot get bootfile','myapp.boot'}} Give the full path name (without the .boot extension), e.g.: erl -boot /usr/lib/erlang/lib/myapp-0.0.0/priv/boot/myapp /Uffe From ulf.wiger@REDACTED Sat Jan 21 11:51:26 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Sat, 21 Jan 2006 11:51:26 +0100 Subject: erlang & mnesia & emacs - erlang.el Message-ID: Lonnie Smith wrote: > > I would still love to find out if there is a way to set the > mnesia directory programmatically. mnesia:start(ExtraEnv). E.g. mnesia:start([{dir, "..."}]). /Uffe From pupeno@REDACTED Sat Jan 21 14:58:59 2006 From: pupeno@REDACTED (Pupeno) Date: Sat, 21 Jan 2006 10:58:59 -0300 Subject: Running an application from the (unix) command line In-Reply-To: <17361.59486.223232.535924@antilipe.corelatus.se> References: <200601210131.31567.pupeno@pupeno.com> <17361.59486.223232.535924@antilipe.corelatus.se> Message-ID: <200601211059.04661.pupeno@pupeno.com> I've read the FAQ and the manual, that is how I know erl -s takes Module [Fuction [Arguments]] and that is how I came up with erl -s application start myapp on the first place (which you cas nee I mention in my first mail), which doesn't work. Thanks. On Saturday 21 January 2006 04:53, Matthias Lang wrote: > Pupeno writes: > > Hello, > > how do you run an application from the command line ? > > erl -s application start myapp > > doesn't seem to work. > > Try following the instructions in the FAQ exactly: > | 5.7. ...run an Erlang program directly from the unix shell? > | > | To run Erlang programs without running the Erlang shell, we just pass > | some more switches to the Erlang virtual machine. Here's hello world > | again: > | > | -module(hello). > | -export([hello_world/0]). > | > | hello_world() -> > | io:fwrite("hello, world\n"). > | > | > | Save this as hello.erl, compile it and run it directly from the unix > | (or msdos) command line: > | > | matthias >erl -compile hello > | matthias >erl -noshell -s hello hello_world -s init stop > | hello, world > > You find the rest of the FAQ at > > http://www.erlang.org/faq/t1.html > > and if you want to know the full details of command line passing, this > part of the manual explains it: > > http://erlang.se/doc/doc-5.4.12/erts-5.4.12/doc/html/erl.html > > Matthias -- Pupeno (http://pupeno.com) Vendemos: Camara de fotos rusa ????? ET (ZENIT) con flash ?????: http://pupeno.com/vendo/#camara -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From pupeno@REDACTED Sat Jan 21 15:01:36 2006 From: pupeno@REDACTED (Pupeno) Date: Sat, 21 Jan 2006 11:01:36 -0300 Subject: Installing the .boot file. In-Reply-To: References: Message-ID: <200601211101.36346.pupeno@pupeno.com> On Saturday 21 January 2006 07:49, Ulf Wiger (AL/EAB) wrote: > Pupeno wrote: > > where can I install my .boot file to be found ? > > > > $ erl -boot myapp > > {"init terminating in do_boot",{'cannot get bootfile','myapp.boot'}} > > Give the full path name (without the .boot extension), > e.g.: > > erl -boot /usr/lib/erlang/lib/myapp-0.0.0/priv/boot/myapp That is what I was trying to avoid, I could also specify the path to -pa and it works. But all that is going to end up in a script to run my application and if I put any path in the script, the script would be system dependent (paths changes from system to system) and I'd have to make my build system capable of modifying a script, which doesn't seem easy nor straightforward. Thank you. -- Pupeno (http://pupeno.com) Vendemos: Kit del guitarrista: http://pupeno.com/vendo/#kit -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From danie@REDACTED Sat Jan 21 15:43:52 2006 From: danie@REDACTED (Danie Schutte) Date: Sat, 21 Jan 2006 16:43:52 +0200 Subject: Installing the .boot file. In-Reply-To: <200601211101.36346.pupeno@pupeno.com> References: <200601211101.36346.pupeno@pupeno.com> Message-ID: <200601211643.53094.danie@erlfinsys.net> Since you are going the OTP route :) I would suggest stick to known directory structures as suggested in the documentation and some leading experts :) The basic structure we use looks as follows project bin lib patch app ebin src include releases x.y misc in misc we keep our startup scripts and the app is started from within the project directory - using paths relative to that. example: troy.sh erl +A 255 -name troy@REDACTED -boot releases/1.0/troy -config releases/1.0/sys -mnesia dir '"/troy/db_data/troy"' This way everything is "neatly" placed in the right spot - which is easier and cleaner to maintain later on. On Saturday 21 January 2006 16:01, Pupeno wrote: > On Saturday 21 January 2006 07:49, Ulf Wiger (AL/EAB) wrote: > > Pupeno wrote: > > > where can I install my .boot file to be found ? > > > > > > $ erl -boot myapp > > > {"init terminating in do_boot",{'cannot get bootfile','myapp.boot'}} > > > > Give the full path name (without the .boot extension), > > e.g.: > > > > erl -boot /usr/lib/erlang/lib/myapp-0.0.0/priv/boot/myapp > > That is what I was trying to avoid, I could also specify the path to -pa > and it works. But all that is going to end up in a script to run my > application and if I put any path in the script, the script would be system > dependent (paths changes from system to system) and I'd have to make my > build system capable of modifying a script, which doesn't seem easy nor > straightforward. Thank you. From pupeno@REDACTED Sat Jan 21 16:55:18 2006 From: pupeno@REDACTED (Pupeno) Date: Sat, 21 Jan 2006 12:55:18 -0300 Subject: Installing the .boot file. In-Reply-To: <200601211643.53094.danie@erlfinsys.net> References: <200601211101.36346.pupeno@pupeno.com> <200601211643.53094.danie@erlfinsys.net> Message-ID: <200601211255.22558.pupeno@pupeno.com> On Saturday 21 January 2006 11:43, Danie Schutte wrote: > Since you are going the OTP route :) > > I would suggest stick to known directory structures as suggested in the > documentation and some leading experts :) > > The basic structure we use looks as follows > > project > bin > lib > patch > app > ebin > src > include > releases > x.y > misc > > in misc we keep our startup scripts > and the app is started from within the project directory - using paths > relative to that. > > example: > troy.sh > > erl +A 255 -name troy@REDACTED -boot releases/1.0/troy > -config releases/1.0/sys -mnesia dir '"/troy/db_data/troy"' > > > This way everything is "neatly" placed in the right spot - which is easier > and cleaner to maintain later on. Except for one thing, each application is in its own directory (instead of a system wide know directory, like /usr/lib/erlang/) so for applications to find other applications I should specify -pa or similar and I end up having system specific directories on start up scripts, again where I started. The other downside is that developing in that structure of directories is painfully, for every release I make (changing version numbers) I'd have to make a lot of moves (darcs move since I am using darcs) and that just makes no sense. Thankfully, istalling the .boot and .script files on /usr/lib/erlang/bin worked, I can now just drop a scrip with erl -boot myapp anywhere on the HD (like the well know path /usr/bin) and it'll just work. The directory where I work on has everything on one directory (src/) and scons takes care of installing everything where it should go. Furthermore, now that I think about your solution (which is the OTP standard solution, no doubt about that), it has another problem. The starting script is not on a well know path, and if I do another script to run that one, I am again where I started, having to generate a script... a symlink might work though. All this that I mention will be released short for those that care. Thank you. -- Pupeno (http://pupeno.com) Vendemos: Camara de fotos rusa ????? ET (ZENIT) con flash ?????: http://pupeno.com/vendo/#camara -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From wfragg@REDACTED Sat Jan 21 17:13:02 2006 From: wfragg@REDACTED (Ivan Dubrov) Date: Sat, 21 Jan 2006 22:13:02 +0600 Subject: Outputting non-ASCII characters Message-ID: <5657db0f0601210813v1c8b2390hc4314081328b13fe@mail.gmail.com> Hello, Is there any way to output non-ASCII characters (actually, I have a string in multibyte encoding, UTF8) to the stdout unescaped? I need a way just to write the bytes into the stdout, the same as the write(stdout, "", size) does in case of C-code. -- WBR, Ivan S. Dubrov From danie@REDACTED Sat Jan 21 17:30:53 2006 From: danie@REDACTED (Danie Schutte) Date: Sat, 21 Jan 2006 18:30:53 +0200 Subject: Installing the .boot file. In-Reply-To: <200601211255.22558.pupeno@pupeno.com> References: <200601211643.53094.danie@erlfinsys.net> <200601211255.22558.pupeno@pupeno.com> Message-ID: <200601211830.53530.danie@erlfinsys.net> Hi Pupeno, just on the point where applications require applications, and I think this may have been mentioned by Uffe. We handle it by just adding the correct application information in the .rel file and when compiling the boot file, add the additional path to the pathlist - it automatically takes care of it. It is not "ultra" dynamic - but it is fairly flexible since it's a once off boot script build. On Saturday 21 January 2006 17:55, Pupeno wrote: > On Saturday 21 January 2006 11:43, Danie Schutte wrote: > > Since you are going the OTP route :) > > > > I would suggest stick to known directory structures as suggested in the > > documentation and some leading experts :) > > > > The basic structure we use looks as follows > > > > project > > bin > > lib > > patch > > app > > ebin > > src > > include > > releases > > x.y > > misc > > > > in misc we keep our startup scripts > > and the app is started from within the project directory - using paths > > relative to that. > > > > example: > > troy.sh > > > > erl +A 255 -name troy@REDACTED -boot releases/1.0/troy > > -config releases/1.0/sys -mnesia dir '"/troy/db_data/troy"' > > > > > > This way everything is "neatly" placed in the right spot - which is > > easier and cleaner to maintain later on. > > Except for one thing, each application is in its own directory (instead of > a system wide know directory, like /usr/lib/erlang/) so for applications to > find other applications I should specify -pa or similar and I end up having > system specific directories on start up scripts, again where I started. The > other downside is that developing in that structure of directories is > painfully, for every release I make (changing version numbers) I'd have to > make a lot of moves (darcs move since I am using darcs) and that just makes > no sense. > Thankfully, istalling the .boot and .script files on /usr/lib/erlang/bin > worked, I can now just drop a scrip with erl -boot myapp anywhere on the HD > (like the well know path /usr/bin) and it'll just work. > The directory where I work on has everything on one directory (src/) and > scons takes care of installing everything where it should go. > Furthermore, now that I think about your solution (which is the OTP > standard solution, no doubt about that), it has another problem. The > starting script is not on a well know path, and if I do another script to > run that one, I am again where I started, having to generate a script... a > symlink might work though. > All this that I mention will be released short for those that care. > Thank you. From klacke@REDACTED Sat Jan 21 17:51:30 2006 From: klacke@REDACTED (Claes Wikstrom) Date: Sat, 21 Jan 2006 17:51:30 +0100 Subject: Outputting non-ASCII characters In-Reply-To: <5657db0f0601210813v1c8b2390hc4314081328b13fe@mail.gmail.com> References: <5657db0f0601210813v1c8b2390hc4314081328b13fe@mail.gmail.com> Message-ID: <43D26692.5080402@hyber.org> Ivan Dubrov wrote: > Hello, > > Is there any way to output non-ASCII characters (actually, I have a > string in multibyte encoding, UTF8) to the stdout unescaped? > > I need a way just to write the bytes into the stdout, the same as the > write(stdout, "", size) does in case of C-code. io:format("~s", [Str]). /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From w.a.de.jong@REDACTED Sun Jan 22 21:28:22 2006 From: w.a.de.jong@REDACTED (Willem de Jong) Date: Sun, 22 Jan 2006 21:28:22 +0100 Subject: announcement - erlsom, support for XML Schema Message-ID: <407d9ef80601221228x2202c3ard6b6637527fd115e@mail.gmail.com> Hi, I have uploaded a first version of 'erlsom' to sourceforge. Erlsom is a set of functions that allow you to use XSDs in Erlang. I posted a short introduction about 2 weeks ago. The current release should probably be called an alfa or beta release. It is not ready to be used in an operational telecommunication system or anything like that, but it is far enough to be of some interest. Should the very first attempt to use it fail, please don't give up immediately... In any case I would welcome your comments. I have been struggling a bit with sourceforge. I am not sure whether the current setup allows you to download the files easily. Worst case you may have to browse the CVS and download the files one by one. If anybody can tell me what I have been doing wrong, I'd appreciate it. The files are in a separate project called erlsom, it should be easy to find. Regards, Willlem From gunilla@REDACTED Mon Jan 23 09:21:47 2006 From: gunilla@REDACTED (Gunilla Arendt) Date: Mon, 23 Jan 2006 09:21:47 +0100 Subject: Installing the .boot file. In-Reply-To: <200601210452.38159.pupeno@pupeno.com> References: <200601210452.38159.pupeno@pupeno.com> Message-ID: <43D4921B.1090902@erix.ericsson.se> Snip from erl(4): "Unless File contains an absolute path, the system searches for File.boot in the current and $ROOT/bin directories." / Gunilla Pupeno wrote: > where can I install my .boot file to be found ? > > $ erl -boot myapp > {"init terminating in do_boot",{'cannot get bootfile','myapp.boot'}} > > I tried > /usr/lib/erlang/release > /usr/lib/erlang/releases/R10B > /usr/lib/erlang/releases/0.0.0 (0.0.0 is the version of myapp). > Myapp is installed on /usr/lib/erlang/lib/myapp-0.0.0/ and I can load it > successfully, I can even run it by: > application:start(myapp). > > Thank you. From gunilla@REDACTED Mon Jan 23 09:36:10 2006 From: gunilla@REDACTED (Gunilla Arendt) Date: Mon, 23 Jan 2006 09:36:10 +0100 Subject: Running an application from the (unix) command line In-Reply-To: <200601210131.31567.pupeno@pupeno.com> References: <200601210131.31567.pupeno@pupeno.com> Message-ID: <43D4957A.90207@erix.ericsson.se> Snip from erl(1): "-s Mod [Func [Arg1, Arg2, ...]] Makes init call the specified function. Func defaults to start. If no arguments are provided, the function is assumed to be of arity 0. Otherwise it is assumed to be of arity 1, taking the list [Arg1,Arg2,...] as argument." Thus "erl -s application start myapp" will result in a call to "application:start([myapp])" instead of the desired "application:start(myapp)". I recommend you create a boot script which starts your application instead. You can either write a .rel file and use it to generate a boot script, or edit an existing .script file and use systools:script2boot/1 to transform it into a .boot file. See OTP Design Principles and systools(3) for details. / Gunilla Pupeno wrote: > Hello, > how do you run an application from the command line ? > erl -s application start myapp > doesn't seem to work. > Thanks. From ft@REDACTED Mon Jan 23 09:43:25 2006 From: ft@REDACTED (Fredrik Thulin) Date: Mon, 23 Jan 2006 09:43:25 +0100 Subject: marking functions as obsolete/deprecated Message-ID: <200601230943.25550.ft@it.su.se> Hi Is there any way I can mark (exported) functions in a module as obsolete or deprecated, and have the compiler issue a warning about it? OTP seems to use static bits in otp_internal.erl to do this, but that options isn't exactly available to me. There is the module attribute tag 'deprecated', but it seems to only be used by 'xref' and not the compiler/linter. Thanks in advance /Fredrik From lennart.ohman@REDACTED Mon Jan 23 10:07:55 2006 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Mon, 23 Jan 2006 10:07:55 +0100 Subject: marking functions as obsolete/deprecated In-Reply-To: <200601230943.25550.ft@it.su.se> Message-ID: Hi, I believe the problem is that there is no compile-time linking of the modules. The compiler does not "follow" global calls to make sure they are "correct". That is why the obsolete attribute can only work with tools considering a set of modules, like xref does. Best Regards, Lennart ------------------------------------------------------------- Lennart Ohman office : +46-8-587 623 27 Sjoland & Thyselius Telecom AB cellular: +46-70-552 67 35 Sehlstedtsgatan 6 fax : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Fredrik Thulin Sent: Monday, January 23, 2006 9:43 AM To: erlang-questions@REDACTED Subject: marking functions as obsolete/deprecated Hi Is there any way I can mark (exported) functions in a module as obsolete or deprecated, and have the compiler issue a warning about it? OTP seems to use static bits in otp_internal.erl to do this, but that options isn't exactly available to me. There is the module attribute tag 'deprecated', but it seems to only be used by 'xref' and not the compiler/linter. Thanks in advance /Fredrik From bengt.kleberg@REDACTED Mon Jan 23 10:18:47 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Mon, 23 Jan 2006 10:18:47 +0100 Subject: Running an application from the (unix) command line In-Reply-To: <17361.59486.223232.535924@antilipe.corelatus.se> References: <200601210131.31567.pupeno@pupeno.com> <17361.59486.223232.535924@antilipe.corelatus.se> Message-ID: <43D49F77.9060603@ericsson.com> On 2006-01-21 08:53, Matthias Lang wrote: ...deleted > Try following the instructions in the FAQ exactly: > > | 5.7. ...run an Erlang program directly from the unix shell? ...deleted > | matthias >erl -noshell -s hello hello_world -s init stop > | hello, world > > You find the rest of the FAQ at > > http://www.erlang.org/faq/t1.html > when i looked at the faq this was 5.6. did i get the wrong (old/obsolete) faq? moreover, i think that the faq should also mention that ''init stop'' will be run in parallell with ''hello hello_world''. this is important when something longer running than hello_world is started this way :-) bengt From ft@REDACTED Mon Jan 23 10:33:58 2006 From: ft@REDACTED (Fredrik Thulin) Date: Mon, 23 Jan 2006 10:33:58 +0100 Subject: marking functions as obsolete/deprecated In-Reply-To: References: Message-ID: <200601231033.58752.ft@it.su.se> On Monday 23 January 2006 10:07, Lennart Ohman wrote: > Hi, > I believe the problem is that there is no compile-time linking > of the modules. The compiler does not "follow" global calls > to make sure they are "correct". That is why the obsolete > attribute can only work with tools considering a set of modules, > like xref does. I'm sure that's the reason, but I was hoping there was some kind of solution too ;). It would be useful to somehow be able to instruct the compiler about obsolete functions (for example). For example, being able to pass the compiler the path to my projects equivalence of otp_internal.erl (or rather .beam). /Fredrik From vlad.xx.dumitrescu@REDACTED Mon Jan 23 10:43:16 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Mon, 23 Jan 2006 10:43:16 +0100 Subject: marking functions as obsolete/deprecated Message-ID: <11498CB7D3FCB54897058DE63BE3897C011F9B79@esealmw105.eemea.ericsson.se> Hi, > It would be useful to somehow be able to instruct the > compiler about obsolete functions (for example). For example, > being able to pass the compiler the path to my projects > equivalence of otp_internal.erl (or rather .beam). An alternative would be to have a tool working in parallel with the compiler and let it check this kind of things, a global linter. Another useful similar thing would be to check that called external functions are really exported from the respective module (and if they are, if they are explicitly so, or through export_all). This feature is of course planned for a future release of Erlide :-) Regards, Vlad From joelr1@REDACTED Mon Jan 23 11:04:46 2006 From: joelr1@REDACTED (Joel Reymont) Date: Mon, 23 Jan 2006 10:04:46 +0000 Subject: erlmerge on mac osx Message-ID: Has anyone built erlmerge on Mac OSX? I'm on 10.4.4 and I get checking build system type... configure: error: cannot guess build type; you must specify one Thanks, Joel -- http://wagerlabs.com/ From joelr1@REDACTED Mon Jan 23 11:15:25 2006 From: joelr1@REDACTED (Joel Reymont) Date: Mon, 23 Jan 2006 10:15:25 +0000 Subject: leex In-Reply-To: <545FFC18-8DE1-4043-9A2B-887C1BFBEC06@gmail.com> References: <545FFC18-8DE1-4043-9A2B-887C1BFBEC06@gmail.com> Message-ID: http://www.erlang.org/ml-archive/erlang-questions/199903/msg00000.html On Jan 23, 2006, at 10:11 AM, Joel Reymont wrote: > Folks, > > Where do I find leex these days? I'm trying to convert a Pascal- > like grammar from yacc and lex files that someone sent me. -- http://wagerlabs.com/ From joelr1@REDACTED Mon Jan 23 11:11:15 2006 From: joelr1@REDACTED (Joel Reymont) Date: Mon, 23 Jan 2006 10:11:15 +0000 Subject: leex Message-ID: <545FFC18-8DE1-4043-9A2B-887C1BFBEC06@gmail.com> Folks, Where do I find leex these days? I'm trying to convert a Pascal-like grammar from yacc and lex files that someone sent me. Thanks, Joel -- http://wagerlabs.com/ From thomasl_erlang@REDACTED Mon Jan 23 14:31:39 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Mon, 23 Jan 2006 05:31:39 -0800 (PST) Subject: leex In-Reply-To: Message-ID: <20060123133139.47174.qmail@web34403.mail.mud.yahoo.com> --- Joel Reymont wrote: > http://www.erlang.org/ml-archive/erlang-questions/199903/msg00000.html Another possibility is my $JUNGERL/lib/smart_exceptions/src/lex.erl Simplest usage: lex:with(Rules, String) -> [Token] ; see the end of lex.erl for some example rulesets. Comments and bug reports are welcome, but I can't promise to act on them very swiftly. Best, Thomas PS. Yes, the name is a bit unfortunate. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From ulf.wiger@REDACTED Mon Jan 23 14:46:08 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 23 Jan 2006 14:46:08 +0100 Subject: regexp to matchspec Message-ID: I have written a small module that attempts to convert a regexp to a match spec -- one of those dumb ideas that just wouldn't leave me alone until I had tried it. (: Of course, the conversion leaves something to be desired, since you can't do recursion within a match spec, but my approach works within reason (it will explode in your face if you try something too complex.) Example: re2ms:re(Regexp, Lookahead) converts the Regexp to a match specification, using Lookahead (integer()) to limit the depth of the guard tree. 30> Match = fun(Objs,Ms) -> MsC = ets:match_spec_compile(Ms), ets:match_spec_run(Objs,MsC) end. #Fun 31> f(Re), Re = re2ms:re("\(abc\)+a*b*", 16). [{['$1'|'$2'], [{'andalso',{'andalso',{'andalso',{'=/=','$1',[]},{'==','$1',97}}, {'andalso',{'andalso', {'=/=','$2',[]}, {'==',{hd,'$2'},98}}, {'andalso', {'andalso', {'=/=',{tl,'$2'},[]}, {'==',{hd,{tl,'$2'}},99}}, true}}}, {'orelse',{'andalso',{'andalso', {'andalso', ... % really big and ugly match spec 32> Match(["abc","aaa","bbb","abcabca","abab","abcd"],Re). ["abc","abcabca","abcd"] 34> f(Re), Re = re2ms:re(".*\\.erl", 16). [{'$1',[{'orelse',{'andalso',{'andalso', {'andalso', ... 35> Match(["a.erl","aaaaaa.erl","aaaaaaaaaaaaaaaaaaaa.erl"],Re). ["a.erl","aaaaaa.erl"] ...which illustrates the lookahead limitation. Since debugging a huge match expression by just passing it to ets:match_spec_run is ... frustrating, I wrote an incomplete match spec evaluator (re2ms:run_ms(Objs, Ms)). To play around with extensions to the match spec grammar that might better suit regexp-style patterns, I added 'let' and 'subterm' (my possibly confursed interpretation of a suggestion made by John Hughes.) 28> re2ms:run_ms( ["aba","abb","abc", "abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"], [{"a"++'$1', [{'==',{subterm,'$1','tl', {'==',{'hd','$_'},98}, {'==','$_',[]}}, []}], ['$_']}]). ["abb","abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"] 29> re2ms:run_ms( ["aba","abb","abc", "abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"], [{"a"++'$1', [{'let','$2', {subterm,'$1','tl', {'==',{'hd','$_'},98}, {'==','$_',[]}}, {'==','$2',[]}}], ['$_']}]). ["abb","abbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"] In other words: {'let', NewVar, Expr, In} and {subterm, StartingExpr, RecursiveOp, While, Until} '$_' is used within the While and Until guards to refer to the "current value". value_of({subterm, Expr, RecurseOp, While, Until}, Vars) -> Recurse = case RecurseOp of 'tl' -> {'tl', '$_'}; {element, Pos} when is_integer(Pos), Pos > 0 -> {element, Pos, '$_'}; _ -> erlang:error(badarg) end, CurVal = value_of(Expr, Vars), subterm(Recurse, While, Until, CurVal, Vars); subterm(Recurse, While, Until, CurVal, Vars) -> Vars1 = [{'$_',CurVal}|Vars], case guard(Until, Vars1) of false -> case guard(While, Vars1) of true -> NewVal = value_of(Recurse, Vars1), subterm(Recurse, While, Until, NewVal, Vars); false -> CurVal end; true -> CurVal end. The source code is attached. It should be small enough to make it through. I think it might be really valuable to have a complete erlang-based match spec evaluator, but completing it will not be a high priority of mine. Comments? Suggestions? /Uffe -------------- next part -------------- A non-text attachment was scrubbed... Name: re2ms.erl Type: application/octet-stream Size: 9400 bytes Desc: re2ms.erl URL: From vlad.xx.dumitrescu@REDACTED Mon Jan 23 14:59:24 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Mon, 23 Jan 2006 14:59:24 +0100 Subject: regexp to matchspec Message-ID: <11498CB7D3FCB54897058DE63BE3897C011F9CA7@esealmw105.eemea.ericsson.se> Hi, I don't have any comments on your idea or your code, Ulf, but it might be of interest to check the way Perl 6 is revisiting regexps http://dev.perl.org/perl6/doc/design/apo/A05.html. Not entirely relevant to Erlang regexps and way too detailed for a non-Perl programmer, but might stir up an idea or two :-) The one thing that stuck for me is that they try to make regexp language more like a grammar, which I think is a Good Thing. Regards, Vlad From ulf.wiger@REDACTED Mon Jan 23 15:24:06 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 23 Jan 2006 15:24:06 +0100 Subject: regexp to matchspec Message-ID: Yeah, well, I didn't want to open _that_ can of worms. (: Just being able to use the relatively limited expressiveness of regexp.erl is a huge step forward compared to match specs, I think (when matching on strings, of course). Also, Robert Virding's regexp library has a pretty nice internal form that's quite easy to grasp, and that's what I've based the conversion on. Btw, I corrected the bug in my program to properly bail out when it gets too complex: 1> f(Re), catch (Re = re2ms:re(regexp:sh_to_awk("*/Otp/*/lib/appmon-*/*.erl"),32)). [{'$1',[{'orelse',{'andalso',{'andalso', ... 2> f(Re), catch (Re = re2ms:re(regexp:sh_to_awk("*/Otp/*/lib/appmon-*/*.erl"),64)). {error,{too_complex,[{re2ms,incr_total,0}, {re2ms,next,1}, I set the default limit to 100,000 tail ops past the last variable (in total, all branches counted). One can increase it carefully (requires a recompile) and measure the memory consumption and conversion time to suit individual tastes. I also made pclosure() and kclosure both insert 'false' if they hit the lookahead limit. I don't know if 'true' would be more appropriate (or if it matters at all), but it seems sensible that they both act the same way... No new code distributed, unless requested. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Vlad > Dumitrescu XX (LN/EAB) > Sent: den 23 januari 2006 14:59 > To: Erlang Questions > Subject: RE: regexp to matchspec > > Hi, > > I don't have any comments on your idea or your code, Ulf, but > it might be of interest to check the way Perl 6 is revisiting > regexps http://dev.perl.org/perl6/doc/design/apo/A05.html. > > Not entirely relevant to Erlang regexps and way too detailed > for a non-Perl programmer, but might stir up an idea or two > :-) The one thing that stuck for me is that they try to make > regexp language more like a grammar, which I think is a Good Thing. > > Regards, > Vlad > > From tobbe@REDACTED Mon Jan 23 16:37:34 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Mon, 23 Jan 2006 16:37:34 +0100 Subject: erlmerge on mac osx In-Reply-To: References: Message-ID: <43D4F83E.1000806@tornkvist.org> Joel Reymont wrote: > Has anyone built erlmerge on Mac OSX? I'm on 10.4.4 and I get > > checking build system type... configure: error: cannot guess build > type; you must specify one > Sorry, I don't hava a Mac (yet), so I can't fix this at the moment. Cheers, Tobbe From joelr1@REDACTED Mon Jan 23 11:53:38 2006 From: joelr1@REDACTED (Joel Reymont) Date: Mon, 23 Jan 2006 10:53:38 +0000 Subject: case-insensitive leex Message-ID: <46F40826-E02B-4D90-8098-C4BCA83F5037@gmail.com> Folks, Is there a way to make leex case-insensitive or is the approach the same as with lex, i.e. A [Aa] B [Bb] C [Cc] ... X [Xx] Y [Yy] Z [Zz] {A} | {A}{N} | {A}{T} | {B}{A}{S}{E}{D} | {W}{A}{S} { /* Skip words -- ignore them */ } Thanks, Joel -- http://wagerlabs.com/ From bengt.kleberg@REDACTED Mon Jan 23 17:52:32 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Mon, 23 Jan 2006 17:52:32 +0100 Subject: erlmerge on mac osx In-Reply-To: <43D4F83E.1000806@tornkvist.org> References: <43D4F83E.1000806@tornkvist.org> Message-ID: <43D509D0.4080003@ericsson.com> > Joel Reymont wrote: >> Has anyone built erlmerge on Mac OSX? I'm on 10.4.4 and I get >> >> checking build system type... configure: error: cannot guess build >> type; you must specify one what should be done is to replace ''erlmerge/configure/config.guess'' with a newer one. i think it is part of gnu autotools. does anybody know where it can be found? bengt From matheus@REDACTED Mon Jan 23 21:30:57 2006 From: matheus@REDACTED (Matheus Degiovani) Date: Mon, 23 Jan 2006 17:30:57 -0300 Subject: Best practices: get/put Message-ID: <43D53D01.9050700@clubtilt.net> Hello, The best practices document says that one should avoid using get/put do store data in the process dictionary. I'm guessing that in gen_servers, that information should actually be stored in the various State parameters/returns, right? So, my question is: what is the best (or maybe, what's the usual) data structure used for storing state information? Trees? Records? Cya. -- Matheus Degiovani matheus@REDACTED http://www.tilt.net http://clubtilt.net "Nem mesmo os s?bios conseguem enxergar os dois lados" - Gandalf em O Senhor dos An?is de JRR Tolkien. From lennart.ohman@REDACTED Mon Jan 23 20:36:50 2006 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Mon, 23 Jan 2006 20:36:50 +0100 Subject: Best practices: get/put In-Reply-To: <43D53D01.9050700@clubtilt.net> Message-ID: Hi, the main reason you should avoid get/put is that you revert to a global variable programming style, difficult to debug and understand later on. I would say that records are a good option for a state, since you can easily extend it as you invent new fields. However one should of course consider the size of what needs to be copied (when updating), how often it is done, the need to make efficient searching-operations and so on. (Records are tuples behind the scenes). There usually is no silver bullit. If performance is an issue, make a few test programs, fill them with *your* data and measure performance. Best Regards, Lennart ------------------------------------------------------------- Lennart Ohman office : +46-8-587 623 27 Sjoland & Thyselius Telecom AB cellular: +46-70-552 67 35 Sehlstedtsgatan 6 fax : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Matheus Degiovani Sent: Monday, January 23, 2006 9:31 PM To: erlang-questions@REDACTED Subject: Best practices: get/put Hello, The best practices document says that one should avoid using get/put do store data in the process dictionary. I'm guessing that in gen_servers, that information should actually be stored in the various State parameters/returns, right? So, my question is: what is the best (or maybe, what's the usual) data structure used for storing state information? Trees? Records? Cya. -- Matheus Degiovani matheus@REDACTED http://www.tilt.net http://clubtilt.net "Nem mesmo os s?bios conseguem enxergar os dois lados" - Gandalf em O Senhor dos An?is de JRR Tolkien. From w.a.de.jong@REDACTED Mon Jan 23 20:46:01 2006 From: w.a.de.jong@REDACTED (Willem de Jong) Date: Mon, 23 Jan 2006 20:46:01 +0100 Subject: announcement - erlsom, support for XML Schema Message-ID: <407d9ef80601231146h580a4267q5f88aeac43169ea8@mail.gmail.com> Hi all, I sent out an announcement to the mailing list yesterday, but it never appeared in my mailbox. I have the feeling that it may be stuck somewhere. If not, sorry to bother you again. In any case, I have one thing to add to yesterdays mail: I found out how to create a 'release' on sourceforge. The source code and some documentation can easily be downloaded now. Just go to http://www.sourceforge.org/projects/erlsom and click on the 'download' button. Regards Willem --------------- Hi, I have uploaded a first version of 'erlsom' to sourceforge. Erlsom is a set of functions that allow you to use XSDs in Erlang. I posted a short introduction about 2 weeks ago. The current release should probably be called an alfa or beta release. It is not ready to be used in an operational telecommunication system or anything like that, but it is far enough to be of some interest. Should the very first attempt to use it fail, please don't give up immediately... In any case I would welcome your comments. I have been struggling a bit with sourceforge. I am not sure whether the current setup allows you to download the files easily. Worst case you may have to browse the CVS and download the files one by one. If anybody can tell me what I have been doing wrong, I'd appreciate it. The files are in a separate project called erlsom, it should be easy to find. Regards, Willlem From robert.virding@REDACTED Mon Jan 23 22:14:04 2006 From: robert.virding@REDACTED (Robert Virding) Date: Mon, 23 Jan 2006 22:14:04 +0100 Subject: leex In-Reply-To: <545FFC18-8DE1-4043-9A2B-887C1BFBEC06@gmail.com> References: <545FFC18-8DE1-4043-9A2B-887C1BFBEC06@gmail.com> Message-ID: <43D5471C.5060303@telia.com> Hello Joel, I have it on one of my machines at home and will try to find it for you. The answer to your next question is that you have to do like lex, leex is modeled on lex. Robert Joel Reymont wrote: > Folks, > > Where do I find leex these days? I'm trying to convert a Pascal-like > grammar from yacc and lex files that someone sent me. > > Thanks, Joel > > -- > http://wagerlabs.com/ > > From jalarson@REDACTED Mon Jan 23 22:23:17 2006 From: jalarson@REDACTED (James Larson) Date: Mon, 23 Jan 2006 13:23:17 -0800 Subject: JSON library Message-ID: <43D54945.8030107@amazon.com> Here (finally) is our JSON (http://json.org) library for Erlang. It's a simple standalone module rather than an application. It's offered under the Erlang License v1.1. Based on previous discussion on the list, we changed the representation of JSON objects from dicts to tagged proplists. We're keeping JSON strings as Erlang strings, rather than Erlang binaries, as we didn't want to hardcode any particular Unicode format. It's surprisingly useful to represent JSON arrays as Erlang tuples, rather than Erlang lists, as it allows many Erlang data types, such as now() timestamps or inet addrs, to be directly converted. Please send bugs/fixes/contributions to the authors. Enjoy! Jim Larson A2Z Development, Inc. ("An Amazon.com Company") From jalarson@REDACTED Mon Jan 23 22:24:42 2006 From: jalarson@REDACTED (James Larson) Date: Mon, 23 Jan 2006 13:24:42 -0800 Subject: JSON library Message-ID: <43D5499A.2010705@amazon.com> Here (finally) is our JSON (http://json.org) library for Erlang. It's a simple standalone module rather than an application. It's offered under the Erlang License v1.1. Based on previous discussion on the list, we changed the representation of JSON objects from dicts to tagged proplists. We're keeping JSON strings as Erlang strings, rather than Erlang binaries, as we didn't want to hardcode any particular Unicode format. It's surprisingly useful to represent JSON arrays as Erlang tuples, rather than Erlang lists, as it allows many Erlang data types, such as now() timestamps or inet addrs, to be directly converted. Please send bugs/fixes/contributions to the authors. Enjoy! Jim Larson A2Z Development, Inc. ("An Amazon.com Company") From jalarson@REDACTED Mon Jan 23 22:29:31 2006 From: jalarson@REDACTED (James Larson) Date: Mon, 23 Jan 2006 13:29:31 -0800 Subject: JSON library (resend) Message-ID: <43D54ABB.6090702@amazon.com> Here (finally) is our JSON (http://json.org) library for Erlang. It's a simple standalone module rather than an application. It's offered under the Erlang License v1.1. Based on previous discussion on the list, we changed the representation of JSON objects from dicts to tagged proplists. We're keeping JSON strings as Erlang strings, rather than Erlang binaries, as we didn't want to hardcode any particular Unicode format. It's surprisingly useful to represent JSON arrays as Erlang tuples, rather than Erlang lists, as it allows many Erlang data types, such as now() timestamps or inet addrs, to be directly converted. Please send bugs/fixes/contributions to the authors. Enjoy! Jim Larson A2Z Development, Inc. ("An Amazon.com Company") -------------- next part -------------- A non-text attachment was scrubbed... Name: ejson-1.tgz Type: application/x-gzip Size: 12447 bytes Desc: not available URL: From yerl@REDACTED Mon Jan 23 22:48:17 2006 From: yerl@REDACTED (Yerl) Date: Mon, 23 Jan 2006 22:48:17 +0100 Subject: leex In-Reply-To: <43D5471C.5060303@telia.com> References: <545FFC18-8DE1-4043-9A2B-887C1BFBEC06@gmail.com> <43D5471C.5060303@telia.com> Message-ID: <43D54F21.2050507@club-internet.fr> Hi Joel! Have a look to this links: 1) http://yhafri.club.fr/crux/index.html # for anything about auto-Erlang on Linux ;-) 2) http://yhafri.club.fr/crux/leex/Pkgfile # how to install leex 3) http://yhafri.club.fr/crux/leex/leex.erl # what you need 4) http://yhafri.club.fr/crux/leex/leex.hrl # ... cheers Youn?s Robert Virding wrote: > Hello Joel, > > I have it on one of my machines at home and will try to find it for > you. The answer to your next question is that you have to do like lex, > leex is modeled on lex. > > Robert > > Joel Reymont wrote: > >> Folks, >> >> Where do I find leex these days? I'm trying to convert a Pascal-like >> grammar from yacc and lex files that someone sent me. >> >> Thanks, Joel >> >> -- >> http://wagerlabs.com/ >> >> > From fritchie@REDACTED Tue Jan 24 03:45:50 2006 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Mon, 23 Jan 2006 20:45:50 -0600 Subject: Mnesia, disk logging, and synchronous disk logging Message-ID: <200601240245.k0O2joxg096094@snookles.snookles.com> Howdy. Is there a difference of opinion/definition on what "synchronous" in Mnesia's synchronous disk logging means? In the context of disc_copies tables ... it seems to me that Mnesia's use of the phrase means: * The transaction coordinator waits synchronously for 2PC votes from all participants. * Each participant uses disk_log:log/2 or disk_log:blog/2 to record local votes and commit/abort decisions, but participants are *not* using the disk_log:sync/1 to force the log to disk. The disk_log:sync/1 function has an extremely high penalty, but sometimes that penalty is worth the cost. For example, some read+write transactions may contain data that you *really* do not want to lose. For data that important, if all replicas suddenly lose power, it is possible to lose the logs and thus the newly-updated data before it is written safely to disk on each replica machine. But I can't find a Mnesia transaction knob/button that I can twist/press to request that level of safety. Is there such a thing? -Scott From pupeno@REDACTED Tue Jan 24 05:52:56 2006 From: pupeno@REDACTED (Pupeno) Date: Tue, 24 Jan 2006 01:52:56 -0300 Subject: Running an application from the (unix) command line In-Reply-To: <43D4957A.90207@erix.ericsson.se> References: <200601210131.31567.pupeno@pupeno.com> <43D4957A.90207@erix.ericsson.se> Message-ID: <200601240153.01164.pupeno@pupeno.com> On Monday 23 January 2006 05:36, Gunilla Arendt wrote: > Snip from erl(1): > > "-s Mod [Func [Arg1, Arg2, ...]] > Makes init call the specified function. Func defaults to start. If no > arguments are provided, the function is assumed to be of arity 0. > Otherwise it is assumed to be of arity 1, taking the list > [Arg1,Arg2,...] as argument." > > Thus "erl -s application start myapp" will result in a call to > "application:start([myapp])" instead of the desired > "application:start(myapp)". This doesn't work, I don't know why but what I see is that my parameters get totally ignored. > I recommend you create a boot script which starts your application > instead. You can either write a .rel file and use it to generate > a boot script, or edit an existing .script file and use > systools:script2boot/1 to transform it into a .boot file. See > OTP Design Principles and systools(3) for details. This is the route I am taking. Thank you. :) -- Pupeno (http://pupeno.com) Vendemos: Conocer y collecionar Monedas y Billetes de Todo el Mundo: http://pupeno.com/vendo/#monedas -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From pupeno@REDACTED Tue Jan 24 05:58:45 2006 From: pupeno@REDACTED (Pupeno) Date: Tue, 24 Jan 2006 01:58:45 -0300 Subject: edoc example. Message-ID: <200601240158.45311.pupeno@pupeno.com> Hello, Any recommendation on nicely documented code using edoc ? I am looking for some examples since I can't fully understand edoc's documentation. Thank you. -- Pupeno (http://pupeno.com) Vendemos: Conocer y collecionar Monedas y Billetes de Todo el Mundo: http://pupeno.com/vendo/#monedas -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From bengt.kleberg@REDACTED Tue Jan 24 07:58:04 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 24 Jan 2006 07:58:04 +0100 Subject: erlmerge on mac osx In-Reply-To: <43D509D0.4080003@ericsson.com> References: <43D4F83E.1000806@tornkvist.org> <43D509D0.4080003@ericsson.com> Message-ID: <43D5CFFC.7000103@ericsson.com> On 2006-01-23 17:52, Bengt Kleberg wrote: ...deleted > what should be done is to replace ''erlmerge/configure/config.guess'' > with a newer one. i think it is part of gnu autotools. does anybody know > where it can be found? i found a config.guess (timestamp='2005-05-27') at openssh (google had this as the 25:th in ranking). i will try it at home to see if it identifies macosx. if it does i will update erlmerge. anybody in a hurry can get it here: http://www.chiark.greenend.org.uk/ucgi/~cjwatson/cvsweb/openssh/config.guess?rev=1.6&content-type=text/x-cvsweb-markup bengt From bengt.kleberg@REDACTED Tue Jan 24 08:02:05 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 24 Jan 2006 08:02:05 +0100 Subject: Best practices: get/put In-Reply-To: <43D53D01.9050700@clubtilt.net> References: <43D53D01.9050700@clubtilt.net> Message-ID: <43D5D0ED.5060405@ericsson.com> On 2006-01-23 21:30, Matheus Degiovani wrote: ...deleted > So, my question is: what is the best (or maybe, what's the usual) data > structure used for storing state information? Trees? Records? at the top level a record is probably the right choice. as for the record memebers you have lists (simple and lots of libraries), dicts, gb_trees, etc. hide the members in modules and test different implementations. bengt From stevez@REDACTED Mon Jan 23 19:19:32 2006 From: stevez@REDACTED (Steve Zdancewic) Date: Mon, 23 Jan 2006 13:19:32 -0500 Subject: 2nd CFP: Programming Languages and Analysis for Security (PLAS) 2006 Message-ID: <43D51E34.2060000@cis.upenn.edu> Note the revised submission & publication guidelines. ----------------------------------------------------------------------- Call for Papers PLAS 2006 ACM SIGPLAN Workshop on Programming Languages and Analysis for Security http://www.cis.upenn.edu/~stevez/plas06.html co-located with ACM SIGPLAN PLDI 2006 Conference on Programming Language Design and Implementation Ottawa, Canada, June 10, 2006 The goal of PLAS 2006 is to provide a forum for researchers and practitioners to exchange and understand ideas and to seed new collaboration on the use of programming language and program analysis techniques that improve the security of software systems. The scope of PLAS includes, but is not limited to: -- Language-based techniques for security -- Program analysis and verification (including type systems and model checking) for security properties -- Compiler-based and program rewriting security enforcement mechanisms -- Security policies for information flow and access control -- High-level specification languages for security properties -- Model-driven approaches to security -- Applications, examples, and implementations of these security techniques Submission: We invite papers of two kinds: (1) Technical papers for "long" presentations during the workshop, and (2) papers for "short" presentations (10 minutes). Papers submitted for the long format should contain relatively mature content; short format papers can present more preliminary work, position statements, or work that is more exploratory in nature. The deadline for submissions of technical papers (for both the short and long presentations) is March 03, 2006. Papers must be formatted according the ACM proceedings format: "long" submissions should not exceed 10 pages in this format; "short" submissions should not exceed 4 pages. These page limits include everything (i.e., they are the total length of the paper). Papers submitted for the "long" category may be accepted as short presentations at the program committee's discretion. Email the submissions to stevez AT cis.upenn.edu. Submissions should be in PDF (preferably) or Postscript that is interpretable by Ghostscript and printable on US Letter and A4 sized paper. Templates for SIGPLAN-approved LaTeX format can be found at http://www.acm.org/sigs/sigplan/authorInformation.htm. We recommend using this format, which improves greatly on the ACM LaTeX format. Publication options: Authors of accepted papers may choose whether they would like their work published in a planned special issue of SIGPLAN Notices. Those papers that are not published in SIGPLAN Notices will only be considered part of the informal workshop proceedings and are therefor suitable for future publication in journal or other conference venues. Submitted papers must describe work unpublished in refereed venues, and not submitted for publication elsewhere (including journals and formal proceedings of conferences and workshops). See the SIGPLAN republication policy for more details http://www.acm.org/sigs/sigplan/republicationpolicy.htm Important dates: Submission deadline March 03, 2006 Notification of acceptance April 03, 2006 Final papers due April 24, 2006 Workshop June 10, 2006 Organizers: Steve Zdancewic, University of Pennsylvania, stevez AT cis.upenn.edu Vugranam C. Sreedhar, IBM T.J. Watson Research Center vugranam AT us.ibm.com Program Committee: Amal Ahmed, Harvard University, USA Anindya Banerjee, Kansas State University, USA Adriana Compagnoni, Stevens Institute of Technology, USA Elena Ferrari, University of Insubria at Como, Italy Michael Hicks, University of Maryland, USA Annie Liu, State University of New York at Stony Brook, USA Brigitte Pientka, McGill University, Canada Sriram Rajamani, Microsoft Research, India, Vugranam Sreedhar, IBM TJ Watson Research Center, USA Westley Weimer, University of Virginia, USA Steve Zdancewic, University of Pennsylvania, USA From floc@REDACTED Mon Jan 23 20:40:35 2006 From: floc@REDACTED (Kreutzer + Schweikardt) Date: Mon, 23 Jan 2006 20:40:35 +0100 (CET) Subject: FLoC'06 - Call for Papers Message-ID: <20060123194035.9C3D8DC3A@banach.informatik.hu-berlin.de> FLoC'06 - Call for Papers The 2006 Federated Logic Conference Seattle, Washington, USA August 10 -- August 22, 2006 http://research.microsoft.com/floc06/ In 1996, as part of its Special Year on Logic and Algorithms, DIMACS hosted the first Federated Logic Conference (FLoC). It was modeled after the successful Federated Computer Research Conference (FCRC), and synergetically brought together conferences that apply logic to computer science. The second Federated Logic Conference (FLoC'99) was held in Trento, Italy, in 1999, and the third (FLoC'02) was held in Copenhagen, Denmark, in 2002. The Fourth Federated Logic Conference (FLoC'06) will be held in Seattle, Washington, in August 2006, at the Seattle Sheraton (http://www.sheraton.com/seattle). The following conferences will participate in FLoC'06: Int'l Conference on Computer-Aided Verification (CAV) Int'l Conference on Rewriting Techniques and Applications (RTA) IEEE Symposium on Logic in Computer Science (LICS) Int'l Conference on Logic Programming (ICLP) Int'l Conference on Theory and Applications of Satisfiability Testing (SAT) Int'l Joint Conference on Automated Reasoning (IJCAR) In addition, FLoC'06 will host 42 workshops. Pre-conference workshops will be held on August 10-11. LICS, RTA, and SAT will be held in parallel on August 12-15, to be followed by mid-conference workshops and excursions on August 15-16. CAV, ICLP, and IJCAR will be held in parallel on August 16-21, to be followed by post-conference workshops on August 21-22. Plenary events involving all the conferences are planned. Calls for papers for the conferences and workshops are available at the conference website: http://research.microsoft.com/floc06/. We invite you to submit papers to FLoC'06 conferences and workshops. FLoC'06 Steering Committee Moshe Y. Vardi (General Chair) Jakob Rehof (Conference Chair) Edmund Clarke (CAV) Reiner Hahnle (IJCAR) Manuel Hermenegildo (ICLP) Phokion Kolaitis (LICS) Henry Kautz (SAT) Aart Middeldorp (RTA) Andrei Voronkov (IJCAR) From jalarson@REDACTED Mon Jan 23 21:06:24 2006 From: jalarson@REDACTED (James Larson) Date: Mon, 23 Jan 2006 12:06:24 -0800 Subject: JSON library Message-ID: <43D53740.5040103@amazon.com> Here (finally) is our JSON (http://json.org) library for Erlang (assuming that it gets through as a binary attachment). It's a simple, standalone file rather than an application. It's offered under the Erlang License v1.1. Based on previous discussion on the list, we changed the representation of JSON objects from dicts to tagged proplists. We're keeping JSON strings as Erlang strings, rather than Erlang binaries, as we didn't want to hardcode any particular Unicode format. It's surprisingly useful to represent JSON arrays as Erlang tuples, instead of Erlang lists, as it allows many Erlang data types, such as now() timestamps or inet addrs, to be convertible. Please send bugs/fixes/contributions to the authors. Enjoy! Jim Larson A2Z Development, Inc. ("An Amazon.com Company") -------------- next part -------------- A non-text attachment was scrubbed... Name: ejson-1.tgz Type: application/x-gzip Size: 12447 bytes Desc: not available URL: From ernie.makris@REDACTED Sat Jan 21 04:17:06 2006 From: ernie.makris@REDACTED (Ernie Makris) Date: Fri, 20 Jan 2006 22:17:06 -0500 Subject: new erlang blog Message-ID: <43D1A7B2.6050708@comcast.net> Hi, I decided to start blogging about erlang dev topics. Thought people might be interested: http://devtopics.blogspot.com/ Thanks Ernie From lennart.ohman@REDACTED Mon Jan 23 20:36:50 2006 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Mon, 23 Jan 2006 20:36:50 +0100 Subject: Best practices: get/put In-Reply-To: <43D53D01.9050700@clubtilt.net> Message-ID: Hi, the main reason you should avoid get/put is that you revert to a global variable programming style, difficult to debug and understand later on. I would say that records are a good option for a state, since you can easily extend it as you invent new fields. However one should of course consider the size of what needs to be copied (when updating), how often it is done, the need to make efficient searching-operations and so on. (Records are tuples behind the scenes). There usually is no silver bullit. If performance is an issue, make a few test programs, fill them with *your* data and measure performance. Best Regards, Lennart ------------------------------------------------------------- Lennart Ohman office : +46-8-587 623 27 Sjoland & Thyselius Telecom AB cellular: +46-70-552 67 35 Sehlstedtsgatan 6 fax : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Matheus Degiovani Sent: Monday, January 23, 2006 9:31 PM To: erlang-questions@REDACTED Subject: Best practices: get/put Hello, The best practices document says that one should avoid using get/put do store data in the process dictionary. I'm guessing that in gen_servers, that information should actually be stored in the various State parameters/returns, right? So, my question is: what is the best (or maybe, what's the usual) data structure used for storing state information? Trees? Records? Cya. -- Matheus Degiovani matheus@REDACTED http://www.tilt.net http://clubtilt.net "Nem mesmo os s?bios conseguem enxergar os dois lados" - Gandalf em O Senhor dos An?is de JRR Tolkien. From jalarson@REDACTED Mon Jan 23 22:29:31 2006 From: jalarson@REDACTED (James Larson) Date: Mon, 23 Jan 2006 13:29:31 -0800 Subject: JSON library (resend) Message-ID: <43D54ABB.6090702@amazon.com> Here (finally) is our JSON (http://json.org) library for Erlang. It's a simple standalone module rather than an application. It's offered under the Erlang License v1.1. Based on previous discussion on the list, we changed the representation of JSON objects from dicts to tagged proplists. We're keeping JSON strings as Erlang strings, rather than Erlang binaries, as we didn't want to hardcode any particular Unicode format. It's surprisingly useful to represent JSON arrays as Erlang tuples, rather than Erlang lists, as it allows many Erlang data types, such as now() timestamps or inet addrs, to be directly converted. Please send bugs/fixes/contributions to the authors. Enjoy! Jim Larson A2Z Development, Inc. ("An Amazon.com Company") -------------- next part -------------- A non-text attachment was scrubbed... Name: ejson-1.tgz Type: application/x-gzip Size: 12447 bytes Desc: not available URL: From philip-f@REDACTED Tue Jan 24 09:53:54 2006 From: philip-f@REDACTED (philip-f@REDACTED) Date: Tue, 24 Jan 2006 09:53:54 +0100 (CET) Subject: Best practices: get/put In-Reply-To: <43D53D01.9050700@clubtilt.net> Message-ID: <20060124085357.6D07F4B093B@localhost.localdomain> On 23 Jan, Matheus Degiovani wrote: > Hello, > > The best practices document says that one should avoid using get/put do > store data in the process dictionary. I'm guessing that in gen_servers, > that information should actually be stored in the various State > parameters/returns, right? > > So, my question is: what is the best (or maybe, what's the usual) data > structure used for storing state information? Trees? Records? > > Cya. Hi Matheus, to my opinion, a process would be the right thing to store information in erlang. Write data into mnesia if you need persistent states. greetings Philip From richardc@REDACTED Tue Jan 24 10:04:05 2006 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 24 Jan 2006 10:04:05 +0100 Subject: edoc example. In-Reply-To: <200601240158.45311.pupeno@pupeno.com> References: <200601240158.45311.pupeno@pupeno.com> Message-ID: <43D5ED85.3060009@csd.uu.se> Pupeno wrote: > Hello, > Any recommendation on nicely documented code using edoc ? I am looking for > some examples since I can't fully understand edoc's documentation. > Thank you. You can start by looking at the source code for edoc itself, found under lib/edoc. Also syntax_tools and xmerl use edoc for documentation, so there is plenty of example code. /Richard From thomas@REDACTED Tue Jan 24 10:41:43 2006 From: thomas@REDACTED (Thomas Johnsson) Date: Tue, 24 Jan 2006 10:41:43 +0100 Subject: Running an application from the (unix) command line In-Reply-To: <43D49F77.9060603@ericsson.com> References: <200601210131.31567.pupeno@pupeno.com> <17361.59486.223232.535924@antilipe.corelatus.se> <43D49F77.9060603@ericsson.com> Message-ID: <43D5F657.40304@skri.net> Bengt Kleberg wrote: > ... > moreover, i think that the faq should also mention that ''init stop'' > will be run in parallell with ''hello hello_world''. this is important > when something longer running than hello_world is started this way :-) That appears not to be true: when I run erl -noshell shtest loop -s init stop with loop() -> io:format("loop...~n",[]), timer:sleep(1000), loop(). it just keeps writing .... --------- While we are on this subject I'd like to add a few related questions: 1. How do I get rid of the "text junk output" written on standard out in the beginning of a run? Like: Erlang (BEAM) emulator version 5.4.5 [hipe] [threads:0] [kernel-poll] =PROGRESS REPORT==== 24-Jan-2006::09:07:13 === supervisor: {local,sasl_safe_sup} started: [{pid,<0.32.0>}, {name,alarm_handler}, {mfa,{alarm_handler,start_link,[]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}] (I don't get this with the Windows ) 2. There appears to be quite a big start-up cost (or maybe it is termination cost), > time erl -noshell -s init stop may take about a second. Any suggestions in how to reduce this? Any other suggestions on using erlang standalone as smoothly as possible will be greatly appreciated. -- Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas@REDACTED Tue Jan 24 10:58:56 2006 From: thomas@REDACTED (Thomas Johnsson) Date: Tue, 24 Jan 2006 10:58:56 +0100 Subject: Running an application from the (unix) command line In-Reply-To: <200601240153.01164.pupeno@pupeno.com> References: <200601210131.31567.pupeno@pupeno.com> <43D4957A.90207@erix.ericsson.se> <200601240153.01164.pupeno@pupeno.com> Message-ID: <43D5FA60.9090604@skri.net> Pupeno wrote: >On Monday 23 January 2006 05:36, Gunilla Arendt wrote: > > >>Snip from erl(1): >> >>"-s Mod [Func [Arg1, Arg2, ...]] >> Makes init call the specified function. Func defaults to start. If no >> arguments are provided, the function is assumed to be of arity 0. >> Otherwise it is assumed to be of arity 1, taking the list >> [Arg1,Arg2,...] as argument." >> >>Thus "erl -s application start myapp" will result in a call to >>"application:start([myapp])" instead of the desired >>"application:start(myapp)". >> >> > >This doesn't work, I don't know why but what I see is that my parameters get >totally ignored. > > That's strange. With -module(echo). -export([echo/1]). echo(A) -> io:format("~w~n",[A]). and run with erl -noshell -s echo echo abc 123 -s init stop I get [abc,'123'] written on standard out (plus some junk before that). This on Solaris. This works on windows too (without getting junk before). What os are you using? Perhaps you are expecting to get the function value result written on standard out? Hope this helps, -- Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.wiger@REDACTED Tue Jan 24 11:02:04 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 24 Jan 2006 11:02:04 +0100 Subject: Running an application from the (unix) command line Message-ID: Pupeno wrote: > > Thus "erl -s application start myapp" will result in a call to > > "application:start([myapp])" instead of the desired > > "application:start(myapp)". > > This doesn't work, I don't know why but what I see is that my > parameters get totally ignored. It's because the application:start/1 function doesn't expect the argument to be wrapped inside a list. You can write your own function that does expect the wrapper, and simply unwraps it. For example: -module(myapp). -export([start/1]). start([App]) -> application:start(App). Then use: erl ... -s myapp start App /Uffe From vlad.xx.dumitrescu@REDACTED Tue Jan 24 11:04:23 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Tue, 24 Jan 2006 11:04:23 +0100 Subject: Running an application from the (unix) command line Message-ID: <11498CB7D3FCB54897058DE63BE3897C011F9EC1@esealmw105.eemea.ericsson.se> Hi, > 1. How do I get rid of the "text junk output" written on standard out in the beginning of a run? Like: > =PROGRESS REPORT==== 24-Jan-2006::09:07:13 === > supervisor: {local,sasl_safe_sup} > started: [{pid,<0.32.0>}, > {name,alarm_handler}, > {mfa,{alarm_handler,start_link,[]}}, > {restart_type,permanent}, > {shutdown,2000}, > {child_type,worker}] > (I don't get this with the Windows ) Could it be that the Solaris version uses a different boot script, possibly sasl.boot instead of the simple (and otherwise default) start.boot? regards, Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From bengt.kleberg@REDACTED Tue Jan 24 11:06:49 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 24 Jan 2006 11:06:49 +0100 Subject: Running an application from the (unix) command line In-Reply-To: <43D5F657.40304@skri.net> References: <200601210131.31567.pupeno@pupeno.com> <17361.59486.223232.535924@antilipe.corelatus.se> <43D49F77.9060603@ericsson.com> <43D5F657.40304@skri.net> Message-ID: <43D5FC39.8050709@ericsson.com> On 2006-01-24 10:41, Thomas Johnsson wrote: > Bengt Kleberg wrote: >> ... >> moreover, i think that the faq should also mention that ''init stop'' >> will be run in parallell with ''hello hello_world''. this is important >> when something longer running than hello_world is started this way :-) > That appears not to be true: when I run > erl -noshell shtest loop -s init stop > with > loop() -> > io:format("loop...~n",[]), > timer:sleep(1000), > loop(). > it just keeps writing .... either i did a mistake when looking into the problem (most likely), when i remember it, or this (fix?) has been introduced since 2002 (when i had the problem). > While we are on this subject I'd like to add a few related questions: > > 1. How do I get rid of the "text junk output" written on standard out in > the beginning of a run? Like: > > Erlang (BEAM) emulator version 5.4.5 [hipe] [threads:0] [kernel-poll] > > =PROGRESS REPORT==== 24-Jan-2006::09:07:13 === > supervisor: {local,sasl_safe_sup} > started: [{pid,<0.32.0>}, > {name,alarm_handler}, > {mfa,{alarm_handler,start_link,[]}}, > {restart_type,permanent}, > {shutdown,2000}, > {child_type,worker}] > > (I don't get this with the Windows ) try starting like this: erl -sasl sasl_error_logger false ... > 2. There appears to be quite a big start-up cost (or maybe it is > termination cost), > > time erl -noshell -s init stop > may take about a second. Any suggestions in how to reduce this? Stand-alone Erlang (http://www.sics.se/~joe/sae.html). also, somebody made a c-program that can load a module (and execute it) into a running erlang system, from the unix command line. that was faster than starting erlang. i never used it, just read about it. > Any other suggestions on using erlang standalone as smoothly as possible > will be greatly appreciated. i have a script called erl_run that i (hard) link to when i want to run a new erlang module standalone. it says: #! /bin/sh module=`basename $1` erl +A 2 -sasl sasl_error_logger false -noshell -q -pa /home/eleberg/private/erlang/ebin -pa /home/eleberg/private/erlang/lib/erlang -s $module main $* the idea is that all my standalone erlang modules are in /home/eleberg/private/erlang/ebin and has a main/1 exported. so the erlang module ''bepp'' has a /home/eleberg/private/erlang/ebin/bepp.beam and a /home/eleberg/bin/bepp shell script. the latter is a link to erl_run. bengt From mats.cronqvist@REDACTED Tue Jan 24 11:08:06 2006 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Tue, 24 Jan 2006 11:08:06 +0100 Subject: Running an application from the (unix) command line In-Reply-To: <43D5FA60.9090604@skri.net> References: <200601210131.31567.pupeno@pupeno.com> <43D4957A.90207@erix.ericsson.se> <200601240153.01164.pupeno@pupeno.com> <43D5FA60.9090604@skri.net> Message-ID: <43D5FC86.6070207@ericsson.com> you could try this; $ time erl -boot start_clean -noshell -s echo echo foo -s erlang halt [foo] real 0m0.226s user 0m0.215s sys 0m0.007s mats Thomas Johnsson wrote: > Pupeno wrote: > >> On Monday 23 January 2006 05:36, Gunilla Arendt wrote: >> >> >>> Snip from erl(1): >>> >>> "-s Mod [Func [Arg1, Arg2, ...]] >>> Makes init call the specified function. Func defaults to start. If no >>> arguments are provided, the function is assumed to be of arity 0. >>> Otherwise it is assumed to be of arity 1, taking the list >>> [Arg1,Arg2,...] as argument." >>> >>> Thus "erl -s application start myapp" will result in a call to >>> "application:start([myapp])" instead of the desired >>> "application:start(myapp)". >>> >> >> >> This doesn't work, I don't know why but what I see is that my >> parameters get totally ignored. >> >> > That's strange. With > -module(echo). > -export([echo/1]). > echo(A) -> > io:format("~w~n",[A]). > and run with > erl -noshell -s echo echo abc 123 -s init stop > I get > [abc,'123'] > written on standard out (plus some junk before that). This on Solaris. > This works on windows too (without getting junk before). > > What os are you using? Perhaps you are expecting to get the function > value result written on standard out? > > Hope this helps, > -- Thomas > > > > > From yerl@REDACTED Mon Jan 23 22:48:17 2006 From: yerl@REDACTED (Yerl) Date: Mon, 23 Jan 2006 22:48:17 +0100 Subject: leex In-Reply-To: <43D5471C.5060303@telia.com> References: <545FFC18-8DE1-4043-9A2B-887C1BFBEC06@gmail.com> <43D5471C.5060303@telia.com> Message-ID: <43D54F21.2050507@club-internet.fr> Hi Joel! Have a look to this links: 1) http://yhafri.club.fr/crux/index.html # for anything about auto-Erlang on Linux ;-) 2) http://yhafri.club.fr/crux/leex/Pkgfile # how to install leex 3) http://yhafri.club.fr/crux/leex/leex.erl # what you need 4) http://yhafri.club.fr/crux/leex/leex.hrl # ... cheers Youn?s Robert Virding wrote: > Hello Joel, > > I have it on one of my machines at home and will try to find it for > you. The answer to your next question is that you have to do like lex, > leex is modeled on lex. > > Robert > > Joel Reymont wrote: > >> Folks, >> >> Where do I find leex these days? I'm trying to convert a Pascal-like >> grammar from yacc and lex files that someone sent me. >> >> Thanks, Joel >> >> -- >> http://wagerlabs.com/ >> >> > From ulf.wiger@REDACTED Tue Jan 24 11:27:42 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 24 Jan 2006 11:27:42 +0100 Subject: Running an application from the (unix) command line Message-ID: Try "erl ... -sasl errlog_type error" http://erlang.se/doc/doc-5.4.12/lib/sasl-2.1.1/doc/html/sasl_app.html /Uffe ________________________________ From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Vlad Dumitrescu XX (LN/EAB) Sent: den 24 januari 2006 11:04 To: Thomas Johnsson Cc: erlang-questions@REDACTED Subject: RE: Running an application from the (unix) command line Hi, > 1. How do I get rid of the "text junk output" written on standard out in the beginning of a run? Like: > =PROGRESS REPORT==== 24-Jan-2006::09:07:13 === > supervisor: {local,sasl_safe_sup} > started: [{pid,<0.32.0>}, > {name,alarm_handler}, > {mfa,{alarm_handler,start_link,[]}}, > {restart_type,permanent}, > {shutdown,2000}, > {child_type,worker}] > (I don't get this with the Windows ) Could it be that the Solaris version uses a different boot script, possibly sasl.boot instead of the simple (and otherwise default) start.boot? regards, Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From gunilla.arendt@REDACTED Tue Jan 24 11:09:46 2006 From: gunilla.arendt@REDACTED (Gunilla Arendt) Date: Tue, 24 Jan 2006 11:09:46 +0100 Subject: Running an application from the (unix) command line In-Reply-To: <43D5F657.40304@skri.net> References: <200601210131.31567.pupeno@pupeno.com> <17361.59486.223232.535924@antilipe.corelatus.se> <43D49F77.9060603@ericsson.com> <43D5F657.40304@skri.net> Message-ID: <43D5FCEA.7040808@ericsson.com> > 1. How do I get rid of the "text junk output" written on standard out in > the beginning of a run? Like: > > Erlang (BEAM) emulator version 5.4.5 [hipe] [threads:0] [kernel-poll] > > =PROGRESS REPORT==== 24-Jan-2006::09:07:13 === > supervisor: {local,sasl_safe_sup} > started: [{pid,<0.32.0>}, > {name,alarm_handler}, > {mfa,{alarm_handler,start_link,[]}}, > {restart_type,permanent}, > {shutdown,2000}, > {child_type,worker}] > > (I don't get this with the Windows ) This is a SASL progress report, which probably means you are using the start_sasl boot script. If this is not your intention, run the Install script again and make sure to answer 'y' to the question "Do you want to use a minimal system startup instead of the SASL startup?". (See System Principles for more information). If you do want to start the SASL application, but not get its progress reports, this can be configured. (See SASL User's Guide). Example: $ erl -boot start_sasl -sasl sasl_error_logger false / Gunilla From nils.muellner@REDACTED Tue Jan 24 11:31:18 2006 From: nils.muellner@REDACTED (=?ISO-8859-15?Q?Nils_M=FCllner?=) Date: Tue, 24 Jan 2006 11:31:18 +0100 Subject: Newbie Question Message-ID: <43D601F6.4020400@informatik.uni-oldenburg.de> Hello, I', new to Erlang. My Task: I have Key, Vector and Plaintext given for crypto:aes_cbc_128_encrypt(Key, Vector and Plaintext). Now I need to implement some kind of Brute Force to test all Keys and Vectors till i find the right ones for a direct match (compare plaintext /w result) and measure time. What is the best way to travers through the keys? Should i make lists and travers through them? What loop is best for performance for about 3.3*10^19 iterations? Is there already a brute-force-algorithm in erlang? Kind regards, Nils Muellner From matheus@REDACTED Tue Jan 24 13:12:37 2006 From: matheus@REDACTED (Matheus Degiovani) Date: Tue, 24 Jan 2006 09:12:37 -0300 Subject: Best practices: get/put In-Reply-To: References: Message-ID: <43D619B5.2000809@clubtilt.net> Hello everyone, Thanks for all the replies. I guess I'll use whatever is handier at the moment: tuples/lists when the amount of change in the structure of the state is low, records otherwise... Thanks! -- Matheus Degiovani matheus@REDACTED http://www.tilt.net http://clubtilt.net "Nem mesmo os s?bios conseguem enxergar os dois lados" - Gandalf em O Senhor dos An?is de JRR Tolkien. From mats.cronqvist@REDACTED Tue Jan 24 12:11:00 2006 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Tue, 24 Jan 2006 12:11:00 +0100 Subject: Best practices: get/put In-Reply-To: <43D619B5.2000809@clubtilt.net> References: <43D619B5.2000809@clubtilt.net> Message-ID: <43D60B44.8090602@ericsson.com> use records. most of the time you'll wind up using them eventually anyway. mats Matheus Degiovani wrote: > Hello everyone, > > Thanks for all the replies. I guess I'll use whatever is handier at the > moment: tuples/lists when the amount of change in the structure of the > state is low, records otherwise... > > Thanks! From bengt.kleberg@REDACTED Tue Jan 24 12:21:26 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 24 Jan 2006 12:21:26 +0100 Subject: Newbie Question In-Reply-To: <43D601F6.4020400@informatik.uni-oldenburg.de> References: <43D601F6.4020400@informatik.uni-oldenburg.de> Message-ID: <43D60DB6.2010503@ericsson.com> On 2006-01-24 11:31, Nils M?llner wrote: > Hello, > I', new to Erlang. > My Task: I have Key, Vector and Plaintext given for > crypto:aes_cbc_128_encrypt(Key, Vector and Plaintext). Now I need to > implement some kind of Brute Force to test all Keys and Vectors till i > find the right ones for a direct match (compare plaintext /w result) and > measure time. > What is the best way to travers through the keys? Should i make lists > and travers through them? i would suggest a recursive function that just ''adds 1'' to the key until you reach (text == plaintext) or (key == key_max). the same for the vector (in an inner recursion). i hope you have a small key/vector space to search. bengt From mickael.remond@REDACTED Tue Jan 24 12:21:45 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Tue, 24 Jan 2006 12:21:45 +0100 Subject: access ejabberd xmpp In-Reply-To: <3bb44c6e0510270155o7d70dea7ha20e7a8f7d77ecea@mail.gmail.com> References: <3bb44c6e0510270155o7d70dea7ha20e7a8f7d77ecea@mail.gmail.com> Message-ID: <20060124112145.GA20011@memphis.ilius.fr> * bryan rasmussen [2005-10-27 10:55:45 +0200]: > I'm running JEAI on Repos, I would like to run a seperate process to > query ejabberd for the xml value of messages. This is different than > the Message Trace functionality of JEAI, If you can point me to the > code in JEAI that gets the message trace then I can use it. Hello Bryan, Look at the mod_jeai_trace.erl file. Best regards, -- Micka?l R?mond http://www.process-one.net/ From karol.skocik@REDACTED Tue Jan 24 14:28:05 2006 From: karol.skocik@REDACTED (karol skocik) Date: Tue, 24 Jan 2006 14:28:05 +0100 Subject: strange SNMP behaviour Message-ID: Hi all, I have run into problems with SNMP(v4.1.4) manager on Gentoo Linux x86. The very strange thing is, that I have NOT touched anything in my SNMP project or anything in erlang directories since the time it was working happily ;( Agent is working fine, hovewer, when I run manager as usual : Eshell V5.4.6 (abort with ^G) (manager@REDACTED)1> application:start(crypto). ok (manager@REDACTED)2> application:start(snmp). =ERROR REPORT==== 24-Jan-2006::13:52:08 === [snmpm_config] init exit: {{badmatch,{error,not_found}}, [{snmpm_config,handle_register_agent,4}, {snmpm_config,init_agent_config,1}, {snmpm_config,init_agents_config,1}, {snmpm_config,do_init,1}, {snmpm_config,init,1}, {gen_server,init_it,6}, {proc_lib,init_p,5}]} =INFO REPORT==== 24-Jan-2006::13:52:08 === application: snmp exited: invalid return value from snmp_app:start(normal,[]) ->" {'EXIT',{{badmatch, {error, {shutdown, {child, undefined, snmpm_supervisor, {snmpm_supervisor, start_link, [normal, [{priority,normal}, {versions,[v3]}, {config,[{dir,"/home/md/snmp/new/manager/conf/"},{verbosity,silence}, {db_dir,"/home/md/snmp/new/manager/db/"}, {repair,true},{auto_save,5000}]}, {mibs,[]}, {server,[{timeout,30000},{verbosity,silence}]}, {note_store,[{timeout,30000},{verbosity,silence}]}, {net_if,[{module,snmpm_net_if},{verbosity,silence}, {options,[{bind_to,false},{no_reuse,false}]}]}]]}, transient,2000,supervisor,[snmpm_supervisor,supervisor]}}}}, [{snmp_app,start,2},{application_master,start_it_old,4}]}}" type: temporary {error,"invalid return value from snmp_app:start(normal,[]) -> .... here is the same as above " - it was in "", the expression was badly indented. I have reinstalled erlang using emerge, but it is the same. It is complaining about the agent config, but the error is probably not there, since it worked before. Anybody has some idea what is going on here? Thanks a lot, Karol From hakan@REDACTED Tue Jan 24 16:36:39 2006 From: hakan@REDACTED (Hakan Mattsson) Date: Tue, 24 Jan 2006 16:36:39 +0100 (CET) Subject: Mnesia, disk logging, and synchronous disk logging In-Reply-To: <200601240245.k0O2joxg096094@snookles.snookles.com> References: <200601240245.k0O2joxg096094@snookles.snookles.com> Message-ID: On Mon, 23 Jan 2006, Scott Lystig Fritchie wrote: SLF> Howdy. Is there a difference of opinion/definition on what SLF> "synchronous" in Mnesia's synchronous disk logging means? SLF> SLF> In the context of disc_copies tables ... it seems to me that Mnesia's SLF> use of the phrase means: SLF> SLF> * The transaction coordinator waits synchronously for 2PC votes SLF> from all participants. In Mnesia the coordinator does always wait synchronously for 2PC (and 3PC) votes from all participants, regardless of the transaction being "synchronous" or not. In "synchronous" transactions", the coordinator does also wait for the participants to complete their part of the commit work in the transaction before the control is returned to the caller. SLF> * Each participant uses disk_log:log/2 or disk_log:blog/2 to SLF> record local votes and commit/abort decisions, but participants SLF> are *not* using the disk_log:sync/1 to force the log to disk. Correct. SLF> The disk_log:sync/1 function has an extremely high penalty, but SLF> sometimes that penalty is worth the cost. For example, some SLF> read+write transactions may contain data that you *really* do not want SLF> to lose. For data that important, if all replicas suddenly lose SLF> power, it is possible to lose the logs and thus the newly-updated data SLF> before it is written safely to disk on each replica machine. I agree that such a feature can be useful. At least if the there are no write caches enabled in the disk hardware. Otherwise you could lose some data anyway in case of a power failure. SLF> But I can't find a Mnesia transaction knob/button that I can SLF> twist/press to request that level of safety. Is there such a thing? No currently there are no such thing in Mnesia. /H?kan From david.nospam.hopwood@REDACTED Wed Jan 25 03:16:04 2006 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Wed, 25 Jan 2006 02:16:04 +0000 Subject: Computers are fast (was: Recursive list comprehension) In-Reply-To: <200601200224.k0K2O4IG488314@atlas.otago.ac.nz> References: <200601200224.k0K2O4IG488314@atlas.otago.ac.nz> Message-ID: <43D6DF64.2080206@blueyonder.co.uk> Richard A. O'Keefe wrote: > maybe they're right to dismiss the cost as a sacrifice for > provably correct programs, > > But they *DON'T* dismiss cost as an issue. They just aren't one-eyed > and prejudiced about it. They are aware that development time is a cost. > They are aware that a high level language enlarges the scope of what you > *CAN* program at all. They are aware that cheap ($1000) computers are > now more than a thousand times faster than expensive ($1000000) mainframes > of 25 years ago and have about a thousand times as much memory. Absolutely. Recently, during the development of a soft real-time program, I accidentally left on a debugging option that was dumping megabytes per second of barely useful debug information to disk. But the machine was so damn fast that this wasn't at all noticeable from the program's performance, and it still met its real-time deadlines. Some programmers, usually those who do almost all their programming in C, C++ and similar languages, seem to be obsessed with low level optimizations that shave off a few cycles here and there. They haven't internalized just how fast modern computers are capable of running. When a program runs perceptibly slowly, it is almost always due to misdesign, not programming language. Slow applications (and operating systems) are slow because they're doing the wrong thing, not because they're doing the right thing slowly. To effectively optimize at a high level, you need a high level language. -- David Hopwood From joe.armstrong@REDACTED Wed Jan 25 09:03:02 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Wed, 25 Jan 2006 09:03:02 +0100 Subject: Newbie Question Message-ID: You're joking, 1 year = 3.15 *10^^7 seconds Let's buy a fast machine say with a 4GHz clock This is 4*10^9 * 3.15*10^7 Hz/year = 1.26 * 10^17 Let's assume we can do one computation in 1 instructions (a very silly assumption) Then on one machine the computation will take 3.3*10^19/1.26*10^17 years = 2.6*10^2 years But I very much doubt if you can do one computation in 1 machine cycle - suppose it takes 10^5 cycles (just a guess) Then it will take 2.6*10^7 years - That's on one machine. To do this in Erlang you need to: 1) Write a peer 2 peer infrastructure for performing massive distributed computations 2) Write a really snazzy application to get millions of people to install the p2p instrastructure 3) Use the idle time on all the hosts in the p2p application to do your computation If you can get 10^8 hosts running you program (it will then be more popular than Skype) Then you might, with a bit of luck, get an answer. /Joe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Nils M?llner > Sent: den 24 januari 2006 11:31 > To: erlang-questions@REDACTED > Subject: Newbie Question > > Hello, > I', new to Erlang. > My Task: I have Key, Vector and Plaintext given for > crypto:aes_cbc_128_encrypt(Key, Vector and Plaintext). Now I > need to implement some kind of Brute Force to test all Keys > and Vectors till i find the right ones for a direct match > (compare plaintext /w result) and measure time. > What is the best way to travers through the keys? Should i > make lists and travers through them? What loop is best for > performance for about > 3.3*10^19 iterations? Is there already a > brute-force-algorithm in erlang? > Kind regards, > Nils Muellner > From event@REDACTED Tue Jan 24 12:02:26 2006 From: event@REDACTED (event@REDACTED) Date: Tue, 24 Jan 2006 12:02:26 +0100 Subject: CFP: ATOP Workshop @ AAMAS 2006 Message-ID: <43D60942.7090307@dfki.de> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: atop-cfp.txt URL: -------------- next part -------------- ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From event@REDACTED Tue Jan 24 13:06:04 2006 From: event@REDACTED (event@REDACTED) Date: Tue, 24 Jan 2006 13:06:04 +0100 (CET) Subject: CFP: ProMAS@ AAMAS 2006 -- Deadline 1st of February !!! Message-ID: <1126.82.124.81.105.1138104364.squirrel@mailia.lip6.fr> =================== Call for Papers =================== Fourth International Workshop on Programming Multi-Agent Systems (ProMAS-06) ProMAS-06 will be held with AAMAS-06 Hakodate, Japan, 8-12 May 2006 Even though the scientific contributions generated by the Multi-Agent Systems (MAS) research community can have a significant impact in the development of real-world distributed systems, the techniques resulting from such contributions will only be widely adopted when suitable programming languages and tools are available. Furthermore, such languages and tools must incorporate MAS techniques in a principled but practical way, so as to support the ever more complex task of professional programmers, in particular when the systems have to operate in dynamic environments. The ProMAS workshop series aims to address practical issues related to developing and deploying multi-agent systems. In particular, ProMAS aims to address how MAS designs or specifications can be effectively implemented. To address such issues, the workshop promotes the discussion and exchange of ideas concerning concepts, techniques, and principles that are important for multi-agent programming technology. In the three previous editions, ProMAS constituted an invaluable occasion, bringing together leading researchers from both academia and industry to discuss such issues. Confirming the growing importance of this area of research, in 2005 ProMAS was the most popular of all AAMAS workshops in terms of numbers of registered participants. We encourage the submission of original papers in any of the areas mentioned below. We particularly welcome papers describing programming languages and tools that provide specific programming constructs to facilitate the implementation of the essential concepts used in multi-agent system analysis and specifications. We also welcome submissions describing significant multi-agent applications, showing clearly the added-value of multi-agent programming for designers and programmers both in academia and industry. Specific topics for this workshop include, but are not limited to: - Programming Languages for multi-agent systems - Extensions of traditional languages for multi-agent programming - Theoretical and practical aspects of multi-agent programming - Computational complexity of MAS - Semantics for multi-agent programming languages - High-level executable multi-agent specification languages - Algorithms, techniques, or protocols for multi-agent issues (e.g., coordination, cooperation, negotiation) - Agent communication issues in multi-agent programming - Implementation of social and organisational aspects of MAS - Formal methods for specification and verification of MAS - Verification tools for implementations of MAS - Agent development tools and platforms - Generic tools and infrastructures for multi-agent programming - Interoperability and standards for MAS - Programming mobile agents - Safety and security for mobile MAS deployment - Fault tolerance and load balancing for mobile MAS - Application areas for multi-agent programming languages - Applications using legacy systems - Programming MAS for Grid-based applications - Programming MAS for the Semantic Web - Deployed (industrial-strength) MAS - Benchmarks and testbeds for comparing MAS languages and tools Important Dates: ---------------- Paper submission deadline: 1st of February, 2006 Notifications of acceptance/rejection: 19th of February, 2006 Camera-ready copies due: 17th of March, 2006 Workshop Date: 9th of May, 2006 Submission Details: ------------------- Authors should submit their paper by uploading a PDF file at: http://promas2006.in.tu-clausthal.de/submissions/ Papers should be formatted using Springer LNCS style (see http://www.springer.de/comp/lncs/authors.html) and have a maximum of 15 pages. Accepted papers will be published as a technical report and distributed to registered participants during the workshop. As it was the case for ProMAS-03, ProMAS-04, and ProMAS-05, we are planning to publish extended versions of the accepted papers as a volume of the Lecture Notes in Computer Science series by Springer-Verlag. Programme Committee: -------------------- Suzanne Barber (University of Texas at Austin, USA) Lars Braubach (University of Hamburg, Germany) Jean-Pierre Briot (University of Paris 6, France) Keith Clark (Imperial College, UK) Rem Collier (University College Dublin, Ireland) Yves Demazeau (Institut IMAG - Grenoble, France) Frank Dignum (Utrecht University, Netherlands) Michael Fisher (University of Liverpool, UK) Jorge G?mez-Sanz (Universidad Complutense Madris, Spain) Vladimir Gorodetsky (Russian Academy of Sciences, Russia) Benjamin Hirsch (TU-Berlin, Germany) Shinichi Honiden (NII, Tokyo, Japan) Jomi H?bner (Universidade Regional de Blumenau, Brazil) Jo?o Leite (Universidade Nova de Lisboa, Portugal) Jiming Liu (Hong Kong Baptist University, Hong Kong) John-Jules Meyer (Utrecht University, Netherlands) Oliver Obst (Koblenz-Landau University, Germany) Gregory O'Hare (University College Dublin, Ireland) Andrea Omicini (University of Bologna, Italy) Agostino Poggi (Universit? degli Studi di Parma, Italy) Alexander Pokahr (University of Hamburg, Germany) Chris Reed (Calico Jack Ltd., UK) Birna van Riemsdijk (Utrecht University, Netherlands) Sebastian Sardina (RMIT University, Australia) Ichiro Satoh (NII, Kyoto, Japan) Onn Shehory (IBM Haifa Research Labs, Haifa University, Israel) Kostas Stathis (City University London, UK) Simon Thompson (BT, UK) Leon van der Torre (CWI, Netherlands) Paolo Torroni (University of Bologna, Italy) Gerhard Weiss (Technische Universit?t M?nchen, Germany) Michael Winikoff (RMIT University, Melbourne, Australia) Cees Witteveen (Delft University, Netherlands) Organising Committee: --------------------- Rafael H. Bordini (University of Durham, UK) http://www.dur.ac.uk/r.bordini Mehdi Dastani (Utrecht University, The Netherlands) http://www.cs.uu.nl/~mehdi J?rgen Dix (Clausthal University of Technology, Germany) http://www.in.tu-clausthal.de/~dix/ Amal El Fallah Seghrouchni (University of Paris VI, France) http://www-poleia.lip6.fr/~elfallah/ ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From surindar.shanthi@REDACTED Wed Jan 25 09:20:47 2006 From: surindar.shanthi@REDACTED (Surindar Sivanesan) Date: Wed, 25 Jan 2006 13:50:47 +0530 Subject: Error:file table overflow Message-ID: <42ea5fb60601250020oe8c048teac5766f7993cd99@mail.gmail.com> Hi all I have run an erlang program applying OTP principle.It run fine for about 15 minutes and after that, it show error in connecting SQL database. The error for *odbc:connect( ) *is : {error,{{badmatch, {error, {*enfile*, [{erlang, open_port, [{spawn,tcp_inet}, [binary]]}, {prim_inet,open0,1}, {prim_inet,open1,2}, {inet,open,7}, {inet_tcp,listen,2}, {odbc,init,1}, {gen_server,init_it,6}, {proc_lib,init_p,5}]}}}, [{odbc,init,1}, {gen_server,init_it,6}, {proc_lib,init_p,5}]}}. Please tell me the reason for this error and guide me to rectify this problem -- with regards, S.Surindar -------------- next part -------------- An HTML attachment was scrubbed... URL: From jalarson@REDACTED Mon Jan 23 22:23:17 2006 From: jalarson@REDACTED (James Larson) Date: Mon, 23 Jan 2006 13:23:17 -0800 Subject: JSON library Message-ID: <43D54945.8030107@amazon.com> Here (finally) is our JSON (http://json.org) library for Erlang. It's a simple standalone module rather than an application. It's offered under the Erlang License v1.1. Based on previous discussion on the list, we changed the representation of JSON objects from dicts to tagged proplists. We're keeping JSON strings as Erlang strings, rather than Erlang binaries, as we didn't want to hardcode any particular Unicode format. It's surprisingly useful to represent JSON arrays as Erlang tuples, rather than Erlang lists, as it allows many Erlang data types, such as now() timestamps or inet addrs, to be directly converted. Please send bugs/fixes/contributions to the authors. Enjoy! Jim Larson A2Z Development, Inc. ("An Amazon.com Company") From joe.armstrong@REDACTED Wed Jan 25 09:40:59 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Wed, 25 Jan 2006 09:40:59 +0100 Subject: Build an erlang computer (was:Computers are fast) Message-ID: Absolutely. In my never ending quest for inefficiency I have seldom met a problem which could not be solved in the twinkling of an eye (apart, that is, from our friend that wanted to do O(10^19) computations to force some crypto system :-) I don't know if this is the right place to discuss this, but I've been thinking about building a quiet and fast computer. Has anybody done this? - I think I'm beginning to understand the things I have to do to make it quiet - but how do I make a fast computer? I want to maximize my bangs for the buck. Any ideas on the tradeoffs between processor caches, main memory sizes, CPU clock speeds etc. I'd like to optimize for - compiling programs with a few hundred source code files - making a high performance web server Where is my money better spent? A cheapish processor with as much memory as possible Say a Athlon 64 3000+ 2GHz 512KB cache at 1295 kr With 4 G memory (about 1000 kr/G) Or the cheapest dual core Athlon 64 X2 3800+ 2GH 1MB = 3250kr With 2 G memory In the old days I always said that buying more memory was better than buying a faster processor - is this still true? - also what is the effect of increasing the size of the processor cache contra more main memory for the same money? Has anybody made any measurements here? How about cheapo processor, water cooling and overclocking???? Is this the way to go? Question: Is there a simple program to make main memory totally unavailable in my linux system? - I'd like to boot the system saying "use only 100K of memory" or "use only 200K or memory" (I currently have 512K) so I can measure the effect of different memory sizes on performance. Cheers /Joe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of David Hopwood > Sent: den 25 januari 2006 03:16 > To: erlang-questions@REDACTED > Subject: Computers are fast (was: Recursive list comprehension) > > Richard A. O'Keefe wrote: > > maybe they're right to dismiss the cost as a sacrifice for > > provably correct programs, > > > > But they *DON'T* dismiss cost as an issue. They just > aren't one-eyed > > and prejudiced about it. They are aware that development > time is a cost. > > They are aware that a high level language enlarges the > scope of what > > you > > *CAN* program at all. They are aware that cheap ($1000) > computers are > > now more than a thousand times faster than expensive ($1000000) > > mainframes of 25 years ago and have about a thousand times > as much memory. > > Absolutely. Recently, during the development of a soft > real-time program, I accidentally left on a debugging option > that was dumping megabytes per second of barely useful debug > information to disk. But the machine was so damn fast that > this wasn't at all noticeable from the program's performance, > and it still met its real-time deadlines. > > Some programmers, usually those who do almost all their > programming in C, > C++ and similar languages, seem to be obsessed with low level > C++ optimizations > that shave off a few cycles here and there. They haven't > internalized just how fast modern computers are capable of running. > > When a program runs perceptibly slowly, it is almost always > due to misdesign, not programming language. Slow applications > (and operating systems) are slow because they're doing the > wrong thing, not because they're doing the right thing > slowly. To effectively optimize at a high level, you need a > high level language. > > -- > David Hopwood > > From samuel@REDACTED Wed Jan 25 09:45:25 2006 From: samuel@REDACTED (Samuel Rivas) Date: Wed, 25 Jan 2006 09:45:25 +0100 Subject: ets:select_count bug? Message-ID: <20060125084525.GD30786@crusher.lfcia.pri> Hi, I tried this in R10B-9 1> T = ets:new(task_table, [set, protected, {keypos, 1}]). 18 2> ets:insert(T, {1, "hi", b}). true 3> ets:select(T, [{{'_', "hi", '_'},[],['$_']}]). [{1,"hi",b}] 4> ets:select_count(T, [{{'_', "hi", '_'},[],['$_']}]). 0 Is this a select_count bug or am I doing something wrong? -- Samuel From ulf.wiger@REDACTED Wed Jan 25 09:46:20 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 25 Jan 2006 09:46:20 +0100 Subject: early warning - new rdbms Message-ID: I thought I'd let the cat out of the bag a little... If anyone wants to beta-test or help out with some of the more advanced problems, let me know. I've come pretty far along with a new version of rdbms. It has several nice features, and I think it's about to make the transition from 'somewhat interesting' to 'actually useful': - JIT compilation of verification code. The overhead for type and bounds checking is now only a few (~5) microseconds per write operation. - The parameterized indexes that I hacked into mnesia before are now part of rdbms. This include ordered indexes and fragmented indexes (i.e. hashed on index value - so they should scale well.) - Rdbms will handle fragmented tables transparently (And actually handles plain tables with less overhead than mnesia_frag does.) The overhead for using the rdbms access module (compared to no access module) on a plain transaction is in the order of 20 microseconds on my 1 GHz SunBLADE. - Rdbms hooks into the transaction handling in such a way that it can automatically rebuild the verification code as soon as a schema transaction commits. - A readable file format for schema definitions, trying to establish a structured way to create large mnesia databases. I've also added a 'group' concept to be able to group tables into corresponding subsystems, since I thought this might be helpful in large systems. I'm planning to release rdbms with OTP R11, since it requires some changes to mnesia that (hopefully) will make it into R11. R11 is planned for May. Some of the (fairly minor) changes to mnesia so far: - The access module can hook into the transaction flow by providing callbacks for begin_activity() and end_activity(). Rdbms uses this for proper handling of abort and commit triggers as well as loop detection in referential integrity checks. It also allows rdbms to detect schema changes. - An 'on-load' hook allows rdbms to build indexes the first time a table is loaded. - A low-level access API for foreign tables. My first foreign table attempt was a 'disk_log'. It makes it possible to properly log events inside a transaction context. You also get replicated logs almost for free, as well as (if you want to) fragmented logs. (: My next attempt at a foreign table is a read- only file system (doesn't have to be read-only, but I thought I'd start with that.) Thus the experiments with converting regexps to the select pattern syntax. One interesting experiment might be to define an ISAM table type for really large ordered sets on disk. Combining it with rdbms, you can type- specify the data types and then convert to whatever format is expected by the ISAM files. Some questions to those who might be interested: - I'd like to break compatibility with the old rdbms in some respects. Is this a problem for anyone? (speak now or forever hold your peace) - Do you have any suggestions or feature requests? - Do you want to help out? Regards, Uffe From ulf.wiger@REDACTED Wed Jan 25 09:51:14 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 25 Jan 2006 09:51:14 +0100 Subject: select_count bug? Message-ID: 1> T = ets:new(task_table, [set, protected, {keypos, 1}]). 16 2> ets:insert(T, {1, "hi", b}). true 3> ets:select(T, [{{'_', "hi", '_'},[],['$_']}]). [{1,"hi",b}] 4> ets:select_count(T, [{{'_', "hi", '_'},[],['$_']}]). 0 5> ets:select_count(T, [{{'_', "hi", '_'},[],[true]}]). 1 You have to modify the select pattern slightly for select_count. It takes the same type of match spec as select_delete/2 -- not as select/2. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Samuel Rivas > Sent: den 25 januari 2006 09:45 > To: erlang-questions@REDACTED > Subject: ets:select_count bug? > > Hi, > > I tried this in R10B-9 > > 1> T = ets:new(task_table, [set, protected, {keypos, 1}]). > 18 > 2> ets:insert(T, {1, "hi", b}). > true > 3> ets:select(T, [{{'_', "hi", '_'},[],['$_']}]). > [{1,"hi",b}] > 4> ets:select_count(T, [{{'_', "hi", '_'},[],['$_']}]). > 0 > > Is this a select_count bug or am I doing something wrong? > > -- > Samuel > From klacke@REDACTED Wed Jan 25 10:00:40 2006 From: klacke@REDACTED (Claes Wikstom) Date: Wed, 25 Jan 2006 10:00:40 +0100 Subject: Error:file table overflow In-Reply-To: <42ea5fb60601250020oe8c048teac5766f7993cd99@mail.gmail.com> References: <42ea5fb60601250020oe8c048teac5766f7993cd99@mail.gmail.com> Message-ID: <43D73E38.1020005@hyber.org> Surindar Sivanesan wrote: > > Hi all > I have run an erlang program applying OTP principle.It run fine for > about 15 minutes and after that, it show error in connecting SQL database. > The error for *odbc:connect( ) *is : > {error,{{badmatch, > {error, > {*enfile*, You're continously opening either files or sockets and not closing them. Do i() at the shell prompt to find out. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From vlad.xx.dumitrescu@REDACTED Wed Jan 25 10:15:10 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Wed, 25 Jan 2006 10:15:10 +0100 Subject: Build an erlang computer (was:Computers are fast) Message-ID: <11498CB7D3FCB54897058DE63BE3897C0127F7E1@esealmw105.eemea.ericsson.se> Hi, > Question: Is there a simple program to make main memory > totally unavailable in my linux system? - I'd like to boot > the system saying "use only 100K of memory" or "use only 200K > or memory" > (I currently have 512K) so I can measure the effect of > different memory sizes on performance. There usually is a mem=XXXM boot parameter for the kernel. I don't know if it works to restrict it, or is it just for cases where the default doen't recognize all installed memory. Otherwise, it is also possible to restrict memory usage per user, using the PAM module. You can control the per-user limits using the resource-limits PAM module and /etc/pam.d/limits.conf. For example, limits for group users might look like this: @users hard core 0 @users hard nproc 50 @users hard rss 5000 This says to prohibit the creation of core files, restrict the number of processes to 50, and restrict memory usage per user to 5M. Regards, Vlad From ulf.wiger@REDACTED Wed Jan 25 12:57:11 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 25 Jan 2006 12:57:11 +0100 Subject: early warning - new rdbms Message-ID: Mickael Remond wrote: > > > One interesting experiment might be to define > > an ISAM table type for really large ordered > > sets on disk. Combining it with rdbms, you can > > type- specify the data types and then convert > > to whatever format is expected by the ISAM files. > > Could you elaborate a little on this. I was running > a study to possibly revive the Berkeley DB backend > idea. My goal is to be able to store huge amount > of data efficiently with a correct query time in > Mnesia. The low-level interface that I've proposed mirrors the mnesia_lib:db_xxxx() functions (db_put, db_get, match_object, select, etc.) + some callbacks to verify cstructs and loading the actual table. For example, from my first version of a disk_log table: db_get(Tab, Key) -> Log = log_name(Tab), fold_log( Log, fun(Terms, Acc) -> {continue, lists:foldr( fun(Obj, Acc1) when element(2,Obj) == Key -> [Obj|Acc1]; (_Obj, Acc1) -> Acc1 end, Acc, Terms)} end, []). db_put(Tab, Val) -> disk_log:log(log_name(Tab), Val). match_object(Tab, Pat) -> select(Tab, [{Pat,[],['$_']}]). select(Tab, Ms) -> Log = log_name(Tab), MsC = ets:match_spec_compile(Ms), RevResult = fold_log( Log, fun(Terms, Acc) -> Matches = ets:match_spec_run(Terms, MsC), {continue, lists:reverse(Matches) ++ Acc} end, []), lists:reverse(RevResult). (Part of the idea being that you'd mostly do put() on the log table, and so reading and matching need not be super efficient.) When creating the table, you specify {external_copies, [{CallBack, Nodes}]} e.g. {external_copies, [{rdbms_log, [node()]}]} and this is understood by mnesia to mean that the callback module rdbms_log should be used for the actual reading and writing in this table. For something like Berkeley DB, you'd want to convert the data to some efficient external format. This is helped by rdbms, in the sense that you can type-specify each attribute. You can, for example specify that the key _must_ be an integer in the range 0..4294967295. Then, you can safely encode the key as a 32-bit unsigned before writing the data to the backend. The actual code that's generated to verify the type and range looks something like this, and doesn't take many microseconds to execute: validate_person({person,V_id,V_name,V_addr,V_age}) -> if V_id =/= undefined -> true; true -> throw({type_error,id,{expected,not_null}}) end, if is_integer(V_age) -> true; true -> throw({type_error,age,{expected,integer}}) end, validate_oid(V_id,id,oid), validate_string(V_name,name,string), if 0 =< V_age, V_age =< 100 -> true; true -> throw({type_error,age,{expected,{inclusive,{0,100}}}}) end, true; ('oid' is a predefined data type in rdbms that corresponds to {node(), erlang:now()}, intended for globally unique identifiers.) What you do to activate the integrity checking in rdbms, is simply to e.g. start erlang with erl ... -mnesia access_module rdbms One caveat: You have to use the mnesia:activity() functions (of course, without overriding the default access module with your own choice). The old mnesia:transaction/1 function doesn't take access modules into account. /Uffe From rasmussen.bryan@REDACTED Wed Jan 25 13:45:45 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Wed, 25 Jan 2006 13:45:45 +0100 Subject: apache and yaws Message-ID: <3bb44c6e0601250445y2fd9f01bgfe36970d052c9c12@mail.gmail.com> Hi, A lot of people have referenced the apache vs. yaws discussion over the years, what I'm wondering about is Apache and Yaws. Has anyone thought of any particular integration scenarios between these two. I have to admit I haven't either, but I would think that despite the scalability of yaws that Apache's list of components are impressive, there must be things it does better than Yaws. Any ideas? Cheers, Bryan Rasmussen From joe.armstrong@REDACTED Wed Jan 25 14:55:17 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Wed, 25 Jan 2006 14:55:17 +0100 Subject: apache and yaws Message-ID: Absolutely, though I see no reason for the "must" in our statement "the must be things it (Apache) does better than yaws" Now Apache does things that yaws does not do at all - but when you can get Apache and yaws to do the same thing (like serving up dynamic content) yaws seems to outperform Apache. I guess we could ask - what features are missing from yaws that have proved to be useful in Apache - and then set about and implement them. Apart form that I haven't quite understood why a server must be a server for ONE thing. Why do we have FTP servers, HTTP servers, email server, etc. Why not a universal server, with an FTP plugin, and HTTP plugin, etc. (( I built one of these a while back :-)) - it was just an empty server that did nothing - the only thing you could do with it was to sent it code, and then it became whatever the code you sent it told it to do. So you could send it code meaning "become an FTP server" and it then was an FTP server ... As regards Apache, I'd like to broaden the scope. Here's the plan. Replace Apache + MySQL + PHP with Yaws + Mnesia + Erlang Why? Yaws outperforms Apache Mnesia outperforms MySQL Erlang outperforms PHP << I could add lots of footnotes here, since these statements need some qualifying, ie mnesia is better than SQL for real-time lookups, yaws better than apache under overload conditions etc. Erlang seems to outperform PHP for everything :-) >> Also, and more importantly, *the bits fit together properly* - ie there is no semantic gap between Yaws/mnesia/PHP. To make an Apache, MySQL, PHP application you have to learn three, (yes you heard me right, three) different languages and sets of configuration files. This is *painful* there are even entire BOOKs devoted to setting up Apache, MySQL and PHP. What should be a *trivial* operation of making a web sever work together with a database and a scripting language becomes an nightmare exercise of fitting different versions of things together. I tried this once - it was terrible. You have to get exactly the right versions of everything and mess around editing things for ages, until it finally works - no wonder these things come pre-installed or as add-on packages in every half decent OS release - doing it yourself is a bummer. Now the Yaws-mnesia-Erlang install is a *lot* easier. Make Erlang work. Take the yaws tarball, unpack, run. Making it into a system daemon is a bit more tricky - 20 mins or so. Now the nice thing about the yaws/mnesia/Erlang setup is the conceptual framework - THE BITS FIT TOGETHER - I cannot overstress this point (it's called conceptual integrity). What we currently don't have is an "enterprise yaws" (ie one that will let multiple users use the same yaws in a safe manner so that they can't crash each other's applications) nor do we have a decent template language, nor do we have Ajax things etc. All of these are being worked on, and prototype solutions for safe Erlang code within Erlang and for various template languages are "in progress". Hopefully these will be in releasable shape fairly soon. Right now I'm finalising some wiki and template modules to add to yaws and trying to move the entire Erlang documentation system into a wiki + yaws + blog + forums engine. Cheers /Joe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of bryan > rasmussen > Sent: den 25 januari 2006 13:46 > To: erlang-questions@REDACTED > Subject: apache and yaws > > Hi, > > A lot of people have referenced the apache vs. yaws > discussion over the years, what I'm wondering about is Apache > and Yaws. Has anyone thought of any particular integration > scenarios between these two. I have to admit I haven't > either, but I would think that despite the scalability of > yaws that Apache's list of components are impressive, there > must be things it does better than Yaws. > > Any ideas? > > Cheers, > Bryan Rasmussen > From eduardo@REDACTED Wed Jan 25 15:12:11 2006 From: eduardo@REDACTED (Eduardo Figoli (INS)) Date: Wed, 25 Jan 2006 12:12:11 -0200 Subject: Software life cycle in Erlang Message-ID: <07d101c621b9$57a40070$4a00a8c0@Inswitch251> Hi, I'm trying to figure out the best model for software development in Erlang. What do you think would be the right values for Analisys, Design, Implementation and Testing phases? Prototyping model: Analisys............... 20% Design................. 20% Implementation.... 35% Testing................. 25% Any comments? regards, Eduardo Figoli Prepaid Expertise - Programmable Switches Powered by Ericsson Licensed Technology Eng. Eduardo Figoli - Development Center - IN Switch Solutions Inc. Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 e-mail: eduardo@REDACTED -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1429 bytes Desc: not available URL: From erlang@REDACTED Wed Jan 25 15:13:07 2006 From: erlang@REDACTED (Inswitch Solutions) Date: Wed, 25 Jan 2006 12:13:07 -0200 Subject: Software life cycle in Erlang Message-ID: <07e301c621b9$80164f90$4a00a8c0@Inswitch251> Hi, I'm trying to figure out the best model for software development in Erlang. What do you think would be the right values for Analisys, Design, Implementation and Testing phases? Prototyping model: Analisys............... 20% Design................. 20% Implementation.... 35% Testing................. 25% Any comments? regards, Eduardo Figoli Prepaid Expertise - Programmable Switches Powered by Ericsson Licensed Technology Eng. Eduardo Figoli - Development Center - IN Switch Solutions Inc. Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 e-mail: eduardo@REDACTED -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1429 bytes Desc: not available URL: From garry@REDACTED Wed Jan 25 15:41:56 2006 From: garry@REDACTED (Garry Hodgson) Date: Wed, 25 Jan 2006 09:41:56 -0500 (EST) Subject: Software life cycle in Erlang In-Reply-To: <07e301c621b9$80164f90$4a00a8c0@Inswitch251> References: <07e301c621b9$80164f90$4a00a8c0@Inswitch251> Message-ID: <2006012509361138199780@k2.sage.att.com> "Inswitch Solutions" wrote: > I'm trying to figure out the best model for software development in Erlang. > What do you think would be the right values for Analisys, Design, Implementation and Testing phases? > > Prototyping model: > Analisys............... 20% > Design................. 20% > Implementation.... 35% > Testing................. 25% i don't know if there are "typical" such numbers for software development in general. but i'm curious if people think that the percentages would be any different in erlang than in other languages, and if so, why. ---- Garry Hodgson, Technical Consultant, AT&T Labs do for others with no desire of return. we should all plant some trees we will never sit under. From thomasl_erlang@REDACTED Wed Jan 25 16:06:50 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Wed, 25 Jan 2006 07:06:50 -0800 (PST) Subject: LYME (RE: apache and yaws) In-Reply-To: Message-ID: <20060125150650.26613.qmail@web34403.mail.mud.yahoo.com> --- "Joe Armstrong (AL/EAB)" wrote: > Replace Apache + MySQL + PHP with > Yaws + Mnesia + Erlang The final piece, to build/generate/make/... linux daemons, doesn't sound too hard. We then get a LYME stack: Linux + Yaws + Mnesia + Erlang Hey cool. Turn off the LAMP; have a LYME. Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From thomasl_erlang@REDACTED Wed Jan 25 16:19:53 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Wed, 25 Jan 2006 07:19:53 -0800 (PST) Subject: Software life cycle in Erlang In-Reply-To: <07d101c621b9$57a40070$4a00a8c0@Inswitch251> Message-ID: <20060125151953.31201.qmail@web34403.mail.mud.yahoo.com> --- "Eduardo Figoli (INS)" wrote: > I'm trying to figure out the best model for software > development in Erlang. The best _model_ seems to be iterative development of some sort, perhaps test driven. AXD 301 had great success with steadily improving "increments", to take one of the great success stories. Taking a number like 35% for implementation means your whole project is done about 50% faster (in 2/3 the time) even if the language permits infinitely faster development than the state of the art, simply because the rest of the phases aren't concerned with programming. (That's the usual argument against switching programming languages, of course.) This doesn't seem right -- the added flexibility also means you can use powerful new development processes. My recommendation: try to "switch to better rules". Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From mickael.remond@REDACTED Wed Jan 25 11:12:51 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Wed, 25 Jan 2006 11:12:51 +0100 Subject: early warning - new rdbms In-Reply-To: References: Message-ID: <20060125101251.GA12190@memphis.ilius.fr> * Ulf Wiger (AL/EAB) [2006-01-25 09:46:20 +0100]: > If anyone wants to beta-test or help out with some > of the more advanced problems, let me know. Hello Ulf, I am interesting. I have been doing a lot of Mnesia based development recently and have just started rereading the RDBMS code. I think Mnesia is often under-estimated and can be used successfully in many context. > One interesting experiment might be to define > an ISAM table type for really large ordered sets > on disk. Combining it with rdbms, you can type- > specify the data types and then convert to > whatever format is expected by the ISAM files. Could you elaborate a little on this. I was running a study to possibly revive the Berkeley DB backend idea. My goal is to be able to store huge amount of data efficiently with a correct query time in Mnesia. > Some questions to those who might be interested: > > - I'd like to break compatibility with the old > rdbms in some respects. Is this a problem for > anyone? (speak now or forever hold your peace) This is not a problem for us, as we prefer to support a nice dynamic around Mnesia. > - Do you have any suggestions or feature requests? My interest goes to: - Being able to make Mnesia even more versatile and configurable. Easy to develop and pluggable (I mean configurable) storage back-end would be nice. - Being able to support high volume of storage efficiently in Mnesia. What would you think of adding a way to force storage in binary instead of list through rdbms ? (This would reduce storage space). > - Do you want to help out? Yes. -- Micka?l R?mond From simonpeterchappell@REDACTED Wed Jan 25 17:50:45 2006 From: simonpeterchappell@REDACTED (Simon Chappell) Date: Wed, 25 Jan 2006 10:50:45 -0600 Subject: LYME (RE: apache and yaws) In-Reply-To: <20060125150650.26613.qmail@web34403.mail.mud.yahoo.com> References: <20060125150650.26613.qmail@web34403.mail.mud.yahoo.com> Message-ID: <8ed733900601250850y2d514aaaj997bfcc2dbe5dd3a@mail.gmail.com> Or perhaps YEMM: Yaws + Erlang + Mnesia + Mac? On 1/25/06, Thomas Lindgren wrote: > > > --- "Joe Armstrong (AL/EAB)" > wrote: > > > Replace Apache + MySQL + PHP with > > Yaws + Mnesia + Erlang > > The final piece, to build/generate/make/... linux > daemons, doesn't sound too hard. > > We then get a LYME stack: Linux + Yaws + Mnesia + > Erlang > Hey cool. Turn off the LAMP; have a LYME. > > Best, > Thomas > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > -- www.simonpeter.org uab.blogspot.com From lennart.ohman@REDACTED Wed Jan 25 19:00:13 2006 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Wed, 25 Jan 2006 19:00:13 +0100 Subject: Software life cycle in Erlang In-Reply-To: <07e301c621b9$80164f90$4a00a8c0@Inswitch251> Message-ID: Hi, I am not clear over if the head-line "Prototyping model" means that you are only trying to elaborate over the phases in prototype development!? In that case I certainly agree with Thomas' comments. In a prototype project one should really try to get down implementing as soon as possible rather than trying to analyse the problem fully first. Otherwise, if we are not talking about a prototype but a fully commercial system, then as you so correctly put it in your headline "Life Cycle" one must not forget that initial development is actually not the main part. It is the cost for making changes, extensions, bug-fixes, trouble-shoot difficult problems, supporting customers and understand how it all was done in years to come. Best Regards, Lennart ------------------------------------------------------------- Lennart Ohman?????????????????? office? : +46-8-587 623 27 Sjoland & Thyselius Telecom AB? cellular: +46-70-552 67 35 Sehlstedtsgatan 6?????????????? fax???? : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN??? email?? : lennart.ohman@REDACTED ________________________________________ From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Inswitch Solutions Sent: Wednesday, January 25, 2006 3:13 PM To: erlang-questions@REDACTED Subject: Software life cycle in Erlang Hi, ? I'm trying to figure out the best model for software development in Erlang. What do you think would be the right values for Analisys, Design, Implementation and Testing phases?? ? Prototyping model: Analisys...............?20% Design................. 20% Implementation.... 35% Testing................. 25% ? Any comments? ? ? regards, Eduardo Figoli ? Prepaid Expertise - Programmable Switches Powered by Ericsson Licensed Technology Eng. Eduardo Figoli - Development Center - IN Switch Solutions Inc. Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 e-mail: eduardo@REDACTED From james.hague@REDACTED Wed Jan 25 19:01:42 2006 From: james.hague@REDACTED (James Hague) Date: Wed, 25 Jan 2006 12:01:42 -0600 Subject: Build an erlang computer (was:Computers are fast) In-Reply-To: References: Message-ID: > In my never ending quest for inefficiency I have seldom met a problem > which could not be solved in the twinkling of an eye (apart, that is, > from our friend that wanted to do O(10^19) computations to force some > crypto system :-) How about parsing a 300+ megabyte XML file? I have a lean and mean XML parser in Erlang, one that only deals with a strict subset of XML, and operates entirely on binaries. On 8 or 10 megabyte files, it's great, but on this monster--heh. After about 30 minutes the emulator dies with "Abnormal Termination." I suspect it's running out of memory. It's interesting when these kinds of crazy problems come along :) From nm@REDACTED Wed Jan 25 20:35:34 2006 From: nm@REDACTED (Gaspar Chilingarov) Date: Wed, 25 Jan 2006 23:35:34 +0400 (AMT) Subject: Software life cycle in Erlang In-Reply-To: <2006012509361138199780@k2.sage.att.com> References: <07e301c621b9$80164f90$4a00a8c0@Inswitch251> <2006012509361138199780@k2.sage.att.com> Message-ID: <58941.217.113.1.123.1138217734.squirrel@webmail.web.am> > "Inswitch Solutions" wrote: > > >> I'm trying to figure out the best model for software development in Erlang. >> What do you think would be the right values for Analisys, Design, >> Implementation and Testing phases? >> >> >> Prototyping model: >> Analisys............... 20% >> Design................. 20% >> Implementation.... 35% >> Testing................. 25% >> > > i don't know if there are "typical" such numbers for software development in > general. but i'm curious if people think that the percentages would be any > different in erlang than in other languages, and if so, why. > Personally for me erlang provided much more smooth transtion from prototyping to implementation, that otnher languages. Testing is also in simple to do in erlang, imho. -- Gaspar Chilingarov System Administrator t +37491 419763 w www.netter.am e nm@REDACTED From ryanobjc@REDACTED Wed Jan 25 20:54:18 2006 From: ryanobjc@REDACTED (Ryan Rawson) Date: Wed, 25 Jan 2006 11:54:18 -0800 Subject: Software life cycle in Erlang In-Reply-To: <20060125151953.31201.qmail@web34403.mail.mud.yahoo.com> References: <07d101c621b9$57a40070$4a00a8c0@Inswitch251> <20060125151953.31201.qmail@web34403.mail.mud.yahoo.com> Message-ID: <78568af10601251154m4d24ab19y926b430bdf535230@mail.gmail.com> The best explanation of software "engineering" I have heard is seperation of "design engineering" and "production engineering". Essentially the speaker was arguing that most development would fall under the umbrella of design engineering - figuring out how to build it by building it (very common in the engineering world). Then derive requirements and specifications from your prototype and implement it "production-quality". The places I've worked, we are doing mostly design engineering , and the results are not just prototypes - they end up in production. It's the nature of the fast paced business. I would therefore posit, that design engineering has and can replace production engineering. The major difference is that production engineering has more error checking (according to this presentation), and with a language like erlang where you don't write error checking, it seems the distinction between design and production is blurring. Personally in my work, I have found scrum useful for team coordination and communications, and "build something that works quickly" a good guiding principle. This only really applies to smaller things that can be implemented by a small team though. -ryan On 1/25/06, Thomas Lindgren wrote: > > > --- "Eduardo Figoli (INS)" > wrote: > > I'm trying to figure out the best model for software > > development in Erlang. > > The best _model_ seems to be iterative development of > some sort, perhaps test driven. AXD 301 had great > success with steadily improving "increments", to take > one of the great success stories. > > Taking a number like 35% for implementation means your > whole project is done about 50% faster (in 2/3 the > time) even if the language permits infinitely faster > development than the state of the art, simply because > the rest of the phases aren't concerned with > programming. (That's the usual argument against > switching programming languages, of course.) This > doesn't seem right -- the added flexibility also means > you can use powerful new development processes. > > My recommendation: try to "switch to better rules". > > Best, > Thomas > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > From erlang@REDACTED Wed Jan 25 21:11:54 2006 From: erlang@REDACTED (Inswitch Solutions) Date: Wed, 25 Jan 2006 18:11:54 -0200 Subject: Software life cycle in Erlang References: Message-ID: <095401c621eb$b1eb0b00$4a00a8c0@Inswitch251> Hi Lennart, I should have said Evolutionary Prototyping as a project life cycle example. >From http://asd-www.larc.nasa.gov/barkstrom/public/The_Standard_Waterfall_Model_F or_Systems_Development.htm: Start with initial concept, design and implement an initial prototype, iterate as needed through prototype refinement until acceptable, complete and release the acceptable prototype. When releasing the acceptable prototype can the values spend for each involved phase be estimated? regards, Eduardo ----- Original Message ----- From: "Lennart Ohman" To: "'Inswitch Solutions'" ; Sent: Wednesday, January 25, 2006 4:00 PM Subject: RE: Software life cycle in Erlang Hi, I am not clear over if the head-line "Prototyping model" means that you are only trying to elaborate over the phases in prototype development!? In that case I certainly agree with Thomas' comments. In a prototype project one should really try to get down implementing as soon as possible rather than trying to analyse the problem fully first. Otherwise, if we are not talking about a prototype but a fully commercial system, then as you so correctly put it in your headline "Life Cycle" one must not forget that initial development is actually not the main part. It is the cost for making changes, extensions, bug-fixes, trouble-shoot difficult problems, supporting customers and understand how it all was done in years to come. Best Regards, Lennart ------------------------------------------------------------- Lennart Ohman office : +46-8-587 623 27 Sjoland & Thyselius Telecom AB cellular: +46-70-552 67 35 Sehlstedtsgatan 6 fax : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED ________________________________________ From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Inswitch Solutions Sent: Wednesday, January 25, 2006 3:13 PM To: erlang-questions@REDACTED Subject: Software life cycle in Erlang Hi, I'm trying to figure out the best model for software development in Erlang. What do you think would be the right values for Analisys, Design, Implementation and Testing phases? Prototyping model: Analisys............... 20% Design................. 20% Implementation.... 35% Testing................. 25% Any comments? regards, Eduardo Figoli Prepaid Expertise - Programmable Switches Powered by Ericsson Licensed Technology Eng. Eduardo Figoli - Development Center - IN Switch Solutions Inc. Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 e-mail: eduardo@REDACTED From david.nospam.hopwood@REDACTED Wed Jan 25 21:49:20 2006 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Wed, 25 Jan 2006 20:49:20 +0000 Subject: Build an erlang computer (was:Computers are fast) In-Reply-To: References: Message-ID: <43D7E450.70804@blueyonder.co.uk> James Hague wrote: >>In my never ending quest for inefficiency I have seldom met a problem >>which could not be solved in the twinkling of an eye (apart, that is, >>from our friend that wanted to do O(10^19) computations to force some >>crypto system :-) That's an example of "doing the wrong thing, [rather than] doing the right thing slowly." > How about parsing a 300+ megabyte XML file? And yet another example! :-) -- David Hopwood From david.nospam.hopwood@REDACTED Wed Jan 25 21:54:41 2006 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Wed, 25 Jan 2006 20:54:41 +0000 Subject: [Off-topic] Re: Build an erlang computer (was:Computers are fast) In-Reply-To: References: Message-ID: <43D7E591.1060604@blueyonder.co.uk> Joe Armstrong (AL/EAB) wrote: > I'd like to optimize for > > - compiling programs with a few hundred source code files > - making a high performance web server > > Where is my money better spent? > > A cheapish processor with as much memory as possible > Say a Athlon 64 3000+ 2GHz 512KB cache at 1295 kr > With 4 G memory (about 1000 kr/G) > > Or the cheapest dual core Athlon 64 X2 3800+ 2GH 1MB = 3250kr > With 2 G memory > > In the old days I always said that buying more memory was better than > buying a faster processor - is this still true? - also what > is the effect of increasing the size of the processor cache contra > more main memory for the same money? For the sake of argument, suppose that the dual core would do everything twice as fast (it certainly won't do better). This will not result in a 2x perceived increase in performance, since most of the things that are being done twice as fast took imperceptible time to begin with. It is more effective to remove situations that cause pathologically bad performance -- that is, performance so bad that just doubling the speed won't fix it. One such situation is virtual memory thrashing. The 4G box will be able to do more before running into this problem (and the 64-bit address space allows you to actually make use of 4G). -- David Hopwood From fritchie@REDACTED Wed Jan 25 22:18:29 2006 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Wed, 25 Jan 2006 15:18:29 -0600 Subject: Build an erlang computer (was:Computers are fast) In-Reply-To: Message of "Wed, 25 Jan 2006 10:15:10 +0100." <11498CB7D3FCB54897058DE63BE3897C0127F7E1@esealmw105.eemea.ericsson.se> Message-ID: <200601252118.k0PLITie008277@snookles.snookles.com> >>>>> "vd" == Vlad Dumitrescu XX \(LN/EAB\) writes: vd> There usually is a mem=XXXM boot parameter for the kernel. I vd> don't know if it works to restrict it, or is it just for cases vd> where the default doen't recognize all installed memory. If your machine has more RAM than XXX megabytes, then that extra RAM will not be used. Beware using that kernel option: accidentally using "K" rather than "M" can have bad effects on machines that are further away than arm's reach. (Not that I would *ever* do such a thing to a machine 2700 kilometers away, obviously. :-) Another way to do it is the mlock() system call. That will pin the contents of VM pages into RAM. I've had problems mlock()ing more than 1.3GB of RAM at one time on a Red Hat AS2.1 machine, even if I only do it 100MB at a time. I dunno if later kernels avoid that problem. -Scott From valentin@REDACTED Wed Jan 25 22:51:00 2006 From: valentin@REDACTED (Valentin Micic) Date: Wed, 25 Jan 2006 23:51:00 +0200 Subject: Build an erlang computer (was:Computers are fast) References: Message-ID: <006501c621f9$6e7f7d20$7309fea9@MONEYMAKER2> >Question: Is there a simple program to make main memory totally >unavailable in my linux system? Yeah... its called JVM ;-) Cheers, Valentin. From fritchie@REDACTED Wed Jan 25 22:54:15 2006 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Wed, 25 Jan 2006 15:54:15 -0600 Subject: Mnesia, disk logging, and synchronous disk logging In-Reply-To: Message of "Tue, 24 Jan 2006 16:36:39 +0100." Message-ID: <200601252154.k0PLsFn1012608@snookles.snookles.com> >>>>> "hm" == Hakan Mattsson writes: hm> In Mnesia the coordinator does always wait synchronously for 2PC hm> (and 3PC) votes from all participants, regardless of the hm> transaction being "synchronous" or not. That makes sense ... the coordinator can do Very Bad Things if it doesn't gather all votes. hm> I agree that such a feature can be useful. At least if the there hm> are no write caches enabled in the disk hardware. Otherwise you hm> could lose some data anyway in case of a power failure. Even if your disk subsystem(*) has an NVRAM write-back cache, there is risk of data loss unless you explicitly the fsync(2) system call. With Mnesia using the disk_log module, which in turn usually uses write(2) only, you are not certain that the OS will have copied write(2)'s data to the disk device. In most cases, the kernel can (and will) wait for many seconds before flushing that data to the disk device. SLF> But I can't find a Mnesia transaction knob/button that I can SLF> twist/press to request that level of safety. Is there such a SLF> thing? hm> No currently there are no such thing in Mnesia. That's what I'd thought. Assuming that I wanted to try to add that to Mnesia ... I think I'd need to add extra info to the commit record that's sent to each participant. Something that said: this log record is important enough to use fsync after writing. Hm. I suppose a poor man's safety net would be to run a shell script like this on each Mnesia node with disc_copies or disc_only_copies: while [ 1 ]; do sync sleep 1 done Easy to do, doesn't require code changes, and would limit worst-case data loss to roughly 1-2 seconds. (Assuming that disc_log and the file Port that disc_log uses do not do any buffering.) On the other hand, performance may suck. Too bad disk drives are so too darn slow. -Scott (*) Even if the disk logical device is a NVRAM/solid-state disk drive. From james.hague@REDACTED Wed Jan 25 22:59:19 2006 From: james.hague@REDACTED (James Hague) Date: Wed, 25 Jan 2006 15:59:19 -0600 Subject: Build an erlang computer (was:Computers are fast) In-Reply-To: <43D7E450.70804@blueyonder.co.uk> References: <43D7E450.70804@blueyonder.co.uk> Message-ID: > > How about parsing a 300+ megabyte XML file? > > And yet another example! :-) Not gonna argue with that, but that doesn't mean such files don't exist :) From serge@REDACTED Wed Jan 25 23:41:31 2006 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 25 Jan 2006 17:41:31 -0500 Subject: early warning - new rdbms In-Reply-To: References: Message-ID: <43D7FE9B.2000903@hq.idt.net> I have a Mnesia feature request, though not specifically related to rdbms. It would be helpful to have some kind of a "Change Number" (CN) in Mnesia that gets incremented every time there's a change in the data. This way if there's a network loss followed by subsequent restoration, it may not be necessary to restart/resynch mnesia nodes if they determine that the CN hasn't changed from the last known SCN (that is no data changes took place during network outage). Regards, Serge Ulf Wiger (AL/EAB) wrote: > I thought I'd let the cat out of the bag a little... > > If anyone wants to beta-test or help out with some > of the more advanced problems, let me know. > > > I've come pretty far along with a new version of > rdbms. It has several nice features, and I think > it's about to make the transition from 'somewhat > interesting' to 'actually useful': > > - JIT compilation of verification code. The overhead > for type and bounds checking is now only a few (~5) > microseconds per write operation. > - The parameterized indexes that I hacked into mnesia > before are now part of rdbms. This include ordered > indexes and fragmented indexes (i.e. hashed on > index value - so they should scale well.) > - Rdbms will handle fragmented tables transparently > (And actually handles plain tables with less overhead > than mnesia_frag does.) The overhead for using the > rdbms access module (compared to no access module) > on a plain transaction is in the order of 20 > microseconds on my 1 GHz SunBLADE. > - Rdbms hooks into the transaction handling in such a > way that it can automatically rebuild the verification > code as soon as a schema transaction commits. > - A readable file format for schema definitions, trying > to establish a structured way to create large mnesia > databases. I've also added a 'group' concept to be > able to group tables into corresponding subsystems, > since I thought this might be helpful in large > systems. > > > I'm planning to release rdbms with OTP R11, since it > requires some changes to mnesia that (hopefully) will > make it into R11. R11 is planned for May. > > Some of the (fairly minor) changes to mnesia so far: > > - The access module can hook into the transaction > flow by providing callbacks for begin_activity() > and end_activity(). Rdbms uses this for proper > handling of abort and commit triggers as well as > loop detection in referential integrity checks. > It also allows rdbms to detect schema changes. > - An 'on-load' hook allows rdbms to build indexes > the first time a table is loaded. > - A low-level access API for foreign tables. My > first foreign table attempt was a 'disk_log'. > It makes it possible to properly log events > inside a transaction context. You also get > replicated logs almost for free, as well as > (if you want to) fragmented logs. (: > My next attempt at a foreign table is a read- > only file system (doesn't have to be read-only, > but I thought I'd start with that.) Thus > the experiments with converting regexps to > the select pattern syntax. > > One interesting experiment might be to define > an ISAM table type for really large ordered sets > on disk. Combining it with rdbms, you can type- > specify the data types and then convert to > whatever format is expected by the ISAM files. > > Some questions to those who might be interested: > > - I'd like to break compatibility with the old > rdbms in some respects. Is this a problem for > anyone? (speak now or forever hold your peace) > - Do you have any suggestions or feature requests? > - Do you want to help out? > > Regards, > Uffe > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From matthias@REDACTED Wed Jan 25 23:48:11 2006 From: matthias@REDACTED (Matthias Lang) Date: Wed, 25 Jan 2006 23:48:11 +0100 Subject: [Off-topic] Re: Build an erlang computer (was:Computers are fast) In-Reply-To: <43D7E591.1060604@blueyonder.co.uk> References: <43D7E591.1060604@blueyonder.co.uk> Message-ID: <17368.43.86044.304711@antilipe.corelatus.se> > Joe Armstrong (AL/EAB) wrote: > > Say a Athlon 64 3000+ 2GHz 512KB cache at 1295 kr ... > > Or the cheapest dual core Athlon 64 X2 3800+ 2GH 1MB = 3250kr Nospam Hopwood writes: > For the sake of argument, suppose that the dual core would do > everything twice as fast (it certainly won't do better). The dual-core CPU in Joe's case has twice as much cache, so finding _something_ it's more than twice as quick on isn't a lost cause. Besides, the X2 can probably expose concurrency problems in device drivers and the like at more than 10x the rate of the uniprocessor. Matthias From dgud@REDACTED Thu Jan 26 08:29:58 2006 From: dgud@REDACTED (Dan Gudmundsson) Date: Thu, 26 Jan 2006 08:29:58 +0100 Subject: Mnesia, disk logging, and synchronous disk logging In-Reply-To: <200601252154.k0PLsFn1012608@snookles.snookles.com> References: <200601252154.k0PLsFn1012608@snookles.snookles.com> Message-ID: <17368.31350.416878.315282@rian.du.uab.ericsson.se> Talking about poor mans solutions, you can also use mnesia:dump_log(), which closes the files after operation. The log dumping is otherwise automatic which you can control with time or number of transactions, see manual. A per transaction disk sync option requires some hacking though. /Dan Scott Lystig Fritchie writes: > >>>>> "hm" == Hakan Mattsson writes: > > hm> In Mnesia the coordinator does always wait synchronously for 2PC > hm> (and 3PC) votes from all participants, regardless of the > hm> transaction being "synchronous" or not. > > That makes sense ... the coordinator can do Very Bad Things if it > doesn't gather all votes. > > hm> I agree that such a feature can be useful. At least if the there > hm> are no write caches enabled in the disk hardware. Otherwise you > hm> could lose some data anyway in case of a power failure. > > Even if your disk subsystem(*) has an NVRAM write-back cache, there is > risk of data loss unless you explicitly the fsync(2) system call. > > With Mnesia using the disk_log module, which in turn usually uses > write(2) only, you are not certain that the OS will have copied > write(2)'s data to the disk device. In most cases, the kernel can > (and will) wait for many seconds before flushing that data to the disk > device. > > SLF> But I can't find a Mnesia transaction knob/button that I can > SLF> twist/press to request that level of safety. Is there such a > SLF> thing? > > hm> No currently there are no such thing in Mnesia. > > That's what I'd thought. > > Assuming that I wanted to try to add that to Mnesia ... I think I'd > need to add extra info to the commit record that's sent to each > participant. Something that said: this log record is important enough > to use fsync after writing. Hm. > > I suppose a poor man's safety net would be to run a shell script like > this on each Mnesia node with disc_copies or disc_only_copies: > > while [ 1 ]; do > sync > sleep 1 > done > > Easy to do, doesn't require code changes, and would limit worst-case > data loss to roughly 1-2 seconds. (Assuming that disc_log and the > file Port that disc_log uses do not do any buffering.) On the other > hand, performance may suck. > > Too bad disk drives are so too darn slow. > > -Scott > > (*) Even if the disk logical device is a NVRAM/solid-state disk drive. -- Dan Gudmundsson Project: Mnesia, Erlang/OTP Ericsson Utvecklings AB Phone: +46 8 727 5762 UAB/F/P Mobile: +46 70 519 9469 S-125 25 Stockholm Visit addr: Armborstv 1 From sanjaya@REDACTED Thu Jan 26 08:46:45 2006 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Thu, 26 Jan 2006 13:46:45 +0600 Subject: early warning - new rdbms References: Message-ID: <021101c6224c$a7af9a00$5f00a8c0@wavenet.lk> Not a DB expert but below what I think :) > - I'd like to break compatibility with the old > rdbms in some respects. Is this a problem for > anyone? (speak now or forever hold your peace) OK. But better if we have easy way to tranform the old dbs in to new db format without effecting to the runtime systems. I'm targetting to something like below steps 1.) Create the New rdbms (New Format). 2.) Start the New DB in a node & some way to tell that there is a old DB to refer as well.(might be 2 mnesia versions need to run in the same time in case of incompatibility issue) 3.) Redirect all the queries to the New DB. But when queries are comming, this time it should search the New DB as well as OLD DB. Saving new data only into the new DB (and should remove the duplicate from the old DB when save is performed -- or any efficient way can be used). 4.) Start transform the old db in to new DB. (There should be a intelegent way to handle the transform as well as other queries without effecting to runtime system). 5.) After finishing the data transform, should be a way to tell that to refer only new table or it should be done automatically. 6.) Shut down the old db node & delete the old db. > - Do you have any suggestions or feature requests? Way to handle huge tables with minimum Memory (Performance in the 1st Place & 2nd the Memory requerement). > - Do you want to help out? Yes, like to help :) Sanjaya Vitharana From sam@REDACTED Wed Jan 25 18:06:24 2006 From: sam@REDACTED (Samuel Montgomery-Blinn) Date: Wed, 25 Jan 2006 12:06:24 -0500 Subject: apache and yaws In-Reply-To: References: Message-ID: <43D7B010.1040608@caveman.org> Joe Armstrong (AL/EAB) wrote: >What we currently don't have is an "enterprise yaws" (ie one that will >let multiple >users use the same yaws in a safe manner so that they can't crash each >other's applications) >nor do we have a decent template language, nor do we have Ajax things >etc. > >All of these are being worked on, and prototype solutions for safe >Erlang code within Erlang >and for various template languages are "in progress". > >Hopefully these will be in releasable shape fairly soon. > >Right now I'm finalising some wiki and template modules to add to yaws >and trying to move the entire Erlang documentation system into a >wiki + yaws + blog + forums engine. > >Cheers > >/Joe > Joe, I was interested in a good template language for Yaws and just recently asked for and received a beta Erlang "STL" implementation with tie-in to Yaws from Vladimir Sekissov (on CC), mentioned here: http://www.erlang.org/ml-archive/erlang-questions/200301/msg00104.html Assuming you might be interested and that he wouldn't mind, I have included his note to me. My apologies if Vladimir was not ready to share this unfinished work with the world, but as he has had to move onto other things: Vladimir Sekissov wrote: >sam> That is interesting, as one of my colleagues has also moved to UCW for >sam> web interfaces. I would love to take a look at what you have, because >sam> simply using Yaws itself becomes cumbersome. >sam> >sam> Thank you for the kind reply, > >The code in the attachment. > >* edit the top of Makefile >* compile >* go to wstldemo/bin > >./wstldemorc.sh start -i -d > >* point your browser to http://localhost:8000/wstldemo/ > >Some explanation of components protocol is at comments in >wst/wstl/src/wsdcomp.erl > >If you are interesting only in STL integration with Yaws look at >wst/wstl/src/stl_yaws.erl. It understand in templates not only STL but >Yaws ehtml syntax too or mix from both: >... >,*)(*, > >{ehtml, [{tr, [], [{td, [{colspan, ChLen}], Buttons}]}]} > >,*)
> >It is also valid to include ehtml dynamically in template as value of >variable. > >You can also send parameters to included templates: > >stl_yaws:include(screen, StlServ, "lib/wsform", [{'ExpOut', ExpOut1}, ...]) > >wst/wsite - is the application I wrote wstl for but it wouldn't work >because I left code in the middle of rewriting to new configuration >and authorization interfaces. It needs near a week to finish the work >but I haven't needs in this application more. > >If you'll have some questions feel free to ask me. > >Best Regards, >Vladimir Sekissov > > -------------- next part -------------- A non-text attachment was scrubbed... Name: ws.tar.gz Type: application/x-gzip Size: 250123 bytes Desc: not available URL: From eranga@REDACTED Thu Jan 26 04:04:30 2006 From: eranga@REDACTED (Eranga Udesh) Date: Thu, 26 Jan 2006 09:04:30 +0600 Subject: early warning - new rdbms In-Reply-To: Message-ID: <20060126030343.AF3922A2C3A@mail.wavenet.lk> Hi Uffe, I am seriously interested to beta-test or help with your development. I have used Mnesia in many development and production environments. Please advice the next step. Thanks, - Eranga -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Ulf Wiger (AL/EAB) Sent: Wednesday, January 25, 2006 2:46 PM To: erlang-questions@REDACTED Subject: early warning - new rdbms I thought I'd let the cat out of the bag a little... If anyone wants to beta-test or help out with some of the more advanced problems, let me know. I've come pretty far along with a new version of rdbms. It has several nice features, and I think it's about to make the transition from 'somewhat interesting' to 'actually useful': - JIT compilation of verification code. The overhead for type and bounds checking is now only a few (~5) microseconds per write operation. - The parameterized indexes that I hacked into mnesia before are now part of rdbms. This include ordered indexes and fragmented indexes (i.e. hashed on index value - so they should scale well.) - Rdbms will handle fragmented tables transparently (And actually handles plain tables with less overhead than mnesia_frag does.) The overhead for using the rdbms access module (compared to no access module) on a plain transaction is in the order of 20 microseconds on my 1 GHz SunBLADE. - Rdbms hooks into the transaction handling in such a way that it can automatically rebuild the verification code as soon as a schema transaction commits. - A readable file format for schema definitions, trying to establish a structured way to create large mnesia databases. I've also added a 'group' concept to be able to group tables into corresponding subsystems, since I thought this might be helpful in large systems. I'm planning to release rdbms with OTP R11, since it requires some changes to mnesia that (hopefully) will make it into R11. R11 is planned for May. Some of the (fairly minor) changes to mnesia so far: - The access module can hook into the transaction flow by providing callbacks for begin_activity() and end_activity(). Rdbms uses this for proper handling of abort and commit triggers as well as loop detection in referential integrity checks. It also allows rdbms to detect schema changes. - An 'on-load' hook allows rdbms to build indexes the first time a table is loaded. - A low-level access API for foreign tables. My first foreign table attempt was a 'disk_log'. It makes it possible to properly log events inside a transaction context. You also get replicated logs almost for free, as well as (if you want to) fragmented logs. (: My next attempt at a foreign table is a read- only file system (doesn't have to be read-only, but I thought I'd start with that.) Thus the experiments with converting regexps to the select pattern syntax. One interesting experiment might be to define an ISAM table type for really large ordered sets on disk. Combining it with rdbms, you can type- specify the data types and then convert to whatever format is expected by the ISAM files. Some questions to those who might be interested: - I'd like to break compatibility with the old rdbms in some respects. Is this a problem for anyone? (speak now or forever hold your peace) - Do you have any suggestions or feature requests? - Do you want to help out? Regards, Uffe From heinrich@REDACTED Thu Jan 26 09:28:39 2006 From: heinrich@REDACTED (Heinrich Venter) Date: Thu, 26 Jan 2006 10:28:39 +0200 Subject: Supervisor and large numbers of workers Message-ID: Hi all The following patch released for ejabberd recently came to my attention. https://support.process-one.net/doc/display/CONTRIBS/Supervisor+-+Perfor mance+improvement+for+dynamic+workers It basically replaces the list of processes managed by a supervisor with a dict. The reason this is important in ejabberd is because the supervisor directly handles all the processes that manage users. For a large number of users, the list becomes less effective than the dict. My question is one about OTP design. Is it better to add worker processes directly to a supervisor, especially if you know there is going to be large numbers of them, or is it better to create your own gen_server to handle the hordes of workers, and just add the gen_server to the supervisor? On the one hand it seems like a waste to write a custom gen_server since the supervisor is already meant to do that type of thing. On the other hand the supervisor seems to be meant for narrow hirarchies. Any chance of the above patch making it into the next release :) ? -]-[einrich From joe.armstrong@REDACTED Thu Jan 26 09:34:25 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Thu, 26 Jan 2006 09:34:25 +0100 Subject: Build an erlang computer (was:Computers are fast) Message-ID: This is pure lunacy - design goals 10 in http://www.w3.org/TR/2003/PER-xml-20031030/ says: " 10. Terseness in XML markup is of minimal importance. " But terseness of expression *is* important if you have lots of data, this implies that you should not use XML when there is lots of data. Using XML for voluminous data is a sure sign of bad design << in another project I pumped into, XML was being used to represent a quantity that had three discrete states. THREE STATES CAN BE REPRESENTED IN TWO BITS But they chose XML - the declaration of a single state look about 190 Bytes - and they had *lots* of records, which they stored in a big data base. Now the data base was slow, so they bought more memory, it was still slow, so they wanted to go distributed - so they asked me since "Joe knows something about distributed programming" >> Mindless use of XML is sure sign of excruciatingly bad design. >> Idea - grade moderately difficult - XML should compress very nicely - since the same tags get repeated over and over again, thus in LZSS compression duplicated tags will appear as pointers. How about writing an XML parser that works directly from an LSZZ compressed XML stream *without* doing the decompression first. If your clever and cache the result of the parses of the things that the LZSS pointer point to you might be able to write a very fast and compact parser. I will give a bottle of whisky to the first person to send me a correct Erlang program that does this. Cheers /Joe > -----Original Message----- > From: James Hague [mailto:james.hague@REDACTED] > Sent: den 25 januari 2006 19:02 > To: Joe Armstrong (AL/EAB); erlang-questions@REDACTED > Subject: Re: Build an erlang computer (was:Computers are fast) > > > In my never ending quest for inefficiency I have seldom met > a problem > > which could not be solved in the twinkling of an eye > (apart, that is, > > from our friend that wanted to do O(10^19) computations to > force some > > crypto system :-) > > How about parsing a 300+ megabyte XML file? I have a lean > and mean XML parser in Erlang, one that only deals with a > strict subset of XML, and operates entirely on binaries. On > 8 or 10 megabyte files, it's great, but on this monster--heh. > After about 30 minutes the emulator dies with "Abnormal > Termination." I suspect it's running out of memory. > > It's interesting when these kinds of crazy problems come along :) > From bengt.kleberg@REDACTED Thu Jan 26 09:49:17 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Thu, 26 Jan 2006 09:49:17 +0100 Subject: Mnesia, disk logging, and synchronous disk logging In-Reply-To: <200601252154.k0PLsFn1012608@snookles.snookles.com> References: <200601252154.k0PLsFn1012608@snookles.snookles.com> Message-ID: <43D88D0D.1050705@ericsson.com> On 2006-01-25 22:54, Scott Lystig Fritchie wrote: ...deleted > Even if your disk subsystem(*) has an NVRAM write-back cache, there is > risk of data loss unless you explicitly the fsync(2) system call. if you are running linux also remember this: ''The Linux fsync man page says: "It does not necessarily ensure that the entry in the directory containing the file has also reached disk. For that an explicit fsync on the file descriptor of the directory is also needed."'' (http://archives.postgresql.org/pgsql-hackers/2004-10/msg01037.php) bengt From vlad_dumitrescu@REDACTED Thu Jan 26 10:38:13 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Thu, 26 Jan 2006 10:38:13 +0100 Subject: Build an erlang computer (was:Computers are fast) In-Reply-To: Message-ID: Hi Joe, > How about writing an XML parser that works directly from > an LSZZ compressed XML stream > *without* doing the decompression first. I suppose you mean "without decompressing the *whole* stream first", right? If it can be done without decompressing at all, I think that only one bottle is _way_ too small a reward ;-) Regards, /Vlad From rasmussen.bryan@REDACTED Thu Jan 26 10:57:08 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Thu, 26 Jan 2006 10:57:08 +0100 Subject: apache and yaws In-Reply-To: References: Message-ID: <3bb44c6e0601260157j361190a1q67dc568d04c334a@mail.gmail.com> I agree that making it all in erlang would be preferable. That said what other things are big in the apache space? For me their xml tools are quite useful, especially Cocoon, Cocoon is a hell of a good xml based framework. http://cocoon.apache.org/ The main thing that makes cocoon powerful is pipelines. (reasonable online powerpoint slide http://www.pankaj-k.net/uc2/sld008.htm) Basically this is another of one those 'java is nondynamic so we will use an xml based dsl' approaches, one writes up a pipeline definition in an xml document that is used to match xml inputs to transformations, validations etc. and define output serialization - http://www.xml.com/pub/a/2003/04/23/cocoon-magazine.html actually it seems to me that erlang would blow cocoon out of the water on this. On 1/25/06, Joe Armstrong (AL/EAB) wrote: > > Absolutely, though I see no reason for the "must" in our statement > "the must be things it (Apache) does better than yaws" > > Now Apache does things that yaws does not do at all - but > when you can get Apache and yaws to do the same thing (like serving up > dynamic content) yaws seems to outperform Apache. > > I guess we could ask - what features are missing from yaws that have > proved to be > useful in Apache - and then set about and implement them. > > Apart form that I haven't quite understood why a server must be a server > for ONE > thing. Why do we have FTP servers, HTTP servers, email server, etc. > > Why not a universal server, with an FTP plugin, and HTTP plugin, etc. > (( I built one of these a while back :-)) - it was just an empty server > that did nothing - the only thing you could do with it was to sent it > code, and then it became whatever the code you sent it told it to do. > > So you could send it code meaning "become an FTP server" and it then was > an FTP server ... > > As regards Apache, I'd like to broaden the scope. > > > Here's the plan. > > Replace Apache + MySQL + PHP with > Yaws + Mnesia + Erlang > > Why? > > Yaws outperforms Apache > Mnesia outperforms MySQL > Erlang outperforms PHP > > << I could add lots of footnotes here, since these statements need some > qualifying, ie mnesia is better than SQL for real-time lookups, yaws > better than apache > under overload conditions etc. Erlang seems to outperform PHP for > everything :-) >> > > Also, and more importantly, *the bits fit together properly* - ie there > is no semantic gap between Yaws/mnesia/PHP. > > To make an Apache, MySQL, PHP application you have to learn three, > (yes you heard me right, three) different languages and sets of > configuration files. > > This is *painful* there are even entire BOOKs devoted to setting up > Apache, MySQL and PHP. > > What should be a *trivial* operation of making a web sever work > together with a database and a scripting language becomes an > nightmare exercise of fitting different versions of things together. > > I tried this once - it was terrible. You have to get exactly the right > versions of everything and mess around editing things for ages, until it > finally > works - no wonder these things come pre-installed or as add-on packages > in every > half decent OS release - doing it yourself is a bummer. > > Now the Yaws-mnesia-Erlang install is a *lot* easier. > > Make Erlang work. Take the yaws tarball, unpack, run. > > Making it into a system daemon is a bit more tricky - 20 mins or so. > > Now the nice thing about the yaws/mnesia/Erlang setup is the conceptual > framework - THE BITS FIT TOGETHER - I cannot overstress this point > (it's called conceptual integrity). > > What we currently don't have is an "enterprise yaws" (ie one that will > let multiple > users use the same yaws in a safe manner so that they can't crash each > other's applications) > nor do we have a decent template language, nor do we have Ajax things > etc. > > All of these are being worked on, and prototype solutions for safe > Erlang code within Erlang > and for various template languages are "in progress". > > Hopefully these will be in releasable shape fairly soon. > > Right now I'm finalising some wiki and template modules to add to yaws > and trying to move the entire Erlang documentation system into a > wiki + yaws + blog + forums engine. > > Cheers > > /Joe > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED] On Behalf Of bryan > > rasmussen > > Sent: den 25 januari 2006 13:46 > > To: erlang-questions@REDACTED > > Subject: apache and yaws > > > > Hi, > > > > A lot of people have referenced the apache vs. yaws > > discussion over the years, what I'm wondering about is Apache > > and Yaws. Has anyone thought of any particular integration > > scenarios between these two. I have to admit I haven't > > either, but I would think that despite the scalability of > > yaws that Apache's list of components are impressive, there > > must be things it does better than Yaws. > > > > Any ideas? > > > > Cheers, > > Bryan Rasmussen > > > From xpdoka@REDACTED Thu Jan 26 11:14:31 2006 From: xpdoka@REDACTED (Dominic Williams) Date: Thu, 26 Jan 2006 11:14:31 +0100 (CET) Subject: Software life cycle in Erlang In-Reply-To: <07d101c621b9$57a40070$4a00a8c0@Inswitch251> References: <07d101c621b9$57a40070$4a00a8c0@Inswitch251> Message-ID: <21574.212.155.207.253.1138270471.squirrel@www.geekisp.com> Hello Eduardo, > What do you think would be the right values for > Analisys, Design, Implementation and Testing phases? I think the right value is "I don't know". Being able to measure distinct proportions of these activities implies that they are being performed too far apart (in time or in space). Regards, Dominic Williams http://www.dominicwilliams.net ---- From joe.armstrong@REDACTED Thu Jan 26 11:30:14 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Thu, 26 Jan 2006 11:30:14 +0100 Subject: [Off-topic] Re: Build an erlang computer (was:Computers are fast) Message-ID: > Joe Armstrong (AL/EAB) wrote: > > I'd like to optimize for > > > > - compiling programs with a few hundred source code files > > - making a high performance web server > > > > Where is my money better spent? > > > > A cheapish processor with as much memory as possible > > Say a Athlon 64 3000+ 2GHz 512KB cache at 1295 kr > > With 4 G memory (about 1000 kr/G) > > > > Or the cheapest dual core Athlon 64 X2 3800+ 2GH 1MB = 3250kr > > With 2 G memory > > > > In the old days I always said that buying more memory was > better than > > buying a faster processor - is this still true? - also what is the > > effect of increasing the size of the processor cache contra > more main > > memory for the same money? > > For the sake of argument, suppose that the dual core would do > everything twice as fast (it certainly won't do better). This > will not result in a 2x perceived increase in performance, > since most of the things that are being done twice as fast > took imperceptible time to begin with. > > It is more effective to remove situations that cause > pathologically bad performance -- that is, performance so bad > that just doubling the speed won't fix it. One such situation > is virtual memory thrashing. The 4G box will be able to do > more before running into this problem (and the 64-bit address > space allows you to actually make use of 4G). Good point - I was thinking of the following strategy: Buy a cheapish processor (not dual core) and 2 G memory upgrade 1 - If not fast enough add 2 G more memory upgrade 2 - In 18 months change to dual core which will now be cheap Upgrade 1 might not be necessary Next question - when will I notice the difference in a 512K v. 1M processor cache I guess the *only* application that is pathologically bad is video transcoding I'm assuming this is CPU limited and that the 1M cache is better. Next question - do the different motherboard chipsets really make much difference to performance? /Joe > > -- > David Hopwood > > From gefla@REDACTED Thu Jan 26 11:42:01 2006 From: gefla@REDACTED (Gerd Flaig) Date: Thu, 26 Jan 2006 11:42:01 +0100 Subject: Build an erlang computer References: Message-ID: <87lkx3z2x2.fsf@kilo.pond.sub.org> "Joe Armstrong \(AL/EAB\)" writes: > Question: Is there a simple program to make main memory totally > unavailable in my linux system? - I'd like to boot the system > saying "use only 100K of memory" or "use only 200K or memory" > (I currently have 512K) so I can measure the effect of different > memory sizes on performance. 512k, that reminds me of my Amiga days. ;) You can use the kernel command line arguments for this, boot e.g. with mem=128M or mem=64M. If you don't want to reboot your main system, you might try virtualization with User Mode Linux, Xen or the like. Another approach would be to lock portions of memory into RAM using mlock(2) or mlockall(2). Goodbyte, Gerd. -- The last thing one knows in constructing a work is what to put first. -- Blaise Pascal From zoltan.podlovics@REDACTED Thu Jan 26 12:03:28 2006 From: zoltan.podlovics@REDACTED (Zoltan Podlovics) Date: Thu, 26 Jan 2006 12:03:28 +0100 Subject: Build an erlang computer (was:Computers are fast) In-Reply-To: References: Message-ID: <43D8AC80.2090805@gmail.com> James Hague wrote: > How about parsing a 300+ megabyte XML file? I have a lean and mean > XML parser in Erlang, one that only deals with a strict subset of XML, > and operates entirely on binaries. On 8 or 10 megabyte files, it's > great, but on this monster--heh. After about 30 minutes the emulator > dies with "Abnormal Termination." I suspect it's running out of > memory. > > It's interesting when these kinds of crazy problems come along :) > You should consider the non-extractive way of XML processing. Using Virtual Token Descriptor ( http://vtd-xml.sf.net ) in an XML messaging system would be a huge advantage because you can send the XML data and the VTD (parsing information) data together in binary form. Regards, Zoltan From ewan_higgs@REDACTED Thu Jan 26 12:59:49 2006 From: ewan_higgs@REDACTED (Ewan Higgs) Date: Thu, 26 Jan 2006 11:59:49 +0000 (GMT) Subject: Compressed XML (was: Build an erlang computer (was:Computers are fast)) In-Reply-To: Message-ID: <20060126115949.27332.qmail@web27006.mail.ukl.yahoo.com> --- "Joe Armstrong (AL/EAB)" wrote: > How about writing an XML parser that works > directly from an LSZZ > compressed XML stream > *without* doing the decompression first. If your > clever and cache the > result of the parses > of the things that the LZSS pointer point to you > might be able to write > a very fast and compact parser. I don't know about LSZZ, but I know Zip (RFC 1950 [1]) is iterative so if you have an erlang binding[2] you can make a process that repeatedly reads chunks of the file and inflates and then passes it to the xml parsing process[3]. > I will give a bottle of whisky to the first > person to send me a > correct Erlang program that does this. If the above helps you write it in a trivial amount of time, can I claim the prize? :D Warm regards, Ewan [1] http://www.faqs.org/rfcs/rfc1950.html [2] http://cvs.sourceforge.net/viewcvs.py/jungerl/jungerl/lib/zlib/src/zlib.erl?rev=1.2&view=auto [3] A slightly jiggied version of your own xml parsing library will work fine: http://www.sics.se/~joe/ericsson/xml/xml.html ___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com From martin@REDACTED Thu Jan 26 13:14:23 2006 From: martin@REDACTED (Martin Carlson) Date: Thu, 26 Jan 2006 12:14:23 +0000 Subject: Software life cycle in Erlang In-Reply-To: <20060125151953.31201.qmail@web34403.mail.mud.yahoo.com> References: <20060125151953.31201.qmail@web34403.mail.mud.yahoo.com> Message-ID: <078733eb5615aabccd0d90d942722d00@erlang-consulting.com> I would say it hate to do with the preconditions, is there a spec (the optimistic approach..)? in that case what kind of spec you got, what are the requirements, are there any high risk requirements and so on. In any case an iterative model is proven to be very flexible productive. Have a look at Fowlers page, lots of info. Some pointers though: Scrum: http://www.controlchaos.com TTD: http://www.erlang-consulting.com/about_fs.html General agile stuff: http://www.martinfowler.com ---------------------------------------------- Martin Carlson http://www.erlang-consulting.com On Jan 25, 2006, at 3:19 PM, Thomas Lindgren wrote: > > > --- "Eduardo Figoli (INS)" > wrote: >> I'm trying to figure out the best model for software >> development in Erlang. > > The best _model_ seems to be iterative development of > some sort, perhaps test driven. AXD 301 had great > success with steadily improving "increments", to take > one of the great success stories. > > Taking a number like 35% for implementation means your > whole project is done about 50% faster (in 2/3 the > time) even if the language permits infinitely faster > development than the state of the art, simply because > the rest of the phases aren't concerned with > programming. (That's the usual argument against > switching programming languages, of course.) This > doesn't seem right -- the added flexibility also means > you can use powerful new development processes. > > My recommendation: try to "switch to better rules". > > Best, > Thomas > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com From chsu79@REDACTED Thu Jan 26 14:00:25 2006 From: chsu79@REDACTED (Christian S) Date: Thu, 26 Jan 2006 14:00:25 +0100 Subject: apache and yaws In-Reply-To: <3bb44c6e0601260157j361190a1q67dc568d04c334a@mail.gmail.com> References: <3bb44c6e0601260157j361190a1q67dc568d04c334a@mail.gmail.com> Message-ID: One could have apache relay requests to yaws through fastcgi. I dont think yaws support fastcgi as it is now. The approach allows one to get world domination in small steps for existing installations and in a future make apache redundant. 2006/1/26, bryan rasmussen : > > I agree that making it all in erlang would be preferable. That said > what other things are big in the apache space? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rasmussen.bryan@REDACTED Thu Jan 26 14:13:25 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Thu, 26 Jan 2006 14:13:25 +0100 Subject: Compressed XML (was: Build an erlang computer (was:Computers are fast)) In-Reply-To: <20060126115949.27332.qmail@web27006.mail.ukl.yahoo.com> References: <20060126115949.27332.qmail@web27006.mail.ukl.yahoo.com> Message-ID: <3bb44c6e0601260513r31243dfagcb69e58e44645c9d@mail.gmail.com> > > I don't know about LSZZ, but I know Zip (RFC 1950 [1]) > is iterative so if you have an erlang binding[2] you > can make a process that repeatedly reads chunks of the > file and inflates and then passes it to the xml > parsing process[3]. > Hmm, a compressed stream-based xml parser, was there a compressed sax parser at some point? well, found this http://www.w3.org/2003/08/binary-interchange-workshop/33-HiT-W3C-Workshop-2003.pdf that's pretty cool. From francesco@REDACTED Thu Jan 26 14:56:35 2006 From: francesco@REDACTED (Francesco Cesarini (Erlang Consulting)) Date: Thu, 26 Jan 2006 13:56:35 +0000 Subject: Software life cycle in Erlang Message-ID: The correct link (I promise, we are getting rid of the frames soon!!) to the Test Driven Development thesis is http://www.erlang-consulting.com/thesis/test_driven_erlang.html TDD proved to be the best approach. Francesco -- http://www.erlang-consulting.com >-----Original Message----- >From: Martin Carlson [mailto:martin@REDACTED] >Sent: Thursday, January 26, 2006 12:14 PM >To: erlang-questions@REDACTED >Subject: Re: Software life cycle in Erlang > > >I would say it hate to do with the preconditions, is there a spec (the >optimistic approach..)? in that case what kind of spec you got, what >are the requirements, are there any high risk requirements and so on. >In any case an iterative model is proven to be very flexible >productive. Have a look at Fowlers page, lots of info. > >Some pointers though: > >Scrum: http://www.controlchaos.com >TTD: http://www.erlang-consulting.com/about_fs.html >General agile stuff: http://www.martinfowler.com > >---------------------------------------------- >Martin Carlson >http://www.erlang-consulting.com > >On Jan 25, 2006, at 3:19 PM, Thomas Lindgren wrote: > >> >> >> --- "Eduardo Figoli (INS)" >> wrote: >>> I'm trying to figure out the best model for software >>> development in Erlang. >> >> The best _model_ seems to be iterative development of >> some sort, perhaps test driven. AXD 301 had great >> success with steadily improving "increments", to take >> one of the great success stories. >> >> Taking a number like 35% for implementation means your >> whole project is done about 50% faster (in 2/3 the >> time) even if the language permits infinitely faster >> development than the state of the art, simply because >> the rest of the phases aren't concerned with >> programming. (That's the usual argument against >> switching programming languages, of course.) This >> doesn't seem right -- the added flexibility also means >> you can use powerful new development processes. >> >> My recommendation: try to "switch to better rules". >> >> Best, >> Thomas >> >> >> __________________________________________________ >> Do You Yahoo!? >> Tired of spam? Yahoo! Mail has the best spam protection around >> http://mail.yahoo.com > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From auxsoft@REDACTED Thu Jan 26 15:24:21 2006 From: auxsoft@REDACTED (Bernardo Signori) Date: Thu, 26 Jan 2006 11:24:21 -0300 Subject: apache and yaws In-Reply-To: References: <3bb44c6e0601260157j361190a1q67dc568d04c334a@mail.gmail.com> Message-ID: On 1/26/06, Christian S wrote: > One could have apache relay requests to yaws through fastcgi. I dont think > yaws support > fastcgi as it is now. The approach allows one to get world domination in > small steps for > existing installations and in a future make apache redundant. > I think the more common approach for using apache as a front end to other web servers is through mod_proxy (http://httpd.apache.org/docs/2.0/mod/mod_proxy.html), perhaps in combination with mod_rewrite. For example you could serve the static pages with apache. -- Bernardo From ke.han@REDACTED Thu Jan 26 16:21:55 2006 From: ke.han@REDACTED (ke.han) Date: Thu, 26 Jan 2006 23:21:55 +0800 Subject: early warning - new rdbms In-Reply-To: References: Message-ID: <43D8E913.3040605@redstarling.com> Ulf, I am two weeks away from v1.0 of an app for a client. It uses mnesia, yaws, ajax. I would love to review what you have to apply it to the next version. My plan is to pull together a simple framework based on mnesia, ajax/json, plain_fsm (your latest one), and yaws to take things a level or two of maintainability beyond what I've done in version 1 of this app. thanks for putting me on the beta group. ke han Ulf Wiger (AL/EAB) wrote: > I thought I'd let the cat out of the bag a little... > > If anyone wants to beta-test or help out with some > of the more advanced problems, let me know. > > > I've come pretty far along with a new version of > rdbms. It has several nice features, and I think > it's about to make the transition from 'somewhat > interesting' to 'actually useful': > > - JIT compilation of verification code. The overhead > for type and bounds checking is now only a few (~5) > microseconds per write operation. > - The parameterized indexes that I hacked into mnesia > before are now part of rdbms. This include ordered > indexes and fragmented indexes (i.e. hashed on > index value - so they should scale well.) > - Rdbms will handle fragmented tables transparently > (And actually handles plain tables with less overhead > than mnesia_frag does.) The overhead for using the > rdbms access module (compared to no access module) > on a plain transaction is in the order of 20 > microseconds on my 1 GHz SunBLADE. > - Rdbms hooks into the transaction handling in such a > way that it can automatically rebuild the verification > code as soon as a schema transaction commits. > - A readable file format for schema definitions, trying > to establish a structured way to create large mnesia > databases. I've also added a 'group' concept to be > able to group tables into corresponding subsystems, > since I thought this might be helpful in large > systems. > > > I'm planning to release rdbms with OTP R11, since it > requires some changes to mnesia that (hopefully) will > make it into R11. R11 is planned for May. > > Some of the (fairly minor) changes to mnesia so far: > > - The access module can hook into the transaction > flow by providing callbacks for begin_activity() > and end_activity(). Rdbms uses this for proper > handling of abort and commit triggers as well as > loop detection in referential integrity checks. > It also allows rdbms to detect schema changes. > - An 'on-load' hook allows rdbms to build indexes > the first time a table is loaded. > - A low-level access API for foreign tables. My > first foreign table attempt was a 'disk_log'. > It makes it possible to properly log events > inside a transaction context. You also get > replicated logs almost for free, as well as > (if you want to) fragmented logs. (: > My next attempt at a foreign table is a read- > only file system (doesn't have to be read-only, > but I thought I'd start with that.) Thus > the experiments with converting regexps to > the select pattern syntax. > > One interesting experiment might be to define > an ISAM table type for really large ordered sets > on disk. Combining it with rdbms, you can type- > specify the data types and then convert to > whatever format is expected by the ISAM files. > > Some questions to those who might be interested: > > - I'd like to break compatibility with the old > rdbms in some respects. Is this a problem for > anyone? (speak now or forever hold your peace) > - Do you have any suggestions or feature requests? > - Do you want to help out? > > Regards, > Uffe > From ulf.wiger@REDACTED Thu Jan 26 18:10:50 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 26 Jan 2006 18:10:50 +0100 Subject: early warning - new rdbms Message-ID: ke.han wrote: > > I am two weeks away from v1.0 of an app for a client. It > uses mnesia, yaws, ajax. I would love to review what you > have to apply it to the next version. Noted. I was pleasantly surprised that so many wanted to help out. I will get back to you shortly. /Uffe From david.nospam.hopwood@REDACTED Thu Jan 26 18:34:08 2006 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Thu, 26 Jan 2006 17:34:08 +0000 Subject: "Terseness in XML markup is of minimal importance" In-Reply-To: References: Message-ID: <43D90810.1050206@blueyonder.co.uk> Joe Armstrong (AL/EAB) wrote: > This is pure lunacy - design goals 10 in > http://www.w3.org/TR/2003/PER-xml-20031030/ > says: > > " 10. Terseness in XML markup is of minimal importance. " > > But terseness of expression *is* important if you have lots of data, > this implies > that you should not use XML when there is lots of data. > > Using XML for voluminous data is a sure sign of bad design > > << in another project I pumped into, XML was being used to represent > a quantity that had three discrete states. > > THREE STATES CAN BE REPRESENTED IN TWO BITS > > But they chose XML - the declaration of a single state look about > 190 Bytes - and they had *lots* of records, which they stored in a > big data base. > > Now the data base was slow, so they bought more memory, it was > still slow, > so they wanted to go distributed - so they asked me since "Joe > knows something about > distributed programming" >> > > Mindless use of XML is sure sign of excruciatingly bad design. > >> > > Idea - grade moderately difficult - XML should compress very nicely - > since the same tags get repeated over and over again, thus in LZSS > compression duplicated tags will appear as pointers. Duplicated byte strings will appear as pointers, but these will usually not start and end at boundaries of duplicated tags. In general I think this *kind* of idea for how to work around problems with XML (for example) by making things even more complicated, is part of the problem. Why can't we just point and laugh at the silly people who are designing systems that use 300+ MByte XML files? -- David Hopwood From kruegger@REDACTED Thu Jan 26 19:29:29 2006 From: kruegger@REDACTED (Stephen Han) Date: Thu, 26 Jan 2006 10:29:29 -0800 Subject: LYME (RE: apache and yaws) In-Reply-To: <8ed733900601250850y2d514aaaj997bfcc2dbe5dd3a@mail.gmail.com> References: <20060125150650.26613.qmail@web34403.mail.mud.yahoo.com> <8ed733900601250850y2d514aaaj997bfcc2dbe5dd3a@mail.gmail.com> Message-ID: <86f1f5350601261029r7081060aga9f97f6f356280cb@mail.gmail.com> Mac is too expensive :-) Cheaper it gets the more people will use. How about, JEMY: JS + Erlang + Mnesia + Yaws. I am referring JS module in Jungerl. OS really doesn't matter since we know it runs on all those popular OSes. Even though I am telco sw engineer but my instinct tell me, without AJAX support, the erlang and yaws will remain as the way they are. (maybe we should call it, AeMY instead) Even though Erlang was created to make telco engineers happy in mind, perhaps the emerging of the data services in wireless communication forces Erlang to change its audience to IT people. Erl4ever! On 1/25/06, Simon Chappell wrote: > > Or perhaps YEMM: Yaws + Erlang + Mnesia + Mac? > > > On 1/25/06, Thomas Lindgren wrote: > > > > > > --- "Joe Armstrong (AL/EAB)" > > wrote: > > > > > Replace Apache + MySQL + PHP with > > > Yaws + Mnesia + Erlang > > > > The final piece, to build/generate/make/... linux > > daemons, doesn't sound too hard. > > > > We then get a LYME stack: Linux + Yaws + Mnesia + > > Erlang > > Hey cool. Turn off the LAMP; have a LYME. > > > > Best, > > Thomas > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > > -- > www.simonpeter.org > uab.blogspot.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyberdanx@REDACTED Thu Jan 26 20:25:43 2006 From: cyberdanx@REDACTED (Chris Campbell) Date: Thu, 26 Jan 2006 19:25:43 +0000 Subject: how to download jungerl as whole? In-Reply-To: References: Message-ID: Hi, Is the following correct for checking out jungerl? cvs -d:pserver:anonymous@REDACTED:/cvsroot/jungerl login - no password cvs -z3 -d:pserver:anonymous@REDACTED:/cvsroot/jungerl co jungerl This fails at login here. It never returns. Any ideas? From ulf@REDACTED Thu Jan 26 22:19:09 2006 From: ulf@REDACTED (Ulf Wiger) Date: Thu, 26 Jan 2006 22:19:09 +0100 Subject: early warning - new rdbms In-Reply-To: <021101c6224c$a7af9a00$5f00a8c0@wavenet.lk> References: <021101c6224c$a7af9a00$5f00a8c0@wavenet.lk> Message-ID: Den 2006-01-26 08:46:45 skrev Sanjaya Vitharana : > Not a DB expert but below what I think :) > >> - I'd like to break compatibility with the old >> rdbms in some respects. Is this a problem for >> anyone? (speak now or forever hold your peace) > > OK. But better if we have easy way to tranform the old dbs in to new db > format without effecting to the runtime systems. That's actually not so difficult. I have changed how some of the metadata is represented. This is not so difficult to handle. I will also remove some functions that I think were a bad idea to begin with, and I will also change the 'NULL' value to 'undefined', even though I don't particularly like the idea (Erlang should have proper NULLs). >> - Do you have any suggestions or feature requests? > > Way to handle huge tables with minimum Memory > (Performance in the 1st Place & 2nd theMemory requerement). I think a berkeley_db table type might fit the bill here. /Uffe -- Ulf Wiger From thomaswhitcomb@REDACTED Thu Jan 26 22:34:31 2006 From: thomaswhitcomb@REDACTED (Tom Whitcomb) Date: Thu, 26 Jan 2006 16:34:31 -0500 Subject: Software life cycle in Erlang Message-ID: <78062C5B.519C81E0.72A78FD1@netscape.net> I find that erlang is extremely well suited to an iterative,incremental (XP) development model. Focus on delivering business valuable stories in short iterations using the practices of TDD, refactoring and YAGNI Yes, erlang's functional orientation makes TDD very effective, but the all important neccessity of "refactoring the code base" across iterations is made cleaner and easier by erlang's declarative nature and simplifying capabilities provided via pattern matching, message passing and high-level language constructs. Erlang aligns well with the basic iterative development practives and just plain makes development easier, more productive and more fun. Erlang rocks and there is a great story for using Erlang and XP! tom "Francesco Cesarini (Erlang Consulting)" wrote: >The correct link (I promise, we are getting rid of the frames soon!!) to the Test Driven Development thesis is >http://www.erlang-consulting.com/thesis/test_driven_erlang.html >TDD proved to be the best approach. > >Francesco >-- >http://www.erlang-consulting.com > >>-----Original Message----- >>From: Martin Carlson [mailto:martin@REDACTED] >>Sent: Thursday, January 26, 2006 12:14 PM >>To: erlang-questions@REDACTED >>Subject: Re: Software life cycle in Erlang >> >> >>I would say it hate to do with the preconditions, is there a spec (the >>optimistic approach..)? in that case what kind of spec you got, what >>are the requirements, are there any high risk requirements and so on. >>In any case an iterative model is proven to be very flexible >>productive. Have a look at Fowlers page, lots of info. >> >>Some pointers though: >> >>Scrum: http://www.controlchaos.com >>TTD: http://www.erlang-consulting.com/about_fs.html >>General agile stuff: http://www.martinfowler.com >> >>---------------------------------------------- >>Martin Carlson >>http://www.erlang-consulting.com >> >>On Jan 25, 2006, at 3:19 PM, Thomas Lindgren wrote: >> >>> >>> >>> --- "Eduardo Figoli (INS)" >>> wrote: >>>> I'm trying to figure out the best model for software >>>> development in Erlang. >>> >>> The best _model_ seems to be iterative development of >>> some sort, perhaps test driven. AXD 301 had great >>> success with steadily improving "increments", to take >>> one of the great success stories. >>> >>> Taking a number like 35% for implementation means your >>> whole project is done about 50% faster (in 2/3 the >>> time) even if the language permits infinitely faster >>> development than the state of the art, simply because >>> the rest of the phases aren't concerned with >>> programming. (That's the usual argument against >>> switching programming languages, of course.) This >>> doesn't seem right -- the added flexibility also means >>> you can use powerful new development processes. >>> >>> My recommendation: try to "switch to better rules". >>> >>> Best, >>> Thomas >>> >>> >>> __________________________________________________ >>> Do You Yahoo!? >>> Tired of spam? Yahoo! Mail has the best spam protection around >>> http://mail.yahoo.com >> >> > > __________________________________________________________________ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp From Bruce@REDACTED Thu Jan 26 23:58:47 2006 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Fri, 27 Jan 2006 11:58:47 +1300 Subject: how to download jungerl as whole? In-Reply-To: References: Message-ID: <43D95427.6000806@Fitzsimons.org> Chris Campbell wrote: > Hi, > > Is the following correct for checking out jungerl? > > cvs -d:pserver:anonymous@REDACTED:/cvsroot/jungerl login > - no password > cvs -z3 -d:pserver:anonymous@REDACTED:/cvsroot/jungerl co jungerl > > This fails at login here. It never returns. Any ideas? > Yes it is. SF have been having quite a few problems, for quite a while, with stability of their servers. I did the same thing last night (NZT) for yaws and jungerl and had to attempt the login >10 times. The difference between bad password and other error (overload? it isn't clear) is that you do get told if your login attempt was incorrect rather than just the socket closing. SF: It's free, it's quite full-featured, but it ain't always 100% reliable. Cheers, Bruce From tobbe@REDACTED Fri Jan 27 01:59:59 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Fri, 27 Jan 2006 01:59:59 +0100 Subject: Vi mode for Erlang Message-ID: Hi dear vi users ! I wonder if there exist some sort of vi mode for Erlang that indents the code in the same way as the Emacs mode for Erlang ? Cheers, Tobbe From ernie.makris@REDACTED Fri Jan 27 02:36:10 2006 From: ernie.makris@REDACTED (Ernie Makris) Date: Thu, 26 Jan 2006 20:36:10 -0500 Subject: Vi mode for Erlang In-Reply-To: References: Message-ID: <43D9790A.4070209@comcast.net> There exists an erlang mode built into gvim on my fedora installations. You may want to check that out. Torbjorn Tornkvist wrote: > Hi dear vi users ! > > I wonder if there exist some sort of vi mode for Erlang > that indents the code in the same way as the Emacs mode > for Erlang ? > > Cheers, Tobbe > > From sam@REDACTED Fri Jan 27 04:18:29 2006 From: sam@REDACTED (Samuel Montgomery-Blinn) Date: Thu, 26 Jan 2006 22:18:29 -0500 Subject: Erlang crypt and Javascript Message-ID: <43D99105.701@caveman.org> Are there any known Javascript encryption libraries that provide compatible implementations with Erlang's crypt module? I'm having a terrible time with the half-dozen Javascript implementations I've tried, from Blowfish, AES, etc. This is for encrypting/decrypting the TCP socket traffic between an AFLAX (aflax.org) socket (Flash ActionScript XMLSocket) and an Erlang tcp server. -Sam From ok@REDACTED Fri Jan 27 05:31:19 2006 From: ok@REDACTED (Richard A. O'Keefe) Date: Fri, 27 Jan 2006 17:31:19 +1300 (NZDT) Subject: Build an erlang computer (was:Computers are fast) Message-ID: <200601270431.k0R4VJAW009385@atlas.otago.ac.nz> "Joe Armstrong \(AL/EAB\)" wrote: [Using XML for voluminous data] is pure lunacy There's a student records protocol designed by someone in a goverment department here; I have a copy of the spec. They use XML. They use XML badly. (With just a little redesign, I was able to reduce the size of the average message by about a factor of two, not that anyone was interested, of course. People just don't use attributes enough.) And they specify badly, no schema information of any kind (not just no Schema and no DTD, but not even an *informal* schema). Idea - grade moderately difficult - XML should compress very nicely - since the same tags get repeated over and over again, thus in LZSS compression duplicated tags will appear as pointers. It does. See XMill, by Dan Suciu, AT&T Labs Research, Florham Park, suciu@REDACTED Hartmut Liefke, Univ. of Pennsylvania, Philadelphia, liefke@REDACTED Shakespeare's "Timon of Athens" 177 kB in XML (Bosak's XML version) 150 kB in SGML (Bosak's original SGML version) 121 kB in SGML (same structure, with , , and implied, shortened to , and shortened to ) 110 kB as TEXT (plain text stripped out of XML version) 47 kB in XMill (compression of 3.74 relative to XML) 49 kB XML + gzip -9 (Bosak's) 48 kB SGML + gzip -9 (Bosak's) 48 kB XMill + gzip -9 (yep, gzip made this one bigger) 46 kB SGML + gzip -9 (my briefer SGML) 45 kB TEXT + gzip -9 (plain text) 37 kB XML + bzip2 -9 (Bosak's, a factor of 4.8) 37 kB SGML + bzip2 -9 (Bosak's, a factor of 4.1) 36 kB SGML + bzip2 -9 (my briefer SGML, a factor of 3.3) 36 kB TEXT + bzip2 -9 (plain text, a factor of 3.0) 40 kB Xbmill (Bosak's XML + xbmill, a factor of 4.4) This is an example which is pretty heavy on text: Bosak's XML markup adds 61%; Bosak's SGML markup adds 37%; briefer SGML markup adds 10% (where "briefer" does NOT mean "expressing less structure"; the XML, SML, and briefer SGML versions all have the *same* logical structure). Even so, we see that it does compress pretty well. In fact, using bzip2, the compressed XML is very little larger than the compressed plain text! XMill can be told to use multiple "containers", which elements (via a path) to put in which containers, and what compression scheme to use for each container, and you can apparently plug your own compressors in, although I've never done that. How about writing an XML parser that works directly from an LSZZ compressed XML stream *without* doing the decompression first. This is effectively what xdemill (xbdemill) does. The compression phase stores a (compressed) representation of the tree structure, separate from the compressed representation of the text. All of Bosak's XML Shakespeare in one file with ... wrapped around them: parse using nsgmls with ESIS output to /dev/null 3.3 sec parse using SWI's sgml, output ditto 3.6 sec parse using my XML parser 'qh', output ditto 0.6 sec decompress plays.xmi using xdemill, xml out to /dev/null 0.6 sec qh doesn't recognise DTDs; with that deficiency it's the fastest XML parser I've ever come across. So xdemill is doing pretty well. If you're clever and cache the result of the parses of the things that the LZSS pointer point to you might be able to write a very fast and compact parser. The really clever thing to do is to do the parsing as part of compression so that the decompressor has to do very little work to build the structure. In a general context, this is particularly nice, because you can recover the structure, then decompress the text parts *lazily*, so the parts you are interested in never do get decompressed. Someone else originally asked: > How about parsing a 300+ megabyte XML file? I have a lean > and mean XML parser in Erlang, one that only deals with a > strict subset of XML, and operates entirely on binaries. On > 8 or 10 megabyte files, it's great, but on this monster--heh. > After about 30 minutes the emulator dies with "Abnormal > Termination." I suspect it's running out of memory. On the same 500MHz 500MB machine where I did the timing tests above, qh parses a 300MB XML file in 21 seconds, about 1/3 of which is I/O. For things like this an Erlang parser is *never* going to match C, so there really is a very strong argument for parsing the XML in another process and just sending the interesting bits or summaries to Erlang. From ryanobjc@REDACTED Fri Jan 27 08:35:23 2006 From: ryanobjc@REDACTED (Ryan Rawson) Date: Thu, 26 Jan 2006 23:35:23 -0800 Subject: Software life cycle in Erlang In-Reply-To: <78062C5B.519C81E0.72A78FD1@netscape.net> References: <78062C5B.519C81E0.72A78FD1@netscape.net> Message-ID: <78568af10601262335t400a80e6h4baa5909fcdab94e@mail.gmail.com> Erlang - who uses it for enterprise development? I'm just starting out my own prototype project. I'm using the 'hero model'. Considering that I'm bringing up a new language and technology at my company, I think it's the right approach :-) Regards, -ryan On 1/26/06, Tom Whitcomb wrote: > I find that erlang is extremely well suited to an iterative,incremental (XP) development model. > > Focus on delivering business valuable stories in short iterations using the practices of TDD, refactoring and YAGNI > > Yes, erlang's functional orientation makes TDD very effective, but the all important neccessity of "refactoring the code base" across iterations is made cleaner and easier by erlang's declarative nature and simplifying capabilities provided via pattern matching, message passing and high-level language constructs. > > Erlang aligns well with the basic iterative development practives and just plain makes development easier, more productive and more fun. > > Erlang rocks and there is a great story for using Erlang and XP! > > tom > > > "Francesco Cesarini (Erlang Consulting)" wrote: > > >The correct link (I promise, we are getting rid of the frames soon!!) to the Test Driven Development thesis is > >http://www.erlang-consulting.com/thesis/test_driven_erlang.html > >TDD proved to be the best approach. > > > >Francesco > >-- > >http://www.erlang-consulting.com > > > >>-----Original Message----- > >>From: Martin Carlson [mailto:martin@REDACTED] > >>Sent: Thursday, January 26, 2006 12:14 PM > >>To: erlang-questions@REDACTED > >>Subject: Re: Software life cycle in Erlang > >> > >> > >>I would say it hate to do with the preconditions, is there a spec (the > >>optimistic approach..)? in that case what kind of spec you got, what > >>are the requirements, are there any high risk requirements and so on. > >>In any case an iterative model is proven to be very flexible > >>productive. Have a look at Fowlers page, lots of info. > >> > >>Some pointers though: > >> > >>Scrum: http://www.controlchaos.com > >>TTD: http://www.erlang-consulting.com/about_fs.html > >>General agile stuff: http://www.martinfowler.com > >> > >>---------------------------------------------- > >>Martin Carlson > >>http://www.erlang-consulting.com > >> > >>On Jan 25, 2006, at 3:19 PM, Thomas Lindgren wrote: > >> > >>> > >>> > >>> --- "Eduardo Figoli (INS)" > >>> wrote: > >>>> I'm trying to figure out the best model for software > >>>> development in Erlang. > >>> > >>> The best _model_ seems to be iterative development of > >>> some sort, perhaps test driven. AXD 301 had great > >>> success with steadily improving "increments", to take > >>> one of the great success stories. > >>> > >>> Taking a number like 35% for implementation means your > >>> whole project is done about 50% faster (in 2/3 the > >>> time) even if the language permits infinitely faster > >>> development than the state of the art, simply because > >>> the rest of the phases aren't concerned with > >>> programming. (That's the usual argument against > >>> switching programming languages, of course.) This > >>> doesn't seem right -- the added flexibility also means > >>> you can use powerful new development processes. > >>> > >>> My recommendation: try to "switch to better rules". > >>> > >>> Best, > >>> Thomas > >>> > >>> > >>> __________________________________________________ > >>> Do You Yahoo!? > >>> Tired of spam? Yahoo! Mail has the best spam protection around > >>> http://mail.yahoo.com > >> > >> > > > > > > __________________________________________________________________ > Switch to Netscape Internet Service. > As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register > > Netscape. Just the Net You Need. > > New! Netscape Toolbar for Internet Explorer > Search from anywhere on the Web and block those annoying pop-ups. > Download now at http://channels.netscape.com/ns/search/install.jsp > From ryanobjc@REDACTED Fri Jan 27 08:35:49 2006 From: ryanobjc@REDACTED (Ryan Rawson) Date: Thu, 26 Jan 2006 23:35:49 -0800 Subject: Erlang crypt and Javascript In-Reply-To: <43D99105.701@caveman.org> References: <43D99105.701@caveman.org> Message-ID: <78568af10601262335q27135190w2961361967a6c357@mail.gmail.com> Why not just use HTTPS ? JS can easily do a HTTPS get, and I'm sure (as an erlang newbie) there must be a https something or other for Erlang. -ryan On 1/26/06, Samuel Montgomery-Blinn wrote: > Are there any known Javascript encryption libraries that provide > compatible implementations with Erlang's crypt module? I'm having a > terrible time with the half-dozen Javascript implementations I've tried, > from Blowfish, AES, etc. This is for encrypting/decrypting the TCP > socket traffic between an AFLAX (aflax.org) socket (Flash ActionScript > XMLSocket) and an Erlang tcp server. > > -Sam > From Bruce@REDACTED Fri Jan 27 07:40:05 2006 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Fri, 27 Jan 2006 19:40:05 +1300 Subject: Lucene (Apache Search project) bindings? Message-ID: <43D9C045.408@Fitzsimons.org> Before I try this, I thought I would ask: Has anyone done a binding/driver to Lucene ( http://lucene.apache.org/java/docs/features.html )? Or (cough) implemented it in Erlang? It looks (superficially) like a nice project. I'm going to try and marry up CLucene (C++: http://sourceforge.net/projects/clucene/ ) Cheers, Bruce From rasmussen.bryan@REDACTED Fri Jan 27 09:52:05 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Fri, 27 Jan 2006 09:52:05 +0100 Subject: "Terseness in XML markup is of minimal importance" In-Reply-To: <43D90810.1050206@blueyonder.co.uk> References: <43D90810.1050206@blueyonder.co.uk> Message-ID: <3bb44c6e0601270052y4eb7255i65e986e6d40af1b3@mail.gmail.com> Well here's a laugh, just in from the python list "Just want to check which xml parser you guys have found to be the quickest. I have xml documents with 250 000 records or more and the processing of these documents are taking way to long. The validation is the main problem. Any module names, non validating would be find to, would help a lot." I agree that people doing really big xml files are doing foolish things, but actually... there is a market there, a very real niche market: http://www.datapower.com/products/xa35.html datapower was recently bought by IBM weren't they. hmm. On 1/26/06, David Hopwood wrote: > Joe Armstrong (AL/EAB) wrote: > > This is pure lunacy - design goals 10 in > > http://www.w3.org/TR/2003/PER-xml-20031030/ > > says: > > > > " 10. Terseness in XML markup is of minimal importance. " > > > > But terseness of expression *is* important if you have lots of data, > > this implies > > that you should not use XML when there is lots of data. > > > > Using XML for voluminous data is a sure sign of bad design > > > > << in another project I pumped into, XML was being used to represent > > a quantity that had three discrete states. > > > > THREE STATES CAN BE REPRESENTED IN TWO BITS > > > > But they chose XML - the declaration of a single state look about > > 190 Bytes - and they had *lots* of records, which they stored in a > > big data base. > > > > Now the data base was slow, so they bought more memory, it was > > still slow, > > so they wanted to go distributed - so they asked me since "Joe > > knows something about > > distributed programming" >> > > > > Mindless use of XML is sure sign of excruciatingly bad design. > > >> > > > > Idea - grade moderately difficult - XML should compress very nicely - > > since the same tags get repeated over and over again, thus in LZSS > > compression duplicated tags will appear as pointers. > > Duplicated byte strings will appear as pointers, but these will usually > not start and end at boundaries of duplicated tags. > > In general I think this *kind* of idea for how to work around problems > with XML (for example) by making things even more complicated, is part of > the problem. Why can't we just point and laugh at the silly people who are > designing systems that use 300+ MByte XML files? > > -- > David Hopwood > > From dmitriid@REDACTED Fri Jan 27 10:01:12 2006 From: dmitriid@REDACTED (Dmitrii Dimandt) Date: Fri, 27 Jan 2006 11:01:12 +0200 Subject: Unicode in file names Message-ID: I needed to recursively scan specified folders on my computer (mainly for some CD catalogs). Together with some nice folks over at RSDN (Russian Software Developers Network, see links below) we've arrived at several implementations for this task. Well, it is trivial, actually. However, filelib functions all fail miserably when they arrive at Unicode file names. I happen to have files with names that contain Japanese, Turkish, Russian characters - you name them :) Is there a way for Erlang to pick those names? I'm running Erlang on a WinXP. Thank you! [1] RSDN - http://www.rsdn.ru/ [2] My original implementation - http://rsdn.ru/forum/Message.aspx?mid=1608211&only=1 [2a] Bug fixed - http://rsdn.ru/forum/Message.aspx?mid=1608489&only=1 [3] Second implementation. Uses list comprehensions - http://rsdn.ru/forum/Message.aspx?mid=1608430&only=1 However, it fails on some directory structures [4] Third implementation. Also uses list comprehensions. http://rsdn.ru/forum/Message.aspx?mid=1609081&only=1 [4a] Bug fixed - http://rsdn.ru/forum/Message.aspx?mid=1609504&only=1 [5] The shortest of them all - http://rsdn.ru/forum/Message.aspx?mid=1618717&only=1 From bengt.kleberg@REDACTED Fri Jan 27 10:08:26 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Fri, 27 Jan 2006 10:08:26 +0100 Subject: Vi mode for Erlang In-Reply-To: References: Message-ID: <43D9E30A.7090501@ericsson.com> On 2006-01-27 01:59, Torbjorn Tornkvist wrote: > Hi dear vi users ! > > I wonder if there exist some sort of vi mode for Erlang > that indents the code in the same way as the Emacs mode if you have the possiblity to send selected text from vi to a pipe, i have a stdin/stdout erlang pretty printer (built upon the erl_pp module). bengt From bengt.kleberg@REDACTED Fri Jan 27 10:10:27 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Fri, 27 Jan 2006 10:10:27 +0100 Subject: how to download jungerl as whole? In-Reply-To: References: Message-ID: <43D9E383.3090902@ericsson.com> On 2006-01-26 20:25, Chris Campbell wrote: > Hi, > > Is the following correct for checking out jungerl? > > cvs -d:pserver:anonymous@REDACTED:/cvsroot/jungerl login > - no password > cvs -z3 -d:pserver:anonymous@REDACTED:/cvsroot/jungerl co jungerl > > This fails at login here. It never returns. Any ideas? ''never''? when i have tried this week i get an error message and the prompt back after about 15 minutes. bengt From chandrashekhar.mullaparthi@REDACTED Fri Jan 27 10:21:15 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Fri, 27 Jan 2006 09:21:15 +0000 Subject: Vacancy at T-Mobile Message-ID: Hello everyone, There is a vacancy in T-Mobile UK. Check it out if you are interested. http://careers.peopleclick.com/jobposts/Client40_TMobile/BU1/EXTERNAL/pck317-42649.htm cheers, Chandru From mickael.remond@REDACTED Fri Jan 27 11:08:43 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Fri, 27 Jan 2006 11:08:43 +0100 Subject: Lucene (Apache Search project) bindings? In-Reply-To: <43D9C045.408@Fitzsimons.org> References: <43D9C045.408@Fitzsimons.org> Message-ID: <20060127100843.GA8535@memphis.ilius.fr> * Bruce Fitzsimons [2006-01-27 19:40:05 +1300]: > Before I try this, I thought I would ask: > > Has anyone done a binding/driver to Lucene ( > http://lucene.apache.org/java/docs/features.html )? Or (cough) > implemented it in Erlang? It looks (superficially) like a nice project. Hello Bruce, I have worked with Lucene and it is a very nice tool. It looks possible to implement it in Erlang. I thought about it but never had time to go further. -- Micka?l R?mond From mickael.remond@REDACTED Fri Jan 27 11:16:21 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Fri, 27 Jan 2006 11:16:21 +0100 Subject: early warning - new rdbms In-Reply-To: References: Message-ID: <20060127101621.GB8535@memphis.ilius.fr> * Ulf Wiger (AL/EAB) [2006-01-25 12:57:11 +0100]: > The low-level interface that I've proposed mirrors > the mnesia_lib:db_xxxx() functions (db_put, db_get, > match_object, select, etc.) + some callbacks to > verify cstructs and loading the actual table. > > For example, from my first version of a disk_log > table: > > (Part of the idea being that you'd mostly do > put() on the log table, and so reading and > matching need not be super efficient.) > > When creating the table, you specify > {external_copies, [{CallBack, Nodes}]} > > e.g. > > {external_copies, [{rdbms_log, [node()]}]} I see. It is very nice. It will become easy to create Mnesia back-end. > The actual code that's generated to verify > the type and range looks something like this, > and doesn't take many microseconds to execute: This is also very nice. Please, let us know how we could help :-) -- Micka?l R?mond http://www.process-one.net/ From chandrashekhar.mullaparthi@REDACTED Fri Jan 27 11:42:25 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Fri, 27 Jan 2006 10:42:25 +0000 Subject: Erlang crypt and Javascript In-Reply-To: <78568af10601262335q27135190w2961361967a6c357@mail.gmail.com> References: <43D99105.701@caveman.org> <78568af10601262335q27135190w2961361967a6c357@mail.gmail.com> Message-ID: On 27/01/06, Ryan Rawson wrote: > Why not just use HTTPS ? JS can easily do a HTTPS get, and I'm sure > (as an erlang newbie) there must be a https something or other for > Erlang. > ibrowse supports http/https and is available from jungerl. cheers Chandru From event@REDACTED Wed Jan 25 20:48:30 2006 From: event@REDACTED (event@REDACTED) Date: Wed, 25 Jan 2006 20:48:30 +0100 Subject: CFP: International Workshop on Hybrid Logic 2006 (HyLo 2006) Message-ID: <20060125194912.54E4347FE52@pfepa.post.tele.dk> ******************************************************************* FIRST CALL FOR PAPERS International Workshop on Hybrid Logic 2006 (HyLo 2006) Affiliated with LICS 2006 August 11, 2006, Seattle, USA ******************************************************************* AIMS AND SCOPE: Hybrid logic is a branch of modal logic in which it is possible to directly refer to worlds/times/states or whatever the elements of the (Kripke) model are meant to represent. Although they date back to the late 1960s, and have been sporadically investigated ever since, it is only in the 1990s that work on them really got into its stride. It is easy to justify interest in hybrid logic on applied grounds, because of the usefulness of the additional expressive power. For example, when reasoning about time one often wants to build up a series of assertions about what happens at a particular instant,and standard modal formalisms do not allow this. What is less obvious is that the route hybrid logic takes to overcome this problem (the basic mechanism being to add nominals --- atomic symbols true at a unique point --- together with extra modalities to exploit them) often actually improves the behavior of the underlying modal formalism. For example, it becomes far simpler to formulate modal tableau, resolution, and natural deduction in hybrid logic, and completeness and interpolation results can be proved of a generality that is not available in orthodox modal logic. Hybrid logic is now a mature field, therefore a theme of special interest at this HyLo workshop will be the combination of hybrid logic with other logics, the basic methodological question being "what is the best way of hybridizing a given logic?" However, submissions in all areas of hybrid logic are welcome. The workshop HyLo 2006 is likely to be relevant to a wide range of people, including those interested in description logic, feature logic, applied modal logics, temporal logic, and labelled deduction. The workshop continues a series of previous workshops on hybrid logic, for example the LICS-affiliated HyLo 2002 (http://floc02.diku.dk/HYLO) which was held as part of FLoC 2002, Copenhagen, Denmark. If you are unsure whether your work is of relevance to the workshop, please do not hesitate to contact the workshop organizers for more information. Contact details are given below. For more general background on hybrid logic, and many of the key papers, see the Hybrid Logics homepage (http://hylo.loria.fr/). PROGRAM COMMITTEE: Carlos Areces (INRIA Lorraine, France) Patrick Blackburn (INRIA Lorraine, France) Thomas Bolander (Technical University of Denmark) Torben Bra?ner (Roskilde University, Denmark) --- Chair Valeria de Paiva (PARC, USA) Melvin Fitting (Lehman College, New York, USA) Balder ten Cate (University of Amsterdam, The Netherlands) J?rgen Villadsen (Roskilde University, Denmark) SUBMISSIONS: We invite the contribution of papers reporting new work from researchers interested in hybrid logic. Details about the submission procedure will be announced in the second call for papers (note that the dates below are tentative). The workshop proceedings have been accepted for publication in ENTCS (http://www.elsevier.com/locate/entcs/). A preliminary version of the proceedings will also be distributed at the workshop. One author for each accepted paper must attend the workshop in order to present the paper. IMPORTANT DATES (TENTATIVE): Deadline for submissions: May 26, 2006 Notification of acceptance: June 23, 2006 Deadline for final versions: July 21, 2006 CONTACT DETAILS: See the workshop homepage (http://hylomol.ruc.dk/HyLo2006) for further information. Please send all correspondence regarding the workshop to the organizers: Patrick Blackburn http://www.loria.fr/~blackbur/ Thomas Bolander http://www.imm.dtu.dk/~tb/ Torben Bra?ner --- Chair http://www.ruc.dk/~torben/ Valeria de Paiva http://www.cs.bham.ac.uk/~vdp/ J?rgen Villadsen http://www.ruc.dk/~jv/ ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From stephen@REDACTED Fri Jan 27 05:53:26 2006 From: stephen@REDACTED (Stephen Gibberd) Date: Fri, 27 Jan 2006 11:53:26 +0700 Subject: RFQ for mediation system Message-ID: <20060127045326.GD23084@terminal.telesurf.com.kh> Hello, I'm helping organise a RFQ for a mediation system for Mobitel (www.mobitel.com.kh) and having used erlang/ejabberd (and played with J-EAI) was hoping we could use them as the messaging system between client applications (customer provisioning, help desk, 3rd party, etc) and the agents that connect to the network elements (IN/prepaid via Corba, HLR via LDAP, SMSC via SNMP, etc). Company policy is to purchase an existing product which we can modify from a company with experience supplying mediation solutions to telecom companies. If you know of an interested company, can you let me know (off-list)? Thanks, Stephen From chaitanya.chalasani@REDACTED Fri Jan 27 14:09:51 2006 From: chaitanya.chalasani@REDACTED (Chaitanya Chalasani) Date: Fri, 27 Jan 2006 18:39:51 +0530 Subject: Decompile beam to erlang Message-ID: <200601271839.51669.chaitanya.chalasani@gmail.com> Dear List, I have a very serious issue, We lost all the source code of our erlang based project, we only have the beam files. Is there any way i can retrive the erlang files beam files. Please help me out. -- Chaitanya Chalasani From lennart.ohman@REDACTED Fri Jan 27 14:11:21 2006 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Fri, 27 Jan 2006 14:11:21 +0100 Subject: Decompile beam to erlang In-Reply-To: <200601271839.51669.chaitanya.chalasani@gmail.com> Message-ID: Hi, sorry to hear that. I would say your chance is that you have debug_info compiled your code, making the abstract-format available inside the beam. Best Regards, Lennart ------------------------------------------------------------- Lennart Ohman office : +46-8-587 623 27 Sjoland & Thyselius Telecom AB cellular: +46-70-552 67 35 Sehlstedtsgatan 6 fax : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Chaitanya Chalasani Sent: Friday, January 27, 2006 2:10 PM To: erlang-questions@REDACTED Subject: Decompile beam to erlang Dear List, I have a very serious issue, We lost all the source code of our erlang based project, we only have the beam files. Is there any way i can retrive the erlang files beam files. Please help me out. -- Chaitanya Chalasani From samuel@REDACTED Fri Jan 27 15:13:12 2006 From: samuel@REDACTED (Samuel Rivas) Date: Fri, 27 Jan 2006 15:13:12 +0100 Subject: tracking failures in supervisor:start_link Message-ID: <20060127141312.GB21634@crusher.lfcia.pri> Hi, If any of the child processes dies in the init phase when a supervisor is created with start_link, the supervisor terminates itself with the reason shutdown. I'd prefer the exit message to propagate untouched, so I need to know the initial exit reason. The only way I came up with is creating the supervisor with an empty child list, starting the children afterwards with the start_child function. That way the supervisor returns {error, Reason} if something fails in the children's init functions. This is not perfect since I cannot know whether the child process died or returned {error, Reason} but is better than the initial case. Any cleaner way to do that? Thanks in advance. -- Samuel From cyberdanx@REDACTED Fri Jan 27 15:33:59 2006 From: cyberdanx@REDACTED (Chris Campbell) Date: Fri, 27 Jan 2006 14:33:59 +0000 Subject: how to download jungerl as whole? In-Reply-To: <43D9E383.3090902@ericsson.com> References: <43D9E383.3090902@ericsson.com> Message-ID: On 27/01/06, Bengt Kleberg wrote: > ''never''? when i have tried this week i get an error message and the > prompt back after about 15 minutes. Never is perhaps too strong a word, but I tried for a max of ~5 minutes each time. No joy. From mickael.remond@REDACTED Fri Jan 27 15:43:26 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Fri, 27 Jan 2006 15:43:26 +0100 Subject: Anyone else needs a gen_tcp:send with timeout ? Message-ID: <20060127144326.GA24881@memphis.ilius.fr> Hello, We have seen several time in live system that a gen_tcp:send with timeout is really really needed. Suppose you write a server that periodically send data to a client. A client is connected but gets suspended at some point (Ctrl-Z or deadlock, etc.). In this case the server will keep on trying to send the data to the client. Packets are queued in the Erlang VM and the memory consumption grows to the point where Eric Newhuis asked for this feature one year ago: http://www.erlang.org/ml-archive/erlang-questions/200401/msg00327.html Scott Lystig Fritchie earlier. Matthias suggested to use the undocumented: gen_tcp:connect(Host, Port, [{send_timeout, 0}]) (or to use a timer). I do not know if Eric, Scott or someone else has found a good and robust way to handle thoses cases. How do you do in your production servers ? Do you use one of the previous trick ? Is the addition of a gen_tcp:send with timeout considered ? Thank you for your best practice :-) -- Micka?l R?mond http://www.process-one.net/ From ulf.wiger@REDACTED Fri Jan 27 18:28:09 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 27 Jan 2006 18:28:09 +0100 Subject: Vacancy at T-Mobile Message-ID: BTW, I came across this job site: http://www.indeed.com/jobs?q=erlang+-erlangc+-%22erlang+B%22+-%22Erlang+ C%22&start=10 The above search lists 30 job ads that cite Erlang as a desirable skill, all of them in the U.S. (mostly CA, but also IL, TX, MA, OH, NY), and all of them fairly new. Regards, Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru > Sent: den 27 januari 2006 10:21 > To: Erlang Questions > Subject: Vacancy at T-Mobile > > Hello everyone, > > There is a vacancy in T-Mobile UK. Check it out if you are interested. > > http://careers.peopleclick.com/jobposts/Client40_TMobile/BU1/E > XTERNAL/pck317-42649.htm > > cheers, > Chandru > From sam@REDACTED Fri Jan 27 18:38:33 2006 From: sam@REDACTED (Samuel Montgomery-Blinn) Date: Fri, 27 Jan 2006 12:38:33 -0500 Subject: Erlang crypt and Javascript In-Reply-To: <78568af10601262335q27135190w2961361967a6c357@mail.gmail.com> References: <43D99105.701@caveman.org> <78568af10601262335q27135190w2961361967a6c357@mail.gmail.com> Message-ID: <43DA5A99.2060704@caveman.org> Ryan Rawson wrote: >Why not just use HTTPS ? JS can easily do a HTTPS get, and I'm sure >(as an erlang newbie) there must be a https something or other for >Erlang. > >-ryan > > >On 1/26/06, Samuel Montgomery-Blinn wrote: > > >>Are there any known Javascript encryption libraries that provide >>compatible implementations with Erlang's crypt module? I'm having a >>terrible time with the half-dozen Javascript implementations I've tried, >>from Blowfish, AES, etc. This is for encrypting/decrypting the TCP >>socket traffic between an AFLAX (aflax.org) socket (Flash ActionScript >>XMLSocket) and an Erlang tcp server. >> >>-Sam >> >> >> > > > Because in this case there is not an HTTP stack speaking over the port. It is not a "pull" or "poll", which yes of course an HTTPS request would provide. This is a bidirectional nearly raw TCP socket connection from the Browser via Flash, going over TCP to a server listening on some port. The server can of course take input over the socket, but there would not be any real gain in that over using some standard AJAX calls which would yes of course be able to take advantage of simple HTTPS. But to push data to the client (say, multiple streams of stock updates, logs, chat windows) without using any HTTP pull/poll request, the server has these nearly raw TCP sockets which end up firing Shock events on the browser. See: http://aflax.org/examples/sockets/sockets.html http://www.heliant.net/~stsai/code/ So to perform this without pull/poll of the HTTP/S request cycle, I need to be able to encrypt and sign a message at the server and push the data along the TCP pipe to the browser, which has to be able to decrypt and verify the received data. -Sam From fritchie@REDACTED Fri Jan 27 22:03:09 2006 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Fri, 27 Jan 2006 15:03:09 -0600 Subject: Anyone else needs a gen_tcp:send with timeout ? In-Reply-To: Message of "Fri, 27 Jan 2006 15:43:26 +0100." <20060127144326.GA24881@memphis.ilius.fr> Message-ID: <200601272103.k0RL39Db053896@snookles.snookles.com> >>>>> "mr" == Mickael Remond writes: mr> Matthias suggested to use the mr> undocumented: gen_tcp:connect(Host, Port, [{send_timeout, 0}]) (or mr> to use a timer). A very, very quick glance at inet_drv.c suggests that it's probably changable using inet:setopts/2 after the connection is established? Unfortunately, I don't have a better solution. It seems to me that send_timeout is probably the proper hammer for this nail. Perhaps we can get an official or unofficial, "Yes, we'll be documenting that option in a future release" statement? -Scott From matthias@REDACTED Sat Jan 28 09:02:55 2006 From: matthias@REDACTED (Matthias Lang) Date: Sat, 28 Jan 2006 09:02:55 +0100 Subject: Decompile beam to erlang In-Reply-To: References: <200601271839.51669.chaitanya.chalasani@gmail.com> Message-ID: <17371.9519.486450.467274@antilipe.corelatus.se> > Is there any way i can retrive the erlang files beam files. This question seems to come up every so often. Figured I'd write an answer to put into the FAQ next time I update it. Improvements welcome. Matthias ---------------------------------------------------------------------- Q: Can I re-create .erl files using just the .beam files? A: _If_ the code was compiled with the debug_info flag, then the .beam file contains a 'partially compiled' representation of the source---basically the parse tree. Here is a simple module: -module(hw). -export([go/0]). go() when true -> "this is my function". and the corresponding abstract code: 3> {ok, {hw, [{abstract_code, Abs}]}} = beam_lib:chunks("hw.beam", [abstract_code]), Abs. {raw_abstract_v1,[{attribute,1,file,{"./hw.erl",1}}, {attribute,1,module,hw}, {attribute,2,export,[{go,0}]}, {function,4, go, 0, [{clause,4, [], [], [{string,5,"this is my function"}]}]}, {eof,6}]} Writing a decompiler which can turn the above example back to source is a fifteen minute job. Writing a decompiler which handles more complex Erlang code is more time consuming, but not much harder. If the abstract code is _not_ present in the beam file, the problem gets much harder. It is possible to study the remaining information and draw some conclusions about what the original .erl file might have looked like, for instance which functions were exported. But a lot of other important information, such as variable names, is not present. In general, recreating the source code from a beam file without abstract code is not practical. ---------------------------------------------------------------------- From ulf.wiger@REDACTED Sat Jan 28 15:03:41 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Sat, 28 Jan 2006 15:03:41 +0100 Subject: Decompile beam to erlang Message-ID: Matthias Lang wrote: > Writing a decompiler which can turn the above example > back to source is a fifteen minute job. Writing a > decompiler which handles more complex Erlang code > is more time consuming, but not much harder. Here's a pretty generic way to convert abstract forms to .erl: -module(abst_to_src). -export([transform/2]). transform(BeamFName, ErlFName) -> case beam_lib:chunks(BeamFName, [abstract_code]) of {ok, {_, [{abstract_code, {raw_abstract_v1,Forms}}]}} -> Src = erl_prettypr:format(erl_syntax:form_list(tl(Forms))), {ok, Fd} = file:open(ErlFName, [write]), io:fwrite(Fd, "~s~n", [Src]), file:close(Fd); Error -> Error end. (It _did_ take exactly 15 minutes, including: - just trying to hack it from memory - reading the docs, waiting two minutes for the erlang.org webserver to respond - fetching the docs from local disk - reading some more, giving up and then searching my mail archive for an old mail to Luke Gorrie, where I had included the above code - Copy-paste, compiling, running and verifying the results... :) /Uffe From ulf.wiger@REDACTED Sat Jan 28 15:13:10 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Sat, 28 Jan 2006 15:13:10 +0100 Subject: Vacancy at T-Mobile Message-ID: It's been pointed out to me that, despite my efforts to remove ads that mentioned the Erlang Formula, rather than the Erlang language, only 3-4 of those ads actually mentioned the Erlang language. Bummer. I also should have pointed out that none of them actually asked for an Erlang programmer, but did mention Erlang as a valuable skill. That's what I found interesting, because a long- standing argument against Erlang has been that nobody would want to work with it -- esp. in the U.S. -- since it doesn't look good on your CV. It would of course have been nice to be able to present more than 3-4 counter-examples... (: /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Ulf > Wiger (AL/EAB) > Sent: den 27 januari 2006 18:28 > To: Erlang Questions > Subject: RE: Vacancy at T-Mobile > > > BTW, I came across this job site: > > http://www.indeed.com/jobs?q=erlang+-erlangc+-%22erlang+B%22+- > %22Erlang+ > C%22&start=10 > > The above search lists 30 job ads that cite Erlang as a > desirable skill, all of them in the U.S. (mostly CA, but also > IL, TX, MA, OH, NY), and all of them fairly new. > > Regards, > Uffe > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru > > Sent: den 27 januari 2006 10:21 > > To: Erlang Questions > > Subject: Vacancy at T-Mobile > > > > Hello everyone, > > > > There is a vacancy in T-Mobile UK. Check it out if you are > interested. > > > > http://careers.peopleclick.com/jobposts/Client40_TMobile/BU1/E > > XTERNAL/pck317-42649.htm > > > > cheers, > > Chandru > > > From francesco@REDACTED Sat Jan 28 15:38:30 2006 From: francesco@REDACTED (Francesco Cesarini (Erlang Training & Consulting)) Date: Sat, 28 Jan 2006 14:38:30 +0000 Subject: Vacancy at T-Mobile In-Reply-To: References: Message-ID: <43DB81E6.6000801@erlang-consulting.com> It looks like there is only one job which is partially Erlang based, where the company is using Yaws. All others ask for it as a desirable skill. It is a way of finding people with a genuine curiosity in Computer Science.. Not necessarily a perquisite to manage the job, however (An excellent strategy, IMO). All other job posts seem to be in regards to the Erlang Formula :-( We recently did a search over all CVs registered on one of the major job sites in the last 6 months here in the UK.. I think they were about 150,000 in total. We were over the moon when we got 150 results. But after weeding through people who had worked in Erlang House, people living on Erlang street, people who had worked with the Erlang-B and Erlang-C formulas, and the odd descendant of Agner Krarup Erlang, we were down to 6 valid CVs, of which 4 people we already knew had been looking for Erlang work int he last 6 months, and 2 people were new to us! Francesco Ulf Wiger (AL/EAB) wrote: > > BTW, I came across this job site: > > http://www.indeed.com/jobs?q=erlang+-erlangc+-%22erlang+B%22+-%22Erlang+ > C%22&start=10 > > The above search lists 30 job ads that cite Erlang as > a desirable skill, all of them in the U.S. (mostly CA, > but also IL, TX, MA, OH, NY), and all of them fairly new. > > Regards, > Uffe > > >>-----Original Message----- >>From: owner-erlang-questions@REDACTED >>[mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru >>Sent: den 27 januari 2006 10:21 >>To: Erlang Questions >>Subject: Vacancy at T-Mobile >> >>Hello everyone, >> >>There is a vacancy in T-Mobile UK. Check it out if you are interested. >> >>http://careers.peopleclick.com/jobposts/Client40_TMobile/BU1/E >>XTERNAL/pck317-42649.htm >> >>cheers, >>Chandru >> > > > From serge@REDACTED Sat Jan 28 16:07:14 2006 From: serge@REDACTED (Serge Aleynikov) Date: Sat, 28 Jan 2006 10:07:14 -0500 Subject: Vacancy at T-Mobile In-Reply-To: <43DB81E6.6000801@erlang-consulting.com> References: <43DB81E6.6000801@erlang-consulting.com> Message-ID: <43DB88A2.9020203@hq.idt.net> I wonder why the number of annual downloads at www.erlang.org keeps growing stadily (being around 30,000), yet we find only a few postings mentioned in this thread. Serge Francesco Cesarini (Erlang Training & Consulting) wrote: > It looks like there is only one job which is partially Erlang based, > where the company is using Yaws. All others ask for it as a desirable > skill. It is a way of finding people with a genuine curiosity in > Computer Science.. Not necessarily a perquisite to manage the job, > however (An excellent strategy, IMO). All other job posts seem to be in > regards to the Erlang Formula :-( > > We recently did a search over all CVs registered on one of the major job > sites in the last 6 months here in the UK.. I think they were about > 150,000 in total. We were over the moon when we got 150 results. But > after weeding through people who had worked in Erlang House, people > living on Erlang street, people who had worked with the Erlang-B and > Erlang-C formulas, and the odd descendant of Agner Krarup Erlang, we > were down to 6 valid CVs, of which 4 people we already knew had been > looking for Erlang work int he last 6 months, and 2 people were new to us! > > Francesco > > Ulf Wiger (AL/EAB) wrote: > >> >> BTW, I came across this job site: >> >> http://www.indeed.com/jobs?q=erlang+-erlangc+-%22erlang+B%22+-%22Erlang+ >> C%22&start=10 >> >> The above search lists 30 job ads that cite Erlang as >> a desirable skill, all of them in the U.S. (mostly CA, >> but also IL, TX, MA, OH, NY), and all of them fairly new. >> >> Regards, >> Uffe >> >> >>> -----Original Message----- >>> From: owner-erlang-questions@REDACTED >>> [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru >>> Sent: den 27 januari 2006 10:21 >>> To: Erlang Questions >>> Subject: Vacancy at T-Mobile >>> >>> Hello everyone, >>> >>> There is a vacancy in T-Mobile UK. Check it out if you are interested. >>> >>> http://careers.peopleclick.com/jobposts/Client40_TMobile/BU1/E >>> XTERNAL/pck317-42649.htm >>> >>> cheers, >>> Chandru >>> >> >> >> > > From ernie.makris@REDACTED Sat Jan 28 16:25:05 2006 From: ernie.makris@REDACTED (Ernie Makris) Date: Sat, 28 Jan 2006 10:25:05 -0500 Subject: Vacancy at T-Mobile In-Reply-To: References: Message-ID: <43DB8CD1.60204@comcast.net> Hi Ulf, I'm based in the States and I think you are correct Ulf. When I mention erlang, I receive funny looks because people have never even heard of it. I would like to get a contract someday, but it looks like I would have to ask to do it in erlang rather than find a job that requires it. Its always fun to pitch something new to people:) Thanks Ernie Ulf Wiger (AL/EAB) wrote: > It's been pointed out to me that, despite my > efforts to remove ads that mentioned the Erlang > Formula, rather than the Erlang language, only > 3-4 of those ads actually mentioned the Erlang > language. Bummer. > > I also should have pointed out that none of them > actually asked for an Erlang programmer, but did > mention Erlang as a valuable skill. > > That's what I found interesting, because a long- > standing argument against Erlang has been that > nobody would want to work with it -- esp. in the > U.S. -- since it doesn't look good on your CV. > > It would of course have been nice to be able to > present more than 3-4 counter-examples... (: > > /Uffe > > >> -----Original Message----- >> From: owner-erlang-questions@REDACTED >> [mailto:owner-erlang-questions@REDACTED] On Behalf Of Ulf >> Wiger (AL/EAB) >> Sent: den 27 januari 2006 18:28 >> To: Erlang Questions >> Subject: RE: Vacancy at T-Mobile >> >> >> BTW, I came across this job site: >> >> http://www.indeed.com/jobs?q=erlang+-erlangc+-%22erlang+B%22+- >> %22Erlang+ >> C%22&start=10 >> >> The above search lists 30 job ads that cite Erlang as a >> desirable skill, all of them in the U.S. (mostly CA, but also >> IL, TX, MA, OH, NY), and all of them fairly new. >> >> Regards, >> Uffe >> >> >>> -----Original Message----- >>> From: owner-erlang-questions@REDACTED >>> [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru >>> Sent: den 27 januari 2006 10:21 >>> To: Erlang Questions >>> Subject: Vacancy at T-Mobile >>> >>> Hello everyone, >>> >>> There is a vacancy in T-Mobile UK. Check it out if you are >>> >> interested. >> >>> http://careers.peopleclick.com/jobposts/Client40_TMobile/BU1/E >>> XTERNAL/pck317-42649.htm >>> >>> cheers, >>> Chandru >>> >>> > > From danie@REDACTED Sat Jan 28 16:31:08 2006 From: danie@REDACTED (Danie Schutte) Date: Sat, 28 Jan 2006 17:31:08 +0200 Subject: Vacancy at T-Mobile In-Reply-To: <43DB88A2.9020203@hq.idt.net> References: <43DB81E6.6000801@erlang-consulting.com> <43DB88A2.9020203@hq.idt.net> Message-ID: <200601281731.09030.danie@erlfinsys.net> I don't think all people are necessarily "mailing list people". My first 9 months of erlang was spent without me even thinking of a mailing list. In the company we have 10 erlang developers but only 3 or 4 of us are on the mailing list. It may be a strategy to ask for e-mail addresses when downloading - and then send a "welcoming intro mail" and a once-every-six-month-hello-wanna-join-the-list-and-stuff? mail. On Saturday 28 January 2006 17:07, Serge Aleynikov wrote: > I wonder why the number of annual downloads at www.erlang.org keeps > growing stadily (being around 30,000), yet we find only a few postings > mentioned in this thread. > > Serge > > Francesco Cesarini (Erlang Training & Consulting) wrote: > > It looks like there is only one job which is partially Erlang based, > > where the company is using Yaws. All others ask for it as a desirable > > skill. It is a way of finding people with a genuine curiosity in > > Computer Science.. Not necessarily a perquisite to manage the job, > > however (An excellent strategy, IMO). All other job posts seem to be in > > regards to the Erlang Formula :-( > > > > We recently did a search over all CVs registered on one of the major job > > sites in the last 6 months here in the UK.. I think they were about > > 150,000 in total. We were over the moon when we got 150 results. But > > after weeding through people who had worked in Erlang House, people > > living on Erlang street, people who had worked with the Erlang-B and > > Erlang-C formulas, and the odd descendant of Agner Krarup Erlang, we > > were down to 6 valid CVs, of which 4 people we already knew had been > > looking for Erlang work int he last 6 months, and 2 people were new to > > us! > > > > Francesco > > > > Ulf Wiger (AL/EAB) wrote: > >> BTW, I came across this job site: > >> > >> http://www.indeed.com/jobs?q=erlang+-erlangc+-%22erlang+B%22+-%22Erlang+ > >> C%22&start=10 > >> > >> The above search lists 30 job ads that cite Erlang as > >> a desirable skill, all of them in the U.S. (mostly CA, > >> but also IL, TX, MA, OH, NY), and all of them fairly new. > >> > >> Regards, > >> Uffe > >> > >>> -----Original Message----- > >>> From: owner-erlang-questions@REDACTED > >>> [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru > >>> Sent: den 27 januari 2006 10:21 > >>> To: Erlang Questions > >>> Subject: Vacancy at T-Mobile > >>> > >>> Hello everyone, > >>> > >>> There is a vacancy in T-Mobile UK. Check it out if you are interested. > >>> > >>> http://careers.peopleclick.com/jobposts/Client40_TMobile/BU1/E > >>> XTERNAL/pck317-42649.htm > >>> > >>> cheers, > >>> Chandru From alex.peake@REDACTED Sat Jan 28 17:36:29 2006 From: alex.peake@REDACTED (Alex Peake) Date: Sat, 28 Jan 2006 08:36:29 -0800 Subject: Vacancy at T-Mobile References: <43DB8CD1.60204@comcast.net> Message-ID: <001401c62429$01330de0$64020a0a@FEY> interested in an Erlang job in the US? Drop me a line Alex ----- Original Message ----- From: "Ernie Makris" To: "Ulf Wiger (AL/EAB)" Cc: "Erlang Questions" Sent: Saturday, January 28, 2006 7:25 AM Subject: Re: Vacancy at T-Mobile > Hi Ulf, > > I'm based in the States and I think you are correct Ulf. When I mention > erlang, I receive funny looks because people have never even heard of it. > I would like to get a contract someday, but it looks like I would have > to ask to do it in erlang > rather than find a job that requires it. Its always fun to pitch > something new to people:) > > Thanks > Ernie > > Ulf Wiger (AL/EAB) wrote: > > It's been pointed out to me that, despite my > > efforts to remove ads that mentioned the Erlang > > Formula, rather than the Erlang language, only > > 3-4 of those ads actually mentioned the Erlang > > language. Bummer. > > > > I also should have pointed out that none of them > > actually asked for an Erlang programmer, but did > > mention Erlang as a valuable skill. > > > > That's what I found interesting, because a long- > > standing argument against Erlang has been that > > nobody would want to work with it -- esp. in the > > U.S. -- since it doesn't look good on your CV. > > > > It would of course have been nice to be able to > > present more than 3-4 counter-examples... (: > > > > /Uffe > > > > > >> -----Original Message----- > >> From: owner-erlang-questions@REDACTED > >> [mailto:owner-erlang-questions@REDACTED] On Behalf Of Ulf > >> Wiger (AL/EAB) > >> Sent: den 27 januari 2006 18:28 > >> To: Erlang Questions > >> Subject: RE: Vacancy at T-Mobile > >> > >> > >> BTW, I came across this job site: > >> > >> http://www.indeed.com/jobs?q=erlang+-erlangc+-%22erlang+B%22+- > >> %22Erlang+ > >> C%22&start=10 > >> > >> The above search lists 30 job ads that cite Erlang as a > >> desirable skill, all of them in the U.S. (mostly CA, but also > >> IL, TX, MA, OH, NY), and all of them fairly new. > >> > >> Regards, > >> Uffe > >> > >> > >>> -----Original Message----- > >>> From: owner-erlang-questions@REDACTED > >>> [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru > >>> Sent: den 27 januari 2006 10:21 > >>> To: Erlang Questions > >>> Subject: Vacancy at T-Mobile > >>> > >>> Hello everyone, > >>> > >>> There is a vacancy in T-Mobile UK. Check it out if you are > >>> > >> interested. > >> > >>> http://careers.peopleclick.com/jobposts/Client40_TMobile/BU1/E > >>> XTERNAL/pck317-42649.htm > >>> > >>> cheers, > >>> Chandru > >>> > >>> > > > > > From francesco@REDACTED Sat Jan 28 18:00:39 2006 From: francesco@REDACTED (Francesco Cesarini (Erlang Training & Consulting)) Date: Sat, 28 Jan 2006 17:00:39 +0000 Subject: Vacancy at T-Mobile In-Reply-To: <43DB88A2.9020203@hq.idt.net> References: <43DB81E6.6000801@erlang-consulting.com> <43DB88A2.9020203@hq.idt.net> Message-ID: <43DBA337.20607@erlang-consulting.com> The monthly downloads at Erlang.org often hit peaks of 15,000+ That does not include mirror sites and other means of distribution. The traffic on the list has increased greatly in the past 24 months. Erlang usage is on a sharp rise, an obvious trend we have seen in many countries. Francesco -- http://www.erlang-consulting.com Serge Aleynikov wrote: > I wonder why the number of annual downloads at www.erlang.org keeps > growing stadily (being around 30,000), yet we find only a few postings > mentioned in this thread. > > Serge > > Francesco Cesarini (Erlang Training & Consulting) wrote: > >> It looks like there is only one job which is partially Erlang based, >> where the company is using Yaws. All others ask for it as a desirable >> skill. It is a way of finding people with a genuine curiosity in >> Computer Science.. Not necessarily a perquisite to manage the job, >> however (An excellent strategy, IMO). All other job posts seem to be >> in regards to the Erlang Formula :-( >> >> We recently did a search over all CVs registered on one of the major >> job sites in the last 6 months here in the UK.. I think they were >> about 150,000 in total. We were over the moon when we got 150 results. >> But after weeding through people who had worked in Erlang House, >> people living on Erlang street, people who had worked with the >> Erlang-B and Erlang-C formulas, and the odd descendant of Agner Krarup >> Erlang, we were down to 6 valid CVs, of which 4 people we already knew >> had been looking for Erlang work int he last 6 months, and 2 people >> were new to us! >> >> Francesco >> >> Ulf Wiger (AL/EAB) wrote: >> >>> >>> BTW, I came across this job site: >>> >>> http://www.indeed.com/jobs?q=erlang+-erlangc+-%22erlang+B%22+-%22Erlang+ >>> C%22&start=10 >>> >>> The above search lists 30 job ads that cite Erlang as >>> a desirable skill, all of them in the U.S. (mostly CA, >>> but also IL, TX, MA, OH, NY), and all of them fairly new. >>> >>> Regards, >>> Uffe >>> >>> >>>> -----Original Message----- >>>> From: owner-erlang-questions@REDACTED >>>> [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru >>>> Sent: den 27 januari 2006 10:21 >>>> To: Erlang Questions >>>> Subject: Vacancy at T-Mobile >>>> >>>> Hello everyone, >>>> >>>> There is a vacancy in T-Mobile UK. Check it out if you are interested. >>>> >>>> http://careers.peopleclick.com/jobposts/Client40_TMobile/BU1/E >>>> XTERNAL/pck317-42649.htm >>>> >>>> cheers, >>>> Chandru >>>> >>> >>> >>> >> >> > > > From bfulg@REDACTED Sat Jan 28 22:58:35 2006 From: bfulg@REDACTED (Brent Fulgham) Date: Sat, 28 Jan 2006 13:58:35 -0800 Subject: Vacancy at T-Mobile In-Reply-To: References: Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've been trying to hire another developer recently (a C++ job), and saw a candidate who had worked at Ericsson's Santa Barbara location (I am in SB as well). I asked him whether he had worked with Erlang at all during his days at Ericsson. He wasn't sure what Erlang was, and when I told him a little more about it, he said that he hadn't worked with it, but that he thought it had been a problem on the low-level switch they were working with. So, even within Ericsson it seems like there are mixed messages. Or perhaps this candidate was spinning a story on-the-fly about the technology. I have never built anything large with Erlang, so I can't say one way or another, but my impression is that Erlang is at least as viable as C++ for most applications (though perhaps not for the lower-level matrix math and numerical work we do in my day job). So, perhaps you can add *me* as one more counter-example. :-) - -Brent On Jan 28, 2006, at 6:13 AM, Ulf Wiger ((AL/EAB)) wrote: > > It's been pointed out to me that, despite my > efforts to remove ads that mentioned the Erlang > Formula, rather than the Erlang language, only > 3-4 of those ads actually mentioned the Erlang > language. Bummer. > > I also should have pointed out that none of them > actually asked for an Erlang programmer, but did > mention Erlang as a valuable skill. > > That's what I found interesting, because a long- > standing argument against Erlang has been that > nobody would want to work with it -- esp. in the > U.S. -- since it doesn't look good on your CV. > > It would of course have been nice to be able to > present more than 3-4 counter-examples... (: > > /Uffe > >> -----Original Message----- >> From: owner-erlang-questions@REDACTED >> [mailto:owner-erlang-questions@REDACTED] On Behalf Of Ulf >> Wiger (AL/EAB) >> Sent: den 27 januari 2006 18:28 >> To: Erlang Questions >> Subject: RE: Vacancy at T-Mobile >> >> >> BTW, I came across this job site: >> >> http://www.indeed.com/jobs?q=erlang+-erlangc+-%22erlang+B%22+- >> %22Erlang+ >> C%22&start=10 >> >> The above search lists 30 job ads that cite Erlang as a >> desirable skill, all of them in the U.S. (mostly CA, but also >> IL, TX, MA, OH, NY), and all of them fairly new. >> >> Regards, >> Uffe >> >>> -----Original Message----- >>> From: owner-erlang-questions@REDACTED >>> [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru >>> Sent: den 27 januari 2006 10:21 >>> To: Erlang Questions >>> Subject: Vacancy at T-Mobile >>> >>> Hello everyone, >>> >>> There is a vacancy in T-Mobile UK. Check it out if you are >> interested. >>> >>> http://careers.peopleclick.com/jobposts/Client40_TMobile/BU1/E >>> XTERNAL/pck317-42649.htm >>> >>> cheers, >>> Chandru >>> >> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFD2+kLzGDdrzfvUpURAp3/AJ9DoXFb0lgnuUtOc6ejRbyLbvO4wQCgo+qg shetjljw+PlBysZPhRR5yXM= =SZIb -----END PGP SIGNATURE----- From lennart.ohman@REDACTED Sat Jan 28 23:24:38 2006 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Sat, 28 Jan 2006 23:24:38 +0100 Subject: Vacancy at T-Mobile In-Reply-To: Message-ID: Hi, Of course in any big company not everyone can know of everything going on. I am probably extremely ignorant of many home-brewn things within Ericsson playing equally important roles in their areas as Erlang in its. But the Santa Barbara case is different in this case I believe. I believe that to be a company Ericsson aquired. Ericsson probably did not buy them to teach them Erlang :-) but rather for the value of what they were doing before. So most likely they continued doing what they always done, and not learning Erlang. Best Regards, Lennart ------------------------------------------------------------- Lennart Ohman office : +46-8-587 623 27 Sjoland & Thyselius Telecom AB cellular: +46-70-552 67 35 Sehlstedtsgatan 6 fax : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Brent Fulgham Sent: Saturday, January 28, 2006 10:59 PM To: Ulf Wiger ((AL/EAB)) Cc: Erlang Questions Subject: Re: Vacancy at T-Mobile -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I've been trying to hire another developer recently (a C++ job), and saw a candidate who had worked at Ericsson's Santa Barbara location (I am in SB as well). I asked him whether he had worked with Erlang at all during his days at Ericsson. He wasn't sure what Erlang was, and when I told him a little more about it, he said that he hadn't worked with it, but that he thought it had been a problem on the low-level switch they were working with. So, even within Ericsson it seems like there are mixed messages. Or perhaps this candidate was spinning a story on-the-fly about the technology. I have never built anything large with Erlang, so I can't say one way or another, but my impression is that Erlang is at least as viable as C++ for most applications (though perhaps not for the lower-level matrix math and numerical work we do in my day job). So, perhaps you can add *me* as one more counter-example. :-) - -Brent On Jan 28, 2006, at 6:13 AM, Ulf Wiger ((AL/EAB)) wrote: > > It's been pointed out to me that, despite my > efforts to remove ads that mentioned the Erlang > Formula, rather than the Erlang language, only > 3-4 of those ads actually mentioned the Erlang > language. Bummer. > > I also should have pointed out that none of them > actually asked for an Erlang programmer, but did > mention Erlang as a valuable skill. > > That's what I found interesting, because a long- > standing argument against Erlang has been that > nobody would want to work with it -- esp. in the > U.S. -- since it doesn't look good on your CV. > > It would of course have been nice to be able to > present more than 3-4 counter-examples... (: > > /Uffe > >> -----Original Message----- >> From: owner-erlang-questions@REDACTED >> [mailto:owner-erlang-questions@REDACTED] On Behalf Of Ulf >> Wiger (AL/EAB) >> Sent: den 27 januari 2006 18:28 >> To: Erlang Questions >> Subject: RE: Vacancy at T-Mobile >> >> >> BTW, I came across this job site: >> >> http://www.indeed.com/jobs?q=erlang+-erlangc+-%22erlang+B%22+- >> %22Erlang+ >> C%22&start=10 >> >> The above search lists 30 job ads that cite Erlang as a >> desirable skill, all of them in the U.S. (mostly CA, but also >> IL, TX, MA, OH, NY), and all of them fairly new. >> >> Regards, >> Uffe >> >>> -----Original Message----- >>> From: owner-erlang-questions@REDACTED >>> [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru >>> Sent: den 27 januari 2006 10:21 >>> To: Erlang Questions >>> Subject: Vacancy at T-Mobile >>> >>> Hello everyone, >>> >>> There is a vacancy in T-Mobile UK. Check it out if you are >> interested. >>> >>> http://careers.peopleclick.com/jobposts/Client40_TMobile/BU1/E >>> XTERNAL/pck317-42649.htm >>> >>> cheers, >>> Chandru >>> >> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFD2+kLzGDdrzfvUpURAp3/AJ9DoXFb0lgnuUtOc6ejRbyLbvO4wQCgo+qg shetjljw+PlBysZPhRR5yXM= =SZIb -----END PGP SIGNATURE----- From james.hague@REDACTED Sun Jan 29 04:05:16 2006 From: james.hague@REDACTED (James Hague) Date: Sat, 28 Jan 2006 21:05:16 -0600 Subject: Erlang standard library quirks Message-ID: I realize that the Erlang libraries are essentially set in stone, but I've built up a list of little quirks I repeatedly run into, and I thought I'd pass it along. None of these are serious. They're simply things I have to stop and think about when I need to use particular functions, whereas in a perfect world they'd be simple and automatic. 1. sets/ordsets/gb_sets and the equivalent modules for dictionaries. There are advantages and disadvantages to each, yes, but I always end up looking at each of them in the docs first before remembering which one I want. 2. The io and file modules. You open a file with file:open. You read lines out of it with io:get_line. I understand the architectural reasons behind the distinction, but that doesn't mean it isn't peculiar from just-writing-code point of view. 3. The prompt being part of io:get_line. I always want to say io:get_line(IoDevice), forgetting that the single parameter version reads from stdin and the parameter is the prompt (the correct call is io:get_line(IoDevice, ''). Feels like io:prompt_for_line(Prompt) should be a separate function, as prompts are rare. 4. The most common things I do with ets are create private sets and bags (and the ordered and duplicate variants), to the point where I have utility functions called new_set, new_bag, new_ordered_set and new_duplicate_bag, none of which take parameters. This keeps me from having to remember all the defaults and options for ets:new. Too bad these aren't part of the standard. What standard library quirks bug you? From pupeno@REDACTED Sun Jan 29 08:09:47 2006 From: pupeno@REDACTED (Pupeno) Date: Sun, 29 Jan 2006 04:09:47 -0300 Subject: Erlang crypt and Javascript In-Reply-To: <78568af10601262335q27135190w2961361967a6c357@mail.gmail.com> References: <43D99105.701@caveman.org> <78568af10601262335q27135190w2961361967a6c357@mail.gmail.com> Message-ID: <200601290409.47538.pupeno@pupeno.com> On Friday 27 January 2006 04:35, you wrote: > there must be a https something or other for > Erlang. You can always put Apache in the middle with a couple of Rewrite Rules, a technique used with Zope/Plone very often. -- Pupeno (http://pupeno.com) Vendemos: Camara de fotos rusa ????? ET (ZENIT) con flash ?????: http://pupeno.com/vendo/#camara -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From dmitriid@REDACTED Sun Jan 29 11:59:43 2006 From: dmitriid@REDACTED (Dmitrii Dimandt) Date: Sun, 29 Jan 2006 12:59:43 +0200 Subject: Erlang standard library quirks In-Reply-To: References: Message-ID: > > What standard library quirks bug you? > As I posted a while back (and got no reply either :) ) - filelib and other file-related functions do not handle Unicode characters in directory and file names. From serge@REDACTED Sun Jan 29 17:03:08 2006 From: serge@REDACTED (Serge) Date: Sun, 29 Jan 2006 11:03:08 -0500 Subject: heart does not restart node launched with run_erl In-Reply-To: <20060104212757.8E03746DDE@bang.trapexit.org> References: <20060104212757.8E03746DDE@bang.trapexit.org> Message-ID: <43DCE73C.2090300@corp.idt.net> We happened to resolve this issue by handling SIGCHLD in run_erl. When run_erl is executing $HEART_COMMAND that includes erl with a -heart option: 'run_erl ... "erl ... -heart"', the following is observed: 1. run_erl starts erl 2. erl starts heart 3. heart monitors erl If erl gets killed or exits, then 1. heart restarts HEART_COMMAND 2. new run_erl detects an active UDS (owned by old run_erl) and exits 3. heart gets terminated (since it restarted the HEART_COMMAND) 4. old run_erl gets terminated as well (I don't recall right now what triggers its termination) At the end we end up with no Erlang running. Attached is a patch to run_erl that addresses this issue by forcing run_erl to exit upon detecting the death of the node started by HEART_COMMAND. Note that this patch also includes the patch provided by Ernie Makris / Jouni Ryn? (news://news.gmane.org:119/025601c5cf6c$459cd1d0$4601a8c0@REDACTED) for RedHat ES 4.0 and Fedora. I hope it can be included in the next release. Regards, Serge erlang-questions@REDACTED wrote: > Hi all, > Ran into a weird problem. I have an embedded application that is started with run_erl from a .sh script. I also use heart to restart the application. HEART_COMMAND is set to launch the same start.sh script that was used to start the application initially. At the start, the process tree looks as follows: > > 3196 ? S 0:00 /home/drpdev/erts-5.4.10/bin/run_erl -daemon /home/drpdev/var/tmp/drp /home/drpdev/var/log/drp -exec /home/drpdev/bin/start_erl > 3202 pts/2 Ssl+ 0:02 _ /home/drpdev/erts-5.4.10/bin/beam -- -root /home/drpdev -progname drip -- -home /home/drpdev -boot /home/drpdev/releases/1. > 3222 ? Ss 0:00 _ heart -pid 3202 > 3227 ? Ss 0:00 _ inet_gethost 4 > 3228 ? S 0:00 | _ inet_gethost 4 > 3229 ? Ss 0:00 _ sh -s disksup > > To test the restart, I kill pid 3202 and see the following: > > 3222 ? Ss 0:00 heart -pid 3202 > 3196 ? S 0:00 /home/drpdev/erts-5.4.10/bin/run_erl -daemon /home/drpdev/var/tmp/drp /home/drpdev/var/log/drp -exec /home/drpdev/bin/start_erl > 3202 ? Zs 0:02 _ [beam] > > > Next, heart launches the script: > > 3253 ? S 0:00 /bin/bash /home/drpdev/bin/drip.sh start > 3272 ? S 0:00 _ sleep 3 > 3196 ? S 0:00 /home/drpdev/erts-5.4.10/bin/run_erl -daemon /home/drpdev/var/tmp/drp /home/drpdev/var/log/drp -exec /home/drpdev/bin/start_erl > 3202 ? Zs 0:02 _ [beam] > > The sleep 3 is right before it calls the run_erl command to start the embedded application. Note that the old run_erl (pid 3196) is still hanging around although the node itself (pid 3202) is defunct. > > When drip.sh calls run_erl, the old run_erl (pid 3196) goes away, but no new run_erl process appears. Application is not started either. erlang.log.1 does not showI see the following in the run_erl.log: > > ------- > Pty master read; run_erl [3196] Wed Jan 4 15:59:37 2006 > Pty master read; run_erl [3196] Wed Jan 4 16:00:46 2006 > Pty master read; run_erl [3196] Wed Jan 4 16:00:51 2006 > Pty master read; run_erl [3279] Wed Jan 4 16:00:54 2006 > /home/drpdev/erts-5.4.10/bin/run_erl: pid is : 3279 > run_erl [3196] Wed Jan 4 16:00:54 2006 > FIFO read; run_erl [3196] Wed Jan 4 16:00:54 2006 > OK > run_erl [3196] Wed Jan 4 16:00:54 2006 > Pty master read; run_erl [3196] Wed Jan 4 16:00:54 2006 > Pty master read; run_erl [3196] Wed Jan 4 16:00:54 2006 > Pty master read; run_erl [3196] Wed Jan 4 16:00:54 2006 > Erlang closed the connection. > ------- > > I am curious why new run_erl (pid 3279) process did not start. Also, why did the old run_erl (pid 3196) did not terminate until the new run_erl attempted to start? I verified that this is not a coincidence - old run_erl will remain hanging in the process list until a new run_erl is started. > > Please, let me know if anyone else experienced similar issue. If needed I can provide additional info/config files, but not sure at this point which ones. > > Thank you. > Dmitry Korsun > IDT Corp. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: run_erl.patch URL: From james.hague@REDACTED Sun Jan 29 17:04:40 2006 From: james.hague@REDACTED (James Hague) Date: Sun, 29 Jan 2006 10:04:40 -0600 Subject: Best practices: get/put In-Reply-To: <43D60B44.8090602@ericsson.com> References: <43D619B5.2000809@clubtilt.net> <43D60B44.8090602@ericsson.com> Message-ID: I would argue that using put and get is fine, if all you have is a simple process that acts as a database. It essentially give you a hash table, much like ETS (one of the things I really like about Perl and Python is that hash tables are mindlessly simple to use). But you don't want to mix puts and gets in with general purpose processing, for the reasons others have already stated. From camster@REDACTED Sun Jan 29 17:17:04 2006 From: camster@REDACTED (Richard Cameron) Date: Sun, 29 Jan 2006 16:17:04 +0000 Subject: Erlang standard library quirks In-Reply-To: References: Message-ID: <2044BAB7-4F97-4E8F-9DF4-E1440D605674@citeulike.org> On 29 Jan 2006, at 03:05, James Hague wrote: > What standard library quirks bug you? to_upper/1 and to_lower/1 are defined in the httpd_util module rather than in string. I invariably end up re-implementing these functions every time I want to use them, just because I find it criminally perverse to have the words httpd_util:to_upper(Str) in an application which doesn't do anything involving the http protocol. Richard. From chsu79@REDACTED Sun Jan 29 21:02:57 2006 From: chsu79@REDACTED (Christian S) Date: Sun, 29 Jan 2006 21:02:57 +0100 Subject: Best practices: get/put In-Reply-To: References: <43D619B5.2000809@clubtilt.net> <43D60B44.8090602@ericsson.com> Message-ID: 2006/1/29, James Hague : > > I would argue that using put and get is fine, if all you have is a > simple process that acts as a database. It essentially give you a > hash table, much like ETS (one of the things I really like about Perl > and Python is that hash tables are mindlessly simple to use). But you > don't want to mix puts and gets in with general purpose processing, > for the reasons others have already stated. > What about using it as lisp's dynamic variables, setting it before a call, and removing it after using try-after-end. I see it done sometimes. I realize how it is ugly, but it is oh so handy for simple low-arity callbacks and yet still have access to lots of state values in the same dynamic scope. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pupeno@REDACTED Sun Jan 29 22:24:11 2006 From: pupeno@REDACTED (Pupeno) Date: Sun, 29 Jan 2006 18:24:11 -0300 Subject: Vacancy at T-Mobile In-Reply-To: <200601281731.09030.danie@erlfinsys.net> References: <43DB88A2.9020203@hq.idt.net> <200601281731.09030.danie@erlfinsys.net> Message-ID: <200601291824.17334.pupeno@pupeno.com> On Saturday 28 January 2006 12:31, you wrote: > It may be a strategy to ask for e-mail addresses when downloading - and > then send a "welcoming intro mail" and a > once-every-six-month-hello-wanna-join-the-list-and-stuff? mail. You just will annoy people. It'll annoy me for sure. -- Pupeno (http://pupeno.com) Vendemos: Conocer y collecionar Monedas y Billetes de Todo el Mundo: http://pupeno.com/vendo/#monedas -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From sean.hinde@REDACTED Sun Jan 29 22:55:30 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Sun, 29 Jan 2006 16:55:30 -0500 Subject: Vacancy at T-Mobile In-Reply-To: <200601291824.17334.pupeno@pupeno.com> References: <43DB88A2.9020203@hq.idt.net> <200601281731.09030.danie@erlfinsys.net> <200601291824.17334.pupeno@pupeno.com> Message-ID: <897BFCF0-8C8E-473B-B7B1-3CE85A09126D@gmail.com> On 29 Jan 2006, at 16:24, Pupeno wrote: > On Saturday 28 January 2006 12:31, you wrote: >> It may be a strategy to ask for e-mail addresses when downloading >> - and >> then send a "welcoming intro mail" and a >> once-every-six-month-hello-wanna-join-the-list-and-stuff? mail. > You just will annoy people. It'll annoy me for sure. Another strategy might be to ask for an optional e-mail address and ask if they would like to recieve notifications of updates and irregular information bulletins. That is potentially quite useful to interested folks (as opposed to just nagware). We already have the notifications - just add them to the erlang- announce mailing list. Sean > -- > Pupeno (http://pupeno.com) > Vendemos: Conocer y collecionar Monedas y Billetes de Todo el Mundo: > http://pupeno.com/vendo/#monedas From hokan.stenholm@REDACTED Sun Jan 29 23:10:26 2006 From: hokan.stenholm@REDACTED (=?ISO-8859-1?Q?H=E5kan_Stenholm?=) Date: Sun, 29 Jan 2006 23:10:26 +0100 Subject: Erlang standard library quirks In-Reply-To: <2044BAB7-4F97-4E8F-9DF4-E1440D605674@citeulike.org> References: <2044BAB7-4F97-4E8F-9DF4-E1440D605674@citeulike.org> Message-ID: <43DD3D52.4060906@bredband.net> Richard Cameron wrote: > > On 29 Jan 2006, at 03:05, James Hague wrote: > >> What standard library quirks bug you? > > > to_upper/1 and to_lower/1 are defined in the httpd_util module rather > than in string. > > I invariably end up re-implementing these functions every time I want > to use them, just because I find it criminally perverse to have the > words httpd_util:to_upper(Str) in an application which doesn't do > anything involving the http protocol. > > Richard. > Worse is that it only works properly for the ASCII subset of latin-1 (the char encoding used by erlang), so ?, ?, ?, ? and similar chars won't be case converted at all. See: =========================================================== otp_src_R10B-8/lib/inets/src/http_server/httpd_util.erl: %% to_upper to_upper(Str) -> http_util:to_upper(Str). %% to_lower to_lower(Str) -> http_util:to_lower(Str). =========================================================== otp_src_R10B-8/lib/inets/src/http_lib/http_util.erl: to_upper(Str) -> to_upper(Str, []). to_upper([C|Cs], Acc) when C >= $a, C =< $z -> to_upper(Cs, [C-($a-$A)| Acc]); to_upper([C|Cs], Acc) -> to_upper(Cs, [C | Acc]); to_upper([], Acc) -> lists:reverse(Acc). to_lower(Str) -> to_lower(Str, []). to_lower([C|Cs], Acc) when C >= $A, C =< $Z -> to_lower(Cs, [C+($a-$A)| Acc]); to_lower([C|Cs], Acc) -> to_lower(Cs, [C| Acc]); to_lower([], Acc) -> lists:reverse(Acc). From twanvds@REDACTED Mon Jan 30 01:30:59 2006 From: twanvds@REDACTED (Twan van der Schoot) Date: Mon, 30 Jan 2006 01:30:59 +0100 Subject: Erlang crypt and Javascript In-Reply-To: <43DA5A99.2060704@caveman.org> Message-ID: Hi Samuel, I've been confronted with the same problem as you; doing crypto in flash actionscript in a big flash-base online game. Although actionscript is a nice programming language it is not particular well suited to implement cryptographical algorithms in it. But as long you don't have to do authentication and a preshared key will do, why don't you implement RC4? RC4 is in itself very fast and very easy to implement in javascript/actionscript. (But do heed the warnings mention at this site, which, btw, also shows the implementation of several other crypto algorithms in javascrip: http://www.fact-index.com/r/rc/rc4_cipher.html) good luck Twan > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Samuel > Montgomery-Blinn > Sent: vrijdag 27 januari 2006 18:39 > To: Ryan Rawson > Cc: erlang-questions@REDACTED > Subject: Re: Erlang crypt and Javascript > > > Ryan Rawson wrote: > > >Why not just use HTTPS ? JS can easily do a HTTPS get, and I'm sure > >(as an erlang newbie) there must be a https something or other for > >Erlang. > > > >-ryan > > > > > >On 1/26/06, Samuel Montgomery-Blinn wrote: > > > > > >>Are there any known Javascript encryption libraries that provide > >>compatible implementations with Erlang's crypt module? I'm having a > >>terrible time with the half-dozen Javascript implementations I've tried, > >>from Blowfish, AES, etc. This is for encrypting/decrypting the TCP > >>socket traffic between an AFLAX (aflax.org) socket (Flash ActionScript > >>XMLSocket) and an Erlang tcp server. > >> > >>-Sam > >> > >> > >> > > > > > > > Because in this case there is not an HTTP stack speaking over the port. > It is not a "pull" or "poll", which yes of course an HTTPS request would > provide. This is a bidirectional nearly raw TCP socket connection from > the Browser via Flash, going over TCP to a server listening on some > port. The server can of course take input over the socket, but there > would not be any real gain in that over using some standard AJAX calls > which would yes of course be able to take advantage of simple HTTPS. But > to push data to the client (say, multiple streams of stock updates, > logs, chat windows) without using any HTTP pull/poll request, the server > has these nearly raw TCP sockets which end up firing Shock events on the > browser. > > See: > http://aflax.org/examples/sockets/sockets.html > http://www.heliant.net/~stsai/code/ > > So to perform this without pull/poll of the HTTP/S request cycle, I need > to be able to encrypt and sign a message at the server and push the data > along the TCP pipe to the browser, which has to be able to decrypt and > verify the received data. > > -Sam > > > From pascal.brisset@REDACTED Mon Jan 30 02:06:22 2006 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Mon, 30 Jan 2006 02:06:22 +0100 Subject: Best practices: get/put In-Reply-To: <43D53D01.9050700@clubtilt.net> References: <43D53D01.9050700@clubtilt.net> Message-ID: <20060130010543.48A6C17347F@postfix3-1.free.fr> > The best practices document says that one should avoid using get/put do > store data in the process dictionary. I'm guessing that in gen_servers, > that information should actually be stored in the various State > parameters/returns, right? Some people have suggested using the process dictionary with a strict "single-assignment" or "write-once, read-many" policy. I find this acceptable and useful in some cases, e.g. when the state of a gen_server is so simple that encapsulating it in a record together with persistent configuration data would add too much syntactic overhead: | init(Config) -> | put(foo, Config#config.foo), | put(bar, Config#config.bar), | {ok, queue:new()}. | | handle_call(Call, From, Queue) -> | R = f(Call, get(foo)), | X = g(Call, get(bar)), | {reply, R, queue:in(X,Queue)}. The idea is to have some kind of process-local naming scope. Actually I would rather do it with a closure, if this didn't deprive me of most of the benefits of using a gen_server: | server(Config) -> | Foo = Config#config.foo, | Bar = Config#config.bar, | loop(queue:new(), fun(Call,From,Queue) -> | R = f(Call, Foo), | X = g(Call, Bar), | {reply, R, queue:in(X,Queue)} | end). -- Pascal From zucker@REDACTED Sun Jan 29 18:19:26 2006 From: zucker@REDACTED (Jeffery Zucker) Date: Sun, 29 Jan 2006 12:19:26 -0500 (EST) Subject: FM'06: 2nd CFP Message-ID: <200601291719.k0THJQx4019185@birkhoff.cas.mcmaster.ca> FM'06: 14TH INTERNATIONAL SYMPOSIUM ON FORMAL METHODS 21 - 27 August 2006 McMaster University, Hamilton, Ontario, Canada http://fm06.mcmaster.ca/ SECOND CALL FOR PAPERS [Apologies for multiple postings] NOTE: SUBMISSIONS CAN NOW BE MADE THROUGH THE SUBMISSION SITE AT http://fm06.mcmaster.ca/submission.htm FM'06 is the fourteenth in a series of symposia organized by Formal Methods Europe, http://www.fmeurope.org, an independent association whose aim is to stimulate the use of, and research on, formal methods for software development. The symposia have been notably successful in bringing together innovators and practitioners in precise mathematical methods for software development, industrial users as well as researchers. Submissions are welcomed in the form of original papers on research and industrial experience, proposals for workshops and tutorials, entries for the exhibition of software tools and projects, and reports on ongoing doctoral work. FM'06 welcomes all aspects of formal methods research, both theoretical and practical. We are particularly interested in the experience of applying formal methods in practice. The broad topics of interest of this conference are: * Tools for formal methods: tool support and software engineering, environments for formal methods. * Theoretical foundations: specification and modelling, refining, static analysis, model-checking, verification, calculation, reusable domain theories. * Formal methods in practice: experience with introducing formal methods in industry, case studies. * Role of formal methods: formal methods in hardware and system design, method integration, development process. TECHNICAL PAPERS Full papers should be submitted via the web site. Papers will be evaluated by the Program Committee according to their originality, significance, soundness, quality of presentation and relevance with respect to the main issues of the symposium. Accepted papers will be published in the Symposium Proceedings, to appear in Springer's Lecture Notes in Computer Science series, http://www.springeronline.com/lncs . Submitted papers should have not been submitted elsewhere for publication, should be in Springer's format, (see Springer's web site), and should not exceed 16 pages including appendices. A prize for the best technical paper will be awarded at the symposium. INDUSTRIAL USAGE REPORTS One day will be dedicated to sharing the experience -- both positive and negative -- with using formal methods in industrial environments. The Industry Day is organized by ForTIA, the Formal Techniques Industry Association, http://www.fortia.org . This year's Industry Day investigates the use of formal methods in security and trust. Invited papers on organizational and technical issues will be presented. Inquiries should be directed to the Industry Day Chairs; see the web site for details. WORKSHOPS We welcome proposals for one-day or one-and-a-half-day workshops related to FM'06. In particular, but not exclusively, we encourage proposals for workshops on various application domains. Proposals should be directed to the Workshop Chair. TUTORIALS We are soliciting proposals for full-day or half-day tutorials. The tutorial contents can be selected from a wide range of topics that reflect the conference themes and provide clear utility to practitioners. Each proposal will be evaluated on importance, relevance, timeliness, audience appeal and past experience and qualification of the instructors. Proposals should be directed to the Tutorial Chair. POSTER AND TOOL EXHIBITION An exhibition of both research projects and commercial tools will accompany the technical symposium, with the opportunity of holding scheduled presentations of commercial tools. Proposals should be directed to the Poster and Tools Exhibition Chair. DOCTORAL SYMPOSIUM For the first time, FM'06 will feature a doctoral symposium. Students are invited to submit work in progress and to defend it in front of "friendly examiners". Participation for students who are accepted will be subsidized. Submissions should be directed to the Doctoral Symposium Chair. SUBMISSION DATES Technical Papers, Workshops, Tutorials: Friday, February 24, 2006 Posters and Tools, Doctoral Symposium: Friday, May 26, 2006 NOTIFICATION DATES Technical Papers: Friday, April 28, 2006 Workshops, Tutorials: Friday, March 10, 2006 Posters and Tools, Doctoral Symposium: Friday, June 9, 2006 ORGANIZATION General Chair: Emil Sekerinski (McMaster) Program Chairs: Jayadev Misra (U. Texas, Austin), Tobias Nipkow (TU Munich) Workshop Chair: Tom Maibaum (McMaster) Tutorial Chair: Jin Song Dong (NUS) Tools and Poster Exhibition Chair: Marsha Chechik (U. Toronto) Industry Day Chairs: Volkmar Lotz (SAP France), Asuman Suenbuel (SAP US) Doctoral Symposium Chair: Augusto Sampaio (U. Pernambuco) Sponsorship Chair: Juergen Dingel (Queens U.) PROGRAM COMMITTEE Jean-Raymond Abrial (ETH Zurich) Alex Aiken (Stanford U.) Keijiro Araki (Kyushu U.) Ralph Back (Abo Akademi) Gilles Barthe (INRIA) David Basin (ETH Zurich) Ed Brinksma (U. Twente) Michael Butler (U. Southampton) Rance Cleaveland (U. Stony Brook) Jorge Cuellar (Siemens) Werner Damm (U. Oldenburg) Frank de Boer (U. Utrecht) Javier Esparza (U. Stuttgart) Jose Fiadeiro (U. Leicester) Susanne Graf (VERIMAG) Ian Hayes (U. Queensland) Gerard Holzmann (JPL) Cliff Jones (U. Newcastle) Gary T. Leavens (Iowa State U.) Rustan Leino (Microsoft) Xavier Leroy (INRIA) Dominique Mery (LORIA) Carroll Morgan (UNSW) David Naumann (Stevens) E.-R. Olderog (U. Oldenburg) Paritosh Pandya (TIFR) Sriram Rajamani (Microsoft) John Rushby (SRI) Steve Schneider (U. Surrey) Vitaly Shmatikov (U. Texas, Austin) Bernhard Steffen (U. Dortmund) P.S. Thiagarajan (NUS) Axel van Lamsweerde (U. Louvain) Martin Wirsing (LMU Munich) Pierre Wolper (U. Liege) LOCAL ORGANIZATION Publicity: Wolfram Kahl, Alan Wassyng, Jeff Zucker Tools, Posters, Book Exhibition: Spencer Smith Social Events: Ridha Khedri Local Arrangements:: William Farmer, Mark Lawford Events Co-ordinator: Ryszard Janicki From event@REDACTED Sun Jan 29 18:11:04 2006 From: event@REDACTED (event@REDACTED) Date: Sun, 29 Jan 2006 12:11:04 -0500 (EST) Subject: FM'06: 2nd CFP Message-ID: <200601291711.k0THB45e018819@birkhoff.cas.mcmaster.ca> FM'06: 14TH INTERNATIONAL SYMPOSIUM ON FORMAL METHODS 21 - 27 August 2006 McMaster University, Hamilton, Ontario, Canada http://fm06.mcmaster.ca/ SECOND CALL FOR PAPERS [Apologies for multiple postings] NOTE: SUBMISSIONS CAN NOW BE MADE THROUGH THE SUBMISSION SITE AT http://fm06.mcmaster.ca/submission.htm FM'06 is the fourteenth in a series of symposia organized by Formal Methods Europe, http://www.fmeurope.org, an independent association whose aim is to stimulate the use of, and research on, formal methods for software development. The symposia have been notably successful in bringing together innovators and practitioners in precise mathematical methods for software development, industrial users as well as researchers. Submissions are welcomed in the form of original papers on research and industrial experience, proposals for workshops and tutorials, entries for the exhibition of software tools and projects, and reports on ongoing doctoral work. FM'06 welcomes all aspects of formal methods research, both theoretical and practical. We are particularly interested in the experience of applying formal methods in practice. The broad topics of interest of this conference are: * Tools for formal methods: tool support and software engineering, environments for formal methods. * Theoretical foundations: specification and modelling, refining, static analysis, model-checking, verification, calculation, reusable domain theories. * Formal methods in practice: experience with introducing formal methods in industry, case studies. * Role of formal methods: formal methods in hardware and system design, method integration, development process. TECHNICAL PAPERS Full papers should be submitted via the web site. Papers will be evaluated by the Program Committee according to their originality, significance, soundness, quality of presentation and relevance with respect to the main issues of the symposium. Accepted papers will be published in the Symposium Proceedings, to appear in Springer's Lecture Notes in Computer Science series, http://www.springeronline.com/lncs . Submitted papers should have not been submitted elsewhere for publication, should be in Springer's format, (see Springer's web site), and should not exceed 16 pages including appendices. A prize for the best technical paper will be awarded at the symposium. INDUSTRIAL USAGE REPORTS One day will be dedicated to sharing the experience -- both positive and negative -- with using formal methods in industrial environments. The Industry Day is organized by ForTIA, the Formal Techniques Industry Association, http://www.fortia.org . This year's Industry Day investigates the use of formal methods in security and trust. Invited papers on organizational and technical issues will be presented. Inquiries should be directed to the Industry Day Chairs; see the web site for details. WORKSHOPS We welcome proposals for one-day or one-and-a-half-day workshops related to FM'06. In particular, but not exclusively, we encourage proposals for workshops on various application domains. Proposals should be directed to the Workshop Chair. TUTORIALS We are soliciting proposals for full-day or half-day tutorials. The tutorial contents can be selected from a wide range of topics that reflect the conference themes and provide clear utility to practitioners. Each proposal will be evaluated on importance, relevance, timeliness, audience appeal and past experience and qualification of the instructors. Proposals should be directed to the Tutorial Chair. POSTER AND TOOL EXHIBITION An exhibition of both research projects and commercial tools will accompany the technical symposium, with the opportunity of holding scheduled presentations of commercial tools. Proposals should be directed to the Poster and Tools Exhibition Chair. DOCTORAL SYMPOSIUM For the first time, FM'06 will feature a doctoral symposium. Students are invited to submit work in progress and to defend it in front of "friendly examiners". Participation for students who are accepted will be subsidized. Submissions should be directed to the Doctoral Symposium Chair. SUBMISSION DATES Technical Papers, Workshops, Tutorials: Friday, February 24, 2006 Posters and Tools, Doctoral Symposium: Friday, May 26, 2006 NOTIFICATION DATES Technical Papers: Friday, April 28, 2006 Workshops, Tutorials: Friday, March 10, 2006 Posters and Tools, Doctoral Symposium: Friday, June 9, 2006 ORGANIZATION General Chair: Emil Sekerinski (McMaster) Program Chairs: Jayadev Misra (U. Texas, Austin), Tobias Nipkow (TU Munich) Workshop Chair: Tom Maibaum (McMaster) Tutorial Chair: Jin Song Dong (NUS) Tools and Poster Exhibition Chair: Marsha Chechik (U. Toronto) Industry Day Chairs: Volkmar Lotz (SAP France), Asuman Suenbuel (SAP US) Doctoral Symposium Chair: Augusto Sampaio (U. Pernambuco) Sponsorship Chair: Juergen Dingel (Queens U.) PROGRAM COMMITTEE Jean-Raymond Abrial (ETH Zurich) Alex Aiken (Stanford U.) Keijiro Araki (Kyushu U.) Ralph Back (Abo Akademi) Gilles Barthe (INRIA) David Basin (ETH Zurich) Ed Brinksma (U. Twente) Michael Butler (U. Southampton) Rance Cleaveland (U. Stony Brook) Jorge Cuellar (Siemens) Werner Damm (U. Oldenburg) Frank de Boer (U. Utrecht) Javier Esparza (U. Stuttgart) Jose Fiadeiro (U. Leicester) Susanne Graf (VERIMAG) Ian Hayes (U. Queensland) Gerard Holzmann (JPL) Cliff Jones (U. Newcastle) Gary T. Leavens (Iowa State U.) Rustan Leino (Microsoft) Xavier Leroy (INRIA) Dominique Mery (LORIA) Carroll Morgan (UNSW) David Naumann (Stevens) E.-R. Olderog (U. Oldenburg) Paritosh Pandya (TIFR) Sriram Rajamani (Microsoft) John Rushby (SRI) Steve Schneider (U. Surrey) Vitaly Shmatikov (U. Texas, Austin) Bernhard Steffen (U. Dortmund) P.S. Thiagarajan (NUS) Axel van Lamsweerde (U. Louvain) Martin Wirsing (LMU Munich) Pierre Wolper (U. Liege) LOCAL ORGANIZATION Publicity: Wolfram Kahl, Alan Wassyng, Jeff Zucker Tools, Posters, Book Exhibition: Spencer Smith Social Events: Ridha Khedri Local Arrangements:: William Farmer, Mark Lawford Events Co-ordinator: Ryszard Janicki ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From dietmar@REDACTED Mon Jan 30 09:10:47 2006 From: dietmar@REDACTED (Dietmar Schaefer) Date: Mon, 30 Jan 2006 09:10:47 +0100 Subject: pg2 Message-ID: <43DDCA07.40201@ast.dfs.de> Is anybody using pg2 ? regards Dietmar From bengt.kleberg@REDACTED Mon Jan 30 10:07:31 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Mon, 30 Jan 2006 10:07:31 +0100 Subject: Erlang standard library quirks In-Reply-To: References: Message-ID: <43DDD753.6000202@ericsson.com> On 2006-01-29 04:05, James Hague wrote: ...deleted > What standard library quirks bug you? richard c had a nice collection of better (imho) alternatives to the standard library functions. i have a set i got many years ago, but does anybody know where to find them today? bengt From heinrich@REDACTED Mon Jan 30 10:16:28 2006 From: heinrich@REDACTED (Heinrich Venter) Date: Mon, 30 Jan 2006 11:16:28 +0200 Subject: Lists:sublist oddity Message-ID: I just discovered the following strange behaviour 32> lists:sublist([a,b,c],1,2). [a,b] 33> lists:sublist([a,b,c],2,2). [b,c] 34> lists:sublist([a,b,c],3,2). [c] 35> lists:sublist([a,b,c],4,2). [] 36> lists:sublist([a,b,c],5,2). =ERROR REPORT==== 30-Jan-2006::10:59:47 === Error in process <0.72.0> with exit value: {function_clause,[{lists,nthtail,[1,[ ]]},{lists,sublist,3},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_ loop,3}] } ** exited: {function_clause,[{lists,nthtail,[1,[]]}, {lists,sublist,3}, {erl_eval,do_apply,5}, {shell,exprs,6}, {shell,eval_loop,3}]} ** It would appear that sublist works according to the docs when (Start-length(List1)) = 1 but fails when (Start-length(List1)) > 1 >From the source it would appear that the documentation is wrong :( sublist WILL in fact fail if Start > length(List1)+1. -]-[einrich From matthias@REDACTED Mon Jan 30 11:05:34 2006 From: matthias@REDACTED (Matthias Lang) Date: Mon, 30 Jan 2006 11:05:34 +0100 Subject: Erlang standard library quirks In-Reply-To: References: Message-ID: <17373.58606.343419.858352@antilipe.corelatus.se> James Hague writes: > What standard library quirks bug you? Two that spring to mind: - 'string' and 'list' use conflicting argument order conventions. In the string module, all functions which operate on a string take the string as the _first_ argument. In the list module, the list is _last_ more often than not. Example: string:chr versus lists:member Not much which can be done about this, I think we're stuck with it. - The general vagueness about the speed/size properties of dict, sets, gb_trees and other data structures. gb_trees (1), which is one of the 'less vague' ones says Behaviour is logaritmic [sic] (as it should be). An alternative which is almost as terse, but more informative: Insertion, deletion and lookup are O(log N), amortised. dict is worse, with just a snooty The representation of a dictionary is not defined. it may as well say "don't you worry about that". Turns out it's a hash (2). Matthias (1): The original (?) paper about gb_trees is pleasantly lucid, a pleasure to read: http://user.it.uu.se/~arnea/abs/gb.html (2): Read the source, or http://thread.gmane.org/gmane.comp.lang.erlang.general/12385 http://www.cs.cmu.edu/afs/cs.cmu.edu/user/christos/www/courses/826-resources/PAPERS+BOOK/linear-hashing.PDF From surindar.shanthi@REDACTED Mon Jan 30 12:50:21 2006 From: surindar.shanthi@REDACTED (Surindar Sivanesan) Date: Mon, 30 Jan 2006 17:20:21 +0530 Subject: Unicode-Ascii Coversion Message-ID: <42ea5fb60601300350k757391ceuf9e258746334da28@mail.gmail.com> Hi All, I want to convert Unicode List to Ascii Code List in erlang. We are getting packets in TCP/IP communication as Unicode characters but we want to convert it as Ascii code list so thatw ecan process further and also i want to kow how to convert Ascii list to Unicode list. Can any one help to solve this. For eg the Unicode list will be like this [78,0,49,0,50,0] where the original content is "N12" in Ascii we get the same as [78,49,50]. -- with regards, S.Surindar -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomas.pihl@REDACTED Mon Jan 30 13:07:07 2006 From: tomas.pihl@REDACTED (Tomas Pihl (AL/EAB)) Date: Mon, 30 Jan 2006 13:07:07 +0100 Subject: Unicode-Ascii Coversion Message-ID: <6EFBDA899F5A1947875F4F75A10C5BB8020FA471@esealmw106.eemea.ericsson.se> > I want to convert Unicode List to Ascii Code List in erlang. > We are getting packets in TCP/IP communication as Unicode > characters but we want to convert it as Ascii code list so > thatw ecan process further and also i want to kow how to > convert Ascii list to Unicode list. > Can any one help to solve this. No experience in the area, but this might get you started. http://www.joelonsoftware.com/articles/Unicode.html --Tomas Pihl tomas.pihl@REDACTED From richardc@REDACTED Mon Jan 30 11:07:58 2006 From: richardc@REDACTED (Richard Carlsson) Date: Mon, 30 Jan 2006 11:07:58 +0100 Subject: Erlang standard library quirks In-Reply-To: <43DDD753.6000202@ericsson.com> References: <43DDD753.6000202@ericsson.com> Message-ID: <43DDE57E.20508@csd.uu.se> Bengt Kleberg wrote: > richard c had a nice collection of better (imho) alternatives to the > standard library functions. i have a set i got many years ago, but > does anybody know where to find them today? Most of what I did was organize the existing built-ins into the package system; e.g., erlang:exit/1 has an alias erl.lang:exit/1, lists:reverse/2 can be found as erl.lang.list:reverse/2, and so on. This was based on an old plan from the Standard Erlang Specification project, to rearrange the existing ad-hoc collection of bifs. When I got the package system working, I thought it was a good opportunity to use it to implement the bif-reorganizing plan, but I didn't get much enthusiasm and feedback (except from Bengt Kleberg), so it's simply been left hanging for a long time now. For the curious, the list of built-ins that have package aliases can be found in the file erts/emulator/beam/bif.tab. Since few people know about them at all, the names are not cast in stone yet. There is also a corresponding set of source files for these modules, such as erl.lang, erl.lang.list, erl.lang.term, erl.util.date, etc. I could make this available again if there is interest out there in making this an accepted set of standard libraries. (Currently they only contain a little bit of code that adds new functionality - most of it is just aliases and wrappers.) One thing that did not exist previously, but which I had in mind when I started working on these new libraries, was the try-catch construct. It was my intention that the new library functions should _not_ use the {ok, Value}/{error, Reason} return convention (except in special cases where the likelihood of error is on par with that of success). Today, the try construct is actually present and working, so maybe the time has come to get this project rolling again. It's not something that I'd want to do all on my own, though. Volounteers would be needed, both to port old library code and/or write wrapper functions, test things, argue about module and function names, and so on. The code could be put on sourceforge or similar. There would necessarily be a fairly long period of testing before it could be declared stable, so you couldn't start relying on its functions for serious work immediately, but it's a start. Any takers? /Richard From nhn@REDACTED Mon Jan 30 12:49:48 2006 From: nhn@REDACTED (Henrik Nilsson) Date: Mon, 30 Jan 2006 11:49:48 +0000 Subject: TFP2006: Third Call for Papers Message-ID: <43DDFD5C.80604@cs.nott.ac.uk> Dear Colleague, Please find enclosed the third call for papers for Trends in Functional Programming (TFP) 2006. Please note that the abstract submission deadline is fast approaching: 17 Feb. Also note the co-location with Types 2006 and the Spring School on Datatype-Generic Programming. My apologies for duplicate copies. Best regards, /Henrik -- Henrik Nilsson School of Computer Science and Information Technology The University of Nottingham nhn@REDACTED This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: TFP2006-CFP-V2.txt URL: From tobbe@REDACTED Mon Jan 30 14:06:06 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Mon, 30 Jan 2006 14:06:06 +0100 Subject: Unicode-Ascii Coversion In-Reply-To: <42ea5fb60601300350k757391ceuf9e258746334da28@mail.gmail.com> References: <42ea5fb60601300350k757391ceuf9e258746334da28@mail.gmail.com> Message-ID: Surindar Sivanesan wrote: > Hi All, > I want to convert Unicode List to Ascii Code List in erlang. > We are getting packets in TCP/IP communication as Unicode characters but > we want to convert it as Ascii code list so thatw ecan process further > and also i want to kow how to convert Ascii list to Unicode list. > Can any one help to solve this. > > For eg the Unicode list will be like this [78,0,49,0,50,0] where the > original content is "N12" in Ascii we get the same as [78,49,50]. > > -- > with regards, > S.Surindar You can try the iconv (erlmerge) package, which also is located in jungerl. I'm using it in the SMB protocol (esmb) as well as for displaying Web pages with the correct charset. Cheers, Tobbe From bengt.kleberg@REDACTED Mon Jan 30 14:23:37 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Mon, 30 Jan 2006 14:23:37 +0100 Subject: Unicode-Ascii Coversion In-Reply-To: <42ea5fb60601300350k757391ceuf9e258746334da28@mail.gmail.com> References: <42ea5fb60601300350k757391ceuf9e258746334da28@mail.gmail.com> Message-ID: <43DE1359.2070001@ericsson.com> On 2006-01-30 12:50, Surindar Sivanesan wrote: ...deleted > For eg the Unicode list will be like this [78,0,49,0,50,0] where the > original content is "N12" in Ascii we get the same as [78,49,50]. out of curiosity: what are you receiving? since one well established unicode-over-network-encoding (utf-8) has a one-to-one mapping for ascii<->utf8 i assume that you are not getting utf-8. some machine-specific unicode systems (java) use 2 octets for one unicode char. if your origininating computer is lsb (intel) then 78 for ''N'' would become [78,0]. am i correct? why does whoever-it-is-that-is-sending-to-you send machine specific unicode instead of utf-8? bengt From serge@REDACTED Mon Jan 30 14:29:58 2006 From: serge@REDACTED (Serge Aleynikov) Date: Mon, 30 Jan 2006 08:29:58 -0500 Subject: pg2 In-Reply-To: <43DDCA07.40201@ast.dfs.de> References: <43DDCA07.40201@ast.dfs.de> Message-ID: <43DE14D6.8010408@hq.idt.net> Yes, quite extensively. Dietmar Schaefer wrote: > Is anybody using pg2 ? > > > > regards > > > > Dietmar > From tobbe@REDACTED Mon Jan 30 14:38:49 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Mon, 30 Jan 2006 14:38:49 +0100 Subject: Unicode-Ascii Coversion In-Reply-To: <43DE1359.2070001@ericsson.com> References: <42ea5fb60601300350k757391ceuf9e258746334da28@mail.gmail.com> <43DE1359.2070001@ericsson.com> Message-ID: Bengt Kleberg wrote: > On 2006-01-30 12:50, Surindar Sivanesan wrote: > ...deleted > >> For eg the Unicode list will be like this [78,0,49,0,50,0] where the >> original content is "N12" in Ascii we get the same as [78,49,50]. > > > out of curiosity: what are you receiving? > > since one well established unicode-over-network-encoding (utf-8) has a > one-to-one mapping for ascii<->utf8 i assume that you are not getting > utf-8. > some machine-specific unicode systems (java) use 2 octets for one > unicode char. if your origininating computer is lsb (intel) then 78 for > ''N'' would become [78,0]. > am i correct? > why does whoever-it-is-that-is-sending-to-you send machine specific > unicode instead of utf-8? > > > bengt > It looks more like UCS2 (UTF-16) which you may get from a Windoze machine. --Tobbe From pupeno@REDACTED Mon Jan 30 14:06:08 2006 From: pupeno@REDACTED (Pupeno) Date: Mon, 30 Jan 2006 10:06:08 -0300 Subject: Vacancy at T-Mobile In-Reply-To: <897BFCF0-8C8E-473B-B7B1-3CE85A09126D@gmail.com> References: <200601291824.17334.pupeno@pupeno.com> <897BFCF0-8C8E-473B-B7B1-3CE85A09126D@gmail.com> Message-ID: <200601301006.09285.pupeno@pupeno.com> What might be good is to have a simple (one text box, one button) form on one side of the Erlang homepage where one can subscribe by typing the email and pressing a button (instead of having to navigate three or four pages to reach the mailing list page). I am a mailing list person (and a chat person) yet it took me some time to subscribe to the mailing list because it wasn't put in front of my eyes (and playing with Erlang was so much fun that I didn't care about looking it, until someone recommended it on Erlang's irc channel). -- Pupeno (http://pupeno.com) Vendemos: Kit del guitarrista: http://pupeno.com/vendo/#kit -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From rpettit@REDACTED Mon Jan 30 16:58:51 2006 From: rpettit@REDACTED (Rick Pettit) Date: Mon, 30 Jan 2006 09:58:51 -0600 Subject: pg2 In-Reply-To: <43DE14D6.8010408@hq.idt.net> References: <43DDCA07.40201@ast.dfs.de> <43DE14D6.8010408@hq.idt.net> Message-ID: <20060130155851.GA15363@vailsys.com> On Mon, Jan 30, 2006 at 08:29:58AM -0500, Serge Aleynikov wrote: > Yes, quite extensively. I do, too. -Rick > Dietmar Schaefer wrote: > >Is anybody using pg2 ? > > > > > > > >regards > > > > > > > >Dietmar > > > From serge@REDACTED Mon Jan 30 17:38:10 2006 From: serge@REDACTED (Serge Aleynikov) Date: Mon, 30 Jan 2006 11:38:10 -0500 Subject: hipe patch for glibc.i686 2.3.90 Message-ID: <43DE40F2.3070305@hq.idt.net> We ran into the hipe compilation issue (R10B-9) on Linux Fedora related to the newer GLIBC version. $ uname -a Linux stardev1.corp.idt.net 2.6.15-1.1881_FC5.idtsmp #1 SMP PREEMPT Mon Jan 30 02:16:35 EST 2006 i686 i686 i386 GNU/Linux Installed Packages glibc.i686 2.3.90-30 $ make ... /home/serge/tmp/otp_src_R10B-9/erts/obj.hybrid.beam/i686-pc-linux-gnu/hipe_x86_signal.o: In function `my_sigaction':hipe/hipe_x86_signal.c:182: undefined reference to `INIT' :hipe/hipe_x86_signal.c:192: undefined reference to `__next_sigaction' /home/serge/tmp/otp_src_R10B-9/erts/obj.hybrid.beam/i686-pc-linux-gnu/hipe_x86_signal.o: In function `hipe_signal_init':hipe/hipe_x86_signal.c:225: undefined reference to `INIT' /home/serge/tmp/otp_src_R10B-9/erts/obj.hybrid.beam/i686-pc-linux-gnu/hipe_x86_signal.o: In function `my_sigaction':hipe/hipe_x86_signal.c:182: undefined reference to `INIT' :hipe/hipe_x86_signal.c:192: undefined reference to `__next_sigaction' :hipe/hipe_x86_signal.c:182: undefined reference to `INIT' :hipe/hipe_x86_signal.c:192: undefined reference to `__next_sigaction' collect2: ld returned 1 exit status Attached is the patch. Serge -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hipe_x86_signal.c.patch URL: From mikpe@REDACTED Mon Jan 30 19:38:40 2006 From: mikpe@REDACTED (Mikael Pettersson) Date: Mon, 30 Jan 2006 19:38:40 +0100 Subject: hipe patch for glibc.i686 2.3.90 In-Reply-To: <43DE40F2.3070305@hq.idt.net> References: <43DE40F2.3070305@hq.idt.net> Message-ID: <17374.23856.858923.175573@alkaid.it.uu.se> Serge Aleynikov writes: > We ran into the hipe compilation issue (R10B-9) on Linux Fedora related > to the newer GLIBC version. > > $ uname -a > Linux stardev1.corp.idt.net 2.6.15-1.1881_FC5.idtsmp #1 SMP PREEMPT Mon > Jan 30 02:16:35 EST 2006 i686 i686 i386 GNU/Linux > > Installed Packages > glibc.i686 2.3.90-30 ... > --- erts/emulator/hipe/hipe_x86_signal.c 2006-01-30 10:27:20.000000000 -0500 > +++ erts/emulator/hipe/hipe_x86_signal.c 2006-01-30 10:15:46.000000000 -0500 > @@ -27,7 +27,7 @@ > #include > #include "hipe_signal.h" > > -#if __GLIBC__ == 2 && __GLIBC_MINOR__ == 3 > +#if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3 > /* See comment below for glibc 2.2. */ > #ifndef __USE_GNU > #define __USE_GNU /* to un-hide RTLD_NEXT */ So there will be a glibc-2.4 and FC5 will use it. Thanks for this info, but note that this patch only fixes up a compilation issue, it doesn't guarantee that the sigaction override code actually works with glibc-2.4. That requires testing with a multi-threaded runtime system that is instructed to create several threads at start-up. So I would prefer to delay applying this patch until FC5 final is released (around March 15 it seems) and I've had a chance to test it properly. /Mikael From serge@REDACTED Mon Jan 30 21:04:32 2006 From: serge@REDACTED (Serge Aleynikov) Date: Mon, 30 Jan 2006 15:04:32 -0500 Subject: hipe patch for glibc.i686 2.3.90 In-Reply-To: <17374.23856.858923.175573@alkaid.it.uu.se> References: <43DE40F2.3070305@hq.idt.net> <17374.23856.858923.175573@alkaid.it.uu.se> Message-ID: <43DE7150.2020209@hq.idt.net> Agree. This is more for those who are currently working with the 2.6.15 kernel or with the FC development branch... Mikael Pettersson wrote: > Serge Aleynikov writes: > > We ran into the hipe compilation issue (R10B-9) on Linux Fedora related > > to the newer GLIBC version. > > > > $ uname -a > > Linux stardev1.corp.idt.net 2.6.15-1.1881_FC5.idtsmp #1 SMP PREEMPT Mon > > Jan 30 02:16:35 EST 2006 i686 i686 i386 GNU/Linux > > > > Installed Packages > > glibc.i686 2.3.90-30 > ... > > --- erts/emulator/hipe/hipe_x86_signal.c 2006-01-30 10:27:20.000000000 -0500 > > +++ erts/emulator/hipe/hipe_x86_signal.c 2006-01-30 10:15:46.000000000 -0500 > > @@ -27,7 +27,7 @@ > > #include > > #include "hipe_signal.h" > > > > -#if __GLIBC__ == 2 && __GLIBC_MINOR__ == 3 > > +#if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3 > > /* See comment below for glibc 2.2. */ > > #ifndef __USE_GNU > > #define __USE_GNU /* to un-hide RTLD_NEXT */ > > So there will be a glibc-2.4 and FC5 will use it. Thanks for this info, > but note that this patch only fixes up a compilation issue, it doesn't > guarantee that the sigaction override code actually works with glibc-2.4. > That requires testing with a multi-threaded runtime system that is > instructed to create several threads at start-up. > > So I would prefer to delay applying this patch until FC5 final is released > (around March 15 it seems) and I've had a chance to test it properly. > > /Mikael > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From kostis@REDACTED Mon Jan 30 21:42:13 2006 From: kostis@REDACTED (Kostis Sagonas) Date: Mon, 30 Jan 2006 21:42:13 +0100 (MET) Subject: hipe patch for glibc.i686 2.3.90 In-Reply-To: Mail from 'Serge Aleynikov ' dated: Mon, 30 Jan 2006 15:04:32 -0500 Message-ID: <200601302042.k0UKgDLU010064@spikklubban.it.uu.se> > Agree. This is more for those who are currently working with the 2.6.15 > kernel or with the FC development branch... Although I am on the same team as Mikael, I have a slightly different opinion. Rather than disabling HiPE when using glibc-2.4, I would encourage all users who want to be on the cutting (bleeding?) edge, to apply Serge's patch and if they report any problems when using HiPE to report them to us. Best, Kostis From dgou@REDACTED Tue Jan 31 03:13:58 2006 From: dgou@REDACTED (Douglas Philips) Date: Mon, 30 Jan 2006 21:13:58 -0500 Subject: erlang.org site down? Message-ID: It seems that www.erlang.org is not responding, did I miss an outage announcement? Thanks, --D'gou From joe.armstrong@REDACTED Tue Jan 31 09:14:47 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Tue, 31 Jan 2006 09:14:47 +0100 Subject: CRC16 in erlang Message-ID: Does anybody have a CRC16 implementation in Erlang? Thanks /Joe From raimo@REDACTED Tue Jan 31 09:45:55 2006 From: raimo@REDACTED (Raimo Niskanen) Date: 31 Jan 2006 09:45:55 +0100 Subject: erlang.org and erlang.se are down! Message-ID: No, you did not miss any outage message; here it is! Sorry about the delay. We have had a power outage who's consequenses took down the web servers www.erlang.org and www.erlang.se. We are currently working on setting up replacement hardware. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From Winfried.Noeth@REDACTED Tue Jan 31 11:24:16 2006 From: Winfried.Noeth@REDACTED (Winfried Noeth) Date: Tue, 31 Jan 2006 11:24:16 +0100 Subject: MNesia Corba Session Message-ID: <43DF3AD0.6000003@ast.dfs.de> I am trying to perform MNesia queries through the MNesia corba interface. Connecting to the Orber succeeds, however all queries to a nonempty table deliver an empty list as result, no matter what the query key looks like. Direct Erlang queries to the table deliver the expected results, so everything is ok with the database. How must a Corba query key be defined to deliver a match in the table? Unfortunately, the mnesia corba session example in the erlang documentation is not working for me. Regards, Winfried From joe.armstrong@REDACTED Tue Jan 31 11:46:31 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Tue, 31 Jan 2006 11:46:31 +0100 Subject: Some Erlang problems Message-ID: Hello, Here are some Erlang problems. Now each of these problems has at some stage been solved - since I have seen the solutions - the problem is that the solutions are either not-maintained, or have totally degenerated to the point where they are unusable, or the code has just mysteriously vanished. They are the kind of problem that I need solutions to every day, but take more than 30 minutes to hack together, so often don't get done. They are not *very* difficult but they do require a certain familiarity with the system. They also don't get done because to solve them would interrupt the flow of what I'm working on, so I tend to program around them, rather than stop what I'm doing and solve them. << these fall into the funny category of nice to have stuff that never gets done, essential-but-difficult stuff (compilers, run-time, GC) gets done, trivial stuff gets done, but this stuff gets missed >> I'd like to make a list of such problems, and I'll publish the list at regular intervals and the best known solutions. To help with this I'd like you to send me either a problem, or a solution to the problem, I will try to test all solutions, and I will publish all of this in some form. For each new problem I'd like a one line summary and a description of the problem. Here's my starter list: 1. How do I read raw characters in the shell in live-no echo mode? 2. How do I start an xterm from Erlang, with raw character input/output? 3. How do I trace a sequential program? Description: 1) How do I read raw characters in the shell in live-no echo mode? I want to do live keyboard input in the shell. I want to be sent a message every time there is a keyboard event. This should be at different levels of granularity (ie I might want to get key-up key-down events, or merely key-pressed events - I want to control echoing). I want to issue control codes for cursor addressing. Typical applications read passwords, full screen editor with explicit cursor control. Can this be done in the Erlang shell at all? 2. How do I start an xterm from Erlang, with raw character input/output? This is a generalisation of 1) - I'd like to say Pid = xterm:start() and a new xterm would pop up - then I should be able to get keyboard events from the xterm and write raw character to the xterm. I'd also like keyboard resize events. Applications - write your own editor (I have a pico emacs that would work if anybody can provide the xterm) 3. How do I trace a sequential program? Is there an *easy* way to just trace a sequential bit of code, like in a Prolog debugger. I'd like to say > trace(Mod, Fun, [Args]) And then see a Leap-Trace-Back style debugger interface The entry point to each function should be displayed. I am given the options of Leaping to the next function call, or return value, or Tracing into the function I should also be able to go back at any stage. If I lept to a return value and the return value was wrong, I'd like to go back one step and retry with a Trace instead of a leap. Cheers /Joe -------------- next part -------------- An HTML attachment was scrubbed... URL: From xpdoka@REDACTED Tue Jan 31 13:51:19 2006 From: xpdoka@REDACTED (Dominic Williams) Date: Tue, 31 Jan 2006 13:51:19 +0100 (CET) Subject: Erlang standard library quirks In-Reply-To: <43DDE57E.20508@csd.uu.se> References: <43DDD753.6000202@ericsson.com> <43DDE57E.20508@csd.uu.se> Message-ID: <40775.212.155.207.253.1138711879.squirrel@www.geekisp.com> Hi Richard, > It's not something that I'd want to do all on my own, though. > Volounteers would be needed, both to port old library code and/or > write wrapper functions, test things, argue about module and function > names, and so on. The code could be put on sourceforge or similar. > There would necessarily be a fairly long period of testing before > it could be declared stable, so you couldn't start relying on its > functions for serious work immediately, but it's a start. > > Any takers? I might be interested (I care a lot about good, consistent naming and very much prefer the error handling approach you outlined)... the only problem is that I am completely opposed to the use of packages. Dominic Williams http://www.dominicwilliams.net ---- From orbitz@REDACTED Tue Jan 31 13:59:19 2006 From: orbitz@REDACTED (orbitz@REDACTED) Date: Tue, 31 Jan 2006 07:59:19 -0500 Subject: erlang.org and erlang.se are down! In-Reply-To: References: Message-ID: erlang.orgs often downness doesn't help when i tell people how fault tolerance is an important part of the language:) On Jan 31, 2006, at 3:45 AM, Raimo Niskanen wrote: > No, you did not miss any outage message; here it is! > Sorry about the delay. > > > We have had a power outage who's consequenses took down > the web servers www.erlang.org and www.erlang.se. We are > currently working on setting up replacement hardware. > > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > From rvg@REDACTED Tue Jan 31 14:01:50 2006 From: rvg@REDACTED (Rudolph van Graan) Date: Tue, 31 Jan 2006 15:01:50 +0200 Subject: CRC16 in erlang In-Reply-To: References: Message-ID: Hi Joe, Here is one which I wrote some time ago. It does work, but there might be some issues. (No guarantees on speed!) Rudolph van Graan Telecommunications Specialist Pattern Matched Technologies E-Mail: rvg@REDACTED Mobile: +27 83 390 7767 Fax: +27 12 667 5342 Web: www.patternmatched.com On 31 Jan 2006, at 10:14 AM, Joe Armstrong ((AL/EAB)) wrote: %%% File : crc16.erl %%% Author : Rudolph van Graan %%% Description : %%% Created : 18 Nov 2003 by Rudolph van Graan -module(crc16). -define(CRC16Def,[16#0000, 16#C0C1, 16#C181, 16#0140, 16#C301, 16#03C0, 16#0280, 16#C241, 16#C601, 16#06C0, 16#0780, 16#C741, 16#0500, 16#C5C1, 16#C481, 16#0440, 16#CC01, 16#0CC0, 16#0D80, 16#CD41, 16#0F00, 16#CFC1, 16#CE81, 16#0E40, 16#0A00, 16#CAC1, 16#CB81, 16#0B40, 16#C901, 16#09C0, 16#0880, 16#C841, 16#D801, 16#18C0, 16#1980, 16#D941, 16#1B00, 16#DBC1, 16#DA81, 16#1A40, 16#1E00, 16#DEC1, 16#DF81, 16#1F40, 16#DD01, 16#1DC0, 16#1C80, 16#DC41, 16#1400, 16#D4C1, 16#D581, 16#1540, 16#D701, 16#17C0, 16#1680, 16#D641, 16#D201, 16#12C0, 16#1380, 16#D341, 16#1100, 16#D1C1, 16#D081, 16#1040, 16#F001, 16#30C0, 16#3180, 16#F141, 16#3300, 16#F3C1, 16#F281, 16#3240, 16#3600, 16#F6C1, 16#F781, 16#3740, 16#F501, 16#35C0, 16#3480, 16#F441, 16#3C00, 16#FCC1, 16#FD81, 16#3D40, 16#FF01, 16#3FC0, 16#3E80, 16#FE41, 16#FA01, 16#3AC0, 16#3B80, 16#FB41, 16#3900, 16#F9C1, 16#F881, 16#3840, 16#2800, 16#E8C1, 16#E981, 16#2940, 16#EB01, 16#2BC0, 16#2A80, 16#EA41, 16#EE01, 16#2EC0, 16#2F80, 16#EF41, 16#2D00, 16#EDC1, 16#EC81, 16#2C40, 16#E401, 16#24C0, 16#2580, 16#E541, 16#2700, 16#E7C1, 16#E681, 16#2640, 16#2200, 16#E2C1, 16#E381, 16#2340, 16#E101, 16#21C0, 16#2080, 16#E041, 16#A001, 16#60C0, 16#6180, 16#A141, 16#6300, 16#A3C1, 16#A281, 16#6240, 16#6600, 16#A6C1, 16#A781, 16#6740, 16#A501, 16#65C0, 16#6480, 16#A441, 16#6C00, 16#ACC1, 16#AD81, 16#6D40, 16#AF01, 16#6FC0, 16#6E80, 16#AE41, 16#AA01, 16#6AC0, 16#6B80, 16#AB41, 16#6900, 16#A9C1, 16#A881, 16#6840, 16#7800, 16#B8C1, 16#B981, 16#7940, 16#BB01, 16#7BC0, 16#7A80, 16#BA41, 16#BE01, 16#7EC0, 16#7F80, 16#BF41, 16#7D00, 16#BDC1, 16#BC81, 16#7C40, 16#B401, 16#74C0, 16#7580, 16#B541, 16#7700, 16#B7C1, 16#B681, 16#7640, 16#7200, 16#B2C1, 16#B381, 16#7340, 16#B101, 16#71C0, 16#7080, 16#B041, 16#5000, 16#90C1, 16#9181, 16#5140, 16#9301, 16#53C0, 16#5280, 16#9241, 16#9601, 16#56C0, 16#5780, 16#9741, 16#5500, 16#95C1, 16#9481, 16#5440, 16#9C01, 16#5CC0, 16#5D80, 16#9D41, 16#5F00, 16#9FC1, 16#9E81, 16#5E40, 16#5A00, 16#9AC1, 16#9B81, 16#5B40, 16#9901, 16#59C0, 16#5880, 16#9841, 16#8801, 16#48C0, 16#4980, 16#8941, 16#4B00, 16#8BC1, 16#8A81, 16#4A40, 16#4E00, 16#8EC1, 16#8F81, 16#4F40, 16#8D01, 16#4DC0, 16#4C80, 16#8C41, 16#4400, 16#84C1, 16#8581, 16#4540, 16#8701, 16#47C0, 16#4680, 16#8641, 16#8201, 16#42C0, 16#4380, 16#8341, 16#4100, 16#81C1, 16#8081, 16#4040]). -export([calc/1]). calc(List) -> calc(List,16#5555). calc(<<>>,CRC) -> CRC; calc([],CRC) -> CRC; calc(<>,CRC) when Value =< 255-> Index = (CRC bxor Value) band 255, NewCRC = (CRC bsr 8) bxor crc_index(Index), calc(Rest,NewCRC); calc([Value|Rest],CRC) when Value =< 255-> Index = (CRC bxor Value) band 255, NewCRC = (CRC bsr 8) bxor crc_index(Index), calc(Rest,NewCRC). crc_index(N) -> lists:nth(N+1,?CRC16Def). From ulf.wiger@REDACTED Tue Jan 31 14:07:07 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 31 Jan 2006 14:07:07 +0100 Subject: early warning - new rdbms Message-ID: Just to let you know, I decided to do some cleanup before checking in the new rdbms into sourceforge. I also added a CVS label ('rdbms-1-5') to the current version at jungerl - in case someone actually would prefer the old rdbms. I'll let you know when there actually is something to test. /Uffe I wrote: > > I thought I'd let the cat out of the bag a little... > > If anyone wants to beta-test or help out with some of the > more advanced problems, let me know. > > > I've come pretty far along with a new version of rdbms. It > has several nice features, and I think it's about to make the > transition from 'somewhat interesting' to 'actually useful': ... From ulf.wiger@REDACTED Tue Jan 31 14:54:57 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 31 Jan 2006 14:54:57 +0100 Subject: erlang.org and erlang.se are down! Message-ID: You can tell them that the erlang.org website uses Apache. (: /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of > orbitz@REDACTED > Sent: den 31 januari 2006 13:59 > To: Raimo Niskanen > Cc: erlang-questions@REDACTED > Subject: Re: erlang.org and erlang.se are down! > > erlang.orgs often downness doesn't help when i tell people > how fault tolerance is an important part of the language:) > > On Jan 31, 2006, at 3:45 AM, Raimo Niskanen wrote: > > > No, you did not miss any outage message; here it is! > > Sorry about the delay. > > > > > > We have had a power outage who's consequenses took down the web > > servers www.erlang.org and www.erlang.se. We are currently > working on > > setting up replacement hardware. > > > > -- > > > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > > > > From thomasl_erlang@REDACTED Tue Jan 31 14:58:24 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Tue, 31 Jan 2006 05:58:24 -0800 (PST) Subject: CRC16 in erlang In-Reply-To: Message-ID: <20060131135824.64180.qmail@web34407.mail.mud.yahoo.com> --- Rudolph van Graan wrote: > Hi Joe, > > Here is one which I wrote some time ago. It does > work, but there > might be some issues. (No guarantees on speed!) Here is an easy speedup: -define(CRC16Def, {...}). crc_index(N) -> element(N+1, ?CRC16Def). This is O(1) time rather than O(N) and 1/2 the space of the original definition. Pretty good, but there's more. Even better: pass around CRC_tab as a parameter and you save allocating 256 words (+ up to 256 bignums; I can't find the size of a bignum at the moment, but perhaps a further 2 words/bignum?) per indexing operation :-) Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From thomas@REDACTED Tue Jan 31 15:58:59 2006 From: thomas@REDACTED (Thomas Johnsson) Date: Tue, 31 Jan 2006 15:58:59 +0100 Subject: Constant structures optimisation? (Re: CRC16 in erlang) In-Reply-To: <20060131135824.64180.qmail@web34407.mail.mud.yahoo.com> References: <20060131135824.64180.qmail@web34407.mail.mud.yahoo.com> Message-ID: <43DF7B33.7000908@skri.net> Thomas Lindgren wrote: >--- Rudolph van Graan wrote: > > > >>Hi Joe, >> >>Here is one which I wrote some time ago. It does >>work, but there >>might be some issues. (No guarantees on speed!) >> >> > >Here is an easy speedup: > >-define(CRC16Def, {...}). > >crc_index(N) -> element(N+1, ?CRC16Def). > >This is O(1) time rather than O(N) and 1/2 the space >of the original definition. Pretty good, but there's >more. > > No, it is going to be O(N') (where N' is the size of the table), since the structure ?CRC16Def will be built every time ! At least that is the way it looks by looking at the -S output of the compiler: -module(stest). -compile(export_all). -define(t,{aa,bb,cc}). crc_index(N) -> element(N, ?t). erlc -S stest.erl =====> stest.S : .... {function, crc_index, 1, 6}. {label,5}. {func_info,{atom,stest},{atom,crc_index},1}. {label,6}. {test_heap,4,1}. {put_tuple,3,{x,1}}. {put,{atom,aa}}. {put,{atom,bb}}. {put,{atom,cc}}. {bif,element,{f,0},[{x,0},{x,1}],{x,0}}. {'%live',1}. return. At least at this level of the code it looks like big structure constants are built at every call anyway. The beaviour looks similar for lists. But perhaps some lower level of the compiler discovers this and puts the constant in a constant area? -- Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From klacke@REDACTED Tue Jan 31 15:33:53 2006 From: klacke@REDACTED (Claes Wikstrom) Date: Tue, 31 Jan 2006 15:33:53 +0100 Subject: application:start(crypto) Message-ID: <43DF7551.70703@tail-f.com> I was writing code that checks that crypto application is properly started. There exists a number of reasons for crypto to fail to start - one common is that the version of libcrypto.so on the box is < 0.9.7. Thus: Eshell V5.4.10 (abort with ^G) 1> application:start(crypto). returns 'ok' even when libcrypto.so is bad or even nonexistant. A huge error report is written, but the return value from application:start() is 'ok'. This patch remedies this: [klacke@REDACTED]src > svn diff -rPREV crypto_server.erl Index: crypto_server.erl =================================================================== --- crypto_server.erl (revision 1258) +++ crypto_server.erl (working copy) @@ -35,6 +35,7 @@ start_link() -> gen_server:start_link({local, crypto_server}, crypto_server, [], []). + init([]) -> process_flag(trap_exit, true), erl_ddll:start(), @@ -43,9 +44,17 @@ erl_ddll:load_driver(LibDir, crypto_drv), Cmd = "crypto_drv elibcrypto " ++ filename:join([LibDir, "elibcrypto"]), Port = open_port({spawn, Cmd}, []), - T = ets:new(crypto_server_table, [set, protected, named_table]), - ets:insert(T, {port, Port}), - {ok, {Port, []}}. + %% check that driver is loaded, linked and working + %% since crypto_drv links towards libcrypto, this is a good thing + %% since libcrypto is known to be bad with backwards compatibility + case catch port_control(Port, 0, []) of + {'EXIT', _} -> + {stop, nodriver}; + _ -> + T = ets:new(crypto_server_table, [set, protected, named_table]), + ets:insert(T, {port, Port}), + {ok, {Port, []}} + end. %%% -------------------------------------------------------- %%% The call-back functions. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.tail-f.com -- everything is under control cellphone: +46 70 2097763 From thomasl_erlang@REDACTED Tue Jan 31 16:14:09 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Tue, 31 Jan 2006 07:14:09 -0800 (PST) Subject: Constant structures optimisation? (Re: CRC16 in erlang) In-Reply-To: <43DF7B33.7000908@skri.net> Message-ID: <20060131151409.36675.qmail@web34410.mail.mud.yahoo.com> --- Thomas Johnsson wrote: > Thomas Lindgren wrote: > > >--- Rudolph van Graan > wrote: > > > > > > > >>Hi Joe, > >> > >>Here is one which I wrote some time ago. It does > >>work, but there > >>might be some issues. (No guarantees on speed!) > >> > >> > > > >Here is an easy speedup: > > > >-define(CRC16Def, {...}). > > > >crc_index(N) -> element(N+1, ?CRC16Def). > > > >This is O(1) time rather than O(N) and 1/2 the > space > >of the original definition. Pretty good, but > there's > >more. > > > > > No, it is going to be O(N') (where N' is the size of > the table), since > the structure ?CRC16Def will be built every time ! Yes indeed, but recall that the table has a constant size N' ... The constant cost hidden inside "O(1)" is pretty hefty of course, as discussed. (By the same reasoning, the cost of looking up the element in the list is really constant too, since it is bounded by at most 254 linked list traversals. So I'll definitely admit I did give a too pessimistic O() for the original code :-) Passing around the table is still likely to be far faster in practice than either the original or the first optimized version, just as one might expect ... Note that, in the past, Hipe could build constant terms (such as this table) once and for all at compile time. I'm not sure if that functionality still remains (e.g., there were some GC issues). When this is available, the cost would be about the same as building the table once and passing it around, or even a bit better. Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From richardc@REDACTED Tue Jan 31 16:23:22 2006 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 31 Jan 2006 16:23:22 +0100 Subject: Erlang standard library quirks In-Reply-To: <40775.212.155.207.253.1138711879.squirrel@www.geekisp.com> References: <43DDD753.6000202@ericsson.com> <43DDE57E.20508@csd.uu.se> <40775.212.155.207.253.1138711879.squirrel@www.geekisp.com> Message-ID: <43DF80EA.9020601@csd.uu.se> Dominic Williams wrote: > I might be interested (I care a lot about good, consistent naming and > very much prefer the error handling approach you outlined)... the > only problem is that I am completely opposed to the use of packages. I know many people don't like to use packages. However, it's hard to add new standard modules without causing collisions with existing code out there. Unless, of course, all the new modules are given some (short) pseudo-unique prefix. Personally, I think prefixes are rather ugly, but I also don't want to force anyone to use packages. But we could have both - each function could have a package version as well as a flat-namespace-with-prefixes version. It would be easy to generate one given the other. /Richard -- "Having users is like optimization: the wise course is to delay it." -- Paul Graham From mikpe@REDACTED Tue Jan 31 16:45:38 2006 From: mikpe@REDACTED (Mikael Pettersson) Date: Tue, 31 Jan 2006 16:45:38 +0100 Subject: Constant structures optimisation? (Re: CRC16 in erlang) In-Reply-To: <20060131151409.36675.qmail@web34410.mail.mud.yahoo.com> References: <43DF7B33.7000908@skri.net> <20060131151409.36675.qmail@web34410.mail.mud.yahoo.com> Message-ID: <17375.34338.809340.845431@alkaid.it.uu.se> Thomas Lindgren writes: > > No, it is going to be O(N') (where N' is the size of > > the table), since > > the structure ?CRC16Def will be built every time ! > > Yes indeed, but recall that the table has a constant > size N' ... The constant cost hidden inside "O(1)" is > pretty hefty of course, as discussed. (By the same > reasoning, the cost of looking up the element in the > list is really constant too, since it is bounded by at > most 254 linked list traversals. So I'll definitely > admit I did give a too pessimistic O() for the > original code :-) > > Passing around the table is still likely to be far > faster in practice than either the original or the > first optimized version, just as one might expect ... > > Note that, in the past, Hipe could build constant > terms (such as this table) once and for all at compile > time. I'm not sure if that functionality still remains > (e.g., there were some GC issues). I didn't look at the original CRC16 source code, but HiPE most definitely still recognises constant terms (except binaries I think), allocates them once when the code is loaded, and references them in constant time at runtime. (There are GC issues. We have workarounds in place, but they are not perfect. In particular, there is an upper bound on the total amount of memory a system can devote to constant terms. We and the OTP folks are aware of the issues; suffice it to say that the solution is non-trivial but there has been some progress recently.) OTOH, replacing computation with lookups in large constant data structures isn't always a win. You're trading instruction execution for larger D-cache footprint: this often looks _very_ good in micro-benchmarks, but tends to be unfair and suboptimal in larger applications. /Mikael From rich.neswold@REDACTED Tue Jan 31 17:06:17 2006 From: rich.neswold@REDACTED (Rich Neswold) Date: Tue, 31 Jan 2006 10:06:17 -0600 Subject: Questions about Erlang port drivers Message-ID: <14cf844b0601310806s71b363br58dc5fef4bbbfd83@mail.gmail.com> Hello, I've written an Erlang port driver and ran across some puzzling behavior. The hardware is connected to a CM11A module (RS-232C to X-10 interface.) My driver interface is implemented as a state machine, since the protocol to the CM11A has a lot of handshaking. To avoid getting locked up if the handshaking fails, I set timeouts in the driver using driver_set_timer(). Specifically, if a state needs to timeout, it calls driver_set_timer() otherwise it calls driver_cancel_timer(). This works fine for simple X-10 commands (like turning lights on or off), but when a slower command is sent (dimming, for instance) the state machine times out waiting for a response. Adding copious debug statements revealed that the hardware was responding fine, but the Erlang runtime was calling my timeout callback! Increasing the timeout had no effect. I was able to "fix" the problem by always calling driver_cancel_timer() and then conditionally calling driver_set_timer() when changing states. I inferred from the documentation that driiver_set_timer() would cancel any pending timers before setting the new timer, but the actual behavior doesn't follow this logic. I put "fix" in quotes because maybe the problem is with concurrency. I use a thread pool (the +A command line option) when I start my application. Does the Erlang runtime guarantee only one thread is in a given instance of my driver at a time, or do I need to worry about concurrency issues? Did I misunderstand the timer function? Do we always need to call cancel_timer before calling set_timer? Any information is appreciated. -- Rich AIM : rnezzy ICQ : 174908475 From thomasl_erlang@REDACTED Tue Jan 31 19:07:36 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Tue, 31 Jan 2006 10:07:36 -0800 (PST) Subject: Constant structures optimisation? (Re: CRC16 in erlang) In-Reply-To: <17375.34338.809340.845431@alkaid.it.uu.se> Message-ID: <20060131180736.23083.qmail@web34408.mail.mud.yahoo.com> --- Mikael Pettersson wrote: > I didn't look at the original CRC16 source code, but > HiPE most definitely still recognises constant terms > (except binaries I think), allocates them once when > the code > is loaded, and references them in constant time at > runtime. Excellent! As you say, whether to actually do it is a trade-off, but in this case, I guess it would be a win. Come to think of it, my lexer might also win, by putting the generated table inside a module. Also programs like yecc could generate a comparatively compact parse table rather than the huge blob of code we get today. Ideally, the emulator should support (some form of) it w/o requiring native compilation. Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From cyberlync@REDACTED Tue Jan 31 19:55:41 2006 From: cyberlync@REDACTED (Eric Merritt) Date: Tue, 31 Jan 2006 10:55:41 -0800 Subject: Erlang standard library quirks In-Reply-To: <43DF80EA.9020601@csd.uu.se> References: <43DDD753.6000202@ericsson.com> <43DDE57E.20508@csd.uu.se> <40775.212.155.207.253.1138711879.squirrel@www.geekisp.com> <43DF80EA.9020601@csd.uu.se> Message-ID: I might be interested as well, though my time is somewhat limited. I have no problem with packages as long as the are debuggable. I have been under the impression that the debugger and packages didn't get along very well. If this is still the case (and I haven't checked in a while) then packages are probably not that useful from a practical standpoint. On 1/31/06, Richard Carlsson wrote: > Dominic Williams wrote: > > I might be interested (I care a lot about good, consistent naming and > > very much prefer the error handling approach you outlined)... the > > only problem is that I am completely opposed to the use of packages. > > I know many people don't like to use packages. However, it's hard to > add new standard modules without causing collisions with existing > code out there. Unless, of course, all the new modules are given > some (short) pseudo-unique prefix. Personally, I think prefixes are > rather ugly, but I also don't want to force anyone to use packages. > But we could have both - each function could have a package version > as well as a flat-namespace-with-prefixes version. It would be easy > to generate one given the other. > > /Richard > > -- > "Having users is like optimization: the wise course is to delay it." > -- Paul Graham > From klacke@REDACTED Tue Jan 31 21:49:04 2006 From: klacke@REDACTED (Claes Wikstrom) Date: Tue, 31 Jan 2006 21:49:04 +0100 Subject: Questions about Erlang port drivers In-Reply-To: <14cf844b0601310806s71b363br58dc5fef4bbbfd83@mail.gmail.com> References: <14cf844b0601310806s71b363br58dc5fef4bbbfd83@mail.gmail.com> Message-ID: <43DFCD40.8040809@hyber.org> Rich Neswold wrote: > Hello, > > I've written an Erlang port driver and ran across some puzzling behavior. I don't know about your timer issues, those are probably hard. However if I were to interface such slow hw as RS232 from Erlang I wouldn't use a driver. I'd use a regular port program which then communicates with erlang either over loopback or stdin/out. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From orbitz@REDACTED Tue Jan 31 21:53:57 2006 From: orbitz@REDACTED (orbitz@REDACTED) Date: Tue, 31 Jan 2006 15:53:57 -0500 Subject: erlang.org and erlang.se are down! In-Reply-To: References: Message-ID: <9d8237627b0532107cef37ff0304f1f0@ezabel.com> *THE* Erlang website not using an Erlang based httpd for it's own site? that's even worse! On Jan 31, 2006, at 8:54 AM, Ulf Wiger ((AL/EAB)) wrote: > > You can tell them that the erlang.org website > uses Apache. (: > > /Uffe > >> -----Original Message----- >> From: owner-erlang-questions@REDACTED >> [mailto:owner-erlang-questions@REDACTED] On Behalf Of >> orbitz@REDACTED >> Sent: den 31 januari 2006 13:59 >> To: Raimo Niskanen >> Cc: erlang-questions@REDACTED >> Subject: Re: erlang.org and erlang.se are down! >> >> erlang.orgs often downness doesn't help when i tell people >> how fault tolerance is an important part of the language:) >> >> On Jan 31, 2006, at 3:45 AM, Raimo Niskanen wrote: >> >>> No, you did not miss any outage message; here it is! >>> Sorry about the delay. >>> >>> >>> We have had a power outage who's consequenses took down the web >>> servers www.erlang.org and www.erlang.se. We are currently >> working on >>> setting up replacement hardware. >>> >>> -- >>> >>> / Raimo Niskanen, Erlang/OTP, Ericsson AB >>> >> >> > From ernie.makris@REDACTED Tue Jan 31 22:15:58 2006 From: ernie.makris@REDACTED (Ernie Makris) Date: Tue, 31 Jan 2006 16:15:58 -0500 Subject: erlang.org and erlang.se are down! In-Reply-To: <9d8237627b0532107cef37ff0304f1f0@ezabel.com> References: <9d8237627b0532107cef37ff0304f1f0@ezabel.com> Message-ID: <43DFD38E.30207@comcast.net> It should be moved to yaws! My vote is in. Thanks Ernie orbitz@REDACTED wrote: > *THE* Erlang website not using an Erlang based httpd for it's own > site? that's even worse! > > On Jan 31, 2006, at 8:54 AM, Ulf Wiger ((AL/EAB)) wrote: > >> >> You can tell them that the erlang.org website >> uses Apache. (: >> >> /Uffe >> >>> -----Original Message----- >>> From: owner-erlang-questions@REDACTED >>> [mailto:owner-erlang-questions@REDACTED] On Behalf Of >>> orbitz@REDACTED >>> Sent: den 31 januari 2006 13:59 >>> To: Raimo Niskanen >>> Cc: erlang-questions@REDACTED >>> Subject: Re: erlang.org and erlang.se are down! >>> >>> erlang.orgs often downness doesn't help when i tell people >>> how fault tolerance is an important part of the language:) >>> >>> On Jan 31, 2006, at 3:45 AM, Raimo Niskanen wrote: >>> >>>> No, you did not miss any outage message; here it is! >>>> Sorry about the delay. >>>> >>>> >>>> We have had a power outage who's consequenses took down the web >>>> servers www.erlang.org and www.erlang.se. We are currently >>> working on >>>> setting up replacement hardware. >>>> >>>> -- >>>> >>>> / Raimo Niskanen, Erlang/OTP, Ericsson AB >>>> >>> >>> >> > > From pete-expires-20060401@REDACTED Tue Jan 31 20:44:10 2006 From: pete-expires-20060401@REDACTED (Pete Kazmier) Date: Tue, 31 Jan 2006 14:44:10 -0500 Subject: Memoization in Erlang? Message-ID: <87irs0faid.fsf@coco.kazmier.com> The other day while reading something about dynamic programming in the #erlang channel, I decided to try and implement memoization in Erlang. I've included an implementation at the end of this message (please bear in mind I'm still a newbie). As a result of my endeavor, I have a few questions: 1) Writing higher-order functions seems to be complicated in Erlang because there is no support for varargs. Thus, in my example, I have this kludge to return an N-arg closure. Is there a better way of handling this keeping in mind that the wrapper function should have the same interface as the memoized one? 2) In my kludge, I use erlang:fun_info/1 which states that it is intended for debugging use. Does this preclude its use in my code? Should I instead just define memoize1/1, memoize2/1, memoize3/1, etc ... 3) In lieu of my kludge, I started to wonder if I could dynamically construct a string of code, then somehow compile that on the fly, and return the resulting function to the caller. Is this even possible? If so, would it have access to the closed over variable? 4) Are there better ways to implement memoization in Erlang? Would using the process dictionary be a bad idea? My first thought was to store the cached values in it, and then the whole thing could be implemented in a single function without the use of processes. memoize(Fun) -> fun(Arg) -> case get(Arg) of undefined -> Value = Fun(Arg), put(Arg, Value), Value; Value -> Value end end. However, it seems from my reading that most people would frown upon its use. I'm not sure if this use would be an exception to the rule, or if its a prime example of why it shouldn't be used. Thanks, Pete %% Attempt at memoization in Erlang. %% %% Usage: %% %% 2> F = fun(X,Y) -> io:format("Computing~n",[]), X+Y end. %% #Fun %% 3> G = memoize:memoize(F). %% #Fun %% 4> G(1,1). %% Computing %% 2 %% 5> G(1,1). %% 2 %% 6> -module(memoize). -export([memoize/1, loop/2]). memoize(Fun) -> Pid = spawn(?MODULE, loop, [Fun, dict:new()]), case erlang:fun_info(Fun, arity) of {arity, 0} -> fun() -> callit(Pid, []) end; {arity, 1} -> fun(A1) -> callit(Pid, [A1]) end; {arity, 2} -> fun(A1, A2) -> callit(Pid, [A1, A2]) end; {arity, 3} -> fun(A1, A2, A3) -> callit(Pid, [A1, A2, A3]) end; {arity, 4} -> fun(A1, A2, A3, A4) -> callit(Pid, [A1, A2, A3, A4]) end; {arity, _} -> exit(Pid, normal), erlang:error("Erlang's lack of varargs stinks doesn't it?") end. callit(Pid, Args) -> Pid ! {memo, self(), Args}, receive {_, {'EXIT', Reason}} -> erlang:error(Reason); {fresh, Value} -> Value; {cache, Value} -> Value end. loop(Fun, Cache) -> receive {memo, From, Args} -> case dict:find({args, Args}, Cache) of {ok, Value} -> From ! {cache, Value}, loop(Fun, Cache); error -> Value = (catch apply(Fun, Args)), From ! {fresh, Value}, loop(Fun, dict:store({args, Args}, Value, Cache)) end end. From rich.neswold@REDACTED Tue Jan 31 22:25:40 2006 From: rich.neswold@REDACTED (Rich Neswold) Date: Tue, 31 Jan 2006 15:25:40 -0600 Subject: Questions about Erlang port drivers In-Reply-To: <43DFCD40.8040809@hyber.org> References: <14cf844b0601310806s71b363br58dc5fef4bbbfd83@mail.gmail.com> <43DFCD40.8040809@hyber.org> Message-ID: <14cf844b0601311325r2caee820o73b97a8ff823dbf8@mail.gmail.com> On 1/31/06, Claes Wikstrom wrote: > I don't know about your timer issues, those are probably hard. The driver now appears to work. I think I've found the solution to my timer problems. I wanted some verification from someone in-the-know that would say either "yes, you need to cancel timers before setting new ones -- we'll update the documentation" or "drivers have concurrency issues and you're only masking a deeper problem.". > However if I were to interface such slow hw as RS232 from Erlang > I wouldn't use a driver. I'd use a regular port program which > then communicates with erlang either over loopback or stdin/out. I also have a "Firecracker" X-10 controller and, hopefully, one day I'll have a "ZigBee" controller (all are home automation devices.) The ZigBee controller, in particular, would require a faster interface. I want to specify the X-10 driver in the config file and have each driver support the same subset of commands. This gets a little messier when one library is a loadable driver and the next is an external process, etc. Plus (barring any concurrency issues I don't know about), the Erlang driver API is very nice to work with. Most of my time has been spent trying to find a reliable way to sync with the hardware (which I would have had to do in the external process). The second item that took quite a bit of time was the timer issues that started this message thread. That one "seems" solved. -- Rich AIM : rnezzy ICQ : 174908475 From ivan060111ad@REDACTED Sun Jan 15 05:11:42 2006 From: ivan060111ad@REDACTED (=?ISO-8859-1?Q?Ivan_Carmenates_Garc=EDa?=) Date: Sat, 14 Jan 2006 23:11:42 -0500 Subject: LAST RESUME of Pytagoriam Numbers!!! Message-ID: <43C9CB7E.7080606@cmg.jovenclub.cu> Compiled using c(py) normal in the shell. Feel free to make a new Resume on a DualCore CPU!!! Now we are re-talking about!!! Tested on Intel(R) Celeron CPU 2.13 GHz, 192 of Ram *** Pytagoriam's Numbers REPORT! *** Using N = 300 *** THE ORIGINAL IMPLEMENTATIONS (ME!)**** -py1: 14860000 mcs = 14.86 s -py2: 14843999 mcs = 14.843999 s -py3: 12749999 mcs = 12.749999 s *** Tony's implementations **** -pythag1: 11702999 mcs = 11.702999 s -pythag2: 1983999 mcs = 1.983999 s *** Hynek's implementation **** Simpler and about 5% faster version -pythag3: 1952999 mcs = 1.952999 s *** Edmond's implementation, using parallelism**** -py2E: 14843999 mcs = 14.843999 s *** Willem's implementation**** -wpythag2: 1749999 mcs = 1.749999 s *** Hynek's new implementation**** -pythag4: 1140999 mcs = 1.140999 s *** Willem's new implementation in parallel by Edmond!!!**** -wpythag2P: 1795999 mcs = 1.795999 s *** Morten's implementation**** -pythag5: 46999 mcs = 0.046999 s *** Richard's improvement**** -py3R: 46999 mcs = 0.046999 s *** NEW *** *** Joe's improvement**** -py3a: 1577999 mcs = 1.577999 s *** NEW *** Comparisons in results agains 'pythag1' Tony's function py1 returns the same than 'pythag1' py2 returns the same than 'pythag1' py3 returns the same than 'pythag1' pythag1 returns the same than 'pythag1' pythag2 returns the same than 'pythag1' pythag3 returns the same than 'pythag1' py2E returns the same than 'pythag1' wpythag2 returns the same than 'pythag1' pythag4 returns the same than 'pythag1' wpythag2P returns the same than 'pythag1' pythag5 returns the same than 'pythag1' py3R returns the same than 'pythag1' <- now are we talking about!!! (is the best!!!) py3a returns the same than 'pythag1' NOTE: Time took using timer:tc/3 function. %******************* START CODE ********************* -module(py). -compile([export_all]). start(N)-> %% My implementations. {T1,R1} = timer:tc(py,py1, [N]), {T2,R2} = timer:tc(py,py2,[N]), {T3,R3} = timer:tc(py,py3,[N]), %% Tony's improvement of the original form 3. {T4,R4} = timer:tc(py,pythag1,[N]), %% Tony's implementation. {T5,R5} = timer:tc(py,pythag2,[N]), %% Hynek's implementation. %% Simpler and about 5% faster version: {T6,R6} = timer:tc(py,pythag3,[N]), %% Edmond's implementation using parallelism. {T7,R7} = timer:tc(py,py2E,[N]), %% Willem's implementation. {T8,R8} = timer:tc(py,wpythag2,[N]), %% Hynek's new version {T9,R9} = timer:tc(py,pythag4,[N]), %% Willem's implementation in parallel by Edmond. {T10,R10} = timer:tc(py,wpythag2P,[N]), %% Morten's implementation. {T11,R11} = timer:tc(py,pythag5,[N]), %% Richard's improvement. {T12,R12} = timer:tc(py,py3R,[N]), %% Joe's improvement. {T13,R13} = timer:tc(py,py3a,[N]), io:format("~n *** Pytagoriam's Numbers REPORT! ***~n~n"), io:format("Using N = ~p~n", [N]), io:format("~n*** THE ORIGINAL IMPLEMENTATIONS (ME!)****~n"), io:format("-py1: ~p mcs = ~p s~n", [T1,T1/1000000]), io:format("-py2: ~p mcs = ~p s~n", [T2,T2/1000000]), io:format("-py3: ~p mcs = ~p s~n", [T3,T3/1000000]), io:format("~n*** Tony's implementations ****~n"), io:format("-pythag1: ~p mcs = ~p s~n", [T4,T4/1000000]), io:format("-pythag2: ~p mcs = ~p s~n", [T5,T5/1000000]), io:format("~n*** Hynek's implementation ****~n"), io:format("Simpler and about 5% faster version~n"), io:format("-pythag3: ~p mcs = ~p s~n", [T6,T6/1000000]), io:format("~n*** Edmond's implementation, using parallelism****~n"), io:format("-py2E: ~p mcs = ~p s~n", [T7,T7/1000000]), io:format("~n*** Willem's implementation****~n"), io:format("-wpythag2: ~p mcs = ~p s~n", [T8,T8/1000000]), io:format("~n*** Hynek's new implementation****~n"), io:format("-pythag4: ~p mcs = ~p s~n", [T9,T9/1000000]), io:format("~n*** Willem's new implementation in parallel by Edmond!!!****~n"), io:format("-wpythag2P: ~p mcs = ~p s~n", [T10,T10/1000000]), io:format("~n*** Morten's implementation****~n"), io:format("-pythag5: ~p mcs = ~p s~n", [T11,T11/1000000]), io:format("~n*** Richard's improvement****~n"), io:format("-py3R: ~p mcs = ~p s~n", [T12,T12/1000000]), io:format("~n*** Joe's improvement****~n"), io:format("-py3a: ~p mcs = ~p s~n", [T13,T13/1000000]), io:format("~nComparisons in results agains 'pythag1' Tony's function~n"), Rs = [{py1,R1}, {py2,R2}, {py3,R3}, {pythag1,R4}, {pythag2,R5}, {pythag3,R6}, {py2E,R7}, {wpythag2,R8}, {pythag4,R9}, {wpythag2P,R10}, {pythag5,R11}, {py3R,R12}, {py3a,R13}], lists:foreach(fun({Name, R})-> if (R=:=R4)-> io:format("~p returns the same than 'pythag1'~n", [Name]); true-> io:format("~p NO returns the same than 'pythag1'~n", [Name]) end end, Rs), io:format("~nNOTE: Time took using timer:tc/3 function.~n"). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% The original form 1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% py1(Max)-> L = lists:seq(1, Max), lists:foldr( fun(A, Acc3)-> lists:foldr( fun(B, Acc2)-> lists:foldr( fun(C, Acc)-> case ((A*A + B*B =:= C*C) andalso (A+B+C =< Max)) of true-> [{A,B,C}|Acc]; false-> Acc end end , Acc2, L) end , Acc3, L) end , [], L). %% The original form 2. py2(Max)-> lists:reverse(fora(1, [], Max)). fora(A, Acc, Max)-> Acc1 = forb(A,1, Acc, Max), case A< Max of true-> fora(A+1, Acc1, Max); false-> Acc1 end. forb(A,B, Acc, Max)-> Acc1 = forc(A,B,1, Acc, Max), case B< Max of true-> forb(A,B+1, Acc1, Max); false-> Acc1 end. forc(A,B,C, Acc, Max)-> Acc1 = case (A*A + B*B =:= C*C) andalso (A+B+C =< Max) of true-> [{A,B,C}|Acc]; _-> Acc end, case C< Max of true-> forc(A,B,C+1, Acc1, Max); false-> Acc1 end. %% The original form 3. py3(Max)-> [{A,B,C} || A<-lists:seq(1, Max), B<-lists:seq(1, Max), C<-lists:seq(1, Max), A*A + B*B =:= C*C, A+B+C =< Max]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Tony's improvement of the original form 3. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pythag1(N) -> L = lists:seq(1,N), [ {A,B,C} || A<- L, B<- L, C<- L, A+B+C =< N, A*A+B*B =:= C*C]. %% Tony's implementation. pythag2(N) -> lists:reverse(pythan2_A(1, N, [])). pythan2_A(A, N, Acc) when A> N -> Acc; pythan2_A(A, N, Acc) -> pythan2_A(A+1,N,pythan2_B(A, 1, N, Acc)). pythan2_B(A, B, N, Acc) when A+B> N -> Acc; pythan2_B(A, B, N, Acc) -> pythan2_B(A,B+1,N,pythan2_C(A, B, 1, N, Acc)). pythan2_C(A, B, C, N, Acc) when A+B+C> N -> Acc; pythan2_C(A, B, C, N, Acc) -> if A*A+B*B =:= C*C -> pythan2_C(A, B, C+1, N, [{A,B,C}|Acc]); true -> pythan2_C(A, B, C+1, N, Acc) end. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Hynek's implementation. %% Simpler and about 5% faster version: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pythag3(N) when is_integer(N) -> pythag3(N,1). pythag3(N, A) when A+2> N -> []; pythag3(N, A) -> pythag3(N, A, 1). pythag3(N, A, B) when A+B+1> N -> pythag3(N, A+1); pythag3(N, A, B) -> pythag3(N, A, B, 1). pythag3(N, A, B, C) when A+B+C> N -> pythag3(N, A, B+1); pythag3(N, A, B, C) when A*A + B*B =:= C*C -> [{A, B, C}|pythag3(N, A, B, C+1)]; pythag3(N, A, B, C) -> pythag3(N, A, B, C+1). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Edmond's implementation using parallelism. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%---- START CODE ---- py2E(Max)-> lists:flatten(lpmap(fun(A) -> forbE(A, 1, [], Max) end, lists:seq(1, Max), ordered)). forbE(A, B, Acc, Max) -> Acc1 = forcE(A, B, 1, Acc, Max), case B< Max of true -> forbE(A, B+1, Acc1, Max); false -> Acc1 end. forcE(A, B, C, Acc, Max) -> Acc1 = case (A*A + B*B =:= C*C) andalso (A+B+C =< Max) of true -> [{A,B,C}|Acc]; _ -> Acc end, case C< Max of true-> forcE(A, B, C+1, Acc1, Max); false-> Acc1 end. pythag2E(N)-> lists:flatten(lpmap(fun(A) -> pythan2_BE(A, 1, N, []) end, lists:seq(1, N), ordered)). pythan2_AE(A, N, Acc) when A> N -> Acc; pythan2_AE(A, N, Acc) -> pythan2_AE(A+1,N,pythan2_BE(A, 1, N, Acc)). pythan2_BE(A, B, N, Acc) when A+B> N -> Acc; pythan2_BE(A, B, N, Acc) -> pythan2_BE(A,B+1,N,pythan2_CE(A, B, 1, N, Acc)). pythan2_CE(A, B, C, N, Acc) when A+B+C> N -> Acc; pythan2_CE(A, B, C, N, Acc) -> if A*A+B*B =:= C*C -> pythan2_CE(A, B, C+1, N, [{A,B,C}|Acc]); true -> pythan2_CE(A, B, C+1, N, Acc) end. %% @spec lpmap(fun(), list(), (atom() = ordered|unordered)) -> list() %% @doc Spawns a process for each element in list L, performs specified %% function F against each in parallel and then returns results either %% same order as L (ordered) or in any order (unordered). %% NB: See also lpmap/4. lpmap(F, L, ordered) -> Ref = erlang:make_ref(), Pids = [lpmap_spawn_link(self(), Ref, F, I) || I<- L], lpmap_gather_ordered(Pids, Ref, [], 0, void); lpmap(F, L, unordered) -> Ref = erlang:make_ref(), lists:foreach(fun(I) -> lpmap_spawn_link(self(), Ref, F, I) end, L), lpmap_gather_unordered(length(L), Ref, [], 0, void). %% @spec lpmap(fun(), integer(), list(), (atom() = ordered|unordered)) -> list() %% @doc Same as lpmap/3 except ensures only a maximum of MaxPs parallel %% processes execute function F at any one time (i.e. first takes MaxPs %% items from list, executes F in parallel against each, then as each %% process returns, spawns another process on next item in L as long as %% active processes are less than MaxPs). %% NB: See also lpmap/4. lpmap(F, L, MaxPs, ordered) when MaxPs>0 -> Ref = erlang:make_ref(), {HPids, TPids} = if length(L)> MaxPs -> lists:split(MaxPs, L); true -> {L, []} end, Pids = [lpmap_spawn_link(self(), Ref, F, I) || I<- HPids], lpmap_gather_ordered(Pids, Ref, TPids, MaxPs, F); lpmap(F, L, MaxPs, unordered) when MaxPs>0 -> Ref = erlang:make_ref(), {HPids, TPids} = if length(L)> MaxPs -> lists:split(MaxPs, L); true -> {L, []} end, lists:foreach(fun(I) -> lpmap_spawn_link(self(), Ref, F, I) end, HPids), lpmap_gather_unordered(length(HPids), Ref, TPids, MaxPs, F). %% lpmap internal functions lpmap_spawn_link(Parent, Ref, F, I) -> spawn_link(fun() -> Parent ! {self(), Ref, F(I)} end). lpmap_gather_ordered([], _Ref, [], _MaxPs, _F) -> []; lpmap_gather_ordered([HPid|TPids], Ref, L, MaxPs, F) -> receive {HPid, Ref, Ret} when length(TPids) [H | T] = L, [Ret | lpmap_gather_ordered( lists:append(TPids, [lpmap_spawn_link(self(), Ref, F, H)]), Ref, T, MaxPs, F)]; {HPid, Ref, Ret} -> [Ret | lpmap_gather_ordered(TPids, Ref, L, MaxPs, F)] end. lpmap_gather_unordered(0, _Ref, [], _MaxPs, _F) -> []; lpmap_gather_unordered(NPs, Ref, L, MaxPs, F) -> receive {_Pid, Ref, Ret} when NPs-1 [H | T] = L, lpmap_spawn_link(self(), Ref, F, H), [Ret | lpmap_gather_unordered(NPs, Ref, T, MaxPs, F)]; {_Pid, Ref, Ret} -> [Ret | lpmap_gather_unordered(NPs-1, Ref, L, MaxPs, F)] end. %%---- END CODE ----- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Willem's implementation. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% wpythag2(N) -> L = [{A, A*A} || A<- lists:seq(1,N)], lists:flatten([forAllBs(A, A2, L, N) || {A, A2}<- L]). forAllBs(A, A2, L, N) -> [forAllCs(A, B, A + B, A2 + B2, L, N) || {B, B2}<- L, A + B< N]. forAllCs(A, B, AB, A2B2, L, N) -> [{A, B, C} || {C, C2}<- L, A2B2 =:= C2, AB + C =< N]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Hynek's new version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pythag4(N) when is_integer(N) -> pythag4(N,1). pythag4(N, A) when A+2> N -> []; pythag4(N, A) -> pythag4(N, A, A*A, 1). pythag4(N, A, _A2, B) when A+B+1> N -> pythag4(N, A+1); pythag4(N, A, A2, B) -> pythag4(N, A, A2, B, B*B, 1). pythag4(N, A, A2, B, _B2, C) when A+B+C> N -> pythag4(N, A, A2, B+1); pythag4(N, A, A2, B, B2, C) when A2 + B2 =:= C*C -> [{A, B, C}|pythag4(N, A, A2, B, B2, C+1)]; pythag4(N, A, A2, B, B2, C) -> pythag4(N, A, A2, B, B2, C+1). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Willem's implementation in parallel by Hynek %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% wpythag2P(N) -> L = [{A, A*A} || A<- lists:seq(1,N)], % For all A's lists:flatten(lpmap(fun({A, A2}) -> % For all B's in parallel [forAllCsWH(A, B, A + B, A2 + B2, L, N) || {B, B2}<- L, A + B< N] end, L, 2000, ordered)). forAllCsWH(A, B, AB, A2B2, L, N) -> [{A, B, C} || {C, C2}<- L, A2B2 =:= C2, AB + C =< N]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Morten's implementation. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% pythag5(N) when is_integer(N) -> Primes = sieve(N div 2), M1M2s = incorporate_primes([{1,1}], N, Primes), lists:usort(lists:flatten([ [{A,B,C}, {B,A,C}] || {M1, M2}<- M1M2s, M1> M2, A<- [M1-M2], B<- [2*round(math:sqrt(M1*M2))], C<- [M1+M2], A+B+C =< N])). sieve(N) when is_integer(N) -> erase(), sieve(N,2). sieve(N, K) when K>= N -> [X || X<- lists:seq(2, N), erase(X) == undefined]; sieve(N, K) -> cross_off(K, K, N div K - 1), sieve(N, find_next_in_sieve(K + 1)). cross_off(_K, _Current, 0) -> ok; cross_off(K, Current, Left) -> Next = Current + K, put(Next, out), cross_off(K, Next, Left - 1). find_next_in_sieve(K) -> case get(K) of undefined -> K; _ -> find_next_in_sieve(K+1) end. incorporate_prime(M1M2s, N, P) -> lists:flatten([incorporate_prime_single({M1,M2}, N, P)|| {M1, M2}<- M1M2s]). incorporate_prime_single({M1,M2}, N, P) -> Evens = [{X, Y} || X<- incorporate_prime_even(M1, N, P), Y<- incorporate_prime_even(M2, N, P)], Odds = [{X, Y} || X<- incorporate_prime_odd(M1, N, P), Y<- incorporate_prime_odd(M2, N, P)], Evens ++ Odds. incorporate_prime_even(M, N, P) -> incorporate_prime(M, N, P, []). incorporate_prime_odd(M, N, P) -> incorporate_prime(M * P, N, P, []). incorporate_prime(M, N, _P, Acc) when M> N/2 -> Acc; incorporate_prime(M, N, P, Acc) -> incorporate_prime(M * P * P, N, P, [M|Acc]). incorporate_primes(M1M2s, _N, []) -> M1M2s; incorporate_primes(M1M2s, N, [P|Rest]) -> M1M2s_new = incorporate_prime(M1M2s, N, P), incorporate_primes(M1M2s_new, N, Rest). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Richard's improvement. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% py3R(N)-> [{A,B,C} || A <- lists:seq(1, N div 2), B <- lists:seq(1, N - A), C <- [trunc(math:sqrt(A * A + B * B))], A + B + C =< N, A*A + B*B =:= C*C]. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Joe's improvement. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% py3a(Max) -> N = Max div 2, [{A,B,C} || A <- lists:seq(1,N+1), B <- lists:seq(1,Max-A), C <- lists:seq(1,Max-A-B), A*A + B*B =:= C*C]. %************************* END CODE************************* Cheers, Ivan. ======================================================================= Este mensaje ha sido enviado mediante el servicio de correo electronico que ofrece la Federacion de Radioaficionados de Cuba a sus miembros para respaldar el cumplimiento de los objetivos de la organizacion y su politica informativa. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas. ======================================================================= Este mensaje ha sido enviado mediante el servicio de correo electronico que ofrece la Federacion de Radioaficionados de Cuba a sus miembros para respaldar el cumplimiento de los objetivos de la organizacion y su politica informativa. La persona que envia este correo asume el compromiso de usar el servicio a tales fines y cumplir con las regulaciones establecidas.