From Sean.Hinde@REDACTED Mon Oct 1 11:34:29 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Mon, 1 Oct 2001 10:34:29 +0100 Subject: Your own behaviours Message-ID: <402DD461F109D411977E0008C791C312039F641B@IMP02MBX> Hi guys, I looked at using a combined application/top supervisor when first looking at OTP and using the existing apps as a guide. I concluded that any benefits (are there any?) were lost if you end up with a hotch potch of different techniques which have to be individually figured out later in maintenance mode. The emacs mode produces very fine templates which we use across all our applications. This means that I can look at Chandru's code and immediately see how it starts up, and others can look at mine and all is clear. The naming convention we use is always: uoty_app - application behaviour uoty_sup - top level supervisor uoty_server - main server process Let's keep it simple Cheers, Sean > I'll go thru the code for these modules and study them. Thanks! But I > suppose you can do more than just start the top level > supervisor in the > "top" module. You can have code to do different things in different > application start phases for example. > > cheers, > Chandru > > > -----Original Message----- > > From: Vance Shipley [mailto:vances@REDACTED] > > Sent: 27 September 2001 13:51 > > To: Chandrashekhar Mullaparthi > > Cc: erlang-questions@REDACTED > > Subject: RE: Your own behaviours > > > > > > Chandru, > > > > This is an issue I have visited before. The first time we packaged > > an "application" I found it odd that the top module, having > behaviour > > application, did pretty much nothing but start top level supervisor > > which was implemented in another module. I wondered why the > > supervisor > > couldn't also be the application master. Looking at the callbacks > > which the two behaviours have I saw no conflict. Then I looked at > > OTP for examples and that is just what I found. Some > notable modules > > which behave as both supervisor and application master are kernel > > and sasl. > > > > Here is the example from kernel.erl: > > > > -module(kernel). > > > > -behaviour(application). > > -behaviour(supervisor). > > > > > > I wrote a shell script to find all examples (included below) and > > here is the list from R7B-3: > > > > ./lib/sasl/src/sasl.erl > > ./lib/kernel/src/kernel.erl > > ./lib/mnesia/src/mnesia_event.erl > > ./lib/mnesia/src/mnesia_sup.erl > > ./lib/mnemosyne/src/mnemosyne_sup.erl > > ./lib/mnesia_session/src/mnesia_session_top_sup.erl > > > > > > -Vance > > > > Vance Shipley > > Motivity Telecom Inc. > > +1 519 579 5816 > > > > > > find_multiple_behaviours.sh: > > #! /bin/sh > > for i in `find . -name "*.erl"` > > do > > if [ `fgrep -c "behaviour(" $i` -gt 1 ] > > then > > echo $i > > fi > > done > > > > > > NOTICE AND DISCLAIMER: > This email (including attachments) is confidential. If you > have received > this email in error please notify the sender immediately and > delete this > email from your system without copying or disseminating it or > placing any > reliance upon its contents. We cannot accept liability for > any breaches of > confidence arising through use of email. Any opinions > expressed in this > email (including attachments) are those of the author and do > not necessarily > reflect our opinions. We will not accept responsibility for > any commitments > made by our employees outside the scope of our business. We > do not warrant > the accuracy or completeness of such information. > NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From Sean.Hinde@REDACTED Mon Oct 1 14:14:19 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Mon, 1 Oct 2001 13:14:19 +0100 Subject: New Inets Message-ID: <402DD461F109D411977E0008C791C312039F6421@IMP02MBX> Hi, Inets was the inspiration for our tcp server process structure so I always have a look inside when there is a new version. In the R8 Prerelease version I noticed the rather unusual design decision to read the HTTP header 1 octet at a time with successive gen_tcp:recv calls. I wonder if any performance testing was done on this mechanism as it doesn't particularly strike me as optimal.. and it might be very slow indeed... I also noticed that there is now a driver option to gen_tcp:socket (http) which returns decoded http headers straight from the socket. Is it intended that this becomes a fully supported part of OTP (or even used by a future inets version)? Thanks, Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From mail_7788@REDACTED Mon Oct 1 15:22:28 2001 From: mail_7788@REDACTED (=?iso-8859-1?q?chima=20valentine?=) Date: Mon, 1 Oct 2001 15:22:28 +0200 (CEST) Subject: urgent and confidential letter Message-ID: <20011001132228.14198.qmail@web20306.mail.yahoo.com> DEAR, STRICTLY CONFIDENTIAL THIS IS A MUTUAL BUSSINESS PROPOSAL THAT WILL BENEFIT BOTH YOU AND MYSELF I AM THE ELDEST SON OF THE FAMOUS CHIEF NELSON MAKAYA OF SOUTH AFRICA WHO WAS DURING HIS TIME DEAL ON COCOA AND GOLD RESPECTIVELY, HE WAS ALSO THE CHIEF EXECUTIVE OF AN ORGANIZATION KNOWN AS (SOUTH AFRICA PEOPLES CLUB), AND HE WAS THE RUNING MATE TO THE INTERNAL AFFAIR MINISTER OF SOUTH AFRICA DURING MADELA'S REGIME. MY FATHER CHIEF NELSON MAKAYA WAS ASSASSINATED ON THE( 2-7-2001 ) ON HIS WAY BACK FROM A BUSSINESS TRIP FROM WEST AFRICA (GHANA AND COTE D' IVOIRE) RESPECTIVELY, ON THAT FAITHFUL DAY MY MOTHER MRS AGNESS MAKAYA WHO WAS ONE TIME NUMBER NINE IN THE TOP TWENTY COCOA DEALERS IN SOUTH AFRICA IN (1993) . SHE WAS AT THE AIRPORT TO WELCOME MY FATHER ON HIS ARRIVAL, ON THEIR WAY BACK HOME IN HIS MERCEDES BENZ CAR WAS ASSASSINS THAT EMERGE FROM NOWHERE AND OPEN GUN FIRE ON THE CAR, UNFORTUNATELY MY DEAR MOTHER DIED INSTANTLY AND MY FATHER WAS SERIOUSLY WOUNDED AND WAS IMMEDIATELY RUSH TO THE HOSPITAL WHERE HE SPENT EXTRA SIX DAYS IN THE HOSPITAL BEFORE HE FINALLY GAVE UP THE GHOST TWO DAYS BEFORE THIS SAD NEWS OF MY FATHER'S DEATH HE CALLED ME BECAUSE OF HIS UNCERTAIN HEART CONDITION OF SURVIVING AND HANDED OVER TO ME THE KEY TO THE UNDERGROUND VILLA (MANSION) IN JOHANNISBURG (SOUTH AFRICA) AND INSTRUCTED ME TO OPEN THE STRONG IRON BOX WHERE HE KEPT SOME VITAL DOCUMENTS BACKING UP THE SUM OF TWENTY TWO MILLION AND FIVE HUNDRED THOUSAND UNITED STATE DOLLARS($22,500,000,00 USD)-($22.5M USD ) THIS MONEY WAS DEPOSITED IN A PRIVATE SECURITY COMPANY IN (ABIDJAN) THE CAPITAL OF COTE D'IVOIRE AS FAMILY TREASURE , WHY THE GOLD WAS DEPOSITED IN A BANK IN ACCRA (GHANA). AFTER THE DEATH OF MY PARENTS THE ASSASSINS WERE STILL AFTER US THE (CHILDREN) FOR A REASON I DON'T KNOW OR CAN EXPLAIN I MANAGE TO ESCAPE TO ABIDJAN( COTE D'IVOIRE) WITH MY TWO YOUNGER ONES WITH THE HELP OF MY FATHER'S FRIEND, WHERE WE ARE PRESENTLY. WE ARE NOW CONTACTING YOU TO SOLICIT YOUR ASSISTANCE IN HELPING US TO TRANSFER THIS MONEY TO YOUR ACCOUNT IN ABROAD FOR A LUCRATIVE BUSSINESS INVESTMENT BECAUSE OF THE STABLE ECONOMYAND POLITICAL STATU. I AND MY TWO YOUNGER ONES HAVE PUT OUR HEADS TOGETHER AND AGREED TO COMPENSATE YOU WITH 20% OF THE AFOREMENTIONED TOTAL SUM AND 5% HAS ALSO BEEN SET ASIDE FOR ANY EXPENSES THAT WILL INCURED IN PURSUEING THIS TRANSACTION . CONTACT ME THROUGH MY EMAIL ADDRESS IF ONLY THIS PROPOSAL AROUSES YOUR INTEREST. PLEASE KEEP THE UTMOST CONFIDENTIALITY OF THIS TRANSACTION FOR OUR ENEMIES ARE STILL AFTER US AND NOBODY KNOW OUR WHEREABOUT. THANKS AND GOD BLESS BEST REGARD FREDERICK MAKAYA. ___________________________________________________________ Do You Yahoo!? -- Un e-mail gratuit @yahoo.fr ! Yahoo! Courrier : http://fr.mail.yahoo.com From nicolas.niclausse@REDACTED Mon Oct 1 16:19:11 2001 From: nicolas.niclausse@REDACTED (Nicolas Niclausse) Date: 01 Oct 2001 16:19:11 +0200 Subject: New Inets In-Reply-To: <402DD461F109D411977E0008C791C312039F6421@IMP02MBX> References: <402DD461F109D411977E0008C791C312039F6421@IMP02MBX> Message-ID: <7b8zev8mu8.fsf@schultze.infra.idealx.com> >>>>> "Sean" == Sean Hinde ?crivait: Sean> In the R8 Prerelease version I noticed the rather unusual design Sean> decision to read the HTTP header 1 octet at a time with Sean> successive gen_tcp:recv calls. Sean> I wonder if any performance testing was done on this mechanism as Sean> it doesn't particularly strike me as optimal.. and it might be Sean> very slow indeed... Indeed, i've just made a quick benchmark with httperf, and R8 is much slower (using the same conf. file) httperf --hog --server schultze --port 8888 --num-conn 1000 --rate 150 (150 requests sent per sec. to a html file of 4100bytes) R8-2001.09.24 Request rate: 63.1 req/s (15.9 ms/req) R7B3 Request rate: 103.6 req/s (9.7 ms/req) Apache 1.3.20 Request rate: 142.9 req/s (7.0 ms/req) -- Nicolas NICLAUSSE IDEALX S.A.S. T?l:01 44 42 00 00 http://IDEALX.org/ From garry@REDACTED Mon Oct 1 16:48:01 2001 From: garry@REDACTED (Garry Hodgson) Date: Mon, 01 Oct 2001 10:48:01 -0400 Subject: stickers, logos, etc. References: Message-ID: <3BB88221.D3026BE7@sage.att.com> > "Vance Shipley" writes: > > I had some "Powered by Erlang" stickers which were given to me a > > couple years ago. I'm all out now and would really like some more. > > > > I'd also like to have that logo in a graphic file so that I could > > use it on web pages. Does anyone have that logo to share? > > > > In general I think that the Erlang logo should be distributed with > > the source. The penguin goes out with the Linux source. I would > > include the 'powered by' logo as well. we also need a cute little animal for the logo. a wombat, perhaps? -- Garry Hodgson One way or another Senior Hacker One way or another Software Innovation Services One way or another AT&T Labs This darkness got to give... garry@REDACTED From luke@REDACTED Mon Oct 1 17:14:46 2001 From: luke@REDACTED (Luke Gorrie) Date: 01 Oct 2001 17:14:46 +0200 Subject: stickers, logos, etc. In-Reply-To: <3BB88221.D3026BE7@sage.att.com> References: <3BB88221.D3026BE7@sage.att.com> Message-ID: Garry Hodgson writes: > > > In general I think that the Erlang logo should be distributed with > > > the source. The penguin goes out with the Linux source. I would > > > include the 'powered by' logo as well. > > we also need a cute little animal for the logo. a wombat, perhaps? Definitely a wombat. How about the fella at http://www.geocities.com/csean_au/images/Nap_Time.jpg He gives an inspired portrayal of Erlang's contentment and self-sufficiency, not concerned by the constant surrounding pressures of the crowded software world. (But too bad he isn't a cartoon :-) -- Three things are certain: Death, taxes, and lost data. Guess which has occurred. From richardc@REDACTED Mon Oct 1 17:28:21 2001 From: richardc@REDACTED (Richard Carlsson) Date: Mon, 1 Oct 2001 17:28:21 +0200 (MET DST) Subject: stickers, logos, etc. In-Reply-To: <3BB88221.D3026BE7@sage.att.com> Message-ID: On Mon, 1 Oct 2001, Garry Hodgson wrote: > we also need a cute little animal for the logo. a wombat, perhaps? How about the Majestic Moose (or Elk, as the European kind is called)? ... a moose once bit my sister... Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://www.csd.uu.se/~richardc/ From david@REDACTED Mon Oct 1 18:32:00 2001 From: david@REDACTED (david wallin) Date: Mon, 1 Oct 2001 18:32:00 +0200 Subject: stickers, logos, etc. In-Reply-To: Message-ID: On m?ndag, oktober 1, 2001, at 05:28 , Richard Carlsson wrote: > > On Mon, 1 Oct 2001, Garry Hodgson wrote: > >> we also need a cute little animal for the logo. a wombat, perhaps? > > How about the Majestic Moose (or Elk, as the European kind is called)? > > I want a prehistoric coelophysis. Now _that_ would look cool on a forthcoming bookcover (I wish :) > > > > > > > > > > > > > > ... a moose once bit my sister... > ... I once bit a coelophysis ... > > > Richard Carlsson (richardc@REDACTED) (This space intentionally left > blank.) > E-mail: Richard.Carlsson@REDACTED WWW: http://www.csd.uu.se/~richardc/ > ... tastes like chicken really... --david. From luke@REDACTED Mon Oct 1 18:41:59 2001 From: luke@REDACTED (Luke Gorrie) Date: 01 Oct 2001 18:41:59 +0200 Subject: stickers, logos, etc. In-Reply-To: References: Message-ID: david wallin writes: > On m?ndag, oktober 1, 2001, at 05:28 , Richard Carlsson wrote: > > > On Mon, 1 Oct 2001, Garry Hodgson wrote: > > > >> we also need a cute little animal for the logo. a wombat, perhaps? > > > > How about the Majestic Moose (or Elk, as the European kind is called)? > > I want a prehistoric coelophysis. Now _that_ would look cool on a > forthcoming bookcover (I wish :) Such differing tastes! Clearly EUC 2002 will have to include a trip to the zoo to choose a cuddly mascot. (An Australian zoo, of course!) -- Three things are certain: Death, taxes, and lost data. Guess which has occurred. (from http://www.gnu.org/fun/jokes/error-haiku.html) From vances@REDACTED Mon Oct 1 19:12:57 2001 From: vances@REDACTED (Vance Shipley) Date: Mon, 1 Oct 2001 13:12:57 -0400 Subject: stickers, logos, etc. In-Reply-To: Message-ID: I sincerely hope you all have tongue firmly planted in cheek! -Vance From vances@REDACTED Mon Oct 1 18:52:24 2001 From: vances@REDACTED (Vance Shipley) Date: Mon, 1 Oct 2001 12:52:24 -0400 Subject: gen_fsm state machine drawing tool In-Reply-To: <15287.6976.313006.866658@antilipe.corelatus.se> Message-ID: I have cleaned up my drawing tool and incorporated several enhancements. I have attached an example output graphic from dot for our T1 alarm state machine, as well as the dot output specification from graph_fsm and the graph_fsm.erl source file itself. I hope someone finds it useful. :) It won't likely work for every case of coding style but I make it work for the souerce files I create. It gets enhanced to deal with more cases as I need them internally. If you have any comments, suggestions or enhancement requests let me know. -Vance Vance Shipley Motivity Telecom Inc. +1 519 579 5816 Matthias Lang writes: > > At the Erlang User's Conference (thanks Bjarne, Bj=F6rn, Tuula and Eeva > and everyone else for organising a fabulous conference!) I mentioned > Vance Shipley's tool for graphing gen_fsm state machines. Someone in > the audience wanted to know more about it. > > I can't find the tool online anywhere, but I saw that Vance is active > on the mailing list, so getting a copy should be easy. (LGPL licence) > > I've attached an example of what I meant when I said the automatically > generated diagrams looked like the ITU spec redrawn by a tripping > hippie. The ITU's original is on page 5 of Q.703. > > Matthias > > -------------- next part -------------- A non-text attachment was scrubbed... Name: t1_spanfsm.gif Type: application/octet-stream Size: 30506 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: t1_spanfsm.dot Type: application/msword Size: 1326 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: graph_fsm.erl Type: application/octet-stream Size: 13091 bytes Desc: not available URL: From mickael.remond@REDACTED Mon Oct 1 19:46:07 2001 From: mickael.remond@REDACTED (Mickael Remond) Date: Mon, 1 Oct 2001 19:46:07 +0200 Subject: New Inets In-Reply-To: <402DD461F109D411977E0008C791C312039F6421@IMP02MBX> References: <402DD461F109D411977E0008C791C312039F6421@IMP02MBX> Message-ID: <20011001194607.B1795@erlang-fr.org> Sean Hinde (Sean.Hinde@REDACTED) wrote: > Hi, > > Inets was the inspiration for our tcp server process structure so I always > have a look inside when there is a new version. I think Inets is a good basis for many development and that we should increase its quality and efficiency when possible. Are there any plans to make use of binary optimization in Inets ? By the way, there is a little typo in the inets.app file: A comma is missing at the end of the mod_htaccess line (Pos 31,25). Cheers, -- Micka?l R?mond http://www.erlang-fr.org/ From shaman@REDACTED Mon Oct 1 20:25:58 2001 From: shaman@REDACTED (Thierry Mallard) Date: Mon, 1 Oct 2001 20:25:58 +0200 Subject: New Inets In-Reply-To: <7b8zev8mu8.fsf@schultze.infra.idealx.com> References: <402DD461F109D411977E0008C791C312039F6421@IMP02MBX> <7b8zev8mu8.fsf@schultze.infra.idealx.com> Message-ID: <20011001202558.A6814@mallard.com> On Mon, Oct 01, 2001 at 04:19:11PM +0200, Nicolas Niclausse wrote: > [ INETS ] > Indeed, i've just made a quick benchmark with httperf, and R8 is much > slower (using the same conf. file) > > httperf --hog --server schultze --port 8888 --num-conn 1000 --rate 150 > (150 requests sent per sec. to a html file of 4100bytes) > > R8-2001.09.24 Request rate: 63.1 req/s (15.9 ms/req) > R7B3 Request rate: 103.6 req/s (9.7 ms/req) > Apache 1.3.20 Request rate: 142.9 req/s (7.0 ms/req) I'm wondering how much concurrency we get here... (how many simultaneaous connection there is to the server). Any idea ? -- Thierry Mallard http://www.vawis.net -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 249 bytes Desc: not available URL: From proff@REDACTED Tue Oct 2 05:04:03 2001 From: proff@REDACTED (Julian Assange) Date: Tue, 2 Oct 2001 13:04:03 +1000 (EST) Subject: inets In-Reply-To: <00a601c14854$a9128320$aff4a3c3@martin> Message-ID: <20011002030403.963FB25A29@suburbia.net> [ Charset ISO-8859-1 unsupported, converting... ] > Hello Julian > > I have looked into your problem and it was really a bug in Inets. > But if you change the * to an Ip-number in the configuration file > the server will work alright. The bug will be fixed as soon as possible. > > Change this row: > > BindAddress * > > to something like this: > > BindAddress 127.0.0.1 Great! Works fine now. -- Julian Assange |If you want to build a ship, don't drum up people |together to collect wood or assign them tasks and proff@REDACTED |work, but rather teach them to long for the endless proff@REDACTED |immensity of the sea. -- Antoine de Saint Exupery From bjarne@REDACTED Tue Oct 2 08:19:29 2001 From: bjarne@REDACTED (Bjarne =?iso-8859-1?Q?D=E4cker?=) Date: Tue, 02 Oct 2001 08:19:29 +0200 Subject: Avoid this sort of stuff like the plague References: <20011001132228.14198.qmail@web20306.mail.yahoo.com> Message-ID: <3BB95C71.2E0C416@erix.ericsson.se> This is an attempt at fraud. Do not touch !!!!! Bjarne chima valentine wrote: > DEAR, > > STRICTLY CONFIDENTIAL > > THIS IS A MUTUAL BUSSINESS PROPOSAL THAT WILL BENEFIT > BOTH YOU AND MYSELF > > I AM THE ELDEST SON OF THE FAMOUS CHIEF NELSON MAKAYA > OF SOUTH AFRICA WHO WAS DURING HIS TIME DEAL ON COCOA > AND GOLD RESPECTIVELY, HE WAS ALSO THE CHIEF EXECUTIVE > OF AN ORGANIZATION KNOWN AS (SOUTH AFRICA PEOPLES > CLUB), AND HE WAS THE RUNING MATE TO THE INTERNAL > AFFAIR MINISTER OF SOUTH AFRICA DURING MADELA'S > REGIME. MY FATHER CHIEF NELSON MAKAYA WAS > ASSASSINATED ON THE( 2-7-2001 ) etc etc etc .... From bjarne@REDACTED Tue Oct 2 09:19:07 2001 From: bjarne@REDACTED (Bjarne =?iso-8859-1?Q?D=E4cker?=) Date: Tue, 02 Oct 2001 09:19:07 +0200 Subject: stickers, logos, etc. References: Message-ID: <3BB96A6B.417F73A6@erix.ericsson.se> This is the real McCoy .... -------------- next part -------------- A non-text attachment was scrubbed... Name: erlanim.gif Type: image/gif Size: 10821 bytes Desc: not available URL: From nicolas.niclausse@REDACTED Tue Oct 2 10:11:39 2001 From: nicolas.niclausse@REDACTED (Nicolas Niclausse) Date: 02 Oct 2001 10:11:39 +0200 Subject: New Inets In-Reply-To: <20011001202558.A6814@mallard.com> References: <402DD461F109D411977E0008C791C312039F6421@IMP02MBX> <7b8zev8mu8.fsf@schultze.infra.idealx.com> <20011001202558.A6814@mallard.com> Message-ID: <7bwv2ea2bo.fsf@schultze.infra.idealx.com> >>>>> "tsm" == Thierry Mallard ?crivait: >> httperf --hog --server schultze --port 8888 --num-conn 1000 --rate >> 150 (150 requests sent per sec. to a html file of 4100bytes) tsm> I'm wondering how much concurrency we get here... (how many tsm> simultaneaous connection there is to the server). Any idea ? yes, httperf gives the maximum number of concurrent connections: R8: Connection rate: 63.1 conn/s (15.9 ms/conn, <=685 concurrent connections) R7: Connection rate: 103.6 conn/s (9.7 ms/conn, <=200 concurrent connections) Apache:Connection rate: 142.9 conn/s (7.0 ms/conn, <=33 concurrent connections) (MaxClients was set to 950) -- Nicolas NICLAUSSE IDEALX S.A.S. T?l:01 44 42 00 00 http://IDEALX.org/ From shaman@REDACTED Tue Oct 2 10:41:14 2001 From: shaman@REDACTED (Thierry Mallard) Date: Tue, 2 Oct 2001 10:41:14 +0200 Subject: New Inets In-Reply-To: <7bwv2ea2bo.fsf@schultze.infra.idealx.com> References: <402DD461F109D411977E0008C791C312039F6421@IMP02MBX> <7b8zev8mu8.fsf@schultze.infra.idealx.com> <20011001202558.A6814@mallard.com> <7bwv2ea2bo.fsf@schultze.infra.idealx.com> Message-ID: <20011002104114.B1785@mallard.com> On Tue, Oct 02, 2001 at 10:11:39AM +0200, Nicolas Niclausse wrote: > >>>>> "tsm" == Thierry Mallard ?crivait: > [ about concurrency ] > yes, httperf gives the maximum number of concurrent connections: > > R8: Connection rate: 63.1 conn/s (15.9 ms/conn, <=685 concurrent connections) > R7: Connection rate: 103.6 conn/s (9.7 ms/conn, <=200 concurrent connections) > Apache:Connection rate: 142.9 conn/s (7.0 ms/conn, <=33 concurrent connections) Hmm.. the problem here is that the concurrency is directly dependent of the processing speed of the server. Apache process requests quickly, so it never had more concurrency. Maybe a complementary bench using "ab" would be usefull for that.. Thanks for the replies, anyway :-) -- Thierry Mallard http://www.vawis.net -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 249 bytes Desc: not available URL: From etxuwig@REDACTED Tue Oct 2 11:52:43 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Tue, 2 Oct 2001 11:52:43 +0200 (MET DST) Subject: efficiency, deep lists Message-ID: Hi, I've been playing around with continuation passing style when processing lists of lists. It does seem to be a bit cheaper than the alternative styles. If funs are optimized in R8, it should be even more so. Example: I wrote four different ways to increment all elements in a list of lists of integers (lists:duplicate(50, lists:seq(1,50)). The outcome on my machine was as follows: - incr1/1: 964 us - incr2/1: 814 us - incr3/1: 951 us - incr4/1: 914 us The winner, albeit by a hair, was: incr2([H|T]) -> incr22(H, fun() -> incr2(T) end); incr2([]) -> []. incr22([H|T], F) -> [H+1|incr22(T, F)]; incr22([], F) -> F(). So, question to the community. Does this style of programming strike you as offensive, or do you kind of like it? Personally, I feel that the other contenders only come close because ++ has been optimized in C, so I kind of like the continuation passing style because it is cheap by design. ;-) /Uffe **************************** -module(continuation). -author('etxuwig@REDACTED'). -compile(export_all). mk_list() -> lists:duplicate(50, lists:seq(1,10)). incr1([H|T]) when list(H) -> incr11(H) ++ incr1(T); incr1([]) -> []. incr11([H|T]) -> [H+1|incr11(T)]; incr11([]) -> []. incr2([H|T]) when list(H) -> incr22(H, fun() -> incr2(T) end); incr2([]) -> []. incr22([H|T], F) -> [H+1|incr22(T, F)]; incr22([], F) -> F(). incr3(List) -> lists:foldl( fun(L, Acc) -> incr11(L) ++ Acc end, [], List). incr4(List) -> incr11(lists:concat(List)). -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From luke@REDACTED Tue Oct 2 12:35:47 2001 From: luke@REDACTED (Luke Gorrie) Date: 02 Oct 2001 12:35:47 +0200 Subject: efficiency, deep lists In-Reply-To: References: Message-ID: Ulf Wiger writes: > I've been playing around with continuation passing style when > processing lists of lists. It does seem to be a bit cheaper than > the alternative styles. If funs are optimized in R8, it should be > even more so. I'll throw in another continuation-based version (for any-depth lists): incr5(L) -> incr55(L, []). %% incr55(DeepList, [Continuation]) incr55([H|T], C) when list(H) -> incr55(H, [T|C]); incr55([H|T], C) -> [H+1|incr55(T, C)]; incr55([], [C|Cs]) -> incr55(C, Cs); incr55([], []) -> []. The basic difference here is the trick that most of the time you can use a data structure instead of a fun for a continuation - which is perhaps a bit easier to read in crash reports :-). I think that if you did the any-depth implementation with funs, you'd have a chain of them each calling the next, which is the same basic thing as my list of continuations - which is fine too. I don't know about the relative efficiency, timer:tc is giving me wide ranges of numbers today. I would *guess* it's slightly cheaper since it conses instead of making a fun, and makes a local call instead of calling a fun. -- Favourite Haiku error: Three things are certain: Death, taxes, and lost data. Guess which has occurred. From Chandrashekhar.Mullaparthi@REDACTED Tue Oct 2 12:45:21 2001 From: Chandrashekhar.Mullaparthi@REDACTED (Chandrashekhar Mullaparthi) Date: Tue, 2 Oct 2001 11:45:21 +0100 Subject: efficiency, deep lists Message-ID: <402DD461F109D411977E0008C791C31205E06154@IMP02MBX> I actually like my style which yields even better results. And it has the added benefit of being tail recursive and more readable. I'm sorry Uffe if you were trying to make some other point. But my results seem to indicate that incr2 is the most expensive. But then timer:tc gives a wide range of results. But the pattern is the same. 3> timer:tc(continuation, incr1, [List]). {300,[2,3,4,5,6,7,8,9,10,11,2,3,4,5,6,7,8,9,10,11,2,3,4,5,6,7,8|...]} 4> timer:tc(continuation, incr2, [List]). {530,[2,3,4,5,6,7,8,9,10,11,2,3,4,5,6,7,8,9,10,11,2,3,4,5,6,7,8|...]} 5> timer:tc(continuation, incr3, [List]). {370,[2,3,4,5,6,7,8,9,10,11,2,3,4,5,6,7,8,9,10,11,2,3,4,5,6,7,8|...]} 6> timer:tc(continuation, incr4, [List]). {297,[2,3,4,5,6,7,8,9,10,11,2,3,4,5,6,7,8,9,10,11,2,3,4,5,6,7,8|...]} 7> timer:tc(continuation, myinc, [List]). {209,[2,3,4,5,6,7,8,9,10,11,2,3,4,5,6,7,8,9,10,11,2,3,4,5,6,7,8|...]} %%------------------------------ myinc(List) -> lists:reverse(myinc(List, [])). myinc([H|T], Acc) -> myinc(T, myinc2(H, Acc)); myinc([], Acc) -> Acc. myinc2([H|T], Acc) -> myinc2(T, [H+1|Acc]); myinc2([], Acc) -> Acc. %%--------------------------------- cheers, Chandru > -----Original Message----- > From: Ulf Wiger [mailto:etxuwig@REDACTED] > Sent: 2 October 2001 10:53 > To: erlang-questions@REDACTED > Subject: efficiency, deep lists > > > > Hi, > > I've been playing around with continuation passing style when > processing lists of lists. It does seem to be a bit cheaper than > the alternative styles. If funs are optimized in R8, it should be > even more so. > > > Example: > > I wrote four different ways to increment all elements in a list > of lists of integers (lists:duplicate(50, lists:seq(1,50)). > > The outcome on my machine was as follows: > > - incr1/1: 964 us > - incr2/1: 814 us > - incr3/1: 951 us > - incr4/1: 914 us > > > The winner, albeit by a hair, was: > > incr2([H|T]) -> > incr22(H, fun() -> incr2(T) end); > incr2([]) -> > []. > > incr22([H|T], F) -> > [H+1|incr22(T, F)]; > incr22([], F) -> > F(). > > > So, question to the community. Does this style of programming > strike you as offensive, or do you kind of like it? > > Personally, I feel that the other contenders only come close > because ++ has been optimized in C, so I kind of like the > continuation passing style because it is cheap by design. ;-) > > /Uffe > **************************** > > -module(continuation). > -author('etxuwig@REDACTED'). > > -compile(export_all). > > mk_list() -> > lists:duplicate(50, lists:seq(1,10)). > > incr1([H|T]) when list(H) -> > incr11(H) ++ incr1(T); > incr1([]) -> > []. > > incr11([H|T]) -> > [H+1|incr11(T)]; > incr11([]) -> > []. > > incr2([H|T]) when list(H) -> > incr22(H, fun() -> incr2(T) end); > incr2([]) -> > []. > > incr22([H|T], F) -> > [H+1|incr22(T, F)]; > incr22([], F) -> > F(). > > incr3(List) -> > lists:foldl( > fun(L, Acc) -> > incr11(L) ++ Acc > end, [], List). > > incr4(List) -> > incr11(lists:concat(List)). > > > > -- > Ulf Wiger tfn: +46 8 719 81 95 > Senior System Architect mob: +46 70 519 81 95 > Strategic Product & System Management ATM Multiservice Networks > Data Backbone & Optical Services Division Ericsson Telecom AB > NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From luke@REDACTED Tue Oct 2 14:11:06 2001 From: luke@REDACTED (Luke Gorrie) Date: 02 Oct 2001 14:11:06 +0200 Subject: efficiency, deep lists In-Reply-To: References: Message-ID: Luke Gorrie writes: > Ulf Wiger writes: > > > I've been playing around with continuation passing style when > > processing lists of lists. It does seem to be a bit cheaper than > > the alternative styles. If funs are optimized in R8, it should be > > even more so. > > I'll throw in another continuation-based version (for any-depth > lists): For benchmarking, here's the list-of-lists version, which is just Ulf's incr2 with the recursive call moved from where the continuation is created to where the continuation is invoked: incr6([H|T]) when list(H) -> incr66(H, T); incr6([]) -> []. incr66([H|T], C) -> [H+1|incr66(T, C)]; incr66([], C) -> incr6(C). Ulf, I'd be interested to know how it runs in the benchmark, since you seem to have a way of timing things better than us (maybe a Solaris thing?). -- Favourite Haiku error: Three things are certain: Death, taxes, and lost data. Guess which has occurred. From bjarne@REDACTED Tue Oct 2 14:47:00 2001 From: bjarne@REDACTED (Bjarne =?iso-8859-1?Q?D=E4cker?=) Date: Tue, 02 Oct 2001 14:47:00 +0200 Subject: Erlang workshop and user conference References: Message-ID: <3BB9B744.AF008193@erix.ericsson.se> Dear Erlang friends, You find the proceedings from the Erlang/OTP user conference in http://www.erlang.se/euc/01/ and from the Erlang workshop in http://www.erlang.se/workshop/ Have a nice Autumn (or Spring for Erlang hackers in the Southern hemisphere) ! Bjarne From richardc@REDACTED Tue Oct 2 15:57:33 2001 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 2 Oct 2001 15:57:33 +0200 (MET DST) Subject: efficiency, deep lists In-Reply-To: Message-ID: On 2 Oct 2001, Luke Gorrie wrote: > Luke Gorrie writes: > For benchmarking, here's the list-of-lists version, which is just > Ulf's incr2 with the recursive call moved from where the continuation > is created to where the continuation is invoked: This was interesting, so I did some benchmarks of my own. The results seem to have little variance, and I think they can be trusted: Time GC Reclaimed incr1: 11100 40000 2.1e7 ;naive incr2: 7200 25005 1.5e7 ;fun-continuation incr3: 6800 10014 2.0e7 ;bad foldl-version incr3': 11900 44000 4.7e7 ;corrected foldl-version incr4: 7400 5003 2.1e7 ;flatten first incr5: 9000 30001 1.1e7 ;continuation as data incr6: 5200 10002 1.0e7 ;list-of-lists only incr7: 9200 53342 2.4e7 ;tail recursive version of 5 incr8: 7600 26668 2.3e7 ;tail recursive version of 6 incr9: 8000 20738 1.6e7 ;fun-continuation (any depth) Explanations: incr3 was incorrectly implemented - the returned list is in the wrong order, and since it did not compute the same function, it could execute more efficiently than incr1, even though they seem to be very similar at first glance. The corrected incr3' looks as follows: incr3(List) -> lists:reverse(lists:foldl( fun(L, Acc) -> lists:reverse(incr11(L)) ++ Acc end, [], List)). and as can be seen above, it is comparable to incr1. incr5 and incr6 are those implemented by Luke. As the table shows, incr6 is clearly the fastest implementation, but note that incr2 is not bad in comparison to incr1 and incr4. incr7 and incr8 are tail-recursive versions of Luke's implementations, using an accumulator argument and reversing the final list before returning. The measurements show that there is apparently no advantage to that technique in this case. The really interesting version is incr9, which both uses funs as continuations and handles lists of any depth. The code is very elegant, and as you can see from the table, it is actually more efficient than incr5. /Richard Code for incr7-9: incr7(L) -> lists:reverse(incr77(L, [], [])). %% incr77(DeepList, [Continuation], [Accumulator]) incr77([H|T], C, A) when list(H) -> incr77(H, [T|C], A); incr77([H|T], C, A) -> incr77(T, C, [H+1|A]); incr77([], [C|Cs], A) -> incr77(C, Cs, A); incr77([], [], A) -> A incr8(L) -> lists:reverse(incr88(L, [])). incr88([H|T], A) when list(H) -> incr888(H, T, A); incr88([], A) -> A. incr888([H|T], C, A) -> incr888(T, C, [H+1|A]); incr888([], C, A) -> incr88(C, A). incr9(L) -> incr99(L, fun () -> [] end). incr99([H|T], C) when list(H) -> incr99(H, fun () -> incr99(T, C) end); incr99([H|T], C) -> [H+1|incr99(T, C)]; incr99([], C) -> C(). Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://www.csd.uu.se/~richardc/ From jamesh@REDACTED Tue Oct 2 16:11:08 2001 From: jamesh@REDACTED (James Hague) Date: Tue, 2 Oct 2001 09:11:08 -0500 Subject: Erlang workshop and user conference Message-ID: > You find the proceedings from the Erlang/OTP > user conference in > > http://www.erlang.se/euc/01/ Wow, the Wings project is exciting! That the graphics calls are implemented with message passing and even though floating point has never been Erlang's strong point makes it even more impressive. On the subject of floating point, I was recently thinking "What if Erlang had a floating point vector type instead of individual floats?" Right now, floats are indepdently heap allocated, so the tuple {1.0, 1.0, 1.0} exists as four separate data objects. With a a floating point vector type there would be one data object. This would open to door to writing APL-style vector operations, where 1.0 + |1.0,2.0,3.0| would result in |2.0,3.0,4.0|. The bare float 1.0 is shorthand for |1.0|. This would allow really fast 3D math in Erlang. (Just add built in operations for normalize, magnitude, dot and cross products, and this would be amazing.) Musing, musing... James From bjorn@REDACTED Tue Oct 2 17:12:23 2001 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 02 Oct 2001 17:12:23 +0200 Subject: Erlang workshop and user conference In-Reply-To: James Hague's message of "Tue, 2 Oct 2001 09:11:08 -0500" References: Message-ID: James Hague writes: > > You find the proceedings from the Erlang/OTP > > user conference in > > > > http://www.erlang.se/euc/01/ > > Wow, the Wings project is exciting! That the graphics calls are implemented > with message passing and even though floating point has never been Erlang's > strong point makes it even more impressive. By a curious coincidence, floating point operations happens to be significantly faster in R8, provided that the compiler can figure out the types. To let the compiler know, simply use the guard test float/1, for instance: cross({V10,V11,V12}, {V20,V21,V22}) when float(V10), float(V11), float(V12), float(V20), float(V21), float(V22) -> {V11*V22-V12*V21,V12*V20-V10*V22,V10*V21-V11*V20}. > > On the subject of floating point, I was recently thinking "What if Erlang > had a floating point vector type instead of individual floats?" Right now, > floats are indepdently heap allocated, so the tuple {1.0, 1.0, 1.0} exists > as four separate data objects. With a a floating point vector type there > would be one data object. This would open to door to writing APL-style > vector operations, where 1.0 + |1.0,2.0,3.0| would result in |2.0,3.0,4.0|. > The bare float 1.0 is shorthand for |1.0|. This would allow really fast 3D > math in Erlang. (Just add built in operations for normalize, magnitude, dot > and cross products, and this would be amazing.) Interesting idea. It is too late to add it to R8, though... :-) > > Musing, musing... > > James > /Bjorn -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 +46 8 727 56 87 125 25 ?lvsj? From jamesh@REDACTED Tue Oct 2 17:25:26 2001 From: jamesh@REDACTED (James Hague) Date: Tue, 2 Oct 2001 10:25:26 -0500 Subject: Erlang workshop and user conference Message-ID: > To let the compiler know, simply use the guard test float/1, > for instance: > > cross({V10,V11,V12}, {V20,V21,V22}) when float(V10), > float(V11), float(V12), float(V20), float(V21), > float(V22) -> > {V11*V22-V12*V21,V12*V20-V10*V22,V10*V21-V11*V20}. I love the speed improvements, but that sure is _verbose_. From etxuwig@REDACTED Tue Oct 2 17:40:07 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Tue, 2 Oct 2001 17:40:07 +0200 (MET DST) Subject: efficiency, deep lists In-Reply-To: Message-ID: On Tue, 2 Oct 2001, Richard Carlsson wrote: >This was interesting, so I did some benchmarks of my own. The >results seem to have little variance, and I think they can be >trusted: [solid-looking numbers indicating that CPS is not too bad] What I was getting at was that it appeared as if continuation passing style actually led to pretty good performance, but I couldn't recall having seen much of it in Erlang. The real function I rewrote was not (increment on deep lists), but the following (slightly modified to protect the innocent): ---------------------------------------------------- get_values(Keys) when list(Keys) -> lists:foldl( fun(K, Acc) -> get_vals(K) ++ Acc end, [], Keys). get_vals(Key) -> [{_, Points}] = ets:lookup(mytab, Key), lists:map( fun({point, Value}) -> Value end, Points). ---------------------------------------------------- which I rewrote thus: ---------------------------------------------------- get_values2([Key|Keys]) -> get_vals2(Key, fun() -> get_values2(Keys) end); get_values2([]) -> []. get_vals2(Key, Cont) -> [{_, Points}] = ets:lookup(mytab, Key), get_values2(Points, Cont). get_values2([{point, Value}|Points], Cont) -> [Value | get_values2(Points, Cont)]; get_values2([], Cont) -> Cont(). ---------------------------------------------------- Here's a helper function that I used to populate a table. ---------------------------------------------------- fill_tab() -> ets:new(mytab, [set, public, named_table]), Ps = lists:seq(1,10), Points = [{point, V} || V <- Ps], lists:foreach( fun(P) -> Obj = {P, Points}, ets:insert(mytab, Obj) end, Ps). ---------------------------------------------------- My version seems to be about 50% faster in a sloppy benchmark. In this case, the input is not a deep list, because we don't want to read it all onto the heap to begin with. The continuation passing style still works fine. /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From etxuwig@REDACTED Tue Oct 2 17:44:24 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Tue, 2 Oct 2001 17:44:24 +0200 (MET DST) Subject: efficiency, deep lists In-Reply-To: Message-ID: On Tue, 2 Oct 2001, Ulf Wiger wrote: >get_values2([Key|Keys]) -> > get_vals2(Key, fun() -> get_values2(Keys) end); >get_values2([]) -> > []. > >get_vals2(Key, Cont) -> > [{_, Points}] = ets:lookup(mytab, Key), > get_values2(Points, Cont). > >get_values2([{point, Value}|Points], Cont) -> > [Value | get_values2(Points, Cont)]; >get_values2([], Cont) -> > Cont(). Never mind the weird choice of function names. It was a quick copy-and-paste job to change the original names to something more general.... I should have left it as it was. /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From jamesh@REDACTED Tue Oct 2 20:33:03 2001 From: jamesh@REDACTED (James Hague) Date: Tue, 2 Oct 2001 13:33:03 -0500 Subject: Erlang workshop and user conference Message-ID: > > cross({V10,V11,V12}, {V20,V21,V22}) when float(V10), > > float(V11), float(V12), float(V20), float(V21), > > float(V22) -> > > {V11*V22-V12*V21,V12*V20-V10*V22,V10*V21-V11*V20}. > > I love the speed improvements, but that sure is _verbose_. Better: -define(floats(X,Y,Z), float(X), float(Y), float(Z)). cross({V10,V11,V12}, {V20,V21,V22}) when ?floats(V10,V11,V12), ?floats(V20,V21,V22) -> {V11*V22-V12*V21,V12*V20-V10*V22,V10*V21-V11*V20}. Now we just need cross added to the math module and implemented in C :) James From kent@REDACTED Tue Oct 2 21:52:57 2001 From: kent@REDACTED (Kent Boortz) Date: 02 Oct 2001 21:52:57 +0200 Subject: The update R7B-4 is released In-Reply-To: Kent Boortz's message of "01 Jun 2001 16:57:14 +0200" References: Message-ID: Bug fix release : otp_src_R7B-4 >From snapshot : 20010930 This is a bug fix release R7B-4. You can download the full source distribution or the patch that take R7B-3 up to R7B-4. http://www.erlang.org/download/otp_src_R7B-4.tar.gz http://www.erlang.org/download/otp_src_R7B-3to4.patch.gz If you are on the Ericsson intranet you can now use http://erlang.ericsson.se/opensource/download/otp_src_R7B-4.tar.gz http://erlang.ericsson.se/opensource/download/otp_src_R7B-3to4.patch.gz The release readme is included below. To patch the previos release "otp_src_R7B-3" you use a patch program that understand the "unified" patch format and do % cd otp_src_R7B-X % gzip -dc /location/of/patch/file/otp_src_R7B-3to4.patch.gz | patch -p1 There is no support for building a Windows version from source. For installation instructions please read the README that is part of the distribution, The OTP Team Release notes -- mnesia ----------------------------------------------------------------- OTP-3712 - Speed/load improvements disc_copies tables are not implemented with dets anymore. OTP-XXXX - Removed references to dead nodes in loader queue, which could lead to system wide hangings, if a node goes down and another node has a reference to it in it's queue. OTP-4097 - Mnesia (3.10.0) could crash during restart if it the logs contained an update_counter operation. OTP-4102 - Mnesia didn't remove buffered messages from dead nodes, which could lead to that mnesia hanged if a mnesia went down on another node during early startup. OTP-4127 - The user supplied fallback_error_function now get's the dying Node name as an argument. -- mnesia_session --------------------------------------------------------- Fixed error in table_info when accessing mnesia version 3.9.4 or later. -- asn1 ------------------------------------------------------------------- OTP-4025 - Do not generate record in .hrl file for SET types OTP-4026 - Fixed internal error when using BIT STRINGs with Named Number List in combination with compact_bit_string and ber_bin options. OTP-4037 - The atom 'com' can now be used in ENUMERATED as an EnumerationItem. OTP-4057 - ber: Now it is possible to encode data from format "{Type,Value}" in a SEQUENCE OF RequestParameter, when RequestParameter is of type ENUMERATED. OTP-4058 - Now is the bug in the new parser removed, that caused failure on COMPONENTS OF. -- erts/kernel/runtime_tools ---------------------------------------------- OTP-4018 - disk_log caches written terms. This implies that the close, lclose and sync functions can return file errors. pid2name/1 is a new debug function that given a disk log process (a pid) returns the name of the log. OTP-4015 - In configurations where hostname resolving was done by the inet_gethost_native module, a race condition could make processes calling inet:gethostbyname crash with an exitcode 'unexpected_supervisor_response'. That race condition is now removed. OTP-3933 - A trace client fun that can be given to dbg:trace_client/3 now gets informed about the end of trace, so it can do something useful with its collected data. See dbg:trace_client/3. OTP-3934 - The flag 'procs' to erlang:trace/3 has got a slightly new behaviour: Trace tag 'spawn' has a new element, and trace tags 'register', 'unregister', and 'getting_unlinked' are new. Therefore, new and/or different trace messages will arrive to the tracer when the 'procs' trace flag is used. OTP-3938 - When using trace flags 'running' and 'timestamp' to determine the amount of running time different processes in the system were using, the results were somewhat unreliable since the time to write the trace buffer itself randomly burdened the traced processes. This is now compensated for by faking process schedule out and in trace messages around the file writes (for the trace file driver trace_file_drv). OTP-3935 - Wrap file traces now can limit the size of each file with a time instead of a size. See the documentation for dbg:trace_port/2. OTP-3965 - The file names for wrap file traces has been changed. This has been done to make it easier for auxiliary tools to know the file names when fetching wrap traces over the network, especially if the tools used for fetching does not support wildcards in filenames. See the documentation for dbg:trace_port/2. NOTE that this change may affect existing fetch tools. Especially note that the number of files in the wrap trace must now be known when reading the trace, or as it is stated in the documentation: the same wrap trace specification must be used when reading the trace as when creating the trace. OTP-4047 - When gen_tcp:controlling_process/2 was called with a closed socket as argument, it crashed internally with a badmatch. This has now been corrected. The error return code from gen_tcp:send/2 has been changed in some cases to harmonize with the error return codes from other functions in the module. This is a slight incompatibility. OTP-3929 - When demonitor/1 was used on a monitor for a process on another node (for example, using gen_server calls), not all associated allocated memory was freed, causing a memory leak of some 20 bytes each time. This has been fixed. OTP-4019 - The --enable-threads flag was previously ignored by the configure script. This has now been corrected, and it is now possible to enable threads by passing the --enable-threads flag to the configure script when building the open source release. OTP-4071 - When the system limit on maximal number of nodes known to a node had been reached (the distribution table had been filled), pids, ports, and references belonging to previously connected nodes could change node belonging. This bug has now been fixed. OTP-4075 - dlmalloc was introduced in the Erlang emulator version 5.0.2.3 because it performed better than Solaris malloc when the emulator needed to allocate large short-lived memory blocks. It was later observed that it performed worse than Solaris malloc under some conditions. We have therefore now removed dlmalloc and replaced it with our own special treatment of short-lived memory blocks (called sl_alloc) and the standard malloc implementation for other blocks. The current version of sl_alloc uses the system call mmap() (on platforms where mmap() exists) in order to allocate large blocks (just as dlmalloc) and uses the standard malloc implementation for small blocks. Maximum number of mmapped blocks and the threshold which is used to determine if a block should be mmapped can be adjusted, see "System Flags" in erl(1). sl_alloc can be disabled. The standard malloc implementation will in this case be used instead, see "System Flags" in erl(1). OTP-4095 - A memory leak in the efile driver has been fixed. For every file that was closed, 12 bytes were lost. OTP-4109 - A bug in the heap fragment allocation could cause an emulator crash. This bug has now been fixed. OTP-4112 - Emulator could crash due to exiting process monitoring process on a node that concurrently goes down. This has now been corrected. OTP-4116 - Miscalculation in gc could cause emulator crash. This has now been fixed. OTP-4089 - A creepy bug involving trace has been corrected: when trace process specification 'all' or 'new' was given to erlang:trace/3, a default trace flags and tracer for new processes was stored in the emulator. If then, this tracer was killed, all existing processes that tried to send trace messages to the killed tracer noted that their tracer was dead, and cleared their trace flags, so, eventually, the tracing in the emulator faded off, except for all new processes that also cleared their trace flags only after trying to send one trace message to the dead tracer. So far so well. Not neat, but well. Unfortunately, much later, the pid of the dead tracer was reused for a new innocent process that unexpectedly got all trace messages from all new processes. This typically caused that process to crash. Now, when the process that is default tracer dies, the emulator default trace flags and tracer are cleared immediately. The faked time compensating trace message {trace_ts, Pid, out, MFA} has been changed to {trace_ts, Pid, out, 0} because the MFA was almost always wrong, and very hard to make correct. The same applies for {trace_ts, Pid, in, 0} as well, but of course, the real 'out' and 'in' messages contains MFA as before. This may be regarded as an incompability, but note that MFA=0 could appear before in rare cases, though it was not documented. A trace flag 'all' has been added to the repertoire of erlang:trace/3. When turning off trace flags with erlang:trace/3, it is no longer necessary to state the correct current tracer of the traced process(es). Please see the documentation for erlang:trace/3. OTP-4120 - An mmap leak in sl_alloc has been fixed. OTP-4115 - A memory leak of 36 bytes per thread created, and a potential memory leak of 8 bytes per thread created have been fixed. -- os_mon ----------------------------------------------------------------- OTP-4000 - Gen_server calls to the memsup server of the os_mon application could fail due to slow responses from the memsup port program. The memory polling is now handled by a separate process making answers from memsup more or less instant. The disksup server of the os_mon application is modified so that it does not use os:cmd() on Unix systems. -- orber ------------------------------------------------------------------ Orber now support interceptors. -- cosEvent -------------------------------------------------------------- cosEvent-2.0 This version is a completely new version of the cosEvent application; older versions was not compliant with the OMG specification. The look and feel have been changed to be more uniform with the other COS-services. Incompatibilities ----------------- All API:s not compliant with the OMG standard have been removed. Registering the cosEvent application in the IFR is done via the cosEventApp module. Upgrade in runtime is not possible. -- cosNotification ------------------------------------------------------- OTP-4078 - It is now possible to start global channel factories. OTP-4077 - The Orber, version 3.2.5 or later, configuration parameter orber_debug_level can now be used to generate reports when abnormal situations occurs. For more information consult the Orber User's Guide. Note, it is not recommended to use this option for delivered systems since some of the reports is not to be considered as errors. The value of orber_debug_level must be 3, or higher, for reports to be generated. OTP-4079 - When using the cosEvent API accessing a cosNotification admins the objects returned by the functions obtain_push_supplier, obtain_pull_supplier, obtain_push_consumer and obtain_pull_consumer was not of the correct type. Due to the interface change it is not possible to upgrade during runtime. -- cosNotification/cosTime ----------------------------------------------- OTP-4086 - If one used the '_get_default_supplier_admin'/1, exported by the CosNotifyChannelAdmin_EventChannel-module, it resulted in a loop which overloaded the channel. This is no longer the case. OTP-4092 - If one used the '_get_default_filter_factory'/1, exported by the CosNotifyChannelAdmin_EventChannel-module, a new instance was created each time. Now fixed. OTP-4098 - SupplierAdmin's did not filter any events, even though Filter objects had been attached to the SupplierAdmin. OTP-4099 - When passing event sequences, the PushSuppliers and PullSuppliers could crash if the objects had Filter objects associated and only a subset of the sequences where approved. OTP-4093 - The include paths for CosNotification.idl have been changed. Hence, if you include this file in your own IDL-files you must update your paths to also point to where the cosEvent IDL-files are stored. An includepath in CosTimerEvent.idl have been changed. Hence, if you include this file you should check your include paths for your IDL-file(s), i.e., add the path to CosEventComm.idl. -- tools ----------------------------------------------------------------- OTP-4010 - A preliminary version of the new fprof tool has been added to application tools. -- ic -------------------------------------------------------------------- OTP-4107 - Added the erlang binary special type in C backends. The erlang binary special type allows efficient transfer of binaries between erlang and C. At the C side, the erlang binary type is represented the same way as idl-c sequences. At the erlang side, the build in binary type is used. To erlang binary type is defined inside the erlang.idl file. -- sasl ------------------------------------------------------------------ OTP-3998 - systools:make_relup/3,4 now generates upgrade instructions for the applications in start order, instead of in reversed start order. OTP-4121 - systools:make_script/1,2 now keeps the order of the release resource file (.rel) also for included applications. From david@REDACTED Wed Oct 3 00:08:51 2001 From: david@REDACTED (david wallin) Date: Wed, 3 Oct 2001 00:08:51 +0200 Subject: The update R7B-4 is released In-Reply-To: Message-ID: <0FE7C7A1-B782-11D5-B22E-000393536F4E@wallin.cx> Is there any known problems with R7B-4 on Mac OS X.1 ? I followed what the README note (heading: Darwin/OS X) said. I did the same for R7B-3 on OS X 10.0.3, and it built then. Here's the error message : cc -g -O2 -I/Users/david/Desktop/otp_src_R7B-4/erts/autoconf/powerpc-apple- darwin1.4 -no-cpp-precomp -fPIC -Wall -O2 -DDEBUG_DIST -I. -DHAVE_CONFIG_H -DUSE_DNS -DEPMD_PORT=4369 -c erl_malloc.c -o /Users/david/Desktop/otp_src_R7B-4/lib/erl_interface/obj/powerpc-apple-darwin1. 4/erl_malloc.o /var/tmp/ccaDdaaa.s:324:Expected comma after segment-name /var/tmp/ccaDdaaa.s:324:Rest of line ignored. 1st junk character valued 46 (.). /var/tmp/ccaDdaaa.s:324:Spurious digit 0. /var/tmp/ccaDdaaa.s:324:Spurious digit 6. /var/tmp/ccaDdaaa.s:324:Rest of line ignored. 1st junk character valued 57 (9). /var/tmp/ccaDdaaa.s:324:Junk character 40 ((). /var/tmp/ccaDdaaa.s:324:Rest of line ignored. 1st junk character valued 48 (0). make[4]: *** [/Users/david/Desktop/otp_src_R7B-4/lib/erl_interface/obj/powerpc-apple-darwin1. 4/erl_malloc.o] Error 1 have a nice day, --david. On tisdag, oktober 2, 2001, at 09:52 , Kent Boortz wrote: > > Bug fix release : otp_src_R7B-4 > From snapshot : 20010930 > From david@REDACTED Wed Oct 3 00:10:55 2001 From: david@REDACTED (david wallin) Date: Wed, 3 Oct 2001 00:10:55 +0200 Subject: The update R7B-4 is released In-Reply-To: Message-ID: <59E34B1C-B782-11D5-B22E-000393536F4E@wallin.cx> Is there any known problems with R7B-4 on Mac OS X.1 ? I followed what the README note (heading: Darwin/OS X) said. I did the same for R7B-3 on OS X 10.0.3, and it built then. Here's the error message : cc -g -O2 -I/Users/david/Desktop/otp_src_R7B-4/erts/autoconf/powerpc-apple- darwin1.4 -no-cpp-precomp -fPIC -Wall -O2 -DDEBUG_DIST -I. -DHAVE_CONFIG_H -DUSE_DNS -DEPMD_PORT=4369 -c erl_malloc.c -o /Users/david/Desktop/otp_src_R7B-4/lib/erl_interface/obj/powerpc-apple-darwin1. 4/erl_malloc.o /var/tmp/ccaDdaaa.s:324:Expected comma after segment-name /var/tmp/ccaDdaaa.s:324:Rest of line ignored. 1st junk character valued 46 (.). /var/tmp/ccaDdaaa.s:324:Spurious digit 0. /var/tmp/ccaDdaaa.s:324:Spurious digit 6. /var/tmp/ccaDdaaa.s:324:Rest of line ignored. 1st junk character valued 57 (9). /var/tmp/ccaDdaaa.s:324:Junk character 40 ((). /var/tmp/ccaDdaaa.s:324:Rest of line ignored. 1st junk character valued 48 (0). make[4]: *** [/Users/david/Desktop/otp_src_R7B-4/lib/erl_interface/obj/powerpc-apple-darwin1. 4/erl_malloc.o] Error 1 have a nice day, --david. On tisdag, oktober 2, 2001, at 09:52 , Kent Boortz wrote: > > Bug fix release : otp_src_R7B-4 > From snapshot : 20010930 > From vladdu@REDACTED Wed Oct 3 09:56:47 2001 From: vladdu@REDACTED (Vlad Dumitrescu) Date: Wed, 3 Oct 2001 09:56:47 +0200 Subject: Erlang workshop and user conference References: Message-ID: >> > cross({V10,V11,V12}, {V20,V21,V22}) when float(V10), >> > float(V11), float(V12), float(V20), float(V21), >> > float(V22) -> >> > {V11*V22-V12*V21,V12*V20-V10*V22,V10*V21-V11*V20}. >Better: >-define(floats(X,Y,Z), float(X), float(Y), float(Z)). > >cross({V10,V11,V12}, {V20,V21,V22}) > when ?floats(V10,V11,V12), ?floats(V20,V21,V22) -> > {V11*V22-V12*V21,V12*V20-V10*V22,V10*V21-V11*V20}. Hi, Just a 2 beans thought... Wouldn't it be even nicer to read and easier to understand if one could add some syntactic sugar and be able to specify types not as fun(X, {Y, Z}) when integer(X), list(Z) -> ... but as (for example) fun (X/integer, {Y, Z/list}) -> ... ? regards, Vlad From kent@REDACTED Wed Oct 3 10:22:00 2001 From: kent@REDACTED (Kent Boortz) Date: 03 Oct 2001 10:22:00 +0200 Subject: The update R7B-4 is released In-Reply-To: david wallin's message of "Wed, 3 Oct 2001 00:10:55 +0200" References: <59E34B1C-B782-11D5-B22E-000393536F4E@wallin.cx> Message-ID: OS X is still not part of our daily test and build and this time I had no time to manually build and run on OS X (busy with R8). But the error you get is not a syntax error and looks more like an internal error from the assembler/compiler/linker. I haven't seen this error message or anything similar before but will try to find time to do a build myself. kent david wallin writes: > Is there any known problems with R7B-4 on Mac OS X.1 ? I followed what > the README note (heading: Darwin/OS X) said. I did the same for R7B-3 on > OS X 10.0.3, and it built then. > > Here's the error message : > > cc -g -O2 > -I/Users/david/Desktop/otp_src_R7B-4/erts/autoconf/powerpc-apple- > darwin1.4 -no-cpp-precomp -fPIC -Wall -O2 -DDEBUG_DIST -I. > -DHAVE_CONFIG_H -DUSE_DNS -DEPMD_PORT=4369 -c erl_malloc.c -o > /Users/david/Desktop/otp_src_R7B-4/lib/erl_interface/obj/powerpc-apple-darwin1. > 4/erl_malloc.o > /var/tmp/ccaDdaaa.s:324:Expected comma after segment-name > /var/tmp/ccaDdaaa.s:324:Rest of line ignored. 1st junk character valued > 46 (.). > /var/tmp/ccaDdaaa.s:324:Spurious digit 0. > /var/tmp/ccaDdaaa.s:324:Spurious digit 6. > /var/tmp/ccaDdaaa.s:324:Rest of line ignored. 1st junk character valued > 57 (9). > /var/tmp/ccaDdaaa.s:324:Junk character 40 ((). > /var/tmp/ccaDdaaa.s:324:Rest of line ignored. 1st junk character valued > 48 (0). > make[4]: *** > [/Users/david/Desktop/otp_src_R7B-4/lib/erl_interface/obj/powerpc-apple-darwin1. > 4/erl_malloc.o] Error 1 From bertil.karlsson@REDACTED Wed Oct 3 10:43:51 2001 From: bertil.karlsson@REDACTED (Bertil Karlsson) Date: Wed, 03 Oct 2001 10:43:51 +0200 Subject: ASN.1 question References: <5F03ACA2F76DD411B8BC00508BE3B4D704AFA7AE@esemont203.gbg.edt.ericsson.se> Message-ID: <3BBACFC7.9C45568A@uab.ericsson.se> Hello, I don't know which version of the ASN.1 compiler you are using, so I don't know how your compilation failed. The support of Information Objects (X.681) is new since version 1.3 of the compiler. Then we supported that functionality for PER encoding only. The R8 release contains a new asn1 compiler, asn1-1.3.2, which supports X.681 also for BER encoding. However, your ASN.1 code will not work anyhow, because you discovered one shortcomming of the compiler and one bug. The bug is corrected in the new version of the compiler. The shortcoming is that the expression in the constraint "bound.&minTimeAndTimezoneLength .. bound.&maxTimeAndTimezoneLength" uses the ASN.1 item ValueFromObject, which we yet have not handled in the parser in the way it appears in your example. If you are going to use R8, you can change the constraint mentioned above and it will work. /Bertil Karlsson "Pedro Jeria (ERV)" wrote: > > Hi, > > I'm trying to compile one ASN.1 module (with asn1ct BER) but it seems that OTP does not handle the ASN.1 type 'CLASS' correctly. Therefore I have a question: How can I redesign for ex. the following code so it would compile: > > TimeAndTimezone {PARAMETERS-BOUND : bound}::= OCTET STRING (SIZE( > bound.&minTimeAndTimezoneLength .. bound.&maxTimeAndTimezoneLength)) > > PARAMETERS-BOUND ::= CLASS > { > &minTimeAndTimezoneLength INTEGER, > &maxTimeAndTimezoneLength INTEGER > } > WITH SYNTAX > { > MINIMUM-FOR-TIME-AND-TIMEZONE &minTimeAndTimezoneLength > MAXIMUM-FOR-TIME-AND-TIMEZONE &maxTimeAndTimezoneLength > } > capSpecificBoundSet PARAMETERS-BOUND ::= > { > MINIMUM-FOR-TIME-AND-TIMEZONE 8 > MAXIMUM-FOR-TIME-AND-TIMEZONE 8 > } > > Thanks > /Pedro From richardc@REDACTED Wed Oct 3 12:11:14 2001 From: richardc@REDACTED (Richard Carlsson) Date: Wed, 3 Oct 2001 12:11:14 +0200 (MET DST) Subject: efficiency, deep lists In-Reply-To: Message-ID: On Tue, 2 Oct 2001, Ulf Wiger wrote: > What I was getting at was that it appeared as if continuation > passing style actually led to pretty good performance, but I > couldn't recall having seen much of it in Erlang. Precisely. Probably this is because in the dark ages (i.e., up until a year or two ago), Erlang funs were rather inefficiently implemented; in particular, a fun application was a lot slower (at least 7-8 times) than a normal function call, in the early Beam implementations. Today, fun applications are only ~3 times slower than a local function call (local calls have also been made faster since then, so this is really quite a good number). Furthermore, creating a fun value was a bit expensive in R6 - compared to creating a tuple of comparable size - but in R8, this is much faster (twice as fast as in R7, actually; too bad I don't have any figures to compare R6 with R7). Numbers taken from Bj?rn Gustavsson's home page: http://www.ericsson.com/cslab/~bjorn/. > The real function I rewrote was not (increment on deep lists), > but the following (slightly modified to protect the innocent): So the order of Value elements in the final list was not important? (Since your new version changes the order to strict left-to-right. Maybe this was also a bug fix?) And regarding the names - you can eliminate the get_vals2/2 function by inlining it in get_values2/1. /Richard > ---------------------------------------------------- > get_values(Keys) when list(Keys) -> > lists:foldl( > fun(K, Acc) -> > get_vals(K) ++ Acc > end, [], Keys). > > get_vals(Key) -> > [{_, Points}] = ets:lookup(mytab, Key), > lists:map( > fun({point, Value}) -> > Value > end, > Points). > ---------------------------------------------------- > > which I rewrote thus: > > > ---------------------------------------------------- > get_values2([Key|Keys]) -> > get_vals2(Key, fun() -> get_values2(Keys) end); > get_values2([]) -> > []. > > get_vals2(Key, Cont) -> > [{_, Points}] = ets:lookup(mytab, Key), > get_values2(Points, Cont). > > get_values2([{point, Value}|Points], Cont) -> > [Value | get_values2(Points, Cont)]; > get_values2([], Cont) -> > Cont(). > > ---------------------------------------------------- > > Here's a helper function that I used to populate a table. > > ---------------------------------------------------- > fill_tab() -> > ets:new(mytab, [set, public, named_table]), > Ps = lists:seq(1,10), > Points = [{point, V} || V <- Ps], > lists:foreach( > fun(P) -> > Obj = {P, Points}, > ets:insert(mytab, Obj) > end, Ps). > ---------------------------------------------------- > > > My version seems to be about 50% faster in a sloppy benchmark. > > In this case, the input is not a deep list, because we don't want > to read it all onto the heap to begin with. The continuation > passing style still works fine. > > /Uffe > -- > Ulf Wiger tfn: +46 8 719 81 95 > Senior System Architect mob: +46 70 519 81 95 > Strategic Product & System Management ATM Multiservice Networks > Data Backbone & Optical Services Division Ericsson Telecom AB > > > > Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://www.csd.uu.se/~richardc/ From etxuwig@REDACTED Wed Oct 3 13:03:02 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Wed, 3 Oct 2001 13:03:02 +0200 (MET DST) Subject: efficiency, deep lists In-Reply-To: Message-ID: On Wed, 3 Oct 2001, Richard Carlsson wrote: >On Tue, 2 Oct 2001, Ulf Wiger wrote: > >> The real function I rewrote was not (increment on deep lists), >> but the following (slightly modified to protect the innocent): > >So the order of Value elements in the final list was not >important? (Since your new version changes the order to strict >left-to-right. Maybe this was also a bug fix?) Uhm, perhaps you're seeing something I don't...? Anyway, I did the following: 9> Keys = lists:seq(1,10). [1,2,3,4,5,6,7,8,9,10] 10> continuation:get_values(Keys). [1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9|...] 11> continuation:get_values2(Keys). [1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9|...] 12> v(10) == v(11). true and therefore concluded that the functions were equivalent, without any deeper code analysis. /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From vladdu@REDACTED Wed Oct 3 13:36:51 2001 From: vladdu@REDACTED (Vlad Dumitrescu) Date: Wed, 3 Oct 2001 13:36:51 +0200 Subject: Wings 0.70 patch Message-ID: Hi, I've played a little with Wings, and it's great! Since my 3 button mouse seems not to be recognized as such, I found a small bug in using Alt-Button1 to emulate Button3... Here comes the patch in wings.erl 1009,1010c1009,1015 < translate_event(#mousebutton{button=1,x=X,y=Y,state=?SDL_PRESSED}, St) -> < ignore; --- > translate_event(#mousebutton{button=1,x=X,y=Y,state=?SDL_PRESSED}=Mb, St) -> > case sdl_keyboard:getModState() of > Mod when Mod band ?ALT_BITS =/= 0 -> > translate_event(Mb#mousebutton{button=2}, St); > _ -> > ignore > end; Have a nice day, Vlad From bjorn@REDACTED Wed Oct 3 14:14:56 2001 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 03 Oct 2001 14:14:56 +0200 Subject: Wings 0.70 patch In-Reply-To: "Vlad Dumitrescu"'s message of "Wed, 3 Oct 2001 13:36:51 +0200" References: Message-ID: Thanks for the patch. It will be included in next release of Wings, which probably will appear within a few days. BTW, there is now a version 0.71 at the Wings page, which fixes a few minor bugs, such as the infamous "demo bug" shown at the Erlang conference. /Bjorn "Vlad Dumitrescu" writes: > Hi, > > I've played a little with Wings, and it's great! > > Since my 3 button mouse seems not to be recognized as such, I found a small bug in using Alt-Button1 to emulate Button3... Here comes the patch in wings.erl > > 1009,1010c1009,1015 > < translate_event(#mousebutton{button=1,x=X,y=Y,state=?SDL_PRESSED}, St) -> > < ignore; > --- > > translate_event(#mousebutton{button=1,x=X,y=Y,state=?SDL_PRESSED}=Mb, St) -> > > case sdl_keyboard:getModState() of > > Mod when Mod band ?ALT_BITS =/= 0 -> > > translate_event(Mb#mousebutton{button=2}, St); > > _ -> > > ignore > > end; > > Have a nice day, > Vlad > -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 +46 8 727 56 87 125 25 ?lvsj? From luke@REDACTED Wed Oct 3 16:40:31 2001 From: luke@REDACTED (Luke Gorrie) Date: 03 Oct 2001 16:40:31 +0200 Subject: ermacs-0.9 Message-ID: Ahoy, I have a newer copy of my Emacs clone up at http://www.bluetail.com/~luke/ermacs/ if anyone's interested. A lot of new features, though none of the ones people asked for last time (sorry Joe and Mikael :-)) Still "hackers-only" with respect to writing your own modes, no docs or simple examples yet. Cheers, Luke From richardc@REDACTED Wed Oct 3 16:56:29 2001 From: richardc@REDACTED (Richard Carlsson) Date: Wed, 3 Oct 2001 16:56:29 +0200 (MET DST) Subject: efficiency, deep lists In-Reply-To: Message-ID: On Wed, 3 Oct 2001, Ulf Wiger wrote: > Uhm, perhaps you're seeing something I don't...? > Anyway, I did the following: > > 9> Keys = lists:seq(1,10). > [1,2,3,4,5,6,7,8,9,10] > 10> continuation:get_values(Keys). > [1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9|...] > 11> continuation:get_values2(Keys). > [1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9|...] > 12> v(10) == v(11). > true > > and therefore concluded that the functions were equivalent, > without any deeper code analysis. If the input has the form [[a,b,c],[d,e,f],[g,h,i]], the version using foldl and ++ yields [g',h',i',d',e',f',a',b',c'], since it appended to the left. However, appending to the right would give quadratic behaviour. Changing to foldr would solve it. /Richard Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://www.csd.uu.se/~richardc/ From etxuwig@REDACTED Wed Oct 3 17:11:39 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Wed, 3 Oct 2001 17:11:39 +0200 (MET DST) Subject: efficiency, deep lists In-Reply-To: Message-ID: On Wed, 3 Oct 2001, Richard Carlsson wrote: >If the input has the form [[a,b,c],[d,e,f],[g,h,i]], the >version using foldl and ++ yields [g',h',i',d',e',f',a',b',c'], >since it appended to the left. However, appending to the right >would give quadratic behaviour. Changing to foldr would solve >it. You're right, of course. Anyway, the order didn't matter in this case. (: /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From gupta@REDACTED Wed Oct 3 17:46:20 2001 From: gupta@REDACTED (Dr. Gopal Gupta) Date: Wed, 3 Oct 2001 10:46:20 -0500 Subject: 17th International Conf. on Logic Programming: Call for Participation Message-ID: <200110031546.f93FkKW03016@herbrand.utdallas.edu> CALL FOR PARTICIPATION!!! CALL FOR PARTICIPATION!!! CALL FOR PARTICIPATION!!! INTERNATIONAL CONFERENCE ON LOGIC PROGRAMMING, 2001 --------------------------------------------------- CORAL BEACH HOTEL AND RESORT Nov 26 - Dec. 1 http://www.cs.ucy.ac.cy/~iclpcp01/ The 17th international conference on logic programming will be held in the beautiful sea resort of Paphos in Cyprus. The conference will be co-located with Constraint Programming 2001 (CP'01). The conference program includes invited talks by Robert Kowalski, Alain Colmerauer, & Patrick Cousot, and tutorials on various contemporary topics. A number of post-conference workshops are also part of the program. The program also includes excursions to sites around Paphos. Hotel rooms near the conf- erence site at greatly reduced rates are still available. More information can be obtained from the ICLP'01 website: http://www.cs.ucy.ac.cy/~iclpcp01/ C O N F E R E N C E P R O G R A M MONDAY 08.45 Opening 09.00 Invited talk Is Logic Really Dead, or Only Just Sleeping ? Robert A. Kowalski (Imperial College, London) 10.30 Coffee 11.15 Implementation and Parallelism Understanding Memory Management in Prolog Systems Lu?s Fernando Castro, and V?tor Santos Costa PALS: A Distributed Or-Parallel Implementation of Prolog on a Beowulf Architecture K. Villaverde, E. Pontelli, H. Guo, and Gopal Gupta On a Tabling Engine that can Exploit Or-Parallelism Ricardo Rocha, Fernando Silva, and V?tor Santos Costa 12.45 Lunch 14.30 Constraints Revisiting the cardinality Operator and Introducing the cardinality-path Constraint Family Nicolas Beldiceanu and Mats Carlsson Optimizing Compilation of Constraint Handling Rules Christian Holzbaur, Peter J. Stuckey, Maria Garcia de la Banda, and David Jeffrey Building Constraint Solvers with HAL Maria Garcia de la Banda, David Jeffery, Kim Marriott , Peter J. Stuckey, and Christian Holzbaur 16.00 Coffee 16.45 Tutorial Building real-life applications with Prolog Jan Wielemaker (University of Amsterdam, The Netherlands) 19.00 Welcome Reception/Dinner (at the Hotel) TUESDAY 09.00 Static Analysis Practical Aspects for a working Compile Time Garbage Collection System for Mercury Nancy Mazur, Peter Ross, Gerda Janssens, and Maurice Bruynooghe Positive Boolean Functions as Multiheaded Clauses Jacob M. Howe and Andy King Higher-Precision Groundness Analysis Michael Codish, Samir Genaim, Harald Sondergaard, and Peter J. Stuckey 10.30 Excursion to Paphos Mosaics & St Paul's Pillar 13.00 Lunch 14.30 Invited Talk Patrick Cousot (Ecole Normale Superieure, Paris, France) Title to be Announced 16.00 Coffee 16.45 Tutorial A Close Look at Constraint-Based Concurrency Kazunori Ueda (Waseda University, Tokyo, Japan) 18.30 Prolog Programming Competition WEDNESDAY 09.00 Tabulation Techniques Speculative Beats Conservative Justification Hai-Feng Guo, C.R. Ramakrishnan, and I.V. Ramakrishnan Local and Symbolic Bisimulation using Tabled Constraint Logic Programming Samik Basu, Madhavan Mukund, C.R. Ramakrishnan, I.V. Ramakrishnan, and Rakesh Verma A Simple Scheme for Implementing Tabled Logic Programming Systems based on Dynamic Reordering of Alternatives Hai-Feng Guo and Gopal Gupta 10.30 Coffee 11.00 Tutorial Natural Language Tabular Parsing ?ric Villemonte de la Clergerie (INRIA - Rocquencourt, France) 12.30 Lunch 13.45 Excursion: Aphrodite's Trail Performance by the Cyprus Orchestra of Ancient Greek Musical Organs Light Dinner THURSDAY 09.00 Non Monotonic Reasoning 1 Fixed-parameter complexity of semantics for logic programs Zbigniew Lonc and Miroslaw Truszczynski Well-founded and stable semantics for logic programs with aggregates Marc Denecker, Nikolay Pelov, and Maurice Bruynooghe Alternating Fixed Points in Boolean Equation Systems as Preferred Stable Models K. Narayan Kumar, C.R. Ramakrishnan, and Scott A. Smolka 10.30 Coffee 11.15 Tutorial Probabilistic reasoning in databases and logic programs V.S. Subrahmanian (University of Maryland, USA) 12.45 Lunch 14.30 Invited Talk X-tegration - some cross-enterprise thoughts Ashish Gupta (Chief Scientific Officer, Tavant Technologies) 16.00 Coffee 16.30 Non-monotonic Reasoning 2 Fages' Theorem for Programs with Nested Expressions Esra Erdem and Vladimir Lifschitz Semantics of normal logic programs with embedded implications Fernando Orejas, Elvira Pino, and Edelmira Pasarella A Multi-Adjoint Logic Approach to Abductive Reasoning Jesus Medina, Manuel Ojeda-Aciego, and Peter Vojtas 18.30 Conference Dinner at the wine village of Polemi (Cypriot Night) FRIDAY 09.00 Extensions Proving correctness and completeness of normal programs - a declarative approach. Wlodzimierz Drabent and Miroslawa Milkowska An Order-sorted Resolution with Implicitly Negative Sorts Ken Kaneiwa and Satoshi Tojo Logic Programming in a Fragment of Intutionistic Temporal Linear Logic Mutsunori Banbara, Kyoung-Sun Kang, Takaharu Hirai, and Noyuki Tamura 10.30 Coffee 11.15 Databases A Logic Programming Approach to the Integration, Repairing and Querying of Inconsistent Databases G. Greco, S. Greco and E. Zumpano A Computational Model for Functional Logic Deductive Databases Jesus Manuel Almendros Jimenez, Antonio Becerra Teron and Jaime Sanchez Hernandez 12.45 Lunch 14.00 Invited Talk Alain Colmerauer (University of Marseille, France) Solving the mutiplication constraint in several approximation spaces 15.30 Coffee 17.30 Joint CP & ICLP Panel "The future of LP and CP Systems" SATURDAY (1st of December) 9.00 Workshops till 19.00. CICLOPS: Colloquium on Implementation of Constraints and Logic Programming Systems CLIMA: 2nd Workshop on Computational Logic in Multi-agent Systems CLPSE: (Constraint) Logic Programming and Software Engg. CRGD: Complex Reasoning on Geographical Data RCoRP'01: 3rd Workshop on Rule-based Constraint Reasoning and Programming SAVE'01: Specificatin, Analysis, and Validation for Emerging Technologies in Computational Logic SUNDAY Excursions to the Akamas Nature Reserve (Optional - Not included in the Registration Fee) From martin@REDACTED Wed Oct 3 23:23:39 2001 From: martin@REDACTED (Martin J. Logan) Date: Wed, 03 Oct 2001 16:23:39 -0500 Subject: Unix Signal Handling in Erlang and ODBC memory leaks. References: Message-ID: <3BBB81DB.E03D70D1@vailsys.com> Hello, Does anyone have any examples of unix signal handling in erlang. I would like to make a loadbalancer that I have written respond to sighup. Also I was curious to know if anyone has used the odbc module and knows anything about a memory leak. The proccess "odbcserver" is growing slowly over a period of a few days until it eventually wedges. Any advice on these two issues would be greatly appreciated. Cheers, Martin Logan From per@REDACTED Thu Oct 4 00:29:13 2001 From: per@REDACTED (per@REDACTED) Date: Thu, 4 Oct 2001 00:29:13 +0200 (CEST) Subject: Unix Signal Handling in Erlang and ODBC memory leaks. In-Reply-To: <3BBB81DB.E03D70D1@vailsys.com> Message-ID: <200110032229.f93MTDA43074@tordmule.bluetail.com> "Martin J. Logan" wrote: > Does anyone have any examples of unix signal handling in erlang. I would like >to make a loadbalancer that I have written respond to sighup. Not exactly an example, but you could have a look at: http://www.erlang.org/ml-archive/erlang-questions/200108/msg00089.html There is no provision for handling signals in Erlang "itself", i.e. you will need to use a driver - or a port program of course, might actually be a better idea. Also for the driver case, the emulator has its own handler for a number of signals, and interfering with that will probably have "interesting" results - but SIGHUP should be OK I believe. --Per Hedeland per@REDACTED From francesco@REDACTED Thu Oct 4 09:39:27 2001 From: francesco@REDACTED (Francesco Cesarini) Date: Thu, 04 Oct 2001 08:39:27 +0100 Subject: Your Erlang Links! Message-ID: <3BBC122F.EFC0D9BB@erlang-consulting.com> If you surf to the open directory project at http://dmoz.org/Computers/Programming/Languages/Erlang/ you will find the largest collection of Erlang links ever compiled. I have bugged some of you individually. Now I am bugging you collectively. There are, as of this morning, over 200 links to documents and web pages (The numbers on the pages are wrong as they get updated once a week), making it an excellent source for Erlang research. There are so many research projects out there, so many papers, so many open source developments, help web pages, and much much more that I now need your help to make this site even bigger. In other words, surf there, and submit *ALL* your Erlang links and bookmarks! When you slap up a contribution, do not just email it to the Erlang mailing list! Put up a web page and add your link, so people can find it even after they've deleted the email. I especially need help on Contributions, Products and Research. And link to it so people start finding/using it. The Erlang site is now bigger than the small talk one. Let us make it more comprehensive that the Perl and C++ one! The following categories exist: Articles News and Media Thesis Conferences Proceedings Contributions Applications Interfaces Libraries Ports and Compilers Examples FAQs, Help and Tutorials Products Research Thanks! Francesco -- http://www.erlang-consulting.com -------------- next part -------------- A non-text attachment was scrubbed... Name: francesco.vcf Type: text/x-vcard Size: 352 bytes Desc: Card for Francesco Cesarini URL: From luke@REDACTED Thu Oct 4 13:26:58 2001 From: luke@REDACTED (Luke Gorrie) Date: 04 Oct 2001 13:26:58 +0200 Subject: Your Erlang Links! In-Reply-To: <3BBC122F.EFC0D9BB@erlang-consulting.com> References: <3BBC122F.EFC0D9BB@erlang-consulting.com> Message-ID: Francesco Cesarini writes: > If you surf to the open directory project at > > http://dmoz.org/Computers/Programming/Languages/Erlang/ Really nice :-) From Sean.Hinde@REDACTED Thu Oct 4 18:23:44 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Thu, 4 Oct 2001 17:23:44 +0100 Subject: Returning floats from drivers Message-ID: <402DD461F109D411977E0008C791C312039F6448@IMP02MBX> Hi, I'd like to return a floating point number from a driver using the driver_output_term mechanism. It would appear that this is an unsupported option at present. Are there any plans to support this? It is not totally obvious what the format of the float should be, though binaries currently support encode/decode to/from IEEE format so that would appear to be a reasonable solution. Rgds, Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From fritchie@REDACTED Thu Oct 4 22:30:11 2001 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Thu, 04 Oct 2001 15:30:11 -0500 Subject: Anyone know of a libpcap driver? Message-ID: <200110042030.f94KUBM90034@snookles.snookles.com> I've got the itch to write one, but I'd rather be lazy and use someone else's than write my own. If one doesn't exist, I may very well embark on such a thing. It's just so easy to rip apart protocol packets (and assemble them) in Erlang compared to a lot of other languages ... and I have a colleague who needs to do that sort of thing. I may be able to introduce the corrosive influence of Erlang at my new employer yet. :-) -Scott From martin@REDACTED Fri Oct 5 01:18:42 2001 From: martin@REDACTED (Martin J. Logan) Date: Thu, 04 Oct 2001 18:18:42 -0500 Subject: Voice Apps References: Message-ID: <3BBCEE52.33AE412E@vailsys.com> Hello all, I am currently writting voice apps in c++. A large part of this process involves writing complex state machines. The library developed here is quite well designed. I do, however, beilieve that this could be implemented in a more efficiant manner by employing erlang. I am also looking to spread erlang usage, and I think that this would be an ideal way to really bring it to the forefront at my company. So my question to all of you is what do you think the best way to go about this is. More specifically what would be the best way to deal with the creation and parsing of voice XML with an erlang app. If anyone knows of a method or a library that handles this please help. I am quite exited about this so any help, even the most meager, would be greatly appreciated. Cheers, Martin From Chandrashekhar.Mullaparthi@REDACTED Fri Oct 5 12:52:23 2001 From: Chandrashekhar.Mullaparthi@REDACTED (Chandrashekhar Mullaparthi) Date: Fri, 5 Oct 2001 11:52:23 +0100 Subject: Voice Apps Message-ID: <402DD461F109D411977E0008C791C31205E06177@IMP02MBX> There is a contribution by Ulf Wiger on the erlang.org website for parsing XML. Check it out. And state machines can be implemented very fast in erlang. I suppose you know about the gen_fsm behaviour. cheers, Chandru > -----Original Message----- > From: Martin J. Logan [mailto:martin@REDACTED] > Sent: 5 October 2001 00:19 > Cc: erlang-questions@REDACTED > Subject: Voice Apps > > > Hello all, > I am currently writting voice apps in c++. A large part of this > process involves writing complex state machines. The library > developed > here is quite well designed. I do, however, beilieve that this could > be implemented in a more efficiant manner by employing > erlang. I am also > looking to spread erlang usage, and I think that this would > be an ideal > way to really bring it to the forefront at my company. So my question > to all of you is what do you think the best way to go about this is. > More specifically what would be the best way to deal with the creation > and parsing of voice XML with an erlang app. If anyone knows > of a method > or a library that handles this please help. I am quite exited about > this so any help, even the most meager, would be greatly appreciated. > Cheers, > Martin > NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From carsten@REDACTED Fri Oct 5 15:05:04 2001 From: carsten@REDACTED (Carsten Schuermann) Date: Fri, 05 Oct 2001 09:05:04 -0400 Subject: PLI 2002-Call for workshop proposals Message-ID: <3BBDB000.6A1DBBF@cs.yale.edu> CALL FOR WORKSHOP PROPOSALS Principles, Logics, and Implementations of high-level programming languages (PLI 2002) Pittsburgh, USA October 3 - 8, 2002 Carsten Schuermann http://pli2002.cs.brown.edu/workshops PLI 2002, a federation of colloquia which includes ICFP 2002 (ACM-SIGPLAN International Conference on Functional Programming) and PPDP 2002 (ACM-SIGPLAN International Conference on Principles and Practice of Declarative Programming), will be held in Pittsburgh, USA, October 3-8 2002. Affiliated workshops will be scheduled from October 3 through October 8. Researchers and practitioners are invited to submit workshop proposals, that may be sent to the PLI 2002 Workshop Chair Carsten Schuermann, carsten@REDACTED by e-mail (Postscript, Pdf, ASCII) with "PLI02 Workshop Submission" in the subject header. Following SIGPLAN's sponsorship procedures, proposals should include: 1. Name of the workshop, name of the sponsoring conference (ICFP/PPDP) Workshops associated with ICFP may be scheduled during PPDP, workshops associated with PPDP may be scheduled during ICFP. 2. The goals of the workshop 3. Names and addresses of organizers 4. Names of potential participants, such as program committee members 5. Plans for call for participation (e.g., call for papers) 6. Expected number of attendees 7. Plans for publicity 8. Plans for a proceedings 9. Description of past versions of the workshop including date, organizers, paper submission/acceptance counts, attendance, site, registration fees and summary budget information 10. Url address of the workshop description Proposals will be evaluated by the PLI 2002 Workshop Chair, the ICFP, and PPDP Program and Conference Chairs, and by the SIGPLAN Executive Committee. Be advised that workshops must be sponsored by SIGPLAN and require therefore SIGPLAN approval (see http://www.acm.org/sigplan/sigplan_workshop_proposal.htm for more information.) THE DEADLINE FOR RECEIPT OF PROPOSALS IS DECEMBER 7, 2001. Notification of acceptance will be made by February 1, 2002. Workshop selection committee: Claude Kirchner : Program Chair of PPDP 2002 Simon Peyton Jones : Program Chair of ICFP 2002 Frank Pfenning : Chair of PPDP 2002 Carsten Schuermann : Workshop Chair of PLI 2002 Mitch Wand : General Chair of ICFP 2002 From goran.bage@REDACTED Fri Oct 5 18:06:58 2001 From: goran.bage@REDACTED (=?iso-8859-1?Q?G=F6ran=20B=E5ge?=) Date: Fri, 05 Oct 2001 18:06:58 +0200 Subject: Emacs erlang mode compile Message-ID: <3BBDDAA2.9EF93BB5@mobilearts.se> Now that I am back in the Erlang world I am slowly trying to adapt to some of the new stuff like the emacs erlang mode compile facilities. I don't get it working however, I get the message --- {'init terminating in do_boot',{'can not load',erlang,get_file}} init terminating in do_boot () Process inferior-erlang exited abnormally with code 1 --- in the erl buffer. I tried finding info on the net, and I found a note by Ulf Wiger, but I didn't get any wiser. Is this supposed to work with R73-B 'out of the box'? Here is the first part of the crash dump. Thanks for any help --Goran ------------------------- May the Snow be with you ---- Goran Bage, MobilArts, www.mobilearts.se Tegnerlunden 3, SE-111 61 Stockholm, Sweden email:goran.bage@REDACTED, phone: +46 733 358405 ======erl_crash.dump=========================================== Fri Oct 5 16:40:20 2001 Slogan: init terminating in do_boot () Erlang (BEAM) emulator version 5.0.2.4 Compiled on Fri Sep 21 15:18:42 2001 Process Information -------------------------------------------------- <0.0.0> Running. Registered as: init Spawned as: otp_ring0:start/2 Message buffer data: 178 words Link list: [<0.2.0>] Reductions 107 stack+heap 233 old_heap_sz=144 Heap unused=19 OldHeap unused=144 Stack dump: program counter = 0x81abfc4 (init:boot_loop/2 + 32) cp = 0x81abe44 (init:things_to_string/1 + 68) 0x81b5818 Return addr 0x8101608 () -------------------------------------------------- <0.2.0> Waiting. Registered as: erl_prim_loader Spawned as: erl_prim_loader:start_it/4 Message buffer data: 0 words Link list: [<0.0.0>,#Port<0.1>] Reductions 82 stack+heap 610 old_heap_sz=0 Heap unused=19 OldHeap unused=0 Stack dump: program counter = 0x81b26fc (erl_prim_loader:loop/3 + 52) cp = 0x8101608 () arity = 0 0x81a6f84 Return addr 0x8101608 () y(0) ["/usr/local/src/erlang/otp_src_R7B-3/lib/kernel/ebin","/usr/local/src/erlang/otp_src_R7B-3/lib/stdlib/ebin"] y(1) <0.1.0> y(2) {state,[],none,get_from_port_efile,stop_port,exit_port,#Port<0.1>,infinity,dummy_in_handler} y(3) infinity -------------------------------------------------- Zombie Process Information Processes kept: 0 -------------------------------------------------- Port Information -------------------------------------------------- <1> Connected: <0.2.0> Links: <0.2.0> Port controls linked-in driver: efile -------------------------------------------------- Internal Table Information -------------------------------------------------- Hash Table(atom_tab), size(2411), used(833), objs(1011), depth(4) Index Table(atom_tab), size(3000), limit(1048576), used(1012), rate(100) Atom space 8928/32772 Hash Table(module_code), size(47), used(4), objs(4), depth(1) Index Table(module_code), size(50), limit(65536), used(4), rate(10) Hash Table(export_list), size(397), used(210), objs(335), depth(5) Index Table(export_list), size(500), limit(65536), used(335), rate(100) Hash Table(process_reg), size(11), used(2), objs(2), depth(1) Allocated binary 0 Allocated by process_desc 5520 Allocated by table_desc 1120 Allocated by link_desc 720 Allocated by atom_desc 24480 Allocated by export_desc 13600 Allocated by module_desc 800 Allocated by preg_desc 320 -------------------------------------------------- ETS tables -------------------------------------------------- Timers -------------------------------------------------- -------------------------------------------------- Distribution Information Not alive Loaded Modules Information -------------------------------------------------- otp_ring0 448 init 28000 prim_inet 34800 erl_prim_loader 14187 Totals. Current code = 77435 Old code = 0 -------------------------------------------------- Atoms -------------------------------------------------- false true From etxuwig@REDACTED Fri Oct 5 19:42:20 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Fri, 5 Oct 2001 19:42:20 +0200 (MET DST) Subject: ErlScriptAlias in INETS Message-ID: I don't know if it's just me, but when I specify an ErlScriptAlias, I'd like it to look like this: ErlScriptAlias / ccviewer allowing an URL like this: http://...ericsson.se:8800/ccviewer/fetch?... which would end up calling ccviewer:fetch/2. I found that this doesn't work without slightly tweaking mod_esi.erl. The diff below did the trick. The whole modified function looks like this: load([$E,$r,$l,$S,$c,$r,$i,$p,$t,$A,$l,$i,$a,$s,$ |ErlScriptAlias],[]) -> case regexp:split(ErlScriptAlias," ") of {ok, ["/"|Modules]} -> {ok, [], {erl_script_alias, {[], Modules}}}; {ok, [ErlName|Modules]} -> {ok, [], {erl_script_alias, {ErlName,Modules}}}; {ok, _} -> {error,?NICE(httpd_conf:clean(ErlScriptAlias)++ " is an invalid ErlScriptAlias")} end; > diff mod_esi.erl /OTP/LXA_11930_R7B01_9/lib/inets-2.5.6/src/mod_esi.erl 260,261d259 < {ok, ["/"|Modules]} -> < {ok, [], {erl_script_alias, {[], Modules}}}; Does anyone disagree with this change? /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From dsolaz@REDACTED Sat Oct 6 14:35:27 2001 From: dsolaz@REDACTED (Daniel Solaz) Date: Sat, 6 Oct 2001 14:35:27 +0200 Subject: Unix Signal Handling in Erlang and ODBC memory leaks. In-Reply-To: <200110032229.f93MTDA43074@tordmule.bluetail.com> References: <200110032229.f93MTDA43074@tordmule.bluetail.com> Message-ID: <01100613483200.00814@meduz.dnet.org> it would be nice if a process could call some BIF to tell the emulator it is interested in getting a message when a signal is received: signal([sigint, sigterm]), % the BIF ... receive {signal, sigint} -> ...; {signal, sigterm} -> ... -- d s o l a z @ L E P I D O P T E R O . C O M From bor@REDACTED Sun Oct 7 12:57:44 2001 From: bor@REDACTED (Vladimir Bormotov) Date: 07 Oct 2001 13:57:44 +0300 Subject: porting erlang to cris-axis-linux-gnu Message-ID: Hi! how build erlang for axis devboard? -- Bor. From kent@REDACTED Sun Oct 7 18:15:38 2001 From: kent@REDACTED (Kent Boortz) Date: 07 Oct 2001 18:15:38 +0200 Subject: porting erlang to cris-axis-linux-gnu In-Reply-To: Vladimir Bormotov's message of "07 Oct 2001 13:57:44 +0300" References: Message-ID: Vladimir Bormotov writes: > how build erlang for axis devboard? The OTP team has never tried building Erlang/OTP for Axis development boards. The cross compiling support in the Erlang/OTP build system does not support cross compiling that well. There is a VxWorks cross compiling target in the built system that can be used as a base for createting a new target. And using the card as a build host avoiding cross compilation seem hard to do. Just 8 MByte of RAM that can't be ugraded, skipped with uClinux that doesn't support an MMU (even if there seem to be indications that using the MMU version of the processor, ETRAX 100LX, it should be possible to run a more standard Linux). kent From kent@REDACTED Mon Oct 8 18:21:33 2001 From: kent@REDACTED (Kent Boortz) Date: 08 Oct 2001 18:21:33 +0200 Subject: R8B PRE-RELEASES In-Reply-To: Kent Boortz's message of "14 Sep 2001 17:46:48 +0200" Message-ID: ************************ R8B PRE-RELEASES ************************ This will be the last pre-releases before the real R8B release. These are close to the final releases, we are not working on any additions or bug fixes. There will be some minor documentation changes. Addresses starting with "http://erlang.ericsson.se" below are Ericsson intranet addresses. The new OpenSource prerelease can be found at http://www.erlang.org/download/prereleases/ http://erlang.ericsson.se/opensource/download/prereleases/ The commercial pre-releases (you need a license key) can be found at http://www.erlang.se/lic_area/protected/releases/otp_sunos5_P8A-20011007-SNAPSHOT.tar.gz http://www.erlang.se/lic_area/protected/releases/otp_solaris8_P8A-20011007-SNAPSHOT.tar.gz http://www.erlang.se/lic_area/protected/releases/otp_linux-x86-rh7.1_P8A-20011007-SNAPSHOT.tar.gz http://www.erlang.se/lic_area/protected/releases/otp_vxworks_ppc603_P8A-20011007-SNAPSHOT.tar.gz http://erlang.ericsson.se/lic_area/protected/releases/otp_sunos5_P8A-20011007-SNAPSHOT.tar.gz http://erlang.ericsson.se/lic_area/protected/releases/otp_solaris8_P8A-20011007-SNAPSHOT.tar.gz http://erlang.ericsson.se/lic_area/protected/releases/otp_linux-x86-rh7.1_P8A-20011007-SNAPSHOT.tar.gz http://erlang.ericsson.se/lic_area/protected/releases/otp_vxworks_ppc603_P8A-20011007-SNAPSHOT.tar.gz The documentation with updated release notes can be found at http://www.erlang.org/doc/p8a/doc/ http://erlang.ericsson.se/opensource/doc/p8a/doc/ The OTP Team From proff@REDACTED Mon Oct 8 21:31:41 2001 From: proff@REDACTED (Julian Assange) Date: 09 Oct 2001 05:31:41 +1000 Subject: process pools? Message-ID: Two questions: 1) Is there an erlang http client around anywhere? There's Joe Armstrong's www_tools, but it's very primitive. I'm looking for something like curl.haxx.se/libcurl, which has API's for a wide number of languages, not including erlang. In particular something which supports HTTP persistance / pipling. Any decent erlang www spider should have these features. 2) What is the best method to implement worker threads? i.e I'd like a pool of processes (one for each outbound socket), which listen on the same message queue for requests -- the first free process reads gets the message. Cheers, Julian. -- Julian Assange |If you want to build a ship, don't drum up people |together to collect wood or assign them tasks and proff@REDACTED |work, but rather teach them to long for the endless proff@REDACTED |immensity of the sea. -- Antoine de Saint Exupery From erikp@REDACTED Mon Oct 8 23:53:33 2001 From: erikp@REDACTED (Erik Pearson) Date: Mon, 8 Oct 2001 14:53:33 -0700 Subject: Solaris 2.8 OpenSource build comments Message-ID: <5B2DD696D569D41194E700B0D0498D797E3DC9@ctsmail1.celtech.com> I just finished building the latest OpenSource Erlang/Hipe snapshot on solaris 2.8. Excellent job! I do have some feedback for the maintainers or anyone else interested in building under solaris in the future. The only snags centered around which 'm4' and which 'sed' are used during the make process. The GNU utilities work, but some of the solaris-included ones won't. 1) Hipe needs GNU m4: m4 -Ibeam -Isys/unix -Isparc-sun-solaris2.8 -Izlib -Ihipe hipe/hipe_sparc_bifs.m4 > sparc-sun-solaris2.8/hipe_sparc_bifs.S Both /usr/ccs/bin/m4 and /usr/xpg4/bin/m4 fail from the -I option, which leads to a HUGE number of unresolved symbols later in the make process. I didn't read any Hipe specific build docs so if they exist GNU m4 might be mentioned there. Perhaps it could be mentioned in the top-level README file as "Optional". 2) /usr/xpg4/bin/sed error from missing newline: sed -e 's;%VSN%;2001.10.07;' cosProperty.appup.src > ../ebin/cosProperty.appup sed: Missing newline at end of file cosProperty.appup.src. Both /bin/sed and GNU sed work. Hope someone can use this information. Again, excellent job! --erikp-- From joe.armstrong@REDACTED Tue Oct 9 11:44:40 2001 From: joe.armstrong@REDACTED (Joe Armstrong) Date: Tue, 09 Oct 2001 11:44:40 +0200 Subject: process pools? References: Message-ID: <3BC2C708.1040503@telia.com> Julian Assange wrote: >Two questions: > > 1) ... > > > > 2) What is the best method to implement worker threads? i.e > I'd like a pool of processes (one for each outbound > socket), which listen on the same message queue for > requests -- the first free process reads gets the > message. > I suspect you don't need to keep a pool of workers - I'd just spawn off a new process for each new request (possibly limiting the number of processes that can be spawned off). I use tcp_server.erl (appended) for this - this I'm constantly modifying (one day I'll get it right) The call tcp_server:start_raw_server(2000, F/1, 25) starts a listener on port 2000. The fun F/1 is called every time a new connection is setup on port 2000. At most 25 parallel sessions are allowed. Read the comments at the start of the file. F/1 should go into a receive loop where it can receive gen_tcp messages This should probably do what you want. /Joe Armstrong -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: tcp_server.erl URL: From pascal.brisset@REDACTED Tue Oct 9 13:56:05 2001 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Tue, 9 Oct 2001 13:56:05 +0200 Subject: ets:delete slow when using complex keys ? Message-ID: <15298.58837.416810.292027@pcg.localdomain> The code below shows that ets:delete can take as much as 70 seconds to free a 60MB ETS table, and that other processes are frozen during that time (tested on OTP R7B-1 and P8A-20011007, linux, x86, 400MHz). The delay seems to depend a lot on the complexity of keys (only 4 seconds if we replace PIDs with atoms). Could there be a problem in free_hash_table()/free_tree_table() ? My problem is that mnesia_recover.erl builds such tables and deletes them every few minutes. Can this problem be avoided with some magic combination of system_flags, process_flags and mnesia parameters ? -- Pascal Brisset +33141986741 -- ----- Cellicium | 73 avenue Carnot | 94230 Cachan | France ----- -module(etsdelete). -compile(export_all). start() -> spawn(?MODULE, check_realtime, [1.0e20]), T = ets:new(tbl, [{keypos, 2}, set, public]), io:format("Filling...~n"), fill(T, 1000000), io:format("Deleting...~n"), ets:delete(T), io:format("Done~n"). fill(T, 0) -> ok; fill(T, N) -> ets:insert(T, {transient_decision,{tid,N,self()},committed}), %% ets:insert(T, {transient_decision,{tid,N,committed},self()}), fill(T, N-1). check_realtime(Time) -> receive after 100 -> ok end, {MS,S,US} = now(), Time1 = (MS*1000000+S)*1000 + US div 1000, Delay = Time1 - Time, if Delay > 1000 -> io:format("Been sleeping for ~p ms !~n", [Delay]); true -> ok end, check_realtime(Time1). From hakan@REDACTED Tue Oct 9 14:52:29 2001 From: hakan@REDACTED (Hakan Mattsson) Date: Tue, 9 Oct 2001 14:52:29 +0200 (MEST) Subject: ets:delete slow when using complex keys ? In-Reply-To: <15298.58837.416810.292027@pcg.localdomain> Message-ID: On Tue, 9 Oct 2001, Pascal Brisset wrote: Pascal> My problem is that mnesia_recover.erl builds such tables and deletes Pascal> them every few minutes. Can this problem be avoided with some magic Pascal> combination of system_flags, process_flags and mnesia parameters ? I believe that the main problem is that the contents of ets tables is scattered all over the memory. Currently deletion of ets tables as well scanning of ets tables (match/select and friends) requires random access of lots of memory pages, since records are not clustered per table. A memory allocation approach with dedicated ets heaps has the potential of giving a vast performance improvement. /H?kan From pascal.brisset@REDACTED Tue Oct 9 15:38:31 2001 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Tue, 9 Oct 2001 15:38:31 +0200 Subject: ets:delete slow when using complex keys ? In-Reply-To: References: <15298.58837.416810.292027@pcg.localdomain> Message-ID: <15298.64983.881465.844434@pcg.localdomain> > table. A memory allocation approach with dedicated ets heaps has the > potential of giving a vast performance improvement. Thinking about memory allocation strategies... I just tried P8B-200110007 with "./configure --enable-unified-heap", and that seems to bring the deletion time from 70s to 1s. -- Pascal Brisset +33141986741 -- ----- Cellicium | 73 avenue Carnot | 94230 Cachan | France ----- From per@REDACTED Wed Oct 10 00:31:59 2001 From: per@REDACTED (Per Bergqvist) Date: Wed, 10 Oct 2001 00:31:59 +0200 Subject: R8B PRE-RELEASES References: Message-ID: <3BC37ADF.79064B26@synapse.se> Hi, What has happened with hipe/x86 in the latest release ? When trying to compile I get the following (Linux RH7.1/P4). Regards Per --snip-- Erlang (BEAM) emulator version 2001.10.07 [source] [hipe] [unified heap] [threads:0] Eshell V2001.10.07 (abort with ^G) 1> hipe:c(foo). =ERROR REPORT==== 10-Oct-2001::00:26:56 === Error in process <0.30.0> with exit value: {system_limit,[{hipe_bifs,alloc_code,"?"},{hipe_x86_loader,load_module,3},{hipe,finalize,4},{hipe,compile_finish,5}]} ** exited: {system_limit,[{hipe_bifs,alloc_code,"?"}, {hipe_x86_loader,load_module,3}, {hipe,finalize,4}, {hipe,compile_finish,5}]} ** -- end snip -- From bjorn@REDACTED Wed Oct 10 07:51:07 2001 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 10 Oct 2001 07:51:07 +0200 Subject: R8B PRE-RELEASES In-Reply-To: Per Bergqvist's message of "Wed, 10 Oct 2001 00:31:59 +0200" References: <3BC37ADF.79064B26@synapse.se> Message-ID: Hipe and unified heap currently does not currently work together, I think. /Bj?rn Per Bergqvist writes: > Hi, > > What has happened with hipe/x86 in the latest release ? > When trying to compile I get the following (Linux RH7.1/P4). > > Regards > Per > > --snip-- > > Erlang (BEAM) emulator version 2001.10.07 [source] [hipe] [unified heap] [threads:0] > > Eshell V2001.10.07 (abort with ^G) > 1> hipe:c(foo). > > =ERROR REPORT==== 10-Oct-2001::00:26:56 === > Error in process <0.30.0> with exit value: > {system_limit,[{hipe_bifs,alloc_code,"?"},{hipe_x86_loader,load_module,3},{hipe,finalize,4},{hipe,compile_finish,5}]} > > ** exited: {system_limit,[{hipe_bifs,alloc_code,"?"}, > {hipe_x86_loader,load_module,3}, > {hipe,finalize,4}, > {hipe,compile_finish,5}]} ** > -- end snip -- > > -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 +46 8 727 56 87 125 25 ?lvsj? From matthias@REDACTED Wed Oct 10 09:08:43 2001 From: matthias@REDACTED (Matthias Lang) Date: Wed, 10 Oct 2001 09:08:43 +0200 Subject: process pools? In-Reply-To: References: Message-ID: <15299.62459.354932.287717@antilipe.corelatus.se> > 2) What is the best method to implement worker threads? i.e > I'd like a pool of processes (one for each outbound Thread pools are a solution to a particular problem C++ and Java have: spawning new threads is fairly expensive in many (most? all?) implementations, so you want to avoid doing that, especially when the thread will then do a relatively small amount of work. Erlang's processes are (much) more lightweight than the thread implementations I've worked with, so you don't need to worry about 'spawn overhead' to the same degree. The other reason I've seen thread pools used is in situations where some expensive initialisation has to be done. It doesn't sound like your program does this. Matthias From mikpe@REDACTED Wed Oct 10 09:36:05 2001 From: mikpe@REDACTED (Mikael Pettersson) Date: Wed, 10 Oct 2001 09:36:05 +0200 Subject: R8B PRE-RELEASES In-Reply-To: References: <3BC37ADF.79064B26@synapse.se> Message-ID: <15299.64101.515525.545993@harpo.it.uu.se> Bjorn Gustavsson writes: > Hipe and unified heap currently does not currently work together, > I think. > > /Bj?rn > > Per Bergqvist writes: > > > Erlang (BEAM) emulator version 2001.10.07 [source] [hipe] [unified heap] [threads:0] > > > > Eshell V2001.10.07 (abort with ^G) > > 1> hipe:c(foo). > > > > =ERROR REPORT==== 10-Oct-2001::00:26:56 === > > Error in process <0.30.0> with exit value: > > {system_limit,[{hipe_bifs,alloc_code,"?"},{hipe_x86_loader,load_module,3},{hipe,finalize,4},{hipe,compile_finish,5}]} > > > > ** exited: {system_limit,[{hipe_bifs,alloc_code,"?"}, Correct. Unified heap is currently incompatible with compiled code. Sorry, but the best we can do about that at the moment is to prevent loading compiled code into a unified heap runtime system. /Mikael From proff@REDACTED Wed Oct 10 09:37:54 2001 From: proff@REDACTED (Julian Assange) Date: Wed, 10 Oct 2001 17:37:54 +1000 (EST) Subject: process pools? In-Reply-To: <15299.62459.354932.287717@antilipe.corelatus.se> Message-ID: <20011010073754.309D125A11@suburbia.net> > > > 2) What is the best method to implement worker threads? i.e > > I'd like a pool of processes (one for each outbound > > The other reason I've seen thread pools used is in situations where > some expensive initialisation has to be done. It doesn't sound like > your program does this. The context is persistant http connections. Tearing down the socket and rebuilding it for each url would be dramatically slower. Cheers, Julian. From nico.weling@REDACTED Wed Oct 10 10:18:44 2001 From: nico.weling@REDACTED (Nico Weling) Date: Wed, 10 Oct 2001 10:18:44 +0200 Subject: problems starting two os:cmd's Message-ID: <3BC40464.85FCC563@eed.ericsson.se> Hi all, I have problems starting an os:cmd in two different processes. Process 1: ... ScreenOutput = os:cmd("sendfax -l /dev/mobile0" ++ " " ++ BNumber ++ " " ++ Filename"), ... Process 2: ... ScreenOutput = os:cmd("mgetty -s 115200 /dev/mobile1"), ... If the 1st os:cmd is running the 2nd os:cmd("mg....") will start it's execution if the 1st os:cmd is finished. (both os:cmd's are running in different erlang processes on the same node) If I start the os:cmd's in the background: os:cmd("sendfax -l /dev/mobile0" ++ " " ++ BNumber ++ " " ++ Filename" ++ "&"), os:cmd("mgetty -s 115200 /dev/mobile1 &"), it works fine. If I start the os:cmd's in two different Erlang-shells is also works fine. Can somebody tell me what happens here and how I can solve this problem. I am using Erlang R6. (I need to stick to this release) Thanks a lot, best regards Nico. From pascal.brisset@REDACTED Wed Oct 10 10:40:31 2001 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Wed, 10 Oct 2001 10:40:31 +0200 Subject: process pools? (for gen_servers) In-Reply-To: <20011010073754.309D125A11@suburbia.net> References: <15299.62459.354932.287717@antilipe.corelatus.se> <20011010073754.309D125A11@suburbia.net> Message-ID: <15300.2432.2070.470792@pcg.localdomain> Julian Assange writes: > The context is persistant http connections. Tearing down the socket > and rebuilding it for each url would be dramatically slower. We had plenty of similar problems, and we ended up writing a generic 'pool_server' process which masquerades as a gen_server and load-balances requests to a pool of actual gen_servers. Incidentally this pool_server is the right place to do things like load regulation (keeping track of how many requests there are in each server's queue), failover, static routing, retry-on-failure, etc. A typical use is to multiplex SQL requests over several persistent connections to a replicated database (switching to the secondary db when all primary connections are dead, etc). In another context, the load regulation stuff helps guarantee some kind of fairness among several pool_servers which share the same workers. -- Pascal Brisset +33141986741 -- ----- Cellicium | 73 avenue Carnot | 94230 Cachan | France ----- From Sean.Hinde@REDACTED Wed Oct 10 11:17:03 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Wed, 10 Oct 2001 10:17:03 +0100 Subject: process pools? (for gen_servers) Message-ID: <402DD461F109D411977E0008C791C312039F645E@IMP02MBX> Pascal, > Julian Assange writes: > > The context is persistant http connections. Tearing down the socket > > and rebuilding it for each url would be dramatically slower. > > We had plenty of similar problems, and we ended up writing a generic > 'pool_server' process which masquerades as a gen_server and > load-balances requests to a pool of actual gen_servers. > > Incidentally this pool_server is the right place to do things like > load regulation (keeping track of how many requests there are in each > server's queue), failover, static routing, retry-on-failure, etc. We also find ourselves writing this "behaviour" quite often (though without many of the nice features you describe here). Is this something which might be abstracted from your proprietary code and contributed to the erlang community (perhaps as the first of a growing pool of new R8 behaviours)? It would certainly be a valuable addition to the contribs site. Thanks and Rgds, Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From per@REDACTED Wed Oct 10 11:30:33 2001 From: per@REDACTED (Per Bergqvist) Date: Wed, 10 Oct 2001 11:30:33 +0200 Subject: R8B PRE-RELEASES References: <3BC37ADF.79064B26@synapse.se> <15299.64101.515525.545993@harpo.it.uu.se> Message-ID: <3BC41539.CAA4E8B6@synapse.se> Mikael Pettersson wrote: > Bjorn Gustavsson writes: > > Hipe and unified heap currently does not currently work together, > > I think. > > > > /Bj?rn > > > > Per Bergqvist writes: > > > > > Erlang (BEAM) emulator version 2001.10.07 [source] [hipe] [unified heap] [threads:0] > > > > > > Eshell V2001.10.07 (abort with ^G) > > > 1> hipe:c(foo). > > > > > > =ERROR REPORT==== 10-Oct-2001::00:26:56 === > > > Error in process <0.30.0> with exit value: > > > {system_limit,[{hipe_bifs,alloc_code,"?"},{hipe_x86_loader,load_module,3},{hipe,finalize,4},{hipe,compile_finish,5}]} > > > > > > ** exited: {system_limit,[{hipe_bifs,alloc_code,"?"}, > > Correct. Unified heap is currently incompatible with compiled code. Sorry, but > the best we can do about that at the moment is to prevent loading compiled code > into a unified heap runtime system. > > /Mikael Any plans to add this support ? Unified heap and hipe are both two very good things that give great performance boosts and I would hate to have to choose ... /Per From etxuwig@REDACTED Wed Oct 10 11:34:31 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Wed, 10 Oct 2001 11:34:31 +0200 (MET DST) Subject: problems starting two os:cmd's In-Reply-To: <3BC40464.85FCC563@eed.ericsson.se> Message-ID: In OTP R6, os:cmd/1 is serialized using a gen_server. This was originally done because open_port() relied on fork(), which could cause huge problems in very large BEAM-processes. Nowadays (since well before OTP R6), open_port() uses vfork(), which doesn't automatically map the same amount of memory as the host process. This means that you can easily and safely write your own os_cmd/1, e.g. like this: os_cmd(Cmd) -> Command = binary_to_list( list_to_binary(["sh -c '", Cmd, "' 2>&1"])), Port = open_port({spawn, Command}, [stream, eof]), get_data(Port, []). get_data(Port, Sofar) -> receive {Port, {data, Bytes}} -> get_data(Port, Sofar ++ Bytes); {Port, eof} -> Port ! {self(), close}, receive {Port, closed} -> true end, receive {'EXIT', Port, _} -> ok after 1 -> ok end, Sofar; {'EXIT', Port, _} -> Sofar after 120000 -> exit(timeout) end. On Wed, 10 Oct 2001, Nico Weling wrote: >Hi all, > >I have problems starting an os:cmd in two different processes. > >Process 1: > ... > ScreenOutput = os:cmd("sendfax -l /dev/mobile0" ++ " " ++ BNumber ++ " " ++ Filename"), > ... > >Process 2: > ... > ScreenOutput = os:cmd("mgetty -s 115200 /dev/mobile1"), > ... > >If the 1st os:cmd is running the 2nd os:cmd("mg....") will >start it's execution if the 1st os:cmd is finished. (both >os:cmd's are running in different erlang processes on the same >node) > >If I start the os:cmd's in the background: > > os:cmd("sendfax -l /dev/mobile0" ++ " " ++ BNumber ++ " " ++ Filename" ++ "&"), > os:cmd("mgetty -s 115200 /dev/mobile1 &"), > >it works fine. >If I start the os:cmd's in two different Erlang-shells is also >works fine. > > >Can somebody tell me what happens here and how I can solve this >problem. I am using Erlang R6. (I need to stick to this >release) > > >Thanks a lot, > >best regards Nico. > -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From kostis@REDACTED Wed Oct 10 12:03:12 2001 From: kostis@REDACTED (Kostis Sagonas) Date: Wed, 10 Oct 2001 12:03:12 +0200 (MET DST) Subject: R8B PRE-RELEASES Message-ID: <200110101003.MAA01681@harpo.it.uu.se> Per Bergqvist asked: > Any plans to add this support ? Yes. The plan is to provide this support "really soon now", meaning that we (the HiPE group) plan to do this probably before the end of the year. At this point, i.e., before the R8 release, we are concentrating our efforts in making sure that HiPE is efficient and gets released as bug-free as possible. > Unified heap and hipe are both two very good things that give > great performance boosts and I would hate to have to choose ... Thanks! Here is a more detailed version of our plan: As mentioned, we have quite good reasons to believe that the unified heap architecture is a better memory architecture than the current one. However, we would like to be sure of this before committing to one of them (supporting both of them is a nightmare we would very much like to avoid). We urge the Erlang community to test *applications* on the unified heap architecture and report its findings either to us or directly in this list as e.g. Pascal Brisset did yesterday; (Pascal we were excited when we saw your mail - merci!). In the interest of the community, it is important to try to get data that show both the pros and cons of the two architectures. So please, if you have an interesting application that you have reasons to believe it will behave better in the one or the other architecture, bench it and preferably send its _kernel_ to us. Once we are finished with this benchmarking, we will choose one of the architectures as the supported one and we will make sure that HiPE runs on it. This will happen before R9. In the meantime, the choice (for me) is obvious: - configure with --enable-hipe and use this system for everyday use; - if you suspect that a specific program behaves better (or worse) with unified heap, or you are simply curious, try this architecture and if your findings are interesting, please do send them to us. Kostis Sagonas (for the HiPE group). From ingvar.meyer@REDACTED Wed Oct 10 12:22:41 2001 From: ingvar.meyer@REDACTED (Ingvar) Date: Wed, 10 Oct 2001 12:22:41 +0200 Subject: ODBC memory leaks. References: , , <3BBB81DB.E03D70D1@vailsys.com> Message-ID: <9q17hh$3vm$1@news.du.uab.ericsson.se> The latest version of Erlang ODBC application is 0.9.1 and you find it in Erlang release R8. This version does not leak memory. Erlang ODBC application version 0.8.2 and lower has a memory leak. My advises is to change to Erlang ODBC application version 0.9.1 ____________________________________________________________________________ ___ Ingvar Meyer Ericsson Utveckling AB Network Core Products Box 1505 SE-125 25 ?lvsj?, Sweden email: ingvar.meyer@REDACTED "Martin J. Logan" wrote in message news:3BBB81DB.E03D70D1@REDACTED > Hello, > Does anyone have any examples of unix signal handling in erlang. I would like > to make a loadbalancer that I have written respond to sighup. > Also I was curious to know if anyone has used the odbc module and knows anything > about a memory leak. The proccess "odbcserver" is growing slowly over a period of > a few days until it eventually wedges. Any advice on these two issues would be > greatly appreciated. > > Cheers, > Martin Logan > From per@REDACTED Wed Oct 10 13:29:39 2001 From: per@REDACTED (Per Bergqvist) Date: Wed, 10 Oct 2001 13:29:39 +0200 Subject: Unified heap (was: Re: R8B PRE-RELEASES) References: <200110101003.MAA01681@harpo.it.uu.se> Message-ID: <3BC43123.830457C6@synapse.se> I am also a believer in the unified heap (or rather any technique that avoids memory copying) both by gut feeling and experience. I have always seen great performance improvements in my code with such techniques (i.e. vee in the good old days/dark ages and unified heap) and but for some strange reason I seem to be rather lonely with such findings. The majority of the community seem to get less improvements. It probably has to do very much with design patterns. I think that the greatest thing with Erlang is that the low cost processes allows designs where you don't have to mix behaviours in processes. Instead you have many, many small and simple independent but cooperating processes. The code become much cleaner easier to understand. (I my opinion this really the core in why it is possible to build such great systems with Erlang.) To avoid getting performance boosts with unified heap you probably need to avoid message passing and have few complex processes in your application. I think that nobody can argue unnecessary memory copying is of evil. (It is a performance killer for every system, it takes time, trash caches ...) What should be discussed is garbage collection. The critic of schemes avoiding memory copying always seems to be that a good gc will be very very hard if not impossible. Is that really true ? I am not the man to answer. It is true that the current gc enables a smooth execution and it is quite uncommon with long time system stalls for gc. Comments anyone ? /Per From nico.weling@REDACTED Wed Oct 10 13:39:37 2001 From: nico.weling@REDACTED (Nico Weling) Date: Wed, 10 Oct 2001 13:39:37 +0200 Subject: problems starting two os:cmd's References: Message-ID: <3BC43379.7A1A5A48@eed.ericsson.se> Hi Ulf, I've built it in and it's working perfectly. Thank you very much. Best regards, Nico. Ulf Wiger wrote: > > In OTP R6, os:cmd/1 is serialized using a gen_server. > This was originally done because open_port() relied on fork(), > which could cause huge problems in very large BEAM-processes. > > Nowadays (since well before OTP R6), open_port() uses vfork(), > which doesn't automatically map the same amount of memory as the > host process. This means that you can easily and safely write > your own os_cmd/1, e.g. like this: > > os_cmd(Cmd) -> > Command = binary_to_list( > list_to_binary(["sh -c '", Cmd, > "' 2>&1"])), > Port = open_port({spawn, Command}, [stream, eof]), > get_data(Port, []). > > get_data(Port, Sofar) -> > receive > {Port, {data, Bytes}} -> > get_data(Port, Sofar ++ Bytes); > {Port, eof} -> > Port ! {self(), close}, > receive > {Port, closed} -> > true > end, > receive > {'EXIT', Port, _} -> > ok > after 1 -> > ok > end, > Sofar; > {'EXIT', Port, _} -> > Sofar > after 120000 -> > exit(timeout) > end. > > On Wed, 10 Oct 2001, Nico Weling wrote: > > >Hi all, > > > >I have problems starting an os:cmd in two different processes. > > > >Process 1: > > ... > > ScreenOutput = os:cmd("sendfax -l /dev/mobile0" ++ > " " ++ BNumber ++ " " ++ > Filename"), > > ... > > > >Process 2: > > ... > > ScreenOutput = os:cmd("mgetty -s 115200 /dev/mobile1"), > > ... > > > >If the 1st os:cmd is running the 2nd os:cmd("mg....") will > >start it's execution if the 1st os:cmd is finished. (both > >os:cmd's are running in different erlang processes on the same > >node) > > > >If I start the os:cmd's in the background: > > > > os:cmd("sendfax -l /dev/mobile0" ++ " " ++ > BNumber ++ " " ++ Filename" ++ "&"), > > os:cmd("mgetty -s 115200 /dev/mobile1 &"), > > > >it works fine. > >If I start the os:cmd's in two different Erlang-shells is also > >works fine. > > > > > >Can somebody tell me what happens here and how I can solve this > >problem. I am using Erlang R6. (I need to stick to this > >release) > > > > > >Thanks a lot, > > > >best regards Nico. > > > > -- > Ulf Wiger tfn: +46 8 719 81 95 > Senior System Architect mob: +46 70 519 81 95 > Strategic Product & System Management ATM Multiservice Networks > Data Backbone & Optical Services Division Ericsson Telecom AB -- Nico Weling Software Designer Ericsson Eurolab Deutschland GmbH Verification Tool Design Tel: +49 2407 575 5217 Fax: +49 2407 575 651 Dect:+49 2407 575 89339 From Erik.Reitsma@REDACTED Wed Oct 10 14:17:24 2001 From: Erik.Reitsma@REDACTED (Erik Reitsma (ELN)) Date: Wed, 10 Oct 2001 14:17:24 +0200 Subject: gen_event and distribution Message-ID: Hi! I have an event manager running on a node A, and I want to add a handler from another node B. I would like to have the handler running on node B. However, if I add the handler to the event manager at A, it starts the event handler locally. Is there an easy way to get the handler at node B instead? *Erik. From Steven.H.Rogers@REDACTED Wed Oct 10 20:07:24 2001 From: Steven.H.Rogers@REDACTED (Steven.H.Rogers@REDACTED) Date: Wed, 10 Oct 2001 13:07:24 -0500 Subject: Erlang uP [was Functional programming for microcontrollers?] Message-ID: I too am pleased to hear that the Erlang microprocessor project is still alive. May we ask when you're going to silicon and if development boards will be available. Regards, Steve From alex_arnon@REDACTED Wed Oct 10 20:56:11 2001 From: alex_arnon@REDACTED (Alex Arnon) Date: Wed, 10 Oct 2001 20:56:11 +0200 Subject: Erlang uP [was Functional programming for microcontrollers?] Message-ID: <07D9CDAA36B4724D87DFD50B01D6C4A6D81419@ilexchange1> Could you please elaborate on the purpose and state of this project? I am an embedded software engineer, writing mostly drivers and low-level management software in C (horror of horrors). I would dearly love to have an environment such as Erlang on our platform. -----Original Message----- From: Steven.H.Rogers@REDACTED [mailto:Steven.H.Rogers@REDACTED] Sent: Wed, October 10, 2001 8:07 PM To: erlang-questions@REDACTED Subject: Erlang uP [was Functional programming for microcontrollers?] I too am pleased to hear that the Erlang microprocessor project is still alive. May we ask when you're going to silicon and if development boards will be available. Regards, Steve From etxuwig@REDACTED Wed Oct 10 21:38:01 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Wed, 10 Oct 2001 21:38:01 +0200 (MET DST) Subject: Erlang uP [was Functional programming for microcontrollers?] In-Reply-To: <07D9CDAA36B4724D87DFD50B01D6C4A6D81419@ilexchange1> Message-ID: On Wed, 10 Oct 2001, Alex Arnon wrote: >Could you please elaborate on the purpose and state of this >project? I am an embedded software engineer, writing mostly >drivers and low-level management software in C (horror of >horrors). I would dearly love to have an environment such as >Erlang on our platform. I believe the purpose is rather well expressed in the EUC 2000 presentation http://www.erlang.se/euc/00/processor.ppt by Robert Tj?rnstr?m and Peter Lundell. In short, we who develop complex embedded systems with high performance requirements are not necessarily able to use today's fastest processors, since they run too hot for embedded systems. The trend seems to be that higher speeds are achieved at the cost of ever increasing power consumption. SUN, for example, seems to be leaving the embedded systems market, as they don't see that they can afford to produce a low-power version of their next generation chip. The Erlang processor is sort of a "back to the drawing board" approach: if we can't achieve more performance by brute force, let's make a "smarter" processor. Erlang is an elegant language, and it's also very suitable for cluster programming, with its native support for concurrency and distribution. This makes it easier to accelerate programs through use of a farm of cheap chips. The Erlang processor will run an order of magnitude cooler than a low-power UltraSPARC for comparable Erlang performance. As for the state of the project, we are working on optimizing certain constructs (tuples, binaries, etc.), implementing a useful port abstraction, improving memory management, and some other small details. We'd love for someone to rework our current compiler so that it becomes core Erlang based. This will allow us to reuse the existing life cycle analysis needed for the reference counting GC. One cool project is to implement the BIFs in either Erlang or directly in machine code... (ets is already covered, mostly except for match specifications.) To summarize, the processor is Almost Ready(tm). ;-) If you're more than just a little interested in general, and feel that you could help out, please contact us. /Uffe >-----Original Message----- >From: Steven.H.Rogers@REDACTED [mailto:Steven.H.Rogers@REDACTED] >Sent: Wed, October 10, 2001 8:07 PM >To: erlang-questions@REDACTED >Subject: Erlang uP [was Functional programming for microcontrollers?] > > >I too am pleased to hear that the Erlang microprocessor project is still >alive. May we ask when you're going to silicon and if development >boards >will be available. > >Regards, >Steve > > -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From gunilla@REDACTED Thu Oct 11 08:17:00 2001 From: gunilla@REDACTED (Gunilla (Hugosson) Arendt) Date: Thu, 11 Oct 2001 08:17:00 +0200 Subject: gen_event and distribution References: Message-ID: <3BC5395C.24EAEAEB@erix.ericsson.se> Hi, Event handlers are callback modules, not processes. When an event manager process is notified about an event, it simply calls Handler:handle_event/2 for each installed event handler. / Gunilla "Erik Reitsma (ELN)" wrote: > > Hi! > > I have an event manager running on a node A, and I want to add a handler from another node B. I would like to have the handler running on node B. However, if I add the handler to the event manager at A, it starts the event handler locally. Is there an easy way to get the handler at node B instead? > > *Erik. From nico.weling@REDACTED Thu Oct 11 08:41:56 2001 From: nico.weling@REDACTED (Nico Weling) Date: Thu, 11 Oct 2001 08:41:56 +0200 Subject: Still a little problem with os_cmd("") Message-ID: <3BC53F34.6D0AD535@eed.ericsson.se> Hi Ulf, and other Erlang-gurus, for os_cmd("sendfax -l /dev/ms0 0172234234 fax.g3") it works fine. But now I've seen that for this one: 1> gmc_util:os_cmd("mgetty /dev/ms1"). [] the command is executed directly, and commes back with '[]' but the process is still running and not finished. if I execute this: sh -c 'mgetty /dev/ms1' 2>&1 from the command line the 'prompt' comes only back if I stop (kill) the process. Does anybody know why? Regards, Nico. ====================================================== os_cmd(Cmd) -> Command = binary_to_list( list_to_binary(["sh -c '", Cmd, "' 2>&1"])), Port = open_port({spawn, Command}, [stream, eof]), get_data(Port, []). get_data(Port, Sofar) -> receive {Port, {data, Bytes}} -> get_data(Port, Sofar ++ Bytes); {Port, eof} -> Port ! {self(), close}, receive {Port, closed} -> true end, receive {'EXIT', Port, _} -> ok after 1 -> ok end, Sofar; {'EXIT', Port, _} -> Sofar after 120000 -> exit(timeout) end. From francesco@REDACTED Thu Oct 11 09:23:54 2001 From: francesco@REDACTED (Francesco Cesarini) Date: Thu, 11 Oct 2001 08:23:54 +0100 Subject: Unified heap (was: Re: R8B PRE-RELEASES) References: <200110101003.MAA01681@harpo.it.uu.se> <3BC43123.830457C6@synapse.se> Message-ID: <3BC5490A.DEC1ED67@erlang-consulting.com> When looking at the unified heap, one of my major worries is memory fragmentation. Due to past experience (Jam 1998) after having run heavy duty programs for a long period of time, I am scared it is bound to happen. Has the Hipe team looked into this? Have you any theories or done any measurements? Regards, Francesco Per Bergqvist wrote: > I am also a believer in the unified heap (or rather any technique that > avoids memory copying) > both by gut feeling and experience. > > I have always seen great performance improvements in my code with such > techniques (i.e. vee in > the good old days/dark ages and unified heap) and but for some strange > reason I seem to be > rather lonely with such findings. The majority of the community seem to > get less improvements. > > It probably has to do very much with design patterns. I think that the > greatest thing with Erlang is that > the low cost processes allows designs where you don't have to mix > behaviours in processes. > Instead you have many, many small and simple independent but cooperating > processes. > The code become much cleaner easier to understand. > (I my opinion this really the core in why it is possible to build such > great systems with Erlang.) > > To avoid getting performance boosts with unified heap you probably need > to avoid message > passing and have few complex processes in your application. > > I think that nobody can argue unnecessary memory copying is of evil. > (It is a performance killer for every system, it takes time, trash caches > ...) > > What should be discussed is garbage collection. > The critic of schemes avoiding memory copying always seems to be that a > good gc > will be very very hard if not impossible. > Is that really true ? I am not the man to answer. > It is true that the current gc enables a smooth execution and it is quite > uncommon with > long time system stalls for gc. > > Comments anyone ? > > /Per -- http://www.erlang-consulting.com -------------- next part -------------- A non-text attachment was scrubbed... Name: francesco.vcf Type: text/x-vcard Size: 352 bytes Desc: Card for Francesco Cesarini URL: From kostis@REDACTED Thu Oct 11 12:35:14 2001 From: kostis@REDACTED (Kostis Sagonas) Date: Thu, 11 Oct 2001 12:35:14 +0200 (MET DST) Subject: Unified heap In-Reply-To: Mail from 'Francesco Cesarini ' dated: Thu, 11 Oct 2001 08:23:54 +0100 Message-ID: <200110111035.MAA28575@harpo.it.uu.se> Francesco Cesarini wrote: > When looking at the unified heap, one of my major worries is memory > fragmentation. Due to past experience (Jam 1998) after having run > heavy duty programs for a long period of time, I am scared it is > bound to happen. You should explain to us a bit more why you are worried about memory fragmentation in the unified heap model, especially since (at least in theory) one of the arguments "pro" unified heap is that of lower fragmentation. The reason is that with the unified heap model, the whole memory is available to any process that needs it: either immediately if there is free space, or after GC. In the current memory model, a process cannot allocate in the heap of another process even if that heap contains a large area of unused space. > Has the Hipe team looked into this? Have you any theories or done > any measurements? For theories, see above. For measurements, we are currently conducting them, so if you have a program that supports your worries, please do send it to us. Cheers, Kostis. From nico.weling@REDACTED Thu Oct 11 13:20:23 2001 From: nico.weling@REDACTED (Nico Weling) Date: Thu, 11 Oct 2001 13:20:23 +0200 Subject: Still a little problem with os_cmd("") References: <200110111024.MAA04349@etxb.ericsson.se> Message-ID: <3BC58077.5882CB11@eed.ericsson.se> Hi Bengt, > If I run your os_cmd() function with something that does not return > sufficiently fast I get an exception. Unless I am mistaken 'mgetty' > should run continually, and therefore always generate the exception. > Or have I missed something? Usualy you start mgetty at an specific runlevel an respawn it after you have received an fax. I want to start it by myself after I have see an ringing indication for a fax at the serial port. Then I start the os_cmd("mgetty...") and if it returns I know that the transmission of the fax is terminated. > PS: Could you please mention why 'Command' is constructed by calling > binary_to_list( list_to_binary() )? Is it to remove escape sequences? This (3>) should also work: 1> Cmd="mgetty /dev/ms1". "mgetty /dev/ms1" 2> binary_to_list(list_to_binary(["sh -c '", Cmd,"' 2>&1"])). "sh -c 'mgetty /dev/ms1' 2>&1" 3> "sh -c '"++ Cmd ++"' 2>&1". "sh -c 'mgetty /dev/ms1' 2>&1" Regards, Nico. From pascal.brisset@REDACTED Thu Oct 11 14:44:31 2001 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Thu, 11 Oct 2001 14:44:31 +0200 Subject: process pools? (pool_server) In-Reply-To: <402DD461F109D411977E0008C791C312039F645E@IMP02MBX> References: <402DD461F109D411977E0008C791C312039F645E@IMP02MBX> Message-ID: <15301.37935.45145.188706@pcg.localdomain> Sean Hinde writes: > We also find ourselves writing this "behaviour" quite often (though without > many of the nice features you describe here). Is this something which might > be abstracted from your proprietary code and contributed to the erlang > community (perhaps as the first of a growing pool of new R8 behaviours)? It > would certainly be a valuable addition to the contribs site. I definitely agree that a distributed platform like OTP should offer some kind of generic load-balancing mechanism in addition to all the nice monitoring/supervision/upgrade features. You can test pool_server at http://www.cellicium.com/erlang/contribs/ . We might do a more formal release later this year. Comments are welcome. Just don't complain about the use of process dictionaries; we know it's bad, but it's faster than anything else. -- Pascal Brisset +33(0)141986741 -- -- Cellicium | 73 avenue Carnot | F-94230 Cachan +33(0)685110788 -- From etxuwig@REDACTED Thu Oct 11 15:07:48 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Thu, 11 Oct 2001 15:07:48 +0200 (MET DST) Subject: Still a little problem with os_cmd("") In-Reply-To: <3BC58077.5882CB11@eed.ericsson.se> Message-ID: On Thu, 11 Oct 2001, Nico Weling wrote: >> PS: Could you please mention why 'Command' is constructed by calling >> binary_to_list( list_to_binary() )? Is it to remove escape sequences? > >This (3>) should also work: > >1> Cmd="mgetty /dev/ms1". >"mgetty /dev/ms1" > >2> binary_to_list(list_to_binary(["sh -c '", Cmd,"' 2>&1"])). >"sh -c 'mgetty /dev/ms1' 2>&1" > >3> "sh -c '"++ Cmd ++"' 2>&1". >"sh -c 'mgetty /dev/ms1' 2>&1" Actually, it's a cludgy way of ensuring that what gets passed to the open_port() command is a flat string, and nothing else. The open_port() function doesn't accept deep lists or, for that matter, binaries. Meanwhile, it's convenient for the user of os_cmd() to not have to worry about flattening Cmd. Your example (3>) above is equivalent only if Cmd is a flat list. binary_to_list(list_to_binary(List)) has the advantage over lists:flatten(List) that it will exit if List contains a non-character (e.g. an atom.) I felt that it's easier to reason about a badarg in list_to_binary/1 than about a badarg in open_port_prim/2. I have no answer regarding the specific 'mgetty /dev/ms1' problem. /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From francesco@REDACTED Thu Oct 11 16:18:32 2001 From: francesco@REDACTED (Francesco Cesarini) Date: Thu, 11 Oct 2001 15:18:32 +0100 Subject: Unified heap References: <200110111035.MAA28575@harpo.it.uu.se> Message-ID: <3BC5AA37.F7CD4457@erlang-consulting.com> Sorry about that. I should have expressed myself a little better and gone into more detail. I came into contact with Erlang memory fragmentation in 1998. A project started stress testing the system with huge configurations. This system had ets tables that stored the board identifiers as strings. As thousands of boards where configured, thousands of copies of these identifiers where made. New entries where added, deleted, reconfigured. This became, in due time, a serious cause for fragmentation due to the size of the strings involved. (The problem was later solved with the help of the OTP guys, by creating a separate table with the board types indexing them with integers). If I am not mistaken, at the time, ets tables where stored on a separate heap (We might be talking R3 - R5 here), probably even then, scattered all over the memory. From what I have understood on the discussions & results on the list so far, in HIPE, ets tables are now stored on the unified heap through a new scheme, and I assume they are clustered. (Sounds a little strange, but that is the only explanation I have to Pascal?s results, unless enabling the unified heap also does something with the ets tables scheme on a separate heap). Isn?t clustering together lots of small memory chucks a reason enough for worry, especially if they are located alongside process data? I am just speculating, as I have not done any tests yet. But considering that we almost scratched out heads bald trying to figure out the problem back in 1998 (It took some time as it only occurred on large systems which had been running a few days), the worry is always there. That is why I was wondering if the hipe group has given any thought to these problems. Regards, Francesco Kostis Sagonas wrote: > Francesco Cesarini wrote: > > > When looking at the unified heap, one of my major worries is memory > > fragmentation. Due to past experience (Jam 1998) after having run > > heavy duty programs for a long period of time, I am scared it is > > bound to happen. > > You should explain to us a bit more why you are worried about memory > fragmentation in the unified heap model, especially since (at least > in theory) one of the arguments "pro" unified heap is that of lower > fragmentation. The reason is that with the unified heap model, the > whole memory is available to any process that needs it: either > immediately if there is free space, or after GC. In the current > memory model, a process cannot allocate in the heap of another > process even if that heap contains a large area of unused space. > > > Has the Hipe team looked into this? Have you any theories or done > > any measurements? > > For theories, see above. For measurements, we are currently conducting > them, so if you have a program that supports your worries, please do > send it to us. > > Cheers, > > Kostis. -- http://www.erlang-consulting.com -------------- next part -------------- A non-text attachment was scrubbed... Name: francesco.vcf Type: text/x-vcard Size: 352 bytes Desc: Card for Francesco Cesarini URL: From gupta@REDACTED Thu Oct 11 16:27:54 2001 From: gupta@REDACTED (Dr. Gopal Gupta) Date: Thu, 11 Oct 2001 09:27:54 -0500 Subject: CLPSE'01 workshop: final call Message-ID: <200110111427.f9BERsK21106@herbrand.utdallas.edu> FINAL CALL FOR PAPERS!! FINAL CALL FOR PAPERS!! CLPSE'01: (Constraint) Logic Programming and Software Engineering http://www.utdallas.edu/~gupta/clpse PAPHOS, CYPRUS Submission Deadline: Oct 15 In Conjunction with Seventeenth International Conference on Logic Programming http://www.cs.ucy.ac.cy/~iclpcp01/ The aim of this workshop is to explore applications of logic programming and constraint programming to the process of constructing reliable software and to programming-in-the-large. Papers and experience reports describing use of LP and CP techniques to various aspects of the software engineering process are invited. The workshop will be held on Saturday, Dec 1, 2001, in conjunction with 17th International Conference on Logic Programming in Paphos, Cyprus (held Nov 26 - Dec 1) and is a continuation of the successful CLPSE'00 workshop held during CL2000 in London, England, in July 2000. (visit http://www.cs.nmsu.edu/~gupta/lpse2000) Topics of interest include (but are not limited to): o Rapid prototopying and System Modeling o Software Design Methodologies o Software Specification o Domain Specific Languages o Derivation of Efficient Implementations from Specifications o Automatic Software Generation o Testing and Debugging o Test Case Generation o Software Verification o Software Process Discovery o Software Reuse o Analysis of Software Systems/Software Process o Software Quality Assurance o Requirements Analysis o Security Issues Paper Submission deadline: Oct 15th, 2001 Notification of acceptance/rejection: Oct 18th, 2001 Submission procedure: Electronically submit a postscript, pdf, or a word file to gupta@REDACTED Papers should be a maximum of 15 pages. Proceedings will be made available during the workshop. From thomas@REDACTED Thu Oct 11 17:05:20 2001 From: thomas@REDACTED (Thomas Arts) Date: Thu, 11 Oct 2001 17:05:20 +0200 Subject: using erlang:trace and pman together References: <3BBC122F.EFC0D9BB@erlang-consulting.com> Message-ID: <3BC5B530.61CCB3D3@cslab.ericsson.se> Hi all Using Erlang version Erlang (THREADS) (BEAM) emulator version 5.0.2.11 I happened to run in a problem when tracing a process and running the pman application. For those of you that want to try the same on a running system: be careful, it may crash your system. If you start tracing function calls with the following: erlang:monitor(process,Pid), erlang:trace(Pid,true,[send,call,{tracer,self()}]), erlang:trace_pattern({gen_server,loop,'_'},true,[local]), then it is expected that the process that traces this Pid only receives trace messages that relate to a message sent by Pid or a call to the function gen_server:loop. That works fine, as long as one doesn't run pman as well. Starting pman first and then running this tracing results in a situation in which the tracing process gets all function calls that the process generates (and that can be quite a lot). Hence, the system gets slower very quickly and in the end crashes with a memory overflow. Regards Thomas From stephen_han@REDACTED Thu Oct 11 21:02:49 2001 From: stephen_han@REDACTED (stephen_han@REDACTED) Date: Thu, 11 Oct 2001 12:02:49 -0700 Subject: question on ASN.1 Message-ID: <88256AE2.0067FF9B.00@notes.centigram.com> Hi... I am using ASN.1 1.3 now.. Why it does not generate the hrl file if the tag is SET? Previous version 1.2.9.6 was generate the hrl file if the asn1 file contains SET. Here is the simple example... EX1) not generating hrl file People DEFINITIONS IMPLICIT TAGS ::= BEGIN EXPORTS Person; Person ::= [PRIVATE 19] SET { name PrintableString, location INTEGER } END EX2) generating hrl file. People DEFINITIONS IMPLICIT TAGS ::= BEGIN EXPORTS Person; Person ::= [PRIVATE 19] SEQUENCE { name PrintableString, location INTEGER } END From fredrik.linder@REDACTED Thu Oct 11 22:06:50 2001 From: fredrik.linder@REDACTED (Fredrik Linder) Date: Thu, 11 Oct 2001 22:06:50 +0200 Subject: SAE Message-ID: <002701c15290$441ffd80$da2511c2@frelin> Hi all I would like to use Stand-Alone-Erlang (I think), but I cannot find any documentation for it. Could anyone direct me? Regards /Fredrik http://skrivihop.nu From her@REDACTED Fri Oct 12 00:28:56 2001 From: her@REDACTED (Helmut Enck-Radana) Date: Fri, 12 Oct 2001 00:28:56 +0200 Subject: SAE In-Reply-To: <002701c15290$441ffd80$da2511c2@frelin> Message-ID: <5.1.0.14.0.20011012002625.00a41280@popmail.space.net> At 22:06 11-10-01, Fredrik Linder wrote: >I would like to use Stand-Alone-Erlang (I think), but I cannot find any >documentation for it. Could anyone direct me? Have a look at http://www.bluetail.com/~joe/sae_r7b/sae.html and http://www.bluetail.com/wiki/showPage?node=StandAloneErlang -- Helmut From joe.armstrong@REDACTED Fri Oct 12 11:20:14 2001 From: joe.armstrong@REDACTED (Joe Armstrong) Date: Fri, 12 Oct 2001 11:20:14 +0200 Subject: SAE References: <5.1.0.14.0.20011012002625.00a41280@popmail.space.net> Message-ID: <3BC6B5CE.2050905@telia.com> SAE appears to be broken in the R8B pre-release :-( - I can build beam_evm but it core dumps. As soon as this is rectified I'll start working on a better version /Joe Helmut Enck-Radana wrote: > At 22:06 11-10-01, Fredrik Linder wrote: > >> I would like to use Stand-Alone-Erlang (I think), but I cannot find >> any documentation for it. Could anyone direct me? > > > Have a look at > http://www.bluetail.com/~joe/sae_r7b/sae.html > and > http://www.bluetail.com/wiki/showPage?node=StandAloneErlang > > -- Helmut > > > > From jb@REDACTED Fri Oct 12 14:52:32 2001 From: jb@REDACTED (Johan Blom) Date: Fri, 12 Oct 2001 13:52:32 +0100 Subject: HTTP 1/1 client Message-ID: <3BC6E790.59EBDAD3@cellpt.com> >Two questions: > > 1) Is there an erlang http client around anywhere? There's > Joe Armstrong's www_tools, but it's very primitive. I'm > looking for something like curl.haxx.se/libcurl, which > has API's for a wide number of languages, not including > erlang. In particular something which supports HTTP > persistance / pipling. Any decent erlang www spider > should have these features. > 2) [...] You might be interested to have a look at my efforts on http://sowap.sourceforge.org in the sowaputils package. Among other things it includes a prototype HTTP 1/1 client (Should be enough to grab the http.erl (RFC2616 for HTTP) and uri.erl (RFC2396 for URL parsing) modules) The ambition is to make http.erl fully RFC2616 compatibel, anything more fancy is probably out of scope. Missing wanted features include: - support for persistant connections (sorry!) - support for caching Pretty much the rest (of RFC2616) should be supported, including "synchronous" and "asynchronous" interfaces. Johan From bertil.karlsson@REDACTED Fri Oct 12 14:40:26 2001 From: bertil.karlsson@REDACTED (Bertil Karlsson) Date: Fri, 12 Oct 2001 14:40:26 +0200 Subject: question on ASN.1 References: <88256AE2.0067FF9B.00@notes.centigram.com> Message-ID: <3BC6E4BA.120E5BCB@uab.ericsson.se> Hi, It's a known bug in version 1.3. It has been fixed in later patches/releases. /Bertil stephen_han@REDACTED wrote: > > Hi... > I am using ASN.1 1.3 now.. > > Why it does not generate the hrl file if the tag is SET? > Previous version 1.2.9.6 was generate the hrl file if the asn1 file > contains SET. > > Here is the simple example... > > EX1) not generating hrl file > People DEFINITIONS IMPLICIT TAGS ::= > > BEGIN > EXPORTS Person; > > Person ::= [PRIVATE 19] SET { > name PrintableString, > location INTEGER } > > END > > EX2) generating hrl file. > People DEFINITIONS IMPLICIT TAGS ::= > > BEGIN > EXPORTS Person; > > Person ::= [PRIVATE 19] SEQUENCE { > name PrintableString, > location INTEGER } > > END From Erik.Reitsma@REDACTED Fri Oct 12 16:18:59 2001 From: Erik.Reitsma@REDACTED (Erik Reitsma (ELN)) Date: Fri, 12 Oct 2001 16:18:59 +0200 Subject: gen_event and distribution Message-ID: > Event handlers are callback modules, not processes. When an > event manager process is notified about an event, it simply > calls Handler:handle_event/2 for each installed event handler. Ok, then I guess if I want the handling of the event to be handled in B, I would have to run a server at B, and the event handler would call something in the server... I'll try that then! Thanks! *Erik. > > / Gunilla > > > "Erik Reitsma (ELN)" wrote: > > > > Hi! > > > > I have an event manager running on a node A, and I want to add a > handler from another node B. I would like to have the handler > running on > node B. However, if I add the handler to the event manager at A, it > starts the event handler locally. Is there an easy way to get the > handler at node B instead? > > > > *Erik. > From jamesh@REDACTED Fri Oct 12 16:47:10 2001 From: jamesh@REDACTED (James Hague) Date: Fri, 12 Oct 2001 09:47:10 -0500 Subject: Erlang uP [was Functional programming for microcontrollers?] Message-ID: Ulf Wiger wrote: > In short, we who develop complex embedded systems with high > performance requirements are not necessarily able to use today's > fastest processors, since they run too hot for embedded systems. > The trend seems to be that higher speeds are achieved at the cost > of ever increasing power consumption. Very interesting. I've often wondered if that were the case. PC-type hardware has gone crazy in recent years, with multiple fans, giant heat sinks, and video cards that plug into wall sockets. Too bad no one is concerned with lower power consumption. James From her@REDACTED Fri Oct 12 16:44:49 2001 From: her@REDACTED (Helmut Enck-Radana) Date: Fri, 12 Oct 2001 16:44:49 +0200 Subject: HTTP 1/1 client In-Reply-To: <3BC6E790.59EBDAD3@cellpt.com> Message-ID: <5.1.0.14.0.20011012163935.00aacae0@popmail.space.net> At 14:52 12-10-01, Johan Blom wrote: >You might be interested to have a look at my efforts on >http://sowap.sourceforge.org in the sowaputils package. http://sowap.sourceforge.org seems to be redirected to http://sourceforge.net/. The URLs http://sowap.sourceforge.net/ and http://sourceforge.net/projects/sowap are working for me. -- Helmut From willem@REDACTED Fri Oct 12 17:57:03 2001 From: willem@REDACTED (Willem Broekema) Date: Fri, 12 Oct 2001 17:57:03 +0200 Subject: "internal error in v3_codegen" when compiling Message-ID: <3BC712CF.50905@pastelhorn.com> (Using the R8B prerelease ("Erlang (BEAM) emulator version 2001.09.13_SNAPSHOT [threads:0]") on Windows 98.) This file: -module(t). -export([start/0]). start() -> receive after 3000 -> A = 5 end, A. gives this error when compiling: 13> c(t). ./t.erl:none: internal error in v3_codegen; crash reason: {{case_clause,{'EXIT',{function_clause, [{v3_codegen,fetch_reg,['A',[]]}, {v3_codegen,'-saves/3-fun-0-',3}, {lists,map,2}, {v3_codegen,adjust_stack,4}, {v3_codegen,recv_loop_cg,9}, {v3_codegen,'-cg_list/5-fun-0-',3}, {v3_codegen,flatmapfoldl,3}, {v3_codegen,cg_list,5}| more]}}}, [{compile,'-select_passes/2-fun-0-',2}, {compile,'-internal_comp/4-fun-1-',2}, {compile,fold_comp,3}, {compile,internal_comp,4}, {compile,internal,3}]} error - Willem From bjarne@REDACTED Mon Oct 15 09:38:55 2001 From: bjarne@REDACTED (Bjarne =?iso-8859-1?Q?D=E4cker?=) Date: Mon, 15 Oct 2001 09:38:55 +0200 Subject: PLI 2002-Call for workshop proposals Message-ID: <3BCA928F.BF8908E6@erix.ericsson.se> Hello Are there anybody in the US who would like to team up for a program committee for an Erlang workshop in connection with PLI'2002 ? We ran an Erlang workshop together with PLI'2001 http://www.erlang.se/workshop/ which was quite fun. An Erlang workshop at PLI'2002 could function as an Erlang User Conference but in North America for Erlang enthusiasts there who find it too expensive to come to the EUC in Europe. Best regards Bjarne D?cker Computer Science Laboratory Ericsson Utvecklings AB Box 1505 S-125 25 ?lvsj? - Stockholm Sweden -------------- next part -------------- An embedded message was scrubbed... From: Carsten Schuermann Subject: PLI 2002-Call for workshop proposals Date: Fri, 05 Oct 2001 09:05:04 -0400 Size: 4802 URL: From etxuwig@REDACTED Mon Oct 15 17:23:11 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Mon, 15 Oct 2001 17:23:11 +0200 (MET DST) Subject: make problems, OTP P8A Message-ID: When I tried to compile OTP P8A (the 20011007 snapshot), I stumbled on the following error (paths slightly edited by hand): gcc -g -O2 -I/.../p8a/otp_src_P8A-20011007-SNAPSHOT/erts/sparc-sun-solaris2.7 -DHAVE_CONFIG_H -Wall -DHIPE_ARCHITECTURE=ultrasparc -Wa,-xarch=v8plusa -Ibeam -Isys/unix -Isparc-sun-solaris2.7 -Izlib -Ihipe -c hipe/hipe_sparc_glue.S -o /.../otp_src_P8A-20011007-SNAPSHOT/erts/obj.beam/sparc-sun-solaris2.7/hipe_sparc_glue.o m4 -Ibeam -Isys/unix -Isparc-sun-solaris2.7 -Izlib -Ihipe hipe/hipe_sparc_bifs.m4 > sparc-sun-solaris2.7/hipe_sparc_bifs.S m4: bad option: -Ibeam make[3]: *** [sparc-sun-solaris2.7/hipe_sparc_bifs.S] Error 1 make[3]: Leaving directory `/.../otp_src_P8A-20011007-SNAPSHOT/erts/emulator' I'm not familiar with m4, but the man page on my machine (/usr/ccs/bin/m4 on SunOS Release 5.7 Generic_106541-12) mentions nothing about an -I option. Is there another m4 that I should be using? /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From mikpe@REDACTED Mon Oct 15 17:28:35 2001 From: mikpe@REDACTED (Mikael Pettersson) Date: Mon, 15 Oct 2001 17:28:35 +0200 Subject: make problems, OTP P8A In-Reply-To: References: Message-ID: <15307.163.485246.233677@harpo.it.uu.se> Ulf Wiger writes: > > When I tried to compile OTP P8A (the 20011007 snapshot), I > stumbled on the following error (paths slightly edited by hand): > > gcc -g -O2 > -I/.../p8a/otp_src_P8A-20011007-SNAPSHOT/erts/sparc-sun-solaris2.7 > -DHAVE_CONFIG_H -Wall -DHIPE_ARCHITECTURE=ultrasparc > -Wa,-xarch=v8plusa -Ibeam -Isys/unix -Isparc-sun-solaris2.7 > -Izlib -Ihipe -c hipe/hipe_sparc_glue.S -o > /.../otp_src_P8A-20011007-SNAPSHOT/erts/obj.beam/sparc-sun-solaris2.7/hipe_sparc_glue.o > m4 -Ibeam -Isys/unix -Isparc-sun-solaris2.7 -Izlib -Ihipe > hipe/hipe_sparc_bifs.m4 > sparc-sun-solaris2.7/hipe_sparc_bifs.S > m4: bad option: -Ibeam > make[3]: *** [sparc-sun-solaris2.7/hipe_sparc_bifs.S] Error 1 > make[3]: Leaving directory > `/.../otp_src_P8A-20011007-SNAPSHOT/erts/emulator' > > I'm not familiar with m4, but the man page on my machine > (/usr/ccs/bin/m4 on SunOS Release 5.7 Generic_106541-12) mentions > nothing about an -I option. Is there another m4 that I should be > using? You MUST use a decent m4, i.e. GNU m4 or some other m4 that accepts the "-I" option. /Mikael From kent@REDACTED Mon Oct 15 18:40:57 2001 From: kent@REDACTED (Kent Boortz) Date: 15 Oct 2001 18:40:57 +0200 Subject: make problems, OTP P8A In-Reply-To: Ulf Wiger's message of "Mon, 15 Oct 2001 17:23:11 +0200 (MET DST)" References: Message-ID: Yes, as Erik Pearson wrote earlier you need to make sure "/bin/sed" or "/usr/bin/sed" is used when building on Solaris. I have added a note about this in the README. kent Ulf Wiger writes: > When I tried to compile OTP P8A (the 20011007 snapshot), I > stumbled on the following error (paths slightly edited by hand): > > gcc -g -O2 > -I/.../p8a/otp_src_P8A-20011007-SNAPSHOT/erts/sparc-sun-solaris2.7 > -DHAVE_CONFIG_H -Wall -DHIPE_ARCHITECTURE=ultrasparc > -Wa,-xarch=v8plusa -Ibeam -Isys/unix -Isparc-sun-solaris2.7 > -Izlib -Ihipe -c hipe/hipe_sparc_glue.S -o > /.../otp_src_P8A-20011007-SNAPSHOT/erts/obj.beam/sparc-sun-solaris2.7/hipe_sparc_glue.o > m4 -Ibeam -Isys/unix -Isparc-sun-solaris2.7 -Izlib -Ihipe > hipe/hipe_sparc_bifs.m4 > sparc-sun-solaris2.7/hipe_sparc_bifs.S > m4: bad option: -Ibeam > make[3]: *** [sparc-sun-solaris2.7/hipe_sparc_bifs.S] Error 1 > make[3]: Leaving directory > `/.../otp_src_P8A-20011007-SNAPSHOT/erts/emulator' > > I'm not familiar with m4, but the man page on my machine > (/usr/ccs/bin/m4 on SunOS Release 5.7 Generic_106541-12) mentions > nothing about an -I option. Is there another m4 that I should be > using? From eleberg@REDACTED Tue Oct 16 09:38:51 2001 From: eleberg@REDACTED (Bengt Kleberg) Date: Tue, 16 Oct 2001 09:38:51 +0200 (MET DST) Subject: make problems, OTP P8A Message-ID: <200110160738.JAA22198@etxb.ericsson.se> > From: Mikael Pettersson > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > Date: Mon, 15 Oct 2001 17:28:35 +0200 > To: Ulf Wiger > Cc: erlang-questions@REDACTED > Subject: Re: make problems, OTP P8A ...deleted > You MUST use a decent m4, i.e. GNU m4 or some other m4 that accepts the "-I" option. > FWIW: OpenBSD m4 can be made (with a switch) to mimic gnu m4. bengt From mikpe@REDACTED Tue Oct 16 15:57:17 2001 From: mikpe@REDACTED (Mikael Pettersson) Date: Tue, 16 Oct 2001 15:57:17 +0200 Subject: patch to eliminate otp/hipe GNU m4 dependency Message-ID: <15308.15549.142584.146486@harpo.it.uu.se> Since so many have been trapped by this .. Here's a patch to eliminate the dependency on GNU m4 when building OTP R8 with --enable-hipe. I'm CC:ing the patch to erlang-questions in case the OTP folks don't have time to put this into R8 before the real release. /Mikael Index: otp/erts/emulator/Makefile.in =================================================================== RCS file: /home/harpo/csd/thomasl/hipe/repository/otp/erts/emulator/Makefile.in,v retrieving revision 1.12 diff -u -r1.12 Makefile.in --- otp/erts/emulator/Makefile.in 2001/10/10 14:43:12 1.12 +++ otp/erts/emulator/Makefile.in 2001/10/16 12:35:47 @@ -319,7 +319,7 @@ endif $(TARGET)/%.S: hipe/%.m4 - m4 $(INCLUDES) $< > $@ + m4 -DTARGET=$(TARGET) $< > $@ $(OBJDIR)/%.o: $(TARGET)/%.S $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@ Index: otp/erts/emulator/hipe/hipe_sparc_bifs.m4 =================================================================== RCS file: /home/harpo/csd/thomasl/hipe/repository/otp/erts/emulator/hipe/hipe_sparc_bifs.m4,v retrieving revision 1.10 diff -u -r1.10 hipe_sparc_bifs.m4 --- otp/erts/emulator/hipe/hipe_sparc_bifs.m4 2001/09/17 17:42:29 1.10 +++ otp/erts/emulator/hipe/hipe_sparc_bifs.m4 2001/10/16 12:35:47 @@ -518,11 +518,11 @@ * BIF_LIST(ModuleAtom,FunctionAtom,Arity,CFun,Index) */ define(BIF_LIST,`standard_bif_interface_$3(nbif_$4, $4)') -include(`erl_bif_list.h') +include(TARGET/`erl_bif_list.h') /* * Guard BIFs. * GBIF_LIST(FunctionAtom,Arity,CFun) */ define(GBIF_LIST,`guard_bif_interface_$2(gbif_$3, $3)') -include(`hipe_gbif_list.h') +include(`hipe/hipe_gbif_list.h') Index: otp/erts/emulator/hipe/hipe_x86_bifs.m4 =================================================================== RCS file: /home/harpo/csd/thomasl/hipe/repository/otp/erts/emulator/hipe/hipe_x86_bifs.m4,v retrieving revision 1.15 diff -u -r1.15 hipe_x86_bifs.m4 --- otp/erts/emulator/hipe/hipe_x86_bifs.m4 2001/10/04 16:14:14 1.15 +++ otp/erts/emulator/hipe/hipe_x86_bifs.m4 2001/10/16 12:35:47 @@ -559,11 +559,11 @@ * BIF_LIST(ModuleAtom,FunctionAtom,Arity,CFun,Index) */ define(BIF_LIST,`standard_bif_interface_$3(nbif_$4, $4)') -include(`erl_bif_list.h') +include(TARGET/`erl_bif_list.h') /* * Guard BIFs. * GBIF_LIST(FunctionAtom,Arity,CFun) */ define(GBIF_LIST,`nofail_bif_interface_$2(gbif_$3, $3)') -include(`hipe_gbif_list.h') +include(`hipe/hipe_gbif_list.h') From kramer@REDACTED Wed Oct 17 07:31:01 2001 From: kramer@REDACTED (Reto Kramer) Date: Tue, 16 Oct 2001 22:31:01 -0700 Subject: Q: xmerl 0.15 xpath fails to match the following - why? Message-ID: I'm using xmerl 0.15 and tried out the xpath matcher with the example below. Unfortunately the xpath does not match and returns an empty list. The same happens with e.g. /document. D: {xmlElement,document, ... ... the long form of the xml tree ... X: [] ok Does anyone have a test-set for xmerl xpath, so I can mimic the successful use of it? cheers, - Reto foo2() -> D = xmerl_scan:string(string()), io:format("D :~p~n",[D]), X = xmerl_xpath:string("/document/section/section/table/row", D), io:format("X :~p~n",[X]). string() -> "

This is a paragraph of text.

This is another paragraph.

head1 head2 col11 col12 col21 col22
". From etxuwig@REDACTED Wed Oct 17 09:48:31 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Wed, 17 Oct 2001 09:48:31 +0200 (MET DST) Subject: Q: xmerl 0.15 xpath fails to match the following - why? In-Reply-To: Message-ID: I've never really used XPATH myself... I only wrote the code based on the spec, and tried to run some fake tests... :-/ I remember that Mickael Remond highlighted the fact that XPATH didn't represent the root node properly. The somewhat cludgy solution was to have XPATH wrap the XML structure returned by xmerl_scan with an #xmerlDocument{} (or similar) record. Perhaps Mickael has some good examples of how to use XPATH? (I know ESoap uses it.) I'm sorry I can't be more helpful. /Uffe On Tue, 16 Oct 2001, Reto Kramer wrote: >I'm using xmerl 0.15 and tried out the xpath matcher with the example below. > >Unfortunately the xpath does not match and returns an empty list. The same >happens with e.g. /document. > >D: {xmlElement,document, ... > ... the long form of the xml tree ... >X: [] >ok > >Does anyone have a test-set for xmerl xpath, so I can mimic the successful >use of it? > >cheers, >- Reto > >foo2() -> > D = xmerl_scan:string(string()), > io:format("D :~p~n",[D]), > X = xmerl_xpath:string("/document/section/section/table/row", D), > io:format("X :~p~n",[X]). > > >string() -> > " author=\"Ulf Wiger\"> >
>

>This is a paragraph of text. >

>
>

>This is another paragraph. >

> > >>head1 > >>head2 > > > >>col11 > >>col12 > > > >>col21 > >>col22 > > >
>
>
>
>". > > -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From nico.weling@REDACTED Wed Oct 17 11:14:23 2001 From: nico.weling@REDACTED (Nico Weling) Date: Wed, 17 Oct 2001 11:14:23 +0200 Subject: Problems with os_cmd Message-ID: <3BCD4BEF.B171076F@eed.ericsson.se> Hi all, I'm using the os_cmd program (thanks to Ulf) which is shown at the end of this mail. If I execute kermit with os_cmd I always get only the last two lines. If I execute kermit from the unix-shell I have the important information for filesize etc. Why don't I get this infomation with the os_cmd programm? Thanks in advance, best regards/Nico. ======================================================================================== Eshell V4.9.1 (abort with ^G) 1> gmc_util:os_cmd("kermit /etc/kermit/r520.cfg -l /dev/ms1 -r -a /home/data_receive/"). Bytes: "\r\n" Bytes: "Closing /dev/ms1...OK\n" "\r\nClosing /dev/ms1...OK\n" ======================================================================================== [root@REDACTED gmc]# sh -c 'kermit /etc/kermit/r520.cfg -l /dev/ms1 -r -a /home/data_receive/' 2>&1 RECV hosts (binary) (901 bytes): OK (4.079 sec, 220 cps) Closing /dev/ms1...OK [root@REDACTED gmc]# ======================================================================================== gmc_util.erl: os_cmd(Cmd) -> Command = binary_to_list( list_to_binary(["sh -c '", Cmd, "' 2>&1"])), Port = open_port({spawn, Command}, [stream, eof]), get_data(Port, []). get_data(Port, Sofar) -> receive {Port, {data, Bytes}} -> catch ?gmc_logger ! {log, "util ~s: Sofar: ~p~n", [version(), Bytes]}, io:format("Bytes: ~p~n",[Bytes]), get_data(Port, Sofar ++ Bytes); {Port, eof} -> Port ! {self(), close}, receive {Port, closed} -> true end, receive {'EXIT', Port, _} -> ok after 1 -> ok end, Sofar; {'EXIT', Port, _} -> Sofar after 300000 -> %wait 5mins before exit exit(timeout) end. From per@REDACTED Wed Oct 17 16:30:39 2001 From: per@REDACTED (per@REDACTED) Date: Wed, 17 Oct 2001 16:30:39 +0200 Subject: Problems with os_cmd References: <3BCD4BEF.B171076F@eed.ericsson.se> Message-ID: <3BCD960F.AB61645F@synapse.se> Hi, try using the "stderr_to_stdout" option in open_port. On the topic of options I think you should use the "exit_status" option as well so you can determine if the command returned error. Regards, Per Nico Weling wrote: > Hi all, > > I'm using the os_cmd program (thanks to Ulf) which is shown at the end of this mail. If I execute kermit with os_cmd I always get only the last two lines. If I execute kermit from the unix-shell I have the important information for filesize etc. > > Why don't I get this infomation with the os_cmd programm? > > Thanks in advance, > > best regards/Nico. > > ======================================================================================== > > Eshell V4.9.1 (abort with ^G) > 1> gmc_util:os_cmd("kermit /etc/kermit/r520.cfg -l /dev/ms1 -r -a /home/data_receive/"). > Bytes: "\r\n" > Bytes: "Closing /dev/ms1...OK\n" > "\r\nClosing /dev/ms1...OK\n" > > ======================================================================================== > > [root@REDACTED gmc]# sh -c 'kermit /etc/kermit/r520.cfg -l /dev/ms1 -r -a /home/data_receive/' 2>&1 > RECV hosts (binary) (901 bytes): OK (4.079 sec, 220 cps) > > Closing /dev/ms1...OK > > [root@REDACTED gmc]# > > ======================================================================================== > > gmc_util.erl: > > os_cmd(Cmd) -> > Command = binary_to_list( > list_to_binary(["sh -c '", Cmd, > "' 2>&1"])), > Port = open_port({spawn, Command}, [stream, eof]), > get_data(Port, []). > > get_data(Port, Sofar) -> > receive > {Port, {data, Bytes}} -> > catch ?gmc_logger ! {log, "util ~s: Sofar: ~p~n", > [version(), Bytes]}, > io:format("Bytes: ~p~n",[Bytes]), > get_data(Port, Sofar ++ Bytes); > > {Port, eof} -> > Port ! {self(), close}, > receive > {Port, closed} -> > true > end, > receive > {'EXIT', Port, _} -> > ok > after 1 -> > ok > end, > Sofar; > > {'EXIT', Port, _} -> > Sofar > > after 300000 -> %wait 5mins before exit > exit(timeout) > end. From kent@REDACTED Wed Oct 17 17:21:48 2001 From: kent@REDACTED (Kent Boortz) Date: 17 Oct 2001 17:21:48 +0200 Subject: R8B Open Source Erlang available for download Message-ID: The final release R8B of the Open Source Erlang is now available for download from "http://www.erlang.org/download.html". You can read the release highlights at http://www.erlang.org/doc/r8b/doc/highlights.html and view the complete documentation at http://www.erlang.org/doc/r8b/doc/ We want to send a special thanks to those who have reported bugs, sent us patches and suggested improvements. This has been very valuable to us creating R8B, The OTP Team From Sean.Hinde@REDACTED Wed Oct 17 19:31:10 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Wed, 17 Oct 2001 18:31:10 +0100 Subject: Select syntax pretty useful Message-ID: <402DD461F109D411977E0008C791C312039F6496@IMP02MBX> I just made a nice discovery (undocumented from what I can make out) If you have an ets table and want to retrieve strings which start with a certain prefix you can do: 1>E=ets:new(sean, [bag]). 10 2>ets:insert(E, [{sean, "sean", 1}, {sean, "bean", 2}]). true 3>A="se". "se" 4>ets:select(E, [{{sean, A++'_', '_'},[],['$_']}]). [{sean, "sean", 1}] This is pretty nice, and it means we can do our current app without needing some bloated expensive RDBMS product :-) My thanks to the R8 team, Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From per@REDACTED Wed Oct 17 22:45:01 2001 From: per@REDACTED (per@REDACTED) Date: Wed, 17 Oct 2001 22:45:01 +0200 Subject: R8B Open Source Erlang available for download References: Message-ID: <3BCDEDCD.AFC32AAC@synapse.se> Great, A virtual "sk?l" to all in the OTP team. Great stuff. Can you also fix the broken link to PDF in the download page... /Per Kent Boortz wrote: > The final release R8B of the Open Source Erlang is now available for > download from "http://www.erlang.org/download.html". > > You can read the release highlights at > > http://www.erlang.org/doc/r8b/doc/highlights.html > > and view the complete documentation at > > http://www.erlang.org/doc/r8b/doc/ > > We want to send a special thanks to those who have reported bugs, sent > us patches and suggested improvements. This has been very valuable to us > creating R8B, > > The OTP Team From hokan.stenholm@REDACTED Wed Oct 17 23:56:49 2001 From: hokan.stenholm@REDACTED (=?ISO-8859-1?Q?H=E5kan_Stenholm?=) Date: Wed, 17 Oct 2001 23:56:49 +0200 Subject: The update R7B-4 is released (MacOsX.1 compile problem) Message-ID: Has anyone solved this ? I get the same error running MacOsX.1 and R7B-3, so I guess this is a MacOsX.1 bug not R7B-3 or 4. Is it fixed in R8B-0 (I haven't had time to test it yet)?: ------------------------------------------------------------------------------------------------------------ cc -g -O2 -I/Users/hokan/codeing/otp_src_R7B-3/erts/autoconf/powerpc-apple- darwin1.4 -no-cpp-precomp -Wall -O2 -DDEBUG_DIST -I. -DHAVE_CONFIG_H -DUSE_DNS -DEPMD_PORT=4369 -c erl_error.c -o /Users/hokan/codeing/otp_src_R7B-3/lib/erl_interface/obj/powerpc-apple-darwin1. 4/erl_error.o cc -g -O2 -I/Users/hokan/codeing/otp_src_R7B-3/erts/autoconf/powerpc-apple- darwin1.4 -no-cpp-precomp -Wall -O2 -DDEBUG_DIST -I. -DHAVE_CONFIG_H -DUSE_DNS -DEPMD_PORT=4369 -c erl_eterm.c -o /Users/hokan/codeing/otp_src_R7B-3/lib/erl_interface/obj/powerpc-apple-darwin1. 4/erl_eterm.o cc -g -O2 -I/Users/hokan/codeing/otp_src_R7B-3/erts/autoconf/powerpc-apple- darwin1.4 -no-cpp-precomp -Wall -O2 -DDEBUG_DIST -I. -DHAVE_CONFIG_H -DUSE_DNS -DEPMD_PORT=4369 -c erl_fix_alloc.c -o /Users/hokan/codeing/otp_src_R7B-3/lib/erl_interface/obj/powerpc-apple-darwin1. 4/erl_fix_alloc.o cc -g -O2 -I/Users/hokan/codeing/otp_src_R7B-3/erts/autoconf/powerpc-apple- darwin1.4 -no-cpp-precomp -Wall -O2 -DDEBUG_DIST -I. -DHAVE_CONFIG_H -DUSE_DNS -DEPMD_PORT=4369 -c erl_format.c -o /Users/hokan/codeing/otp_src_R7B-3/lib/erl_interface/obj/powerpc-apple-darwin1. 4/erl_format.o cc -g -O2 -I/Users/hokan/codeing/otp_src_R7B-3/erts/autoconf/powerpc-apple- darwin1.4 -no-cpp-precomp -Wall -O2 -DDEBUG_DIST -I. -DHAVE_CONFIG_H -DUSE_DNS -DEPMD_PORT=4369 -c erl_locking.c -o /Users/hokan/codeing/otp_src_R7B-3/lib/erl_interface/obj/powerpc-apple-darwin1. 4/erl_locking.o cc -g -O2 -I/Users/hokan/codeing/otp_src_R7B-3/erts/autoconf/powerpc-apple- darwin1.4 -no-cpp-precomp -Wall -O2 -DDEBUG_DIST -I. -DHAVE_CONFIG_H -DUSE_DNS -DEPMD_PORT=4369 -c erl_malloc.c -o /Users/hokan/codeing/otp_src_R7B-3/lib/erl_interface/obj/powerpc-apple-darwin1. 4/erl_malloc.o /var/tmp/ccuCdaaa.s:324:Expected comma after segment-name /var/tmp/ccuCdaaa.s:324:Rest of line ignored. 1st junk character valued 46 (.). /var/tmp/ccuCdaaa.s:324:Spurious digit 0. /var/tmp/ccuCdaaa.s:324:Spurious digit 6. /var/tmp/ccuCdaaa.s:324:Rest of line ignored. 1st junk character valued 57 (9). /var/tmp/ccuCdaaa.s:324:Junk character 40 ((). /var/tmp/ccuCdaaa.s:324:Rest of line ignored. 1st junk character valued 48 (0). make[4]: *** [/Users/hokan/codeing/otp_src_R7B-3/lib/erl_interface/obj/powerpc-apple-darwin1. 4/erl_malloc.o] Error 1 make[3]: *** [opt] Error 2 make[2]: *** [opt] Error 2 make[1]: *** [opt] Error 2 make: *** [libs] Error 2 From kent@REDACTED Thu Oct 18 00:41:15 2001 From: kent@REDACTED (Kent Boortz) Date: 18 Oct 2001 00:41:15 +0200 Subject: The update R7B-4 is released (MacOsX.1 compile problem) In-Reply-To: =?iso-8859-1?q?H=E5kan?= Stenholm's message of "Wed, 17 Oct 2001 23:56:49 +0200" References: Message-ID: We haven't tested on OS X for a while. I just got the Mac OS X 10.1 final CD and will try this out next week. I will also fix the last things to make OS X part of our daily build and test to ensure that future snapshots will be tested on OS X. kent H?kan Stenholm writes: > Has anyone solved this ? I get the same error running MacOsX.1 and > R7B-3, so I guess this is a MacOsX.1 bug not R7B-3 or 4. Is it fixed in > R8B-0 (I haven't had time to test it yet)?: From kent@REDACTED Thu Oct 18 00:51:41 2001 From: kent@REDACTED (Kent Boortz) Date: 18 Oct 2001 00:51:41 +0200 Subject: R8B Open Source Erlang available for download In-Reply-To: per@synapse.se's message of "Wed, 17 Oct 2001 22:45:01 +0200" References: <3BCDEDCD.AFC32AAC@synapse.se> Message-ID: per@REDACTED writes: > Can you also fix the broken link to PDF in the download page... This is on my TODO list, unfortunately I still have to do that index page by hand and being a bit busy today I hoped no one should find that broken link before I had time to fix it tomorrow ;-) Well, I created a simple page now and do the HTML formatting later, kent From david@REDACTED Thu Oct 18 01:17:55 2001 From: david@REDACTED (david wallin) Date: Thu, 18 Oct 2001 01:17:55 +0200 Subject: The update R7B-4 is released (MacOsX.1 compile problem) In-Reply-To: Message-ID: <31FB8C6B-C355-11D5-AB0C-000393536F4E@wallin.cx> On torsdag, oktober 18, 2001, at 12:41 , Kent Boortz wrote: > > We haven't tested on OS X for a while. I just got the Mac OS X 10.1 > final CD and will try this out next week. I will also fix the last > things to make OS X part of our daily build and test to ensure that > future snapshots will be tested on OS X. > > kent Kent, I just noticed that tcl/tk (8.4a4) was available for OS X from http://sourceforge.net/project/showfiles.php?group_id=10894 (shipped as frameworks) Does this mean there is hope for a graphical debugger on OS X ? --david. From fredrik.linder@REDACTED Thu Oct 18 08:54:35 2001 From: fredrik.linder@REDACTED (Fredrik Linder) Date: Thu, 18 Oct 2001 08:54:35 +0200 Subject: PLEAC Erlang Message-ID: <003901c157a1$bfa81760$d42511c2@frelin> Hej Fick tipset att n?mna detta p? erlang-question-listan. Kanske n?got f?r lists/string i OTP R9 ? > Sverker Wiberg writes: > > Fredrik Linder writes: > > S?g att du satt uppskriven som aktiv f?rfattare p? p? PLEAC Erlang. > > Approp? "Accessing strings": I vissa l?gen funkar lists b?ttre ?n string f?r > > att hantera str?ngar. > > Tack f?r tipset. Har du n?mnt det h?r p? erlang-questions-listan? Och > vilken erlang-version har du f?rresten? OTP R7B-04 ... tills idag. > > > T.ex. > > EmailAtDomain = lists:dropwhile(fun($@) -> false; (_) -> true end, > > "my.email@REDACTED") > > EmailName = lists:takewhile(fun($@) -> false; (_) -> true end, > > "my.email@REDACTED") > > {EmailName, EmailAtDomain} = lists:splitwith(fun($@) -> false; (_) -> true > > end, "my.email@REDACTED") > > > > Resultatet blir en lista ist?llet f?r ett index som motsvarande > > string-funktion skulle ge: string:chr/2 -> int(). > > > > Vill man sedan g?ra n?got med den resulterande listan m?ste man med string > > anv?nda string:chr/2 f?ljt av t.ex. string:substr/[2,3]. > > > > Anv?nder man lists i det h?r fallet blir hastigheten O(n), och anv?nder man > > string blir det O(2*n)... Vilket assymptotiskt ?r lika, men blir dubbelt s? > > dyrt ?nd?. > > > > Hmmm...kanske skulle skriva om string-modulen...n????! Det har jag > inte tid (och ork) till! /Fredrik http://skrivihop.nu From etxuwig@REDACTED Thu Oct 18 09:59:56 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Thu, 18 Oct 2001 09:59:56 +0200 (MET DST) Subject: PLEAC Erlang In-Reply-To: <003901c157a1$bfa81760$d42511c2@frelin> Message-ID: The time is long since past when all relevant communication about Erlang could be done in Swedish. ;-) Anyway, the important stuff was of course the Erlang snippets: EmailAtDomain = lists:dropwhile(fun($@) -> false; (_) -> true end, "my.email@REDACTED") EmailName = lists:takewhile(fun($@) -> false; (_) -> true end, "my.email@REDACTED") {EmailName, EmailAtDomain} = lists:splitwith(fun($@) -> false; (_) -> true end, "my.email@REDACTED") Good tip. lists:takewhile/2 and lists:dropwhile/2 are probably not that widely used. /Uffe On Thu, 18 Oct 2001, Fredrik Linder wrote: >Hej > >Fick tipset att n?mna detta p? erlang-question-listan. Kanske n?got f?r >lists/string i OTP R9 ? > > > Sverker Wiberg writes: > > > Fredrik Linder writes: > > > S?g att du satt uppskriven som aktiv f?rfattare p? p? PLEAC Erlang. > > > Approp? "Accessing strings": I vissa l?gen funkar lists b?ttre ?n >string f?r > > > att hantera str?ngar. > > > > Tack f?r tipset. Har du n?mnt det h?r p? erlang-questions-listan? Och > > vilken erlang-version har du f?rresten? > >OTP R7B-04 ... tills idag. > > > > > > T.ex. > > > EmailAtDomain = lists:dropwhile(fun($@) -> false; (_) -> true end, > > > "my.email@REDACTED") > > > EmailName = lists:takewhile(fun($@) -> false; (_) -> true end, > > > "my.email@REDACTED") > > > {EmailName, EmailAtDomain} = lists:splitwith(fun($@) -> false; (_) -> >true > > > end, "my.email@REDACTED") > > > > > > Resultatet blir en lista ist?llet f?r ett index som motsvarande > > > string-funktion skulle ge: string:chr/2 -> int(). > > > > > > Vill man sedan g?ra n?got med den resulterande listan m?ste man med >string > > > anv?nda string:chr/2 f?ljt av t.ex. string:substr/[2,3]. > > > > > > Anv?nder man lists i det h?r fallet blir hastigheten O(n), och anv?nder >man > > > string blir det O(2*n)... Vilket assymptotiskt ?r lika, men blir >dubbelt s? > > > dyrt ?nd?. > > > > > > > Hmmm...kanske skulle skriva om string-modulen...n????! Det har jag > > inte tid (och ork) till! > >/Fredrik > >http://skrivihop.nu > > -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From bjorn@REDACTED Thu Oct 18 10:15:34 2001 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 18 Oct 2001 10:15:34 +0200 Subject: Wings - a 3D modeller in Erlang Message-ID: Wings 3D, a 3D modeller written entirely in Erlang, was presented at the Erlang User Conference this year. I have just released Wings 3D 0.80, with corrections for all the interesting demo bugs shown at the Conference. :-) And more. For Windows there is now a pre-compiled version of Wings including installation and ESDL/SDL bundled. It has never been easier to start running Wings. You'll find everything at: http://www.erlang.org/project/wings/ /Bj?rn -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 +46 8 727 56 87 125 25 ?lvsj? From joe.armstrong@REDACTED Thu Oct 18 11:07:12 2001 From: joe.armstrong@REDACTED (Joe Armstrong) Date: Thu, 18 Oct 2001 11:07:12 +0200 Subject: SAE for R8B Message-ID: <3BCE9BC0.9030707@telia.com> Announcing SAE for R8B SAE is intended for distributing stand-alone Erlang applications that do not require the standard environment. The Unix version (tested on linux) of Stand-alone-Erlang works beautifully with R8B. This is *almost* a total re-write from the last version. I have introduced a new packing system which packs all beam and include files for a libraray into a single .lib file - then I've written a loader that demand loads code from the .lib files. Using this I've re-written ecc and elink (the stand alone compile and linker) they are now down to 30Kbytes (each) - the shared libraries and the beam emulator takes 3.5 MBytes. The distribution once built is 7 files (3.5 MB) and relaces about 500 files in the standard distribution. I have no possibility to build this for windows - can somebody try to do this?? The code for this is on http://www.geocities.com/erlang_journal/ /Joe From joe.armstrong@REDACTED Thu Oct 18 11:09:24 2001 From: joe.armstrong@REDACTED (Joe Armstrong) Date: Thu, 18 Oct 2001 11:09:24 +0200 Subject: FTP-mirror Message-ID: <3BCE9C44.60005@telia.com> I've written an ftp-mirror prgram that mirrors a web site using FTP. The program correctly tracks all changes to the site creating and deleteing additiional directories as required. The code for this is on http://www.geocities.com/erlang_journal/ /Joe From joe.armstrong@REDACTED Thu Oct 18 11:58:17 2001 From: joe.armstrong@REDACTED (Joe Armstrong) Date: Thu, 18 Oct 2001 11:58:17 +0200 Subject: The Erlang Journal Message-ID: <3BCEA7B9.3030907@telia.com> I have written to O'reilly trying to interest them in a new Erlang book - they were not interested they said the market was not big enough ... ye gods - so how does it get from being small to bug without the help of a publisher ????????????????????? So instead how about a big collaborative effort..... To start the ball rolling I have put a brain dump on http://www.geocities/erlang_journal/book1.html. Please take a look - questions we might discuss are - is the chapter plan ok - more chapters ?? if so what - too many chapters?? what to delete - format - media (How about a wiki book) - with a set of moderated pages My current favorite proposal is to use the wiki with locked pages Look at the bottom of http://www.bluetail.com/wiki/showPage?node=ErlangOnLineBook to see what I mean - how do we organise the contribitutions (free for all I started the "Erlang Journal" and have written a few contributions. The journal is on http://www.geocities.com/erlang_journal/ intil it finds a better home It's in plain HTML and does not yet have any nice look-and-feel. I will correct the LAF as soon as possible. Right now I'd like contributions From joe.armstrong@REDACTED Thu Oct 18 12:19:06 2001 From: joe.armstrong@REDACTED (Joe Armstrong) Date: Thu, 18 Oct 2001 12:19:06 +0200 Subject: Erlang book Message-ID: <3BCEAC9A.9080807@telia.com> At the last erlang conferense the idea of a new erlang book was discussed. I mailed O'reilly they wern't interested - not a big enough market. To jump start this I propose a wiki book - It's started at http://www.bluetail.com/wiki/showPage?node=ErlangOnLineBook There is a chapter plan at http://www.geocities.com/erlang_journal/book1.html Please hold detailed discussions on the wiki /Joe From Erik.Reitsma@REDACTED Thu Oct 18 12:23:35 2001 From: Erik.Reitsma@REDACTED (Erik Reitsma (ELN)) Date: Thu, 18 Oct 2001 12:23:35 +0200 Subject: Erlang and Java through CORBA version combinations Message-ID: Hi all! I have been trying to talk to a Java server from an Erlang client through CORBA, and experienced some problems that I would like to share. I found that only certain versions of OTP and Sun's Java ORB work together. I have to talk to a server that uses JDK 1.3.0, and this did not work with OTP R7D (marshalling errors on the Erlang side). So I tried some other combinations, and here are the results: Below "works" means: I could call the method on the server and got the result. The method has parameters that contain objects, and has an out parameter that contains an object among other things. I can send the IDL for those who would like to solve this... I print something on the server when the method is called, so I can see whether it is called or not. The results: JDK 1.2.1 on WinNT4: works with: OTP R7D, Linux OTP R8B, WinNT4 OTP R7B, WinNT4 JDK 1.3.0 on WinNT4 works with: OTP R7B, WinNT4 does not work with: OTP R7D, Linux (method not called, marshalling exception) OTP R8B, WinNT4 (method not called, marshalling exception) JDK 1.4.0, first beta (b65) on WinNT4 works with: none does not work with: OTP R7D, Linux (method called, but exception) OTP R8B, WinNT4 (method called, but exception) OTP R7B, WinNT4 (not called, no_implement exception) JDK 1.4.0, second beta (b77) on WinNT4 works with: OTP R7D, Linux OTP R8B, WinNT4 does not work with: OTP R7B, WinNT (not called, no_implement exception) JDK 1.4.0, second beta (b77) on Linux works with: OTP R7D, Linux OTP R8B, WinNT4 does not work with: OTP R7B, WinNT (not called, no_implement exception) This means, since I have to work with JDK 1.3, that I should use OTP R7B. Any ideas about what causes this? Anything broken since R7B? I would like to use the newer OTP, but in this case, it seems that I have to use R7B... *Erik. From bjarne@REDACTED Thu Oct 18 13:02:42 2001 From: bjarne@REDACTED (Bjarne =?iso-8859-1?Q?D=E4cker?=) Date: Thu, 18 Oct 2001 13:02:42 +0200 Subject: Erlang book References: <3BCEAC9A.9080807@telia.com> Message-ID: <3BCEB6D2.4D0AD728@erix.ericsson.se> Joe Armstrong wrote: > At the last erlang conferense the idea of a new erlang book was discussed. > > I mailed O'reilly they wern't interested - not a big enough market. Why not ask Prentice-Hall ? Stick with your old friends ! Bjarne From jabba@REDACTED Thu Oct 18 13:14:32 2001 From: jabba@REDACTED (Jani Launonen) Date: Thu, 18 Oct 2001 14:14:32 +0300 (EEST) Subject: Erlang and Java through CORBA version combinations In-Reply-To: Message-ID: Hello, >I have been trying to talk to a Java server from an Erlang client through >CORBA, and experienced some problems that I would like to share. I found >that only certain versions of OTP and Sun's Java ORB work together. I >have to talk to a server that uses JDK 1.3.0, and this did not work with >OTP R7D (marshalling errors on the Erlang side). So I tried some other >combinations, and here are the results: Sun's ORB isn't promised to be complient as far as I know. At least it doesn't work as a server end, I think. I've been using JacORB 1.3.30 and they play nicely (although there were some problems way back with R7B-0/1, with marshalling) together. Now I'm using P8A (Orber 3.2.9) and happy with it. >This means, since I have to work with JDK 1.3, that I should use OTP R7B. >Any ideas about what causes this? Anything broken since R7B? I would like >to use the newer OTP, but in this case, it seems that I have to use >R7B... Are you quite sure, you want to use Sun's ORB as it doesn't implement POA and such compliantly? There's the JacORB (www.jacorb.org) and OpenORB (www.openorb.org) that both are open source. I might be wrong about the Sun's latest ORB, though. -+-+-+- Jani Launonen Home: (08) 8802 180/Work: +358 8 553 2810 jabba@REDACTED Paalikatu 14 A 410 90520 OULU Student. . . . . . . . . .University of Oulu, Dept. of EE Assistant Researcher . . .Genie of the Net Project From rv@REDACTED Thu Oct 18 13:21:06 2001 From: rv@REDACTED (Robert Virding) Date: Thu, 18 Oct 2001 13:21:06 +0200 Subject: Erlang book In-Reply-To: Your message of "Thu, 18 Oct 2001 13:02:42 +0200." <3BCEB6D2.4D0AD728@erix.ericsson.se> Message-ID: <200110181121.f9IBL6B01729@erik.virding.org> Bjarne =?iso-8859-1?Q?D=E4cker?= writes: >Joe Armstrong wrote: > >> At the last erlang conferense the idea of a new erlang book was discussed. >> >> I mailed O'reilly they wern't interested - not a big enough market. > >Why not ask Prentice-Hall ? > >Stick with your old friends ! > >Bjarne Of course but Joe wants to do an O'Reilly book! :-) Robert From nick@REDACTED Thu Oct 18 13:22:31 2001 From: nick@REDACTED (Niclas Eklund) Date: Thu, 18 Oct 2001 13:22:31 +0200 (MEST) Subject: Erlang and Java through CORBA version combinations In-Reply-To: Message-ID: Hello! To start with, my advice is that you use the latest version R8 (Orber-3.2.9) when testing. Please note that the snapshots didn't include 3.2.9. There are also a few simple things you can do to debug your system: shell> erl -orber orber_debug_level 10 -orber interceptors "{native,[log_interceptor]}" The 'orber_debug_level' you can use straight away but the interceptor must be implemented. I'll send you the log_interceptor.erl in a separate e-mail. If you want to log the traffic to file just edit it (see also chapter 12 in the User's Guide and the 'interceptors' section in the reference manual if you want more info). To check if you installed the interceptor correctly just type (after starting Orber) orber:info(). in the shell. To be able to help you further it would really help if you could include the minor-codes and completion-status of the system excepetion. This information and if you do the above I'll most likely be able to tell what goes wrong. /Nick On Thu, 18 Oct 2001, Erik Reitsma (ELN) wrote: > Hi all! > > I have been trying to talk to a Java server from an Erlang client > through CORBA, and experienced some problems that I would like to share. > I found that only certain versions of OTP and Sun's Java ORB work > together. I have to talk to a server that uses JDK 1.3.0, and this did > not work with OTP R7D (marshalling errors on the Erlang side). So I > tried some other combinations, and here are the results: > > Below "works" means: I could call the method on the server and got the > result. The method has parameters that contain objects, and has an out > parameter that contains an object among other things. I can send the IDL > for those who would like to solve this... > I print something on the server when the method is called, so I can see > whether it is called or not. > > The results: > > JDK 1.2.1 on WinNT4: > works with: > OTP R7D, Linux > OTP R8B, WinNT4 > OTP R7B, WinNT4 > > JDK 1.3.0 on WinNT4 > works with: > OTP R7B, WinNT4 > does not work with: > OTP R7D, Linux (method not called, marshalling exception) > OTP R8B, WinNT4 (method not called, marshalling exception) > > JDK 1.4.0, first beta (b65) on WinNT4 > works with: > none > does not work with: > OTP R7D, Linux (method called, but exception) > OTP R8B, WinNT4 (method called, but exception) > OTP R7B, WinNT4 (not called, no_implement exception) > > JDK 1.4.0, second beta (b77) on WinNT4 > works with: > OTP R7D, Linux > OTP R8B, WinNT4 > does not work with: > OTP R7B, WinNT (not called, no_implement exception) > > JDK 1.4.0, second beta (b77) on Linux > works with: > OTP R7D, Linux > OTP R8B, WinNT4 > does not work with: > OTP R7B, WinNT (not called, no_implement exception) > > This means, since I have to work with JDK 1.3, that I should use OTP R7B. > Any ideas about what causes this? Anything broken since R7B? I would like to use the newer OTP, but in this case, it seems that I have to use R7B... > > *Erik. From Erik.Reitsma@REDACTED Thu Oct 18 13:24:44 2001 From: Erik.Reitsma@REDACTED (Erik Reitsma (ELN)) Date: Thu, 18 Oct 2001 13:24:44 +0200 Subject: Erlang and Java through CORBA version combinations Message-ID: > Are you quite sure, you want to use Sun's ORB as it doesn't > implement POA > and such compliantly? There's the JacORB (www.jacorb.org) and OpenORB > (www.openorb.org) that both are open source. > > I might be wrong about the Sun's latest ORB, though. I have to use Sun's ORB for now, since the server is implemented by somebody else, and they do some stuff with the ORB classes internally which does not work with other versions. But perhaps this will convice them to reconsider, and move to some other ORB. They probably did not test with other ORBs themselves... As I wrote in my previous mail, the latest ORB from Sun works nicely (as far as I have come) with the later OTP ORBs. Thanks for the tip! *Erik. From vladdu@REDACTED Thu Oct 18 16:37:23 2001 From: vladdu@REDACTED (Vlad Dumitrescu) Date: Thu, 18 Oct 2001 16:37:23 +0200 Subject: Building R8B on Cygwin Message-ID: Hi folks, I've been trying to compile the sources for the new release, but it stopped in the middle of it, saying gcc -g -O2 -I/cygdrive/d/vlad/otp_src_R8B-20011015-SNAPSHOT/erts/i686-pc-cygwin -DINSTRUMENT -DHAVE_CONFIG_H -Wall -DHIPE_ARCHITECTURE=x86 -Ibeam -Isys/unix -Ii686-pc-cygwin -Izlib -Ihipe -c drivers/common/inet_drv.c -o /cygdrive/d/vlad/o tp_src_R8B-20011015-SNAPSHOT/erts/obj.instr.beam/i686-pc-cygwin/inet_drv.o drivers/common/inet_drv.c:178: arpa/nameser.h: No such file or directory and it is correct, such a file doesn't exist on my system... weird, I think... I have compiled successfully R7. Anyone knows what to do? Thanks. regards, Vlad From bparsia@REDACTED Thu Oct 18 18:43:00 2001 From: bparsia@REDACTED (Bijan Parsia) Date: Thu, 18 Oct 2001 12:43:00 -0400 (EDT) Subject: The Erlang Journal In-Reply-To: <3BCEA7B9.3030907@telia.com> Message-ID: On Thu, 18 Oct 2001, Joe Armstrong wrote: > > I have written to O'reilly trying to interest them in a new Erlang book > - they were not interested Sigh. Too bad. > they said the market was not big enough ... ye gods - so how does it get > from being small > to bug without the help of a publisher ????????????????????? I've been trying to drum up support in ORA for alternative tech, espeically languages. That's one reason I've been writing the various articles for XML.com. The didn't take a Squeak book either, and it clearly has a reasonable market :( They *do* do some very weird books (tiny tiny markets, IMHO), so it's very very odd. But I do have a sketch for "Erlang in a Nutshell" around somewhere... :) > So instead how about a big collaborative effort..... > > To start the ball rolling > I have put a brain dump on http://www.geocities/erlang_journal/book1.html. > Please take a look - questions we might discuss are > > - is the chapter plan ok Quick response: It doesn't really *feel* like an ORA book (not that ORA is the holy grail, IMHO, but if that's what you're aiming for, it's really worth looking at Foo in A Nutshell, or Foo, the Definitive Guide, or what have you). The other thing is that I think organizing around common applications is much more useful. I'd rather read about building a cool website with erlang than MD5 authentication. That's just me, of course! [snip] I'm interested in contributing, as I have time. Cheers, Bijan Parsia. From vances@REDACTED Thu Oct 18 19:40:23 2001 From: vances@REDACTED (Vance Shipley) Date: Thu, 18 Oct 2001 13:40:23 -0400 Subject: Erlang book In-Reply-To: <200110181121.f9IBL6B01729@erik.virding.org> Message-ID: How about an "Erlang for Dummies" book? :) -Vance From david@REDACTED Thu Oct 18 20:14:43 2001 From: david@REDACTED (david wallin) Date: Thu, 18 Oct 2001 20:14:43 +0200 Subject: Erlang book In-Reply-To: <3BCEAC9A.9080807@telia.com> Message-ID: <010E2256-C3F4-11D5-94ED-000393536F4E@wallin.cx> On torsdag, oktober 18, 2001, at 12:19 , Joe Armstrong wrote: > At the last erlang conferense the idea of a new erlang book was > discussed. > > I mailed O'reilly they wern't interested - not a big enough market. > I like the "look and feel" of the books from new riders (www.newriders.com). Maybe they could be persuaded. (How about a b&w picture of a lighthouse and a stormy sea on the cover ?) --david. From garry@REDACTED Thu Oct 18 20:31:36 2001 From: garry@REDACTED (Garry Hodgson) Date: Thu, 18 Oct 2001 14:31:36 -0400 Subject: Erlang book References: Message-ID: <3BCF2008.760691C4@sage.att.com> Vance Shipley wrote: > How about an "Erlang for Dummies" book? :) dummies shouldn't use erlang. or computers, for that matter. -- Garry Hodgson One way or another Senior Hacker One way or another Software Innovation Services One way or another AT&T Labs This darkness got to give... garry@REDACTED From hokan.stenholm@REDACTED Thu Oct 18 21:34:32 2001 From: hokan.stenholm@REDACTED (=?ISO-8859-1?Q?H=E5kan_Stenholm?=) Date: Thu, 18 Oct 2001 21:34:32 +0200 Subject: The update R7B-4 is released (MacOsX.1 compile problem) Message-ID: <27863914-C3FF-11D5-BAF3-003065B5F8B4@telia.com> I've now tried R8B-0 in MacOsX.1 as well, I don't get the same error (but rather a error before erl_malloc.c) so I guess I'll have to wait for some of the clever OTP people to fix this (sigh) :-( ---------------------------------------------------------- cc -g -O3 -I/Users/hokan/codeing/otp_src_R8B-20011015-SNAPSHOT/erts/powerpc-apple-darwin1. 4 -no-cpp-precomp -DINSTRUMENT -DHAVE_CONFIG_H -Wall -DHIPE_ARCHITECTURE=noarch -Ibeam -Isys/unix -Ipowerpc-apple-darwin1.4 -Izlib -Ihipe -c beam/beam_bp.c -o /Users/hokan/codeing/otp_src_R8B-20011015-SNAPSHOT/erts/obj.instr.beam/powerpc-apple-darwin1. 4/beam_bp.o cc -g -O3 -I/Users/hokan/codeing/otp_src_R8B-20011015-SNAPSHOT/erts/powerpc-apple-darwin1. 4 -no-cpp-precomp -DINSTRUMENT -DHAVE_CONFIG_H -Wall -DHIPE_ARCHITECTURE=noarch -Ibeam -Isys/unix -Ipowerpc-apple-darwin1.4 -Izlib -Ihipe -c beam/beam_catches.c -o /Users/hokan/codeing/otp_src_R8B-20011015-SNAPSHOT/erts/obj.instr.beam/powerpc-apple-darwin1. 4/beam_catches.o cc -g -O2 -I/Users/hokan/codeing/otp_src_R8B-20011015-SNAPSHOT/erts/powerpc-apple-darwin1. 4 -no-cpp-precomp -DINSTRUMENT -DHAVE_CONFIG_H -Wall -DHIPE_ARCHITECTURE=noarch -Ibeam -Isys/unix -Ipowerpc-apple-darwin1.4 -Izlib -Ihipe -c sys/unix/sys.c -o /Users/hokan/codeing/otp_src_R8B-20011015-SNAPSHOT/erts/obj.instr.beam/powerpc-apple-darwin1. 4/sys.o sys/unix/sys.c: In function `driver_select': sys/unix/sys.c:1712: argument `this_port' doesn't match prototype beam/erl_driver.h:205: prototype declaration sys/unix/sys.c:1712: argument `fd' doesn't match prototype beam/erl_driver.h:205: prototype declaration make[2]: *** [/Users/hokan/codeing/otp_src_R8B-20011015-SNAPSHOT/erts/obj.instr.beam/powerpc-apple-darwin1. 4/sys.o] Error 1 make[1]: *** [instr] Error 2 make: *** [emulator.instr] Error 2 From achrist@REDACTED Fri Oct 19 09:06:45 2001 From: achrist@REDACTED (Al Christians) Date: Fri, 19 Oct 2001 00:06:45 -0700 Subject: SAE for R8B Message-ID: <3BCFD105.7C391C3@easystreet.com> I tried following the instructions on how to build SAE on Windows. Unfortunately, I get hung up around step 2. I can uzip the Erlang source (Winzip seems to do this ok). But running the configure script for the Erlang source under Windows on my machine leads to a machine that hangs up when it gets to "checking for unreliable floating point exceptions". This step has so far taken over 1 hour of CPU according to the NT task manager, and it is still sitting there. My machine is NT4 SP6. I am running the configure script under bash of Cygwin, version 1.18. My gcc is v2.95. Al Christians From nico.weling@REDACTED Fri Oct 19 10:24:22 2001 From: nico.weling@REDACTED (Nico Weling) Date: Fri, 19 Oct 2001 10:24:22 +0200 Subject: How to send ctrl-c to a unix-process started as a port Message-ID: <3BCFE336.7C5250F8@eed.ericsson.se> Hi All, with the following programm I'd like to start a UNIX tail. If a line contains the word 'root' I'd like to stop the UNIX-tail process by sending ctrl-C to the port. But the tail process didn't stop. Does anybody know why? Thanks, Nico. ================================================================================ At the Erlang-Shell I entered: 35> gmc_util:tail("tail -f -n0 /var/log/messages"). Bytes: "Oct 19 09:37:01 aims-pc-6 su(pam_unix)[29326]: session opened for user aims by aims(uid=0)\n" Bytes: "Oct 19 09:37:05 aims-pc-6 su(pam_unix)[29347]: session opened for user root by aims(uid=500)\n" done ================================================================================ >From the unix-commandline I did: [root@REDACTED /root]# su aims [aims@REDACTED /root]$ su root Password: [root@REDACTED /root]# ps -auxww | grep tail root 29325 0.1 0.4 1548 556 ? S 09:36 0:00 tail -f -n0 /var/log/messages root 29381 0.0 0.4 1620 608 pts/7 R 09:37 0:00 grep tail ================================================================================ tail(Cmd) -> Command = binary_to_list( list_to_binary(["sh -c '", Cmd, "' 2>&0"])), Port = open_port({spawn, Command}, [stream,use_stdio,eof]), get_data_tail(Port, []). get_data_tail(Port, Sofar) -> receive {Port, {data, Bytes}} -> io:format("Bytes: ~p~n",[Bytes]), case find_string(Bytes,"root") of {ok, _} -> Port ! {self(), {command, "^C"}}, done; _ -> get_data_tail(Port, Sofar ++ Bytes) end; {Port, eof} -> Port ! {self(), close}, receive {Port, closed} -> true end, receive {'EXIT', Port, _} -> ok after 1 -> ok end, Sofar; {'EXIT', Port, _} -> Sofar after 300000 -> %wait 5mins before exit exit(timeout) end. From nicolas.niclausse@REDACTED Fri Oct 19 10:29:12 2001 From: nicolas.niclausse@REDACTED (Nicolas Niclausse) Date: 19 Oct 2001 10:29:12 +0200 Subject: can't compile R8B with both enable-unified-heap and enable-threads In-Reply-To: <3BCFD105.7C391C3@easystreet.com> Message-ID: <7bk7xsdodj.fsf@schultze.infra.idealx.com> Hello, On a linux 2.4.12/x86 debian/sid system (gcc 2.95.4) : When i try to compile R8B with both --enable-unified-heap and --enable-threads, the following errors occured: make[3]: *** [../ebin/beam_lib.beam] Segmentation fault make[3]: *** [../src/snmp_mib_gram.erl] Segmentation fault make[3]: *** [../priv/mibs/RFC1213-MIB.bin] Segmentation fault ... The compilation is fine when i use either enable-unified-heap or enable-threads -- Nicolas NICLAUSSE IDEALX S.A.S. T?l:01 44 42 00 00 http://IDEALX.org/ From vances@REDACTED Fri Oct 19 11:39:26 2001 From: vances@REDACTED (Vance Shipley) Date: Fri, 19 Oct 2001 05:39:26 -0400 Subject: additional configuration options In-Reply-To: <7bk7xsdodj.fsf@schultze.infra.idealx.com> Message-ID: In addition to the configuration options in listed in the top level README, and available with ./configure --help, I find these additional options in erts/configure: --disable-megaco-flex-scanner-lineno disable megaco flex scanner --enable-elib-malloc use elib_malloc instead of normal malloc" --disable-fixalloc disable the use of fix_alloc" Can anyone shed some light on these? -Vance From etxuwig@REDACTED Fri Oct 19 12:54:00 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Fri, 19 Oct 2001 12:54:00 +0200 (MET DST) Subject: additional configuration options In-Reply-To: Message-ID: On Fri, 19 Oct 2001, Vance Shipley wrote: > >In addition to the configuration options in listed in the top >level README, and available with ./configure --help, I find >these additional options in erts/configure: > > --disable-megaco-flex-scanner-lineno disable megaco flex scanner In the MEGACO application, the token scanner has been rewritten as a linked-in driver. I assume that this option disables the linked-in driver alternative and uses the erlang-based token scanner. > --enable-elib-malloc use elib_malloc instead of normal malloc" Somebody will have to correct me if I'm wrong -- this is not my strong side, but that makes it even more fun to try to answer. ;) elib_malloc is an in-house malloc library mainly used on VxWorks (because, as I've been told, the malloc in VxWorks sucks pretty badly.) Elib_malloc spents a lot of energy managing freelists. > --disable-fixalloc disable the use of fix_alloc" fix_alloc is a special allocator for fixed size blocks. In the header of erts/emulator/beam/fix_alloc.c, one can read the following: /* General purpose Memory allocator for fixed block size objects This allocater is at least an order of magnitude faster than malloc() */ I believe that there is a potential problem in running fix_alloc, in that it keeps its own freelist, thus never returning memory to the main malloc (which has to be used also). It's possible that fix_alloc, even though it appears to be much faster than malloc, can actually degrade performance (or increase fragmentation) in the whole system. I have no personal experience to back up my claim, but heard in the hallways that one would like to be able to run without fix_alloc to see what happens. In general, I've noticed that many aspects of memory allocation are configurable in R8. /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From hakan@REDACTED Fri Oct 19 14:06:36 2001 From: hakan@REDACTED (Hakan Mattsson) Date: Fri, 19 Oct 2001 14:06:36 +0200 (MEST) Subject: additional configuration options In-Reply-To: Message-ID: On Fri, 19 Oct 2001, Ulf Wiger wrote: Uffe> On Fri, 19 Oct 2001, Vance Shipley wrote: Uffe> Uffe> >In addition to the configuration options in listed in the top Uffe> >level README, and available with ./configure --help, I find Uffe> >these additional options in erts/configure: Uffe> > Uffe> > --disable-megaco-flex-scanner-lineno disable megaco flex scanner Uffe> Uffe> In the MEGACO application, the token scanner has been rewritten Uffe> as a linked-in driver. I assume that this option disables the Uffe> linked-in driver alternative and uses the erlang-based token Uffe> scanner. No, it is just an optimization flag for the flex based scanner. By disabling the counting of line numbers, you will gain yet some performance. The flex based scanner is up to 10 times faster than the Erlang based scanner. The flex based scanner is built if flex is available. Even if the flex based scanner is built and installed, the Erlang based scanner can still be used. In fact each Megaco connection may have its own scanner. /H?kan --- H?kan Mattsson Ericsson Computer Science Laboratory http://www.ericsson.com/cslab/~hakan/ From Jouni.Ryno@REDACTED Fri Oct 19 21:32:32 2001 From: Jouni.Ryno@REDACTED (Jouni.Ryno@REDACTED) Date: Fri, 19 Oct 2001 22:32:32 +0300 Subject: R8 and (no) hex output ... In-Reply-To: Message from Hakan Mattsson of "Fri, 19 Oct 2001 14:06:36 +0200." Message-ID: Not that I complain, but would it be possible to have ~h/~H in the io_lib for hex-output in some near future release, please. Sometimes it is just so much readable than decimal, you don't call your release R139 either ... :-) Shall I even dare to mention ~b ..., ~B would of course be IOOOIIOO ... with regards Jouni Jouni Ryn? mailto://Jouni.Ryno@REDACTED/ http://www.geo.fmi.fi/~ryno/ Finnish Meteorological Institute http://www.fmi.fi/ Geophysical Research http://www.geo.fmi.fi/ P.O.BOX 503 Tel (+358)-9-19294656 FIN-00101 Helsinki FAX (+358)-9-19294603 Finland priv-GSM (+358)-50-5302903 "It's just zeros and ones, it cannot be hard" From stephen_han@REDACTED Sat Oct 20 01:44:13 2001 From: stephen_han@REDACTED (stephen_han@REDACTED) Date: Fri, 19 Oct 2001 16:44:13 -0700 Subject: What happen to etk? Message-ID: <88256AEA.0081D4FA.00@notes.centigram.com> Currently I installed R8B. I notice that etk is gone!! What happen to etk? regards, From matthias@REDACTED Sat Oct 20 02:13:22 2001 From: matthias@REDACTED (Matthias Lang) Date: Sat, 20 Oct 2001 02:13:22 +0200 Subject: R8 and (no) hex output ... In-Reply-To: References: Message-ID: <15312.49570.713648.706447@antilipe.corelatus.se> > Not that I complain, but would it be possible to have ~h/~H in the > io_lib for hex-output in some near future release, please. Sometimes it In the name of "incomplete, mostly untested code is better than none at all", here's a patch (against R8B) I use to help avoid insanity while debugging non-text protocols. It gives you ~h, though with restrictions. Examples: 11> io:fwrite("~h\n", [99999999999999999999999999999]). 1431e0fae6d7217ca9fffffff ok 13> io:fwrite("~h\n", [<<"hello world">>]). <(68,65,6c,6c,6f,20,77,6f,72,6c,64)> ok 14> io:fwrite("~20h\n", [<<"hello world">>]). <(68,65,6c,6c...)> >From the code: %% Hex output of integers or binaries. %% %% Integer support is lame; Width, alignment and precision are %% not allowed. Nor are negative numbers. %% %% Binary support is less lame. Width is allowed, though not %% below 7, which means you can't print <(7a)>. Matthias -------------- next part -------------- A non-text attachment was scrubbed... Name: hexpatch Type: application/octet-stream Size: 2529 bytes Desc: not available URL: -------------- next part -------------- From kent@REDACTED Sat Oct 20 02:55:32 2001 From: kent@REDACTED (Kent Boortz) Date: 20 Oct 2001 02:55:32 +0200 Subject: What happen to etk? In-Reply-To: stephen_han@adc.com's message of "Fri, 19 Oct 2001 16:44:13 -0700" References: <88256AEA.0081D4FA.00@notes.centigram.com> Message-ID: stephen_han@REDACTED writes: > Currently I installed R8B. I notice that etk is gone!! > What happen to etk? It was removed for several reasons. Etk was never a supported Erlang application and we felt that there is now a more interesting alternative, Erlang/Gtk. http://sourceforge.net/projects/erlgtk/ But if there is still interest in etk we may make it available in the www.erlang.org contribution area, kent From rv@REDACTED Sun Oct 21 21:27:59 2001 From: rv@REDACTED (rv@REDACTED) Date: Sun, 21 Oct 2001 21:27:59 +0200 (CEST) Subject: Unified heap (was: Re: R8B PRE-RELEASES) In-Reply-To: Your message of "Wed, 10 Oct 2001 13:29:39 +0200." <3BC43123.830457C6@synapse.se> Message-ID: <200110211927.f9LJReU75289@dns2.s.bonet.se> This discussion about unified heaps has made me happy. I have been advocating unified heaps for the last 13 years and I have always felt that the multiples heaps were a kludge to get reasonable gc preformance, at least some of the time. I have even done a few Erlang implementations based on it, the results were promising but more work was needed. I could not get any support for the work, however, so I was unable to keep up with Erlang development. The really big boost was that message passing was _fast_! _Always_! You don't have to avoid many processes because you would be sending large messages all the time. Here you could send all the messages you wanted to. This did expose a misfeature in Erlang devlopment(*). There are definitely problems in doing a good implementation. The HIPE groups claim that a stop-and-gc of the whole heap still gives acceptable gc performance does not hold in real applications. Especially if you use large ETS tables. You have to be much more cunning. I had some incremental collectors with bounded time gc breaks that that were truly non-disruptive, but there were problems. I think that the final one based from 1995 on a modified version of a gc scheme by Joe Armstrong and me was the way to go. It was truly scalable and handled things like collectable atom tables and (large) constant data structures easily and efficiently. I had an efficient ETS extension which ran without any copying planned. I don't think that it is possible to drop in a good, incremental gc into a BEAM without any extra work. There are many places where you must "keep your tongue right in your mouth". It is not difficult, but you have to be aware. Joes and my algorithm is described in IWMM'95 (International Workshop on memory management). If anybody is interested I'll explain my extensions. Anyway I hope the HIPE people (or someone else) can do more with this. Robert (*) Erlang processes have slowly been getting heavier as more features have been added to them. My dream has always been to have extremely light weight processes, in every respect, and then code new features using extra processes. It may not always be possible to do this. P.S. I am not at Bluetail/Alteon/Nortel anymore, just using the mail address. Per Bergqvist writes: >I am also a believer in the unified heap (or rather any technique that >avoids memory copying) >both by gut feeling and experience. > >I have always seen great performance improvements in my code with such >techniques (i.e. vee in >the good old days/dark ages and unified heap) and but for some strange >reason I seem to be >rather lonely with such findings. The majority of the community seem to >get less improvements. > >It probably has to do very much with design patterns. I think that the >greatest thing with Erlang is that >the low cost processes allows designs where you don't have to mix >behaviours in processes. >Instead you have many, many small and simple independent but cooperating >processes. >The code become much cleaner easier to understand. >(I my opinion this really the core in why it is possible to build such >great systems with Erlang.) >>To avoid getting performance boosts with unified heap you probably need >to avoid message >passing and have few complex processes in your application. > >I think that nobody can argue unnecessary memory copying is of evil. >(It is a performance killer for every system, it takes time, trash caches >...) > >What should be discussed is garbage collection. >The critic of schemes avoiding memory copying always seems to be that a >good gc >will be very very hard if not impossible. >Is that really true ? I am not the man to answer. >It is true that the current gc enables a smooth execution and it is quite >uncommon with >long time system stalls for gc. > >Comments anyone ? > >/Per > From rv@REDACTED Sun Oct 21 21:31:25 2001 From: rv@REDACTED (rv@REDACTED) Date: Sun, 21 Oct 2001 21:31:25 +0200 (CEST) Subject: Erlang book In-Reply-To: Your message of "Thu, 18 Oct 2001 12:19:06 +0200." <3BCEAC9A.9080807@telia.com> Message-ID: <200110211931.f9LJV3U75331@dns2.s.bonet.se> I liked the book plan. Some comments: 1. I don't think it should be too chatty, even with attitude. It is important to remember that this will be *THE* Erlang book. 2. I think you need to filter your examples better. Perhaps more of what is Erlang is really good for, not what you can write in Erlang. 3. Be careful to separate the hands-on stuff from descriptions of the language/libraries/OTP. Otherwise some people may get a bit confused as to what is the language and what is the implementation. Also seeing different OSes look different you may confuse just the people you want and need to help. 4. Much more OTP. This is the killer app. Even if O'Reilly aren't interested can/should we still use their style sheets etc? If the book come out on the net they will probably never become interested. Any better alternatives? Another publisher. Robert From etxuwig@REDACTED Sun Oct 21 22:16:27 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Sun, 21 Oct 2001 22:16:27 +0200 (MET DST) Subject: Unified heap (was: Re: R8B PRE-RELEASES) In-Reply-To: <200110211927.f9LJReU75289@dns2.s.bonet.se> Message-ID: On Sun, 21 Oct 2001 rv@REDACTED wrote: >There are definitely problems in doing a good implementation. The >HIPE groups claim that a stop-and-gc of the whole heap still gives >acceptable gc performance does not hold in real applications. >Especially if you use large ETS tables. You have to be much more >cunning. As a reference, in AXD 301 (a rather large application), it's not at all uncommon with VM sizes of 80-100 MB, 3-400 processes, and we many hundreds of ETS tables, some that grow to contain > 60,000 objects. /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From mikpe@REDACTED Mon Oct 22 00:20:35 2001 From: mikpe@REDACTED (Mikael Pettersson) Date: Mon, 22 Oct 2001 00:20:35 +0200 (MET DST) Subject: Unified heap (was: Re: R8B PRE-RELEASES) Message-ID: <200110212220.AAA05951@harpo.it.uu.se> On Sun, 21 Oct 2001 21:27:59 +0200 (CEST), Robert Virding wrote: > >This discussion about unified heaps has made me happy. >... >There are definitely problems in doing a good implementation. The >HIPE groups claim that a stop-and-gc of the whole heap still gives >acceptable gc performance does not hold in real applications. Careful with your attributions. Some HiPE members may have said something like that, but *I* for one have never claimed that stop-and-copy would scale to a unified-heap system. My "paper" design always had several layers of incremental and/or generational algorithms. Roughly: - stop-and-copy from smallish (tuned to L2 cache size) nursery to second generation (a.k.a. aging buffer) - incremental copying from 2nd to 3rd generation, probably using replicating gc (cloning is ok since Erlang data is immutable) - incremental non-moving gc for 3rd generation, say mark-sweep, backed by slab-like allocator for reduced fragmentation /Mikael From vladdu@REDACTED Mon Oct 22 10:51:37 2001 From: vladdu@REDACTED (Vlad Dumitrescu) Date: Mon, 22 Oct 2001 10:51:37 +0200 Subject: Graphical UI Message-ID: Hi everyone, I've been playing with the new Wings application and it's very cool, and I remembered an older plan of mine, namely having a nice GUI for Erlang programs... Using OpenGL would be a nice platform independent option, but SDL has a big flaw (when relating to Erlang): it only can handle one display surface per application, and thus only one SDL window may be present per Erlang node. (This is at least true for Windows, but should hold for any OS also). Using OpenGL directly requires a way to create a top-level window from the underlying OS... Now what I wonder is: - has anyone else give this any thought? - is creating a binding to an UI toolkit (like for example FLTK) something anyone is working on or thinking about? I am trying to make some time to try to see if I could contribute with such a beast, but that's not a promise ;) and if anyone else is already on his way, it would be nice to not reinvent the wheel. best regards, Vlad From gupta@REDACTED Mon Oct 22 16:38:37 2001 From: gupta@REDACTED (Dr. Gopal Gupta) Date: Mon, 22 Oct 2001 09:38:37 -0500 Subject: ICLP'01/CP'01: Extended Deadline for Early Registration Message-ID: <200110221438.f9MEcbP10731@herbrand.utdallas.edu> [More than 240 people have already registered for the joint ICLP'01/ CP'01 conference. However, due to the recent turmoil in the world and the fact that many of the workshops have had late notification dates, the organizers of ICLP'01/CP'01 have extended the deadline for early registration to 2nd Nov., 2001. Please register as soon as possible, to take advantage of these reduced rates. Early registration also helps us in planning better. -- Tony Kakas on behalf of the Organizing Committe]. CALL FOR PARTICIPATION!!! CALL FOR PARTICIPATION!!! INTERNATIONAL CONFERENCE ON LOGIC PROGRAMMING, 2000 -------------------------------------------------- CORAL BEACH HOTEL AND RESORT Nov 26 - Dec. 1 http://www.cs.ucy.ac.cy/~iclpcp01/ The international conference on logic programming will be held in the beautiful sea resort of Paphos, Cyprus. The conference will be co-located with Constraint Programming 2001 (CP'01). The conference program includes invited talks by Robert Kowalski, Alain Colmerauer, and Patrick Cousot, and tutorials on various contemporary topics. A number of postconference workshops are also part of the program. The program also includes excursions to sites around Paphos. Reduced hotel rates near the conference sites are still available. More information can be obtained from the ICLP'01 website http://www.cs.ucy.ac.cy/~iclpcp01 C O N F E R E N C E P R O G R A M MONDAY 08.45 Opening 09.00 Invited talk Is Logic Really Dead, or Only Just Sleeping? Robert A. Kowalski (Imperial College, London) 10.30 Coffee 11.15 Implementation and Parallelism Understanding Memory Management in Prolog Systems Lu?s Fernando Castro, and V?tor Santos Costa PALS: A Distributed Or-Parallel Implementation of Prolog on a Beowulf Architecture K. Villaverde, E. Pontelli, H. Guo, and Gopal Gupta On a Tabling Engine that can Exploit Or-Parallelism Ricardo Rocha, Fernando Silva, and V?tor Santos Costa 12.45 Lunch 14.30 Constraints Revisiting the cardinality Operator and Introducing the cardinality-path Constraint Family Nicolas Beldiceanu and Mats Carlsson Optimizing Compilation of Constraint Handling Rules Christian Holzbaur, Peter J. Stuckey, Maria Garcia de la Banda, and David Jeffrey Building Constraint Solvers with HAL Maria Garcia de la Banda, David Jeffery, Kim Marriott , Peter J. Stuckey, and Christian Holzbaur 16.00 Coffee 16.45 Tutorial Building real-life applications with Prolog Jan Wielemaker (University of Amsterdam, The Netherlands) 19.00 Welcome Reception/Dinner (at the Hotel) TUESDAY 09.00 Static Analysis Practical Aspects for a working Compile Time Garbage Collection System for Mercury Nancy Mazur, Peter Ross, Gerda Janssens, and Maurice Bruynooghe Positive Boolean Functions as Multiheaded Clauses Jacob M. Howe and Andy King Higher-Precision Groundness Analysis Michael Codish, Samir Genaim, Harald Sondergaard, and Peter J. Stuckey 10.30 Excursion to Paphos Mosaics & St Paul's Pillar 13.00 Lunch 14.30 Invited Talk Patrick Cousot (Ecole Normale Superieure, Paris, France) Title to be Announced 16.00 Coffee 16.45 Tutorial A Close Look at Constraint-Based Concurrency Kazunori Ueda (Waseda University, Tokyo, Japan) 18.30 Prolog Programming Competition WEDNESDAY 09.00 Tabulation Techniques Speculative Beats Conservative Justification Hai-Feng Guo, C.R. Ramakrishnan, and I.V. Ramakrishnan Local and Symbolic Bisimulation using Tabled Constraint Logic Programming Samik Basu, Madhavan Mukund, C.R. Ramakrishnan, I.V. Ramakrishnan, and Rakesh Verma A Simple Scheme for Implementing Tabled Logic Programming Systems based on Dynamic Reordering of Alternatives Hai-Feng Guo and Gopal Gupta 10.30 Coffee 11.00 Tutorial Natural Language Tabular Parsing ?ric Villemonte de la Clergerie (INRIA - Rocquencourt, France) 12.30 Lunch 13.45 Excursion: Aphrodite's Trail Performance by the Cyprus Orchestra of Ancient Greek Musical Organs Light Dinner THURSDAY 09.00 Non Monotonic Reasoning 1 Fixed-parameter complexity of semantics for logic programs Zbigniew Lonc and Miroslaw Truszczynski Well-founded and stable semantics for logic programs with aggregates Marc Denecker, Nikolay Pelov, and Maurice Bruynooghe Alternating Fixed Points in Boolean Equation Systems as Preferred Stable Models K. Narayan Kumar, C.R. Ramakrishnan, and Scott A. Smolka 10.30 Coffee 11.15 Tutorial Probabilistic reasoning in databases and logic programs V.S. Subrahmanian (University of Maryland, USA) 12.45 Lunch 14.30 Invited Talk X-tegration - some cross-enterprise thoughts Ashish Gupta (Chief Scientific Officer, Tavant Technologies) 16.00 Coffee 16.30 Non-monotonic Reasoning 2 Fages' Theorem for Programs with Nested Expressions Esra Erdem and Vladimir Lifschitz Semantics of normal logic programs with embedded implications Fernando Orejas, Elvira Pino, and Edelmira Pasarella A Multi-Adjoint Logic Approach to Abductive Reasoning Jesus Medina, Manuel Ojeda-Aciego, and Peter Vojtas 18.30 Conference Dinner at the wine village of Polemi (Cypriot Night) FRIDAY 09.00 Extensions Proving correctness and completeness of normal programs - a declarative approach. Wlodzimierz Drabent and Miroslawa Milkowska An Order-sorted Resolution with Implicitly Negative Sorts Ken Kaneiwa and Satoshi Tojo Logic Programming in a Fragment of Intutionistic Temporal Linear Logic Mutsunori Banbara, Kyoung-Sun Kang, Takaharu Hirai, and Noyuki Tamura 10.30 Coffee 11.15 Databases A Logic Programming Approach to the Integration, Repairing and Querying of Inconsistent Databases G. Greco, S. Greco and E. Zumpano A Computational Model for Functional Logic Deductive Databases Jesus Manuel Almendros Jimenez, Antonio Becerra Teron and Jaime Sanchez Hernandez 12.45 Lunch 14.00 Invited Talk Alain Colmerauer (University of Marseille, France) Solving the mutiplication constraint in several approximation spaces 15.30 Coffee 17.30 Joint CP & ICLP Panel "The future of LP and CP Systems" SATURDAY (1st of December) 9.00 Workshops till 19.00. CICLOPS: Colloquium on Implementation of Constraints and Logic Programming Systems CLIMA: 2nd Workshop on Computational Logic in Multi-agent Systems CLPSE: (Constraint) Logic Programming and Software Engg. CRGD: Complex Reasoning on Geographical Data RCoRP'01: 3rd Workshop on Rule-based Constraint Reasoning and Programming SAVE'01: Specificatin, Analysis, and Validation for Emerging Technologies in Computational Logic WLPE'01: 11th Workshop on Logic Programming Environments SUNDAY Excursions to the Akamas Nature Reserve (Optional - Not included in the Registration Fee) From stephen_han@REDACTED Mon Oct 22 18:55:29 2001 From: stephen_han@REDACTED (stephen_han@REDACTED) Date: Mon, 22 Oct 2001 09:55:29 -0700 Subject: What happen to etk? Message-ID: <88256AED.005C6D2A.00@notes.centigram.com> What is the alternative gui interface for that? Is it GS? Does it give us same performance? regards, |--------+-----------------------> | | Kent Boortz | | | | | | | | | 2001-10-19 | | | 05:55 PM | | | | |--------+-----------------------> >------------------------------------------------| | | | To: stephen_han@REDACTED | | cc: erlang-questions@REDACTED, | | (bcc: Stephen Han/US/Centigram) | | Subject: Re: What happen to etk? | >------------------------------------------------| stephen_han@REDACTED writes: > Currently I installed R8B. I notice that etk is gone!! > What happen to etk? It was removed for several reasons. Etk was never a supported Erlang application and we felt that there is now a more interesting alternative, Erlang/Gtk. http://sourceforge.net/projects/erlgtk/ But if there is still interest in etk we may make it available in the www.erlang.org contribution area, kent From bjorn@REDACTED Mon Oct 22 19:23:33 2001 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 22 Oct 2001 19:23:33 +0200 Subject: Graphical UI In-Reply-To: "Vlad Dumitrescu"'s message of "Mon, 22 Oct 2001 10:51:37 +0200" References: Message-ID: "Vlad Dumitrescu" writes: > Hi everyone, > > I've been playing with the new Wings application and it's very cool, and I remembered an older plan of mine, namely having a nice GUI for Erlang programs... Using OpenGL would be a nice platform independent option, but SDL has a big flaw (when relating to Erlang): it only can handle one display surface per application, and thus only one SDL window may be present per Erlang node. (This is at least true for Windows, but should hold for any OS also). Using OpenGL directly requires a way to create a top-level window from the underlying OS... > > Now what I wonder is: > - has anyone else give this any thought? Yes. But see below... > - is creating a binding to an UI toolkit (like for example FLTK) something anyone is working on or thinking about? There is an project to create an Erlang binding to GTK: http://sourceforge.net/projects/erlgtk/ If you only want a good interface to a GUI on Unix, erlgtk is the way to go. I don't how well erlgtk works on Windows (I haven't had time to build myself on Windows yet). Erlgtk includes an OpenGL binding, but I don't how that compares speed-wise to the OpenGL binding in ESDL. For Wings, I need a fast OpenGL binding. /Bjorn -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 +46 8 727 56 87 125 25 ?lvsj? From tony@REDACTED Mon Oct 22 23:10:21 2001 From: tony@REDACTED (Tony Rogvall) Date: Mon, 22 Oct 2001 23:10:21 +0200 Subject: Graphical UI References: Message-ID: <3BD48B3D.FE4675E9@bluetail.com> Bjorn Gustavsson wrote: > "Vlad Dumitrescu" writes: > > > I don't how well erlgtk works on Windows (I haven't had time to build myself > on Windows yet). I am not sure what is holding the Windows GTK from build a working release, but I guess they are aiming for Gtk2.0 (which solve a lot of problems, at least for me) Anyway, it is possible (and works) to build from (unstable 1.3.x) releases of Gtk. Hopefully some one that is deeply in love with both Windows and Erlang can do such a port and help me out. I can not help feeling a bit tiered when I think of the amount of work needed to set up a working development platform on a windows machine once again. ;-) The latest release of erlgtk 0.9.3 has support for - Gnome (at least some gnome gui classes) - Glade (basic gtk + some gnome) - gdk-pixbuf - gdk-imlib - opengl (still need some fixes to support Vlad's multiple display, in progress) Yesterday I discovered that erlgtk was not working with R8B-0, this was due to a new tag in the external format, and is fixed in the cvs. I will have a release 0.9.4 soon. The speed of the opengl stuff is not yet known (probably it may be a bit to slow, if not heavy use of Display Lists are adopted). I intend to develop a driver version of the erlgtk but It can wait for a while. See the examples directory in erlgtk (all:run() will fill your screen with nice looking examples :-) small note! The R8 release made it possible to access the arity of funs, this fact is used by erlgtk to allow for funs with variable number of arguments in gtk:signal_connect. This make the binding more C like, C allows the function not to receive all arguments. The old way: gtk:signal_connect(Window , 'delete_event', fun(_, _) -> gtk:main_quit() end, []). The new way: gtk:signal_connect(Window, 'delete_event', fun() -> gtk:main_quit() end) In other words, you do not need to know the signature of every event and signal there is, if you are not interested of the actual value of the argument. Normally you will have everything in the closure anyway so why match values you already have? Thanks OTP. Have Fun /Tony From kent@REDACTED Tue Oct 23 01:16:47 2001 From: kent@REDACTED (Kent Boortz) Date: 23 Oct 2001 01:16:47 +0200 Subject: What happen to etk? In-Reply-To: stephen_han@adc.com's message of "Mon, 22 Oct 2001 09:55:29 -0700" References: <88256AED.005C6D2A.00@notes.centigram.com> Message-ID: The only supported graphical toolkit was and is GS. It is more limited than etk and my guess is that it is slower than etk. If you like you can of cause still use etk. I don't know if it is incompatible with R8B but the source is in the R7 TAR ball and it should not be that hard to port it to R8B if there are any changes needed at all. Or, as I wrote, you can use Erlang/Gtk. There was a reason the etk application was in the "unsupported" part of the Erlang/OTP documentation. We don't have the man power to support that many graphical interfaces and we kind of have been waiting for customer demands or the smoke to settle in the GUI war so that we can spot the winner. As it stands right now, Tcl/Tk doesn't look like a winner. If we are to provide advanced graphical support at all. Erlang being process oriented suits well with hybrid solutions where the GUI part is written in for example Java and the logical part in Erlang. That way we do what we do best and others do what they do best. But there is a gap between GS being to limited and the starting curve using a hybrid solution so maybe something like etk or Erlang/Gtk is needed, kent stephen_han@REDACTED writes: > What is the alternative gui interface for that? > Is it GS? > > Does it give us same performance? > > regards, > >> stephen_han@REDACTED writes: >>> Currently I installed R8B. I notice that etk is gone!! >>> What happen to etk? >> >> It was removed for several reasons. Etk was never a supported Erlang >> application and we felt that there is now a more interesting >> alternative, Erlang/Gtk. >> >> http://sourceforge.net/projects/erlgtk/ >> >> But if there is still interest in etk we may make it available in the >> www.erlang.org contribution area, >> >> kent From bjorn@REDACTED Tue Oct 23 09:10:49 2001 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 23 Oct 2001 09:10:49 +0200 Subject: The Wings 3D user base is growing fast Message-ID: The users of Nendo (the modeller that inspired Wings) have found out about Wings. They like Wings. (This might be a slight understatement.) I'm now taking a few days off (from my job at OTP) to work with Wings. I will concentrate on making a plugin architecture for Wings. If you are interested in 3D graphics, have a look at the new forum for Nendo & Wings at: http://pub33.ezboard.com/bnendowingsmirai Also, there is a new Wings release at: http://www.erlang.org/project/wings /Bjorn -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 +46 8 727 56 87 125 25 ?lvsj? From etxuwig@REDACTED Tue Oct 23 11:01:05 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Tue, 23 Oct 2001 11:01:05 +0200 (MET DST) Subject: The Wings 3D user base is growing fast In-Reply-To: Message-ID: On 23 Oct 2001, Bjorn Gustavsson wrote: >The users of Nendo (the modeller that inspired Wings) have >found out about Wings. > >They like Wings. (This might be a slight understatement.) I'd say! Congratulations! (: But don't quit your day job (This is usually sort of an insult; this time it's a plea.) ;) /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From jamesh@REDACTED Tue Oct 23 15:40:55 2001 From: jamesh@REDACTED (James Hague) Date: Tue, 23 Oct 2001 08:40:55 -0500 Subject: The Wings 3D user base is growing fast Message-ID: > The users of Nendo (the modeller that inspired Wings) have > found out about Wings. > > They like Wings. (This might be a slight understatement.) Three amazing things about Wings, at least for me: 1. It's the kind of application that very few people would ever consider writing, because of the (apparent) sheer complexity of it. In Erlang it is much more approachable. 2. It's a great example of a _sequential_ Erlang application. I know, I know, Erlang is designed for distributed applications, but this program really shows off the benefits of Erlang outside of OTP. 3. 3D graphics in an interpreted language? Wow. James From pew@REDACTED Tue Oct 23 16:50:05 2001 From: pew@REDACTED (Patrik Winroth) Date: Tue, 23 Oct 2001 16:50:05 +0200 (CEST) Subject: FreeBSD 4.3 erlang behavior w. threads Message-ID: <20011023162923.W21399-100000@mas.algonet.se> Hi! I am looking into adding a few threads on my FreeBSD 4.3 based Erlang system: [patrik@REDACTED ~] erl +A8 Erlang (BEAM) emulator version 5.0.1.1.b5 [source] [threads] Eshell V5.0.1.1.b5 (abort with ^G) 1> erlang:system_info(thread_pool_size). 8 2> os:type(). {unix,freebsd} 3> os:version(). {4,3,0} 4> I am doing so mainly to avoid blocking in disk operations. Having read the archive, but not found that much information on threaded system characteristics, maybe someone has a bit of info :-) Some of the things I am thinking about: - overall system performance as a function of the number of threads. - gotchas. - stability. Regards /Patrik. -- Patrik Winroth Vindaloo AB mbl: 0709-727364 From francesco@REDACTED Wed Oct 24 12:36:54 2001 From: francesco@REDACTED (Francesco Cesarini) Date: Wed, 24 Oct 2001 11:36:54 +0100 Subject: Match Specifications Message-ID: <3BD699C5.7880E5B6@erlang-consulting.com> Hi! I got stuck with match specifications and wonder if anyone can find the error or confirm if it is a bug.. When the match specification is successful, I want to enable the tracing of all process related activities, but the flags do not seem to get activated. Other actions (Even if I have not tried all) seem to work ok. Here is the problem stripped to a bare minimum: 3> P = ping:start(). <0.37.0> 4> erlang:trace(P, true, [call]). 1 5> erlang:trace_pattern({ping,'_','_'}, [{[],[],[{enable_trace, [procs]}]}],[local]). 5 6> ping:send(P). pong 7> flush(). Shell got {trace,<0.37.0>,call,{ping,loop,[]}} ok 8> erlang:trace_info(P, flags). {flags,[call]} 9> ping:send(P). pong 10> flush(). Shell got {trace,<0.37.0>,call,{ping,loop,[]}} ok -module(ping). -export([start/0, send/1, loop/0]). start() -> spawn(ping, loop, []). send(Pid) -> Pid ! {self(), ping}, receive pong -> pong end. loop() -> receive {Pid, ping} -> spawn(crash, do_not_exist, []), Pid ! pong, loop() end. Thanks! Francesco -- http://www.erlang-consulting.com -------------- next part -------------- A non-text attachment was scrubbed... Name: francesco.vcf Type: text/x-vcard Size: 352 bytes Desc: Card for Francesco Cesarini URL: From Siri.Hansen@REDACTED Wed Oct 24 13:11:11 2001 From: Siri.Hansen@REDACTED (Siri Hansen (ETO)) Date: Wed, 24 Oct 2001 13:11:11 +0200 Subject: Match Specifications Message-ID: I don't think the parameter to enable_trace should be a list, it should rather be {enable_trace,procs} (but I didn't try). Also, you should be aware that by specifying the MatchHead as [] you implicitly say that the match spec is true only for functions with zero arguments. If you mean to hit all functions i your module ping your MatchHead should be '_'. Good luck! /siri -----Original Message----- From: Francesco Cesarini [mailto:francesco@REDACTED] Sent: Wednesday, October 24, 2001 12:37 PM To: erlang-questions@REDACTED Subject: Match Specifications Hi! I got stuck with match specifications and wonder if anyone can find the error or confirm if it is a bug.. When the match specification is successful, I want to enable the tracing of all process related activities, but the flags do not seem to get activated. Other actions (Even if I have not tried all) seem to work ok. Here is the problem stripped to a bare minimum: 3> P = ping:start(). <0.37.0> 4> erlang:trace(P, true, [call]). 1 5> erlang:trace_pattern({ping,'_','_'}, [{[],[],[{enable_trace, [procs]}]}],[local]). 5 6> ping:send(P). pong 7> flush(). Shell got {trace,<0.37.0>,call,{ping,loop,[]}} ok 8> erlang:trace_info(P, flags). {flags,[call]} 9> ping:send(P). pong 10> flush(). Shell got {trace,<0.37.0>,call,{ping,loop,[]}} ok -module(ping). -export([start/0, send/1, loop/0]). start() -> spawn(ping, loop, []). send(Pid) -> Pid ! {self(), ping}, receive pong -> pong end. loop() -> receive {Pid, ping} -> spawn(crash, do_not_exist, []), Pid ! pong, loop() end. Thanks! Francesco -- http://www.erlang-consulting.com From thomas@REDACTED Wed Oct 24 13:29:35 2001 From: thomas@REDACTED (Thomas Arts) Date: Wed, 24 Oct 2001 13:29:35 +0200 Subject: Match Specifications References: <3BD699C5.7880E5B6@erlang-consulting.com> Message-ID: <3BD6A61F.63E34779@cslab.ericsson.se> Francesco Cesarini wrote: > > Hi! > I got stuck with match specifications and wonder if anyone can find the > error or confirm if it is a bug.. When the match specification is > successful, I want to enable the tracing of all process related > activities, but the flags do not seem to get activated. Other actions > (Even if I have not tried all) seem to work ok. Here is the problem > stripped to a bare minimum: > > 3> P = ping:start(). > <0.37.0> > 4> erlang:trace(P, true, [call]). > 1 > 5> erlang:trace_pattern({ping,'_','_'}, [{[],[],[{enable_trace, > [procs]}]}],[local]). In R8b and R7b I use erlang:trace_pattern({ping,'_','_'},true,[local]). to start the tracing of this pattern. /Thomas From francesco@REDACTED Wed Oct 24 14:37:14 2001 From: francesco@REDACTED (Francesco Cesarini) Date: Wed, 24 Oct 2001 13:37:14 +0100 Subject: Match Specifications References: Message-ID: <3BD6B5F9.5316DB04@erlang-consulting.com> Siri is right.. The match specifications can only handle a flag at the time (Unlike the arguments in the bifs and dbg). The correct specification is 5> erlang:trace_pattern({ping,'_','_'}, [{[],[],[{enable_trace, procs}]}],[local]). 5 6> ping:send(P). pong 7> flush(). Shell got {trace,<0.37.0>,call,{ping,loop,[]}} ok 8> erlang:trace_info(P, flags). {flags,[procs, call]} 9> ping:send(P). pong 10> flush(). Shell got {trace,<0.37.0>,spawn, <0.40.0>,{crash,do_not_exist,[]}} Shell got {trace,<0.37.0>,call,{ping,loop,[]}} ok //Francesco "Siri Hansen (ETO)" wrote: > I don't think the parameter to enable_trace should be a list, it should rather be {enable_trace,procs} (but I didn't try). > > Also, you should be aware that by specifying the MatchHead as [] you implicitly say that the match spec is true only for functions with zero arguments. If you mean to hit all functions i your module ping your MatchHead should be '_'. > > Good luck! > > /siri > > -----Original Message----- > From: Francesco Cesarini [mailto:francesco@REDACTED] > Sent: Wednesday, October 24, 2001 12:37 PM > To: erlang-questions@REDACTED > Subject: Match Specifications > > Hi! > I got stuck with match specifications and wonder if anyone can find the > error or confirm if it is a bug.. When the match specification is > successful, I want to enable the tracing of all process related > activities, but the flags do not seem to get activated. Other actions > (Even if I have not tried all) seem to work ok. Here is the problem > stripped to a bare minimum: > > 3> P = ping:start(). > <0.37.0> > 4> erlang:trace(P, true, [call]). > 1 > 5> erlang:trace_pattern({ping,'_','_'}, [{[],[],[{enable_trace, > [procs]}]}],[local]). > 5 > 6> ping:send(P). > pong > 7> flush(). > Shell got {trace,<0.37.0>,call,{ping,loop,[]}} > ok > 8> erlang:trace_info(P, flags). > {flags,[call]} > 9> ping:send(P). > pong > 10> flush(). > Shell got {trace,<0.37.0>,call,{ping,loop,[]}} > ok > > -module(ping). > -export([start/0, send/1, loop/0]). > > start() -> > spawn(ping, loop, []). > > send(Pid) -> > Pid ! {self(), ping}, > receive > pong -> pong > end. > > loop() -> > receive > {Pid, ping} -> > spawn(crash, do_not_exist, []), > Pid ! pong, > loop() > end. > > Thanks! > Francesco > -- > http://www.erlang-consulting.com -- http://www.erlang-consulting.com -------------- next part -------------- A non-text attachment was scrubbed... Name: francesco.vcf Type: text/x-vcard Size: 352 bytes Desc: Card for Francesco Cesarini URL: From Sean.Hinde@REDACTED Wed Oct 24 18:19:21 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Wed, 24 Oct 2001 17:19:21 +0100 Subject: Match Specifications Message-ID: <402DD461F109D411977E0008C791C312039F64C6@IMP02MBX> > Francesco Cesarini wrote: > > > > Hi! > > I got stuck with match specifications Sorry to misquote :) I don't think anyone really thinks that the pattern match syntax is all that elegant though. Maybe there is scope for something cleaner for at least the subset used in ets:select. something like: A="an", M = matchfun({tab, "se" ++ A, B}) when is_integer(B) -> '$_'; ({tab, "se" ++ A, B}) -> B end, ets:select(tab, M). instead of M = [{{tab, "se" ++ A, '$1'}, [{is_integer, '$1'}], ['$_']}, {{tab, "se" ++ A, '$2'}, [], ['$2']}], ets:select(tab, M). This example isn't too bad but more complex examples get seriously unreadable to anyone not well up on syntax trees (inluding me). We could get rid of '$1', '$2' etc by letting the compiler turn unbound variables into '$1' etc internally. We'd maybe keep '$_' and '$$' as nice shortcuts for complete results. Thoughts anyone? Maybe a clever precompiler hack by someone versed in the ways of such things could deliver this? Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From francesco@REDACTED Wed Oct 24 19:10:17 2001 From: francesco@REDACTED (Francesco Cesarini) Date: Wed, 24 Oct 2001 18:10:17 +0100 Subject: Match Specifications References: <402DD461F109D411977E0008C791C312039F64C6@IMP02MBX> Message-ID: <3BD6F5F9.F1C11F56@erlang-consulting.com> I tried to be diplomatic, but as there is local backing, I guess I can openly say that, even if *extremely* powerful, they are pretty dam ugly . And believe me when I say that teaching them to testers and support engineers is not a pretty task either. They are the ones out in the field who need match specifications the most, but at the same time, among Erlang users, they are also the ones with the least software knowledge/experience. So far, since they have gotten documented, I have unfortunately only seen master programmers dare use them (And they can be counted on the fingers of one hand). A prettier, more Erlang like syntax would be very welcome, and open up Match Specifications to less experienced programmers. I am unsure if parts of it can be handled in the pre-processor, however, as just like records, it would not be possible to use them from the shell. Cheers, Francesco Sean Hinde wrote: > > Francesco Cesarini wrote: > > > > > > Hi! > > > I got stuck with match specifications > > Sorry to misquote :) I don't think anyone really thinks that the pattern > match syntax is all that elegant though. > > Maybe there is scope for something cleaner for at least the subset used in > ets:select. > > something like: > > A="an", > M = matchfun({tab, "se" ++ A, B}) when is_integer(B) -> '$_'; > ({tab, "se" ++ A, B}) -> B > end, > ets:select(tab, M). > > instead of > M = [{{tab, "se" ++ A, '$1'}, [{is_integer, '$1'}], ['$_']}, > {{tab, "se" ++ A, '$2'}, [], ['$2']}], > ets:select(tab, M). > > This example isn't too bad but more complex examples get seriously > unreadable to anyone not well up on syntax trees (inluding me). > > We could get rid of '$1', '$2' etc by letting the compiler turn unbound > variables into '$1' etc internally. We'd maybe keep '$_' and '$$' as nice > shortcuts for complete results. > > Thoughts anyone? Maybe a clever precompiler hack by someone versed in the > ways of such things could deliver this? > > Sean > > NOTICE AND DISCLAIMER: > This email (including attachments) is confidential. If you have received > this email in error please notify the sender immediately and delete this > email from your system without copying or disseminating it or placing any > reliance upon its contents. We cannot accept liability for any breaches of > confidence arising through use of email. Any opinions expressed in this > email (including attachments) are those of the author and do not necessarily > reflect our opinions. We will not accept responsibility for any commitments > made by our employees outside the scope of our business. We do not warrant > the accuracy or completeness of such information. -- http://www.erlang-consulting.com -------------- next part -------------- A non-text attachment was scrubbed... Name: francesco.vcf Type: text/x-vcard Size: 352 bytes Desc: Card for Francesco Cesarini URL: From Sean.Hinde@REDACTED Wed Oct 24 19:50:43 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Wed, 24 Oct 2001 18:50:43 +0100 Subject: Match Specifications Message-ID: <402DD461F109D411977E0008C791C312039F64CD@IMP02MBX> > A prettier, more Erlang like syntax would be very welcome, > and open up Match > Specifications to less experienced programmers. I am unsure > if parts of it can > be handled in the pre-processor, however, as just like > records, it would not be > possible to use them from the shell. Yes, I just played with the parse transform stuff and it seems you have to have erlang syntax already. I guess all the weird mnemosyne stuff is handled by the main parser before it gets to parse transform. I guess it'd be possible to do something like: match_spec:make("fun('$1') when is_integer('$1') -> '$$' end."). [{'$1', [{is_integer, '$1'}], ['$$']}] but I agree it's nowhere near as nice as something really builtin. Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From martin@REDACTED Thu Oct 25 00:39:05 2001 From: martin@REDACTED (Martin J. Logan) Date: Wed, 24 Oct 2001 17:39:05 -0500 Subject: Mnesia Traffic References: <3BD699C5.7880E5B6@erlang-consulting.com> Message-ID: <3BD74309.5E008848@vailsys.com> > Hello, I know in previous releases of erlang that if I have a group of nodes all running mnesia and replicating that they each talk to every other node on the network. This is a concern of the project manager that is responsable for giving erlang a yes or a no. He is worried about network traffic. Erlang seems to be the perfect choice for this project otherwise. Does anyone know of a way around this all talk to all others behavior? I had read that developers were aware of this issue and were working on ways of altering this behavior. Has this happend? Basically I am looking for an explanation to give to the manager that would satisfy his concerns about increased network traffic and thus allow erlang to be used. Thank you, Martin Logan Vail Systems From erik@REDACTED Thu Oct 25 01:35:14 2001 From: erik@REDACTED (Erik Pearson) Date: Wed, 24 Oct 2001 16:35:14 -0700 Subject: Nothingness Message-ID: <3BD75032.7060606@adaptations.com> Hi, I'm now hip-deep into my first Erlang project. It has been exciting, and very productive. I have encountered issues, of course. The application is very data-centric -- analyzing tab delimited and fixed-column-width tables, importing them into mnesia tables, and subsequently using these tables for lots of stuff. One of the immediate issues I ran up against was how to represent missing data -- that which would be representated in an SQL database as NULL. The data flows like this: Text File -> List of field values -> Tuple of field values -> Record -> Mnesia table When missing data is detected in the external data, I'd like to explicitly represent it as some value in Erlang. I'm currently using an atom 'nil', since it happens to be distinct from any data that might be encountered. However, I'd like to use atoms to represent external data in some cases, and am uncomfortable with the method I've chosen for NULL representation. It also seems inefficient. The dataset is large and all those 'nil' atoms (which I could reduce to '') will add up. It would seem that a very "Erlangish" way would be to tag all the data, like na for missing data {value, MyValue} for actual data This lets one easily separate values from non-values without any worry about 'nil' stepping on one's toes. However, this seems at first blush inefficient and cumbersome. Is this true? Perhaps atoms are stored very efficiently? (Of course, the tag atoms could be made shorter as well) It seems to me that the one solution would be a new disjoint datatype which represents the null value, and which has only one value "null". The null value could be assigned by a primitive null(), values could be tested for nullness with null(Value), and could be stored efficiently. Thoughts? Thanks in advance, Erik Pearson From Sean.Hinde@REDACTED Thu Oct 25 02:44:36 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Thu, 25 Oct 2001 01:44:36 +0100 Subject: Mnesia Traffic Message-ID: <402DD461F109D411977E0008C791C312039F64CE@IMP02MBX> > Hello, > I know in previous releases of erlang that if I have a group > of nodes all > running mnesia and replicating that they each talk to every > other node on > the network. This is a concern of the project manager that is > responsable > for giving erlang a yes or a no. He is worried about network traffic. In the quiet state when there are no updates to replicated tables the only traffic between mnesia nodes is the normal periodic 'ping' every 45 seconds or so. I'd be very surprised if this was even measurable in terms of LAN usage. If you have lots of replicated tables and are doing lots of updates then the traffic will be pretty much proportional to the volume of updates. > Erlang seems to be the perfect choice for this project otherwise. Does > anyone know of a way around this all talk to all others > behavior? You also have the option to set up erlang nodes with their own standalone mnesia instances which will not talk to each other at all - simply create a schema on the local node only: mnesia:create_schema([node()]). We run quite a number of Erlang nodes in our office environment and have not come across any problems. I hope this helps Rgds, Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From Sean.Hinde@REDACTED Thu Oct 25 02:50:18 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Thu, 25 Oct 2001 01:50:18 +0100 Subject: Nothingness Message-ID: <402DD461F109D411977E0008C791C312039F64CF@IMP02MBX> > Hi, > > I'm now hip-deep into my first Erlang project. It has been > exciting, and > very productive. Good isn't it! > One of the immediate issues I ran up > against was how > to represent missing data -- that which would be > representated in an SQL > database as NULL. I tend to use the empty list [] to represent null data. It is stored extremely efficiently as it has it's own special tag value. Your only problem is to distinguish it from the empty string.. Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From Sean.Hinde@REDACTED Thu Oct 25 03:13:55 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Thu, 25 Oct 2001 02:13:55 +0100 Subject: Select syntax parse transform Message-ID: <402DD461F109D411977E0008C791C312039F64D0@IMP02MBX> Hi all, Well, I've had a go at a parse transform for the match syntax stuff. It seems to work on some small test programs.. The idea is that in one of the standard select statements (ets:select/2,3, mnesia:select/2,3, ets:test_ms/2) you can use a fun like syntax rather than the standard select syntax. e.g. -module(test). -compile({parse_transform,match_id_trans}). -compile(export_all). main() -> ets:test_ms({1,2}, fun({'$1','$2'}) when '$1' + '$2' == 3, is_integer('$1') -> '$1' + '$2' end). main2() -> A="se", ets:test_ms({"sean",2}, fun({A++"en",'$2'}) -> '$_' end). You can also have multiple function headers in your fun like: fun({A++"an",'$2'}) -> '$_'; ({1,2}) -> ok end It is a hack of erl_id_trans. I didn't bother with trying to ensure that only guard functions are used as the final syntax is checked at runtime anyway. I'm pretty sure there will be bugs (well it is rather late - that's my excuse anyway!) Sorry Francesco - no support for your tracing problems.. though a bit of erl_scan and erl_parse might make a neat transform function Hmmm. Sean ---------------------------------------------------------------------------- --- -module(match_id_trans). %% A identity transformer of Erlang abstract syntax. %% This module only traverses legal Erlang code. This is most noticeable %% in guards where only a limited number of expressions are allowed. %% N.B. if this module is to be used as a basis for tranforms then %% all the error cases must be handled otherwise this module just crashes! %% Modified by Sean Hinde to do parse transforms for select syntax %%e.g. ets:select(tab, fun({'$1', '$2'}) when is_integer('$1') -> %% '$_' %% end). %%-compile([export_all]). -export([parse_transform/2]). parse_transform(Forms, Options) -> forms(Forms). %% forms(Fs) -> lists:map(fun (F) -> form(F) end, Fs). forms([F0|Fs0]) -> F1 = form(F0), Fs1 = forms(Fs0), [F1|Fs1]; forms([]) -> []. form({function,Line,Name0,Arity0,Clauses0}) -> {Name,Arity,Clauses} = function(Name0, Arity0, Clauses0), {function,Line,Name,Arity,Clauses}; form(Else) -> Else. function(Name, Arity, Clauses0) -> Clauses1 = clauses0(Clauses0), {Name,Arity,Clauses1}. clauses0([C0|Cs]) -> C1 = clause0(C0), [C1|clauses0(Cs)]; clauses0([]) -> []. clause0({clause,Line,H0,G0,B0}) -> B1 = exprs0(B0), {clause,Line,H0,G0,B1}. %% -type exprs([Expression]) -> [Expression]. %% These expressions are processed "sequentially" for purposes of variable %% definition etc. exprs0([E0|Es]) -> E1 = expr0(E0), [E1|exprs0(Es)]; exprs0([]) -> []. %% -type expr(Expression) -> Expression. expr0({call,Line,F0,As0}) -> case is_select_call(F0, length(As0)) of true -> select_trans(Line, F0, As0); false -> {call,Line,F0,As0} end; expr0(Else) -> Else. is_select_call({remote, _, {atom, _, M}, {atom, _, F}}, A) -> is_select_call1(M,F,A); is_select_call(_, _) -> false. % 2nd arg is always the match spec which is nice for us is_select_call1(ets, select, 2) -> true; is_select_call1(ets, select, 3) -> true; is_select_call1(ets, test_ms, 2) -> true; is_select_call1(mnesia, dirty_select, 2) -> true; is_select_call1(mnesia, select, 2) -> true; is_select_call1(mnesia, select, 3) -> true; is_select_call1(_, _, _) -> false. % first check if it looks like a normal select syntax.. select_trans(Line, F0, [A1, {cons, L, H, T}|T1]) -> {call,Line,F0,[A1, {cons, L, H, T}|T1]}; select_trans(Line, F0, [A1, Fun|T]) -> Sel = fun_to_sel(Fun), {call,Line,F0,[A1, Sel|T]}. fun_to_sel({'fun', Line, {clauses, Cs}}) -> fun_clauses(Cs). fun_clauses([{clause,Line,[H0],G0,B0}|Cs]) -> G1 = if G0 == [] -> []; true -> hd(G0) end, G2 = guard(G1), B1 = guard(B0), {cons, Line, {tuple, Line, [H0,G2,B1]}, fun_clauses(Cs)}; fun_clauses([]) -> {nil, 23}. % can only have simple guard tests, not compound (e.g is_integer(A);A=1) guard([G0|Gs]) -> {Line, G1} = guard_test(G0), {cons, Line, G1, guard(Gs)}; guard([]) -> {nil, 1}. %% -type guard_test(GuardTest) -> GuardTest. %% All function calls here must be type tests and only comparison %% operators are allowed here! Note record/2 tests are special and %% will be expanded later. guard_test({atom,Line,Atom}) -> {Line, {atom,Line,Atom}}; guard_test({call,Line,{atom,La,F},[As0]}) -> As1 = gexpr(As0), {Line,{tuple, Line, [{atom,La,F},As1]}}; guard_test({op,Line,Op,L0,R0}) -> L1 = gexpr(L0), R1 = gexpr(R0), %They see the same variables {Line,{tuple, Line, [{atom, Line, Op},L1,R1]}}. %% -type gexpr(GuardExpr) -> GuardExpr. gexpr({call,Line,{atom,La,F},As0}) -> As1 = gexpr_list(As0), {tuple,Line,{atom,La,F},As1}; gexpr({op,Line,Op,A0}) -> A1 = gexpr(A0), {tuple,Line,[{atom, Line, Op},A1]}; gexpr({op,Line,Op,L0,R0}) -> L1 = gexpr(L0), R1 = gexpr(R0), %They see the same variables {tuple,Line,[{atom, Line, Op},L1,R1]}; gexpr(Else) -> Else. %% -type gexpr_list([GuardExpr]) -> [GuardExpr]. %% These expressions are processed "in parallel" for purposes of variable %% definition etc. gexpr_list([E0|Es]) -> E1 = gexpr(E0), [E1|gexpr_list(Es)]; gexpr_list([]) -> []. NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From hal@REDACTED Thu Oct 25 06:35:07 2001 From: hal@REDACTED (Hal Snyder) Date: 24 Oct 2001 23:35:07 -0500 Subject: Erlang and IPv6 In-Reply-To: <39D1F33E.3EED6774@bluetail.com> References: <39D1F33E.3EED6774@bluetail.com> Message-ID: <87lmi0qqv8.fsf@ghidra.vail> Tony Rogvall writes: > Erlang DO support IPv6 and has done so for several year. We even had > the FIRST web server running on the IPv6 test network :-) > > The status is that the OTP group does not update the ipv6 modules > since there are no real request for it. But here is the updated > modules you need for running R7 on top of IPv6. > > To run distributed erlang on IPv6 you write: erl -[s]name > -proto_dist inet6_tcp > > To use ipv6 for gen_tcp in a "normal" system you write > gen_tcp:connect(IP, Port, [{tcp_module,inet6_tcp} | Opts]). > > Or you set the default tcp_module in your local .inetrc file (I do > not think this feature is documented) > > All of this stuff of course requires a kernel that supports IPv6 ! ... (groovy IPv6 stuff followed) ... Just wondering - has anyone looked into R8 support for IPv6? Using NetBSD/OpenBSD/FreeBSD so kernel is good to go. From eleberg@REDACTED Thu Oct 25 06:57:46 2001 From: eleberg@REDACTED (Bengt Kleberg) Date: Thu, 25 Oct 2001 06:57:46 +0200 (MET DST) Subject: Match Specifications Message-ID: <200110250457.GAA12267@etxb.ericsson.se> > Date: Wed, 24 Oct 2001 18:10:17 +0100 > From: Francesco Cesarini > X-Accept-Language: en-GB,en > MIME-Version: 1.0 > To: Sean Hinde > CC: erlang-questions@REDACTED > Subject: Re: Match Specifications ...deleted > A prettier, more Erlang like syntax would be very welcome, and open up Match > Specifications to less experienced programmers. I am unsure if parts of it can > be handled in the pre-processor, however, as just like records, it would not be > possible to use them from the shell. IMHO it would be better to not use epp, as much as posible. bengt From eleberg@REDACTED Thu Oct 25 07:41:06 2001 From: eleberg@REDACTED (Bengt Kleberg) Date: Thu, 25 Oct 2001 07:41:06 +0200 (MET DST) Subject: Nothingness Message-ID: <200110250541.HAA12929@etxb.ericsson.se> > Date: Wed, 24 Oct 2001 16:35:14 -0700 > From: Erik Pearson ...deleted > However, this seems at first blush inefficient and cumbersome. Is this > true? Perhaps atoms are stored very efficiently? (Of course, the tag > atoms could be made shorter as well) Atoms are stored efficiently. Atoms use the same space independent upon their length. > > It seems to me that the one solution would be a new disjoint datatype > which represents the null value, and which has only one value "null". > The null value could be assigned by a primitive null(), values could be > tested for nullness with null(Value), and could be stored efficiently. > It would still be impossible to know if you have stored 'null' in the database or if you only want to show that this location is empty. There are (atleast) 2 ways of doing it: 1 Settle upon something (small) that you will never want to store (say: undefined, nil, null, false, [], ...) and use this to indicate an empty location. 2 Use the scheme you suggested ({value, Value}|undefined) since that way you can differentiate between having stored undefined ({value, undefined}) and having an empty location (undefined). bengt From vances@REDACTED Thu Oct 25 07:55:19 2001 From: vances@REDACTED (Vance Shipley) Date: Thu, 25 Oct 2001 01:55:19 -0400 Subject: Mnesia Traffic In-Reply-To: <3BD74309.5E008848@vailsys.com> Message-ID: Martin, You probably want to look at the new R8 feature for hidden nodes. >From the R8 release notes: Kernel Hidden Erlang nodes and hidden global groups have been introduced. This makes it possible to establish hidden connections between Erlang nodes. See global_group(3) and erl(1). The distribution mechanisms are generally improved to meet demands for larger networks of distributed Erlang nodes. There was a thread on the list in April starting here: http://www.erlang.org/ml-archive/erlang-questions/200104/msg00065.html -Vance Vance Shipley Motivity Telecom Inc. +1 519 579 5816 Martin J. Logan writes: > > I know in previous releases of erlang that if I have a group of nodes all > running mnesia and replicating that they each talk to every other node on > the network. This is a concern of the project manager that is responsable > for giving erlang a yes or a no. He is worried about network traffic. > Erlang seems to be the perfect choice for this project otherwise. Does > anyone know of a way around this all talk to all others behavior? I had > read that developers were aware of this issue and were working on ways of > altering this behavior. Has this happend? Basically I am looking for an > explanation to give to the manager that would satisfy his concerns about > increased network traffic and thus allow erlang to be used. > Thank you, > Martin Logan > Vail Systems From Sysop@REDACTED Tue Oct 23 20:12:38 2001 From: Sysop@REDACTED (Sysop@REDACTED) Date: 23 Oct 2001 14:12:38 EDT Subject: HaveFun: You Work Too hard Message-ID: <200110250701.f9P71Ax10288@hades.cslab.ericsson.net> You Work Too hard, Have Fun at www.Ottawalive.com It's FREE From mickael.remond@REDACTED Thu Oct 25 09:28:04 2001 From: mickael.remond@REDACTED (Mickael Remond) Date: Thu, 25 Oct 2001 09:28:04 +0200 Subject: What happen to etk? In-Reply-To: References: <88256AED.005C6D2A.00@notes.centigram.com> Message-ID: <20011025092804.C2016@erlang-fr.org> Kent Boortz (kent@REDACTED) wrote: > [...] > Or, as I wrote, you can use Erlang/Gtk. Is there a chance that Erlang/Gtk become supported in the official release of Erlang/OTP ? Erlang/Gtk is nice but the problem is that installation on Windows is not trivial. When writing an application in Erlang, the OS does not matter. It it thus important to be sure that the application can be run both on Windows and the various flavour of Unix. To reach this point, the best solution would be to integrate the UI toolkit into the Erlang release. Just my thoughts. -- Micka?l R?mond http://www.erlang-fr.org/ From etxuwig@REDACTED Thu Oct 25 10:24:52 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Thu, 25 Oct 2001 10:24:52 +0200 (MET DST) Subject: Nothingness In-Reply-To: <3BD75032.7060606@adaptations.com> Message-ID: On Wed, 24 Oct 2001, Erik Pearson wrote: >Hi, > >I'm now hip-deep into my first Erlang project. It has been exciting, and >very productive. > >I have encountered issues, of course. The application is very >data-centric -- analyzing tab delimited and fixed-column-width tables, >importing them into mnesia tables, and subsequently using these tables >for lots of stuff. You might want to look at the RDBMS contrib. It has, for one thing, an import facility for a sort of tab-delimited text files. It also has its own weird definition of a null value: '#.[].#' It's sort of an Erlang tradition to invent an atom that no sane user would want to input. Atoms are stored very efficiently in RAM, but on disk, you should expect them to expand to strings. >It seems to me that the one solution would be a new disjoint >datatype which represents the null value, and which has only >one value "null". The null value could be assigned by a >primitive null(), values could be tested for nullness with >null(Value), and could be stored efficiently. I believe it is generally accepted that any proper null handling must be done in the underlying runtime architecture -- not in the application. Erlang should have a proper NULL representation, and probably also infinity and negative infinity. In some applications, I've stored data internally wrapped inside a tuple, e.g. {X}. The null value could then safely be represented as e.g. {} or null, as it cannot be confused with a legal value. The interesting twist to this is that you can also use the Erlang ordering rules to represent infinity and negative infinity: If {} ::= NULL, [] ::= infinity, '-infinity' ::= -(infinity), then: '-infinity' < {X} < [] for all X, and {} <> {X} (of course, and also {} < {X}, but strictly speaking, this is irrelevant, as NULL has no useful ordering.) /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From hakan@REDACTED Thu Oct 25 10:39:10 2001 From: hakan@REDACTED (Hakan Mattsson) Date: Thu, 25 Oct 2001 10:39:10 +0200 (MEST) Subject: Nothingness In-Reply-To: <200110250541.HAA12929@etxb.ericsson.se> Message-ID: On Thu, 25 Oct 2001, Bengt Kleberg wrote: Bengt> > Date: Wed, 24 Oct 2001 16:35:14 -0700 Bengt> > From: Erik Pearson Bengt> ...deleted Bengt> Bengt> > However, this seems at first blush inefficient and cumbersome. Is this Bengt> > true? Perhaps atoms are stored very efficiently? (Of course, the tag Bengt> > atoms could be made shorter as well) Bengt> Bengt> Atoms are stored efficiently. Bengt> Atoms use the same space independent upon their length. This holds within an Erlang node and to some extent when atoms are sent between nodes, due to the built-in atom cache used for distributed Erlang. In the external format for atoms, the entire "name" of the atom needs to be stored as it does not suffice to store only the atom number. The internal atom numbers are only valid within one Erlang node and they may be re-calculated after node restart. The external format is used by Erlang/OTP for file storage (dets, disk_log, disk resident Mnesia tables etc.) but is also convenient for other purposes when an arbitrary Erlang term needs to be externalized. Here you can see the external size of 'undefined' vs. 'u': % erl Erlang (BEAM) emulator version 5.1 [threads:0] Eshell V5.1 (abort with ^G) 1> term_to_binary(undefined). <<131,100,0,9,117,110,100,101,102,105,110,101,100>> 2> term_to_binary(u). <<131,100,0,1,117>> 3> size(term_to_binary(undefined)). 13 4> size(term_to_binary(u)). 5 5> size(term_to_binary([])). 2 6> If you get performance problems, there are most likely other things in your program that causes the trouble and not the length of atom names. The handling of atoms in Erlang is very efficient and you should stick with mnemonic atom names. /H?kan --- H?kan Mattsson Ericsson Computer Science Laboratory http://www.ericsson.com/cslab/~hakan/ From vances@REDACTED Thu Oct 25 11:11:15 2001 From: vances@REDACTED (Vance Shipley) Date: Thu, 25 Oct 2001 05:11:15 -0400 Subject: Nothingness In-Reply-To: Message-ID: What about the fact that atoms are not garbage collected? If you are creating atoms from a text file to stick them in a database the number of unique atoms which get created over time could quite easily become large. Imagine logging the userid (e.g. vances) of each active session in a database. As they leave you remove their entry in from the database. Wouldn't this result in an ever increasing atom table? -Vance From vlad.dumitrescu@REDACTED Thu Oct 25 11:35:20 2001 From: vlad.dumitrescu@REDACTED (Vlad Dumitrescu) Date: Thu, 25 Oct 2001 11:35:20 +0200 Subject: ESDL question Message-ID: <001701c15d38$99de02a0$e7b842d5@telia.com> Hi, This question should probably go directly to Dan, but maybe others know the answer too... I have been trying to use esdl by calling gl functions from several processes, but it doesn't work... When calling gl:swapBuffers, the process just locks... Could any wiser than me look at the code? I am not really at home with OpenGL either. use ui:go() for a clean start. Thanks a lot, Vlad %%%---------------------------------------------------------------------- %%% File : ui.erl %%% Author : %%% Purpose : %%% Created : 17 Oct 2001 by %%%---------------------------------------------------------------------- -module(ui). -author('vladdu@REDACTED'). -compile(export_all). %%-export([start/0, start/1, init/2, initWin/2, initWin2/2]). -include_lib("esdl/include/sdl.hrl"). -include_lib("esdl/include/sdl_video.hrl"). -include_lib("esdl/include/sdl_keyboard.hrl"). -include_lib("esdl/include/gl.hrl"). -include_lib("esdl/include/glu.hrl"). -include_lib("esdl/include/sdl_events.hrl"). -define(DBG(Str, Args), io:format("~p/~p: " ++Str ++"~n", [?MODULE, ?LINE] ++ Args)). -define(DBG1(Str), io:format("~p/~p: " ++Str ++"~n",[?MODULE, ?LINE])). -record(state, {root=none, wrapper, surface}). -define(set_wrapper(X), put(sdlwrapper, X)). -define(get_wrapper(), element(1, get(sdlwrapper))). go() -> Q=start(), W=initWin(600,400), Q!{root,W}, W!start. start() -> spawn(ui, init, [[]]). start(Mode) when list(Mode) -> spawn(ui, init, [Mode]); start(_) -> error. init(Mode) -> register(ui, self()), Wrapper = sdl:init(?SDL_INIT_VIDEO bor ?SDL_INIT_ERLDRIVER), sdl_events:eventState(?SDL_ALLEVENTS ,?SDL_ENABLE), sdl_keyboard:enableKeyRepeat(100, 40), sdl_mouse:showCursor(false), Flags = case lists:member(fullscreen, Mode) of false -> ?SDL_OPENGL bor ?SDL_RESIZABLE; _ -> ?SDL_OPENGL bor ?SDL_FULLSCREEN end, sdl_video:gl_setAttribute(?SDL_GL_DOUBLEBUFFER, 1), R = sdl_video:setVideoMode(640, 480, 16, Flags), loop(#state{wrapper=Wrapper, surface=R}). loop(State) -> receive {root, Desktop} -> loop(State#state{root=Desktop}); {wrapper, Pid} -> Pid ! {wrapper, State#state.wrapper}, loop(State); Msg -> %%io:format("cmd: ~p ~n", [Msg]), loop(State) after 1 -> {_,Evs} = sdl_events:peepEvents(1, ?SDL_GETEVENT, ?SDL_ALLEVENTS), if length(Evs) == 1 -> %%io:format("event: ~p ~n", [hd(Evs)]), if pid(State#state.root) -> State#state.root ! hd(Evs); true -> true end, case hd(Evs) of #quit{} -> quit(); _ -> ok end; true ->true end, loop(State) end. quit() -> ?DBG1("quitting..."), sdl:quit(), exit(normal). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% initWin(W, H) -> spawn(ui, initWin2, [W, H]). initWin2(W, H) -> ui ! {wrapper, self()}, receive {wrapper, Wrap} -> ?set_wrapper(Wrap), true end, receive start -> true end, sdl_mouse:showCursor(true), gl:viewport(0, 0, W-1, H-1), gl:clearColor(0.0, 0.0, 0.0, 0.0), gl:clearDepth(1.0), gl:depthFunc(?GL_LESS), gl:enable(?GL_DEPTH_TEST), gl:shadeModel(?GL_SMOOTH), gl:matrixMode(?GL_PROJECTION), gl:loadIdentity(), glu:perspective(45.0, W / H, 0.1, 100.0), gl:matrixMode(?GL_MODELVIEW), gl:blendFunc(?GL_SRC_ALPHA, ?GL_ONE_MINUS_SRC_ALPHA), gl:clearColor(0, 0, 0, 1), %%gl:swapBuffers(), loop_event(). drawscene() -> gl:matrixMode(?GL_MODELVIEW), gl:clear(?GL_COLOR_BUFFER_BIT bor ?GL_DEPTH_BUFFER_BIT), gl:loadIdentity(), gl:translatef(0.0, 0.0, -6.0), gl:'begin'(?GL_QUADS), gl:color3f(0,1,0), gl:vertex3f(1.0, 0.0, 0.0), gl:color3f(1, 1,1), gl:vertex3f(1.0, 1.0, 0.0), gl:vertex3f(0.0, 1.0, 0.0), gl:color3f(1,0,0), gl:vertex3f(0.0, 0.0, 0.0), gl:'end'(), gl:'begin'(?GL_QUADS), gl:color3f(0,1,1), gl:vertex3f(1.5, 0.5, -1.0), gl:color3f(1, 1,1), gl:vertex3f(1.5, 1.5, -1.0), gl:vertex3f(0.5, 1.5, -1.0), gl:color3f(1,0,1), gl:vertex3f(0.5, 0.5, -1.0), gl:'end'(), gl:swapBuffers(), true. loop_event() -> receive {'EXIT', Pid, R} -> io:format("Error Pid ~p died with reason ~p ~n", [Pid, R]), quit; #quit{} -> ?DBG1("quit root"), quit; Else -> io:format("got: ~p ~n", [Else]), drawscene(), loop_event() % after 0 -> % %%io:format("Jerky?? Your opengl card is probably too slow ~n", []), % loop_event() end. From erik@REDACTED Thu Oct 25 12:18:10 2001 From: erik@REDACTED (Erik Pearson) Date: Thu, 25 Oct 2001 03:18:10 -0700 Subject: Nothingness In-Reply-To: References: Message-ID: <13222083.1003979890@216-101-171-203.adaptations.com> I was in the midst of running tests using various schemes of representing null and using tagged values when I saw Hakan's message which explained that Erlang stores these values as via term_to_binary That pretty much made the tests moot. Still, the results are perhaps interesting. I used a a test table of 1000 rows, 95 elements, mostly nulls. type value mnesia file size % binary size ------------------------------------------ atom nil 599K 100 7 atom '' 389K 64 4 list [] 250K 42 2 tuple {} 319K 53 3 using a combination of [] for null and {v, Value} for a real value: 398K 66 how about [] for null and {Value} for a value? 299K 50 Using [] to represent nulls is the most efficient, space-wise. As to the argument that [] can be mixed up with an empty string (or any empty list for that matter) -- that was my first prejudice as well. For myself, I attribute it to DBMS and Java-think. Many (most) database systems distinguish between the empty string and the null value, as do programming languages -- and of course there is a big difference in Java, C, etc between a null value and an empty string (or whatever). However it could be argued that there really is no real-life distinction between the empty list (also called, confusingly, nil in Erlang although I haven't found a context in which [] can be referred to as nil) and the absense of information. After all, an empty list means "no things", which is nothing! To put it another way, if there are no herrings in your net, do you have an empty net of herrings, an empty net, or nothing at all? For the purpose of the activity, I don't think the difference matters at all. No fish is no fish -- it is also no crabs, no seaweed, no old boots. (In some sense, the empty net is something -- it represents the capability of collecting fish -- or crabs or boots.) Back to Erlang -- If we use [] to represent missing data, then if a value of [] is found for an element of a record, we can deduce that there are no instances of whatever that element would otherwise hold. To do this we have to say that [] is not a valid value of any Erlang data type (unless we invent one, say called nil, which has one value, []): for all non-list values this is safe since [] is disjoint, type-wise, with them for lists, we just say that [] does not represent an empty _list_, just that it represents nothingness. E.g., there is no such thing as an empty string -- this is just a fancy way of saying the string does not exist. Of course, in the context of working with lists, an algorithm is free to treat [] as an empty list. Hmmm, but what about the empty tuple or empty record? Well, in my case I'm just talking about dealing with mnesia tables and how to put missing data into record elements which are then inserted into the table, so I think this is adequate. I'd better get to sleep before I keep babbling! Erik. --On Thursday, October 25, 2001 10:24 AM +0200 Ulf Wiger wrote: > On Wed, 24 Oct 2001, Erik Pearson wrote: > >> Hi, >> >> I'm now hip-deep into my first Erlang project. It has been exciting, and >> very productive. >> >> I have encountered issues, of course. The application is very >> data-centric -- analyzing tab delimited and fixed-column-width tables, >> importing them into mnesia tables, and subsequently using these tables >> for lots of stuff. > > You might want to look at the RDBMS contrib. It has, for one > thing, an import facility for a sort of tab-delimited text files. > It also has its own weird definition of a null value: '#.[].#' > It's sort of an Erlang tradition to invent an atom that no sane > user would want to input. > > Atoms are stored very efficiently in RAM, but on disk, you should > expect them to expand to strings. > > >> It seems to me that the one solution would be a new disjoint >> datatype which represents the null value, and which has only >> one value "null". The null value could be assigned by a >> primitive null(), values could be tested for nullness with >> null(Value), and could be stored efficiently. > > I believe it is generally accepted that any proper null handling > must be done in the underlying runtime architecture -- not in the > application. Erlang should have a proper NULL representation, and > probably also infinity and negative infinity. > > In some applications, I've stored data internally wrapped inside > a tuple, e.g. {X}. The null value could then safely be > represented as e.g. {} or null, as it cannot be confused with a > legal value. The interesting twist to this is that you can also > use the Erlang ordering rules to represent infinity and negative > infinity: > > If {} ::= NULL, [] ::= infinity, '-infinity' ::= -(infinity), > then: > > '-infinity' < {X} < [] for all X, and > {} <> {X} (of course, and also {} < {X}, but strictly speaking, > this is irrelevant, as NULL has no useful ordering.) > > /Uffe > -- > Ulf Wiger tfn: +46 8 719 81 95 > Senior System Architect mob: +46 70 519 81 95 > Strategic Product & System Management ATM Multiservice Networks > Data Backbone & Optical Services Division Ericsson Telecom AB > Erik Pearson @ Adaptations email : erik@REDACTED voice/fax : +1 510 527 5437 text page : page.erik@REDACTED From Erik.Reitsma@REDACTED Thu Oct 25 14:41:56 2001 From: Erik.Reitsma@REDACTED (Erik Reitsma (ELN)) Date: Thu, 25 Oct 2001 14:41:56 +0200 Subject: Nothingness (Off topic by now...) Message-ID: > To put it another way, if there are no herrings in your net, > do you have > an > empty net of herrings, an empty net, or nothing at all? For > the purpose > of > the activity, I don't think the difference matters at all. No > fish is no > > fish -- it is also no crabs, no seaweed, no old boots. (In some sense, > the > empty net is something -- it represents the capability of collecting > fish > -- or crabs or boots.) A set is an abstract concept, and something that is a set can be manipulated in different ways: union, difference, conjunction, etc. This is clearly different from e.g. a number, for which other operations are defined. The problem is, that NULL is neither, or perhaps a special kind of both... But NULL (which would be: nothing whatsoever) is mathematically different from an empty set (which is at least something: a set, on which you can perform set operations). Being a mathematician (whatever that means) I would like NULL to be banned. But who listens to mathematicians nowadays? > Back to Erlang -- I think that NULL comes from pointer-oriented languages: we have a pointer, but nothing to point at. Or, in a database: we have some space here, (e.g. in a table cell) but nothing in it. I think that the pointer issue is not valid in Erlang: no pointers! So we are left with the empty space. Databases use a special symbol to indicate that a space is empty. In Erlang we could put a set (i.e. a list) in every "space", with zero or one elements. Then [] is a place holder, and [X] is a value. In this case, every space is occupied by a set of values. This means, that we put everything into a "net", and we always talk about nets, and the net can be empty. I never missed NULL in Erlang, I could always found a suitable atom to occupy some "empty" space. *Erik. From Sean.Hinde@REDACTED Thu Oct 25 17:51:11 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Thu, 25 Oct 2001 16:51:11 +0100 Subject: Select syntax parse transform Message-ID: <402DD461F109D411977E0008C791C312039F64D4@IMP02MBX> > Hi all, > > Well, I've had a go at a parse transform for the match syntax > stuff. It > seems to work on some small test programs.. Though there was at least one bug ;) If anyone is interested I'll tidy it up and submit it. It'd also be nice if some compiler aware person would take a look over it and see if it is at least a reasonable stab at a parse transform and I haven't broken too many other things (especially before anyone at Ericsson uses it in some key piece of AXD :-) ). I do tend to agree that it shouldn't be needed but if something like this provides the friendly introduction to match syntax that gets people over the steep learning curve it probably jutifies the horror of epp! Maybe in the future there will be a way to incorporate match specifications into erlang code in a truly elegant and beautiful way.. I really like the mnemosyne query syntax but it has never been supported well by the runtime - maybe that is the way forward? Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From richardc@REDACTED Thu Oct 25 18:21:12 2001 From: richardc@REDACTED (Richard Carlsson) Date: Thu, 25 Oct 2001 18:21:12 +0200 (MET DST) Subject: Select syntax parse transform In-Reply-To: <402DD461F109D411977E0008C791C312039F64D4@IMP02MBX> Message-ID: On Thu, 25 Oct 2001, Sean Hinde wrote: > I do tend to agree that it shouldn't be needed but if something like > this provides the friendly introduction to match syntax that gets > people over the steep learning curve it probably jutifies the horror > of epp! Just to clarify things a bit: 'epp' is just a simple C-style (cpp-like) token-level preprocessor, i.e., it transforms the token stream before the parser sees it. (This is why it is horrible, although I admit that it is useful as long as the compiler is not clever enough.) 'epp' has nothing to do with things like parse transforms, expansion of record syntax into tuples, etc.; this is handled by the compiler proper *after* parsing the token stream. This kind of transform is much "nicer" because both the input and the output are well-formed Erlang programs. /Richard Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://www.csd.uu.se/~richardc/ From christen@REDACTED Thu Oct 25 22:24:41 2001 From: christen@REDACTED (Niels Christensen) Date: Thu, 25 Oct 2001 13:24:41 -0700 (PDT) Subject: Lifting terms to string Message-ID: Hi, say I have a variable X, the values of which I'd like to convert to a string, e.g. if X=2 then I'd like to produce "2". Is there a way to do that in Erlang? What I really want is a version of io:fwrite that produces strings instead of writing to IoDevices. Thanks, Niels From etxuwig@REDACTED Thu Oct 25 22:34:34 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Thu, 25 Oct 2001 22:34:34 +0200 (MET DST) Subject: Lifting terms to string In-Reply-To: Message-ID: On Thu, 25 Oct 2001, Niels Christensen wrote: >Hi, > >say I have a variable X, the values of which >I'd like to convert to a string, e.g. if >X=2 then I'd like to produce "2". Is there a >way to do that in Erlang? > >What I really want is a version of io:fwrite that >produces strings instead of writing to IoDevices. The short answer is: io_lib:fwrite/2, which does exactly what you're asking for. You can, of course, try to optimize things a bit: to_string(X) when atom(X) -> atom_to_list(X); to_string(X) when integer(X) -> integer_to_list(X); to_string(X) -> lists:flatten(io_lib:fwrite("~w", [X])). /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From erik@REDACTED Thu Oct 25 22:53:49 2001 From: erik@REDACTED (Erik Pearson) Date: Thu, 25 Oct 2001 13:53:49 -0700 Subject: Lifting terms to string In-Reply-To: References: Message-ID: <1221443.1004018029@216-101-171-222.adaptations.com> Hi Niels, That would be io_lib:fwrite/2 Erik. --On Thursday, October 25, 2001 1:24 PM -0700 Niels Christensen wrote: > Hi, > > say I have a variable X, the values of which > I'd like to convert to a string, e.g. if > X=2 then I'd like to produce "2". Is there a > way to do that in Erlang? > > What I really want is a version of io:fwrite that > produces strings instead of writing to IoDevices. > > Thanks, > Niels > > Erik Pearson @ Adaptations email : erik@REDACTED voice/fax : +1 510 527 5437 text page : page.erik@REDACTED From R.Mascarell@REDACTED Fri Oct 26 00:07:32 2001 From: R.Mascarell@REDACTED (Rosa Mascarell Dauder) Date: Fri, 26 Oct 2001 00:07:32 +0200 Subject: Any experience...? Message-ID: <15wsey-2G6y24C@fwd00.sul.t-online.com> Just two short questions. Is OTP able to run on top of PowerPC? (I guess the answer will be that depends on the operating system... Is OTP able to run on top of OSE-Delta? Thanks for the good job all of you is doing. Best Regards / R.Mascarell From dgud@REDACTED Fri Oct 26 08:53:21 2001 From: dgud@REDACTED (Dan Gudmundsson) Date: Fri, 26 Oct 2001 08:53:21 +0200 Subject: ESDL question In-Reply-To: <001701c15d38$99de02a0$e7b842d5@telia.com> References: <001701c15d38$99de02a0$e7b842d5@telia.com> Message-ID: <15321.2145.744127.263656@gargle.gargle.HOWL> Hi Vlad You have to use sdl:init_server/1 when using multiple processes. I havn't used it for a long time so it might be broken.. /Dan Vlad Dumitrescu writes: > Hi, > > This question should probably go directly to Dan, but maybe others know the answer too... > > I have been trying to use esdl by calling gl functions from several processes, but it doesn't work... When calling gl:swapBuffers, the process just locks... Could any wiser than me look at the code? I am not really at home with OpenGL either. > > use ui:go() for a clean start. > > Thanks a lot, > Vlad > > %%%---------------------------------------------------------------------- > %%% File : ui.erl > %%% Author : > %%% Purpose : > %%% Created : 17 Oct 2001 by > %%%---------------------------------------------------------------------- > > -module(ui). > -author('vladdu@REDACTED'). > > -compile(export_all). > %%-export([start/0, start/1, init/2, initWin/2, initWin2/2]). > > -include_lib("esdl/include/sdl.hrl"). > -include_lib("esdl/include/sdl_video.hrl"). > -include_lib("esdl/include/sdl_keyboard.hrl"). > -include_lib("esdl/include/gl.hrl"). > -include_lib("esdl/include/glu.hrl"). > -include_lib("esdl/include/sdl_events.hrl"). > > -define(DBG(Str, Args), io:format("~p/~p: " ++Str ++"~n", > [?MODULE, ?LINE] ++ Args)). > -define(DBG1(Str), io:format("~p/~p: " ++Str ++"~n",[?MODULE, ?LINE])). > > -record(state, {root=none, wrapper, surface}). > > -define(set_wrapper(X), put(sdlwrapper, X)). > -define(get_wrapper(), element(1, get(sdlwrapper))). > > go() -> > Q=start(), > W=initWin(600,400), > Q!{root,W}, > W!start. > > start() -> > spawn(ui, init, [[]]). > > start(Mode) when list(Mode) -> > spawn(ui, init, [Mode]); > start(_) -> > error. > > init(Mode) -> > register(ui, self()), > > Wrapper = sdl:init(?SDL_INIT_VIDEO bor ?SDL_INIT_ERLDRIVER), > > sdl_events:eventState(?SDL_ALLEVENTS ,?SDL_ENABLE), > sdl_keyboard:enableKeyRepeat(100, 40), > sdl_mouse:showCursor(false), > > Flags = > case lists:member(fullscreen, Mode) of > false -> > ?SDL_OPENGL bor ?SDL_RESIZABLE; > _ -> > ?SDL_OPENGL bor ?SDL_FULLSCREEN > end, > sdl_video:gl_setAttribute(?SDL_GL_DOUBLEBUFFER, 1), > R = sdl_video:setVideoMode(640, 480, 16, Flags), > > loop(#state{wrapper=Wrapper, surface=R}). > > loop(State) -> > receive > {root, Desktop} -> > loop(State#state{root=Desktop}); > {wrapper, Pid} -> > Pid ! {wrapper, State#state.wrapper}, > loop(State); > Msg -> > %%io:format("cmd: ~p ~n", [Msg]), > loop(State) > after 1 -> > {_,Evs} = sdl_events:peepEvents(1, ?SDL_GETEVENT, ?SDL_ALLEVENTS), > if length(Evs) == 1 -> > %%io:format("event: ~p ~n", [hd(Evs)]), > if pid(State#state.root) -> > State#state.root ! hd(Evs); > true -> true > end, > case hd(Evs) of > #quit{} -> > quit(); > _ -> > ok > end; > true ->true > end, > loop(State) > end. > > quit() -> > ?DBG1("quitting..."), > sdl:quit(), > exit(normal). > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > initWin(W, H) -> > spawn(ui, initWin2, [W, H]). > > initWin2(W, H) -> > ui ! {wrapper, self()}, > receive > {wrapper, Wrap} -> > ?set_wrapper(Wrap), > true > end, > receive > start -> > true > end, > > sdl_mouse:showCursor(true), > > gl:viewport(0, 0, W-1, H-1), > gl:clearColor(0.0, 0.0, 0.0, 0.0), > gl:clearDepth(1.0), > gl:depthFunc(?GL_LESS), > gl:enable(?GL_DEPTH_TEST), > gl:shadeModel(?GL_SMOOTH), > > gl:matrixMode(?GL_PROJECTION), > gl:loadIdentity(), > glu:perspective(45.0, W / H, 0.1, 100.0), > > gl:matrixMode(?GL_MODELVIEW), > > gl:blendFunc(?GL_SRC_ALPHA, ?GL_ONE_MINUS_SRC_ALPHA), > gl:clearColor(0, 0, 0, 1), > > %%gl:swapBuffers(), > > loop_event(). > > drawscene() -> > gl:matrixMode(?GL_MODELVIEW), > > gl:clear(?GL_COLOR_BUFFER_BIT bor ?GL_DEPTH_BUFFER_BIT), > gl:loadIdentity(), > > gl:translatef(0.0, 0.0, -6.0), > > gl:'begin'(?GL_QUADS), > gl:color3f(0,1,0), > gl:vertex3f(1.0, 0.0, 0.0), > gl:color3f(1, 1,1), > gl:vertex3f(1.0, 1.0, 0.0), > gl:vertex3f(0.0, 1.0, 0.0), > gl:color3f(1,0,0), > gl:vertex3f(0.0, 0.0, 0.0), > gl:'end'(), > > gl:'begin'(?GL_QUADS), > gl:color3f(0,1,1), > gl:vertex3f(1.5, 0.5, -1.0), > gl:color3f(1, 1,1), > gl:vertex3f(1.5, 1.5, -1.0), > gl:vertex3f(0.5, 1.5, -1.0), > gl:color3f(1,0,1), > gl:vertex3f(0.5, 0.5, -1.0), > gl:'end'(), > > gl:swapBuffers(), > true. > > loop_event() -> > receive > {'EXIT', Pid, R} -> > io:format("Error Pid ~p died with reason ~p ~n", [Pid, R]), > quit; > #quit{} -> > ?DBG1("quit root"), > quit; > Else -> > io:format("got: ~p ~n", [Else]), > drawscene(), > loop_event() > % after 0 -> > % %%io:format("Jerky?? Your opengl card is probably too slow ~n", []), > % loop_event() > end. > > > > -- 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 peppe@REDACTED Fri Oct 26 09:58:57 2001 From: peppe@REDACTED (Peter Andersson) Date: Fri, 26 Oct 2001 09:58:57 +0200 Subject: Any experience...? References: <15wsey-2G6y24C@fwd00.sul.t-online.com> Message-ID: <3BD917C1.AF1F41C5@erix.ericsson.se> Hi Rosa, Well, you pretty much answered the first question yourself. VxWorks on PPC (603 & 860) is a supported platform, for example. And as far as I understand, building and running Open Source Erlang for Linux on PPC also works well (but it's not supported). As far as Erlang/OTP for OSE-Delta is concerned (thanks for asking ;-) I'm currently working on this here at the OTP lab. The status is that I have a prototype (Erl/OTP R8) running on the OSE 4.3.1 Soft Kernel (Solaris). At the moment I'm running tests on distribution and as soon as this is working properly, I will start porting the system to an OSE Real Time Kernel (for PPC-750). Note that I'm currently doing this mainly for evaluation purposes. It's not until I've properly performance and characteristics tested Erlang on a real time OSE kernel that we at OTP, together with interested customers, will be able to decide if it's going to be a supported product, and if so, for which hardware platform(s). Best regards /Peter Rosa Mascarell Dauder wrote: > Just two short questions. > > Is OTP able to run on top of PowerPC? (I guess the answer will be that > depends on the operating system... > > Is OTP able to run on top of OSE-Delta? > > Thanks for the good job all of you is doing. > > Best Regards / R.Mascarell From hokan.stenholm@REDACTED Sat Oct 27 00:09:20 2001 From: hokan.stenholm@REDACTED (=?ISO-8859-1?Q?H=E5kan_Stenholm?=) Date: Sat, 27 Oct 2001 00:09:20 +0200 Subject: Nothingness Message-ID: <1B0374F3-CA5E-11D5-8EC5-003065B5F8B4@telia.com> If the table is truely spares you could allways enter each field as a single database element and use the original 'table key + fieldname' as the key for this 'single field' database. This would avoid the need to use any kind of 'nil' value alltogether. From erik@REDACTED Sat Oct 27 01:02:10 2001 From: erik@REDACTED (Erik Pearson) Date: Fri, 26 Oct 2001 16:02:10 -0700 Subject: Nothingness In-Reply-To: <1B0374F3-CA5E-11D5-8EC5-003065B5F8B4@telia.com> References: <1B0374F3-CA5E-11D5-8EC5-003065B5F8B4@telia.com> Message-ID: <1058848.1004112130@216-101-171-203.adaptations.com> That is a good idea. However, in this case I'm anticipating the need to do pattern matching on multiple fields, and being able to retrieve records in a single chunk is quite nice. Also, each field would require extra storage for the "fieldname", no? Interestingly, records do support the concept of "undefined" ... Erik. --On Saturday, October 27, 2001 12:09 AM +0200 H?kan Stenholm wrote: > If the table is truely spares you could allways enter each field as a > single database element and use the original 'table key + fieldname' as > the key for this 'single field' database. This would avoid the need to > use any kind of 'nil' value alltogether. > Erik Pearson @ Adaptations email : erik@REDACTED voice/fax : +1 510 527 5437 text page : page.erik@REDACTED From vances@REDACTED Sat Oct 27 02:52:30 2001 From: vances@REDACTED (Vance Shipley) Date: Fri, 26 Oct 2001 20:52:30 -0400 Subject: Nothingness In-Reply-To: <1058848.1004112130@216-101-171-203.adaptations.com> Message-ID: > > Interestingly, records do support the concept of "undefined" ... > > Erik. -module(undef). -export([test/0]). -record(r1, {name, phone, address}). test() -> #r1{name = "Joe", phone="5551234"}. Erlang (BEAM) emulator version 5.1 [threads:0] Eshell V5.1 (abort with ^G) 1> c(undef). {ok,undef} 2> undef:test(). {r1,"Joe","5551234",undefined} -Vance From erik@REDACTED Sat Oct 27 05:03:21 2001 From: erik@REDACTED (Erik Pearson) Date: Fri, 26 Oct 2001 20:03:21 -0700 Subject: Nothingness In-Reply-To: References: Message-ID: <1929216.1004126601@216-101-171-203.adaptations.com> Or this: -module(undef). -record(undef,{x}}. -export(undef/0). undef() -> (#undef{})#undef.x. Then if you do: c("undef"). is_atom(undef:undef()). true And if you further explore, e.g. size(atom_to_binary(undef:undef())). 13 you'll find that all that is really returned is the atom 'undefined'. Not very exciting :( However, 'undefined' is used throughout the otp (over 2K occurrences in the erl source for lib) -- if you grep through the sources it is used everywhere. There is one entry in the spec for 'undefined', and it is uneventful. Alas, 'undefined' is just a regular atom, and a long one at that, so unsuitable for storage in a mnesia table. Erik. --On Friday, October 26, 2001 8:52 PM -0400 Vance Shipley wrote: >> >> Interestingly, records do support the concept of "undefined" ... >> >> Erik. > > -module(undef). > -export([test/0]). > > -record(r1, {name, phone, address}). > > test() -> > #r1{name = "Joe", phone="5551234"}. > > > Erlang (BEAM) emulator version 5.1 [threads:0] > > Eshell V5.1 (abort with ^G) > 1> c(undef). > {ok,undef} > 2> undef:test(). > {r1,"Joe","5551234",undefined} > > > > > -Vance Erik Pearson @ Adaptations email : erik@REDACTED voice/fax : +1 510 527 5437 text page : page.erik@REDACTED From vances@REDACTED Sat Oct 27 08:32:42 2001 From: vances@REDACTED (Vance Shipley) Date: Sat, 27 Oct 2001 02:32:42 -0400 Subject: More Solaris build problems Message-ID: I've now built R8B-0 on a number of systems including FreeBSD 4.4-STABLE and RedHat Linux 6.2 with no trouble at all. However I'm having problems with Solaris 7 x86. I have applied the m4 patch and my sed lives in /usr/bin/sed (as well as /usr/bin/sed, they're identical) yet still I can't compile hipe: gcc -g -O2 -I/usr/local/src/otp_src_R8B-0/erts/i386-pc-solaris2.7 -DINSTRUM ENT -DHAVE_CONFIG_H -Wall -DUSE_THREADS -D_REENTRANT -DPOSIX_THREADS -D_THRE AD_SAFE -D_POSIX_PTHREAD_SEMANTICS -DHIPE_ARCHITECTURE=x86 -Ibeam -Isys/uni x -Ii386-pc-solaris2.7 -Izlib -Ihipe -c hipe/hipe_x86_glue.S -o /usr/local/src/otp_src_R8B-0/erts/obj.instr.beam/i386-pc-solaris2.7/hipe_x86 _glue.o Assembler: aline 1 : Illegal mnemonic aline 1 : syntax error aline 6 : Illegal mnemonic aline 6 : syntax error aline 12 : Illegal mnemonic aline 12 : syntax error aline 41 : Illegal mnemonic aline 41 : syntax error aline 45 : Illegal mnemonic aline 45 : syntax error aline 92 : Illegal mnemonic aline 92 : syntax error aline 150 : Illegal mnemonic aline 150 : syntax error aline 152 : Illegal mnemonic aline 152 : syntax error aline 155 : syntax error aline 162 : Illegal mnemonic aline 162 : syntax error aline 162 : Illegal mnemonic aline 163 : Illegal mnemonic aline 163 : syntax error aline 163 : Illegal mnemonic aline 178 : syntax error aline 179 : syntax error aline 186 : Illegal mnemonic aline 186 : syntax error aline 186 : Illegal mnemonic aline 186 : Illegal mnemonic aline 186 : Illegal mnemonic aline 186 : Illegal mnemonic Too many errors - Goodbye Any help would be greatly appreciated. -Vance Vance Shipley Motivity Telecom Inc. +1 519 579 5816 From mikpe@REDACTED Sat Oct 27 11:20:37 2001 From: mikpe@REDACTED (Mikael Pettersson) Date: Sat, 27 Oct 2001 11:20:37 +0200 (MET DST) Subject: More Solaris build problems Message-ID: <200110270920.LAA29983@harpo.it.uu.se> On Sat, 27 Oct 2001 02:32:42 -0400, Vance Shipley wrote: >I've now built R8B-0 on a number of systems including >FreeBSD 4.4-STABLE and RedHat Linux 6.2 with no trouble at all. >However I'm having problems with Solaris 7 x86. > >I have applied the m4 patch and my sed lives in /usr/bin/sed >(as well as /usr/bin/sed, they're identical) yet still I can't >compile hipe: > >gcc -g -O2 -I/usr/local/src/otp_src_R8B-0/erts/i386-pc-solaris2.7 -DINSTRUM >ENT -DHAVE_CONFIG_H -Wall -DUSE_THREADS -D_REENTRANT -DPOSIX_THREADS -D_THRE >AD_SAFE -D_POSIX_PTHREAD_SEMANTICS -DHIPE_ARCHITECTURE=x86 -Ibeam -Isys/uni >x -Ii386-pc-solaris2.7 -Izlib -Ihipe -c hipe/hipe_x86_glue.S -o >/usr/local/src/otp_src_R8B-0/erts/obj.instr.beam/i386-pc-solaris2.7/hipe_x86 >_glue.o >Assembler: > aline 1 : Illegal mnemonic > aline 1 : syntax error > aline 6 : Illegal mnemonic > aline 6 : syntax error Known problem. Solaris/x86 (all versions) has a broken assembler which, to put it mildly, is unfit for human-written assembly code. So one must use the GNU assembler. To make it all work, I also had to build a custom gcc (2.95.3) which was configured "--with-gnu-as" (and perhaps also "--with-gnu-ld", I don't recall). The procedure is described in the gcc sources. Apart from this, OTP & HiPE works fine on my Solaris 8 x86 test box. /Mikael From rv@REDACTED Sat Oct 27 16:56:48 2001 From: rv@REDACTED (Robert Virding) Date: Sat, 27 Oct 2001 16:56:48 +0200 Subject: Nothingness In-Reply-To: Your message of "Fri, 26 Oct 2001 20:03:21 PDT." <1929216.1004126601@216-101-171-203.adaptations.com> Message-ID: <200110271456.f9REumH01412@erik.virding.org> Why all this? As you state at the end 'undefined' is just an atom. This means that its storage IS efficient in a mnesia table, at least for tables in memory, and the length of the atom is irrelevant. All that is stored is an atom identifier. I suppose we could have called the atom '$undefined$' or some such to make it a little more clear that this value was different. Robert Erik Pearson writes: >Or this: > >-module(undef). >-record(undef,{x}}. >-export(undef/0). >undef() -> (#undef{})#undef.x. > >Then if you do: > >c("undef"). >is_atom(undef:undef()). >true > >And if you further explore, e.g. > >size(atom_to_binary(undef:undef())). >13 > >you'll find that all that is really returned is the atom 'undefined'. Not >very exciting :( > >However, 'undefined' is used throughout the otp (over 2K occurrences in the >erl source for lib) -- if you grep through the sources it is used >everywhere. There is one entry in the spec for 'undefined', and it is >uneventful. Alas, 'undefined' is just a regular atom, and a long one at >that, so unsuitable for storage in a mnesia table. > >Erik. From rv@REDACTED Sat Oct 27 16:59:01 2001 From: rv@REDACTED (Robert Virding) Date: Sat, 27 Oct 2001 16:59:01 +0200 Subject: Nothingness In-Reply-To: Your message of "Fri, 26 Oct 2001 20:52:30 EDT." Message-ID: <200110271459.f9REx1t01426@erik.virding.org> I am pretty sure that in the manual it explicity states that the value of a record field which is not given a value when the record is created and does not have an explicit default value will have the value of the atom 'undefined'. Or least it should because this is what happens. Robert "Vance Shipley" writes: >> >> Interestingly, records do support the concept of "undefined" ... >> >> Erik. > >-module(undef). >-export([test/0]). > >-record(r1, {name, phone, address}). > >test() -> > #r1{name = "Joe", phone="5551234"}. > > >Erlang (BEAM) emulator version 5.1 [threads:0] > >Eshell V5.1 (abort with ^G) >1> c(undef). >{ok,undef} >2> undef:test(). >{r1,"Joe","5551234",undefined} From erik@REDACTED Sat Oct 27 17:43:26 2001 From: erik@REDACTED (Erik Pearson) Date: Sat, 27 Oct 2001 08:43:26 -0700 Subject: Nothingness In-Reply-To: <200110271456.f9REumH01412@erik.virding.org> References: <200110271456.f9REumH01412@erik.virding.org> Message-ID: <4672202.1004172206@216-101-171-203.adaptations.com> Aye, the rub: this is a mnesia table on disk, where atoms are stored as binaries. --On Saturday, October 27, 2001 4:56 PM +0200 Robert Virding wrote: > Why all this? > > As you state at the end 'undefined' is just an atom. This means that > its storage IS efficient in a mnesia table, at least for tables in > memory, and the length of the atom is irrelevant. All that is stored > is an atom identifier. > > I suppose we could have called the atom '$undefined$' or some such to > make it a little more clear that this value was different. That might have been helpful -- Is there a technical reason why there could not be a special type of term -- not an atom, a list, or anything else -- which means 'undefined'? It could be detectable with the function "is_undefined/1" or "is_defined/1", and set with "undefined/0"... perhaps would need its own printable representation... could have its own binary transformation... Erik. > > Robert > > Erik Pearson writes: >> Or this: >> >> -module(undef). >> -record(undef,{x}}. >> -export(undef/0). >> undef() -> (#undef{})#undef.x. >> >> Then if you do: >> >> c("undef"). >> is_atom(undef:undef()). >> true >> >> And if you further explore, e.g. >> >> size(atom_to_binary(undef:undef())). >> 13 >> >> you'll find that all that is really returned is the atom 'undefined'. >> Not very exciting :( >> >> However, 'undefined' is used throughout the otp (over 2K occurrences in >> the erl source for lib) -- if you grep through the sources it is used >> everywhere. There is one entry in the spec for 'undefined', and it is >> uneventful. Alas, 'undefined' is just a regular atom, and a long one at >> that, so unsuitable for storage in a mnesia table. >> >> Erik. Erik Pearson @ Adaptations email : erik@REDACTED voice/fax : +1 510 527 5437 text page : page.erik@REDACTED From erik@REDACTED Sat Oct 27 17:49:19 2001 From: erik@REDACTED (Erik Pearson) Date: Sat, 27 Oct 2001 08:49:19 -0700 Subject: Nothingness In-Reply-To: <200110271459.f9REx1t01426@erik.virding.org> References: <200110271459.f9REx1t01426@erik.virding.org> Message-ID: <4693444.1004172559@216-101-171-203.adaptations.com> The only indexed reference I found to "undefined" is on page 47 of the spec, which is in reference to "LIA-1 functions", and not at all in the book (concurrent programming...). It is however fully documented for the case of records in the text of the "extensions since 4.4" document. Erik. --On Saturday, October 27, 2001 4:59 PM +0200 Robert Virding wrote: > I am pretty sure that in the manual it explicity states that the value > of a record field which is not given a value when the record is > created and does not have an explicit default value will have the value > of the atom 'undefined'. > > Or least it should because this is what happens. > > Robert > > "Vance Shipley" writes: >>> >>> Interestingly, records do support the concept of "undefined" ... >>> >>> Erik. >> >> -module(undef). >> -export([test/0]). >> >> -record(r1, {name, phone, address}). >> >> test() -> >> # r1{name = "Joe", phone="5551234"}. >> >> >> Erlang (BEAM) emulator version 5.1 [threads:0] >> >> Eshell V5.1 (abort with ^G) >> 1> c(undef). >> {ok,undef} >> 2> undef:test(). >> {r1,"Joe","5551234",undefined} Erik Pearson @ Adaptations email : erik@REDACTED voice/fax : +1 510 527 5437 text page : page.erik@REDACTED From Sean.Hinde@REDACTED Mon Oct 29 17:57:57 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Mon, 29 Oct 2001 16:57:57 -0000 Subject: Forcing a driver call to use a specific thread Message-ID: <402DD461F109D411977E0008C791C312039F64EC@IMP02MBX> Hi, First off thanks to the OTP team for providing some very nice documenation to help driver writers :) I notice from the section at http://www.erlang.org/doc/r8b/erts-5.1/doc/html/erl_driver.html#driver_async that calls through the same port will always use the same driver thread. I also notice the "experimental" use of the key parameter which allows the driver writer to control which calls must use the same thread. My question is about the status of the key parameter. The document says it is reserved and must be set to NULL but there is some nice functionality behind it.. So Is this functionality likely to be finished and supported sometime soon? Or is it finished but has some limitations which may be worked around? Or is it really experimental, untested and unstable? Many thanks, Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From Sean.Hinde@REDACTED Mon Oct 29 20:16:55 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Mon, 29 Oct 2001 19:16:55 -0000 Subject: Driver init failure not detected Message-ID: <402DD461F109D411977E0008C791C312039F64F1@IMP02MBX> Hi, If I have a driver with an init function defined in the driver_entry e.g static struct driver_entry oci_driver_entry = { oci_init, oci_start, oci_stop, ... } and the oci_init function returns -1: static int oci_init(void) { return -1 } I would expect that the erl_ddll:driver_load/2 call would fail. But it returns 'ok' This is not what the documentation says.. Am I doing something wrong here or is it a bug? Thanks, Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From peter@REDACTED Mon Oct 29 22:27:51 2001 From: peter@REDACTED (Peter H|gfeldt) Date: Mon, 29 Oct 2001 22:27:51 +0100 (MET) Subject: Driver init failure not detected In-Reply-To: <402DD461F109D411977E0008C791C312039F64F1@IMP02MBX> Message-ID: The init function of struct driver_entry is not used for dynamic drivers. See erl_ddll(3) for the details. /Peter On Mon, 29 Oct 2001, Sean Hinde wrote: > Hi, > > If I have a driver with an init function defined in the driver_entry e.g > > static struct driver_entry oci_driver_entry = { > oci_init, > oci_start, > oci_stop, > ... > } > > and the oci_init function returns -1: > > static int oci_init(void) > { > return -1 > } > > I would expect that the erl_ddll:driver_load/2 call would fail. But it > returns 'ok' > > This is not what the documentation says.. > > Am I doing something wrong here or is it a bug? > > Thanks, > Sean > > > > NOTICE AND DISCLAIMER: > This email (including attachments) is confidential. If you have received > this email in error please notify the sender immediately and delete this > email from your system without copying or disseminating it or placing any > reliance upon its contents. We cannot accept liability for any breaches of > confidence arising through use of email. Any opinions expressed in this > email (including attachments) are those of the author and do not necessarily > reflect our opinions. We will not accept responsibility for any commitments > made by our employees outside the scope of our business. We do not warrant > the accuracy or completeness of such information. > > From martin@REDACTED Tue Oct 30 00:40:01 2001 From: martin@REDACTED (Martin J. Logan) Date: Mon, 29 Oct 2001 17:40:01 -0600 Subject: Mnemosyne References: Message-ID: <3BDDE8D1.39234E3A@vailsys.com> Hello, I was wondering if there exists any documentation on Mnemosyne apart from the section in the Application overview. I would like to do a query of a table but only pull out one record of any particular type from a table in which there could exist many items of each type. Does anyone know how to formulate this query? Thanks, Martin From shrogers@REDACTED Tue Oct 30 03:27:11 2001 From: shrogers@REDACTED (Steven H. Rogers) Date: Mon, 29 Oct 2001 20:27:11 -0600 Subject: Erlang/OTP and the Web Services Universe Message-ID: <3BDE0FFF.6FE3D2F5@ionet.net> The following two articles got me to thinking about where Erlang/OTP fits (or should fit) in the web services scheme of things. The first discusses Open Source strategies for countering Microsoft's attempt to take over the Web with .NET, concluding that supporting J2EE offers the best foil for .NET. The second argues that neither .NET nor ONE (J2EE+), or anything else for that matter, is likely to achieve market domination in the near future and that interoperability between different web services domains is needed. http://www.linuxdevices.com/files/misc/prasad-28oct01.html http://www.it-analysis.com/article.php?id=1731 Erlang/OTP is not mentioned in either article, but seems to be an very viable alternative, so I have a couple of questions for the Erlang/OTP community. - Is there a strategy for promoting Erlang/OTP as a general web services platform? - Are there any initiatives to support .NET and/or J2EE interoperability? Regards, Steve From jakob@REDACTED Tue Oct 30 10:21:28 2001 From: jakob@REDACTED (Jakob Cederlund =?iso-8859-1?Q?p=E5?= UAB) Date: Tue, 30 Oct 2001 10:21:28 +0100 Subject: Driver init failure not detected In-Reply-To: References: <402DD461F109D411977E0008C791C312039F64F1@IMP02MBX> Message-ID: <5.0.2.1.0.20011030094401.01f425f0@mail> At 22:27 2001-10-29 +0100, you wrote: >The init function of struct driver_entry is not used for dynamic >drivers. See erl_ddll(3) for the details. > >/Peter This is almost right, and the driver_entry.html is wrong (it's fixed now). There are pecularities in erl_ddll.html though, the handle is not used, and you don't need a null_func, NULL is fine to put in the driver_entry (from R8), etc. This will also be fixed. The truth is that init is indeed called when a dynamic driver is loaded (it is done so in the add_driver_entry function in the emulator). But the return code from init is ignored. My feeling about this is that this is wrong, and that the return code should be checked, and the emulator (or erl_ddll) should unload the driver if init returns -1. But for now it doesn't. You'll have to set some error variable and check this later on. /Jakob From jakob@REDACTED Tue Oct 30 11:47:44 2001 From: jakob@REDACTED (Jakob Cederlund =?iso-8859-1?Q?p=E5?= UAB) Date: Tue, 30 Oct 2001 11:47:44 +0100 Subject: Forcing a driver call to use a specific thread In-Reply-To: <402DD461F109D411977E0008C791C312039F64EC@IMP02MBX> Message-ID: <5.0.2.1.0.20011030105138.01f18320@mail> At 16:57 2001-10-29 +0000, Sean Hinde wrote: >Hi, > >First off thanks to the OTP team for providing some very nice documenation >to help driver writers :) Thank you, thank you! It's not perfect but it's better than no documentation at all. The driver interface in R8 was a moving target when we wrote it so some things work better than the documentation says. The key parameter in driver_async does indeed work; the efile driver depends on it. This section in the documentation is totally false: (it has been true, but it's not in R8) >"If there is a thread pool available, a thread will be used. A specific >instance of the driver always uses the same thread. If that thread is >already working, the calls will be queued up and executed in order. Using >the same thread for each driver instance ensures that the calls will be >made in sequence." The truth is that the key parameter controls the thread used; for the same value of *key, the same thread will be used. To mimic the behaviour described in the documentation do this: driver_async(myPort, (unsigned int*)&myPort, myAsyncFunc, myData) If key is left to NULL, every asynchronous call will be round-robin scheduled in the thread pool, which may result in to calls to the same driver executing in parallell or even opposite order. (I thought the original behaviour was better, but the efile driver uses the file descriptor as key, so that two fdopen on the same descriptor will have serialized i/o.) This too, will be updated in the manual. Hope this helps /Jakob From Sean.Hinde@REDACTED Tue Oct 30 11:27:45 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 30 Oct 2001 10:27:45 -0000 Subject: Driver init failure not detected Message-ID: <402DD461F109D411977E0008C791C312039F64F5@IMP02MBX> > >The init function of struct driver_entry is not used for dynamic > >drivers. See erl_ddll(3) for the details. > > > >/Peter > > The truth is that init is indeed called when a dynamic driver > is loaded (it > is done so in the add_driver_entry function in the emulator). But the > return code from init is ignored. My feeling about this is > that this is > wrong, and that the return code should be checked, and the > emulator (or > erl_ddll) should unload the driver if init returns -1. But for now it > doesn't. You'll have to set some error variable and check > this later on. It is certainly called, and I totally agree that the return value should be checked (though what happens now is just that the following open_port call fails safely so it is not as bad as it could be). Thanks for the tip - I'll grunge something up for now :) Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From rod@REDACTED Tue Oct 30 12:15:02 2001 From: rod@REDACTED (Rodolphe Duge de Bernonville) Date: Tue, 30 Oct 2001 12:15:02 +0100 Subject: driver_send_term question. Message-ID: <3BDE8BB6.C52D191@idealx.com> Hello ! My question is about the argument of driver_send_term (to send result of a driver to another process) and his second argument (receiver) : int driver_send_term(ErlDrvPort port, ErlDriverTerm receiver, ErlDriverTerm* term, int n) My driver works but I had to make a not really nice "cut/paste" of the macro "make_pid" from erl_term.h (and the order of the arguments of this macro is different from the order displayed by the pid of a process.) So is there a better way to do that ? From Sean.Hinde@REDACTED Tue Oct 30 12:36:19 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 30 Oct 2001 11:36:19 -0000 Subject: driver_send_term question. Message-ID: <402DD461F109D411977E0008C791C312039F64F9@IMP02MBX> > My question is about the argument of driver_send_term > (to send result of a driver to another process) and > his second argument (receiver) : If you want to return the message to the same process that called the driver (not necessarily the port owner) you can retrieve this using: ErlDriverTerm driver_caller(ErlDrvPort port) It's documented in the erts Ref manual in the erl_drver section. > My driver works but I had to make a not really nice "cut/paste" > of the macro "make_pid" from erl_term.h (and the order of > the arguments of this macro is different from the order > displayed by the pid of a process.) > > So is there a better way to do that ? If you want to send it to some other arbritrary process I'm not sure there's a standard way. Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From rod@REDACTED Tue Oct 30 13:12:00 2001 From: rod@REDACTED (Rodolphe Duge de Bernonville) Date: Tue, 30 Oct 2001 13:12:00 +0100 Subject: driver_send_term question. References: <402DD461F109D411977E0008C791C312039F64F9@IMP02MBX> Message-ID: <3BDE9910.9AA2166D@idealx.com> thanks for answering so quickly ! Sean Hinde a ?crit : > > > My question is about the argument of driver_send_term > > (to send result of a driver to another process) and > > his second argument (receiver) : > > If you want to return the message to the same process that called the driver > (not necessarily the port owner) you can retrieve this using: > > ErlDriverTerm driver_caller(ErlDrvPort port) > yes I have seen it ... > It's documented in the erts Ref manual in the erl_drver section. > > > My driver works but I had to make a not really nice "cut/paste" > > of the macro "make_pid" from erl_term.h (and the order of > > the arguments of this macro is different from the order > > displayed by the pid of a process.) > > > > So is there a better way to do that ? > > If you want to send it to some other arbritrary process I'm not sure there's > a standard way. > it was my problem ... the way I did it was to send the pid of the receiver process to the driver and to transform it into something readable by the driver_send_term function. Other thing, sending a pid to a driver gives a BadMatch error ? (I am working with the example driver of the documentation but now I send it in a list format). From mbj@REDACTED Tue Oct 30 13:50:22 2001 From: mbj@REDACTED (Martin Bjorklund) Date: Tue, 30 Oct 2001 13:50:22 +0100 (CET) Subject: Mnesia odd behaviour - delete_object Message-ID: <20011030.135022.91756240.mbj@bluetail.com> I've got a funny mnesia situation. The problem is delete_object vs. delete. I've got a simple 'set' table a: mnesia:create_table(a, []). Add an object: mnesia:dirty_write({a, key, [1,2]}). Now, I've got this fun: F1 = fun() -> mnesia:write({a, key, [1]}), % modify the one&only object [X] = mnesia:read({a, key}), % read it mnesia:delete_object(X) % delete the one&only object end. After executing F1 within a transaction, my table still contains the original object. Since 'a' is a set, I'd think that the object would be removed. After executing F1 'async_dirty', the object is removed. F2 = fun() -> mnesia:write({a, key, [1]}), % modify the one&only object mnesia:delete({a, key}) % delete the one&only object end. After executing F2 within a transaction, the object is removed. Can someone explain this behaviour?? I've tested on mnesia 3.9.2 and 4.0. It's probably not a bug, but I cannot come up with a interpretation that feels consistent... /martin From Chandrashekhar.Mullaparthi@REDACTED Tue Oct 30 14:43:42 2001 From: Chandrashekhar.Mullaparthi@REDACTED (Chandrashekhar Mullaparthi) Date: Tue, 30 Oct 2001 13:43:42 -0000 Subject: Mnesia odd behaviour - delete_object Message-ID: <402DD461F109D411977E0008C791C31205E06223@IMP02MBX> Looks like a bug. When the attributes are not specified during table creation, it assumes [key, val]. Interestingly, this problem seems to occur only when the value for key is 'key'. I tried F1 with {a, key1, [1,2]} and delete_object works fine. This seems to point that the problem is in the function erlang:db_match_erase/2 > -----Original Message----- > From: Martin Bjorklund [mailto:mbj@REDACTED] > Sent: 30 October 2001 12:50 > To: erlang-questions@REDACTED > Subject: Mnesia odd behaviour - delete_object > > > I've got a funny mnesia situation. The problem is delete_object > vs. delete. > > I've got a simple 'set' table a: > > mnesia:create_table(a, []). > > Add an object: > > mnesia:dirty_write({a, key, [1,2]}). > > Now, I've got this fun: > > F1 = fun() -> > mnesia:write({a, key, [1]}), % modify the one&only object > [X] = mnesia:read({a, key}), % read it > mnesia:delete_object(X) % delete the one&only object > end. > > After executing F1 within a transaction, my table still contains the > original object. Since 'a' is a set, I'd think that the object would > be removed. > > After executing F1 'async_dirty', the object is removed. > > > F2 = fun() -> > mnesia:write({a, key, [1]}), % modify the one&only object > mnesia:delete({a, key}) % delete the one&only object > end. > > After executing F2 within a transaction, the object is removed. > > > Can someone explain this behaviour?? > > > I've tested on mnesia 3.9.2 and 4.0. It's probably not a bug, but I > cannot come up with a interpretation that feels consistent... > > > > /martin > NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From Sean.Hinde@REDACTED Tue Oct 30 14:44:38 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 30 Oct 2001 13:44:38 -0000 Subject: driver_send_term question. Message-ID: <402DD461F109D411977E0008C791C312039F64FD@IMP02MBX> > it was my problem ... the way I did it was to send the pid of the > receiver process to the driver and to transform it into something > readable by the driver_send_term function. It surely isn't right that we all need to go to extreme lengths to avoide putting a marshalling process in front of our drivers. Roll on the day when we have a unified heap and no copying so we can use erlang in the way it was designed. BTW my vote goes (for what it's worth, and not based on any great understanding) for a time bounded garbage collection mechanism rather than relying on any specific application behaviours to ensure timeliness. > Other thing, sending a pid to a driver gives a BadMatch error ? > (I am working with the example driver of the documentation but now > I send it in a list format). > You could look at term_to_binary(Pid) to send your pid to the driver and c routines in ei to recode it into a pid. If this is not the same representation as required by driver_send_term then maybe it should be ;) Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From mbj@REDACTED Tue Oct 30 14:58:20 2001 From: mbj@REDACTED (Martin Bjorklund) Date: Tue, 30 Oct 2001 14:58:20 +0100 (CET) Subject: Mnesia odd behaviour - delete_object In-Reply-To: <402DD461F109D411977E0008C791C31205E06223@IMP02MBX> References: <402DD461F109D411977E0008C791C31205E06223@IMP02MBX> Message-ID: <20011030.145820.79269918.mbj@bluetail.com> Chandrashekhar Mullaparthi wrote: > Interestingly, this problem seems to occur > only when the value for key is 'key'. No, I do get the same problem with any key value. /martin From Chandrashekhar.Mullaparthi@REDACTED Tue Oct 30 14:55:08 2001 From: Chandrashekhar.Mullaparthi@REDACTED (Chandrashekhar Mullaparthi) Date: Tue, 30 Oct 2001 13:55:08 -0000 Subject: Mnesia odd behaviour - delete_object Message-ID: <402DD461F109D411977E0008C791C31205E06225@IMP02MBX> Oops! sorry - bug in my test code. Doh! > -----Original Message----- > From: Martin Bjorklund [mailto:mbj@REDACTED] > Sent: 30 October 2001 13:58 > To: Chandrashekhar.Mullaparthi@REDACTED > Cc: erlang-questions@REDACTED > Subject: Re: Mnesia odd behaviour - delete_object > > > Chandrashekhar Mullaparthi > wrote: > > Interestingly, this problem seems to occur > > only when the value for key is 'key'. > > No, I do get the same problem with any key value. > > > /martin > > NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From dgud@REDACTED Tue Oct 30 17:13:11 2001 From: dgud@REDACTED (Dan Gudmundsson) Date: Tue, 30 Oct 2001 17:13:11 +0100 Subject: Mnesia odd behaviour - delete_object In-Reply-To: <20011030.135022.91756240.mbj@bluetail.com> References: <20011030.135022.91756240.mbj@bluetail.com> Message-ID: <15326.53655.815203.253025@gargle.gargle.HOWL> Hi A explanation of the implementation, then you can argument about semantics :-) mnesia:delete_object({a, key, [1]}) deletes the object if and only if exactly that object exists in the database. So a mnesia:transaction(fun() -> mnesia:delete_object({a, key, [1]}) end) will not delete the object {a, key, [1,2]} since they are not the same. And since transactions doesn't directly operate on the tables, (not until the transaction commits), this happens. Thus when you over write the {a, key, [1]} in your transaction, you transaction view shows you the only record in the {a, key, [1]}, and you delete that. This DELETES the WRITE operation you just did. And when the transaction commits, it tries to delete exactly the object {a, key, [1]} from table, which doesn't exist and you are left with you old value. Why this doesn't occur in the async_dirty and sync_dirty cases is obvious they don't have the transaction view, writes/deletes are done directly on the table. Hmm.. I need to sleep on this :-) /Dan Martin Bjorklund writes: > I've got a funny mnesia situation. The problem is delete_object > vs. delete. > > I've got a simple 'set' table a: > > mnesia:create_table(a, []). > > Add an object: > > mnesia:dirty_write({a, key, [1,2]}). > > Now, I've got this fun: > > F1 = fun() -> > mnesia:write({a, key, [1]}), % modify the one&only object > [X] = mnesia:read({a, key}), % read it > mnesia:delete_object(X) % delete the one&only object > end. > > After executing F1 within a transaction, my table still contains the > original object. Since 'a' is a set, I'd think that the object would > be removed. > > After executing F1 'async_dirty', the object is removed. > > > F2 = fun() -> > mnesia:write({a, key, [1]}), % modify the one&only object > mnesia:delete({a, key}) % delete the one&only object > end. > > After executing F2 within a transaction, the object is removed. > > > Can someone explain this behaviour?? > > > I've tested on mnesia 3.9.2 and 4.0. It's probably not a bug, but I > cannot come up with a interpretation that feels consistent... > > > > /martin -- 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 Lon.Willett@REDACTED Sun Oct 28 18:44:41 2001 From: Lon.Willett@REDACTED (Lon Willett) Date: Sun, 28 Oct 2001 18:44:41 +0100 Subject: HIPE bug? Message-ID: <200110281744.SAA06690@emile.sse.ie> Hi all, I've tried the R8B-0 release with HIPE (--enable-hipe), and ran across the following problem in one of my tests. Apparently, when adding two fixnums overflows into a bignum, hipe compiled code fails to recognize this. e.g. when I compile and run: -module(hipebug). -export([test/0]). add(X,Y) -> X + Y. test() -> 16#7FFFFFF = add(16#7FFFFFF,0), 16#8000000 = add(16#8000000,0), 16#8000001 = add(16#8000000,1), case add(16#7FFFFFF,1) of 16#8000000 -> ok; -16#7FFFFFF -> error end. with "+native", hipebug:test() return 'error', while without it, it returns 'ok' (this is on an i386 running redhat 6.2, OTP was built with gcc 3.0.1). Is this a known limitation, or a bug in the general implementation, or just a bug on my system (or in gcc)? Thanks, Lon From Sean.Hinde@REDACTED Tue Oct 30 17:24:27 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 30 Oct 2001 16:24:27 -0000 Subject: Mnemosyne Message-ID: <402DD461F109D411977E0008C791C312039F6507@IMP02MBX> > Hello, > I was wondering if there exists any documentation on > Mnemosyne apart from > the section in the Application overview. > I would like to do a query of a table but only pull out one > record of any > particular type from a table in which there could exist many > items of each type. > Does anyone know how to formulate this query? Mnemosyne has a very elegant syntax but is hopelessly inefficient unless you specify lookup on an indexed field (otherwise it pulls out the whole table into a big list and searches through..). It also relies on the underlying capabilities in mnesia so if mnesia can't do it then mnemosyne can't. In R8B ets you can specify the number of rows which are returned from a match or select call so you could do a match on each record type in turn with ets:match(Tab, Pattern Max_rows) where Max_rows is set to 1. Unfortunately mnesia doesn't support this addition to ets but I dare say that might follow sometime. Meanwhile you can do ets operations directly on local mnesia tables so long as you don't want any transaction safety. Apart from all that I can't think of a way to do it in mnemosyne :-) Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From etxuwig@REDACTED Tue Oct 30 17:49:28 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Tue, 30 Oct 2001 17:49:28 +0100 (MET) Subject: Mnemosyne In-Reply-To: <402DD461F109D411977E0008C791C312039F6507@IMP02MBX> Message-ID: On Tue, 30 Oct 2001, Sean Hinde wrote: >In R8B ets you can specify the number of rows which are >returned from a match or select call so you could do a match on >each record type in turn with ets:match(Tab, Pattern Max_rows) >where Max_rows is set to 1. > >Unfortunately mnesia doesn't support this addition to ets but I >dare say that might follow sometime. Meanwhile you can do ets >operations directly on local mnesia tables so long as you don't >want any transaction safety. Actually, mnesia _does_ support select() in R8B: mnesia:select(Tab, MatchPattern) mnesia:select(Tab, MatchPattern, LockKind) mnesia:dirty_select(Tab, MatchPattern) It's even documented. (: >From http://www.erlang.org/doc/r8b/lib/mnesia-4.0/doc/html/mnesia.html#select%3 "For example to find the names of all male persons with an age over 30 in table Tab do: MatchHead = #person{name='$1', sex=male, age='$2', _='_'}, Guard = {'>', '$2', 30}, Result = '$1', mnesia:select(Tab,[{MatchHead, [Guard], [Result]}])," /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From Sean.Hinde@REDACTED Tue Oct 30 18:01:28 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 30 Oct 2001 17:01:28 -0000 Subject: Mnemosyne Message-ID: <402DD461F109D411977E0008C791C312039F6508@IMP02MBX> > On Tue, 30 Oct 2001, Sean Hinde wrote: > > >In R8B ets you can specify the number of rows which are > >returned from a match or select call so you could do a match on > >each record type in turn with ets:match(Tab, Pattern Max_rows) > >where Max_rows is set to 1. > > > >Unfortunately mnesia doesn't support this addition to ets but I > >dare say that might follow sometime. Meanwhile you can do ets > >operations directly on local mnesia tables so long as you don't > >want any transaction safety. > > Actually, mnesia _does_ support select() in R8B: OK, I should have amended the above paragraphs to read: In R8B ets you can specify the number of rows which are returned from a match or select call so you could do a match on each record type in turn with ets:match(Tab, Pattern, Max_rows) where Max_rows is set to 1. Unfortunately mnesia doesn't support this addition to ets but I dare say that might follow sometime. Meanwhile you can do these ets operations directly on local mnesia tables so long as you don't want any transaction safety. Apologies for the lack of clarity Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From Chandrashekhar.Mullaparthi@REDACTED Tue Oct 30 17:36:12 2001 From: Chandrashekhar.Mullaparthi@REDACTED (Chandrashekhar Mullaparthi) Date: Tue, 30 Oct 2001 16:36:12 -0000 Subject: Mnemosyne Message-ID: <402DD461F109D411977E0008C791C31205E06226@IMP02MBX> Have you looked at mnemosyne:cursor function. >From the documentation: Getting the answers in small or large chunks. The query may be aborted when enough solutions have been obtained. These are called cursors. The functions are cursor/1, cursor/2, next_answers/1, next_answers/3, all_answers/1, all_answers/3, and delete_cursor/1. cheers, Chandru > -----Original Message----- > From: Martin J. Logan [mailto:martin@REDACTED] > Sent: 29 October 2001 23:40 > To: erlang-questions@REDACTED > Subject: Mnemosyne > > > Hello, > I was wondering if there exists any documentation on > Mnemosyne apart from > the section in the Application overview. > I would like to do a query of a table but only pull out one > record of any > particular type from a table in which there could exist many > items of each type. > Does anyone know how to formulate this query? > > Thanks, > Martin > NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From etxuwig@REDACTED Tue Oct 30 18:36:11 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Tue, 30 Oct 2001 18:36:11 +0100 (MET) Subject: Mnemosyne In-Reply-To: <402DD461F109D411977E0008C791C312039F6508@IMP02MBX> Message-ID: On Tue, 30 Oct 2001, Sean Hinde wrote: >OK, I should have amended the above paragraphs to read: Oh, and I should have re-read the original question (and your answer) before replying. My apologies. /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From Sean.Hinde@REDACTED Tue Oct 30 18:54:14 2001 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 30 Oct 2001 17:54:14 -0000 Subject: Mnemosyne Message-ID: <402DD461F109D411977E0008C791C312039F650B@IMP02MBX> > Have you looked at mnemosyne:cursor function. > > From the documentation: > > Getting the answers in small or large chunks. The query may > be aborted when > enough solutions have been obtained. These are called > cursors. The functions > are cursor/1, cursor/2, next_answers/1, next_answers/3, all_answers/1, > all_answers/3, and delete_cursor/1. OK, it looks like you can do it with bunch of mnemosyne queries - one for each record type you are trying to get hold of. Bear in mind that each one will extract all the values from mnesia using mnesia:match_object or similar and then give you one of them. If you have a lot of data this could well be orders of magnitude slower than using the ets mechanisms to return one row from each query. It would be exremely nice to see mnemosyne updated to take advantage of ets:select and the partial results mechanisms. Maybe one day.. Rgds, Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From mbj@REDACTED Tue Oct 30 20:20:27 2001 From: mbj@REDACTED (Martin Bjorklund) Date: Tue, 30 Oct 2001 20:20:27 +0100 (CET) Subject: Mnesia odd behaviour - delete_object In-Reply-To: <15326.53655.815203.253025@gargle.gargle.HOWL> References: <20011030.135022.91756240.mbj@bluetail.com> <15326.53655.815203.253025@gargle.gargle.HOWL> Message-ID: <20011030.202027.41660250.mbj@bluetail.com> Dan Gudmundsson wrote: > > Hi > > A explanation of the implementation, then you can argument about > semantics :-) > > mnesia:delete_object({a, key, [1]}) deletes the object if > and only if exactly that object exists in the database. > > So a mnesia:transaction(fun() -> mnesia:delete_object({a, key, [1]}) end) > will not delete the object {a, key, [1,2]} since they are not the same. > > And since transactions doesn't directly operate on the tables, (not > until the transaction commits), this happens. > > Thus when you over write the {a, key, [1]} in your transaction, > you transaction view shows you the only record in the {a, key, [1]}, > and you delete that. This DELETES the WRITE operation you just did. > And when the transaction commits, it tries to delete exactly the object > {a, key, [1]} from table, which doesn't exist and you are left with > you old value. Yes, I understand that this is how it's implemented. The question is whether this is by design or accident :) What do you say Hakan? The more I think about it, the more I think the current behaviour is wrong. /martin From fredrik.linder@REDACTED Tue Oct 30 21:07:55 2001 From: fredrik.linder@REDACTED (Fredrik Linder) Date: Tue, 30 Oct 2001 21:07:55 +0100 Subject: Mnemosyne References: <3BDDE8D1.39234E3A@vailsys.com> Message-ID: <003201c1617e$907bf1a0$c12511c2@frelin> Hello If I am not mistaken what you would like to do is something like the DISTINCT keyword in SQL? SELECT DISCTINCT bla WHERE bla. Unfortunately does mnemosyne not support this, at least not in R7. What we had to to instead was remove all duplicates afterwards. Actually, we never got it to work properly, so we removed mnemosyne from our product. /Fredrik ----- Original Message ----- From: "Martin J. Logan" To: Sent: Tuesday, October 30, 2001 12:40 AM Subject: Mnemosyne > Hello, > I was wondering if there exists any documentation on Mnemosyne apart from > the section in the Application overview. > I would like to do a query of a table but only pull out one record of any > particular type from a table in which there could exist many items of each type. > Does anyone know how to formulate this query? > > Thanks, > Martin > > From fredrik.linder@REDACTED Tue Oct 30 22:07:12 2001 From: fredrik.linder@REDACTED (Fredrik Linder) Date: Tue, 30 Oct 2001 22:07:12 +0100 Subject: Mnesia odd behaviour - delete_object References: <20011030.135022.91756240.mbj@bluetail.com> <15326.53655.815203.253025@gargle.gargle.HOWL> Message-ID: <006f01c16186$d90ffc60$c12511c2@frelin> Hi In my eyes this looks like a bug in the transaction optimization algorithm. Since the first WRITE operation conceptually is a DELETE + WRITE operation (deleting the original value, and inserting the new value) it cannot entirely be cancelled by the last DELETE operation (deleting the new value). If this is the case, than I guess it is a bug in mnesia. /Fredrik ----- Original Message ----- From: "Dan Gudmundsson" To: "Martin Bjorklund" Cc: Sent: Tuesday, October 30, 2001 5:13 PM Subject: Mnesia odd behaviour - delete_object > > Hi > > A explanation of the implementation, then you can argument about > semantics :-) > > mnesia:delete_object({a, key, [1]}) deletes the object if > and only if exactly that object exists in the database. > > So a mnesia:transaction(fun() -> mnesia:delete_object({a, key, [1]}) end) > will not delete the object {a, key, [1,2]} since they are not the same. > > And since transactions doesn't directly operate on the tables, (not > until the transaction commits), this happens. > > Thus when you over write the {a, key, [1]} in your transaction, > you transaction view shows you the only record in the {a, key, [1]}, > and you delete that. This DELETES the WRITE operation you just did. > And when the transaction commits, it tries to delete exactly the object > {a, key, [1]} from table, which doesn't exist and you are left with > you old value. > > Why this doesn't occur in the async_dirty and sync_dirty cases is > obvious they don't have the transaction view, writes/deletes are done > directly on the table. > > Hmm.. I need to sleep on this :-) > > /Dan > > Martin Bjorklund writes: > > I've got a funny mnesia situation. The problem is delete_object > > vs. delete. > > > > I've got a simple 'set' table a: > > > > mnesia:create_table(a, []). > > > > Add an object: > > > > mnesia:dirty_write({a, key, [1,2]}). > > > > Now, I've got this fun: > > > > F1 = fun() -> > > mnesia:write({a, key, [1]}), % modify the one&only object > > [X] = mnesia:read({a, key}), % read it > > mnesia:delete_object(X) % delete the one&only object > > end. > > > > After executing F1 within a transaction, my table still contains the > > original object. Since 'a' is a set, I'd think that the object would > > be removed. > > > > After executing F1 'async_dirty', the object is removed. > > > > > > F2 = fun() -> > > mnesia:write({a, key, [1]}), % modify the one&only object > > mnesia:delete({a, key}) % delete the one&only object > > end. > > > > After executing F2 within a transaction, the object is removed. > > > > > > Can someone explain this behaviour?? > > > > > > I've tested on mnesia 3.9.2 and 4.0. It's probably not a bug, but I > > cannot come up with a interpretation that feels consistent... > > > > > > > > /martin > > -- > 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 mikpe@REDACTED Tue Oct 30 22:36:56 2001 From: mikpe@REDACTED (Mikael Pettersson) Date: Tue, 30 Oct 2001 22:36:56 +0100 (MET) Subject: HIPE bug? Message-ID: <200110302136.WAA08524@harpo.it.uu.se> On Sun, 28 Oct 2001 18:44:41 +0100, Lon Willett wrote: >-module(hipebug). >-export([test/0]). > >add(X,Y) -> > X + Y. > >test() -> > 16#7FFFFFF = add(16#7FFFFFF,0), > 16#8000000 = add(16#8000000,0), > 16#8000001 = add(16#8000000,1), > case add(16#7FFFFFF,1) of > 16#8000000 -> ok; > -16#7FFFFFF -> error > end. > >with "+native", hipebug:test() return 'error', while without it, it >returns 'ok' (this is on an i386 running redhat 6.2, OTP was built >with gcc 3.0.1). Yes, that's a bug. I've verified that it occurs in both HiPE/SPARC and HiPE/x86. From the intermediate code, it looks like a conditional (test if variable X is bignum constant Y) got inverted. Thanks for reporting it. We'll try to have it fixed as soon as possible. /Mikael From hakan@REDACTED Wed Oct 31 01:18:14 2001 From: hakan@REDACTED (Hakan Mattsson) Date: Wed, 31 Oct 2001 01:18:14 +0100 (MET) Subject: Mnesia odd behaviour - delete_object In-Reply-To: <20011030.202027.41660250.mbj@bluetail.com> Message-ID: On Tue, 30 Oct 2001, Martin Bjorklund wrote: mbj> Yes, I understand that this is how it's implemented. The question is mbj> whether this is by design or accident :) What do you say Hakan? Oops... mbj> The more I think about it, the more I think the current behaviour is mbj> wrong. I agree, this enhancement possibility ought to be removed. /H?kan --- H?kan Mattsson Ericsson Computer Science Laboratory http://www.ericsson.com/cslab/~hakan/ From etxuwig@REDACTED Wed Oct 31 20:16:49 2001 From: etxuwig@REDACTED (Ulf Wiger) Date: Wed, 31 Oct 2001 20:16:49 +0100 (MET) Subject: trouble building R8B -- megaco Message-ID: I thought I'd actually be able to build OTP R8B at work this time, after having upgraded m4, and having created a totally clean environment free of ClearCase and other abhorrations... But after one hour of successful make:ing, I crashed on the megaco_flex_scanner_drv. Does anyone recognize the following? gcc -g -O2 -I/.../otp_src_R8B-20011015-SNAPSHOT/erts/sparc-sun-solaris2.7 -fPIC -I/.../otp_src_R8B-20011015-SNAPSHOT/erts/emulator/beam -I/.../otp_src_R8B-20011015-SNAPSHOT/erts/emulator/sys/unix -funroll-loops -Wall -fpic -shared -o ../../priv/lib/sparc-sun-solaris2.7/megaco_flex_scanner_drv.so megaco_flex_scanner_drv.c -lfl megaco_flex_scanner_drv.c: In function `megaco_flex_scanner_drvlex': megaco_flex_scanner_drv.c:4631: warning: label `find_rule' defined but not used megaco_flex_scanner_drv.flex: At top level: megaco_flex_scanner_drv.c:6576: warning: `yy_flex_realloc' defined but not used megaco_flex_scanner_drv.c:6517: warning: `yy_fatal_error' defined but not used ld: fatal: library -lfl: not found ld: fatal: File processing errors. No output written to ../../priv/lib/sparc-sun-solaris2.7/megaco_flex_scanner_drv.so collect2: ld returned 1 exit status make[5]: *** [../../priv/lib/sparc-sun-solaris2.7/megaco_flex_scanner_drv.so] Error 1 make[5]: Leaving directory `/.../otp_src_R8B-20011015-SNAPSHOT/lib/megaco/src/flex' make[4]: *** [opt] Error 2 make[4]: Leaving directory `/.../otp_src_R8B-20011015-SNAPSHOT/lib/megaco/src/flex' make[3]: *** [opt] Error 2 make[3]: Leaving directory `/.../otp_src_R8B-20011015-SNAPSHOT/lib/megaco/src' make[2]: *** [opt] Error 2 make[2]: Leaving directory `/.../otp_src_R8B-20011015-SNAPSHOT/lib/megaco' make[1]: *** [opt] Error 2 make[1]: Leaving directory `/.../otp_src_R8B-20011015-SNAPSHOT/lib' make: *** [libs] Error 2 clean > flex --version flex version 2.5.2 clean > which ld /usr/ccs/bin/ld clean > ld -V ld: Software Generation Utilities - Solaris-ELF (4.0) clean > gcc --version 2.95.1 I see no other errors. /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Senior System Architect mob: +46 70 519 81 95 Strategic Product & System Management ATM Multiservice Networks Data Backbone & Optical Services Division Ericsson Telecom AB From per@REDACTED Wed Oct 31 21:42:17 2001 From: per@REDACTED (per@REDACTED) Date: Wed, 31 Oct 2001 21:42:17 +0100 (CET) Subject: trouble building R8B -- megaco In-Reply-To: Message-ID: <200110312042.f9VKgHI13979@tordmule.bluetail.com> Ulf Wiger wrote: >But after one hour of successful make:ing, I crashed on the >megaco_flex_scanner_drv. Does anyone recognize the following? > > >gcc -g -O2 >-I/.../otp_src_R8B-20011015-SNAPSHOT/erts/sparc-sun-solaris2.7 >-fPIC >-I/.../otp_src_R8B-20011015-SNAPSHOT/erts/emulator/beam >-I/.../otp_src_R8B-20011015-SNAPSHOT/erts/emulator/sys/unix >-funroll-loops -Wall -fpic -shared -o >../../priv/lib/sparc-sun-solaris2.7/megaco_flex_scanner_drv.so >megaco_flex_scanner_drv.c -lfl >ld: fatal: library -lfl: not found It seems you have your libfl[.a] (library that goes with flex) installed in a place where 'ld' won't find it (by default it basically only looks in /usr/lib on Solaris IIRC) - I guess maybe configure should have noticed. Setting LD_LIBRARY_PATH to include the directory where it is, and re-running 'make', is probably the simplest fix/workaround. --Per Hedeland per@REDACTED From mickael.remond@REDACTED Wed Oct 31 22:47:56 2001 From: mickael.remond@REDACTED (Mickael Remond) Date: Wed, 31 Oct 2001 22:47:56 +0100 Subject: Erlang/OTP and the Web Services Universe In-Reply-To: <3BDE0FFF.6FE3D2F5@ionet.net> References: <3BDE0FFF.6FE3D2F5@ionet.net> Message-ID: <20011031224756.A798@erlang-fr.org> Steven H. Rogers (shrogers@REDACTED) wrote: > Erlang/OTP is not mentioned in either article, but seems to be an very > viable alternative, so I have a couple of questions for the Erlang/OTP > community. > > - Is there a strategy for promoting Erlang/OTP as a general web services > platform? > > - Are there any initiatives to support .NET and/or J2EE > interoperability? In fact I really think that web services are a win for functionnal programming and for Erlang in particular. The way to architect a distributed application based on web services is very similar to the way you would build an Erlang application ... except the fact that you get extra feature with Erlang: - Fault tolerance, - High-availability mecanism, - Fast development, - ... For more information, you can have a look at my slides from the Firenze Erlang Workshop: http://www.erlang-fr.org/en-area/pli01_Firenze/index.html So to answer your questions: - Yes I think that OTP is a viable alternative to .NET and J2EE. - Yes I am planning to add mecanism to interoperate with SOAP services and probably J2EE. If you are interested, maybe we could see if we could do something together. -- Micka?l R?mond http://www.erlang-fr.org/