From raimo@REDACTED Tue Nov 1 09:25:04 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 01 Nov 2005 09:25:04 +0100 Subject: Broken gen:call/3? References: , , <2F0F0ECD-3C52-4D94-9180-52C4BDAC5606@gmail.com> Message-ID: In the best of worlds you would be right, but since this strange behaviour has been tested and in production for many many years you just _might_ not be right. And a behaviour change would expose new bugs. Therefore we assume a behaviour change would make our major paying customers, which are in the maintenance phase of their products, avoid taking a new OTP release; forcing us to maintain one release more than necessary, stealing recources from new development... sean.hinde@REDACTED (Sean Hinde) writes: > Indeed ! > > I wonder how much code there is out there which is currently broken > because the author did not realise this happens vs code which would > be broken if it was changed. > > My guess, based on the assumption that people would expect to have to > handle 'EXIT' messages if they have chosen to link, is that this > behaviour hides many more latent bugs than would be introduced if it > were changed.. > > Sean > > On 31 Oct 2005, at 14:18, Raimo Niskanen wrote: > > > Aaah, well, yes.. This is an old flaw. > > > > Once upon a time there were only links to supervise other > > processes, so the only way to know if a server died during > > a library call e.g inside gen_server:call after sending > > the request while receiving the response, was that an > > 'EXIT' message was received instead; and then the library > > code for gen_server:call would have to trap exit messages > > and set a link to the server. > > > > But that can not be done by library code, since there can > > be only one link between any pair of processes. Possibly > > exit message trapping could be done, but there is a time > > window after receive before disabling exit message trapping > > that can not be controlled, so the library code can not > > be sure to not accidentally convert a link exit to an > > exit message. > > > > So, it was then designed so that _if_ the calling process > > had activated exit message trapping _and_ set a link to the > > server, then the gen_server:call could receive the 'EXIT' > > message and return an error code as a result of the server call. > > > > Later, when monitors was introduced we could not change > > the behaviour of gen_server:call to not consume 'EXIT' > > messages at all (which would be the right(TM) way, in > > the precence of monitors); the result would be passing > > undesired 'EXIT' messages onto old calling applications. > > > > So, there we are today. The calling process should check > > the result from gen_server:call plus receive 'EXIT' messages. > > Or set a monitor of its own. > > > > sean.hinde@REDACTED (Sean Hinde) writes: > > > > > >> Hi, > >> > >> This behaviour seems broken to me: > >> > >> 1. One process is linked to another (for supervision reasons), and a > >> gen_*:call/2 synchronous request is made from one to the other. > >> > >> 2. The called process crashes while handling the call. > >> > >> 3. gen:call consumes *both* it's own monitor 'DOWN' message *and* the > >> 'EXIT' message arising from the link > >> > >> Result: calling process doesn't get 'EXIT' message, and hence doesn't > >> know about the crash. It does not then function well as a > >> supervisor... > >> > >> Sean > >> > > > > -- > > > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > > > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From tim@REDACTED Tue Nov 1 12:38:07 2005 From: tim@REDACTED (Tim Bates) Date: Tue, 01 Nov 2005 22:08:07 +1030 Subject: Coping with records? Message-ID: <4367539F.9080805@bates.id.au> Hi folks, I'm getting into the nitty-gritty of my first largeish Erlang system, and I have a few questions about how to structure things going forward, particularly as my system expands to include multiple nodes and live code changes. Records seem fine for local or short-lived structures such as process state, but for potentially long-lived pieces of data in a long-running system that may see many code changes, they cause problems if you redefine them and then get an old one out of a database or somewhere else. Since Joe's "structs" idea seems to have died in 2003, what are people doing in their systems to address these problems? The only idea I have is to do all my operations on record-like data structures through a function call interface, and embed a version number in the record so that the functions know exactly which data structure they are using. This seems a bit unwieldy though. Any ideas? Thanks, Tim. -- Tim Bates tim@REDACTED From bengt.kleberg@REDACTED Tue Nov 1 13:08:19 2005 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 01 Nov 2005 13:08:19 +0100 Subject: Coping with records? In-Reply-To: <4367539F.9080805@bates.id.au> References: <4367539F.9080805@bates.id.au> Message-ID: <43675AB3.3000309@ericsson.com> On 2005-11-01 12:38, Tim Bates wrote: ...deleted > The only idea I have is to do all my operations on record-like data > structures through a function call interface, and embed a version number > in the record so that the functions know exactly which data structure > they are using. This seems a bit unwieldy though. Any ideas? i use the unwieldy system of a module with create functions and access functions. it knows about the record, the rest of the system has to call it. -module( kalle ). -export([a/1,b/1,create/2]). -record( kalle1, {a, b} ). a( #kalle1{a=A} ) -> A. b( #kalle1{b=B} ) -> B. create( A, B ) -> #kalle1{a=A, b=B}. From tobbe@REDACTED Tue Nov 1 13:27:16 2005 From: tobbe@REDACTED (tobbe) Date: Tue, 1 Nov 2005 13:27:16 +0100 Subject: Coping with records? References: Message-ID: <20051101122716.BCFAE59066@bang.trapexit.org> Hi, I played around with this problem some time ago and wrote the following code that takes care of when Mnesia table (-records) has changed. http://www.trapexit.org/download/db_upgrade.erl It is probably not the best way of doing it so it would be interesting to hear what solutions others have come up with. Cheers, Tobbe _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From biosap@REDACTED Tue Nov 1 09:01:52 2005 From: biosap@REDACTED (Micky Latowicki) Date: Tue, 1 Nov 2005 08:01:52 +0000 (UTC) Subject: Is concurrency hard? Message-ID: Hi all. I'd like to tap on your wisdom and experience regarding a general question. Is concurrency inherently hard? I've seen it stated elsewhere that writing concurrent software cannot be made easy. The author was writing in a context of a very different approach to concurrent programming than erlang's and I was curious if erlang developers feel the same way. If so, then what's hard about it when working with erlang? Thanks in advance for your input, Micky From joe.armstrong@REDACTED Tue Nov 1 16:36:45 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Tue, 1 Nov 2005 16:36:45 +0100 Subject: Is concurrency hard? Message-ID: Q: Is concurrency inherently hard? No - but writing concurrent programs in sequential programming languages is painfully difficult. I think the perception that "writing concurrent programs is difficult" comes from peoples experiences with writing concurrent programs in what are essentially sequential languages. Many languages provide threads - which are no more than a thinly disguised interface to the underlying operating system. Conventionally concurrent programming uses threads or processes and interprocess communication is achieved using shared memory protected by mutexes. Now this style of programming (mutexes, shared-memory, limited number of heavy-weight processes) is horribly difficult to program. If you lock a data structure, you have to ensure that it gets unlocked - this is difficult to guarantee in the presence of errors. If you share something you must return it later. If the number of process is limited you must take care not to have too many processes. If process creation is heavy, you'd better not create too many processes. Erlang does non of these things. Processes do not share resources (or if they do it's neatly hidden away so that the programmer can't see what's going on). Processes share nothing, and exchange data by pure message passing (pure means everything gets copied) << this is what you're supposed to think - under the covers things might get shared :->>. Of course, once the processes have received their data they can all run happily in parallel without bothering each other - so roll-on multi-processors - with no sharing and no locking we can really run things in parallel. This model is easy to grep. Why? - that's the way the world works. The world isn't sequential. We don't have shared memory. We communicate by message passing. When we talk we send sound messages to each other. We are used to handling data where everybody has their own private copy of a data structure. If I say "think of the number 2007" - then I send a sound message to my listeners - each one of them who hears the message forms their own private mental image of "2007" - there is no shared data structure. When we program real-world situations we just need to identify the concurrent processes involved, identify the message channels involved, and which message can flow on what channels and then model the entire thing as a set of Erlang processes - one process per concurrent activity. This seems to be much easier than OO design - If I look at the world I see no objects (in the sense of a set of decomposable objects with inheritance like structures) but I can identify the concurrency. I believe our perceptual systems have developed over millions of years to understand concurrent behaviours. I could not drive a car if my brain could not quickly track dozens or hundreds of simultaneous activities. A quick glance in the mirrors and I have seen and am tracking the nearest ten cars that might collide with me - understanding concurrent patterns is built into our spines. The world IS concurrent. Now programming real-world activities in sequential languages is perverse and extremely difficult. If we have a problem with natural concurrency then programming it in a concurrent language is far easier than in a sequential language. /Joe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Micky Latowicki > Sent: den 1 november 2005 09:02 > To: erlang-questions@REDACTED > Subject: Is concurrency hard? > > > Hi all. I'd like to tap on your wisdom and experience > regarding a general > question. > > Is concurrency inherently hard? > > I've seen it stated elsewhere that writing concurrent > software cannot be made > easy. The author was writing in a context of a very different > approach to > concurrent programming than erlang's and I was curious if > erlang developers feel > the same way. If so, then what's hard about it when working > with erlang? > > Thanks in advance for your input, > > Micky > From ulf@REDACTED Tue Nov 1 16:43:08 2005 From: ulf@REDACTED (Ulf Wiger) Date: Tue, 01 Nov 2005 16:43:08 +0100 Subject: Is concurrency hard? In-Reply-To: References: Message-ID: Den 2005-11-01 09:01:52 skrev Micky Latowicki : > Hi all. I'd like to tap on your wisdom and experience regarding a general > question. > > Is concurrency inherently hard? Well, yes and no. There are concurrency problems that are inherently hard -- sometimes even inherently unsolvable. OTOH, this is certainly true for most fields of programming. Most concurrency problems needen't be difficult, if approached the right way. Often, thinking about a real-world analogy (e.g. "how would the problem be solved using a group of people, snail mail and phone calls?") will get you quite far. Using this approach, you can take advantage of millennia of human experience. (: > I've seen it stated elsewhere that writing concurrent software > cannot be made easy. The author was writing in a context of a > very different approach to concurrent programming than erlang's > and I was curious if erlang developers feel the same way. If so, > then what's hard about it when working with erlang? Concurrency based on POSIX threads is ridiculously difficult. Concurrency in Java is difficult. In general, concurrency based on shared memory is asking for trouble. But this is what most people attempt to do. I think concurrency in Erlang is a natural and intuitive modelling technique, and part of the fun. I don't think of it as difficult in general, even though I recognize that some specific problems are. /Uffe -- Ulf Wiger From sean.hinde@REDACTED Tue Nov 1 18:31:53 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Tue, 1 Nov 2005 17:31:53 +0000 Subject: Broken gen:call/3? In-Reply-To: References: , , <2F0F0ECD-3C52-4D94-9180-52C4BDAC5606@gmail.com> Message-ID: Interesting. The nature of this bug is such that it will only be exposed in unusual error cases, particularly ones that are difficult to create during testing I am sure there are many "fully tested" systems which do not correctly account for this bug. There is not even a realistic way currently to examine the exit reason to determine if the process has crashed (vs the caller crashing). It would actually be very difficult to write code which correctly works around this bug while still relying on links. Perhaps the maintenance mode customers would be pleased if you made a change which correctly uncovered bugs in their systems? Sean On 1 Nov 2005, at 08:25, Raimo Niskanen wrote: > In the best of worlds you would be right, but since this strange > behaviour has been tested and in production for many many years > you just _might_ not be right. And a behaviour change would > expose new bugs. > > Therefore we assume a behaviour change would make our major > paying customers, which are in the maintenance phase of their > products, avoid taking a new OTP release; forcing us to maintain > one release more than necessary, stealing recources from > new development... > > sean.hinde@REDACTED (Sean Hinde) writes: > > >> Indeed ! >> >> I wonder how much code there is out there which is currently broken >> because the author did not realise this happens vs code which would >> be broken if it was changed. >> >> My guess, based on the assumption that people would expect to have to >> handle 'EXIT' messages if they have chosen to link, is that this >> behaviour hides many more latent bugs than would be introduced if it >> were changed.. >> >> Sean >> >> On 31 Oct 2005, at 14:18, Raimo Niskanen wrote: >> >> >>> Aaah, well, yes.. This is an old flaw. >>> >>> Once upon a time there were only links to supervise other >>> processes, so the only way to know if a server died during >>> a library call e.g inside gen_server:call after sending >>> the request while receiving the response, was that an >>> 'EXIT' message was received instead; and then the library >>> code for gen_server:call would have to trap exit messages >>> and set a link to the server. >>> >>> But that can not be done by library code, since there can >>> be only one link between any pair of processes. Possibly >>> exit message trapping could be done, but there is a time >>> window after receive before disabling exit message trapping >>> that can not be controlled, so the library code can not >>> be sure to not accidentally convert a link exit to an >>> exit message. >>> >>> So, it was then designed so that _if_ the calling process >>> had activated exit message trapping _and_ set a link to the >>> server, then the gen_server:call could receive the 'EXIT' >>> message and return an error code as a result of the server call. >>> >>> Later, when monitors was introduced we could not change >>> the behaviour of gen_server:call to not consume 'EXIT' >>> messages at all (which would be the right(TM) way, in >>> the precence of monitors); the result would be passing >>> undesired 'EXIT' messages onto old calling applications. >>> >>> So, there we are today. The calling process should check >>> the result from gen_server:call plus receive 'EXIT' messages. >>> Or set a monitor of its own. >>> >>> sean.hinde@REDACTED (Sean Hinde) writes: >>> >>> >>> >>>> Hi, >>>> >>>> This behaviour seems broken to me: >>>> >>>> 1. One process is linked to another (for supervision reasons), >>>> and a >>>> gen_*:call/2 synchronous request is made from one to the other. >>>> >>>> 2. The called process crashes while handling the call. >>>> >>>> 3. gen:call consumes *both* it's own monitor 'DOWN' message >>>> *and* the >>>> 'EXIT' message arising from the link >>>> >>>> Result: calling process doesn't get 'EXIT' message, and hence >>>> doesn't >>>> know about the crash. It does not then function well as a >>>> supervisor... >>>> >>>> Sean >>>> >>>> >>> >>> -- >>> >>> / Raimo Niskanen, Erlang/OTP, Ericsson AB >>> >>> >> >> > > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > From cyberlync@REDACTED Tue Nov 1 21:01:19 2005 From: cyberlync@REDACTED (Eric Merritt) Date: Tue, 1 Nov 2005 12:01:19 -0800 Subject: Fwd: Undocumented {packet,http} and gen_tcp:recv/3 timeout In-Reply-To: <87zmop4c3t.fsf@coco.kazmier.com> References: <87zmop4c3t.fsf@coco.kazmier.com> Message-ID: Just for future reference, Pete pointed out the race condition in iserve_socket:init. It's an easy fix and pretty noticeable once you think about it. ---------- Forwarded message ---------- From: Pete Kazmier Date: Oct 31, 2005 1:20 PM Subject: Re: Undocumented {packet,http} and gen_tcp:recv/3 timeout To: Eric Merritt Hi there, I recently went through that same tutorial and found the bug that the author hinted at in his recent post to the mailing list. In the event that you have not already found it, there is a race condition within iserve_socket:init in between the gen_tcp:accept and inet:setsockopts call. Its possible that part of the HTTP request arrives before the socket is placed it {packet, http} mode, and since the socket is in active mode, a message would be delivered to the current process which does nothing with it. In this case, inet:setsockopts needs to be called on the listening socket so the accepted socket will be in {packet, http} right from the start. As an erlang newbie, I still have not been able to get his example to run yet as I can't figure out appropriate directory layout for the application. If you have this working, would you mind sending me a tarball of the directory? It would be very helpful! Thanks, Pete From sean.hinde@REDACTED Tue Nov 1 21:59:53 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Tue, 1 Nov 2005 20:59:53 +0000 Subject: Undocumented {packet,http} and gen_tcp:recv/3 timeout In-Reply-To: References: <87zmop4c3t.fsf@coco.kazmier.com> Message-ID: <3EB338BF-629E-4D4B-AAA9-0256D562FC21@gmail.com> Hi! Yes, indeed. I will fix the tutorial. Sean On 1 Nov 2005, at 20:01, Eric Merritt wrote: > Just for future reference, Pete pointed out the race condition in > iserve_socket:init. It's an easy fix and pretty noticeable once you > think about it. > > ---------- Forwarded message ---------- > From: Pete Kazmier > Date: Oct 31, 2005 1:20 PM > Subject: Re: Undocumented {packet,http} and gen_tcp:recv/3 timeout > To: Eric Merritt > > > Hi there, > > I recently went through that same tutorial and found the bug that the > author hinted at in his recent post to the mailing list. In the event > that you have not already found it, there is a race condition within > iserve_socket:init in between the gen_tcp:accept and inet:setsockopts > call. Its possible that part of the HTTP request arrives before the > socket is placed it {packet, http} mode, and since the socket is in > active mode, a message would be delivered to the current process which > does nothing with it. In this case, inet:setsockopts needs to be > called on the listening socket so the accepted socket will be in > {packet, http} right from the start. > > As an erlang newbie, I still have not been able to get his example to > run yet as I can't figure out appropriate directory layout for the > application. If you have this working, would you mind sending me a > tarball of the directory? It would be very helpful! > > Thanks, > Pete > From robert.virding@REDACTED Wed Nov 2 00:36:17 2005 From: robert.virding@REDACTED (Robert Virding) Date: Wed, 02 Nov 2005 00:36:17 +0100 Subject: clusters In-Reply-To: References: Message-ID: <4367FBF1.6050006@telia.com> You will find that linear hashing was also used internally for ets tables. It is also used in the standard modules dict and sets. where it is implemented in Erlang. There is (was) also a reference to the the original paper I discovered which describes it. It is truly impressive being both dynamic as yu grow and shrink the table. Robert Hakan Mattsson wrote: >Take a look at the "linear hashing" algorithm and its >relative "linear hashing star". With linear hashing you >may add nodes smoothly without rebuilding the entire >database. > >We are using that for fragmented tables in Mnesia: > > http://erlang.se/doc/doc-5.4.8/lib/mnesia-4.2.2/doc/html/part_frame.html > >When you add a new fragment you only need to split one >of the old fragments, regardless of the total number of >existing fragments. > >If you plan to outgrow Mnesia, it might be a good idea >to customize the hash algorithm for fragmented tables >with one that fits your needs: > > http://erlang.se/doc/doc-5.4.8/lib/mnesia-4.2.2/doc/html/application_frame.html > >I don't know how the "chord" algorithm works, but if it >can handle addition of new nodes smoothly, it might be a >good candidate for your customized mnesia_frag_hash >implementation. > >/H?kan > >On Fri, 28 Oct 2005, Renyi Xiong wrote: > >RX> Date: Fri, 28 Oct 2005 15:37:53 -0700 >RX> From: Renyi Xiong >RX> To: erlang-questions@REDACTED >RX> Cc: joe.armstrong@REDACTED, bdoyle@REDACTED >RX> Subject: RE: clusters >RX> >RX> Hello Joe, >RX> >RX> If I understand correctly, we need to rebuild the whole mnesia >RX> database each time we add a new node pair. Cause the hash key >RX> is dependant on the number of nodes. Is that right? >RX> >RX> Renyi. >RX> >RX> >RX> > From: "Joe Armstrong (AL/EAB)" >RX> > To: "Renyi Xiong" >RX> > CC: >RX> > Subject: RE: clusters >RX> > Date: Mon, 24 Oct 2005 09:59:22 +0200 >RX> > >RX> > Hello Renyi, >RX> > >RX> > Interesting question - I'll give a short answer (actually why not post >RX> > this to the >RX> > Erlang list - (to join the list follow the instruction in >RX> > http://www.erlang.org/faq.html) >RX> > >RX> > I've no idea what the windows 2003 clusting service is :-) >RX> > >RX> > Firstly - let E = # exposed servers. I = # internal servers U = # users >RX> > >RX> > questions >RX> > >RX> > - is E + I large >RX> > - is U very large (ie outside the mnesia adress space?) >RX> > - how many U's/machine do you allocate >RX> > >RX> > IMHO you can get a long way with a pool of PC's - assume a transaction >RX> > takes >RX> > 50 ms. CPU - then you can do 1,7 M transactions/day. So if we have 1.7 M >RX> > users >RX> > doing one transaction/day then if each needs (say) 10KB data you'd need >RX> > 17G of data. >RX> > >RX> > ie a low-end PC (1 Gmemory, 2GHz processor, 80 G disk) could easly handle >RX> > (say) 1.5M users >RX> > >RX> > Now you need at least TWO PC's (fault-tolerence) >RX> > >RX> > So if you make them in pairs each pair can handle 1.5M users - use a >RX> > replictaed mnesia >RX> > disk/ram table. >RX> > >RX> > Now you want to scale up ... >RX> > >RX> > Easy. >RX> > >RX> > The unit of scaling is the pair I have just described. >RX> > >RX> > Call these pairs P1, P2, P3, ..... In each pair the machine with the >RX> > lowest IP is the >RX> > primary - the other is the take-over machine. >RX> > >RX> > Assume a user makes a HTTP request to the primary in ANY pair - all you >RX> > now need to >RX> > do is figure out which of the Pairs P1 .. Pn is "the correct machine" (ie >RX> > the one that stores their data) - then send them an HTTP re-direct to the >RX> > correct machine. >RX> > >RX> > If the address space is small you can just use a ram-replicated mnesia >RX> > table for the >RX> > redicrection table. >RX> > >RX> > If it is very large use consistent hashing. Call the IP address of the >RX> > primaries in >RX> > in the pairs Ip1, Ip2, ... Ipn. Assume the user Key is K. >RX> > >RX> > Compute hash values of Ip1, Ip2, ... K using some hash algorithm. Say >RX> > md5(X) mod 2^32 >RX> > >RX> > Call theses IpH1, IpH2, .... KH - now the data corresponding to key K is >RX> > found on the >RX> > machine with hash IpHk where k is the smallest value in IpHk such that >RX> > IpHk > KH >RX> > >RX> > (look up the "chord" algorithm for details) >RX> > >RX> > - here's what I'd do >RX> > >RX> > Phase A >RX> > - build a basic pair of processors (as I have described) >RX> > - deploy it (it will take some time to get millions of customers) >RX> > >RX> > Phase B >RX> > - when you get more customers build more pairs >RX> > - user mnesia and a ram replicated dispatch table >RX> > >RX> > Phase C >RX> > - when you get outside the addressing limits of mnesia (G users) >RX> > - make a layer with consistent hashing to replace the mnesia >RX> > replicated table >RX> > >RX> > I hope you make it to C >RX> > >RX> > /Joe >RX> > >RX> > >RX> > > -----Original Message----- >RX> > > From: Renyi Xiong [mailto:renyix1@REDACTED] >RX> > > Sent: den 22 oktober 2005 04:54 >RX> > > To: Joe Armstrong (AL/EAB) >RX> > > Cc: bdoyle@REDACTED >RX> > > Subject: >RX> > > >RX> > > >RX> > > Hello Joe, >RX> > > >RX> > > I'm a programmer working for Brian. I have a question for you >RX> > > in terms of >RX> > > concurrent programming. >RX> > > >RX> > > On client side, customers only see fixed number of servers >RX> > > based on IP >RX> > > addresses. My understanding is these exposed servers are >RX> > > listening for >RX> > > client requests, dispatching transactions to internal >RX> > > variable number of >RX> > > ERLANG servers, collecting replies and forwarding them to clients. >RX> > > >RX> > > So one of our jobs here is to write an ERLANG program to >RX> > > implement a kind of >RX> > > clustering service or ERLANG already has such kind of server >RX> > > included?(like >RX> > > WIndows 2003 clustering service?) >RX> > > >RX> > > Thanks, >RX> > > Renyi. > From laheadle@REDACTED Wed Nov 2 02:26:18 2005 From: laheadle@REDACTED (Lyn Headley) Date: Tue, 1 Nov 2005 17:26:18 -0800 (PST) Subject: Is concurrency hard? In-Reply-To: Message-ID: <20051102012618.87639.qmail@web34301.mail.mud.yahoo.com> > We are used to handling data where everybody has their own private > copy of a data structure. > If I say "think of the number 2007" - then I send a sound message > to my listeners - each one > of them who hears the message forms their own private mental image > of "2007" - there is no shared > data structure. > I'm not sure about this. In fact I think we are constantly working on both a sequential and concurrent level with both shared data structures and parallelism. Take an academic lecture. We are all in the same room and more importantly share the same atmosphere which transmits our messages. Only one of us can use this atmosphere at a time and we have to negotiate access to it by raising our hands and having a scheduled speaker. Furthermore there is a shared sense that what is going on is a lecture. coughs and throat clearing are defined as peripheral. But maybe that was actually your point. The only thing that is shared is the channel. I suppose that's not a data structure. But it's a resource. Is that right? Lyn Headley UCSD Communication and Science Studies __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From david.nospam.hopwood@REDACTED Wed Nov 2 03:51:31 2005 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Wed, 02 Nov 2005 02:51:31 +0000 Subject: clusters In-Reply-To: <4367FBF1.6050006@telia.com> References: <4367FBF1.6050006@telia.com> Message-ID: <436829B3.5000507@blueyonder.co.uk> Robert Virding wrote: > You will find that linear hashing was also used internally for ets > tables. It is also used in the standard modules dict and sets. where it > is implemented in Erlang. There is (was) also a reference to the > original paper I discovered which describes it. -- David Hopwood From bjarne@REDACTED Wed Nov 2 08:12:35 2005 From: bjarne@REDACTED (=?Windows-1252?Q?Bjarne_D=E4cker?=) Date: Wed, 2 Nov 2005 08:12:35 +0100 Subject: EUC registrations Message-ID: <005201c5df7c$cd67d540$180869d4@segeltorp> Dear all, We had some problems earlier with the mail address euc@REDACTED for the Erlang User Conference. If you intend to come to the EUC and may have sent a mail about it but do not find your name on the list below please send a mail directly to me. Best wishes Bjarne D?cker bjarne@REDACTED Ola Andersson Peter Andersson Gunilla Arendt Joe Armstrong Thomas Arts Simon Aurell G?bor B?tori Johan Bevemyr M. Harris Bhatti Martin Bj?rklund Johan Blom Hans Bolinder Pascal Brisset Mikael Bylund G?ran B?ge Martin Carlson Richard Carlsson Francesco Cesarini Mats Cronqvist Vlad Dumitrescu Bjarne D?cker Niclas Eklund Thomas Elsgaard Morgan Eriksson Eduardo Figoli Michael Fogeborg Magnus Fr?berg Francesca Gangemi Joakim Greben? Rickard Green Scott Green Dag Gruneau Dan Gudmundsson Victor M. Gulias Per Gustafsson Gordon Guthrie Niklas Hanberger Siri Hansen Dale Harvey Dragan Havelka Per Hedeland Pekka Hedqvist Sean Hinde Rikard Johansson Kannan Bertil Karlsson Mikael Karlsson Krishna Lukas Larsson Petter Larsson Tord Larsson Conrad Levitt Tobias Lindahl Thomas Lindgren Daniel Luna Kenneth Lundin Matthias L?ng Ann-Marie L?f Peter-Henry Mander Thomas Mattisson H?kan Mattsson H?kan Millroth Chandru Mullaparthi Vincenzo Nicosia Patrik Nilsson Raimo Niskanen Patrik Nyblom Jan Henry Nystr?m G?ran Oettinger Bernardo Paroli Mats-Ola Persson Lars Petterson-Fink Mikael Pettersson Laurent Picouleau Anders Ramsell Micka?l R?mond Tony Rogvall Kostis Sagonas Corrado Santoro Carlos E. Silva Staffan Skogvik Michal Slaski H?kan Stenholm Erik Stenman Sebastian Strollo Per Einar Str?mme Ulf Svarte Bagge Gunnar Sverredal Taavi Talvik Marcus Taylor Zoltan Theisz Lars Thors?n Fredrik Thulin Torbj?rn T?rnkvist Jane Walerud Gillan Ward Manfred Widera Esko Vierum?ki Ulf Wiger Claes Wikstr?m Chris Williams Mike Williams Wen Xu Erik ?ckander Lennart ?hman G?ran ?stlund -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe.armstrong@REDACTED Wed Nov 2 10:13:14 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Wed, 2 Nov 2005 10:13:14 +0100 Subject: Is concurrency hard? Message-ID: > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Lyn Headley > Sent: den 2 november 2005 02:26 > To: erlang-questions@REDACTED > Subject: RE: Is concurrency hard? > > > > > We are used to handling data where everybody has their own private > > copy of a data structure. > > If I say "think of the number 2007" - then I send a sound message > > to my listeners - each one > > of them who hears the message forms their own private mental image > > of "2007" - there is no shared > > data structure. > > > > I'm not sure about this. In fact I think we are constantly working > on both a sequential and concurrent level with both shared data > structures and parallelism. Take an academic lecture. We are all in > the same room and more importantly share the same atmosphere which > transmits our messages. Only one of us can use this atmosphere at a > time and we have to negotiate access to it by raising our hands and > having a scheduled speaker. Furthermore there is a shared sense that > what is going on is a lecture. coughs and throat clearing are > defined as peripheral. I don't think so - N people are receiving more or less the same sensory data. If you asked them afterwards what had happened (in detail) they would all disagree that's because they receive slightly different sensory inputs. Now you can do an experiment to test this. Arrange that two people at the left and right side of your lecture theatre suddenly explode and vanish in a puff of orange smoke with a very lound bang. Make sure that they have synchronised watches, and that they vanish at the "same" time (ie the accuracy of the watches was greater than the time taken for a ray of light to pass from one side of the lecture theatre to the other). Now ask the question: Who vanished first? Now the people on the left hand side of the theatre would say that the person at the left had side had vanished first - and the people on the right hand side would say that the person at the right had vanished first. On dear - who is right? - both - it is the question that is silly - you cannot ask questions about the simultaneity of event occurring at different places (basic physics). > > But maybe that was actually your point. The only thing that is > shared is the channel. I suppose that's not a data structure. But > it's a resource. Is that right? That's not how I'd put it. I'm a physicist (or at least I was - a long time ago) Now in physics there is no concept of sharing and no concept of simultaneity at a distance. We can only say that two things occur at the same time if they occur at the same place. In physics, light propagates through a media (called the ether) - but nobody knows what the ether is. In Newtonian and relativistic mechanics there is no sharing of the ether - everybody could use it at once. << In esoteric things like Brane universes and 4 + 22 dimensional universes there are some twisting parameters, so perhaps, photons might get a "time slice" move a bit and then get swapped out while the other universes and dimensions do their bit - who knows>> So to me channels don't really exists - there are just labels attached to messages. If we say "A talks to B" (in a room) then A doesn't *really* talk to B - there is no A to B channel. A talks - everybody in the room could potentially listen - but the message was intended for B. So we might call this a channel - just for convenience. In the real world (the physical world) there is no sharing, there are no channels, no locks no simultaneous things happening in different places (well there are but we can only indirectly infer this *after* the even) - all there are are messages containing information. Since this is the case in the real world then software that pretends that this is not the case is bound to run into problems. How can we ensure that two computers in different places have the same data? - we can't - this is the well known Byzantine Generals problem. We can only be reasonable sure - normally reasonable means "two phase commit" has succeeded - but we're really deluding ourselves. All we can say with certainty is "the last message I received from this machine had this content" At first it seems difficult to program things where each process has it's own view of the world and this view is only changed when the process receives a message - but after a while this becomes second nature. This is how we work - ie how we (people) interact - we receive messages through our senses - we send messages - that's it (Unless you want to introduce a deity) /Joe > > Lyn Headley > UCSD Communication and Science Studies > > > > > > __________________________________ > Yahoo! Mail - PC Magazine Editors' Choice 2005 > http://mail.yahoo.com > From mats.cronqvist@REDACTED Wed Nov 2 11:19:35 2005 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Wed, 02 Nov 2005 11:19:35 +0100 Subject: Is concurrency hard? In-Reply-To: References: Message-ID: <436892B7.1050101@ericsson.com> Joe Armstrong (AL/EAB) wrote: > I'm a physicist (or at least I was - a long time ago) > > Now in physics there is no concept of sharing and no concept of simultaneity at > a distance. We can only say that two things occur at the same time if they occur at the same place. > > In physics, light propagates through a media (called the ether) - but nobody > knows what the ether is. In Newtonian and relativistic mechanics there is no sharing of the > ether - everybody could use it at once. [...] joe must be older than he seems since the aether theory was discounted nearly 100 years ago... from wikipedia->Luminiferous_aether: In the late 19th century the luminiferous aether ("light-bearing aether"), or ether, was a substance postulated to be the medium for the propagation of light. Later theories, including Einstein's Theory of Relativity, suggested that an aether did not have to exist, and today the concept is considered "quaint". joe's point (that reality is to all intents and purposes concurrent) is of course perfectly true. i believe the only reason concurrency is percieved as hard is cultural; programmers are trained to think sequentially. this in turn is because C++ is glorified C, C is glorified assembly, and assembly is sequential because CPU's are. so no, concurrency isn't hard. what's hard is to unlearn the habit of turning everything into a sequential problem. mats From rrerlang@REDACTED Wed Nov 2 13:12:18 2005 From: rrerlang@REDACTED (Robert Raschke) Date: Wed, 2 Nov 2005 12:12:18 +0000 Subject: Is concurrency hard? In-Reply-To: <436892B7.1050101@ericsson.com> Message-ID: <89e0495afbdefbda9e1196eb934e57c7@tombob.com> Mats wrote: > i believe the only reason concurrency is percieved as hard is cultural; > programmers are trained to think sequentially. this in turn is because C++ is > glorified C, C is glorified assembly, and assembly is sequential because CPU's are. > so no, concurrency isn't hard. what's hard is to unlearn the habit of turning > everything into a sequential problem. Umm, try telling "CPU's are sequential" to the people who design and make them. I'm sure they'll disagree quite violently. In my experience, it's one of the big culture clashes, the people who deal with hardware (where things are more like Joe descibes) and the people who do software (who would just love to abstract everything into their sequential view of the world) have enormous difficulties talking to each other. I believe that concurrent programming is hard to most people, because of the poor abstractions used by most programmers, i.e., state, lots of it. Robby From joe.armstrong@REDACTED Wed Nov 2 13:10:09 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Wed, 2 Nov 2005 13:10:09 +0100 Subject: Is concurrency hard? Message-ID: > From: Mats Cronqvist [mailto:mats.cronqvist@REDACTED] > > Joe Armstrong (AL/EAB) wrote: > > I'm a physicist (or at least I was - a long time ago) > > > > ... > > joe must be older than he seems since the aether theory > was discounted nearly > 100 years ago... from wikipedia->Luminiferous_aether: > > In the late 19th century the luminiferous aether > ("light-bearing aether"), or > ether, was a substance > postulated to be the medium for the propagation of light. > Later theories, > including Einstein's > Theory of Relativity, suggested that an aether did not have > to exist, and today > the concept is considered "quaint". If Mats had read a little bit further under "Modern physics & the Aether" he would have found that aether theories still abound - ... - it's that warm green sticky stuff that glues everyuthing together /Joe From Marc.Vanwoerkom@REDACTED Wed Nov 2 13:11:49 2005 From: Marc.Vanwoerkom@REDACTED (Marc van Woerkom) Date: Wed, 02 Nov 2005 13:11:49 +0100 Subject: Is concurrency hard? In-Reply-To: Message-ID: >On dear - who is right? - both - it is the question that >is silly - you cannot ask questions about >the simultaneity of event occurring at different places >(basic physics). Each one has his own correct point of view about the events happening, and it is possible to find out what is going on in another observer's local coordinate frame (one knows the proper transformations). >Now in physics there is no concept of sharing and no >concept of simultaneity at >a distance. We can only say that two things occur at the >same time if they occur at the same place. The theory of relativity has abandoned absolute time, that is true. One the other hand we have that strange world of quantum mechanics. There you have the odd phenomenon of coupled states. E.g. certain radioactive isotopes have an event, where two photons are emitted in opposite directions. The polarisation of the photons is undetermined at first. But if you measure one photon, and thus force nature to make a choice, instantenously the other photon takes the opposite polarisation. The interesting bit is that people start to employ such odd quantum effects to create unique and potentially more powerful computing devices. The world is quantum, not classical, so let's use that! Read a text on quantumn computing to see what interesting combination of theoretical computer science and quantum physics has been developed so far. E.g. the above mentioned coupled photons are used to realize secure communication channels. >In physics, light propagates through a media (called the >ether) - but nobody >knows what the ether is. Since 100 years, the annus mirabilis of Albert Einstein, ether has been abandoned. Regards, Marc From ulf.wiger@REDACTED Wed Nov 2 13:24:24 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 2 Nov 2005 13:24:24 +0100 Subject: Is concurrency hard? Message-ID: > If Mats had read a little bit further > under "Modern physics & the Aether" he would have found that > aether theories still abound - ... - it's that warm green > sticky stuff that glues everyuthing together IANAPh, but the article "Endless, Boundless Universe" by (apparently very famous) Grote Reber at least made me think of aether -- not as a substance that facilitates the propagation of light, but rather as a substance that light can't avoid travelling through. (: /Uffe http://www.geocities.com/CapeCanaveral/9335/G_Reber.html "This background appears to be radiation from an electron gas pervading intergalactic space. At 144 metres wavelength the gas becomes opaque at about 330 megaparsecs. The gas has a density of about 0.01 electron per cubic centimetre. The electrons must have some energy input to replace the energy lost by radiation and maintain equilibrium. This puzzle seemed unexplainable until I had the happy thought that the energy going into these electrons might be energy lost by light photons during their travel through intergalactic space. Further consideration disclosed the most likely phenomenon as Compton transitions[20]. Calculation showed that the suggestion of Shelton[11] was tenable. Also, perhaps, here was the kind of thing Hubble might be looking for. The electrons in intergalactic space act as transducers of energy from light waves to hectometre waves. These are absorbed by ionized hydrogen gas clouds within the galaxies. The clouds are building blocks for making stars. Thus the light energy from old hot stars is recycled into unborn stars. " From mats.cronqvist@REDACTED Wed Nov 2 14:34:25 2005 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Wed, 02 Nov 2005 14:34:25 +0100 Subject: Is concurrency hard? In-Reply-To: References: Message-ID: <4368C061.2020605@ericsson.com> Joe Armstrong (AL/EAB) wrote: > If Mats had read a little bit further > under "Modern physics & the Aether" he would have found that > aether theories still abound - ... - it's that warm green > sticky stuff that glues everyuthing together the ability to ignore facts that disagrees with my preconcieved notions seems to be a requirement in my current line of work... otoh, Albert Einstein is probably more famous than e.g. Grote Reber for a reason. mats From Marc.Vanwoerkom@REDACTED Wed Nov 2 14:58:53 2005 From: Marc.Vanwoerkom@REDACTED (Marc van Woerkom) Date: Wed, 02 Nov 2005 14:58:53 +0100 Subject: Is concurrency hard? In-Reply-To: <4368C061.2020605@ericsson.com> Message-ID: >to be a requirement in my current line of work... > otoh, Albert Einstein is probably more famous than >e.g. Grote Reber for a reason. That old mechanical concept is dead. More interesting is the fact that the vacuum thanks to Heisenberg is not empty, for short times dt such a large energy fluctuation dE is possible that is enough to create particle antiparticle pairs. The world seems to be very strange at the bottom. Regards, Marc From ulf.wiger@REDACTED Wed Nov 2 15:09:21 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 2 Nov 2005 15:09:21 +0100 Subject: Is concurrency hard? Message-ID: Mats Cronqvist wrote: > otoh, Albert Einstein is probably more famous than e.g. > Grote Reber for a reason. Must have been the hairdo. /U From mats.cronqvist@REDACTED Wed Nov 2 14:49:54 2005 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Wed, 02 Nov 2005 14:49:54 +0100 Subject: Is concurrency hard? In-Reply-To: <89e0495afbdefbda9e1196eb934e57c7@tombob.com> References: <89e0495afbdefbda9e1196eb934e57c7@tombob.com> Message-ID: <4368C402.3060306@ericsson.com> Robert Raschke wrote: > Mats wrote: > >> i believe the only reason concurrency is percieved as hard is cultural; >>programmers are trained to think sequentially. this in turn is because C++ is >>glorified C, C is glorified assembly, and assembly is sequential because CPU's are. >> so no, concurrency isn't hard. what's hard is to unlearn the habit of turning >>everything into a sequential problem. > > > Umm, try telling "CPU's are sequential" to the people who design and > make them. I'm sure they'll disagree quite violently. maybe i should have said "CPU's were sequential" (at the time C/FORTAN was designed). at least i don't remember having to deal with concurrency when i programmed 6800's. otoh, i don't see how it matters what the CPU actually does as long as it seems sequential to the programmer. the arrival of multi-core CPU's will of course change all that. [...] > I believe that concurrent programming is hard to most people, because > of the poor abstractions used by most programmers, i.e., state, lots > of it. how's that? mats From david.nospam.hopwood@REDACTED Wed Nov 2 18:00:32 2005 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Wed, 02 Nov 2005 17:00:32 +0000 Subject: Is concurrency hard? In-Reply-To: <436892B7.1050101@ericsson.com> References: <436892B7.1050101@ericsson.com> Message-ID: <4368F0B0.6070605@blueyonder.co.uk> Mats Cronqvist wrote: > joe's point (that reality is to all intents and purposes concurrent) > is of course perfectly true. > i believe the only reason concurrency is percieved as hard is > cultural; programmers are trained to think sequentially. this in turn is > because C++ is glorified C, C is glorified assembly, and assembly is > sequential because CPU's are. The CPUs for which C was designed were sequential [*]. CPUs now are highly concurrent beasts, that use all kinds of complicated tricks to attempt to present a sequential fa?ade to most programs. > so no, concurrency isn't hard. what's hard is to unlearn the habit of > turning everything into a sequential problem. That's one issue. There is also "artificial" difficulty introduced by the programming model, beyond any inherent difficulty in the problem or in understanding the problem. To be slightly contrary given the previous answers, I think there is still significant artificial difficulty introduced by message passing concurrency models supported in current languages, including Erlang, although it's much less than for shared state models. [*] although the techniques of out-of-order and speculative execution go way back, at least to IBM's Stretch: -- David Hopwood From david.nospam.hopwood@REDACTED Wed Nov 2 18:20:29 2005 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Wed, 02 Nov 2005 17:20:29 +0000 Subject: Is concurrency hard? In-Reply-To: References: Message-ID: <4368F55D.5030300@blueyonder.co.uk> Marc van Woerkom wrote: >> On dear - who is right? - both - it is the question that is silly - >> you cannot ask questions about the simultaneity of event occurring at >> different places (basic physics). > > Each one has his own correct point of view about the events happening, > and it is possible to find out what is going on in another observer's > local coordinate frame (one knows the proper transformations). > >> Now in physics there is no concept of sharing and no concept of >> simultaneity at a distance. We can only say that two things occur at >> the same time if they occur at the same place. > > The theory of relativity has abandoned absolute time, that is true. > > One the other hand we have that strange world of quantum mechanics. > There you have the odd phenomenon of coupled states. > E.g. certain radioactive isotopes have an event, where two photons are > emitted in opposite directions. The polarisation of the photons is > undetermined at first. But if you measure one photon, and thus force > nature to make a choice, instantaneously the other photon takes the > opposite polarisation. More precisely, the two photons will not both be measured as having the same polarisation. It's an overspecification of what is observable (and itself a subtle example of sequential thinking) to describe this as though measuring one photon causes a change to the other. But enough of the armchair physics. I'm sure we're giving any real physicists in the audience fits. -- David Hopwood From ulf@REDACTED Wed Nov 2 18:57:21 2005 From: ulf@REDACTED (Ulf Wiger) Date: Wed, 02 Nov 2005 18:57:21 +0100 Subject: Is concurrency hard? In-Reply-To: <4368F55D.5030300@blueyonder.co.uk> References: <4368F55D.5030300@blueyonder.co.uk> Message-ID: Den 2005-11-02 18:20:29 skrev David Hopwood : > But enough of the armchair physics. I'm sure we're giving any real > physicists in the audience fits. I'm sure of it. (: Going back on topic, I spent some time following the attempts of companies like Encore and Expertelligence in the early 90's to deploy software on highly parallel architectures (in the case of Encore, Unix machines interconnected with very fast pipes, and in the case of Expertelligence, Lisp compiled down to transputer arrays.) Back in those days, it seemed too difficult to make the mental shift from sequential programming to multipro. Encore had to rewrite software quite extensively in order to port it to its architecture - AFAIR, they thought many of the rewrites could have been avoided if the original programmers had followed some common sense rules. But since deployment on distributed architectures wasn't really conceived by most at the time, this didn't happen. Most attempts to exploit concurrency in hardware seem to have been severely limited by what software designers were ready/willing to cope with. The current shift to multicore is driven by the apparent fact that we've exploited all other known alternative routes to high performance. Time then to force programmers to re-think. Luckily for Erlangers, the mental shift shouldn't be that traumatic. /Uffe -- Ulf Wiger From matthias@REDACTED Wed Nov 2 20:33:04 2005 From: matthias@REDACTED (Matthias Lang) Date: Wed, 2 Nov 2005 20:33:04 +0100 Subject: Is concurrency hard? In-Reply-To: References: <4368F55D.5030300@blueyonder.co.uk> Message-ID: <17257.5232.368092.187671@antilipe.corelatus.se> Ulf Wiger writes: > Most attempts to exploit concurrency in hardware seem to have been > severely limited by what software designers were ready/willing to > cope with. The current shift to multicore is driven by the apparent > fact that we've exploited all other known alternative routes to high > performance. Time then to force programmers to re-think. Luckily > for Erlangers, the mental shift shouldn't be that traumatic. I do not expect Erlang to far outshine other languages on multicore machines. Erlang hasn't made a splash in applications designed to run on multi-CPU machines and I see no huge difference* between multi-CPU and multi-core. The main benefit of using Erlang will continue to be that you get a significantly simpler program for some types of problem. Most of the time, the aspect of the problem which benefits the most from Erlang's concurrency will not be concurrency in the underlying hardware. Matthias * Ok, I'll try harder: multicore machines seem more likely to become widespread than multi-CPU machines. From neumann@REDACTED Wed Nov 2 21:23:54 2005 From: neumann@REDACTED (=?iso-8859-1?q?Fran=E7ois-Denis_Gonthier?=) Date: Wed, 2 Nov 2005 15:23:54 -0500 Subject: Attention Debian Users - Erlang 10.b.8 tests Message-ID: <200511021523.56515.neumann@lostwebsite.net> Hello all, I've been working on the new upstream release of the Debian Erlang packages. As per requests of some users in the past, the package has been split in 3. GS based applications are now in their own package called erlang-x11 and application that don't need GS in erlang-nox. Erlang-mode is now in it's own package too. Transition should be easy once the package are uploaded to the main Debian archive but I still need to check that with some experts. In the meantime, I need to check if it works for everybody. Debian users interested in the new version can get the .debs at: http://neutronic.mine.nu/unstable or through apt by adding: deb http://neutronic.mine.nu/ unstable/ deb-src http://neutronic.mine.nu/ unstable/ to /etc/apt/sources.list and do: apt-get install erlang=1:10.b.8-1 erlang-base=1:10.b.8-1 to upgrade their current packages. I know this last command line is awkward but I needed to explicitely specify the version of each packages to upgrade on my system. There may still be an error in the control files for the upgrade. That is what I need to check with an expert. I would also be grateful if someone not using an i386 could try to compile the package. I will take bug report directly or on the mailing list. Thank you for your attention. Fran?ois-Denis Gonthier -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From robert.virding@REDACTED Wed Nov 2 22:03:48 2005 From: robert.virding@REDACTED (Robert Virding) Date: Wed, 02 Nov 2005 22:03:48 +0100 Subject: clusters In-Reply-To: <436829B3.5000507@blueyonder.co.uk> References: <4367FBF1.6050006@telia.com> <436829B3.5000507@blueyonder.co.uk> Message-ID: <436929B4.2010408@telia.com> The reference I found was "The Design and Implementation of Dynamic Hashing for Sets and Tables in Icon" by Griswold and Townsend which was in an old Programming Practice and Experience. It was very readable. Robert David Hopwood wrote: >Robert Virding wrote: > > >>You will find that linear hashing was also used internally for ets >>tables. It is also used in the standard modules dict and sets. where it >>is implemented in Erlang. There is (was) also a reference to the >>original paper I discovered which describes it. >> >> > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomasl_erlang@REDACTED Wed Nov 2 23:48:01 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Wed, 2 Nov 2005 14:48:01 -0800 (PST) Subject: Is concurrency hard? In-Reply-To: Message-ID: <20051102224801.84714.qmail@web34410.mail.mud.yahoo.com> --- Ulf Wiger wrote: > The current shift to multicore is driven > by the apparent > fact that we've exploited all other known > alternative routes to high > performance. Time then to force programmers to > re-think. Luckily > for Erlangers, the mental shift shouldn't be that > traumatic. Getting higher capacity will probably be straightforward (as long as we have enough bandwidth to that multicore chip, etc). Just throw more requests at your system, as if it were a server farm. Getting lower latency will be trickier. You can't rely on clockspeeds to improve, obviously. Instead, you must turn a sequential computation into a parallel one. (Or construct a parallel one from the start.) There are two conflicting objectives: you must break down the work into independent portions that can be processed in parallel (and joined together efficiently). At the same time, you must keep the work items large enough that threading overheads don't swamp the system. A potentially delicate trade-off. A simple but illustrative example is speeding up the beam compiler on a multicore machine. A bit of parallelization is easy: each function can be compiled independently. (And even easier, multiple files can be compiled in parallel, "make -j".) But after that, we run into problems: 1. Per-function compilation is only part of the work. Parsing the source is essentially sequential (as far as I know), and emitting the object code may be too. Thus, speedup will be limited by Amdahl's law. If parsing the source and writing the object code uses 25% of the total time, we can get at most 4x speedup, and probably less. 2. Even getting to that point may be difficult. Big functions will take longer time to compile than small ones, and may then become a bottleneck even in the parallelized part of the compiler. We may then eventually have to parallelize the compiler algorithms as such. Last time I checked, the outlook for doing this was pessimistic. This is only half the problem, breaking the sequential work into parallel parts. The other problem is to throttle excess parallelism. The same reasoning goes for a number of other problems. In conclusion: for some of us, there are interesting challenges ahead. Best, Thomas __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs From neumann@REDACTED Thu Nov 3 00:18:32 2005 From: neumann@REDACTED (=?iso-8859-1?q?Fran=E7ois-Denis_Gonthier?=) Date: Wed, 2 Nov 2005 18:18:32 -0500 Subject: Attention Debian Users - Erlang 10.b.8 tests In-Reply-To: <200511021523.56515.neumann@lostwebsite.net> References: <200511021523.56515.neumann@lostwebsite.net> Message-ID: <200511021818.34755.neumann@lostwebsite.net> On 2 November 2005 15:23, you wrote: I need to add that those package where for Debian and should not be used on Ubuntu and other Debian derivatives. I will setup a Ubuntu chroot jail for testing in the near future. > Hello all, > > I've been working on the new upstream release of the Debian Erlang > packages. As per requests of some users in the past, the package has been > split in 3. GS based applications are now in their own package called > erlang-x11 and application that don't need GS in erlang-nox. Erlang-mode > is now in it's own package too. > > Transition should be easy once the package are uploaded to the main Debian > archive but I still need to check that with some experts. > > In the meantime, I need to check if it works for everybody. Debian users > interested in the new version can get the .debs at: > > http://neutronic.mine.nu/unstable > > or through apt by adding: > > deb http://neutronic.mine.nu/ unstable/ > deb-src http://neutronic.mine.nu/ unstable/ > > to /etc/apt/sources.list > > and do: > > apt-get install erlang=1:10.b.8-1 erlang-base=1:10.b.8-1 > > to upgrade their current packages. I know this last command line is > awkward but I needed to explicitely specify the version of each packages to > upgrade on my system. There may still be an error in the control files for > the upgrade. That is what I need to check with an expert. > > I would also be grateful if someone not using an i386 could try to compile > the package. > > I will take bug report directly or on the mailing list. > > Thank you for your attention. > > Fran?ois-Denis Gonthier -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From neumann@REDACTED Thu Nov 3 02:17:18 2005 From: neumann@REDACTED (=?iso-8859-1?q?Fran=E7ois-Denis_Gonthier?=) Date: Wed, 2 Nov 2005 20:17:18 -0500 Subject: Attention Debian Users - Erlang 10.b.8 tests In-Reply-To: <200511021523.56515.neumann@lostwebsite.net> References: <200511021523.56515.neumann@lostwebsite.net> Message-ID: <200511022017.20316.neumann@lostwebsite.net> On 2 November 2005 15:23, Fran?ois-Denis Gonthier wrote: I've uploaded some Ubuntu Breezy-friendly packages at: http://neutronic.mine.nu/ubuntu-breezy > Hello all, > > I've been working on the new upstream release of the Debian Erlang > packages. As per requests of some users in the past, the package has been > split in 3. GS based applications are now in their own package called > erlang-x11 and application that don't need GS in erlang-nox. Erlang-mode > is now in it's own package too. > > Transition should be easy once the package are uploaded to the main Debian > archive but I still need to check that with some experts. > > In the meantime, I need to check if it works for everybody. Debian users > interested in the new version can get the .debs at: > > http://neutronic.mine.nu/unstable > > or through apt by adding: > > deb http://neutronic.mine.nu/ unstable/ > deb-src http://neutronic.mine.nu/ unstable/ > > to /etc/apt/sources.list > > and do: > > apt-get install erlang=1:10.b.8-1 erlang-base=1:10.b.8-1 > > to upgrade their current packages. I know this last command line is > awkward but I needed to explicitely specify the version of each packages to > upgrade on my system. There may still be an error in the control files for > the upgrade. That is what I need to check with an expert. > > I would also be grateful if someone not using an i386 could try to compile > the package. > > I will take bug report directly or on the mailing list. > > Thank you for your attention. > > Fran?ois-Denis Gonthier -------------- 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 Thu Nov 3 03:02:42 2005 From: ok@REDACTED (Richard A. O'Keefe) Date: Thu, 3 Nov 2005 15:02:42 +1300 (NZDT) Subject: Is concurrency hard? Message-ID: <200511030202.jA322gNi028182@atlas.otago.ac.nz> Joe Armstrong (AL/EAB)" wrote: Now in physics there is no concept of sharing and no concept of simultaneity at a distance. We can only say that two things occur at the same time if they occur at the same place. Actually, in physics, there _is_ a notion of a 'timelike slice'. But it has long seemed to me that mutable variables are basically a device for providing instantaneous communication between remote parts of a program, so there has to be something wrong with them. The plain fact of the matter is that *programming* is hard. Some languages make some things harder to program than others. I remember reading a book about JSP years ago, which said that it was basically a way of letting you simulate a collection of millions of concurrent objects by inverting their code, and I wondered at the time "why not just use a programming language that lets you have millions of concurrent objects"? (The target language was in fact COBOL.) From bfulg@REDACTED Thu Nov 3 08:20:32 2005 From: bfulg@REDACTED (Brent Fulgham) Date: Wed, 2 Nov 2005 23:20:32 -0800 Subject: Attention Debian Users - Erlang 10.b.8 tests In-Reply-To: <200511021523.56515.neumann@lostwebsite.net> References: <200511021523.56515.neumann@lostwebsite.net> Message-ID: <90CEE3CD-8E64-485C-9004-7858203363E3@pacbell.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Nov 2, 2005, at 12:23 PM, Fran?ois-Denis Gonthier wrote: > I've been working on the new upstream release of the Debian Erlang > packages. > As per requests of some users in the past, the package has been > split in 3. > GS based applications are now in their own package called erlang- > x11 and > application that don't need GS in erlang-nox. Erlang-mode is now > in it's own > package too. Thanks for taking this over. One thing you should try to include is support for HIPE, which was turned off in the standard Debian build due to compiler issues on some platforms. Could you create an erlang- hipe, or just hipe package that would "provide" erlang as an alternative for performance-minded users? Thanks, - -Brent -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFDabpAzGDdrzfvUpURArQDAJ4i9ipHO8kBStqZ8nzNSLUla05R8gCfeer8 w5Vhx3RhpeyMS7cpT/CyoCQ= =D0uU -----END PGP SIGNATURE----- From kostis@REDACTED Thu Nov 3 09:09:35 2005 From: kostis@REDACTED (Kostis Sagonas) Date: Thu, 3 Nov 2005 09:09:35 +0100 (MET) Subject: Attention Debian Users - Erlang 10.b.8 tests In-Reply-To: Mail from 'Brent Fulgham ' dated: Wed, 2 Nov 2005 23:20:32 -0800 Message-ID: <200511030809.jA389ZB6004338@spikklubban.it.uu.se> Brent Fulgham wrote: > One thing you should try to include is support for HIPE, which was > turned off in the standard Debian build due to compiler issues on > some platforms. Could you create an erlang-hipe, or just hipe > package that would "provide" erlang as an alternative for > performance-minded users? We, the HiPE team, are very much willing to provide help to anybody who decides to do this. Porting HiPE to Debian should not be very difficult, but due to not having such a platform here, we cannot personally experiment with it. But we can either provide such help, or even do it from a distance if we get access to such a machine. Best, Kostis Sagonas (for the HiPE team) From jozsef.berces@REDACTED Thu Nov 3 09:16:45 2005 From: jozsef.berces@REDACTED (=?iso-8859-1?Q?J=F3zsef_B=E9rces_=28LA/ETH=29?=) Date: Thu, 3 Nov 2005 09:16:45 +0100 Subject: comet Message-ID: Hi, What happened to COMET? Is there anything replacing its functionality? Thanks in advance, Jozsef From jeinhorn@REDACTED Wed Nov 2 22:07:21 2005 From: jeinhorn@REDACTED (Jeff Einhorn) Date: Wed, 2 Nov 2005 15:07:21 -0600 Subject: ODBC port_program_executable_not_found Message-ID: <2B025C1778EB94418F186FB802D68EEF1B6B19@TRITON.pinnaclecredit.com> I followed the instructions for setting up ODBC mysql for erlang on trapexit (http://www.trapexit.org/docs/howto/odbc-howto.html ) and I ran into the following error? =ERROR REPORT==== 2-Nov-2005::14:55:02 === Error in process <0.40.0> with exit value: {{badmatch,{error,port_program_executable_not_found}},[{erl_eval,expr,3} ]} Any suggestions on where to start looking for the problem? I did verify that the odbc driver works with the odbctest program. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf@REDACTED Wed Nov 2 18:45:07 2005 From: ulf@REDACTED (Ulf Wiger) Date: Wed, 02 Nov 2005 18:45:07 +0100 Subject: Is concurrency hard? In-Reply-To: <4368C061.2020605@ericsson.com> References: <4368C061.2020605@ericsson.com> Message-ID: Den 2005-11-02 14:34:25 skrev Mats Cronqvist : > otoh, Albert Einstein is probably more famous than e.g. Grote Reber > for a reason. To clarify, Grote Reber was quite a pioneer (extremely off-topic, but a piece of fun history nonetheless): "Mr. Reber was the first person to build a radio telescope dedicated to astronomy, opening a window on the universe that eventually produced such landmark discoveries as quasars, pulsars and the remnant afterglow of the big bang" "'Radio astronomy has changed profoundly our understanding of the universe,' [Fred Lo] said in the statement. 'All radio astronomers who have followed him owe Grote Reber a deep debt for his pioneering work.' "Lo said that Mr. Reber 'was the first to systematically study the sky by observing something other than visible light. This gave astronomy a whole new view of the universe.'" (http://www.washingtonpost.com/ac2/wp-dyn?pagename=article&contentId=A38383-2002Dec25¬Found=true) "Though not a professional scientist, his research results were published in a number of prestigious technical journals, including Nature, the Astrophysical Journal, the Proceedings of the Institute of Radio Engineers and the Journal of Geophysical Research. "Reber also received a number of honors normally reserved for scientists professionally trained in astronomy, including the American Astronomical Society's Henry Norris Russell Lectureship and the Astronomical Society of the Pacific's Bruce Medal in 1962, the National Radio Astronomy Observatory's Jansky Lectureship in 1975, and the Royal Astronomical Society's Jackson-Gwilt Medal in 1983." (http://www.nrao.edu/pr/2002/reber/) I guess it's difficult to compare him with Einstein, but the man was certainly no slouch. (: /Uffe -- Ulf Wiger From tobbe@REDACTED Thu Nov 3 11:04:11 2005 From: tobbe@REDACTED (tobbe) Date: Thu, 3 Nov 2005 11:04:11 +0100 Subject: ODBC port_program_executable_not_found References: Message-ID: <20051103100411.5B26D59069@bang.trapexit.org> Perhaps, your Erlang ODBC driver wasn't built properly. Can you find the 'odbcserver' executable under the Erlang install directory ? For example: # ls /usr/local/lib/erlang/lib/odbc-2.0.4/priv/bin/ odbcserver Cheers, Tobbe _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From maruthavanan_s@REDACTED Thu Nov 3 12:07:01 2005 From: maruthavanan_s@REDACTED (maruthavanan s) Date: Thu, 03 Nov 2005 11:07:01 +0000 Subject: Messages missing Message-ID: An HTML attachment was scrubbed... URL: From chandrashekhar.mullaparthi@REDACTED Thu Nov 3 12:16:45 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Thu, 3 Nov 2005 11:16:45 +0000 Subject: ODBC port_program_executable_not_found In-Reply-To: <20051103100411.5B26D59069@bang.trapexit.org> References: <20051103100411.5B26D59069@bang.trapexit.org> Message-ID: Hi Tobbe, All your replies to the erlang mailing list appear to be "standalone" messages instead of being properly related to the message you were replying to. I dug around in the headers and it appeards that whatever mailer/poster you are using doesn't include the In-Reply-To header in the email. It does include a 'references' header but that doesn't seem to be related to anything in the original message. In a message which is properly threaded, there are these fields. References: In-Reply-To: Is this something you can fix or is it out of your hands? Maybe you can complain to SF?! cheers Chandru On 03/11/05, tobbe wrote: > > Perhaps, your Erlang ODBC driver wasn't built properly. > Can you find the 'odbcserver' executable under the > Erlang install directory ? For example: > > # ls /usr/local/lib/erlang/lib/odbc-2.0.4/priv/bin/ > odbcserver > > Cheers, Tobbe > _________________________________________________________ > Sent using Mail2Forum (http://m2f.sourceforge.net) > From bengt.kleberg@REDACTED Thu Nov 3 12:50:49 2005 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Thu, 03 Nov 2005 12:50:49 +0100 Subject: Messages missing In-Reply-To: References: Message-ID: <4369F999.9020808@ericsson.com> On 2005-11-03 12:07, maruthavanan s wrote: ...deleted > for e.g > > list_to_atom("Process"++integer_to_list(ProcessNo))!{MyMessage}, > > ProcessNo is always an integer and this process always exists, i don't > get any error reports, i have open pman process and had a look. it calls > the integer_to_list() fucntion and moves to the next step, but does not > send the message to the process, what could be wrong because this does > not happen everytime but it occurs rarely... 1 if you do this 100 times, how many failures do you get? 2 how do you notice that the message is not sent? bengt From tobbe@REDACTED Thu Nov 3 13:11:05 2005 From: tobbe@REDACTED (tobbe) Date: Thu, 3 Nov 2005 13:11:05 +0100 Subject: ODBC port_program_executable_not_found References: Message-ID: <20051103121105.D21BF5906B@bang.trapexit.org> I mostly do my posting from the trapexit-forum nowadays. So it is the m2f software that handles this, and I guess we are running a pretty old version of m2f (0.91). I can see (http://www.mail2forum.com/wiki/V1.2_Features) that the next major release of m2f will contain something that hopefully could solve the problem: "Now all mails generated by M2F are RFC-complaint, and thus can be threaded in capable mail clients" So I will try and upgrade to the latest version a.s.a.p. Cheers, Tobbe _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From ulf.wiger@REDACTED Thu Nov 3 13:20:59 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 3 Nov 2005 13:20:59 +0100 Subject: Messages missing Message-ID: Just a side note: On the most recent erlang versions (don't know when it was actually introduced), you should use: list_to_existing_atom("Process" ++ integer_to_list(ProcessNo)) ! {MyMessage}, as this would prevent you from accidentally starting to create atoms that couldn't possibly point to a registered process. /Uffe ________________________________ From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of maruthavanan s Sent: den 3 november 2005 12:07 To: erlang-questions@REDACTED Subject: Messages missing Hi, I am using erlang 5.4.3 in windows 2000, My program frames the the message that has to be sent, but it don't send the message to the process for e.g list_to_atom("Process"++integer_to_list(ProcessNo))!{MyMessage}, ProcessNo is always an integer and this process always exists, i don't get any error reports, i have open pman process and had a look. it calls the integer_to_list() fucntion and moves to the next step, but does not send the message to the process, what could be wrong because this does not happen everytime but it occurs rarely... Can any one help me in this regard? Thanks, Maruthavanan.S -------------- next part -------------- An HTML attachment was scrubbed... URL: From cyberdanx@REDACTED Thu Nov 3 15:53:02 2005 From: cyberdanx@REDACTED (Chris Campbell) Date: Thu, 3 Nov 2005 14:53:02 +0000 Subject: Attention Debian Users - Erlang 10.b.8 tests In-Reply-To: <200511022017.20316.neumann@lostwebsite.net> References: <200511021523.56515.neumann@lostwebsite.net> <200511022017.20316.neumann@lostwebsite.net> Message-ID: On 03/11/05, Fran?ois-Denis Gonthier wrote: > On 2 November 2005 15:23, Fran?ois-Denis Gonthier wrote: > > I've uploaded some Ubuntu Breezy-friendly packages at: > > http://neutronic.mine.nu/ubuntu-breezy Those packages installed fine. :) I will keep using them and report any problems. Regards, Chris From garry@REDACTED Thu Nov 3 16:45:38 2005 From: garry@REDACTED (Garry Hodgson) Date: Thu, 3 Nov 2005 10:45:38 -0500 (EST) Subject: Is concurrency hard? In-Reply-To: References: Message-ID: <2005110310421131032549@k2.sage.att.com> "Joe Armstrong (AL/EAB)" wrote: > If Mats had read a little bit further > under "Modern physics & the Aether" he would have found that > aether theories still abound - ... - it's that warm green > sticky stuff that glues everyuthing together i thought that was duct tape? oh, wait...that's grey. ---- Garry Hodgson, Technical Consultant, AT&T Labs Your love, your anger, your kindness, your hate. All of it creates the future for you and your children. What kind of future are you creating today? From erlang@REDACTED Thu Nov 3 17:36:32 2005 From: erlang@REDACTED (Michael McDaniel) Date: Thu, 3 Nov 2005 08:36:32 -0800 Subject: ODBC port_program_executable_not_found In-Reply-To: <2B025C1778EB94418F186FB802D68EEF1B6B19@TRITON.pinnaclecredit.com> References: <2B025C1778EB94418F186FB802D68EEF1B6B19@TRITON.pinnaclecredit.com> Message-ID: <20051103163631.GH15817@delora.autosys.us> On Wed, Nov 02, 2005 at 03:07:21PM -0600, Jeff Einhorn wrote: > I followed the instructions for setting up ODBC mysql for erlang on trapexit > (http://www.trapexit.org/docs/howto/odbc-howto.html ) and I ran into the > following error? > > =ERROR REPORT==== 2-Nov-2005::14:55:02 === > > Error in process <0.40.0> with exit value: {{badmatch, > {error,port_program_executable_not_found}},[{erl_eval,expr,3}]} > > Any suggestions on where to start looking for the problem? I did verify that > the odbc driver works with the odbctest program. > > Thanks, > > Jeff ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Later releases of Erlang (e.g. R10B-8) should "just work" and not need changes to the make or config files. Presumably you received no errors in building erlang such as *** odbc application not built ***. I think the "port_program_exectutable" should be located at priv/bin/odbcserver under the erlang/lib/odbc-2.x directory (though I am not certain that is the program referenced by this error message). Anyway... If no errors about odbc during build, then for troubleshooting the immediate problem I suggest using strace thusly ... $ strace erl > foo.log 2>&1 application:start(odbc). q(). $ echo " now look at foo.log to investigate odbc problem" now look at foo.log to investigate odbc problem $ For my R10B-8 install, it looks into /usr/local/lib/erlang/lib/odbc-2.0.4/ Directory structure of this directory (and ebin and priv/bin) looks like $ $ ls -las /usr/local/lib/erlang/lib/odbc-2.0.4/ total 36 4 drwxrwxr-x 8 421 staff 4096 2005-10-25 02:19 . 4 drwxrwxr-x 46 421 staff 4096 2005-10-25 02:37 .. 4 drwxr-xr-x 2 root root 4096 2005-10-26 13:34 c_src 4 drwxrwxr-x 3 421 staff 4096 2005-10-25 02:19 doc 4 drwxr-xr-x 2 root root 4096 2005-10-26 13:34 ebin 4 drwxr-xr-x 2 root root 4096 2005-10-26 13:34 include 4 -rw-r--r-- 1 421 staff 111 2005-10-25 02:19 info 4 drwxr-xr-x 4 root root 4096 2005-10-26 13:34 priv 4 drwxr-xr-x 2 root root 4096 2005-10-26 13:34 src $ $ ls -las /usr/local/lib/erlang/lib/odbc-2.0.4/ebin total 52 4 drwxr-xr-x 2 root root 4096 2005-10-26 13:34 . 4 drwxrwxr-x 8 421 staff 4096 2005-10-25 02:19 .. 4 -rw-r--r-- 1 root root 271 2005-10-26 13:34 odbc.app 4 -rw-r--r-- 1 root root 1188 2005-10-26 13:34 odbc_app.beam 4 -rw-r--r-- 1 root root 17 2005-10-26 13:34 odbc.appup 28 -rw-r--r-- 1 root root 26348 2005-10-26 13:34 odbc.beam 4 -rw-r--r-- 1 root root 1460 2005-10-26 13:34 odbc_sup.beam $ $ ls -las /usr/local/lib/erlang/lib/odbc-2.0.4/priv/bin total 124 4 drwxr-xr-x 2 root root 4096 2005-10-26 13:34 . 4 drwxr-xr-x 4 root root 4096 2005-10-26 13:34 .. 116 -rwxr-xr-x 1 root root 114494 2005-10-26 13:34 odbcserver Also, I put the following two lines in my application to guarantee my environment variables os:putenv("ODBCINI", "/etc/unixODBC/odbc.ini") , os:putenv("ODBCSYSINI", "/etc/unixODBC/odbcinst.ini") , Hope the above helps, please let us know what you find and your platform and version numbers. ~Michael From neumann@REDACTED Thu Nov 3 18:45:40 2005 From: neumann@REDACTED (=?iso-8859-1?q?Fran=E7ois-Denis_Gonthier?=) Date: Thu, 3 Nov 2005 12:45:40 -0500 Subject: Attention Debian Users - Erlang 10.b.8 tests In-Reply-To: <90CEE3CD-8E64-485C-9004-7858203363E3@pacbell.net> References: <200511021523.56515.neumann@lostwebsite.net> <90CEE3CD-8E64-485C-9004-7858203363E3@pacbell.net> Message-ID: <200511031245.42908.neumann@lostwebsite.net> On 3 November 2005 02:20, Brent Fulgham wrote: > On Nov 2, 2005, at 12:23 PM, Fran?ois-Denis Gonthier wrote: > > I've been working on the new upstream release of the Debian Erlang > > packages. > > As per requests of some users in the past, the package has been > > split in 3. > > GS based applications are now in their own package called erlang- > > x11 and > > application that don't need GS in erlang-nox. Erlang-mode is now > > in it's own > > package too. > > Thanks for taking this over. One thing you should try to include is > support for HIPE, which was turned off in the standard Debian build > due to compiler issues on some platforms. Could you create an erlang- > hipe, or just hipe package that would "provide" erlang as an > alternative for performance-minded users? Well you are right! All that time I thought HiPE was only disabled on x86_64-linux, it is only ENABLED for that platform. This is a great idea and It is certainly possible. 10.b.8 won't get through my door without that feature. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From erlang@REDACTED Thu Nov 3 18:51:28 2005 From: erlang@REDACTED (Michael McDaniel) Date: Thu, 3 Nov 2005 09:51:28 -0800 Subject: ODBC port_program_executable_not_found In-Reply-To: <20051103163631.GH15817@delora.autosys.us> References: <2B025C1778EB94418F186FB802D68EEF1B6B19@TRITON.pinnaclecredit.com> <20051103163631.GH15817@delora.autosys.us> Message-ID: <20051103175128.GK15817@delora.autosys.us> On Thu, Nov 03, 2005 at 08:36:32AM -0800, Michael McDaniel wrote: > On Wed, Nov 02, 2005 at 03:07:21PM -0600, Jeff Einhorn wrote: > > I followed the instructions for setting up ODBC mysql for erlang on trapexit > > (http://www.trapexit.org/docs/howto/odbc-howto.html ) and I ran into the > > following error? > > > > =ERROR REPORT==== 2-Nov-2005::14:55:02 === > > > > Error in process <0.40.0> with exit value: {{badmatch, > > {error,port_program_executable_not_found}},[{erl_eval,expr,3}]} > > > > Any suggestions on where to start looking for the problem? I did verify that > > the odbc driver works with the odbctest program. > > > > Thanks, > > > > Jeff > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Later releases of Erlang (e.g. R10B-8) should "just work" and > not need changes to the make or config files. > > Presumably you received no errors in building erlang such as > *** odbc application not built ***. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Apology for any confustion, if you're using the R10B-4 you will receive odbc : No odbc library found and the howto describes how to get it working anyway. As previously mentioned, the later R10B releases do not have this problem. ~Michael > > > I think the "port_program_exectutable" should be located at > priv/bin/odbcserver under the erlang/lib/odbc-2.x directory > (though I am not certain that is the program referenced by > this error message). Anyway... > > > > If no errors about odbc during build, then for troubleshooting > the immediate problem I suggest using strace thusly ... > > $ strace erl > foo.log 2>&1 > application:start(odbc). > q(). > $ echo " now look at foo.log to investigate odbc problem" > now look at foo.log to investigate odbc problem > $ > > For my R10B-8 install, it looks into > /usr/local/lib/erlang/lib/odbc-2.0.4/ > > Directory structure of this directory (and ebin and priv/bin) > looks like > $ > $ ls -las /usr/local/lib/erlang/lib/odbc-2.0.4/ > total 36 > 4 drwxrwxr-x 8 421 staff 4096 2005-10-25 02:19 . > 4 drwxrwxr-x 46 421 staff 4096 2005-10-25 02:37 .. > 4 drwxr-xr-x 2 root root 4096 2005-10-26 13:34 c_src > 4 drwxrwxr-x 3 421 staff 4096 2005-10-25 02:19 doc > 4 drwxr-xr-x 2 root root 4096 2005-10-26 13:34 ebin > 4 drwxr-xr-x 2 root root 4096 2005-10-26 13:34 include > 4 -rw-r--r-- 1 421 staff 111 2005-10-25 02:19 info > 4 drwxr-xr-x 4 root root 4096 2005-10-26 13:34 priv > 4 drwxr-xr-x 2 root root 4096 2005-10-26 13:34 src > $ > $ ls -las /usr/local/lib/erlang/lib/odbc-2.0.4/ebin > total 52 > 4 drwxr-xr-x 2 root root 4096 2005-10-26 13:34 . > 4 drwxrwxr-x 8 421 staff 4096 2005-10-25 02:19 .. > 4 -rw-r--r-- 1 root root 271 2005-10-26 13:34 odbc.app > 4 -rw-r--r-- 1 root root 1188 2005-10-26 13:34 odbc_app.beam > 4 -rw-r--r-- 1 root root 17 2005-10-26 13:34 odbc.appup > 28 -rw-r--r-- 1 root root 26348 2005-10-26 13:34 odbc.beam > 4 -rw-r--r-- 1 root root 1460 2005-10-26 13:34 odbc_sup.beam > $ > $ ls -las /usr/local/lib/erlang/lib/odbc-2.0.4/priv/bin > total 124 > 4 drwxr-xr-x 2 root root 4096 2005-10-26 13:34 . > 4 drwxr-xr-x 4 root root 4096 2005-10-26 13:34 .. > 116 -rwxr-xr-x 1 root root 114494 2005-10-26 13:34 odbcserver > > > Also, I put the following two lines in my application to > guarantee my environment variables > > os:putenv("ODBCINI", "/etc/unixODBC/odbc.ini") , > os:putenv("ODBCSYSINI", "/etc/unixODBC/odbcinst.ini") , > > > Hope the above helps, please let us know what you find and your > platform and version numbers. > > ~Michael -- Michael McDaniel Portland, Oregon, USA http://autosys.us +1 503 283 5284 From hwloidl@REDACTED Thu Nov 3 21:19:49 2005 From: hwloidl@REDACTED (Hans-Wolfgang Loidl) Date: Thu, 3 Nov 2005 21:19:49 +0100 Subject: CfP: Applied Semantics, Special Issue of J of TCS Message-ID: <20051103211949.3f5893e9@anagni.tcs.informatik.uni-muenchen.de> [ -- apologies for multiple copies of this CfP -- HWL ] CALL FOR PAPERS Special Issue on APPLIED SEMANTICS of the Journal of Theoretical Computer Science http://lionel.tcs.ifi.lmu.de/APPSEM05/journal_call.php We invite the submission of full papers on the topic of Applied Semantics, as described below, for publication in a special issue of the Journal of Theoretical Computer Science (TCS). Papers should be revised versions of those papers submitted to and presented at the APPSEM05 Workshop, Frauenchiemsee, Germany, September 12-15. However, we will consider submissions of papers not presented there, provided they fall into the scope of the call and clearly work out a novel contribution to the field that wasn't mature enough to be presented at the aforementioned workshop. Programming languages are the basic tools with which all applications of computers are built. It is important, therefore, that they should be well designed and well implemented. Achieving these goals requires both a good theoretical understanding of programming language designs, and practical skills in the development of high quality compilers. This special issue will cover all these areas and will focus on the formal basis for programming languages. The general areas covered by this special issue are as follows: 1. Program structuring: object-oriented programming, modules, 2. Proof assistants, functional programming, and dependent types, 3. Program analysis, generation, and configuration, 4. Specification and verification methods, 5. Types and type inference in programming, 6. Games, sequentiality, and abstract machines, 7. Semantic methods for distributed computing, 8. Resource models and web data, 9. Continuous phenomena in Computer Science. 10. Industrial applications. This list is non-exclusive, but contributions that do not clearly fall into one of these topics should carefully work out their relationship. We particularly invite industrial contributions covering the areas above. This could mean development of a novel language, a novel compiler, program analysis tools, or indeed, just a semantic model for a new kind of application. Again, this list is not exclusive and we welcome papers on any kind of industrial work which is informed by the science of programming languages, clearly states the problem being solved and elaborates on the main techniques of the above research areas being used to solve it. Programme committee: . Gavin Bierman, Microsoft Research . Olivier Danvy, University of Aarhus . Peter Dybjer, Chalmers University of Technology . Martin Hofmann, Ludwig-Maximilians-Universit?t M?nchen (Chair) . Neil Jones, University of Copenhagen . Hans Wolfgang Loidl, Ludwig-Maximilians-Universit?t M?nchen . Peter O'Hearn, Queen Mary College, University of London . Uday Reddy, University of Birmingham . Didier Remy, INRIA Rocquencourt . Ian Stark, University of Edinburgh . Thomas Streicher, Technische Universit?t Darmstadt . Peter Thiemann, Universit?t Freiburg Format of submission (see links below): Papers should be formatted according to Elsevier's elsart document style, used for articles in the Journal of Theoretical Computer Science. Submission should be electronically in .pdf format via the APPSEM Workshop page. Papers should have 20-25 pages, including appendices. Papers exceeding the upper bound may be rejected without refereeing. Important dates: . Paper submission: 8.1.2006 . Notification: 27.2.2006 . Camera-ready copy: 27.3.2006 Links: . APPSEM05 page and paper submissions: http://lionel.tcs.ifi.lmu.de/APPSEM05/ . TCS page: http://www.elsevier.com/wps/find/journaldescription.cws_home/505625/description . Document style (elsart.cls): http://authors.elsevier.com/latex From mickael.remond@REDACTED Fri Nov 4 10:18:31 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Fri, 4 Nov 2005 10:18:31 +0100 Subject: Using 4Gb of ram with Erlang VM Message-ID: <20051104091831.GC10764@memphis.process-one.net> Hello, As I do not have a machine with 4 Gb of Ram available right now I was wondering if there are specific steps to do to be able to reach this limit ? Is there compile-time option that limit Erlang VM to 1 Gb ? Is the 4Gb limit the same on all architecture ? Does Windows version of Erlang support the same limit ? Thank you in advance ! -- Micka?l R?mond From ulf.wiger@REDACTED Fri Nov 4 11:08:01 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 4 Nov 2005 11:08:01 +0100 Subject: Using 4Gb of ram with Erlang VM Message-ID: As far as I know, it's the addressing limit of 32-bit Erlang. 64-bit Erlang should be able to go higher. I'm not aware of anything limiting erlang to 1GB. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Mickael Remond > Sent: den 4 november 2005 10:19 > To: erlang-questions@REDACTED > Subject: Using 4Gb of ram with Erlang VM > > Hello, > > As I do not have a machine with 4 Gb of Ram available right > now I was wondering if there are specific steps to do to be > able to reach this limit ? > Is there compile-time option that limit Erlang VM to 1 Gb ? > Is the 4Gb limit the same on all architecture ? Does Windows > version of Erlang support the same limit ? > > Thank you in advance ! > > -- > Micka?l R?mond > > From mickael.remond@REDACTED Fri Nov 4 11:18:11 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Fri, 4 Nov 2005 11:18:11 +0100 Subject: Using 4Gb of ram with Erlang VM In-Reply-To: References: <20051104091831.GC10764@memphis.process-one.net> Message-ID: <20051104101811.GA8210@memphis.adael.net> * Ulf Wiger (AL/EAB) [2005-11-04 11:08:01 +0100]: > > As far as I know, it's the addressing limit of 32-bit > Erlang. 64-bit Erlang should be able to go higher. > > I'm not aware of anything limiting erlang to 1GB. 1Gb is an old limit (it was a limitation of R6B I think). I was asking because I have some reports saying that Erlang does never take more than 1Gb on a 4 Gb Windows machine. I will investigate this as it should be an OS limitation setting (something like ulimit on Windows). Thank you ! -- Micka?l R?mond From chris.double@REDACTED Fri Nov 4 11:55:50 2005 From: chris.double@REDACTED (doublec) Date: Fri, 4 Nov 2005 11:55:50 +0100 Subject: Erlang on the Blackdog References: Message-ID: <20051104105550.5922F59075@bang.trapexit.org> The 'Blackdog' device has been mention on this list before: http://forums.trapexit.org:81/phpBB/viewtopic.php?t=5142 I've compiled Erlang and Yaws to run on it, the binaries are here: http://www.bluishcoder.co.nz/2005/11/erlang-and-yaws-on-blackdog.html It took an overnight compile to get things compiled using the QEMU based emulator but it runs nicely on the device itself. Yaws seems to work fine. I'm going to try on 'ex11' and see how that goes. The blackdog doesn't have a display, it uses an X client on the host machine for that purpose. _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From cyberdanx@REDACTED Fri Nov 4 13:17:38 2005 From: cyberdanx@REDACTED (Christopher Campbell) Date: Fri, 04 Nov 2005 12:17:38 +0000 Subject: Using 4Gb of ram with Erlang VM In-Reply-To: <20051104101811.GA8210@memphis.adael.net> References: <20051104091831.GC10764@memphis.process-one.net> <20051104101811.GA8210@memphis.adael.net> Message-ID: <436B5162.9050306@gmail.com> Mickael Remond wrote: > * Ulf Wiger (AL/EAB) [2005-11-04 11:08:01 +0100]: > >> As far as I know, it's the addressing limit of 32-bit >> Erlang. 64-bit Erlang should be able to go higher. >> >> I'm not aware of anything limiting erlang to 1GB. > > 1Gb is an old limit (it was a limitation of R6B I think). > I was asking because I have some reports saying that Erlang does never > take more than 1Gb on a 4 Gb Windows machine. > I will investigate this as it should be an OS limitation setting > (something like ulimit on Windows). I think, although it's been a while so I may be remembering incorrectly that windows allows 2gig of user and 2 gig of kernel virtual memory on pro editions of NT family and 3gig user and 1 gig kernel on server editions. This means the limit for user memory is smaller than the maximum virtual address space, the rest being used for kernel data like handles, windowing data and so on. This is for only for 32 bit editions, not sure what windows does for 64bit editions. Chris From chandrashekhar.mullaparthi@REDACTED Fri Nov 4 13:24:35 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Fri, 4 Nov 2005 12:24:35 +0000 Subject: Using 4Gb of ram with Erlang VM In-Reply-To: <20051104101811.GA8210@memphis.adael.net> References: <20051104091831.GC10764@memphis.process-one.net> <20051104101811.GA8210@memphis.adael.net> Message-ID: On 04/11/05, Mickael Remond wrote: > * Ulf Wiger (AL/EAB) [2005-11-04 11:08:01 +0100]: > > > > > As far as I know, it's the addressing limit of 32-bit > > Erlang. 64-bit Erlang should be able to go higher. > > > > I'm not aware of anything limiting erlang to 1GB. > > 1Gb is an old limit (it was a limitation of R6B I think). > I was asking because I have some reports saying that Erlang does never > take more than 1Gb on a 4 Gb Windows machine. > I will investigate this as it should be an OS limitation setting > (something like ulimit on Windows). We have erlang nodes which use about 2GB. cheers Chandru From micke@REDACTED Fri Nov 4 16:53:09 2005 From: micke@REDACTED (Michael Fogeborg) Date: Fri, 04 Nov 2005 16:53:09 +0100 Subject: Using 4Gb of ram with Erlang VM In-Reply-To: <20051104091831.GC10764@memphis.process-one.net> References: <20051104091831.GC10764@memphis.process-one.net> Message-ID: <6.2.1.2.0.20051104165302.02808ae8@mail.online.no> This is for M$ Windows versions that support the 1+3Gb memory model: 1 - enable use of the 1+3Gb model by adding the "/3Gb" switch in the file boot.ini file usually found on C:\ ( its has the hidden attribute set = invisible ) http://support.microsoft.com/default.aspx?scid=kb%3BEN-US%3B297812 2 - patch the PE-header of the erl.exe file to enable use of the same model As far as I know the erl.exe file is not linked with these attributes and will only allow use of 2 GB. I did this a while ago when trying to push the ring-benchmark. I had a PC with Win XP Pro and 4Gb of memory. Got 1800000 processes running before swapping (?) killed it. At 10:18 2005-11-04, you wrote: >Hello, > >As I do not have a machine with 4 Gb of Ram available right now I was >wondering if there are specific steps to do to be able to reach this >limit ? >Is there compile-time option that limit Erlang VM to 1 Gb ? >Is the 4Gb limit the same on all architecture ? Does Windows version of >Erlang support the same limit ? > >Thank you in advance ! > >-- >Micka?l R?mond From jeinhorn@REDACTED Fri Nov 4 16:43:27 2005 From: jeinhorn@REDACTED (Jeff Einhorn) Date: Fri, 4 Nov 2005 09:43:27 -0600 Subject: ODBC port_program_executable_not_found Message-ID: <2B025C1778EB94418F186FB802D68EEF1B6B7F@TRITON.pinnaclecredit.com> It looks like my reply never made it to the list yesterday, so here it is again. I don't see the priv directory for the c odbcserver program, so I would assume that the odbcserver didn't build correctly. However, when trying to track down why this is the case I didn't see any odbc build errors during the make process. make output === Entering application odbc make[3]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/src' erlc -W +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.0.4"' +'{parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"odbc-2.0.4"}' -o../ebin odbc.erl erlc -W +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.0.4"' +'{parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"odbc-2.0.4"}' -o../ebin odbc_app.erl erlc -W +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.0.4"' +'{parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"odbc-2.0.4"}' -o../ebin odbc_sup.erl sed -e 's;%VSN%;2.0.4;' odbc.app.src > ../ebin/odbc.app sed -e 's;%VSN%;2.0.4;' odbc.appup.src > ../ebin/odbc.appup make[3]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/src' make[3]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' make -f x86_64-unknown-linux-gnu/Makefile TYPE=opt make[4]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' make[4]: Nothing to be done for `opt'. make[4]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' make[3]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' === Skipping subdir doc/src, it is missing === Leaving application odbc [root@REDACTED ebin]# pwd /usr/local/lib/erlang/lib/odbc-2.0.4/ebin [root@REDACTED ebin]# ls *.beam odbc_app.beam odbc.beam odbc_sup.beam [root@REDACTED src]# ls odbc_app.erl odbc.erl odbc_internal.hrl odbc_sup.erl System specs: Redhat AS 4 x86_64 OTP R10B-8 Thanks for your help, Jeff -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of tobbe Sent: Thursday, November 03, 2005 4:04 AM To: erlang-questions@REDACTED Subject: ODBC port_program_executable_not_found Perhaps, your Erlang ODBC driver wasn't built properly. Can you find the 'odbcserver' executable under the Erlang install directory ? For example: # ls /usr/local/lib/erlang/lib/odbc-2.0.4/priv/bin/ odbcserver Cheers, Tobbe Jeffrey M. Einhorn Chief Technology Officer Fourscore Resource Capital, LLC 952.253.6300 / 888.889.6803 952.253.6363 (fax) Email: jeinhorn@REDACTED http://www.fourscorellc.com Confidentiality Note: This e-mail is intended only for the person to whom it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is prohibited. If you have received this e-mail in error, please destroy the original message and all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From roger.larsson@REDACTED Fri Nov 4 20:12:25 2005 From: roger.larsson@REDACTED (Roger Larsson) Date: Fri, 4 Nov 2005 20:12:25 +0100 Subject: Erlang on the Blackdog In-Reply-To: <20051104105550.5922F59075@bang.trapexit.org> References: <20051104105550.5922F59075@bang.trapexit.org> Message-ID: <200511042012.26246.roger.larsson@norran.net> On Friday 04 November 2005 11.55, doublec wrote: > The 'Blackdog' device has been mention on this list before: > > http://forums.trapexit.org:81/phpBB/viewtopic.php?t=5142 > > I've compiled Erlang and Yaws to run on it, the binaries are here: > You should enter the competition :-) <> If you get wings http://wings.sourceforge.net/ to run and you surely will have a winner! /RogerL From marthin@REDACTED Fri Nov 4 20:33:24 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Fri, 4 Nov 2005 21:33:24 +0200 Subject: linux Erlang/OTP status Message-ID: <000801c5e176$a2d53740$4800a8c0@studioa> I'd normally try finding answers first by searching the archives of questions asked, but for some reason the search function of the mailing list seem broken - so I need to ask this way. What's the status of linux erlang/otp? I've seen it in the debian disto where it's called "unstable", and seen comments dating back to 1999 in which it would seem like linux ports where commonplace, and would assume that six years later large communities are running Erlang on linux. Yet I can't seem to find one. Any help? Thanks so much. Marthin Laubscher From chris.double@REDACTED Fri Nov 4 22:27:14 2005 From: chris.double@REDACTED (Chris Double) Date: Sat, 5 Nov 2005 10:27:14 +1300 Subject: Erlang on the Blackdog In-Reply-To: <200511042012.26246.roger.larsson@norran.net> References: <20051104105550.5922F59075@bang.trapexit.org> <200511042012.26246.roger.larsson@norran.net> Message-ID: > You should enter the competition :-) Unfortunately it's US residents only and I live in New Zealand. If I do come up with a winning idea I'll have to find someone in the US to partner with :) Chris. From mickael.remond@REDACTED Fri Nov 4 22:24:42 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Fri, 4 Nov 2005 22:24:42 +0100 Subject: Erlang on the Blackdog In-Reply-To: <20051104105550.5922F59075@bang.trapexit.org> References: <20051104105550.5922F59075@bang.trapexit.org> Message-ID: <20051104212442.GD7451@memphis.process-one.net> * doublec [2005-11-04 11:55:50 +0100]: > > The 'Blackdog' device has been mention on this list before: > > http://forums.trapexit.org:81/phpBB/viewtopic.php?t=5142 > > I've compiled Erlang and Yaws to run on it, the binaries are here: > > http://www.bluishcoder.co.nz/2005/11/erlang-and-yaws-on-blackdog.html > > It took an overnight compile to get things compiled using the QEMU based emulator but it runs nicely on the device itself. Yaws seems to work fine. I'm going to try on 'ex11' and see how that goes. The blackdog doesn't have a display, it uses an X client on the host machine for that purpose. I tried your binary and it is working on my Blackdog system. I will try to support the Blackdog as a target architecture for the Erlang REPOS environment in a near future. In the meantime, for those interested in seeing Erlang running on this little device, I can do demonstrations during EUC next week ! Thank you, Chris. I was afraid that the QEMU compilation would lead my laptop to melt. -- Micka?l R?mond http://www.3pblog.net/ From erlang@REDACTED Fri Nov 4 22:35:46 2005 From: erlang@REDACTED (Michael McDaniel) Date: Fri, 4 Nov 2005 13:35:46 -0800 Subject: linux Erlang/OTP status In-Reply-To: <000801c5e176$a2d53740$4800a8c0@studioa> References: <000801c5e176$a2d53740$4800a8c0@studioa> Message-ID: <20051104213546.GT15817@delora.autosys.us> On Fri, Nov 04, 2005 at 09:33:24PM +0200, Marthin Laubscher wrote: > I'd normally try finding answers first by searching the archives of > questions asked, but for some reason the search function of the mailing list > seem broken - so I need to ask this way. > > What's the status of linux erlang/otp? I've seen it in the debian disto > where it's called "unstable", and seen comments dating back to 1999 in which > it would seem like linux ports where commonplace, and would assume that six > years later large communities are running Erlang on linux. Yet I can't seem > to find one. Any help? > > Thanks so much. > > Marthin Laubscher > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Presently running R10B-8 on Ubuntu flavor of Debian, and SuSE. Been running on R10B-6 on SuSE in production for months with no issues. It does a lot of ODBC database stuff and HTTP client/server stuff. $ tar -xzf /path/to/otp_src_R10B-8.tar.gz $ cd otp_src_R10B-8 $ ./configure --with-odbc --x-includes=/usr/local/include \ --x-libraries=/usr/lib --with-ssl $ make $ sudo install $ cd /usr/local/lib/erlang $ sudo tar -xzf /path/to/otp_doc_man_R10B-8.tar.gz $ sudo tar -xzf /path/to/otp_doc_html_R10B-8.tar.gz $ cd $ erl Erlang (BEAM) emulator version 5.4.10 [source] [hipe] Eshell V5.4.10 (abort with ^G) 1> q(). ok 2> $ $ I have been using Erlang and not specific OTP such as gen_server. ~Michael From matthias@REDACTED Fri Nov 4 22:43:25 2005 From: matthias@REDACTED (Matthias Lang) Date: Fri, 4 Nov 2005 22:43:25 +0100 Subject: linux Erlang/OTP status In-Reply-To: <000801c5e176$a2d53740$4800a8c0@studioa> References: <000801c5e176$a2d53740$4800a8c0@studioa> Message-ID: <17259.54781.544307.803435@antilipe.corelatus.se> Marthin Laubscher writes: > I'd normally try finding answers first by searching the archives of > questions asked, but for some reason the search function of the mailing list > seem broken - so I need to ask this way. The MHonArc search function searches nothing by default. You have to explicitly select the months you want searched. I don't know why it's like that, it confused me too. An alternative is to use google, e.g. prefix your google query with site:erlang.org/ml-archive and you should get what you want. > What's the status of linux erlang/otp? I've seen it in the debian disto > where it's called "unstable", and seen comments dating back to 1999 in which > it would seem like linux ports where commonplace, and would assume that six > years later large communities are running Erlang on linux. Yet I can't seem > to find one. Any help? Erlang compiles just fine under linux. No tweaking required, at least not under debian on x86. Various volunteers have provided .rpm and .deb files in the past, and you can get quite up-to-date-but-experimental versions of the latter from http://neutronic.mine.nu/unstable/ Matthias From marthin@REDACTED Fri Nov 4 23:21:28 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Sat, 5 Nov 2005 00:21:28 +0200 Subject: linux Erlang/OTP status In-Reply-To: <20051104213546.GT15817@delora.autosys.us> Message-ID: <000b01c5e18e$1df617c0$4800a8c0@studioa> Very Cool! That would take care of step 1. The next step is to get Erlang running on a gumstix single board computer (my chosen target platform, own distribution of linux and not debian, ubuntu or SuSE, not x86 but Intel PXA255 ARM class processor (see http://www.gumstix.com) Thanks to Matthias's google trick I've found Brian Zhou's announcement of a successful port to an even smaller XSCALE processor (on a linksys device). That's another positive step dating back to May of this year. I still need to have a deeper look before I can say how much that would help. Check out the gumstix platform if you have a mo and tell me if you think it's worth registering a "Gumstix Erlang" project, or if it should be so simple that one person can do it over a good weekend. Thanks for the responses guys, life almost seems worth it again. -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Michael McDaniel Sent: 04 November 2005 23:36 To: erlang-questions@REDACTED Subject: Re: linux Erlang/OTP status On Fri, Nov 04, 2005 at 09:33:24PM +0200, Marthin Laubscher wrote: > I'd normally try finding answers first by searching the archives of > questions asked, but for some reason the search function of the mailing list > seem broken - so I need to ask this way. > > What's the status of linux erlang/otp? I've seen it in the debian disto > where it's called "unstable", and seen comments dating back to 1999 in which > it would seem like linux ports where commonplace, and would assume that six > years later large communities are running Erlang on linux. Yet I can't seem > to find one. Any help? > > Thanks so much. > > Marthin Laubscher > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Presently running R10B-8 on Ubuntu flavor of Debian, and SuSE. Been running on R10B-6 on SuSE in production for months with no issues. It does a lot of ODBC database stuff and HTTP client/server stuff. $ tar -xzf /path/to/otp_src_R10B-8.tar.gz $ cd otp_src_R10B-8 $ ./configure --with-odbc --x-includes=/usr/local/include \ --x-libraries=/usr/lib --with-ssl $ make $ sudo install $ cd /usr/local/lib/erlang $ sudo tar -xzf /path/to/otp_doc_man_R10B-8.tar.gz $ sudo tar -xzf /path/to/otp_doc_html_R10B-8.tar.gz $ cd $ erl Erlang (BEAM) emulator version 5.4.10 [source] [hipe] Eshell V5.4.10 (abort with ^G) 1> q(). ok 2> $ $ I have been using Erlang and not specific OTP such as gen_server. ~Michael From marthin@REDACTED Fri Nov 4 23:44:47 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Sat, 5 Nov 2005 00:44:47 +0200 Subject: linux Erlang/OTP status In-Reply-To: <20051104213546.GT15817@delora.autosys.us> Message-ID: <000c01c5e191$5f7ea510$4800a8c0@studioa> Very Cool! That would take care of step 1. The next step is to get Erlang running on a gumstix single board computer (my chosen target platform, own distribution of linux and not debian, ubuntu or SuSE, not x86 but Intel PXA255 ARM class processor (see http://www.gumstix.com) Thanks to Matthias's google trick I've found Brian Zhou's announcement of a successful port to an even smaller XSCALE processor (on a linksys device). That's another positive step dating back to May of this year. I still need to have a deeper look before I can say how much that would help. Check out the gumstix platform if you have a mo and tell me if you think it's worth registering a "Gumstix Erlang" project, or if it should be so simple that one person can do it over a good weekend. Thanks for the responses guys, life almost seems worth it again. -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Michael McDaniel Sent: 04 November 2005 23:36 To: erlang-questions@REDACTED Subject: Re: linux Erlang/OTP status On Fri, Nov 04, 2005 at 09:33:24PM +0200, Marthin Laubscher wrote: > I'd normally try finding answers first by searching the archives of > questions asked, but for some reason the search function of the mailing list > seem broken - so I need to ask this way. > > What's the status of linux erlang/otp? I've seen it in the debian disto > where it's called "unstable", and seen comments dating back to 1999 in which > it would seem like linux ports where commonplace, and would assume that six > years later large communities are running Erlang on linux. Yet I can't seem > to find one. Any help? > > Thanks so much. > > Marthin Laubscher > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Presently running R10B-8 on Ubuntu flavor of Debian, and SuSE. Been running on R10B-6 on SuSE in production for months with no issues. It does a lot of ODBC database stuff and HTTP client/server stuff. $ tar -xzf /path/to/otp_src_R10B-8.tar.gz $ cd otp_src_R10B-8 $ ./configure --with-odbc --x-includes=/usr/local/include \ --x-libraries=/usr/lib --with-ssl $ make $ sudo install $ cd /usr/local/lib/erlang $ sudo tar -xzf /path/to/otp_doc_man_R10B-8.tar.gz $ sudo tar -xzf /path/to/otp_doc_html_R10B-8.tar.gz $ cd $ erl Erlang (BEAM) emulator version 5.4.10 [source] [hipe] Eshell V5.4.10 (abort with ^G) 1> q(). ok 2> $ $ I have been using Erlang and not specific OTP such as gen_server. ~Michael From matthias@REDACTED Sat Nov 5 07:55:01 2005 From: matthias@REDACTED (Matthias Lang) Date: Sat, 5 Nov 2005 07:55:01 +0100 Subject: linux Erlang/OTP status In-Reply-To: <000b01c5e18e$1df617c0$4800a8c0@studioa> References: <20051104213546.GT15817@delora.autosys.us> <000b01c5e18e$1df617c0$4800a8c0@studioa> Message-ID: <17260.22341.402451.562525@antilipe.corelatus.se> Marthin Laubscher writes: > I've found Brian Zhou's announcement of a successful port to an > even smaller XSCALE processor (on a linksys device). That's > another positive step dating back to May of this year. I still need > to have a deeper look before I can say how much that would help. Brian's work was excellent. I have a bad conscience for still not having repeated it and written it up for the FAQ. It should replace my clumsy hack for doing the same thing by randomly hacking makefiles. > Check out the gumstix platform if you have a mo and tell me if you think > it's worth registering a "Gumstix Erlang" project, or if it should be so > simple that one person can do it over a good weekend. Getting Erlang running on the gumstix should be relatively straightforward if you've done that sort of thing before, i.e. you know your way around cross compilers and makefiles. I'd expect it to take me a day if I already had the cross-compiler and C libraries set up. The gumstix is more than powerful enough, though 4MB of flash is probably too tight. I'd suggest starting off with the 16MB XM version, or using external storage (NFS or CF or...). See also the Erlang FAQ, http://www.erlang.org/faq/, question "8.9. Is Erlang small enough for embedded systems?" Matthias From chris.double@REDACTED Sat Nov 5 08:05:23 2005 From: chris.double@REDACTED (Chris Double) Date: Sat, 5 Nov 2005 20:05:23 +1300 Subject: Erlang on the Blackdog In-Reply-To: <20051104212442.GD7451@memphis.process-one.net> References: <20051104105550.5922F59075@bang.trapexit.org> <20051104212442.GD7451@memphis.process-one.net> Message-ID: On 11/5/05, Mickael Remond wrote: > Thank you, Chris. I was afraid that the QEMU compilation would lead my > laptop to melt. Great! Glad it worked. It took an overnight compile on QEMU to get it all built. I've got ex11 going now: http://www.bluishcoder.co.nz/2005/11/ex11-on-blackdog.html It runs very nicely. I like the way the blackdog makes this easy to use on different machines. I've set it up so I just plug it in to a host machine , either Windows or Linux, and up pops an ex11 application. Chris. From marthin@REDACTED Sat Nov 5 09:39:04 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Sat, 5 Nov 2005 10:39:04 +0200 Subject: linux Erlang/OTP status In-Reply-To: <17260.22341.402451.562525@antilipe.corelatus.se> Message-ID: <000d01c5e1e4$64ad28b0$4800a8c0@studioa> Thanks Matthias, Matthias Lang writes: > > Marthin Laubscher writes: > > > I've found Brian Zhou's announcement of a successful port to an > > even smaller XSCALE processor (on a linksys device). That's > > another positive step dating back to May of this year. I still need > > to have a deeper look before I can say how much that would help. > > Brian's work was excellent. I have a bad conscience for still not > having repeated it and written it up for the FAQ. It should replace my > clumsy hack for doing the same thing by randomly hacking makefiles. > > > Check out the gumstix platform if you have a mo and tell me if you > think > > it's worth registering a "Gumstix Erlang" project, or if it should be > so > > simple that one person can do it over a good weekend. > > Getting Erlang running on the gumstix should be relatively > straightforward if you've done that sort of thing before, i.e. you > know your way around cross compilers and makefiles. I'd expect it to > take me a day if I already had the cross-compiler and C libraries set > up. I'm new to linux though (believe it or not at this late stage of the game) and would still need to find my way through the jungle of tools. Going back to the 80's I've done a lot of porting of a large complex system (GIS) to a variety of environments including HP (HP/UX), Sun (SunOS and Solaris), Data General (AOS/VS), x86 UNIX and Xenix, OS/2, NT and Windows. Those days the variances between the processors and the C compiler implementations were extreme, and I spent a lot of time devising ways and means to virtualise the differences to keep the other developers largely independent from the intricacies involved. I even replicated the entire OSF/Motif environment for the non-unix environments so that my GUI developers could write for a single environment. It worked brilliantly and was the right thing to do at the time, but things have changed dramatically since then... I suspect that the toughest part will be exactly that - setting up the cross compiling environment properly. The gumstix guys does help with a cross-compiler solution though, so I'll be working my way through that first. Brian's announcement did mention the exclusion of HiPE. I've not seen HiPE code, but I suspect that the trouble is that very tight optimisation is often opportunistically using specific platform and processor capabilities. The nostalgia of that can quite easily draw me into "simply having to port HiPE as well", but if the performance pay-off is not going to be worth it, I really should resist the temptation. > > The gumstix is more than powerful enough, though 4MB of flash is > probably too tight. I'd suggest starting off with the 16MB XM version, > or using external storage (NFS or CF or...). Mine is the 400MHz, 16MB flash, 64MB SDRAM version and I have Compact Flash MMC, Bluetooth, USBNet and Ethernet options to connect. I'll probably stick to the same spec level for production units. > > See also the Erlang FAQ, http://www.erlang.org/faq/, question "8.9. Is > Erlang small enough for embedded systems?" Quite helpful, thanks. I also noticed Q 8.8's answer including: "The whole build system wasn't written with cross compilation in mind. There have been murmurs from volunteers to fix this, but no result (yet)." Is your "bad conscience" comment perhaps a reference to the same thing? ;-) > > Matthias I suspect it's time for at least a new thread, maybe even project - under the current heading most members are likely to miss that we're not discussing general linux but rather Erlang on PXA255/XSCALE/ARM. Marthin From mickael.remond@REDACTED Sat Nov 5 09:58:35 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Sat, 5 Nov 2005 09:58:35 +0100 Subject: linux Erlang/OTP status In-Reply-To: <17260.22341.402451.562525@antilipe.corelatus.se> References: <20051104213546.GT15817@delora.autosys.us> <000b01c5e18e$1df617c0$4800a8c0@studioa> <17260.22341.402451.562525@antilipe.corelatus.se> Message-ID: <20051105085835.GC7553@memphis.process-one.net> * Matthias Lang [2005-11-05 07:55:01 +0100]: > Getting Erlang running on the gumstix should be relatively > straightforward if you've done that sort of thing before, i.e. you > know your way around cross compilers and makefiles. I'd expect it to > take me a day if I already had the cross-compiler and C libraries set > up. In another thread: I have been playing with the Blackdog and it is a very nice little device that runs Erlang pretty well. I do not know if it is suitable for your need, however. Cheers, -- Micka?l R?mond From kostis@REDACTED Sat Nov 5 10:30:49 2005 From: kostis@REDACTED (Kostis Sagonas) Date: Sat, 5 Nov 2005 10:30:49 +0100 (MET) Subject: linux Erlang/OTP status In-Reply-To: Mail from '"Marthin Laubscher" ' dated: Sat, 5 Nov 2005 10:39:04 +0200 Message-ID: <200511050930.jA59UnmG007394@spikklubban.it.uu.se> Marthin Laubscher wrote: > Brian's announcement did mention the exclusion of HiPE. I've not seen HiPE > code, but I suspect that the trouble is that very tight optimisation is > often opportunistically using specific platform and processor capabilities. Nothing like that. Our C code is quite portable and very nice in this respect. But porting HiPE makes sense only if you are willing to develop the corresponding native code backend under lib/hipe and for that you need development work, not porting. > The nostalgia of that can quite easily draw me into "simply having to port > HiPE as well", but if the performance pay-off is not going to be worth it, > I really should resist the temptation. Yes, probably you should. Once you have everything else in place, we can help you make a backend for gumstix. Kostis From bjarne@REDACTED Sat Nov 5 10:34:16 2005 From: bjarne@REDACTED (=?iso-8859-1?Q?Bjarne_D=E4cker?=) Date: Sat, 5 Nov 2005 10:34:16 +0100 Subject: ACM SIGPLAN Erlang Workshop Tallinn 2005 References: <435FD4AA.1020503@hyber.org> <002a01c5db13$d2a94f60$bb0b69d4@segeltorp> Message-ID: <002101c5e1ec$17a8d840$482369d4@segeltorp> Dear Erlang friends, Simon Aurell has kindly assembled the slides shown at the presentations at the workshop and made them available at the workshop homepage http://www.erlang.se/workshop/2005/ I took some photos at the workshop which can be reached from a link at the workshop homepage. However, I made the mistake of waiting a few weeks too long to compile this photographic display so I think that I may have confused some names. I apologise profusely for this impoliteness and beg for forgiveness and ask all concerned to mail corrections. Best wishes for a workshop next year in Portland Bjarne From marthin@REDACTED Sat Nov 5 10:51:34 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Sat, 5 Nov 2005 11:51:34 +0200 Subject: linux Erlang/OTP status In-Reply-To: <20051105085835.GC7553@memphis.process-one.net> Message-ID: <000f01c5e1ee$85e831a0$4800a8c0@studioa> > -----Original Message----- > From: Mickael Remond [mailto:mickael.remond@REDACTED] > Sent: 05 November 2005 10:59 > To: erlang-questions@REDACTED > Cc: Marthin Laubscher; Matthias Lang > Subject: Re: linux Erlang/OTP status > > * Matthias Lang [2005-11-05 07:55:01 +0100]: > > > Getting Erlang running on the gumstix should be relatively > > straightforward if you've done that sort of thing before, i.e. you > > know your way around cross compilers and makefiles. I'd expect it to > > take me a day if I already had the cross-compiler and C libraries set > > up. > > In another thread: I have been playing with the Blackdog and it is a > very nice little device that runs Erlang pretty well. That's good to hear. > I do not know if it is suitable for your need, however. Blackdog itself is too big and heavy as a package, I won't know what it lokks like when you throw the enclosure away. In-Hand's Fingertips3 is too bulky (even though they call themselves the smallest). There are plenty options I'm not aware of I'm sure, but for the time being and limited funds, I'm focussing on the gumstix as it seems it would do the job well and is certainly small enough for my purpose. And it's low cost without being a loss-leader. Smaller is better, probably not only for my application, but in general the smaller, the greater the chances of it being able to suit other novel applications as well. > > Cheers, > > -- Something that I'm not overly sure of, is the fit between the I/O capabilities of regular Erlang and a device such as the gumstix/robostix combo where there are large numbers of GPIO and other signals that can be used and configured for different purposes. > Micka?l R?mond Marthin Laubscher From marthin@REDACTED Sat Nov 5 11:00:46 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Sat, 5 Nov 2005 12:00:46 +0200 Subject: linux Erlang/OTP status In-Reply-To: <200511050930.jA59UnmG007394@spikklubban.it.uu.se> Message-ID: <001001c5e1ef$ceea44a0$4800a8c0@studioa> Hi Kostis, > -----Original Message----- > From: Kostis Sagonas [mailto:kostis@REDACTED] > Sent: 05 November 2005 11:31 > To: marthin@REDACTED > Cc: erlang-questions@REDACTED > Subject: RE: linux Erlang/OTP status > > Marthin Laubscher wrote: > > > Brian's announcement did mention the exclusion of HiPE. I've not seen > HiPE > > code, but I suspect that the trouble is that very tight optimisation is > > often opportunistically using specific platform and processor > capabilities. > > Nothing like that. Our C code is quite portable and very nice in > this respect. But porting HiPE makes sense only if you are willing > to develop the corresponding native code backend under lib/hipe and > for that you need development work, not porting. I'm glad to hear that. It's good advertising - to motivate me to page through the HiPE source and docs to see how it is organised. > > > The nostalgia of that can quite easily draw me into "simply having to > port > > HiPE as well", but if the performance pay-off is not going to be worth > it, > > I really should resist the temptation. > > Yes, probably you should. Once you have everything else in place, we > can help you make a backend for gumstix. Thanks - for helping me fight temptation, and for putting up your hand to help when the time is right. > > Kostis > From luna@REDACTED Sat Nov 5 11:53:50 2005 From: luna@REDACTED (Daniel Luna) Date: Sat, 5 Nov 2005 11:53:50 +0100 (CET) Subject: linux Erlang/OTP status In-Reply-To: <000d01c5e1e4$64ad28b0$4800a8c0@studioa> References: <000d01c5e1e4$64ad28b0$4800a8c0@studioa> Message-ID: On Sat, 5 Nov 2005, Marthin Laubscher wrote: > Brian's announcement did mention the exclusion of HiPE. I've not seen > HiPE code, but I suspect that the trouble is that very tight > optimisation is often opportunistically using specific platform and > processor capabilities. If you are running Linux then HiPE should work out-of-the-box for x86 and amd64 on most kernels. It also runs on sparc/solaris(V8+) and powerPC (both Linux and MacOSX). HiPE can even be run on rather old machines. The x86 version should run on a 486, I think. (At least any 586) HiPE does not (yet) run under Windows though. /Luna -- Daniel Luna | Top reasons that I have a beard: luna@REDACTED | a) Laziness. http://www.update.uu.se/~luna/ | b) I can. Don't look at my homepage (it stinks).| c) I can get away with it. From marthin@REDACTED Sat Nov 5 14:31:26 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Sat, 5 Nov 2005 15:31:26 +0200 Subject: linux Erlang/OTP status In-Reply-To: Message-ID: <001101c5e20d$3df29f10$4800a8c0@studioa> Hi Daniel, > -----Original Message----- > From: owner-erlang-questions@REDACTED [mailto:owner-erlang- > questions@REDACTED] On Behalf Of Daniel Luna > Sent: 05 November 2005 12:54 > To: Marthin Laubscher > Cc: matthias@REDACTED; erlang-questions@REDACTED > Subject: RE: linux Erlang/OTP status > > On Sat, 5 Nov 2005, Marthin Laubscher wrote: > > Brian's announcement did mention the exclusion of HiPE. I've not seen > > HiPE code, but I suspect that the trouble is that very tight > > optimisation is often opportunistically using specific platform and > > processor capabilities. > > If you are running Linux then HiPE should work out-of-the-box for x86 and > amd64 on most kernels. It also runs on sparc/solaris(V8+) and powerPC > (both Linux and MacOSX). Sorry, no x86/amd64, we were talking ARM/XSCALE/Intel PXA255 > > HiPE can even be run on rather old machines. The x86 version should run on > a 486, I think. (At least any 586) > > HiPE does not (yet) run under Windows though. That's much more interesting, not because I'd like it to run under Windows, but because it could be speaking of the nature of the native code that one has to be prepared to write at the back-end for HiPE to be implemented in a different setup (as per Matthias's post). > > /Luna > -- > Daniel Luna | Top reasons that I have a beard: > luna@REDACTED | a) Laziness. > http://www.update.uu.se/~luna/ | b) I can. > Don't look at my homepage (it stinks).| c) I can get away with it. Marthin From rrerlang@REDACTED Sat Nov 5 16:18:36 2005 From: rrerlang@REDACTED (Robert Raschke) Date: Sat, 5 Nov 2005 15:18:36 +0000 Subject: Is concurrency hard? In-Reply-To: <4368C402.3060306@ericsson.com> Message-ID: <9fb43f4f8b546498e10930c5ae356cfe@tombob.com> mats wrote: > Robert Raschke wrote: >> I believe that concurrent programming is hard to most people, because >> of the poor abstractions used by most programmers, i.e., state, lots >> of it. > > how's that? The kind of code I see in day to day life: A = something B = something else routine_reading_and_writing_A_and_maybe_reading_B_and_writing_to_C_and_D() E = D /* because the next routine works only on E, not on D */ routine_reading_E_writing_to_F() routine_reading_A_and_F() ... and so on ... This kind of Basic style programming is extremely widespread, regardless how advanced the underlying technology. Although functional and declarative languages make it just that little bit harder to program in such a style, not much, but a little. I get the impression a lot of people think about where and how to store data when programming (i.e., how do I manipulate the data), instead of concentrating on the transformational aspect (i.e., what am I doing to the data). I think that as long as you are concentrating on manually moving data about in piecemeal fashion, you are unlikely to notice any opportunities for making use of concurrency. I feel that the best way of noticing concurrency in your application is by carefully crafting the vocabulary that describes your problem and its solution. Very often you will find that storage does not rate very highly in such a vocabulary, allowing you to concentrate on the functional ascpect of you application. Even more fundamentally, if your vocabulary does end up with words for things that need storage, you can be sure that they are the ones that will limit your concurrency. Robby From pascal.brisset@REDACTED Sat Nov 5 18:55:17 2005 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Sat, 5 Nov 2005 18:55:17 +0100 Subject: linux Erlang/OTP status (gumstix) In-Reply-To: <17260.22341.402451.562525@antilipe.corelatus.se> References: <20051104213546.GT15817@delora.autosys.us> <000b01c5e18e$1df617c0$4800a8c0@studioa> <17260.22341.402451.562525@antilipe.corelatus.se> Message-ID: <20051105175518.3D4C617347F@postfix3-1.free.fr> It's strange to read about the gumstix here. For a moment I thought I had my mailing-list folders all mixed-up. Matthias Lang writes: > Getting Erlang running on the gumstix should be relatively > straightforward if you've done that sort of thing before, i.e. you > know your way around cross compilers and makefiles. I'd expect it to > take me a day if I already had the cross-compiler and C libraries set > up. I happened to have the cross-development environment already compiled, and it only took a couple hours to get R10B-8 running, following your notes at http://www.corelatus.com/~matthias/erlang_on_860.html . It takes 70 seconds to start erl over NFS and Bluetooth, but then the shell feels very responsive. # uname -a Linux gumstix 2.6.10gum #1 Fri Mar 4 15:03:34 PST 2005 armv5tel unknown # /mnt/tmp/erlang/bin/erl Erlang (BEAM) emulator version 5.4.10 [source] Eshell V5.4.10 (abort with ^G) 1> The hardware is a gumstix basix 200f-bt (80mm x 20mm, 8 g, 1 W): http://gumstix.com/oscommerce-2.2ms2/catalog/product_info.php?products_id=88 My build script and binaries are temporarily here, in case someone wants to have a look: http://perso.wanadoo.fr/pascal.brisset/tmp/gumstix-erlang/compile.sh http://perso.wanadoo.fr/pascal.brisset/tmp/gumstix-erlang/gumstix_lib_erlang_erts-5.4.10_bin.tgz -- Pascal From luna@REDACTED Sat Nov 5 21:41:57 2005 From: luna@REDACTED (Daniel Luna) Date: Sat, 5 Nov 2005 21:41:57 +0100 (CET) Subject: linux Erlang/OTP status In-Reply-To: <001101c5e20d$3df29f10$4800a8c0@studioa> References: <001101c5e20d$3df29f10$4800a8c0@studioa> Message-ID: On Sat, 5 Nov 2005, Marthin Laubscher wrote: >Daniel Luna wrote: >> On Sat, 5 Nov 2005, Marthin Laubscher wrote: >>> Brian's announcement did mention the exclusion of HiPE. I've not seen >>> HiPE code, but I suspect that the trouble is that very tight >>> optimisation is often opportunistically using specific platform and >>> processor capabilities. >> >> If you are running Linux then HiPE should work out-of-the-box for x86 and >> amd64 on most kernels. It also runs on sparc/solaris(V8+) and powerPC >> (both Linux and MacOSX). > > Sorry, no x86/amd64, we were talking ARM/XSCALE/Intel PXA255 Aha! Then it's some work to port HiPE. Assuming that OTP in general runs on the particular platform, what has to be done is: Translate to arch-specific represention -- Steal the ppc stuff for RISC and the x86 stuff for CISC. Then make the changes necessary. Easy, but you need to know the instruction set for the architecture. Register allocation -- Just plug it in. (sort of) Frame allocation (non-register temps to stack slots, tailcall stack management...) -- Copy and change. Easy. Assemble and encode -- This part is more work. You need to write a translator from the internal represenation to machine instructions. Potentially tricky (and somewhat boring). Port the runtime system parts (loader and stuff) -- Should be easy if Linux is used. Most parts in the runtime system are generic and the specific parts should be easy to fix. Some things here could be tricky. I think that should be it. Feel free to contact me for further information. /Luna -- Daniel Luna | Top reasons that I have a beard: luna@REDACTED | a) Laziness. http://www.update.uu.se/~luna/ | b) I can. Don't look at my homepage (it stinks).| c) I can get away with it. From ulf.wiger@REDACTED Sat Nov 5 22:18:18 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Sat, 5 Nov 2005 22:18:18 +0100 Subject: parse transformery with syntax_tools Message-ID: Here's a first go at a helper function for parse transforms. I'm working on a new incarnation of plain_fsm, but decided that I wanted a more stable implementation of the parse transform code. Copying erl_id_trans.erl and modifying it seems... well, pretty primitive and not very future safe. In case anyone else wants to try it out, or give feedback, I enclose the code, as it is, below. It doesn't do anything intelligent, apart from cheering when it comes across a call to plain_fsm:extended_receive/1. Here's some sample output: ws12858> erlc -W -I ../inc/ sysFsmExample.erl xform_plainfsm(Forms) YEAH!! extended_receive/1 called in {idle,1} YEAH!! extended_receive/1 called in {c,2} (Amazingly useful, obviously...) The specific code for doing the above is so far 20 lines, in xform_plainfsm/1. The generic part is transform/5: transform(Forms, Before, After, InitContext, InitAcc) Forms : the compiled forms passed to parse_transform/2 Before: fun(Type, Form, Context) -> {Form1, Context1, InitSubAcc} After : fun(Type, Form, Context, SubAcc, Acc) -> {Form1, Acc1} InitContext : term() InitAcc : term() The idea is: 1) First call Before/3 on a Form. This function determines context for the subtrees (e.g. the name and arity of the enclosing function) It also initializes an accumulator to be used when folding over the subtrees. 2) Check if there are subtrees, and call transform/5 recursively over them. The function returns (possibly) modified subtrees and the accumulator (SubAcc). This can be used to tell the level above that something changed. 3) Then call After(Type, Form, Context, SubAcc, Acc) This lets you modify the enclosing form, using knowledge of what's happened with the subtrees (reported back with SubAcc). You can report up to the next higher level through Acc. One thing that could be done here is assigning a variable in a function clause (plain_fsm will do this: if there's a call to extended_receive/1, I wrap the argument with a variable assignment. If I do that for all functions of arity 1, I will get warnings about unused variables, so I only want to do it if it's actually going to be used.) The main benefit would of course be that I can use the functions in erl_syntax and erl_syntax_lib and only act on the forms that I actually want to inspect or change. /Uffe ================================ -module(sysPlainXform). -export([parse_transform/2]). parse_transform(Forms, _Options) -> {NewTree, _} = xform_plainfsm(Forms), [erl_syntax:revert(T) || T <- lists:flatten(NewTree)]. xform_plainfsm(Forms) -> Bef = fun(function, Form, _) -> {Form, erl_syntax_lib:analyze_function(Form), []}; (_, Form, State) -> {Form, State, []} end, Aft = fun(application, Form, Context, _SubAcc, Acc) -> case erl_syntax_lib:analyze_application(Form) of {plain_fsm, {extended_receive, 1}} -> io:format("YEAH!!~n" "extended_receive/1 called in ~p~n", [Context]); _ -> ok end, {Form, Acc}; (_, Form, _Context, _SubAcc, Acc) -> {Form, Acc} end, transform(Forms, Bef, Aft, top, []). transform(Forms, Before, After, Context, Acc) -> F1 = fun(Form, Acc0) -> Type = erl_syntax:type(Form), {Form1, Context1, InitSubAcc} = try Before(Type, Form, Context) catch error:Reason -> error(Reason, 'before', Before, [{type, Type}, {context, Context}, {acc, Acc}, {form, Form}]) end, {Form2, SubAcc2} = case erl_syntax:subtrees(Form1) of [] -> {Form1, InitSubAcc}; List -> {NewList, NewSubAcc} = transform( List, Before, After, Context1, InitSubAcc), NewForm = erl_syntax:update_tree(Form, NewList), {NewForm, NewSubAcc} end, Type2 = erl_syntax:type(Form2), {_Form3, _Acc3} = try After(Type2, Form2, Context, SubAcc2, Acc0) catch error:Reason2 -> error(Reason2, 'after', After, [{type, Type2}, {context, Context}, {sub_acc, SubAcc2}, {acc, Acc0}, {form, Form2}]) end end, F2 = fun(List, St) when is_list(List) -> lists:mapfoldl(F1, St, List); (Form, St) -> F1(Form, St) end, lists:mapfoldl(F2, Acc, Forms). error(Reason, BeforeOrAfter, Fun, Info) -> Fmt = lists:flatten( ["*** ERROR in parse_transform function:~n" "*** Reason = ~p~n" "*** applying ~w fun (~p)~n", ["*** ~10w = ~p~n" || _ <- Info]]), Args = [Reason, BeforeOrAfter, Fun | lists:foldr( fun({K,V}, Acc) -> [K, V | Acc] end, [], Info)], io:format(Fmt, Args), erlang:error(Reason). From marthin@REDACTED Sat Nov 5 22:56:54 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Sat, 5 Nov 2005 23:56:54 +0200 Subject: linux Erlang/OTP status (gumstix) In-Reply-To: <20051105175518.3D4C617347F@postfix3-1.free.fr> Message-ID: <001201c5e253$d9cd23b0$4800a8c0@studioa> Pascal Brisset writes: > > It's strange to read about the gumstix here. For a moment I thought > I had my mailing-list folders all mixed-up. I did extensive searches in both mailing lists without finding any gumstix in the erlang world and no erlang in the gumstix world. So yes, as strange as it was for you, so strange and exciting it was to me to hear of another that's walked the road I thought I had to pioneer. Based purely on what should be, and not (yet) on experience, I expect the gumstix and erlang to be a very good combination. Small, lightweight, low power enough for mobile and embedded applications, with the robustness and network distributed power of erlang. It remains to be seen if the concept works as well in practice as in theory, but so far it's actually looking good. > I happened to have the cross-development environment already compiled, > and it only took a couple hours to get R10B-8 running, following your > notes at http://www.corelatus.com/~matthias/erlang_on_860.html . Did you use the same cross-compiling environment to build erlang as suggested by gumstix for development and build-root purposes, or did you set up something different? > > It takes 70 seconds to start erl over NFS and Bluetooth, but then > the shell feels very responsive. > The hardware is a gumstix basix 200f-bt (80mm x 20mm, 8 g, 1 W): I'm awaiting my gumstix connex 400xm-bt with netCF and a robostix. It should be fun. I suspect NFS via Bluetooth was the biggest reason for the 70 seconds, and that loading it from MMC should make a huge difference there. > > My build script and binaries are temporarily here, in case someone > wants to have a look: > http://perso.wanadoo.fr/pascal.brisset/tmp/gumstix-erlang/compile.sh > http://perso.wanadoo.fr/pascal.brisset/tmp/gumstix- > erlang/gumstix_lib_erlang_erts-5.4.10_bin.tgz Ta, I'll most definitely be having a look-see, probably a use-smile :-) > > -- Pascal > Some Q's if you please. Are you using the gumstix erlang in a project, or was it just experimental fun? Are you using any of the GPIOs on the gumstix from Erlang? Did you do any work on HiPE for the port? Have you tried to cluster gumstix-based nodes? With any success? Beyond shell responsiveness, do you have any feedback on the performance of Erlang on the 200MHz PXA250(?) in applications, compared for example to a 200MHz x86. Marthin Laubscher From marthin@REDACTED Sat Nov 5 22:58:17 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Sat, 5 Nov 2005 23:58:17 +0200 Subject: linux Erlang/OTP status In-Reply-To: Message-ID: <001301c5e254$08b8b4a0$4800a8c0@studioa> Daniel Luna wrote: > On Sat, 5 Nov 2005, Marthin Laubscher wrote: > >Daniel Luna wrote: > Aha! Then it's some work to port HiPE. > > I think that should be it. It sounds like fun, which I will "wisely" leave till everything else is done and dusted. It certainly looks like I'll be well advised to start by having a good look at what Pascal Brisset had done. > > Feel free to contact me for further information. Trust me, I will. It might be a little ways down the line for me though if you don't mind. > > /Luna > -- > Daniel Luna | Top reasons that I have a beard: > luna@REDACTED | a) Laziness. > http://www.update.uu.se/~luna/ | b) I can. > Don't look at my homepage (it stinks).| c) I can get away with it. > Marthin Laubscher From pascal.brisset@REDACTED Sun Nov 6 01:55:52 2005 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Sun, 6 Nov 2005 01:55:52 +0100 Subject: linux Erlang/OTP status (gumstix) In-Reply-To: <001201c5e253$d9cd23b0$4800a8c0@studioa> References: <20051105175518.3D4C617347F@postfix3-1.free.fr> <001201c5e253$d9cd23b0$4800a8c0@studioa> Message-ID: <20051106005546.887B817347F@postfix3-1.free.fr> Marthin Laubscher writes: > Did you use the same cross-compiling environment to build erlang as > suggested by gumstix for development and build-root purposes, or did you set > up something different? I used their repository. Type "svn co gumstix-buildroot" and "make". Come back a few hours later, and you have arm-linux-gcc, libc, the bootloader, and the root filesystem image. > Are you using any of the GPIOs on the gumstix from Erlang? Haven't tried, but you can probably use the file-based interface (/proc/gpio/) directly from erlang. > Did you do any work on HiPE for the port? I disabled it. > Have you tried to cluster gumstix-based nodes? With any success? I checked that Erlang distribution works normally between a gumstix node and a x86 node. > Beyond shell responsiveness, do you have any feedback on the performance of > Erlang on the 200MHz PXA250(?) in applications, compared for example to a > 200MHz x86. Here's a quick apples-to-oranges comparison on two random benchmarks: System Laptop Gumstix CPU Pentium M PXA255 Freq 900 MHz 200 MHz Bogomips 1765 200 Cache 1024 KiB 32+32 KiB Mem 256 MiB 64 MiB Kernel 2.6.3 2.6.10 OTP R10B-7 R10B-8 ackerman(3,11) 13 s 412 s cheap-concurrency(3000) 0.6 s 26 s That's pretty good if you also take the size, weight, power consumption and price into account. Maybe someone can provide figures for a similar x86 embedded SBC or a Blackdog. -- Pascal From matthias@REDACTED Sun Nov 6 10:12:06 2005 From: matthias@REDACTED (Matthias Lang) Date: Sun, 6 Nov 2005 10:12:06 +0100 Subject: linux Erlang/OTP status In-Reply-To: <436CB0A1.3010201@hq.idt.net> References: <20051104213546.GT15817@delora.autosys.us> <000b01c5e18e$1df617c0$4800a8c0@studioa> <17260.22341.402451.562525@antilipe.corelatus.se> <436CB0A1.3010201@hq.idt.net> Message-ID: <17261.51430.281705.72270@antilipe.corelatus.se> Matthias> > See also the Erlang FAQ, http://www.erlang.org/faq/ Thanks to Serge for pointing out that the above link gets you nowhere. I should have written http://www.erlang.org/faq.html Matthias From chris.double@REDACTED Sun Nov 6 14:18:59 2005 From: chris.double@REDACTED (doublec) Date: Sun, 6 Nov 2005 14:18:59 +0100 Subject: ex11 version of XGetImage? References: Message-ID: <20051106131859.CC444590AF@bang.trapexit.org> Is there the facility in ex11 to do what XGetImage does in xlib? What I want to do is get a screen shot or an image of a portion of the screen. Any pointers? _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From alex.arnon@REDACTED Sun Nov 6 17:25:33 2005 From: alex.arnon@REDACTED (Alex Arnon) Date: Sun, 6 Nov 2005 18:25:33 +0200 Subject: Is concurrency hard? In-Reply-To: <9fb43f4f8b546498e10930c5ae356cfe@tombob.com> References: <4368C402.3060306@ericsson.com> <9fb43f4f8b546498e10930c5ae356cfe@tombob.com> Message-ID: <944da41d0511060825v19840710r94c2ff3bd0b443d2@mail.gmail.com> On 11/5/05, Robert Raschke wrote: [snip] I get the impression a lot of people think about where and how to > store data when programming (i.e., how do I manipulate the data), > instead of concentrating on the transformational aspect (i.e., what am > I doing to the data). > > I think that as long as you are concentrating on manually moving data > about in piecemeal fashion, you are unlikely to notice any > opportunities for making use of concurrency. > > I feel that the best way of noticing concurrency in your application > is by carefully crafting the vocabulary that describes your problem > and its solution. Very often you will find that storage does not rate > very highly in such a vocabulary, allowing you to concentrate on the > functional ascpect of you application. Even more fundamentally, if > your vocabulary does end up with words for things that need storage, > you can be sure that they are the ones that will limit your > concurrency. [/snip] Thank you for so eloquently putting that into words, I've been trying to properly verbalize this for a while :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From alex.arnon@REDACTED Sun Nov 6 19:41:58 2005 From: alex.arnon@REDACTED (Alex Arnon) Date: Sun, 6 Nov 2005 20:41:58 +0200 Subject: Microsoft's Singularity = C# + Erlang + UBF(B)? Message-ID: <944da41d0511061041y4e46f404mccbbcd5977c3f536@mail.gmail.com> Muhaha :) http://research.microsoft.com/os/singularity/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From spearce@REDACTED Sun Nov 6 21:57:07 2005 From: spearce@REDACTED (Shawn Pearce) Date: Sun, 6 Nov 2005 15:57:07 -0500 Subject: Microsoft's Singularity = C# + Erlang + UBF(B)? In-Reply-To: <944da41d0511061041y4e46f404mccbbcd5977c3f536@mail.gmail.com> References: <944da41d0511061041y4e46f404mccbbcd5977c3f536@mail.gmail.com> Message-ID: <20051106205707.GB30581@spearce.org> Alex Arnon wrote: > Muhaha :) > > http://research.microsoft.com/os/singularity/ I haven't finished reading the paper linked from LtU, but I had much the same reaction when I started working through the introduction. However I have found programming in Erlang to be more enjoyable than say Java or C#. So it is not really the same. :-) -- Shawn. : And it goes against the grain of building small tools. Innocent, Your Honor. Perl users build small tools all day long. -- Larry Wall in <1992Aug26.184221.29627@REDACTED> From marthin@REDACTED Sun Nov 6 22:49:50 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Sun, 6 Nov 2005 23:49:50 +0200 Subject: Is concurrency hard? In-Reply-To: <9fb43f4f8b546498e10930c5ae356cfe@tombob.com> Message-ID: <000601c5e31c$07530d40$4800a8c0@studioa> Micky Latowicki writes: > Is concurrency inherently hard? Concurrency itself is extremely easy - it's how the world works. What difficulty people experience with concurrency stems from how our technology patriarchs chose to deal with their limitations. "We" made two fundamental choices (called breakthroughs at the time) that went directly against reality and consequently still cripple almost every aspect of computing today. a) We represent things with digital approximations. b) We forced things into sequences of instructions. (You should easily recognise that those two things are seen as the cornerstones of computing.) This is not the time and place to wonder about where analogue computing could have been today if all the money that was spent on digital computing was spent on the analogue branch. Micky's question does however require that we look a little deeper in to the sequential aspect. Most programmers are first introduced to programming in the sequential programming paradigm (COBOL, Fortran, C, PL/I, Pascal, BASIC, ADA, Java, etc.) To some this is easier than to others, but eventually student programmers learn to align their thinking, reasoning and approach to solving problems to that mindset, and they become programmers. Once set, many would never grow beyond that mindset, not because they're stubborn or stupid, but because the mindset dictates that everything you encounter should be "brought back to a sequential set of instructions" and so even when faced with different opportunities and environments, the "programmed behaviour" is to force everything back to sequential thinking. Programming techniques allowing us to address problems in a different manner, even the successful ones, require that we adapt to that mindset before we can hope to be effective in solving problems. Some examples: 1) SQL: To harness the power of the relational database, we needed to think in terms of sets and set theory. Once that mindset is in place, the technique is so powerful that I was able to write two and a half telecommunications billing systems purely inside the database. But the gravitational pull of the masses of people and environments that don't grasp set theory is so strong that the vast majority of relational database activity ends up with very little usage of set theory and a lot of sequential processing of data. Had the internet spread as much at the time as now, we'd have all seen just how many times the "Is RDBMS/SQL/Set Theory inherently hard?" issue was in fact raised. 2) Event driven programming was another such technique that tripped up countless very experienced programmers (and made life quite difficult for the Windows and X11 worlds). But many did get it relatively quickly, in particular the young and open-minded folk that Microsoft targeted at the time - which accounts for a large part of it's success. Judging at the time of it's rise who got into the swing of things and who stayed clear, the only reason "Is Event Driven Programming inherently hard?" was asked perhaps a little less often, was the ego's of the old hands hating how the "youngens" took off. 3) Object orientation: Wow, didn't that take world through turmoil? The extent to which the original concept was enhanced or retarded by traditional sequential thinking, is another debate not worth having. Nevertheless, Micky might as well have asked "Is OO inherently hard?" In each of the example cases, including concurrency, the answer is the same: No, it's not inherently hard. But it is hard to ignore our bad habits. It is our bad habits, entrenched ways of thinking, of approximating the world around us in order to deal with it inside a computer. That is what's making it seem hard. > > I've seen it stated elsewhere that writing concurrent software > cannot be made easy. The author was writing in a context of a very > different approach to concurrent programming than erlang's and I was > curious if erlang developers feel the same way. If so, then what's > hard about it when working with erlang? That's true in the same way as there being no such thing as a probability of 1 or 0. For my liking, I find far too little reference to C.A.R. Hoare's CSP in the Erlang community. Strange as it might seem, I "learned to program in Erlang" a decade before the language was conceived. How? I learned to express concurrency solutions in CSP at varsity in the mid 80's. At the time, CSP was a notation, a concept, a specification language, an approach to concurrency. I was over the moon with excitement a decade or so later when I learned that (although largely extended with a lisp-like syntax and other elements to make it practical) there now was a way of actually executing CSP - Erlang. CSP has formed a large part of my foundation to conceptualise concurrent processes interacting, each of them sequential in nature, interacting. With that, concurrency is easy, without it, a mess. Communicating Sequential Processes (CSP) is still alive and kicking today and what's become of the 1985 textbook is now available at http://www.usingcsp.com/ for free. In case anybody wondered, no, beyond what the original book meant to me 20 years ago, I am in no way affiliated CSP, Oxford, Tony Hoare or Jim Davies. Maybe CSP's silent disfavour has something to do with what became of its author - according to the usingCSP website, he's at Microsoft Research. Marthin Laubscher From harveyd@REDACTED Mon Nov 7 02:10:22 2005 From: harveyd@REDACTED (Dale Harvey) Date: Mon, 7 Nov 2005 01:10:22 +0000 Subject: Variable variables within an mnemosyne query Message-ID: I want to be able to define dynamic field / clause lists to be entered into a query and cant seem to get it down, example : Entity = atable, FieldList = "S.name ,S.address", ClauseList = "S.name = \"me\" ", Q = query [ FieldList || S <- table(Entity), ClauseList ] end, Field/Clause lists have to be string, otherwise it will start looking for the bound variable so I need a way of having the string evaluated within the query so the query would evaluate as Q = query [ S.name ,S.address || S <- table(atable), S.name= "me" ] end, in other langages I have eval to do this, or $$ in php, but I cant seem to find a way of doing this in erlang Thanks in advance Dale -------------- next part -------------- An HTML attachment was scrubbed... URL: From ok@REDACTED Mon Nov 7 02:38:30 2005 From: ok@REDACTED (Richard A. O'Keefe) Date: Mon, 7 Nov 2005 14:38:30 +1300 (NZDT) Subject: Microsoft's Singularity = C# + Erlang + UBF(B)? Message-ID: <200511070138.jA71cUfO024517@atlas.otago.ac.nz> Alex Arnon wrote: > Muhaha :) > > http://research.microsoft.com/os/singularity/ When I try to read that, I get "The specified request cannot be executed from current Application Pool" It's a Microsoft site. Why am I not surprised? From ok@REDACTED Mon Nov 7 02:49:23 2005 From: ok@REDACTED (Richard A. O'Keefe) Date: Mon, 7 Nov 2005 14:49:23 +1300 (NZDT) Subject: Is concurrency hard? Message-ID: <200511070149.jA71nNOO024637@atlas.otago.ac.nz> 1) SQL: To harness the power of the relational database, we needed to think in terms of sets and set theory. Which the SQL designers didn't "get". (Amongst other things, SQL "relations" are not sets.) 2) Event driven programming was another such technique that tripped up countless very experienced programmers (and made life quite difficult for the Windows and X11 worlds). But many did get it relatively quickly, in particular the young and open-minded folk that Microsoft targeted at the time Microsoft? Event-driven programming came from Apple who got it from Xerox who got it from real-time programmers. Maybe CSP's silent disfavour has something to do with what became of its author - according to the usingCSP website, he's at Microsoft Research. What silent disfavour? Occam was based on it, and there was quite an enthusiastic Occam/Transputer community for a while. The real problem with CSP was that people drifted off into the development of rival systems (CCS, mu-calculus, &c) and doing ever more intricate mathematics about it. I had a student once at RMIT who did his thesis on designing a concurrent object-oriented programming language and producing an executable specification of it (using a CSP-ish extension of Standard ML). He then tried to prove something or other about this specification correct using bisimulation, and it was brutally hard. (If he had had the benefit of advice from someone who had done it a few times before, it might not have been. As it was, I found it as brutally hard as he did.) Several specification languages have picked up CSP ideas. From anindya@REDACTED Mon Nov 7 07:56:21 2005 From: anindya@REDACTED (Anindya Mozumdar) Date: Mon, 07 Nov 2005 12:26:21 +0530 Subject: Web services Message-ID: <436EFA95.9030407@picopeta.com> Hi, I am relatively new to both Erlang and Web Services, so pardon my rather silly question - Are there are any API's/implementations in Erlang for Web Services (SOAP, WSDL and UDDI), like the ones readily avaiable in Java ? Googling did not help that much - though I went through one of the older presentations regarding web services. I am aware that there is a project listed in erlang projects about web services, and idx-tsunami, but I am not sure I want that. Thanks, Anindya. From joe.armstrong@REDACTED Mon Nov 7 09:10:53 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Mon, 7 Nov 2005 09:10:53 +0100 Subject: ex11 version of XGetImage? Message-ID: No /Joe > -----Original Message----- > From: doublec [mailto:chris.double@REDACTED] > Sent: den 6 november 2005 14:19 > To: erlang-questions@REDACTED > Subject: ex11 version of XGetImage? > > > > Is there the facility in ex11 to do what XGetImage does in > xlib? What I want to do is get a screen shot or an image of a > portion of the screen. Any pointers? > _________________________________________________________ > Sent using Mail2Forum (http://m2f.sourceforge.net) > From chandrashekhar.mullaparthi@REDACTED Mon Nov 7 09:17:35 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Mon, 7 Nov 2005 08:17:35 +0000 Subject: Web services In-Reply-To: <436EFA95.9030407@picopeta.com> References: <436EFA95.9030407@picopeta.com> Message-ID: On 07/11/05, Anindya Mozumdar wrote: > Hi, > I am relatively new to both Erlang and Web Services, so pardon my > rather silly question - Are there are any API's/implementations in > Erlang for Web Services (SOAP, WSDL and UDDI), like the ones readily > avaiable in Java ? > There is a basic soap-client and soap-server written by Erik Reitsma. I have version 0.2 of it and I can send it to you if you want it. But it is quite basic. The good news is that the most of the tools you need to build Web Services are already available :-) You have yaws/inets for a webserver, ibrowse/inets for a HTTP client and xmerl for XML parsing. You just have to implement the bits you need from various standards :-) cheers Chandru From dpw@REDACTED Fri Nov 4 19:11:33 2005 From: dpw@REDACTED (David Walker) Date: Fri, 4 Nov 2005 13:11:33 -0500 Subject: POPL 2006 Call for Participation Message-ID: <200511041811.jA4IBiDE029660@bluebox.CS.Princeton.EDU> ********************************************************************* * ACM SIGPLAN-SIGACT Symposium * * on * * Principles of Programming Languages * * * * January 11-13, 2006 * * Charleston Place Hotel * * Charleston, South Carolina * *? * * Call for Participation * * * * http://www.cs.princeton.edu/~dpw/popl/06/ * ********************************************************************* Important dates * Early Registration Deadline:?December 10, 2005 * Hotel Reservation Deadline: December 10, 2005 * Conference: January 11-13, 2006 Scope The annual Symposium on Principles of Programming Languages is a forum for the discussion of fundamental principles and important innovations in the design, definition, analysis, transformation, implementation and verification of programming languages, programming systems, and programming abstractions. Both experimental and theoretical papers on principles and innovations are welcome, ranging from formal frameworks to reports on practical experiences. Invited Speakers * James McKinna, St Andrews University * Martin Odersky, Ecole Polytechnique F?d?rale de Lausanne * Tim Sweeney, Epic Games Inc Conference Registration Registration is now open! To register, please go to our registration site at (http://www.regmaster.com/popl2006.html) Early registration for a reduced fee is available until December 10, 2005. Don't delay! Hotel Room Reservation We recommend staying at the Charleston Place Hotel, which is where the conference will be held. Our group rate for the hotel is $155/night. (This does not include the 12.5% state tax on hotels.) Please mention the group name "ACM POPL 2006 Conference" when reserving a room. You may reserve rooms by phone, fax or email, but not using the web. * phone: (800) 831-3490 -- Staffed Monday through Friday, 8:00 am to 6:00 pm * fax: (843) 724-7215 * email: groupres@REDACTED The hotel website is http://www.charlestonplace.com/web/ocha/ocha_a1a_splash.jsp Student Attendees Students who have a paper accepted for the conference are offered student membership of SIGPLAN free for one year. As members of SIGPLAN they may apply for travel fellowships from the PAC fund. Conference Chair Greg Morrisett Harvard University 33 Oxford Street Cambridge, MA 02138 USA greg at eecs dot harvard dot edu Program Chair Simon Peyton Jones Microsoft Research Ltd, 7 JJ Thomson Ave, Cambridge CB3 0FB, UK simonpj@REDACTED Program Committee * Giuseppe Castagna, CNRS, LIENS, ENS Paris * Manuel Chakravarty, University of New South Wales * Karl Crary, Carnegie Mellon University * Sophia Drossopoulou, Imperial College London * Paul Feautrier, ENS Lyon * Carl A Gunter, University of Illinois * Rajiv Gupta, University of Arizona * Fritz Henglein, DIKU, University of Copenhagen * Trevor Jim, AT&T * Shriram Krishnamurthi, Brown University * Gary T Leavens, Iowa State * Robert O'Callahan, Novell * Peter O'Hearn, Queen Mary, University of London * Andreas Podelski, Max Planck Institute, Saarbr?cken * Andrei Sabelfeld, Chalmers University * Kostis Sagonas, Uppsala University * Davide Sangiorgi, University of Bologna * Philip Wadler, University of Edinburgh * Stephanie Weirich, University of Pennsylvania * Hongwei Xi, Boston University Affiliated Events * Foundations of Object Oriented Languages (FOOL) * January 14, 2006 * Partial Evaluation and Semantics-Based Program Manipulation (PEPM) * January 9-10, 2006 * Practical Applications of Declarative Languages (PADL) * January 9-10, 2006 * Programming Language Technologies for XML (PLAN-X) * January 14, 2006 * Semantics, Program Analysis and Computing Environments for Memory Management (SPACE 2006) * January 14, 2006 * Verification, Model Checking and Abstract Interpretation (VMCAI) * January 8-10, 2006 POPL 2006 Preliminary Program Wednesday January 11, 2006 08:30 Invited talk Martin Odersky Ecole Polytechnique F?d?rale de Lausanne 10:00 Staged Allocation: A Compositional Technique for Specifying and Implementing Procedure Calling Conventions Reuben Olinsky, Christian Lindig and Norman Ramsey Harvard University 10:25 A Hierarchical Model of Data Locality Chengliang Zhang, Yutao Zhong, Mitsunori Ogihara, Chen Ding University of Rochester 10:50 Simplifying Reductions Gautam Gupta and Sanjay Rajopadhye Colorado State University 11:40 Formal certification of a compiler back-end, or: programming a compiler with a proof assistant Xavier Leroy INRIA Rocquencourt 12:05 Engineering with Logic: HOL Specification and Symbolic-Evaluation Testing for TCP Implementations Steve Bishop, Matthew Fairbairn, Michael Norrish, Peter Sewell, Michael Smith and Keith Wansbrough University of Cambridge 14:00 Decidability and Proof Systems for Language-Based Noninterference Relations Mads Dam KTH 14:25 On Flow-Sensitive Security Types Sebastian Hunt and David Sands City University 14:50 A Logic for Information Flow Analysis of Pointer Programs Torben Amtoft, Sruthi Bandhakavi and Anindya Banerjee Kansas State University 15:45 Polymorphic Regular Tree Types and Patterns J?r?me Vouillon CNRS and Universit? Paris 7 16:10 Verifying Properties of Well-Founded Linked Lists Shuvendu K. Lahiri and Shaz Qadeer Microsoft Research 16:35 Environmental Analysis via Delta-CFA Matthew Might and Olin Shivers Georgia Institute of Technology 17:25 Small Bisimulations for Reasoning About Higher-Order Imperative Programs Vasileios Koutavas and Mitchell Wand Northeastern University 17:50 A Fixpoint Calculus for Local and Global Program Flows Rajeev Alur, Swarat Chaudhuri, and P. Madhusudan University of Pennsylvania Thursday January 12, 2006 08:30 Invited talk Tim Sweeney Epic Games Inc 10:00 Adventures in Time and Space James S. Royer Syracuse University 10:25 N-Synchronous Kahn Networks Albert Cohen, Christine Eisenbeis, Mard Duranton, Claire Pagetti, Florence Plateau, and Marc Pouzet INRIA Futurs 10:50 Compiler-Directed Channel Allocation for Saving Power in On-Chip Networks Guangyu Chen, Feihui Li, and Mahmut Kandemir Pennsylvania State University 11:40 Fast and Loose Reasoning is Morally Correct Nils Anders Danielsson, Jeremy Gibbons, John Hughes, and Patrik Jansson Chalmers University of Technology 12:05 Modular Set-Based Analysis from Contracts Philippe Meunier, Robert Bruce Findler, and Matthias Felleisen Northeastern University 14:00 Stratified type inference for generalized algebraic data types Fran?ois Pottier and Yann R?gis-Gianas INRIA 14:25 Hybrid Type Checking Cormac Flanagan UCSC 14:50 A Polymorphic Modal Type System for Lisp-like Multi-Staged Languages Ik-Soon Kim, Kwangkeun Yi and Cristiano Calcagno Seoul National University Friday January 13, 2006 08:30 Invited talk James McKinna St Andrews University 10:00 A Virtual Class Calculus Erik Ernst, Klaus Ostermann and William R. Cook University of Aarhus 10:25 Interruptible Iterators Jed Liu, Aaron Kimball and Andrew C. Myers Cornell University 10:50 Specifying C++ concepts Gabriel Dos Reis Bjarne Stroustrup Texas A&M University 11:40 Frame rules from answer types for code pointers Hayo Thielecke University of Birmingham 12:05 Certified Assembly Programming with Embedded Code Pointers Zhaozhong Ni and Zhong Shao Yale University 14:00 Associating Synchronization Constraints with Data in an Object-Oriented Language Mandana Vaziri, Frank Tip and Julian Dolby IBM Research 14:25 Autolocker: Synchronization Inference for Atomic Sections Bill McCloskey, Feng Zhou, David Gay and Eric Brewer UC Berkeley 14:50 Protecting Representation with Effect Encapsulation Yi Lu and John Potter UNSW 15:45 A Verifiable SSA Program Representation for Aggressive Compiler Optimization Vijay S Menon, Neal Glew, Brian R Murphy, Andrew McCreight, Tatiana Shpeisman, Ali-Reza Adl-Tabatabai and Leaf Petersen Intel Corporation 16:10 The Essence of Command Injection Attacks in Web Applications Zhendong Su and Gary Wassermann University of California, Davis 16:35 Harmless Advice Daniel Dantas and David Walker Princeton University 17:00 The Next 700 Data Description Languages Kathleen Fisher, Yitzhak Mandelbaum and David Walker AT&T Research and Princeton University From renyix1@REDACTED Sun Nov 6 08:11:41 2005 From: renyix1@REDACTED (Renyi Xiong) Date: Sat, 05 Nov 2005 23:11:41 -0800 Subject: clusters In-Reply-To: <4367FBF1.6050006@telia.com> Message-ID: Thanks all, It really saves us time to well understand this ELANG/Mnesia stuff. Renyi. >From: Robert Virding >To: Hakan Mattsson >CC: Renyi Xiong , erlang-questions@REDACTED, >joe.armstrong@REDACTED, bdoyle@REDACTED >Subject: Re: clusters >Date: Wed, 02 Nov 2005 00:36:17 +0100 > >You will find that linear hashing was also used internally for ets tables. >It is also used in the standard modules dict and sets. where it is >implemented in Erlang. There is (was) also a reference to the the original >paper I discovered which describes it. It is truly impressive being both >dynamic as yu grow and shrink the table. > >Robert > >Hakan Mattsson wrote: > >>Take a look at the "linear hashing" algorithm and its >>relative "linear hashing star". With linear hashing you >>may add nodes smoothly without rebuilding the entire >>database. >> >>We are using that for fragmented tables in Mnesia: >> >> http://erlang.se/doc/doc-5.4.8/lib/mnesia-4.2.2/doc/html/part_frame.html >> >>When you add a new fragment you only need to split one >>of the old fragments, regardless of the total number of >>existing fragments. >> >>If you plan to outgrow Mnesia, it might be a good idea >>to customize the hash algorithm for fragmented tables >>with one that fits your needs: >> >> >>http://erlang.se/doc/doc-5.4.8/lib/mnesia-4.2.2/doc/html/application_frame.html >> >>I don't know how the "chord" algorithm works, but if it >>can handle addition of new nodes smoothly, it might be a >>good candidate for your customized mnesia_frag_hash >>implementation. >> >>/H?kan >> >>On Fri, 28 Oct 2005, Renyi Xiong wrote: >> >>RX> Date: Fri, 28 Oct 2005 15:37:53 -0700 >>RX> From: Renyi Xiong >>RX> To: erlang-questions@REDACTED >>RX> Cc: joe.armstrong@REDACTED, bdoyle@REDACTED >>RX> Subject: RE: clusters >>RX> RX> Hello Joe, >>RX> RX> If I understand correctly, we need to rebuild the whole mnesia >>RX> database each time we add a new node pair. Cause the hash key >>RX> is dependant on the number of nodes. Is that right? >>RX> RX> Renyi. >>RX> RX> RX> > From: "Joe Armstrong (AL/EAB)" >>RX> > To: "Renyi Xiong" >>RX> > CC: >>RX> > Subject: RE: clusters >>RX> > Date: Mon, 24 Oct 2005 09:59:22 +0200 >>RX> > RX> > Hello Renyi, >>RX> > RX> > Interesting question - I'll give a short answer (actually why >>not post >>RX> > this to the >>RX> > Erlang list - (to join the list follow the instruction in >>RX> > http://www.erlang.org/faq.html) >>RX> > RX> > I've no idea what the windows 2003 clusting service is :-) >>RX> > RX> > Firstly - let E = # exposed servers. I = # internal servers U >>= # users >>RX> > RX> > questions >>RX> > RX> > - is E + I large >>RX> > - is U very large (ie outside the mnesia adress space?) >>RX> > - how many U's/machine do you allocate >>RX> > RX> > IMHO you can get a long way with a pool of PC's - assume a >>transaction >>RX> > takes >>RX> > 50 ms. CPU - then you can do 1,7 M transactions/day. So if we have >>1.7 M >>RX> > users >>RX> > doing one transaction/day then if each needs (say) 10KB data you'd >>need >>RX> > 17G of data. >>RX> > RX> > ie a low-end PC (1 Gmemory, 2GHz processor, 80 G disk) could >>easly handle >>RX> > (say) 1.5M users >>RX> > RX> > Now you need at least TWO PC's (fault-tolerence) >>RX> > RX> > So if you make them in pairs each pair can handle 1.5M users - >>use a >>RX> > replictaed mnesia >>RX> > disk/ram table. >>RX> > RX> > Now you want to scale up ... >>RX> > RX> > Easy. >>RX> > RX> > The unit of scaling is the pair I have just described. >>RX> > RX> > Call these pairs P1, P2, P3, ..... In each pair the machine >>with the >>RX> > lowest IP is the >>RX> > primary - the other is the take-over machine. >>RX> > RX> > Assume a user makes a HTTP request to the primary in ANY pair >>- all you >>RX> > now need to >>RX> > do is figure out which of the Pairs P1 .. Pn is "the correct >>machine" (ie >>RX> > the one that stores their data) - then send them an HTTP re-direct >>to the >>RX> > correct machine. >>RX> > RX> > If the address space is small you can just use a >>ram-replicated mnesia >>RX> > table for the >>RX> > redicrection table. >>RX> > RX> > If it is very large use consistent hashing. Call the IP >>address of the >>RX> > primaries in >>RX> > in the pairs Ip1, Ip2, ... Ipn. Assume the user Key is K. >>RX> > RX> > Compute hash values of Ip1, Ip2, ... K using some hash >>algorithm. Say >>RX> > md5(X) mod 2^32 >>RX> > RX> > Call theses IpH1, IpH2, .... KH - now the data corresponding >>to key K is >>RX> > found on the >>RX> > machine with hash IpHk where k is the smallest value in IpHk such >>that >>RX> > IpHk > KH >>RX> > RX> > (look up the "chord" algorithm for details) >>RX> > RX> > - here's what I'd do >>RX> > RX> > Phase A >>RX> > - build a basic pair of processors (as I have described) >>RX> > - deploy it (it will take some time to get millions of customers) >>RX> > RX> > Phase B >>RX> > - when you get more customers build more pairs >>RX> > - user mnesia and a ram replicated dispatch table >>RX> > RX> > Phase C >>RX> > - when you get outside the addressing limits of mnesia (G users) >>RX> > - make a layer with consistent hashing to replace the mnesia >>RX> > replicated table >>RX> > RX> > I hope you make it to C >>RX> > RX> > /Joe >>RX> > RX> > RX> > > -----Original Message----- >>RX> > > From: Renyi Xiong [mailto:renyix1@REDACTED] >>RX> > > Sent: den 22 oktober 2005 04:54 >>RX> > > To: Joe Armstrong (AL/EAB) >>RX> > > Cc: bdoyle@REDACTED >>RX> > > Subject: >>RX> > > >>RX> > > >>RX> > > Hello Joe, >>RX> > > >>RX> > > I'm a programmer working for Brian. I have a question for you >>RX> > > in terms of >>RX> > > concurrent programming. >>RX> > > >>RX> > > On client side, customers only see fixed number of servers >>RX> > > based on IP >>RX> > > addresses. My understanding is these exposed servers are >>RX> > > listening for >>RX> > > client requests, dispatching transactions to internal >>RX> > > variable number of >>RX> > > ERLANG servers, collecting replies and forwarding them to clients. >>RX> > > >>RX> > > So one of our jobs here is to write an ERLANG program to >>RX> > > implement a kind of >>RX> > > clustering service or ERLANG already has such kind of server >>RX> > > included?(like >>RX> > > WIndows 2003 clustering service?) >>RX> > > >>RX> > > Thanks, >>RX> > > Renyi. >> From erlang@REDACTED Mon Nov 7 09:31:51 2005 From: erlang@REDACTED (Michael McDaniel) Date: Mon, 7 Nov 2005 00:31:51 -0800 Subject: ODBC port_program_executable_not_found In-Reply-To: <2B025C1778EB94418F186FB802D68EEF1B6B7F@TRITON.pinnaclecredit.com> References: <2B025C1778EB94418F186FB802D68EEF1B6B7F@TRITON.pinnaclecredit.com> Message-ID: <20051107083151.GY15817@delora.autosys.us> On Fri, Nov 04, 2005 at 09:43:27AM -0600, Jeff Einhorn wrote: > It looks like my reply never made it to the list yesterday, so here it is > again. > > > > I don't see the priv directory for the c odbcserver program, so I would assume ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Did odbcserver get created but not installed, or not created at all? ~M > that the odbcserver didn't build correctly. However, when trying to track down > why this is the case I didn't see any odbc build errors during the make > process. > > > > make output > > === Entering application odbc > > make[3]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/src' > > erlc -W +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.0.4"' +' > {parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"odbc-2.0.4"} > ' -o../ebin odbc.erl erlc -W +debug_info -I../include > -D'SERVER_SOFTWARE="odbc/2.0.4"' +'{parse_transform,sys_pre_attributes}' +' > {attribute,insert,app_vsn,"odbc-2.0.4"}' -o../ebin odbc_app.erl > > erlc -W +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.0.4"' +' > {parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"odbc-2.0.4"} > ' -o../ebin odbc_sup.erl sed -e 's;%VSN%;2.0.4;' odbc.app.src > ../ebin/ > odbc.app > > sed -e 's;%VSN%;2.0.4;' odbc.appup.src > ../ebin/ > odbc.appup > make[3]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/src' > > make[3]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' > > make -f x86_64-unknown-linux-gnu/Makefile TYPE=opt > > make[4]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' > > make[4]: Nothing to be done for `opt'. > > make[4]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' > > make[3]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' > > === Skipping subdir doc/src, it is missing === Leaving application odbc > > > > [root@REDACTED ebin]# pwd > > /usr/local/lib/erlang/lib/odbc-2.0.4/ebin > > > > [root@REDACTED ebin]# ls *.beam > > odbc_app.beam odbc.beam odbc_sup.beam > > > > [root@REDACTED src]# ls > > odbc_app.erl odbc.erl odbc_internal.hrl odbc_sup.erl > > > > System specs: > > Redhat AS 4 x86_64 > > OTP R10B-8 > > > > Thanks for your help, > > > > Jeff > > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED [ > mailto:owner-erlang-questions@REDACTED] On Behalf Of tobbe > > Sent: Thursday, November 03, 2005 4:04 AM > > To: erlang-questions@REDACTED > > Subject: ODBC port_program_executable_not_found > > > > > > Perhaps, your Erlang ODBC driver wasn't built properly. > > Can you find the 'odbcserver' executable under the Erlang install directory ? > For example: > > > > # ls /usr/local/lib/erlang/lib/odbc-2.0.4/priv/bin/ > > odbcserver > > > > Cheers, Tobbe > > > > Jeffrey M. Einhorn > Chief Technology Officer > Fourscore Resource Capital, LLC > 952.253.6300 / 888.889.6803 > 952.253.6363 (fax) > Email: jeinhorn@REDACTED > http://www.fourscorellc.com > > Confidentiality Note: This e-mail is intended only for the person to whom it > is addressed and may contain information that is privileged, confidential or > otherwise protected from disclosure. Dissemination, distribution or copying of > this e-mail or the information herein by anyone other than the intended > recipient, or an employee or agent responsible for delivering the message to > the intended recipient, is prohibited. If you have received this e-mail in > error, please destroy the original message and all copies. > > > -- Michael McDaniel Portland, Oregon, USA http://autosys.us +1 503 283 5284 From event@REDACTED Thu Nov 3 14:15:55 2005 From: event@REDACTED (event@REDACTED) Date: Thu, 03 Nov 2005 14:15:55 +0100 Subject: ABModSim - 2nd CFP Message-ID: <436A0D8B.3090103@disco.unimib.it> ABModSim International Workshop on Agent Based Modeling and Simulation (http://www.lintar.disco.unimib.it/ABModSim/) Chairs: Stefania Bandini, Paolo Petta and Giuseppe Vizzari A Symposium of the 18th European Meeting on Cybernetic Science and Systems Research - April 18-21 - University of Vienna (http://www.osgk.ac.at/emcsr/) The notions of agents and multi-agent systems have been widely adopted for the modelling of complex systems in most various contexts, ranging from social sciences, to urban modelling and planning, biology, logistics and production, and many other more. However the concepts behind the term agent are often quite different, as well as the goals of the modelling and simulation activities. This leads to different approaches, methodologies and developed computational systems supporting simulation of the modeled realities. The aim of this workshop is to bring together experiences related to agent based modelling and simulation in different contexts and thus to try to identify common goals and research issues, and to possibly define common methodologies and requirements for computational supports to agent based modelling and simulation. Topics of interest We invite papers on all aspects relating to agent based modeling and simulation, with particular attention to interdisciplinary experiences. Topics of interest include, but are not limited to, the following: - actual MAS-based simulation experiences - agent-based modeling methodologies - generic or domain specific MAS models for simulation - methodologies for the analysis of MAS-based simulation results - multi-agent models for emergent phenomena and self-organization - platforms for agent-based modeling and simulation - verification and validation of MAS-based simulations Important dates: - Deadline for submission (extended!): November 18, 2005 - Notification of acceptance/rejection: December 16, 2005 - Final papers: January 30, 2006 After the workshop, extended versions of selected accepted contributions will be included in a special issue of an international journal. Program Committee (Further members to be announced) - Stefania Bandini (University of Milano-Bicocca - Italy) - Michael Batty (Centre for Advanced Spatial Analysis (CASA) - UK) - Rafael Bordini (University of Durham - UK) - Bastien Chopard (University of Geneva - Switzerland) - Paul Davidsson (Blekinge Institute of Technology - Sweden) - Jan Dijkstra (Eindhoven University of Technology - Netherlands) - Giovanna Di Marzo Serugendo (University of Geneva - Switzerland) - Samira El Yacoubi (University of Perpignan - France) - Nigel Gilbert (University of Surrey - UK) - Nabeel Koshak (Umm Al-Qura University - Saudi Arabia) - Markus Knoflacher (Austrian Research Centre - Austria) - Sara Manzoni (University of Milano-Bicocca - Italy) - Fabien Michel (LIRMM - France) - Andrea Omicini (University of Bologna - Italy) - Paolo Petta (Medical University of Vienna and OFAI - Austria) - Andreas Pyka (University of Augsburg - Germany) - Keith Sawyer (Washington University - USA) - Andreas Schadschneider (University of Cologne - Germany) - Flavio Soares Correa da Silva (University of S. Paulo - Brazil) - Harry Timmermans (Eindhoven University of Technology - Netherlands) - Marco Valente (University of L'Aquila - Italy) - Giuseppe Vizzari (University of Milano-Bicocca - Italy) - Danny Weyns (Katholieke Universiteit Leuven - Belgium) - Franco Zambonelli (Universit? di Modena-Reggio Emilia - Italy) Further Information For more information on the workshop please contact Giuseppe Vizzari (giuseppe.vizzari [at) disco.unimib.it). For information about paper formatting, registration, and accomodation please see the EMCSR06 website (http://www.osgk.ac.at/emcsr/). ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list runned by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From joe.armstrong@REDACTED Mon Nov 7 09:34:15 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Mon, 7 Nov 2005 09:34:15 +0100 Subject: Erlang on the Blackdog Message-ID: That's really cool. I've only seen the blackdog advertised in the states Have you seen it for sale in Europe? /Joe > -----Original Message----- > From: doublec [mailto:chris.double@REDACTED] > Sent: den 4 november 2005 11:56 > To: erlang-questions@REDACTED > Subject: Erlang on the Blackdog > > > > The 'Blackdog' device has been mention on this list before: > > http://forums.trapexit.org:81/phpBB/viewtopic.php?t=5142 > > I've compiled Erlang and Yaws to run on it, the binaries are here: > > http://www.bluishcoder.co.nz/2005/11/erlang-and-yaws-on-blackdog.html > > It took an overnight compile to get things compiled using the > QEMU based emulator but it runs nicely on the device itself. > Yaws seems to work fine. I'm going to try on 'ex11' and see > how that goes. The blackdog doesn't have a display, it uses > an X client on the host machine for that purpose. > _________________________________________________________ > Sent using Mail2Forum (http://m2f.sourceforge.net) > From ulf.wiger@REDACTED Mon Nov 7 09:37:03 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 7 Nov 2005 09:37:03 +0100 Subject: Web services Message-ID: One thing notably missing in this regard is support for XMLSchema. Any takers? (: /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru > Sent: den 7 november 2005 09:18 > To: Anindya Mozumdar > Cc: erlang-questions@REDACTED > Subject: Re: Web services > > On 07/11/05, Anindya Mozumdar wrote: > > Hi, > > I am relatively new to both Erlang and Web Services, so > pardon my > > rather silly question - Are there are any API's/implementations in > > Erlang for Web Services (SOAP, WSDL and UDDI), like the > ones readily > > avaiable in Java ? > > > > There is a basic soap-client and soap-server written by Erik Reitsma. > I have version 0.2 of it and I can send it to you if you want > it. But it is quite basic. The good news is that the most of > the tools you need to build Web Services are already > available :-) You have yaws/inets for a webserver, > ibrowse/inets for a HTTP client and xmerl for XML parsing. > You just have to implement the bits you need from various > standards :-) > > cheers > Chandru > From rasmussen.bryan@REDACTED Mon Nov 7 10:12:57 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Mon, 7 Nov 2005 10:12:57 +0100 Subject: Web services In-Reply-To: References: Message-ID: <3bb44c6e0511070112h516bbd94ne6b97455fdc5c9c1@mail.gmail.com> I would think the best way to handle it, given the size of xml schema, and the numerous incomplete implementations out there, is to write a binding to some other implementation. either libxsd or xsv would be my suggestion. Or maybe do like was done with xslt, write an XSD to Erlang transfromer. On 11/7/05, Ulf Wiger (AL/EAB) wrote: > > One thing notably missing in this regard is support for > XMLSchema. > > Any takers? (: > > /Uffe > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru > > Sent: den 7 november 2005 09:18 > > To: Anindya Mozumdar > > Cc: erlang-questions@REDACTED > > Subject: Re: Web services > > > > On 07/11/05, Anindya Mozumdar wrote: > > > Hi, > > > I am relatively new to both Erlang and Web Services, so > > pardon my > > > rather silly question - Are there are any API's/implementations in > > > Erlang for Web Services (SOAP, WSDL and UDDI), like the > > ones readily > > > avaiable in Java ? > > > > > > > There is a basic soap-client and soap-server written by Erik Reitsma. > > I have version 0.2 of it and I can send it to you if you want > > it. But it is quite basic. The good news is that the most of > > the tools you need to build Web Services are already > > available :-) You have yaws/inets for a webserver, > > ibrowse/inets for a HTTP client and xmerl for XML parsing. > > You just have to implement the bits you need from various > > standards :-) > > > > cheers > > Chandru > > > From chris.double@REDACTED Mon Nov 7 10:28:25 2005 From: chris.double@REDACTED (Chris Double) Date: Mon, 7 Nov 2005 22:28:25 +1300 Subject: Erlang on the Blackdog In-Reply-To: References: Message-ID: On 11/7/05, Joe Armstrong (AL/EAB) wrote: > I've only seen the blackdog advertised in the states > > Have you seen it for sale in Europe? No, I ordered it from the States and got it shipped to NZ. Their shipping price is on the high side though - $60 US - for such a small device. Cute packaging though. It comes in a dog food bag. Chris. From joe.armstrong@REDACTED Mon Nov 7 10:31:12 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Mon, 7 Nov 2005 10:31:12 +0100 Subject: Is concurrency hard? Message-ID: > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of > Marthin Laubscher > Sent: den 6 november 2005 22:50 > To: erlang-questions@REDACTED > Subject: RE: Is concurrency hard? > cut ... > Maybe CSP's silent disfavour has something to do with what > became of its > author - according to the usingCSP website, he's at Microsoft > Research. "silent" yes - "disfavour" no "silent admiration" would be more to the point. In http://www.erlang.org/ml-archive/erlang-questions/200507/msg00172.html I said "The CSP work is probably the best ever way describing systems" hardly disfavour. CSP is howether not a programming *language* - it's a notation. And I'm not sure I'd like "executable CSP" as a programming language. I mentioned some of the problems in http://www.erlang.org/ml-archive/erlang-questions/200508/msg00340.html Tony has a very nice lecture at http://research.microsoft.com/~thoare/StructuredConcurrent%20programming_files/v3_document.htm Where he extols the virtues of "concurrency without shared memory" - and some programming language constructs that would map very nicely into Erlang. Tony is also "silent about Erlang" - but I wouldn't ready either approval or disapproval into his silence. As for him being at Microsoft this can surely only be good - he might be able to teach the guys at MS how to structure their code. He does, after all, say that: "Concurrency is best regarded as a programming structuring principle" So if the MS guys heed his words the world's most popular OS might one day improve. << Note: criticising MS's OS should in no way be thought of as endorsing other, less popular OS's, they are merely less bad ... >> /Joe > > Marthin Laubscher > > > > > From joe.armstrong@REDACTED Mon Nov 7 10:33:26 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Mon, 7 Nov 2005 10:33:26 +0100 Subject: Web services Message-ID: How about rnc? - I have a relax NG verifyer (in Erlang) which I might be persuaded to part with. /Joe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Ulf Wiger > (AL/EAB) > Sent: den 7 november 2005 09:37 > To: chandru; Anindya Mozumdar > Cc: erlang-questions@REDACTED > Subject: RE: Web services > > > > One thing notably missing in this regard is support for > XMLSchema. > > Any takers? (: > > /Uffe > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru > > Sent: den 7 november 2005 09:18 > > To: Anindya Mozumdar > > Cc: erlang-questions@REDACTED > > Subject: Re: Web services > > > > On 07/11/05, Anindya Mozumdar wrote: > > > Hi, > > > I am relatively new to both Erlang and Web Services, so > > pardon my > > > rather silly question - Are there are any > API's/implementations in > > > Erlang for Web Services (SOAP, WSDL and UDDI), like the > > ones readily > > > avaiable in Java ? > > > > > > > There is a basic soap-client and soap-server written by > Erik Reitsma. > > I have version 0.2 of it and I can send it to you if you want > > it. But it is quite basic. The good news is that the most of > > the tools you need to build Web Services are already > > available :-) You have yaws/inets for a webserver, > > ibrowse/inets for a HTTP client and xmerl for XML parsing. > > You just have to implement the bits you need from various > > standards :-) > > > > cheers > > Chandru > > > From matthias@REDACTED Mon Nov 7 10:50:26 2005 From: matthias@REDACTED (Matthias Lang) Date: Mon, 7 Nov 2005 10:50:26 +0100 Subject: Is concurrency hard? In-Reply-To: <000601c5e31c$07530d40$4800a8c0@studioa> References: <9fb43f4f8b546498e10930c5ae356cfe@tombob.com> <000601c5e31c$07530d40$4800a8c0@studioa> Message-ID: <17263.9058.91080.739762@antilipe.corelatus.se> Marthin Laubscher writes: > "We" made two fundamental choices (called breakthroughs at the > time) that went directly against reality and consequently still > cripple almost every aspect of computing today. > a) We represent things with digital approximations. [...] > This is not the time and place to wonder about where analogue computing > could have been today if all the money that was spent on digital computing > was spent on the analogue branch. When you say something is 'analog', do you mean that the parameters of the system all occupy a continuous space? Or do you mean something else? Matthias From mickael.remond@REDACTED Mon Nov 7 10:49:20 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Mon, 7 Nov 2005 10:49:20 +0100 Subject: Erlang on the Blackdog In-Reply-To: References: <20051104105550.5922F59075@bang.trapexit.org> Message-ID: <20051107094920.GA13691@memphis.process-one.net> * Joe Armstrong (AL/EAB) [2005-11-07 09:34:15 +0100]: > That's really cool. > > I've only seen the blackdog advertised in the states > > Have you seen it for sale in Europe? I ordered it from the Realm company in the states. I will bring it with me during my stay in Stockholm. I can do demonstration of this nice little toy during my stay and during the EUC. -- Micka?l R?mond From twanvds@REDACTED Mon Nov 7 11:04:13 2005 From: twanvds@REDACTED (Twan van der Schoot) Date: Mon, 7 Nov 2005 11:04:13 +0100 Subject: Web services In-Reply-To: Message-ID: Hi All, As a specialist in functional programming, Philip Wadler (http://homepages.inf.ed.ac.uk/wadler/) (who has a particular interest in XML :) wrote a number of papers with an angle which could be of interest to the intrepid Erlang programmer embarking on the implementation of a XML validation tool using XML Schema in Erlang. /Twan > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Ulf Wiger > (AL/EAB) > Sent: maandag 7 november 2005 9:37 > To: chandru; Anindya Mozumdar > Cc: erlang-questions@REDACTED > Subject: RE: Web services > > > > One thing notably missing in this regard is support for > XMLSchema. > > Any takers? (: > > /Uffe > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru > > Sent: den 7 november 2005 09:18 > > To: Anindya Mozumdar > > Cc: erlang-questions@REDACTED > > Subject: Re: Web services > > > > On 07/11/05, Anindya Mozumdar wrote: > > > Hi, > > > I am relatively new to both Erlang and Web Services, so > > pardon my > > > rather silly question - Are there are any API's/implementations in > > > Erlang for Web Services (SOAP, WSDL and UDDI), like the > > ones readily > > > avaiable in Java ? > > > > > > > There is a basic soap-client and soap-server written by Erik Reitsma. > > I have version 0.2 of it and I can send it to you if you want > > it. But it is quite basic. The good news is that the most of > > the tools you need to build Web Services are already > > available :-) You have yaws/inets for a webserver, > > ibrowse/inets for a HTTP client and xmerl for XML parsing. > > You just have to implement the bits you need from various > > standards :-) > > > > cheers > > Chandru > > > > From mats.cronqvist@REDACTED Mon Nov 7 11:13:17 2005 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Mon, 07 Nov 2005 11:13:17 +0100 Subject: new jungerl lib Message-ID: <436F28BD.8050406@ericsson.com> checked in a new lib in jungerl; prf. it's a "framework for loading and monitoring performance measuring code to remote node". basically some performance mesuring tools from the AXD. not tested outside the AXD, your mileage may vary. mats From marthin@REDACTED Mon Nov 7 11:30:43 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Mon, 7 Nov 2005 12:30:43 +0200 Subject: Is concurrency hard? In-Reply-To: <17263.9058.91080.739762@antilipe.corelatus.se> Message-ID: <200511071030.jA7AUfv26505@hades.cslab.ericsson.net> Matthias Lang writes: > > Marthin Laubscher writes: > > > "We" made two fundamental choices (called breakthroughs at the > > time) that went directly against reality and consequently still > > cripple almost every aspect of computing today. > > > a) We represent things with digital approximations. > [...] > > > This is not the time and place to wonder about where analogue computing > > could have been today if all the money that was spent on digital > computing > > was spent on the analogue branch. > > When you say something is 'analog', do you mean that the parameters of > the system all occupy a continuous space? Or do you mean something > else? [Marthin Laubscher] A little of both I suppose. If we were as highly evolved analogue "computing"-wise as we are in the digital sense, what would concepts such as "system" and "parameter" have meant? If we assume that we mean by "system" and "parameter" something akin to what cybernetics, complexity theory and such describe, then in all likelihood the answer is "Yes, and that's not the end of it, and hardly the beginning". But in a fleeting remark sort of way, yes, I mean with analogue that every value in the system occupy a continuous space, also that it doesn't necessarily reside in a register or a memory position from where it is copied around and addressed by yet another digital number. It's as tough and mind-bending to think about these things while having a digital worldview, as it is to understand the language of dolphins. > > Matthias [Marthin Laubscher] From jmeinhorn@REDACTED Mon Nov 7 15:42:11 2005 From: jmeinhorn@REDACTED (Jeff Einhorn) Date: Mon, 7 Nov 2005 08:42:11 -0600 Subject: ODBC port_program_executable_not_found Message-ID: <1c4adb9b0511070642r2557dc5eta6f427d0cd2ef120@mail.gmail.com> The odbcserver is not built. Does it not compile for 64bit OS's yet? ifeq ($(findstring win32,$(TARGET)),win32) EI_LIB = -lerl_interface_md -lei_md ENTRY_OBJ=$(ERL_TOP)/erts/obj/$(TARGET)/port_entry.o PORT_ENTRY_POINT=erl_port_entry ENTRY_LDFLAGS=-entry:$(PORT_ENTRY_POINT) WIN32_TARGET = $(WIN_BIN_DIR)/odbcserver.exe EXE_TARGET = $(WIN32_TARGET) else ifneq ($(BITS64),yes) EI_LIB = -lerl_interface -lei UNIX_TARGET = $(BIN_DIR)/odbcserver EXE_TARGET = $(UNIX_TARGET) endif endif [jeinhorn@REDACTED odbc]$ export ERL_TOP=/usr/local/src/otp_src_R10B-8 [jeinhorn@REDACTED odbc]$ make === Entering application odbc make[1]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/src' erlc -W +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.0.4"' +'{parse_tr ansform,sys_pre_attributes}' +'{attribute,insert,app_vsn," odbc-2.0.4"}' -o../ebi n odbc.erl erlc -W +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.0.4"' +'{parse_tr ansform,sys_pre_attributes}' +'{attribute,insert,app_vsn," odbc-2.0.4"}' -o../ebi n odbc_app.erl erlc -W +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.0.4"' +'{parse_tr ansform,sys_pre_attributes}' +'{attribute,insert,app_vsn," odbc-2.0.4"}' -o../ebi n odbc_sup.erl sed -e 's;%VSN%;2.0.4;' odbc.app.src > ../ebin/odbc.app sed -e 's;%VSN%;2.0.4;' odbc.appup.src > ../ebin/odbc.appup make[1]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/src' make[1]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' make -f x86_64-unknown-linux-gnu/Makefile TYPE=debug make[2]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' make[2]: Nothing to be done for `opt'. make[2]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' make[1]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' === Skipping subdir doc/src, it is missing === Leaving application odbc Thanks for your time, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From jeinhorn@REDACTED Mon Nov 7 15:39:09 2005 From: jeinhorn@REDACTED (Jeff Einhorn) Date: Mon, 7 Nov 2005 08:39:09 -0600 Subject: ODBC port_program_executable_not_found Message-ID: <2B025C1778EB94418F186FB802D68EEF1B6B93@TRITON.pinnaclecredit.com> The odbcserver is not built. Does it not compile for 64bit OS's yet? ifeq ($(findstring win32,$(TARGET)),win32) EI_LIB = -lerl_interface_md -lei_md ENTRY_OBJ=$(ERL_TOP)/erts/obj/$(TARGET)/port_entry.o PORT_ENTRY_POINT=erl_port_entry ENTRY_LDFLAGS=-entry:$(PORT_ENTRY_POINT) WIN32_TARGET = $(WIN_BIN_DIR)/odbcserver.exe EXE_TARGET = $(WIN32_TARGET) else ifneq ($(BITS64),yes) EI_LIB = -lerl_interface -lei UNIX_TARGET = $(BIN_DIR)/odbcserver EXE_TARGET = $(UNIX_TARGET) endif endif [jeinhorn@REDACTED odbc]$ export ERL_TOP=/usr/local/src/otp_src_R10B-8 [jeinhorn@REDACTED odbc]$ make === Entering application odbc make[1]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/src' erlc -W +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.0.4"' +'{parse_tr ansform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"odbc-2.0.4"}' -o../ebi n odbc.erl erlc -W +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.0.4"' +'{parse_tr ansform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"odbc-2.0.4"}' -o../ebi n odbc_app.erl erlc -W +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.0.4"' +'{parse_tr ansform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"odbc-2.0.4"}' -o../ebi n odbc_sup.erl sed -e 's;%VSN%;2.0.4;' odbc.app.src > ../ebin/odbc.app sed -e 's;%VSN%;2.0.4;' odbc.appup.src > ../ebin/odbc.appup make[1]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/src' make[1]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' make -f x86_64-unknown-linux-gnu/Makefile TYPE=debug make[2]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' make[2]: Nothing to be done for `opt'. make[2]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' make[1]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' === Skipping subdir doc/src, it is missing === Leaving application odbc Thanks for your time, Jeff -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Michael McDaniel Sent: Monday, November 07, 2005 2:32 AM To: erlang-questions@REDACTED Subject: Re: ODBC port_program_executable_not_found On Fri, Nov 04, 2005 at 09:43:27AM -0600, Jeff Einhorn wrote: > It looks like my reply never made it to the list yesterday, so here it is > again. > > > > I don't see the priv directory for the c odbcserver program, so I would assume ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ Did odbcserver get created but not installed, or not created at all? ~~M > that the odbcserver didn't build correctly. However, when trying to track down > why this is the case I didn't see any odbc build errors during the make > process. > > > > make output > > === Entering application odbc > > make[3]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/src' > > erlc -W +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.0.4"' +' > {parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"odbc-2.0.4"} > ' -o../ebin odbc.erl erlc -W +debug_info -I../include > -D'SERVER_SOFTWARE="odbc/2.0.4"' +'{parse_transform,sys_pre_attributes}' +' > {attribute,insert,app_vsn,"odbc-2.0.4"}' -o../ebin odbc_app.erl > > erlc -W +debug_info -I../include -D'SERVER_SOFTWARE="odbc/2.0.4"' +' > {parse_transform,sys_pre_attributes}' +'{attribute,insert,app_vsn,"odbc-2.0.4"} > ' -o../ebin odbc_sup.erl sed -e 's;%VSN%;2.0.4;' odbc.app.src > ../ebin/ > odbc.app > > sed -e 's;%VSN%;2.0.4;' odbc.appup.src > ../ebin/ > odbc.appup > make[3]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/src' > > make[3]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' > > make -f x86_64-unknown-linux-gnu/Makefile TYPE=opt > > make[4]: Entering directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' > > make[4]: Nothing to be done for `opt'. > > make[4]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' > > make[3]: Leaving directory `/usr/local/src/otp_src_R10B-8/lib/odbc/c_src' > > === Skipping subdir doc/src, it is missing === Leaving application odbc > > > > [root@REDACTED ebin]# pwd > > /usr/local/lib/erlang/lib/odbc-2.0.4/ebin > > > > [root@REDACTED ebin]# ls *.beam > > odbc_app.beam odbc.beam odbc_sup.beam > > > > [root@REDACTED src]# ls > > odbc_app.erl odbc.erl odbc_internal.hrl odbc_sup.erl > > > > System specs: > > Redhat AS 4 x86_64 > > OTP R10B-8 > > > > Thanks for your help, > > > > Jeff > > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED [ > mailto:owner-erlang-questions@REDACTED] On Behalf Of tobbe > > Sent: Thursday, November 03, 2005 4:04 AM > > To: erlang-questions@REDACTED > > Subject: ODBC port_program_executable_not_found > > > > > > Perhaps, your Erlang ODBC driver wasn't built properly. > > Can you find the 'odbcserver' executable under the Erlang install directory ? > For example: > > > > # ls /usr/local/lib/erlang/lib/odbc-2.0.4/priv/bin/ > > odbcserver > > > > Cheers, Tobbe > > > > Jeffrey M. Einhorn > Chief Technology Officer > Fourscore Resource Capital, LLC > 952.253.6300 / 888.889.6803 > 952.253.6363 (fax) > Email: jeinhorn@REDACTED > http://www.fourscorellc.com > > Confidentiality Note: This e-mail is intended only for the person to whom it > is addressed and may contain information that is privileged, confidential or > otherwise protected from disclosure. Dissemination, distribution or copying of > this e-mail or the information herein by anyone other than the intended > recipient, or an employee or agent responsible for delivering the message to > the intended recipient, is prohibited. If you have received this e-mail in > error, please destroy the original message and all copies. > > > -- Michael McDaniel Portland, Oregon, USA http://autosys.us +1 503 283 5284 From akopa@REDACTED Mon Nov 7 16:26:35 2005 From: akopa@REDACTED (Matthew D Swank) Date: Mon, 07 Nov 2005 09:26:35 -0600 Subject: Is concurrency hard? In-Reply-To: <200511071030.jA7AUfv26505@hades.cslab.ericsson.net> References: <200511071030.jA7AUfv26505@hades.cslab.ericsson.net> Message-ID: <436F722B.1040200@charter.net> Marthin Laubscher wrote: > It's as tough and mind-bending to think about these things while having a > digital worldview, as it is to understand the language of dolphins. > > It is? I was under the impression that we'd been thinking about these things since Newton. Besides, If you look at the history of Math and Logic (especially in the 20th century), continuous systems are as artificial as any other math construct. A model's success in mirroring the "real" world doesn't change the fact that it is still a model, and not the world. Matt -- "You do not really understand something unless you can explain it to your grandmother." ? Albert Einstein. From ulf.wiger@REDACTED Mon Nov 7 16:36:11 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 7 Nov 2005 16:36:11 +0100 Subject: Using 4Gb of ram with Erlang VM Message-ID: I've been able to get my hands on some SPARCs (2x 1.5 GHz) with 16 GB RAM. I started out with the ring benchmark, and just verified that process spawning, context switching and message passing seem to stay more or less constant(*) up to at least 6 million processes in a ring, although I do get some funny delays and less predictable figures compared to, say, a measly one million processes. (*) Process spawn time: ca 6 usec, send: 2 usec. I first tried 10 million processes, but got hit hard by swapping. Since I'm using 64-bit erlang, it didn't crash on me, though. (: /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of > Michael Fogeborg > Sent: den 4 november 2005 16:53 > To: Mickael Remond; erlang-questions@REDACTED > Subject: Re: Using 4Gb of ram with Erlang VM > > This is for M$ Windows versions that support the 1+3Gb memory model: > > 1 - enable use of the 1+3Gb model by adding the "/3Gb" switch > in the file > boot.ini file usually found on C:\ ( its has the hidden > attribute set = invisible ) > > http://support.microsoft.com/default.aspx?scid=kb%3BEN-US%3B297812 > > 2 - patch the PE-header of the erl.exe file to enable use of > the same model > As far as I know the erl.exe file is not linked with > these attributes and > will only allow use of 2 GB. > > I did this a while ago when trying to push the > ring-benchmark. I had a PC with Win XP Pro and 4Gb of > memory. Got 1800000 processes running before swapping (?) killed it. > > At 10:18 2005-11-04, you wrote: > >Hello, > > > >As I do not have a machine with 4 Gb of Ram available right > now I was > >wondering if there are specific steps to do to be able to reach this > >limit ? > >Is there compile-time option that limit Erlang VM to 1 Gb ? > >Is the 4Gb limit the same on all architecture ? Does Windows > version of > >Erlang support the same limit ? > > > >Thank you in advance ! > > > >-- > >Micka?l R?mond > > > From ulf.wiger@REDACTED Mon Nov 7 18:51:54 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 7 Nov 2005 18:51:54 +0100 Subject: beating mnesia to death (was RE: Using 4Gb of ram with Erlang VM) Message-ID: Ulf Wiger wrote: > I've been able to get my hands on some SPARCs (2x 1.5 GHz) > with 16 GB RAM. I thought I'd push mnesia a bit, to see how far I could get with 16 GB of RAM and 64-bit Erlang. (First of all, something seems to happen around 8GB. I get into lots of page faults (but no swapping). When this happens, responsiveness goes down the drain. Does anyone have an idea what it is that's happening?) I created a ram_copy table and first stuffed it full of minimal records (well, almost: {mytab, integer(), integer()}). I pushed in 10 million records easily with no visible effect on write() read() cost. But the memory usage of the table was only 485 MB, so I decided to add some payload: {mytab,integer(),erlang:make_tuple(100,lists:duplicate(10,a))} With this, I could insert 900,000 records, with the table occupying 7.6 GB of RAM. 1 million records though, and the batch function never returned. My perfmeter showed lots of page faults, and user CPU utilization went down to zero. While the node remained responsive, a dirty_write() took ca 10 usec with no payload, and 87 usec with payload. dirty_read() took 3.4 usec without and 72 usec with payload. I've now changed the table copy type to disc_copies, and am trying to find out how huge disc_copies perform. Again, I got a bit impatient and went for the 900,000 record version with payload. I first ran with default dump_log_write_threshold -- not a very good idea. I then changed it to 10,000, and after that to 100,000 writes. At the time of writing, Mnesia is bending over backwards trying to handle a burst of 900,000 records with checkpointing to disk. It's not liking it, but it keeps going... slowly. I got lots of page faults for a while, and several "Mnesia is overloaded" messages (mostly time_threshold). The transaction log was 1.6 GB at its peak. (: The whole system is running like molasses. Still some 60,000 records to insert. The I/O subsystem seems saturated. The process mnesia_controller:dump_and_reply() has a heap of > 24 MB. A disk_log process has a 40 MB heap. Of course, I ran all this with a thread pool size of 0. That was probably another mistake... With 100,000 records (incl payload), the table loaded from disk in 45 seconds. With 200,000 records, loading took 87 seconds. I'm probably going to let it finish overnight. Will report any further developments. /Uffe From mikael.karlsson@REDACTED Mon Nov 7 23:03:30 2005 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Mon, 7 Nov 2005 23:03:30 +0100 Subject: Web services In-Reply-To: References: Message-ID: <200511072303.31042.mikael.karlsson@creado.com> Interesting! It seems also that some discovered that sending those XML messages on the line take some bandwidth and processing power for binding (oops what a surprise) so there is a proposal for "Fast Web Services" which in practice seems to be an ASN.1 representation of XML Schema. Since Erlang has an ASN1 encoder/decoder this might be something to look closer at. Refs: http://java.sun.com/developer/technicalArticles/WebServices/fastWS/ http://asn1.elibel.tm.fr/xml/fws.htm http://asn1.elibel.tm.fr/xml/tutorial-fws.htm /Mikael m?ndag 07 november 2005 10:33 skrev Joe Armstrong (AL/EAB): > How about rnc? - I have a relax NG verifyer (in Erlang) > which I might be persuaded to part with. > > /Joe > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Ulf Wiger > > (AL/EAB) > > Sent: den 7 november 2005 09:37 > > To: chandru; Anindya Mozumdar > > Cc: erlang-questions@REDACTED > > Subject: RE: Web services > > > > > > > > One thing notably missing in this regard is support for > > XMLSchema. > > > > Any takers? (: > > > > /Uffe > > > > > -----Original Message----- > > > From: owner-erlang-questions@REDACTED > > > [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru > > > Sent: den 7 november 2005 09:18 > > > To: Anindya Mozumdar > > > Cc: erlang-questions@REDACTED > > > Subject: Re: Web services > > > > > > On 07/11/05, Anindya Mozumdar wrote: > > > > Hi, > > > > I am relatively new to both Erlang and Web Services, so > > > > > > pardon my > > > > > > > rather silly question - Are there are any > > > > API's/implementations in > > > > > > Erlang for Web Services (SOAP, WSDL and UDDI), like the > > > > > > ones readily > > > > > > > avaiable in Java ? > > > > > > There is a basic soap-client and soap-server written by > > > > Erik Reitsma. > > > > > I have version 0.2 of it and I can send it to you if you want > > > it. But it is quite basic. The good news is that the most of > > > the tools you need to build Web Services are already > > > available :-) You have yaws/inets for a webserver, > > > ibrowse/inets for a HTTP client and xmerl for XML parsing. > > > You just have to implement the bits you need from various > > > standards :-) > > > > > > cheers > > > Chandru From tony@REDACTED Mon Nov 7 23:26:46 2005 From: tony@REDACTED (Tony Rogvall) Date: Mon, 7 Nov 2005 23:26:46 +0100 Subject: Web services In-Reply-To: <200511072303.31042.mikael.karlsson@creado.com> References: <200511072303.31042.mikael.karlsson@creado.com> Message-ID: 7 nov 2005 kl. 23.03 skrev Mikael Karlsson: > Interesting! > > It seems also that some discovered that sending those XML messages > on the line > take some bandwidth and processing power for binding (oops what a > surprise) > so there is a proposal for "Fast Web Services" which in practice > seems to be > an ASN.1 representation of XML Schema. > Since Erlang has an ASN1 encoder/decoder this might be something to > look > closer at. If they do it the XML way (with out reading) they MUST surely embed the XML string into the request. The addition of the isWBXML flag is my own invention to make the size of the PDU a LOT smaller... Request ::= SEQUENCE { isWBXML BOOLEAN, data OCTET STRING -- Put you XML or WBXML request data here } Response ::= SEQUENCE { isWBXML BOOLEAN, data OCTET STRING -- Put you XML or WBXML response here } This is very similar to how Nokia is using Corba/Java RMI in the NPS (Nokia Profile Server) String resolve (String request, String sessionID) The request is of course XML and the response is... XML /Tony > Refs: > http://java.sun.com/developer/technicalArticles/WebServices/fastWS/ > http://asn1.elibel.tm.fr/xml/fws.htm > http://asn1.elibel.tm.fr/xml/tutorial-fws.htm > > /Mikael > > m?ndag 07 november 2005 10:33 skrev Joe Armstrong (AL/EAB): >> How about rnc? - I have a relax NG verifyer (in Erlang) >> which I might be persuaded to part with. >> >> /Joe >> >>> -----Original Message----- >>> From: owner-erlang-questions@REDACTED >>> [mailto:owner-erlang-questions@REDACTED]On Behalf Of Ulf Wiger >>> (AL/EAB) >>> Sent: den 7 november 2005 09:37 >>> To: chandru; Anindya Mozumdar >>> Cc: erlang-questions@REDACTED >>> Subject: RE: Web services >>> >>> >>> >>> One thing notably missing in this regard is support for >>> XMLSchema. >>> >>> Any takers? (: >>> >>> /Uffe >>> >>>> -----Original Message----- >>>> From: owner-erlang-questions@REDACTED >>>> [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru >>>> Sent: den 7 november 2005 09:18 >>>> To: Anindya Mozumdar >>>> Cc: erlang-questions@REDACTED >>>> Subject: Re: Web services >>>> >>>> On 07/11/05, Anindya Mozumdar wrote: >>>>> Hi, >>>>> I am relatively new to both Erlang and Web Services, so >>>> >>>> pardon my >>>> >>>>> rather silly question - Are there are any >>> >>> API's/implementations in >>> >>>>> Erlang for Web Services (SOAP, WSDL and UDDI), like the >>>> >>>> ones readily >>>> >>>>> avaiable in Java ? >>>> >>>> There is a basic soap-client and soap-server written by >>> >>> Erik Reitsma. >>> >>>> I have version 0.2 of it and I can send it to you if you want >>>> it. But it is quite basic. The good news is that the most of >>>> the tools you need to build Web Services are already >>>> available :-) You have yaws/inets for a webserver, >>>> ibrowse/inets for a HTTP client and xmerl for XML parsing. >>>> You just have to implement the bits you need from various >>>> standards :-) >>>> >>>> cheers >>>> Chandru From ulf.wiger@REDACTED Mon Nov 7 23:41:37 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 7 Nov 2005 23:41:37 +0100 Subject: beating mnesia to death (was RE: Using 4Gb of ram with Erlang VM) Message-ID: Continuing with trying to max out that 16GB SPARC... I canceled the test, restarted with a thread pool of 256, and tried building a 700,000 record disc_copy table. It worked much better. Page faults still occured, but didn't slow Erlang to a crawl. The log dumps interleaved, but that didn't significantly affect responsiveness either. Building the whole table took about 10 minutes. Dirty_reads while logs were dumping took a few hundred microsecs to complete (about 3x slower than in an idle system). A read-write transaction on the full table (reading one object by key, and writing it back), took about 6-700 usec, which seems quite normal. Starting mnesia and loading the 6GB table from disk took ca 10 minutes. The system felt pretty snappy while the table was loading. Now, squeezing 900,000 records into the table and monitoring the process with vmstat made me think. I'd been using ets:info(mytab,memory) and multiplying by four as always (the function returns the number of words used). But the numbers didn't add up! It looked as I was running out of memory with 8GB to spare. vmstat reported 250 MB left in the system when 900,000 records were loaded, and asking the system_info(memory) BIF gave a similar answer. (foo@REDACTED)17> erlang:system_info(memory). [{total,15308844459}, {processes,70511136}, {processes_used,70507552}, {system,15238333323}, {atom,484673}, {atom_used,468236}, {binary,17296165}, {code,5012924}, {ets,15214982736}] (foo@REDACTED)18> {ets:info(mytab,size),(ets:info(mytab,memory)*4)/1000000}. {900000,7607.32} Then it hit me - I haven't been getting enough sleep lately! Since I'm using 64-bit erlang, it's 8 bytes for every heap word! I've been building a 15 GB table! Now I feel a whole lot better. (: So, the "6 GB" table mentioned above was really a 12 GB table, and it behaved quite nicely. Using up slightly more than 15G on a 16G machine was probably pushing it. (The 900,000 record experience ended with a big Ooops! Crash dump was written to: erl_crash.dump eheap_alloc: Cannot allocate 64194840 bytes of memory (of type "heap").) Now the mytab.DCD is only 3.2 GB on disk... I guess we pay quite a price for the 64-bit word, then. Time for the next test: write the payload as term_to_binary(Value,[compressed]). Now, 700,000 records took only 96 MB, and the table took 37 seconds to build. Inspired, I slammed 5 million records into the table. This took 5 minutes, and the resulting table used only 686 MB of RAM, and 373 MB on disk. Sigh... So, instead of sitting here all night, experimenting, I'm going to jump to some conclusions: On a 16 GB machine, you can: - run 6 million simultaneous processes (through use of erlang:hibernate, I was actually able to run 20 million - spawn time: 6.3 us, message passing time: 5.3 us, and I had 1.8 GB to spare.) - populate mnesia with at least 12 GB of data, but think through how you want to represent it, since the 64-bit word size blows things up a bit. - keep a 10 GB+ disc_copy table in mnesia. The load times and log dump cost seem acceptable (10 minutes to load, dumping takes a while but runs in the background quite nicely.) Of course, I didn't make much use of that second cpu... (: /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Ulf > Wiger (AL/EAB) > Sent: den 7 november 2005 18:52 > To: erlang-questions@REDACTED > Subject: beating mnesia to death (was RE: Using 4Gb of ram > with Erlang VM) > > > Ulf Wiger wrote: > > I've been able to get my hands on some SPARCs (2x 1.5 GHz) > with 16 GB > > RAM. > > I thought I'd push mnesia a bit, to see how far I could get > with 16 GB of RAM and 64-bit Erlang. > > (First of all, something seems to happen around 8GB. I get > into lots of page faults (but no swapping). When this > happens, responsiveness goes down the drain. Does anyone have > an idea what it is that's happening?) > > > I created a ram_copy table and first stuffed it full of > minimal records (well, almost: {mytab, integer(), integer()}). > > I pushed in 10 million records easily with no visible effect > on write() read() cost. But the memory usage of the table was > only 485 MB, so I decided to add some payload: > > {mytab,integer(),erlang:make_tuple(100,lists:duplicate(10,a))} > > With this, I could insert 900,000 records, with the table > occupying 7.6 GB of RAM. 1 million records though, and the > batch function never returned. My perfmeter showed lots of > page faults, and user CPU utilization went down to zero. > > While the node remained responsive, a dirty_write() took ca > 10 usec with no payload, and 87 usec with payload. > dirty_read() took 3.4 usec without and 72 usec with payload. > > I've now changed the table copy type to disc_copies, and am > trying to find out how huge disc_copies perform. > Again, I got a bit impatient and went for the 900,000 record > version with payload. > > I first ran with default dump_log_write_threshold -- not a > very good idea. I then changed it to 10,000, and after that > to 100,000 writes. At the time of writing, Mnesia is bending > over backwards trying to handle a burst of 900,000 records > with checkpointing to disk. It's not liking it, but it keeps > going... slowly. I got lots of page faults for a while, and > several "Mnesia is overloaded" messages (mostly > time_threshold). The transaction log was 1.6 GB at its peak. (: > > The whole system is running like molasses. Still some 60,000 > records to insert. The I/O subsystem seems saturated. The > process mnesia_controller:dump_and_reply() > has a heap of > 24 MB. A disk_log process has a 40 MB heap. > > Of course, I ran all this with a thread pool size of 0. > That was probably another mistake... > > > With 100,000 records (incl payload), the table loaded from > disk in 45 seconds. With 200,000 records, loading took 87 seconds. > > I'm probably going to let it finish overnight. Will report > any further developments. > > /Uffe > From blume@REDACTED Mon Nov 7 16:59:06 2005 From: blume@REDACTED (Matthias Blume) Date: Mon, 7 Nov 2005 09:59:06 -0600 Subject: REMINDER: Proposals for workshops (ICFP '06) due this Friday! Message-ID: The deadline for workshop proposals is coming up on November 11, 2005. If you are planning to organize a workshop to be co-located with ICFP 2006, please, send us your proposal before the deadline expires! Many thanks, and kind regards, Matthias Blume ------------------------------------------------------------------------ ---- ICFP '06 CALL FOR WORKSHOP PROPOSALS The ICFP 2006 ACM SIGPLAN International Conference on Functional Programming will be held in Portland, Oregon from September 18 to September 20, 2006. Proposals for workshops are invited for consideration of ACM SIGPLAN sponsorship and affiliation with ICFP 2006. Affiliated workshops will be held on September 16 and 17 (as well as on September 21, if necessary). The purpose of these workshops is to provide a forum for presenting novel ideas in a less formal and possibly more focused way than at ICFP itself. They may also provide good opportunities for young researchers to present their work to, and to obtain feedback from, a specialized community. The format of each workshop is to be determined by its organizers, but it is expected that each workshop allows ample time for general discussion. The preference is for workshops which span only one day, but other schedules will also be considered. Researchers and practitioners are invited to submit workshop proposals to the ICFP 2006 Workshop Chairs, Matthias Blume and Patricia Johann, via e-mail (icfp06-workshops@REDACTED), NO LATER THAN NOVEMBER 11, 2005. Submission may be made by e-mail (Postscript, PDF, or ASCII) with "ICFP06 Workshop Submission" in the subject header. Following ACM SIGPLAN's sponsorship procedures, proposals must include: 1. The name of the workshop. 2. A statement of goals for the workshop. 3. The names and addresses of the organizers. 4. The names of potential participants, such as program committee members. (It would be wise to inform your potential comittee members that they have been selected pending SIGPLAN approval.) 5. A description of plans for calls for participation (e.g., calls for papers). 6. The expected number of attendees and planned length of the workshop. 7. A description of plans for publicity. 8. An explanation of any plans for a published proceedings. 9. A description of past versions of the workshop, including dates, organizers, submission and acceptance counts, attendance, sites, registration fees and summary budget information. 10. The URL of the workshop web site. Note that should a proposal be accepted, a final report about the workshop, suitable for publication in SIGPLAN Notices, will be required. Notification of acceptance will be made by DECEMBER 15, 2005. Accepted workshops will be sponsored by SIGPLAN (see http://www.acm.org/sigplan/sigplan_workshop_proposal.htm for more information). A committee chaired by the ICFP 2006 Workshop Chairs and consisting of the ICFP Program and General Chairs and the SIGPLAN Executive Committee will evaluate all proposals. The workshop selection committee members are: * Matthias Blume, TTI-Chicago, Workshop co-Chair for ICFP 2006 * Patricia Johann, Rutgers University, Workshop co-Chair for ICFP 2006 * Julia Lawall, DIKU, Program Chair for ICFP 2006 * John Reppy, University of Chicago, General Chair for ICFP 2006 The maximum number of workshop proposals to be accepted is 6. Any further information needed for preparing a workshop proposal can be obtained by sending email to the workshop chairs (icfp06-workshops@REDACTED) or consulting the ICFP 2006 web site at http://icfp06.cs.uchicago.edu/. From rasmussen.bryan@REDACTED Tue Nov 8 10:00:33 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Tue, 8 Nov 2005 10:00:33 +0100 Subject: Web services In-Reply-To: <200511072303.31042.mikael.karlsson@creado.com> References: <200511072303.31042.mikael.karlsson@creado.com> Message-ID: <3bb44c6e0511080100w5423ffdel998678725313cc99@mail.gmail.com> If the idea is to provide better support for SOAP, hence the need for WSDL, XML Schema, then I don't know about this, given that my understanding of it in the WebServices community was that it had already been passed by, defeated. The current debate is SOAP and Rest. There certainly seems to be a good deal of argument as to whether SOAP will end up winning in the long run. Perhaps something to look at instead is EBMS. Ebms extends SOAP, but because it has a particular semantics to the message it does not need support for XML Schema, WSDL to use. spec: http://www.oasis-open.org/committees/ebxml-msg/documents/ebMS_v2_0.pdf EBMS does not need to be implemented with the other ebxml specifications, but if it is synergistic benefits accrue. I am thinking in the context of JEAI project etc. that a full EBXML implementation could be a big selling point. EBXML seems to be moving pretty well in the far east currently. On 11/7/05, Mikael Karlsson wrote: > Interesting! > > It seems also that some discovered that sending those XML messages on the line > take some bandwidth and processing power for binding (oops what a surprise) > so there is a proposal for "Fast Web Services" which in practice seems to be > an ASN.1 representation of XML Schema. > Since Erlang has an ASN1 encoder/decoder this might be something to look > closer at. > Refs: > http://java.sun.com/developer/technicalArticles/WebServices/fastWS/ > http://asn1.elibel.tm.fr/xml/fws.htm > http://asn1.elibel.tm.fr/xml/tutorial-fws.htm > > /Mikael > > m?ndag 07 november 2005 10:33 skrev Joe Armstrong (AL/EAB): > > How about rnc? - I have a relax NG verifyer (in Erlang) > > which I might be persuaded to part with. > > > > /Joe > > > > > -----Original Message----- > > > From: owner-erlang-questions@REDACTED > > > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Ulf Wiger > > > (AL/EAB) > > > Sent: den 7 november 2005 09:37 > > > To: chandru; Anindya Mozumdar > > > Cc: erlang-questions@REDACTED > > > Subject: RE: Web services > > > > > > > > > > > > One thing notably missing in this regard is support for > > > XMLSchema. > > > > > > Any takers? (: > > > > > > /Uffe > > > > > > > -----Original Message----- > > > > From: owner-erlang-questions@REDACTED > > > > [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru > > > > Sent: den 7 november 2005 09:18 > > > > To: Anindya Mozumdar > > > > Cc: erlang-questions@REDACTED > > > > Subject: Re: Web services > > > > > > > > On 07/11/05, Anindya Mozumdar wrote: > > > > > Hi, > > > > > I am relatively new to both Erlang and Web Services, so > > > > > > > > pardon my > > > > > > > > > rather silly question - Are there are any > > > > > > API's/implementations in > > > > > > > > Erlang for Web Services (SOAP, WSDL and UDDI), like the > > > > > > > > ones readily > > > > > > > > > avaiable in Java ? > > > > > > > > There is a basic soap-client and soap-server written by > > > > > > Erik Reitsma. > > > > > > > I have version 0.2 of it and I can send it to you if you want > > > > it. But it is quite basic. The good news is that the most of > > > > the tools you need to build Web Services are already > > > > available :-) You have yaws/inets for a webserver, > > > > ibrowse/inets for a HTTP client and xmerl for XML parsing. > > > > You just have to implement the bits you need from various > > > > standards :-) > > > > > > > > cheers > > > > Chandru > > From tiaanh@REDACTED Tue Nov 8 10:06:51 2005 From: tiaanh@REDACTED (Tiaan) Date: Tue, 8 Nov 2005 11:06:51 +0200 Subject: I/O Completion Ports on Windows Message-ID: <8a3a55000511080106v2c6a0ce2w112126e040809f8e@mail.gmail.com> Hi, Does Erlang support / use I/O Completion Ports on Windows ? Thanks Tiaan -------------- next part -------------- An HTML attachment was scrubbed... URL: From mickael.remond@REDACTED Tue Nov 8 10:36:48 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Tue, 8 Nov 2005 10:36:48 +0100 Subject: Web services In-Reply-To: <3bb44c6e0511080100w5423ffdel998678725313cc99@mail.gmail.com> References: <200511072303.31042.mikael.karlsson@creado.com> <3bb44c6e0511080100w5423ffdel998678725313cc99@mail.gmail.com> Message-ID: <20051108093648.GA9494@memphis.process-one.net> * bryan rasmussen [2005-11-08 10:00:33 +0100]: > EBMS does not need to be implemented with the other ebxml > specifications, but if it is synergistic benefits accrue. I am > thinking in the context of JEAI project etc. that a full EBXML > implementation could be a big selling point. EBXML seems to be moving > pretty well in the far east currently. Yes it is. We already have contacts that have asked for an EbXML support. We are, for now thinking on how to achieve this without having to spend a tremendous effort in reimplementing the whole standard stack however. -- Micka?l R?mond From bjorn@REDACTED Tue Nov 8 10:51:20 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 08 Nov 2005 10:51:20 +0100 Subject: I/O Completion Ports on Windows In-Reply-To: <8a3a55000511080106v2c6a0ce2w112126e040809f8e@mail.gmail.com> References: <8a3a55000511080106v2c6a0ce2w112126e040809f8e@mail.gmail.com> Message-ID: No. /Bjorn Tiaan writes: > Hi, > > Does Erlang support / use I/O Completion Ports on Windows ? > > Thanks > Tiaan -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bjorn@REDACTED Tue Nov 8 12:30:15 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 08 Nov 2005 12:30:15 +0100 Subject: proto_dist inet_ssl STILL broken in R10B-8? In-Reply-To: <200510262145.07986.ft@it.su.se> References: <200510262145.07986.ft@it.su.se> Message-ID: Here is patch that corrects the problem. This correction will be included in R10B-9. /Bjorn --- lib/ssl/src/ssl_prim.erl@@/main/release/LATEST Mon Jul 7 14:36:53 2003 +++ lib/ssl/src/ssl_prim.erl Tue Nov 8 12:22:04 2005 @@ -107,7 +107,7 @@ peername(St) when record(St, st), St#st.status =:= open -> case ssl_server:peername_prim(ssl_server_prim, St#st.fd) of {ok, {Address, Port}} -> - {ok, At} = inet:getaddr(Address, inet), + {ok, At} = inet_parse:ipv4_address(Address), {ok, {At, Port}}; Error -> Error @@ -119,7 +119,7 @@ sockname(St) when record(St, st), St#st.status =:= open -> case ssl_server:sockname_prim(ssl_server_prim, St#st.fd) of {ok, {Address, Port}} -> - {ok, At} = inet:getaddr(Address, inet), + {ok, At} = inet_parse:ipv4_address(Address), {ok, {At, Port}}; Error -> Error Fredrik Thulin writes: > Is anyone able to use SSL proto_dist in R10B-7 or R10B-8? I am not, and > I am wondering if it is > > A) just me > B) officially broken > C) unofficially broken > > $ /pkg/erlang/R10B-8/bin/erl \ > -proto_dist inet_ssl \ > -ssl_dist_opt client_certfile cert.comb \ > -ssl_dist_opt server_certfile cert.comb \ > -ssl_dist_opt verify 2 \ > -boot ~/path/to/R10B-8-compiled/start_ssl \ > -name a > > ... nothing happens, it just hangs there. > > /Fredrik > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bjarne@REDACTED Tue Nov 8 14:29:22 2005 From: bjarne@REDACTED (=?iso-8859-1?Q?Bjarne_D=E4cker?=) Date: Tue, 8 Nov 2005 14:29:22 +0100 Subject: EUC 2005 proceedings available now ! References: <435FD4AA.1020503@hyber.org> <002a01c5db13$d2a94f60$bb0b69d4@segeltorp> Message-ID: <003301c5e468$6f2a44e0$931f69d4@segeltorp> Dear Erlang friends, The proceedings from the 11th International Erlang/OTP User Conference are available at http://www.erlang.se/euc/05/ Read and enjoy ! Bjarne (EUC chairman) From joseph.stewart@REDACTED Tue Nov 8 16:19:41 2005 From: joseph.stewart@REDACTED (Joseph Stewart) Date: Tue, 8 Nov 2005 10:19:41 -0500 Subject: Newbie question about Erlang and SNMP clients Message-ID: <2781f020511080719r20fcf0a0g140eff8a56060bbc@mail.gmail.com> Hello all, I'm just getting started with Erlang and wanted to know if the SNMP library can be used to set a value, get a value, and walk a tree on another device? The documentation seems to focus on writing SNMP servers, so if anyone has a simple example of client-type operations, I'd be most appreciative! -joe -- If it ain't broke, break it. How else are you going to figure out how it works? From mikael.karlsson@REDACTED Tue Nov 8 19:41:23 2005 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Tue, 8 Nov 2005 19:41:23 +0100 Subject: Web services In-Reply-To: References: <200511072303.31042.mikael.karlsson@creado.com> Message-ID: <200511081941.23948.mikael.karlsson@creado.com> No, they map W3C XML Schema (XSD) to ASN.1 schema. /Mikael Example from the first reference page http://java.sun.com/developer/technicalArticles/WebServices/fastWS/ becomes: ComplexTypeSimple ::= SEQUENCE { varBoolean BOOLEAN, varInt INTEGER, varString UTF8String } ParamRefComplexTypeSimple ::= ComplexTypeSimple m?ndag 07 november 2005 23:26 skrev Tony Rogvall: > 7 nov 2005 kl. 23.03 skrev Mikael Karlsson: > > Interesting! > > > > It seems also that some discovered that sending those XML messages > > on the line > > take some bandwidth and processing power for binding (oops what a > > surprise) > > so there is a proposal for "Fast Web Services" which in practice > > seems to be > > an ASN.1 representation of XML Schema. > > Since Erlang has an ASN1 encoder/decoder this might be something to > > look > > closer at. > > If they do it the XML way (with out reading) they MUST surely embed > the XML string > into the request. The addition of the isWBXML flag is my own > invention to make the > size of the PDU a LOT smaller... > > Request ::= SEQUENCE > { > isWBXML BOOLEAN, > data OCTET STRING -- Put you XML or WBXML request data here > } > > Response ::= SEQUENCE > { > isWBXML BOOLEAN, > data OCTET STRING -- Put you XML or WBXML response here > } > > This is very similar to how Nokia is using Corba/Java RMI in the NPS > (Nokia Profile Server) > > String resolve (String request, String sessionID) > > The request is of course XML and the response is... XML > > /Tony > > > Refs: > > http://java.sun.com/developer/technicalArticles/WebServices/fastWS/ > > http://asn1.elibel.tm.fr/xml/fws.htm > > http://asn1.elibel.tm.fr/xml/tutorial-fws.htm > > > > /Mikael > > > > m?ndag 07 november 2005 10:33 skrev Joe Armstrong (AL/EAB): > >> How about rnc? - I have a relax NG verifyer (in Erlang) > >> which I might be persuaded to part with. > >> > >> /Joe > >> > >>> -----Original Message----- > >>> From: owner-erlang-questions@REDACTED > >>> [mailto:owner-erlang-questions@REDACTED]On Behalf Of Ulf Wiger > >>> (AL/EAB) > >>> Sent: den 7 november 2005 09:37 > >>> To: chandru; Anindya Mozumdar > >>> Cc: erlang-questions@REDACTED > >>> Subject: RE: Web services > >>> > >>> > >>> > >>> One thing notably missing in this regard is support for > >>> XMLSchema. > >>> > >>> Any takers? (: > >>> > >>> /Uffe > >>> > >>>> -----Original Message----- > >>>> From: owner-erlang-questions@REDACTED > >>>> [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru > >>>> Sent: den 7 november 2005 09:18 > >>>> To: Anindya Mozumdar > >>>> Cc: erlang-questions@REDACTED > >>>> Subject: Re: Web services > >>>> > >>>> On 07/11/05, Anindya Mozumdar wrote: > >>>>> Hi, > >>>>> I am relatively new to both Erlang and Web Services, so > >>>> > >>>> pardon my > >>>> > >>>>> rather silly question - Are there are any > >>> > >>> API's/implementations in > >>> > >>>>> Erlang for Web Services (SOAP, WSDL and UDDI), like the > >>>> > >>>> ones readily > >>>> > >>>>> avaiable in Java ? > >>>> > >>>> There is a basic soap-client and soap-server written by > >>> > >>> Erik Reitsma. > >>> > >>>> I have version 0.2 of it and I can send it to you if you want > >>>> it. But it is quite basic. The good news is that the most of > >>>> the tools you need to build Web Services are already > >>>> available :-) You have yaws/inets for a webserver, > >>>> ibrowse/inets for a HTTP client and xmerl for XML parsing. > >>>> You just have to implement the bits you need from various > >>>> standards :-) > >>>> > >>>> cheers > >>>> Chandru From ft@REDACTED Tue Nov 8 20:09:26 2005 From: ft@REDACTED (Fredrik Thulin) Date: Tue, 8 Nov 2005 20:09:26 +0100 Subject: proto_dist inet_ssl STILL broken in R10B-8? In-Reply-To: References: <200510262145.07986.ft@it.su.se> Message-ID: <200511082009.26379.ft@it.su.se> On Tuesday 08 November 2005 12.30, you wrote: > Here is patch that corrects the problem. This correction will > be included in R10B-9. Thank you so much! If I spot you I'll buy you a beer at the erlounge. If the beer is free, I'll just salute you ;) /Fredrik From mickael.remond@REDACTED Tue Nov 8 22:31:09 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Tue, 8 Nov 2005 22:31:09 +0100 Subject: Web services In-Reply-To: <200511081941.23948.mikael.karlsson@creado.com> References: <200511072303.31042.mikael.karlsson@creado.com> <200511081941.23948.mikael.karlsson@creado.com> Message-ID: <20051108213109.GA980@memphis.process-one.net> * Mikael Karlsson [2005-11-08 19:41:23 +0100]: > No, > they map W3C XML Schema (XSD) to ASN.1 schema. Yes. And the selling point is that they invented an "XML accelerator". Nice, isn't it ? -- Micka?l R?mond From ulf.wiger@REDACTED Wed Nov 9 00:00:02 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 9 Nov 2005 00:00:02 +0100 Subject: beating mnesia to death (was RE: Using 4Gb of ram with Erlang VM) Message-ID: To sum up my experiences on the 16 GB machine: - 64-bit erlang seems to work like a charm - I stored 70 million records in a table in one benchmark (15 GB of RAM usage), and built a 5-million record replicated disc_copies table in another. Everything worked pretty much as expected, which was more than I expected, actually(*). ;-) - Loading 5 million records from disk took about 27 seconds; loading over the network took about as long. Building the table from scratch took over two hours. - I ran 6 million simultaneous processes; 20 M when I used hibernate/3. Spawn and send times were unaffected. My main gripe is that erlang terms take up a huge amount of space on the heap, e.g. 16 bytes per character in a string -- not particularly sexy. In order to get large amounts of data in there, you pretty much have to use binaries. /Uffe (*) I know that OTP doesn't have this type of hardware in their lab, so this stuff isn't really tested before release. Nice then to see that it works exactly as advertised. From jabba@REDACTED Wed Nov 9 07:40:49 2005 From: jabba@REDACTED (Jani Launonen) Date: Wed, 9 Nov 2005 08:40:49 +0200 (EET) Subject: beating mnesia to death (was RE: Using 4Gb of ram with Erlang VM) In-Reply-To: References: Message-ID: Hello! On Wed, 9 Nov 2005, Ulf Wiger (AL/EAB) wrote: > To sum up my experiences on the 16 GB machine: > > - 64-bit erlang seems to work like a charm > - I stored 70 million records in a table in > one benchmark (15 GB of RAM usage), and > built a 5-million record replicated disc_copies > table in another. Everything worked pretty > much as expected, which was more than I > expected, actually(*). ;-) > - Loading 5 million records from disk took about > 27 seconds; loading over the network took > about as long. Building the table from > scratch took over two hours. > - I ran 6 million simultaneous processes; 20 M > when I used hibernate/3. Spawn and send times > were unaffected. > > My main gripe is that erlang terms take up > a huge amount of space on the heap, e.g. > 16 bytes per character in a string -- not > particularly sexy. In order to get large > amounts of data in there, you pretty much > have to use binaries. Great experiments to push Erlang to where Erlang hasn't gone before (to my knowledge)! I did try also push Erlang a bit in the past with university's 8x900MHz UltraSparcs with communicating ring of 20M (or so) processes. What I did try to find out was how bigger page sizes (4k, 64k, 512k, 4M or so) would affect such a test. The results didn't reveal any useful information. Perhaps your test with Mnesia would benefit from bigger page size? In case you're using Solaris, you could use ppgsz command to set different page sizes. Or you send the test scripts to me. > /Uffe > > (*) I know that OTP doesn't have this type > of hardware in their lab, so this stuff isn't > really tested before release. Nice then to see > that it works exactly as advertised. Cheers, -+-+-+- Jani Launonen From bmk@REDACTED Wed Nov 9 10:03:57 2005 From: bmk@REDACTED (Micael Karlberg) Date: Wed, 09 Nov 2005 10:03:57 +0100 Subject: Newbie question about Erlang and SNMP clients In-Reply-To: <2781f020511080719r20fcf0a0g140eff8a56060bbc@mail.gmail.com> References: <2781f020511080719r20fcf0a0g140eff8a56060bbc@mail.gmail.com> Message-ID: <4371BB7D.9000506@erix.ericsson.se> Hi, Joseph Stewart wrote: > Hello all, > > I'm just getting started with Erlang and wanted to know if the SNMP > library can be used to set a value, get a value, and walk a tree on > another device? It's used here at Ericsson in several projects. > > The documentation seems to focus on writing SNMP servers, so if anyone > has a simple example of client-type operations, I'd be most > appreciative! There is no manager related example included in the application, unless you count the stuff in the test directory (snmp_manager_user, snmp_manager_user_test_lib). I have thought about adding a simple manager cli, but never got the time to do it. > > -joe /BMK > > -- > If it ain't broke, break it. How else are you going to figure out how it works? > > From ulf.wiger@REDACTED Wed Nov 9 15:42:06 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 9 Nov 2005 15:42:06 +0100 Subject: quickly populating a disc_copy table Message-ID: When creating a large disc_copy table in mnesia, a performance tip is to first create it as a ram_copy (no replicas), and fill it using dirty writes. After that, use change_table_copy_type(Tab, Node, disc_copies), and perhaps add_table_copy(Tab, OtherNode, disc_copies) if you want it replicated. This will be radically (several hundred times) faster than creating it as a replicated disc_copy from the beginning and then writing one object at a time into it. Another, really sneaky, way of getting the job done quickly is to create a disc_copy table, stopping mnesia, and then opening /.DCD, and then using disk_log:log(MyTab, Term) for each object you want written. Then close the disk_log, start mnesia, and then possibly start other mnesia nodes that have replicas of the table. (*) (*) The Lifetime Mnesia Warranty will of course be void if you do this. Perhaps mnesia could provide a reasonably safe function for quickly building a large database from scratch? /Uffe From sanjaya@REDACTED Thu Nov 10 08:24:34 2005 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Thu, 10 Nov 2005 13:24:34 +0600 Subject: inets httpd - how to handle Message-ID: <005a01c5e5c7$cc7ffe40$5f00a8c0@wavenet.lk> Hi I'm trying to use inets for the first time as a http deamon & having trouble. Need any help from experts. what I did: 1.) copy the inets example server_root to the /tmp/vm/web/server_root/ 2.) change all paths in httpd.conf to the /tmp/vm/web/server_root/ & edit ErlScriptAlias as ErlScriptAlias /vm_db prof_db 3.) create vm_db folder as /tmp/vm/web/server_root/vm_db 4.) as a test I just create prof_upd.erl as follows & compile in the vm_db folder. (get the test function from httpd_example.erl) -module(prof_upd). -export([test/2]). test(Env,Input) -> %%----------Server Side Out Puts----------- InData = httpd:parse_query(Input), io:format("Env:~p~n",[Env]), io:format("GOT THIS: ~p~n",[InData]), %%----------Return to client--------------- %% Returning this ["", "", " A Test Page ", "", "", "

A TEST

", "", ""]. 5.) create inets.config as folows [{inets, [{services,[{httpd,"/tmp/vm/web/server_root/conf/httpd.conf"}]}] }]. 6.) start erlang using erl -sname vm -config /tmp/vm/web/server_root/conf/inets 7.) start the inets as application:start(inets). 8.) try to get the reqult using web browser from different mechine i.e http://192.168.1.95:8888/vm_db/prof_upd:test?a=qqq&b=eee what I get is: HTTP Error 403 - Forbidden Internet Explorer What I am doing wrong? why this happens? how to avoid this? are there any secutrity applies? what's the proper way get a http request to inets from browser & execute erlang code (ex: gen_sever:call) & send the result back? Need help from inets expert Thanks in advance Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanjaya@REDACTED Thu Nov 10 08:39:08 2005 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Thu, 10 Nov 2005 13:39:08 +0600 Subject: Fw: inets httpd - how to handle Message-ID: <009f01c5e5c9$d5c28750$5f00a8c0@wavenet.lk> reverting to my below mail: ErlScriptAlias should be corrected as ErlScriptAlias /vm_db prof_upd & Error should be corrected as HTTP 500 - Internal server error Internet Explorer Sorry for my mistake Sanjaya ----- Original Message ----- From: Sanjaya Vitharana To: erlang-questions@REDACTED Sent: Thursday, 10 November 2005 01:24 pm Subject: inets httpd - how to handle Hi I'm trying to use inets for the first time as a http deamon & having trouble. Need any help from experts. what I did: 1.) copy the inets example server_root to the /tmp/vm/web/server_root/ 2.) change all paths in httpd.conf to the /tmp/vm/web/server_root/ & edit ErlScriptAlias as ErlScriptAlias /vm_db prof_db 3.) create vm_db folder as /tmp/vm/web/server_root/vm_db 4.) as a test I just create prof_upd.erl as follows & compile in the vm_db folder. (get the test function from httpd_example.erl) -module(prof_upd). -export([test/2]). test(Env,Input) -> %%----------Server Side Out Puts----------- InData = httpd:parse_query(Input), io:format("Env:~p~n",[Env]), io:format("GOT THIS: ~p~n",[InData]), %%----------Return to client--------------- %% Returning this ["", "", " A Test Page ", "", "", "

A TEST

", "", ""]. 5.) create inets.config as folows [{inets, [{services,[{httpd,"/tmp/vm/web/server_root/conf/httpd.conf"}]}] }]. 6.) start erlang using erl -sname vm -config /tmp/vm/web/server_root/conf/inets 7.) start the inets as application:start(inets). 8.) try to get the reqult using web browser from different mechine i.e http://192.168.1.95:8888/vm_db/prof_upd:test?a=qqq&b=eee what I get is: HTTP Error 403 - Forbidden Internet Explorer What I am doing wrong? why this happens? how to avoid this? are there any secutrity applies? what's the proper way get a http request to inets from browser & execute erlang code (ex: gen_sever:call) & send the result back? Need help from inets expert Thanks in advance Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From event@REDACTED Mon Nov 7 14:17:21 2005 From: event@REDACTED (event@REDACTED) Date: Mon, 07 Nov 2005 14:17:21 +0100 Subject: EUMAS06: Call for participation Message-ID: <3.0.1.32.20051107141721.0106c0d0@mailhost.irit.fr> This is a short announcement to inform you that early registration for the 3rd European Workshop on Multi-Agent Systems (EUMAS 2005) has started. All details can be found at: http://como.vub.ac.be/eumas2005 Early registration runs until *16th of November*, late registration until *3rd of December*. Registration includes 2 full days of the event, including coffee, lunches, an electronic and a hard-copy version of the proceeding. We would like to draw your attention that one registration per paper is required in order to have your paper published in the proceedings. Note also that some student scholarships will be sponsored by Agentlink, please find the application details on the website. On the website, by following the link venue , you will also find information on hotels, and the preregistration on Tuesday evening the 6th of December. Looking forward to seeing you in Brussels, The EUMAS'2005 Organising Committee. *************************************************** Marie-Pierre Gleizes Equipe SMAC - IRIT - Universit? Paul Sabatier 118, route de Narbonne 31062 Toulouse C?dex - FRANCE http://www.irit.fr/SMAC/ T?l : 33 (0)5 61 55 82 94 Fax : 33 (0)5 61 55 62 58 ***************************************************** ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list runned by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From M.Fisher@REDACTED Thu Nov 10 10:53:05 2005 From: M.Fisher@REDACTED (Michael Fisher) Date: Thu, 10 Nov 2005 09:53:05 +0000 Subject: CFP: European Conference on Logics in AI [JELIA'06] Message-ID: <1131616385.4373188152ce4@cgi.server.csc.liv.ac.uk> +---------------------------------------------------------------+ | ***** CALL FOR PAPERS ***** | | ****** JELIA'06 ****** | | --------------------------- | | 10th European Conference on Logics in Artificial Intelligence | | Liverpool, U.K., September 13-15, 2006 | | http://www.csc.liv.ac.uk/~jelia | | | | ----> Submission deadline: 1st May 2006 <---- | +---------------------------------------------------------------+ JELIA'06 will bring together researchers interested in all aspects concerning the use of logics in AI to discuss current research, results, problems and applications of both a theoretical and practical nature. Authors are invited to submit papers presenting original and unpublished research in all areas related to the use of Logics in AI. Proceedings will be published by Springer-Verlag in the Lecture Notes on Artificial Intelligence series. All submissions must be received (in PS or PDF only) by 1st May, 2006, and should be submitted via the form available at the JELIA-06 web page. Papers should be written in English, and should be formatted according to the Springer LNCS style (with standard margins). There are two categories of submission: A. Regular papers. Submissions should not exceed 13 pages including figures, references, etc., and should contain original research, and sufficient detail to assess the merits and relevance of the contribution. B. Tool descriptions. Submissions should not exceed 4 pages, and should describe the implemented tool and its novel features. A demonstration is expected to accompany a tool presentation. IMPORTANT DATES Deadline for submission: 1st May, 2006 Notification of acceptance: 8th June, 2006 Camera Ready Copy: 26th June, 2006 For further details, including lists of Conference Officials and Programme Committee, see http://www.csc.liv.ac.uk/~jelia Send your questions and comments to jelia06@REDACTED -------------------------------------------------------------------- ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From ke.han@REDACTED Thu Nov 10 20:03:46 2005 From: ke.han@REDACTED (ke.han) Date: Fri, 11 Nov 2005 03:03:46 +0800 Subject: 64-bit erlang Message-ID: <43739992.8090105@redstarling.com> I am installing a new server: freeBSD 6.0 amd64 (actually EM64T Intel chips). 1 - When I compile erlang (from freeBSD ports) do I need to specify 64-bit build options? Any other build options I should be aware of? 2 - Is it possible to build/run 32-bit erlang from a 64-bit freeBSD install? thanks, ke han From dufflebunk@REDACTED Fri Nov 11 05:04:11 2005 From: dufflebunk@REDACTED (Paul Mahon) Date: Thu, 10 Nov 2005 23:04:11 -0500 Subject: Release Packages and Namespaces Message-ID: <1131681851.6096.55.camel@dufflebunk> I am trying to follow the information in the OTP design principals with a small application I'm making. I decided to try out the packages, so I have two modules, ymp.ymp and ymp.config. I can follow the instructions right up to the point of running systools:make_tar. The command either complains that it can't find a ymp.ymp.beam file, or else constructs the tar with the ymp.beam file in the lib/ymp-1.0/ebin directory rather than in lib/ymp-1.0/ebin/ymp. This causes running the application to fail since erl expects a module called ymp.ymp to be in a ymp subdirectory. Am I doing something completely wrong, or does systools not support the namespaces/packages module? Thank you for any help you can provide. The release file looks like this: {release, {"ymp", "0.1"}, {erts, "5.4.9"}, [ {kernel, "2.10.10"}, {stdlib, "1.13.9"}, {ymp, "0.1"}] }. And the .app file looks like this: {application, ymp, [ {description, "Yaws module packages"}, {vsn, "0.1"}, {modules, [ymp, config]}, {registered, [ymp_controler]}, {applications, []}, {mod, {ymp.ymp, [ {ymp_conf, "/home/dufflebunk/Projects/erlang/ymp/ymp.conf"} ]}} ]}. From gunilla@REDACTED Fri Nov 11 09:01:05 2005 From: gunilla@REDACTED (Gunilla Arendt) Date: Fri, 11 Nov 2005 09:01:05 +0100 Subject: Release Packages and Namespaces In-Reply-To: <1131681851.6096.55.camel@dufflebunk> References: <1131681851.6096.55.camel@dufflebunk> Message-ID: <43744FC1.50500@erix.ericsson.se> Unfortunately systools does not support packages. It's on the to-do list, but so far we haven't had the time to fix it. / Gunilla Erlang/OTP Paul Mahon wrote: > I am trying to follow the information in the OTP design principals with > a small application I'm making. I decided to try out the packages, so I > have two modules, ymp.ymp and ymp.config. I can follow the instructions > right up to the point of running systools:make_tar. The command either > complains that it can't find a ymp.ymp.beam file, or else constructs the > tar with the ymp.beam file in the lib/ymp-1.0/ebin directory rather than > in lib/ymp-1.0/ebin/ymp. This causes running the application to fail > since erl expects a module called ymp.ymp to be in a ymp subdirectory. > > Am I doing something completely wrong, or does systools not support the > namespaces/packages module? > > Thank you for any help you can provide. > > The release file looks like this: > {release, {"ymp", "0.1"}, > {erts, "5.4.9"}, > [ {kernel, "2.10.10"}, > {stdlib, "1.13.9"}, > {ymp, "0.1"}] > }. > > And the .app file looks like this: > {application, ymp, [ > {description, "Yaws module packages"}, > {vsn, "0.1"}, > {modules, [ymp, config]}, > {registered, [ymp_controler]}, > {applications, []}, > {mod, {ymp.ymp, [ > {ymp_conf, "/home/dufflebunk/Projects/erlang/ymp/ymp.conf"} > ]}} > ]}. > > > From icalp06@REDACTED Fri Nov 11 09:21:34 2005 From: icalp06@REDACTED (Convegno ICALP '06) Date: Fri, 11 Nov 2005 09:21:34 +0100 (CET) Subject: ICALP 2006 -- Call For Workshop Proposals Message-ID: ***** Apologies for multiple copies ***** 33rd International Colloquium on Automata, Languages and Programming ICALP 2006 S. Servolo, Venice - Italy Call for Affiliated Workshops Conference Dates: July 10-14, 2006 Affiliated Workshop Dates: July 9, 15, and 16, 2006 Researchers and practitioners are invited to submit proposals for workshops on topics related the conference tracks, namely: Algorithms, Automata, Complexity and Games (track A); Logic, Semantics, and Theory of Programming (track B); and Security and Cryptography Foundations (special track C). The purpose of the workshops is to provide participants a forum for presenting novel ideas and for discussing in a small and interactive atmosphere. The main responsibility of organising a workshop goes to the chairperson of the workshop. The format of each workshop is determined by its organisers. The workshop proposals will be selected by the ICALP organization, under advice of the ICALP PC chairs and EATCS. Proposals should include: * Name and duration (from half a day to two days) of the proposed workshop. * A short scientific summary of the topic, including a discussion on the relation with the ICALP topics. * A description of past versions of the workshop, including dates, organisers, submission and acceptance counts, attendance. * Procedures for selecting participants and papers, and expected number of participants. * Plans for dissemination (for example, published proceedings or special issues of journals). IMPORTANT DATES: November 27, 2005: Deadline for submitting workshop proposals December 16, 2005: Notification of acceptance Workshop proposals must be submitted in plain text, PDF or Postscript format by e-mail to icalp06@REDACTED For further information consult the ICALP 2006 web site: http://icalp06.dsi.unive.it/ or contact the ICALP 2006 Workshops Chairs: - Andrea Pietracaprina - Francesco Ranzato - Sabina Rossi From bjorn@REDACTED Fri Nov 11 11:46:04 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 11 Nov 2005 11:46:04 +0100 Subject: 64-bit erlang In-Reply-To: <43739992.8090105@redstarling.com> References: <43739992.8090105@redstarling.com> Message-ID: There is no direct configuration in Erlang/OTP for 32 vs 64 bits. Instead, if the Erlang/OTP is built with a C compiler that generates 64 bits executables, the Erlang emulator will be 64 bit enabled; otherwise it will be 32 bit. /Bjorn "ke.han" writes: > I am installing a new server: freeBSD 6.0 amd64 (actually EM64T Intel > chips). > 1 - When I compile erlang (from freeBSD ports) do I need to specify > 64-bit build options? Any other build options I should be aware of? > 2 - Is it possible to build/run 32-bit erlang from a 64-bit freeBSD install? > > thanks, ke han > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From heinrich@REDACTED Fri Nov 11 13:47:27 2005 From: heinrich@REDACTED (Heinrich Venter) Date: Fri, 11 Nov 2005 14:47:27 +0200 Subject: Inets httpd and script security Message-ID: Hi I have been playing around with inets:httpd and it is doing what I want. The question now is how do I secure script execution? I have the follwing in my config file ErlScriptAlias /handler config AuthDBType=plain AuthUserFile /tmp/passwd AuthName Configuration require user administrator In other words, I have a module called config in the code path of my application. If I get a request for http://my.server:8888/handler/config/queues it will execute the function config:queues/2 It does not execute the authorisation however. Since there is no physical directory called handler I have nowhere to put an .htaccess file. That is why I am trying to put the auth configuration in the main config file. Is this the way to secure script execution, or am I barking up the wrong tree? -]-[einrich -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjarne@REDACTED Fri Nov 11 20:12:20 2005 From: bjarne@REDACTED (=?iso-8859-1?Q?Bjarne_D=E4cker?=) Date: Fri, 11 Nov 2005 20:12:20 +0100 Subject: Photos from EUC'2005 References: <435FD4AA.1020503@hyber.org> <002a01c5db13$d2a94f60$bb0b69d4@segeltorp> Message-ID: <002001c5e6f3$d786bc20$a61c69d4@segeltorp> http://www.erlang.se/euc/05/photo/ This is fun as it gets ! Bjarne From fritchie@REDACTED Fri Nov 11 21:06:03 2005 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Fri, 11 Nov 2005 14:06:03 -0600 Subject: 64-bit erlang In-Reply-To: Message of "11 Nov 2005 11:46:04 +0100." Message-ID: <200511112006.jABK63Hn010517@snookles.snookles.com> >>>>> "bg" == Bjorn Gustavsson writes: bg> There is no direct configuration in Erlang/OTP for 32 vs 64 bits. bg> Instead, if the Erlang/OTP is built with a C compiler that bg> generates 64 bits executables, the Erlang emulator will be 64 bit bg> enabled; otherwise it will be 32 bit. That's what I'd discovered, after a bit of fiddling. I thought I'd RTFM'ed, but it was later at night than it should've been, so perhaps I missed something obvious. To build a 64-bit VM on Solaris using GCC, using 'CFLAGS="gcc -m64" ./configure' wasn't sufficient. I resorted to: % mkdir /tmp/gcc-hack % cat > /tmp/gcc-hack/gcc < Hello All, I have this requirement for a little app that sends udp datagrams to another host. For the moment I just want to concentrate on the sending. So I am assuming that I need to hold on to the open udp socket after creation and reuse it as work comes in. This presupposes a modest pool of worker processes. This in turn presupposes a supervisor that watches this pool of processes and balances load across them. This is all pretty easy to do in erlang, no problem. However, is it worth it? I wonder of managing the pool of processors and load balancing messages across them is going to be more expensive then just opening a udp connection when I need to send something. I don't use udp very often so advice is welcome. Just note that there is a valid use case for using udp instead of tcp in this instance. Here losing data doesn't hurt the overall system nor is there any need for an ack. So tcp is not indicated. Ok if I do need a pool of processors with there own connection I suspect the way to go is for a registered/named gen server to spawn a pool at a processes and handle routing messages, exit messages from pool members, etc. The pool members should then notify the gen server when they are done with whatever work they have been assigned. Thanks for your time. From erlang@REDACTED Sat Nov 12 05:10:09 2005 From: erlang@REDACTED (Michael McDaniel) Date: Fri, 11 Nov 2005 20:10:09 -0800 Subject: badmatch with chunked data (LONG) Message-ID: <20051112041009.GA15817@delora.autosys.us> I am apparently having a problem that I thought was fixed in an earlier inets release. Perhaps this is different problem? That problem is a badmatch error in inets when receiving chunked data. At least, I am pretty sure that is what is happening. I make a POST to a server and the response comes back chunked. I have never had problem with this application before when return xml information was much smaller (presumably always fit in single chunk before). I am on Linux using R10B-8 (inets-4.6.1) or R10B-6 (inets-4.5) Follows is the code that generates the problem with the proprietary information scrubbed ... Body = " ... " , Server = "server.example.com" , UPW = "some_username:password" , case (catch http:request(post, {"https://" ++ Server , [ {"Date", httpd_util:rfc1123_date()} , {"Host", Server} , {"REALM", "90X"} , {"API_VERSION", "T:2.9"} , {"Authorization", "Basic " ++ http_base_64:encode(UPW)} , {"Accept", "text/xml/html"}, {"User-Agent", "Erlang Client"} ], "text/xml; charset=utf-8", Body }, [{keepalive, false}, {nodelay,true}], [])) of {ok, Result} -> {ok, Result} ; {error, Reason} -> write Reason to log and do some other stuff . *** Follows is error with proprietary information scrubbed. I added line numbers for reference purposes. *** 1 =ERROR REPORT==== 11-Nov-2005::02:51:06 === 2 ** Generic server <0.22220.71> terminating 3 ** Last message in was {ssl,{sslsocket,5,<0.22221.71>}, 4 <<103, remaining binary information removed ... 5 10>>} 6 ** When Server state == {state,{request, 7 #Ref<0.0.63.220568>, 8 <0.20015.36>, 9 0, 10 https, 11 {"some.example.com",443}, 12 "/xmlreceiver", 13 [], 14 post, 15 {http_request_h, 16 undefined, 17 "keep-alive", 18 "Mon, 11 Nov 2005 09:51:05 GMT", 19 undefined, 20 undefined, 21 undefined, 22 undefined, 23 undefined, 24 undefined, 25 "text/xml/html", 26 undefined, 27 undefined, 28 undefined, 29 "Basic zecret", 30 undefined, 31 undefined, 32 "some.example.com/xmlreceiver", 33 undefined, 34 undefined, 35 undefined, 36 undefined, 37 undefined, 38 undefined, 39 undefined, 40 undefined, 41 undefined, 42 [], 43 "Erlang Client", 44 undefined, 45 undefined, 46 undefined, 47 "0", 48 undefined, 49 undefined, 50 undefined, 51 undefined, 52 undefined, 53 undefined, 54 [{"api_version","T:2.9"}, 55 {"realm","90X"}]}, 56 {"text/xml; charset=utf-8", 57 " ... "}, 58 {http_options,infinity,true,[],false}, 59 "https://some.example.com/xmlreceiver"}, 60 {tcp_session, 61 {{"some.example.com",443},<0.22220.71>}, 62 false, 63 https, 64 {sslsocket,5,<0.22221.71>}, 65 1}, 66 {"HTTP/1.1",200,"OK"}, 67 {http_response_h, 68 undefined, 69 undefined, 70 "Mon, 11 Nov 2005 09:51:05 GMT", 71 undefined, 72 undefined, 73 "chunked", 74 undefined, 75 undefined, 76 undefined, 77 undefined, 78 undefined, 79 undefined, 80 undefined, 81 undefined, 82 undefined, 83 "Sun-ONE-Web-Server/6.1", 84 undefined, 85 undefined, 86 undefined, 87 undefined, 88 undefined, 89 "0", 90 undefined, 91 undefined, 92 undefined, 93 "text/xml", 94 undefined, 95 undefined, 96 []}, 97 undefined, 98 {http_chunk, 99 decode_trailer, 100 [<<>>, 101 "nitsil/<> sdrawkcab s'taht ffuts erom <>", 102 [], 103 nolimit, 104 <<60, remaining binary information removed ... 105 115>>, 106 "16384"]}, 107 {[],[]}, 108 new, 109 [], 110 nolimit, 111 nolimit, 112 {options,{undefined,[]},0,2,2,disabled,enabled}, 113 {timers,[],undefined}} 114 ** Reason for termination == 115 ** {{badmatch,{[[], 116 "0", 117 "> ... ... \n"], 118 []}}, 119 [{http_response,headers,2}, 120 {http_chunk,handle_headers,2}, 121 {httpc_handler,handle_http_msg,2}, 122 {gen_server,handle_msg,6}, 123 {proc_lib,init_p,5}]} I hope I left enough information to be useful for someone to assist in resolving this problem. A very interesting item is on line 101, the data is all reversed prior to the binary data. I think that is an artifact of the error information but maybe not. I ran the same POST request to the same server using curl, and received proper return XML information which takes up more than 8192 octets (hence my thought about problem with chunked data with inets). Any suggestions are welcome as now I have run out of ideas on how to resolve problem. thanks, ~Michael Portland, Oregon, USA From kostis@REDACTED Sat Nov 12 12:01:18 2005 From: kostis@REDACTED (Kostis Sagonas) Date: Sat, 12 Nov 2005 12:01:18 +0100 (MET) Subject: 64-bit erlang In-Reply-To: Mail from 'Scott Lystig Fritchie ' dated: Fri, 11 Nov 2005 14:06:03 -0600 Message-ID: <200511121101.jACB1Igu005453@spikklubban.it.uu.se> Scott Lystig Fritchie wrote: > To build a 64-bit VM on Solaris using GCC, using 'CFLAGS="gcc -m64" > ./configure' wasn't sufficient. I resorted to: > > % mkdir /tmp/gcc-hack > % cat > /tmp/gcc-hack/gcc < #!/bin/sh > > exec /path/to/gcc -m64 $* > % chmod +x /tmp/gcc-hack/gcc > % set path = (/tmp/gcc-hack $path) > % ./configure .... > % make > > Ugly brute force, but it worked. Issuing the simple command: alias gcc='gcc -m64' would have achieved the same effect. Kostis From ft@REDACTED Sat Nov 12 12:35:59 2005 From: ft@REDACTED (Fredrik Thulin) Date: Sat, 12 Nov 2005 12:35:59 +0100 Subject: 64-bit erlang In-Reply-To: <200511121101.jACB1Igu005453@spikklubban.it.uu.se> References: <200511121101.jACB1Igu005453@spikklubban.it.uu.se> Message-ID: <200511121235.59951.ft@it.su.se> On Saturday 12 November 2005 12.01, Kostis Sagonas wrote: ... > Issuing the simple command: > > alias gcc='gcc -m64' > > would have achieved the same effect. No it wouldn't, since the 'gcc' command is executed by 'make' and not by your shell (which has the alias informatin for gcc). $ alias gcc alias gcc='gcc -m64' $ make ... make[2]: Entering directory `/home/ft/yxa/build/src/event_handler' gcc -Wall -c -o syslog_c-port.o ../../../trunk/src/event_handler/syslog_c-port.c ... /Fredrik From chandrashekhar.mullaparthi@REDACTED Sun Nov 13 07:55:01 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Sun, 13 Nov 2005 06:55:01 +0000 Subject: hanging on to open udp sockets. In-Reply-To: References: Message-ID: On 12/11/05, Eric Merritt wrote: > Hello All, > > I have this requirement for a little app that sends udp datagrams to > another host. For the moment I just want to concentrate on the > sending. So I am assuming that I need to hold on to the open udp > socket after creation and reuse it as work comes in. This presupposes > a modest pool of worker processes. This in turn presupposes a > supervisor that watches this pool of processes and balances load > across them. > For starters, I would just use one process to open the UDP socket and then use this process to send out all the UDP datagrams. This should be fast enough (in most cases - I'm assuming you have a modest load of a few hundred per second). cheers Chandru From cyberlync@REDACTED Sun Nov 13 09:31:16 2005 From: cyberlync@REDACTED (Eric Merritt) Date: Sun, 13 Nov 2005 00:31:16 -0800 Subject: hanging on to open udp sockets. In-Reply-To: References: Message-ID: Unfortunatly no. The average load of this app, as a whole, will be much, much higher then a few hundred per second. So I need to design with scalabilty in mind from the ground up. I have implemented the design I described, I will spend some time benchmarking it against a couple of other methods. We will see what works best. On 11/12/05, chandru wrote: > On 12/11/05, Eric Merritt wrote: > > Hello All, > > > > I have this requirement for a little app that sends udp datagrams to > > another host. For the moment I just want to concentrate on the > > sending. So I am assuming that I need to hold on to the open udp > > socket after creation and reuse it as work comes in. This presupposes > > a modest pool of worker processes. This in turn presupposes a > > supervisor that watches this pool of processes and balances load > > across them. > > > > For starters, I would just use one process to open the UDP socket and > then use this process to send out all the UDP datagrams. This should > be fast enough (in most cases - I'm assuming you have a modest load of > a few hundred per second). > > cheers > Chandru > From mickael.remond@REDACTED Sat Nov 12 16:32:56 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Sat, 12 Nov 2005 16:32:56 +0100 Subject: linux Erlang/OTP status (gumstix) In-Reply-To: <20051106005546.887B817347F@postfix3-1.free.fr> References: <20051105175518.3D4C617347F@postfix3-1.free.fr> <001201c5e253$d9cd23b0$4800a8c0@studioa> <20051106005546.887B817347F@postfix3-1.free.fr> Message-ID: <20051112153256.GA10240@memphis.process-one.net> * Pascal Brisset [2005-11-06 01:55:52 +0100]: > System Laptop Gumstix > CPU Pentium M PXA255 > Freq 900 MHz 200 MHz > Bogomips 1765 200 > Cache 1024 KiB 32+32 KiB > Mem 256 MiB 64 MiB > Kernel 2.6.3 2.6.10 > OTP R10B-7 R10B-8 > ackerman(3,11) 13 s 412 s > cheap-concurrency(3000) 0.6 s 26 s > > That's pretty good if you also take the size, weight, power > consumption and price into account. Maybe someone can provide > figures for a similar x86 embedded SBC or a Blackdog. Here are some figure for the Blackdog: System Laptop Blackdog CPU Pentium M PowerPC 400 (Virtex-II Pro) Freq 1.73 Ghz 384 Mhz Bogomips 1598 380 Cache 2048 KB ? Mem 1Go 64Mo Kernel 2.6.13 2.6.10 OTP R10B-6 R10B-8 ackerman(3,11) 8s 89s I do not know what your cheap-concurrency test is doing, but if you send it to me I can launch it for a comparison. I have been doing some concurrency test and manage to create 10000 thousands process in 173 microseconds and message passing took in average 15 microseconds. Cheers, -- Micka?l R?mond http://www.process-one.net/ From kwang@REDACTED Sat Nov 12 06:14:52 2005 From: kwang@REDACTED (Kwangkeun Yi) Date: Sat, 12 Nov 2005 14:14:52 +0900 Subject: SAS 2006: First Call for Paper Message-ID: <20051112051452.GA29084@ropas.snu.ac.kr> ***************************************************************************** First Call For Papers The 13th International Static Analysis Symposium (SAS'06) Seoul, Korea 29-31 August 2006 http://ropas.snu.ac.kr/sas06 ***************************************************************************** IMPORTANT DATES Submission: 7 April 2006 Notification: 26 May 2006 Camera-ready: 10 June 2006 SUMMARY Static Analysis is increasingly recognized as a fundamental tool for program verification, bug detection, compiler optimization, program understanding, and software maintenance. The series of Static Analysis Symposia has served as the primary venue for presentation of theoretical, practical, and application advances in the area. The Thirteenth International Static Analysis Symposium (SAS'06) will be held in Seoul, hosted by the Seoul National University. Previous symposia were held in London, Verona, San Diego, Madrid, Santa Barbara, Venice, Pisa, Paris, Aachen, Glasgow and Namur. The technical program for SAS'06 will consist of invited lectures, tutorials, presentations of refereed papers, and software demonstrations. Contributions are welcome on all aspects of Static Analysis, including, but not limited to abstract domains abstract interpretation abstract testing bug detection data flow analysis model checking program specialization security analysis theoretical frameworks type checking verifications new applications Submissions can address any programming paradigm, including concurrent, constraint, functional, imperative, logic and object-oriented programming. Survey papers, that present some aspect of the above topics with a new coherence, and application papers, that describe experience with industrial applications, are also welcomed. SUBMISSIONS INFORMATION - All submissions be submitted electronically online via the symposium web page http://ropas.snu.ac.kr/sas06. Acceptable formats are PostScript or PDF, viewable by Ghostview or Acrobat Reader. - Paper submissions should not exceed 15 pages in LNCS format, excluding bibliography and well-marked appendices. Program committee members are not required to read the appendices, and thus papers must be intelligible without them. - Papers must describe original work, be written and presented in English, and must not substantially overlap with papers that have been published or that are simultaneously submitted to a journal or a conference with refereed proceedings. - Submitted papers will be judged on the basis of significance, relevance, correctness, originality, and clarity. They should clearly identify what has been accomplished and why it is significant. - The proceedings will be published by Springer-Verlag's Lecture Notes in Computer Science series. PROGRAM CHAIR: Kwangkeun Yi (Seoul National U., Korea) Email: kwang@REDACTED PROGRAM COMMITTEE: Anindya Banerjee (Kansas State U., USA) Wei-Ngan Chin (National U. of Singapore, Singapore) Patrick Cousot (ENS Paris, France) Roberto Giacobazzi (U. of Verona, Italy) Chris Hankin (Imperial College, UK) Luddy Harrison (U. of Illinois at Urbana-Champaign, USA) Naoki Kobayashi (Tohoku U., Japan) Oukseh Lee (Hanyang U., Korea) Alan Mycroft (U. of Cambridge, UK) Kedar Namjoshi (Bell Labs., USA) Jens Palsberg (UCLA, USA) Andreas Podelski (Max-Planck-Institut, Germany) Ganesan Ramalingam (IBM T.J.Watson, USA) Radu Rugina (Cornell U., USA) Harald Sondergaard (U. of Melbourne, Australia) Zhendong Su (UC Davis, USA) Reinhard Wilhelm (U. des Saarlandes, Germany) Kwangkeun Yi (Seoul National U., Korea) ************************************************************************ From pascal.brisset@REDACTED Sun Nov 13 17:50:46 2005 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Sun, 13 Nov 2005 17:50:46 +0100 Subject: Performance of selective receive Message-ID: <20051113165041.E435117347F@postfix3-1.free.fr> Erlang's selective receive semantics definitely has advantages w.r.t. the FIFO communications found in other models. But it also comes with a performance penalty which has bitten us once in a production system. Ulf Wiger's presentation at EUC last week reminded me of it. Consider the following scenario: A server process is receiving requests at a constant rate. For each request, the server calls a backend service synchronously: server(State) -> receive Msg -> NewState = gen_server:call(backend, {State,Msg}), server(NewState) end. The system is dimensioned so that the CPU load is low (say 10 %). Now at some point in time, the backend service takes one second longer than usual to process one particular request. You'd expect that some requests will be delayed (by no more than one second) and that quality of service will return to normal within two seconds, since there is so much spare capacity. Instead, the following can happen: During the one second outage, requests accumulate in the message queue of the server process. Subsequent gen_server calls take more CPU time than usual because they have to scan the whole message queue to extract replies. As a result, more messages accumulate, and so on. snowball.erl (attached) simulates all this. It slowly increases the CPU load to 10 %. Then it pauses the backend for one second, and you can see the load rise to 100 % and remain there, although the throughput has fallen dramatically. Here are several ways to avoid this scenario: - When measuring the actual capacity of a system, always simulate all sorts of random delays and jitters everywhere. But in the example above, this would mean taking a huge security margin. - Explicitly detect the overload and reject requests when it occurs. This is the standard way of handling overloads. But it's hard to justify losing calls on a system that is running at 10 % CPU load. Plus, the overload develops so quickly that you need to flush the whole message queue in order to return to normal reasonably fast. - Add a proxy process dedicated to buffering requests from clients and making sure the message queue of the server remains small. This was suggested to me at the erlounge. It is probably the best solution, but it complicates process naming and supervision. And programmers just shouldn't have to wonder whether each server needs a proxy or not. - Modify Erlang to support multiple message queues per process. Essentially, this is what the buffering proxy above emulates. - Optimize the implementation of selective receive in the emulator. E.g. each message queue could have some kind of cache of the latest X receive patterns which have failed against the first Y messages of the queue. This is hard to implement in a useful way because of patterns with bound variables (see gen:wait_resp_mon/3). - Modify Erlang to add a "blocking send" primitive, or emulate it with rpc:call(process_info(Server,message_queue_len)), so that flow-control propagates end-to-end (ultimately, to some socket or file I/O). But bounding queues may introduce deadlocks. Any other ideas ? -- Pascal -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: snowball.erl URL: From sean.hinde@REDACTED Sun Nov 13 18:31:29 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Sun, 13 Nov 2005 17:31:29 +0000 Subject: Performance of selective receive In-Reply-To: <20051113165041.E435117347F@postfix3-1.free.fr> References: <20051113165041.E435117347F@postfix3-1.free.fr> Message-ID: Alternative proposal: Never, but never use async messages into a blocking server from the outside world. The way to avoid this is to make the socket process (or whatever it is) make a synchronous call into the gen_server process. You then have to make the gen_server itself not block. The neatest way is to spawn a new process to make the blocking call to the backend, and use the gen_server:reply/2 mechanism to reply later. You could also use a pool of backend processes and reject if you hit "congestion". see http://www.trapexit.org/docs/howto/ simple_non_blocking_pattern.html for one solution. Sean On 13 Nov 2005, at 16:50, Pascal Brisset wrote: > Erlang's selective receive semantics definitely has advantages > w.r.t. the FIFO communications found in other models. > But it also comes with a performance penalty which has bitten us > once in a production system. Ulf Wiger's presentation at EUC > last week reminded me of it. Consider the following scenario: > > > A server process is receiving requests at a constant rate. For > each request, the server calls a backend service synchronously: > > server(State) -> > receive Msg -> > NewState = gen_server:call(backend, {State,Msg}), > server(NewState) > end. > > The system is dimensioned so that the CPU load is low (say 10 %). > Now at some point in time, the backend service takes one second > longer than usual to process one particular request. > You'd expect that some requests will be delayed (by no more than > one second) and that quality of service will return to normal > within two seconds, since there is so much spare capacity. > > Instead, the following can happen: During the one second outage, > requests accumulate in the message queue of the server process. > Subsequent gen_server calls take more CPU time than usual because > they have to scan the whole message queue to extract replies. > As a result, more messages accumulate, and so on. > > snowball.erl (attached) simulates all this. It slowly increases > the CPU load to 10 %. Then it pauses the backend for one second, > and you can see the load rise to 100 % and remain there, although > the throughput has fallen dramatically. > > > Here are several ways to avoid this scenario: > > - When measuring the actual capacity of a system, always simulate > all sorts of random delays and jitters everywhere. But in the > example above, this would mean taking a huge security margin. > > - Explicitly detect the overload and reject requests when it occurs. > This is the standard way of handling overloads. But it's hard to > justify losing calls on a system that is running at 10 % CPU load. > Plus, the overload develops so quickly that you need to flush the > whole message queue in order to return to normal reasonably fast. > > - Add a proxy process dedicated to buffering requests from clients > and making sure the message queue of the server remains small. > This was suggested to me at the erlounge. It is probably the > best solution, but it complicates process naming and supervision. > And programmers just shouldn't have to wonder whether each server > needs a proxy or not. > > - Modify Erlang to support multiple message queues per process. > Essentially, this is what the buffering proxy above emulates. > > - Optimize the implementation of selective receive in the emulator. > E.g. each message queue could have some kind of cache of the latest > X receive patterns which have failed against the first Y messages > of the queue. This is hard to implement in a useful way because > of patterns with bound variables (see gen:wait_resp_mon/3). > > - Modify Erlang to add a "blocking send" primitive, or emulate it > with rpc:call(process_info(Server,message_queue_len)), so that > flow-control propagates end-to-end (ultimately, to some socket > or file I/O). But bounding queues may introduce deadlocks. > > Any other ideas ? > > -- Pascal > > > %% Demonstration of the snowball effect triggered by a transient > %% overload and selective receive on a long message queue. > %% Assumes /proc/stat in linux-2.6.3 format. > > %% Increate InitialPeriod if your system is too slow. > > -module(snowball). > -compile(export_all). > > run() -> > {ok,_} = gen_server:start_link({local,backend}, ?MODULE, 0, []), > Server = spawn_link(?MODULE, server, [undefined]), > spawn_link(?MODULE, monitor, [Server, get_ticks(), 0]), > InitialPeriod = 500, > Client = spawn_link(?MODULE, client, [Server, InitialPeriod]), > receive after 2000 -> ok end, > incr_load(Server, Client, get_ticks()), > receive after 10000 -> ok end, > gen_server:call(backend, pause), > receive after 60000 -> ok end, > erlang:halt(). > > incr_load(Server, Client, {PrevBusy,PrevTotal}) -> > receive after 10000 -> ok end, > {Busy,Total} = Ticks = get_ticks(), > Load = (Busy-PrevBusy) * 100 div (Total-PrevTotal), > io:format("Average load was ~w %.~n", [Load]), > if Load < 10 -> Client ! speedup, incr_load(Server, Client, > Ticks); > true -> io:format("~nModerate load reached.~n~n") > end. > > monitor(Server, {PrevBusy,PrevTotal}, PrevCount) -> > receive after 1000 -> ok end, > {_, MQL} = process_info(Server, message_queue_len), > {Busy,Total} = Ticks = get_ticks(), > Count = gen_server:call(backend, read), > Load = (Busy-PrevBusy) * 100 div (Total-PrevTotal), > io:format("queue_length=~w load=~w % rate=~w/s~n", > [MQL, Load, Count-PrevCount]), > monitor(Server, Ticks, Count). > > get_ticks() -> > {ok, F} = file:open("/proc/stat", [read]), > case io:fread(F, '', "~*s ~d ~d ~d ~d") of > {ok, [T1,T2,T3,T4]} -> file:close(F), {T1+T2+T3, T1+T2+T3+T4}; > _ -> exit(unsupported_proc_stat_format) > end. > > utime() -> > {MS,S,US} = now(), > (MS*1000000+S)*1000000 + US. > > %%%% Client. > > client(Server, Period) -> > io:format("~nClient sending ~w messages/s.~n~n", [1000000 div > Period]), > client(Server, Period, utime()). > > client(Server, Period, Next) -> > Wait = lists:max([0, Next-utime()]) div 1000, > receive speedup -> client(Server, Period*4 div 5) > after Wait -> Server ! "hello", client(Server, Period, Next > +Period) > end. > > %%%% Server. > > server(State) -> > receive Msg -> > NewState = gen_server:call(backend, {State,Msg}), > server(NewState) > end. > > %%%% Backend. > > init(State) -> > {ok, State}. > > handle_call(pause, _From, State) -> > io:format("~nBackend pausing for 1 second.~n~n"), > receive after 1000 -> ok end, > {reply, ok, State}; > handle_call(read, _From, State) -> > {reply, State, State}; > handle_call({S,_Msg}, _From, State) -> > {reply, S, State+1}. > > %%%% From todd@REDACTED Sun Nov 13 19:04:41 2005 From: todd@REDACTED (todd) Date: Sun, 13 Nov 2005 10:04:41 -0800 Subject: Performance of selective receive In-Reply-To: <20051113165041.E435117347F@postfix3-1.free.fr> References: <20051113165041.E435117347F@postfix3-1.free.fr> Message-ID: <43778039.8080801@possibility.com> Wow, that's really interesting, thanks for the writeup. In non-erlang systems where we've had similar issues, the "best" solution we found was to use end-to-end flow control. Keep messages on the sender side until your system can handle the load. CPU load was one of the considerations used in deciding if work could be accepted, as was memory, and several others. Most other solutions simply mask the problem until some other horrible scenario comes up. By keeping work on the sender side you may also be able to take advantage of certain optimizations, like combining work or canceling work. You also minimize dealing with drops and drop handling. Having unconstrained senders turns out to be a gun that can fire at anytime. Pascal Brisset wrote: >Erlang's selective receive semantics definitely has advantages >w.r.t. the FIFO communications found in other models. >But it also comes with a performance penalty which has bitten us >once in a production system. Ulf Wiger's presentation at EUC >last week reminded me of it. Consider the following scenario: > > >A server process is receiving requests at a constant rate. For >each request, the server calls a backend service synchronously: > > server(State) -> > receive Msg -> > NewState = gen_server:call(backend, {State,Msg}), > server(NewState) > end. > >The system is dimensioned so that the CPU load is low (say 10 %). >Now at some point in time, the backend service takes one second >longer than usual to process one particular request. >You'd expect that some requests will be delayed (by no more than >one second) and that quality of service will return to normal >within two seconds, since there is so much spare capacity. > >Instead, the following can happen: During the one second outage, >requests accumulate in the message queue of the server process. >Subsequent gen_server calls take more CPU time than usual because >they have to scan the whole message queue to extract replies. >As a result, more messages accumulate, and so on. > >snowball.erl (attached) simulates all this. It slowly increases >the CPU load to 10 %. Then it pauses the backend for one second, >and you can see the load rise to 100 % and remain there, although >the throughput has fallen dramatically. > > >Here are several ways to avoid this scenario: > >- When measuring the actual capacity of a system, always simulate > all sorts of random delays and jitters everywhere. But in the > example above, this would mean taking a huge security margin. > >- Explicitly detect the overload and reject requests when it occurs. > This is the standard way of handling overloads. But it's hard to > justify losing calls on a system that is running at 10 % CPU load. > Plus, the overload develops so quickly that you need to flush the > whole message queue in order to return to normal reasonably fast. > >- Add a proxy process dedicated to buffering requests from clients > and making sure the message queue of the server remains small. > This was suggested to me at the erlounge. It is probably the > best solution, but it complicates process naming and supervision. > And programmers just shouldn't have to wonder whether each server > needs a proxy or not. > >- Modify Erlang to support multiple message queues per process. > Essentially, this is what the buffering proxy above emulates. > >- Optimize the implementation of selective receive in the emulator. > E.g. each message queue could have some kind of cache of the latest > X receive patterns which have failed against the first Y messages > of the queue. This is hard to implement in a useful way because > of patterns with bound variables (see gen:wait_resp_mon/3). > >- Modify Erlang to add a "blocking send" primitive, or emulate it > with rpc:call(process_info(Server,message_queue_len)), so that > flow-control propagates end-to-end (ultimately, to some socket > or file I/O). But bounding queues may introduce deadlocks. > >Any other ideas ? > >-- Pascal > > > > >------------------------------------------------------------------------ > >%% Demonstration of the snowball effect triggered by a transient >%% overload and selective receive on a long message queue. >%% Assumes /proc/stat in linux-2.6.3 format. > >%% Increate InitialPeriod if your system is too slow. > >-module(snowball). >-compile(export_all). > >run() -> > {ok,_} = gen_server:start_link({local,backend}, ?MODULE, 0, []), > Server = spawn_link(?MODULE, server, [undefined]), > spawn_link(?MODULE, monitor, [Server, get_ticks(), 0]), > InitialPeriod = 500, > Client = spawn_link(?MODULE, client, [Server, InitialPeriod]), > receive after 2000 -> ok end, > incr_load(Server, Client, get_ticks()), > receive after 10000 -> ok end, > gen_server:call(backend, pause), > receive after 60000 -> ok end, > erlang:halt(). > >incr_load(Server, Client, {PrevBusy,PrevTotal}) -> > receive after 10000 -> ok end, > {Busy,Total} = Ticks = get_ticks(), > Load = (Busy-PrevBusy) * 100 div (Total-PrevTotal), > io:format("Average load was ~w %.~n", [Load]), > if Load < 10 -> Client ! speedup, incr_load(Server, Client, Ticks); > true -> io:format("~nModerate load reached.~n~n") > end. > >monitor(Server, {PrevBusy,PrevTotal}, PrevCount) -> > receive after 1000 -> ok end, > {_, MQL} = process_info(Server, message_queue_len), > {Busy,Total} = Ticks = get_ticks(), > Count = gen_server:call(backend, read), > Load = (Busy-PrevBusy) * 100 div (Total-PrevTotal), > io:format("queue_length=~w load=~w % rate=~w/s~n", > [MQL, Load, Count-PrevCount]), > monitor(Server, Ticks, Count). > >get_ticks() -> > {ok, F} = file:open("/proc/stat", [read]), > case io:fread(F, '', "~*s ~d ~d ~d ~d") of > {ok, [T1,T2,T3,T4]} -> file:close(F), {T1+T2+T3, T1+T2+T3+T4}; > _ -> exit(unsupported_proc_stat_format) > end. > >utime() -> > {MS,S,US} = now(), > (MS*1000000+S)*1000000 + US. > >%%%% Client. > >client(Server, Period) -> > io:format("~nClient sending ~w messages/s.~n~n", [1000000 div Period]), > client(Server, Period, utime()). > >client(Server, Period, Next) -> > Wait = lists:max([0, Next-utime()]) div 1000, > receive speedup -> client(Server, Period*4 div 5) > after Wait -> Server ! "hello", client(Server, Period, Next+Period) > end. > >%%%% Server. > >server(State) -> > receive Msg -> > NewState = gen_server:call(backend, {State,Msg}), > server(NewState) > end. > >%%%% Backend. > >init(State) -> > {ok, State}. > >handle_call(pause, _From, State) -> > io:format("~nBackend pausing for 1 second.~n~n"), > receive after 1000 -> ok end, > {reply, ok, State}; >handle_call(read, _From, State) -> > {reply, State, State}; >handle_call({S,_Msg}, _From, State) -> > {reply, S, State+1}. > >%%%% > > From ernie.makris@REDACTED Sun Nov 13 19:16:41 2005 From: ernie.makris@REDACTED (Ernie Makris) Date: Sun, 13 Nov 2005 13:16:41 -0500 Subject: gen_tcp:unrecv Message-ID: <43778309.2020203@comcast.net> Hello All, Is gen_tcp:unrecv safe to use? It is not in the public documentation for gen_tcp, so I wasn't sure if it was safe/smart to use in production apps. Thanks Ernie From pascal.brisset@REDACTED Sun Nov 13 19:18:00 2005 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Sun, 13 Nov 2005 19:18:00 +0100 Subject: Performance of selective receive In-Reply-To: References: <20051113165041.E435117347F@postfix3-1.free.fr> Message-ID: <20051113181746.B6C4D17347F@postfix3-1.free.fr> Sean Hinde writes: > Alternative proposal: > > Never, but never use async messages into a blocking server from the > outside world. The way to avoid this is to make the socket process > (or whatever it is) make a synchronous call into the gen_server > process. Agreed, it's all about propagating flow-control end-to-end. Note that if the "socket process" uses {active,true}, it might itself be susceptible to the "snowball effect" - unless we are talking about a well-behaved network protocol with end-to-end flow control, in which case there is no need to worry at all. Also, consider a scenario with not one client (or socket process), but 1000. Even if each client calls the server synchronously, the server can still have as much as 1000 requests in its message queue. That's enough to trigger a snowball effect. > You then have to make the gen_server itself not block. The > neatest way is to spawn a new process to make the blocking call to > the backend, and use the gen_server:reply/2 mechanism to reply later. > You could also use a pool of backend processes and reject if you hit > "congestion". Sometimes you just can't process requests asynchronously. In our case, the server was a session manager which *must* read and update a local mnesia table of active sessions before it can process the next message. As Ulf highlighted, there are blocking calls hidden everywhere. There's nothing wrong with that, as long as your system is dimensioned correctly. The problem is that a 10 % CPU load can suddenly turn into 100 % if you add a few thousand messages in the wrong message queue. -- Pascal From spearce@REDACTED Sun Nov 13 19:33:28 2005 From: spearce@REDACTED (Shawn Pearce) Date: Sun, 13 Nov 2005 13:33:28 -0500 Subject: Performance of selective receive In-Reply-To: <43778039.8080801@possibility.com> References: <20051113165041.E435117347F@postfix3-1.free.fr> <43778039.8080801@possibility.com> Message-ID: <20051113183328.GA7112@spearce.org> todd wrote: > Having unconstrained senders turns out to be a gun that can fire > at anytime. This is always true of any system. Send in work at a rate faster than the server can process and you are sure to overload the server. I remember working with a Java system which averaged about 2 seconds of CPU computation (on a specific SPARC processor) to process a single request from a client. A customer wanted to deliver about 100 requests/second. For some strange reason the developers of this Java application thought we could do this with 10 CPUs in a single Solaris box. Hah! Since the protocol was HTTP, what we found was the clients would connect, issue the request, timeout in 5 seconds, disconnect and immediately retry. Meanwhile the HTTP server and Java servlet container were queuing requests and processing them in the order they were received. Almost immediately the system would enter a state wherein every client was timing out and automatically retrying; further compounding the problem. At least until the OS ran out of both physical memory and swap and started killing processes at random to reclaim memory. At that point the JVMs would be dead, the web server would be dead, and clients started getting connection refused messages. *sigh* The test case which started this thread is quite interesting. I wouldn't expect to lose 90% of a CPU to Erlang's mailbox scanning during selective receive. Of course it makes some sense after reading the descriptions that have been posted in this thread, but it still is unexpected. -- Shawn. From harrisbhatti@REDACTED Sun Nov 13 20:14:28 2005 From: harrisbhatti@REDACTED (M. Harris Bhatti) Date: Sun, 13 Nov 2005 19:14:28 +0000 Subject: Mnemosyne + erl_eval Message-ID: Hi all, Writing up a function that can handle dynamic fields and retrieve those from the database. The core of it is to evaluate a query in string form and returning its handle to be evaluated by Mnemosyne. Here are the steps: Generating the query ListComprehension end. syntax for the query in string form. Scanning it, parsing it and then evaluating it. Now when I try to evaluate it using erl_eval:expr I get an error with an exit value {{mnemosyne,"query",},[{erl_eval,expr,2}]}. Can somebody explain to me what does this mean? Thanks, -- Harris M. Bhatti From erlang@REDACTED Sun Nov 13 20:34:05 2005 From: erlang@REDACTED (Michael McDaniel) Date: Sun, 13 Nov 2005 11:34:05 -0800 Subject: Inets HTTP client stability In-Reply-To: <20051027183806.GN12411@delora.autosys.us> References: <20051027183806.GN12411@delora.autosys.us> Message-ID: <20051113193405.GJ15817@delora.autosys.us> On Thu, Oct 27, 2005 at 11:38:06AM -0700, Michael McDaniel wrote: > On Thu, Oct 27, 2005 at 02:34:21PM +0200, Heinrich Venter wrote: > > Hi all. > > > > I am about to develop an app that will act as an http gateway for some of the > > services we are running. For the incoming http requests I plan to use httpd > > from inets. For the outgonig leg it would thus make sense to use the http > > client from inets. > > My question is wether any one else is using the inets http client for medium to > > high volume outgoing traffic? I know of two instances where people chose to > > create a java node to make http connections, instead of using inets. > > Is it worth the risk to try the inets solution first, or should I budget the > > time to make a java node and try to upgrade to inets later? > > Any one with experience in this regard? > > > > The requirements for the http client will be that many connections will be made > > to a series of speciffic URLs. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > I have successfully been using http:request/4 for doing POSTs for a > few months now in a production system. I am very happy with the > results (and Erlang!). > > See code below... > > The production system is not supporting heavy traffic (though the customer > hopes to make more sales!); however, during testing I was very pleased. > > The destination server is provided by another company, and their > testing server could not keep up with my load testing. At one point I > had between 800-900 http:request/4s backed up retrying as described > below. All the POSTs eventually were successful with a response from the > test server. An abbreviated version of the code is below... > > > -define(DEFAULT_TIMEOUT, 2000). > MyFun(Timeout, Body) -> > > case (catch http:request(post, > {"http://example.com/path/" , > [ > {"Date", httpd_util:rfc1123_date()} , > {"Host", "example.com"} , > {"Accept", "text/xml/html"}, > {"User-Agent", "Demo Erlang Client"} > ], "text/xml; charset=utf-8", Body }, > [{keepalive, false}, {nodelay,true}], [])) of > {ok, Result} -> {ok, Result} ; > {error, Reason} -> > Result = null , > mylogger:log_error(?MODULE, ?LINE, > 'MyFun, http:request', "failed, see /tmp/my.log"), > {ok, Io} = file:open('/tmp/my.log', [append]) , > io:fwrite(Io, "~26p, ~p~n", > [erlang:localtime(), Reason]) , > file:close(Io) , > if TimeOut > 8192000 -> % milliseconds > timer:sleep(TimeOut/8) , > ?MODULE:MyFun(?DEFAULT_TIMEOUT,Body); > true -> > timer:sleep(TimeOut) , > ?MODULE:MyFun(2*TimeOut,Body) > end > end , > > %%% Do something with Result ... > > end. > > Of course you could give up eventually but I "know" I'll eventually be > able to get where I'm POSTing to, hence the endless retries. > > You may prefer to spawn rather than serialize the repeat fun calls as > I have done. > > Please anyone mention if there are more accepted/efficient ways of > accomplishing the above. I still consider myself very novice with > Erlang and Erlang idioms. I have not yet started using OTP yet, > and still am writing "pure" Erlang. I have a new project coming up > and will probably dabble with OTP on that one. > > ~Michael > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ An update regarding the above code in production. I recently discovered (see my message with "Subject: badmatch with chunked data (LONG)") that my code does not handle chunked data coming back from the server as required by rfc2616 in Section 3.6.1 Chunked Transfer Coding ... All HTTP/1.1 applications MUST be able to receive and decode the "chunked" transfer-coding, and MUST ignore chunk-extension extensions they do not understand. ---- I still do not understand why I am getting the badmatch from http:request/4 as described in my message with "Subject: badmatch with chunked data (LONG)" It appears that http:request/4 itself is crashing. Having said all that, I tried ibrowse (Chandrus http client) as suggested by Peter Lund in this thread. It works with the chunked data. So, if you continue to use http:request/4, be sure to test it with chunked data before using it in production. ~Michael Portland, Oregon, USA From chandrashekhar.mullaparthi@REDACTED Sun Nov 13 21:48:22 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Sun, 13 Nov 2005 20:48:22 +0000 Subject: Inets HTTP client stability In-Reply-To: <20051113193405.GJ15817@delora.autosys.us> References: <20051027183806.GN12411@delora.autosys.us> <20051113193405.GJ15817@delora.autosys.us> Message-ID: On 13/11/05, Michael McDaniel wrote: > An update regarding the above code in production. I recently > discovered (see my message with > "Subject: badmatch with chunked data (LONG)") > > that my code does not handle chunked data coming back from > the server as required by rfc2616 in > The transfer encoding should be transparent to the client and should be handled by the HTTP client. Glad to see that ibrowse is useful to you. If you need any features, don't hesitate to drop me a line. cheers Chandru From vlad_dumitrescu@REDACTED Sun Nov 13 22:01:53 2005 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Sun, 13 Nov 2005 22:01:53 +0100 Subject: [Ann] Erlide release 0.3.5 Message-ID: Hi everyone, sorry for any double postings. There was enough interest at EUC for me to want to announce on both lists and to be reasonably sure it's not going to be qualified as spam. I'd like to announce a new release of Erlide. There are few visible improvements in this release compared to the latest public one (0.3.3). But the "behind the scenes" work is almost done, and now I will try to concentrate on those visible parts that really make life easier. * The most important is that it runs even with 3.1.1 and 3.2M3. * The outline shows (sometimes :-) real information about the currently open Erlang file. * as usual, several small fixes Homepage: http://erlide.sourceforge.net/ Eclipse update site: http://erlide.sourceforge.net/update Downloads: update site: http://sourceforge.net/project/showfiles.php?group_id=58889&package_id=145847&release_id=370670 sources an all: http://sourceforge.net/project/showfiles.php?group_id=58889&package_id=54859&release_id=370672 Also, I received a couple of questions about if help is needed. Yes, please! Quoting from the FAQ on the site, Can I help? Sure! All help is welcome! Register as a developer by contacting me, or develop by yourself some cool feature and submit it later. If the feature is something you'd expect in any decent IDE, check first if it isn't already under development. best regards, Vlad From vlad_dumitrescu@REDACTED Sun Nov 13 22:19:13 2005 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Sun, 13 Nov 2005 22:19:13 +0100 Subject: [Ann] Erlide release 0.3.5 References: Message-ID: Of course I had to forget to remove a hardcoding... so it won't work for you unless you set your .cookie to the right value... Ask me what that is, if you're impatient, or please wait until a new announcement... Sorry for the inconvenience! regards, Vlad From erlang@REDACTED Sun Nov 13 22:32:14 2005 From: erlang@REDACTED (Michael McDaniel) Date: Sun, 13 Nov 2005 13:32:14 -0800 Subject: Inets HTTP client stability In-Reply-To: References: <20051027183806.GN12411@delora.autosys.us> <20051113193405.GJ15817@delora.autosys.us> Message-ID: <20051113213214.GK15817@delora.autosys.us> On Sun, Nov 13, 2005 at 08:48:22PM +0000, chandru wrote: > On 13/11/05, Michael McDaniel wrote: > > An update regarding the above code in production. I recently > > discovered (see my message with > > "Subject: badmatch with chunked data (LONG)") > > > > that my code does not handle chunked data coming back from > > the server as required by rfc2616 in > > > > The transfer encoding should be transparent to the client and should > be handled by the HTTP client. Glad to see that ibrowse is useful to > you. If you need any features, don't hesitate to drop me a line. > > cheers > Chandru ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Thank you, yes. Happy you used edoc tags also. So far I have been playing with ibrowse though not in production yet. Based on your comment above, I infer that the inets http module is not rfc2616 compliant with regard to chunked data? Or is there something I am doing wrong in using it? My original thought was that a problem was still in http module, then I thought my code using it was wrong, now I am very confused (though happy that ibrowse retrieves the chunked data correctly!). My preference would be to use the inets http code since it is delivered with Erlang system. ~Michael From vlad_dumitrescu@REDACTED Sun Nov 13 22:36:55 2005 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Sun, 13 Nov 2005 22:36:55 +0100 Subject: [Ann] Erlide release 0.3.5 References: Message-ID: I really should work less :-) I think that the released version works anyway. The cookie was hardcoded, but in both the Java and the Erlang node. If there's any problem, please let me know. sorry again, Vlad ----- Original Message ----- From: "Vlad Dumitrescu" To: "Vlad Dumitrescu" ; "- Erlide" ; "- Erlang Questions" Sent: Sunday, November 13, 2005 10:19 PM Subject: Re: [Ann] Erlide release 0.3.5 > Of course I had to forget to remove a hardcoding... so it won't work for > you unless you set your .cookie to the right value... Ask me what that is, > if you're impatient, or please wait until a new announcement... > > Sorry for the inconvenience! > > regards, > Vlad From alexey@REDACTED Sun Nov 13 22:42:58 2005 From: alexey@REDACTED (Alexey Shchepin) Date: Sun, 13 Nov 2005 23:42:58 +0200 Subject: odbc:sql_query error using postgres Message-ID: <87u0egp6l9.fsf@alex.sevcom.net> Hi! When using postresql 7.4 or 8.0, odbc:sql_query returns error result if DELETE query remove no records from table, while it should return {update,0}: $ erl Erlang (BEAM) emulator version 5.4.10 [source] [threads:0] Eshell V5.4.10 (abort with ^G) 1> {ok, Ref} = odbc:connect("DSN=ejabberd;UID=ejabberd;PWD=ejabberd", [{scrollable_cursors, off}]). =INFO REPORT==== 13-Nov-2005::23:16:10 === The odbc application was not started. Has now been started as a temporary application. {ok,<0.38.0>} 2> odbc:sql_query(Ref, "delete from users where username='zzz'"). {error,"No SQL-driver information available."} 3> odbc:sql_query(Ref, "insert into users values ('zzz', 'zzz')"). {updated,1} 4> odbc:sql_query(Ref, "delete from users where username='zzz'"). {updated,1} 5> odbc:sql_query(Ref, "delete from users where username='zzz'"). {error,"No SQL-driver information available."} Tested on R10B-7 and R10B-8. From pascal.brisset@REDACTED Sun Nov 13 23:21:13 2005 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Sun, 13 Nov 2005 23:21:13 +0100 Subject: Performance of selective receive In-Reply-To: <43778039.8080801@possibility.com> References: <20051113165041.E435117347F@postfix3-1.free.fr> <43778039.8080801@possibility.com> Message-ID: <20051113222100.34A6A173480@postfix3-1.free.fr> todd writes: > Having unconstrained senders turns out to be a gun that can fire at anytime. Note that in my example, the sender *is* constrained: it has bounded request rate and jitter. It's just not flow-controlled. This is very common: input traffic comes through a pipe that can't physically carry more than X requests per second; or an SLA says the system must be able to process X requests per second, but is allowed to reject traffic beyond that. In such situations the usual approach is to benchmark the system and check that it needs e.g. less than 10 % CPU to process 2*X calls/s. My point is: For a system which does selective receive on uncontrolled message queues, 10 % might not be a safe level at all - unless you have included in your benchmark all sorts of weird behaviours covering not only the variability of the input traffic, but also random delays and jitters in the runtime system, OS, internal network, disk throughput, management operations, etc. -- Pascal From sean.hinde@REDACTED Sun Nov 13 23:23:42 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Sun, 13 Nov 2005 22:23:42 +0000 Subject: Performance of selective receive In-Reply-To: <20051113181746.B6C4D17347F@postfix3-1.free.fr> References: <20051113165041.E435117347F@postfix3-1.free.fr> <20051113181746.B6C4D17347F@postfix3-1.free.fr> Message-ID: <952805CD-1CB7-4F97-86B0-B6B344820293@gmail.com> On 13 Nov 2005, at 18:18, Pascal Brisset wrote: > Sean Hinde writes: >> Alternative proposal: >> >> Never, but never use async messages into a blocking server from the >> outside world. The way to avoid this is to make the socket process >> (or whatever it is) make a synchronous call into the gen_server >> process. > > Agreed, it's all about propagating flow-control end-to-end. > > Note that if the "socket process" uses {active,true}, it might > itself be susceptible to the "snowball effect" - unless we are > talking about a well-behaved network protocol with end-to-end > flow control, in which case there is no need to worry at all. Yes, of course. You should use {active, once}. I will update the tutorial one day. > > Also, consider a scenario with not one client (or socket process), > but 1000. Even if each client calls the server synchronously, the > server can still have as much as 1000 requests in its message queue. > That's enough to trigger a snowball effect. No. This is only true if the server actually blocks. By the use of gen_server:reply/2 you can make every caller believe that it has made exclusive use of the server, but in fact the server can simply pass the messages straight through (maybe updating some local internal state on the way through). If you use {active, once} in your sockets then they will all hold back more traffic from the network until they get a reply from the server. It is pretty unlikely that all 1000 servers sent their requests at exactly the same moment, and even if they did, the system would recover quickly, not spiral into meltdown as it would in the async case. The limit of the system then becomes the number of clients and the real processing required from each one, not some unfortunate message storm. > > >> You then have to make the gen_server itself not block. The >> neatest way is to spawn a new process to make the blocking call to >> the backend, and use the gen_server:reply/2 mechanism to reply later. >> You could also use a pool of backend processes and reject if you hit >> "congestion". > > Sometimes you just can't process requests asynchronously. > In our case, the server was a session manager which *must* > read and update a local mnesia table of active sessions > before it can process the next message. Yes, that's fine, that is most likely required in such scenarios. This is a different case to waiting for many seconds for some other system to respond. The erlang scheduler is fair given half a chance. In this case that means replacing the cast to your internal server with a call. Under normal traffic the sync call sends twice as many messages. But you don't need to worry about that as you are not overloaded. When you are overloaded making this synchronous saves you 100% from these message storms. I looked into a system once which suffered from this. Each client made 5 async sends to a central logging server before yielding. After a certain load the system bogged down. By simply making these requests syncronous the overall throughput of the system greatly increased and it remained consistent under sustained load. > > As Ulf highlighted, there are blocking calls hidden everywhere. > There's nothing wrong with that, as long as your system is > dimensioned correctly. The problem is that a 10 % CPU load can > suddenly turn into 100 % if you add a few thousand messages in > the wrong message queue. No. If that happens the problem is that the Erlang program is not correctly designed. Telephone systems have to handle 95% of maximum supported load while being attacked with 100 times that load. Erlang is designed for telephone systems by the biggest supplier of telephone systems in the world. It works. Sean From todd@REDACTED Sun Nov 13 23:35:19 2005 From: todd@REDACTED (todd) Date: Sun, 13 Nov 2005 14:35:19 -0800 Subject: Performance of selective receive In-Reply-To: <20051113222100.34A6A173480@postfix3-1.free.fr> References: <20051113165041.E435117347F@postfix3-1.free.fr> <43778039.8080801@possibility.com> <20051113222100.34A6A173480@postfix3-1.free.fr> Message-ID: <4377BFA7.3090206@possibility.com> Pascal Brisset wrote: >todd writes: > > Having unconstrained senders turns out to be a gun that can fire at anytime. > >Note that in my example, the sender *is* constrained: it has >bounded request rate and jitter. It's just not flow-controlled. > > Imho if there is no feedback of consumers back to the producers then there is only notional contstraint as it assumes ideal everything. As nothing is ideal we need feedback to adapt to reality. From david.nospam.hopwood@REDACTED Sun Nov 13 23:50:30 2005 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Sun, 13 Nov 2005 22:50:30 +0000 Subject: Performance of selective receive In-Reply-To: <20051113165041.E435117347F@postfix3-1.free.fr> References: <20051113165041.E435117347F@postfix3-1.free.fr> Message-ID: <4377C336.2030502@blueyonder.co.uk> Pascal Brisset wrote: > Erlang's selective receive semantics definitely has advantages > w.r.t. the FIFO communications found in other models. > But it also comes with a performance penalty which has bitten us > once in a production system. The problem is that each selective receive operation has no bound on how long it may take. This is because selective receive categorizes messages at the time of the receive operation; also, the categories are not fixed in advance, they are specified dynamically as a parameter to the operation. If messages are instead categorized as they are queued, with one message queue for each of a fixed set of categories, then the blocking process can take messages from any required queue in essentially O(1) time. Of course this doesn't by itself address the issue of messages possibly being sent faster than the server can keep up -- in many (most?) cases you still need end-to-end flow control. But the semantics of Erlang's selective receive are problematic for real-time systems even when end-to-end flow control is used, because flow control relies on the good behaviour of all clients in order to avoid backlogs. This clearly cannot be hard real-time, and it isn't good enough even for many soft real-time systems. I think this is quite an important issue in the design of asynchronous message passing languages. Such languages should IMHO have: - first-class message queues, where it is possible to reflect on the sequence of messages currently in the queue. This is strictly more expressive than Erlang-style selective receive; the extra expressiveness is needed to implement policies like discarding messages when a server has fallen too far behind. - a library of policies that cover the most common cases. For example, "normally FIFO, but discard messages that have not been processed in time t." - some way to apply a policy to any server, without obscuring the server's logic and without requiring its clients to change. - syntactic sugar for the case where you want all messages matching a given pattern to be directed to a particular queue. It may be that that these features are only used for a small proportion of servers. Still, I think that there is sufficient justification to include them in a language, since the workarounds needed if you don't have first-class message queues are quite ugly (and if you have first-class queues, the other features are cheap). -- David Hopwood From pascal.brisset@REDACTED Mon Nov 14 02:33:59 2005 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Mon, 14 Nov 2005 02:33:59 +0100 Subject: Performance of selective receive In-Reply-To: <952805CD-1CB7-4F97-86B0-B6B344820293@gmail.com> References: <20051113165041.E435117347F@postfix3-1.free.fr> <20051113181746.B6C4D17347F@postfix3-1.free.fr> <952805CD-1CB7-4F97-86B0-B6B344820293@gmail.com> Message-ID: <20051114013345.AD82117347F@postfix3-1.free.fr> Sean Hinde writes: > Yes, of course. You should use {active, once}. I will update the > tutorial one day. OK, good point. > No. This is only true if the server actually blocks. By the use of > gen_server:reply/2 you can make every caller believe that it has made > exclusive use of the server, but in fact the server can simply pass > the messages straight through (maybe updating some local internal > state on the way through). Agreed. But this boils down to passing requests to the backend as fast as possible, hot-potato style, and hoping that it can cope with lots of pending requests itself. > Yes, that's fine, that is most likely required in such scenarios. > This is a different case to waiting for many seconds for some other > system to respond. The erlang scheduler is fair given half a chance. > In this case that means replacing the cast to your internal server > with a call. So here is another demo with synchronous calls instead of casts: 1000 servers, each sending 10 synchronous requests to the server every second. On my PC it starts at 10 % CPU load and 10000 msg/s. Then the backend is paused for one second. Afterward, the program stabilizes at 100 % CPU and 600 msg/s, with a huge message queue. Maybe that's a problem with my system. Someone please confirm. > It is pretty unlikely that all 1000 servers sent their > requests at exactly the same moment, and even if they did, the system > would recover quickly, not spiral into meltdown as it would in the > async case. I claim that if the server loop has several receive statements, one of which is a selective receive, then as the message queue grows, each loop becomes more expensive. If this extra burden exceeds whatever spare CPU capacity the system had initially, it may fail to recover. > No. If that happens the problem is that the Erlang program is not > correctly designed. I agree. I am only saying that this design error is not trivial. Once you are aware of it, a lot of strange fluctuations in CPU load begin to make sense, and you can fix things. It would be even better if we could optimize selective receive so as to remove the mere possibility of running into trouble. -- Pascal -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: syncsnowball.erl URL: From sean.hinde@REDACTED Mon Nov 14 03:15:19 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Mon, 14 Nov 2005 02:15:19 +0000 Subject: Performance of selective receive In-Reply-To: <20051114013345.AD82117347F@postfix3-1.free.fr> References: <20051113165041.E435117347F@postfix3-1.free.fr> <20051113181746.B6C4D17347F@postfix3-1.free.fr> <952805CD-1CB7-4F97-86B0-B6B344820293@gmail.com> <20051114013345.AD82117347F@postfix3-1.free.fr> Message-ID: <4EAEA445-73DD-40D3-B77F-68864430557A@gmail.com> On 14 Nov 2005, at 01:33, Pascal Brisset wrote: > Sean Hinde writes: > > >> No. This is only true if the server actually blocks. By the use of >> gen_server:reply/2 you can make every caller believe that it has made >> exclusive use of the server, but in fact the server can simply pass >> the messages straight through (maybe updating some local internal >> state on the way through). > > Agreed. But this boils down to passing requests to the backend > as fast as possible, hot-potato style, and hoping that it can > cope with lots of pending requests itself. Coping with genuine overload (i.e. you have exceeded the total CPU capacity of the system) is a different requirement to avoiding creating your own overload. If the CPU can't keep up then so be it.. > > >> Yes, that's fine, that is most likely required in such scenarios. >> This is a different case to waiting for many seconds for some other >> system to respond. The erlang scheduler is fair given half a chance. >> In this case that means replacing the cast to your internal server >> with a call. > > So here is another demo with synchronous calls instead of casts: > 1000 servers, each sending 10 synchronous requests to the server > every second. On my PC it starts at 10 % CPU load and 10000 msg/s. > Then the backend is paused for one second. Afterward, the program > stabilizes at 100 % CPU and 600 msg/s, with a huge message queue. > Maybe that's a problem with my system. Someone please confirm. No, It is a still a problem with the design. There is a difference between an internal "backend" simply blocking itself for 1 second, and an internal server which is sending requests to an external system which pauses for 1 second. In the second case you can design the internal server to not block itself. If it exceeds the maximum number of requests allowed to be outstanding towards the "external" backend, then it can just return an immediate error. Your new example looks mostly like a test designed to expose the "message queue backlog problem" of erlang, which no-one denies is present. > > >> It is pretty unlikely that all 1000 servers sent their >> requests at exactly the same moment, and even if they did, the system >> would recover quickly, not spiral into meltdown as it would in the >> async case. > > I claim that if the server loop has several receive statements, > one of which is a selective receive, then as the message queue grows, > each loop becomes more expensive. If this extra burden exceeds > whatever > spare CPU capacity the system had initially, it may fail to recover. I see that. I guess you just have to be selective about where you apply this mechanism ;-) Maybe, just maybe, using selective receive right in the centre of the system in a critical server is not the right place :) > > >> No. If that happens the problem is that the Erlang program is not >> correctly designed. > > I agree. I am only saying that this design error is not trivial. > Once you are aware of it, a lot of strange fluctuations in CPU load > begin to make sense, and you can fix things. It would be even better > if we could optimize selective receive so as to remove the mere > possibility of running into trouble. If this is possible without losing messages or the elegant simplicity of erlang then I agree. Otherwise AXD-301 stands as a stunning example that it can be designed correctly. One thing I have used before is the overload module of OTP. If you can shed input load before the CPU gets 100% busy then the response to excessive demand can be made very clean and well behaved. Sean From aserebre@REDACTED Sun Nov 13 19:51:42 2005 From: aserebre@REDACTED (A Serebrenik) Date: Sun, 13 Nov 2005 19:51:42 +0100 (CET) Subject: Call For Papers - ICLP 2006 Message-ID: FIRST CALL FOR PAPERS ICLP'06 22nd International Conference on Logic Programming Seattle, Washington, USA, 17-20 August, 2006 http://www.cs.uky.edu/iclp06/ Part of Fourth Federated Logic Conference, FLoC 2006 http://research.microsoft.com/floc06/ CONFERENCE SCOPE Since the first conference held in Marseilles in 1982, ICLP has been the premier international conference for presenting research in logic programming. Contributions (papers and posters) are sought in all areas of logic programming including but not restricted to: * Theory: Semantic Foundations, Formalisms, Nonmonotonic Reasoning, Knowledge Representation. * Implementation: Compilation, Memory Management, Virtual Machines, Parallelism. * Environments: Program Analysis, Program Transformation, Validation and Verification, Debugging, Profiling. * Language Issues: Concurrency, Objects, Coordination, Mobility, Higher Order, Types, Modes, Programming Techniques. * Alternative Paradigms: Constraint Logic Programming, Abductive Logic Programming, Inductive Logic Programming, Answer-Set Programming. * Applications: Deductive Databases, Data Integration, Software Engineering, Natural Language, Web Tools, Internet Agents, Artificial Intelligence. The three broad categories for submissions are: (1) technical papers, where specific attention will be given to work providing novel integrations of the areas listed above, (2) application papers, where the emphasis will be on their impact on the application domain as opposed to the advancement of the the state-of-the-art of logic programming, and (3) posters, ideal for presenting and discussing current work not yet ready for publication, for PhD thesis summaries and research project overviews. In addition to papers and posters, the technical program will include invited talks, advanced tutorials, several workshops and Doctoral Student Consortium. Details, as they become available will be posted at http://www.cs.uky.edu/iclp06/ PAPERS AND POSTERS Papers and posters must describe original, previously unpublished research, and must not be simultaneously submitted for publication elsewhere. They must be written in English. Technical papers and application papers must not exceed 15 pages in the Springer LNCS format (cf. http://www.springer.de/comp/lncs/index.html). The limit for posters is 2 pages in that format. The primary means of submission will be electronic. More information on the submission procedure will be available at http://www.cs.uky.edu/iclp06/ PUBLICATION The proceedings of the conference will be published by Springer-Verlag in the LNCS series. The proceedings will include the accepted papers and the abstracts of accepted posters. SUPPORT SPONSORING AND AWARDS The conference is sponsored by the Association for Logic Programming. The ALP has funds to assist financially disadvantaged participants. The ALP is planning to sponsor two awards for ICLP'06: for the best technical paper and for the best student paper. IMPORTANT DATES Papers Posters Abstract submission deadline 14 February N/A Submission deadline 21 February 14 March Notification of authors 7 April 14 April Camera-ready copy due 2 May 2 May ICLP'2006 ORGANIZATION General Chair: Manuel Hermenegildo (herme@REDACTED) Program Co-Chairs: Sandro Etalle (s.etalle@REDACTED) Mirek Truszczynski (mirek@REDACTED) Workshop Chair: Christian Schulte (schulte@REDACTED) Doctoral Student Consortium: Enrico Pontelli (epontell@REDACTED) Publicity Chair: Alexander Serebrenik (a.serebrenik@REDACTED) PROGRAM COMMITTEE Maria Alpuente Krzysztof Apt Annalisa Bossi Veronica Dahl Giorgio Delzanno Pierre Deransart Agostino Dovier Thomas Eiter Sandro Etalle, co-chair John Gallagher Michael Gelfond Hai-Feng Guo Manuel Hermenegildo Tomi Janhunen Fangzhen Lin Michael Maher Victor Marek Eric Monfroy Stephen Muggleton Brigitte Pientka Maurizio Proietti I.V. Ramakrishnan Peter van Roy Harald Sondergaard Mirek Truszczynski, co-chair German Vidal Andrei Voronkov Roland Yap CONFERENCE VENUE The conference will be a part of the fourth Federated Logic Conference (FLoC'06) to be held August 10-21, 2006, in Seattle, Washington (http://research.microsoft.com/floc06/). Other participating conferences are: Computer-Aided Verification (CAV), Rewriting Techniques and Applications (RTA), Logic in Computer Science (LICS), Theory and Applications of Satisfiability Testing (SAT), and Int'l Joint Conference on Automated Reasoning (IJCAR). Plenary events involving multiple conferences are planned. From ulf.wiger@REDACTED Mon Nov 14 09:49:57 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 14 Nov 2005 09:49:57 +0100 Subject: Performance of selective receive Message-ID: One thing to keep in mind is that there are two sides to the "performance of selective receive" problem: 1) Can you get into trouble when you use selective receive in the wrong place? 2) Is Erlang's implementation of selective receive efficient? On (1), the answer is undoubtedly "yes". On (2), I would say "definitely", given the Erlang semantics. If you need selective receive, you will not gain performance by pulling the first available message out of the queue, and implementing your own buffering and continuations at the "user level". One could have imagined a process having multiple message queues. Then, selective receive would have involved focusing on one queue, or a few queues at any given time, and message buildup in a queue that is currently out of scope is not a problem (presumably). Of course, you can achieve this effect with multiple processes in erlang. In fact, this is also how Hoare approaches (or rather dismisses) buffering selective receive in CSP: if you want it, create a buffering process next to your regular process. From the standpoint of CSP algebra, it makes perfect sense, but in practice, it will only work if processes are truly lightweight enough. Now, Erlang's processes are pretty lightweigth... For your problem, you could perhaps heed Hoare's suggestion, and insert a buffering process between the socket process and the server, unless you simply want the socket process to do buffering, and perhaps put it in passive mode? The AXD301 approach would be to suck the messages into Erlang as efficiently as possible, and then get the request into a prioritizing job regulator. Some jobs are rejectable, and others aren't. Yet other messages belong to a job that you've already committed to complete; they get higher priority than initial job requests, and so on... /Uffe From chandrashekhar.mullaparthi@REDACTED Mon Nov 14 10:26:41 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Mon, 14 Nov 2005 09:26:41 +0000 Subject: Inets HTTP client stability In-Reply-To: <20051113213214.GK15817@delora.autosys.us> References: <20051027183806.GN12411@delora.autosys.us> <20051113193405.GJ15817@delora.autosys.us> <20051113213214.GK15817@delora.autosys.us> Message-ID: Hi, On 13/11/05, Michael McDaniel wrote: > Based on your comment above, I infer that the inets http module is > not rfc2616 compliant with regard to chunked data? Or is there > something I am doing wrong in using it? It must be a problem with the http module. Like I said, those are details which should be hidden from the user of the HTTP client. > My preference > would be to use the inets http code since it is delivered with > Erlang system. Sure. FWIW, we (T-Mobile UK) use ibrowse in two different production environments making millions of requests.... cheers Chandru From heinrich@REDACTED Mon Nov 14 11:28:32 2005 From: heinrich@REDACTED (Heinrich Venter) Date: Mon, 14 Nov 2005 12:28:32 +0200 Subject: Inets httpd and script security Message-ID: Hi I have found the solution to my problem below. There were two things 1) The "AuthDBType plain" directive should have been "AuthDBType plain". The match in mod_auth is on "AuthDBType " 2) If the auth_type is plain then mod_auth_plain assumes that AuthGroupFile is defined. If it is not then inets does not start up with the following error. I don't think this is the correct behaviour. =SUPERVISOR REPORT==== 14-Nov-2005::11:51:20 === Supervisor: {local,httpd_instance_sup_8888} Context: start_error Reason: {'EXIT',{function_clause, [{lists,do_flatten,[undefined,[]]}, {lists,do_flatten,2}, {mod_auth_plain,load_group,1}, {mod_auth_plain,store_directory_data,2}, {mod_auth,store,2}, {httpd_conf,store_traverse,3}, {httpd_conf,store,4}, {httpd_manager,do_initial_store,1}]}} So to get authentication on a script, the following config works ... ErlScriptAlias /handler config ... AuthDBType plain AuthUserFile /dir/to/passwd AuthGroupFile /dir/to/group AuthName Configuration allow from all require user administrator require group admin -]-[einrich From laura@REDACTED Mon Nov 14 11:36:41 2005 From: laura@REDACTED (Laura M. Castro) Date: Mon, 14 Nov 2005 11:36:41 +0100 Subject: odbc:sql_query error using postgres In-Reply-To: <87u0egp6l9.fsf@alex.sevcom.net> References: <87u0egp6l9.fsf@alex.sevcom.net> Message-ID: <437868B9.4050201@alfa21.com> Hello Alexey, > When using postresql 7.4 or 8.0, odbc:sql_query returns error result if > DELETE query remove no records from table, while it should return {update,0}: This is a known problem that was pointed out more or less a month and a half ago: http://www.erlang.org/ml-archive/erlang-questions/200509/msg00422.html After a few discussion, the conclusion was that it was indeed a bug in the ODBC Erlang code (it was precisely identified and located), and they have created a ticket for it to be fixed. So the only thing to do is waiting and maybe fixing the code you are running meanwhile. Best regards, Laura M. Castro From laura@REDACTED Mon Nov 14 11:39:43 2005 From: laura@REDACTED (Laura M. Castro) Date: Mon, 14 Nov 2005 11:39:43 +0100 Subject: odbc:sql_query error using postgres In-Reply-To: <87u0egp6l9.fsf@alex.sevcom.net> References: <87u0egp6l9.fsf@alex.sevcom.net> Message-ID: <4378696F.9010808@alfa21.com> Hello Alexey: > When using postresql 7.4 or 8.0, odbc:sql_query returns error result if > DELETE query remove no records from table, while it should return {update,0}: This is a known problem that was pointed out more or less a month and a half ago: http://www.erlang.org/ml-archive/erlang-questions/200509/msg00422.html After some discussion, the conclusion was that it was indeed a bug in the ODBC Erlang code (it was precisely identified and located), and they have created a ticket for it to be fixed. So the only thing to do is waiting and maybe patching the code you are running meanwhile. Best regards, Laura Castro From hans.bolinder@REDACTED Mon Nov 14 13:20:56 2005 From: hans.bolinder@REDACTED (hans.bolinder@REDACTED) Date: Mon, 14 Nov 2005 13:20:56 +0100 Subject: Mnemosyne + erl_eval In-Reply-To: References: Message-ID: <17272.33064.686020.604221@gargle.gargle.HOWL> [M. Harris Bhatti:] > The core of it is to evaluate a query in string form and returning > its handle to be evaluated by Mnemosyne. There is an undocumented function mnemosyne:string_to_handle, but I don't think it's working. We no longer actively support Mnemosyne, so don't hold your breath for bugfixes... Instead we recommend QLC, a module in STDLIB. The function qlc:string_to_handle creates a handle given a string. Best regards, Hans Bolinder, Erlang/OTP From ernie.makris@REDACTED Mon Nov 14 17:07:23 2005 From: ernie.makris@REDACTED (Ernie Makris) Date: Mon, 14 Nov 2005 11:07:23 -0500 Subject: gen_tcp:unrecv In-Reply-To: <43778309.2020203@comcast.net> References: <43778309.2020203@comcast.net> Message-ID: <4378B63B.5090905@comcast.net> Hello All, I noticed in the ssh application, on jungerl, that unrecv is used in the ssh_proto.erl file in the ssh_main function. Tony Rogvall is the author of that file. Tony, if you are on this list, have you ever seen issues with using unrecv? I'm a little unsure about using it since its undocumented. Thanks Ernie Ernie Makris wrote: >Hello All, > >Is gen_tcp:unrecv safe to use? It is not in the public documentation for >gen_tcp, so I wasn't sure if >it was safe/smart to use in production apps. > >Thanks >Ernie > > > From matthias@REDACTED Mon Nov 14 18:55:08 2005 From: matthias@REDACTED (Matthias Lang) Date: Mon, 14 Nov 2005 18:55:08 +0100 Subject: gen_tcp:unrecv In-Reply-To: <4378B63B.5090905@comcast.net> References: <43778309.2020203@comcast.net> <4378B63B.5090905@comcast.net> Message-ID: <17272.53116.425184.466302@antilipe.corelatus.se> Ernie Makris writes: > I noticed in the ssh application, on jungerl, that unrecv is used in the > ssh_proto.erl > file in the ssh_main function. > Tony Rogvall is the author of that file. Tony, if you are on this list, > have you ever seen > issues with using unrecv? I'm a little unsure about using it since its > undocumented. Tony wrote most of the inet driver, i.e. gen_tcp:unrecv and inet_drv.c, so it's not altogether surprising that he's using some of his own undocumented code. In general, undocumented code is something you use at your own risk. Matthias From erlang@REDACTED Mon Nov 14 19:01:29 2005 From: erlang@REDACTED (Michael McDaniel) Date: Mon, 14 Nov 2005 10:01:29 -0800 Subject: Inets HTTP client stability In-Reply-To: References: <20051027183806.GN12411@delora.autosys.us> <20051113193405.GJ15817@delora.autosys.us> <20051113213214.GK15817@delora.autosys.us> Message-ID: <20051114180129.GQ15817@delora.autosys.us> On Mon, Nov 14, 2005 at 09:26:41AM +0000, chandru wrote: > Hi, > > On 13/11/05, Michael McDaniel wrote: > > Based on your comment above, I infer that the inets http module is > > not rfc2616 compliant with regard to chunked data? Or is there > > something I am doing wrong in using it? > > It must be a problem with the http module. Like I said, those are > details which should be hidden from the user of the HTTP client. > > > My preference > > would be to use the inets http code since it is delivered with > > Erlang system. > > Sure. FWIW, we (T-Mobile UK) use ibrowse in two different production > environments making millions of requests.... > > cheers > Chandru ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Thank you for the feedback, Chandru. Hmmm, millions of requests... I'm feeling more tempted, though! I'll wait a bit more and see what OTP folks say about inets-4.6.1. ~Michael From ernie.makris@REDACTED Mon Nov 14 19:00:46 2005 From: ernie.makris@REDACTED (Ernie Makris) Date: Mon, 14 Nov 2005 13:00:46 -0500 Subject: gen_tcp:unrecv In-Reply-To: <17272.53116.425184.466302@antilipe.corelatus.se> References: <43778309.2020203@comcast.net> <4378B63B.5090905@comcast.net> <17272.53116.425184.466302@antilipe.corelatus.se> Message-ID: <4378D0CE.7040209@comcast.net> Hi Matthias, Thats what I thought:) I was hoping on the unlikely chance that it was accidentally ommitted from the documentation:) I took a look at the implementation and it looks ok. Thanks Ernie Matthias Lang wrote: >Ernie Makris writes: > > > I noticed in the ssh application, on jungerl, that unrecv is used in the > > ssh_proto.erl > > file in the ssh_main function. > > Tony Rogvall is the author of that file. Tony, if you are on this list, > > have you ever seen > > issues with using unrecv? I'm a little unsure about using it since its > > undocumented. > >Tony wrote most of the inet driver, i.e. gen_tcp:unrecv and >inet_drv.c, so it's not altogether surprising that he's using some of >his own undocumented code. > >In general, undocumented code is something you use at your own risk. > >Matthias > > > From tony@REDACTED Mon Nov 14 20:52:41 2005 From: tony@REDACTED (Tony Rogvall) Date: Mon, 14 Nov 2005 20:52:41 +0100 Subject: gen_tcp:unrecv In-Reply-To: <4378D0CE.7040209@comcast.net> References: <43778309.2020203@comcast.net> <4378B63B.5090905@comcast.net> <17272.53116.425184.466302@antilipe.corelatus.se> <4378D0CE.7040209@comcast.net> Message-ID: 14 nov 2005 kl. 19.00 skrev Ernie Makris: > Hi Matthias, > > Thats what I thought:) I was hoping on the unlikely chance that it was > accidentally ommitted from > the documentation:) > I took a look at the implementation and it looks ok. > The unrecv has limited use, but come in handy sometimes :-) I guess that is the reason why it is still undocumented.... /Tony From harrisbhatti@REDACTED Mon Nov 14 22:02:26 2005 From: harrisbhatti@REDACTED (M. Harris Bhatti) Date: Mon, 14 Nov 2005 21:02:26 +0000 Subject: QLC Projection Message-ID: Hi, Is it possible to project only a selected number of fields using QLC? -- Harris M. Bhatti From ok@REDACTED Tue Nov 15 03:09:27 2005 From: ok@REDACTED (Richard A. O'Keefe) Date: Tue, 15 Nov 2005 15:09:27 +1300 (NZDT) Subject: Performance of selective receive Message-ID: <200511150209.jAF29Rtx089163@atlas.otago.ac.nz> It seems to me that the mailbox rescannign problem can be at least greatly ameliorated at fairly low cost, without change to syntax or semantics. First off, let's consider how many different receives a process is likely to execute. We really need some good runtime statistics on this. But we can get some kind of clue by counting the number of receives per module #M #R #R is the number of receives in a module. 1088 0 #M is the number of modules with that many receives. 98 1 So 1088 modules have no receive, 98 have one, 60 2 60 have two, ..., and 1 module has twenty-one receives. 40 3 22 4 15 5 11 6 3 7 5 8 8 9 3 10 2 11 1 12 1 13 1 19 1 21 Most processes "belong" to some one module, so this gives us some idea of how many receives a process might have. It's an underestimate, because of behaviours and the like. Consider a typical receive: receive {Port, {data, [Command, $o, $k]}} -> ... ; {Port, {data, [Command |T]}} -> ... ; {Port, Else} -> ... ; {'EXIT', Port, normal} -> ... ; {'EXIT', Port, Error} -> ... end the bodies of the choices don't actually matter here. In fact we could imagine this done as case receive(fun ({P,{data,[C,$o,$k]}}) when P = Port -> {1,C} ; ({P,{data,[C|T]}}) when P = Port -> {2,C,T} ; ({P,E}) when P = Port -> {3,E} ; ({'EXIT',P,normal}) when P = Port -> {4} ; ({'EXIT',P,E}) when P = Port -> {5,E} ; (_) -> [] end) of {1,Command} -> ... ; {2,Command,T} -> ... ; {3,E} -> ... ; {4} -> ... ; {5,E} -> ... end The point I want to make here is that there is a clear separation between the matching code and the action code, and that receive can be done by passing *something* to a built-in operation which just determines which is the first match, if any, and returns selected data. In the matching code, we find - constants and constructors - bound variables - don't-care variables (variables which, whatever their spelling, are dead after the match) - response variables (variables which are unbound before the match, and are live after it). We can *completely* characterise the matching part of a receive request by - the sequence of patterns and responses (which is nothing more or less than a program point) - a tuple of all the bound variables. So any particular instance of the receive shown above can be characterised by {<>, Port}. In fact, we can go a step further, as I'll explain later. Now here's the idea. In addition to its mailbox/message queue, a process should maintain a cache of {{Which_Match,V1,...,Vn}, Last_Scan} pairs, where {Which_Match,V1,...,Vn} groups a sequence of patterns and responses and Last_Scan identifies the last message to have been examined (unsuccessfully, of course) by the receive in question. Now when a new receive is done, you scan the cache looking for a {Which_Match,V1,...,Vn} key that is equal to the new one. If you find a match, you resume scanning from just after that message. If you do not find a match, you start scanning from the beginning. How big should the cache be? That's really a matter for measurement, not guessing, but I would *guess* that 4 entries with an LRU policy might be enough. There are a number of fairly obvious refinements of this. From Bob.Smart@REDACTED Tue Nov 15 04:46:26 2005 From: Bob.Smart@REDACTED (Bob.Smart@REDACTED) Date: Tue, 15 Nov 2005 14:46:26 +1100 Subject: JSON? Message-ID: I'll bet someone has implemented JSON (http://www.crockford.com/JSON/index.html) for Erlang, but it is not in the implementation list on the web site. If not, I'd welcome any comments on how to do it in Erlang, otherwise I'm sure to muck it up. Bob From fritchie@REDACTED Tue Nov 15 08:20:52 2005 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Tue, 15 Nov 2005 01:20:52 -0600 Subject: 64-bit erlang In-Reply-To: Message of "Sat, 12 Nov 2005 12:01:18 +0100." <200511121101.jACB1Igu005453@spikklubban.it.uu.se> Message-ID: <200511150720.jAF7KqfM005663@snookles.snookles.com> >>>>> "ks" == Kostis Sagonas writes: ks> Issuing the simple command: ks> alias gcc='gcc -m64' ks> would have achieved the same effect. Here's my reply to Andrae Muys, who suggested using "CC='gcc -m64' ./configure". I didn't spend much time on it, but IIRC there was a sub-package that assumed that $(CC)'s value contained no whitespace -- the assumption was violated, and "make" stopped. {shrug} I've run into that quite a bit, and I didn't want to discover how many other places made the same assumption, so I resorted to my "exec gcc -m64 $*" trick and hoped that there weren't any hidden assumptions that $(CC) *arguments* didn't contain whitespace & thus break /bin/sh's "$*" expansion. There were none, hooray. The same Makefile assumption about lack-of-whitespace-in-$(CC) is the same assumption that screws up attempts to use tools like CCache or DistCC. "CC='distcc gcc'" or "CC='ccache gcc'" are the easiest ways to use those tools ... until you encounter a broken Makefile. Or a broken "libtool". {shudder} -Scott From Bob.Smart@REDACTED Tue Nov 15 08:45:00 2005 From: Bob.Smart@REDACTED (Bob.Smart@REDACTED) Date: Tue, 15 Nov 2005 18:45:00 +1100 Subject: JSON? Message-ID: > JSON Arrays <==> Erlang Tuples I remember the last time I used Erlang I used tuples for arrays and got a bit sick of typing "element" and "setelement". It would be nice of there was some syntactic sugar. I guess the Erlang developers themselves never use tuples that way. > JSON Objects <==> Erlang Dicts with String keys ... > The only awkwardness is with the string keys for the decoded objects. > If the atom table were garbage collected, I'd use real atoms here. For my application I'll have a limited number of object types with a limited number of different keys. So atoms would definitely work better for me. Maybe we can work out a way to make it a config option of some sort. Bob From jim@REDACTED Tue Nov 15 06:51:53 2005 From: jim@REDACTED (Jim Larson) Date: Mon, 14 Nov 2005 21:51:53 -0800 Subject: JSON? In-Reply-To: Your message of "Tue, 15 Nov 2005 14:46:26 +1100." Message-ID: <200511150551.jAF5prQd053234@krumkake.jetcafe.org> In message you write: >I'll bet someone has implemented JSON >(http://www.crockford.com/JSON/index.html) for Erlang, but it is not in >the implementation list on the web site. > >If not, I'd welcome any comments on how to do it in Erlang, otherwise >I'm sure to muck it up. I've got an implementation; I'll see if I can get my company to allow me to release it. My library works with the following mapping: JSON Numbers <==> Erlang Numbers JSON Strings <==> Erlang Strings (lists of Unicode chars) JSON Arrays <==> Erlang Tuples JSON Objects <==> Erlang Dicts with String keys JSON bool, null <==> Erlang Atoms 'true', 'false', 'null' (The ambiguity that an Erlang dict is represented as a tuple is not a problem, since the first element 'dict' is not a legal value for encoding.) It all works quite well, especially with Joe's middle man framework. The only awkwardness is with the string keys for the decoded objects. If the atom table were garbage collected, I'd use real atoms here. I'd also rather have Richard O'Keefe's "dictionaries", proposed a while back, rather than dicts, but it seems like the best available choice for now. Jim Larson jim@REDACTED From raimo@REDACTED Tue Nov 15 09:03:25 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 15 Nov 2005 09:03:25 +0100 Subject: 64-bit erlang References: <200511121101.jACB1Igu005453@spikklubban.it.uu.se>, <200511150720.jAF7KqfM005663@snookles.snookles.com> Message-ID: fritchie@REDACTED (Scott Lystig Fritchie) writes: > >>>>> "ks" == Kostis Sagonas writes: > > ks> Issuing the simple command: > > ks> alias gcc='gcc -m64' > > ks> would have achieved the same effect. > > Here's my reply to Andrae Muys, who suggested using "CC='gcc -m64' > ./configure". > > I didn't spend much time on it, but IIRC there was a sub-package that > assumed that $(CC)'s value contained no whitespace -- the assumption > was violated, and "make" stopped. {shrug} I've run into that quite a > bit, and I didn't want to discover how many other places made the same > assumption, so I resorted to my "exec gcc -m64 $*" trick and hoped Did you make a two line wrapper a'la: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv #! /bin/sh exec gcc -m64 ${1+"$@"} ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In that case note the little improvement to instead of $* use ${1+"$@"}, that quotes all arguments separately, and (unimportant for gcc) does not pass an empty argument if there are none. That would work even with $(CC) arguments containing whitespace. > that there weren't any hidden assumptions that $(CC) *arguments* > didn't contain whitespace & thus break /bin/sh's "$*" expansion. > There were none, hooray. > > The same Makefile assumption about lack-of-whitespace-in-$(CC) is the > same assumption that screws up attempts to use tools like CCache or > DistCC. "CC='distcc gcc'" or "CC='ccache gcc'" are the easiest ways > to use those tools ... until you encounter a broken Makefile. Or a > broken "libtool". {shudder} > > -Scott -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From joe.armstrong@REDACTED Tue Nov 15 09:12:39 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Tue, 15 Nov 2005 09:12:39 +0100 Subject: JSON? Message-ID: Re the mapping: IMHO you might get a nicer mapping if you changed strings to binaries. If you do this then lists will *always* be real lists if you see what I mean, and the string/list ambiguity goes away. Most of the data will be held in strings anyway so representing these as binaries should be better for all aspects of performance. I'd choose this: JSON Obj = type obj() = {obj, [{key(), val()}]} JSON Array = type array() = [val()] JSON Number = type num() = int() | float() JSON String = type str() = bin() JSON true false null = true, false null (atoms) With Type val() = obj() | array() | num() | str() | true | false | null I'd let the parser return an association list (not a dict) - since (probably) the object is small and it's nice to be able to print it and pattern match it directly. BTW you should hack the pretty printer to print binaries "prettily" (( Of course if we had proper dynamic structs in the language, erlang terms would be JSON objects :-) )) /Joe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Jim Larson > Sent: den 15 november 2005 06:52 > To: Bob.Smart@REDACTED > Cc: erlang-questions@REDACTED > Subject: Re: JSON? > > > In message > > you write: > >I'll bet someone has implemented JSON > >(http://www.crockford.com/JSON/index.html) for Erlang, but > it is not in > >the implementation list on the web site. > > > >If not, I'd welcome any comments on how to do it in Erlang, otherwise > >I'm sure to muck it up. > > I've got an implementation; I'll see if I can get my company to > allow me to release it. > > My library works with the following mapping: > > JSON Numbers <==> Erlang Numbers > JSON Strings <==> Erlang Strings (lists of > Unicode chars) > JSON Arrays <==> Erlang Tuples > JSON Objects <==> Erlang Dicts with String keys > JSON bool, null <==> Erlang Atoms 'true', 'false', 'null' > > (The ambiguity that an Erlang dict is represented as a tuple is not > a problem, since the first element 'dict' is not a legal value for > encoding.) > > It all works quite well, especially with Joe's middle man framework. > The only awkwardness is with the string keys for the decoded objects. > If the atom table were garbage collected, I'd use real atoms here. > I'd also rather have Richard O'Keefe's "dictionaries", proposed a > while back, rather than dicts, but it seems like the best available > choice for now. > > Jim Larson > jim@REDACTED > From rasmussen.bryan@REDACTED Tue Nov 15 09:22:59 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Tue, 15 Nov 2005 09:22:59 +0100 Subject: JSON? In-Reply-To: <200511150551.jAF5prQd053234@krumkake.jetcafe.org> References: <200511150551.jAF5prQd053234@krumkake.jetcafe.org> Message-ID: <3bb44c6e0511150022u3ddf56a5ma9fad07ae51eaa3e@mail.gmail.com> > > It all works quite well, especially with Joe's middle man framework. > The only awkwardness is with the string keys for the decoded objects. > If the atom table were garbage collected, I'd use real atoms here. > I'd also rather have Richard O'Keefe's "dictionaries", proposed a > while back, rather than dicts, but it seems like the best available > choice for now. Is the middle man framework finished and released anywhere? The only thing I have on it is some code in an email Joe wrote in discussions about it. From pascal.brisset@REDACTED Tue Nov 15 13:50:43 2005 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Tue, 15 Nov 2005 13:50:43 +0100 Subject: Performance of selective receive In-Reply-To: <200511150209.jAF29Rtx089163@atlas.otago.ac.nz> References: <200511150209.jAF29Rtx089163@atlas.otago.ac.nz> Message-ID: <20051115125028.BE8C417347F@postfix3-1.free.fr> Richard A. O'Keefe writes: > So any particular instance of the receive shown above can be > characterised by {<>, Port}. Yes, this would probably take care of the selective receives in file:write, gen_tcp:send and so on. Things are more complicated with gen_server: receive {Mref, Reply} -> ... Since the bound variable Mref has a different value on each invocation, you can't use it as a key for the cache as you do with Port. You could assume that if a receive statement ever uses a pattern {Mref,Reply} where Mref is a monitoring reference, then it is worth cacheing the fact that "among the first N queued messages, there is no pair whose first element is a monitoring reference". That might be enough for all practical purposes. -- Pascal From ulf.wiger@REDACTED Tue Nov 15 14:01:53 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 15 Nov 2005 14:01:53 +0100 Subject: try without catch Message-ID: I wrote the following in a program of mine: try Expr of Result -> Action end. i.e. no catch. The idea was to add a catch later, when I had thought of something clever to do. The compiler didn't have a problem with that (nor does the erlang reference manual), but edoc (edoc-0.6.2 in R10B) did. It treated it as a syntax error. /Uffe From vlad.xx.dumitrescu@REDACTED Tue Nov 15 15:02:17 2005 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Tue, 15 Nov 2005 15:02:17 +0100 Subject: Mnemosyne -> QLC transition Message-ID: <11498CB7D3FCB54897058DE63BE3897CD11076@esealmw105.eemea.ericsson.se> Hello! I'm a newbie regarding these parts, so I may be asking silly question (but it isn't the first, nor the last time :-) I need to convert an application from Mnemosyne to QLC. Is the conversion as straightforward as it seems, or are there any hidden traps? regards, Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From ok@REDACTED Wed Nov 16 05:41:24 2005 From: ok@REDACTED (Richard A. O'Keefe) Date: Wed, 16 Nov 2005 17:41:24 +1300 (NZDT) Subject: Finite maps (was: RE: JSON?) Message-ID: <200511160441.jAG4fOEx098392@atlas.otago.ac.nz> Concerning what I called 'dictionaries', I've recently been reading David Bacon's 2000 PhD thesis on using SETL for building web applications. (If anyone knows his E-mail address, I would be grateful for it. His old one doesn't seem to work.) Most of you won't have heard of SETL. It's a programming language with - atoms (distinct tokens, like Erlang references) - bignums - floats - strings - Boolean - OM (undefined) - tuples (play the role of sequences and of heterogenous tuples) - sets (sets of pairs play the role of finite maps) in which all data values are *values*. Sure, you can write m(i,j)("fred"){key} := {1,3..99} but at the abstract level, this assigns a whole new value to a, and is guaranteed not to change the value of any other variable. A programming language where variables do not share mutable substructures is very nearly a functional language in disguise. It's fair to say that, syntactic disguise aside, SETL is a dynamically typed functional language with side-effecting I/O, just like SML is a statically typed functional language with side-effecting I/O. It gets better. David Bacon advocated buliding web services as lots of little SETL processes communicating by passing values over streams, where a process typically has one input stream (= stdin). And he advocated "let it fail", with higher level processes restarting things &c. If he had taken one step further, it would have been very nearly Erlang. That one step was light-weight threads inside the language, which his SETL implementation does not support. Instead he used UNIX processes, and found them lightweight enough for the services he was building. The finite maps of SETL are more general than the 'dictionaries' I proposed for Erlang. They are "prior art" showing that this data structure has been recognised as useful in building systems in a rather Erlang-like way. From xlcr@REDACTED Wed Nov 16 06:01:22 2005 From: xlcr@REDACTED (Nick Linker) Date: Wed, 16 Nov 2005 11:01:22 +0600 Subject: try without catch In-Reply-To: References: Message-ID: <437ABD22.9050400@mail.ru> Ulf Wiger (AL/EAB) wrote: >I wrote the following in a program of mine: > >try Expr of > Result -> Action >end. > >i.e. no catch. The idea was to add a catch later, >when I had thought of something clever to do. > > Maybe I didn't understant the idea, but if you intend to add "catch" later, why don't write case Expr of Result -> Action end. Best regards, Linker Nick From ulf.wiger@REDACTED Wed Nov 16 08:52:20 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 16 Nov 2005 08:52:20 +0100 Subject: try without catch Message-ID: Nick Linker wrote: > > Maybe I didn't understant the idea, but if you intend to add "catch" > later, why don't write > > case Expr of > Result -> Action > end. Yes, of course, but part of the reason was to see whether it worked as described in the manual. ;-) The 'of', 'catch' and 'after' parts of the try statement are all optional, so try Expr of Result -> Action end should have been allowed (and it was - by the compiler). /Uffe From cschatz@REDACTED Tue Nov 15 19:57:34 2005 From: cschatz@REDACTED (Charles F. Schatz) Date: Wed, 16 Nov 2005 07:57:34 +1300 Subject: ODBC Problem with Example Message-ID: <014201c5ea16$70472ce0$6001a8c0@linkworks.lan> I am running Cygwin under Win2k Professional. The latest ODBC drivers from PostgreSQL website are installed. The database is PostgreSQL 7.3 compatible. The fundamental problem is character columns are creatable, but not query-able. This problem dates back to at least OTP-R9C. ============================================================= $ erl =PROGRESS REPORT==== 15-Nov-2005::09:58:15 === supervisor: {local,sasl_safe_sup} started: [{pid,<0.32.0>}, {name,alarm_handler}, {mfa,{alarm_handler,start_link,[]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}] =PROGRESS REPORT==== 15-Nov-2005::09:58:15 === supervisor: {local,sasl_safe_sup} started: [{pid,<0.33.0>}, {name,overload}, {mfa,{overload,start_link,[]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}] =PROGRESS REPORT==== 15-Nov-2005::09:58:15 === supervisor: {local,sasl_sup} started: [{pid,<0.31.0>}, {name,sasl_safe_sup}, {mfa,{supervisor, start_link, [{local,sasl_safe_sup},sasl,safe]}}, {restart_type,permanent}, {shutdown,infinity}, {child_type,supervisor}] =PROGRESS REPORT==== 15-Nov-2005::09:58:15 === supervisor: {local,sasl_sup} started: [{pid,<0.34.0>}, {name,release_handler}, {mfa,{release_handler,start_link,[]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}] Eshell V5.4.8 (abort with ^G) =PROGRESS REPORT==== 15-Nov-2005::09:58:16 === application: sasl started_at: nonode@REDACTED 1> {ok, Ref} = odbc:connect("DSN=PostgreSQL",[]). =PROGRESS REPORT==== 15-Nov-2005::09:58:34 === application: odbc started_at: nonode@REDACTED =INFO REPORT==== 15-Nov-2005::09:58:34 === The odbc application was not started. Has now been started as a temporary application. {ok,<0.45.0>} 2> odbc:sql_query(Ref,"create table test (varchar char 2> varying(40),char_array char(40),int4 int4)"). {updated,0} 3> odbc:describe_table(Ref,"test"). {ok,[{"varchar",'ODBC_UNSUPPORTED_TYPE'}, {"char_array",'ODBC_UNSUPPORTED_TYPE'}, {"int4",sql_integer}]} 4> ============================================================= Using other means, the database table 'test' has been inspected and shows the correct character column types after creation. The odbc drivers or the erlang code (not certain which) appear to have an asymmetric type characteric. Does anyone out there have a insight into the problem? Charles F. Schatz From xlcr@REDACTED Wed Nov 16 09:53:07 2005 From: xlcr@REDACTED (Nick Linker) Date: Wed, 16 Nov 2005 14:53:07 +0600 Subject: try without catch In-Reply-To: References: Message-ID: <437AF373.4060307@mail.ru> Ulf Wiger (AL/EAB) wrote: >Yes, of course, but part of the reason was to see whether >it worked as described in the manual. ;-) > >The 'of', 'catch' and 'after' parts of the try statement >are all optional, so > >try Expr of > Result -> Action >end > >should have been allowed (and it was - by the compiler). > >/Uffe > > Ok, I see, thanks. Best regards, Linker Nick From vlad_dumitrescu@REDACTED Wed Nov 16 10:17:46 2005 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 16 Nov 2005 10:17:46 +0100 Subject: Erlang grammar? Message-ID: Hi, This is a long shot, but it doesn't hurt to ask: does anybody happen to sit on a JavaCC grammar for Erlang? regards, Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From rasmussen.bryan@REDACTED Wed Nov 16 10:28:12 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Wed, 16 Nov 2005 10:28:12 +0100 Subject: try without catch In-Reply-To: References: Message-ID: <3bb44c6e0511160128x7004b34s53d387d28dd931b3@mail.gmail.com> I thought Edoc was just a documentation generator, it does checking too? Because I'm not finding anything in the documentation using http://erlang.se/doc/doc-5.4.8/lib/edoc-0.6.2/doc/html/index.html because this http://erlang.se/doc/doc-5.4.10/lib/edoc-0.6.7/doc/index.html returned 404. Cheers, Bryan Rasmussen On 11/15/05, Ulf Wiger (AL/EAB) wrote: > > I wrote the following in a program of mine: > > try Expr of > Result -> Action > end. > > i.e. no catch. The idea was to add a catch later, > when I had thought of something clever to do. > > The compiler didn't have a problem with that > (nor does the erlang reference manual), > but edoc (edoc-0.6.2 in R10B) did. It treated it > as a syntax error. > > /Uffe > From gunilla@REDACTED Wed Nov 16 10:39:57 2005 From: gunilla@REDACTED (Gunilla Arendt) Date: Wed, 16 Nov 2005 10:39:57 +0100 Subject: try without catch In-Reply-To: References: Message-ID: <437AFE6D.1030604@erix.ericsson.se> Actually, the reference manual says: "The of, catch and after sections, are all optional in the try expression, as long as there is at least a catch or an after section" Also, I get "syntax error before: 'end'" when I try to compile a try without catch and after? / Gunilla Ulf Wiger (AL/EAB) wrote: > > Nick Linker wrote: > >>Maybe I didn't understant the idea, but if you intend to add "catch" >>later, why don't write >> >>case Expr of >> Result -> Action >>end. > > > Yes, of course, but part of the reason was to see whether > it worked as described in the manual. ;-) > > The 'of', 'catch' and 'after' parts of the try statement > are all optional, so > > try Expr of > Result -> Action > end > > should have been allowed (and it was - by the compiler). > > /Uffe > > From laura@REDACTED Wed Nov 16 11:10:11 2005 From: laura@REDACTED (Laura M. Castro) Date: Wed, 16 Nov 2005 11:10:11 +0100 Subject: ODBC Problem with Example In-Reply-To: <014201c5ea16$70472ce0$6001a8c0@linkworks.lan> References: <014201c5ea16$70472ce0$6001a8c0@linkworks.lan> Message-ID: <437B0583.9060201@alfa21.com> Hello Charles, I have run your example and I can not reproduce the error: > 1> {ok, Ref} = odbc:connect("DSN=PostgreSQL",[]). > > =PROGRESS REPORT==== 15-Nov-2005::09:58:34 === > application: odbc > started_at: nonode@REDACTED > > =INFO REPORT==== 15-Nov-2005::09:58:34 === > The odbc application was not started. Has now been started as a temporary > application. {ok,<0.45.0>} > 2> odbc:sql_query(Ref,"create table test (varchar char > 2> varying(40),char_array char(40),int4 int4)"). > {updated,0} > 3> odbc:describe_table(Ref,"test"). > {ok,[{"varchar",'ODBC_UNSUPPORTED_TYPE'}, > {"char_array",'ODBC_UNSUPPORTED_TYPE'}, > {"int4",sql_integer}]} This is the output I get, Erlang (BEAM) emulator version 5.4.9 [source] [hipe] Eshell V5.4.9 (abort with ^G) 1> application:start(odbc). ok 2> {ok, C} = odbc:connect("DSN=ourdatabase",[]). {ok,<0.42.0>} 3> odbc:sql_query(C,"create table test (varchar char varying(40),char_array char(40),int4 int4)"). {updated,0} 4> odbc:describe_table(C,"test"). {ok,[{"varchar",{sql_varchar,40}}, {"char_array",{sql_char,40}}, {"int4",sql_integer}]} We use Erlang R10B-7, PostgreSQL 7.4, and the odbc-postgresql, and unixodbc driver packages in Debian GNU/Linux (sid). We have also performed this test over Erlang R9C-2 and it works, too. :-? Best regards, Laura Castro From ulf.wiger@REDACTED Wed Nov 16 11:20:00 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 16 Nov 2005 11:20:00 +0100 Subject: try without catch Message-ID: Edoc uses syntax_tools to read the source and extract comments. Looking into my local copy of the html docs, I was also unable to find any suggestion that syntax_tools is prepared to handle syntactically incorrect source files in some cases. Looking at the source, erl_comment_scan.erl makes practically no assumptions about the code (apart from the expected format of a comment.) But since edoc builds a function index and generates default documentation about the exported functions, it is hard to see how it _couldn't_ require that the source is syntactically correct. However, since edoc uses epp_dodger by default, its parser is not the standard parser (which cannot handle macros, for example). /Uffe > -----Original Message----- > From: bryan rasmussen [mailto:rasmussen.bryan@REDACTED] > Sent: den 16 november 2005 10:28 > To: Ulf Wiger (AL/EAB) > Cc: erlang-questions@REDACTED > Subject: Re: try without catch > > I thought Edoc was just a documentation generator, it does > checking too? Because I'm not finding anything in the > documentation using > http://erlang.se/doc/doc-5.4.8/lib/edoc-0.6.2/doc/html/index.html > because this > http://erlang.se/doc/doc-5.4.10/lib/edoc-0.6.7/doc/index.html > returned 404. > > > Cheers, > Bryan Rasmussen > > > > > > On 11/15/05, Ulf Wiger (AL/EAB) wrote: > > > > I wrote the following in a program of mine: > > > > try Expr of > > Result -> Action > > end. > > > > i.e. no catch. The idea was to add a catch later, when I > had thought > > of something clever to do. > > > > The compiler didn't have a problem with that (nor does the erlang > > reference manual), but edoc (edoc-0.6.2 in R10B) did. It > treated it as > > a syntax error. > > > > /Uffe > > > From ulf.wiger@REDACTED Wed Nov 16 11:24:44 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 16 Nov 2005 11:24:44 +0100 Subject: try without catch Message-ID: Gunilla Arendt wrote: > > Actually, the reference manual says: > > "The of, catch and after sections, are all optional in the > try expression, as long as there is at least a catch or an > after section" > > Also, I get "syntax error before: 'end'" when I try to > compile a try without catch and after? Well, what do you know. So do I, in fact. That's what you get from trying to write code and follow a presentation at the same time. (: I apologize for broadcasting before double-checking my own observations. /Uffe From neumann@REDACTED Wed Nov 16 21:20:26 2005 From: neumann@REDACTED (=?iso-8859-1?q?Fran=E7ois-Denis_Gonthier?=) Date: Wed, 16 Nov 2005 15:20:26 -0500 Subject: .beam difference between builds and misc HiPE questions Message-ID: <200511161520.34509.neumann@lostwebsite.net> Hello all, this is your Debian packager, Here is a set of question where answers could save me quite a bit of work (or add some more) - I just noticed that everytime I build, whatever options I choose, the .beam files are actually changed. The size is not changed in anyway but there is a small difference on the binary level. What has changed? and most importantly for me, are those files interchangeable between builds? I suppose the difference is something like a date to differentiate builds but I think it's easier for me to ask this list than dig the internals of .beam files. - Another question, can I use .beam files produced in a no-hipe build with the VM produced in a HiPE build? I suppose so too but I can be sure of this if I'm not sure of the previous question. - Could enabling HiPE break the build of Erlang/OTP if there is a bug in HiPE on some specific platform? If it's the case I'll need to build HiPE outside the main package to make sure people using that platform at least have the interpreted VM. After building and rebuilding that package so many times, I'd think this is not the case. The bootstrap compiler certainly isn't HiPE-enabled and the compiler the bootstrap produces doesn't seem to be used to compile the rest of the system, unlike in GCC and other compiler build. F-D -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From matthias@REDACTED Wed Nov 16 23:22:56 2005 From: matthias@REDACTED (Matthias Lang) Date: Wed, 16 Nov 2005 23:22:56 +0100 Subject: anyone know of a tool which can generate chunked HTTP/1.1 _requests_? Message-ID: <17275.45376.402481.271072@antilipe.corelatus.se> Hi, I want to generate HTTP _requests_ which use the chunked transfer encoding. I've looked at ibrowse and the HTTP client in R10B, but can't figure out how to do it. Anyone have any ideas---even non-erlang ones? Matthias From kostis@REDACTED Wed Nov 16 23:29:48 2005 From: kostis@REDACTED (Kostis Sagonas) Date: Wed, 16 Nov 2005 23:29:48 +0100 (MET) Subject: .beam difference between builds and misc HiPE questions In-Reply-To: Mail from '=?iso-8859-1?q?Fran=E7ois-Denis_Gonthier?= ' dated: Wed, 16 Nov 2005 15:20:26 -0500 Message-ID: <200511162229.jAGMTmTC027570@spikklubban.it.uu.se> > Another question, can I use .beam files produced in a no-hipe build with the > VM produced in a HiPE build? I suppose so too but I can be sure of this if > I'm not sure of the previous question. The answer is YES. > Could enabling HiPE break the build of Erlang/OTP if there is a bug in HiPE > on some specific platform? If it's the case I'll need to build HiPE outside > the main package to make sure people using that platform at least have the > interpreted VM. After building and rebuilding that package so many times, > I'd think this is not the case. Indeed, this is not the case. More generally, there should not be any `bad' interaction between HiPE & OTP. Even .beam files containing native code can be happily loaded in a non hipe-enabled Erlang/OTP system. The .beam files are `fat' and contain both native & bytecode. On the other hand, the native code is in general not tranferable -- even between systems of the same architecture. Kostis From matthias@REDACTED Wed Nov 16 23:57:20 2005 From: matthias@REDACTED (Matthias Lang) Date: Wed, 16 Nov 2005 23:57:20 +0100 Subject: .beam difference between builds and misc HiPE questions In-Reply-To: <200511161520.34509.neumann@lostwebsite.net> References: <200511161520.34509.neumann@lostwebsite.net> Message-ID: <17275.47440.282003.463524@antilipe.corelatus.se> Fran?ois-Denis Gonthier writes: > - I just noticed that everytime I build, whatever options I choose, > the .beam files are actually changed. The size is not changed in > anyway but there is a small difference on the binary level. > > What has changed? and most importantly for me, are those files > interchangeable between builds? I suppose the difference is > something like a date to differentiate builds but I think it's > easier for me to ask this list than dig the internals of .beam > files. Among other things, there's a timestamp (compile-time) in the BEAM file. You can see the timestamp by evaluating :module_info(). The files are interchangeable, as long as you don't change Erlang VM versions. (Actually, you can use beams made by the an older compiler in a newer VM for many useful combinations of VM and compiler, but you usually can't do the reverse.) Matthias From neumann@REDACTED Thu Nov 17 00:55:16 2005 From: neumann@REDACTED (=?iso-8859-1?q?Fran=E7ois-Denis_Gonthier?=) Date: Wed, 16 Nov 2005 18:55:16 -0500 Subject: .beam difference between builds and misc HiPE questions In-Reply-To: <17275.47440.282003.463524@antilipe.corelatus.se> References: <200511161520.34509.neumann@lostwebsite.net> <17275.47440.282003.463524@antilipe.corelatus.se> Message-ID: <200511161855.19258.neumann@lostwebsite.net> On 16 November 2005 17:57, Matthias Lang wrote: Thank you for confirming I was right. This means the way I currently package isn't wrong at all. There should be an anouncement for the -2 version of the Erlang Debian packages soon, which will provided a HiPE enabled runtime. > Indeed, this is not the case. > > More generally, there should not be any `bad' interaction between HiPE & > OTP. > > Even .beam files containing native code can be happily loaded in a non > hipe-enabled Erlang/OTP system. The .beam files are `fat' and contain > both native & bytecode. On the other hand, the native code is in general > not tranferable -- even between systems of the same architecture. > Among other things, there's a timestamp (compile-time) in the BEAM > file. You can see the timestamp by evaluating > > :module_info(). > > The files are interchangeable, as long as you don't change Erlang > VM versions. > > (Actually, you can use beams made by the an older compiler in a newer > VM for many useful combinations of VM and compiler, but you usually > can't do the reverse.) > > Matthias -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From klacke@REDACTED Thu Nov 17 08:45:52 2005 From: klacke@REDACTED (Claes Wikstom) Date: Thu, 17 Nov 2005 08:45:52 +0100 Subject: anyone know of a tool which can generate chunked HTTP/1.1 _requests_? In-Reply-To: <17275.45376.402481.271072@antilipe.corelatus.se> References: <17275.45376.402481.271072@antilipe.corelatus.se> Message-ID: <437C3530.7070606@hyber.org> Matthias Lang wrote: > Hi, > > I want to generate HTTP _requests_ which use the chunked transfer > encoding. > > I've looked at ibrowse and the HTTP client in R10B, but can't figure > out how to do it. It's very rare for clients to do that. There was recently a discussion on the yaws list where yaws didn't support clients that POSTed data as chunked encoding. Apparently some weird cell phone did that and yaws didn't suppport it then. > > Anyone have any ideas---even non-erlang ones? > - check and see if "curl" can do it - the www engineers universal tool no 1. - learn how it works and hack ibrowse. It's not especially complicated. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From matthias@REDACTED Thu Nov 17 09:58:28 2005 From: matthias@REDACTED (Matthias Lang) Date: Thu, 17 Nov 2005 09:58:28 +0100 Subject: anyone know of a tool which can generate chunked HTTP/1.1 _requests_? In-Reply-To: <437C3530.7070606@hyber.org> References: <17275.45376.402481.271072@antilipe.corelatus.se> <437C3530.7070606@hyber.org> Message-ID: <17276.17972.408946.833807@antilipe.corelatus.se> Claes Wikstom wrote: > - check and see if "curl" can do it - the www engineers > universal tool no 1. Thanks, curl does the trick. (Does that make 'wget' tool #2 and 'netcat' tool #3?) Matthias From kwilkin@REDACTED Thu Nov 17 13:49:51 2005 From: kwilkin@REDACTED (kurt wilkin) Date: Fri, 18 Nov 2005 01:49:51 +1300 Subject: ODBC Problem with Example In-Reply-To: <437B0583.9060201@alfa21.com> References: <014201c5ea16$70472ce0$6001a8c0@linkworks.lan> <437B0583.9060201@alfa21.com> Message-ID: <427999920511170449l259726d2xab9e72a41006036a@mail.gmail.com> On 11/16/05, Laura M. Castro wrote: > > Hello Charles, > > I have run your example and I can not reproduce the error: > > > 3> odbc:describe_table(Ref,"test"). > > {ok,[{"varchar",'ODBC_UNSUPPORTED_TYPE'}, > > {"char_array",'ODBC_UNSUPPORTED_TYPE'}, > > {"int4",sql_integer}]} > > We use Erlang R10B-7, PostgreSQL 7.4, and the odbc-postgresql, and > unixodbc driver packages in Debian GNU/Linux (sid). We have also > performed this test over Erlang R9C-2 and it works, too. I'm also seeing the unsupported type error, using R10B-8, postgres 8.0 and the psqlODBC driver. Looked into it far enough to see that "ODBC_UNSUPPORTED_TYPE" is the default case on the switch on sql_type in the 'encode_data_type' function in odbcserver.c, but am suspicious that it may be coming from the odbc driver? Cheers, Kurt. From chandrashekhar.mullaparthi@REDACTED Thu Nov 17 11:33:24 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Thu, 17 Nov 2005 10:33:24 +0000 Subject: anyone know of a tool which can generate chunked HTTP/1.1 _requests_? In-Reply-To: <17276.17972.408946.833807@antilipe.corelatus.se> References: <17275.45376.402481.271072@antilipe.corelatus.se> <437C3530.7070606@hyber.org> <17276.17972.408946.833807@antilipe.corelatus.se> Message-ID: Matthias, I've patched ibrowse to be able to do this. I've attached the patched modules - I will check them into Jungerl when I'm confident I haven't broken anything else. You can send a request as follows. ibrowse:send_req("http://www.w3schools.com/html/html_form_action.asp", [{"content-type", "application/x-www-form-urlencoded"}], post, "Bike=on&Car=on", [{transfer_encoding, {chunked,4}}]). Basically there is a new option in the request {transfer_encoding, {chunked, ChunkSize}} ibrowse will split the data into chunks before sending it to the server. Just out of curiousity - why do you need the client sending chunked data? cheers Chandru On 17/11/05, Matthias Lang wrote: > > Claes Wikstom wrote: > > > - check and see if "curl" can do it - the www engineers > > universal tool no 1. > > Thanks, curl does the trick. (Does that make 'wget' tool #2 and > 'netcat' tool #3?) > > Matthias > -------------- next part -------------- A non-text attachment was scrubbed... Name: ibrowse_http_client.erl Type: application/octet-stream Size: 45089 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ibrowse_lib.erl Type: application/octet-stream Size: 4695 bytes Desc: not available URL: From chandrashekhar.mullaparthi@REDACTED Thu Nov 17 11:33:24 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Thu, 17 Nov 2005 10:33:24 +0000 Subject: anyone know of a tool which can generate chunked HTTP/1.1 _requests_? In-Reply-To: <17276.17972.408946.833807@antilipe.corelatus.se> References: <17275.45376.402481.271072@antilipe.corelatus.se> <437C3530.7070606@hyber.org> <17276.17972.408946.833807@antilipe.corelatus.se> Message-ID: Matthias, I've patched ibrowse to be able to do this. I've attached the patched modules - I will check them into Jungerl when I'm confident I haven't broken anything else. You can send a request as follows. ibrowse:send_req("http://www.w3schools.com/html/html_form_action.asp", [{"content-type", "application/x-www-form-urlencoded"}], post, "Bike=on&Car=on", [{transfer_encoding, {chunked,4}}]). Basically there is a new option in the request {transfer_encoding, {chunked, ChunkSize}} ibrowse will split the data into chunks before sending it to the server. Just out of curiousity - why do you need the client sending chunked data? cheers Chandru On 17/11/05, Matthias Lang wrote: > > Claes Wikstom wrote: > > > - check and see if "curl" can do it - the www engineers > > universal tool no 1. > > Thanks, curl does the trick. (Does that make 'wget' tool #2 and > 'netcat' tool #3?) > > Matthias > -------------- next part -------------- A non-text attachment was scrubbed... Name: ibrowse_http_client.erl Type: application/octet-stream Size: 45089 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ibrowse_lib.erl Type: application/octet-stream Size: 4695 bytes Desc: not available URL: From klacke@REDACTED Thu Nov 17 19:17:03 2005 From: klacke@REDACTED (Claes Wikstrom) Date: Thu, 17 Nov 2005 19:17:03 +0100 Subject: anyone know of a tool which can generate chunked HTTP/1.1 _requests_? In-Reply-To: <17276.17972.408946.833807@antilipe.corelatus.se> References: <17275.45376.402481.271072@antilipe.corelatus.se> <437C3530.7070606@hyber.org> <17276.17972.408946.833807@antilipe.corelatus.se> Message-ID: <437CC91F.4030102@hyber.org> Matthias Lang wrote: > Claes Wikstom wrote: > > > - check and see if "curl" can do it - the www engineers > > universal tool no 1. > > Thanks, curl does the trick. (Does that make 'wget' tool #2 and > 'netcat' tool #3?) ... reversed, nc is no 2 /klacke From xpdoka@REDACTED Thu Nov 17 23:31:35 2005 From: xpdoka@REDACTED (Dominic Williams) Date: Thu, 17 Nov 2005 23:31:35 +0100 Subject: Uncertain death Message-ID: <437D04C7.5020800@dominicwilliams.net> Hello, The following program seems to me to indicate that when a processes gets killed, there is, for a brief moment, contradictory information about its state. Specifically, the information returned by processes() seems to lag behind that given by is_process_alive(). %%% death.erl -module (death). -export ([run/0, server/0]). run() -> Pid = spawn (?MODULE, server, []), exit (Pid, kill), report (Pid), timer:sleep(1000), report (Pid). report (Pid) -> io:fwrite("~p alive: ~p; member of processes(): ~p~n", [Pid, is_process_alive (Pid), lists:member(Pid, processes())]). server () -> receive hello -> server(); stop -> bye end. %%% end death.erl 1> c("/Users/dodo/tmp/death", [{outdir, "/Users/dodo/tmp/"}]). {ok,death} 2> death:run(). <0.35.0> alive: false; member of processes(): true <0.35.0> alive: false; member of processes(): false ok Same result under MacOS/R9C and WinXP/R10B Regards, Dominic Williams http://www.dominicwilliams.net ---- From ulf.wiger@REDACTED Fri Nov 18 00:52:40 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 18 Nov 2005 00:52:40 +0100 Subject: Uncertain death Message-ID: When you send an exit signal to a process, it is scheduled in order to receive it. This goes for 'kill' messages as well, even though you'd think that they could be killed right away by the runtime system. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of > Dominic Williams > Sent: den 17 november 2005 23:32 > To: 'erlang-questions@REDACTED' > Subject: Uncertain death > > Hello, > > The following program seems to me to indicate that when a > processes gets killed, there is, for a brief moment, > contradictory information about its state. Specifically, the > information returned by processes() seems to lag behind that > given by is_process_alive(). > > > %%% death.erl > > -module (death). > -export ([run/0, server/0]). > > run() -> > Pid = spawn (?MODULE, server, []), > exit (Pid, kill), > report (Pid), > timer:sleep(1000), > report (Pid). > > report (Pid) -> > io:fwrite("~p alive: ~p; member of processes(): ~p~n", > [Pid, is_process_alive (Pid), > lists:member(Pid, processes())]). > > server () -> > receive > hello -> > server(); > stop -> > bye > end. > > %%% end death.erl > > 1> c("/Users/dodo/tmp/death", [{outdir, "/Users/dodo/tmp/"}]). > {ok,death} > 2> death:run(). > <0.35.0> alive: false; member of processes(): true <0.35.0> > alive: false; member of processes(): false ok > > Same result under MacOS/R9C and WinXP/R10B > > Regards, > > Dominic Williams > http://www.dominicwilliams.net > > ---- > From gefla@REDACTED Fri Nov 18 00:06:24 2005 From: gefla@REDACTED (Gerd Flaig) Date: Fri, 18 Nov 2005 00:06:24 +0100 Subject: Erlang on Nokia 770 Message-ID: <87sltuc1sf.fsf@kilo.pond.sub.org> Hi, out of curiosity, I checked if Erlang works on the Nokia 770. So I took the R10B-5 ARM binary package from debian, cut it down to the runtime system, kernel and stdlib and put it on the device. Just in case anyone's interested: It just works. I guess I just created the smallest complete Erlang development workstation. ;) Goodbyte, Gerd. P.S.: Admitedly, with just the pen as input method, it's somewhat awkward to actually do serious programming on the device. But there's those nice portable bluetooth keyboards... -- The last thing one knows in constructing a work is what to put first. -- Blaise Pascal From rasmussen.bryan@REDACTED Fri Nov 18 09:54:04 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Fri, 18 Nov 2005 09:54:04 +0100 Subject: Erlang on Nokia 770 In-Reply-To: <87sltuc1sf.fsf@kilo.pond.sub.org> References: <87sltuc1sf.fsf@kilo.pond.sub.org> Message-ID: <3bb44c6e0511180054s1fcf5555sf5184a2358a3ad95@mail.gmail.com> You are my hero. Is this one of the ones that has python working on it as well? If so, I know what I'm buying myself for christmas. cheers, Bryan Rasmussen On 11/18/05, Gerd Flaig wrote: > > Hi, > > out of curiosity, I checked if Erlang works on the Nokia 770. So I > took the R10B-5 ARM binary package from debian, cut it down to the > runtime system, kernel and stdlib and put it on the device. Just in > case anyone's interested: It just works. > > I guess I just created the smallest complete Erlang development > workstation. ;) > > Goodbyte, Gerd. > > P.S.: Admitedly, with just the pen as input method, it's somewhat > awkward to actually do serious programming on the device. But > there's those nice portable bluetooth keyboards... > -- > The last thing one knows in constructing a work is what to put first. > -- Blaise Pascal > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj@REDACTED Fri Nov 18 10:42:57 2005 From: mbj@REDACTED (mbj@REDACTED) Date: Fri, 18 Nov 2005 10:42:57 +0100 (CET) Subject: strange? Message-ID: <20051118.104257.74736126.mbj@tail-f.com> Here's a late submission to the obfuscation contest. Look at the code. Try to figure out what a:c() returns. Run it on the latest erlang. -module(a). -compile(export_all). c() -> M = {a, b}, M:k(a). b(k, a) -> wow. k(A, T) -> element(2, T). /martin From ulf.wiger@REDACTED Fri Nov 18 10:58:20 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 18 Nov 2005 10:58:20 +0100 Subject: strange? Message-ID: wow. (: /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of mbj@REDACTED > Sent: den 18 november 2005 10:43 > To: erlang-questions@REDACTED > Subject: strange? > > Here's a late submission to the obfuscation contest. > > Look at the code. Try to figure out what a:c() returns. Run > it on the latest erlang. > > > -module(a). > -compile(export_all). > > c() -> > M = {a, b}, > M:k(a). > > b(k, a) -> > wow. > > k(A, T) -> > element(2, T). > > > > /martin > From chris.double@REDACTED Fri Nov 18 11:04:17 2005 From: chris.double@REDACTED (Chris Double) Date: Fri, 18 Nov 2005 23:04:17 +1300 Subject: Erlang on Nokia 770 In-Reply-To: <3bb44c6e0511180054s1fcf5555sf5184a2358a3ad95@mail.gmail.com> References: <87sltuc1sf.fsf@kilo.pond.sub.org> <3bb44c6e0511180054s1fcf5555sf5184a2358a3ad95@mail.gmail.com> Message-ID: On 11/18/05, bryan rasmussen wrote: > You are my hero. Is this one of the ones that has python working on it as > well? I think you may be confusign the Nokia 770 with one of the Nokia Symbian-based phones that runs Python. The 770 isn't a phone, it's an 'internet tablet'. A wifi enabled device with touch screen. It runs a debian based Linux OS I think. Chris. -- http://www.bluishcoder.co.nz From kostis@REDACTED Fri Nov 18 11:14:19 2005 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 18 Nov 2005 11:14:19 +0100 (MET) Subject: strange? In-Reply-To: Mail from 'mbj@home.se' dated: Fri, 18 Nov 2005 10:42:57 +0100 (CET) Message-ID: <200511181014.jAIAEJik011566@spikklubban.it.uu.se> mbj@REDACTED wrote: > Look at the code. Try to figure out what c() returns. Run it on > the latest erlang. > > c() -> > M = {a, b}, > M:k(a). I've been screaming for years now. Can we please take the {M,F} call (w/o arity) out of the language? Kostis From mbj@REDACTED Fri Nov 18 11:20:21 2005 From: mbj@REDACTED (mbj@REDACTED) Date: Fri, 18 Nov 2005 11:20:21 +0100 (CET) Subject: strange? In-Reply-To: <200511181014.jAIAEJik011566@spikklubban.it.uu.se> References: <200511181014.jAIAEJik011566@spikklubban.it.uu.se> Message-ID: <20051118.112021.71102957.mbj@tail-f.com> Kostis Sagonas wrote: > mbj@REDACTED wrote: > > > Look at the code. Try to figure out what c() returns. Run it on > > the latest erlang. > > > > c() -> > > M = {a, b}, > > M:k(a). > > I've been screaming for years now. > Can we please take the {M,F} call (w/o arity) out of the language? That's not the problem here, Try M = {a, b, c, d}, instead, it will give the same result. /martin From rasmussen.bryan@REDACTED Fri Nov 18 11:34:26 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Fri, 18 Nov 2005 11:34:26 +0100 Subject: Erlang on Nokia 770 In-Reply-To: References: <87sltuc1sf.fsf@kilo.pond.sub.org> <3bb44c6e0511180054s1fcf5555sf5184a2358a3ad95@mail.gmail.com> Message-ID: <3bb44c6e0511180234w21f19172lf921808f73cc6961@mail.gmail.com> :( Yes. I just assumed it was some new series of Nokia phones since those numbers are always changing and hard to keep up with. Cheers, Bryan Rasmussen On 11/18/05, Chris Double wrote: > On 11/18/05, bryan rasmussen wrote: > > You are my hero. Is this one of the ones that has python working on it as > > well? > > I think you may be confusign the Nokia 770 with one of the Nokia > Symbian-based phones that runs Python. The 770 isn't a phone, it's an > 'internet tablet'. A wifi enabled device with touch screen. It runs a > debian based Linux OS I think. > > Chris. > -- > http://www.bluishcoder.co.nz > From hakan@REDACTED Fri Nov 18 11:36:08 2005 From: hakan@REDACTED (Hakan Mattsson) Date: Fri, 18 Nov 2005 11:36:08 +0100 (CET) Subject: strange? In-Reply-To: <20051118.112021.71102957.mbj@tail-f.com> References: <200511181014.jAIAEJik011566@spikklubban.it.uu.se> <20051118.112021.71102957.mbj@tail-f.com> Message-ID: On Fri, 18 Nov 2005 mbj@REDACTED wrote: > Kostis Sagonas wrote: > > mbj@REDACTED wrote: > > > > > Look at the code. Try to figure out what c() returns. Run it on > > > the latest erlang. > > > > > > c() -> > > > M = {a, b}, > > > M:k(a). > > > > I've been screaming for years now. > > Can we please take the {M,F} call (w/o arity) out of the language? > > That's not the problem here, Try > > M = {a, b, c, d}, > > instead, it will give the same result. You have encountered a side effect of the current implemenation of abstract modules. /H?kan From rasmussen.bryan@REDACTED Fri Nov 18 12:29:34 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Fri, 18 Nov 2005 12:29:34 +0100 Subject: Erlang on Nokia 770 In-Reply-To: References: <87sltuc1sf.fsf@kilo.pond.sub.org> <3bb44c6e0511180054s1fcf5555sf5184a2358a3ad95@mail.gmail.com> <3bb44c6e0511180234w21f19172lf921808f73cc6961@mail.gmail.com> Message-ID: <3bb44c6e0511180329g589b9bblcec3b6033c593159@mail.gmail.com> oops, you forgot to cc erlang list and Gerd. so: What's the performance like? It'd be interesting to compare vs the gumstix and blackdog. On 11/18/05, Chris Double wrote: > On 11/18/05, bryan rasmussen wrote: > > :( > > Yes. I just assumed it was some new series of Nokia phones since those > > numbers are always changing and hard to keep up with. > > Yes, they seem to change randomly. The 770 is neat device though and > Erlang on it would be fun to play with. What's the performance like? > It'd be interesting to compare vs the gumstix and blackdog. > > Chris. > -- > http://www.bluishcoder.co.nz > From xpdoka@REDACTED Fri Nov 18 12:41:44 2005 From: xpdoka@REDACTED (Dominic Williams) Date: Fri, 18 Nov 2005 12:41:44 +0100 (CET) Subject: Uncertain death In-Reply-To: References: Message-ID: <32777.212.155.207.253.1132314104.squirrel@www.geekisp.com> Oh yes, I realize that. I'm not bothered at all by the delay, although I wouldn't mind a neater way of "waiting" for its death than timer:sleep/1. What bothers me is the contradictory information provided by is_process_alive(Pid) and processes(). That seems like a bug to me. Dominic. > When you send an exit signal to a process, > it is scheduled in order to receive it. > This goes for 'kill' messages as well, even > though you'd think that they could be > killed right away by the runtime system. > > /Uffe > >> -----Original Message----- >> From: owner-erlang-questions@REDACTED >> [mailto:owner-erlang-questions@REDACTED] On Behalf Of >> Dominic Williams >> Sent: den 17 november 2005 23:32 >> To: 'erlang-questions@REDACTED' >> Subject: Uncertain death >> >> Hello, >> >> The following program seems to me to indicate that when a >> processes gets killed, there is, for a brief moment, >> contradictory information about its state. Specifically, the >> information returned by processes() seems to lag behind that >> given by is_process_alive(). >> >> >> %%% death.erl >> >> -module (death). >> -export ([run/0, server/0]). >> >> run() -> >> Pid = spawn (?MODULE, server, []), >> exit (Pid, kill), >> report (Pid), >> timer:sleep(1000), >> report (Pid). >> >> report (Pid) -> >> io:fwrite("~p alive: ~p; member of processes(): ~p~n", >> [Pid, is_process_alive (Pid), >> lists:member(Pid, processes())]). >> >> server () -> >> receive >> hello -> >> server(); >> stop -> >> bye >> end. >> >> %%% end death.erl >> >> 1> c("/Users/dodo/tmp/death", [{outdir, "/Users/dodo/tmp/"}]). >> {ok,death} >> 2> death:run(). >> <0.35.0> alive: false; member of processes(): true <0.35.0> >> alive: false; member of processes(): false ok >> >> Same result under MacOS/R9C and WinXP/R10B >> >> Regards, >> >> Dominic Williams >> http://www.dominicwilliams.net >> >> ---- >> > From gefla@REDACTED Fri Nov 18 11:07:39 2005 From: gefla@REDACTED (Gerd Flaig) Date: Fri, 18 Nov 2005 11:07:39 +0100 Subject: Erlang on Nokia 770 References: <87sltuc1sf.fsf@kilo.pond.sub.org> <3bb44c6e0511180054s1fcf5555sf5184a2358a3ad95@mail.gmail.com> Message-ID: <87oe4ib76c.fsf@kilo.pond.sub.org> bryan rasmussen writes: > You are my hero. Is this one of the ones that has python working on it as > well? I've read reports that Python works, haven't tried it myself, though. By now, I have tried CLisp, which also works like a charm without modifications. If I can get some spare time, perhaps I should try ex11 on the device. Yes, it runs X. Goodbyte, Gerd. -- The last thing one knows in constructing a work is what to put first. -- Blaise Pascal From event@REDACTED Wed Nov 16 09:39:46 2005 From: event@REDACTED (event@REDACTED) Date: Wed, 16 Nov 2005 09:39:46 +0100 (CET) Subject: CFP: ProMAS@ AAMAS 2006 Message-ID: <1445.83.199.56.193.1132130386.squirrel@mailia.lip6.fr> *********Sorry for multiple postings*********** =================== Call for Papers =================== Fourth International Workshop on Programming Multi-Agent Systems (ProMAS-06) ProMAS-06 will be held with AAMAS-06 Hakodate, Japan, 8-12 May 2006 Even though the scientific contributions generated by the Multi-Agent Systems (MAS) research community can have a significant impact in the development of real-world distributed systems, the techniques resulting from such contributions will only be widely adopted when suitable programming languages and tools are available. Furthermore, such languages and tools must incorporate MAS techniques in a principled but practical way, so as to support the ever more complex task of professional programmers, in particular when the systems have to operate in dynamic environments. The ProMAS workshop series aims to address practical issues related to developing and deploying multi-agent systems. In particular, ProMAS aims to address how MAS designs or specifications can be effectively implemented. To address such issues, the workshop promotes the discussion and exchange of ideas concerning concepts, techniques, and principles that are important for multi-agent programming technology. In the three previous editions, ProMAS constituted an invaluable occasion, bringing together leading researchers from both academia and industry to discuss such issues. Confirming the growing importance of this area of research, in 2005 ProMAS was the most popular of all AAMAS workshops in terms of numbers of registered participants. We encourage the submission of original papers in any of the areas mentioned below. We particularly welcome papers describing programming languages and tools that provide specific programming constructs to facilitate the implementation of the essential concepts used in multi-agent system analysis and specifications. We also welcome submissions describing significant multi-agent applications, showing clearly the added-value of multi-agent programming for designers and programmers both in academia and industry. Specific topics for this workshop include, but are not limited to: - Programming Languages for multi-agent systems - Extensions of traditional languages for multi-agent programming - Theoretical and practical aspects of multi-agent programming - Computational complexity of MAS - Semantics for multi-agent programming languages - High-level executable multi-agent specification languages - Algorithms, techniques, or protocols for multi-agent issues (e.g., coordination, cooperation, negotiation) - Agent communication issues in multi-agent programming - Implementation of social and organisational aspects of MAS - Formal methods for specification and verification of MAS - Verification tools for implementations of MAS - Agent development tools and platforms - Generic tools and infrastructures for multi-agent programming - Interoperability and standards for MAS - Programming mobile agents - Safety and security for mobile MAS deployment - Fault tolerance and load balancing for mobile MAS - Application areas for multi-agent programming languages - Applications using legacy systems - Programming MAS for Grid-based applications - Programming MAS for the Semantic Web - Deployed (industrial-strength) MAS - Benchmarks and testbeds for comparing MAS languages and tools Important Dates: ---------------- Paper submission deadline: 15th of January, 2006 Notifications of acceptance/rejection: 19th of February, 2006 Camera-ready copies due: 17th of March, 2006 Workshop Date: 8th or 9th of May, 2006 (TBA) Submission Details: ------------------- Authors should submit their paper by uploading a PDF file at: http://promas2006.in.tu-clausthal.de/submissions/ Papers should be formatted using Springer LNCS style (see http://www.springer.de/comp/lncs/authors.html) and have a maximum of 15 pages. Accepted papers will be published as a technical report and distributed to registered participants during the workshop. As it was the case for ProMAS-03, ProMAS-04, and ProMAS-05, we are planning to publish extended versions of the accepted papers as a volume of the Lecture Notes in Computer Science series by Springer-Verlag. Programme Committee: -------------------- Suzanne Barber (University of Texas at Austin, USA) Lars Braubach (University of Hamburg, Germany) Jean-Pierre Briot (University of Paris 6, France) Keith Clark (Imperial College, UK) Rem Collier (University College Dublin, Ireland) Yves Demazeau (Institut IMAG - Grenoble, France) Frank Dignum (Utrecht University, Netherlands) Michael Fisher (University of Liverpool, UK) Jorge G?mez-Sanz (Universidad Complutense Madris, Spain) Vladimir Gorodetsky (Russian Academy of Sciences, Russia) Benjamin Hirsch (TU-Berlin, Germany) Shinichi Honiden (NII, Tokyo, Japan) Jomi H?bner (Universidade Regional de Blumenau, Brazil) Jo?o Leite (University Nova de Lisboa, Portugal) Jiming Liu (Hong Kong Baptist University, Hong Kong) John-Jules Meyer (Utrecht University, Netherlands) Oliver Obst (Koblenz-Landau University, Germany) Gregory O'Hare (University College Dublin, Ireland) Andrea Omicini (University of Bologna, Italy) Agostino Poggi (Universit? degli Studi di Parma, Italy) Alexander Pokahr (University of Hamburg, Germany) Chris Reed (Calico Jack Ltd., UK) Birna van Riemsdijk (Utrecht University, Netherlands) Sebastian Sardina (RMIT University, Australia) Ichiro Satoh (NII, Kyoto, Japan) Onn Shehory (IBM Haifa Research Labs, Haifa University, Israel) Kostas Stathis (City University London, UK) Simon Thompson (BT, UK) Leon van der Torre (CWI, Netherlands) Paolo Torroni (University of Bologna, Italy) Gerhard Weiss (Technische Universit?t M?nchen, Germany) Michael Winikoff (RMIT University, Melbourne, Australia) Cees Witteveen (Delft University, Netherlands) Organising Committee: --------------------- Rafael H. Bordini (University of Durham, U.K.) http://www.dur.ac.uk/r.bordini Mehdi Dastani (Utrecht University, The Netherlands) http://www.cs.uu.nl/~mehdi J?rgen Dix (Clausthal University of Technology, Germany) http://www.in.tu-clausthal.de/~dix/ Amal El Fallah Seghrouchni (University of Paris VI, France) http://www-poleia.lip6.fr/~elfallah/ ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list runned by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From event@REDACTED Wed Nov 16 12:34:07 2005 From: event@REDACTED (event@REDACTED) Date: Wed, 16 Nov 2005 12:34:07 +0100 Subject: CFP: CLIMA at AAMAS 06 Message-ID: <437B192F.2030103@tu-clausthal.de> ===================== Call for Papers ===================== CLIMA VII Seventh International Workshop on Computational Logic in Multi-Agent Systems May 8,9 2006 in association with AAMAS2006 (May 8 - 12, 2006) Future University, Hakodate, Japan http://www.fun.ac.jp/aamas2006/ http://research.nii.ac.jp/climaVII/ =========================================================== Aims and scope -------------- Multi-Agent Systems are communities of problem-solving entities that can perceive and act upon their environment to achieve their individual goals as well as joint goals. The work on such systems integrates many technologies and concepts in artificial intelligence and other areas of computing as well as other disciplines. Over recent years, the agent paradigm gained popularity, due to its applicability to a full spectrum of domains, from search engines to educational aids to electronic commerce and trade, e-procurement, recommendation systems, simulation and routing, to cite only some. Computational logic provides a well-defined, general, and rigorous framework for studying syntax, semantics and procedures for various tasks by individual agents, as well as interaction amongst agents in multi-agent systems, for implementations, environments, tools, and standards, and for linking together specification and verification of properties of individual agents and multi-agent systems. The purpose of this workshop is to discuss techniques, based on computational logic, for representing, programming and reasoning about agents and multi-agent systems in a formal way. We solicit unpublished papers on agents and multi-agent systems based upon or relating to computational logic. You can find further information regarding the previous edition of CLIMA in http://clima.deis.unibo.it/ and the history of CLIMA in http://research.nii.ac.jp/climaVII/about.html. Topics ------ Relevant topics include, but are not limited to, the following: * logical foundations of (multi-)agent systems * extensions of logic programming for (multi-)agent systems * modal logic approaches to (multi-)agent systems * logic-based programming languages for (multi-)agent systems * non-monotonic reasoning in (multi-)agent systems * decision theory for (multi-)agent systems * agent and multi-agent hypothetical reasoning and learning * theory and practice of argumentation for agent reasoning and interaction * knowledge and belief representation and updates in (multi-)agent systems * operational semantics and execution agent models * model checking algorithms, tools, and applications for (multi-)agent logics * semantics of interaction and agent communication languages * distributed constraint satisfaction in multi-agent systems * temporal reasoning for (multi-)agent systems * distributed theorem proving for multi-agent systems * logic-based implementations of (multi-)agent systems * specification and verification of formal properties of (multi-)agent systems Submissions ----------- We welcome and encourage the submission of high quality, original papers, which are not simultaneously submitted for publication elsewhere. Papers should be written in English, formatted according to the Springer Verlag LNCS style, which can be obtained from http://www.springeronline.com, and not exceed 16 pages including figures, references, etc. Each paper should include *some examples* illustrating the proposed techniques. Proceedings and post-workshop publications ------------------------------------------ A printed volume of the proceedings will be available at the workshop. Authors of papers presented at the workshop will be asked to extend their contributions, possibly incorporating the results of the workshop discussion, to be included in the workshop post-proceedings, after another round of refereeing. Springer Verlag has accepted in principle to publish the post-proceedings as a volume of the Lecture Notes in Artificial Intelligence series. Important Dates --------------- - Submission Deadline: January 15, 2006 - Notification: February 19, 2006 - Camera Ready Copy Due: March 10, 2006 - CLIMA VII: May 8 and 9, 2006 Workshop Chairs --------------- Katsumi Inoue, National Institute of Informatics, Japan Ken Satoh, National Institute of Informatics, Japan Francesca Toni, Imperial College London, UK Email: clima-vii@REDACTED Programme Committee ------------------- Jose Julio Alferes, New University of Lisbon, Portugal Rafael H. Bordini, University of Durham, UK Gerhard Brewka, University of Leipzig, Germany Stefania Constantini, University of L'Aquila, Italy Juergen Dix, Technical University of Clausthal, Germany Patrick Doherty, Linkoping University, Sweden Phan Ming Dung, AIT, Thailand Thomas Eiter, Vienna University of Technology, Austria Klaus Fischer, DFKI, Germany Michael Fisher, The University of Liverpool, UK Michael Gelfond, Texas Technical University, USA James Harland, RMIT, Australia Hisashi Hayashi, Toshiba, Japan Wiebe van der Hoek, The University of Liverpool, UK Antonis Kakas, University of Cyprus, Cyprus Joao Leite, New University of Lisbon, Portugal Fangzhen Lin, Hong Kong University of Science and Technology, Hong Kong Paola Mello, University of Bologna, Italy John Jules Ch. Meyer, Utrecht University, The Netherlands Leora Morgenstern, IBM T.J. Watson Research Center, USA Naoyuki Nide, Nara Women's University, Japan Maurice Pagnucco, University of New South Wales, Australia Wojciech Penczek, Polish Academy of Sciences, Poland Enrico Pontelli, New Mexico State University, USA Fariba Sadri, Imperial College London, UK Chiaki Sakama, Wakayama University, Japan Abdul Sattar, Griffith University, Australia Hajime Sawamura, Niigata University, Japan Renate Schmidt, University of Manchester, UK Trao Can Son, New Mexico State University, USA Kostas Stathis, City University London, UK Michael Thielscher, Dresden University of Technology, Germany Satoshi Tojo, Japan Advanced Institute of Science and Technology, Japan Paolo Torroni, University of Bologna, Italy Marina de Vos, University of Bath, UK Cees Witteveen, Delft University of Technology, The Netherlands Home page of CLIMA VII: http://research.nii.ac.jp/climaVII ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list runned by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From rickard.s.green@REDACTED Fri Nov 18 14:48:34 2005 From: rickard.s.green@REDACTED (Rickard Green) Date: Fri, 18 Nov 2005 14:48:34 +0100 Subject: Uncertain death In-Reply-To: <32777.212.155.207.253.1132314104.squirrel@www.geekisp.com> References: <32777.212.155.207.253.1132314104.squirrel@www.geekisp.com> Message-ID: <437DDBB2.7010107@ericsson.com> We also consider this a bug (with low prio). There will be a fix for it released for R10B, but probably not in R10B-9. Best Regards, Rickard Green, Erlang/OTP Dominic Williams wrote: > Oh yes, I realize that. I'm not bothered at all by the delay, > although I wouldn't mind a neater way of "waiting" for its > death than timer:sleep/1. > > What bothers me is the contradictory information provided by > is_process_alive(Pid) and processes(). That seems like a bug > to me. > > Dominic. > > > >>When you send an exit signal to a process, >>it is scheduled in order to receive it. >>This goes for 'kill' messages as well, even >>though you'd think that they could be >>killed right away by the runtime system. >> >>/Uffe >> >> >>>-----Original Message----- >>>From: owner-erlang-questions@REDACTED >>>[mailto:owner-erlang-questions@REDACTED] On Behalf Of >>>Dominic Williams >>>Sent: den 17 november 2005 23:32 >>>To: 'erlang-questions@REDACTED' >>>Subject: Uncertain death >>> >>>Hello, >>> >>>The following program seems to me to indicate that when a >>>processes gets killed, there is, for a brief moment, >>>contradictory information about its state. Specifically, the >>>information returned by processes() seems to lag behind that >>>given by is_process_alive(). >>> >>> >>>%%% death.erl >>> >>>-module (death). >>>-export ([run/0, server/0]). >>> >>>run() -> >>> Pid = spawn (?MODULE, server, []), >>> exit (Pid, kill), >>> report (Pid), >>> timer:sleep(1000), >>> report (Pid). >>> >>>report (Pid) -> >>> io:fwrite("~p alive: ~p; member of processes(): ~p~n", >>> [Pid, is_process_alive (Pid), >>> lists:member(Pid, processes())]). >>> >>>server () -> >>> receive >>> hello -> >>> server(); >>> stop -> >>> bye >>> end. >>> >>>%%% end death.erl >>> >>>1> c("/Users/dodo/tmp/death", [{outdir, "/Users/dodo/tmp/"}]). >>>{ok,death} >>>2> death:run(). >>><0.35.0> alive: false; member of processes(): true <0.35.0> >>>alive: false; member of processes(): false ok >>> >>>Same result under MacOS/R9C and WinXP/R10B >>> >>>Regards, >>> >>>Dominic Williams >>>http://www.dominicwilliams.net >>> >>>---- >>> >> > From gefla@REDACTED Fri Nov 18 15:41:00 2005 From: gefla@REDACTED (Gerd Flaig) Date: Fri, 18 Nov 2005 15:41:00 +0100 Subject: Erlang on Nokia 770 References: <87sltuc1sf.fsf@kilo.pond.sub.org> <3bb44c6e0511180054s1fcf5555sf5184a2358a3ad95@mail.gmail.com> <3bb44c6e0511180234w21f19172lf921808f73cc6961@mail.gmail.com> <3bb44c6e0511180329g589b9bblcec3b6033c593159@mail.gmail.com> Message-ID: <87acg2auir.fsf@kilo.pond.sub.org> bryan rasmussen writes: > What's the performance like? > It'd be interesting to compare vs the gumstix and blackdog. I haven't run any benchmarks. The commandline feels snappy, but that doesn't really tell much of course. Performance should be comparable since the device also has an ARM9 core running at 220 MHz and DDR RAM. Goodbyte, Gerd. -- The last thing one knows in constructing a work is what to put first. -- Blaise Pascal From xpdoka@REDACTED Fri Nov 18 17:27:59 2005 From: xpdoka@REDACTED (Dominic Williams) Date: Fri, 18 Nov 2005 17:27:59 +0100 (CET) Subject: Uncertain death In-Reply-To: <437DDBB2.7010107@ericsson.com> References: <32777.212.155.207.253.1132314104.squirrel@www.geekisp.com> <437DDBB2.7010107@ericsson.com> Message-ID: <34555.212.155.207.253.1132331279.squirrel@www.geekisp.com> That would be great, thanks! Dominic. > We also consider this a bug (with low prio). There will be a fix for it > released for R10B, but probably not in R10B-9. > > Best Regards, > Rickard Green, Erlang/OTP > > Dominic Williams wrote: >> Oh yes, I realize that. I'm not bothered at all by the delay, >> although I wouldn't mind a neater way of "waiting" for its >> death than timer:sleep/1. >> >> What bothers me is the contradictory information provided by >> is_process_alive(Pid) and processes(). That seems like a bug >> to me. >> >> Dominic. >> >> >> >>>When you send an exit signal to a process, >>>it is scheduled in order to receive it. >>>This goes for 'kill' messages as well, even >>>though you'd think that they could be >>>killed right away by the runtime system. >>> >>>/Uffe >>> >>> >>>>-----Original Message----- >>>>From: owner-erlang-questions@REDACTED >>>>[mailto:owner-erlang-questions@REDACTED] On Behalf Of >>>>Dominic Williams >>>>Sent: den 17 november 2005 23:32 >>>>To: 'erlang-questions@REDACTED' >>>>Subject: Uncertain death >>>> >>>>Hello, >>>> >>>>The following program seems to me to indicate that when a >>>>processes gets killed, there is, for a brief moment, >>>>contradictory information about its state. Specifically, the >>>>information returned by processes() seems to lag behind that >>>>given by is_process_alive(). >>>> >>>> >>>>%%% death.erl >>>> >>>>-module (death). >>>>-export ([run/0, server/0]). >>>> >>>>run() -> >>>> Pid = spawn (?MODULE, server, []), >>>> exit (Pid, kill), >>>> report (Pid), >>>> timer:sleep(1000), >>>> report (Pid). >>>> >>>>report (Pid) -> >>>> io:fwrite("~p alive: ~p; member of processes(): ~p~n", >>>> [Pid, is_process_alive (Pid), >>>> lists:member(Pid, processes())]). >>>> >>>>server () -> >>>> receive >>>> hello -> >>>> server(); >>>> stop -> >>>> bye >>>> end. >>>> >>>>%%% end death.erl >>>> >>>>1> c("/Users/dodo/tmp/death", [{outdir, "/Users/dodo/tmp/"}]). >>>>{ok,death} >>>>2> death:run(). >>>><0.35.0> alive: false; member of processes(): true <0.35.0> >>>>alive: false; member of processes(): false ok >>>> >>>>Same result under MacOS/R9C and WinXP/R10B >>>> >>>>Regards, >>>> >>>>Dominic Williams >>>>http://www.dominicwilliams.net >>>> >>>>---- >>>> >>> >> > > Dominic Williams http://www.dominicwilliams.net From erlang@REDACTED Fri Nov 18 17:52:34 2005 From: erlang@REDACTED (Michael McDaniel) Date: Fri, 18 Nov 2005 08:52:34 -0800 Subject: badmatch with chunked data (LONG) In-Reply-To: <20051112041009.GA15817@delora.autosys.us> References: <20051112041009.GA15817@delora.autosys.us> Message-ID: <20051118165233.GS9690@delora.autosys.us> On Fri, Nov 11, 2005 at 08:10:09PM -0800, Michael McDaniel wrote: > > I am apparently having a problem that I thought was fixed in an earlier inets > release. Perhaps this is different problem? > > That problem is a badmatch error in inets when receiving chunked data. > At least, I am pretty sure that is what is happening. > > I make a POST to a server and the response comes back chunked. I have > never had problem with this application before when return xml information > was much smaller (presumably always fit in single chunk before). > > I am on Linux using R10B-8 (inets-4.6.1) or R10B-6 (inets-4.5) > > Follows is the code that generates the problem with > the proprietary information scrubbed ... > > > Body = " ... " , > Server = "server.example.com" , > UPW = "some_username:password" , > > case (catch http:request(post, > {"https://" ++ Server , > [ > {"Date", httpd_util:rfc1123_date()} , > {"Host", Server} , > {"REALM", "90X"} , > {"API_VERSION", "T:2.9"} , > {"Authorization", "Basic " ++ http_base_64:encode(UPW)} , > {"Accept", "text/xml/html"}, > {"User-Agent", "Erlang Client"} > ], "text/xml; charset=utf-8", Body }, > [{keepalive, false}, {nodelay,true}], [])) of > {ok, Result} -> {ok, Result} ; > {error, Reason} -> > > write Reason to log and do some other stuff > . > > > *** > Follows is error with proprietary information scrubbed. > I added line numbers for reference purposes. > *** > > > 1 =ERROR REPORT==== 11-Nov-2005::02:51:06 === > 2 ** Generic server <0.22220.71> terminating > 3 ** Last message in was {ssl,{sslsocket,5,<0.22221.71>}, > 4 <<103, remaining binary information removed ... > 5 10>>} > 6 ** When Server state == {state,{request, > 7 #Ref<0.0.63.220568>, > 8 <0.20015.36>, > 9 0, > 10 https, > 11 {"some.example.com",443}, > 12 "/xmlreceiver", > 13 [], > 14 post, > 15 {http_request_h, > 16 undefined, > 17 "keep-alive", > 18 "Mon, 11 Nov 2005 09:51:05 GMT", > 19 undefined, > 20 undefined, > 21 undefined, > 22 undefined, > 23 undefined, > 24 undefined, > 25 "text/xml/html", > 26 undefined, > 27 undefined, > 28 undefined, > 29 "Basic zecret", > 30 undefined, > 31 undefined, > 32 "some.example.com/xmlreceiver", > 33 undefined, > 34 undefined, > 35 undefined, > 36 undefined, > 37 undefined, > 38 undefined, > 39 undefined, > 40 undefined, > 41 undefined, > 42 [], > 43 "Erlang Client", > 44 undefined, > 45 undefined, > 46 undefined, > 47 "0", > 48 undefined, > 49 undefined, > 50 undefined, > 51 undefined, > 52 undefined, > 53 undefined, > 54 [{"api_version","T:2.9"}, > 55 {"realm","90X"}]}, > 56 {"text/xml; charset=utf-8", > 57 " ... "}, > 58 {http_options,infinity,true,[],false}, > 59 "https://some.example.com/xmlreceiver"}, > 60 {tcp_session, > 61 {{"some.example.com",443},<0.22220.71>}, > 62 false, > 63 https, > 64 {sslsocket,5,<0.22221.71>}, > 65 1}, > 66 {"HTTP/1.1",200,"OK"}, > 67 {http_response_h, > 68 undefined, > 69 undefined, > 70 "Mon, 11 Nov 2005 09:51:05 GMT", > 71 undefined, > 72 undefined, > 73 "chunked", > 74 undefined, > 75 undefined, > 76 undefined, > 77 undefined, > 78 undefined, > 79 undefined, > 80 undefined, > 81 undefined, > 82 undefined, > 83 "Sun-ONE-Web-Server/6.1", > 84 undefined, > 85 undefined, > 86 undefined, > 87 undefined, > 88 undefined, > 89 "0", > 90 undefined, > 91 undefined, > 92 undefined, > 93 "text/xml", > 94 undefined, > 95 undefined, > 96 []}, > 97 undefined, > 98 {http_chunk, > 99 decode_trailer, > 100 [<<>>, > 101 "nitsil/<> sdrawkcab s'taht ffuts erom <>", > 102 [], > 103 nolimit, > 104 <<60, remaining binary information removed ... > 105 115>>, > 106 "16384"]}, > 107 {[],[]}, > 108 new, > 109 [], > 110 nolimit, > 111 nolimit, > 112 {options,{undefined,[]},0,2,2,disabled,enabled}, > 113 {timers,[],undefined}} > 114 ** Reason for termination == > 115 ** {{badmatch,{[[], > 116 "0", > 117 "> ... ... \n"], > 118 []}}, > 119 [{http_response,headers,2}, > 120 {http_chunk,handle_headers,2}, > 121 {httpc_handler,handle_http_msg,2}, > 122 {gen_server,handle_msg,6}, > 123 {proc_lib,init_p,5}]} > > > I hope I left enough information to be useful for someone to assist in > resolving this problem. > > A very interesting item is on line 101, the data is all reversed prior > to the binary data. I think that is an artifact of the error information > but maybe not. > > I ran the same POST request to the same server using curl, and received > proper return XML information which takes up more than 8192 octets (hence > my thought about problem with chunked data with inets). > > Any suggestions are welcome as now I have run out of ideas on how to > resolve problem. > > thanks, > > ~Michael > Portland, Oregon, USA ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Also, Chandru's ibrowse works correctly. I would prefer to use the inets library directly rather than extra code. ~Michael From tty@REDACTED Fri Nov 18 20:13:39 2005 From: tty@REDACTED (tty@REDACTED) Date: Fri, 18 Nov 2005 14:13:39 -0500 Subject: Loading Mnesia dbase Message-ID: Hello, I have total of 14 million entries in several files to load into a Mnesia dbase. I used one process per file and found that the first 10 million entries took around 15 mins to load into Mnesia (ram_copy). However after this initial 10 million entries things started to crawl. A 'ps' shows beam mainly blocking in I/O with around 3% CPU usage. I then restarted the test with a table of 15 fragments (ram_copy) thinking I hit some Mnesia limit. This dropped my initial 10 million entries to 8.5 mins. However its now back down to a crawl. The last 72000 entries took over 40 mins. I'm running on SuSe 10 (64bits), dual AMD Opteron 246 with 2GB RAM. I have 5 processes with 3 million entries each which is around 50MB of disc space per file. Each entry is a list of 6 integers. Each record in the dbase has 7 integers. All processes and Mnesia are running of one instance of the VM. Also using dirty_write's. Does anyone have any suggestions on speeding this ? Thanks t From ulf@REDACTED Fri Nov 18 21:53:37 2005 From: ulf@REDACTED (Ulf Wiger) Date: Fri, 18 Nov 2005 21:53:37 +0100 Subject: Loading Mnesia dbase In-Reply-To: References: Message-ID: First of all, try enabling the thread pool. I would pick a nice round number like 255, i.e. erl +A 255. Also, is your erlang node running out of physical RAM? It seems like it wouldn't, with 2 GB RAM, but I guess if you keep items both in process space and in mnesia, there would be a chance... Anyway, you can easily track memory use using 'top' or 'vmstat'. /Uffe Den 2005-11-18 20:13:39 skrev : > Hello, > > I have total of 14 million entries in several files to load into a > Mnesia dbase. I used one process per file and found that the first 10 > million entries took around 15 mins to load into Mnesia (ram_copy). > However after this initial 10 million entries things started to crawl. A > 'ps' shows beam mainly blocking in I/O with around 3% CPU usage. > > I then restarted the test with a table of 15 fragments (ram_copy) > thinking I hit some Mnesia limit. This dropped my initial 10 million > entries to 8.5 mins. However its now back down to a crawl. The last > 72000 entries took over 40 mins. > > I'm running on SuSe 10 (64bits), dual AMD Opteron 246 with 2GB RAM. I > have 5 processes with 3 million entries each which is around 50MB of > disc space per file. Each entry is a list of 6 integers. Each record in > the dbase has 7 integers. All processes and Mnesia are running of one > instance of the VM. Also using dirty_write's. > > Does anyone have any suggestions on speeding this ? > > Thanks > > t -- Ulf Wiger From tty@REDACTED Fri Nov 18 22:03:27 2005 From: tty@REDACTED (tty@REDACTED) Date: Fri, 18 Nov 2005 16:03:27 -0500 Subject: Loading Mnesia dbase Message-ID: Thanks Ulf, I'll give the thread pool a try. I'm maxing out at 1.8 GB RAM so everthing is still nicely in RAM space. Thanks. t -------- Original Message -------- From: "Ulf Wiger" To: tty@REDACTED, erlang-questions@REDACTED Subject: Re: Loading Mnesia dbase Date: Fri, 18 Nov 2005 21:53:37 +0100 > > First of all, try enabling the thread pool. > I would pick a nice round number like 255, i.e. > erl +A 255. > > Also, is your erlang node running out of physical > RAM? It seems like it wouldn't, with 2 GB RAM, but > I guess if you keep items both in process space and > in mnesia, there would be a chance... Anyway, you > can easily track memory use using 'top' or 'vmstat'. > > /Uffe > > Den 2005-11-18 20:13:39 skrev : > > > Hello, > > > > I have total of 14 million entries in several files to load into a > > Mnesia dbase. I used one process per file and found that the first 10 > > million entries took around 15 mins to load into Mnesia (ram_copy). > > However after this initial 10 million entries things started to crawl. A > > 'ps' shows beam mainly blocking in I/O with around 3% CPU usage. > > > > I then restarted the test with a table of 15 fragments (ram_copy) > > thinking I hit some Mnesia limit. This dropped my initial 10 million > > entries to 8.5 mins. However its now back down to a crawl. The last > > 72000 entries took over 40 mins. > > > > I'm running on SuSe 10 (64bits), dual AMD Opteron 246 with 2GB RAM. I > > have 5 processes with 3 million entries each which is around 50MB of > > disc space per file. Each entry is a list of 6 integers. Each record in > > the dbase has 7 integers. All processes and Mnesia are running of one > > instance of the VM. Also using dirty_write's. > > > > Does anyone have any suggestions on speeding this ? > > > > Thanks > > > > t > > > > -- > Ulf Wiger From sean.hinde@REDACTED Fri Nov 18 22:20:07 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Fri, 18 Nov 2005 21:20:07 +0000 Subject: Loading Mnesia dbase In-Reply-To: References: Message-ID: <02449CA4-B123-4603-8924-7EED1B23FAA0@gmail.com> > > I'll give the thread pool a try. I'm maxing out at 1.8 GB RAM so > everthing is still nicely in RAM space. That doesn't leave much room for everything else running on the machine. These symptoms do tend to indicate that you are going into swap. Sean > > -------- Original Message -------- > From: "Ulf Wiger" > To: tty@REDACTED, erlang-questions@REDACTED > Subject: Re: Loading Mnesia dbase > Date: Fri, 18 Nov 2005 21:53:37 +0100 > >> >> First of all, try enabling the thread pool. >> I would pick a nice round number like 255, i.e. >> erl +A 255. >> >> Also, is your erlang node running out of physical >> RAM? It seems like it wouldn't, with 2 GB RAM, but >> I guess if you keep items both in process space and >> in mnesia, there would be a chance... Anyway, you >> can easily track memory use using 'top' or 'vmstat'. >> >> /Uffe >> >> Den 2005-11-18 20:13:39 skrev : >> >>> Hello, >>> >>> I have total of 14 million entries in several files to load into a >>> Mnesia dbase. I used one process per file and found that the >>> first 10 >>> million entries took around 15 mins to load into Mnesia (ram_copy). >>> However after this initial 10 million entries things started to >>> crawl. A >>> 'ps' shows beam mainly blocking in I/O with around 3% CPU usage. >>> >>> I then restarted the test with a table of 15 fragments (ram_copy) >>> thinking I hit some Mnesia limit. This dropped my initial 10 million >>> entries to 8.5 mins. However its now back down to a crawl. The last >>> 72000 entries took over 40 mins. >>> >>> I'm running on SuSe 10 (64bits), dual AMD Opteron 246 with 2GB >>> RAM. I >>> have 5 processes with 3 million entries each which is around 50MB of >>> disc space per file. Each entry is a list of 6 integers. Each >>> record in >>> the dbase has 7 integers. All processes and Mnesia are running of >>> one >>> instance of the VM. Also using dirty_write's. >>> >>> Does anyone have any suggestions on speeding this ? >>> >>> Thanks >>> >>> t >> >> >> >> -- >> Ulf Wiger From valentin@REDACTED Sat Nov 19 13:17:25 2005 From: valentin@REDACTED (Valentin Micic) Date: Sat, 19 Nov 2005 14:17:25 +0200 Subject: Loading Mnesia dbase References: Message-ID: <011901c5ed03$34114900$0100a8c0@MONEYMAKER2> >First of all, try enabling the thread pool. >I would pick a nice round number like 255, i.e. >erl +A 255. I like this... recently, while loading a huge amount of data (80milion records+) into a bunch of mnesia disk-only tables, I've noticed that responsiveness of the ERLANG run-time decreases dramatically with increase of I/O wait, i.e. if one attempts to issue a command to shell, it might take few seconds before it even consider's it (well, I did fix the problem... using a hammer, though). Am I correct in understanding that adding more threads, I/O wait would have lesser effect on run-time agility? V. PS I'm still using R9 and running out of excuses (other than logisitical ones) not to migrate to R10. I am begging you to give me at least one ;-). From robert.virding@REDACTED Sat Nov 19 18:20:45 2005 From: robert.virding@REDACTED (Robert Virding) Date: Sat, 19 Nov 2005 18:20:45 +0100 Subject: Uncertain death In-Reply-To: References: Message-ID: <437F5EED.1020308@telia.com> Doing exit(Pid, kill) sends an exit signal, of value kill, to the process so it should be scheduled in the same way as "normal" exit signals. Generally I think you should be careful if you start special casing various things as you can get unexpected behavious. Robert Ulf Wiger (AL/EAB) wrote: >When you send an exit signal to a process, >it is scheduled in order to receive it. >This goes for 'kill' messages as well, even >though you'd think that they could be >killed right away by the runtime system. > >/Uffe > > > >>-----Original Message----- >>From: owner-erlang-questions@REDACTED >>[mailto:owner-erlang-questions@REDACTED] On Behalf Of >>Dominic Williams >>Sent: den 17 november 2005 23:32 >>To: 'erlang-questions@REDACTED' >>Subject: Uncertain death >> >>Hello, >> >>The following program seems to me to indicate that when a >>processes gets killed, there is, for a brief moment, >>contradictory information about its state. Specifically, the >>information returned by processes() seems to lag behind that >>given by is_process_alive(). >> >> >>%%% death.erl >> >>-module (death). >>-export ([run/0, server/0]). >> >>run() -> >> Pid = spawn (?MODULE, server, []), >> exit (Pid, kill), >> report (Pid), >> timer:sleep(1000), >> report (Pid). >> >>report (Pid) -> >> io:fwrite("~p alive: ~p; member of processes(): ~p~n", >> [Pid, is_process_alive (Pid), >> lists:member(Pid, processes())]). >> >>server () -> >> receive >> hello -> >> server(); >> stop -> >> bye >> end. >> >>%%% end death.erl >> >>1> c("/Users/dodo/tmp/death", [{outdir, "/Users/dodo/tmp/"}]). >>{ok,death} >>2> death:run(). >><0.35.0> alive: false; member of processes(): true <0.35.0> >>alive: false; member of processes(): false ok >> >>Same result under MacOS/R9C and WinXP/R10B >> >>Regards, >> >>Dominic Williams >>http://www.dominicwilliams.net >> >>---- >> >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobbe@REDACTED Sun Nov 20 10:20:53 2005 From: tobbe@REDACTED (tobbe) Date: Sun, 20 Nov 2005 10:20:53 +0100 Subject: trapexit info References: Message-ID: <20051120092053.D21A759139@bang.trapexit.org> Hi, Just 2 short messages from trapexit.org: The (broken) chat area has been removed. Instead you'll find a link to the excellent RSS aggregator over at www.planeterlang.org. A new erlmerge package, named Yfront, has been uploaded to trapexit.org. Yfront is the beginning of a Yaws toolbox for building web applications. More info can be found in the documentation at: www.trapexit.org/uc/jungerl/lib/yfront/doc/ Note: yfront lives in Jungerl so anyone are welcomed to contribute. Cheers, Tobbe _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From ulf.wiger@REDACTED Sun Nov 20 15:45:14 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Sun, 20 Nov 2005 15:45:14 +0100 Subject: Uncertain death Message-ID: I agree. /Uffe ________________________________ From: Robert Virding [mailto:robert.virding@REDACTED] Sent: den 19 november 2005 18:21 To: Ulf Wiger (AL/EAB) Cc: Dominic Williams; erlang-questions@REDACTED Subject: Re: Uncertain death Doing exit(Pid, kill) sends an exit signal, of value kill, to the process so it should be scheduled in the same way as "normal" exit signals. Generally I think you should be careful if you start special casing various things as you can get unexpected behavious. Robert Ulf Wiger (AL/EAB) wrote: When you send an exit signal to a process, it is scheduled in order to receive it. This goes for 'kill' messages as well, even though you'd think that they could be killed right away by the runtime system. /Uffe -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Dominic Williams Sent: den 17 november 2005 23:32 To: 'erlang-questions@REDACTED' Subject: Uncertain death Hello, The following program seems to me to indicate that when a processes gets killed, there is, for a brief moment, contradictory information about its state. Specifically, the information returned by processes() seems to lag behind that given by is_process_alive(). %%% death.erl -module (death). -export ([run/0, server/0]). run() -> Pid = spawn (?MODULE, server, []), exit (Pid, kill), report (Pid), timer:sleep(1000), report (Pid). report (Pid) -> io:fwrite("~p alive: ~p; member of processes(): ~p~n", [Pid, is_process_alive (Pid), lists:member(Pid, processes())]). server () -> receive hello -> server(); stop -> bye end. %%% end death.erl 1> c("/Users/dodo/tmp/death", [{outdir, "/Users/dodo/tmp/"}]). {ok,death} 2> death:run(). <0.35.0> alive: false; member of processes(): true <0.35.0> alive: false; member of processes(): false ok Same result under MacOS/R9C and WinXP/R10B Regards, Dominic Williams http://www.dominicwilliams.net ---- -------------- next part -------------- An HTML attachment was scrubbed... URL: From mickael.remond@REDACTED Sun Nov 20 21:49:45 2005 From: mickael.remond@REDACTED (Mickael Remond) Date: Sun, 20 Nov 2005 21:49:45 +0100 Subject: erlang:monitor can hang under certain conditions Message-ID: <20051120204945.GA4020@memphis.process-one.net> Hello, The following problem has been brought to my attention: If this happen to be really a bug, it could trigger deadlock when using Erlang monitor for a disappered process. The ProcessId is a local processid, but the node has changed in the meantime. It seems to confuse the monitor. Here is how to reproduce it. ************ ping.erl ******************* -module(ping). -export([start/0,loop/1]). start() -> register(ping,spawn(ping,loop,[initial])). loop(X) -> receive {store, Y} -> loop(Y); {retrieve, Pid} when pid(Pid) -> Pid ! X, loop(X) end. **************************************** First time, the Erlang monitor is not hanging: $ erl -sname ping -s ping -detached $ erl -sname hanger Erlang (BEAM) emulator version 5.4.4 [source] [threads:0] Eshell V5.4.4 (abort with ^G) (hanger@REDACTED)1> OldPid = spawn(io, format, ["ok",""]). ok<0.37.0> ... (hanger@REDACTED)4> {ping, 'ping@REDACTED'} ! {store, OldPid}. {store,<0.37.0>} (hanger@REDACTED)5> {ping, 'ping@REDACTED'} ! {retrieve, self()}. {retrieve,<0.42.0>} (hanger@REDACTED)6> RetPid = receive X -> X end. <0.37.0> (hanger@REDACTED)7> erlang:monitor(process,RetPid). #Ref<0.0.0.68> (hanger@REDACTED)8> halt(). Second time: erl -sname hanger Erlang (BEAM) emulator version 5.4.4 [source] [threads:0] Eshell V5.4.4 (abort with ^G) (hanger@REDACTED)1> {ping, 'ping@REDACTED'} ! {retrieve, self()}. {retrieve,<0.35.0>} (hanger@REDACTED)2> RetPid = receive X -> X end. <0.37.0> (hanger@REDACTED)3> RetPid. <0.37.0> (hanger@REDACTED)4> erlang:monitor(process,RetPid). The function never returns. I have started looking at the Erlang code to analyze more deeply the problem, but I thought that it might be interesting to share the information. Cheers, -- Micka?l R?mond http://www.process-one.net/ From mbj@REDACTED Mon Nov 21 15:19:22 2005 From: mbj@REDACTED (Martin Bjorklund) Date: Mon, 21 Nov 2005 15:19:22 +0100 (CET) Subject: principle of least surprise Message-ID: <20051121.151922.41646109.mbj@tail-f.com> After the obfuscation contest we now know that parentheses are important in guards... I have a datatype foo which is either an atom or a tuple of size 2. It would be nice with a macro to test if a certain value is a foo, e.g. -define(is_foo(X), (is_atom(X) or (is_tuple(X) and (size(X) == 2)))). Then I could use this test in guards, f(X) when ?is_foo(X) -> yes; f(X) -> no. Isn't this reasonable? Anyone can read and understand this code. The problem is that this won't work; if I call f(foo) it will return no. The reason is that all expressions in my guard will be evaluated, and that failure in a boolean expression will fail the guard which is interpreted as false. (and in this case size(foo) fails). So I tried some alternatives: -define(is_foo(X), (atom(X) or (tuple(X) and (size(X) == 2)))). not that I thought that this would work, but it won't even compile. Why do we have atom/1 and is_atom/1??? And I know that this one doesn't work. -define(is_foo(X), (is_atom(X) orelse (is_tuple(X) andalso (size(X) == 2)))). Sigh. Maybe we shouldn't be allowed to write code like this? No... My radical suggestion is: o make sure or,and etc has precedence over ==,/= etc (like orelse/andalso) o _remove_ orelse/andalso completely from the language (what's the probability of that?) And then I think (size(X) == 2) should be false if X is not something you can do size on. But that's probably out of the question. /martin From tty@REDACTED Mon Nov 21 16:30:30 2005 From: tty@REDACTED (tty@REDACTED) Date: Mon, 21 Nov 2005 10:30:30 -0500 Subject: Loading Mnesia dbase Message-ID: Its possible I'm hitting swap. The box isn't running anything else (other then the basic Linux stuff xinit etc). Enabling threads did help early one but the final process ended 12.8 hours later. It took a mere 10 mins to hit the 10 million records mark. 17 mins for 10.34 million, 38 mins for 10.688 million. For some reason the 10 million mark seems to be the start of slowdowns. The current reported run is my 6th attempt at this. Any other hints - I would not discount my code being less then optimal :) Thanks t -------- Original Message -------- From: Sean Hinde Apparently from: owner-erlang-questions@REDACTED To: tty@REDACTED Cc: ulf@REDACTED, erlang-questions@REDACTED Subject: Re: Loading Mnesia dbase Date: Fri, 18 Nov 2005 21:20:07 +0000 > > > > I'll give the thread pool a try. I'm maxing out at 1.8 GB RAM so > > everthing is still nicely in RAM space. > > That doesn't leave much room for everything else running on the > machine. These symptoms do tend to indicate that you are going into > swap. > > Sean > > > > > > -------- Original Message -------- > > From: "Ulf Wiger" > > To: tty@REDACTED, erlang-questions@REDACTED > > Subject: Re: Loading Mnesia dbase > > Date: Fri, 18 Nov 2005 21:53:37 +0100 > > > >> > >> First of all, try enabling the thread pool. > >> I would pick a nice round number like 255, i.e. > >> erl +A 255. > >> > >> Also, is your erlang node running out of physical > >> RAM? It seems like it wouldn't, with 2 GB RAM, but > >> I guess if you keep items both in process space and > >> in mnesia, there would be a chance... Anyway, you > >> can easily track memory use using 'top' or 'vmstat'. > >> > >> /Uffe > >> > >> Den 2005-11-18 20:13:39 skrev : > >> > >>> Hello, > >>> > >>> I have total of 14 million entries in several files to load into a > >>> Mnesia dbase. I used one process per file and found that the > >>> first 10 > >>> million entries took around 15 mins to load into Mnesia (ram_copy). > >>> However after this initial 10 million entries things started to > >>> crawl. A > >>> 'ps' shows beam mainly blocking in I/O with around 3% CPU usage. > >>> > >>> I then restarted the test with a table of 15 fragments (ram_copy) > >>> thinking I hit some Mnesia limit. This dropped my initial 10 million > >>> entries to 8.5 mins. However its now back down to a crawl. The last > >>> 72000 entries took over 40 mins. > >>> > >>> I'm running on SuSe 10 (64bits), dual AMD Opteron 246 with 2GB > >>> RAM. I > >>> have 5 processes with 3 million entries each which is around 50MB of > >>> disc space per file. Each entry is a list of 6 integers. Each > >>> record in > >>> the dbase has 7 integers. All processes and Mnesia are running of > >>> one > >>> instance of the VM. Also using dirty_write's. > >>> > >>> Does anyone have any suggestions on speeding this ? > >>> > >>> Thanks > >>> > >>> t > >> > >> > >> > >> -- > >> Ulf Wiger From mbj@REDACTED Mon Nov 21 21:55:29 2005 From: mbj@REDACTED (mbj@REDACTED) Date: Mon, 21 Nov 2005 21:55:29 +0100 (CET) Subject: principle of least surprise In-Reply-To: <43822816.4070702@nortel.com> References: <20051121.151922.41646109.mbj@tail-f.com> <43822816.4070702@nortel.com> Message-ID: <20051121.215529.112823144.mbj@tail-f.com> Magnus Fr?berg wrote: > But, surprise: > > -define(is_foo(X), is_atom(X) ; is_tuple(X), (size(X) == 2)). Right, but then you can't use is_foo as other booleans, e.g. IsBar = (?is_foo(X) or is_list(X)), or whatever. /martin > > /Magnus > > Martin Bjorklund wrote: > > >After the obfuscation contest we now know that parentheses are > >important in guards... > > > >I have a datatype foo which is either an atom or a tuple of size 2. > > > >It would be nice with a macro to test if a certain value is a foo, > >e.g. > > > > -define(is_foo(X), (is_atom(X) or (is_tuple(X) and (size(X) == 2)))). > > > >Then I could use this test in guards, > > > > f(X) when ?is_foo(X) -> yes; > > f(X) -> no. > > > >Isn't this reasonable? Anyone can read and understand this code. > > > >The problem is that this won't work; if I call f(foo) it will return > >no. The reason is that all expressions in my guard will be evaluated, > >and that failure in a boolean expression will fail the guard which is > >interpreted as false. (and in this case size(foo) fails). > > > >So I tried some alternatives: > > > > -define(is_foo(X), (atom(X) or (tuple(X) and (size(X) == 2)))). > > > >not that I thought that this would work, but it won't even compile. > >Why do we have atom/1 and is_atom/1??? > > > >And I know that this one doesn't work. > > > > -define(is_foo(X), (is_atom(X) orelse (is_tuple(X) andalso (size(X) == 2)))). > > > >Sigh. > > > >Maybe we shouldn't be allowed to write code like this? No... > > > >My radical suggestion is: > > > > o make sure or,and etc has precedence over ==,/= etc > > (like orelse/andalso) > > o _remove_ orelse/andalso completely from the language > > (what's the probability of that?) > > > >And then I think (size(X) == 2) should be false if X is not something > >you can do size on. But that's probably out of the question. > > > > > > > >/martin > > > > > From matthias@REDACTED Mon Nov 21 23:41:14 2005 From: matthias@REDACTED (Matthias Lang) Date: Mon, 21 Nov 2005 23:41:14 +0100 Subject: anyone know of a tool which can generate chunked HTTP/1.1 _requests_? In-Reply-To: References: <17275.45376.402481.271072@antilipe.corelatus.se> <437C3530.7070606@hyber.org> <17276.17972.408946.833807@antilipe.corelatus.se> Message-ID: <17282.19722.88358.465388@antilipe.corelatus.se> chandru writes: > I've patched ibrowse to be able to do this. TYVM > Just out of curiousity - why do you need the client sending > chunked data? I extended an HTTP server I wrote to handle chunked requests. As a sanity check, I wanted to try it with an implementation beyond my own test code. It turns out that my implementation and ibrowse have at least one bug each. RFC 2068 says: Messages MUST NOT include both a Content-Length header field and the "chunked" transfer coding. If both are received, the Content-Length MUST be ignored. ibrowse sends it and my server fails (failed) to ignore it. Thanks. Matthias From raimo@REDACTED Tue Nov 22 08:58:18 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 22 Nov 2005 08:58:18 +0100 Subject: principle of least surprise References: <20051121.151922.41646109.mbj@tail-f.com> Message-ID: I guess your radical suggestions to change precedence for 'and' and 'or', or to remove 'orelse' and also 'andalso' are out of the question, for backwards compatibility reasons. What about allowing 'orelse' and also 'andalso' in guards? That will probably happen one day. mbj@REDACTED (Martin Bjorklund) writes: > After the obfuscation contest we now know that parentheses are > important in guards... > > I have a datatype foo which is either an atom or a tuple of size 2. > > It would be nice with a macro to test if a certain value is a foo, > e.g. > > -define(is_foo(X), (is_atom(X) or (is_tuple(X) and (size(X) == 2)))). > > Then I could use this test in guards, > > f(X) when ?is_foo(X) -> yes; > f(X) -> no. > > Isn't this reasonable? Anyone can read and understand this code. > > The problem is that this won't work; if I call f(foo) it will return > no. The reason is that all expressions in my guard will be evaluated, > and that failure in a boolean expression will fail the guard which is > interpreted as false. (and in this case size(foo) fails). > > So I tried some alternatives: > > -define(is_foo(X), (atom(X) or (tuple(X) and (size(X) == 2)))). > > not that I thought that this would work, but it won't even compile. > Why do we have atom/1 and is_atom/1??? > > And I know that this one doesn't work. > > -define(is_foo(X), (is_atom(X) orelse (is_tuple(X) andalso (size(X) == 2)))). > > Sigh. > > Maybe we shouldn't be allowed to write code like this? No... > > My radical suggestion is: > > o make sure or,and etc has precedence over ==,/= etc > (like orelse/andalso) > o _remove_ orelse/andalso completely from the language > (what's the probability of that?) > > And then I think (size(X) == 2) should be false if X is not something > you can do size on. But that's probably out of the question. > > > > /martin -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From complog@REDACTED Mon Nov 21 20:20:07 2005 From: complog@REDACTED (Logic Programming Rsrch Association) Date: Mon, 21 Nov 2005 12:20:07 -0700 Subject: PADL 2006 Call for Participation Message-ID: <43821DE7.6030703@cs.nmsu.edu> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: padl06.txt URL: From mfroberg@REDACTED Mon Nov 21 21:03:34 2005 From: mfroberg@REDACTED (=?ISO-8859-1?Q?Magnus_Fr=F6berg?=) Date: Mon, 21 Nov 2005 21:03:34 +0100 Subject: principle of least surprise In-Reply-To: <20051121.151922.41646109.mbj@tail-f.com> References: <20051121.151922.41646109.mbj@tail-f.com> Message-ID: <43822816.4070702@nortel.com> But, surprise: -define(is_foo(X), is_atom(X) ; is_tuple(X), (size(X) == 2)). /Magnus Martin Bjorklund wrote: >After the obfuscation contest we now know that parentheses are >important in guards... > >I have a datatype foo which is either an atom or a tuple of size 2. > >It would be nice with a macro to test if a certain value is a foo, >e.g. > > -define(is_foo(X), (is_atom(X) or (is_tuple(X) and (size(X) == 2)))). > >Then I could use this test in guards, > > f(X) when ?is_foo(X) -> yes; > f(X) -> no. > >Isn't this reasonable? Anyone can read and understand this code. > >The problem is that this won't work; if I call f(foo) it will return >no. The reason is that all expressions in my guard will be evaluated, >and that failure in a boolean expression will fail the guard which is >interpreted as false. (and in this case size(foo) fails). > >So I tried some alternatives: > > -define(is_foo(X), (atom(X) or (tuple(X) and (size(X) == 2)))). > >not that I thought that this would work, but it won't even compile. >Why do we have atom/1 and is_atom/1??? > >And I know that this one doesn't work. > > -define(is_foo(X), (is_atom(X) orelse (is_tuple(X) andalso (size(X) == 2)))). > >Sigh. > >Maybe we shouldn't be allowed to write code like this? No... > >My radical suggestion is: > > o make sure or,and etc has precedence over ==,/= etc > (like orelse/andalso) > o _remove_ orelse/andalso completely from the language > (what's the probability of that?) > >And then I think (size(X) == 2) should be false if X is not something >you can do size on. But that's probably out of the question. > > > >/martin > > From mbj@REDACTED Tue Nov 22 09:41:13 2005 From: mbj@REDACTED (mbj@REDACTED) Date: Tue, 22 Nov 2005 09:41:13 +0100 (CET) Subject: principle of least surprise In-Reply-To: References: <20051121.151922.41646109.mbj@tail-f.com> Message-ID: <20051122.094113.85401478.mbj@tail-f.com> Raimo Niskanen wrote: > I guess your radical suggestions to change precedence for > 'and' and 'or', or to remove 'orelse' and also 'andalso' > are out of the question, for backwards compatibility > reasons. Do you really think that changing precedence for and/or will break old code? As for andalso and orelse, I realize that it probably won't happen, but if it did, is it really such a big thing? A large project would bring in the new erlang and recompile, and then the compiler would complain. It's trivial to change the code (if precedence for or/and is changed). Or maybe you could use some flag to the compiler which could be used for old code? > What about allowing 'orelse' and also 'andalso' in guards? > That will probably happen one day. Better than nothing of course, but wouldn't it be great to fix this mis-feature and make the language better? /martin From bengt.kleberg@REDACTED Tue Nov 22 09:44:39 2005 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 22 Nov 2005 09:44:39 +0100 Subject: broadcast address and erlang:'bnot'/1 Message-ID: <4382DA77.8040109@ericsson.com> greetings, i am creating broadcast addresses. is there such a function in an erlang module? my current solution is: broadcast_address( Address, Mask ) -> Fun = fun ( Int ) -> 255 bxor Int end, Inverted = lists:map( Fun, Mask ), lists:zipwith( fun erlang:'bor'/2, Address, Inverted ). is there a better way? if somebody asks me about where the bit operators/functions are documented, where should i tell them to look? it is not in the erlang module (or have i just missed them). there is no ''bnot'' in the permuted index (actually there is not even a ''bif'' in the permuted index). ''bnot'' seems to operate on signed integers. i would like to invert an unsigned char. bengt From mbj@REDACTED Tue Nov 22 09:51:04 2005 From: mbj@REDACTED (mbj@REDACTED) Date: Tue, 22 Nov 2005 09:51:04 +0100 (CET) Subject: principle of least surprise In-Reply-To: <20051122.094113.85401478.mbj@tail-f.com> References: <20051121.151922.41646109.mbj@tail-f.com> <20051122.094113.85401478.mbj@tail-f.com> Message-ID: <20051122.095104.07443230.mbj@tail-f.com> mbj@REDACTED wrote: > As for andalso and orelse, I realize that it probably won't happen, > but if it did, is it really such a big thing? A large project would > bring in the new erlang and recompile, and then the compiler would > complain. It's trivial to change the code (if precedence for or/and > is changed). I meant 'if evaluation rules for and/or are changed'. or something. /martin From xlcr@REDACTED Tue Nov 22 10:13:15 2005 From: xlcr@REDACTED (Nick Linker) Date: Tue, 22 Nov 2005 15:13:15 +0600 Subject: principle of least surprise In-Reply-To: <20051122.094113.85401478.mbj@tail-f.com> References: <20051121.151922.41646109.mbj@tail-f.com> <20051122.094113.85401478.mbj@tail-f.com> Message-ID: <4382E12B.1050906@mail.ru> >Better than nothing of course, but wouldn't it be great to fix this >mis-feature and make the language better? > > Hm, what, in your opinion, about the possibility to be an arbitrary function (returning true or false, of course) in guards? Will it make the language better? Best regards, Linker Nick. From ulf.wiger@REDACTED Tue Nov 22 10:11:05 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 22 Nov 2005 10:11:05 +0100 Subject: broadcast address and erlang:'bnot'/1 Message-ID: Bengt Kleberg wrote: > > if somebody asks me about where the bit operators/functions > are documented, where should i tell them to look? The Erlang Reference manual, chapter 6.12 http://erlang.se/doc/doc-5.4.10/doc/reference_manual/expressions.html#6. 12 /Uffe From mbj@REDACTED Tue Nov 22 10:35:20 2005 From: mbj@REDACTED (mbj@REDACTED) Date: Tue, 22 Nov 2005 10:35:20 +0100 (CET) Subject: principle of least surprise In-Reply-To: <4382E12B.1050906@mail.ru> References: <20051122.094113.85401478.mbj@tail-f.com> <4382E12B.1050906@mail.ru> Message-ID: <20051122.103520.115918608.mbj@tail-f.com> Nick Linker wrote: > > >Better than nothing of course, but wouldn't it be great to fix this > >mis-feature and make the language better? > > > > > Hm, what, in your opinion, about the possibility to be an arbitrary > function (returning true or false, of course) in guards? Will it make > the language better? Maybe I should have added "and more consistent". Anyway I think arbitrary functions in guards is an orthogonal question. Personally I think it would be nice but it's not that big deal. /martin From ulf.wiger@REDACTED Tue Nov 22 10:43:07 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 22 Nov 2005 10:43:07 +0100 Subject: principle of least surprise Message-ID: Nick Linker wrote: > > Hm, what, in your opinion, about the possibility to be an > arbitrary function (returning true or false, of course) in > guards? Will it make the language better? The problem of that obviously is that normal erlang functions can contain side-effects, loops, and all sorts of scary stuff. Haskell has 'monads', where all the scary stuff happens. Perhaps Erlang should introduce 'anti-monads' where scary stuff _can't_ happen? In "Wearing the hair shirt" 2003(*), Simon Peyton-Jones claimed that the only thing wrong with monads was the name: they should have called them "warm fuzzy things". Now, the 'anti-monad' would truly be warm and fuzzy, and should be allowable in guards (and most likely also in select patterns). Erlang WFTs, in other words, would be the thing to allow in guards. (: /Uffe (*) http://research.microsoft.com/users/simonpj/papers/haskell-retrospective / From chandrashekhar.mullaparthi@REDACTED Tue Nov 22 10:49:35 2005 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Tue, 22 Nov 2005 09:49:35 +0000 Subject: anyone know of a tool which can generate chunked HTTP/1.1 _requests_? In-Reply-To: <17282.19722.88358.465388@antilipe.corelatus.se> References: <17275.45376.402481.271072@antilipe.corelatus.se> <437C3530.7070606@hyber.org> <17276.17972.408946.833807@antilipe.corelatus.se> <17282.19722.88358.465388@antilipe.corelatus.se> Message-ID: Hi, On 21/11/05, Matthias Lang wrote: > chandru writes: > > > I've patched ibrowse to be able to do this. > > TYVM > > > Just out of curiousity - why do you need the client sending > > chunked data? > > I extended an HTTP server I wrote to handle chunked requests. As a > sanity check, I wanted to try it with an implementation beyond my own > test code. > > It turns out that my implementation and ibrowse have at least one bug > each. RFC 2068 says: > > Messages MUST NOT include both a Content-Length header field and the > "chunked" transfer coding. If both are received, the Content-Length > MUST be ignored. > > ibrowse sends it and my server fails (failed) to ignore it. Thanks. Hmmm...I thought I had taken care of this - but I'll look again. Thanks for the bug report. Chandru From xlcr@REDACTED Tue Nov 22 11:34:00 2005 From: xlcr@REDACTED (Nick Linker) Date: Tue, 22 Nov 2005 16:34:00 +0600 Subject: principle of least surprise In-Reply-To: References: Message-ID: <4382F418.10505@mail.ru> Ulf Wiger (AL/EAB) wrote: >The problem of that obviously is that normal erlang functions >can contain side-effects, loops, and all sorts of scary stuff. > > Uh... this problem is typical for imperative languages, and I (unfortunately) encounter the same problem in Erlang. I wonder whether the problem with side effects is significant in real big projects in Erlang language? >Haskell has 'monads', where all the scary stuff happens. Perhaps >Erlang should introduce 'anti-monads' where scary stuff _can't_ >happen? > > "Monads" is not only choice to provide reference transparency. There is another approach in CLEAN language. [quote] "Although CLEAN is purely functional, operations with side-effects (I/O operations, for instance) are permitted. To achieve this without violating the semantics, the classical types are supplied with so called uniqueness attributes. If an argument of a function is indicated as unique, it is guaranteed that at run-time the corresponding actual object is local, i.e. there are no other references to it. Clearly, a destructive update of such a "unique object" can be performed safely." [/quote] [http://www.cs.ru.nl/~clean/CleanExtra/report20/chapter9/introduction.html] >In "Wearing the hair shirt" 2003(*), Simon Peyton-Jones claimed >that the only thing wrong with monads was the name: they should >have called them "warm fuzzy things". > > Very interesting, thank you ;-) >Erlang WFTs, in other words, would be the thing to allow in >guards. (: > I'm sorry, what is 'WFTs'? Best regards, Linker Nick. From ulf.wiger@REDACTED Tue Nov 22 11:50:34 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 22 Nov 2005 11:50:34 +0100 Subject: principle of least surprise Message-ID: Nick Linker wrote: > > Ulf Wiger (AL/EAB) wrote: > > >In "Wearing the hair shirt" 2003(*), Simon Peyton-Jones claimed that > >the only thing wrong with monads was the name: they should > have called > >them "warm fuzzy things". > > > > > Very interesting, thank you ;-) > > >Erlang WFTs, in other words, would be the thing to allow in > guards. (: > > > I'm sorry, what is 'WFTs'? WFTs = Warm Fuzzy Things. /Uffe From vlad_dumitrescu@REDACTED Tue Nov 22 12:05:48 2005 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Tue, 22 Nov 2005 12:05:48 +0100 Subject: principle of least surprise In-Reply-To: <4382F418.10505@mail.ru> Message-ID: Hi, > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Nick Linker > "Monads" is not only choice to provide reference > transparency. There is another approach in CLEAN language. All these require a statically typed language. Anyone knows of a solution that works for dynamically typed languages? /Vlad From klacke@REDACTED Tue Nov 22 12:10:45 2005 From: klacke@REDACTED (Claes Wikstrom) Date: Tue, 22 Nov 2005 12:10:45 +0100 Subject: broadcast address and erlang:'bnot'/1 In-Reply-To: <4382DA77.8040109@ericsson.com> References: <4382DA77.8040109@ericsson.com> Message-ID: <4382FCB5.7020409@hyber.org> Bengt Kleberg wrote: > greetings, > > i am creating broadcast addresses. is there such a function in an erlang > module? my current solution is: > > broadcast_address( Address, Mask ) -> > Fun = fun ( Int ) -> 255 bxor Int end, > Inverted = lists:map( Fun, Mask ), > lists:zipwith( fun erlang:'bor'/2, Address, Inverted ). > > is there a better way? > Take a look at my ipcalc.erl in lib/msc/src/ipcalc.erl in Jungerl it does all sort of IP address manipulations in a .. well better way. Only ipv4 though. /klacke From alex.arnon@REDACTED Tue Nov 22 14:58:30 2005 From: alex.arnon@REDACTED (Alex Arnon) Date: Tue, 22 Nov 2005 15:58:30 +0200 Subject: principle of least surprise In-Reply-To: References: <4382F418.10505@mail.ru> Message-ID: <944da41d0511220558l6bc2733aya5eee1de1fb3e65c@mail.gmail.com> Could it be possible to trace the execution of such a function executing in a guard, and raise an exception if it performs a side-effect-causing operation? AFAIK the set of such operations is rather small in erlang: (off the top of my head) - Message sends. - Side-effect inducing BIFs (which can be marked as part of their implementation). So if we keep a "side-effect allowed" flag stack along (or as part of) the process stack, implementation should be easy... or would it? :) I find this feature to be highly desirable, even more than the multi-scheduler VM that will surely grace us with its presence Real Soon Now. :) -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomasl_erlang@REDACTED Tue Nov 22 15:25:59 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Tue, 22 Nov 2005 06:25:59 -0800 (PST) Subject: principle of least surprise In-Reply-To: <20051122.103520.115918608.mbj@tail-f.com> Message-ID: <20051122142600.79611.qmail@web34409.mail.mud.yahoo.com> --- mbj@REDACTED wrote: > Nick Linker wrote: > > > > >Better than nothing of course, but wouldn't it be > great to fix this > > >mis-feature and make the language better? > > > > > > > > Hm, what, in your opinion, about the possibility > to be an arbitrary > > function (returning true or false, of course) in > guards? Will it make > > the language better? > > Maybe I should have added "and more consistent". > Anyway I think > arbitrary functions in guards is an orthogonal > question. Personally I > think it would be nice but it's not that big deal. Well, you seem to want to introduce abstractions into your guards by way of macros (?is_foo), and also seem to want to use the same thing in expressions ... so actually permitting you to do that by means of the plain old function call (is_foo) doesn't seem like quite an orthogonal issue. I do agree that guards beyond the use of "," and ";" seem unsatisfactory at this point. (Basically, I think things would have turned out for the better if the designers had taken their inspiration from Prolog.) Nor do I really see the point of two collections of nearly-identical type test primitives (is_X/1 vs X/1). Best, Thomas __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com From thomasl_erlang@REDACTED Tue Nov 22 15:42:08 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Tue, 22 Nov 2005 06:42:08 -0800 (PST) Subject: principle of least surprise In-Reply-To: Message-ID: <20051122144209.57895.qmail@web34403.mail.mud.yahoo.com> --- "Ulf Wiger (AL/EAB)" wrote: > Nick Linker wrote: > > > > Hm, what, in your opinion, about the possibility > to be an > > arbitrary function (returning true or false, of > course) in > > guards? Will it make the language better? > > The problem of that obviously is that normal erlang > functions > can contain side-effects, loops, and all sorts of > scary stuff. On consideration, I don't think this is a big problem. First, I think the "shallow guard" restriction inherited from concurrent logic programming is unnecessary in Erlang's case. Erlang doesn't have the same implementation problems, and it seems eminently reasonable to turn side-effects into failure by looking at the context when the side effect occurs. ("Am I being evaluated inside a guard?") Perhaps by just setting and clearing/restoring a flag. I think this has been proposed a number of times over the years; I know I have. (My proposal obviously didn't convince :-) Second, pragmatically speaking, if the alternative to using a guard is to write a case-statement, what have we gained? The code is no clearer, the same issues still turn up. Is it any better to write "case (E1 andalso E2 andalso E3) of true -> ...; false -> ... end" (and maybe that should be wrapped in a try or catch as well to handle failure) rather than "when E1, E2, E3 -> ...; ..."? For these reasons, I think the introduction of deep guards is well worth investigating. (I'm willing to be convinced otherwise, of course.) (I wouldn't mind deprecating and removing some misfeatures in addition to that, of course.) Best, Thomas __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From bengt.kleberg@REDACTED Tue Nov 22 15:41:46 2005 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 22 Nov 2005 15:41:46 +0100 Subject: principle of least surprise In-Reply-To: <20051122142600.79611.qmail@web34409.mail.mud.yahoo.com> References: <20051122142600.79611.qmail@web34409.mail.mud.yahoo.com> Message-ID: <43832E2A.7090009@ericsson.com> On 2005-11-22 15:25, Thomas Lindgren wrote: ...deleted > Nor do I really see the point of two collections of > nearly-identical type test primitives (is_X/1 vs X/1). the question is better stated as why adding is_X/1 when there already exists X/1? afaik the X/1 type test primitives where the only ones in the beginning. is_X/1 where added afterward. backwards compatibility makes X/1 stay. bengt From clima-vii@REDACTED Tue Nov 22 14:38:14 2005 From: clima-vii@REDACTED (=?ISO-2022-JP?B?Q0xJTUEtVklJ?=) Date: Tue, 22 Nov 2005 22:38:14 +0900 (JST) Subject: =?ISO-2022-JP?B?Q0xJTUEgVklJOiBGaXJzdCBDRlA=?= Message-ID: <200511221338.BZA61213@mp.nii.ac.jp> [Apologies for cross-postings. Please send to your colleagues.] ===================== Call for Papers ===================== CLIMA VII Seventh International Workshop on Computational Logic in Multi-Agent Systems May 8,9 2006 in association with AAMAS2006 (May 8 - 12, 2006) Future University, Hakodate, Japan http://www.fun.ac.jp/aamas2006/ http://research.nii.ac.jp/climaVII/ =========================================================== Aims and scope -------------- Multi-Agent Systems are communities of problem-solving entities that can perceive and act upon their environment to achieve their individual goals as well as joint goals. The work on such systems integrates many technologies and concepts in artificial intelligence and other areas of computing as well as other disciplines. Over recent years, the agent paradigm gained popularity, due to its applicability to a full spectrum of domains, from search engines to educational aids to electronic commerce and trade, e-procurement, recommendation systems, simulation and routing, to cite only some. Computational logic provides a well-defined, general, and rigorous framework for studying syntax, semantics and procedures for various tasks by individual agents, as well as interaction amongst agents in multi-agent systems, for implementations, environments, tools, and standards, and for linking together specification and verification of properties of individual agents and multi-agent systems. The purpose of this workshop is to discuss techniques, based on computational logic, for representing, programming and reasoning about agents and multi-agent systems in a formal way. We solicit unpublished papers on agents and multi-agent systems based upon or relating to computational logic. You can find further information regarding the previous edition of CLIMA in http://clima.deis.unibo.it/ and the history of CLIMA in http://research.nii.ac.jp/climaVII/about.html. Topics ------ Relevant topics include, but are not limited to, the following: * logical foundations of (multi-)agent systems * extensions of logic programming for (multi-)agent systems * modal logic approaches to (multi-)agent systems * logic-based programming languages for (multi-)agent systems * non-monotonic reasoning in (multi-)agent systems * decision theory for (multi-)agent systems * agent and multi-agent hypothetical reasoning and learning * theory and practice of argumentation for agent reasoning and interaction * knowledge and belief representation and updates in (multi-)agent systems * operational semantics and execution agent models * model checking algorithms, tools, and applications for (multi-) agent logics * semantics of interaction and agent communication languages * distributed constraint satisfaction in multi-agent systems * temporal reasoning for (multi-)agent systems * distributed theorem proving for multi-agent systems * logic-based implementations of (multi-)agent systems * specification and verification of formal properties of (multi-) agent systems Submissions ----------- We welcome and encourage the submission of high quality, original papers, which are not simultaneously submitted for publication elsewhere. Papers should be written in English, formatted according to the Springer Verlag LNCS style, which can be obtained from http://www.springeronline.com, and not exceed 16 pages including figures, references, etc. Each paper should include *some examples* illustrating the proposed techniques. Proceedings and post-workshop publications ------------------------------------------ A printed volume of the proceedings will be available at the workshop. Authors of papers presented at the workshop will be asked to extend their contributions, possibly incorporating the results of the workshop discussion, to be included in the workshop post-proceedings, after another round of refereeing. Springer Verlag has accepted in principle to publish the post-proceedings as a volume of the Lecture Notes in Artificial Intelligence series. Important Dates --------------- - Submission Deadline: January 15, 2006 - Notification: February 19, 2006 - Camera Ready Copy Due: March 10, 2006 - CLIMA VII: May 8 and 9, 2006 Workshop Chairs --------------- Katsumi Inoue, National Institute of Informatics, Japan Ken Satoh, National Institute of Informatics, Japan Francesca Toni, Imperial College London, UK Email: clima-vii@REDACTED Programme Committee ------------------- Jose Julio Alferes, New University of Lisbon, Portugal Rafael H. Bordini, University of Durham, UK Gerhard Brewka, University of Leipzig, Germany Stefania Costantini, University of L'Aquila, Italy Juergen Dix, Technical University of Clausthal, Germany Patrick Doherty, Linkoping University, Sweden Phan Ming Dung, AIT, Thailand Thomas Eiter, Vienna University of Technology, Austria Klaus Fischer, DFKI, Germany Michael Fisher, The University of Liverpool, UK Michael Gelfond, Texas Technical University, USA James Harland, RMIT, Australia Hisashi Hayashi, Toshiba, Japan Wiebe van der Hoek, The University of Liverpool, UK Antonis Kakas, University of Cyprus, Cyprus Joao Leite, New University of Lisbon, Portugal Fangzhen Lin, Hong Kong University of Science and Technology, Hong Kong Paola Mello, University of Bologna, Italy John Jules Ch. Meyer, Utrecht University, The Netherlands Leora Morgenstern, IBM T.J. Watson Research Center, USA Naoyuki Nide, Nara Women's University, Japan Maurice Pagnucco, University of New South Wales, Australia Wojciech Penczek, Polish Academy of Sciences, Poland Enrico Pontelli, New Mexico State University, USA Fariba Sadri, Imperial College London, UK Chiaki Sakama, Wakayama University, Japan Abdul Sattar, Griffith University, Australia Hajime Sawamura, Niigata University, Japan Renate Schmidt, University of Manchester, UK Trao Can Son, New Mexico State University, USA Kostas Stathis, City University London, UK Michael Thielscher, Dresden University of Technology, Germany Satoshi Tojo, Japan Advanced Institute of Science and Technology, Japan Paolo Torroni, University of Bologna, Italy Marina de Vos, University of Bath, UK Cees Witteveen, Delft University of Technology, The Netherlands Home page of CLIMA VII: http://research.nii.ac.jp/climaVII From thomasl_erlang@REDACTED Tue Nov 22 15:49:39 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Tue, 22 Nov 2005 06:49:39 -0800 (PST) Subject: principle of least surprise In-Reply-To: <944da41d0511220558l6bc2733aya5eee1de1fb3e65c@mail.gmail.com> Message-ID: <20051122144939.53400.qmail@web34410.mail.mud.yahoo.com> --- Alex Arnon wrote: > So if we keep a "side-effect allowed" flag stack > along (or as part of) the > process stack, implementation should be easy... or > would it? :) I expect this to be doable; perhaps you can merely save/restore the side effect flag when necessary. I would like two things, though: 1. An implementation-independent "semantics" of deep guards, where the principles for when side-effects are permitted and not are made clear. As simple as possible while still permitting deep guards. 2. An efficient implementation of these principles. Best, Thomas __________________________________ Yahoo! FareChase: Search multiple travel sites in one click. http://farechase.yahoo.com From kostis@REDACTED Tue Nov 22 16:17:29 2005 From: kostis@REDACTED (Kostis Sagonas) Date: Tue, 22 Nov 2005 16:17:29 +0100 (MET) Subject: principle of least surprise In-Reply-To: Mail from 'Bengt Kleberg ' dated: Tue, 22 Nov 2005 15:41:46 +0100 Message-ID: <200511221517.jAMFHTaT000438@spikklubban.it.uu.se> > > Nor do I really see the point of two collections of > > nearly-identical type test primitives (is_X/1 vs X/1). > > the question is better stated as why adding is_X/1 when there already > exists X/1? One of the reasons is the following: Eshell V5.5 (abort with ^G) 1> float(3.1). 3.10000 2> is_float(3.1). true Kostis From robert.virding@REDACTED Tue Nov 22 23:59:49 2005 From: robert.virding@REDACTED (Robert Virding) Date: Tue, 22 Nov 2005 23:59:49 +0100 Subject: principle of least surprise In-Reply-To: <20051122.094113.85401478.mbj@tail-f.com> References: <20051121.151922.41646109.mbj@tail-f.com> <20051122.094113.85401478.mbj@tail-f.com> Message-ID: <4383A2E5.1020306@telia.com> The problem here would be where you get code which goes through the compiler but is now semantically different because of the changed precedence. I can imagine how popular that would be! Robert mbj@REDACTED wrote: >Raimo Niskanen wrote: > > >>I guess your radical suggestions to change precedence for >>'and' and 'or', or to remove 'orelse' and also 'andalso' >>are out of the question, for backwards compatibility >>reasons. >> >> > >Do you really think that changing precedence for and/or will break old >code? > >As for andalso and orelse, I realize that it probably won't happen, >but if it did, is it really such a big thing? A large project would >bring in the new erlang and recompile, and then the compiler would >complain. It's trivial to change the code (if precedence for or/and >is changed). Or maybe you could use some flag to the compiler which >could be used for old code? > > > >>What about allowing 'orelse' and also 'andalso' in guards? >>That will probably happen one day. >> >> > >Better than nothing of course, but wouldn't it be great to fix this >mis-feature and make the language better? > > >/martin > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.virding@REDACTED Wed Nov 23 00:15:33 2005 From: robert.virding@REDACTED (Robert Virding) Date: Wed, 23 Nov 2005 00:15:33 +0100 Subject: principle of least surprise In-Reply-To: <200511221517.jAMFHTaT000438@spikklubban.it.uu.se> References: <200511221517.jAMFHTaT000438@spikklubban.it.uu.se> Message-ID: <4383A695.60403@telia.com> Kostis is right but he doesn't give the whole story. In the beginning there was the void and when we filled the void with Erlang we thought that guards should only be extensions to the basic pattern matching with things like simple type tests etc. Logical expressions were not envisioned. There we there were no problems with overlapping names and we could use float/1 as a type test in guards and as a conversion function in the body. This broke with boolean type test functions. Instead of just having a few is_X/1 we thought it better to have the full range and then encourage people to use them in guards instead of the old X/1 versions. I don't really see why people still use the old X/1 type tests, it's not like we added the new ones yesterday. Especially not savvy users. Robert Kostis Sagonas wrote: > > > Nor do I really see the point of two collections of > > > nearly-identical type test primitives (is_X/1 vs X/1). > > > > the question is better stated as why adding is_X/1 when there already > > exists X/1? > >One of the reasons is the following: > >Eshell V5.5 (abort with ^G) >1> float(3.1). >3.10000 >2> is_float(3.1). >true > > >Kostis > > > > From robert.virding@REDACTED Wed Nov 23 00:31:02 2005 From: robert.virding@REDACTED (Robert Virding) Date: Wed, 23 Nov 2005 00:31:02 +0100 Subject: principle of least surprise In-Reply-To: <20051121.151922.41646109.mbj@tail-f.com> References: <20051121.151922.41646109.mbj@tail-f.com> Message-ID: <4383AA36.5080203@telia.com> Martin Bjorklund wrote: >After the obfuscation contest we now know that parentheses are >important in guards... > >I have a datatype foo which is either an atom or a tuple of size 2. > >It would be nice with a macro to test if a certain value is a foo, >e.g. > > -define(is_foo(X), (is_atom(X) or (is_tuple(X) and (size(X) == 2)))). > >Then I could use this test in guards, > > f(X) when ?is_foo(X) -> yes; > f(X) -> no. > >Isn't this reasonable? Anyone can read and understand this code. > >The problem is that this won't work; if I call f(foo) it will return >no. The reason is that all expressions in my guard will be evaluated, >and that failure in a boolean expression will fail the guard which is >interpreted as false. (and in this case size(foo) fails). > > Are you sure that this is the reason? When boolean guard expressions were added we defined a strict left to right evaluation jst so we could handle cases like this. One of my standard test cases was something like: when is_atom(X) or (is_integer(X) and (X + 5 < 6)) -> (test cases are seldom reasonable). It worked then. Has the compiler been changed since then? >So I tried some alternatives: > > -define(is_foo(X), (atom(X) or (tuple(X) and (size(X) == 2)))). > >not that I thought that this would work, but it won't even compile. >Why do we have atom/1 and is_atom/1??? > >And I know that this one doesn't work. > > -define(is_foo(X), (is_atom(X) orelse (is_tuple(X) andalso (size(X) == 2)))). > >Sigh. > >Maybe we shouldn't be allowed to write code like this? No... > >My radical suggestion is: > > o make sure or,and etc has precedence over ==,/= etc > (like orelse/andalso) > o _remove_ orelse/andalso completely from the language > (what's the probability of that?) > >And then I think (size(X) == 2) should be false if X is not something >you can do size on. But that's probably out of the question. > > I quite honestly don't really see the problem with the precedences. Whatever is wrong with your macro it isn't the precedences. How do you envisage that (size(X) == 2) be false? What should size of something usizable return? Since and/or behave as "normal" operators it was thought better to add new constructions with explicit left-to-right semantics rather than modify and/or. After a while you get into a horrible mess if you start special casing certain functions (operators are functions). Robert From robert.virding@REDACTED Wed Nov 23 00:41:06 2005 From: robert.virding@REDACTED (Robert Virding) Date: Wed, 23 Nov 2005 00:41:06 +0100 Subject: principle of least surprise In-Reply-To: <944da41d0511220558l6bc2733aya5eee1de1fb3e65c@mail.gmail.com> References: <4382F418.10505@mail.ru> <944da41d0511220558l6bc2733aya5eee1de1fb3e65c@mail.gmail.com> Message-ID: <4383AC92.7030606@telia.com> That would be quite some flag seeing the level of nesting that deep-guards would allow. What about try/catch? Exit and throw? I can assure it wouldn't be long before get a discussion about "safe" side-effect BIFs. Of course it is perfectly reasonable to allow sending/receiving messages in guards, I need to question other processes! Another problem would be the intransparency of user defined functions. While it would easy to understand simple functions written by yourself using functions taken from libraries written by other people could lead to some very surprising results. Robert Alex Arnon wrote: > Could it be possible to trace the execution of such a function > executing in a guard, and raise an exception if it performs a > side-effect-causing operation? AFAIK the set of such operations is > rather small in erlang: (off the top of my head) > - Message sends. > - Side-effect inducing BIFs (which can be marked as part of their > implementation). > > So if we keep a "side-effect allowed" flag stack along (or as part of) > the process stack, implementation should be easy... or would it? :) > > I find this feature to be highly desirable, even more than the > multi-scheduler VM that will surely grace us with its presence Real > Soon Now. :) > From ok@REDACTED Wed Nov 23 03:11:23 2005 From: ok@REDACTED (Richard A. O'Keefe) Date: Wed, 23 Nov 2005 15:11:23 +1300 (NZDT) Subject: principle of least surprise Message-ID: <200511230211.jAN2BNrq140562@atlas.otago.ac.nz> mbj@REDACTED wrote: As for andalso and orelse, I realize that it probably won't happen, but if it did, is it really such a big thing? Yes. What exactly is WRONG with 'andalso' (= Dijkstra's 'cand', C's '&&', Haskell's '&&', ISO Pascal's 'and_then', Ada's 'and then', SML's 'andalso') and 'orelse' (= Dijkstra's 'cor', C's '||', Haskell's '||', ISO Pascal's 'or_else', Ada's 'or else', SML's 'orelse')? >60 years of programming languages have shown us that it is a bad idea or use plain 'and' and 'or', because people are never quite sure what they do. (Blame this on Fortran, which deliberately refused to say, and Pascal, which followed Fortrans' lead.) If you want to get rid of something, get rid of plain 'and' and 'or', which for use in ordinary expressions are user-definable. > What about allowing 'orelse' and also 'andalso' in guards? > That will probably happen one day. Better than nothing of course, but wouldn't it be great to fix this mis-feature and make the language better? 'andalso' and 'orelse' are not misfeatures. They are useful and above all not misleading. If we can have ',' and ';' in guards, we should certainly have 'andalso' and 'orelse' there. But the real problem, it seems to me, is that someone is trying to do something very very odd. Having a type that is either an atom or a pair? Fine, no problems. It's easy enough to write functions f({X,Y}) -> ...; f(X) when atom(X) -> ... . But having a function where the argument could be that OR something else? Not so fine. Not fine at all, really. A function argument should have one clear conceptual type. The language is trying to tell you you are doing something that could be better done other ways. Do I have to mention that abstract patterns could have solved the original problem with ease? Maybe I do. Abstract patterns could have solved the original problem with ease. #funny_type(X) when atom(X) -> X; #funny_type(X = {_,}) -> X. seriously_weird_function(#funny_type(X), ...) -> ...; seriously_weird_function(#some_other_type(X), ...) -> ... . Death to macros! _There's_ a misfeature! From ok@REDACTED Wed Nov 23 03:13:53 2005 From: ok@REDACTED (Richard A. O'Keefe) Date: Wed, 23 Nov 2005 15:13:53 +1300 (NZDT) Subject: principle of least surprise Message-ID: <200511230213.jAN2DrU2138767@atlas.otago.ac.nz> "Ulf Wiger (AL/EAB)" wrote: Now, the 'anti-monad' would truly be warm and fuzzy, and should be allowable in guards (and most likely also in select patterns). Erlang WFTs, in other words, would be the thing to allow in guards. (: Abstract patterns are pretty much exactly the "warm fuzzy things" you would want to allow in guards. Amongst other things, they cannot run forever or have any side effects. From ok@REDACTED Wed Nov 23 03:46:32 2005 From: ok@REDACTED (Richard A. O'Keefe) Date: Wed, 23 Nov 2005 15:46:32 +1300 (NZDT) Subject: principle of least surprise Message-ID: <200511230246.jAN2kWiY143356@atlas.otago.ac.nz> Robert Virding wrote: I don't really see why people still use the old X/1 type tests, it's not like we added the new ones yesterday. Especially not savvy users. Because there is no new edition of the Book? Because there are vast amounts of source code examples in the Erlang distribution using the old names? (A very crude scan of some of the OTP sources I happened to have handy showed 5,337 uses of the old type tests, but only 180 of the new ones, and those were concentrated in just a few modules. Both of these are under-estimates, but the proportion is about right.) From raimo@REDACTED Wed Nov 23 08:44:06 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 23 Nov 2005 08:44:06 +0100 Subject: principle of least surprise References: <20051121.151922.41646109.mbj@tail-f.com>, <4383AA36.5080203@telia.com> Message-ID: > when is_atom(X) or (is_integer(X) and (X + 5 < 6)) -> That does not work, at least not in the shell. 1> if is_atom(a) or (is_integer(a) and (a+5<6)) -> true; true -> false end. false OTOH: 2> if is_atom(a) or (is_integer(a) and (a<11)) -> true; true -> false end. true works since it does not have to evaluate a+5, which crashes, causing 1> to fail. Unfortunately there is no workaround for size(X) that does not crash for an atom X. robert.virding@REDACTED (Robert Virding) writes: > Martin Bjorklund wrote: > > >After the obfuscation contest we now know that parentheses are > >important in guards... > > > >I have a datatype foo which is either an atom or a tuple of size 2. > > > >It would be nice with a macro to test if a certain value is a foo, > >e.g. > > > > -define(is_foo(X), (is_atom(X) or (is_tuple(X) and (size(X) == 2)))). > > > > Then I could use this test in guards, f(X) when ?is_foo(X) -> yes; > > f(X) -> no. > > > >Isn't this reasonable? Anyone can read and understand this code. > > > >The problem is that this won't work; if I call f(foo) it will return > >no. The reason is that all expressions in my guard will be evaluated, > >and that failure in a boolean expression will fail the guard which is > >interpreted as false. (and in this case size(foo) fails). > > > Are you sure that this is the reason? When boolean guard expressions > were added we defined a strict left to right evaluation jst so we > could handle cases like this. One of my standard test cases was > something like: > > when is_atom(X) or (is_integer(X) and (X + 5 < 6)) -> > > (test cases are seldom reasonable). It worked then. Has the compiler > been changed since then? > > >So I tried some alternatives: > > > > -define(is_foo(X), (atom(X) or (tuple(X) and (size(X) == 2)))). > > > >not that I thought that this would work, but it won't even compile. > >Why do we have atom/1 and is_atom/1??? > > > >And I know that this one doesn't work. > > > > -define(is_foo(X), (is_atom(X) orelse (is_tuple(X) andalso (size(X) == 2)))). > > > >Sigh. > > > >Maybe we shouldn't be allowed to write code like this? No... > > > >My radical suggestion is: > > > > o make sure or,and etc has precedence over ==,/= etc > > (like orelse/andalso) > > o _remove_ orelse/andalso completely from the language > > (what's the probability of that?) > > > >And then I think (size(X) == 2) should be false if X is not something > >you can do size on. But that's probably out of the question. > > > I quite honestly don't really see the problem with the > precedences. Whatever is wrong with your macro it isn't the > precedences. How do you envisage that (size(X) == 2) be false? What > should size of something usizable return? > > Since and/or behave as "normal" operators it was thought better to add > new constructions with explicit left-to-right semantics rather than > modify and/or. After a while you get into a horrible mess if you start > special casing certain functions (operators are functions). > > Robert -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From mats.cronqvist@REDACTED Wed Nov 23 09:23:56 2005 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Wed, 23 Nov 2005 09:23:56 +0100 Subject: principle of least surprise In-Reply-To: <200511230211.jAN2BNrq140562@atlas.otago.ac.nz> References: <200511230211.jAN2BNrq140562@atlas.otago.ac.nz> Message-ID: <4384271C.4010401@ericsson.com> Richard A. O'Keefe wrote: > [...] > Death to macros! _There's_ a misfeature! > amen. especially if you have to deal ith old C programmers that feels obliged to use it. mats From mbj@REDACTED Wed Nov 23 08:29:45 2005 From: mbj@REDACTED (Martin Bjorklund) Date: Wed, 23 Nov 2005 08:29:45 +0100 (CET) Subject: principle of least surprise In-Reply-To: <4383AA36.5080203@telia.com> References: <20051121.151922.41646109.mbj@tail-f.com> <4383AA36.5080203@telia.com> Message-ID: <20051123.082945.28796093.mbj@tail-f.com> Robert Virding wrote: > I quite honestly don't really see the problem with the precedences. Sorry, that referred to the obfuscation contest at euc. The problem can be summarized by this: if 1 == 1 or is_integer(1) -> erlang:display("is_integer"), true -> erlang:display("else") end. > Whatever is wrong with your macro it isn't the precedences. How do you > envisage that (size(X) == 2) be false? What should size of something > usizable return? No you're right. Evaluation order is the answer. /martin From mbj@REDACTED Wed Nov 23 08:49:12 2005 From: mbj@REDACTED (Martin Bjorklund) Date: Wed, 23 Nov 2005 08:49:12 +0100 (CET) Subject: principle of least surprise In-Reply-To: <200511230211.jAN2BNrq140562@atlas.otago.ac.nz> References: <200511230211.jAN2BNrq140562@atlas.otago.ac.nz> Message-ID: <20051123.084912.102568175.mbj@tail-f.com> "Richard A. O'Keefe" wrote: > What exactly is WRONG with 'andalso' (= Dijkstra's 'cand', C's '&&', > Haskell's '&&', ISO Pascal's 'and_then', Ada's 'and then', SML's > 'andalso') and 'orelse' (= Dijkstra's 'cor', C's '||', Haskell's '||', > ISO Pascal's 'or_else', Ada's 'or else', SML's 'orelse')? What't the point of having two different (three if you count ; and ,) ways of saying and/or? You've already given the answer: > >60 years of programming languages have shown us that it is a bad idea > or use plain 'and' and 'or', because people are never quite sure what > they do. What can I say... > But the real problem, it seems to me, is that someone is trying to > do something very very odd. > > Having a type that is either an atom or a pair? Fine, no problems. > It's easy enough to write functions > > f({X,Y}) -> ...; > f(X) when atom(X) -> ... . This isn't really useful if I have more than just a few functions operating on this type - I would have to do f({X,Y}) -> ... g({X,Y}) ,... f(X) when is_atom(X) -> ... g(X) ,... or f({X,Y}) -> safe_f({X,Y}); f(X) when is_atom(X) -> safe_f(X). safe_f(X) -> ... g(X). for all functions. > But having a function where the argument could be that OR something else? > Not so fine. Not fine at all, really. A function argument should have one > clear conceptual type. The language is trying to tell you you are doing > something that could be better done other ways. I'm just trying to do some abstraction with the tools we have today (well it didn't work...) - exactly what you say. > Do I have to mention that abstract patterns could have solved the original > problem with ease? Maybe I do. But you just said that what i tried to achieve was odd. With your abstract patterns I'm suddenly allowed to think in these odd ways? /martin From tpatro@REDACTED Wed Nov 23 12:38:33 2005 From: tpatro@REDACTED (Tamas Patrovics) Date: Wed, 23 Nov 2005 12:38:33 +0100 Subject: ESense 1.10 released Message-ID: Changes https://sourceforge.net/project/shownotes.php?group_id=139206&release_id=373190 Files https://sourceforge.net/projects/esense/ Homepage http://esense.sourceforge.net/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.wiger@REDACTED Wed Nov 23 13:04:03 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 23 Nov 2005 13:04:03 +0100 Subject: exporting proc_lib:sync_wait/2 Message-ID: proc_lib:init_ack/2 is exported. Why not export proc_lib:sync_wait/2? The main reason for doing so would be that there is no proc_lib:start_link(Fun). There is a proc_lib:spawn_link(Fun), which can be used, and start_link is just my_start_link(Fun) -> Pid = proc_lib:spawn_link(Fun), proc_lib:sync_wait(Pid, 10000). and the only problem with that is that you have to copy-paste sync_wait to your own module in order to make it work. /Uffe From camster@REDACTED Wed Nov 23 13:12:47 2005 From: camster@REDACTED (Richard Cameron) Date: Wed, 23 Nov 2005 12:12:47 +0000 Subject: LRU queue or heap data structure implementation? Message-ID: <6E8F0F35-AF7D-42A9-B8DC-D028E0485A63@citeulike.org> Has anyone implemented a heap data structure or have any thoughts about how to efficiently implement an LRU queue in Erlang? The context is that I'm interested in using an ets table as a simple data cache. I want to be able to throw values into the table and have a background process purge old items as the table grows large. The aim is to produce a protocol compatible implementation for memcached which I'm finally getting round to writing after being all enthusiastic about it several months ago . In production, the cache is likely to get quite big (gigabytes) and consist of lots of smallish objects. I'm trying to work out whether an LRU implementation done purely with Erlang lists and tuples is likely to be efficient enough to be worthwhile, or whether it's better to just have a background O(n) process which periodically sweeps the whole cache to gather statistics and purge old items. This clearly depends on the read/write profile of the cache, but I want to get a feel for how quick an LRU queue could be made to work. Richard. From jay@REDACTED Wed Nov 23 16:56:42 2005 From: jay@REDACTED (Jay Nelson) Date: Wed, 23 Nov 2005 07:56:42 -0800 Subject: LRU queue or heap data structure implementation? Message-ID: <4384913A.1000106@duomark.com> I have wanted to write a similar thing for a while now. I would do it with processes: 1) Create a server to manage the ets table (eventually you would want this distributed), which handles the following messages: - New: create a new process and insert in ets with key - Locate: see if a key leads to an existing process - Reap: remove key and process from ets 2) Each process has a receive which does the following: - GetData: returns the state and loops - after LRU_Timeout: calls ets manager with Reap(SelfKey) then dies Creating a new process causes it to read data from DB, construct corresponding internal data representation and then wait for callers to request the reformatted data. Once it is idle for a long enough period of time it dies. If there is a request prior to expiration, the LRU_Timeout starts over so every request is a new lease on life. Variations: a) Vary the LRU_Timeout based on the difficulty of restart. b) Add supervisors to organize processes into hierarchies of related data (or just link the related processes as they are created by cascading spawns). Kill the supervisor (or one of the networked processes) to remove all dependencies from memory. c) Use a reaper process which monitors total memory consumption. Have it broadcast a message to hasten the demise of any process which deems it can time out early in a memory pinch. jay From camster@REDACTED Wed Nov 23 18:29:54 2005 From: camster@REDACTED (Richard Cameron) Date: Wed, 23 Nov 2005 17:29:54 +0000 Subject: LRU queue or heap data structure implementation? In-Reply-To: <4384913A.1000106@duomark.com> References: <4384913A.1000106@duomark.com> Message-ID: <1B2D2C13-018A-468A-8284-CC7981537EB9@citeulike.org> On 23 Nov 2005, at 15:56, Jay Nelson wrote: > I have wanted to write a similar thing for a while now. I would do > it with processes: > > 1) Create a server to manage the ets table (eventually you would > want this distributed), which handles the following messages: > - New: create a new process and insert in ets with key > - Locate: see if a key leads to an existing process > - Reap: remove key and process from ets > > 2) Each process has a receive which does the following: > - GetData: returns the state and loops > - after LRU_Timeout: calls ets manager with Reap(SelfKey) then dies ... so this sounds like a purely in-memory database where each "row" of data is actually a process, with a mind of its own. I'm sure if you took that to its logical conclusions you could build a particularly wacky variant of a relational database (where foreign keys between "rows" are paths you can send messages over). There's probably a weird variant of database theory in which you model select and update operations by sending a request to an object in the system, recursively having it create a cascade of messages out to every "row" the query needs to consider, and waiting for asynchronous responses to come back. Sounds quite insane for someone who's grown up with SQL, but I wonder if it's a more natural way of thinking about data. Who knows? Keeping my feet on the floor for a bit though, all I'm trying to do as extend an ets table to store data and keep track of infrequently accessed items. Potentially we could be talking about 10^7 or 10^8 entries in the cache, so I'm not sure how happy the current Erlang runtime would be about spawning that number of processes. My guess is that it wouldn't be very amused at all. Either way, I'd just be pushing out the problem of trying to come up with sensible data structure to whichever part of the emulator is responsible for maintaining the schedule of which process is due to receive "after" timeouts and when. Francesco suggested that it might be possible just to use an ets table which maps access times to keys, updating the key with erlang:now() on every read operation. I suspect there's going to be a hell of a lot of binary-tree rebalancing going on, but I'll prototype that up and see how it performs. Maybe I don't even need to worry about optimisation and everything will magically run fast. ... that said, I'll probably actually go away, make a cup of tea, and think about this intriguing idea of building a database where queries are evaluated by pinging lots of messages around lots of little data- as-persistent-process things. It might even be a refreshing way of thinking about OLTP systems (and probably a nightmare for doing DSS queries). Richard. From chris.double@REDACTED Thu Nov 24 00:05:36 2005 From: chris.double@REDACTED (doublec) Date: Thu, 24 Nov 2005 00:05:36 +0100 Subject: Events/Observer pattern References: Message-ID: <20051123230537.3E18059142@bang.trapexit.org> I want to have a process that sends information out to other processes at regular intervals. Those other processes should be able to register to receive information or unregister to stop receiving them. Classic 'observer' pattern stuff in OO. I thought of having the information provider process accept pid's on register, and when it needs to send out the information it just goes over the list of pid's sending a message to the receiver. Is that a reasonable approach? Is there anything in the standard library that provides this functionality already that I should be looking at? _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From ok@REDACTED Thu Nov 24 00:36:36 2005 From: ok@REDACTED (Richard A. O'Keefe) Date: Thu, 24 Nov 2005 12:36:36 +1300 (NZDT) Subject: principle of least surprise Message-ID: <200511232336.jANNaaNX149436@atlas.otago.ac.nz> Martin Bjorklund wrote: What't the point of having two different (three if you count ; and ,) ways of saying and/or? Given the existance of 'andalso' and 'orelse', we don't need 'and' or 'or'. A style warning triggered whenever someone uses them would be a good idea. E1 and E2 can always be rewritten as (T = E1, E2 andalso T), E1 or E2 can always be rewritten as (T = E1, E2 orelse T). I don't advocate having 'two different ... ways of saying and/or'; my point is that 'andalso' and 'orelse' are not the ones to discard. > Having a type that is either an atom or a pair? Fine, no problems. > It's easy enough to write functions > > f({X,Y}) -> ...; > f(X) when atom(X) -> ... . This isn't really useful if I have more than just a few functions operating on this type - I would have to do f({X,Y}) -> ... g({X,Y}) ,... f(X) when is_atom(X) -> ... g(X) ,... Why on earth would you do that? You have the two clauses when and ONLY when you want to do something DIFFERENT in each case. In your example f({X,Y}) -> ... g({X,Y}) ... . f(X) when is_atom(X) -> ... g(X) ... . you should have just the one clause, f(X) - ... g(X) ... . As long as bad data is caught before some side effect (externally visible message send, change to the process dictionary, &c) takes place, it doesn't matter (much) where it's detected. The claim that you would have to do this "for all functions" is without any warrant at all. > Do I have to mention that abstract patterns could have solved the original > problem with ease? Maybe I do. But you just said that what i tried to achieve was odd. With your abstract patterns I'm suddenly allowed to think in these odd ways? I'm afraid so. There _is_ actually a defensible reason for it, to do with hot loading. The idea is that if data accesses are done through abstract patterns and a module is revised so that a datum holds more information or has more cases, abstract patterns in the new version of the module can be written so that they recognise the old data values as well as the new ones, except where new data are involved. But when used for generating data, they would generate the new structures. So you can upgrade a module without dropping live data. The downside of being able to do _that_ is that you can also do things that are not quite so sensible. From robert.virding@REDACTED Thu Nov 24 00:49:35 2005 From: robert.virding@REDACTED (Robert Virding) Date: Thu, 24 Nov 2005 00:49:35 +0100 Subject: principle of least surprise In-Reply-To: <200511230246.jAN2kWiY143356@atlas.otago.ac.nz> References: <200511230246.jAN2kWiY143356@atlas.otago.ac.nz> Message-ID: <4385000F.80901@telia.com> Richard A. O'Keefe wrote: >Robert Virding wrote: > I don't really see why people still use the old X/1 type tests, > it's not like we added the new ones yesterday. Especially not savvy > users. > >Because there is no new edition of the Book? > >Because there are vast amounts of source code examples in >the Erlang distribution using the old names? >(A very crude scan of some of the OTP sources I happened to have handy > showed 5,337 uses of the old type tests, but only 180 of the new ones, > and those were concentrated in just a few modules. > Both of these are under-estimates, but the proportion is about right.) > > Touch?! From jay@REDACTED Thu Nov 24 06:15:00 2005 From: jay@REDACTED (Jay Nelson) Date: Wed, 23 Nov 2005 21:15:00 -0800 Subject: LRU queue or heap data structure implementation? In-Reply-To: <1B2D2C13-018A-468A-8284-CC7981537EB9@citeulike.org> References: <4384913A.1000106@duomark.com> <1B2D2C13-018A-468A-8284-CC7981537EB9@citeulike.org> Message-ID: <43854C54.9000706@duomark.com> Richard Cameron wrote: > > ... so this sounds like a purely in-memory database where each "row" > of data is actually a process, with a mind of its own. I'm sure if > you took that to its logical conclusions you could build a > particularly wacky variant of a relational database (where foreign > keys between "rows" are paths you can send messages over). Hmm, a little further than I was thinking. I forgot to put the assumptions I thought I read from your post and a browse of your website: 1) Most accesses are read accesses only 2) You want to retrieve data from database and wrap it in HTML for delivery 3) You would like to lighten the load on your server 4) Updates could be more costly to the user 1-3 can be gotten by one retrieval from the DB starting a process which prepares the HTML. Subsequent request just return the same HTML (or a slight variant) directly from the running process without visiting the database. 4 requires killing the HTML process, updating the database as now and respawning the process as a new request. Timeouts just free memory occupied by previously spawned and wrapped HTML tidbits from the database. If no one has requested them recently, you can safely throw them away. The timeout time should be relative to the construction time, CPU effort and frequency of user requests, with an eye towards the amount of memory consumed. Frequently visited pages that don't change often (e.g., FAQ page) can be "pinned" to the cache so they aren't killed unless the data is stale. jay From mats.cronqvist@REDACTED Thu Nov 24 09:30:40 2005 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Thu, 24 Nov 2005 09:30:40 +0100 Subject: Events/Observer pattern In-Reply-To: <20051123230537.3E18059142@bang.trapexit.org> References: <20051123230537.3E18059142@bang.trapexit.org> Message-ID: <43857A30.4060103@ericsson.com> the prf contribution in jungerl does exactly this. mats doublec wrote: > I want to have a process that sends information out to other processes at regular intervals. Those other processes should be able to register to receive information or unregister to stop receiving them. Classic 'observer' pattern stuff in OO. > > I thought of having the information provider process accept pid's on register, and when it needs to send out the information it just goes over the list of pid's sending a message to the receiver. > > Is that a reasonable approach? Is there anything in the standard library that provides this functionality already that I should be looking at? > _________________________________________________________ > Sent using Mail2Forum (http://m2f.sourceforge.net) From vlad.xx.dumitrescu@REDACTED Thu Nov 24 11:10:37 2005 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Thu, 24 Nov 2005 11:10:37 +0100 Subject: JInterface Message-ID: <11498CB7D3FCB54897058DE63BE3897CD113A4@esealmw105.eemea.ericsson.se> Hi, Is JInterface thread-safe? I mean, if I create a mailbox for each Java thread, will it work as expected (ie without any "destructive interference")? Or more correctly, is it supposed to work as expected? best regards, Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias@REDACTED Thu Nov 24 13:47:28 2005 From: matthias@REDACTED (Matthias Lang) Date: Thu, 24 Nov 2005 13:47:28 +0100 Subject: Events/Observer pattern In-Reply-To: <20051123230537.3E18059142@bang.trapexit.org> References: <20051123230537.3E18059142@bang.trapexit.org> Message-ID: <17285.46688.499601.196986@antilipe.corelatus.se> Your suggested implementation sounds fine. I don't think there's anything in the standard library which does that. And even if there was, it'd probably take you less time to just implement it than it would to figure out how to use someone else's. MAtthias doublec writes: > I want to have a process that sends information out to other > processes at regular intervals. Those other processes should be > able to register to receive information or unregister to stop > receiving them. Classic 'observer' pattern stuff in OO. > > I thought of having the information provider process accept pid's > on register, and when it needs to send out the information it just > goes over the list of pid's sending a message to the receiver. > > Is that a reasonable approach? Is there anything in the standard > library that provides this functionality already that I should be > looking at? From csanto@REDACTED Thu Nov 24 15:19:02 2005 From: csanto@REDACTED (Corrado Santoro) Date: Thu, 24 Nov 2005 15:19:02 +0100 Subject: Events/Observer pattern In-Reply-To: <17285.46688.499601.196986@antilipe.corelatus.se> References: <20051123230537.3E18059142@bang.trapexit.org> <17285.46688.499601.196986@antilipe.corelatus.se> Message-ID: <4385CBD6.3020607@diit.unict.it> Matthias Lang wrote: > I don't think there's anything in the standard library which does > that. Why? Don't you think that gen_event could exactly fit in the problem? --Corrado > doublec writes: > > > I want to have a process that sends information out to other > > processes at regular intervals. Those other processes should be > > able to register to receive information or unregister to stop > > receiving them. Classic 'observer' pattern stuff in OO. > > > > I thought of having the information provider process accept pid's > > on register, and when it needs to send out the information it just > > goes over the list of pid's sending a message to the receiver. > > > > Is that a reasonable approach? Is there anything in the standard > > library that provides this functionality already that I should be > > looking at? -- ====================================================== Eng. Corrado Santoro, Ph.D. University of Catania - Engineering Faculty Department of Computer Science and Telecommunications Engineering Viale A. Doria, 6 - 95125 CATANIA (ITALY) Tel: +39 095 7382380 +39 095 7387035 +39 095 7382365 +39 095 7382364 VoIP: sip:7035@REDACTED Fax: +39 095 7382397 EMail: csanto@REDACTED Personal Home Page: http://www.diit.unict.it/users/csanto NUXI Home Page: http://nuxi.iit.unict.it ====================================================== From tty@REDACTED Thu Nov 24 16:55:22 2005 From: tty@REDACTED (tty@REDACTED) Date: Thu, 24 Nov 2005 10:55:22 -0500 Subject: Loading Mnesia dbase Message-ID: I decided to retest using fragmented tables (15 fragments) and I/O threads. Also I did the inserts in stages. The first 9 million records to ram_copy went in below 7 mins. The change table to disc_copy took 0.6 mins. A mnesia backup worked fine (< 13 mins) but it failed on the restore (unable to allocated heap). I proceeded with a fallback which worked well. The next 3 million records went into disc_copy with warning messages: Mnesia is overloaded: {dump_log, write_threshold} (see discussion: http://www.erlang.org/ml-archive/erlang-questions/200007/msg00098.html) It however stablized and the records were in. The final 2 million failed to get in with a couple hundred missing records. Their insertion processes died. I redid the missing entries and have all 14 million records in. The erl shell is now at a crawl but now using a good 1.8 GB of the 2 GB RAM. The two things I found helped was increasing I/O threads (erl +A) and using fragmented tables. I suspect more RAM would improve things greatly. Thanks for the help. t From matthias@REDACTED Thu Nov 24 17:19:46 2005 From: matthias@REDACTED (Matthias Lang) Date: Thu, 24 Nov 2005 17:19:46 +0100 Subject: Events/Observer pattern In-Reply-To: <4385CBD6.3020607@diit.unict.it> References: <20051123230537.3E18059142@bang.trapexit.org> <17285.46688.499601.196986@antilipe.corelatus.se> <4385CBD6.3020607@diit.unict.it> Message-ID: <17285.59426.725929.720469@cors.corelatus.se> Corrado Santoro writes: > Matthias Lang wrote: > > I don't think there's anything in the standard library which does > > that. > Why? Don't you think that gen_event could exactly fit in the problem? No, gen_event doesn't provide the interface he asked for. You have to add code. Quite a bit of code. How much code is needed to do this using gen_event? How much using gen_server? I think it's the same: one data structure, one module, six callback functions. I.e. gen_event provides no benefit, even in an application it might be expected to be good at! No wonder it's not used much. FWIW, as is often the case, doing this in classic Erlang is neater and simpler. Here's a no-frills version: loop(Pids) -> receive {reg, Pid} -> loop([Pid|Pids]); {unreg, Pid} -> loop([X || X <- Pids, X =/= Pid]); {send, Msg} -> [ X ! Msg || X <- Pids], loop(Pids) end. Matthias -------------------- > > doublec writes: > > > > > I want to have a process that sends information out to other > > > processes at regular intervals. Those other processes should be > > > able to register to receive information or unregister to stop > > > receiving them. Classic 'observer' pattern stuff in OO. > > > > > > I thought of having the information provider process accept pid's > > > on register, and when it needs to send out the information it just > > > goes over the list of pid's sending a message to the receiver. > > > > > > Is that a reasonable approach? Is there anything in the standard > > > library that provides this functionality already that I should be > > > looking at? From chris.double@REDACTED Thu Nov 24 21:01:49 2005 From: chris.double@REDACTED (Chris Double) Date: Fri, 25 Nov 2005 09:01:49 +1300 Subject: Events/Observer pattern In-Reply-To: <17285.46688.499601.196986@antilipe.corelatus.se> References: <20051123230537.3E18059142@bang.trapexit.org> <17285.46688.499601.196986@antilipe.corelatus.se> Message-ID: Thanks everyone, for the comments. In the end I went for writing something quickly myself. The form of it is: notifier(Observers) -> receive {notify, Message} -> lists:foreach(fun(To) -> To ! Message end, Observers), notifier(Observers); {register, Observer} -> notifier([Observer|Observers]); {unregister, Observer} -> notifier(lists:delete(Observer, Observers)) end. Which turns out to be quite easy. The above doesn't take into registered processes that die before unregistering of course but that's easy to handle. Matthias was right in that it was so trivial to write in Erlang that it was easier just to do than to work out how to use something else. I'm still interested in what's out there though as once I'm familiar with what other libraries do they'll be easier to reuse and presumably provide more functionality. Chris. -- http://www.bluishcoder.co.nz From sanjaya@REDACTED Fri Nov 25 05:51:40 2005 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Fri, 25 Nov 2005 10:51:40 +0600 Subject: inets & PHP Message-ID: <001601c5f17b$ece1ce60$5f00a8c0@wavenet.lk> Hi...!!! 1.) What is the possibility of running PHP on inets? (inets support PHP ?) 2.) if it supports, how to configure inets to work properly with PHP? 3.) Are there aditional libraries to add ? this because I have write below 3 lines & save it as test.php on a inets server. But no result Can anybody help on this matter ? Thanks in advance Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From csanto@REDACTED Fri Nov 25 08:03:07 2005 From: csanto@REDACTED (Corrado Santoro) Date: Fri, 25 Nov 2005 08:03:07 +0100 Subject: inets & PHP In-Reply-To: <001601c5f17b$ece1ce60$5f00a8c0@wavenet.lk> References: <001601c5f17b$ece1ce60$5f00a8c0@wavenet.lk> Message-ID: <4386B72B.9060804@diit.unict.it> Why do you want to use PHP with Erlang???? Have you tried YAWS? http://yaws.hyber.org/ --Corrado Sanjaya Vitharana wrote: > Hi...!!! > > 1.) What is the possibility of running PHP on inets? (inets support PHP ?) > 2.) if it supports, how to configure inets to work properly with PHP? > 3.) Are there aditional libraries to add ? > > this because I have write below 3 lines & save it as test.php on a inets > server. But no result > > echo "test"; > ?> > > Can anybody help on this matter ? > > Thanks in advance > > Sanjaya Vitharana -- ====================================================== Eng. Corrado Santoro, Ph.D. University of Catania - Engineering Faculty Department of Computer Science and Telecommunications Engineering Viale A. Doria, 6 - 95125 CATANIA (ITALY) Tel: +39 095 7382380 +39 095 7387035 +39 095 7382365 +39 095 7382364 VoIP: sip:7035@REDACTED Fax: +39 095 7382397 EMail: csanto@REDACTED Personal Home Page: http://www.diit.unict.it/users/csanto NUXI Home Page: http://nuxi.iit.unict.it ====================================================== From sanjaya@REDACTED Fri Nov 25 08:31:40 2005 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Fri, 25 Nov 2005 13:31:40 +0600 Subject: inets & PHP References: <001601c5f17b$ece1ce60$5f00a8c0@wavenet.lk> <4386B72B.9060804@diit.unict.it> Message-ID: <007e01c5f192$46dac9b0$5f00a8c0@wavenet.lk> Since, inets in the official erlang doc I thought that. No, not tried yaws yet. I think we can create something like mode_php to support PHP on inets. Are anybody already did that ? Sanjaya ----- Original Message ----- From: "Corrado Santoro" To: "Sanjaya Vitharana" Cc: Sent: Friday, 25 November 2005 01:03 pm Subject: Re: inets & PHP > Why do you want to use PHP with Erlang???? > Have you tried YAWS? > > http://yaws.hyber.org/ > > --Corrado > > Sanjaya Vitharana wrote: > > Hi...!!! > > > > 1.) What is the possibility of running PHP on inets? (inets support PHP ?) > > 2.) if it supports, how to configure inets to work properly with PHP? > > 3.) Are there aditional libraries to add ? > > > > this because I have write below 3 lines & save it as test.php on a inets > > server. But no result > > > > > echo "test"; > > ?> > > > > Can anybody help on this matter ? > > > > Thanks in advance > > > > Sanjaya Vitharana > > -- > ====================================================== > Eng. Corrado Santoro, Ph.D. > > University of Catania - Engineering Faculty > Department of Computer Science and > Telecommunications Engineering > Viale A. Doria, 6 - 95125 CATANIA (ITALY) > > Tel: +39 095 7382380 > +39 095 7387035 > +39 095 7382365 > +39 095 7382364 > > VoIP: sip:7035@REDACTED > > Fax: +39 095 7382397 > > EMail: csanto@REDACTED > Personal Home Page: > http://www.diit.unict.it/users/csanto > > NUXI Home Page: > http://nuxi.iit.unict.it > ====================================================== > From csanto@REDACTED Fri Nov 25 08:39:17 2005 From: csanto@REDACTED (Corrado Santoro) Date: Fri, 25 Nov 2005 08:39:17 +0100 Subject: inets & PHP In-Reply-To: <007e01c5f192$46dac9b0$5f00a8c0@wavenet.lk> References: <001601c5f17b$ece1ce60$5f00a8c0@wavenet.lk> <4386B72B.9060804@diit.unict.it> <007e01c5f192$46dac9b0$5f00a8c0@wavenet.lk> Message-ID: <4386BFA5.5020909@diit.unict.it> Sanjaya Vitharana wrote: > Since, inets in the official erlang doc I thought that. > > No, not tried yaws yet. > > I think we can create something like mode_php to support PHP on inets. Are > anybody already did that ? If you want a feature like that of PHP, but with Erlang, I think it's better to use YAWS, since it allows you to embed Erlang code in HTML pages (like PHP but using Erlang as programming language). It is very powerful and you can exploit the whole Erlang runtime library. For me, using inets+PHP is something useless: for example, what is the advantage of inets+PHP with respect to Apache+PHP? Ciao, --Corrado -- ====================================================== Eng. Corrado Santoro, Ph.D. University of Catania - Engineering Faculty Department of Computer Science and Telecommunications Engineering Viale A. Doria, 6 - 95125 CATANIA (ITALY) Tel: +39 095 7382380 +39 095 7387035 +39 095 7382365 +39 095 7382364 VoIP: sip:7035@REDACTED Fax: +39 095 7382397 EMail: csanto@REDACTED Personal Home Page: http://www.diit.unict.it/users/csanto NUXI Home Page: http://nuxi.iit.unict.it ====================================================== From twanvds@REDACTED Fri Nov 25 09:18:21 2005 From: twanvds@REDACTED (Twan van der Schoot) Date: Fri, 25 Nov 2005 09:18:21 +0100 Subject: inets & PHP In-Reply-To: <001601c5f17b$ece1ce60$5f00a8c0@wavenet.lk> Message-ID: Hi Sanjaya, can you explain why you want to serve PHP over inets? regards, /Twan -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED]On Behalf Of Sanjaya Vitharana Sent: vrijdag 25 november 2005 5:52 To: erlang-questions@REDACTED Subject: inets & PHP Hi...!!! 1.) What is the possibility of running PHP on inets? (inets support PHP ?) 2.) if it supports, how to configure inets to work properly with PHP? 3.) Are there aditional libraries to add ? this because I have write below 3 lines & save it as test.php on a inets server. But no result Can anybody help on this matter ? Thanks in advance Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From klacke@REDACTED Fri Nov 25 09:53:30 2005 From: klacke@REDACTED (Claes Wikstom) Date: Fri, 25 Nov 2005 09:53:30 +0100 Subject: inets & PHP In-Reply-To: <4386BFA5.5020909@diit.unict.it> References: <001601c5f17b$ece1ce60$5f00a8c0@wavenet.lk> <4386B72B.9060804@diit.unict.it> <007e01c5f192$46dac9b0$5f00a8c0@wavenet.lk> <4386BFA5.5020909@diit.unict.it> Message-ID: <4386D10A.50808@hyber.org> Corrado Santoro wrote: > Sanjaya Vitharana wrote: > >> Since, inets in the official erlang doc I thought that. >> >> No, not tried yaws yet. >> >> I think we can create something like mode_php to support PHP on inets. >> Are >> anybody already did that ? > > If you want a feature like that of PHP, but with Erlang, I think it's > better to use YAWS, since it allows you to embed Erlang code in HTML > pages (like PHP but using Erlang as programming language). It is very > powerful and you can exploit the whole Erlang runtime library. > > For me, using inets+PHP is something useless: for example, what is the > advantage of inets+PHP with respect to Apache+PHP? Actually it's not such a bad idea and Yaws does indeed support php pages. I use it when I want to run some PHP package on my Yaws site. Obviously Yaws only supports PHP over the CGI interface making it considerably slower for Yaws to ship php pages than for apache. On the other hand, we may take confort in the fact that yaws ships .yaws pages a lot faster than apache ships .php pages /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From sanjaya@REDACTED Fri Nov 25 10:37:32 2005 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Fri, 25 Nov 2005 15:37:32 +0600 Subject: inets & PHP References: Message-ID: <00ee01c5f1a3$dc5553f0$5f00a8c0@wavenet.lk> Hi .... Twan !!! 1.) I have PHP pages already running on Apache 2.) Also I have a inets (HTTP Server) httpd which replies to the specific http requests, accessing the mnesia db. 3.) Since inets is also act as a HTTP Server, can't I put the php pages on same server rather than using 2 web servers ? (Apache & inets) Just interested, no special need to user PHP over inets. Also, Apache, inets, & yaws all 3 are webservers. So why yaws supports PHP after Apache ? Rather than providing support for PHP they could guid their user to use Apache, dosen't it ? So why not thinking about PHP over inets ? And why Erlang include inets as their web server ? They also could simply put the Yaws as their web server or redirect their user to yaws. Why they don't do that? These are the questions comes to my head. Also margins are not clear for me when to use inets & yaws ? As well as why 2 web servers for Erlang users ? Any how i'm new to inets as well. Sanjaya ----- Original Message ----- From: Twan van der Schoot To: Sanjaya Vitharana ; erlang-questions@REDACTED Sent: Friday, 25 November 2005 02:18 pm Subject: RE: inets & PHP Hi Sanjaya, can you explain why you want to serve PHP over inets? regards, /Twan -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED]On Behalf Of Sanjaya Vitharana Sent: vrijdag 25 november 2005 5:52 To: erlang-questions@REDACTED Subject: inets & PHP Hi...!!! 1.) What is the possibility of running PHP on inets? (inets support PHP ?) 2.) if it supports, how to configure inets to work properly with PHP? 3.) Are there aditional libraries to add ? this because I have write below 3 lines & save it as test.php on a inets server. But no result Can anybody help on this matter ? Thanks in advance Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From rasmussen.bryan@REDACTED Fri Nov 25 10:43:12 2005 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Fri, 25 Nov 2005 10:43:12 +0100 Subject: inets & PHP In-Reply-To: <4386D10A.50808@hyber.org> References: <001601c5f17b$ece1ce60$5f00a8c0@wavenet.lk> <4386B72B.9060804@diit.unict.it> <007e01c5f192$46dac9b0$5f00a8c0@wavenet.lk> <4386BFA5.5020909@diit.unict.it> <4386D10A.50808@hyber.org> Message-ID: <3bb44c6e0511250143m7619502ds3aa6a071a1307c3e@mail.gmail.com> Would YAWS support fastcgi http://www.fastcgi.com/ ? On 11/25/05, Claes Wikstom wrote: > Corrado Santoro wrote: > > Sanjaya Vitharana wrote: > > > >> Since, inets in the official erlang doc I thought that. > >> > >> No, not tried yaws yet. > >> > >> I think we can create something like mode_php to support PHP on inets. > >> Are > >> anybody already did that ? > > > > If you want a feature like that of PHP, but with Erlang, I think it's > > better to use YAWS, since it allows you to embed Erlang code in HTML > > pages (like PHP but using Erlang as programming language). It is very > > powerful and you can exploit the whole Erlang runtime library. > > > > For me, using inets+PHP is something useless: for example, what is the > > advantage of inets+PHP with respect to Apache+PHP? > > > Actually it's not such a bad idea and Yaws does indeed support > php pages. I use it when I want to run some PHP package on > my Yaws site. Obviously Yaws only supports PHP over the CGI > interface making it considerably slower for Yaws to ship php > pages than for apache. > > On the other hand, we may take confort in the fact that yaws > ships .yaws pages a lot faster than apache ships .php pages > > > /klacke > > > > -- > Claes Wikstrom -- Caps lock is nowhere and > http://www.hyber.org -- everything is under control > cellphone: +46 70 2097763 > From hakan@REDACTED Fri Nov 25 10:47:27 2005 From: hakan@REDACTED (Hakan Mattsson) Date: Fri, 25 Nov 2005 10:47:27 +0100 (CET) Subject: Events/Observer pattern In-Reply-To: <17285.59426.725929.720469@cors.corelatus.se> References: <20051123230537.3E18059142@bang.trapexit.org> <17285.46688.499601.196986@antilipe.corelatus.se> <4385CBD6.3020607@diit.unict.it> <17285.59426.725929.720469@cors.corelatus.se> Message-ID: On Thu, 24 Nov 2005, Matthias Lang wrote: ML> Corrado Santoro writes: ML> ML> > Matthias Lang wrote: ML> > > I don't think there's anything in the standard library which does ML> > > that. ML> ML> > Why? Don't you think that gen_event could exactly fit in the problem? ML> ML> No, gen_event doesn't provide the interface he asked for. You have to ML> add code. Quite a bit of code. ML> ML> How much code is needed to do this using gen_event? How much using ML> gen_server? I think it's the same: one data structure, one module, six ML> callback functions. I.e. gen_event provides no benefit, even in ML> an application it might be expected to be good at! No wonder it's not ML> used much. ML> ML> FWIW, as is often the case, doing this in classic Erlang is neater and ML> simpler. Here's a no-frills version: ML> ML> loop(Pids) -> ML> receive ML> {reg, Pid} -> loop([Pid|Pids]); ML> {unreg, Pid} -> loop([X || X <- Pids, X =/= Pid]); ML> {send, Msg} -> [ X ! Msg || X <- Pids], loop(Pids) ML> end. If you want to cope system messages and smooth upgrade of your code, you need to start your process with proc_lib and add a few lines more. See sys and proc_lib about the details. But it is still quite comprehensive. /H?kan -module(obs). -export([ start/0, init/1, system_continue/3, system_terminate/4, system_code_change/4 ]). start() -> proc_lib:start_link(?MODULE, init, [self()], infinity). init(Parent) -> proc_lib:init_ack(Parent, {ok, self()}), loop(Parent, []). loop(Parent, Pids) -> receive {reg, Pid} -> loop(Parent, [Pid|Pids]); {unreg, Pid} -> loop(Parent, [X || X <- Pids, X =/= Pid]); {send, Msg} -> [ X ! Msg || X <- Pids], loop(Parent, Pids); {system, From, Msg} -> sys:handle_system_msg(Msg, From, Parent, ?MODULE, [], Pids) end. system_continue(Parent, _Debug, Pids) -> loop(Parent, Pids). system_terminate(_Reason, Parent, _Debug, Pids) -> loop(Parent, Pids). system_code_change(Pids, _Module, _OldVsn, _Extra) -> {ok, Pids}. From twanvds@REDACTED Fri Nov 25 10:57:02 2005 From: twanvds@REDACTED (Twan van der Schoot) Date: Fri, 25 Nov 2005 10:57:02 +0100 Subject: inets & PHP In-Reply-To: <00ee01c5f1a3$dc5553f0$5f00a8c0@wavenet.lk> Message-ID: Hi Sanyana, If I understand you correctly you try to avoid to run more than one HTTP-server on a single server. May I suggest that you take the following into consideration: 1. (This one your probably already know) You can configure inets to run under a different port number so it doesn't clash with your Apache; 2. From your PHP pages you can submit (server side!) HTTP-requests to inets (although it would be nice if Erlang had a fully working webservices module available), to retrieve data from the mnesia database. Your probably have to write a EWSAPI module to handle some of your requests. I'm running several HTTP-servers on a single server. HTTP is nothing more than a "interface protocol" and the server is nothing more as the remote proxy to a process. hope this helps a bit, regards, /Twan -----Original Message----- From: Sanjaya Vitharana [mailto:sanjaya@REDACTED] Sent: vrijdag 25 november 2005 10:38 To: Twan van der Schoot Cc:Subject: Re: inets & PHP Hi .... Twan !!! 1.) I have PHP pages already running on Apache 2.) Also I have a inets (HTTP Server) httpd which replies to the specific http requests, accessing the mnesia db. 3.) Since inets is also act as a HTTP Server, can't I put the php pages on same server rather than using 2 web servers ? (Apache & inets) Just interested, no special need to user PHP over inets. Also, Apache, inets, & yaws all 3 are webservers. So why yaws supports PHP after Apache ? Rather than providing support for PHP they could guid their user to use Apache, dosen't it ? So why not thinking about PHP over inets ? And why Erlang include inets as their web server ? They also could simply put the Yaws as their web server or redirect their user to yaws. Why they don't do that? These are the questions comes to my head. Also margins are not clear for me when to use inets & yaws ? As well as why 2 web servers for Erlang users ? Any how i'm new to inets as well. Sanjaya ----- Original Message ----- From: Twan van der Schoot To: Sanjaya Vitharana ; erlang-questions@REDACTED Sent: Friday, 25 November 2005 02:18 pm Subject: RE: inets & PHP Hi Sanjaya, can you explain why you want to serve PHP over inets? regards, /Twan -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED]On Behalf Of Sanjaya Vitharana Sent: vrijdag 25 november 2005 5:52 To: erlang-questions@REDACTED Subject: inets & PHP Hi...!!! 1.) What is the possibility of running PHP on inets? (inets support PHP ?) 2.) if it supports, how to configure inets to work properly with PHP? 3.) Are there aditional libraries to add ? this because I have write below 3 lines & save it as test.php on a inets server. But no result Can anybody help on this matter ? Thanks in advance Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From mbj@REDACTED Fri Nov 25 11:18:00 2005 From: mbj@REDACTED (mbj@REDACTED) Date: Fri, 25 Nov 2005 11:18:00 +0100 (CET) Subject: ssl_esock loop bug Message-ID: <20051125.111800.116362777.mbj@tail-f.com> Hi, We've found another bug in the esock port program. The attached program can be used to reproduce the bug. The problem is this: if an erlang application writes to the ssl socket faster than the (remote) client reads, esock will start to buffer in cp->wq. Then erlang is done, and closes the socket. Next thing that happens is that the remote client also closes, before reading all data. This means that the cp->fd gets a POLLHUP, which esock interprets (here's the bug!) as input to read. read will return 0, but since there's still stuff in the write queue, the connection is left in the JOINED state, and it will poll() again and get POLLHUP etc. The proper fix is to handle POLLHUP (and POLLERR and POLLNVAL which are not even handled today) separately from read/write. First thing to check is if an error occured, otherwise check read/write. We almost added this, but there is some strange handling of select() on w32 which we were unsure about. We'd be glad to help if needed. Anyway, here's a small patch which will fix this particular problem, but there might be more cases lurking around (which proper handling of POLLHUP etc would fix). /martin & johan =================================================================== --- esock.c (revision 377) +++ esock.c (working copy) @@ -1086,6 +1086,13 @@ /* SSL eof */ DEBUGF(("SSL eof\n")); cp->eof = 1; + /* kind of temporary hack - proper handling of POLLHUP| + POLLERR|POLLNVAL is needed! + drop the write queue - since SSL is closed we can't + write anyway. this forces JOINED_STATE_INVALID to be + true. + */ + cp->wq.len = 0; if (cp->proxy->wq.len == 0) { shutdown(cp->proxy->fd, SHUTDOWN_WRITE); cp->proxy->bp = 1; -------------- next part -------------- -module(s2). -compile(export_all). %% illustrates ssl loop bug %% do S = s2:a() in an erlang shell %% in a terminal shell, do %% openssl s_client -connect localhost:5432 %% Ctrl-Z %% do s2:b(S) %% then kill %1 in the shell, i.e. kill openssl s_client w/o reading. %% %% at this point, esock loops wildly. %% You may want to run this with 'export ERL_SSL_DEBUG=true' and then %% you should see something like: %% adding all to write queue 32768 bytes %% after doing b(S). If not, increase the number of bytes written. a() -> application:start(ssl), {ok, L} = ssl:listen(5432, [{active, false}, {certfile, "cert.example"}, {keyfile, "key.example"}]), {ok, S} = ssl:accept(L), S. b(S) -> ssl:send(S, lists:duplicate(809600, $a)), ssl:close(S). From klacke@REDACTED Fri Nov 25 11:27:48 2005 From: klacke@REDACTED (Claes Wikstom) Date: Fri, 25 Nov 2005 11:27:48 +0100 Subject: inets & PHP In-Reply-To: <3bb44c6e0511250143m7619502ds3aa6a071a1307c3e@mail.gmail.com> References: <001601c5f17b$ece1ce60$5f00a8c0@wavenet.lk> <4386B72B.9060804@diit.unict.it> <007e01c5f192$46dac9b0$5f00a8c0@wavenet.lk> <4386BFA5.5020909@diit.unict.it> <4386D10A.50808@hyber.org> <3bb44c6e0511250143m7619502ds3aa6a071a1307c3e@mail.gmail.com> Message-ID: <4386E724.5070402@hyber.org> bryan rasmussen wrote: > Would YAWS support fastcgi http://www.fastcgi.com/ ? > No, perfectly doable though. Then again, if we want speed we don't use PHP at all, but rather .yaws pages. And fastcgi isn't that _fast_ anyway, it's just faster than CGI but that doesn't say much - anything is. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From ulf@REDACTED Fri Nov 25 11:44:06 2005 From: ulf@REDACTED (Ulf Wiger) Date: Fri, 25 Nov 2005 11:44:06 +0100 (CET) Subject: geometric memory growth Message-ID: <49241.194.237.142.10.1132915446.squirrel@webmail.wiger.net> (My third try sending this mail to the list. Apologies if you get it more than once, but after two days, I have to assume that the first post got lost somewhere.) Here's a subtle bug that caused me about one day's worth of headache: I have process that holds a gen_tcp session, and multiplexes "virtual sessions" on top of it. When running a benchmark, I noticed exponential memory growth, and it took me a while to notice that the growth was actually taking place in the innocent benchmark loop (about 7 lines of code, basically this: vcc_rpc2(Channel) -> vccTransport:msg(Channel, 0, vcc_rex, {self(), ping}, [{temp_channel,true}]), receive {_, _, pong} -> ok; end. which amounts to an ets:lookup, a gen_server:call() and waiting for a message where the third element is 'pong') 17 iterations made the VM allocate 1 GB of RAM. The problem? (finally diagnosed once Bj?rn G tipped me off about erts_debug:size(Term) - thanks Bj?rn!) The second element of the message was a fun: SendF = fun(To, Msg) -> msg(State#state.channel, ChNo, To, Msg) end, Horrid, isn't it? Writing it this way, causes the _whole_ State to be bound inside the fun. And State of course contained, among other things, the metadata for the virtual sessions (e.g. other SendF instances.) This wasn't much of a problem as long as everything was local references on the same heap (it probably would have shown after a while, though), but when the fun was passed in a message to another process, all relative references were flattened out, and the size of the fun doubled in each iteration. The obvious fix: Channel = State#state.channel, SendF = fun(To, Msg) -> msg(Channel, ChNo, To, Msg) end, Now, wouldn't it be great if the compiler could figure out how to do this at compile-time? /Uffe From ulf.wiger@REDACTED Fri Nov 25 11:34:16 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 25 Nov 2005 11:34:16 +0100 Subject: geometric memory growth Message-ID: (My second try sending this mail to the list. Apologies if you get it twice, but after two days, I have to assume that the first post got lost somewhere.) Here's a subtle bug that caused me about one day's worth of headache: I have process that holds a gen_tcp session, and multiplexes "virtual sessions" on top of it. When running a benchmark, I noticed exponential memory growth, and it took me a while to notice that the growth was actually taking place in the innocent benchmark loop (about 7 lines of code, basically this: vcc_rpc2(Channel) -> vccTransport:msg(Channel, 0, vcc_rex, {self(), ping}, [{temp_channel,true}]), receive {_, _, pong} -> ok; end. which amounts to an ets:lookup, a gen_server:call() and waiting for a message where the third element is 'pong') 17 iterations made the VM allocate 1 GB of RAM. The problem? (finally diagnosed once Bj?rn G tipped me off about erts_debug:size(Term) - thanks Bj?rn!) The second element of the message was a fun: SendF = fun(To, Msg) -> msg(State#state.channel, ChNo, To, Msg) end, Horrid, isn't it? Writing it this way, causes the _whole_ State to be bound inside the fun. And State of course contained, among other things, the metadata for the virtual sessions (e.g. other SendF instances.) This wasn't much of a problem as long as everything was local references on the same heap (it probably would have shown after a while, though), but when the fun was passed in a message to another process, all relative references were flattened out, and the size of the fun doubled in each iteration. The obvious fix: Channel = State#state.channel, SendF = fun(To, Msg) -> msg(Channel, ChNo, To, Msg) end, Now, wouldn't it be great if the compiler could figure out how to do this at compile-time? /Uffe From thomasl_erlang@REDACTED Fri Nov 25 13:17:31 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Fri, 25 Nov 2005 04:17:31 -0800 (PST) Subject: geometric memory growth In-Reply-To: <49241.194.237.142.10.1132915446.squirrel@webmail.wiger.net> Message-ID: <20051125121731.14398.qmail@web34413.mail.mud.yahoo.com> --- Ulf Wiger wrote: > The obvious fix: > > Channel = State#state.channel, > SendF = fun(To, Msg) -> > msg(Channel, > ChNo, To, Msg) > end, > > Now, wouldn't it be great if the compiler could > figure out how to do this > at compile-time? Hoisting the expression out of the fun is only safe if State is known to be a #state record at this point. Otherwise, you can get an exception in the wrong place. Applying this optimization (hoisting expressions out of closures) is often a good thing, since we evaluate the expression once, then can use the closure many times. There are some counterexamples, though, so a bit of care is needed to tell when it is useful. Best, Thomas __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ From ulf.wiger@REDACTED Fri Nov 25 14:45:27 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 25 Nov 2005 14:45:27 +0100 Subject: geometric memory growth Message-ID: Thomas Lindgren wrote: > > Hoisting the expression out of the fun is only safe if State > is known to be a #state record at this point. > Otherwise, you can get an exception in the wrong place. It wasn't. Now it is. I try to consistently write patterns like: recv_fun(#channel{id = ChNo, type = Type, recv_transform = Transform, decode = Decode, on_receive = OnRecv}, #state{} = State) -> SendF = fun(To, Msg) -> msg(State#state.channel, ChNo, To, Msg) end, fun(Bin) -> OnRecv(ChNo, SendF, Transform(Decode(Bin))) end. but in this particular case, I had been sloppy (not that it would have mattered, I know.) In Tallinn, a Haskell programmer was telling me how the Haskell compiler can sometimes report a syntax error as "missing semicolon", when the whole program had been written without semicolon, relying on indendation alone. I guess it's justified sometimes to risk confusing error indications. Of course, in this case, the choice would have been between risking an exception in the wrong place, and performing an optimization that may or may not have any noticeable effect (even though in my case, the lack of optimization had dramatic effect.) BTW, I've found that people can get confused about the #state{} = State pattern in function heads. The confusion being what happens with default values. E.g. 1> rd(person, {name, age, gender=male}). person 2> rl(person). -record(person, {name, age, gender = male}). ok 3> Me = #person{name = "Ulf", age=38}. #person{name = "Ulf",age = 38,gender = male} 4> #person{} = Me. #person{name = "Ulf",age = 38,gender = male} 5> P = #person{}. #person{name = undefined,age = undefined,gender = male} 6> P = Me. =ERROR REPORT==== 25-Nov-2005::14:41:51 === Error in process <0.47.0> with exit value: {{badmatch,{person,"Ulf",38,male}},[{erl_eval,expr,3}]} ** exited: {{badmatch,{person,"Ulf",38,male}},[{erl_eval,expr,3}]} ** The Erlang Reference Manual could possibly state more clearly that #person{} is interpreted one way on the right hand side, and another on the left hand side? BR, Uffe From mfroberg@REDACTED Fri Nov 25 15:18:44 2005 From: mfroberg@REDACTED (=?ISO-8859-1?Q?Magnus_Fr=F6berg?=) Date: Fri, 25 Nov 2005 15:18:44 +0100 Subject: SNMP sha/aes decryption Message-ID: <43871D44.9080009@nortel.com> Hi found an issue while doing snmpwalk with SNMP version 3, SHA as authproto and AES as privproto. The SNMP agent didn't manage to decrypt the get request. Fix for R10B-8: Index: snmpa_usm.erl =================================================================== RCS file: /home/share/erlang/cvsroot/otp/lib/snmp/src/agent/snmpa_usm.erl,v retrieving revision 1.3 diff -u -r1.3 snmpa_usm.erl --- snmpa_usm.erl 12 Nov 2005 22:50:05 -0000 1.3 +++ snmpa_usm.erl 25 Nov 2005 13:54:40 -0000 @@ -268,19 +268,19 @@ Data end. -do_decrypt(Data, UsmUser, - #usmSecurityParameters{msgPrivacyParameters = PrivParms}) -> - EncryptedPDU = snmp_pdus:dec_scoped_pdu_data(Data), - SecName = element(?usmUserSecurityName, UsmUser), - PrivP = element(?usmUserPrivProtocol, UsmUser), - PrivKey = element(?usmUserPrivKey, UsmUser), - try_decrypt(PrivP, PrivKey, PrivParms, EncryptedPDU, SecName). +do_decrypt(Data, UsmUser, UsmSecParams) -> + EncryptedPDU = snmp_pdus:dec_scoped_pdu_data(Data), + SecName = element(?usmUserSecurityName, UsmUser), + PrivP = element(?usmUserPrivProtocol, UsmUser), + PrivKey = element(?usmUserPrivKey, UsmUser), + try_decrypt(PrivP, PrivKey, UsmSecParams, EncryptedPDU, SecName). try_decrypt(?usmNoPrivProtocol, _, _, _, SecName) -> % 3.2.5 error(usmStatsUnsupportedSecLevels, ?usmStatsUnsupportedSecLevels_instance, SecName); % OTP-5464 try_decrypt(?usmDESPrivProtocol, - PrivKey, MsgPrivParams, EncryptedPDU, SecName) -> + PrivKey, UsmSecParams, EncryptedPDU, SecName) -> + #usmSecurityParameters{msgPrivacyParameters = MsgPrivParams} = UsmSecParams, case (catch des_decrypt(PrivKey, MsgPrivParams, EncryptedPDU)) of {ok, DecryptedData} -> DecryptedData; /Magnus From ulf@REDACTED Sat Nov 26 12:22:36 2005 From: ulf@REDACTED (Ulf Wiger) Date: Sat, 26 Nov 2005 12:22:36 +0100 Subject: geometric memory growth In-Reply-To: <20051125121731.14398.qmail@web34413.mail.mud.yahoo.com> References: <20051125121731.14398.qmail@web34413.mail.mud.yahoo.com> Message-ID: Den 2005-11-25 13:17:31 skrev Thomas Lindgren : > > --- Ulf Wiger wrote: > >> The obvious fix: >> >> Channel = State#state.channel, >> SendF = fun(To, Msg) -> >> msg(Channel, >> ChNo, To, Msg) >> end, >> >> Now, wouldn't it be great if the compiler could >> figure out how to do this >> at compile-time? > > Hoisting the expression out of the fun is only safe if > State is known to be a #state record at this point. > Otherwise, you can get an exception in the wrong > place. Forgive me, but I can't help thinking that an exception when the fun is applied would be the wrong place, rather than when the fun is instantiated. The fun's environment is bound when it the fun is bound, so I think it would be intuitive to get the exception at the binding occurrence rather than later. After all, the record field access can have no side effects (apart from the run-time error when accessing the field of a non-record), and semantically, the access _has_ to be done at the binding occurrence - if it is delayed, one has to lug the entire record along to make sure that the record field access has the same result as it would have had at the binding occurrence. You said there are corner cases. I'd like to hear about them. I would say that it isn't obvious either from the erlang 4.7 specification or the erlang reference manual what exactly is supposed to happen. Your point seems to be that the only bindings that should occur in SendF = fun(To, Msg) -> msg(State#state.channel, ChNo, To, Msg) end would be State and ChNo - but I'm not interested in State. I think it's most intuitive to think of the two constructs above as exactly equivalent. /Uffe -- Ulf Wiger From erlang@REDACTED Sat Nov 26 15:51:54 2005 From: erlang@REDACTED (peter) Date: Sat, 26 Nov 2005 15:51:54 +0100 Subject: bug in inets or erlang! References: Message-ID: <20051126145154.E9D0A5911E@bang.trapexit.org> After my FreeBSD server running erlang was restarted, suddenly INETS was not comming up as it was expected to. In the inets error_log I found: > more error_log_16111 [26/Nov/2005:13:14:42 -0000] reporting error: traverse exit from apply: mod_get: do => {badarg,[{erlang,universaltime_to_localtime,[{{1969,12,31},{23,59,59}}]}, {calendar,local_time_to_universal_time_dst,1}, {httpd_util,rfc1123_date,1}, {mod_get,get_modification_date,1}, {mod_get,do_get,1}, {httpd_response,traverse_modules,2}, {httpd_response,generate_and_send_response,1}, {httpd_request_handler,respond,3}]} WHY is inets calling erlang:universaltime_to_localtime/1 with [{{1969,12,31},{23,59,59}}] ?? Looks like a potential bugg to me OR should this bug actually be located to the erlang module instead? Should this call really result in a crach? Anyhow to get inets up and running again I had to patch the calendar.erl module catching for this crash and in that case return {{1970,1,1},{0,0,0}}. What need to change here erlang or some module in inets? /PeterPeter Lund _________________________________________________________ Sent using Mail2Forum (http://m2f.sourceforge.net) From matthias@REDACTED Sat Nov 26 17:04:26 2005 From: matthias@REDACTED (Matthias Lang) Date: Sat, 26 Nov 2005 17:04:26 +0100 Subject: bug in inets or erlang! In-Reply-To: <20051126145154.E9D0A5911E@bang.trapexit.org> References: <20051126145154.E9D0A5911E@bang.trapexit.org> Message-ID: <17288.34698.153071.494212@antilipe.corelatus.se> Hi, I started off by wondering why universaltime_to_localtime() doesn't work for the date you gave. The relevant files are erts/emulator/beam/bif.c and erts/emulator/beam/erl_time_sup.c. In univ_to_local(), there's a rangecheck on the year. If it's less than BASEYEAR, the call fails. BASEYEAR is 1970. Real men don't read manuals, but it'd help all the sissies like me if the manual gave a clue about that. The other question is easier to answer---your trace provides all the information. inets calls univeraltime_to_localtime/1 with an argument from 1969 because the file you tried to get inets to serve has a modification time from 1969. Take a look at the log to see which file it was. Matthias ---------------------------------------------------------------------- peter writes: > After my FreeBSD server running erlang was restarted, suddenly > INETS was not comming up as it was expected to. In the inets > error_log I found: > > > more error_log_16111 > [26/Nov/2005:13:14:42 -0000] reporting error: traverse exit from apply: mod_get: > do => > {badarg,[{erlang,universaltime_to_localtime,[{{1969,12,31},{23,59,59}}]}, > {calendar,local_time_to_universal_time_dst,1}, > {httpd_util,rfc1123_date,1}, > {mod_get,get_modification_date,1}, > {mod_get,do_get,1}, > {httpd_response,traverse_modules,2}, > {httpd_response,generate_and_send_response,1}, > {httpd_request_handler,respond,3}]} > > > WHY is inets calling erlang:universaltime_to_localtime/1 with [{{1969,12,31},{23,59,59}}] ?? Looks like a potential bugg to me OR should this bug actually be located to the erlang module instead? Should this call really result in a crach? > > Anyhow to get inets up and running again I had to patch the calendar.erl module catching for this crash and in that case return {{1970,1,1},{0,0,0}}. > > What need to change here erlang or some module in inets? > > /PeterPeter Lund > _________________________________________________________ > Sent using Mail2Forum (http://m2f.sourceforge.net) From matthias@REDACTED Sat Nov 26 17:40:49 2005 From: matthias@REDACTED (Matthias Lang) Date: Sat, 26 Nov 2005 17:40:49 +0100 Subject: geometric memory growth In-Reply-To: References: <20051125121731.14398.qmail@web34413.mail.mud.yahoo.com> Message-ID: <17288.36881.183312.106472@antilipe.corelatus.se> Ulf Wiger writes: > Forgive me, but I can't help thinking that an exception > when the fun is applied would be the wrong place, rather > than when the fun is instantiated. This seems like madness. Do you think that f() should print "humpty": f() -> Y = atom, F = fun(X) -> io:fwrite("humpty\n"), X#state.channel end, F(Y). Should g() _always_ cause an exception: g() -> Y = atom, F = fun(X) -> case mymod:myfunc() of nice -> nice; nasty -> X#state.channel end, F(Y). What about h(): h() -> Y = atom, F = fun(X) -> case mymod:myfunc() of nice -> nice; nasty -> element(3, X) end, F(Y). Matthias From ulf@REDACTED Sat Nov 26 19:08:05 2005 From: ulf@REDACTED (Ulf Wiger) Date: Sat, 26 Nov 2005 19:08:05 +0100 Subject: geometric memory growth In-Reply-To: <17288.36881.183312.106472@antilipe.corelatus.se> References: <20051125121731.14398.qmail@web34413.mail.mud.yahoo.com> <17288.36881.183312.106472@antilipe.corelatus.se> Message-ID: Den 2005-11-26 17:40:49 skrev Matthias Lang : > Ulf Wiger writes: > > > Forgive me, but I can't help thinking that an exception > > when the fun is applied would be the wrong place, rather > > than when the fun is instantiated. > > This seems like madness. > > Do you think that f() should print "humpty": > > f() -> > Y = atom, > F = fun(X) -> io:fwrite("humpty\n"), X#state.channel end, > F(Y). Yes, I do. X is not part of the fun's environment, but is passed as an input argument at application time. This is similar to writing f1() -> Y = atom, Y#state.channel The compiler would not complain, but you would always get a runtime error, and Dialyzer would be able to say "I told you so." > Should g() _always_ cause an exception: > > g() -> > Y = atom, > F = fun(X) -> > case mymod:myfunc() of > nice -> nice; > nasty -> X#state.channel > end, > F(Y). Same here: X is an input argument, and has nothing to do with binding the environment for fun. > What about h(): > > h() -> > Y = atom, > F = fun(X) -> > case mymod:myfunc() of > nice -> nice; > nasty -> element(3, X) > end, > F(Y). Again, same thing. If, on the other hand, you wrote: h() -> Y = atom, F = fun(P) -> element(P, Y) end. you would have a situation where dialyzer should be able to warn you that it's going to fail, but the compiler would allow it. element/2, is a normal function call. However, X#state.channel is recognizable by the compiler as a record attribute selection, and if X is part of the fun's environment, the value is bound when the fun is bound, so I think it's a different case than all your examples. /Uffe -- Ulf Wiger From matthias@REDACTED Sat Nov 26 19:44:48 2005 From: matthias@REDACTED (Matthias Lang) Date: Sat, 26 Nov 2005 19:44:48 +0100 Subject: geometric memory growth In-Reply-To: References: <20051125121731.14398.qmail@web34413.mail.mud.yahoo.com> <17288.36881.183312.106472@antilipe.corelatus.se> Message-ID: <17288.44320.413619.312475@antilipe.corelatus.se> Matthias > > This seems like madness. > > Do you think that f() should print "humpty": > > > > f() -> > > Y = atom, > > F = fun(X) -> io:fwrite("humpty\n"), X#state.channel end, > > F(Y). > > Yes, I do. > X is not part of the fun's environment, but is passed > as an input argument at application time. I failed to notice that your suggestion only applied to things carried in via the environment. So it seemed stranger than it was, because it seemed to make funs behave differently to normal functions. Now I see it's 'merely' that you want record field selectors to be more than just syntactic sugar for an element/2 call. Matthias From ulf@REDACTED Sat Nov 26 22:38:48 2005 From: ulf@REDACTED (Ulf Wiger) Date: Sat, 26 Nov 2005 22:38:48 +0100 Subject: geometric memory growth In-Reply-To: <17288.44320.413619.312475@antilipe.corelatus.se> References: <20051125121731.14398.qmail@web34413.mail.mud.yahoo.com> <17288.36881.183312.106472@antilipe.corelatus.se> <17288.44320.413619.312475@antilipe.corelatus.se> Message-ID: Den 2005-11-26 19:44:48 skrev Matthias Lang : > I failed to notice that your suggestion only applied to things > carried in via the environment. So it seemed stranger than it was, > because it seemed to make funs behave differently to normal functions. > > Now I see it's 'merely' that you want record field selectors to be > more than just syntactic sugar for an element/2 call. Well, it is. (: Or, at least, if Kostis gets his way, it will be. In OTP R10B, the following code: -module(foo). -export([new/0,f/1]). -record(rec, {a,b}). new() -> #rec{}. f(R) -> R#rec.a. compiled as: new() -> {rec,undefined,undefined}. f(R) -> erlang:element(2,R). module_info() -> erlang:get_module_info(foo). module_info(X) -> erlang:get_module_info(foo,X). and consequently: 2> c(foo). {ok,foo} 3> foo:f({a,b,c}). b (which almost makes Thomas's argument against me moot, because as things work today, you may or may not get an exception if State is not a record. If it's a tuple of sufficient arity, you will get _something_, but quite possibly not at all what you expected.) But if we check debug_info for the same module: {function, 7, f, 1, [{clause, 7, [{var,7,'R'}], [], [{record_field, 8, {var,8,'R'}, rec, {atom,8,a}}]}]}, It's when the compiler goes beyond this point and transforms record_field(R, a) that it over-simplifies and currently produces code that (a) is not always safe, and (b) sometimes causes memory explosions. I think these are two very good reasons to make record field selectors into something more than just syntactic sugar for element/2. /Uffe -- Ulf Wiger From tony@REDACTED Sat Nov 26 17:09:00 2005 From: tony@REDACTED (Tony Rogvall) Date: Sat, 26 Nov 2005 17:09:00 +0100 Subject: geometric memory growth In-Reply-To: References: <20051125121731.14398.qmail@web34413.mail.mud.yahoo.com> Message-ID: <5901EBE5-AC38-4607-8D87-B616A025D137@rogvall.com> > Your point seems to be that the only bindings that should > occur in > > SendF = fun(To, Msg) -> > msg(State#state.channel, ChNo, To, Msg) > end > > would be State and ChNo - but I'm not interested in State. > I think it's most intuitive to think of the two > constructs above as exactly equivalent. I guess the (not so) general question is something like: Given a function f and a bound variable B (constant!) . Under what circumstances may f(B) be evaluated while defining the function bound to F. F = fun() -> f(B) end, I would guess that any function f not producing side effects would be safe to evaluate B = {1,2,3}, F = fun() -> element(1, B) end, The expression element(1, B) is of course always constant 1 in the above example While B = {1,2,3} F = fun() -> self() ! B end, Is not ok to evaluate while defining F. One (BIG) problem would be error cases: g(B) -> fun() -> element(1, B) end. could be rewritten as g(B) -> T1 = element(1, B), fun() -> T1 end. But what if B is not a tuple or is {} then the fault will be generated in the wrong place. While calling g and not when executing function result of g. (Solution, delay the faults ;-) /Tony From ulf@REDACTED Sun Nov 27 00:10:29 2005 From: ulf@REDACTED (Ulf Wiger) Date: Sun, 27 Nov 2005 00:10:29 +0100 Subject: geometric memory growth In-Reply-To: <5901EBE5-AC38-4607-8D87-B616A025D137@rogvall.com> References: <20051125121731.14398.qmail@web34413.mail.mud.yahoo.com> <5901EBE5-AC38-4607-8D87-B616A025D137@rogvall.com> Message-ID: Den 2005-11-26 17:09:00 skrev Tony Rogvall : > I guess the (not so) general question is something like: > > Given a function f and a bound variable B (constant!) . Under what > circumstances may f(B) be evaluated while defining the > function bound to F. > > F = fun() -> f(B) end, Isn't this basically an example of constant propagation? As in when: X = 17, Y = X + 2. then the compiler would be safe to optimize away the arithmetic and simply convert to: X = 17, Y = 19. So record field selection could only be a case of constant propagation if we _know_ that the variable used for the record is in fact of the right type. Fair enough. > > One (BIG) problem would be error cases: > > g(B) -> > fun() -> element(1, B) end. > > could be rewritten as > > g(B) -> > T1 = element(1, B), > fun() -> T1 end. > > But what if B is not a tuple or is {} then the faultwill be generated in > the wrong place. Yes, and this would be analogous if we maintain that record field selection is just syntactic sugar for element/2... ok, it _is_ analogous, since that's exactly the case today, but only because the compiler throws away essential information. This leads to other problems, as pointed out elsewhere. If we think that it's supposed to behave as it does today, I believe there should be some text in the documentation explaining the finer points of the record syntax. (: /Uffe -- Ulf Wiger From jay@REDACTED Sun Nov 27 02:36:07 2005 From: jay@REDACTED (Jay Nelson) Date: Sat, 26 Nov 2005 17:36:07 -0800 Subject: bug in inets or erlang! Message-ID: <43890D87.2050409@duomark.com> Looks to me like the call is being made with -1, which would put it at 1 second before midnight 1970 January 1 (the time that all UNIX hackers interpret as the dawn of enlightenment). jay From pascal.brisset@REDACTED Sun Nov 27 15:20:43 2005 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Sun, 27 Nov 2005 15:20:43 +0100 Subject: geometric memory growth In-Reply-To: References: <20051125121731.14398.qmail@web34413.mail.mud.yahoo.com> <5901EBE5-AC38-4607-8D87-B616A025D137@rogvall.com> Message-ID: <20051127142022.53ABF17347F@postfix3-1.free.fr> > > Given a function f and a bound variable B (constant!) . Under what > > circumstances may f(B) be evaluated while defining the > > function bound to F. > > > > F = fun() -> f(B) end, > > Isn't this basically an example of constant propagation? Constant propagation should be safe, but it is only a subset. It may still interfere with benchmarks where people expect computations to take place in a specific context. Lambda-calculists would see the general case as "reducing under the lambda". Side effects are obviously a concern (including exceptions). Consider also the case where f(B) loops infinitely. -- Pascal From ulf.wiger@REDACTED Sun Nov 27 16:58:42 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Sun, 27 Nov 2005 16:58:42 +0100 Subject: geometric memory growth Message-ID: Pascal Brisset wrote: > > Isn't this basically an example of constant propagation? > > Constant propagation should be safe, but it is only a subset. Ok, the discussion seems to be drifting away from the original question, which dealt specifically with record field access. It isn't so much computation, as it is a pointer reference. The question is whether one always has to bind the entire record, or simply bind the record field into the fun's environment. In order to do this, one doesn't need to evaluate the fun itself. > It may still interfere with benchmarks where people expect > computations to take place in a specific context. > Lambda-calculists would see the general case as "reducing > under the lambda". > > Consider also the case where f(B) loops infinitely. The current method certainly interfered with my benchmark, since it caused the whole workstation to become unresponsive almost immediately. ;-) Specifically for record field access, the reference manual doesn't really specify that it should reduce exactly to an element/2 call. In the old days, it used to expand into a pattern match, if I recall correctly. I don't think one should, or even could reason about benchmark performance at that level in Erlang. > Lambda-calculists would see the general case as "reducing > under the lambda". Ah, thanks. > Side effects are obviously a concern (including exceptions). But not for record field access, since there are no side-effects associated with those. /uffe From ke.han@REDACTED Sun Nov 27 19:33:43 2005 From: ke.han@REDACTED (ke.han) Date: Mon, 28 Nov 2005 02:33:43 +0800 Subject: inets & PHP In-Reply-To: <00ee01c5f1a3$dc5553f0$5f00a8c0@wavenet.lk> References: <00ee01c5f1a3$dc5553f0$5f00a8c0@wavenet.lk> Message-ID: <4389FC07.9050909@redstarling.com> Sanjaya Vitharana wrote: > Hi .... Twan !!! > > 1.) I have PHP pages already running on Apache > 2.) Also I have a inets (HTTP Server) httpd which replies to the > specific http requests, accessing the mnesia db. > 3.) Since inets is also act as a HTTP Server, can't I put the php pages > on same server rather than using 2 web servers ? (Apache & inets) > > Just interested, no special need to user PHP over inets. > > Also, > > Apache, inets, & yaws all 3 are webservers. So why yaws supports PHP > after Apache ? Rather than providing support for PHP they could guid > their user to use Apache, dosen't it ? > > So why not thinking about PHP over inets ? And why Erlang include inets > as their web server ? They also could simply put the Yaws as their web > server or redirect their user to yaws. Why they don't do that? Erlang includes inets because it was created by Ericsson and erlang is released and maintained by Ericsson. Yaws is not an Ericsson project developed because at the time, inets did not provide as high-level a framework for the needs of its creator (My guess this is still true). This is simple co-evolution...happens all the time, even in a small ecosystem like Erlang. Inets will stick around because legacy code depends on it and I'm sure some users who don't need the same architecture Yaws provides choose inets instead. Bottom line: If you are new to Erlang and want a solid, scalable, full featured web server and application framework for serving up a simple or complex web site, Yaws is the best game in town. If you need to develop a new web app and want to use an existing PHP app embedded as a part of the whole, Yaws is a great choice using CGI as Claes pointed out. Yes, FastCGI would be nicer and given the user base Yaws is enjoying its likely to be just around the corner ;-). As to CGI/FastCGI use with Erlang. If you can afford to take the time to manage your own interface to an external app in Java or Python for example, using an Erlang Port Interface like JInterface should give better resource management and performance than even FastCGI would give. Hopefully "PHPInterface" for Erlang is just around the corner as well. Good luck and happy Yaws'ing... ke han From Bob.Smart@REDACTED Sun Nov 27 21:03:17 2005 From: Bob.Smart@REDACTED (Bob.Smart@REDACTED) Date: Mon, 28 Nov 2005 07:03:17 +1100 Subject: geometric memory growth Message-ID: >... > Side effects are obviously a concern (including exceptions). > > Consider also the case where f(B) loops infinitely. I would think that the advent of JITs made us all aware that compilation is not such a special time. Compilation is just optimization you can do before you get any input. My amateur impression is that it is particularly important for functional languages to do optimizations of sections of code after there has been some input. I certainly think that functions should be applied to known input at compile time. Abort the attempt if you get to a side effect. Also (with a warning) if it takes too long. Bob From thomasl_erlang@REDACTED Mon Nov 28 00:54:50 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Sun, 27 Nov 2005 15:54:50 -0800 (PST) Subject: geometric memory growth In-Reply-To: Message-ID: <20051127235450.54744.qmail@web34401.mail.mud.yahoo.com> --- Ulf Wiger wrote: > Den 2005-11-25 13:17:31 skrev Thomas Lindgren > : > > > > --- Ulf Wiger wrote: > > > >> The obvious fix: > >> > >> Channel = State#state.channel, > >> SendF = fun(To, Msg) -> > >> msg(Channel, > >> ChNo, To, Msg) > >> end, > >> > >> Now, wouldn't it be great if the compiler could > >> figure out how to do this > >> at compile-time? > > > > Hoisting the expression out of the fun is only > safe if > > State is known to be a #state record at this > point. > > Otherwise, you can get an exception in the wrong > > place. > > Forgive me, but I can't help thinking that an > exception > when the fun is applied would be the wrong place, > rather > than when the fun is instantiated. The fun's > environment > is bound when it the fun is bound, so I think it > would > be intuitive to get the exception at the binding > occurrence rather than later. After all, the record > field > access can have no side effects (apart from the > run-time > error when accessing the field of a non-record), In this case, it's the possible runtime error that is the problem. In principle, the compiler could speculatively generate something like: if record(State, state) -> Channel = State#state.channel, fun ... end; true -> fun ... State#state.channel ... end end (But in that case, is the cost of the extra code worth the saved effort?) > and > semantically, the access _has_ to be done at the > binding > occurrence - if it is delayed, one has to lug the > entire > record along to make sure that the record field > access > has the same result as it would have had at the > binding > occurrence. I would say that semantically this evaluation MUST NOT be done at the binding occurrence, IF we can observe a functional difference compared to the original program evaluated naively. You have told the compiler that the program shall behave AS IF the evaluation occurs inside the closure; changing program behaviour is usually considered bad form. > You said there are corner cases. I'd like to hear > about > them. I would say that it isn't obvious either from > the > erlang 4.7 specification or the erlang reference > manual > what exactly is supposed to happen. If one considers moving expressions out of closures in general, then there are plenty of cases, some of them mentioned by other posters. (See below for a discussion on record fields in particular.) First, the new program must preserve side effects (including exceptions), which ones occur and in what order. Second, the new program should (almost always) be faster than the original program. Given that source programs vary widely, there are lots of possibilities. Here is one: A = ..., F = fun() -> B = g(A), ... end. Let's assume g(A) can be evaluated safely. Should the compiler move B out of the closure? If yes, what if B is a large data structure? What if F is copied here and there? Recomputing g(A) MAY be cheaper than dragging around B. And what if g(A) is expensive and F is never used, or seldom used? Computing B may then often be a waste of effort. The compiler thus needs to convince itself that the optimization is not only safe but also profitable. (I remember encountering a similar, though not identical, code-motion decision problem in an unfinished pass in an early HIPE compiler, by the way: the compiler saw this code: t1 = load(x+k); t2 = load(x+k2); ... if (test) then L1; /* t1 ... tn forgotten afterwards */ In this case, we are doing a sequence of loads that are partially dead. So ... should the compiler move the loads to L1, where they are _definitely_ needed, and as a consequence make the fall-through path faster? [see below for answer]) For plain record accesses: assuming safeness, the compiler basically has to consider the following trade off for profitability: if we extract N fields from the record State, when is the cost of creating a closure with (N-1) more free variables less expensive than performing the accesses every time the closure is used? How many times is the closure used? (The compiler can sometimes be clever about how closures and free variables are implemented, so this decision must also take that into account.) In particular, are there cases when the closure is not used? The compiler usually resorts to heuristics at this point. For a production compiler, the idea is usually to avoid making the rare but spectacularly bad decisions :-) Best, Thomas * The answer: in this case, the jump to L1 was usually taken and t1,...,tn were used shortly afterwards. So keeping them put meant fewer load stalls compared to moving them down, though at the cost of unnecessary work in the infrequent case. __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From chris@REDACTED Mon Nov 28 01:15:21 2005 From: chris@REDACTED (Christophe Romain) Date: Mon, 28 Nov 2005 01:15:21 +0100 Subject: R10B-8 on Sharp Zaurus Message-ID: <725479e0cd9a9704ff031e7380ffd1b9@erlang-fr.org> Hello R10B-8 is compiled on Sharp Zaurus SL6000. it should also work on older Zaurus like SL5500. Zaurus is an arm xscale based pda running linux installed size: 7700K content of lib: asn1 compiler et inets kernel mnemosyne mnesia mnesia_session observer os_mon otp_mibs parsetools runtime_tools sasl snmp stdlib syntax_tools tools webtool xmerl the archive will be available in the next release of REPOS. regards. From david.nospam.hopwood@REDACTED Mon Nov 28 03:16:05 2005 From: david.nospam.hopwood@REDACTED (David Hopwood) Date: Mon, 28 Nov 2005 02:16:05 +0000 Subject: geometric memory growth In-Reply-To: <5901EBE5-AC38-4607-8D87-B616A025D137@rogvall.com> References: <20051125121731.14398.qmail@web34413.mail.mud.yahoo.com> <5901EBE5-AC38-4607-8D87-B616A025D137@rogvall.com> Message-ID: <438A6865.6030405@blueyonder.co.uk> Tony Rogvall wrote: > >> Your point seems to be that the only bindings that should >> occur in >> >> SendF = fun(To, Msg) -> >> msg(State#state.channel, ChNo, To, Msg) >> end >> >> would be State and ChNo - but I'm not interested in State. >> I think it's most intuitive to think of the two >> constructs above as exactly equivalent. > > I guess the (not so) general question is something like: > > Given a function f and a bound variable B (constant!) . Under what > circumstances may f(B) be evaluated while defining the > function bound to F. > > F = fun() -> f(B) end, > > I would guess that any function f not producing side effects would be > safe to evaluate Any deterministic function not producing side effects or exceptions that is guaranteed to terminate in a *short* time. -- David Hopwood From xlcr@REDACTED Mon Nov 28 05:30:50 2005 From: xlcr@REDACTED (Nick Linker) Date: Mon, 28 Nov 2005 10:30:50 +0600 Subject: R10B-8 on Sharp Zaurus In-Reply-To: <725479e0cd9a9704ff031e7380ffd1b9@erlang-fr.org> References: <725479e0cd9a9704ff031e7380ffd1b9@erlang-fr.org> Message-ID: <438A87FA.5040201@mail.ru> Christophe Romain wrote: > Hello > > R10B-8 is compiled on Sharp Zaurus SL6000. > it should also work on older Zaurus like SL5500. Don't you know, whether it is possible to run it under Pocket PC platfrorm? From alex.peake@REDACTED Mon Nov 28 07:52:44 2005 From: alex.peake@REDACTED (Alex Peake) Date: Sun, 27 Nov 2005 22:52:44 -0800 Subject: Mnesia Questions Message-ID: <002301c5f3e8$5601d4d0$64020a0a@FEY> 1) I set up person as a ram_copies table. I did a mnesia:dump_tables([person]). Then I tried mnesia:change_table_copy_type to get to disc_copies and got an error saying "Table dump exists". How do I change this table to disc_copies? 2) Can I move the dump of person to another machine by copying the file person.dcd? 3) What is a good way to load a text (csv) file into a table? I tried mnesia:load_textfile and it is quite slow. 4) How do I best join two large tables (and get a subset)? I tried: non_english_g3_join() -> F = fun() -> Q = qlc:q([{P#persondata.f2, P#persondata.f1, R#person.pkey} || P <- mnesia:table(persondata), R <- mnesia:table(person), P#persondata.personid == R#person.id, P#persondata.f8 == "03" orelse P#persondata.f8 == "02", P#persondata.f3 /= "English"]), qlc:e(Q) end, mnesia:transaction(F). And it went off in the weeds (at least for 45 minutes, when I quit waiting). I also tried: sample_join() -> Q = query [ {P#persondata.f2, P#persondata.f1} || P <- table(persondata), R <- table(person), P#persondata.personid = R#person.id, P#persondata.f8 = "03", P#persondata.f3 /= "English" ] end, F = fun() -> mnemosyne:eval(Q) end, mnesia:transaction(F). And got: =ERROR REPORT==== 27-Nov-2005::22:32:35 === Error in process <0.478.0> with exit value: {{nocatch,{'EXIT',mnemosyne_not_runn ing}},[{mnemosyne_lc,the_query,1},{person,sample_join,0},{erl_eval,do_apply, 5},{ shell,exprs,6},{shell,eval_loop,3}]} ** exited: {{nocatch,{'EXIT',mnemosyne_not_running}}, [{mnemosyne_lc,the_query,1}, {person,sample_join,0}, {erl_eval,do_apply,5}, {shell,exprs,6}, {shell,eval_loop,3}]} ** Yet: sample_mq() -> Q = query [ {P#persondata.f2, P#persondata.f1} || P <- table(persondata), P#persondata.f8 = "03", P#persondata.f3 /= "English" ] end, F = fun() -> mnemosyne:eval(Q) end, mnesia:transaction(F). works. From hans.bolinder@REDACTED Mon Nov 28 09:26:54 2005 From: hans.bolinder@REDACTED (hans.bolinder@REDACTED) Date: Mon, 28 Nov 2005 09:26:54 +0100 Subject: Mnesia Questions In-Reply-To: <002301c5f3e8$5601d4d0$64020a0a@FEY> References: <002301c5f3e8$5601d4d0$64020a0a@FEY> Message-ID: <17290.48974.668426.353927@gargle.gargle.HOWL> ["Alex Peake" :] > 4) How do I best join two large tables (and get a subset)? QLC doesn't yet support fast join of tables. As far as I know Mnemosyne doesn't either. See also http://www.erlang.org/ml-archive/erlang-questions/200502/msg00278.html Best regards Hans Bolinder, Erlang/OTP From chris@REDACTED Mon Nov 28 09:39:43 2005 From: chris@REDACTED (Christophe Romain) Date: Mon, 28 Nov 2005 09:39:43 +0100 Subject: R10B-8 on Sharp Zaurus In-Reply-To: <438A87FA.5040201@mail.ru> References: <725479e0cd9a9704ff031e7380ffd1b9@erlang-fr.org> <438A87FA.5040201@mail.ru> Message-ID: > Don't you know, whether it is possible to run it under Pocket PC > platfrorm? well, i don't know anything about the windows world. I don't see any reason for Erlang not to compile under PocketPC: http://www.microsoft.com/downloads/details.aspx?FamilyID=9996b314-0364 -4623-9ede-0b5fbb133652&displaylang=en any volunteer ? From bjorn@REDACTED Mon Nov 28 09:47:56 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 28 Nov 2005 09:47:56 +0100 Subject: Record tests (was: geometric memory growth) In-Reply-To: References: Message-ID: "Ulf Wiger (AL/EAB)" writes: > Specifically for record field access, the reference manual > doesn't really specify that it should reduce exactly to > an element/2 call. In the old days, it used to expand > into a pattern match, if I recall correctly. No. Access to a single field using the Record#record.field syntax has always expanded to an element/2 call. In R10B-8 you can give the 'strict_record_tests' option to the compiler to have it generate code that verifies that Record is of the proper type when using Record#record.field in bodies (not in guards, yet). That option will be probably be the default in R11B. Currently, if the record test for Record#record.field fails, there will be a badmatch exception. I hope to fix that to the correct bad_record exception in a future release, and also to verify records in guards. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From erez@REDACTED Sun Nov 27 09:11:52 2005 From: erez@REDACTED (Erez Petrank) Date: Sun, 27 Nov 2005 10:11:52 +0200 Subject: Call For Papers: ISMM 2006 (International Symposium on Memory Management) Message-ID: <43896A48.2020701@cs.technion.ac.il> ***************************************************************************** Call For Papers The 2006 International Symposium on Memory Management (ISMM'06) Co-located with PLDI 2006 Ottawa, Canada June 10-11 2006 http://www.cs.technion.ac.il/~erez/ismm06 ***************************************************************************** IMPORTANT DATES: Submission: January 23, 2006, 11PM PST Notification: March 6, 2006 Camera-ready: Monday, April 3, 2006 ISMM is a forum for research in management of dynamically allocated memory. ISMM solicits full-length papers on all areas of memory management. Survey papers that present an aspect of memory management with a new clarity and insight are also welcome. Papers are solicited on, but not limited to, these topics, - Explicit storage allocation and de-allocation - Garbage collection algorithms and implementations - Compiler analyses to aid memory management - Interaction with languages, operating systems, and hardware, especially the memory system - Memory system interaction with programming languages, operating systems, and hardware. The ISMM 2006 paper reviewing process adds two features new to ISMM: double blind reviewing, and an opportunity for rebuttal; see the ISMM webpage for more details. Full submissions should be at most 12 pages excluding bibliography and well-marked appendices but including all figures and tables, using at least 11-point font and reasonable margins for US Letter paper. Papers that violate these guidelines will be rejected by the program chair. Program committee members are not required to read appendices, and so a paper should be intelligible without them. Submitted papers must be in English and formatted to print on US Letter (8.5 x 11 inches) paper. Submissions must contain an abstract and postal and electronic mailing addresses for at least one author. Instructions for on-line submission of papers will become available on the ISMM webpage at http://www.cs.technion.ac.il/~erez/ismm06. Submissions will be read by the program committee and designated reviewers and judged on scientific merit, innovation, readability, and relevance. Papers previously published or already being reviewed by another conference are not eligible; if a closely related paper has been submitted to a journal, the authors must notify the program chair. The proceedings will be published by ACM. Authors should read the ACM Author Guidelines and related information. Authors of accepted papers must guarantee that their paper will be presented at the conference. For additional information please feel free to contact the Program Chair, Eliot Moss (moss@REDACTED). General Chair: Erez Petrank (Technion, Israel) Program Chair: J. Eliot B. Moss (Univ. of Mass. at Amherst) Program Committee: Vikram Adve (Univ. of Illinois at Urbana-Champaign) Richard Jones (Univ. of Kent) Hillel Kolodner (IBM Haifa Research Lab) Chandra Krintz (Univ. of California at Santa Barbara) Kathryn S McKinley (Univ. of Texas at Austin) Greg Morrisett (Harvard University) Ravi Rajwar (Intel) Yannis Smaragdakis (Georgia Tech) Guy Steele (Sun Microsystems) From jmj@REDACTED Sun Nov 27 09:19:55 2005 From: jmj@REDACTED (Jean-Marie JACQUET) Date: Sun, 27 Nov 2005 09:19:55 +0100 (MET) Subject: Coordination 2006: Second call for papers Message-ID: <200511270819.jAR8Jt703553@backus.info.fundp.ac.be> [ Our apologies for multiple copies. ] ====================================================================== Second Call for Papers COORDINATION 2006 8th International Conference on Coordination Models and Languages http://www.cs.unibo.it/discotec06/Coordination06 as part of DisCoTec'06 - Distributed Computing Techniques co-located with DAIS'06 & FMOODS'06 http://www.cs.unibo.it/discotec06 Bologna, Italy 14-16 June 2006 ====================================================================== IMPORTANT DATES * Submission of abstract: 10 January 2006 * Submission of papers: 17 January 2006 * Notification of acceptance: 7 March 2006 * Final version: 28 March 2006 * Conference: 14-16 June 2006 ====================================================================== CONFERENCE GOALS Modern information systems rely increasingly on combining concurrent, distributed, mobile, reconfigurable and heterogenous components. New models, architectures, languages, verification techniques are necessary to cope with the complexity induced by the demands of today's software development. Coordination languages have emerged as a successful approach, in that they provide abstractions that cleanly separate behavior from communication, therefore increasing modularity, simplifying reasoning, and ultimately enhancing software development. Building on the success of the previous editions, this conference provides a well-established forum for the growing community of researchers interested in models, languages, architectures, and implementation techniques for coordination. PREVIOUS EDITIONS The previous editions of COORDINATION took place in Cesena (Italy), Berlin (Germany), Amsterdam (Netherlands), Limassol (Cyprus), York (UK), Pisa (Italy) and Namur (Belgium). More details are available at http://www.coordination2005.org. TOPICS OF INTEREST They include but are not limited to: * Theoretical models and foundations for coordination: component composition, concurrency, mobility, dynamic aspects of coordination, emergent behavior. * Specification, refinement, and analysis of software architectures: patterns and styles, verification of functional and non-functional properties. * Coordination, architectural, and interface definition languages: implementation, interoperability, heterogeneity. * Multiagent systems and coordination: models, languages, infrastructures. * Dynamic software architectures: mobile code and agents, configuration, reconfiguration, self-organization. * Coordination and modern distributed computing: Web services, peer-to-peer networks, grid computing, context-awareness, ubiquitous computing. * Programming languages, middleware, tools, and environments for the development of coordinated applications * Industrial relevance of coordination and software architectures: programming in the large, domain-specific software architectures and coordination models, case studies. * Interdisciplinary aspects of coordination PROCEEDINGS Proceedings of previous editions of this conference were published by Springer, in the Lecture Notes in Computer Science (LNCS) series and are available as LNCS volumes 1061, 1282, 1594, 1906, 2315, 2949 and 3454. The intention is to continue this series. SUBMISSION INSTRUCTIONS Authors are invited to submit full papers electronically in PostScript or PDF using a two-phase online submission process. Registration of the paper information and abstract (max. 250 words) must be completed before 10 January 2006. Submission of the full paper is due no later than 17 January 2006. Further instructions on the submission procedure will be published at http://www.cs.unibo.it/discotec06/Coordination06. Submissions must be formatted according to the LNCS guidelines (see http://www.springer.de/comp/lncs/authors.html) and must not exceed 15 pages in length. Papers that are not in the requested format or significantly exceed the mandated length may be rejected without going through the review phase. Submissions should explicitly state their contribution and their relevance to the theme of the conference. Other criteria for selection will be originality, significance, correctness, and clarity. Simultaneous or similar submissions to other conferences or journals are not allowed. CONFERENCE LOCATION The conference will be hosted by the Department of Computer Science of the University of Bologna. PROGRAM COMMITTEE Co-Chairs Paolo Ciancarini University of Bologna, Italy Herbert Wiklicky Imperial College London, UK Members Farhad Arbab CWI Amsterdam, The Netherlands Antonio Brogi University of Pisa, Italy Wolfgang Emmerich University College London, UK Frank de Boer CWI & Utrecht University, The Netherlands Jean-Marie Jacquet University of Namur, Belgium Josst Kok Leiden University, The Netherlands Toby Lehman IBM Almaden, US D.C. Marinescu University of Central Florida, US Ronaldo Menezes Florida Institute of Technology, US Andrea Omicini University of Bologna, Italy Paolo Petta OeFAI, Austria Gian Pietro Picco Politecnico di Milano, Italy Ernesto Pimentel University of Malaga, Spain Rosario Pugliese University of Florence, Italy Gruia Catalin Roman Washington University, USA Robert Tolksdorf FU Berlin, Germany Emilio Tuosto University of Leicester, UK Carlos Varela Rensselaer Polytechnic Institute, US Alan Wood University of York, UK From event@REDACTED Tue Nov 22 14:38:32 2005 From: event@REDACTED (event@REDACTED) Date: Tue, 22 Nov 2005 22:38:32 +0900 (JST) Subject: CLIMA VII: First CFP Message-ID: <200511221338.BZA61261@mp.nii.ac.jp> [Apologies for cross-postings. Please send to your colleagues.] ===================== Call for Papers ===================== CLIMA VII Seventh International Workshop on Computational Logic in Multi-Agent Systems May 8,9 2006 in association with AAMAS2006 (May 8 - 12, 2006) Future University, Hakodate, Japan http://www.fun.ac.jp/aamas2006/ http://research.nii.ac.jp/climaVII/ =========================================================== Aims and scope -------------- Multi-Agent Systems are communities of problem-solving entities that can perceive and act upon their environment to achieve their individual goals as well as joint goals. The work on such systems integrates many technologies and concepts in artificial intelligence and other areas of computing as well as other disciplines. Over recent years, the agent paradigm gained popularity, due to its applicability to a full spectrum of domains, from search engines to educational aids to electronic commerce and trade, e-procurement, recommendation systems, simulation and routing, to cite only some. Computational logic provides a well-defined, general, and rigorous framework for studying syntax, semantics and procedures for various tasks by individual agents, as well as interaction amongst agents in multi-agent systems, for implementations, environments, tools, and standards, and for linking together specification and verification of properties of individual agents and multi-agent systems. The purpose of this workshop is to discuss techniques, based on computational logic, for representing, programming and reasoning about agents and multi-agent systems in a formal way. We solicit unpublished papers on agents and multi-agent systems based upon or relating to computational logic. You can find further information regarding the previous edition of CLIMA in http://clima.deis.unibo.it/ and the history of CLIMA in http://research.nii.ac.jp/climaVII/about.html. Topics ------ Relevant topics include, but are not limited to, the following: * logical foundations of (multi-)agent systems * extensions of logic programming for (multi-)agent systems * modal logic approaches to (multi-)agent systems * logic-based programming languages for (multi-)agent systems * non-monotonic reasoning in (multi-)agent systems * decision theory for (multi-)agent systems * agent and multi-agent hypothetical reasoning and learning * theory and practice of argumentation for agent reasoning and interaction * knowledge and belief representation and updates in (multi-)agent systems * operational semantics and execution agent models * model checking algorithms, tools, and applications for (multi-) agent logics * semantics of interaction and agent communication languages * distributed constraint satisfaction in multi-agent systems * temporal reasoning for (multi-)agent systems * distributed theorem proving for multi-agent systems * logic-based implementations of (multi-)agent systems * specification and verification of formal properties of (multi-) agent systems Submissions ----------- We welcome and encourage the submission of high quality, original papers, which are not simultaneously submitted for publication elsewhere. Papers should be written in English, formatted according to the Springer Verlag LNCS style, which can be obtained from http://www.springeronline.com, and not exceed 16 pages including figures, references, etc. Each paper should include *some examples* illustrating the proposed techniques. Proceedings and post-workshop publications ------------------------------------------ A printed volume of the proceedings will be available at the workshop. Authors of papers presented at the workshop will be asked to extend their contributions, possibly incorporating the results of the workshop discussion, to be included in the workshop post-proceedings, after another round of refereeing. Springer Verlag has accepted in principle to publish the post-proceedings as a volume of the Lecture Notes in Artificial Intelligence series. Important Dates --------------- - Submission Deadline: January 15, 2006 - Notification: February 19, 2006 - Camera Ready Copy Due: March 10, 2006 - CLIMA VII: May 8 and 9, 2006 Workshop Chairs --------------- Katsumi Inoue, National Institute of Informatics, Japan Ken Satoh, National Institute of Informatics, Japan Francesca Toni, Imperial College London, UK Email: clima-vii@REDACTED Programme Committee ------------------- Jose Julio Alferes, New University of Lisbon, Portugal Rafael H. Bordini, University of Durham, UK Gerhard Brewka, University of Leipzig, Germany Stefania Costantini, University of L'Aquila, Italy Juergen Dix, Technical University of Clausthal, Germany Patrick Doherty, Linkoping University, Sweden Phan Ming Dung, AIT, Thailand Thomas Eiter, Vienna University of Technology, Austria Klaus Fischer, DFKI, Germany Michael Fisher, The University of Liverpool, UK Michael Gelfond, Texas Technical University, USA James Harland, RMIT, Australia Hisashi Hayashi, Toshiba, Japan Wiebe van der Hoek, The University of Liverpool, UK Antonis Kakas, University of Cyprus, Cyprus Joao Leite, New University of Lisbon, Portugal Fangzhen Lin, Hong Kong University of Science and Technology, Hong Kong Paola Mello, University of Bologna, Italy John Jules Ch. Meyer, Utrecht University, The Netherlands Leora Morgenstern, IBM T.J. Watson Research Center, USA Naoyuki Nide, Nara Women's University, Japan Maurice Pagnucco, University of New South Wales, Australia Wojciech Penczek, Polish Academy of Sciences, Poland Enrico Pontelli, New Mexico State University, USA Fariba Sadri, Imperial College London, UK Chiaki Sakama, Wakayama University, Japan Abdul Sattar, Griffith University, Australia Hajime Sawamura, Niigata University, Japan Renate Schmidt, University of Manchester, UK Trao Can Son, New Mexico State University, USA Kostas Stathis, City University London, UK Michael Thielscher, Dresden University of Technology, Germany Satoshi Tojo, Japan Advanced Institute of Science and Technology, Japan Paolo Torroni, University of Bologna, Italy Marina de Vos, University of Bath, UK Cees Witteveen, Delft University of Technology, The Netherlands Home page of CLIMA VII: http://research.nii.ac.jp/climaVII ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From event@REDACTED Mon Nov 21 11:48:17 2005 From: event@REDACTED (event@REDACTED) Date: Mon, 21 Nov 2005 11:48:17 +0100 Subject: CfP: DALT @ AAMAS 2006 Message-ID: <4381A5F1.1020201@illc.uva.nl> ********************************************************************* 4th International Workshop on Declarative Agent Languages and Technologies (DALT 2006) 8 May 2006 Future University Hakodate, Japan (held in conjunction with AAMAS 2006) URL: http://www.illc.uva.nl/~ulle/DALT-2006/ ********************************************************************* CALL FOR PAPERS ********************************************************************* The workshop on Declarative Agent Languages and Technologies (DALT), in its fourth edition this year, is a well-established forum for researchers interested in sharing their experiences in combining declarative and formal approaches with engineering and technology aspects of agents and multiagent systems. Building complex agent systems calls for models and technologies that ensure predictability, allow for the verification of properties, and guarantee flexibility. Developing technologies that can satisfy these requirements still poses an important and difficult challenge. Here, declarative approaches have the potential of offering solutions satisfying the needs for both specifying and developing multiagent systems. Moreover, they are gaining more and more attention in important application areas such as the semantic web, web services, security, and electronic contracting. DALT 2006 will be held as a satellite workshop of AAMAS 2006, the 5th International Joint Conference on Autonomous Agents and Multiagent Systems, in May 2006 in Hakodate, Japan. Following the success of three previous editions, DALT will again aim at providing a discussion forum to both (i) support the transfer of declarative paradigms and techniques to the broader community of agent researchers and practitioners, and (ii) to bring the issue of designing complex agent systems to the attention of researchers working on declarative languages and technologies. ********************************************************************* TOPICS OF INTEREST ********************************************************************* DALT topics of interest include, but are not limited to: General themes: * specification of agents and multiagent systems * declarative approaches to engineering agent systems Formal techniques: * modal and epistemic logics for agent modelling * model checking agents and multiagent systems * (constraint) logic programming approaches to agent systems * distributed constraint satisfaction Declarative models: * declarative models of agent beliefs and capabilities * declarative models of bounded rationality * declarative paradigms for the combination of heterogeneous agents * electronic institutions Applications: * agents and the semantic web * service-oriented multiagent systems * agent communication and coordination languages * protocol specification and conformance checking * declarative description of contracts and negotiation policies * security in multiagent systems Evaluation of declarative approaches: * experimental analysis of declarative agent technologies * industrial experiences with declarative agent technologies ********************************************************************* SUBMISSION INSTRUCTIONS ********************************************************************* We welcome and encourage the submission of high-quality, original papers, which are not being submitted simultaneously for publication elsewhere. Papers should be written in English, formatted according to the Springer LNCS style, and not exceed 16 pages. Paper submission is electronic via the conference website. ********************************************************************* WORKSHOP PROCEEDINGS ********************************************************************* Printed copies of the proceedings will be available at the workshop. Assuming a sufficient number of high-quality submissions, we are again going to consider the publication of formal post-proceedings with an international publisher. The post-proceedings of DALT 2003 (LNAI 2990) and DALT 2004 (LNAI 3476) have been published by Springer-Verlag in the Lecture Notes in Artificial Intelligence series; the post-proceedings of DALT 2005 are due to appear in 2006, also published by Springer-Verlag. ********************************************************************* IMPORTANT DATES ********************************************************************* * Paper submission deadline: 15 January 2006 * Notification of authors: 19 February 2006 * Final versions due: 8 March 2006 * Workshop: 8 May 2006 ********************************************************************* PROGRAMME COMMITTEE ********************************************************************* * Marco Alberti (University of Ferrara, Italy) * Natasha Alechina (University of Nottingham, UK) * Grigoris Antoniou (University of Crete, Greece) * Matteo Baldoni (University of Torino, Italy) -- co-chair * Cristina Baroglio (University of Torino, Italy) * Rafael Bordini (University of Durham, UK) * Keith Clark (Imperial College London, UK) * Ulle Endriss (University of Amsterdam, NL) -- co-chair * Benjamin Hirsch (Technical University Berlin, Germany) * Shinichi Honiden (National Institute of Informatics, Japan) * John Lloyd (Australian National University, Australia) * Viviana Mascardi (University of Genova, Italy) * John-Jules Meyer (University of Utrecht, NL) * Enrico Pontelli (New Mexico State University, USA) * Birna van Riemsdijk (University of Utrecht, NL) * Chiaki Sakama (Wakayama University, Japan) * Wamberto Vasconcelos (University of Aberdeen, UK) * Christopher Walton (University of Edinburgh, UK) * Michael Winikoff (RMIT University, Australia) ********************************************************************* -- Ulle Endriss http://www.illc.uva.nl/~ulle/ Institute for Logic, Language & Computation (ILLC) University of Amsterdam Tel: +31 (0)20 525 6511 Plantage Muidergracht 24 Fax: +31 (0)20 525 5206 1018 TV Amsterdam (NL) Email: ulle@REDACTED ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From ingela@REDACTED Mon Nov 28 12:15:32 2005 From: ingela@REDACTED (Ingela Anderton) Date: Mon, 28 Nov 2005 12:15:32 +0100 Subject: Regarding the inets HTTP client Message-ID: <17290.59092.715577.180975@gargle.gargle.HOWL> I was browsing the archives (currently I do not read erlang questions on daily basis as I am on parental leave) when I came across some comments about the inets HTTP client and problems with chunked encoding. As there was no answer from my coworkers here is an answer. The inets HTTP client is designed to handle chunked encoding. If this is not working that is a bug and if that is the case of course it will be fixed. When it comes to the stability or maturity of the code I think it has come a far way from the initial unsupported prototype that it is based on, but it is not bug free. (On the other hand can you mention a software program that is ;-)) Building extensive automated test suites for the HTTP client is quite a lot of work and an ongoing activity. So the code will mature further with time. It is as always a question of time an priorities. In Ericsson the HTTP client has so far mainly been used too test other software. -- /Ingela - OTP team From sebastian@REDACTED Mon Nov 28 13:39:08 2005 From: sebastian@REDACTED (Sebastian Bello) Date: Mon, 28 Nov 2005 10:39:08 -0200 Subject: Deleting a large number of records from a mensia table Message-ID: <01f901c5f418$baebdfa0$dc00a8c0@INSWITCH244> Hi all, how can I delete a large number of mnesia records -which match a certain criteria- without having to select them (to avoid a big memory copy of them)? Thanks, Sebastian- PS: excuse me if this question has already been asked/answered Prepaid Expertise - Programmable Switches Powered by Ericsson Licensed Technology Sebasti?n Bello - Engineer - Development Center - IN Switch Solutions Inc. Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0 4 93655773 / emea@REDACTED IN SWITCH ASIA Phone: +92 51 2800397/8- Fax: +92 51 2800399/ inswasia@REDACTED e-mail: sebastian@REDACTED -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1429 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: logoparafondo.gif Type: image/gif Size: 16886 bytes Desc: not available URL: From sebastian@REDACTED Mon Nov 28 13:42:26 2005 From: sebastian@REDACTED (Sebastian Bello) Date: Mon, 28 Nov 2005 10:42:26 -0200 Subject: Mnesia Questions References: <002301c5f3e8$5601d4d0$64020a0a@FEY> <17290.48974.668426.353927@gargle.gargle.HOWL> Message-ID: <021801c5f419$6071fd10$dc00a8c0@INSWITCH244> Regarding point 3, does 'mnesia:load_textfile' support csv files? Sebastian- ----- Original Message ----- From: To: Sent: Monday, November 28, 2005 6:26 AM Subject: Re: Mnesia Questions > > ["Alex Peake" :] > > 4) How do I best join two large tables (and get a subset)? > > QLC doesn't yet support fast join of tables. As far as I know > Mnemosyne doesn't either. > > See also > http://www.erlang.org/ml-archive/erlang-questions/200502/msg00278.html > > Best regards > Hans Bolinder, Erlang/OTP From sebastian@REDACTED Mon Nov 28 13:43:44 2005 From: sebastian@REDACTED (Sebastian Bello) Date: Mon, 28 Nov 2005 10:43:44 -0200 Subject: Mnesia Questions References: <002301c5f3e8$5601d4d0$64020a0a@FEY> Message-ID: <021901c5f419$629b1ea0$dc00a8c0@INSWITCH244> Regarding point 3, does 'mnesia:load_textfile' support csv files? Sebastian- ----- Original Message ----- From: "Alex Peake" To: Sent: Monday, November 28, 2005 4:52 AM Subject: Mnesia Questions > 1) I set up person as a ram_copies table. I did a > mnesia:dump_tables([person]). Then I tried mnesia:change_table_copy_type to > get to disc_copies and got an error saying "Table dump exists". How do I > change this table to disc_copies? > > 2) Can I move the dump of person to another machine by copying the file > person.dcd? > > 3) What is a good way to load a text (csv) file into a table? I tried > mnesia:load_textfile and it is quite slow. > > 4) How do I best join two large tables (and get a subset)? I tried: > > non_english_g3_join() -> > F = fun() -> > Q = qlc:q([{P#persondata.f2, P#persondata.f1, R#person.pkey} > || P <- mnesia:table(persondata), > R <- mnesia:table(person), > P#persondata.personid == R#person.id, > P#persondata.f8 == "03" orelse > P#persondata.f8 == "02", P#persondata.f3 /= "English"]), > qlc:e(Q) > end, > mnesia:transaction(F). > > And it went off in the weeds (at least for 45 minutes, when I quit waiting). > > I also tried: > > sample_join() -> > Q = query > [ {P#persondata.f2, P#persondata.f1} || > P <- table(persondata), > R <- table(person), > P#persondata.personid = R#person.id, > P#persondata.f8 = "03", > P#persondata.f3 /= "English" > ] > end, > F = fun() -> mnemosyne:eval(Q) end, > mnesia:transaction(F). > > > And got: > > =ERROR REPORT==== 27-Nov-2005::22:32:35 === > Error in process <0.478.0> with exit value: > {{nocatch,{'EXIT',mnemosyne_not_runn > ing}},[{mnemosyne_lc,the_query,1},{person,sample_join,0},{erl_eval,do_apply, > 5},{ > shell,exprs,6},{shell,eval_loop,3}]} > > ** exited: {{nocatch,{'EXIT',mnemosyne_not_running}}, > [{mnemosyne_lc,the_query,1}, > {person,sample_join,0}, > {erl_eval,do_apply,5}, > {shell,exprs,6}, > {shell,eval_loop,3}]} ** > > > Yet: > > sample_mq() -> > Q = query > [ {P#persondata.f2, P#persondata.f1} || > P <- table(persondata), > P#persondata.f8 = "03", > P#persondata.f3 /= "English" > ] > end, > F = fun() -> mnemosyne:eval(Q) end, > mnesia:transaction(F). > > works. > > > From ulf.wiger@REDACTED Mon Nov 28 14:13:05 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 28 Nov 2005 14:13:05 +0100 Subject: Mnesia Questions Message-ID: mnesia:load_textfile() supports only its own format, that is, whatever is produced by dump_to_textfile(). 'rdbms' has a data import tool, where you can plug in different file formats. Currently, a tab-delimited text format a la mail merge is supported. CSV would not be difficult to add. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of > Sebastian Bello > Sent: den 28 november 2005 13:44 > To: erlang-questions@REDACTED > Subject: Re: Mnesia Questions > > Regarding point 3, does 'mnesia:load_textfile' support csv files? > Sebastian- > > ----- Original Message ----- > From: "Alex Peake" > To: > Sent: Monday, November 28, 2005 4:52 AM > Subject: Mnesia Questions > > > > 1) I set up person as a ram_copies table. I did a > > mnesia:dump_tables([person]). Then I tried > > mnesia:change_table_copy_type > to > > get to disc_copies and got an error saying "Table dump > exists". How do > > I change this table to disc_copies? > > > > 2) Can I move the dump of person to another machine by copying the > > file person.dcd? > > > > 3) What is a good way to load a text (csv) file into a > table? I tried > > mnesia:load_textfile and it is quite slow. > > > > 4) How do I best join two large tables (and get a subset)? I tried: > > > > non_english_g3_join() -> > > F = fun() -> > > Q = qlc:q([{P#persondata.f2, P#persondata.f1, > R#person.pkey} > > || P <- mnesia:table(persondata), > > R <- > > mnesia:table(person), P#persondata.personid == R#person.id, > > P#persondata.f8 == "03" > orelse > > P#persondata.f8 == "02", P#persondata.f3 /= "English"]), > > qlc:e(Q) > > end, > > mnesia:transaction(F). > > > > And it went off in the weeds (at least for 45 minutes, when I quit > waiting). > > > > I also tried: > > > > sample_join() -> > > Q = query > > [ {P#persondata.f2, P#persondata.f1} || > > P <- table(persondata), > > R <- table(person), > > P#persondata.personid = R#person.id, > > P#persondata.f8 = "03", > > P#persondata.f3 /= "English" > > ] > > end, > > F = fun() -> mnemosyne:eval(Q) end, > > mnesia:transaction(F). > > > > > > And got: > > > > =ERROR REPORT==== 27-Nov-2005::22:32:35 === Error in > process <0.478.0> > > with exit value: > > {{nocatch,{'EXIT',mnemosyne_not_runn > > > ing}},[{mnemosyne_lc,the_query,1},{person,sample_join,0},{erl_ > eval,do_apply, > > 5},{ > > shell,exprs,6},{shell,eval_loop,3}]} > > > > ** exited: {{nocatch,{'EXIT',mnemosyne_not_running}}, > > [{mnemosyne_lc,the_query,1}, > > {person,sample_join,0}, > > {erl_eval,do_apply,5}, > > {shell,exprs,6}, > > {shell,eval_loop,3}]} ** > > > > > > Yet: > > > > sample_mq() -> > > Q = query > > [ {P#persondata.f2, P#persondata.f1} || > > P <- table(persondata), > > P#persondata.f8 = "03", > > P#persondata.f3 /= "English" > > ] > > end, > > F = fun() -> mnemosyne:eval(Q) end, > > mnesia:transaction(F). > > > > works. > > > > > > > > From sebastian@REDACTED Mon Nov 28 14:15:05 2005 From: sebastian@REDACTED (Sebastian Bello) Date: Mon, 28 Nov 2005 11:15:05 -0200 Subject: Mnesia Questions References: Message-ID: <028e01c5f41d$c0933930$dc00a8c0@INSWITCH244> Great, thanks. Sebastian- ----- Original Message ----- From: "Ulf Wiger (AL/EAB)" To: "Sebastian Bello" ; Sent: Monday, November 28, 2005 11:13 AM Subject: RE: Mnesia Questions mnesia:load_textfile() supports only its own format, that is, whatever is produced by dump_to_textfile(). 'rdbms' has a data import tool, where you can plug in different file formats. Currently, a tab-delimited text format a la mail merge is supported. CSV would not be difficult to add. /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of > Sebastian Bello > Sent: den 28 november 2005 13:44 > To: erlang-questions@REDACTED > Subject: Re: Mnesia Questions > > Regarding point 3, does 'mnesia:load_textfile' support csv files? > Sebastian- > > ----- Original Message ----- > From: "Alex Peake" > To: > Sent: Monday, November 28, 2005 4:52 AM > Subject: Mnesia Questions > > > > 1) I set up person as a ram_copies table. I did a > > mnesia:dump_tables([person]). Then I tried > > mnesia:change_table_copy_type > to > > get to disc_copies and got an error saying "Table dump > exists". How do > > I change this table to disc_copies? > > > > 2) Can I move the dump of person to another machine by copying the > > file person.dcd? > > > > 3) What is a good way to load a text (csv) file into a > table? I tried > > mnesia:load_textfile and it is quite slow. > > > > 4) How do I best join two large tables (and get a subset)? I tried: > > > > non_english_g3_join() -> > > F = fun() -> > > Q = qlc:q([{P#persondata.f2, P#persondata.f1, > R#person.pkey} > > || P <- mnesia:table(persondata), > > R <- > > mnesia:table(person), P#persondata.personid == R#person.id, > > P#persondata.f8 == "03" > orelse > > P#persondata.f8 == "02", P#persondata.f3 /= "English"]), > > qlc:e(Q) > > end, > > mnesia:transaction(F). > > > > And it went off in the weeds (at least for 45 minutes, when I quit > waiting). > > > > I also tried: > > > > sample_join() -> > > Q = query > > [ {P#persondata.f2, P#persondata.f1} || > > P <- table(persondata), > > R <- table(person), > > P#persondata.personid = R#person.id, > > P#persondata.f8 = "03", > > P#persondata.f3 /= "English" > > ] > > end, > > F = fun() -> mnemosyne:eval(Q) end, > > mnesia:transaction(F). > > > > > > And got: > > > > =ERROR REPORT==== 27-Nov-2005::22:32:35 === Error in > process <0.478.0> > > with exit value: > > {{nocatch,{'EXIT',mnemosyne_not_runn > > > ing}},[{mnemosyne_lc,the_query,1},{person,sample_join,0},{erl_ > eval,do_apply, > > 5},{ > > shell,exprs,6},{shell,eval_loop,3}]} > > > > ** exited: {{nocatch,{'EXIT',mnemosyne_not_running}}, > > [{mnemosyne_lc,the_query,1}, > > {person,sample_join,0}, > > {erl_eval,do_apply,5}, > > {shell,exprs,6}, > > {shell,eval_loop,3}]} ** > > > > > > Yet: > > > > sample_mq() -> > > Q = query > > [ {P#persondata.f2, P#persondata.f1} || > > P <- table(persondata), > > P#persondata.f8 = "03", > > P#persondata.f3 /= "English" > > ] > > end, > > F = fun() -> mnemosyne:eval(Q) end, > > mnesia:transaction(F). > > > > works. > > > > > > > > From sean.hinde@REDACTED Mon Nov 28 14:24:33 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Mon, 28 Nov 2005 13:24:33 +0000 Subject: Deleting a large number of records from a mensia table In-Reply-To: <01f901c5f418$baebdfa0$dc00a8c0@INSWITCH244> References: <01f901c5f418$baebdfa0$dc00a8c0@INSWITCH244> Message-ID: <3E48938D-CCBC-4E4F-8C35-018D027A03CA@gmail.com> Hi, You can't. ets has the select_delete mechanism, but mnesia does not export this to its own API. Sean On 28 Nov 2005, at 12:39, Sebastian Bello wrote: > Hi all, > > how can I delete a large number of mnesia records -which match a > certain criteria- without having to select them (to avoid a big > memory copy of them)? > Thanks, > Sebastian- > > PS: excuse me if this question has already been asked/answered > > <01f301c5f418$b9fd60f0$dc00a8c0> > Prepaid Expertise - Programmable Switches > Powered by Ericsson Licensed Technology > Sebasti?n Bello - Engineer - Development Center - IN Switch > Solutions Inc. > Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 > Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 > IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0 4 93655773 / > emea@REDACTED > IN SWITCH ASIA Phone: +92 51 2800397/8- Fax: +92 51 2800399/ > inswasia@REDACTED > e-mail: sebastian@REDACTED > > From ulf.wiger@REDACTED Mon Nov 28 14:02:08 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 28 Nov 2005 14:02:08 +0100 Subject: geometric memory growth Message-ID: Thomas Lindgren wrote: > > > and > > semantically, the access _has_ to be done at the binding > occurrence - if it is delayed, one has to lug the entire > record along to make sure that the record field access > has the same result as it would have had at the binding > occurrence. > > I would say that semantically this evaluation MUST NOT be > done at the binding occurrence, IF we can observe a > functional difference compared to the original program > evaluated naively. In the case of a record access (assuming that a guard test or other exists that asserts that it is in fact a record), you can't observe a functional difference in this case. I guess it all boils down to how we want to view record field access. (One could imagine that the compiler would warn about cases where record field access is used on something that isn't known to be a record. Of course, there could be other, similar cases where the programmer simply doesn't realise that by being more specific, the compiler is given more opportunities to make the code efficient.) Of course, the really naiive apporach to binding the fun's environment would be to include _all_ bound variables every time. > You have told the compiler that the > program shall behave AS IF the evaluation occurs inside the > closure; changing program behaviour is usually considered > bad form. So if I wrote: f() -> X = 5, fun() -> X + 5 end. it would be bad form to reduce to. f() -> fun() -> 10 end. Exercise for the reader: compile such code with the -S flag and see what comes out. (: (Hint: '+' essentially compiles down to a call to erlang:'+'/2) Now change to X = foo, and see what happens(*) Apparently, it's OK to do such constant propagation in some cases, but not in others. That's fine, I don't question that. The question is: where do you draw the line? > For plain record accesses: assuming safeness, the compiler > basically has to consider the following trade off for > profitability: if we extract N fields from the record State, > when is the cost of creating a closure with (N-1) more free > variables less expensive than performing the accesses every > time the closure is used? How many times is the closure used? Of course, the compiler can consider none of those, since it has no way of knowing. It can of course guess... If it guessed in my case, it was completely off base. > The compiler usually resorts to heuristics at this point. For > a production compiler, the idea is usually to avoid making > the rare but spectacularly bad decisions :-) And in this particular case, importing the whole record was a spectacularly bad decision (whether it was mine or the compilers.) /Uffe (*) For those without a working erlang compiler, here's the answer: 1) In the first case, the compiler optimizes away the addition, and simply replaces it with a constant in the fun. 2) In the second case, the compiler warns that the expression would cause a badarith exception in runtime, and promptly inserts a call to erlang:error/1 in the fun, rather than calling the erlang:'+'/2 function with bad arguments. BTW, if you do the same thing with an obviously bad record field access, the compiler does likewise: warns that it's going to crash, and replaces the record field access with a call to erlang:error/1. From mikpe@REDACTED Mon Nov 28 14:37:39 2005 From: mikpe@REDACTED (Mikael Pettersson) Date: Mon, 28 Nov 2005 14:37:39 +0100 Subject: choice of gcc version for Erlang on ARM/XScale/PXA Message-ID: <17291.2083.605084.227724@alkaid.it.uu.se> Could those that have built Erlang for ARM/XScale/PXA machines please report exactly which gcc versions they have been using, including what ARM patches if any they applied to gcc? I've begun working on HiPE for ARM/XScale, and I've found that only gcc-3.3.6 (+ several ARM patches) and gcc-4.0.2 work correctly: gcc-3.4.4 miscompiles the runtime system, specifically the I_lshift() procedure in big.c, which throws the Erlang compiler into an endless CPU and memory consuming loop when compiling e.g. auth.erl or prim_inet.erl. My guess is that if any of you used gcc-3.4.4, then you either cross-compiled or applied corrective patches to gcc first. /Mikael From tty@REDACTED Mon Nov 28 15:08:47 2005 From: tty@REDACTED (tty@REDACTED) Date: Mon, 28 Nov 2005 09:08:47 -0500 Subject: Processing Large Mnesia dbase Message-ID: Hello, I have a largish Mnesia table which I need to evaluate each record. What is the typical method for working with each record ? I did a dirty_read for each record and spawn a process for each. I manage to drop the time needed for the processing by spawning processes on 3 nodes. However it still took too long for my needs. Would it be quicker to do a QLC call over a small range of records instead ? Thanks in advance Tee From pascal.brisset@REDACTED Mon Nov 28 15:35:36 2005 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Mon, 28 Nov 2005 15:35:36 +0100 Subject: choice of gcc version for Erlang on ARM/XScale/PXA In-Reply-To: <17291.2083.605084.227724@alkaid.it.uu.se> References: <17291.2083.605084.227724@alkaid.it.uu.se> Message-ID: <20051128143518.7FFDA17347F@postfix3-1.free.fr> > Could those that have built Erlang for ARM/XScale/PXA > machines please report exactly which gcc versions they > have been using, including what ARM patches if any they > applied to gcc? 3.4.2 with these patches: http://svn.gumstix.com/gumstix-buildroot/trunk/sources/gcc/3.4.2/ It successfully compiles the ARM linux kernel, modules, libraries and command-line utilities as well. -- Pascal From alex.peake@REDACTED Mon Nov 28 18:20:02 2005 From: alex.peake@REDACTED (Alex Peake) Date: Mon, 28 Nov 2005 09:20:02 -0800 Subject: More Mnesia Questions References: Message-ID: <000901c5f43f$faff9ce0$64020a0a@FEY> I am experimenting further with Mnesia. I started Mnesia with a Dump available (person.dcd and persondata.dcd). All was well. Then I tried mnesia:stop(). I exited the werl shell, started it up again and got the following: 1> mnesia:start(). =ERROR REPORT==== 28-Nov-2005::09:09:24 === Mnesia(nonode@REDACTED): ** ERROR ** (core dumped to file: "c:/Prog/Erlang/bin/Mne siaCore.nonode@REDACTED") ** FATAL ** mnesia_tm crashed: {undef, [{mnesia_lib, dat_to_ets, [schema, schema, "c:/Dev/Wbs.Company/schema.DAT", set, true, no]}, {mnesia_schema,do_read_disc_schema,2}, {mnesia_schema,read_schema,3}, {mnesia_schema,init,1}, {mnesia_tm,init,1}, {mnesia_sp,init_proc,4}, {proc_lib,init_p,5}]} state: [<0.38.0>] =ERROR REPORT==== 28-Nov-2005::09:09:34 === ** Generic server mnesia_monitor terminating ** Last message in was {'EXIT',<0.38.0>,killed} ** When Server state == {state,<0.38.0>,[],[],false,[],undefined,[]} ** Reason for termination == ** killed =ERROR REPORT==== 28-Nov-2005::09:09:34 === ** Generic server mnesia_recover terminating ** Last message in was {'EXIT',<0.38.0>,killed} ** When Server state == {state,<0.38.0>, undefined, undefined, undefined, 0, false, []} ** Reason for termination == ** killed =ERROR REPORT==== 28-Nov-2005::09:09:34 === Mnesia(nonode@REDACTED): ** ERROR ** mnesia_event got unexpected event: {'EXIT', <0.40. 0>, killed } {error,{killed,{mnesia_sup,start,[normal,[]]}}} =INFO REPORT==== 28-Nov-2005::09:09:34 === application: mnesia exited: {killed,{mnesia_sup,start,[normal,[]]}} type: temporary What did I do wrong? How can I recover? Thanks, Alex From erlang@REDACTED Mon Nov 28 18:36:25 2005 From: erlang@REDACTED (Michael McDaniel) Date: Mon, 28 Nov 2005 09:36:25 -0800 Subject: Regarding the inets HTTP client In-Reply-To: <17290.59092.715577.180975@gargle.gargle.HOWL> References: <17290.59092.715577.180975@gargle.gargle.HOWL> Message-ID: <20051128173625.GQ3157@delora.autosys.us> On Mon, Nov 28, 2005 at 12:15:32PM +0100, Ingela Anderton wrote: > > I was browsing the archives (currently I do not read erlang questions > on daily basis as I am on parental leave) when I came across some ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Thanks for your response, Ingela, and Congratulations! ~M > comments about the inets HTTP client and problems with chunked > encoding. As there was no answer from my coworkers here is an answer. > > The inets HTTP client is designed to handle chunked encoding. If this > is not working that is a bug and if that is the case of course it will > be fixed. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I will assist as I can. I looked through the code and discovered I do not yet have enough Erlang comprehension to understand what is the solution! I trusted it would be fixed in time. I was surprised there was not an acknowledgement earlier, though I thought "oh, they'll put it in the next release which should be 'real soon now'". ~M > > When it comes to the stability or maturity of the code I think it has > come a far way from the initial unsupported prototype that it is based > on, but it is not bug free. (On the other hand can you mention a ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definitely, even in the short time I have been using Erlang the code has matured and stabliized! ~M > software program that is ;-)) Building extensive automated test suites > for the HTTP client is quite a lot of work and an ongoing activity. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ As I discovered. The company I interfaced with did not have any certification tests to exercise multi-chunked requests/responses. My testing did not uncover the problem. And, my code was in production for months before the problem appeared! ~M > So the code will mature further with time. It is as always a question > of time an priorities. In Ericsson the HTTP client has so far mainly > been used too test other software. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Thanks again to all of you for Erlang/OTP and your continued interest in keeping it a strong competitive tool for creating innovative services for the world! I look forward to a patch or new R10/R11 release 'real soon now' ~Michael Portland, Oregon, USA > > -- > /Ingela - OTP team > > > > > > -- Michael McDaniel Portland, Oregon, USA http://autosys.us +1 503 283 5284 From valentin@REDACTED Mon Nov 28 18:48:40 2005 From: valentin@REDACTED (Valentin Micic) Date: Mon, 28 Nov 2005 19:48:40 +0200 Subject: Deleting a large number of records from a mensia table References: <01f901c5f418$baebdfa0$dc00a8c0@INSWITCH244> <3E48938D-CCBC-4E4F-8C35-018D027A03CA@gmail.com> Message-ID: <00fc01c5f443$f8130770$7309fea9@MONEYMAKER2> How about mnesia:activity with ets access context? Would it be possible to access select_delete mechanism then? V. ----- Original Message ----- From: "Sean Hinde" To: "Sebastian Bello" Cc: Sent: Monday, November 28, 2005 3:24 PM Subject: Re: Deleting a large number of records from a mensia table Hi, You can't. ets has the select_delete mechanism, but mnesia does not export this to its own API. Sean On 28 Nov 2005, at 12:39, Sebastian Bello wrote: > Hi all, > > how can I delete a large number of mnesia records -which match a certain > criteria- without having to select them (to avoid a big memory copy of > them)? > Thanks, > Sebastian- > > PS: excuse me if this question has already been asked/answered > > <01f301c5f418$b9fd60f0$dc00a8c0> > Prepaid Expertise - Programmable Switches > Powered by Ericsson Licensed Technology > Sebasti?n Bello - Engineer - Development Center - IN Switch Solutions > Inc. > Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 > Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 > IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0 4 93655773 / > emea@REDACTED > IN SWITCH ASIA Phone: +92 51 2800397/8- Fax: +92 51 2800399/ > inswasia@REDACTED > e-mail: sebastian@REDACTED > > From marthin@REDACTED Mon Nov 28 18:59:37 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Mon, 28 Nov 2005 19:59:37 +0200 Subject: choice of gcc version for Erlang on ARM/XScale/PXA In-Reply-To: <17291.2083.605084.227724@alkaid.it.uu.se> Message-ID: <001b01c5f445$8344eba0$4800a8c0@studioa> The environment I used for compiling erlang for Gumstix PXA255) states gcc version 3.4.2. But I'm afraid I didn't put together the cross-compiling environment myself but inherited it from the gumstix provided buildroot environment, so I'm blissfully unaware of any patches applied. I'm new to both cross-compiling and building Erlang, but will try to answer your questions if you tell me where to look for what. /Martihn > -----Original Message----- > From: owner-erlang-questions@REDACTED [mailto:owner-erlang- > questions@REDACTED] On Behalf Of Mikael Pettersson > Sent: 28 November 2005 15:38 > To: erlang-questions@REDACTED > Subject: choice of gcc version for Erlang on ARM/XScale/PXA > > Could those that have built Erlang for ARM/XScale/PXA > machines please report exactly which gcc versions they > have been using, including what ARM patches if any they > applied to gcc? > > I've begun working on HiPE for ARM/XScale, and I've found > that only gcc-3.3.6 (+ several ARM patches) and gcc-4.0.2 > work correctly: gcc-3.4.4 miscompiles the runtime system, > specifically the I_lshift() procedure in big.c, which > throws the Erlang compiler into an endless CPU and memory > consuming loop when compiling e.g. auth.erl or prim_inet.erl. > > My guess is that if any of you used gcc-3.4.4, then you > either cross-compiled or applied corrective patches to gcc first. > > /Mikael From marthin@REDACTED Mon Nov 28 19:07:51 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Mon, 28 Nov 2005 20:07:51 +0200 Subject: choice of gcc version for Erlang on ARM/XScale/PXA In-Reply-To: <20051128143518.7FFDA17347F@postfix3-1.free.fr> Message-ID: <001c01c5f446$a993a200$4800a8c0@studioa> BTW Pascal, I meant to give you feedback about the binaries you offered for the gumstix: Thanks a million for that - it was very nice to see Erlang running, but I couldn't keep using it since anything doing a floating point operation was going wrong (without any errors reported). It came right when I manage to get Erlang built with a floating point emulation option that was consistent with how the OS and libraries are built. Maybe someone can guide us through how to type-approve Erlang, in particular a subset of Erlang since I trimmed it way down for the gumxtix. /Marthin > -----Original Message----- > From: owner-erlang-questions@REDACTED [mailto:owner-erlang- > questions@REDACTED] On Behalf Of Pascal Brisset > Sent: 28 November 2005 16:36 > To: Mikael Pettersson > Cc: erlang-questions@REDACTED > Subject: Re: choice of gcc version for Erlang on ARM/XScale/PXA > > > Could those that have built Erlang for ARM/XScale/PXA > > machines please report exactly which gcc versions they > > have been using, including what ARM patches if any they > > applied to gcc? > > 3.4.2 with these patches: > http://svn.gumstix.com/gumstix-buildroot/trunk/sources/gcc/3.4.2/ > > It successfully compiles the ARM linux kernel, modules, libraries > and command-line utilities as well. > > -- Pascal > From alex.peake@REDACTED Mon Nov 28 19:41:14 2005 From: alex.peake@REDACTED (Alex Peake) Date: Mon, 28 Nov 2005 10:41:14 -0800 Subject: More Mnesia Questions References: <000901c5f43f$faff9ce0$64020a0a@FEY> Message-ID: <000601c5f44b$533d2d90$64020a0a@FEY> Unexpected resolution -- I had had put rdbms-1.3 under erlang/lib I moved it to erlang/usr/lib and things are back to working again. No longer urgent, but does anyone understand why? Alex ----- Original Message ----- From: "Alex Peake" To: Sent: Monday, November 28, 2005 9:20 AM Subject: More Mnesia Questions > I am experimenting further with Mnesia. > > I started Mnesia with a Dump available (person.dcd and persondata.dcd). All > was well. > > Then I tried mnesia:stop(). I exited the werl shell, started it up again and > got the following: > > 1> mnesia:start(). > > =ERROR REPORT==== 28-Nov-2005::09:09:24 === > Mnesia(nonode@REDACTED): ** ERROR ** (core dumped to file: > "c:/Prog/Erlang/bin/Mne > siaCore.nonode@REDACTED") > ** FATAL ** mnesia_tm crashed: {undef, > [{mnesia_lib, > dat_to_ets, > [schema, > schema, > "c:/Dev/Wbs.Company/schema.DAT", > set, > true, > no]}, > {mnesia_schema,do_read_disc_schema,2}, > {mnesia_schema,read_schema,3}, > {mnesia_schema,init,1}, > {mnesia_tm,init,1}, > {mnesia_sp,init_proc,4}, > {proc_lib,init_p,5}]} state: [<0.38.0>] > > =ERROR REPORT==== 28-Nov-2005::09:09:34 === > ** Generic server mnesia_monitor terminating > ** Last message in was {'EXIT',<0.38.0>,killed} > ** When Server state == {state,<0.38.0>,[],[],false,[],undefined,[]} > ** Reason for termination == > ** killed > > =ERROR REPORT==== 28-Nov-2005::09:09:34 === > ** Generic server mnesia_recover terminating > ** Last message in was {'EXIT',<0.38.0>,killed} > ** When Server state == {state,<0.38.0>, > undefined, > undefined, > undefined, > 0, > false, > []} > ** Reason for termination == > ** killed > > =ERROR REPORT==== 28-Nov-2005::09:09:34 === > Mnesia(nonode@REDACTED): ** ERROR ** mnesia_event got unexpected event: > {'EXIT', > > <0.40. > 0>, > > killed > } > {error,{killed,{mnesia_sup,start,[normal,[]]}}} > =INFO REPORT==== 28-Nov-2005::09:09:34 === > application: mnesia > exited: {killed,{mnesia_sup,start,[normal,[]]}} > type: temporary > > > > What did I do wrong? > > How can I recover? > > Thanks, > > Alex > From ulf@REDACTED Mon Nov 28 22:08:14 2005 From: ulf@REDACTED (Ulf Wiger) Date: Mon, 28 Nov 2005 22:08:14 +0100 Subject: More Mnesia Questions In-Reply-To: <000601c5f44b$533d2d90$64020a0a@FEY> References: <000901c5f43f$faff9ce0$64020a0a@FEY> <000601c5f44b$533d2d90$64020a0a@FEY> Message-ID: Den 2005-11-28 19:41:14 skrev Alex Peake : > Unexpected resolution -- > > I had had put rdbms-1.3 under erlang/lib > > I moved it to erlang/usr/lib and things are back to working again. > > No longer urgent, but does anyone understand why? > > Alex Don't know if the error has anything to do with rdbms, but rdbms-1.3 is about two years old. Why aren't you using 1.5? /Uffe -- Ulf Wiger From neumann@REDACTED Tue Nov 29 00:29:38 2005 From: neumann@REDACTED (=?iso-8859-1?q?Fran=E7ois-Denis_Gonthier?=) Date: Mon, 28 Nov 2005 18:29:38 -0500 Subject: Attention Debian & Ubuntu users - Erlang 10.b.8-2 available! Message-ID: <200511281829.40228.neumann@lostwebsite.net> Hello erlang-questions, after quite a bit of struggling over the weekend, I finally managed to build version 2 of my improved Erlang packages for Debian & Ubuntu. You can get the packages at: http://neutronic.mine.nu/unstable or through apt by adding: deb http://neutronic.mine.nu/ unstable/ deb-src http://neutronic.mine.nu/ unstable/ to /etc/apt/sources.list and do: apt-get install -t . erlang, to upgrade from 10.b.7-1 The package you will get are: erlang-mode, the emacs mode alone erlang-base, architecture dependent files erlang-base-hipe, HiPE enabled architecture dependent files erlang-nox, X11 independant applications erlang-x11, applications that uses GS and thus X11 erlang-src, source files for the system (*.erl, *.hrl) If you want to install anew, you'll only have too choose between the mutually exclusive erlang-base and erlang-base-hipe and choose amongst the other package to suit your needs. (You probably need erlang-nox at least). The Ubuntu-friendly packages are at: http://neutronic.mine.nu/ubuntu-breezy. This is not a apt repository (yet), so please download and install version 2 manually through dpkg. I'll try to push this package through the main Debian archives ASAP. I'll try to see if I can package the Vim Erlang mode and ESense before christmas. Both should be easy. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From hal@REDACTED Tue Nov 29 01:18:50 2005 From: hal@REDACTED (Hal Snyder) Date: Mon, 28 Nov 2005 18:18:50 -0600 Subject: regexp:(g)sub buglet? Message-ID: <877jas71cl.fsf@ghidra.vail> (on freebsd 4-8) Third result doesn't look right to me; sub and gsub act the same. /usr/foo/otp/otp_src_R10B-7>bin/erl Erlang (BEAM) emulator version 5.4.9 [source] Eshell V5.4.9 (abort with ^G) 1> regexp:gsub("foo","o$","Z"). {ok,"foZ",1} 2> regexp:gsub("foo","^","Z"). {ok,"Zfoo",1} 3> regexp:gsub("foo","$","Z"). {ok,"foo",0} From chris@REDACTED Tue Nov 29 01:39:41 2005 From: chris@REDACTED (Christophe Romain) Date: Tue, 29 Nov 2005 01:39:41 +0100 Subject: choice of gcc version for Erlang on ARM/XScale/PXA In-Reply-To: <17291.2083.605084.227724@alkaid.it.uu.se> References: <17291.2083.605084.227724@alkaid.it.uu.se> Message-ID: after spending few hours trying to cross-compile with gcc 3.4 i finally gave up. for the Zaurus platform i simply used gcc 2.95 that can be found here http://s91215199.onlinehome.us/zaurus/ as erlang is not coded in c++, gcc 2.95 just works perfectly. From bengt.kleberg@REDACTED Tue Nov 29 09:56:24 2005 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 29 Nov 2005 09:56:24 +0100 Subject: Processing Large Mnesia dbase In-Reply-To: References: Message-ID: <438C17B8.4090606@ericsson.com> On 2005-11-28 15:08, tty@REDACTED wrote: > Hello, > > I have a largish Mnesia table which I need to evaluate each record. What is the typical method for working with each record ? > from reading the documentation the obvious solution would be: foldl(Function, Acc, Table) -> NewAcc | transaction abort it would be nice if those that have a large mnesia experience could support/shoot down this function for this purpose. bengt From bengt.kleberg@REDACTED Tue Nov 29 10:06:45 2005 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Tue, 29 Nov 2005 10:06:45 +0100 Subject: regexp:(g)sub buglet? In-Reply-To: <877jas71cl.fsf@ghidra.vail> References: <877jas71cl.fsf@ghidra.vail> Message-ID: <438C1A25.20809@ericsson.com> On 2005-11-29 01:18, Hal Snyder wrote: > 3> regexp:gsub("foo","$","Z"). > {ok,"foo",0} before sam (http://plan9.bell-labs.com/sys/doc/sam/sam.html, first use of strucural regular expressions) most (all?) regular expressions used '\n' as end of string. try: regexp:gsub("foo\n","$","Z"). bengt From irmatov@REDACTED Tue Nov 29 11:03:18 2005 From: irmatov@REDACTED (Timur Irmatov) Date: Tue, 29 Nov 2005 15:03:18 +0500 Subject: regexp:(g)sub buglet? In-Reply-To: <438C1A25.20809@ericsson.com> References: <877jas71cl.fsf@ghidra.vail> <438C1A25.20809@ericsson.com> Message-ID: <241d382f0511290203p7326f7c5sfecf112e03dce255@mail.gmail.com> On 11/29/05, Bengt Kleberg wrote: > On 2005-11-29 01:18, Hal Snyder wrote: > > > 3> regexp:gsub("foo","$","Z"). > > {ok,"foo",0} > > before sam (http://plan9.bell-labs.com/sys/doc/sam/sam.html, first use > of strucural regular expressions) most (all?) regular expressions used > '\n' as end of string. try: > > regexp:gsub("foo\n","$","Z"). perl and python behave differently: perl -e '$a="foo"; $a =~ s/$/Z/; print "$a\n"' prints fooZ. -- Timur Irmatov, xmpp:thor@REDACTED From joe.armstrong@REDACTED Mon Nov 21 10:09:47 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Mon, 21 Nov 2005 10:09:47 +0100 Subject: JSON? Message-ID: Re quoting and unquoting - I ran into this problem recently so I have made two changes to the standard libraries (both changes will not break old code :-) Change 1 - to io_lib.erl print binaries containing strings as <<"abc">> as <<"abc">> and NOT <<97,98,99>> I posted a (buggy) version of this earlier - but now it appears to be correct Change 2 - erl_scan.erl. Accept <<' ... '>> as an alternative way of entering binaries containing strings. With this change I can write func() -> <<' > '>> is the binary delimiter - And there is NO quoting convention *within* the body of the binary. So if you want to write '>> within the binary you can't (horrors) (but who would want to anyway? - '>>) In my case a certain reluctance to using binaries has a lot to do with how they are printed and how they are inputted. The above two conventions make life a *lot* easier. /Joe > -----Original Message----- > From: Jim Larson [mailto:jim@REDACTED] > Sent: den 17 november 2005 09:29 > To: Joe Armstrong (AL/EAB); Bob.Smart@REDACTED; > erlang-questions@REDACTED > Cc: jim@REDACTED > Subject: Re: JSON? > > > I've recieved approval to release the JSON library for Erlang! > I'll get it cleaned up and released tomorrow. > > In message > se> Joe Armstrong writes: > > > >IMHO you might get a nicer mapping if you changed strings to > binaries. > > I've pondered that. It's a little awkward with the quoting and > unquoting you need to do. Binaries also imply that you'd need to > choose a Unicode format for the internal representation that would > be good for all applications. > > > >I'd let the parser return an association list (not a dict) - > since (probably) > >the object is small > >and it's nice to be able to print it and pattern match it directly. > > Yeah - I'd be glad to trade the asymptotic efficiency of dicts for > compactness and nicer printing. I liked dicts until they started > showing up in error reports. I'll probably change this in a future > release. > > Pattern matching? This means you'd have to: > > * have the JSON decoder always sort the assoc-list; > * remember to maintain your pattern assoc-list in sorted order; > * have optional fields sort after mandatory fields. > > Am I forgetting some new language feature? > > Thanks for your thoughts! > > Jim Larson > jim@REDACTED > From joe.armstrong@REDACTED Tue Nov 29 11:40:20 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Tue, 29 Nov 2005 11:40:20 +0100 Subject: mailto this list was delayed by delayed by 8 days Message-ID: Look at the date on this mail - it was sent on 2005-11-21 but it appeared on list 8 days later. Where has it been hiding? Can you check what's happening? /Joe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Joe Armstrong > (AL/EAB) > Sent: den 21 november 2005 10:10 > To: Jim Larson; Bob.Smart@REDACTED; erlang-questions@REDACTED > Subject: RE: JSON? .. deleted ... From joe.armstrong@REDACTED Tue Nov 29 11:36:00 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Tue, 29 Nov 2005 11:36:00 +0100 Subject: Compiler and PHP questions Message-ID: 1) Does anybody have or is anybody working on a parser for php written in erlang - please contact me if this is the case. 2) Is there an easy way to get line numbers right in transformed code? Suppose I have an input file foo.ehe with some embedded code: ...

title

hello how are you Into foo.erl foo(A) -> output(<<"

title

\n

hellon "), getDb "name"), output(<<" how are you">>). And run this through the compiler then the line number with the error refers to foo.erl and NOT foo.ehe. I thought there was an annotation you could add to the source. Like this: -file("foo.ehe", 23) foo(A) -> ... To tell the compiler that foo(A) came from foo.ehe line 23. This seems to be broken (there *is* code in epp.erl to do this and I *can* change the file name but *not* the line number). Is this a bug or a feature or have I misunderstood something? The alternative seems to be to run a parse transform on an empty file and transform the empty file into a parse tree with the correct line numbers in it. /Joe From marthin@REDACTED Tue Nov 29 13:23:52 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Tue, 29 Nov 2005 14:23:52 +0200 Subject: choice of gcc version for Erlang on ARM/XScale/PXA In-Reply-To: <17292.11237.198515.505244@alkaid.it.uu.se> Message-ID: <200511291223.jATCNpd28307@hades.cslab.ericsson.net> > -----Original Message----- > From: Mikael Pettersson [mailto:mikpe@REDACTED] > Sent: 29 November 2005 12:22 > To: Marthin Laubscher > Subject: RE: choice of gcc version for Erlang on ARM/XScale/PXA > > Marthin Laubscher writes: > > > > The environment I used for compiling erlang for Gumstix PXA255) states > gcc > > version 3.4.2. But I'm afraid I didn't put together the cross-compiling > > environment myself but inherited it from the gumstix provided buildroot > > environment, so I'm blissfully unaware of any patches applied. I'm new > to > > both cross-compiling and building Erlang, but will try to answer your > > questions if you tell me where to look for what. > > That's OK, I already received a link to Gumstick's gcc-3.4.2 patch set. > But you cross-compiled Erlang, right? Did you or did you not run the > Erlang compiler on the gumstix to compile the Erlang library files? > That's when things go wrong. [Marthin Laubscher] It was all cross-compiled. I know erlc works on the gumstix itself, but I'm pretty sure /lib/x/ebin/*.beam files were generated in the cross-compiling environment. After fixing the float library problem, I didn't pick up any other issues, but now I'm worried about what is going to still go wrong. Do you think I should I leave the .beam files or try to get a version of GNU make running on the gumstix and build them all there again. I've trimmed the system to a minimum so making the .beam files will involve fiddling with the makefiles again. Are you working on gumstix or another ARM/XScale/PXA implementation? My gumstix app needs good float performance so I a little worried about running without fpu. I'd love to learn about equally small alternatives that do include a fpu option. > > /Mikael From Marc.Vanwoerkom@REDACTED Tue Nov 29 13:44:58 2005 From: Marc.Vanwoerkom@REDACTED (Marc van Woerkom) Date: Tue, 29 Nov 2005 13:44:58 +0100 Subject: Compiler and PHP questions In-Reply-To: Message-ID: >1) Does anybody have or is anybody working on a parser >for php written in erlang - please contact me > if this is the case. I would love to know about this too, as I use PHP for my present day job. :) BTW Perl 6 seems to get implemented in Haskell first: http://www.perl.com/pub/a/2005/03/03/pugs_interview.html >

title

>

hello how are you Putting code fragments into HTML is not a good style for developing (larger) web applications. This has to do with the typical team structure / division of labour for web teams: - the web developers do the pure php/perl/.. script code - the screen designers rule the template files - the backend folks deliver methods to feed/query the backend databases For php we use the smarty template engine. A template is instantiated and fed with variable data by the web application. The template file contains mainly html/css/javascript and has just extra support for conditional code activiation, data access (just to the provided variable data) and simple repetition control, all in a HTML like syntax. A web developer delivers just a plain template file as result of his work, a template file that just renders the web page in minimal stylish fashion, with all access to the internal vars provided. This is then fed to the screen designers who use their javascript and DHTML magic to pimp it up. Regards, Marc From nm@REDACTED Tue Nov 29 14:05:34 2005 From: nm@REDACTED (Gaspar Chilingarov) Date: Tue, 29 Nov 2005 17:05:34 +0400 (AMT) Subject: more documentation for mnesia:dirty_update_counter ? Message-ID: <51734.195.250.88.228.1133269534.squirrel@www.web.am> Hi all! I was reading mnesia manual, trying to figure out how to implement autoincrement values in mnesia. After some searching I've found post referring to dirty_update_counter operation. So, I red the documentation and tried to use this function but it some time and searching in archives to understand how it works. Only after reading this http://www.erlang.org/ml-archive/erlang-questions/200508/msg00291.html posting I got how to implement it. May be documentation about dirty_update_counter should explain more detailed, how to do the implementation ? For newcomers it takes really hard job to get hints how to use some of erlang's functoins. -- Gaspar Chilingarov System Administrator t +37491 419763 w www.netter.am e nm@REDACTED From mikpe@REDACTED Tue Nov 29 14:28:56 2005 From: mikpe@REDACTED (Mikael Pettersson) Date: Tue, 29 Nov 2005 14:28:56 +0100 Subject: choice of gcc version for Erlang on ARM/XScale/PXA In-Reply-To: <200511291223.jATCNp9f016536@aun.it.uu.se> References: <17292.11237.198515.505244@alkaid.it.uu.se> <200511291223.jATCNp9f016536@aun.it.uu.se> Message-ID: <17292.22424.234854.625323@alkaid.it.uu.se> Marthin Laubscher writes: > It was all cross-compiled. I know erlc works on the gumstix itself, but I'm > pretty sure /lib/x/ebin/*.beam files were generated in the cross-compiling > environment. After fixing the float library problem, I didn't pick up any > other issues, but now I'm worried about what is going to still go wrong. Do > you think I should I leave the .beam files or try to get a version of GNU > make running on the gumstix and build them all there again. I've trimmed the > system to a minimum so making the .beam files will involve fiddling with the > makefiles again. No, leave the .beam files alone. Rebuilding them on your gumstix will almost certainly trigger the bug. I'm away from my ARM box so I can't produce a nice test case right now, but the bug broke an integer shift operation so that an 8-bit downshift of a bignum became an 8-bit upshift instead. See what "16#001000000000 bsr 8." evaluates to in the shell. > Are you working on gumstix or another ARM/XScale/PXA implementation? I'm using an XScale, actually an IXP420. I looked at the gumstix, but it seemed to lack any disk I/O facilities, even USB2.0 based ones, and given that limitation it seemed a bit overpriced. > My > gumstix app needs good float performance so I a little worried about running > without fpu. I'd love to learn about equally small alternatives that do > include a fpu option. No XScale/PXA to date has an FPU, so if you need good f.p. performance you should look elsewhere. www.arm.com does have cores with the VFP FPU, but I don't know where one can buy systems based on them. /Mikael From vlad.xx.dumitrescu@REDACTED Tue Nov 29 11:47:07 2005 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Tue, 29 Nov 2005 11:47:07 +0100 Subject: quoting Message-ID: <11498CB7D3FCB54897058DE63BE3897CD1158B@esealmw105.eemea.ericsson.se> Hi, > Change 1 - to io_lib.erl print binaries containing strings > as <<"abc">> as <<"abc">> and NOT > <<97,98,99>> I think this is nice, but... It is already a little tricky to get the proper formatting when handling lists of integers vs strings. Now it will be the same with binaries. I'd like to suggest (like so many before me) that a proper string type is introduced. I realize this is more difficult than it looks (especially wrt old code), but I think that it would be one of those added feature that doesn't require removing something else in order to preserve simplicity. Regards, Vlad From joe.armstrong@REDACTED Tue Nov 29 11:48:58 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Tue, 29 Nov 2005 11:48:58 +0100 Subject: Time warp Message-ID: Perhaps you will get this mail yesterday Either you guys have invented a time machine (well done) - or some mail systems is playing up. I have just send two mails to this list with a four minute interval The first mail has not appeared on the list. But the second mail has appeared on the list. THIS VIOLATES CAUSALITY. 2005-11-29 11:36 -- has not yet appeared 2005-11-29 11:40 -- arrived What has happened to the first mail? /Joe > -----Original Message----- > From: Joe Armstrong (AL/EAB) > Sent: den 29 november 2005 11:40 > To: Joe Armstrong (AL/EAB); Jim Larson; Bob.Smart@REDACTED; > erlang-questions@REDACTED > Subject: mailto this list was delayed by delayed by 8 days > > > Look at the date on this mail - it was sent on 2005-11-21 > but it appeared on list 8 days later. > > Where has it been hiding? > > Can you check what's happening? > > /Joe > > > > > > -----Original Message----- > > From: owner-erlang-questions@REDACTED > > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Joe Armstrong > > (AL/EAB) > > Sent: den 21 november 2005 10:10 > > To: Jim Larson; Bob.Smart@REDACTED; erlang-questions@REDACTED > > Subject: RE: JSON? > > .. deleted ... > > From hans.bolinder@REDACTED Tue Nov 29 15:28:05 2005 From: hans.bolinder@REDACTED (hans.bolinder@REDACTED) Date: Tue, 29 Nov 2005 15:28:05 +0100 Subject: Compiler and PHP questions In-Reply-To: References: Message-ID: <17292.25973.119214.662272@gargle.gargle.HOWL> "Joe Armstrong (AL/EAB)" > 2) Is there an easy way to get line numbers right in transformed code? > > I thought there was an annotation you could add to the source. > Like this: > > -file("foo.ehe", 23) > foo(A) -> > ... > > To tell the compiler that foo(A) came from foo.ehe line 23. > > This seems to be broken (there *is* code in epp.erl to do this and > I *can* change the file name but *not* the line number). Is this > a bug or a feature or have I misunderstood something? The -file attribute has so far been used for implementing -include and -include_lib only. The changes necessary to make it work on "user level" have been made in R11B to be. They are neither simple nor beautiful. One of the first users of this new feature will be yecc. Best regards Hans Bolinder, Erlang/OTP From erlang@REDACTED Tue Nov 29 15:55:48 2005 From: erlang@REDACTED (Peter Lund) Date: Tue, 29 Nov 2005 15:55:48 +0100 Subject: bug in inets or erlang! In-Reply-To: <17288.34698.153071.494212@antilipe.corelatus.se> References: <20051126145154.E9D0A5911E@bang.trapexit.org> <17288.34698.153071.494212@antilipe.corelatus.se> Message-ID: <438C6BF4.4040105@lundata.se> Yes, the important question here is if: erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}). really should crash the code just because it is 1 sec too early? No-one seems to have any opinion about it! I am running on R10B (5.4.8). How do you figure out which "R10B-NN" it is? Regarding why inets made this call when I tried to surf to "/" on my server I do not know. I hoped that some OTP person should fix this. The index.html on the DocumentRoot place was not even close to 36 years old (just a couple of months). /Peter Matthias Lang wrote: >Hi, > >I started off by wondering why universaltime_to_localtime() doesn't >work for the date you gave. The relevant files are >erts/emulator/beam/bif.c and erts/emulator/beam/erl_time_sup.c. In >univ_to_local(), there's a rangecheck on the year. If it's less than >BASEYEAR, the call fails. BASEYEAR is 1970. Real men don't read >manuals, but it'd help all the sissies like me if the manual gave a >clue about that. > >The other question is easier to answer---your trace provides all the >information. inets calls univeraltime_to_localtime/1 with an argument >from 1969 because the file you tried to get inets to serve has a >modification time from 1969. Take a look at the log to see which file >it was. > >Matthias > >---------------------------------------------------------------------- > >peter writes: > > > After my FreeBSD server running erlang was restarted, suddenly > > INETS was not comming up as it was expected to. In the inets > > error_log I found: > > > > > more error_log_16111 > > [26/Nov/2005:13:14:42 -0000] reporting error: traverse exit from apply: mod_get: > > do => > > {badarg,[{erlang,universaltime_to_localtime,[{{1969,12,31},{23,59,59}}]}, > > {calendar,local_time_to_universal_time_dst,1}, > > {httpd_util,rfc1123_date,1}, > > {mod_get,get_modification_date,1}, > > {mod_get,do_get,1}, > > {httpd_response,traverse_modules,2}, > > {httpd_response,generate_and_send_response,1}, > > {httpd_request_handler,respond,3}]} > > > > > > WHY is inets calling erlang:universaltime_to_localtime/1 with [{{1969,12,31},{23,59,59}}] ?? Looks like a potential bugg to me OR should this bug actually be located to the erlang module instead? Should this call really result in a crach? > > > > Anyhow to get inets up and running again I had to patch the calendar.erl module catching for this crash and in that case return {{1970,1,1},{0,0,0}}. > > > > What need to change here erlang or some module in inets? > > > > /PeterPeter Lund > > _________________________________________________________ > > Sent using Mail2Forum (http://m2f.sourceforge.net) > > > From joe.armstrong@REDACTED Tue Nov 29 15:56:03 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Tue, 29 Nov 2005 15:56:03 +0100 Subject: quoting Message-ID: Comments: 1) printing binaries <<"...">> properly has had a strange effect on my programming I now use them far more than I ever did before - this is because they get printed nicely - I think I was often using atoms just because I could see them when my program failed. 2) We don't need or want a string type. That's what a binary is. IMHO we need a character type - so we can distinguish $a from 97. We also need a small number of BIFs that do string operations on binaries. for example split(Binary, Str) -> {Before, After} | no (take a binary and split it at a constant string) would be *incredable* useful A small number of well-chosen primitive on binaries would be very useful. Somebody else can tell the list what these should be - and how yecc and leex can make use of them :-) /Joe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Vlad Dumitrescu > XX (LN/EAB) > Sent: den 29 november 2005 11:47 > To: erlang-questions@REDACTED > Subject: RE: quoting > > > Hi, > > > Change 1 - to io_lib.erl print binaries containing strings > > as <<"abc">> as <<"abc">> and NOT > > <<97,98,99>> > > I think this is nice, but... It is already a little tricky to get the > proper formatting when handling lists of integers vs strings. Now it > will be the same with binaries. > > I'd like to suggest (like so many before me) that a proper string type > is introduced. I realize this is more difficult than it looks > (especially wrt old code), but I think that it would be one of those > added feature that doesn't require removing something else in order to > preserve simplicity. > > Regards, > Vlad > From raimo@REDACTED Tue Nov 29 16:06:48 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 29 Nov 2005 16:06:48 +0100 Subject: Time warp References: Message-ID: I do not read the list via mail, but instead news, and thus I get most interesting (in this case) headers stripped off. If you read the list via mail, you can take a raw dump of the mail delayed 8 days and investigate all headers or send it to me, and I will have a look. I have seen users mailing from ericsson.com getting their outgoing mail delayed with an arbitrary amount (30 min, 2 days, perhaps 8 days), so there might be a problem with some Exchange server within Ericsson. The complete mail headers might tell. Causality was probably violated already with your mail that got delayed 8 days - I am sure you have successfully posted since then. joe.armstrong@REDACTED (Joe Armstrong AL/EAB) writes: > Perhaps you will get this mail yesterday > > Either you guys have invented a time machine (well done) - or some mail systems is playing up. > > I have just send two mails to this list with a four minute interval > > The first mail has not appeared on the list. But the second mail has > appeared on the list. > > THIS VIOLATES CAUSALITY. > > 2005-11-29 11:36 -- has not yet appeared > 2005-11-29 11:40 -- arrived > > What has happened to the first mail? > > > > /Joe > > > -----Original Message----- > > From: Joe Armstrong (AL/EAB) > > Sent: den 29 november 2005 11:40 > > To: Joe Armstrong (AL/EAB); Jim Larson; Bob.Smart@REDACTED; > > erlang-questions@REDACTED > > Subject: mailto this list was delayed by delayed by 8 days > > > > > > Look at the date on this mail - it was sent on 2005-11-21 > > but it appeared on list 8 days later. > > > > Where has it been hiding? > > > > Can you check what's happening? > > > > /Joe > > > > > > > > > > > -----Original Message----- > > > From: owner-erlang-questions@REDACTED > > > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Joe Armstrong > > > (AL/EAB) > > > Sent: den 21 november 2005 10:10 > > > To: Jim Larson; Bob.Smart@REDACTED; erlang-questions@REDACTED > > > Subject: RE: JSON? > > > > .. deleted ... > > > > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From ke.han@REDACTED Tue Nov 29 15:38:32 2005 From: ke.han@REDACTED (ke.han) Date: Tue, 29 Nov 2005 22:38:32 +0800 Subject: Time warp In-Reply-To: References: Message-ID: <438C67E8.1040505@redstarling.com> Joe Armstrong (AL/EAB) wrote: > Perhaps you will get this mail yesterday > > Either you guys have invented a time machine (well done) - or some mail systems is playing up. > > I have just send two mails to this list with a four minute interval > > The first mail has not appeared on the list. But the second mail has > appeared on the list. > > THIS VIOLATES CAUSALITY. > > 2005-11-29 11:36 -- has not yet appeared > 2005-11-29 11:40 -- arrived > > What has happened to the first mail? > > From my experience, this maillist has posted my postings very slowly every time I post (I started posting earlier this year). It appears quite a few others have had issues as well. I hope it does get fixed at some point. thanks, ke han From tty@REDACTED Tue Nov 29 16:56:07 2005 From: tty@REDACTED (tty@REDACTED) Date: Tue, 29 Nov 2005 10:56:07 -0500 Subject: Processing Large Mnesia dbase Message-ID: Unfortunately I get a ** exited: {aborted,no_transaction} ** when running mnesia:foldl. I concur it would be great to hear folks with large mnesia experience on this matter. Thanks t From bmk@REDACTED Tue Nov 29 17:08:46 2005 From: bmk@REDACTED (Micael Karlberg) Date: Tue, 29 Nov 2005 17:08:46 +0100 Subject: bug in inets or erlang! In-Reply-To: <438C6BF4.4040105@lundata.se> References: <20051126145154.E9D0A5911E@bang.trapexit.org> <17288.34698.153071.494212@antilipe.corelatus.se> <438C6BF4.4040105@lundata.se> Message-ID: <438C7D0E.5030705@erix.ericsson.se> Hi, The inets web-server get's the (modification) time from the file-info record of the file: file:read_file_info(Path). What does this call give you? /BMK Peter Lund wrote: > Yes, the important question here is if: > > erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}). > > really should crash the code just because it is 1 sec too early? No-one > seems to have any opinion about it! > > I am running on R10B (5.4.8). How do you figure out which "R10B-NN" it is? > > > Regarding why inets made this call when I tried to surf to "/" on my > server I do not know. I hoped that some OTP person should fix this. The > index.html on the DocumentRoot place was not even close to 36 years old > (just a couple of months). > > /Peter > > Matthias Lang wrote: > >> Hi, >> >> I started off by wondering why universaltime_to_localtime() doesn't >> work for the date you gave. The relevant files are >> erts/emulator/beam/bif.c and erts/emulator/beam/erl_time_sup.c. In >> univ_to_local(), there's a rangecheck on the year. If it's less than >> BASEYEAR, the call fails. BASEYEAR is 1970. Real men don't read >> manuals, but it'd help all the sissies like me if the manual gave a >> clue about that. >> >> The other question is easier to answer---your trace provides all the >> information. inets calls univeraltime_to_localtime/1 with an argument >> from 1969 because the file you tried to get inets to serve has a >> modification time from 1969. Take a look at the log to see which file >> it was. >> >> Matthias >> >> ---------------------------------------------------------------------- >> >> peter writes: >> >> > After my FreeBSD server running erlang was restarted, suddenly >> > INETS was not comming up as it was expected to. In the inets >> > error_log I found: >> > > > more error_log_16111 >> > [26/Nov/2005:13:14:42 -0000] reporting error: traverse exit from >> apply: mod_get: >> > do => >> > >> {badarg,[{erlang,universaltime_to_localtime,[{{1969,12,31},{23,59,59}}]}, >> > {calendar,local_time_to_universal_time_dst,1}, >> > {httpd_util,rfc1123_date,1}, >> > {mod_get,get_modification_date,1}, >> > {mod_get,do_get,1}, >> > {httpd_response,traverse_modules,2}, >> > {httpd_response,generate_and_send_response,1}, >> > {httpd_request_handler,respond,3}]} >> > > > WHY is inets calling erlang:universaltime_to_localtime/1 with >> [{{1969,12,31},{23,59,59}}] ?? Looks like a potential bugg to me OR >> should this bug actually be located to the erlang module instead? >> Should this call really result in a crach? >> > > Anyhow to get inets up and running again I had to patch the >> calendar.erl module catching for this crash and in that case return >> {{1970,1,1},{0,0,0}}. > > What need to change here erlang or some >> module in inets? >> > > /PeterPeter Lund >> > _________________________________________________________ >> > Sent using Mail2Forum (http://m2f.sourceforge.net) >> >> >> > > From matthias@REDACTED Tue Nov 29 17:22:50 2005 From: matthias@REDACTED (Matthias Lang) Date: Tue, 29 Nov 2005 17:22:50 +0100 Subject: bug in inets or erlang! In-Reply-To: <438C6BF4.4040105@lundata.se> References: <20051126145154.E9D0A5911E@bang.trapexit.org> <17288.34698.153071.494212@antilipe.corelatus.se> <438C6BF4.4040105@lundata.se> Message-ID: <17292.32858.364260.889261@antilipe.corelatus.se> Peter Lund writes: > Yes, the important question here is if: > > erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}). > > really should crash the code just because it is 1 sec too early? > No-one seems to have any opinion about it! Finite limits in time representations are a fact of life in popular operating systems, so there's always going to be a value that's just one incy-wincy-teeny-weeny second on the wrong side of the limit. Erlang just happens to have chosen an 'interesting' limit. I don't recall ever seeing a bignum time representation in Erlang, though there's bound to be a LISP one. > I am running on R10B (5.4.8). How do you figure out which "R10B-NN" it is? The only way I know of is to remember which file you downloaded. I don't think the system keeps track of the patch level. > Regarding why inets made this call when I tried to surf to "/" on > my server I do not know. I hoped that some OTP person should fix > this. "some OTP person". I guess that's slightly better than being a piece of "human capital". If you're lucky, someone might help you debug the problem---there are still a few steps to making it easily reproduceable. Matthias From chsu79@REDACTED Tue Nov 29 17:26:09 2005 From: chsu79@REDACTED (Christian S) Date: Tue, 29 Nov 2005 17:26:09 +0100 Subject: quoting In-Reply-To: References: Message-ID: This is mostly a me-too message. I too use binaries for strings often, and feel the lack of a 'binaries' module (like there is a 'string' and a 'lists' module that are useful for the usual way to do strings). I feel a jungerl lib idea growing. So this question goes out to all readers: What interfaces do you chose to use for your utility functions? Personally, I use something like this frequently: skip(<<"abc:def">>, $:) to get <<"def">> piks(<<"abc:def">>, $:) to get <<"abc">> divide(<<"abc:def">>, $:) to get {<<"abc">>, <<"def">>} (like joe's but only single-char divider) match(Bin, RE) -> regexp:match(binary_to_list(Bin), RE). part(<<"abcdef">>, 3, 2) -> <<"cd">>. And I implement the special cases differently every time i reinvent the code. It is not much code to implement, but a shared code base means we all call these functions the same thing. PS. Using binaries as octet-strings always make me worry about code spaces that do not fit as super sets of ASCII in 256 code points. utf8-versions of the above examples seem like at least twice the job to write, so i never bothered. PS: If I could reach the web on ports other than 80 and 8080 I would have pointed to a erlang wiki page. From erlang@REDACTED Tue Nov 29 18:00:02 2005 From: erlang@REDACTED (Peter Lund) Date: Tue, 29 Nov 2005 18:00:02 +0100 Subject: bug in inets or erlang! In-Reply-To: <438C7D0E.5030705@erix.ericsson.se> References: <20051126145154.E9D0A5911E@bang.trapexit.org> <17288.34698.153071.494212@antilipe.corelatus.se> <438C6BF4.4040105@lundata.se> <438C7D0E.5030705@erix.ericsson.se> Message-ID: <438C8912.40807@lundata.se> > Micael Karlberg wrote: Hi, > > The inets web-server get's the (modification) time from the file-info > record of the file: file:read_file_info(Path). What does this call > give you? > > /BMK Nothing unusual sorry! I got this: (pds@REDACTED)6> file:read_file_info("index.html"). {ok,{file_info,360, regular, read_write, {{2005,11,29},{12,15,18}}, {{2005,10,17},{18,44,2}}, {{2005,10,17},{18,44,2}}, 33188, 1, 1042, 1723200, 426909, 1001, 1001}} (pds@REDACTED)7> As Mattias said. This may be difficult to reproduce. I don't know what caused inets to make that failing call (except for what I see in the stack trace I posted originally). I have only seen it once and that was after a brute force power down of the FreeBSD system (removal of electrical power) and then turning it on again some 4-5 hours later. /Peter > Peter Lund wrote: > >> Yes, the important question here is if: >> >> erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}). >> >> really should crash the code just because it is 1 sec too early? >> No-one seems to have any opinion about it! >> >> I am running on R10B (5.4.8). How do you figure out which "R10B-NN" >> it is? >> >> >> Regarding why inets made this call when I tried to surf to "/" on my >> server I do not know. I hoped that some OTP person should fix this. >> The index.html on the DocumentRoot place was not even close to 36 >> years old (just a couple of months). >> >> /Peter >> >> Matthias Lang wrote: >> >>> Hi, >>> >>> I started off by wondering why universaltime_to_localtime() doesn't >>> work for the date you gave. The relevant files are >>> erts/emulator/beam/bif.c and erts/emulator/beam/erl_time_sup.c. In >>> univ_to_local(), there's a rangecheck on the year. If it's less than >>> BASEYEAR, the call fails. BASEYEAR is 1970. Real men don't read >>> manuals, but it'd help all the sissies like me if the manual gave a >>> clue about that. >>> >>> The other question is easier to answer---your trace provides all the >>> information. inets calls univeraltime_to_localtime/1 with an argument >>> from 1969 because the file you tried to get inets to serve has a >>> modification time from 1969. Take a look at the log to see which file >>> it was. >>> >>> Matthias >>> >>> ---------------------------------------------------------------------- >>> >>> peter writes: >>> >>> > After my FreeBSD server running erlang was restarted, suddenly >>> > INETS was not comming up as it was expected to. In the inets >>> > error_log I found: >>> > > > more error_log_16111 >>> > [26/Nov/2005:13:14:42 -0000] reporting error: traverse exit from >>> apply: mod_get: >>> > do => >>> > >>> {badarg,[{erlang,universaltime_to_localtime,[{{1969,12,31},{23,59,59}}]}, >>> >>> > {calendar,local_time_to_universal_time_dst,1}, >>> > {httpd_util,rfc1123_date,1}, >>> > {mod_get,get_modification_date,1}, >>> > {mod_get,do_get,1}, >>> > {httpd_response,traverse_modules,2}, >>> > {httpd_response,generate_and_send_response,1}, >>> > {httpd_request_handler,respond,3}]} >>> > > > WHY is inets calling erlang:universaltime_to_localtime/1 with >>> [{{1969,12,31},{23,59,59}}] ?? Looks like a potential bugg to me OR >>> should this bug actually be located to the erlang module instead? >>> Should this call really result in a crach? >>> > > Anyhow to get inets up and running again I had to patch the >>> calendar.erl module catching for this crash and in that case return >>> {{1970,1,1},{0,0,0}}. > > What need to change here erlang or some >>> module in inets? >>> > > /PeterPeter Lund >>> > _________________________________________________________ >>> > Sent using Mail2Forum (http://m2f.sourceforge.net) >>> >>> >>> >> >> > From ulf.wiger@REDACTED Tue Nov 29 18:00:39 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 29 Nov 2005 18:00:39 +0100 Subject: Processing Large Mnesia dbase Message-ID: You need to place the call to mnesia:foldl() from within a fun passed to either mnesia:activity() or mnesia:transaction(). If you use mnesia:activity(Type, Fun), then Type can be either of the valid types (ets, async_dirty, ..., sync_transaction.) Example: mnesia:activity( transaction, fun() -> mnesia:foldl(fun(X,Acc) -> [X|Acc] end, [], Tab) end). /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of > tty@REDACTED > Sent: den 29 november 2005 16:56 > To: Bengt Kleberg (AL/EAB) > Cc: erlang-questions@REDACTED > Subject: Re: Processing Large Mnesia dbase > > Unfortunately I get a > > ** exited: {aborted,no_transaction} ** > > when running mnesia:foldl. > > I concur it would be great to hear folks with large mnesia > experience on this matter. > > Thanks > > t > From erlang@REDACTED Tue Nov 29 18:12:03 2005 From: erlang@REDACTED (Michael McDaniel) Date: Tue, 29 Nov 2005 09:12:03 -0800 Subject: regexp:(g)sub buglet? In-Reply-To: <241d382f0511290203p7326f7c5sfecf112e03dce255@mail.gmail.com> References: <877jas71cl.fsf@ghidra.vail> <438C1A25.20809@ericsson.com> <241d382f0511290203p7326f7c5sfecf112e03dce255@mail.gmail.com> Message-ID: <20051129171202.GY3157@delora.autosys.us> On Tue, Nov 29, 2005 at 03:03:18PM +0500, Timur Irmatov wrote: > On 11/29/05, Bengt Kleberg wrote: > > On 2005-11-29 01:18, Hal Snyder wrote: > > > > > 3> regexp:gsub("foo","$","Z"). > > > {ok,"foo",0} > > > > before sam (http://plan9.bell-labs.com/sys/doc/sam/sam.html, first use > > of strucural regular expressions) most (all?) regular expressions used > > '\n' as end of string. try: > > > > regexp:gsub("foo\n","$","Z"). > > perl and python behave differently: > > perl -e '$a="foo"; $a =~ s/$/Z/; print "$a\n"' > > prints fooZ. > > > -- > Timur Irmatov, xmpp:thor@REDACTED ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ from the regexp.html documentation on my R10B-8 system " ^ matches the beginning of a string. $ matches the end of a string. " ... "To make these functions easier to use, in combination with the function io:get_line which terminates the input line with a new line, the $ characters also matches a string ending with "...\n". The following examples define Erlang data types:" To me, the use of the phrase ' ... also matches a string ending with "...\n". ' lead me to think that "Z" should be appended in either case (with or without "\n" at end of string). ~Michael From neumann@REDACTED Tue Nov 29 20:10:19 2005 From: neumann@REDACTED (=?iso-8859-1?q?Fran=E7ois-Denis_Gonthier?=) Date: Tue, 29 Nov 2005 14:10:19 -0500 Subject: Attention Debian & Ubuntu users - Erlang 10.b.8-2 available! In-Reply-To: <200511281829.40228.neumann@lostwebsite.net> References: <200511281829.40228.neumann@lostwebsite.net> Message-ID: <200511291410.19956.neumann@lostwebsite.net> 'lo again I forgot to mention that the binary packages I've built are for i386 only. ?I don't have access to any Outer Platforms. Interrested people can still build the source package themselves, but once the package reach Debian, it'll be auto-builded for all other platforms. T-y F-D On 28 November 2005 18:29, Fran?ois-Denis Gonthier wrote: > Hello erlang-questions, > > after quite a bit of struggling over the weekend, I finally managed to > build version 2 of my improved Erlang packages for Debian & Ubuntu. > > You can get the packages at: > > http://neutronic.mine.nu/unstable > > or through apt by adding: > > deb http://neutronic.mine.nu/ unstable/ > deb-src http://neutronic.mine.nu/ unstable/ > > to /etc/apt/sources.list > > and do: > > apt-get install -t . erlang, to upgrade from 10.b.7-1 > > The package you will get are: > > erlang-mode, the emacs mode alone > erlang-base, architecture dependent files > erlang-base-hipe, HiPE enabled architecture dependent files > erlang-nox, X11 independant applications > erlang-x11, applications that uses GS and thus X11 > erlang-src, source files for the system (*.erl, *.hrl) > > If you want to install anew, you'll only have too choose between the > mutually exclusive erlang-base and erlang-base-hipe and choose amongst the > other package to suit your needs. (You probably need erlang-nox at least). > > The Ubuntu-friendly packages are at: > http://neutronic.mine.nu/ubuntu-breezy. This is not a apt repository (yet), > so please download and install version 2 manually through dpkg. > > I'll try to push this package through the main Debian archives ASAP. > > I'll try to see if I can package the Vim Erlang mode and ESense before > christmas. Both should be easy. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From klacke@REDACTED Tue Nov 29 20:27:50 2005 From: klacke@REDACTED (Claes Wikstrom) Date: Tue, 29 Nov 2005 20:27:50 +0100 Subject: bug in inets or erlang! In-Reply-To: <438C6BF4.4040105@lundata.se> References: <20051126145154.E9D0A5911E@bang.trapexit.org> <17288.34698.153071.494212@antilipe.corelatus.se> <438C6BF4.4040105@lundata.se> Message-ID: <438CABB6.9070306@hyber.org> Peter Lund wrote: > Yes, the important question here is if: > > erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}). > > really should crash the code just because it is 1 sec too early? No-one > seems to have any opinion about it! > I do :-) /klacke From marthin@REDACTED Tue Nov 29 21:55:19 2005 From: marthin@REDACTED (Marthin Laubscher) Date: Tue, 29 Nov 2005 22:55:19 +0200 Subject: choice of gcc version for Erlang on ARM/XScale/PXA In-Reply-To: <17292.22424.234854.625323@alkaid.it.uu.se> Message-ID: <001401c5f527$38116180$4800a8c0@studioa> Thanks for the heads up Mikael. I did the test on the gumstix and got: # erl Erlang (BEAM) emulator version 5.4.10 [source] Eshell V5.4.10 (abort with ^G) 1> io:format("~.16#, ~.16#~n", [16#001000000000 bsr 8,16#001000000000 bsl 8]). 16#10000000, 16#100000000000 ok 2> Would you regard that as indication that I don't have the bug? (i.e. correct patches was installed?) What is the proper/best way to verify that a new Erlang (cross)-compile works as intended? /Marthin > -----Original Message----- > From: owner-erlang-questions@REDACTED [mailto:owner-erlang- > questions@REDACTED] On Behalf Of Mikael Pettersson > Sent: 29 November 2005 15:29 > To: Marthin Laubscher > Cc: erlang-questions@REDACTED > Subject: RE: choice of gcc version for Erlang on ARM/XScale/PXA > > Marthin Laubscher writes: > > It was all cross-compiled. I know erlc works on the gumstix itself, but > I'm > > pretty sure /lib/x/ebin/*.beam files were generated in the cross- > compiling > > environment. After fixing the float library problem, I didn't pick up > any > > other issues, but now I'm worried about what is going to still go > wrong. Do > > you think I should I leave the .beam files or try to get a version of > GNU > > make running on the gumstix and build them all there again. I've > trimmed the > > system to a minimum so making the .beam files will involve fiddling > with the > > makefiles again. > > No, leave the .beam files alone. Rebuilding them on your gumstix will > almost certainly trigger the bug. I'm away from my ARM box so I can't > produce a nice test case right now, but the bug broke an integer shift > operation so that an 8-bit downshift of a bignum became an 8-bit upshift > instead. See what "16#001000000000 bsr 8." evaluates to in the shell. > > > Are you working on gumstix or another ARM/XScale/PXA implementation? > > I'm using an XScale, actually an IXP420. I looked at the gumstix, but > it seemed to lack any disk I/O facilities, even USB2.0 based ones, > and given that limitation it seemed a bit overpriced. > > > My > > gumstix app needs good float performance so I a little worried about > running > > without fpu. I'd love to learn about equally small alternatives that do > > include a fpu option. > > No XScale/PXA to date has an FPU, so if you need good f.p. performance > you should look elsewhere. www.arm.com does have cores with the VFP FPU, > but I don't know where one can buy systems based on them. > > /Mikael From sean.hinde@REDACTED Wed Nov 30 01:28:49 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Wed, 30 Nov 2005 00:28:49 +0000 Subject: Deleting a large number of records from a mensia table In-Reply-To: <00fc01c5f443$f8130770$7309fea9@MONEYMAKER2> References: <01f901c5f418$baebdfa0$dc00a8c0@INSWITCH244> <3E48938D-CCBC-4E4F-8C35-018D027A03CA@gmail.com> <00fc01c5f443$f8130770$7309fea9@MONEYMAKER2> Message-ID: <583DF471-D5BE-41D7-9096-66D836AF8048@gmail.com> Hi, There is nothing to stop you deleting the records from a RAM only mnesia table with ets:select_delete directly. If you also hold things on disc then this will not help very much (the disc will not be updated). Regards, Sean On 28 Nov 2005, at 17:48, Valentin Micic wrote: > How about mnesia:activity with ets access context? Would it be > possible to access select_delete mechanism then? > > V. > > ----- Original Message ----- From: "Sean Hinde" > To: "Sebastian Bello" > Cc: > Sent: Monday, November 28, 2005 3:24 PM > Subject: Re: Deleting a large number of records from a mensia table > > > Hi, > > You can't. ets has the select_delete mechanism, but mnesia does not > export this to its own API. > > Sean > > On 28 Nov 2005, at 12:39, Sebastian Bello wrote: > >> Hi all, >> >> how can I delete a large number of mnesia records -which match a >> certain criteria- without having to select them (to avoid a big >> memory copy of them)? >> Thanks, >> Sebastian- >> >> PS: excuse me if this question has already been asked/answered >> >> <01f301c5f418$b9fd60f0$dc00a8c0> >> Prepaid Expertise - Programmable Switches >> Powered by Ericsson Licensed Technology >> Sebasti?n Bello - Engineer - Development Center - IN Switch >> Solutions Inc. >> Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 >> Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 >> IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0 4 93655773 / >> emea@REDACTED >> IN SWITCH ASIA Phone: +92 51 2800397/8- Fax: +92 51 2800399/ >> inswasia@REDACTED >> e-mail: sebastian@REDACTED >> >> > > From b88zhou@REDACTED Tue Nov 29 07:23:59 2005 From: b88zhou@REDACTED (Brian Zhou) Date: Tue, 29 Nov 2005 06:23:59 +0000 (UTC) Subject: choice of gcc version for Erlang on ARM/XScale/PXA References: <17291.2083.605084.227724@alkaid.it.uu.se> Message-ID: Mikael Pettersson user.it.uu.se> writes: > > Could those that have built Erlang for ARM/XScale/PXA > machines please report exactly which gcc versions they > have been using, including what ARM patches if any they > applied to gcc? > > /Mikael > Cross compile on i686 Linux with gcc-3.3.5-glibc-2.2.5 targeting nslu2-linux. http://cvs.sourceforge.net/viewcvs.py/nslu/unslung/make/erlang.mk?view=log -Brian Zhou From erlang@REDACTED Wed Nov 30 09:45:48 2005 From: erlang@REDACTED (Peter Lund) Date: Wed, 30 Nov 2005 09:45:48 +0100 Subject: bug in inets or erlang! In-Reply-To: <438CABB6.9070306@hyber.org> References: <20051126145154.E9D0A5911E@bang.trapexit.org> <17288.34698.153071.494212@antilipe.corelatus.se> <438C6BF4.4040105@lundata.se> <438CABB6.9070306@hyber.org> Message-ID: <438D66BC.8070605@lundata.se> Good you have an opionion. Please enlight us! I think it is a bug! There is no real reason why this tiny function should be causing crashes even if the caller asks for a valid time and date, any year in the past, for instance the birth of planet earth year some -6 billion or something... /Peter Claes Wikstrom wrote: > Peter Lund wrote: > >> Yes, the important question here is if: >> >> erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}). >> >> really should crash the code just because it is 1 sec too early? >> No-one seems to have any opinion about it! >> > > I do :-) > > /klacke > From matthias@REDACTED Wed Nov 30 10:20:35 2005 From: matthias@REDACTED (Matthias Lang) Date: Wed, 30 Nov 2005 10:20:35 +0100 Subject: bug in inets or erlang! In-Reply-To: <438D667E.3090509@synap.se> References: <20051126145154.E9D0A5911E@bang.trapexit.org> <17288.34698.153071.494212@antilipe.corelatus.se> <438C6BF4.4040105@lundata.se> <438CABB6.9070306@hyber.org> <438D667E.3090509@synap.se> Message-ID: <17293.28387.241577.871056@antilipe.corelatus.se> > >> erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}). Peter Lund writes: > I think it is a bug! There is no real reason why this tiny function > should be causing crashes even if the caller asks for a valid time and > date, any year in the past, for instance the birth of planet earth year > some -6 billion or something... I don't think anyone is disputing that inets crashing is a bug. There are varying opinions over how important it is and who should fix it. I'm not sure the "squeaky hinge" approach is the best. Making universaltime_to_localtime work for all possible dates in the past and future is nontrivial. Take a look at http://www.twinsun.com/tz/tz-link.htm http://www.tondering.dk/claus/cal/calendar27.txt Matthias From bengt.kleberg@REDACTED Wed Nov 30 10:33:01 2005 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Wed, 30 Nov 2005 10:33:01 +0100 Subject: bug in inets or erlang! In-Reply-To: <17293.28387.241577.871056@antilipe.corelatus.se> References: <20051126145154.E9D0A5911E@bang.trapexit.org> <17288.34698.153071.494212@antilipe.corelatus.se> <438C6BF4.4040105@lundata.se> <438CABB6.9070306@hyber.org> <438D667E.3090509@synap.se> <17293.28387.241577.871056@antilipe.corelatus.se> Message-ID: <438D71CD.3040809@ericsson.com> On 2005-11-30 10:20, Matthias Lang wrote: > Making universaltime_to_localtime work for all possible dates in the > past and future is nontrivial. making universaltime_to_localtime work according to the documentation is almost trivial. it says: ''Converts Universal Time Coordinated (UTC) date and time to local date and time, if this is supported by the underlying OS. Other- wise, no conversion is done, and {Date1, Time1} is returned.'' i.e. if the conversion fails, just return the input. bengt From ulf.wiger@REDACTED Wed Nov 30 10:07:10 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 30 Nov 2005 10:07:10 +0100 Subject: bug in inets or erlang! Message-ID: I agree that, given the type of input argument, it's not obvious why this function should stop working before some arbitrary point in time - if it's not the beginning of time, but I assume that would be {{0,0,0},{0,0,0}}. OTOH, Coordinated Universal Time (UTC) didn't exist before 1972, so what would be a correct return value before then? Also time zones haven't always looked the same. The U.S. introduced four time zones on Nov. 18, 1883. So chances are that any conversion from UTC to localtime given very old dates would have to operate on timezone definitions that didn't exist at the time. What, then, is the significance of the result? /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Peter Lund > Sent: den 30 november 2005 09:46 > To: Claes Wikstrom > Cc: Peter Lund; matthias@REDACTED; erlang-questions@REDACTED > Subject: Re: bug in inets or erlang! > > Good you have an opionion. Please enlight us! > > I think it is a bug! There is no real reason why this tiny > function should be causing crashes even if the caller asks > for a valid time and date, any year in the past, for instance > the birth of planet earth year some -6 billion or something... > > /Peter > > Claes Wikstrom wrote: > > > Peter Lund wrote: > > > >> Yes, the important question here is if: > >> > >> erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}). > >> > >> really should crash the code just because it is 1 sec too early? > >> No-one seems to have any opinion about it! > >> > > > > I do :-) > > > > /klacke > > > > > From Jouni.Ryno@REDACTED Wed Nov 30 11:00:28 2005 From: Jouni.Ryno@REDACTED (Jouni =?ISO-8859-1?Q?Ryn=F6?=) Date: Wed, 30 Nov 2005 12:00:28 +0200 Subject: bug in inets or erlang! In-Reply-To: References: Message-ID: <1133344829.11491.8.camel@adic> On Wed, 2005-11-30 at 10:07 +0100, Ulf Wiger (AL/EAB) wrote: > I agree that, given the type of input argument, it's > not obvious why this function should stop working > before some arbitrary point in time - if it's not > the beginning of time, but I assume that would be > {{0,0,0},{0,0,0}}. > There's no year zero in the time system we are using, only -2, -1, 1, 2 ... > OTOH, Coordinated Universal Time (UTC) didn't > exist before 1972, so what would be a correct > return value before then? > > Also time zones haven't always looked the same. > The U.S. introduced four time zones on Nov. 18, > 1883. So chances are that any conversion from > UTC to localtime given very old dates would have > to operate on timezone definitions that didn't > exist at the time. What, then, is the significance > of the result? > > /Uffe And before that towns used their own local time ... One could use julian data, but event that goes a limited amount of time to the past. Fortunately, not so far, that the drifting of the continents is not significant ... "Julian Day or Julian Date is a continuous count of days and fractions, started in January 1st 4713 BC (-4712 in the astronomical almanac) at Greenwich mean noon (12 UT)" Jouni -- Jouni Ryn? mailto://Jouni.Ryno@REDACTED/ http://www.geo.fmi.fi/~ryno/ Finnish Meteorological Institute http://www.fmi.fi/ Space Research http://www.geo.fmi.fi/ P.O.BOX 503 Tel (+358)-9-19294656 FIN-00101 Helsinki FAX (+358)-9-19294603 Finland priv-GSM (+358)-50-5302903 "It's just zeros and ones, it cannot be hard" From raimo@REDACTED Wed Nov 30 11:40:29 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 30 Nov 2005 11:40:29 +0100 Subject: bug in inets or erlang! References: <20051126145154.E9D0A5911E@bang.trapexit.org>, <17288.34698.153071.494212@antilipe.corelatus.se>, <438C6BF4.4040105@lundata.se> Message-ID: We intend to fix this problem in a later release of R10B. The problem is most probably that the stat() call done by file:read_file_info/1 returns -1 in the modification time field for some strange situation in your FreeBSD box. That will we fix by returning a #file_info.mtime value of 'undefined'. The inets application will also be fixed to handle the new field value. Other applications using the mtime field be warned! Oh, and you are running R10B-6 (erts-5.4.8). The erts revision number is the more interesting to us "OTP people". I think erlang:universaltime_to_localtime/1 should crash for a date before the start of the Unix EPOCH. It checks its fields for any value that might upset mktime() on any Unix. The question is if calendar:universal_time_to_local_time/1 could do anything better, but it is actually documented to not accept dates before Jan 1 1970. For such calculations there are the gregorian time functions in the calendar module. The invalid date should not have been generated at all. erlang@REDACTED (Peter Lund) writes: > Yes, the important question here is if: > > erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}). > > really should crash the code just because it is 1 sec too early? No-one seems to have any opinion about it! > > I am running on R10B (5.4.8). How do you figure out which "R10B-NN" it is? > > > Regarding why inets made this call when I tried to surf to "/" on my server I do not know. I hoped that some OTP person should fix this. The index.html on the DocumentRoot place was not even close to 36 years old (just a couple of months). > > /Peter > > Matthias Lang wrote: > > >Hi, > > > >I started off by wondering why universaltime_to_localtime() doesn't > >work for the date you gave. The relevant files are > > erts/emulator/beam/bif.c and erts/emulator/beam/erl_time_sup.c. In > > univ_to_local(), there's a rangecheck on the year. If it's less than > >BASEYEAR, the call fails. BASEYEAR is 1970. Real men don't read > >manuals, but it'd help all the sissies like me if the manual gave a > >clue about that. > > > >The other question is easier to answer---your trace provides all the > >information. inets calls univeraltime_to_localtime/1 with an argument > > from 1969 because the file you tried to get inets to serve has a > > modification time from 1969. Take a look at the log to see which file > >it was. > > > >Matthias > > > >---------------------------------------------------------------------- > > > >peter writes: > > > > > After my FreeBSD server running erlang was restarted, suddenly > > > INETS was not comming up as it was expected to. In the inets > > > error_log I found: > > > > > more error_log_16111 > > > [26/Nov/2005:13:14:42 -0000] reporting error: traverse exit from apply: mod_get: > > > do => > > > {badarg,[{erlang,universaltime_to_localtime,[{{1969,12,31},{23,59,59}}]}, > > > {calendar,local_time_to_universal_time_dst,1}, > > > {httpd_util,rfc1123_date,1}, > > > {mod_get,get_modification_date,1}, > > > {mod_get,do_get,1}, > > > {httpd_response,traverse_modules,2}, > > > {httpd_response,generate_and_send_response,1}, > > > {httpd_request_handler,respond,3}]} > > > > > WHY is inets calling erlang:universaltime_to_localtime/1 with > > [{{1969,12,31},{23,59,59}}] ?? Looks like a potential bugg to me OR > > should this bug actually be located to the erlang module instead? > > Should this call really result in a crach? > > > > Anyhow to get inets up and running again I had to patch the > > calendar.erl module catching for this crash and in that case return > > {{1970,1,1},{0,0,0}}. > > What need to change here erlang or some > > module in inets? > > > > /PeterPeter Lund > > > _________________________________________________________ > > > Sent using Mail2Forum (http://m2f.sourceforge.net) > > > > > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo@REDACTED Wed Nov 30 11:44:27 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 30 Nov 2005 11:44:27 +0100 Subject: bug in inets or erlang! References: <438D667E.3090509@synap.se>, <17293.28387.241577.871056@antilipe.corelatus.se>, <438D71CD.3040809@ericsson.com> Message-ID: It also says: Failure: badarg if Date1 or Time1 do not denote a valid date or time. Unfortunately it does not say what is a valid date or time. bengt.kleberg@REDACTED (Bengt Kleberg) writes: > On 2005-11-30 10:20, Matthias Lang wrote: > > > Making universaltime_to_localtime work for all possible dates in the > > past and future is nontrivial. > > making universaltime_to_localtime work according to the documentation > is almost trivial. it says: > > ''Converts Universal Time Coordinated (UTC) date and time to local > date and time, if this is supported by the underlying > OS. Other- > wise, no conversion is done, and {Date1, Time1} is > returned.'' > > > i.e. if the conversion fails, just return the input. > > > bengt -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From peterl@REDACTED Wed Nov 30 09:44:46 2005 From: peterl@REDACTED (Peter Lund) Date: Wed, 30 Nov 2005 09:44:46 +0100 Subject: bug in inets or erlang! In-Reply-To: <438CABB6.9070306@hyber.org> References: <20051126145154.E9D0A5911E@bang.trapexit.org> <17288.34698.153071.494212@antilipe.corelatus.se> <438C6BF4.4040105@lundata.se> <438CABB6.9070306@hyber.org> Message-ID: <438D667E.3090509@synap.se> Good you have an opionion. Please enlight us! I think it is a bug! There is no real reason why this tiny function should be causing crashes even if the caller asks for a valid time and date, any year in the past, for instance the birth of planet earth year some -6 billion or something... /Peter Claes Wikstrom wrote: > Peter Lund wrote: > >> Yes, the important question here is if: >> >> erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}). >> >> really should crash the code just because it is 1 sec too early? >> No-one seems to have any opinion about it! >> > > I do :-) > > /klacke > From bengt.kleberg@REDACTED Wed Nov 30 12:54:04 2005 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Wed, 30 Nov 2005 12:54:04 +0100 Subject: quoting In-Reply-To: References: Message-ID: <438D92DC.1000108@ericsson.com> On 2005-11-29 17:26, Christian S wrote: > This is mostly a me-too message. I too use binaries for strings often, > and feel the lack of a 'binaries' module (like there is a 'string' and > a 'lists' module that are useful for the usual way to do strings). I > feel a jungerl lib idea growing. > > So this question goes out to all readers: > What interfaces do you chose to use for your utility functions? > > Personally, I use something like this frequently: > > skip(<<"abc:def">>, $:) to get <<"def">> > > piks(<<"abc:def">>, $:) to get <<"abc">> > > divide(<<"abc:def">>, $:) to get {<<"abc">>, <<"def">>} (like joe's > but only single-char divider) > > match(Bin, RE) -> regexp:match(binary_to_list(Bin), RE). > > part(<<"abcdef">>, 3, 2) -> <<"cd">>. could the names be made more consistent with the existing erlang libraries by using something like the names in lists module? dropwhile/2, takewhile/2, sub/3 (replace list with binary or set) and from string module: tokens/2 bengt, who thinks tokens is a misleading name, but realise that it would be really difficult to change. From alex.arnon@REDACTED Wed Nov 30 13:44:24 2005 From: alex.arnon@REDACTED (Alex Arnon) Date: Wed, 30 Nov 2005 14:44:24 +0200 Subject: Attention Debian & Ubuntu users - Erlang 10.b.8-2 available! In-Reply-To: <200511291410.19956.neumann@lostwebsite.net> References: <200511281829.40228.neumann@lostwebsite.net> <200511291410.19956.neumann@lostwebsite.net> Message-ID: <944da41d0511300444x27c73825l62ed336e6ad52247@mail.gmail.com> What is the status of the VIM Erlang mode? Last time I tested it autoindent was practically unimplemented. On 11/29/05, Fran?ois-Denis Gonthier wrote: > > 'lo again > > I forgot to mention that the binary packages I've built are for i386 only. > I > don't have access to any Outer Platforms. > > Interrested people can still build the source package themselves, but once > the > package reach Debian, it'll be auto-builded for all other platforms. > > T-y > > F-D > > On 28 November 2005 18:29, Fran?ois-Denis Gonthier wrote: > > Hello erlang-questions, > > > > after quite a bit of struggling over the weekend, I finally managed to > > build version 2 of my improved Erlang packages for Debian & Ubuntu. > > > > You can get the packages at: > > > > http://neutronic.mine.nu/unstable > > > > or through apt by adding: > > > > deb http://neutronic.mine.nu/ unstable/ > > deb-src http://neutronic.mine.nu/ unstable/ > > > > to /etc/apt/sources.list > > > > and do: > > > > apt-get install -t . erlang, to upgrade from 10.b.7-1 > > > > The package you will get are: > > > > erlang-mode, the emacs mode alone > > erlang-base, architecture dependent files > > erlang-base-hipe, HiPE enabled architecture dependent files > > erlang-nox, X11 independant applications > > erlang-x11, applications that uses GS and thus X11 > > erlang-src, source files for the system (*.erl, *.hrl) > > > > If you want to install anew, you'll only have too choose between the > > mutually exclusive erlang-base and erlang-base-hipe and choose amongst > the > > other package to suit your needs. (You probably need erlang-nox at > least). > > > > The Ubuntu-friendly packages are at: > > http://neutronic.mine.nu/ubuntu-breezy. This is not a apt repository > (yet), > > so please download and install version 2 manually through dpkg. > > > > I'll try to push this package through the main Debian archives ASAP. > > > > I'll try to see if I can package the Vim Erlang mode and ESense before > > christmas. Both should be easy. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From chsu79@REDACTED Wed Nov 30 14:15:01 2005 From: chsu79@REDACTED (Christian S) Date: Wed, 30 Nov 2005 14:15:01 +0100 Subject: quoting In-Reply-To: <438D92DC.1000108@ericsson.com> References: <438D92DC.1000108@ericsson.com> Message-ID: 2005/11/30, Bengt Kleberg : > could the names be made more consistent with the existing erlang > libraries by using something like the names in lists module? > dropwhile/2, takewhile/2, sub/3 (replace list with binary or set) > > and from string module: > tokens/2 > > > bengt, who thinks tokens is a misleading name, but realise that it would > be really difficult to change. That's reasonable objections. I was mostly focusing on module interface, and not so much names. Via http://www.planeterlang.org/ I noticed the existence of a library targeting string-use of binaries: http://capflam.org/wp-content/files/stream/stream.html I haven't tried how I like that interface, but at least it is code already written. From lennart.ohman@REDACTED Wed Nov 30 14:28:09 2005 From: lennart.ohman@REDACTED (=?iso-8859-1?Q?Lennart_=D6hman?=) Date: Wed, 30 Nov 2005 14:28:09 +0100 Subject: bug in inets or erlang! In-Reply-To: Message-ID: <200511301328.jAUDS9k19958@IPOfCard1.guest-tek.com> Not to mention that a function which works for *any* date/time must also take into account what calendar is to be used. The gregorian one we use (mostly) in the world today was invented in the late 16th century. The transition between the Julian calendar and the Gregorian means removing days. So it also becomes important to know the "juristiction" you want to calculate dates for in order to know which local dates that actually are valid. In Sweden for instance we did not change until mid 18th century. And in the beginning of the 18th century "we" actually had a calendar of our own while trying to go "slowly" over to the Gregorian calendar. For instance in Sweden the date 1712-02-30 is perfectly alright. It was then decided that since they did not get anywhere with the reform, it would be better to go back to the Julian calendar before being able to agree on going to the Gregorian calendar in one leap. Not to talk about Russia where the change was not done until after the revolution. Best Regards, Lennart ------------------------------------------------------------- Lennart Ohman office : +46-8-587 623 27 Sj?land & Thyselius Telecom AB cellular: +46-70-552 6735 Sehlstedtsgatan 6 fax : +46-8-667 8230 SE-11528, STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Ulf Wiger (AL/EAB) Sent: den 30 november 2005 10:07 To: Peter Lund Cc: erlang-questions@REDACTED Subject: RE: bug in inets or erlang! I agree that, given the type of input argument, it's not obvious why this function should stop working before some arbitrary point in time - if it's not the beginning of time, but I assume that would be {{0,0,0},{0,0,0}}. OTOH, Coordinated Universal Time (UTC) didn't exist before 1972, so what would be a correct return value before then? Also time zones haven't always looked the same. The U.S. introduced four time zones on Nov. 18, 1883. So chances are that any conversion from UTC to localtime given very old dates would have to operate on timezone definitions that didn't exist at the time. What, then, is the significance of the result? /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Peter Lund > Sent: den 30 november 2005 09:46 > To: Claes Wikstrom > Cc: Peter Lund; matthias@REDACTED; erlang-questions@REDACTED > Subject: Re: bug in inets or erlang! > > Good you have an opionion. Please enlight us! > > I think it is a bug! There is no real reason why this tiny > function should be causing crashes even if the caller asks > for a valid time and date, any year in the past, for instance > the birth of planet earth year some -6 billion or something... > > /Peter > > Claes Wikstrom wrote: > > > Peter Lund wrote: > > > >> Yes, the important question here is if: > >> > >> erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}). > >> > >> really should crash the code just because it is 1 sec too early? > >> No-one seems to have any opinion about it! > >> > > > > I do :-) > > > > /klacke > > > > > From vlad.xx.dumitrescu@REDACTED Wed Nov 30 14:39:45 2005 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Wed, 30 Nov 2005 14:39:45 +0100 Subject: quoting Message-ID: <11498CB7D3FCB54897058DE63BE3897CD11694@esealmw105.eemea.ericsson.se> > From: Joe Armstrong (AL/EAB) > 1) printing binaries <<"...">> properly has had a > strange effect on my programming > I now use them far more than I ever did before - this > is because they get printed > nicely - I think I was often using atoms just because I > could see them when my > program failed. Yes, that's what a convenient syntax tends to do! :-) > 2) We don't need or want a string type. That's what a binary is. > IMHO we need a character type - so we can distinguish $a from 97. I think it amounts to almost the same thing in practice. What I'd need is something that is distinguishable from regular lists, but with list semantics and hopefully even (similar) syntax. A character type will be helpful even in the case that there will be pressure to support Unicode in a better way, because the upgrade won't be visible at source code level. I think the most difficult issue is how to handle "old-style" strings: they have still to be lists of integers so that old code doesn't break. So the new strings, will get a different notation, like <<"..">> (which is bound to be more verbose) and might create confusion, especially for newcomers. Regards, Vlad From mikpe@REDACTED Wed Nov 30 14:50:40 2005 From: mikpe@REDACTED (Mikael Pettersson) Date: Wed, 30 Nov 2005 14:50:40 +0100 Subject: choice of gcc version for Erlang on ARM/XScale/PXA In-Reply-To: References: <17291.2083.605084.227724@alkaid.it.uu.se> Message-ID: <17293.44592.320925.42402@alkaid.it.uu.se> Brian Zhou writes: > Mikael Pettersson user.it.uu.se> writes: > > > > > Could those that have built Erlang for ARM/XScale/PXA > > machines please report exactly which gcc versions they > > have been using, including what ARM patches if any they > > applied to gcc? > > > > /Mikael > > > > Cross compile on i686 Linux with gcc-3.3.5-glibc-2.2.5 targeting nslu2-linux. > http://cvs.sourceforge.net/viewcvs.py/nslu/unslung/make/erlang.mk?view=log My gcc-3.3.6 on armv5b does not have the bug, so your gcc-3.3.5 is most likely also OK. From mikpe@REDACTED Wed Nov 30 14:56:08 2005 From: mikpe@REDACTED (Mikael Pettersson) Date: Wed, 30 Nov 2005 14:56:08 +0100 Subject: choice of gcc version for Erlang on ARM/XScale/PXA In-Reply-To: <001401c5f527$38116180$4800a8c0@studioa> References: <17292.22424.234854.625323@alkaid.it.uu.se> <001401c5f527$38116180$4800a8c0@studioa> Message-ID: <17293.44920.863561.773197@alkaid.it.uu.se> Marthin Laubscher writes: > Thanks for the heads up Mikael. I did the test on the gumstix and got: > # erl > Erlang (BEAM) emulator version 5.4.10 [source] > > Eshell V5.4.10 (abort with ^G) > 1> io:format("~.16#, ~.16#~n", [16#001000000000 bsr 8,16#001000000000 bsl > 8]). > 16#10000000, 16#100000000000 > ok > 2> > > Would you regard that as indication that I don't have the bug? (i.e. correct > patches was installed?) Your system seems to shift bignums correctly. I looked through gumstix' patches for gcc-3.4.2, and they essentially match what I'm using with gcc-3.4.4. So I'm leaving towards the theory that the bug was introduced after gcc-3.4.2. The gcc/arm maintainers have confirmed the bug, but no patch has been published yet. /Mikael From thomasl_erlang@REDACTED Wed Nov 30 16:18:55 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Wed, 30 Nov 2005 07:18:55 -0800 (PST) Subject: geometric memory growth In-Reply-To: Message-ID: <20051130151855.41003.qmail@web34403.mail.mud.yahoo.com> --- "Ulf Wiger (AL/EAB)" wrote: > > Thomas Lindgren wrote: > > > > > and > > > semantically, the access _has_ to be done at the > binding > > occurrence - if it is delayed, one has to lug the > entire > > record along to make sure that the record field > access > > has the same result as it would have had at the > binding > > occurrence. > > > > I would say that semantically this evaluation MUST > NOT be > > done at the binding occurrence, IF we can observe > a > > functional difference compared to the original > program > > evaluated naively. > > In the case of a record access (assuming that a > guard test > or other exists that asserts that it is in fact a > record), > you can't observe a functional difference in this > case. As long as we know the variable has the right record type, yes. > Of course, there could > be > other, similar cases where the programmer simply > doesn't > realise that by being more specific, the compiler is > given > more opportunities to make the code efficient.) Common Lisp compilers (such as cmucl and sbcl) provide such feedback, so it can be done. > Of course, the really naiive apporach to binding the > fun's > environment would be to include _all_ bound > variables > every time. Well sort of, as long as you keep track of shadowed variables properly, but going that far is not necessary :-) (It's also an example of a transformation which is safe but generally not profitable.) > > You have told the compiler that the > > program shall behave AS IF the evaluation occurs > inside the > > closure; changing program behaviour is usually > considered > > bad form. > > So if I wrote: > > f() -> > X = 5, > fun() -> X + 5 end. > > it would be bad form to reduce to. > > f() -> > fun() -> 10 end. > It's safe to do this because the code behaves the same way in both cases (functionally, not operationally -- memory allocation may differ, for example). The compiler also judged it to be profitable as well, from what it sounds like. > Apparently, it's OK to do such constant propagation > in some cases, but not in others. That's fine, I > don't question that. The question is: where do you > draw the line? The precise actions of the beam compiler is basically up to Bj?rn et al. Can't help you there :-) But if turning this optimization on/off makes the program behave (functionally) differently, then the optimization is not safe. If the program runs more slowly with the optimization on, the optimization is not profitable. Those are the rules of thumb. Unsafe is a bug, unprofitable is disappointing. (The "proper" way of reasoning for a compiler is to talk about ALL programs, rather than specific ones. So, an optimization has to be safe for all programs; while profitability is a tradeoff by the compiler writer, influenced by the compiler users, of course.) (And let's not even get into the topic of interacting optimization passes :-) > Of course, the compiler can consider none of those, > since it > has no way of knowing. It can of course guess... If > it > guessed in my case, it was completely off base. > Yes, that's why general code motion can be tricky. Production compilers tend to use carefully tuned heuristics or profiling to decide. (It's essentially a harder version of guessing the number of iterations of a loop.) Often, expensive operations are simply left where they occur, while lightweight operations can be moved around (since the cost of being wrong is slight). > > The compiler usually resorts to heuristics at this > point. For > > a production compiler, the idea is usually to > avoid making > > the rare but spectacularly bad decisions :-) > > And in this particular case, importing the whole > record > was a spectacularly bad decision (whether it was > mine or > the compilers.) To make it clearer, the compiler has to be careful not to make spectacularly bad decisions on its own. For example, if you had written your OPTIMIZED code at first and the compiler then turned it into the original code -- ie, if the compiler moved the record INTO the closure -- then you probably would have complained bitterly. (I know I would :-) Best, Thomas __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com From thomasl_erlang@REDACTED Wed Nov 30 16:50:19 2005 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Wed, 30 Nov 2005 07:50:19 -0800 (PST) Subject: quoting In-Reply-To: Message-ID: <20051130155019.93907.qmail@web34405.mail.mud.yahoo.com> --- "Joe Armstrong (AL/EAB)" wrote: > Comments: > > 1) printing binaries <<"...">> properly has had a > strange effect on my programming > I now use them far more than I ever did before - > this is because they get printed > nicely - I think I was often using atoms just > because I could see them when my > program failed. I think printing binaries in a string-like manner is very handy. Please do introduce it, OTP. > IMHO we need a character type - so we can > distinguish $a from 97. Richard O'Keefe's postings here on the topic of modern character sets have made me realize this is not a trivial issue, alas. > A small number of well-chosen primitive on binaries > would be very useful. Yes. > Somebody else can tell the list what these should > be - and how yecc and leex can make use of > them :-) My lex.erl in jungerl can already do lexing over binaries (it works for the examples I have tried, at least). Only 8-bit characters though. I haven't measured how this compares to lexing over lists. The "lex driver" can probably be optimized a bit in both cases. Best, Thomas __________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/ From neumann@REDACTED Wed Nov 30 17:00:44 2005 From: neumann@REDACTED (=?iso-8859-1?q?Fran=E7ois-Denis_Gonthier?=) Date: Wed, 30 Nov 2005 11:00:44 -0500 Subject: Attention Debian & Ubuntu users - Erlang 10.b.8-2 available! In-Reply-To: <944da41d0511300444x27c73825l62ed336e6ad52247@mail.gmail.com> References: <200511281829.40228.neumann@lostwebsite.net> <200511291410.19956.neumann@lostwebsite.net> <944da41d0511300444x27c73825l62ed336e6ad52247@mail.gmail.com> Message-ID: <200511301100.49642.neumann@lostwebsite.net> On 30 November 2005 07:44, Alex Arnon wrote: I'd be please to package a better Vim mode for Erlang if somebody give me an URL to it. I don't use Vim at all so I won't know what mode is the best. > What is the status of the VIM Erlang mode? Last time I tested it autoindent > was practically unimplemented. > > On 11/29/05, Fran?ois-Denis Gonthier wrote: > > 'lo again > > > > I forgot to mention that the binary packages I've built are for i386 > > only. I > > don't have access to any Outer Platforms. > > > > Interrested people can still build the source package themselves, but > > once the > > package reach Debian, it'll be auto-builded for all other platforms. > > > > T-y > > > > F-D > > > > On 28 November 2005 18:29, Fran?ois-Denis Gonthier wrote: > > > Hello erlang-questions, > > > > > > after quite a bit of struggling over the weekend, I finally managed to > > > build version 2 of my improved Erlang packages for Debian & Ubuntu. > > > > > > You can get the packages at: > > > > > > http://neutronic.mine.nu/unstable > > > > > > or through apt by adding: > > > > > > deb http://neutronic.mine.nu/ unstable/ > > > deb-src http://neutronic.mine.nu/ unstable/ > > > > > > to /etc/apt/sources.list > > > > > > and do: > > > > > > apt-get install -t . erlang, to upgrade from 10.b.7-1 > > > > > > The package you will get are: > > > > > > erlang-mode, the emacs mode alone > > > erlang-base, architecture dependent files > > > erlang-base-hipe, HiPE enabled architecture dependent files > > > erlang-nox, X11 independant applications > > > erlang-x11, applications that uses GS and thus X11 > > > erlang-src, source files for the system (*.erl, *.hrl) > > > > > > If you want to install anew, you'll only have too choose between the > > > mutually exclusive erlang-base and erlang-base-hipe and choose amongst > > > > the > > > > > other package to suit your needs. (You probably need erlang-nox at > > > > least). > > > > > The Ubuntu-friendly packages are at: > > > http://neutronic.mine.nu/ubuntu-breezy. This is not a apt repository > > > > (yet), > > > > > so please download and install version 2 manually through dpkg. > > > > > > I'll try to push this package through the main Debian archives ASAP. > > > > > > I'll try to see if I can package the Vim Erlang mode and ESense before > > > christmas. Both should be easy. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From ulf.wiger@REDACTED Wed Nov 30 17:23:55 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 30 Nov 2005 17:23:55 +0100 Subject: geometric memory growth Message-ID: Thomas Lindgren wrote: > > > In the case of a record access (assuming that a guard > > test or other exists that asserts that it is in fact > > a record), you can't observe a functional difference > > in this case. > > As long as we know the variable has the right record type, yes. Very good. > (The "proper" way of reasoning for a compiler is to > talk about ALL programs, rather than specific ones. > So, an optimization has to be safe for all programs; > while profitability is a tradeoff by the compiler > writer, influenced by the compiler users, of course.) So we agreed that it's safe in this case (when you know that it's really a record). Now to whether it is always profitable... > Often, expensive operations are simply left where they > occur, while lightweight operations can be moved > around (since the cost of being wrong is slight). On my machine, moving a record field selection outside the fun costs about 0.07 usec (mean value based on 10,000 iterations). Of course, on a gumstix, it would be more. The cost doesn't quite seem to scale linearly - moving 25 record field accesses out of the fun added 0.6 usec to the cost, compared to just inheriting the record. I don't know if that qualifies as cheap enough. Of course, if we're talking >10 field selections, it would amount to > To make it clearer, the compiler has to be careful not > to make spectacularly bad decisions on its own. To make my point clearer, I think this particular behaviour should be documented _somewhere_. What happened was oviously a combination of two things: - since State#state.channel was (understandably) interpreted as basically a call to element(P,State), State was bound in the fun's environment. - During message passing, not only does the runtime system copy the data - it expands all relative references into individual copies (I knew this happened when sending between nodes, but hadn't considered that it also might happen during local message passing.) As far as I can tell, none of these things are actually written out anywhere in the documentation, either in the 4.7 spec, in the reference manual, or in the efficiency guide. To boot, the "bug" was very difficult to spot, and afterwards, I "spotted" it in several other places, but decided that it was safe, since the fun would never be passed in a message, but was only used on the local process heap and then discarded. Alternatively, the compiler could lift record field accesses out of the fun, possibly with a limit of say 10, and it still would never be spectacularly bad or unsafe. Lifting 10 accesses essentially doubled the cost of the function, which is to say that the cost went up from about 0.3 usec to 0.6 usec. Opinions may vary, but as a representative of a project that builds resonably performance-critical software in Erlang, I would still rather take a very slight performance hit in order to have a treatment of a reasonably commonplace pattern that works wonderfully 99.9% of the time, and kills the system if someone has the bad luck of passing the variable in a message (perhaps as part of a debug printout.) > For example, if you had written your OPTIMIZED code at > first and the compiler then turned it into the > original code -- ie, if the compiler moved the record > INTO the closure -- then you probably would have > complained bitterly. (I know I would :-) Oh, I never get bitter - just passionate. ;-) /Uffe From ulf.wiger@REDACTED Wed Nov 23 14:54:05 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 23 Nov 2005 14:54:05 +0100 Subject: geometric memory growth Message-ID: Here's a subtle bug that caused me about one day's worth of headache: I have process that holds a gen_tcp session, and multiplexes "virtual sessions" on top of it. When running a benchmark, I noticed exponential memory growth, and it took me a while to notice that the growth was actually taking place in the innocent benchmark loop (about 7 lines of code, basically this: vcc_rpc2(Channel) -> vccTransport:msg(Channel, 0, vcc_rex, {self(), ping}, [{temp_channel,true}]), receive {_, _, pong} -> ok; end. which amounts to an ets:lookup, a gen_server:call() and waiting for a message where the third element is 'pong') 17 iterations made the VM allocate 1 GB of RAM. The problem? (finally diagnosed once Bj?rn G tipped me off about erts_debug:size(Term) - thanks Bj?rn!) The second element of the message was a fun: SendF = fun(To, Msg) -> msg(State#state.channel, ChNo, To, Msg) end, Horrid, isn't it? Writing it this way, causes the _whole_ State to be bound inside the fun. And State of course contained, among other things, the metadata for the virtual sessions (e.g. other SendF instances.) This wasn't much of a problem as long as everything was local references on the same heap (it probably would have shown after a while, though), but when the fun was passed in a message to another process, all relative references were flattened out, and the size of the fun doubled in each iteration. The obvious fix: Channel = State#state.channel, SendF = fun(To, Msg) -> msg(Channel, ChNo, To, Msg) end, Now, wouldn't it be great if the compiler could figure out how to do this at compile-time? /Uffe From jim@REDACTED Thu Nov 17 09:28:54 2005 From: jim@REDACTED (Jim Larson) Date: Thu, 17 Nov 2005 00:28:54 -0800 Subject: JSON? In-Reply-To: Your message of "Tue, 15 Nov 2005 09:12:39 +0100." Message-ID: <200511170828.jAH8SsQc056959@krumkake.jetcafe.org> I've recieved approval to release the JSON library for Erlang! I'll get it cleaned up and released tomorrow. In message Joe Armstrong writes: > >IMHO you might get a nicer mapping if you changed strings to binaries. I've pondered that. It's a little awkward with the quoting and unquoting you need to do. Binaries also imply that you'd need to choose a Unicode format for the internal representation that would be good for all applications. >I'd let the parser return an association list (not a dict) - since (probably) >the object is small >and it's nice to be able to print it and pattern match it directly. Yeah - I'd be glad to trade the asymptotic efficiency of dicts for compactness and nicer printing. I liked dicts until they started showing up in error reports. I'll probably change this in a future release. Pattern matching? This means you'd have to: * have the JSON decoder always sort the assoc-list; * remember to maintain your pattern assoc-list in sorted order; * have optional fields sort after mandatory fields. Am I forgetting some new language feature? Thanks for your thoughts! Jim Larson jim@REDACTED From bmk@REDACTED Tue Nov 29 19:00:13 2005 From: bmk@REDACTED (Micael Karlberg) Date: Tue, 29 Nov 2005 19:00:13 +0100 Subject: bug in inets or erlang! In-Reply-To: <438C8912.40807@lundata.se> References: <20051126145154.E9D0A5911E@bang.trapexit.org> <17288.34698.153071.494212@antilipe.corelatus.se> <438C6BF4.4040105@lundata.se> <438C7D0E.5030705@erix.ericsson.se> <438C8912.40807@lundata.se> Message-ID: <438C972D.8030909@erix.ericsson.se> It's not an unusual call. It does this every time it sends a reply to a request (if you have the mod_get module). The thing is that for some reason the file_info record returned by file:read_file_info(Path) had a strange mdate (modification date). I will look into this some more tomorrow. /BMK Peter Lund wrote: > >> Micael Karlberg wrote: Hi, >> >> The inets web-server get's the (modification) time from the file-info >> record of the file: file:read_file_info(Path). What does this call >> give you? >> >> /BMK > > > > Nothing unusual sorry! I got this: > > (pds@REDACTED)6> file:read_file_info("index.html"). > {ok,{file_info,360, > regular, > read_write, > {{2005,11,29},{12,15,18}}, > {{2005,10,17},{18,44,2}}, > {{2005,10,17},{18,44,2}}, > 33188, > 1, > 1042, > 1723200, > 426909, > 1001, > 1001}} > (pds@REDACTED)7> > > As Mattias said. This may be difficult to reproduce. I don't know what > caused inets to make that failing call (except for what I see in the > stack trace I posted originally). I have only seen it once and that was > after a brute force power down of the FreeBSD system (removal of > electrical power) and then turning it on again some 4-5 hours later. > > /Peter > >> Peter Lund wrote: >> >>> Yes, the important question here is if: >>> >>> erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}). >>> >>> really should crash the code just because it is 1 sec too early? >>> No-one seems to have any opinion about it! >>> >>> I am running on R10B (5.4.8). How do you figure out which "R10B-NN" >>> it is? >>> >>> >>> Regarding why inets made this call when I tried to surf to "/" on my >>> server I do not know. I hoped that some OTP person should fix this. >>> The index.html on the DocumentRoot place was not even close to 36 >>> years old (just a couple of months). >>> >>> /Peter >>> >>> Matthias Lang wrote: >>> >>>> Hi, >>>> >>>> I started off by wondering why universaltime_to_localtime() doesn't >>>> work for the date you gave. The relevant files are >>>> erts/emulator/beam/bif.c and erts/emulator/beam/erl_time_sup.c. In >>>> univ_to_local(), there's a rangecheck on the year. If it's less than >>>> BASEYEAR, the call fails. BASEYEAR is 1970. Real men don't read >>>> manuals, but it'd help all the sissies like me if the manual gave a >>>> clue about that. >>>> >>>> The other question is easier to answer---your trace provides all the >>>> information. inets calls univeraltime_to_localtime/1 with an argument >>>> from 1969 because the file you tried to get inets to serve has a >>>> modification time from 1969. Take a look at the log to see which file >>>> it was. >>>> >>>> Matthias >>>> >>>> ---------------------------------------------------------------------- >>>> >>>> peter writes: >>>> >>>> > After my FreeBSD server running erlang was restarted, suddenly >>>> > INETS was not comming up as it was expected to. In the inets >>>> > error_log I found: >>>> > > > more error_log_16111 >>>> > [26/Nov/2005:13:14:42 -0000] reporting error: traverse exit from >>>> apply: mod_get: >>>> > do => >>>> > >>>> {badarg,[{erlang,universaltime_to_localtime,[{{1969,12,31},{23,59,59}}]}, >>>> >>>> > {calendar,local_time_to_universal_time_dst,1}, >>>> > {httpd_util,rfc1123_date,1}, >>>> > {mod_get,get_modification_date,1}, >>>> > {mod_get,do_get,1}, >>>> > {httpd_response,traverse_modules,2}, >>>> > {httpd_response,generate_and_send_response,1}, >>>> > {httpd_request_handler,respond,3}]} >>>> > > > WHY is inets calling erlang:universaltime_to_localtime/1 with >>>> [{{1969,12,31},{23,59,59}}] ?? Looks like a potential bugg to me OR >>>> should this bug actually be located to the erlang module instead? >>>> Should this call really result in a crach? >>>> > > Anyhow to get inets up and running again I had to patch the >>>> calendar.erl module catching for this crash and in that case return >>>> {{1970,1,1},{0,0,0}}. > > What need to change here erlang or some >>>> module in inets? >>>> > > /PeterPeter Lund >>>> > _________________________________________________________ >>>> > Sent using Mail2Forum (http://m2f.sourceforge.net) >>>> >>>> >>>> >>> >>> >> > > From vlad.xx.dumitrescu@REDACTED Fri Nov 18 11:18:25 2005 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Fri, 18 Nov 2005 11:18:25 +0100 Subject: strange? Message-ID: <11498CB7D3FCB54897058DE63BE3897CD111B5@esealmw105.eemea.ericsson.se> Cool! This makes a good case for promoting modules to first-class citizens. Having to track atoms is bad enough, now they can be abstract/parametrized too! :-) /Vlad > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of mbj@REDACTED > Sent: Friday, November 18, 2005 10:43 AM > To: erlang-questions@REDACTED > Subject: strange? > > Here's a late submission to the obfuscation contest. > > Look at the code. Try to figure out what a:c() returns. Run > it on the latest erlang. > > > -module(a). > -compile(export_all). > > c() -> > M = {a, b}, > M:k(a). > > b(k, a) -> > wow. > > k(A, T) -> > element(2, T). > > > > /martin > From joe.armstrong@REDACTED Wed Nov 30 14:25:45 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Wed, 30 Nov 2005 14:25:45 +0100 Subject: bug in inets or erlang! Message-ID: This is very confusing - I didn't bother to read this post because of the heading " bug in .. " - I thought that means that somebody is reporting a bug. But no. What follows is not a discussion of a bug but of a possible design error. I have seen various postings using the words "bug" and "crash" which gives the impression that something is wrong. This is the wrong terminology. Well designed functions either return values or raise exceptions. A function contains a bug if it returns an incorrect value, or returns a value when it should raise an exception or raises an exception when it should return a value. The documentation of universaltime_to_localtime clearly states: Failure: badarg if Date or time do not denote a valid date or time and this precisely what happens - you cannot do meaningful calculations on dates before the start of the epoch concerned and so the time conversion routines should raise exceptions. Now arguably, the function that calls the timer routine might be buggy since it should possibly realise that the method of calculating times is incorrect and revert to a different method (say by using modified Julian dates) - but this is a fault of the caller not the called routine. Silently swallowing the error and creating a negative time (whatever that means) is surely not the correct behaviour. Raising an exception that then causes a crash is a sure-fire way to draw the programmers attention to the problem. At a much higher level in the system we could say that "the system should not crash" but the problem lies here with middle management - the little guy at the bottom was doing his job correctly - he said "hey boss I can't compute anything sensible with this date" but his boss ignored this and the entire system crashed ... /joe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Peter Lund > Sent: den 30 november 2005 09:45 > To: Claes Wikstrom > Cc: Peter Lund; matthias@REDACTED; erlang-questions@REDACTED > Subject: Re: bug in inets or erlang! > > > Good you have an opionion. Please enlight us! > > I think it is a bug! There is no real reason why this tiny function > should be causing crashes even if the caller asks for a valid > time and > date, any year in the past, for instance the birth of planet > earth year > some -6 billion or something... > > /Peter > > Claes Wikstrom wrote: > > > Peter Lund wrote: > > > >> Yes, the important question here is if: > >> > >> erlang:universaltime_to_localtime({{1969,12,31},{23,59,59}}). > >> > >> really should crash the code just because it is 1 sec too early? > >> No-one seems to have any opinion about it! > >> > > > > I do :-) > > > > /klacke > > > From joe.armstrong@REDACTED Tue Nov 29 15:18:12 2005 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Tue, 29 Nov 2005 15:18:12 +0100 Subject: Compiler and PHP questions Message-ID: > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED]On Behalf Of Marc > van Woerkom > Sent: den 29 november 2005 13:45 > To: erlang-questions@REDACTED > Subject: Re: Compiler and PHP questions > > > >1) Does anybody have or is anybody working on a parser > >for php written in erlang - please contact me > > if this is the case. > > I would love to know about this too, as I use PHP for my > present day job. :) > > BTW Perl 6 seems to get implemented in Haskell first: > > http://www.perl.com/pub/a/2005/03/03/pugs_interview.html > > > >

title

> >

hello how are you > > Putting code fragments into HTML is not a good style for > developing (larger) web applications. Oh - why not? - here are two alternatives: Template A

hello

My name is ${name} is live in ... Then you say (essentially) Let name = get_db("name", UserId) in template A or template B

hello

my name is The problem with A IS that have to do all computations *outside* the template. A lot of my template involve messing around with pixel sizes. So if the width of an image is X pixels I need a left-margin of X-2 pixels etc. In style A I would have to say let x = 600 (say) x1 = 600 - 2, in template1 Where template 1 has variables x and x1 If I use function calls I can minimise the number of arguments and do computations on them template2 etc. When I counted the number of arguments flowing into the template I needed far fewer when I can embed function calls in the template, than without. Actually to save arguments I will support both styles :-) But I do not see why it is not good style. Good style to me would be to minimise the number of arguments that have to flow into a template and strictly specify their types > > This has to do with the typical team structure / division > of labour for web teams: > - the web developers do the pure php/perl/.. script code > - the screen designers rule the template files > - the backend folks deliver methods to feed/query the > backend databases Wow - web teams - whatever will they think of next - > > For php we use the smarty template engine. > > A template is instantiated and fed with variable data by > the web application. > The template file contains mainly html/css/javascript and So why is it bad style to have inline code in one language in the template but OK to have inline code in a different language (ie javascript) in the template? > has just extra support for conditional code activiation, > data access (just to the provided variable data) and > simple repetition control, all in a HTML like syntax. > Yuck - IMHO If you're going to have a language have a language but not some weirdo ad hock collection of features with HTML syntax. > A web developer delivers just a plain template file as > result of his work, a template file that just renders the > web page in minimal stylish fashion, with all access to > the internal vars provided. But I'll guess they have to invent extra variables, and things that should be local function calls become external code. Me I'd write:

factorial is And do the computation in-place With a template I'd need an extra variable

factorial ${n} is ${facn} and the code to do the computation would not be near the place where it is used (a sure source of error) > > This is then fed to the screen designers who use their > javascript and DHTML magic to pimp it up. Too low level. The javascript and DHTL should be generated on the fly from higher order functions. I've played with javascript a bit. My web pages just do eval(Str) and Str I create on-the-fly. > > Regards, > Marc > /Joe