From etxuwig@REDACTED Mon Jan 3 14:57:49 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Mon, 3 Jan 2000 14:57:49 +0100 (MET) Subject: rdbms-1.2 for Erlang R6B Message-ID: I have updated the rdbms user contribution, so that it now works with the R6B release. Some of you (assuming that any of you actually use rdbms ;) may have successfully used rdbms-1.0 on R6B, so I thought I'd explain what it is in 1.0 that *doesn't* work on R6B. The functions rdbms:do_add_properties/[1,2] allow the programmer to define properties from within a schema transaction. This has the advantage that global properties and local properties can be defined atomically, instead of calling mnesia:write_table_property/2 for each property. However, this doesn't work with the original implementation of mnesia_schema.erl. Therefore, I have included a patch for mnesia_schema.erl. Since mnesia_schema.erl has changed since the last Open Source release, a new patch was needed. Apart from this detail, the following changes have been made (my release notes handling is deplorable -- I apologize): - I have rewritten the implementation of register_commit_action/1 and register_rollback_action/1 so that they work as they should, even in nested transactions. Quite an intriguing problem... - rdbms exports a record -- #rdbms_obj{name, attributes}, which can be passed to make_object/[1,2] and make_record/1 (below) (unfortunately not directly to mnesia:write/1 due to an oversight; this is corrected in 1.3 -- on its way to erlang.org). - I have added the functions make_object/[1,2] and make_record/1 to facilitate passing key-value lists to an update function. Thus, you can write rdbms:make_object(person, [{name,"..."}|...]) and let rdbms return a valid record (possibly updated from an existing object.) Example: (rdbms@REDACTED)1> Ps. [{{attr,name,type},string}, {{attr,name,required},true}, {{attr,address,type},string}, {{attr,phone,type},string}, {{attr,phone,required},true}] (rdbms@REDACTED)2> mnesia:create_table( person,[{disc_copies,[node()]}, {attributes,[name,address,phone]}, {user_properties,Ps}]). {atomic,ok} (rdbms@REDACTED)3> rdbms:make_object(person). {rdbms_obj,person, [{name,string,'#.[].#'}, {address,string,'#.[].#'}, {phone,string,'#.[].#'}]} (rdbms@REDACTED)4> rdbms:make_record(person). {person,'#.[].#','#.[].#','#.[].#'} (rdbms@REDACTED)5> Uffe = rdbms:make_object(person,[{name,"Uffe"}, {phone,"98195"}]). {rdbms_obj,person, [{name,string,"Uffe"}, {address,string,'#.[].#'}, {phone,string,"98195"}]} (rdbms@REDACTED)6> rdbms:activity(fun() -> mnesia:write(Uffe) end). ok (rdbms@REDACTED)7> ets:tab2list(person). [{person,"Uffe",'#.[].#',"98195"}] (rdbms@REDACTED)8> Rec = rdbms:make_record(Uffe). {person,"Uffe",'#.[].#',"98195"} (rdbms@REDACTED)9> rdbms:make_object(Rec). {rdbms_obj,person, [{name,string,"Uffe"}, {address,string,'#.[].#'}, {phone,string,"98195"}]} - New type: {tuples, Arity, KeyPos}; verification makes sure that the element is in fact a list of tuples of given arity. - New type: oid, which constructed as {node(), erlang:now()} -- globally and persistently unique (*). Attributes of type oid are not allowed to be NULL, but make_record/1 and make_object/[1,2] will generate a unique oid when needed. - New referential actions: return and ignore. 'ignore' means exactly what it says. 'return' means that we return all related objects untouched, so that the user can determine what to do with them. /Uffe (*) As long as the node isn't restarted with the system clock set back significantly. With reasonably accurate timing, this is not a problem. -- 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 esanchez@REDACTED Mon Jan 3 16:52:01 2000 From: esanchez@REDACTED (Enrique Sanchez Vela) Date: Mon, 03 Jan 2000 09:52:01 -0600 Subject: Patches for christmas... References: <199912302306.AAA01330@super.du.uab.ericsson.se> Message-ID: <3870C5A1.B0CDC1EA@citi.com.mx> Per Hedeland wrote: > > I also applied the patch as described here to fix the problem with > >extra_pointer bits and did not help at all, it again assign a 0x20000000 > >which will never make a match with the 0xc0000000 value of UNSAFE_MASK. If I > >change the value to 0xe0000000 it works well as well if I undef the > >Extra_pointer_bits value. > > Strange, I can't see how the configure test could come up with > 0x20000000 when using a mask of 0xc0000000 - you do realize that you > have to apply the patches to a "virgin" distribution and then run > configure? > > --Per sure! I've spent quite some time doing this over and over again, the machine I am using is quite small, now I begin to suspect of it since some y2k crap tested there. enrique. -- Enrique Sanchez Vela tel/phone (01-8)/(011-528) 357-2267 CITI Consultores S.A. de C.V fax/fax Soporte Tecnico From per@REDACTED Mon Jan 3 17:46:10 2000 From: per@REDACTED (Per Hedeland) Date: Mon, 3 Jan 2000 17:46:10 +0100 (MET) Subject: Patches for christmas... Message-ID: <200001031646.RAA01760@aalborg.du.uab.ericsson.se> Enrique Sanchez Vela wrote: > >Per Hedeland wrote: > >> Strange, I can't see how the configure test could come up with >> 0x20000000 when using a mask of 0xc0000000 - you do realize that you >> have to apply the patches to a "virgin" distribution and then run >> configure? >> >> --Per > >sure! I've spent quite some time doing this over and over again, the machine I am >using is quite small, now I begin to suspect of it since some y2k crap tested >there. Hm, if you only applied that particular patch, and didn't run autoconf, I see now that there is an obvious problem - the patch only changes erts/autoconf/aclocal.m4, which is used by autoconf when building the configure script - the corresponding change to configure itself is actually included in the "loadable drivers" patch, which has the full erts/autoconf/configure diff. This was an unintentional effect of juggling too many patches at once:-), but I won't "fix" it, since that would make different versions of the two patches incompatible with each other - there is now some explanatory text on the web page, though. In any case it's preferable that you apply *all* the patches when working on a new port, at least. --Per From afelty@REDACTED Mon Jan 3 18:33:29 2000 From: afelty@REDACTED (Amy Felty) Date: Mon, 3 Jan 2000 12:33:29 -0500 (EST) Subject: PLI 2000: Last Call for Workshops Message-ID: CALL FOR WORKSHOP PROPOSALS PRINCIPLES, LOGICS, AND IMPLEMENTATIONS OF HIGH-LEVEL PROGRAMMING LANGUAGES (PLI 2000) Montreal, Canada, September 18-23, 2000 http://www.cs.yorku.ca/pli-00 Submission deadline: January 7, 2000 Proposals are invited for workshops at PLI 2000, a federation of colloquia which includes ICFP 2000 (ACM-SIGPLAN International Conference on Functional Programming) and PPDP 2000 (ACM-SIGPLAN 2nd International Conference on Principles and Practice of Declarative Programming), to be held in Montreal, September 18-23, 2000. (Details of these and other affiliated events are available from the Web pages listed below.) Such proposals should be sent to the Workshop Chair of PLI 2000, should be no longer than two pages and should describe the topic of the workshop (that should relate broadly to declarative and/or functional programming), the names and contact information of the organizers, the expected number of participants and duration, and any other factors relevant to its selection. The preference is for day-long workshops, but longer or shorter ones will be considered. THE DEADLINE FOR RECEIPT OF PROPOSALS IS JANUARY 7, 2000. Proposals will be evaluated by the PLI 2000 Workshop Chair, the ICFP and PPDP Program Chairs, and the ICFP General Chair. Acceptance decisions will be made by February 1, 2000. A more detailed call for workshop proposals is available at http://www.cs.yorku.ca/pli-00/workshops.html Evaluation Committee: Amy Felty (Univ. of Ottawa), PLI 2000 Workshop Chair, afelty@REDACTED Maurizio Gabbrielli (Univ. of Udine), PPDP 2000 Program Co-Chair Martin Odersky (EPFL Lausanne), ICFP 2000 General Chair Frank Pfenning (Carnegie Mellon Univ.), PPDP 2000 Program Co-Chair Philip Wadler (Bell Labs), ICFP 2000 Program Chair PLI 2000 Web Page: http://www.cs.yorku.ca/pli-00 ICFP 2000 Web Page: http://diwww.epfl.ch/~odersky/icfp2000 PPDP 2000 Web Page: http://www.cs.yorku.ca/ppdp-00 From bjorn@REDACTED Tue Jan 4 15:03:07 2000 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 04 Jan 2000 15:03:07 +0100 Subject: Web page with Beam specification and benchmarks Message-ID: On my home page, http://www.ericsson.se/cslab/~bjorn, you can find the following items, which you might or might not find interesting: 1. A specification of the Beam file format for the R6B. This does NOT include the instruction set (I'm working, very slowly, on such a document). 2. Results of some benchmark runs comparing languages features and Erlang versions. For instance, you can see that fun calls are much faster in R6B compared to the previous open source release. The source code for my "benchmark framework" and my benchmarks is also available. /Bjorn -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 125 25 ?lvsj? From jmilman@REDACTED Wed Jan 5 12:42:48 2000 From: jmilman@REDACTED (Yehiel (Jake) Milman) Date: Wed, 5 Jan 2000 13:42:48 +0200 Subject: [Q] Newbie - using etk on Win-98. Message-ID: <4BE83B669586D1119C2E0008C709C9A3241453@mailsrv2.amdocs.com> Hello all! Tcl/Tk 8.0 is currently installed on my computer. I understand that etk needs Tk 4.2. Where should I install the binaries and how would I tell Erlang where it is installed? Jake. From per@REDACTED Wed Jan 5 23:51:00 2000 From: per@REDACTED (Per Hedeland) Date: Wed, 5 Jan 2000 23:51:00 +0100 (MET) Subject: [Q] Newbie - using etk on Win-98. Message-ID: <200001052251.XAA16696@super.du.uab.ericsson.se> >Tcl/Tk 8.0 is currently installed on my computer. I understand that etk >needs Tk 4.2. Where should I install the binaries and how would I tell >Erlang where it is installed? The needed versions of Tcl/Tk are included in the distribution, and get "automatically" built (on Unix) and installed where Erlang/etk can find them (and they don't interfere with other installed software). However there are some problems with etk in the latest (R6B-0) open-source release, and while fixes are available at http://www.erlang.org/faq/bugs_and_fixes.html, they don't (yet) address the Windows version. You may or may not get it to work by manual tweaking based on the info available there - sorry, we haven't yet had the time to investigate this further... --Per Hedeland per@REDACTED From franck@REDACTED Sat Jan 8 02:31:36 2000 From: franck@REDACTED (Franck van Breugel) Date: Fri, 7 Jan 2000 20:31:36 -0500 (EST) Subject: CFP PPDP 2000 Message-ID: Call For Papers ACM-SIGPLAN 2nd International Conference on Principles and Practice of Declarative Programming (PPDP 2000) Montreal, Canada, September 20-22, 2000 http://www.cs.yorku.ca/ppdp-00 Submission deadline: March 1, 2000 Program Co-Chairs: Maurizio Gabbrielli (University of Udine, Italy) gabbri@REDACTED Frank Pfenning (Carnegie Mellon University, Pittsburgh, USA) fp@REDACTED Program Committee: Samson Abramsky (University of Edinburgh, UK) Zena Ariola (University of Oregon, USA) Andrea Asperti (University of Bologna, Italy) Frank de Boer (University of Utrecht, NL) Radhia Cousot (Ecole Polytechnique, France) Danny De Schreye (Catholic U. Leuven, Belgium) Saumya Debray (University of Arizona, USA) Thom Fruhwirth (LMU Munich, Germany) Andrew Gordon (Microsoft Research, UK) Doug Howe (Bell Labs, USA) Claude Kirchner (LORIA & INRIA Nancy, France) Naoki Kobayashi (University of Tokyo, Japan) Michael Maher (Griffith University, Australia) Greg Morrisett (Cornell University, USA) Robert Nieuwenhuis (TU of Catalonia, Spain) Christine Paulin (LRI-University Paris Sud, France) Paul Tarau (University of North Texas, USA) German Vidal (University of Valencia, Spain) Scope of the Conference: PPDP represents the union of two former conferences: Programming Languages, Implementations, Logics and Programs (PLILP) and Algebraic and Logic Programming (ALP). Continuing the tradition of PLILP/ALP, PPDP 2000 aims to stimulate research on the use of declarative methods in programming and on the design, implementation and application of programming languages that support such methods. Topics of interest include any aspect related to understanding, integrating and extending programming paradigms such as those for functional, logic, constraint and object-oriented programming; concurrent extensions and mobile computing; type theory; support for modularity; use of logical methods in the design of program development tools; program analysis and verification; abstract interpretation; development of implementation methods; application of the relevant paradigms and associated methods in industry and education. This list is not exhaustive: submissions related to new and interesting ideas relating broadly to declarative programming are encouraged. The technical program of the conference will combine presentations of the accepted papers with invited talks and advanced tutorials. Paper Submissions: Submissions must be received on or before March 1, 2000. Papers must describe original, previously unpublished work that has not been simultaneously submitted for publication elsewhere. They must be written in English, must contain a clearly delineated part intended for the proceedings not exceeding 15 pages, 11 pt font, and must have a cover page with an abstract of up to 200 words, keywords, postal and electronic mailing addresses, and phone and fax numbers of the corresponding author. Additional material for possible consideration by reviewers may be included in the form of appendices. All submissions are to be electronic unless specifically approved by the Program Co-Chairs. Submissions in PostScript format should be sent to ppdp-00@REDACTED Authors will be notified of acceptance decisions by May 15, 2000. Camera-ready copies of the accepted papers must be received by June 15, 2000. Publication: The proceedings will be published by ACM Press. Conference Venue and Related Events: PPDP 2000 is part of a federation of colloquia known as Principles, Logics and Implementations of high-level programming languages (PLI 2000) which includes the International Conference on Functional Programming (ICFP 2000). The overall event will run from September 18 to September 23, 2000 and will be held in Montreal, Canada. Details about the affiliated conferences and workshops will appear at the URL http://www.cs.yorku.ca/pli-00 Sponsorship: PPDP 2000 is being sponsored by ACM (SIGPLAN) with support of ALP, COMPULOG AMERICAS and EATCS. Topics: Logic and Constraint Programming Functional Programming Object-Oriented Programming Concurrent Programming Mobile Computing Specification Languages and Methods Type and Module Systems Program Logics and Verification Program Analysis and Transformation Abstract Machines and Compilation Methods Parallel and Distributed Implementations Programming Environments Important dates: Submission deadline: March 1, 2000 Notification: May 15, 2000 Final Version: June 15, 2000 Conference: September 20-22, 2000 Conference Chair: Franck van Breugel (York University, Toronto, Canada) franck@REDACTED Web Site and Email Contact: URL: http://www.cs.yorku.ca/ppdp-00 email: ppdp-00@REDACTED email for submissions: ppdp-00@REDACTED From vladdu@REDACTED Mon Jan 10 15:02:16 2000 From: vladdu@REDACTED (Vlad Dumitrescu) Date: Mon, 10 Jan 2000 15:02:16 CET Subject: The Wikie site Message-ID: <20000110140216.12952.qmail@hotmail.com> Hi! Where did the Wikie site dissapear? If I remember right, wikie.vegetable.org should have remained active... The link from erlang.org should be updated too... /Vlad ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com From Sean.Hinde@REDACTED Mon Jan 10 16:41:51 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Mon, 10 Jan 2000 15:41:51 -0000 Subject: Web page with Beam specification and benchmarks Message-ID: Hi Bjorn, Interesting benchmark figures. Are you (or anyone else?) aware if anyone has similar results from relative or absolute performance testing of distribution and message passing? These seem to be quite difficult to measure accurately and seem to be as important as sequential processing speed for most Erlang systems. Thanks, Sean -----Original Message----- From: Bjorn Gustavsson [mailto:bjorn@REDACTED] Sent: 04 January 2000 14:03 To: erlang-questions@REDACTED Subject: Web page with Beam specification and benchmarks On my home page, http://www.ericsson.se/cslab/~bjorn, you can find the following items, which you might or might not find interesting: 1. A specification of the Beam file format for the R6B. This does NOT include the instruction set (I'm working, very slowly, on such a document). 2. Results of some benchmark runs comparing languages features and Erlang versions. For instance, you can see that fun calls are much faster in R6B compared to the previous open source release. The source code for my "benchmark framework" and my benchmarks is also available. /Bjorn -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 125 25 ?lvsj? From luke@REDACTED Mon Jan 10 17:05:34 2000 From: luke@REDACTED (Luke Gorrie) Date: Mon, 10 Jan 2000 17:05:34 +0100 Subject: Wikie -- back soon! Message-ID: <200001101605.RAA07023@duva.bluetail.com> Hi all, Sorry that the Wiki site has been down this past week, it's due to bad preparation on my part. I've just shifted from Brisbane to Stockholm, but the only place with the up-to-date wiki data file is on a computer of mine in brisbane that's not on the internet. BUT! a brave friend is grabbing my vegetable.org servers and plugging them into the internet for me, so I'll get Wikie back up ASAP and post a mail here about it. Of course after this experience, Bluetail will have to create a Wikie Robustifier! Cheers, Luke From hans@REDACTED Tue Jan 11 21:27:21 2000 From: hans@REDACTED (Hans Nilsson) Date: Tue, 11 Jan 2000 21:27:21 +0100 Subject: Mnemosyne aggregation functions In-Reply-To: Your message of "Tue, 28 Dec 1999 08:54:03 +0800." <19991228085403.A30542@oink.cc.ntu.edu.tw> Message-ID: <200001112027.VAA22445@norrlands.du.uab.ericsson.se> There are no aggregation functions in Mnemosyne. They are hard to add because of the query optimization algorithm used. /Hans Nilsson Chuan-kai Lin wrote: >Greetings, > >Does anyone know how to use aggregation functions (such as min, max, >sum, etc.) in a Mnemosyne query? I cannot find any documentation on >this issue, and hope somebody on this list might be able to provide >some suggestions. > >Regards, > >-- Chuan-kai Lin > From joe@REDACTED Wed Jan 12 12:16:24 2000 From: joe@REDACTED (Joe Armstrong) Date: Wed, 12 Jan 2000 12:16:24 +0100 (CET) Subject: ICQ Message-ID: Has anybody made an Erlang ICQ client? /Joe -- Joe Armstrong, Bluetail AB, tel: +46 8 692 22 11 Hantverkargatan 78, fax: +46 8 654 70 71 SE-112 38 Stockholm, Sweden info: www.bluetail.com From sam@REDACTED Wed Jan 12 13:42:38 2000 From: sam@REDACTED (Samuel Tardieu) Date: Wed, 12 Jan 2000 13:42:38 +0100 Subject: ICQ In-Reply-To: ; from joe@bluetail.com on Wed, Jan 12, 2000 at 12:16:24PM +0100 References: Message-ID: <2000-01-12-13-42-38+trackit+sam@inf.enst.fr> On 12/01, Joe Armstrong wrote: | | Has anybody made an Erlang ICQ client? | I've never heard of one, and AFAIK ICQ uses an unpublished private protocol (I myself use a free software client but it is not yet complete because of this lack of documentation). From Bob.Smart@REDACTED Sun Jan 16 00:50:04 2000 From: Bob.Smart@REDACTED (Bob Smart) Date: Sun, 16 Jan 2000 10:50:04 +1100 Subject: No subject Message-ID: <200001152350.KAA23466@stranger.vic.cmis.CSIRO.AU> Why is this an illegal guard -module(t). -export([test/0]). test() -> if 33 == list_to_integer("33") -> 99; true -> 88 end. but this is ok -module(t). -export([test/0]). test() -> Num = list_to_integer("33"), if 33 == Num -> 99; true -> 88 end. Bob From davidg@REDACTED Sun Jan 16 10:10:46 2000 From: davidg@REDACTED (David Gould) Date: Sun, 16 Jan 2000 01:10:46 -0800 Subject: your mail In-Reply-To: <200001152350.KAA23466@stranger.vic.cmis.CSIRO.AU>; from Bob Smart on Sun, Jan 16, 2000 at 10:50:04AM +1100 References: <200001152350.KAA23466@stranger.vic.cmis.CSIRO.AU> Message-ID: <20000116011046.A5884@dnai.com> On Sun, Jan 16, 2000 at 10:50:04AM +1100, Bob Smart wrote: > Why is this an illegal guard > > -module(t). > -export([test/0]). > > test() -> > if > 33 == list_to_integer("33") -> 99; > true -> 88 > end. > > but this is ok > > -module(t). > -export([test/0]). > > test() -> > Num = list_to_integer("33"), > if > 33 == Num -> 99; > true -> 88 > end. > Because not all BIFs are "Guard BIFs". In this case, list_to_integer/1 is not allowed as a guard. As best I can tell from the documentation, it looks like guards are expected to take O(1) time. I am not sure the is a hard and fast rule, but it appears to explain why some BIFs are ok in guards and some are not. By the above, list_to_integer/1 which is O(n) will not be allowed in a guard. Just speculating, but I think the intent of the restriction might be to encourage programmers to use good Erlang style, that is use multiple function clauses and guards, not internal case expressions. The point being if we can count on guards being very cheap, it is easy to accept using lots of them. Anyone who really knows this, please feel free to give the real answer. -dg -- David Gould davidg@REDACTED 510.536.1443 - If simplicity worked, the world would be overrun with insects. - From thomas@REDACTED Mon Jan 17 08:56:13 2000 From: thomas@REDACTED (Thomas Arts) Date: Mon, 17 Jan 2000 08:56:13 +0100 Subject: illegal guard References: <200001152350.KAA23466@stranger.vic.cmis.CSIRO.AU> Message-ID: <3882CB1D.BBB32731@cslab.ericsson.se> Bob Smart wrote: Simply said: A guard may not contain a function that computes something, at most a test. In your first example you compute the integer 33 in a guard, which is not allowed. In the second example, the computation has been performed on beforehand and the guard is only a test. One of the reasons for this is that guards should be easy to implement and very fast to check (for example an infinite computation in a guard would somehow be catastrophic). /Thomas > Why is this an illegal guard > > -module(t). > -export([test/0]). > > test() -> > if > 33 == list_to_integer("33") -> 99; > true -> 88 > end. > > but this is ok > > -module(t). > -export([test/0]). > > test() -> > Num = list_to_integer("33"), > if > 33 == Num -> 99; > true -> 88 > end. > > Bob From jmilman@REDACTED Tue Jan 18 09:04:57 2000 From: jmilman@REDACTED (Yehiel (Jake) Milman) Date: Tue, 18 Jan 2000 10:04:57 +0200 Subject: Installation problems Message-ID: <4BE83B669586D1119C2E0008C709C9A3241468@mailsrv2.amdocs.com> Installing latest Erlang version on a Sun/Sparc Solaris 5.5.1 machine (using the default './configure' and 'make'), the following error was reported when the 'Orber' module was being built: InitialReference.hh:28 strstream.h: no such file or directory. Can anyone help? Jake. From nick@REDACTED Tue Jan 18 15:42:35 2000 From: nick@REDACTED (Niclas Eklund) Date: Tue, 18 Jan 2000 15:42:35 +0100 (MET) Subject: Installation problems In-Reply-To: <4BE83B669586D1119C2E0008C709C9A3241468@mailsrv2.amdocs.com> Message-ID: On Tue, 18 Jan 2000, Yehiel (Jake) Milman wrote: > Installing latest Erlang version on a Sun/Sparc Solaris 5.5.1 machine (using > the default './configure' and 'make'), the following error was reported when > the 'Orber' module was being built: > > InitialReference.hh:28 strstream.h: no such file or directory. > > Can anyone help? InitialReference.hh is used when you want to setup a connection between a C++ ORB and Orber. If not, you can do without it. See also '9 Orber Examples' in the Orber User's Guide. /Nick From seb@REDACTED Thu Jan 20 14:01:31 2000 From: seb@REDACTED (Sebastian Strollo) Date: 20 Jan 2000 14:01:31 +0100 Subject: Patches for christmas... (and a FreeBSD port for New Years) In-Reply-To: Sebastian Strollo's message of "31 Dec 1999 04:16:55 +0100" References: <199912230946.KAA23713@super.du.uab.ericsson.se> Message-ID: Sebastian Strollo writes: > > I have now updated the Erlang FreeBSD port (the update is submitted > with id ports/15791 and I guess it will be committed as soon as > someone has the time). The port update includes the christmas patches > (i.e. they are fetched from the erlang.org site). Too bad FreeBSD > already released 3.4, this update port wont make it on the CD's for > this release... ... I just wanted to point out (in case anyone was wondering) that the port made it into the CVS repository on Dec 31st, 1999. By now it seems the package is also available on ftp mirrors everywhere, it can be found in the directory FreeBSD-stable/packages/lang/erlang-6.1.0.tgz /Sebastian From uzturnau@REDACTED Fri Jan 21 01:57:27 2000 From: uzturnau@REDACTED (uzturnau@REDACTED) Date: Fri, 21 Jan 2000 01:57:27 +0100 Subject: ETk problem Message-ID: <20000121015727.A591@mefisto.waw.aj> I noticed that the function tk:cmd(Entry, [get]) sometimes returns a string, and sometimes a number, depending on whether the entry field contains only [-0-9.] or other characters as well. I don't think this behaviour is very useful, but I could live with it if only I knew an Erlang function to test for being a number or for being a string. Is there such a function? Or, better still, is there a way to force tk:cmd(Entry, [get]) to always return a string? I want to be able to clear an entry, and the following function gives an error if the user has entered "123" (though it works fine if he has entered "xyz"): clear(Entry) -> Text = tk:cmd(Entry, [get]), tk:cmd(Entry, [delete, 0, string:len(Text)]). Thanks for any help, Pawel Turnau From tobbe@REDACTED Fri Jan 21 08:16:59 2000 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: 21 Jan 2000 08:16:59 +0100 Subject: ETk problem In-Reply-To: uzturnau@cyf-kr.edu.pl's message of "Fri, 21 Jan 2000 01:57:27 +0100" References: <20000121015727.A591@mefisto.waw.aj> Message-ID: > ...contains only [-0-9.] or other characters as well. I don't think this > behaviour is very useful, but I could live with it if only I knew an > Erlang function to test for being a number or for being a string. Is > there such a function? .... You can use guards, e.g: .... case tk:cmd(Entry, [get]) of I when integer(I) -> ....; L when list(L) -> .... end, .... Cheers /Tobbe -- Torbj?rn T?rnkvist , tel: +46 8 692 22 15 , fax: +46 8 654 70 71 Bluetail AB , Hantverkargatan 78 , SE-112 38 Stockholm , Sweden Email: tobbe@REDACTED , Web: http://www.bluetail.com/~tobbe From luke@REDACTED Fri Jan 21 12:35:07 2000 From: luke@REDACTED (Luke Gorrie) Date: 21 Jan 2000 12:35:07 +0100 Subject: ETk problem In-Reply-To: Torbjorn Tornkvist's message of "21 Jan 2000 08:16:59 +0100" References: <20000121015727.A591@mefisto.waw.aj> Message-ID: Torbjorn Tornkvist writes: > > ...contains only [-0-9.] or other characters as well. I don't think this > > behaviour is very useful, but I could live with it if only I knew an > > Erlang function to test for being a number or for being a string. Is > > there such a function? .... > > You can use guards, e.g: > > .... > case tk:cmd(Entry, [get]) of > I when integer(I) -> > ....; > L when list(L) -> > .... > end, > .... Another option is to just convert to string if needed, e.g.: ... String = stringify(tk:cmd(Entry, [get]), ... stringify(N) when integer(N) -> integer_to_list(N); stringify(N) when list(N) -> N. From tony@REDACTED Fri Jan 21 17:06:18 2000 From: tony@REDACTED (Tony Rogvall) Date: Fri, 21 Jan 2000 17:06:18 +0100 Subject: ETk problem References: <20000121015727.A591@mefisto.waw.aj> Message-ID: <388883F9.C63449A2@bluetail.com> uzturnau@REDACTED wrote: > I noticed that the function tk:cmd(Entry, [get]) sometimes returns a > string, and sometimes a number, depending on whether the entry field > contains only [-0-9.] or other characters as well. I don't think this > behaviour is very useful, but I could live with it if only I knew an > Erlang function to test for being a number or for being a string. Is > there such a function? Or, better still, is there a way to force > tk:cmd(Entry, [get]) to always return a string? I want to be able to > clear an entry, and the following function gives an error if the user > has entered "123" (though it works fine if he has entered "xyz"): > > clear(Entry) -> > Text = tk:cmd(Entry, [get]), > tk:cmd(Entry, [delete, 0, string:len(Text)]). > > Thanks for any help, > > Pawel Turnau The 'rcmd' is used when the uninterpreted value is needed. In this case this means: Text = tk:rcmd(Entry, [get]) This is of course a hack, but as soon as tcl/tk has internal data types on EVERYTHING (except for string) then it's time to do something about it. BTW To delete all characters in the entry use: tk:cmd(Entry, [delete, 0, 'end']) (one liner :-) /Tony From uzturnau@REDACTED Fri Jan 21 22:11:19 2000 From: uzturnau@REDACTED (uzturnau@REDACTED) Date: Fri, 21 Jan 2000 22:11:19 +0100 Subject: ETk problem In-Reply-To: <388883F9.C63449A2@bluetail.com>; from tony@bluetail.com on Fri, Jan 21, 2000 at 05:06:18PM +0100 References: <20000121015727.A591@mefisto.waw.aj> <388883F9.C63449A2@bluetail.com> Message-ID: <20000121221119.B491@mefisto.waw.aj> On Fri, Jan 21, 2000 at 05:06:18PM +0100, Tony Rogvall wrote: > The 'rcmd' is used when the uninterpreted value is needed. In this case > this means: > Text = tk:rcmd(Entry, [get]) Thanks! This indeed does solve the problem (by the way, is there any documentation on ETk?). I was already despairing of finding a workaround (save modifying the ETk sources) when I discovered that the two -- admittedly different -- inputs "97 98 99" and "abc" produced exactly the same output, making it impossible to distinguish a phone number from "abc"! Rather unfortunate, if you are trying to write a database application ;-) > > This is of course a hack, but as soon as tcl/tk has internal data types > on EVERYTHING (except for string) then it's time to do something about > it. > > BTW > > To delete all characters in the entry use: > tk:cmd(Entry, [delete, 0, 'end']) > (one liner :-) Excellent advice. Thanks again for your help. Pawel From per@REDACTED Mon Jan 24 12:12:26 2000 From: per@REDACTED (Per Hedeland) Date: Mon, 24 Jan 2000 12:12:26 +0100 (MET) Subject: ETk problem In-Reply-To: <20000121221119.B491@mefisto.waw.aj> References: <20000121221119.B491@mefisto.waw.aj> Message-ID: <200001241112.MAA05488@aalborg.du.uab.ericsson.se> uzturnau@REDACTED wrote: >Thanks! This indeed does solve the problem (by the way, is there any >documentation on ETk?). In the otp_src_doc_html_R6B-0.tar.gz tarball: lib/etk-0.9.2/doc/ (also online at http://www.erlang.org/documentation/lib/etk-0.9.2/doc/index.html) - not linked from the "main" page, though. In the otp_src_doc_man_R6B-0.tar.gz tarball: man/man3/etk.3 man/man3/tk.3 - should be accessible via 'erl -man (e)tk' when you've installed the man pages. --Per Hedeland per@REDACTED From bud@REDACTED Tue Jan 25 00:28:34 2000 From: bud@REDACTED (Bud P. Bruegger) Date: Tue, 25 Jan 2000 00:28:34 +0100 Subject: Workflow management system in Erlang/Mnesia? Message-ID: <3.0.6.32.20000125002834.00882bc0@mail.sistema.it> Hello everyone, I came across Mnesia and Erlang these days and got the impression that it may be a cool environment to implement an open source, web-based, distributed, fault-tolerant workflow management system that we intend to use as the basis for a laboratory management system. I'm writing this message in the hope to get feedback on whether Erlang/Mnesia is a good choice for this and whether my expectations are realistic. The workflow management system will manage tasks that are assigned to some organizational unit for execution (departments, persons, etc.), require certain input resources (lab samples to be tested, results of preliminary steps), and produce certain output resources. Visualizing this as graphs, you can see the workflow of tasks whose dependencies are modeled in the form of shared resources. The system forsees a very high level of configurability and flexibility and all workflows can be visually edited ad-hoc. In larger organizations (multiple departments), such a system is naturally distributed. Since the application is rather mission critical, fault-tolerance is quite important. My current idea is to implement a distributed database and most of the business logic in Erlang/Mnesia while using one to several java application servers (Enhydra) for the presentation layer that serves HTML to standard web browsers. Some concrete questions I have include the following: * does Erlang/Mnesia sound like a good solution for this problem in general? * how resource hungry is Erlang (RAM, processor); is it realistic to run such an application on a cluster of small machines (Intel PCs under Linux) much rather than some few super servers? * is there a way to foresee the bandwidth and latency requirements such an application would put on the network? Would it run decently on 10Mbit Ethernet, 100Mbit switched, etc. * does Erlang automatically offer load-balancing distribution of processing similar to pvm? If not, can this be added and with how much effort? * would it be possible to handle small text notes and descriptions with Mnesia (multi line text fields) or is this a datatype that Mnesia does not handle well? * and finally, is there a potential to find people in the Erlang community who are interested in collaboration in such an open source project or is the community mostly limited to telephony applications? Many thanks in advance for any feedback you can give me. cheers --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 tobbe@REDACTED Tue Jan 25 10:10:54 2000 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: 25 Jan 2000 10:10:54 +0100 Subject: Workflow management system in Erlang/Mnesia? In-Reply-To: "Bud P. Bruegger"'s message of "Tue, 25 Jan 2000 00:28:34 +0100" References: <3.0.6.32.20000125002834.00882bc0@mail.sistema.it> Message-ID: > I came across Mnesia and Erlang these days and got the impression that it > may be a cool environment to implement an open source, web-based, > distributed, fault-tolerant workflow management system that we intend to > use as the basis for a laboratory management system. I'm writing this > message in the hope to get feedback on whether Erlang/Mnesia is a good > choice for this and whether my expectations are realistic. You can find an example of an Open Source Erlang/Mnesia/Web application here: http://www.bluetail.com/~tobbe/btt/ > * does Erlang/Mnesia sound like a good solution for this problem in > general? Yes. > * does Erlang automatically offer load-balancing distribution of processing > similar to pvm? No. > If not, can this be added and with how much effort ? I guess this is very application dependent. However, there already exist a library call 'pool', from the man-page: --------- pool can be used to run a set of Erlang nodes as a pool of computational processors. It is organized as a master and a set of slave nodes and includes the following features: * The slave nodes send regular reports to the master about their current load. * Queries can be sent to the master to determine which node will have the least load. The BIF statistics(run_queue) is used for estimating future loads. It returns the length of the queue of ready to run processes in the Erlang system. --------- When it comes to the question about fault-tolerance it can be as simple as using the HEART facility to automatically restart an Erlang node, or as 'complicated' as the Bluetail Mail Robustifier (http://www.bluetail.com). For example I had good use of the former mechanism in the Ticket system mentioned above. I had a bug which sometimes caused the whole system to crash, but since it was restarted automatically the (Web) clients just noticed a long delay which was fixed by hitting the reload button (at that time the sytem was back in operation again with no data lost). Cheers /Tobbe -- Torbj?rn T?rnkvist , tel: +46 8 692 22 15 , fax: +46 8 654 70 71 Bluetail AB , Hantverkargatan 78 , SE-112 38 Stockholm , Sweden Email: tobbe@REDACTED , Web: http://www.bluetail.com/~tobbe From etxuwig@REDACTED Tue Jan 25 11:05:22 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Tue, 25 Jan 2000 11:05:22 +0100 (MET) Subject: Workflow management system in Erlang/Mnesia? In-Reply-To: <3.0.6.32.20000125002834.00882bc0@mail.sistema.it> Message-ID: On Tue, 25 Jan 2000, Bud P. Bruegger wrote: bud>Hello everyone, bud> bud>I came across Mnesia and Erlang these days and got the impression that it bud>may be a cool environment to implement an open source, web-based, bud>distributed, fault-tolerant workflow management system that we intend to bud>use as the basis for a laboratory management system. I'm writing this bud>message in the hope to get feedback on whether Erlang/Mnesia is a good bud>choice for this and whether my expectations are realistic. bud> bud>My current idea is to implement a distributed database and most of the bud>business logic in Erlang/Mnesia while using one to several java application bud>servers (Enhydra) for the presentation layer that serves HTML to standard bud>web browsers. bud> bud>Some concrete questions I have include the following: bud> bud>* does Erlang/Mnesia sound like a good solution for this problem in bud>general? Yes, I think so. bud>* how resource hungry is Erlang (RAM, processor); is it realistic to run bud>such an application on a cluster of small machines (Intel PCs under Linux) bud>much rather than some few super servers? This type of application should work well on a cluster of small machines. I'm currently running an Erlang-based web server on my machine (a 500MHz UltraSPARC 10 with 512 MB RAM). The web server is ticking along nicely without affecting my normal work. Currently it takes up 37 MB RAM (same as my Netscape browser, BTW), but that is mainly indicative of it's peak requrirement so far. My web server app has peaked at 100 MB RAM useage while HTML-izing a very large source code file. Basically, a typical Erlang application uses a fairly conservative amount of memory, but certain operations are resource hungry. The Erlang garbage collector then compacts the heap, but it is a good idea to have enough virtual memory to handle peaks of maybe (...highly application dependent...) 100 MB for your type of application. Currently, my largest table in mnesia contains 124,000 records. bud>* is there a way to foresee the bandwidth and latency requirements such an bud>application would put on the network? Would it run decently on 10Mbit bud>Ethernet, 100Mbit switched, etc. Assuming your 10MB Ethernet is not already strained, it should work well, I think, but given the chance, I'd go for 100MB switched -- why chance it? bud>* would it be possible to handle small text notes and descriptions bud>with Mnesia (multi line text fields) or is this a datatype that bud>Mnesia does not handle well? Mnesia takes any type of data. Small text notes is hardly a problem. Just bear in mind that character lists in Erlang use up 8 bytes per character. One way to get around this (but don't worry about if you don't have tons of data) is to convert the text notes to binary objects. Personally, I use atoms instead of lists in my 120K-record cross-reference table, because it contains lots of fully qualified file names. This means that I convert each file name using list_to_atom(Filename). Given that atoms are never removed, this is a risky proposition, so don't do it unless your "name space" is finite. bud>* and finally, is there a potential to find people in the Erlang bud>community who are interested in collaboration in such an open bud>source project or is the community mostly limited to telephony bud>applications? Yes, I'm interested for one. Even the telecom community has a need for workflow applications. ;) If your workflow application needs RDBMS-like features, check out the rdbms contrib. /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 Philip.van.Gastel@REDACTED Thu Jan 27 15:20:18 2000 From: Philip.van.Gastel@REDACTED (Philip van Gastel (ETM)) Date: Thu, 27 Jan 2000 15:20:18 +0100 Subject: cmdfiles Message-ID: <3921BC22FF85D2118C950008C75D94A006B8C22D@enlrynt302.etm.ericsson.se> Hi there, I am just starting using Erlang because of my work. A very short question, is there a possibility of using command files, containing Erlang code and run it from command line, eg. # erl # In this case, I just enter the erl shell, perform the commands and exit again. Regards, Philip van Gastel Address: Philip.van.Gastel@REDACTED From etxuwig@REDACTED Thu Jan 27 16:10:59 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Thu, 27 Jan 2000 16:10:59 +0100 (MET) Subject: cmdfiles In-Reply-To: <3921BC22FF85D2118C950008C75D94A006B8C22D@enlrynt302.etm.ericsson.se> Message-ID: On Thu, 27 Jan 2000, Philip van Gastel (ETM) wrote: Philip>Hi there, Philip> Philip>I am just starting using Erlang because of my work. Philip> Philip> Philip>A very short question, is there a possibility of using Philip>command files, containing Erlang code and run it from command Philip>line, eg. Philip> Philip># erl Philip># Philip> Philip>In this case, I just enter the erl shell, perform the Philip>commands and exit again. One way is to use a pipe (assuming UNIX here): $ echo "erlang:now()." | erl -boot start_clean Eshell V4.9.1 (abort with ^G) 1> {948,985137,921298} ** Terminating erlang ** Or using erl_call: # erl_call -s -sname foo -a 'erlang now []' {948,985627,609986}# # setenv X `erl_call -sname foo -a 'erlang now []'` # echo $X 948 985713 596695 # erl_call -sname foo -q # erl_call -sname foo -a 'erlang now []' erl_connect failed erl_call --help for detailed instructions /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 Chandru.Mullaparthi@REDACTED Thu Jan 27 16:19:42 2000 From: Chandru.Mullaparthi@REDACTED (Chandrashekhar M) Date: Thu, 27 Jan 2000 15:19:42 +0000 Subject: cmdfiles References: <3921BC22FF85D2118C950008C75D94A006B8C22D@enlrynt302.etm.ericsson.se> Message-ID: <3890620E.C2950899@eei.ericsson.se> You'll have to make a boot file for your application and use the -boot option of erl. hth Chandru "Philip van Gastel (ETM)" wrote: > > Hi there, > > I am just starting using Erlang because of my work. > > A very short question, is there a possibility of using command files, containing Erlang code and run it from command line, eg. > > # erl > # > > In this case, I just enter the erl shell, perform the commands and exit again. From per@REDACTED Thu Jan 27 19:26:53 2000 From: per@REDACTED (Per Hedeland) Date: Thu, 27 Jan 2000 19:26:53 +0100 (MET) Subject: cmdfiles In-Reply-To: <3921BC22FF85D2118C950008C75D94A006B8C22D@enlrynt302.etm.ericsson.se> References: <3921BC22FF85D2118C950008C75D94A006B8C22D@enlrynt302.etm.ericsson.se> Message-ID: <200001271826.TAA08349@aalborg.du.uab.ericsson.se> "Philip van Gastel (ETM)" wrote: >A very short question, is there a possibility of using command files, >containing Erlang code and run it from command line, eg. Yet another way: % cat /tmp/cmd.bat io:format("~w~n", [erlang:now()]), halt(). % erl -noshell -s file eval /tmp/cmd.bat {948,997185,154349} % --Per Hedeland per@REDACTED From kurt.wilkin@REDACTED Fri Jan 28 01:24:34 2000 From: kurt.wilkin@REDACTED (Kurt Wilkin) Date: Fri, 28 Jan 2000 13:24:34 +1300 Subject: syntax Message-ID: <3890E1C2.8CC41167@actfs.co.nz> Hello all. I recently read this version of selection sort in a Haskell algorithms book (from memory): selsort [] = [] selsort xs = m : (selsort (delete m xs)) where m = min(xs) and am wondering if anyone can give tips on how this is done, or where I can find how this is done, in Erlang. Attempting to translate directly I have started with: selsort (xs) -> [m | selsort (lists:delete m xs)] ..._now what?_...; or : selsort (xs) -> m = lists:min(xs) in [m | selsort (lists:delete m xs)] Perhaps it is possible to: selsort (xs) -> append (lists:min(xs), selsort (lists:delete (lists:min(xs))) xs); Or can you do something like this : selsort(xs) -> [ m | m <- xs, m = lists:min(xs), delete (m xs)] Is there any way to refer to min(xs) as m?. From jim@REDACTED Fri Jan 28 03:09:14 2000 From: jim@REDACTED (Jim Larson) Date: Thu, 27 Jan 2000 18:09:14 -0800 Subject: Reducing number of copies of bulk network data Message-ID: <200001280209.SAA00144@lefse.jetcafe.org> Hello! I'm working on an Erlang application that needs to handle a large bandwidth of network data, multiplexing it among a variety of other (UNIX) processes, attached over TCP connections on the loopback device. We use binary sockets to get the bulk data into Erlang binary form, thus avoiding copies during intra-Erlang message-passing. When analyzing the performance of the application, I've noticed that the current Internet socket driver (erts/emulator/drivers/common /inet_drv.c) copies the data once during reception and once during sending. UDP reception works fine, receiving data directly into its Binary buffer. TCP reception, at least when packetizing is turned on, makes one copy of the data. Is there any way to eliminate this copy? In our application, the binary received from the network is split and reassembled into a new packet which is then sent back out over another interface. However, for anything but a single binary, the runtime system makes a copy of the I/O list into a contiguous buffer, then passes that buffer to the driver. Is there any way to eliminate this copy? I've noticed an "outputv" driver entry point which seems to accept an iovec argument, instead of a simple pointer and length. This would help our application tremendously. Is this entry point well-supported in the runtime system? Is it mature enough for a driver to use it? We'd eventually like to use shared memory to communicate with the clients of our Erlang application that are running on the same machine. To get true zero-copy, we'd need to be able to: - incorporate buffers from an mmap()'ed file as Erlang binary objects; - receive data from a network socket directly into a buffer in mmap()'ed space; - allocate all new binary objects, or buffers created by the runtime system as concatenations of byte lists, into buffers in mmap()'ed space. The easiest way to do this seems to be to: - modify the runtime system's malloc() wrappers to call malloc() replacements that use shared memory (note that this puts the entire Erlang heap into shared memory, which may be extreme); - create a new driver which can incorporate shared memory buffers as new Erlang binaries. Are there any other ideas on how to do this? Lastly, will the upcoming binary syntax bring along an iovec-style internal representation of binaries? This would allow us to concatenate binaries with zero copies. Thanks, Jim Larson jim@REDACTED From etxuwig@REDACTED Fri Jan 28 09:47:22 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Fri, 28 Jan 2000 09:47:22 +0100 (MET) Subject: syntax In-Reply-To: <3890E1C2.8CC41167@actfs.co.nz> Message-ID: On Fri, 28 Jan 2000, Kurt Wilkin wrote: kurt>Hello all. kurt> kurt>I recently read this version of selection sort in a Haskell kurt>algorithms book (from memory): kurt> kurt>selsort [] = [] kurt>selsort xs = m : (selsort (delete m xs)) kurt> where m = min(xs) kurt> kurt>and am wondering if anyone can give tips on how this kurt>is done, or where I can find how this is done, in Erlang. First of all, variables in Erlang always start with uppercase. kurt>Attempting to translate directly I have started with: kurt> kurt>selsort (xs) -> [m | selsort (lists:delete m xs)] kurt> ..._now what?_...; kurt> kurt>or : kurt> kurt>selsort (xs) -> kurt> m = lists:min(xs) in kurt> [m | selsort (lists:delete m xs)] This is close, but replace the "in" with a comma. Here is a working program: ------------------ -module(selsort). -export([sort/1]). sort([]) -> []; sort(L) -> Min = lists:min(L), [Min | sort(lists:delete(Min, L))]. ------------------ Erlang (BEAM) emulator version 4.9.1 Eshell V4.9.1 (abort with ^G) 1> c(selsort). {ok,selsort} 2> selsort:sort([4,3,5,6,7,2,3,1,4,3]). [1,2,3,3,3,4,4,5,6,7] /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 sallach@REDACTED Fri Jan 28 23:04:23 2000 From: sallach@REDACTED (David Sallach) Date: Fri, 28 Jan 2000 16:04:23 -0600 Subject: etk? Message-ID: <200001282205.QAA09691@allman.src.uchicago.edu> The open source FAQ suggests that GUI development should be done with etk rather than gs because it is a newer and better package. However, I don't see documentation for etk, either as a separate document, or in STDLIB. Is it a part of R6B? Are there any plans for Erlang to support a graphic system not based upon Tk? Thanks. David Sallach University of Chicago From scott@REDACTED Sat Jan 29 23:29:04 2000 From: scott@REDACTED (Scott Lystig Fritchie) Date: Sat, 29 Jan 2000 16:29:04 -0600 Subject: cmdfiles In-Reply-To: Message of "Thu, 27 Jan 2000 15:19:42 GMT." <3890620E.C2950899@eei.ericsson.se> Message-ID: <200001292229.QAA10629@snookles.snookles.com> >>>>> "cm" == Chandrashekhar M writes: cm> You'll have to make a boot file for your application and use the cm> -boot option of erl. I was wondering how the heck the Erlang application packaging stuff worked. The Erlang documentation works fairly well as a reference, but it's short on tutorial. While I'm certainly no expert with Erlang packaging, I've managed to figure out enough to get an application to run all on its own, and enough to write.... The Guerrilla 10 Minute Erlang Packaging School =============================================== (Constructive criticism is welcome.) As an example, I've got a simple incrementing counter server that I'd like to run non-interactively. I might want to extend the application later to include a decrementing counter, or a counter that I could specify my own increment, or perhaps a counter in floating point, or something else ... but I'll worry about that later. The source code is split into two directory hierarchies. count_server Contains the application stuff. If I want to have other counter types later, this is where they'll be started and managed. If I add more, I'd probably want to use a supervisor tree to make things more manageable, and I'd put the supervisor stuff here, too. increment Contains the code for the simple incrementing server. Since this is a really simple example, there is only one Erlang source file in each hierarchy. Hopefully they are enough for demonstration purposes. When I was writing & debugging this code, the interactive shell was the tool to use. The directory I worked out of was count_server/src, and in it I had a .erlang file to assist code auto-loading: code:add_path("../ebin"). code:add_path("../../increment/ebin"). When it comes time to try to run this non-interactively, the steps I took were: 1. Create a .app file for each hierarchy in the "ebin" subdir. systools:make_script() seems to want the .app file in "ebin" instead of "src". I'd prefer "src", but I haven't figured out how. Perhaps if I look at the Eddie source distribution a bit harder.... 2. Create a .rel file for the application. 3. Generate the .boot file. 4. Run the silly thing. 5. Test it. All of the files I mention are included in a "shar" archive below. My apologies to Windows users, but it shouldn't be too difficult to pick apart the archive manually. 1. Creating the .app files. The two I created are count_server/ebin/count_server.app and increment/ebin/increment.app. I don't fully understand all of the entries, so for those that I also thought were mandatory, I just stuck something in using "HUH" as a marker that I don't know what I'm doing. The count_server/ebin/count_server.app file looks like: {application, count_server, [ {description, "Ridiculously brute-force Erlang packaging example"}, {vsn, "0.01"}, {id, "count_server HUH"}, {modules, [ count_server ] }, {registered, [ count_server ] }, %% NOTE: It seems as if you don't want to list below libraries %% that are load-only. This is only a list of applications that must %% be started before this application is started. In the case of %% increment, we'll be starting it ourselves. {applications, [ kernel, stdlib ] }, %% This is the statement that triggers the loading process to call %% the start function (and arguments) for the application. {mod, {count_server, [arg1, arg2]} } ] }. If the count_server app contained more than one module, I'd include them in the "modules" list. Most everything else is boilerplate. The same holds true for the increment/ebin/increment.app file. The only significant difference is that it doesn't have a "mod" entry, because the count_server application is responsible for starting the increment server. 2. Create the .rel file. This is count_server/src/count_server.rel: {release, {"count_server", "0.01"}, {erts, "47.4.1"}, [{kernel,"2.5"}, {stdlib,"1.8.1"}, {count_server, "0.01"}, {increment, "0.01"}]}. This lists version dependencies. If you're using an older Erlang distribution, you may have to tweak the version numbers for erts, kernel, and stdlib. If I recall correctly, make_script will complain, but it will tell you what versions are installed. Edit the .rel file, then try again. 3. Generate the .boot file. I've put this in a Makefile rule in count_server/src/Makefile: count_server.boot count_server.script: $(ESRC)/count_server.rel \ $(EBIN)/count_server.app $(INCREMENT_EBIN)/increment.app erl -pa $(EBIN) -pa $(INCREMENT_EBIN) \ -s systools make_script count_server -s erlang halt -noshell The first two lines specify "make" dependencies. The last two lines give the "erl" command line to run systools:make_script(count_server), then erlang:halt(). 4. Run the silly thing. Run using: % cd count_server/src % erl -boot count_server -pa ../ebin -pa ../../increment/ebin \ -sname count -noinput If I'd really installed the compiled .beam files in the proper place, such as /usr/local/lib/erlang somewhere, the "-pa" flags wouldn't be necessary. The "-sname" flag is necessary if you want this Erlang node to be able to communicate with other Erlang nodes. The "-noinput" flag keeps the interpreter from running. To save wear and tear on your fingers and keyboard, it's probably a good idea to put that command line in a shell/batch script. :-) 5. Test it. Once the "count" node is running the count_server application, I'll start another Erlang node on the same machine, bigbird, to test it out. % erl -sname foo Erlang (BEAM) emulator version 4.9.1 [source] Eshell V4.9.1 (abort with ^G) (foo@REDACTED)1> gen_server:call({increment, 'count@REDACTED'}, {get1}). 0 (foo@REDACTED)2> gen_server:call({increment, 'count@REDACTED'}, {get1}). 1 (foo@REDACTED)3> gen_server:call({increment, 'count@REDACTED'}, {get1}). 2 (foo@REDACTED)4> gen_server:call({increment, 'count@REDACTED'}, {reset, 40}). 3 (foo@REDACTED)5> gen_server:call({increment, 'count@REDACTED'}, {get1}). 40 (foo@REDACTED)6> gen_server:call({increment, 'count@REDACTED'}, {get1}). 41 -Scott --- Scott Lystig Fritchie, 5401 - 10th Ave S, Minneapolis, MN 55417 USA office: 612.827.2835, cell: 612.805.1383 Professional Governing: Is It Faked? --- snip --- snip --- snip --- snip --- snip --- snip --- snip --- #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # Makefile # count_server/Makefile # count_server/ebin/count_server.app # count_server/src/Makefile # count_server/src/count_server.erl # count_server/src/count_server.rel # increment/Makefile # increment/ebin/increment.app # increment/src/Makefile # increment/src/increment.erl # if test -f 'Makefile' then echo shar: will not over-write existing file "'Makefile'" else echo x - 'Makefile' sed 's/^X//' >'Makefile' << 'SHAR_EOF' XSUBDIRS = increment count_server X Xall install clean: X @for d in ${SUBDIRS}; do (cd $$d; ${MAKE} $@); done SHAR_EOF if test 106 -ne "`wc -c < 'Makefile'`" then echo shar: error transmitting "'Makefile'" '(should have been 106 characters)' fi fi if test ! -d 'count_server' then mkdir 'count_server' fi if test -f 'count_server/Makefile' then echo shar: will not over-write existing file "'count_server/Makefile'" else echo x - 'count_server/Makefile' sed 's/^X//' >'count_server/Makefile' << 'SHAR_EOF' XSUBDIRS = src X Xall install clean: X @for d in ${SUBDIRS}; do (cd $$d; ${MAKE} $@); done SHAR_EOF if test 87 -ne "`wc -c < 'count_server/Makefile'`" then echo shar: error transmitting "'count_server/Makefile'" '(should have been 87 characters)' fi fi if test ! -d 'count_server' then mkdir 'count_server' fi if test ! -d 'count_server/ebin' then mkdir 'count_server/ebin' fi if test -f 'count_server/ebin/count_server.app' then echo shar: will not over-write existing file "'count_server/ebin/count_server.app'" else echo x - 'count_server/ebin/count_server.app' sed 's/^X//' >'count_server/ebin/count_server.app' << 'SHAR_EOF' X{application, count_server, X [ X {description, "Ridiculously brute-force Erlang packaging example"}, X {vsn, "0.01"}, X {id, "count_server HUH"}, X {modules, [ X count_server X ] X }, X {registered, [ count_server ] }, X %% NOTE: It seems as if you don't want to list below libraries X %% that are load-only. This is only a list of applications that must X %% be started before this application is started. In the case of X %% increment, we'll be starting it ourselves. X {applications, [ kernel, stdlib ] }, X X %% This is the statement that triggers the loading process to call X %% the start function (and arguments) for the application. X {mod, {count_server, [arg1, arg2]} } X ] X}. X SHAR_EOF if test 695 -ne "`wc -c < 'count_server/ebin/count_server.app'`" then echo shar: error transmitting "'count_server/ebin/count_server.app'" '(should have been 695 characters)' fi fi if test ! -d 'count_server' then mkdir 'count_server' fi if test ! -d 'count_server/src' then mkdir 'count_server/src' fi if test -f 'count_server/src/Makefile' then echo shar: will not over-write existing file "'count_server/src/Makefile'" else echo x - 'count_server/src/Makefile' sed 's/^X//' >'count_server/src/Makefile' << 'SHAR_EOF' XESRC = . XEBIN = ../ebin XINCREMENT_EBIN = ../../increment/ebin X XERL_FLAGS = -W X Xall: $(EBIN)/count_server.beam count_server.boot count_server.script X X$(EBIN)/count_server.beam: $(ESRC)/count_server.erl X erlc $(ERL_FLAGS) -o$(EBIN) $(ESRC)/count_server.erl X Xcount_server.boot count_server.script: $(ESRC)/count_server.rel \ X $(EBIN)/count_server.app $(INCREMENT_EBIN)/increment.app X erl -pa $(EBIN) -pa $(INCREMENT_EBIN) \ X -s systools make_script count_server -s erlang halt -noshell X Xclean: X rm -f $(EBIN)/*.beam count_server.boot count_server.script X SHAR_EOF if test 555 -ne "`wc -c < 'count_server/src/Makefile'`" then echo shar: error transmitting "'count_server/src/Makefile'" '(should have been 555 characters)' fi fi if test ! -d 'count_server' then mkdir 'count_server' fi if test ! -d 'count_server/src' then mkdir 'count_server/src' fi if test -f 'count_server/src/count_server.erl' then echo shar: will not over-write existing file "'count_server/src/count_server.erl'" else echo x - 'count_server/src/count_server.erl' sed 's/^X//' >'count_server/src/count_server.erl' << 'SHAR_EOF' X%%%---------------------------------------------------------------------- X%%% File : count_server.erl X%%% Author : Scott Lystig Fritchie X%%% Purpose : Brute-force demo Erlang packaging and boot file making. X%%%---------------------------------------------------------------------- X X-module(count_server). X-author('scott@REDACTED'). X-compile([verbose, report_errors, report_warnings, trace]). X-vsn("0.01"). X X-behaviour(application). X X%% application callbacks X-export([start/2, stop/1]). X X%%%---------------------------------------------------------------------- X%%% Callback functions from application X%%%---------------------------------------------------------------------- X X%%---------------------------------------------------------------------- X%% Func: start/2 X%% Returns: {ok, Pid} | X%% {ok, Pid, State} | X%% {error, Reason} X%%---------------------------------------------------------------------- Xstart(Type, StartArgs) -> X %% Trying to be simple here, so won't use a supervisor tree. X case increment:start_link() of X {ok, Pid} -> X {ok, Pid}; X Error -> X Error X end. X X%%---------------------------------------------------------------------- X%% Func: stop/1 X%% Returns: any X%%---------------------------------------------------------------------- Xstop(State) -> X ok. X X%%%---------------------------------------------------------------------- X%%% Internal functions X%%%---------------------------------------------------------------------- SHAR_EOF if test 1523 -ne "`wc -c < 'count_server/src/count_server.erl'`" then echo shar: error transmitting "'count_server/src/count_server.erl'" '(should have been 1523 characters)' fi fi if test ! -d 'count_server' then mkdir 'count_server' fi if test ! -d 'count_server/src' then mkdir 'count_server/src' fi if test -f 'count_server/src/count_server.rel' then echo shar: will not over-write existing file "'count_server/src/count_server.rel'" else echo x - 'count_server/src/count_server.rel' sed 's/^X//' >'count_server/src/count_server.rel' << 'SHAR_EOF' X{release, {"count_server", "0.01"}, {erts, "47.4.1"}, X [{kernel,"2.5"}, X {stdlib,"1.8.1"}, X {count_server, "0.01"}, X {increment, "0.01"}]}. SHAR_EOF if test 143 -ne "`wc -c < 'count_server/src/count_server.rel'`" then echo shar: error transmitting "'count_server/src/count_server.rel'" '(should have been 143 characters)' fi fi if test ! -d 'increment' then mkdir 'increment' fi if test -f 'increment/Makefile' then echo shar: will not over-write existing file "'increment/Makefile'" else echo x - 'increment/Makefile' sed 's/^X//' >'increment/Makefile' << 'SHAR_EOF' XSUBDIRS = src X Xall install clean: X @for d in ${SUBDIRS}; do (cd $$d; ${MAKE} $@); done SHAR_EOF if test 87 -ne "`wc -c < 'increment/Makefile'`" then echo shar: error transmitting "'increment/Makefile'" '(should have been 87 characters)' fi fi if test ! -d 'increment' then mkdir 'increment' fi if test ! -d 'increment/ebin' then mkdir 'increment/ebin' fi if test -f 'increment/ebin/increment.app' then echo shar: will not over-write existing file "'increment/ebin/increment.app'" else echo x - 'increment/ebin/increment.app' sed 's/^X//' >'increment/ebin/increment.app' << 'SHAR_EOF' X{application, increment, X [ X {description, "Ridiculously brute-force Erlang packaging example"}, X {vsn, "0.01"}, X {id, "increment HUH"}, X {modules, [ X increment X ] X }, X {registered, [ ] }, X %% NOTE: It seems as if you don't want to list below libraries X %% that are load-only. This is only a list of applications that must X %% be started before this application is started. In the case of X %% incr_server, we'll be starting it ourselves. X {applications, [ kernel, stdlib ] } X X %% We don't need a mod item to start this app. X ] X}. X SHAR_EOF if test 557 -ne "`wc -c < 'increment/ebin/increment.app'`" then echo shar: error transmitting "'increment/ebin/increment.app'" '(should have been 557 characters)' fi fi if test ! -d 'increment' then mkdir 'increment' fi if test ! -d 'increment/src' then mkdir 'increment/src' fi if test -f 'increment/src/Makefile' then echo shar: will not over-write existing file "'increment/src/Makefile'" else echo x - 'increment/src/Makefile' sed 's/^X//' >'increment/src/Makefile' << 'SHAR_EOF' XESRC = . XEBIN = ../ebin X XERL_FLAGS = -W X Xall: $(EBIN)/increment.beam X X$(EBIN)/increment.beam: $(ESRC)/increment.erl X erlc $(ERL_FLAGS) -o$(EBIN) $(ESRC)/increment.erl X Xclean: X rm -f $(EBIN)/*.beam X SHAR_EOF if test 198 -ne "`wc -c < 'increment/src/Makefile'`" then echo shar: error transmitting "'increment/src/Makefile'" '(should have been 198 characters)' fi fi if test ! -d 'increment' then mkdir 'increment' fi if test ! -d 'increment/src' then mkdir 'increment/src' fi if test -f 'increment/src/increment.erl' then echo shar: will not over-write existing file "'increment/src/increment.erl'" else echo x - 'increment/src/increment.erl' sed 's/^X//' >'increment/src/increment.erl' << 'SHAR_EOF' X%%%---------------------------------------------------------------------- X%%% File : increment.erl X%%% Author : Scott Lystig Fritchie X%%% Purpose : A brute-force attempt to show how quickly Erlang's VM can X%%% handle a couple of processes busily chatting with each other. X%%%---------------------------------------------------------------------- X X-module(increment). X-compile([verbose, report_errors, report_warnings, trace]). X-behaviour(gen_server). X X-define(NAME, ?MODULE). X-define(Timeout, infinity). X X%% External exports X-export([start_link/0]). X-export([get1/0, get_many/1, reset/1]). X X%% gen_server callbacks X-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, X code_change/3]). X X%%%---------------------------------------------------------------------- X%%% API X%%%---------------------------------------------------------------------- Xstart_link() -> X gen_server:start_link({local, ?NAME}, ?MODULE, [], []). X Xget1() -> X Timeout = ?Timeout, X gen_server:call(?NAME, {get1}, Timeout). X Xget_many(Total) -> X get_many(0, Total, now()). Xget_many(Total, Total, {_, StartS, StartMs}) -> X %% Ignoring Megaseconds not good but it's simple.... X {_, FinS, FinMs} = now(), X Finish = FinS * 1000000 + FinMs, X Start = StartS * 1000000 + StartMs, X io:format("Start = ~w, Finish = ~w\n", [Start, Finish]), X io:format("Looped ~w times in ~w secs, ~w usec/loop\n", X [Total, (Finish - Start) / 1000000, (Finish - Start) / Total]), X ok; Xget_many(N, Total, Start) -> X get(), X get_many(N + 1, Total, Start). X Xreset(N) -> X Timeout = ?Timeout, X gen_server:call(?NAME, {reset, N}, Timeout). X X%%%---------------------------------------------------------------------- X%%% Callback functions from gen_server X%%%---------------------------------------------------------------------- X X%%---------------------------------------------------------------------- X%% Func: init/1 X%% Returns: {ok, State} | X%% {ok, State, Timeout} | X%% ignore | X%% {stop, Reason} X%%---------------------------------------------------------------------- Xinit([]) -> X {ok, 0}. X X%%---------------------------------------------------------------------- X%% Func: handle_call/3 X%% Returns: {reply, Reply, State} | X%% {reply, Reply, State, Timeout} | X%% {noreply, State} | X%% {noreply, State, Timeout} | X%% {stop, Reason, Reply, State} | (terminate/2 is called) X%% {stop, Reason, State} (terminate/2 is called) X%%---------------------------------------------------------------------- Xhandle_call({get1}, From, State) -> X {reply, State, State + 1}; X Xhandle_call({reset, N}, From, State) -> X {reply, State, N}. X X%%---------------------------------------------------------------------- X%% Func: handle_cast/2 X%% Returns: {noreply, State} | X%% {noreply, State, Timeout} | X%% {stop, Reason, State} (terminate/2 is called) X%%---------------------------------------------------------------------- Xhandle_cast(Msg, State) -> X error_logger:info_msg("~w: ~s:handle_cast got ~w\n", X [self(), ?MODULE, Msg]), X {noreply, State}. X X%%---------------------------------------------------------------------- X%% Func: handle_info/2 X%% Returns: {noreply, State} | X%% {noreply, State, Timeout} | X%% {stop, Reason, State} (terminate/2 is called) X%%---------------------------------------------------------------------- Xhandle_info(Info, State) -> X error_logger:info_msg("~w: ~s:handle_info got ~w\n", X [self(), ?MODULE, Info]), X {noreply, State}. X X%%---------------------------------------------------------------------- X%% Func: terminate/2 X%% Purpose: Shutdown the server X%% Returns: any (ignored by gen_server) X%%---------------------------------------------------------------------- Xterminate(Reason, State) -> X ok. X X%%---------------------------------------------------------------------- X%% Func: code_change/3 X%% Purpose: Preserve server state across code upgrades X%% Returns: {ok, NewState} X%%---------------------------------------------------------------------- Xcode_change(OldVsn, State, Extra) -> X {ok, State}. X X%%%---------------------------------------------------------------------- X%%% Internal functions X%%%---------------------------------------------------------------------- SHAR_EOF if test 4473 -ne "`wc -c < 'increment/src/increment.erl'`" then echo shar: error transmitting "'increment/src/increment.erl'" '(should have been 4473 characters)' fi fi echo Done exit 0 From wwas@REDACTED Sun Jan 30 04:53:09 2000 From: wwas@REDACTED (wwas) Date: Sat, 29 Jan 2000 22:53:09 -0500 Subject: Running Erlang w/o an OS Message-ID: <005c01bf6ad5$86742480$c6ce320a@PROXIM> I seem to remember seeing a reference (don't know where) to a project that had Erlang running in a FPGA w/o any OS support. Does this sound familiar to anyone? I can't find any reference to it on www.elang.org . If this thing really exists, I would like to take a look at it. TIA. -was From nazri@REDACTED Mon Jan 31 08:40:22 2000 From: nazri@REDACTED (Mohd Nazri Bin Hussain) Date: Mon, 31 Jan 2000 15:40:22 +0800 Subject: pricing & license deployment Message-ID: <000901bf6bbe$6e669c80$97d4e4c0@dectra.com.my> Hi, Can you please send me the pricing and license deployment. Name: Mohd Nazri Bin Hussain Designation: System Engineer Company: DECTRA SDN. BHD. Address: 42-46 JALAN SS 21/62 DAMANSARA UTAMA 47400 PETALING JAYA SELANGOR, MALAYSIA Phone: 03-7199309 ext 275 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Mohd Nazri Bin Hussain.vcf Type: text/x-vcard Size: 427 bytes Desc: not available URL: From per@REDACTED Mon Jan 31 09:20:02 2000 From: per@REDACTED (Per Hedeland) Date: Mon, 31 Jan 2000 09:20:02 +0100 (MET) Subject: pricing & license deployment In-Reply-To: <000901bf6bbe$6e669c80$97d4e4c0@dectra.com.my> References: <000901bf6bbe$6e669c80$97d4e4c0@dectra.com.my> Message-ID: <200001310820.e0V8K1620547@super.du.uab.ericsson.se> "Mohd Nazri Bin Hussain" wrote: >Can you please send me the pricing and license deployment. The Erlang version available via erlang.org is open-source, i.e. no cost - the open-source license can be found at http://www.erlang.org/EPLICENSE . If you are interested in the commercial version (basically the same bits, but pre-compiled, with formal support, etc), please refer to http://www.erlang.se/ and/or contact sales@REDACTED . Regards --Per Hedeland per@REDACTED From etxuwig@REDACTED Mon Jan 31 10:30:50 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Mon, 31 Jan 2000 10:30:50 +0100 (MET) Subject: Running Erlang w/o an OS In-Reply-To: <005c01bf6ad5$86742480$c6ce320a@PROXIM> Message-ID: On Sat, 29 Jan 2000, wwas wrote: wwas>I seem to remember seeing a reference (don't know where) to a wwas>project that had Erlang running in a FPGA w/o any OS support. wwas>Does this sound familiar to anyone? I can't find any reference to wwas>it on www.elang.org . If this thing really exists, I would like wwas>to take a look at it. TIA. There is such a beast, but it's somewhere between proof of concept and early beta. Strictly speaking, it doesn't exist... yet... ...but it's pretty cool. ;) /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 etxuwig@REDACTED Mon Jan 31 10:13:28 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Mon, 31 Jan 2000 10:13:28 +0100 (MET) Subject: cmdfiles In-Reply-To: <200001292229.QAA10629@snookles.snookles.com> Message-ID: On Sat, 29 Jan 2000, Scott Lystig Fritchie wrote: scott>The Guerrilla 10 Minute Erlang Packaging School scott>=============================================== scott> scott>(Constructive criticism is welcome.) This is a good initiative. [...] scott> 1. Create a .app file for each hierarchy in the "ebin" subdir. scott> systools:make_script() seems to want the .app file in "ebin" scott> instead of "src". I'd prefer "src", but I haven't figured out scott> how. Perhaps if I look at the Eddie source distribution a bit scott> harder.... The .app file *must* be in the "ebin" directory. Sorry. scott>1. Creating the .app files. scott> scott>The two I created are count_server/ebin/count_server.app and scott>increment/ebin/increment.app. I don't fully understand all of the scott>entries, so for those that I also thought were mandatory, I just stuck scott>something in using "HUH" as a marker that I don't know what I'm doing. scott> scott>The count_server/ebin/count_server.app file looks like: scott> scott> {application, count_server, scott> [ scott> {description, "Ridiculously brute-force Erlang packaging example"}, scott> {vsn, "0.01"}, scott> {id, "count_server HUH"}, When building large systems in a large company, all applications may have to be fitted with a product ID -- for trouble reporting, etc. It is then a nice feature to be able to call application:get_attribute(count_server, id) and extract the product id of a certain application in runtime. scott> {modules, [ scott> count_server scott> ] scott> }, scott> {registered, [ count_server ] }, scott> %% NOTE: It seems as if you don't want to list below libraries scott> %% that are load-only. This is only a list of applications that must scott> %% be started before this application is started. In the case of scott> %% increment, we'll be starting it ourselves. scott> {applications, [ kernel, stdlib ] }, This is correct, but it shouldn't matter if you list applications that are load-only (stdlib is such an application). Also, if you're using included applications (whole other chapter), dependencies are aggregated up to the top application. This means that you can enter the dependencies where they actually exist -- you don't have to sum them all up manually at a higher level. scott>This lists version dependencies. If you're using an older Erlang scott>distribution, you may have to tweak the version numbers for erts, scott>kernel, and stdlib. If I recall correctly, make_script will complain, scott>but it will tell you what versions are installed. Edit the .rel file, scott>then try again. Of course, this can be automated (and has been, in fact, in AXD 301). One of these days, I'll try to package this as Open Source (but don't hold your breath.) scott>Xstart(Type, StartArgs) -> scott>X %% Trying to be simple here, so won't use a supervisor tree. scott>X case increment:start_link() of scott>X {ok, Pid} -> scott>X {ok, Pid}; scott>X Error -> scott>X Error scott>X end. The case statement above is redundant. The following behaves exactly the same: start(Type, StartArgs) -> increment:start_link(). /Uffe From svg@REDACTED Mon Jan 31 21:47:10 2000 From: svg@REDACTED (svg@REDACTED) Date: Tue, 01 Feb 2000 01:47:10 +0500 Subject: Tacacs server in Erlang Message-ID: <20000201014710Q.svg@disney.surnet.ru> I'm finished tacacs+ server and client in Erlang. If someone is interested in it he can get it at ftp://disney.surnet.ru/pub/devel/erlang/etacacs-0.0.1.tar.gz. >From README file: Etacacs is a client/server implementation of Cisco TACACS+ protocol in Erlang. It use plug-in modules for doing all operations in the same way as PAM in Solaris, Linux and other Unixes does. With included module mod_tac it can be used as replacement for standard FreeTacacs daemon, you may also use md5 passwords with it, they are "compatible" with md5 passwords used by Linux PAM. Configuration is similar to one of httpd from standard Erlang distribution (appropriated code was stolen with a very few modifications). It was tested with Cisco 2500 routers, pam_tacplus Pam module and tacc program of Pawel Krawczyk. It's not yet tested in production environment and now released only for tests, suggestions and bug reports. Sorry, documentation is not yet completed and translated (I'll do it at next two or free weeks). --- Vladimir Sekissov svg@REDACTED From gabriel@REDACTED Sat Jan 1 07:32:12 2000 From: gabriel@REDACTED (Gabriel Mayor) Date: Sat, 1 Jan 2000 03:32:12 -0300 Subject: Inets configuration Message-ID: <001401bf5421$f09bcea0$0a00a8c0@rack> Hello, I'm having some troubles configuring Inets. I've found and I've been following one thread from 04 feb 1999, and in the last one Mattias Nilsson answering to another person says: >Try this (assuming your 8888.conf is correct): >1> httpd:start("/var/tmp/server_root/conf/8888.conf"). > >This should fire up a httpd server on port 8888 (assuming you have >specified Port 8888 in the 8888.conf file). > >Let me know if you have any luck. I tried and have the following response: ** exited: shutdown ** I also start inets with 2> application:start(inets). But I can't view any html file from this server. Can anybody give some tips? a. Is there something else to change in the 8888.conf file from the example? b. In the ServerName directive, may I put my IP address or localhost (127.0.0.1) or what? c. I copy all the server_root directory from the example to c:/var/tmp. Is there some other file that I must copy or change? I'd appreciate an example of a correct 8888.conf, an example of how to call a page from the browser. Thanks, Carlos.- -------------- next part -------------- An HTML attachment was scrubbed... URL: