From patrickdlogan@REDACTED Tue Jun 1 23:07:51 1999 From: patrickdlogan@REDACTED (patrickdlogan@REDACTED) Date: Tue, 1 Jun 1999 14:07:51 -0700 (PDT) Subject: Erlang status questions In-Reply-To: References: Message-ID: <14164.19253.731090.849112@c837917-a.potlnd1.or.home.com> This is loosely related to Erlang status... what is Bluetail AB and how does it relate to Erlang? I have seen Bluetail in people's email addresses and see them contributing to the user's conference as an entity. -- Patrick D. Logan mailto:patrickdlogan@REDACTED From seb@REDACTED Wed Jun 2 10:44:06 1999 From: seb@REDACTED (Sebastian Strollo) Date: 02 Jun 1999 10:44:06 +0200 Subject: Erlang status questions In-Reply-To: 's message of "Tue, 1 Jun 1999 14:07:51 -0700 (PDT)" References: <14164.19253.731090.849112@c837917-a.potlnd1.or.home.com> Message-ID: writes: > > This is loosely related to Erlang status... Yes, actually it is quite related to Erlang status... > what is Bluetail AB and > how does it relate to Erlang? I have seen Bluetail in people's email > addresses and see them contributing to the user's conference as an > entity. That is probably best answered by one of the Blutails, but basically it is a startup company formed by many of the previous members of the CSLab and others at Ericsson. -- Sebastian From gandalf@REDACTED Wed Jun 2 21:09:15 1999 From: gandalf@REDACTED (Vladimir Ulogov) Date: Wed, 2 Jun 1999 15:09:15 -0400 (EDT) Subject: global_name_server question. Message-ID: Folks, I'd have another dumb question about "registered" process. Here is a erlang code: %%------------------------------------------------- start() -> Rec = spawn(dumb_eh, receiver, []), register(eh, Rec). %%-------------------------------------------------- receiver() -> receive Message -> io:format("Recv: ~w~n", Message), receiver() end. %%--------------------------------------------------- This dumb handler working just fine: (server@REDACTED)16> eh!{boo, baa, foo, bar,42}. {boo,baa,foo,bar,42} (server@REDACTED)17> ----------------------------------------------------- And regs(). returns exactly what I'm expected: global_name_server <0.11.0> {global,init,1} 52 0 eh <0.62.0> {dumb_eh,receiver,0} 106 0 ------------------------------------------------------ I did tried to send erl_reg_send, it seems like eh do not received any messages. I did create small tool: ************************************************************** #include "erl_interface.h" #include "ei.h" int main(int argc, char **argv) { int sockfd; char **names; int count; erl_init(NULL, 0); erl_connect_init(42, "thecookie", 0); sockfd = erl_connect("server@REDACTED"); names = erl_global_names(sockfd, &count); printf("%d,%d\n", sockfd, count); erl_close_connection(sockfd); } **************************************************************** And count returns 0. May be you'll tell to me, what I did wrong. ======================================================= Vladimir I. Ulogov (gandalf@REDACTED) tel: 973-236-6464 or 6463 fax: 973-236-2090 "Where lands meets water. Where earth meets air. Where body meets mind. Where space meets time. We like to be on one side, and look at the other." D.Adams "Mostly harmless" From luke@REDACTED Wed Jun 2 21:46:40 1999 From: luke@REDACTED (Luke Gorrie) Date: 03 Jun 1999 05:46:40 +1000 Subject: global_name_server question. In-Reply-To: Vladimir Ulogov's message of "Wed, 2 Jun 1999 15:09:15 -0400 (EDT)" References: Message-ID: Vladimir Ulogov writes: > Folks, > I'd have another dumb question about "registered" process. > Here is a erlang code: > %%------------------------------------------------- > start() -> > Rec = spawn(dumb_eh, receiver, []), > register(eh, Rec). > %%-------------------------------------------------- > receiver() -> > receive > Message -> > io:format("Recv: ~w~n", Message), ^^^ This looks suspicious -- I believe you want: io:format("Recv: ~w~n", [Message]), i.e., Message inside a list. Instead of raising an error on that sort of problem, format just returns {error,format}, so it's easy to miss. Cheers, Luke From gandalf@REDACTED Wed Jun 2 22:33:56 1999 From: gandalf@REDACTED (Vladimir Ulogov) Date: Wed, 2 Jun 1999 16:33:56 -0400 (EDT) Subject: global_name_server question. In-Reply-To: Message-ID: On 3 Jun 1999, Luke Gorrie wrote: > > io:format("Recv: ~w~n", Message), > ^^^ This looks suspicious -- I believe you want: > io:format("Recv: ~w~n", [Message]), Yes, Luke, was my mistake, of course [Message], but why erl_global_names returns 0 ? > Luke ======================================================= Vladimir I. Ulogov (gandalf@REDACTED) tel: 973-236-6464 or 6463 fax: 973-236-2090 "Where lands meets water. Where earth meets air. Where body meets mind. Where space meets time. We like to be on one side, and look at the other." D.Adams "Mostly harmless" From klacke@REDACTED Wed Jun 2 22:37:21 1999 From: klacke@REDACTED (Claes Wikstrom) Date: Wed, 2 Jun 1999 22:37:21 +0200 Subject: global_name_server question. In-Reply-To: (message from Vladimir Ulogov on Wed, 2 Jun 1999 15:09:15 -0400 (EDT)) References: Message-ID: <199906022037.WAA00407@kaja.bluetail.com> > > Folks, > I'd have another dumb question about "registered" process. > receiver() -> > receive > Message -> > io:format("Recv: ~w~n", Message), > receiver() > end. Should be io:format("Recv: ~w~n", [Message]), This is really irritating that io:format/2 doesn't fail when presented with unformatable data. It simply fails to write anything and returns an error code. A very good practice is to start to write ok = io:format(..... everywhere in the code, the match then works as an assertion and the process will crash when io:format/2 returns an error code. > (server@REDACTED)16> eh!{boo, baa, foo, bar,42}. > {boo,baa,foo,bar,42} Ahhh, but this is not the printout, this is the return value from the sendstatement that is printed in the shell, where is the "Recv .... " ?? /klacke From tobbe@REDACTED Thu Jun 3 08:47:14 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Thu, 03 Jun 1999 16:47:14 +1000 Subject: global_name_server question. In-Reply-To: References: Message-ID: <199906030647.QAA00787@campari.serc.rmit.edu.au> Did you use the same cookie on the erlang side ? Did you start erlang as a distributed node ? Example: erl -name hello -setcookie thecookie /Tobbe From klacke@REDACTED Wed Jun 2 22:45:16 1999 From: klacke@REDACTED (Claes Wikstrom) Date: Wed, 2 Jun 1999 22:45:16 +0200 Subject: Erlang status questions In-Reply-To: <14164.19253.731090.849112@c837917-a.potlnd1.or.home.com> (patrickdlogan@home.com) References: <14164.19253.731090.849112@c837917-a.potlnd1.or.home.com> Message-ID: <199906022045.WAA00412@kaja.bluetail.com> > This is loosely related to Erlang status... what is Bluetail AB and > how does it relate to Erlang? I have seen Bluetail in people's email > addresses and see them contributing to the user's conference as an > entity. > It's a small startup some of us has just recently formed. We are writing commercial proprietary software in Erlang. We'll all continue to contribute to the Erlang community with both code, libraries, and bits of advice. Since we're writing all our software in Erlang, there will probably be lots of our code that can be useful to the Erlang community. Cheers /klacke From tobbe@REDACTED Thu Jun 3 08:51:42 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Thu, 03 Jun 1999 16:51:42 +1000 Subject: global_name_server question. In-Reply-To: <199906030647.QAA00787@campari.serc.rmit.edu.au> References: <199906030647.QAA00787@campari.serc.rmit.edu.au> Message-ID: <199906030651.QAA00828@campari.serc.rmit.edu.au> > Example: erl -name hello -setcookie thecookie Sorry, should in your example be: erl -sname server -setcookie thecookie /Tobbe From gandalf@REDACTED Wed Jun 2 23:07:01 1999 From: gandalf@REDACTED (Vladimir Ulogov) Date: Wed, 2 Jun 1999 17:07:01 -0400 (EDT) Subject: global_name_server question. In-Reply-To: <199906030647.QAA00787@campari.serc.rmit.edu.au> Message-ID: On Thu, 3 Jun 1999, Torbjorn Tornkvist wrote: > Did you use the same cookie on the erlang side ? In get_names.c: erl_connect_init(42, "thecookie", 0); > Did you start erlang as a distributed node ? yes, sure: rohan:/local/andorra _ /local/erlang/bin/erl -name server -setcookie thecookie Erlang (JAM) emulator version 47.4.1 Eshell V47.4.1 (abort with ^G) (server@REDACTED)1> ----------------------- sockfd = erl_connect("server@REDACTED"); names = erl_global_names(sockfd, &count); printf("%d,%d\n", sockfd, count); ----------------------- Output: 3,0 ======================================================= Vladimir I. Ulogov (gandalf@REDACTED) tel: 973-236-6464 or 6463 fax: 973-236-2090 "Where lands meets water. Where earth meets air. Where body meets mind. Where space meets time. We like to be on one side, and look at the other." D.Adams "Mostly harmless" From tobbe@REDACTED Thu Jun 3 09:17:41 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Thu, 03 Jun 1999 17:17:41 +1000 Subject: global_name_server question. In-Reply-To: References: Message-ID: <199906030717.RAA01026@campari.serc.rmit.edu.au> > sockfd = erl_connect("server@REDACTED"); > names = erl_global_names(sockfd, &count); > printf("%d,%d\n", sockfd, count); > ----------------------- > Output: > 3,0 Looks ok to me. '3' is the socket-descriptor and '0' is the number of globally registered processes. NB: Initially, when you start your Erlang node you don't have any globally registered processes. Example: unix> erl -sname hello Erlang (BEAM) emulator version 47.4.1 Eshell V47.4.1 (abort with ^G) (hello@REDACTED)1> length(global:registered_names()). 0 (hello@REDACTED)2> /Tobbe From gandalf@REDACTED Wed Jun 2 23:31:20 1999 From: gandalf@REDACTED (Vladimir Ulogov) Date: Wed, 2 Jun 1999 17:31:20 -0400 (EDT) Subject: global_name_server question. In-Reply-To: <199906030717.RAA01026@campari.serc.rmit.edu.au> Message-ID: On Thu, 3 Jun 1999, Torbjorn Tornkvist wrote: > Looks ok to me. '3' is the socket-descriptor and '0' Well, I'm have "registered" process on erlang node. ------------------------------------- Rec = spawn(dumb_eh, receiver, []), register(eh, Rec). ------------------------------------- How I can makes this process avialable for the C application which use erl_interface acessible by name (erl_reg_send) ? ======================================================= Vladimir I. Ulogov (gandalf@REDACTED) tel: 973-236-6464 or 6463 fax: 973-236-2090 "Where lands meets water. Where earth meets air. Where body meets mind. Where space meets time. We like to be on one side, and look at the other." D.Adams "Mostly harmless" From gandalf@REDACTED Wed Jun 2 23:37:17 1999 From: gandalf@REDACTED (Vladimir Ulogov) Date: Wed, 2 Jun 1999 17:37:17 -0400 (EDT) Subject: global_name_server question. In-Reply-To: <199906030717.RAA01026@campari.serc.rmit.edu.au> Message-ID: On Thu, 3 Jun 1999, Torbjorn Tornkvist wrote: > (hello@REDACTED)1> length(global:registered_names()). (server@REDACTED)9> global:register_name("eh", P). (server@REDACTED)11> global:registered_names(). ["eh"] ------------------------ Output still to be: 3,0 ======================================================= Vladimir I. Ulogov (gandalf@REDACTED) tel: 973-236-6464 or 6463 fax: 973-236-2090 "Where lands meets water. Where earth meets air. Where body meets mind. Where space meets time. We like to be on one side, and look at the other." D.Adams "Mostly harmless" From patrickdlogan@REDACTED Thu Jun 3 00:29:40 1999 From: patrickdlogan@REDACTED (patrickdlogan@REDACTED) Date: Wed, 2 Jun 1999 15:29:40 -0700 (PDT) Subject: Bluetail (Was: Re: Erlang status questions) In-Reply-To: <199906022045.WAA00412@kaja.bluetail.com> References: <14164.19253.731090.849112@c837917-a.potlnd1.or.home.com> <199906022045.WAA00412@kaja.bluetail.com> Message-ID: <14165.44950.758790.264690@c837917-a.potlnd1.or.home.com> Claes Wikstrom writes: > > It's a small startup some of us has just recently formed. We are > writing commercial proprietary software in Erlang. > > We'll all continue to contribute to the Erlang community with both > code, libraries, and bits of advice. Since we're writing all our > software in Erlang, there will probably be lots of our code that > can be useful to the Erlang community. Well, I am sure everyone interested in Erlang wishes Bluetail tons of success! I am looking forward to reading more. -- Patrick D. Logan mailto:patrickdlogan@REDACTED From jon@REDACTED Thu Jun 3 03:07:38 1999 From: jon@REDACTED (Jon Larsson) Date: Thu, 03 Jun 1999 11:07:38 +1000 Subject: global_name_server question. In-Reply-To: Your message of "Wed, 02 Jun 1999 17:37:17 -0400." Message-ID: <199906030107.LAA05844@universe.serc.rmit.edu.au> Hi Vladimir, I tried your program and it works fine for me. In your last email you correctly used global:register_name(eh,P) instead of the register(eh,P) in the original program. I have attached my erl file, the C program and the makefile below. I get the following result: universe_104% erl -sname test -setcookie bla Erlang (BEAM) emulator version 47.4.1 Eshell V47.4.1 (abort with ^G) (test@REDACTED)1> test:start(). Starting the receiver. yes (test@REDACTED)2> global:registered_names(). [eh] And when I run the C program: universe_33% ./erl_reg_send 4,1 Cheers, Jon Larsson -- Erl file: %%------------------------------------------------- -module(test). -export([start/0,receiver/0]). %%------------------------------------------------- start() -> P = spawn(test, receiver, []), io:fwrite("Starting the receiver.~n"), global:register_name(eh, P). %%-------------------------------------------------- receiver() -> receive stop -> io:format("Stop.~n"); Message -> io:format("Recv: ~w~n", [Message]), receiver() end. %%--------------------------------------------------- C file: ***************************************************** #include "erl_interface.h" #include "ei.h" int main(int argc, char **argv) { int sockfd; char **names; int count; erl_init(NULL, 0); erl_connect_init(42, "bla", 0); sockfd = erl_connect("test@REDACTED"); names = erl_global_names(sockfd, &count); printf("%d,%d\n", sockfd, count); erl_close_connection(sockfd); } ***************************************************** Makefile: FILES = erl_reg_send.o INCFLAGS = -I/opt/erlang-47.4.1/lib/erlang/usr/include LIBFLAGS = -L/opt/erlang-47.4.1/lib/erlang/usr/lib CFLAGS = $(INCFLAGS) $(LIBFLAGS) all: $(FILES) $(LINK.c) -o erl_reg_send $< -lerl_interface -lei -lnsl -lsocket -lresolv From peter.olin@REDACTED Thu Jun 3 10:37:45 1999 From: peter.olin@REDACTED (Peter Olin) Date: Thu, 03 Jun 1999 10:37:45 +0200 Subject: global_name_server question. References: <199906022037.WAA00407@kaja.bluetail.com> Message-ID: <37563ED9.111D5F90@ericsson.com> Claes Wikstrom wrote: > This is really irritating that io:format/2 doesn't > fail when presented with unformatable data. > It simply fails to write anything and returns > an error code. True! Really irritating. And of course the source of many obscure run-time errors that are not spotted right away as they happen. > A very good practice is to start to write > ok = io:format(..... > everywhere in the code, the match then works as an > assertion and the process will crash when io:format/2 > returns an error code. A "very good practice" is perhaps exaggerating the positive side of it a bit. I would say it is a necessary,kludgy workaround enforced by poor design in the library modules. And we have lived with it too long already. There are many places in OTP where errors are "signalled" this way. The practice of *returning* {error,}-tuples and {ok,}-tuples instead of simply returning the relevant values, or EXITing also makes it impossible to have nested function calls. For instance: (code not compiled or executed) copy1(File1, File2) -> file:write_file("dot_login", file:read_file(".login")). is impossible. Instead one has to write: copy2(File1, File2) -> {ok, B} = file:read_file(".login"), ok = file:write_file("dot_login", B). Not only is this awkward, but also, instead of simply handling the values we're interested in we need to match structures and explicitly force our code to crash where it would be natural to have that behaviour implicitly. "Backwards compatibility" has been the often mentioned reason for keeping a lot of the inconsistencies in the OTP libraries, but I really don't think that's an argument. What's the "public opinion" on revising and rewriting interfaces so that functions have some consistent use of "types", return values, EXIT reasons, etc.? There are many ways of keeping the system backwards compatible, without actively preventing improvements where there is a need for them. (New names for revised modules, forwarding of calls, compiler warnings, etc) -- /Peter Olin (mailto:peter.olin@REDACTED) From patrickdlogan@REDACTED Thu Jun 3 11:32:48 1999 From: patrickdlogan@REDACTED (patrickdlogan@REDACTED) Date: Thu, 3 Jun 1999 02:32:48 -0700 (PDT) Subject: Backward compatibility (Was: Re: global_name_server question.) In-Reply-To: <37563ED9.111D5F90@ericsson.com> References: <199906022037.WAA00407@kaja.bluetail.com> <37563ED9.111D5F90@ericsson.com> Message-ID: <14166.18372.447615.934102@c837917-a.potlnd1.or.home.com> Peter Olin writes: > > There are many places in OTP where errors are "signalled" this > way... > > "Backwards compatibility" has been the often mentioned reason for > keeping a lot of the inconsistencies in the OTP libraries, but I > really don't think that's an argument. > > What's the "public opinion" on revising and rewriting interfaces so > that functions have some consistent use of "types", return values, > EXIT reasons, etc.? There are many ways of keeping the system > backwards compatible, without actively preventing improvements > where there is a need for them. (New names for revised modules, > forwarding of calls, compiler warnings, etc) I don't have a lot of legacy code yet, so I am not too concerned either way. In general I am willing to put up with some cruft in the name of backward compatibility, as long as the fix is available alongside the older stuff one way or another. I'd rather we not all fix it ourselves N different ways. That said, here is one cute way to fix it for now... Assert = fun({ok, Result}) -> Result end. copy1(File1, File2) -> file:write_file("dot_login", Assert(file:read_file(".login"))). -- Patrick D. Logan mailto:patrickdlogan@REDACTED From crd@REDACTED Thu Jun 3 20:02:38 1999 From: crd@REDACTED (Craig Dickson) Date: Thu, 3 Jun 1999 11:02:38 -0700 Subject: global_name_server question. References: <199906022037.WAA00407@kaja.bluetail.com> <37563ED9.111D5F90@ericsson.com> Message-ID: <01b201beadeb$47330b80$6e02a8c0@int2.inversenet.com> Peter Olin wrote: > The practice of *returning* {error,}-tuples and {ok,}-tuples instead of > simply returning the relevant values, or EXITing also makes it impossible > to have nested function calls. > > For instance: (code not compiled or executed) > copy1(File1, File2) -> > file:write_file("dot_login", file:read_file(".login")). > > is impossible. Instead one has to write: > > copy2(File1, File2) -> > {ok, B} = file:read_file(".login"), > ok = file:write_file("dot_login", B). > > Not only is this awkward, but also, instead of simply handling the values > we're interested in we need to match structures and explicitly force our > code to crash where it would be natural to have that behaviour implicitly. True. It isn't quite true, though, that nested function calls are impossible. There is another way to write it than your copy2: copy3(File1, File2) -> file:write_file("dot_login", begin {ok, B} = file:read_file(".login"), B end). Whether this is better or worse than copy2 is probably a question of taste. > "Backwards compatibility" has been the often mentioned reason for keeping a > lot of the inconsistencies in the OTP libraries, but I really don't think > that's an argument. > > What's the "public opinion" on revising and rewriting interfaces so that > functions have some consistent use of "types", return values, EXIT reasons, > etc.? There are many ways of keeping the system backwards compatible, without > actively preventing improvements where there is a need for them. (New names > for revised modules, forwarding of calls, compiler warnings, etc) Sounds good to me. I don't even much care if backward compatibility is retained, though it's probably a good idea. Craig From luke@REDACTED Thu Jun 3 20:53:24 1999 From: luke@REDACTED (Luke Gorrie) Date: 04 Jun 1999 04:53:24 +1000 Subject: global_name_server question. In-Reply-To: "Craig Dickson"'s message of "Thu, 3 Jun 1999 11:02:38 -0700" References: <199906022037.WAA00407@kaja.bluetail.com> <37563ED9.111D5F90@ericsson.com> <01b201beadeb$47330b80$6e02a8c0@int2.inversenet.com> Message-ID: "Craig Dickson" writes: > Peter Olin wrote: [...] > copy3(File1, File2) -> > file:write_file("dot_login", > begin {ok, B} = file:read_file(".login"), B end). Interesting, I've never come across "begin" before. Could you please give me a pointer to where it's documented? Perhaps I just missed it in the general documentation, or are there some nice features tucked away in the specification/reference manual only? -- "The Commando Pattern is used to get in and out quick, and get the job done. This pattern can break any encapsulation to accomplish its mission. It takes no prisoners." - Michael Duell ("Resign Patterns") From crd@REDACTED Thu Jun 3 22:44:05 1999 From: crd@REDACTED (Craig Dickson) Date: Thu, 3 Jun 1999 13:44:05 -0700 Subject: global_name_server question. References: <199906022037.WAA00407@kaja.bluetail.com> <37563ED9.111D5F90@ericsson.com> <01b201beadeb$47330b80$6e02a8c0@int2.inversenet.com> Message-ID: <01c301beae01$d5387580$6e02a8c0@int2.inversenet.com> Luke Gorrie wrote: > "Craig Dickson" writes: > > > copy3(File1, File2) -> > > file:write_file("dot_login", > > begin {ok, B} = file:read_file(".login"), B end). > > Interesting, I've never come across "begin" before. Could you please > give me a pointer to where it's documented? Perhaps I just missed it > in the general documentation, or are there some nice features tucked > away in the specification/reference manual only? Erlang 4.7.3 Reference Manual, section 6.20.6, "Block Expressions". Craig From klacke@REDACTED Fri Jun 4 23:34:01 1999 From: klacke@REDACTED (Claes Wikstrom) Date: Fri, 4 Jun 1999 23:34:01 +0200 Subject: global_name_server question. In-Reply-To: <01b201beadeb$47330b80$6e02a8c0@int2.inversenet.com> (crd@inversenet.com) References: <199906022037.WAA00407@kaja.bluetail.com> <37563ED9.111D5F90@ericsson.com> <01b201beadeb$47330b80$6e02a8c0@int2.inversenet.com> Message-ID: <199906042134.XAA00474@kaja.bluetail.com> Craig Dickson" wrote: > > Peter Olin wrote: > > > Not only is this awkward, but also, instead of simply handling the values > > we're interested in we need to match structures and explicitly force our > > code to crash where it would be natural to have that behaviour implicitly. > > True. It isn't quite true, though, that nested function calls are > impossible. > There is another way to write it than your copy2: > > copy3(File1, File2) -> > file:write_file("dot_login", > begin {ok, B} = file:read_file(".login"), B end). I think Peter has a point here, on the other hand if we had the situation that all the library functions were to exit/1 on failure I'm sure that Peter would be the first to tell us that this idea of always calling exit/1 isn't that good either. The question of whether to return {error, Reason} or to call exit/1 simply isn't possible to answer. Today the erlang libraries are almost consistent in error return values with the {error, Reason} tuple. The programmer can simulate an exit/1 behaviour by adding match assertions in the code as in ok = io:format... I do that often. Nesting funtion calls isn't that easy though and I didn't like the neither the proposed begin end thinge nor the Assert fun This discussion is 10 years old, we've had this debate for years and we've never even come close to consencus . Perhaps we should have yet another API as in: Fd = file:x_open(File, [read, raw]), B = file:x_read(Fd, 2048), and io:x_format("Hello", []), mnesia:x_transaction(Fun), Which fails with exit/1 on error. ?? /klacke From jhague@REDACTED Sat Jun 5 00:10:03 1999 From: jhague@REDACTED (James Hague) Date: Sat, 5 Jun 1999 00:10:03 +0200 Subject: Erlang status questions Message-ID: A couple of status questions: 1. When is the next Open Source Erlang release planned for? It would be nice to have the system be generally more re-compilable. It also seems that the Open Source version is a couple of revisions behind what Ericsson uses internally. 2. How have the native code generation groups been progessing? The HIPE page (not maintained by Ericsson, I realize) is getting a bit stale. With native code generation, Erlang would be completely unstoppable, IMO :) James From patrickdlogan@REDACTED Sat Jun 5 02:59:40 1999 From: patrickdlogan@REDACTED (patrickdlogan@REDACTED) Date: Fri, 4 Jun 1999 17:59:40 -0700 (PDT) Subject: global_name_server question. In-Reply-To: <199906042134.XAA00474@kaja.bluetail.com> References: <199906022037.WAA00407@kaja.bluetail.com> <37563ED9.111D5F90@ericsson.com> <01b201beadeb$47330b80$6e02a8c0@int2.inversenet.com> <199906042134.XAA00474@kaja.bluetail.com> Message-ID: <14168.29910.625246.304126@c837917-a.potlnd1.or.home.com> Claes Wikstrom writes: > Perhaps we should have yet another API as in: > > Fd = file:x_open(File, [read, raw]), > B = file:x_read(Fd, 2048), > > and > > io:x_format("Hello", []), > > mnesia:x_transaction(Fun), Yes, this is along the lines of what I was thinking of as a solution in a future release. Establish some convention that there are functions named y and functions named y' (y prime) to indicate error return and exit/1 respectively. The convention becomes easy to remember, there is choice of both mechanisms, and there is backward compatibility with incremental migration to the new functions as desired. The only thing I would change from klacke's suggestion is to put the mnemonic at the end of the function name rather than the beginning. Then lexical sorting places the companion functions side by side. Of course it could be argued that the mnemonic at the beginning puts the new functions lexically together, but that effect can be achieved just as easily via a pattern match (e.g. grep). -- Patrick D. Logan mailto:patrickdlogan@REDACTED From ulf.wiger@REDACTED Sun Jun 6 15:50:14 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Sun, 6 Jun 1999 15:50:14 +0200 (MET DST) Subject: global_name_server question. In-Reply-To: <199906042134.XAA00474@kaja.bluetail.com> Message-ID: On Fri, 4 Jun 1999, Claes Wikstrom wrote: klacke>> There is another way to write it than your copy2: klacke>> klacke>> copy3(File1, File2) -> klacke>> file:write_file("dot_login", klacke>> begin {ok, B} = file:read_file(".login"), B end). klacke> Personally, I much prefer to write a wrapper function: copy4(File1, File2) -> file:write_file(read_file(File1), File2). read_file(F) -> {ok,B} = file:read_file(B), B. This is not much more work, and has the advantage of giving clearer exit messages (very much so in the past - the newest emulator has much improved error messages.) The style of matching {ok,X} = f(..) used to have the disadvantage that the exit message became {badmatch, error}, which was really pretty useless if you had several such assertions in the same function. As for the begin ... end construct, I've found it useful in combination with functions which always exit. I often want the top level of a complex flow to be "nice" to the user, but prefer the components to be distinct -- they either succeed or exit. reorganize_hard_drive(D) -> case catch (begin P = read_prefs(), Fs = scan_disk(D, P), purge_old(Fs, P), optimize(D, Fs, P) end) of {'EXIT', Reason} -> cleanup(D), format_error(Reason), {error, Reason}; Res -> Res end. /Uffe Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From icimjs@REDACTED Fri Jun 11 23:40:25 1999 From: icimjs@REDACTED (Elan) Date: Fri, 11 Jun 1999 14:40:25 -0700 Subject: etk In-Reply-To: References: <199906042134.XAA00474@kaja.bluetail.com> Message-ID: <3.0.5.32.19990611144025.00b2bec0@pop.loop.com> Hi everyone, under Win95 running the latest Erlang version, there is an example for etk called wtour. 1. I don't appear to understand the Tk version numbering. The version of Tcl/Tk that I have here (for MS Windows) is 8.1. Do I need a different Tk version? 2. What are the exact steps I need to do in order to run this example? Do I have to move the wtour directory somewhere, where Erlang can access it? TIA, Elan ==================================== Get your copy of FaxForward http://www.commercebox.com/FaxForward/ From luke@REDACTED Sat Jun 12 03:53:03 1999 From: luke@REDACTED (Luke Gorrie) Date: 12 Jun 1999 11:53:03 +1000 Subject: etk In-Reply-To: Elan's message of "Fri, 11 Jun 1999 14:40:25 -0700" References: <199906042134.XAA00474@kaja.bluetail.com> <3.0.5.32.19990611144025.00b2bec0@pop.loop.com> Message-ID: Elan writes: > under Win95 running the latest Erlang version, there is an example for etk > called wtour. > > 1. I don't appear to understand the Tk version numbering. The version of > Tcl/Tk that I have here (for MS Windows) is 8.1. Do I need a different Tk > version? Erlang came with the appropriate version, so you should have it automatically installed already. > 2. What are the exact steps I need to do in order to run this example? Do I > have to move the wtour directory somewhere, where Erlang can access it? I just started erlang from the wtour dir, and ran: "make:all(), wtour:start()." You don't have to actually be in that directory, of course - but it'll work. :) -- "The Commando Pattern is used to get in and out quick, and get the job done. This pattern can break any encapsulation to accomplish its mission. It takes no prisoners." - Michael Duell ("Resign Patterns") From lyn@REDACTED Sun Jun 13 00:30:52 1999 From: lyn@REDACTED (lyn) Date: Sat, 12 Jun 1999 17:30:52 -0500 Subject: erlang web server Message-ID: <199906122230.RAA02597@karma.uchicago.edu> can anyone point me to the erlang web server? I can't seem to find a link to it. thanks, -Lyn From lyn@REDACTED Sun Jun 13 06:32:02 1999 From: lyn@REDACTED (lyn) Date: Sat, 12 Jun 1999 23:32:02 -0500 Subject: exiting with badarg Message-ID: <199906130432.XAA29458@phaedrus.uchicago.edu> I'm trying to diagnose an error message and I wonder if anything immediately jumps out at the experts. here is the shell interaction: 55> chat_client:signup(). ** exited: {badarg,{chat_client,signup,[]}} ** =ERROR REPORT==== 12-Jun-1999::23:29:29 === !!! Error in process <0.144.0> with exit value: {badarg,{chat_client,signup,[]}} I assume this means that chat_client doesn't contain a zero argument function called signup. But chat_client.erl contains this: signup() -> chat_server ! {sign_up, name(), self()}, receive {ok, Pid} -> io:format("signup succeeded"), chat_client_dispatch(name()) after 5 -> failed end. so where is this bad match occurring? thanks, -Lyn From cesarini@REDACTED Sun Jun 13 11:48:40 1999 From: cesarini@REDACTED (Francesco Cesarini) Date: Sun, 13 Jun 1999 11:48:40 +0200 (MET DST) Subject: exiting with badarg && Erlang Web server Message-ID: The only bad arg I can see occur here (You unfortunately provided too little of the code) is if you are attempting to send a message to a registered process which does not exist. * Has chat_server been started, and has the process been registered? * If you have spawned a process, has it crashed? (These suckers tend to die silently.) Check it out by using the BIF registered(). Eddie is the fault tollerant distributed web server. You can download it from http://www.eddieware.org Rgds, Francesco lyn wrote: > > I'm trying to diagnose an error message and I wonder if > anything immediately jumps out at the experts. here is the > shell interaction: > > 55> chat_client:signup(). > ** exited: {badarg,{chat_client,signup,[]}} ** > > =ERROR REPORT==== 12-Jun-1999::23:29:29 === > !!! Error in process <0.144.0> with exit value: > {badarg,{chat_client,signup,[]}} > > I assume this means that chat_client doesn't contain a zero > argument function called signup. But chat_client.erl contains this: > > signup() -> > chat_server ! {sign_up, name(), self()}, > receive {ok, Pid} -> > io:format("signup succeeded"), > chat_client_dispatch(name()) > after 5 -> > failed > end. > > so where is this bad match occurring? > > thanks, > -Lyn =========================================================================== Francesco Cesarini Phone: +46 8 719 56 97 Fax: +46 8 719 89 40 Erlang Systems Cellular: +46 70 563 04 36 Torshamnsgatan 39 B Box 1214 http://www.ericsson.se/erlang S-164 28 KISTA, SWEDEN cesarini@REDACTED ============================================================================ From tobbe@REDACTED Mon Jun 14 01:37:58 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Mon, 14 Jun 1999 09:37:58 +1000 Subject: erlang web server In-Reply-To: <199906122230.RAA02597@karma.uchicago.edu> References: <199906122230.RAA02597@karma.uchicago.edu> Message-ID: <199906132337.JAA01459@campari.serc.rmit.edu.au> -------- > can anyone point me to the erlang web server? I can't seem to find a > link to it. You'll find a Web server in the inets-2.3 library. There is also the Eddie Web cluster thingie, see: http://www.eddieware.org > 55> chat_client:signup(). > ** exited: {badarg,{chat_client,signup,[]}} ** > > signup() -> > chat_server ! {sign_up, name(), self()}, 'badarg' indicates that there is no process registered with the name 'chat_server' Chat...hm...this program may be useful in your case: http://www.serc.rmit.edu.au/~tobbe/eppp_chat.erl Cheers /Tobbe From rtg@REDACTED Sun Jun 13 20:54:51 1999 From: rtg@REDACTED (Robin Giese) Date: Sun, 13 Jun 1999 14:54:51 -0400 Subject: Secure web server? Message-ID: <001b01beb5ce$38421d60$bb95b48c@student.Princeton.EDU> The documentation of the built-in web server mentions that it can be used with SSLeay to provide secure HTTPS service. I was wondering whether anyone knows if the Erlang run-time environment (in my case on Linux) is secure enough to warrant running it as an HTTPS server. I am building a distributed database with one "entry server" to the system, which currently is an SSL-patched Apache, proxying through to a separate physical net with the database servers on it. We're very concerned about security, since the data is quite confidential (insurance stuff.) It would be wonderful, of course, if we could scrap the Apache server, use an Erlang/Eddie SSL server instead, and just firewall off all the ports other than 443, to cut off incoming RPCs to the Erlang runtime environment. Has anyone done this before, and/or does this sound like it's secure? Does anyone know how we could get the SSL package+license? Thanks a lot! -robin From ulf.wiger@REDACTED Mon Jun 14 11:38:41 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Mon, 14 Jun 1999 11:38:41 +0200 Subject: exiting with badarg && Erlang Web server References: Message-ID: <3764CDA1.17639534@etxb.ericsson.se> Francesco Cesarini wrote: > > The only bad arg I can see occur here (You unfortunately provided too > little of the code) is if you are attempting to send a message to a > registered process which does not exist. > > * Has chat_server been started, and has the process been registered? > * If you have spawned a process, has it crashed? (These suckers tend to > die silently.) They die silently if they have been started with spawn(M,F,A). This is a feature, BTW, since clear error reporting *is* a bit expensive. There are ways to get more error reports from process termination: 1. Use spawn_link(M,F,A) instead of spawn/3. -------------------------------------------- In this case the parent process will receive a message, {'EXIT', Reason}, when the child process dies. If the parent doesn't trap exits, it'll die and you'll probably notice. Example: $> erl -boot start_clean Erlang (BEAM) emulator version 4.8.2.1 Eshell V4.8.2.1 (abort with ^G) 1> spawn_link(foo,bar,[]). <0.30.0> ** exited: {undef,{foo,bar,[]}} ** 2. Use the proc_lib equivalents to spawn/3 and spawn_link/3. ------------------------------------------------------------ The module proc_lib will do the same thing as spawn/3 and spawn_link/3, but will trap its own exits and generate an error report before exiting. To see the crash reports, you must start SASL (unless you have your own error reporting mechanism.) Example: (No error reporting if you don't start SASL) etxuwig@REDACTED > erl -boot start_clean Erlang (BEAM) emulator version 4.8.2.1 Eshell V4.8.2.1 (abort with ^G) 1> proc_lib:spawn(foo,bar,[]). <0.30.0> 2> (Progress, Error and Crash reports with SASL) $ > erl -boot start_sasl ... =PROGRESS REPORT==== 14-Jun-1999::11:30:22 === application: sasl started_at: nonode@REDACTED 1> proc_lib:spawn(foo,bar,[]). <0.39.0> 2> =CRASH REPORT==== 14-Jun-1999::11:30:35 === crasher: pid: <0.39.0> registered_name: [] error_info: {undef,{foo,bar,[]}} initial_call: {foo,bar,[]} ancestors: [<0.25.0>] messages: [] links: [] dictionary: [] trap_exit: false status: running heap_size: 233 stack_size: 0 reductions: 74 neighbours: /Uffe -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From icimjs@REDACTED Tue Jun 15 09:08:58 1999 From: icimjs@REDACTED (Elan) Date: Tue, 15 Jun 1999 00:08:58 -0700 Subject: Erlang Deployment Win95/98 Message-ID: <3.0.5.32.19990615000858.010a9720@pop.loop.com> Hi, I plan to install an application I've written for a client in Erlang (mainly using mnesia and etk) today at the client's site. Is it mandatory to setup the complete development environment or is there a deployment version available that can be tightly bound with the user application and delivered as a single (or multi-file) executable? TIA, Elan ==================================== Get your copy of FaxForward http://www.commercebox.com/FaxForward/ From icimjs@REDACTED Tue Jun 15 09:10:24 1999 From: icimjs@REDACTED (Elan) Date: Tue, 15 Jun 1999 00:10:24 -0700 Subject: etk and Erlang Shell Message-ID: <3.0.5.32.19990615001024.010a8010@pop.loop.com> Hi, Win95/98. Is it possible to start erlang with etk only visible and the erlang shell collapsed (i.e. minimized) under Win95/98? TIA, Elan ==================================== Get your copy of FaxForward http://www.commercebox.com/FaxForward/ From icimjs@REDACTED Tue Jun 15 09:38:52 1999 From: icimjs@REDACTED (Elan) Date: Tue, 15 Jun 1999 00:38:52 -0700 Subject: Diskbased Mnesia Nodes Message-ID: <3.0.5.32.19990615003852.00faac80@pop.loop.com> Hi, what is the shortest instruction for implementing a diskbased mnesia table? TIA, Elan ==================================== Get your copy of FaxForward http://www.commercebox.com/FaxForward/ From ulf.wiger@REDACTED Tue Jun 15 09:51:09 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Tue, 15 Jun 1999 09:51:09 +0200 Subject: Diskbased Mnesia Nodes References: <3.0.5.32.19990615003852.00faac80@pop.loop.com> Message-ID: <376605ED.BAB2D3AA@etx.ericsson.se> Elan wrote: > > Hi, > > what is the shortest instruction for implementing a diskbased mnesia table? > > TIA, > > Elan mnesia:create_table(TableName, [{disc_copies, [node()]}, {attributes, [...]}]). will create a table which resides on disk and in RAM on the current node. mnesia:create_table(TableName, [{disc_only_copies, [node()]}, {attributes, [...]}]). will create a table which resides on disk only. Typically, attributes are given with the following construct: {attributes, record_info(fields, RecName)} If you want the entire sequence of commands: erl -sname foo foo@REDACTED 1> mnesia:create_schema([node()]). foo@REDACTED 2> mnesia:start(). foo@REDACTED 3> mnesia:create_table(...). This will: 1. start an Erlang node with the "shortname" foo@ 2. create a mnesia schema under /Mnesia.foo@/ 3. start mnesia 4. create a table as above /Uffe -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From "mickael_remond"@REDACTED Wed Jun 16 14:47:27 1999 From: "mickael_remond"@REDACTED ("mickael_remond"@REDACTED) Date: Wed, 16 Jun 1999 14:47:27 +0200 Subject: inets ftp through proxy servers Message-ID: hello, Is there a wa to access ask the ftp client (inets lib) to access the ftp server through a proxy ? How would you do this ? Thanks in advance. Micka?l R?mond From dineshv@REDACTED Wed Jun 16 23:24:23 1999 From: dineshv@REDACTED (Dinesh Vadhia) Date: Wed, 16 Jun 1999 22:24:23 +0100 Subject: Who is Using Erlang? ... Message-ID: <002501beb83e$ed5b0140$0f708cd4@thinkpad> Does anyone know which major organisations (apart from Ericsson's) are using Erlang in anger? ... Any other telecommunications companies using it? ... Any organisations in the US? ... Dinesh -------------- next part -------------- An HTML attachment was scrubbed... URL: From boeke@REDACTED Thu Jun 17 11:56:50 1999 From: boeke@REDACTED (nsi04102-boeke) Date: Thu, 17 Jun 1999 11:56:50 +0200 (MET DST) Subject: Who is Using Erlang? ... Message-ID: <199906170956.LAA10235@hzsbc454.nl.lucent.com> Dinesh wrote: > Does anyone know which major organisations (apart from Ericsson's) > are using Erlang ... One thing I know for shure: Lucent is not using it. In the past I spent some efforts to introduce to my colleagues the possibility of using Erlang. Some of them did like this option indeed, however the management did not want it. One of the arguments was that our problems were not in the area of the used language (C and C++). I never fully understood this: Erlang claims to have 5 times smaller code then C, so it should contain 5 times less bugs ... but probably I'm naive. Wouter Boeke From moreda@REDACTED Thu Jun 17 10:37:10 1999 From: moreda@REDACTED (Roberto Moreda) Date: Thu, 17 Jun 1999 10:37:10 +0200 Subject: Erlang & databases Message-ID: <19990617103710.A1904@sanluis.net> I'm looking for the possibility to mix Java (only as front end) and Erlang in a project of a (mini) bussines management system. Where can I found info related to Erlang access to commercial databases trough any standard (OBDC)? Is mnesya suitable for this kind of app? How much? Thanks in advance. Roberto From seb@REDACTED Thu Jun 17 12:11:42 1999 From: seb@REDACTED (Sebastian Strollo) Date: 17 Jun 1999 12:11:42 +0200 Subject: Who is Using Erlang? ... In-Reply-To: nsi04102-boeke's message of "Thu, 17 Jun 1999 11:56:50 +0200 (MET DST)" References: <199906170956.LAA10235@hzsbc454.nl.lucent.com> Message-ID: nsi04102-boeke writes: > Dinesh wrote: > > > Does anyone know which major organisations (apart from Ericsson's) > > are using Erlang ... > > One thing I know for shure: Lucent is not using it. In the past I spent > some efforts to introduce to my colleagues the possibility of using Erlang. > Some of them did like this option indeed, however the management did not > want it. One of the arguments was that our problems were not in the area > of the used language (C and C++). I never fully understood this: Erlang > claims to have 5 times smaller code then C, so it should contain 5 times > less bugs ... but probably I'm naive. And to think that I thought Lucent was divided in ML and Limbo (or C) camps... ;-) -- Sebastian From tobbe@REDACTED Thu Jun 17 22:26:11 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Fri, 18 Jun 1999 06:26:11 +1000 Subject: Who is Using Erlang? ... In-Reply-To: <002501beb83e$ed5b0140$0f708cd4@thinkpad> References: <002501beb83e$ed5b0140$0f708cd4@thinkpad> Message-ID: <199906172026.GAA00799@campari.serc.rmit.edu.au> -------- Take a look at the program for the Erlang User's Conference, to be held September 30: http://www.erlang.se/erlang/sure/main/news/euc99.shtml There you can read about three non-Ericsson companies that has been using Erlang in commercial products. /Tobbe From tobbe@REDACTED Thu Jun 17 22:52:35 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Fri, 18 Jun 1999 06:52:35 +1000 Subject: Erlang Deployment Win95/98 In-Reply-To: <3.0.5.32.19990615000858.010a9720@pop.loop.com> References: <3.0.5.32.19990615000858.010a9720@pop.loop.com> Message-ID: <199906172052.GAA00948@campari.serc.rmit.edu.au> -------- > I plan to install an application I've written for a client in Erlang > (mainly using mnesia and etk) today at the client's site. Great ! How did it go ? > Is it mandatory to setup the complete development environment or is there a > deployment version available that can be tightly bound with the user > application and delivered as a single (or multi-file) executable? Hm...no one else has answered so I'll give it a try. I think you have to setup a full Erlang environment. You can of course run Erlang with just the "base-kit", but in your case you are usng etk and mnesia so you need everything. When it comes to your application, there exist a an application concept which is described in the documentation under "Design principles": http://www.erlang.org/doc/doc/doc/design_principles/part_frame.html Relevant info is also the "System principles" which, among other things, talks about how to create an embedded system: http://www.erlang.org/doc/doc/doc/system_principles/part_frame.html And I guess that the info in "OAM Principles" also are important for really serious people... http://www.erlang.org/doc/doc/doc/oam/part_frame.html These concepts are not easy to get a grip on. I have myself been tearing my hair in frustration many times. A nice little tutorial on how to package a system to be delivered to customer would be great to have. Any takers... ? /Tobbe From hakan@REDACTED Thu Jun 17 13:03:09 1999 From: hakan@REDACTED (Hakan Mattsson) Date: Thu, 17 Jun 1999 13:03:09 +0200 (MET DST) Subject: Erlang Deployment Win95/98 In-Reply-To: <199906172052.GAA00948@campari.serc.rmit.edu.au> Message-ID: tobbe>I think you have to setup a full Erlang environment. tobbe>You can of course run Erlang with just the "base-kit", tobbe>but in your case you are usng etk and mnesia so you tobbe>need everything. Mnesia has no dependencies of other applications than erts, kernel and stdlib. This means that you can run Mnesia on the bare "base-kit" if you want. /H?kan From ulf.wiger@REDACTED Thu Jun 17 13:03:22 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Thu, 17 Jun 1999 13:03:22 +0200 Subject: Erlang Deployment Win95/98 References: <3.0.5.32.19990615000858.010a9720@pop.loop.com> <199906172052.GAA00948@campari.serc.rmit.edu.au> Message-ID: <3768D5FA.8514942B@etx.ericsson.se> Torbjorn Tornkvist wrote: > > These concepts are not easy to get a grip on. > I have myself been tearing my hair in frustration > many times. A nice little tutorial on how to package > a system to be delivered to customer would be great > to have. > > Any takers... ? At AXD 301, we have gone pretty far in automating installation, application start, and in-service upgrade. I believe that many of the things we do are generic, and should be a part of OTP (we have also suggested this a couple of times.) However, it takes time and effort to study and rewrite, so that our support could be made generic. Personally, I don't have time to do all that, but I could try to give a few pointers... later, or answer specific questions now. ;) /Uffe -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From hakan@REDACTED Thu Jun 17 14:10:23 1999 From: hakan@REDACTED (Hakan Mattsson) Date: Thu, 17 Jun 1999 14:10:23 +0200 (MET DST) Subject: Erlang & databases In-Reply-To: <19990617103710.A1904@sanluis.net> Message-ID: On Thu, 17 Jun 1999, Roberto Moreda wrote: moreda>Date: Thu, 17 Jun 1999 10:37:10 +0200 moreda>From: Roberto Moreda moreda>To: Erlang Questions moreda>Subject: Erlang & databases moreda> moreda>I'm looking for the possibility to mix Java (only as front end) and Erlang in a moreda>project of a (mini) bussines management system. moreda> moreda>Where can I found info related to Erlang access to commercial databases moreda>trough any standard (OBDC)? The ODBC binding for Erlang is not released yet. But you can read this for the time being: http://www.erlang.se/info/technicalinfo/R5B_doc/lib/odbc-0.8.1/doc/ moreda>Is mnesya suitable for this kind of app? How much? Yes, if it is possible to put the most database intense parts of your application in Erlang. Mnesia is a DBMS primarily intended to be used by applications written in Erlang. Normally, Mnesia and its applications runs in the same address space (in the same OS process). When you have a front end written in Java you may end up with a severe communication overhead. This depends of course a lot of your (application level) interface between Java and Erlang. Mnesia Session is a foreign language interface for Mnesia and you may read about it at: http://www.erlang.org/doc/doc/lib/mnesia_session-1.1/doc The generic interface of Mnesia Session is rather low level and is mostly intended for database administration applications. You should put some efforts to design a customized high level interface between your Java front end and your Erlang back end. A little example: divorce(Name) -> F = fun() -> case mnesia:read(Name) of [] -> mnesia:abort(no_such_person); Pers -> Partner = mnesia:read(Pers#person.married_to), mnesia:write(Pers#person{married_to = undefined}), mnesia:write(Partner#person{married_to = undefined}) end end, mnesia:transaction(F). Assume that your Java front end needs to perform some access of person records stored in a Mnesia database. In the divorce/1 example it is 2 read accesses and 2 write accesses. When using the generic interface of Mnesia Session you would easily end up with a RPC between Java and Erlang for each of these 4 accesses. An obvious better design which harmonizes better with the application logic, is to write an own IDL spec with divorce/1 as sole function (one single RPC access). /H?kan From ulf.wiger@REDACTED Thu Jun 17 14:10:47 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Thu, 17 Jun 1999 14:10:47 +0200 Subject: Who is Using Erlang? ... References: <199906170956.LAA10235@hzsbc454.nl.lucent.com> Message-ID: <3768E5C7.D8328E5B@etx.ericsson.se> nsi04102-boeke wrote: > > One of the arguments was that our problems were not in the area > of the used language (C and C++). I never fully understood this: Erlang > claims to have 5 times smaller code then C, so it should contain 5 times > less bugs ... but probably I'm naive. This is similar to my experience. We have seen that the number of bugs/line is very roughly the same in Erlang as in C/C++. However, the code volume is much smaller, and thus the total number of bugs is smaller by roughly the same factor. The same goes for programmer productivity (roughly the same in man hours/line.) We have equated this to: * > 4 times higher programmer productivity * > 4 times higher program quality based on actual figures from large projects. This also gives you: - shorter time to market - lower risk by cutting lead times for prototypes - better risk control by reducing the cost of adjustments and rewrites We have also seen evidence that Erlang is a much more productive language than Java for our kind of applications. Naturally, all this equates to money -- big money. But it's difficult to prove scientifically that all the above holds. The naive, but all to common, view is that the choice of programming language doesn't matter. I've come across this too. The misconception is that if you run your project right, it doesn't matter what programming language you choose - or for that matter how good your programmers are. It's hard to fight this. I guess people's religion gets in the way. Also, perhaps most big telecoms companies are still mainly hardware-focused -- software is a necessary evil, but the hardware is the real product. But we should just go on fighting the good fight and having fun while we're at it. It sure feels good doing something you truly believe in (and seeing practical results that back you up.) /Uffe -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From mike@REDACTED Thu Jun 17 17:53:38 1999 From: mike@REDACTED (Michael C Williams) Date: Thu, 17 Jun 1999 17:53:38 +0200 (MET DST) Subject: Who is Using Erlang? ... In-Reply-To: <199906170956.LAA10235@hzsbc454.nl.lucent.com> Message-ID: On Thu, 17 Jun 1999, nsi04102-boeke wrote: > of the used language (C and C++). I never fully understood this: Erlang > claims to have 5 times smaller code then C, so it should contain 5 times > less bugs ... but probably I'm naive. Not naive - realistic. /Mike From luke@REDACTED Thu Jun 17 18:07:28 1999 From: luke@REDACTED (Luke Gorrie) Date: 18 Jun 1999 02:07:28 +1000 Subject: Style with gen_server Message-ID: <87g13qajzz.fsf@baked.vegetable.org> Hi guys, I'm having my first poke around with gen_server, and I have a question about the style its used with. I also note that what I'm trying to do is fairly "object-oriented", so if there's a different mindset which would be more appropriate for this problem in Erlang, please let me know. :) Basically, what I want to do is implement polymorphism. The neatest way to do it seems to be using anonmyous gen_server processes which all expect the same sorts of messages, and then build a client module to encapsulate the gen_server:call stuff. So, I'll have some modules: my_client: no 'behaviour'. maps calls like wash(Pid, Dishes) to gen_server:call(Pid, {wash, Dishes}, infinity). dishwasher: implements gen_server behaviour. used as with: {ok,Pid} = gen_server:start_link(dishwasher,[],[]), my_client:wash(Pid, SomeDishes). slave: as above, but with a different implementation Is this the right way to go? Sorry if this seems terribly obvious, I just want to check that I'm thinking the right way. :) Also, I suppose that if I wanted throw an exception at the caller, the best way would be to stick something in my_client like: wash(Pid,Dishes) -> case gen_server:call(Pid, {wash,Dishes}) of {ok,Result} -> Result; {error,Reason} -> throw(Reason) end. Right? Cheers, Luke From ulf.wiger@REDACTED Thu Jun 17 20:10:37 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Thu, 17 Jun 1999 20:10:37 +0200 Subject: Style with gen_server References: <87g13qajzz.fsf@baked.vegetable.org> Message-ID: <37693A1D.C5B228F1@etx.ericsson.se> dishwasher.erl: new() -> gen_server:start_link(?MODULE, [], []). wash(DishWasher, Dishes) -> call(DishWasher, {wash, Dishes}). %%% internal exports init(_) -> {ok, #state{}}. handle_call({wash, Dishes}, From, State) -> {Result, NewState} = do_wash(Dishes, State), {reply, Reply, NewState}. %%% internal functions %%% "Aggressive" behaviour on the client side. %%% The function either succeeds or exits. call(DW, Req) -> case gen_server:call(DW, Req) of {error, Reason} -> exit(Reason); Other -> Other end. ...USW Useage: clean(DirtyDishes) -> MyDishWasher = dishwasher:new(), CleanDishes = dishwasher:wash(MyDishWasher, DirtyDishes). No need for "if" statements on the return value, since there will be an EXIT if something goes wrong. Remember, EXITs can always be caught at some level suitable for error handling. Summary (in object terms): - The module name represents the type of object - The API function is the method call (ObjectType:Method(Instance, Args)) - Hide the gen_server details in dishwasher.erl - (my preference): Write functions that either succeed or EXIT I prefer using exit() instead of throw(), partly because throw() assumes a catch -- if there's no catch, you will get an {'EXIT', nocatch}, which isn't very helpful. One way to structure things: - Use throw({error, Reason}) to bail out to a top-level catch if it is a controllable error - Use exit(Reason) for everything else - Use catch Expr at lower levels only in special cases - Possibly use throw(GoodResult) as a non-local return sometimes /Uffe Luke Gorrie wrote: > > Hi guys, > > I'm having my first poke around with gen_server, and I have a question > about the style its used with. I also note that what I'm trying to do > is fairly "object-oriented", so if there's a different mindset which > would be more appropriate for this problem in Erlang, please let me > know. :) > > Basically, what I want to do is implement polymorphism. The neatest > way to do it seems to be using anonmyous gen_server processes which > all expect the same sorts of messages, and then build a client module > to encapsulate the gen_server:call stuff. So, I'll have some modules: > > my_client: no 'behaviour'. maps calls like wash(Pid, Dishes) to > gen_server:call(Pid, {wash, Dishes}, infinity). > > dishwasher: implements gen_server behaviour. used as with: > {ok,Pid} = gen_server:start_link(dishwasher,[],[]), > my_client:wash(Pid, SomeDishes). > slave: as above, but with a different implementation > > Is this the right way to go? Sorry if this seems terribly obvious, I > just want to check that I'm thinking the right way. :) > > Also, I suppose that if I wanted throw an exception at the caller, the > best way would be to stick something in my_client like: > > wash(Pid,Dishes) -> > case gen_server:call(Pid, {wash,Dishes}) of > {ok,Result} -> Result; > {error,Reason} -> throw(Reason) > end. > > Right? > > Cheers, > Luke -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From icimjs@REDACTED Fri Jun 18 08:43:22 1999 From: icimjs@REDACTED (Elan) Date: Thu, 17 Jun 1999 23:43:22 -0700 Subject: Dynamic Mnesia Queries. Message-ID: <3.0.5.32.19990617234322.00b24ea0@pop.loop.com> Hi everyone, first of all, thank you all for the useful responses. Torbjorn Tornkvist wrote: >Great ! How did it go ? We're still waiting for their new computers to arrive, which gives me a little time to improve my code. We've decided to use Linux instead of MS Windows :-) Here's what I'm currently wrestling with: Right now I have the following "generic" function: list_glue() -> Fun = fun() -> Q = query [G.product_name || G <- table(glue)] end, mnemosyne:eval(Q) end, mnesia:transaction(Fun). Fine. What I'd like to do is something like this (which doesn't work): list_generic(Table, Tuple, Condition) -> Fun = fun() -> Q = query( Tuple || ??? <- table(Table), Condition ] end, mnemosyne:eval(Q) end, mnesia:transaction(Fun). Then I would want to be able to call it with something like this ... from the shell list_generic(glue, {glue, Product_Name, _ , _ , _ ,}, {glue, _ , _ , _ , "Some glue manufacturer here"} ). where the record is -record(glue, {name, id, reference, manufacturer}). in order to get all glue products this particular manufacturer carries. On a different occasion I want to use the same function list_generic, to identify the type of glue I need to use for a certain type of floor covering, something like this list_generic(linoleum, {linoleum, Glue_ID, _ , _ }, {linoleum, _ , "00134", _ } ). where the record is -record(linoleum, {glue_reference, linoleum_id, manufacturer}). How could something like this be implemented? Is it at all possible? Will I need to use record_info(fields, Rec) -> [Names]. in the list_generic/3 function in order to construct a record and assign the values from the tuples Tuple and Condition to the record? How do I do that dynamically, i.e. during runtime? I think I'm close to the solution, but I'm still struggling with the documentation to get it right. Is there a better way to achieve the same effect? TIA, Elan ==================================== Get your copy of FaxForward http://www.commercebox.com/FaxForward/ From ulf.wiger@REDACTED Fri Jun 18 10:28:48 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Fri, 18 Jun 1999 10:28:48 +0200 Subject: Dynamic Mnesia Queries. References: <3.0.5.32.19990617234322.00b24ea0@pop.loop.com> Message-ID: <376A0340.383DB31C@etx.ericsson.se> I'll just address one piece of the puzzle, since it's one that I know off the top of my head. Elan wrote: > [...] > list_generic(glue, > {glue, Product_Name, _ , _ , _ ,}, > {glue, _ , _ , _ , "Some glue manufacturer here"} ). > > where the record is > -record(glue, {name, id, reference, manufacturer}). > If you want such a simple query, you can skip mnemosyne and use match_object directly. I'm afraid that you'll have to use some kind of parser otherwise (haven't kept up with mnemosyne lately). Take the following code for example (written in all haste, apologies): -module(mntest). -export([q/3]). q(Tab, Fields, Select) -> Fs = fields_info(Tab), Wild = mnesia:table_info(Tab, wild_pattern), Sel = insert_select(Fs, Select, Wild, 2), Proj = calc_project_positions(Fs, Fields, 2), {atomic, Objs} = mnesia:transaction( fun() -> mnesia:match_object(Sel) end), [project(Proj, O) || O <- Objs]. insert_select([H|T], Sel, Rec, Pos) -> case lists:keysearch(H, 1, Sel) of {value, {_, Val}} -> insert_select(T, Sel, setelement(Pos, Rec, Val), Pos+1); false -> insert_select(T, Sel, Rec, Pos+1) end; insert_select([], _, Rec, _) -> Rec. calc_project_positions(_, all, _) -> all; calc_project_positions([H|T], Fields, Pos) -> case lists:member(H, Fields) of true -> [Pos|calc_project_positions(T, Fields, Pos+1)]; false -> calc_project_positions(T, Fields, Pos+1) end; calc_project_positions([], _, _) -> []. project(all, O) -> O; project(Flds, O) -> P = project1(Flds, O), case P of [X] -> X; _ -> list_to_tuple(project1(Flds, O)) end. project1([H|T], O) -> [element(H, O)|project1(T, O)]; project1([], _) -> []. fields_info(glue) -> record_info(fields, glue); fields_info(linoleum) -> record_info(fields, linoleum). - - - - - - - - Example: (foo@REDACTED)44> mntest:q(glue, [name], [{manufacturer,m1}]). [g2,g1] (foo@REDACTED)45> mntest:q(glue, [name,id], [{manufacturer,m1}]). [{g2,2},{g1,1}] (foo@REDACTED)46> mntest:q(glue, all, []). [{glue,g4,4,undefined,m4}, {glue,g3,3,undefined,m3}, {glue,g2,2,undefined,m1}, {glue,g1,1,undefined,m1}] -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From knotwell@REDACTED Fri Jun 18 18:29:59 1999 From: knotwell@REDACTED ( Hello all-- I see the people at casbah.org have written one of their subsystems (experimental) in Erlang. A version (they have 2) of their persistent object store uses Mnesia and Mnemosyne. The whole project appears pretty new, but it's interesting to see Erlang's name pop up. --Brad From lyn@REDACTED Sun Jun 20 00:33:57 1999 From: lyn@REDACTED (lyn) Date: Sat, 19 Jun 1999 17:33:57 -0500 Subject: starting http server Message-ID: <199906192233.RAA12124@karma.uchicago.edu> hi, I'm trying to start the http server from the inets distribution, but haven't been successful. any help would be most appreciated. I swear I'll learn how to use the debugger soon ;-) -Lyn here is what happens when I try to start it: > erl -config inets Erlang (JAM) emulator version 47.4.1 Eshell V47.4.1 (abort with ^G) 1> application:start(inets). {error,{shutdown,{inets_sup,start,[normal,[]]}}} =INFO REPORT==== 19-Jun-1999::17:30:04 === application: inets exited: {shutdown,{inets_sup,start,[normal,[]]}} type: temporary 2> this is inets.config: [{inets, [{services,[{httpd,"/tmp/erlang-http/conf/httpd.conf"}]}]}]. and this is /tmp/erlang-http/conf/httpd.conf: # Port: The port the standalone listens to. For ports < 1023, you will # need httpd to be run as root initially. Port 8888 # ServerName allows you to set a host name which is sent back to clients for # your server if it's different than the one the program would get (i.e. use # "www" instead of the host's real name). # # Note: You cannot just invent host names and hope they work. The name you # define here must be a valid DNS name for your host. If you don't understand # this, ask your network administrator. #ServerName your.server.net # SocketType is either ip_comm, sockets or ssl. SocketType ip_comm # Modules: Server run-time plug-in modules written using the Erlang # Web Server API (EWSAPI). The server API make it easy to add functionality # to the server. Read more about EWSAPI in the Reference Manual. # WARNING! Do not tamper with this directive unless you are familiar with # EWSAPI. Modules mod_alias mod_auth mod_auth_mnesia mod_esi mod_actions mod_cgi mod_include mod_dir mod_get mod_head mod_log mod_disk_log # ServerAdmin: Your address, where problems with the server should be # e-mailed. ServerAdmin jocke@REDACTED # ServerRoot: The directory the server's config, error, and log files # are kept in ServerRoot /tmp/erlang-http # ErrorLog: The location of the error log file. If this does not start # with /, ServerRoot is prepended to it. ErrorLog logs/error_log # TransferLog: The location of the transfer log file. If this does not # start with /, ServerRoot is prepended to it. TransferLog logs/access_log # SecurityLog: The location of the security log file (mod_security required) # SecurityLog logs/security_log # ErrorDiskLog: The location of the error log file. If this does not # start with /, ServerRoot is prepended to it. This log file is managed # with the disk_log module [See disk_log(3)]. The ErrorDiskLogSize directive # takes two argument, i.e. MaxBytes and MaxFiles. The wrap log writes at most # MaxBytes bytes on each file, and it uses MaxFiles files before it wraps, and # truncates the first file. ErrorDiskLog logs/error_disk_log ErrorDiskLogSize 200000 10 # TransferDiskLog: The location of the transfer log file. If this does not # start with /, ServerRoot is prepended to it. This log file is managed # with the disk_log module [See disk_log(3)]. The TransferDiskLogSize directive # takes two argument, i.e. MaxBytes and MaxFiles. The wrap log writes at most # MaxBytes bytes on each file, and it uses MaxFiles files before it wraps, and # truncates the first file. TransferDiskLog logs/access_disk_log TransferDiskLogSize 200000 10 # SecurityDiskLog: The location of the security log file. If this does not # start with /, ServerRoot is prepended to it. This log file is managed # with the disk_log module [See disk_log(3)]. The SecurityDiskLogSize directive # takes two argument, i.e. MaxBytes and MaxFiles. The wrap log writes at most # MaxBytes bytes on each file, and it uses MaxFiles files before it wraps, and # truncates the first file. SecurityDiskLog logs/security_disk_log SecurityDiskLogSize 200000 10 # Limit on total number of servers running, i.e., limit on the number # of clients who can simultaneously connect --- if this limit is ever # reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW. # It is intended mainly as a brake to keep a runaway server from taking # the server with it as it spirals down... MaxClients 50 # KeepAlive sets the maximum number of requests per connection. KeepAlive requests # are used to lower network latency for HTTP. Please note that the implementation # in the INETS webserver is experimental, and does not yet function correctly. #KeepAlive 5 # KeepAliveTimeout sets the number of seconds before an open KeepAlive connection # times out and closes. #KeepAliveTimeout 10 # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. DocumentRoot /tmp/erlang-http/htdoc # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. DirectoryIndex index.html welcome.html # DefaultType is the default MIME type for documents which the server # cannot find the type of from filename extensions. DefaultType text/plain # Aliases: Add here as many aliases as you need (with no limit). The format is # Alias fakename realname #Alias /icons/ /var/tmp/server_root/icons/ #Alias /pics/ /var/tmp/server_root/icons/ From tobbe@REDACTED Mon Jun 21 02:34:36 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Mon, 21 Jun 1999 10:34:36 +1000 Subject: starting http server In-Reply-To: <199906192233.RAA12124@karma.uchicago.edu> References: <199906192233.RAA12124@karma.uchicago.edu> Message-ID: <199906210034.KAA01145@campari.serc.rmit.edu.au> > I'm trying to start the http server from the inets distribution, but > haven't been successful. I got it to work (almost) right away. Here are a couple of things you could try. 1. In the inets.config file. Make syre you insert a newline after: [{inets, [{services,[{httpd,"/tmp/erlang-http/conf/httpd.conf"}]}]}]. The Erlang parser is a bit picky.... 2. I had to create a 'logs' directory under my ServerRoot dir. 3. I also removed some of the modules. I include my inets.config file and conf/httpd.conf file below. 4. Copy a HTML page from somewhere else to /htdocs/index.html (So that you can test if you get something back) 5. To get some more info printed at start up. Start Erlang like this: erl -boot start_sasl -config ./inets 6. When you point your browser towards your Web server, don't forget to specify the port number you have specified, e.g: http://10.0.0.1:8888 7. Watch if you get something in the logs/access_log file, e.g: tail -f logs/access_log Cheers /Tobbe ---------------- /inets.config ---------------- [{inets, [{services, [{httpd,"/usr/home/tobbe/test/conf/httpd.conf"}]}]}]. ----------------------------------------------------------- -------------- /conf/httpd.conf --------------- # Port: The port the standalone listens to. For ports < 1023, you will # need httpd to be run as root initially. Port 8888 # ServerName allows you to set a host name which is sent back to clients for # your server if it's different than the one the program would get (i.e. use # "www" instead of the host's real name). # # Note: You cannot just invent host names and hope they work. The name you # define here must be a valid DNS name for your host. If you don't understand # this, ask your network administrator. ServerName campari.serc.rmit.edu.au # SocketType is either ip_comm, sockets or ssl. SocketType ip_comm # Modules: Server run-time plug-in modules written using the Erlang # Web Server API (EWSAPI). The server API make it easy to add functionality # to the server. Read more about EWSAPI in the Reference Manual. # WARNING! Do not tamper with this directive unless you are familiar with # EWSAPI. Modules mod_alias mod_auth mod_esi mod_actions mod_dir mod_get mod_head mod_log mod_disk_log # ServerAdmin: Your address, where problems with the server should be # e-mailed. ServerAdmin tobbe@REDACTED # ServerRoot: The directory the server's config, error, and log files # are kept in ServerRoot /usr/home/tobbe/test # ErrorLog: The location of the error log file. If this does not start # with /, ServerRoot is prepended to it. ErrorLog logs/error_log # TransferLog: The location of the transfer log file. If this does not # start with /, ServerRoot is prepended to it. TransferLog logs/access_log # SecurityLog: The location of the security log file (mod_security required) # SecurityLog logs/security_log # ErrorDiskLog: The location of the error log file. If this does not # start with /, ServerRoot is prepended to it. This log file is managed # with the disk_log module [See disk_log(3)]. The ErrorDiskLogSize directive # takes two argument, i.e. MaxBytes and MaxFiles. The wrap log writes at most # MaxBytes bytes on each file, and it uses MaxFiles files before it wraps, and # truncates the first file. ErrorDiskLog logs/error_disk_log ErrorDiskLogSize 200000 10 # TransferDiskLog: The location of the transfer log file. If this does not # start with /, ServerRoot is prepended to it. This log file is managed # with the disk_log module [See disk_log(3)]. The TransferDiskLogSize directive # takes two argument, i.e. MaxBytes and MaxFiles. The wrap log writes at most # MaxBytes bytes on each file, and it uses MaxFiles files before it wraps, and # truncates the first file. TransferDiskLog logs/access_disk_log TransferDiskLogSize 200000 10 # SecurityDiskLog: The location of the security log file. If this does not # start with /, ServerRoot is prepended to it. This log file is managed # with the disk_log module [See disk_log(3)]. The SecurityDiskLogSize directive # takes two argument, i.e. MaxBytes and MaxFiles. The wrap log writes at most # MaxBytes bytes on each file, and it uses MaxFiles files before it wraps, and # truncates the first file. SecurityDiskLog logs/security_disk_log SecurityDiskLogSize 200000 10 # Limit on total number of servers running, i.e., limit on the number # of clients who can simultaneously connect --- if this limit is ever # reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW. # It is intended mainly as a brake to keep a runaway server from taking # the server with it as it spirals down... MaxClients 50 # KeepAlive sets the maximum number of requests per connection. KeepAlive requests # are used to lower network latency for HTTP. Please note that the implementation # in the INETS webserver is experimental, and does not yet function correctly. #KeepAlive 5 # KeepAliveTimeout sets the number of seconds before an open KeepAlive connection # times out and closes. #KeepAliveTimeout 10 # DocumentRoot: The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. DocumentRoot /usr/home/tobbe/test/htdocs # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. DirectoryIndex index.html welcome.html # DefaultType is the default MIME type for documents which the server # cannot find the type of from filename extensions. DefaultType text/plain # Aliases: Add here as many aliases as you need (with no limit). The format is # Alias fakename realname Alias /icons/ /usr/home/tobbe/testicons/ Alias /pics/ /usr/home/tobbe/test/icons/ # ScriptAlias: This controls which directories contain server scripts. # Format: ScriptAlias fakename realname ScriptAlias /cgi-bin/ /usr/home/tobbe/test/cgi-bin/ ScriptAlias /htbin/ /usr/home/tobbe/test/cgi-bin/ # This directive adds an action, which will activate cgi-script when a # file is requested using the method of method, which can be one of # GET, POST and HEAD. It sends the URL and file path of the requested # document using the standard CGI PATH_INFO and PATH_TRANSLATED # environment variables. #Script HEAD /cgi-bin/printenv.sh # This directive adds an action, which will activate cgi-script when a # file of content type mime-type is requested. It sends the URL and # file path of the requested document using the standard CGI PATH_INFO # and PATH_TRANSLATED environment variables. #Action image/gif /cgi-bin/printenv.sh # ErlScriptAlias: This specifies how "Erl" server scripts are called. # Format: ErlScriptAlias fakename realname allowed_modules ErlScriptAlias /down/erl httpd_example io # EvalScriptAlias: This specifies how "Eval" server scripts are called. # Format: EvalScriptAlias fakename realname allowed_modules EvalScriptAlias /eval httpd_example io # Point SSLCertificateFile at a PEM encoded certificate. #SSLCertificateFile /var/tmp/server_root/ssl/ssl_server.pem # If the key is not combined with the certificate, use this directive to # point at the key file. #SSLCertificateKeyFile /var/tmp/server_root/ssl/ssl_server.pem # Set SSLVerifyClient to: # 0 if no certicate is required # 1 if the client may present a valid certificate # 2 if the client must present a valid certificate # 3 if the client may present a valid certificate but it is not required to # have a valid CA #SSLVerifyClient 0 # Each directory to which INETS has access, can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). --------------------------------------------------------------------- From lyn@REDACTED Sun Jun 20 20:17:10 1999 From: lyn@REDACTED (lyn) Date: Sun, 20 Jun 1999 13:17:10 -0500 Subject: compiler history Message-ID: <199906201817.NAA13253@karma.uchicago.edu> just curious: how was the erlang compiler bootstrapped? -Lyn From lyn@REDACTED Sun Jun 20 22:41:46 1999 From: lyn@REDACTED (lyn) Date: Sun, 20 Jun 1999 15:41:46 -0500 Subject: web server Message-ID: <199906202041.PAA13487@karma.uchicago.edu> hi, Looking through the inets code, It seems to me that the web server is single threaded. The only spawns I saw were for the listen socket. I'm wrong, right? If not, what was the reason for this design decision? -Lyn From icimjs@REDACTED Mon Jun 21 02:30:00 1999 From: icimjs@REDACTED (Elan) Date: Sun, 20 Jun 1999 17:30:00 -0700 Subject: Dynamic Mnesia Queries. In-Reply-To: <376A0340.383DB31C@etx.ericsson.se> References: <3.0.5.32.19990617234322.00b24ea0@pop.loop.com> Message-ID: <3.0.5.32.19990620173000.00b61030@pop.loop.com> Ulf wrote: >Take the following code for example >(written in all haste, apologies): > Thanks, Ulf. May have been written in all haste, but it certainly compiles and does does everything I need it to. Still, I think it should be possible to do something like this using Mnemosyne. Does anyone know how Menomsyne could be used to do something similar? Elan ==================================== Get your copy of FaxForward http://www.commercebox.com/FaxForward/ From john@REDACTED Mon Jun 21 03:18:47 1999 From: john@REDACTED (John Totten) Date: Sun, 20 Jun 1999 17:18:47 -0800 Subject: JINI Message-ID: <376D92F7.D878053E@totten.com> In a world of pluggable JINI internet devices and of Internet Directory Services, Erlang has much to offer - but I wonder how it would cope with the intermittent connections that are inherent in real world applications? Or looking at the problem the other way around, can a supervisor have an intermittent connection with a distributed node without breaking the 'concurrent' paradigm embedded in the concepts of gen_server, gen_event gen_error and gen_fsm ? The Eddie group may be best placed to answer this but I don't see any reference to this in their archives. John Totten From hakan@REDACTED Mon Jun 21 15:14:28 1999 From: hakan@REDACTED (Hakan Mattsson) Date: Mon, 21 Jun 1999 15:14:28 +0200 (MET DST) Subject: Dynamic Mnesia Queries. In-Reply-To: <3.0.5.32.19990620173000.00b61030@pop.loop.com> Message-ID: On Sun, 20 Jun 1999, Elan wrote: Elan> Still, I think it should be possible to do something like this using Elan> Mnemosyne. Elan> Elan> Does anyone know how Menomsyne could be used to do something similar? There is an UNSUPPORTED function in the API that takes a Mnemosyne query as a string and converts it into a Mnemosyne query handle: Q = mnemosyne:string_to_handle( "query [ X || X <- table(q),Y <- table(r),X.b = Y.f1] end. "), mnesia:transaction(fun() -> mnemosyne:eval(Q) end). It may still work, but perhaps it is too limited to be useful for you. There also exists an experimental SQL compiler that generates the internal form of Mnemosyne from SQL. This work was performed as a master thesis. /H?kan From joe@REDACTED Mon Jun 21 17:14:50 1999 From: joe@REDACTED (Joe Armstrong) Date: Mon, 21 Jun 1999 11:14:50 -0400 Subject: compiler history References: <199906201817.NAA13253@karma.uchicago.edu> Message-ID: <376E56EA.CFDC5DDD@bluetail.com> lyn wrote: > just curious: how was the erlang compiler bootstrapped? > First I designed an abstract machine to execute Erlang ( this was called the JAM machine. (JAM = Joes Abstract machine) - Then I wrote a compiler from Erlang -> Jam + an emulator to see if the machine worked. Both these were written in prolog. At the same time Mike williams wrote a C emulator for the JAM. Then I rewrote the erlang -> jam compiler in Erlang and used the prolog compiler to compile it. The resultant object code was run in the C emulator. Then we threw away prolog. Some of this is described in: http://www.ericsson.se/cslab/erlang/publications/prac_appl_prolog.ps /Joe From luke@REDACTED Mon Jun 21 15:48:29 1999 From: luke@REDACTED (Luke Gorrie) Date: 21 Jun 1999 23:48:29 +1000 Subject: gen_server communication conventions Message-ID: <87emj57jgy.fsf@baked.vegetable.org> Hi again all, I've got another question regarding gen_server. This time, my server doesn't seem to quite fit the gen_server mould. I want to make synchronous invocations from clients, but I'd like the server to be able to defer responding beyond the scope of the call resulting from gen_server:call(). This seems simple enough to implement: I have the client make a 'cast' to the server which includes the client pid; the client blocks on a receive for a response; the server later, based on some event or other, sends the response directly to the client process; the client returns with the result. My question is: Is that a "good" way, or can it and should it be managed instead through a standard behaviour somehow? I can't really see how it could be mapped onto straight gen_server calls. I'm not familiar with what magic goes on inside gen_server, and I just want to make sure I wouldn't be disabling some of the features associated with the gen_server behaviour by doing this. Thanks! Luke From ulf.wiger@REDACTED Mon Jun 21 16:13:31 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Mon, 21 Jun 1999 16:13:31 +0200 Subject: gen_server communication conventions References: <87emj57jgy.fsf@baked.vegetable.org> Message-ID: <376E488B.CD3CAF61@etx.ericsson.se> You should use gen_server:call(Server, Request) on the client side, and then, on the server side (an example): handle_call(Req, From, State) -> Pid = spawn_worker(... Req), NewState = queue_request(From, Pid, State), {noreply, NewState}; ... handle_info({result, Pid, Result}, State) -> {From, NewState} = extract_request(Pid, State), gen_server:reply(From, Result), {noreply, NewState}. I hope this was reasonably clear. The trick is that you return {noreply, NewState} instead of {reply, Reply, NewState}, and then use gen_server:reply(From, Reply) at some later stage. Actually, in the next release of OTP (also in the current commercial release), the gen_server client side monitors the server process (using a one-way monitor function), and will EXIT immediately if the server terminates. This is a big improvement over the previous implementation (where you had to wait for a timeout). With your solution, you'd bypass that functionality, and would have to implement your own monitor or timeout watch. /Uffe Luke Gorrie wrote: > > Hi again all, > > I've got another question regarding gen_server. This time, my server > doesn't seem to quite fit the gen_server mould. I want to make > synchronous invocations from clients, but I'd like the server to be > able to defer responding beyond the scope of the call resulting from > gen_server:call(). This seems simple enough to implement: I have the > client make a 'cast' to the server which includes the client pid; the > client blocks on a receive for a response; the server later, based on > some event or other, sends the response directly to the client > process; the client returns with the result. > > My question is: Is that a "good" way, or can it and should it be > managed instead through a standard behaviour somehow? I can't really > see how it could be mapped onto straight gen_server calls. I'm not > familiar with what magic goes on inside gen_server, and I just want to > make sure I wouldn't be disabling some of the features associated with > the gen_server behaviour by doing this. > > Thanks! > Luke -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From jhague@REDACTED Mon Jun 21 16:29:23 1999 From: jhague@REDACTED (James Hague) Date: Mon, 21 Jun 1999 09:29:23 -0500 (CDT) Subject: compiler history In-Reply-To: <376E56EA.CFDC5DDD@bluetail.com> Message-ID: On Mon, 21 Jun 1999, Joe Armstrong wrote: > > JAM machine. (JAM = Joes Abstract machine) I didn't realize that. Ah, trivia :) On a related note, what is "VEE"? One of the Erlang docs refers to JAM, BEAM, and VEE. James From tobbe@REDACTED Tue Jun 22 02:49:13 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Tue, 22 Jun 1999 10:49:13 +1000 Subject: compiler history In-Reply-To: References: Message-ID: <199906220049.KAA04308@campari.serc.rmit.edu.au> > On a related note, what is "VEE"? One of the Erlang docs refers to JAM, > BEAM, and VEE. VEE = Virdings Erlang Engine BEAM = Bogdans Erlang Abstract Machine (Virding == Robert Virding) (Bogdan == Bogumil Hausman) /Tobbe From icimjs@REDACTED Mon Jun 21 19:19:10 1999 From: icimjs@REDACTED (Elan) Date: Mon, 21 Jun 1999 10:19:10 -0700 Subject: Dynamic Mnesia Queries. In-Reply-To: References: <3.0.5.32.19990620173000.00b61030@pop.loop.com> Message-ID: <3.0.5.32.19990621101910.00b726e0@pop.loop.com> /H?kan wrote: >There is an UNSUPPORTED function in the API that takes a Mnemosyne >query as a string and converts it into a Mnemosyne query handle: > > Q = mnemosyne:string_to_handle( > "query [ X || X <- table(q),Y <- table(r),X.b = Y.f1] end. "), > mnesia:transaction(fun() -> mnemosyne:eval(Q) end). > >It may still work, but perhaps it is too limited to be useful for you. > Actually, this looks very interesting. I will be testing it later. Since we do have access to the source code (thanks to the OpenSource policy), it could become at least locally supported (right here ;-). >There also exists an experimental SQL compiler that generates the >internal form of Mnemosyne from SQL. This work was performed as a >master thesis. Very interesting. Is there more information available? (A URL perhaps, or an email address?) Elan ==================================== Get your copy of FaxForward http://www.commercebox.com/FaxForward/ From klacke@REDACTED Mon Jun 21 23:02:45 1999 From: klacke@REDACTED (Claes Wikstrom) Date: Mon, 21 Jun 1999 23:02:45 +0200 Subject: JINI In-Reply-To: <376D92F7.D878053E@totten.com> (message from John Totten on Sun, 20 Jun 1999 17:18:47 -0800) References: <376D92F7.D878053E@totten.com> Message-ID: <199906212102.XAA00552@kaja.bluetail.com> > > > In a world of pluggable JINI internet devices and of > Internet Directory Services, Erlang has much to offer - > but I wonder how it would cope with the intermittent > connections that are inherent in real world > applications? > Or looking at the problem the other way around, can a > supervisor have an intermittent connection with a > distributed node without breaking the 'concurrent' > paradigm embedded in the concepts of gen_server, > gen_event gen_error and gen_fsm ? At the language level, nodes are either connected or not. Connected here means (assuming tcp/ip) that an active tcp/ip socket is existing betwen the two nodes and that data can be sent and received on the socket. If the apps don't send any data, the erlang distribution impl will send heartbeats to the other connected nodes. This means that intermittent connections as you mention above, can not be dealt with in a transparent manner. At least not at the language level. The gen_* servers simply use the basic language mechanisnms to implement what they do. No rocket science at all. In order to deal with intermittent connections we would have to do something horrible with the dist implementation. However, writing an *application* that deals with intermittent connections is indeed possible, albeit complicated. Hence the conclusion is that using distributed Erlang in a WAN is indeed possible, but it's probably not wise to have a mnesia table with one replica in Australia and the other in Moscow. Another thing to shun in WAN based distributed erlang applications is the use of global.erl /klacke From klacke@REDACTED Mon Jun 21 23:23:47 1999 From: klacke@REDACTED (Claes Wikstrom) Date: Mon, 21 Jun 1999 23:23:47 +0200 Subject: web server In-Reply-To: <199906202041.PAA13487@karma.uchicago.edu> (message from lyn on Sun, 20 Jun 1999 15:41:46 -0500) References: <199906202041.PAA13487@karma.uchicago.edu> Message-ID: <199906212123.XAA00587@kaja.bluetail.com> > > hi, > > Looking through the inets code, It seems to me that the web server is > single threaded. The only spawns I saw were for the listen socket. > I'm wrong, right? It's multithreaded allright, Looking at the code in httpd_listener.erl I see the following sequence of events. - First a connection/4 is spawned in init/1 - A soon as as this process has accepted a socket, it cast's a {create ... message to the server, which immediately spawns a new connction/4 process. Thus unless the number of active processes/socket go over some config number there will always be one and exactly one erlang process ready to accept the next socket. The exception being the short interval between one call to accept and the next, but there the kernel will buffer the incoming connection request. /klacke From hakan@REDACTED Tue Jun 22 16:06:53 1999 From: hakan@REDACTED (Hakan Mattsson) Date: Tue, 22 Jun 1999 16:06:53 +0200 (MET DST) Subject: Dynamic Mnesia Queries. In-Reply-To: <3.0.5.32.19990621101910.00b726e0@pop.loop.com> Message-ID: On Mon, 21 Jun 1999, Elan wrote: >>There also exists an experimental SQL compiler that generates the >>internal form of Mnemosyne from SQL. This work was performed as a >>master thesis. > >Very interesting. Is there more information available? (A URL perhaps, or >an email address?) A good starting point is to read Ronny Andersson's master thesis report. It is available at: http://www.erlang.se/erlang/sure/main/club/university/xjobb/sql_compiler_report.pdf It was an experimental work where a complete SQL parser was implemented in Erlang using yecc, but only a minor subset of SQL was mapped to Mnesia and Mnemosyne. I can dig up the code, but I don't think that it works today. /H?kan From tobbe@REDACTED Wed Jun 23 11:55:49 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Wed, 23 Jun 1999 19:55:49 +1000 Subject: config problems In-Reply-To: <199906222243.IAA16452@universe.serc.rmit.edu.au> References: <199906222243.IAA16452@universe.serc.rmit.edu.au> Message-ID: <199906230955.TAA01436@campari.serc.rmit.edu.au> FROM: pate@REDACTED (Pat Eyler) > hello all, I've just downloaded the source (erlang+patches and eddie) > onto a mips based linux box (a cobalt RAQ). Building and installing the > erlang seems to go well, although the first patch doesn't seem to install > completely. When I try to configure eddie, I get the following: FROM: maurice@REDACTED > Linux MIPS is not a supported platform for Eddie ... Actually, I don't think Erlang itself has been ported to the MIPS. I'll cross-post this to erlang-questions@REDACTED mailing list to see if someone has got Erlang to work on the MIPS. So, Erlang on MIPS anyone ? /Tobbe From bjarne@REDACTED Thu Jun 24 11:57:16 1999 From: bjarne@REDACTED (Bjarne Däcker) Date: Thu, 24 Jun 1999 11:57:16 +0200 (MET DST) Subject: Fifth International Erlang/OTP Users Conference Message-ID: <199906240957.LAA03564@super.du.etx.ericsson.se> Hi You are all invited to the Fifth International Erlang/OTP User Conference (EUC) which will be held in Stockholm on September 30. This will be the first EUC since Erlang was released 'open source'. You will find the complete invitation at http://www.erlang.org/ Hope to see you all then! Bjarne D?cker Computer Science Laboratory Ericsson Utvecklings AB From mikl@REDACTED Thu Jun 24 17:22:47 1999 From: mikl@REDACTED (Mickael Remond) Date: Thu, 24 Jun 1999 08:22:47 -0700 Subject: record_info/2 Message-ID: <19990624082247.A6849@louxor.home> Hi, I get a compile time error message when trying to use record_info/2 outside of the 'mnesia:create_table' context. The error message is : illegal record info What I am trying to do is get the list of fields of an object : (The aim of the function is to replace a fields value by its name, without specifically knowing what kind of record I am manipulating) replace(Attr,Value, Obj) -> %% Get record_name from Object Record_name = element(1,Obj), %% Get list of fields List = record_info(fields, Record_name), %% Get attribute position %% +1 because of the table name at first position Pos = pos(Attr,List) + 1, case Pos of 0 -> {error, attribute_does_not_exist_in_record}; N -> Result = setelement(Pos, Obj, Value), {ok,Result} end. Can you figure out what I am doing wrong or what I am misunderstanding ? Thanks in advance for your help. -- Mickael Remond mikl@REDACTED ICQ : 2265396 From tobbe@REDACTED Thu Jun 24 21:05:53 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Fri, 25 Jun 1999 05:05:53 +1000 Subject: record_info/2 In-Reply-To: <19990624082247.A6849@louxor.home> References: <19990624082247.A6849@louxor.home> Message-ID: <199906241905.FAA25724@universe.serc.rmit.edu.au> > What I am trying to do is get the list of fields of an object : > (The aim of the function is to replace a fields value by its name, > without specifically knowing what kind of record I am manipulating) > Record_name = element(1,Obj), > %% Get list of fields > List = record_info(fields, Record_name), record_info/2 is resolved at compile time, so you can't do the above (Remember, records is just syntactic sugar on top of tuples) /Tobbe From rao@REDACTED Mon Jun 28 07:46:12 1999 From: rao@REDACTED (Rao) Date: Mon, 28 Jun 1999 13:46:12 +0800 Subject: Q Message-ID: <01BEC16C.961F1240@Rao> Hello tehre, This is Rao. I have doubt. What Exactly Erlang in Callcenter perspective. thanks in advance From hakan@REDACTED Mon Jun 28 07:51:23 1999 From: hakan@REDACTED (Hakan Mattsson) Date: Mon, 28 Jun 1999 07:51:23 +0200 (MET DST) Subject: record_info/2 In-Reply-To: <199906241905.FAA25724@universe.serc.rmit.edu.au> Message-ID: On Fri, 25 Jun 1999, Torbjorn Tornkvist wrote: >Date: Fri, 25 Jun 1999 05:05:53 +1000 >From: Torbjorn Tornkvist >To: Mickael Remond >Cc: erlang-questions@REDACTED >Subject: Re: record_info/2 > > >> What I am trying to do is get the list of fields of an object : >> (The aim of the function is to replace a fields value by its name, >> without specifically knowing what kind of record I am manipulating) > >> Record_name = element(1,Obj), >> %% Get list of fields >> List = record_info(fields, Record_name), > >record_info/2 is resolved at compile time, so you can't do the above >(Remember, records is just syntactic sugar on top of tuples) If the table happens to be a Mnesia table, you may use the function mnesia:table_info/2 instead of record_info/2: . . TableName = element(1, Obj), FieldList = mnesia:table_info(TableName, attributes), . . mnesia:table_info/2 is resolved in run time. /H?kan From ingela@REDACTED Mon Jun 28 10:49:50 1999 From: ingela@REDACTED (Ingela Anderton) Date: Mon, 28 Jun 1999 10:49:50 +0200 (MET DST) Subject: Open Source Erlang Message-ID: <199906280849.KAA24570@erlang.ericsson.se> Hej! Mitt projekt vill g? ?ver till Open Source varianten av Erlang/OTP p? grund av ekonomiska sk?l. Jag har f?rs?kt leta p? www.erlang.org f?r att bli klok p? om vi ?r beroende av n?gon del som inte ing?r i Open Source. Dock blir jag inte riktigt klok p? detta. T.ex finns dokumentation f?r JIVE och IG med p? open source sidorna som, Magnus Karlsson p?st?r i ett mail till min projektledare inte finns med i Open Source. Finns det n?gon lista p? vad som inte ing?r i Open Source? Eller hur kan jag f? reda p? vad som skiljer? -- /m.v.h Ingela //The highway of life is always under construction. // |\ _,,,--,,_ ,) /,`.-'`' -, ;-;;' |,4- ) )-,_ ) /\ '---''(_/--' (_/-' Ericsson Utvecklings AB Phone : +46 8 719 18 13 Open Systems (f.d. Erlang Systems) Cellular/Mobile: +46 70 636 78 68 Torshamnsgatan 39 B Box 1214 http://www.erlang.se S-164 28 KISTA, SWEDEN ingela@REDACTED From froejk@REDACTED Mon Jun 28 21:05:13 1999 From: froejk@REDACTED (Joergen Froejk Kjaersgaard) Date: Mon, 28 Jun 1999 21:05:13 +0200 Subject: Problem with IG Message-ID: <3777C769.EAB5A5F1@image.dk> I'm trying to use IG to make an interface from Erlang to the Postgres database system on Linux. In doing that I ran into a problem with passing empty strings. This simple example program from the manual: IG_fun int foo(IG_string name, int age) { fprintf(stderr, "foo: name='%s', age=%d\n", "name", age); return age; } yields this: jfk@REDACTED:~/erlang-test > erl Eshell V47.4.1 (abort with ^G) 1> P=ex1:start(). <0.37.0> 2> ex1:foo(P,"",30). erl_malloc: Failed to allocate more memory: Success however, the following succeeds: jfk@REDACTED:~/erlang-test > erl Eshell V47.4.1 (abort with ^G) 1> P=ex1:start(). <0.29.0> 2> ex1:foo(P,"jfk",27). foo: name='name', age=27 {ok,27} 3> Is this a known bug in IG, or??? regards, J?rgen -- J?rgen Fr?jk Kj?rsgaard Systemkonsulent (Systems Consultant) Informaticon ApS, N?rrev?nget 143, DK-8310 Tranbjerg J. From klacke@REDACTED Tue Jun 29 00:01:37 1999 From: klacke@REDACTED (Claes Wikstrom) Date: Tue, 29 Jun 1999 00:01:37 +0200 Subject: Open Source Erlang In-Reply-To: <199906280849.KAA24570@erlang.ericsson.se> (message from Ingela Anderton on Mon, 28 Jun 1999 10:49:50 +0200 (MET DST)) References: <199906280849.KAA24570@erlang.ericsson.se> Message-ID: <199906282201.AAA00552@kaja.bluetail.com> > > Mitt projekt vill g? ?ver till Open Source varianten av Erlang/OTP p? > grund av ekonomiska sk?l. Jag har f?rs?kt leta p? www.erlang.org f?r > att bli klok p? om vi ?r beroende av n?gon del som inte ing?r i Open > Source. Dock blir jag inte riktigt klok p? detta. T.ex finns > dokumentation f?r JIVE och IG med p? open source sidorna som, Magnus > Karlsson p?st?r i ett mail till min projektledare inte finns med i > Open Source. Finns det n?gon lista p? vad som inte ing?r i Open > Source? Eller hur kan jag f? reda p? vad som skiljer? Wrong language, but the question was what's the difference between OSE and the stuff that's run by the Ericsson projects in OTP. As I was one of the people that worked real hard this spring with the assembly of OSE I can say what we left out and as far as I can recall the only thing we dropped was the ssl (seecure socket layer) libs which was a horrible hack anyway. The reason for this was that some of the bosses thought that maybe there were some legal implications involved there and we thought that the ssl libs were a very suitable bone to throw at the suits, see we're not releasing everything, we keep some of the stuff :-) As for Jive which is another horrible hack, there can't be much problems in using jive as is, since the code is small and easy to understand. Both jive and IG are released in the OSE release, now whether they are going to be supported or not is a whole different ballgame, as for IG I know that Magnus K and Co: have been planning to get rid of IG for quite some time now, however we need suitable replacement released first, So, pick up the tar ball and just see what you find there. /klacke From klacke@REDACTED Tue Jun 29 00:07:42 1999 From: klacke@REDACTED (Claes Wikstrom) Date: Tue, 29 Jun 1999 00:07:42 +0200 Subject: Open Source Erlang In-Reply-To: <199906282201.AAA00552@kaja.bluetail.com> (message from Claes Wikstrom on Tue, 29 Jun 1999 00:01:37 +0200) References: <199906280849.KAA24570@erlang.ericsson.se> <199906282201.AAA00552@kaja.bluetail.com> Message-ID: <199906282207.AAA00580@kaja.bluetail.com> > the assembly of OSE I can say what we left out and as far as I > can recall the only thing we dropped was the ssl (seecure socket No I recall one more thing, For many years we've had a GUI in erlang which is direct interface to X Athena widgets. It's been called pxw and has been in use since ... maybe 1992. Anyway, we choose not to relase that since it only ran on unixes. The gs ain't that great either, it's slow and ugly, but it does run on unices+win32. So does etk, which a lot better than gs, but doesn;t have many applications yet. In particular we need need to port the debugger to etk. Phuu boring work. /klacke From lyn@REDACTED Tue Jun 29 01:14:52 1999 From: lyn@REDACTED (Lyn A Headley) Date: Mon, 28 Jun 1999 18:14:52 -0500 Subject: Visibility of Erlang Message-ID: <199906282314.SAA00295@karma.uchicago.edu> I just posted this to comp.lang.functional, but I suspect most of you will have opinions about this (sensitive) topic. I am sorry if I sound harsh, but please remember this is coming from someone who loves erlang and wants to see it succeed. mike@REDACTED (Mike Williams) writes: > 3. We (Ericsson) have used the functional programming language Erlang > with great success to build a large number of switching systems, call > centres, test equipment etc. I.e. millions of lines of code. The > people specifying these systems have never considered that they are > implemented in a functional language > Erlang is the most underappreciated technology I have ever seen. I dove in about 2 months ago and have felt nothing but glee and awe throughout the learning experience. I salivate when I think what a wonderful world it would be if people had any notion of what the language, and more importantly the environment and libraries could be used for. For instance, I just want to cry when I think of how many people are using PHP3 + (database) when something like erlang + mnesia is available. It's not that e + m should *always* be chosen, it's just that they've never heard of it! And I'm afraid they never will. Which brings me to my own personal moan: I believe ericsson is failing miserably in promoting the environment. The web site is stagnant, we have no idea how development is progressing, there is no public cvs mirror, development goes on behind closed doors, and nobody sends announcements to the open source community. Why hasn't erlang been trumpeted to slashdot, linux weekly news, elj.com, etc? If ericsson would just hire *one* person to promote openness in the erlang community, erlang could catch like wildfire. Look at zope.org for an example of how corporate-backed open source *should* be done. The stated reason for open-sourcing erlang was to encourage its spread outside of ericsson. I don't understand why they leapt such a huge chasm only to sit down on the nearest stump. -Lyn From jhague@REDACTED Tue Jun 29 03:54:26 1999 From: jhague@REDACTED (James Hague) Date: Mon, 28 Jun 99 20:54:26 -0500 Subject: Visibility of Erlang Message-ID: <199906281557.KAA32713@babba.advancenet.net> >Erlang is the most underappreciated technology I have ever seen. I >dove in about 2 months ago and have felt nothing but glee and awe >throughout the learning experience. I agree. Erlang is wonderful. >Which brings me to my own personal moan: I believe ericsson is failing >miserably in promoting the environment. I think Ericsson has done something wonderful to promote Erlang: they've actually written real commercial applications using it. This is rarely true of other newfangled languages you run across on the web. Specifically trying to market a language to people doesn't work (well, okay, there's Java, so sometimes it works :) You can shout all you want about the benefits of Erlang, but most programmers will shrug and say "It's not like C++" or "But that's not what I get paid to work with." >The web site is stagnant, we >have no idea how development is progressing, there is no public cvs >mirror, development goes on behind closed doors, and nobody sends >announcements to the open source community. Some points: 1. Erlang isn't a typical open source system. It wasn't released as open source until it had already been a mature product for a number of years. It doesn't need weekly updates. 2. As such, it is difficult for outsiders to jump in and make changes to the core Erlang system. I'd argue that this isn't needed, as Ericsson is already actively maintaining the language and implementations. The only real problem is that the current open source version is more than a bit behind Ericsson's internal releases. I've been told that this will be rememdied later this year. >Why hasn't erlang been >trumpeted to slashdot, linux weekly news, elj.com, etc? Actually, I sent something to slashdot about Erlang when it was released in February, but they didn't mention it. To them, I suppose, they didn't see widespread interest in mentioning an oddball functional language used in embedded telephone switches released by a large Swedish corporation :) I remember when I worked at Ericsson I had the darndest time explaining to people what I did during the day! James From eeicmui@REDACTED Tue Jun 29 10:00:52 1999 From: eeicmui@REDACTED (Chandrashekhar) Date: Tue, 29 Jun 1999 09:00:52 +0100 Subject: Visibility of Erlang References: <199906281557.KAA32713@babba.advancenet.net> Message-ID: <37787D34.EE59B5AF@eei.ericsson.se> James Hague wrote: > > >Erlang is the most underappreciated technology I have ever seen. I > >dove in about 2 months ago and have felt nothing but glee and awe > >throughout the learning experience. > > I agree. Erlang is wonderful. I HAVE to second that. I've found Erlang to be far superior to C++ when it comes to the domain of Telecom applications. > >Which brings me to my own personal moan: I believe ericsson is failing > >miserably in promoting the environment. > > I think Ericsson has done something wonderful to promote Erlang: they've > actually written real commercial applications using it. This is rarely > true of other newfangled languages you run across on the web. I feel this is not enough. Marketing is essential, however good the language is. People just dont have want to spend time looking for alternatives...because they dont have the time. Someone has to put it under their nose. Maybe the Bluetail guys can do something about this :) Chandru -- Ericsson Systems Expertise Ltd., Athlone, Ireland. Tel: +353 902 31816 From mk@REDACTED Tue Jun 29 13:58:36 1999 From: mk@REDACTED (Magnus Karlson) Date: Tue, 29 Jun 1999 13:58:36 +0200 (MET DST) Subject: Open Source Erlang In-Reply-To: <199906282201.AAA00552@kaja.bluetail.com> Message-ID: On Tue, 29 Jun 1999, Claes Wikstrom wrote: > As for Jive which > is another horrible hack, there can't be much problems in using > jive as is, since the code is small and easy to understand. > Both jive and IG are released in the OSE release, now whether > they are going to be supported or not is a whole different > ballgame, as for IG I know that Magnus K and Co: have been planning > to get rid of IG for quite some time now, however we need suitable > replacement released first, It must have been a missunderstanding then because they were ment to be left out since the much better replacments do already exists ie IDL communication with the help of the IC (in both version) that gives much better performance than IG and Jive. Correction the Java backend is not released yet (I think) but will be in the next OSE release. /Magnus ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ! Magnus Karlson ! ERICSSON UTVECKLINGS AB ! ! KI/UAB/F/P/MAGNUS KARLSON ! OPEN SYSTEMS ! ! Telefax: +46 8 719 89 40 ! Box 1214, S-164 28 KISTA, SWEDEN ! ! email: mk@REDACTED ! Phone: +46 8 719 92 49 ! ! ///: http://erlang.ericsson.se ! http://www.erlang.se ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~