From kruegger@REDACTED Fri Oct 1 00:04:16 2004 From: kruegger@REDACTED (Stephen Han) Date: Thu, 30 Sep 2004 15:04:16 -0700 Subject: use record in bit syntax Message-ID: <86f1f535040930150460c4af9c@mail.gmail.com> Why can't I use record in the bit syntax? ex) -record( date, { month, day } ). test() -> A = #date{month = 1, day = 20 }, << A#date.month/8, A#date.day/8 >>. This will give me the error during the compilation. regards, From carsten@REDACTED Fri Oct 1 01:03:52 2004 From: carsten@REDACTED (Carsten Schultz) Date: Fri, 1 Oct 2004 01:03:52 +0200 Subject: use record in bit syntax In-Reply-To: <86f1f535040930150460c4af9c@mail.gmail.com> References: <86f1f535040930150460c4af9c@mail.gmail.com> Message-ID: <20040930230351.GJ23179@penne.localnet> On Thu, Sep 30, 2004 at 03:04:16PM -0700, Stephen Han wrote: > Why can't I use record in the bit syntax? > > ex) > > -record( date, { month, day } ). > > test() -> > A = #date{month = 1, day = 20 }, > << A#date.month/8, A#date.day/8 >>. > It's << (A#date.month):8, (A#date.day):8>>. Greetings, Carsten -- Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin http://carsten.codimi.de/ PGP/GPG key on the pgp.net key servers, fingerprint on my home page. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From casper2000a@REDACTED Fri Oct 1 06:17:09 2004 From: casper2000a@REDACTED (Casper) Date: Fri, 1 Oct 2004 10:17:09 +0600 Subject: [OSS_ASN1] [ASN1] ASN.1 Parameterized Types... pls help In-Reply-To: <6.1.2.0.2.20040930141532.032ad6f0@mail.SOLINET.com> Message-ID: Hi William, Thanks for the advice. This is for a R&D project. We plan to look at the feasibility of using Erlang/OTP platform for development. Currently doing investigation on ASN.1 compiler on Erlang. I'm very new to ASN.1, so find it difficult to capture some parts of the specification. The GSM/UMTS MAP ASN.1 spec is alright. But I couldn't still figure out how to use TCAP ASN.1 spec can generate the TCAP Begin, Continue, End, etc message encoding/decoding functions. With help from some generous people out there, I could understand that I will have to create the ASN.1 spec of mine or find a standard spec, which will Instantiate the Parameterized Type specified in the TCAP. If you could point me to a standard spec like that or give me a sample how I could write something like that, would be very helpful. How to blend the MAP and TCAP ASN.1 specs? Thanks! Eranga _____ From: William H. Skelton [mailto:W.Skelton@REDACTED] Sent: Friday, October 01, 2004 3:12 AM To: casper2000a@REDACTED Subject: Fwd: [OSS_ASN1] [ASN1] ASN.1 Parameterized Types... pls help Hi Eranga, We found you can avoid some of the problems by using earlier TCAP specifications, which are fully compatible (I think), but simpler. Just as a matter of interest, is this a commercial or university project you are working on? Are you building your own tools? William Delivered-To: 23-asn1@REDACTED From: "Casper" To: , Date: Wed, 29 Sep 2004 18:07:45 +0600 X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcShiZSqLDE2KawuRfKjOPNw8+D0LwEkgVVg cc: eranga@REDACTED Subject: [OSS_ASN1] [ASN1] ASN.1 Parameterized Types... pls help X-BeenThere: asn1@REDACTED X-Mailman-Version: 2.1.1 List-Id: The ASN.1 Mailing List List-Unsubscribe: , > List-Archive: > List-Post: List-Help: > List-Subscribe: , > X-Sender: asn1-bounces@REDACTED X-Errors-To: asn1-bounces@REDACTED Sender: oss_asn1-owner@REDACTED Reply-To: oss_asn1@REDACTED X-RCPT-TO: net.com Hi All, I'm finding difficult in absorbing "How to use ASN.1 TCAPMessage to transport GSM MAP". The problem is how to generate TCAP Begin, Continue, End, etc messages. I read about the ASN.1 Parameterized Type, but still I could find the match of ASN.1 specs for MAP and TCAP. I thought below might be the way, but still that gives some compilation errors. mapSpecificAS ABSTRACT-SYNTAX ::= { MapSpecificPDUs IDENTIFIED BY gsm-MessagingId } MapSpecificPDUs ::= TCMessage{{ MAPOperations-Invokable}, { MAPOperations-Returnable}} MAPOperations-Invokable OPERATION ::= {sendRoutingInfoForSM | mo-ForwardSM | mt-ForwardSM} MAPOperations-Returnable OPERATION ::= {reportSM-DeliveryStatus | alertServiceCentre | informServiceCentre | readyForSM} The error is as below (Erlang ASN.1 compiler), {error,{asn1,[{error,{type,57, 'TCAPMessages', 'MapSpecificPDUs', {asn1,{duplicates_of_the_tags, [{'UNIVERSAL','INTEGER'}]}}}}]}} For your information, I have attached TCAPMessages.asn and MAP-ShortMessageServiceOperations.asn. I appreciate if anybody out there can give me some clue to solve this problem. Thanks in advance! Eranga _______________________________________________ ASN1 mailing list ASN1@REDACTED http://lists.asn1.org/mailman/listinfo/asn1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From casper2000a@REDACTED Fri Oct 1 06:19:39 2004 From: casper2000a@REDACTED (Casper) Date: Fri, 1 Oct 2004 10:19:39 +0600 Subject: [OSS_ASN1] [ASN1] ASN.1 Parameterized Types... pls help Message-ID: Hi William, Thanks for the advice. This is for a R&D project. We plan to look at the feasibility of using Erlang/OTP platform for development. Currently doing investigation on ASN.1 compiler on Erlang. I'm very new to ASN.1, so find it difficult to capture some parts of the specification. The GSM/UMTS MAP ASN.1 spec is alright. But I couldn't still figure out how to use TCAP ASN.1 spec can generate the TCAP Begin, Continue, End, etc message encoding/decoding functions. With help from some generous people out there, I could understand that I will have to create the ASN.1 spec of mine or find a standard spec, which will Instantiate the Parameterized Type specified in the TCAP. If you could point me to a standard spec like that or give me a sample how I could write something like that, would be very helpful. How to blend the MAP and TCAP ASN.1 specs? Thanks! Eranga _____ From: William H. Skelton [mailto:W.Skelton@REDACTED] Sent: Friday, October 01, 2004 3:12 AM To: casper2000a@REDACTED Subject: Fwd: [OSS_ASN1] [ASN1] ASN.1 Parameterized Types... pls help Hi Eranga, We found you can avoid some of the problems by using earlier TCAP specifications, which are fully compatible (I think), but simpler. Just as a matter of interest, is this a commercial or university project you are working on? Are you building your own tools? William Delivered-To: 23-asn1@REDACTED From: "Casper" To: , Date: Wed, 29 Sep 2004 18:07:45 +0600 X-Mailer: Microsoft Office Outlook, Build 11.0.5510 Thread-Index: AcShiZSqLDE2KawuRfKjOPNw8+D0LwEkgVVg cc: eranga@REDACTED Subject: [OSS_ASN1] [ASN1] ASN.1 Parameterized Types... pls help X-BeenThere: asn1@REDACTED X-Mailman-Version: 2.1.1 List-Id: The ASN.1 Mailing List List-Unsubscribe: , > List-Archive: > List-Post: List-Help: > List-Subscribe: , > X-Sender: asn1-bounces@REDACTED X-Errors-To: asn1-bounces@REDACTED Sender: oss_asn1-owner@REDACTED Reply-To: oss_asn1@REDACTED X-RCPT-TO: net.com Hi All, I'm finding difficult in absorbing "How to use ASN.1 TCAPMessage to transport GSM MAP". The problem is how to generate TCAP Begin, Continue, End, etc messages. I read about the ASN.1 Parameterized Type, but still I could find the match of ASN.1 specs for MAP and TCAP. I thought below might be the way, but still that gives some compilation errors. mapSpecificAS ABSTRACT-SYNTAX ::= { MapSpecificPDUs IDENTIFIED BY gsm-MessagingId } MapSpecificPDUs ::= TCMessage{{ MAPOperations-Invokable}, { MAPOperations-Returnable}} MAPOperations-Invokable OPERATION ::= {sendRoutingInfoForSM | mo-ForwardSM | mt-ForwardSM} MAPOperations-Returnable OPERATION ::= {reportSM-DeliveryStatus | alertServiceCentre | informServiceCentre | readyForSM} The error is as below (Erlang ASN.1 compiler), {error,{asn1,[{error,{type,57, 'TCAPMessages', 'MapSpecificPDUs', {asn1,{duplicates_of_the_tags, [{'UNIVERSAL','INTEGER'}]}}}}]}} For your information, I have attached TCAPMessages.asn and MAP-ShortMessageServiceOperations.asn. I appreciate if anybody out there can give me some clue to solve this problem. Thanks in advance! Eranga _______________________________________________ ASN1 mailing list ASN1@REDACTED http://lists.asn1.org/mailman/listinfo/asn1 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.wiger@REDACTED Fri Oct 1 12:53:31 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 1 Oct 2004 12:53:31 +0200 Subject: filename:dirname("."). Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F54028AE@ESEALNT442.al.sw.ericsson.se> Just a thought: Shouldn't filename:dirname(".") return either "..", or the same as filename:dirname(filename:absname("."))? 3> filename:dirname("."). "." 4> filename:dirname("ebin"). "." 5> filename:dirname(filename:absname(".")). "/home/etxuwig/work/dialyzer/dialyzer" 6> filename:absname("."). "/home/etxuwig/work/dialyzer/dialyzer/." Besides, does filename:absname(".") really return what it should? At least I have a tendency to use dirname/1 as a synonym for parent_dir/1 (which doesn't exist), but in this case, the results are a bit unexpected. /Uffe From erlang@REDACTED Fri Oct 1 14:36:04 2004 From: erlang@REDACTED (Inswitch Solutions - Erlang Evaluation) Date: Fri, 1 Oct 2004 10:36:04 -0200 Subject: Linking two Pids of nodes that are in the same machine - noconnection signal! References: <00ed01c4a6eb$b18e12a0$1e00a8c0@design> Message-ID: <005101c4a7b3$3c62a9a0$1e00a8c0@design> I'll try to explain the problem from another point of view. The machine I'm using is named design (IP=192.168.0.30). In Windows 2000: With LAN cable disconnected: ping design Response from 127.0.0.1: bytes=32 tieme<10ms TTL=128 With LAN cable connected: ping design Response from 192.168.0.30: bytes=32 tieme<10ms TTL=128 Having two Erlang nodes in the same machine the TCP socket connections are different: 1- if LAN cable disconnected the connection between nodes is established using 127.0.0.1:PORT 2- if LAN cable connected the connection between nodes is established using 192.168.0.30:PORT The problem is that in situation 2) and then if the LAN cable is disconnected the connections established with 192.168.0.30:PORT are lost. This can be also verified when "ping design" in W2000 command prompt. - Can I force Erlang to use 127.0.0.1 for local nodes connection instead of 192.168.0.30 ? - How can I solve this problem so not to lose local connections in any case? - Does the same behaviour happen in other OS? thanks in advance, Eduardo Figoli INSwitch Solutions ----- Original Message ----- From: Inswitch Solutions - Erlang Evaluation To: erlang-questions@REDACTED Sent: Thursday, September 30, 2004 10:46 AM Subject: Linking two Pids of nodes that are in the same machine - noconnection signal! The attached code links to pids of nodes that are in the same machine and I don't know why I receive a noconnection signal when the LAN cable is disconnected. This does no happen when running the code with the LAN cable disconnected and connecting/disconnecting it later. If someone wants to give a try, I send a code to test this situation and you should modify on node1.erl the blue text line below: {node2Pid, node2@REDACTED} ! {self()}, with the corresponding machine name where you will run it. On the same machine do the following: 1 - "erl -sname node2" 2 - "node2:start()." 2 - "erl -sname node1" 3 - "node1:start()." 4 - The pid is linked and a message is shown on node1. 5 - node2Pid shows a message every 1 sec while checking the queue message 6 - node1 process loops checking the queue message 7 - Disconnect LAN cable 8 - node2Pid receives a noconnection signal 9 - node1 process receives an {'EXIT',Pid,noconnection} - When linking Pids of different nodes that are in the same machine why do I receive a "noconnection" signal? - Having the LAN cable disconnected and doing steps 1..6 8..9, if I connect/disconnect the LAN cable the "noconnection" signal is never received (correct behaviour). - If in the source code I do not use "process_flag(trap_exit, true)," the processes terminate, why is this happenning as no kill signal is sent? thanks in advance, Eduardo Figoli INSwitch Solutions -------------- next part -------------- An HTML attachment was scrubbed... URL: From erlang@REDACTED Fri Oct 1 16:09:13 2004 From: erlang@REDACTED (Peter-Henry Mander) Date: Fri, 1 Oct 2004 15:09:13 +0100 Subject: Erlang TCP website is back! Message-ID: <20041001150913.0d4c9498.erlang@manderp.freeserve.co.uk> Hi Gurus, Tobbe has reinstated the eTCP website. Thanks Tobbe! http://www.bluetail.com/tobbe/etcp/ http://erlang.sics.se:5000/wiki/showPage?node=ErlangTCP Pete. -- "The Tao of Programming flows far away and returns on the wind of morning." From matthias@REDACTED Fri Oct 1 16:02:07 2004 From: matthias@REDACTED (Matthias Lang) Date: Fri, 1 Oct 2004 16:02:07 +0200 Subject: EUC accommodation Message-ID: <16733.25439.683411.73238@antilipe.corelatus.se> Hi, Just thought I'd share some information for those of you coming to the conference from outside Stockholm. Currency -------- 100 Swedish "Crowns" = 11 Euro = 7.5 Pounds Location -------- Bjarne has put up a couple of maps at http://www.erlang.se/euc/04/map.html The conference is in ?lvsj?, the Erlounge afterwards is downtown. ?lvsj? is marked on the map (a red star), downtown isn't, but it's roughly where the D of "Djurg?rden" is, near the top right of the upper map. Airports -------- There are four airports within range of Stockholm. * Arlanda is the main airport, the big airlines fly there. You can get from Arlanda to Stockholm by - "Arlanda Express" train. Leaves every 15 minutes, takes about 25 minutes, costs 180 sek - "Flygbuss" bus. Leaves every 10 or 15 minutes, takes about 45 minutes, costs 90 sek. There is also _one_ flygbuss which goes directly to ?lvsj?. It leaves at 9am, i.e. you'll miss the start of the conference. - Taxi. Won't save you any time, but it will cost more. I'd guess 400kr to town, 600kr to ?lvsj?. * Bromma. Used mainly for domestic flights. There's a flygbuss (20 minutes, 70sek), and also normal public transport, e.g. you can take bus 152 to the station and then the train to ?lvsj?, all in about 45 minutes. * Skavsta and V?ster?s. Used by Ryanair, e.g. there are several flights to and from London (Stansted/Luton) every day. Again, take the Flygbuss to town, it's the only sensible option. Accomodation ------------ Bjarne tells me that Hotell ?lvsj? is already booked out. Robert Raschke said he had to ring several hotels to find one with a room. Some tips from previous years were Hotell Bema, which is a less expensive small hotel in town and Hotell Formule 1, which is one of those "freeway" hotels. http://www.hotelformule1.com/formule1/fichehotel/gb/for/3065/fiche_hotel.shtml http://www.frommers.com/destinations/stockholm/H26472.html Transport --------- Stockholm is not a good place to get around by car. Public transport is excellent, though not cheap. If you're here for more than just one day, buy a strip of 20 "tickets", they're called "rabattkuponger" in Swedish. They cost 140kr and work on the subway, the commuter train and buses. You can buy them at the ticket booth in any subway station. When you get on a bus, or enter a subway station, you get your ticket stamped, more stamps get you further, e.g. ?lvjs? costs three stamps. If you pay cash, it'll cost you 45kr. Two people can use the same ticket strip when travelling together, but you get twice as many stamps... To get from Central station to ?lvsj?, find the commuter train "Pendelt?g". All southbound pendelt?g lines stop at ?lvsj?. Central station is a bit of a maze, if you manage to get from the flygbuss to the Pendelt?g in under five minutes, give yourself a gold star. ;-) Matt From ulf.wiger@REDACTED Fri Oct 1 17:49:38 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 1 Oct 2004 17:49:38 +0200 Subject: filename:dirname("."). Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F54028B2@ESEALNT442.al.sw.ericsson.se> Ok, I accept that. On my Solaris box, basename and dirname are synonymous. I'd like to suggest then that filename:dirname(".") stays as is, but that filename:basename(".") be changed to return the parent directory rather than ParentDir ++ "/.". It would then follow that e.g.: Eshell V5.4 (abort with ^G) 1> cd("/home/etxuwig"). /home/etxuwig ok 2> filename:dirname(filename:basename(".")). "/home/etxuwig" This would not break any expected analogy with libc, since in filename.erl, basename/1 and dirname/1 clearly are _not_ synonymous. It would also not break any documented feature, since it is not clear from the filename manual how it is expected to behave for ".". /Uffe > -----Original Message----- > From: Miguel Barreiro [mailto:enano@REDACTED] > Sent: den 1 oktober 2004 14:22 > To: Ulf Wiger (AL/EAB) > Subject: Re: filename:dirname("."). > > > > > Shouldn't filename:dirname(".") return either "..", or the same as > > filename:dirname(filename:absname("."))? > > If filename:dirname/1 is expected to be consistent with the UNIX libc > dirname (according to Single Unix Specification v2), the > current behaviour > is correct. See man 3 dirname. The GNU libc manpage for > dirname even cites > the "." example. > > Regards, > > Miguel > From casper2000a@REDACTED Fri Oct 1 18:56:06 2004 From: casper2000a@REDACTED (casper2000a@REDACTED) Date: Fri, 1 Oct 2004 22:56:06 +0600 Subject: [OSS_ASN1] [ASN1] ASN.1 Parameterized Types... pls help In-Reply-To: References: Message-ID: <1096649766.415d8c26e7d19@www.omnibis.com> An HTML attachment was scrubbed... URL: From casper2000a@REDACTED Fri Oct 1 18:57:34 2004 From: casper2000a@REDACTED (casper2000a@REDACTED) Date: Fri, 1 Oct 2004 22:57:34 +0600 Subject: [OSS_ASN1] [ASN1] ASN.1 Parameterized Types... pls help In-Reply-To: References: Message-ID: <1096649854.415d8c7e2c264@www.omnibis.com> An HTML attachment was scrubbed... URL: From sean.hinde@REDACTED Fri Oct 1 20:58:46 2004 From: sean.hinde@REDACTED (Sean Hinde) Date: Fri, 1 Oct 2004 19:58:46 +0100 Subject: Linking two Pids of nodes that are in the same machine - noconnection signal! In-Reply-To: <005101c4a7b3$3c62a9a0$1e00a8c0@design> References: <00ed01c4a6eb$b18e12a0$1e00a8c0@design> <005101c4a7b3$3c62a9a0$1e00a8c0@design> Message-ID: You could use erl -sname node@REDACTED - this at least works on non windows OSs. Windows 2000 doesn't sound like a very good option for delivering telco solutions.. Sean On 1 Oct 2004, at 13:36, Inswitch Solutions - Erlang Evaluation wrote: > ? > I'll try to explain the problem from another?point of view. > The machine I'm using is named design (IP=192.168.0.30). > ? > In Windows 2000: > With LAN cable disconnected: > ping design > Response from 127.0.0.1: bytes=32 tieme<10ms TTL=128 > With LAN cable connected: > > ping design > Response from 192.168.0.30: bytes=32 tieme<10ms TTL=128 > ? > > Having two Erlang nodes in the same machine the TCP socket connections > are different: > 1- if?LAN cable disconnected the connection between nodes is > established using 127.0.0.1:PORT > 2- if?LAN cable connected the connection between nodes?is established > using 192.168.0.30:PORT > ? > The problem is that?in situation 2) and?then if the LAN cable is > disconnected the connections established with 192.168.0.30:PORT are > lost. This can be also verified when?"ping design" in W2000 command > prompt. > ? > - Can I force Erlang to use 127.0.0.1 for local nodes connection > instead of 192.168.0.30 ? > - How can I solve this problem so?not to lose local connections in any > case? > - Does the same behaviour happen in other OS? > ? > ? > thanks in advance, > Eduardo Figoli > INSwitch Solutions > ? > ----- Original Message ----- > From: Inswitch Solutions - Erlang Evaluation > To: erlang-questions@REDACTED > Sent: Thursday, September 30, 2004 10:46 AM > Subject: Linking two Pids of nodes that are in the same machine - > noconnection signal! > > ? > The attached code links to pids of?nodes that are in the same machine > and I don't know why I receive a noconnection signal when the LAN > cable is disconnected. This does no happen when running the code with > the LAN cable disconnected and connecting/disconnecting it later. > ? > If someone wants to give a try,? I send a code to test this situation > and?you should modify on node1.erl the blue text?line below: > {node2Pid, node2@REDACTED} ! {self()}, > with the corresponding machine name where you will run it. > ? > ? > On the same machine do the following: > ? > > 1 - "erl -sname node2" > 2 - "node2:start()." > ? > > 2 - "erl -sname node1" > 3 - "node1:start()." > ? > 4 - The pid is linked and?a message is shown on node1. > 5 - node2Pid shows a message every 1 sec while checking the queue > message > 6 - node1 process loops checking the queue message > ? > 7 - Disconnect LAN cable > 8 - node2Pid receives a noconnection signal > 9 - node1 process receives an {'EXIT',Pid,noconnection} > ? > ? > - When linking Pids of different nodes that are in the same machine > why do I receive a "noconnection" signal? > - Having?the LAN cable?disconnected and?doing steps 1..6 8..9, if I > connect/disconnect the LAN cable the "noconnection" signal is never > received (correct behaviour). > - If in the source code I do not use "process_flag(trap_exit, > true),"? the?processes?terminate, why is this happenning as no kill > signal is sent? > ? > ? > thanks in advance, > Eduardo Figoli > INSwitch Solutions > ? > ? > ? > ? From erlang@REDACTED Fri Oct 1 21:21:50 2004 From: erlang@REDACTED (Inswitch Solutions - Erlang Evaluation) Date: Fri, 1 Oct 2004 17:21:50 -0200 Subject: Linking two Pids of nodes that are in the same machine - noconnection signal! References: <00ed01c4a6eb$b18e12a0$1e00a8c0@design> <005101c4a7b3$3c62a9a0$1e00a8c0@design> Message-ID: <1e0a01c4a7ec$49952c90$1e00a8c0@design> Hi Sean, But in that case the node can't be seen from another machine. I have node1 in machine1 and node2 and node3 in machine2 --node1 in Mach1-- | | node2 in Mach2----- node3 in Mach2 Node1 in Machine1 links to resources asked to node2, Node2 in Machine2 links to resources asked to node3 in Machine2. If disconnecting the LAN on Machine2 node2 will lost connection with node1 but should not lost connection with node3. Setting localhost on node2 will not allow node1 to see it. Does this happen in other OS? Any ideas to solve this? One of my last email questions should have been: Can I force Erlang to use 192.168.0.30 as the IP for a machine (desgn in my case)? thanks, Eduardo Figoli INSwitch Solutions ----- Original Message ----- From: "Sean Hinde" To: "Inswitch Solutions - Erlang Evaluation" Cc: Sent: Friday, October 01, 2004 4:58 PM Subject: Re: Linking two Pids of nodes that are in the same machine - noconnection signal! You could use erl -sname node@REDACTED - this at least works on non windows OSs. Windows 2000 doesn't sound like a very good option for delivering telco solutions.. Sean On 1 Oct 2004, at 13:36, Inswitch Solutions - Erlang Evaluation wrote: > > I'll try to explain the problem from another point of view. > The machine I'm using is named design (IP=192.168.0.30). > > In Windows 2000: > With LAN cable disconnected: > ping design > Response from 127.0.0.1: bytes=32 tieme<10ms TTL=128 > With LAN cable connected: > > ping design > Response from 192.168.0.30: bytes=32 tieme<10ms TTL=128 > > > Having two Erlang nodes in the same machine the TCP socket connections > are different: > 1- if LAN cable disconnected the connection between nodes is > established using 127.0.0.1:PORT > 2- if LAN cable connected the connection between nodes is established > using 192.168.0.30:PORT > > The problem is that in situation 2) and then if the LAN cable is > disconnected the connections established with 192.168.0.30:PORT are > lost. This can be also verified when "ping design" in W2000 command > prompt. > > - Can I force Erlang to use 127.0.0.1 for local nodes connection > instead of 192.168.0.30 ? > - How can I solve this problem so not to lose local connections in any > case? > - Does the same behaviour happen in other OS? > > > thanks in advance, > Eduardo Figoli > INSwitch Solutions > > ----- Original Message ----- > From: Inswitch Solutions - Erlang Evaluation > To: erlang-questions@REDACTED > Sent: Thursday, September 30, 2004 10:46 AM > Subject: Linking two Pids of nodes that are in the same machine - > noconnection signal! > > > The attached code links to pids of nodes that are in the same machine > and I don't know why I receive a noconnection signal when the LAN > cable is disconnected. This does no happen when running the code with > the LAN cable disconnected and connecting/disconnecting it later. > > If someone wants to give a try, I send a code to test this situation > and you should modify on node1.erl the blue text line below: > {node2Pid, node2@REDACTED} ! {self()}, > with the corresponding machine name where you will run it. > > > On the same machine do the following: > > > 1 - "erl -sname node2" > 2 - "node2:start()." > > > 2 - "erl -sname node1" > 3 - "node1:start()." > > 4 - The pid is linked and a message is shown on node1. > 5 - node2Pid shows a message every 1 sec while checking the queue > message > 6 - node1 process loops checking the queue message > > 7 - Disconnect LAN cable > 8 - node2Pid receives a noconnection signal > 9 - node1 process receives an {'EXIT',Pid,noconnection} > > > - When linking Pids of different nodes that are in the same machine > why do I receive a "noconnection" signal? > - Having the LAN cable disconnected and doing steps 1..6 8..9, if I > connect/disconnect the LAN cable the "noconnection" signal is never > received (correct behaviour). > - If in the source code I do not use "process_flag(trap_exit, > true)," the processes terminate, why is this happenning as no kill > signal is sent? > > > thanks in advance, > Eduardo Figoli > INSwitch Solutions > > > > From sean.hinde@REDACTED Fri Oct 1 22:10:21 2004 From: sean.hinde@REDACTED (Sean Hinde) Date: Fri, 1 Oct 2004 21:10:21 +0100 Subject: Linking two Pids of nodes that are in the same machine - noconnection signal! In-Reply-To: <1e0a01c4a7ec$49952c90$1e00a8c0@design> References: <00ed01c4a6eb$b18e12a0$1e00a8c0@design> <005101c4a7b3$3c62a9a0$1e00a8c0@design> <1e0a01c4a7ec$49952c90$1e00a8c0@design> Message-ID: I suspect it might depend on whether your machine has a permanent IP address. Certainly my laptop shows this behaviour when I pull out the LAN cable because the address was assigned by DHCP. It runs OS X. Sean On 1 Oct 2004, at 20:21, Inswitch Solutions - Erlang Evaluation wrote: > > Hi Sean, > > But in that case the node can't be seen from another machine. > > I have node1 in machine1 and node2 and node3 in machine2 > --node1 in Mach1-- > | | > node2 in Mach2----- node3 in Mach2 > > Node1 in Machine1 links to resources asked to node2, Node2 in > Machine2 > links to resources asked to node3 in Machine2. > If disconnecting the LAN on Machine2 node2 will lost connection with > node1 > but should not lost connection with node3. > > Setting localhost on node2 will not allow node1 to see it. > > Does this happen in other OS? Any ideas to solve this? > One of my last email questions should have been: Can I force Erlang to > use > 192.168.0.30 as the IP for a machine (desgn in my case)? > > > thanks, > Eduardo Figoli > INSwitch Solutions > > > > > ----- Original Message ----- > From: "Sean Hinde" > To: "Inswitch Solutions - Erlang Evaluation" > Cc: > Sent: Friday, October 01, 2004 4:58 PM > Subject: Re: Linking two Pids of nodes that are in the same machine - > noconnection signal! > > > You could use erl -sname node@REDACTED - this at least works on non > windows OSs. > > Windows 2000 doesn't sound like a very good option for delivering telco > solutions.. > > Sean > > On 1 Oct 2004, at 13:36, Inswitch Solutions - Erlang Evaluation wrote: > >> >> I'll try to explain the problem from another point of view. >> The machine I'm using is named design (IP=192.168.0.30). >> >> In Windows 2000: >> With LAN cable disconnected: >> ping design >> Response from 127.0.0.1: bytes=32 tieme<10ms TTL=128 >> With LAN cable connected: >> >> ping design >> Response from 192.168.0.30: bytes=32 tieme<10ms TTL=128 >> >> >> Having two Erlang nodes in the same machine the TCP socket connections >> are different: >> 1- if LAN cable disconnected the connection between nodes is >> established using 127.0.0.1:PORT >> 2- if LAN cable connected the connection between nodes is established >> using 192.168.0.30:PORT >> >> The problem is that in situation 2) and then if the LAN cable is >> disconnected the connections established with 192.168.0.30:PORT are >> lost. This can be also verified when "ping design" in W2000 command >> prompt. >> >> - Can I force Erlang to use 127.0.0.1 for local nodes connection >> instead of 192.168.0.30 ? >> - How can I solve this problem so not to lose local connections in any >> case? >> - Does the same behaviour happen in other OS? >> >> >> thanks in advance, >> Eduardo Figoli >> INSwitch Solutions >> >> ----- Original Message ----- >> From: Inswitch Solutions - Erlang Evaluation >> To: erlang-questions@REDACTED >> Sent: Thursday, September 30, 2004 10:46 AM >> Subject: Linking two Pids of nodes that are in the same machine - >> noconnection signal! >> >> >> The attached code links to pids of nodes that are in the same machine >> and I don't know why I receive a noconnection signal when the LAN >> cable is disconnected. This does no happen when running the code with >> the LAN cable disconnected and connecting/disconnecting it later. >> >> If someone wants to give a try, I send a code to test this situation >> and you should modify on node1.erl the blue text line below: >> {node2Pid, node2@REDACTED} ! {self()}, >> with the corresponding machine name where you will run it. >> >> >> On the same machine do the following: >> >> >> 1 - "erl -sname node2" >> 2 - "node2:start()." >> >> >> 2 - "erl -sname node1" >> 3 - "node1:start()." >> >> 4 - The pid is linked and a message is shown on node1. >> 5 - node2Pid shows a message every 1 sec while checking the queue >> message >> 6 - node1 process loops checking the queue message >> >> 7 - Disconnect LAN cable >> 8 - node2Pid receives a noconnection signal >> 9 - node1 process receives an {'EXIT',Pid,noconnection} >> >> >> - When linking Pids of different nodes that are in the same machine >> why do I receive a "noconnection" signal? >> - Having the LAN cable disconnected and doing steps 1..6 8..9, if I >> connect/disconnect the LAN cable the "noconnection" signal is never >> received (correct behaviour). >> - If in the source code I do not use "process_flag(trap_exit, >> true)," the processes terminate, why is this happenning as no kill >> signal is sent? >> >> >> thanks in advance, >> Eduardo Figoli >> INSwitch Solutions >> >> >> >> > > > From valentin@REDACTED Sat Oct 2 02:44:22 2004 From: valentin@REDACTED (Valentin Micic) Date: Sat, 2 Oct 2004 02:44:22 +0200 Subject: Linking two Pids of nodes that are in the same machine - noconnection signal! References: <00ed01c4a6eb$b18e12a0$1e00a8c0@design> <005101c4a7b3$3c62a9a0$1e00a8c0@design> Message-ID: <012d01c4a818$f606aa90$0100a8c0@MONEYMAKER2> You may achieve this using following steps: 1) Open your local host file -- for windows that would be under C:\WINDOWS\system32\drivers\etc\hosts (make sure that you're using the right HOSTS file) 2) Add an alias to the localhost and save changes i.e. 127.0.0.1 localhost theErlangHost 3) Start erlang using: erl -sname node1@REDACTED This will force any other local erlang node to connect using 127.0.0.1 In order to allow remote nodes to connect as well, you would need to configure remote host file like this: 192.168.0.30 theErlangHost which will allow remote nodes to come in using the LAN interface. EXPLANATION: If you run command "epmd -names" the epmd will return list of names and associated port numbers, for example: epmd: up and running on port 4369 with data: name node1 at port 3527 name node2 at port 3513 If you then go and chack the listeners for these ports, you're likely to find something like this: TCP 0.0.0.0:3513 0.0.0.0:0 LISTENING TCP 0.0.0.0:3527 0.0.0.0:0 LISTENING This means that transport layer supports any available incoming interface, thus everything is in address resolution: Local node will resolve theErlangHost as 127.0.0.1, whislt remote shall use 192.168.0.30. The important thing is to keep the symbolic host name the same, as it is used by net-kernel. (It is interesting though, that hidden C-nodes are not required to use the symbolic host names -- plain IP address does the trick). The same is true for other operating systems as well. Tell me if this makes any sense to you. Valentin. PS Funny thing is that I've been discussing similar (yet completely different thing) with Francesco yesterday, and he suggested startup syntax erl -sname sys@REDACTED It did not help me solve my problem -- no matter what I've tried it resulted in failure. However, the consequences of these failure is the above -- I'd be very pleased if it can help you. BTW: anybody knows how to force a single erlang run-time to support two, or more internal hostnames, i.e. If I have two interfaces: 10.0.0.2 host_private 198.1.2.3 host_public How can I start node1 in such a way that both rpc:call( 'node1@REDACTED', os, type, []). and rpc:call( 'node1@REDACTED', os, type, []). connect to the same node1? ----- Original Message ----- From: Inswitch Solutions - Erlang Evaluation To: erlang-questions@REDACTED Sent: Friday, October 01, 2004 2:36 PM Subject: Re: Linking two Pids of nodes that are in the same machine - noconnection signal! I'll try to explain the problem from another point of view. The machine I'm using is named design (IP=192.168.0.30). In Windows 2000: With LAN cable disconnected: ping design Response from 127.0.0.1: bytes=32 tieme<10ms TTL=128 With LAN cable connected: ping design Response from 192.168.0.30: bytes=32 tieme<10ms TTL=128 Having two Erlang nodes in the same machine the TCP socket connections are different: 1- if LAN cable disconnected the connection between nodes is established using 127.0.0.1:PORT 2- if LAN cable connected the connection between nodes is established using 192.168.0.30:PORT The problem is that in situation 2) and then if the LAN cable is disconnected the connections established with 192.168.0.30:PORT are lost. This can be also verified when "ping design" in W2000 command prompt. - Can I force Erlang to use 127.0.0.1 for local nodes connection instead of 192.168.0.30 ? - How can I solve this problem so not to lose local connections in any case? - Does the same behaviour happen in other OS? thanks in advance, Eduardo Figoli INSwitch Solutions ----- Original Message ----- From: Inswitch Solutions - Erlang Evaluation To: erlang-questions@REDACTED Sent: Thursday, September 30, 2004 10:46 AM Subject: Linking two Pids of nodes that are in the same machine - noconnection signal! The attached code links to pids of nodes that are in the same machine and I don't know why I receive a noconnection signal when the LAN cable is disconnected. This does no happen when running the code with the LAN cable disconnected and connecting/disconnecting it later. If someone wants to give a try, I send a code to test this situation and you should modify on node1.erl the blue text line below: {node2Pid, node2@REDACTED} ! {self()}, with the corresponding machine name where you will run it. On the same machine do the following: 1 - "erl -sname node2" 2 - "node2:start()." 2 - "erl -sname node1" 3 - "node1:start()." 4 - The pid is linked and a message is shown on node1. 5 - node2Pid shows a message every 1 sec while checking the queue message 6 - node1 process loops checking the queue message 7 - Disconnect LAN cable 8 - node2Pid receives a noconnection signal 9 - node1 process receives an {'EXIT',Pid,noconnection} - When linking Pids of different nodes that are in the same machine why do I receive a "noconnection" signal? - Having the LAN cable disconnected and doing steps 1..6 8..9, if I connect/disconnect the LAN cable the "noconnection" signal is never received (correct behaviour). - If in the source code I do not use "process_flag(trap_exit, true)," the processes terminate, why is this happenning as no kill signal is sent? thanks in advance, Eduardo Figoli INSwitch Solutions -------------- next part -------------- An HTML attachment was scrubbed... URL: From casper2000a@REDACTED Sun Oct 3 04:52:14 2004 From: casper2000a@REDACTED (casper2000a@REDACTED) Date: Sun, 3 Oct 2004 08:52:14 +0600 Subject: FW: ASN.1 Parameterized Types... pls help In-Reply-To: <415D4AA9.1050700@erix.ericsson.se> References: <415D4AA9.1050700@erix.ericsson.se> Message-ID: <1096771934.415f695ebd709@www.omnibis.com> Hi Bertil and all, In the week end, I could look more deep in to the ASN problem. I have attached the asn file I used to find the below results. InfClass7.asn: given the below compiler error. asn1error:104:'InfClass7':'My-message' {internal_error, {'cant check', [{'Externalvaluereference', 104, 'InfClass7', operationA}]}} {error,{asn1,[{error,{type,104, 'InfClass7', 'My-message', {internal_error, {'cant check', [{'Externalvaluereference', 104, 'InfClass7', operationA}]}}}}]}} But when I delete "({Operations})" of line 125, it compiles without a problem. So I guess it's a problem when doing a Reference to a Value in an external file or something. Or may be it's just a wrong ASN.1 syntax. If so, please advice me the correct way to write it. InfClass5.asn: as it is, the file compiles without a problem. But when I remove the comment ("--") from line 50, it gives the same error above. I hope above information will help you in solving any compiler error, if there's one. Or if it's just an syntax or symantic error in my writing, please advice. Thanks! Eranga Quoting Bertil Karlsson : > Casper, It seems to be an error in the asn1 compiler. I\'m tracking it and hopefully have a bug fix next week. /Bertil Casper wrote: > Hi Bertil, > > I wonder if you received my below email. Could you be able to give me some > guide lines? > > Thanks! > Eranga > > > > -----Original Message----- > From: Casper [mailto:casper2000a@REDACTED] > Sent: Thursday, September 30, 2004 5:04 PM > To: \'Bertil Karlsson\' > Subject: RE: ASN.1 Parameterized Types... pls help > > Hi Bertil, > > Oh, I\'m glad to hear from you. I was whacking my brains to find the > solution, but so far failed. I really appreciate if you can give me some > clue. > > I have attached a Zipped file of ASN.1 directory. What I need to do is write > the required ASN.1 specification to instantiate the parameterized > TCAPMessages to do GSM/UMTS Map communication. > > The new parts I added to TCAPMessages.asn file apprears between \"-- Start - > Added by Eranga\" and \"-- End - Added by Eranga\" blocks. > > Thanks a lot for your help. > Eranga > > > > > -----Original Message----- > From: Bertil Karlsson [mailto:bertil@REDACTED] > Sent: Thursday, September 30, 2004 4:48 PM > To: Casper > Subject: Re: ASN.1 Parameterized Types... pls help > > Hi, > > If you can send me all your asn1 source maybe I can see something. Those > that were attached didn\'t contain the definitions below. > > /Bertil > > Casper wrote: > >>Hi All, >> >>I\'m finding difficult in absorbing \"How to use ASN.1 TCAPMessage to >>transport GSM MAP\". The problem is how to generate TCAP Begin, Continue, >>End, etc messages. >> >>I read about the ASN.1 Parameterized Type, but still I could find the > > match > >>of ASN.1 specs for MAP and TCAP. I thought below might be the way, but > > still > >>that gives some compilation errors. >> >>mapSpecificAS ABSTRACT-SYNTAX ::= { >> MapSpecificPDUs >> IDENTIFIED BY gsm-MessagingId >>} >> >>MapSpecificPDUs ::= >> TCMessage{{ MAPOperations-Invokable}, { MAPOperations-Returnable}} >> >> >>MAPOperations-Invokable OPERATION ::= >> {sendRoutingInfoForSM | mo-ForwardSM | mt-ForwardSM} >>MAPOperations-Returnable OPERATION ::= >> {reportSM-DeliveryStatus | alertServiceCentre | informServiceCentre > > | > >>readyForSM} >> >>The error is as below (Erlang ASN.1 compiler), >> {error,{asn1,[{error,{type,57, >> \'TCAPMessages\', >> \'MapSpecificPDUs\', >> {asn1,{duplicates_of_the_tags, >> [{\'UNIVERSAL\',\'INTEGER\'}]}}}}]}} >> >>For your information, I have attached TCAPMessages.asn and >>MAP-ShortMessageServiceOperations.asn. >> >>I appreciate if anybody out there can give me some clue to solve this >>problem. >> >>Thanks in advance! >>Eranga > > --------------This mail sent through OmniBIS.com-------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: test.zip Type: application/x-zip-compressed Size: 11152 bytes Desc: not available URL: From hedeland@REDACTED Mon Oct 4 12:33:59 2004 From: hedeland@REDACTED (Per Hedeland) Date: Mon, 4 Oct 2004 12:33:59 +0200 (CEST) Subject: filename:dirname("."). In-Reply-To: <37FB7AA6F5F9814FB634A7BF4C35A6F54028B2@ESEALNT442.al.sw.ericsson.se> Message-ID: <200410041033.i94AXxvb014905@tordmule.bluetail.com> "Ulf Wiger (AL/EAB)" wrote: > >On my Solaris box, basename and dirname are synonymous. Surely not: $ uname -sr SunOS 5.8 $ basename /foo/bar bar $ dirname /foo/bar /foo Perhaps you mean that theye are synonymous when the argument is "." - if so, yes, that follows from their definition. >I'd like to suggest then that filename:dirname(".") stays as is, >but that filename:basename(".") be changed to return the >parent directory rather than ParentDir ++ "/.". Hm, I assume you mean absname here, not basename? Otherwise s/dir/base/ on Miguel's message... The dirname and basename functions are purely syntactical operations. For absname this change seems reasonable, especially since absname already does remove "intermediate" occurrences of ".". There are some instances where "/foo/bar" and "/foo/bar/." can mean different things though (notably if "bar" is a symlink pointing to a directory). And you could use filename:absname("") instead... --Per Hedeland From dietmar@REDACTED Mon Oct 4 13:23:12 2004 From: dietmar@REDACTED (Dietmar Admin Schaefer) Date: Mon, 04 Oct 2004 13:23:12 +0200 Subject: erlang <-> pvm Message-ID: <416132A0.5000100@ast.dfs.de> Hi ! I have a very special problem ! I need to read and send messages between a system using pvm as the message passing method and erlang processes. My first idea was to use perl as a glue because perl can read/write pvm messages and can send messages to erlang processes using sockets. I now find this solution a little bit dissatisfactory. Does anybody out there know how to directly connect erlang to pvm ??? HOw much afford would it be ? Regards Dietmar From ulf.wiger@REDACTED Mon Oct 4 13:43:31 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 4 Oct 2004 13:43:31 +0200 Subject: filename:dirname("."). Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F54028B7@ESEALNT442.al.sw.ericsson.se> My mistake -- I meant that absname and dirname are synonymous... which they aren't (absname doesn't exist in my Solaris box). I must plead temporary insanity, but point out that this should strenghten my case, if anything (not the insanity, but rather the fact that even if compatibility with libc's dirname might be an issue, no such issue exists with filename:absname/1.) IOW, your debugging of my suggestion was successful, and this is indeed what I tried to propose. (: Rephrased after s/base/dir: I'd like to suggest then that filename:dirname(".") stays as is, but that filename:absname(".") be changed to return the parent directory rather than ParentDir ++ "/.". /Uffe > -----Original Message----- > From: Per Hedeland [mailto:hedeland@REDACTED] > Sent: den 4 oktober 2004 12:34 > To: erlang-questions@REDACTED; Ulf Wiger (AL/EAB) > Subject: RE: filename:dirname("."). > > > "Ulf Wiger (AL/EAB)" wrote: > > > >On my Solaris box, basename and dirname are synonymous. > > Surely not: > > $ uname -sr > SunOS 5.8 > $ basename /foo/bar > bar > $ dirname /foo/bar > /foo > > Perhaps you mean that theye are synonymous when the argument > is "." - if > so, yes, that follows from their definition. > > >I'd like to suggest then that filename:dirname(".") stays as is, > >but that filename:basename(".") be changed to return the > >parent directory rather than ParentDir ++ "/.". > > Hm, I assume you mean absname here, not basename? Otherwise > s/dir/base/ > on Miguel's message... The dirname and basename functions are purely > syntactical operations. > > For absname this change seems reasonable, especially since absname > already does remove "intermediate" occurrences of ".". There are some > instances where "/foo/bar" and "/foo/bar/." can mean different things > though (notably if "bar" is a symlink pointing to a > directory). And you > could use filename:absname("") instead... > > --Per Hedeland > From joe@REDACTED Mon Oct 4 15:02:22 2004 From: joe@REDACTED (Joe Armstrong) Date: Mon, 4 Oct 2004 15:02:22 +0200 (CEST) Subject: erlang <-> pvm In-Reply-To: <416132A0.5000100@ast.dfs.de> References: <416132A0.5000100@ast.dfs.de> Message-ID: I think the "easiest" (TM) way to do this would be to implement the pvmd protocol itself in Erlang. Sending and receiving messages from TCP/UDP ports in Erlang is very easy (especially using the binary syntax). If you use libraries in C/perl/whatever to do this for you you'll end up with fighting the problem of "how to interface Erlang to C/perl/whatever ..." instead of interfacing Erlang to pvm. The direct method using sockets and doing all the protocol work yourself should be much easier than using some C/perl... library - this is because the Erlang concurrency model matches very nicely with the pvm concurrency model. In C/perl/.../any sequential language you'll have to simulate concurrency with callbacks. I spent 10 minutes Googeling to see if I could find the PVM protocol specification - but I couldn't find it << amazing the most important document of all is missing >> - in the PVM distribution there is a file pvmproto.h which describes the inter-machine pvm *packets* (but not the *protocol*). If (and it's a big if) the entire protocol is as described in pvmproto.h and if the protocol is stateless (meaning that the PMV machine can receive any of these protocol packets in any internal state) then your problem looks to be rather simple. Just code up the protocol as implied by pvmproto.h and send message to the appropriate PVM port. BTW - if you make any progress on this please let us know. I'm specifically interested in any pointers to the PVM protocol specification - I had hoped to find a short document defining the protocol and the ports etc. that it uses. Give such a document Erlangizing the interface should be easy. (failing this you'd have to read the PVM code, always a painful alternative) Cheers /Joe On Mon, 4 Oct 2004, Dietmar Admin Schaefer wrote: > Hi ! > > > I have a very special problem ! > > I need to read and send messages between a system using pvm as the message > passing method > and erlang processes. > > My first idea was to use perl as a glue because perl can read/write pvm > messages and can send > messages to erlang processes using sockets. > > I now find this solution a little bit dissatisfactory. > > > Does anybody out there know how to directly connect erlang to pvm ??? > > HOw much afford would it be ? > > > > Regards > > > > Dietmar > > From erlang@REDACTED Mon Oct 4 15:29:43 2004 From: erlang@REDACTED (Inswitch Solutions - Erlang Evaluation) Date: Mon, 4 Oct 2004 11:29:43 -0200 Subject: Linking two Pids of nodes that are in the same machine - noconnection signal! References: <00ed01c4a6eb$b18e12a0$1e00a8c0@design> <005101c4a7b3$3c62a9a0$1e00a8c0@design> <012d01c4a818$f606aa90$0100a8c0@MONEYMAKER2> Message-ID: <010d01c4aa16$b98b40d0$1e00a8c0@design> Hi Valentin, I have succesfully tried what you have told me. The problem when processes are linked has been solved. thank you very much, Eduardo Figoli INSwitch Solutions ----- Original Message ----- From: Valentin Micic To: erlang-questions@REDACTED Sent: Friday, October 01, 2004 10:44 PM Subject: Re: Linking two Pids of nodes that are in the same machine - noconnection signal! You may achieve this using following steps: 1) Open your local host file -- for windows that would be under C:\WINDOWS\system32\drivers\etc\hosts (make sure that you're using the right HOSTS file) 2) Add an alias to the localhost and save changes i.e. 127.0.0.1 localhost theErlangHost 3) Start erlang using: erl -sname node1@REDACTED This will force any other local erlang node to connect using 127.0.0.1 In order to allow remote nodes to connect as well, you would need to configure remote host file like this: 192.168.0.30 theErlangHost which will allow remote nodes to come in using the LAN interface. EXPLANATION: If you run command "epmd -names" the epmd will return list of names and associated port numbers, for example: epmd: up and running on port 4369 with data: name node1 at port 3527 name node2 at port 3513 If you then go and chack the listeners for these ports, you're likely to find something like this: TCP 0.0.0.0:3513 0.0.0.0:0 LISTENING TCP 0.0.0.0:3527 0.0.0.0:0 LISTENING This means that transport layer supports any available incoming interface, thus everything is in address resolution: Local node will resolve theErlangHost as 127.0.0.1, whislt remote shall use 192.168.0.30. The important thing is to keep the symbolic host name the same, as it is used by net-kernel. (It is interesting though, that hidden C-nodes are not required to use the symbolic host names -- plain IP address does the trick). The same is true for other operating systems as well. Tell me if this makes any sense to you. Valentin. PS Funny thing is that I've been discussing similar (yet completely different thing) with Francesco yesterday, and he suggested startup syntax erl -sname sys@REDACTED It did not help me solve my problem -- no matter what I've tried it resulted in failure. However, the consequences of these failure is the above -- I'd be very pleased if it can help you. BTW: anybody knows how to force a single erlang run-time to support two, or more internal hostnames, i.e. If I have two interfaces: 10.0.0.2 host_private 198.1.2.3 host_public How can I start node1 in such a way that both rpc:call( 'node1@REDACTED', os, type, []). and rpc:call( 'node1@REDACTED', os, type, []). connect to the same node1? ----- Original Message ----- From: Inswitch Solutions - Erlang Evaluation To: erlang-questions@REDACTED Sent: Friday, October 01, 2004 2:36 PM Subject: Re: Linking two Pids of nodes that are in the same machine - noconnection signal! I'll try to explain the problem from another point of view. The machine I'm using is named design (IP=192.168.0.30). In Windows 2000: With LAN cable disconnected: ping design Response from 127.0.0.1: bytes=32 tieme<10ms TTL=128 With LAN cable connected: ping design Response from 192.168.0.30: bytes=32 tieme<10ms TTL=128 Having two Erlang nodes in the same machine the TCP socket connections are different: 1- if LAN cable disconnected the connection between nodes is established using 127.0.0.1:PORT 2- if LAN cable connected the connection between nodes is established using 192.168.0.30:PORT The problem is that in situation 2) and then if the LAN cable is disconnected the connections established with 192.168.0.30:PORT are lost. This can be also verified when "ping design" in W2000 command prompt. - Can I force Erlang to use 127.0.0.1 for local nodes connection instead of 192.168.0.30 ? - How can I solve this problem so not to lose local connections in any case? - Does the same behaviour happen in other OS? thanks in advance, Eduardo Figoli INSwitch Solutions ----- Original Message ----- From: Inswitch Solutions - Erlang Evaluation To: erlang-questions@REDACTED Sent: Thursday, September 30, 2004 10:46 AM Subject: Linking two Pids of nodes that are in the same machine - noconnection signal! The attached code links to pids of nodes that are in the same machine and I don't know why I receive a noconnection signal when the LAN cable is disconnected. This does no happen when running the code with the LAN cable disconnected and connecting/disconnecting it later. If someone wants to give a try, I send a code to test this situation and you should modify on node1.erl the blue text line below: {node2Pid, node2@REDACTED} ! {self()}, with the corresponding machine name where you will run it. On the same machine do the following: 1 - "erl -sname node2" 2 - "node2:start()." 2 - "erl -sname node1" 3 - "node1:start()." 4 - The pid is linked and a message is shown on node1. 5 - node2Pid shows a message every 1 sec while checking the queue message 6 - node1 process loops checking the queue message 7 - Disconnect LAN cable 8 - node2Pid receives a noconnection signal 9 - node1 process receives an {'EXIT',Pid,noconnection} - When linking Pids of different nodes that are in the same machine why do I receive a "noconnection" signal? - Having the LAN cable disconnected and doing steps 1..6 8..9, if I connect/disconnect the LAN cable the "noconnection" signal is never received (correct behaviour). - If in the source code I do not use "process_flag(trap_exit, true)," the processes terminate, why is this happenning as no kill signal is sent? thanks in advance, Eduardo Figoli INSwitch Solutions -------------- next part -------------- An HTML attachment was scrubbed... URL: From luke@REDACTED Mon Oct 4 17:01:32 2004 From: luke@REDACTED (Luke Gorrie) Date: 04 Oct 2004 17:01:32 +0200 Subject: Traversing a binary References: <20040921154626.GA23451@dc.fi.udc.es> <20040921164505.80205.qmail@web41904.mail.yahoo.com> <20040921171917.GA24469@dc.fi.udc.es> <41509479.3080107@bredband.net> Message-ID: Erik Stenman writes: > I'm no Tcp expert, but are you sure? > Is it not defined as the 16-bit 1's complement sum? > I.e. something like: > '+'(A,B) -> > S = A + B, > S band 16#ffff + (S bsr 16). > > One problem with your code is that it generates bignums > (heap-allocated large integers), > but if it is the 16-bit 1's complement sum, then you don't need large > integers. Maybe bignums could be some fun? In RFC 1071 ("Computing the internet checksum") they have this tip: (C) Parallel Summation On machines that have word-sizes that are multiples of 16 bits, it is possible to develop even more efficient implementations. Because addition is associative, we do not have to sum the integers in the order they appear in the message. Instead we can add them in "parallel" by exploiting the larger word size. To compute the checksum in parallel, simply do a 1's complement addition of the message using the native word size of the machine. For example, on a 32-bit machine we can add 4 bytes at a time: [A,B,C,D]+'... When the sum has been computed, we "fold" the long sum into 16 bits by adding the 16-bit segments. Each 16-bit addition may produce new end-around carries that must be added. Since the Erlang machine is arbitrary-precision one could load the whole packet into a bignum and call that the "machine word" checksum, then repeatedly "fold" it in half until it's down to 16 bits. At first glance it isn't obvious to me if that's a good idea, but the interesting thing is that it offloads the real work onto the runtime system (bignum arithmetic) which is already coded in C. I did a mock-up implementation that seems to compare well with the non-HIPE-compiled Erlang versions on some inputs. (The overall results seeming to vary quite a bit between inputs). I include it below as checksum_4 more because I think it's cute than that I think it's the right way. :-) -module(tc). -export([checksum_1/2,t/0,c/3,checksum_2/2,checksum_3/2,checksum_4/1]). -compile(inline). t() -> {ok,B} = file:read_file("tc.erl"), C = <>, D = <>, E = <>, %% checksum_4 crashes on this: %% F = <>, %% and performs better on this: %% F = D, F = E, io:format("N=~p~n", [size(F)]), garbage_collect(), io:format("M1: ~w~n",[timer:tc(tc,checksum_1,[F,0])]), garbage_collect(), io:format("M2: ~w~n",[timer:tc(tc,checksum_2,[F,0])]), garbage_collect(), io:format("M3: ~w~n",[timer:tc(tc,checksum_3,[F,0])]), garbage_collect(), io:format("M4: ~w~n",[timer:tc(tc,checksum_4,[F])]), garbage_collect(), io:format("M5: ~w~n",[timer:tc(tc,c,[0,F,0])]). checksum_1(<>, Csum) -> checksum_1(Remainder, Csum + Num); checksum_1(<>,CSum) -> checksum_1(<<>>,CSum+(Num bsl 8)); checksum_1(_, Csum) when Csum > 16#ffff -> checksum_1(<<>>,Csum band 16#ffff + (Csum bsr 16)); checksum_1(_,CSum) -> CSum. checksum_2(Bin = <>, Csum) when size(Bin)>=16 -> checksum_2(Rem, Csum+N1+N2+N3+N4+N5+N6+N7+N8); checksum_2(Bin,Csum) -> checksum_1(Bin,Csum). checksum_3(Bin = <>, Csum) when size(Bin)>=16 -> checksum_3(Rem, '+'(Csum,'+'(N1,'+'(N2,'+'(N3,'+'(N4,'+'(N5,'+'(N6,'+'(N7,N8))))))))); checksum_3(Bin,Csum) -> c(0,Bin,Csum). checksum_4(Bin0) -> %% Pad the binary to even size if needed. Bin = case size(Bin0) rem 2 of 0 -> Bin0; 1 -> <> end, Bits = size(Bin) * 8, %% C is the "machine word" (arbitrary precision) checksum <> = Bin, checksum_4(mul16(Bits, 16), C). checksum_4(16, C) -> C; checksum_4(B0, C0) when B0 > 16 -> B1 = B0 div 2, Mask = (1 bsl B1) -1, High = C0 bsr B1, Low = C0 band Mask, C1 = High + Low, checksum_4(B1, C1 band Mask + (C1 bsr B1)). %% Return the smallest multiple of 16 that is greater than N. %% (Where's the logarithm function?) mul16(N, Acc) when Acc > N -> Acc; mul16(N, Acc) -> mul16(N, Acc*16). c(N,Bin,Csum) -> case Bin of <<_:N/binary, Num:16/integer,_/binary>> -> c(N+2,Bin,'+'(Csum,Num)); <<_:N/binary, Num:8/integer>> -> '+'(Csum,Num bsl 8); _ -> Csum end. '+'(A,B) -> S = A + B, S band 16#ffff + (S bsr 16). From vlad_dumitrescu@REDACTED Mon Oct 4 22:56:54 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Mon, 4 Oct 2004 22:56:54 +0200 Subject: Traversing a binary References: <20040921154626.GA23451@dc.fi.udc.es> <20040921164505.80205.qmail@web41904.mail.yahoo.com> <20040921171917.GA24469@dc.fi.udc.es> <41509479.3080107@bredband.net> Message-ID: From: "Luke Gorrie" > %% checksum_4 crashes on this: > %% F = <>, Well, when the binary has more than 2^24 bits, then you can't build a bignum from it anymore. I guess the reason is that in <>, Bits can't be a bignum. Congratulations, you discovered a limitation of the system! :-D regards, Vlad From tony@REDACTED Mon Oct 4 23:17:38 2004 From: tony@REDACTED (Tony Rogvall) Date: Mon, 4 Oct 2004 23:17:38 +0200 Subject: Traversing a binary In-Reply-To: Message-ID: m?ndagen den 4 oktober 2004 kl 17.01 skrev Luke Gorrie: > > Maybe bignums could be some fun? > Yes! > In RFC 1071 ("Computing the internet checksum") they have this tip: > > (C) Parallel Summation > > On machines that have word-sizes that are multiples of 16 bits, > it is possible to develop even more efficient implementations. > Because addition is associative, we do not have to sum the > integers in the order they appear in the message. Instead we > can add them in "parallel" by exploiting the larger word size. > > To compute the checksum in parallel, simply do a 1's complement > addition of the message using the native word size of the > machine. For example, on a 32-bit machine we can add 4 bytes > at > a time: [A,B,C,D]+'... When the sum has been computed, we > "fold" > the long sum into 16 bits by adding the 16-bit segments. Each > 16-bit addition may produce new end-around carries that must be > added. > > Added my flavor together with some results ... First I did the "hardcoded" version cs_16/cs_32/cs_48/cs_64 then I added cs_n which takes n*16 bits at a time... The result shows that somewhere over 400 bits gives the good runtime, even better results with HIPE (but not presented here) results where produced with a 800MHz Celeron input size 3120151 this means that we can checksum about 14M/s testing a file (otp_src_R8B-1.tar.gz 10914087) takes 0.77 sec which approx verifies this, running cs_n(Bin, 62) (992 bits) Cool stuff, Luke :-) /Tony Hardcoded versions: 16_h: {865282,45447} 32_h: {492006,45447} 48_h: {570898,45447} 64_h: {470681,45447} General versions: 16_n: {1229178,45447} 32_n: {714159,45447} 48_n: {622312,45447} 64_n: {480053,45447} 80_n: {433242,45447} 96_n: {376938,45447} 112_n: {350193,45447} 128_n: {330382,45447} 144_n: {314732,45447} 160_n: {295219,45447} 176_n: {291303,45447} 192_n: {282718,45447} 208_n: {274458,45447} 224_n: {266926,45447} 240_n: {274168,45447} 256_n: {267168,45447} 272_n: {252319,45447} 288_n: {278400,45447} 304_n: {244431,45447} 320_n: {240133,45447} 336_n: {240713,45447} 352_n: {235871,45447} 368_n: {236378,45447} 384_n: {236018,45447} 400_n: {227867,45447} <- Here we start to see the good results 416_n: {227723,45447} 432_n: {228095,45447} 448_n: {226237,45447} 464_n: {221365,45447} 480_n: {217066,45447} 496_n: {240761,45447} 512_n: {237357,45447} 528_n: {244091,45447} 544_n: {235852,45447} 560_n: {239366,45447} 576_n: {234818,45447} 592_n: {244486,45447} 608_n: {238073,45447} 624_n: {265506,45447} 640_n: {227704,45447} 656_n: {228000,45447} 672_n: {225240,45447} 688_n: {237404,45447} 704_n: {226244,45447} 720_n: {228811,45447} 736_n: {227854,45447} 752_n: {240890,45447} 768_n: {240827,45447} 784_n: {221820,45447} 800_n: {222873,45447} 816_n: {218731,45447} 832_n: {219575,45447} 848_n: {216197,45447} 864_n: {214653,45447} 880_n: {220941,45447} 896_n: {217853,45447} 912_n: {218837,45447} 928_n: {220978,45447} 944_n: {217725,45447} 960_n: {217103,45447} 976_n: {248560,45447} 992_n: {215693,45447} <- BEST so far 1008_n: {234033,45447} <- Getting worse (need to run more loops to check) 1024_n: {232044,45447} %% %% Checksum code (as stolen and patched from luke) %% -module(csum). -compile(export_all). %% -compile(inline). t() -> {ok,B} = file:read_file("csum.erl"), C = <>, D = <>, E = <>, %% checksum_4 crashes on this: %% F = <>, %% and performs better on this: %% F = D, F = E, io:format("N=~p~n", [size(F)]), garbage_collect(), io:format("M1: ~w~n",[timer:tc(?MODULE,checksum_1,[F,0])]), garbage_collect(), io:format("M2: ~w~n",[timer:tc(?MODULE,checksum_2,[F,0])]), garbage_collect(), io:format("M3: ~w~n",[timer:tc(?MODULE,checksum_3,[F,0])]), garbage_collect(), io:format("M4: ~w~n",[timer:tc(?MODULE,checksum_4,[F])]), garbage_collect(), io:format("M5: ~w~n",[timer:tc(?MODULE,c,[0,F,0])]), garbage_collect(), io:format("16_h: ~w~n",[timer:tc(?MODULE,cs_16,[F])]), garbage_collect(), io:format("32_h: ~w~n",[timer:tc(?MODULE,cs_32,[F])]), garbage_collect(), io:format("48_h: ~w~n",[timer:tc(?MODULE,cs_48,[F])]), garbage_collect(), io:format("64_h: ~w~n",[timer:tc(?MODULE,cs_64,[F])]), %% t_loop(1, 64, F). t_loop(I, N, F) when I =< N -> garbage_collect(), io:format("~w_n: ~w~n",[I*16,timer:tc(?MODULE,cs_n,[F,I])]), t_loop(I+1,N, F); t_loop(_, _, _) -> ok. cs_16(Bin) -> cs_16(0, Bin, 0). cs_16(I, Bin, Csum) -> case Bin of <<_:I/binary, Num:16, _/binary>> -> cs_16(I+2, Bin, Csum+Num); <<_:I/binary, Num:8>> -> cs_fold(Csum+(Num bsl 8)); <<_:I/binary>> -> cs_fold(Csum) end. cs_32(Bin) -> cs_32(0, Bin, 0). cs_32(I, Bin, Csum) -> case Bin of <<_:I/binary, Num:32, _/binary>> -> cs_32(I+4, Bin, Csum+Num); <<_:I/binary, Num:24>> -> cs_fold(Csum+(Num bsl 8)); <<_:I/binary, Num:16>> -> cs_fold(Csum+(Num bsl 16)); <<_:I/binary, Num:8>> -> cs_fold(Csum+(Num bsl 24)); <<_:I/binary>> -> cs_fold(Csum) end. cs_48(Bin) -> cs_48(0, Bin, 0). cs_48(I, Bin, Csum) -> case Bin of <<_:I/binary, Num:48, _/binary>> -> cs_48(I+6, Bin, Csum+Num); <<_:I/binary, Num:40>> -> cs_fold(Csum+(Num bsl 8)); <<_:I/binary, Num:32>> -> cs_fold(Csum+(Num bsl 16)); <<_:I/binary, Num:24>> -> cs_fold(Csum+(Num bsl 24)); <<_:I/binary, Num:16>> -> cs_fold(Csum+(Num bsl 32)); <<_:I/binary, Num:8>> -> cs_fold(Csum+(Num bsl 40)); <<_:I/binary>> -> cs_fold(Csum) end. cs_64(Bin) -> cs_64(0, Bin, 0). cs_64(I, Bin, Csum) -> case Bin of <<_:I/binary, Num:64, _/binary>> -> cs_64(I+8, Bin, Csum+Num); <<_:I/binary, Num:56>> -> cs_fold(Csum+(Num bsl 8)); <<_:I/binary, Num:48>> -> cs_fold(Csum+(Num bsl 16)); <<_:I/binary, Num:40>> -> cs_fold(Csum+(Num bsl 24)); <<_:I/binary, Num:32>> -> cs_fold(Csum+(Num bsl 32)); <<_:I/binary, Num:24>> -> cs_fold(Csum+(Num bsl 40)); <<_:I/binary, Num:16>> -> cs_fold(Csum+(Num bsl 48)); <<_:I/binary, Num:8>> -> cs_fold(Csum+(Num bsl 56)); <<_:I/binary>> -> cs_fold(Csum) end. cs_128(Bin) -> cs_n(Bin, 8). cs_256(Bin) -> cs_n(Bin, 16). %% General loop cs_n(Bin, N) -> Bits = N*16, cs_n(0, 2*N, Bits, Bin, 0). cs_n(I, N, Bits, Bin, Csum) -> case Bin of <<_:I/binary, Num:Bits, _/binary>> -> cs_n(I+N,N,Bits,Bin,Csum+Num); <<_:I/binary, Rest/binary>> -> RestBits = size(Rest)*8, <> = Rest, cs_fold(Csum + (Num bsl (Bits-RestBits))) end. cs_fold(Csum) when Csum > 16#ffff -> cs_fold((Csum bsr 16) + (Csum band 16#ffff)); cs_fold(Csum) -> Csum. checksum_1(<>, Csum) -> checksum_1(Remainder, Csum + Num); checksum_1(<>,CSum) -> checksum_1(<<>>,CSum+(Num bsl 8)); checksum_1(_, Csum) when Csum > 16#ffff -> checksum_1(<<>>,Csum band 16#ffff + (Csum bsr 16)); checksum_1(_,CSum) -> CSum. checksum_2(Bin = <>, Csum) when size(Bin)>=16 -> checksum_2(Rem, Csum+N1+N2+N3+N4+N5+N6+N7+N8); checksum_2(Bin,Csum) -> checksum_1(Bin,Csum). checksum_3(Bin = <>, Csum) when size(Bin)>=16 -> checksum_3(Rem, '+'(Csum,'+'(N1,'+'(N2,'+'(N3,'+'(N4,'+'(N5,'+'(N6,'+'(N7,N8))))))))); checksum_3(Bin,Csum) -> c(0,Bin,Csum). checksum_4(Bin0) -> %% Pad the binary to even size if needed. Bin = case size(Bin0) rem 2 of 0 -> Bin0; 1 -> <> end, Bits = size(Bin) * 8, %% C is the "machine word" (arbitrary precision) checksum <> = Bin, checksum_4(mul16(Bits, 16), C). checksum_4(16, C) -> C; checksum_4(B0, C0) when B0 > 16 -> B1 = B0 div 2, Mask = (1 bsl B1) -1, High = C0 bsr B1, Low = C0 band Mask, C1 = High + Low, checksum_4(B1, C1 band Mask + (C1 bsr B1)). %% Return the smallest multiple of 16 that is greater than N. %% (Where's the logarithm function?) mul16(N, Acc) when Acc > N -> Acc; mul16(N, Acc) -> mul16(N, Acc*16). c(N,Bin,Csum) -> case Bin of <<_:N/binary, Num:16/integer,_/binary>> -> c(N+2,Bin,'+'(Csum,Num)); <<_:N/binary, Num:8/integer>> -> '+'(Csum,Num bsl 8); _ -> Csum end. '+'(A,B) -> S = A + B, S band 16#ffff + (S bsr 16). From kruegger@REDACTED Tue Oct 5 00:03:06 2004 From: kruegger@REDACTED (Stephen Han) Date: Mon, 4 Oct 2004 15:03:06 -0700 Subject: size of the bit stream? Message-ID: <86f1f53504100415034b432992@mail.gmail.com> Is threre any single function that returns the size of the bit stream in bytes? ex> f(<< 12, 13, 43, 25 , 24 >>) -> returns 5 regards, From carsten@REDACTED Tue Oct 5 01:07:50 2004 From: carsten@REDACTED (Carsten Schultz) Date: Tue, 5 Oct 2004 01:07:50 +0200 Subject: size of the bit stream? In-Reply-To: <86f1f53504100415034b432992@mail.gmail.com> References: <86f1f53504100415034b432992@mail.gmail.com> Message-ID: <20041004230749.GA9630@penne.localnet> Hi Stephen! On Mon, Oct 04, 2004 at 03:03:06PM -0700, Stephen Han wrote: > Is threre any single function that returns the size of the bit > stream in bytes? > > ex> > > f(<< 12, 13, 43, 25 , 24 >>) -> returns 5 If there was one, what would you call it? :-) Eshell V5.3 (abort with ^G) 1> size(<< 12, 13, 43, 25 , 24 >>). 5 Greetings, Carsten -- Carsten Schultz (2:38, 33:47), FB Mathematik, FU Berlin http://carsten.codimi.de/ PGP/GPG key on the pgp.net key servers, fingerprint on my home page. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From ok@REDACTED Tue Oct 5 02:18:57 2004 From: ok@REDACTED (Richard A. O'Keefe) Date: Tue, 5 Oct 2004 13:18:57 +1300 (NZDT) Subject: filename:dirname("."). Message-ID: <200410050018.i950IvUo259340@atlas.otago.ac.nz> "Ulf Wiger (AL/EAB)" wrote: >On my Solaris box, basename and dirname are synonymous. Per Hedeland replied: Surely not: with an example. They are not synonymous on my Solaris 2.9 box either. They don't even have the same number of arguments. The only variation I'm aware of between UNIX systems is whether the "suffix" argument basename(1) is a literal string or an expr(1)-style pattern (internationalised basic regular expression). From per.gustafsson@REDACTED Tue Oct 5 10:38:16 2004 From: per.gustafsson@REDACTED (Per Gustafsson) Date: Tue, 5 Oct 2004 10:38:16 +0200 (MEST) Subject: Traversing a binary In-Reply-To: References: Message-ID: I've tested the opposite of this, something that avoids bignums and folds the sum whenever it gets close to being a bignum. The program exists in four different versions, the diffrence between the programs are wheter or not they create subbinaries and wheter or not they take out the 16-bit integer in a little-endian way. I compare the results with a handcoded version of Tony's program using 992 as the parameter. When I compute the checksum of a binary of about 64k 3000 times on a 2.4 GHz pentium 4 I get the following results: No sub-binaries, little-endian: BEAM: 9.72 s HiPE: 0.98 s Sub-binaries, little-endian: BEAM: 9.46 s HiPE: 0.86 s No sub-binaries, big-endian: BEAM: 3.37 s HiPE: 1.25 s Sub-binaries, big-endian: BEAM: 4.51 s HiPE: 1.14 s Tony's Bignum version n=992: BEAM: 2.96 s HiPE: 3.72 s Obviously the little-endian version is only better on a little-endian machine, but it seems that the bignum approach is competitive as long as one does not native compile. The testruns are displayed below: 39> c(csum). {ok,csum} 40> hipe:c(csum). {ok,csum} 41> csum:test(). {66264,39354,39354,39354,39354,39354,970,870,1220,1130,3890} 42> c(csum). {ok,csum} 43> hipe:c(csum). {ok,csum} 44> csum:test(). {66048,17289,980,860,1250,1140,3720} 45> c(csum). {ok,csum} 46> csum:test(). {66048,17289,9720,9460,3370,4510,2960} 47> -------------- next part -------------- %%%------------------------------------------------------------------- %%% File : checksum.erl %%% Author : Javier Paris Fernandez %%% Description : Ip Protocol Checksum %%% %%% Created : 4 Aug 2004 by Javier Paris Fernandez %%%------------------------------------------------------------------- -module(csum). -export([test/0]). -define(INT16MAX, 65535). test() -> {ok,B} = file:read_file('csum.erl'), C = <>, Bin = <>, Size=size(Bin), garbage_collect(), statistics(runtime), V=loop1(Bin, 3000), {_,R1}=statistics(runtime), garbage_collect(), statistics(runtime), V=loop2(Bin, 3000), {_,R2}=statistics(runtime), garbage_collect(), statistics(runtime), V=loop3(Bin, 3000), {_,R3}=statistics(runtime), garbage_collect(), statistics(runtime), V=loop4(Bin, 3000), {_,R4}=statistics(runtime), garbage_collect(), statistics(runtime), V=loop5(Bin, 3000), {_,R5}=statistics(runtime), {Size,V,R1,R2,R3,R4, R5}. loop1(Inp, 1) -> checksum_1(0,Inp,0); loop1(Inp, N) -> checksum_1(0,Inp,0), loop1(Inp, N-1). loop2(Inp, 1) -> checksum_2(Inp,0); loop2(Inp, N) -> checksum_2(Inp,0), loop2(Inp, N-1). loop3(Inp, 1) -> checksum_3(0,Inp,0); loop3(Inp, N) -> checksum_3(0,Inp,0), loop3(Inp, N-1). loop4(Inp, 1) -> checksum_4(Inp,0); loop4(Inp, N) -> checksum_4(Inp,0), loop4(Inp, N-1). loop5(Inp, 1) -> checksum_5(Inp); loop5(Inp, N) -> checksum_5(Inp), loop5(Inp, N-1). %% uses little-endian byteordering and does not create sub-binaries checksum_1(N,Bin,Csum) when Csum > 16#6ffffff -> checksum_1(N, Bin, Csum band ?INT16MAX + (Csum bsr 16)); checksum_1(N,Bin,Csum) -> case Bin of <<_:N/binary, N1:16/integer-little,N2:16/integer-little,N3:16/integer-little, N4:16/integer-little,N5:16/integer-little,N6:16/integer-little, N7:16/integer-little,N8:16/integer-little,_/binary>> -> checksum_1(N+16,Bin,Csum+(N1+N2)+(N3+N4)+(N5+N6)+(N7+N8)); <<_:N/binary, N1:16/integer-little,_/binary>> -> checksum_1(N+2,Bin,Csum+N1); <<_:N/binary, Num:8/integer-little>> -> checksum_1(N+1,Bin,Csum+(Num bsl 8)); _ when Csum > ?INT16MAX -> Val = (Csum band ?INT16MAX + (Csum bsr 16)), checksum_1(N,Bin,Val); _ -> Val = (((Csum band 16#ff) bsl 8) bor ((Csum band 16#ff00) bsr 8)), (bnot Val) band ?INT16MAX end. %% uses little-endian byteordering and creates sub-binaries checksum_2(Bin,Csum) when Csum > 16#6ffffff -> checksum_2(Bin, Csum band ?INT16MAX + (Csum bsr 16)); checksum_2(<>, Csum) -> checksum_2(Rem, Csum+(N1+N2)+(N3+N4)+(N5+N6)+(N7+N8)+ (N9+N10)+(N11+N12)+(N13+N14)+(N15+N16) ); checksum_2(<>,Csum) -> checksum_2(Rem, Csum+N1); checksum_2(<>,Csum) -> checksum_2(<<>>,Csum+(N1 bsl 8)); checksum_2(<<>> = Bin,Csum) when Csum > ?INT16MAX -> NewCsum=Csum band ?INT16MAX + (Csum bsr 16), checksum_2(Bin,NewCsum); checksum_2(<<>>,Csum) -> Val=(((Csum band 16#ff) bsl 8) bor ((Csum band 16#ff00) bsr 8)), (bnot Val) band ?INT16MAX. %% uses big-endian byteordering and does not create sub-binaries checksum_3(N,Bin,Csum) when Csum > 16#6ffffff -> checksum_3(N, Bin, Csum band ?INT16MAX + (Csum bsr 16)); checksum_3(N,Bin,Csum) -> case Bin of <<_:N/binary, N1:16/integer,N2:16/integer,N3:16/integer, N4:16/integer,N5:16/integer,N6:16/integer, N7:16/integer,N8:16/integer,_/binary>> -> checksum_3(N+16,Bin,Csum+N1+N2+N3+N4+N5+N6+N7+N8); <<_:N/binary, N1:16/integer,_/binary>> -> checksum_3(N+2,Bin,Csum+N1); <<_:N/binary, Num:8/integer>> -> checksum_3(N+1,Bin,Csum+(Num bsl 8)); _ when Csum > ?INT16MAX -> Val = (Csum band ?INT16MAX + (Csum bsr 16)), checksum_3(N,Bin,Val); _ -> (bnot Csum) band ?INT16MAX end. %% uses big-endian byteordering and creates sub-binaries checksum_4(Bin,Csum) when Csum > 16#6ffffff -> checksum_4(Bin, Csum band 16#ffff + (Csum bsr 16)); checksum_4(<>, Csum) -> checksum_4(Rem, Csum+N1+N2+N3+N4+N5+N6+N7+N8); checksum_4(<>,Csum) -> checksum_4(Rem, Csum+N1); checksum_4(<>,Csum) -> checksum_4(<<>>,Csum+(N1 bsl 8)); checksum_4(<<>>,Csum) when Csum > ?INT16MAX -> Val=(Csum band ?INT16MAX) + (Csum bsr 16), checksum_4(<<>>,Val); checksum_4(<<>>,Csum) -> (bnot Csum) band ?INT16MAX. checksum_5(Inp) -> cs_992(0, Inp, 0). %% General loop cs_992(I, Bin, Csum) -> case Bin of <<_:I/binary, Num:992, _/binary>> -> cs_992(I+124, Bin,Csum+Num); <<_:I/binary, Rest/binary>> -> RestBits = size(Rest)*8, <> = Rest, cs_fold(Csum + (Num bsl (992-RestBits))) end. cs_fold(Csum) when Csum > ?INT16MAX -> cs_fold((Csum bsr 16) + (Csum band ?INT16MAX)); cs_fold(Csum) -> (bnot Csum) band ?INT16MAX. From per.gustafsson@REDACTED Tue Oct 5 10:56:06 2004 From: per.gustafsson@REDACTED (Per Gustafsson) Date: Tue, 5 Oct 2004 10:56:06 +0200 (MEST) Subject: Traversing a binary In-Reply-To: References: Message-ID: oops, the test is not really fair I realized that I had folded out the second version more than the other three so the results for Sub-binaries, little-endian, should be: BEAM: 10.9 s HiPE: 1.00 s On Tue, 5 Oct 2004, Per Gustafsson wrote: > I've tested the opposite of this, something that avoids bignums and folds > the sum whenever it gets close to being a bignum. > > > The program exists in four different versions, the diffrence between the > programs are wheter or not they create subbinaries and wheter or not they > take out the 16-bit integer in a little-endian way. > > I compare the results with a handcoded version of Tony's program using 992 > as the parameter. > > When I compute the checksum of a binary of about 64k 3000 times on a 2.4 > GHz pentium 4 I get the following results: > > No sub-binaries, little-endian: > BEAM: 9.72 s > HiPE: 0.98 s > > Sub-binaries, little-endian: > BEAM: 9.46 s > HiPE: 0.86 s > > No sub-binaries, big-endian: > BEAM: 3.37 s > HiPE: 1.25 s > > Sub-binaries, big-endian: > BEAM: 4.51 s > HiPE: 1.14 s > > Tony's Bignum version n=992: > BEAM: 2.96 s > HiPE: 3.72 s > > Obviously the little-endian version is only better on a little-endian > machine, but it seems that the bignum approach is competitive as long as > one does not native compile. > > > > The testruns are displayed below: > > 39> c(csum). > {ok,csum} > 40> hipe:c(csum). > {ok,csum} > 41> csum:test(). > {66264,39354,39354,39354,39354,39354,970,870,1220,1130,3890} > 42> c(csum). > {ok,csum} > 43> hipe:c(csum). > {ok,csum} > 44> csum:test(). > {66048,17289,980,860,1250,1140,3720} > 45> c(csum). > {ok,csum} > 46> csum:test(). > {66048,17289,9720,9460,3370,4510,2960} > 47> > > > > From samuel@REDACTED Tue Oct 5 12:59:31 2004 From: samuel@REDACTED (Samuel Rivas) Date: Tue, 5 Oct 2004 12:59:31 +0200 Subject: Is erlang-bugs alive? Message-ID: <20041005105931.GA27201@crusher.lfcia.pri> I've sent a (more-or-less) pman bug plus quick-solution patch to erlang-bugs, but I didn't get any feedback. I don't know if it wasn't interesting or it was the bugs list is being barely read. The bug makes pman hang when you try to trace the shell process, it could be a bit annoying for a beginner cause it's one of the topics of the "Getting Started with Erlang" document. If anyone is interested I can bounce my posting to the general list. Regards. -- Samuel From enano@REDACTED Tue Oct 5 13:59:08 2004 From: enano@REDACTED (Miguel Barreiro) Date: Tue, 5 Oct 2004 13:59:08 +0200 (CEST) Subject: auth documentation obsolete? Message-ID: The kernel reference manual documents the functions open/1, node_cookie/1 and node_cookie/2 that no longer exist in the source code. As far as I can tell from reading the sources, some versions ago you could have inbound and outbound cookies for other nodes, and that functionality is being removed; the missing functions seem related to this cleaning. Regards, Miguel From raimo@REDACTED Tue Oct 5 14:03:09 2004 From: raimo@REDACTED (Raimo Niskanen) Date: 05 Oct 2004 14:03:09 +0200 Subject: Is erlang-bugs alive? References: <20041005105931.GA27201@crusher.lfcia.pri> Message-ID: Yes, erlang-bugs is alive. I have seen your post there, but we are in the middle of a release right now and unfortunately did not have the time to look at your fix, expecially since you stated that it was a 'dirty' solution, so a correct solution would involve some investigation. Who's responsible for pman internally at us, has also recently been changed, so it kind of fell between. We will be looking at your patch for R10B-1 or later. samuel@REDACTED (Samuel Rivas) writes: > I've sent a (more-or-less) pman bug plus quick-solution patch to > erlang-bugs, but I didn't get any feedback. > > I don't know if it wasn't interesting or it was the bugs list is being > barely read. The bug makes pman hang when you try to trace the shell > process, it could be a bit annoying for a beginner cause it's one of > the topics of the "Getting Started with Erlang" document. > > If anyone is interested I can bounce my posting to the general list. > > Regards. > -- > Samuel -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From danie@REDACTED Tue Oct 5 15:40:32 2004 From: danie@REDACTED (Danie Schutte) Date: Tue, 05 Oct 2004 15:40:32 +0200 Subject: round / trunc Message-ID: <1096982842.6276.1.camel@blackbox.erlfinsys.net> Strange scenario: 2 and 3 are correct but 4 is obviously wrong - any ideas as to why the precision is so accurate? 2> round(list_to_float("9993.38")*100). 999338 3> trunc(list_to_float("9993.39")*100). 999339 4> trunc(list_to_float("9993.38")*100). 999337 From per.gustafsson@REDACTED Tue Oct 5 15:54:00 2004 From: per.gustafsson@REDACTED (Per Gustafsson) Date: Tue, 5 Oct 2004 15:54:00 +0200 (MEST) Subject: round / trunc In-Reply-To: <1096982842.6276.1.camel@blackbox.erlfinsys.net> References: <1096982842.6276.1.camel@blackbox.erlfinsys.net> Message-ID: It is floating point multiply so 4> is not particularily surprising since you get the following result when you multiply 9993.38 with 100 1> io:format("~.16f",[9993.38*100]). 999337.9999999998835850 Per On Tue, 5 Oct 2004, Danie Schutte wrote: > Strange scenario: > 2 and 3 are correct but 4 is obviously wrong - any ideas as to why the > precision is so accurate? > > 2> round(list_to_float("9993.38")*100). > 999338 > 3> trunc(list_to_float("9993.39")*100). > 999339 > 4> trunc(list_to_float("9993.38")*100). > 999337 > > > > > From tobbe@REDACTED Tue Oct 5 21:48:51 2004 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Tue, 05 Oct 2004 21:48:51 +0200 Subject: edoc bug ? Message-ID: <4162FAA3.7060609@nortelnetworks.com> Hi, I'm trying to test edoc, using the version in jungerl. However, I get a syntax error in a file that compiles fine with erlc. 5> edoc:file("/home/tobbe/junk/test.erl"). edoc: 27: syntax error before: '(' ** exited: error ** I attach the test case. Cheers, Tobbe -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: test.erl URL: From vances@REDACTED Tue Oct 5 22:01:52 2004 From: vances@REDACTED (Vance Shipley) Date: Tue, 5 Oct 2004 16:01:52 -0400 Subject: New APIs for new exception handling? Message-ID: <20041005200152.GB99299@frogman.motivity.ca> Having reviewed the paper on the new exception handling in R10 I am left wondering how things will change with it's availability. My application behaviour modules often have blocks of sequential initialization which will benefit from the whole try...of...catch ...after...end. So I can see that try will make it into new code right away and I can see it getting quite a bit of use. What I wonder about is how we'll deal with existing APIs which return tagged tuples like the start functions of gen_fsm, gen_server and supervisor and the gen_tcp and gen_udp modules. After a point it will seem somewhat awkward to be dealing with {ok,Value}/{error,Reason} tuples. It was never too clear to me which form was the one to use in my own APIs. I like the out of band exception handling so returning a raw value or exiting has been the rule of thumb however when working with OTP a tagged tuple is required for the return of init functions. This requirement would bleed into other functions as using them as the tail of the init function was natural. Will we see the introduction of a paralell choice to many of these functions which uses the pure out of band exception handling? -Vance From richardc@REDACTED Tue Oct 5 22:08:58 2004 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 05 Oct 2004 22:08:58 +0200 Subject: edoc bug ? In-Reply-To: <4162FAA3.7060609@nortelnetworks.com> References: <4162FAA3.7060609@nortelnetworks.com> Message-ID: <4162FF5A.4050603@csd.uu.se> Torbjorn Tornkvist wrote: > I'm trying to test edoc, using the version in jungerl. > > However, I get a syntax error in a file that compiles fine with erlc. > > 5> edoc:file("/home/tobbe/junk/test.erl"). > edoc: 27: syntax error before: '(' > ** exited: error ** It's not a bug, its the usual problem with funny uses of macros. Try passing the options [preprocess] or [preprocess,{includes,[...]}]. In any case, R10 will be out any moment now, with a much improved edoc included! /Richard > ------------------------------------------------------------------------ > > -module(test). > %%% ------------------------------------------------------------------ > %%% @doc > %%% > %%% Implementation of RPC/DCE stuff to be used over SMB. > %%% See also: "DCE 1.1: RPC", Spec.C706 from opengroup.org > %%% "DCE/RPC over SMB", ISBN-1-57870-150-3 > %%% > %%% @end > %%% ------------------------------------------------------------------ > -export([e_samr_connect2/3]). > > -define(BYTE, integer-unit:8). % Nice syntactic sugar... > > %%% > %%% --- Type declarations --- > %%% > %%% @type rpcResponse(). The #rpc_response{} record > %%% @type ctxHandle() = {ok, CtxHandle} | {error, returnCode} > %%% CtxHandle = binary() > %%% returnCode = integer(). > %%% > > > e_samr_connect2(B0, AccessMask, Pad) -> > < 0:Pad/?BYTE, > AccessMask:32/little>>. > > From mickael.remond@REDACTED Wed Oct 6 00:36:14 2004 From: mickael.remond@REDACTED (Mickael Remond) Date: Tue, 05 Oct 2004 22:36:14 +0000 Subject: J-EAI: An integration platform in Erlang Message-ID: <416321DE.3030306@erlang-fr.org> Hello, I just wanted to let you know that we did release the first J-EAI version (beta1). This is an integration platform based on Erlang and the XMPP protocol (The one used in Jabber and published today as an IETF standard). You can download it packaged and preconfigured on the Erlang REPOS CDROM (so that it can be easily tried): http://www.erlang-projects.org/Public/news/repos_1.0_beta6_j-e/view J-EAI preliminary documentation is included on the CDROM ISO. Have fun! -- Micka?l R?mond http://www.erlang-projects.org/ From vlad_dumitrescu@REDACTED Tue Oct 5 22:45:01 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Tue, 5 Oct 2004 22:45:01 +0200 Subject: Compiling drivers under Cygwin Message-ID: Hi, I remember someone mentioned thay could compile Windows dynamic drivers under Cygwin and it worked. I think it was Rudolph van Graan. If I try to do it (with the simple driver from the interoperability tutorial) erl just crashes with a stackdump. Could anyone point me in the right direction please? Should it work, or are only VC generated dlls supported? Thanks in advance, Vlad From ncharpentier@REDACTED Tue Oct 5 23:36:13 2004 From: ncharpentier@REDACTED (Nicolas Charpentier) Date: Tue, 05 Oct 2004 23:36:13 +0200 Subject: Compiling drivers under Cygwin In-Reply-To: References: Message-ID: <416313CD.6000308@free.fr> Vlad Dumitrescu wrote: > Hi, > > I remember someone mentioned thay could compile Windows dynamic drivers > under Cygwin and it worked. I think it was Rudolph van Graan. > > If I try to do it (with the simple driver from the interoperability > tutorial) erl just crashes with a stackdump. > > Could anyone point me in the right direction please? Should it work, or > are only VC generated dlls supported? > > Thanks in advance, > Vlad > > Hi, Vlad Dumitrescu wrote: > Could anyone point me in the right direction please? Should it work, or are only VC generated dlls supported? I succeed to compile a driver using gcc from Cygwin. To avoid the dependency with cygwin.dll, I compile with the option '-mno-cygwin' to use the mingw librairies. My compilation orders are 'g++ -c -mno-cygwin -fpic -shared -I$ERL_INCLUDE_CYGWIN_PATH' for all sources. 'g++ -mno-cygwin -fpic -shared -oXXX.dll all_dot_o -llibrary_to_drive' Hope that this could help you. Regards, Nicolas Charpentier From raimo@REDACTED Wed Oct 6 09:17:23 2004 From: raimo@REDACTED (Raimo Niskanen) Date: 06 Oct 2004 09:17:23 +0200 Subject: New APIs for new exception handling? References: <20041005200152.GB99299@frogman.motivity.ca> Message-ID: We will have to contemplate about that. Wrapper modules is a thought, or alternative functions in the modules with some short and informative prefix/suffix, which should be needed for naming wrapper modules as well. I think I like wrapper modules. E.g file_t:open/2. Or 'File':open/2, I hope anyone else has got a better ideas. Anyway, first we will have to wait and see if the demand surfaces for real and how strong it becomes. vances@REDACTED (Vance Shipley) writes: > Having reviewed the paper on the new exception handling in R10 > I am left wondering how things will change with it's availability. > > My application behaviour modules often have blocks of sequential > initialization which will benefit from the whole try...of...catch > ...after...end. So I can see that try will make it into new code > right away and I can see it getting quite a bit of use. > > What I wonder about is how we'll deal with existing APIs which > return tagged tuples like the start functions of gen_fsm, gen_server > and supervisor and the gen_tcp and gen_udp modules. After a point > it will seem somewhat awkward to be dealing with {ok,Value}/{error,Reason} > tuples. It was never too clear to me which form was the one to use in > my own APIs. I like the out of band exception handling so returning > a raw value or exiting has been the rule of thumb however when working > with OTP a tagged tuple is required for the return of init functions. > This requirement would bleed into other functions as using them as the > tail of the init function was natural. > > Will we see the introduction of a paralell choice to many of these > functions which uses the pure out of band exception handling? > > -Vance > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From bjorn@REDACTED Wed Oct 6 14:28:40 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 06 Oct 2004 14:28:40 +0200 Subject: Erlang/OTP R10B has been released Message-ID: Erlang/OTP R10B has been released as planned on October 6, 2004. You can download the full source distribution from http://www.erlang.org/download/otp_src_R10B-0.tar.gz Note: To unpack the TAR archive you need a GNU TAR compatible program. For instance, on MacOS X you need to use the 'gnutar' command; you can't use the 'tar' command or StuffIt to unpack the sources. For installation instructions please read the README that is part of the distribution or found here: http://www.erlang.org/download/otp_src_R10B-0.readme The Windows binary distribution can be downloaded from http://www.erlang.org/download/otp_win32_R10B-0.exe You can also download the complete HTML documentation or the Unix manual files: http://www.erlang.org/download/otp_doc_html_R10B-0.tar.gz http://www.erlang.org/download/otp_doc_man_R10B-0.tar.gz We also want to thank all that have sent us patches, suggestions and bug reports, The OTP Team -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From ulf.wiger@REDACTED Wed Oct 6 17:45:02 2004 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 6 Oct 2004 17:45:02 +0200 Subject: Erlang/OTP R10B has been released Message-ID: <37FB7AA6F5F9814FB634A7BF4C35A6F54028C8@ESEALNT442.al.sw.ericsson.se> Since I have a ring benchmark program tucked away, I decided to run it on OTP R10B. The first attempt was made on my PC running Windows 2000 Prof. Figures (in microseconds, using erl +P 1000000): Procs Spawn Send 10000 2 4,9999 20000 2,49995 4,99995 30000 2,66663 5,69997 40000 2,99998 5,24998 50000 2,99998 5,02 60000 3,16665 5,33332 70000 3,15713 4,99999 80000 3,38749 4,87499 90000 3,22221 5,0111 100000 3,20999 5,19999 110000 3,1909 4,82726 120000 3,24999 4,92499 130000 3,31538 9,3923 140000 3,57143 11,7357 150000 8,14666 11,28 160000 7,26249 11,075 170000 5,65882 11,9529 180000 5,89999 8,89999 190000 6,27368 15,3368 (The timings are (per spawn) and (per message) on average, based on the total time required to spawn the given number of processes, and sending a message around the ring once.) I quit the program at that point, and re-ran with different input parameters: Procs Spawn Send 100000 2,6 4,80999 200000 2,855 18,075 300000 73,64 169,143 At this point, the one-minute timer kicked in (for 400,000 processes.) I think this is related to memory, since afterwards, my PC behaved as if it were on drugs. After 10-15 minutes, I tired of it and rebooted. The PC is a 1.4 GHz laptop with 523 MB RAM. Conclusion so far: For any serious work, use a UNIX box. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Bjorn > Gustavsson > Sent: den 6 oktober 2004 14:29 > To: erlang-questions@REDACTED > Subject: Erlang/OTP R10B has been released > > > Erlang/OTP R10B has been released as planned on October 6, 2004. > > You can download the full source distribution from > > http://www.erlang.org/download/otp_src_R10B-0.tar.gz > > Note: To unpack the TAR archive you need a GNU TAR compatible > program. For instance, on MacOS X you need to use the > 'gnutar' command; > you can't use the 'tar' command or StuffIt to unpack the sources. > > For installation instructions please read the README that is part of > the distribution or found here: > > http://www.erlang.org/download/otp_src_R10B-0.readme > > The Windows binary distribution can be downloaded from > > http://www.erlang.org/download/otp_win32_R10B-0.exe > > You can also download the complete HTML documentation or > the Unix manual files: > > http://www.erlang.org/download/otp_doc_html_R10B-0.tar.gz > http://www.erlang.org/download/otp_doc_man_R10B-0.tar.gz > > We also want to thank all that have sent us patches, > suggestions and bug > reports, > > The OTP Team > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > From geoffw@REDACTED Wed Oct 6 20:00:50 2004 From: geoffw@REDACTED (Geoff White) Date: Wed, 06 Oct 2004 11:00:50 -0700 Subject: differences document Message-ID: <6.1.0.6.0.20041006105723.1364b700@mail.v-site.net> In the system_architecture_info.pdf document, it mentions that there is a document "Erlang extensions since 4.4". I haven't been able to locate this in the documentation directory. Can anybody tell me what it's real filename is? From lennart.ohman@REDACTED Wed Oct 6 20:17:00 2004 From: lennart.ohman@REDACTED (=?ISO-8859-1?Q?Lennart_=D6hman?=) Date: Wed, 06 Oct 2004 20:17:00 +0200 Subject: differences document In-Reply-To: <6.1.0.6.0.20041006105723.1364b700@mail.v-site.net> References: <6.1.0.6.0.20041006105723.1364b700@mail.v-site.net> Message-ID: <4164369C.8080802@st.se> Hi, the "extensions since 4.4" was something invented in the middle of the 90s very close to after the publishing of the Erlang book. Since it was not in the book it became called extensions, described in the document you have been looking for. Nowdays the extension functionality is worked into the Erlang Reference manual, and probably a few other places too where it makes sence. But if you are curious, take a look at some old documentation. Eg: http://www.erlang.se/doc/doc-5.1/doc/extensions/part_frame.html Best Regards, Lennart Geoff White wrote: > In the system_architecture_info.pdf document, it mentions that there is > a document "Erlang extensions since 4.4". I haven't been able to locate > this in the documentation directory. Can anybody tell me what it's real > filename is? > > -- ------------------------------------------------------------- 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 vlad_dumitrescu@REDACTED Wed Oct 6 20:50:48 2004 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 6 Oct 2004 20:50:48 +0200 Subject: Compiling drivers under Cygwin References: <416311D8.5080607@free.fr> Message-ID: ----- Original Message ----- From: "Nicolas Charpentier" > I succeed to compile a driver using gcc from Cygwin. To avoid the > dependency with cygwin.dll, I compile with the option '-mno-cygwin' to use > the mingw librairies. Thanks for the info, I had forgotten about that. > 'g++ -c -mno-cygwin -fpic -shared -I$ERL_INCLUDE_CYGWIN_PATH' for all > sources. > 'g++ -mno-cygwin -fpic -shared -oXXX.dll all_dot_o -llibrary_to_drive' I still had trouble getting it compiled from Eclipse (using CDT), until I noticed the answer was in front of my nose: the "-mno-cygwin" option must be used even for the linker... Thanks again! /Vlad From nick@REDACTED Thu Oct 7 09:33:56 2004 From: nick@REDACTED (Niclas Eklund) Date: Thu, 7 Oct 2004 09:33:56 +0200 (MEST) Subject: Erlang/OTP R10B has been released In-Reply-To: <37FB7AA6F5F9814FB634A7BF4C35A6F54028C8@ESEALNT442.al.sw.ericsson.se> Message-ID: Hello! New release, new features. The most interesting CORBA (Orber) features are changed footprints (light IFR, generated code and compile time reduced), security and even easier to use. (1) Simplified usage. The easiest way to describe this is a simple example: * Create an IDL file (see 6 OMG IDL to Erlang Mapping in Orber's User's Guide) module my { interface server { void echo(in string S); }; }; * Compile it and generate the call-back module. The latter is complete with mandatory and user defined functions, headers etc. shell> erlc +"{light_ifr,true}" my.idl shell> erlc +"{be, erl_template}" my.idl * Add the logic to the call-back module: echo(State, S) -> io:format("~s~n", [S]), %% Add this row {reply, ok, State}. * Compile the erl-files, start Orber and the server and invoke the echo operation: shell> erl -orber flags 128 erl> make:all(). erl> orber:jump_start(). erl> oe_my:oe_register(). erl> Obj = my_server:oe_create(). erl> my_server:echo(Obj, "CORBA is very easy to use!"). Done! It's possible to change the look and feel of the generated call-back module (erlc +"{flags,2}" my.idl). Compare this with the amount of work required to write your, for example, own gen_server-wrapper or defining the API in other, so called "human readable", languages compared with IDL. (2) Footprints. Use the IC compile option {light_ifr,true} and Orber's configuration parameter -orber flags 128 (see 5.2 Configuration in Orber's User's Guide) (3) Security (e.g. DOS attacks). Set the configuration parameters iiop_max_fragments, iiop_max_in_requests, iiop_max_in_connections and iiop_packet_size (see 5.2 Configuration in Orber's User's Guide). /Nick From bjorn@REDACTED Thu Oct 7 09:58:37 2004 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 07 Oct 2004 09:58:37 +0200 Subject: R10B release: Directory name in tar file Message-ID: The directory name in the source tar file unintentally contains the date when it was built: otp_src_R10B_2004-10-05 The contents are correct. The date indicates the final source code tar file was assembled in the evening of the Oct 5. (It was then built and tested on a number of platforms during the night.) /Bj?rn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From yerl@REDACTED Thu Oct 7 11:39:06 2004 From: yerl@REDACTED (yerl@REDACTED) Date: Thu, 7 Oct 2004 11:39:06 CEST Subject: R10B release Message-ID: Hi All! What's about activating the SAE support in R10B? Any simple method to do this? Regards, /yerl From ft@REDACTED Thu Oct 7 15:30:59 2004 From: ft@REDACTED (Fredrik Thulin) Date: Thu, 7 Oct 2004 15:30:59 +0200 Subject: PATCH: Typo bugs in inet_res.erl? Message-ID: <200410071530.59219@-foo> Hi Because of problems resolving IPv6 addresses using inet:getaddrs() in R10B-0 (I'll try to find the problem some more before asking the list for help on this issue) I started looking at the various inet files. I noticed three functions (gethostbyaddr/2, gethostbyname/3 and getbyname/3) in inet_res.erl which might be passing the wrong argument to inet:stop_timer/1. inet:stop_timer/1 calls erlang:cancel_timer() on whatever is given as it's argument, unless the argument is 'false'. The three functions listed above all pass the Timeout instead of the Timer variable to inet:stop_timer/1. Since inet:start_timer/1 does not handle Timeout = false, it seems to me as if this cannot be intentional but the fact that inet:stop_timer/1 actually handles input 'false' makes me a bit uncertain... /Fredrik -------------- next part -------------- A non-text attachment was scrubbed... Name: otp-R10B-0_typos-patch1 Type: text/x-diff Size: 1137 bytes Desc: not available URL: From olgeni@REDACTED Thu Oct 7 13:25:08 2004 From: olgeni@REDACTED (Jimmy Olgeni) Date: Thu, 7 Oct 2004 13:25:08 +0200 (CEST) Subject: R10B crypto fix In-Reply-To: References: Message-ID: <20041007132319.I11164@dev1.localdomain.net> Hi, Quick fix for the crypto application: INSTALL_PROGRAM may use the -s flag, which causes "strip" to be invoked on Makefile, which is bound to fail :) --- lib/crypto/c_src/Makefile.in.orig Thu Oct 7 12:11:06 2004 +++ lib/crypto/c_src/Makefile.in Thu Oct 7 12:11:07 2004 @@ -121,7 +121,7 @@ release_spec: opt $(INSTALL_DIR) $(RELSYSDIR)/priv/obj $(INSTALL_DIR) $(RELSYSDIR)/priv/lib - $(INSTALL_PROGRAM) $(DRV_MAKEFILE) $(RELSYSDIR)/priv/obj + $(INSTALL_DATA) $(DRV_MAKEFILE) $(RELSYSDIR)/priv/obj $(INSTALL_PROGRAM) $(OBJS) $(RELSYSDIR)/priv/obj $(INSTALL_PROGRAM) $(DYN_DRIVER) $(RELSYSDIR)/priv/lib -- jimmy From olgeni@REDACTED Thu Oct 7 16:44:25 2004 From: olgeni@REDACTED (Jimmy Olgeni) Date: Thu, 7 Oct 2004 16:44:25 +0200 (CEST) Subject: more on R10B: eva missing? Message-ID: <20041007163713.G69399@dev1.localdomain.net> Hi! I was building the package for R10B and noticed the following: * In lib/Makefile, the eva application is not listed and therefore it will not build. * Some manual pages are missing: man/man3/eva.3 man/man3/eva_log.3 man/man3/eva_log_snmp.3 man/man3/eva_server.3 man/man3/eva_snmp_adaptation.3 man/man3/eva_sup.3 man/man3/log.3 man/man3/log_server.3 man/man3/log_snmp.3 man/man3/log_snmpea.3 man/man3/snmp_error.3 man/man3/snmp_error_io.3 man/man3/snmp_error_report.3 man/man3/snmp_local_db.3 man/man3/snmp_mgr.3 man/man3/snmp_mpd.3 man/man3/snmp_supervisor.3 man/man6/eva.6 man/man6/inets.6 * erts/etc/unix/Install.src requires an "exit 0" on the last line, else "make install" may fail :-) -- jimmy From Waldemar.Rachwal@REDACTED Thu Oct 7 21:22:56 2004 From: Waldemar.Rachwal@REDACTED (Rachwal Waldemar-AWR001) Date: Thu, 7 Oct 2004 21:22:56 +0200 Subject: Updating nested records in a single-line expression? Message-ID: Hi! Accessing data from nested records is fairly clear. However, I experienced notational problems trying to update such records in a single line expression. Suppose we have a protocol where messages consist of elements which in turn are collections of fields being simple values or form further nested structures. When I modify any nested field I have to get a modified copy of the message, but how to get it in a single expression without additional variables? Is it doable? Or, maybe I have to deal with such messages in different way rather than model as records and then access/update these records directly? Thanks for any help, Waldemar. From Waldemar.Rachwal@REDACTED Fri Oct 8 09:51:28 2004 From: Waldemar.Rachwal@REDACTED (Rachwal Waldemar-AWR001) Date: Fri, 8 Oct 2004 09:51:28 +0200 Subject: Updating nested records in a single-line expression? Message-ID: I meant one-line reassign without any intermediate read. Slight modification of reassign statement of your example and it works fine as well. Ance again thanks for your help. Best regards, Waldemar. %%%%%%%%%%%%%%%%%%%% -module(recs). -record(arec,{a,b}). -record(brec,{c,d}). -export([test/0]). test() -> %%assignment statement Arec = #arec{a=hello,b=#brec{c=world,d=again}}, %%reassign Arec2 = Arec#arec{a="hello",b=(Arec#arec.b)#brec{c="world",d="again"}}, io:format("~p\n",[{Arec,Arec2}]). -----Original Message----- From: Peter Lund [mailto:Peter.Lund@REDACTED] Sent: Friday, October 08, 2004 8:54 AM To: Rachwal Waldemar-AWR001; erlang-questions@REDACTED Subject: SV: Updating nested records in a single-line expression? do you mean: -module(recs). -record(arec,{a,b}). -record(brec,{c,d}). -export([test/0]). %%and then... test() -> %%assignment statement Arec = #arec{a=hello,b=#brec{c=world,d=again}}, %% read #arec{a=A,b=Brec=#brec{c=C,d=D}} = Arec, %%reassign Arec2 = Arec#arec{a="hello",b=Brec#brec{c="world",d="again"}}, io:format("~p\n",[{Arec,Arec2}]). Tested and works! best regards, Peter Lund > -----Ursprungligt meddelande----- > Fr?n: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]F?r Rachwal Waldemar-AWR001 > Skickat: den 7 oktober 2004 21:23 > Till: erlang-questions@REDACTED > ?mne: Updating nested records in a single-line expression? > > > Hi! > > Accessing data from nested records is fairly clear. > However, I experienced notational problems trying to update such > records in a single line expression. > Suppose we have a protocol where messages consist of elements > which in turn > are collections of fields being simple values or form further nested > structures. > When I modify any nested field I have to get a modified copy > of the message, > but how to get it in a single expression without additional variables? > Is it doable? > Or, maybe I have to deal with such messages in different way > rather than > model as records and then access/update these records directly? > > Thanks for any help, > Waldemar. From ft@REDACTED Fri Oct 8 10:06:20 2004 From: ft@REDACTED (Fredrik Thulin) Date: Fri, 8 Oct 2004 10:06:20 +0200 Subject: Problem resolving IPv6 addresses in R10B-0 Message-ID: <200410081006.20930@-foo> Hi I realize that resolving IPv6 addresses is not yet documented and supported (?) but I want to do it anyways ;) With R9C-0 and R9C-2 this was easy : 1> inet:getaddrs("incomingproxy.devel.sip.su.se", inet6). {ok,[{8193,1712,5,2439,528,56575,65066,24970}]} 2> but with R10B-0 (on the same machine, Linux RH 7.3 based) I just get : 1> inet:getaddrs("incomingproxy.devel.sip.su.se", inet6). {error,nxdomain} 2> The same inet:getaddrs on R10B-0 on another machine (FreeBSD RELENG_4) works perfectly though, so it must have something to do with my build environment rather than R10B-0 itself. I recompiled both R9C-2 and R10B-0 on the same Linux-machine and with the same ./configure arguments (only --with-ssl=) yesterday to make sure that it wasn't something that had changed in the build environment since I compiled R9C-2, but still no go. ./configure says "checking for IP version 6 support... yes" (although IPv6 socket support of course has nothing to do with being able to do DNS AAAA querys). Can someone point me at where this 'nxdomain' might be generated so that I might be able to figure out why? When tcpdumping I don't see any DNS query at all so quad-A resolving must somehow get disabled when I compile R10B-0 on the Linux system. /Fredrik From erlang@REDACTED Fri Oct 8 10:19:52 2004 From: erlang@REDACTED (Peter L) Date: Fri, 8 Oct 2004 10:19:52 +0200 (CEST) Subject: Updating nested records in a single-line expression? Message-ID: <2164.82.182.146.59.1097223592.squirrel@www69.webcows.se> do you mean: -module(recs). -record(arec,{a,b}). -record(brec,{c,d}). -export([test/0]). %%and then... test() -> %%assignment statement Arec = #arec{a=hello,b=#brec{c=world,d=again}}, %% read #arec{a=A,b=Brec=#brec{c=C,d=D}} = Arec, %%reassign Arec2 = Arec#arec{a="hello",b=Brec#brec{c="world",d="again"}}, io:format("~p\n",[{Arec,Arec2}]). Tested and works! best regards, Peter Lund > -----Ursprungligt meddelande----- > Fr?n: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]F?r Rachwal Waldemar-AWR001 > Skickat: den 7 oktober 2004 21:23 > Till: erlang-questions@REDACTED > ?mne: Updating nested records in a single-line expression? > > > Hi! > > Accessing data from nested records is fairly clear. > However, I experienced notational problems trying to update > such records in > a single line expression. > Suppose we have a protocol where messages consist of elements > which in turn > are collections of fields being simple values or form further nested > structures. > When I modify any nested field I have to get a modified copy > of the message, > but how to get it in a single expression without additional variables? > Is it doable? > Or, maybe I have to deal with such messages in different way > rather than > model as records and then access/update these records directly? > > Thanks for any help, > Waldemar. From ft@REDACTED Fri Oct 8 10:39:15 2004 From: ft@REDACTED (Fredrik Thulin) Date: Fri, 8 Oct 2004 10:39:15 +0200 Subject: Update: Re: Problem resolving IPv6 addresses in R10B-0 In-Reply-To: <200410081006.20930@-foo> References: <200410081006.20930@-foo> Message-ID: <200410081039.15531@-foo> On Friday 08 October 2004 10.06, Fredrik Thulin wrote: > Hi > > I realize that resolving IPv6 addresses is not yet documented and > supported (?) but I want to do it anyways ;) > > With R9C-0 and R9C-2 this was easy : > > 1> inet:getaddrs("incomingproxy.devel.sip.su.se", inet6). > {ok,[{8193,1712,5,2439,528,56575,65066,24970}]} > 2> > > but with R10B-0 (on the same machine, Linux RH 7.3 based) I just get > : > > 1> inet:getaddrs("incomingproxy.devel.sip.su.se", inet6). > {error,nxdomain} > 2> Funny how you almost always figure something additional out right after you ask about something on a list ;) I found out that inet_res:gethostbyname("incomingproxy.devel.sip.su.se", inet6) actually worked on my Linux box with R10B-0, whilst inet:gethostbyname("incomingproxy.devel.sip.su.se", inet6) did not (returning {error,nxdomain}). The thing seems to be that inet_db:res_option(lookup) reurns differently. R9C-2 : 1> inet_db:res_option(lookup). [file,dns] 2> and R10B-0 : 1> inet_db:res_option(lookup). [native,file] 2> R10B-0 returns '[native,file]' on my FreeBSD box (see my previous mail) too, but surely because a difference in how FreeBSD 'native' resolves things it works there but not on Linux. Is it my Linux resolver library that needs fixing, or is it R10B-0? /Fredrik From Bruce@REDACTED Fri Oct 8 11:00:56 2004 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Fri, 08 Oct 2004 22:00:56 +1300 Subject: Erlang 10B on Gentoo: erl segfaults Message-ID: <41665748.8070400@Fitzsimons.org> Congrats to the OTP group for the 10B release, and many thanks to the maintainer of the Erlang gentoo ebuild. Its been updated for 10B. Hurrah. But...I'm having some issues with it, on a Duron 1300 board under '2.4.27-gentoo-r1' with gcc 3.3.4. erl segfaults when run from the command line. The backtrace looks like it was...quite deep on the stack. Unfortunantely erlexec is stripped, so I can't garner much more at the moment. Has anyone else seen this? /Bruce From knutbakke@REDACTED Fri Oct 8 16:45:48 2004 From: knutbakke@REDACTED (Knut Bakke) Date: Fri, 8 Oct 2004 07:45:48 -0700 (PDT) Subject: dynamic built fun and records Message-ID: <20041008144548.22863.qmail@web61002.mail.yahoo.com> Hi, I'm building funs runtime on R9B from pure text strings using the following approach: {ok,Tokens,Start}= erl_scan:string("fun()->testing, A=#rec{} end."), {ok,ExprList}=erl_parse:parse_exprs(Tokens), {value,Fun,_}=erl_eval:exprs(ExprList,[]}. Fun(). resuts in 'undef_record', If I remove the record the fun it works works. I'm making the fun in a module that knows about #rec. Any idea? knut Bakke. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From ulf.wiger@REDACTED Sun Oct 10 18:32:15 2004 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Sun, 10 Oct 2004 18:32:15 +0200 Subject: dynamic built fun and records In-Reply-To: <20041008144548.22863.qmail@web61002.mail.yahoo.com> References: <20041008144548.22863.qmail@web61002.mail.yahoo.com> Message-ID: I can see two options: - Use epp for pre-processing. This will be a bit more complex, but then you can pass record definitions as well. - The OTP R10 shell is supposed to understand records. Perhaps you could check the code and see if you can steal something? I haven't looked at it much, but it seems to involve some use of the undocumented module sys_pre_expand (in the compiler application.) /Uffe On Fri, 8 Oct 2004 07:45:48 -0700 (PDT), Knut Bakke wrote: > Hi, > I'm building funs runtime on R9B from pure text > strings using the following approach: > > {ok,Tokens,Start}= > erl_scan:string("fun()->testing, A=#rec{} end."), > {ok,ExprList}=erl_parse:parse_exprs(Tokens), > {value,Fun,_}=erl_eval:exprs(ExprList,[]}. > > Fun(). resuts in 'undef_record', If I remove the > record > the fun it works works. > > I'm making the fun in a module that knows about #rec. > > Any idea? > > knut Bakke. > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com -- Ulf Wiger From alexey@REDACTED Sun Oct 10 19:54:20 2004 From: alexey@REDACTED (Alexey Shchepin) Date: Sun, 10 Oct 2004 20:54:20 +0300 Subject: ejabberd 0.7.5 released Message-ID: <87hdp2pigj.fsf@alex.sevcom.net> Hi! I would like to announce the new stable release of ejabberd 0.7.5. Release highlights: * Support for STARTTLS with C2S connections * Support for authentification via external script * Added module which implement JUD and vCard services using LDAP * Improvements in web-based administration interface (user creation/removal, roster and offline queue management) * Support for announce/all and announce/motd * Support for logging of packets via external service (e.g. Bandersnatch) * Support for message expiration (JEP-0023) * Support for searching of prefix substring in JUD * Added limit of number of search result items in JUD * Support for HTTPS in web interface * Bugfix: HTTP Poll service correctly handles requests with unquoted "%" in HTTP body now * Bugfix: Fixed processing of negative priority * Bugfix: There was incorrect closing condition in outgoing S2S connection handling which result in useless unverifiable request * Bugfix: Destroying of persistent room now correctly removes it from persistent storage Upgrading from ejabberd-0.7: * Format of offline storage DB table was changed, and ejabberd-0.7.5 will convert it during startup. This can lead to slower first startup after upgrade (up to few minutes if you have hungreds of thousands offline messages in DB). * Processing of announce messages is in separate module now, so you need to add mod_announce to "modules" section in ejabberd.cfg: {mod_announce, [{access, announce}]}, * If you wish to use STARTTLS support and use built-in TLS driver to support old-style SSL client connection, you need to update configuration for ports 5222 and 5223 in "listen" section: {5222, ejabberd_c2s, [{access, c2s}, {shaper, c2s_shaper}, starttls, {certfile, "./ssl.pem"}]}, {5223, ejabberd_c2s, [{access, c2s}, tls, {certfile, "./ssl.pem"}]}, http://ejabberd.jabberstudio.org/ From raimo@REDACTED Mon Oct 11 08:44:26 2004 From: raimo@REDACTED (Raimo Niskanen) Date: 11 Oct 2004 08:44:26 +0200 Subject: Erlang 10B on Gentoo: erl segfaults References: <41665748.8070400@Fitzsimons.org> Message-ID: No, we have not heard of this before. But, the actual executable is called 'beam', not 'erlexec'. 'erlexec' is just a command line and environment variable mangler that exec's 'beam', which should not be stripped. Bruce@REDACTED (Bruce Fitzsimons) writes: > Congrats to the OTP group for the 10B release, and many thanks to the > maintainer of the Erlang gentoo ebuild. Its been updated for > 10B. Hurrah. > > But...I'm having some issues with it, on a Duron 1300 board under > '2.4.27-gentoo-r1' with gcc 3.3.4. > > erl segfaults when run from the command line. The backtrace looks like > it was...quite deep on the stack. Unfortunantely erlexec is stripped, > so I can't garner much more at the moment. > > Has anyone else seen this? > > /Bruce > > > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From micke@REDACTED Mon Oct 11 09:18:19 2004 From: micke@REDACTED (micke) Date: Mon, 11 Oct 2004 09:18:19 +0200 Subject: rpc:call on windows 2000 Message-ID: <416A6041@epostleser.online.no> I have a problem with getting two erl's talk on the same machine... In dos-window one I do: ---------------------------------------------- D:\Program Files\erl5.3.6.3\bin>erl -name pong (pong@REDACTED)6> [node()| nodes()]. ['pong@REDACTED','ping@REDACTED'] ============================================== In dos-window two I do: ---------------------------------------------- D:\Program Files\erl5.3.6.3\bin>erl -name ping (ping@REDACTED)21> rpc:call( 'ping@REDACTED', io, format, ['asdfasdasd']). asdfasdasdok (ping@REDACTED)22> rpc:call( 'pong@REDACTED', io, format, ['asdfasdasd']). asdfasdasdok QUESTION: The call goes back to the same window, any clues on what the problem is ? From Manfred.Widera@REDACTED Mon Oct 11 09:18:49 2004 From: Manfred.Widera@REDACTED (Manfred Widera) Date: Mon, 11 Oct 2004 09:18:49 +0200 Subject: Erlang 10B on Gentoo: erl segfaults In-Reply-To: <41665748.8070400@Fitzsimons.org> References: <41665748.8070400@Fitzsimons.org> Message-ID: <200410110918.49272.Manfred.Widera@Fernuni-Hagen.de> Bruce Fitzsimons wrote: > [...] > > But...I'm having some issues with it, on a Duron 1300 board under > '2.4.27-gentoo-r1' with gcc 3.3.4. > > erl segfaults when run from the command line. The backtrace looks like > it was...quite deep on the stack. Unfortunantely erlexec is stripped, > so I can't garner much more at the moment. > > Has anyone else seen this? I have not seen exactly your problem. However, I ran into several problems with both R9C and R9C-2 on a SuSE Linux machine (E.g. segfaults when starting the fprof profiler). I was able to solve the problem by using gcc 3.4.2 for a new installation of Erlang. Maybe this can also solve your problems. Manfred -- *********************************************************************** * Manfred Widera | * * Fachbereich Informatik | private: * * FernUniversit?t Hagen | Haldener Stra?e 193 * * D-58084 Hagen | D-58095 Hagen * * Germany | * * Phone (+49)2331/987-4295 | Phone: (+49)2331/51646 * * Fax: (+49)2331/987-4288 | * * E-Mail: Manfred.Widera@REDACTED | * *********************************************************************** From raimo@REDACTED Mon Oct 11 09:20:44 2004 From: raimo@REDACTED (Raimo Niskanen) Date: 11 Oct 2004 09:20:44 +0200 Subject: dynamic built fun and records References: <20041008144548.22863.qmail@web61002.mail.yahoo.com> Message-ID: Sorry, it is not possible. It is only the compiler that handles record definitions. The syntactical form of record definitions is, in fact, compiler directives. erl_eval cannot handle records and therefore says 'undef_record' for every record syntacs thingie that arrives to it. Records should have been converted to tuples, it thinks. Write to a file and compile, or use an expanded record from the module that knows about #rec and makes the fun. Oh, in R10B the shell can handle record definitions. It is brand new. But erl_eval can still not. knutbakke@REDACTED (Knut Bakke) writes: > Hi, > I'm building funs runtime on R9B from pure text > strings using the following approach: > > {ok,Tokens,Start}= > erl_scan:string("fun()->testing, A=#rec{} end."), > {ok,ExprList}=erl_parse:parse_exprs(Tokens), > {value,Fun,_}=erl_eval:exprs(ExprList,[]}. > > Fun(). resuts in 'undef_record', If I remove the > record > the fun it works works. > > I'm making the fun in a module that knows about #rec. > > Any idea? > > knut Bakke. > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From bengt.kleberg@REDACTED Mon Oct 11 09:26:20 2004 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Mon, 11 Oct 2004 09:26:20 +0200 Subject: rpc:call on windows 2000 In-Reply-To: <416A6041@epostleser.online.no> References: <416A6041@epostleser.online.no> Message-ID: <416A359C.305@ericsson.com> micke wrote: ...deleted > (ping@REDACTED)21> rpc:call( 'ping@REDACTED', io, > format, ['asdfasdasd']). > asdfasdasdok ...deleted > QUESTION: The call goes back to the same window, any clues on what the problem > is ? a feature of erlang stdio is that output goes to the process leaders io-device. your call to ''ping'' will execute there, but send its output to pong, since that is where you made the call. in most cases this is what you want. bengt From raimo@REDACTED Mon Oct 11 09:32:05 2004 From: raimo@REDACTED (Raimo Niskanen) Date: 11 Oct 2004 09:32:05 +0200 Subject: rpc:call on windows 2000 References: <416A6041@epostleser.online.no> Message-ID: Well, rpc:call/4 is so smart it sets the group leader of the call evaluating process to the same as the caller of rpc:call/4, so io:format calls and other calls writing to stdout will write on your console. Try erlang:display/1 instead. micke@REDACTED (micke) writes: > I have a problem with getting two erl's talk on the same machine... > > In dos-window one I do: > ---------------------------------------------- > D:\Program Files\erl5.3.6.3\bin>erl -name pong > > (pong@REDACTED)6> [node()| nodes()]. > > ['pong@REDACTED','ping@REDACTED'] > > > ============================================== > In dos-window two I do: > ---------------------------------------------- > D:\Program Files\erl5.3.6.3\bin>erl -name ping > > (ping@REDACTED)21> rpc:call( 'ping@REDACTED', io, > format, ['asdfasdasd']). > asdfasdasdok > > (ping@REDACTED)22> rpc:call( 'pong@REDACTED', io, > format, ['asdfasdasd']). > asdfasdasdok > > > QUESTION: The call goes back to the same window, any clues on what the problem > is ? > > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From Bruce@REDACTED Mon Oct 11 12:01:44 2004 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Mon, 11 Oct 2004 23:01:44 +1300 Subject: Erlang 10B on Gentoo: erl segfaults In-Reply-To: References: <41665748.8070400@Fitzsimons.org> Message-ID: <416A5A08.1080400@Fitzsimons.org> Thanks Raimo, For reference, R9C works fine. I've reverted to that under the same configuration. I'm building it again and I'll try and get beam running directly in order to see what happens and provide a decent backtrace. The default gentoo install strips beam.