From thomas.lindgren Mon Dec 3 13:25:29 2001
From: thomas.lindgren (Thomas Lindgren)
Date: Mon, 3 Dec 2001 13:25:29 +0100
Subject: records
Message-ID:
I get the following very undesirable behaviour for
records.
The program is enclosed as an attachment (my apologies).
Run test:bar/0. Under R7B1 and R8B0, I get the answer
{"aaa", "aaa"}, which means a record of type rec1 is
mistakenly thought to be a record of type rec2.
(Furthermore, since the fields have the same names, but a transposed
order, you also get a nasty return value on top of that.)
Looking at the BEAM code, the basic problem is that
the code doesn't verify that Rec is a record of
the proper type before accessing it. (That is, it doesn't
check that the incoming tuple has the proper arity and
"tag".)
-- Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.erl
Type: application/octet-stream
Size: 552 bytes
Desc: not available
URL:
From etxhste Mon Dec 3 16:58:33 2001
From: etxhste (Hakan Stenholm)
Date: Mon, 3 Dec 2001 16:58:33 +0100 (MET)
Subject: records
Message-ID: <200112031558.QAA08239@avc240.etxb.ericsson.se>
The imidiat problem can be solved by adding a guard
"foo(A, ...) when record(A, ...) ->" to do the type checking.
This entier problem is realy due to the fact that records are not treated as a
unique data type inside the VM (virtual machine) - they are implemented as
tuples. This makes it impossible to distinguish between a record and a tuple
that happens to look like a record, this is also a problem if you have a
function like this:
% this matches both for a tuple and a record (as record is realy a special
% kind of tuple)
f(A) when tuple(A) -> .... ;
% this will never be run
f(A) when record(A,foo_rec) -> ....;
The code above must be rewritten as below to work porperly
f(A) when record(A,foo_rec) -> ....;
f(A) when tuple(A) -> .... ;
It should be noted that all record accesses and updates end up as calls to
element/2 and setelement/3 i.e. tuple manipulating operations, this is done by
the preprocessor during compilation.
Record fieldnames are converted to indexes by the preprocessor as well.
So when the code is actualy run, the VM has no idea that some tuples should
be typechecked as records rather than simple tuples, i.e. records are only
"syntactic suger" and not realy a language entity.
From tony Mon Dec 3 17:32:33 2001
From: tony (Tony Rogvall)
Date: Mon, 03 Dec 2001 17:32:33 +0100
Subject: erlgtk (fix for R8)
Message-ID: <3C0BA921.F8361CE5@bluetail.com>
Finally had some time to release a fix for R8.
(no windows yet :-( Any one using windows now a days? cracked XP I
guess ;-)
Try it !
download at:
http://prdownloads.sourceforge.net/erlgtk/erlgtk-0.9.4.tar.gz
/Tony
From etxhste Mon Dec 3 17:45:15 2001
From: etxhste (Hakan Stenholm)
Date: Mon, 3 Dec 2001 17:45:15 +0100 (MET)
Subject: records (the 2:nd one)
Message-ID: <200112031645.RAA08268@avc240.etxb.ericsson.se>
I got this respons mail from Ulf Wiger:
> Date: Mon, 3 Dec 2001 17:17:41 +0100 (MET)
> From: Ulf Wiger
> X-X-Sender: etxuwig
> To: Hakan Stenholm
> Subject: Re:records
> MIME-Version: 1.0
> Content-Transfer-Encoding: 8bit
> X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by etxb.ericsson.se id
> RAA19018
>
>
> Inte f?r att jag har n?gon inv?ndning mot ditt svar, men jag
> t?nkte i alla fall att jag skulle p?peka att han som skrev
> inl?gget om records, Thomas Lindgren, ?r densamme som f?rel?ste
> p? EUC 2001 om "Cross-Module Optimization of Erlang"
> (http://www.erlang.se/euc/01/thomasl.ps), och grundare av
> HiPE-projektet.
>
> http://www.bluetail.com/~thomasl/
>
> (Det var bl a d?rf?r jag undvek att svara: jag tyckte inte jag
> kunde till?gga n?got som Thomas inte redan visste. D?remot bidrog
> du s?kert till f?rst?elsen hos de andra som inte ?r av Thomas'
> kaliber. Bra, m.a.o.)
>
> /Uffe
which basicly state (for those that don't read swedish) that Thomas Lindgren the
original poster of this thread allready is a aware of all the reasons I
mentioned in my first reply.
ps: sorry about stating the obvious Thomas
pss: I agree that this is not realy a good or expected behaviour
From martin Mon Dec 3 21:16:45 2001
From: martin (Martin J. Logan)
Date: Mon, 03 Dec 2001 14:16:45 -0600
Subject: Multple Application Management
References: <200109182218.f8IMI5M31178@snookles.snookles.com>
Message-ID: <3C0BDDAD.C7F3C915@vailsys.com>
Hello,
I am wondering if anyone can help point me in the correct direction for
the deployment of multimple applications on one node.
Currently I manage applications on a per application basis i.e they are
started individually. I start the runtime system pointing it to the script
and boot files that I genereated for that particular application using
systools. I want to run two applications on the same box so pointing the
system to the script and boot files generated for specific apps is not
feasable. I would like to have all the startup info in one central location
so that all the apps I woudl like started on a box would come up when I start
the the run time system. I have messed with the start.script file but this
requires me to edit it manually which I understand from the docs is not the
preferred way to go about things. Could someone point me tword the proper way
to manage somthing like this? What method lies in accordence with the way the
run time system was designed?
Thanks,
Martin Logan
From rpettit Mon Dec 3 22:44:09 2001
From: rpettit (Rick Pettit)
Date: Mon, 3 Dec 2001 15:44:09 -0600 (CST)
Subject: emfile error
Message-ID:
I have an erlang process which runs as a concurrent TCP server. It
functions as a gateway between non-erlang processes and Erlang processes.
The server listens on a well-known TCP port and spawns a child to handle
each request. The child will parse TCP input and forward the request via
Erlang messaging to the appropriate Erlang server, waiting for a response
(another Erlang message) before responding over TCP and closing the TCP
connection.
The problem is that when the server is hit hard the clients receive an
emfile error, which I understand could be the result of a UNIX process
(the erlang node, in this case) running out of descriptors.
Is this a known problem with concurrent erlang servers? I would not
expect this same error if my server was in C and it fork()'d children, as
each child would then have its own descriptor table and would have very
few entries in it (stdin, stdout, stderr, TCP client socket).
I wonder if the entire node appears to the host OS as a single process
(perhaps one with many threads), in which case I would expect this problem
with most any concurrent server.
Please forgive me if I am doing something silly or am missing some
fundemental coding convention that would have alleviated this problem.
Rick
From kent Mon Dec 3 23:57:09 2001
From: kent (Kent Boortz)
Date: 03 Dec 2001 23:57:09 +0100
Subject: Compiling R8B under OS X
In-Reply-To: Sean Hinde's message of "Sun, 11 Nov 2001 23:48:11 +0000"
References: <90B7EB7B-D6FE-11D5-A143-003065B27BB6@mac.com>
Message-ID:
I have just built R8B on Mac OS X 10.1. I haven't run any test cases
just manage to get a prompt. I don't have time to do any testing on
Mac OS X at the moment.
I went the "easy way" making the linking work as in Mac OS X 10.0. I
don't understand "framework", "bundle" or other Mac OS X concepts and
I don't understand the new "two-level namespace" concept used in Mac
OS X 10.1. Maybe someone else can supply a patch that does linking and
loading of linked in drivers "the Mac OS X way".
http://developer.apple.com/techpubs/macosx/ReleaseNotes/TwoLevelNamespaces.html
I have included an unofficial patch below. It will take a week or two
before we have completed the corrections we want to go into the R8B-1
source release.
Make sure you read the updated README before you begin to build,
kent
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osx.patch
Type: application/octet-stream
Size: 2344 bytes
Desc: Mac OS X 10.1 unofficial patch
URL:
From Chandrashekhar.Mullaparthi Mon Dec 3 23:57:18 2001
From: Chandrashekhar.Mullaparthi (Chandrashekhar Mullaparthi)
Date: Mon, 3 Dec 2001 22:57:18 -0000
Subject: emfile error
Message-ID: <402DD461F109D411977E0008C791C31205E0630A@IMP02MBX>
I dont know how to avoid this limitation. We frequently come across this
problem but in a different way. Sometimes Java clients setup lot of
connections and leave it to the garbage collector to clear the connections.
This is very slow in Java and the server runs out of file descriptors. And
mnesia crashes!!! The way we get around this is to limit the number of
connections from each host, increases the number of file descriptors per
process using the ulimit command on UNIX. It'll be interesting to hear
possible solutions.
Chandru
> -----Original Message-----
> From: Rick Pettit [mailto:rpettit]
> Sent: 3 December 2001 21:44
> To: erlang-questions
> Subject: emfile error
>
>
>
> I have an erlang process which runs as a concurrent TCP server. It
> functions as a gateway between non-erlang processes and
> Erlang processes.
>
> The server listens on a well-known TCP port and spawns a
> child to handle
> each request. The child will parse TCP input and forward the
> request via
> Erlang messaging to the appropriate Erlang server, waiting
> for a response
> (another Erlang message) before responding over TCP and
> closing the TCP
> connection.
>
> The problem is that when the server is hit hard the clients receive an
> emfile error, which I understand could be the result of a UNIX process
> (the erlang node, in this case) running out of descriptors.
>
> Is this a known problem with concurrent erlang servers? I would not
> expect this same error if my server was in C and it fork()'d
> children, as
> each child would then have its own descriptor table and would
> have very
> few entries in it (stdin, stdout, stderr, TCP client socket).
>
> I wonder if the entire node appears to the host OS as a single process
> (perhaps one with many threads), in which case I would expect
> this problem
> with most any concurrent server.
>
> Please forgive me if I am doing something silly or am missing some
> fundemental coding convention that would have alleviated this problem.
>
> Rick
>
NOTICE AND DISCLAIMER:
This email (including attachments) is confidential. If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents. We cannot accept liability for any breaches of
confidence arising through use of email. Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions. We will not accept responsibility for any commitments
made by our employees outside the scope of our business. We do not warrant
the accuracy or completeness of such information.
From earlyriser Tue Dec 4 01:15:26 2001
From: earlyriser (Sean Hinde)
Date: Tue, 4 Dec 2001 00:15:26 +0000
Subject: Compiling R8B under OS X
In-Reply-To:
Message-ID: <04170A22-E84C-11D5-AE7C-003065B27BB6@mac.com>
Excellent, thanks Kent.
> I have just built R8B on Mac OS X 10.1. I haven't run any test cases
> just manage to get a prompt. I don't have time to do any testing on
> Mac OS X at the moment.
Well, wings3d works great (after dealing with flat_namespace and
grabbing an old version of libsdl (1.2.1) out of their cvs archive.
> I went the "easy way" making the linking work as in Mac OS X 10.0. I
> don't understand "framework", "bundle" or other Mac OS X concepts and
> I don't understand the new "two-level namespace" concept used in Mac
> OS X 10.1. Maybe someone else can supply a patch that does linking and
> loading of linked in drivers "the Mac OS X way".
Yes, it's pretty darn strange. Especially that there are two entirely
different types of shared library - some you link to using -l and others
with -framework. Wow.
One question - the nature of the errors in sys.c suggests that that code
is not used by any other platform - is it really a case of fixing this
code or do you suspect there might be a configure problem?
Thanks again,
Sean
From kent Tue Dec 4 02:00:36 2001
From: kent (Kent Boortz)
Date: 04 Dec 2001 02:00:36 +0100
Subject: Compiling R8B under OS X
In-Reply-To: Sean Hinde's message of "Tue, 4 Dec 2001 00:15:26 +0000"
References: <04170A22-E84C-11D5-AE7C-003065B27BB6@mac.com>
Message-ID:
Sean Hinde writes:
> Well, wings3d works great (after dealing with flat_namespace and
> grabbing an old version of libsdl (1.2.1) out of their cvs archive.
Wings3D makes Erlang on OS X a bit more important than it used to be ;-)
> One question - the nature of the errors in sys.c suggests that that code
> is not used by any other platform - is it really a case of fixing this
> code or do you suspect there might be a configure problem?
I don't quite understand what you mean. Mac OS X is the only Unix
platform we have here that has no poll() function and then sets
USE_SELECT (this is one reason we like to have OS X part of our daily
build). That we didn't test often enough with Mac OS X was the reason
we didn't find this problem before the release.
The configure script was changed to use poll() if available. I don't
know the reason for this but I suspect there is no way of knowing what
the "preferred" network API is when an OS has both poll() and
select().
kent
From alex_arnon Tue Dec 4 08:55:19 2001
From: alex_arnon (Alex Arnon)
Date: Tue, 4 Dec 2001 09:55:19 +0200
Subject: emfile error
Message-ID: <07D9CDAA36B4724D87DFD50B01D6C4A6D814FB@ilexchange1>
You should try throttling the accept rate - set a limit ot the number of
concurrent connections, and simply stop accepting once that is
exhausted. You can also possibly increase the listen queue size.
Just like memory and disk space, descriptors are a finite resource; you
should always write your servers with limits in mind.
-----Original Message-----
From: Rick Pettit [mailto:rpettit]
Sent: Monday, December 03, 2001 11:44 PM
To: erlang-questions
Subject: emfile error
I have an erlang process which runs as a concurrent TCP server. It
functions as a gateway between non-erlang processes and Erlang
processes.
The server listens on a well-known TCP port and spawns a child to handle
each request. The child will parse TCP input and forward the request
via
Erlang messaging to the appropriate Erlang server, waiting for a
response
(another Erlang message) before responding over TCP and closing the TCP
connection.
The problem is that when the server is hit hard the clients receive an
emfile error, which I understand could be the result of a UNIX process
(the erlang node, in this case) running out of descriptors.
Is this a known problem with concurrent erlang servers? I would not
expect this same error if my server was in C and it fork()'d children,
as
each child would then have its own descriptor table and would have very
few entries in it (stdin, stdout, stderr, TCP client socket).
I wonder if the entire node appears to the host OS as a single process
(perhaps one with many threads), in which case I would expect this
problem
with most any concurrent server.
Please forgive me if I am doing something silly or am missing some
fundemental coding convention that would have alleviated this problem.
Rick
From pew Tue Dec 4 10:19:49 2001
From: pew (Patrik Winroth)
Date: Tue, 4 Dec 2001 10:19:49 +0100 (CET)
Subject: emfile error
In-Reply-To: <07D9CDAA36B4724D87DFD50B01D6C4A6D814FB@ilexchange1>
Message-ID: <20011204100705.D551-100000@mas.algonet.se>
It is indeed important to keep track of resources, no matter how many file
descriptors you have available, they *will* run out some day.
Crashes due to e.g. Mnesia shortage of FDs are not a pretty thing :-)
This would be very nice functionality to add to the OTP platform.
I.e. keeping track of file descriptors in a manner similar to the below
(uncomplete) example.
Regards,
/Patrik.
(fe)1> fd_keeper:max_and_reserved().
{16300,24}
%%%
%% file descriptor management.
%%%
-export([stop_accepting/0,
start_accepting/0,
node_wants_alarm/0,
all_slaves_out_fds/0,
max_and_reserved/0,
how_many_reserved/0,
how_many_reserved_total/0,
reserve_fds/1,
unconditional_reserve_fds/1,
free_fds/1,
free_all_fds/0]).
%%%
%% node_wants_alarm(..) - used to check if the node wants a alarm
%%%
node_wants_alarm() ->
case catch ets:lookup(?NODE_SESSION_TABLE, ?ALARM) of
[{_,B}] ->
B;
_ ->
false
end.
%%%
%% all_slaves_alarm(..) - used to check if the node wants a alarm
%%%
all_slaves_out_fds() ->
case catch ets:lookup(?NODE_SESSION_TABLE, ?ALL_SLAVES_ALARM) of
[{_,B}] ->
B;
_ ->
false
end.
%%%
%% Use how_many_reserved_total(..) to see how many file descriptors
%% are reserved on the master and slaves summed.
%%%
how_many_reserved_total() ->
lists:foldl(
fun(N, Sum) ->
Sum + fdapi:call_in_slave(N,?MODULE,how_many_reserved,[])
end, how_many_reserved(), fdapi:slave_nodes()).
%%%
%% Use how_many_reserved(..) to see how many file descriptors
%% are reserved.
%%%
how_many_reserved() ->
case catch ets:lookup(?NODE_SESSION_TABLE, ?CNT) of
[{_, N}] ->
N;
_ ->
0
end.
%%%
%% Use reserve_fds(..) to reserve file descriptors - if it returns true
%% the reserved fds may be used, if false they may not be used.
%% The same process that wants to use the descriptors must also
%% reserve them.
%% Update: if the node is shutting down, and no new sessions may be
%% started, ?ACCEPTING is false.
%%%
reserve_fds(N) ->
case catch ets:lookup(?NODE_SESSION_TABLE, ?ACCEPTING) of
[{_, true}] ->
N1 = ets:update_counter(?NODE_SESSION_TABLE, ?CNT, N),
case lookup_maxfds() of
Max when Max >= N1 ->
make_reservation(N);
_ ->
ets:insert(?NODE_SESSION_TABLE, {?ALARM, true}),
ets:update_counter(?NODE_SESSION_TABLE, ?CNT, -N),
false
end;
_ ->
false
end.
%%%
%% unconditional_reserve_fds(..) may only be used by the inet_server, when
%% starting gateways (i.e. no session threads may use it).
%%%
unconditional_reserve_fds(N) ->
ets:update_counter(?NODE_SESSION_TABLE, ?CNT, N),
make_reservation(N).
make_reservation(N) ->
Pid = self(),
case ets:lookup(?NODE_SESSION_TABLE, Pid) of
[] ->
ets:insert(?NODE_SESSION_TABLE, {Pid, N});
[_] ->
ets:update_counter(?NODE_SESSION_TABLE, Pid, N)
end,
erlang:link(whereis(?NODE_SESSION_SERVER)),
true.
%%%
%% free_fds(..) is used to free previously reserved fds.
%% *Must* be called from the same process that reserved them.
%%%
free_fds(N) ->
free_fds(N, self()).
%%%
%% free_fds(..) internal function.
%%%
free_fds(N, Pid) ->
ets:update_counter(?NODE_SESSION_TABLE, ?CNT, -N),
case catch ets:update_counter(?NODE_SESSION_TABLE, Pid, -N) of
N1 when N1 =< 0 ->
ets:delete(?NODE_SESSION_TABLE, Pid),
%% This unlink may be executed in is_node_servers
%% context, but that is ok.
erlang:unlink(whereis(?NODE_SESSION_SERVER)),
ok;
_ ->
ok
end.
%%%
%% free_all_fds(..) is used to free all the calling process fds.
%%%
free_all_fds() ->
free_pids_fds(self()).
%%%
%% free_pids_fds(..) is used to free a pids all allocated fds, primarily
%% when a supervised process dies upon us.
%%%
free_pids_fds(Pid) ->
case catch ets:lookup(?NODE_SESSION_TABLE, Pid) of
[{_, N}] ->
free_fds(N, Pid);
_ ->
ok
end.
get_session_id() ->
ets:update_counter(?NODE_SESSION_TABLE, ?SESS_CNT, 1).
On Tue, 4 Dec 2001, Alex Arnon wrote:
> You should try throttling the accept rate - set a limit ot the number of
> concurrent connections, and simply stop accepting once that is
> exhausted. You can also possibly increase the listen queue size.
> Just like memory and disk space, descriptors are a finite resource; you
> should always write your servers with limits in mind.
>
>
> -----Original Message-----
> From: Rick Pettit [mailto:rpettit]
> Sent: Monday, December 03, 2001 11:44 PM
> To: erlang-questions
> Subject: emfile error
>
>
>
> I have an erlang process which runs as a concurrent TCP server. It
> functions as a gateway between non-erlang processes and Erlang
> processes.
>
> The server listens on a well-known TCP port and spawns a child to handle
> each request. The child will parse TCP input and forward the request
> via
> Erlang messaging to the appropriate Erlang server, waiting for a
> response
> (another Erlang message) before responding over TCP and closing the TCP
> connection.
>
> The problem is that when the server is hit hard the clients receive an
> emfile error, which I understand could be the result of a UNIX process
> (the erlang node, in this case) running out of descriptors.
>
> Is this a known problem with concurrent erlang servers? I would not
> expect this same error if my server was in C and it fork()'d children,
> as
> each child would then have its own descriptor table and would have very
> few entries in it (stdin, stdout, stderr, TCP client socket).
>
> I wonder if the entire node appears to the host OS as a single process
> (perhaps one with many threads), in which case I would expect this
> problem
> with most any concurrent server.
>
> Please forgive me if I am doing something silly or am missing some
> fundemental coding convention that would have alleviated this problem.
>
> Rick
>
>
--
Patrik Winroth
Vindaloo AB mbl: 0709-727364
From etxuwig Tue Dec 4 10:33:00 2001
From: etxuwig (Ulf Wiger)
Date: Tue, 4 Dec 2001 10:33:00 +0100 (MET)
Subject: Multple Application Management
In-Reply-To: <3C0BDDAD.C7F3C915@vailsys.com>
Message-ID:
On Mon, 3 Dec 2001, Martin J. Logan wrote:
>Hello,
>I am wondering if anyone can help point me in the correct
>direction for the deployment of multimple applications on one
>node. Currently I manage applications on a per application
>basis i.e they are started individually. I start the runtime
>system pointing it to the script and boot files that I
>genereated for that particular application using systools.
Hmm, there isn't really a short answer for this one, but let's
give it a go.
- Let's say you want to build a system called 'mysystem', which
is made up of the applications 'a' and 'b'. You would then first
write a .rel file:
mysystem.rel:
{release,{"mysystem","1.0"},
{erts,"5.0.2.11"},
[{kernel,"2.6.3.6"},
{stdlib,"1.9.4.2"},
{sasl,"1.9.2"},
{mnesia,"3.10.3"},
{a,"0.9"},
{b,"0.7"}]}.
- You pick a directory under which to install the system, let's
say /usr/local/lib/mysystem/
- You create a directory for the release files:
/usr/local/lib/mysystem/releases/1.0
(where 1.0 is the system version listed in mysystem.rel)
Copy mysystem.rel into the above directory.
- I will assume that your applications are in the following path:
/usr/local/lib/mysystem/lib/a/ebin
/usr/local/lib/mysystem/lib/b/ebin
- Go to the releases/1.0 directory, start an erlang shell, and
write:
systools:make_script(
"mysystem",
[{path, ["/usr/local/lib/mysystem/lib/*/ebin"]}]).
This will (if you're lucky) generate a start.script and a
start.boot file.
- You can then start your system using the command:
erl -boot /usr/local/lib/mysystem/releases/1.0/start
There is normally more to it than that, but if you do it in this
way, you can then build on it to add more sophisticated release
handling.
If your applications need to start in a specific order, e.g. 'b'
cannot start until 'a' is started, then you would put the
following attribute in b's .app file:
{applications, [a]}
Then, systools will make sure that the application start
instructions arrive in the right order, and the application
controller will honor the dependency.
/Uffe
>I want to run two applications on the same box so pointing the
>system to the script and boot files generated for specific apps is not
>feasable. I would like to have all the startup info in one central location
>so that all the apps I woudl like started on a box would come up when I start
>the the run time system. I have messed with the start.script file but this
>requires me to edit it manually which I understand from the docs is not the
>preferred way to go about things. Could someone point me tword the proper way
>to manage somthing like this? What method lies in accordence with the way the
>run time system was designed?
> Thanks,
> Martin Logan
>
>
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
From etxuwig Tue Dec 4 10:38:11 2001
From: etxuwig (Ulf Wiger)
Date: Tue, 4 Dec 2001 10:38:11 +0100 (MET)
Subject: emfile error
In-Reply-To:
Message-ID:
On Mon, 3 Dec 2001, Rick Pettit wrote:
>I wonder if the entire node appears to the host OS as a single
>process (perhaps one with many threads), in which case I would
>expect this problem with most any concurrent server.
This is correct. The Erlang runtime system appears to the host OS
as a single process.
If you're using the default limit on file descriptors (e.g. 64),
that's usually not sufficient for most erlang applications.
Try 'limit descriptors nnnn', or even 'unlimit descriptors'
(assuming you're running on a sensible OS.)
/Uffe
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
From Sean.Hinde Tue Dec 4 11:57:48 2001
From: Sean.Hinde (Sean Hinde)
Date: Tue, 4 Dec 2001 10:57:48 -0000
Subject: Compiling R8B under OS X
Message-ID: <402DD461F109D411977E0008C791C312039F6657@IMP02MBX>
> > One question - the nature of the errors in sys.c suggests
> that that code
> > is not used by any other platform - is it really a case of
> fixing this
> > code or do you suspect there might be a configure problem?
>
> I don't quite understand what you mean. Mac OS X is the only Unix
> platform we have here that has no poll() function and then sets
> USE_SELECT (this is one reason we like to have OS X part of our daily
> build). That we didn't test often enough with Mac OS X was the reason
> we didn't find this problem before the release.
>
> The configure script was changed to use poll() if available. I don't
> know the reason for this but I suspect there is no way of knowing what
> the "preferred" network API is when an OS has both poll() and
> select().
OK, that explains it - I didn't realise that Mac OS X was so unique in this
respect.
Sean
NOTICE AND DISCLAIMER:
This email (including attachments) is confidential. If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents. We cannot accept liability for any breaches of
confidence arising through use of email. Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions. We will not accept responsibility for any commitments
made by our employees outside the scope of our business. We do not warrant
the accuracy or completeness of such information.
From rv Tue Dec 4 12:46:52 2001
From: rv (Robert Virding)
Date: Tue, 04 Dec 2001 12:46:52 +0100
Subject: records
In-Reply-To: Your message of "Mon, 03 Dec 2001 16:58:33 +0100."
<200112031558.QAA08239@avc240.etxb.ericsson.se>
Message-ID: <200112041146.fB4Bkqj01432@erik.virding.org>
Hakan Stenholm writes:
>The imidiat problem can be solved by adding a guard
>"foo(A, ...) when record(A, ...) ->" to do the type checking.
>
>This entier problem is realy due to the fact that records are not treated as a
>unique data type inside the VM (virtual machine) - they are implemented as
>tuples. This makes it impossible to distinguish between a record and a tuple
>that happens to look like a record, this is also a problem if you have a
>function like this:
>...
>It should be noted that all record accesses and updates end up as calls to
>element/2 and setelement/3 i.e. tuple manipulating operations, this is done by
>the preprocessor during compilation.
>Record fieldnames are converted to indexes by the preprocessor as well.
>
>So when the code is actualy run, the VM has no idea that some tuples should
>be typechecked as records rather than simple tuples, i.e. records are only
>"syntactic suger" and not realy a language entity.
This is, of course, all true, BUT in the documentation records are
defined to be tuples so it really shouldn't come as a surprise. The
reason for this is that when records were first implemented it wasn't
possible at that time to easily add a new datatype in the
implementation. This has changed today.
Seriously, how many people/apps would be severely burned if records
*were* made their own datatype? It is possible to do but you have to
determine which solution hurts the most.
Robert
From etxhste Tue Dec 4 13:09:34 2001
From: etxhste (Hakan Stenholm)
Date: Tue, 4 Dec 2001 13:09:34 +0100 (MET)
Subject: records
Message-ID: <200112041209.NAA10710@avc240.etxb.ericsson.se>
> X-Face:
HEG-DdvNQwuDa^\p$=gG[u0ufy|t~@2*N&f
,+sk7z[S/-qk}gxv6L,z_l]|cSt5:$N+a>I+G X-url: http://www.bluetail.com/~rv
> To: Hakan Stenholm
> cc: erlang-questions
> Subject: Re: records
> MIME-Version: 1.0
> Content-ID: <1428.1007466407.1>
> Date: Tue, 04 Dec 2001 12:46:52 +0100
> From: Robert Virding
>
> Hakan Stenholm writes:
> >The imidiat problem can be solved by adding a guard
> >"foo(A, ...) when record(A, ...) ->" to do the type checking.
> >
> > .......
>
> This is, of course, all true, BUT in the documentation records are
> defined to be tuples so it really shouldn't come as a surprise. The
> reason for this is that when records were first implemented it wasn't
> possible at that time to easily add a new datatype in the
> implementation. This has changed today.
>
> Seriously, how many people/apps would be severely burned if records
> *were* made their own datatype? It is possible to do but you have to
> determine which solution hurts the most.
>
Actualy I'm quite aware of this, there is a lot of code that relies on records
being tuples: lists:keysearch, ets tables, code change code in the AXD301 ...
so I can't say that I expect the implementation to change.
But I suppouse it would still be posible to change the tuple representation to
something else, for example:
{__record,record_name,....}
i.e. add an extra '__record' type indicator in the tuple, '__record' should then
be a reserved key world, that should not be allowed to be used in regular code -
which stops the user from acidently putting it in tuples.
Or we might handle all tuples that start with a record name (thats defined in
any loaded file) as a record (i.e. test type and size of record). This might of
course give use obscure tuple errors instead.
> Robert
From etxuwig Tue Dec 4 13:24:43 2001
From: etxuwig (Ulf Wiger)
Date: Tue, 4 Dec 2001 13:24:43 +0100 (MET)
Subject: records
In-Reply-To: <200112041209.NAA10710@avc240.etxb.ericsson.se>
Message-ID:
On Tue, 4 Dec 2001, Hakan Stenholm wrote:
>Actualy I'm quite aware of this, there is a lot of code that
>relies on records being tuples: lists:keysearch, ets tables,
>code change code in the AXD301 ... so I can't say that I expect
>the implementation to change.
Of course, functions like lists:keysearch() and ets:insert() et
al would have to support operations on record types.
For example:
lists:keysearch(Key, #myRec.key, List)
should work as expected on true record types.
Code change functions should be possible to ignore, since it's
difficult to write a generic code_change function that works
independently of what's changed in the code. IOW, one has to
write a specific code_change function for each upgrade.
There _shouldn't_ (tm) be that much code that breaks the record
abstraction. One problem is that it's difficult to find those
instances that do... One way is of course to run the system until
it breaks, but that approach leaves something to be desired.
Personally, I'm in favour of making records a real data type,
but if pressed, I'll deny I ever said that. (:
/Uffe
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
From thomas.lindgren Tue Dec 4 13:57:12 2001
From: thomas.lindgren (Thomas Lindgren)
Date: Tue, 4 Dec 2001 13:57:12 +0100
Subject: records
In-Reply-To: <200112041146.fB4Bkqj01432@erik.virding.org>
Message-ID:
Robert Virding:
---
The
reason for this is that when records were first implemented it wasn't
possible at that time to easily add a new datatype in the
implementation. This has changed today.
Seriously, how many people/apps would be severely burned if records
*were* made their own datatype? It is possible to do but you have to
determine which solution hurts the most.
---
My vote is for change. Cellpoint's code uses keysearch and ets/mnesia
so there will be some transitional pain. On the other hand, the
shipping system uses a frozen Erlang version too: hence, a transition
will mainly be a problem for new releases.
A compatibility mode like what Ulf suggests seems like a
good idea.
-- Thomas
From jb Tue Dec 4 14:33:10 2001
From: jb (Johan Bevemyr)
Date: Tue, 04 Dec 2001 14:33:10 +0100 (CET)
Subject: Ginger
Message-ID: <20011204.143310.31283829.jb@bluetail.com>
Ska du k?pa en Segway nu?
http://www.segway.com/consumer/
R?tt cool trots allt.
/Johan
From jb Tue Dec 4 14:40:21 2001
From: jb (Johan Bevemyr)
Date: Tue, 04 Dec 2001 14:40:21 +0100 (CET)
Subject: Ginger
In-Reply-To:
References:
Message-ID: <20011204.144021.30259713.jb@bluetail.com>
Sorry, jag ska st?nga av 'auto-reply to all' :-)
/Johan
From luke Tue Dec 4 16:04:46 2001
From: luke (Luke Gorrie)
Date: 04 Dec 2001 16:04:46 +0100
Subject: io:format/1
Message-ID:
Hej,
In the 'io' module we have:
format(Format) ->
format(Format, []).
But wouldn't it be better to have
format(String) ->
format("~s", [String]).
I ask because we just found a bug in some code that was something like
print_prompt(Prompt) ->
io:format(Prompt).
and we called it with a prompt containing a ~ and it crashed..
Before answering have a read of http://hispahack.ccc.de/en/mi019en.htm :-)
Cheers,
Luke
From per Tue Dec 4 16:43:01 2001
From: per (Per Bergqvist)
Date: Tue, 04 Dec 2001 16:43:01 +0100
Subject: emfile error
In-Reply-To:
Message-ID: <200112041543.fB4Fh4E17762@raven.levonline.com>
Under most Unices this is also limited by SC_OPEN_MAX|NOFILE or
similiar.
BSDI also restricts it to FD_SETSIZE.
Under Win32 there is a strange restriction (hardcoded) to 1024.
(WinNT/2K/XP is actually only restricted by available memory for fds).
Hack you sys.c to fix it.
/Per
> On Mon, 3 Dec 2001, Rick Pettit wrote:
>
> >I wonder if the entire node appears to the host OS as a single
> >process (perhaps one with many threads), in which case I would
> >expect this problem with most any concurrent server.
>
> This is correct. The Erlang runtime system appears to the host OS
> as a single process.
>
> If you're using the default limit on file descriptors (e.g. 64),
> that's usually not sufficient for most erlang applications.
>
> Try 'limit descriptors nnnn', or even 'unlimit descriptors'
> (assuming you're running on a sensible OS.)
>
> /Uffe
> --
> Ulf Wiger, Senior Specialist,
> / / / Architecture & Design of Carrier-Class Software
> / / / Strategic Product & System Management
> / / / Ericsson Telecom AB, ATM Multiservice Networks
>
=========================================================
Per Bergqvist
Synapse Systems AB
Phone: +46 709 686 685
Email: per
From vances Tue Dec 4 17:46:37 2001
From: vances (Vance Shipley)
Date: Tue, 4 Dec 2001 11:46:37 -0500
Subject: emfile error
In-Reply-To: <200112041543.fB4Fh4E17762@raven.levonline.com>
Message-ID:
Here's a snippet from one of our C drivers:
/* see if we're going to run out of file descriptors */
getrlimit(RLIMIT_NOFILE, &rlp);
if(num_fd > (rlp.rlim_max - 3)) { /* stdin + stdout + stderr = 3 */
fprintf(stderr, "number of dchannels causes process limit of %d "
"open files to be exceeded\n", rlp.rlim_max);
exit(-1);
}
/* bump up the limit if needed */
if(num_fd > (rlp.rlim_cur - 3)) {
rlp.rlim_cur = num_fd + 3;
setrlimit(RLIMIT_NOFILE, &rlp);
}
-Vance
From fredrik.linder Tue Dec 4 22:34:14 2001
From: fredrik.linder (Fredrik Linder)
Date: Tue, 4 Dec 2001 22:34:14 +0100
Subject: records
References:
Message-ID: <003c01c17d0b$6e604640$8bb7f2d5@frelin>
From: "Thomas Lindgren"
>
> I get the following very undesirable behaviour for
> records.
>
> The program is enclosed as an attachment (my apologies).
> Run test:bar/0. Under R7B1 and R8B0, I get the answer
> {"aaa", "aaa"}, which means a record of type rec1 is
> mistakenly thought to be a record of type rec2.
>
> (Furthermore, since the fields have the same names, but a transposed
> order, you also get a nasty return value on top of that.)
>
> Looking at the BEAM code, the basic problem is that
> the code doesn't verify that Rec is a record of
> the proper type before accessing it. (That is, it doesn't
> check that the incoming tuple has the proper arity and
> "tag".)
>
> -- Thomas
>
The undesirable behaviour that I guess was Thomas' point is the optimization
that record access is not checked (in runtime) to be performed only on
tuples that have the correct first element and the correct tuple size,
generating a runtime error otherwise.
That seems have been forgotten in the following discussion.
/Fredrik
PS. Sorry if this was too obvious DS.
From hokan.stenholm Wed Dec 5 00:54:46 2001
From: hokan.stenholm (=?ISO-8859-1?Q?H=E5kan_Stenholm?=)
Date: Wed, 5 Dec 2001 00:54:46 +0100
Subject: Compiling R8B under OS X
Message-ID: <4BC3B8E4-E912-11D5-BECB-003065B5F8B4@telia.com>
I managed to compile R8B on my MacOsX (10.1) version as well, I had to
skip the following libs (beyond the ones mentioned in the README):
touch lib/tv/SKIP % might not be needed
touch lib/erl_interface/SKIP
touch lib/runtime_tools/SKIP
but beyond those problems it seams to run ok.
H?kan Stenholm
From cpressey Wed Dec 5 01:37:13 2001
From: cpressey (Chris Pressey)
Date: Tue, 4 Dec 2001 18:37:13 -0600
Subject: records
In-Reply-To: <200112041146.fB4Bkqj01432@erik.virding.org>
References: <200112031558.QAA08239@avc240.etxb.ericsson.se>
<200112041146.fB4Bkqj01432@erik.virding.org>
Message-ID: <20011204183713.5402c7bf.cpressey@catseye.mb.ca>
On Tue, 04 Dec 2001 12:46:52 +0100
Robert Virding wrote:
> Seriously, how many people/apps would be severely burned if records
> *were* made their own datatype? It is possible to do but you have to
> determine which solution hurts the most.
>
> Robert
I am absolutely in favour of records graduating from syntactic sugar to
semantic data type. I try to take abstraction to heart when I program, so
practically nothing I've written would break.
The one exception is where I have written a "general-purpose" module to
manipulate "records of any type" in a limited fashion. I do this by
checking the first element of the tuple with element/2 and using it as a
type and/or module identifier. This is certainly not the best practice,
and my code should probably be rethought anyway.
Ideally, the representation of a record should not be defined.
At the same time, records should probably have metadata, in the form of
functions (sort of like record_info, but which operate on a variable) in
the interests of writing generalized code that really can work on records
of any type. (Unless generalizability is explicitly traded off for
efficiency - perhaps orddicts and dicts would be more suited for people
who want metadata.)
It might hurt less if a new way of structuring data is added to the
language, instead of replacing records. For example, 'records' could be
left alone for backwards compatibility and a new 'struct' or 'aggregate'
or 'object' language feature could appear.
Lastly, although this next suggestion is far from crucial, I think it is a
neat idea that fits in with improved records. That is, it would be nice
if there could be guards on fields in records much like there are guards
on functions. Imagine:
-record(person,
[
age when integer(age),
name = "John Doe" when list(name),
etc
]).
An association between record name and module name and/or mnesia table
name could also be further exploitable.
But please, consider that I *am* a mad scientist who is also of the
opinion that the restriction that guards operate in constant time be a
compile-time option, so take what I say with a grain of salt :)
Chris
"There's definately, definately, definately no logic to human behaviour"
-- Bjork
From vances Wed Dec 5 05:27:29 2001
From: vances (Vance Shipley)
Date: Tue, 4 Dec 2001 23:27:29 -0500
Subject: Multple Application Management
In-Reply-To:
Message-ID:
Martin,
Your question strikes a familiar chord with me. My view of
the Erlang/OTP environment is that it should support multiple
applications in the same way that a Unix server does. I
should be able to hand you a release package to install on
your node with applications A & B running and after installing
you'd now have A, B & C running.
The OTP provides some wonderful tools for building "applications",
packaging them into "releases" and installing them on running
systems handling necessary dependencies and code upgrades. It
doesn't however work sjust described.
If you have built your applications using the design principles
of the application module you are able to load, start and stop
individual applications easily as in application:start(foo).
You can even move distributed applications from node to node.
Using this you can have a dynamic set of applications coming
and going as you wish.
The problem is with the release_handler. The view taken is a
practical one which is directed at deploying embedded systems
as products in the field. The design assumes that you have a
complete view of what is running on that system. You create a
foo.rel file which describes all the applications required and
the release package created includes all the files for all these
applications including kernel and stdlib.
When I built my first release I ran straight into this difference
of mind set when I tried to install it. I found that there was
no way to install it! You can unpack it with
release_handler:unpack_release(foo) but if you try to use
release_handler:install_release(foo) you will find that you need
a release upgrade script (relup). There doesn't appear to be a
valid syntax for the relup file which will allow "upgrading" from
a non-existent release.
At this point the big picture came into view as I realized that
there could only be one permanent release on the system. Once
you have made a release permanent with
release_handler:make_permanent(foo) that defines the boot file
which will be run at start up in an embedded system. That boot
script is included in the release package so it obviously doesn't
know anything about your existing applications.
What I would like to do is to rewrite the release_handler module
to handle merging releases into one boot script. When a new
release package is provided it could look at what other releases
are incorporated into the system and merge them together into one
boot script.
Uffe described a manual way of doing this which is really the
definitive answer to your question. It is much better to use the
systools to create a boot script from the release file than to try
and edit the boot script directly. In this way you can edit the
foo.rel file and rerun systools:make_script(foo) each time the
set of applications you want running permanently changes.
-Vance
> On Mon, 3 Dec 2001, Martin J. Logan wrote:
>
> >Hello,
>
> >I am wondering if anyone can help point me in the correct
> >direction for the deployment of multiple applications on one
> >node. Currently I manage applications on a per application
> >basis i.e they are started individually. I start the runtime
> >system pointing it to the script and boot files that I
> >generated for that particular application using systools.
>
From vances Wed Dec 5 09:41:34 2001
From: vances (Vance Shipley)
Date: Wed, 5 Dec 2001 03:41:34 -0500
Subject: .erlang.cookie
Message-ID:
In case anyone is interested ...
Documentation nit:
http://www.erlang.org/doc/r8b/lib/kernel-2.7/doc/html/index.html
Wherein it says:
"At start-up, the first action of the standard auth
server is to read a file named $HOME/erlang.cookie"
This is repeated again later but the actual file is:
$HOME/.erlang.cookie
The section on cookie() correctly refers to $HOME/.erlang.cookie.
From etxuwig Wed Dec 5 10:00:22 2001
From: etxuwig (Ulf Wiger)
Date: Wed, 5 Dec 2001 10:00:22 +0100 (MET)
Subject: Multple Application Management
In-Reply-To:
Message-ID:
On Tue, 4 Dec 2001, Vance Shipley wrote:
>Your question strikes a familiar chord with me. My view of the
>Erlang/OTP environment is that it should support multiple
>applications in the same way that a Unix server does. I should
>be able to hand you a release package to install on your node
>with applications A & B running and after installing you'd now
>have A, B & C running.
>
>The OTP provides some wonderful tools for building
>"applications", packaging them into "releases" and installing
>them on running systems handling necessary dependencies and
>code upgrades. It doesn't however work sjust described.
The AXD 301 has functionality similar to what you describe. We
have the possibility to add applications to an already running
system, and if a new version of an already running application is
made available, the software management component will figure out
how to upgrade the system with it.
This is done with the help of a layer on top of the release
handler, and some design rules. One of the important things is
that there must be a framework for initializing mnesia tables,
and registering system resources (such as web menus and pages,
alarm types, and distribution groups). It should also be
possible, of course, to unregister the same, if an application is
to be removed.
This stuff could hypothetically be made available as Open Source,
but we don't have the resources to do that at AXD 301.
/Uffe
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
From eleberg Wed Dec 5 12:43:47 2001
From: eleberg (Bengt Kleberg)
Date: Wed, 5 Dec 2001 12:43:47 +0100 (MET)
Subject: code:priv_dir()
Message-ID: <200112051143.MAA12894@etxb.ericsson.se>
Greetings,
Is there somebody that can expalain why the following code prints:
"{error, bad_name}"
Reading the man page I would have expected
"tmp/cnh2/priv"
bengt
-module(priv_dir).
-export([main/0]).
main( ) ->
% ignore status, directories may already exist
file:make_dir("tmp"),
file:make_dir("tmp/cnh2"),
file:make_dir("tmp/cnh2/priv"),
% verify existance
{ok, _} = file:list_dir("tmp/cnh2/priv"),
true = code:add_patha("tmp"),
io:format( "~w~n", [code:priv_dir("cnh2")] ).
From etxuwig Wed Dec 5 13:01:50 2001
From: etxuwig (Ulf Wiger)
Date: Wed, 5 Dec 2001 13:01:50 +0100 (MET)
Subject: code:priv_dir()
In-Reply-To: <200112051143.MAA12894@etxb.ericsson.se>
Message-ID:
The code server keeps an ets table updated with the whereabouts
of ebin, priv, and similar directories via their parent
directory.
1> file:make_dir("tmp").
ok
2> file:make_dir("tmp/cnh2").
ok
3> file:make_dir("tmp/cnh2/priv").
ok
4> file:make_dir("tmp/cnh2/ebin").
ok
5> code:add_path("tmp/cnh2/ebin").
true
6> code:priv_dir(cnh2).
"tmp/cnh2/priv"
You can also use code:add_path("tmp/cnh2"), but it's probably
more natural to point the code server to where the actual code
resides. Either way, the directory that will be logged in the
code server table (code_names, which is private and can't be
inspected) is "tmp/cnh2".
/Uffe
On Wed, 5 Dec 2001, Bengt Kleberg wrote:
>Greetings,
>
>Is there somebody that can expalain why the following code prints:
>"{error, bad_name}"
>
>Reading the man page I would have expected
>"tmp/cnh2/priv"
>
>
>bengt
>
>-module(priv_dir).
>
>
>-export([main/0]).
>
>
>main( ) ->
> % ignore status, directories may already exist
> file:make_dir("tmp"),
> file:make_dir("tmp/cnh2"),
> file:make_dir("tmp/cnh2/priv"),
> % verify existance
> {ok, _} = file:list_dir("tmp/cnh2/priv"),
> true = code:add_patha("tmp"),
> io:format( "~w~n", [code:priv_dir("cnh2")] ).
>
>
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
From etxuwig Wed Dec 5 14:00:09 2001
From: etxuwig (Ulf Wiger)
Date: Wed, 5 Dec 2001 14:00:09 +0100 (MET)
Subject: continuations to optimize code
Message-ID:
I've done some work optimizing the syntax highlighter in
CCviewer. It's basically a parser, but written by hand in plain
Erlang (a questionable decision, but it does have some nice
properties.)
I realised that a major rewrite was in order when I found that it
took 4.5 hours to process megaco_text_parser.erl -- 22,000 lines
of code, essentially only two functions.
The first rewrite made the parser reentrant, reading and scanning
the file in chunks, instead of all at once. This brought the time
down from 4.5 hours to ca 15 minutes -- joy!
Then I stumbled across another module, that happened to call
mnesia:transaction(Fun) with an inlined fun that consisted of 230
lines of code (!). This caused BEAM to bail out when it couldn't
allocate space for a 1 GB process heap -- no joy.
I came to the conclusion that the problem was that I was using a
construct like:
parse([{atom,Pos1,Name},{symbol,Pos2,'('}|Ts], ...) ->
%% function call
{Arity, Output, RestTs, ...} = function_arguments(Ts, ...),
output([html_anchor(Name, Arity), "(", Output], ...),
parse(RestTs, ...).
I.e. not tail-recursive.
I rewrote it in the following style:
parse([{atom,Pos1,Name},{symbol,Pos2,'('}|Ts], ...) ->
%% function call
Fun =
fun(Arity, Output, RestTs, ...) ->
output([html_anchor(Name, Arity), "(", Output], ...),
parse(RestTs, ...)
end,
function_arguments(Ts, ..., Fun).
(The function function_arguments() then calls Fun(Arity, Output,
RestTs, ...) instead of returning a tuple.)
This brought the processing time of megaco_text_parser.erl down
again from 15 minutes to 100 ms -- ...!!!
Of course, it isn't exactly news that non-tail-recursive
functions are slower than tail-recursive ones, but the
difference in this case was rather extreme. I take it this is
because the data volume was large. The new code isn't quite as
readable, but it's still possible to follow.
After flogging myself for writing such slow code to begin with,
I then started thinking that the rewrite above could possibly be
automated, esp. using a profiling-based optimization tool like
described in http://www.erlang.se/euc/01/Lindgren2001.ps.
I remember that Thomas's tool did "higher-order function
removal". This would be rather the opposite: "higher-order
function exploitation", or something like that.
Basically, if a function is called non-recursively, and the cost
of the function call is high enough that applying a
continuation-passing style is insignificant by comparison, a
non-tail-recursive function could be made tail-recursive quite
easily.
Comments, anyone?
/Uffe
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
From thomas.lindgren Wed Dec 5 14:35:59 2001
From: thomas.lindgren (Thomas Lindgren)
Date: Wed, 5 Dec 2001 14:35:59 +0100
Subject: continuations to optimize code
In-Reply-To:
Message-ID:
> This brought the processing time of megaco_text_parser.erl down
> again from 15 minutes to 100 ms -- ...!!!
Congratulations on an interesting performance hack!
Those are very interesting timing results, because your CPS-transformation
builds a closure instead of pushing a stack frame. As far as I
can see from the example, the savings then lie in avoiding the
tuple. If so, that's remarkable.
(A similar technique for returning multiple values is used in
SML compilers.)
And to those interested, yes, I'm actually working on doing
something along those lines in OM :-)
-- Thomas
From etxuwig Wed Dec 5 14:43:26 2001
From: etxuwig (Ulf Wiger)
Date: Wed, 5 Dec 2001 14:43:26 +0100 (MET)
Subject: continuations to optimize code
In-Reply-To:
Message-ID:
On Wed, 5 Dec 2001, Thomas Lindgren wrote:
>Congratulations on an interesting performance hack!
>
>Those are very interesting timing results, because your
>CPS-transformation builds a closure instead of pushing a stack
>frame. As far as I can see from the example, the savings then
>lie in avoiding the tuple. If so, that's remarkable.
Of course, there's the tiny little chance that I unknowingly
fixed some obscure bug in the process of rewriting, and that it
was that bug that accounted for the overhead... (:
It would be interesting to see if anyone could verify (or refute)
my theory that CPS-transformation can actually yield significant
speedups (they don't have to be in the order of 9000x to be
significant.)
/Uffe
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
From bjorn Wed Dec 5 15:12:18 2001
From: bjorn (Bjorn Gustavsson)
Date: 05 Dec 2001 15:12:18 +0100
Subject: continuations to optimize code
In-Reply-To: Ulf Wiger's message of "Wed, 5 Dec 2001 14:43:26 +0100 (MET)"
References:
Message-ID:
Was that a deep recursion?
Here is a theory that might partially explain your speedups.
In the recursive case, you presumably get a big stack. At every garbage collection,
all of the stack is scanned looking for live data. As the stack grows towards
the heap, you could also get more frequent garbage collections than in the
non-recursive case, and you would get fullsweep GCs (forcing copying of all
live data).
In the non-recursive case, the root set for the GC is probably small (since the
stack is presumably small). Each GC is presumably fast since the root set is small
and your continuations are already on the older generation heap. Perhaps no
fullsweeps are done, as your output function produces garbage, but only little or
no more live data. Therefore the continuation data will stay on the older generation
heap and not be copied very often.
Just a bunch of guesses, based on unverified assumptions.
/Bjorn
Ulf Wiger writes:
> On Wed, 5 Dec 2001, Thomas Lindgren wrote:
>
> >Congratulations on an interesting performance hack!
> >
> >Those are very interesting timing results, because your
> >CPS-transformation builds a closure instead of pushing a stack
> >frame. As far as I can see from the example, the savings then
> >lie in avoiding the tuple. If so, that's remarkable.
>
> Of course, there's the tiny little chance that I unknowingly
> fixed some obscure bug in the process of rewriting, and that it
> was that bug that accounted for the overhead... (:
>
> It would be interesting to see if anyone could verify (or refute)
> my theory that CPS-transformation can actually yield significant
> speedups (they don't have to be in the order of 9000x to be
> significant.)
>
> /Uffe
> --
> Ulf Wiger, Senior Specialist,
> / / / Architecture & Design of Carrier-Class Software
> / / / Strategic Product & System Management
> / / / Ericsson Telecom AB, ATM Multiservice Networks
>
--
Bj?rn Gustavsson Ericsson Utvecklings AB
bjorn ?T2/UAB/F/P
BOX 1505
+46 8 727 56 87 125 25 ?lvsj?
From etxuwig Wed Dec 5 15:21:40 2001
From: etxuwig (Ulf Wiger)
Date: Wed, 5 Dec 2001 15:21:40 +0100 (MET)
Subject: continuations to optimize code
In-Reply-To:
Message-ID:
On 5 Dec 2001, Bjorn Gustavsson wrote:
>Was that a deep recursion?
Yes, it could be.
Your theory sounds quite plausible, and offers an explanation to
why a closure could be so much cheaper than a stack frame in
this case.
BTW, as the parser generates HTML as it goes along, quite a lot
of garbage is produced.
/Uffe
>Here is a theory that might partially explain your speedups.
>
>In the recursive case, you presumably get a big stack. At every
>garbage collection, all of the stack is scanned looking for
>live data. As the stack grows towards the heap, you could also
>get more frequent garbage collections than in the non-recursive
>case, and you would get fullsweep GCs (forcing copying of all
>live data).
>
>In the non-recursive case, the root set for the GC is probably
>small (since the stack is presumably small). Each GC is
>presumably fast since the root set is small and your
>continuations are already on the older generation heap. Perhaps
>no fullsweeps are done, as your output function produces
>garbage, but only little or no more live data. Therefore the
>continuation data will stay on the older generation heap and
>not be copied very often.
>
>Just a bunch of guesses, based on unverified assumptions.
>
>/Bjorn
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
From eleberg Wed Dec 5 16:10:05 2001
From: eleberg (Bengt Kleberg)
Date: Wed, 5 Dec 2001 16:10:05 +0100 (MET)
Subject: code:priv_dir()
Message-ID: <200112051510.QAA23358@etxb.ericsson.se>
> X-Authentication-Warning: avc303.etxb.ericsson.se: etxuwig owned process doing
-bs
> Date: Wed, 5 Dec 2001 13:01:50 +0100 (MET)
> From: Ulf Wiger
> X-X-Sender: etxuwig
> To: Bengt Kleberg
> cc: erlang-questions
> Subject: Re: code:priv_dir()
> MIME-Version: 1.0
>
>
>
> The code server keeps an ets table updated with the whereabouts
> of ebin, priv, and similar directories via their parent
> directory.
>
>
> 1> file:make_dir("tmp").
> ok
> 2> file:make_dir("tmp/cnh2").
> ok
> 3> file:make_dir("tmp/cnh2/priv").
> ok
> 4> file:make_dir("tmp/cnh2/ebin").
> ok
> 5> code:add_path("tmp/cnh2/ebin").
> true
> 6> code:priv_dir(cnh2).
> "tmp/cnh2/priv"
>
>
> You can also use code:add_path("tmp/cnh2"), but it's probably
> more natural to point the code server to where the actual code
> resides. Either way, the directory that will be logged in the
> code server table (code_names, which is private and can't be
> inspected) is "tmp/cnh2".
Not beeing very well versed in Erlang I really should not pretend to
question someone that knows what he is talking about, but do you really
mean that
code:add_path("tmp/cnh2/ebin").
and
code:add_path("tmp/cnh2")
will result in the same directory beeing logged in the code server table?
Also, the manual page really should mention where, in the components of
the path, the "priv" directory is searched for.
bengt
> On Wed, 5 Dec 2001, Bengt Kleberg wrote:
>
> >Greetings,
> >
> >Is there somebody that can expalain why the following code prints:
> >"{error, bad_name}"
> >
> >Reading the man page I would have expected
> >"tmp/cnh2/priv"
> >
> >
> >bengt
> >
> >-module(priv_dir).
> >
> >
> >-export([main/0]).
> >
> >
> >main( ) ->
> > % ignore status, directories may already exist
> > file:make_dir("tmp"),
> > file:make_dir("tmp/cnh2"),
> > file:make_dir("tmp/cnh2/priv"),
> > % verify existance
> > {ok, _} = file:list_dir("tmp/cnh2/priv"),
> > true = code:add_patha("tmp"),
> > io:format( "~w~n", [code:priv_dir("cnh2")] ).
> >
> >
>
> --
> Ulf Wiger, Senior Specialist,
> / / / Architecture & Design of Carrier-Class Software
> / / / Strategic Product & System Management
> / / / Ericsson Telecom AB, ATM Multiservice Networks
>
From etxuwig Wed Dec 5 16:26:39 2001
From: etxuwig (Ulf Wiger)
Date: Wed, 5 Dec 2001 16:26:39 +0100 (MET)
Subject: code:priv_dir()
In-Reply-To: <200112051510.QAA23358@etxb.ericsson.se>
Message-ID:
On Wed, 5 Dec 2001, Bengt Kleberg wrote:
>> You can also use code:add_path("tmp/cnh2"), but it's probably
>> more natural to point the code server to where the actual code
>> resides. Either way, the directory that will be logged in the
>> code server table (code_names, which is private and can't be
>> inspected) is "tmp/cnh2".
>
>Not beeing very well versed in Erlang I really should not
>pretend to question someone that knows what he is talking
>about, but do you really mean that
>
>code:add_path("tmp/cnh2/ebin").
>and
>code:add_path("tmp/cnh2")
>
>will result in the same directory beeing logged in the code
>server table?
The same directory will be logged in the code server's name table
(code_names, which is used to resolve calls to code:priv_dir/1).
The path held by the code server will be updated with exactly the
directory that you supply in the call to code:add_path/1
What I meant was that if your objective with setting the path was
to find priv_dir, then it wouldn't matter if you called
code:add_path("tmp/cnh2/ebin") or code:add_path("tmp/cnh2").
If the objective is instead (as it usually is) to find the
compiled code, then setting the path to where the actual code is
will produce a much better result. (:
/Uffe
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
From eleberg Wed Dec 5 16:41:51 2001
From: eleberg (Bengt Kleberg)
Date: Wed, 5 Dec 2001 16:41:51 +0100 (MET)
Subject: code:priv_dir()
Message-ID: <200112051541.QAA25030@etxb.ericsson.se>
> X-Authentication-Warning: avc303.etxb.ericsson.se: etxuwig owned process doing
-bs
> Date: Wed, 5 Dec 2001 16:26:39 +0100 (MET)
> From: Ulf Wiger
> X-X-Sender: etxuwig
> To: Bengt Kleberg
> cc: erlang-questions
> Subject: Re: code:priv_dir()
> MIME-Version: 1.0
>
...deelted
> What I meant was that if your objective with setting the path was
> to find priv_dir, then it wouldn't matter if you called
> code:add_path("tmp/cnh2/ebin") or code:add_path("tmp/cnh2").
But setting the path
code:add_path("tmp/cnh2").
did not find priv_dir.
(whereas setting the path
code:add_path("tmp/cnh2/ebin"
did find it)
bengt
From etxuwig Wed Dec 5 16:56:33 2001
From: etxuwig (Ulf Wiger)
Date: Wed, 5 Dec 2001 16:56:33 +0100 (MET)
Subject: code:priv_dir()
In-Reply-To: <200112051541.QAA25030@etxb.ericsson.se>
Message-ID:
On Wed, 5 Dec 2001, Bengt Kleberg wrote:
>But setting the path
>code:add_path("tmp/cnh2").
>did not find priv_dir.
>
>(whereas setting the path
>code:add_path("tmp/cnh2/ebin"
>did find it)
Hmm, perhaps there are some weird side-effects in my environment,
but:
1> file:make_dir("tmp").
ok
2> file:make_dir("tmp/cnh2").
ok
3> file:make_dir("tmp/cnh2/priv").
ok
4> code:add_path("tmp/cnh2").
true
5> code:priv_dir(cnh2).
"tmp/cnh2/priv"
It certainly does work for me.
I consider this to be more or less a bug anyway(*), and will
not complain if it suddenly stops working.
(*) until someone explains how the above behaviour is actually
a feature.
/Uffe
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
From vances Wed Dec 5 18:04:07 2001
From: vances (Vance Shipley)
Date: Wed, 5 Dec 2001 12:04:07 -0500
Subject: code:priv_dir()
In-Reply-To:
Message-ID:
> 4> code:add_path("tmp/cnh2").
> true
> 5> code:priv_dir(cnh2).
> "tmp/cnh2/priv"
The documentation for code:priv_dir/1 explicitly says that you
will get "/priv" appended to the directory name. What you will
get out this function is the full, possibly expanded, name of
the priv directory.
1> file:make_dir("tmp").
ok
2> file:make_dir("tmp/cnh2-3.4.5").
ok
3> code:add_path("tmp/cnh2-3.4.5").
true
4> code:priv_dir(cnh2).
"tmp/cnh2-3.4.5/priv"
It doesn't even have to exist!
priv_dir(Name) -> PrivDir | {error, What}
This function returns the current priv directory for the
Name[-*] directory. The current path is searched for a
directory named .../Name-* (the -* suffix is optional for
directories in the search path and it represents the version
of the directory). The /priv suffix is added to the end of
the found directory.
The thing to realize is that the priv directory is for storing data.
We put some of our mnesia tables there (if they're small enough).
The ebin directory is where your .beam files belong. You want to add
"tmp/cnh2-3.4.5/ebin" directory to the path. If you later want to
find out what the path name to the cnh2 data files is you run:
4> code:priv_dir(cnh2).
"tmp/cnh2-3.4.5/priv"
And you find out the full path including any trailing version numbers.
The directory structures is documented in:
http://www.erlang.org/doc/r8b/lib/sasl-1.9.3/doc/html/part_frame.html
A release should be divided into the following directories:
$ROOTDIR/lib/App1-AVsn1/ebin
/priv
/App2-AVsn2/ebin
/priv
...
/AppN-AVsnN/ebin
/priv
/erts-EVsn/bin
/releases/Vsn
/bin
The ebin directory contains the Erlang object code and the
application resource file.
The priv directory contains any application private data.
Specifically, port programs should be located in the priv directory.
The priv directory of an application is found by a call to
code:priv_dir(AppName).
-Vance
Vance Shipley
Motivity Telecom Inc.
+1 519 579 5816
From earlyriser Thu Dec 6 01:32:08 2001
From: earlyriser (Sean Hinde)
Date: Thu, 6 Dec 2001 00:32:08 +0000
Subject: Building on OS X - a bit further on
Message-ID:
Hi,
Thanks for the patch for OS X.
Here's one which builds on yours to add support for megaco and orber
It also tidies up some other configure things to do with linking flags
for shared libraries - in erl_interface particularly.
I've tested the build on Solaris and OS X (except for the megaco -lfl
part - only OS X)
gs needs some work to be able to work and link with the version
available for OS X.
mnesia_session seems to fall foul of some of the quote handling in the
erlc / erl interface. At a wild guess a similar issue to that with QNX
where execvp was broken.
Otherwise all looks good so far,
Rgds,
Sean
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mac.patch
Type: application/octet-stream
Size: 2667 bytes
Desc: not available
URL:
From earlyriser Thu Dec 6 01:47:37 2001
From: earlyriser (Sean Hinde)
Date: Thu, 6 Dec 2001 00:47:37 +0000
Subject: Building on OS X - a bit further on
In-Reply-To:
Message-ID:
Oops,
I'm not used to this mail thing on OS X yet.
The real version is here..
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mac.patch
Type: application/text
Size: 2189 bytes
Desc: not available
URL:
-------------- next part --------------
Sean
On Thursday, December 6, 2001, at 12:32 am, Sean Hinde wrote:
> Hi,
>
> Thanks for the patch for OS X.
>
> Here's one which builds on yours to add support for megaco and orber
>
> It also tidies up some other configure things to do with linking flags
> for shared libraries - in erl_interface particularly.
>
> I've tested the build on Solaris and OS X (except for the megaco -lfl
> part - only OS X)
>
> gs needs some work to be able to work and link with the version
> available for OS X.
>
> mnesia_session seems to fall foul of some of the quote handling in the
> erlc / erl interface. At a wild guess a similar issue to that with QNX
> where execvp was broken.
>
> Otherwise all looks good so far,
>
> Rgds,
> Sean
>
>
From kent Thu Dec 6 03:48:15 2001
From: kent (Kent Boortz)
Date: 06 Dec 2001 03:48:15 +0100
Subject: Building on OS X - a bit further on
In-Reply-To: Sean Hinde's message of "Thu, 6 Dec 2001 00:32:08 +0000"
References:
Message-ID:
Sean Hinde writes:
> Here's one which builds on yours to add support for megaco and orber
Thank you, I'm testing and integrating it into upcoming R8B-1.
> mnesia_session seems to fall foul of some of the quote handling in the
> erlc / erl interface. At a wild guess a similar issue to that with QNX
> where execvp was broken.
This is very frustrating. A space in the expression
+'{preproc_flags,"-D_CORBA_ -I ${IC_DIR}/include"}'
makes it fail. We have rewritten most of these constructs but I can't
figure out how to rewrite this one without a space. In the internal
source here the file "mnesia_corba_session.idl" is just a soft link to
"mnesia_session.idl". If we split to two files we can remove the
symbol _CORBA_ and use
+'{preproc_flags,"-I${IC_DIR}/include"}'
With this change mnesia_session compiles. I don't like it but I will
do this change.
If we just could get GS going without installing X we have a very
nice Mac OS X port,
kent
From etxuwig Thu Dec 6 10:39:43 2001
From: etxuwig (Ulf Wiger)
Date: Thu, 6 Dec 2001 10:39:43 +0100 (MET)
Subject: code:priv_dir()
In-Reply-To:
Message-ID:
On Wed, 5 Dec 2001, Vance Shipley wrote:
> priv_dir(Name) -> PrivDir | {error, What}
>
> This function returns the current priv directory for the
> Name[-*] directory. The current path is searched for a
> directory named .../Name-* (the -* suffix is optional for
> directories in the search path and it represents the version
> of the directory). The /priv suffix is added to the end of
> the found directory.
This description is not consistent with how it's actually
implemented. The path is _not_searched when priv_dir/1 is called.
Rather, when add_path/1 is called, the path to the Name[-*]
directory is stored in a code_names table. The call to
priv_dir(Name) will result in a lookup on that table; if Name
does not exist there, {error, ...} is returned; otherwise, /priv
is appended. No check is made to verify that Name/priv actually
exists (which is as it should be). On the other hand, when
code:add_path/1 is called, the supplied paths _are_ verified.
There is a reason for this disparity. Originally, priv_dir/1
_was_ implemented as described in the manual. However, it is
sometimes quite useful to call priv_dir frequently. For example,
we store HTML code under a certain priv_dir, allowing us to have
the HTML code easily (automatically) upgraded. Searching the full
code path every time priv_dir() was to be resolved was less than
optimal, and users of priv_dir() shouldn't have to worry about
the cost, and perhaps create ugly workarounds.
There is no logical way to add a name to the code_names table
except calling code:add_path(Name ++ "/ebin"). This is where the
compiled code should reside. There is no code:add_name/1
function (I'm not necessarily saying that there should be.)
/Uffe
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
From eleberg Thu Dec 6 11:09:43 2001
From: eleberg (Bengt Kleberg)
Date: Thu, 6 Dec 2001 11:09:43 +0100 (MET)
Subject: code:priv_dir()
Message-ID: <200112061009.LAA28563@etxb.ericsson.se>
> From: Ulf Wiger
> There is no logical way to add a name to the code_names table
> except calling code:add_path(Name ++ "/ebin"). This is where the
> compiled code should reside. There is no code:add_name/1
> function (I'm not necessarily saying that there should be.)
Thank you Ulf. Problem 'solved'.
My original code called made 2 attempts to setup the path for
code:get_priv(Name).
First I added Directory to the path. Directory had Name directly under
it (Directory/Name). That was how I interpreted the manual page. It did
not work.
Then I added Directory1 to the path. (Directory1 = Directory/Name/bin).
That did not work.
The 3:rd attempt (that I just tried) added Directory2 = Directory/Name/ebin to
path. That worked.
I would like to express my sentiment that setting up things to make get_priv()
work is rather un-intuitive.
bengt
From vances Thu Dec 6 11:28:02 2001
From: vances (Vance Shipley)
Date: Thu, 6 Dec 2001 05:28:02 -0500
Subject: code:priv_dir()
In-Reply-To:
Message-ID:
Personally I don't see anything wrong with the description,
it's just semantics. I read "path" as the code path which as
you relate is implemented in a code_names table. This however
is one of those "you're not supposed to know that" things ala
the recent discussion of records. If you read "path" as in
$PATH, or something else, you would indeed get the wrong idea.
-Vance
> -----Original Message-----
> From: Ulf Wiger [mailto:etxuwig]
> Sent: Thursday, December 06, 2001 4:40 AM
> To: Vance Shipley
> Cc: Bengt Kleberg; erlang-questions
> Subject: RE: code:priv_dir()
>
>
> On Wed, 5 Dec 2001, Vance Shipley wrote:
>
> > priv_dir(Name) -> PrivDir | {error, What}
> >
> > This function returns the current priv directory for the
> > Name[-*] directory. The current path is searched for a
> > directory named .../Name-* (the -* suffix is optional for
> > directories in the search path and it represents the version
> > of the directory). The /priv suffix is added to the end of
> > the found directory.
>
> This description is not consistent with how it's actually
> implemented. The path is _not_searched when priv_dir/1 is called.
> Rather, when add_path/1 is called, the path to the Name[-*]
> directory is stored in a code_names table. The call to
> priv_dir(Name) will result in a lookup on that table; if Name
> does not exist there, {error, ...} is returned; otherwise, /priv
> is appended. No check is made to verify that Name/priv actually
> exists (which is as it should be). On the other hand, when
> code:add_path/1 is called, the supplied paths _are_ verified.
From eleberg Thu Dec 6 11:47:27 2001
From: eleberg (Bengt Kleberg)
Date: Thu, 6 Dec 2001 11:47:27 +0100 (MET)
Subject: code:priv_dir()
Message-ID: <200112061047.LAA29668@etxb.ericsson.se>
> From: "Vance Shipley"
> Personally I don't see anything wrong with the description,
> it's just semantics. I read "path" as the code path which as
> you relate is implemented in a code_names table. This however
> is one of those "you're not supposed to know that" things ala
> the recent discussion of records. If you read "path" as in
> $PATH, or something else, you would indeed get the wrong idea.
> > > priv_dir(Name) -> PrivDir | {error, What}
> > >
> > > This function returns the current priv directory for the
> > > Name[-*] directory. The current path is searched for a
> > > directory named .../Name-* (the -* suffix is optional for
The major problem is that "path" is a list of directories where Erlang modules
can be found.
code:get_priv() looks at those directories (possibly minus the [-*]
bit) and it _also_ looks at those directories _minus_ a trailing /ebin.
Which I did _not_ manage to understand by reading the manual.
Interfaces should not cheat.
bengt
------------- End Forwarded Message -------------
From Laszlo.Varga Thu Dec 6 14:11:25 2001
From: Laszlo.Varga (Laszlo Varga)
Date: Thu, 6 Dec 2001 14:11:25 +0100 (MET)
Subject: mnesia and hardware drivers
Message-ID: <200112061311.fB6DBPV17993@duna273.eth.ericsson.se>
Hi Sirs,
has anybody used mnesia for addministrating hardware devices ?
I mean an IP network, or a production line or something similiair.
I guess, the problem is theoraticly easy provided the driver has
only atomic operations, which produces go-nogo results (in a limited time
frame).
However, I do not know, how to handle this case from mnesia.
Unfortunately, my scope is not bound to drivers of this
easy type, but I should handle dirty situations , when there is no
response from the driver.
What I'm thinking about is a framework which is as close to a database
as it can be, and able to manage a number of devices. The framework should
provide means for handling the drivers observable states, at a minimal
cost, or in other words, should mainly rely on standard database solutions.
However, i've never seen a database "from inside" I guess this problem
is close to the problem of synchronising distributed databases. If someone
could help me with litreture, please do.
Thanks
Laszlo
mailto: ethvala
From earlyriser Thu Dec 6 16:48:23 2001
From: earlyriser (Sean Hinde)
Date: Thu, 6 Dec 2001 15:48:23 +0000
Subject: Building on OS X - a bit further on
In-Reply-To:
Message-ID:
Hi,
> If we just could get GS going without installing X we have a very
> nice Mac OS X port,
Well X is replaced by Carbon in the OS X port of TCL/TK..
The following procedure at least gets the thing to compile using the
downloadable binary of TCL/TK for OS X
Build and make install with touch lib/gs/SKIP
remove gs/lib/SKIP
make again and allow to run until error (All you need is tcl2c which is
not included with the TCL libs)
apply the patch (presumably) from:
http://www.erlang.org/ml-archive/erlang-questions/./200109/msg00059.html
cd lib/gs/c_src
./lib/tcl7.6/unix/tcl2c -o gstk.c gstk.tcl gstk_srv.tcl -tk
cc -o ../priv/bin/killer killer.c
cc -o ../priv/bin/wrap wrap.c
cc -o ../priv/bin/gstk gstk.c
-I/Library/Frameworks/Tcl.framework/Headers
-I/Library/Frameworks/Tcl.framework/PrivateHeaders -framework TCL
-framework TK
run make install again (at least gets as far as installing ebin and src)
copy the priv dir from the src tree into the installed gs directory.
13>I=gs:start().
{1,<0.101.0>}
14> W=gs:window(I,[{title,"Ball"},{width,300},{height,300},{map,true}]).
{3,<0.101.0>}
I get a window (hurrah!) which doesn't respond to anything - it's a
start :-)
If this ever works it might just be easiest to always look for
preinstalled TCL/TK on the Mac - I'm not sure too many people will be
using the Mac as an embedded target..
Also, there is no target for a static library at all in the mac Tk port
(although there is for TCL) - without a lot of work on Tk builds
frameworks look to be the only way.
Sean
From earlyriser Thu Dec 6 16:48:23 2001
From: earlyriser (Sean Hinde)
Date: Thu, 6 Dec 2001 15:48:23 +0000
Subject: Building on OS X - a bit further on
In-Reply-To:
Message-ID:
Hi,
> If we just could get GS going without installing X we have a very
> nice Mac OS X port,
Well X is replaced by Carbon in the OS X port of TCL/TK..
The following procedure at least gets the thing to compile using the
downloadable binary of TCL/TK for OS X
Build and make install with touch lib/gs/SKIP
remove gs/lib/SKIP
make again and allow to run until error (All you need is tcl2c which is
not included with the TCL libs)
apply the patch (presumably) from:
http://www.erlang.org/ml-archive/erlang-questions/./200109/msg00059.html
cd lib/gs/c_src
./lib/tcl7.6/unix/tcl2c -o gstk.c gstk.tcl gstk_srv.tcl -tk
cc -o ../priv/bin/killer killer.c
cc -o ../priv/bin/wrap wrap.c
cc -o ../priv/bin/gstk gstk.c
-I/Library/Frameworks/Tcl.framework/Headers
-I/Library/Frameworks/Tcl.framework/PrivateHeaders -framework TCL
-framework TK
run make install again (at least gets as far as installing ebin and src)
copy the priv dir from the src tree into the installed gs directory.
13>I=gs:start().
{1,<0.101.0>}
14> W=gs:window(I,[{title,"Ball"},{width,300},{height,300},{map,true}]).
{3,<0.101.0>}
I get a window (hurrah!) which doesn't respond to anything - it's a
start :-)
If this ever works it might just be easiest to always look for
preinstalled TCL/TK on the Mac - I'm not sure too many people will be
using the Mac as an embedded target..
Also, there is no target for a static library at all in the mac Tk port
(although there is for TCL) - without a lot of work on Tk builds
frameworks look to be the only way.
Sean
From earlyriser Thu Dec 6 16:48:23 2001
From: earlyriser (Sean Hinde)
Date: Thu, 6 Dec 2001 15:48:23 +0000
Subject: Building on OS X - a bit further on
In-Reply-To:
Message-ID:
Hi,
> If we just could get GS going without installing X we have a very
> nice Mac OS X port,
Well X is replaced by Carbon in the OS X port of TCL/TK..
The following procedure at least gets the thing to compile using the
downloadable binary of TCL/TK for OS X
Build and make install with touch lib/gs/SKIP
remove gs/lib/SKIP
make again and allow to run until error (All you need is tcl2c which is
not included with the TCL libs)
apply the patch (presumably) from:
http://www.erlang.org/ml-archive/erlang-questions/./200109/msg00059.html
cd lib/gs/c_src
./lib/tcl7.6/unix/tcl2c -o gstk.c gstk.tcl gstk_srv.tcl -tk
cc -o ../priv/bin/killer killer.c
cc -o ../priv/bin/wrap wrap.c
cc -o ../priv/bin/gstk gstk.c
-I/Library/Frameworks/Tcl.framework/Headers
-I/Library/Frameworks/Tcl.framework/PrivateHeaders -framework TCL
-framework TK
run make install again (at least gets as far as installing ebin and src)
copy the priv dir from the src tree into the installed gs directory.
13>I=gs:start().
{1,<0.101.0>}
14> W=gs:window(I,[{title,"Ball"},{width,300},{height,300},{map,true}]).
{3,<0.101.0>}
I get a window (hurrah!) which doesn't respond to anything - it's a
start :-)
If this ever works it might just be easiest to always look for
preinstalled TCL/TK on the Mac - I'm not sure too many people will be
using the Mac as an embedded target..
Also, there is no target for a static library at all in the mac Tk port
(although there is for TCL) - without a lot of work on Tk builds
frameworks look to be the only way.
Sean
From hal Thu Dec 6 17:19:22 2001
From: hal (Hal Snyder)
Date: 06 Dec 2001 10:19:22 -0600
Subject: Multple Application Management
In-Reply-To: (Ulf Wiger's message of "Wed, 5 Dec 2001 10:00:22 +0100 (MET)")
References:
Message-ID: <87y9kgxqwl.fsf@cb293842-b.rmdws1.il.home.com>
Ulf Wiger writes:
> The AXD 301 has functionality similar to what you describe. We have
> the possibility to add applications to an already running system,
> and if a new version of an already running application is made
> available, the software management component will figure out how to
> upgrade the system with it.
> This is done with the help of a layer on top of the release
> handler, and some design rules. One of the important things is
> that there must be a framework for initializing mnesia tables,
> and registering system resources (such as web menus and pages,
> alarm types, and distribution groups). It should also be
> possible, of course, to unregister the same, if an application is
> to be removed.
>
> This stuff could hypothetically be made available as Open Source,
> but we don't have the resources to do that at AXD 301.
I work with Martin at Vail and have been following this thread with
great interest. Like Vance, I'd like to think of an Erlang cluster as
a collection of servers onto which new apps are occasionally deployed
without restarting the nodes. I don't think this notion fits very well
with boot files.
I wonder about the feasibility of several nodes with very generic
startup config, plus a couple management nodes from which new code is
injected into the platform.
We use Erlang for several similar-looking apps - servers that do
various queries and resource allocation for our computer telephony
platform, a middle layer between speech servers and the resources they
need. It would be very interesting to learn more about the "extra
layer" mentioned above. Meanwhile, I wonder we shouldn't just
structure what is running on our servers as a single app, and add new
functions to it as needed. Does that make sense? I have a bad cold, so
it might not. :)
From roszkows Thu Dec 6 19:45:00 2001
From: roszkows (Michael Roszkowski)
Date: Thu, 06 Dec 2001 12:45:00 -0600
Subject: ssl module doesn't build correctly in R8B-0 (or R7B-3)
Message-ID: <3C0FBCAC.DA9C5282@berbee.com>
I had been trying to use the ssl module in R8B-0 on RedHat Linux
machines (both RH7.0 and 7.1 with OpenSSL) and couldn't get it to work.
I noticed the same behavior on a NetBSD 1.5.1 machine. I also
tried it on an R7B-3 installation and it failed there, too. All of them
use OpenSSL. I'm not sure what other platforms might be affected.
ssl:start() complains that
exec: /usr/local/lib/erlang/lib/ssl-2.3.3/priv/bin/ssl_esock: not
found
Looking over the installed code, ssl_esock is, indeed, not there.
It looks like the commands to build and install it have been left
out of the Makefile.in in the otp_src_R8B-0/lib/ssl/c_src/ directory.
I've attached the patch that I'm using to get around the problem. (It
assumes that you are running patch -p0 from the ERL_TOP directory.)
Was this just an oversight on the part of the development team
or was it removed for some reason (or did I just somehow mess
up the build on all of these machines)?
Thanks.
--Mike Roszkowski
-------------- next part --------------
*** lib/ssl/c_src/Makefile.in.orig Wed Dec 5 14:38:50 2001
--- lib/ssl/c_src/Makefile.in Wed Dec 5 14:39:55 2001
***************
*** 105,111 ****
debug opt:
echo "Nothing to build for Win32"
else
! debug opt: $(OBJDIR) $(BINDIR) $(SSL_BASE) $(EXTRA_SSL_OBJS) $(SSL_MAKEFILE)
$(OBJDIR):
- -p $(OBJDIR)
--- 105,111 ----
debug opt:
echo "Nothing to build for Win32"
else
! debug opt: $(OBJDIR) $(BINDIR) $(SSL_BASE) $(EXTRA_SSL_OBJS) $(SSL_BINS) $(SSL_MAKEFILE)
$(OBJDIR):
- -p $(OBJDIR)
***************
*** 156,161 ****
--- 156,162 ----
-e "s;%SSLEAY_LIBDIR%;$(SSLEAY_LIBDIR);" \
-e "s;%LDLIBS%;$(LDLIBS);" ./Makefile.win32.dist \
> $(RELSYSDIR)/priv/obj/Makefile
+ $(INSTALL_PROGRAM) $(SSL_BINS) $(RELSYSDIR)/priv/bin
else
release_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)/priv/bin
***************
*** 166,171 ****
--- 167,173 ----
-e "s;%SSLEAY_LIBDIR%;$(SSLEAY_LIBDIR);" \
-e "s;%LDLIBS%;$(LDLIBS);" ./Makefile.dist \
> $(RELSYSDIR)/priv/obj/Makefile
+ $(INSTALL_PROGRAM) $(SSL_BINS) $(RELSYSDIR)/priv/bin
endif
release_docs_spec:
From icsmif Fri Dec 7 16:26:39 2001
From: icsmif (icsmif)
Date: Fri, 7 Dec 2001 16:26:39 +0100 (CET)
Subject: Icsm 2002 Call for Papers
Message-ID: <200112071526.fB7FQdN19874@unisannio.it>
Dear Colleague
I would like to invite you at the IEEE International Conference on Software
Maintenance, 2002, and associated workshops: SCAM, WSE, and WESS next
October 2002 in Montreal, Canada. Outstanding Keynotes such as Jon Pincus,
Microsoft, Industrial and experience papers, reseach papers, tutorials,
tool expositions, dissertation forum, workshops, panels, and other exciting
activities have been planned.
We hope that this CFP will be useful for your work. Please forward the
following to anybody who you think may be interested. Our apologies if you
received multiple copy of this.
If you would like to be removed from our list please send an email to
icsm2002.info with REMOVE in the subject.
ICSM2002
Giuliano Antoniol, Program CoChair
Ira D. Baxter, Program CoChair
============================================================================
IEEE International Conference on Software Maintenance 2002
Sponsored by IEEE
ICSM-2002, Montreal, Canada, 3-6 October 2002
http://www.icsm2002.org
icsm2002.info
Call for Papers
Theme: Maintaining distributed heterogeneous systems
ICSM is the major international conference in the field of software and
systems maintenance, evolution, and management. This year's theme
elaborates on last year's theme of "systems and software evolution in the
era of the internet". Standalone legacy applications of yesterday and
novel applications using today's technologies are rapidly becoming
integrated as part of enterprise-wide and industry-wide systems. The need
for rapid integration has led to many distributed heterogeneous systems
that are very challenging to maintain and evolve.
ICSM 2002 will address these new scenarios and the major challenges on
maintenance and evolution. The focus of the conference will be on the new
challenges that heterogeneous systems pose for software maintenance, and
the new opportunities for researchers and practitioners. A main goal of
ICSM is to promote interaction between researchers and practitioners. ICSM
2002 will bring together researchers, practitioners, developers and users
of tools, technology transfer experts, and project managers.
Jon Pincus (Microsoft) will describe how Microsoft handles software
enhancements. Other outstanding Keynote speakers are being arranged. Past
conferences have had Parnas, Rombach, McCabe, and Jacobson.
ICSM-2002 will offer technical presentations and demonstrations from
academia and industry. We are particularly interested in exchanging
concepts, prototypes, research ideas, and other results that could
contribute to the academic arena and also benefit business and the
industrial community. ICSM 2002 will be participatory, with working
collaborative sessions and presentations of industry projects.
The Conference will be held in conjunction with:
WESS -- Workshop on Empirical Studies of Software Maintenance.
SCAM -- Source Code Analysis and Manipulation
WSE -- Workshop on WEBsite Evolution
Topics of interest include but are not restricted to the following aspects
of maintenance and evolution:
- Methods and theories - Maintenance and/or productivity metrics
- Organizational frameworks - Preventive maintenance
- Design for maintenance - Tools and environments
- Life cycle and process control - Models/methods for error prediction
- User interface evolution - Commercial off-the-shelf (COTS)
- Third party maintenance - Freeware and open source applications
- Program comprehension - Software and system visualisation
- Knowledge based systems - Measurement of software
- Formal methods - Legal aspects and standards
- Software reusability - Internet and distributed systems
- Empirical studies - Testing and regression testing
- Remote, tele-work - Version and configuration management
- Processes and strategies - Management and organisation
- Co-operative applications - Source code analysis and manipulation
- Processes and strategies - Impact of new software practices
- Programming languages - Reengineering and reverse engineering
- Multimedia systems
RESEARCH PAPERS: Research papers should describe original and significant
work in the research and practice of software maintenance and evolution.
Case studies, empirical research, and experiments are particularly welcome.
We also welcome papers that present leading edge and novel ideas in
maintenance. Papers must not exceed 5000 words (10 pages IEEE style) in
length, in English. To encourage strong submissions a prize will be
awarded for the "Best Paper as Submitted". This Prize is offered by John
Wiley & Sons, the publishers of the Journal of Software Maintenance and
Evolution. The Program Committee will select the winner and a formal
presentation of the Prize will be made in Montreal at ICSM 2002.
FAST TRACK PAPERS: Fast Track papers should describe on-going research
activities, or summarize the experience in software maintenance and
evolution. Papers must not exceed 4 pages, IEEE style, in length, in
English. Accepted fast-track papers will be included in a dedicated
section of the conference proceedings.
DISSERTATION FORUM: We welcome submissions of young researchers that have
delivered their dissertation (Masters or Ph.D.) in the last three years.
An award will be issued for the best submission. Four page summaries of
accepted dissertations will be included in the conference proceedings and a
special forum section will be organised at the conference.
INDUSTRIAL APPLICATIONS: Proposals for presentations of Industrial
Applications are welcome. These can be state-of-the-art descriptions,
experience reports and survey reports from real projects, industrial
practices and models, or tool demonstrations. A dedicated sub-committee of
the program committee will review Industrial Application proposals and a
1-page summary of accepted proposals will be included in the conference
proceedings.
TUTORIALS: Tutorials should present software maintenance and evolution
topics of interest to practitioners. Tutorials may be full day or half-day
in length.
SUBMISSION STYLE: PDF and/or Postscript electronic submission only. Papers
longer than 15 pages or 6000 words will be returned to the authors.
Acceptance notification will occur June 1, 2002.
IMPORTANT DATES
Research Papers
deadline: 15 Feb. 2002 mailto:icsm2002.full
Fast Track Papers
deadline: 1 May 2002 mailto:icsm2002.short
Dissertation Forum
deadline: 15 Febr. 2002 mailto:icsm2002.thesis
Industrial Applications
deadline: 15 March 2002 mailto:icsm2002.industry
Tutorials
deadline: 15 Feb. 2002 mailto:icsm2002.tutorial
From rpettit Fri Dec 7 20:53:43 2001
From: rpettit (Rick Pettit)
Date: Fri, 7 Dec 2001 13:53:43 -0600 (CST)
Subject: Spawning processes on host OS with unix:cmd/1
Message-ID:
I would like to code an erlang process to start various UNIX processes and
keep them running. I can start these processes with unix:cmd/1, but the
return value is the stdout of the shell command, and I am interested in
the pid.
I would rather not have to start the command and then look at ps(1) output
to get the pid, as that can be error prone and won't work if multiple
instances of the same executable are running and I need to differentiate
between them.
Is there a way to start a UNIX process from Erlang and get the pid?
Rick
From per Fri Dec 7 21:23:58 2001
From: per (per)
Date: Fri, 7 Dec 2001 21:23:58 +0100 (CET)
Subject: Spawning processes on host OS with unix:cmd/1
In-Reply-To:
Message-ID: <200112072023.fB7KNwC23002@tordmule.bluetail.com>
Rick Pettit wrote:
>
>Is there a way to start a UNIX process from Erlang and get the pid?
I assume you don't want to interact with the program through a port
(otherwise unix:cmd() is not the way to go), but just get it running
independent from the Erlang system? Try this if so:
unix:cmd("/your/program & echo $!")
(Nothing Erlang-specific really...:-)
--Per Hedeland
per
From rpettit Fri Dec 7 21:38:56 2001
From: rpettit (Rick Pettit)
Date: Fri, 7 Dec 2001 14:38:56 -0600 (CST)
Subject: Spawning processes on host OS with unix:cmd/1
In-Reply-To: <200112072023.fB7KNwC23002@tordmule.bluetail.com>
Message-ID:
> Rick Pettit wrote:
> >
> >Is there a way to start a UNIX process from Erlang and get the pid?
>
> I assume you don't want to interact with the program through a port
> (otherwise unix:cmd() is not the way to go), but just get it running
> independent from the Erlang system? Try this if so:
>
> unix:cmd("/your/program & echo $!")
>
> (Nothing Erlang-specific really...:-)
How very simple :-). Can't believe I didn't see that possibility
earlier. Oh, and by the way, I now use os:cmd/1 as it appears unix:cmd/1
is deprecated.
Thanks for your help.
Rick
From nigar Sat Dec 8 05:48:52 2001
From: nigar (nigar)
Date: Sat, 8 Dec 2001 10:18:52 +0530
Subject: MAP Message Querie
Message-ID: <003001c17fa3$bf8bede0$0c01a8c0@teledna.co.in>
Hello Erlang,
How r u doing?????
Even we want to know how abt to go, with making the MAP message.
like for eg:
what i know is the map protocol data unit will carry the message,
but i am not getting the exact understanding.
if u know ,guide me ya!!!!!!!
if we tell MAP-OPEN the TCAP primitive is TC Begin
for this what will the MAP-OPEN message should be ,
and what message has to be send to TCAP.
we got the asn TCAP code along with the compiler we downloaded,
but while generating the code it is giving 3 errors
we are using object sys asn compiler.
Can u tell me were will we get the TCAP asn code.
Thanks in Advance
Nigar
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From svg Sun Dec 9 20:12:05 2001
From: svg (Vladimir Sekissov)
Date: Mon, 10 Dec 2001 00:12:05 +0500 (YEKT)
Subject: Emacs erlang mode patch(Woman)
In-Reply-To: <003001c17fa3$bf8bede0$0c01a8c0@teledna.co.in>
References: <003001c17fa3$bf8bede0$0c01a8c0@teledna.co.in>
Message-ID: <20011210.001205.93071176.svg@surnet.ru>
Good day,
below is a patch for Emacs erlang mode to work with woman which is
default man browser in emacs 21.*
Regards,
Vladimir Sekissov
------------------------------- cut here ----------------------------------
diff -Naur erlang.el.old erlang.el
--- erlang.el.old Fri Sep 15 15:54:37 2000
+++ erlang.el Sun Dec 9 23:37:44 2001
@@ -440,6 +440,9 @@
'(("^\\([^:( \t\n]+\\)[:(][ \t]*\\([0-9]+\\)[:) \t]" . (1 2)))
"*Patterns for matching Erlang errors.")
+(defvar erlang-man-woman (require 'woman nil t)
+ "*Use internal woman package")
+
(defvar erlang-man-inhibit (eq system-type 'windows-nt)
"Inhibit the creation of the Erlang Manual Pages menu.
@@ -2520,9 +2523,10 @@
mod)
input))))
;; Emacs 18 doesn't provide `man'...
- (condition-case nil
- (require 'man)
- (error nil))
+ (if (not (require 'woman nil t))
+ (condition-case nil
+ (require 'man)
+ (error nil)))
(let ((modname nil)
(funcname nil))
(cond ((null name)
@@ -2546,13 +2550,22 @@
(erlang-man-patch-notify)
(setq erlang-man-function-name funcname))
(condition-case nil
- (erlang-man-module modname)
+ (progn
+ (erlang-man-module modname)
+ (if erlang-man-woman
+ (progn
+ (if erlang-man-function-name
+ (progn
+ (erlang-man-find-function (WoMan-find-buffer)
+ erlang-man-function-name)
+ (setq erlang-man-function-name nil))))))
(error (setq erlang-man-function-name nil))))
(t
(erlang-man-module modname)
(if funcname
(erlang-man-find-function
- (or (get-buffer "*Manual Entry*") ; Emacs 18
+ (or (if erlang-man-woman (WoMan-find-buffer))
+ (get-buffer "*Manual Entry*") ; Emacs 18
(current-buffer)) ; XEmacs
funcname))))))
@@ -2573,7 +2586,8 @@
;; running under Emacs 19.
(error (error (concat "This commands needs the package `advice', "
"please upgrade your Emacs."))))
- (require 'man)
+ (if (not (require 'woman nil t))
+ (require 'man))
(defadvice Man-notify-when-ready
(after erlang-Man-notify-when-ready activate)
"Sets point at the documentation of the function name in
@@ -2599,16 +2613,16 @@
(set-window-point win (point)))
(message "Could not find function `%s'" func)))))))
-
(defun erlang-man-display (file)
"Display FILE as a `man' file.
This is de default manual page display function.
The variables `erlang-man-display-function' contains the function
to be used."
;; Emacs 18 doesn't `provide' man.
- (condition-case nil
- (require 'man)
- (error nil))
+ (if (not (require 'woman nil t))
+ (condition-case nil
+ (require 'man)
+ (error nil)))
(if file
(let ((process-environment (copy-sequence process-environment)))
(if (string-match "\\(.*\\)/man[^/]*/\\([^/]+\\)\\.[^.]$" file)
@@ -2619,7 +2633,10 @@
;; Emacs 18
(setq process-environment (cons (concat "MANPATH=" dir)
process-environment)))
- (cond ((not (and (not erlang-xemacs-p)
+ (cond (erlang-man-woman
+ (funcall (symbol-function 'WoMan-getpage-in-background)
+ page))
+ ((not (and (not erlang-xemacs-p)
(= erlang-emacs-major-version 19)
(< erlang-emacs-minor-version 29)))
(manual-entry page))
@@ -2630,7 +2647,6 @@
(funcall (symbol-function 'Man-getpage-in-background)
page))))
(error "Can't find man page for %s\n" file)))))
-
(defun erlang-man-describe-error ()
"Describe why the manual pages weren't found."
From spearce Mon Dec 10 06:23:20 2001
From: spearce (Shawn Pearce)
Date: Mon, 10 Dec 2001 00:23:20 -0500
Subject: "Fast" text parsing
Message-ID: <20011210002320.A29616@spearce.org>
I have something of a problem, so I thought I would ask the list.
I want to do "fast" text parsing in Erlang. I'm considering porting
an application from C++ to Erlang, but it does a considerable amount
of text processing. Currently it contains two seperate text parsers,
one that parses HTML using a very simple mmap'd character buffer which
it iterates over character by character, the other a flex/bison
(lex/yacc) grammar, abstract syntax tree and the whole nine yards.
Currently average parse times are less than a second for even the
most complex documents with this C++ tool.
My problem is, how do I construct Erlang parsers for both the HTML and
flex/bison components in such a way that I don't increase parse times
dramatically?
I have tried a naive approach in the past of loading the entire file into
a list, one character per cell, and walking that list with a simple hand
rolled lexer which created a list of tokens to be handed to the real
grammar parser. The lexer required 12 seconds to tokenize even the
smallest document (<1000 characters), but my average document size is
closer to 16,000 characters. The C++ tool rips through 10 16k documents
in less time than the Erlang lexer could get through a single 1,000
character document.
Is the trick to use binaries? Or is there no trick, just that Erlang
text processing in general is slower than what can be constructed in
lower level languages such as C++?
I guess I'm really interested in Erlang for two reasons: one, I can
quickly make the tool distributed and take advantage of many spare
CPU cycles on other nodes to perform parsing, two it has really nice
pattern matching on function heads, especially with records, which may
be helpful for working with the abstract syntax trees I need to deal with.
Anyone have experience with building "fast" parsers??? I'd love to hear
some suggestions...
--
Shawn.
``If this had been a real
life, you would have
received instructions
on where to go and what
to do.''
From hakan Mon Dec 10 09:23:19 2001
From: hakan (Hakan Mattsson)
Date: Mon, 10 Dec 2001 09:23:19 +0100 (MET)
Subject: "Fast" text parsing
In-Reply-To: <20011210002320.A29616@spearce.org>
Message-ID:
On Mon, 10 Dec 2001, Shawn Pearce wrote:
Shawn> Is the trick to use binaries? Or is there no trick, just that Erlang
Shawn> text processing in general is slower than what can be constructed in
Shawn> lower level languages such as C++?
Shawn>
Shawn> I guess I'm really interested in Erlang for two reasons: one, I can
Shawn> quickly make the tool distributed and take advantage of many spare
Shawn> CPU cycles on other nodes to perform parsing, two it has really nice
Shawn> pattern matching on function heads, especially with records, which may
Shawn> be helpful for working with the abstract syntax trees I need to deal with.
Shawn>
Shawn> Anyone have experience with building "fast" parsers??? I'd love to hear
Shawn> some suggestions...
In the Megaco application I started with a handwritten scanner in
Erlang, using a long list of integers (an "Erlang String") as input.
The output was a list of tokens suitable for the yecc generated parser.
By rewriting the scanner in C using using the scanner generator flex,
and linking it into Erlang as a driver, I got up to 10 times better
performance of the scanner. The new scanner used binaries as input
and allocated the list of tokens directly on the callers heap.
The two scanners can be found at:
megaco/src/text/megaco_text_scanner.erl
and
megaco/src/flex/megaco_flex_scanner.erl
megaco/src/flex/megaco_flex_scanner_drv.flex
/H?kan
---
H?kan Mattsson
Ericsson
Computer Science Laboratory
http://www.ericsson.com/cslab/~hakan/
From richardc Mon Dec 10 11:29:50 2001
From: richardc (Richard Carlsson)
Date: Mon, 10 Dec 2001 11:29:50 +0100 (MET)
Subject: "Fast" text parsing
In-Reply-To: <20011210002320.A29616@spearce.org>
Message-ID:
On Mon, 10 Dec 2001, Shawn Pearce wrote:
> I have tried a naive approach in the past of loading the entire file into
> a list, one character per cell, and walking that list with a simple hand
> rolled lexer which created a list of tokens to be handed to the real
> grammar parser. The lexer required 12 seconds to tokenize even the
> smallest document (<1000 characters), but my average document size is
> closer to 16,000 characters. The C++ tool rips through 10 16k documents
> in less time than the Erlang lexer could get through a single 1,000
> character document.
I don't know what you're doing, but the normal Erlang tokeniser
(erl_scan) only needs about 100 ms (on my local crusty hardware) to
tokenise a 16 k char file, and it is written purely in Erlang. A big
source file of about 150 k char took 300 ms.
Reading the file as a binary and converting to a string took 30-40 ms
for the larger file, and for the smaller file less than 10 ms.
The call `epp:parse_file/3', which reads, tokenises, preprocesses and
parses the code (and does not read the whole file as a binary) takes
250-300 ms for the smaller file, and 650-700 ms for the larger.
Of course, you can probably still get a tenfold speedup over this by
using a parser driver written in C, but don't get the idea that a
tokeniser/parser written in Erlang cannot be reasonably fast.
/Richard
Richard Carlsson (richardc) (This space intentionally left blank.)
E-mail: Richard.Carlsson WWW: http://www.csd.uu.se/~richardc/
From Sean.Hinde Mon Dec 10 13:18:42 2001
From: Sean.Hinde (Sean Hinde)
Date: Mon, 10 Dec 2001 12:18:42 -0000
Subject: MAP Message Querie
Message-ID: <402DD461F109D411977E0008C791C312039F667E@IMP02MBX>
Hello,
I'm sorry but you have asked your question in the wrong place. Erlang is a
programming language and this list is for questions about that language.
I'd suggest www.3gpp.org to find information about
MAP signalling
Sean
-----Original Message-----
From: nigar [mailto:nigar]
Sent: 08 December 2001 04:49
To: erlang-questions
Subject: MAP Message Querie
Hello Erlang,
How r u doing?????
Even we want to know how abt to go, with making the MAP message.
like for eg:
what i know is the map protocol data unit will carry the message,
but i am not getting the exact understanding.
if u know ,guide me ya!!!!!!!
if we tell MAP-OPEN the TCAP primitive is TC Begin
for this what will the MAP-OPEN message should be ,
and what message has to be send to TCAP.
we got the asn TCAP code along with the compiler we downloaded,
but while generating the code it is giving 3 errors
we are using object sys asn compiler.
Can u tell me were will we get the TCAP asn code.
Thanks in Advance
Nigar
NOTICE AND DISCLAIMER:
This email (including attachments) is confidential. If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents. We cannot accept liability for any breaches of
confidence arising through use of email. Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions. We will not accept responsibility for any commitments
made by our employees outside the scope of our business. We do not warrant
the accuracy or completeness of such information.
From Laszlo.Varga Tue Dec 11 10:30:21 2001
From: Laszlo.Varga (Laszlo Varga)
Date: Tue, 11 Dec 2001 10:30:21 +0100 (MET)
Subject: error on file manipulation
Message-ID: <200112110930.fBB9ULV20310@duna273.eth.ericsson.se>
Hello,
I've been playing with the otp R8B on Solaris and got strange
result from modul file:
129> {ok,Macs2} = file:open("Cica.txt",read).
{ok,<0.1977.0>}
130> file:file_info(Macs2).
{error,einval}
And so on, opening and closeing seem ok, but nothing else excepting
io:nl(Macs2).
Do I make something wrong, or is this a problem of installation?
Thanks for helping me
Laszlo
mailto: ethvala
From etxhste Tue Dec 11 11:08:54 2001
From: etxhste (Hakan Stenholm)
Date: Tue, 11 Dec 2001 11:08:54 +0100 (MET)
Subject: error on file manipulation
Message-ID: <200112111008.LAA23290@avc240.etxb.ericsson.se>
I ran this in R7B and got the same error:
{ok,Macs2} = file:open("test.erl",read).
{ok,<0.38.0>}
2> file:file_info(Macs2).
{error,einval}
3> file:read_file_info(Macs2).
{error,einval}
but this is wrong in several ways:
the format of open should be:
open(Filename, ModeList)
Opens the file Filename in the mode determined by ModeList. ModeList may
contain one or more of the following items:
read - The file, which must exist, is opened for reading.
....
4> {ok,Macs3} = file:open("test.erl",[read]).
{ok,<0.42.0>}
file_info/1 is deprecated, use read_file_info/1 instead, also note that both
functions take filename and NOT an iodevice.
The documentation says:
read_file_info(Filename)
Retrieves information about a file. Returns {ok, FileInfo} if successful,
otherwise {error, Reason}. FileInfo is a record. Its definition can be found
by including file.hrl from the kernel application:
-include_lib("kernel/include/file.hrl").
The record contains the following fields.
....
6> file:read_file_info("test.erl").
{ok,{file_info,383,
regular,
read_write,
{{2001,12,11},{10,54,47}},
{{2001,11,20},{13,59,24}},
{{2001,11,20},{13,59,24}},
33204,
1,
46137348,
0,
3796523,
41013,
862}}
From kent Tue Dec 11 17:34:35 2001
From: kent (Kent Boortz)
Date: 11 Dec 2001 17:34:35 +0100
Subject: P9 20011210 SNAPSHOT
Message-ID:
*************************** P9 SNAPSHOT **************************
This is an early snapshot of the Erlang/OTP development sources.
R9 will be released middle of October 2002.
This early snapshot may contain known bugs and parts that is not
working or can't be built on some platforms. During the daily build
the code has built and been tested on various platforms with reasonable
test scores so this snapshot should not be totally broken.
You can find the snapshots at
http://www.erlang.org/download/snapshots/otp_src_P9-20011210-SNAPSHOT.tar.gz
http://www.erlang.org/download/snapshots/otp_win32_P9-20011210-SNAPSHOT.exe
http://www.erlang.org/download/snapshots/otp_html_P9-20011210-SNAPSHOT.tar.gz
http://www.erlang.org/download/snapshots/otp_man_P9-20011210-SNAPSHOT.tar.gz
or on the Ericsson Intranet
http://erlang.ericsson.se/opensource/
If you are a paying customer and want to test snapshots of binary
releases for our supported platforms, let us know.
Some notes (that may not be 100% correct)
The tool fprof is improved.
* More analysis sorting possibilities, at least a' la eprof.
* More analysis alternatives, at least a summary over all processes.
* Tail recursive call detection during profiling by using 'caller'
match spec.
Messages received from ports does no longer reset the seq trace
token for the receiving process. This might be regarded as an
incompatibility, but presumably desired. Now the seq trace token
does not get swallowed by file operations, io operations, and other
kernel/stdlib functions that use ports in their implementation.
When the match spec {set_seq_token, _, _} was used to start
sequential tracing, it crashed the heap of the process it was
running from, and corrupted heap data or crashed the emulator. This
bug has now been corrected.
lists:sort/2 and lists:merge/3 were not stable. lists:ukeysort/3 and
lists:usort/2 could leave duplicates. A bug in lists:umerge/3 has
been fixed.
The 'file_sorter' module recognizes a new format called 'binary'
which compares binaries using the standard order of terms.
When converting a version 8 Dets file or repairing a version 9 Dets
file containing sufficiently large objects, the resulting file was
sometimes badly formed. This has been fixed.
A bug in disk_log:unblock/1 that could cause messages to be
processed in wrong order has been fixed. Write errors no longer
terminate the disk log process.
Dependency on GNU m4 is removed.
Fixnum problem as reported on erlang-questions is fixed.
Minor bug fixes by Richard Carlsson (hipe).
Traversing a read only Dets table no longer results in a crash.
The web server now know about MIME type "text/css" correcting a
problem with some browsers viewing the css file content instead of
the page including the CSS file.
Now run_erl and to_erl is compiled for for all Unix platforms but
not tested.
Odbc application bug fixes.
The function spawn_opt() now works for spawning a process on a
remote node.
The web server is rewritten and now supports HTTP/1.1.
A mnesia restart problem during checkpoint has been corrected.
Orber changes
One can now install Orber's NameService as disc_copies, but the
default behavior is that Orber uses ram_copies.
A pre-compiled is IIOP-trace interceptor is now included in the
Orber release. For more information, see the Debugging chapter in
the User's Guide.
It is now possible to set Orber's configuration parameters in, for
example, an Erlang shell. Consult corba:orb_init/1 and
orber:configure/2.
The Orber release now include 'OrberWeb', a WebTool extension.
We are improving the SGML to HTML conversion done generating most of
the documentation. It now conforms to the DTD "HTML 4.01
Transitional" This work is not completed and some formatting is
currently lost.
When an application that depended upon another that had been started
but crashed (supervisor killed), tried to start but failed (as
expected), the return value was {error, no_report}, which now has
been corrected to {error, {not_running, App}}.
The OTP Team
From cpressey Tue Dec 11 23:24:22 2001
From: cpressey (Chris Pressey)
Date: Tue, 11 Dec 2001 16:24:22 -0600
Subject: listen socket closed when started from init - why?
Message-ID: <20011211162422.25d13e00.cpressey@catseye.mb.ca>
Hi all,
I have discovered some 'funny' behaviour (in R8, and now in P9).
When I start the attached module from the Erlang shell, it runs fine.
# erl
Erlang (BEAM) emulator version 2001.12.10 [source] [hipe]
Eshell V2001.12.10 (abort with ^G)
1> test:start(2001).
<0.30.0>
When I start it from the command line with -run, it cannot acquire a
listen socket for some reason. It returns {error, closed} and seemingly
cannot be opened during startup.
# erl -run test start 2001
Erlang (BEAM) emulator version 2001.12.10 [source] [hipe]
Eshell V2001.12.10 (abort with ^G)
1> Listen socket closed
Is there some interaction between startup code run by init, and listen
sockets, that I'm not aware of?
Thanks in advance,
Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.erl
Type: application/octet-stream
Size: 789 bytes
Desc: not available
URL:
From tony Wed Dec 12 00:58:35 2001
From: tony (Tony Rogvall)
Date: Wed, 12 Dec 2001 00:58:35 +0100
Subject: erlgtk-0.9.5
Message-ID: <3C169DAB.E40C307A@bluetail.com>
The 0.9.4 was not much of success :-(
I hope 0.9.5 will be better. I had a small problem related to recursive
includes (had to use -pa and include_lib :-( )
New stuff in 0.9.5
-gnome_canvas (small example in the examples/gnome_draw.erl)
-glu pick buffer support added to gtk_gl_area.
-def2mod now handles array indices, i.e. prototypes on form f(double
m[16])
/Tony
From carlos Wed Dec 12 18:02:11 2001
From: carlos (Carlos)
Date: Wed, 12 Dec 2001 18:02:11 +0100 (CET)
Subject: Inet bugs
Message-ID:
I found two small errors in the Erlang/OTP R8B.
1) With the current inet module there are not support to multicast (UDP)
sockets because the UDP socket options "add_membership" and
"drop_membership"
are not included in the implementation of the inet module.
Solution: Instead of the function inet:udp_options/0 which current
implementation is:
udp_options() ->
[reuseaddr, sndbuf, recbuf, header, active, buffer, mode, deliver,
broadcast, dontroute, multicast_if, multicast_ttl, multicast_loop].
use the following function
udp_options() ->
[reuseaddr, sndbuf, recbuf, header, active, buffer, mode, deliver,
broadcast, dontroute, multicast_if, multicast_ttl, multicast_loop,
add_membership,drop_membership].
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This options should be documented.
2) The gen_udp:open(Port, Opts) function can receive a port number (integer)
or a service name (atom). When the Port argument is an atom, the service name is
translated to an integer (port number) using the getserv/1 function, but the
result of this function is not used in the last call of the gen_udp:open/2 function.
The original code is the following:
open(Port, Opts) ->
Mod = mod(Opts),
{ok,UP} = Mod:getserv(Port),
Mod:open(Port, Opts).
and the right code is,
open(Port, Opts) ->
Mod = mod(Opts),
{ok,UP} = Mod:getserv(Port),
Mod:open(UP, Opts).
^^^^
-- Carlos
From joe.armstrong Fri Dec 14 11:54:22 2001
From: joe.armstrong (joe armstrong)
Date: Fri, 14 Dec 2001 11:54:22 +0100
Subject: PDF manipulation
Message-ID: <3C19DA5E.3050907@telia.com>
I've written a little program to manipulate PDF files - this allows you
to use them
as archives (like tar files) - that way you can distribute an
application as a single PDF
file - the documentation being visible at the top level.
The code (and documentation :-) is available at
http://www.sics.se/~joe/erlpdf.pdf
Mails asking me how to extract the code from the PDF file *without* the
extractor program
will not be answered - how to do this is your (easy) Christmas puzzle
Happy Christmas
/Joe
From Sean.Hinde Fri Dec 14 13:06:44 2001
From: Sean.Hinde (Sean Hinde)
Date: Fri, 14 Dec 2001 12:06:44 -0000
Subject: Embedding Erlang as an interpreter in programs in other languages
Message-ID: <402DD461F109D411977E0008C791C312039F66CD@IMP02MBX>
Hi,
I'm pondering on how it might be possible to embed erlang in say C or
Objective C programs (as opposed to the more normal case of the other way
round).
The Objective C program would provide the gui stuff, startup code and event
loop - the logic would be provided by the embedded Erlang interpreter. The
first application would probably be a nice shell application (like the win32
one) for Mac OS X.
I think this is kind of how the win32 version works anyway - at least it is
a dll.. Or maybe SAE will do something like this?
Thoughts?
Sean
NOTICE AND DISCLAIMER:
This email (including attachments) is confidential. If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents. We cannot accept liability for any breaches of
confidence arising through use of email. Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions. We will not accept responsibility for any commitments
made by our employees outside the scope of our business. We do not warrant
the accuracy or completeness of such information.
From martin Sat Dec 15 00:01:26 2001
From: martin (Martin J. Logan)
Date: Fri, 14 Dec 2001 17:01:26 -0600
Subject: Distributed Applications
Message-ID: <3C1A84C6.46571236@vailsys.com>
Hello All,
I am trying to start a distributed application as perscribed by
design principles. I read the applications docs under the kernel
heading. I have tried a few things and I keep failng it do_boot. I was
wondering if someone has a copy of the config files needed to get this
up and running?
Thanks,
Martin
From Bruce Sun Dec 16 02:05:09 2001
From: Bruce (Bruce Fitzsimons)
Date: Sun, 16 Dec 2001 14:05:09 +1300
Subject: buffered_serial and sms stuff in Erlang
Message-ID: <015c01c185cd$b5654f70$4021970a@neolineas.com>
Hi Guys,
I have just got sms sending/reception going to my mobile phone (via a
cable).
I've cobbed together a server to fit overtop the serial contribution - it
divides things into lines, and allows regexp matches on the lines. It also
ages lines in the buffer, and allows destructive matching (e.g. lines that
don't match are thrown away permanently). I'm not thrilled about using \r
and \n to chop things up, but I couldn't think of any other way to chunk
things up and allow practical use of the serial port when dealing with
unsolicited events.
I've also got sms PDU mode decoding and encoding. Its fairly basic and only
does 7bit char set, but thats arguably the most difficult. Possibly they
only work with Ericsson T28 like phones (eg my R310s) , as I haven't got any
other phones to test it with and I've gathered that there are some subtly
different interpretations of the standard.
If there is any interest I will clean them up a bit and post/submit them.
Merry Christmas to those that celebrate it :-)
Cheers,
Bruce
From hal Mon Dec 17 10:08:14 2001
From: hal (Hal Snyder)
Date: 17 Dec 2001 03:08:14 -0600
Subject: supervisor, invalid_mfa
Message-ID: <877krmz01t.fsf@cb293842-b.rmdws1.il.home.com>
Is the following an inconsistency?
The docs say Args below can be any Erlang term, but source code
suggests bad mojo unless Args is a list.
13> supervisor:start_link(my_sup, foo).
** exited: {start_spec,{invalid_mfa,{my_udps,start_link,foo}}} **
-- STDLIB Reference Manual / supervisor --
EXPORTS
start_link(Module, Args) -> Result
start_link(SupName, Module, Args) -> Result
Types:
SupName = {local,Name} | {global,Name}
Name = atom()
Module = atom()
==> Args = term()
Result = {ok,Pid} | ignore | {error,Error}
Pid = pid()
Error = {already_started,Pid}} | shutdown | term()
-- $(ERL_TOP)/lib/stdlib/src/supervisor.erl --
validFunc({M, F, A}) when atom(M), atom(F), list(A) -> true;
validFunc(Func) -> throw({invalid_mfa, Func}).
--
Nit: look for "d-tag" in
http://www.erlang.org/doc/r8b/lib/kernel-2.7/doc/html/index.html
From gunilla Mon Dec 17 10:20:42 2001
From: gunilla (Gunilla (Hugosson) Arendt)
Date: Mon, 17 Dec 2001 10:20:42 +0100
Subject: supervisor, invalid_mfa
References: <877krmz01t.fsf@cb293842-b.rmdws1.il.home.com>
Message-ID: <3C1DB8EA.48E3BF50@erix.ericsson.se>
Hi,
'Args' is passed as-is to the callback function init/1 of
the supervisor itself. I.e. in this case my_sup:init(foo) is called
but returns something which is not a correct child specification.
/ Gunilla
Hal Snyder wrote:
>
> Is the following an inconsistency?
>
> The docs say Args below can be any Erlang term, but source code
> suggests bad mojo unless Args is a list.
>
> 13> supervisor:start_link(my_sup, foo).
> ** exited: {start_spec,{invalid_mfa,{my_udps,start_link,foo}}} **
>
> -- STDLIB Reference Manual / supervisor --
>
> EXPORTS
>
> start_link(Module, Args) -> Result
> start_link(SupName, Module, Args) -> Result
>
> Types:
> SupName = {local,Name} | {global,Name}
> Name = atom()
> Module = atom()
> ==> Args = term()
> Result = {ok,Pid} | ignore | {error,Error}
> Pid = pid()
> Error = {already_started,Pid}} | shutdown | term()
>
> -- $(ERL_TOP)/lib/stdlib/src/supervisor.erl --
> validFunc({M, F, A}) when atom(M), atom(F), list(A) -> true;
> validFunc(Func) -> throw({invalid_mfa, Func}).
>
> --
>
> Nit: look for "d-tag" in
> http://www.erlang.org/doc/r8b/lib/kernel-2.7/doc/html/index.html
--
_____Gunilla Arendt______________________________________________
Project Manager, Erlang/OTP
Ericsson Utvecklings AB, UAB/S/P OTP Product Development
gunilla +46-8-7275730
From etxuwig Mon Dec 17 11:00:58 2001
From: etxuwig (Ulf Wiger)
Date: Mon, 17 Dec 2001 11:00:58 +0100 (MET)
Subject: supervisor, invalid_mfa
In-Reply-To: <877krmz01t.fsf@cb293842-b.rmdws1.il.home.com>
Message-ID:
On 17 Dec 2001, Hal Snyder wrote:
>Is the following an inconsistency?
>
>The docs say Args below can be any Erlang term, but source code
>suggests bad mojo unless Args is a list.
>
>13> supervisor:start_link(my_sup, foo).
>** exited: {start_spec,{invalid_mfa,{my_udps,start_link,foo}}} **
The supervisor behaviour complains about the {my_udps,
start_link, foo}, which must be given as a start specification
for a child inside my_sup:init(foo).
The child specification should include a {M,F,A} tuple that will
be used to start the process (using proc_lib:start_link(M,F,A).
A must thus be a list.
/Uffe
>-- STDLIB Reference Manual / supervisor --
>
> EXPORTS
>
> start_link(Module, Args) -> Result
> start_link(SupName, Module, Args) -> Result
>
> Types:
> SupName = {local,Name} | {global,Name}
> Name = atom()
> Module = atom()
>==> Args = term()
> Result = {ok,Pid} | ignore | {error,Error}
> Pid = pid()
> Error = {already_started,Pid}} | shutdown | term()
>
>
>-- $(ERL_TOP)/lib/stdlib/src/supervisor.erl --
> validFunc({M, F, A}) when atom(M), atom(F), list(A) -> true;
> validFunc(Func) -> throw({invalid_mfa, Func}).
>
>
>--
>
>Nit: look for "d-tag" in
> http://www.erlang.org/doc/r8b/lib/kernel-2.7/doc/html/index.html
>
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
From thomas.lindgren Mon Dec 17 14:40:24 2001
From: thomas.lindgren (Thomas Lindgren)
Date: Mon, 17 Dec 2001 14:40:24 +0100
Subject: probable bug in gen.erl
Message-ID:
Hi everybody,
While poking around in gen.erl, I found something that
looks like a bug: returning a self() in one case arm, while
the others return node()'s. I have attached (ack! spit!)
a brief look at where this occurs: two places, probably
a cut-and-paste error.
(Found in R8B0 and R7B1.)
The fix is to replace self() with node() :-)
Best,
Thomas
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gen-bug.txt
URL:
From Martin.Fraenzle Mon Dec 17 15:10:57 2001
From: Martin.Fraenzle (Martin Fraenzle)
Date: Mon, 17 Dec 2001 15:10:57 +0100 (MET)
Subject: FTRTFT 2002: Call for Papers
Message-ID:
+------------------------------------------------------------------+
| Sorry for any inconvenience caused by receiving multiple copies. |
| If this mail was sent directly to you (not via another mailing |
| list you have subscribed to) and you would like to be removed |
| from the FTRTFT mailing list, please drop an email notice to |
| Martin.Fraenzle |
+------------------------------------------------------------------+
------------------------------------------------------------------
Dear Colleague,
With this E-mail we would like to draw your attention to the conference
FTRTFT 2002 co-sponsored by IFIP WG 2.2
to be organized in Oldenburg in September 2002. Please consider to submit a
paper and show this Call for Papers to those who are interested in the topics
of the conference.
With kind regards,
Werner Damm and Ernst-Ruediger Olderog
(conference co-chairs)
------------------------------------------------------------------
Call for Papers
FTRTFT 2002
7th International Symposium on
Formal Techniques in Real-Time and Fault Tolerant Systems
co-sponsored by IFIP Working Group 2.2 on
Formal Description of Programming Concepts
9 -- 12 September 2002
University of Oldenburg
Germany
http://www.informatik.uni-oldenburg.de/ftrtft02
ftrtft02
##############################################################################
New in 2002 --- special focus on UML
--- additional topic: secure global and mobile computing
##############################################################################
Theme
The symposium will present advances in the development and use of formal
techniques in the design of real-time, hybrid, fault-tolerant embedded
systems, covering all stages from requirements analysis to hardware and/or
software implementation. With the increasing use of such formal techniques
in industrial settings, the conference aims at stimulating
cross-fertilization between challenges in industrial usages of
formal methods and advanced research. Topics within this theme include
- requirements' capture - timing estimation
- safety analysis - partitioning
- formal models - schedulability analysis
- specification - hardware/software codesign
- verification - fault tolerance
- testing - real-time communications services
New
The Symposium will in particular focus on UML based development of real-time
systems, and will through invited presentations strengthen links between the
dependable systems and formal methods research communities.
Also, this time the Symposium is co-sponsored by Working Group 2.2 on
"Formal Description of Programming Concepts" of IFIP,
the International Federation of Information Processing, which
adds to the above theme the following topics:
- component-based design
- formal models of object-oriented design
- secure global and mobile computing
Series
This Symposium is the seventh of a series of symposia devoted to
problems and solutions in safe system design. The previous symposia
took place in Warwick 1990, Nijmegen 1992, L"ubeck 1994,
Uppsala 1996, Lyngby 1998, and Pune 2000. Proceedings of these
symposia were published as volumes 331, 571, 863, 1135, 1486 and 1926
in the LNCS series by Springer-Verlag.
Format
The Symposium is a four days event starting with
tutorials, followed by the regular conference with invited talks and
presentations selected from the submissions by the program committee.
The Symposium is followed by one day satellite events.
Submissions
Paper submissions with original contributions to the above topics are
invited. The papers should not exceed 18 pages in the Springer-Verlag
LNCS format, see
http://www.springer.de/comp/lncs/authors.html,
and be accompanied by the complete address (electronic, postal and fax)
of the corresponding author, a short abstract, and a list of key words.
Before submitting a paper please check at
http://www.informatik.uni-oldenburg.de/ftrtft02
for the up-to-date information of the submission procedure. Accepted
papers will be published as a volume of Lecture Notes in Computer
Science (LNCS) by Springer-Verlag:
http://www.springer.de/comp/lncs/index.html
Important dates
Submission deadline March 1, 2002
Notification of acceptance May 1, 2002
Final Version of Papers June 1, 2002
Symposium September, 9--12, 2002
Invited speakers
Bruce Powell Douglass, I-Logix
Dexter Kozen, Cornell University
Nancy Leveson, MIT
Amir Pnueli, Weizmann Institute
John Rushby, SRI International
... more speaker to be announced
Tutorials
John Mc Dermid, York: Safety Analysis
Kim G. Larsen, Aalborg: Advances in Real-Time Model-Checking
Program Committee
Rajeev Alur, Pennsylvania
Frank de Boer, CWI Amsterdem
Manfred Broy, TU Muenchen
Alan Burns, University of York
Werner Damm, Oldenburg (co-chair)
John Mc Dermid, University of York
Tom Henzinger, Berkeley
Bengt Jonsson, Uppsala
Mathai Joseph, Pune
Kim G. Larsen, Aalborg
R. de Lemos, Kent,
Oded Maler, Verimag,
Ernst-Ruediger Olderog, Oldenburg (co-chair)
Amir Pnueli, Weizmann Institut
Anders Ravn, Aalborg
W.P. de Roever, Kiel
John Rushby, SRI,
Davide Sangiorgi, INRIA
Joseph Sifakis, Verimag
Bernhard Steffen, Dortmund
From Martin.Fraenzle Mon Dec 17 15:03:14 2001
From: Martin.Fraenzle (Martin Fraenzle)
Date: Mon, 17 Dec 2001 15:03:14 +0100 (MET)
Subject: FTRTFT 2002: Call for Satellite Events
Message-ID:
+------------------------------------------------------------------+
| Sorry for any inconvenience caused by receiving multiple copies. |
| If this mail was sent directly to you (not via another mailing |
| list you have subscribed to) and you would like to be removed |
| from the FTRTFT mailing list, please drop an email notice to |
| Martin.Fraenzle |
+------------------------------------------------------------------+
-------------------------------------------------------------------
FTRTFT 2002: CALL FOR SATELLITE EVENTS
-------------------------------------------------------------------
The International Symposium on Formal Techniques in Real-Time and Fault
Tolerant Systems (FTRTFT) is devoted to problems and solutions in save
system design. The seventh meeting, FTRTFT 2002, will take place in
Oldenburg, Germany, from 9 to 13 September 2002, hosted by the University
of Oldenburg and co-sponsored by IFIP Working Group 2.2 on ``Formal
Description of Programming Concepts''. Previous symposia took place in
Warwick 1990, Nijmegen 1992, Luebeck 1994, Uppsala 1996, Lyngby 1998, and
Pune 2000.
The Symposium will present advances in the development and use of formal
techniques in the design of real-time, hybrid, fault-tolerant, embedded
systems, covering all stages from requirements analysis to hardware and/or
software implementation. With the increasing use of such formal techniques
in industrial settings, the Symposium aims at stimulating cross-fertilization
between challenges in industrial usages of formal methods and advanced
research. A particular focus of FTRTFT 2002 will be on UML based development
of real-time systems, and on secure global and mobile computing.
The main symposium will be held from Sept, 9th to Sept, 12th, preceeded
by a half day of tutorials. Workshops affiliated to FTRTFT 2002 are scheduled
for Sept, 13th 2002. Researchers and practitioners wishing to organize such a
workshop are invited to submit workshop proposals to the FTRTFT 2002 Workshop
Organizer:
Heike Wehrheim (wehrheim)
Workshop proposals are due 1 February 2002 and should be submitted by electronic mail
in ASCII or Postscript format. A proposal should not exceed two pages and should
describe the topic of the workshop, the names and contact information of the
organizers, the estimated dates for paper submissions, notification of
acceptance, and final versions, the expected number of participants and
duration (half day/full day) and any other relevant information.
The proposals will be evaluated by the FTRTFT program committee chairs on the
basis of their assessed benefit for prospective participants to FTRTFT 2002.
Acceptance decisions will be made by Feb, 10th.
The titles and brief information related to accepted workshop proposals will
be included in the conference program and advertised in the call for
participation. Workshop organizers will be responsible for producing a Call
for Papers, Web site, proceedings (if any), reviewing and making acceptance
decisions on submitted papers, and scheduling workshop activities in consultation
with the local organizers.
Any further information needed for preparing a workshop proposal can
be obtained from the FTRTFT 2002 Workshop Organizer:
Heike Wehrheim (wehrheim)
Important dates :
1 February 2002: Workshop proposals
15 February 2002: Notification of acceptance
FTRTFT Web site: http://www.informatik.uni-oldenburg.de/ftrtft02
From etxuwig Mon Dec 17 18:26:27 2001
From: etxuwig (Ulf Wiger)
Date: Mon, 17 Dec 2001 18:26:27 +0100 (MET)
Subject: erlang:is_pure(M,F,Arity)
Message-ID:
Just a thought...
I was thinking about hacking the shell implementation so that one
could connect to an erlang node via telnet. Part of the fun would
be to filter the function calls so that only a restricted set of
functions could be called.
However, there are lots of functions (like lists:reverse/1, to
name one) that are useful, but totally harmless (... well, in
some sense, anyway).
It struck me that most pure functions could probably be allowed -
and it also struck me that the compiler could probably figure out
if a function's purity can be guaranteed (= it does not call
functions in other modules, or use any built-in functions that
have side-effects).
If that would happen to include a few functions that one would
not make accessible in a restricted shell (perhaps
process_info/[1,2] is one example), then it would at least reduce
the amount of functions that would have to be explicitly
disallowed.
What say ye?
/Uffe
--
Ulf Wiger, Senior Specialist,
/ / / Architecture & Design of Carrier-Class Software
/ / / Strategic Product & System Management
/ / / Ericsson Telecom AB, ATM Multiservice Networks
From richardc Mon Dec 17 18:38:56 2001
From: richardc (Richard Carlsson)
Date: Mon, 17 Dec 2001 18:38:56 +0100 (MET)
Subject: erlang:is_pure(M,F,Arity)
In-Reply-To:
Message-ID:
On Mon, 17 Dec 2001, Ulf Wiger wrote:
> It struck me that most pure functions could probably be allowed -
> and it also struck me that the compiler could probably figure out
> if a function's purity can be guaranteed (= it does not call
> functions in other modules, or use any built-in functions that
> have side-effects).
It could, and it would not be very difficult. The corresponding
information about BIFs can be found in the (undocumented) file
lib/compiler/src/erl_bifs.erl.
/Richard
Richard Carlsson (richardc) (This space intentionally left blank.)
E-mail: Richard.Carlsson WWW: http://www.csd.uu.se/~richardc/
From gupta Tue Dec 18 00:28:05 2001
From: gupta (Dr. Gopal Gupta)
Date: Mon, 17 Dec 2001 17:28:05 -0600
Subject: 4th Int'l Symp.: Practical Aspects of Declarative Languages
Message-ID: <200112172328.fBHNS5u02536@herbrand.utdallas.edu>
[ o Apologies for multiple messages.
o Please register and make hotel reservations as soon as possible since
both deadlines are approaching fast (Dec. 27th)
].
You are cordially invited to the Fourth International Symposium on
Practical Aspects of Declarative Languages that will be held on Jan 19-20,
2002 right after ACM POPL. The program includes invited talks by three
distinguished speakers: J. Strother Moore of the University of Texas at
Austin, Catherine Meadows of the Naval Research Labs, and Veronica Dahl of
Simon Fraser University. Very low registration rates ($150 regular and
$100 student) and low conference hotel rates have been secured to make the
event affordable. The program ends by late afternoon on Sunday to let
attendees return home on Sunday itself. If you are attending ACM POPL, we
especially encourage you to plan to attend PADL.
More details can be found at:
http://www.cs.sunysb.edu/~padl2002
---------------------------------------------------------------------
Fourth International Symposium on
Practical Aspects of Declarative Languages
(PADL '02)
Portland, Oregon, USA Jan 19-20, 2002
Co-located with POPL 2002
---------------------------------------------------------------------
Conference Program
==================
Jan 19th
8:45-9:00 Opening Remarks
9:00-10:00 Invited Talk #1
Using a Declarative Language to Build an Experimental Analysis Tool
Catherine Meadows (Naval Research Laboratory),
10:00-10:30 Coffee Break
10:30-12:30 Session-I:
Modeling Engineering Structures using Constrained Objects
Bharat Jayaraman and Pallavi Tambay
Compiler Construction in Higher Order Logic Programming
Chuck Liang
Declarative Programming with Application to Clinical Medicine:
On the Use of Gisela in the MedView Project.
Olof Torgersson
Semantics-based Filtering: Logic Programming's Killer App?
Gopal Gupta, Hai-Feng Guo, Arthur Karshmer,
Enrico Pontelli, Desh Ranjan, B. Milligan,
N. Datta, O. El Khatib, M. Noamany, and X. Zhou
12:30-1:30 Lunch
1:30-2:30 Invited Talk #2
How to Talk to Your Computer So That it Will Listen
Veronica Dahl (Simon Fraser University),
2:45-4:15 Session-II:
Linear Scan Register Allocation in a High-Performance Erlang Compiler
Erik Johansson and Konstantinos Sagonas
Typed Combinators for Generic Traversal
Ralf Laemmel and Joost Visser
Event-Driven FRP.
Zhanyong Wan, Walid Taha, and Paul Hudak
4:15-4:30 Coffee Break
4:30-6:00 Session-III:
Compiling Embedded Programs to Byte Code.
Morten Rhiger,
Exploiting Efficient Control and Data Structures in Logic Programs.
Rong Yang and Steve Gregory,
Memory Management and Scheduling in a Tabling Engine
Luis F. Castro and Terrance Swift and David S. Warren
--------------------------------------------------------------------------------
Jan 20th
9:00-10:00 Invited Talk #3:
Single-Threaded Objects in ACL2.
J. Strother Moore (University of Texas, Austin)
10:00-10:30 Coffee Break
10:30-12:30 Session-IV:
Adding Apples and Oranges
Martin Erwig and Margaret Burnett
WASH/CGI: Server-side Web Scripting with Sessions and Typed,
Compositional Forms.
Peter Thiemann
A better XML parser through functional programming.
Oleg Kiselyov
Functional Approach to Texture Generation.
Jerzy Karczmarczuk
12:30-1:30 Lunch
1:30-3:30 Session-V:
Abstract Interpretation over Non-Deterministic Finite
Tree Automata for Set-Based Analysis of Logic Programs.
John Gallagher, German Puebla,
A High-Level Generic Interface to External Programming Languages for ECLiPSe.
Kish Shen, Joachim Schimpf, Stefano Novello, Josh Singer,
Segment Order Preserving and Generational Garbage Collection for Prolog.
Ruben Vandeginste, Konstantinos Sagonas, and Bart Demoen,
A Debugging Scheme for Declarative Equation Based Modeling Languages.
Peter Bunus, Peter Fritzson
From rgcoy Sun Dec 23 10:04:09 2001
From: rgcoy (Danni Coy)
Date: Sun, 23 Dec 2001 20:04:09 +1100
Subject: erlang R8B on Mandrake 8
Message-ID: <5.1.0.14.0.20011223200244.00ab4438@mail.midcoast.com.au>
Ok I want to try wings on my mandrake box. I have downloaded everything
nessecarry. however I am stuck compiling erlang. I am having lots link
errors with ttsl_drv.c file
which makes me think that I don't have a library I should. or I have the
wrong version of something. Has anybody else had this experience... any
help would be appreciated.
From pew Tue Dec 18 07:54:20 2001
From: pew (Patrik Winroth)
Date: Tue, 18 Dec 2001 07:54:20 +0100 (CET)
Subject: erlang:is_pure(M,F,Arity)
Message-ID: <6549627.1008658460117.JavaMail.root@suntea.tninet.se>
Den 17 Dec 2001 skrev Richard Carlsson:
>
> On Mon, 17 Dec 2001, Ulf Wiger wrote:
>
> > It struck me that most pure functions could probably be allowed -
> > and it also struck me that the compiler could probably figure out
> > if a function's purity can be guaranteed (= it does not call
> > functions in other modules, or use any built-in functions that
> > have side-effects).
>
> It could, and it would not be very difficult. The corresponding
> information about BIFs can be found in the (undocumented) file
> lib/compiler/src/erl_bifs.erl.
I guess this is an interesting property if one would like to have a very "sandboxable" language, e.g. for execution in browsers, embedded in html or for web services.
.NET?? .GNU??? no! .erl !!! :-)
/Patrik.
From eleberg Tue Dec 18 10:03:27 2001
From: eleberg (Bengt Kleberg)
Date: Tue, 18 Dec 2001 10:03:27 +0100 (MET)
Subject: erlang:is_pure(M,F,Arity)
Message-ID: <200112180903.KAA08529@etxb.ericsson.se>
> X-Authentication-Warning: avc303.etxb.ericsson.se: etxuwig owned process doing
-bs
> Date: Mon, 17 Dec 2001 18:26:27 +0100 (MET)
> From: Ulf Wiger
> I was thinking about hacking the shell implementation so that one
> could connect to an erlang node via telnet.
More often than not telnet sends things in the clear over the network. Please
consider useing ssh instead.
bengt
From bjorn Tue Dec 18 12:30:45 2001
From: bjorn (Bjorn Gustavsson)
Date: 18 Dec 2001 12:30:45 +0100
Subject: erlang R8B on Mandrake 8
In-Reply-To: Danni Coy's message of "Sun, 23 Dec 2001 20:04:09 +1100"
References: <5.1.0.14.0.20011223200244.00ab4438@mail.midcoast.com.au>
Message-ID:
In general, you have a greater chance to get an answer if you would
include the error messages in your mail.
I don't know anything about Mandrake 8, but I know a few things about
ttsl_drv.c that might help. It calls the following functions:
int tgetent();
int tgetnum();
int tgetflag();
char *tgetstr();
char *tgoto();
int tputs();
These functions are often found in the libterm library. Sometimes they
are in the libcurses library. The `configure' script is supposed to
figure out the correct libraries to use automatically. In this case
it obviously didn't do that.
If you find out which library to use, please report back so that we
could correct configure.
/Bjorn
Danni Coy writes:
> Ok I want to try wings on my mandrake box. I have downloaded everything
> nessecarry. however I am stuck compiling erlang. I am having lots link
> errors with ttsl_drv.c file
> which makes me think that I don't have a library I should. or I have the
> wrong version of something. Has anybody else had this experience... any
> help would be appreciated.
>
--
Bj?rn Gustavsson Ericsson Utvecklings AB
bjorn ?T2/UAB/F/P
BOX 1505
+46 8 727 56 87 125 25 ?lvsj?
From centurion Tue Dec 18 15:48:38 2001
From: centurion (J.A.)
Date: Tue, 18 Dec 2001 15:48:38 +0100
Subject: erlang R8B on Mandrake 8
References: <5.1.0.14.0.20011223200244.00ab4438@mail.midcoast.com.au>
Message-ID: <3C1F5746.2000403@phreaker.net>
Danni Coy wrote:
> Ok I want to try wings on my mandrake box. I have downloaded
> everything nessecarry. however I am stuck compiling erlang. I am
> having lots link errors with ttsl_drv.c file
> which makes me think that I don't have a library I should. or I have
> the wrong version of something. Has anybody else had this
> experience... any help would be appreciated.
>
I had the same problem in redhat. I applied a SSL patch (seek in the
mail list) and then it compiled well.
J.A.
From kent Tue Dec 18 16:32:57 2001
From: kent (Kent Boortz)
Date: 18 Dec 2001 16:32:57 +0100
Subject: erlang R8B on Mandrake 8
In-Reply-To: Danni Coy's message of "Sun, 23 Dec 2001 20:04:09 +1100"
References: <5.1.0.14.0.20011223200244.00ab4438@mail.midcoast.com.au>
Message-ID:
Danni Coy writes:
> Ok I want to try wings on my mandrake box. I have downloaded everything
> nessecarry. however I am stuck compiling erlang. I am having lots link
> errors with ttsl_drv.c file
> which makes me think that I don't have a library I should. or I have the
> wrong version of something. Has anybody else had this experience... any
> help would be appreciated.
This is probably caused by a bug in the configure script where
missing a library isn't detected. The script searches for
termlib
curses
ncurses
termcap
in that order but doesn't fail if none is found. I also see some bad
coding in "ttsl_drv.c" where instead of including the correct header
file the functions are declared in the source file.
In general when a library is needed to build Erlang/OTP you need
to install the development version of that library or in some cases
both the runtime and development versions. On our RedHat 7.1
machine Erlang/OTP "ttsl_drv.c" needs the RPM's "ncurses-5.2-8" and
"ncurses-devel-5.2-8", on debian the package "libncurses5-dev".
Yes, the configure script needs improvements....
kent
From eleberg Tue Dec 18 17:30:02 2001
From: eleberg (Bengt Kleberg)
Date: Tue, 18 Dec 2001 17:30:02 +0100 (MET)
Subject: erlang R8B on Mandrake 8
Message-ID: <200112181630.RAA00452@etxb.ericsson.se>
> From: Kent Boortz
> Yes, the configure script needs improvements....
The gnu auto-tools (normally responsible for configure scripts. Notable
exception is bigloos configure) are very much in need of
improvment/replacement.
qmail does it right, IMHO.
The whole issue is a mess, so it is not really nice of me
to complain about the auto-tools.
bengt
From vances Wed Dec 19 17:08:00 2001
From: vances (Vance Shipley)
Date: Wed, 19 Dec 2001 11:08:00 -0500
Subject: ei_connect_xinit
Message-ID:
A bit more than a nit:
The header file "ei_connect.h" does not include a function
prototype for ei_connect_xinit.
I checked the latest P9 snapshot and it's still like that.
It would be easy enough to deal with but I would like to
have what I'm working on link against the installed libraries.
-Vance
From foc Thu Dec 20 20:31:04 2001
From: foc (Foundations of Computing)
Date: Thu, 20 Dec 2001 14:31:04 -0500 (EST)
Subject: logic faculty position
Message-ID: <200112201931.fBKJV2t04745@moose.cs.indiana.edu>
[Sincere apologies for duplicates]
Indiana University invites applications for a tenure-track
assistant professor position in applied logic.
Please see www.informatics.indiana.edu/positions/logic.html
for details. Applications received within the next few
weeks are likely to still get full consideration.
Applicants are welcome to email to foc
to notify of their mailed application, and to provide
pointers to any pertinent on-line documentation.
From sk Fri Dec 21 07:36:16 2001
From: sk (Shriram Krishnamurthi)
Date: Fri, 21 Dec 2001 01:36:16 -0500 (EST)
Subject: ICFP (Functional Programming) 2002: Call for Papers
Message-ID: <200112210636.BAA10106@bosch.cs.brown.edu>
---------------------------------------------
* Calling all functional programmers! *
* ICFP'02 needs you! *
---------------------------------------------
ICFP 2002: International Conference on Functional Programming
Pittsburgh, 3--5 October 2002
CALL FOR PAPERS
http://icfp2002.cs.brown.edu/
Paper submission deadline: 21 March 2002
General Chair: Mitchell Wand, Northeastern University
Program Chair: Simon Peyton Jones, Microsoft Research
ICFP 2002 seeks original papers on the full spectrum of the art,
science, and practice of functional programming. The conference
invites submissions on all topics ranging from principles to practice,
from foundations to features, and from abstraction to application. The
scope covers all languages that encourage programming with functions,
including both purely applicative and imperative languages, as well as
languages that support objects and concurrency.
You can find the full call for papers at
http://icfp2002.cs.brown.edu/
Program Committee
Matthias Blume (Lucent)
Margaret Burnett (Oregon State University)
Manuel Chakravarty (University of New South Wales)
Matthew Flatt (University of Utah)
Haruo Hosoya (Kyoto University)
Uwe Nestmann (EPFL, Lausanne)
Chris Okasaki (United States Military Academy)
Norman Ramsey (Harvard University)
David Sands (Chalmers University)
Olin Shivers (Georgia Tech)
Stephanie Weirich (Cornell)
Joe Wells (Heriot Watt University)
From erik Tue Dec 25 03:18:56 2001
From: erik (Erik Pearson)
Date: Mon, 24 Dec 2001 18:18:56 -0800
Subject: Moving mnesia schema to another node
Message-ID: <32525160.1009217936@216-101-171-203.adaptations.com>
Hi,
I need to move a mnesia database from one node to another, and haven't been
able to figure out how. Mnesia is okay if you move it around on the same
machine (different directories), but doesn't like to be moved to another
machine -- (e.g. tar it up and untar it somehwere else) -- even if the
database directory is accessed via a generic directory name through an
explicit -mnesia dir 'dirname' or -config configfile.
I've also tried restoring from a backup, but stopped that after it ate up
all CPU on the server. I also tried using install_fallback, but mnesia
complains with
{"No disc resident schema on local node", [myoldnode]}
The backup seems to keep a reference to the old node, and doens't like to
be restored anywhere else...
Does anyone know how to do a "redirected backup and restore" from one node
to another?
Thanks,
Erik Pearson
From Chandrashekhar.Mullaparthi Tue Dec 25 10:17:38 2001
From: Chandrashekhar.Mullaparthi (Chandrashekhar Mullaparthi)
Date: Tue, 25 Dec 2001 09:17:38 -0000
Subject: Moving mnesia schema to another node
Message-ID: <402DD461F109D411977E0008C791C31205E0636F@IMP02MBX>
Look in the Mnesia user guide in Section 6.9.1
The following example illustrates how mnesia:traverse_backup can be used to
rename a db_node in a backup file:
change_node_name(Mod, From, To, Source, Target) ->
Switch =
fun(Node) when Node == From -> To;
(Node) when Node == To -> throw({error, already_exists});
(Node) -> Node
end,
Convert =
fun({schema, db_nodes, Nodes}, Acc) ->
{[{schema, db_nodes, lists:map(Switch,Nodes)}], Acc};
({schema, version, Version}, Acc) ->
{[{schema, version, Version}], Acc};
({schema, cookie, Cookie}, Acc) ->
{[{schema, cookie, Cookie}], Acc};
({schema, Tab, CreateList}, Acc) ->
Keys = [ram_copies, disc_copies, disc_only_copies],
OptSwitch =
fun({Key, Val}) ->
case lists:member(Key, Keys) of
true -> {Key, lists:map(Switch, Val)};
false-> {Key, Val}
end
end,
{[{schema, Tab, lists:map(OptSwitch, CreateList)}], Acc};
(Other, Acc) ->
{[Other], Acc}
end,
mnesia:traverse_backup(Source, Mod, Target, Mod, Convert, switched).
view(Source, Mod) ->
View = fun(Item, Acc) ->
io:format("~p.~n",[Item]),
{[Item], Acc + 1}
end,
mnesia:traverse_backup(Source, Mod, dummy, read_only, View, 0).
cheers,
Chandru
> -----Original Message-----
> From: Erik Pearson [mailto:erik]
> Sent: 25 December 2001 02:19
> To: erlang-questions
> Subject: Moving mnesia schema to another node
>
>
> Hi,
>
> I need to move a mnesia database from one node to another,
> and haven't been
> able to figure out how. Mnesia is okay if you move it around
> on the same
> machine (different directories), but doesn't like to be moved
> to another
> machine -- (e.g. tar it up and untar it somehwere else) --
> even if the
> database directory is accessed via a generic directory name
> through an
> explicit -mnesia dir 'dirname' or -config configfile.
>
> I've also tried restoring from a backup, but stopped that
> after it ate up
> all CPU on the server. I also tried using install_fallback,
> but mnesia
> complains with
>
> {"No disc resident schema on local node", [myoldnode]}
>
> The backup seems to keep a reference to the old node, and
> doens't like to
> be restored anywhere else...
>
> Does anyone know how to do a "redirected backup and restore"
> from one node
> to another?
>
> Thanks,
>
> Erik Pearson
>
NOTICE AND DISCLAIMER:
This email (including attachments) is confidential. If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents. We cannot accept liability for any breaches of
confidence arising through use of email. Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions. We will not accept responsibility for any commitments
made by our employees outside the scope of our business. We do not warrant
the accuracy or completeness of such information.
From guillaume.bongenaar Wed Dec 26 15:48:38 2001
From: guillaume.bongenaar (guillaume.bongenaar)
Date: Wed, 26 Dec 2001 15:48:38 +0100
Subject: http 1.1 : Digest Authentication
Message-ID: <3C29E346.4060300@cellicium.com>
Hello,
I'd like to know if there are Erlang modules/programs
available to be able to work with the HTTP 1.1 Digest Authentication?
Thankyou
Guillaume Bongenaar
From guillaume.bongenaar Wed Dec 26 16:15:38 2001
From: guillaume.bongenaar (guillaume.bongenaar)
Date: Wed, 26 Dec 2001 16:15:38 +0100
Subject: http 1.1 : Digest Authentication
Message-ID: <3C29E99A.3090000@cellicium.com>
Hello,
I'd like to know if there are Erlang modules/programs available to be
able to work with the HTTP 1.1 Digest Authentication?
Thankyou
Guillaume Bongenaar
-------------- next part --------------
An embedded message was scrubbed...
From: unknown sender
Subject: no subject
Date: no date
Size: 38
URL:
From guillaume.bongenaar Wed Dec 26 15:48:38 2001
From: guillaume.bongenaar (guillaume.bongenaar)
Date: Wed, 26 Dec 2001 15:48:38 +0100
Subject: http 1.1 : Digest Authentication
Message-ID: <3C29E346.4060300@cellicium.com>
Hello,
I'd like to know if there are Erlang modules/programs
available to be able to work with the HTTP 1.1 Digest Authentication?
Thankyou
Guillaume Bongenaar
--------------020803070109050400020208--
From asespec Sun Dec 30 18:22:18 2001
From: asespec (asespec)
Date: Sun, 30 Dec 2001 18:22:18 +0100 (CET)
Subject: Call for Papers: Annals of Software Engineering Special Volume
Message-ID: <200112301722.fBUHMIh17968@serg.ing.unisannio.it>
CALL FOR PAPERS
--------------------------------------------------------------
Our apologies if you received multiple copy of this.
--------------------------------------------------------------
Annals of Software Engineering:
Special Volume on "Computational Intelligence In Software Engineering"
http://manta.cs.vt.edu/ase
The Annals of Software Engineering journal seeks articles for a special
volume on "Computational Intelligence In Software Engineering".
The constantly evolving technological infrastructure of the modern world
presents a great challenge of developing software systems with increasing
size and complexity. Software engineers and researchers are striving to
meet these and other continuously growing challenges by developing and
implementing useful software engineering methodologies. However, despite
the introduction of some important and useful paradigms in the software
engineering discipline, their technological transfers on a larger scale has
been extremely gradual and limited.
The recent emergence of the field of Computational Intelligence (CI) in
Software Engineering provides a software development team with an
opportunity by taking advantage of the currently developed, documented, and
mature CI technologies such as fuzzy logic, artificial neural networks,
genetic and artificial intelligence based computational systems, expert
knowledge based systems, and case based reasoning. These and other
computational intelligence technologies have been used to resolve issues
arising from the ever-increasing complexity and size of software systems.
The aim and scope of this special issue is focused on the current research
trends of introducing and implementing CI techniques to address the various
software engineering needs arising during different phases of software
development and analysis. This special issue is intended to serve as a
comprehensive collection of some of the current state-of-the-art CI in
software engineering technologies.
Topics of Interest
Topics of particular interest on "Computational Intelligence In Software
Engineering" include but are not limited to:
* Neural Networks
* Fuzzy Logic
* Genetic Algorithms & Programming
* Case Based Reasoning
* Data Mining Techniques
* Adaptive Computing Systems
* Knowledge Based Systems
* Software Cost Estimation
* Software Reliability Modeling
* Formal Verification Methods
* Software Testing & Software Validation
* Expert Software Systems
* Software Requirements & Specifications Engineering
* Machine Learning Techniques
* Hybrid Intelligent Systems
Editor
Professor Taghi M. Khoshgoftaar
Department of Computer Science & Engineering
Florida Atlantic University
Boca Raton, Florida 33433, U.S.A.
Tel: +1-561-297-3994
Fax: +1-561-297-2800
Email: taghi
Annals of Software Engineering imposes virtually no length limitation on
the submitted papers. A paper's length is judged with respect to the
quality of its content. Submitted papers must not have been previously
published or be currently under consideration for publication elsewhere.
All papers will be rigorously refereed. The complete manuscript in PDF or
postscript format should be submitted to the editor on or before April 1,
2002.
Submission
Submission of a manuscript to the Annals of Software Engineering journal
is a representation that the manuscript:
(a) has not been previously published,
(b) is not currently under consideration for publication elsewhere, and
(c) will not be submitted elsewhere until a decision is made regarding
its suitability for publication in Annals of Software Engineering.
Submission is also the representation that the work has been approved for
open publication if performed under an official sponsorship requiring
such an approval.
From sdasilva Mon Dec 31 16:01:26 2001
From: sdasilva (Sergio Da Silva)
Date: Mon, 31 Dec 2001 16:01:26 +0100
Subject: Erlang and asn.1
Message-ID: <3C307DC6.4F307102@cmd.lu>
Hi,
I am just about to discover erlang and ASN.1. I have a special need and
am wondering if erlang is able to solve my problem: we receive BER
encoded (according to a well defined ASN.1 grammar) files (called
"enc_file") and I will need to decode them.
Where do I start? So far I have managed to compile the ASN.1 file and
have a module that provides encode and decode routines.
I have read the documentation but this did not bring me any further.
How do I decode file "enc_file", do I have to define my own decoding
logic or do there exist out-of-the box tools?
Any hints will be greatly appreciated.
I nearly forgot to wish you a Happy New Year!
Sergio da Silva