From matthias@REDACTED Fri Nov 1 07:15:35 2002 From: matthias@REDACTED (Matthias Lang) Date: Fri, 1 Nov 2002 07:15:35 +0100 Subject: Developing SMS-based Services in erlang In-Reply-To: <20021031231058.A4394@bluetail.com> References: <3DBFE060.D20CCD00@wanadoo.es> <15807.64119.311841.678654@antilipe.corelatus.se> <20021031231058.A4394@bluetail.com> Message-ID: <15810.7175.292120.387532@antilipe.corelatus.se> Klacke writes > To my knowledge the only #7 implementation Ericsson has is written > in PLEX and is about 20 years old by now. Ericsson have a complete stack written in C. They even bundle it with hardware and sell it externally, or at least they did a while back. http://ericsson-signaling.com/ There's a vague press release on the product page saying that the division has been sold to Tieto Enator. I'm not sure what the ramifications of that are; maybe it's not possible to buy it any more. Matthias From james@REDACTED Fri Nov 1 05:09:14 2002 From: james@REDACTED (James Hague) Date: Thu, 31 Oct 2002 22:09:14 -0600 Subject: lists:splitwith/2 and similar functions Message-ID: <3DC1AA0A.28998.5A8886@localhost> I've found myself often writing code that's similar to lists:splitwith/2: given a list, return a tuple of {A,B}, where "A" is a prefix of the list where all elements meet some critera, and "B" is the rest of the list. splitwith works in the usual way, building list "A" backward, then calling lists:reverse at the end to flip it around. Another approach is to count the number of elements that would be in "A" without doing any list building. Once the count is known, it's easy to build "A" in a second pass. Call the second function "split": split(2, "12ab") returns {"12", "ab"}. I argue that this method is cleaner than building a list and reversing it. But the nice part is that "split" could be written as a BIF. It could execute in constant stack space *and* avoid building a list that gets thrown away after a reversed copy of it is made. Ideally, splitwith could be written as: splitwith(Pred, L) -> lists:split(lists:count(Pred, L), L). and certainly lists:count and lists:split would be useful elsewhere. From luke@REDACTED Fri Nov 1 08:34:31 2002 From: luke@REDACTED (Luke Gorrie) Date: 01 Nov 2002 08:34:31 +0100 Subject: ftp.erl patch for chunked downloads Message-ID: Hi, Small patch to ftp.erl from inets 2.6.5 to support chunked file downloads (i.e. one piece at a time with flow control). BTW, what's the "correct" place to mail less than exciting patches? Cheers, Luke -------------- next part -------------- A non-text attachment was scrubbed... Name: inets-ftp.patch Type: text/x-patch Size: 2843 bytes Desc: recv_chunk/2 patch URL: From per@REDACTED Fri Nov 1 08:39:30 2002 From: per@REDACTED (Per Bergqvist) Date: Fri, 01 Nov 2002 08:39:30 +0100 Subject: Developing SMS-based Services in erlang In-Reply-To: <15810.7175.292120.387532@antilipe.corelatus.se> Message-ID: <200211010739.gA17dVi16076@hunden.levonline.com> /// still owns the product, they sold the development organization for it to TE some mysterious reason. Really strange since it has now finally stabillized as is nowadays one of the best ss7 products on the market. (Except that management and especially configuration still sucks). Sometimes I think Ericsson is as clear about their core business as Posten (The swedish Postal Office that recently decided that mail delivery is not their core business ...). It is still unclear if I can continue to buy the stuff from /// or if they sold out the sales guys as well :-( Comment on the SS7 in Erlang: It is absolutely doable. I have had a couple of prototypes "almost working" (tm) but this (very much background....) project has now been stalled during the last year(s) or so in favour for OpenSS7. This doesn't really seem to happen either so in a better world I would probably bring life to the project again... The challenge is in MTP3 if you wan't to have full blown stack. It can be simplified by restricting functionality to end-node. The rest of the layers are very straightforward as long as you know what you're doing. Then, the biggest problem comes. This all needs to be verified in very expensive formal testing by third parties and apart from that you will have to spend more time and money on convincing your customer (i.e. the operator) that your stack is up to it than you would pay on of the commercial vendors for a stack. Never the less, it could be handy for research and testing. /Per > > Klacke writes > > To my knowledge the only #7 implementation Ericsson has is written > > in PLEX and is about 20 years old by now. > > Ericsson have a complete stack written in C. They even bundle it with > hardware and sell it externally, or at least they did a while > back. > > http://ericsson-signaling.com/ > > There's a vague press release on the product page saying that > the division has been sold to Tieto Enator. I'm not sure what the > ramifications of that are; maybe it's not possible to buy it any more. > > Matthias > ========================================================= Per Bergqvist Synapse Systems AB Phone: +46 709 686 685 Email: per@REDACTED From valentin@REDACTED Sat Nov 2 09:15:13 2002 From: valentin@REDACTED (Valentin) Date: Sat, 2 Nov 2002 10:15:13 +0200 Subject: Developing SMS-based Services in erlang References: <3DBFE060.D20CCD00@wanadoo.es><15807.64119.311841.678654@antilipe.corelatus.se> <20021031231058.A4394@bluetail.com> Message-ID: <002601c28247$f977c4a0$1ced1ec4@moneymaker> > > > > There was an effort at the Ericsson computer science laboratory to > > implement #7 in Erlang. I believe MTP-3, TCAP and SCCP were all "90% > > finished". The other 90% of the work was never completed, the main > > protagonists were sidetracked, first by inventing the binary syntax > > and then by the .com bubble. > > This is sooo typical -- spending time where it doesn't make a material difference. I've recently purchased a few SS7 cards + software and noticed that higher in stack you go, more money you have to spend. I cannot think of a better platfrom to implement an application context other than ERLANG. > > In any case, as far as I know, nobody has implemented a complete #7 > > stack (e.g. everything up to GSM-MAP) in Erlang. It seems like quite a > > do-able project, albeit rather daunting for just one person. So, let's team-up! I must say this, though: it makes more sense to appraoch things ratehr differently, starting at the say, MAP-User level, and than move downwards towards MAP-Provider, and, eventually TCAP. Things are getting little out of hand once you hit SCCP, because I think this whole project might succseed only if we keep focus, and whilst TCAP migh be bad enough, SCCP will definately kill the effort. In addition, it might make more sense to do the actual development in C/C++ and keep things ERLANG-centric, rather than dot eh whole thing in ERLANG -- as much as I appreciate ASN.1 and BER support in ERLANG, I do not thing that the manipulation of the binary data is ERLANG's major strength. To this end, C++ is still much better choice. Should I keep my hoes high??? Valentin Micic Principal Consultant Pharos Consulting (Pty) Ltd. South Africa From matthias@REDACTED Sat Nov 2 10:08:13 2002 From: matthias@REDACTED (Matthias Lang) Date: Sat, 2 Nov 2002 10:08:13 +0100 Subject: Developing SMS-based Services in erlang In-Reply-To: <002601c28247$f977c4a0$1ced1ec4@moneymaker> References: <3DBFE060.D20CCD00@wanadoo.es> <15807.64119.311841.678654@antilipe.corelatus.se> <20021031231058.A4394@bluetail.com> <002601c28247$f977c4a0$1ced1ec4@moneymaker> Message-ID: <15811.38397.971511.681252@antilipe.corelatus.se> I took the liberty of trimming the CC list a little. mml> In any case, as far as I know, nobody has implemented a complete #7 mml> stack (e.g. everything up to GSM-MAP) in Erlang. Valentin> So, let's team-up! I must say this, though: it makes Valentin> more sense to appraoch things rather differently, Valentin> starting at the say, MAP-User level, and than move Valentin> downwards towards MAP-Provider, and, eventually Valentin> TCAP. Things are getting little out of hand once you hit Valentin> SCCP, because I think this whole project might succseed Valentin> only if we keep focus, and whilst TCAP migh be bad Valentin> enough, SCCP will definately kill the effort. People generally start from the bottom layers because you can't run the top layers until you have the lower ones running. Valentin> In addition, it might make more sense to do the actual Valentin> development in C/C++ and keep things ERLANG-centric, Valentin> rather than dot eh whole thing in ERLANG -- as much as I Valentin> appreciate ASN.1 and BER support in ERLANG, I do not Valentin> thing that the manipulation of the binary data is Valentin> ERLANG's major strength. To this end, C++ is still much Valentin> better choice. People in this forum are likely to have some degree of resistance to the last suggestion. Take a look at http://www.openss7.org he's done quite a bit of work, quite a few bits are 90% complete. Matthias From pascal.brisset-ml@REDACTED Sat Nov 2 17:28:01 2002 From: pascal.brisset-ml@REDACTED (Pascal Brisset) Date: Sat, 2 Nov 2002 17:28:01 +0100 Subject: Developing SMS-based Services in erlang In-Reply-To: <200211010739.gA17dVi16076@hunden.levonline.com> References: <15810.7175.292120.387532@antilipe.corelatus.se> <200211010739.gA17dVi16076@hunden.levonline.com> Message-ID: <3DA24BE600ED4F3C@mel-rta7.wanadoo.fr> (added by postmaster@wanadoo.fr) Matthias Lang writes: > Ericsson have a complete stack written in C. They even bundle it with > hardware and sell it externally, or at least they did a while > back. > > http://ericsson-signaling.com/ Has anyone else used these products in Erlang applications ? I would be interested in discussing implementation strategies. (We ended up reimplementing parts of their message-passing API in Erlang with the bit syntax.) -- Pascal From kent@REDACTED Sat Nov 2 18:43:46 2002 From: kent@REDACTED (Kent Boortz) Date: 02 Nov 2002 18:43:46 +0100 Subject: Request for GS bug reports Message-ID: In R9 we moved from an older version of Tcl/Tk to version 8.[34]. We also moved away from using an non-standard stand-alone binary containing Tcl/Tk to use a standard distribution of Tcl/Tk and use the "wish" program as GS back-end. I'm currently working with stability improvements, speed improvements and bug fixes in GS. I run the tools written in GS to find problems but it is a bit hard to test all user interactions possible on every supported platform. So if you have discovered any bugs or problems with GS or the tools that use GS, please let me know how to reproduce it and I will try to correct this in R9B-2. Below is a patch that corrects menu handling on Windows XP (and possible other Windows versions), corrects the termination of the wish program when GS or the Erlang node terminates and improves stability in the communication between GS and the wish program. The patch also disables an old optimizations that may be reimplemented later, gstk_port_handler tried to handle more than one message in the incoming queue to send larger chunks to the port or in a call to gen_tcp:send(). So reports if GS is notably slower on your platform after installing the patch are also welcome. To install the patch do % cd otp_src_R9B-0/lib/gs % patch -p0 < gs.patch If you have experience in Tcl/Tk programming and is curious what GS does you can view the Tcl commands sent from Erlang to the wish program by recompiling gstk_port_handler with the DEBUG flag set % export ERL_TOP=/some/path/otp_src_R9B-0 % setenv PATH $ERL_TOP/bin:$ERL_TOP/bootstrap/bin:$PATH % cd $ERL_TOP/lib/gs/src % erlc -DDEBUG -W -bbeam -o../ebin gstk_port_handler.erl kent -------------- next part -------------- A non-text attachment was scrubbed... Name: gs.patch Type: text/x-patch Size: 39488 bytes Desc: GS temporary patch URL: From per@REDACTED Sat Nov 2 19:27:35 2002 From: per@REDACTED (Per Bergqvist) Date: Sat, 02 Nov 2002 19:27:35 +0100 Subject: Developing SMS-based Services in erlang In-Reply-To: <3DA24BE600ED4F3C@mel-rta7.wanadoo.fr> (added by postmaster@wanadoo.fr) Message-ID: <200211021827.gA2IRaT08847@raven.levonline.com> I have used it in several commercial all Erlang products both inside and outside Ericsson. One very good example is all that each iMode transaction is Europe is exercising both Erlang and the former /// stack. We still use it in our current product offerings. On the downside it is now clear that /// is not selling to external parties any more. Tieto Enator enator has taken over all external sales. (Great value and trust in that name, not to mention the conflicts of interest ... ;-) /Per > Matthias Lang writes: > > Ericsson have a complete stack written in C. They even bundle it with > > hardware and sell it externally, or at least they did a while > > back. > > > > http://ericsson-signaling.com/ > > Has anyone else used these products in Erlang applications ? > I would be interested in discussing implementation strategies. > (We ended up reimplementing parts of their message-passing API > in Erlang with the bit syntax.) > > -- Pascal > ========================================================= Per Bergqvist Synapse Systems AB Phone: +46 709 686 685 Email: per@REDACTED From valentin@REDACTED Sat Nov 2 19:55:23 2002 From: valentin@REDACTED (Valentin) Date: Sat, 2 Nov 2002 20:55:23 +0200 Subject: Fw: Developing SMS-based Services in erlang Message-ID: <002501c282a1$687fb2a0$e7b01fc4@moneymaker> By mistake I've sent this to Matthias only... did not mean to -- but most of the lists I am subscribed to do have "Reply to:" set to the list... Oh, well. ----- Original Message ----- From: "Valentin" To: Sent: Saturday, November 02, 2002 12:30 PM Subject: Re: Developing SMS-based Services in erlang > > > > I took the liberty of trimming the CC list a little. > > :-) Thanks (appologies -- hit the reply-all by accident. You cannot be too careful with Miceky-soft don't-look) > > People generally start from the bottom layers because you can't run > the top layers until you have the lower ones running. > With this logic one can conclude that you cannot do anything because you need hardware board first, but I hope we are not starting on a wrong foot here. Look, one can do MAP-User side first, by simply using someone elses MAP provider. Than you can do the MAP provider using other people TCAP, although, I tend to view MAP provider as a specialization of TCAP (i.e. MAP-Open maps directly to TC_BEGIN, etc), although they can be and are treated as two separate layers. There are SS7 board vendors out there (and I know of at least one of them) that enable this appraoch. > Valentin> To this end, C++ is still much better choice. > > People in this forum are likely to have some degree of resistance to > the last suggestion. > Point taken. I was expressing my own oppinion. (Again, let's not start on a wrong foot). As much as I would feel more comfortable with C++ for this kind of development -- the language is not a problem, but understanding of the domain. SS7 is so broad that people can spend years in doing it, and still missunderstnad each other, i.e. ISUP people do not understand MAP people, and STP people do not want to understand either of them. But that aside, this thread was started as Developing SMS-based Services in ERLANG, and that does not have to include SS7 in any way, unless you want to develop Gateway MSC and Inter-Working MSC components of SMSC. Maybe we should start another thread, and put the focus on MAP, if there is enough interest. V. From matthias@REDACTED Sun Nov 3 17:36:11 2002 From: matthias@REDACTED (Matthias Lang) Date: Sun, 3 Nov 2002 17:36:11 +0100 Subject: Fw: Developing SMS-based Services in erlang In-Reply-To: <002501c282a1$687fb2a0$e7b01fc4@moneymaker> References: <002501c282a1$687fb2a0$e7b01fc4@moneymaker> Message-ID: <15813.20603.363151.923046@antilipe.corelatus.se> Valentin writes: > With this logic one can conclude that you cannot do anything because you > need hardware board first That suits me just fine ;-) Corelatus makes money by selling hardware. Software is a necessary evil required to sell hardware. We do as much as necessary: L1 and L2 and leave L3 to our customers. They're better at it than we are and we don't want to compete with them. > But that aside, this thread was started as Developing SMS-based Services in > ERLANG, and that does not have to include SS7 in any way, unless you want to > develop Gateway MSC and Inter-Working MSC components of SMSC. Maybe we > should start another thread, and put the focus on MAP, if there is enough > interest. It depends on what you want to do. The welcome service referred to was presented at last year's Erlang conference. That particular system works by monitoring all (many? some?) internal #7 links to figure out what the user is up to: http://www.erlang.se/euc/01/Hinde2001/sld004.htm I don't know how they do it, but I can guess: they've probably written a PDU decoder in Erlang. It's probably specific to extracting the location-update and insert-subscriber-data packets, so it's relatively simple. Matthias From enricjaen@REDACTED Sun Nov 3 21:50:53 2002 From: enricjaen@REDACTED (=?iso-8859-1?q?Enric=20Jaen?=) Date: Sun, 3 Nov 2002 21:50:53 +0100 (CET) Subject: state doubts Message-ID: <20021103205053.50180.qmail@web14702.mail.yahoo.com> Dear all, I am newbie in Erlang. I have two doubts I would like to clarify: *The state travels in every function call as a parameter. Isn't this a cause of performance degradation when the state has a big size? *AFAIK, Erlang is not multithreaded. But, is there any example of a program implementing a barrier synchronization pattern? That is, a situation where several processes want to access to the same state at the same time and a server must synchronize the access to this state? Cheers, -Enric _______________________________________________________________ Yahoo! Messenger Nueva versi?n: Webcam, voz, y mucho m?s ?Gratis! Desc?rgalo ya desde http://messenger.yahoo.es From thomasl_4711@REDACTED Sun Nov 3 20:23:43 2002 From: thomasl_4711@REDACTED (Thomas Lindgren) Date: Sun, 3 Nov 2002 11:23:43 -0800 (PST) Subject: erlang on a consumer appliance Message-ID: <20021103192343.16703.qmail@web14908.mail.yahoo.com> For your amusement, some results when running Erlang R8B2 on a Playstation 2: --- **** ESTONES = 6318 Title Time Estone % Loops Small Integer arithmetics 741 376 3 4157 list manipulation 3850 805 10 9156 small messages 7164 432 10 1433 medium messages 11929 509 14 1527 huge messages 2451 202 4 52 pattern matching 841 921 5 1074 traverse 899 310 3 2247 Work with large dataset 797 350 3 1193 Work with large local dataset 746 373 3 1174 Alloc and dealloc 568 218 2 3710 Bif dispatch 1415 547 5 1623 Binary handling 3918 126 4 581 ets datadictionary 3791 204 5 342 Generic server (with timeout) 8078 245 8 7977 Float arithmetics 1834 16 1 5526 Function calls 1422 545 5 882 Timers 1282 96 2 2312 Links 711 43 1 30 runtime = 51730 msecs result = ok ---- The PS2 is running PS2-linux, which is a mildly strange Linux version with kanji characters popping up where you didn't expect it. Best, Thomas PS. Trying to make R9, on the other hand, hangs: cp /home/thomasl/erlang/R9B0/bootstrap/erts/bin/ecc /home/thomasl/erlang/R9B0/bootstrap/bin chmod +w /home/thomasl/erlang/R9B0/bootstrap/bin/ecc ERLANG_EARS=/home/thomasl/erlang/R9B0/bootstrap/erts /home/thomasl/erlang/R9B0/bin/mipsel-unknown-linux-gnu/beam_evm /home/thomasl/erlang/R9B0/bootstrap/erts/bin/elink -r /home/thomasl/erlang/R9B0/bin/mipsel-unknown-linux-gnu/beam_evm \ /home/thomasl/erlang/R9B0/bootstrap/bin/ecc Error in process <0.2.0> with exit value: {{badmatch,eof},[{boot_pds,recover_fat,1},{boot_pds,read_fat,2},{boot_pds,'-make_server/2-fun-0-',2}]} make: *** [init_boot] Interrupt __________________________________________________ Do you Yahoo!? HotJobs - Search new jobs daily now http://hotjobs.yahoo.com/ From hakan.stenholm@REDACTED Mon Nov 4 01:57:41 2002 From: hakan.stenholm@REDACTED (=?ISO-8859-1?Q?H=E5kan_Stenholm?=) Date: Mon, 4 Nov 2002 01:57:41 +0100 Subject: state doubts In-Reply-To: <20021103205053.50180.qmail@web14702.mail.yahoo.com> Message-ID: <6BCD97EE-EF90-11D6-BD16-000393B8AB26@mbox304.swipnet.se> On s?ndag, nov 3, 2002, at 21:50 Europe/Stockholm, Enric Jaen wrote: > Dear all, > I am newbie in Erlang. I have two doubts I would like > to clarify: > > *The state travels in every function call as a > parameter. Isn't this a cause of performance > degradation when the state has a big size? No, data is essentially passed as pointers, the state related cost is rather in modifying a piece of data as some copying may be needed to keep the old version around (when needed), e.g. : V1 = {1,2,3}, V2 = setelement(2, V1, b), % same as, copy V1 into V2, set field 2 in V2 to b f(V1), % V1 used later in function Clever FP compiler usually minimize the need for copying. > > > *AFAIK, Erlang is not multithreaded. Yes and no, erlang processes serve much of the same purpose as threads, but you'll need to start several erlang nodes if you need to use more than one CPU. > But, is there any > example of a program implementing a barrier > synchronization pattern? > That is, a situation where > several processes want to access to the same state at > the same time and a server must synchronize the > access to this state? Data in a erlang process is only visible to that process, you'll need to send a message (Pid ! Msg) to request data from another process. There are also a number of data structures like ets and mnesia tables that can be accessed globally. Mnesia has transaction support, it is also common to use gen_servers to control access to services / data. > > Cheers, > -Enric > > > _______________________________________________________________ > Yahoo! Messenger > Nueva versi?n: Webcam, voz, y mucho m?s ?Gratis! > Desc?rgalo ya desde http://messenger.yahoo.es > From enricjaen@REDACTED Mon Nov 4 11:28:14 2002 From: enricjaen@REDACTED (=?iso-8859-1?q?Enric=20Jaen?=) Date: Mon, 4 Nov 2002 11:28:14 +0100 (CET) Subject: code update doubt In-Reply-To: <6BCD97EE-EF90-11D6-BD16-000393B8AB26@mbox304.swipnet.se> Message-ID: <20021104102814.83585.qmail@web14704.mail.yahoo.com> Very kind for your answers. I forgot to make a question regarding code upgrade: * After the resume, processes keep running the old version until they do a global function call. But before this, their state may have been updated. For example: -module(test). loop(state) ... old version of test <--- process suspended <--- load new version of test <--- change state <--- process resumed ... process keep executing old version of test.. ... do something with NEW state .. (1) test:loop(state) <-- use new version of test. (1) The old code version is using the new state version. Doesn't this cause an inconsistency? Cheers. -Enric _______________________________________________________________ Yahoo! Messenger Nueva versi?n: Webcam, voz, y mucho m?s ?Gratis! Desc?rgalo ya desde http://messenger.yahoo.es From francesco@REDACTED Mon Nov 4 12:18:06 2002 From: francesco@REDACTED (Francesco Cesarini) Date: Mon, 04 Nov 2002 11:18:06 +0000 Subject: code update doubt References: <20021104102814.83585.qmail@web14704.mail.yahoo.com> Message-ID: <3DC6576E.1020307@erlang-consulting.com> I assume you are not using generic servers and OTP. Don't see the process as being suspended. When you load your new code, you will have two versions of the code in your Erlang run time machine. Your process will still be running the old version with the old state. When you do your global call, you will start running the new version of the code with the old state. If your new code requires an update in the state, you would have to handle it in your new code. If you are using OTP, the state update takes place directly after the code change through the help of call back functions. (I will not go into this further so as to avoid confusing you as I assume you are working with pure Erlang). Regards, Francesco -- http://www.erlang-consulting.com From Sean.Hinde@REDACTED Mon Nov 4 13:23:59 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Mon, 4 Nov 2002 12:23:59 -0000 Subject: Fw: Developing SMS-based Services in erlang Message-ID: <04D356A3B172D611981B0008C791C3126BF4CB@imp02mbx.t-mobile.co.uk> > It depends on what you want to do. The welcome service referred to was > presented at last year's Erlang conference. That particular system > works by monitoring all (many? some?) internal #7 links to figure out > what the user is up to: > > http://www.erlang.se/euc/01/Hinde2001/sld004.htm > > I don't know how they do it, but I can guess: they've probably > written a PDU decoder in Erlang. It's probably specific to extracting > the location-update and insert-subscriber-data packets, so it's > relatively simple. Indeed. We monitor all of our international signalling links. The PDU decoder (unrolled version) is attached in case anyone is interested. We also made a node whose job is to correlate ISD and LU messages based on TCAP Transaction ID, which then sends these joined up messages to another node which does the Welcome SMS logic/database and sends out messages to one of our SMSCs. The main problem we had was that we were persuaded to make a load balancing and failover mechanism between multiple SMSCs, which ended up with a bug in it's restart logic. We only had two weeks to make the whole system (between 2 of us) so I guess that wasn't too bad. We have no intention of implementing any active c7 nodes ourselves in Erlang. Our approach normally is to find a company which gives us a simple TCP/IP based API to e.g. INAP messages and not take on any of the trauma of trying to write any part of a c7 stack ourselves. Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. -------------- next part -------------- A non-text attachment was scrubbed... Name: gn_agent_decode.erl Type: application/octet-stream Size: 11840 bytes Desc: not available URL: From eleberg@REDACTED Mon Nov 4 15:54:08 2002 From: eleberg@REDACTED (Bengt Kleberg) Date: Mon, 4 Nov 2002 15:54:08 +0100 (MET) Subject: is there an erlc command included with windows erlang? Message-ID: <200211041454.gA4Es8r11189@cbe.ericsson.se> greetings, since i do not have windows myself i would like to ask if the windows distribution of erlang contains erlc? ie, as opposed to compiling with the deprecated: erl -compile bengt From olgeni@REDACTED Mon Nov 4 19:00:12 2002 From: olgeni@REDACTED (Jimmy Olgeni) Date: Mon, 4 Nov 2002 19:00:12 +0100 (CET) Subject: HiPE and threading in freebsd port. Message-ID: <20021104185924.R57296-100000@dev1.localdomain.net> Hi, Just a mini-poll to hear what people think... should HiPE and threading be enabled by default in the FreeBSD R9B port? -- jimmy From sam@REDACTED Mon Nov 4 19:07:27 2002 From: sam@REDACTED (Samuel Tardieu) Date: Mon, 4 Nov 2002 19:07:27 +0100 Subject: HiPE and threading in freebsd port. In-Reply-To: <20021104185924.R57296-100000@dev1.localdomain.net> References: <20021104185924.R57296-100000@dev1.localdomain.net> Message-ID: <2002-11-04-19-07-27+trackit+sam@inf.enst.fr> On 4/11, Jimmy Olgeni wrote: | Just a mini-poll to hear what people think... should HiPE and | threading be enabled by default in the FreeBSD R9B port? What are the drawbacks? From Sean.Hinde@REDACTED Mon Nov 4 19:39:12 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Mon, 4 Nov 2002 18:39:12 -0000 Subject: is there an erlc command included with windows erlang? Message-ID: <04D356A3B172D611981B0008C791C3126BF4D6@imp02mbx.t-mobile.co.uk> > since i do not have windows myself i would like to ask if the windows > distribution of erlang contains erlc? ie, as opposed to > compiling with the > deprecated: > erl -compile There seems to be yes. Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From cpressey@REDACTED Mon Nov 4 20:26:10 2002 From: cpressey@REDACTED (Chris Pressey) Date: Mon, 4 Nov 2002 13:26:10 -0600 Subject: HiPE and threading in freebsd port. In-Reply-To: <20021104185924.R57296-100000@dev1.localdomain.net> References: <20021104185924.R57296-100000@dev1.localdomain.net> Message-ID: <20021104132610.557281f2.cpressey@catseye.mb.ca> On Mon, 4 Nov 2002 19:00:12 +0100 (CET) Jimmy Olgeni wrote: > > Hi, > > Just a mini-poll to hear what people think... should HiPE and > threading be enabled by default in the FreeBSD R9B port? > > -- > jimmy For the record, HiPE doesn't build for me on FreeBSD 4.5. when I do a './configure --enable-hipe', upon 'make' I get cd erts/emulator && ERL_TOP=/usr/tmp/otp_src_R9B-0 gmake generate depend gmake -f i386-unknown-freebsd4.5/Makefile generate gmake[1]: Entering directory `/usr/tmp/otp_src_R9B-0/erts/emulator' /usr/bin/perl5 utils/beam_makeops -outdir i386-unknown-freebsd4.5 -emulator /usr/tmp/otp_src_R9B-0/lib/compiler/src/genop.tab beam/ops.tab hipe/hipe_ops.tab /usr/bin/perl5 utils/make_tables -src i386-unknown-freebsd4.5 -include i386-unknown-freebsd4.5 beam/atom.names beam/bif.tab hipe/hipe_bif0.tab hipe/hipe_bif1.tab hipe/hipe_bif2.tab /usr/bin/perl5 utils/make_version -o i386-unknown-freebsd4.5/erl_version.h 5.2 i386-unknown-freebsd4.5 /usr/bin/perl5 utils/make_driver_tab -o i386-unknown-freebsd4.5/driver_tab.c /usr/tmp/otp_src_R9B-0/erts/obj.beam/i386-unknown-freebsd4.5/efile_drv.o /usr/tmp/otp_src_R9B-0/erts/obj.beam/i386-unknown-freebsd4.5/ddll_drv.o /usr/tmp/otp_src_R9B-0/erts/obj.beam/i386-unknown-freebsd4.5/inet_drv.o /usr/tmp/otp_src_R9B-0/erts/obj.beam/i386-unknown-freebsd4.5/ram_file_drv ..o /usr/tmp/otp_src_R9B-0/erts/obj.beam/i386-unknown-freebsd4.5/ttsl_drv.o /usr/bin/perl5 utils/make_preload -old /usr/tmp/otp_src_R9B-0/lib/kernel/ebin/otp_ring0.beam /usr/tmp/otp_src_R9B-0/lib/kernel/ebin/init.beam /usr/tmp/otp_src_R9B-0/lib/kernel/ebin/prim_inet.beam /usr/tmp/otp_src_R9B-0/lib/kernel/ebin/prim_file.beam /usr/tmp/otp_src_R9B-0/lib/kernel/ebin/erl_prim_loader.beam /usr/tmp/otp_src_R9B-0/lib/kernel/ebin/erlang.beam > i386-unknown-freebsd4.5/preload.c m4 -DTARGET=i386-unknown-freebsd4.5 hipe/hipe_x86_asm.m4 > i386-unknown-freebsd4.5/hipe_x86_asm.h gcc -g -O3 -I/usr/tmp/otp_src_R9B-0/erts/i386-unknown-freebsd4.5 -DHAVE_CONFIG_H -Wall -DHIPE_ARCHITECTURE=x86 -Ibeam -Isys/unix -Ii386-unknown-freebsd4.5 -Izlib -Ihipe -c hipe/hipe_mkliterals.c -o /usr/tmp/otp_src_R9B-0/erts/obj.beam/i386-unknown-freebsd4.5/hipe_mkliter als.o In file included from hipe/hipe_mkliterals.c:19: i386-unknown-freebsd4.5/hipe_x86_asm.h:8: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:9: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:16: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:20: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:24: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:28: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:34: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:58: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:59: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:70: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:72: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:73: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:78: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:80: unterminated character constant i386-unknown-freebsd4.5/hipe_x86_asm.h:81: unterminated character constant gmake[1]: *** [/usr/tmp/otp_src_R9B-0/erts/obj.beam/i386-unknown-freebsd4.5/hipe_mklite rals.o] Error 1 gmake[1]: Leaving directory `/usr/tmp/otp_src_R9B-0/erts/emulator' gmake: *** [generate] Error 2 *** Error code 2 Stop in /usr/tmp/otp_src_R9B-0. My 'gcc -v' says Using builtin specs. gcc version 2.95.3 20010315 (release) [FreeBSD] Do I need a different version to compile HiPE? -Chris From mikpe@REDACTED Mon Nov 4 21:02:54 2002 From: mikpe@REDACTED (Mikael Pettersson) Date: Mon, 4 Nov 2002 21:02:54 +0100 Subject: HiPE and threading in freebsd port. In-Reply-To: <20021104132610.557281f2.cpressey@catseye.mb.ca> References: <20021104185924.R57296-100000@dev1.localdomain.net> <20021104132610.557281f2.cpressey@catseye.mb.ca> Message-ID: <15814.53870.331771.689663@kim.it.uu.se> Chris Pressey writes: > For the record, HiPE doesn't build for me on FreeBSD 4.5. when I do a > './configure --enable-hipe', upon 'make' I get ... > In file included from hipe/hipe_mkliterals.c:19: > i386-unknown-freebsd4.5/hipe_x86_asm.h:8: unterminated character constant > i386-unknown-freebsd4.5/hipe_x86_asm.h:9: unterminated character constant > i386-unknown-freebsd4.5/hipe_x86_asm.h:16: unterminated character constant > i386-unknown-freebsd4.5/hipe_x86_asm.h:20: unterminated character constant etc > gcc version 2.95.3 20010315 (release) [FreeBSD] > > Do I need a different version to compile HiPE? Unless [FreeBSD] means that this gcc is hacked in some way and is not identical to the real thing, then no you don't need a different version of gcc; in fact, 2.95.3 is IMHO superior to 3.2 in some ways. I suspect your 'm4' is broken. Please send me (not the the list) your generated hipe_x86_asm.h file. FWIW, I've tested this with GNU m4 (all versions from RedHat Linux 6.2 to RedHat Linux 8.0) and the stock m4 in Solaris 8 x86. /Mikael From taavi@REDACTED Mon Nov 4 22:48:38 2002 From: taavi@REDACTED (Taavi Talvik) Date: Mon, 4 Nov 2002 23:48:38 +0200 (EET) Subject: HiPE and threading in freebsd port. In-Reply-To: <20021104132610.557281f2.cpressey@catseye.mb.ca> Message-ID: <20021104234532.E11088-100000@valu.uninet.ee> On Mon, 4 Nov 2002, Chris Pressey wrote: > For the record, HiPE doesn't build for me on FreeBSD 4.5. when I do a > './configure --enable-hipe', upon 'make' I get > ... deleted ~month old FreeBSD current and R9B work. gcc is gcc version 3.2.1 [FreeBSD] 20020901 (prerelease) There are probably issues with 'erlc -native', but from emulator c(module,native) works. best regards, taavi From olgeni@REDACTED Mon Nov 4 23:47:12 2002 From: olgeni@REDACTED (Jimmy Olgeni) Date: Mon, 4 Nov 2002 23:47:12 +0100 (CET) Subject: HiPE and threading in freebsd port. In-Reply-To: <2002-11-04-19-07-27+trackit+sam@inf.enst.fr> Message-ID: <20021104210455.D4753-100000@olgeni.olgeni> Hi! On Mon, 4 Nov 2002, Samuel Tardieu wrote: > | Just a mini-poll to hear what people think... should HiPE and > | threading be enabled by default in the FreeBSD R9B port? > What are the drawbacks? ... that's why I asked :o) It looks fine to me but I didn't run any large application with it, so there may be hidden surprises. -- jimmy From olgeni@REDACTED Mon Nov 4 23:50:27 2002 From: olgeni@REDACTED (Jimmy Olgeni) Date: Mon, 4 Nov 2002 23:50:27 +0100 (CET) Subject: HiPE and threading in freebsd port. In-Reply-To: <20021104132610.557281f2.cpressey@catseye.mb.ca> Message-ID: <20021104234739.U71680-100000@olgeni.olgeni> Hi, On Mon, 4 Nov 2002, Chris Pressey wrote: > Do I need a different version to compile HiPE? For the record, I have "gcc version 2.95.4 20020320 [FreeBSD]" under 4.7-stable and it builds just right. -- jimmy From louis_stamsma@REDACTED Tue Nov 5 10:50:26 2002 From: louis_stamsma@REDACTED (Louis Stamsma) Date: Tue, 05 Nov 2002 10:50:26 +0100 Subject: Where to send a problem report? Message-ID: <20021105095013.DDCBA3E855@smtp4.wanadoo.nl> Hello, I would like to report a problem with Open Source Erlang debugger (including stacktrace, condition, ...). What would be the proper address to send it to? Regards, Louis From eleberg@REDACTED Tue Nov 5 12:47:19 2002 From: eleberg@REDACTED (Bengt Kleberg) Date: Tue, 5 Nov 2002 12:47:19 +0100 (MET) Subject: difference between unix and windows erlang? Message-ID: <200211051147.gA5BlJr02566@cbe.ericsson.se> the included super simple program can be run on my sparcstation like this: erl -noshell -s reversefile main < afile could somebody please try it on a windows erlang system? and if it hangs, is there an explanation? bengt -------------- next part -------------- %%% -*- mode: erlang -*- %%% $Id: reversefile.erlang,v 1.1 2001/05/15 08:05:58 doug Exp $ %%% http://www.bagley.org/~doug/shootout/ -module(reversefile). -export([main/0, main/1]). main() -> main(['1']). main(Args) -> io:put_chars( read_reverse( io:get_line( '' ), [] ) ), halt(0). read_reverse( eof, Lines ) -> Lines; read_reverse( Line, Lines ) -> read_reverse( io:get_line( '' ), [Line|Lines] ). From vlad_dumitrescu@REDACTED Tue Nov 5 13:46:06 2002 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Tue, 5 Nov 2002 13:46:06 +0100 Subject: difference between unix and windows erlang? References: <200211051147.gA5BlJr02566@cbe.ericsson.se> Message-ID: Hi, It looks like io:get_line never returns eof, instead just sits and waits after the last line was read. regards, Vlad ----- Original Message ----- From: "Bengt Kleberg" To: Sent: Tuesday, November 05, 2002 12:47 PM Subject: difference between unix and windows erlang? > the included super simple program can be run on my sparcstation like this: > > erl -noshell -s reversefile main < afile > > could somebody please try it on a windows erlang system? > and if it hangs, is there an explanation? > > > bengt > ---------------------------------------------------------------------------- ---- %%% -*- mode: erlang -*- %%% $Id: reversefile.erlang,v 1.1 2001/05/15 08:05:58 doug Exp $ %%% http://www.bagley.org/~doug/shootout/ -module(reversefile). -export([main/0, main/1]). main() -> main(['1']). main(Args) -> io:put_chars( read_reverse( io:get_line( '' ), [] ) ), halt(0). read_reverse( eof, Lines ) -> Lines; read_reverse( Line, Lines ) -> read_reverse( io:get_line( '' ), [Line|Lines] ). From eleberg@REDACTED Tue Nov 5 14:14:15 2002 From: eleberg@REDACTED (Bengt Kleberg) Date: Tue, 5 Nov 2002 14:14:15 +0100 (MET) Subject: difference between unix and windows erlang? Message-ID: <200211051314.gA5DEFr09144@cbe.ericsson.se> > X-Originating-IP: [213.66.184.2] > From: "Vlad Dumitrescu" ...deleted > It looks like io:get_line never returns eof, instead just sits and waits > after the last line was read. so the complaint was correct. is there an explanation? is there somewhere to send a bug report? (provided it is an erlang bug. AFAIK it could be windows, but such a behaviour would surely have been noticed...) bengt From Jozsef.Berces@REDACTED Tue Nov 5 14:18:43 2002 From: Jozsef.Berces@REDACTED (Jozsef Berces (QCZ)) Date: Tue, 5 Nov 2002 14:18:43 +0100 Subject: mod_esi:deliver Message-ID: <9CC6CC2973F2D211B3580008C70DB2D2057088E7@eatvint903.dsa.ericsson.se> Hi, When I use this new mod_esi:deliver callback, it seems that the server does not know when to end the connection towards the browser (or vice versa, I am not a http expert). So the browser is just waiting (the globe is whirling in IE) then either I stop the transfer or some timeout ends it. Is there any way to tell the erlang httpd that all the data has been supplied by the callback? Thanks in advance, Jozsef From erlang@REDACTED Tue Nov 5 15:50:52 2002 From: erlang@REDACTED (Peter-Henry Mander) Date: Tue, 05 Nov 2002 14:50:52 +0000 Subject: [virus alert] Braid worm Message-ID: <3DC7DACC.3000602@manderp.freeserve.co.uk> Hi all, Sorry to spam the list, but one of us is suffering from the Braid.A a.k.a Bridex worm. Mr. Alex Ogloblin (if he exists, the sender address is spoofed) may wish to do a virus scan, or maybe ditch Outlook for a better/safer email client. Details available on The Register: http://theregister.co.uk/content/56/27937.html Pete. From martin-g@REDACTED Tue Nov 5 16:00:57 2002 From: martin-g@REDACTED (Martin Gustafsson) Date: Tue, 5 Nov 2002 16:00:57 +0100 Subject: mod_esi:deliver In-Reply-To: <9CC6CC2973F2D211B3580008C70DB2D2057088E7@eatvint903.dsa.ericsson.se> Message-ID: <000201c284dc$25b844e0$184ca3c3@hedvig> Hi! It was a little time since I used mod_esi, and I do not have the very latets version of it but my best guess is that a new process is spawned when the function in your module that generates the html-code is called. The process that will get the data from deliver/2 will continue to wait for data until the spawned process dies. Then he connection to the client will then be closed if you do not use a persistent connection. So the solution to your problem is to let the process die when it is finished generating the html-page. Best regards Martin Gustafsson -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Jozsef Berces (QCZ) Sent: den 5 november 2002 14:19 To: Erlang-Questions (E-mail) Subject: mod_esi:deliver Hi, When I use this new mod_esi:deliver callback, it seems that the server does not know when to end the connection towards the browser (or vice versa, I am not a http expert). So the browser is just waiting (the globe is whirling in IE) then either I stop the transfer or some timeout ends it. Is there any way to tell the erlang httpd that all the data has been supplied by the callback? Thanks in advance, Jozsef From Jozsef.Berces@REDACTED Tue Nov 5 15:56:41 2002 From: Jozsef.Berces@REDACTED (Jozsef Berces (QCZ)) Date: Tue, 5 Nov 2002 15:56:41 +0100 Subject: mod_esi:deliver Message-ID: <9CC6CC2973F2D211B3580008C70DB2D2057088EB@eatvint903.dsa.ericsson.se> It seems that mod_esi:deliver(SessionID, "") marks the end. Is it documented or I was simply blind? BR, Jozsef -----Original Message----- From: Jozsef Berces (QCZ) [mailto:Jozsef.Berces@REDACTED] Sent: Tuesday, November 05, 2002 14:19 To: Erlang-Questions (E-mail) Subject: mod_esi:deliver Hi, When I use this new mod_esi:deliver callback, it seems that the server does not know when to end the connection towards the browser (or vice versa, I am not a http expert). So the browser is just waiting (the globe is whirling in IE) then either I stop the transfer or some timeout ends it. Is there any way to tell the erlang httpd that all the data has been supplied by the callback? Thanks in advance, Jozsef From enricjaen@REDACTED Tue Nov 5 20:49:54 2002 From: enricjaen@REDACTED (=?iso-8859-1?q?Enric=20Jaen?=) Date: Tue, 5 Nov 2002 20:49:54 +0100 (CET) Subject: erlang code update, possible in C/C++? Message-ID: <20021105194954.41762.qmail@web14704.mail.yahoo.com> I am very interested in the Erlang code update capability. AFAIK from documents, Erlang uses dynamic linking to point processes to the new version of the module when they do a global call. The old and new versions can run concurrently. I am wondering if this same mechanism can be used with C/C++ programs, using dynamic libraries. If not, why? and therefore, what is the added value than Erlang provides and that C/C++ don't have to update code? I would appreciate any clue in this issue. Cheers, -Enric Jaen _______________________________________________________________ Yahoo! Messenger Nueva versi?n: Webcam, voz, y mucho m?s ?Gratis! Desc?rgalo ya desde http://messenger.yahoo.es From mpquique@REDACTED Tue Nov 5 23:06:58 2002 From: mpquique@REDACTED (Enrique Marcote =?iso-8859-1?Q?Pe=F1a?=) Date: Tue, 05 Nov 2002 23:06:58 +0100 Subject: Developing SMS-based Services in erlang References: <04D356A3B172D611981B0008C791C3126BF4CB@imp02mbx.t-mobile.co.uk> Message-ID: <3DC84102.1C9B8B4@wanadoo.es> Thank you very much for your answers, I'm gathering lots of information from your emails, but on the other hand I should probably say that this is kind of getting out of hand for me. When I first sent the message I've expected to hear lot about GSM 03.39, SMPP 3.0, 3.3, 3.4, SMPPP ...and instead of that, SS7 and all that stuff came into play. My first idea was to develop some kind of framework (pretty much like the SMS-JDK http://www.ncl.ie/smsjdk/smsjdk.html) but open and erlang-based (I thought that the result could be really neat, java is OK but has nothing to do against erlang :-) Then, from this framework on, I shall try to develop the service we have in mind (in erlang also). Guess I must be missing many aspects of the hole picture. I must confess that for the moment I don't have a clear mind about all of this. I don't even know the tools and equipment needed (besides OPT of course), in fact this is what I'm trying to guess at the very first stage (We wouldn't like to be wasting our time working on things that are already done). What about SMPP 3.0, CAP II (Computer Access Protocol Number 2) and GIP? Are they used for the same thing? --- dialog between SMSC (Short Message Service Centre) and ESME (External Short Message Entities) ---. Besides this dialog with the SMSC, some operations like checking the balance of prepaid customers, charging the service to the customer's telephone bill or possible service restrictions must be accomplished in order to implement a full operating version of almost any service, is all of this handled through the SS7 stack? Do you think that it'll be possible to emulate or implement these operations on a lab? I've seen something about OMAP (Operators, Maintenance and Administration Part of SS7) is there where I need to get into SS7? As you can see, by the moment I don't have much more than a great excitement about this project and I guess that time enough scheduled also (at least 20 moths, full-time). Besides of getting my job done, even if it implies a greater effort for myself, I will appreciate any guiding/suggestion to face my work to a wider/generic result in order to develop some "pieces" of software that could be used by others on further and/or greater projects (such us Valentin?s proposal). Please be patient with me, I'm just trying to guess how these pieces fit all together. Thanks again. Regards, Quique From hakan.stenholm@REDACTED Wed Nov 6 00:51:23 2002 From: hakan.stenholm@REDACTED (=?ISO-8859-1?Q?H=E5kan_Stenholm?=) Date: Wed, 6 Nov 2002 00:51:23 +0100 Subject: erlang code update, possible in C/C++? In-Reply-To: <20021105194954.41762.qmail@web14704.mail.yahoo.com> Message-ID: <7D659136-F119-11D6-BA60-000393B8AB26@mbox304.swipnet.se> On tisdag, nov 5, 2002, at 20:49 Europe/Stockholm, Enric Jaen wrote: > I am very interested in the Erlang code update > capability. AFAIK from documents, Erlang uses dynamic > linking to point processes to the new version of the > module when they do a global call. The old and new > versions can run concurrently. > > I am wondering if this same mechanism can be used with > C/C++ programs, using dynamic libraries. If not, why? Probably (loading of dynamic libs. is OS dependent) but you'll lose all the nice OTP support to handle code change properly and consistently - i.e. when a update is applied on a existing consumer system. OTP is mostly useful to supply callbacks to different applications and databases in a well defined order, so simplifying the code change code needed to be written. > and therefore, what is the added value than Erlang > provides and that C/C++ don't have to update code? The major difference is that each erlang module can be loaded (and unloaded), not just dynamic libs, this allows you to patch a test environment (real or simulated) while you are debugging a module without restarting the environment (which would be needed if the module/file was compiled statically). In the case of the AXD301 I used to work on it took about 15 minutes to restart the simulated environment add to this that there might be need to recreate certain test parameters and debug traces. A "l(module_name)." in the erl shell was usually enough to apply such a patch. > > I would appreciate any clue in this issue. > > Cheers, > -Enric Jaen > > _______________________________________________________________ > Yahoo! Messenger > Nueva versi?n: Webcam, voz, y mucho m?s ?Gratis! > Desc?rgalo ya desde http://messenger.yahoo.es > From vances@REDACTED Wed Nov 6 03:14:50 2002 From: vances@REDACTED (Vance Shipley) Date: Tue, 5 Nov 2002 21:14:50 -0500 Subject: Developing SMS-based Services in erlang In-Reply-To: <3DC84102.1C9B8B4@wanadoo.es> References: <04D356A3B172D611981B0008C791C3126BF4CB@imp02mbx.t-mobile.co.uk> <3DC84102.1C9B8B4@wanadoo.es> Message-ID: <20021106021450.GE46767@frogman.motivity.ca> Quique, This forum isn't the place to ask about SMS, SS7, etc. You'll have to do the research to discover what interfaces and protocols are best for your application(s). Once you have done that you will then have to determine an architecture which puts it all together. In the case of SMPP you have a protocol which uses TCP/IP for the lower layers. OTP provides an interface to TCP/IP which could be used to implement SMPP in Erlang. If you don't want to implement SMPP yourself you will have to find an implementation to use and interface that to Erlang/OTP. Typically a protocol implementation will provide a C language application programming interface (API). There are a number of options for interfacing C language APIs to Erlang/OTP. To get started look at: http://www.erlang.org/doc/r9b/doc/tutorial/part_frame.html -Vance From seb@REDACTED Wed Nov 6 01:54:51 2002 From: seb@REDACTED (Sebastian Strollo) Date: 05 Nov 2002 16:54:51 -0800 Subject: erlang code update, possible in C/C++? In-Reply-To: <20021105194954.41762.qmail@web14704.mail.yahoo.com> References: <20021105194954.41762.qmail@web14704.mail.yahoo.com> Message-ID: Enric Jaen writes: > I am very interested in the Erlang code update > capability. AFAIK from documents, Erlang uses dynamic > linking to point processes to the new version of the > module when they do a global call. The old and new > versions can run concurrently. Well it isn't really the type of dynamic linking that your typical ld.so does - it is implemented as part of Erlangs run-time system. > I am wondering if this same mechanism can be used with > C/C++ programs, using dynamic libraries. If not, why? I guess one could build a similar framework - but right off the bat you can't. For one thing you would get name clashes if you tried to load an object file with the same symbols as an object file you already had loaded (you would have to give the symbols version numbers or something). And you couldn't just have the threads (assuming you have threads) themselves jump to the new code, it would have to be synchronized somehow (pretty much like the code change in the OTP framework I guess). Major headache to implement I would say... > and therefore, what is the added value than Erlang > provides and that C/C++ don't have to update code? The premise for this feature is that in a long running system you want to be able to update code without taking down the system. I guess the major difference is that in Erlang you have that mechanism built into the language "for free" - in C/C++ (on any OS I know at least) you don't. /Sebastian From bjarne@REDACTED Wed Nov 6 12:20:37 2002 From: bjarne@REDACTED (Bjarne =?iso-8859-1?Q?D=E4cker?=) Date: Wed, 06 Nov 2002 12:20:37 +0100 Subject: Erlang User Conference References: <3DBFE060.D20CCD00@wanadoo.es> <15807.64119.311841.678654@antilipe.corelatus.se> <20021031231058.A4394@bluetail.com> <002601c28247$f977c4a0$1ced1ec4@moneymaker> <15811.38397.971511.681252@antilipe.corelatus.se> Message-ID: <3DC8FB05.D9EBE1A1@erix.ericsson.se> Dear Erlang friends, In case any of you hasn't noted, this year's Erlang User Conference will take place in Stockholm on Tuesday November 19. Please see the program and invitation on http://www.erlang.se/euc/02/ Welcome ! Bjarne From Sean.Hinde@REDACTED Wed Nov 6 14:48:13 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Wed, 6 Nov 2002 13:48:13 -0000 Subject: Developing SMS-based Services in erlang Message-ID: <04D356A3B172D611981B0008C791C3126BF4E2@imp02mbx.t-mobile.co.uk> Hi, > What about SMPP 3.0, CAP II (Computer Access Protocol Number > 2) and GIP? Are > they used for the same thing? --- dialog between SMSC (Short > Message Service > Centre) and ESME (External Short Message Entities) ---. GIP is much the same as SMPP - it was invented by a guy who works here. It would be quite cool to have an open implementation of SMPP and also the CMG version called EMI. > Besides this dialog with the SMSC, some operations like > checking the balance of > > prepaid customers, charging the service to the customer's > telephone bill or > possible service restrictions must be accomplished in order > to implement a > full operating version of almost any service, is all of this > handled through > the SS7 stack? No, there's no need to go near c7 if all you want to do is send and receive SMSs via an exsisting SMSC. Making this sort of service is quite easy - we have several such SMS related services including Welcome SMS and a distribution lists service (http://www.t-mobile.co.uk/Dispatcher?menuid=phones_tfe_tm_gt) live in our Network using GIP. > e operations on a lab? I've seen something about OMAP (Operators, > Maintenance and Administration Part of SS7) is there where I > need to get into > SS7? No, Don't worry about that stuff. Hope this is enough to at least point you in the right direction Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From jamesh@REDACTED Wed Nov 6 16:26:20 2002 From: jamesh@REDACTED (James Hague) Date: Wed, 6 Nov 2002 09:26:20 -0600 Subject: is there an erlc command included with windows erlang? Message-ID: >There seems to be yes. With R8 there was what appeared to be a command line parsing problem if the path to erlc included spaces, which is true of the default installation path. erlc wouldn't work properly unless Erlang was installed to a path without spaces, like c:\erlang. I don't know if this has been fixed in R9. From joe@REDACTED Wed Nov 6 20:20:26 2002 From: joe@REDACTED (Joe Armstrong) Date: Wed, 6 Nov 2002 20:20:26 +0100 (CET) Subject: Erlang at LL2 live webcast Message-ID: Hello Erlangers, Just for fun you might want to tune in on the LL2 conference, at MIT. I am giving the first (invited) talk Concurrency Oriented Programming in Erlang. See the web page http://ll2.ai.mit.edu/ for updated information. This will be a live webcast .. if anybody manges to record this I'd be grateful ... /Joe ---------- Forwarded message ---------- Date: 06 Nov 2002 11:07:36 -0500 From: Gregory T. Sullivan To: ll2-registered@REDACTED Subject: LL2: Thanks for registering. Last minute info. This mail confirms that you have registered for LL2, this Saturday, Nov. 9, 2002, from 10am-6pm, at MIT. See the web page http://ll2.ai.mit.edu/ for updated information. Thanks to the generous sponsorship of Microsoft and Dr. Dobbs Journal, we will be able to webcast the LL2 proceedings. The morning session (10am to 12:35pm EST) can be viewed at: http://web.mit.edu/webcast/ailab/mit-ll2-s1-09nov02-80k.ram and the afternoon, from 1:45pm to 6pm will be at: http://web.mit.edu/webcast/ailab/mit-ll2-s2-09nov02-80k.ram Please publicize this fact to people who will not be able to attend LL2 in person. Thanks to our sponsors, food will be provided for morning and afternoon breaks and lunch. For those interested in socializing over dinner, we will probably arrange an informal, pay-your-own-way food-centered activity after the workshop. In addition to our fantastic list of speakers, the group of people registered for LL2 is an amazingly talented and diverse group. This should be an exciting and memorable day. Looking forward to seeing you at LL2! The LL2 Program Committee: Paul Graham, Arc Jeremy Hylton, Zope Corporation Shriram Krishnamurthi, Brown University Olin Shivers, Georgia Tech. Dan Sugalski, Perl Foundation Greg Sullivan (chair), MIT AI Lab Dan Weinreb, BEA Systems, Inc From hakan.stenholm@REDACTED Wed Nov 6 21:13:06 2002 From: hakan.stenholm@REDACTED (=?ISO-8859-1?Q?H=E5kan_Stenholm?=) Date: Wed, 6 Nov 2002 21:13:06 +0100 Subject: is there an erlc command included with windows erlang? In-Reply-To: Message-ID: <294980EA-F1C4-11D6-A66D-000393B8AB26@mbox304.swipnet.se> On onsdag, nov 6, 2002, at 16:26 Europe/Stockholm, James Hague wrote: >> There seems to be yes. > > With R8 there was what appeared to be a command line parsing problem > if the > path to erlc included spaces, I also noticed this in early versions of the MacOS X version as well (haven't checked in later ones), it's probably a shell script error. > which is true of the default installation > path. erlc wouldn't work properly unless Erlang was installed to a > path > without spaces, like c:\erlang. > > I don't know if this has been fixed in R9. > From louis_stamsma@REDACTED Thu Nov 7 10:43:05 2002 From: louis_stamsma@REDACTED (Louis Stamsma) Date: Thu, 07 Nov 2002 10:43:05 +0100 Subject: Debugger problem Message-ID: <20021107094316.0FB976F642@smtp6.wanadoo.nl> Hello, I'm relatively new to Erlang. In my experiments with the language/platform I stumbled upon a construction that causes a exception in the debugger, but delivers OK code. I have reduced the code that causes the problem with the debugger to a piece of nonsense code, just to demonstrate the problem. To me the code seems fine, but maybe I'm using an illegal construction and ... -module(problem). problem() -> if (0 == 0) and ((0 == 0) or (0 == 0)) -> {ok} end. I have attached a log of the error report. Regards, Louis -------------- next part -------------- A non-text attachment was scrubbed... Name: erlshell.log Type: application/octet-stream Size: 2546 bytes Desc: not available URL: From cyberlync@REDACTED Thu Nov 7 15:15:32 2002 From: cyberlync@REDACTED (Eric Merritt) Date: Thu, 7 Nov 2002 06:15:32 -0800 (PST) Subject: Erlang at LL2 live webcast In-Reply-To: Message-ID: <20021107141532.21701.qmail@web40804.mail.yahoo.com> Joe, As an FYI the apachevsyaws page at http://www.sics.se/?joe/apachevsyaws.html that you specify in your slides, doesn't seem to be available. I get a 404. Thanks, Eric --- Joe Armstrong wrote: > > > Hello Erlangers, > > Just for fun you might want to tune in on the LL2 > conference, at MIT. > > I am giving the first (invited) talk > > Concurrency Oriented Programming in Erlang. > > See the web page http://ll2.ai.mit.edu/ for > updated information. > > This will be a live webcast .. if anybody manges > to record this I'd be > grateful ... > > /Joe > > > ---------- Forwarded message ---------- > Date: 06 Nov 2002 11:07:36 -0500 > From: Gregory T. Sullivan > To: ll2-registered@REDACTED > Subject: LL2: Thanks for registering. Last minute > info. > > This mail confirms that you have registered for LL2, > this Saturday, > Nov. 9, 2002, from 10am-6pm, at MIT. > > See the web page http://ll2.ai.mit.edu/ for updated > information. > > Thanks to the generous sponsorship of Microsoft and > Dr. Dobbs Journal, > we will be able to webcast the LL2 proceedings. The > morning session > (10am to 12:35pm EST) can be viewed at: > > > http://web.mit.edu/webcast/ailab/mit-ll2-s1-09nov02-80k.ram > > and the afternoon, from 1:45pm to 6pm will be at: > > > http://web.mit.edu/webcast/ailab/mit-ll2-s2-09nov02-80k.ram > > Please publicize this fact to people who will not be > able to attend > LL2 in person. > > Thanks to our sponsors, food will be provided for > morning and > afternoon breaks and lunch. > > For those interested in socializing over dinner, we > will probably > arrange an informal, pay-your-own-way food-centered > activity after the > workshop. > > In addition to our fantastic list of speakers, the > group of people > registered for LL2 is an amazingly talented and > diverse group. This > should be an exciting and memorable day. > > Looking forward to seeing you at LL2! > > The LL2 Program Committee: > > Paul Graham, Arc > Jeremy Hylton, Zope Corporation > Shriram Krishnamurthi, Brown University > Olin Shivers, Georgia Tech. > Dan Sugalski, Perl Foundation > Greg Sullivan (chair), MIT AI Lab > Dan Weinreb, BEA Systems, Inc > __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From francesco@REDACTED Thu Nov 7 15:42:24 2002 From: francesco@REDACTED (Francesco Cesarini) Date: Thu, 07 Nov 2002 14:42:24 +0000 Subject: Erlang at LL2 live webcast References: <20021107141532.21701.qmail@web40804.mail.yahoo.com> Message-ID: <3DCA7BD0.1050100@erlang-consulting.com> The URL is http://www.sics.se/~joe/apachevsyaws.html Francesco -- http://www.erlang-consulting.com Eric Merritt wrote: >Joe, > > As an FYI the apachevsyaws page at >http://www.sics.se/~joe/apachevsyaws.html that you >specify in your slides, doesn't seem to be available. >I get a 404. > >Thanks, >Eric >--- Joe Armstrong wrote: > >> >>Hello Erlangers, >> >> Just for fun you might want to tune in on the LL2 >>conference, at MIT. >> >> I am giving the first (invited) talk >> >> Concurrency Oriented Programming in Erlang. >> >> See the web page http://ll2.ai.mit.edu/ for >>updated information. >> >> This will be a live webcast .. if anybody manges >>to record this I'd be >>grateful ... >> >> /Joe >> >> >>---------- Forwarded message ---------- >>Date: 06 Nov 2002 11:07:36 -0500 >>From: Gregory T. Sullivan >>To: ll2-registered@REDACTED >>Subject: LL2: Thanks for registering. Last minute >>info. >> >>This mail confirms that you have registered for LL2, >>this Saturday, >>Nov. 9, 2002, from 10am-6pm, at MIT. >> >>See the web page http://ll2.ai.mit.edu/ for updated >>information. >> >>Thanks to the generous sponsorship of Microsoft and >>Dr. Dobbs Journal, >>we will be able to webcast the LL2 proceedings. The >>morning session >>(10am to 12:35pm EST) can be viewed at: >> >> >> >http://web.mit.edu/webcast/ailab/mit-ll2-s1-09nov02-80k.ram > >>and the afternoon, from 1:45pm to 6pm will be at: >> >> >> >http://web.mit.edu/webcast/ailab/mit-ll2-s2-09nov02-80k.ram > >>Please publicize this fact to people who will not be >>able to attend >>LL2 in person. >> >>Thanks to our sponsors, food will be provided for >>morning and >>afternoon breaks and lunch. >> >>For those interested in socializing over dinner, we >>will probably >>arrange an informal, pay-your-own-way food-centered >>activity after the >>workshop. >> >>In addition to our fantastic list of speakers, the >>group of people >>registered for LL2 is an amazingly talented and >>diverse group. This >>should be an exciting and memorable day. >> >>Looking forward to seeing you at LL2! >> >>The LL2 Program Committee: >> >> Paul Graham, Arc >> Jeremy Hylton, Zope Corporation >> Shriram Krishnamurthi, Brown University >> Olin Shivers, Georgia Tech. >> Dan Sugalski, Perl Foundation >> Greg Sullivan (chair), MIT AI Lab >> Dan Weinreb, BEA Systems, Inc >> > > >__________________________________________________ >Do you Yahoo!? >U2 on LAUNCH - Exclusive greatest hits videos >http://launch.yahoo.com/u2 > > From cyberlync@REDACTED Thu Nov 7 16:24:08 2002 From: cyberlync@REDACTED (Eric Merritt) Date: Thu, 7 Nov 2002 07:24:08 -0800 (PST) Subject: Erlang at LL2 live webcast In-Reply-To: <3DCA7BD0.1050100@erlang-consulting.com> Message-ID: <20021107152408.473.qmail@web40807.mail.yahoo.com> Francesco, The only reason I bring it up is that joe might want to correct the slides before his presentation. Thanks for the link though, I did very much want to look at that page. Thanks, Eric --- Francesco Cesarini wrote: > The URL is > http://www.sics.se/~joe/apachevsyaws.html > > Francesco > -- > http://www.erlang-consulting.com > > Eric Merritt wrote: > > >Joe, > > > > As an FYI the apachevsyaws page at > >http://www.sics.se/~joe/apachevsyaws.html that you > >specify in your slides, doesn't seem to be > available. > >I get a 404. > > > >Thanks, > >Eric > >--- Joe Armstrong wrote: > > > >> > >>Hello Erlangers, > >> > >> Just for fun you might want to tune in on the > LL2 > >>conference, at MIT. > >> > >> I am giving the first (invited) talk > >> > >> Concurrency Oriented Programming in Erlang. > >> > >> See the web page http://ll2.ai.mit.edu/ for > >>updated information. > >> > >> This will be a live webcast .. if anybody > manges > >>to record this I'd be > >>grateful ... > >> > >> /Joe > >> > >> > >>---------- Forwarded message ---------- > >>Date: 06 Nov 2002 11:07:36 -0500 > >>From: Gregory T. Sullivan > >>To: ll2-registered@REDACTED > >>Subject: LL2: Thanks for registering. Last minute > >>info. > >> > >>This mail confirms that you have registered for > LL2, > >>this Saturday, > >>Nov. 9, 2002, from 10am-6pm, at MIT. > >> > >>See the web page http://ll2.ai.mit.edu/ for > updated > >>information. > >> > >>Thanks to the generous sponsorship of Microsoft > and > >>Dr. Dobbs Journal, > >>we will be able to webcast the LL2 proceedings. > The > >>morning session > >>(10am to 12:35pm EST) can be viewed at: > >> > >> > >> > >http://web.mit.edu/webcast/ailab/mit-ll2-s1-09nov02-80k.ram > > > >>and the afternoon, from 1:45pm to 6pm will be at: > >> > >> > >> > >http://web.mit.edu/webcast/ailab/mit-ll2-s2-09nov02-80k.ram > > > >>Please publicize this fact to people who will not > be > >>able to attend > >>LL2 in person. > >> > >>Thanks to our sponsors, food will be provided for > >>morning and > >>afternoon breaks and lunch. > >> > >>For those interested in socializing over dinner, > we > >>will probably > >>arrange an informal, pay-your-own-way > food-centered > >>activity after the > >>workshop. > >> > >>In addition to our fantastic list of speakers, the > >>group of people > >>registered for LL2 is an amazingly talented and > >>diverse group. This > >>should be an exciting and memorable day. > >> > >>Looking forward to seeing you at LL2! > >> > >>The LL2 Program Committee: > >> > >> Paul Graham, Arc > >> Jeremy Hylton, Zope Corporation > >> Shriram Krishnamurthi, Brown University > >> Olin Shivers, Georgia Tech. > >> Dan Sugalski, Perl Foundation > >> Greg Sullivan (chair), MIT AI Lab > >> Dan Weinreb, BEA Systems, Inc > >> > > > > > >__________________________________________________ > >Do you Yahoo!? > >U2 on LAUNCH - Exclusive greatest hits videos > >http://launch.yahoo.com/u2 > > > > > > __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From luke@REDACTED Thu Nov 7 16:42:39 2002 From: luke@REDACTED (Luke Gorrie) Date: 07 Nov 2002 16:42:39 +0100 Subject: Erlang at LL2 live webcast In-Reply-To: References: Message-ID: Joe Armstrong writes: > Hello Erlangers, > > Just for fun you might want to tune in on the LL2 conference, at MIT. > > I am giving the first (invited) talk > > Concurrency Oriented Programming in Erlang. > > See the web page http://ll2.ai.mit.edu/ for updated information. > > This will be a live webcast .. if anybody manges to record this I'd be > grateful ... They've now promised to keep the video online afterwards, so this shouldn't be a problem. Don't forget to wave to us. :-) -Luke From cleverjulian@REDACTED Thu Nov 7 19:22:35 2002 From: cleverjulian@REDACTED (Julian Fondren) Date: Thu, 07 Nov 2002 13:22:35 -0500 Subject: Two SAE-related bugs in R9B Message-ID: (Where should I send such reports in the future, if not to this list?) 1. elink creates scripts with "#!/usr/bin/env beam_evm", where /usr/bin/env looks for beam_evm my $PATH, for which the R9B installation had neither provision nor warning. Three fixes: * warn that PATH needs to be extended * install a symlink to beam_evm with the other symlinks * hardcode the path "#! /usr/local/lib/erlang/.../beam_evm"; this solution breaks across moves to newer versions of Erlang/OTP. 2. is_script/1 of $ERL_TOP/erts/boot/src/elink.erl tries to match {ok,F} and then {ok,eisdir}; probably it should match {error,eisdir} instead of the latter. (Incidentally, is_script/1 is only trivially different from a function of the same name that I've written. I wonder if this a commonly-invented wheel?) --- also, here is a 'hello world' for escript/(ecc/elink) % USAGE % % shell% escript hello.erl % % main/1 is applied to a list of any arguments given after % ``hello.erl''. % % shell% ecc hello.erl % shell% elink -t unix -d -o hello -S hello -m hello.beam % shell% ./hello % % start/1 is applied to the list of binaries [Unknown|Args], where the % first element of Args is the invocation (here, "./hello"); I've no % clue what Unknown is -- except that it doesn't appear to be the % binary data in hello, or beam_evm. % % Beware: the process of either usage will die silently on an error. -module(hello). -export([start/1, main/1]). main(Args) -> io:format("Arguments: ~p\n", [Args]), hello(). % no halt() start([_,Self|Args]) -> io:format("Called as: ~s\n" "Arguments: ~p\n", [binary_to_list(Self), lists:map(fun binary_to_list/1, Args)]), hello(), halt(). % alternate definition: % start([_,_|Args]) -> % main(lists:map(fun binary_to_list/1, Args)), halt(). hello() -> io:format("Hello, world!\n"). _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From etxuwig@REDACTED Fri Nov 8 12:45:18 2002 From: etxuwig@REDACTED (Ulf Wiger) Date: Fri, 8 Nov 2002 12:45:18 +0100 (MET) Subject: maintenance people are getting bored... Message-ID: I have to share this with you. In the internal Ericsson publication "Kontakten" ("Contact"), there was an article about British Telecom's Voice over ATM (VoATM) network (the largest of its kind in the world). Some positive mention of the AXD 301 switch, which as you know uses Erlang technology: http://www.ericsson.com/about/publications/kon_con/kontakten/kontark/pdf/k19_02/18.pdf (http://www.ericsson.com/about/publications/kon_con/kontakten/kontark/index.shtml, or "http://www.ericsson.com/, "About Ericsson", "Publications", "Kontakten p? n?tet" -- or "Contact Online") (First, in Swedish, as the English translation doesn't seem to be ready yet.) "Erfarenheterna hittills av driften av VoATM-n?tet ?r mycket goda. Den sammantagna n?tl?sningen och prestandan hos Ericssons 60 Gb flertj?nstv?xel AXD301 klarar l?tt kraven p? servicekvalitet och har hittills betytt att stillest?nd helt kunnat undvikas. Talkvalitet eller kvalitet hos erbjudna tj?nster har inte p?verkats negativt. Vi har inte haft n?gra problem med gr?nssnitt till andra operat?rer, mobila n?t eller internationella v?xlar. Faktum ?r att n?tprestandan har varit s? stabil att risken ?r uppenbar att v?r f?ltpersonal tappar kompetensen i underh?llsarbete." (My translation into English.) "The experiences sofar from running the VoATM network are very positive. The complete network solution and the performance of Ericsson's 60 Gb Multi-Service switch AXD 301 can easily cope with the requirements, and have meant that it's been possible to completely avoid outages. Speech quality or quality of offered services have not been adversely affected. We haven't had any problems with interfaces to other operators, mobile networks or international switches. The fact is that network performance has been so stable that our field personell risk losing their competence in maintenance work." (says Geoff Robinson, British Telecom) Mr. Robinson is probably not as worried as he may sound, but the fact is that the network has behaved unbelievably well. The ATM signaling, O&M and resiliency functions are all written in Erlang. I contribute this as an indicator that it is indeed possible to design robust, complex, high-performance products using Erlang. (: ... not that many on this list doubt that, I suppose, or indeed have proven it on their own. /Uffe -- Ulf Wiger, Senior Specialist, / / / Architecture & Design of Carrier-Class Software / / / Strategic Product & System Management / / / Ericsson Telecom AB, ATM Multiservice Networks From cyberlync@REDACTED Sat Nov 9 23:18:32 2002 From: cyberlync@REDACTED (Eric Merritt) Date: Sat, 9 Nov 2002 14:18:32 -0800 (PST) Subject: Absolute path when using erlc on windows errors out. In-Reply-To: Message-ID: <20021109221832.38193.qmail@web40803.mail.yahoo.com> Everyone, I have what I hope is a quick question for you all. It seems that when I use a full path to execute the erlc command on windows 2000 it errors out. It works just fine in other cases however. For example if I use "C:\Program Files\erl5.2\bin\erlc.exe" some_erlang_file.erl I will get an "erc: Error executing 'C:\Program':22" Once again it works fine if I leave the path off of the erlc command. Does anyone have a clue as to why this might be? Thanks, Eric --- Ulf Wiger wrote: > > I have to share this with you. > > In the internal Ericsson publication "Kontakten" > ("Contact"), there was an article about British > Telecom's > Voice over ATM (VoATM) network (the largest of its > kind in > the world). Some positive mention of the AXD 301 > switch, > which as you know uses Erlang technology: > > http://www.ericsson.com/about/publications/kon_con/kontakten/kontark/pdf/k19_02/18.pdf > (http://www.ericsson.com/about/publications/kon_con/kontakten/kontark/index.shtml, > or "http://www.ericsson.com/, "About Ericsson", > "Publications", "Kontakten p? n?tet" -- or "Contact > Online") > > (First, in Swedish, as the English translation > doesn't seem > to be ready yet.) > > "Erfarenheterna hittills av driften av VoATM-n?tet > ?r > mycket goda. Den sammantagna n?tl?sningen och > prestandan hos > Ericssons 60 Gb flertj?nstv?xel AXD301 klarar l?tt > kraven p? > servicekvalitet och har hittills betytt att > stillest?nd helt > kunnat undvikas. Talkvalitet eller kvalitet hos > erbjudna > tj?nster har inte p?verkats negativt. > Vi har inte haft n?gra problem med gr?nssnitt till > andra > operat?rer, mobila n?t eller internationella v?xlar. > Faktum ?r att n?tprestandan har varit s? stabil att > risken > ?r uppenbar att v?r f?ltpersonal tappar kompetensen > i > underh?llsarbete." > > (My translation into English.) > > "The experiences sofar from running the VoATM > network are > very positive. The complete network solution and the > performance of Ericsson's 60 Gb Multi-Service switch > AXD 301 > can easily cope with the requirements, and have > meant that > it's been possible to completely avoid outages. > Speech > quality or quality of offered services have not been > adversely affected. > We haven't had any problems with interfaces to > other > operators, mobile networks or international > switches. The > fact is that network performance has been so stable > that our > field personell risk losing their competence in > maintenance > work." (says Geoff Robinson, British Telecom) > > Mr. Robinson is probably not as worried as he may > sound, but > the fact is that the network has behaved > unbelievably well. > > The ATM signaling, O&M and resiliency functions are > all > written in Erlang. I contribute this as an indicator > that it > is indeed possible to design robust, complex, > high-performance products using Erlang. (: > > ... not that many on this list doubt that, I > suppose, or > indeed have proven it on their own. > > /Uffe > -- > Ulf Wiger, Senior Specialist, > / / / Architecture & Design of Carrier-Class > Software > / / / Strategic Product & System Management > / / / Ericsson Telecom AB, ATM Multiservice > Networks > > > __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From thomas.arts@REDACTED Sun Nov 10 14:01:48 2002 From: thomas.arts@REDACTED (Thomas Arts) Date: Sun, 10 Nov 2002 14:01:48 +0100 Subject: Absolute path when using erlc on windows errors out. References: <20021109221832.38193.qmail@web40803.mail.yahoo.com> Message-ID: <000b01c288b9$54fe1460$f62d1081@ituniv398> This looks like a simple MSDos error. The space between Program and Files is not parsed correctly. I have no Windows 2000 to experience with, but brobably you can put erlc in a different path and see if the problem remains. /Thomas --- FMICS 03, June 5-7 in Trondheim. Call for papers: http://www.inrialpes.fr/vasy/fmics/workshop-8/ Dr Thomas Arts Program Manager Software Engineering and Management IT-university of Gothenburg Box 8718, 402 75 Gothenburg, Sweden Tel +46 31 772 6031 Fax +46 31 772 4899 ----- Original Message ----- From: "Eric Merritt" To: Sent: Saturday, November 09, 2002 11:18 PM Subject: Absolute path when using erlc on windows errors out. > Everyone, > > I have what I hope is a quick question for you all. > It seems that when I use a full path to execute the > erlc command on windows 2000 it errors out. It works > just fine in other cases however. For example if I use > > "C:\Program Files\erl5.2\bin\erlc.exe" > some_erlang_file.erl > > I will get an "erc: Error executing 'C:\Program':22" > > Once again it works fine if I leave the path off of > the erlc command. > > Does anyone have a clue as to why this might be? > > Thanks, > Eric From thierry.mallard@REDACTED Sun Nov 10 17:04:16 2002 From: thierry.mallard@REDACTED (Thierry Mallard) Date: Sun, 10 Nov 2002 17:04:16 +0100 Subject: Erlang R9B-0 RPM for Mandrake 9 (beta2) In-Reply-To: <1029411751.3d5b93a76962b@imp.pro.proxad.net> References: <1029411751.3d5b93a76962b@imp.pro.proxad.net> Message-ID: <20021110160416.GA6062@hobbes.local.vawis.net> Greetings, Mickael Remond and I would like to announce a beta release of a RPM package for the R9B version of Erlang. This package should currently work on Mandrake 9 x86 plateform. It is hosted on the erlang-fr website : http://downloads.erlang-fr.org/ Feedback is welcome, as always ! :) Changelog : --------------------------------------------------------- * sam oct 26 2002 Thierry Mallard 9.0-0beta2mdk - merged Erlang icons from Mickael Remond - (rpmlint) added Packager tag - (rpmlint) stripping erlc * ven oct 25 2002 Thierry Mallard 9.0-0beta1mdk - porting to Mandrake 9, and release R9B of Erlang - added requirements : openssl (not tested) - fixed bad links and make relative links for ear, ecc, escript and elink (new to R9B) * ven ao? 02 2002 Thierry Mallard 8.2-0pre1mdk - first try of Erlang package for R8B-2 on Mandrake 8.2 * mer jun 19 2002 Thierry Mallard 8.1-0mdk - first try of Erlang package for Mandrake 8.2 --------------------------------------------------------- With best regards, -- Thierry Mallard http://vawis.net From mikael.karlsson@REDACTED Sun Nov 10 20:04:35 2002 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Sun, 10 Nov 2002 20:04:35 +0100 Subject: ssl inspection of client certs Message-ID: <200211102004.35044.mikael.karlsson@creado.com> I am thinking of using yaws in an intranet webservice that uses SSL and that verifies clients by requesting their certs. This seems to be supported with the ssl module. I can't however find any way to inspect the client certs after verification. I need this in order to identify users. Is this possible? /Mikael From cpressey@REDACTED Mon Nov 11 05:25:42 2002 From: cpressey@REDACTED (Chris Pressey) Date: Sun, 10 Nov 2002 22:25:42 -0600 Subject: appspace pollution :) Message-ID: <20021110222542.7dd666fb.cpressey@catseye.mb.ca> For the curious... my webserver and some of my other Erlang projects can be found at: http://kallisti.mine.nu/projects/ (This machine is not a proper internet server in terms of the resources it can dedicate to serving clients, so don't be surprised if/when the page is slow or fails to resolve.) The webserver application, OpenFlax, is still very much an experimental project, and will probably remain so (intentionally), but the core bits seem quite stable. It's been tested with a modest pool of clients. Whether OpenFlax is useful enough and unique enough to acquire its own niche remains to be seen. From my point of view, yaws' agenda is to be high-performance; inets' agenda is to be conformant and Apache-compatible; and pico's agenda is to be minimalistic. OpenFlax has it's own agenda, that is, to be secure and reliable - secure in the sense of not being a liability to the machine it's running on - while at the same time providing a base for higher functionality, and experimentation. Some examples of the spiffier things that OpenFlax can do include automatically creating gzipped tarballs from specified directories, and automatically applying previously-uploaded diffs to files before they are downloaded. Both of these functionalities are implemented entirely in Erlang so that no external programs are called. The practical result is that OpenFlax can serve it's own sources, and any bug fixes for it can theoretically be obtained immediately therefrom. This is a long-view aspect of the kind of security OpenFlax aims to provide. The OpenFlax "API", such as it is, is skeletal on the theory that abstraction is overrated. IIRC this is similar to pico's approach. Specifically, each OpenFlax module conforms to a behaviour; it provides a callback for generating any pages it is called on to serve. The callback is passed a regular Erlang TCP socket, with the process dictionary full of variables such as what was in the HTTP request headers. There are a few helper functions for sending an HTTP response header, a raw file, etc, to a socket, but there is no official interface - gen_tcp:send/2 can even be used. Of course, this is subject to change without warning. This project has been an experiment for several months now, and will no doubt continue to be an experiment. On the other hand, it works. Some of the observations I've made and conclusions I've drawn over the past few months are: - you can't uniquely identify a client by IP address if that IP address is the address of their proxy server. I've been trying to avoid cookies at all costs, but for a public user system, they might be a necessary evil. On the other hand, associating user logins to an IP address should be OK for an intranet server. - if there is an inherent flaw in all common web servers it is that they serve objects from the filesystem - the same place the important stuff (OS, programs, data, etc) is. The use of chroot should be investigated for having OpenFlax serve files. The practice of serving objects from a database (like the wikie) should be investigated. The webserver code would then never access the filesystem directly, but instead rely on a database package (such as mnesia). The drawback would be the extra effort required to import the objects you wish to serve, into the database. - security can always be improved by deleting modules. - {active, true} sockets should probably never be used on a public network. As nicely as they map to the Erlang programming paradigm, they present too great a risk of flooding the Erlang runtime with messages. The only times my webserver has actually 'hard' crashed (as opposed to processes 'soft' crashing) have been because of message overflow. - the problem of proliferation of webserver software in Erlang is probably not as important a problem as the proliferation of API's for these webservers. Also it's clear that a webserver is only a tiny fraction of what OpenFlax is trying to 'be' - my vision (hazy as it is) is something along the lines of a mini-sourceforge that operates like the FreeBSD ports tree except running peer-to-peer, that *happens* to be accessible via HTTP. It would be interesting to write a client and associated server module which negotiate a different connection using the Upgrade header. Flames, trolls (etc) welcome :) -Chris From per@REDACTED Mon Nov 11 09:47:58 2002 From: per@REDACTED (Per Bergqvist) Date: Mon, 11 Nov 2002 09:47:58 +0100 Subject: Absolute path when using erlc on windows errors out. In-Reply-To: <000b01c288b9$54fe1460$f62d1081@ituniv398> Message-ID: <200211110848.gAB8lxQ24716@raven.levonline.com> Hi, This is a well known problem under windows and is caused by incorrect qouting of parameters in Erlang (and yes, in the end caused by MS as everything else ...). A couple of years ago I posted a kit for native building of Erlang on windows using cygwin. Included was a corrected version of argument quoting. Unfortunately I didn't bring anything when leaving that job so if somebody have a copy of the posting you can probably move it up to R9 with ease. (And please send me a copy). /Per > This looks like a simple MSDos error. The space between Program and Files is > not parsed correctly. I have no Windows 2000 to experience with, but > brobably you can > put erlc in a different path and see if the problem remains. > > /Thomas > > > --- > FMICS 03, June 5-7 in Trondheim. > Call for papers: http://www.inrialpes.fr/vasy/fmics/workshop-8/ > > > Dr Thomas Arts > Program Manager > Software Engineering and Management > IT-university of Gothenburg > Box 8718, 402 75 Gothenburg, Sweden > > Tel +46 31 772 6031 > Fax +46 31 772 4899 > > > ----- Original Message ----- > From: "Eric Merritt" > To: > Sent: Saturday, November 09, 2002 11:18 PM > Subject: Absolute path when using erlc on windows errors out. > > > > Everyone, > > > > I have what I hope is a quick question for you all. > > It seems that when I use a full path to execute the > > erlc command on windows 2000 it errors out. It works > > just fine in other cases however. For example if I use > > > > "C:\Program Files\erl5.2\bin\erlc.exe" > > some_erlang_file.erl > > > > I will get an "erc: Error executing 'C:\Program':22" > > > > Once again it works fine if I leave the path off of > > the erlc command. > > > > Does anyone have a clue as to why this might be? > > > > Thanks, > > Eric > > ========================================================= Per Bergqvist Synapse Systems AB Phone: +46 709 686 685 Email: per@REDACTED From enano@REDACTED Mon Nov 11 11:25:38 2002 From: enano@REDACTED (Miguel Barreiro Paz) Date: Mon, 11 Nov 2002 11:25:38 +0100 (CET) Subject: appspace pollution :) In-Reply-To: <20021110222542.7dd666fb.cpressey@catseye.mb.ca> Message-ID: > - you can't uniquely identify a client by IP address if that IP address is > the address of their proxy server. I've been trying to avoid cookies at > all costs, but for a public user system, they might be a necessary evil. > On the other hand, associating user logins to an IP address should be OK > for an intranet server. Not even in an intranet. For whatever (ugly) reasons you are sometimes forced to use NAT inside the intranet, or don't have control over the whole network (and, well, the IBM intranet for example is bigger than Internet was for quite a few years :-)). If you absolutely can't use cookies, you can rewrite per-session URLs to include an explicit session ID. Combined with SSL it's not too bad. Combined with client-side SSL certificates it gets much better. > - if there is an inherent flaw in all common web servers it is that they > serve objects from the filesystem - the same place the important stuff > (OS, programs, data, etc) is. The use of chroot should be investigated > for having OpenFlax serve files. The practice of serving objects from a > database (like the wikie) should be investigated. The webserver code Oracle has been touting it for a while and it certainly has its pros. I still think that for most practical purposes the filesystem is the database of choice :-) but there's certainly beauty in diversity and choice. Regards, Miguel From Sean.Hinde@REDACTED Mon Nov 11 14:00:23 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Mon, 11 Nov 2002 13:00:23 -0000 Subject: appspace pollution :) Message-ID: <04D356A3B172D611981B0008C791C3126BF507@imp02mbx.t-mobile.co.uk> Hi, > - if there is an inherent flaw in all common web servers it > is that they > serve objects from the filesystem - the same place the important stuff > (OS, programs, data, etc) is. The use of chroot should be > investigated > for having OpenFlax serve files. The practice of serving > objects from a > database (like the wikie) should be investigated. The webserver code > would then never access the filesystem directly, but instead rely on a > database package (such as mnesia). The drawback would be the > extra effort > required to import the objects you wish to serve, into the database. This what we do with all our O&M related inets content - it is stored as binaries (or templates with the static parts as binaries) in mnesia. We don't find the updating overhead too great given the existence of to_erl - esp:store("page.html"). or esp:store_all("/Directory/../"). do all the work. > - security can always be improved by deleting modules. Up to a point (os could probably go), but dangerous ones will remain (file!). This is a big concern as Erlang creeps ever closer to living on the internet (Joe punching holes through his home firewall..) Is anyone aware of any detailed security analysis done on Erlang/OTP? For example there were vulnerabilities in zlib some time ago (fixed in R9B?). Also various people have proposed things to lock down erlang distribution: * Hacking net_kernel to implement a security policy (but it apears that quite a bit of stuff bypasses net_kernel anyway) * Using the included ssl for distribution (nice between known hosts but still allows full access to all services once in) * Various works at SERC - mainly about non trusted code execution though some nice stuff about secured gen_servers * Joe's recent :) statement that "We have done all the work but just haven't put it in yet" It would be fantastically powerful to have a locked down distribution mechanism which looked like normal erlang message passing but only allowed access to specified services, processes, modules, functions, ports, code loading etc. > - {active, true} sockets should probably never be used on a public > network. As nicely as they map to the Erlang programming > paradigm, they > present too great a risk of flooding the Erlang runtime with > messages. > The only times my webserver has actually 'hard' crashed (as opposed to > processes 'soft' crashing) have been because of message overflow. Check out {active, once}. Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From cyberlync@REDACTED Mon Nov 11 15:16:34 2002 From: cyberlync@REDACTED (Eric Merritt) Date: Mon, 11 Nov 2002 06:16:34 -0800 (PST) Subject: Absolute path when using erlc on windows errors out. In-Reply-To: <200211110848.gAB8lxQ24716@raven.levonline.com> Message-ID: <20021111141634.44640.qmail@web40805.mail.yahoo.com> Thanks Thomas, Per; Moving it out of Program Files and into another directory fixed the problem. The question I do have is, considering this is a known problem is it such a good idea for the default install to go into 'Program Files'? Just curious, Thanks, Eric --- Per Bergqvist wrote: > Hi, > > > > This is a well known problem under windows and is > caused by incorrect > qouting of parameters in Erlang (and yes, in the end > caused by MS as > everything else ...). > > > > A couple of years ago I posted a kit for native > building of Erlang on > windows using cygwin. > > Included was a corrected version of argument > quoting. > > > Unfortunately I didn't bring anything when leaving > that job so if > somebody have a copy of the posting you can probably > move it up > to R9 with ease. > > (And please send me a copy). > > > > /Per > > > > > This looks like a simple MSDos error. The space > between Program and > Files is > > > not parsed correctly. I have no Windows 2000 to > experience with, but > > brobably you can > > > put erlc in a different path and see if the > problem remains. > > > > > /Thomas > > > > > > > > > --- > > > FMICS 03, June 5-7 in Trondheim. > > > Call for papers: > http://www.inrialpes.fr/vasy/fmics/workshop-8/ > > > > > > > > Dr Thomas Arts > > > Program Manager > > > Software Engineering and Management > > > IT-university of Gothenburg > > > Box 8718, 402 75 Gothenburg, Sweden > > > > > > Tel +46 31 772 6031 > > > Fax +46 31 772 4899 > > > > > > > > > ----- Original Message ----- > > > From: "Eric Merritt" > > > To: > > > Sent: Saturday, November 09, 2002 11:18 PM > > > Subject: Absolute path when using erlc on windows > errors out. > > > > > > > > > Everyone, > > > > > > > > I have what I hope is a quick question for you > all. > > > It seems that when I use a full path to execute > the > > > erlc command on windows 2000 it errors out. It > works > > > just fine in other cases however. For example if > I use > > > > > > > "C:\Program Files\erl5.2\bin\erlc.exe" > > > > some_erlang_file.erl > > > > > > > > I will get an "erc: Error executing > 'C:\Program':22" > > > > > > > Once again it works fine if I leave the path off > of > > > the erlc command. > > > > > > > > Does anyone have a clue as to why this might be? > > > > > > > > Thanks, > > > > Eric > > > > > > > > ========================================================= > > Per Bergqvist > > Synapse Systems AB > > Phone: +46 709 686 685 > > Email: per@REDACTED > __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From cyberlync@REDACTED Mon Nov 11 15:16:34 2002 From: cyberlync@REDACTED (Eric Merritt) Date: Mon, 11 Nov 2002 06:16:34 -0800 (PST) Subject: Absolute path when using erlc on windows errors out. In-Reply-To: <200211110848.gAB8lxQ24716@raven.levonline.com> Message-ID: <20021111141634.44640.qmail@web40805.mail.yahoo.com> Thanks Thomas, Per; Moving it out of Program Files and into another directory fixed the problem. The question I do have is, considering this is a known problem is it such a good idea for the default install to go into 'Program Files'? Just curious, Thanks, Eric --- Per Bergqvist wrote: > Hi, > > > > This is a well known problem under windows and is > caused by incorrect > qouting of parameters in Erlang (and yes, in the end > caused by MS as > everything else ...). > > > > A couple of years ago I posted a kit for native > building of Erlang on > windows using cygwin. > > Included was a corrected version of argument > quoting. > > > Unfortunately I didn't bring anything when leaving > that job so if > somebody have a copy of the posting you can probably > move it up > to R9 with ease. > > (And please send me a copy). > > > > /Per > > > > > This looks like a simple MSDos error. The space > between Program and > Files is > > > not parsed correctly. I have no Windows 2000 to > experience with, but > > brobably you can > > > put erlc in a different path and see if the > problem remains. > > > > > /Thomas > > > > > > > > > --- > > > FMICS 03, June 5-7 in Trondheim. > > > Call for papers: > http://www.inrialpes.fr/vasy/fmics/workshop-8/ > > > > > > > > Dr Thomas Arts > > > Program Manager > > > Software Engineering and Management > > > IT-university of Gothenburg > > > Box 8718, 402 75 Gothenburg, Sweden > > > > > > Tel +46 31 772 6031 > > > Fax +46 31 772 4899 > > > > > > > > > ----- Original Message ----- > > > From: "Eric Merritt" > > > To: > > > Sent: Saturday, November 09, 2002 11:18 PM > > > Subject: Absolute path when using erlc on windows > errors out. > > > > > > > > > Everyone, > > > > > > > > I have what I hope is a quick question for you > all. > > > It seems that when I use a full path to execute > the > > > erlc command on windows 2000 it errors out. It > works > > > just fine in other cases however. For example if > I use > > > > > > > "C:\Program Files\erl5.2\bin\erlc.exe" > > > > some_erlang_file.erl > > > > > > > > I will get an "erc: Error executing > 'C:\Program':22" > > > > > > > Once again it works fine if I leave the path off > of > > > the erlc command. > > > > > > > > Does anyone have a clue as to why this might be? > > > > > > > > Thanks, > > > > Eric > > > > > > > > ========================================================= > > Per Bergqvist > > Synapse Systems AB > > Phone: +46 709 686 685 > > Email: per@REDACTED > __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From matthias@REDACTED Mon Nov 11 16:01:58 2002 From: matthias@REDACTED (Matthias Lang) Date: Mon, 11 Nov 2002 16:01:58 +0100 Subject: appspace pollution :) In-Reply-To: <04D356A3B172D611981B0008C791C3126BF507@imp02mbx.t-mobile.co.uk> References: <04D356A3B172D611981B0008C791C3126BF507@imp02mbx.t-mobile.co.uk> Message-ID: <15823.50790.57825.313760@antilipe.corelatus.se> Sean Hinde writes: > Is anyone aware of any detailed security analysis done on > Erlang/OTP? Dan Sahlin, Lawrie Brown and others worked on something called "Safe Erlang" (see the papers section on DMOZ: http://www.ericsson.com/cslab/publications.shtml). I last read one of their papers three years ago, so I'm a bit hazy about what exactly they were doing, but I think it was mostly focussed on being able to safely execute third-party code on an erlang node. Not quite what you were asking about, but it includes related issues. > For example there were vulnerabilities in zlib some time ago > (fixed in R9B?). R9B has a newer version of zlib, so I think it's fixed, but I'm not sure. Daniel Neri posted a patch for R8B-2: http://www.erlang.org/ml-archive/erlang-questions/200210/msg00049.html Matthias From bjorn@REDACTED Mon Nov 11 16:08:11 2002 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 11 Nov 2002 16:08:11 +0100 Subject: appspace pollution :) In-Reply-To: Matthias Lang's message of "Mon, 11 Nov 2002 16:01:58 +0100" References: <04D356A3B172D611981B0008C791C3126BF507@imp02mbx.t-mobile.co.uk> <15823.50790.57825.313760@antilipe.corelatus.se> Message-ID: Matthias Lang writes: > R9B has a newer version of zlib, so I think it's fixed, but I'm not > sure. Yes, R9B includes the patch to make zlib secure for corrupt input data. /Bjorn -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 +46 8 727 56 87 125 25 ?lvsj? From olgeni@REDACTED Mon Nov 11 16:47:09 2002 From: olgeni@REDACTED (Jimmy Olgeni) Date: Mon, 11 Nov 2002 16:47:09 +0100 (CET) Subject: [freebsd] new erlang related packages Message-ID: <20021111164436.T65714-100000@dev1.localdomain.net> Hi, Just a notice, ports for distel (http://www.bluetail.com/~luke/distel/) and py_interface (from the erlang contrib archive) are now available under FreeBSD as devel/distel and devel/py_otp_interface. Have fun =) -- jimmy From per@REDACTED Mon Nov 11 19:18:38 2002 From: per@REDACTED (Per Bergqvist) Date: Mon, 11 Nov 2002 19:18:38 +0100 Subject: Absolute path when using erlc on windows errors out. In-Reply-To: <20021111141634.44640.qmail@web40805.mail.yahoo.com> Message-ID: <200211111818.gABIIcZ31098@hyena.levonline.com> Hi, The "known" problem may not be "known" to OTP support since it has never been officially reported. At that time, at least, they worked around the problem by using 8.3 versions of the directory names in the registry entries. It did however not solve the problem with using erlc from a normal Makefile. Adding the binary directory (short version) to your path did though. I searched the list archieve but I could not find any submission from my former me ... If anyone who received a copy from me still have it please let me know. /Per P.S. If there is still somebody at CellPoint reading this list and you haven't reformatted my old harddrive D:\build is a good starting point .... D.S. > Thanks Thomas, Per; > > > Moving it out of Program Files and into another > directory fixed the problem. The question I do have > is, considering this is a known problem is it such a > good idea for the default install to go into 'Program > Files'? Just curious, > > Thanks, > Eric > --- Per Bergqvist wrote: > > Hi, > > > > > > > > This is a well known problem under windows and is > > caused by incorrect > > qouting of parameters in Erlang (and yes, in the end > > caused by MS as > > everything else ...). > > > > > > > > A couple of years ago I posted a kit for native > > building of Erlang on > > windows using cygwin. > > > > Included was a corrected version of argument > > quoting. > > > > > > Unfortunately I didn't bring anything when leaving > > that job so if > > somebody have a copy of the posting you can probably > > move it up > > to R9 with ease. > > > > (And please send me a copy). > > > > > > > > /Per > > > > > > > > > This looks like a simple MSDos error. The space > > between Program and > > Files is > > > > > not parsed correctly. I have no Windows 2000 to > > experience with, but > > > brobably you can > > > > > put erlc in a different path and see if the > > problem remains. > > > > > > > > /Thomas > > > > > > > > > > > > > > > --- > > > > > FMICS 03, June 5-7 in Trondheim. > > > > > Call for papers: > > http://www.inrialpes.fr/vasy/fmics/workshop-8/ > > > > > > > > > > > > > Dr Thomas Arts > > > > > Program Manager > > > > > Software Engineering and Management > > > > > IT-university of Gothenburg > > > > > Box 8718, 402 75 Gothenburg, Sweden > > > > > > > > > > Tel +46 31 772 6031 > > > > > Fax +46 31 772 4899 > > > > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Eric Merritt" > > > > > To: > > > > > Sent: Saturday, November 09, 2002 11:18 PM > > > > > Subject: Absolute path when using erlc on windows > > errors out. > > > > > > > > > > > > > > Everyone, > > > > > > > > > > > > I have what I hope is a quick question for you > > all. > > > > It seems that when I use a full path to execute > > the > > > > erlc command on windows 2000 it errors out. It > > works > > > > just fine in other cases however. For example if > > I use > > > > > > > > > > "C:\Program Files\erl5.2\bin\erlc.exe" > > > > > > some_erlang_file.erl > > > > > > > > > > > > I will get an "erc: Error executing > > 'C:\Program':22" > > > > > > > > > > Once again it works fine if I leave the path off > > of > > > > the erlc command. > > > > > > > > > > > > Does anyone have a clue as to why this might be? > > > > > > > > > > > > Thanks, > > > > > > Eric > > > > > > > > > > > > > > > ========================================================= > > > > Per Bergqvist > > > > Synapse Systems AB > > > > Phone: +46 709 686 685 > > > > Email: per@REDACTED > > > > > __________________________________________________ > Do you Yahoo!? > U2 on LAUNCH - Exclusive greatest hits videos > http://launch.yahoo.com/u2 > ========================================================= Per Bergqvist Synapse Systems AB Phone: +46 709 686 685 Email: per@REDACTED From luke@REDACTED Mon Nov 11 20:42:30 2002 From: luke@REDACTED (Luke Gorrie) Date: 11 Nov 2002 20:42:30 +0100 Subject: small optimization story Message-ID: Ahoy, I just had to optimize the "constant factors" of some straight-line Erlang code, for the first time in a _very_ long time. I'm basically just posting to plug the 'fprof' OTP application, which made it very easy! It's a very nice tool - no special compilation or anything, you just call it. I used the handy Distel front end :-) Anyway, since fprof slows execution down a lot, I first narrowed down where the time was going with a macro like this: -define(time(Tag, Expr), begin statistics(runtime), % reset statistics counter (fun(Value) -> {_, Delta} = statistics(runtime), io:format("time(~p): ~p ms~n", [Tag, Delta]), Value end) (Expr) end). and then e.g. ?time(doing_x, x(Foo)), which calls x(Foo) and returns its value, but prints out how long it took. (Admittedly I just simplified that in-line and haven't tested it - naughty.. also timer:tc seems to give much more precise results?) The bottleneck ended up being a parser for "ls -l"-esque FTP server output. So I wrote a small test case to parse a hardcoded listing, and ran fprof on that. The fprof results highlighted the bottlenecks _very_ obviously (one at a time in separate runs.) The first was a call to regexp:match, which I rewrote as a custom erlang function and got a big speedup. I guess this is pretty obvious and would have been found by hand. Much less obviously, I got a ~15% overall speed gain by rewriting a call to string:tokens(S, "\r\n") into: tokenize_lines("\r\n" ++ S, Acc) -> tokenize_lines_continue(S, Acc); tokenize_lines("\n" ++ S, Acc) -> tokenize_lines_continue(S, Acc); tokenize_lines([H|T], Acc) -> tokenize_lines(T, [H|Acc]); tokenize_lines([], []) -> []; tokenize_lines([], Acc) -> [reverse(Acc)]. tokenize_lines_continue(S, Acc) -> [reverse(Acc) | tokenize_lines(S, [])]. Which is itself ~60% faster than the string:tokens call (I'm not sure why.) Now, if I had found this at all amongst the 150 lines of string munging code, it would have probably taken most of the day, and then wouldn't have been worth it for 15%. But since it was easy to see and took about 20 minutes in total it was a wonderful speedup. Probably best of all, now I can see that the code is pretty tight and there's no point bothering with any more small tweaks. So, hurray for fprof! Though I have no idea how my 150 microseconds/line on an 800mhz machine stacks up against other languages like C :-) Cheers, Luke From jesperw@REDACTED Tue Nov 12 14:38:20 2002 From: jesperw@REDACTED (Jesper Wilhelmsson) Date: Tue, 12 Nov 2002 14:38:20 +0100 (MET) Subject: Benchmarks using Mnesia (or other concurrent programs) In-Reply-To: <20021111164436.T65714-100000@dev1.localdomain.net> Message-ID: Hi list! I'm looking for benchmarks to evaluate different memory models and message passing optimizations in the beam-emulator. Any (larger) program with message passing will do, but preferably it should have several processes communicating quite a lot. My thought was that a program using a mnesia server and some clients sending a number of requests, would generate some messages. So my question is: Does anyone have a mnesia database and some test client that sends a number of requests, and is this anyone (you) willing to let me use the program as a benchmark. Ideally it should come with some wrapper so that I only have to call mnesiatest:start(). and wait for it to return. If there is such a benchmark that acually correlates to something in real life, it would be great. But any test program that run for a couple of seconds will do. /Jesper Wilhelmsson From etxuwig@REDACTED Tue Nov 12 14:46:25 2002 From: etxuwig@REDACTED (Ulf Wiger) Date: Tue, 12 Nov 2002 14:46:25 +0100 (MET) Subject: Erlang is _the_ disruptive technology... Message-ID: I finally got to a computer (my little sister's...) that allowed me to watch the recorded webcast from the MIT workshop (http://ll2.ai.mit.edu). Good job, Joe, but what was the deal with the pagedown button?! It seemed impossible to bring up the next slide on the first try. (: Also very interesting was the speech by Todd Proebsting, senior researcher and manager of the Programming Language Systems group at Microsoft Research. He opened the afternoon session with an interesting talk about Disruptive Programming Language Technologies. Mr. Proebsting listed a number of areas where new programming languages may offer great advantages over the current mainstream. His last example was Concurrent Programming. There, he wanted to "propose Erlang as the answer," naming it _the_ disruptive programming language technology for concurrent and distributed computing. I wish him great success in convincing the rest of Microsoft. (: /Uffe -- Ulf Wiger, Senior Specialist, / / / Architecture & Design of Carrier-Class Software / / / Strategic Product & System Management / / / Ericsson Telecom AB, ATM Multiservice Networks From jamesh@REDACTED Tue Nov 12 17:13:00 2002 From: jamesh@REDACTED (James Hague) Date: Tue, 12 Nov 2002 10:13:00 -0600 Subject: small optimization story Message-ID: Really interesting, Luke! I wrote up some similar experiences here: http://www.dadgum.com/james/shootout.html From luke@REDACTED Tue Nov 12 17:38:51 2002 From: luke@REDACTED (Luke Gorrie) Date: 12 Nov 2002 17:38:51 +0100 Subject: small optimization story In-Reply-To: References: Message-ID: James Hague writes: > Really interesting, Luke! > > I wrote up some similar experiences here: > > http://www.dadgum.com/james/shootout.html Nice timing :-) Klacke and I just did a > 5x speedup of some performance critical HTML generation code. We used fprof and it took about 15 minutes - turned out to be trivial io_lib:format("~s/~s/") type of things that we just rewrote as conses. The search space for the bottleneck was rather large (Yaws + whole application) so profiling probably saved us a couple of days of work. The main optimization was in the {ehtml, ...} feature of Yaws, so everyone else using it can get a nice speedup too (in a minute after, a checkin..) We both love fprof now :-) (Look forward to reading your page when I have a minute!) Cheers, Luke From luke@REDACTED Tue Nov 12 17:50:30 2002 From: luke@REDACTED (Luke Gorrie) Date: 12 Nov 2002 17:50:30 +0100 Subject: Lightweight Languages mailing list Message-ID: Hi there, Joe's talk at MIT has sparked some interest in the gory details of the emulator on the "lightweight languages" mailing list. I've given the answers that I know, but maybe some erlang gurus would like to join that list and give some accurate information instead ;-) For mailing list details see http://ll1.mit.edu/ Cheers, Luke From fritchie@REDACTED Tue Nov 12 20:03:26 2002 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Tue, 12 Nov 2002 13:03:26 -0600 Subject: Erlang is _the_ disruptive technology... In-Reply-To: Message of "Tue, 12 Nov 2002 14:46:25 +0100." Message-ID: <200211121903.gACJ3QF11542@snookles.snookles.com> >>>>> "uw" == Ulf Wiger writes: uw> Good job, Joe, but what was the deal with the pagedown button?! It uw> seemed impossible to bring up the next slide on the first try. (: Last night I listened to all of the morning's presentations. The "page down" problem seemed to be one of two things that the audience gave you some grief, if good-natured. The other was the whole notion of the COP principle of sharing nothing between processes/threads. >From what I could tell of the reaction, Joe seemed to be speaking heresy to some people there. Joe: What was conversation like during breaks and at lunch? Did anyone take you to task for heresy, congratulate you for speaking heresy ... or anything in between? uw> Also very interesting was the speech by Todd Proebsting [...] I haven't got there yet. The PLT (?) Scheme demo, as part of Matthew Flatt's presentation was impressive. One features that caught my attention (darn it, my memory is playing tricks on me; I only watched it last night!) was called an "executioner". It guarantees that cleanup tasks are done when a thread died. They're in a hierarchy so that if your parent's executioner gets invoked, you know that your executioner will be invoked, too. -Scott From dvanhorn@REDACTED Tue Nov 12 20:56:19 2002 From: dvanhorn@REDACTED (dvanhorn@REDACTED) Date: Tue, 12 Nov 2002 14:56:19 -0500 (EST) Subject: Erlang is _the_ disruptive technology... In-Reply-To: <200211121903.gACJ3QF11542@snookles.snookles.com> References: <200211121903.gACJ3QF11542@snookles.snookles.com> Message-ID: <1037130979.3dd15ce3b0297@webmail.emba.uvm.edu> Quoting Scott Lystig Fritchie : > The PLT (?) Scheme demo, as part of Matthew Flatt's presentation was > impressive. One features that caught my attention (darn it, my memory > is playing tricks on me; I only watched it last night!) was called an > "executioner". It guarantees that cleanup tasks are done when a > thread died. They're in a hierarchy so that if your parent's > executioner gets invoked, you know that your executioner will be > invoked, too. Documentation about Will Executors can be found at... http://download.plt-scheme.org/doc/202/html/mzscheme/mzscheme-Z-H-13.html#%_chap_13 Flatt's paper on which his talk is based can be found at... Programming Languages as Operating Systems (or, Revenge of the Son of the Lisp Machine) http://www.ccs.neu.edu/scheme/pubs/icfp99-ffkf.pdf -d -- dvanhorn at cs dot uvm dot edu From feeley@REDACTED Tue Nov 12 22:01:29 2002 From: feeley@REDACTED (Marc Feeley) Date: Tue, 12 Nov 2002 16:01:29 -0500 Subject: Erlang is _the_ disruptive technology... In-Reply-To: <1037130979.3dd15ce3b0297@webmail.emba.uvm.edu> (dvanhorn@emba.uvm.edu) References: <200211121903.gACJ3QF11542@snookles.snookles.com> <1037130979.3dd15ce3b0297@webmail.emba.uvm.edu> Message-ID: <200211122101.gACL1TZ20897@baro.iro.umontreal.ca> > Documentation about Will Executors can be found at... > > http://download.plt-scheme.org/doc/202/html/mzscheme/mzscheme-Z-H-13.html#%_chap_13 I would like to point out that "wills" first appeared in the Gambit-C Scheme system over 5 years ago. The basic idea is that you can create an object called a will which contains a reference to an object X and a function (the "executor"). When the GC sees that there are no references to X except through the will, the executor is called with X as an argument. The executor can do any sort of finalization on X and can even "resurect" it by simply storing it somewhere that is accessible from the roots. Aside from finalization, you can use wills to implement other interesting things like hash tables, extensible objects and pools. Marc From Sean.Hinde@REDACTED Tue Nov 12 22:18:58 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 12 Nov 2002 21:18:58 -0000 Subject: R9B inets and pipe issues Message-ID: <04D356A3B172D611981B0008C791C3126BF51A@imp02mbx.t-mobile.co.uk> Hi, A couple of troubles to report (with fixes :)) The first is probably a little embarrassing for the last person to hack inets.. Receiving the first part of a POST content in the same packet as the headers doesn't work. A bit of simple arithmetic provided the somewhat depressing solution: replace line 491 of httpd_request_handler.erl: case httpd_socket:recv(SocketType, Socket, Len, Timeout) of with: case httpd_socket:recv(SocketType, Socket, Len - length(BodyPart), Timeout) of Also a Mac OS X patch. In OS X mknod() is only callable by root regrdless of the type of device. This causes run_erl a problem creating a FIFO /tmp/erlang.pipe.1. The fix for OS X is to change line 604 of run_erl.c from: if ((mknod(name, S_IFIFO | perm, 0) < 0) && (errno != EEXIST)) to if ((mkfifo(name, perm) < 0) && (errno != EEXIST)) I'm not quite sure why the mknod form is used anyway - mkfifo is certainly available on Solaris.. But probably safest to #ifdef it. Cheers, Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From Sean.Hinde@REDACTED Tue Nov 12 22:39:59 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 12 Nov 2002 21:39:59 -0000 Subject: Mac OS X crypto and ssl patch and workarounds Message-ID: <04D356A3B172D611981B0008C791C3126BF51B@imp02mbx.t-mobile.co.uk> OS X Users, A little farther down the road to make OS X fully Erlang functional.. CRYPTO ------ With some help from the apple unix-porting mailing list crypto now works. Attached is a patch to crypto_drv.c which gets around a namespace problem caused by the odd linking method (it does this by forcing a search of the global namespace for the _MD5 etc functions - this is contrary to normal driver practice and could lead to conflicts if those symbols appeared elsewhere in the system). It also sorts out underscore naming issues. The Makefile will also need the following two changes (I have it working but don't have a patch for Makefile.in): * The last step in making an OS X shared lib must use gcc rather than ld - this is required to ensure that _dyld_binding_stub is included. It is needed for both .so targets * The UNDEFS must all be prepended with underscore (as the apple compiler has already put underscores into libcrypto.dylib) i.e. ELIBCRYPTO_UNDEFS = \ -u _CRYPTO_set_mem_functions \ -u _MD5 etc With these changes (the patch and the Makefile changes) all seems OK. SSL --- ssl has some problems compiling with the default makefile (The one for the final stage after make install which links ssl_base.o and esock_ssleay.o to make ssl_esock). I've got it to compile and run successfully with the simple line: gcc -o ssl_esock ssl_base.o esock_ssleay.o -lssl -lcrypto (the -Wl,-R stuff doesn't work under OS X) Enjoy! Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. -------------- next part -------------- A non-text attachment was scrubbed... Name: cryptoosx.patch Type: application/octet-stream Size: 1567 bytes Desc: not available URL: From Lawrie.Brown@REDACTED Wed Nov 13 07:05:21 2002 From: Lawrie.Brown@REDACTED (Lawrie Brown) Date: Wed, 13 Nov 2002 17:05:21 +1100 Subject: appspace pollution & SERC EC compiler In-Reply-To: <04D356A3B172D611981B0008C791C3126BF507@imp02mbx.t-mobile.co.uk> References: <04D356A3B172D611981B0008C791C3126BF507@imp02mbx.t-mobile.co.uk> Message-ID: <20021113060521.GA5545@icarus.itsc.adfa.edu.au> Hi On Mon, Nov 11, 2002 at 01:00:23PM -0000, Sean Hinde wrote: > This is a big concern as Erlang creeps ever closer to living on the internet .... > Also various people have proposed things to lock down erlang distribution: > * Various works at SERC - mainly about non trusted code execution though > some nice stuff about secured gen_servers Just a quick note to say we're still here and plugging away quietly :-) I've spent the last few months building a decent sized runtime for the EC compiler that Maurice Castro developed at SERC and its getting closer to the point where we're happy enough with it to announce its availability for people to play with. But given the above & other recent comments I thought I'd dangle a teaser in case there's some interest. Very briefly - EC is intended to be a native-code compiler for (a decent sized subset of) Erlang. It is intended both as the core compiler for the Magnus massively scaleable computing system, as well as a testbed for the extensions I proposed for a Safe Erlang. Currently it recognises most of the language as defined by the Erlang book & the Erlang Ref 4.4 (ie circa 1999 vintage). The current backend is for x86 BSD/Linux systems, though the compiler and the runtime both build & test on MacOSX & Solaris as well (ie you go figure which backends are coming next, we hope ;-) The runtime I've been working on implements an Erlang node as a heavy-weight address space protected Unix process. Erlang processes are implemented as detached system scheduled pthreads (ie can take full advantage of multiple CPU systems). Dynamic module loading is implemented using libdl (ie dlopen() & friends). Because we are working with compiled code - we can dynamically load not just Erlang but any compiled modules that conform to the naming/ info conventions we require (the runtime test suite includes loading of C modules). I'm still working on code update - loading a new version of a module is easy, and because its inserted ahead of the old in the loaded modules table, all new apply's etc will use it - the fun bit is tracking who'se still in the old version - have some ideas on that. Another key feature is the use of a general capability type with access rights to replace the current pidportref type. This has been generalised to manage open files, net connections, (sub)nodes & loaded modules as well. There is a placeholder for ports, but we don't use them in EC nodes (file & net are handled separately, and you don't need drivers as you can call compiled modules directly). Whats missing? The big ones are the external binary format & hence distribution. Coming soon I hope - the intention is for EC nodes to appear as C-nodes to OTP systems, modulo differences due to different data representations (esp wrt the capabilities). We also need to fully implement the hierarchical subnode concept thats part of my safe erlang extensions (and complete the garbage collection handling!) So a bit to do yet! But still, if anyone is interested in having a look or play, the current (evolving!) CVS tree is available from the EC site currently at (nb will move in new year): http://www.serc.rmit.edu.au/~ec/ There's also some words etc on my safe erlang research page (full doco ALSO is yet to be done) at: http://www.unsw.adfa.edu.au/~lpb/research/sserl/ Hope this is of some interest! Cheers Lawrie ------------------------------------ <*> ------------------------------------ Post: Dr Lawrie Brown, Computer Science, UNSW@REDACTED, Canberra 2600 Australia Phone: 02 6268 8816 Fax: 02 6268 8581 Web: http://www.adfa.edu.au/~lpb/ nb. currently on sabbatical at SERC, RMIT, Melbourne. From vances@REDACTED Wed Nov 13 09:02:51 2002 From: vances@REDACTED (Vance Shipley) Date: Wed, 13 Nov 2002 03:02:51 -0500 Subject: missing banner on Solaris Message-ID: <20021113080251.GA65353@frogman.motivity.ca> Has anyone else noticed that the banner doesn't show up when running erl on Solaris? -Vance solaris$ erl Eshell V5.2 (abort with ^G) 1> linux$ erl Erlang (BEAM) emulator version 5.1.1 [source] [hipe] [threads:0] Eshell V5.1.1 (abort with ^G) 1> From DANIESC.SCHUTTE@REDACTED Wed Nov 13 10:01:44 2002 From: DANIESC.SCHUTTE@REDACTED (DANIESC SCHUTTE) Date: Wed, 13 Nov 2002 11:01:44 +0200 Subject: missing banner on Solaris Message-ID: Hmmm no problem here :) Sparc Ultra 2, Solaris 8 bash-2.03$ erl Erlang (BEAM) emulator version 5.1.1 [source] Eshell V5.1.1 (abort with ^G) 1> Danie Schutte Phone: +27 - 11 - 203 - 1614 Mobile: 083-268-3138 e-Mail: Daniesc@REDACTED >>> Vance Shipley 11/13/02 10:02AM >>> Has anyone else noticed that the banner doesn't show up when running erl on Solaris? -Vance solaris$ erl Eshell V5.2 (abort with ^G) 1> linux$ erl Erlang (BEAM) emulator version 5.1.1 [source] [hipe] [threads:0] Eshell V5.1.1 (abort with ^G) 1> ##################################################################################### The information contained in this message and or attachments is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any system and destroy and copies. ##################################################################################### From etxlg@REDACTED Wed Nov 13 10:24:33 2002 From: etxlg@REDACTED (Lars G J Carlsson) Date: Wed, 13 Nov 2002 10:24:33 +0100 Subject: missing banner on Solaris References: <20021113080251.GA65353@frogman.motivity.ca> Message-ID: <3DD21A51.BCE3D74B@cbe.ericsson.se> Vance Shipley wrote: > > Has anyone else noticed that the banner doesn't show up > when running erl on Solaris? > It depends on the value of your TERM variable. Haven't looked into why/how, nor what it should/shouldn't be. Setting it to sun (or xterm what it was in the xterm-window where I tried), you get the banner unsetting it (empty) you get no banner. Brgds/LARS -- ================================================================= Lars Carlsson Ericsson AB eMail : lars.carlsson@REDACTED ================================================================== From kent@REDACTED Wed Nov 13 11:30:20 2002 From: kent@REDACTED (Kent Boortz) Date: 13 Nov 2002 11:30:20 +0100 Subject: missing banner on Solaris In-Reply-To: <3DD21A51.BCE3D74B@cbe.ericsson.se> References: <20021113080251.GA65353@frogman.motivity.ca> <3DD21A51.BCE3D74B@cbe.ericsson.se> Message-ID: Lars G J Carlsson writes: > Vance Shipley wrote: > > > > Has anyone else noticed that the banner doesn't show up > > when running erl on Solaris? > > > > It depends on the value of your TERM variable. > Haven't looked into why/how, nor what it should/shouldn't be. > Setting it to sun (or xterm what it was in the xterm-window where I > tried), you get the banner unsetting it (empty) you get no banner. I haven't looked why and how but it seems that for some reason Erlang determine that the terminal can't handle curses terminal control and starts with "oldshell", i.e. an Erlang command shell without line editing, history etc. You can force this mode using % erl -oldshell Eshell V5.2 (abort with ^G) 1> kent From vlad_dumitrescu@REDACTED Wed Nov 13 11:58:55 2002 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 13 Nov 2002 11:58:55 +0100 Subject: dynamic code loading Message-ID: Hi all, I have a question about dynamically creating .erl files, and then loading/running them. It seems to me that the secure way of doing it is like in the following code: compile(R) -> {ok, F} = file:open("m.erl", [write]), file:write(F, R), file:close(F), compile:file("m.erl"), code:purge(m), code:delete(m), code:purge(m), code:load_file(m), m:p(). It is always certain that there are no processes running code from module m. When running the above from the shell, sometimes it isn't enough to only delete and purge the code... Is this how it should be, or may it be related to cases when m:p() crashes? thanks in advance. regards, Vlad From olgeni@REDACTED Wed Nov 13 16:03:57 2002 From: olgeni@REDACTED (Jimmy Olgeni) Date: Wed, 13 Nov 2002 16:03:57 +0100 (CET) Subject: odbc help :( Message-ID: <20021113155724.G49569-100000@dev1.localdomain.net> Hi! Looking for clues... I compiled the odbc application (R9B) using libiodbc, installed odbcserver in priv/bin by hand, and found a working DSN using the sample iodbc's odbctest application. I'm using the postgresql driver (7.2.3). The odbc app complains: (odbc@REDACTED)12> odbc:connect ("dsn=octopus;server=localhost;port=5432;database=octopus;uid=octopus", []). SQLGetInfo failed in dbInfo =ERROR REPORT==== 13-Nov-2002::15:57:08 === ODBC: exit signal from port program:normal {error,{port_exit,normal}} (odbc@REDACTED)13> =ERROR REPORT==== 13-Nov-2002::15:57:08 === ** Generic server <0.81.0> terminating ** Last message in was {'EXIT',#Port<0.63>,normal} ** When Server state == {state,#Port<0.63>, {<0.79.0>,#Ref<0.0.0.285>}, <0.79.0>, undefined, on, undefined, undefined, connecting, false, false, []} ** Reason for termination == ** {port_exit,normal} odbc:connect performs application:start (odbc), so it should be sufficient (?). Has anybody managed to get postgresql/iodbc/odbc working? =) -- jimmy From vances@REDACTED Wed Nov 13 16:38:24 2002 From: vances@REDACTED (Vance Shipley) Date: Wed, 13 Nov 2002 10:38:24 -0500 Subject: missing banner on Solaris In-Reply-To: References: <20021113080251.GA65353@frogman.motivity.ca> <3DD21A51.BCE3D74B@cbe.ericsson.se> Message-ID: <20021113153824.GB65353@frogman.motivity.ca> That did fix things. Thank you. bash-2.05$ TERM=xterm;export TERM bash-2.05$ erl +A10 Erlang (BEAM) emulator version 5.2 [64-bit] [source] [shared heap] [threads:10] Eshell V5.2 (abort with ^G) 1> And now I see a nifty little "[64-bit]" as I recently completed the 64-bit build. I'm still testing this as I'm porting one of my linked in drivers to this environment. I also see "[shared heap]" which is no suprise as I configured with --enable-shared-heap. However it doesn't work the way I expect. The release notes say: * "Shared heap" a new approach to memory handling within the Erlang emulator where all Erlang processes share a common heap. This way of handling memory is very interesting and have a potential to reduce memory consumption an improve performance. A separate emulator is built to support "shared_heap", it is started with 'erl -shared'. This feature is intended for evaluation and may be supported in future versions. Feedback is velcome. When I try and run it this way I get: bash-2.05$ erl -shared erlexec: Error 2 executing '/export/home/otpuser/lib/erlang/erts-5.2/bin/beam.shared'. -Vance On Wed, Nov 13, 2002 at 11:30:20AM +0100, Kent Boortz wrote: } } Lars G J Carlsson writes: } > Vance Shipley wrote: } > > } > > Has anyone else noticed that the banner doesn't show up } > > when running erl on Solaris? } > > } > } > It depends on the value of your TERM variable. } > Haven't looked into why/how, nor what it should/shouldn't be. } > Setting it to sun (or xterm what it was in the xterm-window where I } > tried), you get the banner unsetting it (empty) you get no banner. } } I haven't looked why and how but it seems that for some reason Erlang } determine that the terminal can't handle curses terminal control and } starts with "oldshell", i.e. an Erlang command shell without line } editing, history etc. You can force this mode using } } % erl -oldshell } Eshell V5.2 (abort with ^G) } 1> } } kent From kostis@REDACTED Wed Nov 13 17:04:06 2002 From: kostis@REDACTED (Kostis Sagonas) Date: Wed, 13 Nov 2002 17:04:06 +0100 (MET) Subject: missing banner on Solaris In-Reply-To: Mail from 'Vance Shipley ' dated: Wed, 13 Nov 2002 10:38:24 -0500 Message-ID: <200211131604.RAA28261@harpo.it.uu.se> Vance Shipley wrote: > > I also see "[shared heap]" which is no suprise as I configured with > --enable-shared-heap. However it doesn't work the way I expect. > .... > When I try and run it this way I get: > bash-2.05$ erl -shared > erlexec: Error 2 executing '/export/home/otpuser/lib/erlang/erts-5.2/bin/beam.shared'. The system built with --enable-shared-heap is a shared heap system. Just leave out the "-shared" command line option and things should work fine. Kostis. From vances@REDACTED Wed Nov 13 16:57:18 2002 From: vances@REDACTED (Vance Shipley) Date: Wed, 13 Nov 2002 10:57:18 -0500 Subject: missing banner on Solaris In-Reply-To: <200211131604.RAA28261@harpo.it.uu.se> References: <200211131604.RAA28261@harpo.it.uu.se> Message-ID: <20021113155718.GD65353@frogman.motivity.ca> Kostis, Hmmm... I only built the shared heap version because I understood it would only add an optional version of the emulator which I could use if and when I was ready to play with it. If there is no -noshared type of switch I guess I should rebuild it. Obviously there is some mismatch between what has been documented and also implemented in erlexec.c and what gets installed. What is the long term intention? -Vance On Wed, Nov 13, 2002 at 05:04:06PM +0100, Kostis Sagonas wrote: } } The system built with --enable-shared-heap is a shared heap system. } } Just leave out the "-shared" command line option and things should } work fine. } } Kostis. } From kostis@REDACTED Wed Nov 13 17:44:50 2002 From: kostis@REDACTED (Kostis Sagonas) Date: Wed, 13 Nov 2002 17:44:50 +0100 (MET) Subject: missing banner on Solaris In-Reply-To: Mail from 'Vance Shipley ' dated: Wed, 13 Nov 2002 10:57:18 -0500 Message-ID: <200211131644.RAA28390@harpo.it.uu.se> The shared vs. process-private heaps architectures are not really command-line switchable options. One builds an emulator with a specific type of architecture and uses it afterwards. If you want to have them both around, then configure and install them both (in separate directories) and switch between them using an alias or appropriate shell script (which is I guess what the "erl -shared" was supposed to achieve, if it were not broken for some reason). Currently, we (the HiPE team) are committed to support both architectures (at least for a limited time). Both can be handy to have around, they have pros and cons, and the choice between them might also depend on application characteristics. As for long-term intentions, we are desperately waiting for input (positive or negative) from the user community, and for programs that perform significantly better or worse in one or the other architecture, so that we can make a more informed decision on whether support for both of them is needed in the long term, or whether one of them is the "winner" and can be the default. To me, it is not clear which should be the default; currently, it is the private heaps one. In this respect, we strongly welcome any sort of "real-world" concurrent program that we can use as a benchmark. (See also Jesper Wilhelmsson's message yesterday for sending us mnesia-based programs). Cheers, Kostis. From kent@REDACTED Wed Nov 13 17:47:20 2002 From: kent@REDACTED (Kent Boortz) Date: 13 Nov 2002 17:47:20 +0100 Subject: missing banner on Solaris In-Reply-To: <20021113155718.GD65353@frogman.motivity.ca> References: <200211131604.RAA28261@harpo.it.uu.se> <20021113155718.GD65353@frogman.motivity.ca> Message-ID: Vance Shipley writes: > Obviously there is some mismatch between what has been documented > and also implemented in erlexec.c and what gets installed. What > is the long term intention? To move the OpenSource build and connercial build even closer to avoid this kind of confusion ;-) Note that 64 bits has not to my knowledge been tested with shared heap but I may be wrong, kent From enano@REDACTED Wed Nov 13 17:33:58 2002 From: enano@REDACTED (Miguel Barreiro Paz) Date: Wed, 13 Nov 2002 17:33:58 +0100 (CET) Subject: Erlang on itanium? Message-ID: Hi, Anybody running (or trying to) erlang on itanium2 machines? Regards, Miguel From daniel.neri@REDACTED Wed Nov 13 18:51:58 2002 From: daniel.neri@REDACTED (Daniel =?iso-8859-1?q?N=E9ri?=) Date: 13 Nov 2002 17:51:58 +0000 Subject: odbc help :( References: <20021113155724.G49569-100000@dev1.localdomain.net> Message-ID: Jimmy Olgeni writes: > Looking for clues... I compiled the odbc application (R9B) using > libiodbc, I think you'll have more luck with unixODBC. It seems to me that iODBC is incompatible with odbcserver as found in R9. Regards, --Daniel -- Daniel N?ri, Sigicom AB, Sweden From vances@REDACTED Wed Nov 13 22:33:46 2002 From: vances@REDACTED (Vance Shipley) Date: Wed, 13 Nov 2002 16:33:46 -0500 Subject: detecting 64-bit emulator In-Reply-To: <20021113153824.GB65353@frogman.motivity.ca> References: <20021113080251.GA65353@frogman.motivity.ca> <3DD21A51.BCE3D74B@cbe.ericsson.se> <20021113153824.GB65353@frogman.motivity.ca> Message-ID: <20021113213346.GF65353@frogman.motivity.ca> I seem to have my linked in driver working in 64-bit mode now on Sparc Solaris v8. I had to do some porting to handle the thread references being 8 bytes instead of 4. That seems to be working fine though and I am able to create a Binary which contains my boot code and pass it down to the board for dowloading. I am quite happy with this. Now I want to get my automake/autoconf scripts to recognize that the emulator is 64-bit and set the correct flags to build the driver library as 64-bit. The first thing I tried didn't work as I had hoped: bash-2.05$ erl -version Erlang (THREADS,SHARED_HEAP) (BEAM) emulator version 5.2 It didn't include the 64-bit flag. :( bash-2.05$ erl Erlang (BEAM) emulator version 5.2 [64-bit] [source] [shared heap] [threads:0] I could use file: bash-2.05$ file ./lib/erlang/erts-5.2/bin/beam ./lib/erlang/erts-5.2/bin/beam: ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC1 Extensions Required, dynamically linked, not stripped Anyone have a better idea? -Vance From igouy@REDACTED Wed Nov 13 23:55:34 2002 From: igouy@REDACTED (isaac gouy) Date: Wed, 13 Nov 2002 14:55:34 -0800 (PST) Subject: small optimization story Message-ID: <20021113225534.55591.qmail@web20514.mail.yahoo.com> Thank goodness someone who knows Erlang has done a little work on those Language Shootout benchmarks. I contributed some implementations just because the tests didn't have Erlang implementations. It would be great if someone who knew what they were doing replaced those ;-) If I remember correctly, the main problem for Erlang with the Win32 Shootout is redirected file input from a windows command line - that makes Erlang fail 8 of the benchmarks. The problems has been mentioned previously - Re: difference between unix and windows erlang? Re: Erl.exe input __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 From james@REDACTED Thu Nov 14 03:16:40 2002 From: james@REDACTED (James Hague) Date: Wed, 13 Nov 2002 20:16:40 -0600 Subject: small optimization story Message-ID: <3DD2B328.26707.1A4C88@localhost> >Thank goodness someone who knows Erlang has done a >little work on those Language Shootout benchmarks. They're a funny set of programs, geared toward very static problems, but fiddling with them in Erlang is still fun. It's impressive that Erlang walks all over Python and Ruby in most cases, often being over twice as fast. Who says Erlang isn't a fast sequential language! >If I remember correctly, the main problem for Erlang >with the Win32 Shootout is redirected file input from >a windows command line - that makes Erlang fail 8 of >the benchmarks. It scores poorly on those benchmarks in Doug's original Linux shootout, too. In each case, you have to read a file a line at a time, which is not something that Erlang excels at. If you could slurp in the entire file at once via file:read/1, then no problem, but line-oriented input is a dog. James From ingela@REDACTED Thu Nov 14 09:23:03 2002 From: ingela@REDACTED (Ingela Anderton) Date: Thu, 14 Nov 2002 09:23:03 +0100 (MET) Subject: odbc help :( References: <20021113155724.G49569-100000@dev1.localdomain.net> Message-ID: <200211140823.gAE8N3c25995@gildor.du.uab.ericsson.se> Hi Jimmy! Jimmy Olgeni wrote: > > Hi! > > Looking for clues... I compiled the odbc application (R9B) using > libiodbc, installed odbcserver in priv/bin by hand, and found a > working DSN using the sample iodbc's odbctest application. I'm using > the postgresql driver (7.2.3). > > The odbc app complains: > > (odbc@REDACTED)12> odbc:connect ("dsn=octopus;server=localhost;port=5432;database=octopus;uid=octopus", []). > SQLGetInfo failed in dbInfo > =ERROR REPORT==== 13-Nov-2002::15:57:08 === > ODBC: exit signal from port program:normal > {error,{port_exit,normal}} > (odbc@REDACTED)13> > =ERROR REPORT==== 13-Nov-2002::15:57:08 === > ** Generic server <0.81.0> terminating > ** Last message in was {'EXIT',#Port<0.63>,normal} > ** When Server state == {state,#Port<0.63>, > {<0.79.0>,#Ref<0.0.0.285>}, > <0.79.0>, > undefined, > on, > undefined, > undefined, > connecting, > false, > false, > []} > ** Reason for termination == > ** {port_exit,normal} > > odbc:connect performs application:start (odbc), so it should be sufficient (?). > That is sufficient. The problem is not that the odbc application is not started. The error message tells me that both the erlang an the c-process are started correctly. But the C-program exits as the ODBC API-function SQLGetInfo returns an unexpected value. This causes the whole application to stop. This is something that logical should not have happened and that is why the c-program exits. We will have to look in to that. > Has anybody managed to get postgresql/iodbc/odbc working? =) Unfortunately we have not had time to set up that test environment. -- /Ingela Ericsson AB - OTP team From sureshsaragadam@REDACTED Thu Nov 14 11:19:30 2002 From: sureshsaragadam@REDACTED (=?iso-8859-1?q?Suresh=20S?=) Date: Thu, 14 Nov 2002 10:19:30 +0000 (GMT) Subject: how to reassign or increment a variable in erlang Message-ID: <20021114101930.28027.qmail@web8202.mail.in.yahoo.com> Hi dear, even though it is not possible to reassing a variable in erlang,i need to increment a counter(variable), and assign it to the same variable, have any other ideas on this issue please let me know i am really looking out for a solution to increment an attrbute value in mnesia table how it can be done advanced thanx suresh s ________________________________________________________________________ Missed your favourite TV serial last night? Try the new, Yahoo! TV. visit http://in.tv.yahoo.com From Chandrashekhar.Mullaparthi@REDACTED Thu Nov 14 12:08:47 2002 From: Chandrashekhar.Mullaparthi@REDACTED (Chandrashekhar Mullaparthi) Date: Thu, 14 Nov 2002 11:08:47 -0000 Subject: how to reassign or increment a variable in erlang Message-ID: <04D356A3B172D611981B0008C791C312404E30@imp02mbx.t-mobile.co.uk> Suresh, You can do something like this. -record(myrecord, {a,b}). mnesia:dirty_write(#myrecord{a=1, b=2}). [#myrecord{b=BVal}=Rec] = mnesia:dirty_read({myrecord, 1}) mnesia:dirty_write(Rec#myrecord{b=BVal+1}). If you are specifically looking for counters, look at mnesia:dirty_update_counter/2 Chandru -----Original Message----- From: Suresh S [mailto:sureshsaragadam@REDACTED] Sent: 14 November 2002 10:20 To: erlang Subject: how to reassign or increment a variable in erlang Hi dear, even though it is not possible to reassing a variable in erlang,i need to increment a counter(variable), and assign it to the same variable, have any other ideas on this issue please let me know i am really looking out for a solution to increment an attrbute value in mnesia table how it can be done advanced thanx suresh s NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From luke@REDACTED Thu Nov 14 12:06:04 2002 From: luke@REDACTED (Luke Gorrie) Date: 14 Nov 2002 12:06:04 +0100 Subject: small optimization story In-Reply-To: References: Message-ID: James Hague writes: > Really interesting, Luke! > > I wrote up some similar experiences here: > > http://www.dadgum.com/james/shootout.html Nice page! I was also struck by the occurances of 'unsafe' in ML and (optimize (safety 0)) in Lisp for turning off array bounds checking in some benchmark programs. The moral victory surely goes to Erlang and the others like it in those cases :-) Cheers, Luke From sureshsaragadam@REDACTED Thu Nov 14 13:06:40 2002 From: sureshsaragadam@REDACTED (=?iso-8859-1?q?Suresh=20S?=) Date: Thu, 14 Nov 2002 12:06:40 +0000 (GMT) Subject: how to reassign or increment a variable in erlang In-Reply-To: <04D356A3B172D611981B0008C791C312404E30@imp02mbx.t-mobile.co.uk> Message-ID: <20021114120640.35711.qmail@web8205.mail.in.yahoo.com> hi chandu can u please give an example done on this , increment an attribute in mnesia table , thanking u ________________________________________________________________________ Missed your favourite TV serial last night? Try the new, Yahoo! TV. visit http://in.tv.yahoo.com From hakan@REDACTED Thu Nov 14 13:09:11 2002 From: hakan@REDACTED (Hakan Mattsson) Date: Thu, 14 Nov 2002 13:09:11 +0100 (MET) Subject: Benchmarks using Mnesia (or other concurrent programs) In-Reply-To: Message-ID: On Tue, 12 Nov 2002, Jesper Wilhelmsson wrote: jesper> If there is such a benchmark that acually correlates to something in real jesper> life, it would be great. But any test program that run for a couple of jesper> seconds will do. Take a look at the (synthetic) benchmark programs under mnesia/examples: - 'bench' simulates a HLR-like access pattern - 'mnesia_tpcb' is the TPC-B benchmark (see www.tpc.org) /H?kan --- H?kan Mattsson Ericsson High Availability Software, DBMS Internals http://www.ericsson.com/cslab/~hakan/ From Chandrashekhar.Mullaparthi@REDACTED Thu Nov 14 14:00:48 2002 From: Chandrashekhar.Mullaparthi@REDACTED (Chandrashekhar Mullaparthi) Date: Thu, 14 Nov 2002 13:00:48 -0000 Subject: how to reassign or increment a variable in erlang Message-ID: <04D356A3B172D611981B0008C791C312404E36@imp02mbx.t-mobile.co.uk> -record(counter_table, {name, value=0}). mnesia:create_table(counter_table, [{attributes, record_info(fields, counter_table)}, {disc_copies, [sevas_db@REDACTED]}]). (sevas_db@REDACTED)96> mnesia:dirty_read({counter_table, test}). [{counter_table,test,0}] (sevas_db@REDACTED)97> (sevas_db@REDACTED)97> mnesia:dirty_update_counter({counter_table, test}, 1). 1 (sevas_db@REDACTED)98> (sevas_db@REDACTED)98> mnesia:dirty_read({counter_table, test}). [{counter_table,test,1}] Chandru -----Original Message----- From: Suresh S [mailto:sureshsaragadam@REDACTED] Sent: 14 November 2002 12:07 To: Chandrashekhar Mullaparthi Cc: erlang-questions@REDACTED Subject: RE: how to reassign or increment a variable in erlang hi chandu can u please give an example done on this , increment an attribute in mnesia table , thanking u NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From etxuwig@REDACTED Thu Nov 14 14:28:35 2002 From: etxuwig@REDACTED (Ulf Wiger) Date: Thu, 14 Nov 2002 14:28:35 +0100 (MET) Subject: Benchmarks using Mnesia (or other concurrent programs) In-Reply-To: Message-ID: On Thu, 14 Nov 2002, Hakan Mattsson wrote: >Take a look at the (synthetic) benchmark programs under >mnesia/examples: > > - 'bench' simulates a HLR-like access pattern > - 'mnesia_tpcb' is the TPC-B benchmark (see www.tpc.org) > >/H?kan Have you run mnesia_tpcb yourself and made comparisons to other known DBMSes? I noticed that mnesia was not present in the lists at www.tpc.org, but then TPC-B is listed as obsolete. /Uffe -- Ulf Wiger, Senior Specialist, / / / Architecture & Design of Carrier-Class Software / / / Strategic Product & System Management / / / Ericsson Telecom AB, ATM Multiservice Networks From igouy@REDACTED Thu Nov 14 18:52:38 2002 From: igouy@REDACTED (isaac gouy) Date: Thu, 14 Nov 2002 09:52:38 -0800 (PST) Subject: small optimization story Message-ID: <20021114175238.63779.qmail@web20509.mail.yahoo.com> > It scores poorly on those benchmarks in Doug's > original Linux shootout, too. In each case, you > have to read a file a line at a time, which is not > something that Erlang excels at. Worse than that - in several of the file-oriented tests you're allowed to use a 4k input buffer, and the Erlang solutions don't. __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com From cleverjulian@REDACTED Fri Nov 15 15:38:21 2002 From: cleverjulian@REDACTED (Julian Fondren) Date: Fri, 15 Nov 2002 09:38:21 -0500 Subject: badarith in handle_event of debugger/src/dbg_ui_win.erl Message-ID: under Erlang/OTP R9B (Erlang (BEAM) emulator version 5.2 [source] [hipe] [shared heap] [threads:0]) I get the following error immediately upon interaction with the window created by debugger:start() {badarith,[{dbg_ui_mon_win,handle_event,2},{dbg_ui_mon,loop,1}]} where one clause of handle_event() in debugger-2.1/src/dbg_ui_mon_win.erl is handle_event({gs, _Id, motion, _Data, [X,Y]}, WinInfo) -> {LastX, LastY} = dbg_ui_win:motion(X, Y), Win = WinInfo#winInfo.window, io:format("~p: ~p: ~p\n", [gs:read(Win, x), gs:read(Win, y), {LastX, LastY}]), {coords, {gs:read(Win, x)+LastX-5, gs:read(Win, y)+LastY-5}}; by the output of io:format (which is my addition), gs:read(Win, x) = {error,"can't read \"h\": no such variable"} gs:read(Win, y) = {error,"can't read \"h\": no such variable"} {LastX, LastY} = {346, 6} I'm not familiar enough with GS to know why gs:read isn't returning what handle_event() seems to expect. Does anyone else get this error? _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From cleverjulian@REDACTED Fri Nov 15 15:40:46 2002 From: cleverjulian@REDACTED (Julian Fondren) Date: Fri, 15 Nov 2002 09:40:46 -0500 Subject: truncated function/aritys in m(calendar) Message-ID: In Erlang/OTP R9B, I noticed that m(calendar) printed truncated function/aritys for some of calendar's longer-named exports. I thought this very odd, as "calendar:"'s output didn't suffer from this... stdlib-1.11.0/src/c.erl defines m/1 as m(M) -> ... {value,{exports,E}} = keysearch(exports, 1, L), ... ... % none of this uses E ... format("Exports: ~n",[]), print_exports(keysort(1, E)). I removed * print_exports/1, split_print_exports/1, and split_print_exports/3 from c.erl * the import of lists:keysort/2 from c.erl * the binding of E in the above definition and changed the last line to format("Exports:",[]), edlin:expand([$:|reverse(atom_to_list(M))]). which seems to work well enough. These modifications are released into the public domain. (Curiously, I had to restart the node I was using in order to load the modified version of c.erl -- code:erl_abs/1 (via c:c/1) complained that it couldn't load modules from a 'sticky directory', which stdlib-1.11.0/src/ebin wasn't -- at least not so far as the linux filesystem was concerned.) _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From hakan@REDACTED Fri Nov 15 16:07:37 2002 From: hakan@REDACTED (Hakan Mattsson) Date: Fri, 15 Nov 2002 16:07:37 +0100 (MET) Subject: Benchmarks using Mnesia (or other concurrent programs) In-Reply-To: Message-ID: On Thu, 14 Nov 2002, Ulf Wiger wrote: Uffe> On Thu, 14 Nov 2002, Hakan Mattsson wrote: Uffe> Uffe> H?kan>Take a look at the (synthetic) benchmark programs under Uffe> H?kan>mnesia/examples: Uffe> H?kan> Uffe> H?kan> - 'bench' simulates a HLR-like access pattern Uffe> H?kan> - 'mnesia_tpcb' is the TPC-B benchmark (see www.tpc.org) Uffe> H?kan> Uffe> H?kan>/H?kan Uffe> Uffe> Have you run mnesia_tpcb yourself Yes. Uffe> and made comparisons to other known DBMSes? No. Uffe> I noticed that mnesia was not present in Uffe> the lists at www.tpc.org, but then TPC-B is listed as obsolete. The fully conformant configuration of the TPC-B benchmark is not really suited for memory resident databases due to the amount of stored data. As the benchmark should be run in 8 hours while each transaction adds new data to the database the memory gets exhausted rather rapidly. I did not mean that Jesper should run the 8 hour configuration with a fully populated database. Both the 'mnesia_tpcb' and 'bench' programs are very flexible and can be used in many alternate configurations. /H?kan From kent@REDACTED Fri Nov 15 16:25:36 2002 From: kent@REDACTED (Kent Boortz) Date: 15 Nov 2002 16:25:36 +0100 Subject: badarith in handle_event of debugger/src/dbg_ui_win.erl In-Reply-To: References: Message-ID: > by the output of io:format (which is my addition), > > gs:read(Win, x) = {error,"can't read \"h\": no such variable"} > gs:read(Win, y) = {error,"can't read \"h\": no such variable"} > {LastX, LastY} = {346, 6} > > I'm not familiar enough with GS to know why gs:read isn't returning > what handle_event() seems to expect. Does anyone else get this error? Haven't seen this but I'm interested to know what version of the wish program you run. GS will search for wish84 wish8.4 wish83 wish8.3 wish82 wish8.2 wish in that order. If you start the same wish program GS will find using your search path for executables, could you please send me the output from the following interaction? Unix shell> wishXXX % puts $tcl_version % puts $tk_version % wm geometry . % regexp {(\d+)x(\d+)\+?(-?\d+)\+?(-?\d+)} [wm geometry . ] g w h x y % set tmp "$w $h $x $y" The last two lines is what GS uses to find the geometry of the window and to answer the question "gs:read(Win, x)" above, kent From olgeni@REDACTED Fri Nov 15 16:31:48 2002 From: olgeni@REDACTED (Jimmy Olgeni) Date: Fri, 15 Nov 2002 16:31:48 +0100 (CET) Subject: +A? Message-ID: <20021115162942.W39612-100000@dev1.localdomain.net> Hello world, Quick threading question... :) How should I find out how many threads (with --enable-threads) are better for a given application? Could I get a clue about this by poking around in the monitoring tools? -- jimmy From cleverjulian@REDACTED Fri Nov 15 17:06:56 2002 From: cleverjulian@REDACTED (Julian Fondren) Date: Fri, 15 Nov 2002 11:06:56 -0500 Subject: badarith in handle_event of debugger/src/dbg_ui_win.erl Message-ID: >From: Kent Boortz >Haven't seen this but I'm interested to know what version of the >wish program you run. GS will search for > > wish84 wish8.4 wish83 wish8.3 wish82 wish8.2 wish >in that order. If you start the same wish program GS will find using >your search path for executables, could you please send me the output >from the following interaction? > > Unix shell> wishXXX > % puts $tcl_version 8.0 > % puts $tk_version 8.0 > % wm geometry . 200x200+535+29 > % regexp {(\d+)x(\d+)\+?(-?\d+)\+?(-?\d+)} [wm geometry . ] g w h x y 0 > % set tmp "$w $h $x $y" can't read "w": no such variable I'll upgrade to a version that's actually on your list and see if the problem persists. Thanks. >The last two lines is what GS uses to find the geometry of the >window and to answer the question "gs:read(Win, x)" above, > >kent _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From thierry.mallard@REDACTED Fri Nov 15 19:01:38 2002 From: thierry.mallard@REDACTED (Thierry Mallard) Date: Fri, 15 Nov 2002 19:01:38 +0100 Subject: badarith in handle_event of debugger/src/dbg_ui_win.erl In-Reply-To: References: Message-ID: <20021115180138.GA1986@hobbes.local.vawis.net> Greetings, On Fri, Nov 15, 2002 at 09:38:21AM -0500, Julian Fondren wrote: > under Erlang/OTP R9B > (Erlang (BEAM) emulator version 5.2 [source] [hipe] [shared heap] > [threads:0]) > I get the following error immediately upon interaction > with the window created by debugger:start() > > {badarith,[{dbg_ui_mon_win,handle_event,2},{dbg_ui_mon,loop,1}]} I think this may be the same bug as reported October 26th. In my case, the problem seemed specific to IceWM window manager, under Linux OS. If that's your case too, I'd suggest you try another window manager just to test if that solves your problem. Hope this helps.. With kind regards, -- Thierry Mallard http://vawis.net From svg@REDACTED Fri Nov 15 22:28:19 2002 From: svg@REDACTED (Vladimir Sekissov) Date: Sat, 16 Nov 2002 02:28:19 +0500 (YEKT) Subject: Absolute path when using erlc on windows errors out. In-Reply-To: <200211111818.gABIIcZ31098@hyena.levonline.com> References: <20021111141634.44640.qmail@web40805.mail.yahoo.com> <200211111818.gABIIcZ31098@hyena.levonline.com> Message-ID: <20021116.022819.49611489.svg@surnet.ru> Hi, > I will get an "erc: Error executing 'C:\Program':22" It seems for me that erlc couldn't find ecc in the path. Best Regards, Vladimir Sekissov per> Hi, per> per> The "known" problem may not be "known" to OTP support since per> it has never been officially reported. per> At that time, at least, they worked around the problem by using per> 8.3 versions of the directory names in the registry entries. per> It did however not solve the problem with using erlc from a normal per> Makefile. Adding the binary directory (short version) to your path did per> though. per> per> I searched the list archieve but I could not find any submission from per> my former me ... If anyone who received a copy from me still have it per> please let me know. per> per> /Per per> per> P.S. per> If there is still somebody at CellPoint reading this list and you per> haven't reformatted my old harddrive D:\build is a good starting point per> ..... per> D.S. per> per> > Thanks Thomas, Per; per> > per> > per> > Moving it out of Program Files and into another per> > directory fixed the problem. The question I do have per> > is, considering this is a known problem is it such a per> > good idea for the default install to go into 'Program per> > Files'? Just curious, per> > per> > Thanks, per> > Eric per> > --- Per Bergqvist wrote: per> > > Hi, per> > > per> > > per> > > per> > > This is a well known problem under windows and is per> > > caused by incorrect per> > > qouting of parameters in Erlang (and yes, in the end per> > > caused by MS as per> > > everything else ...). per> > > per> > > per> > > per> > > A couple of years ago I posted a kit for native per> > > building of Erlang on per> > > windows using cygwin. per> > > per> > > Included was a corrected version of argument per> > > quoting. per> > > per> > > per> > > Unfortunately I didn't bring anything when leaving per> > > that job so if per> > > somebody have a copy of the posting you can probably per> > > move it up per> > > to R9 with ease. per> > > per> > > (And please send me a copy). per> > > per> > > per> > > per> > > /Per per> > > per> > > per> > > per> > > > This looks like a simple MSDos error. The space per> > > between Program and per> > > Files is per> > > per> > > > not parsed correctly. I have no Windows 2000 to per> > > experience with, but per> > > > brobably you can per> > > per> > > > put erlc in a different path and see if the per> > > problem remains. per> > > > per> > > per> > > > /Thomas per> > > per> > > > per> > > per> > > > per> > > per> > > > --- per> > > per> > > > FMICS 03, June 5-7 in Trondheim. per> > > per> > > > Call for papers: per> > > http://www.inrialpes.fr/vasy/fmics/workshop-8/ per> > > > per> > > per> > > > per> > > per> > > > Dr Thomas Arts per> > > per> > > > Program Manager per> > > per> > > > Software Engineering and Management per> > > per> > > > IT-university of Gothenburg per> > > per> > > > Box 8718, 402 75 Gothenburg, Sweden per> > > per> > > > per> > > per> > > > Tel +46 31 772 6031 per> > > per> > > > Fax +46 31 772 4899 per> > > per> > > > per> > > per> > > > per> > > per> > > > ----- Original Message ----- per> > > per> > > > From: "Eric Merritt" per> > > per> > > > To: per> > > per> > > > Sent: Saturday, November 09, 2002 11:18 PM per> > > per> > > > Subject: Absolute path when using erlc on windows per> > > errors out. per> > > > per> > > per> > > > per> > > per> > > > > Everyone, per> > > per> > > > > per> > > per> > > > > I have what I hope is a quick question for you per> > > all. per> > > > > It seems that when I use a full path to execute per> > > the per> > > > > erlc command on windows 2000 it errors out. It per> > > works per> > > > > just fine in other cases however. For example if per> > > I use per> > > > > per> > > per> > > > > "C:\Program Files\erl5.2\bin\erlc.exe" per> > > per> > > > > some_erlang_file.erl per> > > per> > > > > per> > > per> > > > > I will get an "erc: Error executing per> > > 'C:\Program':22" per> > > > > per> > > per> > > > > Once again it works fine if I leave the path off per> > > of per> > > > > the erlc command. per> > > per> > > > > per> > > per> > > > > Does anyone have a clue as to why this might be? per> > > per> > > > > per> > > per> > > > > Thanks, per> > > per> > > > > Eric per> > > per> > > > per> > > per> > > > per> > > per> > > per> > ========================================================= per> > > per> > > Per Bergqvist per> > > per> > > Synapse Systems AB per> > > per> > > Phone: +46 709 686 685 per> > > per> > > Email: per@REDACTED per> > > per> > per> > per> > __________________________________________________ per> > Do you Yahoo!? per> > U2 on LAUNCH - Exclusive greatest hits videos per> > http://launch.yahoo.com/u2 per> > per> ========================================================= per> Per Bergqvist per> Synapse Systems AB per> Phone: +46 709 686 685 per> Email: per@REDACTED From Marc.Vanwoerkom@REDACTED Sat Nov 16 00:01:11 2002 From: Marc.Vanwoerkom@REDACTED (Marc Ernst Eddy van Woerkom) Date: Sat, 16 Nov 2002 00:01:11 +0100 (MET) Subject: [freebsd] new erlang related packages In-Reply-To: <20021111164436.T65714-100000@dev1.localdomain.net> (message from Jimmy Olgeni on Mon, 11 Nov 2002 16:47:09 +0100 (CET)) Message-ID: <200211152301.gAFN1BY14584@bonsai.fernuni-hagen.de> Hi! > Just a notice, ports for distel (http://www.bluetail.com/~luke/distel/) > and py_interface (from the erlang contrib archive) are now available > under FreeBSD as devel/distel and devel/py_otp_interface. I installed the latest ports of distel and Erlang on a fresh FreeBSD-CURRENT. Strange thing about that Erlang 9 is that erl -s toolbar doesn't start up that toolbar. With the older 8 version the toolbar worked fine. marc@REDACTED$ erl -s toolbar Erlang (BEAM) emulator version 5.2 [source] [hipe] [threads:0] Eshell V5.2 (abort with ^G) 1> {"init terminating in do_boot",{startup_timeout,toolbar}} init terminating in do_boot () marc@REDACTED The error message comes after a short pause. Any idea? Distel is coming up fine in Emacs 21.2.1, I see the Erlang extended mode and for example tags via M-. seem to work. But -don't kick me- when I get asked for an Erlang node name after hitting C-c C-d l, what am I supposed to answer? localhost gives an error. Do I have to fire up an erlang shell before? I would also suggest to extend the ports in two ways 1. Erlang: A hint that the erlang emacs mode file is hidden below /usr/local/share/lib/erlang would be nice 2. Distel: I would add "Erlang" to the package description, to allow distel to show up in a search result, when one uses the ports search engine over at www.freebsd.org for Erlang apps. Regards, Marc From Marc.Vanwoerkom@REDACTED Sat Nov 16 00:32:05 2002 From: Marc.Vanwoerkom@REDACTED (Marc Ernst Eddy van Woerkom) Date: Sat, 16 Nov 2002 00:32:05 +0100 (MET) Subject: [freebsd] new erlang related packages Message-ID: <200211152332.gAFNW5318266@bonsai.fernuni-hagen.de> > But -don't kick me- when I get asked for an Erlang node > name after hitting C-c C-d l, what am I supposed to > answer? localhost gives an error. > Do I have to fire up an erlang shell before? OK, I tried marc@REDACTED$ erl -name test Erlang (BEAM) emulator version 5.2 [source] [hipe] [threads:0] Eshell V5.2 (abort with ^G) (test@REDACTED)1> And in Emacs C-c C-d l and then "test@REDACTED" as node name. Note that my home system is only connected via ppp to the net, not having a real domain (something resolvable by DNS). This seems to fail: >> REG_SEND: [TYPE erl-pid distel@REDACTED 14 0 0] rex [[TYPE erl-pid distel@REDACTED 14 0 0] [call distel rpc_entry (distel process_list nil) [TYPE erl-pid distel@REDACTED 1 0 0]]] << SEND: [TYPE erl-pid distel@REDACTED 14 0 0] [rex [badrpc [EXIT [undef ([distel rpc_entry (distel process_list nil)] [rpc -handle_call/3-fun-0- 6])]]]] Any ideas? Regards, Marc From kent@REDACTED Sat Nov 16 01:13:47 2002 From: kent@REDACTED (Kent Boortz) Date: 16 Nov 2002 01:13:47 +0100 Subject: [freebsd] new erlang related packages In-Reply-To: <200211152301.gAFN1BY14584@bonsai.fernuni-hagen.de> References: <200211152301.gAFN1BY14584@bonsai.fernuni-hagen.de> Message-ID: > Strange thing about that Erlang 9 is that > > erl -s toolbar > > doesn't start up that toolbar. With the older 8 version the toolbar > worked fine. Do you have the Tcl/Tk "wish" program, version 8.3 or later, in our path? We no longer include the Tcl/Tk sources in the Erlang source distribution, kent From olgeni@REDACTED Sat Nov 16 01:32:12 2002 From: olgeni@REDACTED (Jimmy Olgeni) Date: Sat, 16 Nov 2002 01:32:12 +0100 (CET) Subject: [freebsd] new erlang related packages In-Reply-To: <200211152301.gAFN1BY14584@bonsai.fernuni-hagen.de> Message-ID: <20021116012910.R20684-100000@olgeni.olgeni> Hi! On Sat, 16 Nov 2002, Marc Ernst Eddy van Woerkom wrote: > The error message comes after a short pause. > Any idea? No clue here, looks fine on -stable. Which tcl/wish package are you using? > 1. Erlang: A hint that the erlang emacs mode file is > hidden below /usr/local/share/lib/erlang would be nice Done :) > 2. Distel: I would add "Erlang" to the package description, > to allow distel to show up in a search result, when one > uses the ports search engine over at www.freebsd.org > for Erlang apps. The distel port already has erlang references in both comment and description, but "make search" doesn't pick it up because it's a recent addition. Maybe the search engine uses the same index, that would be a good reason for not finding it :) You may try to check if the search works after the next ports/INDEX commit. -- jimmy From olgeni@REDACTED Sat Nov 16 01:35:55 2002 From: olgeni@REDACTED (Jimmy Olgeni) Date: Sat, 16 Nov 2002 01:35:55 +0100 (CET) Subject: [freebsd] new erlang related packages In-Reply-To: <200211152332.gAFNW5318266@bonsai.fernuni-hagen.de> Message-ID: <20021116013227.M20684-100000@olgeni.olgeni> On Sat, 16 Nov 2002, Marc Ernst Eddy van Woerkom wrote: > >> REG_SEND: [TYPE erl-pid distel@REDACTED 14 0 0] rex [[TYPE erl-pid distel@REDACTED 14 0 0] [call distel rpc_entry (distel process_list nil) [TYPE erl-pid distel@REDACTED 1 0 0]]] > << SEND: [TYPE erl-pid distel@REDACTED 14 0 0] [rex [badrpc [EXIT [undef ([distel rpc_entry (distel process_list nil)] [rpc -handle_call/3-fun-0- 6])]]]] > Any ideas? I'd try with "erl -sname somename" and using "somename@REDACTED" as the node name, if you have "remotehost" in your /etc/hosts file. Also "erl -name somename" and "somename@REDACTED" (numeric address) should work (but I tried with 127.0.0.1 so it may not actually work...) -- jimmy From olgeni@REDACTED Sat Nov 16 01:50:37 2002 From: olgeni@REDACTED (Jimmy Olgeni) Date: Sat, 16 Nov 2002 01:50:37 +0100 (CET) Subject: freebsd binaries available Message-ID: <20021116014204.I37504-100000@olgeni.olgeni> Hello, Until it shows up in the official ftp server, you can find the R9B binary package (for RELENG_4) here: 'http://bento.freebsd.org/errorlogs/packages-4-latest/All/erlang-9.0_1.tgz' (threading + HiPE) PDF docs: 'http://bento.freebsd.org/errorlogs/packages-4-latest/All/erlang-doc-9.0.tgz' And more fun :) 'http://bento.freebsd.org/errorlogs/packages-4-latest/All/distel-3.1_1.tgz' 'http://bento.freebsd.org/errorlogs/packages-4-latest/All/py_otp_interface-0.91.tgz' Port sources are here: http://www.freebsd.org/ports/lang.html#erlang-9.0 (will be 9.0_1 as soon as the index is updated) http://www.freebsd.org/ports/lang.html#erlang-doc-9.0 -- jimmy From tomaskuhn@REDACTED Sat Nov 16 09:24:12 2002 From: tomaskuhn@REDACTED (=?iso-8859-1?q?Tomas=20Kuhn?=) Date: Sat, 16 Nov 2002 09:24:12 +0100 (CET) Subject: XML-RPC Message-ID: <20021116082412.20484.qmail@web21501.mail.yahoo.com> Hi, It seems that Erlang has no support for XML-RPC? www.xml-rpc.org lists all know XML-RPC implementations and Erlang is sadly missing. :-( I may be capable of rolling my own XML-RPC package. A verifying XML parser would be helpful/time effective in that case. Could not find such a beast either. So much to do and so little time. I am stuck with Java it seems. :-) At least my employer will be happy. Kind regards /Tomas _____________________________________________________ Gratis e-mail resten av livet p? www.yahoo.se/mail Busenkelt! From mickael.remond@REDACTED Sat Nov 16 11:24:04 2002 From: mickael.remond@REDACTED (Mickael Remond) Date: Sat, 16 Nov 2002 11:24:04 +0100 Subject: XML-RPC In-Reply-To: <20021116082412.20484.qmail@web21501.mail.yahoo.com> References: <20021116082412.20484.qmail@web21501.mail.yahoo.com> Message-ID: <200211161124.04529.mickael.remond@erlang-fr.org> Le Samedi 16 Novembre 2002 09:24, Tomas Kuhn a ?crit : > Hi, > It seems that Erlang has no support for XML-RPC? www.xml-rpc.org lists > all know XML-RPC implementations and Erlang is sadly missing. :-( > > I may be capable of rolling my own XML-RPC package. A verifying XML > parser would be helpful/time effective in that case. Could not find > such > a beast either. So much to do and so little time. > > I am stuck with Java it seems. :-) At least my employer will be happy. Maybe you can search the SOAP implementation made for the IDEALX company. If you plan to use it, please tell me. I have some unreleased modifications. (I will releaese them, but did not have time to do so, yet). Cheers, -- Micka?l R?mond http://www.erlang-fr.org/ From etxuwig@REDACTED Sat Nov 16 22:41:45 2002 From: etxuwig@REDACTED (Ulf Wiger) Date: Sat, 16 Nov 2002 22:41:45 +0100 (MET) Subject: XML-RPC In-Reply-To: <20021116082412.20484.qmail@web21501.mail.yahoo.com> Message-ID: On Sat, 16 Nov 2002, Tomas Kuhn wrote: >Hi, >It seems that Erlang has no support for XML-RPC? www.xml-rpc.org lists >all know XML-RPC implementations and Erlang is sadly missing. :-( > >I may be capable of rolling my own XML-RPC package. A >verifying XML parser would be helpful/time effective in >that case. Could not find such a beast either. So much to >do and so little time. Try Joe Armstrong's interface to the Edinburgh LT XML toolkit. It should do verification: http://www.erlang.org/user.html#xml_lt-2.0 I also know that Johan Blom used to work on a verifying extension to xmerl (http://sowap.sourceforge.net, or on http://www.erlang.org/user.html#xmerl-0.17). I don't think he finished it, though. It would be great if you could jump in and help out with XML-RPC. There should of course be support for it in Erlang. /Uffe -- Ulf Wiger, Senior Specialist, / / / Architecture & Design of Carrier-Class Software / / / Strategic Product & System Management / / / Ericsson Telecom AB, ATM Multiservice Networks From garry@REDACTED Sun Nov 17 02:52:57 2002 From: garry@REDACTED (Garrett G. Hodgson) Date: Sat, 16 Nov 2002 20:52:57 -0500 Subject: XML-RPC Message-ID: <200211170152.gAH1qv421401@kestrel.sage.att.com> we built an xml-rpc server on top of pico, using xmerl for the xml parsing. took a couple of days for a relative erlang newbie. i would donate it back, but i fear it'd take more time wrangling with my company's legal department than it would take someone else to write a better one. if there's real interest, i could take a look at what it would take to allow release. From luke@REDACTED Mon Nov 18 11:20:07 2002 From: luke@REDACTED (Luke Gorrie) Date: 18 Nov 2002 11:20:07 +0100 Subject: [freebsd] new erlang related packages In-Reply-To: <200211152332.gAFNW5318266@bonsai.fernuni-hagen.de> References: <200211152332.gAFNW5318266@bonsai.fernuni-hagen.de> Message-ID: Marc Ernst Eddy van Woerkom writes: > > But -don't kick me- when I get asked for an Erlang node > > name after hitting C-c C-d l, what am I supposed to > > answer? localhost gives an error. I see you've already figured this out, but anyway - you should give an Erlang node name - the same name that "node()" returns on the node you want to connect to. If you give just a name with no host (like "foo" instead of "foo@REDACTED"), then the name of the local machine is automatically added on. > > Do I have to fire up an erlang shell before? > > OK, I tried > > marc@REDACTED$ erl -name test > Erlang (BEAM) emulator version 5.2 [source] [hipe] [threads:0] > > Eshell V5.2 (abort with ^G) > (test@REDACTED)1> > > And in Emacs C-c C-d l and then "test@REDACTED" > as node name. Note that my home system is only connected > via ppp to the net, not having a real domain (something > resolvable by DNS). > > This seems to fail: > > >> REG_SEND: [TYPE erl-pid distel@REDACTED 14 0 0] rex [[TYPE erl-pid distel@REDACTED 14 0 0] [call distel rpc_entry (distel process_list nil) [TYPE erl-pid distel@REDACTED 1 0 0]]] > << SEND: [TYPE erl-pid distel@REDACTED 14 0 0] [rex [badrpc [EXIT [undef ([distel rpc_entry (distel process_list nil)] [rpc -handle_call/3-fun-0- 6])]]]] > > Any ideas? Ok, this is not so readable, but it is actually a Lisp'ification of an Erlang EXIT signal. The important part is: [badrpc [EXIT [undef ([distel rpc_entry (distel process_list nil)] [rpc -handle_call/3-fun-0- 6])]]] Meaning it tried to call distel:rpc_entry/3 on the remote node but it was undefined. The trick is that most of Distel's erlang-extended-mode commands want to make RPCs to the erlang module 'distel'. The install procedure copies this module into /usr/local/share/distel/ebin/ and then patches your ~/.erlang to automatically put it in your load path, so that all your nodes can find it. The downside of doing that automatically is that it's not obvious that you need to also install distel (or at least copy the modules distel and distel_ie into your code path) onto other machines that run nodes you want to talk with. Basically, most Distel programs are written half in Erlang and half in Elisp, and the "distel" module contains the Erlang halves. Cheers, Luke From bjorn@REDACTED Mon Nov 18 11:37:07 2002 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 18 Nov 2002 11:37:07 +0100 Subject: missing banner on Solaris In-Reply-To: Vance Shipley's message of "Wed, 13 Nov 2002 10:57:18 -0500" References: <200211131604.RAA28261@harpo.it.uu.se> <20021113155718.GD65353@frogman.motivity.ca> Message-ID: Vance Shipley writes: > Kostis, > > Hmmm... I only built the shared heap version because I understood > it would only add an optional version of the emulator which I > could use if and when I was ready to play with it. If there is > no -noshared type of switch I guess I should rebuild it. > > Obviously there is some mismatch between what has been documented > and also implemented in erlexec.c and what gets installed. What > is the long term intention? The documentation refers to the commercial package. We well probably fix this this mismatch in the next major release of Erlang/OTP. If you build the shared heap version version first, install it, renames the .../lib/erlang/erts-5.2/bin/beam to .../lib/erlang/erts-5.2/bin/beam.shared then builds the standard version and installs it, it should work according to the documentation. /Bjorn -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 +46 8 727 56 87 125 25 ?lvsj? From svg@REDACTED Mon Nov 18 23:29:44 2002 From: svg@REDACTED (Vladimir Sekissov) Date: Tue, 19 Nov 2002 03:29:44 +0500 (YEKT) Subject: Very strange bug Message-ID: <20021119.032944.60470805.svg@surnet.ru> Good day, I've discovered a very strange (for me) bug when I'm starting Erlang with clean boot without sasl. Lets explain by example: $ /usr/local/bin/erl Eshell V5.2 (abort with ^G) 1> m(file). Module file compiled: Date: October 24 2002, Time: 11.26 Compiler options: [v3, debug_info, {i,"../include"}, {outdir,"../ebin"}, {cwd,"/usr/local/src/otp_src_R9B-0/lib/kernel/src"}] Object file: /usr/local/lib/erlang/lib/kernel-2.8.0/ebin/file.beam Exports: ... skipped... eval/1 read/2 file_info/1 read_file/1 format_error/1 read_file_info/1 ... skipped... 2> file:read_file("./www/HEAD"). {ok, ...} 3> yaws:start(). =INFO REPORT==== 19-Nov-2002::02:57:09 === Using config file /home/svg/yaws.conf =INFO REPORT==== 19-Nov-2002::02:57:09 === Listening to 127.0.0.1:8000 for servers ["localhost:8000"] ok 4> m(file). ... skipped... eval/1 rawopen/2 file_info/1 read/2 format_error/1 read_file_info/1 get_cwd/0 read_link/1 ... skipped... 5> file:read_file("./www/HEAD"). ** exited: {undef,[{file,read_file, ["./www/HEAD"]}, {erl_eval,expr,3}, {erl_eval,exprs,4}, {shell,eval_loop,2}]} ** As you can see in second output of m(file) declaration of read_file/1 is absent and function is not available. When I'm starting Erlang with sasl all is ok. Can somebody point me to the cause of the problem. The system is GentooLinux-1.4/GCC-3.1/kernel-2.4.19 Best Regards, Vladimir Sekissov From vances@REDACTED Wed Nov 20 05:33:40 2002 From: vances@REDACTED (Vance Shipley) Date: Tue, 19 Nov 2002 23:33:40 -0500 Subject: problems compiling H.323 ASN.1 Message-ID: <20021120043340.GC81704@frogman.motivity.ca> I've been trying out the ASN.1 compiler for the first time and have had it failing on some ITU ASN.1 files for H.323. I am wondering whether the files I have are incorrect or whether there is a bug in the compiler. The problem seems to be the comment on line 139: manufacturerCode INTEGER(0..65535) -- assigned -- -- nationally} It's not seeing the "}" 'cause it comes at the end of the comment. Moving the "}" down one line fixes the problem. There are a bunch of these that all need the same fix. Is this bad ASN.1 or bad parsing? -Vance http://www.itu.int/ITU-T/asn1/database/itu-t/h/h245/2001/MULTIMEDIA-SYSTEM-CONTROL.asn Erlang (BEAM) emulator version 5.2 [64-bit] [source] [shared heap] [threads:10] Eshell V5.2 (abort with ^G) 1> asn1ct:compile("MULTIMEDIA-SYSTEM-CONTROL.asn"). Erlang ASN.1 version "1.4" compiling "MULTIMEDIA-SYSTEM-CONTROL.asn" Compiler Options: [] syntax error at line 145 in module MULTIMEDIA-SYSTEM-CONTROL.asn: got 'MasterSlaveDetermination' expected '}' {error,[got,'MasterSlaveDetermination',expected,'}']} From vances@REDACTED Wed Nov 20 06:14:45 2002 From: vances@REDACTED (Vance Shipley) Date: Wed, 20 Nov 2002 00:14:45 -0500 Subject: problems compiling H.323 ASN.1 In-Reply-To: <20021120043340.GC81704@frogman.motivity.ca> References: <20021120043340.GC81704@frogman.motivity.ca> Message-ID: <20021120051445.GD81704@frogman.motivity.ca> After fixing the other problems I am left with the following. I see the reason as not_implemented. What is it that is not implemented? -Vance 9> asn1ct:compile("H323-MESSAGES.asn"). Erlang ASN.1 version "1.4" compiling "H323-MESSAGES.asn" Compiler Options: [] asn1error:13:'H323-MESSAGES':'H323-UserInformation' {asn1, {not_implemented, {merge_constraints, [{'PermittedAlphabet', {'SingleValue', "#*0123456789abc"}}]}}} asn1error:706:'H323-MESSAGES':'GSM-UIM' {asn1, {not_implemented, {merge_constraints, [{'PermittedAlphabet', {'SingleValue', "#*0123456789abc"}}]}}} {error,{asn1,[{error,{type,13, 'H323-MESSAGES', 'H323-UserInformation', {asn1,{not_implemented, {merge_constraints, [{'PermittedAlphabet', {'SingleValue', "#*0123456789abc"}}]}}}}}, {error,{type,706, 'H323-MESSAGES', 'GSM-UIM', {asn1,{not_implemented, {merge_constraints, [{'PermittedAlphabet', {'SingleValue', "#*0123456789abc"}}]}}}}}]}} From comsianpro@REDACTED Wed Nov 20 08:30:04 2002 From: comsianpro@REDACTED (ghulam mujtaba) Date: Wed, 20 Nov 2002 12:30:04 +0500 Subject: a question about tcp/ip stack Message-ID: hello we are the group of MCS students and we want to do TCP/IP stack generalization(means that in a LAN we have differents MAC addresses and now if we want to add tcp/ip support). and also compatibility for all the devices for that tcp/ip stack. we hope that u will response as quickly as u can. FROM MCS GROUP pray for the power equal to your task. _________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From robert.virding@REDACTED Wed Nov 20 10:00:18 2002 From: robert.virding@REDACTED (Robert Virding) Date: Wed, 20 Nov 2002 10:00:18 +0100 Subject: Very strange bug References: <20021119.032944.60470805.svg@surnet.ru> Message-ID: <006101c29073$4070d390$9000000a@tranet.fmv.se> ----- Original Message ----- From: "Vladimir Sekissov" To: Sent: Monday, November 18, 2002 11:29 PM Subject: Very strange bug > Good day, > > I've discovered a very strange (for me) bug when I'm starting Erlang > with clean boot without sasl. > > Lets explain by example: > > $ /usr/local/bin/erl > > Eshell V5.2 (abort with ^G) > 1> m(file). > > Module file compiled: Date: October 24 2002, Time: 11.26 > Compiler options: [v3, > debug_info, > {i,"../include"}, > {outdir,"../ebin"}, > {cwd,"/usr/local/src/otp_src_R9B-0/lib/kernel/src"}] > Object file: /usr/local/lib/erlang/lib/kernel-2.8.0/ebin/file.beam > Exports: > ... skipped... > eval/1 read/2 > file_info/1 read_file/1 > format_error/1 read_file_info/1 > ... skipped... > > 2> file:read_file("./www/HEAD"). > {ok, ...} > > 3> yaws:start(). > > =INFO REPORT==== 19-Nov-2002::02:57:09 === > Using config file /home/svg/yaws.conf > =INFO REPORT==== 19-Nov-2002::02:57:09 === > Listening to 127.0.0.1:8000 for servers ["localhost:8000"] > ok > > 4> m(file). > ... skipped... > eval/1 rawopen/2 > file_info/1 read/2 > format_error/1 read_file_info/1 > get_cwd/0 read_link/1 > ... skipped... > > 5> file:read_file("./www/HEAD"). > ** exited: {undef,[{file,read_file, > ["./www/HEAD"]}, > {erl_eval,expr,3}, > {erl_eval,exprs,4}, > {shell,eval_loop,2}]} ** > > > As you can see in second output of m(file) declaration of read_file/1 > is absent and function is not available. > > When I'm starting Erlang with sasl all is ok. > > Can somebody point me to the cause of the problem. > > The system is GentooLinux-1.4/GCC-3.1/kernel-2.4.19 > > Best Regards, > Vladimir Sekissov One questio I have if it is the SAME module file? You don't give all the module info for the second time. Yaws might load a new file. I don't know why though. If they do write to klacke. Robert From klacke@REDACTED Wed Nov 20 10:33:04 2002 From: klacke@REDACTED (Klacke) Date: Wed, 20 Nov 2002 10:33:04 +0100 Subject: Very strange bug In-Reply-To: <20021119.032944.60470805.svg@surnet.ru>; from svg@surnet.ru on Tue, Nov 19, 2002 at 03:29:44AM +0500 References: <20021119.032944.60470805.svg@surnet.ru> Message-ID: <20021120103304.B29892@bluetail.com> On Tue, Nov 19, 2002 at 03:29:44AM +0500, Vladimir Sekissov wrote: > Good day, > > I've discovered a very strange (for me) bug when I'm starting Erlang > with clean boot without sasl. > > Lets explain by example: > > $ /usr/local/bin/erl > > Eshell V5.2 (abort with ^G) > 1> m(file). > > Module file compiled: Date: October 24 2002, Time: 11.26 > Compiler options: [v3, > debug_info, > {i,"../include"}, > {outdir,"../ebin"}, > {cwd,"/usr/local/src/otp_src_R9B-0/lib/kernel/src"}] > Object file: /usr/local/lib/erlang/lib/kernel-2.8.0/ebin/file.beam > Exports: > ... skipped... > eval/1 read/2 > file_info/1 read_file/1 > format_error/1 read_file_info/1 > ... skipped... > > 2> file:read_file("./www/HEAD"). > {ok, ...} > > 3> yaws:start(). > > =INFO REPORT==== 19-Nov-2002::02:57:09 === > Using config file /home/svg/yaws.conf > =INFO REPORT==== 19-Nov-2002::02:57:09 === > Listening to 127.0.0.1:8000 for servers ["localhost:8000"] > ok > > 4> m(file). > ... skipped... > eval/1 rawopen/2 > file_info/1 read/2 > format_error/1 read_file_info/1 > get_cwd/0 read_link/1 > ... skipped... > > 5> file:read_file("./www/HEAD"). > ** exited: {undef,[{file,read_file, > ["./www/HEAD"]}, > {erl_eval,expr,3}, > {erl_eval,exprs,4}, > {shell,eval_loop,2}]} ** > > > As you can see in second output of m(file) declaration of read_file/1 > is absent and function is not available. > > When I'm starting Erlang with sasl all is ok. > > Can somebody point me to the cause of the problem. > > The system is GentooLinux-1.4/GCC-3.1/kernel-2.4.19 > Ultra weird ... what's in your .erlang does it happen if you start erlang as # /usr/local/bin/yaws -i as well ?? /klacke -- Claes Wikstrom -- Caps lock is nowhere and Alteon WebSystems -- everything is under control http://www.bluetail.com/~klacke cellphone: +46 70 2097763 From bertil.karlsson@REDACTED Wed Nov 20 10:44:08 2002 From: bertil.karlsson@REDACTED (Bertil Karlsson) Date: Wed, 20 Nov 2002 10:44:08 +0100 Subject: problems compiling H.323 ASN.1 References: <20021120043340.GC81704@frogman.motivity.ca> Message-ID: <3DDB5968.5A3324FA@uab.ericsson.se> Vance Shipley wrote: > > I've been trying out the ASN.1 compiler for the first time and have > had it failing on some ITU ASN.1 files for H.323. I am wondering > whether the files I have are incorrect or whether there is a bug in > the compiler. > > The problem seems to be the comment on line 139: > > manufacturerCode INTEGER(0..65535) -- assigned -- > -- nationally} > > It's not seeing the "}" 'cause it comes at the end of the comment. > Moving the "}" down one line fixes the problem. > > There are a bunch of these that all need the same fix. Is this bad > ASN.1 or bad parsing? It's bad ASN.1 and correct parsing. A double hyphen, '--' comments to the end of the line or to the next double hyphen. Thus the "}" above is accidentally hidden by the comment, unfortunately this is a rather common error in ASN.1 standard specs. > > -Vance > > http://www.itu.int/ITU-T/asn1/database/itu-t/h/h245/2001/MULTIMEDIA-SYSTEM-CONTROL.asn > > Erlang (BEAM) emulator version 5.2 [64-bit] [source] [shared heap] [threads:10] > > Eshell V5.2 (abort with ^G) > 1> asn1ct:compile("MULTIMEDIA-SYSTEM-CONTROL.asn"). > Erlang ASN.1 version "1.4" compiling "MULTIMEDIA-SYSTEM-CONTROL.asn" > Compiler Options: [] > syntax error at line 145 in module MULTIMEDIA-SYSTEM-CONTROL.asn: > got 'MasterSlaveDetermination' expected '}' > {error,[got,'MasterSlaveDetermination',expected,'}']} -- / Bertil Karlsson From svg@REDACTED Wed Nov 20 11:16:25 2002 From: svg@REDACTED (Vladimir Sekissov) Date: Wed, 20 Nov 2002 15:16:25 +0500 (YEKT) Subject: Very strange bug In-Reply-To: <006101c29073$4070d390$9000000a@tranet.fmv.se> References: <20021119.032944.60470805.svg@surnet.ru> <006101c29073$4070d390$9000000a@tranet.fmv.se> Message-ID: <20021120.151625.39499503.svg@surnet.ru> Good day, robert.virding> One questio I have if it is the SAME module file? You don't give all robert.virding> the module info for the second time. Yaws might load a new file. I robert.virding> don't know why though. If they do write to klacke. Yes, it is the same module file. As I mentioned the problem doesn't appear if sasl has been booted before yaws. Best Regards, Vladimir Sekissov robert.virding> ----- Original Message ----- robert.virding> From: "Vladimir Sekissov" robert.virding> To: robert.virding> Sent: Monday, November 18, 2002 11:29 PM robert.virding> Subject: Very strange bug robert.virding> robert.virding> robert.virding> > Good day, robert.virding> > robert.virding> > I've discovered a very strange (for me) bug when I'm starting Erlang robert.virding> > with clean boot without sasl. robert.virding> > robert.virding> > Lets explain by example: robert.virding> > robert.virding> > $ /usr/local/bin/erl robert.virding> > robert.virding> > Eshell V5.2 (abort with ^G) robert.virding> > 1> m(file). robert.virding> > robert.virding> > Module file compiled: Date: October 24 2002, Time: 11.26 robert.virding> > Compiler options: [v3, robert.virding> > debug_info, robert.virding> > {i,"../include"}, robert.virding> > {outdir,"../ebin"}, robert.virding> > {cwd,"/usr/local/src/otp_src_R9B-0/lib/kernel/src"}] robert.virding> > Object file: /usr/local/lib/erlang/lib/kernel-2.8.0/ebin/file.beam robert.virding> > Exports: robert.virding> > ... skipped... robert.virding> > eval/1 read/2 robert.virding> > file_info/1 read_file/1 robert.virding> > format_error/1 read_file_info/1 robert.virding> > ... skipped... robert.virding> > robert.virding> > 2> file:read_file("./www/HEAD"). robert.virding> > {ok, ...} robert.virding> > robert.virding> > 3> yaws:start(). robert.virding> > robert.virding> > =INFO REPORT==== 19-Nov-2002::02:57:09 === robert.virding> > Using config file /home/svg/yaws.conf robert.virding> > =INFO REPORT==== 19-Nov-2002::02:57:09 === robert.virding> > Listening to 127.0.0.1:8000 for servers ["localhost:8000"] robert.virding> > ok robert.virding> > robert.virding> > 4> m(file). robert.virding> > ... skipped... robert.virding> > eval/1 rawopen/2 robert.virding> > file_info/1 read/2 robert.virding> > format_error/1 read_file_info/1 robert.virding> > get_cwd/0 read_link/1 robert.virding> > ... skipped... robert.virding> > robert.virding> > 5> file:read_file("./www/HEAD"). robert.virding> > ** exited: {undef,[{file,read_file, robert.virding> > ["./www/HEAD"]}, robert.virding> > {erl_eval,expr,3}, robert.virding> > {erl_eval,exprs,4}, robert.virding> > {shell,eval_loop,2}]} ** robert.virding> > robert.virding> > robert.virding> > As you can see in second output of m(file) declaration of read_file/1 robert.virding> > is absent and function is not available. robert.virding> > robert.virding> > When I'm starting Erlang with sasl all is ok. robert.virding> > robert.virding> > Can somebody point me to the cause of the problem. robert.virding> > robert.virding> > The system is GentooLinux-1.4/GCC-3.1/kernel-2.4.19 robert.virding> > robert.virding> > Best Regards, robert.virding> > Vladimir Sekissov robert.virding> From svg@REDACTED Wed Nov 20 11:28:49 2002 From: svg@REDACTED (Vladimir Sekissov) Date: Wed, 20 Nov 2002 15:28:49 +0500 (YEKT) Subject: Very strange bug In-Reply-To: <20021120103304.B29892@bluetail.com> References: <20021119.032944.60470805.svg@surnet.ru> <20021120103304.B29892@bluetail.com> Message-ID: <20021120.152849.20960470.svg@surnet.ru> Good day, klacke> Ultra weird ... what's in your .erlang klacke> klacke> does it happen if you start erlang as klacke> klacke> # /usr/local/bin/yaws -i klacke> klacke> as well ?? My ~/.erlang is clean. I found this problem first time when I'd tried to start yaws: $ ./yaws -i and got and error trying to load demo site. I'm now starting erl as 'erl -boot start_sasl ....' and haven't any problem. May be somebody who knows distinction between 'sasl' and 'clean' code loading can clarify the problem. Best Regards, Vladimir Sekissov klacke> On Tue, Nov 19, 2002 at 03:29:44AM +0500, Vladimir Sekissov wrote: klacke> > Good day, klacke> > klacke> > I've discovered a very strange (for me) bug when I'm starting Erlang klacke> > with clean boot without sasl. klacke> > klacke> > Lets explain by example: klacke> > klacke> > $ /usr/local/bin/erl klacke> > klacke> > Eshell V5.2 (abort with ^G) klacke> > 1> m(file). klacke> > klacke> > Module file compiled: Date: October 24 2002, Time: 11.26 klacke> > Compiler options: [v3, klacke> > debug_info, klacke> > {i,"../include"}, klacke> > {outdir,"../ebin"}, klacke> > {cwd,"/usr/local/src/otp_src_R9B-0/lib/kernel/src"}] klacke> > Object file: /usr/local/lib/erlang/lib/kernel-2.8.0/ebin/file.beam klacke> > Exports: klacke> > ... skipped... klacke> > eval/1 read/2 klacke> > file_info/1 read_file/1 klacke> > format_error/1 read_file_info/1 klacke> > ... skipped... klacke> > klacke> > 2> file:read_file("./www/HEAD"). klacke> > {ok, ...} klacke> > klacke> > 3> yaws:start(). klacke> > klacke> > =INFO REPORT==== 19-Nov-2002::02:57:09 === klacke> > Using config file /home/svg/yaws.conf klacke> > =INFO REPORT==== 19-Nov-2002::02:57:09 === klacke> > Listening to 127.0.0.1:8000 for servers ["localhost:8000"] klacke> > ok klacke> > klacke> > 4> m(file). klacke> > ... skipped... klacke> > eval/1 rawopen/2 klacke> > file_info/1 read/2 klacke> > format_error/1 read_file_info/1 klacke> > get_cwd/0 read_link/1 klacke> > ... skipped... klacke> > klacke> > 5> file:read_file("./www/HEAD"). klacke> > ** exited: {undef,[{file,read_file, klacke> > ["./www/HEAD"]}, klacke> > {erl_eval,expr,3}, klacke> > {erl_eval,exprs,4}, klacke> > {shell,eval_loop,2}]} ** klacke> > klacke> > klacke> > As you can see in second output of m(file) declaration of read_file/1 klacke> > is absent and function is not available. klacke> > klacke> > When I'm starting Erlang with sasl all is ok. klacke> > klacke> > Can somebody point me to the cause of the problem. klacke> > klacke> > The system is GentooLinux-1.4/GCC-3.1/kernel-2.4.19 klacke> > klacke> klacke> klacke> Ultra weird ... what's in your .erlang klacke> klacke> does it happen if you start erlang as klacke> klacke> # /usr/local/bin/yaws -i klacke> klacke> as well ?? klacke> klacke> klacke> /klacke klacke> klacke> -- klacke> Claes Wikstrom -- Caps lock is nowhere and klacke> Alteon WebSystems -- everything is under control klacke> http://www.bluetail.com/~klacke klacke> cellphone: +46 70 2097763 From luke@REDACTED Wed Nov 20 16:00:28 2002 From: luke@REDACTED (Luke Gorrie) Date: 20 Nov 2002 16:00:28 +0100 Subject: a question about tcp/ip stack In-Reply-To: References: Message-ID: "ghulam mujtaba" writes: > hello > we are the group of MCS students and we want to do TCP/IP stack > generalization(means that in a LAN we have differents MAC addresses > and now if we want to add tcp/ip support). > and also compatibility for all the devices for that tcp/ip stack. > > we hope that u will response as quickly as u can. I'm not sure what you're after exactly, but you might be interested in the complete TCP/IP implementation that Torbjorn Tornkvist has done in Erlang. http://www.bluetail.com/wiki/showPage?node=ErlangTCP - it runs directly on top of ethernet and implements ARP and so on. Cheers, Luke From spectorhome@REDACTED Wed Nov 20 17:39:40 2002 From: spectorhome@REDACTED (Robert Spector) Date: Wed, 20 Nov 2002 11:39:40 -0500 Subject: MacOS X? [newbie Q.] Message-ID: <002501c290b3$6c419be0$0201000a@oemcomputer> Hi all, I've recently taken up Erlang in the spirit of widening my background (which is mostly Java, w/some elisp and C), inspired by Joe Armstrong's recent talk at LL2 (Boston). I downloaded R9 to run on Win2k, read the 4-day course and Concurrent Programming Erlang Part 1 (pdf), and have enjoyed the experience so far. Ulf Wiger helped me out with some points already, and directed me to this list. My main interest is to experiment w/the distributed aspects. I have several MacOS X (10.2 "Jaguar") boxen, but it appears that the last attempt to get Erlang running there is almost 2 years old, with no reference on the download page. Can anybody point me to a compatible implementation, that I can run against an R9 node. Or, would this require me to attempt to build it myself (no experience in porting to a Mac)? Thanks in advance, Robert From jamesh@REDACTED Wed Nov 20 23:43:33 2002 From: jamesh@REDACTED (James Hague) Date: Wed, 20 Nov 2002 16:43:33 -0600 Subject: Tail recursion modulo cons Message-ID: This is a compiler optimization that effectively makes functions like the following tail recursive: map(F, [H|T]) -> [F(H)|map(F, T)]; map(_, []) -> []. What's nice about this is that you can avoid the unintiuitive "accumulator + big reverse at the end" technique if you want a function to execute in constant space (and it's easier to explain as well). As D.H. Warren introduced this, I'm assuming it's fairly common in Prolog compilers. It's implemented in the compiler for Mercury (also a logic language). Has anyone ever looked into this for Erlang? http://burks.brighton.ac.uk/burks/foldoc/12/115.htm From hakan.stenholm@REDACTED Thu Nov 21 00:28:35 2002 From: hakan.stenholm@REDACTED (=?ISO-8859-1?Q?H=E5kan_Stenholm?=) Date: Thu, 21 Nov 2002 00:28:35 +0100 Subject: MacOS X? [newbie Q.] In-Reply-To: <002501c290b3$6c419be0$0201000a@oemcomputer> Message-ID: Go to http://www.erlang.org/download.html and download the source (the latest version) - you'll need to read the Readme file (I attached it here so you can read how you are supposed to unpack the source). -------------- next part -------------- A non-text attachment was scrubbed... Name: README Type: application/octet-stream Size: 9031 bytes Desc: not available URL: -------------- next part -------------- It should be noted that gs - the gui lib, isn't quite working yet. Note: tk must also be downloaded separately (check sourceforge) if you want to poke around with gs. On onsdag, nov 20, 2002, at 17:39 Europe/Stockholm, Robert Spector wrote: > Hi all, > > I've recently taken up Erlang in the spirit of widening my > background (which is mostly Java, w/some elisp and C), > inspired by Joe Armstrong's recent talk at LL2 (Boston). > > I downloaded R9 to run on Win2k, read the 4-day course > and Concurrent Programming Erlang Part 1 (pdf), and > have enjoyed the experience so far. Ulf Wiger helped me > out with some points already, and directed me to this > list. > > My main interest is to experiment w/the distributed aspects. > I have several MacOS X (10.2 "Jaguar") boxen, but it > appears that the last attempt to get Erlang running there > is almost 2 years old, with no reference on the download page. > > Can anybody point me to a compatible implementation, > that I can run against an R9 node. Or, would this require me > to attempt to build it myself (no experience in porting to a Mac)? > > Thanks in advance, > > Robert > From ahltorp@REDACTED Thu Nov 21 03:52:59 2002 From: ahltorp@REDACTED (Magnus Ahltorp) Date: Thu, 21 Nov 2002 03:52:59 +0100 Subject: Hexadecimal conversions Message-ID: <58697114-FCFC-11D6-8C81-000393915E94@nada.kth.se> I have used my own to/from hex string converter several years now, but as I was trying to clean up my code, I wanted to get rid of it. Is there a built-in hex string converter in Erlang? I've tried to look around, but I've never found one. /Magnus From vances@REDACTED Thu Nov 21 04:00:28 2002 From: vances@REDACTED (Vance Shipley) Date: Wed, 20 Nov 2002 22:00:28 -0500 Subject: SetOfFiles.set.asn syntax Message-ID: <20021121030028.GB185@frogman.motivity.ca> The documentation for the asn1 compiler details a method for compiling a group of ASN.1 files together into one Erlang module. The Opensource R9B-0 release seems to work a little differently. You need to omit the double quotes in the configuration file. If one wishes to compile a set of Asn1 modules into one Erlang file with encode/decode functions one has to list all involved files in a configuration file. This configuration file must have a double extension ".set.asn", (".asn" can alternatively be ".asn1" or ".py"). The input files' names must be listed, within qoutation marks (""), one at each row in the file. If the input files are File1.asn, File2.asn and File3.asn the configuration file shall look like: "File1.asn" "File2.asn" "File3.asn" From richardc@REDACTED Thu Nov 21 09:52:51 2002 From: richardc@REDACTED (Richard Carlsson) Date: Thu, 21 Nov 2002 09:52:51 +0100 (MET) Subject: Tail recursion modulo cons In-Reply-To: Message-ID: On Wed, 20 Nov 2002, James Hague wrote: > This is a compiler optimization that effectively makes functions like the > following tail recursive: > > map(F, [H|T]) -> > [F(H)|map(F, T)]; > map(_, []) -> []. > > [...] > Has anyone ever looked into this for Erlang? The actual rewriting is not that difficult; in Erlang, it would be something like this (assuming we had a 'set_tail' operation): map(F, [H|T]) -> Cons = [F(H) | []], map(F, T, Cons); map(_, []) -> []. map(F, [H|T], Cons) -> NewCons = [F(H) | []], set_tail(Cons, NewCons), map(F, T, NewCons); map(_, [], Cons) -> set_tail(Cons, []). (Note that the tails of allocated cons cells must be initialised, e.g. to '[]', so that if garbage collection happens during execution, it will not find random bits in the tail. Thus, we get a penalty of an extra write for each cons cell.) The big obstacle for making this work is that the abstract machine and garbage collector must be extended to handle write barriers. Right now, it is necessary that there are never any pointers from an older generation to a younger one. Now suppose a GC happens during execution of the above 'map'. Then, a pre-allocated cons cell could be moved to an older generation. When execution continues, it will allocate a new cons cell on the youngest generation, and insert a pointer from the old cell to the new one. The current garbage collector will not realise that the new cell is live, when the next collection happens. Disaster follows. The quick summary is that it's not just a code transformation, but also requires support in the runtime environment. (It might happen some day, though, since there are several reasons for wanting to have write barriers.) /Richard Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://user.it.uu.se/~richardc/ From matthias@REDACTED Thu Nov 21 10:18:26 2002 From: matthias@REDACTED (Matthias Lang) Date: Thu, 21 Nov 2002 10:18:26 +0100 Subject: Hexadecimal conversions In-Reply-To: <58697114-FCFC-11D6-8C81-000393915E94@nada.kth.se> References: <58697114-FCFC-11D6-8C81-000393915E94@nada.kth.se> Message-ID: <15836.42210.835900.580494@antilipe.corelatus.se> Magnus Ahltorp writes: > I have used my own to/from hex string converter several years now, but > as I was trying to clean up my code, I wanted to get rid of it. > > Is there a built-in hex string converter in Erlang? I've tried to look > around, but I've never found one. No BIF, as far as I know, but as of R9 there's httpd_util:hexlist_to_integer/1 and integer_to_hexlist/1 See http://www.erlang.org/doc/r9b/lib/inets-3.0/doc/html/httpd_util.html Matthias From bertil.karlsson@REDACTED Thu Nov 21 10:23:27 2002 From: bertil.karlsson@REDACTED (Bertil Karlsson) Date: Thu, 21 Nov 2002 10:23:27 +0100 Subject: SetOfFiles.set.asn syntax References: <20021121030028.GB185@frogman.motivity.ca> Message-ID: <3DDCA60F.FE2929D8@uab.ericsson.se> Vance Shipley wrote: > > The documentation for the asn1 compiler details a method for compiling > a group of ASN.1 files together into one Erlang module. The Opensource > R9B-0 release seems to work a little differently. You need to omit the > double quotes in the configuration file. > > If one wishes to compile a set of Asn1 modules into one > Erlang file with encode/decode functions one has to list > all involved files in a configuration file. This > configuration file must have a double extension ".set.asn", > (".asn" can alternatively be ".asn1" or ".py"). The input > files' names must be listed, within qoutation marks (""), > one at each row in the file. If the input files are > File1.asn, File2.asn and File3.asn the configuration file > shall look like: > > "File1.asn" > "File2.asn" > "File3.asn" Yes, you are right. Even the commercial release fails if you do as the documentation says. It's an error and will be updated in the next patch/release. You shall omit the quotation marks in the configuration file, and then it works as it is supposed to do. -- / Bertil Karlsson From eleberg@REDACTED Thu Nov 21 10:55:53 2002 From: eleberg@REDACTED (Bengt Kleberg) Date: Thu, 21 Nov 2002 10:55:53 +0100 (MET) Subject: the newline _character_? Message-ID: <200211210955.gAL9trr10904@cbe.ericsson.se> greetings, characters in erlang are written as $. ie ';' is $; . how do i write newline? not in a string, that would be "\n", but as a character? moreover, is there is_whitespace() function is some module? bengt From Erik.Reitsma@REDACTED Thu Nov 21 11:04:11 2002 From: Erik.Reitsma@REDACTED (Erik Reitsma (ELN)) Date: Thu, 21 Nov 2002 11:04:11 +0100 Subject: the newline _character_? Message-ID: <440A2703A54A8F4FB2AC2AE34F27129D215950@ESEALNT889.al.sw.ericsson.se> > characters in erlang are written as $. ie ';' is $; . > how do i write newline? not in a string, that would be "\n", but as a > character? $\n works for me, both in the shell and in source. *Erik. From richardc@REDACTED Thu Nov 21 11:05:09 2002 From: richardc@REDACTED (Richard Carlsson) Date: Thu, 21 Nov 2002 11:05:09 +0100 (MET) Subject: the newline _character_? In-Reply-To: <200211210955.gAL9trr10904@cbe.ericsson.se> Message-ID: On Thu, 21 Nov 2002, Bengt Kleberg wrote: > characters in erlang are written as $. ie ';' is $; . > how do i write newline? not in a string, that would be "\n", but as a > character? Don't tell me you didn't try this: $\n By the way, a single space character can be produced with $\s which is better than writing an actual space character after the $, since that could get removed by accident by an editor. > moreover, is there is_whitespace() function is some module? I don't think so. /Richard Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://user.it.uu.se/~richardc/ From eedniwe@REDACTED Thu Nov 21 11:07:32 2002 From: eedniwe@REDACTED (Nico Weling) Date: Thu, 21 Nov 2002 11:07:32 +0100 (MET) Subject: the newline _character_? Message-ID: <200211211007.LAA14730@granus165.eed.ericsson.se> Hi Bengt, the character is '\n' This works fine: Eshell V4.9.1 (abort with ^G) 1> $\n. 10 > moreover, is there is_whitespace() function is some module? you can use: case YourCharacter is [32] -> bla bla bla; Regards, Nico. > Date: Thu, 21 Nov 2002 10:55:53 +0100 (MET) > From: Bengt Kleberg > Subject: the newline _character_? > To: erlang-questions@REDACTED > MIME-Version: 1.0 > Content-MD5: 7Pv+Qu1QOecVnPanJNFYxQ== > > greetings, > > characters in erlang are written as $. ie ';' is $; . > how do i write newline? not in a string, that would be "\n", but as a > character? > > moreover, is there is_whitespace() function is some module? > > > bengt > __________________________________ Nico Weling System Designer Ericsson Eurolab Deutschland GmbH Verification Tool Design Tel: +49 2407 575 5217 Fax: +49 2407 575 651 Dect:+49 2407 575 89339 mailto:Nico.Weling@REDACTED __________________________________ From svg@REDACTED Thu Nov 21 11:27:52 2002 From: svg@REDACTED (Vladimir Sekissov) Date: Thu, 21 Nov 2002 15:27:52 +0500 (YEKT) Subject: the newline _character_? In-Reply-To: <200211210955.gAL9trr10904@cbe.ericsson.se> References: <200211210955.gAL9trr10904@cbe.ericsson.se> Message-ID: <20021121.152752.78720194.svg@surnet.ru> Hi, eleberg> greetings, eleberg> eleberg> characters in erlang are written as $. ie ';' is $; . eleberg> how do i write newline? not in a string, that would be "\n", but as a eleberg> character? eleberg> eleberg> moreover, is there is_whitespace() function is some module? Look at table on page 19 of "Concurent Programming in Erlang", Erlang presentation of characters is mostly the same as in C. New line would be: NewLine = $\n. is_whitespace(C) when C == $\t; C == $\040 -> true; is_whitespace(C) -> false. Best Regards, Vladimir Sekissov From luke@REDACTED Thu Nov 21 16:14:36 2002 From: luke@REDACTED (Luke Gorrie) Date: 21 Nov 2002 16:14:36 +0100 Subject: Distel notes Message-ID: Ahoy-hoy, Just a couple of notes about Distel, to clear up some questions that people asked after my EUC talk: First, Emacs Lisp processes run inside Emacs using a small erlang-like runtime system, and the only communication with the Erlang node is to send messages and so on. So when you (erl-spawn ...) you are not actually doing anything with an Erlang node unless you send it messages or link its processes and so on. The applications themselves are usually written half in Elisp and half in Erlang. There is a module called 'distel' that gets put in the Erlang code path, and it contains supporting code that Emacs typically calls with RPCs - e.g. to generate preformatted process listings. A lot of things are much easier to do either in Elisp or in Erlang, so the idea is to do them wherever it's easiest. (Y'know, it would be interesting to do a super-tiny interpreter in Erlang, so that Distel could send a list like (io:format "Hello from ~p" (self)) and Erlang could interpret it to run the code.. that might reduce the amount of supporting Erlang code that needs to be written (and installed on the machine running the node.)) Distel doesn't work on Windows yet (probably for trivial reasons), but any problems on Unix are bugs that we want to know about. It should work completely with anything >= R8B-1, but the debugger and profiler support doesn't work in older versions. I still have a small backlog of install hiccups on Solaris, but AFAIK this hasn't been a serious problem for anyone (correct me if I'm wrong!) I only use Linux, so any patches for other platforms would be *greatly* appreciated! Also apparently it wasn't obvious that the slides software was written in Emacs Lisp specially for the talk, so *brag brag* now you know :-). The slides package is 206 lines of Emacs Lisp (I estimate that Microsoft Powerpoint must be at least ten times that size), and here's my favourite screenshot: http://www.bluetail.com/~luke/distel/distel-front-slide.png Emacs 21 has great support for images and variable-width fonts, so nothing had to be "faked". The world will be a better place when a really good Emacs web browser is written that uses all the new features :-) Cheers, Luke From cleverjulian@REDACTED Thu Nov 21 17:03:56 2002 From: cleverjulian@REDACTED (Julian Fondren) Date: Thu, 21 Nov 2002 11:03:56 -0500 Subject: Distel notes Message-ID: >(Y'know, it would be interesting to do a super-tiny interpreter in >Erlang, so that Distel could send a list like (io:format "Hello from >~p" (self)) and Erlang could interpret it to run the code.. that might >reduce the amount of supporting Erlang code that needs to be written >(and installed on the machine running the node.)) Well, there's erl_eval, and I'm pretty sure that there's a list evaluator as you request, but I don't see it anywhere. Anyway: eval([quote, X]) -> -> X; eval([F|Args]) -> apply(F, lists:map(fun eval/1, Args)); eval(X) -> X. Usage: eval([{io, format}, [quote, "Hello, world!\n"]]). eval([{io, format}, [quote, "Hello, ~w~n"], [quote, [you]]]). eval([{erlang, '+'}, 1, 2]). You'll probably want to translate from something a little more palatable, such as (io:format "Hello, world!\n") (io:format "Hello, ~w~n" '(you)) (+ 1 2) (A *real* s-expression syntax wouldn't be too difficult either, I think.) (This version is probably better.) eval([quote, X]) -> -> X; eval([F={_,_}|Args]) -> apply(F, lists:map(fun eval/1, Args)); eval([F|Args]) -> eval([{erlang, F}|Args]); eval(X) -> X. _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus From etxuwig@REDACTED Thu Nov 21 18:07:52 2002 From: etxuwig@REDACTED (Ulf Wiger) Date: Thu, 21 Nov 2002 18:07:52 +0100 (MET) Subject: the newline _character_? In-Reply-To: <200211210955.gAL9trr10904@cbe.ericsson.se> Message-ID: On Thu, 21 Nov 2002, Bengt Kleberg wrote: >moreover, is there is_whitespace() function is some module? In xmerl, it's done like this: %% whitespace consists of 'space', 'carriage return', %% 'line feed' or 'tab' -define(whitespace(H), H==?space ; H==?cr ; H==?lf ; H==?tab). Example: scan_prolog(T = [H|_], S, Pos) when ?whitespace(H) -> ?dbg("prolog(whitespace)~n", []), ?strip1, scan_prolog(T1, S1, Pos). Beautiful, eh? ;-) /Uffe -- Ulf Wiger, Senior Specialist, / / / Architecture & Design of Carrier-Class Software / / / Strategic Product & System Management / / / Ericsson Telecom AB, ATM Multiservice Networks From luke@REDACTED Thu Nov 21 18:14:49 2002 From: luke@REDACTED (Luke Gorrie) Date: 21 Nov 2002 18:14:49 +0100 Subject: the newline _character_? In-Reply-To: References: Message-ID: Ulf Wiger writes: > On Thu, 21 Nov 2002, Bengt Kleberg wrote: > > >moreover, is there is_whitespace() function is some module? > > In xmerl, it's done like this: > > %% whitespace consists of 'space', 'carriage return', > %% 'line feed' or 'tab' > -define(whitespace(H), H==?space ; > H==?cr ; > H==?lf ; > H==?tab). > > Example: > > scan_prolog(T = [H|_], S, Pos) when ?whitespace(H) -> > ?dbg("prolog(whitespace)~n", []), > ?strip1, > scan_prolog(T1, S1, Pos). > > > Beautiful, eh? ;-) The C programmer in me wonders what this would do: atom_and_whitespace(A, Ch) when atom(A), ?whitespace(Ch) -> true; atom_and_whitespace(A, Ch) -> false. :-) -Luke From cpressey@REDACTED Thu Nov 21 19:37:59 2002 From: cpressey@REDACTED (Chris Pressey) Date: Thu, 21 Nov 2002 12:37:59 -0600 Subject: appspace pollution :) In-Reply-To: References: <20021110222542.7dd666fb.cpressey@catseye.mb.ca> Message-ID: <20021121123759.538f8de7.cpressey@catseye.mb.ca> On Mon, 11 Nov 2002 11:25:38 +0100 (CET) Miguel Barreiro Paz wrote: > > > - you can't uniquely identify a client by IP address if that IP > > address is the address of their proxy server. I've been trying to > > avoid cookies at all costs, but for a public user system, they might > > be a necessary evil. On the other hand, associating user logins to an > > IP address should be OK for an intranet server. > > Not even in an intranet. For whatever (ugly) reasons you are > sometimes forced to use NAT inside the intranet, or don't have control > over the whole network (and, well, the IBM intranet for example is > bigger than Internet was for quite a few years :-)). If you absolutely > can't use cookies, you can rewrite per-session URLs to include an > explicit session ID. Combined with SSL it's not too bad. Combined with > client-side SSL certificates it gets much better. Thanks for the info. I'll be working on putting in session id's over the next little while (although I might not have much time to allot to it in the near future) and, eventually, SSL. -Chris From luke@REDACTED Thu Nov 21 20:16:41 2002 From: luke@REDACTED (Luke Gorrie) Date: 21 Nov 2002 20:16:41 +0100 Subject: Distel notes In-Reply-To: References: Message-ID: "Julian Fondren" writes: > >(Y'know, it would be interesting to do a super-tiny interpreter in > >Erlang, so that Distel could send a list like (io:format "Hello from > >~p" (self)) and Erlang could interpret it to run the code.. that might > >reduce the amount of supporting Erlang code that needs to be written > >(and installed on the machine running the node.)) > > Well, there's erl_eval, and I'm pretty sure that there's a list > evaluator as you request, but I don't see it anywhere. Anyway: On the topic of interepters, I don't think I posted my last scheme-like-language interpreter on the list - it's definitely not "canonical" yet but it's much better than my previous attempts. It's 580 lines of code and its most advanced features are quasiquote and defmacro (the next one will have to have call/cc!), plus 56 lines written in itself to implement let, if, case, etc http://www.bluetail.com/~luke/misc/lersp.tar.gz Usage: cd lersp make ./lersp.sh src/ is the interpreter and priv/ is the library written in itself. NB: don't use tabs in source files, because it contains the following amusing line: -define(WHITESPACE(X), X == $\s; X == $\r; X == $\n). :-) NB2: I wonder where a person can learn to write a complete "canonical" scheme interpreter in e.g. scheme? Books like _Structure and Interpretation of Computer Programs_ tell you all about evaluators, but not quasiquote, macros, the reader, ... Cheers, Luke From cpressey@REDACTED Thu Nov 21 20:35:00 2002 From: cpressey@REDACTED (Chris Pressey) Date: Thu, 21 Nov 2002 13:35:00 -0600 Subject: appspace pollution :) In-Reply-To: <04D356A3B172D611981B0008C791C3126BF507@imp02mbx.t-mobile.co.uk> References: <04D356A3B172D611981B0008C791C3126BF507@imp02mbx.t-mobile.co.uk> Message-ID: <20021121133500.7fa49596.cpressey@catseye.mb.ca> On Mon, 11 Nov 2002 13:00:23 -0000 Sean Hinde wrote: > Hi, > > > - if there is an inherent flaw in all common web servers it > > is that they > > serve objects from the filesystem - the same place the important stuff > > (OS, programs, data, etc) is. The use of chroot should be > > investigated > > for having OpenFlax serve files. The practice of serving > > objects from a > > database (like the wikie) should be investigated. The webserver code > > would then never access the filesystem directly, but instead rely on a > > database package (such as mnesia). The drawback would be the > > extra effort > > required to import the objects you wish to serve, into the database. > > This what we do with all our O&M related inets content - it is stored as > binaries (or templates with the static parts as binaries) in mnesia. We > don't find the updating overhead too great given the existence of to_erl > - esp:store("page.html"). or esp:store_all("/Directory/../"). do all > the work. Mnesia, or even ets, ought to work really well for lots of small files and templates/data. But serving from the filesystem is probably the best bet for large files, is my feeling - unless you 'link' to them from the database (or unless mnesia got a lot better at storing huge binaries lately while I wasn't looking....) The question is kind of academic, though, seeing as you can just install both modules even if it introduces administration messiness. > > - security can always be improved by deleting modules. > > Up to a point (os could probably go), but dangerous ones will remain > (file!). I guess I thought it was too obvious to mention also that functionality can always be reduced by deleting modules :) > This is a big concern as Erlang creeps ever closer to living on the > internet(Joe punching holes through his home firewall..) Is anyone aware > of any detailed security analysis done on Erlang/OTP? For example there > were vulnerabilities in zlib some time ago (fixed in R9B?). > > Also various people have proposed things to lock down erlang > distribution: > > * Hacking net_kernel to implement a security policy (but it apears that > quite a bit of stuff bypasses net_kernel anyway) > > * Using the included ssl for distribution (nice between known hosts but > still allows full access to all services once in) I think encrypting the distribution communications is the best bet for using Erlang on public networks. What are the reasons for using SSL for this purpose (besides its increasing ubiquitousness) when we already have a system of cookies and a crypto module? It strikes me as simpler to just use the cookie for the encryption/decryption key. > * Various works at SERC - mainly about non trusted code execution though > some nice stuff about secured gen_servers > > * Joe's recent :) statement that "We have done all the work but just > haven't put it in yet" > > It would be fantastically powerful to have a locked down distribution > mechanism which looked like normal erlang message passing but only > allowed access to specified services, processes, modules, functions, > ports, code loading etc. It would. Things like being able to find out which process *actually* sent you a given message (instead of trusting it to put it's own pid in some element of a tuple) would be nice. > > - {active, true} sockets should probably never be used on a public > > network. As nicely as they map to the Erlang programming > > paradigm, they > > present too great a risk of flooding the Erlang runtime with > > messages. > > The only times my webserver has actually 'hard' crashed (as opposed to > > processes 'soft' crashing) have been because of message overflow. > > Check out {active, once}. No! Using undocumented functions is evil and wrong! Actually, I'm just surprised that it hasn't found its way into the inet man page yet. {active, once} is pretty cool, but (speaking of "looking like Erlang message passing") not quite as cool as sending back a synchronization message to the port would be. Although, it's probably not too hard to write a wrapper process that provides that, I should try it sometime. -Chris From cpressey@REDACTED Thu Nov 21 21:05:10 2002 From: cpressey@REDACTED (Chris Pressey) Date: Thu, 21 Nov 2002 14:05:10 -0600 Subject: Hexadecimal conversions In-Reply-To: <15836.42210.835900.580494@antilipe.corelatus.se> References: <58697114-FCFC-11D6-8C81-000393915E94@nada.kth.se> <15836.42210.835900.580494@antilipe.corelatus.se> Message-ID: <20021121140510.1b864d4f.cpressey@catseye.mb.ca> On Thu, 21 Nov 2002 10:18:26 +0100 Matthias Lang wrote: > > Magnus Ahltorp writes: > > I have used my own to/from hex string converter several years now, > > but as I was trying to clean up my code, I wanted to get rid of it. > > > > Is there a built-in hex string converter in Erlang? I've tried to > > look around, but I've never found one. > > No BIF, as far as I know, but as of R9 there's > httpd_util:hexlist_to_integer/1 and integer_to_hexlist/1 Indeed, as it says on the first page of the Inets Reference Manual, "Inets is a container for Internet clients and servers... and miscellaneous data conversion functions!" :) Seriously, it's a bit ridiculous, don't you think? How is a dependency on httpd_util any cleaner than rolling your own string functions? "Richer, saner standard libraries" is definately at the top of my Erlang wish-list this Christmas. Also on the subject, there was once on this list some code to add hex formatting to io_lib:format/2, but I don't know if it ever made it into OTP... -Chris From igouy@REDACTED Thu Nov 21 21:24:00 2002 From: igouy@REDACTED (isaac gouy) Date: Thu, 21 Nov 2002 12:24:00 -0800 (PST) Subject: deftype & type - Where are they documented? Message-ID: <20021121202400.14624.qmail@web20512.mail.yahoo.com> +deftype continuation(T) = {} | {T, fun(T,continuation(T)) -> continuation(T)}. +type seq(int(),int()) -> continuation(int()). I haven't figured out where deftype or type are mentioned in the Erlang documentation or book. Where can I find out about this? __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus ? Powerful. Affordable. Sign up now. http://mailplus.yahoo.com From matthias@REDACTED Thu Nov 21 21:49:31 2002 From: matthias@REDACTED (Matthias Lang) Date: Thu, 21 Nov 2002 21:49:31 +0100 Subject: Hexadecimal conversions In-Reply-To: <20021121140510.1b864d4f.cpressey@catseye.mb.ca> References: <58697114-FCFC-11D6-8C81-000393915E94@nada.kth.se> <15836.42210.835900.580494@antilipe.corelatus.se> <20021121140510.1b864d4f.cpressey@catseye.mb.ca> Message-ID: <15837.18139.927981.246017@antilipe.corelatus.se> Chris Pressey writes: > Seriously, it's a bit ridiculous, don't you think? How is a dependency on > httpd_util any cleaner than rolling your own string functions? "Richer, > saner standard libraries" is definately at the top of my Erlang wish-list > this Christmas. Depends on your priorities. Having someone else maintain the code for you is worth something too. The standard libraries are of variable quality and there's no real way to know which bits are good and which leave a thing or two to be desired, apart from experience. The hierarchical modules system (in R9) may make a cleanup less painful. > Also on the subject, there was once on this list some code to add hex > formatting to io_lib:format/2, but I don't know if it ever made it into > OTP... That hex-formatting code is too crappy to be included in stdlib without a fair bit of work. You can apply it yourself if you want, though: http://www.erlang.org/ml-archive/erlang-questions/200110/msg00148.html Matt From vances@REDACTED Thu Nov 21 22:33:52 2002 From: vances@REDACTED (Vance Shipley) Date: Thu, 21 Nov 2002 16:33:52 -0500 Subject: appspace pollution :) In-Reply-To: <20021121133500.7fa49596.cpressey@catseye.mb.ca> References: <04D356A3B172D611981B0008C791C3126BF507@imp02mbx.t-mobile.co.uk> <20021121133500.7fa49596.cpressey@catseye.mb.ca> Message-ID: <20021121213352.GC32402@frogman.motivity.ca> Chris, Taking the bait, as I just typed "{active, once}" only minutes ago, I would point out that the documentation is not the definitive word that it might be. I already checked and {active, once} is used in inets, megaco & ssl. I'm sure it will one day be documented. -Vance On Thu, Nov 21, 2002 at 01:35:00PM -0600, Chris Pressey wrote: } } No! Using undocumented functions is evil and wrong! } } -Chris From jamesh@REDACTED Thu Nov 21 23:41:10 2002 From: jamesh@REDACTED (James Hague) Date: Thu, 21 Nov 2002 16:41:10 -0600 Subject: the newline _character_? Message-ID: >-define(whitespace(H), H==?space ; > H==?cr ; > H==?lf ; > H==?tab). What's the reason not to simply use H =< 32? Are there other characters below 32 that need to be processed? From robert.virding@REDACTED Fri Nov 22 00:47:16 2002 From: robert.virding@REDACTED (Robert Virding) Date: Fri, 22 Nov 2002 00:47:16 +0100 Subject: Hexadecimal conversions References: <58697114-FCFC-11D6-8C81-000393915E94@nada.kth.se><15836.42210.835900.580494@antilipe.corelatus.se> <20021121140510.1b864d4f.cpressey@catseye.mb.ca> Message-ID: <003801c291b8$53f26640$8100a8c0@virding.org> ----- Original Message ----- From: "Chris Pressey" To: Cc: Sent: Thursday, November 21, 2002 9:05 PM Subject: Re: Hexadecimal conversions > > Also on the subject, there was once on this list some code to add hex > formatting to io_lib:format/2, but I don't know if it ever made it into > OTP... > > -Chris A few different attempts at adding hex output to io_lib:fwrite :-) have been done. I did a reasonably complete one which gave some control over output format. I will try and find it and post it to this list so you can see if this is what you want/need. Robert From robert.virding@REDACTED Fri Nov 22 00:49:21 2002 From: robert.virding@REDACTED (Robert Virding) Date: Fri, 22 Nov 2002 00:49:21 +0100 Subject: the newline _character_? References: Message-ID: <004401c291b8$9d68db60$8100a8c0@virding.org> ----- Original Message ----- From: "James Hague" To: Sent: Thursday, November 21, 2002 11:41 PM Subject: Re: the newline _character_? > >-define(whitespace(H), H==?space ; > > H==?cr ; > > H==?lf ; > > H==?tab). > > What's the reason not to simply use H =< 32? Are there other characters > below 32 that need to be processed? Ah, but not everything below 32 is whitespace! :-) You need something like the above if you want to be strict. Robert From robert.virding@REDACTED Fri Nov 22 00:51:05 2002 From: robert.virding@REDACTED (Robert Virding) Date: Fri, 22 Nov 2002 00:51:05 +0100 Subject: Tail recursion modulo cons References: Message-ID: <004e01c291b8$db490180$8100a8c0@virding.org> Apart form Richards comments below another is that this could play havoc with error handling where you throw incomplete terms. I think. Robert ----- Original Message ----- From: "Richard Carlsson" To: "James Hague" Cc: Sent: Thursday, November 21, 2002 9:52 AM Subject: Re: Tail recursion modulo cons > > On Wed, 20 Nov 2002, James Hague wrote: > > > This is a compiler optimization that effectively makes functions like the > > following tail recursive: > > > > map(F, [H|T]) -> > > [F(H)|map(F, T)]; > > map(_, []) -> []. > > > > [...] > > Has anyone ever looked into this for Erlang? > > The actual rewriting is not that difficult; in Erlang, it would be > something like this (assuming we had a 'set_tail' operation): > > map(F, [H|T]) -> > Cons = [F(H) | []], > map(F, T, Cons); > map(_, []) -> []. > > map(F, [H|T], Cons) -> > NewCons = [F(H) | []], > set_tail(Cons, NewCons), > map(F, T, NewCons); > map(_, [], Cons) -> > set_tail(Cons, []). > > (Note that the tails of allocated cons cells must be initialised, > e.g. to '[]', so that if garbage collection happens during execution, > it will not find random bits in the tail. Thus, we get a penalty of an > extra write for each cons cell.) > > The big obstacle for making this work is that the abstract machine and > garbage collector must be extended to handle write barriers. Right now, > it is necessary that there are never any pointers from an older > generation to a younger one. Now suppose a GC happens during execution > of the above 'map'. Then, a pre-allocated cons cell could be moved to > an older generation. When execution continues, it will allocate a new > cons cell on the youngest generation, and insert a pointer from the > old cell to the new one. The current garbage collector will not realise > that the new cell is live, when the next collection happens. Disaster > follows. > > The quick summary is that it's not just a code transformation, but > also requires support in the runtime environment. (It might happen > some day, though, since there are several reasons for wanting to > have write barriers.) > > /Richard > > > Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) > E-mail: Richard.Carlsson@REDACTED WWW: http://user.it.uu.se/~richardc/ > > From cpressey@REDACTED Fri Nov 22 00:51:21 2002 From: cpressey@REDACTED (Chris Pressey) Date: Thu, 21 Nov 2002 17:51:21 -0600 Subject: Hexadecimal conversions In-Reply-To: <15837.18139.927981.246017@antilipe.corelatus.se> References: <58697114-FCFC-11D6-8C81-000393915E94@nada.kth.se> <15836.42210.835900.580494@antilipe.corelatus.se> <20021121140510.1b864d4f.cpressey@catseye.mb.ca> <15837.18139.927981.246017@antilipe.corelatus.se> Message-ID: <20021121175121.63cbb374.cpressey@catseye.mb.ca> On Thu, 21 Nov 2002 21:49:31 +0100 Matthias Lang wrote: > Chris Pressey writes: > > > Seriously, it's a bit ridiculous, don't you think? How is a > > dependency on httpd_util any cleaner than rolling your own string > > functions? "Richer, saner standard libraries" is definately at the > > top of my Erlang wish-list this Christmas. > > Depends on your priorities. Having someone else maintain the code for > you is worth something too. Yes, this sort of decision has to be made on a function-by-function basis - although my point was more along the lines of, depending on the target install (embedded systems?), it might not be a good idea to assume that Inets is installed, just for string/hex manipulation... personally I try to assume that all OTP applications except stdlib and kernel are optional. > The standard libraries are of variable > quality and there's no real way to know which bits are good and which > leave a thing or two to be desired, apart from experience. > > The hierarchical modules system (in R9) may make a cleanup less painful. Brings me to my second wish: that, if (when!) stdlib is hierarchified, the hierarchy doesn't get too deep... 3 or 4 levels is probably OK, but 5 or 6 levels would become more annoying than helpful IMHO. I'd quite like to help reorganize and richen stdlib. If someone has a draft of the proposed tree, I'd be happy to provide critical feedback. Also, FWIW, I'd be happy to 'donate' anything from my 'ce' helper app, which is basically 'my stdlib' - the functions I need on a regular basis, but aren't in stdlib. http://kallisti.mine.nu/projects/ce-2002.1121/ I plan to 'support' it, sort of (since I use it in almost all of my own projects) but I can't guarantee that the interface won't change. Several of the functions which have passed by this mailing list have found a place in it, and although it doesn't have is_whitespace yet, it does contain a (general-purpose, non-optimized) base converter: Eshell V5.2 (abort with ^G) 1> ce_math:base(16, 8000). "1F40" 2> ce_math:base(16, "1F40"). 8000 -Chris From cpressey@REDACTED Fri Nov 22 02:13:11 2002 From: cpressey@REDACTED (Chris Pressey) Date: Thu, 21 Nov 2002 19:13:11 -0600 Subject: deftype & type - Where are they documented? In-Reply-To: <20021121202400.14624.qmail@web20512.mail.yahoo.com> References: <20021121202400.14624.qmail@web20512.mail.yahoo.com> Message-ID: <20021121191311.71f6e703.cpressey@catseye.mb.ca> On Thu, 21 Nov 2002 12:24:00 -0800 (PST) isaac gouy wrote: > +deftype continuation(T) = {} | {T, > fun(T,continuation(T)) -> continuation(T)}. > > +type seq(int(),int()) -> continuation(int()). > > > I haven't figured out where deftype or type are > mentioned in the Erlang documentation or book. Where > can I find out about this? They're part of the Specification Web type system, seperate from Erlang itself. It seems to be documented at: http://www.ericsson.com/cslab/~thomas/specweb.html but I don't know if it's up to date... -Chris From cpressey@REDACTED Fri Nov 22 08:38:21 2002 From: cpressey@REDACTED (Chris Pressey) Date: Fri, 22 Nov 2002 01:38:21 -0600 Subject: random thoughts on language design etc. Message-ID: <20021122013821.4d484187.cpressey@catseye.mb.ca> I'm leaving on vacation tomorrow, and I just wanted to get down a few unsolicited and not particularly reasoned thoughts on Erlang... :) First, I want to make a clarification. Once upon a time I remarked that Erlang was like a combination of a high-level language and a low-level language. A better way to say what I meant at the time would be to say that Erlang is a language which tries to make it easy to reason about the correctness of a program *and* to reason about its performance. For a language which is used to program network hardware, this is a treasure. Although it does make for awkward programs sometimes - all I can say is that they are *much* less awkward than trying to do the equivalent thing in C or Perl. As I've stated before, for using Erlang for scripting, prototyping, and such where soft-real-time isn't a primary concern, I think it would be great to loosen the restrictions a bit and be able to use arbitrary boolean functions in guards. Perhaps it's possible to transform them into case statements and issue a warning - unless they're actually used in a 'receive', there really shouldn't be any concurrency issues with them operating in constant time, etc - should there??? I'm probably missing something here. I've only ever used 'if' once. 'case' is easier for me to understand. Function heads & selecting alternatives by pattern matching are great, but (a) they're grouped sequentially in source code order, perhaps forcing you to place helper functions far away from the code they're supposed to help, *while* (b) they force you to repeat the function name anyway, even though that can clearly be implied *if* they are in sequential source code order. (Every clause before the '.'...) An alternative approach to selecting which clause of the function to use could be to order the patterns based on their specificity. As long as there exists a specific notion of specificity within the patterns in Erlang, this would allow for functions which are defined over several modules and/or extended ad hoc - and is generally 'what you mean' anyway. e.g. f(a,b) -> most specific (two atoms). f(X,b) -> less specific (one atom one var). f(X,Y) -> less specific (two vars). f(X,_) -> less specific (one var one don't-care). f(_,_) -> least specific (two don't-cares). For more information, see the language Aardappel, which is very interesting in this respect (and several others:) http://wouter.fov120.com/aardappel/index.html The impression I get from non-Erlang programmers is that they see Erlang as a Prolog descendant - which it is, but it really lacks the feature that makes Prolog *Prolog*: full-out variable unification (backtracking). Non-programmers usually assume that it runs on cell phones. Even though it's not strictly correct, I tend to call the io functions io:fwrite/2 and io_lib:format/2 just because it makes their roles clearer (one formats and writes, the other just formats.) And I'm pretty sure even Pascal allowed an extraneous semicolon before an 'end'... :) Still my most common syntax error. Lastly, I want to thank everyone for all their efforts that have gone into making Erlang the beautiful thing that it is. Regards, -Chris From thomas.arts@REDACTED Fri Nov 22 08:44:34 2002 From: thomas.arts@REDACTED (Thomas Arts) Date: Fri, 22 Nov 2002 08:44:34 +0100 Subject: deftype & type - Where are they documented? References: <20021121202400.14624.qmail@web20512.mail.yahoo.com> <20021121191311.71f6e703.cpressey@catseye.mb.ca> Message-ID: <002701c291fb$00a16070$f62d1081@ituniv398> Dear all The specweb development has stopped for a while ago. Nevertheless, I have always used it for the development of my own code. I find it convenient to have type annotations in my code. However, specweb doesn't help you in checking that the annotations are correct. There is no checking that your type annotation should change if you change your function. Thus, in general one has to do all the tuning by hand. After that Joe and I have left Ericsson, there is nobody working on type systems inside the company. However, there are several people at universities that now and then try to look into this rather complicated problem. We cannot expect much type checking for Erlang in the very near future. If, though, you would like to experiment with type annotations and you would like to typecheck an annotated program, then please send it to me and I can see what I can do for you. Best regards Thomas --- FMICS 03, June 5-7 in Trondheim. Call for papers: http://www.inrialpes.fr/vasy/fmics/workshop-8/ Dr Thomas Arts Program Manager Software Engineering and Management IT-university of Gothenburg Box 8718, 402 75 Gothenburg, Sweden Tel +46 31 772 6031 Fax +46 31 772 4899 ----- Original Message ----- From: "Chris Pressey" To: "isaac gouy" Cc: Sent: Friday, November 22, 2002 2:13 AM Subject: Re: deftype & type - Where are they documented? > On Thu, 21 Nov 2002 12:24:00 -0800 (PST) > isaac gouy wrote: > > > +deftype continuation(T) = {} | {T, > > fun(T,continuation(T)) -> continuation(T)}. > > > > +type seq(int(),int()) -> continuation(int()). > > > > > > I haven't figured out where deftype or type are > > mentioned in the Erlang documentation or book. Where > > can I find out about this? > > They're part of the Specification Web type system, seperate from Erlang > itself. It seems to be documented at: > > http://www.ericsson.com/cslab/~thomas/specweb.html > > but I don't know if it's up to date... > > -Chris > From eleberg@REDACTED Fri Nov 22 09:02:11 2002 From: eleberg@REDACTED (Bengt Kleberg) Date: Fri, 22 Nov 2002 09:02:11 +0100 (MET) Subject: Distel notes Message-ID: <200211220802.gAM82Br18909@cbe.ericsson.se> > "Julian Fondren" writes: ...deleted > > Well, there's erl_eval, and I'm pretty sure that there's a list > > evaluator as you request, but I don't see it anywhere. Anyway: > the ''best'' approach would (IMHO) be to allow erl_eval to take a io device (such as returned from file:open()). and then introduce lists:open(), also returning an io device. string ports are not a new concept (in other languages). bengt From vances@REDACTED Fri Nov 22 12:13:09 2002 From: vances@REDACTED (Vance Shipley) Date: Fri, 22 Nov 2002 06:13:09 -0500 Subject: language documentation Message-ID: <20021122111309.GB35580@frogman.motivity.ca> Does anyone feel as lost as I do when it comes to getting definitive documentation on the language itself? I have several copies of the book(*) but it is quite out of date. So much so that we rely on an "Erlang Extensions since 4.4" document. The main problem however is that the book is not available online. I wouldn't want to diminish the value of the book or the rewards due it's creators but don't we need an online reference for the language which is up to date and relatively definetive? I was writing a guard tonight as tuple(X) but it ocurred to me that I ought to use is_tuple(X). I wasn't sure which was most appropriate where and I spent some time searching for "the word". I ended up finding the following: http://www.bluetail.com/~rv/Erlang-spec/Proposals/what-is-a-bif.shtml Which incendentally also mentions an is_space(). :) -Vance (*) Concurrent Programming in Erlang - Second Edition From eleberg@REDACTED Fri Nov 22 12:53:51 2002 From: eleberg@REDACTED (Bengt Kleberg) Date: Fri, 22 Nov 2002 12:53:51 +0100 (MET) Subject: language documentation Message-ID: <200211221153.gAMBrpr14198@cbe.ericsson.se> > From: Vance Shipley > http://www.bluetail.com/~rv/Erlang-spec/Proposals/what-is-a-bif.shtml nice idea. needs to be updated with the new (hirachical(sp?)) module system. easily parallellised by letting different people do one each of the suggested new modules. easily implemented since the code (mostly) exists. even i could do one of the modules. yes, this is me volontering, provided that somebody is willing to incorporate the modules into the distribution. bengt From Bruce@REDACTED Fri Nov 22 13:31:40 2002 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Sat, 23 Nov 2002 01:31:40 +1300 Subject: problems compiling H.323 ASN.1 References: <20021120043340.GC81704@frogman.motivity.ca> <20021120051445.GD81704@frogman.motivity.ca> Message-ID: <002301c29223$1ba1bb90$dc21970a@norris> Hi Vance, Did you get an answer to this? I believe that constraints are not implemented yet, removing them has no effect on the protocol exchanges (its just validation for what you can put into them). By the way, H.323 is ASN.1 PER so you need: 1>asn1ct:compile("H323-MESSAGES.asn", [per]). or it will default to ASN.1 BER. (if you knew this already I apologise) I've lost all my files. Grrr. But I'm interested enough to get all the H.323v4 files and compile them. Almost there :-) /Bruce ----- Original Message ----- From: "Vance Shipley" To: Sent: Wednesday, November 20, 2002 6:14 PM Subject: Re: problems compiling H.323 ASN.1 > > After fixing the other problems I am left with the following. > I see the reason as not_implemented. What is it that is not > implemented? > > -Vance > > > 9> asn1ct:compile("H323-MESSAGES.asn"). > Erlang ASN.1 version "1.4" compiling "H323-MESSAGES.asn" > Compiler Options: [] > asn1error:13:'H323-MESSAGES':'H323-UserInformation' {asn1, > {not_implemented, > {merge_constraints, > [{'PermittedAlphabet', > {'SingleValue', > "#*0123456789abc"}}]}}} > asn1error:706:'H323-MESSAGES':'GSM-UIM' {asn1, > {not_implemented, > {merge_constraints, > [{'PermittedAlphabet', > {'SingleValue', > "#*0123456789abc"}}]}}} > {error,{asn1,[{error,{type,13, > 'H323-MESSAGES', > 'H323-UserInformation', > {asn1,{not_implemented, > {merge_constraints, > [{'PermittedAlphabet', > {'SingleValue', > "#*0123456789abc"}}]}}}}}, > {error,{type,706, > 'H323-MESSAGES', > 'GSM-UIM', > {asn1,{not_implemented, > {merge_constraints, > [{'PermittedAlphabet', > {'SingleValue', > "#*0123456789abc"}}]}}}}}]}} > From cleverjulian@REDACTED Fri Nov 22 14:01:29 2002 From: cleverjulian@REDACTED (Julian Fondren) Date: Fri, 22 Nov 2002 08:01:29 -0500 Subject: language documentation Message-ID: >Does anyone feel as lost as I do when it comes to getting definitive >documentation on the language itself? I have several copies of the >book(*) but it is quite out of date. So much so that we rely on an >"Erlang Extensions since 4.4" document. The main problem however is >that the book is not available online. I wouldn't want to diminish >the value of the book or the rewards due it's creators but don't we >need an online reference for the language which is up to date and >relatively definetive? I felt the same (and have encountered the same in other people) for a long time, until I tripped over the Erlang spec http://www.erlang.org/download/erl_spec47.ps.gz (somehow the descriptions of this file led me to believe ... what? I ignored it, is all I can say) which ought to be described as ESSENTIAL DOCUMENTATION -- which describes the language, perhaps, as well as the usual Erlang documentation describes the library. _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From bertil.karlsson@REDACTED Fri Nov 22 14:39:43 2002 From: bertil.karlsson@REDACTED (Bertil Karlsson) Date: Fri, 22 Nov 2002 14:39:43 +0100 Subject: problems compiling H.323 ASN.1 References: <20021120043340.GC81704@frogman.motivity.ca> <20021120051445.GD81704@frogman.motivity.ca> <002301c29223$1ba1bb90$dc21970a@norris> Message-ID: <3DDE339F.CDD04490@uab.ericsson.se> Hello, Sorry for beeing late with a responce on this. Constraints are implemented (most of them anyway). I didn't know this was a PER protocol at first. For PER the constraint is crucial in that it affects how the message is encoded/decoded. Two types of the same ASN.1 type with different constraints will result in different encodings. The reason why the ASN.1 compiler fails in this case is unfortunately a bug, and it will be corrected in the next patch. If you want the _fastest_ encode/decode you should compile the files with For BER: >asn1ct:compile(ASN1File, [ber_bin,optimize]). For PER: >asn1ct:compile(ASN1File, [per_bin]). generates faster code than >asn1ct:compile(ASN1File, [per]). but the fastest code you will get by: >asn1ct:compile(ASN1File, [per_bin,optimize]). in this case the PER encode is partly done by a driver. Bruce Fitzsimons wrote: > > Hi Vance, > > Did you get an answer to this? I believe that constraints are not > implemented yet, removing them has no effect on the protocol exchanges (its > just validation for what you can put into them). > > By the way, H.323 is ASN.1 PER so you need: > > 1>asn1ct:compile("H323-MESSAGES.asn", [per]). > > or it will default to ASN.1 BER. > > (if you knew this already I apologise) > > I've lost all my files. Grrr. But I'm interested enough to get all the > H.323v4 files and compile them. Almost there :-) > > /Bruce > > ----- Original Message ----- > From: "Vance Shipley" > To: > Sent: Wednesday, November 20, 2002 6:14 PM > Subject: Re: problems compiling H.323 ASN.1 > > > > > After fixing the other problems I am left with the following. > > I see the reason as not_implemented. What is it that is not > > implemented? > > > > -Vance > > > > > > 9> asn1ct:compile("H323-MESSAGES.asn"). > > Erlang ASN.1 version "1.4" compiling "H323-MESSAGES.asn" > > Compiler Options: [] > > asn1error:13:'H323-MESSAGES':'H323-UserInformation' {asn1, > > {not_implemented, > > > {merge_constraints, > > > [{'PermittedAlphabet', > > > {'SingleValue', > > > "#*0123456789abc"}}]}}} > > asn1error:706:'H323-MESSAGES':'GSM-UIM' {asn1, > > {not_implemented, > > {merge_constraints, > > [{'PermittedAlphabet', > > {'SingleValue', > > > "#*0123456789abc"}}]}}} > > {error,{asn1,[{error,{type,13, > > 'H323-MESSAGES', > > 'H323-UserInformation', > > {asn1,{not_implemented, > > {merge_constraints, > > [{'PermittedAlphabet', > > {'SingleValue', > > > "#*0123456789abc"}}]}}}}}, > > {error,{type,706, > > 'H323-MESSAGES', > > 'GSM-UIM', > > {asn1,{not_implemented, > > {merge_constraints, > > [{'PermittedAlphabet', > > {'SingleValue', > > > "#*0123456789abc"}}]}}}}}]}} > > -- / Bertil Karlsson From hans@REDACTED Fri Nov 22 14:51:06 2002 From: hans@REDACTED (Hans Nilsson) Date: Fri, 22 Nov 2002 14:51:06 +0100 (CET) Subject: Very strange bug In-Reply-To: <20021119.032944.60470805.svg@surnet.ru> Message-ID: We are struggeling with "almost exactly" the same problem here. We are running erlang on a powerpc with linux and a flash file system. Erlang and our application is started last in the linux boot sequence. Sometimes, (5-10% of the times), erlang exits and reports {undef,[{M,F ... although the file M.erl exists. The problem seem to dissappear if we first put some of the files into the file system cache. We can't yet tell were the problem is due to some problems with strace on this very type of PPC. This problem is present both in latest Erlang PPC-release and earlier betas. Linux is 2.4.20-pre11. I can't give you more details about versions of filesystems and processor right now since the guy knowing that is not here right now. /Hans Nilsson On Tue, 19 Nov 2002, Vladimir Sekissov wrote: > Good day, > > I've discovered a very strange (for me) bug when I'm starting Erlang > with clean boot without sasl. > > Lets explain by example: > > $ /usr/local/bin/erl > > Eshell V5.2 (abort with ^G) > 1> m(file). > > Module file compiled: Date: October 24 2002, Time: 11.26 > Compiler options: [v3, > debug_info, > {i,"../include"}, > {outdir,"../ebin"}, > {cwd,"/usr/local/src/otp_src_R9B-0/lib/kernel/src"}] > Object file: /usr/local/lib/erlang/lib/kernel-2.8.0/ebin/file.beam > Exports: > ... skipped... > eval/1 read/2 > file_info/1 read_file/1 > format_error/1 read_file_info/1 > ... skipped... > > 2> file:read_file("./www/HEAD"). > {ok, ...} > > 3> yaws:start(). > > =INFO REPORT==== 19-Nov-2002::02:57:09 === > Using config file /home/svg/yaws.conf > =INFO REPORT==== 19-Nov-2002::02:57:09 === > Listening to 127.0.0.1:8000 for servers ["localhost:8000"] > ok > > 4> m(file). > ... skipped... > eval/1 rawopen/2 > file_info/1 read/2 > format_error/1 read_file_info/1 > get_cwd/0 read_link/1 > ... skipped... > > 5> file:read_file("./www/HEAD"). > ** exited: {undef,[{file,read_file, > ["./www/HEAD"]}, > {erl_eval,expr,3}, > {erl_eval,exprs,4}, > {shell,eval_loop,2}]} ** > > > As you can see in second output of m(file) declaration of read_file/1 > is absent and function is not available. > > When I'm starting Erlang with sasl all is ok. > > Can somebody point me to the cause of the problem. > > The system is GentooLinux-1.4/GCC-3.1/kernel-2.4.19 > > Best Regards, > Vladimir Sekissov > From kent@REDACTED Fri Nov 22 15:05:22 2002 From: kent@REDACTED (Kent Boortz) Date: 22 Nov 2002 15:05:22 +0100 Subject: language documentation In-Reply-To: <20021122111309.GB35580@frogman.motivity.ca> References: <20021122111309.GB35580@frogman.motivity.ca> Message-ID: Vance Shipley writes: > Does anyone feel as lost as I do when it comes to getting definitive > documentation on the language itself? I have several copies of the > book(*) but it is quite out of date. So much so that we rely on an > "Erlang Extensions since 4.4" document. The main problem however is > that the book is not available online. I wouldn't want to diminish > the value of the book or the rewards due it's creators but don't we > need an online reference for the language which is up to date and > relatively definetive? You mean the book is not available in HTML format? The language part of the book is available in PDF format http://www.erlang.org/download/erlang-book-part1.pdf Some things may also be described in the Erlang standard document but it is also rather old http://www.erlang.org/download/erl_spec47.ps.gz Yes, there should be one updated definitive source for the language documentation, kent From jamesh@REDACTED Fri Nov 22 16:29:55 2002 From: jamesh@REDACTED (James Hague) Date: Fri, 22 Nov 2002 09:29:55 -0600 Subject: random thoughts on language design etc. Message-ID: >I think it would be great to loosen the >restrictions a bit and be able to >use arbitrary boolean functions in guards. I think this changes the language in such a dramatic way that there's not much point in discussing it :) My feeling is that all other Erlang changes should be put on hold until something is done to improve records. Wow, is it ugly to have use -include directives, especially without any guarantees that different modules are compiled with the same record definitions. It's like C externs all over again. I know abstract syntax patterns didn't work out, but surely there's _something_ that would make a good alternative? I remember seeing mention of a simple, dynamic record system for Erlang somewhere, but I haven't been able to locate it. From luke@REDACTED Fri Nov 22 18:32:12 2002 From: luke@REDACTED (Luke Gorrie) Date: 22 Nov 2002 18:32:12 +0100 Subject: Tracing, event_trace Message-ID: Hideyho, I'm building up to learning about all the fancy tracing features of recent OTP versions (amazing looking, but hard to approach!), but meanwhile I wanted to share a small tracing framework that we have been getting some value out of recently. It is basically one level of sophistication above ?debug("Foo"). The program is at http://www.bluetail.com/~luke/misc/event_trace-0.1.tar.gz README follows: event_trace 0.1 -- A simple event tracing framework ============================================================ The intent of this module is to do printf-style debugging without having to keep adding and removing io:format's or recompiling with -Ddebug flags. The strategy is using the usual style of compile-time debugging macros, but with the option to filter events by category at runtime. This way you can leave the debug printouts in your code, and compile-time enable them all while hacking, but use filters so that you only see the details that you are interested in for a particular debug run. The central macro is ?event(Type, Fmt, Args) - Type is the category. When compiled with -Devent_trace, this macro sends an io:format-style debugging message to an event_trace server process, which will either print or discard it depending on how the category and filters. There are also ?event_val and ?event_time variants for showing return values or running time. The event_trace module allows events to be globally enabled or disabled by category. Enabled events are printed with io:format/2, and tagged with the category and the module/line where they came from. The file et_example.erl shows the principle. It is a toy program that connects to an SMTP server, says "HELO", and disconnects. It traces two categories of events: 'net' (results of gen_tcp calls) and 'main' (higher level stuff). It exports a few functions that run with different debug levels, which run like this: High-level events.. (erlang@REDACTED)12> et_example:main("localhost"). [main et_example:16] Starting using host "localhost" [main et_example:21] Handshake ok! Networking events.. (erlang@REDACTED)13> et_example:net("localhost"). [net et_example:34] connect() to "localhost" => {ok,#Port<0.57>} [net et_example:40] send() of HELO => ok [net et_example:43] recv() of reply => {ok,"220 cockatoo ESMTP Exim 3.35 #1 Fri, 22 Nov 2002 18:02:00 +0100\r\n"} All events.. (erlang@REDACTED)14> et_example:all("localhost"). [main et_example:16] Starting using host "localhost" [net et_example:34] connect() to "localhost" => {ok,#Port<0.58>} [net et_example:40] send() of HELO => ok [net et_example:43] recv() of reply => {ok,"220 cockatoo ESMTP Exim 3.35 #1 Fri, 22 Nov 2002 18:02:12 +0100\r\n"} ok [main et_example:21] Handshake ok! There is also a Distel-based Emacs client, event-trace.el. This receives all events from the event_trace server (enabled or not), and can then (re)filter them locally. The overhead of tracing should be as follows: Disabled at compile time: no overhead Disabled at run time: just message send of fmt+args to event_trace server (no actual string formatting) Enabled at runtime: Send + io:format Emacs connected: All events are always formatted on the erlang node and then forwarded to Emacs. (Actually this also happens after the emacs process is killed, which is a performance bug..) -- luke@REDACTED From svg@REDACTED Fri Nov 22 19:39:43 2002 From: svg@REDACTED (Vladimir Sekissov) Date: Fri, 22 Nov 2002 23:39:43 +0500 (YEKT) Subject: PATCH: Message-ID: <20021122.233943.85396358.svg@surnet.ru> Good day, There is small bug in `otp_src_R9B-0/erts/boot/src/fake_demand_epp.erl' which prevents preprocessor to identify module declaration for packaged module correctly. Here is a patch. I simply copied appropriate code from `epp.erl' Best Regards, Vladimir Sekissov ---------------------------- cut here ---------------------------------- --- otp_src_R9B-0/erts/boot/src/fake_demand_epp.erl.orig 2002-10-03 03:45:12.000000000 +0600 +++ otp_src_R9B-0/erts/boot/src/fake_demand_epp.erl 2002-11-22 23:04:40.000000000 +0500 @@ -347,11 +347,20 @@ wait_req_scan(St) end. -scan_module([{'-',Lh},{atom,Lm,module},{'(',Ll},{atom,Ln,Mod},{')',Lr}|_], Ms) -> - Ms1 = dict:store({atom,'MODULE'}, {none,[{atom,Ln,Mod}]}, Ms), - dict:store({atom,'MODULE_STRING'}, {none,[{string,Ln,atom_to_list(Mod)}]}, - Ms1); -scan_module(Ts, Ms) -> Ms. +scan_module([{'-',_Lh},{atom,_Lm,module},{'(',_Ll}|Ts], Ms) -> + scan_module_1(Ts,[],Ms); +scan_module(_Ts, Ms) -> Ms. + +scan_module_1([{atom,Ln,A},{')',_Lr}|_Ts], As, Ms) -> + Mod = lists:concat(lists:reverse([A|As])), + Ms1 = dict:store({atom,'MODULE'}, {none,[{atom,Ln,list_to_atom(Mod)}]}, + Ms), + dict:store({atom,'MODULE_STRING'}, {none,[{string,Ln,Mod}]},Ms1); +scan_module_1([{atom,_Ln,A},{'.',_Lr}|Ts], As, Ms) -> + scan_module_1(Ts, [".",A|As], Ms); +scan_module_1([{'.',_Lr}|Ts], As, Ms) -> + scan_module_1(Ts, As, Ms); +scan_module_1(_Ts, _As, Ms) -> Ms. %% scan_define(Tokens, DefineLine, From, EppState) From Bruce@REDACTED Fri Nov 22 20:56:42 2002 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Sat, 23 Nov 2002 08:56:42 +1300 Subject: problems compiling H.323 ASN.1 References: <20021120043340.GC81704@frogman.motivity.ca> <20021120051445.GD81704@frogman.motivity.ca> <002301c29223$1ba1bb90$dc21970a@norris> <3DDE339F.CDD04490@uab.ericsson.se> Message-ID: <005201c29261$472dc4a0$dc21970a@norris> ----- Original Message ----- From: "Bertil Karlsson" To: > Sorry for beeing late with a responce on this. Constraints are > implemented (most of them anyway). I didn't know this was a PER protocol > at first. For PER the constraint is crucial in that it affects how the > message is encoded/decoded. Two types of the same ASN.1 type with > different constraints will result in different encodings. Oops, yes you're right. I remember decoding the damn things by hand now. So with that constraint it each character will be encoded into 4 bits? > The reason why the ASN.1 compiler fails in this case is unfortunately a > bug, and it will be corrected in the next patch. Excellent news. It is a huge asset to Erlang that it contains a BER/PER/DER ASN.1 computer/runtime in the standard package. /Bruce From luke@REDACTED Fri Nov 22 20:58:09 2002 From: luke@REDACTED (Luke Gorrie) Date: 22 Nov 2002 20:58:09 +0100 Subject: Linkmania! Message-ID: Weekend amusement! I keep thinking of things I was bending people's ears about over post-conference beers, so here are some nice URLs: keywiz.el - Educational software for programmers. http://www.ifa.au.dk/~harder/keywiz.el IP over Avian Carriers - specification, and an implementation (surely the best hack of all time!) http://www.ietf.org/rfc/rfc1149.txt (spec) http://www.blug.linux.no/rfc1149/ (implementation - see pictures!) Multics Emacs History/Design/Implemenation - history of an early Emacs editor taking over an operating system bit by bit :-) http://www.multicians.org/mepap.html Connection Machine Lisp - amazing paper about language extensions for programming on a computer made up of zillions of small processors: http://www.bluetail.com/~luke/misc/ConnectionMachineLisp.pdf Cheers, Luke From sam@REDACTED Fri Nov 22 22:22:21 2002 From: sam@REDACTED (Samuel Tardieu) Date: Fri, 22 Nov 2002 22:22:21 +0100 Subject: Linkmania! In-Reply-To: References: Message-ID: <2002-11-22-22-22-21+trackit+sam@rfc1149.net> On 22/11, Luke Gorrie wrote: | IP over Avian Carriers - specification, and an implementation (surely | the best hack of all time!) | http://www.ietf.org/rfc/rfc1149.txt (spec) | http://www.blug.linux.no/rfc1149/ (implementation - see pictures!) Don't miss the Apache mod_erl implementation, on a related site :-) http://www.rfc1149.net/devel/mod_erl Sam From Bruce@REDACTED Sun Nov 24 04:53:19 2002 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Sun, 24 Nov 2002 16:53:19 +1300 Subject: UDP: binding to a specific interface Message-ID: <04d201c2936d$06c5a650$dc21970a@norris> Guys'n'gals, I've just been spelunking the api docs, but I can't see a way to only listen to one interface (aka IP address) on a multi-interface machine. Surely there must be a way? /Bruce From p0rj2el602@REDACTED Sun Nov 24 06:52:36 2002 From: p0rj2el602@REDACTED (Lon Willett) Date: 24 Nov 2002 06:52:36 +0100 Subject: Linkmania! In-Reply-To: References: Message-ID: <26745-75955@sneakemail.com> On Fri, 2002-11-22 at 20:58, Luke Gorrie wrote: > Weekend amusement! > > I keep thinking of things I was bending people's ears about over > post-conference beers, so here are some nice URLs: > ... > > IP over Avian Carriers - specification, and an implementation > http://www.ietf.org/rfc/rfc1149.txt (spec) > http://www.blug.linux.no/rfc1149/ (implementation - see pictures!) My other favorite RFC is: RFC1437 -- The Extension of MIME Content-Types to a New Medium . Unfortunately, there is no implementation yet. But given the high reliability that it requires, it might help push the world towards more use of Erlang/OTP. [See, I'm trying to stay on topic. ;-)] And with all the hardware control experience in the Erlang crowd, I'm surprised that OTP doesn't come with the following MIB supported: RFC2325 -- Definitions of Managed Objects for Drip-Type Heated Beverage Hardware Devices using SMIv2 . [I'm still pretending to be on topic.] > (surely the best hack of all time!) > ... I can't let that rest! My nominee isn't quite so colorful, but is truly beautiful: Ken Thompson's login hack . [I give up. We're now clearly off topic for erlang-questions. But if there's anyone out there who doesn't already know about Ken Thompson's classic hack, they should definitely read the article.] Cheers, Lon From 7k5qt001@REDACTED Sun Nov 24 05:44:29 2002 From: 7k5qt001@REDACTED (Lon Willett) Date: 24 Nov 2002 05:44:29 +0100 Subject: Linkmania! In-Reply-To: References: Message-ID: <1038113069.20027.168.camel@quine> On Fri, 2002-11-22 at 20:58, Luke Gorrie wrote: > Weekend amusement! > > I keep thinking of things I was bending people's ears about over > post-conference beers, so here are some nice URLs: > ... > > IP over Avian Carriers - specification, and an implementation > http://www.ietf.org/rfc/rfc1149.txt (spec) > http://www.blug.linux.no/rfc1149/ (implementation - see pictures!) My other favorite RFC is: RFC1437 -- The Extension of MIME Content-Types to a New Medium . Unfortunately, there is no implementation yet. But given the high reliability that it requires, it might help push the world towards more use of Erlang/OTP. [See, I'm trying to stay on topic. ;-)] And with all the hardware control experience in the Erlang crowd, I'm surprised that OTP doesn't come with the following MIB supported: RFC2325 -- Definitions of Managed Objects for Drip-Type Heated Beverage Hardware Devices using SMIv2 . [I'm still pretending to be on topic.] > (surely the best hack of all time!) > ... I can't let that rest! My nominee isn't quite so colorful, but is truly beautiful: Ken Thompson's login hack . [I give up. We're now clearly off topic for erlang-questions. But if there's anyone out there who doesn't already know about Ken Thompson's classic hack, they should definitely read the article.] Cheers, Lon From Bruce@REDACTED Sun Nov 24 10:57:57 2002 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Sun, 24 Nov 2002 22:57:57 +1300 Subject: More ASN.1... Message-ID: <050601c2939f$f7813b40$dc21970a@norris> I have a few more questions about the Erlang ASN.1 compiler/runtime. Given an H.323 TransportAddress definition (used for addressing packets'n'stuff, definition below) I can get packets decoded with items such as: {ipAddress, {'TransportAddress_ipAddress', [10,151,33,220], 2634}}, However there doesn't seem to be any way of decoding/interpreting this directly, inasmuch as there is no auto-generated record definition 'TransportAddress_ipAddress' (or for any of the other choices). This is contrary to what I would have expected given that other choices do end up with records for their sub-sequences (such as, for example, the RasMessage choice - gives 'GatekeeperRequest' etc). I feel I must be missing something fundamental. I can of course define a record for myself, but I thought I should ask the question. Thanks in advance /Bruce H323 ASN.1 definition: TransportAddress ::= CHOICE { ipAddress SEQUENCE { ip OCTET STRING (SIZE(4)), port INTEGER(0..65535) }, ipSourceRoute SEQUENCE { ip OCTET STRING (SIZE(4)), port INTEGER(0..65535), route SEQUENCE OF OCTET STRING (SIZE(4)), routing CHOICE { strict NULL, loose NULL, ... }, ... }, ipxAddress SEQUENCE { node OCTET STRING (SIZE(6)), netnum OCTET STRING (SIZE(4)), port OCTET STRING (SIZE(2)) }, ip6Address SEQUENCE { ip OCTET STRING (SIZE(16)), port INTEGER(0..65535), ... }, netBios OCTET STRING (SIZE(16)), nsap OCTET STRING (SIZE(1..20)), nonStandardAddress NonStandardParameter, ... } From luke@REDACTED Sun Nov 24 21:47:41 2002 From: luke@REDACTED (Luke Gorrie) Date: 24 Nov 2002 21:47:41 +0100 Subject: Linkmania! In-Reply-To: <26745-75955@sneakemail.com> References: <26745-75955@sneakemail.com> Message-ID: "Lon Willett" writes: > I can't let that rest! My nominee isn't quite so colorful, but is truly > beautiful: Ken Thompson's login hack > . Yeah that's super cool :-) Thmopson cited an "unknown air force document" as the source of the idea, and that document (updated) actually turned up on slashdot recently: Thirty Years Later: Lessons from the Multics Security Evaluation http://domino.watson.ibm.com/library/cyberdig.nsf/1e4115aea78b6e7c85256b360066f0d4/fdefbebc9dd3e35485256c2c004b0f0d?OpenDocument&Highlight=0,multics Very nice story of choosing some major approaches to breaching security (hardware bugs, ...) and then setting out to break it in each way (with success.) Cheers, Luke From Sean.Hinde@REDACTED Mon Nov 25 10:28:37 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Mon, 25 Nov 2002 09:28:37 -0000 Subject: binding to a specific interface Message-ID: <04D356A3B172D611981B0008C791C3126BF566@imp02mbx.t-mobile.co.uk> There is indeed. It is awaits howls of anguish from documentation writers *and* purists an undocumented feature but I was playing with it the other day and it seems to work (well at least it allows the listen). The option is {ip, Address} Sean -----Original Message----- From: Bruce Fitzsimons To: erlang-questions@REDACTED Sent: 11/24/02 3:53 AM Subject: UDP: binding to a specific interface Guys'n'gals, I've just been spelunking the api docs, but I can't see a way to only listen to one interface (aka IP address) on a multi-interface machine. Surely there must be a way? /Bruce NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From klacke@REDACTED Mon Nov 25 10:51:41 2002 From: klacke@REDACTED (Klacke) Date: Mon, 25 Nov 2002 10:51:41 +0100 Subject: UDP: binding to a specific interface In-Reply-To: <04d201c2936d$06c5a650$dc21970a@norris>; from Bruce@Fitzsimons.org on Sun, Nov 24, 2002 at 04:53:19PM +1300 References: <04d201c2936d$06c5a650$dc21970a@norris> Message-ID: <20021125105141.A24331@bluetail.com> On Sun, Nov 24, 2002 at 04:53:19PM +1300, Bruce Fitzsimons wrote: > Guys'n'gals, > > I've just been spelunking the api docs, but I can't see a way to only listen > to one interface (aka IP address) on a multi-interface machine. Surely there > must be a way? > gen_tcp:listen(Port, [{ip, {127,0,0,1}}]). There are many many undocumented options for sockets. Tony Rogvall wrote that code some 5 years ago and it is still not documented. You need to read the code. Start with inet.erl /klacke -- Claes Wikstrom -- Caps lock is nowhere and Alteon WebSystems -- everything is under control http://www.bluetail.com/~klacke cellphone: +46 70 2097763 From klacke@REDACTED Mon Nov 25 10:54:05 2002 From: klacke@REDACTED (Klacke) Date: Mon, 25 Nov 2002 10:54:05 +0100 Subject: UDP: binding to a specific interface In-Reply-To: <20021125105141.A24331@bluetail.com>; from klacke@bluetail.com on Mon, Nov 25, 2002 at 10:51:41AM +0100 References: <04d201c2936d$06c5a650$dc21970a@norris> <20021125105141.A24331@bluetail.com> Message-ID: <20021125105405.B24331@bluetail.com> On Mon, Nov 25, 2002 at 10:51:41AM +0100, Klacke wrote: > On Sun, Nov 24, 2002 at 04:53:19PM +1300, Bruce Fitzsimons wrote: > > Guys'n'gals, > > > > I've just been spelunking the api docs, but I can't see a way to only listen > > to one interface (aka IP address) on a multi-interface machine. Surely there > > must be a way? > > > > > > gen_tcp:listen(Port, [{ip, {127,0,0,1}}]). or gen_udp:open(Port, [{ip, {127,0,0,1}}]). /klacke From Bruce@REDACTED Mon Nov 25 11:53:48 2002 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Mon, 25 Nov 2002 23:53:48 +1300 Subject: UDP: binding to a specific interface References: <04d201c2936d$06c5a650$dc21970a@norris> <20021125105141.A24331@bluetail.com> Message-ID: <05f301c29470$ef699fc0$dc21970a@norris> Thanks to everyone (Per, Vance, Sean, Klacke) for their help on this. /Bruce From bertil.karlsson@REDACTED Mon Nov 25 13:27:36 2002 From: bertil.karlsson@REDACTED (Bertil Karlsson) Date: Mon, 25 Nov 2002 13:27:36 +0100 Subject: More ASN.1... References: <050601c2939f$f7813b40$dc21970a@norris> Message-ID: <3DE21738.6E30B58D@uab.ericsson.se> You are absolutely right! The asn1 compiler should have generated a 'TransportAddress_ipAddress' record, and so also for each SEQUENCE/SET that is defined inside a "constructed type" (SEQUENCE, CHOICE, SET, SEQUENCE OF, SET OF) like in: MyType ::= CHOICE { a SEQUENCE {a INTEGER, b INTEGER} } This will result in a record 'MyType_a'. Due to a bug in the compiler no record is generated for a SEQUENCE in a CHOICE that has extensionmarks, like in: MyType2 ::= CHOICE { a SEQUENCE {a INTEGER, b INTEGER}, ... } The TransportAddress is a CHOICE with an extension mark. There will be a fix of this bug in the next release. Maybe the easiest workaround is to define missing records by hand. Bruce Fitzsimons wrote: > > I have a few more questions about the Erlang ASN.1 compiler/runtime. > > Given an H.323 TransportAddress definition (used for addressing > packets'n'stuff, definition below) I can get packets decoded with items such > as: > > {ipAddress, > {'TransportAddress_ipAddress', > [10,151,33,220], > 2634}}, > > However there doesn't seem to be any way of decoding/interpreting this > directly, inasmuch as there is no auto-generated record definition > 'TransportAddress_ipAddress' (or for any of the other choices). This is > contrary to what I would have expected given that other choices do end up > with records for their sub-sequences (such as, for example, the RasMessage > choice - gives 'GatekeeperRequest' etc). > > I feel I must be missing something fundamental. I can of course define a > record for myself, but I thought I should ask the question. > > Thanks in advance > > /Bruce > > H323 ASN.1 definition: > > TransportAddress ::= CHOICE > { > ipAddress SEQUENCE > { > ip OCTET STRING (SIZE(4)), > port INTEGER(0..65535) > }, > ipSourceRoute SEQUENCE > { > ip OCTET STRING (SIZE(4)), > port INTEGER(0..65535), > route SEQUENCE OF OCTET STRING (SIZE(4)), > routing CHOICE > { > strict NULL, > loose NULL, > ... > }, > ... > }, > ipxAddress SEQUENCE > { > node OCTET STRING (SIZE(6)), > netnum OCTET STRING (SIZE(4)), > port OCTET STRING (SIZE(2)) > }, > ip6Address SEQUENCE > { > ip OCTET STRING (SIZE(16)), > port INTEGER(0..65535), > ... > }, > netBios OCTET STRING (SIZE(16)), > nsap OCTET STRING (SIZE(1..20)), > nonStandardAddress NonStandardParameter, > ... > } -- / Bertil Karlsson From klacke@REDACTED Mon Nov 25 15:44:50 2002 From: klacke@REDACTED (Klacke) Date: Mon, 25 Nov 2002 15:44:50 +0100 Subject: inet_res.erl Message-ID: <20021125154450.B16354@bluetail.com> Folks, I was looking at inet_res.erl because I wanted to have gethostbyname/4 with the last arg being the searchlist for the resolver. While doing that, I found a couple of bugs in the code as well. It's almost amusing, but the fact is that nobody has ever run dns gethostbyname/3 (with a timeout) .. The code is +5 years old :-) Here's a patch with the bugs fixed + gethostbyname/4. /klacke -- Claes Wikstrom -- Caps lock is nowhere and Alteon WebSystems -- everything is under control http://www.bluetail.com/~klacke cellphone: +46 70 2097763 -------------- next part -------------- *** inet_res.erl.orig 2002-11-25 14:38:13.000000000 +0100 --- inet_res.erl 2002-11-25 14:28:04.000000000 +0100 *************** *** 26,37 **** %% (the example is for tcsh) ! -export([gethostbyname/1, gethostbyname/2, gethostbyname/3, gethostbyname_tm/3]). -export([gethostbyaddr/1, gethostbyaddr/2, gethostbyaddr_tm/2]). ! -export([getbyname/2, getbyname/3, ! getbyname_tm/3]). -export([nslookup/3, nslookup/4]). -export([nnslookup/4, nnslookup/5]). --- 26,38 ---- %% (the example is for tcsh) ! -export([gethostbyname/1, gethostbyname/2, ! gethostbyname/3,gethostbyname/4, gethostbyname_tm/3]). -export([gethostbyaddr/1, gethostbyaddr/2, gethostbyaddr_tm/2]). ! -export([getbyname/2, getbyname/3,getbyname/4, ! getbyname_tm/3, getbyname_tm/4]). -export([nslookup/3, nslookup/4]). -export([nnslookup/4, nnslookup/5]). *************** *** 43,48 **** --- 44,50 ---- -include("inet_dns.hrl"). -include("inet_int.hrl"). + -ifdef(DEBUG). -define(dbg(Fmt, Args), io:format(Fmt, Args)). -else. *************** *** 117,123 **** gethostbyaddr(IP,Timeout) -> Timer = inet:start_timer(Timeout), Res = gethostbyaddr_tm(IP,Timer), ! inet:stop_timer(Timeout), Res. gethostbyaddr_tm({A,B,C,D}, Timer) when ?ip(A,B,C,D) -> --- 119,125 ---- gethostbyaddr(IP,Timeout) -> Timer = inet:start_timer(Timeout), Res = gethostbyaddr_tm(IP,Timer), ! inet:stop_timer(Timer), Res. gethostbyaddr_tm({A,B,C,D}, Timer) when ?ip(A,B,C,D) -> *************** *** 201,219 **** gethostbyname(Name,Family) -> gethostbyname_tm(Name,Family,false). gethostbyname(Name,Family,Timeout) -> Timer = inet:start_timer(Timeout), Res = gethostbyname_tm(Name,Family,Timer), ! inet:stop_timer(Timeout), Res. ! ! gethostbyname_tm(Name,inet,Timer) -> ! getbyname_tm(Name,?S_A,Timer); ! gethostbyname_tm(Name,inet6,Timer) -> ! case getbyname_tm(Name,?S_AAAA,Timer) of {ok,HEnt} -> {ok,HEnt}; {error,nxdomain} -> ! case getbyname_tm(Name, ?S_A,Timer) of {ok, HEnt} -> %% rewrite to a ipv4 only ipv6 address {ok, --- 203,233 ---- gethostbyname(Name,Family) -> gethostbyname_tm(Name,Family,false). + gethostbyname(Name,Family,Timeout) -> Timer = inet:start_timer(Timeout), Res = gethostbyname_tm(Name,Family,Timer), ! inet:stop_timer(Timer), Res. ! gethostbyname(Name,Family,Timeout, SearchList) -> ! Timer = inet:start_timer(Timeout), ! Res = gethostbyname_tm(Name,Family,Timer, SearchList), ! inet:stop_timer(Timer), ! Res. ! ! ! ! ! gethostbyname_tm(Name, Family, Timer) -> ! gethostbyname_tm(Name, Family, Timer, get_searchlist()). ! ! gethostbyname_tm(Name,inet,Timer, SearchList) -> ! getbyname_tm(Name,?S_A,Timer, SearchList); ! gethostbyname_tm(Name,inet6,Timer,SearchList) -> ! case getbyname_tm(Name,?S_AAAA,Timer, SearchList) of {ok,HEnt} -> {ok,HEnt}; {error,nxdomain} -> ! case getbyname_tm(Name, ?S_A,Timer, SearchList) of {ok, HEnt} -> %% rewrite to a ipv4 only ipv6 address {ok, *************** *** 232,238 **** Error -> Error end; ! gethostbyname_tm(Name,Family,Timer) -> {error, einval}. %% -------------------------------------------------------------------------- --- 246,252 ---- Error -> Error end; ! gethostbyname_tm(Name,Family,Timer, SearchList) -> {error, einval}. %% -------------------------------------------------------------------------- *************** *** 246,259 **** getbyname(Name, Type) -> getbyname_tm(Name,Type,false). - getbyname(Name, Type, Timeout) -> Timer = inet:start_timer(Timeout), ! Res = getbyname_tm(Name, Type, Timer), ! inet:stop_timer(Timeout), Res. ! getbyname_tm(Name, Type, Timer) when list(Name) -> case type_p(Type) of true -> case inet_parse:visible_string(Name) of --- 260,279 ---- getbyname(Name, Type) -> getbyname_tm(Name,Type,false). getbyname(Name, Type, Timeout) -> + getbyname(Name, Type, Timeout, get_searchlist()). + + getbyname(Name, Type, Timeout, Slist) -> Timer = inet:start_timer(Timeout), ! Res = getbyname_tm(Name, Type, Timer, Slist), ! inet:stop_timer(Timer), Res. ! ! getbyname_tm(Name, Type, Timer) -> ! getbyname_tm(Name, Type, Timer, get_searchlist()). ! ! getbyname_tm(Name, Type, Timer, SearchList) when list(Name) -> case type_p(Type) of true -> case inet_parse:visible_string(Name) of *************** *** 261,275 **** true -> case inet_db:getbyname(Name,Type) of {ok, HEnt} -> {ok, HEnt}; ! _ -> res_getbyname(Name,Type,Timer) end end; false -> {error, formerr} end; ! getbyname_tm(Name,Type,Timer) when atom(Name) -> ! getbyname_tm(atom_to_list(Name), Type,Timer); ! getbyname_tm(_, _, _) -> {error, formerr}. type_p(Type) -> lists:member(Type, [?S_A, ?S_AAAA, ?S_MX, ?S_NS, --- 281,295 ---- true -> case inet_db:getbyname(Name,Type) of {ok, HEnt} -> {ok, HEnt}; ! _ -> res_getbyname(Name,Type,Timer, SearchList) end end; false -> {error, formerr} end; ! getbyname_tm(Name,Type,Timer, SearchList) when atom(Name) -> ! getbyname_tm(atom_to_list(Name), Type,Timer, SearchList); ! getbyname_tm(_, _, _,_) -> {error, formerr}. type_p(Type) -> lists:member(Type, [?S_A, ?S_AAAA, ?S_MX, ?S_NS, *************** *** 278,293 **** ?S_WKS, ?S_HINFO, ?S_TXT, ?S_SRV, ?S_UINFO, ?S_UID, ?S_GID]). ! res_getbyname(Name,Type,Timer) -> case dots(Name) of {0, Dot} -> res_getby_search(Name, Dot, ! get_searchlist(),nxdomain,Type,Timer); {_,Dot} -> case res_getby_query_alt(Name,Type,Timer) of {error,Reason} -> res_getby_search(Name, Dot, ! get_searchlist(),nxdomain,Type,Timer); Other -> Other end end. --- 298,313 ---- ?S_WKS, ?S_HINFO, ?S_TXT, ?S_SRV, ?S_UINFO, ?S_UID, ?S_GID]). ! res_getbyname(Name,Type,Timer, SearchList) -> case dots(Name) of {0, Dot} -> res_getby_search(Name, Dot, ! SearchList,nxdomain,Type,Timer); {_,Dot} -> case res_getby_query_alt(Name,Type,Timer) of {error,Reason} -> res_getby_search(Name, Dot, ! SearchList,nxdomain,Type,Timer); Other -> Other end end. From hal@REDACTED Mon Nov 25 16:43:01 2002 From: hal@REDACTED (Hal Snyder) Date: Mon, 25 Nov 2002 09:43:01 -0600 Subject: inet_res.erl In-Reply-To: <20021125154450.B16354@bluetail.com> (Klacke's message of "Mon, 25 Nov 2002 15:44:50 +0100") References: <20021125154450.B16354@bluetail.com> Message-ID: <871y593bay.fsf@ghidra.vail> Klacke writes: > I was looking at inet_res.erl because I wanted to have > gethostbyname/4 with the last arg being the searchlist for the > resolver. ... BTW since we use SRV records, we use inet_res:getbyname instead of gethostbyname. Just suggesting that getbyname become part of the documented interface, added to the inet(3) man page. From lennart.ohman@REDACTED Mon Nov 25 17:10:16 2002 From: lennart.ohman@REDACTED (Lennart =?iso-8859-1?Q?=D6hman?=) Date: Mon, 25 Nov 2002 17:10:16 +0100 Subject: New to Earlang References: <002b01c19536$087b8590$0300a8c0@print> Message-ID: <3DE24B68.3FAFF7AD@st.se> Inswitch Solutions - Erlang Evaluation wrote: > > Hi, > > I am new to Earlang, trying to evaluate if Erlang is appropiate for building a > fault tolerance commercial telecom prepaid platform, based on computer > telephony modules, with a replicated or distributed database of about 500.000 > to 1 millon subscribers. > > Now, Welcome to Erlang! :-) I believe Erlang is really a good choice for you. You list all the right words, fault tolerant and distributed to mention two. Ulf Wiger, chief architect of the Ericsson success ATM-switch AXD301 pointed out an article in the Ericsson internal newpaper "Contact" some time a go here on the mailing list. You will find an english version following this link: http://www.ericsson.com/about/publications/kon_con/contact/contarc/pdf/c19_02/14.pdf AXD301 is part of the ENGINE concept and has a control processor programmed in Erlang. Something like 1.5 million lines of Erlang code (Ulf, correct me if I'm wrong). > 1) Does anybody have a commercial good experience with Erlang? There are many people working for Ericsson, no longer working for Ericsson and even working for Nortel who can testify to that they have acomplished a lot of "good things" with extremely high quality on time with Erlang. Including my self. > > 2) Is it possible to obtain commercial email-support? If so, does anybody know > how much it costs? You can purchase a commercial license from Ericsson. There are also a few, including my own, consultancy companies who has Erlang experts. Best Regards, Lennart > > Thanks!! > > Regards, > > daniel > Daniel Fernandez > Inswitch Solutions ------------------------------------------------------------- Lennart Ohman phone : +46-8-587 623 27 Sjoland & Thyselius Telecom AB cellular: +46-70-552 6735 Sehlstedtsgatan 6 fax : +46-8-667 8230 SE-115 28 STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED From matthias@REDACTED Mon Nov 25 17:14:23 2002 From: matthias@REDACTED (Matthias Lang) Date: Mon, 25 Nov 2002 17:14:23 +0100 Subject: New to Earlang In-Reply-To: <002b01c19536$087b8590$0300a8c0@print> References: <002b01c19536$087b8590$0300a8c0@print> Message-ID: <15842.19551.151214.375613@antilipe.corelatus.se> Inswitch Solutions - Erlang Evaluation writes: > 1) Does anybody have a commercial good experience with Erlang? > 2) Is it possible to obtain commercial email-support? If so, > does anybody know how much it costs? >From the FAQ (http://www.erlang.org/faq/t1.html) 1.5. Who uses Erlang? The largest user of Erlang is (surprise!) Ericsson. Ericsson use it to write software used in telecommunications systems. Many (dozens) projects have used it, a particularly large one is the extremely scaleable AXD301 ATM switch. AXD301 has several hundred people working on it and the code volume has reached about 850 kloc of Erlang (and 1 Mloc of C/C++). Some of the other companies using Erlang are Bluetail/Alteon/Nortel (distributed, fault tolerant email system, SSL accelerator), Telia (a telecomms operator), the Eddie robust webserver and T-Mobile (previously one2one) (advanced call control services) and Corelatus (SS7 signalling black box). 1.6. Can I get commercial support for Erlang? Ericsson sells commercial Erlang support (tested binaries, help with porting, printed manuals, somewhere to turn to when a problem crops up, training courses, consulting). The support mail address for paid-up users is support@REDACTED Remember to put your licence ID in the subject line. There are also quite a few consulting companies. They can provide more direct support. Some of them are based in Sweden (e.g. Sj?land & Thysellus, ENEA Data) and others take jobs and run courses worldwide (e.g. http://www.erlang-consulting.com). I have no direct experience with any of these---Corelatus uses Erlang in a real product, but we haven't used consultants. Matthias From Sean.Hinde@REDACTED Mon Nov 25 19:19:08 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Mon, 25 Nov 2002 18:19:08 -0000 Subject: New to Earlang Message-ID: <04D356A3B172D611981B0008C791C3126BF577@imp02mbx.t-mobile.co.uk> Daniel, I've considered (several times) making such a system. I believe Erlang would be an excellent choice for such a scheme - in my case the only reason not to do so was that we already had a different system performing the same function! In our GSM network we have run mnesia nodes holding 1,000,000 rows replicated across two machines for the past 3 years or so and have not had a single outage of those systems other than for hardware or connectivity reasons. A few hints: We use mnesia fragmented tables which ensures that a single internal table rarely gets bigger than 100,000 rows (though I don't quite know why anymore on reflection!). The only tricky situation is when the replicated nodes lose contact with each other - the dreaded partitioned networks scenario. With only two nodes the solution is to restart one of the nodes once connection is restored, and that node will rebuild itself from the other node. This is quite straightforward but means that any updates on the restarted node are lost - this may be unacceptable in a prepayment system (peoples money at stake). One solution which springs to mind is to simply have a master/slave concept - route all updates through one node and set up the clients to only route traffic to the second node when the primary is unavailable. It is possible imagine situations where certain LAN failures result in a partition where the nodes can't see each other and some clients can randomly see single nodes. Another solution (perhaps more useful) is to set things up again so that mnesia replication is used and there is a Primary/Secondary node. Normally traffic would go to the primary node which would update the secondary as normal. If any traffic failed over to the standby node it would try to apply the change remotely on the Primary (Easy in Erlang - rpc:call/4). If this failed it could try locally (perhaps in a new local only copy of that customers data), append the change to a log file and pass this to the primary for application once the connection was back up. This should be OK for a prepaid type application because it doesn't matter too much which order money is added and removed so long as it ends up with the correct balance in the end (barring various bizarre stepped price plans which can be covered by weasel words about the order of charging of events in the end customer agreement). Oh, and, sticky locks might be handy if you have one master receiving all updates.. I'll be fascinated to see the outcome of your prototyping. Best of luck, Sean Hinde Intelligent Network Design Manager T-Mobile UK -----Original Message----- From: Inswitch Solutions - Erlang Evaluation To: erlang-questions@REDACTED Sent: 1/4/02 3:39 PM Subject: New to Earlang Hi, I am new to Earlang, trying to evaluate if Erlang is appropiate for building a fault tolerance commercial telecom prepaid platform, based on computer telephony modules, with a replicated or distributed database of about 500.000 to 1 millon subscribers. Now, 1) Does anybody have a commercial good experience with Erlang? 2) Is it possible to obtain commercial email-support? If so, does anybody know how much it costs? Thanks!! Regards, daniel Daniel Fernandez Inswitch Solutions NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From Bruce@REDACTED Mon Nov 25 20:21:34 2002 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Tue, 26 Nov 2002 08:21:34 +1300 Subject: More ASN.1... References: <050601c2939f$f7813b40$dc21970a@norris> <3DE21738.6E30B58D@uab.ericsson.se> Message-ID: <062e01c294b7$de748760$dc21970a@norris> Thanks Bertil, its good to know how it supposed to work. It should be even easier to do H.323 in the next release. Thanks again, Bruce ----- Original Message ----- From: "Bertil Karlsson" To: Sent: Tuesday, November 26, 2002 1:27 AM Subject: Re: More ASN.1... > You are absolutely right! The asn1 compiler should have generated a > 'TransportAddress_ipAddress' record, and so also for each SEQUENCE/SET > that is defined inside a "constructed type" (SEQUENCE, CHOICE, SET, > SEQUENCE OF, SET OF) like in: > > MyType ::= CHOICE { > a SEQUENCE {a INTEGER, b INTEGER} > } > > This will result in a record 'MyType_a'. > > Due to a bug in the compiler no record is generated for a SEQUENCE in a > CHOICE that has extensionmarks, like in: > MyType2 ::= CHOICE { > a SEQUENCE {a INTEGER, b INTEGER}, > ... > } > The TransportAddress is a CHOICE with an extension mark. > > There will be a fix of this bug in the next release. > Maybe the easiest workaround is to define missing records by hand. > > Bruce Fitzsimons wrote: > > > > I have a few more questions about the Erlang ASN.1 compiler/runtime. > > > > Given an H.323 TransportAddress definition (used for addressing > > packets'n'stuff, definition below) I can get packets decoded with items such > > as: > > > > {ipAddress, > > {'TransportAddress_ipAddress', > > [10,151,33,220], > > 2634}}, > > > > However there doesn't seem to be any way of decoding/interpreting this > > directly, inasmuch as there is no auto-generated record definition > > 'TransportAddress_ipAddress' (or for any of the other choices). This is > > contrary to what I would have expected given that other choices do end up > > with records for their sub-sequences (such as, for example, the RasMessage > > choice - gives 'GatekeeperRequest' etc). > > > > I feel I must be missing something fundamental. I can of course define a > > record for myself, but I thought I should ask the question. > > > > Thanks in advance > > > > /Bruce > > > > H323 ASN.1 definition: > > > > TransportAddress ::= CHOICE > > { > > ipAddress SEQUENCE > > { > > ip OCTET STRING (SIZE(4)), > > port INTEGER(0..65535) > > }, > > ipSourceRoute SEQUENCE > > { > > ip OCTET STRING (SIZE(4)), > > port INTEGER(0..65535), > > route SEQUENCE OF OCTET STRING (SIZE(4)), > > routing CHOICE > > { > > strict NULL, > > loose NULL, > > ... > > }, > > ... > > }, > > ipxAddress SEQUENCE > > { > > node OCTET STRING (SIZE(6)), > > netnum OCTET STRING (SIZE(4)), > > port OCTET STRING (SIZE(2)) > > }, > > ip6Address SEQUENCE > > { > > ip OCTET STRING (SIZE(16)), > > port INTEGER(0..65535), > > ... > > }, > > netBios OCTET STRING (SIZE(16)), > > nsap OCTET STRING (SIZE(1..20)), > > nonStandardAddress NonStandardParameter, > > ... > > } > > -- > / Bertil Karlsson From erlang@REDACTED Mon Nov 25 23:39:12 2002 From: erlang@REDACTED (Inswitch Solutions - Erlang Evaluation) Date: Mon, 25 Nov 2002 19:39:12 -0300 Subject: New to Earlang In-Reply-To: <00b701c19553$68f07da0$0300a8c0@print> Message-ID: <000e01c294d3$7e09d8a0$1100a8c0@notebook> Hello Sean, Thanks so much for your reply and your advices! Your personal experience is very useful for me, I really appreciate your comments. I have assigned today a development group who already started. I would like to ask you a couple more of questions, if you don't mind: Operative System Are Erlang and Mnesia supposed to be as stable in Windows as they are supposed to be in Unix? In other words, do you know about anyone who is using Windows for a commercial Erlang implementations? Mnesia backups Does Mnesia also support online database backups (to restore a database from scratch, when replicas are not available for any reason) Mnesia Queries I read something like "Mnesia has its own query language". Does mnesia support standard SQL queries? If not, is it a major issue for you? Software module's replicas Programming with Erlang, is it possible to create fault tolerance software modules, (not only the databases), as an "application server"? That is, two software modules running on different machines, either in a primary/secondary, or in a load sharing configuration. Support >From your experience, should all the available documentation, examples, language references, etc., together with this open source mailing list, be "enough" for a start up, or should I try to arrange some kind of commercial support? Everything seems to be well documented, proved, and tested, and I know that sometimes you obtain much faster answers from an "open source mailing list" than from a commercial support service. Thank you so much for your time! Best Regards, Daniel Daniel Fernandez INswitch Solutions T. 5989-9667353 -----Mensaje original----- De: Inswitch Solutions - Erlang Evaluation [mailto:erlang@REDACTED] Enviado el: viernes, 04 de enero de 2002 16:10 Para: daniel@REDACTED Asunto: Fw: New to Earlang ----- Original Message ----- From: "Sean Hinde" To: "'Inswitch Solutions - Erlang Evaluation '" ; Sent: Monday, November 25, 2002 3:19 PM Subject: RE: New to Earlang > Daniel, > > I've considered (several times) making such a system. I believe Erlang would > be an excellent choice for such a scheme - in my case the only reason not to > do so was that we already had a different system performing the same > function! > > In our GSM network we have run mnesia nodes holding 1,000,000 rows > replicated across two machines for the past 3 years or so and have not had a > single outage of those systems other than for hardware or connectivity > reasons. > > A few hints: > > We use mnesia fragmented tables which ensures that a single internal table > rarely gets bigger than 100,000 rows (though I don't quite know why anymore > on reflection!). > > The only tricky situation is when the replicated nodes lose contact with > each other - the dreaded partitioned networks scenario. With only two nodes > the solution is to restart one of the nodes once connection is restored, and > that node will rebuild itself from the other node. > > This is quite straightforward but means that any updates on the restarted > node are lost - this may be unacceptable in a prepayment system (peoples > money at stake). > > One solution which springs to mind is to simply have a master/slave concept > - route all updates through one node and set up the clients to only route > traffic to the second node when the primary is unavailable. It is possible > imagine situations where certain LAN failures result in a partition where > the nodes can't see each other and some clients can randomly see single > nodes. > > Another solution (perhaps more useful) is to set things up again so that > mnesia replication is used and there is a Primary/Secondary node. > > Normally traffic would go to the primary node which would update the > secondary as normal. If any traffic failed over to the standby node it would > try to apply the change remotely on the Primary (Easy in Erlang - > rpc:call/4). If this failed it could try locally (perhaps in a new local > only copy of that customers data), append the change to a log file and pass > this to the primary for application once the connection was back up. > > This should be OK for a prepaid type application because it doesn't matter > too much which order money is added and removed so long as it ends up with > the correct balance in the end (barring various bizarre stepped price plans > which can be covered by weasel words about the order of charging of events > in the end customer agreement). > > Oh, and, sticky locks might be handy if you have one master receiving all > updates.. > > I'll be fascinated to see the outcome of your prototyping. > > Best of luck, > > Sean Hinde > > Intelligent Network Design Manager > T-Mobile UK > > > -----Original Message----- > From: Inswitch Solutions - Erlang Evaluation > To: erlang-questions@REDACTED > Sent: 1/4/02 3:39 PM > Subject: New to Earlang > > Hi, > > I am new to Earlang, trying to evaluate if Erlang is appropiate for > building a fault tolerance commercial telecom prepaid platform, based on > computer telephony modules, with a replicated or distributed database of > about 500.000 to 1 millon subscribers. > > Now, > > 1) Does anybody have a commercial good experience with Erlang? > > 2) Is it possible to obtain commercial email-support? If so, does > anybody know how much it costs? > > Thanks!! > > Regards, > > daniel > Daniel Fernandez > Inswitch Solutions > > > > NOTICE AND DISCLAIMER: > This email (including attachments) is confidential. If you have received > this email in error please notify the sender immediately and delete this > email from your system without copying or disseminating it or placing any > reliance upon its contents. We cannot accept liability for any breaches of > confidence arising through use of email. Any opinions expressed in this > email (including attachments) are those of the author and do not necessarily > reflect our opinions. We will not accept responsibility for any commitments > made by our employees outside the scope of our business. We do not warrant > the accuracy or completeness of such information. > From anders@REDACTED Tue Nov 26 00:48:44 2002 From: anders@REDACTED (Anders Ramsell) Date: Tue, 26 Nov 2002 00:48:44 +0100 Subject: New to Earlang References: <000e01c294d3$7e09d8a0$1100a8c0@notebook> Message-ID: <3DE2B6DC.2010306@theheartofgold.org> Inswitch Solutions - Erlang Evaluation wrote: > > Operative System > Are Erlang and Mnesia supposed to be as stable in Windows as they are > supposed to be in Unix? In other words, do you know about anyone who is > using Windows for a commercial Erlang implementations? Yes, there are companies using Erlang for commercial applications running in Windows. The company I work for, Telia Promotor, develop a Contact Center server in Erlang and we run it in Windows. We also use Mnesia but not nearly as much as e.g. Sean Hinde does. Our primary database is MS SQL Server and we use Mnesia to cache data in Erlang to reduce access time. > Support >>From your experience, should all the available documentation, examples, > language references, etc., together with this open source mailing list, > be "enough" for a start up, or should I try to arrange some kind of > commercial support? Everything seems to be well documented, proved, and > tested, and I know that sometimes you obtain much faster answers from an > "open source mailing list" than from a commercial support service. We have only used the commercial support for our questions so I cannot compare which is faster but we don't have any complaints on either the quality or the speed of replies that way. I only read this list "for fun". /Anders From kent@REDACTED Tue Nov 26 01:35:50 2002 From: kent@REDACTED (Kent Boortz) Date: 26 Nov 2002 01:35:50 +0100 Subject: New to Earlang In-Reply-To: <000e01c294d3$7e09d8a0$1100a8c0@notebook> References: <000e01c294d3$7e09d8a0$1100a8c0@notebook> Message-ID: I'm one of the Erlang/OTP developers at Ericsson so this is not an "user" opinion. > Operative System > Are Erlang and Mnesia supposed to be as stable in Windows as they are > supposed to be in Unix? In other words, do you know about anyone who is > using Windows for a commercial Erlang implementations? We run daily build and test on Unix and Windows using the same test suites. The tests range from small tests of functions to tests of larger parts of the Erlang/OTP platform. > Support > >From your experience, should all the available documentation, examples, > language references, etc., together with this open source mailing list, > be "enough" for a start up, or should I try to arrange some kind of > commercial support? Everything seems to be well documented, proved, and > tested, and I know that sometimes you obtain much faster answers from an > "open source mailing list" than from a commercial support service. The advantage, in my opinion, with commercial support is - Your operating system and setup will get additional focus for corrections and for the daily build and test. We try to test all sorts of combinations of OTP releases, hardware and operating systems but the number of combinations makes it impossible to cover them all. We provide all corrections to the OpenSource releases but it is of course most important to us that paying customers feel they get corrections fast and that we in our testing try to find problems before they do. - You can request patches to correct problems you have found. - You get support directly from the developers of the product. We don't have a large slow organization, we are a small devoted team of developers. - You give us money to continue to support Erlang/OTP. Erlang/OTP will never die because of its excellent OpenSource community but having a team spend all day improving Erlang/OTP doesn't hurt ;-) There are lots of documentation for Erlang/OTP but I get a feeling that it lacks some direction in how to really design for and use Erlang/OTP. The result is that the full potential in the platform is not used. I may be wrong, but I think this is a bit of a problem. To my knowledge Ericsson don't give courses any longer but I think there are two that could help but not being a "user" myself again I may be wrong "Designing for and programming with Erlang/OTP" Supervision, start, restart, nodes, configuration, generic servers and mnesia. Resource locking and global names. Error recovery. Tools and basic debugging. How to design for OTP and how to avoid traps. How to design and write code that could be upgraded at runtime. How to write multinode solutions with failover (I want to know ;-). Difference between the development system and a target system and how to create a target system. "Debugging, tuning and maintaining systems built using Erlang/OTP" Inspect a running system like tracing, testing, tuning, memory, performance. More on mnesia like startup, how to recover from nodes with tables being out of sync. Disk logging. More on how to upgrade a running system. Special OS considerations (when and why enable more threads for I/O, memory handling, process communication, Windows services etc). Garbage collection and other internal details of the emulator that may help tracking down problems. DNS and other IP configuration. Overview of node administration using HTTP, SNMP or Corba, i.e. how to connect node data to maintenance interfaces. kent From vances@REDACTED Tue Nov 26 07:23:41 2002 From: vances@REDACTED (Vance Shipley) Date: Tue, 26 Nov 2002 01:23:41 -0500 Subject: undocumented inet options Message-ID: <20021126062341.GD46550@frogman.motivity.ca> Reply-To: Organization: Motivity Telecom Inc. I just discovered this wonderful undocumented function which tells you what undocumented functions are available. :) 1> inet:options(). [reuseaddr, keepalive, dontroute, linger, broadcast, sndbuf, recbuf, nodelay, buffer, header, active, packet, deliver, mode, multicast_if, multicast_ttl, multicast_loop, exit_on_close, high_watermark, low_watermark, bit8, send_timeout] From vances@REDACTED Tue Nov 26 07:29:41 2002 From: vances@REDACTED (Vance Shipley) Date: Tue, 26 Nov 2002 01:29:41 -0500 Subject: undocumented inet options In-Reply-To: <20021126062341.GD46550@frogman.motivity.ca> References: <20021126062341.GD46550@frogman.motivity.ca> Message-ID: <20021126062941.GE46550@frogman.motivity.ca> } tells you what undocumented functions are available. :) ^^^^^^^^^ ... and of course I meant "options". From sean.hinde@REDACTED Mon Nov 25 23:39:06 2002 From: sean.hinde@REDACTED (Sean Hinde) Date: Mon, 25 Nov 2002 22:39:06 +0000 Subject: Cursor keys for *NIX Message-ID: Does anyone else actually prefer cursor keys to CTRL-P, N, B, and F? I think I can understand the reasons for not putting support into the UNIX Erlang Shell (every xterm is different) but I think this should be a well enough understood problem that it would be possible to fix.. R10 maybe?? Alternatively does anyone know how to map the cursor keys temporarily to different bindings? Sean From hakanm@REDACTED Tue Nov 26 08:50:56 2002 From: hakanm@REDACTED (Hakan Millroth) Date: Tue, 26 Nov 2002 08:50:56 +0100 Subject: Commerical users? Message-ID: Does anyone have a list of companies using Erlang for product/service development? Thanks, H?kan Millroth Nortel Networks From matthias@REDACTED Tue Nov 26 09:44:25 2002 From: matthias@REDACTED (Matthias Lang) Date: Tue, 26 Nov 2002 09:44:25 +0100 Subject: Commerical users? In-Reply-To: References: Message-ID: <15843.13417.805424.738870@antilipe.corelatus.se> Hakan Millroth writes: > Does anyone have a list of companies using Erlang for product/service > development? I'd like to put in a 'me too'. The FAQ currently lists only - Ericsson - Bluetail/Alteon/Nortel (I should probably split this or stop referring to Bluetail altogether. Clues from Bluetail appreciated.) - Telia - Eddie (Is this project still alive? Should I be calling it Lodbroker?) - T-Mobil[e] - Corelatus as Erlang users with commercial intent. I wrote "if you want to be listed here, mail me" under the list. Maybe that's not inviting enough. The intent is to avoid pissing off people who, for one reason or another, don't want to be listed. Digging through conference presentations, I can come up with at least another 10 (Lucent, Vail, Sendmail, Synapse, Cellpoint, Mobilearts, Motivity, Creado, Snookles Music, Blue position) who appear to be using it for products. So, can I add you to the list? There must be more still; surely the mailing list isn't populated entirely by enthusiasts. Matthias From etxuwig@REDACTED Tue Nov 26 09:53:24 2002 From: etxuwig@REDACTED (Ulf Wiger) Date: Tue, 26 Nov 2002 09:53:24 +0100 (MET) Subject: New to Earlang In-Reply-To: <04D356A3B172D611981B0008C791C3126BF577@imp02mbx.t-mobile.co.uk> Message-ID: On Mon, 25 Nov 2002, Sean Hinde wrote: >Sean Hinde > >Intelligent Network Design Manager >T-Mobile UK Just to resolve an ambiguity in my internal parser -- should I read this as "Intelligent (Network Design Manager)", "(Intelligent Network) Design Manager", "(Intelligent (Network Design)) Manager", or ...? (: /Uffe -- Ulf Wiger, Senior Specialist, / / / Architecture & Design of Carrier-Class Software / / / Strategic Product & System Management / / / Ericsson Telecom AB, ATM Multiservice Networks From Sean.Hinde@REDACTED Tue Nov 26 09:59:38 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 26 Nov 2002 08:59:38 -0000 Subject: New to Earlang Message-ID: <04D356A3B172D611981B0008C791C3126BF57A@imp02mbx.t-mobile.co.uk> Hi, I have assigned today a development group who already started. I would like to ask you a couple more of questions, if you don't mind: Operative System Are Erlang and Mnesia supposed to be as stable in Windows as they are supposed to be in Unix? In other words, do you know about anyone who is using Windows for a commercial Erlang implementations? - I'm sure people do, but I'm not sure you will find much preference in most Telcos for running such a critical system on Windows. Mnesia backups Does Mnesia also support online database backups (to restore a database from scratch, when replicas are not available for any reason) - Yes it does, though the fully online restore from backup takes up a lot of memory and for a very large database might not be possible at all (after 4 GBytes the emulator will exit, though the recent support for 64 bit Erlang should fix this). There is an alternative method which is restore from fallback which requires a restart. Mnesia Queries I read something like "Mnesia has its own query language". Does mnesia support standard SQL queries? If not, is it a major issue for you? - No, and as we do not allow general queries to be run on our databases it is actually quite convenient that DBA type people cannot perfom them :). Having said that I would really have to agree with Anders Ramsell about using mnesia as a cache for the real time data but also streaming off the updates to an Oracle or similar database. This could be used as the "backup" and also for all the horrible queries folks like to run on pre-paid systems. Software module's replicas Programming with Erlang, is it possible to create fault tolerance software modules, (not only the databases), as an "application server"? That is, two software modules running on different machines, either in a primary/secondary, or in a load sharing configuration. - Yes, this is a core feature of the OTP parts of the system. Support >From your experience, should all the available documentation, examples, language references, etc., together with this open source mailing list, be "enough" for a start up, or should I try to arrange some kind of commercial support? Everything seems to be well documented, proved, and tested, and I know that sometimes you obtain much faster answers from an "open source mailing list" than from a commercial support service. - If you are on a short timescale it would probably be worth spending a bit of cash to get a quickstart into OTP - the docs are a little heavy going. We have had a support contract from pretty much the off and I must say it is extremely useful, very quick, and not very expensive either. Thank you so much for your time! - That's quite alright, it is a fascinating project and I look forward to hearing of your success with Erlang Sean -----Mensaje original----- De: Inswitch Solutions - Erlang Evaluation [mailto:erlang@REDACTED] Enviado el: viernes, 04 de enero de 2002 16:10 Para: daniel@REDACTED Asunto: Fw: New to Earlang ----- Original Message ----- From: "Sean Hinde" To: "'Inswitch Solutions - Erlang Evaluation '" ; Sent: Monday, November 25, 2002 3:19 PM Subject: RE: New to Earlang > Daniel, > > I've considered (several times) making such a system. I believe Erlang would > be an excellent choice for such a scheme - in my case the only reason not to > do so was that we already had a different system performing the same > function! > > In our GSM network we have run mnesia nodes holding 1,000,000 rows > replicated across two machines for the past 3 years or so and have not had a > single outage of those systems other than for hardware or connectivity > reasons. > > A few hints: > > We use mnesia fragmented tables which ensures that a single internal table > rarely gets bigger than 100,000 rows (though I don't quite know why anymore > on reflection!). > > The only tricky situation is when the replicated nodes lose contact with > each other - the dreaded partitioned networks scenario. With only two nodes > the solution is to restart one of the nodes once connection is restored, and > that node will rebuild itself from the other node. > > This is quite straightforward but means that any updates on the restarted > node are lost - this may be unacceptable in a prepayment system (peoples > money at stake). > > One solution which springs to mind is to simply have a master/slave concept > - route all updates through one node and set up the clients to only route > traffic to the second node when the primary is unavailable. It is possible > imagine situations where certain LAN failures result in a partition where > the nodes can't see each other and some clients can randomly see single > nodes. > > Another solution (perhaps more useful) is to set things up again so that > mnesia replication is used and there is a Primary/Secondary node. > > Normally traffic would go to the primary node which would update the > secondary as normal. If any traffic failed over to the standby node it would > try to apply the change remotely on the Primary (Easy in Erlang - > rpc:call/4). If this failed it could try locally (perhaps in a new local > only copy of that customers data), append the change to a log file and pass > this to the primary for application once the connection was back up. > > This should be OK for a prepaid type application because it doesn't matter > too much which order money is added and removed so long as it ends up with > the correct balance in the end (barring various bizarre stepped price plans > which can be covered by weasel words about the order of charging of events > in the end customer agreement). > > Oh, and, sticky locks might be handy if you have one master receiving all > updates.. > > I'll be fascinated to see the outcome of your prototyping. > > Best of luck, > > Sean Hinde > > Intelligent Network Design Manager > T-Mobile UK > > > -----Original Message----- > From: Inswitch Solutions - Erlang Evaluation > To: erlang-questions@REDACTED > Sent: 1/4/02 3:39 PM > Subject: New to Earlang > > Hi, > > I am new to Earlang, trying to evaluate if Erlang is appropiate for > building a fault tolerance commercial telecom prepaid platform, based on > computer telephony modules, with a replicated or distributed database of > about 500.000 to 1 millon subscribers. > > Now, > > 1) Does anybody have a commercial good experience with Erlang? > > 2) Is it possible to obtain commercial email-support? If so, does > anybody know how much it costs? > > Thanks!! > > Regards, > > daniel > Daniel Fernandez > Inswitch Solutions > > > > NOTICE AND DISCLAIMER: > This email (including attachments) is confidential. If you have received > this email in error please notify the sender immediately and delete this > email from your system without copying or disseminating it or placing any > reliance upon its contents. We cannot accept liability for any breaches of > confidence arising through use of email. Any opinions expressed in this > email (including attachments) are those of the author and do not necessarily > reflect our opinions. We will not accept responsibility for any commitments > made by our employees outside the scope of our business. We do not warrant > the accuracy or completeness of such information. > NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From eleberg@REDACTED Tue Nov 26 10:27:11 2002 From: eleberg@REDACTED (Bengt Kleberg) Date: Tue, 26 Nov 2002 10:27:11 +0100 (MET) Subject: Cursor keys for *NIX Message-ID: <200211260927.gAQ9RBr02621@cbe.ericsson.se> > Date: Mon, 25 Nov 2002 22:39:06 +0000 > Mime-Version: 1.0 (Apple Message framework v548) > Subject: Cursor keys for *NIX > From: Sean Hinde > Does anyone else actually prefer cursor keys to CTRL-P, N, B, and F? i do not use CTRL-, nor cursor keys. > I think I can understand the reasons for not putting support into the > UNIX Erlang Shell (every xterm is different) but I think this should be i use 9term. recommended. bengt From r.raschke@REDACTED Tue Nov 26 11:05:01 2002 From: r.raschke@REDACTED (Robert Raschke) Date: Tue, 26 Nov 2002 10:05:01 +0000 Subject: Cursor keys for *NIX In-Reply-To: (Bengt Kleberg Tue, 26 Nov 2002 10:27:11 +0100) <200211260927.gAQ9RBr02621@cbe.ericsson.se> References: <200211260927.gAQ9RBr02621@cbe.ericsson.se> Message-ID: <4754.1038305101@blueyonder.co.uk> On Tue, 26 Nov 2002 around 10:27, Bengt wrote: > i use 9term. recommended. Oooh, yes, seconded. Best terminal window around. you can find sources for X and Unix at http://www.cs.su.oz.au/~matty/9term/index.html . And, here's the nice bit, you can also get it as part of the Plan 9 tools under Windows (although you may have to get used to the rc shell): http://plan9.bell-labs.com/plan9dist/ and then Additional Software, after the license page you will find '9pm' as the first available package. Robby From etxuwig@REDACTED Tue Nov 26 11:09:29 2002 From: etxuwig@REDACTED (Ulf Wiger) Date: Tue, 26 Nov 2002 11:09:29 +0100 (MET) Subject: New to Earlang In-Reply-To: <000e01c294d3$7e09d8a0$1100a8c0@notebook> Message-ID: On Mon, 25 Nov 2002, Inswitch Solutions - Erlang Evaluation wrote: >Support >From your experience, should all the available >documentation, examples, language references, etc., >together with this open source mailing list, be "enough" >for a start up, or should I try to arrange some kind of >commercial support? In my experience, starting out with a course on Erlang and OTP is a very good investment. The Erlang language is quite easy to get into, and you'll be writing exciting programs shortly after picking it up. Still, you are likely to miss out on many of the goodies in Erlang/OTP. At last year's Erlang User Conference, a paper was presented that discussed this very topic: http://www.erlang-consulting.com/euc2001/euc2001.pdf As far as the commercial support goes, I can only say that the OTP team has been terriffic during the six years when we've been a customer of theirs. They always (yes, always) ship on time, and with amazing quality. Open Source is... well, Open Source -- you will usually get very quick and informed answers to your questions, and someone may even fix a problem of yours simply because it's (a) an interesting problem to solve, or (b) they have the same problem. This happens surprisingly often. However, chances are that you will stumble across some issue that is important to you, but not to anyone else on the list (I'm sure I could present a fairly long list of such issues from our project...) When this happens, it surely pays off to have a commercial support contract, and someone that will take the time to fix it (and make sure that the problem doesn't re-appear) Both ordering a course and getting commercial support can be regarded as insurance. In the end, it certainly depends on whether you'll develop on a shoestring, or if you intend to put some serious money on the line(*). My recommendation is: go with both. You'll be spending your money wisely(**). /Uffe (*) Actually, I'll say this from experience, if you don't have the money to go for commercial support, you should probably think twice about going for designing a telecom product. ;-) (**) Just to clarify: None of your money will end up in my pockets, so this is pro-bono advice. -- Ulf Wiger, Senior Specialist, / / / Architecture & Design of Carrier-Class Software / / / Strategic Product & System Management / / / Ericsson Telecom AB, ATM Multiservice Networks From eleberg@REDACTED Tue Nov 26 11:55:57 2002 From: eleberg@REDACTED (Bengt Kleberg) Date: Tue, 26 Nov 2002 11:55:57 +0100 (MET) Subject: New to Earlang Message-ID: <200211261055.gAQAtvr15698@cbe.ericsson.se> > X-Authentication-Warning: cbe1066.al.sw.ericsson.se: etxuwig owned process doing -bs > Date: Tue, 26 Nov 2002 11:09:29 +0100 (MET) > From: Ulf Wiger > X-X-Sender: etxuwig@REDACTED ...deleted about support > However, chances are that you will stumble across some issue > that is important to you, but not to anyone else on the > list (I'm sure I could present a fairly long list of such one item in such a list: erlang io:get_line() does not detect end-of-file when reading from stdin on windows. on unix this works, and no paying customer is interested in this (windows) problem. bengt From robert.virding@REDACTED Tue Nov 26 11:56:26 2002 From: robert.virding@REDACTED (Robert Virding) Date: Tue, 26 Nov 2002 11:56:26 +0100 Subject: Hexadecimal conversions References: <58697114-FCFC-11D6-8C81-000393915E94@nada.kth.se><15836.42210.835900.580494@antilipe.corelatus.se> <20021121140510.1b864d4f.cpressey@catseye.mb.ca> <003801c291b8$53f26640$8100a8c0@virding.org> Message-ID: <3DE3535A.6050702@telia.com> Robert Virding wrote: > ----- Original Message ----- > From: "Chris Pressey" > To: > Cc: > Sent: Thursday, November 21, 2002 9:05 PM > Subject: Re: Hexadecimal conversions > >>Also on the subject, there was once on this list some code to add hex >>formatting to io_lib:format/2, but I don't know if it ever made it into >>OTP... >> >>-Chri > > A few different attempts at adding hex output to io_lib:fwrite :-) have been done. > I did a reasonably complete one which gave some control over output format. > I will try and find it and post it to this list so you can see if this is what you want/need. > > Robert Looking back through old erlang-questions entries I see that earlier this year I posted a modification to io_lib_format.erl which had both signed based integers and binary/hex output. I am reposting it, and invite comments. If no one really complains loadly then perhaps it can go into the next distribution? There is one small bug which needs fixing. Some examples: Eshell V2001.09.13 (abort with ^G) 1> io:fwrite("~#~n", [4711]). %Default is 8 8#11147 ok 2> io:fwrite("~#~n", [-4711]). -8#11147 ok 3> io:fwrite("~.16#~n", [-4711]). -16#1267 ok 4> io:fwrite("~.16#~n", [4711]). 16#1267 ok 5> io:fwrite("~28.16#~n", [4711]). 16#1267 ok 6> io:fwrite("~b~n", [4711]). %Default is 32 bits 00000000000000000001001001100111 ok 7> io:fwrite("~b~n", [-4711]). 11111111111111111110110110011001 ok 8> io:fwrite("~.16b~n", [-4711]). %Default is 32 bits 1110110110011001 ok 9> io:fwrite("~.16b~n", [4711]). 0001001001100111 ok 10> io:fwrite("~.16x~n", [4711]). 1267 ok 11> io:fwrite("~.16x~n", [-4711]). ed99 ok 12> io:fwrite("~x~n", [-4711]). ffffed99 ok 13> io:fwrite("~x~n", [4711]). 00001267 ok The precision field is used for the base with ~# and the number of bits in ~b/~x. The field width is still the field width. ~b/~x are really only meant to be used to display bits as it is not guaranteed that if you read them back again you will get the same value. Why is left as an exercise to the reader. :-) Comments? Robert -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: io_lib_format.erl URL: From Jouni.Ryno@REDACTED Tue Nov 26 13:09:18 2002 From: Jouni.Ryno@REDACTED (Jouni Ryno) Date: 26 Nov 2002 14:09:18 +0200 Subject: Commerical users? In-Reply-To: <15843.13417.805424.738870@antilipe.corelatus.se> References: <15843.13417.805424.738870@antilipe.corelatus.se> Message-ID: <1038312558.1323.29.camel@catmind.ryno> On Tue, 2002-11-26 at 10:44, Matthias Lang wrote: > Hakan Millroth writes: > > Does anyone have a list of companies using Erlang for product/service > > development? > > > There must be more still; surely the mailing list isn't populated > entirely by enthusiasts. > > Matthias You could add the Finnish Meteorological Institute, although our use is rather small (but vital). Only 2 persons using it. We use it in our magnetometer stations, simply to read and store data from AD-converters. But as a bonus we get real time monitoring via the gen_server :-) Then we use it in space instrument ground support systems, 4-5 different instruments. Rationale for using Erlang is in timing the telecommands and buffering the telemetry before it's displayed/stored. I think it's general management view, that on should use only one or two languages in development, in order to be have skillful people to support and backup development. On the other hand, in my opinion, any skillful programmer should be able to grasp the concept of any language. So even if I cannot say I really know Erlang, I'm can do much better multiprosessing / threading in it, than in for example in C or Ada. Well, OCCAM would be nice ... regards Jouni -- Jouni Ryno Finnish Meteorological Institute From erlang@REDACTED Tue Nov 26 13:10:46 2002 From: erlang@REDACTED (Inswitch Solutions - Erlang Evaluation) Date: Tue, 26 Nov 2002 09:10:46 -0300 Subject: New to Earlang In-Reply-To: Message-ID: <000501c29544$dee7e790$0f00a8c0@notebook> Thanks Uffe so much for your comments! And the conference paper was clarifying. Regards, daniel Daniel Fernandez INswitch Solutions T. 5989-9667353 -----Mensaje original----- De: Ulf Wiger [mailto:etxuwig@REDACTED] Enviado el: martes, 26 de noviembre de 2002 7:09 Para: Inswitch Solutions - Erlang Evaluation CC: erlang-questions@REDACTED Asunto: RE: New to Earlang On Mon, 25 Nov 2002, Inswitch Solutions - Erlang Evaluation wrote: >Support >From your experience, should all the available >documentation, examples, language references, etc., >together with this open source mailing list, be "enough" >for a start up, or should I try to arrange some kind of >commercial support? In my experience, starting out with a course on Erlang and OTP is a very good investment. The Erlang language is quite easy to get into, and you'll be writing exciting programs shortly after picking it up. Still, you are likely to miss out on many of the goodies in Erlang/OTP. At last year's Erlang User Conference, a paper was presented that discussed this very topic: http://www.erlang-consulting.com/euc2001/euc2001.pdf As far as the commercial support goes, I can only say that the OTP team has been terriffic during the six years when we've been a customer of theirs. They always (yes, always) ship on time, and with amazing quality. Open Source is... well, Open Source -- you will usually get very quick and informed answers to your questions, and someone may even fix a problem of yours simply because it's (a) an interesting problem to solve, or (b) they have the same problem. This happens surprisingly often. However, chances are that you will stumble across some issue that is important to you, but not to anyone else on the list (I'm sure I could present a fairly long list of such issues from our project...) When this happens, it surely pays off to have a commercial support contract, and someone that will take the time to fix it (and make sure that the problem doesn't re-appear) Both ordering a course and getting commercial support can be regarded as insurance. In the end, it certainly depends on whether you'll develop on a shoestring, or if you intend to put some serious money on the line(*). My recommendation is: go with both. You'll be spending your money wisely(**). /Uffe (*) Actually, I'll say this from experience, if you don't have the money to go for commercial support, you should probably think twice about going for designing a telecom product. ;-) (**) Just to clarify: None of your money will end up in my pockets, so this is pro-bono advice. -- Ulf Wiger, Senior Specialist, / / / Architecture & Design of Carrier-Class Software / / / Strategic Product & System Management / / / Ericsson Telecom AB, ATM Multiservice Networks From enano@REDACTED Tue Nov 26 13:29:17 2002 From: enano@REDACTED (Miguel Barreiro Paz) Date: Tue, 26 Nov 2002 13:29:17 +0100 (CET) Subject: Cursor keys for *NIX In-Reply-To: Message-ID: > Does anyone else actually prefer cursor keys to CTRL-P, N, B, and F? I don't see a reason for not doing both (just like emacs, say). As people around read your message, an unanimous "yes, please, use the cursors!" was heard here :-) Regards, Miguel From gerd@REDACTED Tue Nov 26 14:58:16 2002 From: gerd@REDACTED (Gerd Flaig) Date: Tue, 26 Nov 2002 14:58:16 +0100 Subject: Interactive Mnemosyne Message-ID: Hi, how can I make interactive queries? Simple queries like 17> mnesia:transaction(fun() -> mnesia:all_keys(numberplan) end). are not powerful enough to explore the database in the hope of finding interesting properties of the data that's contained therein. Since Mnemosyne is based on a parse transform, I assume it's currently not possible to use it on the command line. Is there another solution? Goodbyte, Gerd. -- Gerd Flaig Technik gerd@REDACTED Bei Schlund + Partner AG Erbprinzenstr. 4-12 D-76133 Karlsruhe Physics is like sex: sure, it may give some practical results, but that's not why we do it. -- Richard Feynman From hakan@REDACTED Tue Nov 26 15:52:08 2002 From: hakan@REDACTED (Hakan Mattsson) Date: Tue, 26 Nov 2002 15:52:08 +0100 (MET) Subject: Interactive Mnemosyne In-Reply-To: Message-ID: On Tue, 26 Nov 2002, Gerd Flaig wrote: gerd> how can I make interactive queries? Simple queries like gerd> gerd> 17> mnesia:transaction(fun() -> mnesia:all_keys(numberplan) end). gerd> gerd> are not powerful enough to explore the database in the hope of finding gerd> interesting properties of the data that's contained therein. Since gerd> Mnemosyne is based on a parse transform, I assume it's currently not gerd> possible to use it on the command line. Is there another solution? There is a function in Mnemosyne called string_to_handle that compiles Mnemosyne queries from strings. The function is depricated, unsupported and broken, but you can search the mailing list archive for 'string_to_handle' if you want to (fix it and) play with it. For production code I would avoid Mnemosyne as far as possible, and give mnesia:select a try instead. /H?kan From vances@REDACTED Tue Nov 26 17:52:33 2002 From: vances@REDACTED (Vance Shipley) Date: Tue, 26 Nov 2002 11:52:33 -0500 Subject: Cursor keys for *NIX In-Reply-To: References: Message-ID: <20021126165233.GJ46550@frogman.motivity.ca> On Mon, Nov 25, 2002 at 10:39:06PM +0000, Sean Hinde wrote: } Does anyone else actually prefer cursor keys to CTRL-P, N, B, and F? Since the above key bindings mean nothing to me I have never used them. I'll cast my vote for another set which probably means little to you: -H, -J, -K, -L If we had command line editing in the erlang shell as it works in most modern Unix shells it would be a wonderful thing. I use the shell very often. -Vance } I think I can understand the reasons for not putting support into the } UNIX Erlang Shell (every xterm is different) but I think this should be } a well enough understood problem that it would be possible to fix.. R10 } maybe?? } } Alternatively does anyone know how to map the cursor keys temporarily } to different bindings? } } Sean From cleverjulian@REDACTED Tue Nov 26 18:51:40 2002 From: cleverjulian@REDACTED (Julian Fondren) Date: Tue, 26 Nov 2002 12:51:40 -0500 Subject: Interactively-defined functions Message-ID: This should be a gen_server, but I'm too busy right now to clean it up -- hopefully this is clear enough. I won't be available to respond to email (and my hotmail account will probably be frozen before I can get back to it), sorry. Note: The server's state is a list of parsed functions -module(shell_funs). -author('cleverjulian@REDACTED'). -export([start/0, load/0, save/0, list/0, show/2, add/0, add/1, add/3, remove/2, get/2]). -export([loop/1]). -define(SERVER, ?MODULE). % ---------------------------------------------------------------------- start() -> register(?SERVER, spawn(?MODULE, loop, [[]])). % ---------------------------------------------------------------------- load() -> Funs = load_funs(), ?SERVER ! {load, Funs}, ok. save() -> save_funs(funs()). % ---------------------------------------------------------------------- list() -> lists:map(fun name_of_fun/1, funs()). show(Name, Arity) -> case fun_by_name of {ok, Fun} -> io:format("~s", [erl_pp:function(Fun)]); not_found -> not_found end. get(Name, Arity) -> ?SERVER ! {self(), get, Name, Arity}, receive {?SERVER, function, Fun} -> {ok, Fun}; {?SERVER, not_found} -> not_found end. % ---------------------------------------------------------------------- add() -> {ok, Fun={function, _What_is_this, Name, Arity, _Clauses}, _} = io:parse_erl_form(': '), ?SERVER ! {add, Fun, Name, Arity}, ok. add(FunString) -> {ok, Tokens, _} = erl_scan:string(FunString), {ok, Fun={function, _What_is_this, Name, Arity, _Clauses}} = erl_parse:parse_form(Tokens), ?SERVER ! {add, Fun, Name, Arity}, ok. add(Fun, Name, Arity) -> ?SERVER ! {add, Fun, Name, Arity}, ok. remove(Name, Arity) -> ?SERVER ! {remove, Name, Arity}. % ---------------------------------------------------------------------- funs() -> ?SERVER ! {self(), save}, receive {?SERVER, functions, Funs} -> Funs end. % ---------------------------------------------------------------------- loop(Funs) -> receive {add, Fun, Name, Arity} -> NewFuns = [Fun|case fun_by_name(Name, Arity, Funs) of {ok, CollideFun} -> lists:delete(CollideFun, Funs); not_found -> Funs end], make_module(NewFuns), loop(NewFuns); {remove, Name, Arity} -> case fun_by_name(Name, Arity, Funs) of {ok, Fun} -> NewFuns = lists:delete(Fun, Funs), make_module(NewFuns), loop(NewFuns); not_found -> loop(Funs) end; {load, Funs1} -> make_module(Funs1), loop(Funs1); {Pid, save} -> Pid ! {?SERVER, functions, Funs}, loop(Funs); {Pid, get, Name, Arity} -> case fun_by_name(Name, Arity, funs) of {ok, Fun} -> Pid ! {?SERVER, function, Fun}; not_found -> Pid ! {?SERVER, not_found} end, loop(Funs) end. % ---------------------------------------------------------------------- name_of_fun({function, _What_is_this, Name, Arity, _Clauses}) -> {Name, Arity}. fun_by_name(Name, Arity, [Fun={function, _What_is_this, Name, Arity, _Clauses}|_]) -> {ok, Fun}; fun_by_name(Name, Arity, [_|T]) -> fun_by_name(Name, Arity, T); fun_by_name(_, _, []) -> not_found. % ---------------------------------------------------------------------- the_save_file() -> os:getenv("HOME") ++ "/.user_default.erl". load_funs() -> {ok, Bin} = file:read_file(the_save_file()), functions(binary_to_list(Bin)). save_funs(Funs) -> % Syntax error: % FunStrings = lists:map(fun erl_pp:function/1, Funs), FunStrings = lists:map(fun (F) -> erl_pp:function(F) end, Funs), file:write_file(the_save_file(), FunStrings). functions([]) -> []; functions(S) -> case erl_scan:tokens([], S, 0) of {done, {ok, Tokens, _}, Rest} -> {ok, Parsed} = erl_parse:parse_form(Tokens), [Parsed|functions(Rest)] end. make_module(Funs) -> {ok, Module, Bin} = compile:forms([{attribute,1,module,user_default}|Funs], [export_all]), code:load_binary(Module, the_save_file(), Bin). _________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail From Sean.Hinde@REDACTED Tue Nov 26 19:03:09 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 26 Nov 2002 18:03:09 -0000 Subject: Cursor keys for *NIX Message-ID: <04D356A3B172D611981B0008C791C3126BF57B@IMP02MBX> > On Mon, Nov 25, 2002 at 10:39:06PM +0000, Sean Hinde wrote: > } Does anyone else actually prefer cursor keys to CTRL-P, N, > B, and F? > > Since the above key bindings mean nothing to me I have never > used them. > I'll cast my vote for another set which probably means little to you: > > -H, -J, -K, -L > > If we had command line editing in the erlang shell as it works in most > modern Unix shells it would be a wonderful thing. I use the shell > very often. Exactly my point, there IS command line editing in the Erlang shell! It just requires use of Emacs keybindings rather than vi/pico/etc bindings. I sense a commercial support feature request coming on :) Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From luke@REDACTED Tue Nov 26 19:10:11 2002 From: luke@REDACTED (Luke Gorrie) Date: 26 Nov 2002 19:10:11 +0100 Subject: Cursor keys for *NIX In-Reply-To: <20021126165233.GJ46550@frogman.motivity.ca> References: <20021126165233.GJ46550@frogman.motivity.ca> Message-ID: Vance Shipley writes: > If we had command line editing in the erlang shell as it works in most > modern Unix shells it would be a wonderful thing. I use the shell > very often. Unix-shell-equivalent command line editing in Erlang? What a hideous downgrade! (We all run the erlang shell in an Emacs buffer with erlang-mode's M-x run-erlang, right? :-)) Cheers, Luke From enano@REDACTED Tue Nov 26 19:11:59 2002 From: enano@REDACTED (Miguel Barreiro Paz) Date: Tue, 26 Nov 2002 19:11:59 +0100 (CET) Subject: Cursor keys for *NIX In-Reply-To: <20021126165233.GJ46550@frogman.motivity.ca> Message-ID: > On Mon, Nov 25, 2002 at 10:39:06PM +0000, Sean Hinde wrote: > } Does anyone else actually prefer cursor keys to CTRL-P, N, B, and F? > > Since the above key bindings mean nothing to me I have never used them. > I'll cast my vote for another set which probably means little to you: > > -H, -J, -K, -L Oh, the latest incarnation of my-vi-is-bigger-than-your-emacs war :-) > If we had command line editing in the erlang shell as it works in most > modern Unix shells it would be a wonderful thing. I use the shell > very often. Bash and ksh both support emacs-style key commands, thanks god :-) In practical terms: ideally the erl shell should be configurable somehow (just as bash parses an .inputrc file to redefine keys and allow, say, vi-style keys). I for one can certainly live with the current keys, anyway. Regards, Miguel From not@REDACTED Tue Nov 26 19:12:07 2002 From: not@REDACTED (Gordon Beaton) Date: 26 Nov 2002 18:12:07 GMT Subject: Cursor keys for *NIX References: <04D356A3B172D611981B0008C791C3126BF57B@IMP02MBX> Message-ID: On 26 Nov 2002 18:03:09 GMT, Sean Hinde wrote: >> On Mon, Nov 25, 2002 at 10:39:06PM +0000, Sean Hinde wrote: >> } Does anyone else actually prefer cursor keys to CTRL-P, N, >> B, and F? >> >> Since the above key bindings mean nothing to me I have never >> used them. >> I'll cast my vote for another set which probably means little to you: >> >> -H, -J, -K, -L >> >> If we had command line editing in the erlang shell as it works in most >> modern Unix shells it would be a wonderful thing. I use the shell >> very often. > > Exactly my point, there IS command line editing in the Erlang shell! > It just requires use of Emacs keybindings rather than vi/pico/etc > bindings. > > I sense a commercial support feature request coming on :) If Erlang used the readline library (at least on those platforms where it is supported) then everyone could use the command line editing keys they like best, and their settings would be consistent across all programs that use readline. Just an idea... /gordon -- [ do not send me private copies of your followups ] g o r d o n . b e a t o n @ e r i c s s o n . c o m From vances@REDACTED Tue Nov 26 18:59:32 2002 From: vances@REDACTED (Vance Shipley) Date: Tue, 26 Nov 2002 12:59:32 -0500 Subject: Cursor keys for *NIX In-Reply-To: References: <20021126165233.GJ46550@frogman.motivity.ca> Message-ID: <20021126175932.GM46550@frogman.motivity.ca> Refusing to be baited into that one I'll just point out that modern shells have selectable key bindings for either emacs or vi users. -Vance On Tue, Nov 26, 2002 at 07:10:11PM +0100, Luke Gorrie wrote: } } (We all run the erlang shell in an Emacs buffer with erlang-mode's M-x } run-erlang, right? :-)) } } Cheers, } Luke From Sean.Hinde@REDACTED Tue Nov 26 19:29:53 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 26 Nov 2002 18:29:53 -0000 Subject: New to Earlang Message-ID: <04D356A3B172D611981B0008C791C3126BF57E@IMP02MBX> > On Mon, 25 Nov 2002, Sean Hinde wrote: > > >Sean Hinde > > > >Intelligent Network Design Manager > >T-Mobile UK > > Just to resolve an ambiguity in my internal parser -- should > I read this as "Intelligent (Network Design Manager)", > "(Intelligent Network) Design Manager", "(Intelligent > (Network Design)) Manager", or ...? (: > Aren't job titles fun! Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From richardc@REDACTED Tue Nov 26 19:30:45 2002 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 26 Nov 2002 19:30:45 +0100 (MET) Subject: Key bindings In-Reply-To: Message-ID: For those of you who are not afraid to modify library modules, you can always change the behaviour of the `edlin' module (yes, no kidding, it's lib/stdlib/src/edlin.erl) as you best please. This is the module that the shell uses to read the user input. /Richard Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://user.it.uu.se/~richardc/ From vances@REDACTED Tue Nov 26 19:14:35 2002 From: vances@REDACTED (Vance Shipley) Date: Tue, 26 Nov 2002 13:14:35 -0500 Subject: Cursor keys for *NIX In-Reply-To: References: <04D356A3B172D611981B0008C791C3126BF57B@IMP02MBX> Message-ID: <20021126181435.GP46550@frogman.motivity.ca> And this is what I mean by "as it works in modern shells". Full command line editing like deleting words and replacing text, etc. Readline is the proper solution to this problem especially because it is agnostic. -Vance On Tue, Nov 26, 2002 at 06:12:07PM +0000, Gordon Beaton wrote: } } If Erlang used the readline library (at least on those platforms where } it is supported) then everyone could use the command line editing keys } they like best, and their settings would be consistent across all } programs that use readline. Just an idea... } } /gordon From Sean.Hinde@REDACTED Tue Nov 26 19:38:30 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 26 Nov 2002 18:38:30 -0000 Subject: Cursor keys for *NIX Message-ID: <04D356A3B172D611981B0008C791C3126BF581@IMP02MBX> > (We all run the erlang shell in an Emacs buffer with erlang-mode's M-x > run-erlang, right? :-)) C-x 2 C-x 1 C-x C-s Does me.. Was I missing something? Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From Sean.Hinde@REDACTED Tue Nov 26 19:44:19 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 26 Nov 2002 18:44:19 -0000 Subject: undocumented inet options Message-ID: <04D356A3B172D611981B0008C791C3126BF582@IMP02MBX> Hi, > I just discovered this wonderful undocumented function which > tells you what undocumented functions are available. :) > > > 1> inet:options(). > [reuseaddr, ... > bit8, > send_timeout] > Ahh, but now you are missing the ones not documented in inet:get_options()! Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From matthias@REDACTED Tue Nov 26 19:57:37 2002 From: matthias@REDACTED (Matthias Lang) Date: Tue, 26 Nov 2002 19:57:37 +0100 Subject: Cursor keys for *NIX In-Reply-To: References: <04D356A3B172D611981B0008C791C3126BF57B@IMP02MBX> Message-ID: <15843.50209.282946.931213@antilipe.corelatus.se> Gordon Beaton writes: > If Erlang used the readline library (at least on those platforms where > it is supported) then everyone could use the command line editing keys > they like best, and their settings would be consistent across all > programs that use readline. Just an idea... I don't think that's allowed: Readline is free software, distributed under the terms of the GNU General Public License, version 2. This means that if you want to use Readline in a program that you release or distribute to anyone, the program must be free software and have a GPL-compatible license. The Erlang licence is, I think, based on the NPL, and the NPL is explicitly listed as not GPL compatible. Matthias (IANAL) From vances@REDACTED Tue Nov 26 19:44:48 2002 From: vances@REDACTED (Vance Shipley) Date: Tue, 26 Nov 2002 13:44:48 -0500 Subject: Key bindings In-Reply-To: References: Message-ID: <20021126184448.GS46550@frogman.motivity.ca> Having looked at that I see now that if I were emacs literate I could probably do all the things I would want that readline provides. I guess I'll shut up now and either stay with the status quo or go and write a vi-like edlin.erl. -Vance On Tue, Nov 26, 2002 at 07:30:45PM +0100, Richard Carlsson wrote: } } For those of you who are not afraid to modify library modules, } you can always change the behaviour of the `edlin' module (yes, } no kidding, it's lib/stdlib/src/edlin.erl) as you best please. } This is the module that the shell uses to read the user input. } } /Richard From hal@REDACTED Tue Nov 26 20:11:41 2002 From: hal@REDACTED (Hal Snyder) Date: Tue, 26 Nov 2002 13:11:41 -0600 Subject: Cursor keys for *NIX In-Reply-To: (Gordon Beaton's message of "26 Nov 2002 18:12:07 GMT") References: <04D356A3B172D611981B0008C791C3126BF57B@IMP02MBX> Message-ID: <87bs4ci1si.fsf@ghidra.vail> Gordon Beaton writes: > If Erlang used the readline library (at least on those platforms > where it is supported) then everyone could use the command line > editing keys they like best, and their settings would be consistent > across all programs that use readline. Just an idea... While linking in gnu readline has the appeal of a well known and very useful feature set, I can think of some disadvantages: 1. C code, requiring interfacing with erts code. 2. Risk of segfaults from code maintained by outsiders. There go the 9 9's of uptime. 3. Various version control/config management headaches. Probably better for one of us outsiders with lots of free time to contribute readline.erl. I should be able to get to it by 2008 or so. :) From Sean.Hinde@REDACTED Tue Nov 26 20:44:48 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 26 Nov 2002 19:44:48 -0000 Subject: Key bindings Message-ID: <04D356A3B172D611981B0008C791C3126BF586@IMP02MBX> > Having looked at that I see now that if I were emacs literate I > could probably do all the things I would want that readline provides. > I guess I'll shut up now and either stay with the status quo or go > and write a vi-like edlin.erl. OK, here's a patch to edlin which does backwards and forwards keys for at least OS X. It should work on Solaris (I think) but my machine has not revovered from the office DNS outage several hours ago so I can't test it (I rely on the ESC[C type of thing which seems quite common). edlin.erl doesn't do "previous line" and "next line" (perhaps forgivable given its name) so back to hunting around.. Sean --- edlin copy.erl Wed Oct 2 22:14:43 2002 +++ edlin.erl Tue Nov 26 19:30:50 2002 @@ -69,6 +69,8 @@ case key_map(C, Prefix) of meta -> edit(Cs, P, {Bef,Aft}, meta, Rs0); + meta_left_sq_bracket -> + edit(Cs, P, {Bef,Aft}, meta_left_sq_bracket, Rs0); ctlx -> edit(Cs, P, {Bef,Aft}, ctlx, Rs0); new_line -> @@ -171,6 +173,9 @@ key_map($y, meta) -> yank_pop; key_map($\177, none) -> backward_delete_char; key_map($\177, meta) -> backward_kill_word; +key_map($[, meta) -> meta_left_sq_bracket; +key_map($D, meta_left_sq_bracket) -> backward_char; +key_map($C, meta_left_sq_bracket) -> forward_char; key_map(C, none) when C >= $\s -> {insert,C}; key_map(C, _) -> {undefined,C}. NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From klacke@REDACTED Tue Nov 26 21:44:24 2002 From: klacke@REDACTED (Klacke) Date: Tue, 26 Nov 2002 21:44:24 +0100 Subject: yaws 0.59 Message-ID: <20021126214423.A10179@bluetail.com> New release of yaws at http://yaws.hyber.org/download/ Here are the relnotes ..... Lots of fixes and new features in this release. This release of Yaws is fast, it delivers 3000 static/dynamic pages/sec on my 2Ghz home box. Many fixes in the wiki, ~username expansion now works embedded mode is now fully implemented and functional many new configuration directives some backwards incompatible changes such as ssl config and yaws_api:parse_post_data/1. See the docs for details. Arg rewrite, customized errors etc. Lots of new documentation and new examples Optimized ehtml generation /klacke -- Claes Wikstrom -- Caps lock is nowhere and Alteon WebSystems -- everything is under control http://www.bluetail.com/~klacke cellphone: +46 70 2097763 From Sean.Hinde@REDACTED Tue Nov 26 22:29:07 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 26 Nov 2002 21:29:07 -0000 Subject: Key bindings Message-ID: <04D356A3B172D611981B0008C791C3126BF587@IMP02MBX> > edlin.erl doesn't do "previous line" and "next line" (perhaps > forgivable > given its name) so back to hunting around.. Forgive me for I truly know not what I fiddle with.. erlang:display is my new friend! I present Up and Down by cursor keys (needs previous edlin patch). Sean --- group.erl.orig Tue Nov 26 21:23:38 2002 +++ group.erl Tue Nov 26 21:18:23 2002 @@ -190,7 +190,8 @@ send_drv_reqs(Drv, Rs), put(line_buffer, [Line|lists:delete(Line, get(line_buffer))]), {done,Line,Rest}; -get_line1({undefined,{A,none,$\^P},Cs,Cont,Rs}, Drv, Ls0) -> +get_line1({undefined,{A,Mode,Char},Cs,Cont,Rs}, Drv, Ls0) when ((Mode == none) and (Char == $\^P)) + or ((Mode == meta_left_sq_bracket) and (Char == $A)) -> send_drv_reqs(Drv, Rs), case up_stack(Ls0) of {none,Ls} -> @@ -205,7 +206,8 @@ Drv, Ls) end; -get_line1({undefined,{A,none,$\^N},Cs,Cont,Rs}, Drv, Ls0) -> +get_line1({undefined,{A,Mode,Char},Cs,Cont,Rs}, Drv, Ls0) when ((Mode == none) and (Char == $\^N)) + or ((Mode == meta_left_sq_bracket) and (Char == $B)) -> send_drv_reqs(Drv, Rs), case down_stack(Ls0) of {none,Ls} -> NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From klacke@REDACTED Tue Nov 26 23:33:20 2002 From: klacke@REDACTED (Klacke) Date: Tue, 26 Nov 2002 23:33:20 +0100 Subject: supervisor Message-ID: <20021126233320.A21039@bluetail.com> I never made friends with the supervisor module. I want a restart strategy so that when any one of the children in the application dies, the node is brought down and possibly restarted by heart. Can I do that? -- Claes Wikstrom -- Caps lock is nowhere and Alteon WebSystems -- everything is under control http://www.bluetail.com/~klacke cellphone: +46 70 2097763 From lennart.ohman@REDACTED Tue Nov 26 23:52:00 2002 From: lennart.ohman@REDACTED (Lennart =?iso-8859-1?Q?=D6hman?=) Date: Tue, 26 Nov 2002 23:52:00 +0100 Subject: supervisor References: <20021126233320.A21039@bluetail.com> Message-ID: <3DE3FB0F.412A59CE@st.se> Don't be angry with the supervisor, he is your friend :-) You like all supervisors to be one_for_all recovery set and have all your processes to be permanent (to make any termination considered illegal). And if you like it to stop at the first fault you need to set restart intensity to 0 restarts over any time. But to get it all to shutdown, If I don't recall incorrectly, you must set the permanence of the *applications* to permanent too in order to make any EXIT-cause be considered illegal. I think they are transient by default. /Lennart Klacke wrote: > > I never made friends with the supervisor module. > I want a restart strategy so that when any one of the > children in the application dies, the node is brought down > and possibly restarted by heart. > > Can I do that? > > -- > Claes Wikstrom -- Caps lock is nowhere and > Alteon WebSystems -- everything is under control > http://www.bluetail.com/~klacke > cellphone: +46 70 2097763 -- ------------------------------------------------------------- Lennart Ohman phone : +46-8-587 623 27 Sjoland & Thyselius Telecom AB cellular: +46-70-552 6735 Sehlstedtsgatan 6 fax : +46-8-667 8230 SE-115 28 STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED From klacke@REDACTED Wed Nov 27 10:45:27 2002 From: klacke@REDACTED (Klacke) Date: Wed, 27 Nov 2002 10:45:27 +0100 Subject: supervisor In-Reply-To: <3DE3FB0F.412A59CE@st.se>; from lennart.ohman@st.se on Tue, Nov 26, 2002 at 11:52:00PM +0100 References: <20021126233320.A21039@bluetail.com> <3DE3FB0F.412A59CE@st.se> Message-ID: <20021127104526.A18330@bluetail.com> On Tue, Nov 26, 2002 at 11:52:00PM +0100, Lennart ?hman wrote: > Don't be angry with the supervisor, he is your friend :-) > > You like all supervisors to be one_for_all recovery set and have all your > processes > to be permanent (to make any termination considered illegal). And if you like > it to stop at the first fault you need to set restart intensity to > 0 restarts over any time. This one I was able to figure out by myself. > > But to get it all to shutdown, If I don't recall incorrectly, > you must set the permanence of the *applications* to permanent > too in order to make any EXIT-cause be considered illegal. > I think they are transient by default. But how do I do this one. /klacke -- Claes Wikstrom -- Caps lock is nowhere and Alteon WebSystems -- everything is under control http://www.bluetail.com/~klacke cellphone: +46 70 2097763 From mbj@REDACTED Wed Nov 27 10:56:41 2002 From: mbj@REDACTED (Martin Bjorklund) Date: Wed, 27 Nov 2002 10:56:41 +0100 (CET) Subject: supervisor In-Reply-To: <20021127104526.A18330@bluetail.com> References: <20021126233320.A21039@bluetail.com> <3DE3FB0F.412A59CE@st.se> <20021127104526.A18330@bluetail.com> Message-ID: <20021127.105641.10290694.mbj@bluetail.com> Klacke wrote: > > But to get it all to shutdown, If I don't recall incorrectly, > > you must set the permanence of the *applications* to permanent > > too in order to make any EXIT-cause be considered illegal. > > I think they are transient by default. > > > But how do I do this one. RTFM :) Generally it depends on how you start your app. If you start it by calling application:start/1, you should call application:start/2 instead, with 'permanent' as the second argument. If you start it from a .rel script, use the syntax: {App, Vsn, permanent} So in your case, use: start() -> application:start(yaws, permanent). /martin From klacke@REDACTED Wed Nov 27 11:17:27 2002 From: klacke@REDACTED (Klacke) Date: Wed, 27 Nov 2002 11:17:27 +0100 Subject: supervisor In-Reply-To: <20021127.105641.10290694.mbj@bluetail.com>; from mbj@bluetail.com on Wed, Nov 27, 2002 at 10:56:41AM +0100 References: <20021126233320.A21039@bluetail.com> <3DE3FB0F.412A59CE@st.se> <20021127104526.A18330@bluetail.com> <20021127.105641.10290694.mbj@bluetail.com> Message-ID: <20021127111727.A23596@bluetail.com> On Wed, Nov 27, 2002 at 10:56:41AM +0100, Martin Bjorklund wrote: > Klacke wrote: > > > > But to get it all to shutdown, If I don't recall incorrectly, > > > you must set the permanence of the *applications* to permanent > > > too in order to make any EXIT-cause be considered illegal. > > > I think they are transient by default. > > > > > > But how do I do this one. > > RTFM :) The weird thing is that I did. I seem to get into some kind of subconscious non perseptive state whenever I read the man pages for supervior or application :-( > > Generally it depends on how you start your app. If you start it by > calling application:start/1, you should call application:start/2 > instead, with 'permanent' as the second argument. > > If you start it from a .rel script, use the syntax: > > {App, Vsn, permanent} > > > So in your case, use: > > start() -> > application:start(yaws, permanent). > > Thanks, /klacke -- Claes Wikstrom -- Caps lock is nowhere and Alteon WebSystems -- everything is under control http://www.bluetail.com/~klacke cellphone: +46 70 2097763 From svg@REDACTED Wed Nov 27 11:22:35 2002 From: svg@REDACTED (Vladimir Sekissov) Date: Wed, 27 Nov 2002 15:22:35 +0500 (YEKT) Subject: supervisor In-Reply-To: <20021127104526.A18330@bluetail.com> References: <20021126233320.A21039@bluetail.com> <3DE3FB0F.412A59CE@st.se> <20021127104526.A18330@bluetail.com> Message-ID: <20021127.152235.74738140.svg@surnet.ru> Good day, klacke> > But to get it all to shutdown, If I don't recall incorrectly, klacke> > you must set the permanence of the *applications* to permanent klacke> > too in order to make any EXIT-cause be considered illegal. klacke> > I think they are transient by default. klacke> klacke> klacke> But how do I do this one. application:start(MyApp, permanent). Another way, I think, - add dummy child to your supervisor tree, which could call init:reboot() on shutdown message, as could do `terminate' callback in 'gen_*': terminate(shutdown, State) -> init:reboot(); terminate(Other, State) -> ok. Child spec in supervisor mustn't be `brutal_kill' for this to work. Best Regards, Vladimir Sekissov klacke> On Tue, Nov 26, 2002 at 11:52:00PM +0100, Lennart ?hman wrote: klacke> > Don't be angry with the supervisor, he is your friend :-) klacke> > klacke> > You like all supervisors to be one_for_all recovery set and have all your klacke> > processes klacke> > to be permanent (to make any termination considered illegal). And if you like klacke> > it to stop at the first fault you need to set restart intensity to klacke> > 0 restarts over any time. klacke> klacke> This one I was able to figure out by myself. klacke> klacke> > klacke> > But to get it all to shutdown, If I don't recall incorrectly, klacke> > you must set the permanence of the *applications* to permanent klacke> > too in order to make any EXIT-cause be considered illegal. klacke> > I think they are transient by default. klacke> klacke> klacke> But how do I do this one. klacke> klacke> klacke> /klacke klacke> klacke> klacke> klacke> -- klacke> Claes Wikstrom -- Caps lock is nowhere and klacke> Alteon WebSystems -- everything is under control klacke> http://www.bluetail.com/~klacke klacke> cellphone: +46 70 2097763 From trinder@REDACTED Wed Nov 27 11:48:28 2002 From: trinder@REDACTED (Phil Trinder) Date: Wed, 27 Nov 2002 10:48:28 +0000 (GMT Standard Time) Subject: Commerical users? In-Reply-To: <15843.13417.805424.738870@antilipe.corelatus.se> Message-ID: Matthias, In collaboration with David King at Motorola UK Research Labs Jan Nystrom, and I are starting a 3-year project to evaluate Erlang for Motorola's distributed telecommunications applications. The project has commercial and scientific objectives, and may even produce Motorola's first Erlang software product. More details at http://www.cee.hw.ac.uk/~dsg/telecoms/ Phil On Tue, 26 Nov 2002 09:44:25 +0100 Matthias Lang wrote: > > Hakan Millroth writes: > > Does anyone have a list of companies using Erlang for product/service > > development? > > I'd like to put in a 'me too'. The FAQ currently lists only > > - Ericsson > > - Bluetail/Alteon/Nortel (I should probably split this or stop > referring to Bluetail altogether. Clues from Bluetail appreciated.) > > - Telia > > - Eddie (Is this project still alive? Should I be calling it Lodbroker?) > > - T-Mobil[e] > > - Corelatus > > as Erlang users with commercial intent. I wrote "if you want to be > listed here, mail me" under the list. Maybe that's not inviting > enough. The intent is to avoid pissing off people who, for one reason > or another, don't want to be listed. > > Digging through conference presentations, I can come up with at least > another 10 (Lucent, Vail, Sendmail, Synapse, Cellpoint, Mobilearts, > Motivity, Creado, Snookles Music, Blue position) who appear to be > using it for products. So, can I add you to the list? > > There must be more still; surely the mailing list isn't populated > entirely by enthusiasts. > > Matthias -------------------------------------------------- Phil Trinder School of Mathematical and Computer Sciences Heriot-Watt University Edinburgh, EH14 4AS E-mail: trinder@REDACTED Teleph: +44 (0)131 451 3435 Depart: +44 (0)131 451 3328 Fasmly: +44 (0)131 451 3327 Intrnt: http://www.macs.hw.ac.uk/~trinder From francesco@REDACTED Wed Nov 27 11:15:08 2002 From: francesco@REDACTED (Francesco Cesarini) Date: Wed, 27 Nov 2002 10:15:08 +0000 Subject: supervisor References: <20021126233320.A21039@bluetail.com> <3DE3FB0F.412A59CE@st.se> <20021127104526.A18330@bluetail.com> Message-ID: <3DE49B2C.2020607@erlang-consulting.com> > > >>But to get it all to shutdown, If I don't recall incorrectly, >>you must set the permanence of the *applications* to permanent >>too in order to make any EXIT-cause be considered illegal. >>I think they are transient by default. >> > > >But how do I do this one. > application:start(Application, Type) -> ok | {error, Reason} Application = atom() Type = permanent | transient | temporary Francesco -- http://www.erlang-consulting.com From svg@REDACTED Wed Nov 27 14:41:49 2002 From: svg@REDACTED (Vladimir Sekissov) Date: Wed, 27 Nov 2002 18:41:49 +0500 (YEKT) Subject: UPDATE: Semantic support for Erlang Message-ID: <20021127.184149.78720105.svg@surnet.ru> Good day, I've just updated my semantic-erlang code. For those who want to try it the archive is in the attachement. Semantic page: http://cedet.sourceforge.net/semantic.shtml Changes: 1. Package notation for modules added. 2. Some bugs fixed. 3. Added documentation generation for functions and records in EDOC format - function `erlang-edoc-inline'. Example of generated code: %%** %% @spec pread_int( File, List, R ) -> Return %% %% File = undocumented %% List = undocumented %% R = undocumented %% %% %% @doc %% %% @end %%* pread_int(File, [], R) -> {ok, lists:reverse(R)}. %%** %% @type opt1(). %%
%%
name
test comment 0
%%
name2
undocumented
%%
value
undocumented
%%
check
test comment1
%%
multi
test comment2
%% %%
%% %% @end %%* -record(opt1, {name,%test comment 0 name2, value=undefined, check=atom, %test comment1 multi=false%test comment2 }). Installation: 1. Unpack archive somewhere in your path. 2. Add this directory to elisp load path. 3. Install semantic as described in semantic doc. 4. In your .emacs: (load-library "semantic-erlang") Send me your comments and suggestions. Best Regards, Vladimir Sekissov -------------- next part -------------- A non-text attachment was scrubbed... Name: semantic-erlang.tar.gz Type: application/octet-stream Size: 10692 bytes Desc: not available URL: From luke@REDACTED Wed Nov 27 16:47:40 2002 From: luke@REDACTED (Luke Gorrie) Date: 27 Nov 2002 16:47:40 +0100 Subject: Cursor keys for *NIX In-Reply-To: <04D356A3B172D611981B0008C791C3126BF581@IMP02MBX> References: <04D356A3B172D611981B0008C791C3126BF581@IMP02MBX> Message-ID: Sean Hinde writes: > > (We all run the erlang shell in an Emacs buffer with erlang-mode's M-x > > run-erlang, right? :-)) This was a joke btw - I think better support for line editing in the erlang shell would be great. I have implemented something like this in Ermacs - the data structures involved probably make it pretty nonportable for putting in edlin, but anyway the code is: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ermacs/ermacs/src/edit_lib.erl?rev=1.1.1.1&content-type=text/vnd.viewcvs-markup (Actually the code can be much nicer if you represent the current line as a list of characters - the ermacs code is a bit hairy since I used an abstract data type for all text. Maybe that code is better ignored :)) I've frequently heard grumbling around the office that persistent command history should be implemented too (I have that in Ermacs' erlang shell :-)). > C-x 2 > C-x 1 > C-x C-s The way I use it is this: any time I need the erlang shell, I type "C-c C-z", and it splits the window in two and puts the cursor in the shell. When I'm done with the shell I press "C-x 0", which unsplits the window and leaves me back in the source. If you want to tweak the way the shell is started, you can hack the variables inferior-erlang-machine and inferior-erlang-machine-options (lemme know if you want an example.) In our system I configure these to connect an erlang shell to the already-started node where the system is running (via a special shell command we already have.) Cheers, Luke From vances@REDACTED Wed Nov 27 17:35:21 2002 From: vances@REDACTED (Vance Shipley) Date: Wed, 27 Nov 2002 11:35:21 -0500 Subject: catch gen_udp:open Message-ID: <20021127163521.GC67275@frogman.motivity.ca> After perusing the megaco source I am left with two questions in regards to the use of catch with gen_tcp and gen_udp. I see that in megaco_udp.erl the call to gen_udp:open/2 is wrapped in a catch however I don't see that the catch return is caught at all. Is this a mistake? In megaco_tcp.erl the call to gen_tcp:connect/3 is wrapped in a catch but here I see what I would expect; the case matches {'EXIT', _Reason}. So now my second question is do I need to worry about this? Is this just paranoia or should I be doing the same thing? Why would it exit? -Vance (R9B-0) megaco_udp.erl -------------- case catch gen_udp:open(UdpRec#megaco_udp.port, IpOpts) of {ok, Socket} -> ?udp_debug(UdpRec, "udp open", []), NewUdpRec = UdpRec#megaco_udp{socket = Socket}, case start_udp_server(SupPid, NewUdpRec) of {ok, ControlPid} -> gen_udp:controlling_process(Socket, ControlPid), {ok, Socket, ControlPid}; {error, Reason} -> Error = {error, {could_not_start_udp_server, Reason}}, ?udp_debug({socket, Socket}, "udp close", []), gen_udp:close(Socket), Error end; {error, Reason} -> Error = {error, {could_not_open_udp_port, Reason}}, ?udp_debug(UdpRec, "udp open failed", [Error]), Error end; megaco_tcp.erl -------------- case catch gen_tcp:connect(TcpRec#megaco_tcp.host, TcpRec#megaco_tcp.port, IpOpt) of {ok, Socket} -> %%---------------------------------------------- %% Socket up start a new control process case start_connection(SupPid, TcpRec#megaco_tcp{socket = Socket}) of {ok, Pid} -> gen_tcp:controlling_process(Socket, Pid), {ok, Socket, Pid}; {error, Reason} -> {error, Reason} end; {error, Reason} -> Error = {error, {gen_tcp_connect, Reason}}, ?tcp_debug(TcpRec, "tcp connect failed", [Error]), Error; {'EXIT', _Reason} = Exit -> Error = {error, {gen_tcp_connect, Exit}}, ?tcp_debug(TcpRec, "tcp connect failed", [Error]), Error end; From richardc@REDACTED Wed Nov 27 19:25:07 2002 From: richardc@REDACTED (Richard Carlsson) Date: Wed, 27 Nov 2002 19:25:07 +0100 (MET) Subject: new standard libraries In-Reply-To: <200211221153.gAMBrpr14198@cbe.ericsson.se> Message-ID: A few days ago, there was some talk about how nice it would be if the standard libraries were cleaned up and put into packages. Also, the old "Proposal 15. Built-in functions of Erlang" was pointed to. The fact is that I've done a part of the restructuring already. All the old "BIFs" that clutter the 'erlang' module have been given new parallel names in the package system (largely following "proposal 15"). For example: atom_to_list/1 -> erl.lang.atom:to_string/1 hd/1 -> erl.lang.list:hd/1 port_close/1 -> erl.lang.port:close/1 (Actually, since these are BIFs, and not implemented in Erlang code, you can try them right now if you have an R9 system, but they are not official yet: some names may change; maybe even some of the interfaces. Note to the curious: look in "erts/emulator/beam/bif.tab".) I have also written source code modules to correspond to these new BIFs. Several of them contain no actual code (all functionality is implemented in C), or add just one or two simple extra functions. However, in a couple of cases I have taken the opportunity to create a completely new set of functions; notably a new set of list functions, and new functions for date and time. Not much has been properly tested. If you want to experiment with this, and maybe contribute, go to: http://user.it.uu.se/~richardc/packages/ and download the archive. (Also, read the README file.) (Note that if you want to add code, there are a few files included that spell out the guidelines for new code, which you may or may not agree with.) For now, contributions can be mailed directly to me. Maybe later this could be on SourceForge or similar, but I assume that OTP wants to have their say in what goes in the libraries. /Richard Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://user.it.uu.se/~richardc/ From hakan@REDACTED Thu Nov 28 11:18:20 2002 From: hakan@REDACTED (Hakan Mattsson) Date: Thu, 28 Nov 2002 11:18:20 +0100 (MET) Subject: catch gen_udp:open In-Reply-To: <20021127163521.GC67275@frogman.motivity.ca> Message-ID: On Wed, 27 Nov 2002, Vance Shipley wrote: Vance> After perusing the megaco source I am left with two questions in Vance> regards to the use of catch with gen_tcp and gen_udp. I see that Vance> in megaco_udp.erl the call to gen_udp:open/2 is wrapped in a catch Vance> however I don't see that the catch return is caught at all. Vance> Vance> Is this a mistake? Yes, this is a bug. Vance> In megaco_tcp.erl the call to gen_tcp:connect/3 is wrapped in a catch Vance> but here I see what I would expect; the case matches {'EXIT', _Reason}. Vance> Vance> So now my second question is do I need to worry about this? Is this Vance> just paranoia or should I be doing the same thing? Why would it exit? Despite the kernel documentation, I think that bad options to gen_tcp and gen_udp are intended to cause an exit. At least this is the behaviour for gen_udp:open/2, while a bad option to gen_tcp:connect/3 returns an {'EXIT', Reason} tuple: % erl Erlang (BEAM) emulator version 2002.10.08 [source] Eshell V2002.10.08 (abort with ^G) 1> gen_udp:open(8888, [bad]). ** exited: badarg ** 2> gen_tcp:connect("baidarka", 8888, [bad]). {'EXIT',badarg} 3> gen_tcp:connect("baidarka", 8888, really_bad). {'EXIT',{badarg,[{lists,keysearch,[tcp_module,1,really_bad]}, {gen_tcp,mod,1}, {gen_tcp,connect1,4}, {gen_tcp,connect,4}, {erl_eval,expr,3}, {erl_eval,exprs,4}, {shell,eval_loop,2}]}} Both megaco_tcp and megaco_udp allows the user to add arbitrary gen_tcp/gen_udp options to the ones that megaco defaults to and we wanted to handle all error cases uniformly. If you have a more static usage of gen_tcp/gen_udp options you would not need to catch the function calls. /H?kan From gerd@REDACTED Thu Nov 28 14:23:26 2002 From: gerd@REDACTED (Gerd Flaig) Date: Thu, 28 Nov 2002 14:23:26 +0100 Subject: Commerical users? In-Reply-To: <15843.13417.805424.738870@antilipe.corelatus.se> (Matthias Lang's message of "Tue, 26 Nov 2002 09:44:25 +0100") References: <15843.13417.805424.738870@antilipe.corelatus.se> Message-ID: Matthias Lang writes: > Digging through conference presentations, I can come up with at least > another 10 (Lucent, Vail, Sendmail, Synapse, Cellpoint, Mobilearts, > Motivity, Creado, Snookles Music, Blue position) who appear to be > using it for products. So, can I add you to the list? you may also add 1&1 / Schlund+Partner AG. We use Erlang/OTP for Messaging and IVR services. Goodbyte, Gerd. -- Gerd Flaig Technik gerd@REDACTED Bei Schlund + Partner AG Erbprinzenstr. 4-12 D-76133 Karlsruhe Physics is like sex: sure, it may give some practical results, but that's not why we do it. -- Richard Feynman From erlang@REDACTED Fri Nov 29 19:24:55 2002 From: erlang@REDACTED (Inswitch Solutions - Erlang Evaluation) Date: Fri, 29 Nov 2002 19:24:55 +0100 Subject: Using hardware in Erlang Message-ID: <001e01c297d4$9e963420$0200a8c0@design> I?m evaluating Erlang and I?d like to know the best choice for calling hardware synchronous mode functions. I read about linked-driver but I?m not sure if it's the right way. Thanks in advance, Eduardo Figoli INSwitch -------------- next part -------------- An HTML attachment was scrubbed... URL: From svg@REDACTED Fri Nov 29 00:47:17 2002 From: svg@REDACTED (Vladimir Sekissov) Date: Fri, 29 Nov 2002 04:47:17 +0500 (YEKT) Subject: odbc help ( PATCH ) In-Reply-To: <20021113155724.G49569-100000@dev1.localdomain.net> References: <20021113155724.G49569-100000@dev1.localdomain.net> Message-ID: <20021129.044717.74754876.svg@surnet.ru> Hi, olgeni> Looking for clues... I compiled the odbc application (R9B) using olgeni> libiodbc, installed odbcserver in priv/bin by hand, and found a olgeni> working DSN using the sample iodbc's odbctest application. I'm using olgeni> the postgresql driver (7.2.3). olgeni> The problem is that PostgreSQL ODBC driver is version 2.5 and knows nothing about scrollable cursors. This patch solves the problem with one small restriction. The followed function calls return {error,driver_does_not_support_function}: odbc:select(Conn, Pos, N) when Pos = {relative, P} | {absolute, P} odbc:prev(ConnectionReference) But most databases don't support back scrolling so we can live without it too. All other functionality is ok at least for me. Best Regards, Vladimir Sekissov -------------------------- cut here ---------------------------------- --- otp_src_R9B-0/lib/odbc/c_src/odbcserver.c.orig 2002-11-29 03:41:50.000000000 +0500 +++ tp_src_R9B-0/lib/odbc/c_src/odbcserver.c 2002-11-29 04:01:04.000000000 +0500 @@ -1332,23 +1332,26 @@ (SQLPOINTER)&supportMask, sizeof(supportMask), NULL))) { - exit_on_failure("SQLGetInfo failed in dbInfo"); - } - - if (supportMask & SQL_CA1_ABSOLUTE ) { - ei_x_encode_atom(&dynamic_buffer(state), "true"); - } - else { - ei_x_encode_atom(&dynamic_buffer(state), "false"); - } - - if (supportMask & SQL_CA1_RELATIVE) { - ei_x_encode_atom(&dynamic_buffer(state), "true"); - } - else { + /*exit_on_failure("SQLGetInfo failed in dbInfo");*/ + ei_x_encode_atom(&dynamic_buffer(state), "false"); ei_x_encode_atom(&dynamic_buffer(state), "false"); + } else { + + if (supportMask & SQL_CA1_ABSOLUTE ) { + ei_x_encode_atom(&dynamic_buffer(state), "true"); + } + else { + ei_x_encode_atom(&dynamic_buffer(state), "false"); + } + + if (supportMask & SQL_CA1_RELATIVE) { + ei_x_encode_atom(&dynamic_buffer(state), "true"); + } + else { + ei_x_encode_atom(&dynamic_buffer(state), "false"); + } } - + msg.buffer = (byte *)dynamic_buffer(state).buff; msg.length = dynamic_buffer(state).index; msg.dyn_alloc = TRUE; -------------------------- cut here ---------------------------------- olgeni> Looking for clues... I compiled the odbc application (R9B) using olgeni> libiodbc, installed odbcserver in priv/bin by hand, and found a olgeni> working DSN using the sample iodbc's odbctest application. I'm using olgeni> the postgresql driver (7.2.3). olgeni> olgeni> The odbc app complains: olgeni> olgeni> (odbc@REDACTED)12> odbc:connect ("dsn=octopus;server=localhost;port=5432;database=octopus;uid=octopus", []). olgeni> SQLGetInfo failed in dbInfo olgeni> =ERROR REPORT==== 13-Nov-2002::15:57:08 === olgeni> ODBC: exit signal from port program:normal olgeni> {error,{port_exit,normal}} olgeni> (odbc@REDACTED)13> olgeni> =ERROR REPORT==== 13-Nov-2002::15:57:08 === olgeni> ** Generic server <0.81.0> terminating olgeni> ** Last message in was {'EXIT',#Port<0.63>,normal} olgeni> ** When Server state == {state,#Port<0.63>, olgeni> {<0.79.0>,#Ref<0.0.0.285>}, olgeni> <0.79.0>, olgeni> undefined, olgeni> on, olgeni> undefined, olgeni> undefined, olgeni> connecting, olgeni> false, olgeni> false, olgeni> []} olgeni> ** Reason for termination == olgeni> ** {port_exit,normal} olgeni> olgeni> odbc:connect performs application:start (odbc), so it should be sufficient (?). olgeni> olgeni> Has anybody managed to get postgresql/iodbc/odbc working? =) olgeni> olgeni> -- olgeni> jimmy From vances@REDACTED Fri Nov 29 09:55:49 2002 From: vances@REDACTED (Vance Shipley) Date: Fri, 29 Nov 2002 03:55:49 -0500 Subject: Using hardware in Erlang In-Reply-To: <001e01c297d4$9e963420$0200a8c0@design> References: <001e01c297d4$9e963420$0200a8c0@design> Message-ID: <20021129085549.GC87085@frogman.motivity.ca> Eduardo, Since you used the word "synchronous" I would suggest that you try using erl_interface to build your device driver. In this method you would write a C program to interface with the hardware. This program would send and receive Erlang messages using the erl_interface API and libraries. Your Erlang/OTP node, where your real applications are hosted, would interface to the hardware by sending native Erlang messages back and forth to the "C node". Your C code is free to use blocking calls and other dangerous activities. The other approach is to use a linked in driver. Here you again write C code but it is a library which is linked against the Erlang runtime system. Your hardware interfacing code is now part of the Erlang runtime and must follow the rules. One of which is certainly not to block! You can use blocking functions if you must but then you'll have to implement a threading driver and have all blocking calls done in threads. The complexity climbs quickly here. I'd go with the erl_interface method first. If you find later that you want a more tightly coupled interface you can change it. We at Motivity use both types of drivers. Which is best depends on the method that we interface to the hardware mostly. In the one case we use Dialogic hardware boards which come with a Unix device driver. The API for this driver does not use standard file descriptors. It does allow asynchronous usage but because it doesn't use file descriptors we cannot use poll/select to wait on events/completions. This model really doesn't work in the linked in driver model. A third method for attaching hardware to the system is through direct TCP/IP messaging. Many hardware systems we are seeing these days provide their API over an ethernet (or cPCI PSB) interface instead of the PCI bus. For these you would use inet in Erlang and enjoy no C code at all. -Vance Vance Shipley Motivity Telecom Inc. +1 519 240 3684 On Fri, Nov 29, 2002 at 07:24:55PM +0100, Inswitch Solutions - Erlang Evaluation wrote: } } I?m evaluating Erlang and I?d like to know the best choice for calling hardware synchronous mode functions. } I read about linked-driver but I?m not sure if it's the right way. } } } Thanks in advance, } Eduardo Figoli } INSwitch } } From ingela@REDACTED Fri Nov 29 17:03:05 2002 From: ingela@REDACTED (Ingela Anderton) Date: Fri, 29 Nov 2002 17:03:05 +0100 Subject: odbc help ( PATCH ) References: <20021113155724.G49569-100000@dev1.localdomain.net> <20021129.044717.74754876.svg@surnet.ru> Message-ID: <15847.36793.533404.150512@gargle.gargle.HOWL> Vladimir Sekissov wrote: > Hi, > > olgeni> Looking for clues... I compiled the odbc application (R9B) using > olgeni> libiodbc, installed odbcserver in priv/bin by hand, and found a > olgeni> working DSN using the sample iodbc's odbctest application. I'm using > olgeni> the postgresql driver (7.2.3). > olgeni> > > The problem is that PostgreSQL ODBC driver is version 2.5 and knows > nothing about scrollable cursors. This patch solves the > problem with one small restriction. The followed function calls return > {error,driver_does_not_support_function}: I am not familiar with this driver. But even if it does not implement scrollable cursors it should have values for the driver attribute SQL_DYNAMIC_CURSOR_ATTRIBUTES1 otherwhise it is not ODBC 3.0 compliant. Of course the value of that attribut will reflect that scrollable cursors are not supported. And then the erlang ODBC will work but return {error,driver_does_not_support_function} for some functions. The patch that you propose is really a workaround for a bug in the driver. So I think it is the driver that you should patch. The function call SQLGetInfo could fail for other reasons than that scrollable cursors are not supported example a memory allocation error and that should be consider a disaster and the application should be shut down. ---------- Quote from Microsoft doc: --------------------- "A driver must return a value for each of the information types defined in the tables below. If an information type does not apply to the driver or data source, the driver returns one of the values listed in the following table. Format of *InfoValuePtr Returned value Character string ("Y" or "N") "N" Character string (not "Y" or "N") Empty string SQLUSMALLINT 0 SQLUINTEGER bitmask or SQLUINTEGER binary 0L [...] Information Types This section lists the information types supported by SQLGetInfo. Information types are grouped categorically and listed alphabetically. Information types that were added or renamed for ODBC 3.x are also listed. Driver Information The following values of the InfoType argument return information about the ODBC driver, such as the number of active statements, the data source name, and the interface standards compliance level: SQL_ACTIVE_ENVIRONMENTS SQL_GETDATA_EXTENSIONS SQL_ASYNC_MODE SQL_INFO_SCHEMA_VIEWS SQL_BATCH_ROW_COUNT SQL_KEYSET_CURSOR_ATTRIBUTES1 SQL_BATCH_SUPPORT SQL_KEYSET_CURSOR_ATTRIBUTES2 SQL_DATA_SOURCE_NAME SQL_MAX_ASYNC_CONCURRENT_STATEMENTS SQL_DRIVER_HDBC SQL_MAX_CONCURRENT_ACTIVITIES SQL_DRIVER_HDESC SQL_MAX_DRIVER_CONNECTIONS SQL_DRIVER_HENV SQL_ODBC_INTERFACE_CONFORMANCE SQL_DRIVER_HLIB SQL_ODBC_STANDARD_CLI_CONFORMANCE SQL_DRIVER_HSTMT SQL_ODBC_VER SQL_DRIVER_NAME SQL_PARAM_ARRAY_ROW_COUNTS SQL_DRIVER_ODBC_VER SQL_PARAM_ARRAY_SELECTS SQL_DRIVER_VER SQL_ROW_UPDATES SQL_DYNAMIC_CURSOR_ATTRIBUTES1 SQL_SEARCH_PATTERN_ESCAPE SQL_DYNAMIC_CURSOR_ATTRIBUTES2 SQL_SERVER_NAME SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 SQL_STATIC_CURSOR_ATTRIBUTES1 SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 SQL_STATIC_CURSOR_ATTRIBUTES2 SQL_FILE_USAGE" --------- End quote ---------------- > odbc:select(Conn, Pos, N) when Pos = {relative, P} | {absolute, P} > odbc:prev(ConnectionReference) > > But most databases don't support back scrolling so we can live > without it too. All other functionality is ok at least for me. Well yes that how it suppose to work. If scrollable cursors are supported you should be able to use them. But if not you can still use the part of the API that don't use scrollable cursors. -- /m.v.h Ingela Ericsson AB - OTP team From bparoli@REDACTED Fri Nov 29 15:47:19 2002 From: bparoli@REDACTED (Paroli, Bernardo) Date: Fri, 29 Nov 2002 11:47:19 -0300 Subject: Fault-tolerance and distributed system Message-ID: Hello, I'm new in the Erlang's world and I need make a fault-tolerance and distributed system. I'm learn the Design Principles document which very interesting, but I don't found any example about these systems. All examples that I found in the erlang page and the internet are very simple examples and they not include advanced subjects. I'm need examples of application behaviour and supervisor behaviour. Do you help me? Bernardo Paroli. -------------- next part -------------- An HTML attachment was scrubbed... URL: From svg@REDACTED Fri Nov 29 17:52:42 2002 From: svg@REDACTED (Vladimir Sekissov) Date: Fri, 29 Nov 2002 21:52:42 +0500 (YEKT) Subject: odbc help ( PATCH ) In-Reply-To: <15847.36793.533404.150512@gargle.gargle.HOWL> References: <20021113155724.G49569-100000@dev1.localdomain.net> <20021129.044717.74754876.svg@surnet.ru> <15847.36793.533404.150512@gargle.gargle.HOWL> Message-ID: <20021129.215242.41635409.svg@surnet.ru> Good day, ingela> I am not familiar with this driver. But even if it does not implement ingela> scrollable cursors it should have values for the driver attribute ingela> SQL_DYNAMIC_CURSOR_ATTRIBUTES1 otherwhise it is not ODBC 3.0 ingela> compliant. Of course the value of that attribut will reflect that ingela> scrollable cursors are not supported. And then the erlang ODBC will ingela> work but return {error,driver_does_not_support_function} for some ingela> functions. The patch that you propose is really a workaround for a bug ingela> in the driver. So I think it is the driver that you should patch. The ingela> function call SQLGetInfo could fail for other reasons than that ingela> scrollable cursors are not supported example a memory allocation error ingela> and that should be consider a disaster and the application should be ingela> shut down. As I mentioned native PostgresSQL ODBC is version 2.5 so it is compliant only with ODBC 2 specification. If erlang ODBC can work well with ODBC 2 drivers why it mustn't. My simple patch doesn't affect any standard application functionality or behavior so it could be the user's choice to use it with reduced to ODBC 2 abilities or not. Best Regards, Vladimir Sekissov ingela> > olgeni> Looking for clues... I compiled the odbc application (R9B) using ingela> > olgeni> libiodbc, installed odbcserver in priv/bin by hand, and found a ingela> > olgeni> working DSN using the sample iodbc's odbctest application. I'm using ingela> > olgeni> the postgresql driver (7.2.3). ingela> > olgeni> ingela> > ingela> > The problem is that PostgreSQL ODBC driver is version 2.5 and knows ingela> > nothing about scrollable cursors. This patch solves the ingela> > problem with one small restriction. The followed function calls return ingela> > {error,driver_does_not_support_function}: ingela> ingela> I am not familiar with this driver. But even if it does not implement ingela> scrollable cursors it should have values for the driver attribute ingela> SQL_DYNAMIC_CURSOR_ATTRIBUTES1 otherwhise it is not ODBC 3.0 ingela> compliant. Of course the value of that attribut will reflect that ingela> scrollable cursors are not supported. And then the erlang ODBC will ingela> work but return {error,driver_does_not_support_function} for some ingela> functions. The patch that you propose is really a workaround for a bug ingela> in the driver. So I think it is the driver that you should patch. The ingela> function call SQLGetInfo could fail for other reasons than that ingela> scrollable cursors are not supported example a memory allocation error ingela> and that should be consider a disaster and the application should be ingela> shut down. ingela> ingela> ---------- Quote from Microsoft doc: --------------------- ingela> ingela> "A driver must return a value for each of the information types ingela> defined in the tables below. If an information type does not apply to ingela> the driver or data source, the driver returns one of the values listed ingela> in the following table. ingela> ingela> Format of *InfoValuePtr Returned value ingela> Character string ("Y" or "N") "N" ingela> Character string (not "Y" or "N") Empty string ingela> SQLUSMALLINT 0 ingela> SQLUINTEGER bitmask or SQLUINTEGER binary 0L ingela> ingela> ingela> [...] ingela> ingela> Information Types ingela> ingela> This section lists the information types supported by ingela> SQLGetInfo. Information types are grouped categorically and listed ingela> alphabetically. Information types that were added or renamed for ingela> ODBC 3.x are also listed. ingela> ingela> Driver Information ingela> ingela> The following values of the InfoType argument return information ingela> about the ODBC driver, such as the number of active statements, the ingela> data source name, and the interface standards compliance level: ingela> ingela> SQL_ACTIVE_ENVIRONMENTS ingela> SQL_GETDATA_EXTENSIONS ingela> SQL_ASYNC_MODE ingela> SQL_INFO_SCHEMA_VIEWS ingela> SQL_BATCH_ROW_COUNT ingela> SQL_KEYSET_CURSOR_ATTRIBUTES1 ingela> SQL_BATCH_SUPPORT ingela> SQL_KEYSET_CURSOR_ATTRIBUTES2 ingela> SQL_DATA_SOURCE_NAME ingela> SQL_MAX_ASYNC_CONCURRENT_STATEMENTS ingela> SQL_DRIVER_HDBC ingela> SQL_MAX_CONCURRENT_ACTIVITIES ingela> SQL_DRIVER_HDESC ingela> SQL_MAX_DRIVER_CONNECTIONS ingela> SQL_DRIVER_HENV ingela> SQL_ODBC_INTERFACE_CONFORMANCE ingela> SQL_DRIVER_HLIB ingela> SQL_ODBC_STANDARD_CLI_CONFORMANCE ingela> SQL_DRIVER_HSTMT ingela> SQL_ODBC_VER ingela> SQL_DRIVER_NAME ingela> SQL_PARAM_ARRAY_ROW_COUNTS ingela> SQL_DRIVER_ODBC_VER ingela> SQL_PARAM_ARRAY_SELECTS ingela> SQL_DRIVER_VER ingela> SQL_ROW_UPDATES ingela> SQL_DYNAMIC_CURSOR_ATTRIBUTES1 ingela> SQL_SEARCH_PATTERN_ESCAPE ingela> SQL_DYNAMIC_CURSOR_ATTRIBUTES2 ingela> SQL_SERVER_NAME ingela> SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1 ingela> SQL_STATIC_CURSOR_ATTRIBUTES1 ingela> SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2 ingela> SQL_STATIC_CURSOR_ATTRIBUTES2 ingela> SQL_FILE_USAGE" ingela> ingela> --------- End quote ---------------- ingela> ingela> > odbc:select(Conn, Pos, N) when Pos = {relative, P} | {absolute, P} ingela> > odbc:prev(ConnectionReference) ingela> > ingela> > But most databases don't support back scrolling so we can live ingela> > without it too. All other functionality is ok at least for me. ingela> Well yes that how it suppose to work. If scrollable cursors are ingela> supported you should be able to use them. But if not you can still use ingela> the part of the API that don't use scrollable cursors. ingela> ingela> -- ingela> /m.v.h Ingela ingela> ingela> Ericsson AB - OTP team ingela> ingela> ingela> ingela> ingela> From erlang@REDACTED Fri Nov 29 18:40:02 2002 From: erlang@REDACTED (Inswitch Solutions - Erlang Evaluation) Date: Fri, 29 Nov 2002 14:40:02 -0300 Subject: Using hardware in Erlang In-Reply-To: <20021129085549.GC87085@frogman.motivity.ca> Message-ID: <002701c297ce$5dc25830$1100a8c0@notebook> Hello Vance, Thanks for your reply! Eduardo is out of the Office today, but let me try to clarify a little bit more what he meant. We were discussing with him yesterday, the general system software architecture, considering specifically where and how to implement Earlang code in the different modules of the systems. In our system, (a prepaid system) we do have a couple of modules, with computer telephony boards in it. These boards all come with "Windows APIs for C, C++" (specifically, one of these apis, communicates with the device drivers through Win32 System calls). And theses modules are "clients" of an application server, which controls them by sending them commands and receiving events from them. Erlang should fit very well in both the application server and the database. Eduardo's question is if Erlang fits within the application server's clients (the computer telephony modules with the apis). As Erlang seems to be robust for administrating threads resources, he was trying to use Erlang to administrate the multi threads into these computer telephony modules, instead of doing it through Windows threads programming. Thanks again, Regards, Daniel Daniel Fernandez INswitch Solutions T. 5989-9667353 -----Mensaje original----- De: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] En nombre de Vance Shipley Enviado el: viernes, 29 de noviembre de 2002 5:56 Para: Inswitch Solutions - Erlang Evaluation CC: erlang-questions@REDACTED Asunto: Re: Using hardware in Erlang Eduardo, Since you used the word "synchronous" I would suggest that you try using erl_interface to build your device driver. In this method you would write a C program to interface with the hardware. This program would send and receive Erlang messages using the erl_interface API and libraries. Your Erlang/OTP node, where your real applications are hosted, would interface to the hardware by sending native Erlang messages back and forth to the "C node". Your C code is free to use blocking calls and other dangerous activities. The other approach is to use a linked in driver. Here you again write C code but it is a library which is linked against the Erlang runtime system. Your hardware interfacing code is now part of the Erlang runtime and must follow the rules. One of which is certainly not to block! You can use blocking functions if you must but then you'll have to implement a threading driver and have all blocking calls done in threads. The complexity climbs quickly here. I'd go with the erl_interface method first. If you find later that you want a more tightly coupled interface you can change it. We at Motivity use both types of drivers. Which is best depends on the method that we interface to the hardware mostly. In the one case we use Dialogic hardware boards which come with a Unix device driver. The API for this driver does not use standard file descriptors. It does allow asynchronous usage but because it doesn't use file descriptors we cannot use poll/select to wait on events/completions. This model really doesn't work in the linked in driver model. A third method for attaching hardware to the system is through direct TCP/IP messaging. Many hardware systems we are seeing these days provide their API over an ethernet (or cPCI PSB) interface instead of the PCI bus. For these you would use inet in Erlang and enjoy no C code at all. -Vance Vance Shipley Motivity Telecom Inc. +1 519 240 3684 On Fri, Nov 29, 2002 at 07:24:55PM +0100, Inswitch Solutions - Erlang Evaluation wrote: } } I?m evaluating Erlang and I?d like to know the best choice for calling hardware synchronous mode functions. } I read about linked-driver but I?m not sure if it's the right way. } } } Thanks in advance, } Eduardo Figoli } INSwitch } } From hal@REDACTED Fri Nov 29 20:44:13 2002 From: hal@REDACTED (Hal Snyder) Date: Fri, 29 Nov 2002 13:44:13 -0600 Subject: Fault-tolerance and distributed system In-Reply-To: ("Paroli, Bernardo"'s message of "Fri, 29 Nov 2002 11:47:19 -0300") References: Message-ID: <87adjsp3ea.fsf@ghidra.vail> "Paroli, Bernardo" writes: > I'm new in the Erlang's world and I need make a fault-tolerance and > distributed system. I'm learn the Design Principles document which > very interesting, but I don't found any example about these systems. > All examples that I found in the erlang page and the internet are > very simple examples and they not include advanced subjects. I'm > need examples of application behaviour and supervisor behaviour. Do > you help me? I got a lot of mileage out of Scott Lystig Fritchie's tutorial that showed up on this list 2000-01-27, "The Guerrilla 10 Minute Erlang Packaging School". (Thanks, Scott!) http://www.erlang.org/ml-archive/erlang-questions/200001/msg00037.html Scott's example shows application but not supervision. It also helps a lot to use the Emacs boilerplate when writing the framework of app, supervisor, and behaviour sources, especially the first few times. Hope this helps. From Sean.Hinde@REDACTED Fri Nov 29 18:09:43 2002 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Fri, 29 Nov 2002 17:09:43 -0000 Subject: Fault-tolerance and distributed system Message-ID: <04D356A3B172D611981B0008C791C3126BF5B2@IMP02MBX> I learned about much of this stuff by looking at the source of existing applications which make up OTP - inets was a good start. Making these things is also made much easier by the templates in the emacs mode - just select new application, supervisor, and gen_server and you have most of what you need Perhaps not quite what you hoped for but it is how I started and we now use these things second nature. Sean -----Original Message----- From: Paroli, Bernardo [mailto:bparoli@REDACTED] Sent: 29 November 2002 14:47 To: 'erlang-questions@REDACTED' Subject: Fault-tolerance and distributed system Hello, I'm new in the Erlang's world and I need make a fault-tolerance and distributed system. I'm learn the Design Principles document which very interesting, but I don't found any example about these systems. All examples that I found in the erlang page and the internet are very simple examples and they not include advanced subjects. I'm need examples of application behaviour and supervisor behaviour. Do you help me? Bernardo Paroli. NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From etxuwig@REDACTED Sat Nov 30 00:38:08 2002 From: etxuwig@REDACTED (Ulf Wiger) Date: Sat, 30 Nov 2002 00:38:08 +0100 (MET) Subject: inter-process inlining Message-ID: Just a thought that came to me while driving home. The EUC talk "On reducing interprocess overhead communication in concurrent programs" mentioned the idea of inlining, where a client process could (in some cases) directly fetch the server's state and perform the operation needed without context switching. Perhaps it's mentioned somewhere in the paper, but what happens if there is a bug in the server code, and it crashes? >From the presentation: Client code: inc(Beta) -> Beta ! {'++',self()}, receive {Beta, Answer} -> Answer end. Server code: ref_server(V) -> receive {'++', From} -> From ! {self(),V+1}, ref_server(V+1); ... end. The client could then be rewritten as: inc'(Beta) -> if ready(Beta) -> B_V=get('V',Beta)+1, save('V',B_V,Beta), B_V; true -> inc(Beta) end. What happens for example if V in Beta is, say, an atom? This will cause a runtime error, but normally, the server Beta would crash, and the error message would include, among other things, a backtrace, showing in which function it crashed and how it got there. This is certainly one of the benefits of Erlang: that error messages quite often give the programmer enough information to quickly find the bug and correct it. Would the normal error indication be simulated even with inlining, or would there be an entirely different error? /Uffe -- Ulf Wiger, Senior Specialist, / / / Architecture & Design of Carrier-Class Software / / / Strategic Product & System Management / / / Ericsson Telecom AB, ATM Multiservice Networks From sean.hinde@REDACTED Sat Nov 30 01:45:25 2002 From: sean.hinde@REDACTED (Sean Hinde) Date: Sat, 30 Nov 2002 00:45:25 +0000 Subject: OS X mega patch Message-ID: <03DA038B-03FD-11D7-B972-000393A45C3C@mac.com> Hi all, I present a mega patch which can be applied to a base R9B-0 release (or one with kents recent gs patch) to fix various things for OS X (and also some other platforms - though see next comment). There are various Makefile changes included which break support for other platforms (I never really figured out Makefiles). All changes to the code itself should be cross platform. Fixes: * ASN1 linked in driver compiles properly (Makefile change valid for OS X only) * Cursor Keys move the cursor - kinda important to lazy Mac users :) (Cross platform - previously released) * Starting a node using the bin/start script will create the pipe in /tmp correctly (Cross platform friendly - previously released) * CRYPTO works and in addition supports triple des (triple des support is new and cross platform, though makefile changes are not) * SSL compiles properly (valid for OS X only) * INETS handles a HTTP header packet also holding some of the POST content (Cross platform - previously released) * OS_MON is fully ported to OS X (Fully cross platform friendly change - not released previously) My intention is to shortly release a binary distro containing all these patches plus the gs patch - if anyone sees a problem or has any additional patches for OS X then please let me know as soon as you can. Thanks, Sean -------------- next part -------------- A non-text attachment was scrubbed... Name: osxdistro.patch Type: application/octet-stream Size: 13824 bytes Desc: not available URL: From fritchie@REDACTED Sat Nov 30 18:12:35 2002 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Sat, 30 Nov 2002 11:12:35 -0600 Subject: Using hardware in Erlang In-Reply-To: Message of "Fri, 29 Nov 2002 19:24:55 +0100." <001e01c297d4$9e963420$0200a8c0@design> Message-ID: <200211301712.gAUHCZF57374@snookles.snookles.com> >>>>> "ef" == Eduardo Figoli writes: ef> I'm evaluating Erlang and I'd like to know the best choice for ef> calling hardware synchronous mode functions. I read about ef> linked-driver but I'm not sure if it's the right way. The Erlang Driver Toolkit would be another option for creating such an interface, if I understand your question correctly. EDTK can be used to create drivers for both the "linked-in" variety, which executes within the same OS process as the Erlang virtual machine, and the "pipe" variety, where the Erlang VM communicates with a separate OS process via pipes and that separate process actually implements your hardware control. An ACM paper describing EDTK, along with the source code itself, can be found at http://www.snookles.com/erlang/edtk/. Alas, I've been slow to finish the first complete round of documentation, but there are several example drivers included in the source distribution. The Open Directory Project has some links to examples that may be helpful to you: http://dmoz.org/Computers/Programming/Languages/Erlang/Contributions/Interfaces/ -Scott From fritchie@REDACTED Sat Nov 30 19:57:23 2002 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Sat, 30 Nov 2002 12:57:23 -0600 Subject: Fault-tolerance and distributed system In-Reply-To: Message of "Fri, 29 Nov 2002 13:44:13 CST." <87adjsp3ea.fsf@ghidra.vail> Message-ID: <200211301857.gAUIvNF57501@snookles.snookles.com> >>>>> "hs" == Hal Snyder writes: hs> Scott's example shows application but not supervision. Wow, I forgot that I wrote that. Nowadays, I simply use old .rel and .app files from earlier projects as templates for new projects. Mailing list archives are a wonderful thing. I've put a dumb, brute-force, but functional supervisor example at http://www.snookles.com/erlang/misc/supervisor_example.tar.gz. After extracting the source: 1. Change directory to the "src" subdirectory. 2. Run GNU make (or compatible): "make" or "gmake' or however it's installed on your system. 3. Run "erl -pz ../ebin -boot foo" to start the "foo" application. 4. At the Erlang prompt, execute "appmon:start()." The "foo" application has a single supervisor the monitors two worker processes, both of which are generic servers that implement simple integer counters. Each worker also spawn_links three processes in order to make the appmon process tree look more interesting. Note that there are a bunch of io:format() debugging messages that (hopefully) demonstrate how arguments are passed from start functions to init functions. 5. Use commands like "increment:get1(counter1)." and "increment:get_many(counter2, 100000)" to communicate with the two counter servers. 6. Run "appmon:start()." to start the application monitor application. A GUI window will pop up. Click on the "foo" button. To demonstrate that the supervisors are working correctly, click the "Kill" button and then the "counter1" or "counter2" boxes. If either dies, the supervisor will kill all children and then restart them. Note that the PIDs of the counters' "children" change and that the SASL application will spit out some messages to the console. Killing one of the unnamed "child" processes will kill the "parent" counter process because the counter process is not trapping process exits ... which will then cause the foo_example_sup supervisor to react. One of the three "child" processes will exit after 15 seconds, but because it exits with a 'normal' status, its parent is not killed. Killing foo_example_sup will result in shutting down the application because there is nobody to restart it. Now, I can wait for Lennart or other OTP guru to criticise my example! :-) -Scott