From ravi.reddy@REDACTED Mon Apr 3 12:10:52 2000 From: ravi.reddy@REDACTED (Ravi kumar reddy K) Date: Mon, 3 Apr 2000 15:40:52 +0530 Subject: Queries on SNMP over OTP... Message-ID: <006401bf9d54$e4b760a0$4a8ea8c0@reddy.wipsys.stph.net> We are facing problem in startiung the master SNMP agent on an erlang node. The following are the messages that are outcome of the command application:start(snmp) at the erlang shell (ver 47.4.1) application: snmp exited: "invalid return value from snmp_app:start(normal,[]) -> {'EXIT',undefined_config,{snmp,snmp_db_dir}}}" type: temporary {error,"invalid return value from snmp_app:start(normal,[]) -> {'EXIT',undefined_config,{snmp,snmp_db_dir}}}"} Regards, K. Ravi Kumar Reddy G. Prasanna Kumar -------------- next part -------------- An HTML attachment was scrubbed... URL: From Chandru.Mullaparthi@REDACTED Mon Apr 3 12:23:03 2000 From: Chandru.Mullaparthi@REDACTED (Chandrashekhar M) Date: Mon, 03 Apr 2000 11:23:03 +0100 Subject: Queries on SNMP over OTP... References: <006401bf9d54$e4b760a0$4a8ea8c0@reddy.wipsys.stph.net> Message-ID: <38E87107.7B5951C6@eei.ericsson.se> Ravi kumar reddy K wrote: > We are facing problem in startiung the master SNMP agent on an erlang > node. > > The following are the messages that are outcome of the command > application:start(snmp) at the erlang shell (ver 47.4.1) > > > application: snmp > exited: "invalid return value from snmp_app:start(normal,[]) -> > {'EXIT',undefined_config,{snmp,snmp_db_dir}}}" > type: temporary > {error,"invalid return value from snmp_app:start(normal,[]) -> > {'EXIT',undefined_config,{snmp,snmp_db_dir}}}"} You have to specify values for the snmp_db_dir and snmp_config_dir >From the command line of the erl shell you can do it as: erl -snmp snmp_db_dir '"Your db dir"' \ -snmp snmp_config_dir '"Your config dir"' Those directories have to be created prior to starting the master agent. Or you can specify values for those variables in a config file. Check the documentation for erl. hth Chandru -- Random Wodehouse Quote I could see that she was looking for something to break as a relief to her surging emotions ... and courteously drew her attention to a terra-cotta figure of the Infant Samuel at Prayer. She thanked me briefly and hurled it against the opposite wall. From prasanna.galla@REDACTED Mon Apr 3 14:17:47 2000 From: prasanna.galla@REDACTED (Prasanna Kumar Galla) Date: Mon, 03 Apr 2000 17:47:47 +0530 Subject: starting snmp...? Message-ID: <38E88BEB.2E0A2DA5@wipsys.stph.net> I have the erlang package at.. c: \ programfiles \ erl47.4.1 on windows95. now my aim is to start snmp agent in the shell and load the existing MIB "Ex1-MIB.mib" provided in examples just help me in this reg. also clarify.. whether i should create 2 directories -one for snmp_db_dir ,the other for snmp_config_dir.... or else i should set any of the existing directories... Thanks in advance. Regards, prasanna. From Chandru.Mullaparthi@REDACTED Mon Apr 3 15:28:25 2000 From: Chandru.Mullaparthi@REDACTED (Chandrashekhar M) Date: Mon, 03 Apr 2000 14:28:25 +0100 Subject: starting snmp...? References: <38E88BEB.2E0A2DA5@wipsys.stph.net> Message-ID: <38E89C79.7758BBDB@eei.ericsson.se> Prasanna Kumar Galla wrote: > > I have the erlang package at.. > c: \ programfiles \ erl47.4.1 > on windows95. > > now my aim is to start snmp agent in the shell > and load the existing MIB "Ex1-MIB.mib" provided in examples > > just help me in this reg. % erl -snmp snmp_db_dir '"./snmp"' -snmp snmp_config_dir '"./config"' ( assuming ./snmp is your snmp_db_dr and ./config is your snmp_config_dir ) Erlang (BEAM) emulator version 4.8.2 Eshell V4.8.2 (abort with ^G) 1> application:start(snmp). > also clarify.. > whether i should create 2 directories -one for snmp_db_dir ,the other > for snmp_config_dir.... > or else i should set any of the existing directories... You can specify an existing dir - and you can specify the same dir for both. hth Chandru From luke@REDACTED Wed Apr 5 08:27:24 2000 From: luke@REDACTED (Luke Gorrie) Date: 05 Apr 2000 08:27:24 +0200 Subject: The Return of Wikie Message-ID: <874s9hkqpf.fsf@cockatoo.bluetail.com> At long last, Wikie is back to stay! The new URL is http://203.46.39.99:2000/ A proper hostname will be assigned soon. The vegetable.org kingdom isn't what it once was, so bear with me :-). Cheers, Luke From luke@REDACTED Wed Apr 5 07:34:09 2000 From: luke@REDACTED (Luke Gorrie) Date: 05 Apr 2000 07:34:09 +0200 Subject: The Return of Wikie Message-ID: <877ledkt66.fsf@cockatoo.bluetail.com> At long last, Wikie is back to stay! The new URL is http://203.46.39.99:2000/ A proper hostname will be assigned soon. The vegetable.org kingdom isn't what it once was, so bear with me :-). Cheers, Luke From sanjiva@REDACTED Fri Apr 7 00:13:19 2000 From: sanjiva@REDACTED (Sanjiva Prasad) Date: Fri, 7 Apr 2000 03:43:19 +0530 Subject: No subject Message-ID: <200004062213.DAA00773@cse.iitd.ernet.in> Subject: Second Call for Papers FCC: ~/Mail/sent --text follows this line-- *********************************************************************** * * * FST TCS 2000 * * * * Foundations of Software Technology and Theoretical Computer Science * * December 13--15, 2000 * * New Delhi, India * * * *********************************************************************** * Call for Papers * *********************************************************************** IARCS, the Indian Association for Research in Computing Science, announces the 20th Annual FST TCS Conference in New Delhi. Two satellite workshops are planned: on Computational Geometry and on Advances in Programming Languages. Authors are invited to submit papers presenting original and unpublished research on **any** theoretical aspects of Computer Science. Papers in applied areas with a strong foundational emphasis are also welcome. The proceedings of the last six years' conferences (Springer-Verlag Lecture Notes in Computer Science volumes 880, 1026, 1180, 1346, 1530, 1738) give an idea of the kind of papers typically presented at FST TCS. Typical areas include (but are not restricted to): Automata, Languages and Computability Randomized and Approximation Algorithms Computational Geometry Computational Biology Combinatorial Optimization Graph and Network Algorithms Complexity Theory Parallel and Distributed Computing New Models of Computation Concurrent, Real-time and Hybrid Systems Logics of Programs and Modal Logics Database Theory and Information Retrieval Automated Reasoning, Rewrite Systems, and Applications Logic, Proof Theory, Model Theory and Applications Semantics of Programming Languages Static Analysis and Type Systems Theory of Functional and Constraint-based Programming Software Specification and Verification Cryptography and Security Protocols For an accepted paper to be included in the proceedings, one of the authors must commit to presenting the paper at the conference. Important Dates --------------- Deadline for Submission 31 May, 2000 Notification to Authors 15 August, 2000 Final Version of Accepted Papers due 15 September, 2000 Deadline for Early Registration 15 November, 2000 Submission Guidelines - --------------------- Authors may submit drafts of full papers or extended abstracts. Submissions are limited to 12 A4-size pages, with 1.5 inch top margin and other margins 1 inch wide with 11 point or larger font. Authors who feel that more details are necessary may include a clearly marked appendix which will be read at the discretion of the Programme Committee. Each paper should contain a short abstract. If available, e-mail addresses and fax numbers of the authors should be included. Electronic Submissions - ---------------------- Electronic submission is strongly encouraged. Self-contained uuencoded gzipped Postscript versions of the paper may be sent by e-mail to fsttcs20@REDACTED In addition, the following information in ASCII format should be sent to this address in a **separate** e-mail: Title; authors; communicating author's name, address, and e-mail address and fax number if available; abstract of paper. Hard-Copy Submissions - --------------------- If electronic submission is not possible, authors may submit five (5) hard-copies of the paper by post to the following address: FST TCS 2000 Department of Computer Science and Engineering I.I.T., Delhi Hauz Khas New Delhi 110 016 INDIA Invited Speakers ---------------- Invited Speakers who have confirmed participation include: Peter Buneman (U Penn) Bernard Chazelle (Princeton) E. Allen Emerson (U Texas, Austin) Jose Meseguer (SRI) Philip Wadler (Bell Labs) Programme Committee ------------------- Pankaj Agarwal (Duke) Manindra Agrawal (IIT, Kanpur) Tetsuo Asano (JAIST) Vijay Chandru (IISc, Bangalore) Rance Cleaveland (Stony Brook) Anuj Dawar (Cambridge) Sampath Kannan (AT&T Research) Sanjiv Kapoor (IIT, Delhi) (Co-chair) Kamal Lodaya (IMSc, Chennai) Madhavan Mukund (CMI, Chennai) Gopalan Nadathur (Loyola) Seffi Naor (Bell Labs and Technion) Tobias Nipkow (TU Munich) Luke Ong (Oxford) C. Pandu Rangan (IIT, Chennai) Paritosh Pandya (TIFR) Benjamin Pierce (U Penn) Sanjiva Prasad (IIT, Delhi) (Co-chair) Sridhar Rajagopalan (IBM, Almaden) Abhiram Ranade (IIT, Mumbai) Dave Sands (Chalmers) A Prasad Sistla (U Illinois, Chicago) Michiel Smid (Magdeburg) Mandayam K. Srivas (SRI) Organized by ------------ Indian Institute of Technology, Delhi Hauz Khas, New Delhi 100 016. Organizing Committee ------------------- Sandeep Sen (chair) Naveen Garg (treasurer) S N Maheshwari Conference Site --------------- The Conference will take place at the India International Centre, 40 Lodhi Estate, Max Mueller Marg, New Delhi 110 003. Correspondence Address ---------------------- All correspondence regarding submissions may be addressed to FST TCS 2000 Department of Computer Science and Engineering I.I.T., Delhi Hauz Khas, New Delhi 110 016, INDIA Email: fsttcs20@REDACTED Fax: +91 11 686 8765 Phone: +91 11 659 1294 / 659 1286 URL: http://www.cse.iitd.ernet.in/~fsttcs20 -- Sanjiva Prasad Associate Professor Department of Computer Science and Engineering sanjiva@REDACTED Indian Institute of Technology, Delhi (Off) +91 11 659 1294 Hauz Khas, New Delhi 110016 (Res) +91 11 659 1684 INDIA (Fax) +91 11 686 8765 http://www.cse.iitd.ernet.in/~sanjiva From jocke@REDACTED Thu Apr 6 12:27:56 2000 From: jocke@REDACTED (Joakim G.) Date: Thu, 06 Apr 2000 12:27:56 +0200 Subject: Jobs: Bluetail is hiring Message-ID: <38EC66AC.28EA514A@bluetail.com> Do you want to work with the original Erlang team? Take a look at http://www.bluetail.com/company/jobs.shtml /Jocke -- http://www.bluetail.com From Juergen.Bosch@REDACTED Thu Apr 6 14:13:59 2000 From: Juergen.Bosch@REDACTED (=?iso-8859-1?Q?=22Bosch=2C_J=FCrgen=22?=) Date: Thu, 6 Apr 2000 14:13:59 +0200 Subject: WG: ORBER 2.x INFO Message-ID: <896F3543BB0ED31190050000F878530F276A03@si11.technidata.de> > Here you get my Questions in a other format: > > ORB VERSION: _______________________ > How much cost the ORB ? _________________ > > Where can i get a free version for testing ? ________________________ > > ORB CORE MATRIX > > > Language bindings > Protocols Core > IDL C++ C St Ada Java COM COBOL IIOP DCE > DII DSI IR IMR BOA POA > > > > C++ language binding > C language binding > St: Smalltalk language binding > Ada: language binding > Java: language binding (not yet standardized) > COM: integration with COM (not yet standardized) > COBOL language binding > IIOP: Internet Interoperability Protocol (mandatory) > DCE: DCE ESIOP (optional) > DII: dynamic invokation interface (mandatory) > DSI: dynamic skeleton interface (mandatory) > IR: interface repository (optional) > IMR: implementation repository > BOA: Basic Object Adapter > POA: Portable Object Adapter > > CORBA Services > > > NM EV LF PO TR CC RS EX QR LI > PR TM SE OT OC > > > > > NM: Naming Service > EV: Event Service > LF: Life Cycle Service > PO: Persistent Object Service > TR: Transaction Service > CC: Concurrency Control Service > RS: Relationship Service > EX: Externalization Service > QR: Query Service > LI: Licensing Service > PR: Property Service > TM: Time Service > SE: Security Service > OT: Object Trader Service > OC: Object Collection Service > > ADDITIONAL INFORMATIONS: > > CORBA Vendor Platform Matrix > > > src Sol HPUX AIX DEC Linux SGI NT W95/98 OS/2 > Mac VMS MVS > > > > thanks > juergen bosch > > Other platforms supported: > > > -----Urspr?ngliche Nachricht----- > Von: Niclas Eklund [SMTP:nick@REDACTED] > Gesendet am: Donnerstag, 6. April 2000 13:57 > An: juergen.bosch@REDACTED > Betreff: ORBER 2.x INFO > > > Hello! > > To be able to answer any of your questions I must ask you to supply your > form in another format than .doc (don't use windows). > > You can find some information at: > > http://www.erlang.org/ > > > If you have any other Erlang/Orber related questions, please send them to: > > erlang-questions@REDACTED > > Best Regards > > /Nick > > > > Can you send me Informations about your ORB. I am working for Technidata > > and i make a evaluation of ORBs. I want to make a publication of > > commercials and free orbs, it is a part of my thesis. > > Its very important for me and you have only to fill out the table in the > > word document with yes , no or available in xxxx . > > > > <> > > > > Please fill out the word document and send it back to me. > > EMAIL: juergen.bosch@REDACTED > > > > thanks > > juergen bosch > > > > From nick@REDACTED Thu Apr 6 14:54:27 2000 From: nick@REDACTED (Niclas Eklund) Date: Thu, 6 Apr 2000 14:54:27 +0200 (MET DST) Subject: AW: ORBER 2.x INFO In-Reply-To: <896F3543BB0ED31190050000F878530F276A02@si11.technidata.de> Message-ID: > ORB VERSION: Released Orber-3.0.2, which supports most of the OMG CORBA-2.3 standard > How much cost the ORB ? free (open source) > > Where can i get a free version for testing ? http://www.erlang.org/ > > ORB CORE MATRIX > > > Language bindings > Protocols Core > IDL Erlang IIOP/GIOP (1.0 & 1.1) > IR BOA > > C++ language binding > C language binding > St: Smalltalk language binding > Ada: language binding > Java: language binding (not yet standardized) > COM: integration with COM (not yet standardized) > COBOL language binding > IIOP: Internet Interoperability Protocol (mandatory) > DCE: DCE ESIOP (optional) > DII: dynamic invokation interface (mandatory) > DSI: dynamic skeleton interface (mandatory) > IR: interface repository (optional) > IMR: implementation repository > BOA: Basic Object Adapter > POA: Portable Object Adapter > > CORBA Services > > > NM EV (incl Notification soon) TR > TM (soon) SE (ssl) > > NM: Naming Service > EV: Event Service > LF: Life Cycle Service > PO: Persistent Object Service > TR: Transaction Service > CC: Concurrency Control Service > RS: Relationship Service > EX: Externalization Service > QR: Query Service > LI: Licensing Service > PR: Property Service > TM: Time Service > SE: Security Service > OT: Object Trader Service > OC: Object Collection Service > > ADDITIONAL INFORMATIONS: > > CORBA Vendor Platform Matrix > > > src Sol Linux NT W95/98 FreeBSD Have a nice day Nick From scott@REDACTED Fri Apr 7 19:15:44 2000 From: scott@REDACTED (Scott Lystig Fritchie) Date: Fri, 07 Apr 2000 12:15:44 -0500 Subject: Socket owner changing code in inet_tcp.erl Message-ID: <200004071715.MAA12226@snookles.snookles.com> I've got a quick question about kernel-2.5's version of inet_tcp.erl: owner(Tcp, Owner, LIX, St, NewOwner) -> receive {commit_owner, NewOwner} -> unlink(Owner), link(NewOwner), Owner ! {owner, NewOwner}, listen_loop(Tcp, NewOwner, LIX, St); {abort_owner, NewOwner} -> listen_loop(Tcp, Owner, LIX, St) end. Why is the unlink() done before the link()? I would expect the link() to be done first, to be paranoid about avoiding detached processes. If Owner dies, it's an honest race to see if the unlink() happens before that fact is propagated to the socket process. If NewOwner dies before the link(), then the link() should send an 'EXIT' signal to the socket process. Hm. I suppose that's OK. Come to think of it ... perhaps it's done this way to avoid the tiny window of opportunity where the socket process is linked to both Owner and NewOwner, and the death of NewOwner would also kill Owner, and that would be a bad thing? -Scott From maillist@REDACTED Sun Apr 9 20:39:13 2000 From: maillist@REDACTED (maillist) Date: Sun, 09 Apr 2000 11:39:13 -0700 Subject: ASN.1 - ANY, ANY DEFINED BY and EXTERNAL types? Message-ID: <4.2.2.20000409113520.00a81370@192.168.11.1> Hi, from the documentation http://www.erlang.org/documentation/lib/asn1-1.2.7/doc/html/asn1_ug.html#1.4 it states that these types are not supported in (version 1.03), I have tried an experiment with the latest version OTP R6B and this seems to be still the case. has anybody done any work on this or is it something that somebody is looking at for the future? regards Kevin From costelv@REDACTED Mon Apr 10 01:42:15 2000 From: costelv@REDACTED (Costel Vrinceanu) Date: Sun, 9 Apr 2000 16:42:15 -0700 (PDT) Subject: Subject: Erlang adventures; Erlang image and "success" Message-ID: <20000409234215.20946.qmail@web304.mail.yahoo.com> 1: Erlang adventures -------------------- Worked at this company last year on some server box. After 1.5 failed attempts to get anywhere with it, and a year of bitching from my part about trying Erlang on some suitable project, we finaly got the manager off our back so 2 of us could spend 8 man-weeks to design, implement and satisfactorly benchmark 40% of the required functionality for a product that was supposed to need 80 man-months. All this using a platform on which we had epsilon previous experience. You think management was impressed? Nah. If I were to shave my butt and tatoo Java on one hemisphere and Corba on the other, they would have payed some sincere attention. 2: Erlang image and "success" --------------------------------- "Success" in quotes because I think Erlang is very successfull. It's not popular though - not because that's a totaly desirable thing. People need symbols and images to venerate, keywords for their resumes and bumper-stickers and coffee mugs. Now that VoIp and such is cool and everyone is drooling at the idea of replacing and supplementing the circuit-switched infrastructure with packet-switched and time-to-market is a major factor in the gold rush for a slice of the pie ... Wouldn't now be a good time to hype Erlang beyond recognition? It's a gap that needs to be filled. All the keywords that Erlang supports natively are hot right in this period (mucho-nines, fault-tolerance, live code upgrade, distributed systems, etc) __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com From jhague@REDACTED Mon Apr 10 03:14:03 2000 From: jhague@REDACTED (James Hague) Date: Sun, 9 Apr 00 20:14:03 -0500 Subject: Subject: Erlang adventures; Erlang image and "success" Message-ID: <200004100112.UAA07821@node-03.advancenet.net> >People need symbols and images to venerate, keywords >for their resumes and >bumper-stickers and coffee mugs. Hmmm...I'd get a coffee mug, were one available. Ericsson was pretty coffee-mug happy when I worked there. I had two training mugs, a couple of AXE mugs, one mug for a project that went by the name of "P5," and one for an experimental TCP/IP adjunct to AXE called "Gator." Surely there are already a zillion Erlang mugs out there? :) >Wouldn't now be a good time to hype Erlang beyond >recognition? Does hyping a computer language really work? Okay, it worked for Java but did it ever work prior to that? If you hang out in forums for underdog languages--Smalltalk, Forth, Lisp, Scheme, Eiffel, Modula 3, Oberon, Haskell, OCaml--there are frequent cries of "Why don't more people realize our language is so cool?" Seems like the best thing for Erlang is to just write great applications with it. James From Sean.Hinde@REDACTED Mon Apr 10 10:10:04 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Mon, 10 Apr 2000 09:10:04 +0100 Subject: New timer app Message-ID: <402DD461F109D411977E0008C791C312564D60@imp02mbx.one2one.co.uk> All, I recently posted a little application derived from the standard timer module in Kernel which uses an ordered_set mnesia table with a couple of indeces to give something which is more scalable. I have two versions of this though, one based on an mnesia table, and one using three ets tables to do the same. My question is really which one are people going to find more useful (if at all ;-))? Pretty much everything I write has a big dollop of mnesia at the core but I guess that is not the general case? In fact I think I might have persuaded myself the ets one is better! Views? Sean From kenneth@REDACTED Mon Apr 10 11:06:12 2000 From: kenneth@REDACTED (Kenneth Lundin) Date: Mon, 10 Apr 2000 11:06:12 +0200 Subject: ASN.1 - ANY, ANY DEFINED BY and EXTERNAL types? References: <4.2.2.20000409113520.00a81370@192.168.11.1> Message-ID: <38F19983.CC8D236B@erix.ericsson.se> maillist wrote: > Hi, > from the documentation > > http://www.erlang.org/documentation/lib/asn1-1.2.7/doc/html/asn1_ug.html#1.4 > > it states that these types are not supported in (version 1.03), > > I have tried an experiment with the latest version OTP R6B and this seems > to be > still the case. Yes ANY, ANY DEFINED BY and EXTERNAL is still not supported. When the development of the compiler started I took the decision to support the 1994 standard where ANY and ANY DEFINED BY was removed. Since then the standards has grown and the whole area iaround ASN.1 is very big with Information Object Classes, Parameterization, Constraints , PER etc. and it is very hard to support everything in those standards. It is also difficult to make a choice of what is most important to support next. Therefore my current strategy is to implement new things based on what my customers need and based upon the actual ASN.1 specifications that they want to implement contains. I have realised that it is necessary to support ANY and other things from the old 1988 standard at the same time as the new stuff because there are quite many specifications based on that standard that are still interesting. Currently a preliminary list of planned enhancements and new functionality looks like this: - Bugfixes - Enhanced performance in encode/decode (as always) - Improved handling of values (necessary) - Information Object Classes - PER (unaligned) - ANY, ANY DEFINED BY - EXTERNAL ... (I have plans to define a special module "ASN1" which specifies EXTERNAL and other "known" types and let the compiler look into that module whenever necessary. > If someone else can provide a solution for ANY, ANY DEFINED BY etc. I will be happy to include it. > > > has anybody done any work on this or is it something that somebody is > looking at for the future? > > regards > Kevin regards Kenneth -- Kenneth Lundin Ericsson Utvecklings AB kenneth@REDACTED ?T2/UAB/F/P BOX 1505 +46 8 727 57 25 125 25 ?lvsj? From sam@REDACTED Mon Apr 10 12:37:28 2000 From: sam@REDACTED (Samuel Tardieu) Date: Mon, 10 Apr 2000 12:37:28 +0200 Subject: Subject: Erlang adventures; Erlang image and "success" In-Reply-To: <20000409234215.20946.qmail@web304.mail.yahoo.com>; from costelv@yahoo.com on Sun, Apr 09, 2000 at 04:42:15PM -0700 References: <20000409234215.20946.qmail@web304.mail.yahoo.com> Message-ID: <2000-04-10-12-37-28+trackit+sam@inf.enst.fr> On 9/04, Costel Vrinceanu wrote: | It's not popular though - not because that's a totaly | desirable thing. We came to the same conclusion some years ago in an Ada group: if we call the next revision of Ada (2005?) Java++, everyone will start doing Ada... That's scaring. As far as Erlang, Ada or Python (my 3 favourite languages) are concerned, I much prefer to convince people based on technical grounds rather than on flashy things. However, I have to admit that the application monitor helps *A LOT* to illustrate fault-tolerance capacities of Erlang. I think the only thing Erlang and Ada lack are *graphical* killer applications. My advice would be: people, if you build a complex system in Erlang, take a small part of the time you have freed by using Erlang to build a graphical monitoring of your application. It works. From etxuwig@REDACTED Mon Apr 10 13:09:30 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Mon, 10 Apr 2000 13:09:30 +0200 (MET DST) Subject: Subject: Erlang adventures; Erlang image and "success" In-Reply-To: <2000-04-10-12-37-28+trackit+sam@inf.enst.fr> Message-ID: On Mon, 10 Apr 2000, Samuel Tardieu wrote: sam>My advice would be: people, if you build a complex system in sam>Erlang, take a small part of the time you have freed by using sam>Erlang to build a graphical monitoring of your application. It sam>works. Yes, this reminds me of Martin Wikborg telling me of the thesis project to write an army troop movement simulator in Erlang. They spent 6-7 weeks (I think) writing the actual simulator, and then quickly pasted together a GUI for the purposes of the demo. Almost all the audience's attention during the demo was focused at the GUI... I've had similar painful experiences -- the most flagrant being one where I demo:ed a decision support system in Dubai. It had a decent enough GUI, but the guy in the booth next to me (Admiral Systems, Inc.) had a simulation tool with a *suberb* GUI. My explanation that "this is live, that is Memorex" didn't seem to cut mustard. All the customers saw was the GUI. So, yes, it's all too easy to think that the customer will realise the magic that goes on behind the scenes -- very few of them will. You have to make it visible. /Uffe -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From sam@REDACTED Mon Apr 10 17:16:59 2000 From: sam@REDACTED (Samuel Tardieu) Date: 10 Apr 2000 17:16:59 +0200 Subject: New timer app In-Reply-To: Sean Hinde's message of "Mon, 10 Apr 2000 09:10:04 +0100" References: <402DD461F109D411977E0008C791C312564D60@imp02mbx.one2one.co.uk> Message-ID: <2000-04-10-17-16-59+trackit+sam@inf.enst.fr> >>>>> "Sean" == Sean Hinde writes: Sean> I have two versions of this though, one based on an mnesia Sean> table, and one using three ets tables to do the same. If I remember well (I've seen something like this in the release notes), ordered sets in Mnesia have to be kept in RAM, right? If this is still the case, I think the ets version may be more lightweight. Sam -- Samuel Tardieu -- sam@REDACTED From vances@REDACTED Mon Apr 10 20:23:59 2000 From: vances@REDACTED (Vance Shipley) Date: Mon, 10 Apr 2000 14:23:59 -0400 Subject: Subject: Erlang adventures; Erlang image and "success" In-Reply-To: <200004100112.UAA07821@node-03.advancenet.net> Message-ID: } Hmmm...I'd get a coffee mug, were one available. ... } Surely there are already a zillion Erlang mugs out there? :) I have one. :) -Vance From kurt.wilkin@REDACTED Thu Apr 13 02:05:56 2000 From: kurt.wilkin@REDACTED (Kurt) Date: Thu, 13 Apr 2000 12:05:56 +1200 Subject: newbie q. References: Message-ID: <38F50F64.B8E85337@actfs.co.nz> Greetings all. Given this: adder = fun(X) -> fun(Y) -> X + Y end end. I can do this : Adder3 = adder(3). and Adder3(10) returns 13. However I can also do this: AdderX = adder(Adder3). So, how can I call AdderX ? Is it possible? When I do AdderX(5), is this trying to do: Adder3 + 5 which is an error, but is syntactically correct? Or have I got so used to pedantic type checking that I don't even realise when I'm being lazy anymore? Also, if `->' is `returns' (is it?), what does the '=' in the declaration mean? Thanks. From thomas@REDACTED Thu Apr 13 08:40:03 2000 From: thomas@REDACTED (Thomas Arts) Date: Thu, 13 Apr 2000 08:40:03 +0200 Subject: newbie q. References: <38F50F64.B8E85337@actfs.co.nz> Message-ID: <38F56BC3.AEAC2D63@cslab.ericsson.se> Kurt wrote: > > Greetings all. > Given this: > > adder = fun(X) -> fun(Y) -> X + Y end end. I guess you mean Adder = fun(X) -> fun(Y) -> X + Y end end. Since "adder" without a capital is an atom and in that sense you try to match an atom with a function, which fails. In case of "Adder" with a capital, Adder is a variable and you try to match the variable with the function. If Adder has not yet been asigned a value, this match is an assignment for Adder to become placeholder for the function definition. > I can do this : > Adder3 = adder(3). > and Adder3(10) returns 13. This match is equivalent to Adder3 = fun(Y) -> 3 + Y end. > However I can also do this: > AdderX = adder(Adder3). which is equivalent to AdderX = fun(Y) -> (fun(Z) -> 3+Z end) + Y end. > So, how can I call AdderX ? Is it possible? sure you can call this AdderX and it will give exactly the right result: Error: badarith AdderX(5) results in an attempt to add 5 to a function. This is not possible, hence the error message. > When I do AdderX(5), is this trying to do: Adder3 + 5 > which is an error, but is syntactically correct? Sure, the syntax permits more than what is computational possible. As in most languages. The syntax for example allows to write 2/0, but most languages give up on this. It's not really the nicest type error you could hope for, but you are at least warned for doing something strange instead of having a runtime system that assumes the value to be 0 and continues computation ;0). /Thomas From etxuwig@REDACTED Thu Apr 13 15:33:43 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Thu, 13 Apr 2000 15:33:43 +0200 (MET DST) Subject: New timer app In-Reply-To: <402DD461F109D411977E0008C791C312564D60@imp02mbx.one2one.co.uk> Message-ID: On Mon, 10 Apr 2000, Sean Hinde wrote: Sean>All, Sean> Sean>I recently posted a little application derived from the Sean>standard timer module in Kernel which uses an ordered_set Sean>mnesia table with a couple of indeces to give something Sean>which is more scalable. Sean> Sean>I have two versions of this though, one based on an mnesia Sean>table, and one using three ets tables to do the same. Sean> Sean>My question is really which one are people going to find Sean>more useful (if at all ;-))? Pretty much everything I write Sean>has a big dollop of mnesia at the core but I guess that is Sean>not the general case? Sean> Sean>In fact I think I might have persuaded myself the ets one is Sean>better! Views? I must have dozed off for a while -- I didn't realize what you'd done until now. At AXD 301, we have forbidden use of the timer module, and recommend using our own module, sysTimer. The reason is that timer.erl is very inefficiently implemented. We discovered that it was much (rougly 10x) cheaper to use the classic schoolbook example: send_after(Time, Msg) -> spawn_link(?MODULE, do_send_after, [self(), Time, Msg]). do_send_after(Pid, Time, Msg) -> receive after Time -> Pid ! {timeout, self(), Msg} end. Since then, OTP has implemented support for timers as BIFs, and our sysTimer module now uses the BIFs instead. I've attached our sysTimer module for your perusal. Note that it contains some other functions, like send_after_specified(DateTime). It is not API-compatible with timer.erl, and uses a special mnesia table for "logical timers". If you want to use it, you can rewrite parts to make it run outside of AXD 301. /Uffe -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 -------------- next part -------------- %%% #-------------------------------------------------------------------------- %%% #0. BASIC INFORMATION %%% #-------------------------------------------------------------------------- %%% %CCaseFile: sysTimer.erl % %%% Description: Handles system timers. See MID sysTimer_MID.fm %%% for information. %%% However, note that all functions in sysTimer uses %%% utc (universal time). This means that all specified %%% times must be specified in utc when calling sysTimer. %%% Currently, there is no support for converting %%% local time to universal time (day-live saving ..) %%% in sysTimer or in OTP. %%% %%% Modules used: mnesia, calendar, erlang, sysTimezone %%% ---------------------------------------------------------- -module(sysTimer). %-behaviour(timer). -id('19/190 55-CNA 121 70'). -vsn('/main/Inc3/Inc4/Inc5/R2A/R3B/R4A/R6A/3'). -date('99-10-05'). -author('etxtopi'). %%% ---------------------------------------------------------- %%% Template Id: ETX/B 00201 - 19055/1 Rev C %%% %%% #Copyright (C) 1996 %%% by ERICSSON TELECOM AB %%% S - 125 26 STOCKHOLM %%% SWEDEN, tel int + 46 8 719 0000 %%% %%% The program may be used and/or copied only with the written permission from %%% ERICSSON TELECOM AB, or in accordance with the terms and conditions %%% stipulated in the agreement/contract under which the program has been %%% supplied. %%% %%% All rights reserved. %%% %%% %%% #-------------------------------------------------------------------------- %%% #1. REVISION LOG %%% #-------------------------------------------------------------------------- %%% Rev Date Name What %%% ----- ------- -------- -------------------------- %%% PA1 960814 epkolso Created. %%% PA2 960815 etxberb Correction. %%% PA3 960816 etxberb System messages added. %%% PA4 960819 etxberb An mnesia-read operation added to function %%% start_server/1. %%% PA5 960822 etxberb The return value from function start_server %%% changed to {ok,Pid}. %%% PA6 960829 etxberb SYS_DEBUG added. %%% PA7 960916 epkolso Changed module name to sysTimer. %%% Added start_interval. %%% Took out all ugly mnesia reads and %%% system dependent stuff to make it more %%% general, useful, and beautiful. %%% PA8 961016 epkulwi Added sleep, apply_after, etc. %%% Changed names and certain behavior. %%% PA9 970304 epkulwi Changed behaviour of xxx_interval, %%% Added sysTimeout(). %%% Inc4/1 970617 etxuwig Changed apply_interval to be exact. %%% Inc4/4 970901 etxtryd Added apply_timer_specified %%% Inc4/6 970910 etxtryd Test before spwn in apply_timer_specified %%% Inc4/7 970911 etxtryd export wait_a_day %%% Inc4/8 970914 etxtryd Updates comments by etxuwig %%% Inc4/9 971111 etxtryd Added send_after_specified %%% Inc4/10 971203 etxtryd Uses utc instead of local time. %%% Inc5/1 980130 etxtopi Added convert_2utc %%% Inc5/2 980505 etxtopi convert_2utc calls erlang %%% R2A/1 980507 etxuwig changed dirty_read() to ets:lookup() %%% R3B/2 981007 etxtopi convert_2utc has to entries now. %%% R3B/4 981103 etxuwig added put() statements for debugging %%% R3B/5 981106 etxuwig timer BIFs, code_change in interval timers %%% R6A/1 990614 etxtryd changed to dirty_read() from ets:lookup() %%% R6A/2 990705 etxtryd ets:lookup() back again %%% R6A/3 991004 etxtopi New convert_2utc %%% #-------------------------------------------------------------------------- %%% #2. EXPORT LISTS %%% #-------------------------------------------------------------------------- %%% #2.1 EXPORTED INTERFACE FUNCTIONS %%% #-------------------------------------------------------------------------- -export([send_after/2, send_after_specified/2, send_interval/2, apply_after/4, apply_after_specified/4, apply_interval/4, convert_2utc/2, convert_2utc/1, cancel/1, sleep/1, set_value/2, get_value/1, system_time/0]). -export([sysTimeout/0]). %%% #-------------------------------------------------------------------------- %%% #2.2 EXPORTED INTERNAL FUNCTIONS %%% #-------------------------------------------------------------------------- -export([do_send_after/3, do_send_interval/3, do_apply_after/5, do_apply_after_specified/5, do_apply_interval/6, wait_a_day/3, wait_a_day/5]). %%% #-------------------------------------------------------------------------- %%% #2.3 DEFINITION OF CONSTANTS %%% #-------------------------------------------------------------------------- -include("sysDefines.hrl"). -record(sysTimer, {key, value}). %%% #-------------------------------------------------------------------------- %%% #2.4 DEFINITION OF CONSTANTS AS MACROS %%% #-------------------------------------------------------------------------- %%% #-------------------------------------------------------------------------- %%% #3. CODE %%% #-------------------------------------------------------------------------- %%% #3.1 CODE FOR EXPORTED INTERFACE FUNCTIONS %%% #-------------------------------------------------------------------------- %%%---------------------------------------------------------------------- %%% -type sysTimeout()-> %%% integer(). %%% Input: - %%% Output: Value %%% Exceptions: %%% Description: Reads the value stored as sysTimeout in Mnesia, %%% or returns a hardcoded default. %%%---------------------------------------------------------------------- sysTimeout() -> case catch ets:lookup(sysTimer, sysTimeout) of [#sysTimer{value = Time}] -> Time; _ -> 10000 end. %%%---------------------------------------------------------------------- %%% -type set_value(Name : atom(), Time : integer())-> %%% term(). %%% Input: Name, Time %%% Output: ok %%% Exceptions: Exits if Mnesia isn't running. %%% Description: Sets named timer Name to timeout value Time. %%% Specifically, it stores the relation in the Mnesia %%% table sysTimer (which it creates if it isn't there.) %%%---------------------------------------------------------------------- set_value(Name, Time) when atom(Name), integer(Time), Time >= 0 -> ok = verify_table(), mnesia:dirty_write(#sysTimer{key = Name, value = Time}). get_value(Name) -> case ets:lookup(sysTimer, Name) of [#sysTimer{value = Time}] -> Time; _ -> exit(undef) end. %%%---------------------------------------------------------------------- %%% -type send_after(TimerSpec : term(), Msg : term())-> %%% term(). %%% Input: TimerSpec, Msg %%% Output: Key %%% Exceptions: Exit if named timer hasn't been defined. %%% Description: TimerSpec specifies the timeout value, either %%% indirectly by name or directly in milliseconds. %%% Send a message after timeout given by TimerSpec. %%% The format of the message is {timeout, Key, Msg}. %%%---------------------------------------------------------------------- %send_after(Time, Msg) when integer(Time) -> % spawn_link(sysTimer,do_send_after,[Time, self(), Msg]); %send_after(Name, Msg) -> % spawn_link(sysTimer, do_send_after, [get_value(Name), self(), Msg]). send_after(Time, Msg) when integer(Time) -> erlang:start_timer(Time, self(), Msg); send_after(Name, Msg) -> erlang:start_timer(get_value(Name), self(), Msg). %%%---------------------------------------------------------------------- %%% -type send_after_specified(TimerSpec : {{year, month, day}, %%% {hour, minute, second}}, Msg : term()) -> %%% term(). %%% Input: TimerSpec (all values are integers), Msg %%% Output: Key | invalid_timer_specified %%% Exceptions: - %%% Description: Send a message after timeout given by TimerSpec. %%% The format of the message is {timeout, Key, Msg}. %%% TimerSpec is specified in calender:universal_time() %%% format. %%%---------------------------------------------------------------------- send_after_specified({{SYear,SMonth,SDay}, {SHour, SMin, SSec}}, Msg) -> case calendar:time_difference(calendar:universal_time(), {{SYear,SMonth,SDay}, {SHour, SMin, SSec}}) of {DDate, {DHour, DMin, DSec}} -> if DDate < 0 -> % Faulty timer specified invalid_timer_specified; DDate == 0 -> % Same day Time = ((DHour*3600) + (DMin*60) + DSec) * 1000, send_after(Time, Msg); % spawn_link(sysTimer, % do_send_after, [Time, self(), Msg]); DDate > 0 -> % Start by waiting a day spawn_link(sysTimer, wait_a_day, [{{SYear,SMonth,SDay}, {SHour, SMin, SSec}}, Msg, self()]) end end; send_after_specified(FaultyTimeSpecified, Msg) -> invalid_timer_specified. %%%---------------------------------------------------------------------- %%% -type send_interval(TimerSpec : term(), Msg : term())-> %%% term(). %%% Input: TimerSpec, Msg %%% Output: Key %%% Exceptions: Exit if named timer hasn't been started. %%% Description: TimerSpec specifies the timeout value, either %%% indirectly by name or directly in milliseconds. %%% Send a message at intervals given by TimerSpec. %%% The message sent is {timeout, Key, Msg}. %%% If Time is a logical Timer name, the timer thread %%% will re-read the actual timer value at each interval. %%% Thus, a call to sysTimer:set_value(Name, Value) will %%% be reflected in each running interval thread which %%% uses that logical timer. %%%---------------------------------------------------------------------- %send_interval(Time, Msg) when integer(Time) -> % spawn_link(sysTimer,do_send_interval,[Time, self(), Msg]); send_interval(NameOrTime, Msg) -> spawn_link(sysTimer, do_send_interval, [NameOrTime, self(), Msg]). %%%---------------------------------------------------------------------- %%% -type cancel(Key : term())-> %%% term(). %%% Input: Key %%% Output: ok %%% Exceptions: %%% Description: Cancels timer request identified by Key. %%% If the timeout message has already been sent, it is %%% removed from the message queue. %%%---------------------------------------------------------------------- cancel(Pid) when pid(Pid) -> unlink(Pid), exit(Pid, kill), receive {timeout, Pid, _} -> ok after 0 -> ok end; cancel(TimerRef) -> case erlang:cancel_timer(TimerRef) of false -> receive {timeout, TimerRef, _} -> ok after 0 -> ok end; _ -> ok end. %%%---------------------------------------------------------------------- %%% -type apply_after(TimerSpec : term(), %%% M : atom(), F : atom(), A : list())-> %%% term(). %%% Input: TimerSpec, Module, Function, Args %%% Output: Key %%% Exceptions: %%% Description: Apply function {Module, Function, Args} after Time. %%% This call is made from within a separate process. %%%---------------------------------------------------------------------- apply_after(Time, M, F, A) when integer(Time) -> spawn_link(sysTimer, do_apply_after, [Time, M, F, A, self()]); apply_after(Name, M, F, A) -> spawn_link(sysTimer, do_apply_after, [get_value(Name), M, F, A, self()]). %%%---------------------------------------------------------------------- %%% -type apply_after_specified(TimerSpec : {{year, month, day}, %%% {hour, minute, second}}, M : atom(), %%% F : atom(), A : list())-> %%% term(). %%% Input: TimerSpec (all values are integers), Module, Function, Args %%% Output: Key | invalid_timer_specified | already_expired %%% Exceptions: %%% Description: Apply function {Module, Function, Args} when the %%% current time (calendar:universal_time() is equal to the %%% specified TimerSpec. %%% This call is made from within a separate process. %%%---------------------------------------------------------------------- apply_after_specified({{SYear,SMonth,SDay}, {SHour, SMin, SSec}}, M, F, A) -> case calendar:time_difference(calendar:universal_time(), {{SYear,SMonth,SDay}, {SHour, SMin, SSec}}) of {DDate, {DHour, DMin, DSec}} -> if DDate < 0 -> % Faulty timer specified already_expired; DDate == 0 -> % Same day Time = ((DHour*3600) + (DMin*60) + DSec) * 1000, % spawn_link(sysTimer, do_apply_after, [Time, M, F, A, % self()]); apply_after(Time, M, F, A); DDate > 0 -> % Start by waiting a day spawn_link(sysTimer, wait_a_day, [{{SYear,SMonth,SDay}, {SHour, SMin, SSec}}, M, F, A, self()]) end end; apply_after_specified(FaultyTimeSpecified, M, F, A) -> invalid_timer_specified. %%%---------------------------------------------------------------------- %%% -type apply_interval(Time : integer(), %%% M : atom(), F : atom(), A : list())-> %%% term(). %%% Input: Time, Module, Function, Args %%% Output: Key %%% Exceptions: %%% Description: Apply function {Module, Function, Args} repeatedly %%% after Time. %%% This call is made from within a separate process. %%% The timer makes sure that the interval stays exact %%% relative to the start time. If the applied function %%% doesn't return until an interval has been passed, the %%% timer will wait until the next interval. %%% If Time is a logical Timer name, the timer thread %%% will re-read the actual timer value at each interval. %%% Thus, a call to sysTimer:set_value(Name, Value) will %%% be reflected in each running interval thread which %%% uses that logical timer. %%%---------------------------------------------------------------------- %apply_interval(Time, M, F, A) when integer(Time) -> % Pid = spawn_link(sysTimer, do_apply_interval, % [Time, M, F, A]); apply_interval(NameOrTime, M, F, A) -> Now = erlang:now(), Pid = spawn_link(sysTimer, do_apply_interval, [NameOrTime, Now, Now, M, F, A]). sleep(Time) -> receive after Time -> ok end. %%%---------------------------------------------------------------------- %%% -type convert_2utc(Date : term(), Time : term())-> %%% term(). %%% Input: {YYYY,MM,DD},{HH,MM,SS} %%% Output: {{NewDate}, {NewTime}} %%% Exceptions: - %%% Description: Converts the localtime to the corresponding UTC-time %%% (universal_time). This method does not use local_time_to_universal_time %%% which gives you faulty results when using non-existing times (eg. %%% a time in the "DST/STD gap"). %%% %%%---------------------------------------------------------------------- convert_2utc(Date, Time) -> convert_2utc({Date, Time}). convert_2utc({Date, Time}) -> %% stolen from lole D1 = calendar:datetime_to_gregorian_seconds(calendar:local_time()), D2 = calendar:datetime_to_gregorian_seconds({Date, Time}), Diff = D2-D1, D3 = calendar:datetime_to_gregorian_seconds(calendar:universal_time()), D4 = D3+Diff, calendar:gregorian_seconds_to_datetime(D4). %%% %%% return the system time in %%% milli-seconds. %%% system_time() -> {M,S,U} = erlang:now(), 1000000000 * M + 1000 * S + (U div 1000). %% %% Calculate difference between two timestamps. %% It's important to avoid using bignums (>16#FFFFFF). %% diff({M,S,U}, {M,S1,U1}) -> ((S-S1) * 1000) + ((U-U1) div 1000); diff({M,S,U}, {M1,S1,U1}) -> ((M-M1)*1000000+(S-S1))*1000 + ((U-U1) div 1000). %% %% add(Time, Timestamp) -> Timestamp1 %% This function adds Time milliseconds to a %% timestamp and returns a new timestamp. %% This is used by apply_interval to maintain %% constant intervals. Timestamp1 should always %% be of type (StartTime + N*Time). %% add(Time, {M,S,U}) -> U1 = (U + Time * 1000), S1 = (S + (U1 div 1000000)), {M + S1 div 1000000, S1 rem 1000000, U1 rem 1000000}. %% %% sleep_time(Time, Acc) -> {TimeToSleep, Acc1} %% Time ::= timeout in milliseconds %% Acc ::= accumulated timestamp %% This function adds Time to Acc and calculates %% how many milliseconds remain to Acc1. %% Assuming that Time is constant Acc1 will always %% be the next (StartTime + N*Time) in the future, %% that is, an interval may be skipped for whatever %% reason, and sleep_time/2 will keep up. %% sleep_time(Time, Acc) -> Acc1 = add(Time, Acc), case diff(Acc1,erlang:now()) of N when N > 0 -> {normal, N, Acc1}; Less -> Time1 = Time * ((-Less div Time)+1), {skip, Time1 + Less, add(Time1+Time, Acc)} end. %%% #-------------------------------------------------------------------------- %%% #3.2 CODE FOR EXPORTED INTERNAL FUNCTIONS %%% #-------------------------------------------------------------------------- do_send_after(Time, Pid, Msg) -> put(arguments, [Time, Pid, Msg]), receive after Time -> Pid ! {timeout, self(), Msg}, unlink(Pid) end. do_send_interval(Time, Pid, Msg) when integer(Time) -> put(arguments, [Time, Pid, Msg]), receive after Time -> Pid ! {timeout, self(), Msg}, ?MODULE:do_send_interval(Time, Pid, Msg) end; do_send_interval(Name, Pid, Msg) -> put(arguments, [Name, Pid, Msg]), Time = get_value(Name), receive after Time -> Pid ! {timeout, self(), Msg}, ?MODULE:do_send_interval(Name, Pid, Msg) end. do_apply_after(Time, M, F, A, LinkedPid) -> put(arguments, [Time, M, F, A, LinkedPid]), receive after Time -> apply(M, F, A), unlink(LinkedPid) end. wait_a_day(SpecifiedTime, M, F, A, LinkedPid) -> put(arguments, [SpecifiedTime, M, F, A, LinkedPid]), receive after (24*3600*1000) -> % One day in milliseconds do_apply_after_specified(SpecifiedTime, M, F, A, LinkedPid) end. wait_a_day(SpecifiedTime, Msg, UserPid) -> put(arguments, [SpecifiedTime, Msg, UserPid]), receive after (24*3600*1000) -> % One day in milliseconds do_send_after_specified(SpecifiedTime, Msg, UserPid) end. do_apply_after_specified(SpecifiedTime, M, F, A, LinkedPid) -> put(arguments, [SpecifiedTime, M, F, A, LinkedPid]), case calendar:time_difference(calendar:universal_time(), SpecifiedTime) of {Date, {Hour, Min, Sec}} -> if Date == 0 -> % Same day Time = ((Hour*3600) + (Min*60) + Sec) * 1000, do_apply_after(Time, M, F, A, LinkedPid); Date > 0 -> % Day in the future wait_a_day(SpecifiedTime, M, F, A, LinkedPid); Date < 0 -> % This clause can occur if the SpecifiedTime is % day(s) + 1 (or some) second and the load is % very high. do_apply_after(1, M, F, A, LinkedPid) end end. do_send_after_specified(SpecifiedTime, Msg, UserPid) -> put(arguments, [SpecifiedTime, Msg, UserPid]), case calendar:time_difference(calendar:universal_time(), SpecifiedTime) of {Date, {Hour, Min, Sec}} -> if Date == 0 -> % Same day Time = ((Hour*3600) + (Min*60) + Sec) * 1000, do_send_after(Time, UserPid, Msg); Date > 0 -> % Day in the future wait_a_day(SpecifiedTime, Msg, UserPid); Date < 0 -> % This clause can occur if the SpecifiedTime is % day(s) + 1 (or some) second and the load is % very high. do_send_after(1, Msg, UserPid) end end. do_apply_interval(Time, Start, Acc, M, F, A) when integer(Time) -> put(arguments, [Time, Start, Acc, M, F, A]), {Mode, Sleep, Acc1} = sleep_time(Time, Acc), receive after Sleep -> apply(M, F, A), ?MODULE:do_apply_interval(Time, Start, Acc1, M, F, A) end; do_apply_interval(Name, Start, Acc, M, F, A) -> put(arguments, [Name, Start, Acc, M, F, A]), Time = get_value(Name), {Mode, Sleep, Acc1} = sleep_time(Time, Acc), receive after Sleep -> apply(M, F, A), ?MODULE:do_apply_interval(Name, Start, Acc1, M, F, A) end. %%% #-------------------------------------------------------------------------- %%% #3.3 CODE FOR INTERNAL FUNCTIONS %%% #-------------------------------------------------------------------------- verify_table() -> case catch mnesia:table_info(sysTimer, name) of {'EXIT', _} -> case catch mnesia:system_info(db_nodes) of {'EXIT', _} -> exit({error, mnesia_not_running}); Nodes -> {atomic, ok} = mnesia:create_table([{name, sysTimer}, {disc_copies, Nodes}, {attributes, [key, value]}]), ok end; _ -> ok end. %%% #-------------------------------------------------------------------------- %%% #4 CODE FOR TEMPORARY CORRECTIONS %%% #-------------------------------------------------------------------------- %%% ---------------------------------------- %%% end of sysTimer.erl From Sean.Hinde@REDACTED Thu Apr 13 20:55:21 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Thu, 13 Apr 2000 19:55:21 +0100 Subject: ClearCase and such like Message-ID: <402DD461F109D411977E0008C791C312564D79@imp02mbx.one2one.co.uk> All, I'm thinking of buying a clever build management tools such as Rational ClearCase. Does anyone have much experience of using these tools in an Erlang development environment. i.e. nice integration with emacs, and integration with the OTP directory structure, but also with some powerful features like parallel builds and checkpoint builds etc? Particularly I'd like to hear if anyone has had to do large customisations of these tools to make them fit. Thanks very much, Sean From Sean.Hinde@REDACTED Thu Apr 13 21:00:20 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Thu, 13 Apr 2000 20:00:20 +0100 Subject: New timer app Message-ID: <402DD461F109D411977E0008C791C312564D7A@imp02mbx.one2one.co.uk> Uffe, Thanks very much for the sysTimer module example. Just goes to show how one persons optimisation is anothers example.. > If you want to use it, you can rewrite parts to make it run outside of > AXD 301. I notice that there are dire Ericsson copyright warnings all over the header of the sysTimer file. This raises the question of what should we be putting as the header on erlang code we publish to protect all from misuse, allow freedom to change etc etc. The guys from erlang.org suggested the EPL, which seems good. Most of the files in the contributions have little or no header or ownership info though. Views? Sean From sam@REDACTED Thu Apr 13 21:44:31 2000 From: sam@REDACTED (Samuel Tardieu) Date: Thu, 13 Apr 2000 21:44:31 +0200 Subject: New timer app In-Reply-To: <402DD461F109D411977E0008C791C312564D7A@imp02mbx.one2one.co.uk>; from Sean.Hinde@one2one.co.uk on Thu, Apr 13, 2000 at 08:00:20PM +0100 References: <402DD461F109D411977E0008C791C312564D7A@imp02mbx.one2one.co.uk> Message-ID: <2000-04-13-21-44-31+trackit+sam@inf.enst.fr> On 13/04, Sean Hinde wrote: | The guys from erlang.org suggested the EPL, which seems good. Most of the | files in the contributions have little or no header or ownership info | though. Every license has its pros and its cons. As far as I am concerned, I choose the GPL whenever I want to make sure that my code will never be part of a closed-source application and the BSD license when I don't care if people use it in their application even if they do not want to release the source, for whatever reason (one may be that this is just impractical). Sam From hal@REDACTED Fri Apr 14 06:08:53 2000 From: hal@REDACTED (Hal Snyder) Date: 13 Apr 2000 23:08:53 -0500 Subject: ClearCase and such like In-Reply-To: Sean Hinde's message of "Thu, 13 Apr 2000 19:55:21 +0100" References: <402DD461F109D411977E0008C791C312564D79@imp02mbx.one2one.co.uk> Message-ID: <87itxlwch6.fsf@ghidra.vail> Sean Hinde writes: > I'm thinking of buying a clever build management tools such as > Rational ClearCase. > > Does anyone have much experience of using these tools in an Erlang > development environment. i.e. nice integration with emacs, and > integration with the OTP directory structure, but also with some > powerful features like parallel builds and checkpoint builds etc? > > Particularly I'd like to hear if anyone has had to do large > customisations of these tools to make them fit. > > Thanks very much, > > Sean I remember reading that Ericsson uses ClearCase for in-house version control. I have worked at installations using ClearCase and others using DSEE (ancestor of ClearCase), CVS, etc. I'd rather flip burgers than deal with ClearCase on a daily basis again; to me it seemed a slow, bloated, overpriced resource hog and an administrative sinkhole. YMMV, I know there are competent professionals who actually like ClearCase. At one point at a site where they used ClearCase we had two contractors on site full time from Rational and got involved over several days in lengthy and increasingly existential discussions about the feasibility of distributed repositories over WAN connections. Something the free software guys do every day on a shoestring without even thinking about it. Sorry for the rant. I think the growth of the Erlang as an open platform is a wonderful thing. Coolness factors: Erlang, +10; ClearCase, 0. From klacke@REDACTED Fri Apr 14 09:28:00 2000 From: klacke@REDACTED (Klacke) Date: Fri, 14 Apr 2000 09:28:00 +0200 Subject: ClearCase and such like In-Reply-To: <402DD461F109D411977E0008C791C312564D79@imp02mbx.one2one.co.uk> References: <402DD461F109D411977E0008C791C312564D79@imp02mbx.one2one.co.uk> Message-ID: <20000414092800.A56293@bluetail.com> On Thu, Apr 13, 2000 at 07:55:21PM +0100, Sean Hinde wrote: > All, > > I'm thinking of buying a clever build management tools such as Rational > ClearCase. > > Does anyone have much experience of using these tools in an Erlang > development environment. i.e. nice integration with emacs, and integration > with the OTP directory structure, While at Ericsson, I (and everybody else) was running ClearCase, here at Bluetail we're running the whole show in cvs, and I must say that I prefer cvs. Primary reason is that I understand what's going on. As for emacs integration, there are emacs modes both for cvs as well as for ClearCase which do similar stuff. /klacke -- Claes Wikstrom Bluetail AB http://www.bluetail.com From bud@REDACTED Thu Apr 13 00:44:41 2000 From: bud@REDACTED (Bud P. Bruegger) Date: Thu, 13 Apr 2000 00:44:41 +0200 Subject: ClearCase and such like In-Reply-To: <402DD461F109D411977E0008C791C312564D79@imp02mbx.one2one.co .uk> Message-ID: <3.0.6.32.20000413004441.008a9100@mail.sistema.it> Has any of you looked at Aegis (http://freshmeat.net/appindex/1998/07/08/899909564.html)? Haven't used it yet, but the reading I did on it and some discussion with Peter Miller, the author, made it look VERY attractive. --bud /------------------------------------------------------------------------\ | Bud P. Bruegger, Ph.D. | mailto:bud@REDACTED | | Sistema | http://www.sistema.it | | Information Systems | voice general: +39-0564-418667 | | Via U. Bassi, 54 | voice direct: +39-0564-418667 (internal 41)| | 58100 Grosseto | fax: +39-0564-426104 | | Italy | P.Iva: 01116600535 | \------------------------------------------------------------------------/ From Sean.Hinde@REDACTED Fri Apr 14 10:51:42 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Fri, 14 Apr 2000 09:51:42 +0100 Subject: ClearCase and such like Message-ID: <402DD461F109D411977E0008C791C312564D7C@imp02mbx.one2one.co.uk> An interesting set of views! I'll see what the man from Rational has to say today. I'm struggling to see how cvs and ilk allow one to take an application off in a couple of experimental directions without taking the main source tree off the rails, and then use the best bits in a clever merge. ClearCase claims to manage this sort of thing quite well..? Sean From chris.williams@REDACTED Fri Apr 14 11:03:12 2000 From: chris.williams@REDACTED (Chris Williams) Date: Fri, 14 Apr 2000 10:03:12 +0100 Subject: ClearCase and such like References: <402DD461F109D411977E0008C791C312564D79@imp02mbx.one2one.co.uk> Message-ID: <38F6DED0.BA2C6510@ericsson.com> Hi We here at EA910 in Ireland have been using ClearCase for the last on and a half year with good results from a user perspective at development and builds. We have the whole of our target environment and tools and code in clearcase. Worth noting is that having the tools in clearcase make things slow but it has the advantage that all our sites can use the same tools as we use multisite between the different sites. When it comes to using emacs with clearcase we do not use this functionality but I have seen that at least emacs 20.3 has support for this facility. //Chris -- ============================================================================ Christopher Williams Phone: +353 902 31365 Ericsson Systems ECN: 8301365 Expertise Limited, Mob: +353 87 64 888 04 Athlone, Fax: +353 902 31304 Co.Westmeath, http://www.eei.ericsson.se/~eeiaxm3 Ireland chris.williams@REDACTED ============================================================================ Sean Hinde wrote: > > All, > > I'm thinking of buying a clever build management tools such as Rational > ClearCase. > > Does anyone have much experience of using these tools in an Erlang > development environment. i.e. nice integration with emacs, and integration > with the OTP directory structure, but also with some powerful features like > parallel builds and checkpoint builds etc? > > Particularly I'd like to hear if anyone has had to do large customisations > of these tools to make them fit. > > Thanks very much, > > Sean From ppetru@REDACTED Fri Apr 14 11:52:27 2000 From: ppetru@REDACTED (Petru Paler) Date: Fri, 14 Apr 2000 12:52:27 +0300 Subject: ClearCase and such like In-Reply-To: <87itxlwch6.fsf@ghidra.vail>; from hal@vailsys.com on Thu, Apr 13, 2000 at 11:08:53PM -0500 References: <402DD461F109D411977E0008C791C312564D79@imp02mbx.one2one.co.uk> <87itxlwch6.fsf@ghidra.vail> Message-ID: <20000414125227.A2370@coltronix.com> On Thu, Apr 13, 2000 at 11:08:53PM -0500, Hal Snyder wrote: > At one point at a site where they used ClearCase we had two > contractors on site full time from Rational and got involved over > several days in lengthy and increasingly existential discussions about > the feasibility of distributed repositories over WAN connections. > Something the free software guys do every day on a shoestring without > even thinking about it. BitKeeper (http://www.bitkeeper.com) is also a very good choice. -Petru From etxuwig@REDACTED Fri Apr 14 17:39:08 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Fri, 14 Apr 2000 17:39:08 +0200 (MET DST) Subject: efficient line handling Message-ID: Since the traffic in this forum is not exceptionally high, I thought I'd pitch for my latest contrib: lines-1.1. This is one of those toy problems that I find oddly relaxing. I've given some thought off and on to how one would represent lines of text in Erlang, e.g. when implementing a text editor. Obviously a simple list would be pretty inefficient... So, I implemented a module called lines.erl, which mimics a dynamic array, in which you can easily insert and delete lines anywhere, and maintain a sequential ordering. Access times are close to those of ordered set tables. The implementation is a crudely balanced B-tree, where each node contains a list of elements (length(List) =< 10.) I thought performance was quite good when I tested it with 100,000 lines (mean: 30 usec (append), 16 usec (nth)). Conceptually, the API works like the following implementation (using a list): append(Line, Lines) -> Lines ++ [Line]. nth(Pos, Lines) -> lists:nth(Pos, Lines). count(Lines) -> length(Lines). insert(1, Lines, Line) -> [Line|Lines]; insert(N, [H|T], Line) when N > 1 -> [H|insert(N-1, T, Line)]. replace(1, [H|T], X) -> [X|T]; replace(N, [H|T], X) when N > 0 -> [H|replace(N-1, T, X)]. delete(1, [H|T]) -> T; delete(N, [H|T]) when N > 0 -> [H|delete(N-1, T)]. When comparing my implementation with the above (naiive) one, my Btree version beats the list version on - nth/2 on a 20-line structure - delete/2 on a 20-line structure - append/2 on a 300-line structure (which makes sense, since ++ is a BIF.) On 1,000 lines, the Btree version is: - 20x faster on nth/2 - 25x faster on delete/2 - 4x faster on append/2 - well... 30x slower on insert(1,...) Obviously, lines.erl could be used for something other than lines of text... can't think of anything right now, though -- except perhaps that a more sophisticated word processor might handle paragraphs and page objects rather than lines of text. So, now, anyone who wants to write an emacs clone in Erlang, will at least have a reasonably efficient data structure for line handling. (: /Uffe -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From tobbe@REDACTED Fri Apr 14 18:12:37 2000 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: 14 Apr 2000 18:12:37 +0200 Subject: efficient line handling In-Reply-To: Ulf Wiger's message of "Fri, 14 Apr 2000 17:39:08 +0200 (MET DST)" References: Message-ID: Great fun ! Then perhaps you could compare the performance with: http://www.bluetail.com/~tobbe/edit_buf.erl edit_buf.hrl edit.hrl This is the core buffer handling of an Curses based editor I started to write once. /Tobbe From Matthias.Lang@REDACTED Sat Apr 15 10:01:39 2000 From: Matthias.Lang@REDACTED (Matthias.Lang@REDACTED) Date: Sat, 15 Apr 2000 10:01:39 +0200 (MET DST) Subject: ClearCase and such like In-Reply-To: <402DD461F109D411977E0008C791C312564D79@imp02mbx.one2one.co.uk> References: <402DD461F109D411977E0008C791C312564D79@imp02mbx.one2one.co.uk> Message-ID: <14584.8675.4782.867790@gargle.gargle.HOWL> > I'm thinking of buying a clever build management tools such as Rational > ClearCase. > > Does anyone have much experience of using these tools in an Erlang > development environment. i.e. nice integration with emacs, and integration I worked a year in an Erlang project with about a dozen developers where we used clearcase, I've also worked in a larger C++ project which used clearcase. The feeling I got was the clearcase really helped with the C++ project, while for Erlang it was occasionally neat, but not worth the overhead---someone needs to maintain it, someone needs to teach developers how it works, it's much more complex than CVS. The things that impressed me in the C++ project were - wink-in (clearcase figures out that you're building the same binary someone else has built, and therefore you don't need to compile it again, clearcase "winks" it in from the other person's part of the filesystem) actually does save you time and disk space. - multisite. As long as "someone else" takes care of babysitting clearcase, the developers feel little pain when a project gets split across multiple sites, e.g. half the developers in Australia and the other half in Germany. - you have lots of information available about the past, e.g. when you're trying to figure out exactly why the wrong file got shipped to the customer, you can easily roll back the clock and go see what build commands were used to make that file. It's also possible to generate reports your semi-insane quality manager demands---e.g. he turns up and wants a report showing all binaries affected by a change in source file X made in the delivery 3 weeks ago. With CVS you can get that information by staring at Makefiles, re-running the build and taking an educated guess. Clearcase stores this information automatically in its database. - you have power. If you think, say, Dave is an idiot, it's easy to get the system to warn you whenever Dave makes a change to your files. If you're heading towards a release, it's easy to lock the database so that only a couple of people have the power to make changes. In a smaller project using Erlang, these featuers aren't all that useful. Some of them are partially taken over by Erlang (e.g. a bit of build information is stored in the .beam file), some are mostly irrelevant to Erlang (wink-ins aren't imporant in Erlang because compiling is relatively fast and it's rare to have to recompile heaps of code because someone changed a .h file somewhere, there typically aren't a lot of dependencies). Hope that helps. Matt From davidg@REDACTED Sun Apr 16 03:49:55 2000 From: davidg@REDACTED (David Gould) Date: Sat, 15 Apr 2000 18:49:55 -0700 Subject: ClearCase and such like In-Reply-To: <87itxlwch6.fsf@ghidra.vail>; from Hal Snyder on Thu, Apr 13, 2000 at 11:08:53PM -0500 References: <402DD461F109D411977E0008C791C312564D79@imp02mbx.one2one.co.uk> <87itxlwch6.fsf@ghidra.vail> Message-ID: <20000415184955.A11054@dnai.com> On Thu, Apr 13, 2000 at 11:08:53PM -0500, Hal Snyder wrote: > Sean Hinde writes: > > > I'm thinking of buying a clever build management tools such as > > Rational ClearCase. > > > > Does anyone have much experience of using these tools in an Erlang > > development environment. i.e. nice integration with emacs, and > > integration with the OTP directory structure, but also with some > > powerful features like parallel builds and checkpoint builds etc? > > > > Particularly I'd like to hear if anyone has had to do large > > customisations of these tools to make them fit. > > > > Thanks very much, > > > > Sean > > I remember reading that Ericsson uses ClearCase for in-house version > control. I have worked at installations using ClearCase and others > using DSEE (ancestor of ClearCase), CVS, etc. I'd rather flip burgers > than deal with ClearCase on a daily basis again; to me it seemed a > slow, bloated, overpriced resource hog and an administrative > sinkhole. Hear Hear! I have used clearcase in large environments for the last several years. I would never again take a job at a place that used clearcase. To understate the issue completely, it sucks. Rational sell a very nice fantasy of easy management, "just see the files you need" etc, but in real life, you end up with fantastically complex configspec files, vob corruption, winkins that mysteriously do or do not happen when you want, product builds that contain phantom winkins from long dead versions, multisite replication missynchronization. I could live with all that, but it also means that the CM system is now also the file server. Each file open, each block read or write, each stat involves multiple user space processes on multiple nodes doing database queries and as a result the performance is completely horrible. At my last job if you changed a top level header file (in C) you were done for the day, just go home. It would take over six hours to build again. Without clearcase, the same product would build from the top in less than 40 minutes. The impact is to change the development experience from brisk focused joyful work to a leaden soggy slog, every day another day in Siberian labor camp. If you are interested, send me mail and I will try to go into detail about how I really feel ;-) (Oh yeah, have a look at Perforce (www.perforce.com). I have tried their demo and it rocks. Looks like it might do most of what clearcase claims as far as easy branching too). Or learn how to use CVS, it can do this job. -dg -- David Gould davidg@REDACTED 510.536.1443 - If simplicity worked, the world would be overrun with insects. - From Sean.Hinde@REDACTED Mon Apr 17 10:30:56 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Mon, 17 Apr 2000 09:30:56 +0100 Subject: ClearCase and such like Message-ID: <402DD461F109D411977E0008C791C312564D81@imp02mbx.one2one.co.uk> Guys, >Rational sell a very nice fantasy of easy >management, "just see the files you need" >etc, but in real life, you end up >with fantastically complex configspec files, I've read the manual for it and I came to the same conclusion re the view files etc. Thanks for all your very interesting comments. I guess this is getting a bit off subject now though.. Anyone know a good place where all this stuff is natively discussed? Thanks again, Sean From dne@REDACTED Tue Apr 18 01:18:33 2000 From: dne@REDACTED (Daniel Neri) Date: Tue, 18 Apr 2000 01:18:33 +0200 Subject: ClearCase and such like In-Reply-To: Sean Hinde's message of "Mon, 17 Apr 2000 09:30:56 +0100" References: <402DD461F109D411977E0008C791C312564D81@imp02mbx.one2one.co.uk> Message-ID: <87puros4dy.fsf@nowhere.mayonnaise.net> Sean Hinde writes: > Anyone know a good place where all this stuff is natively discussed? news:comp.software.config-mgmt maybe? Regards, /Daniel -- Daniel Neri dne@REDACTED From geoff@REDACTED Tue Apr 18 05:46:16 2000 From: geoff@REDACTED (Geoff Wong) Date: Tue, 18 Apr 2000 13:46:16 +1000 (EST) Subject: inet_gethost_native. Message-ID: <200004180346.DAA14079@gecko.serc.rmit.edu.au> Hi, inet_gethost_native.erl (kernel lib) has an interesting dependency upon being able to resolve names. If it fails a number of times the kernel supervisor gets shutdown and the entire node goes down. Since we're supposed to be building robust system this isn't really good behaviour (the failure occurs sometime after a cable is pulled on the box with the node in question). My question is: is this the intended behaviour? We've have a small patch that gives "better" behaviour (in our opinion). Basically it shuts down the process and its restart normally next time a resolution request is made (so you can poll name resolution if you're waiting for a paritioned network to come up again). Can people see any problems with this patch (system affecting ones)? And any reasons why this behaviour is "worse" than the current behaviour? Any feedback appreciated :) Geoff ------ cut here --- inet_gethost_native.erl Tue Apr 18 11:58:34 2000 +++ inet_gethost_native.erl.orig Tue Apr 18 11:58:33 2000 @@ -137,7 +137,7 @@ {stop, Reason, {error, Reason}, State} after Timeout -> catch erlang:port_close(Port), - {stop, normal, {error, timeout}, State} + {stop, shutdown, {error, timeout}, State} end end. @@ -212,7 +212,7 @@ ensure_started() -> case whereis(inet_gethost_native) of undefined -> - C = {inet_gethost_native, {?MODULE, start_link, []}, temporary, 1000, + C = {inet_gethost_native, {?MODULE, start_link, []}, permanent, 1000, worker, [?MODULE]}, case whereis(kernel_safe_sup) of undefined -> From hal@REDACTED Tue Apr 18 08:35:00 2000 From: hal@REDACTED (Hal Snyder) Date: 18 Apr 2000 01:35:00 -0500 Subject: erlang initial experiences Message-ID: <87k8hv3oiz.fsf@ghidra.vail> I've posted my first two Erlang programs at ftp://ftp.enteract.com/users/hal/erlang/fibsrch.erl and ftp://ftp.enteract.com/users/hal/erlang/odd.erl The latter prints how many 1's there are in the binary expansion of a positive integer; the former does Fibonacci search for maximum of a function on a finite interval. They were done with the otp_src_R6B-0 release running on a pre-release snapshot of OpenBSD-2.7. I'd be interested in knowing how to improve them and in following current Erlang usage as closely as possible. My impressions while writing them: 1. Building OTP aborted on every directory with .java files. This was due to the Makefiles trying to make .classes one at a time when there were complex and sometimes circular dependencies. With both kjc-1.4C on OpenBSD and Sun's native Java compiler (when I copied files to a SparcStation for testing), it was necessary to feed all .java files at once in a single command line to javac. With this workaround the build completed successfully. 2. I see there's a bsr but no logical shift right. A minor annoyance. 3. Support for parsing of command line arguments passed from the UNIX shell seems limited. No getopt() (or did I miss it?), and numbers are passed in as atoms so must go through the dual conversion of atom_to_list and list_to_integer. 4. The second program has perfectly legal balanced exports of variables from both branches of an if structure. This leads to a slew of inappropriate warnings - and I don't see any way to turn them off without rebuilding the compiler. There is a compiler switch to enable warning reports, on by default, but no apparent way to turn it off. Am I off base on any of these items? Erlang is fun, but there seem to be some rough edges. I plan to stay with it at least long enough to write more than toy programs. From Pekka.Hedqvist@REDACTED Wed Apr 19 04:25:36 2000 From: Pekka.Hedqvist@REDACTED (Pekka.Hedqvist@REDACTED) Date: Wed, 19 Apr 2000 12:25:36 +1000 (EST) Subject: erl 4.9.1. gen_udp, udp packages Message-ID: <14589.6432.898669.341619@eddieware.eddieware.org> When you receive udp packages they look something like: {udp,{socket,<0.41.0>,#Port<0.12>,inet_udp}, {203,102,230,172}, 1024, [1,2,3,4,5,6,7]} I suppose the "1024" means something, I asumed its the port number but its not, its always 1024 and increasing with the number of open ports so what does it represent? From Pekka.Hedqvist@REDACTED Wed Apr 19 06:30:58 2000 From: Pekka.Hedqvist@REDACTED (Pekka.Hedqvist@REDACTED) Date: Wed, 19 Apr 2000 14:30:58 +1000 (EST) Subject: erlang:now() in erlang 4.9.1 on Linux Message-ID: <14589.13954.505029.822433@eddieware.eddieware.org> When trying to measure time we get really weird values from the 'erlang:now()' when two successive calls to it are done with less than 100 microseconds between the two calls. The values are far too low; 0, 1 microseconds are reported even when maybe 60-80 has passed. If the calls are made further apart timewise they suddenly jump up to reasonable represent the passed time (when > ~100 micro has passed). For example, calling gettimeofday() in Linux directly every ~7 microseconds also returns ~7 micro each time. Looking at the erl_time_sup.c one sees that it builds without gethrtime() (since its not available in plain Linux) and with the 'CORRECT_USING_TIMES' defined. 'erlang:now()' results in a call to get_tolerant_timeofday(void) which does a number of things, some regarding internal erlang timing etc. I asume (hopefully) that the get_tolerant_timeofday(void) does the right things regarding Erlangs internal view of time, but is its side-effect on functions like erlang:now() really desirable? If so, how is one to measure time in a way that avoids these "jumps"? Write a linked in driver calling gettimeofday() directly etc..? Ideas, oppinions? /pekka From jon@REDACTED Wed Apr 19 07:05:51 2000 From: jon@REDACTED (Jon Holdsworth) Date: Wed, 19 Apr 2000 15:05:51 +1000 Subject: erl 4.9.1. gen_udp, udp packages References: <14589.6432.898669.341619@eddieware.eddieware.org> Message-ID: <38FD3EAF.C0F00451@eddieware.org> Highest Priveliged port so far ? Jon Pekka.Hedqvist@REDACTED wrote: > When you receive udp packages they look something like: > {udp,{socket,<0.41.0>,#Port<0.12>,inet_udp}, > {203,102,230,172}, > 1024, > [1,2,3,4,5,6,7]} > > I suppose the "1024" means something, I asumed its the port number but > its not, its always 1024 and increasing with the number of open ports > so what does it represent? From not.for.email@REDACTED Wed Apr 19 09:01:08 2000 From: not.for.email@REDACTED (Gordon Beaton) Date: 19 Apr 2000 07:01:08 GMT Subject: erlang initial experiences References: <87k8hv3oiz.fsf@ghidra.vail> Message-ID: <8djljk$1q3$1@news.du.uab.ericsson.se> On 18 Apr 2000 06:35:00 GMT, Hal Snyder wrote: > 1. Building OTP aborted on every directory with .java files. This was > due to the Makefiles trying to make .classes one at a time You're completely right - the OTP way of building java really sucks. Part of the problem, I guess, is due to the fact that javac and clearmake aren't on particularly friendly terms. Another is that java was introduced into OTP relatively late in the game and nobody sat down to try to figure out the best way to integrate the java components into the build system properly, resulting in a few inconsistencies in that area. For references and opinions, see the recent thread about clearcase... /gordon -- g o r d o n . b e a t o n @ e r i c s s o n . c o m From per@REDACTED Wed Apr 19 11:22:29 2000 From: per@REDACTED (Per Hedeland) Date: Wed, 19 Apr 2000 11:22:29 +0200 (MET DST) Subject: erl 4.9.1. gen_udp, udp packages In-Reply-To: <14589.6432.898669.341619@eddieware.eddieware.org> References: <14589.6432.898669.341619@eddieware.eddieware.org> Message-ID: <200004190922.LAA03714@aalborg.du.uab.ericsson.se> Pekka.Hedqvist@REDACTED wrote: >When you receive udp packages they look something like: >{udp,{socket,<0.41.0>,#Port<0.12>,inet_udp}, > {203,102,230,172}, > 1024, > [1,2,3,4,5,6,7]} > >I suppose the "1024" means something, I asumed its the port number but >its not, its always 1024 and increasing with the number of open ports ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >so what does it represent? ^^ Huh?:-) The man page seems clear, and not obviously contradicting what you're seeing: When UDP packets arrive at the opened Port they will be delivered as messages of the type {udp, Socket, IP, InPortNo, Packet} IP and InPortNo define the address from which Packet came. I.e. the number is the *source* port of the packet - delivering the destination port with each packet isn't obviously useful.:-) If the sender didn't bind to a specific port (in Erlang: Passed a Port value of 0 to gen_udp:open()), the kernel / IP stack will allocate one - the algorithm for this varies, but on many/most Unices it will be the first "free" port above 1023. --Per Hedeland per@REDACTED From etxuwig@REDACTED Wed Apr 19 11:43:35 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Wed, 19 Apr 2000 11:43:35 +0200 (MET DST) Subject: erlang:now() in erlang 4.9.1 on Linux In-Reply-To: <14589.13954.505029.822433@eddieware.eddieware.org> Message-ID: I don't know if this answers your questions, but it may provide some background to erlang:now() issues. At AXD 301, we've had some problems with the internal time representation, as we've run some pretty abusive tests on the network time synchronization mechanisms. We voiced the requirement that the real-time clock must operate reliably regardless of the system time. The specific problem is when you do stuff like "rdate" on a running system, or someone manually alters the system clock. In previous versions of Erlang/OTP, this was disastrous for the system, since timeouts, and erlang:now(), were based on the system clock. For example, if the system time was set back a couple of hours, timeout activity in Erlang would basically stop until the system clock "caught up" with the Erlang clock. This would throw our system into some kind of undefined state. In our current, patched version of OTP R5B01, we have a VM modified to decouple the internal Erlang clock from the system clock, and then checkpoint the two every once in a while. Should the clocks drift apart, the internal Erlang clock will adjust itself (=< +-1%) to slowly synchronize with the system clock. /Uffe On Wed, 19 Apr 2000 Pekka.Hedqvist@REDACTED wrote: > >When trying to measure time we get really weird values from the >'erlang:now()' when two successive calls to it are done with less than >100 microseconds between the two calls. The values are far too low; 0, >1 microseconds are reported even when maybe 60-80 has passed. If the >calls are made further apart timewise they suddenly jump up to >reasonable represent the passed time (when > ~100 micro has passed). > >For example, calling gettimeofday() in Linux directly every ~7 >microseconds also returns ~7 micro each time. > >Looking at the erl_time_sup.c one sees that it builds without >gethrtime() (since its not available in plain Linux) and with the >'CORRECT_USING_TIMES' defined. 'erlang:now()' results in a call to >get_tolerant_timeofday(void) which does a number of things, some >regarding internal erlang timing etc. > >I asume (hopefully) that the get_tolerant_timeofday(void) does the >right things regarding Erlangs internal view of time, but is its >side-effect on functions like erlang:now() really desirable? >If so, how is one to measure time in a way that avoids these "jumps"? >Write a linked in driver calling gettimeofday() directly etc..? > >Ideas, oppinions? > >/pekka > -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From etxuwig@REDACTED Wed Apr 19 11:46:09 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Wed, 19 Apr 2000 11:46:09 +0200 (MET DST) Subject: erlang:now() in erlang 4.9.1 on Linux In-Reply-To: Message-ID: Sorry, I meant to cancel this post, but my fingers tricked me. I've read erl_time_sup.c and have nothing really intelligent to contribute at the moment. /Uffe On Wed, 19 Apr 2000, Ulf Wiger wrote: > >I don't know if this answers your questions, but it may provide some >background to erlang:now() issues. > >At AXD 301, we've had some problems with the internal time >representation, as we've run some pretty abusive tests on the network >time synchronization mechanisms. We voiced the requirement that the >real-time clock must operate reliably regardless of the system time. > >The specific problem is when you do stuff like "rdate" on a running >system, or someone manually alters the system clock. In previous >versions of Erlang/OTP, this was disastrous for the system, since >timeouts, and erlang:now(), were based on the system clock. >For example, if the system time was set back a couple of hours, >timeout activity in Erlang would basically stop until the system >clock "caught up" with the Erlang clock. This would throw our system >into some kind of undefined state. > >In our current, patched version of OTP R5B01, we have a VM modified to >decouple the internal Erlang clock from the system clock, and then >checkpoint the two every once in a while. Should the clocks drift >apart, the internal Erlang clock will adjust itself (=< +-1%) to >slowly synchronize with the system clock. > > > >/Uffe > >On Wed, 19 Apr 2000 Pekka.Hedqvist@REDACTED wrote: > >> >>When trying to measure time we get really weird values from the >>'erlang:now()' when two successive calls to it are done with less than >>100 microseconds between the two calls. The values are far too low; 0, >>1 microseconds are reported even when maybe 60-80 has passed. If the >>calls are made further apart timewise they suddenly jump up to >>reasonable represent the passed time (when > ~100 micro has passed). >> >>For example, calling gettimeofday() in Linux directly every ~7 >>microseconds also returns ~7 micro each time. >> >>Looking at the erl_time_sup.c one sees that it builds without >>gethrtime() (since its not available in plain Linux) and with the >>'CORRECT_USING_TIMES' defined. 'erlang:now()' results in a call to >>get_tolerant_timeofday(void) which does a number of things, some >>regarding internal erlang timing etc. >> >>I asume (hopefully) that the get_tolerant_timeofday(void) does the >>right things regarding Erlangs internal view of time, but is its >>side-effect on functions like erlang:now() really desirable? >>If so, how is one to measure time in a way that avoids these "jumps"? >>Write a linked in driver calling gettimeofday() directly etc..? >> >>Ideas, oppinions? >> >>/pekka >> > > -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From Matthias.Lang@REDACTED Wed Apr 19 14:15:57 2000 From: Matthias.Lang@REDACTED (Matthias.Lang@REDACTED) Date: Wed, 19 Apr 2000 14:15:57 +0200 (MET DST) Subject: disabling compiler warnings Message-ID: <14589.41853.114093.347788@gargle.gargle.HOWL> Hi, Hal Snyder writes Hal> 4. The second program has perfectly legal balanced exports of Hal> variables from both branches of an if structure. This leads Hal> to a slew of inappropriate warnings - and I don't see any way Hal> to turn them off without rebuilding the compiler. There is a Hal> compiler switch to enable warning reports, on by default, but Hal> no apparent way to turn it off. I agree that the warnings in the fibsrch program (the first one) are rather over-zealous of the compiler, but there are slightly more verbose ways to code around the warnings, which save your bacon in other cases. In any case, disabling the warnings doesn't require a rebuild. Just create a user_default.beam from source something like: -module(user_default). -export([c/1]). c(File) -> compile:file(File, []). You can arrange for this to be loaded automatically via the .erlang file: code:load_abs("/home/super/mml/toys/user_default"). Read more about the .erlang and user_default file at http://www.erlang.org/documentation/doc/getting_started/getting_started.html#1.7 Matt From gunilla@REDACTED Wed Apr 19 14:34:22 2000 From: gunilla@REDACTED (Gunilla Hugosson) Date: Wed, 19 Apr 2000 14:34:22 +0200 Subject: disabling compiler warnings References: <14589.41853.114093.347788@gargle.gargle.HOWL> Message-ID: <38FDA7CE.ECB92282@erix.ericsson.se> Based on my experiences from teaching Erlang courses, the warnings really are useful. A more experienced programmer can turn off the warnings like Mattias indicated. In my mind, an even better solution to the problem is to rewrite the if. Instead of: if Bertil>3 -> Arne = true; true -> Arne = false end Write: Arne = if Bertil>3 -> true; true -> false end / Gunilla Matthias.Lang@REDACTED wrote: > > Hi, > > Hal Snyder writes > > Hal> 4. The second program has perfectly legal balanced exports of > Hal> variables from both branches of an if structure. This leads > Hal> to a slew of inappropriate warnings - and I don't see any way > Hal> to turn them off without rebuilding the compiler. There is a > Hal> compiler switch to enable warning reports, on by default, but > Hal> no apparent way to turn it off. > > I agree that the warnings in the fibsrch program (the first one) > are rather over-zealous of the compiler, but there are slightly more > verbose ways to code around the warnings, which save your bacon in > other cases. > > In any case, disabling the warnings doesn't require a rebuild. Just > create a user_default.beam from source something like: > > -module(user_default). > -export([c/1]). > c(File) -> compile:file(File, []). > > You can arrange for this to be loaded automatically via the .erlang file: > > code:load_abs("/home/super/mml/toys/user_default"). > > Read more about the .erlang and user_default file at > > http://www.erlang.org/documentation/doc/getting_started/getting_started.html#1.7 > > Matt From thomas@REDACTED Wed Apr 19 15:37:40 2000 From: thomas@REDACTED (Thomas Arts) Date: Wed, 19 Apr 2000 15:37:40 +0200 Subject: disabling compiler warnings References: <14589.41853.114093.347788@gargle.gargle.HOWL> <38FDA7CE.ECB92282@erix.ericsson.se> Message-ID: <38FDB6A4.FFDB8EEB@cslab.ericsson.se> Gunilla Hugosson wrote: > > Based on my experiences from teaching Erlang courses, > the warnings really are useful. A more experienced > programmer can turn off the warnings like Mattias indicated. > > In my mind, an even better solution to the problem is to > rewrite the if. Instead of: > > if > Bertil>3 -> > Arne = true; > true -> > Arne = false > end > > Write: > Arne = if > Bertil>3 -> > true; > true -> > false > end Or use logic and write: Arne = Bertil =< 3. /Thomas Rule of thumb: if you see a line "false -> true" you missed an opertunity to shrink the codesize. From thomas@REDACTED Wed Apr 19 15:41:10 2000 From: thomas@REDACTED (Thomas Arts) Date: Wed, 19 Apr 2000 15:41:10 +0200 Subject: disabling compiler warnings References: <14589.41853.114093.347788@gargle.gargle.HOWL> <38FDA7CE.ECB92282@erix.ericsson.se> <38FDB6A4.FFDB8EEB@cslab.ericsson.se> Message-ID: <38FDB776.1F814395@cslab.ericsson.se> Thomas Arts wrote: > > Gunilla Hugosson wrote: > > > > Based on my experiences from teaching Erlang courses, > > the warnings really are useful. A more experienced > > programmer can turn off the warnings like Mattias indicated. > > > > In my mind, an even better solution to the problem is to > > rewrite the if. Instead of: > > > > if > > Bertil>3 -> > > Arne = true; > > true -> > > Arne = false > > end > > > > Write: > > Arne = if > > Bertil>3 -> > > true; > > true -> > > false > > end > > Or use logic and write: > > Arne = Bertil =< 3. Uh, sorry, for those that read these: Arne = Bertil > 3. /Thomas From Sean.Hinde@REDACTED Wed Apr 19 15:51:21 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Wed, 19 Apr 2000 14:51:21 +0100 Subject: erl 4.9.1. gen_udp, udp packages Message-ID: <402DD461F109D411977E0008C791C312564D9A@imp02mbx.one2one.co.uk> > I.e. the number is the *source* port of the packet - delivering the > destination port with each packet isn't obviously useful.:-) If the > sender didn't bind to a specific port (in Erlang: Passed a > Port value of And not only that, If you want to send a reply to the application which originated the udp packet, it is this port you need to use rather than the one you opened it with. (I hit this one with my RADIUS implementation!) Rgds, Sean From crd@REDACTED Wed Apr 19 16:09:26 2000 From: crd@REDACTED (Craig Dickson) Date: Wed, 19 Apr 2000 07:09:26 -0700 Subject: disabling compiler warnings References: <14589.41853.114093.347788@gargle.gargle.HOWL> Message-ID: <001c01bfaa08$fdb633e0$6f01140a@inkpad> Matthias Lang wrote: > You can arrange for this to be loaded automatically via the .erlang file: Okay, but according to the documentation you referenced, the .erlang file can be loaded from the user's home directory. What is considered to be the "user's home directory" on MS Windows? I have a HOME environment variable defined (used by Emacs, among other things), but Erlang seems to ignore it. Craig From mskow@REDACTED Wed Apr 19 19:46:10 2000 From: mskow@REDACTED (Michael Skowronski) Date: Wed, 19 Apr 2000 13:46:10 -0400 (EDT) Subject: orber Message-ID: Hello, does anyone have a simple example of how to connect a java visibroker client to an orber service? thanks. Michael From per@REDACTED Thu Apr 20 00:27:09 2000 From: per@REDACTED (Per Hedeland) Date: Thu, 20 Apr 2000 00:27:09 +0200 (MET DST) Subject: erlang:now() in erlang 4.9.1 on Linux In-Reply-To: <14589.13954.505029.822433@eddieware.eddieware.org> References: <14589.13954.505029.822433@eddieware.eddieware.org> Message-ID: <200004192227.e3JMR9I08267@super.du.uab.ericsson.se> Pekka.Hedqvist@REDACTED wrote: >When trying to measure time we get really weird values from the >'erlang:now()' when two successive calls to it are done with less than >100 microseconds between the two calls. The values are far too low; 0, >1 microseconds are reported even when maybe 60-80 has passed. If the >calls are made further apart timewise they suddenly jump up to >reasonable represent the passed time (when > ~100 micro has passed). Do you really ever see a difference of 0 microseconds? That would be a serious bug, monotonically increasing values is just about the only thing erlang:now() *really* promises to produce. I can't reproduce *that* even by calling it several thousand times in a tight loop (on RedHat 6.1). I do however see jumps along the lines of what you describe, specifically when doing the above tight-loop calls it increases by 1 microsecond on each call for several hundred calls, then makes a jump of 8000-9000 microseconds, then 40-50 "reasonable" increments, and then back to 1 microsecond increments again. >Looking at the erl_time_sup.c one sees that it builds without >gethrtime() (since its not available in plain Linux) and with the >'CORRECT_USING_TIMES' defined. 'erlang:now()' results in a call to >get_tolerant_timeofday(void) which does a number of things, some >regarding internal erlang timing etc. > >I asume (hopefully) that the get_tolerant_timeofday(void) does the >right things regarding Erlangs internal view of time, but is its >side-effect on functions like erlang:now() really desirable? Well, it has to affect erlang:now() (see Ulf's message for why these corrections are done at all), but it shouldn't have *this* effect - in fact unless you keep changing the system time, it shouldn't have any effect at all. It seems clear that the reason is that the 10-ms resolution of times() is incorrectly affecting the results, and indeed it goes away if you recompile without CORRECT_USING_TIMES defined - so doing that is at least a workaround for now (at least for the problem I'm seeing). Incidentally, Linux is currently the only OS that CORRECT_USING_TIMES gets defined on - I don't know how many besides Solaris that have gethrtime(). --Per Hedeland per@REDACTED From luke@REDACTED Thu Apr 20 10:35:44 2000 From: luke@REDACTED (Luke Gorrie) Date: 20 Apr 2000 10:35:44 +0200 Subject: orber In-Reply-To: Michael Skowronski's message of "Wed, 19 Apr 2000 13:46:10 -0400 (EDT)" References: Message-ID: <874s8xqie7.fsf@cockatoo.bluetail.com> Michael Skowronski writes: > Hello, > > does anyone have a simple example of how to connect a java visibroker > client to an orber service? I have, though I used JacORB rather than Visibroker. http://203.46.39.99:2000/get?node=orber+quickstart Cheers, Luke From jhague@REDACTED Thu Apr 20 03:30:37 2000 From: jhague@REDACTED (James Hague) Date: Wed, 19 Apr 00 20:30:37 -0500 Subject: erlang initial experiences Message-ID: <200004200129.UAA12017@node-03.advancenet.net> >3. Support for parsing of command line arguments passed from the UNIX >shell seems limited. No getopt() (or did I miss it?), and numbers >are passed in as atoms so must go through the dual conversion of >atom_to_list and list_to_integer. Erlang hasn't been much of a Perl-like scripting language thus far, so I'm not suprised by this. With the standalone application stuff getting better, I could see better command line parsing being more of an issue. From scott@REDACTED Thu Apr 20 06:10:05 2000 From: scott@REDACTED (Scott Lystig Fritchie) Date: Wed, 19 Apr 2000 23:10:05 -0500 Subject: erlang initial experiences In-Reply-To: Message of "Wed, 19 Apr 2000 20:30:37 EST." <200004200129.UAA12017@node-03.advancenet.net> Message-ID: <200004200410.XAA55864@snookles.snookles.com> >>>>> "jh" == James Hague writes: >> 3. Support for parsing of command line arguments passed from the >> UNIX shell seems limited. No getopt() (or did I miss it?), and >> numbers are passed in as atoms so must go through the dual >> conversion of atom_to_list and list_to_integer. jh> Erlang hasn't been much of a Perl-like scripting language thus jh> far, so I'm not suprised by this. See the documentation for the init module (in the kernel docs). Here's a snippet to get an integer value off the command line, returning 'false' if it isn't there: get_command_line_int(Atom) -> case init:get_argument(Atom) of {ok, [[Value]]} -> list_to_integer(Value); _ -> false end. ... where the command line argument looks like "-whatever 4", and 'whatever' is arg passed to get_command_line_int/1. -Scott From miyakawa@REDACTED Thu Apr 20 04:31:27 2000 From: miyakawa@REDACTED (Shinya MIYAKAWA) Date: Thu, 20 Apr 2000 11:31:27 +0900 Subject: IFIP TCS2000 INFORMATION Message-ID: <20000420113127Q.miyakawa@ito.ecei.tohoku.ac.jp> [Apologies for multiple copies] IFIP TCS2000 PRELIMINARY PROGRAM AND REGISTRATION INFORMATION ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -------------------------------------------------------------------------- IFIP International Conference on Theoretical Computer Science (IFIP TCS2000) --- Exploring New Frontiers of Theoretical Informatics --- August 17 - 19, 2000 Aoba Memorial Bldg., Tohoku University, Sendai, Japan Further Information about IFIP TCS2000 can be obtained on the Web, at http://tcs2000.ito.ecei.tohoku.ac.jp/tcs2000/ Any inquiry on IFIP TCS2000 Program and Registration may be directed to TCS2000@REDACTED -------------------------------------------------------------------------- PRELIMINARY PROGRAM ^^^^^^^^^^^^^^^^^^^ [Outline] AUGUST 16: 15:00 Registration at Sendai Tokyu Hotel till 20:00 18:00 Welcome at Sendai Tokyu Hotel till 19:00 AUGUST 17: 9:30 Opening Session 10:00 Keynote Plenary Talk 1 ----------------------------------------- 11:10 - 17:30 TRACK (1) || TRACK (2) ----------------------------------------- AUGUST 18: 9:10 Keynote Plenary Talk 2 ----------------------------------------- 10:20 - 15:30 TRACK (1) || TRACK (2) ----------------------------------------- 15:50 Panel Discussion till 17:10 ----------------------------------------- 18:30 Banquet at Sendai Tokyu Hotel AUGUST 19: 9:10 Keynote Plenary Talk 3 ----------------------------------------- 10:20 - 14:20 TRACK (1) || TRACK (2) ----------------------------------------- 14:30 Closing Session till 14:40 ----------------------------------------- 15:00 Open Lectures till 17:00 ----------------------------------------- 18:30 Japanese Dinner Party till 20:00 ----------------------------------------- AUGUST 16 WEDNESDAY ^^^^^^^^^^^^^^^^^^^ 15:00 REGISTRATION at Sendai Tokyu Hotel till 20:00 18:00 WELCOME with light snack at Sendai Tokyu Hotel till 19:00 AUGUST 17 THURSDAY ^^^^^^^^^^^^^^^^^^ 9:30 OPENING SESSION Giorgio Ausiello (TC1 Chair and IFIP TCS2000 Co-Chair) Takayasu Ito (IFIP TCS2000 Co-Chair) 10:00 KEYNOTE PLENARY TALK Reconciling Two Views of Cryptography Martin Abadi (Bell Labs, Lucent) 10:50 Break [TRACK (1)] SESSION (1.1), 11:10 - 12:00 11:10 Approximation Algorithms for String Folding Problems Giancarlo Mauri, Giulio Pavesi 11:35 An Index for Two Dimensional String Matching Allowing Rotations Kimmo Fredriksson, Gonzalo Navarro, Esko Ukkonen 12:00 Lunch Break SESSION (1.2), 13:30 - 14:20 13:30 Parallel Edge Coloring of a Tree on a Mesh Connected Computer Chang-Sung Jeong, Sung-Up Cho, Mi-Young Choi 13:55 Parallel Approximation Algorithms for Maximum Weighted Matching in General Graphs Ryuhei Uehara, Zhi-Zhong Chen 14:20 Break 14:40 TRACK (1) INVITED TALK It is on the Boundary: Complexity Considerations for Polynomial Ideals Ernst Mayr (TU Muenchen) 15:30 Break SESSION (1.3), 15:50 - 17:30 15:50 An Efficient Parallel Algorithm for Scheduling Interval Ordered Tasks Yoojin Chung, Kunsoo Park 16:15 Task Distributions on Multiprocessor Systems Evgeny V. Shchepin, Nodari Vakhania 16:40 Fast Interpolation using Kohonen Self-Organizing Neural Networks Olivier Sarzeaud, Yann Stephan 17:05 Steganography Using Modern Arts Galdi Clemente, Blundo Carlo 17:30 Break -----------// [TRACK (2)] SESSION (2.1), 11:10 - 12:00 11:10 Ambient Groups and Mobility Types Luca Cardelli, Giorgio Ghelli, Andrew D. Gordon 11:35 An Asynchronous, Distributed Implementation of Mobile Ambients Cedric Fournet, Jean-Jacques Levy, Alan Schmitt 12:00 Lunch Break 13:30 TRACK (2) INVITED TALK Type Systems for Concurrent Processes: From Deadlock-Freedom to Livelock-Freedom, Time-Boundedness Naoki Kobayashi (U. Tokyo) 14:20 Break SESSION (2.2), 14:40 - 15:30 14:40 Local pi-Calculus at Work: Mobile Objects as Mobile Processes Massimo Merro, Josva Kleist, Uwe Nestmann 15:05 An Interpretation of Typed Concurrent Objects in the Blue Calculus Silvano Dal-Zilio 15:30 Break SESSION (2.3), 15:50 - 17:30 15:50 A Higher-Order Specification of the pi-Calculus Joelle Despeyroux 16:15 Open Ended Systems, Dynamic Bisimulation, and Tile Logic Vladimiro Sassone 16:40 Fibred Models of Processes: Discrete, Continuous, and Hybrid Systems Marcelo Fiore 17:05 On the Complexity of Bisimulation Problems for Pushdown Automata Richard Mayr 17:30 Break AUGUST 18 FRIDAY ^^^^^^^^^^^^^^^^ 9:10 KEYNOTE PLENARY TALK Theory and Construction of Molecular Computers Masami Hagiya (U. Tokyo) 10:00 Break [TRACK (1)] SESSION (1.4), 10:20 - 12:00 10:20 Trade-offs between Density and Robustness in Random Interconnection Graphs P. Flajolet, K. Hatzis, S. Nikoletseas, P. Spirakis 10:45 The ($\sigma$+1)-Edge-Connectivity Augmentation Problem without Creating Multiple Edges Satoshi Taoka, Toshimasa Watababe 11:10 On the Hardness of Approximating Some NP-optimization Problems Related to Minimum Linear Ordering Problem Sounaka Mishra, Kripasindhu Sikdar 11:35 Maximum Clique and Minimum Clique Partition in Visibility Graphs Stephan Eidenbenz 12:00 Lunch Break SESSION (1.5), 13:30 - 14:20 13:30 Real-Time Language Recognition by Alternating Cellular Automata Thomas Buchholz, Andreas Klein, Martin Kutrib 13:55 Damage Spreading and $\mu$-Sensitivity on CA Bruno Martin 14:20 Break 14:40 TRACK (1) INVITED TALK Discrepancy Theory and its Applications to Finance Shu Tezuka (IBM Tokyo Research Lab) 15:30 Break -----------// [TRACK (2)] SESSION (2.4), 10:20 - 12:00 10:20 A Type-theoretic Study on Partial Continuations Yukiyoshi Kameyama 10:45 Partially Typed Terms between Church-Style and Curry-Style Ken-etsu Fujita, Aleksy Schubert 11:10 Alternating Automata and Logics over Infinite Words Christof Loeding, Wolfgang Thomas 11:35 Hypothesis Support for Information Integration in Four-Valued Logics Yann Loyer, Nicolas Spyratos, Daniel Stamate 12:00 Lunch Break 13:30 TRACK (2) INVITED TALK A Compositional Model of Time and Uncertainty Thomas Henzinger (UC Berkeley) 14:20 Break SESSION (2.5), 14:40 - 15:30 14:40 A Single Complete Refinement Rule for Demonic Specifications Karl Lermer, Paul Strooper 15:05 Reasoning about Composition using Property Transformers and their Conjugates Michel Charpentier, K. Mani Chandy 15:30 Break ----------------------- 15:50 PANEL DISCUSSION on "New Challenges for TCS" Panelists: Giorgio Ausiello (U. Roma "La Sapienza") Jozef Gruska (Masaryk U.) Ugo Montanari (U. Pisa) Takao Nishizeki (Tohoku U.) Yoshihito Toyama (Tohoku U.) Jiri Wiedermann (Inst. Informatics, Prague) 17:10 Break 18:30 BANQUET at Sendai Tokyu Hotel till 20:45 BANQUET SPEECH Non-Random Thoughts about Randomization Michael O. Rabin (Harvard U.) AUGUST 19 SATURDAY ^^^^^^^^^^^^^^^^^^ 9:10 KEYNOTE PLENARY TALK List Decoding: Algorithms and Applications Madhu Sudan (MIT) 10:00 Break [TRACK (1)] SESSION (1.6), 10:20 - 12:00 10:20 Fully Consistent Extensions of Partially Defined Boolean Functions with Missing Bits Endre Boros, Toshihide Ibaraki, Kazuhisa Makino 10:45 Characterization of Optimal Key Set Protocols Takaaki Mizuki, Hiroki Shizuya, Takao Nishizeki 11:10 On the Complexity of Integer Programming in the Blum-Shub-Smale Computational Model Valentin E. Brimkov, Stefan S. Dantchev 11:35 On Logarithmic Simulated Annealing A. Albrecht, C.K. Wong 12:00 Lunch Break 13:30 TRACK (1) INVITED TALK Hierarchical State Machines Mihalis Yannakakis (Bell Labs, Lucent) 14:20 Break -----------// [TRACK (2)] 10:20 TRACK (2) INVITED TALK Some New Directions in the Syntax and Semantics of Formal Languages Gordon D. Plotkin (Edinburgh U.) 11:10 Break 11:20 DEMO SESSION (1) on Verification Tools 12:00 Lunch Break 13:30 DEMO SESSION (2) on Verification Tools 14:20 Break ------------------------ 14:30 CLOSING SESSION till 14:40 Giorgio Ausiello (TC1 Chair and IFIP TCS2000 Co-Chair) Takayasu Ito (IFIP TCS2000 Co-Chair) ------------------------ [OPEN LECTURES] 15:00 On the Power of Interactive Computing Jan van Leeuwen (U. Utrecht) 16:00 The Varieties of Programming Language Semantics Peter D. Mosses (U. Aarhus) 17:00 Break ------------------------ 18:30 JAPANESE DINNER PARTY till 20:00 ========================================================================== GENERAL INFORMATION ^^^^^^^^^^^^^^^^^^^ IFIP TCS2000 is the first International Conference on Theoretical Computer Science organized by IFIP TC1 on Foundations of Computer Science, and it consists of two tracks: TRACK (1) on Algorithms, Complexity and Models of Computation, and TRACK (2) on Logic, Semantics, Specification, and Verification. The conference proceedings will be published as a volume of Lecture Notes in Computer Science, Springer-Verlag. IFIP TCS2000 will be held on the campus of Tohoku University, Sendai, Japan. The invited talks and contributed talks will be presented at the Aoba Memorial Building and Engineering Conference Hall, Faculty of Engineering located on the Aoba Hill about 3 km west of downtown Sendai. The conference welcome reception and banquet will be held at Sendai Tokyu Hotel, located at downtown Sendai. Please, register and make reservations by returning the completed form by email and fax, following the instructions below. There will also be on-site registration at: * Sendai Tokyu Hotel, 15:00 - 20:00, August 16 * Aoba Memorial Bldg., Tohoku Univ., 9:00 - 17:00 on August 17 - 19. Transportation Conference participants arriving at the new Tokyo International (Narita) Airport are advised to take the JR Narita Express train from Narita Airport to Tokyo Station. Then, take the Yamabiko super express train of Tohoku Shinkansen (Tohoku Bullet Train) to Sendai from Tokyo Station. The Yamabiko runs every 20 - 30 min. and takes about 2 hours from Tokyo to Sendai. Making reservation at Narita Station for the Yamabiko is recommended, since it will be the summer tourist season. Those arriving at the new Osaka International Airport (Kansai Airport) can fly to Sendai Airport, and take Limousine Bus service to Sendai Station. The bus takes about 30 min. to go from the Airport to Sendai Station. You can also take a shuttle bus service from Kansai Airport to the Osaka-Itami Airport to fly from there to Sendai Airport. Alternatively, you can take a local train from the Kansai Airport to JR Shin Osaka Station, then take the Tokaido Shinkansen from Osaka to Tokyo Station and change at Tokyo Station to Tohoku Shinkansen. Some details on transportation will be available on the TCS2000 Web page, at http://tcs2000.ito.ecei.tohoku.ac.jp/tcs2000/ Note: (1) In Japan, mid-August is the busiest tourist time during summer, including domestic and international flights. (2) No flight service is available from Narita to Sendai Airport, since the train service is convenient. There is another train service from Narita Airport to downtown Tokyo (Ueno) by Skyliner of the Keisei-Narita Line. At Ueno you can take the Yamabiko super express of Tohoku Shinkansen to Sendai, but you have to walk about 10 min. from Keisei-Ueno Station to JR Ueno Station to take Tohoku Shinkansen. (3) If you are going to travel in Japan by JR lines before/after the IFIP TCS2000 conference, it will be convenient and economical to get a JR PASS before your departure. Contact your travel agent for more information on JR PASS (Japan Rail Pass). Hotels Two hotels are arranged to offer special discount rates to IFIP TCS2000 participants: Sendai Tokyu Hotel and Sendai Washington Hotel. They are 1.2 km west of Sendai Station and about 800 Yen by taxi from the station. These hotels are located within 5 min. walk from each other. The conference welcome reception and banquet will be held at Sendai Tokyu Hotel. Sendai and Climate Sendai is the largest city in the northern part of the Honshu Island of Japan, with a population of about a million. The City is known in Japan as "City of Trees". Sendai is a modern, safe city with a temperate climate blessed by four distinct seasons; even in mid August it is quite seldom that the highest temperature exceeds 30 C (86 F). Usually, the weather in mid August would be mostly sunny with temperatures ranging from 20 C (68 F) to 30 C (86 F), and rain, if any, would rarely be heavy. Note: Average temperatures in August at Sendai, Tokyo and Osaka are about 23.5 C, 26.5 C and 27.5, respectively. REGISTRATION AND RESERVATION INFORMATION ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ REGISTRATION FEES Registration fees cover attendance in all sessions, a copy of the proceedings, refreshments, the welcome reception and banquet, but not the Japanese dinner party on August 19. The reduced author rate applies to all authors of the accepted papers, and the reduced committee member rate applies to all TC1 members and to all members of the Program Committee and the Organizing Committee. The student rate applies to full time students. Registrants paying reduced rates have full privileges at the conference. The companion rate covers the reception and banquet only. Through July 1st, 2000 From July 2nd, 2000 Regular 40,000 Yen 50,000 Yen Author 30,000 Yen 40,000 Yen Committee Member 30,000 Yen 40,000 Yen Student 25,000 Yen 30,000 Yen Companion 5,000 Yen 7,000 Yen HOTELS Two convenient Western Style hotels offer special IFIP TCS2000 discount rates. Rates are per person, per night, and include service charge and tax (not including breakfast). Single Room Twin Room Sendai Tokyu Hotel 10,500 Yen 8,400 Yen Sendai Washington Hotel II 8,400 Yen 7,350 Yen Sendai Washington Hotel I 7,350 Yen --------- Note: Twin room reservations are available for two persons. No roommate matching service is available, so that twin room reservations remain the registrant's responsibility. JAPANESE DINNER PARTY A Japanese dinner party for participants from abroad will be arranged at SHOZANKAN in the evening of August 19. The invited speakers, some Steering Committee members, PC members and conference organizers will attend. A limited number of reservations will be available for this dinner party. The rates are as follows. Conference registrant: 10,000 Yen Companion: 7,000 Yen ============================================================================= Cut here to send your registration form after filling in the required items. ============================================================================= IFIP TCS2000 REGISTRATION AND RESERVATION FORM ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Please register and make reservations by completing the form below and returning it by email to tcs02@REDACTED Registrants are advised to email a copy of their completed form to TCS2000@REDACTED They are also encouraged to send a signed, printed copy of their completed form by fax to 022-262-5002 (domestic) +81-22-262-5002 (from abroad) which is the fax number of the following agent to take care of the conference registration and reservation. JTB (Japan Travel Bureau) Tohoku Communications Inc. Kotsukosha Bldg 3F, 3-6-Chuo Aoba-Ku, Sendai 980-0021, Japan (Fax) 022-262-5002 (domestic) +81-22-262-5002 (from abroad) (Phone) 022-262-5055 (domestic) +81-22-262-5055 (from abroad) (Email) tcs02@REDACTED Registration and reservations will be completed by your payment, whose method is described below. IMPORTANT NOTE: As described below, from the standpoint of the safety, registrants are advised to pay fees by Bank Transfer. When the payment is made by a credit card, they are advised to send the required information including Credit Card numbers by FAX; that is, do NOT send Credit Card numbers by email. REGISTRATION FOR IFIP TCS2000 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Last (Family) Name: First (Given) Name: Middle: Affiliation: Postal Address: City/State/Zip: Country: Phone: Fax: Email: Registration Status : Number of Companions: Companions' names (if applicable): (A) Total Registration Fee(s) in Yen: HOTEL RESERVATION Hotel First Choice: Hotel Second Choice: Number of Single Room(s): Number of Twin Room(s): Roommate's Name(s) for Twin Room(s): Check-in Date: Check-out Date: Number of Nights: Special Room or other Request: JAPANESE DINNER PARTY A limited number of reservations are available for the Japanese dinner party at SHOZANKAN on August 19 to be arranged for participants from abroad. (B) 10,000 Yen x [ ] conference registrant(s): (C) 7,000 Yen x [ ] companion(s): TOTAL FEE IN YEN (A) + (B) + (C): Signature (not needed for email): METHOD OF PAYMENT FOR IFIP TCS2000 From the standpoint of the safety and security, participants are encouraged to pay via Bank Transfer. When they pay via credit card, they are advised to send the required information (in particular, Credit Card numbers) by FAX; that is, do NOT send your Credit Card numbers by email. In credit card payment Visa card, MasterCard, and Diners card will be accepted. Personal checks cannot be accepted. All payments must be made in Japanese Yen. Indicate method of payment below: [ ] Bank Transfer to Bank: Tokyo Mitsubishi Bank, Sendai Branch Account Name: IFIP TCS2000 Chair Takayasu Ito Account No. 1108671 From : Date of transfer: Payer's name: Note: In Japan the bank number of Tokyo Mitsubishi Bank is 0005, and the number of its Sendai Branch is 320. [ ] Payment by Credit Card Credit Card Type : Card Number: Expiration Date: Signature (not needed for email): : When your payment is via Credit Card, send the above information by FAX to +81-22-262-5002, the fax no. of JTB Communications Inc. Even when you send the above form by fax, send it by EMAIL without filling in Credit Card number for safety. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Registration and reservations will be confirmed upon receipt of payment. Refunds will be made upon written request received through July 31st, 2000 by JTB Tohoku Communications Inc. From nick@REDACTED Thu Apr 20 10:12:12 2000 From: nick@REDACTED (Niclas Eklund) Date: Thu, 20 Apr 2000 10:12:12 +0200 (MET DST) Subject: orber In-Reply-To: <874s8xqie7.fsf@cockatoo.bluetail.com> Message-ID: On 20 Apr 2000, Luke Gorrie wrote: > Michael Skowronski writes: > > Hello, > > > > does anyone have a simple example of how to connect a java visibroker > > client to an orber service? > > I have, though I used JacORB rather than > Visibroker. http://203.46.39.99:2000/get?node=orber+quickstart > Cheers, > Luke Hello! Another way to setup a connection is to use InitialReferences.idl and follow the example in Orber user's guide 9, but don't compile cos_naming.idl (included since the example is based on OrbixWeb2.*, which didn't support 'pragma prefix' until 3.*). The code below illustrates a OrbixWeb3.2 client: import org.omg.CosNaming.*; import org.omg.CORBA.*; import Orber.InitialReference.*; import Orber.InitialReferences.*; import org.omg.CORBA.SystemException; import org.omg.CORBA.ORB.*; public class Client { public static void main(String args[]) { NamingContext nsContext; org.omg.CORBA.Object nsRef, objRef, initRef; Orber.InitialReference ir = new Orber.InitialReference(); Orber.InitialReferences init = null; String srvHost = new String(args[0]); Integer srvPort = new Integer(args[1]); try { ORB orb = ORB.init(args, null); //The next line equals "reading IOR from file" (see Luke's link) String s = ir.stringified_ior(srvHost, srvPort.intValue()); initRef = orb.string_to_object(s); init = Orber.InitialReferencesHelper.narrow(initRef); // Fetch name service reference. nsRef = init.get("NameService"); nsContext = NamingContextHelper.narrow(nsRef); // Now you can use 'resolve' etc and access objects ... cut ... The OMG published two preliminary Interoperable-NamingServices; Orber supports one (IBM's). Unfortunately ;-), the next CORBA specification contains the one we're currently not supporting. The example above, is based on the IBM-interoperable naming service (also supported by JavaIDL, and ...?!). IMHO, if you intend to start a number of servers, it's easier to just store just one reference, i.e., the NameService. You should also consult: * Orber User's Guide, 10, "Orber Stubs/Skeletons" * Orber Refernce Manual, "Module_Interface" These chapters includes example code on how to implement your 'Module_Interface_impl.erl' file, e.g., functions which must be implemented. Depending on what type of server you intend to implement, it may be a good idea to use oe_create_link/2 or oe_create/2. The second argument, 'Options', is usefull (and more features to come :-). BR/Nick From matthias@REDACTED Thu Apr 20 11:34:16 2000 From: matthias@REDACTED (matthias@REDACTED) Date: Thu, 20 Apr 2000 11:34:16 +0200 (MET DST) Subject: erlang:now() in erlang 4.9.1 on Linux In-Reply-To: <200004192227.e3JMR9I08267@super.du.uab.ericsson.se> References: <14589.13954.505029.822433@eddieware.eddieware.org> <200004192227.e3JMR9I08267@super.du.uab.ericsson.se> Message-ID: <14590.53016.840927.933044@gargle.gargle.HOWL> > Pekka.Hedqvist@REDACTED wrote: > >When trying to measure time we get really weird values from the > >'erlang:now()' when two successive calls to it are done with less than > >100 microseconds between the two calls. The values are far too low; 0, > >1 microseconds are reported even when maybe 60-80 has passed. If the Per writes: > Do you really ever see a difference of 0 microseconds? That would be a > serious bug, monotonically increasing values is just about the only > thing erlang:now() *really* promises to produce. Careful! "monotonic" doesn't mean what you use it to mean, I think. (*) The authors of the standard erlang spec write: A 3-tuple of integers is returned that is guaranteed to be different for each invocation on a node. [...] Two calls of the BIF now() by a processes residing on the same node can never return the same term. [...] (footnote)However, the time might be inaccurate if several calls are made within a microsecond. The behaviour Pekka is seeing is wrong, though I think that the uniqueness requirement on now() should be removed. If you want something unique, use make_ref(). If you want to know the time, call now() (or time()). I can imagine future hardware where keeping now() both unique from call to call AND more or less representing the time becomes difficult. --- * As to meaning of monotonic... The erlang man page for now() doesn't say "monotonic", it says "continously increasing". I'll leave it to your imagination what that means when you're talking about a discrete function... monotonic, according to my recollections from uni and also Cormen, Leiserson & Rivest, "Introduction to Algorithms", p.32 means A function f(n) is monotonically increasing if m =< n imples f(m) =< f(n). The implicit argument to now() is "the time", so to satisfy monotonically increasing, I could implement now() as now() -> {0,0,0} This confusion about the meaning of "monotonically increasing" seems widespread in computer science, e.g. both RFC2747 and RFC1644 use it when they mean "strictly increasing". Does anyone know where this (wrong?) use originated? Matthias From etxuwig@REDACTED Thu Apr 20 13:24:30 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Thu, 20 Apr 2000 13:24:30 +0200 (MET DST) Subject: erlang:now() in erlang 4.9.1 on Linux In-Reply-To: <14590.53016.840927.933044@gargle.gargle.HOWL> Message-ID: On Thu, 20 Apr 2000 matthias@REDACTED wrote: >The behaviour Pekka is seeing is wrong, though I think that the >uniqueness requirement on now() should be removed. If you want >something unique, use make_ref(). If you want to know the time, call >now() (or time()). This is a tricky issue, and it's certainly compounded by the fact that erlang:now() *is* used both for unique IDs and for time representation. There are basically two reasons for this: - make_ref() does not generate a *persistently* unique identifier. It is only temporarily unique (hopefully for as long as it is referenced.) In contrast, {node(), erlang:now()} is an example of a persistently unique global ID - in part due to the uniqueness requirement on erlang:now() (*) - erlang:now() is currently the only way to get a timestamp with sub-second accuracy in Erlang. >I can imagine future hardware where keeping now() both unique from >call to call AND more or less representing the time becomes difficult. I would like to see a new function, e.g. hrtime(), in Erlang, and a shift in focus of erlang:now() to become a (strictly increasing) internal real-time clock. It is vital that Erlang has a sense of time that keeps ticking in one distinct direction, regardless of what the system clock says. /Uffe (*) Of course, one can upset this as well by stopping the node, setting back the time, and then restarting the node. Oh well... -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From per@REDACTED Thu Apr 20 13:45:16 2000 From: per@REDACTED (Per Hedeland) Date: Thu, 20 Apr 2000 13:45:16 +0200 (MET DST) Subject: erlang:now() in erlang 4.9.1 on Linux In-Reply-To: <14590.53016.840927.933044@gargle.gargle.HOWL> References: <14590.53016.840927.933044@gargle.gargle.HOWL> Message-ID: <200004201145.NAA04888@aalborg.du.uab.ericsson.se> matthias@REDACTED wrote: >Per writes: > > > Do you really ever see a difference of 0 microseconds? That would be a > > serious bug, monotonically increasing values is just about the only > > thing erlang:now() *really* promises to produce. > >Careful! "monotonic" doesn't mean what you use it to mean, I think. (*) Sorry, yes I meant "strictly" of course, but you managed to figure that out anyway.:-) >The behaviour Pekka is seeing is wrong, though I think that the >uniqueness requirement on now() should be removed. If you want >something unique, use make_ref(). If you want to know the time, call >now() (or time()). The advantage of the current implementation, in addition to those that Ulf mentions, is that it makes it possible to strictly(:-) order timestamped events (within a node) - if I recall correctly, this was the original motiviation for implementing it at all, the relation to wall-clock time was even more vaguely specified back then. >I can imagine future hardware where keeping now() both unique from >call to call AND more or less representing the time becomes difficult. Oh well, we can just go to nanoseconds and squeeze a few more years out of it.:-) --Per Hedeland per@REDACTED From thomas@REDACTED Thu Apr 20 13:52:30 2000 From: thomas@REDACTED (Thomas Arts) Date: Thu, 20 Apr 2000 13:52:30 +0200 Subject: erlang:now() in erlang 4.9.1 on Linux References: Message-ID: <38FEEF7E.1E02DDDF@cslab.ericsson.se> Ulf Wiger wrote: > This is a tricky issue, and it's certainly compounded by the fact > that erlang:now() *is* used both for unique IDs and for time > representation. There are basically two reasons for this: > ... > I would like to see a new function, e.g. hrtime(), in Erlang, and > a shift in focus of erlang:now() to become a (strictly increasing) > internal real-time clock. It is vital that Erlang has a sense of > time that keeps ticking in one distinct direction, regardless of > what the system clock says. The problem cannot be solved by introducing a new function. The fact that now() presents the time in microseconds automatically implies that calls within microseconds will return the same value. If hardware gets faster, the risk of returning the same value increases. Sure, one can introduce pico-seconds, postponing the discussion for 9.5 years, but that on itself does not solve the problem. One needs to be able to guarantee increments. My first intuition is that one needs to guarantee the function now() to have an execution time at least the smallest time that it can measure. Thus, if one executes now() on a very fast machine, it should at least take a microsecond. If the machine is too fast for that, let now() wait! Compile the runtime system on a target machine and put a special constant in for now() to wait. This seems like a terrible waist of cpu time, but it is only necessary on machines that are faster than now()'s accuracy. If one is waiting too much, one increases the precision. Another thing one could try is to add a clocktick system. Whenever the runtime system is executing a "symbolic" instruction, the clocktick is increased. I guess one needs 8 bytes or such to have a reasonable representation, need not be more than the expected livetime of hardware ;0). The bytes are read when ticks() is evaluated and that gives a guaranteed increment. However, every instruction (or a special kind, e.g. every read from the heap) is slower since it should add 1 to the 8 bytes in memory. /Thomas From etxuwig@REDACTED Thu Apr 20 14:25:44 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Thu, 20 Apr 2000 14:25:44 +0200 (MET DST) Subject: erlang:now() in erlang 4.9.1 on Linux In-Reply-To: <38FEEF7E.1E02DDDF@cslab.ericsson.se> Message-ID: On Thu, 20 Apr 2000, Thomas Arts wrote: >Ulf Wiger wrote: > > >> This is a tricky issue, and it's certainly compounded by the fact >> that erlang:now() *is* used both for unique IDs and for time >> representation. There are basically two reasons for this: >> >... > >> I would like to see a new function, e.g. hrtime(), in Erlang, and >> a shift in focus of erlang:now() to become a (strictly increasing) >> internal real-time clock. It is vital that Erlang has a sense of >> time that keeps ticking in one distinct direction, regardless of >> what the system clock says. > >The problem cannot be solved by introducing a new function. The fact that >now() presents the time in microseconds automatically implies that calls >within microseconds will return the same value. If hardware gets faster, >the risk of returning the same value increases. Actually, introducing the new function was meant to solve the problem that people need to use erlang:now() today in order to get sub-second time accuracy. In most cases, one couldn't care less about microseconds (knowing that the system time isn't that accurate anyway!), but 1/1000, 1/100, 1/10 are useful quite often. Naturally, for a hi-res clock, it would be quite logical to get the same answer twice in a row, if the calls are close enough, and if hrtime() had millisecond accuracy, it would indeed happen. Of course, if it would return {Hr,Min,Sec}, where Sec : float(), the precision could vary on different systems. (With today's hardware, and using NTP, you can rely on your system clock being accurate within a few milliseconds. A built-in GPS circuit ought to be able to reach microsecond accuracy, I think...) Currently, now() is used both as a "clocktick" counter and a hi-res clock. This is unfortunate. /Uffe -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From Sean.Hinde@REDACTED Thu Apr 20 21:56:08 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Thu, 20 Apr 2000 20:56:08 +0100 Subject: New timer app Message-ID: <402DD461F109D411977E0008C791C312564DA9@imp02mbx.one2one.co.uk> Ulf, > Sean>I recently posted a little application derived from the > Sean>standard timer module in Kernel which uses an ordered_set > Sean>mnesia table with a couple of indeces to give something > Sean>which is more scalable. > I must have dozed off for a while -- I didn't realize what you'd > done until now. > I've attached our sysTimer module for your perusal. I have perused, and see that the erlang:start_timer BIF is a good thing. I'm not so sure about spawning a process for every apply_after though. I have an application in mind which might have 100000 timers running, and having a new process for each one is likely to be a pretty large overhead. In more normal applications I'm not that sure which would be best. It dependes on the source of inefficiency in the standard timer. If your finding was that adding to the end of a sorted list was the problem then mine sorts this out. If it was in the extra overhead of message passing to a gen_server then fair enough.. ? BR, Sean From matthias@REDACTED Fri Apr 21 04:37:01 2000 From: matthias@REDACTED (matthias@REDACTED) Date: Thu, 20 Apr 2000 21:37:01 -0500 (CDT) Subject: Scheme and Functional Programming 2000 Message-ID: <200004210237.VAA16691@africa.cs.rice.edu> [-- Apologies for multiple copies --] ============================================================================ PRELIMINARY CALL FOR PAPERS Scheme and Functional Programming Montreal, Canada, 17 September 2000 The workshop forms part of PLI 2000, which consists of the ICFP and PPDP conferences and other workshops. http://www.cs.rice.edu/~matthias/Scheme2000/ ============================================================================ Background and Theme: --------------------- Over the past few years, Scheme and its implementations have made tremendous progress in support of generative programming, shell scripting, COMponent support and distributed programming, graphics and GUI support, OO programming, and various other aspects of engineering real-world software. We are calling on implementors and users of Scheme systems to share their ideas at a workshop during PLI 2000 in Montreal. The organizers goal is to attract presentations on a broad spectrum of topics: * applications * environments * extensions * implementations * logics (predicate types) * programs The committee will consider submissions concerning Scheme and other functional languages (Erlang, Haskell, LISP, ML, XML, etc.). Submission details ------------------ Deadline for submission: 15 June 2000 The organizers seek two kinds of presentations: * regular: These presentations are like conventional workshop and conference presentation. * short: These presentations last up to 15 mins and are on unconventional topics. Examples include unusual applications, nifty Scheme programming tricks, ideas on implementations, designs and requests for implementations, etc. Program committee ------------------ Kent Dybvig, Indiana University Marc Feeley, Universit? de Montr?al Matthias Felleisen, Rice University Daniel Friedman, Indiana University Manuel Serrano, Universit? de Nice (Sophia-Antipolis) Olin Shivers, Massachusetts Institute of Technology Details ------- http://www.cs.rice.edu/~matthias/Scheme2000/ ============================================================================ From geoff@REDACTED Sat Apr 22 05:43:51 2000 From: geoff@REDACTED (Geoff Wong) Date: Sat, 22 Apr 2000 13:43:51 +1000 (EST) Subject: erlang:now() in erlang 4.9.1 on Linux In-Reply-To: <14590.53016.840927.933044@gargle.gargle.HOWL> from "matthias@besserwisser.org" at Apr 20, 2000 11:34:16 AM Message-ID: <200004220343.DAA20511@gecko.serc.rmit.edu.au> > Per writes: > > > Do you really ever see a difference of 0 microseconds? That would be a > > serious bug, monotonically increasing values is just about the only > > thing erlang:now() *really* promises to produce. > > Careful! "monotonic" doesn't mean what you use it to mean, I think. (*) > > The authors of the standard erlang spec write: > > A 3-tuple of integers is returned that is guaranteed to be > different for each invocation on a node. > [...] > Two calls of the BIF now() by a processes residing on the same > node can never return the same term. > [...] > (footnote)However, the time might be inaccurate if several calls > are made within a microsecond. > > The behaviour Pekka is seeing is wrong, though I think that the > uniqueness requirement on now() should be removed. If you want > something unique, use make_ref(). If you want to know the time, call > now() (or time()). Sub-microsecond timing isn't currently our problem. But as Per (I think) demonstrated timing is all "jumpy" when sub < 100 us. We originally noticed the problem when I was timing "HEAD /" requests off web servers. I was getting utterly bizarre timings off our fast machines (1 us for web page delivery - wow - I wish :), I spent ages trying to work out what was wrong with my code before i realised it was the timer. Obviously sub-microsecond execution might be an issue someday soon (but even an optimised C loop that does a system call like fprintf() is unlikely to go below a 1 us). Anyway, the current erlang:now() (for Linux) is seriously flawed and should be fixed (and or eradicated; perhaps a different fix should be implemented for system time changes). It was probably a plot by FreeBSD guys somewhere in the development process to discredit Linux :-) Geoff From bjarne@REDACTED Sat Apr 22 11:33:39 2000 From: bjarne@REDACTED (Bjarne Däcker) Date: Sat, 22 Apr 2000 11:33:39 +0200 Subject: Scheme and Functional Programming 2000 References: <200004210237.VAA16691@africa.cs.rice.edu> Message-ID: <390171F3.1028EC16@erix.ericsson.se> Hello Matthias This is just to inform you that I plan to submit a paper on the development and use of Erlang. Joe Armstrong wrote some good papers on the developments up to about 1997, please see under http://www.erlang.se/publications/index.shtml but since then lots has happened notably 'open source' http://www.erlang.org/ Just now I am trying to collect information from users about code sizes, systems delivered etc but some of this information might be confidential. (I will be grateful for anybody reading this having interesting information would get in contact with me.) Thank you for including Erlang among your favourite programming languages. Happy Easter Bjarne ===================================== Computer Science Laboratory Ericsson Utvecklings AB PO Box 1505 125 25 ?lvsj? Sweden From per@REDACTED Sat Apr 22 12:32:13 2000 From: per@REDACTED (Per Hedeland) Date: Sat, 22 Apr 2000 12:32:13 +0200 (MET DST) Subject: erlang:now() in erlang 4.9.1 on Linux In-Reply-To: <200004220343.DAA20511@gecko.serc.rmit.edu.au> References: <200004220343.DAA20511@gecko.serc.rmit.edu.au> Message-ID: <200004221032.e3MAWDY00903@super.du.uab.ericsson.se> Geoff Wong wrote: > Anyway, the current erlang:now() >(for Linux) is seriously flawed and should be fixed (and or eradicated; >perhaps a different fix should be implemented for system time changes). Eradicating erlang:now() isn't an option I think:-), but of course its behaviour on Linux should be fixed - note though that I already told you how to "fix" it to become as good as (e.g.:-) FreeBSD at least: Just recompile without CORRECT_USING_TIMES defined. >It was probably a plot by FreeBSD guys somewhere in the development >process to discredit Linux :-) :-) Actually the conscious plot would have made Linux look better than FreeBSD, as it would have had the "soft adjustment" of Erlang time when system time jumped. CORRECT_USING_TIMES was at one point defined for everything that didn't have gethrtime() but had times() - however we learned that times() on FreeBSD was just a wrapper around gettimeofday() (and getrusage()), making the adjustment excercise futile of course. So, it was decided to only use CORRECT_USING_TIMES if the OS was *known* to have a "real" times(), i.e. one that kept ticking independent of system time - and Linux happened to be the only one that fitted that bill. Unfortunately it seems the actual logic of the CORRECT_USING_TIMES case didn't undergo quite as detailed testing as the gethrtime() case (plus of course the logic is trickier due to the low resolution of times()). --Per Hedeland per@REDACTED From etxuwig@REDACTED Tue Apr 25 09:20:42 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Tue, 25 Apr 2000 09:20:42 +0200 (MET DST) Subject: New timer app In-Reply-To: <402DD461F109D411977E0008C791C312564DA9@imp02mbx.one2one.co.uk> Message-ID: On Thu, 20 Apr 2000, Sean Hinde wrote: >Ulf, > >> Sean>I recently posted a little application derived from the >> Sean>standard timer module in Kernel which uses an ordered_set >> Sean>mnesia table with a couple of indeces to give something >> Sean>which is more scalable. > >> I must have dozed off for a while -- I didn't realize what you'd >> done until now. >> I've attached our sysTimer module for your perusal. > >I have perused, and see that the erlang:start_timer BIF is a good thing. > >I'm not so sure about spawning a process for every apply_after though. I >have an application in mind which might have 100000 timers running, and >having a new process for each one is likely to be a pretty large overhead. >In more normal applications I'm not that sure which would be best. It >dependes on the source of inefficiency in the standard timer. > >If your finding was that adding to the end of a sorted list was the problem >then mine sorts this out. If it was in the extra overhead of message passing >to a gen_server then fair enough.. ? It was really a combination of the two. If your application requires that many timers, you may indeed have to invent something new, as you have done. /Uffe -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From bud@REDACTED Thu Apr 27 18:32:48 2000 From: bud@REDACTED (Bud P. Bruegger) Date: Thu, 27 Apr 2000 18:32:48 +0200 Subject: requirements of health care apps Message-ID: <3.0.6.32.20000427183248.009096b0@mail.sistema.it> Dear Erlangers: I'm highly interested in using Mnesia/Erlang for an open source laboratory information system. We (Sistema and the joint FAO/IAEA division) plan to get together a consortium to develop such a system. In this context, we have discussed the suitability of Mnesia/Erlang on the openhealth mailing list. This discussion has identified some limitations of Mnesia/Erlang in respect to health care applications that I hope can be overcome. I would be very grateful if you could give me information on the possibility and necessary effort/time to overcome these limitations. Also, there are two killer apps that I imagine could work well with Mnesia/Erlang. I briefly describe them below and hope that someone could give me some feedback on how well Mnesia/Erlang are suited for the purpose. Limiations: =========== 1. Limit of Mnesia databases to a size of 4GB (http://www.erlang.org/faq/x1084.html#AEN1103). Competing dbms usually handle terrabyte of data. Is there an easy fix? Does this limitation apply to a single node in a distributed setting or to the whole database? 2. inefficient handling of text (http://www.erlang.org/faq/x299.html#AEN309). Many health care applications make heavy use of free-text style data (such as medical records) that are if possible losely structures (with XML). How difficult would it be to extend Mnesia/Erlang to efficiently store and manage (regular expressions, free text search etc.) textual data? The FAQ mentions work underway. Will this only apply to Erlang or also Mnesia? Does anyone know when to expect the results to be available? Killer Apps: ============ 1. Persistent Object Store -------------------------- Many health care applications seem to use some object-oriented implementation language (often Java) and use an object-relational mapping that makes objects persistent in a relational DBMS. The persistance layer brings a lot of overhead since object access is handled by the persistance layer, JDBC, SQL interpreter, to finally reach the native representation. A more detailed description of object-relational mapping can be found in http://www.objectarchitects.de/ObjectArchitects/orpatterns/index.htm and http://www.ambysoft.com/persistenceLayer.html. My impression is that this approach is way to slow for managing large numbers of fine grained objects. (Note that this is generally accepted for Enterprise Java Bean Container Managed Persistance--a variation of the above topic). I looked into object-oriented DBMS as alternatives, but didn't find anything convincing. The serious OODBMS are not open sourced, the open sourced ones are usually simplistic (no redundancy, fail-over, etc) and yet slow (since written in Java). I imagine that Mnesia, being object-relational and very fast, would be a great backend DBMS for a persistent object store. The overhead introduced by a Java persistance layer on top of Mnesia intuitively seems to be less than that of the "normal" object-relational mapping. And the distribution and fault-tolerance features of Mnesia are unique and highly attractive. I would be very interested in you opinion on feasibility, performance, degree of paradigm mismatch, etc. A practical project could for example add a Mnesia backend to Castor (http://castor.exolab.org/). 2. Distributed, fault-tolerant XML Repository ---------------------------------------------- Another killer app (that is admittedly related to the above) would be a distributed, fault-tolerant xml repository based on Mnesia. XML is difficult to map to relational tables (see http://www.poet.com/products/cms/white_papers/xml/repository.html) and some approaches use a (IMHO slow) object-relational mapping (http://www.informatik.tu-darmstadt.de/DVS1/staff/bourret/xmldbms/xmldbms.ht m) to overcome this problem. I would be very interested in your opinion on how well Mnesia would be suited as a backend for an XML repository. For example, how easily the structure of XML would map to Mnesia. Looking forward to your feedback many thanks --bud /------------------------------------------------------------------------\ | Bud P. Bruegger, Ph.D. | mailto:bud@REDACTED | | Sistema | http://www.sistema.it | | Information Systems | voice general: +39-0564-418667 | | Via U. Bassi, 54 | voice direct: +39-0564-418667 (internal 41)| | 58100 Grosseto | fax: +39-0564-426104 | | Italy | P.Iva: 01116600535 | \------------------------------------------------------------------------/ From jith@REDACTED Fri Apr 28 01:50:14 2000 From: jith@REDACTED (Jith Meganathan) Date: Thu, 27 Apr 2000 18:50:14 -0500 Subject: Information hiding in Erlang Message-ID: <3908D236.1892CC92@vailsys.com> Hi - I'm a newcomer to Erlang, and have been slowly working through the _Concurrent Programming in Erlang_ book to learn the language. My background is mostly in OOP, and thus, one of the aspects of Erlang I am most uncomfortable with is the apparent lack of support for information hiding. I've attached a module I wrote implementing a simple priority queue with operations to add and pop elements, and to view the element with highest priority. The data structure used is a list of tuples, where each tuple contains an element and a priority. In writing the module, I felt a certain...nervousness at trusting callers to pass in a valid data structure each time they invoked a function in the module. Does Erlang provide mechanisms for encapsulating data structures, or is lack of information hiding just something to be accepted when programming a functional language? Potential solutions seem to include the method used in the example program (Program 5.6) on pp. 81 - 82 of _Concurrent Programming in Erlang_, in which a server function stores data structures in their current state, suspends until it receives a message to operate on them, and after processing, invokes the function with the now-modified data structures as arguments. I have also seen references to doing OOP in Erlang, but am unsure of how common this approach is. In short, what is the most natural mechanism to use in the language? Regards, Jith ~~~~~~~~~~~~~ Jith Meganathan Vail Systems, Inc. -------------- next part -------------- A non-text attachment was scrubbed... Name: pq.erl Type: application/x-unknown-content-type-erlang Size: 2128 bytes Desc: not available URL: From jhague@REDACTED Fri Apr 28 03:21:49 2000 From: jhague@REDACTED (James Hague) Date: Thu, 27 Apr 00 20:21:49 -0500 Subject: Information hiding in Erlang Message-ID: <200004280120.UAA01131@node-03.advancenet.net> > Does Erlang >provide mechanisms for encapsulating data structures, or is lack of >information hiding just something to be accepted when programming a >functional language? One simple trick is to put an atom in your data structure and check for it. So you could represent a priority queue as {priority_queue, Queue}. Then each routine that operated on it could be of the form: insert({priority_queue, Queue}) -> ... This isn't bulletproof, but covers you in most cases. In general, I try not to worry too much about such things. After all, I could have a routine that accepted three parameters, all integers, and I can't check if the user gets the order wrong. Some advice I've heard is to avoid thinking of other programs in the system as attacking microbes, and assume they'll play nice in general :) Erlang is one of the few functional languages that's dynamically typed. In other functional languages there's much formalism to make sure that a priority queue is indeed a priority queue, but it's debatable if the effort is indeed worth the result. James From luke@REDACTED Fri Apr 28 12:00:30 2000 From: luke@REDACTED (Luke Gorrie) Date: 28 Apr 2000 12:00:30 +0200 Subject: Information hiding in Erlang In-Reply-To: Jith Meganathan's message of "Thu, 27 Apr 2000 18:50:14 -0500" References: <3908D236.1892CC92@vailsys.com> Message-ID: <87wvlibl4x.fsf@cockatoo.bluetail.com> Jith Meganathan writes: > I've attached a module I wrote implementing a simple priority queue with > operations to add and pop elements, and to view the element with highest > priority. The data structure used is a list of tuples, where each tuple > contains an element and a priority. In writing the module, I felt a > certain...nervousness at trusting callers to pass in a valid data > structure each time they invoked a function in the module. Does Erlang > provide mechanisms for encapsulating data structures, or is lack of > information hiding just something to be accepted when programming a > functional language? You could make an abstract data type out of queue elements with: qelement({Elt, _Priority}) -> Elt. qpriority({_Elt, Priority}) -> Priority. Since it's often useful to use these things as lists anyway, you could also add: %% Turn a Queue into an ordered list of {Element, Priority} and vice versa queue_to_list(Queue) -> Queue. list_to_queue(List) -> List. This should be sufficient to let you change the "internal" data structure however you want in future. The "dict" module in stdlib makes a good example, I think. So, you still don't have compilier- or runtime- checks enforcing encapsulation, but you do have a way to write clients which doesn't rely on the format of the list. Cheers, Luke From maurice@REDACTED Fri Apr 28 04:54:02 2000 From: maurice@REDACTED (Maurice Castro) Date: Fri, 28 Apr 2000 12:54:02 +1000 (EST) Subject: Information hiding in Erlang In-Reply-To: <3908D236.1892CC92@vailsys.com> from Jith Meganathan at "Apr 27, 2000 06:50:14 pm" Message-ID: <200004280254.MAA27849@parallel.serc.rmit.edu.au> Hi All, true information hiding in Erlang may be accomplished through the use of processes. Information to be hidden is held in the process and the process is acted on by messages, changing the state of the process. Note: to be polite, you should also provide accessor functions which format the messages correctly This structure is typically used where state stores are required or segments of a system need to be isolated from potentially misbehaving components. In general, however, there is little value in concerning oneself about users deliberately misusing a function, they can only hurt themselves by killing their own process. Any nervousness about interfering with the `hidden' inputs to a function are equivalent to worrying about someone either forgetting to allocate an object or deleting and reallocating an object in an OO program. Processes should either protect their interfaces by either guards or selecting only valid data types; or they should have a restart strategy incase of failure. Maurice Castro From pan@REDACTED Fri Apr 28 10:47:53 2000 From: pan@REDACTED (Patrik Nyblom) Date: Fri, 28 Apr 2000 10:47:53 +0200 Subject: erlang:now() in erlang 4.9.1 on Linux References: <14590.53016.840927.933044@gargle.gargle.HOWL>, <200004220343.DAA20511@gecko.serc.rmit.edu.au> Message-ID: <39095039.66A625FD@erix.ericsson.se> A non-text attachment was scrubbed... Name: not available Type: multipart/mixed Size: 9427 bytes Desc: not available URL: From hakan@REDACTED Fri Apr 28 12:29:00 2000 From: hakan@REDACTED (Hakan Mattsson) Date: Fri, 28 Apr 2000 12:29:00 +0200 (MET DST) Subject: requirements of health care apps In-Reply-To: <3.0.6.32.20000427183248.009096b0@mail.sistema.it> Message-ID: On Thu, 27 Apr 2000, Bud P. Bruegger wrote: bud>1. Limit of Mnesia databases to a size of 4GB bud>(http://www.erlang.org/faq/x1084.html#AEN1103). Competing dbms usually bud>handle terrabyte of data. Is there an easy fix? Does this limitation bud>apply to a single node in a distributed setting or to the whole database? The FAQ is partly wrong. There are no HARD limitations on the maximum database size. 4GB is the upper limit of one single dets file. A Mnesia database may consist of lots of tables where each one may use a dets table as backing storage. In fact you may split your table into lots of fragments and use dets as backing storage for each fragment. I would really like to encourage you to perform benchmarks on your own, using hardware, data volumes and access patterns similar to your target application. There are however two mechanisms in Mnesia, that may probably will turn out to be showstoppers for your gigantic database: - repair of dets files. If your systems happens to crash and leave a dets file in a opened state, it will automatically recover at next startup, but if the file is large it will take ages to repair even for rather small dets files. Klacke has suggested a clever solution for this (safe dets), this has however not been incorporated in Erlang/OTP. - remote table load. When Mnesia recovers after a node crash, it will copy tables from other nodes hosting a more up-to-date replica of the table. If the table is large it may take quite a while to transfer it between the Erlang nodes. This issue is tricky to solve, without major architectural changes of Mnesia. Storing terrabytes of data in the current Mnesia is not feasible. But a budget approach, that perhaps would make it possible to use Mnesia for terrabyte databases, is to extend Mnesia to store blobs as separate files and only use dets to keep track of the files. This would dramatically reduce the file size and also make it possible to use regular tools, such as glimpse, to perform the massive text search. A new algorithm for replication of blob files could be kept separate from the current table load algorithm. It would in fact, be possible to build such a blob replication mechanism as an application on top of Mnesia, and just use Mnesia to keep track of the meta data, such as the current replication state. bud>2. inefficient handling of text bud>(http://www.erlang.org/faq/x299.html#AEN309). Many health care bud>applications make heavy use of free-text style data (such as medical bud>records) that are if possible losely structures (with XML). How difficult bud>would it be to extend Mnesia/Erlang to efficiently store and manage bud>(regular expressions, free text search etc.) textual data? The FAQ bud>mentions work underway. Will this only apply to Erlang or also Mnesia? bud>Does anyone know when to expect the results to be available? Not this year. bud>I imagine that Mnesia, being object-relational and very fast, would be a bud>great backend DBMS for a persistent object store. The overhead introduced bud>by a Java persistance layer on top of Mnesia intuitively seems to be less bud>than that of the "normal" object-relational mapping. And the distribution bud>and fault-tolerance features of Mnesia are unique and highly attractive. bud> bud>I would be very interested in you opinion on feasibility, performance, bud>degree of paradigm mismatch, etc. A practical project could for example bud>add a Mnesia backend to Castor (http://castor.exolab.org/). Mnesia is a DBMS for Erlang applications. Using Mnesia from other languages implies that you introduce quite large extra overhead for process communication (as normal Erlang applications executes in separate lightweight threads in the same address space as Mnesia) and data conversion between Java's data structures and Erlang terms. There are some showstoppers for a Castor backend project, but if you could live without SQL, XML and text searching this could be an interesting approach to exploit: - store the Java data structures in Mnesia as blobs, without converting them to Erlang's datastructures. - open up Mnesia's inter-node interface and let the Java side act as a limited Erlang node running a minimal Mnesia complient server without own table replicas. The performance would of course not be as good as for Erlang applications, but it could still be acceptable depending on the application requirements. bud>2. Distributed, fault-tolerant XML Repository bud>---------------------------------------------- bud> bud>Another killer app (that is admittedly related to the above) would be a bud>distributed, fault-tolerant xml repository based on Mnesia. XML is bud>difficult to map to relational tables (see bud>http://www.poet.com/products/cms/white_papers/xml/repository.html) and some bud>approaches use a (IMHO slow) object-relational mapping bud>(http://www.informatik.tu-darmstadt.de/DVS1/staff/bourret/xmldbms/xmldbms.ht bud>m) to overcome this problem. bud>I would be very interested in your opinion on how well Mnesia would be bud>suited as a backend for an XML repository. For example, how easily the bud>structure of XML would map to Mnesia. In order to achieve acceptable performance, new features needs to first be added to the Erlang run-time system, then used by Mnesia and eventually by Mnemosyne: - searching in lists in ets+dets tables - regexp searching in binaries in ets+dets tables - allowing operators like (>, /= etc.) in dets patterns - asynchronous or threaded I/O - ... When this support is included in Erlang/OTP I believe that it would be quite easy to build an XML repository on top of Mnesia. It would really be a killer app. /H?kan From bob@REDACTED Fri Apr 28 14:49:25 2000 From: bob@REDACTED (Bob) Date: Fri, 28 Apr 2000 02:49:25 -1000 Subject: requirements of health care apps Message-ID: <200004281249.e3SCnum23305@hades.cslab.ericsson.net> > > 1. Limit of Mnesia databases to a size of 4GB > (http://www.erlang.org/faq/x1084.html#AEN1103). Competing dbms usually > handle terrabyte of data. Is there an easy fix? Does this limitation > apply to a single node in a distributed setting or to the whole database? > Let's remember to distinguish between the soft real time characteristics of mnesia, and the non-real time characteristics of 'competing' dbms. One approach is to interface erlang with a 'competing' dbms to leverage the benefits of mnesia for the data requiring soft-real time, with the benefits of a non-real time sql database. In the practical application, you'll almost certainly want your terabyte database on machine(s) seperate from your erlang application. Thanks to all for great discussion. Bob From etxuwig@REDACTED Fri Apr 28 16:49:52 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Fri, 28 Apr 2000 16:49:52 +0200 (MET DST) Subject: requirements of health care apps In-Reply-To: Message-ID: On Fri, 28 Apr 2000, Hakan Mattsson wrote: hakan>There are however two mechanisms in Mnesia, that may probably will hakan>turn out to be showstoppers for your gigantic database: hakan> hakan>- repair of dets files. If your systems happens to crash and leave hakan> a dets file in a opened state, it will automatically recover at hakan> next startup, but if the file is large it will take ages to repair hakan> even for rather small dets files. Klacke has suggested a clever hakan> solution for this (safe dets), this has however not been incorporated hakan> in Erlang/OTP. hakan> hakan>- remote table load. When Mnesia recovers after a node crash, it will hakan> copy tables from other nodes hosting a more up-to-date replica of hakan> the table. If the table is large it may take quite a while to transfer hakan> it between the Erlang nodes. This issue is tricky to solve, without hakan> major architectural changes of Mnesia. In my experience, local table load is also inefficient on very large tables, unless you keep the table as a disc_only copy (i.e. do not load it into RAM.) This currently means that you can not make the table an ordered set (since this exists in ets only - not dets.) I recently had an ordered_set table with 2 million objects (roughly 500 MB). It took 36 hours to load -- without repair -- on my 330 MHz UltraSPARC. Granted, the table resided on the file server, but I don't think the load time would have been in the order of minutes anyway. Just to get a grip of how long it takes in general to write objects to a (plain) file, and then read them into an ets table, I wrote a tiny test program. Putting the file on the same file server as above, I got: 1000 objects (payload: lists:seq(1,500)): write: 119 msec (??) read : 2.5 sec 10,000 objects: write: 14 sec read : 25 sec 100,000 objects (174 MB): write: 168 sec (2 min 48 sec) read : 433 sec I didn't run a million objs, but I can guess from the above that it would take >2500 secs (42 minutes) to read. Even when reading 100,000 objects, my 512 MB Ultra got into some heavy swapping, as the VM grew to 480 MB (see -- another problem right there). Conclusion? I think we need to invent some form of large-file I/O, and an efficient way of dumping a large file into ets, and back. For the time being, we should use other DBMSes for really large tables, and let mnesia handle small-to-medium size real-time databases. I've attached my simple test program, so you can see what I did. /Uffe -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 -------------- next part -------------- -module(dbtest). -compile(export_all). write(N, F) -> {ok, Fd} = file:open(F, [write]), Bin = term_to_binary(data()), Sz = size(Bin), io:format("write Sz = ~p~n", [Sz]), do_write(1, N, Bin, Fd), file:close(Fd). do_write(N, NMax, Data, Fd) when N =< NMax -> file:write(Fd, list_to_binary([i32(N),Data])), do_write(N+1, NMax, Data, Fd); do_write(N, NMax, Data, Fd) -> ok. i32(Int) when binary(Int) -> i32(binary_to_list(Int)); i32(Int) when integer(Int) -> [(Int bsr 24) band 255, (Int bsr 16) band 255, (Int bsr 8) band 255, Int band 255]; i32([X1,X2,X3,X4]) -> (X1 bsl 24) bor (X2 bsl 16) bor (X3 bsl 8) bor X4. i32(X1,X2,X3,X4) -> (X1 bsl 24) bor (X2 bsl 16) bor (X3 bsl 8) bor X4. read(F) -> {ok, Fd} = file:open(F, [read]), T = ets:new(?MODULE, [set]), Sz = size(term_to_binary(data()))+4, io:format("read Sz = ~p~n", [Sz]), do_read(Fd, Sz, T). do_read(Fd, Sz, T) -> case file:read(Fd, Sz) of {ok, [B1,B2,B3,B4|Bytes]} -> Obj = binary_to_term(list_to_binary(Bytes)), ets:insert(T, {i32([B1,B2,B3,B4]), Obj}), do_read(Fd, Sz, T); Other -> {T, Other} end. data() -> lists:seq(1,500). From guia_internet@REDACTED Sat Apr 29 22:41:24 2000 From: guia_internet@REDACTED (Antonio) Date: Sat, 29 Apr 2000 15:41:24 -0500 Subject: All about South America Message-ID: <200004292050.PAA06297@dragonfans.com> If you need information about Peru and South America, visit this page: http://peruvian.hypermart.net=20 Guia Internet Antonio Zarate