From marthin@REDACTED Thu Dec 1 10:04:26 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Thu, 1 Dec 2005 11:04:26 +0200 Subject: geometric memory growth In-Reply-To: Message-ID: <200512010905.jB194xR13889@hades.cslab.ericsson.net> The eight day mailing-list delay strikes again! We might have a serial killer on the loose. (A.k.a. Joe's causality killer?) > -----Original Message----- > From: owner-erlang-questions@REDACTED [mailto:owner-erlang- > questions@REDACTED] On Behalf Of Ulf Wiger (AL/EAB) > Sent: 23 November 2005 15:54 > To: erlang-questions@REDACTED > Subject: geometric memory growth > > > Here's a subtle bug that caused me about one day's worth > of headache: > > [snip] > > /Uffe From ulf.wiger@REDACTED Thu Dec 1 12:58:00 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 1 Dec 2005 12:58:00 +0100 Subject: geometric memory growth Message-ID: At least now all three copies of the mail have arrived. There will be no more occurrences (I hope.) (: Interestingly, they arrived in reverse order. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of > Marthin Laubscher > Sent: den 1 december 2005 10:04 > To: erlang-questions@REDACTED > Subject: RE: geometric memory growth > > The eight day mailing-list delay strikes again! > We might have a serial killer on the loose. (A.k.a. Joe's > causality killer?) > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED [mailto:owner-erlang- > > questions@REDACTED] On Behalf Of Ulf Wiger (AL/EAB) > > Sent: 23 November 2005 15:54 > > To: erlang-questions@REDACTED > > Subject: geometric memory growth > > > > > > Here's a subtle bug that caused me about one day's worth of > headache: > > > > [snip] > > > > /Uffe > > > > > From ulf.wiger@REDACTED Thu Dec 1 15:44:49 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 1 Dec 2005 15:44:49 +0100 Subject: connecting using aliased hostname Message-ID: We played around a little with the -kernel inetrc option, and tried to use a user-defined alias to connect to a node on another machine E.g. if the official hostname is, say "gandalf", but we want to use the alias "saruman", we specify in our inetrc file {lookup, [file,native]}. {host, {10,10,10,10}, "gandalf", ["saruman"]}. and then start an erlang node with erl -kernel inetrc '"./myinetrc"' -sname n -setcookie frodo and try net:ping(n@REDACTED), it doesn't work. It seems to go wrong in recv_challenge, since the other node calls himself 'n@REDACTED'. The patch to dist_util.erl below makes us lookup the hostent record and proceed if the hostname given by the other node is either the official name (most likely) or a known alias. I admit that it is usually not terribly useful, and perhaps sometimes quite confusing to allow aliased hostnames, but on occasion, I think it can be quite nice to have. Say, for example that we have a node that connects to a system under test ("sut"). We can consistently use the nodename thenode@REDACTED in our test program. Wonderfully convenient! (Ok, crummy example. Mostly, I was curious to see if it could be made to work, after having satisfied my initial curiosity in establishing that it didn't in fact work.) /Uffe BTW, the patch isn't quite generic. It assumes 'inet'. *** $OTP_ROOT/lib/kernel-2.10.10/src/dist_util.erl Tue Aug 30 05:05:28 2005 --- dist_util.erl Thu Dec 1 15:29:31 2005 *************** *** 33,38 **** --- 33,40 ---- -include("dist_util.hrl"). -include("dist.hrl"). + -include("inet.hrl"). + -define(to_port(FSend, Socket, Data), case FSend(Socket, Data) of *************** *** 324,332 **** send_name(HSData), recv_status(HSData), {PreOtherFlags, NodeA, VersionA, ChallengeA} = recv_challenge(HSData), ! if Node =/= NodeA -> ?shutdown(no_node); ! Version =/= VersionA -> ?shutdown(no_node); ! true -> true end, {ThisFlags, OtherFlags} = adjust_flags(PreThisFlags, PreOtherFlags), --- 326,340 ---- send_name(HSData), recv_status(HSData), {PreOtherFlags, NodeA, VersionA, ChallengeA} = recv_challenge(HSData), ! GoodNode = ! if Node =/= NodeA -> ! is_alias(NodeA); ! true -> true ! end, ! GoodVsn = (Version == VersionA), ! if (GoodNode and GoodVsn) -> true; ! true -> ! ?shutdown(no_node) end, {ThisFlags, OtherFlags} = adjust_flags(PreThisFlags, PreOtherFlags), *************** *** 341,346 **** --- 349,375 ---- reset_timer(NewHSData#hs_data.timer), recv_challenge_ack(NewHSData, MyChallenge, MyCookie), connection(NewHSData). + + is_alias(Node) -> + case split_node(atom_to_list(Node), $@, []) of + [Name|Tail] -> + Host = lists:append(Tail), + case inet:gethostbyname(Host, inet) of + {ok, #hostent{h_name = OfficialName, + h_aliases = Aliases}} -> + lists:member(Host, [OfficialName|Aliases]); + _ -> + false + end; + _ -> + false + end. + + + split_node([Chr|T], Chr, Ack) -> [lists:reverse(Ack)|split_node(T, Chr, [])]; + split_node([H|T], Chr, Ack) -> split_node(T, Chr, [H|Ack]); + split_node([], _, Ack) -> [lists:reverse(Ack)]. + %% -------------------------------------------------------------- %% The connection has been established. From pascal.brisset@REDACTED Thu Dec 1 15:53:59 2005 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Thu, 1 Dec 2005 15:53:59 +0100 Subject: geometric memory growth / mail delays In-Reply-To: References: Message-ID: <20051201145335.CE78A173485@postfix3-1.free.fr> Ulf Wiger (AL/EAB) writes: > Interestingly, they arrived in reverse order. According to the SMTP headers, the delays occured in "mailgw4.ericsson.se (Symantec Mail Security)". Maybe this thing has a LIFO policy ? Since most messages are not delayed, we should assume that it explicitly manages a backlog, processing new emails as fast as possible, but going through the queued ones as a background task with lower priority. That would be the right design choice if the QoS is defined in terms of a threshold on the processing time. This could be an idea for a new variant of gen_server :-) Anyway we've had delays in France too (unrelated to erlang-questions), so this is probably just a consequence of the latest virus outbreak. -- Pascal From it4sanc@REDACTED Thu Dec 1 15:55:28 2005 From: it4sanc@REDACTED (=?UTF-8?B?Q2hyaXN0aWFuIFNhbmTDqW4=?=) Date: Thu, 01 Dec 2005 15:55:28 +0100 Subject: Question about Erlang/OTP Test Server and gen_server Message-ID: <438F0EE0.40301@ituniv.se> Hi! I'm currently studying Software Engineering & Management at the IT-University in Gothenburg. We've had a course in Erlang and are now in the middle of a project developing a team of agents for the RoboCup Simulation League. I'm the designated tester and since we've been told that we should use the test server I've been playing around a bit. My problem is that the test server doesn't seem to catch on that a gen_server has crashed. If I intentionally let the gen_server call an undefined function it crashes, as expected, but the test server reports the test as a success. Is this normal behavior? I would have thought, since the test process and the gen_server are linked, that the test server would detect the crash and flag it as a failure. Regards /Christian -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 256 bytes Desc: OpenPGP digital signature URL: From tty@REDACTED Thu Dec 1 16:11:21 2005 From: tty@REDACTED (tty@REDACTED) Date: Thu, 1 Dec 2005 10:11:21 -0500 Subject: Processing Large Mnesia dbase Message-ID: Hello, mnesia:foldl did the trick. On my 9 million records dbase it went from 64 mins on 3 nodes to 5.3 mins on 1 node. On my 14 million records it went from 9 hours to 15 mins on 1 node. Thinking about Mnesia as a traditional database and using read/dirty_read was my downfall. Thanks to all who answered my questions. t -------- Original Message -------- From: "Ulf Wiger (AL/EAB)" To: Cc: Subject: RE: Processing Large Mnesia dbase Date: Tue, 29 Nov 2005 18:00:39 +0100 > > You need to place the call to mnesia:foldl() from > within a fun passed to either mnesia:activity() or > mnesia:transaction(). If you use > mnesia:activity(Type, Fun), then Type can be either > of the valid types (ets, async_dirty, ..., sync_transaction.) > > Example: > > mnesia:activity( > transaction, > fun() -> > mnesia:foldl(fun(X,Acc) -> [X|Acc] end, [], Tab) > end). > > > /Uffe > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED] On Behalf Of > > tty@REDACTED > > Sent: den 29 november 2005 16:56 > > To: Bengt Kleberg (AL/EAB) > > Cc: erlang-questions@REDACTED > > Subject: Re: Processing Large Mnesia dbase > > > > Unfortunately I get a > > > > ** exited: {aborted,no_transaction} ** > > > > when running mnesia:foldl. > > > > I concur it would be great to hear folks with large mnesia > > experience on this matter. > > > > Thanks > > > > t > > From benefitsdragon@REDACTED Thu Dec 1 17:07:48 2005 From: benefitsdragon@REDACTED (Benefits Dragon) Date: Thu, 1 Dec 2005 16:07:48 +0000 Subject: Question about Erlang/OTP Test Server and gen_server In-Reply-To: <438F0EE0.40301@ituniv.se> References: <438F0EE0.40301@ituniv.se> Message-ID: <2db317000512010807l49136631v206860701fab414d@mail.gmail.com> Yes it is normal behaviour, if you want the gen_server crashing to be reported as a failure you have to check whether it is still alive at the end of the test and call 'exit' if it is dead or {testX, ok} if it is. (You would use the function whereis(Name) to do this, it returns 'undefined' if it is dead). I believe the reason behind this is that it is not necessarily a test case failure if a process crashes, there are many types of test where you are making sure that a process does crash on a certain scenario or when it does not necessarily constitue an error. The test server doesn't automatically link to the modules you are testing, it only reports a crash as a failure if it was the test case that caused the error, that means if your test case sends a message to a gen_server it thinks everything was fine because there was no problems sending the message -------------- next part -------------- An HTML attachment was scrubbed... URL: From raimo@REDACTED Thu Dec 1 17:44:01 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 01 Dec 2005 17:44:01 +0100 Subject: connecting using aliased hostname References: Message-ID: It should work without any change to the distribution if you force the nodename to be an aliased name; in your example start with -sname n@REDACTED ulf.wiger@REDACTED (Ulf Wiger AL/EAB) writes: > We played around a little with the -kernel inetrc > option, and tried to use a user-defined alias > to connect to a node on another machine > > E.g. if the official hostname is, say "gandalf", > but we want to use the alias "saruman", we > specify in our inetrc file > > {lookup, [file,native]}. > {host, {10,10,10,10}, "gandalf", ["saruman"]}. > > and then start an erlang node with > > erl -kernel inetrc '"./myinetrc"' -sname n -setcookie frodo > > and try net:ping(n@REDACTED), it doesn't work. > It seems to go wrong in recv_challenge, since > the other node calls himself 'n@REDACTED'. > > The patch to dist_util.erl below makes us lookup > the hostent record and proceed if the hostname > given by the other node is either the official > name (most likely) or a known alias. > > I admit that it is usually not terribly useful, > and perhaps sometimes quite confusing to allow > aliased hostnames, but on occasion, I think it > can be quite nice to have. > > Say, for example that we have a node that connects > to a system under test ("sut"). We can consistently > use the nodename thenode@REDACTED in our test program. > Wonderfully convenient! > > (Ok, crummy example. Mostly, I was curious to see if > it could be made to work, after having satisfied my > initial curiosity in establishing that it didn't in > fact work.) > > /Uffe > BTW, the patch isn't quite generic. It assumes 'inet'. > > > *** $OTP_ROOT/lib/kernel-2.10.10/src/dist_util.erl Tue Aug 30 > 05:05:28 2005 > --- dist_util.erl Thu Dec 1 15:29:31 2005 > *************** > *** 33,38 **** > --- 33,40 ---- > > -include("dist_util.hrl"). > -include("dist.hrl"). > + -include("inet.hrl"). > + > > -define(to_port(FSend, Socket, Data), > case FSend(Socket, Data) of > *************** > *** 324,332 **** > send_name(HSData), > recv_status(HSData), > {PreOtherFlags, NodeA, VersionA, ChallengeA} = > recv_challenge(HSData), > ! if Node =/= NodeA -> ?shutdown(no_node); > ! Version =/= VersionA -> ?shutdown(no_node); > ! true -> true > end, > {ThisFlags, OtherFlags} = adjust_flags(PreThisFlags, > PreOtherFlags), > --- 326,340 ---- > send_name(HSData), > recv_status(HSData), > {PreOtherFlags, NodeA, VersionA, ChallengeA} = > recv_challenge(HSData), > ! GoodNode = > ! if Node =/= NodeA -> > ! is_alias(NodeA); > ! true -> true > ! end, > ! GoodVsn = (Version == VersionA), > ! if (GoodNode and GoodVsn) -> true; > ! true -> > ! ?shutdown(no_node) > end, > {ThisFlags, OtherFlags} = adjust_flags(PreThisFlags, > PreOtherFlags), > *************** > *** 341,346 **** > --- 349,375 ---- > reset_timer(NewHSData#hs_data.timer), > recv_challenge_ack(NewHSData, MyChallenge, MyCookie), > connection(NewHSData). > + > + is_alias(Node) -> > + case split_node(atom_to_list(Node), $@, []) of > + [Name|Tail] -> > + Host = lists:append(Tail), > + case inet:gethostbyname(Host, inet) of > + {ok, #hostent{h_name = OfficialName, > + h_aliases = Aliases}} -> > + lists:member(Host, [OfficialName|Aliases]); > + _ -> > + false > + end; > + _ -> > + false > + end. > + > + > + split_node([Chr|T], Chr, Ack) -> [lists:reverse(Ack)|split_node(T, > Chr, [])]; > + split_node([H|T], Chr, Ack) -> split_node(T, Chr, [H|Ack]); > + split_node([], _, Ack) -> [lists:reverse(Ack)]. > + > > %% -------------------------------------------------------------- > %% The connection has been established. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From ulf@REDACTED Thu Dec 1 22:43:18 2005 From: ulf@REDACTED (Ulf Wiger) Date: Thu, 01 Dec 2005 22:43:18 +0100 Subject: connecting using aliased hostname In-Reply-To: References: Message-ID: Den 2005-12-01 17:44:01 skrev Raimo Niskanen : > It should work without any change to the distribution if you force > the nodename to be an aliased name; in your example start with > -sname n@REDACTED Yes, but in this case, I didn't want to change the target node - just connect to it using an alias that I had introduced on my end. I believe that in the specific case that we were looking at, the official hostnames are going to be the same for several hosts (target systems under test), and we have only the IP addresses to tell them apart. That, and possibly aliases that we introduce in our inetrc file. We would of course connect to only one of the systems at a time. /Uffe -- Ulf Wiger From matthias@REDACTED Thu Dec 1 06:37:46 2005 From: matthias@REDACTED (Matthias Lang) Date: Thu, 1 Dec 2005 06:37:46 +0100 Subject: bug in inets or erlang! In-Reply-To: <438D71CD.3040809@ericsson.com> References: <20051126145154.E9D0A5911E@bang.trapexit.org> <17288.34698.153071.494212@antilipe.corelatus.se> <438C6BF4.4040105@lundata.se> <438CABB6.9070306@hyber.org> <438D667E.3090509@synap.se> <17293.28387.241577.871056@antilipe.corelatus.se> <438D71CD.3040809@ericsson.com> Message-ID: <17294.35882.195125.898523@antilipe.corelatus.se> I think you're interpreting the manual in a way which wasn't intended by the author. I read it to mean If the underlying OS doesn't support UTC->localtime, return the the original arguments. If the conversion can't be done for some other reason, exit(badarg). Matthias Bengt Kleberg writes: > On 2005-11-30 10:20, Matthias Lang wrote: > > > Making universaltime_to_localtime work for all possible dates in the > > past and future is nontrivial. > > making universaltime_to_localtime work according to the documentation is > almost trivial. it says: > > ''Converts Universal Time Coordinated (UTC) date and time to local > date and time, if this is supported by the underlying OS. > Other- > wise, no conversion is done, and {Date1, Time1} is > returned.'' > > > i.e. if the conversion fails, just return the input. > > > bengt From oscar@REDACTED Fri Dec 2 00:10:28 2005 From: oscar@REDACTED (Oscar =?ISO-8859-1?Q?Hellstr=F6m?=) Date: Fri, 02 Dec 2005 00:10:28 +0100 Subject: Attention Debian & Ubuntu users - Erlang 10.b.8-2 available! In-Reply-To: <200511301100.49642.neumann@lostwebsite.net> References: <200511281829.40228.neumann@lostwebsite.net> <200511291410.19956.neumann@lostwebsite.net> <944da41d0511300444x27c73825l62ed336e6ad52247@mail.gmail.com> <200511301100.49642.neumann@lostwebsite.net> Message-ID: <1133478628.4970.25.camel@localhost.localdomain> I am using a package of ViM plugins assembled by Gaspar Chilingarov (nm@REDACTED) and then modified some by me. The URL for this package was supposed to be http://nothing.am/erlang/erl.tar.bz2 but I have never had any luck in downloading from there (got it sent by mail). The package does autoindent, better (then what is included in ViM) syntax highlighting, keyword completion on most bif/OTP, gen_server skeletons etc. On Wed, 2005-11-30 at 11:00 -0500, Fran?ois-Denis Gonthier wrote: > On 30 November 2005 07:44, Alex Arnon wrote: > > I'd be please to package a better Vim mode for Erlang if somebody give me an > URL to it. I don't use Vim at all so I won't know what mode is the best. > > > What is the status of the VIM Erlang mode? Last time I tested it autoindent > > was practically unimplemented. > > > > On 11/29/05, Fran?ois-Denis Gonthier wrote: > > > 'lo again > > > > > > I forgot to mention that the binary packages I've built are for i386 > > > only. I > > > don't have access to any Outer Platforms. > > > > > > Interrested people can still build the source package themselves, but > > > once the > > > package reach Debian, it'll be auto-builded for all other platforms. > > > > > > T-y > > > > > > F-D > > > > > > On 28 November 2005 18:29, Fran?ois-Denis Gonthier wrote: > > > > Hello erlang-questions, > > > > > > > > after quite a bit of struggling over the weekend, I finally managed to > > > > build version 2 of my improved Erlang packages for Debian & Ubuntu. > > > > > > > > You can get the packages at: > > > > > > > > http://neutronic.mine.nu/unstable > > > > > > > > or through apt by adding: > > > > > > > > deb http://neutronic.mine.nu/ unstable/ > > > > deb-src http://neutronic.mine.nu/ unstable/ > > > > > > > > to /etc/apt/sources.list > > > > > > > > and do: > > > > > > > > apt-get install -t . erlang, to upgrade from 10.b.7-1 > > > > > > > > The package you will get are: > > > > > > > > erlang-mode, the emacs mode alone > > > > erlang-base, architecture dependent files > > > > erlang-base-hipe, HiPE enabled architecture dependent files > > > > erlang-nox, X11 independant applications > > > > erlang-x11, applications that uses GS and thus X11 > > > > erlang-src, source files for the system (*.erl, *.hrl) > > > > > > > > If you want to install anew, you'll only have too choose between the > > > > mutually exclusive erlang-base and erlang-base-hipe and choose amongst > > > > > > the > > > > > > > other package to suit your needs. (You probably need erlang-nox at > > > > > > least). > > > > > > > The Ubuntu-friendly packages are at: > > > > http://neutronic.mine.nu/ubuntu-breezy. This is not a apt repository > > > > > > (yet), > > > > > > > so please download and install version 2 manually through dpkg. > > > > > > > > I'll try to push this package through the main Debian archives ASAP. > > > > > > > > I'll try to see if I can package the Vim Erlang mode and ESense before > > > > christmas. Both should be easy. -- Oscar Hellstr?m, oscar@REDACTED web: personal.oscarh.net jid: oscar@REDACTED icq: 52604556 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From igouy@REDACTED Fri Dec 2 00:17:07 2005 From: igouy@REDACTED (Isaac Gouy) Date: Thu, 1 Dec 2005 15:17:07 -0800 (PST) Subject: Computer Language Shootout - concurrency Message-ID: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> We are now managing to get Erlang to the top of our "concurrency" tests ;-) chameneos http://shootout.alioth.debian.org/gp4/benchmark.php?test=chameneos&lang=all cheap-concurrency http://shootout.alioth.debian.org/gp4/benchmark.php?test=message&lang=all __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From sean.hinde@REDACTED Fri Dec 2 00:44:33 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Thu, 1 Dec 2005 23:44:33 +0000 Subject: Computer Language Shootout - concurrency In-Reply-To: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> Message-ID: <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> Hi, Looks great. BTW there is a typo bug in the "cheap-concurrency" erlang code. Sean On 1 Dec 2005, at 23:17, Isaac Gouy wrote: > We are now managing to get Erlang to the top of our > "concurrency" tests ;-) > > chameneos > http://shootout.alioth.debian.org/gp4/benchmark.php? > test=chameneos&lang=all > > cheap-concurrency > http://shootout.alioth.debian.org/gp4/benchmark.php? > test=message&lang=all > > > > __________________________________________ > Yahoo! DSL ? Something to write home about. > Just $16.99/mo. or less. > dsl.yahoo.com > From igouy@REDACTED Fri Dec 2 01:19:40 2005 From: igouy@REDACTED (Isaac Gouy) Date: Thu, 1 Dec 2005 16:19:40 -0800 (PST) Subject: Computer Language Shootout - concurrency In-Reply-To: <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> Message-ID: <20051202001940.56118.qmail@web33815.mail.mud.yahoo.com> --- Sean Hinde wrote: > BTW there is a typo bug in the "cheap-concurrency" > erlang code. What is the bug? __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From sean.hinde@REDACTED Fri Dec 2 01:54:07 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Fri, 2 Dec 2005 00:54:07 +0000 Subject: Computer Language Shootout - concurrency In-Reply-To: <20051202001940.56118.qmail@web33815.mail.mud.yahoo.com> References: <20051202001940.56118.qmail@web33815.mail.mud.yahoo.com> Message-ID: <16C05734-BDC2-473F-91B5-477FA727F307@gmail.com> -module(message). ... start(X, LastPID) -> start(X-1, spawn(message1, loop, [LastPID])). The first parameter of the spawn (message1) should be the module name (which is message) Sean On 2 Dec 2005, at 00:19, Isaac Gouy wrote: > --- Sean Hinde wrote: >> BTW there is a typo bug in the "cheap-concurrency" >> erlang code. > > What is the bug? > > > > __________________________________________ > Yahoo! DSL ? Something to write home about. > Just $16.99/mo. or less. > dsl.yahoo.com > From ulf.wiger@REDACTED Fri Dec 2 08:59:26 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 2 Dec 2005 08:59:26 +0100 Subject: Computer Language Shootout - concurrency Message-ID: Nice, even though the tests don't really involve massive concurrency. 500 threads is not a terribly large number. You can still begin to suspect which environments don't scale properly when the number of threads increases. But neither the Erlang nor the Haskell programs seem to use "explicitly linked processes". It probably won't matter much for the outcome. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Isaac Gouy > Sent: den 2 december 2005 00:17 > To: erlang-questions@REDACTED > Subject: Computer Language Shootout - concurrency > > We are now managing to get Erlang to the top of our > "concurrency" tests ;-) > > chameneos > http://shootout.alioth.debian.org/gp4/benchmark.php?test=chame > neos&lang=all > > cheap-concurrency > http://shootout.alioth.debian.org/gp4/benchmark.php?test=messa > ge&lang=all > > > > __________________________________________ > Yahoo! DSL - Something to write home about. > Just $16.99/mo. or less. > dsl.yahoo.com > > From xlcr@REDACTED Fri Dec 2 10:30:24 2005 From: xlcr@REDACTED (Nick Linker) Date: Fri, 02 Dec 2005 15:30:24 +0600 Subject: Computer Language Shootout - concurrency In-Reply-To: <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> Message-ID: <43901430.3040801@mail.ru> Sean Hinde wrote: > Hi, > > Looks great. A fly in the ointment - the Ackermann function: http://shootout.alioth.debian.org/gp4/benchmark.php?test=ackermann&lang=all Erlang HiPE - 15th place. ;-) From ulf.wiger@REDACTED Fri Dec 2 11:34:44 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 2 Dec 2005 11:34:44 +0100 Subject: Computer Language Shootout - concurrency Message-ID: Nick Linker wrote: > > Sean Hinde wrote: > > > Hi, > > > > Looks great. > > A fly in the ointment - the Ackermann function: > http://shootout.alioth.debian.org/gp4/benchmark.php?test=acker > mann&lang=all > > Erlang HiPE - 15th place. ;-) Maybe we should have something like Ada 95 GNAT: pragma Suppress(All_Checks); ;-) Seriously, I tried inserting is_integer/1 guards, and it actually slowed things down significantly. I thought that, worst case, it wouldn't make a difference. As it is now, the compiler inserts the is_integer/1 checks, but doesn't act on the result. Eventually, the function splus_2 in erl_arith.c ends up being called, and it turns around and calls erts_mixed_plus(), which is so complex, I didn't even bother to understand it. It does handle all combinations of smallints, bignums and floats. Isn't it so that the most common case of all (and probably one of the most frequently executed operations) would be smallint_plus_2()? If there were is_smallint/1 guards, the compiler could probably speed this up significantly. It would still have to check for bignum results, of course. Of course, I'm no compiler writer, so I'm fully prepared for someone to tell me that I don't have the faintest idea what I'm talking about. (: /Uffe > From erlang@REDACTED Fri Dec 2 11:36:34 2005 From: erlang@REDACTED (Peter-Henry Mander) Date: Fri, 02 Dec 2005 10:36:34 +0000 Subject: Computer Language Shootout - concurrency In-Reply-To: <43901430.3040801@mail.ru> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> Message-ID: <1133519794.7810.35.camel@hymir.newport-networks.com> ... 15th place between C# and Java, beating Java memory consumption 2:5, and close to C# memory consumption. Python, Perl and Ruby are far behind. That's not bad at all! The languages I recognise that do better are compiled to native binary and don't use GC. In the overall statistics the Haskell GHC results appear awesome, but mainly due to 'sum-file', 'startup' and 'random'. Remove those and the missing tests in the overall scores and the match is a lot closer: Haskell 38.75 vs. Erlang HiPE 30.91 Note that C gcc falls to 24.65 with these criteria. So, beware of benchmarks, you can make them say whatever you want. Pete. P.s. "Lies, damn lies and statistics!" On Fri, 2005-12-02 at 15:30 +0600, Nick Linker wrote: > Sean Hinde wrote: > > > Hi, > > > > Looks great. > > A fly in the ointment - the Ackermann function: > http://shootout.alioth.debian.org/gp4/benchmark.php?test=ackermann?=all > > Erlang HiPE - 15th place. ;-) > From bjorn@REDACTED Fri Dec 2 10:13:06 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 02 Dec 2005 10:13:06 +0100 Subject: Question about Erlang/OTP Test Server and gen_server In-Reply-To: <438F0EE0.40301@ituniv.se> References: <438F0EE0.40301@ituniv.se> Message-ID: Christian Sand?n writes: > My problem is that the test server doesn't seem to catch on that a > gen_server has crashed. If I intentionally let the gen_server call an > undefined function it crashes, as expected, but the test server reports > the test as a success. > > Is this normal behavior? I would have thought, since the test process > and the gen_server are linked, that the test server would detect the > crash and flag it as a failure. Maybe your test case has finished before EXIT signal from the gen_server kills it? Or does your test case process trap exits? /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From igouy@REDACTED Fri Dec 2 18:37:04 2005 From: igouy@REDACTED (Isaac Gouy) Date: Fri, 2 Dec 2005 09:37:04 -0800 (PST) Subject: Computer Language Shootout - concurrency In-Reply-To: Message-ID: <20051202173704.7647.qmail@web33805.mail.mud.yahoo.com> > Nice, even though the tests don't really involve > massive concurrency. 500 threads is not a > terribly large number. You can still begin to > suspect which environments don't scale properly > when the number of threads increases. We started off using 1500 threads but too many language implementations failed or timed out. > But neither the Erlang nor the Haskell programs > seem to use "explicitly linked processes". It > probably won't matter much for the outcome. My trusting nature is by-now fairly battered. __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs From thomasl_erlang@REDACTED Sat Dec 3 13:31:44 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Sat, 3 Dec 2005 04:31:44 -0800 (PST) Subject: geometric memory growth In-Reply-To: Message-ID: <20051203123144.89936.qmail@web34403.mail.mud.yahoo.com> --- "Ulf Wiger (AL/EAB)" wrote: > Thomas Lindgren wrote: > > ... > ... > I don't know if that qualifies as cheap enough. In conventional compilers, "cheap enough" is individual instructions with latencies on the order of a few cycles. (Changing a loop iteration by a single cycle can yield visible differences there.) For high-level languages, I guess we are still sounding out the terrain. (If one looks at competing SML compilers, for example, they still seem to vary in performance by big factors on different benchmarks.) > To make my point clearer, I think this particular > behaviour should be documented _somewhere_. Yes, basically it should be made clear that the variables bound outside and used inside (AND not shadowed :-) will be passed around with the fun as the fun environment. (Aka lexical scoping.) > - During message passing, not only does the runtime > system copy the data - it expands all relative > references into individual copies (I knew this > happened when sending between nodes, but hadn't > considered that it also might happen during > local message passing.) A somewhat nasty issue. > To boot, the "bug" was very difficult to spot, /.../ Maybe there should be some way to determine the "size" of a closure and the amount of memory copied when a message is passed (e.g., in the process info)? > Opinions may vary, but as a representative of a > project that builds resonably performance-critical > software in Erlang, I would still rather take > a very slight performance hit in order to have > a treatment of a reasonably commonplace pattern > that works wonderfully 99.9% of the time, and > kills the system if someone has the bad luck > of passing the variable in a message (perhaps > as part of a debug printout.) Do ensure that the optimization is not "brittle" in that case: that it performs well in a variety of situations, and that it is well-known why it occurs or not. And that you can see what's killing the system when you turn out to be the thousandth one, and preferrably can do something about it. Best, Thomas __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From thomasl_erlang@REDACTED Sat Dec 3 13:38:09 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Sat, 3 Dec 2005 04:38:09 -0800 (PST) Subject: Computer Language Shootout - concurrency In-Reply-To: Message-ID: <20051203123809.21350.qmail@web34414.mail.mud.yahoo.com> --- "Ulf Wiger (AL/EAB)" wrote: > If there were is_smallint/1 guards, the compiler > could probably speed this up significantly. > It would still have to check for bignum results, > of course. Yes, in principle it could. A sufficiently smart compiler (similar to SELF-91) could even clone two copies of the code, stay in the fixnum version normally, and jump to the general version on overflow. Best, Thomas __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs From thomasl_erlang@REDACTED Sat Dec 3 13:43:12 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Sat, 3 Dec 2005 04:43:12 -0800 (PST) Subject: Computer Language Shootout - concurrency In-Reply-To: <1133519794.7810.35.camel@hymir.newport-networks.com> Message-ID: <20051203124312.64056.qmail@web34401.mail.mud.yahoo.com> --- Peter-Henry Mander wrote: > So, beware of benchmarks, you can make them say > whatever you want. Heh heh, how true :-) Well, if everything has to be reduced to a single number, then, er, some imprecision may of course occur. And if one does the benchmarking to prove a point, things might be a bit worse than just imprecise. Best, Thomas __________________________________________ Yahoo! DSL ? Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com From will@REDACTED Sat Dec 3 17:15:01 2005 From: will@REDACTED (Will Newton) Date: Sat, 3 Dec 2005 16:15:01 +0000 Subject: Computer Language Shootout - concurrency In-Reply-To: <20051203123809.21350.qmail@web34414.mail.mud.yahoo.com> References: <20051203123809.21350.qmail@web34414.mail.mud.yahoo.com> Message-ID: <200512031615.02067.will@misconception.org.uk> On Saturday 03 December 2005 12:38, Thomas Lindgren wrote: > Yes, in principle it could. A sufficiently smart > compiler (similar to SELF-91) could even clone two > copies of the code, stay in the fixnum version > normally, and jump to the general version on overflow. The psyco specializing JIT compiler for Python does this type of optimization on the fly. The implementation is quite complex however. http://psyco.sourceforge.net/ From michael206@REDACTED Sat Dec 3 19:50:29 2005 From: michael206@REDACTED (Michael Leonhard) Date: Sat, 3 Dec 2005 12:50:29 -0600 Subject: OTP style supervision trees for spacecraft Message-ID: <21f8b6e20512031050j22c8f18ct3522e28ab0aadd61@mail.gmail.com> Hello Erlang Experts and Users, Some of you may be interested in a research proposal that has been accepted by NASA for funding. The proposal is for the development of reliable software systems for spacecraft. Information in the abstract indicates that it will use a method similar to OTP's supervision trees. In addition, it will try to correct single bit errors caused by radiation and manage computer resources. Memory management was a problem for NASA's Spirit rover, on Mars last year. How does Erlang handle the situation where all virtual memory has been exhausted? Can Erlang's bytecode format be extended to facilitate detection of single bit errors? Mitigating Software Failures with Distributed and Recovery-Oriented Flight System Architectures: http://tinyurl.com/a4w8v http://sbir.gsfc.nasa.gov/SBIR/abstracts/05/sttr/phase1/STTR-05-1-T1.01-9797.html?solicitationId=STTR_05_P1 The listing of all accepted proposals, NASA Small Business Technology Transfer (STTR) Program: http://tinyurl.com/adl45 http://sbir.gsfc.nasa.gov/SBIR/sttr2005/phase1/awards/2005ri.html -Michael Michael Leonhard michael206@REDACTED http://tamale.net/ From vances@REDACTED Sat Dec 3 16:10:57 2005 From: vances@REDACTED (Vance Shipley) Date: Sat, 3 Dec 2005 15:10:57 +0000 Subject: OTP style supervision trees for spacecraft In-Reply-To: <21f8b6e20512031050j22c8f18ct3522e28ab0aadd61@mail.gmail.com> References: <21f8b6e20512031050j22c8f18ct3522e28ab0aadd61@mail.gmail.com> Message-ID: <20051203151057.GK14091@feeble.motivity.ca> On Sat, Dec 03, 2005 at 12:50:29PM -0600, Michael Leonhard wrote: } } How does Erlang handle the situation where all virtual memory has been } exhausted? By core dumping. :( -Vance From ulf@REDACTED Sat Dec 3 23:30:50 2005 From: ulf@REDACTED (Ulf Wiger) Date: Sat, 03 Dec 2005 23:30:50 +0100 Subject: geometric memory growth In-Reply-To: <20051203123144.89936.qmail@web34403.mail.mud.yahoo.com> References: <20051203123144.89936.qmail@web34403.mail.mud.yahoo.com> Message-ID: Den 2005-12-03 13:31:44 skrev Thomas Lindgren : > --- "Ulf Wiger (AL/EAB)" > wrote: > >> To boot, the "bug" was very difficult to spot, /.../ > > Maybe there should be some way to determine the "size" > of a closure and the amount of memory copied when a > message is passed (e.g., in the process info)? There is: erts_debug:size/1. To my knowledge, it isn't documented. /Uffe -- Ulf Wiger From ulf@REDACTED Sun Dec 4 09:12:18 2005 From: ulf@REDACTED (Ulf Wiger) Date: Sun, 04 Dec 2005 09:12:18 +0100 Subject: geometric memory growth In-Reply-To: References: <20051203123144.89936.qmail@web34403.mail.mud.yahoo.com> Message-ID: Den 2005-12-03 23:30:50 skrev Ulf Wiger : > Den 2005-12-03 13:31:44 skrev Thomas Lindgren : > >> --- "Ulf Wiger (AL/EAB)" >> wrote: >> >>> To boot, the "bug" was very difficult to spot, /.../ >> >> Maybe there should be some way to determine the "size" >> of a closure and the amount of memory copied when a >> message is passed (e.g., in the process info)? > > There is: erts_debug:size/1. > > To my knowledge, it isn't documented. There is also an erts_debug:flat_size/1. Of course, the way to pin-point that you're in trouble in the first place would be to run a GC trace on all processes and watch the heap size indicator in the trace messages. Once a process has been identified that gets very large heaps, you can combine with either call trace (and perhaps call return trace), to see in which function the process happens to be when the gc kicks in - or, in this case, message trace, and spot the messages with funs in them. Of course, you won't be able to see that the funs are large just by looking at the message, but you can then instrument the code by inserting calls to erts_debug:size(Fun). The way to watch it in a live system would be erlang:system_monitor(MonPid, [{large_heap,Sz}|...]) /Uffe -- Ulf Wiger From tony@REDACTED Sun Dec 4 23:54:56 2005 From: tony@REDACTED (Tony Rogvall) Date: Sun, 4 Dec 2005 23:54:56 +0100 Subject: My first beam assembler hack Message-ID: <9F1F63B9-2B98-4CAC-A5A5-61E869D385C0@rogvall.com> Just want to share some beam assembler hack with you ;-) Attach a assembler module called message.S compile it with: erlc +form_asm message.S Then I wrote a module mbox.erl that can use some of the features in message.S Have fun /Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: message.S Type: application/octet-stream Size: 3335 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: mbox.erl Type: application/octet-stream Size: 2086 bytes Desc: not available URL: From Bob.Smart@REDACTED Mon Dec 5 01:49:27 2005 From: Bob.Smart@REDACTED (Bob.Smart@REDACTED) Date: Mon, 5 Dec 2005 11:49:27 +1100 Subject: checksum for distributed debugging? Message-ID: I'm working on a distributed system that will work like this: A. The server maintains the total state in a tree structured form. Every change will increase the state sequence number and that sequence number will be associated with the node that changed and with all its ancestors. In other words every node has a sequence number that is greater than or equal to the sequence number of all its children. B. Each client will know a subset of the state. Only the state actually displayed will be kept up to date, but the client might happen to remember old versions of the state for other nodes not currently displayed. C. The client will keep a request open (xmlhttprequest style) that requests information on changes to displayed state. Sometimes a request will be sent for new information when the display changes to need a different part of the state. D. In either case the request will indicate, with node sequence numbers, what current information is held. The response will encode the change (diff) in the state needed to bring the clients state up to date. If there are bugs then the client state will get out of step, and then things can go really bad. So I want to send a checksum for the clients data. I could use a cryptographic checksum like SHA-1, but that is probably overkill. Any suggestions for what I could use that would be easy in Erlang and Javascript? Bob P.S. On a completely different matter, I'd be interested in comments on the Scala language (http://scala.epfl.ch/) by Erlang experts. It can be used in a fairly pure functional style using val declarations, and it seems to support Erlang-style message exchange (see chapter 3 of "Scala by Example" http://scala.epfl.ch/docu/files/ScalaByExample.pdf). Far be it from me to suggest that Erlang might not last forever, but if not this seems a possible migration path. The current version is not production quality (my rough impression), but the next version [already late] is a rewrite in itself, and it could be starting to move in the right direction. Scala claims to have solved the problems of building software with scalable components (http://lampwww.epfl.ch/~odersky/papers/ScalableComponent.pdf). If anyone responds to the list on this PS, then they should probably change the Subject. From ulf.wiger@REDACTED Mon Dec 5 09:48:04 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 5 Dec 2005 09:48:04 +0100 Subject: scala (was RE: checksum for distributed debugging?) Message-ID: Bob.Smart@REDACTED > > P.S. On a completely different matter, I'd be interested in > comments on the Scala language (http://scala.epfl.ch/) by > Erlang experts. It can be used in a fairly pure functional > style using val declarations, and it seems to support > Erlang-style message exchange (see chapter 3 of "Scala by > Example" http://scala.epfl.ch/docu/files/ScalaByExample.pdf). > Far be it from me to suggest that Erlang might not last > forever, but if not this seems a possible migration path. I took a look at that a while back, and was first impressed with the examples in the intro of how one could use erlang-style concurrency. I was less impressed when I read the manual chapter on concurrency, and discovered that it was all about Java-style concurrency. It may be a minor point, but the problem I see is that Scala may end up with the same problem as Java CSP and other similar initiatives: people will still write software in the original java style, at least as regards concurrency. While you can still use Scala as a nice language for development from scratch, reusability will hinge on the degree to which people adopt new ways of thinking. Scala is a language worth keeping an eye on, though, IMO. /Uffe From ulf.wiger@REDACTED Mon Dec 5 09:51:09 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 5 Dec 2005 09:51:09 +0100 Subject: My first beam assembler hack Message-ID: Interesting. Beam assembler certainly is the language of choice for the discriminating hacker. (: I guess this might be a nice alternative to my plain_fsm hack (which relies on parse transforms). Now, how stable/documented is the .S format? /Uffe > -----Original Message----- > From: Tony Rogvall [mailto:tony@REDACTED] > Sent: den 4 december 2005 23:55 > To: Ulf Wiger (AL/EAB) > Cc: Erlang Users' List > Subject: My first beam assembler hack > > > Just want to share some beam assembler hack with you ;-) > > Attach a assembler module called message.S > > compile it with: > > erlc +form_asm message.S > > Then I wrote a module mbox.erl that can use some of the > features in message.S > > Have fun > > /Tony > From hirsch@REDACTED Fri Dec 2 18:32:59 2005 From: hirsch@REDACTED (Edward A. Hirsch) Date: Fri, 2 Dec 2005 20:32:59 +0300 (MSK) Subject: CSR-2006: Springer LNCS, Deadline 18th December Message-ID: <20051202173259.8D8BE578C1@euclid.pdmi.ras.ru> Dear Colleagues, We have two important news regarding the CSR-2006 conference in St.Petersburg: 1) Springer *confirms* that it will make an LNCS volume of our proceedings, 2) Given the news above, and also several requests from potential participants, the submission deadline has been moved to December 18. Please note that this is the last and final deadline. Please feel free to spread the enclosed Call for Papers among your colleagues. Best regards, Edward Hirsch %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CSR-2006 International Computer Science Symposium in Russia Sponsored by the U.S. Civilian Research & Development Foundation Organized by St.Petersburg Department of Steklov Institute of Mathematics June 8-12, 2006, St.Petersburg, Russia *Revised* Final Call for Papers (LNCS publication confirmed, deadline extended to December 18) CSR 2006 is the first conference in a series of regular events intended to reflect the broad scope of international cooperation in computer science. St.Petersburg is one of the most beautiful and architecturally imposing cities in the world, and June is the best and most romantic season of "white nights" when it never gets dark and wonderful bridges open at night to let boats pass. The conference will include also a cultural programme. CSR 2006 consists of two tracks: Theory Track: * algorithms, protocols, and data structures; * complexity and cryptography; * formal languages, automata and their applications to computer science; * computational models and concepts; * proof theory and applications of logic to computer science. Applications and Technology Track: * programming and languages; * computer architecture and hardware design; * symbolic computing and numerical applications; * application software; * artificial intelligence and robotics; * computer graphics and image processing. Program committee: Theory Track: Sergei Artemov, Paul Beame, Michael Ben-Or, Andrei Bulatov, Peter Buergisser, Felipe Cucker, Evgeny Dantsin, Volker Diekert, Dima Grigoriev (chair), Yuri Gurevich, Janos Makowsky, Yuri Matiyasevich, Peter Bro Miltersen, Grigori Mints, Pavel Pudlak, Prabhakar Raghavan, Alexander Razborov, Michael E. Saks, Alexander Shen, Amin Shokrollahi, Anatol Slissenko, Mikhail Volkov Applications and Technology Track: Boris Babayan, Robert Bauer, Matthias Blume, Walter Daelemans, Vassil Dimitrov, Sergey Dmitriev, Richard Fateman, Dina Goldin, John R. Harrison (chair), John Mashey, Bertrand Meyer, Fedor Novikov, Michael Parks, Andreas Reuter, Mary Sheeran, Elena Troubitsyna, Miroslav Velev, Sergey Zhukov The opening lecture will be given by Stephen A. Cook (University of Toronto, Canada). The (confirmed) invited speakers include: * Boaz Barak (Princeton University, USA) * Gerard Berry (Esterel Technologies, France) * Bob Colwell (R&E Colwell & Assoc. Inc., USA) * Byron Cook (Microsoft Research, USA) * Melvin Fitting (Lehman College and the Graduate Center, CUNY, USA) * Russell Impagliazzo (University of California at San Diego, USA) * Michael Kaminski (Technion, Israel) * Michael Kishinevsky (Intel, USA) * Pascal Koiran (Ecole Normale Superieure de Lyon, France) * Omer Reingold (Weizmann Institute, Israel) The proceedings of the symposium will be published in Springer's LNCS series (confirmed by Springer). Important dates: * Paper submission: December 18, 2005 * Notification: January 31, 2006 * Symposium: June 8-12, 2006 There will be limited support for travel expenses of Russian participants. Participants from Scandinavia may request funding from the NoNA network. Further information and contacts: Web: http://logic.pdmi.ras.ru/~csr2006/ Email: csr06chair@REDACTED %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% From erlang@REDACTED Mon Dec 5 10:31:25 2005 From: erlang@REDACTED (Peter Lund) Date: Mon, 05 Dec 2005 10:31:25 +0100 Subject: My first beam assembler hack In-Reply-To: References: Message-ID: <439408ED.7010102@lundata.se> Found this in the online docs about the compiler:file/2 options... || || |asm| The input file is expected to be assembler code (default file suffix ".S"). Note that the format of assembler files is not documented, and may change between releases - this option is primarily for internal debugging use. I was not able to find the 'form_asm' option, but maybe I was looking in the wrong place or something. /Peter Ulf Wiger (AL/EAB) wrote: >Interesting. > >Beam assembler certainly is the language of choice >for the discriminating hacker. (: > >I guess this might be a nice alternative to my >plain_fsm hack (which relies on parse transforms). > >Now, how stable/documented is the .S format? > >/Uffe > > > >>-----Original Message----- >>From: Tony Rogvall [mailto:tony@REDACTED] >>Sent: den 4 december 2005 23:55 >>To: Ulf Wiger (AL/EAB) >>Cc: Erlang Users' List >>Subject: My first beam assembler hack >> >> >>Just want to share some beam assembler hack with you ;-) >> >>Attach a assembler module called message.S >> >>compile it with: >> >> erlc +form_asm message.S >> >>Then I wrote a module mbox.erl that can use some of the >>features in message.S >> >>Have fun >> >>/Tony >> >> >> > > > From michael@REDACTED Mon Dec 5 11:24:28 2005 From: michael@REDACTED (Michael Scholtz) Date: Mon, 5 Dec 2005 12:24:28 +0200 Subject: bug? Message-ID: <200512051224.29639.michael@erlfinsys.net> I got an error illegal bit size while compiling some code, so I tried inserting manual values, and got the following contradiction: 78> <>)*8)>> = <<8:8>>. ** 1: illegal bit size ** 79> size(<<8:8>>). 1 80> <> = <<8:8>>. <<8>> Bug ? Or am I missing something? From Maria.GarciadelaBanda@REDACTED Mon Dec 5 11:09:40 2005 From: Maria.GarciadelaBanda@REDACTED (Maria Garcia de la Banda) Date: Mon, 05 Dec 2005 21:09:40 +1100 Subject: TPLP special issue call for papers Message-ID: <200512051015.jB5AFei02873@mosca.csse.monash.edu.au> ------- Blind-Carbon-Copy X-Mailer: exmh version 2.0.2 2/24/98 To: mbanda Subject: TPLP special issue call for papers Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 05 Dec 2005 21:09:40 +1100 From: Maria Garcia de la Banda [Apologies for multiple copies] - --------------------------------------------------------------------------- CALL FOR PAPERS Special Issue of Theory and Practice of Logic Programming on Implementation of Logic Programming Systems. Guest Editors: Bart Demoen and Maria Garcia de la Banda Logic programming saw the light more than 30 years ago, with the first implementation of Prolog appearing in 1972 by Philippe Roussel and Alain Colmerauer. Since then, implementation has been one of the driving forces of the field and has generated a significant amount of both theoretical research and running systems. While a certain maturity has been reached for some of the more traditional aspects of Logic Programming, new areas have also emerged and are currently being explored. Work in these new areas has resulted in many different languages and systems such as OZ, Mercury, CIAO, Erlang, XSB, SModels, DLV, ECLiPSe, B-Prolog, HAL, SICStus, etc. Therefore, the journal on Theory and Practice of Logic Programming (TPLP) is planning a special issue on the implementation of logic programming systems to appear in 2007. The aim of this special issue of Theory and Practice of Logic Programming is to attract high-quality research papers on the implementation of logic programming systems. The focus of this issue is on implementation itself, therefore we expect papers whose main contribution resides in presenting implementation issues per se. The emphasis is on system design, implementation techniques, and integration, rather than on topics such as performance, new paradigms, analysis domains or applications. In-depth surveys introducing newcomers into the field and comparisons of different implementation techniques are also solicited. TOPICS Topics of interest include but are not limited to: * Answer set programming * Compilation * Concurrency * Constraint Support * Databases * Debugging * Distributed Programming * Memoization * Memory management * Model generation * Parallelism * Programming environments * System integration Submissions Revised and enhanced versions of papers published at conferences that have not appeared in archival journals are eligible for submission. Papers describing important past research in this area which have not been published in archival journal papers are also solicited. Surveys and comparison of state of the art techniques are also solicited. For any doubt regarding the appropriateness of the topic of a paper for this special issue please email either to Bart Demoen (Bart.Demoen@REDACTED) or to Maria Garcia de la Banda (mbanda@REDACTED). Papers should be written in English, and formatted using the LaTeX style files developed by Cambridge University Press for TPLP and which can be downloaded from ftp://ftp.cup.cam.ac.uk/pub/texarchive/journals/latex/tlp-cls/ To submit please send an e-mail version to both Bart Demoen (Bart.Demoen@REDACTED) and Maria Garcia de la Banda (mbanda@REDACTED). For further information, please look at: http://www.csse.monash.edu.au/~mbanda/tplp_special_implementation Important Dates - --------------- First call for papers December 2005 Submission June 15, 2006 Notification February 15, 2006 Final version due: May 1, 2007 Publication 2007/2008 ------- End of Blind-Carbon-Copy From bjorn@REDACTED Mon Dec 5 11:53:43 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 05 Dec 2005 11:53:43 +0100 Subject: My first beam assembler hack In-Reply-To: <9F1F63B9-2B98-4CAC-A5A5-61E869D385C0@rogvall.com> References: <9F1F63B9-2B98-4CAC-A5A5-61E869D385C0@rogvall.com> Message-ID: Cool! :-) But note that the warranty is void if you use hand-written beam assembly code. :-) /Bjorn Tony Rogvall writes: > Just want to share some beam assembler hack with you ;-) > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From tony@REDACTED Mon Dec 5 12:37:08 2005 From: tony@REDACTED (Tony Rogvall) Date: Mon, 5 Dec 2005 12:37:08 +0100 Subject: My first beam assembler hack In-Reply-To: <439408ED.7010102@lundata.se> References: <439408ED.7010102@lundata.se> Message-ID: <366C8A86-824C-4087-9375-4E5FC1DE0961@rogvall.com> On Dec 5, 2005, at 10:31 AM, Peter Lund wrote: > > Found this in the online docs about the compiler:file/2 options... > || > > || > |asm| > The input file is expected to be assembler code (default file > suffix > ".S"). Note that the format of assembler files is not documented, > and may change between releases - this option is primarily for > internal debugging use. > > > I was not able to find the 'form_asm' option, but maybe I was > looking in the wrong place or something. > Should have been +from_asm. Some kind of internal flag to the compiler I think (The code is there for every one to read :-) /Tony > /Peter > > Ulf Wiger (AL/EAB) wrote: > >> Interesting. >> >> Beam assembler certainly is the language of choice >> for the discriminating hacker. (: >> >> I guess this might be a nice alternative to my >> plain_fsm hack (which relies on parse transforms). >> >> Now, how stable/documented is the .S format? >> >> /Uffe >> >>> -----Original Message----- >>> From: Tony Rogvall [mailto:tony@REDACTED] Sent: den 4 december >>> 2005 23:55 >>> To: Ulf Wiger (AL/EAB) >>> Cc: Erlang Users' List >>> Subject: My first beam assembler hack >>> >>> Just want to share some beam assembler hack with you ;-) >>> >>> Attach a assembler module called message.S >>> >>> compile it with: >>> >>> erlc +form_asm message.S >>> >>> Then I wrote a module mbox.erl that can use some of the features >>> in message.S >>> >>> Have fun >>> >>> /Tony >>> >>> >> >> From francesco@REDACTED Mon Dec 5 15:22:21 2005 From: francesco@REDACTED (Francesco Cesarini (Erlang Training & Consulting)) Date: Mon, 05 Dec 2005 14:22:21 +0000 Subject: Obfuscated Erlang Results Message-ID: <43944D1D.1030301@erlang-consulting.com> Hi All, sorry for the delay. We finally managed to get the Obfuscated Erlang Competition results from the User Conference on line. For those of you who were not there, they are visible at http://www.erlang-consulting.com/obfuscatederlang_fs.html The first prize is a splendid contribution by Martin. The program demonstrates that Erlang has indeed an error in its design. The second prize was for an artistic Sudoku solver by Urban. And finally, the judges were forced to add a third prize, the Judge?s prize, as they were unexpectedly confronted with a breathtaking submission that had been used in a live system. Mats, don't show this to your QA people ;-) Regards, Francesco -- http://www.erlang-consulting.com From james.hague@REDACTED Mon Dec 5 16:56:21 2005 From: james.hague@REDACTED (James Hague) Date: Mon, 5 Dec 2005 09:56:21 -0600 Subject: Computer Language Shootout - concurrency In-Reply-To: <43901430.3040801@mail.ru> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> Message-ID: > A fly in the ointment - the Ackermann function: > http://shootout.alioth.debian.org/gp4/benchmark.php?test=ackermann&lang=all > > Erlang HiPE - 15th place. ;-) Interpreted Erlang is within 10x of the top, natively compiled benchmark. It's ahead of GForth, which is one of the fastest interpreters out there (one that doesn't even do dynamic type checks). That's great! And if you compare Erlang to the big scripting languages, then wow do the results looks good: 6x faster than Lua, more than 40x faster than Perl and Python (igoring the not-ready-for-production-use Psyco compiler results From Marc.Vanwoerkom@REDACTED Mon Dec 5 17:11:19 2005 From: Marc.Vanwoerkom@REDACTED (Marc van Woerkom) Date: Mon, 05 Dec 2005 17:11:19 +0100 Subject: Obfuscated Erlang Results In-Reply-To: <43944D1D.1030301@erlang-consulting.com> Message-ID: >http://www.erlang-consulting.com/obfuscatederlang_fs.html > >The first prize is a splendid contribution by Martin. The >program demonstrates that Erlang has indeed an error in >its design. Is it just a wrong precedence assignment to the operators, or something harder to fix? >The second prize was for an artistic Sudoku >solver by Urban. How am I supposed to call it? I need a usage text for mere mortals. >And finally, the judges were forced to >add a third prize, the Judge?s prize, as they were >unexpectedly confronted with a breathtaking submission >that had been used in a live system. Mats, don't show >this to your QA people ;-) Really mind gobbling. It was really generated manually? :) Regards, Marc From Bob.Smart@REDACTED Mon Dec 5 18:17:37 2005 From: Bob.Smart@REDACTED (Bob.Smart@REDACTED) Date: Tue, 6 Dec 2005 04:17:37 +1100 Subject: scala (was RE: checksum for distributed debugging?) Message-ID: The problem with Scala is that it doesn't have atoms. Once upon a time there was a language called Algol 68. It lumped variables and pointers together. Now it is true that both are represented internally as a memory address, but the semantics are completely different. A 'var int' should coerce to 'int' and a 'ptr int' shouldn't. Lumping the two together into 'ref int' was amazingly damaging. Similarly, lumping strings (external communication type) and atoms (internal identifying type) together is much more damaging than one initially expects. Actually in practice, programmers of languages without atoms use small ints for internal identification instead, and some languages formalize that with enum types: This also works badly in practice, particularly in distributed systems. Bob From ke.han@REDACTED Mon Dec 5 19:04:48 2005 From: ke.han@REDACTED (ke.han) Date: Tue, 06 Dec 2005 02:04:48 +0800 Subject: Obfuscated Erlang Results In-Reply-To: <43944D1D.1030301@erlang-consulting.com> References: <43944D1D.1030301@erlang-consulting.com> Message-ID: <43948140.60704@redstarling.com> great results!! It would probably take my entire Christmas holiday to sit down and figure out out how any one of them works! thanks for doing this contest, ke han Francesco Cesarini (Erlang Training & Consulting) wrote: > Hi All, > > sorry for the delay. We finally managed to get the Obfuscated Erlang > Competition results from the User Conference on line. For those of you > who were not there, they are visible at > > http://www.erlang-consulting.com/obfuscatederlang_fs.html > > The first prize is a splendid contribution by Martin. The program > demonstrates that Erlang has indeed an error in its design. The second > prize was for an artistic Sudoku solver by Urban. And finally, the > judges were forced to add a third prize, the Judge?s prize, as they were > unexpectedly confronted with a breathtaking submission that had been > used in a live system. Mats, don't show this to your QA people ;-) > > Regards, > > Francesco > -- > http://www.erlang-consulting.com > From ke.han@REDACTED Mon Dec 5 19:24:05 2005 From: ke.han@REDACTED (ke.han) Date: Tue, 06 Dec 2005 02:24:05 +0800 Subject: scala (was RE: checksum for distributed debugging?) In-Reply-To: References: Message-ID: <439485C5.8020602@redstarling.com> I studied scala quite a bit last year. I was trying to decide which language to build my next set of software. Erlang won out in the end. However, I took a strong liking to scala. I think the language design and syntax is fantastic. I found nothing came close in terms of being able to express objects and functions without clutter. I simply cannot praise the cleanliness of scala enough. The drawbacks for me were: 1 - implementation on .net and Java VMs gives you process/threading oriented limitations of those VMs. 2 - few libraries/frameworks that take advantage of the scala. Just wrappering Java libraries will bleed through to your program design. My main reason for going through a thorough language review before starting my new projects was I was really tired of Java and the like. Mostly for these two reasons, I decided I couldn't use scala and went with erlang. Note: this is not a knock against erlang...I haven't looked back since making this choice and am quite happy. So the grand questions is: Can we make scala run on erlang instead of Java? This might be a dream come true!! thanks, ke han Ulf Wiger (AL/EAB) wrote: > Bob.Smart@REDACTED > >>P.S. On a completely different matter, I'd be interested in >>comments on the Scala language (http://scala.epfl.ch/) by >>Erlang experts. It can be used in a fairly pure functional >>style using val declarations, and it seems to support >>Erlang-style message exchange (see chapter 3 of "Scala by >>Example" http://scala.epfl.ch/docu/files/ScalaByExample.pdf). >>Far be it from me to suggest that Erlang might not last >>forever, but if not this seems a possible migration path. > > > I took a look at that a while back, and was first > impressed with the examples in the intro of how one > could use erlang-style concurrency. I was less impressed > when I read the manual chapter on concurrency, and > discovered that it was all about Java-style concurrency. > > It may be a minor point, but the problem I see is > that Scala may end up with the same problem as Java CSP > and other similar initiatives: people will still write > software in the original java style, at least as regards > concurrency. > > While you can still use Scala as a nice language for > development from scratch, reusability will hinge on the > degree to which people adopt new ways of thinking. > > Scala is a language worth keeping an eye on, though, IMO. > > /Uffe > From erlang@REDACTED Mon Dec 5 19:56:03 2005 From: erlang@REDACTED (Inswitch Solutions) Date: Mon, 5 Dec 2005 16:56:03 -0200 Subject: CAMEL signalling knowledge or experience Message-ID: <012101c5f9cd$8d433110$4a00a8c0@Inswitch251> Hi! We are looking for people with knowledge or experience in CAMEL signalling. For further details please reply ASAP to this email. thanks, Prepaid Expertise - Programmable Switches Powered by Ericsson Licensed Technology Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 www.inswitch.us -------------- 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 urban@REDACTED Tue Dec 6 00:14:56 2005 From: urban@REDACTED (Urban Boquist) Date: Tue, 6 Dec 2005 00:14:56 +0100 Subject: Obfuscated Erlang Results In-Reply-To: <29225764@toto.iv> Message-ID: <20051205231456.5C503443BD5@groda.boquist.net> >>>>> Marc van Woerkom writes: >> The second prize was for an artistic Sudoku solver by Urban. Marc> How am I supposed to call it? I need a usage text for mere Marc> mortals. The simplest usage is just e:main([]). ;-) Below find "e-spoiler.txt" which was included when I submitted "e.erl". Best regards, -- Urban ------------------------------------------------------------------------------- 45> 45> test:pretty(test:easy()). [[0,0,9,1,8,0,0,4,5], [5,0,0,0,9,6,1,0,0], [0,0,0,0,4,3,2,8,0], [0,3,8,0,0,0,0,0,6], [4,0,0,8,0,5,0,0,1], [2,0,0,0,0,0,8,9,0], [0,1,5,3,0,0,0,0,0], [0,0,2,6,1,0,0,0,4], [6,4,0,0,5,8,9,0,0]] 46> 46> e:main(test:easy()). [[3,2,9,1,8,7,6,4,5], [5,8,4,2,9,6,1,7,3], [7,6,1,5,4,3,2,8,9], [1,3,8,9,7,2,4,5,6], [4,9,7,8,6,5,3,2,1], [2,5,6,4,3,1,8,9,7], [9,1,5,3,2,4,7,6,8], [8,7,2,6,1,9,5,3,4], [6,4,3,7,5,8,9,1,2]] 47> ------------------------------------------------------------------------------- 47> 47> test:pretty(test:medium()). [[0,0,0,0,0,0,6,0,7], [0,0,8,0,0,3,0,1,0], [0,0,0,5,0,0,0,9,0], [0,1,0,0,3,0,4,0,6], [0,6,9,4,0,7,1,3,0], [2,0,4,0,1,0,0,5,0], [0,9,0,0,0,4,0,0,0], [0,4,0,8,0,0,2,0,0], [6,0,3,0,0,0,0,0,0]] 48> 48> e:main(test:medium()). [[3,5,1,2,4,9,6,8,7], [9,2,8,7,6,3,5,1,4], [4,7,6,5,8,1,3,9,2], [8,1,7,9,3,5,4,2,6], [5,6,9,4,2,7,1,3,8], [2,3,4,6,1,8,7,5,9], [7,9,2,3,5,4,8,6,1], [1,4,5,8,9,6,2,7,3], [6,8,3,1,7,2,9,4,5]] 49> ------------------------------------------------------------------------------- 49> 49> test:pretty(test:veryhard()). [[0,0,8,4,0,0,3,5,0], [0,0,0,0,0,1,0,8,0], [0,0,3,9,0,8,0,0,6], [2,0,0,0,9,0,7,0,0], [0,9,0,0,6,0,0,1,0], [0,0,5,0,1,0,0,0,3], [6,0,0,1,0,2,4,0,0], [0,4,0,6,0,0,0,0,0], [0,8,9,0,0,5,6,0,0]] 50> 50> e:main(test:veryhard()). [[7,1,8,4,2,6,3,5,9], [9,5,6,7,3,1,2,8,4], [4,2,3,9,5,8,1,7,6], [2,6,1,5,9,3,7,4,8], [3,9,4,8,6,7,5,1,2], [8,7,5,2,1,4,9,6,3], [6,3,7,1,8,2,4,9,5], [5,4,2,6,7,9,8,3,1], [1,8,9,3,4,5,6,2,7]] 51> ------------------------------------------------------------------------------- 51> 51> e:main([]). [[1,2,3,4,5,6,7,8,9], [4,5,6,7,8,9,1,2,3], [7,8,9,1,2,3,4,5,6], [2,1,4,3,6,5,8,9,7], [3,6,5,8,9,7,2,1,4], [8,9,7,2,1,4,3,6,5], [5,3,1,6,4,2,9,7,8], [6,4,2,9,7,8,5,3,1], [9,7,8,5,3,1,6,4,2]] 52> ------------------------------------------------------------------------------- e:main/1 solves any solvable sudoku Input should be a list of three-tuples; {Row, Col, Number} with the initially given numbers. easy() -> [{1,3,9},{1,4,1},{1,5,8},{1,8,4},{1,9,5},{2,1,5},{2,5,9},{2,6,6},{2,7,1}, {3,5,4},{3,6,3},{3,7,2},{3,8,8},{4,2,3},{4,3,8},{4,9,6},{5,1,4},{5,4,8}, {5,6,5},{5,9,1},{6,1,2},{6,7,8},{6,8,9},{7,2,1},{7,3,5},{7,4,3},{8,3,2}, {8,4,6},{8,5,1},{8,9,4},{9,1,6},{9,2,4},{9,5,5},{9,6,8},{9,7,9}]. medium() -> [{1,7,6},{1,9,7},{2,3,8},{2,6,3},{2,8,1},{3,4,5},{3,8,9},{4,2,1},{4,5,3}, {4,7,4},{4,9,6},{5,2,6},{5,3,9},{5,4,4},{5,6,7},{5,7,1},{5,8,3},{6,1,2}, {6,3,4},{6,5,1},{6,8,5},{7,2,9},{7,6,4},{8,2,4},{8,4,8},{8,7,2},{9,1,6}, {9,3,3}]. veryhard() -> [{1,3,8},{1,4,4},{1,7,3},{1,8,5},{2,6,1},{2,8,8},{3,3,3},{3,4,9},{3,6,8}, {3,9,6},{4,1,2},{4,5,9},{4,7,7},{5,2,9},{5,5,6},{5,8,1},{6,3,5},{6,5,1}, {6,9,3},{7,1,6},{7,4,1},{7,6,2},{7,7,4},{8,2,4},{8,4,6},{9,2,8},{9,3,9}, {9,6,5},{9,7,6}]. ------------------------------------------------------------------------------- EOF. From bengt.kleberg@REDACTED Tue Dec 6 08:42:16 2005 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 06 Dec 2005 08:42:16 +0100 Subject: Obfuscated Erlang Results In-Reply-To: <43944D1D.1030301@erlang-consulting.com> References: <43944D1D.1030301@erlang-consulting.com> Message-ID: <439540D8.9010900@ericsson.com> On 2005-12-05 15:22, Francesco Cesarini (Erlang Training & Consulting) wrote: > Hi All, > > sorry for the delay. We finally managed to get the Obfuscated Erlang > Competition results from the User Conference on line. For those of you > who were not there, they are visible at > > http://www.erlang-consulting.com/obfuscatederlang_fs.html > is it possible to see all the entries? bengt From francesco@REDACTED Tue Dec 6 09:03:58 2005 From: francesco@REDACTED (Francesco Cesarini (Erlang Training & Consulting)) Date: Tue, 06 Dec 2005 08:03:58 +0000 Subject: Obfuscated Erlang Results In-Reply-To: References: Message-ID: <439545EE.6020003@erlang-consulting.com> Marc van Woerkom wrote: >> http://www.erlang-consulting.com/obfuscatederlang_fs.html >> >> The first prize is a splendid contribution by Martin. The program >> demonstrates that Erlang has indeed an error in its design. > > > Is it just a wrong precedence assignment to the operators, or something > harder to fix? That is correct. Precedence operators are what make the program non trivial if it is not run. >> The second prize was for an artistic Sudoku solver by Urban. > > > How am I supposed to call it? > I need a usage text for mere mortals. Oi! Keep in mind that most submissions did not even tell us what their programs did. Luckily, Urban was not one of them :-) >> And finally, the judges were forced to add a third prize, the Judge?s >> prize, as they were unexpectedly confronted with a breathtaking >> submission that had been used in a live system. Mats, don't show this >> to your QA people ;-) > > Really mind gobbling. It was really generated manually? :) From what we have been told... Francesco -- http://www.erlang-consulting.com From xlcr@REDACTED Tue Dec 6 09:41:35 2005 From: xlcr@REDACTED (Nic Linker) Date: Tue, 06 Dec 2005 14:41:35 +0600 Subject: Computer Language Shootout - concurrency In-Reply-To: References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> Message-ID: <43954EBF.90304@mail.ru> James Hague wrote: >>A fly in the ointment - the Ackermann function: >>http://shootout.alioth.debian.org/gp4/benchmark.php?test=ackermann&lang=all >> >>Erlang HiPE - 15th place. ;-) >> >> > >Interpreted Erlang is within 10x of the top, natively compiled >benchmark. It's ahead of GForth, which is one of the fastest >interpreters out there (one that doesn't even do dynamic type checks). > That's great! > > But Erlang HiPE is not interpreted and I found natural to compare it with other compilable languages, and unfortunately Erlang is not even close to the leader, in contrast of what I expected. :-( (Why did I expect it? Because recursion is the one of the strongest features of functional languages). >And if you compare Erlang to the big scripting languages, then wow do >the results looks good: 6x faster than Lua, more than 40x faster than >Perl and Python (igoring the not-ready-for-production-use Psyco >compiler results > Yes, I was really glad to see it after :-) Best regards, Nick Linker From erlang@REDACTED Tue Dec 6 10:19:22 2005 From: erlang@REDACTED (Peter-Henry Mander) Date: Tue, 06 Dec 2005 09:19:22 +0000 Subject: Computer Language Shootout - concurrency In-Reply-To: <43954EBF.90304@mail.ru> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> <43954EBF.90304@mail.ru> Message-ID: <1133860763.7933.26.camel@hymir.newport-networks.com> I wonder if anyone else has tweaked the weighting of the results, like I did? There are benchmarks where erlang code is missing or broken which counts heavily against erlang. If you remove these from the ranking, the results are dramatically better for erlang. Also, as mentioned here: http://www.erlang.org/ml-archive/erlang-questions/200512/msg00026.html Some of the benchmarks are tailored so that some strengths of erlang are *not* demonstrated. I quote: "We started off using 1500 threads but too many language implementations failed or timed out." Why is there not another concurrency test with 5000 threads and more that demonstrate the absolute dominance of erlang? How can the benchmarks be useful unless they highlight those languages with unique strengths such as concurrency in erlang? Are there other benchmarks that have been 'politically-corrected' or 'dumbed-down' to be overly inclusive? I'm trying to find time to rectify what erlang code I can, but it's a very low priority. But until _all_ the benchmarks are corrected and peer-reviewed the ranking is utterly pointless. If anyone cares (and obviously some of us do) we should extract our proverbial digit and 'fix' the results by submitting better code, and persuade the benchmark designers to add better and wider-ranging concurrency tests, since concurrency is becomming a hot topic these days with multicore and cell processors. Pete. On Tue, 2005-12-06 at 14:41 +0600, Nic Linker wrote: > James Hague wrote: > > >>A fly in the ointment - the Ackermann function: > >>http://shootout.alioth.debian.org/gp4/benchmark.php?test=ackermann?=all > >> > >>Erlang HiPE - 15th place. ;-) > >> > >> > > > >Interpreted Erlang is within 10x of the top, natively compiled > >benchmark. It's ahead of GForth, which is one of the fastest > >interpreters out there (one that doesn't even do dynamic type checks). > > That's great! > > > > > But Erlang HiPE is not interpreted and I found natural to compare it > with other compilable languages, and unfortunately Erlang is not even > close to the leader, in contrast of what I expected. :-( (Why did I > expect it? Because recursion is the one of the strongest features of > functional languages). > > >And if you compare Erlang to the big scripting languages, then wow do > >the results looks good: 6x faster than Lua, more than 40x faster than > >Perl and Python (igoring the not-ready-for-production-use Psyco > >compiler results > > > Yes, I was really glad to see it after :-) > > Best regards, > Nick Linker > > From matthias@REDACTED Tue Dec 6 11:20:49 2005 From: matthias@REDACTED (Matthias Lang) Date: Tue, 6 Dec 2005 11:20:49 +0100 Subject: Computer Language Shootout - concurrency In-Reply-To: <1133860763.7933.26.camel@hymir.newport-networks.com> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> <43954EBF.90304@mail.ru> <1133860763.7933.26.camel@hymir.newport-networks.com> Message-ID: <17301.26113.845456.136279@antilipe.corelatus.se> Peter-Henry Mander writes: > persuade the benchmark designers to add better and wider-ranging > concurrency tests, since concurrency is becomming a hot topic these > days with multicore and cell processors. Is this a finger-burning recipe? Or, can I make Erlang look bad? Example: a one-dimensional parallel sort on a 4-CPU shared-memory machine. You break the data into four pieces and have each core sort one piece@REDACTED If you did that in C, you'd expect a speedup of about* 4x over a single CPU, for many useful datasets. If you did it in Erlang, you'll get a huge slowdown. The overhead of sending the data around between 4 nodes+ will overwhelm the concurrency win. Maybe concurrency benchmarks are pointless. The choice of concurrency granularity has more effect on the outcome than anything else. Matthias Footnotes for the pedantic: @ I am aware that there are other parallel sorting algorithms. * This test can be subverted by choosing the data/hardware such that it's limited by memory bandwidth. And in other ways. + A future, multithreaded VM might have better characteristics. Then again, the improvement might still not be enough. From marthin@REDACTED Tue Dec 6 12:05:17 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Tue, 6 Dec 2005 13:05:17 +0200 Subject: Computer Language Shootout - concurrency In-Reply-To: <1133860763.7933.26.camel@hymir.newport-networks.com> Message-ID: <200512061105.jB6B5W939061@hades.cslab.ericsson.net> [Marthin Laubscher] In stead of benchmarking execution time, what about benchmarks for: Time to market Reliability/ Fault Tolerance Scalability Predictability of behaviour Predictability of performance Processing Distribution (Design, dev & test cost, deployment and network cost) Release Management Programmer Productivity Test Productivity If we need to base decisions on benchmarks, such measurements would make far more sense to me than CPU cycles. Any team or individual that base development decisions on such measurements as the shootout benchmarks put forward should IMHO be left alone to stew in its own juices. > -----Original Message----- > From: owner-erlang-questions@REDACTED [mailto:owner-erlang- > questions@REDACTED] On Behalf Of Peter-Henry Mander > Sent: 06 December 2005 11:19 > To: Erlang Questions > Subject: Re: Computer Language Shootout - concurrency > > > > Why is there not another concurrency test with 5000 threads and more > that demonstrate the absolute dominance of erlang? How can the > benchmarks be useful unless they highlight those languages with unique > strengths such as concurrency in erlang? Are there other benchmarks that > have been 'politically-corrected' or 'dumbed-down' to be overly > inclusive? > > > > I'm trying to find time to rectify what erlang code I can, but it's a > very low priority. But until _all_ the benchmarks are corrected and > peer-reviewed the ranking is utterly pointless. If anyone cares (and > obviously some of us do) we should extract our proverbial digit and > 'fix' the results by submitting better code, and persuade the benchmark > designers to add better and wider-ranging concurrency tests, since > concurrency is becomming a hot topic these days with multicore and cell > processors. > > [Marthin Laubscher] Again, suppose we did all that, what would it prove? Why volunteer to be dragged down to such petty comparisons? :-) From xlcr@REDACTED Tue Dec 6 12:10:51 2005 From: xlcr@REDACTED (Nic Linker) Date: Tue, 06 Dec 2005 17:10:51 +0600 Subject: Computer Language Shootout - concurrency In-Reply-To: <1133860763.7933.26.camel@hymir.newport-networks.com> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> <43954EBF.90304@mail.ru> <1133860763.7933.26.camel@hymir.newport-networks.com> Message-ID: <439571BB.3000306@mail.ru> Peter-Henry Mander wrote: >I wonder if anyone else has tweaked the weighting of the results, like I did? There are benchmarks where erlang code is missing or broken which counts heavily against erlang. If you remove these from the ranking, the results are dramatically better for erlang. > > true > > >Why is there not another concurrency test with 5000 threads and more >that demonstrate the absolute dominance of erlang? How can the >benchmarks be useful unless they highlight those languages with unique >strengths such as concurrency in erlang? Are there other benchmarks that >have been 'politically-corrected' or 'dumbed-down' to be overly >inclusive? > > > > Of course, massive concurrency support is the "kill'em all" feature of Erlang. But if one creates a set of special "concurrency oriented" benchmarks, it will be not impartial with respect to other languages (implementations). >I'm trying to find time to rectify what erlang code I can, but it's a >very low priority. But until _all_ the benchmarks are corrected and >peer-reviewed the ranking is utterly pointless. If anyone cares (and >obviously some of us do) we should extract our proverbial digit and >'fix' the results by submitting better code, and persuade the benchmark >designers to add better and wider-ranging concurrency tests, since >concurrency is becomming a hot topic these days with multicore and cell >processors. > > Well, the applicability of a platform (or programming language) should be decided by a set of application-specific benchmarks. So this accent on concurrency might be not right. For example, Opera browser (rather complex GUI application) has only 20 threads. >Pete. > > Best regards, Nic Linker. From bengt.kleberg@REDACTED Tue Dec 6 12:11:27 2005 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 06 Dec 2005 12:11:27 +0100 Subject: Computer Language Shootout - concurrency In-Reply-To: <1133860763.7933.26.camel@hymir.newport-networks.com> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> <43954EBF.90304@mail.ru> <1133860763.7933.26.camel@hymir.newport-networks.com> Message-ID: <439571DF.6090205@ericsson.com> On 2005-12-06 10:19, Peter-Henry Mander wrote: > Also, as mentioned here: > http://www.erlang.org/ml-archive/erlang-questions/200512/msg00026.html > Some of the benchmarks are tailored so that some strengths of erlang are > *not* demonstrated. I quote: > "We started off using 1500 threads but too many > language implementations failed or timed out." > > > > Why is there not another concurrency test with 5000 threads and more > that demonstrate the absolute dominance of erlang? How can the > benchmarks be useful unless they highlight those languages with unique > strengths such as concurrency in erlang? Are there other benchmarks that > have been 'politically-corrected' or 'dumbed-down' to be overly > inclusive? > > it is (was) even a faq entry that states that it a goal to make as many as possible of the languages pass as many as possible of the tests. we might think that this is 'dumbed-down' but the only alternative offered is to take the shootout codebase and do it better yourself. > I'm trying to find time to rectify what erlang code I can, but it's a > very low priority. But until _all_ the benchmarks are corrected and > peer-reviewed the ranking is utterly pointless. If anyone cares (and > obviously some of us do) we should extract our proverbial digit and > 'fix' the results by submitting better code, and persuade the benchmark > designers to add better and wider-ranging concurrency tests, since > concurrency is becomming a hot topic these days with multicore and cell > processors. been there, done that. failed. i wish you luck. bengt From erlang@REDACTED Tue Dec 6 12:59:21 2005 From: erlang@REDACTED (Peter-Henry Mander) Date: Tue, 06 Dec 2005 11:59:21 +0000 Subject: Computer Language Shootout - concurrency In-Reply-To: <17301.26113.845456.136279@antilipe.corelatus.se> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> <43954EBF.90304@mail.ru> <1133860763.7933.26.camel@hymir.newport-networks.com> <17301.26113.845456.136279@antilipe.corelatus.se> Message-ID: <1133870361.7933.67.camel@hymir.newport-networks.com> Hi Matthias, I did say it was a rant, therefore I claim diminished responsibility (more than usual, that is*) for my unenlightened drivel, sorry. The benchmark in the shootout was _deliberately_ stunted to be more inclusive, which is the reason I objected. If other languages failed to scale well, why not expose the fact? I wasn't really thinking beyond that. I agree, if the tests probe much deeper they will reveal some disgusting facts about *all* languages, not just erlang, mind you. Where does one draw the line?! -- Pete. P.s. And yes, making technology choices based on these benchmarks is flawed. I did say "lies, damned lies and statistics" earlier, so please don't get me wrong. However, technological choices are not always made by those who ultimately use it, and management do tend to use benchmarks like these to give themselves some 'guidance'. It's all a confidence trick; if you don't work the system, the system will work against you. -- P. * I am, after all, the one who sees smiling clocktowers in Stockholm at night! On Tue, 2005-12-06 at 11:20 +0100, Matthias Lang wrote: > Peter-Henry Mander writes: > > > persuade the benchmark designers to add better and wider-ranging > > concurrency tests, since concurrency is becomming a hot topic these > > days with multicore and cell processors. > > Is this a finger-burning recipe? Or, can I make Erlang look bad? > From mikpe@REDACTED Tue Dec 6 16:45:50 2005 From: mikpe@REDACTED (Mikael Pettersson) Date: Tue, 6 Dec 2005 16:45:50 +0100 Subject: Computer Language Shootout - concurrency In-Reply-To: <43954EBF.90304@mail.ru> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> <43954EBF.90304@mail.ru> Message-ID: <17301.45614.330705.67987@alkaid.it.uu.se> Nic Linker writes: > James Hague wrote: > > >>A fly in the ointment - the Ackermann function: > >>http://shootout.alioth.debian.org/gp4/benchmark.php?test=ackermann&lang=all > >> > >>Erlang HiPE - 15th place. ;-) > >> > >> > > > >Interpreted Erlang is within 10x of the top, natively compiled > >benchmark. It's ahead of GForth, which is one of the fastest > >interpreters out there (one that doesn't even do dynamic type checks). > > That's great! > > > > > But Erlang HiPE is not interpreted and I found natural to compare it > with other compilable languages, and unfortunately Erlang is not even > close to the leader, in contrast of what I expected. :-( (Why did I > expect it? Because recursion is the one of the strongest features of > functional languages). The benchmark results on that page looked very strange, especially the position of HiPE compared to C and BEAM, so I re-ran the relevant ones (C, HiPE, BEAM) using more accurate measurement technology[1]. In summary, HiPE is about 2.5 times slower than C, with BEAM being 4.5 to 9 times slower than HiPE[2]. The HiPE code is burdened by (a) a reduction counter test on each entry to Ack, (b) a stack overflow test on each entry to Ack, (c) having to verify that operands are fixnums before executing the inline code for arithmetic, (d) having to check that the arithmetic didn't overflow, and (e) a few suboptimal pieces of generated code (yes I looked at it). Items (a) to (d) all disappear for C. [1] x86 hardware performance counters used to measure the number of CPU clock ticks needed for Ack(3,9): costs for system startup and I/O of the result is excluded [2] On a 2.4GHz dual Xeon (about 3 1/2 years old server box): C: 45ms, HiPE: 111ms, BEAM: 500ms On a 1.6GHz Mobile Athlon64 (in 32-bit mode): C: 45ms, HiPE: 117ms, BEAM: 1067ms /Mikael From mikpe@REDACTED Tue Dec 6 17:11:55 2005 From: mikpe@REDACTED (Mikael Pettersson) Date: Tue, 6 Dec 2005 17:11:55 +0100 Subject: Computer Language Shootout - concurrency In-Reply-To: <17301.45614.330705.67987@alkaid.it.uu.se> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> <43954EBF.90304@mail.ru> <17301.45614.330705.67987@alkaid.it.uu.se> Message-ID: <17301.47179.22561.518882@alkaid.it.uu.se> Mikael Pettersson writes: > Nic Linker writes: > > James Hague wrote: > > > > >>A fly in the ointment - the Ackermann function: > > >>http://shootout.alioth.debian.org/gp4/benchmark.php?test=ackermann&lang=all > > >> > > >>Erlang HiPE - 15th place. ;-) Another data point: they list HiPE as being about 18% slower than BEAM on the random benchmark. On our P4 Xeon, not using the performance counters just the regular time command, HiPE is instead 18% faster than BEAM. (Which still is disappointing.) So I'm not sure I have much confidence in their benchmarking methodology. From xlcr@REDACTED Wed Dec 7 08:22:48 2005 From: xlcr@REDACTED (Nic Linker) Date: Wed, 07 Dec 2005 13:22:48 +0600 Subject: Computer Language Shootout - concurrency In-Reply-To: <17301.45614.330705.67987@alkaid.it.uu.se> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> <43954EBF.90304@mail.ru> <17301.45614.330705.67987@alkaid.it.uu.se> Message-ID: <43968DC8.7070209@mail.ru> Mikael Pettersson wrote: >The HiPE code is burdened by (a) a reduction counter test >on each entry to Ack, (b) a stack overflow test on each >entry to Ack, (c) having to verify that operands are fixnums >before executing the inline code for arithmetic, (d) having >to check that the arithmetic didn't overflow, and (e) a few >suboptimal pieces of generated code (yes I looked at it). >Items (a) to (d) all disappear for C. > >/Mikael > Yes, I suspected that the reason of the (relative) slowdown is a set of additional checks. Best regards, Nic Linker From xlcr@REDACTED Wed Dec 7 08:19:41 2005 From: xlcr@REDACTED (Nic Linker) Date: Wed, 07 Dec 2005 13:19:41 +0600 Subject: Computer Language Shootout - concurrency In-Reply-To: <17301.47179.22561.518882@alkaid.it.uu.se> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> <43954EBF.90304@mail.ru> <17301.45614.330705.67987@alkaid.it.uu.se> <17301.47179.22561.518882@alkaid.it.uu.se> Message-ID: <43968D0D.3050500@mail.ru> Mikael Pettersson wrote: >Another data point: they list HiPE as being about 18% slower than BEAM >on the random benchmark. On our P4 Xeon, not using the performance >counters just the regular time command, HiPE is instead 18% faster than >BEAM. (Which still is disappointing.) > >So I'm not sure I have much confidence in their benchmarking methodology. > Could I take a look at the performance counters using? Best regards, Nic Linker From thomaswhitcomb@REDACTED Wed Dec 7 02:31:21 2005 From: thomaswhitcomb@REDACTED (Tom Whitcomb) Date: Tue, 06 Dec 2005 20:31:21 -0500 Subject: finding exported clauses Message-ID: <5F6F8248.392505C9.72A78FD1@netscape.net> Hi, Is there a way I find the exported clauses and their modules in an erlang shell environment. Maybe something like: getExportedClauses(Module) -> [clause] getExportedClauses() -> [{module,clause}] thanks for the help. __________________________________________________________________ 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 vlad.xx.dumitrescu@REDACTED Wed Dec 7 09:12:10 2005 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Wed, 7 Dec 2005 09:12:10 +0100 Subject: finding exported clauses Message-ID: <11498CB7D3FCB54897058DE63BE3897CD11B2D@esealmw105.eemea.ericsson.se> Try Module:module_info(exports). Regards, Vlad > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Tom Whitcomb > Sent: Wednesday, December 07, 2005 2:31 AM > To: erlang-questions@REDACTED > Subject: finding exported clauses > > Hi, > > Is there a way I find the exported clauses and their modules > in an erlang shell environment. Maybe something like: > > getExportedClauses(Module) -> [clause] > getExportedClauses() -> [{module,clause}] > > thanks for the help. > > __________________________________________________________________ > 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 raimo@REDACTED Wed Dec 7 09:11:30 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 07 Dec 2005 09:11:30 +0100 Subject: finding exported clauses References: <5F6F8248.392505C9.72A78FD1@netscape.net> Message-ID: Module:module_info(). Module:module_info(exports). thomaswhitcomb@REDACTED (Tom Whitcomb) writes: > Hi, > > Is there a way I find the exported clauses and their modules in an erlang shell environment. Maybe something like: > > getExportedClauses(Module) -> [clause] > getExportedClauses() -> [{module,clause}] > > thanks for the help. > > __________________________________________________________________ > 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 -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From bjorn@REDACTED Wed Dec 7 09:16:36 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 07 Dec 2005 09:16:36 +0100 Subject: Computer Language Shootout - concurrency In-Reply-To: References: Message-ID: "Ulf Wiger (AL/EAB)" writes: > I thought that, worst case, it wouldn't make a > difference. As it is now, the compiler inserts > the is_integer/1 checks, but doesn't act on the > result. Eventually, the function splus_2 in > erl_arith.c ends up being called, and it turns > around and calls erts_mixed_plus(), which is > so complex, I didn't even bother to understand it. > It does handle all combinations of smallints, > bignums and floats. > This is strange. Both Beam and hipe-native code have special cases for addition of "small integers" (signed integers that fit into 28 bits), so that erts_mixed_plus() does not get called. Are you sure that the benchmark code itself causes the call erts_mixed_plus() (and not, for instance, the benchmarking framework)? Or could it be that the ackermann benchmark uses big numbers or floats? /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From matthias@REDACTED Wed Dec 7 09:16:38 2005 From: matthias@REDACTED (Matthias Lang) Date: Wed, 7 Dec 2005 09:16:38 +0100 Subject: finding exported clauses In-Reply-To: <5F6F8248.392505C9.72A78FD1@netscape.net> References: <5F6F8248.392505C9.72A78FD1@netscape.net> Message-ID: <17302.39526.417455.765112@antilipe.corelatus.se> Tom Whitcomb writes: > getExportedClauses(Module) -> [clause] > getExportedClauses() -> [{module,clause}] try Module:module_info() Module:module_info(exports) e.g. io:module_info(exports). see also code:all_loaded() Matthias From erlang@REDACTED Wed Dec 7 09:44:04 2005 From: erlang@REDACTED (Michael McDaniel) Date: Wed, 7 Dec 2005 00:44:04 -0800 Subject: finding exported clauses In-Reply-To: <5F6F8248.392505C9.72A78FD1@netscape.net> References: <5F6F8248.392505C9.72A78FD1@netscape.net> Message-ID: <20051207084404.GF3157@delora.autosys.us> On Tue, Dec 06, 2005 at 08:31:21PM -0500, Tom Whitcomb wrote: > Hi, > > Is there a way I find the exported clauses and their modules in an erlang shell environment. Maybe something like: > > getExportedClauses(Module) -> [clause] > getExportedClauses() -> [{module,clause}] > > thanks for the help. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ look at documentation for modules shell, code, c erl> rp(code:all_loaded()). erl> c:m(code). ~Michael From sanjaya@REDACTED Wed Dec 7 09:48:52 2005 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Wed, 7 Dec 2005 14:48:52 +0600 Subject: compiling port driver with c++ compiler (g++) ? Message-ID: <001e01c5fb0b$0c7d08a0$5f00a8c0@wavenet.lk> Hi ...!!! please help me to compile erlang port driver/shared libary with g++. port drived which i wrote is perfectly working when compiled with gcc. When i use g++, same code compiles. But when I try to start the application failing to load on erl_ddll:load_driver(LibDir, PortDriver) . I need to compile with any C++ compiler (g++ perfers) to use the API provided with 3rd party. Because they used C++ STL Headers, i.e #include #include #include thanks in advance, Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From rohini@REDACTED Wed Dec 7 11:45:40 2005 From: rohini@REDACTED (Rohini V) Date: Wed, 7 Dec 2005 16:15:40 +0530 Subject: Support of SMUX Message-ID: <30BFDEA66FF4D41191EB00D0B765BC6F019168F2@medha.wsspl.com> Hi, Does the current erlang version support SMUX protocol ?? If so, then can u please provide me with some documentation support for the same. ( along with the source code ). Regards Rohini From sean.hinde@REDACTED Wed Dec 7 12:29:48 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Wed, 7 Dec 2005 11:29:48 +0000 Subject: Support of SMUX In-Reply-To: <30BFDEA66FF4D41191EB00D0B765BC6F019168F2@medha.wsspl.com> References: <30BFDEA66FF4D41191EB00D0B765BC6F019168F2@medha.wsspl.com> Message-ID: On 7 Dec 2005, at 10:45, Rohini V wrote: > > > Hi, > > Does the current erlang version support SMUX protocol ?? > > If so, then can u please provide me with some documentation support > for the > same. ( along with the source code ). I suspect that if it is not in the SNMP version from the current R10B release then it does not exist. Of course the beauty of open source is that you already have the code for the whole Ericsson SNMP implementation as a basis. If you are the first ones who need to implement this then I'm sure folks on the list would be interested to see (and maybe contribute) to your enhancements. Sean From ulf.wiger@REDACTED Wed Dec 7 14:42:50 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 7 Dec 2005 14:42:50 +0100 Subject: Computer Language Shootout - concurrency Message-ID: Oh, I should hasten to add that it was conjecture based on my reading of the code. I did not trace the benchmark code to see that erts_mixed_plus() in fact got called. What I did was compile with the -S flag with and without is_integer/1 guards, and then run diff on the output. The only difference was the call to the guard, but it didn't affect any of the other code. In both cases, the following instruction was: {bif,'+',{f,0},[{x,1},{integer,1}],{x,0}}. where the constant value is obviously tagged as and integer. In erl_bif.tab, the '+' operation seems to map to splus_2(), which turns around and calls erts_mixed_plus(). I have failed to spot the optimization that you speak of. That obviously isn't meant to imply that it isn't there - only that I was unable to find it. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Bjorn > Gustavsson > Sent: den 7 december 2005 09:17 > To: erlang-questions@REDACTED > Subject: Re: Computer Language Shootout - concurrency > > "Ulf Wiger (AL/EAB)" writes: > > > I thought that, worst case, it wouldn't make a difference. As it is > > now, the compiler inserts the is_integer/1 checks, but > doesn't act on > > the result. Eventually, the function splus_2 in erl_arith.c ends up > > being called, and it turns around and calls > erts_mixed_plus(), which > > is so complex, I didn't even bother to understand it. > > It does handle all combinations of smallints, bignums and floats. > > > > This is strange. > > Both Beam and hipe-native code have special cases for > addition of "small integers" (signed integers that fit into > 28 bits), so that erts_mixed_plus() does not get called. > > Are you sure that the benchmark code itself causes the call > erts_mixed_plus() (and not, for instance, the benchmarking > framework)? Or could it be that the ackermann benchmark uses > big numbers or floats? > > /Bjorn > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > From bmk@REDACTED Wed Dec 7 14:55:21 2005 From: bmk@REDACTED (Micael Karlberg) Date: Wed, 07 Dec 2005 14:55:21 +0100 Subject: Support of SMUX In-Reply-To: References: <30BFDEA66FF4D41191EB00D0B765BC6F019168F2@medha.wsspl.com> Message-ID: <4396E9C9.6080506@erix.ericsson.se> The SNMP reference confused me a bit, so I did a quick google on SMUX and came up with this page: http://www.w3.org/TR/1998/WD-mux-19980710 where they talk about HTTP/1.0 and TCP. Since SNMP is UDP-based (there is some effort to introduce TCP as a carrier) I take it, that you mean inets? /BMK Sean Hinde wrote: > > On 7 Dec 2005, at 10:45, Rohini V wrote: > >> >> >> Hi, >> >> Does the current erlang version support SMUX protocol ?? >> >> If so, then can u please provide me with some documentation support >> for the >> same. ( along with the source code ). > > > I suspect that if it is not in the SNMP version from the current R10B > release then it does not exist. > > Of course the beauty of open source is that you already have the code > for the whole Ericsson SNMP implementation as a basis. If you are the > first ones who need to implement this then I'm sure folks on the list > would be interested to see (and maybe contribute) to your enhancements. > > Sean > > From sean.hinde@REDACTED Wed Dec 7 15:02:49 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Wed, 7 Dec 2005 14:02:49 +0000 Subject: Support of SMUX In-Reply-To: <4396E9C9.6080506@erix.ericsson.se> References: <30BFDEA66FF4D41191EB00D0B765BC6F019168F2@medha.wsspl.com> <4396E9C9.6080506@erix.ericsson.se> Message-ID: <159C31BB-2E6C-47C1-8864-A00A0E60B5C3@gmail.com> Hi Micael, I also saw this RFC first, but then looked up Rohini's web site and saw that they made SNMP stacks. I assumed then that he was referring to SNMP Multiplexing (RFC 1227) Sean On 7 Dec 2005, at 13:55, Micael Karlberg wrote: > The SNMP reference confused me a bit, so I did a quick google on SMUX > and came up with this page: > > http://www.w3.org/TR/1998/WD-mux-19980710 > > where they talk about HTTP/1.0 and TCP. > > Since SNMP is UDP-based (there is some effort to introduce TCP as a > carrier) I take it, that you mean inets? > > /BMK > > Sean Hinde wrote: >> On 7 Dec 2005, at 10:45, Rohini V wrote: >>> >>> >>> Hi, >>> >>> Does the current erlang version support SMUX protocol ?? >>> >>> If so, then can u please provide me with some documentation >>> support for the >>> same. ( along with the source code ). >> I suspect that if it is not in the SNMP version from the current >> R10B release then it does not exist. >> Of course the beauty of open source is that you already have the >> code for the whole Ericsson SNMP implementation as a basis. If >> you are the first ones who need to implement this then I'm sure >> folks on the list would be interested to see (and maybe >> contribute) to your enhancements. >> Sean From mbj@REDACTED Wed Dec 7 15:07:48 2005 From: mbj@REDACTED (Martin Bjorklund) Date: Wed, 07 Dec 2005 15:07:48 +0100 (CET) Subject: Support of SMUX In-Reply-To: References: <30BFDEA66FF4D41191EB00D0B765BC6F019168F2@medha.wsspl.com> Message-ID: <20051207.150748.95905510.mbj@tail-f.com> Sean Hinde wrote: > > Does the current erlang version support SMUX protocol ?? > > > > If so, then can u please provide me with some documentation support > > for the > > same. ( along with the source code ). > > I suspect that if it is not in the SNMP version from the current R10B > release then it does not exist. Actually it does exist, in jungerl. I wrote it a couple of years ago. It works (tested against the SMUX agent in freeradius), but it might need some additions. So, the code is available from jungerl at sourceforge, http://jungerl.sourceforge.net. /martin From bjorn@REDACTED Wed Dec 7 15:27:24 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 07 Dec 2005 15:27:24 +0100 Subject: Computer Language Shootout - concurrency In-Reply-To: References: Message-ID: OK, I agree that it may not be immediately obvious from reading the sources :-) , but addition is performed by a Beam instruction (called "i_plus_jd" in beam_emu.c). The BIF will be used if you apply erlang:'+'/2 (and also used by match specifications). The "i_plus_jd" instruction handles additions of small integers directly. Only if one or both of the operands are not small, or if the sum is not small, will the erts_mixed_plus() function be called. Knowing beforehand that both operands are integers would not help because they may be bignums, so the type tests would still be needed. Introducing a new "is_small_integer/1" guard to eliminate the type tests would probably not be worth it, because there would be more instructions and you would probably lose more time by instruction dispatching than you would win by eliminating the type tests. /Bjorn "Ulf Wiger (AL/EAB)" writes: > Oh, I should hasten to add that it was conjecture > based on my reading of the code. I did not trace > the benchmark code to see that erts_mixed_plus() > in fact got called. > > What I did was compile with the -S flag with and > without is_integer/1 guards, and then run diff on > the output. The only difference was the call to > the guard, but it didn't affect any of the other > code. > > In both cases, the following instruction was: > > {bif,'+',{f,0},[{x,1},{integer,1}],{x,0}}. > > where the constant value is obviously tagged as > and integer. > > In erl_bif.tab, the '+' operation seems to map > to splus_2(), which turns around and calls > erts_mixed_plus(). I have failed to spot the > optimization that you speak of. That obviously > isn't meant to imply that it isn't there - only > that I was unable to find it. > > /Uffe > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Bjorn > > Gustavsson > > Sent: den 7 december 2005 09:17 > > To: erlang-questions@REDACTED > > Subject: Re: Computer Language Shootout - concurrency > > > > "Ulf Wiger (AL/EAB)" writes: > > > > > I thought that, worst case, it wouldn't make a difference. As it is > > > now, the compiler inserts the is_integer/1 checks, but > > doesn't act on > > > the result. Eventually, the function splus_2 in erl_arith.c ends up > > > being called, and it turns around and calls > > erts_mixed_plus(), which > > > is so complex, I didn't even bother to understand it. > > > It does handle all combinations of smallints, bignums and floats. > > > > > > > This is strange. > > > > Both Beam and hipe-native code have special cases for > > addition of "small integers" (signed integers that fit into > > 28 bits), so that erts_mixed_plus() does not get called. > > > > Are you sure that the benchmark code itself causes the call > > erts_mixed_plus() (and not, for instance, the benchmarking > > framework)? Or could it be that the ackermann benchmark uses > > big numbers or floats? > > > > /Bjorn > > -- > > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > > > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From tobbe@REDACTED Wed Dec 7 16:10:50 2005 From: tobbe@REDACTED (tobbe) Date: Wed, 7 Dec 2005 16:10:50 +0100 Subject: trapexit, erlang-announce and spam References: Message-ID: <20051207151050.F2104591AB@bang.trapexit.org> It seems like trapexit has started to receive a lot of spam via the erlang-announce mailing list recently. (btw: how can that be ?) I have now disabled the erlang-announce forum group, in an attempt to remedy this. Cheers, Tobbe _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From bfulg@REDACTED Thu Dec 8 07:22:11 2005 From: bfulg@REDACTED (Brent Fulgham) Date: Wed, 7 Dec 2005 22:22:11 -0800 Subject: Computer Language Shootout - concurrency In-Reply-To: <43968D0D.3050500@mail.ru> References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> <43954EBF.90304@mail.ru> <17301.45614.330705.67987@alkaid.it.uu.se> <17301.47179.22561.518882@alkaid.it.uu.se> <43968D0D.3050500@mail.ru> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Dec 6, 2005, at 11:19 PM, Nic Linker wrote: > Mikael Pettersson wrote: > >> Another data point: they list HiPE as being about 18% slower than >> BEAM >> on the random benchmark. On our P4 Xeon, not using the performance >> counters just the regular time command, HiPE is instead 18% faster >> than >> BEAM. (Which still is disappointing.) >> >> So I'm not sure I have much confidence in their benchmarking >> methodology. Hi, I am one of the people (culprits) responsible for the revived shootout. I think the basics of the shootout are sound, though I must admit that many lively debates have been had on the subject. Just to be on the safe side, I reran all Erlang benchmarks, and the results are posted. Apparently, the Erlang compiled output was being used in preference to the Hipe compile, resulting in the bad results you reported (see http://shootout.alioth.debian.org/sandbox/ benchmark.php?test=all&lang=hipe&lang2=erlang). In most cases, Hipe is a clear win, but there do seem to be a few edge cases (such as Random). I can't speak to why you see such a large difference from my measurements. The measurement scripts launch a child process and measure the CPU times (system, user, and "real") using the standard Perl module (BSD::Resource). I invite your comments (and criticism). Thanks, - -Brent -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFDl9EUzGDdrzfvUpURAqhcAKCAQfpz6QyFCcq8qduGOELG1YkGwACcCCXY 6CxIYAvFCMPdQ+2ZdEaALo0= =V0g/ -----END PGP SIGNATURE----- From mats.cronqvist@REDACTED Thu Dec 8 11:45:31 2005 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Thu, 08 Dec 2005 11:45:31 +0100 Subject: Obfuscated Erlang Results In-Reply-To: <43944D1D.1030301@erlang-consulting.com> References: <43944D1D.1030301@erlang-consulting.com> Message-ID: <43980ECB.8020006@ericsson.com> Francesco Cesarini (Erlang Training & Consulting) wrote: > Hi All >[...] > And finally, the > judges were forced to add a third prize, the Judge?s prize, as they were > unexpectedly confronted with a breathtaking submission that had been > used in a live system. Mats, don't show this to your QA people ;-) > it'll go live in our next release.... (somewhat cleaned up) mats From mats.cronqvist@REDACTED Thu Dec 8 11:51:03 2005 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Thu, 08 Dec 2005 11:51:03 +0100 Subject: Obfuscated Erlang Results In-Reply-To: References: Message-ID: <43981017.2070306@ericsson.com> Marc van Woerkom wrote: >> http://www.erlang-consulting.com/obfuscatederlang_fs.html > > [...] > >> And finally, the judges were forced to add a third prize, the Judge?s >> prize, as they were unexpectedly confronted with a breathtaking >> submission that had been used in a live system. Mats, don't show this >> to your QA people ;-) > > > Really mind gobbling. It was really generated manually? :) > > Regards, > Marc does this means i passed the reverse Turing test? mats p.s. there's actually a man page for my submission. for the oneliner, please replace rdbg:rdbg(...) with Rdbg(...) NAME rdbg - restricted debugging utility SYNOPSIS rdbg:rdbg(Time,Msgs,Proc,Trc). DESCRIPTION An interface to the trace mechanism, safer (hopefully) than dbg. Disallows some of the more dangerous traces and exits if it gets flooded by trace messages. It runs in the background, collecting trace messages, until it reaches one of it's termination criteria (number of messages or maximum time). Prints the resulting trace messages like this; [{Process, Timestamp, Data}...] Process is the registered name, if any, or else the initital call {M,F,A}. Timestamp is {Hour, Minute, Second, Microsecond} Proc can be; the atom 'all', a registered name, a pid, or the tuple {pid,I1,I2} (which specifies the pid <0.I1.I2>). Trc can be; the atom 'send', the atom 'receive', or a list of restricted trace patterns (RTP). An RTP is a tuple {Module, Function, RMSs, LocalGlobal} where LocalGlobal is one of the atoms 'local' or 'global'. 'global' means that only fully qualified function calls (i.e. M:F()) are traced. Defaults to 'global'. RMSs is a list of restricted match specs (RMS). It defaults to []. An RMS can be; the atom 'stack', the atom 'return', or a description of the argument list. E.g. the list; [1,'_',x] would match is the arity of the called function is 3, the first argument is 1 and the third argument is 'x'. EXAMPLES rdbg:rdbg(3000,3,prfSys,'receive'). ** rdbg, 1 msgs ** [{'receive',{12,18,22,9867},{timeout,#Ref<0.0.2.57760>,tick}}] rdbg:rdbg(3000,3,all,{erlang,now}). ** rdbg, 2 msgs ** [{prfSys,{12,19,0,21791},{erlang,now,[]}}, {prfSys,{12,19,2,42},{erlang,now,[]}}] rdbg:rdbg(3000,3,all,{erlang,now,[return]}). ** rdbg, 2 msgs ** [{prfSys,{12,19,48,10871},{erlang,now,[]}}, {return,{erlang,now,0},{1098,699588,10873}}] rdbg:rdbg(3000,3,all,{erlang,now,[return,stack]}). (erl@REDACTED)1> erlang:now(). {1098,699830,908663} ** rdbg, 2 msgs ** [{{erlang,apply,2}, {12,23,50,908660}, {{stack,['shell:eval_loop/2 ']}, {erlang,now,[]}}}, {return,{erlang,now,0},{1098,699830,908663}}] rdbg:rdbg(3000,3,all,{ets,tab2list,[{inet_db}]}). (erl@REDACTED)1> ets:tab2list(inet_db). (erl@REDACTED)2> ets:tab2list(ac_tab). ** rdbg, 1 msgs ** [{{erlang,apply,2},{14,52,1,357496},{ets,tab2list,[inet_db]}}] From francesco@REDACTED Thu Dec 8 13:18:25 2005 From: francesco@REDACTED (Francesco Cesarini (Erlang Training & Consulting)) Date: Thu, 08 Dec 2005 12:18:25 +0000 Subject: Obfuscated Erlang Results In-Reply-To: <43981017.2070306@ericsson.com> References: <43981017.2070306@ericsson.com> Message-ID: <43982491.9080605@erlang-consulting.com> Mats Cronqvist wrote: > p.s. there's actually a man page for my submission. for the oneliner, > please replace rdbg:rdbg(...) with Rdbg(...) I would have expected the documentation to be a one liner as well... And thanks for not submitting it with your entry.. I am sure it was intentional ;-) /F -- http://www.erlang-consulting.com From erlang@REDACTED Thu Dec 8 17:41:43 2005 From: erlang@REDACTED (Michael McDaniel) Date: Thu, 8 Dec 2005 08:41:43 -0800 Subject: finding exported clauses In-Reply-To: <20051207084404.GF3157@delora.autosys.us> References: <5F6F8248.392505C9.72A78FD1@netscape.net> <20051207084404.GF3157@delora.autosys.us> Message-ID: <20051208164142.GP3157@delora.autosys.us> On Wed, Dec 07, 2005 at 12:44:04AM -0800, Michael McDaniel wrote: > On Tue, Dec 06, 2005 at 08:31:21PM -0500, Tom Whitcomb wrote: > > Hi, > > > > Is there a way I find the exported clauses and their modules in an erlang shell environment. Maybe something like: > > > > getExportedClauses(Module) -> [clause] > > getExportedClauses() -> [{module,clause}] > > > > thanks for the help. > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > look at documentation for modules shell, code, c > > erl> rp(code:all_loaded()). > > erl> c:m(code). > > > ~Michael > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I never saw that my first reply came through to the list. It does include a bit of info I had not read in the other responses so I have sent it again. ~Michael Portland, Oregon, USA From happi@REDACTED Thu Dec 8 22:42:11 2005 From: happi@REDACTED (happi) Date: Thu, 8 Dec 2005 22:42:11 +0100 Subject: scala (was checksum for distributed debugging?) References: Message-ID: <20051208214211.A28945908D@bang.trapexit.org> Bob.Smart at csiro.au wrote: The problem with Scala is that it doesn't have atoms. (end of quote) I don't think that this is a problem at all in Scala, thanks to Scalas built-in quote mechanism. Atoms in Scala are implemented in the standard library in the Symbol class. Symbol.scala wrote: /** Instances of Symbol can be created easily with  *  Scala's built-in quote mechanism. For instance, the Scala term  *  'mysym will invoke the constructor of the  *  Symbol class in the following way:  *  new Symbol("mysym"). . (end of quote) Symbols are used e.g. in Process.scala which emulates the syntax of Erlang processes (although unfortunately not all of the semantics.) and in NameServer.scala. But more on this in another post... /Happi (Erik Stenman) _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From happi@REDACTED Fri Dec 9 00:39:42 2005 From: happi@REDACTED (happi) Date: Fri, 9 Dec 2005 00:39:42 +0100 Subject: scala (was checksum for distributed debugging?) References: Message-ID: <20051208233942.EA4075918B@bang.trapexit.org> [quote="Bob.Smart@REDACTED"] P.S. On a completely different matter, I'd be interested in comments on the Scala language (http://scala.epfl.ch/) by Erlang experts. It can be used in a fairly pure functional style using val declarations, and it seems to support Erlang-style message exchange (see chapter 3 of "Scala by Example" http://scala.epfl.ch/docu/files/ScalaByExample.pdf). Far be it from me to suggest that Erlang might not last forever, but if not this seems a possible migration path. [/quote] ( I've been trying to answer this a couple of times now, but my answer always becomes too long and confusing. But since I spent the time writing it I'm posting it anyway. If you have the time to read half of it you have too much time on your hands. ) In 2003, after seven years of hacking Erlang, I joined Prof. Odersky at EPFL and spent a year and a half working in the Scala project. As both Ulf Wiger and Ke Han notes the biggest problem with the Scala concurrency model is that it is based on the underlying model of the VM it is running on. I will try to go a bit deeper into this problem. In his thesis Joe Armstrong lists a number of requirements on a programming language and its libraries. In short,these are R1) Concurrency, R2) Error encapsulation, R3) Fault detection, R4) Fault identification, R5) Code upgrade, and R6) Stable storage. According to Joe these requirements are fulfilled by Erlang in the following way: R1--by Erlang's processes, R2--processes are designed as units of errors, R2--processes fail if functions are called with the wrong arguments, R3 and R4--when a process fails the reason for failure is broadcasted to linked processes, R5--by hot code loading, and R6--by the Erlang libraries dets and mnesia. There are some key elements in Erlang that according to Joe makes it easier (or indeed possible) to build fault-tolerant software systems. These are: K1 -- Processes, K2 -- Asynchronous message passing, K3 -- Process links, K4 -- No shared memory, K5 -- Code updates, K6 -- and Lightweight processes. Most of this can be implemented in Scala today, and what is left might actually be fixed some time in the future. K1 Processes & K6 Lightweight processes. =========================== Concurrency in Scala is provided by the underlying backend, at the moment either the JVM or the CLRE, which is assumed to provide a thread model compatible with the thread model of Java. This gives Scala concurrency "for free" and the possibility to use Java or .NET libraries that uses the native thread model. A disadvantage is that threads in most Java implementations are not very lightweight, and starting new threads as well as context switching between them can be relatively slow. But there is nothing in the Scala language definition that requires a heavy thread implementation. And there are some experimental Java implementations that actually have very light weight processes. Scala is extensible in many ways which makes it possible to get a language within the language that looks very much like Erlang. (We will use imports, def parameters, quoting, and higher order functions to achive this.) Given an implementation of processes in the class Process, we can in Scala define the spawn function as: package scala.concurrent; object Process { def spawn(def body:unit):Process = { val p = new Process(body); p.start(); p; } } Here the def parameter body:unit takes a closure of the type () => unit. One nice aspect of the def parameter is that the compiler automatically infers that a closure is needed at all call sites of spawn, making it unnecessary for the programmer to write code to create the closure. We can now create a new process by just calling spawn with the code that the new process should start executing. Assuming we have a Server object with a method loop:Int=>Unit, we can create a process like this: import scala.concurrent.Process.spawn; ... val pid = spawn(Server.loop(0)); So far we have assumed an implementation of the class Process, let us now look at how this can be implemented in Scala. All we need to do is to extend the Thread class and implement the abstract run method of Thread: class Process(def body:unit) extends Thread { override def run() = body; } Now we can start a process, but how do we stop it? Well just as in Erlang a process stops when it has no more code to execute, i.e., when the code in body reaches its end. Sometimes we would like to kill the process prematurely, in Erlang this is done by calling the BIF exit(p:pid, reason:Term), in Scala we can also implement exit. We implement it both in the Process class and in the Process object in order to get an Erlang like syntax: object Process { def spawn(def body:unit):Process = { val p = new Process(body); p.start(); p; } def exit(p:Process,reason:AnyRef) = p.exit(reason); } class Process(def body:unit) extends Thread { private var exitReason:AnyRef = null; override def run() = { try {body} catch { case e:java.lang.InterruptedException => exitReason.match { case null: => Console.println("Process exited abnormally " + e); case _: => Console.println("Process exited with reason: " + exitReason); } } } def exit(reason:AnyRef):unit = { exitReason = reason; interrupt(); } } Processes in Erlang can get their own pid by calling the BIF self(), this can easily be simulated in the process class by the method: def self = this; We have one small problem though, in the example above we started the process by calling Server.loop(0), but the object server does not inherit from the class Process, and hence the method self is not available in the code of loop. We can fix this by implementing self in the process object: def self:Process = { if (Thread.currentThread().isInstanceOf[Process]) Thread.currentThread().asInstanceOf[Process] else error("Self called outside a process"); } K2 Asynchronous message passing ====================== So far our processes can only be created and execute code, which is not too bad in it self, but in order to get Erlang like processes we need to give the processes the ability to communicate. In Erlang processes communicate through asynchronous message passing implemented with mailboxes. We can implement the same mechanism in Scala, although here we will go one step further and first implement a more general mailbox which can be read by several processes. On page 138 of the document "Scala by Example" (http://scala.epfl.ch/docu/files/ScalaByExample.pdf) you can find an implementation of Erlang like mailboxes with the following signature: class MailBox { def send(msg: Any): unit; def receive[a](f: PartialFunction[Any, a]): a; def receiveWithin[a](msec: long)(f: PartialFunction[Any, a]): a; } There is a special message TIMEOUT which is used to signal a time-out, implemented as: case class TIMEOUT; The receive method first checks whether the message processor function f can be applied to a message that has already been sent but that was not yet consumed. If yes, the thread continues immediately by applying f to the message. Otherwise, a new receiver is created and linked into the receivers list, and the thread waits for a notification on this receiver. Once the thread is woken up again, it continues by applying f to the message that was stored in the receiver. The mailbox class also offers a method receiveWithin which blocks for only a specified maximal amount of time. If no message is received within the specified time interval (given in milliseconds), the message processor argument f will be unblocked with the special TIMEOUT message. With an implementation of mailboxes we can now add mailboxes to our Process class by mixing in MailBox in Process, and we can make the syntax more Erlang like if we want by defining the method !: class Process(def body:unit) extends Thread with MailBox { def !(msg:Message) = send(msg); ... In order to be able to do send and receive in code that does not inherit from Process we supply some methods in the Process object: object Process { def send(p:Process,msg:Message) = p.send(msg); def receive[a](f: PartialFunction[Message, a]): a = self.receive(f); def receiveWithin[a](msec: long)(f: PartialFunction[Message, a]):a = self.receiveWithin(msec)(f); ... We can also get named process by, as in Erlang, using a name server: object NameServer { val names = new scala.collection.mutable.HashMap[Symbol, Process]; def register(name: Symbol, proc: Process) = { if (names.contains(name)) error("Name:" + name + " already registred"); names += name -> proc; } def unregister(name: Symbol) = { if (names.contains(name)) names -= name; else error("Name:" + name + " not registred"); } def whereis(name: Symbol): Option[Process] = names.get(name); def send(name: Symbol, msg: Actor#Message) = names(name).send(msg); def view(name: Symbol): Process = names(name); } Then we can just write code like register('myServer, Server.loop(0)); 'myServer ! Tuple2('myMessage, self); K3 Process links ========== One of the most important aspects of Erlang is the ability to link processes together. When a process is linked to another process it will send a signal to the other process when it dies. This makes it possible to monitor the failure of processes and to implement supervision trees where a supervisor process monitors worker processes and can restart them if they fail. In Erlang a process can be linked to its father (creator) by using the spawn_link BIF when spawning a new process, it is also possible to link to another process at a later time by calling the link BIF. To implement this in Scala we have to add a list of links to the Process class and provide the link methods, as well as signal a failure to all linked processes. We can now see the complete Process class in all its g(l)ory: class Process(def body:unit) extends Thread with MailBox { private var exitReason:AnyRef = null; private var links:List[Process] = Nil; override def run() = { try {body;signal('Normal)} catch { case _:java.lang.InterruptedException => signal(exitReason); case (exitSignal) => signal(exitSignal); } } private def signal(s:Message) = { links.foreach((p:Process) => p.send(Tuple3('EXIT,this,s))); } def !(msg:Message) = send(msg); def link(p:Process) = links = p::links; def unlink(p:Process) = links = links.remove((p2) => p == p2); def spawn_link(def body:unit) = { val p = new Process(body); p.link(this); p.start(); p } def self = this; def exit(reason:AnyRef):unit = { exitReason = reason; interrupt(); } } In Erlang links actually work slightly differently, when a process (p1) dies and that process is linked to another process (p2) then p2 will also be killed unless that process has the flag trap_exit set to true. With this behavior a whole set of processes that are linked can all be killed by killing just one of the processes. Often this is the desired behavior, if the set of processes are dependent upon each other then there is no reason for any of the processes to continue executing if one of them dies. When the process-flag trap_exits is set to true then the linked process, p2, will not be killed instead it will receive a message about the cause of the death of p1. This is the behaviour of the Scala code above. It would not be hard to mimic the Erlang behavior in Scala by adding the trap_exit flag and then test it in the signal method and either use send or exit. K5 Code updates =========== Currently there is no real support for code updates in Scala, but this might not be as big a problem as one might suspect. The hot code replacement is a cool feature of Erlang but it has some shortcomings. There is no automatic way to update or even detect changes in data structures. Therefore it seems like many real systems goes through special upgrade states and conversion functions, often even using redundant hardware for upgrades. By just following some conventions you can actually upgrade running Scala systems in a similar fashion. K4 No shared memory ============== Now, here is the big difference between Scala and Erlang. Since Scala uses the underlying concurrency model of Java or .Net data sent as messages will be shared between processes. If you (like Joe) belive that sharing is evil, there are four possible solutions to the problem of shared data. 1. Make send copying. This requires a copy or serialize method in all messages, which could be implemented in two ways in Scala. a) Add an abstract copy method to the toplevel class Anyref requiering all classes to implement this method. b) Have a speciall Message class that has a copy method, requiering all classes that needs to be sent to implement this method. The problem with this solution is that the system would have to somehow ensure that a deep copy is performed. An open problem at the moment. 2. The Erlang way No updateable structures. You could for example implement all Erlang terms in Scala and define the type Message as Term. A simple solution which would make scala Processes as powerful as Erlang processes, but you would loose OO for all messages. 3. A new type of type analysis that can determine that there are no mutable structures in objects used as messages. Another open problem. 4. Head in the sand. Just ask the programmer to not send mutable data, (unless he knows what he is doing). This is the current approach of Scala (and Java). I will not present a conclusion here, instead i hope to inspire to some debate. Anyway... Scala is a really cool language and I encourage you all to try it out, you just might like it as much as I do. Still, though, I am back in the Erlang world now, and I'm loving every minute of it. /Erik Happi Stenman PS. Sorry for the badly formatted code, I'm using the trap-exit forum and it seems like code either looks bad in the forum or in the email version... or perhaps both. Any suggestions are welcome. _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From rohini@REDACTED Fri Dec 9 08:14:17 2005 From: rohini@REDACTED (Rohini V) Date: Fri, 9 Dec 2005 12:44:17 +0530 Subject: finding exported clauses Message-ID: <30BFDEA66FF4D41191EB00D0B765BC6F01916909@medha.wsspl.com> Can try erlang:loaded(). It lists all loaded Erlang modules. To check the exported functions, try m(modulename). -----Original Message----- From: Michael McDaniel [mailto:erlang@REDACTED] Sent: Thursday, December 08, 2005 10:12 PM To: erlang-questions@REDACTED Subject: Re: finding exported clauses On Wed, Dec 07, 2005 at 12:44:04AM -0800, Michael McDaniel wrote: > On Tue, Dec 06, 2005 at 08:31:21PM -0500, Tom Whitcomb wrote: > > Hi, > > > > Is there a way I find the exported clauses and their modules in an erlang shell environment. Maybe something like: > > > > getExportedClauses(Module) -> [clause] > > getExportedClauses() -> [{module,clause}] > > > > thanks for the help. > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > look at documentation for modules shell, code, c > > erl> rp(code:all_loaded()). > > erl> c:m(code). > > > ~Michael > > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I never saw that my first reply came through to the list. It does include a bit of info I had not read in the other responses so I have sent it again. ~Michael Portland, Oregon, USA From dizzyd@REDACTED Fri Dec 9 07:01:04 2005 From: dizzyd@REDACTED (dizzyd) Date: Fri, 9 Dec 2005 07:01:04 +0100 Subject: Function matching w/ "abc" ++ Rest References: Message-ID: <20051209060104.DED6F59192@bang.trapexit.org> A general Erlang theory/performance question... If I define a series of functions like so: f1("abc" ++ Rest) ->   abc; f1("def" ++ Rest) ->   def; Is that ++ operator creating a new list and appending to it for the match? Are there scary amounts of list comparisons and overhead happening here? There doesn't seem to be anything about this form in the Erlang docs, yet it works. What's going on? Thanks![/list] _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From ulf.wiger@REDACTED Fri Dec 9 09:16:07 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 9 Dec 2005 09:16:07 +0100 Subject: scala (was checksum for distributed debugging?) Message-ID: Happi wrote: > If you have the time to read half of it you have too much > time on your hands. ) No comment. (: > Currently there is no real support for code updates in Scala, > but this might not be as big a problem as one might suspect. > The hot code replacement is a cool feature of Erlang but it > has some shortcomings. There is no automatic way to update or > even detect changes in data structures. Actually, there is... sort of. I have the following code in my (not yet released) updated plain_fsm.erl: %%% @spec hibernate(M::atom(), F::atom(), A::[IntState]) -> NEVER_RETURNS %%% %%% @doc Virtual function used to wrap a call to the BIF erlang:hibernate/3. %%%

This function cannot be called directly, but translates to the call %%% erlang:hibernate(plain_fsm,wake_up,[data_vsn(),Module,M,F,A]) %%% where Module:data_vsn() and Module:code_change/3 %%% are expected to exist (the parse_transform will add and export the %%% function data_vsn() -< 0, if it doesn't already exist.)

%%%

The function plain_fsm:wake_up/5 will begin by calling %%% Module:data_vsn(), and if it is the same as before, simply %%% call apply(M,F,A). Otherwise, Module:code_change(OldVsn, %%% IntState, hibernate) will be called first. This allows a plain_fsm %%% behaviour module to be "bootstrapped" to a new version during hibernation. %%%

%%% @end hibernate(_M, _F, _A) -> exit(cannot_be_called_directly). wake_up(OldVsn, Module, M, F, [S] = A) -> case Module:data_vsn() of OldVsn -> apply(M, F, A); _NewVsn -> {ok, S1} = Module:code_change(OldVsn, S, hibernate), apply(M, F, [S1]) end. /Uffe From erlang@REDACTED Fri Dec 9 09:58:49 2005 From: erlang@REDACTED (Peter-Henry Mander) Date: Fri, 09 Dec 2005 08:58:49 +0000 Subject: Function matching w/ "abc" ++ Rest In-Reply-To: <20051209060104.DED6F59192@bang.trapexit.org> References: <20051209060104.DED6F59192@bang.trapexit.org> Message-ID: <1134118729.7966.4.camel@hymir.newport-networks.com> Assuming tha code was supposed to read: f1("abc" ++ Rest) -> abc; f1("def" ++ Rest) -> def; You would be better off writing: f1([$a,$b,$c|_Rest]) -> abc; f1([$d,$e,$f|_Rest]) -> def. Pete. On Fri, 2005-12-09 at 07:01 +0100, dizzyd wrote: > A general Erlang theory/performance question... > > If I define a series of functions like so: > > > f1("abc" ++ Rest) -> >   abc; > f1("def" ++ Rest) -> >   def; > > > Is that ++ operator creating a new list and appending to it for the match? Are there scary amounts of list comparisons and overhead happening here? There doesn't seem to be anything about this form in the Erlang docs, yet it works. What's going on? > > Thanks![/list] > _________________________________________________________ > Sent using Mail2Forum (http://m2f.sourceforge.net) > From nm@REDACTED Fri Dec 9 10:14:04 2005 From: nm@REDACTED (Gaspar Chilingarov) Date: Fri, 9 Dec 2005 13:14:04 +0400 (AMT) Subject: adding xmlrpc support into yaws? Message-ID: <52361.195.250.88.228.1134119644.squirrel@www.web.am> Hi there! I wrote a small module, which provides interface for handling xmlrpc calls in yaws pages, like this: out(A) -> yaws_xmlrpc:handler(A#arg{state = #xmlhandler_state{}}, {?MODULE, handle_rpc}). handle_rpc(State, {call, _ReqFunction, [_Value]}) -> {false, {response, [ "Hello xmlrpc world! :)" ]}}. so handler functoin interface is the same as xmlrpc module uses. also you should have installed xmlrpc module, because it is used for call data decoding/encoding. -- Gaspar Chilingarov System Administrator t +37491 419763 w www.netter.am e nm@REDACTED From chsu79@REDACTED Fri Dec 9 10:37:42 2005 From: chsu79@REDACTED (Christian S) Date: Fri, 9 Dec 2005 10:37:42 +0100 Subject: Function matching w/ "abc" ++ Rest In-Reply-To: <1134118729.7966.4.camel@hymir.newport-networks.com> References: <20051209060104.DED6F59192@bang.trapexit.org> <1134118729.7966.4.camel@hymir.newport-networks.com> Message-ID: Provide reasoning. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjorn@REDACTED Fri Dec 9 10:44:07 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 09 Dec 2005 10:44:07 +0100 Subject: Function matching w/ "abc" ++ Rest In-Reply-To: <1134118729.7966.4.camel@hymir.newport-networks.com> References: <20051209060104.DED6F59192@bang.trapexit.org> <1134118729.7966.4.camel@hymir.newport-networks.com> Message-ID: Peter-Henry Mander writes: > Assuming tha code was supposed to read: > > f1("abc" ++ Rest) -> > abc; > f1("def" ++ Rest) -> > def; > > You would be better off writing: > > f1([$a,$b,$c|_Rest]) -> abc; > f1([$d,$e,$f|_Rest]) -> def. Why? The compiler generates exactly the same code for the two ways of writing the function. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From erlang@REDACTED Fri Dec 9 11:38:11 2005 From: erlang@REDACTED (Peter-Henry Mander) Date: Fri, 09 Dec 2005 10:38:11 +0000 Subject: Function matching w/ "abc" ++ Rest In-Reply-To: References: <20051209060104.DED6F59192@bang.trapexit.org> <1134118729.7966.4.camel@hymir.newport-networks.com> Message-ID: <1134124692.7966.16.camel@hymir.newport-networks.com> Hi Christian, As Bjorn has already pointed out there's no technical advantage in either notation, I therefore have no logical reason to provide. Sorry. On Fri, 2005-12-09 at 10:37 +0100, Christian S wrote: > Provide reasoning. > From mats.cronqvist@REDACTED Fri Dec 9 10:48:56 2005 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Fri, 09 Dec 2005 10:48:56 +0100 Subject: Function matching w/ "abc" ++ Rest In-Reply-To: <1134118729.7966.4.camel@hymir.newport-networks.com> References: <20051209060104.DED6F59192@bang.trapexit.org> <1134118729.7966.4.camel@hymir.newport-networks.com> Message-ID: <43995308.60603@ericsson.com> from the reference manual; http://erlang.se/doc/doc-5.4.10/doc/reference_manual/expressions.html#6 "When matching strings, the following is a valid pattern: f("prefix" ++ Str) -> ... This is syntactic sugar for the equivalent, but harder to read f([$p,$r,$e,$f,$i,$x | Str]) -> ..." note that f("foo" ++ _) works, and is the right choice for this example. mats Peter-Henry Mander wrote: > Assuming tha code was supposed to read: > > f1("abc" ++ Rest) -> > abc; > f1("def" ++ Rest) -> > def; > > You would be better off writing: > > f1([$a,$b,$c|_Rest]) -> abc; > f1([$d,$e,$f|_Rest]) -> def. > > Pete. From raimo@REDACTED Fri Dec 9 10:46:45 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 09 Dec 2005 10:46:45 +0100 Subject: Function matching w/ "abc" ++ Rest References: <20051209060104.DED6F59192@bang.trapexit.org>, <20051209060104.DED6F59192@bang.trapexit.org>, <1134118729.7966.4.camel@hymir.newport-networks.com> Message-ID: f1("abc"++Rest) -> abc; is just syntactical sugar for f1([$a,$b,$c|Rest]) -> abc; so, you might even want to write f1("abc"++_) -> abc; Since "abc" is a compile-time constant, it can be expanded without runtime overhead. And it becomes a rather extensive match, or perhaps just what you would expect - all characters in the string are matched. erlang@REDACTED (Peter-Henry Mander) writes: > Assuming tha code was supposed to read: > > f1("abc" ++ Rest) -> > abc; > f1("def" ++ Rest) -> > def; > > You would be better off writing: > > f1([$a,$b,$c|_Rest]) -> abc; > f1([$d,$e,$f|_Rest]) -> def. > > Pete. > > On Fri, 2005-12-09 at 07:01 +0100, dizzyd wrote: > > A general Erlang theory/performance question... > > > > If I define a series of functions like so: > > > > > > f1("abc" ++ Rest) -> > >   abc; > > f1("def" ++ Rest) -> > >   def; > > > > > > Is that ++ operator creating a new list and appending to it for the match? Are there scary amounts of list comparisons and overhead happening here? There doesn't seem to be anything about this form in the Erlang docs, yet it works. What's going on? > > > > Thanks![/list] > > _________________________________________________________ > > Sent using Mail2Forum (http://m2f.sourceforge.net) > > > > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From xlcr@REDACTED Fri Dec 9 13:00:31 2005 From: xlcr@REDACTED (Nic Linker) Date: Fri, 09 Dec 2005 18:00:31 +0600 Subject: Computer Language Shootout - concurrency In-Reply-To: References: <20051201231707.87860.qmail@web33811.mail.mud.yahoo.com> <405D1A6B-3C02-4EFA-8E3A-D321F6C499DA@gmail.com> <43901430.3040801@mail.ru> <43954EBF.90304@mail.ru> <17301.45614.330705.67987@alkaid.it.uu.se> <17301.47179.22561.518882@alkaid.it.uu.se> <43968D0D.3050500@mail.ru> Message-ID: <439971DF.5090906@mail.ru> Brent Fulgham wrote: > I invite your comments (and criticism). All is ok. To compare different things (in this case language implementations) is really ungrateful job, because it will never satisfy all people - always there will be complaining ones. So I have only thing to say: good job and go on! :-) > Thanks, > > - -Brent Best regards, Nic Linker. From dizzyd@REDACTED Fri Dec 9 15:11:25 2005 From: dizzyd@REDACTED (dizzyd) Date: Fri, 9 Dec 2005 15:11:25 +0100 Subject: Function matching w/ "abc" ++ Rest References: Message-ID: <20051209141125.20C115919B@bang.trapexit.org> Perfect, thanks everyone. :) D. _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From jay@REDACTED Fri Dec 9 17:14:52 2005 From: jay@REDACTED (Jay Nelson) Date: Fri, 09 Dec 2005 08:14:52 -0800 Subject: CMP article in ACM's Queue Magazine Message-ID: <4399AD7C.5040308@duomark.com> An article on cnet discusses an analysis by a Google researcher that cost of power to run their servers may outstrip the initial cost of the servers. He advocates multicore CPUs with slower clock speeds, but acknowledges that the lack of language tools for concurrency makes the transition difficult. http://news.com.com/Power+could+cost+more+than+servers%2C+Google+warns/2100-1010_3-5988090.html jay From ulf.wiger@REDACTED Fri Dec 9 17:39:37 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 9 Dec 2005 17:39:37 +0100 Subject: CMP article in ACM's Queue Magazine Message-ID: I have posted a comment: "It is not true that concurrency forces people to think in ways that are unnatural. Conventional programming languages approach concurrency in a way that is unintuitive, but that's a completely different story. Erlang (http://www.erlang.org) has been used for over a decade in commercial products with lots of concurrency, and we have lots of evidence that the programming model is both intuitive and safe, in fact more so that object-oriented design. We are eagerly awaiting multi-core chips, as they offer us a perfectly natural way to scale up the capacity of our products. Ulf Wiger Senior Software Architect Ericsson AB" You are all welcome to tune in and disagree. (: /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Jay Nelson > Sent: den 9 december 2005 17:15 > To: erlang-questions@REDACTED > Subject: CMP article in ACM's Queue Magazine > > An article on cnet discusses an analysis by a Google > researcher that cost of power to run their servers may > outstrip the initial cost of the servers. He advocates > multicore CPUs with slower clock speeds, but acknowledges > that the lack of language tools for concurrency makes the > transition difficult. > > http://news.com.com/Power+could+cost+more+than+servers%2C+Goog > le+warns/2100-1010_3-5988090.html > > jay > > From Marc.Vanwoerkom@REDACTED Fri Dec 9 18:18:52 2005 From: Marc.Vanwoerkom@REDACTED (Marc van Woerkom) Date: Fri, 09 Dec 2005 18:18:52 +0100 Subject: CMP article in ACM's Queue Magazine In-Reply-To: <4399AD7C.5040308@duomark.com> Message-ID: >http://news.com.com/Power+could+cost+more+than+servers%2C+Google+warns/2100-1010_3-5988090.html And further http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=332 "What we need is OO for concurrency?higher-level abstractions that help build concurrent programs, just as object-oriented abstractions help build large componentized programs." Hmm.. do they know Erlang? Do do they not deem it appropriate (because it is no MS lang)? Regards, Marc From jay@REDACTED Fri Dec 9 19:41:20 2005 From: jay@REDACTED (Jay Nelson) Date: Fri, 09 Dec 2005 10:41:20 -0800 Subject: OO, FP and XP training (extremely long) Message-ID: <4399CFD0.2010207@duomark.com> [The meat about Functional Programming is at the bottom, you need to read the set up to understand how I arrived at my conclusions.] At work we are mainly a C++ / C# shop now with most development being geared towards .NET. We previously were a UNIX / C++ shop with excellent scaleability, reliability and redundancy. Needless to say, scale is being challenged by the move to interactive GUI-based applications on Windows XP coming from UNIX servers. As part of this multi-year transition we have embraced the principles of eXtreme Programming (XP) and agile development. Our team has used an external consultant in the last few weeks to coach us, although we have been using the Test Driven Development (TDD) approach for a year now. One of the demos that they gave was a live process of developing a bowling game scoring application to show how refactoring works in practical terms. The lecturer ran through the typical OO design anyone would come up with which involved 4 or 5 classes and inheritance, and then held it to the side while he developed the code with prompting from an audience using TDD. The end result was a for loop with two if statements and no classes. This caused a little discussion as to why he ended up with the result he did (TDD forced him to write only the necessary code) and his reflection on why "the power of OO was not needed in this case". After being challenged on this in the past, he wrote the full OO implementation and ended up with over 400 lines of code, confirming his suspicion that no OO was a simpler implementation. However, still convinced that OO was a good thing, he believed for more complicated programs it was warranted and aided in development*. In our actual pairs programming with the coach observing, he often wanted to simplify the code we have built up over the last year. One of the things that surprised me was that he wanted to eliminate Getters and Setters and just use public member variables. Another difference was that all member functions be declared public since that made them much easier to test without proxy methods. He also advocated removing inheritance in many cases and replacing it with object factories, cooperating classes and interfaces that exposed only the required public methods. ----- *My immediate question was, "If this is so obvious with a toy problem, why isn't the complexity of the code multiplied many times when scaled up to a larger problem?". ----- It was enlightening to see the change that TDD is bringing about from the standpoint of the experts in the field (our coaching organization has been a long advocate and publisher of some seminal texts on the subject). Here is my take from the exercise: 1) IDEs are very important in changing the way you program - Verbosity is great, type a few letters and allow completion - Refactoring, renaming is much easier - Don't ever worry about overhead, avoid all duplicate code - Rely heavily on the editor to point out errors without compiling - Declare types so that the IDE signatures are more readable, rather than type safety 2) TDD changes the way you code - Test first means most functions are best made public - Constant refactoring makes the code units smaller - Make sure you refactor the tests just as diligently - Freely modify anything, the tests protect you - Classes are essential to override external behavior 3) Interfaces are much more important than classes - Use object factories and only access via interfaces - Use interfaces as replaced facades when testing - Mock objects allows dynamic swapping of functionality 4) All meetings and planning are evil In general I shuddered at a lot of the "best practices" that violated my old training in OO about protection of data and encapsulation. This was after all one of the big advantages of OO. I came to the following general conclusions (feel free to challenge or augment them): A) TDD subverts staticly typed languages The main purpose of static typing is to allow the compiler to notify the programmer of errors before allowing the execution of code. If you have a bunch of tests that break, it can be more thorough than just a static type check of variables and signatures. This equates in my mind to preference for run-time validation with real data. The second advantage of static typing is compiler optimization, but with XP, programmer optimization is more important. Performance is only considered if the acceptance test that specifies a performance level does not pass. B) Engineering principles and experience hinder development TDD and XP are all about making the team more effective -- faster with fewer software errors. The methods used boost the worst performers a lot and hinder the best performers to a lesser degree. (I suspect the very best programmers are slowed down by more than the boost of the worst, but there are so few world-class programmers that most companies have never met one.) Any anticipation based on previous experience is eschewed for fear it results in over-engineering when a simple solution works. Start with the simplest case that passes the test and gradually refine it -- the process of refinement incurs refactoring which will produce the desired solution with the simplest design. While this works in practice for most problems -- it is very easy to refactor code to speed it up -- architectural problems do not fall out so simply. Refactoring a data flow that involves multiple systems which did not consider performance (or, say, hot code loading) cannot just be refactored to introduce a solution. Deep thought and insight are needed to produce an innovative solution. But a fast, reproducible, straight forward approach gets you into the marketplace competing with like-minded companies quickly. C) No one understands the system Everyone works in pairs on every part of the code. Writing code is a flurry of making a test case fail, writing a simple solution, increasing the test case and refactoring. The tools simplify this so that extra arguments can be added to a function in one place and it will be updated everywhere -- even if you don't know where those changes happen. I stepped away after hours of coding several times without understanding anything we coded, but knowing that it passed the tests and therefore was functionally correct. Everyone is interchangeable. Mindless code generation and copious unit test studying produce a localized understanding quickly that leads to enhancements and bug fixes being done rapidly. Ask anyone a deep question about the philosophy of the system, the general performance characteristics or whether there is a clean approach to expanding its range of scope and you will be met with blank stares and requests for specific test descriptions. D) XP developers are coding Functionally, not using OO Gradually the constraints of class encapsulation are being removed. All methods and member variables become public to ease testing, interfaces are used to make the IDE work again rather than give a meaningless list of every data item in the system (not to restrict code access, since the unit tests prove which functions are accessed). Global variables and global functions harken back to the days of APL, one of the first functional languages. The use of cooperating classes rather than inheritance is concurrency oriented and relies on function modules (interfaces) to access the ghost classes. When XP developers believe they are taking advantage of Mock Objects or proxy classes, they are really doing late binding of function interfaces. When unit tests run, they are simulating the dynamic scope of execution and use run-time validation. When acceptance tests are executing they have built an entire scaffolding that should be part of the language and always enforced during execution. UBF-B is a general solution that doesn't require all the test instances to be written. My bold predictions: 1) Agile development will lead to OO languages being replaced by FP languages. 2) Agile development will hit a wall that will require a "new innovative development process" when average programmers use it for concurrent programming without a language like erlang. 3) Businesses will quickly compete in markets and with a level of software complexity that they previously couldn't, but will find themselves stuck with a product and user base that is not understood well enough for strategic planning purposes. 4) "Lone wolf" teams and programmers will be more innovative, but they will be copied more quickly by average teams. The sheer volume of code needed to compete will overwhelm the small organizations and force innovation out of the market. 5) Big paradigm shifts will be necessary to rebalance industry competition; mundane evolution of versions will be possible by all companies. 6) IDEs will hide the complexity and level of insight equally, making "hand coded" programming a specialized black art that is equated to hotrod enthusiast engine tinkerers. 7) Big businesses will continue to make money touting large complex systems worked by a team of programmers; startups will continue to find niches that they can subvert with new approaches that they sell to the big businesses. jay From thomaswhitcomb@REDACTED Fri Dec 9 20:33:09 2005 From: thomaswhitcomb@REDACTED (Tom Whitcomb) Date: Fri, 09 Dec 2005 14:33:09 -0500 Subject: finding exported clauses Message-ID: <35DC1416.1E462E7F.72A78FD1@netscape.net> Thanks for the 'erlang:loaded/1' hint. I can now follow loaded/1 up with Module:module_info(exports) and get programmatic access to all the exported clauses. :-) tom Rohini V wrote: >Can try erlang:loaded(). >It lists all loaded Erlang modules. > >To check the exported functions, try >m(modulename). > >-----Original Message----- >From: Michael McDaniel [mailto:erlang@REDACTED] >Sent: Thursday, December 08, 2005 10:12 PM >To: erlang-questions@REDACTED >Subject: Re: finding exported clauses > > >On Wed, Dec 07, 2005 at 12:44:04AM -0800, Michael McDaniel wrote: >> On Tue, Dec 06, 2005 at 08:31:21PM -0500, Tom Whitcomb wrote: >> > Hi, >> > >> > Is there a way I find the exported clauses and their modules in an >erlang shell environment. Maybe something like: >> > >> > getExportedClauses(Module) -> [clause] >> > getExportedClauses() -> [{module,clause}] >> > >> > thanks for the help. >> > >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> >> look at documentation for modules shell, code, c >> >> erl> rp(code:all_loaded()). >> >> erl> c:m(code). >> >> >> ~Michael >> >> >> >^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > >I never saw that my first reply came through to the list. >It does include a bit of info I had not read in the other >responses so I have sent it again. > > >~Michael >Portland, Oregon, USA > > > > > __________________________________________________________________ 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 rasmussen.bryan@REDACTED Fri Dec 9 22:22:25 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Fri, 9 Dec 2005 22:22:25 +0100 Subject: CMP article in ACM's Queue Magazine In-Reply-To: References: <4399AD7C.5040308@duomark.com> Message-ID: <3bb44c6e0512091322x4523b387w3ba27830b20cf0e6@mail.gmail.com> >From reading various Google publications I find it highly doubtful that they use MS languages (unless by MS you mean MainStream?) There does seem to be a lot of python usage in google actually. cheers, Bryan On 12/9/05, Marc van Woerkom wrote: > >http://news.com.com/Power+could+cost+more+than+servers%2C+Google+warns/2100-1010_3-5988090.html > > And further > > http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=332 > > "What we need is OO for concurrency?higher-level > abstractions that help build concurrent programs, just as > object-oriented abstractions help build large > componentized programs." > > Hmm.. do they know Erlang? Do do they not deem it > appropriate (because it is no MS lang)? > > Regards, > Marc > > > > From rasmussen.bryan@REDACTED Fri Dec 9 22:31:05 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Fri, 9 Dec 2005 22:31:05 +0100 Subject: OO, FP and XP training (extremely long) In-Reply-To: <4399CFD0.2010207@duomark.com> References: <4399CFD0.2010207@duomark.com> Message-ID: <3bb44c6e0512091331s7fe7f91co126ee6f488d0c203@mail.gmail.com> well I recently had my first agile development class, although this was just a high level agile concepts class. the thing that I felt after a bit was too much OO, too much UML. I felt sort of like, OO and UML have problems. Therefore to solve their problems this method has been developed that will allow them to run a few more years with these technologies. This was also my feeling about Aspect Orientation though. Given the high level overview of the class I guess I developed a high level degree of cynicism. Cheers, Bryan Rasmussen On 12/9/05, Jay Nelson wrote: > [The meat about Functional Programming is at the bottom, you need to > read the set up to understand how I arrived at my conclusions.] > > At work we are mainly a C++ / C# shop now with most development being > geared towards .NET. We previously were a UNIX / C++ shop with > excellent scaleability, reliability and redundancy. Needless to say, > scale is being challenged by the move to interactive GUI-based > applications on Windows XP coming from UNIX servers. > > As part of this multi-year transition we have embraced the principles of > eXtreme Programming (XP) and agile development. Our team has used an > external consultant in the last few weeks to coach us, although we have > been using the Test Driven Development (TDD) approach for a year now. > > One of the demos that they gave was a live process of developing a > bowling game scoring application to show how refactoring works in > practical terms. The lecturer ran through the typical OO design anyone > would come up with which involved 4 or 5 classes and inheritance, and > then held it to the side while he developed the code with prompting from > an audience using TDD. The end result was a for loop with two if > statements and no classes. This caused a little discussion as to why he > ended up with the result he did (TDD forced him to write only the > necessary code) and his reflection on why "the power of OO was not > needed in this case". After being challenged on this in the past, he > wrote the full OO implementation and ended up with over 400 lines of > code, confirming his suspicion that no OO was a simpler implementation. > However, still convinced that OO was a good thing, he believed for more > complicated programs it was warranted and aided in development*. > > In our actual pairs programming with the coach observing, he often > wanted to simplify the code we have built up over the last year. One of > the things that surprised me was that he wanted to eliminate Getters and > Setters and just use public member variables. Another difference was > that all member functions be declared public since that made them much > easier to test without proxy methods. He also advocated removing > inheritance in many cases and replacing it with object factories, > cooperating classes and interfaces that exposed only the required public > methods. > > > ----- > *My immediate question was, "If this is so obvious with a toy problem, > why isn't the complexity of the code multiplied many times when scaled > up to a larger problem?". > ----- > > > It was enlightening to see the change that TDD is bringing about from > the standpoint of the experts in the field (our coaching organization > has been a long advocate and publisher of some seminal texts on the > subject). Here is my take from the exercise: > > 1) IDEs are very important in changing the way you program > - Verbosity is great, type a few letters and allow completion > - Refactoring, renaming is much easier > - Don't ever worry about overhead, avoid all duplicate code > - Rely heavily on the editor to point out errors without compiling > - Declare types so that the IDE signatures are more readable, rather > than type safety > > 2) TDD changes the way you code > - Test first means most functions are best made public > - Constant refactoring makes the code units smaller > - Make sure you refactor the tests just as diligently > - Freely modify anything, the tests protect you > - Classes are essential to override external behavior > > 3) Interfaces are much more important than classes > - Use object factories and only access via interfaces > - Use interfaces as replaced facades when testing > - Mock objects allows dynamic swapping of functionality > > 4) All meetings and planning are evil > > > In general I shuddered at a lot of the "best practices" that violated my > old training in OO about protection of data and encapsulation. This was > after all one of the big advantages of OO. I came to the following > general conclusions (feel free to challenge or augment them): > > > A) TDD subverts staticly typed languages > > The main purpose of static typing is to allow the compiler to notify the > programmer of errors before allowing the execution of code. If you have > a bunch of tests that break, it can be more thorough than just a static > type check of variables and signatures. This equates in my mind to > preference for run-time validation with real data. > > The second advantage of static typing is compiler optimization, but with > XP, programmer optimization is more important. Performance is only > considered if the acceptance test that specifies a performance level > does not pass. > > > B) Engineering principles and experience hinder development > > TDD and XP are all about making the team more effective -- faster with > fewer software errors. The methods used boost the worst performers a > lot and hinder the best performers to a lesser degree. (I suspect the > very best programmers are slowed down by more than the boost of the > worst, but there are so few world-class programmers that most companies > have never met one.) Any anticipation based on previous experience is > eschewed for fear it results in over-engineering when a simple solution > works. Start with the simplest case that passes the test and gradually > refine it -- the process of refinement incurs refactoring which will > produce the desired solution with the simplest design. > > While this works in practice for most problems -- it is very easy to > refactor code to speed it up -- architectural problems do not fall out > so simply. Refactoring a data flow that involves multiple systems which > did not consider performance (or, say, hot code loading) cannot just be > refactored to introduce a solution. Deep thought and insight are needed > to produce an innovative solution. But a fast, reproducible, straight > forward approach gets you into the marketplace competing with > like-minded companies quickly. > > > C) No one understands the system > > Everyone works in pairs on every part of the code. Writing code is a > flurry of making a test case fail, writing a simple solution, increasing > the test case and refactoring. The tools simplify this so that extra > arguments can be added to a function in one place and it will be updated > everywhere -- even if you don't know where those changes happen. I > stepped away after hours of coding several times without understanding > anything we coded, but knowing that it passed the tests and therefore > was functionally correct. > > Everyone is interchangeable. Mindless code generation and copious unit > test studying produce a localized understanding quickly that leads to > enhancements and bug fixes being done rapidly. Ask anyone a deep > question about the philosophy of the system, the general performance > characteristics or whether there is a clean approach to expanding its > range of scope and you will be met with blank stares and requests for > specific test descriptions. > > > D) XP developers are coding Functionally, not using OO > > Gradually the constraints of class encapsulation are being removed. All > methods and member variables become public to ease testing, interfaces > are used to make the IDE work again rather than give a meaningless list > of every data item in the system (not to restrict code access, since the > unit tests prove which functions are accessed). Global variables and > global functions harken back to the days of APL, one of the first > functional languages. The use of cooperating classes rather than > inheritance is concurrency oriented and relies on function modules > (interfaces) to access the ghost classes. > > When XP developers believe they are taking advantage of Mock Objects or > proxy classes, they are really doing late binding of function > interfaces. When unit tests run, they are simulating the dynamic scope > of execution and use run-time validation. When acceptance tests are > executing they have built an entire scaffolding that should be part of > the language and always enforced during execution. UBF-B is a general > solution that doesn't require all the test instances to be written. > > > My bold predictions: > > 1) Agile development will lead to OO languages being replaced by FP > languages. > > 2) Agile development will hit a wall that will require a "new innovative > development process" when average programmers use it for concurrent > programming without a language like erlang. > > 3) Businesses will quickly compete in markets and with a level of > software complexity that they previously couldn't, but will find > themselves stuck with a product and user base that is not understood > well enough for strategic planning purposes. > > 4) "Lone wolf" teams and programmers will be more innovative, but they > will be copied more quickly by average teams. The sheer volume of code > needed to compete will overwhelm the small organizations and force > innovation out of the market. > > 5) Big paradigm shifts will be necessary to rebalance industry > competition; mundane evolution of versions will be possible by all > companies. > > 6) IDEs will hide the complexity and level of insight equally, making > "hand coded" programming a specialized black art that is equated to > hotrod enthusiast engine tinkerers. > > 7) Big businesses will continue to make money touting large complex > systems worked by a team of programmers; startups will continue to find > niches that they can subvert with new approaches that they sell to the > big businesses. > > > jay > > From John-Olof.Bauner@REDACTED Mon Dec 12 08:09:39 2005 From: John-Olof.Bauner@REDACTED (John-Olof Bauner) Date: Mon, 12 Dec 2005 08:09:39 +0100 Subject: CMP article in ACM's Queue Magazine In-Reply-To: References: Message-ID: <439D2233.8050503@ericsson.com> Marc van Woerkom wrote: >> http://news.com.com/Power+could+cost+more+than+servers%2C+Google+warns/2100-1010_3-5988090.html >> > > > And further > http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=332 > > "What we need is OO for concurrency?higher-level abstractions that > help build concurrent programs, just as object-oriented abstractions > help build large componentized programs." > > Hmm.. do they know Erlang? Do do they not deem it appropriate (because > it is no MS lang)? And do they know about OMG/UML? As we use it in the RoseRT incarnation it is about message passing between some execution entities which should not be a surprise as it has been used since the seventies in the telecom industry. J-O From valentin@REDACTED Sat Dec 10 16:49:25 2005 From: valentin@REDACTED (Valentin Micic) Date: Sat, 10 Dec 2005 17:49:25 +0200 Subject: CMP article in ACM's Queue Magazine References: Message-ID: <00e401c5fda1$4c2c97c0$7309fea9@MONEYMAKER2> Let me see how this works... First they (Scott, Bill & the other guy) reduced comercial market to Java & VB/NET/C# & ORACLE by highjacking any decent effort out there (present company excluded). This forced people to purchase a lots of hardware. Now that we're stuck with a lots of hardware thikning: could we by more hardware? -- a new marketing plot is emerging: 1) Save the power. Save the planet... hug a tree. And while you're at it -- buy more hardware! 2) Never mind the bolocks... buy more hardware. 3) Buy more hardware. Period. V. From ke.han@REDACTED Mon Dec 12 12:38:11 2005 From: ke.han@REDACTED (ke.han) Date: Mon, 12 Dec 2005 19:38:11 +0800 Subject: scala (was checksum for distributed debugging?) In-Reply-To: <20051208233942.EA4075918B@bang.trapexit.org> References: <20051208233942.EA4075918B@bang.trapexit.org> Message-ID: <439D6123.9050507@redstarling.com> Thanks for your lengthy post. I have little time on my hands, but I make time to read such useful reports. I agree with your analysis and am pleased to know that an erlang expert had his hands in on scala development. It would be nice to see some of these ideas implemented one day as I will be keeping my eye on scala for future suitability in real world apps. thanks again, ke han happi wrote: > [quote="Bob.Smart@REDACTED"] > P.S. On a completely different matter, I'd be interested in > comments on the Scala language (http://scala.epfl.ch/) by > Erlang experts. It can be used in a fairly pure functional > style using val declarations, and it seems to support > Erlang-style message exchange (see chapter 3 of "Scala by > Example" http://scala.epfl.ch/docu/files/ScalaByExample.pdf). > Far be it from me to suggest that Erlang might not last > forever, but if not this seems a possible migration path. > [/quote] > > ( I've been trying to answer this a couple of times now, > but my answer always becomes too long and confusing. > But since I spent the time writing it I'm posting it anyway. > If you have the time to read half of it you have too much > time on your hands. ) > > In 2003, after seven years of hacking Erlang, I joined > Prof. Odersky at EPFL and spent a year and a half > working in the Scala project. > > As both Ulf Wiger and Ke Han notes the biggest problem > with the Scala concurrency model is that it is based on > the underlying model of the VM it is running on. > I will try to go a bit deeper into this problem. > > In his thesis Joe Armstrong lists a number of requirements on > a programming language and its libraries. In short,these are > R1) Concurrency, > R2) Error encapsulation, > R3) Fault detection, > R4) Fault identification, > R5) Code upgrade, and > R6) Stable storage. > > According to Joe these requirements are fulfilled by Erlang > in the following way: > R1--by Erlang's processes, > R2--processes are designed as units of errors, > R2--processes fail if functions are called with the wrong arguments, > R3 and R4--when a process fails the reason for failure is > broadcasted to linked processes, > R5--by hot code loading, and > R6--by the Erlang libraries dets and mnesia. > > There are some key elements in Erlang that according > to Joe makes it easier (or indeed possible) to build > fault-tolerant software systems. These are: > K1 -- Processes, > K2 -- Asynchronous message passing, > K3 -- Process links, > K4 -- No shared memory, > K5 -- Code updates, > K6 -- and Lightweight processes. > > Most of this can be implemented in Scala today, and > what is left might actually be fixed some time in the > future. > > K1 Processes & K6 Lightweight processes. > =========================== > Concurrency in Scala is provided by the underlying > backend, at the moment either the JVM or the CLRE, which is assumed > to provide a thread model compatible with the thread model of Java. > > This gives Scala concurrency "for free" and the possibility to > use Java or .NET libraries that uses the native thread model. > > A disadvantage is that threads in most Java implementations > are not very lightweight, and starting new threads as well as > context switching between them can be relatively slow. > But there is nothing in the Scala language definition that > requires a heavy thread implementation. And there are some > experimental Java implementations that actually have very > light weight processes. > > Scala is extensible in many ways which makes it possible > to get a language within the language that looks very much > like Erlang. (We will use imports, def parameters, quoting, > and higher order functions to achive this.) > > Given an implementation of processes in the class Process, > we can in Scala define the spawn function as: > > package scala.concurrent; > object Process { > def spawn(def body:unit):Process = { > val p = new Process(body); > p.start(); > p; > } > } > > Here the def parameter body:unit takes a closure of the > type () => unit. One nice aspect of the def parameter is that > the compiler automatically infers that a closure is needed at > all call sites of spawn, making it unnecessary for the programmer > to write code to create the closure. We can now create a new > process by just calling spawn with the code that the new process > should start executing. > > Assuming we have a Server object with a method > loop:Int=>Unit, > we can create a process like this: > import scala.concurrent.Process.spawn; > ... > val pid = spawn(Server.loop(0)); > > So far we have assumed an implementation of the class Process, > let us now look at how this can be implemented in Scala. > All we need to do is to extend the Thread class and implement > the abstract run method of Thread: > > class Process(def body:unit) extends Thread { > override def run() = body; > } > > Now we can start a process, but how do we stop it? Well just as in > Erlang a process stops when it has no more code to execute, i.e., > when the code in body reaches its end. Sometimes we would like to > kill the process prematurely, in Erlang this is done by calling the > BIF exit(p:pid, reason:Term), in Scala we can also implement > exit. We implement it both in the Process class and in the > Process object in order to get an Erlang like syntax: > > object Process { > def spawn(def body:unit):Process = { > val p = new Process(body); > p.start(); > p; > } > def exit(p:Process,reason:AnyRef) = > p.exit(reason); > } > > class Process(def body:unit) extends Thread { > private var exitReason:AnyRef = null; > override def run() = { > try {body} > catch { > case e:java.lang.InterruptedException => > exitReason.match { > case null: => > Console.println("Process exited abnormally " + e); > case _: => > Console.println("Process exited with reason: " + exitReason); > } > } > } > > def exit(reason:AnyRef):unit = { > exitReason = reason; > interrupt(); > } > } > > Processes in Erlang can get their own pid by calling the BIF > self(), this can easily be simulated in the process class > by the method: def self = this; > > We have one small problem though, in the example above we started > the process by calling Server.loop(0), but the object server > does not inherit from the class Process, and hence the method > self is not available in the code of loop. > We can fix this by implementing self in the process object: > > def self:Process = { > if (Thread.currentThread().isInstanceOf[Process]) > Thread.currentThread().asInstanceOf[Process] > else error("Self called outside a process"); > } > > > K2 Asynchronous message passing > ====================== > > So far our processes can only be created and execute code, > which is not too bad in it self, but in order to get Erlang > like processes we need to give the processes the ability to > communicate. In Erlang processes communicate through > asynchronous message passing implemented with mailboxes. > We can implement the same mechanism in Scala, although here > we will go one step further and first implement a more general > mailbox which can be read by several processes. > > On page 138 of the document "Scala by Example" > (http://scala.epfl.ch/docu/files/ScalaByExample.pdf) > you can find an implementation of Erlang like mailboxes > with the following signature: > class MailBox { > def send(msg: Any): unit; > def receive[a](f: PartialFunction[Any, a]): a; > def receiveWithin[a](msec: long)(f: PartialFunction[Any, a]): a; > } > > There is a special message TIMEOUT which is used to signal a > time-out, implemented as: > case class TIMEOUT; > > The receive method first checks whether the message processor > function f can be applied to a message that has already been sent > but that was not yet consumed. If yes, the thread continues > immediately by applying f to the message. Otherwise, a new > receiver is created and linked into the receivers list, > and the thread waits for a notification on this receiver. > Once the thread is woken up again, it continues by applying > f to the message that was stored in the receiver. > > The mailbox class also offers a method receiveWithin > which blocks for only a specified maximal amount of time. If no > message is received within the specified time interval (given in > milliseconds), the message processor argument f will be unblocked > with the special TIMEOUT message. > > With an implementation of mailboxes we can now add mailboxes to > our Process class by mixing in MailBox in Process, and we can make > the syntax more Erlang like if we want by defining the method !: > > class Process(def body:unit) extends Thread with MailBox { > def !(msg:Message) = send(msg); > ... > > In order to be able to do send and receive in code that does > not inherit from Process we supply some methods in the Process > object: > > object Process { > def send(p:Process,msg:Message) = > p.send(msg); > def receive[a](f: PartialFunction[Message, a]): a = > self.receive(f); > > def receiveWithin[a](msec: long)(f: PartialFunction[Message, a]):a = > self.receiveWithin(msec)(f); > ... > > We can also get named process by, as in Erlang, using a name server: > > object NameServer { > val names = new scala.collection.mutable.HashMap[Symbol, Process]; > > def register(name: Symbol, proc: Process) = { > if (names.contains(name)) error("Name:" + name > + " already registred"); > names += name -> proc; > } > > def unregister(name: Symbol) = { > if (names.contains(name)) > names -= name; > else > error("Name:" + name + " not registred"); > } > > def whereis(name: Symbol): Option[Process] = > names.get(name); > > def send(name: Symbol, msg: Actor#Message) = > names(name).send(msg); > > def view(name: Symbol): Process = names(name); > > } > > Then we can just write code like > register('myServer, Server.loop(0)); > 'myServer ! Tuple2('myMessage, self); > > K3 Process links > ========== > One of the most important aspects of Erlang is the ability to link > processes together. When a process is linked to another process it > will send a signal to the other process when it dies. This makes it > possible to monitor the failure of processes and to implement > supervision trees where a supervisor process monitors worker processes > and can restart them if they fail. > > In Erlang a process can be linked to its father (creator) by using > the spawn_link BIF when spawning a new process, it is also possible to > link to another process at a later time by calling the link BIF. > To implement this in Scala we have to add a list of links to the > Process class and provide the link methods, as well as signal a > failure to all linked processes. > We can now see the complete Process class in all its g(l)ory: > > class Process(def body:unit) extends Thread with MailBox { > private var exitReason:AnyRef = null; > private var links:List[Process] = Nil; > override def run() = { > try {body;signal('Normal)} > catch { > case _:java.lang.InterruptedException => > signal(exitReason); > case (exitSignal) => > signal(exitSignal); > } > } > > private def signal(s:Message) = { > links.foreach((p:Process) => p.send(Tuple3('EXIT,this,s))); > } > > def !(msg:Message) = send(msg); > > def link(p:Process) = links = p::links; > def unlink(p:Process) = > links = links.remove((p2) => p == p2); > > def spawn_link(def body:unit) = { > val p = new Process(body); > p.link(this); > p.start(); > p > } > > def self = this; > > def exit(reason:AnyRef):unit = { > exitReason = reason; > interrupt(); > } > } > > In Erlang links actually work slightly differently, when a process > (p1) dies and that process is linked to another process (p2) then p2 > will also be killed unless that process has the flag trap_exit set to > true. With this behavior a whole set of processes that are linked can > all be killed by killing just one of the processes. Often this is the > desired behavior, if the set of processes are dependent upon > each other then there is no reason for any of the processes to continue > executing if one of them dies. > > When the process-flag trap_exits is set to true then the linked process, > p2, will not be killed instead it will receive a message about the > cause of the death of p1. This is the behaviour of the Scala code > above. > > It would not be hard to mimic the Erlang behavior in Scala by > adding the trap_exit flag and then test it in the signal method and > either use send or exit. > > K5 Code updates > =========== > Currently there is no real support for code updates in Scala, > but this might not be as big a problem as one might suspect. > The hot code replacement is a cool feature of Erlang but > it has some shortcomings. There is no automatic way to > update or even detect changes in data structures. > > Therefore it seems like many real systems goes through > special upgrade states and conversion functions, often > even using redundant hardware for upgrades. By just following > some conventions you can actually upgrade running Scala > systems in a similar fashion. > > K4 No shared memory > ============== > Now, here is the big difference between Scala and Erlang. > Since Scala uses the underlying concurrency model of > Java or .Net data sent as messages will be shared > between processes. > > If you (like Joe) belive that sharing is evil, there are > four possible solutions to the problem of shared data. > > 1. Make send copying. > This requires a copy or serialize method in all messages, > which could be implemented in two ways in Scala. > a) Add an abstract copy method to the toplevel class Anyref > requiering all classes to implement this method. > b) Have a speciall Message class that has a copy method, > requiering all classes that needs to be sent to implement > this method. > The problem with this solution is that the system would have > to somehow ensure that a deep copy is performed. An open > problem at the moment. > > 2. The Erlang way > No updateable structures. > You could for example implement all Erlang terms in Scala > and define the type Message as Term. > A simple solution which would make scala Processes as > powerful as Erlang processes, but you would loose OO for > all messages. > > 3. A new type of type analysis that can determine that there are > no mutable structures in objects used as messages. > Another open problem. > > 4. Head in the sand. > Just ask the programmer to not send mutable data, > (unless he knows what he is doing). > This is the current approach of Scala (and Java). > > > I will not present a conclusion here, instead i hope to inspire > to some debate. > > > > > > Anyway... Scala is a really cool language and I encourage > you all to try it out, you just might like it as much as I do. > Still, though, I am back in the Erlang world now, and I'm > loving every minute of it. > > /Erik Happi Stenman > > PS. > Sorry for the badly formatted code, I'm using the trap-exit > forum and it seems like code either looks bad in the forum > or in the email version... or perhaps both. > Any suggestions are welcome. > _________________________________________________________ > Sent using Mail2Forum (http://m2f.sourceforge.net) > From mbpaz@REDACTED Mon Dec 12 12:43:18 2005 From: mbpaz@REDACTED (Miguel Barreiro) Date: Mon, 12 Dec 2005 12:43:18 +0100 Subject: Large files Message-ID: <1134387798.439d6256a84e9@webmail.alfa21.com> Hi, Support for large files (large being >= 2GB which is actually "moderately sized files" these days) works ok on 64-bit systems. Doesn't anyone else use large files on 32-bit systems? In case people is interested it works with the following recipe: - Either patch the file driver to open files with O_LARGEFILE and change a couple variables from off_t to off64_t and make sure they are correctly packed into 64-bit commands and responses or, much simpler: $ export CFLAGS="-D_FILE_OFFSET_BITS=64" ; ./configure ; make (remember to use clean sources). See the libc documentation for details on the _FILE_OFFSET_BITS flag. - Apply the attached patch to make file:position/2 work correctly (everything else works without the patch, AFAIK). Currently erts/emulator/drivers/common/efile_drv.c packs the return value of lseek(2) using reply_Uint (which BTW is a bit misleading -- Uint is typedef'ed to a pointer-sized variable and not an unsigned int as I would tend to expect. These don't always match). The return value of lseek is off_t which may not be Uint sized, so I added a reply_off_t function. Patch generated against R108-B. Regards, Miguel -------------- next part -------------- A non-text attachment was scrubbed... Name: reply_off_t.patch Type: text/x-patch Size: 1238 bytes Desc: not available URL: From xpdoka@REDACTED Mon Dec 12 13:00:05 2005 From: xpdoka@REDACTED (Dominic Williams) Date: Mon, 12 Dec 2005 13:00:05 +0100 (CET) Subject: OO, FP and XP training (extremely long) In-Reply-To: <4399CFD0.2010207@duomark.com> References: <4399CFD0.2010207@duomark.com> Message-ID: <30201.212.155.207.253.1134388805.squirrel@www.geekisp.com> Hi Jay, Thanks for your post, now I know I'm not so alone with this strange combination of interests in XP and Erlang... > 1) Agile development will lead to OO languages being > replaced by FP languages. I'm not going to make any predictions about how the rest of the world is going to evolve, but personally I am a firm believer in the fact that FP, and in particular Erlang, is a perfect fit for XP. I'm working on an article which I'll put on my website shortly, arguing that OO actually obfuscates programmer tests, that Erlang doesn't and indeed how TDD is a wonderful fit with Erlang, FP, pattern matching and so on. I've started an open-source tool, www.xpdojo.net, whose aim is to enable XP teams to develop in Erlang - or Erlang teams to use XP. Of course it's being developed in Erlang. However, the XP community, although open-minded about a lot of things, is fiercely OO. I'll see what I can do to change that. I'll probably be giving a talk about XP and Erlang at the Paris XP Day (www.xpday.fr). And, if I get off my butt and get XP Dojo to a useful state, I'd like to come and show it at the next EUC. As you say, many OO developers have come to the conclusion that TDD does away with the need for static typing - that's one of the reasons I feel TDD might also be of interest to Erlang developers, especially those who think they would like more type checking ;-) Regards, Dominic Williams http://www.dominicwilliams.net ---- From ulf.wiger@REDACTED Mon Dec 12 13:58:54 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 12 Dec 2005 13:58:54 +0100 Subject: OO, FP and XP training (extremely long) Message-ID: Jay Nelson wrote: > C) No one understands the system > > [...]Ask anyone a deep question about the philosophy of > the system, the general performance characteristics or > whether there is a clean approach to expanding its range of > scope and you will be met with blank stares and requests for > specific test descriptions. Interesting observation, and pretty damaging if it's true. We're doing some pilot work with QuickCheck, which could be viewed as a perverse form of TDD. ;-) I was thinking that the above statement is probably _not_ true for QuickCheck, since, rather than asking you to think in terms of concrete test cases (reducing the system to small pieces while ignoring the less tangible aspects), QuickCheck rather prompts the question "what problem am I trying to solve?". Thus forcing the programmer to think more abstractly, QuickCheck seems to encourage a system perspective rather than subverting it. Also, since you don't have explicit control of the actual test cases, you are (again) forced to think more in terms of "how is this supposed to work in practice?" and, when confronted with an inconsistency dug up by QuickCheck, you have to ask "What is wrong - my code, or my understanding of it?" Finally, once you get used to it, writing QuickCheck properties doesn't seem much more difficult than writing specific test cases. I will be back (hopefully) with reports on how this actually works out in practice. /Uffe From joelr1@REDACTED Mon Dec 12 20:57:18 2005 From: joelr1@REDACTED (Joel Reymont) Date: Mon, 12 Dec 2005 19:57:18 +0000 Subject: Piggybacking on the SSL handshake Message-ID: <16D71C21-DA08-4D8B-84D8-0BAA3D808882@gmail.com> Folks, I'm dealing with a strange protocol implementation where the customer piggybacks on the SSL handshake and proceeds to selectively use SSL when needed. The way they do this is by plugging "in" and "out" memory BIOs into OpenSSL and using them when needed. To kick things off they initialize OpenSSL with certificate, etc. and then wait for data to become available in the "out" BIO. They take the data, wrap it up and ship it over to the client that proceeds to unwrap the data, feed it to OpenSSL through the "in" BIO, wait for output, etc. Then they ask OpenSSL if the handshake was completed. Once the handshake is completed SSL is not used until needed. My question is this... Can I implement this protocol using Erlang's SSL module? It seems to use a proxy so if I can take the output form the proxy and wrap it up then I would be good. Of course I would also need to detect the end of the SSL handshake. Thanks, Joel -- http://wagerlabs.com/ From dizzyd@REDACTED Tue Dec 13 01:21:25 2005 From: dizzyd@REDACTED (Dave Smith) Date: Mon, 12 Dec 2005 17:21:25 -0700 Subject: Patch for strstr_binary Message-ID: <83DEE7EE-538D-430F-869B-25F92456DFEB@dizzyd.com> Greetings, I'm not sure how the list feels about patches for new BIFs, but I'd like to share a patch for OTP R10B8 to speed up string/binary processing. In particular, I needed a way to do the equivalent of string:str() on a binary object, and it needed to be fast (I'm parsing a very large number of HTTP connections). Initially I did all my parsing in a C driver/port but got tired of dealing with memory management and other wonderful aspects of C. Some profiling of a native Erlang version of my parsing code yielded that a fast string:str function on binaries would get me nearly back to C-speed, so that's how I came up with this patch. I understand completely if the erlang group doesn't wish to incorporate this patch into the core distribution, but I do hope it's at least considered. The code has been (lightly) load tested on Mac OSX and smoke tested on Linux (32-bit). I doubt it will work on win32, as it uses a memcmp() function...but it should be easy to port. I welcome any feedback and comments -- this is my first BIF. :) Cheers! D. -------------- next part -------------- A non-text attachment was scrubbed... Name: strstr_binary.patch Type: application/octet-stream Size: 1482 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: From mikpe@REDACTED Tue Dec 13 03:53:44 2005 From: mikpe@REDACTED (Mikael Pettersson) Date: Tue, 13 Dec 2005 03:53:44 +0100 (MET) Subject: Patch for strstr_binary Message-ID: <200512130253.jBD2ridM016444@harpo.it.uu.se> > OSX and smoke tested on Linux (32-bit). I doubt it will work on > win32, as it uses a memcmp() function...but it should be easy to memcmp() is a standard ANSI/ISO-C feature. I would be very surprised if Win32 didn't have it. > + if (is_binary(big) && is_binary(little)) { > + > + char* big_ptr; > + int big_len = binary_size(big); > + GET_BINARY_BYTES(big, big_ptr); > + > + char* little_ptr; > + int little_len = binary_size(little); > + GET_BINARY_BYTES(little, little_ptr); > + > + char* cur; > + char* max_big = (big_ptr + big_len) - little_len ; > + char first_little = *little_ptr; > + int index = -1; This isn't ANSI-C and won't compile with e.g. gcc-2.95.3. You should make a single block of the variable declarations at the beginning of this scope, and do the initialisations as assignments. > + for (cur = big_ptr; cur <= max_big; cur++) { > + if (*cur == first_little && memcmp(cur, little_ptr, little_len) == 0) { > + index = (int)cur - (int)big_ptr; These (int) casts are broken on 64-bit machines. Replace them with (long) casts. Better yet, "index = cur - big_ptr;" should have the same effect and be 100% kosher. > +bif erlang:strstr_binary/2 > + > + > + No stray empty lines please. /Mikael From dizzyd@REDACTED Tue Dec 13 06:33:05 2005 From: dizzyd@REDACTED (Dave Smith) Date: Mon, 12 Dec 2005 22:33:05 -0700 Subject: Patch for strstr_binary In-Reply-To: <200512130253.jBD2ridM016444@harpo.it.uu.se> References: <200512130253.jBD2ridM016444@harpo.it.uu.se> Message-ID: <17258A6E-5C95-411E-9D17-F2971EE3B4D8@dizzyd.com> On Dec 12, 2005, at 7:53 PM, Mikael Pettersson wrote: > This isn't ANSI-C and won't compile with e.g. gcc-2.95.3. > You should make a single block of the variable declarations > at the beginning of this scope, and do the initialisations > as assignments. Fixed in attached patch. I've spent too long outside of strict C world. :) > These (int) casts are broken on 64-bit machines. Replace them > with (long) casts. Better yet, "index = cur - big_ptr;" > should have the same effect and be 100% kosher. You have to cast pointers if you want an int out of them, at least according to my version of gcc. However, I did correct the casts to be longs instead of ints. > No stray empty lines please. Fixed in attached patch. Thanks for the feedback. :) D. -------------- next part -------------- A non-text attachment was scrubbed... Name: strstr_binary.patch Type: application/octet-stream Size: 1830 bytes Desc: not available URL: -------------- next part -------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 186 bytes Desc: This is a digitally signed message part URL: From dizzyd@REDACTED Tue Dec 13 06:50:44 2005 From: dizzyd@REDACTED (Dave Smith) Date: Mon, 12 Dec 2005 22:50:44 -0700 Subject: Patch for strstr_binary In-Reply-To: <200512130253.jBD2ridM016444@harpo.it.uu.se> References: <200512130253.jBD2ridM016444@harpo.it.uu.se> Message-ID: <0604BE1F-2997-4ECA-B711-2C8EFFEA0583@dizzyd.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 FWIW, I also have published my patches to OTP in a Mercurial repository at: http://dizzyd.com/mercurial/erlang_otp There are a couple of other patches out there, such as the EPoll patch that I plan to incorporate in this repos. D. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDnmE1s6zMNAt8YgcRAltzAKCWPHiD/2thx3+d8WJz3xjMzLjcqwCfUVb4 3pxJZQyAtszeZkJoxwRTGe8= =X+3a -----END PGP SIGNATURE----- From mikpe@REDACTED Tue Dec 13 07:44:01 2005 From: mikpe@REDACTED (Mikael Pettersson) Date: Tue, 13 Dec 2005 07:44:01 +0100 Subject: Patch for strstr_binary In-Reply-To: <17258A6E-5C95-411E-9D17-F2971EE3B4D8@dizzyd.com> References: <200512130253.jBD2ridM016444@harpo.it.uu.se> <17258A6E-5C95-411E-9D17-F2971EE3B4D8@dizzyd.com> Message-ID: <17310.28081.600986.481605@alkaid.it.uu.se> Dave Smith writes: > > These (int) casts are broken on 64-bit machines. Replace them > > with (long) casts. Better yet, "index = cur - big_ptr;" > > should have the same effect and be 100% kosher. > > You have to cast pointers if you want an int out of them, at least > according to my version of gcc. However, I did correct the casts to > be longs instead of ints. You're computing the difference between two pointers, and that's well-defined(*) in C since at least K&R: ptr2 - ptr1 returns a signed integer value diff such that ptr1 + diff == ptr2. There's no need to fake this by casting the pointers to long first. (*) Given various conditions, like ptr1 and ptr2 must be of the same type and point into the same object/array, but those conditions are satisfied in your code. /Mikael From micke@REDACTED Tue Dec 13 09:21:35 2005 From: micke@REDACTED (Michael Fogeborg) Date: Tue, 13 Dec 2005 09:21:35 +0100 Subject: Erlang & performance / watt Message-ID: <6.2.1.2.0.20051213091637.0281bcd0@mail.online.no> How does Erlang compete here ? Any advantages when it comes to performance / watt ? http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=330 A quote from the article: ".... The complexity of parallel software can slow down programmer productivity by making it more difficult to write correct and efficient programs. Computer science students' limited exposure to parallel programming, lack of popular languages with native support for parallelism ...." --- From erlang@REDACTED Tue Dec 13 10:00:46 2005 From: erlang@REDACTED (Peter-Henry Mander) Date: Tue, 13 Dec 2005 09:00:46 +0000 Subject: Erlang & performance / watt In-Reply-To: <6.2.1.2.0.20051213091637.0281bcd0@mail.online.no> References: <6.2.1.2.0.20051213091637.0281bcd0@mail.online.no> Message-ID: <1134464446.7994.42.camel@hymir.newport-networks.com> I'm intrigued by this: "If there are enough threads (hardware and software), one should never have to speculate. The eight CPU cores were a throwback to early RISC designs: single-issue, in-order, nonspeculative." So, it looks as if Intel was going down a cul-de-sac with speculative, out-of-order, hyperthreaded, overheating billion transistor etc... CPUs, and that the RISC paradigm is destined for a resurgence. I have a fondness for simple, orthogonal CPUs. ... And that a multicore Erlang CPU might find a market yet? (ducking to avoid the flames, not just those from Buncefield nearby: http://news.bbc.co.uk/1/hi/uk/4523430.stm). Pete. On Tue, 2005-12-13 at 09:21 +0100, Michael Fogeborg wrote: > How does Erlang compete here ? > Any advantages when it comes to performance / watt ? > > http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=330 > > A quote from the article: > ".... > The complexity of parallel software can slow down programmer productivity > by making it more difficult to write correct and efficient programs. > Computer science students' limited exposure to parallel programming, lack > of popular languages with native support for parallelism > ...." > > --- > > > From marthin@REDACTED Tue Dec 13 12:12:27 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Tue, 13 Dec 2005 13:12:27 +0200 Subject: Patch for strstr_binary In-Reply-To: <200512130253.jBD2ridM016444@harpo.it.uu.se> Message-ID: <200512131112.jBDBCdh03824@hades.cslab.ericsson.net> (**) on Mikael's (*): Careful now. Yes, it true, ptr1 - ptr2 is a signed int, but it might not have the value you'd expect. There's a pretty good reason the pointers must be to the same type - that's because value of ptr1 - ptr2 is supposed to be the offset (in memory) between the two objects being pointed at. Unless theyre byte pointers (char* etc), the value of ptr1 - ptr2 is not returned in bytes, but in "element size units". Subtracting two pointers to two adjacent elements in an array of 32-byte structures would result in a value of 1, not 32! The same goes for place = ptr1 + diff : if ptr1 points to a 8 byte double and diff is 1, then place should be ptr1 + 8 bytes. This, though correct behaviour for strongly typed pointer arithmetic, has lead to numerous confused programmers chasing all sorts of bugs. Hence, seeking certainty, some programmers force all pointer arithmetic into char* arithmetic and manually address the element size issues where they arise. C is my "mother tongue" but I've been living in a completely different world for the last 10 years, so who knows how modern compilers and standards handle this. But wait, this is not a C mailing list is it? /Marthin > -----Original Message----- > From: owner-erlang-questions@REDACTED [mailto:owner-erlang- > questions@REDACTED] On Behalf Of Mikael Pettersson > Sent: 13 December 2005 04:54 > To: dizzyd@REDACTED; erlang-questions@REDACTED > Subject: Re: Patch for strstr_binary > > > OSX and smoke tested on Linux (32-bit). I doubt it will work on > > win32, as it uses a memcmp() function...but it should be easy to > > memcmp() is a standard ANSI/ISO-C feature. I would be very > surprised if Win32 didn't have it. > > > + if (is_binary(big) && is_binary(little)) { > > + > > + char* big_ptr; > > + int big_len = binary_size(big); > > + GET_BINARY_BYTES(big, big_ptr); > > + > > + char* little_ptr; > > + int little_len = binary_size(little); > > + GET_BINARY_BYTES(little, little_ptr); > > + > > + char* cur; > > + char* max_big = (big_ptr + big_len) - little_len ; > > + char first_little = *little_ptr; > > + int index = -1; > > This isn't ANSI-C and won't compile with e.g. gcc-2.95.3. > You should make a single block of the variable declarations > at the beginning of this scope, and do the initialisations > as assignments. > > > + for (cur = big_ptr; cur <= max_big; cur++) { > > + if (*cur == first_little && memcmp(cur, little_ptr, > little_len) == 0) { > > + index = (int)cur - (int)big_ptr; > > These (int) casts are broken on 64-bit machines. Replace them > with (long) casts. Better yet, "index = cur - big_ptr;" > should have the same effect and be 100% kosher. > > > +bif erlang:strstr_binary/2 > > + > > + > > + > > No stray empty lines please. > > /Mikael From huss01@REDACTED Tue Dec 13 13:10:05 2005 From: huss01@REDACTED (=?ISO-8859-1?Q?H=E5kan_Huss?=) Date: Tue, 13 Dec 2005 13:10:05 +0100 Subject: Patch for strstr_binary In-Reply-To: <200512130253.jBD2ridM016444@harpo.it.uu.se> References: <200512130253.jBD2ridM016444@harpo.it.uu.se> Message-ID: 2005/12/13, Mikael Pettersson : > > + if (is_binary(big) && is_binary(little)) { > > + > > + char* big_ptr; > > + int big_len = binary_size(big); > > + GET_BINARY_BYTES(big, big_ptr); > > + > > + char* little_ptr; > > + int little_len = binary_size(little); > > + GET_BINARY_BYTES(little, little_ptr); > > + > > + char* cur; > > + char* max_big = (big_ptr + big_len) - little_len ; > > + char first_little = *little_ptr; > > + int index = -1; > > This isn't ANSI-C and won't compile with e.g. gcc-2.95.3. > You should make a single block of the variable declarations > at the beginning of this scope, and do the initialisations > as assignments. > It is ANSI-C, since it is allowed by the current ANSI/ISO definition of the C language, (ISO 9899:1999 if memory serves me right, aka C99). It is not allowed by the previous ANSI standard, C89, which was formally obsoleted some six years ago. Even though it's true that there are all to many broken compilers out there (from a C99 point of view) and gcc is one of them, mixing declarations and code does work in gcc 3.0 and later. Gcc 3.0 was released in june 2001, so we're not really talking bleeding edge here... Regards, H?kan From david.nospam.hopwood@REDACTED Tue Dec 13 15:11:27 2005 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Tue, 13 Dec 2005 14:11:27 +0000 Subject: Patch for strstr_binary In-Reply-To: <17258A6E-5C95-411E-9D17-F2971EE3B4D8@dizzyd.com> References: <200512130253.jBD2ridM016444@harpo.it.uu.se> <17258A6E-5C95-411E-9D17-F2971EE3B4D8@dizzyd.com> Message-ID: <439ED68F.2030801@blueyonder.co.uk> Dave Smith wrote: > On Dec 12, 2005, at 7:53 PM, Mikael Pettersson wrote: > >> This isn't ANSI-C and won't compile with e.g. gcc-2.95.3. >> You should make a single block of the variable declarations >> at the beginning of this scope, and do the initialisations >> as assignments. > > Fixed in attached patch. I've spent too long outside of strict C world. :) > >> These (int) casts are broken on 64-bit machines. Replace them >> with (long) casts. Better yet, "index = cur - big_ptr;" >> should have the same effect and be 100% kosher. > > You have to cast pointers if you want an int out of them, at least > according to my version of gcc. That's not correct, or you have a very old version of gcc: #include #include int main(int argc, char **argv) { char foo[5]; char *p = &foo[0]; char *q = &foo[5]; ptrdiff_t x = q - p; /* works unconditionally */ long y = q - p; /* works if 'long' is long enough */ int z = q - p; /* works if 'int' is long enough */ printf("%ld, %ld, %d\n", (long) x, y, z); return 0; } $ gcc -ansi -pedantic -Wall ptrsub.c -o ptrsub $ gcc --version gcc (GCC) 3.2 20020818 (prerelease) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ ./ptrsub 5, 5, 5 As far as I know, earlier releases of gcc behave the same. > However, I did correct the casts to be longs instead of ints. Strictly speaking, casting a pointer to 'long' causes undefined behaviour. There are platforms on which it will not work. If you want something that produces an int provided the pointer difference will fit in an int, use '(int)(cur - big_ptr)'. Or if it really matters (for example if there is the potential for a security bug if the arithmetic wraps): #include ptrdiff_t diff = cur - big_ptr; int index = (int) diff; if (diff != (ptrdiff_t) index) { /* fail */ } -- David Hopwood From david.nospam.hopwood@REDACTED Tue Dec 13 15:19:42 2005 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Tue, 13 Dec 2005 14:19:42 +0000 Subject: Off-topic: C pointer semantics In-Reply-To: <200512131112.jBDBCdh03824@hades.cslab.ericsson.net> References: <200512131112.jBDBCdh03824@hades.cslab.ericsson.net> Message-ID: <439ED87E.9080701@blueyonder.co.uk> Marthin Laubscher wrote: > (**) on Mikael's (*): Careful now. Yes, it true, ptr1 - ptr2 is a signed > int, but it might not have the value you'd expect. There's a pretty good > reason the pointers must be to the same type - that's because value of ptr1 > - ptr2 is supposed to be the offset (in memory) between the two objects > being pointed at. Unless theyre byte pointers (char* etc), the value of ptr1 > - ptr2 is not returned in bytes, but in "element size units". Right, but they were both 'char *' in this case. And even if they were of different types, '(long) ptr1 - (long) ptr2' is still almost certainly not what you want: in that case you _may_ want '(char *) ptr1 - (char *) ptr2'. (Sorry about the off-topic discussion.) -- David Hopwood From thomasl_erlang@REDACTED Tue Dec 13 15:45:51 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Tue, 13 Dec 2005 06:45:51 -0800 (PST) Subject: Atomic ets Message-ID: <20051213144551.38822.qmail@web34406.mail.mud.yahoo.com> Now that we are getting a multithreaded runtime system, is this a good time to bring up ets? I am having some issues here. It seems to me that regular, naturally-written code using ets often suffers from a great many race conditions, basically due to an API that cannot(?) express simple, generic read-modify-write atomically. (At least there is no such way as far as I know, if we want to do something more complex than update_counter. The documentation seems to agree.) So, I have two questions: 1. Am I being dense in writing my ets code? Are there simple, useful ways to write ets code that avoids the problem of getting preempted between, say, a lookup and an insert? Or should we just use mnesia and transactions instead? 2. If this issue really is a problem, and deemed fixable with ets, what is a good, useful API to get rid of it? (I think exchange(Key, NewVal), returning OldVal if present and either NewVal or undefined, is a useful substrate but that's perhaps too low-level?) Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From ulf.wiger@REDACTED Tue Dec 13 16:06:47 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 13 Dec 2005 16:06:47 +0100 Subject: Atomic ets Message-ID: Thomas Lindgren wrote: > > 1. Am I being dense in writing my ets code? Are there simple, > useful ways to write ets code that avoids the problem of > getting preempted between, say, a lookup and an insert? Well, yes (on the second question). You can make sure that all updates to a table are serialized using e.g. a gen_server. You can then pass the server an update fun if you want. /Uffe From dizzyd@REDACTED Tue Dec 13 16:22:05 2005 From: dizzyd@REDACTED (Dave Smith) Date: Tue, 13 Dec 2005 08:22:05 -0700 Subject: Patch for strstr_binary In-Reply-To: <439ED68F.2030801@blueyonder.co.uk> References: <200512130253.jBD2ridM016444@harpo.it.uu.se> <17258A6E-5C95-411E-9D17-F2971EE3B4D8@dizzyd.com> <439ED68F.2030801@blueyonder.co.uk> Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I thank all parties for the interesting discourse on C, but I'm going to leave the patch as is, unless/until someone has an actual bug. :) Thanks to all involved. C-discourse aside, is the patch of interest to anyone else doing string processing via binaries? D. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDnucds6zMNAt8YgcRAp2/AJ491gW36py4Qzpf4RacqhrO/1BnxACcDy5L RMY1eezh+qd1YXzrDzItE44= =HheW -----END PGP SIGNATURE----- From thomasl_erlang@REDACTED Tue Dec 13 17:02:03 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Tue, 13 Dec 2005 08:02:03 -0800 (PST) Subject: Atomic ets In-Reply-To: Message-ID: <20051213160203.17308.qmail@web34415.mail.mud.yahoo.com> --- "Ulf Wiger (AL/EAB)" wrote: > > Thomas Lindgren wrote: > > > > 1. Am I being dense in writing my ets code? Are > there simple, > > useful ways to write ets code that avoids the > problem of > > getting preempted between, say, a lookup and an > insert? > > Well, yes (on the second question). Phew :-) > You can make > sure that > all updates to a table are serialized using e.g. a > gen_server. It depends on what sort of operations are being done against the table, but yes, you're right -- I've used that technique too and should have mentioned it. For each read-modify-write, you get an (optimizable) trip to the gen_server, which makes me a bit uneasy. Anyway, what I'd prefer is a "serverless" solution. (Or maybe I should just bite the bullet?) Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From tony@REDACTED Tue Dec 13 17:30:26 2005 From: tony@REDACTED (Tony Rogvall) Date: Tue, 13 Dec 2005 17:30:26 +0100 Subject: Atomic ets In-Reply-To: <20051213144551.38822.qmail@web34406.mail.mud.yahoo.com> References: <20051213144551.38822.qmail@web34406.mail.mud.yahoo.com> Message-ID: On 13 dec 2005, at 15.45, Thomas Lindgren wrote: > > Now that we are getting a multithreaded runtime > system, is this a good time to bring up ets? I am > having some issues here. For what it's worth I wrote a module called atomic.erl some time ago. It can be regarded as lightweight but it uses ets and monitor heavily to avoid synchronizing with a server process. Could possibly be fun for some verifier to analyze, if not the flaws are obvious ;-) Also it can possibly be used to verify (if it works) that the ets is multithread safe... No documentation nor support is given ... (as always) Typical use: Key = foobar, %% could be any term atomic:lock(Key), do_something(), atomic:unlock(Key) This can be condensed into atomic:exec(Key, fun() -> do_something() end). Note that the atomic needs a gen_server that owne the locker table to work. BTW the macro dbg_schedule can be used to verify if the atomic module works, it forces context switches in some places. /Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: atomic.erl Type: application/octet-stream Size: 9025 bytes Desc: not available URL: -------------- next part -------------- From mats.cronqvist@REDACTED Tue Dec 13 17:34:32 2005 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Tue, 13 Dec 2005 17:34:32 +0100 Subject: Atomic ets In-Reply-To: References: Message-ID: <439EF818.2090305@ericsson.com> years ago, i suggested to OTP that adding atomic expressions (similar to block expressions) to Erlang would allow one to solve this kind of problems. like; atomic case ets:lookup(a,b) of [] -> ets:insert(a,c); _ -> ok end end inside the atomic block you'd be guaranteed not to be scheduled out. i don't remember if they laughed hysterically or just waited for me to go away, but nothing came of it. quite possibly there were good reasons for that. mats p.s. of course it'd be really easy to crush the emulator with this feature. i don't think that's a good reason for nixing it though. Ulf Wiger (AL/EAB) wrote: > > Thomas Lindgren wrote: > >>1. Am I being dense in writing my ets code? Are there simple, >>useful ways to write ets code that avoids the problem of >>getting preempted between, say, a lookup and an insert? > > > Well, yes (on the second question). You can make sure that > all updates to a table are serialized using e.g. a gen_server. > > You can then pass the server an update fun if you want. > > /Uffe From rpettit@REDACTED Tue Dec 13 18:35:35 2005 From: rpettit@REDACTED (Rick Pettit) Date: Tue, 13 Dec 2005 11:35:35 -0600 Subject: Atomic ets In-Reply-To: References: <20051213144551.38822.qmail@web34406.mail.mud.yahoo.com> Message-ID: <20051213173535.GD377@vailsys.com> On Tue, Dec 13, 2005 at 05:30:26PM +0100, Tony Rogvall wrote: > > On 13 dec 2005, at 15.45, Thomas Lindgren wrote: > > > > >Now that we are getting a multithreaded runtime > >system, is this a good time to bring up ets? I am > >having some issues here. > > For what it's worth I wrote a module called atomic.erl some time ago. > It can be regarded as > lightweight but it uses ets and monitor heavily to avoid > synchronizing with a server process. > > Could possibly be fun for some verifier to analyze, if not the flaws > are obvious ;-) > > Also it can possibly be used to verify (if it works) that the ets is > multithread safe... > > No documentation nor support is given ... (as always) > > Typical use: > > Key = foobar, %% could be any term > atomic:lock(Key), > do_something(), > atomic:unlock(Key) > > This can be condensed into atomic:exec(Key, fun() -> do_something() > end). > > Note that the atomic needs a gen_server that owne the locker table to > work. > > BTW the macro dbg_schedule can be used to verify if the atomic module > works, > it forces context switches in some places. Why not use global:trans/[234]? -Rick From sean.hinde@REDACTED Tue Dec 13 19:45:53 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Tue, 13 Dec 2005 18:45:53 +0000 Subject: Atomic ets In-Reply-To: <20051213173535.GD377@vailsys.com> References: <20051213144551.38822.qmail@web34406.mail.mud.yahoo.com> <20051213173535.GD377@vailsys.com> Message-ID: On 13 Dec 2005, at 17:35, Rick Pettit wrote: > On Tue, Dec 13, 2005 at 05:30:26PM +0100, Tony Rogvall wrote: >> >> On 13 dec 2005, at 15.45, Thomas Lindgren wrote: >> >>> >>> Now that we are getting a multithreaded runtime >>> system, is this a good time to bring up ets? I am >>> having some issues here. >> >> For what it's worth I wrote a module called atomic.erl some time ago. >> It can be regarded as >> lightweight but it uses ets and monitor heavily to avoid >> synchronizing with a server process. > > Why not use global:trans/[234]? > The requirement was to avoid serialising all ets read/updates through a gen_server. Global transactions require 2 gen_server calls (one to lock/one to unlock) to save one call. Tony's solution relies solely on ets access from the local process to achieve locking. No other processes involved (except one to own the public ets table). Sean From rpettit@REDACTED Tue Dec 13 19:55:02 2005 From: rpettit@REDACTED (Rick Pettit) Date: Tue, 13 Dec 2005 12:55:02 -0600 Subject: Atomic ets In-Reply-To: References: <20051213144551.38822.qmail@web34406.mail.mud.yahoo.com> <20051213173535.GD377@vailsys.com> Message-ID: <20051213185502.GA28946@vailsys.com> On Tue, Dec 13, 2005 at 06:45:53PM +0000, Sean Hinde wrote: > > On 13 Dec 2005, at 17:35, Rick Pettit wrote: > > >On Tue, Dec 13, 2005 at 05:30:26PM +0100, Tony Rogvall wrote: > >> > >>On 13 dec 2005, at 15.45, Thomas Lindgren wrote: > >> > >>> > >>>Now that we are getting a multithreaded runtime > >>>system, is this a good time to bring up ets? I am > >>>having some issues here. > >> > >>For what it's worth I wrote a module called atomic.erl some time ago. > >>It can be regarded as > >>lightweight but it uses ets and monitor heavily to avoid > >>synchronizing with a server process. > > > >Why not use global:trans/[234]? > > > The requirement was to avoid serialising all ets read/updates through > a gen_server. Global transactions require 2 gen_server calls (one to > lock/one to unlock) to save one call. > > Tony's solution relies solely on ets access from the local process to > achieve locking. No other processes involved (except one to own the > public ets table). Got it--sorry about that, should have paid closer attention. -Rick From neumann@REDACTED Wed Dec 14 02:54:18 2005 From: neumann@REDACTED (=?iso-8859-1?q?Fran=E7ois-Denis_Gonthier?=) Date: Tue, 13 Dec 2005 20:54:18 -0500 Subject: manderlbot Message-ID: <200512132054.20586.neumann@lostwebsite.net> Hello, all, your friendly Debian packager here... I've adopted the Debian manderlbot package. It is currently broken due to the changes in the libxmerl. I know some people were actively using manderlbot on IRC, so if anyone has patched the last version of manderlbot for Erlang 10.b.x, they are invited to send me the patch, or the whole fixed source, so that I can work out a patch myself. It's not that I don't want to work it myself. I know Erlang, but, well, I'm lazy ;) F-D -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From dizzyd@REDACTED Wed Dec 14 06:32:09 2005 From: dizzyd@REDACTED (Dave Smith) Date: Tue, 13 Dec 2005 22:32:09 -0700 Subject: Ordered indices in Mnesia Message-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This may be a stupid question, but I just can't seem to find the answer. Is it possible to create a ordered index in mnesia? For instance, I want to do the SQL equivalent of: SELECT TOP 10 value FROM table ...which would be easy to accomplish if I knew that the "value" index was ordered. Am I missing something obvious? Thanks! D. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDn65Zs6zMNAt8YgcRAox5AJ9hOCBGmwAphNqKsKCnw6A92U3JrQCeOBZq SE/6dH7E97nWU2y/TJJjXV4= =1Y5i -----END PGP SIGNATURE----- From dizzyd@REDACTED Wed Dec 14 06:41:21 2005 From: dizzyd@REDACTED (Dave Smith) Date: Tue, 13 Dec 2005 22:41:21 -0700 Subject: Ordered indices in Mnesia In-Reply-To: References: Message-ID: <8ED571CC-C48B-4053-84BB-DD17D19FF24D@dizzyd.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ah..replying to one's self...always fun. :) I did see a post about compound indicies by Uffe: http://forums.trapexit.org:81/phpBB/viewtopic.php? t=4816&highlight=ordered+index+mnesia Uffe, are you still looking for testers? Would those indicies help me out? D. On Dec 13, 2005, at 10:32 PM, Dave Smith wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > This may be a stupid question, but I just can't seem to find the > answer. Is it possible to create a ordered index in mnesia? For > instance, I want to do the SQL equivalent of: > > SELECT TOP 10 value FROM table > > ...which would be easy to accomplish if I knew that the "value" > index was ordered. > > Am I missing something obvious? > > Thanks! > > D. > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (Darwin) > > iD8DBQFDn65Zs6zMNAt8YgcRAox5AJ9hOCBGmwAphNqKsKCnw6A92U3JrQCeOBZq > SE/6dH7E97nWU2y/TJJjXV4= > =1Y5i > -----END PGP SIGNATURE----- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDn7CBs6zMNAt8YgcRAumQAJsEc99xgYfHDy4STb5H+KvKLKyIKACfb2ez LmGWmSvJPyf3ajZYV2mnZUo= =SzDy -----END PGP SIGNATURE----- From chandrashekhar.mullaparthi@REDACTED Wed Dec 14 06:59:11 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Wed, 14 Dec 2005 05:59:11 +0000 Subject: Ordered indices in Mnesia In-Reply-To: References: Message-ID: Hi, On 14/12/05, Dave Smith wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > This may be a stupid question, but I just can't seem to find the > answer. Is it possible to create a ordered index in mnesia? For > instance, I want to do the SQL equivalent of: > > SELECT TOP 10 value FROM table Mnesia has ordered set tables. When you create your table, you have to specify the {type, ordered_set} option. This only applies to the primary index. You can then use select to retrieve the top 10 records cheers Chandru From dizzyd@REDACTED Wed Dec 14 07:14:07 2005 From: dizzyd@REDACTED (Dave Smith) Date: Tue, 13 Dec 2005 23:14:07 -0700 Subject: Ordered indices in Mnesia In-Reply-To: References: Message-ID: <0BE0CA2B-F608-4C4D-A3BB-27B011B27672@dizzyd.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 To clarify, I'm using disc-only, bag tables. The tables I'm dealing with are rather large... D. On Dec 13, 2005, at 10:59 PM, chandru wrote: > Hi, > > On 14/12/05, Dave Smith wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA1 >> >> This may be a stupid question, but I just can't seem to find the >> answer. Is it possible to create a ordered index in mnesia? For >> instance, I want to do the SQL equivalent of: >> >> SELECT TOP 10 value FROM table > > Mnesia has ordered set tables. When you create your table, you have to > specify the {type, ordered_set} option. This only applies to the > primary index. You can then use select to retrieve the top 10 records > > cheers > Chandru > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDn7gws6zMNAt8YgcRAm+tAJwMlSCaJb385FIw63Hgh7GoRSdRSgCfcn0y NqGN3CHE9ql9rAKYywR5RPo= =07Hi -----END PGP SIGNATURE----- From joe.armstrong@REDACTED Wed Dec 14 09:19:52 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Wed, 14 Dec 2005 09:19:52 +0100 Subject: Atomic ets Message-ID: Agggggggggggggggggggggggggghhhhhhhhhhhhhhhhhh Verily verily verify I say untoo ye Even thou thy hath vouchsafed a lock - and even though thy thath promest to delivery it back - there will come a day when the Great one will return and the lock will be raised and there will be much gnashing of teeth and wailing and the bones of the long dead will rise and dance on the graves of the unfrocked bishops. /Joe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Mats Cronqvist > Sent: den 13 december 2005 17:35 > To: erlang-questions > Subject: Re: Atomic ets > > > years ago, i suggested to OTP that adding atomic > expressions (similar to > block expressions) to Erlang would allow one to solve this > kind of problems. like; > > atomic > case ets:lookup(a,b) of > [] -> ets:insert(a,c); > _ -> ok > end > end > > inside the atomic block you'd be guaranteed not to be > scheduled out. > i don't remember if they laughed hysterically or just > waited for me to go > away, but nothing came of it. quite possibly there were good > reasons for that. > > mats > > p.s. of course it'd be really easy to crush the emulator with > this feature. i > don't think that's a good reason for nixing it though. > > > Ulf Wiger (AL/EAB) wrote: > > > > Thomas Lindgren wrote: > > > >>1. Am I being dense in writing my ets code? Are there simple, > >>useful ways to write ets code that avoids the problem of > >>getting preempted between, say, a lookup and an insert? > > > > > > Well, yes (on the second question). You can make sure that > > all updates to a table are serialized using e.g. a gen_server. > > > > You can then pass the server an update fun if you want. > > > > /Uffe > From vmcai06@REDACTED Wed Dec 14 09:32:55 2005 From: vmcai06@REDACTED (VMCAI '06) Date: Wed, 14 Dec 2005 02:32:55 -0600 Subject: [VMCAI '06] Early registration upto Dec 15 Message-ID: <20051214083255.GA3825@cerc.utexas.edu> ============================================================================= Early Registration open until 15 December 05 ============================================================================== VMCAI 2006: CALL FOR PARTICIPATION 7th International Conference on Verification, Model Checking, and Abstract Interpretation January 8--10, 2006, Charleston, South Carolina, U.S.A. http://www.cs.utexas.edu/~vmcai06 ============================================================================== Apologies for multiple copies ============================================================================== VMCAI provides a forum for researchers from the communities of Verification, Model Checking, and Abstract Interpretation, facilitating interaction, cross- fertilization, and advancement of hybrid methods that combine the three areas. It will be held at the Mills House Hotel in Charleston, South Carolina, U.S.A., just prior to POPL 2006, with which it is co-located. Detailed program information, registration and hotel booking procedures can be found on the conference web page: http://www.cs.utexas.edu/~vmcai06 ** PROGRAM ** In addition to the contributed papers (a full list is on the web page) the program includes invited talks by * Edmund M. Clarke, Carnegie Mellon University * James R. Larus, Microsoft Research * Greg Morrisett, Harvard University and invited tutorials by * Nicolas Halbwachs, VERIMAG * David Schmidt, Kansas State University VMCAI06 is supported by the University of Texas at Austin, Microsoft Research, and NEC Research Labs. We are grateful for the generous support. ** IMPORTANT DATES ** Early Registration/Hotel Booking : The deadline is December *15*, 2005. Conference : January 8--10, 2006 ** PROGRAM COMMITTEE ** Alex Aiken (Stanford) Thomas Ball (Microsoft) Hana Chockler (IBM) Patrick Cousot (ENS) E. Allen Emerson (UT Austin) [Co-chair] Javier Esparza (U. Stuttgart) Roberto Giacobazzi (U. Verona) Patrice Godefroid (Bell Labs) Warren Hunt (UT Austin) Neil Jones (DIKU) Tiziana Margaria-Steffen (U. Goettingen) Markus Mueller-Olm (U. Muenster) Kedar S. Namjoshi (Bell Labs) [Co-chair] George Necula (U.C. Berkeley) Jens Palsberg (UCLA) Andreas Podelski (MPI) Thomas W. Reps (U. Wisconsin) A. Prasad Sistla (UIC) Colin Stirling (U. Edinburgh) Scott Stoller (SUNY Stony Brook) Lenore Zuck (UIC) ** STEERING COMMITTEE ** Agostino Cortesi (U. Venezia) Patrick Cousot (ENS) E. Allen Emerson (UT Austin) Giorgio Levi (U. Pisa) Andreas Podelski (MPI) Thomas W. Reps (U. Wisconsin) David Schmidt (KSU) Lenore Zuck (UIC) From nicolas@REDACTED Wed Dec 14 09:49:12 2005 From: nicolas@REDACTED (Nicolas Niclausse) Date: Wed, 14 Dec 2005 09:49:12 +0100 Subject: manderlbot In-Reply-To: <200512132054.20586.neumann@lostwebsite.net> References: <200512132054.20586.neumann@lostwebsite.net> Message-ID: <439FDC88.5040409@niclux.org> Fran?ois-Denis Gonthier ecrivait le 14.12.2005 02:54: > Hello, all, your friendly Debian packager here... > > I've adopted the Debian manderlbot package. It is currently broken due to the > changes in the libxmerl. > I know some people were actively using manderlbot on IRC, so if anyone has > patched the last version of manderlbot for Erlang 10.b.x, they are invited to > send me the patch, or the whole fixed source, so that I can work out a patch > myself. I'm one of the author of manderlbot. You can send me patches, i'll add them to the cvs (I can also give cvs access to contributors). There are some updates in the cvs, but nothing related to r10b compilation -- Nicolas From ulf.wiger@REDACTED Wed Dec 14 11:00:37 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 14 Dec 2005 11:00:37 +0100 Subject: Ordered indices in Mnesia Message-ID: Dave Smith wrote: > > I did see a post about compound indicies by Uffe: > > http://forums.trapexit.org:81/phpBB/viewtopic.php?t=4816&highlight=order ed+index+mnesia > > Uffe, are you still looking for testers? Would those indicies > help me out? It seems like my hack is what you're asking for. I will confess that my current line of thought is to move the custom index support into RDBMS instead. Together with a couple of other enhancements of RDBMS, I think that will work out nicely. I can't promise to have anything before Christmas, though (I can almost promise not to.) If you want to play with the hack I have right now, I would welcome the feedback. /Uffe > D. > > On Dec 13, 2005, at 10:32 PM, Dave Smith wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > This may be a stupid question, but I just can't seem to find the > > answer. Is it possible to create a ordered index in mnesia? For > > instance, I want to do the SQL equivalent of: > > > > SELECT TOP 10 value FROM table > > > > ...which would be easy to accomplish if I knew that the "value" > > index was ordered. > > > > Am I missing something obvious? > > > > Thanks! > > > > D. > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.4.1 (Darwin) > > > > iD8DBQFDn65Zs6zMNAt8YgcRAox5AJ9hOCBGmwAphNqKsKCnw6A92U3JrQCeOBZq > > SE/6dH7E97nWU2y/TJJjXV4= > > =1Y5i > > -----END PGP SIGNATURE----- > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.1 (Darwin) > > iD8DBQFDn7CBs6zMNAt8YgcRAumQAJsEc99xgYfHDy4STb5H+KvKLKyIKACfb2ez > LmGWmSvJPyf3ajZYV2mnZUo= > =SzDy > -----END PGP SIGNATURE----- > From ft@REDACTED Wed Dec 14 11:30:25 2005 From: ft@REDACTED (Fredrik Thulin) Date: Wed, 14 Dec 2005 11:30:25 +0100 Subject: Announce: Erlang MySQL client Message-ID: <200512141130.26099.ft@it.su.se> Hi A native MySQL client for Erlang has been discussed from time to time on this list. The MySQL client written by Magnus Ahltorp has been talked about, but nothing has happened to it - until now ;). I've re-worked Magnus code a bit, adding documentation and the ability to have multiple concurrent connections to for example more than one node in a MySQL server cluster. The code is now maintained in the Yxa source tree (http://www.stacken.kth.se/projekt/yxa/), although I do NOT claim that this is a generic MySQL client for Erlang - it works for Yxa but no guarantees are made that it will work for some other application (one that for example does other things than 'select' querys). The code in src/mysql/ has no dependencies at all at the rest of Yxa, so it is possible to just copy that source directory for use in some other project (as long as you also include the file COPYING from the Yxa source tree of course). The license is a three-clause BSD license. The client has been tested with MySQL 3.x and 4.x servers. It also seems to work with a MySQL 5.0 server, although a small patch was needed. I would appreciate reports on what versions of MySQL this client works with (and also if it still works with the attached patch applied), and patches for things that need patching ;). See the documentation at the top of mysql.erl for usage instructions. /Fredrik -------------- next part -------------- A non-text attachment was scrubbed... Name: yxa-mysql_5-end-of-fields.patch1 Type: text/x-diff Size: 452 bytes Desc: not available URL: From bjorn@REDACTED Wed Dec 14 12:21:17 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 14 Dec 2005 12:21:17 +0100 Subject: Erlang/OTP R10B-9 has been released Message-ID: Bug fix release : otp_src_R10B-9 Build date : 2005-12-13 This is a bug fix release 9 for the R10B release. You can download the full source distribution from http://www.erlang.org/download/otp_src_R10B-9.tar.gz http://www.erlang.org/download/otp_src_R10B-9.readme (this file) Note: To unpack the TAR archive you need a GNU TAR compatible program. For instance, on MacOS X before 10.3 you must use the 'gnutar' command; you can't use the 'tar' command or StuffIt to unpack the sources. For installation instructions please read the README that is part of the distribution. The Windows binary distribution can be downloaded from http://www.erlang.org/download/otp_win32_R10B-9.exe On-line documentation can be found at http://www.erlang.org/doc.html. You can also download the complete HTML documentation or the Unix manual files http://www.erlang.org/download/otp_doc_html_R10B-9.tar.gz http://www.erlang.org/download/otp_doc_man_R10B-9.tar.gz We also want to thank those that sent us patches, suggestions and bug reports, The OTP Team -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From Waldemar.Rachwal@REDACTED Wed Dec 14 15:03:30 2005 From: Waldemar.Rachwal@REDACTED (Rachwal Waldemar-AWR001) Date: Wed, 14 Dec 2005 14:03:30 -0000 Subject: type system in erlang? Message-ID: <08F651DD6835A74DAFA80915F0150CA62A50F1@zuk35exm64.ds.mot.com> What's happened with a type system? I've noticed a few papers and even someone's claim that "we got a type system". I realized it was premature but undoubtedly optimistic. Have opinions changed on the type system in erlang since that time? I know there is Dialyzer, but it's not the same. Waldemar. From ernie.makris@REDACTED Wed Dec 14 15:11:47 2005 From: ernie.makris@REDACTED (Ernie Makris) Date: Wed, 14 Dec 2005 09:11:47 -0500 Subject: Erlang R11B In-Reply-To: References: Message-ID: <43A02823.7020305@comcast.net> Hello All, I just noticed that there is the smp version of R11B, testing version, in http://www.erlang.org/download/snapshots/. Has anyone starting playing around with this yet? I'm compiling this as I write this email. I can't wait to try it out....:) From peter@REDACTED Wed Dec 14 15:31:33 2005 From: peter@REDACTED (Peter H|gfeldt) Date: Wed, 14 Dec 2005 15:31:33 +0100 (MET) Subject: Piggybacking on the SSL handshake In-Reply-To: <16D71C21-DA08-4D8B-84D8-0BAA3D808882@gmail.com> Message-ID: No, you cannot do that. It would require access not only to the SSL level, but also to the TCP level, which is not provided in the current implementation. /Peter On Mon, 12 Dec 2005, Joel Reymont wrote: > Folks, > > I'm dealing with a strange protocol implementation where the customer > piggybacks on the SSL handshake and proceeds to selectively use SSL > when needed. > > The way they do this is by plugging "in" and "out" memory BIOs into > OpenSSL and using them when needed. To kick things off they > initialize OpenSSL with certificate, etc. and then wait for data to > become available in the "out" BIO. They take the data, wrap it up and > ship it over to the client that proceeds to unwrap the data, feed it > to OpenSSL through the "in" BIO, wait for output, etc. Then they ask > OpenSSL if the handshake was completed. Once the handshake is > completed SSL is not used until needed. > > My question is this... Can I implement this protocol using Erlang's > SSL module? > > It seems to use a proxy so if I can take the output form the proxy > and wrap it up then I would be good. Of course I would also need to > detect the end of the SSL handshake. > > Thanks, Joel > > -- > http://wagerlabs.com/ > > > > > From kostis@REDACTED Wed Dec 14 15:31:37 2005 From: kostis@REDACTED (Kostis Sagonas) Date: Wed, 14 Dec 2005 15:31:37 +0100 (MET) Subject: type system in erlang? In-Reply-To: Mail from '"Rachwal Waldemar-AWR001" ' dated: Wed, 14 Dec 2005 14:03:30 -0000 Message-ID: <200512141431.jBEEVbUL025636@spikklubban.it.uu.se> Waldemar Rachwal wrote: > What's happened with a type system? I've noticed a few papers and even > someone's claim that "we got a type system". I realized it was premature > but undoubtedly optimistic. Have opinions changed on the type system in > erlang since that time? I know there is Dialyzer, but it's not the same. You are right that it is not the same, but Dialyzer does get most of the benefits of catching type errors, both simple and quite involved ones, even some type errors that statically typed languages will not catch. Do you have a case that it does not do what you want? The basic problem with type systems is that there is no single one that will satisfly all wishes. What sort of type system would you want to see? Best, Kostis PS. FYI, we are currently working on the following two directions: 1. Getting Dialyzer into Erlang/OTP. 2. Developing Typer, a tool that will automatically annotate Erlang source code with Edoc-compatible type information. From hal@REDACTED Wed Dec 14 18:39:38 2005 From: hal@REDACTED (Hal Snyder) Date: Wed, 14 Dec 2005 11:39:38 -0600 Subject: Atomic ets In-Reply-To: ("Joe Armstrong's message of "Wed, 14 Dec 2005 09:19:52 +0100") References: Message-ID: <87ek4fvaqt.fsf@ghidra.vail> "Joe Armstrong (AL/EAB)" writes: > Agggggggggggggggggggggggggghhhhhhhhhhhhhhhhhh > > Verily verily verify I say untoo ye > > Even thou thy hath vouchsafed a lock - and even though thy > thath promest to delivery it back - there will come a day > when the Great one will return and the lock will be raised > and there will be much gnashing of teeth and wailing and > the bones of the long dead will rise and dance on the graves > of the unfrocked bishops. One great appeal of Erlang has been its avoidance of the Slough of (P)Threads and Mutexes into which my colleagues, many of whom are also deeply into OOP, have disappeared for months at a time. I shudder whenever purveyors of mutexes and other such evils make a run at the unspoiled atoll that is OTP. Once someone snidely asked "With all this concurrency, what are Erlang's synchronization primitives", only to be crushed by the simplicity of the response: "send and receive". From thomasl_erlang@REDACTED Wed Dec 14 20:29:03 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Wed, 14 Dec 2005 11:29:03 -0800 (PST) Subject: Atomic ets In-Reply-To: <87ek4fvaqt.fsf@ghidra.vail> Message-ID: <20051214192903.96220.qmail@web34402.mail.mud.yahoo.com> --- Hal Snyder wrote: > "Joe Armstrong (AL/EAB)" > writes: > > > Agggggggggggggggggggggggggghhhhhhhhhhhhhhhhhh > > > > Verily verily verify I say untoo ye > > > > Even thou thy hath vouchsafed a lock - and even > though thy > > thath promest to delivery it back - there will > come a day > > when the Great one will return and the lock will > be raised > > and there will be much gnashing of teeth and > wailing and > > the bones of the long dead will rise and dance on > the graves > > of the unfrocked bishops. > > One great appeal of Erlang has been its avoidance of > the Slough of > (P)Threads and Mutexes into which my colleagues, > many of whom are also > deeply into OOP, have disappeared for months at a > time. I shudder > whenever purveyors of mutexes and other such evils > make a run at the > unspoiled atoll that is OTP. > > Once someone snidely asked "With all this > concurrency, what are > Erlang's synchronization primitives", only to be > crushed by the > simplicity of the response: "send and receive". Note that transactions provide another conceptually simple approach. My prediction is that fine-grain, hardware-assisted transactions will largely replace locking in conventional systems. But not for a while; the comp.arch. researchers have just gotten their teeth into it. So far the alternatives for "atomic ets" seem to be: 1. Serialize all non-atomic ets requests through a gen_server. Drawback: needs extra trip to server. (There is another design drawback: it can be a very pessimistic "locking" regime for the data, leading to excessive waiting.) 2. Use mnesia, abandon ets. Drawback: transactions are more expensive. 3. Introduce critical sections, e.g., run a fun() to completion. Drawback: it's a temptation to the foolish. This approach seems attractive to me -- for example: no need for explicit locking -- but the more one wants to avoid mischief, the more it starts looking like mnesia:transaction. 4. Use locks. Drawback: well-known to be difficult to do right. 5. Introduce a magical new API more suited for concurrent/atomic ets. Drawback: it doesn't exist yet :-) Out of these alternatives, as a rule of thumb, using mnesia after all seems the solution with least scope for trouble in an SMP system. Or, when suitable, use a carefully-designed gen_server. Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From vlad_dumitrescu@REDACTED Wed Dec 14 21:26:18 2005 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 14 Dec 2005 21:26:18 +0100 Subject: R10B-9 Message-ID: Hi, I wonder why the Windows installer is almost 10MB (25%) larger for this release... The source tar is the same size as before. regards, Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf@REDACTED Wed Dec 14 21:51:08 2005 From: ulf@REDACTED (Ulf Wiger) Date: Wed, 14 Dec 2005 21:51:08 +0100 Subject: Atomic ets In-Reply-To: <20051214192903.96220.qmail@web34402.mail.mud.yahoo.com> References: <20051214192903.96220.qmail@web34402.mail.mud.yahoo.com> Message-ID: Den 2005-12-14 20:29:03 skrev Thomas Lindgren : > 5. Introduce a magical new API more suited for > concurrent/atomic ets. Drawback: it doesn't exist yet > :-) You'd think that with a functional language, there should be a way to write code that is verifiably 'shallow' (no loops, no side effects - or, in this case, only allowed side effects). This is essentially, what we want for the match specifications (replacing the ms_transform module), for mnesia transactions (where the manual kindly asks us to write pure code) and perhaps for atomic ets. If a function could be tagged as (conditionally) safe, one could offer an 'atomic' construct and have it execute only such code. /Uffe (who volunteers _not_ to be the one implementing it.) From neumann@REDACTED Thu Dec 15 00:17:12 2005 From: neumann@REDACTED (=?iso-8859-1?q?Fran=E7ois-Denis_Gonthier?=) Date: Wed, 14 Dec 2005 18:17:12 -0500 Subject: 10.b.9 packages for Debian & Ubuntu Message-ID: <200512141817.14743.neumann@lostwebsite.net> Hello all I think I'm getting good at this. I've updated the Erlang .deb packages to 10.b.9-1 just today. I should probably thank the OTP that all but one of their changes went through the automated upgrade fine. The packages are at their usual place: http://neutronic.mine.nu/unstable for Debian/Sid (& Etch) and http://neutronic.mine.nu/ubuntu-breezy erlang-manpages and erlang-doc-html will Soon Follow (tm). F-D -------------- 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 Thu Dec 15 07:54:32 2005 From: neumann@REDACTED (=?iso-8859-1?q?Fran=E7ois-Denis_Gonthier?=) Date: Thu, 15 Dec 2005 01:54:32 -0500 Subject: Addendum [Re: 10.b.9 packages for Debian & Ubuntu] In-Reply-To: <200512141817.14743.neumann@lostwebsite.net> References: <200512141817.14743.neumann@lostwebsite.net> Message-ID: <200512150154.32578.neumann@lostwebsite.net> On 14 December 2005 18:17, Fran?ois-Denis Gonthier wrote: I've uploaded the debs for erlang-doc-html and erlang-manpages of Erlang 10.b.9 in the usual place. They are up for grab to anyone interested. There are, of course, Ubuntu packages too. > Hello all > > I think I'm getting good at this. I've updated the Erlang .deb packages to > 10.b.9-1 just today. I should probably thank the OTP that all but one of > their changes went through the automated upgrade fine. > > The packages are at their usual place: > > http://neutronic.mine.nu/unstable for Debian/Sid (& Etch) > > and > > http://neutronic.mine.nu/ubuntu-breezy > > erlang-manpages and erlang-doc-html will Soon Follow (tm). > > F-D -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From mats.cronqvist@REDACTED Thu Dec 15 08:59:36 2005 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Thu, 15 Dec 2005 08:59:36 +0100 Subject: Atomic ets In-Reply-To: References: <20051214192903.96220.qmail@web34402.mail.mud.yahoo.com> Message-ID: <43A12268.2030701@ericsson.com> Ulf Wiger wrote: > Den 2005-12-14 20:29:03 skrev Thomas Lindgren : > >> 5. Introduce a magical new API more suited for >> concurrent/atomic ets. Drawback: it doesn't exist yet >> :-) > > > You'd think that with a functional language, there > should be a way to write code that is verifiably > 'shallow' (no loops, no side effects - or, in this > case, only allowed side effects). This is essentially, > what we want for the match specifications (replacing > the ms_transform module), for mnesia transactions > (where the manual kindly asks us to write pure code) > and perhaps for atomic ets. If a function could be > tagged as (conditionally) safe, one could offer an > 'atomic' construct and have it execute only such > code. > > /Uffe (who volunteers _not_ to be the one implementing it.) perhaps a few times a year i'm faced with problems where serializing, locking or (especially) mnesia are noticably slowing the code down. for those situations, i would be happy for the possibility to run any code in the "magical new API", even though it is potentially risky. of course, it'd be better if the compiler would enforce that i could only call bif's in the critical section (that would make is pretty safe i guess). mats From bjorn@REDACTED Thu Dec 15 09:32:38 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 15 Dec 2005 09:32:38 +0100 Subject: R10B-9 In-Reply-To: References: Message-ID: I noticed that the installers built on one of our three build machines for Windows were noticeable smaller than installers built on the others. I used to grab the Windows release from that machine, but not for this release (for various reasons). I now see that the computer that produces the smallest installers has a newer version of NSIS (the tool that builds the installer). I suspect that is the reason. For the next release, I will update the NSIS on our other build machines. /Bjorn "Vlad Dumitrescu" writes: > Hi, > > I wonder why the Windows installer is almost 10MB (25%) larger for this release... The source tar is the same size as before. > > regards, > Vlad -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From tpatro@REDACTED Thu Dec 15 09:40:47 2005 From: tpatro@REDACTED (Tamas Patrovics) Date: Thu, 15 Dec 2005 09:40:47 +0100 Subject: ESense 1.11 released Message-ID: Changes https://sourceforge.net/project/shownotes.php?group_id=139206&release_id=378365 Files https://sourceforge.net/projects/esense/ Homepage http://esense.sourceforge.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From complog@REDACTED Wed Dec 14 21:05:02 2005 From: complog@REDACTED (Logic Programming Rsrch Association) Date: Wed, 14 Dec 2005 13:05:02 -0700 Subject: PADL Deadline for Reduced Registration rate extended to 20th Dec. Message-ID: <43A07AEE.1030003@cs.nmsu.edu> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: padl-announce URL: From mickael.remond@REDACTED Wed Dec 14 22:30:51 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Wed, 14 Dec 2005 22:30:51 +0100 Subject: ejabberd 1.0.0 released: 'the XMPP compliancy release' Message-ID: <43A08F0B.9080908@process-one.net> Hello, The ejabberd team is pleased to announce the release of ejabberd 1.0.0. ejabberd celebrated last November its 3th birthday which marks even more this release as an important milestone. ejabberd is an instant messaging server, implementing the Jabber/XMPP (eXtensible Messaging and Presence Protocol) protocol. ejabberd is developed in Erlang. Unique in this release is the compliancy with the XMPP standard. ejabberd is the first Open Source Jabber server claiming to fully comply to the XMPP standard (XMPP Core and XMPP IM). Spread the words ! Unique features in ejabberd are: * Clustering. * HTTP Polling. * XMPP compliant. * Modular architecture. * Translated in 11 languages. * Publish-Subscribe component. * Statistics via Statistics Gathering (JEP-0039). See http://www.process-one.net/en/projects/ejabberd/ for more details. The download page can be reached at: http://www.process-one.net/en/projects/ejabberd/download.html Have fun and do not forget to celebrate this important ejabberd milestone! Specific details for this major release: -=-=-=- Release Notes ejabberd 1.0.0 14 December 2005 This document describes the main changes in ejabberd 1.0.0. Unique in this version is the compliancy with the XMPP (eXtensible Messaging and Presence Protocol) standard. ejabberd is the first Open Source Jabber server claiming to fully comply to the XMPP standard. ejabberd can be downloaded from the Process-one website: http://www.process-one.net/en/projects/ejabberd/ Detailed information can be found in the ejabberd Feature Sheet and User Guide which are available on the Process-one website: http://www.process-one.net/en/projects/ejabberd/docs.html Recent changes include: Server-to-server Encryption for Enhanced Security - Support for STARTTLS and SASL EXTERNAL to secure server-to-server traffic has been added. - Also, STARTTLS and Dialback has been implemented for server-to-server (s2s) connections. Detailed information about these new features can be found on: http://ejabberd.jabber.ru/s2s-encryption - commonName and dNSName fields matching were introduced to ease the process of retrieving certificates. - Different certificates can be defined for each virtual host. ODBC Support - ODBC support has been improved to allow production use of ejabberd with relational databases. - Support for vCard storage in ODBC has been added. - ejd2odbc.erl is a tool to convert an installation from Erlang's database Mnesia to an ODBC compatible relational database. Native PostgreSQL Support - Native PostgreSQL support gives you a better performance when you use PostgreSQL. Shared Roster groups - Shared Roster groups support has been enhanced. New is the ability to add all registered users to everyone's roster. Detailed information about this new feature can be found on http://ejabberd.jabber.ru/shared-roster-all Web Interface - The web interface internal code has been modified for better integration and compliancy with J-EAI, an ejabberd-based Enterprise Application Integration platform. - More XHTML 1.0 Transitional compliancy work was done. Transports - A transport workaround can be enabled during compilation. To do this, you can pass the "--enable-roster-gateway-workaround" option to the configure script. (./configure --enable-roster-gateway-workaround) This option allows transports to add items with subscription "to" in the roster by sending stanza to user. This option is only needed for JIT ICQ transport. Warning: by enabling this option, ejabberd will not be fully XMPP compliant anymore. Documentation and Internationalization - Documentation has been extended to cover more topics. - Translations have been updated. Bugfixes - This release contains several bugfixes. - Among other bugfixes include improvements to the client-to-server (c2s) connection management module. - Please refer to the ChangeLog file supplied with this release regarding all improvements in ejabberd. Installation Notes Supported Erlang Version - You need at least Erlang/OTP R9C to run ejabberd 1.0.0. Installation Installers are provided for Microsoft Windows and Linux/x86. Note: The Windows installer will be released on december 18, 2005. Installers can be retrieved from: http://www.process-one.net/en/projects/ejabberd/download.html Migration Notes - Before any migration, ejabberd system and database must be properly backed up. - When upgrading an ODBC-based installation, you will need to change the relational database schema. The following SQL commands must be run on the database: CREATE SEQUENCE spool_seq_seq; ALTER TABLE spool ADD COLUMN seq integer; ALTER TABLE spool ALTER COLUMN seq SET DEFAULT nextval('spool_seq_seq'); UPDATE spool SET seq = DEFAULT; ALTER TABLE spool ALTER COLUMN seq SET NOT NULL; References Contributed tutorials of interest are: - Migration from Jabberd1.4 to ejabberd: http://ejabberd.jabber.ru/jabberd1-to-ejabberd - Migration from Jabberd2 to ejabberd: http://ejabberd.jabber.ru/jabberd2-to-ejabberd - Transport configuration for connecting to other networks: http://ejabberd.jabber.ru/tutorials-transports -=-=-=- From Waldemar.Rachwal@REDACTED Thu Dec 15 11:19:35 2005 From: Waldemar.Rachwal@REDACTED (Rachwal Waldemar-AWR001) Date: Thu, 15 Dec 2005 10:19:35 -0000 Subject: type system in erlang? Message-ID: <08F651DD6835A74DAFA80915F0150CA62A50F2@zuk35exm64.ds.mot.com> Type system, loose set of modest wishes: 1) Usefull, not academic It has to catch type errors as much as possible, thus relieving a developer of tedious unit tests of thing which should do a compiler. The type system hasn't to claim a right to be "complete" strict system (like in Haskell or OCaml) to be usefull, I think. On the other hand maybe the complete type system make a compiler's analysis easier, I guess. 2) Minimalistic, or incremental I'd want to define types mainly for exported functions, and not for all, at least not at once. 3) Some notion to encompass heterogenous lists. [any()] ? any() would mean potentially different type, from element to element, and [any()] is different than [A], which means any type A, but all list elements of the same type. Some form of relaxation for type system, but expressable. 4) Record types and recursive data types. 5) Intuitive, reflecting how thing are used in practice A function type for example is usually introduced first, before its definition. This reflects how the function is to be used, not how it will be implemented, although a library writer (producer) has always a rough vision how to do it. Next he implemets the function and the final effect may have types wider than specified. I'll reuse an example from Wadler's paper: and(true,true) -> true; and(false,X) -> false; and(X,false) -> false. I'd expect this implementation to be *compilable* after intuitive type definition introduced earlier: -type and(bool(),bool()) -> bool(). But in turn, a client's (consumer) call of that function would be checked if both args are exactly of type bool()! Couldn't be these two facts described as: Tu <= Th <= Te where: Tu - type of client's call Th - type declared Te - type resulting from implementation I wonder how much these wishes are contradictory in terms of feasibility... ;) Regards, WR. -----Original Message----- From: Kostis Sagonas [mailto:kostis@REDACTED] Sent: Wednesday, December 14, 2005 3:32 PM To: Rachwal Waldemar-AWR001 Cc: erlang-questions@REDACTED Subject: Re: type system in erlang? Waldemar Rachwal wrote: > What's happened with a type system? I've noticed a few papers and even > someone's claim that "we got a type system". I realized it was premature > but undoubtedly optimistic. Have opinions changed on the type system in > erlang since that time? I know there is Dialyzer, but it's not the same. You are right that it is not the same, but Dialyzer does get most of the benefits of catching type errors, both simple and quite involved ones, even some type errors that statically typed languages will not catch. Do you have a case that it does not do what you want? The basic problem with type systems is that there is no single one that will satisfly all wishes. What sort of type system would you want to see? Best, Kostis PS. FYI, we are currently working on the following two directions: 1. Getting Dialyzer into Erlang/OTP. 2. Developing Typer, a tool that will automatically annotate Erlang source code with Edoc-compatible type information. From vlad.xx.dumitrescu@REDACTED Thu Dec 15 12:28:03 2005 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Thu, 15 Dec 2005 12:28:03 +0100 Subject: automated Dialyzer Message-ID: <11498CB7D3FCB54897058DE63BE3897CF8D0E4@esealmw105.eemea.ericsson.se> Hi! I think it might be useful to provide an Erlang API to Dialyzer. By that I mean that an Erlang program could start an analysis and get the results as a list or a sequence of messages instead of having to read a file and parsing the contents. This would make it easy to integrate into the development environments (like Erlide or Emacs). If this feature exists already, I blame my screen's poor resolution for not observing it :-) best regards, Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobbe@REDACTED Thu Dec 15 12:38:17 2005 From: tobbe@REDACTED (tobbe) Date: Thu, 15 Dec 2005 12:38:17 +0100 Subject: erlang shell via ssh References: Message-ID: <20051215113817.9D0DD59093@bang.trapexit.org> Yesterday, I tried to setup so that I could get an Erlang shell via ssh access. I failed! Sometimes I think the OTP man-pages are just a tiny bit too terse... Anyway, I do not want to run as root, so I tried: 1> ssh_sshd:listen(3322, [{user_passwords, [{"admin","admin"}]}]). {ok,<0.33.0>} then I tried to connect with ssh: # ssh -p 3322 localhost But I just got an error report about 'eaccess' etc. So if someone know how to setup this I would appreciate to hear about it. I used OTP R10-9. Cheers, Tobbe _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From xpdoka@REDACTED Thu Dec 15 12:38:43 2005 From: xpdoka@REDACTED (Dominic Williams) Date: Thu, 15 Dec 2005 12:38:43 +0100 (CET) Subject: OO, FP and XP training (extremely long) In-Reply-To: References: Message-ID: <44751.212.155.207.253.1134646723.squirrel@www.geekisp.com> Ulf responded to Jay: >> C) No one understands the system [...]Ask anyone a >> deep question about the philosophy of the system, >> the general performance characteristics or whether >> there is a clean approach to expanding its range of >> scope and you will be met with blank stares and >> requests for specific test descriptions. > > Interesting observation, and pretty damaging if it's > true. It certainly is not true of my experience with XP. An important aspect of XP's philosophy is, on the contrary: a) to share the system's philosophy among the whole team, acknowledging that people's heads, not documents, is the only place the system's philosophy or theory can and should exist (*) but not restricting it to the head of one or two chief architects. b) to learn, by practice, how to evolve and expand the system, by making this an intrinsic part of the design process. Hence on the contrary everyone should be comfortable with the prospect of expanding its scope, and eager to have a team discussion about it. It's odd that Jay felt that the reliance on specific test descriptions implied an inability to reason about general properties. My experience has been the exact opposite: developers taking responsibility for finding the general properties from specific data, rather than accepting an abstract specification from an analyst (only to find later on that it doesn't cover some specific cases...) > We're doing some pilot work with QuickCheck, which could > be viewed as a perverse form of TDD. ;-) When I last looked at QuickCheck, it struck me as an interesting complement to TDD. But it's worth bearing in mind that TDD is not just about testing or verifying: it's a /design process/, what matters is the dynamics, the act of doing it, the flow it gets you in. It's really an evolutionary (and collaborative, when you do it with a pair) design activity, which gets you a documented, working code and automated regression tests as a free side-effect. Erlang happens to be better suited than many languages for the TDD process. (*) Cf. Peter Naur's "Programming as Theory Building". Regards, Dominic Williams http://www.dominicwilliams.net ---- From erik.reitsma@REDACTED Thu Dec 15 13:04:22 2005 From: erik.reitsma@REDACTED (Erik Reitsma (RY/ETM)) Date: Thu, 15 Dec 2005 13:04:22 +0100 Subject: erlang shell via ssh Message-ID: <110BA8ACEE682C479D0B008B6BE4AEB10C1575@esealmw107.eemea.ericsson.se> For me it worked like a charm on my freshly compiled OTP R10-9 on NetBSD 2.1 for sparc64 :-) I could ssh both from another machine and from the machine itself. *Erik. > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of tobbe > Sent: Thursday, December 15, 2005 12:38 PM > To: erlang-questions@REDACTED > Subject: erlang shell via ssh > > > > Yesterday, I tried to setup so that I could get an Erlang > shell via ssh access. > I failed! Sometimes I think the OTP man-pages are just a tiny > bit too terse... > > Anyway, I do not want to run as root, so I tried: > > 1> ssh_sshd:listen(3322, [{user_passwords, [{"admin","admin"}]}]). > {ok,<0.33.0>} > > then I tried to connect with ssh: > > # ssh -p 3322 localhost > > But I just got an error report about 'eaccess' etc. > > So if someone know how to setup this I would appreciate to > hear about it. > I used OTP R10-9. > > Cheers, Tobbe > _________________________________________________________ > Sent using Mail2Forum (http://m2f.sourceforge.net) > From klacke@REDACTED Thu Dec 15 12:53:53 2005 From: klacke@REDACTED (Claes Wikstom) Date: Thu, 15 Dec 2005 12:53:53 +0100 Subject: erlang shell via ssh In-Reply-To: <20051215113817.9D0DD59093@bang.trapexit.org> References: <20051215113817.9D0DD59093@bang.trapexit.org> Message-ID: <43A15951.4010402@hyber.org> tobbe wrote: > Yesterday, I tried to setup so that I could get an Erlang shell via ssh access. > I failed! Sometimes I think the OTP man-pages are just a tiny bit too terse... > > Anyway, I do not want to run as root, so I tried: > > 1> ssh_sshd:listen(3322, [{user_passwords, [{"admin","admin"}]}]). > {ok,<0.33.0>} > > then I tried to connect with ssh: > > # ssh -p 3322 localhost > > But I just got an error report about 'eaccess' etc. > You must let the ssh server read it's private key. Your server crashed with eaccess when it tries to read /etc/ssh You need to give an option {system_dir, Dir} which is a readable dir /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From jakob@REDACTED Thu Dec 15 13:32:38 2005 From: jakob@REDACTED (Jakob Cederlund) Date: Thu, 15 Dec 2005 13:32:38 +0100 Subject: erlang shell via ssh In-Reply-To: <43A15951.4010402@hyber.org> References: <20051215113817.9D0DD59093@bang.trapexit.org> <43A15951.4010402@hyber.org> Message-ID: <43A16266.3070206@erix.ericsson.se> Claes Wikstom wrote: > tobbe wrote: > >> Yesterday, I tried to setup so that I could get an Erlang shell via >> ssh access. >> I failed! Sometimes I think the OTP man-pages are just a tiny bit too >> terse... >> >> Anyway, I do not want to run as root, so I tried: >> >> 1> ssh_sshd:listen(3322, [{user_passwords, [{"admin","admin"}]}]). >> {ok,<0.33.0>} >> >> then I tried to connect with ssh: >> >> # ssh -p 3322 localhost >> >> But I just got an error report about 'eaccess' etc. >> > > > You must let the ssh server read it's private key. Your > server crashed with eaccess when it tries to read /etc/ssh > > You need to give an option {system_dir, Dir} which is > a readable dir > > > /klacke > > Exactly! This is (maybe too tersely) mentioned under ssh_cm, listen. Since the host keys in /etc/ssh are used to identify the host by the sshd-process, it's important that these keys are readable only by root. (Otherwise they could be copied and used on another host.) The easiest way to set up your erlang shell for use with ssh_sshd is to generate a new pair of host keys, with the unix command: ssh-keygen -f ssh_host_rsa_key -t rsa -N '' or: ssh-keygen -f ssh_host_dsa_key -t dsa -N '' Then you use the system_dir option to point these out for the erlang ssh daemon. (I'm goingn to write this in the manual, it really is terse.) /Jakob From klacke@REDACTED Thu Dec 15 14:15:29 2005 From: klacke@REDACTED (Claes Wikstom) Date: Thu, 15 Dec 2005 14:15:29 +0100 Subject: erlang shell via ssh In-Reply-To: <43A16266.3070206@erix.ericsson.se> References: <20051215113817.9D0DD59093@bang.trapexit.org> <43A15951.4010402@hyber.org> <43A16266.3070206@erix.ericsson.se> Message-ID: <43A16C71.4090800@hyber.org> Jakob Cederlund wrote: > > Exactly! This is (maybe too tersely) mentioned under ssh_cm, listen. > Since the host keys in /etc/ssh are used to identify the host by the > sshd-process, it's important that these keys are readable only by root. > (Otherwise they could be copied and used on another host.) > The easiest way to set up your erlang shell for use with ssh_sshd is to > generate a new pair of host keys, with the unix command: > ssh-keygen -f ssh_host_rsa_key -t rsa -N '' > or: > ssh-keygen -f ssh_host_dsa_key -t dsa -N '' > Then you use the system_dir option to point these out for the erlang ssh > daemon. (I'm goingn to write this in the manual, it really is terse.) > /Jakob But then again, while developing, you don't want different host keys associated to the same host. I.e you don't want /etc/ssh _and_ /home/luser/myssh_server_keys on the same host and if you have that, you want both dirs to contain the same keys but with different perms. All this - since the ssh client gets confused otherwise. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From Tobias.Lindahl@REDACTED Thu Dec 15 14:36:30 2005 From: Tobias.Lindahl@REDACTED (Tobias Lindahl) Date: Thu, 15 Dec 2005 14:36:30 +0100 Subject: automated Dialyzer In-Reply-To: <11498CB7D3FCB54897058DE63BE3897CF8D0E4@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897CF8D0E4@esealmw105.eemea.ericsson.se> Message-ID: <43A1715E.4010902@it.uu.se> Vlad Dumitrescu XX (LN/EAB) wrote: > If this feature exists already, I blame my screen's poor resolution for > not observing it :-) > We have something like it but it is not documented, so I think you can keep your screen ;-) Also, it doesn't do exactly what you want. It seems like a good idea, though. I will put it on my todo list. Tobias > best regards, > Vlad > > From ulf.wiger@REDACTED Thu Dec 15 14:35:04 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 15 Dec 2005 14:35:04 +0100 Subject: OO, FP and XP training (extremely long) Message-ID: Dominic Williams wrote: > When I last looked at QuickCheck, it struck me as an > interesting complement to TDD. But it's worth bearing in mind > that TDD is not just about testing or verifying: it's a > /design process/, what matters is the dynamics, the act of > doing it, the flow it gets you in. This is very much true for QuickCheck as well. I would say that QuickCheck has the potential to really revolutionize the way people program. It's not necessarily easy to get into, but it should be well worth the effort. I heard from John Hughes that he didn't feel too successful teaching QuickCheck while he used already written code as a starting point. When he switched to using QuickCheck as a design approach, people caught on much better. Basically: when you want to write a function, - first describe what input the function should oeprate on - then describe what output it should produce. Describing these things as properties is, when you've gotten used to QC, often easier than writing the function itself. Once the properties are written, actually writing the function will be easier, too. And your test cases write themselves... ;-) /Uffe From xpdoka@REDACTED Thu Dec 15 14:51:07 2005 From: xpdoka@REDACTED (Dominic Williams) Date: Thu, 15 Dec 2005 14:51:07 +0100 (CET) Subject: OO, FP and XP training (extremely long) In-Reply-To: References: Message-ID: <45113.212.155.207.253.1134654667.squirrel@www.geekisp.com> Uffe wrote: > This is very much true for QuickCheck as well. I would > say that QuickCheck has the potential to really > revolutionize the way people program. It's not necessarily > easy to get into, but it should be well worth the effort. You've got me interested, I'll give it a serious go. Regards, Dominic Williams http://www.dominicwilliams.net ---- From dizzyd@REDACTED Thu Dec 15 15:16:22 2005 From: dizzyd@REDACTED (Dave Smith) Date: Thu, 15 Dec 2005 07:16:22 -0700 Subject: Atomic ets In-Reply-To: <20051214192903.96220.qmail@web34402.mail.mud.yahoo.com> References: <20051214192903.96220.qmail@web34402.mail.mud.yahoo.com> Message-ID: <5E3AF7A0-C7C7-4EE3-8260-EA9F1D47337E@dizzyd.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Dec 14, 2005, at 12:29 PM, Thomas Lindgren wrote: > Note that transactions provide another conceptually > simple approach. My prediction is that fine-grain, > hardware-assisted transactions will largely replace > locking in conventional systems. But not for a while; > the comp.arch. researchers have just gotten their > teeth into it. If you will humor a Erlang newbie, what exactly is the difference between a "transaction" and a mutex/critical section? And, if the difference is negligible, wouldn't introducing a transaction construct or the other "atomic" ideas mentioned furthered down the thread, just (re-)introduce the complexity of all the locking madness Erlang currently shields us from? The complaints about having to serialize to a gen_server seem odd to me (again, a newbie :)). Mutexes introduce a similar sort of serialization (i.e. you have to design carefully for speed/ contention), yet have much more difficult semantics. Just my $0.02... D. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFDoXq3s6zMNAt8YgcRAhWyAJ4j41r40XghRrazs3xA9rkB12+eHQCfcv6F 05StLget1N0oDIfy9dtBoyk= =qGX9 -----END PGP SIGNATURE----- From tobbe@REDACTED Thu Dec 15 15:37:56 2005 From: tobbe@REDACTED (tobbe) Date: Thu, 15 Dec 2005 15:37:56 +0100 Subject: erlang shell via ssh References: Message-ID: <20051215143756.98A5F59131@bang.trapexit.org> Ok, got it to work finally: # pwd /home/tobbe/ssh_home # ssh-keygen -f ssh_host_dsa_key -t dsa -N "" ..... # erl 1> ssh_sshd:listen(3322, [{system_dir, "/home/tobbe/ssh_home"}, {user_passwords, [{"admin","admin"}]}]). >From another machine: ssh -p 3322 admin@REDACTED The authenticity of host 'orre (192.168.128.32)' can't be established. DSA key fingerprint is f2:09:92:42:3a:5d:5d:ce:65:3f:a9:55:eb:b2:a3:b6. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'orre,192.168.128.32' (DSA) to the list of known hosts. admin@REDACTED's password: Eshell V5.4.12 (abort with ^G) 1> i(). Pid Initial Call Heap Reds Msgs Registered Current Function Stack <0.0.0> otp_ring0:start/2 377 326 ...... Extremely nice !! Cheers, Tobbe (Ps. It didn't work with RSA kind of host-keys... ?) _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From thomaswhitcomb@REDACTED Thu Dec 15 16:16:04 2005 From: thomaswhitcomb@REDACTED (Tom Whitcomb) Date: Thu, 15 Dec 2005 10:16:04 -0500 Subject: OO, FP and XP training (extremely long) Message-ID: <1B2227C0.5008D6AA.72A78FD1@netscape.net> Definitely sounds interesting. I live by TDD but QuickCheck is new to me. Is this a good place to start: http://www.cs.chalmers.se/~rjmh/ErlangQC/ tom Dominic Williams wrote: >Uffe wrote: > >> This is very much true for QuickCheck as well. I would >> say that QuickCheck has the potential to really >> revolutionize the way people program. It's not necessarily >> easy to get into, but it should be well worth the effort. > >You've got me interested, I'll give it a serious go. > >Regards, > >Dominic Williams >http://www.dominicwilliams.net > >---- > > > > __________________________________________________________________ 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 ulf.wiger@REDACTED Thu Dec 15 16:40:07 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 15 Dec 2005 16:40:07 +0100 Subject: OO, FP and XP training (extremely long) Message-ID: Tom Whitcomb wrote: > > Definitely sounds interesting. I live by TDD but QuickCheck > is new to me. Is this a good place to start: > http://www.cs.chalmers.se/~rjmh/ErlangQC/ Yes, that's the place, but be aware that the version there is fairly old. You need to contact John Hughes to inquire about the latest developments, unless you feel that the qc.erl on his homepage is sufficient. (: /Uffe From aserebre@REDACTED Thu Dec 15 17:33:26 2005 From: aserebre@REDACTED (A Serebrenik) Date: Thu, 15 Dec 2005 17:33:26 +0100 (CET) Subject: Second Call For Papers - ICLP 2006 Message-ID: SECOND CALL FOR PAPERS ICLP'06 22nd International Conference on Logic Programming Seattle, Washington, USA, 17-20 August, 2006 http://www.cs.uky.edu/iclp06/ Part of Fourth Federated Logic Conference, FLoC 2006 http://research.microsoft.com/floc06/ CONFERENCE SCOPE Since the first conference held in Marseilles in 1982, ICLP has been the premier international conference for presenting research in logic programming. Contributions (papers and posters) are sought in all areas of logic programming including but not restricted to: * Theory: Semantic Foundations, Formalisms, Nonmonotonic Reasoning, Knowledge Representation. * Implementation: Compilation, Memory Management, Virtual Machines, Parallelism. * Environments: Program Analysis, Program Transformation, Validation and Verification, Debugging, Profiling. * Language Issues: Concurrency, Objects, Coordination, Mobility, Higher Order, Types, Modes, Programming Techniques. * Alternative Paradigms: Constraint Logic Programming, Abductive Logic Programming, Inductive Logic Programming, Answer-Set Programming. * Applications: Deductive Databases, Data Integration, Software Engineering, Natural Language, Web Tools, Internet Agents, Artificial Intelligence. The three broad categories for submissions are: (1) technical papers, where specific attention will be given to work providing novel integrations of the areas listed above, (2) application papers, where the emphasis will be on their impact on the application domain as opposed to the advancement of the the state-of-the-art of logic programming, and (3) posters, ideal for presenting and discussing current work not yet ready for publication, for PhD thesis summaries and research project overviews. In addition to papers and posters, the technical program will include invited talks, advanced tutorials, several workshops and Doctoral Student Consortium. Details, as they become available will be posted at http://www.cs.uky.edu/iclp06/ PAPERS AND POSTERS Papers and posters must describe original, previously unpublished research, and must not be simultaneously submitted for publication elsewhere. They must be written in English. Technical papers and application papers must not exceed 15 pages in the Springer LNCS format (cf. http://www.springer.de/comp/lncs/index.html). The limit for posters is 2 pages in that format. The primary means of submission will be electronic. More information on the submission procedure will be available at http://www.cs.uky.edu/iclp06/ PUBLICATION The proceedings of the conference will be published by Springer-Verlag in the LNCS series. The proceedings will include the accepted papers and the abstracts of accepted posters. SUPPORT SPONSORING AND AWARDS The conference is sponsored by the Association for Logic Programming. The ALP has funds to assist financially disadvantaged participants. The ALP is planning to sponsor two awards for ICLP'06: for the best technical paper and for the best student paper. IMPORTANT DATES Papers Posters Abstract submission deadline 14 February N/A Submission deadline 21 February 14 March Notification of authors 7 April 14 April Camera-ready copy due 2 May 2 May ICLP'2006 ORGANIZATION General Chair: Manuel Hermenegildo (herme@REDACTED) Program Co-Chairs: Sandro Etalle (s.etalle@REDACTED) Mirek Truszczynski (mirek@REDACTED) Workshop Chair: Christian Schulte (schulte@REDACTED) Doctoral Student Consortium: Enrico Pontelli (epontell@REDACTED) Publicity Chair: Alexander Serebrenik (a.serebrenik@REDACTED) PROGRAM COMMITTEE Maria Alpuente Krzysztof Apt Annalisa Bossi Veronica Dahl Giorgio Delzanno Pierre Deransart Agostino Dovier Thomas Eiter Sandro Etalle, co-chair John Gallagher Michael Gelfond Hai-Feng Guo Manuel Hermenegildo Tomi Janhunen Fangzhen Lin Michael Maher Victor Marek Eric Monfroy Stephen Muggleton Brigitte Pientka Maurizio Proietti I.V. Ramakrishnan Peter van Roy Harald Sondergaard Mirek Truszczynski, co-chair German Vidal Andrei Voronkov Roland Yap CONFERENCE VENUE The conference will be a part of the fourth Federated Logic Conference (FLoC'06) to be held August 10-21, 2006, in Seattle, Washington (http://research.microsoft.com/floc06/). Other participating conferences are: Computer-Aided Verification (CAV), Rewriting Techniques and Applications (RTA), Logic in Computer Science (LICS), Theory and Applications of Satisfiability Testing (SAT), and Int'l Joint Conference on Automated Reasoning (IJCAR). Plenary events involving multiple conferences are planned. WORKSHOPS The ICLP-06 program will include several workshops. They provide a platform for the presentation of preliminary work and novel ideas in a less formal way than the conference itself. They also are an opportunity to disseminate work in progress, particularly for new researchers. Workshops also provide a venue for presenting more specialized topics and opportunities for more intensive discussions, exchange of ideas, and project collaboration. The following workshops will be held in association with the ICLP-06 conference: * International Workshop on Applications of Logic Programming in the Semantic Web and Semantic Web Services (ALPSWS2006) * Colloquium on Implementation of Constraint and LOgic Programming Systems (CICLOPS) * International Workshop on Software Verification and Validation (SVV 2006) * Preferences and Their Applications in Logic Programming Systems Search and Logic: Answer Set Programming and SAT * 16th Workshop on Logic-Based Programming Environments (WLPE 2006) * MVLP'06: International Workshop on Multi-Valued Logic and Logic Programming From tobbe@REDACTED Thu Dec 15 18:49:17 2005 From: tobbe@REDACTED (tobbe) Date: Thu, 15 Dec 2005 18:49:17 +0100 Subject: erlang shell via ssh References: Message-ID: <20051215174917.07F005913D@bang.trapexit.org> One more thing: It would be very nice to have an option such as: {user_auth_mod, Module} This wold cause: Module:ssh_auth(User, Passwd) to be called. Returning either true or false. This way, one doesn't have to specify the cleartext password. It also makes it possible to use Radius,LDAP, NTLM, MySQL, etc as an authentication backend. Cheers, Tobbe _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From vlad_dumitrescu@REDACTED Thu Dec 15 20:48:33 2005 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Thu, 15 Dec 2005 20:48:33 +0100 Subject: OO, FP and XP training (extremely long) References: Message-ID: Hi, >> http://www.cs.chalmers.se/~rjmh/ErlangQC/ > > Yes, that's the place, but be aware that the version > there is fairly old. You need to contact John Hughes > to inquire about the latest developments, unless you > feel that the qc.erl on his homepage is sufficient. (: qc.erl on that site isn't available, but all files plus some examples have been added to Jungerl by Luke. I think it was done directly after the presentation at EUC, and they don't seem to have been updated since. regards, Vlad From jocke@REDACTED Thu Dec 15 22:10:42 2005 From: jocke@REDACTED (Joakim G.) Date: Thu, 15 Dec 2005 22:10:42 +0100 Subject: type system in erlang? In-Reply-To: <200512141431.jBEEVbUL025636@spikklubban.it.uu.se> References: <200512141431.jBEEVbUL025636@spikklubban.it.uu.se> Message-ID: <43A1DBD2.4050504@tail-f.com> Kostis Sagonas wrote: > Waldemar Rachwal wrote: > PS. FYI, we are currently working on the following two directions: > 1. Getting Dialyzer into Erlang/OTP. Good > 2. Developing Typer, a tool that will automatically annotate > Erlang source code with Edoc-compatible type information. Yes, yes, yes! Very useful. /Jocke -- tail-f From olsongt@REDACTED Thu Dec 15 23:17:29 2005 From: olsongt@REDACTED (Grant Olson) Date: Thu, 15 Dec 2005 17:17:29 -0500 Subject: Questions/Comments on online portion of "Concurrent Programming in Erlang" Message-ID: <0IRK00KPA8L5T3S7@vms048.mailsrvcs.net> Hello, I've recently become interested in Erlang and am currently working through the .pdf for "Concurrent Programming in Erlang". I'm having a few problems and was hoping for some input. Is there anywhere that has updated code? For example, the code in Figure 5.5 won't run for me, presumably because lookup and insert are no longer BIFs. If there isn't any updated code, I'd be glad to post my notes somewhere once I get through the manual. Is there any easy way to lookup modules in windows? In the above-listed code, I am assuming I need to track down a module for dictionaries or tables or lists. I don't seem to be able to figure out how to do this from the documentation on windows. The best I've done is googled on stuff like "erlang man dict", but it's awkward. Also, attempting to use the search engine on erlang.org give the following error: The requested URL /cgi-bin/se_search was not found on this server. Thanks, -Grant From Bob.Smart@REDACTED Thu Dec 15 23:40:39 2005 From: Bob.Smart@REDACTED (Bob.Smart@REDACTED) Date: Fri, 16 Dec 2005 09:40:39 +1100 Subject: type system in erlang? Message-ID: > The basic problem with type systems is that there is no single one > that will satisfy all wishes. What sort of type system would you > want to see? The sensible definition of the type of a value is "everything the compiler knows about a value at the time the compilation is done". The simple way to allow the user to communicate extra information to the compiler is with some sort of assert system. I would note again that there is more to be gained by doing further optimization at run time than by squeezing every drop of optimization during traditional "before any input" compilation. I would also like to completely reject the idea that you shouldn't do optimizations that will mess up benchmarks. Benchmarks should use the value created to have an external side effect, otherwise they are not well defined. Bob From jilani.khaldi1@REDACTED Fri Dec 16 00:21:44 2005 From: jilani.khaldi1@REDACTED (Jilani Khaldi) Date: Fri, 16 Dec 2005 00:21:44 +0100 Subject: erlang shell via ssh In-Reply-To: <20051215143756.98A5F59131@bang.trapexit.org> References: <20051215143756.98A5F59131@bang.trapexit.org> Message-ID: <43A1FA88.7030307@virgilio.it> Hi All, How to transalte this code in a tail recursion one? fib(0) -> 0; fib(1) -> 1; fib(N) -> fib(N-1) + fib(N-2). Seems easy but I couldn't get it working :-( Thank you. jk -- Jilani KHALDI http://jkhaldi.oltrelinux.com From jilani.khaldi1@REDACTED Fri Dec 16 00:24:05 2005 From: jilani.khaldi1@REDACTED (Jilani Khaldi) Date: Fri, 16 Dec 2005 00:24:05 +0100 Subject: Tail recursion In-Reply-To: <20051215143756.98A5F59131@bang.trapexit.org> References: <20051215143756.98A5F59131@bang.trapexit.org> Message-ID: <43A1FB15.8060003@virgilio.it> // sorry for the wrong subject of my last post... Hi All, How to transalte this code in a tail recursion one? fib(0) -> 0; fib(1) -> 1; fib(N) -> fib(N-1) + fib(N-2). Seems easy but I couldn't get it working :-( Thank you. jk -- Jilani KHALDI http://jkhaldi.oltrelinux.com From kostis@REDACTED Fri Dec 16 00:35:47 2005 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 16 Dec 2005 00:35:47 +0100 (MET) Subject: type system in erlang? In-Reply-To: Mail from '' dated: Fri, 16 Dec 2005 09:40:39 +1100 Message-ID: <200512152335.jBFNZlJ1013965@spikklubban.it.uu.se> Bob Smart replied to my question: > > The basic problem with type systems is that there is no single one > > that will satisfy all wishes. What sort of type system would you > > want to see? > > The sensible definition of the type of a value is "everything the > compiler knows about a value at the time the compilation is done". I do not get how this answers my question... This basically equates the ideal type system with whatever type analysis the compiler performs at some given point. So the current type system of the BEAM compiler, which keeps no type information about values (other than "it's an Erlang term"), is a satisfactory one. Probably not what you had in mind. I can of course see that you probably wanted to write "could know" rather than "knows" in your answer, but it is precisely this information that I am after (and this is the reason why I wrote the statement before the question). Cheers, Kostis From kostis@REDACTED Fri Dec 16 00:57:24 2005 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 16 Dec 2005 00:57:24 +0100 (MET) Subject: type system in erlang? In-Reply-To: Mail from '"Rachwal Waldemar-AWR001" ' dated: Thu, 15 Dec 2005 10:19:35 -0000 Message-ID: <200512152357.jBFNvOEA014875@spikklubban.it.uu.se> Waldemar Rachwal wrote: > > Type system, loose set of modest wishes: > > 1) Usefull, not academic > > It has to catch type errors as much as possible, thus relieving a > developer of tedious unit tests of thing which should do a compiler. > The type system hasn't to claim a right to be "complete" strict system > (like in Haskell or OCaml) to be usefull, I think. On the other hand > maybe the complete type system make a compiler's analysis easier, I > guess. > > 2) Minimalistic, or incremental > > I'd want to define types mainly for exported functions, and not for all, > at least not at once. > > 3) Some notion to encompass heterogenous lists. [any()] ? > > any() would mean potentially different type, from element to element, > and [any()] is different than [A], which means any type A, but all list > elements of the same type. > Some form of relaxation for type system, but expressable. > > 4) Record types and recursive data types. > > 5) Intuitive, reflecting how thing are used in practice > > ... [SNIP] ... > > I wonder how much these wishes are contradictory in terms of > feasibility... ;) Well, not much. In fact, we (the HiPE team) already have most of that. (*) The only things from your wishlist we do not have is "typed" records (but I've made a proposal to the OTP team and we are still in an undecided = "let's sleep on it" phase) and the ability to define recursive data types other than lists. Best, Kostis (*) We actually have more: we have a type inferencer for these things, not just a type checker. I.e., absolutely no declarations needed. But, quite sadly, these days we also have funding problems for our research. How much is your company willing to pay for these things? From harveyd@REDACTED Fri Dec 16 04:18:02 2005 From: harveyd@REDACTED (Dale Harvey) Date: Fri, 16 Dec 2005 03:18:02 +0000 Subject: Tail recursion In-Reply-To: <43A1FB15.8060003@virgilio.it> References: <20051215143756.98A5F59131@bang.trapexit.org> <43A1FB15.8060003@virgilio.it> Message-ID: fib(A,B,C,_) when A == B -> C; fib(A,B,C,D) -> fib1(A,B+1,C+D,C). call it with fib(X,1,1,0). -------------- next part -------------- An HTML attachment was scrubbed... URL: From xlcr@REDACTED Fri Dec 16 05:14:51 2005 From: xlcr@REDACTED (Nick Linker) Date: Fri, 16 Dec 2005 10:14:51 +0600 Subject: Questions/Comments on online portion of "Concurrent Programming in Erlang" In-Reply-To: <0IRK00KPA8L5T3S7@vms048.mailsrvcs.net> References: <0IRK00KPA8L5T3S7@vms048.mailsrvcs.net> Message-ID: <43A23F3B.2060403@mail.ru> Grant Olson wrote: >Is there anywhere that has updated code? For example, the code in Figure 5.5 >won't run for me, presumably because lookup and insert are no longer BIFs. >If there isn't any updated code, I'd be glad to post my notes somewhere once >I get through the manual. > > I got problems with the code in the book too. For example, at first I was fail to run the balanced tree implementation, but this fact enforces me to get deeper knowledge about it. Finally, I've implemented the balanced tree on my own, examined the implementation in the book and even found that the pattern matching of "delete" function is not exhaustive :-) So, this partly not-working code is definitely a _good_ code. >Is there any easy way to lookup modules in windows? In the above-listed >code, I am assuming I need to track down a module for dictionaries or tables >or lists. I don't seem to be able to figure out how to do this from the >documentation on windows. The best I've done is googled on stuff like >"erlang man dict", but it's awkward. > > FAR, Alt+F7, search through the \erlang\lib directory with desired string :-) Best regards, Nick Linker From bengt.kleberg@REDACTED Fri Dec 16 07:28:39 2005 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Fri, 16 Dec 2005 07:28:39 +0100 Subject: Questions/Comments on online portion of "Concurrent Programming in Erlang" In-Reply-To: <0IRK00KPA8L5T3S7@vms048.mailsrvcs.net> References: <0IRK00KPA8L5T3S7@vms048.mailsrvcs.net> Message-ID: <43A25E97.2030809@ericsson.com> On 2005-12-15 23:17, Grant Olson wrote: ...deleted > Is there anywhere that has updated code? For example, the code in Figure 5.5 > won't run for me, presumably because lookup and insert are no longer BIFs. > If there isn't any updated code, I'd be glad to post my notes somewhere once > I get through the manual. the example is not complete. insert() and lookup() are not bif's, instead they are omitted for brevity. > Is there any easy way to lookup modules in windows? In the above-listed > code, I am assuming I need to track down a module for dictionaries or tables > or lists. I don't seem to be able to figure out how to do this from the > documentation on windows. The best I've done is googled on stuff like > "erlang man dict", but it's awkward. at http://www.trapexit.org/docs/ you can mouse-over ''Man Pages'' and follow the cascading menues to man3 -> dict. it becomes awkward when the menues gets too long (somewhere after string). > Also, attempting to use the search engine on erlang.org give the following > error: The requested URL /cgi-bin/se_search was not found on this server. you could try the forums at trapexit (http://forums.trapexit.org:81/phpBB). they are searchable. the complete documentation at http://www.erlang.se/doc/doc-5.4.10/doc/ has an Index. unfortunately this is not exhaustive. i failed to locate the erlang implementation of tar when using the index. bengt From harveyd@REDACTED Fri Dec 16 08:30:20 2005 From: harveyd@REDACTED (Dale Harvey) Date: Fri, 16 Dec 2005 07:30:20 +0000 Subject: Tail recursion In-Reply-To: References: <20051215143756.98A5F59131@bang.trapexit.org> <43A1FB15.8060003@virgilio.it> Message-ID: oops, take out that 1 in fib1 fib(A,B,C,_) when A == B -> C; fib(A,B,C,D) -> fib(A,B+1,C+D,C). -------------- next part -------------- An HTML attachment was scrubbed... URL: From nhn@REDACTED Thu Dec 15 20:05:51 2005 From: nhn@REDACTED (Henrik Nilsson) Date: Thu, 15 Dec 2005 19:05:51 +0000 Subject: TFP2006: Second Call for Papers Message-ID: <43A1BE8F.2040009@cs.nott.ac.uk> Dear Colleague, Please find enclosed the second call for papers for Trends in Functional Programming (TFP) 2006. 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 tzheng@REDACTED Fri Dec 16 00:24:21 2005 From: tzheng@REDACTED (Tony Zheng) Date: Thu, 15 Dec 2005 15:24:21 -0800 Subject: subscribe erlang-questions Message-ID: <1134689061.15136.11.camel@home> Hi I am tony in Canada. I am responsible of developing the IP payment gateway for our company with Erlang. I want to know if Erlang support http protocol and where I can find some samples about it. If Erlang doesn't support http protocol, is there any solution to realize client/server communication? Thanks a lot. Best regards. Tony Email:tzheng@REDACTED From erlang@REDACTED Fri Dec 16 09:14:47 2005 From: erlang@REDACTED (Peter-Henry Mander) Date: Fri, 16 Dec 2005 08:14:47 +0000 Subject: Recovery-Oriented Computing (ROC) Message-ID: <1134720887.8252.7.camel@hymir.newport-networks.com> Hi Joe, It looks very similar to your thesis [1]! http://roc.cs.berkeley.edu/ http://roc.cs.berkeley.edu/roc_overview.html Is there something new in the Berkeley approach? Pete. [1] http://www.sics.se/~joe/thesis/armstrong_thesis_2003.pdf From lennart.ohman@REDACTED Fri Dec 16 09:28:07 2005 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Fri, 16 Dec 2005 09:28:07 +0100 Subject: http protocol In-Reply-To: <1134689061.15136.11.camel@home> Message-ID: Hi, what is it you want to do? Have you looked at YAWS (Yet Another Web Server :-) yaws.hyber.org 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 Tony Zheng Sent: Friday, December 16, 2005 12:24 AM To: erlang-questions@REDACTED Cc: majordomo@REDACTED; Brian Doyle; Renyi Xiong Subject: subscribe erlang-questions Hi I am tony in Canada. I am responsible of developing the IP payment gateway for our company with Erlang. I want to know if Erlang support http protocol and where I can find some samples about it. If Erlang doesn't support http protocol, is there any solution to realize client/server communication? Thanks a lot. Best regards. Tony Email:tzheng@REDACTED From ke.han@REDACTED Fri Dec 16 12:35:27 2005 From: ke.han@REDACTED (ke.han) Date: Fri, 16 Dec 2005 19:35:27 +0800 Subject: mnesia qlc error Message-ID: <43A2A67F.3090402@redstarling.com> Using erl R10B-8 (5.4.10), I have a table defined by: mnesia:create_table(target, [{attributes, record_info(fields, target)}, {disc_copies, [node()]}, {type, set}]) where target is: -record(target, {id, % string name, % string actions}). % List if action id I have a function: targetMgr:findTarget/1: findTarget(TargetName) -> F = fun() -> Q = qlc:q([Target || Target <- mnesia:table(target), Target#target.name == TargetName]), qlc:e(Q) end, mnesia:transaction(F). In an erlang shell, a call of targetMgr:findTarget("hello") yields an error: 17> targetMgr:findTarget("hello"). {aborted,{function_clause,[{targetMgr,'-findTarget/1-lc$^0/1-0-', [{qlc_handle, {qlc_table, #Fun, true, #Fun, #Fun, #Fun, #Fun, #Fun, #Fun, undefined, undefined, no_match_spec}}, "hello"]}, {targetMgr,'-findTarget/1-fun-0-',1}, {mnesia_tm,apply_fun,3}, {mnesia_tm,execute_transaction,5}, {erl_eval,do_apply,5}, {shell,exprs,6}, {shell,eval_loop,3}]}} If I rewrite this call as: findTarget(TargetName) -> Target = #target{name = TargetName, _ = '_'}, F = fun() -> mnesia:match_object(Target) end, mnesia:transaction(F). It works... what's up with qlc?? thanks, ke han From vipin@REDACTED Fri Dec 16 12:47:05 2005 From: vipin@REDACTED (vipin) Date: Fri, 16 Dec 2005 17:17:05 +0530 Subject: Process Communication - (erlang process to non-erlang process) ??? Message-ID: <43A2A939.2030409@picopeta.com> Hi folks, Is there any way to send signals/messages from erlang process to non-erlang process or vice-versa ? (Non-Erlang process could be any process running on system whose PID is known). Your suggestions would be welcome. Cheers, Vipin From mats.cronqvist@REDACTED Fri Dec 16 14:04:53 2005 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Fri, 16 Dec 2005 14:04:53 +0100 Subject: Atomic ets In-Reply-To: <43A188E8.5000506@telia.com> References: <20051214192903.96220.qmail@web34402.mail.mud.yahoo.com> <43A12268.2030701@ericsson.com> <43A188E8.5000506@telia.com> Message-ID: <43A2BB75.5060802@ericsson.com> Robert Virding wrote: > > I think you will find when you get down to it that a magical new API > probably won't be much more efficient as it basically still has to do > the same work. Even if you don't SEE it. > > One of the original tenants of Erlang was that distribution could be > transparent when desired, message passing and error handling were > designed to be transparently distributable. I can think of better things > to do than to add a general distributed transaction system to Erlang. > And to add one to the basic language that only worked localy would be a > Bad Thing and would probably mean that the poor users will not only > shoot themselves in the foot but also chop off the whole leg. At the > very best. i've been mulling over the above for a while now, and i don't get it. the original question in the thread was this: > Are there simple, > useful ways to write ets code that avoids the problem of > getting preempted between, say, a lookup and an insert? more generally, what do you do if you you need to make sure your erlang process is not scheduled out between two BIF calls. i think the answer is; "write a new BIF"(*). see e.g erlang:spawn_link/3; spawn_link(Module, Function, ArgumentList) This BIF is identical to the following code being evaluated in an atomic operation: > Pid = spawn(Module, Function, ArgumentList), link(Pid), Pid. This BIF is necessary since the process created might run immediately and fail before link/1 is called. or ets:insert_new/2, which is basically an atomic version of; case ets:loopkup(Tab,Key) of [] -> ets:insert(Tab,{Key,Val}); _ -> false end in an atomic block spawn_link could be implemented like this; atomic link(Pid = spawn(Module, Function, ArgumentList)) end i'm not sure what "general distributed transaction system" has to do with any of this. mats (*) in some cases, such as in the original question, you can serialize through a server (which will slow you down some). sometimes i've resorted to this nasty hack; erlang:yield(), foo(), bla(). which'll (probably) make foo and bla atomic (at least as long as the vm uses reduction counting) From chandrashekhar.mullaparthi@REDACTED Fri Dec 16 15:48:05 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Fri, 16 Dec 2005 14:48:05 +0000 Subject: http protocol In-Reply-To: References: <1134689061.15136.11.camel@home> Message-ID: And if you wanted a HTTP client, you have a choice of the builtin http client in the inets application or the opensource ibrowse application. IMHO, ibrowse is better :-) cheers Chandru On 16/12/05, Lennart Ohman wrote: > Hi, what is it you want to do? > Have you looked at YAWS (Yet Another Web Server :-) > yaws.hyber.org > > Best Regards, > Lennart > > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Tony Zheng > Sent: Friday, December 16, 2005 12:24 AM > To: erlang-questions@REDACTED > Cc: majordomo@REDACTED; Brian Doyle; Renyi Xiong > Subject: subscribe erlang-questions > > Hi > > I am tony in Canada. I am responsible of developing the IP payment gateway > for our company with Erlang. I want to know if Erlang support http protocol > and where I can find some samples about it. If Erlang doesn't support http > protocol, is there any solution to realize client/server communication? > Thanks a lot. > > Best regards. > > Tony > Email:tzheng@REDACTED From bmk@REDACTED Fri Dec 16 16:17:50 2005 From: bmk@REDACTED (Micael Karlberg) Date: Fri, 16 Dec 2005 16:17:50 +0100 Subject: newbie SNMP question In-Reply-To: <20051216125808.7FE435918C@bang.trapexit.org> References: <20051216125808.7FE435918C@bang.trapexit.org> Message-ID: <43A2DA9E.30507@erix.ericsson.se> Hi, karol wrote: > Hi, > I have just started doing some Erlang and SNMP, and I need a help. Why are the modules snmpa and snmpm not loaded by default? My config for agent is : Modules are loaded when first used (unless you explicitly load them). > [ > {snmp, > [{agent, > [{config, [{dir, "/home/md/maindata_snmp/agent/conf/"}]}, > {db_dir, "/home/md/maindata_snmp/agent/db/"}]}]} > ]. > > and when I run it with : erl -sname agent -config agent, and I do m()., the only SNMP related modules are : > > snmp_app /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_app.beam > snmp_app_sup /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_app_sup.beam > snmp_community_mib /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_community_mib.beam > snmp_conf /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_conf.beam > snmp_framework_mib /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_framework_mib.beam > snmp_generic /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_generic.beam > snmp_misc /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_misc.beam > snmp_note_store /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_note_store.beam > snmp_notification_mi /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_notification_mib.beam > snmp_standard_mib /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_standard_mib.beam > snmp_target_mib /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_target_mib.beam > snmp_user_based_sm_m /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_user_based_sm_mib.beam > snmp_verbosity /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_verbosity.beam > snmp_view_based_acm_ /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_view_based_acm_mib.beam > snmpa_agent /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_agent.beam > snmpa_agent_sup /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_agent_sup.beam > snmpa_general_db /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_general_db.beam > snmpa_local_db /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_local_db.beam > snmpa_mib /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_mib.beam > snmpa_mib_data /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_mib_data.beam > snmpa_mib_lib /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_mib_lib.beam > snmpa_misc_sup /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_misc_sup.beam > snmpa_mpd /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_mpd.beam > snmpa_net_if /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_net_if.beam > snmpa_supervisor /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_supervisor.beam > snmpa_symbolic_store /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_symbolic_store.beam > snmpa_vacm /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_vacm.beam > > but why are the core modules missing? I mean, there are examples where the guys start manager like this (I think that snmp_mgr was renamed to snmpm later - is it true?) I don't know what you mean by core modules. No, snmp_mgr was not renamed to snmpm. It still exist, in the test directory (now renamed to snmp_test_mgr, it was only a testtool anyway). The manager which is part of the snmp application (as of version 4.0) is a _new_ component. Here is an example config file for a case whith the snmp application only running a manager: [{snmp, [ {manager, [ {versions, [v1,v2]}, {server, [{verbosity, trace}]}, {config, [{dir, "/ldisk/tests/snmp/4.x/manager/conf/"}, {verbosity, trace}, {db_dir, "/ldisk/tests/snmp/4.x/manager/db/"}]}, {mibs, []} ] } ] } ]. Start the application in the same way ( application:start(snmp) ). For the record, the version of the snmp application you are using is old! Version 4.6.1 is part of R10B-9 /BMK From karol.skocik@REDACTED Fri Dec 16 13:58:08 2005 From: karol.skocik@REDACTED (karol) Date: Fri, 16 Dec 2005 13:58:08 +0100 Subject: newbie SNMP question References: Message-ID: <20051216125808.7FE435918C@bang.trapexit.org> Hi, I have just started doing some Erlang and SNMP, and I need a help. Why are the modules snmpa and snmpm not loaded by default? My config for agent is : [ {snmp, [{agent, [{config, [{dir, "/home/md/maindata_snmp/agent/conf/"}]}, {db_dir, "/home/md/maindata_snmp/agent/db/"}]}]} ]. and when I run it with : erl -sname agent -config agent, and I do m()., the only SNMP related modules are : snmp_app /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_app.beam snmp_app_sup /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_app_sup.beam snmp_community_mib /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_community_mib.beam snmp_conf /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_conf.beam snmp_framework_mib /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_framework_mib.beam snmp_generic /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_generic.beam snmp_misc /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_misc.beam snmp_note_store /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_note_store.beam snmp_notification_mi /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_notification_mib.beam snmp_standard_mib /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_standard_mib.beam snmp_target_mib /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_target_mib.beam snmp_user_based_sm_m /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_user_based_sm_mib.beam snmp_verbosity /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_verbosity.beam snmp_view_based_acm_ /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmp_view_based_acm_mib.beam snmpa_agent /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_agent.beam snmpa_agent_sup /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_agent_sup.beam snmpa_general_db /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_general_db.beam snmpa_local_db /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_local_db.beam snmpa_mib /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_mib.beam snmpa_mib_data /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_mib_data.beam snmpa_mib_lib /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_mib_lib.beam snmpa_misc_sup /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_misc_sup.beam snmpa_mpd /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_mpd.beam snmpa_net_if /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_net_if.beam snmpa_supervisor /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_supervisor.beam snmpa_symbolic_store /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_symbolic_store.beam snmpa_vacm /usr/lib/erlang/lib/snmp-4.1.4/ebin/snmpa_vacm.beam but why are the core modules missing? I mean, there are examples where the guys start manager like this (I think that snmp_mgr was renamed to snmpm later - is it true?) -import(snmp_mgr, [gn/1, g/1, s/1, expect/2, expect/4, expect/6]). start() -> snmp_mgr:start([{agent,"dront.nada.kth.se"},{community,"all-rights"}, {mibs,["STANDARD-MIB.bin"]},trace]), simple_standard_test(). Thank you, Karol _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From chandrashekhar.mullaparthi@REDACTED Mon Dec 19 09:12:10 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Mon, 19 Dec 2005 08:12:10 +0000 Subject: http protocol In-Reply-To: <1134755532.5525.42.camel@home> References: <1134755532.5525.42.camel@home> Message-ID: So you need a http proxy written in erlang. There isn't anything opensource at the moment. You can try merging the minimal http servers written by Joe/Sean* and try modifying them to forward requests using ibrowse. You'll have to read the relevant sections of RFC2616 to see what parts you have to implement. Or you can ask Klacke nicely to see if he'll build proxy support into yaws. cheers Chandru [*] Sean Hinde's webserver is called iserve and I think you'll find it at trapexit.org. Joe Armstrong's webserver is at his website. A quick search of the erlang mailing list archives should work. On 16/12/05, Tony Zheng wrote: > We have installed a Java Web server on Solaris 10 platform and the > client is POS(windows CE platform) supported HTTP protocol. The > communication between POS and Java web server should pass through a > gateway programed by Erlang. That is: > > POS client<----->Gateway(Erlang)<----->Java web server > > So the Erlang gateway should received a https over TCP/IP using a > standard URL format like this: > https://111.222.333.444/test.asp?RecordID=0&........ > > I want to program a gateway in server by Erlang, it can get some http > format request from client and response http format to client. are there > any samples? > > Thanks. > > Tony > From klacke@REDACTED Mon Dec 19 09:58:10 2005 From: klacke@REDACTED (Claes Wikstom) Date: Mon, 19 Dec 2005 09:58:10 +0100 Subject: http protocol In-Reply-To: References: <1134755532.5525.42.camel@home> Message-ID: <43A67622.9070000@hyber.org> chandru wrote: > So you need a http proxy written in erlang. There isn't anything > opensource at the moment. You can try merging the minimal http servers > written by Joe/Sean* and try modifying them to forward requests using > ibrowse. You'll have to read the relevant sections of RFC2616 to see > what parts you have to implement. > > Or you can ask Klacke nicely to see if he'll build proxy support into yaws. > Yaws already has a reverse proxy implementation. It's not especially good though. Proxying HTTP is nontrivial, there are so goddamn many things an HTTP proxy has to do. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From event@REDACTED Thu Dec 15 11:26:49 2005 From: event@REDACTED (event@REDACTED) Date: Thu, 15 Dec 2005 11:26:49 +0100 (CET) Subject: CFP: ProMAS@ AAMAS 2006 In-Reply-To: <20051117095732.47576.qmail@web25205.mail.ukl.yahoo.com> References: <20051117095732.47576.qmail@web25205.mail.ukl.yahoo.com> Message-ID: <2110.82.120.104.168.1134642409.squirrel@mailia.lip6.fr> ** Sorry for multiple postings ** Extendedn deadline: the AAMAS organisers have changed the official ** deadline for paper submission to all AAMAS workshops to be on the ** 1st OF FEBRUARY =================== 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 tzheng@REDACTED Fri Dec 16 18:52:12 2005 From: tzheng@REDACTED (Tony Zheng) Date: Fri, 16 Dec 2005 09:52:12 -0800 Subject: http protocol In-Reply-To: References: Message-ID: <1134755532.5525.42.camel@home> We have installed a Java Web server on Solaris 10 platform and the client is POS(windows CE platform) supported HTTP protocol. The communication between POS and Java web server should pass through a gateway programed by Erlang. That is: POS client<----->Gateway(Erlang)<----->Java web server So the Erlang gateway should received a https over TCP/IP using a standard URL format like this: https://111.222.333.444/test.asp?RecordID=0&........ I want to program a gateway in server by Erlang, it can get some http format request from client and response http format to client. are there any samples? Thanks. Tony is there any solution to realize client/server communication? > Thanks a lot. On Fri, 2005-12-16 at 00:28, Lennart Ohman wrote: > Hi, what is it you want to do? > Have you looked at YAWS (Yet Another Web Server :-) > yaws.hyber.org > > 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 Tony Zheng > Sent: Friday, December 16, 2005 12:24 AM > To: erlang-questions@REDACTED > Cc: majordomo@REDACTED; Brian Doyle; Renyi Xiong > Subject: subscribe erlang-questions > > Hi > > I am tony in Canada. I am responsible of developing the IP payment gateway > for our company with Erlang. I want to know if Erlang support http protocol > and where I can find some samples about it. If Erlang doesn't support http > protocol, is there any solution to realize client/server communication? > Thanks a lot. > > Best regards. > > Tony > Email:tzheng@REDACTED > > > From disita@REDACTED Fri Dec 16 21:47:34 2005 From: disita@REDACTED (DISIT) Date: Fri, 16 Dec 2005 21:47:34 +0100 Subject: Call For Papers of SEW-30, ICECCS2006, AXMEDIS2006 Message-ID: <200512162047.jBGKlX5k030780@oboe.dsi.unifi.it> Dear Erlang Questions You are cordially invited to Submitt a paper and/or to attend the following conferences and workshops: -- 30th Annual IEEE/NASA Software Engineering Workshop Loyola College Graduate Center, Columbia, MD, USA, 24-28 April 2006, http://sel.gsfc.nasa.gov/ -- 11th IEEE International Conference on Engineering of Complex Computer Systems (ICEECS 2006), Co-located with Computational Systems Bioinformatics (CSB 2006) Stanford University, CA, USA, 10-14 August 2006, http://www.iceccs.org -- 2nd International Conference on Automated Production of Cross Media Content for Multi-channel Distribution, IEEE press proc., Leeds, UK, 13-15 December 2006. http://www.axmedis.org/axmedis2006 Sorry for multiple reception of this email, and please pass this email to other collegues that could be interested in the above events. In the following, and on the web site you may find more details. Best wishes, Paolo Nesi _+_+_+_+_+_+_+_+_+_+ SEW-30 Call for Papers _+_+_+_+_+_+_+_+_+_+ 30th Annual IEEE/NASA Software Engineering Workshop Loyola College Graduate Center, Columbia, MD, USA 24-28 April 2006 Part of Systems and Software Week (http://www.systemsandsoftwareweek.org), co-located with: ? EASe 2006, 3rd IEEE Workshop on Engineering Autonomic Systems; http://www.ulster.ac.uk/ease/ ? DSSNS 2006, 2nd IEEE Workshop on Dependability and Reliability in Sensor Networks and Systems; http://www.dssns.org ? ZUM 2006, 12th International Conference of Z Users; http://www.zuser.org/ZUM2006 Sponsored by NASA Software Engineering Laboratory -NASA Goddard Space Flight Center -IEEE Computer Society, Technical Council on Software Engineering Join us for our 30th anniversary, and the Software Engineering event of 2006!!! Keynote Speakers ? Vic Basili (University of Maryland, College Park, USA) ? Judith Bishop (University of Pretoria, South Africa) ? Manfred Broy (Technical University of Munich, Germany) ? Carlo Ghezzi (Politecnico di Milano, Italy) ? David Gries (Cornell University, USA) ? Jim Woodcock (University of York, UK) Background The 30th Annual IEEE/NASA Software Engineering Workshop, the longest continually running Software Engineering event in the world, will be held at Loyola College Graduate Center, Columbia, Maryland, in Metropolitan Washington DC, 24-28 April 2006, as part of the 2nd Systems and Software Week. Scope The workshop aims to bring together NASA technical staff, contractors, academics and industrial practitioners interested in the advancement of software engineering principles and techniques. The workshop provides a forum for reporting on past experiences for describing new and emerging results and techniques, and for exchanging ideas on best practice and future directions. Of particular importance is relevance to NASA?s mission and goals, and how techniques might be applied, or adapted for use, at NASA, or how NASA?s techniques might be used or adapted for more generic use. Topics of interest include, but are not limited to: ? Metrics and experience reports ? Software quality assurance ? Formal methods and formal approaches to software development ? Software engineering processes and process improvement ? CMM and CMMI ? Requirements engineering ? Software Architectures ? Real-time Software Engineering ? Software maintenance, reuse, and legacy systems ? Agent-based software systems Submissions Long papers (maximum 10 pages in IEEE format) and short industrial/governmental experience reports (maximum 5 pages in IEEE format) are sought for inclusion in the conference program and publication in the post-proceedings which will be published by IEEE CS Press. All submissions will be reviewed for originality, relevance, and technical detail. At least one author per paper will be required to register and present at the workshop. Papers not presented will not be included in the proceedings. All submissions must be made in electronic format (.doc, .pdf or .ps formats only), via the conference electronic submission site that will be available shortly via the Systems and Software Week website (http://www.systemsandsoftwareweek.org). Publication All accepted papers will be published in the conference post proceedings, published by IEEE CS Press. Some authors will also be invited to submit a revised version of their paper for inclusion in Innovations in Systems and Software Engineering: A NASA Journal (Springer). (http://www.springeronline.com/sgw/cda/frontpage/0,11855,5-146-70-36204355-0,00.html) Best Student Paper Prize The NASA Software Engineering Laboratory will offer a best student paper prize of $1K (US$1,024) and a commemorative certificate. To be eligible for the prize, a paper must be accepted for SEW, presented at the conference, and written solely by full time student author(s) and their advisors only. Papers based on thesis work submitted after 1 January 2005, and satisfying the above author criteria, are also eligible. A significant registration discount will be available for student participants. Deadlines - 8 January, 2006: Long and Short papers due - 1 February, 2006 : Notification to Authors - 24-28 April, 2006 SEW-30 in Columbia, MD - 8 June, 2006 Camera Ready Copy due for Post-Proceedings Any inquiries should also be directed by email to Michael.G.Hinchey@REDACTED; for faster responses, please include ?SEW? in the subject line. _+_+_+_+_+_+_+_+_+_+ ICEECS 2006 Call for Papers _+_+_+_+_+_+_+_+_+_+ ICEECS Call for Papers 11th IEEE International Conference on Engineering of Complex Computer Systems Co-located with Computational Systems Bioinformatics (CSB 2006) Sponsored by: IEEE Computer Society, IEEE Technical Committee on Complexity in Computing NASA Goddard Space Flight Center, NASA Software Engineering Laboratory Stanford University, CA, USA, 10-14 August 2006. With the ever expanding range of computing platforms and applications, system complexity is on the rise. Increasing intelligence and autonomics in today?s systems requires innovative approaches to address these concomitant complexity issues. At this cross-section of volume and complexity, current technologies are often ineffective at coping with the demands for quality computer systems. Manifold dependencies between the critical software, hardware, communications, and human elements now drive computer system and software architectures. Complexity of software systems has grown significantly, pervading several key application areas including Manufacturing, Communications, Transportation, Internet, Entertainment, Mobile, Healthcare, Aerospace, and Energy. These systems are frequently distributed over heterogeneous networks, involving Internet technologies. Inundated by temporal constraints, boundless functionalities, complex algorithms, distributed and mobile architectures, security constraints, reliability, high performance, interoperability, security, and the like, these complexities are further weighing down development and evolution of today?s software systems and ultimately the organizations they serve. The goal of this conference is to assemble industrial, academic and government experts, from a variety of user domains and software disciplines, to examine key complexity problems and effective solutions. Researchers, practitioners, tool developers and users, and technology transition experts are all welcome. The scope of the interest includes long-term research, near-term complex system requirements and promising tools, existing systems, and commercially available tools. Topic Areas: Papers are solicited in all areas related to complex computer-based systems, including the causes of complexity and means of avoiding, controlling, or coping with complexity. Topic areas include, but are not limited to: -System and software architecture and system engineering -Tools, environments, and languages for complex systems -Formal methods and approaches to manage and control complex systems -Integration of heterogeneous technologies -Software and system development and control processes for complex systems -Human factors and collaborative aspects -Interoperability and standardization -Systems and software safety and security -Industrial automation, embedded and/or real time systems -Content production and distribution systems, mobile and multi-channel systems -Software complexity visualization -Virtual environments for managing complexity Paper Submissions: Research papers, case studies, lessons learned, status reports, and discussions of practical problems faced by industry and user domains are all welcome submissions. For review, submissions are divided into two categories: Technical Papers and Experience Reports. Submitted papers should be formatted in the style of IEEE-Computer Society Format: http://www.computer.org/cspress/instruct.htm. Submitted manuscripts must be in English and should be no longer than 4000 words or 10 formatted pages. Authors of accepted papers will be required to sign a copyright release form. IEEE Computer Society Press will publish the proceedings. Submission Procedure: Please email your manuscripts in PDF format to the program chairs listed above. Panels and Special Sections: Proposals (1 page) for organizing panels and special sections should be sent to the general and program chairs via email. In both cases, the list of confirmed people involved should be included. Deadlines - 3 February, 2006 Paper submission - 7 April, 2006 Notification of acceptance - 19 May, 2006 Camera ready papers - 10-14 August, 2006 Conference Committee: General Chair: - Michael G Hinchey, NASA Software Engineering Laboratory, Goddard Space Flight Center, Michael.G.Hinchey@REDACTED Program Co-Chairs - Americas: - Shawn Bohner, Virginia Tech, sbohner@REDACTED - Phil Laplante, Penn State, plaplante@REDACTED Program Co-Chair - Asia: - Zhiming Liu, United Nations University, IIST, Macao, lzm@REDACTED Program Co-Chairs - Europe: - Paolo Nesi, University of Florence, Italy, nesi@REDACTED - Jim Woodcock, University of York, UK, jim@REDACTED Publicity Chair: - Denis Gracanin, Virginia Tech _+_+_+_+_+_+_+_+_+_+ AXMEDIS 2006 Call for Papers _+_+_+_+_+_+_+_+_+_+ 2nd International Conference on Automated Production of Cross Media Content for Multi-channel Distribution, Leeds, UK, 13-15 December 2006. http://www.axmedis.org/axmedis2006 Recommended topics include, but are not limited to the following: * Automatic cross-media production, collection, crawling, composition, formatting, P2P, etc. * Formats and models for multi-channel content distribution * Multimedia standards, e.g. MPEG-7, MPEG-21, DMP, etc. * High quality audio visual coding * Multimedia music representation and formatting * Watermarking and fingerprinting techniques * GRID and distributed systems for content production * real-time streaming media distribution * Multimedia middleware * Workflow management systems * Web services for content distribution * Semantic Web * Distribution with P2P architectures * Legal aspects related to digital content * Collecting and clearing of rights and licences * Business, payment and transaction models * Digital Rights Management (DRM), models tools, and interoperability * Formats and tools for Content Aware * Archives managements for cultural and educational applications * Synchronisation technologies and solutions * Systems and approaches for content production/distribution on demand * Digital content user interface * Digital content accessibility * Novel applications and case-studies of relevant technologies The conference proceedings is to be published by the IEEE Computer Society Press. Selected papers from the conference will be considered for publication in special issues of one or more major peer-reviewed Journals in this domain. - Submission due: 18 March 2006 - Conference date: 13-15 Dec 2006 - Conference venue: University of Leeds, Leeds LS2 9JT, UK ----end---- From bjorn@REDACTED Mon Dec 19 11:10:59 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 19 Dec 2005 11:10:59 +0100 Subject: Atomic ets In-Reply-To: <43A2BB75.5060802@ericsson.com> References: <20051214192903.96220.qmail@web34402.mail.mud.yahoo.com> <43A12268.2030701@ericsson.com> <43A188E8.5000506@telia.com> <43A2BB75.5060802@ericsson.com> Message-ID: Mats Cronqvist writes: > (*) in some cases, such as in the original question, you can serialize > through a server (which will slow you down some). > sometimes i've resorted to this nasty hack; > > erlang:yield(), > foo(), > bla(). > > which'll (probably) make foo and bla atomic (at least as long as > the vm uses reduction counting) And as long the Erlang emulator can not run more than one Erlang process, which is no longer true in the SMP-enabled emulator in R11B. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From mats.cronqvist@REDACTED Mon Dec 19 11:21:01 2005 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Mon, 19 Dec 2005 11:21:01 +0100 Subject: Atomic ets In-Reply-To: References: <20051214192903.96220.qmail@web34402.mail.mud.yahoo.com> <43A12268.2030701@ericsson.com> <43A188E8.5000506@telia.com> <43A2BB75.5060802@ericsson.com> Message-ID: <43A6898D.1010006@ericsson.com> yes, and that would go for the "atomic block" idea too i guess. mats Bjorn Gustavsson wrote: > Mats Cronqvist writes: > > >>(*) in some cases, such as in the original question, you can serialize >>through a server (which will slow you down some). >> sometimes i've resorted to this nasty hack; >> >>erlang:yield(), >>foo(), >>bla(). >> >> which'll (probably) make foo and bla atomic (at least as long as >>the vm uses reduction counting) > > > And as long the Erlang emulator can not run more than one Erlang process, > which is no longer true in the SMP-enabled emulator in R11B. > > /Bjorn From thomasl_erlang@REDACTED Mon Dec 19 15:02:35 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Mon, 19 Dec 2005 06:02:35 -0800 (PST) Subject: Recovery-Oriented Computing (ROC) In-Reply-To: <1134720887.8252.7.camel@hymir.newport-networks.com> Message-ID: <20051219140235.54820.qmail@web34401.mail.mud.yahoo.com> --- Peter-Henry Mander wrote: > Hi Joe, > > It looks very similar to your thesis [1]! > > http://roc.cs.berkeley.edu/ > http://roc.cs.berkeley.edu/roc_overview.html > > Is there something new in the Berkeley approach? My impression is that there has been a number of Berkeley projects that have been transferring/updating technology, techniques and ideas from the telco world to the IP world, and so has Erlang. Ericsson has had a finger in the Berkeley pie too. So maybe this overlap is natural. (A bit strange that Berkeley hasn't heard of Erlang, though.) While there is a bit of commonality, there are some system-level ideas in ROC that are not in Erlang as such, e.g., "undo" of system states, root cause diagnosis of faults, fault injection of various sorts, and possibly a few others. They seem to take an extreme approach to restarts ("micro reboots"), for example. Some of these are arguably not programming-language properties, of course. I guess some of them remain to be proven to be effective too. Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From ernie.makris@REDACTED Mon Dec 19 15:31:07 2005 From: ernie.makris@REDACTED (Ernie Makris) Date: Mon, 19 Dec 2005 09:31:07 -0500 Subject: http protocol In-Reply-To: References: <1134755532.5525.42.camel@home> Message-ID: <43A6C42B.8020306@comcast.net> You may want to take a look at: http://www.snookles.com/erlang/tcpbalance/ chandru wrote: >So you need a http proxy written in erlang. There isn't anything >opensource at the moment. You can try merging the minimal http servers >written by Joe/Sean* and try modifying them to forward requests using >ibrowse. You'll have to read the relevant sections of RFC2616 to see >what parts you have to implement. > >Or you can ask Klacke nicely to see if he'll build proxy support into yaws. > >cheers >Chandru > >[*] Sean Hinde's webserver is called iserve and I think you'll find it >at trapexit.org. Joe Armstrong's webserver is at his website. A quick >search of the erlang mailing list archives should work. > >On 16/12/05, Tony Zheng wrote: > > >>We have installed a Java Web server on Solaris 10 platform and the >>client is POS(windows CE platform) supported HTTP protocol. The >>communication between POS and Java web server should pass through a >>gateway programed by Erlang. That is: >> >>POS client<----->Gateway(Erlang)<----->Java web server >> >>So the Erlang gateway should received a https over TCP/IP using a >>standard URL format like this: >>https://111.222.333.444/test.asp?RecordID=0&........ >> >>I want to program a gateway in server by Erlang, it can get some http >>format request from client and response http format to client. are there >>any samples? >> >>Thanks. >> >>Tony >> >> >> > > > From thomasl_erlang@REDACTED Mon Dec 19 15:33:20 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Mon, 19 Dec 2005 06:33:20 -0800 (PST) Subject: Atomic ets In-Reply-To: <5E3AF7A0-C7C7-4EE3-8260-EA9F1D47337E@dizzyd.com> Message-ID: <20051219143320.1624.qmail@web34408.mail.mud.yahoo.com> --- Dave Smith wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > On Dec 14, 2005, at 12:29 PM, Thomas Lindgren wrote: > > > Note that transactions provide another > conceptually > > simple approach. My prediction is that fine-grain, > > hardware-assisted transactions will largely > replace > > locking in conventional systems. But not for a > while; > > the comp.arch. researchers have just gotten their > > teeth into it. > > If you will humor a Erlang newbie, what exactly is > the difference > between a "transaction" and a mutex/critical > section? OK, first, the comment above referred to mainstream hardware research, not Erlang. I think stock hardware will have support for "basic transactions" in a few years (where you run a delimited segment of code and either "commit" all memory operations or "abort" and discard them). Compared to explicit locking, writing correct code is just so much simpler in this model. Anyway, compared to critical sections, full transactions are also consistent, isolated and durable. A transaction supports (more or less) transparent fine-grain locking of multiple database entries over multiple tables, ensures that the effects are undone if the transaction aborts, etc etc. > And, if the > difference is negligible, wouldn't introducing a > transaction > construct or the other "atomic" ideas mentioned > furthered down the > thread, just (re-)introduce the complexity of all > the locking madness > Erlang currently shields us from? Basically, transactions provide a safe wrapper for the locking and associated operations on a shared memory (or database). Your sanity won't be destroyed by directly gazing at the locking code being executed behind the scenes (cf. Gray, Reuter, TRANSACTION PROCESSING :-). Erlang has less need (or perhaps no need, some may claim) for a shared memory/database, but in practice it seems to creep back in for some purposes. Most of the practical systems I have seen do use mnesia, for example. > The complaints about having to serialize to a > gen_server seem odd to > me (again, a newbie :)). Mutexes introduce a similar > sort of > serialization (i.e. you have to design carefully for > speed/ > contention), yet have much more difficult semantics. Yes, but if you funnel all writes to a table through a server, you "lock the whole table" to, say, update a single entry. I would prefer a more concurrent solution when table operations are common. Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From vlad.xx.dumitrescu@REDACTED Mon Dec 19 15:51:01 2005 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Mon, 19 Dec 2005 15:51:01 +0100 Subject: Atomic ets Message-ID: <11498CB7D3FCB54897058DE63BE3897CF8D4DA@esealmw105.eemea.ericsson.se> > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of > Thomas Lindgren > Yes, but if you funnel all writes to a table through a > server, you "lock the whole table" to, say, update a single > entry. I would prefer a more concurrent solution when table > operations are common. Hi, Please correct me if I'm wrong, but when just updating a row there shouldn't be a big problem since this "lock" is held just briefly. It's possible that most clients won't notice it (this is true for a single CPU, where there's just one execution context running at a given time anyway, right?). Where the problem would be more visible is when doing many/bulk updates to only one part of a table, while others might need to read from unrelated parts. This brings up a (mad?) vision: if Erlang processes had internal threads (or in a equivalent view, several processes shared state), then one could only "lock part of a table" for each one of those. Hmmm, what a can of worms... ;-) /Vlad From thomasl_erlang@REDACTED Mon Dec 19 15:51:26 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Mon, 19 Dec 2005 06:51:26 -0800 (PST) Subject: Atomic ets In-Reply-To: Message-ID: <20051219145126.39983.qmail@web34409.mail.mud.yahoo.com> --- Ulf Wiger wrote: > Den 2005-12-14 20:29:03 skrev Thomas Lindgren > : > > > 5. Introduce a magical new API more suited for > > concurrent/atomic ets. Drawback: it doesn't exist > yet > > :-) > > You'd think that with a functional language, there > should be a way to write code that is verifiably > 'shallow' (no loops, no side effects - or, in this > case, only allowed side effects). This is > essentially, > what we want for the match specifications (replacing > the ms_transform module), for mnesia transactions > (where the manual kindly asks us to write pure code) > and perhaps for atomic ets. If a function could be > tagged as (conditionally) safe, one could offer an > 'atomic' construct and have it execute only such > code. This might be a viable approach; how about permitting pattern matching, guards, and bodies where the only function calls are to BIFs? Receive might be excluded, but case/if should be okay since no loops. Atomicity will have to support abort/undo as well. Nice support for match specifications and associated "codelets" would be great too. Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From thomasl_erlang@REDACTED Mon Dec 19 16:59:36 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Mon, 19 Dec 2005 07:59:36 -0800 (PST) Subject: Atomic ets In-Reply-To: <11498CB7D3FCB54897058DE63BE3897CF8D4DA@esealmw105.eemea.ericsson.se> Message-ID: <20051219155936.46353.qmail@web34403.mail.mud.yahoo.com> --- "Vlad Dumitrescu XX (LN/EAB)" wrote: > Please correct me if I'm wrong, but when just > updating a row there > shouldn't be a big problem since this "lock" is held > just briefly. It's > possible that most clients won't notice it (this is > true for a single > CPU, where there's just one execution context > running at a given time > anyway, right?). Your operation will still have to wait until all preceding table requests are done, regardless of whether they overlap with yours. If these requests arrive at a rate such that the table owner message queue doesn't build up, good. Otherwise, very bad :-) > Where the problem would be more visible is when > doing many/bulk updates > to only one part of a table, while others might need > to read from > unrelated parts. That's one example. > This brings up a (mad?) vision: if Erlang processes > had internal threads > (or in a equivalent view, several processes shared > state), then one > could only "lock part of a table" for each one of > those. > > Hmmm, what a can of worms... ;-) Heh heh, yes indeed :-) Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rrerlang@REDACTED Mon Dec 19 17:40:26 2005 From: rrerlang@REDACTED (Robert Raschke) Date: Mon, 19 Dec 2005 16:40:26 +0000 Subject: Atomic ets In-Reply-To: <20051219145126.39983.qmail@web34409.mail.mud.yahoo.com> Message-ID: Hi, warning, cynicism ahead. Whenever a new email on this thread pops up in my inbox, I check the date. Every single time I think it might be April, 1. If your application uses ets as a communication mechanism between processes, that is surely quite a sore design mistake. Where does this desire for programming with locks come from? Erlang has a much simpler way of dealing with parallelism. But you do have to think about it, it's no use to take a book on PThreads and try to translate the algorithms directly. Programming with locks or atomic regions always makes me think of the chaos that would ensue if there were only one library in the world with exactly one copy of every book and nobody is allowed their own. To read anything you have to go to the library and check out the book you want. Oh, and you're only allowed to write any book by going to the library, checking out an existing book or getting a blank one (if it's a new book). Hang on, we can optimise this. How about you can check out individual chapters, or pages, or lines, or letters ... It would sure save a lot of space ... Robby From ulf.wiger@REDACTED Mon Dec 19 23:51:50 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 19 Dec 2005 23:51:50 +0100 Subject: Atomic ets Message-ID: Robert Raschke wrote: > If your application uses ets as a communication > mechanism between processes, that is surely quite > a sore design mistake. At first sight, perhaps, but not necessarily. > Where does this desire for programming with locks > come from? Erlang has a much simpler way of > dealing with parallelism. But there are issues with using processes too. I have suggested serializing all writes through a gen_server, but still using ets. This has some performance consequences, as Thomas Lindgren has pointed out. They get further compounded if you also pipe the reads through the same process, (also because you get two term copies per read instead of one) and if you don't, you may run into consistency issues if one process writes, while others read. Storing the data in a functional data structure on the process heap solves these issues for the most part, but then, if you have a very large data set, you will be at odds with the garbage collector. > But you do have to think about it, > it's no use to take a book on PThreads and > try to translate the algorithms directly. I can assure you that that's not what's going on here. Recall that Mats C won the Judges' Prize in the Obfuscated Erlang competition, so the guy really knows how to write an Erlang program. (: (Seriously, after some 8 years working with the AXD 301 as programmer, system manager, trouble shooter, profiler, etc., Mats has probably seen quite a few variations on the topic of sharing data between processes.) > Programming with locks or atomic regions always > makes me think of the chaos that would ensue if > there were only one library in the world with > exactly one copy of every book and nobody is > allowed their own. For locks and atomic regions on steroids, check out Simon Peyton Jones' "Composable Memory Transactions" for Haskell. Actually, it's lock- free programming, since all the ugly bits are hidden under the covers. atomic (do { s <- readTVar svar ; writeTVar svar "Wuggle" ; if length s < 10 then throw (AssertionFailed s) else ... } It actually goes a lot further than what Mats has proposed. Perhaps we should too... Now, Erlang ain't Haskell, so it would perhaps be a bit troublesome. /Uffe From jingdingca@REDACTED Tue Dec 20 02:54:27 2005 From: jingdingca@REDACTED (Jing Ding) Date: Mon, 19 Dec 2005 17:54:27 -0800 (PST) Subject: How to do MD5 Message-ID: <20051220015427.44682.qmail@web50514.mail.yahoo.com> I am a beginner in Erlang. So please bear with me. I think there is BIF md5("hi"). But do I need to include any header file, or install any patches? Also what is the equivalent of "print" statement in Erlang? I need it for debugging. The Scenario: --------------------- I have JWchat with Ejabberd on IIS. I got it working with MSSQL. Since our present database users table stores password hash, but Ejabberd only stores plain text password. I am looking into Erlang to see if it has some encryption mechnism. How to call md5() in the .erl file? Need any include file? What syntax? Thanks. __________________________________________________ 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 erlang@REDACTED Tue Dec 20 04:04:18 2005 From: erlang@REDACTED (Michael McDaniel) Date: Mon, 19 Dec 2005 19:04:18 -0800 Subject: Learning Erlang Message-ID: <20051220030418.GB10666@delora.autosys.us> I think it is wonderful that lately there has been more interest in and activity with Erlang; well, so it seems to me! There is a lot to learn about Erlang, and much information available to read and learn with. A quick start can be had by pointing your browser at http://erlang.org/starting.html I have locally installed Erlang and the distribution so have the great documentation available by pointing my browser at: file:///usr/local/lib/erlang/doc/index.html Note that the documentation can be downloaded without installing the complete package at http://erlang.org/download.html. It is also available online at http://erlang.org/starting.html Follows is the index of all the great information that the Erlang/OTP team provides with the distribution. There is much more than this list. For example, the "Applications" expand to even more information. --------------------------------------------------- R10B Glossary | Modules | Index Release highlights Potential incompatibilities Erlang/OTP ?Installation Guide ?System Principles ?Embedded System Erlang Programming ?Getting Started ?Erlang Reference Manual ?Programming Examples ?Efficiency Guide ?Interoperability Tutorial Working with OTP ?Design Principles ?OAM Principles Applications Basic Applications compiler erts sasl stdlib kernel Database Applications Operation & Maintenance Applications Object Request Broker & IDL Applications Interface and Communication Applications Tool Applications http://www.erlang.se --------------------------------------------------- Sometimes I have a difficult time finding just what I need because I do not know what module to use. In those cases I may click on the 'index' and do a search for a function name. Often I find what I need that way, and the module to use. Sometimes I look through the installation directories and code to help learn more about programming in Erlang, or to find neat things I might not have discovered otherwise. The "Erlang Programming" section is excellent, as is all of the documentation. There are books available for Erlang also. Enter "erlang books" into google and you will find references to paper books and online books. All of the above information can help learn Erlang and Functional Programming. A more in-depth study of Functional Programming is available by entering "functional programming books" into google. An excellent classic is "Structure and Interpretation of Computer Programs" by Harold Abelson and Gerald Jay Sussman. Though it uses Lisp (Scheme dialect) for the language, it is a valid tool for the budding Erlang (or other Functional Language) programmer. ISBN 0-262-01153-0 http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=3305 After having read and searched through the documentation there are still occasionally unanswered questions about how to use certain aspects of Erlang. This mailing list is a wonderful resource to help out in those cases (If you're reading this then you already know that part!). Happy Learning! ~Michael -- Michael McDaniel Portland, Oregon, USA http://autosys.us +1 503 283 5284 From bengt.kleberg@REDACTED Tue Dec 20 07:16:13 2005 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 20 Dec 2005 07:16:13 +0100 Subject: How to do MD5 In-Reply-To: <20051220015427.44682.qmail@web50514.mail.yahoo.com> References: <20051220015427.44682.qmail@web50514.mail.yahoo.com> Message-ID: <43A7A1AD.9010509@ericsson.com> On 2005-12-20 02:54, Jing Ding wrote: > > I am a beginner in Erlang. So please bear with me. if you want to you could read up a little on erlang. we have a FAQ: http://www.erlang.org/faq/t1.html Getting Started With Erlang: http://www.erlang.se/doc/doc-5.4.10/doc/getting_started/part_frame.html he book Concurrent Programming in Erlang, ISBN 0-13-285792-8, 2nd edition. The first part of the book is available http://www.erlang.org/download/erlang-book-part1.pdf > I think there is BIF md5("hi"). But do I need to include any header > file, or install any patches? Also what is the equivalent of "print" > statement in Erlang? I need it for debugging. the md5 function is available in the crypto module: http://www.trapexit.org/docs/man_page.yaws?page=man_R10B-7/man3/crypto.3 no header, nor patch, necessary. to ''print'' you can use fwrite() in the io module: http://www.trapexit.org/docs/man_page.yaws?page=man_R10B-7/man3/io.3 for debugging without the source it could be simpler to use the dbg module: http://www.trapexit.org/docs/man_page.yaws?page=man_R10B-7/man3/dbg.3 bengt From thomas.arts@REDACTED Tue Dec 20 07:38:09 2005 From: thomas.arts@REDACTED (Thomas Arts) Date: Tue, 20 Dec 2005 07:38:09 +0100 Subject: Erlang Christmas Cup Message-ID: <43A7A6D1.5020407@ituniv.se> Erlang Christmas Cup 2005 Print On Wednesday Dec 21th, a local, unofficial Robocup simulation league competition will be held at the IT University of G?teborg. There are 4-6 participating teams, designed and implemented by 2nd year students at the Software Engineering and Management programme. All teams have been designed using the Promethetus process (a software process for agent design), and implemented in Erlang. Some teams have been implemented using the agent platform described in C. Varela Paz, et al., On Modelling Agent Systems with Erlang, Erlang Workshop 2004, other have been implemented using platforms inspired by that paper. You are most welcome to view the games: either through our web-cast of the event, or on the spot. (Please register.) A tournament plan, instructions for viewing the event through the web-cast, and registration info may be found at www.ituniv.se/program/sem/PUBLIC_EVENTS/ If you want to visit the games in person, come to the IT University. ( www.ituniv.se/program/sem_research/ -> Directions ) and say ?Erlang Christmas Cup? at the reception. (Please register in advance.) From irmatov@REDACTED Tue Dec 20 07:49:01 2005 From: irmatov@REDACTED (Timur Irmatov) Date: Tue, 20 Dec 2005 11:49:01 +0500 Subject: How to do MD5 In-Reply-To: <43A7A1AD.9010509@ericsson.com> References: <20051220015427.44682.qmail@web50514.mail.yahoo.com> <43A7A1AD.9010509@ericsson.com> Message-ID: <241d382f0512192249p6b3f5f66t20ede19dcc4744a2@mail.gmail.com> On 12/20/05, Bengt Kleberg wrote: > > I think there is BIF md5("hi"). But do I need to include any header > > file, or install any patches? Also what is the equivalent of "print" > > statement in Erlang? I need it for debugging. > > the md5 function is available in the crypto module: > http://www.trapexit.org/docs/man_page.yaws?page=man_R10B-7/man3/crypto.3 There are also BIFs that compute md5 in standard erlang module: http://erlang.se/doc/doc-5.4.12/lib/kernel-2.10.12/doc/html/index.html -- Timur Irmatov, xmpp:thor@REDACTED From tedi_heriyanto@REDACTED Tue Dec 20 08:29:53 2005 From: tedi_heriyanto@REDACTED (Tedi Heriyanto) Date: Mon, 19 Dec 2005 23:29:53 -0800 (PST) Subject: How to do MD5 In-Reply-To: <43A7A1AD.9010509@ericsson.com> Message-ID: <20051220072953.56792.qmail@web53506.mail.yahoo.com> --- Bengt Kleberg wrote: > the md5 function is available in the crypto module: http://www.trapexit.org/docs/man_page.yaws?page=man_R10B-7/man3/crypto.3 > no header, nor patch, necessary. In addition to what Bengt has said, you may want to take a look at the following message thread. It discussed how to generate MD5 hash like md5sum program : http://www.erlang.org/ml-archive/erlang-questions/200303/msg00492.html cheers, tedi __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From matthias@REDACTED Tue Dec 20 09:15:15 2005 From: matthias@REDACTED (Matthias Lang) Date: Tue, 20 Dec 2005 09:15:15 +0100 Subject: Atomic ets In-Reply-To: References: <20051219145126.39983.qmail@web34409.mail.mud.yahoo.com> Message-ID: <17319.48531.247039.172074@antilipe.corelatus.se> Robert Raschke writes: > If your application uses ets as a communication mechanism between > processes, that is surely quite a sore design mistake. Looking at a freshly started erlang node, I can see a number of ETS tables: 1> ets:all(). [ac_tab, inet_db, inet_hosts, file_io_servers, inet_cache, global_names_ext, global_locks, global_names, 10, 9] In some (many? most?) cases, ETS seems to have been used for no particularly good reason at all. For example: inet_db is a gen_server which uses an ets table (inet_db) to store its 20 configuration/environment parameters. The only explanation I can think of is "it must be historical junk". Or am I missing something? Matthias From bjorn.ericsson@REDACTED Tue Dec 20 09:34:29 2005 From: bjorn.ericsson@REDACTED (=?iso-8859-1?Q?Ericsson=2C_Bj=F6rn?=) Date: Tue, 20 Dec 2005 09:34:29 +0100 Subject: Decoding bitmask? Message-ID: Hello! I'm working on decoding a binary message. The first variables are Mandatory, so they are easy to decode. The last of the mandatory variables is an 16 bit option mask where each bit corresponds to an optional variable that might follow directly after the OptionMask. How can I decode this OptionMask, and then parse the optional variables, in the cleanest and most "Erlang optimized" way? <> = Message, etc... /BE This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From karol.skocik@REDACTED Mon Dec 19 16:19:42 2005 From: karol.skocik@REDACTED (karol) Date: Mon, 19 Dec 2005 16:19:42 +0100 Subject: newbie SNMP question References: Message-ID: <20051219151942.E3DCE43A23@bang.trapexit.org> Hi, thank you for reply. I called snmpm and snmpa the "core" modules, because they make interface to the SNMP functionality, and they are also used in examples. They seems to be not loaded by default and it took me a while to figure that out. Have a nice day, Karol _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From karol.skocik@REDACTED Mon Dec 19 16:59:27 2005 From: karol.skocik@REDACTED (karol) Date: Mon, 19 Dec 2005 16:59:27 +0100 Subject: newbie SNMP question References: Message-ID: <20051219155927.3FA3759091@bang.trapexit.org> Hi, I was checking the snmp_mgr_tests.erl example in SNMP dir. I don't understand where the snmp_mgr package (module ?) comes from, because I could not find any code making such module. Thank you, Karol _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From ulf.wiger@REDACTED Tue Dec 20 09:59:04 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 20 Dec 2005 09:59:04 +0100 Subject: Atomic ets Message-ID: > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Matthias Lang > Sent: den 20 december 2005 09:15 > To: Robert Raschke > Cc: erlang-questions@REDACTED > Subject: Re: Atomic ets > > Robert Raschke writes: > > > If your application uses ets as a communication mechanism > between > processes, that is surely quite a sore design mistake. Note the wording "ets as a communication mechanism" > Looking at a freshly started erlang node, I can see a number of ETS > tables: > > 1> ets:all(). > [ac_tab, > inet_db, > inet_hosts, > file_io_servers, > inet_cache, > global_names_ext, > global_locks, > global_names, > 10, > 9] I have a fair idea of what most of these do, and I don't think any of them use ets as a communication mechanism, but rather as an internal storage structure. > In some (many? most?) cases, ETS seems to have been used for > no particularly good reason at all. For example: inet_db is a > gen_server which uses an ets table (inet_db) to > store its 20 configuration/environment parameters. I couldn't say what the scaling potential of inet_db is. Can you? BTW, 20 items used to be roughly the break-even point between a list and ets. After that, ets was superior for random access. > The only explanation I can think of is "it must be > historical junk". Or am I missing something? It's probably mainly historical, since dict, gb_trees, etc didn't always exist. But also, choosing ets is convenient - and you know it's going to scale up towards massive amounts of data (remember, the GC didn't use to be that great with large process heaps...) It's not always obviously better to use a functional data structure, since you get the hassle of carrying it around all the time + handling repeated updates of a functional structure easily gets you into numbered variables (X1 = ..., X2 = ..., .... X11=...), which are a pain to keep track of, and can lead to very subtle bugs. Having said this, I tend to use functional data structures as much as I can nowadays. I think it's usually worth it, and after a while, I think you learn how to program around the most common pitfalls. Perhaps we should have a tutorial on how to best use functional data structures? /Uffe From bengt.kleberg@REDACTED Tue Dec 20 10:03:41 2005 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 20 Dec 2005 10:03:41 +0100 Subject: Atomic ets In-Reply-To: References: Message-ID: <43A7C8ED.2020403@ericsson.com> On 2005-12-20 09:59, Ulf Wiger (AL/EAB) wrote: ...deleted > is. Can you? BTW, 20 items used to be roughly the > break-even point between a list and ets. After that, > ets was superior for random access. is this still true? what would the number be for the list alternatives (dict, gb_trees, etc)? bengt From rrerlang@REDACTED Tue Dec 20 11:17:22 2005 From: rrerlang@REDACTED (Robert Raschke) Date: Tue, 20 Dec 2005 10:17:22 +0000 Subject: Atomic ets In-Reply-To: Message-ID: Ulf Wiger wrote: > Robert Raschke wrote: > >> Where does this desire for programming with locks >> come from? Erlang has a much simpler way of >> dealing with parallelism. > > But there are issues with using processes too. > I have suggested serializing all writes through > a gen_server, but still using ets. This has > some performance consequences, as Thomas Lindgren > has pointed out. They get further compounded if > you also pipe the reads through the same process, > (also because you get two term copies per read > instead of one) and if you don't, you may run into > consistency issues if one process writes, while > others read. > > Storing the data in a functional data structure > on the process heap solves these issues for the > most part, but then, if you have a very large > data set, you will be at odds with the garbage > collector. I can understand the problems you get once you decide to go down the route of shared storage between parallel tasks. I guess I myself would find it way too complicated. My approach to dealing with shared storage is to use one of the two technologies that have solved this problem: databases or file systems. I am lazy. In my mind, if you want to have a parallel application, then any kind of shared storage creates a bottleneck. You can whittle away all you like it will remain a limiting factor. Granted, the opposite approach of message passing and local storage has the overhead of copying lots of data. So, you have the choice of being limited by access to storage or duplication of storage. I'm guessing that quantum computing will try to address this particular problem, amongst others. But back to atomic ets. Implementing such a thing would bring you halfway toward mnesia, wouldn't it? Maybe it would be a nice tutorial on how start writing a database system. Robby From Rupert.Meese@REDACTED Tue Dec 20 11:25:48 2005 From: Rupert.Meese@REDACTED (Rupert Meese) Date: Tue, 20 Dec 2005 10:25:48 +0000 Subject: Prolog interface and ASCII parsing Message-ID: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.wiger@REDACTED Tue Dec 20 11:42:10 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 20 Dec 2005 11:42:10 +0100 Subject: Atomic ets Message-ID: Bengt Kleberg wrote: > is this still true? Don't know. Some very naiive measurements indicated that the break-even point on my SunBLADE is about 90 elements (comparing worst-case lists:keysearch() with ets:lookup(), which is probably not a fair comparison. The outcome is probably dependent on hardware architecture. > what would the number be for the list alternatives (dict, > gb_trees, etc)? That depends on what you're doing. And it also depends on gc cost, which requires a much more ambitious benchmark to get a handle on. The worst-case cost for a gb_trees: lookup seemed to equal ets:lookup() at around 900 elements, but that's of course also assuming that you're not going to pass the data around. I once wrote an erlang library that was fully API-compatible with ets (including named tables). It was up to 30x slower than ets, but the cost was almost totally driven by the adaptations to the ets API. The back-end storage mechanism could even be faster in some cases. I'd say that the main reason for having different access structure implementations is that they have different semantics and are good at different things. Spend some time getting acquainted with the available alternatives. Each one should have a section in the manual about what it's good for, and how well it scales. How well the different solutions stack up in this regard (the documented characteristics) varies: - gb_sets: excellent Complexity note with examples - gb_trees: well, it does say that it's logarithmic - lists: says nothing, but perhaps it doesn't need to? - sets: only says that the representation (and, I gather, also the complexity?) is undefined. - dict: same as for sets. - ets: briefly explains the characteristics of set and ordered_set /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Bengt Kleberg > Sent: den 20 december 2005 10:04 > To: erlang-questions@REDACTED > Subject: Re: Atomic ets > > On 2005-12-20 09:59, Ulf Wiger (AL/EAB) wrote: > ...deleted > > is. Can you? BTW, 20 items used to be roughly the break-even point > > between a list and ets. After that, ets was superior for random > > access. > > > > bengt > > From ulf.wiger@REDACTED Tue Dec 20 11:52:28 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 20 Dec 2005 11:52:28 +0100 Subject: Atomic ets Message-ID: Robert Raschke: > I can understand the problems you get once you > decide to go down the route of shared storage > between parallel tasks. I In many cases, it's not really shared storage, but data that some process actually owns and controls. A typical example of this is a resource handler. > guess I myself would find it way too complicated. > My approach to dealing with shared storage is to > use one of the two technologies that have solved this > problem: databases or file systems. I am lazy. Of course, both will incur tremendous overhead compared to ets. ;-) > In my mind, if you want to have a parallel application, > then any kind of shared storage creates a bottleneck. > You can whittle away all you like it will remain a > limiting factor. In the applications for which Erlang was initially designed (telecoms), this type of bottleneck is more or less unavoidable, since you need to have some entity that keeps track of what hardware resources are allocated, and for what. One of the most common patterns is client-server. > Granted, the opposite approach of message passing > and local storage has the overhead of copying lots > of data. Not necessarily. (: In both "shared heap erlang" and "hybrid heap erlang", (local) message passing is mostly done by reference rather than by value. > So, you have the choice of being limited by access > to storage or duplication of storage. Again, not necessarily duplication in the local case -- se above. > But back to atomic ets. Implementing such a thing > would bring you halfway toward mnesia, wouldn't it? Sort of, yes. It would probably address a fairly large portion of data manipulation where one would otherwise choose mnesia. /Uffe From bjorn@REDACTED Tue Dec 20 13:52:03 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 20 Dec 2005 13:52:03 +0100 Subject: Atomic ets In-Reply-To: References: Message-ID: "Ulf Wiger \(AL/EAB\)" writes: > Bengt Kleberg wrote: > > is this still true? > > Don't know. Some very naiive measurements indicated that > the break-even point on my SunBLADE is about 90 elements > (comparing worst-case lists:keysearch() with ets:lookup(), > which is probably not a fair comparison. Note that lists:keysearch/3 is a BIF implemented in C, that is the speed of it is not typical for list-based data structures. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bjorn@REDACTED Tue Dec 20 14:06:43 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 20 Dec 2005 14:06:43 +0100 Subject: Atomic ets In-Reply-To: References: Message-ID: "Ulf Wiger \(AL/EAB\)" writes: > In both "shared heap erlang" and "hybrid heap erlang", > (local) message passing is mostly done by reference > rather than by value. Talking about the hybrid heap erlang, I can mention that it is now quite stable in the latest R10B releases and worth trying out. Note, however, that garbage collection of the shared message area is still a "stop-the-world" type of GC. The HiPE group is working on an incremental GC for the message area, and it will probably be included in R11B. Use erl -hybrid to start the hybrid heap emulator. The shared heap emulator will be discontinued. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From ulf.wiger@REDACTED Tue Dec 20 15:14:55 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 20 Dec 2005 15:14:55 +0100 Subject: Atomic ets Message-ID: Bjorn Gustavsson: > Note that lists:keysearch/3 is a BIF implemented > in C, that is the speed of it is not typical for > list-based data structures. I can only blame my oversight on "winter vomiting bug", which is keeping me home today. (: /Uffe From nm@REDACTED Tue Dec 20 13:55:06 2005 From: nm@REDACTED (Gaspar Chilingarov) Date: Tue, 20 Dec 2005 16:55:06 +0400 (AMT) Subject: generic cache manager? Message-ID: <54117.195.250.88.228.1135083306.squirrel@www.web.am> Hi there! Are there any module, which provides generic caching functions -- with ability to do positive and negative hit caching? For example, I have several modules which fetch data from remote nodes, and I wish to cache call results for a some time. I've looked in jungerl, but found nothing, may be I'm missing something? -- Gaspar Chilingarov System Administrator t +37491 419763 w www.netter.am e nm@REDACTED From klacke@REDACTED Tue Dec 20 16:54:31 2005 From: klacke@REDACTED (klacke) Date: Tue, 20 Dec 2005 16:54:31 +0100 Subject: gen_server without gen_server References: Message-ID: <20051220155431.5681759094@bang.trapexit.org> Quick question, Where is the code sample which shows a gen_server without the gen_server code. I.e a normal selective receive process which responds to "system" messages ? /klacke _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From david.nospam.hopwood@REDACTED Tue Dec 20 17:35:03 2005 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Tue, 20 Dec 2005 16:35:03 +0000 Subject: Atomic ets In-Reply-To: References: Message-ID: <43A832B7.8050402@blueyonder.co.uk> Robert Raschke wrote: > I can understand the problems you get once you decide to go down the > route of shared storage between parallel tasks. I guess I myself > would find it way too complicated. My approach to dealing with shared > storage is to use one of the two technologies that have solved this > problem: databases or file systems. I am lazy. > > In my mind, if you want to have a parallel application, then any kind > of shared storage creates a bottleneck. You can whittle away all you > like it will remain a limiting factor. > > Granted, the opposite approach of message passing and local storage > has the overhead of copying lots of data. Not necessarily: immutable data can be stored in shared memory as an implementation detail. There is some overhead associated with using persistent/immutable data structures as opposed to mutable structures, but this is still a good approach for many applications (and you can still use mutable structures within a process). -- David Hopwood From ulf.wiger@REDACTED Tue Dec 20 18:12:23 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 20 Dec 2005 18:12:23 +0100 Subject: gen_server without gen_server Message-ID: In the Design Principles document: http://erlang.se/doc/doc-5.4.12/doc/design_principles/spec_proc.html#6.2 plain_fsm in jungerl has a support library with callbacks for the system messages. If you've started a process with one of the plain_fsm start functions, you can call plain_fsm:handle_system_msg(Req, From, State, fun/1) where the last argument is your continuation fun, getting the possibly updated state as the argument. This might be a handy solution if you don't care to do anything special with the system messages. (I have an improved plain_fsm - not yet released. If you want to take it for a spin, let me know.) /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of klacke > Sent: den 20 december 2005 16:55 > To: erlang-questions@REDACTED > Subject: gen_server without gen_server > > > Quick question, > > Where is the code sample which shows a gen_server without the > gen_server code. I.e a normal selective receive process which > responds to "system" messages ? > > /klacke > _________________________________________________________ > Sent using Mail2Forum (http://m2f.sourceforge.net) > From brian@REDACTED Tue Dec 20 18:17:44 2005 From: brian@REDACTED (Brian Buchanan) Date: Tue, 20 Dec 2005 09:17:44 -0800 (PST) Subject: gen_server without gen_server In-Reply-To: <20051220155431.5681759094@bang.trapexit.org> References: <20051220155431.5681759094@bang.trapexit.org> Message-ID: <20051220091523.C23769@mail.ncircle.com> On Tue, 20 Dec 2005, klacke wrote: > > Quick question, > > Where is the code sample which shows a gen_server without the gen_server > code. I.e a normal selective receive process which responds to "system" > messages ? klacke, Check out section 6.2: Special Processes in the OTP Design Principles document. http://erlang.se/doc/doc-5.4.12/doc/design_principles/part_frame.html - Brian From erlang@REDACTED Tue Dec 20 18:25:38 2005 From: erlang@REDACTED (Michael McDaniel) Date: Tue, 20 Dec 2005 09:25:38 -0800 Subject: generic cache manager? In-Reply-To: <54117.195.250.88.228.1135083306.squirrel@www.web.am> References: <54117.195.250.88.228.1135083306.squirrel@www.web.am> Message-ID: <20051220172537.GE10666@delora.autosys.us> On Tue, Dec 20, 2005 at 04:55:06PM +0400, Gaspar Chilingarov wrote: > Hi there! > > Are there any module, which provides generic caching functions -- > with ability to do positive and negative hit caching? > > For example, I have several modules which fetch data from remote nodes, and I > wish to cache call results for a some time. > > I've looked in jungerl, but found nothing, may be I'm missing something? > > -- > Gaspar Chilingarov > System Administrator > > t +37491 419763 > w www.netter.am > e nm@REDACTED > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Not exactly generic, but a basic version of what I do is below. I only need one day granularity; that is easily adjusted if needed. I store the results in mnesia along with a calendar:universal_time() date. To check how old a new candidate is, I use 1) Lookup candidate in mnesia and if found, check date with old/1 (below). 2) If candidate is not in mnesia, it is stale; insert it for next time. old(Date) -> F = #freshness{} , T1 = calendar:datetime_to_gregorian_seconds(calendar:universal_time()) , T2 = calendar:datetime_to_gregorian_seconds( Date ) , OneDayOfSeconds = 86400 , if ((T1 - T2) / OneDayOfSeconds) > F#freshness.maxdays -> stale ; true -> fresh end . Maybe distributed mnesia would work for your application and then the fresh/stale test could be done on each node. ~Michael -- Michael McDaniel Portland, Oregon, USA http://autosys.us +1 503 283 5284 From jingdingca@REDACTED Tue Dec 20 18:40:52 2005 From: jingdingca@REDACTED (Jing Ding) Date: Tue, 20 Dec 2005 09:40:52 -0800 (PST) Subject: How to include Crypto In-Reply-To: <20051220015427.44682.qmail@web50514.mail.yahoo.com> Message-ID: <20051220174052.66391.qmail@web50502.mail.yahoo.com> To use this Crypto Module, in my ejabberd_auth_odbc.erl, what is the syntax to include Crypto module? Or IO module? I didn't find any example. Thanks. Jing __________________________________________________ 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 sean.hinde@REDACTED Tue Dec 20 19:08:50 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Tue, 20 Dec 2005 18:08:50 +0000 Subject: How to include Crypto In-Reply-To: <20051220174052.66391.qmail@web50502.mail.yahoo.com> References: <20051220174052.66391.qmail@web50502.mail.yahoo.com> Message-ID: On 20 Dec 2005, at 17:40, Jing Ding wrote: > To use this Crypto Module, in my ejabberd_auth_odbc.erl, what is > the syntax to include Crypto module? Or IO module? I didn't find > any example. There is no special syntax to include a module. It will be loaded if required. To call a function in a specific module the syntax is: module:function(Args). e.g. erlang:md5("string"). or crypto:md5("string"). Sean > > Thanks. > > Jing > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com From matthias@REDACTED Tue Dec 20 20:38:08 2005 From: matthias@REDACTED (Matthias Lang) Date: Tue, 20 Dec 2005 20:38:08 +0100 Subject: Atomic ets In-Reply-To: References: Message-ID: <17320.23968.591567.389229@antilipe.corelatus.se> Robert>>> If your application uses ets as a communication mechanism Robert>>> between processes, that is surely quite a sore design mistake. Ulf> Note the wording "ets as a communication mechanism" Matthias> inet_db, > I have a fair idea of what most of these do, and > I don't think any of them use ets as a communication > mechanism, but rather as an internal storage structure. You're most likely correct: it doesn't quite fit Robbie's description. But it's just as pretty: an "internal storage structure" which happens to be publically writeable and named, just ready for someone to, um, communicate with it. Matthias From robert.virding@REDACTED Tue Dec 20 22:14:44 2005 From: robert.virding@REDACTED (Robert Virding) Date: Tue, 20 Dec 2005 22:14:44 +0100 Subject: Atomic ets In-Reply-To: References: Message-ID: <43A87444.7080708@telia.com> Ulf Wiger (AL/EAB) wrote: >How well the different solutions stack up in this >regard (the documented characteristics) varies: > >- gb_sets: excellent Complexity note with examples >- gb_trees: well, it does say that it's logarithmic >- lists: says nothing, but perhaps it doesn't need to? >- sets: only says that the representation (and, I > gather, also the complexity?) is undefined. >- dict: same as for sets. >- ets: briefly explains the characteristics of set > and ordered_set > > Sets and dict both use the same algorithm internally as ets. It is a truly wonderful algorithm that I found but did not invent, though I wish that I had. Both have relatively constant access times up to about 2-3000 elements and then they degrade gracefully. Or at least they should. I personally thing that the dict interface is better and more consistent than ets, but as I wrote it that is not surprising. Robert From ulf@REDACTED Wed Dec 21 08:13:57 2005 From: ulf@REDACTED (Ulf Wiger) Date: Wed, 21 Dec 2005 08:13:57 +0100 Subject: Atomic ets In-Reply-To: <43A87444.7080708@telia.com> References: <43A87444.7080708@telia.com> Message-ID: Den 2005-12-20 22:14:44 skrev Robert Virding : > Sets and dict both use the same algorithm internally as ets. It is a > truly wonderful algorithm that I found but did not invent, though I wish > that I had. Both have relatively constant access times up to about > 2-3000 elements and then they degrade gracefully. Or at least they > should. Yes. This should be described in the manual. I think that rather than writing that the representation is undefined (which, I think, is probably always incorrect), one could write that the representation is an internal implementation detail, and as such, subject to change. > I personally thing that the dict interface is better and > more consistent than ets, but as I wrote it that is not > surprising. I agree. I use dict a lot. /Uffe -- Ulf Wiger From ulf@REDACTED Wed Dec 21 08:39:35 2005 From: ulf@REDACTED (Ulf Wiger) Date: Wed, 21 Dec 2005 08:39:35 +0100 Subject: Atomic ets In-Reply-To: <17320.23968.591567.389229@antilipe.corelatus.se> References: <17320.23968.591567.389229@antilipe.corelatus.se> Message-ID: Den 2005-12-20 20:38:08 skrev Matthias Lang : > > Robert>>> If your application uses ets as a communication mechanism > Robert>>> between processes, that is surely quite a sore design mistake. > > Ulf> Note the wording "ets as a communication mechanism" > > Matthias> inet_db, > > > I have a fair idea of what most of these do, and > > I don't think any of them use ets as a communication > > mechanism, but rather as an internal storage structure. > > You're most likely correct: it doesn't quite fit Robbie's description. > > But it's just as pretty: an "internal storage structure" which > happens to be publically writeable and named, just ready for someone > to, um, communicate with it. Yes, even though not all of those tables are publicly writeable: 2> I = fun(T,A) -> ets:info(T,A) end. #Fun 3> IL = fun(T,As) -> [I(T,A) || A <- As] end. #Fun 4> [{T,IL(T,[name,named_table,protection])} || T <- ets:all()]. [{global_names_ext,[global_names_ext,true, protected]}, {global_locks, [global_locks, true, protected]}, {global_names, [global_names, true, protected]}, {ac_tab, [ac_tab, true, public]}, {inet_db, [inet_db, true, public]}, {inet_hosts, [inet_hosts, true, public]}, {file_io_servers, [file_io_servers, true, protected]}, {inet_cache, [inet_cache, true, public]}, {11, [shell_records, false,public]}, {10, [code_names, false,private]}, {9, [code, false,private]}] 5> It's not obvious to me why e.g. ac_tab should be public. All updates to the table, except one, are done from the application_controller process, and it seems as if the insertion of the {sync_dacs, ok} object from the dist_ac process is merely a way of piggy-backing on the application_controller table. This particular object is also used as a sort of semaphor for the permit_application functionality(*) (which, with 20-20 hindsight, should never have been included in the first place.) If we ever get an application_controller overhaul, at least I vote for excluding permit_application entirely. And if any of you out there are using it, please don't. (: So I agree - when using ets, one is often tempted to make the code 'dirtier' than it needs to be, while using functional data structures tends to impose some modicum of discipline on the programmer (if nothing else, because the opportunities to mess things up are more limited.) /Uffe (*) In other words, I was mistaken. -- Ulf Wiger From sean.hinde@REDACTED Tue Dec 20 16:56:50 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Tue, 20 Dec 2005 15:56:50 +0000 Subject: gen_server without gen_server In-Reply-To: <20051220155431.5681759094@bang.trapexit.org> References: <20051220155431.5681759094@bang.trapexit.org> Message-ID: <958D8920-FDEA-4293-877C-6F87321A4F85@mac.com> OTP design principles -> 6 Sys and Proc_Lib Sean On 20 Dec 2005, at 15:54, klacke wrote: > > Quick question, > > > > Where is the code sample which shows a gen_server without the > gen_server code. I.e a normal selective receive process which > responds to "system" messages ? > > > > /klacke > _________________________________________________________ > Sent using Mail2Forum (http://m2f.sourceforge.net) From karol.skocik@REDACTED Tue Dec 20 17:01:00 2005 From: karol.skocik@REDACTED (karol) Date: Tue, 20 Dec 2005 17:01:00 +0100 Subject: usmStatsNotInTimeWindows in latest SNMP (4.6.1) References: Message-ID: <20051220160101.1EBEC5911E@bang.trapexit.org> Hi guys, I need your help with the latest SNMP. Currently there are no user modules loaded, so it is "just" the skelet - using snmpm_user_default module. What makes me trouble is simple get request like this : snmpm:g("karol", {127,0,0,1}, 4000, [[1,3,6,1,2,1,1,5,0]]). I get this error : =INFO REPORT==== 20-Dec-2005::16:48:22 === SNMPM default user callback received handle_error: ReqId: -1 Reason: {failed_processing_message, {securityError,usmStatsNotInTimeWindows}} UserData: undefined ** SNMP M-SERVER LOG: received sync_timeout [677490657] message ** SNMP M-SERVER TRACE: handle_sync_timeout -> entry with ReqId: 677490657 From: {<0.31.0>,#Ref<0.0.0.1867>} ** SNMP M-SERVER DEBUG: handle_sync_timeout -> deliver reply (timeout) and demonitor: Monref: #Ref<0.0.0.1875> From: {<0.31.0>,#Ref<0.0.0.1867>} {error,{timeout,677490657}} with more tracing I can dig the output and find this : ** SNMP A-NET-IF A-USM TRACE: authenticate_incoming -> 3.2.6 ** SNMP A-NET-IF A-USM TRACE: is_auth -> retrieve EngineBoots and EngineTime: 3.2.7 ** SNMP A-LOCAL-DB LOG: variable get: snmpEngineID ** SNMP A-NET-IF A-USM TRACE: is_auth -> SnmpEngineID: "md's engine" ** SNMP A-NET-IF A-USM TRACE: is_auth -> we are authoritative: 3.2.7a ** SNMP A-LOCAL-DB LOG: variable get: snmpEngineBoots ** SNMP A-NET-IF A-USM TRACE: is_auth -> SnmpEngineBoots: 15 ** SNMP A-NET-IF A-USM INFO: NOT in time window: SecName: "initial" SnmpEngineBoots: 15 MsgAuthEngineBoots: 13 SnmpEngineTime: 149 MsgAuthEngineTime: 148 ** SNMP A-NET-IF MPD TRACE: message processing result: {error,usmStatsNotInTimeWindows, {{varbind,[1,3,6,1,6,3,15,1,1,2,0],'Counter32',3,undefined}, "initial", [{securityLevel,1}]}} ** SNMP A-NET-IF MPD DEBUG: security module result when reportable [7.2.6-a]: Reason: usmStatsNotInTimeWindows ErrorInfo: {{varbind,[1,3,6,1,6,3,15,1,1,2,0],'Counter32',3,undefined}, "initial", [{securityLevel,1}]} >From the docs I have found (like this one : http://www.adventnet.com/products/cagent/help/troubleshoot/c_troubleshoot_snmp.html) that this should occur only once, and then the other requests should be ok. But this is not my case. Anybody has some ideas what to do or what to set? They will be very helpfull. Thank you, Karol _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From vipin@REDACTED Wed Dec 21 12:15:10 2005 From: vipin@REDACTED (vipin) Date: Wed, 21 Dec 2005 16:45:10 +0530 Subject: ssl handshake failure. Message-ID: <43A9393E.8080007@picopeta.com> Hi folks, I'm facing the following error when a C-client tries to connect an Erlang server. on Client Side : ************************************************************* $ ./cclient 202.62.79.138 5000 SSL connection using DES-CBC3-MD5 Details of Server certificate: subject: /CN=server/OU=Erlang OTP/O=Ericsson AB/C=SE/L=Stockholm/emailAddress=peter@REDACTED issuer: /CN=otpCA/OU=Erlang OTP/O=Ericsson AB/C=SE/L=Stockholm/emailAddress=peter@REDACTED Status of the cert = 0 1962:error:1407F0E5:SSL routines:SSL2_WRITE:ssl handshake failure:s2_pkt.c:428: ************************************************************* Where as server stucks on ssl:accept(LSock). Here is the server code : ================ %%%%%%%%%%%%%%%%%%%%%%%%%% start_server() -> application:start(ssl), ssl:seed("pouslkjdfskdnfsowewasd"), Dir = filename:join([code:lib_dir(ssl), "examples", "certs", "etc"]), io:format("Dir : ~p~n",[Dir]), Role="server", io:format("Before ssl:listen~n"), case ssl:listen(?server_port, [binary, {packet, 0},{active, false}, {verify, 2}, {depth, 2}, {cacertfile, filename:join([Dir, Role, "cacerts.pem"])}, {certfile, filename:join([Dir, Role, "cert.pem"])}, {keyfile, filename:join([Dir, Role, "key.pem"])}]) of {ok, ListenSock} -> spawn(tcpserver, listen_request, [ListenSock]); Other -> io:format("Can't listen to socket ~p~n", [Other]) end. listen_request(LSock)-> io:format("in listen request , LSock : ~p~n",[LSock]), case ssl:accept(LSock) of {ok, Socket} -> Pid= spawn(tcpserver, logon_client,[Socket]), listen_request(LSock); {error, Reason} -> io:format("Error : Reason - ~p~n",[Reason]), listen_request(LSock) end. %%%%%%%%%%%%%%%%%%%%%%%%%% And Client code =========== /////////////////////////////////////////////////////////////////////////////// #define CHK_NULL(x) if ((x)==NULL) exit (1) #define CHK_ERR(err,s) if ((err)==-1) { perror(s); exit(1); } #define CHK_SSL(err) if ((err)==-1) { ERR_print_errors_fp(stderr); exit(2); } void init_ssl (void){ SSLeay_add_ssl_algorithms (); meth = SSLv2_client_method (); SSL_load_error_strings (); ctx = SSL_CTX_new (meth); CHK_NULL (ctx); } int open_conxn_to_serv (void){ int sock = socket (AF_INET, SOCK_STREAM, 0); struct sockaddr_in serv_addr; int ret_conn = 0; X509* server_cert; char* str; if (sock < 0){ printf("sock < 0\n"); return (sock); } serv_addr.sin_family = AF_INET; serv_addr.sin_addr.s_addr = inet_addr (serv_ip); serv_addr.sin_port = htons (serv_port); ret_conn = connect (sock, (struct sockaddr *) &serv_addr, sizeof (serv_addr)); if (ret_conn < 0){ printf("ret_conn < 0\n"); perror ("open_conxn_to_server:Failed to connect :..."); close (sock); return (-1); } serv_ssl = SSL_new (ctx); CHK_NULL (serv_ssl); SSL_set_fd (serv_ssl, sock); SSL_connect (serv_ssl); CHK_SSL(ret_conn); server_cert = SSL_get_peer_certificate (serv_ssl); CHK_NULL(server_cert); printf ("Details of Server certificate:\n"); str = X509_NAME_oneline (X509_get_subject_name(server_cert),0,0); CHK_NULL(str); printf ("\t subject: %s\n", str); free (str); str = X509_NAME_oneline (X509_get_issuer_name(server_cert),0,0); CHK_NULL(str); printf ("\t issuer: %s\n", str); free (str); X509_STORE_CTX ctx; int i; X509_STORE_CTX_init(&ctx,serv_ssl->ctx->cert_store, server_cert, NULL); if (SSL_get_verify_depth(serv_ssl) >= 0) X509_STORE_CTX_set_depth(&ctx, SSL_get_verify_depth(serv_ssl)); X509_STORE_CTX_set_ex_data(&ctx,SSL_get_ex_data_X509_STORE_CTX_idx(),serv_ssl); if(serv_ssl->server) i = X509_PURPOSE_SSL_CLIENT; else i = X509_PURPOSE_SSL_SERVER; i=X509_verify_cert(&ctx); printf("Status of the cert = %d \n", i); X509_free (server_cert); return (sock); } /////////////////////////////////////////////////////////////////////////////// Is it a right approach to get a SSL connection ? Or do i making any mistake ? Suggestions and comments would be welcome. Cheers, Vipin From karol.skocik@REDACTED Wed Dec 21 13:19:25 2005 From: karol.skocik@REDACTED (karol skocik) Date: Wed, 21 Dec 2005 13:19:25 +0100 Subject: SNMP v3 problem with usm stats Message-ID: Hi, I am working on SNMP (library version 4.6.1), and I have a problem with getting error usmStatsNotInTimeWindows (using v3 with authentification & authorization). I have enabled tracing, and the problem occurs when agent receives get request. When I do (after starting crypto and snmp) : snmpm:g("karol", {127,0,0,1}, 4000, [[1,3,6,1,2,1,1,5,0]]). I get this : =INFO REPORT==== 20-Dec-2005::16:48:22 === SNMPM default user callback received handle_error: ReqId: -1 Reason: {failed_processing_message, {securityError,usmStatsNotInTimeWindows}} UserData: undefined ** SNMP M-SERVER LOG: received sync_timeout [677490657] message ** SNMP M-SERVER TRACE: handle_sync_timeout -> entry with ReqId: 677490657 From: {<0.31.0>,#Ref<0.0.0.1867>} ** SNMP M-SERVER DEBUG: handle_sync_timeout -> deliver reply (timeout) and demonitor: Monref: #Ref<0.0.0.1875> From: {<0.31.0>,#Ref<0.0.0.1867>} {error,{timeout,677490657}} I have searched the archive, and found out that one guy had exactly the same problem (http://www.erlang.org/ml-archive/erlang-questions/200412/msg00113.html), but he has got no replies how to solve it. What makes me feel uncomfortable is - according to his post - that there were NO changes in his configuration, it just started to feeding him with these errors! There are no user modules yet - I am using standard snmpm_user_default, also there are no (mine added) instrumentation functions - it is just the skelet I need to have working properly before I plug in our stuff, but this message - it's quite a showstopper. I was checking rfc2274 (USM in SNMPv3), this looks like that I should start communication with agent using non-authoritative mode to reset 2 counters : SnmpEngineTime and SnmpEngineBoots, but I don't see that deep now. Do you guys know what might be the problem and how to fix it? Thanks for any suggestions. Cheers, Karol Skocik PS: The log where it is reported looks like this : .... ** SNMP A-NET-IF A-USM TRACE: authenticate_incoming -> 3.2.6 ** SNMP A-NET-IF A-USM TRACE: is_auth -> retrieve EngineBoots and EngineTime: 3.2.7 ** SNMP A-LOCAL-DB LOG: variable get: snmpEngineID ** SNMP A-NET-IF A-USM TRACE: is_auth -> SnmpEngineID: "md's engine" ** SNMP A-NET-IF A-USM TRACE: is_auth -> we are authoritative: 3.2.7a ** SNMP A-LOCAL-DB LOG: variable get: snmpEngineBoots ** SNMP A-NET-IF A-USM TRACE: is_auth -> SnmpEngineBoots: 15 ** SNMP A-NET-IF A-USM INFO: NOT in time window: SecName: "initial" SnmpEngineBoots: 15 MsgAuthEngineBoots: 13 SnmpEngineTime: 149 MsgAuthEngineTime: 148 ** SNMP A-NET-IF MPD TRACE: message processing result: {error,usmStatsNotInTimeWindows, {{varbind,[1,3,6,1,6,3,15,1,1,2,0],'Counter32',3,undefined}, "initial", [{securityLevel,1}]}} ** SNMP A-NET-IF MPD DEBUG: security module result when reportable [7.2.6-a]: Reason: usmStatsNotInTimeWindows ErrorInfo: {{varbind,[1,3,6,1,6,3,15,1,1,2,0],'Counter32',3,undefined}, "initial", [{securityLevel,1}]} .... From rvg@REDACTED Wed Dec 21 14:11:14 2005 From: rvg@REDACTED (Rudolph van Graan) Date: Wed, 21 Dec 2005 15:11:14 +0200 Subject: Corba and Named Objects Message-ID: <05BF90AF-FCA4-4F25-B82E-C05E8187EDD8@patternmatched.com> Hi Guys, I want to create a Corba object that is registered with naming and is supervised. Normally I'd do this (From the erlang examples): SFok = 'DB_Access':oe_create(), NS = corba:resolve_initial_references("NameService"), NC = lname_component:set_id(lname_component:create(), "DBAccess"), N = lname:insert_component(lname:create(), 1, NC), 'CosNaming_NamingContext':bind(NS, N, SFok). Now I want to start this object as a supervisor child, so I'll use oe_create_link/2. How do I now get the OE so that I can pass this to bind? I think I want to register in the init/1 impl function. Or do I now need to invoke my object externally to tell it to register so I can use the OE passed in the implementation function? But how do I get the OE back from the supervisor now? Hope someone can help! Rgds, Rudolph van Graan From vlad_dumitrescu@REDACTED Wed Dec 21 14:27:55 2005 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 21 Dec 2005 14:27:55 +0100 Subject: Erlang Christmas Cup In-Reply-To: <43A7A6D1.5020407@ituniv.se> Message-ID: > On Wednesday Dec 21th, a local, unofficial Robocup simulation > league competition will be held at the IT University of G?teborg. A short retort from the competition, as one of the few (or the only?) outsider on the premises: As I write the competition isn't over yet, jut got to the semifinals, and my lunch break was over so I had to get back to work. But I'd like to say: *** It was really fun!!! * One team featured a single player that actually touched the ball, but was fast and scored almost every time. * Another team's players went _all_ on the ball, forming a phalanx. * Some players (even goalkeepers) just wandered off the arena, probably preferring a good cold (or warm) beer instead. * Sometimes almost all the team was in front of the opponent's goal, with no opponent in sight. It's a team game, right?, so we don't just shoot, we pass. Oh, was it offside? :-) --- Since as a bystander one begins to wonder if one could have done better, I think it would be interesting to consider having more such competitions over the Internet. I know I will download the software and play with it during the holidays! Best regards, Vlad From vlad_dumitrescu@REDACTED Wed Dec 21 14:45:15 2005 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 21 Dec 2005 14:45:15 +0100 Subject: Erlang Christmas Cup In-Reply-To: Message-ID: > I think it would be interesting to consider > having more such competitions over the Internet. FYI, there is a Simulated Soccer Internet League at http://sserver.sourceforge.net/league/index.html, which seems to be completely dominated by a japanese team (51 wins, 244 goals; second team had 6 wins, 9 goals). Regards, Vlad From karol.skocik@REDACTED Wed Dec 21 14:56:37 2005 From: karol.skocik@REDACTED (karol) Date: Wed, 21 Dec 2005 14:56:37 +0100 Subject: SNMP v3 problem with usm stats References: Message-ID: <20051221135637.C3A1159135@bang.trapexit.org> Hey I got it! For someone else having this problem - deleting both agent and manager files in db/ dirs solves the problem. It seems that both variables msgAuthoritativeEngineBoots and msgAuthoritativeEngineTime (SnmpEngineBoots and SnmpEngineTime on the other side) are stored in the db, and running only manager or agent makes them inconsistent. _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From nick@REDACTED Wed Dec 21 15:42:39 2005 From: nick@REDACTED (Niclas Eklund) Date: Wed, 21 Dec 2005 15:42:39 +0100 (MET) Subject: Corba and Named Objects In-Reply-To: <05BF90AF-FCA4-4F25-B82E-C05E8187EDD8@patternmatched.com> Message-ID: Hello Rudolph! Use the sup_child option: 'DB_Access':oe_create_link(Env, [{sup_child, true}|Options]). For more information, please consult: http://erlang.se/doc/doc-5.4.12/lib/orber-3.6.2/doc/html/Module_Interface.html http://erlang.se/doc/doc-5.4.12/lib/orber-3.6.2/doc/html/ch_stubs.html#10 /Nick On Wed, 21 Dec 2005, Rudolph van Graan wrote: > Hi Guys, > > I want to create a Corba object that is registered with naming and is > supervised. > > Normally I'd do this (From the erlang examples): > > SFok = 'DB_Access':oe_create(), > NS = corba:resolve_initial_references("NameService"), > NC = lname_component:set_id(lname_component:create(), "DBAccess"), > N = lname:insert_component(lname:create(), 1, NC), > 'CosNaming_NamingContext':bind(NS, N, SFok). > > Now I want to start this object as a supervisor child, so I'll use > oe_create_link/2. How do I now get the OE so that I can pass this to > bind? I think I want to register in the init/1 impl function. Or do I > now need to invoke my object externally to tell it to register so I > can use the OE passed in the implementation function? But how do I > get the OE back from the supervisor now? > > Hope someone can help! > > Rgds, > > Rudolph van Graan _________________________________________________________________ We Are The ORBs. Resistance Is Futile. Prepare To Be Assimilated! _________________________________________________________________ From ft@REDACTED Wed Dec 21 16:10:50 2005 From: ft@REDACTED (Fredrik Thulin) Date: Wed, 21 Dec 2005 16:10:50 +0100 Subject: Mnesia transform_table with multiple disc_copies nodes Message-ID: <200512211610.50943.ft@it.su.se> Hi How do I make use of mnesia:transform_table/3 when I have more than one node with disc_copies of a table? -module(t). -export([do/1]). do(Table) -> Attrs = mnesia:table_info(Table, attributes), io:format("Attributes of table ~p : ~p~n", [Table, Attrs]), F = fun(X) -> X end, mnesia:transform_table(Table, F, Attrs). (incomingproxy@REDACTED)6> t:do(regexproute). Attributes of table regexproute : [regexp,flags,class,expire,address] {aborted,{"Bad transform function", regexproute, #Fun, 'incomingproxy@REDACTED', {undef,[{#Fun, ... My fun F is (of course) unknown on the other node 'incomingproxy@REDACTED'. Thanks in advance and a merry christmas to you all /Fredrik From dgud@REDACTED Wed Dec 21 16:29:13 2005 From: dgud@REDACTED (Dan Gudmundsson) Date: Wed, 21 Dec 2005 16:29:13 +0100 Subject: Mnesia transform_table with multiple disc_copies nodes In-Reply-To: <200512211610.50943.ft@it.su.se> References: <200512211610.50943.ft@it.su.se> Message-ID: <17321.29897.376244.861669@rian.du.uab.ericsson.se> Hmm The fun have to be known on every node, load the module on every node (exact the same version on all nodes). /Dan Fredrik Thulin writes: > Hi > > How do I make use of mnesia:transform_table/3 when I have more than one > node with disc_copies of a table? > > -module(t). > > -export([do/1]). > > do(Table) -> > Attrs = mnesia:table_info(Table, attributes), > io:format("Attributes of table ~p : ~p~n", [Table, Attrs]), > F = fun(X) -> > X > end, > mnesia:transform_table(Table, F, Attrs). > > > (incomingproxy@REDACTED)6> t:do(regexproute). > Attributes of table regexproute : [regexp,flags,class,expire,address] > {aborted,{"Bad transform function", > regexproute, > #Fun, > 'incomingproxy@REDACTED', > {undef,[{#Fun, > ... > > My fun F is (of course) unknown on the other node > 'incomingproxy@REDACTED'. > > Thanks in advance and a merry christmas to you all > > /Fredrik -- 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 ft@REDACTED Wed Dec 21 16:36:26 2005 From: ft@REDACTED (Fredrik Thulin) Date: Wed, 21 Dec 2005 16:36:26 +0100 Subject: Mnesia transform_table with multiple disc_copies nodes In-Reply-To: <17321.29897.376244.861669@rian.du.uab.ericsson.se> References: <200512211610.50943.ft@it.su.se> <17321.29897.376244.861669@rian.du.uab.ericsson.se> Message-ID: <200512211636.26079.ft@it.su.se> On Wednesday 21 December 2005 16.29, Dan Gudmundsson wrote: > Hmm > > The fun have to be known on every node, load the module > on every node (exact the same version on all nodes). Thanks for your fsat response, as always. How do I load the (changed) code then without using hot code swap of running code in all my servers? At the first node I upgrade to say a new version of my software, which requires a transform_table, I get this error : {aborted,{not_active,"All replicas on diskfull nodes are not active yet", regexproute, ['incomingproxy@REDACTED']}} ... or am I missing something else? /Fredrik From per.gustafsson@REDACTED Wed Dec 21 16:38:45 2005 From: per.gustafsson@REDACTED (Per Gustafsson) Date: Wed, 21 Dec 2005 16:38:45 +0100 Subject: Decoding bitmask? In-Reply-To: References: Message-ID: <43A97705.5030108@it.uu.se> Hi The problem is somewhat underspecified. That is do the optional values all have the same size? What kind of datastructure would you want to store the result in? The solution below assumes that all options have the same size and the results are returned as a list of two tuples where the first element is the number of the bit that was set and the second element is the value of that option. I have not tested the speed of the two different solutions but I suspect that the second solution is faster, though I feel that the first one is prettier. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Solution 1 dealing with the bitmask as a binary %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% decode(<>) -> Options = decode_options(BitMask, Rest, 0), {Man1,Man2,Options}. decode_options(BitMask, OptBin, N) when N < 16 -> Pad = 15-N, case BitMask of <<_:N,1:1,_:Pad>> -> <> = OptBin, [{N+1, OptVal}|decode_options(BitMask,RestOpts,N+1)]; _ -> decode_options(BitMask,OptBin,N+1) end; decode_options(_BitMask, _OptBin, _N) -> []. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Solution 2 dealing with the bitmask as an integer %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% decode(<>) -> Options = decode_options(BitMask, Rest, 0), {Man1,Man2,Options}. decode_options(BitMask, OptBin, N) when N < 16 -> Mask = 1 bsl (15-N), case BitMask band Mask of X when X > 0 -> <> = OptBin, [{N+1, OptVal}|decode_options(BitMask,RestOpts,N+1)]; _ -> decode_options(BitMask,OptBin,N+1) end; decode_options(_BitMask, _OptBin, _N) -> []. Ericsson wrote: > Hello! > > I'm working on decoding a binary message. The first variables are Mandatory, so they are easy to decode. The last of the mandatory variables is an 16 bit option mask where each bit corresponds to an optional variable that might follow directly after the OptionMask. > > How can I decode this OptionMask, and then parse the optional variables, in the cleanest and most "Erlang optimized" way? > > <> = Message, > etc... > > /BE > > > This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. > From Waldemar.Rachwal@REDACTED Wed Dec 21 17:59:12 2005 From: Waldemar.Rachwal@REDACTED (Rachwal Waldemar-AWR001) Date: Wed, 21 Dec 2005 16:59:12 -0000 Subject: MIB compilation problem Message-ID: <08F651DD6835A74DAFA80915F0150CA62A50F9@zuk35exm64.ds.mot.com> I get strange errors while compiling the MIB as attached. Other MIBs with similar construct passed the compilation. Is there anything in this MIB I can't see? Other suspicious thing is the last error message with OBJECT IDENTIFIER '[99,99]' - no idea where such numbers come from. Regards, Waldemar. > erlc +'{group_check,false}' NO-OID.mib NO-OID.mib: 29: Error: OBJECT IDENTIFIER defined in terms of undefined parent object. Parent: 'cmpMethodExtensionGroup'.(Sub-indexes: [1].) NO-OID.mib: 36: Error: OBJECT IDENTIFIER defined in terms of undefined parent object. Parent: 'cmpMethodExtensionGroup'.(Sub-indexes: [2].) NO-OID.mib: 44: Error: OBJECT IDENTIFIER defined in terms of undefined parent object. Parent: 'cmpMethodExtensionGroup'.(Sub-indexes: [3].) NO-OID.mib: 51: Error: OBJECT IDENTIFIER defined in terms of undefined parent object. Parent: 'cmpMethodExtensionGroup'.(Sub-indexes: [4].) NO-OID.mib: Error: Multiple used object with OBJECT IDENTIFIER '[99,99]'. Used in 'cmpMethodExtMethodName' and 'cmpMethodExtObjectIn'. -- -------------- next part -------------- A non-text attachment was scrubbed... Name: NO-OID.mib Type: application/octet-stream Size: 1626 bytes Desc: NO-OID.mib URL: From Waldemar.Rachwal@REDACTED Wed Dec 21 18:50:13 2005 From: Waldemar.Rachwal@REDACTED (Rachwal Waldemar-AWR001) Date: Wed, 21 Dec 2005 17:50:13 -0000 Subject: MIB compilation problem Message-ID: <08F651DD6835A74DAFA80915F0150CA62A50FA@zuk35exm64.ds.mot.com> Did you mean to move the whole OBJECT-GROUP after the last OBJECT-TYPE definition? This doesn't help giving the same error report. :( WR. -----Original Message----- From: Micael Karlberg [mailto:bmk@REDACTED] Sent: Wednesday, December 21, 2005 6:32 PM To: Rachwal Waldemar-AWR001 Subject: Re: MIB compilation problem The group has to be defined after the OID. The '[99,99]' is just some "funny thing" the compiler comes up with to make every thing stop... /BMK Rachwal Waldemar-AWR001 wrote: > I get strange errors while compiling the MIB as attached. Other MIBs > with similar construct passed the compilation. Is there anything in > this MIB I can't see? Other suspicious thing is the last error message > with OBJECT IDENTIFIER '[99,99]' - no idea where such numbers come from. > Regards, > Waldemar. > > >>erlc +'{group_check,false}' NO-OID.mib > > > NO-OID.mib: 29: Error: OBJECT IDENTIFIER defined in terms of undefined > parent object. Parent: 'cmpMethodExtensionGroup'.(Sub-indexes: [1].) > NO-OID.mib: 36: Error: OBJECT IDENTIFIER defined in terms of undefined > parent object. Parent: 'cmpMethodExtensionGroup'.(Sub-indexes: [2].) > NO-OID.mib: 44: Error: OBJECT IDENTIFIER defined in terms of undefined > parent object. Parent: 'cmpMethodExtensionGroup'.(Sub-indexes: [3].) > NO-OID.mib: 51: Error: OBJECT IDENTIFIER defined in terms of undefined > parent object. Parent: 'cmpMethodExtensionGroup'.(Sub-indexes: [4].) > NO-OID.mib: Error: Multiple used object with OBJECT IDENTIFIER > '[99,99]'. Used in 'cmpMethodExtMethodName' and 'cmpMethodExtObjectIn'. > > -- From ft@REDACTED Thu Dec 22 08:23:42 2005 From: ft@REDACTED (Fredrik Thulin) Date: Thu, 22 Dec 2005 08:23:42 +0100 Subject: Mnesia transform_table with multiple disc_copies nodes In-Reply-To: <200512211636.26079.ft@it.su.se> References: <200512211610.50943.ft@it.su.se> <17321.29897.376244.861669@rian.du.uab.ericsson.se> <200512211636.26079.ft@it.su.se> Message-ID: <200512220823.42492.ft@it.su.se> On Wednesday 21 December 2005 16.36, Fredrik Thulin wrote: > On Wednesday 21 December 2005 16.29, Dan Gudmundsson wrote: > > Hmm > > > > The fun have to be known on every node, load the module > > on every node (exact the same version on all nodes). > > Thanks for your fsat response, as always. > > How do I load the (changed) code then without using hot code swap of > running code in all my servers? > > At the first node I upgrade to say a new version of my software, > which requires a transform_table, I get this error : > > {aborted,{not_active,"All replicas on diskfull nodes are not active > yet", > regexproute, > ['incomingproxy@REDACTED']}} > > ... or am I missing something else? This issue might need a bit more explaining from my side. I thought it obvious that I would want to do the transform_table in the startup process of my application running on the nodes with the disc_copies, but later realised that perhaps it wasn't so obvious. I then figure that my two options to introduce a change in the table layout is either to 1) (hot) load a new version of my table_update module into all servers and then invoke the transformation function in some way. I guess this is what I would get if I used proper OTP release handling. 2) stop all my nodes (during a service window), upgrading them and then starting them again. The second alternative is much more within reach for me at the moment, but does lead to one of two show-stoppers. Either the new code is not available on all the nodes, or the update can't be performed because not all nodes are running. My question is therefor if there is a way around these show-stoppers? /Fredrik From jay@REDACTED Thu Dec 22 09:16:34 2005 From: jay@REDACTED (Jay Nelson) Date: Thu, 22 Dec 2005 00:16:34 -0800 Subject: Embedded erl components Message-ID: <43AA60E2.3000308@duomark.com> I am trying to run erlang from flash with a stripped down install. I am running on i386 with OpenBSD 3.8. I have the following components installed: All of /usr/local/lib/erlang/bin All of /usr/local/lib/erlang/erts-5.4.10/bin The following in /usr/local/lib/erlang/lib: kernel-2.10.11 os_mon-1.7.4 sasl-2.1 stdlib-1.13.10 When I start erl I get the following error which indicates the code_server is not loading properly. I can't seem to figure out what the dependency is that is preventing it from running. Anyone have a clue? Is there a tool that lets me understand the crash dump? {error_logger,{{2005,12,22},{6,50,46}}, supervisor_report,[{supervisor,{local,kernel_sup}}, {errorContext,start_error}, {reason,{'DOWN',#Ref<0.0.0.13>,process,<0.15.0>,normal}}, {offender,[{pid,undefined},{name,code_server},{mfa,{code,start_link,[]}}, {restart_type,permanent},{shutdown,2000},{child_type,worker}]}]} {error_logger,{{2005,12,22},{6,50,46}}, crash_report,[[{pid,<0.7.0>},{registered_name,[]}, {error_info,{shutdown,{kernel,start,[normal,[]]}}}, {initial_call,{application_master,init,[<0.5.0>,<0.6.0>, {appl_data,kernel,[application_controller,erl_reply,auth,boot_server, code_server,disk_log_server,disk_log_sup,erl_prim_loader, error_logger,file_server,file_server_2,fixtable_server,global_group, global_name_server,heart,init,kernel_config,kernel_sup,net_kernel, net_sup,rex,user,os_server,ddll_server,erl_epmd,inet_db,pg2], undefined,{kernel,[]},[application,application_controller,application_master, application_starter,auth,code,code_aux,packages,code_server,dist_util, erl_boot_server,erl_distribution,erl_prim_loader,erl_reply,erlang,error_handler, error_logger,file,file_server,old_file_server,file_io_server,prim_file,global, global_group,global_search,group,heart,inet6_tcp,inet6_tcp_dist,inet6_udp, inet_config,inet_hosts,inet_gethost_native,inet_tcp_dist,init,kernel,kernel_config, net,net_adm,net_kernel,os,ram_file,rpc,user,user_drv,user_sup,disk_log, disk_log_1,disk_log_server,disk_log_sup,dist_ac,erl_ddll,erl_epmd,erts_debug,\ gen_tcp,gen_udp,prim_inet,inet,inet_db,inet_dns,inet_parse,inet_res,inet_tcp, inet_udp,pg2,seq_trace,wrap_log_reader,zlib,otp_ring0],[],infinity,infinity}, normal]}}, {ancestors,[<0.6.0>]},{messages,[{'EXIT',<0.8.0>,normal}]}, {links,[<0.6.0>,<0.5.0>]},{dictionary,[]},{trap_exit,true},{status,running}, {heap_size,987},{stack_size,21},{reductions,1062}],[]]} {error_logger,{{2005,12,22},{6,50,46}},std_info, [{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]} {"Kernel pid terminated",application_controller,shutdown} Kernel pid terminated (application_controller) (shutdown) jay From jay@REDACTED Thu Dec 22 09:19:07 2005 From: jay@REDACTED (Jay Nelson) Date: Thu, 22 Dec 2005 00:19:07 -0800 Subject: Embedded erl components (cont.) Message-ID: <43AA617B.1040302@duomark.com> Do I need to open any ports for the code_loader to operate properly on a single machine? I am using the pf application to filter packets. jay From tobbe@REDACTED Thu Dec 22 09:51:15 2005 From: tobbe@REDACTED (tobbe) Date: Thu, 22 Dec 2005 09:51:15 +0100 Subject: JSON? References: Message-ID: <20051222085115.803B459185@bang.trapexit.org> I was just wondering if you ever did release that JSON library of yours, and if so, where can I get it ? Cheers, Tobbe _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From rohini@REDACTED Thu Dec 22 10:33:43 2005 From: rohini@REDACTED (Rohini V) Date: Thu, 22 Dec 2005 15:03:43 +0530 Subject: unable to start the crypto application Message-ID: <30BFDEA66FF4D41191EB00D0B765BC6F01916981@medha.wsspl.com> Hi, I downloaded the latest Erlang R10B ( for Windows ). In the Erlang shell, tried the following : application:start(crypto). And noticed the following error. The dynamic link library LIBEAY32.dll could not be found in the specified path c:\Program Files\erl5.4.12\bin;.;c:\WINNT\system32;c:\WINNT;c:\PROGRA~1\ERTS-5~1.12\bin ;c:\PROGRA~1\ERL54~1.12\bin;c:\WINNT\system32;c:\WINNT;c:\WINNT\System32\Wbe m;c:\Program Files\erl5.4.12\bin; Any comments on this ?? Rohini From vlad.xx.dumitrescu@REDACTED Thu Dec 22 10:39:00 2005 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Thu, 22 Dec 2005 10:39:00 +0100 Subject: unable to start the crypto application Message-ID: <11498CB7D3FCB54897058DE63BE3897C010A6681@esealmw105.eemea.ericsson.se> Hi, Not very helpful, but it works fine for me... /Vlad > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Rohini V > Sent: Thursday, December 22, 2005 10:34 AM > To: Erlang Questions (E-mail) > Subject: unable to start the crypto application > > > Hi, > > I downloaded the latest Erlang R10B ( for Windows ). > In the Erlang shell, tried the following : > > application:start(crypto). > > And noticed the following error. > > The dynamic link library LIBEAY32.dll could not be found in > the specified path c:\Program > Files\erl5.4.12\bin;.;c:\WINNT\system32;c:\WINNT;c:\PROGRA~1\E RTS-5~1.12\bin > ;c:\PROGRA~1\ERL54~1.12\bin;c:\WINNT\system32;c:\WINNT;c:\WINN T\System32\Wbe > m;c:\Program Files\erl5.4.12\bin; > > Any comments on this ?? > > Rohini > > > From dmitriid@REDACTED Thu Dec 22 10:41:45 2005 From: dmitriid@REDACTED (Dmitrii Dimandt) Date: Thu, 22 Dec 2005 11:41:45 +0200 Subject: SOAP (again?) Message-ID: I've been looking at Erlang lately and I am _very_ new to it. I guess, my question has been asked a few times. Is there a SOAP library available for Erlang? It isn't, strictly speaking, a matter of life and death, but it could be :) Thank you From klacke@REDACTED Thu Dec 22 11:11:36 2005 From: klacke@REDACTED (Claes Wikstom) Date: Thu, 22 Dec 2005 11:11:36 +0100 Subject: SOAP (again?) In-Reply-To: References: Message-ID: <43AA7BD8.1050500@hyber.org> Dmitrii Dimandt wrote: > I've been looking at Erlang lately and I am _very_ new to it. I guess, > my question has been asked a few times. > > Is there a SOAP library available for Erlang? It isn't, strictly > speaking, a matter of life and death, but it could be :) > I've been doing quite a lot of SOAP client programming lately and I sure can't say I liked it. It sucks bigtime. Anyway, what I did was basically to 1. Ask the WebServices provider to give me a good tcpdump capture of one good and one bad case. 2. Send raw XML structures to the WebServices provider with my dataitems inserted, 3. xmerl parse the reply. To my knowledge there is no good SOAP lib available today, One key componenet that is missing is an XML-Schema parser which is non trivial. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From dmitriid@REDACTED Thu Dec 22 11:27:38 2005 From: dmitriid@REDACTED (Dmitrii Dimandt) Date: Thu, 22 Dec 2005 12:27:38 +0200 Subject: SOAP (again?) In-Reply-To: <43AA7BD8.1050500@hyber.org> References: <43AA7BD8.1050500@hyber.org> Message-ID: On 12/22/05, Claes Wikstom wrote: > Dmitrii Dimandt wrote: > > I've been looking at Erlang lately and I am _very_ new to it. I guess, > > my question has been asked a few times. > > > > Is there a SOAP library available for Erlang? It isn't, strictly > > speaking, a matter of life and death, but it could be :) > > > > > I've been doing quite a lot of SOAP client programming > lately and I sure can't say I liked it. It sucks bigtime. > Anyway, what I did was basically to > > 1. Ask the WebServices provider to give me a good > tcpdump capture of one good and one bad case. > > 2. Send raw XML structures to the WebServices provider > with my dataitems inserted, > > 3. xmerl parse the reply. > > To my knowledge there is no good SOAP lib available today, > One key componenet that is missing is an XML-Schema parser > which is non trivial. Hmm.. I figured I would have to do that. not that I'm scared :) But still... Oh well, no rest for the wicked :)) From jingdingca@REDACTED Thu Dec 22 21:00:06 2005 From: jingdingca@REDACTED (Jing Ding) Date: Thu, 22 Dec 2005 12:00:06 -0800 (PST) Subject: Erlang Equivalent of C# Hash In-Reply-To: <20051220015427.44682.qmail@web50514.mail.yahoo.com> Message-ID: <20051222200007.58816.qmail@web50502.mail.yahoo.com> Hi there, I previously asked about how to do MD5. And I got answers. Thanks for your help. But the binary result is not the same as the string generated from C# : ------------------------------------------------------ byte[] a = md5Hash.ComputeHash(AE.GetBytes(UserID + value)); PasswordHash = Convert.ToBase64String(a); --------------------------------------------------- Anyone else happen to came across this? Thanks. Jing --------------------------------- Yahoo! DSL Something to write home about. Just $16.99/mo. or less -------------- next part -------------- An HTML attachment was scrubbed... URL: From jocke@REDACTED Thu Dec 22 21:52:04 2005 From: jocke@REDACTED (Joakim G.) Date: Thu, 22 Dec 2005 21:52:04 +0100 Subject: Erlang Equivalent of C# Hash In-Reply-To: <20051222200007.58816.qmail@web50502.mail.yahoo.com> References: <20051222200007.58816.qmail@web50502.mail.yahoo.com> Message-ID: <43AB11F4.6040005@tail-f.com> Jing Ding wrote: > Hi there, > I previously asked about how to do MD5. And I got answers. > Thanks for your help. But the binary result is not the same as the > string generated from C# : > ------------------------------------------------------ > byte[] a = md5Hash.ComputeHash(AE.GetBytes(UserID + value)); > PasswordHash = Convert.ToBase64String(a); > --------------------------------------------------- > Anyone else happen to came across this? Thanks. Do like this in C#: == byte[] buffer = System.Text.Encoding.Default.GetBytes(String); System.Security.Cryptography.MD5CryptoServiceProvider Check; Check = new System.Security.Cryptography.MD5CryptoServiceProvider(); byte[] Hash = Check.ComputeHash(buffer); string HashString = ""; foreach (byte a in Hash) { if (a < 16) { HashString += "0" + a.ToString("X"); } else { HashString += a.ToString("X"); } } return HashString.ToLower(); == and it works with Erlang's md5 engine and Perl's CPAN md5_base64 (in Digest::MD5::Perl) out of the box. If you like a pragmatic answer. This is it. :-) Cheers /Jocke From jocke@REDACTED Thu Dec 22 23:39:05 2005 From: jocke@REDACTED (Joakim G.) Date: Thu, 22 Dec 2005 23:39:05 +0100 Subject: Erlang Equivalent of C# Hash In-Reply-To: <43AB11F4.6040005@tail-f.com> References: <20051222200007.58816.qmail@web50502.mail.yahoo.com> <43AB11F4.6040005@tail-f.com> Message-ID: <43AB2B09.4090705@tail-f.com> and yes To compare the digests you have to do something like this on the Erlang side: Context = erlang:md5_init(), NewContext = erlang:md5_update(Context, String), base64:str_2_base64(binary_to_list(erlang:md5_final(NewContext))) /Jocke PS http://www.sics.se/~joe/bluetail/eol/base64.erl DS Joakim G. wrote: > Jing Ding wrote: > >> Hi there, >> I previously asked about how to do MD5. And I got answers. >> Thanks for your help. But the binary result is not the same as the >> string generated from C# : >> ------------------------------------------------------ >> byte[] a = md5Hash.ComputeHash(AE.GetBytes(UserID + value)); >> PasswordHash = Convert.ToBase64String(a); >> --------------------------------------------------- >> Anyone else happen to came across this? Thanks. > > > Do like this in C#: > > == > > byte[] buffer = System.Text.Encoding.Default.GetBytes(String); > System.Security.Cryptography.MD5CryptoServiceProvider Check; > Check = new System.Security.Cryptography.MD5CryptoServiceProvider(); > byte[] Hash = Check.ComputeHash(buffer); > string HashString = ""; > foreach (byte a in Hash) { > if (a < 16) { > HashString += "0" + a.ToString("X"); > } else { > HashString += a.ToString("X"); > } > } > return HashString.ToLower(); > > == > > and it works with Erlang's md5 engine and Perl's CPAN > md5_base64 (in Digest::MD5::Perl) out of the box. > > If you like a pragmatic answer. This is it. :-) > > Cheers > /Jocke -- tail-f - Caps lock is nowhere and everything is under control. From jb@REDACTED Fri Dec 23 00:50:11 2005 From: jb@REDACTED (Johan Bevemyr) Date: Fri, 23 Dec 2005 00:50:11 +0100 Subject: Erlang Equivalent of C# Hash In-Reply-To: <43AB2B09.4090705@tail-f.com> References: <20051222200007.58816.qmail@web50502.mail.yahoo.com> <43AB11F4.6040005@tail-f.com> <43AB2B09.4090705@tail-f.com> Message-ID: <43AB3BB3.4090700@bevemyr.com> I use the following code on the C# side: *using System; using System.Security.Cryptography; * private string mk_digest(string str) { byte[] bHashResult = new byte[21]; MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); byte[] bMD5Hash = Encoding.GetEncoding("iso-8859-1").GetBytes(str); bHashResult = md5.ComputeHash(bMD5Hash); return Convert.ToBase64String(bHashResult); } Works nicely with Jockes code below on the Erlang side. -Johan Joakim G. wrote: > and yes > > To compare the digests you have to do something like this on > the Erlang side: > > Context = erlang:md5_init(), > NewContext = erlang:md5_update(Context, String), > base64:str_2_base64(binary_to_list(erlang:md5_final(NewContext))) > > /Jocke > > PS http://www.sics.se/~joe/bluetail/eol/base64.erl DS > > Joakim G. wrote: > >> Jing Ding wrote: >> >>> Hi there, >>> I previously asked about how to do MD5. And I got answers. >>> Thanks for your help. But the binary result is not the same as the >>> string generated from C# : >>> ------------------------------------------------------ >>> byte[] a = md5Hash.ComputeHash(AE.GetBytes(UserID + value)); >>> PasswordHash = Convert.ToBase64String(a); >>> --------------------------------------------------- >>> Anyone else happen to came across this? Thanks. >> >> >> >> Do like this in C#: >> >> == >> >> byte[] buffer = System.Text.Encoding.Default.GetBytes(String); >> System.Security.Cryptography.MD5CryptoServiceProvider Check; >> Check = new System.Security.Cryptography.MD5CryptoServiceProvider(); >> byte[] Hash = Check.ComputeHash(buffer); >> string HashString = ""; >> foreach (byte a in Hash) { >> if (a < 16) { >> HashString += "0" + a.ToString("X"); >> } else { >> HashString += a.ToString("X"); >> } >> } >> return HashString.ToLower(); >> >> == >> >> and it works with Erlang's md5 engine and Perl's CPAN >> md5_base64 (in Digest::MD5::Perl) out of the box. >> >> If you like a pragmatic answer. This is it. :-) >> >> Cheers >> /Jocke > > > From camster@REDACTED Fri Dec 23 16:55:47 2005 From: camster@REDACTED (Richard Cameron) Date: Fri, 23 Dec 2005 15:55:47 +0000 Subject: SOAP (again?) In-Reply-To: References: <43AA7BD8.1050500@hyber.org> Message-ID: On 23 Dec 2005, at 14:40, Dmitrii Dimandt wrote: > Yeah. And then there's Microsoft's s:any which isn't parsed by either > Apache Axis or gSOAP And that, actually, is why I've just spent the whole morning hand- editing a .wsdl file to try to coax gSOAP into being able to talk this simple, platform independent, open protocol. Although this has remarkably little to do with Erlang (I primarily want to moan about the state of the world to anyone who'll listen), there is the observation that I constantly find myself able to implement most (non-XML) protocols in Erlang remarkably easily by using a combination of bit syntax and writing little finite state machines. In general, dealing with things which would be very scary for Java and C# programmers (low level bit twiddly stuff, or texty protocols like HTTP or SMTP) always turns out to be remarkably easy in Erlang. Unfortunately the flip-side of that is also true: communicating over "industry standard" protocols like SOAP (which Java/C# programmers are forced to use because there's no sane alternative) always turns out to be a real pain in Erlang. I don't think that's because it's technically more difficult to implement a SOAP client in Erlang, it's just because there's usually a nicer/easier way to do it so nobody's really been inclined to build the XML tools that the Java and Microsoft boys have. Richard. From ernie.makris@REDACTED Fri Dec 23 17:24:32 2005 From: ernie.makris@REDACTED (Ernie Makris) Date: Fri, 23 Dec 2005 11:24:32 -0500 Subject: Linux epoll/kpoll Message-ID: <43AC24C0.9080905@comcast.net> Hello, There exists a linux epoll patch @: http://developer.sipphone.com/ejabberd/erlang_epoll_patch/ Is this ever going to make it into the base distribution? I also have a patch to make run_erl work correctly on Fedora Core(3|4) What is the process for submitting and getting changes approved/declined for erlang? Thanks Ernie From klacke@REDACTED Fri Dec 23 17:53:08 2005 From: klacke@REDACTED (Claes Wikstrom) Date: Fri, 23 Dec 2005 17:53:08 +0100 Subject: SOAP (again?) In-Reply-To: References: <43AA7BD8.1050500@hyber.org> Message-ID: <43AC2B74.6000603@hyber.org> Richard Cameron wrote: > Although this has remarkably little to do with Erlang (I primarily want > to moan about the state of the world to anyone who'll listen), there is > the observation that I constantly find myself able to implement most > (non-XML) protocols in Erlang remarkably easily by using a combination > of bit syntax and writing little finite state machines. > > In general, dealing with things which would be very scary for Java and > C# programmers (low level bit twiddly stuff, or texty protocols like > HTTP or SMTP) always turns out to be remarkably easy in Erlang. > Unfortunately the flip-side of that is also true: communicating over > "industry standard" protocols like SOAP (which Java/C# programmers are > forced to use because there's no sane alternative) always turns out to > be a real pain in Erlang. I don't think that's because it's technically > more difficult to implement a SOAP client in Erlang, it's just because > there's usually a nicer/easier way to do it so nobody's really been > inclined to build the XML tools that the Java and Microsoft boys have. The solution is ofcourse to do a proper SOAP implementation in Erlang. It shouldn't be to hard and it sure would be blindingly fast - if done properly. 1. parse the wsdl file (using xmerl) 2. generate datatypes (records) in .hrl files for all complextypes found 3. generate marshalling code to send and receive those records (probably using xmerl) 1 week of work or so. My SOAP days are over (for ever I hope !!) so I won't do it :-) /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From mickael.remond@REDACTED Fri Dec 23 18:35:11 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Fri, 23 Dec 2005 18:35:11 +0100 Subject: Linux epoll/kpoll In-Reply-To: <43AC24C0.9080905@comcast.net> References: <43AC24C0.9080905@comcast.net> Message-ID: <20051223173511.GA17818@memphis.ilius.fr> * Ernie Makris [2005-12-23 11:24:32 -0500]: > Hello, > > There exists a linux epoll patch @: > http://developer.sipphone.com/ejabberd/erlang_epoll_patch/ This patch has already been submitted. It would be nice to have it testing against the Erlang/OTP team test suite to see if it is completly safe. For your information, we have used it in production system and it is working properly. I have been reported a small typo, so I will try to fix the patch as soon as possible. > Is this ever going to make it into the base distribution? > I also have a patch to make run_erl work correctly on Fedora Core(3|4) You can use the Erlang Patch mailing list. > What is the process for submitting and getting changes approved/declined > for erlang? You can use the Erlang Patch mailing list. You can refer to: http://www.erlang.org/faq.html for details on the Patch mailing list. Merry Christmas ! -- Micka?l R?mond http://www.process-one.net/ From ernie.makris@REDACTED Fri Dec 23 18:43:43 2005 From: ernie.makris@REDACTED (Ernie Makris) Date: Fri, 23 Dec 2005 12:43:43 -0500 Subject: Linux epoll/kpoll In-Reply-To: <20051223173511.GA17818@memphis.ilius.fr> References: <43AC24C0.9080905@comcast.net> <20051223173511.GA17818@memphis.ilius.fr> Message-ID: <43AC374F.8010705@comcast.net> Hi Mickael, Thanks for submitting it! Is the test suite available? I can run it locally if need be, with the patch, to do some extra testing on it. I'd be happy to help in this way. Thanks Ernie Mickael Remond wrote: >* Ernie Makris [2005-12-23 11:24:32 -0500]: > > > >>Hello, >> >>There exists a linux epoll patch @: >>http://developer.sipphone.com/ejabberd/erlang_epoll_patch/ >> >> > >This patch has already been submitted. >It would be nice to have it testing against the Erlang/OTP team test >suite to see if it is completly safe. For your information, we have used >it in production system and it is working properly. > >I have been reported a small typo, so I will try to fix the patch as >soon as possible. > > > >>Is this ever going to make it into the base distribution? >>I also have a patch to make run_erl work correctly on Fedora Core(3|4) >> >> > >You can use the Erlang Patch mailing list. > > > >>What is the process for submitting and getting changes approved/declined >>for erlang? >> >> > >You can use the Erlang Patch mailing list. >You can refer to: >http://www.erlang.org/faq.html >for details on the Patch mailing list. > >Merry Christmas ! > > > From dmitriid@REDACTED Sun Dec 25 00:14:45 2005 From: dmitriid@REDACTED (Dmitrii Dimandt) Date: Sun, 25 Dec 2005 01:14:45 +0200 Subject: SOAP (again?) In-Reply-To: <43AC2B74.6000603@hyber.org> References: <43AA7BD8.1050500@hyber.org> <43AC2B74.6000603@hyber.org> Message-ID: > The solution is ofcourse to do a proper SOAP implementation > in Erlang. It shouldn't be to hard and it sure would be blindingly > fast - if done properly. > > 1. parse the wsdl file (using xmerl) > 2. generate datatypes (records) in .hrl files for all > complextypes found > 3. generate marshalling code to send and receive those records > (probably using xmerl) > > > 1 week of work or so. My SOAP days are over (for ever I hope !!) > so I won't do it :-) Well, I will try to do that. Now the question is - to find the time to do it :) From joelr1@REDACTED Sun Dec 25 21:58:51 2005 From: joelr1@REDACTED (Joel Reymont) Date: Sun, 25 Dec 2005 20:58:51 +0000 Subject: Pickler combinators Message-ID: <2D7CB6FB-A089-4445-9EF3-C3B9D5E37ACE@gmail.com> Folks, Inspired by http://research.microsoft.com/~akenn/fun/ picklercombinators.pdf and as part of my Haskell to Erlang rewrite I would like to offer my take on Pickler Combinators. Parsing binaries is great but all the manual gets boring after a while. This code streamlines things quite a bit (see Unit Test code). My goal was to have a single spec for pickling and unpickling, to be able to pickle nested structures and to be able to have "enums". Please let me know if I made any performance-related mistakes and feel free to make suggestions. Thanks, Joel P.S. I get data in little-endian format so I didn't bother with be_ picklers. -module(pickle). -export([pickle/2, unpickle/2, test/0]). -export([byte/0, short/0, sshort/0, int/0, sint/0, long/0, slong/0]). -export([le_short/0, le_sshort/0, le_int/0, le_sint/0, le_long/0, le_slong/0]). -export([list/2, choice/2, optional/1, wrap/2, tuple/1, record/2]). -compile([export_all]). %% Pickle and unpickle pickle({Pickler, _}, Value) -> lists:reverse(Pickler([], Value)). unpickle({_, Pickler}, Bin) -> element(1, Pickler(Bin)). %% Byte byte() -> {fun write_byte/2, fun read_byte/1}. write_byte(Acc, Sbyte) -> [<>|Acc]. read_byte(Bin) -> <> = Bin, {Sbyte, Rest}. %% Unsigned short short() -> {fun write_short/2, fun read_short/1}. write_short(Acc, Word) -> [<>|Acc]. read_short(Bin) -> <> = Bin, {Word, Rest}. %% Signed short sshort() -> {fun write_sshort/2, fun read_sshort/1}. write_sshort(Acc, Word) -> [<>|Acc]. read_sshort(Bin) -> <> = Bin, {Word, Rest}. %% Unsigned little-endian short le_short() -> {fun write_le_short/2, fun read_le_short/1}. write_le_short(Acc, Word) -> [<>|Acc]. read_le_short(Bin) -> <> = Bin, {Word, Rest}. %% Signed little-endian short le_sshort() -> {fun write_le_sshort/2, fun read_le_sshort/1}. write_le_sshort(Acc, Word) -> [<>|Acc]. read_le_sshort(Bin) -> <> = Bin, {Word, Rest}. %% Unsigned int int() -> {fun write_int/2, fun read_int/1}. write_int(Acc, Word) -> [<>|Acc]. read_int(Bin) -> <> = Bin, {Word, Rest}. %% Signed int sint() -> {fun write_sint/2, fun read_sint/1}. write_sint(Acc, Word) -> [<>|Acc]. read_sint(Bin) -> <> = Bin, {Word, Rest}. %% Unsigned little-endian int le_int() -> {fun write_le_int/2, fun read_le_int/1}. write_le_int(Acc, Word) -> [<>|Acc]. read_le_int(Bin) -> <> = Bin, {Word, Rest}. %% Signed little-endian int le_sint() -> {fun write_le_sint/2, fun read_le_sint/1}. write_le_sint(Acc, Word) -> [<>|Acc]. read_le_sint(Bin) -> <> = Bin, {Word, Rest}. %% Unsigned long long() -> {fun write_long/2, fun read_long/1}. write_long(Acc, Word) -> [<>|Acc]. read_long(Bin) -> <> = Bin, {Word, Rest}. %% Signed long slong() -> {fun write_slong/2, fun read_slong/1}. write_slong(Acc, Word) -> [<>|Acc]. read_slong(Bin) -> <> = Bin, {Word, Rest}. %% Unsigned little-endian long le_long() -> {fun write_le_long/2, fun read_le_long/1}. write_le_long(Acc, Word) -> [<>|Acc]. read_le_long(Bin) -> <> = Bin, {Word, Rest}. %% Signed little-endian long le_slong() -> {fun write_le_slong/2, fun read_le_slong/1}. write_le_slong(Acc, Word) -> [<>|Acc]. read_le_slong(Bin) -> <> = Bin, {Word, Rest}. %% List. We supply a pickler for list length %% as well as a pickler for list elements. list(Len, Elem) -> {fun(Acc, List) -> write_list(Len, Elem, Acc, List) end, fun(Bin) -> read_list(Len, Elem, Bin) end }. write_list({Len, _}, {Elem, _}, Acc, List) -> Acc1 = Len(Acc, length(List)), Fun = fun(A, Acc2) -> Elem(Acc2, A) end, lists:foldr(Fun, Acc1, List). read_list({_, Len}, {_, Elem}, Bin) -> {N, Bin1} = Len(Bin), read_list(N, [], Elem, Bin1). read_list(0, Acc, _, Bin) -> {Acc, Bin}; read_list(N, Acc, Elem, Bin) -> {E, Bin1} = Elem(Bin), read_list(N - 1, [E|Acc], Elem, Bin1). %% Alternative selection. This could probably use some %% deeper thinking. Otherwise, we take a pickler for the tag %% as well as a tuple of two functions. The first one %% returns the tag value and the pickler based on a supplied %% value. The second one selects a pickler based on the tag value. choice(Tag, Choice) -> {fun(Acc, Value) -> write_choice(Tag, Choice, Acc, Value) end, fun(Bin) -> read_choice(Tag, Choice, Bin) end }. write_choice({Tag, _}, {Choice, _}, Acc, Value) when is_function(Tag), is_function(Choice) -> {T, {Pickler, _}} = Choice(Value), Acc1 = Tag(Acc, T), Pickler(Acc1, Value). read_choice({_, Tag}, {_, Choice}, Bin) when is_function(Tag), is_function(Choice) -> {T, Bin1} = Tag(Bin), {_, Pickler} = Choice(T), Pickler(Bin1). %% Optional value. Use 'none' to indicate no value. optional(Pickler) -> {fun(Acc, Value) -> write_optional(Pickler, Acc, Value) end, fun(Bin) -> read_optional(Pickler, Bin) end}. write_optional(_, Acc, none) -> [<<0>>|Acc]; write_optional({Pickler, _}, Acc, Value) -> Pickler([<<1>>|Acc], Value). read_optional({_, Pickler}, Bin) -> <> = Bin, case Opt of 0 -> {none, Bin1}; _ -> Pickler(Bin1) end. %% Wrapper. Take a pickler and a wrapper tuple of two functions %% where the first one is used to convert the value before %% pickling and the second one after unpickling. wrap(Wrap, Pickler) -> {fun(Acc, Value) -> write_wrap(Wrap, Pickler, Acc, Value) end, fun(Bin) -> read_wrap(Wrap, Pickler, Bin) end}. write_wrap({Wrap, _}, {Pickler, _}, Acc, Value) -> Pickler(Acc, Wrap(Value)). read_wrap({_, Wrap}, {_, Pickler}, Bin) -> {Value, Bin1} = Pickler(Bin), {Wrap(Value), Bin1}. %% Erlang does not support enumerations but I want to have %% {cow, sheep, horse} as well as [{cow, 10}, {sheep, 100}] %% and be able to marshal these back and forth. Enumerated %% values start from 1 for the tuple case. prep_enum_tuple(Enum) when is_tuple(Enum) -> prep_enum_tuple(Enum, size(Enum), [], []). prep_enum_tuple(_, 0, Acc1, Acc2) -> {Acc1, Acc2}; prep_enum_tuple(Enum, N, Acc1, Acc2) -> prep_enum_tuple(Enum, N - 1, [{element(N, Enum), N}|Acc1], [{N, element(N, Enum)}|Acc2]). prep_enum_list(Enum) when is_list(Enum) -> % expect a list of {tag, #value} pairs Inv = fun({Key, Val}) -> {Val, Key} end, InvEnum = lists:map(Inv, Enum), {Enum, InvEnum}. wrap_enum(Enum) when is_tuple(Enum) -> wrap_enum_1(prep_enum_tuple(Enum)); wrap_enum(Enum) when is_list(Enum) -> wrap_enum_1(prep_enum_list(Enum)). wrap_enum_1({List1, List2}) -> F = fun(A, B) -> A < B end, % gb_trees needs an ordered list Dict1 = lists:sort(F, List1), Dict2 = lists:sort(F, List2), Tree1 = gb_trees:from_orddict(Dict1), Tree2 = gb_trees:from_orddict(Dict2), {fun(Key) -> gb_trees:get(Key, Tree1) end, fun(Key) -> gb_trees:get(Key, Tree2) end}. enum(Enum, Pickler) -> wrap(wrap_enum(Enum), Pickler). %% Tuple. Uses a tuple of picklers of the same size. tuple(Picklers) when is_tuple(Picklers) -> wrap({fun tuple_to_list/1, fun list_to_tuple/1}, tuple_0(tuple_to_list(Picklers))). %% Record. We rely on Erlang records being tuples %% and just add the record tag as the first element %% when unpickling the record. record(Tag, Picklers) when is_tuple(Picklers) -> wrap({fun(Record) -> record_to_list(Tag, Record) end, fun(List) -> list_to_record(Tag, List) end}, tuple_0(tuple_to_list(Picklers))). write_tuple_0([], Acc, _) -> Acc; write_tuple_0([{Pickler, _}|Rest], Acc, [Value|Tuple]) -> write_tuple_0(Rest, Pickler(Acc, Value), Tuple). read_tuple_0(Picklers, Bin) -> read_tuple_0(Picklers, Bin, []). read_tuple_0([], Bin, Acc) -> {lists:reverse(Acc), Bin}; read_tuple_0([{_, Pickler}|Rest], Bin, Acc) -> {Value, Bin1} = Pickler(Bin), read_tuple_0(Rest, Bin1, [Value|Acc]). %% It's convenient to be able to convert the tuple %% to a list first as there's no erlang:prepend_element/2. tuple_0(Picklers) when is_list(Picklers) -> {fun(Acc, Value) -> write_tuple_0(Picklers, Acc, Value) end, fun(Bin) -> read_tuple_0(Picklers, Bin) end}. record_to_list(Tag, Record) when is_atom(Tag) -> lists:nthtail(1, tuple_to_list(Record)). list_to_record(Tag, List) when is_atom(Tag), is_list(List) -> list_to_tuple([Tag|List]). %% Unit test -define(error1(Expr, Expected, Actual), io:format("~s is ~w instead of ~w at ~w:~w~n", [??Expr, Actual, Expected, ?MODULE, ?LINE])). -define(match(Expected, Expr), fun() -> Actual = (catch (Expr)), case Actual of Expected -> {success, Actual}; _ -> ?error1(Expr, Expected, Actual), erlang:error("match failed", Actual) end end()). check(Pickler, Value) -> X = pickle(Pickler, Value), Bin = list_to_binary(X), unpickle(Pickler, Bin). test() -> test1(), test2(), test3(), test4(), test5(), test6(), test7(), test8(), test9(), test10(), test11(), test12(), test13(), test14(), ok. test1() -> X = 16#ff, ?match(X, check(byte(), X)). test2() -> X = 16#ffff, ?match(X, check(short(), X)). test3() -> X = -1, ?match(X, check(sshort(), X)). test4() -> X = 16#ffffffff, ?match(X, check(int(), X)). test5() -> X = -1, ?match(X, check(sint(), X)). test6() -> X = 16#aabbccddeeff0011, ?match(X, check(le_long(), X)). test7() -> X = -1, ?match(X, check(slong(), X)). test8() -> X = "Wazzup!", ?match(X, check(list(int(), byte()), X)). %% A choice of serializing either a list or a long. value2tag(Action) when is_list(Action) -> {0, list(byte(), byte())}; value2tag(_) -> {1, long()}. tag2value(0) -> list(byte(), byte()); tag2value(1) -> long(). selector() -> {fun value2tag/1, fun tag2value/1}. test9() -> X1 = "Just testing", X2 = 16#ffff, ?match(X1, check(choice(byte(), selector()), X1)), ?match(X2, check(choice(byte(), selector()), X2)). %% Optional value test10() -> X1 = none, X2 = 55, ?match(X1, check(optional(byte()), X1)), ?match(X2, check(optional(byte()), X2)). %% Tuple given as a tuple and a list of key/value pairs. test11() -> % tuple enum Enum1 = {cow, sheep, horse}, {FROM1, TO1} = wrap_enum(Enum1), ?match(1, FROM1(cow)), ?match(2, FROM1(sheep)), ?match(3, FROM1(horse)), ?match(cow, TO1(1)), ?match(sheep, TO1(2)), ?match(horse, TO1(3)), % list enum Enum2 = [{cow, 20}, {sheep, 30}, {horse, 40}], {FROM2, TO2} = wrap_enum(Enum2), ?match(20, FROM2(cow)), ?match(30, FROM2(sheep)), ?match(40, FROM2(horse)), ?match(cow, TO2(20)), ?match(sheep, TO2(30)), ?match(horse, TO2(40)). test12() -> Enum1 = {cow, sheep, horse}, Enum2 = [{cow, 20}, {sheep, 30}, {horse, 40}], ?match(cow, check(enum(Enum1, byte()), cow)), ?match(sheep, check(enum(Enum2, byte()), sheep)). test13() -> Tuple = {"Joel", 16#ff00, none}, Spec = {list(byte(),byte()), le_short(), optional(byte())}, ?match(Tuple, check(tuple(Spec), Tuple)). %% Nested records. -record(foo, { a, b }). -record(bar, { c, d }). -record(baz, { e, f }). test14() -> R1 = #foo { a = 10, b = #bar { c = 20, d = #baz { e = 30, f = "Enough nesting!" } } }, Pickler = record(foo, { byte(), record(bar, { int(), record(baz, { le_sshort(), list(byte(), byte()) }) }) }), ?match(R1, check(Pickler, R1)). -- http://wagerlabs.com/ From lonnie_smith@REDACTED Mon Dec 26 07:01:40 2005 From: lonnie_smith@REDACTED (Lonnie Smith) Date: Sun, 25 Dec 2005 22:01:40 -0800 Subject: newbie orber question Message-ID: <1135576900.28847.250547071@webmail.messagingengine.com> Hi - I recently began experimenting with CORBA in Erlang, and I'm having some trouble with a pretty basic step: resolving an initial NameService reference. I've tried to follow the instructions in Orber manual, but so far am having no luck. $ erl -mnesia dir '"/usr/local/dbs/mnesia.orberdb"' Erlang (BEAM) emulator version 5.4.10 [source] [hipe] [threads:0] [kernel-poll] Eshell V5.4.10 (abort with ^G) 1> mnesia:create_schema([node()]). ok 2> mnesia:start(). ok 3> corba:orb_init([{domain, "MyDiscSingleNodeORB"}, {orbInitRef, "NameService=corbaname::vbox:21012"}, {orber_debug_level, 10}]). ok 4> orber:install([node()], [{ifr_storage_type, disc_copies}, {nameservice_storage_type, disc_copies}]). ok 5> orber:start(). ok 6> NS = corba:resolve_initial_reference("NameService"). =ERROR REPORT==== 25-Dec-2005::21:47:50 === Error in process <0.30.0> with exit value: {undef,[{corba,resolve_initial_reference,["NameService"]},{erl_eval,do_apply,5},{erl_eval,expr,5},{shell,exprs,6},{shell,eval_loop,3}]} ** exited: {undef,[{corba,resolve_initial_reference,["NameService"]}, {erl_eval,do_apply,5}, {erl_eval,expr,5}, {shell,exprs,6}, {shell,eval_loop,3}]} ** 7> corba:list_initial_services(). ["NameService","NameService"] It seems a bit odd that two "NameServices" are listed. If I call corba:list_initial_services() before starting the orber application, only one NameService is listed. If I don't specify an orbInitRef argument to the corba:orb_init() call, there is only one NameService listed, but I get the same error: $ erl -mnesia dir '"/usr/local/dbs/mnesia.orberdb"' Erlang (BEAM) emulator version 5.4.10 [source] [hipe] [threads:0] [kernel-poll] Eshell V5.4.10 (abort with ^G) 1> mnesia:start(). ok 2> corba:orb_init([{domain, "MyDiscSingleNodeORB"}, {orber_debug_level, 10}]). ok 3> corba:list_initial_services(). [] 4> orber:start(). ok 5> corba:list_initial_services(). ["NameService"] 6> NS = corba:resolve_initial_reference("NameService"). =ERROR REPORT==== 25-Dec-2005::21:52:44 === Error in process <0.30.0> with exit value: {undef,[{corba,resolve_initial_reference,["NameService"]},{erl_eval,do_apply,5},{erl_eval,expr,5},{shell,exprs,6},{shell,eval_loop,3}]} ** exited: {undef,[{corba,resolve_initial_reference,["NameService"]}, {erl_eval,do_apply,5}, {erl_eval,expr,5}, {shell,exprs,6}, {shell,eval_loop,3}]} ** I should add that I'm fairly new to Erlang, so I might be making some other mistakes as well. As I understand it, the orber-app/corba module is going to try to contact the OMG compliant Name Service at the specified host and port number. If I'm running an omniORB's omniNames server listening on vbox:21012, the orber-app/corba-module should be able to use that Name Service, right? I'd like to be able to begin using Erlang in a C++/Python omniORB environment, but so far I'm not getting stuck on the first step. Thanks for any thoughts or suggestions. Lonnie -- Lonnie Smith lonnie_smith@REDACTED -- http://www.fastmail.fm - Accessible with your email software or over the web From klacke@REDACTED Mon Dec 26 11:52:45 2005 From: klacke@REDACTED (Claes Wikstrom) Date: Mon, 26 Dec 2005 11:52:45 +0100 Subject: newbie orber question In-Reply-To: <1135576900.28847.250547071@webmail.messagingengine.com> References: <1135576900.28847.250547071@webmail.messagingengine.com> Message-ID: <43AFCB7D.7040704@hyber.org> Lonnie Smith wrote: > $ erl -mnesia dir '"/usr/local/dbs/mnesia.orberdb"' This is right I think. There is some weirdness with how quotes qet unquoted. > ** exited: {undef,[{corba,resolve_initial_reference,["NameService"]}, > {erl_eval,do_apply,5}, > {erl_eval,expr,5}, > {shell,exprs,6}, > {shell,eval_loop,3}]} ** > And this one is easy, it just means that the corba module doesn't have a function called resolve_initial_reference/1 You just need to read the manual again. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From myv@REDACTED Thu Dec 22 21:14:06 2005 From: myv@REDACTED (MYV) Date: Thu, 22 Dec 2005 14:14:06 -0600 (CST) Subject: 2006 Programme on Logic and Algorithms - Workshops Message-ID: <20051222201406.238544A9C5@cs.rice.edu> During the first half of 2006, the Isaac Newton Institute for Mathematical Sciences at Cambridge, UK, will hold a Special Programme on Logic and Algorithms. The programme will include six workshops: 9 - 13 January Finite and Algorithmic Model Theory (A Satellite Meeting at Durham) 27 February - 3 March Logic and Databases 20 - 24 March Mathematics of Constraint Satisfaction: Algebra, Logic and Graph Theory (A Satellite Meeting at Oxford) 10 - 13 April New Directions in Proof Complexity 8 - 12 May Constraints and Verification 3 - 7 July Games and Verification The workshops are open to participation. See http://www.newton.cam.ac.uk/programmes/LAA/ws.html To join the mailing list, see http://www.newton.cam.ac.uk/programmes/LAA/list.html For further information, contact vardi at cs dot rice dot edu. Moshe Vardi From jim@REDACTED Fri Dec 23 07:41:29 2005 From: jim@REDACTED (Jim Larson) Date: Thu, 22 Dec 2005 22:41:29 -0800 Subject: JSON? In-Reply-To: Your message of "Thu, 22 Dec 2005 09:51:15 +0100." <20051222085115.803B459185@bang.trapexit.org> Message-ID: <200512230641.jBN6fTQc032230@krumkake.jetcafe.org> In message <20051222085115.803B459185@REDACTED> you write: >I was just wondering if you ever did release that JSON library of yours, >and if so, where can I get it ? My release plans were interrupted by illness. I'll be putting something out next week. Jim Larson jim@REDACTED From jmj@REDACTED Fri Dec 23 13:11:48 2005 From: jmj@REDACTED (Jean-Marie JACQUET) Date: Fri, 23 Dec 2005 13:11:48 +0100 (MET) Subject: Coordination 2006: Third call for papers Message-ID: <200512231211.jBNCBmH24946@backus.info.fundp.ac.be> [ Our apologies for multiple copies. ] ====================================================================== Third 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 abstract: 10 January 2006 * Submission of papers: 17 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 in PostScript or PDF using a two-phase online submission process. Registration of the paper information and abstract (max. 250 words) must be completed before 10 January 2006. Submission of the full paper is due no later than 17 January 2006. Further instructions on the submission procedure are published 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 hasse@REDACTED Fri Dec 23 13:19:15 2005 From: hasse@REDACTED (Hans Bolinder) Date: Fri, 23 Dec 2005 13:19:15 +0100 Subject: mnesia qlc error In-Reply-To: <43A2A67F.3090402@redstarling.com> References: <43A2A67F.3090402@redstarling.com> Message-ID: <17323.60227.342353.108184@gargle.gargle.HOWL> > Using erl R10B-8 (5.4.10), I have a table defined by: > > mnesia:create_table(target, > [{attributes, record_info(fields, target)}, > {disc_copies, [node()]}, > {type, set}]) > where target is: > > -record(target, {id, % string > name, % string > actions}). % List if action id > > I have a function: > > targetMgr:findTarget/1: > > findTarget(TargetName) -> > F = fun() -> > Q = qlc:q([Target || Target <- mnesia:table(target), > Target#target.name == TargetName]), > qlc:e(Q) > end, > mnesia:transaction(F). > > In an erlang shell, a call of targetMgr:findTarget("hello") yields an error: > > 17> targetMgr:findTarget("hello"). > {aborted,{function_clause,[{targetMgr,'-findTarget/1-lc$^0/1-0-', 1> [{qlc_handle, > {qlc_table, > #Fun, > true, > #Fun, > #Fun, > #Fun, > #Fun, > #Fun, > #Fun, > undefined, > undefined, > no_match_spec}}, > "hello"]}, > {targetMgr,'-findTarget/1-fun-0-',1}, > {mnesia_tm,apply_fun,3}, > {mnesia_tm,execute_transaction,5}, > {erl_eval,do_apply,5}, > {shell,exprs,6}, > {shell,eval_loop,3}]}} You should add the line -include_lib("stdlib/include/qlc.hrl"). to the source file. > If I rewrite this call as: > > findTarget(TargetName) -> > Target = #target{name = TargetName, _ = '_'}, > F = fun() -> mnesia:match_object(Target) end, > mnesia:transaction(F). > > It works... A side note: this is not exactly the same as the QLC query since mnesia:match_object uses matching (=:=/2) rather than comparison (==/2). Assuming that 'name' is not the key and that there is no index on 'name' it is OK to use ==/2 in this case since the whole table is traversed anyway. But otherwise =:=/2 is to be preferred since it makes it possible for QLC to look up the value (possibly using an index). Note however that =:=/2 cannot be used if either operand could be a floating point number F such that round(F) == F since matching with the integer round(F) would fail. Best regards Hans Bolinder, Erlang/OTP From camster@REDACTED Fri Dec 23 15:25:06 2005 From: camster@REDACTED (Richard Cameron) Date: Fri, 23 Dec 2005 14:25:06 +0000 Subject: SOAP (again?) In-Reply-To: <43AA7BD8.1050500@hyber.org> References: <43AA7BD8.1050500@hyber.org> Message-ID: On 22 Dec 2005, at 10:11, Claes Wikstom wrote: > I've been doing quite a lot of SOAP client programming > lately and I sure can't say I liked it. It sucks bigtime. I have to agree. It's the join product of a technical committee's twisted minds, and a marketing department's irony-free use of the word "simple" in the acronym. > 1. Ask the WebServices provider to give me a good > tcpdump capture of one good and one bad case. > > 2. Send raw XML structures to the WebServices provider > with my dataitems inserted, > > 3. xmerl parse the reply. I tried that initially, but slowly got caught with anything but the simplest calls. For instance when an optional element I hadn't seen before in a complex data type appeared then I just didn't know what to do with it (not having read the .wsdl file to understand the schema). > To my knowledge there is no good SOAP lib available today, > One key componenet that is missing is an XML-Schema parser > which is non trivial. I tried various "proper" SOAP clients in the end. My first attempt was to use a Java node running Apache Axis and make it visible to Erlang using jinterface. That worked reasonably well, but tended to be quite CPU-heavy when processing *lots* of messages per second. I eventually went with gSoap which compiles the .wsdl file into C or C++ code which can act as either as a client or a server. I then got Erlang to talk to this C process over a port. The advantage is that it runs absolutely blindingly fast (about 3% CPU versus Apache Axis's 60% - although it was a while ago, so the Java implementation may now have improved). The downside is that there's some incredibly dull "glue code" to write for every single method which can drive the average man insane in next to no time. Richard. From dmitriid@REDACTED Fri Dec 23 15:40:23 2005 From: dmitriid@REDACTED (Dmitrii Dimandt) Date: Fri, 23 Dec 2005 16:40:23 +0200 Subject: SOAP (again?) In-Reply-To: References: <43AA7BD8.1050500@hyber.org> Message-ID: On 12/23/05, Richard Cameron wrote: > > On 22 Dec 2005, at 10:11, Claes Wikstom wrote: > > > I've been doing quite a lot of SOAP client programming > > lately and I sure can't say I liked it. It sucks bigtime. > > I have to agree. It's the join product of a technical committee's > twisted minds, and a marketing department's irony-free use of the > word "simple" in the acronym. Yeah. And then there's Microsoft's s:any which isn't parsed by either Apache Axis or gSOAP From neumann@REDACTED Tue Dec 27 04:35:12 2005 From: neumann@REDACTED (=?utf-8?q?Fran=C3=A7ois-Denis_Gonthier?=) Date: Mon, 26 Dec 2005 22:35:12 -0500 Subject: Erlang 10.b.9 compile bug on Debian GNU/Linux SPARC [was: Fwd: Bug#328031: Fwd: erlang 10.b.9] Message-ID: <200512262235.15992.neumann@lostwebsite.net> Erlang 10.b.9 was ready to be uploaded when this guy came in on an old compile bug on sparc for version 10.b.7. I suggested that he try the 10.b.9 package and he came up with this. Having no access to sparc machines, so I'm ressorting to you guys. Can anyone confirm, infirm, or contribute anything to this bug? Attached is the first patch he contributed. ---------- Forwarded Message ---------- Subject: Bug#328031: Fwd: erlang 10.b.9 Date: 22 December 2005 00:59 From: Jurij Smakov To: 328031@REDACTED On Tue, 20 Dec 2005, Fran?ois-Denis Gonthier wrote: > Erlang 10.b.9 is just around the corner, and it's probably not too late to > upload it with your patch. > > Could you please download the current version of the erlang 10.b.9 package > and try to build it on Sparc? It's at http://neutronic.mine.nu/unstable The source package downloaded from this site fails to build on sparc due to a different error. It happens while compiling the source file erts/emulator/beam/erl_bif_info.c: beam/erl_bif_info.c:1041: error: 'am_ultrasparc' undeclared (first use in this function) beam/erl_bif_info.c:1041: error: (Each undeclared identifier is reported only once beam/erl_bif_info.c:1041: error: for each function it appears in.) You can find a complete build log at http://www.wooyd.org/debian/erlang/ I'm including the md5sums of the source package files for reference: 576ca7d14891e6b0b9dad7bc27745ed7 erlang_10.b.9-1.diff.gz c6e536f7b739a1d453fabe68d9dd52de erlang_10.b.9-1.dsc 05791e9097f36202eb705df2a1db6500 erlang_10.b.9.orig.tar.gz Best regards, Jurij Smakov jurij@REDACTED Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC ------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: erlang-beam_emu.patch Type: text/x-diff Size: 788 bytes Desc: not available URL: -------------- 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 Tue Dec 27 06:41:02 2005 From: lonnie_smith@REDACTED (Lonnie Smith) Date: Mon, 26 Dec 2005 21:41:02 -0800 Subject: newbie orber question In-Reply-To: <43AFCB7D.7040704@hyber.org> References: <1135576900.28847.250547071@webmail.messagingengine.com> <43AFCB7D.7040704@hyber.org> Message-ID: <1135662062.1737.250587584@webmail.messagingengine.com> Thanks for the help - corba:resolve_initial_references/1 did the trick. Didn't check the module's documentation before posting...tsk,tsk. Lonnie On Mon, 26 Dec 2005 11:52:45 +0100, "Claes Wikstrom" said: > Lonnie Smith wrote: > > > $ erl -mnesia dir '"/usr/local/dbs/mnesia.orberdb"' > > This is right I think. There is some weirdness with how > quotes qet unquoted. > > > > ** exited: {undef,[{corba,resolve_initial_reference,["NameService"]}, > > {erl_eval,do_apply,5}, > > {erl_eval,expr,5}, > > {shell,exprs,6}, > > {shell,eval_loop,3}]} ** > > > > > And this one is easy, it just means that the > corba module doesn't have a function called > resolve_initial_reference/1 > > You just need to read the manual again. > > > /klacke > > > -- > Claes Wikstrom -- Caps lock is nowhere and > http://www.hyber.org -- everything is under control > cellphone: +46 70 2097763 -- Lonnie Smith lonnie_smith@REDACTED -- http://www.fastmail.fm - Access all of your messages and folders wherever you are From rohini@REDACTED Tue Dec 27 07:22:12 2005 From: rohini@REDACTED (Rohini V) Date: Tue, 27 Dec 2005 11:52:12 +0530 Subject: error encountered while loading the example Mib "EX1-MIB". Message-ID: <30BFDEA66FF4D41191EB00D0B765BC6F019169AB@medha.wsspl.com> I am trying to execute the example provided along with snmp. But, I get the following error. Any idea whats going wrong here. 33> application:start(sasl). 34> application:start(snmp). 35> snmpc:compile("EX1-MIB"). {ok,"./EX1-MIB.bin"} 36> snmpa:load_mibs(snmp_master_agent,["EX1-MIB"]). ** exited: {noproc,{gen_server,call, [snmp_master_agent, {load_mibs,["EX1-MIB"]}, infinity]}} ** From mikpe@REDACTED Tue Dec 27 09:04:21 2005 From: mikpe@REDACTED (Mikael Pettersson) Date: Tue, 27 Dec 2005 09:04:21 +0100 (MET) Subject: Erlang 10.b.9 compile bug on Debian GNU/Linux SPARC [was: Fwd: Bug#328031: Fwd: erlang 10.b.9] Message-ID: <200512270804.jBR84LDv029331@harpo.it.uu.se> On Mon, 26 Dec 2005 22:35:12 -0500, Denis Gonthier wrote: >Erlang 10.b.9 was ready to be uploaded when this guy came in on an old comp= >ile=20 >bug on sparc for version 10.b.7. I suggested that he try the 10.b.9 packag= >e=20 >and he came up with this. > >Having no access to sparc machines, so I'm ressorting to you guys. > >Can anyone confirm, infirm, or contribute anything to this bug? > >Attached is the first patch he contributed. > >=2D--------- Forwarded Message ---------- > >Subject: Bug#328031: Fwd: erlang 10.b.9 >Date: 22 December 2005 00:59 >=46rom: Jurij Smakov >To: 328031@REDACTED > >On Tue, 20 Dec 2005, Fran=E7ois-Denis Gonthier wrote: >> Erlang 10.b.9 is just around the corner, and it's probably not too late to >> upload it with your patch. >> >> Could you please download the current version of the erlang 10.b.9 package >> and try to build it on Sparc? It's at http://neutronic.mine.nu/unstable > >The source package downloaded from this site fails to build on sparc due >to a different error. It happens while compiling the source file >erts/emulator/beam/erl_bif_info.c: > >beam/erl_bif_info.c:1041: error: 'am_ultrasparc' undeclared (first use in > this function) beam/erl_bif_info.c:1041: error: (Each undeclared identifier > is reported only once beam/erl_bif_info.c:1041: error: for each function it > appears in.) > >You can find a complete build log at http://www.wooyd.org/debian/erlang/ According to the build log, the build was conducted on a machine claiming (via uname) to be "sparc64", running in 32-bit mode (sizeof(void*)==4), with HiPE enabled by ./configure and not disabled by erts/configure. The error (am_ultrasparc undefined) indicates that HiPE didn't quite recognise the machine as being an ultrasparc. My guess is that either erts/configure.in isn't properly handling Debian's uname results on SPARC64-in-32-bit-mode, or that GCC on Debian SPARC64-in-32-bit-mode isn't defining the same preprocessor symbols that GCC on Solaris does: see erts/emulator/hipe/hipe_arch.h for example. We (the HiPE group) can only test SPARC under Solaris, so someone else needs to do the detailed analysis (or provide us with an account on the affected machine). HOWEVER, the build log also indicates that floating-point exceptions aren't reliable on the machine. This is not surprising since neither we (HiPE) nor (I think) Ericsson/OTP run SPARCs under Linux, but it also means that HiPE won't work unless everything is compiled with "no-inline-fp". FP exceptions do work on SPARCs under Solaris and {x86,amd64,ppc32} under Linux, so it's probably not difficult to make this work. Again, we can't do this porting work due to lack of access to SPARC/Debian boxes. /Mikael From y-isobe@REDACTED Tue Dec 27 04:32:41 2005 From: y-isobe@REDACTED (Yoshinao Isobe) Date: Tue, 27 Dec 2005 12:32:41 +0900 Subject: CFP: ASE 2006 Message-ID: <053501c60a96$31691420$d1631d96@isobe3> 21th IEEE/ACM International Conference on Automated Software Engineering (ASE 2006) September 18-22, 2006 Tokyo, JAPAN http://www.ase-conference.jp --------- IMPORTANT DATES for Submissions --------- Workshop Proposal: February 15, 2006 Electronic Abstracts of Paper: February 24, 2006 Paper Submission: March 3, 2006 Tutorial Proposal: April 14, 2006 Doctoral Symposium Submissions: May 2, 2006 Tool Demo Submission: May 10, 2006 Workshop Paper Submission: June 23, 2006 ---------------------------------------------------------------------- The IEEE/ACM International Conference on Automated Software Engineering brings together researchers and practitioners to share ideas on the foundations, techniques, tools, and applications of automated software engineering technology. We invite contributions that address theoretical foundations, practical techniques, software tools, applications and/or experience reports in automated software engineering. ASE 2006 will include technical papers, invited talks, tutorials, workshops, tool demonstrations, and a doctoral symposium. General Chair Shinichi Honiden (honiden@REDACTED) National Institute of Informatics (NII), Japan http://research.nii.ac.jp/~honiden/ Program Co-Chairs Sebastian Uchitel (su2@REDACTED) Imperial College London, UK http://www.doc.ic.ac.uk/~su2/ Steve Easterbrook (sme@REDACTED) University of Toronto, Canada http://www.cs.toronto.edu/~sme/ +------------------------------+ | Call for Papers | +------------------------------+ Software engineering is concerned with the analysis, design, implementation, testing, and maintenance of large software systems. Automated software engineering is concerned with how to automate or partially automate these tasks to achieve significant improvements in quality and productivity. ASE 2006 encourages contributions describing basic research, novel applications and experience reports. In all cases, papers should carefully articulate the relevance of their contributions to the automation of software engineering tasks. The ASE on-line Bibliography serves as a reference for potential contributors: http://ase.informatik.uni-essen.de/olbib/index.html Solicited topics include, but are not limited to: - Automated reasoning techniques - Component-based systems - Computer-supported cooperative work - Configuration management - Domain modeling and meta-modeling - Human computer interaction - Knowledge acquisition & modeling - Knowledge management for SE - Maintenance and evolution - Modeling language semantics - Ontologies and methodologies - Open systems development - Product line architectures - Program understanding - Re-engineering - Reflection and Metadata approaches - Requirements engineering - Specification languages - Software architecture - Software design and synthesis - Software visualization - Testing - Tutoring, help, documentation systems - Verification and validation IEEE Computer Society Press will publish accepted papers in the conference proceedings. In addition, authors of a selection of papers from the conference will be invited to revise and re-submit extended versions of their papers for consideration for a special issue of the Journal of Automated Software Engineering (Kluwer). Papers submitted to ASE 2006 must not have been previously published, and must not be under review for publication elsewhere. Papers must STRICTLY adhere to submission guidelines. Papers exceeding the page limit or using condensed formatting will be administratively rejected and will not be reviewed. Papers must not exceed 10 pages in the conference format. All papers that conform to submission guidelines will be submitted to a rigorous peer review process. All papers should be submitted by March 3, 2006 (abstracts should be submitted by February 24). More details are available at http://www.ase-conference.jp/CallForPapers.html . Important Dates for Papers: Electronic abstracts due: February 24, 2006 Paper submission deadline: March 3, 2006 Paper notification date: May 20, 2006 Camera-ready paper due: June 30, 2006 +------------------------------+ | Call for Workshops | +------------------------------+ ASE 2006 invites submissions of workshop proposals. The workshops co-located with the conference should provide an opportunity for exchanging views, advancing ideas, and discussing preliminary results on topics related to software engineering research and applications. Workshops should not be seen as an alternative forum for presenting full research papers. The workshops co-located with the conference will be held before the conference on September 18-19. A workshop may last one or two days. Workshop proposals should be written in English, not exceed 3 pages and submitted in PDF format via email to both workshop co-chairs. Proposals for organizing workshops should be prepared following the guidelines available at http://www.ase-conference.jp/CallForWorkshops.html or contact the Workshop Co-chairs for more information. Important Dates for Workshops: Workshop proposal deadline: February 15, 2006 Workshop proposal notification: March 1, 2006 Launch of calls for papers of accepted workshops: March 8, 2006 Workshop paper submission deadline: June 23, 2006 Workshop paper notification date: July 28, 2006 Final camera-ready copy of workshop papers: August 30, 2006 Workshop Co-chairs: Kathi Fisler (kfisler@REDACTED) Worcester Polytechnic Institute, USA http://web.cs.wpi.edu/~kfisler/ Hironori Washizaki (washizaki@REDACTED) National Institute of Informatics, Japan http://www.washizaki.net/index.html +------------------------------+ | Call for Tutorials | +------------------------------+ ASE 2006 invites half-day/full-day tutorials addressing theoretical foundations, practical techniques, software tools, and applications in areas related to the ASE topics. A Tutorial program that gives attendees the opportunity to gain new insights, knowledge and skills on evolving and emerging research topics in the area of automated software engineering will be an essential part of the ASE 2006. The Tutorials are scheduled for September 18 and 19, 2006 at the beginning of the ASE 2006 conference. Survey papers and/or tutorial notes will be made available to the tutorial attendees at the conference. Tutorials are intended to provide independent instruction on a relevant theme, therefore no commercial or sales-oriented presentations will be accepted. Instructors are invited to submit proposals for half-day and full-day tutorials and, upon selection, are required to provide tutorial notes or a survey paper on the topic of presentation in PDF. Proposals in PDF should be sent to both Tutorials Co-Chairs. See http://www.ase-conference.jp/CallForTutorials.html or contact the Tutorials Co-Chairs for more details. Important Dates for Tutorials: Submission deadline: April 14, 2006 Author notification: June 4, 2006 Tutorials: September 18-19, 2006 Tutorials Co-Chairs: Andrew Ireland (a.ireland@REDACTED) Heriot-Watt University, UK http://www.cee.hw.ac.uk/~air/ Katsuhisa Maruyama (maru@REDACTED) Ritsumeikan University, Japan http://www.fse.is.ritsumei.ac.jp/~maru/ +------------------------------+ | Call for Tool Demonstrations | +------------------------------+ Tools are central to automated software engineering. Hence, tool demonstrations will have a prominent role in the conference. Demonstrators will be expected to present their tools during one or more sessions that will be scheduled into the conference program. In addition, a 2-page paper will be published in the conference proceedings for each accepted tool demonstration. ASE 2006 solicits proposals for tool demonstrations related to automated software engineering. Tools can range from alpha-versions to fully developed products that are being prepared for commercialization. Products that are currently being commercialized will not be accepted as subjects of demonstrations. Tool demonstrations are not intended to be sales pitches, and should consequently highlight technical contributions. For further clarification, See http://www.ase-conference.jp/CallForDemonstrations.html or contact the Demonstrations Co-Chairs. Important Dates for Tool Demonstrations: Demo submission deadline: May 10, 2006 Notification date: June 2, 2006 Camera-ready due: June 30, 2006 Demonstrations Co-Chairs Nicolas Kicillof (nicok@REDACTED) University of Buenos Aires, Argentina http://www.dc.uba.ar/people/profesores/nicok/ Katsuhiko Gondow (gondow@REDACTED) Tokyo Institute of Technology, Japan http://www.sde.cs.titech.ac.jp/~gondow/index-e.html +------------------------------+ | Call for Doctoral Symposium | +------------------------------+ The ASE 2006 Doctoral Symposium seeks to bring together PhD students working on foundations, techniques, tools and applications of automated software engineering and give them the opportunity to present and to discuss their research with researchers in the ASE community in a constructive atmosphere. Specifically, the symposium aims to provide a setting whereby students receive feedback on their research and guidance on future directions from a broad group of advisors, foster a supportive community of scholars and a spirit of collaborative research, and contribute to the conference goals through interaction with other researchers and conference events. The Doctoral Symposium will be held on September 18, two days before the main conference. Selected students will present their work and receive constructive feedback from a panel of advisors and other Doctoral Symposium students. Note that advisors of student presenters will not be allowed to attend their student's presentations. In addition to scientific matters, students will have the opportunity to seek advice on various aspects of completing a PhD and performing research as a young professional in automated software engineering. For more information, see http://www.ase-conference.jp/CallForDoctoralSymposium.html or contact the Doctoral Symposium chairs. Important Dates for Doctoral Symposium: Deadline for submission: May 2, 2006 Notification of acceptance: June 9, 2006 Camera-ready paper due: July 7, 2006 Symposium Presentations: September 18, 2006 Doctoral Symposium Co-Chairs: Alexander Egyed (aegyed@REDACTED) Teknowledge Corporation, USA http://www.alexander-egyed.com/index.html Bernd Fischer (b.fischer@REDACTED) University of Southampton, UK http://ti.arc.nasa.gov/people/fischer/ ---------------------------------------------------------------------- For further information, please visit the conference website http://www.ase-conference.jp/ or contact the Publicity Chair. Publicity Chair Yoshinao Isobe (y-isobe@REDACTED) AIST, Japan http://staff.aist.go.jp/y-isobe From niranjan@REDACTED Tue Dec 27 12:42:17 2005 From: niranjan@REDACTED (Niranjan Gunasekera) Date: Tue, 27 Dec 2005 17:42:17 +0600 Subject: How to handle callback functions using port control Message-ID: <017e01c60ada$96936c30$6b00a8c0@wavenet.lk> Hi Is it possible to send an asynchronous callback function event from c language to erlang using erlang port control? If so how can we acheive it? (I have called a c function through erlang port control. But it is a asynchronous callback function. So I need to send the c function finish event back to the erlang. How can I achieve this? Can I use driver_event function? If so how?) Thanks Niranjan Gunasekera -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjarne@REDACTED Tue Dec 27 20:18:54 2005 From: bjarne@REDACTED (=?Windows-1252?Q?Bjarne_D=E4cker?=) Date: Tue, 27 Dec 2005 20:18:54 +0100 Subject: EFTS 2006 International Workshop on Engineering of Fault Tolerant Systems Message-ID: <000701c60b1a$634a3260$150969d4@segeltorp> CALL FOR PAPERS EFTS 2006 International Workshop on Engineering of Fault Tolerant Systems 12 - 14 June 2006 Luxembourg, LUXEMBOURG http://efts2006.uni.lu IMPORTANT DEADLINES Submission deadline: 16 March 2006 Author notification: 20 April 2006 Camera-ready copy: 16 May 2006 Workshop: 12-14 June 2006 PURPOSE Software and hardware systems have become increasingly used in many industrial sectors, such as manufacturing, aerospace, transportation, communication, energy supply and healthcare. Failures due to software or hardware malfunctions, users? mistakes and malicious intentions can have serious economics consequences, but can also endanger human life. Fault tolerance prevents system failures and is intended to ensure that it delivers the required service in spite of faults and errors which it might encounter and as such it is crucial for meeting high reliability and availability requirements. Fault tolerance engineering during the entire life cycle of the system has been advocated by some researchers as one of the main approaches to ensuring the overall system dependability. In particular, it has been recognized that different classes of faults, errors and failures must be identified and dealt with at each phase of software development, depending on the abstraction level used in modelling the software system under development. A number of studies have been conducted so far in these areas, but understanding where and how fault-tolerance should be integrated in the software life-cycle still requires major research efforts. This international workshop builds on this trend and aims at investigating how fault tolerance mechanisms can be taken into account when engineering complex software systems. To address the new problems the system developers are facing nowadays (such as identifying the places where fault tolerance means must be applied and the degree of fault tolerance that must be achieved) we need novel models to be applied at different abstraction levels (requirement, architecture and design models for fault tolerance, together with new implementation schemes), innovative technologies (tools and frameworks for implementing distributed fault tolerant systems) and advanced verification environments (to assess the achieved level of fault tolerance and to evaluate the dependability properties of the systems). Recently there has been growing interest in the areas directly related and overlapping with fault tolerance, such as system self-healing, resilience, self-managing and self-management. The topics related to engineering of systems with such properties are in the scope of the workshop as the intention is to improve the current understanding of how fault tolerance engineering can benefit from research on these areas. EFTS 2006 is the appropriate venue to reflect on the achievements of the researchers and practitioners in the fields of software engineering and fault tolerance, bringing together people from these two communities. LOCATION EFTS 2006 will be held in Luxembourg (http://www.luxembourg.co.uk/nutshell.html) at the Faculty of Sciences, Technologies and Communications of the University of Luxembourg (see http://www.uni.lu and http://www.ist.lu). SCOPE The following constitute the core list of the topics that form the focal point of the workshop. However, this list should not be considered as closed or technically restrictive for paper submissions: - Software architecture and fault tolerance; - UML/MDA modelling of fault tolerance; - OO frameworks and design patterns for fault tolerance; - Error handling and fault handling in the software life-cycle; - Re-engineering fault tolerance; - Component-based development and fault-tolerance; - Fault tolerant software development processes; - Error recovery through exception handling in the software life-cycle; - Design and implementation of fault tolerant distributed systems; - (Coordinated) atomic actions in the software life-cycle; - Rigorous approach to fault-tolerance programming; - Dynamic reconfiguration for fault-tolerance assurance; - Verification and validation of fault tolerant systems. PROGRAM CHAIRS Patrizio Pelliccione (University of Luxembourg, LUXEMBOURG) Henry Muccini (University of L?Aquila, ITALY) Nicolas Guelfi (University of Luxembourg, LUXEMBOURG) Alexander Romanovsky (University of Newcastle upon Tyne, UK) INTERNATIONAL PROGRAM COMMITTEE (Preliminary list) Bondavalli Andrea, Univ. Florence - Italy Canfora Gerardo, Univ. Sannio ?Italy Cortellessa Vittorio, Univ. of L?Aquila - Italy Crnkovic Ivica, M?lardalen University - Sweden De Lemos Rog?rio, Canterbury Kent ? UK Di Nitto Elisabetta, Univ. Milano - Italy Di Giandomenico Felicita, CNR ? Italy Gnesi Stefania, CNR - Italy Grassi Vincenzo, Univ. Roma Tor Vergata ? Italy Grosspietsch Karl Erwin, GMD - Germany Guelfi Nicolas, Univ. Luxembourg ? Luxembourg Inverardi Paola, Univ. L?Aquila ? Italy Issarny Valerie, INRIA ? France Kaaniche Mohamed, LAAS-CNRS ? FRANCE Kienzle Jorg, Mc Gill University, Montreal ? Canada Majzik Istvan, BME, Budapest - Hungary Mirandola Raffaela, Politecnico di Milano ? Italy Muccini Henry, Univ. L?Aquila ? Italy Pelliccione Patrizio, Univ. Luxembourg ? Luxembourg Romanovsky Alexander, Univ. of Newcastle upon Tyne Rubira Cecilia Mary Fischer, UNICAMP ? BRASIL Schoitsch Erwin, ARC Seibersdorf Research (AARIT) ? Austria Tam Francis, Nokia Research Centre, Helsinki ? Finland Troubitsyna Elena, FIN Turku ? Finland ORGANISING COMMITTEE Berlizev Andrey, UoL, Luxembourg Capozucca Alfredo, UoL, Luxembourg Di Renzo Sonja, UoL, Luxembourg Gallina Barbara, UoL, Luxembourg Guelfi Nicolas, UoL, Luxembourg Monnat Andreea, UoL, Luxembourg Muccini Henry, University of L?Aquila, ITALY Pelliccione Patrizio, UoL, Luxembourg Romanovsky Alexander, University of Newcastle upon Tyne, UK SUBMISSION OF PAPERS Submissions must be original and should not be under consideration for publication while being evaluated for this workshop. All papers submitted to this workshop will be peer reviewed by three members of the International Program Committee. Acceptance will be primarily based on originality and contribution to the area. All accepted papers will be included in a workshop proceedings printed as the technical report at University of Luxembourg - LUXEMBOURG. The authors of the selected papers will be invited to prepare chapters for the book: SOFTWARE ENGINEERING AND FAULT TOLERANCE (Series on Software Engineering and Knowledge Engineering) to be published in 2007 by World Scientific Publishing Co. Pte. Ltd (http://www.worldscientific.com/). Workshop submissions are to be prepared in the 9 x 6 inches format. Information and the latex and word styles may be found at the following address (general style) http://www.wspc.com/style/proceedings_style.shtml. Papers must not exceed 12 pages, including figures, tables and references. The papers must be electronically submitted in the PDF or PS formats. From joelr1@REDACTED Wed Dec 28 20:19:54 2005 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 28 Dec 2005 19:19:54 +0000 Subject: Pattern matching: Skipping the rest of a tuple Message-ID: <6EE899CE-91B4-4056-A231-01E6A91612D4@gmail.com> Folks, Is it possible to write a function to pattern-match on tuples of various sizes _without_ using element(X, Tuple)? I'm dealing with records of different length and would like to say things like match({record1, _, 20, _/rest}) -> ... match({record2, 30, _/rest}) -> ... etc. I don't believe there is a syntax for "I don't care about the rest of the tuple". It looks to me like I would need to supply _ for every element that I'm ignoring. Is that right? I know about { ..., _ = _ } but I think it only works on assignment. Thanks, Joel -- http://wagerlabs.com/ From ulf@REDACTED Wed Dec 28 23:27:16 2005 From: ulf@REDACTED (Ulf Wiger) Date: Wed, 28 Dec 2005 23:27:16 +0100 Subject: Pattern matching: Skipping the rest of a tuple In-Reply-To: <6EE899CE-91B4-4056-A231-01E6A91612D4@gmail.com> References: <6EE899CE-91B4-4056-A231-01E6A91612D4@gmail.com> Message-ID: Well, if you want to do something really absurd, try this: Eshell V5.4.8 (abort with ^G) 1> rd(rec, {a,b,c}). rec 2> R = #rec{a=1,b=2,c=3}. #rec{a = 1,b = 2,c = 3} 3> MS = ets:match_spec_compile([{#rec{a=1,_='_'},[],[true]}]). <<>> 4> ets:match_spec_run([R],MS). [true] 13> MS2 = ets:match_spec_compile([{{rec1,1,'_'},[],[true]},{{rec2,1,'_','_'},[], [true]}]). <<>> 14> ets:match_spec_run([{rec1,1,2},{rec2,1,1,2}],MS2). [true,true] Actually executing match_spec_run/2 is most likely quite efficient as well. (: /Uffe Den 2005-12-28 20:19:54 skrev Joel Reymont : > Folks, > > Is it possible to write a function to pattern-match on tuples of various > sizes _without_ using element(X, Tuple)? > > I'm dealing with records of different length and would like to say > things like > > match({record1, _, 20, _/rest}) -> ... > match({record2, 30, _/rest}) -> ... > etc. > > I don't believe there is a syntax for "I don't care about the rest of > the tuple". It looks to me like I would need to supply _ for every > element that I'm ignoring. > > Is that right? > > I know about { ..., _ = _ } but I think it only works on assignment. > > Thanks, Joel > > -- > http://wagerlabs.com/ > > > > > -- Ulf Wiger From joelr1@REDACTED Thu Dec 29 00:43:39 2005 From: joelr1@REDACTED (Joel Reymont) Date: Wed, 28 Dec 2005 23:43:39 +0000 Subject: Pattern matching: Skipping the rest of a tuple In-Reply-To: References: <6EE899CE-91B4-4056-A231-01E6A91612D4@gmail.com> Message-ID: Uffe, Thank you kindly for offering an in-depth solution. Isn't it ... just a touch complicated, though? I suppose that everything is best learned in comparison and thus I'll stick with element(X,Tuple) :-). Thanks, Joel On Dec 28, 2005, at 10:27 PM, Ulf Wiger wrote: > Well, if you want to do something really absurd, try this: > > Eshell V5.4.8 (abort with ^G) > 1> rd(rec, {a,b,c}). > rec > 2> R = #rec{a=1,b=2,c=3}. > #rec{a = 1,b = 2,c = 3} > 3> MS = ets:match_spec_compile([{#rec{a=1,_='_'},[],[true]}]). > <<>> > 4> ets:match_spec_run([R],MS). > [true] -- http://wagerlabs.com/ From sean.hinde@REDACTED Thu Dec 29 01:33:58 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Thu, 29 Dec 2005 00:33:58 +0000 Subject: Pattern matching: Skipping the rest of a tuple In-Reply-To: <6EE899CE-91B4-4056-A231-01E6A91612D4@gmail.com> References: <6EE899CE-91B4-4056-A231-01E6A91612D4@gmail.com> Message-ID: On 28 Dec 2005, at 19:19, Joel Reymont wrote: > Folks, > > Is it possible to write a function to pattern-match on tuples of > various sizes _without_ using element(X, Tuple)? > > I'm dealing with records of different length and would like to say > things like > > match({record1, _, 20, _/rest}) -> ... > match({record2, 30, _/rest}) -> ... > etc. Isn't this as simple as: match(#record1{b=20}) -> match(#record2{a=30}) -> Sean From joelr1@REDACTED Thu Dec 29 02:26:45 2005 From: joelr1@REDACTED (Joel Reymont) Date: Thu, 29 Dec 2005 01:26:45 +0000 Subject: Pattern matching: Skipping the rest of a tuple In-Reply-To: References: <6EE899CE-91B4-4056-A231-01E6A91612D4@gmail.com> Message-ID: Thank you Sean, it's indeed that simple! On Dec 29, 2005, at 12:33 AM, Sean Hinde wrote: > Isn't this as simple as: > > match(#record1{b=20}) -> > match(#record2{a=30}) -> -- http://wagerlabs.com/ From event@REDACTED Wed Dec 21 17:21:53 2005 From: event@REDACTED (event@REDACTED) Date: Wed, 21 Dec 2005 17:21:53 +0100 Subject: CfP: DALT @ AAMAS 2006 (new submission deadline) Message-ID: <43A98121.5090200@di.unito.it> Apologies for multiple copies ********************************************************************* !!! N E W P A P E R S U B M I S S I O N D E A D L I N E !!! 1 F E B R U A R Y 2 0 0 6 4th International Workshop on Declarative Agent Languages and Technologies (DALT 2006) 8 May 2006 Future University Hakodate, Japan (held in conjunction with AAMAS 2006) URL: http://www.illc.uva.nl/~ulle/DALT-2006/ ********************************************************************* CALL FOR PAPERS ********************************************************************* The workshop on Declarative Agent Languages and Technologies (DALT), in its fourth edition this year, is a well-established forum for researchers interested in sharing their experiences in combining declarative and formal approaches with engineering and technology aspects of agents and multiagent systems. Building complex agent systems calls for models and technologies that ensure predictability, allow for the verification of properties, and guarantee flexibility. Developing technologies that can satisfy these requirements still poses an important and difficult challenge. Here, declarative approaches have the potential of offering solutions satisfying the needs for both specifying and developing multiagent systems. Moreover, they are gaining more and more attention in important application areas such as the semantic web, web services, security, and electronic contracting. DALT 2006 will be held as a satellite workshop of AAMAS 2006, the 5th International Joint Conference on Autonomous Agents and Multiagent Systems, in May 2006 in Hakodate, Japan. Following the success of three previous editions, DALT will again aim at providing a discussion forum to both (i) support the transfer of declarative paradigms and techniques to the broader community of agent researchers and practitioners, and (ii) to bring the issue of designing complex agent systems to the attention of researchers working on declarative languages and technologies. ********************************************************************* TOPICS OF INTEREST ********************************************************************* DALT topics of interest include, but are not limited to: General themes: * specification of agents and multiagent systems * declarative approaches to engineering agent systems Formal techniques: * modal and epistemic logics for agent modelling * model checking agents and multiagent systems * (constraint) logic programming approaches to agent systems * distributed constraint satisfaction Declarative models: * declarative models of agent beliefs and capabilities * declarative models of bounded rationality * declarative paradigms for the combination of heterogeneous agents * electronic institutions Applications: * agents and the semantic web * service-oriented multiagent systems * agent communication and coordination languages * protocol specification and conformance checking * declarative description of contracts and negotiation policies * security in multiagent systems Evaluation of declarative approaches: * experimental analysis of declarative agent technologies * industrial experiences with declarative agent technologies ********************************************************************* SUBMISSION INSTRUCTIONS ********************************************************************* We welcome and encourage the submission of high-quality, original papers, which are not being submitted simultaneously for publication elsewhere. Papers should be written in English, formatted according to the Springer LNCS style, and not exceed 16 pages. Paper submission is electronic via the conference website. ********************************************************************* WORKSHOP PROCEEDINGS ********************************************************************* Printed copies of the proceedings will be available at the workshop. Assuming a sufficient number of high-quality submissions, we are again going to consider the publication of formal post-proceedings with an international publisher. The post-proceedings of DALT 2003 (LNAI 2990) and DALT 2004 (LNAI 3476) have been published by Springer-Verlag in the Lecture Notes in Artificial Intelligence series; the post-proceedings of DALT 2005 are due to appear in 2006, also published by Springer-Verlag. ********************************************************************* IMPORTANT DATES ********************************************************************* * Paper submission deadline: 1 February 2006 * Notification of authors: 1 March 2006 * Final versions due: 14 March 2006 * Workshop: 8 May 2006 ********************************************************************* PROGRAMME COMMITTEE ********************************************************************* * Marco Alberti (University of Ferrara, Italy) * Natasha Alechina (University of Nottingham, UK) * Grigoris Antoniou (University of Crete, Greece) * Matteo Baldoni (University of Torino, Italy) -- co-chair * Cristina Baroglio (University of Torino, Italy) * Rafael Bordini (University of Durham, UK) * Keith Clark (Imperial College London, UK) * Ulle Endriss (University of Amsterdam, NL) -- co-chair * Benjamin Hirsch (Technical University Berlin, Germany) * Shinichi Honiden (National Institute of Informatics, Japan) * John Lloyd (Australian National University, Australia) * Viviana Mascardi (University of Genova, Italy) * John-Jules Meyer (University of Utrecht, NL) * Enrico Pontelli (New Mexico State University, USA) * Birna van Riemsdijk (University of Utrecht, NL) * Chiaki Sakama (Wakayama University, Japan) * Wamberto Vasconcelos (University of Aberdeen, UK) * Christopher Walton (University of Edinburgh, UK) * Michael Winikoff (RMIT University, Australia) ********************************************************************* -- Dr. Matteo Baldoni Dipartimento di Informatica | Universita` degli Studi di Torino | Tel. +39 011 6706756 C.so Svizzera, 185 | Fax. +39 011 751603 I-10149 Torino (Italy) | URL http://www.di.unito.it/~baldoni ----------------------------------------------------------------------- Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html ----------------------------------------------------------------------- ------------------------------------------------------------------------ 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 Thu Dec 22 13:42:01 2005 From: event@REDACTED (event@REDACTED) Date: 22 Dec 2005 12:42:01 +0000 Subject: CFP Workshop on logics for resource-bounded agents Message-ID: <200512221242.aa01141@pat.Cs.Nott.AC.UK> 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) 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 send your submission electronically to 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. 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 event@REDACTED Thu Dec 22 21:49:39 2005 From: event@REDACTED (event@REDACTED) Date: Thu, 22 Dec 2005 21:49:39 +0100 Subject: CFP: CLIMA 06 Message-ID: <43AB1163.1040804@tu-clausthal.de> ================= 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 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: January 15, 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 ------------------------------------------------------------------------ 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 vlad.xx.dumitrescu@REDACTED Thu Dec 29 12:42:14 2005 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Thu, 29 Dec 2005 12:42:14 +0100 Subject: Abstract form Message-ID: <11498CB7D3FCB54897058DE63BE3897C010A6C73@esealmw105.eemea.ericsson.se> Hi! I don't usually complain about things ;-) but I find this rather annoying. 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}}} } I would expect the result to be the same, but abstract/1 treats lists of integers as strings, while erl_parse doesn't (the latter being IMHO correct). Is there a reason for this discrepancy? Happy new year everybody!! regards, Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From nick@REDACTED Thu Dec 29 15:35:16 2005 From: nick@REDACTED (Niclas Eklund) Date: Thu, 29 Dec 2005 15:35:16 +0100 (MET) Subject: newbie orber question In-Reply-To: <1135576900.28847.250547071@webmail.messagingengine.com> Message-ID: Hello! I understand that it might be confusing when "NameService" appear twice if you set orbInitRef to be "NameService=corbaname::vbox:21012". But it do indicate that there is actually two instances of the naming service available. But to avoid confusion I'll change this in the next Orber version. You can perhaps register this as "RemoteNameService=corbaname::vbox:21012"?! You can also use: erl -orber orbDefaultInitRef \"corbaloc::vbox:21012\" But this will re-direct all calls to corba:resolve_initial_references/1 (i.e. even those you add by using corba:add_initial_service/2). To be sure that Orber was configured in the way you intended, use orber:info() to get a print-out of all settings. During test/development phase it is usually helpfull to add the following configuration parameters (see Orber's User's Guide 14 - Debugging): * orber_debug_level == 10 * interceptors == {native, [orber_iiop_tracer_stealth]} Other key parts of the documentation are: * User's Guide - 5.2 Configuration * User's Guide - 6 OMG IDL to Erlang Mapping The latter has recently been updated regarding IC's erl_template-backend. Hence, you should either download the latest version or consult: http://erlang.se/doc/doc-5.4.12/lib/orber-3.6.2/doc/html/part_frame.html Happy New Year! /Nick On Sun, 25 Dec 2005, Lonnie Smith wrote: > Hi - > > I recently began experimenting with CORBA in Erlang, and I'm having some > trouble with a pretty basic step: resolving an initial NameService > reference. I've tried to follow the instructions in Orber manual, but so > far am having no luck. > > $ erl -mnesia dir '"/usr/local/dbs/mnesia.orberdb"' > Erlang (BEAM) emulator version 5.4.10 [source] [hipe] [threads:0] > [kernel-poll] > > Eshell V5.4.10 (abort with ^G) > 1> mnesia:create_schema([node()]). > ok > 2> mnesia:start(). > ok > 3> corba:orb_init([{domain, "MyDiscSingleNodeORB"}, {orbInitRef, > "NameService=corbaname::vbox:21012"}, {orber_debug_level, 10}]). > ok > 4> orber:install([node()], [{ifr_storage_type, disc_copies}, > {nameservice_storage_type, disc_copies}]). > ok > 5> orber:start(). > ok > 6> NS = corba:resolve_initial_reference("NameService"). > > =ERROR REPORT==== 25-Dec-2005::21:47:50 === > Error in process <0.30.0> with exit value: > {undef,[{corba,resolve_initial_reference,["NameService"]},{erl_eval,do_apply,5},{erl_eval,expr,5},{shell,exprs,6},{shell,eval_loop,3}]} > > ** exited: {undef,[{corba,resolve_initial_reference,["NameService"]}, > {erl_eval,do_apply,5}, > {erl_eval,expr,5}, > {shell,exprs,6}, > {shell,eval_loop,3}]} ** > 7> corba:list_initial_services(). > ["NameService","NameService"] > > It seems a bit odd that two "NameServices" are listed. If I call > corba:list_initial_services() before starting the orber application, > only one NameService is listed. If I don't specify an orbInitRef > argument to the corba:orb_init() call, there is only one NameService > listed, but I get the same error: > > $ erl -mnesia dir '"/usr/local/dbs/mnesia.orberdb"' > Erlang (BEAM) emulator version 5.4.10 [source] [hipe] [threads:0] > [kernel-poll] > > Eshell V5.4.10 (abort with ^G) > 1> mnesia:start(). > ok > 2> corba:orb_init([{domain, "MyDiscSingleNodeORB"}, {orber_debug_level, > 10}]). > ok > 3> corba:list_initial_services(). > [] > 4> orber:start(). > ok > 5> corba:list_initial_services(). > ["NameService"] > 6> NS = corba:resolve_initial_reference("NameService"). > > =ERROR REPORT==== 25-Dec-2005::21:52:44 === > Error in process <0.30.0> with exit value: > {undef,[{corba,resolve_initial_reference,["NameService"]},{erl_eval,do_apply,5},{erl_eval,expr,5},{shell,exprs,6},{shell,eval_loop,3}]} > > ** exited: {undef,[{corba,resolve_initial_reference,["NameService"]}, > {erl_eval,do_apply,5}, > {erl_eval,expr,5}, > {shell,exprs,6}, > {shell,eval_loop,3}]} ** > > I should add that I'm fairly new to Erlang, so I might be making some > other mistakes as well. As I understand it, the orber-app/corba module > is going to try to contact the OMG compliant Name Service at the > specified host and port number. If I'm running an omniORB's omniNames > server listening on vbox:21012, the orber-app/corba-module should be > able to use that Name Service, right? > > I'd like to be able to begin using Erlang in a C++/Python omniORB > environment, but so far I'm not getting stuck on the first step. Thanks > for any thoughts or suggestions. > > Lonnie > -- > Lonnie Smith > lonnie_smith@REDACTED > > -- > http://www.fastmail.fm - Accessible with your email software > or over the web > _________________________________________________________________ We Are The ORBs. Resistance Is Futile. Prepare To Be Assimilated! _________________________________________________________________ From sanjaya@REDACTED Fri Dec 30 05:35:34 2005 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Fri, 30 Dec 2005 10:35:34 +0600 Subject: loadtest - inets {'EXIT',{ebadf Message-ID: <000c01c60cfa$7a854730$5f00a8c0@wavenet.lk> Hi ... !!! When I try to perform a load test on my db, Inets gives below error. Actually I'm running inets httpd to handle my http request. 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 ? 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 the requests generated by same way in PHP loop (see below) . Too much load will be the reason? please guide me. Thanks in advance. Sanjaya Vitharana =ERROR REPORT==== 29-Dec-2005::18:42:13 === {'EXIT',{ebadf,[{io,format, [<0.125.0>, "~s ~s ~s [~s] \"~s\" ~w ~w~n", ["192.168.0.124", "-", "-", "29/Dec/2005:18:42:13 +0600", "GET /vm_db/vm_prof_upd:save_record?mob=772063689&det=eJx1VE2PmzAQ%2FSsV4hhFmPCRkMu2vbSqsltpL71FEzBZd42JbEOCqvz3jsEmhM0qkQzjN2+e5w2GLFxn%2F1S2yTzINWtpLrS3ZVm47WM5CEGL192rt33GCFlhqBYaoUqy4xtCMZh5pF%2FxgVbAOHAqtbrbCjKvhIrxrgANdueLWVPcqHlBZY9PMu%2Fn87eXP0vzEpuci6incJR0lJRqRxNvjPAsNEdAqjPleV1RbwtIhaEo83R3orZQQUtouP74RuIxdY%2FhZVtfrBrgXNK8x2BKmqYkXEVxsj9LuEfljXqAykeUac4AwwqqZ8SemAVbCkVrJG9mki1gjVqh28+i6RB9qK6ShatrYWUjHsDyEUbCETfXZ7wTxuu5go2Lf6JBOPIR+ImKEUiiCfJex%2FU6zGhr5uvAe4tXj%2FuFkUOjuo+VDnB0lRADZ3iAoQ5zvTrptWZlV7LBbDSD+IFPgiDwx6zF4vbo4w4J%2FGARLH5Ile2YcKtPbrCxsT15C7KzU+47NxpF5W9Q6lzLwo5Zkq7xb2WpE6VFwYDPPg+TV3I4juNIsC%2FuR%2FAX2POzSjE3%2FISE4WoVRXGcJOlQAsdSisK5ksRRnK4361VIwih26lsmdQOcFWoqYj2IcK64OwClnCB%2Fh+NdtKdR7ChAN5LOaIYbiRU2HNhbAStCXzGMJtY9NZVanqGlguolf7cUTA0k05qYZa4px9BUN47qonQtabhkQlsGA32rlXbGzCHmy64Pf2muv3P0y7X0pRJsh6lf87xuBiRaqDSec9COkF+20Y09IrkTM+mlgIpafyfb1%2F94yawH&type=0&date_upd=1135860133&date_first=1135860133 HTTP/1.0", 200, 7]]}, {mod_log,transfer_log,6}, {mod_log,do,1}, {httpd_response,traverse_modules,2}, {httpd_response,generate_and_send_response,1}, {httpd_request_handler,handle_response,1}, {gen_server,handle_msg,6}, {proc_lib,init_p,5}]}} -----------------------------------------------PHP script(loadTest.php) I try to run---------------------------------------------------- #!/usr/local/php/bin/php ------------------------------------------------------------------------------------------------------------------------------------------------------------- ****** below the aditional info if somebody needs to test ***** ------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------record used------------------------------------------------------------------------------------- -record(vm_profile_backup, {mobile_no, prof_details, type, last_update_date, first_creation_date, fax_no}). ---------------------------------table created using ----------------------------------------------------------------------------------------------------- Res = mnesia:create_table(profile_db,[ {disc_only_copies, NodeList}, {record_name, vm_profile_backup}, {attributes, record_info(fields, vm_profile_backup)} ]), -------------------------------from vm_prof_upd.erl-------------------------------------------------------------------------------------------------------- save_record(SessionID,Env,Input)-> %%----------Server Side Out Puts----------- io:format("SessionID:~p~n",[SessionID]), %SessionID:<0.233.0> io:format("Env:~p~n",[Env]), io:format("Input: ~p~n",[Input]), InData = httpd:parse_query(Input), io:format("GOT THIS: ~p~n",[InData]), %%----------Return to client--------------- Rec=#vm_profile_backup{}, Fun1= fun(A, VMRec) -> case A of {"mob",MNo}-> VMRec#vm_profile_backup{mobile_no=MNo}; {"det",PDet}->VMRec#vm_profile_backup{prof_details=PDet}; {"type",Type}->VMRec#vm_profile_backup{type=Type}; {"date_upd",Date_UpDate}-> case catch erlang:list_to_integer(Date_UpDate) of {'EXIT', _}-> VMRec#vm_profile_backup{last_update_date=error}; %%{badarg,_}-> ValueDate_UpDate-> VMRec#vm_profile_backup{last_update_date=ValueDate_UpDate} end; {"date_first",Date_First}-> case catch erlang:list_to_integer(Date_First) of {'EXIT', _}-> VMRec#vm_profile_backup{first_creation_date=error}; %%{badarg,_}-> ValueDate_First-> VMRec#vm_profile_backup{first_creation_date=ValueDate_First} end; {"fax",FNo}->VMRec#vm_profile_backup{fax_no=FNo}; Other->VMRec end end, NewRec=lists:foldl(Fun1,Rec,InData), if NewRec#vm_profile_backup.last_update_date == error; NewRec#vm_profile_backup.first_creation_date == error -> mod_esi:deliver(SessionID, "{error,invalid_number_[first_creation_date_OR_last_update_date]}"); NewRec#vm_profile_backup.mobile_no /= undefined, NewRec#vm_profile_backup.mobile_no /= [], NewRec#vm_profile_backup.last_update_date /= undefined,NewRec#vm_profile_backup.last_update_date /= [], NewRec#vm_profile_backup.first_creation_date /= undefined, NewRec#vm_profile_backup.first_creation_date /= [] -> MobNo=NewRec#vm_profile_backup.mobile_no, Prof_Det=NewRec#vm_profile_backup.prof_details, if NewRec#vm_profile_backup.type /= undefined, NewRec#vm_profile_backup.type /= [] -> Type1=NewRec#vm_profile_backup.type; true->Type1="0" end, Date_UpD=NewRec#vm_profile_backup.last_update_date, Date_Fst=NewRec#vm_profile_backup.first_creation_date, if NewRec#vm_profile_backup.fax_no /= undefined, NewRec#vm_profile_backup.fax_no /= [] -> FaxNo=NewRec#vm_profile_backup.fax_no; true->FaxNo=" " end, mod_esi:deliver(SessionID, io_lib:format("~p",[gen_server:call(vm_prof_db_svr,{save_profile_record,{MobNo,Prof_Det,Type1,Date_UpD,Date_Fst,FaxNo}})])); true-> mod_esi:deliver(SessionID, "{error,no_mobile_no_OR_first_creation_date_OR_last_update_date}") end. -------------------------------------from vm_prof_db_svr.erl (gen_server)------------------------------------------------------- handle_call({save_profile_record,{MobNo,Prof_Det,Type,Date_UpD,Date_Fst,FaxNo}}, _From, State) -> Reply=vm_prof_db:save_profile_record({MobNo,Prof_Det,Type,Date_UpD,Date_Fst,FaxNo}), {reply, Reply, State}; -----------------------------------------from vm_prof_db.erl----------------------------------------------------------------------------------------- save_profile_record({MobNo,Prof_Det,Type,Date_UpD,Date_Fst,FaxNo})-> Rec= #vm_profile_backup{mobile_no = MobNo, prof_details = Prof_Det, type=Type, last_update_date = Date_UpD, first_creation_date = Date_Fst, fax_no=FaxNo}, save_record(profile_db,Rec). save_record(Db, Record) -> Fun = fun() -> mnesia:write(Db, Record, write) end, transaction(Fun). -------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From adam.aquilon@REDACTED Thu Dec 29 17:28:09 2005 From: adam.aquilon@REDACTED (Adam Aquilon) Date: Thu, 29 Dec 2005 17:28:09 +0100 Subject: Mnesia deadlock? Message-ID: 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. 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... :-) Tables are ram_copies and disk_copies. Some tables reside on one subset of the nodes, others on different node subsets. We use the default values of 3 minutes/1000 transactions for the dump threshold. Problem: The system had been running for more than a year with no problems when suddenly all calls to mnesia on the node that mnesia:backup/1 was called on timed out. The error logger output had a number of mnesia overload warnings, both {dump_log,time_threshold} and {mnesia_tm,message_queue_len,[]} Most functionality in the system was still intact since we seldom write to the tables. This lead to a lot of hanging cron-initiated processes, which eventually led to a high load/low memory situation that became a problem. A simple restart of the system fixed the immediate problem. Analysis: I guess mnesia is sufficiently well tested by many systems over the years to not have any obvious bugs in the transaction manager, so we guessed it might have something to do with the backup, specifically the checkpointing done by the backup, and the periodical dump that mnesia performs. Since we don't have a lot of writes when the system is running, dumping was almost always taking place every third minute. On the theory that dumping might be messed up by running a backup at the same time, we setup a test system that did a backup every second and set the dump_log_time_threshold to 500 milliseconds. We didn't have to wait more than 5-10 minutes before we got (almost) the same situation as on the live system. The only difference was that we didn't get the errors from mnesia_tm about queue length. All mnesia-related calls to the main node (the one performing the backup) that we tried hung. Including things like mnesia:system_info(). Does anyone have any explanation? Thanks a lot for any input you might have! /Adam Aquilon Cellpoint From klacke@REDACTED Fri Dec 30 09:59:15 2005 From: klacke@REDACTED (Claes Wikstom) Date: Fri, 30 Dec 2005 09:59:15 +0100 Subject: Mnesia deadlock? In-Reply-To: References: Message-ID: <43B4F6E3.40506@hyber.org> Adam Aquilon wrote: > 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. > > ...... > All mnesia-related calls to the main node (the one performing the backup) > that we tried hung. Including things like mnesia:system_info(). > Fishy, What you should have done is to do a process listsing i() and figured out which processes were waiting for which. The suspicios process you should do a backtrace on to get the stacks. We recently had a mnesia deadlock in our system - but that wasn't mnesias fault. We were doing gen_server calls from within transactions to other servers which we're also doing transactions ... thus we deserved the deadlock. If mnesia:info() doesn't work though - all the more reason to have a look at the individual processes and figure out what they do - or rather what they don't and why. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From joelr1@REDACTED Fri Dec 30 10:17:02 2005 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 30 Dec 2005 09:17:02 +0000 Subject: ebadf on a socket Message-ID: Folks, Are there any standard reasons why I might get a ebadf error when writing to a previously opened socket? Thanks, Joel -- http://wagerlabs.com/ From richardc@REDACTED Fri Dec 30 11:53:07 2005 From: richardc@REDACTED (Richard Carlsson) Date: Fri, 30 Dec 2005 11:53:07 +0100 Subject: Abstract form In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C010A6C73@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C010A6C73@esealmw105.eemea.ericsson.se> Message-ID: <43B51193.5030004@csd.uu.se> Vlad Dumitrescu XX (LN/EAB) wrote: > I don't usually complain about things ;-) but I find this rather annoying. > > 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}}}} > I would expect the result to be the same, but abstract/1 treats lists of > integers as strings, while erl_parse doesn't (the latter being IMHO > correct). Try erl_syntax:abstract/1 instead - I think it tries to avoid creating "mixed" representations. You may have to use erl_syntax:revert/1 on the result if you want the representation to be erl_parse-compatible. /Richard From vlad.xx.dumitrescu@REDACTED Fri Dec 30 12:08:47 2005 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Fri, 30 Dec 2005 12:08:47 +0100 Subject: Abstract form Message-ID: <11498CB7D3FCB54897058DE63BE3897C010A6CF5@esealmw105.eemea.ericsson.se> > Try erl_syntax:abstract/1 instead - I think it tries to avoid > creating "mixed" representations. You may have to use > erl_syntax:revert/1 on the result if you want the > representation to be erl_parse-compatible. Thanks for the answer. Right now I am happy with using erl_parse in the prototype. I was just baffled by this inconsistency, as I thought the result would be the same. I will probably switch to erl_syntax later. I find that I can't push myself over the threshold of only using erl_syntax, mostly because with erlide I send the parse trees to Java and there I have to traverse the tree myself. The plan is to move this functionality on the Erlang side, where it really belongs, and then erl_syntax's API will be perfect. Regards, Vlad From adam.aquilon@REDACTED Fri Dec 30 16:35:28 2005 From: adam.aquilon@REDACTED (Adam Aquilon) Date: Fri, 30 Dec 2005 16:35:28 +0100 Subject: Mnesia deadlock? In-Reply-To: <43B4F6E3.40506@hyber.org> References: <43B4F6E3.40506@hyber.org> Message-ID: On Fri, 30 Dec 2005 09:59:15 +0100, Claes Wikstom wrote: > Fishy, What you should have done is to do a process listsing i() > and figured out which processes were waiting for which. > The suspicios process you should do a backtrace on to get > the stacks. I've finally managed to make mnesia hang again. It's wierd -- we tried to recreate all the conditions of yesterday: sending continuous requests to the system, running dumps and backups very often, messing about with the disk_log server on another node (on the same host), etc, etc. Nothing we did could make it crash, not even 100 % CPU load and simultaneous reading from a 1 GB disk_log and converting it to a text file in /tmp! Eventually we got fed up and went for a coffe. When we came back, the system had gone back into the "bad" state. Notice that it is only the mnesia subsystem on the main node that is hanging. Everything else is still running as before, so the text file backtraces I've attached haven't all been taken in a static system (even though the hung processes are pretty "stable" :-). I included both the "i()" output from the failed node as well as backtraces from a number of processes that could maybe be of interest to you. I'll try to leave the system in this state. I could even provide ssh login to you if that'll help. Regards, Adam Aquilon, Cellpoint -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: processes.txt URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: disk_log_server.backtrace Type: application/octet-stream Size: 1393 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mnesia_checkpoint_sup.backtrace Type: application/octet-stream Size: 97735 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mnesia_locker.backtrace Type: application/octet-stream Size: 665 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mnesia_log:backup_checkpoint.backtrace Type: application/octet-stream Size: 636 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mnesia_log:backup_master.backtrace Type: application/octet-stream Size: 7197 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mnesia_tm:rec.backtrace Type: application/octet-stream Size: 4852 bytes Desc: not available URL: From erlang@REDACTED Fri Dec 30 19:15:21 2005 From: erlang@REDACTED (Erlang Questions) Date: Fri, 30 Dec 2005 15:15:21 -0300 Subject: Using trunc function in Erlang Message-ID: <01ea01c60d6d$017acfe0$2100a8c0@INSWITCH241> Hello everybody, I have one question about Erlang trunc function. Why Erlang behaves like this? 1> trunc(1.3/0.1). 13 2> trunc(1.4/0.1). 13 3> trunc(1.5/0.1). 15 And which you think is the best way to manage this in order to solve this kind of problems? Thanks in advance. Happy new year for everyone!! Carlos.- -------------- next part -------------- An HTML attachment was scrubbed... URL: From camster@REDACTED Fri Dec 30 19:35:58 2005 From: camster@REDACTED (Richard Cameron) Date: Fri, 30 Dec 2005 18:35:58 +0000 Subject: Using trunc function in Erlang In-Reply-To: <01ea01c60d6d$017acfe0$2100a8c0@INSWITCH241> References: <01ea01c60d6d$017acfe0$2100a8c0@INSWITCH241> Message-ID: <7FB36213-6C06-4D65-B14D-D665EB0847D0@citeulike.org> On 30 Dec 2005, at 18:15, Erlang Questions wrote: > Hello everybody, I have one question about Erlang trunc function. > > Why Erlang behaves like this? > > 1> trunc(1.3/0.1). > 13 > 2> trunc(1.4/0.1). > 13 > 3> trunc(1.5/0.1). > 15 Unfortunately, this isn't an Erlang problem at all. Look at the output of this little C program on my machine: wilt:/tmp rcameron$ cat floor.c #include #include main() { printf("%f\n", floor(1.4/0.1)); } wilt:/tmp rcameron$ gcc -o floor floor.c wilt:/tmp rcameron$ ./floor 13.000000 Computers have a nasty habit of doing things you might not intuitively expect with floating point operations. You sort of just have to accept that float operations are not exact, so the computation: 1.4/0.1 actually produces a result in the range 14.0000000000000 +/- epsilon where epsilon is (very) small. Unfortunately, in your case, it's every so slightly negative, so erlang:trunc(14.0000000000000 - Epsilon). evaluates to 13. > And which you think is the best way to manage this in order to > solve this kind of problems? It depends very much what you're trying to do. What do these numbers represent in your application? Richard. From erlang@REDACTED Fri Dec 30 20:50:29 2005 From: erlang@REDACTED (Erlang Questions) Date: Fri, 30 Dec 2005 16:50:29 -0300 Subject: Using trunc function in Erlang References: <01ea01c60d6d$017acfe0$2100a8c0@INSWITCH241> <7FB36213-6C06-4D65-B14D-D665EB0847D0@citeulike.org> Message-ID: <029801c60d7a$49f17550$2100a8c0@INSWITCH241> I was afraid about that. Unfortunately, these numbers represent money in my application :o( Regards, Carlos.- ----- Original Message ----- From: "Richard Cameron" To: "Erlang Questions" Cc: "Erlang Questions" Sent: Friday, December 30, 2005 3:35 PM Subject: Re: Using trunc function in Erlang > > On 30 Dec 2005, at 18:15, Erlang Questions wrote: > > > Hello everybody, I have one question about Erlang trunc function. > > > > Why Erlang behaves like this? > > > > 1> trunc(1.3/0.1). > > 13 > > 2> trunc(1.4/0.1). > > 13 > > 3> trunc(1.5/0.1). > > 15 > > Unfortunately, this isn't an Erlang problem at all. Look at the > output of this little C program on my machine: > > wilt:/tmp rcameron$ cat floor.c > #include > #include > main() { > printf("%f\n", floor(1.4/0.1)); > } > wilt:/tmp rcameron$ gcc -o floor floor.c > wilt:/tmp rcameron$ ./floor > 13.000000 > > Computers have a nasty habit of doing things you might not > intuitively expect with floating point operations. You sort of just > have to accept that float operations are not exact, so the computation: > > 1.4/0.1 > > actually produces a result in the range > > 14.0000000000000 +/- epsilon > > where epsilon is (very) small. Unfortunately, in your case, it's > every so slightly negative, so > > erlang:trunc(14.0000000000000 - Epsilon). > > evaluates to 13. > > > And which you think is the best way to manage this in order to > > solve this kind of problems? > > It depends very much what you're trying to do. What do these numbers > represent in your application? > > Richard. > > From klacke@REDACTED Fri Dec 30 19:56:57 2005 From: klacke@REDACTED (Claes Wikstrom) Date: Fri, 30 Dec 2005 19:56:57 +0100 Subject: Mnesia deadlock? In-Reply-To: References: <43B4F6E3.40506@hyber.org> Message-ID: <43B582F9.9000201@hyber.org> Adam Aquilon wrote: > > Eventually we got fed up and went for a coffe. When we came back, > the system had gone back into the "bad" state. Notice that it is only > the mnesia subsystem on the main node that is hanging. Just a quick look - looks like there are an equal amount of hanging transactions to hanging gen_server:rec_nodes/7 You're sure you are not doing any gen_server:calls inside the transactions. It sure looks like that. And if then anyone of those gen_servers are also executing transactions on the same tables -- tada !! deadlock. Note, mnesia has builtin deadlock detection bit cannot protect itself from the user deadlocking himself. 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. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From camster@REDACTED Fri Dec 30 20:24:39 2005 From: camster@REDACTED (Richard Cameron) Date: Fri, 30 Dec 2005 19:24:39 +0000 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: <0712B3AF-417F-4ABC-BD31-80194421AB94@citeulike.org> On 30 Dec 2005, at 19:50, Erlang Questions wrote: > Unfortunately, these numbers represent money in my application :o( Oh dear. I can only hope that they never represent my money - unless you want to round upwards. The best advice I can offer is: don't use floating point to represent money. Use integer arithmetic only (on the cents/pence/euro cents), and guard against overflows. A compromise is to use erlang:round() instead of trunc and you *probably* be OK... although I reserve the right to take that back if it ever goes wrong. Richard. From matthias@REDACTED Fri Dec 30 22:15:03 2005 From: matthias@REDACTED (Matthias Lang) Date: Fri, 30 Dec 2005 22:15:03 +0100 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: <17333.41815.191927.729433@antilipe.corelatus.se> Erlang Questions writes: > I was afraid about that. > Unfortunately, these numbers represent money in my application :o( You could always buy an IBM mainframe with hardware support for decimal fractions ;-) Here's a good starting point to learn more: http://www2.hursley.ibm.com/decimal/ in particular, there's a FAQ which describes the general case of the particular problem you encountered: http://www2.hursley.ibm.com/decimal/decifaq1.html Matthias From sean.hinde@REDACTED Sat Dec 31 01:28:59 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Sat, 31 Dec 2005 00:28:59 +0000 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: On 30 Dec 2005, at 19:50, Erlang Questions wrote: > I was afraid about that. > Unfortunately, these numbers represent money in my application :o( I would hope that the folks setting the requirements for your system (customers? potential customers?) will have a pretty clear idea how many decimal places you should be working to and how to do rounding of money. Certainly anything I have worked on in the telecom space caring for money (including billing mediators and pre-paid systems) has had pretty clear requirements in this area. Sean > > Regards, Carlos.- > > ----- Original Message ----- > From: "Richard Cameron" > To: "Erlang Questions" > Cc: "Erlang Questions" > Sent: Friday, December 30, 2005 3:35 PM > Subject: Re: Using trunc function in Erlang > > >> >> On 30 Dec 2005, at 18:15, Erlang Questions wrote: >> >>> Hello everybody, I have one question about Erlang trunc function. >>> >>> Why Erlang behaves like this? >>> >>> 1> trunc(1.3/0.1). >>> 13 >>> 2> trunc(1.4/0.1). >>> 13 >>> 3> trunc(1.5/0.1). >>> 15 >> >> Unfortunately, this isn't an Erlang problem at all. Look at the >> output of this little C program on my machine: >> >> wilt:/tmp rcameron$ cat floor.c >> #include >> #include >> main() { >> printf("%f\n", floor(1.4/0.1)); >> } >> wilt:/tmp rcameron$ gcc -o floor floor.c >> wilt:/tmp rcameron$ ./floor >> 13.000000 >> >> Computers have a nasty habit of doing things you might not >> intuitively expect with floating point operations. You sort of just >> have to accept that float operations are not exact, so the >> computation: >> >> 1.4/0.1 >> >> actually produces a result in the range >> >> 14.0000000000000 +/- epsilon >> >> where epsilon is (very) small. Unfortunately, in your case, it's >> every so slightly negative, so >> >> erlang:trunc(14.0000000000000 - Epsilon). >> >> evaluates to 13. >> >>> And which you think is the best way to manage this in order to >>> solve this kind of problems? >> >> It depends very much what you're trying to do. What do these numbers >> represent in your application? >> >> Richard. >> >> > From rprice@REDACTED Sat Dec 31 10:45:00 2005 From: rprice@REDACTED (Roger Price) Date: Sat, 31 Dec 2005 10:45:00 +0100 (CET) Subject: Using trunc function in Erlang In-Reply-To: References: <01ea01c60d6d$017acfe0$2100a8c0@INSWITCH241> <7FB36213-6C06-4D65-B14D-D665EB0847D0@citeulike.org> <029801c60d7a$49f17550$2100a8c0@INSWITCH241> Message-ID: On Sat, 31 Dec 2005, Sean Hinde wrote: > On 30 Dec 2005, at 19:50, Erlang Questions wrote: > I would hope that the folks setting the requirements for your system > (customers? potential customers?) will have a pretty clear idea how many > decimal places you should be working to and how to do rounding of money. There may also be legal requirements. Search Google with keywords euro conversion rounding site:eu.int Roger From robert.virding@REDACTED Sat Dec 31 23:02:41 2005 From: robert.virding@REDACTED (Robert Virding) Date: Sat, 31 Dec 2005 23:02:41 +0100 Subject: Abstract form In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C010A6C73@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C010A6C73@esealmw105.eemea.ericsson.se> Message-ID: <43B70001.4030200@telia.com> abstract/1 takes an erlang data structure and converts it into its abstract form. I quote from the manual: |* "*|*|abstract(Data) -> AbsTerm|* Types: *|Data = AbsTerm = term()|* Converts the Erlang data structure |Data| into an abstract form of type |AbsTerm|. This is the inverse of |normalise/1|." The other one is for parsing the characters in a string. RTFM. I don't really see the problem. Robert Vlad Dumitrescu XX (LN/EAB) wrote: > Hi! > > I don't usually complain about things ;-) but I find this rather annoying. > > 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}}}} > I would expect the result to be the same, but abstract/1 treats lists > of integers as strings, while erl_parse doesn't (the latter being IMHO > correct). > > Is there a reason for this discrepancy? > > Happy new year everybody!! > > regards, > Vlad