From ulf.wiger@REDACTED Wed Feb 1 01:25:31 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 1 Feb 2006 01:25:31 +0100 Subject: overview of real-time systems Message-ID: Check this out: Real-Time & Embedded Systems 2005 Uwe R. Zimmer -- The Australian National University http://cs.anu.edu.au/student/comp4330/Lectures/RTES.book.01.pdf This is a tome. It gives a very interesting overview of real-time technology. Too bad it doesn't include Erlang, but it's still quite an interesting read. The emphasis seems to be towards hard real-time, so this may help explain why Erlang is missing. See e.g. chapter 6 (slides 415-541) on synchronization. /Uffe From dgou@REDACTED Wed Feb 1 01:33:18 2006 From: dgou@REDACTED (Douglas Philips) Date: Tue, 31 Jan 2006 19:33:18 -0500 Subject: erlang.org and erlang.se are down! In-Reply-To: References: Message-ID: On 2006 Jan 31, at 7:59 AM, orbitz@REDACTED wrote: > erlang.orgs often downness doesn't help when i tell people how > fault tolerance is an important part of the language:) > > On Jan 31, 2006, at 3:45 AM, Raimo Niskanen wrote: > >> No, you did not miss any outage message; here it is! >> Sorry about the delay. >> >> >> We have had a power outage who's consequenses took down >> the web servers www.erlang.org and www.erlang.se. We are >> currently working on setting up replacement hardware. Raimo, Thanks for the update. If only erlang (or even Apache) could affect the electrical mains! This isn't "The Adolescence of P1" after all. --D'gou From serge@REDACTED Wed Feb 1 07:09:04 2006 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 01 Feb 2006 01:09:04 -0500 Subject: list_to_atom use in kernel/error_logger.erl Message-ID: <43E05080.6070805@hq.idt.net> I was browsing through the kernel/error_logger.erl and the following code caught my attention. Wouldn't the call list_to_atom/1 eventially lead to exhaustion of the atom table? ----kernel/error_logger.erl (line: 288)------------------- display2(Tag,F,A) -> erlang:display({error_logger,Tag, nice(F), nice(A)}). nice(X) when tuple(X) -> nice_tuple(X); nice([]) -> []; nice(L) when list(L) -> case is_string(L) of true -> list_to_atom(L); false -> [H|T] = L, [nice(H) | nice(T)] end; nice(X) -> X. ---------------------------------------------------------- Why does a list need to be converted to atom here? Serge From ulf.wiger@REDACTED Wed Feb 1 09:39:52 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 1 Feb 2006 09:39:52 +0100 Subject: Memoization in Erlang? Message-ID: I'm not going to comment on the general approach, just answer the specific questions. Pete Kazmier wrote: > 1) Writing higher-order functions seems to be complicated > in Erlang because there is no support for varargs. > Thus, in my example, I have this kludge to return an > N-arg closure. Is there a better way of handling this > keeping in mind that the wrapper function > should have the same interface as the memoized one? In this particular case, perhaps apply(Module, Function, Args) would be better than using funs? > 2) In my kludge, I use erlang:fun_info/1 which states that > it is intended for debugging use. Does this preclude > its use in my code? Should I instead just define > memoize1/1, memoize2/1, memoize3/1, etc ... Instead of fun_info/1, you could use the guard function is_function(F, Arity), i.e. if is_function(F, 0) -> fun() -> callit(Pid, []) end; is_function(F, 1) -> fun(A1) -> callit(Pid, [A1]) end; is_function(F, 2) -> ... end. > 3) In lieu of my kludge, I started to wonder if I could > dynamically construct a string of code, then somehow > compile that on the fly, and return the resulting > function to the caller. Is this even possible? It is. Here's an example of how to generate "forms", compiling them, and then loading them into a running system: case generate_bin(Tabs, 1) of {ok, ?MOD, Bin} -> code:purge(?MOD), {module, ?MOD} = code:load_binary(?MOD, OutFile, Bin); {error, Reason} -> erlang:error( {Reason, erlang:get_stacktrace()}) end generate_bin(Tabs, L1) -> [{attribute,_,file,_}|_] = Forms = codegen(Tabs, L1), compile:forms(Forms, [no_warnings]). codegen(Tabs, L1) -> L2 = L1+2, L3 = L2+1, {IndexFun, L4} = codegen_indexes(Tabs, L3+2), {RefsFun, L5} = codegen_references(Tabs, L4+2), {TIFun, L6} = codegen_table_info(Tabs, L5+2), {ModFun, L7} = codegen_module(Tabs, L6+2), {AclFun, L8} = codegen_acl(Tabs, L7+2), {AccessFun, L9} = codegen_access(Tabs, L8+2), {TabFuns, L10} = codegen_tabs(Tabs, L9+2), {TabPropFuns, L11} = codegen_tab_props(Tabs, L10+2), [{attribute,L1, file, {"rdbms_verify_jit.erl",1}}, {attribute,L2, module, rdbms_verify_jit}, {attribute,L3, export, [{validate_rec, 2}, {indexes, 1}, {references, 1}, {acl, 1}, {verify_access, 3}, {module, 1}, {table_info, 2}, {table_property, 2}]} | IndexFun ++ RefsFun ++ TIFun ++ ModFun ++ AclFun ++ AccessFun ++ TabFuns ++ TabPropFuns ++ [{eof, L11+1}]]. codegen_indexes(Tabs, L1) -> {Body, L2} = lists:mapfoldl( fun(Tab, L) -> Indexes = indexes(Tab), {{clause, L, [{atom, L, Tab}], [], [erl_parse:abstract(Indexes, L+1)]}, L+2} end, L1+1, Tabs), {[{function, L1, indexes, 1, Body}], L2}. (I actually don't think one has to bother about getting the line numbers right, but I think it helps if/when your generated code doesn't compile.) Pretty-printing the forms can be done like this: generate_src_file(File, Tabs, L1) -> [{attribute,_,file,_}|_] = Forms = codegen(Tabs, L1), Out = [[erl_pp:form(F), "\n"] || F <- tl(Forms)], You can also generate code using the erl_syntax module. The best way to understand what forms to generate may be to first write a sample program by hand, and compiling it with 'erlc +debug_info ...'. Then, you can fire up an erlang shell and extract the parsed forms using beam_lib:chunks("mymod.beam", [abstract_code]). The output will most likely be truncated. Use e.g. io:format("~p~n", [beam_lib:chunks(...)]). > If so, would it have access to the closed over > variable? Well, when you generate code at runtime, you should be able to solve that problem to your liking. You can also use erl_eval. See e.g. file:script/[1,2]: eval_stream(Fd, Handling, Last, E, Bs) -> eval_stream(io:parse_erl_exprs(Fd, ''), Fd, Handling, Last, E, Bs). eval_stream({ok,Form,EndLine}, Fd, Handling, Last, E, Bs0) -> case catch erl_eval:exprs(Form, Bs0) of {value,V,Bs} -> eval_stream(Fd, Handling, {V}, E, Bs); {'EXIT',Reason} -> eval_stream(Fd, Handling, Last, [{EndLine,?MODULE,Reason}|E], Bs0) end; eval_stream({error,What,_EndLine}, Fd, H, L, E, Bs) -> eval_stream(Fd, H, L, [What | E], Bs); eval_stream({eof,_EndLine}, _Fd, H, Last, E, _Bs) -> case {H, Last, E} of {return, {Val}, []} -> {ok, Val}; {return, undefined, E} -> {error, hd(lists:reverse(E, [{error, undefined_script}]))}; {ignore, _, []} -> ok; {_, _, [_|_] = E} -> {error, hd(lists:reverse(E))} end. (The Bs variable is a list of variable bindings passed to erl_eval.) > 4) Are there better ways to implement memoization > in Erlang? Would using the process dictionary > be a bad idea? My first thought was to store > the cached values in it, and then the whole > thing could be implemented in a single function > without the use of processes. Using the process dictionary in a process that you control altogether is not necessarily a bad idea, but in your example code, I don't think you'd have trouble using e.g. dict.erl and caching the data in a dictionary 'loop variable' instead. Some modules, like 'random' and 'mnesia', use the process dictionary of the current process, so it's not unheard of. I don't think it's a practice that should be encouraged, though. Regards, Ulf Wiger From bjorn@REDACTED Wed Feb 1 09:51:24 2006 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 01 Feb 2006 09:51:24 +0100 Subject: erlang.org and erlang.se are down! In-Reply-To: <43DFD38E.30207@comcast.net> References: <9d8237627b0532107cef37ff0304f1f0@ezabel.com> <43DFD38E.30207@comcast.net> Message-ID: Using Inets or yaws would not have helped in this case, as the problem is that the computer that Apache server runs on no longer boots. To achive robustness, Erlang/OTP is not enough; you'll need redundant/standby hardware too. /Bjorn Ernie Makris writes: > It should be moved to yaws! My vote is in. > > Thanks > Ernie > orbitz@REDACTED wrote: > > *THE* Erlang website not using an Erlang based httpd for it's own > > site? that's even worse! > > > > On Jan 31, 2006, at 8:54 AM, Ulf Wiger ((AL/EAB)) wrote: > > > >> > >> You can tell them that the erlang.org website > >> uses Apache. (: > >> > >> /Uffe > >> > >>> -----Original Message----- > >>> From: owner-erlang-questions@REDACTED > >>> [mailto:owner-erlang-questions@REDACTED] On Behalf Of > >>> orbitz@REDACTED > >>> Sent: den 31 januari 2006 13:59 > >>> To: Raimo Niskanen > >>> Cc: erlang-questions@REDACTED > >>> Subject: Re: erlang.org and erlang.se are down! > >>> > >>> erlang.orgs often downness doesn't help when i tell people > >>> how fault tolerance is an important part of the language:) > >>> > >>> On Jan 31, 2006, at 3:45 AM, Raimo Niskanen wrote: > >>> > >>>> No, you did not miss any outage message; here it is! > >>>> Sorry about the delay. > >>>> > >>>> > >>>> We have had a power outage who's consequenses took down the web > >>>> servers www.erlang.org and www.erlang.se. We are currently > >>> working on > >>>> setting up replacement hardware. > >>>> > >>>> -- > >>>> > >>>> / Raimo Niskanen, Erlang/OTP, Ericsson AB > >>>> > >>> > >>> > >> > > > > > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From vlad_dumitrescu@REDACTED Wed Feb 1 10:00:56 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 1 Feb 2006 10:00:56 +0100 Subject: Memoization in Erlang? In-Reply-To: <87irs0faid.fsf@coco.kazmier.com> Message-ID: Hi! A similar approach to that suggested by Ulf is to use a parse transform. You define a transformation of the code that at takes place at compile time and you can do whatever you like with the code. I have somewhere at home a memoization implementation doing that, I'll look for it. The basic idea is that you write a function as usual, for example ff(X, Y) -> X*Y. You mark the function as memoizable and declare the parse transform to be used -memoize({ff, 2}). -compile({parse_transform, memoize}). The transform makes the compiled code look something like ff(X, Y) -> case memo_db:search({?MODULE, ff, 2, {X, Y}}) of {ok, Value} -> Value; false -> Res = ff_1(X, Y), memo_db:store({?MODULE, ff, 2, {X, Y}}, Res), Res end. ff_1(X, Y) -> X*Y. You are then free to implement memo_db as you like, using ets for example. Writing parse transforms isn't for the weakhearted, however :-) But not so more difficult than "regular" dynamic code generation. Ulf has published here on the list a module that helps a lot, www.erlang.org/ml-archive/erlang-questions/200511/msg00080.html Best regards, Vlad From vlad.xx.dumitrescu@REDACTED Wed Feb 1 10:02:05 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Wed, 1 Feb 2006 10:02:05 +0100 Subject: Memoization in Erlang? Message-ID: <11498CB7D3FCB54897058DE63BE3897C01280628@esealmw105.eemea.ericsson.se> Of course, to look for Ulf's message you'll have to wait for erlang.org to get back again... /Vlad From tobbe@REDACTED Wed Feb 1 10:11:55 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Wed, 01 Feb 2006 10:11:55 +0100 Subject: CRC16 in erlang In-Reply-To: References: Message-ID: Perhaps you also have a CRC-32 implementation too ? I was just reading RFC 3961 where they make use of a modified CRC-32 in the following way: "The CRC-32 checksum used in the des-cbc-crc encryption mode is identical to the 32-bit FCS described in ISO 3309 with two exceptions: The sum with the all-ones polynomial times x**k is omitted, and the final remainder is not ones-complemented." So this modified CRC-32 would be nice to have too.... :-) Cheers, Tobbe From ulf.wiger@REDACTED Wed Feb 1 10:55:04 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 1 Feb 2006 10:55:04 +0100 Subject: erlang.org and erlang.se are down! Message-ID: I have a couple of mails out to different people with links to publications stored at www.erlang.se. The Outage was untimely, to say the least, and as far as I can tell, there are no mirrors for the publications at erlang.se (this includes the EUC presentations.) I also noticed that some of the mirrors are not necessarily kept current. Couldn't there at least be some dynamic DNS service in the middle where we could insert an URL rewrite rule at times when outages are expected to last more than minutes? /Uffe From ulf.wiger@REDACTED Wed Feb 1 11:02:52 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 1 Feb 2006 11:02:52 +0100 Subject: erlang.org and erlang.se are down! Message-ID: I wrote: > I also noticed that some of the mirrors are not necessarily > kept current. I hit send a bit too fast. Here's what I've found: http://erlang.stacken.kth.se/ (last updated 2003-06-04) http://www.serc.mit.edu.au/mirrors/ose_mirror/ (unreachable) http://www.csd.uu.se/ftp/mirror/erlang/ (updated 2006-01-23) Maybe there are more mirrors, but I'd say that of the three mirrors I had in my bookmarks, only one is useful as of today. ...execpt that the documentation link points to erlang.se, which is also down. trapexit.org is up, but unfortunately, the docs link there also points to erlang.se. Here's one alternative link to the R10B docs: http://transit.iut2.upmf-grenoble.fr/doc/erlang-doc-html/html/doc/ /Uffe From fernando@REDACTED Wed Feb 1 12:41:36 2006 From: fernando@REDACTED (Fernando Rodriguez) Date: Wed, 1 Feb 2006 12:41:36 +0100 Subject: Tuples vs lists Message-ID: <00aa01c62724$78384f60$2101a8c0@fofao> Hi, I'm going through the Erlang tutorial,and I don't understand very well the difference between tuples and lists. For example, form the tutorial: o represent the temperature of various cities of the world we could write {moscow, {c, -10}} {cape_town, {f, 70}} {paris, {f, 28}} Why not use [moscow, [c, -10]] instead? Thanks! :-) BTW, www.erlang.org seems to be dead since yesterday... :-? From vlad_dumitrescu@REDACTED Wed Feb 1 13:02:37 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Wed, 1 Feb 2006 13:02:37 +0100 Subject: Tuples vs lists In-Reply-To: <00aa01c62724$78384f60$2101a8c0@fofao> Message-ID: Hi and welcome! > I'm going through the Erlang tutorial,and I don't understand > very well the difference between tuples and lists. The short answer is: Lists are logically meant to represent entities that may vary in length. Entities of fixed length are better represented with tuples. You could in principle use tuples and lists interchangeably to represent some data. The difference is in efficiency and storage size. A tuple is basically an array, you can do random access to elements and the elements are stored contiguously in memory. A list has to be traversed to access its elements, and stores two extra pointers for every element. On the other hand, resizing a tuple means that all elements needs to be copied into a new structure. For a list, adding an element at the head is very fast and simple. Hope this helps a little. Best regards, Vlad From mikpe@REDACTED Wed Feb 1 13:14:06 2006 From: mikpe@REDACTED (Mikael Pettersson) Date: Wed, 1 Feb 2006 13:14:06 +0100 Subject: Tuples vs lists In-Reply-To: <00aa01c62724$78384f60$2101a8c0@fofao> References: <00aa01c62724$78384f60$2101a8c0@fofao> Message-ID: <17376.42510.243087.892813@alkaid.it.uu.se> Fernando Rodriguez writes: > Hi, > > I'm going through the Erlang tutorial,and I don't understand very well the > difference between tuples and lists. For example, form the tutorial: > > o represent the temperature of various cities of the world we could write > > {moscow, {c, -10}} > {cape_town, {f, 70}} > {paris, {f, 28}} > > > Why not use [moscow, [c, -10]] instead? Be prepared for an all-out religious flamewar. Seriously. 1. 2-tuples {X,Y} and cons-cells [X|Y] are semantically equivalent except for type (tuple vs "list") and syntax: both allow you to store two terms in a container, to pass around that container, and to retrieve the stored terms. 2. Lists [...] are built from cons-cells [_|_] and the empty list, [], so [X,Y,Z] is really [X|[Y|[Z|[]]]]. For this reason, some people(*) equate cons-cells with lists and strongly dislike cons-cells being used to build non-lists, to the point where they consider that to be a programming error. 3. N-tuples have constant-time indexing, while lists of N elements have O(N)-time indexing. Aggregates of more than two elements will be slower to access when stored in lists than when stored in tuples. This is assuming the list representation of a 2-element aggregate uses a single cons-cell: [X|Y]. Your example above, [c,-10], is really [c|[-10|[]]], so it uses two cons-cells and will be larger and slower to access than the 2-tuple {c,-10}. 4. Cons-cells have a representation in the current Erlang/OTP system that is slightly more compact and cheap to test for or index than 2-tuples. This is why some people (not the (*) ones above obviously) like to use cons-cells instead of 2-tuples for 2-element aggregates. /Mikael From karol.skocik@REDACTED Wed Feb 1 13:57:09 2006 From: karol.skocik@REDACTED (karol skocik) Date: Wed, 1 Feb 2006 13:57:09 +0100 Subject: distel setup problem Message-ID: Hi, I am trying to get Distel 3.3 working, but with no luck so far. On the application side : .erlang file with "code:add_pathz("/usr/local/share/distel/ebin")" - as it is written in INSTALL for Distel - is ignored by my erl for some?? reason, but with code:add_patha(...) works ok. The application I want to connect to Distel is started like this : erl -pa ./ebin -pa /usr/local/share/distel/ebin -sname agent -config agent -run md_snmpa_ipe go here : (agent@REDACTED)1> erlang:node(). agent@REDACTED and the path to Distel is ok too : (the distel module is loaded when I call something from it) (agent@REDACTED)2> code:get_path(). ["/usr/local/share/distel/ebin", "./ebin", ".", "/usr/local/lib/erlang/lib/kernel-2.10.12/ebin", "/usr/local/lib/erlang/lib/stdlib-1.13.11/ebin", "/usr/local/lib/erlang/lib/xmerl-1.0.3/ebin", ..... however : when I want to connect from Emacs to running node agent@REDACTED, like M-x erl-ie-session RET, Node : agent@REDACTED after a really long delay (couple dozens of minutes), Emacs become responsive again, and I can find 2 buffers like with status line showing some erlang pid, or *ie session * (Erlang EXT) ---. When I write something in this buffer and request complete with M-Tab, Emacs become unresponsive again. My setup in .emacs for Erlang related stuff looks like this : ;; setup Erlang (add-to-list 'load-path "/usr/local/lib/erlang/lib/tools-2.4.6/emacs") (setq erlang-root-dir "/usr/local/lib/erlang") (add-to-list 'exec-path "/usr/local/lib/erlang/bin") (require 'erlang-start) (add-to-list 'load-path "/usr/local/share/emacs/site-lisp/distel") (require 'distel) (add-hook 'erlang-mode-hook 'distel-erlang-mode-hook) What might be a problem? Thanks for any ideas, Karol From cyberdanx@REDACTED Wed Feb 1 13:56:18 2006 From: cyberdanx@REDACTED (Chris Campbell) Date: Wed, 1 Feb 2006 12:56:18 +0000 Subject: erlang.org and erlang.se are down! In-Reply-To: References: Message-ID: Can someone please send me the programming rules document? From serge@REDACTED Wed Feb 1 14:27:35 2006 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 01 Feb 2006 08:27:35 -0500 Subject: Memoization in Erlang? In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C01280628@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C01280628@esealmw105.eemea.ericsson.se> Message-ID: <43E0B747.7070204@hq.idt.net> BTW, If you are using a mail client that can read newsgroups, you can access the mailing list in a convenient manner by subscribing to the following news group: News server: news.gmane.org News group: gmane.comp.lang.erlang.general As Matthias Lang pointed out in one of the postings this newsgroup is also available through the web, but I don't recall the page, as I use Mozilla Thunderbird for news group reading/posting. Also perhaps someone can enlighten me on how this newsgroup is linked to the mailing list? Serge Vlad Dumitrescu XX (LN/EAB) wrote: > Of course, to look for Ulf's message you'll have to wait for erlang.org > to get back again... > > /Vlad > From nick@REDACTED Wed Feb 1 14:29:35 2006 From: nick@REDACTED (Niclas Eklund) Date: Wed, 1 Feb 2006 14:29:35 +0100 (MET) Subject: MNesia Corba Session In-Reply-To: <43DF3AD0.6000003@ast.dfs.de> Message-ID: Hello! When you're using mnesia_session, the key must by an 'any' type (see the reference manual for orber_tc and any). To avoid using the any type, you can write your own Mnesia wrapper. How to do this you can find in Orber's User's Guide - "OMG IDL to Erlang Mapping". To be able to find out what may differ, you should check that the value field (#any{value = Val}) in the 'any' record matches the key you use when accessing it locally. An easy way to test this is to start the server node with the following option: shell> erl -orber interceptors "{native,[orber_iiop_tracer]}" This will generate readable printouts of the IIOP traffic. Perhaps -mnesia_session debug Verbosity will supply additional information. /Nick PS The shorter version of getting access to a session is (see the "Interoperable Naming Sevice" (INS) chapter in Orber's User's Guide): start_corba_session(Host, Port) -> %% Lookup the object reference to the factory mnesia_corba_connector Cok = corba:string_to_object("corbaname::1.2@"++atom_to_list(Host)++":"++integer_to_list(Port)++"/NameService#mnesia_corba_connector"), %% Use the factory to create a session Sok = mnesia_corba_connector:connect(Cok), {Cok, Sok}. DS On Tue, 31 Jan 2006, Winfried Noeth wrote: > I am trying to perform MNesia queries through the MNesia corba interface. > > Connecting to the Orber succeeds, however all queries to a nonempty table > deliver an empty list as result, no matter what the query key looks like. > > Direct Erlang queries to the table deliver the expected results, so > everything > is ok with the database. > > How must a Corba query key be defined to deliver a match in the table? > > Unfortunately, the mnesia corba session example in the erlang documentation > is not working for me. > > Regards, > > Winfried From aho-erlang-questions@REDACTED Wed Feb 1 15:25:23 2006 From: aho-erlang-questions@REDACTED (Adrian Ho) Date: Wed, 1 Feb 2006 22:25:23 +0800 Subject: Memoization in Erlang? In-Reply-To: <43E0B747.7070204@hq.idt.net> References: <11498CB7D3FCB54897058DE63BE3897C01280628@esealmw105.eemea.ericsson.se> <43E0B747.7070204@hq.idt.net> Message-ID: <20060201142523.GA22941@megapower.03s.net> On Wed, Feb 01, 2006 at 08:27:35AM -0500, Serge Aleynikov wrote: > BTW, If you are using a mail client that can read newsgroups, you can > access the mailing list in a convenient manner by subscribing to the > following news group: > > News server: news.gmane.org > News group: gmane.comp.lang.erlang.general > > As Matthias Lang pointed out in one of the postings this newsgroup is > also available through the web, but I don't recall the page, as I use > Mozilla Thunderbird for news group reading/posting. See for details. > Also perhaps someone can enlighten me on how this newsgroup is linked to > the mailing list? Gmane runs its own bidirectional mail-to-news gateway. They've put their software up for download at . More details about Gmane can be had at . - Adrian From ernie.makris@REDACTED Wed Feb 1 16:42:13 2006 From: ernie.makris@REDACTED (Ernie Makris) Date: Wed, 01 Feb 2006 10:42:13 -0500 Subject: erlang.org and erlang.se are down! In-Reply-To: References: <9d8237627b0532107cef37ff0304f1f0@ezabel.com> <43DFD38E.30207@comcast.net> Message-ID: <43E0D6D5.9000500@comcast.net> I know. I said it in jest:) I still think it would be worthwhile to run with yaws. If any help is needed, I may be able to devote some time. Thanks Ernie Bjorn Gustavsson wrote: > Using Inets or yaws would not have helped in this case, as > the problem is that the computer that Apache server runs > on no longer boots. To achive robustness, Erlang/OTP is not enough; > you'll need redundant/standby hardware too. > > /Bjorn > > Ernie Makris writes: > > >> It should be moved to yaws! My vote is in. >> >> Thanks >> Ernie >> orbitz@REDACTED wrote: >> >>> *THE* Erlang website not using an Erlang based httpd for it's own >>> site? that's even worse! >>> >>> On Jan 31, 2006, at 8:54 AM, Ulf Wiger ((AL/EAB)) wrote: >>> >>> >>>> You can tell them that the erlang.org website >>>> uses Apache. (: >>>> >>>> /Uffe >>>> >>>> >>>>> -----Original Message----- >>>>> From: owner-erlang-questions@REDACTED >>>>> [mailto:owner-erlang-questions@REDACTED] On Behalf Of >>>>> orbitz@REDACTED >>>>> Sent: den 31 januari 2006 13:59 >>>>> To: Raimo Niskanen >>>>> Cc: erlang-questions@REDACTED >>>>> Subject: Re: erlang.org and erlang.se are down! >>>>> >>>>> erlang.orgs often downness doesn't help when i tell people >>>>> how fault tolerance is an important part of the language:) >>>>> >>>>> On Jan 31, 2006, at 3:45 AM, Raimo Niskanen wrote: >>>>> >>>>> >>>>>> No, you did not miss any outage message; here it is! >>>>>> Sorry about the delay. >>>>>> >>>>>> >>>>>> We have had a power outage who's consequenses took down the web >>>>>> servers www.erlang.org and www.erlang.se. We are currently >>>>>> >>>>> working on >>>>> >>>>>> setting up replacement hardware. >>>>>> >>>>>> -- >>>>>> >>>>>> / Raimo Niskanen, Erlang/OTP, Ericsson AB >>>>>> >>>>>> >>>>> >>> > > From vances@REDACTED Wed Feb 1 19:12:18 2006 From: vances@REDACTED (Vance Shipley) Date: Wed, 1 Feb 2006 13:12:18 -0500 Subject: erlang.org and erlang.se are down! In-Reply-To: <43E0D6D5.9000500@comcast.net> References: <9d8237627b0532107cef37ff0304f1f0@ezabel.com> <43DFD38E.30207@comcast.net> <43E0D6D5.9000500@comcast.net> Message-ID: <20060201181218.GB53580@frogman.motivity.ca> How about Eddie on geographically dispersed servers? -Vance On Wed, Feb 01, 2006 at 10:42:13AM -0500, Ernie Makris wrote: } I know. I said it in jest:) I still think it would be worthwhile to run } with yaws. } If any help is needed, I may be able to devote some time. } } Thanks } Ernie } } Bjorn Gustavsson wrote: } > Using Inets or yaws would not have helped in this case, as } > the problem is that the computer that Apache server runs } > on no longer boots. To achive robustness, Erlang/OTP is not enough; } > you'll need redundant/standby hardware too. } > } > /Bjorn } > } > Ernie Makris writes: } > } > } >> It should be moved to yaws! My vote is in. } >> } >> Thanks } >> Ernie From serge@REDACTED Wed Feb 1 20:51:28 2006 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 01 Feb 2006 14:51:28 -0500 Subject: edoc feature request Message-ID: <43E11140.2020200@hq.idt.net> Hi Richard, I'd like to request a new feature in edoc. When I run edoc in non-interactive mode by means of a makefile and it detects a documentation syntax problem, it prints out an error, and exits the application (and the beam), yet the exit code of the beam process doesn't indicate a failure. Therefore make doesn't stop on such an error. It would be nice to have an option accepted by the edoc_run:applicaiton/1 that upon failure would terminate the emulator using erlang:halt(Code). It looks like this should be something simple to implement, yet if desired I can submit a patch. Thanks, Serge -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From richardc@REDACTED Wed Feb 1 22:40:07 2006 From: richardc@REDACTED (Richard Carlsson) Date: Wed, 01 Feb 2006 22:40:07 +0100 Subject: edoc feature request In-Reply-To: <43E11140.2020200@hq.idt.net> References: <43E11140.2020200@hq.idt.net> Message-ID: <43E12AB7.3050206@csd.uu.se> Serge Aleynikov wrote: > I'd like to request a new feature in edoc. When I run edoc in > non-interactive mode by means of a makefile and it detects a > documentation syntax problem, it prints out an error, and exits the > application (and the beam), yet the exit code of the beam process > doesn't indicate a failure. Therefore make doesn't stop on such an error. > > It would be nice to have an option accepted by the > edoc_run:applicaiton/1 that upon failure would terminate the emulator > using erlang:halt(Code). > > It looks like this should be something simple to implement, yet if > desired I can submit a patch. It seems simple enough - I'll have a look. Thanks for the heads-up. Do you really need to be able to give the exit code as an option, or would some decent fixed non-zero value be good enough? /Richard From serge@REDACTED Wed Feb 1 22:46:29 2006 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 01 Feb 2006 16:46:29 -0500 Subject: edoc feature request In-Reply-To: <43E12AB7.3050206@csd.uu.se> References: <43E11140.2020200@hq.idt.net> <43E12AB7.3050206@csd.uu.se> Message-ID: <43E12C35.3070802@hq.idt.net> I meant to have an option to instruct edoc to exit the emulator on error (rather than to have the option to provide an exit code). As far as the exit code value is concerned, a non-zero value would suffice. Richard Carlsson wrote: > Serge Aleynikov wrote: > >>I'd like to request a new feature in edoc. When I run edoc in >>non-interactive mode by means of a makefile and it detects a >>documentation syntax problem, it prints out an error, and exits the >>application (and the beam), yet the exit code of the beam process >>doesn't indicate a failure. Therefore make doesn't stop on such an error. >> >>It would be nice to have an option accepted by the >>edoc_run:applicaiton/1 that upon failure would terminate the emulator >>using erlang:halt(Code). >> >>It looks like this should be something simple to implement, yet if >>desired I can submit a patch. > > > It seems simple enough - I'll have a look. Thanks for the heads-up. > Do you really need to be able to give the exit code as an option, > or would some decent fixed non-zero value be good enough? > > /Richard > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From bfulg@REDACTED Wed Feb 1 23:46:20 2006 From: bfulg@REDACTED (Brent Fulgham) Date: Wed, 1 Feb 2006 14:46:20 -0800 (PST) Subject: Vacancy at T-Mobile In-Reply-To: Message-ID: <20060201224620.41968.qmail@web81203.mail.mud.yahoo.com> --- Lennart Ohman wrote: > Of course in any big company not everyone can know > of everything going on. I am probably extremely ignorant > of many home-brewn things within Ericsson playing equally > important roles in their areas as Erlang in its. > > But the Santa Barbara case is different in this case > I believe. I believe that to be a company Ericsson aquired. > Ericsson probably did not buy them to teach them Erlang :-) > but rather for the value of what they were doing before. So > most likely they continued doing what they always done, and > not learning Erlang. Yes, that's very likely. As I said -- I don't think he even knew what I was talking about. :-) -Brent From matthias@REDACTED Thu Feb 2 00:13:21 2006 From: matthias@REDACTED (Matthias Lang) Date: Thu, 2 Feb 2006 00:13:21 +0100 Subject: binary_to_term can crash the VM Message-ID: <17377.16529.895890.448767@antilipe.corelatus.se> Hi, I recall binary_to_list being fixed to be able to cope with 'bad' binaries a few years ago. But I stumbled across another way to crash it: 2> binary_to_term(<<131,109,255,255,255,255>>). Segmentation fault This can bite when code such as 'rb' calls binary_to_term on corrupt data: /usr/local/src/otp_src_R10B-8/bin/erl -boot start_sasl ... Eshell V5.4.10 (abort with ^G) 1> c(crash). {ok,crash} 2> crash:go(). rb: reading report...Segmentation fault I haven't tried making dets fail, but I bet 'rb' isn't the only thing which uses binary_to_term on data it can't be sure it created. Matthias (FWIW: I don't use 'log_mf_handler' or 'rb' in production systems because of past problems. This seems like another good reason to give them a miss.) %%---------------------------------------------------------------------- -module(crash). -export([go/0]). go() -> file:make_dir("/tmp/zap"), file:write_file("/tmp/zap/index", <<1>>), %% simulate a corrupt logfile file:write_file("/tmp/zap/1", <<0,6,131,109,255,255,255,255>>), rb:start([{report_dir, "/tmp/zap"}]), rb:list(). From valentin@REDACTED Thu Feb 2 02:06:52 2006 From: valentin@REDACTED (Valentin Micic) Date: Thu, 2 Feb 2006 03:06:52 +0200 Subject: binary_to_term can crash the VM References: <17377.16529.895890.448767@antilipe.corelatus.se> Message-ID: <008c01c62794$f48b22c0$7309fea9@MONEYMAKER2> In addition to binary_to_term(<<131,109,255,255,255,255>>) (*1*) Also crashing emulator are: binary_to_term(<<131,109, 16#FFFFFFFC:4/big-unsigned-unit:4>>) . binary_to_term(<<131,109,255,255,255,253>>). binary_to_term(<<131,109,255,255,255,254>>). Could it be that 32-bit data overflow is causing boundary check to fail and crash emulator, as in: 0xFFFFFFFC + 0x04 = 0x00000000, instead of 0x0100000000 0xFFFFFFFF + 0x04 = 0x00000003, instead of 0x0100000003 It would be great to find out what is going on. (*1*) BACKGROUND: The above is "external" representation of the binary term, without actual value. For example, if you do term_to_binary( <<3>> ) -> <<131,109,0,0,0,1,3>> where: 131 is Version Magic Number; 109 is TAG indicating binary term; 0,0,0,1 represents a length of the term in bytes (in this case 1 Byte), 3 is the actual value. In all cases but the 4 indicated, when one attempts to convert the external representation to term, without value, say, by skipping 3 as in the example below: binary_to_term( <<131,109,0,0,0,1>> ). The emulator will report an error, like, {'EXIT', {badarg....} Valentin. ----- Original Message ----- From: "Matthias Lang" To: Sent: Thursday, February 02, 2006 1:13 AM Subject: binary_to_term can crash the VM > Hi, > > I recall binary_to_list being fixed to be able to cope with 'bad' > binaries a few years ago. But I stumbled across another way to crash > it: > > 2> binary_to_term(<<131,109,255,255,255,255>>). > Segmentation fault > > This can bite when code such as 'rb' calls binary_to_term on corrupt > data: > > /usr/local/src/otp_src_R10B-8/bin/erl -boot start_sasl > ... > Eshell V5.4.10 (abort with ^G) > 1> c(crash). > {ok,crash} > 2> crash:go(). > rb: reading report...Segmentation fault > > I haven't tried making dets fail, but I bet 'rb' isn't the only thing > which uses binary_to_term on data it can't be sure it created. > > Matthias > > (FWIW: I don't use 'log_mf_handler' or 'rb' in production systems > because of past problems. This seems like another good reason to give > them a miss.) > > %%---------------------------------------------------------------------- > -module(crash). > -export([go/0]). > > go() -> > file:make_dir("/tmp/zap"), > file:write_file("/tmp/zap/index", <<1>>), > %% simulate a corrupt logfile > file:write_file("/tmp/zap/1", <<0,6,131,109,255,255,255,255>>), > rb:start([{report_dir, "/tmp/zap"}]), > rb:list(). > From bjorn@REDACTED Thu Feb 2 07:47:39 2006 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 02 Feb 2006 07:47:39 +0100 Subject: binary_to_term can crash the VM In-Reply-To: <008c01c62794$f48b22c0$7309fea9@MONEYMAKER2> References: <17377.16529.895890.448767@antilipe.corelatus.se> <008c01c62794$f48b22c0$7309fea9@MONEYMAKER2> Message-ID: "Valentin Micic" writes: > Could it be that 32-bit data overflow is causing boundary check to > fail and crash emulator, as in: > > 0xFFFFFFFC + 0x04 = 0x00000000, instead of 0x0100000000 > 0xFFFFFFFF + 0x04 = 0x00000003, instead of 0x0100000003 Yes. We'll try to include a fix for this problem in R10B-10. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From ft@REDACTED Thu Feb 2 08:28:11 2006 From: ft@REDACTED (Fredrik Thulin) Date: Thu, 2 Feb 2006 08:28:11 +0100 Subject: edoc feature request In-Reply-To: <43E12C35.3070802@hq.idt.net> References: <43E11140.2020200@hq.idt.net> <43E12AB7.3050206@csd.uu.se> <43E12C35.3070802@hq.idt.net> Message-ID: <200602020828.11775.ft@it.su.se> On Wednesday 01 February 2006 22:46, Serge Aleynikov wrote: > I meant to have an option to instruct edoc to exit the emulator on > error (rather than to have the option to provide an exit code). As > far as the exit code value is concerned, a non-zero value would > suffice. I would vote for just making edoc return non-zero on error (like you suggested) by default. Always. Since, as far as I understand your original problem description, there hasn't been any difference in the exit code of the edoc beam process there can't be any scripts that depend on it today, so backwards compatibility is not an issue. If there _are_ scripts/makefiles that check the exit status already, I bet they all think edoc exits with a non-zero exit value on errors. /Fredrik From richardc@REDACTED Thu Feb 2 10:00:55 2006 From: richardc@REDACTED (Richard Carlsson) Date: Thu, 02 Feb 2006 10:00:55 +0100 Subject: edoc feature request In-Reply-To: <200602020828.11775.ft@it.su.se> References: <43E11140.2020200@hq.idt.net> <43E12AB7.3050206@csd.uu.se> <43E12C35.3070802@hq.idt.net> <200602020828.11775.ft@it.su.se> Message-ID: <43E1CA47.9090105@csd.uu.se> Fredrik Thulin wrote: > I would vote for just making edoc return non-zero on error (like you > suggested) by default. Always. > > Since, as far as I understand your original problem description, there > hasn't been any difference in the exit code of the edoc beam process > there can't be any scripts that depend on it today, so backwards > compatibility is not an issue. The main snag seems to be that if I use halt(NonZero), the emulator is often in such a hurry to quit that not all I/O has time to finish, which means that you might not see the message explaining what the problem was. So it was a design decision to not use halt, but instead rely on the final "-s init stop" in the command-line invocation. Sadly, there is no init:stop/1 which could be used to terminate nicely *and* return an exit code. It would be pretty trivial to add (if OTP would accept it), but that would not solve the problem for edoc until the next release of OTP (and assuming that all users switch to the new system). I could add a small delay before calling halt(NonZero) upon errors, if that's the only other way out of the problem. It's not a pretty solution, but what the heck. If anybody knows a good way to shut down the system nicely but as quick as possible and with a particular exit code, please let me know. > If there _are_ scripts/makefiles that check the exit status already, I > bet they all think edoc exits with a non-zero exit value on errors. Probably. It would be nice if it worked, too. /Richard -- "Having users is like optimization: the wise course is to delay it." -- Paul Graham From wrs06@REDACTED Wed Feb 1 18:20:54 2006 From: wrs06@REDACTED (wrs06@REDACTED) Date: Wed, 1 Feb 2006 09:20:54 -0800 Subject: WRS06 1st call for paper Message-ID: <200602011720.k11HKsAL019552@redstar.cs.pdx.edu> [Our apologies if you receive multiple copies] ----------------------------------------------------------------------- WRS06 The Sixth International Workshop on Reduction Strategies in Rewriting and Programming http://www.cs.pdx.edu/~antoy/wrs06/ The Seattle Sheraton Hotel and Towers, Seattle, Washington, August 11, 2006 Scope The workshop intends to promote and stimulate international research and collaboration in the area of evaluation strategies. It encourages the presentation of new directions,developments and results as well as surveys and tutorials on existing knowledge in this area. Reduction strategies study which subexpression(s) of an expression should be selected for evaluation and which rule(s) should be applied. These choices affect fundamental properties of a computation such as laziness, strictness, completeness and need to name a few. For this reason some programming languages, e.g., Elan, Maude, *OBJ* and Stratego, allow the explicit definition of the evaluation strategy, whereas other languages,e.g., Clean, Curry, and Haskell, allow its modification. Strategies pose challenging theoretical problems and play an important role in practical tools such as theorem provers, model checkers and programming languages. In implementations of languages, strategies bridge the gap between operational principles, e.g., graph and term rewriting,narrowing and lambda-calculus, and semantics, e.g., normalization, computation of values and head-normalization. The previous editions of the workshop were: WRS 2001 (Utrecht, The Netherlands),WRS 2002 (Copenhagen, Denmark), WRS 2003 (Valencia, Spain), WRS 2004 (Aachen, Germany), and WRS 2005 (Nara, Japan). See also the WRS permanent page at http://www.dsic.upv.es/~wrs/ Important Dates Abstract Submission: May 8, 2006 Paper Submission: May 15, 2006 Author Notification: June 12, 2006 Camera-Ready: July 10, 2006 Conference: Aug 11, 2006 Program Committee Sergio Antoy, (chair) Portland State University Santiago Escobar, Universidad Politecnica de Valencia Juergen Giesl, RWTH Aachen Bernhard Gramlich, Technische Universitat Wien Ralf Laemmel, Microsoft Corp. Salvador Lucas, Universidad Politecnica de Valencia Narciso Marti-Oliet, Universidad Complutense de Madrid Mizuhito Ogawa, Japan Advanced Institute of Science and Technology Jaco van de Pol, Centrum voor Wiskunde en Informatica Manfred Schmidt-Schauss, Johann Wolfgang Goethe-Universitat Topics Topics of interest include, but are not restricted to: o theoretical foundations for the definition and semantic description of reduction strategies o strategies in different frameworks such as term rewriting, graph rewriting, infinitary rewriting, lambda calculi, higher order rewriting, conditional rewriting, rewriting with built-ins, narrowing, constraint solving, etc. o application of strategies to equational, functional, functional-logic programming languages o properties of reduction strategies and corresponding computations, e.g., completeness, computability, decidability, complexity, optimality, normalization, cofinality, fairness, perpetuality, context-freedom, need, laziness, eagerness, strictness o interrelations, combinations and applications of reduction under different strategies, e.g., evaluation mechanisms in programming languages, equivalence conditions for fundamental properties like termination and confluence, applications in modularity analysis, connections between strategies of different frameworks,etc. o program analysis and other semantics-based optimization techniques dealing with reduction strategies o rewrite systems, tools, implementations with flexible or programmable strategies as an essential concept or ingredient o specification of reduction strategies in real languages strategies suitable to software engineering problems and applications tutorials and systems related to evaluation strategies Submissions Submissions must be original and not submitted for publication elsewhere. The page limit for regular papers is 13 pages in Springer Verlag LNCS style. Surveys and tutorials maybe longer. Use the WRS06 submission page, handled by the EasyChair conference system, to submit abstracts, papers and to update a previous submission. Publication Informal proceedings of accepted contributions will be available on-line. A hard copy will be distributed at the workshop to registered participants. Authors of selected contributions will be invited to submit a revised version, after the workshop, for inclusion in a collection. We anticipate the publication of formal proceedings in the Elsevier ENTCS series. Contact Sergio Antoy, antoy@REDACTED From pete-expires-20060401@REDACTED Wed Feb 1 14:51:07 2006 From: pete-expires-20060401@REDACTED (Pete Kazmier) Date: Wed, 01 Feb 2006 08:51:07 -0500 Subject: Memoization in Erlang? References: Message-ID: <878xsvfar8.fsf@coco.kazmier.com> "Ulf Wiger \(AL/EAB\)" writes: > I'm not going to comment on the general approach, > just answer the specific questions. Does this imply my general approach is fundamentally wrong? > Pete Kazmier wrote: >> 1) Writing higher-order functions seems to be complicated >> in Erlang because there is no support for varargs. >> Thus, in my example, I have this kludge to return an >> N-arg closure. Is there a better way of handling this >> keeping in mind that the wrapper function >> should have the same interface as the memoized one? > > In this particular case, perhaps apply(Module, Function, Args) > would be better than using funs? I do not understand, could you explain further? I use apply in loop/2, and my original implementation of memoize/1 was like this: memoize(Fun) -> Pid = spawn(?MODULE, loop, [Fun, dict:new()]), fun(Args) -> callit(Pid, Args) end. But the problem with this is that the function returned from memoize/1 no longer adheres to the interface of the original function. I.e., if the original function took 3 args, the closure returned from memoize/1 would only take a single argument that should be a list of 3 args. As a result, the two functions cannot be used interchangeably which is important to me. However, perhaps I misunderstood your comment. >> 2) In my kludge, I use erlang:fun_info/1 which states that >> it is intended for debugging use. Does this preclude >> its use in my code? Should I instead just define >> memoize1/1, memoize2/1, memoize3/1, etc ... > > Instead of fun_info/1, you could use the guard function > is_function(F, Arity), i.e. > > if is_function(F, 0) -> > fun() -> callit(Pid, []) end; > is_function(F, 1) -> > fun(A1) -> callit(Pid, [A1]) end; > is_function(F, 2) -> > ... > end. Perfect! This will do very nicely. >> 3) In lieu of my kludge, I started to wonder if I could >> dynamically construct a string of code, then somehow >> compile that on the fly, and return the resulting >> function to the caller. Is this even possible? > > It is. > > Here's an example of how to generate "forms", compiling > them, and then loading them into a running system: [example snipped] Thank you. I will have to investigate this further this weekend when I have more time. One question that does come to the top of my mind is regarding the use of erl_eval. It seems that in most languages, using eval us frowned upon and is a general indication that one is doing something that one probably shouldn't be doing. Is this the case in Erlang as well? In this context, would any performance issues with the use of the eval be limited to just the creation of the closure, or would they be involved each time the closure is actually invoked? >> 4) Are there better ways to implement memoization >> in Erlang? Would using the process dictionary >> be a bad idea? My first thought was to store >> the cached values in it, and then the whole >> thing could be implemented in a single function >> without the use of processes. > > Using the process dictionary in a process that you > control altogether is not necessarily a bad idea, > but in your example code, I don't think you'd have > trouble using e.g. dict.erl and caching the data > in a dictionary 'loop variable' instead. After reading some of the other responses by Vlad, it seems that an ets table might be a good alternative. This is what I came up with, it would have to be modified to include the Module in the key as well for robustness and I should use the guard function that Ulf pointed out to me. I think I like this version better because its less complex. -module(memoets). -export([memoize/1]). memoize(Fun) -> catch ets:new(memo, [named_table]), case erlang:fun_info(Fun, arity) of {arity, 0} -> fun() -> callit(Fun, []) end; {arity, 1} -> fun(A1) -> callit(Fun, [A1]) end; {arity, 2} -> fun(A1, A2) -> callit(Fun, [A1, A2]) end; {arity, 3} -> fun(A1, A2, A3) -> callit(Fun, [A1, A2, A3]) end; {arity, 4} -> fun(A1, A2, A3, A4) -> callit(Fun, [A1, A2, A3, A4]) end; {arity, _} -> erlang:error("Erlang's lack of varargs sucks doesn't?") end. callit(Fun, Args) -> case ets:lookup(memo, {Fun, Args}) of [] -> Value = apply(Fun, Args), ets:insert(memo, {{Fun, Args}, Value}), Value; [{{Fun, Args}, Value}] -> Value end. Thanks for the help. As a newcomer to Erlang, I appreciate the insights. I still wish Erlang had varargs as all of my higher order functions have the above verbose code for returning the appropriate closure, and the alternative to restricting the use of the HOF with functions that take a single list argument artificially limits the usefulness of them. -Pete From joseph.stewart@REDACTED Wed Feb 1 18:04:15 2006 From: joseph.stewart@REDACTED (Joseph Stewart) Date: Wed, 1 Feb 2006 12:04:15 -0500 Subject: Are erlang.org and erlang.se down? Message-ID: <2781f020602010904w7d0d09cbw7c211c009bde7bbd@mail.gmail.com> I'm a new subscriber, so I apologize if this question has already been posted. I'm been trying to access http://www.erlang.org and http://www.erlang.sefrom North America for the past 14 hours without success. Ping does no better. Thanks, -joe -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias@REDACTED Wed Feb 1 22:40:49 2006 From: matthias@REDACTED (Matthias Lang) Date: Wed, 1 Feb 2006 22:40:49 +0100 Subject: list_to_atom use in kernel/error_logger.erl In-Reply-To: <43E05080.6070805@hq.idt.net> References: <43E05080.6070805@hq.idt.net> Message-ID: <17377.10977.478403.262239@antilipe.corelatus.se> Hi, Short answer: It's not a problem, the offending code is only executed during the Erlang boot. Long answer: This seemed like a jolly good opportunity to make the emulator crash and burn. Alas, it's harder than hoped. The manpage for the error_logger hints (see swap_handler) that the error_handler starts up in a 'primitive' state, before being moved to 'normal' mode. The code you posted is only reachable from that primitive state, so there's not much scope for logging a bunch of junk with it. If you insist on clogging the works, you can use the undocumented export error_loger:simple_logger/1 with an integer argument. Matthias -------------------- Serge Aleynikov writes: > I was browsing through the kernel/error_logger.erl and the following > code caught my attention. Wouldn't the call list_to_atom/1 eventially > lead to exhaustion of the atom table? > > ----kernel/error_logger.erl (line: 288)------------------- > display2(Tag,F,A) -> > erlang:display({error_logger,Tag, nice(F), nice(A)}). > > nice(X) when tuple(X) -> > nice_tuple(X); > > nice([]) -> []; > nice(L) when list(L) -> > case is_string(L) of > true -> > list_to_atom(L); > false -> > [H|T] = L, > [nice(H) | nice(T)] > end; > nice(X) -> X. > ---------------------------------------------------------- > > Why does a list need to be converted to atom here? > > Serge From pete-expires-20060401@REDACTED Wed Feb 1 23:47:46 2006 From: pete-expires-20060401@REDACTED (Pete Kazmier) Date: Wed, 01 Feb 2006 17:47:46 -0500 Subject: New Tutorial - Writing an Erlang Port Using OTP Principles Message-ID: <874q3ig0h9.fsf@coco.kazmier.com> Over the past two months, I've been slowly working on a new tutorial for the Erlang community. Here is the abstract: This guide shows you how to write an Erlang program that communicates with an external Python echo server. It will also demonstrate the use of several Erlang concepts including ports, gen_servers, supervisors, and applications. Here is a link to the tutorial: http://www.kazmier.com/computer/port-howto/ If it is well-received, perhaps it could be included in the How-To section of the trapexit.org site. Thanks, Pete From serge@REDACTED Thu Feb 2 00:34:20 2006 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 01 Feb 2006 18:34:20 -0500 Subject: list_to_atom use in kernel/error_logger.erl In-Reply-To: <17377.10977.478403.262239@antilipe.corelatus.se> References: <43E05080.6070805@hq.idt.net> <17377.10977.478403.262239@antilipe.corelatus.se> Message-ID: <43E1457C.1020101@hq.idt.net> Matthias, Thank you for clarification. The reason I looked into the error_logger's code was indeed related to the ugly format of the displayed message upon an unsuccessful startup with a -boot option. Though I still don't understand the need for list_to_atom(L) there. Why not just return the list L? It does work either way. Serge Matthias Lang wrote: > Hi, > > Short answer: It's not a problem, the offending code is only > executed during the Erlang boot. > > Long answer: This seemed like a jolly good opportunity to make the > emulator crash and burn. Alas, it's harder than hoped. > > The manpage for the error_logger hints (see swap_handler) that the > error_handler starts up in a 'primitive' state, before being moved to > 'normal' mode. The code you posted is only reachable from that > primitive state, so there's not much scope for logging a bunch of junk > with it. > > If you insist on clogging the works, you can use the undocumented export > error_loger:simple_logger/1 with an integer argument. > > Matthias > > -------------------- > > Serge Aleynikov writes: > > I was browsing through the kernel/error_logger.erl and the following > > code caught my attention. Wouldn't the call list_to_atom/1 eventially > > lead to exhaustion of the atom table? > > > > ----kernel/error_logger.erl (line: 288)------------------- > > display2(Tag,F,A) -> > > erlang:display({error_logger,Tag, nice(F), nice(A)}). > > > > nice(X) when tuple(X) -> > > nice_tuple(X); > > > > nice([]) -> []; > > nice(L) when list(L) -> > > case is_string(L) of > > true -> > > list_to_atom(L); > > false -> > > [H|T] = L, > > [nice(H) | nice(T)] > > end; > > nice(X) -> X. > > ---------------------------------------------------------- > > > > Why does a list need to be converted to atom here? > > > > Serge > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From stromme@REDACTED Thu Feb 2 12:28:01 2006 From: stromme@REDACTED (Per Einar =?utf-8?q?Str=C3=B6mme?=) Date: Thu, 2 Feb 2006 12:28:01 +0100 Subject: Are erlang.org and erlang.se down? In-Reply-To: <2781f020602010904w7d0d09cbw7c211c009bde7bbd@mail.gmail.com> References: <2781f020602010904w7d0d09cbw7c211c009bde7bbd@mail.gmail.com> Message-ID: <200602021228.01885.stromme@telia.com> s Hej Joseph Stewart ! According to the list they had some kind of power outage localy so both www.erlang.org and www.erlang.se went down. Try a (the most current) mirror: http://www.csd.uu.se/ftp/mirror/erlang/ For erlang documentation also see (pointed out by Ulf Wiger): http://transit.iut2.upmf-grenoble.fr/doc/erlang-doc-html/html/doc/ The ///-people might have forgotten {www1,www2}.erlang.org only www1 works right now but information on this is old by now (May 11, 2005 or so). Looks like there is a possibility for a local cluster. >From WWW1: > > Web Server Upgrading > We are upgrading our web servers, if all goes well you should > not notice anything. But just in case you might need to know that > during the upgrade there will be servers www, www1 and www2 for > the current, old and new web server. Analoguously for ftp. Both > for the erlang.org and erlang.se domains. > > The mailing lists will for now run on the old server and the mailing > archives will be rsynced to the new web server, so there will be > an update delay of max 1 hour for the mailing list archive. > > If we would happen to completely configure ourselves off the > Internet so the mailing lists die - hollor to Trapexit. > Also see http://www.trapexit.org/ Mvh. Per Einar ------------------------------------------------------------------------------ Per Einar Str?mme stromme@REDACTED ------------------------------------------------------------------------------ s onsdag 01 februari 2006 18:04 skrev Joseph Stewart: > I'm a new subscriber, so I apologize if this question has already been > posted. > > I'm been trying to access http://www.erlang.org and > http://www.erlang.sefrom North America for the past 14 hours without > success. > > Ping does no better. > > Thanks, > > -joe > From gunilla@REDACTED Thu Feb 2 12:46:17 2006 From: gunilla@REDACTED (Gunilla Arendt) Date: Thu, 02 Feb 2006 12:46:17 +0100 Subject: Supervisor and large numbers of workers In-Reply-To: References: Message-ID: <43E1F109.3090008@erix.ericsson.se> Heinrich Venter wrote: > Hi all > > The following patch released for ejabberd recently came to my attention. > https://support.process-one.net/doc/display/CONTRIBS/Supervisor+-+Perfor > mance+improvement+for+dynamic+workers > > It basically replaces the list of processes managed by a supervisor with > a dict. The reason this is important in ejabberd is because the > supervisor directly handles all the processes that manage users. For a > large number of users, the list becomes less effective than the dict. > > My question is one about OTP design. Is it better to add worker > processes directly to a supervisor, especially if you know there is > going to be large numbers of them, or is it better to create your own > gen_server to handle the hordes of workers, and just add the gen_server > to the supervisor? I think it is a trade-off between how important it is for you to follow the OTP design principles, how well the OTP design application apply to your specific problem and how good an alternative solution you can come up with. > On the one hand it seems like a waste to write a custom gen_server since > the supervisor is already meant to do that type of thing. On the other > hand the supervisor seems to be meant for narrow hirarchies. > > Any chance of the above patch making it into the next release :) ? Yes. / Gunilla From gunilla@REDACTED Thu Feb 2 13:20:35 2006 From: gunilla@REDACTED (Gunilla Arendt) Date: Thu, 02 Feb 2006 13:20:35 +0100 Subject: tracking failures in supervisor:start_link In-Reply-To: <20060127141312.GB21634@crusher.lfcia.pri> References: <20060127141312.GB21634@crusher.lfcia.pri> Message-ID: <43E1F913.5000908@erix.ericsson.se> Samuel Rivas wrote: > Hi, > > If any of the child processes dies in the init phase when a supervisor is > created with start_link, the supervisor terminates itself with the > reason shutdown. I'd prefer the exit message to propagate untouched, so > I need to know the initial exit reason. > > The only way I came up with is creating the supervisor with an empty > child list, starting the children afterwards with the start_child > function. That way the supervisor returns {error, Reason} if something > fails in the children's init functions. This is not perfect since I > cannot know whether the child process died or returned {error, Reason} > but is better than the initial case. > > Any cleaner way to do that? Basically, the whole idea with the OTP supervisor is to *not* propagate the error. Snip from OTP Design Principles: "The basic idea of a supervisor is that it should keep its child processes alive by restarting them when necessary." If the supervisor ends up in an unrecoverable situation, e.g. if a child process fails to start or if the maximum restart frequency is exceeded, the supervisor terminates its child processes and then itself with reason shutdown. So the short answer to your question is 'no'. I would recommend you to implement your own supervisor, or, if the important thing for you is to *see* the actual error reason, not to propagate it, start the SASL application. It adds an event handler to error_logger which prints out error information when behaviour processes (gen_servers etc) terminates. 8> catch sup:start_link(fail). ** exited: shutdown ** =CRASH REPORT==== 2-Feb-2006::13:11:25 === crasher: pid: <0.71.0> registered_name: gens error_info: fail initial_call: {gen,init_it, [gen_server, <0.70.0>, <0.70.0>, {local,gens}, gens, [gens,fail], []]} ancestors: [armitage,<0.57.0>] messages: [] links: [<0.70.0>] dictionary: [] trap_exit: false status: running heap_size: 233 stack_size: 21 reductions: 97 neighbours: =SUPERVISOR REPORT==== 2-Feb-2006::13:11:25 === Supervisor: {local,armitage} Context: start_error Reason: fail Offender: [{pid,undefined}, {name,gens}, {mfa,{gens,start_link,[gens,fail]}}, {restart_type,permanent}, {shutdown,2000}, {child_type,worker}] / Gunilla From gunilla@REDACTED Thu Feb 2 13:57:33 2006 From: gunilla@REDACTED (Gunilla Arendt) Date: Thu, 02 Feb 2006 13:57:33 +0100 Subject: Lists:sublist oddity In-Reply-To: References: Message-ID: <43E201BD.1040009@erix.ericsson.se> Whoops, that's an error in the documentation. Thanks for pointing it out. / Gunilla Heinrich Venter wrote: > I just discovered the following strange behaviour > > 32> lists:sublist([a,b,c],1,2). > [a,b] > 33> lists:sublist([a,b,c],2,2). > [b,c] > 34> lists:sublist([a,b,c],3,2). > [c] > 35> lists:sublist([a,b,c],4,2). > [] > 36> lists:sublist([a,b,c],5,2). > =ERROR REPORT==== 30-Jan-2006::10:59:47 === > Error in process <0.72.0> with exit value: > {function_clause,[{lists,nthtail,[1,[ > ]]},{lists,sublist,3},{erl_eval,do_apply,5},{shell,exprs,6},{shell,eval_ > loop,3}] > } > > ** exited: {function_clause,[{lists,nthtail,[1,[]]}, > {lists,sublist,3}, > {erl_eval,do_apply,5}, > {shell,exprs,6}, > {shell,eval_loop,3}]} ** > > It would appear that sublist works according to the docs when > (Start-length(List1)) = 1 but fails when (Start-length(List1)) > 1 > >>From the source it would appear that the documentation is wrong :( > sublist WILL in fact fail if Start > length(List1)+1. > > -]-[einrich > > From Waldemar.Rachwal@REDACTED Thu Feb 2 14:08:33 2006 From: Waldemar.Rachwal@REDACTED (Rachwal Waldemar-AWR001) Date: Thu, 2 Feb 2006 13:08:33 -0000 Subject: erlmerge with a proxy authentication Message-ID: <08F651DD6835A74DAFA80915F0150CA66F4026@zuk35exm64.ds.mot.com> I was curious if erlmerge helps to install, but to use it from a corporate network I have to provide proxy URL with a name and password to be authenticated. It seems that erlmerge doesn't allow to specify more than just simple URL (host:port). Is there any workaround except setting up an own simple proxy to the proxy at the firewall, or it needs to be implemented in erlmerge? Regards, WR. From gunilla@REDACTED Thu Feb 2 14:21:45 2006 From: gunilla@REDACTED (Gunilla Arendt) Date: Thu, 02 Feb 2006 14:21:45 +0100 Subject: list_to_atom use in kernel/error_logger.erl In-Reply-To: <43E1457C.1020101@hq.idt.net> References: <43E05080.6070805@hq.idt.net> <17377.10977.478403.262239@antilipe.corelatus.se> <43E1457C.1020101@hq.idt.net> Message-ID: <43E20769.5090706@erix.ericsson.se> Serge Aleynikov wrote: > > Thank you for clarification. The reason I looked into the > error_logger's code was indeed related to the ugly format of the > displayed message upon an unsuccessful startup with a -boot option. > > Though I still don't understand the need for list_to_atom(L) there. Why > not just return the list L? It does work either way. > I haven't tried to verify this, but my guess would be that someone tried to make the output from error_logger more readable in the case where the Erlang run-time system fails to start. For example, if an application in the boot script fails to start, you will see something like this: $ erl {error_logger,{{2006,2,2},{14,11,52}},'Protocol: ~p: register error: ~p~n',[inet_tcp,{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1},{ne t_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{n et_kernel,init,1},{gen_server,init_it,6},{proc_lib,init_p,5}]}]} ... which is of course somewhat more readable than {error_logger,{{2006,2,2},{14,11,52}},[80,114,111,116,111,99,111,108,58,32,126,1 12,58,32,114,101,103,105,115,116,101,114,32,101,114,114,111,114,58,32,126,112,12 6,110],[inet_tcp,{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1},{ne t_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{n et_kernel,init,1},{gen_server,init_it,6},{proc_lib,init_p,5}]}]} ... / Gunilla From samuel@REDACTED Thu Feb 2 14:57:53 2006 From: samuel@REDACTED (Samuel Rivas) Date: Thu, 2 Feb 2006 14:57:53 +0100 Subject: tracking failures in supervisor:start_link In-Reply-To: <43E1F913.5000908@erix.ericsson.se> References: <20060127141312.GB21634@crusher.lfcia.pri> <43E1F913.5000908@erix.ericsson.se> Message-ID: <20060202135753.GB2937@crusher.lfcia.pri> Gunilla Arendt wrote: > Samuel Rivas wrote: > > Hi, > > > > If any of the child processes dies in the init phase when a supervisor is > > created with start_link, the supervisor terminates itself with the > > reason shutdown. I'd prefer the exit message to propagate untouched, so > > I need to know the initial exit reason. > > > > The only way I came up with is creating the supervisor with an empty > > child list, starting the children afterwards with the start_child > > function. That way the supervisor returns {error, Reason} if something > > fails in the children's init functions. This is not perfect since I > > cannot know whether the child process died or returned {error, Reason} > > but is better than the initial case. > > > > Any cleaner way to do that? > > [...] > So the short answer to your question is 'no'. > > I would recommend you to implement your own supervisor, or, if > the important thing for you is to *see* the actual error reason, not > to propagate it, start the SASL application. It adds an event handler to > error_logger which prints out error information when behaviour processes > (gen_servers etc) terminates. I am already using SASL. The problem is that I need to start some supervisors dynamically and if a child fails to start, the process that tried to start the supervisor can not know the failure reason. So I guess that a custom supervisor is the only reasonable way. -- Samuel From ulf.wiger@REDACTED Thu Feb 2 15:07:29 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 2 Feb 2006 15:07:29 +0100 Subject: Memoization in Erlang? Message-ID: Pete Kazmier wrote: > > I'm not going to comment on the general > > approach, just answer the specific questions. > > Does this imply my general approach is fundamentally > wrong? No, it just means that I didn't spend enough time thinking about the general approach. Answering the specific questions requires less thought. (: > > Pete Kazmier wrote: > >> 1) Writing higher-order functions seems to be complicated > >> in Erlang because there is no support for varargs. > >> Thus, in my example, I have this kludge to return an > >> N-arg closure. Is there a better way of handling this > >> keeping in mind that the wrapper function > >> should have the same interface as the memoized one? > > > > In this particular case, perhaps apply(Module, Function, > Args) would be better than using funs? > > I do not understand, could you explain further? > I use apply in loop/2, and my original > implementation of memoize/1 was like this: Actually, let me take that back. What I meant was that using {Mod,Function,Args} tuples could be more flexible, as apply(Mod,Function,Args) naturally takes a variable number of arguments. Another approach might be: -define(eval(Expr) -> memo:eval(fun() -> Expr end)). eval(F) when is_function(F, 0) -> case memo_db:lookup(F) of {ok, Cached} -> Cached; error -> Value = F(), memo_db:store(F, Value), Value end This has the wonderful advantage that you can memoize any expression. F uniquely identifies the closure, including bound environment, so it will serve as a key. The memo_db module may well use the process dictionary, as far as I'm concerned. (: > Thank you. I will have to investigate this further > this weekend when I have more time. One question > that does come to the top of my mind is regarding > the use of erl_eval. It seems that in most > languages, using eval us frowned upon and is a > general indication that one is doing something that > one probably shouldn't be doing. Is this the case > in Erlang as well? In general, one should be careful with meta- programming, but it's great fun, and can also be extremely useful. As long as one is aware of the drawbacks (e.g. that it makes the code difficult to read, and makes static analysis impractical), erl_eval and the apply() BIF can be wonderful tools. > In this context, would any performance issues with the > use of the eval be limited to just the creation of the > closure, or would they be involved each time the closure is > actually invoked? The function would be interpreted, so actual execution would be much slower. One nice use of erl_eval is of course that you can accept code from the outside (say, a web form) and interpret it, using a "blacklist" of functions that you don't want to allow from untrusted code. You can of course compile on the fly as well, if you intend to run the code frequently. You can of course do both: interpret initially, and then compile if the program turns out to be called often. /Uffe From bengt.kleberg@REDACTED Thu Feb 2 15:31:03 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Thu, 02 Feb 2006 15:31:03 +0100 Subject: erlmerge with a proxy authentication In-Reply-To: <08F651DD6835A74DAFA80915F0150CA66F4026@zuk35exm64.ds.mot.com> References: <08F651DD6835A74DAFA80915F0150CA66F4026@zuk35exm64.ds.mot.com> Message-ID: <43E217A7.109@ericsson.com> On 2006-02-02 14:08, Rachwal Waldemar-AWR001 wrote: > I was curious if erlmerge helps to install, but to use it from a > corporate network I have to provide proxy URL with a name and password > to be authenticated. It seems that erlmerge doesn't allow to specify unfortunatly i do not have such a beast to test against. if you are thinking about adding this to erlmerge i would suggest to wait just a bit more. any day now i will be allowed to checkin the latest (0.6) version to sourceforge. bengt From thomas@REDACTED Thu Feb 2 15:38:12 2006 From: thomas@REDACTED (Thomas Johnsson) Date: Thu, 02 Feb 2006 15:38:12 +0100 Subject: Memoization in Erlang? In-Reply-To: References: Message-ID: <43E21954.5020807@skri.net> Ulf Wiger (AL/EAB) wrote: > >Another approach might be: > >-define(eval(Expr) -> memo:eval(fun() -> Expr end)). > >eval(F) when is_function(F, 0) -> > case memo_db:lookup(F) of > {ok, Cached} -> Cached; > error -> > Value = F(), > memo_db:store(F, Value), > Value > end > > > >This has the wonderful advantage that you can >memoize any expression. F uniquely identifies >the closure, including bound environment, so >it will serve as a key. > > What, you can do function equality in Erlang?? I hadn't realized.... That's highly dubious ... When are two function equal according the the Erlang implementation? 25> fun()-> x end. #Fun 26> (fun()-> x end) == (fun()-> x end). true 27> (fun(X)-> X end) == (fun(X)-> X end). true 28> (fun(X)-> 2*X end) == (fun(X)-> X+X end). false 29> (fun(X)-> X end) == (fun(Y)-> Y end). false 30> -- Thomas From tobbe@REDACTED Thu Feb 2 15:58:03 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Thu, 02 Feb 2006 15:58:03 +0100 Subject: erlmerge with a proxy authentication In-Reply-To: <08F651DD6835A74DAFA80915F0150CA66F4026@zuk35exm64.ds.mot.com> References: <08F651DD6835A74DAFA80915F0150CA66F4026@zuk35exm64.ds.mot.com> Message-ID: Rachwal Waldemar-AWR001 wrote: > I was curious if erlmerge helps to install, but to use it from a > corporate network I have to provide proxy URL with a name and password > to be authenticated. It seems that erlmerge doesn't allow to specify > more than just simple URL (host:port). Is there any workaround except > setting up an own simple proxy to the proxy at the firewall, or it needs > to be implemented in erlmerge? > Regards, > WR. > No, there is no good workaround at the moment. You could of course download (on regular basis) the erlmerge packages to a web server of your own... Cheers, Tobbe From tobbe@REDACTED Thu Feb 2 16:11:46 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Thu, 02 Feb 2006 16:11:46 +0100 Subject: New Tutorial - Writing an Erlang Port Using OTP Principles In-Reply-To: <874q3ig0h9.fsf@coco.kazmier.com> References: <874q3ig0h9.fsf@coco.kazmier.com> Message-ID: Pete Kazmier wrote: > Over the past two months, I've been slowly working on a new tutorial > for the Erlang community. Here is the abstract: > > This guide shows you how to write an Erlang program that > communicates with an external Python echo server. It will also > demonstrate the use of several Erlang concepts including ports, > gen_servers, supervisors, and applications. > > Here is a link to the tutorial: > > http://www.kazmier.com/computer/port-howto/ > > If it is well-received, perhaps it could be included in the How-To > section of the trapexit.org site. > > Thanks, > Pete > Great work! I think you should upload it to trapexit.org. Note however that there exist no easy way to upload pictures etc, so perhaps you can have a full URL reference pointing to your png file. Cheers, Tobbe From serge@REDACTED Thu Feb 2 16:19:44 2006 From: serge@REDACTED (Serge Aleynikov) Date: Thu, 02 Feb 2006 10:19:44 -0500 Subject: list_to_atom use in kernel/error_logger.erl In-Reply-To: <43E20769.5090706@erix.ericsson.se> References: <43E05080.6070805@hq.idt.net> <17377.10977.478403.262239@antilipe.corelatus.se> <43E1457C.1020101@hq.idt.net> <43E20769.5090706@erix.ericsson.se> Message-ID: <43E22310.3090302@hq.idt.net> I believe what you are referring to is actually a small issue with the application_controller rather than error_logger. If the following patch is applied to the application_controller then the logging problem at system startup that you indicated will be more readable and you could remove the list_to_atom(L) in the error_logger.erl. --- kernel-2.10.12/src/application_controller.erl Fri Jan 27 17:17:31 2006 +++ lib/kernel/src/application_controller.erl Thu Feb 2 10:12:01 2006 @@ -1932,6 +1932,6 @@ true -> Term; false -> - lists:flatten(io_lib:write(Term)) + lists:flatten(io_lib:format("~p", [Term])) end, lists:sublist(Str, 199). Regards, Serge Gunilla Arendt wrote: > Serge Aleynikov wrote: > >> >> Thank you for clarification. The reason I looked into the >> error_logger's code was indeed related to the ugly format of the >> displayed message upon an unsuccessful startup with a -boot option. >> >> Though I still don't understand the need for list_to_atom(L) there. >> Why not just return the list L? It does work either way. >> > > I haven't tried to verify this, but my guess would be that someone tried > to make the output from error_logger more readable in the case where > the Erlang run-time system fails to start. > > For example, if an application in the boot script fails to start, you > will see something like this: > > $ erl > {error_logger,{{2006,2,2},{14,11,52}},'Protocol: ~p: register error: > ~p~n',[inet_tcp,{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1},{ne > > t_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{n > > et_kernel,init,1},{gen_server,init_it,6},{proc_lib,init_p,5}]}]} > ... > > which is of course somewhat more readable than > > {error_logger,{{2006,2,2},{14,11,52}},[80,114,111,116,111,99,111,108,58,32,126,1 > > 12,58,32,114,101,103,105,115,116,101,114,32,101,114,114,111,114,58,32,126,112,12 > > 6,110],[inet_tcp,{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1},{ne > > t_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{n > > et_kernel,init,1},{gen_server,init_it,6},{proc_lib,init_p,5}]}]} > ... > > / Gunilla > > > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From ulf.wiger@REDACTED Thu Feb 2 16:57:24 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 2 Feb 2006 16:57:24 +0100 Subject: Memoization in Erlang? Message-ID: Thomas Johnsson > > > What, you can do function equality in Erlang?? > I hadn't realized.... You mean I actually have to verify my suggestions before posting them? ;) I will admit that I just plainly assumed that it would work. My original suggestion was to use erlang:fun_info(F) as a key. > That's highly dubious ... When are two function > equal according the the Erlang implementation? Snipped from utils.c in erts/emulator/beam: case FUN_SUBTAG: { ErlFunThing* f1; ErlFunThing* f2; int num_free; int i; if (is_not_fun(b)) return 0; f1 = (ErlFunThing *) fun_val(a); f2 = (ErlFunThing *) fun_val(b); if (f1->fe->module != f2->fe->module || f1->fe->old_index != f2->fe->old_index || f1->fe->old_uniq != f2->fe->old_uniq || f1->num_free != f2->num_free) { return 0; } num_free = f1->num_free; for (i = 0; i < num_free; i++) { if (!EQ(f1->env[i], f2->env[i])) { return 0; } } return 1; } I think this validates my claim. > 25> fun()-> x end. > #Fun > 26> (fun()-> x end) == (fun()-> x end). > true ...which is fine. > 27> (fun(X)-> X end) == (fun(X)-> X end). > true ...also fine. > 28> (fun(X)-> 2*X end) == (fun(X)-> X+X end). > false Seems ok. They are not equal, but equivalent. > 29> (fun(X)-> X end) == (fun(Y)-> Y end). > false Again, equivalent, but not equal: 5> erlang:fun_info((fun(X) -> X end),env). {env,[[], none, {eval,#Fun}, [{clause,1,[{var,1,'X'}],[],[{var,1,'X'}]}]]} 6> erlang:fun_info((fun(Y) -> Y end),env). {env,[[], none, {eval,#Fun}, [{clause,1,[{var,1,'Y'}],[],[{var,1,'Y'}]}]]} In practice for compiled code, two funs in the same module will still have different indexes, so comparing the environments will not happen. In the shell, it _does_ seem to happen. For the memoization support, if two equivalent functions are compared and found to differ, that means that you will evaluatem once separately, which is probably OK. For memoization to work the functions need to be free from side-effects, so the end result will be slightly worse performance (essentially a cache miss). /Uffe From mickael.remond@REDACTED Thu Feb 2 17:13:55 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Thu, 2 Feb 2006 17:13:55 +0100 Subject: Erlang support offer officially launched Message-ID: <20060202161355.GA20310@memphis.ilius.fr> Hello, I just wanted to let you know that Process-one has officially launched its Erlang support offer. For those who were not present at the last Erlang User Conference, Process-one is a company founded last year by Erlang experts and focusing on clustering and high-availability. Our flagship development is ejabberd, an Erlang based instant messaging server. We have just an Erlang support offer. This offer is completing our ejabberd support offer launched last year. It is targeted to development team, as well as system administration team that need to cope with Erlang applications. The support team is composed of experienced Erlang developers that have worked on large Erlang systems. You can find more details here: http://www.process-one.net/en/services/support/erlang.html Do not hesitate to contact us if you need direct Erlang language support. Best wishes, -- Micka?l R?mond http://www.process-one.net/ From richardc@REDACTED Thu Feb 2 17:57:59 2006 From: richardc@REDACTED (Richard Carlsson) Date: Thu, 02 Feb 2006 17:57:59 +0100 Subject: edoc feature request In-Reply-To: <200602020828.11775.ft@it.su.se> References: <43E11140.2020200@hq.idt.net> <43E12AB7.3050206@csd.uu.se> <43E12C35.3070802@hq.idt.net> <200602020828.11775.ft@it.su.se> Message-ID: <43E23A17.9000103@csd.uu.se> Fredrik Thulin wrote: > On Wednesday 01 February 2006 22:46, Serge Aleynikov wrote: > >>I meant to have an option to instruct edoc to exit the emulator on >>error (rather than to have the option to provide an exit code). As >>far as the exit code value is concerned, a non-zero value would >>suffice. > > I would vote for just making edoc return non-zero on error (like you > suggested) by default. Always. Try the attached modules and see if it's what you want. /Richard -- "Having users is like optimization: the wise course is to delay it." -- Paul Graham -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: edoc_run.erl URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: edoc_doclet.erl URL: From richardc@REDACTED Thu Feb 2 19:24:09 2006 From: richardc@REDACTED (Richard Carlsson) Date: Thu, 02 Feb 2006 19:24:09 +0100 Subject: edoc feature request In-Reply-To: <43E23F7C.30306@hq.idt.net> References: <43E11140.2020200@hq.idt.net> <43E12AB7.3050206@csd.uu.se> <43E12C35.3070802@hq.idt.net> <200602020828.11775.ft@it.su.se> <43E23A17.9000103@csd.uu.se> <43E23F7C.30306@hq.idt.net> Message-ID: <43E24E49.9030009@csd.uu.se> Serge Aleynikov wrote: > Looks good! > > Also, I'd like to remind you about the other patch I sent some time back: Sorry about that. I haven't forgotten it, but it always seems to slip to the bottom of the heap. I think I'll include it pretty much as it is, and leave the other navigation improvements that I'd like to do for another time. /Richard From event@REDACTED Thu Feb 2 15:04:53 2006 From: event@REDACTED (event@REDACTED) Date: Thu, 02 Feb 2006 15:04:53 +0100 Subject: UITP'06: First call for papers Message-ID: <43E21185.8050906@ags.uni-sb.de> [Apologies if you receive multiple copies] CALL FOR PAPERS User Interfaces for Theorem Provers, UITP 2006 A satellite workshop of FLoC'06 Seattle, USA, Monday August 21st 2006 http://www.ags.uni-sb.de/~omega/workshops/UITP06/ The User Interfaces for Theorem Provers workshop series brings together researchers interested in designing, developing and evaluating interfaces for interactive proof systems, such as theorem provers, formal method tools, and other tools manipulating and presenting mathematical formulas. While the reasoning capabilities of interactive proof systems have increased dramatically over the last years, the system interfaces have often not enjoyed the same attention as the proof engines themselves. In many cases, interfaces remain relatively basic and under-designed. Initial studies by HCI (Human-Computer Interaction) practitioners and theorem-prover developers working in collaboration have had promising early results, but much remains to be investigated. The User Interfaces for Theorem Provers workshop series provides a forum for researchers interested in improving human interaction with proof systems. We welcome participation and contributions from the theorem proving, formal methods and tools, and HCI communities, both to report on experience with existing systems, and to discuss new directions. UITP 2006 is a one-day workshop to be held on Monday, August 21st 2006 in Seattle, USA, as a FLoC'06 workshop. Submissions We encourage submission of short abstracts or papers (from 4--20 pages). Submissions will be reviewed by the program committee. We will invite authors of accepted submissions to talk at the workshop (slots of 20--30 minutes are expected). Submissions presented at the workshop will be included in informal proceedings to be distributed at the workshop and made available electronically afterward. Suggested topics include, but are not restricted to: * Novel and traditional interfaces for interactive proof systems including: - command line based user interfaces - graphical user interfaces - natural language based user interfaces * Bridging the gap between human-oriented and machine-oriented proofs * Design principles for interfaces * Representation languages for proofs and mathematical objects * Tools for exploration, visualization and explanation of mathematical objects and proofs * User-evaluation of interfaces * Integration of proof systems into e-learning environments * Web-based services for proof systems * Implementation experiences * System descriptions Authors are encouraged to bring along versions of their systems suitable for informal demonstration during breaks in the program of talks. The workshop proceedings will be distributed at the workshop as a collection of the accepted papers. Final versions of accepted papers have to be prepared with LaTeX. Following up the workshop the (revised) accepted papers will be published in a volume of ENTCS devoted to the workshop. Dates Deadline for submissions: May 15th 2006 Notification: June 20th 2006 Final versions due: July 10th 2006 Workshop: August 21st 2006 Submission is via EasyChair (thanks to Andrei Voronkov) http://www.easychair.org/UITP-06/ More information can be found on the UITP web page at http://www.ags.uni-sb.de/~omega/workshops/UITP06/ Program Committee David Aspinall (University of Edinburgh, UK) Yves Bertot (INRIA Sophia Antiplois, France) Paul Cairns (University College London, UK) Ewen Denney (NASA Ames Research Center, USA) Christoph L?th (University of Bremen, Germany) Michael Norrish (NICTA, Australia) Florina Piroi (RISC Linz, Austria) Aarne Ranta (Chalmers University, Sweden) Makarius M. M. Wenzel (Technical University Munich, Germany) Organizers and PC Chairs Serge Autexier (DFKI, Germany) Christoph Benzm?ller (Saarland University, Germany) -- Serge Autexier Tel: +49-681-302-2133 DFKI GmbH & Fax: +49-681-302-5076 Informatics, Saarland University Email: autexier@REDACTED 66123 Saarbruecken WWW: www.dfki.de/~serge/ ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From event@REDACTED Thu Feb 2 12:38:48 2006 From: event@REDACTED (event@REDACTED) Date: Thu, 02 Feb 2006 12:38:48 +0100 Subject: Research position in constraints and CHR In-Reply-To: <43D8A2F5.6000400@uni-ulm.de> References: <43D8A2F5.6000400@uni-ulm.de> Message-ID: <43E1EF48.1080908@uni-ulm.de> Please pass this message on to whoever you think may be interested. DOCTORAL/POSTDOCTORAL RESEARCH POSITION IN CONSTRAINT SOLVING AND PROGRAMMING University of Ulm, Germany A research position is available for Ph.D. students or postdocs at the Faculty of Computer Science, University of Ulm, Department of Software Engineering and Compiler Construction in the area of Constraint Handling Rules (CHR). The successful applicant will be responsible for a research project funded by the German Research Foundation DFG. Its topic is the specification, generation, implementation and analysis of rule-based algorithms for solving of global constraints in CHR. The position thus requires knowledge and interest in one or more of the aforementioned areas. At least a master or equivalent in computer science or strongly related area is required. The initial appointment will be for two years, beginning as soon as possible, with a possible renewal for another two years depending on the evaluation of the research foundation. Gross salary is 56.400 Euro a year according to assistant position BAT IIa. It includes health and social insurance. Additional money for conference travel and visit of the advanced summer school on global constraints will be provided. Ulm is a pleasant city of 150.000 on the Danube, with nearby rocks for free- climbing, close to Stuttgart, Munich, the Alps, and Lake Konstanz. Every day life requires a basic command of German. Prospective applicants should email their resume with three references, and link to homepage and publications if available, to our secretary Claudia Hammer at hammer@REDACTED by February 28th, 2006, or until the position is filled. Prof. Thom Fruehwirth c/o Claudia Hammer University of Ulm Faculty of Computer Science Department PM D-89069 Ulm, Germany Email: hammer@REDACTED WWW: http://www.informatik.uni-ulm.de/pm/mitarbeiter/fruehwirth/ CHR: http://www.cs.kuleuven.be/~dtai/projects/CHR/ The University of Ulm aims to increase the representation of women in research and teaching and therefore expressly encourages female scientists to apply. Disabled applicants with relevant qualifications will be given priority. ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From serge@REDACTED Thu Feb 2 14:14:18 2006 From: serge@REDACTED (Serge Aleynikov) Date: Thu, 02 Feb 2006 08:14:18 -0500 Subject: edoc feature request In-Reply-To: <43E1CA47.9090105@csd.uu.se> References: <43E11140.2020200@hq.idt.net> <43E12AB7.3050206@csd.uu.se> <43E12C35.3070802@hq.idt.net> <200602020828.11775.ft@it.su.se> <43E1CA47.9090105@csd.uu.se> Message-ID: <43E205AA.6060709@hq.idt.net> I already raised this question on the list, but did not get a definitive answer. :-( So, I would definitely vote for adding to the OTP: init:stop(OsExitCode) Serge P.S. Attached patch should help. Richard Carlsson wrote: > Fredrik Thulin wrote: > >>I would vote for just making edoc return non-zero on error (like you >>suggested) by default. Always. >> >>Since, as far as I understand your original problem description, there >>hasn't been any difference in the exit code of the edoc beam process >>there can't be any scripts that depend on it today, so backwards >>compatibility is not an issue. > > > The main snag seems to be that if I use halt(NonZero), the emulator > is often in such a hurry to quit that not all I/O has time to finish, > which means that you might not see the message explaining what the > problem was. So it was a design decision to not use halt, but instead > rely on the final "-s init stop" in the command-line invocation. > > Sadly, there is no init:stop/1 which could be used to terminate nicely > *and* return an exit code. It would be pretty trivial to add (if OTP > would accept it), but that would not solve the problem for edoc until > the next release of OTP (and assuming that all users switch to the > new system). > > I could add a small delay before calling halt(NonZero) upon errors, > if that's the only other way out of the problem. It's not a pretty > solution, but what the heck. > > If anybody knows a good way to shut down the system nicely but as > quick as possible and with a particular exit code, please let me know. > > >>If there _are_ scripts/makefiles that check the exit status already, I >>bet they all think edoc exits with a non-zero exit value on errors. > > > Probably. It would be nice if it worked, too. > > /Richard > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: init.erl URL: -------------- next part -------------- An embedded message was scrubbed... From: Serge Aleynikov Subject: Re: emulator exit Date: Thu, 04 Aug 2005 09:42:41 -0400 Size: 3340 URL: From ulf.wiger@REDACTED Thu Feb 2 22:52:42 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 2 Feb 2006 22:52:42 +0100 Subject: who teaches erlang? Message-ID: Poll: Raise your hand, anyone who knows of a university that teaches Erlang. I'm trying to compile a list for internal use. You are welcome to backmail me. I much prefer duplicates to no responses at all. I'll report the results to the list. /Uffe From tobbe@REDACTED Thu Feb 2 23:40:50 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Thu, 02 Feb 2006 23:40:50 +0100 Subject: bug in asn1rt_ber_bin.erl Message-ID: Hi, I have the following ASN.1 declaration: Flags ::= BIT STRING (SIZE (32..MAX)) This gives me a badarith crash: {error,{asn1,{badarith,[{asn1rt_ber_bin,encode_bit_string_bits,4},... As far as I can understand, bit strings can have an arbitary length (?), thus I guess the above declaration means that the bitstring at least should contain 32 bits. Anyway, I made a quick fix which I attach. Btw: I'm running R10B-9 and asn1-1.4.4.9 Cheers, Tobbe -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: asn1rt_ber_bin.erl.diff URL: From ulf.wiger@REDACTED Fri Feb 3 09:28:41 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 3 Feb 2006 09:28:41 +0100 Subject: who teaches erlang? Message-ID: Let me qualify the question further: It doesn't have to be a specific Erlang course. As far as I'm concerned, if students are introduced to Erlang in some parallell systems or distributed programming course, that qualifies. That's how I was introduced to Erlang, btw: Bjarne D?cker and Robert Virding taught a course at the Royal Institute of Technology in Stockholm -- "Computers in Telecom Systems", and some lectures and a lab(*) introduced Erlang. I'm also interested in what universities have post-graduate work involving Erlang. So far, I've been told about the obvious ones: - Uppsala University - Chalmers and the G?teborg IT University I *know* the list is longer than that. ;) The first one to give me a name that wasn't already on my list wins a free beer at the next gathering. /Uffe (*) Not just _some_ lab -- it was the famous POTS lab. Quite a treat! > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Ulf > Wiger (AL/EAB) > Sent: den 2 februari 2006 22:53 > To: erlang-questions@REDACTED > Subject: who teaches erlang? > > > Poll: > Raise your hand, anyone who knows of a > university that teaches Erlang. > > I'm trying to compile a list for internal use. > > You are welcome to backmail me. > I much prefer duplicates to no responses at all. > > I'll report the results to the list. > > /Uffe > From bengt.kleberg@REDACTED Fri Feb 3 09:40:56 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Fri, 03 Feb 2006 09:40:56 +0100 Subject: reading suggestion: DTrace article at ACMqueue Message-ID: <43E31718.2000209@ericsson.com> greetings, nice article about DTrace at ACM http://acmqueue.org/modules.php?name=Content&pa=showpage&pid=361 bengt From bertil.karlsson@REDACTED Fri Feb 3 09:41:39 2006 From: bertil.karlsson@REDACTED (Bertil Karlsson) Date: Fri, 03 Feb 2006 09:41:39 +0100 Subject: bug in asn1rt_ber_bin.erl In-Reply-To: References: Message-ID: <43E31743.6090606@ericsson.com> Hi, thank you, I will fix this into next patch. I'll also check the other asn1rt_ modules. /Bertil Torbjorn Tornkvist wrote: > Hi, > > I have the following ASN.1 declaration: > > Flags ::= BIT STRING (SIZE (32..MAX)) > > This gives me a badarith crash: > > {error,{asn1,{badarith,[{asn1rt_ber_bin,encode_bit_string_bits,4},... > > As far as I can understand, bit strings can have an arbitary length > (?), thus I guess the above declaration means that the bitstring at > least should contain 32 bits. > > Anyway, I made a quick fix which I attach. > > Btw: I'm running R10B-9 and asn1-1.4.4.9 > > Cheers, Tobbe > From vlad_dumitrescu@REDACTED Fri Feb 3 09:58:09 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Fri, 3 Feb 2006 09:58:09 +0100 Subject: Erlang.org site update Message-ID: Hi! Now that the site is up and running again, I wonder if it's such a good impression it makes on any newcomer when the latest news are from July 2005, and 2004 before that? Notices about releases and the EUC could make it to the news list, but there certainly are more than that. I know it's not top priority, but an update could be done at least when there's a new release. best regards, Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas@REDACTED Fri Feb 3 10:37:01 2006 From: thomas@REDACTED (Thomas Johnsson) Date: Fri, 03 Feb 2006 10:37:01 +0100 Subject: Memoization in Erlang? In-Reply-To: References: Message-ID: <43E3243D.1070404@skri.net> Ulf Wiger (AL/EAB) wrote: >Thomas Johnsson > > >>What, you can do function equality in Erlang?? >>I hadn't realized.... >> >> > >You mean I actually have to verify my >suggestions before posting them? ;) > >I will admit that I just plainly assumed >that it would work. My original suggestion >was to use erlang:fun_info(F) as a key. > > > >>That's highly dubious ... When are two function >>equal according the the Erlang implementation? >> >> My point was that it *shouldn't* work (:-) The traditional view is that two function are equal iff for same arguments they return the same result. Ie undecidable since the number of possible arguments is infinite. In my opinion, in Erlang an attempt to compare two functions should cause a run time error. -- Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From gunilla@REDACTED Fri Feb 3 10:58:29 2006 From: gunilla@REDACTED (Gunilla Arendt) Date: Fri, 03 Feb 2006 10:58:29 +0100 Subject: list_to_atom use in kernel/error_logger.erl In-Reply-To: <43E22310.3090302@hq.idt.net> References: <43E05080.6070805@hq.idt.net> <17377.10977.478403.262239@antilipe.corelatus.se> <43E1457C.1020101@hq.idt.net> <43E20769.5090706@erix.ericsson.se> <43E22310.3090302@hq.idt.net> Message-ID: <43E32945.9060201@erix.ericsson.se> Clarification: I should have added that I think list_to_atom/1 is in error_logger for *historical reasons*, i.e. my guess is that it's a remnant from a time when erlang:display/1 displayed strings as list of ascii codes. Nowadays, erlang:display/1 can handle strings as well as atoms and the call to list_to_atom/1 is indeed superfluous. That said, I would like to point out that messages to error_logger could be sent from any process, so it is (was) not an application_controller issue. It is true that application_controller sends lists to error_logger, but so could any other process. Also, the code snippet you refer to actually has to do with the exit reason of the application_controller process, not an error report. / Gunilla Serge Aleynikov wrote: > I believe what you are referring to is actually a small issue with the > application_controller rather than error_logger. If the following patch > is applied to the application_controller then the logging problem at > system startup that you indicated will be more readable and you could > remove the list_to_atom(L) in the error_logger.erl. > > --- kernel-2.10.12/src/application_controller.erl Fri Jan 27 17:17:31 2006 > +++ lib/kernel/src/application_controller.erl Thu Feb 2 10:12:01 2006 > @@ -1932,6 +1932,6 @@ > true -> > Term; > false -> > - lists:flatten(io_lib:write(Term)) > + lists:flatten(io_lib:format("~p", [Term])) > end, > lists:sublist(Str, 199). > > Regards, > > Serge > > Gunilla Arendt wrote: > >> Serge Aleynikov wrote: >> >>> >>> Thank you for clarification. The reason I looked into the >>> error_logger's code was indeed related to the ugly format of the >>> displayed message upon an unsuccessful startup with a -boot option. >>> >>> Though I still don't understand the need for list_to_atom(L) there. >>> Why not just return the list L? It does work either way. >>> >> >> I haven't tried to verify this, but my guess would be that someone tried >> to make the output from error_logger more readable in the case where >> the Erlang run-time system fails to start. >> >> For example, if an application in the boot script fails to start, you >> will see something like this: >> >> $ erl >> {error_logger,{{2006,2,2},{14,11,52}},'Protocol: ~p: register error: >> ~p~n',[inet_tcp,{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1},{ne >> >> t_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{n >> >> et_kernel,init,1},{gen_server,init_it,6},{proc_lib,init_p,5}]}]} >> ... >> >> which is of course somewhat more readable than >> >> {error_logger,{{2006,2,2},{14,11,52}},[80,114,111,116,111,99,111,108,58,32,126,1 >> >> 12,58,32,114,101,103,105,115,116,101,114,32,101,114,114,111,114,58,32,126,112,12 >> >> 6,110],[inet_tcp,{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1},{ne >> >> t_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{n >> >> et_kernel,init,1},{gen_server,init_it,6},{proc_lib,init_p,5}]}]} >> ... >> >> / Gunilla >> >> >> > From ulf.wiger@REDACTED Fri Feb 3 11:17:40 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 3 Feb 2006 11:17:40 +0100 Subject: Memoization in Erlang? Message-ID: Why? The comparison returns true if: - it's the *same code* - All bindings in the two functions are equal - Otherwise, the functions might still be observably equal, but that is, as you say, undecidable. I'd settle for the implemented version of function equality, especially since the alternative would be, as you say, a runtime error. But of course, I'm not an academic. /Uffe ________________________________ From: Thomas Johnsson [mailto:thomas@REDACTED] Sent: den 3 februari 2006 10:37 To: Ulf Wiger (AL/EAB) Cc: erlang-questions@REDACTED Subject: Re: Memoization in Erlang? Ulf Wiger (AL/EAB) wrote: Thomas Johnsson What, you can do function equality in Erlang?? I hadn't realized.... You mean I actually have to verify my suggestions before posting them? ;) I will admit that I just plainly assumed that it would work. My original suggestion was to use erlang:fun_info(F) as a key. That's highly dubious ... When are two function equal according the the Erlang implementation? My point was that it *shouldn't* work (:-) The traditional view is that two function are equal iff for same arguments they return the same result. Ie undecidable since the number of possible arguments is infinite. In my opinion, in Erlang an attempt to compare two functions should cause a run time error. -- Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From kostis@REDACTED Fri Feb 3 11:30:45 2006 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 3 Feb 2006 11:30:45 +0100 (MET) Subject: Memoization in Erlang? In-Reply-To: Mail from '"Ulf Wiger \(AL/EAB\)" ' dated: Fri, 3 Feb 2006 11:17:40 +0100 Message-ID: <200602031030.k13AUjIe004779@spikklubban.it.uu.se> > I'd settle for the implemented version of function equality, > especially since the alternative would be, as you say, > a runtime error. > > But of course, I'm not an academic. I am an academic and the implemented function equality, based on syntactic rather than semantic equality, does not bother me at all. Kostis From dietmar@REDACTED Fri Feb 3 12:57:11 2006 From: dietmar@REDACTED (Dietmar Schaefer) Date: Fri, 03 Feb 2006 12:57:11 +0100 Subject: Our success story Message-ID: <43E34517.2040701@ast.dfs.de> All you erlang wizards ! I can report two success stories - not only personaly but also an Erlang one ! As I already mentioned before I successfully implemented a distributed SNMP agent using Erlang for our product! The results were very pleasing and the features Erlang provided to us are still very promising. First, a peer team within our department, successfully created a prototype system of their Air Traffic Information System in very short time. They had to implement the following requirments: - distributed and fault tolerant - web based - using database persistency I convinced their team leader to evaluate: - Erlang - Yaws - Mnesia The persentation of their results was well appriciated by the audiance! Now, the next step will be to convince the line management of our organisation. Second, based on what we leaned about Erlang, we are now moving forward to design the next generation of our air traffic mangement system. The legacy product is based on PVM, written mainly in C++, it's distributed, and almost fault tolerant. We are now planning to incorparate Mnesia, the Supervisor concept and OTP to achive a better maintainability, conceptual integrity (Thank you Joe - it's an important point !), higher fault tolerance. Unfortunalty, we cannot get rid of all the C++ based functionality but the idea is to integrate the leagacy C++ code as smoothly as possible into our new Erlang based product. Let's see how far we can get. regards Dietmar From raimo@REDACTED Fri Feb 3 13:09:38 2006 From: raimo@REDACTED (Raimo Niskanen) Date: 03 Feb 2006 13:09:38 +0100 Subject: erlang.org and erlang.se are UP! Message-ID: Our webservers www.erlang.org and www.erlang.se are up and running again. Almost. Mail list archive and some other features are still not restored, but we are working on it... -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From disita@REDACTED Fri Feb 3 14:48:14 2006 From: disita@REDACTED (DISIT) Date: Fri, 3 Feb 2006 14:48:14 +0100 Subject: Call For Papers of ICECCS2006 and AXMEDIS2006 Message-ID: <200602031348.k13DmEIA032624@oboe.dsi.unifi.it> Dear Erlang Questions You are cordially invited to Submitt a paper to the following conferences: -- 11th IEEE International Conference on Engineering of Complex Computer Systems (ICEECS 2006), Co-located with Computational Systems Bioinformatics (CSB 2006) Stanford University, CA, USA, 14-18 August 2006, http://www.iceccs.org -- 2nd International Conference on Automated Production of Cross Media Content for Multi-channel Distribution, IEEE press proc., Leeds, UK, 13-15 December 2006. http://www.axmedis.org/axmedis2006 Sorry for multiple reception of this email, and please pass this email to other collegues that could be interested in the above events. In the following, and on the web site you may find more details. Best wishes, Paolo Nesi _+_+_+_+_+_+_+_+_+_+ ICEECS 2006 Call for Papers _+_+_+_+_+_+_+_+_+_+ ICEECS Call for Papers 11th IEEE International Conference on Engineering of Complex Computer Systems Co-located with Computational Systems Bioinformatics (CSB 2006) Sponsored by: IEEE Computer Society, IEEE Technical Committee on Complexity in Computing NASA Goddard Space Flight Center, NASA Software Engineering Laboratory Stanford University, CA, USA, 10-14 August 2006. With the ever expanding range of computing platforms and applications, system complexity is on the rise. Increasing intelligence and autonomics in today?s systems requires innovative approaches to address these concomitant complexity issues. At this cross-section of volume and complexity, current technologies are often ineffective at coping with the demands for quality computer systems. Manifold dependencies between the critical software, hardware, communications, and human elements now drive computer system and software architectures. Complexity of software systems has grown significantly, pervading several key application areas including Manufacturing, Communications, Transportation, Internet, Entertainment, Mobile, Healthcare, Aerospace, and Energy. These systems are frequently distributed over heterogeneous networks, involving Internet technologies. Inundated by temporal constraints, boundless functionalities, complex algorithms, distributed and mobile architectures, security constraints, reliability, high performance, interoperability, security, and the like, these complexities are further weighing down development and evolution of today?s software systems and ultimately the organizations they serve. The goal of this conference is to assemble industrial, academic and government experts, from a variety of user domains and software disciplines, to examine key complexity problems and effective solutions. Researchers, practitioners, tool developers and users, and technology transition experts are all welcome. The scope of the interest includes long-term research, near-term complex system requirements and promising tools, existing systems, and commercially available tools. Topic Areas: Papers are solicited in all areas related to complex computer-based systems, including the causes of complexity and means of avoiding, controlling, or coping with complexity. Topic areas include, but are not limited to: -System and software architecture and system engineering -Tools, environments, and languages for complex systems -Formal methods and approaches to manage and control complex systems -Integration of heterogeneous technologies -Software and system development and control processes for complex systems -Human factors and collaborative aspects -Interoperability and standardization -Systems and software safety and security -Industrial automation, embedded and/or real time systems -Content production and distribution systems, mobile and multi-channel systems -Software complexity visualization -Virtual environments for managing complexity Paper Submissions: Research papers, case studies, lessons learned, status reports, and discussions of practical problems faced by industry and user domains are all welcome submissions. For review, submissions are divided into two categories: Technical Papers and Experience Reports. Submitted papers should be formatted in the style of IEEE-Computer Society Format: http://www.computer.org/cspress/instruct.htm. Submitted manuscripts must be in English and should be no longer than 4000 words or 10 formatted pages. Authors of accepted papers will be required to sign a copyright release form. IEEE Computer Society Press will publish the proceedings. Submission Procedure: Please email your manuscripts in PDF format to the program chairs listed above. Panels and Special Sections: Proposals (1 page) for organizing panels and special sections should be sent to the general and program chairs via email. In both cases, the list of confirmed people involved should be included. Deadlines - 19 February, 2006 Paper submission - 7 April, 2006 Notification of acceptance - 19 May, 2006 Camera ready papers - 10-14 August, 2006 Conference Committee: General Chair: - Michael G Hinchey, NASA Software Engineering Laboratory, Goddard Space Flight Center, Michael.G.Hinchey@REDACTED Program Co-Chairs - Americas: - Shawn Bohner, Virginia Tech, sbohner@REDACTED - Phil Laplante, Penn State, plaplante@REDACTED Program Co-Chair - Asia: - Zhiming Liu, United Nations University, IIST, Macao, lzm@REDACTED Program Co-Chairs - Europe: - Paolo Nesi, University of Florence, Italy, nesi@REDACTED - Jim Woodcock, University of York, UK, jim@REDACTED Publicity Chair: - Denis Gracanin, Virginia Tech _+_+_+_+_+_+_+_+_+_+ AXMEDIS 2006 Call for Papers _+_+_+_+_+_+_+_+_+_+ 2nd International Conference on Automated Production of Cross Media Content for Multi-channel Distribution, Leeds, UK, 13-15 December 2006. http://www.axmedis.org/axmedis2006 Recommended topics include, but are not limited to the following: * Automatic cross-media production, collection, crawling, composition, formatting, P2P, etc. * Formats and models for multi-channel content distribution * Multimedia standards, e.g. MPEG-7, MPEG-21, DMP, etc. * High quality audio visual coding * Multimedia music representation and formatting * Watermarking and fingerprinting techniques * GRID and distributed systems for content production * real-time streaming media distribution * Multimedia middleware * Workflow management systems * Web services for content distribution * Semantic Web * Distribution with P2P architectures * Legal aspects related to digital content * Collecting and clearing of rights and licences * Business, payment and transaction models * Digital Rights Management (DRM), models tools, and interoperability * Formats and tools for Content Aware * Archives managements for cultural and educational applications * Synchronisation technologies and solutions * Systems and approaches for content production/distribution on demand * Digital content user interface * Digital content accessibility * Novel applications and case-studies of relevant technologies The conference proceedings is to be published by the IEEE Computer Society Press. Selected papers from the conference will be considered for publication in special issues of one or more major peer-reviewed Journals in this domain. - Submission due: 18 March 2006 - Conference date: 13-15 December 2006 - Conference venue: University of Leeds, Leeds LS2 9JT, UK ----end---- From event@REDACTED Fri Feb 3 11:30:41 2006 From: event@REDACTED (event@REDACTED) Date: Fri, 03 Feb 2006 11:30:41 +0100 Subject: 2nd CFP: CLIMA Contest Message-ID: <43E330D1.7090300@cs.uu.nl> =================== 2nd Call for Submissions ================= Second CLIMA Contest in association with CLIMA VII / AAMAS 2006 May 8 2006 Future University, Hakodate, Japan http://cig.in.tu-clausthal.de/CLIMAContest/ =============================================================== Aim and Scope: This competition is an attempt to stimulate research in the area of multi-agent systems by 1- identifying key problems and 2- collecting suitable benchmarks that can serve as milestones for testing new approaches and techniques from computational logics. While there exist several competitions in various parts of artificial intelligence (theorem proving, planning, robo-cup etc) and, lately, also in specialised areas in agent systems (trading agents), the emphasis of this contest is on the use of 'computational logic' in (multi-)agent systems. We expect to promote the development of multi-agent systems by first identifying difficult problems and then finding solutions by comparing different approaches from computational logic for solving them. While this idea seems very appealing, it is not an easy task to come up with a particular scenario that serves as a basis for a contest. Such a scenario should be generic enough to be applicable for a wide range of techniques of computational logic, but it should also be precise enough so that different approaches can be tested and compared against each other. * Scenario description This competition is organised as part of CLIMA VII and consists of developing multi-agent systems to solve a cooperative task in a dynamically changing environment. The environment of the multi-agent system is a grid-like world where agents can move from one cell to a neighbouring cell if there is no agent or obstacle already in that cell. In this environment, gold can appear in the cells. Participating agent teams explore the environment, avoid obstacles and compete with another agent team for the gold in the environment. The agents of each team coordinate their actions in order to collect as much gold as they can and to deliver it to the depot where the gold is safely stored. Each agent is located in the grid environment and can perceive 1) its absolute positions in the grid environment, and 2) the content of its surrounding cells including the cell in which the agent is currently standing (9 cells in total). Agents have only a local view on their environment, their perceptions can be incomplete, and their actions may fail. The agents may have/play different roles (such as explorer or collector), communicate and cooperate in order to find and collect gold in an efficient and effective way. In this contest, participating agent teams will be randomly divided into groups. Each team from one group will compete against all other teams in the same group in a series of matches. The winners from these groups form new groups. Each team in a new group will again play against all other teams in the group in a series of matches. Each match between two competing teams will consist of several (odd number of) simulations. A simulation between two teams is a competition between them with respect to a certain starting configuration of the environment. Winning a simulation yields 3 points for the team, draw 1 point and loss 0. The winner of the whole tournament is evaluated on the basis of the overall number of collected points in the matches during the tournament. We encourage submissions that specify and design a multi-agent system in terms of high-level concepts such as goals, beliefs, plans, roles, communication, coordination, negotiation, and dialogue in order to generate an efficient and effective solution for the above mentioned application. Moreover, the use of computational logic techniques (e.g., logic programming, formal calculi, etc.)in the implementations of multi-agent system is appreciated. A challenge of this competition is to use computational logic techniques to provide implemented models for the abstract concepts that are used in the specification and design of multi-agent systems. These implemented models should be integrated to implement the above-mentioned application intuitively, directly, and effectively. * Participation requirements: The participation in this contest consists of two parts: 1- Submission of the description of analysis, design and implementation of a multi-agent system for the above application. Existing multi-agent system methodologies such as Gaia, Prometheus or Tropos can be used (not demanded) to describe the analysis and design of the system. For the description of the implementation, it should be explained how the design is implemented. This can be done by explaining, for example, which computational logic techniques are used to implement certain aspects of the multi-agent system (including issues related to individual agents). The maximum length of this description is 5 pages according to the LNCS format. 2) Participation in the contest tournament by means of an (executable) implementation of a multi-agent system. The agents from each participating multi-agent systems (agent teams) will be executed locally (on the participant's hardware) while the simulated environment, in which all agents from competing teams perform actions, is run on the remote contest simulation server. The interaction/communication between agents from one team should be managed locally, but the interaction between individual agents and their environment (run on the simulation server) will be via Internet. Participating agents connect to the simulation server that provides the information about the environment. Each agent from each team should connect and communicate to the simulation server using one TCP connection. Furthertechnical details on how to participate in this contest can be found on the contest webpage (http://cig.in.tu-clausthal.de/CLIMAContest/). The source code together with instructions on how to install it including precise instructions on software and hardware requirements should be submitted just before the competition starts. * How To Submit: Please submit a 5 page description of your solution to Mehdi Dastani (mehdi@REDACTED). Several days before the start of the competition, the contest organisers will contact participants via e-mail with details on time and Internet coordinates (IP addresses/ports) of the simulation server. * Important Dates: * Submission of the description : February 10, 2006 * Notification : February 24, 2006 * Camera-Ready of the description : March 10, 2006 * Competition : TBA (in April) * Winner announcement : May 8, 2006 (at CLIMA) * Winning Criteria: The winner of the contest will be the best performing team with the highest number of points from the tournament. The original, innovative, and effective application of computational logic techniques in solving specific multi-agent issues identified in this application will influence the final decision. -- Mehdi Dastani Intelligent Systems Group Utrecht University P.O.Box 80.089 3508 TB Utrecht The Netherlands Tel: +31 - 30 - 253 3599 Fax: +31 - 30 - 251 3791 URL: http://www.cs.uu.nl/~mehdi ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From sam@REDACTED Fri Feb 3 12:48:20 2006 From: sam@REDACTED (Samuel Tardieu) Date: Fri, 3 Feb 2006 12:48:20 +0100 Subject: who teaches erlang? In-Reply-To: References: Message-ID: <2006-02-03-12-48-20+trackit+sam@rfc1149.net> On 3/02, Ulf Wiger (AL/EAB) wrote: | It doesn't have to be a specific Erlang course. | As far as I'm concerned, if students are introduced | to Erlang in some parallell systems or distributed | programming course, that qualifies. At ENST (http://www.enst.fr/), we are currently reorganizing the classes. I used to teach Erlang in the distributed systems class a few years ago, but I stopped doing it because of time constraints for the class. Starting next year, I will lead a new course called "non-classical languages" so that our undergraduate students can see many different programming languages, concepts and styles. In this 60 hours class, I will teach Smalltalk, Haskell, Scheme, Forth and... Erlang of course! | The first one to give me a name that wasn't | already on my list wins a free beer at the next | gathering. :-) From mats.cronqvist@REDACTED Fri Feb 3 14:44:32 2006 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Fri, 03 Feb 2006 14:44:32 +0100 Subject: Vacancy at T-Mobile In-Reply-To: <001401c62429$01330de0$64020a0a@FEY> References: <43DB8CD1.60204@comcast.net> <001401c62429$01330de0$64020a0a@FEY> Message-ID: <43E35E40.5070700@ericsson.com> a bit off topic here... i saw an interesting plot on your website (http://waybettersoftware.com/programmerValue.html). what data is that based on? mats Alex Peake wrote: > interested in an Erlang job in the US? > > Drop me a line > From erlang@REDACTED Fri Feb 3 14:53:28 2006 From: erlang@REDACTED (Peter Lund) Date: Fri, 03 Feb 2006 14:53:28 +0100 Subject: who teaches erlang? In-Reply-To: <2006-02-03-12-48-20+trackit+sam@rfc1149.net> References: <2006-02-03-12-48-20+trackit+sam@rfc1149.net> Message-ID: <43E36058.1030206@lundata.se> Samuel Tardieu wrote: >Starting next year, I will lead a new course called "non-classical >languages" so that our undergraduate students can see many different >programming languages, concepts and styles. In this 60 hours class, I >will teach Smalltalk, Haskell, Scheme, Forth and... Erlang of course! > > "Non-classical" has a somewhat negative sound over it. Erlang I would like to put into the group of "Modern languages" or "Really useful languages" instead!! :) /Peter From serge@REDACTED Fri Feb 3 15:57:39 2006 From: serge@REDACTED (Serge Aleynikov) Date: Fri, 03 Feb 2006 09:57:39 -0500 Subject: list_to_atom use in kernel/error_logger.erl In-Reply-To: <43E32945.9060201@erix.ericsson.se> References: <43E05080.6070805@hq.idt.net> <17377.10977.478403.262239@antilipe.corelatus.se> <43E1457C.1020101@hq.idt.net> <43E20769.5090706@erix.ericsson.se> <43E22310.3090302@hq.idt.net> <43E32945.9060201@erix.ericsson.se> Message-ID: <43E36F63.9070206@hq.idt.net> Gunilla, Gunilla Arendt wrote: > Clarification: I should have added that I think list_to_atom/1 is in > error_logger for *historical reasons*, i.e. my guess is that it's a > remnant from a time when erlang:display/1 displayed strings as list of > ascii codes. Nowadays, erlang:display/1 can handle strings as well as > atoms and the call to list_to_atom/1 is indeed superfluous. Thanks for clarification! I agree with your thinking, however, since this simple error_logger is replaced with a standard error handler at startup, I assume it's logging is only essential for the startup functionality of the application_controller, which is a pretty imprortant place in troubleshooting startup issues. > That said, I would like to point out that messages to error_logger could > be sent from any process, so it is (was) not an application_controller > issue. It is true that application_controller sends lists to > error_logger, but so could any other process. Also, the code snippet you > refer to actually has to do with the exit reason of the > application_controller process, not an error report. As far as I understand you cannot use io_lib's functions for formatting error reports in that error_logger as they lead to a deadlock. Given so, I believe, it is extremely useful to see the failure reason printed readably. On the other hand, perheps when you are exposed to Erlang for quite a while, the difference between [80,114,111,116,111,99,111,108] and "Protocol" starts to evaporate, and you begin to think that the green flickering symbols on computer terminals in the "Matrix" movie do resemble people behind them... ;-) Serge P.S. I did apply the patch to my application_controller.erl, and I am quite happy now as I can read the starup failure reasons without opening erl and copying/pasting the failure printouts in the shell like this: (a@REDACTED)2> [80,114,111,116,111,99,111,108]. "Protocol" > Serge Aleynikov wrote: > >> I believe what you are referring to is actually a small issue with the >> application_controller rather than error_logger. If the following >> patch is applied to the application_controller then the logging >> problem at system startup that you indicated will be more readable and >> you could remove the list_to_atom(L) in the error_logger.erl. >> >> --- kernel-2.10.12/src/application_controller.erl Fri Jan 27 17:17:31 >> 2006 >> +++ lib/kernel/src/application_controller.erl Thu Feb 2 10:12:01 2006 >> @@ -1932,6 +1932,6 @@ >> true -> >> Term; >> false -> >> - lists:flatten(io_lib:write(Term)) >> + lists:flatten(io_lib:format("~p", [Term])) >> end, >> lists:sublist(Str, 199). >> >> Regards, >> >> Serge >> >> Gunilla Arendt wrote: >> >>> Serge Aleynikov wrote: >>> >>>> >>>> Thank you for clarification. The reason I looked into the >>>> error_logger's code was indeed related to the ugly format of the >>>> displayed message upon an unsuccessful startup with a -boot option. >>>> >>>> Though I still don't understand the need for list_to_atom(L) there. >>>> Why not just return the list L? It does work either way. >>>> >>> >>> I haven't tried to verify this, but my guess would be that someone tried >>> to make the output from error_logger more readable in the case where >>> the Erlang run-time system fails to start. >>> >>> For example, if an application in the boot script fails to start, you >>> will see something like this: >>> >>> $ erl >>> {error_logger,{{2006,2,2},{14,11,52}},'Protocol: ~p: register error: >>> ~p~n',[inet_tcp,{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1},{ne >>> >>> t_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{n >>> >>> et_kernel,init,1},{gen_server,init_it,6},{proc_lib,init_p,5}]}]} >>> ... >>> >>> which is of course somewhat more readable than >>> >>> {error_logger,{{2006,2,2},{14,11,52}},[80,114,111,116,111,99,111,108,58,32,126,1 >>> >>> 12,58,32,114,101,103,105,115,116,101,114,32,101,114,114,111,114,58,32,126,112,12 >>> >>> 6,110],[inet_tcp,{{badmatch,{error,duplicate_name}},[{inet_tcp_dist,listen,1},{ne >>> >>> t_kernel,start_protos,4},{net_kernel,start_protos,3},{net_kernel,init_node,2},{n >>> >>> et_kernel,init,1},{gen_server,init_it,6},{proc_lib,init_p,5}]}]} >>> ... >>> >>> / Gunilla >>> >>> >>> >> > > From dgou@REDACTED Fri Feb 3 23:39:54 2006 From: dgou@REDACTED (Douglas Philips) Date: Fri, 3 Feb 2006 17:39:54 -0500 Subject: erlang.org and erlang.se are UP! In-Reply-To: References: Message-ID: <3F76D1AD-0243-4C06-8A90-3F5CBC4AAE5D@mac.com> > Our webservers www.erlang.org and www.erlang.se are up and > running again. Almost. Mail list archive and some other > features are still not restored, but we are working on it... YAY! Thank you to all the folks working behind the scenes. --D'gou From ke.han@REDACTED Sat Feb 4 11:10:22 2006 From: ke.han@REDACTED (ke.han) Date: Sat, 04 Feb 2006 18:10:22 +0800 Subject: who teaches erlang? In-Reply-To: <43E36058.1030206@lundata.se> References: <2006-02-03-12-48-20+trackit+sam@rfc1149.net> <43E36058.1030206@lundata.se> Message-ID: <43E47D8E.8080908@redstarling.com> I agree. calling c, Java, etc.. "classical" is bit of a misnomer as Forth, Scheme and Smalltalk are indeed classics. A better term is "mainstream". So "non-mainstream languages" would be a more fitting name. ke han Peter Lund wrote: > Samuel Tardieu wrote: > >> Starting next year, I will lead a new course called "non-classical >> languages" so that our undergraduate students can see many different >> programming languages, concepts and styles. In this 60 hours class, I >> will teach Smalltalk, Haskell, Scheme, Forth and... Erlang of course! >> >> > "Non-classical" has a somewhat negative sound over it. Erlang I would > like to put into the group of "Modern languages" or "Really useful > languages" instead!! :) > > /Peter > > From luke@REDACTED Sun Feb 5 12:41:20 2006 From: luke@REDACTED (Luke Gorrie) Date: Sun, 05 Feb 2006 12:41:20 +0100 Subject: distel setup problem References: Message-ID: Howdy Karol, karol skocik writes: > I am trying to get Distel 3.3 working, but with no luck so far. On > the application side : .erlang file with > "code:add_pathz("/usr/local/share/distel/ebin")" - as it is written in You need a '.' at the end. > when I want to connect from Emacs to running node agent@REDACTED, > like M-x erl-ie-session RET, Node : agent@REDACTED > > after a really long delay (couple dozens of minutes), Emacs become > responsive again, and I can find 2 buffers like with status line > showing some erlang pid, or *ie session * (Erlang EXT) > ---. It really takes more than 20 minutes? If you said 2 minutes I would suspect something related to DNS. In that case it may help to connect to agent@REDACTED instead. (BTW, what OS & Erlang are you using?) To get more info you could try: (setq debug-on-quit t) and then press C-g to interrupt Emacs when it is stuck. Then it should show a backtrace saying where it's getting blocked. -Luke P.S. The latest version of Distel (with R10-compat) is kept in the Jungerl. From ke.han@REDACTED Sun Feb 5 13:16:03 2006 From: ke.han@REDACTED (ke.han) Date: Sun, 05 Feb 2006 20:16:03 +0800 Subject: erlang.org and erlang.se are down! In-Reply-To: <20060201181218.GB53580@frogman.motivity.ca> References: <9d8237627b0532107cef37ff0304f1f0@ezabel.com> <43DFD38E.30207@comcast.net> <43E0D6D5.9000500@comcast.net> <20060201181218.GB53580@frogman.motivity.ca> Message-ID: <43E5EC83.5040600@redstarling.com> I have the resources to host a mirror from my Shanghai server. The only snag is that bandwidth between China and the rest of the world isn't always great. But intra-China is very good. Someone get in touch and I'll be a full mirror for erlang.org and/or trapexit.org. Vance Shipley wrote: > How about Eddie on geographically dispersed servers? > > -Vance > > On Wed, Feb 01, 2006 at 10:42:13AM -0500, Ernie Makris wrote: > } I know. I said it in jest:) I still think it would be worthwhile to run > } with yaws. > } If any help is needed, I may be able to devote some time. > } > } Thanks > } Ernie > } > } Bjorn Gustavsson wrote: > } > Using Inets or yaws would not have helped in this case, as > } > the problem is that the computer that Apache server runs > } > on no longer boots. To achive robustness, Erlang/OTP is not enough; > } > you'll need redundant/standby hardware too. > } > > } > /Bjorn > } > > } > Ernie Makris writes: > } > > } > > } >> It should be moved to yaws! My vote is in. > } >> > } >> Thanks > } >> Ernie > From mickael.remond@REDACTED Sun Feb 5 16:39:12 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Sun, 5 Feb 2006 16:39:12 +0100 Subject: ODBC questions Message-ID: <20060205153912.GA17372@memphis.process-one.net> Hello, I have recently been working a lot with ODBC and Erlang. One problem / question remains: Is there any mechanism to detect when the connection to the database is lost ? The purpose is to be able to try restarting the connection. I looked at the ODBC code, but did not find any relevant parts. For now, the behaviour seems to be the following: When querying a database who went offline, I get an error as the query response. The text of the error explains that the database is not more reachable but the ODBC process is still there. I suspect that such reconnection mechanism should be handled by the ODBC driver. I have been doing my tests with MySQL. Does someone here have experienced the same reconnection problem with ODBC ? -- Micka?l R?mond http://www.process-one.net/ From alex.peake@REDACTED Sun Feb 5 17:10:41 2006 From: alex.peake@REDACTED (Alex Peake) Date: Sun, 5 Feb 2006 08:10:41 -0800 Subject: Vacancy at T-Mobile References: <43DB8CD1.60204@comcast.net> <001401c62429$01330de0$64020a0a@FEY> <43E35E40.5070700@ericsson.com> Message-ID: <001101c62a6e$bbbef160$64020a0a@FEY> The high and low end points and the middle section are based on a large number of articles that I have read over the years. The connecting of the dots was done based on my own experience and an extension of the theory that the simplest explanations (in this case simple cube law curve fit) probably explain best. I would be happy to hear of other theories. Alex ----- Original Message ----- From: "Mats Cronqvist" Cc: "Erlang Questions" Sent: Friday, February 03, 2006 5:44 AM Subject: Re: Vacancy at T-Mobile > a bit off topic here... > i saw an interesting plot on your website > (http://waybettersoftware.com/programmerValue.html). what data is that based on? > > mats > > Alex Peake wrote: > > interested in an Erlang job in the US? > > > > Drop me a line > > > From bjarne@REDACTED Sun Feb 5 19:12:36 2006 From: bjarne@REDACTED (=?iso-8859-1?Q?Bjarne_D=E4cker?=) Date: Sun, 5 Feb 2006 19:12:36 +0100 Subject: Fifth ACM SIGPLAN Erlang Workshop - call for papers References: Message-ID: <001901c62a7f$c06cb240$390469d4@segeltorp> Dear Erlang friends, It is my pleasure to announce on the Erlang mailing list the call for papers for the Fifth ACM SIGPLAN Erlang Workshop which will take place in September in Portland, Oregon: http://www.erlang.se/workshop/2006/ The ACM SIGPLAN Erlang Workshops have been running annually since 1992 providing a medium for high quality reviewed papers often dealing with exciting new technical developments of Erlang. All developers and researchers are welcome to start writing and all Erlang enthusiasts should make a note of this in their calendars! Best wishes Bjarne PS. Since the publication of the call for papers, the date of the workshop has been set to September 16, 2006. From alanharkreader@REDACTED Fri Feb 3 17:16:42 2006 From: alanharkreader@REDACTED (Alan Harkreader) Date: Fri, 3 Feb 2006 08:16:42 -0800 Subject: Erlang Canon? Message-ID: Greetings! I'm interested in the list's opinion as to outstanding/ representative works of erlang code, esp. for active (current practice), open (accessible), real-world (not idealized) projects. tia /alan From alanharkreader@REDACTED Fri Feb 3 17:22:05 2006 From: alanharkreader@REDACTED (Alan Harkreader) Date: Fri, 3 Feb 2006 08:22:05 -0800 Subject: documenting high-level erlang design Message-ID: Any advice for how to effectively document the high-level design (logical/physical) of erlang releases/applications? Esp. interested in graphical notation. /alan From joelr1@REDACTED Sat Feb 4 00:53:22 2006 From: joelr1@REDACTED (Joel Reymont) Date: Fri, 3 Feb 2006 23:53:22 +0000 Subject: Did they use Erlang? Message-ID: http://www.schneier.com/blog/archives/2006/02/phone_tapping_i.html -- http://wagerlabs.com/ From sam@REDACTED Mon Feb 6 00:29:10 2006 From: sam@REDACTED (Samuel Montgomery-Blinn) Date: Sun, 05 Feb 2006 18:29:10 -0500 Subject: documenting high-level erlang design In-Reply-To: References: Message-ID: <43E68A46.1080707@caveman.org> Alan Harkreader wrote: > Any advice for how to effectively document the high-level design > (logical/physical) of erlang releases/applications? Esp. interested > in graphical notation. > > /alan > Take a look at the tutorial on writing an Erlang OTP Port application that was recently sent out on this list, from Pete Kazmier: http://www.kazmier.com/computer/port-howto/ His Figure 1.1 "The Big Picture" is a very nice very high-level graphic, including the function/arity for messages. -Sam From srwences123@REDACTED Mon Feb 6 06:21:54 2006 From: srwences123@REDACTED (Zack Brannigan) Date: Sun, 5 Feb 2006 21:21:54 -0800 (PST) Subject: What can cause erlang to hang, if all I'm using are gen_tcp and and standard libs? Message-ID: <20060206052154.22979.qmail@web50705.mail.yahoo.com> Hi: I have three processes: one that uses a gen_tcp socket to communicate with a remote server using telnet, another that receives socket updates from the first, and a third that's merely diagnostic (counting 1,2,3 every second). During some runs of my program, I reach a point where evidently erlang hangs completely. The third process, which does not communicate in any way with the other two, stops counting. If there's a dead lock between the first two, why should it affect the third? I encountered this problem using the latest versions of OTP (R10B9) under winXP Pro and under Linux (OTP compiled from source). Can anyone help me figure this out? Thank you. -- Zack __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From vlad_dumitrescu@REDACTED Mon Feb 6 08:41:53 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Mon, 6 Feb 2006 08:41:53 +0100 Subject: What can cause erlang to hang, if all I'm using are gen_tcp and and standard libs? References: <20060206052154.22979.qmail@web50705.mail.yahoo.com> Message-ID: Hi, Seeing the code would help a lot, and also knowing whether there are any differences between "some runs" and the rest of them. regards, Vlad ----- Original Message ----- From: "Zack Brannigan" To: Sent: Monday, February 06, 2006 6:21 AM Subject: What can cause erlang to hang, if all I'm using are gen_tcp and and standard libs? > Hi: > > I have three processes: one that uses a gen_tcp socket > to communicate with a remote server using telnet, > another that receives socket updates from the first, > and a third that's merely diagnostic (counting 1,2,3 > every second). > > During some runs of my program, I reach a point where > evidently erlang hangs completely. The third process, > which does not communicate in any way with the other > two, stops counting. > > If there's a dead lock between the first two, why > should it affect the third? > > I encountered this problem using the latest versions > of OTP (R10B9) under winXP Pro and under Linux (OTP > compiled from source). > > Can anyone help me figure this out? Thank you. > > -- Zack > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > From klacke@REDACTED Mon Feb 6 09:04:47 2006 From: klacke@REDACTED (Claes Wikstom) Date: Mon, 06 Feb 2006 09:04:47 +0100 Subject: What can cause erlang to hang, if all I'm using are gen_tcp and and standard libs? In-Reply-To: <20060206052154.22979.qmail@web50705.mail.yahoo.com> References: <20060206052154.22979.qmail@web50705.mail.yahoo.com> Message-ID: <43E7031F.1060907@hyber.org> Zack Brannigan wrote: > Hi: > > I have three processes: one that uses a gen_tcp socket > to communicate with a remote server using telnet, > another that receives socket updates from the first, > and a third that's merely diagnostic (counting 1,2,3 > every second). > > During some runs of my program, I reach a point where > evidently erlang hangs completely. First step is to run i() from the erlang shell to see what's up. Possibly combine with unix top. /klacke From fabien.dagnat@REDACTED Mon Feb 6 09:55:50 2006 From: fabien.dagnat@REDACTED (Fabien Dagnat) Date: Mon, 06 Feb 2006 09:55:50 +0100 Subject: who teaches erlang? In-Reply-To: <2006-02-03-12-48-20+trackit+sam@rfc1149.net> References: <2006-02-03-12-48-20+trackit+sam@rfc1149.net> Message-ID: <43E70F16.8010007@enst-bretagne.fr> Hello, > | It doesn't have to be a specific Erlang course. > | As far as I'm concerned, if students are introduced > | to Erlang in some parallell systems or distributed > | programming course, that qualifies. > > At ENST (http://www.enst.fr/), we are currently reorganizing the > classes. I used to teach Erlang in the distributed systems class a few > years ago, but I stopped doing it because of time constraints for the > class. At ENST Bretagne (http://www.enst-bretagne.fr/), it was now three years I was trying to introduce Erlang in my teaching to illustrate another solution to concurrency (with respect to Java) and for fault tolerance issue. > > Starting next year, I will lead a new course called "non-classical > languages" so that our undergraduate students can see many different > programming languages, concepts and styles. In this 60 hours class, I > will teach Smalltalk, Haskell, Scheme, Forth and... Erlang of course! > In a similar setting (a course to enlarge student culture of langages and paradigms*), I will probably introduce some Erlang next year. Fabien (*) this year version the lab session were about perl (scripting and regexp), Ocaml (functional, type inference, higher order, pattern matching), Compilation (using Ocamllex and Ocamlyacc), IHM, Software components (EJB). Next year version will probably use python, Ocaml, Erlang, Compilation, Software components (Fractal, ArchJava), Aspects. -- Fabien Dagnat -- Ma?tre de Conf?rences Mel : Fabien.Dagnat@REDACTED Web : perso-info.enst-bretagne.fr/~fdagnat Tel : (0|33) 2 29 00 14 09 Fax : (0|33) 2 29 00 12 82 Adr : Ecole Nationale Superieure des T?l?communication de Bretagne Departement Informatique Technop?le Brest-Iroise - CS 83818 - 29238 Brest Cedex 3 From daniel@REDACTED Mon Feb 6 10:13:09 2006 From: daniel@REDACTED (Daniel Luna) Date: Mon, 6 Feb 2006 10:13:09 +0100 (CET) Subject: Erlang Canon? In-Reply-To: References: Message-ID: On Fri, 3 Feb 2006, Alan Harkreader wrote: > Greetings! I'm interested in the list's opinion as to > outstanding/representative works of erlang code, esp. for active > (current practice), open (accessible), real-world (not idealized) > projects. Off the top of my head (in no particular order): yaws OTP HiPE ejabberd Wings 3D IDX tsunami (I hope I didn't forget anything obvious.) /Luna -- Daniel Luna | Top reasons that I have a beard: luna@REDACTED | a) Laziness. http://www.update.uu.se/~luna/ | b) I can. Don't look at my homepage (it stinks).| c) I can get away with it. From subbu@REDACTED Mon Feb 6 10:39:48 2006 From: subbu@REDACTED (P R Subramanya) Date: Mon, 6 Feb 2006 15:09:48 +0530 Subject: Comparison of server in erlang and C/epoll Message-ID: <20060206093948.GA8119@brahma.picopeta.com> Hi, Wanted to know if there has been any comparative study of the performance of a server written in Erlang and one in C (using epoll() and/or NPTL threads)? The server could be as simple as an echo server. What is the response time seen by clients connecting to the servers written in Erlang as against thos written in C using epoll() and/or NPTL threads? Has there been any such study? Thanks in advance. regards, subbu From serge@REDACTED Mon Feb 6 16:01:27 2006 From: serge@REDACTED (Serge Aleynikov) Date: Mon, 06 Feb 2006 10:01:27 -0500 Subject: Comparison of server in erlang and C/epoll In-Reply-To: <20060206093948.GA8119@brahma.picopeta.com> References: <20060206093948.GA8119@brahma.picopeta.com> Message-ID: <43E764C7.8080703@hq.idt.net> FYI, there's a patch submitted by Mickael Remond for Erlang with epoll support. P R Subramanya wrote: > Hi, > Wanted to know if there has been any comparative study of the > performance of a server written in Erlang and one in C (using > epoll() and/or NPTL threads)? The server could be as simple as > an echo server. What is the response time seen by clients > connecting to the servers written in Erlang as against thos > written in C using epoll() and/or NPTL threads? Has there > been any such study? > > Thanks in advance. > regards, > subbu > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED -------------- next part -------------- An embedded message was scrubbed... From: Mickael Remond Subject: Re: Kernel poll Linux 2.6 support Date: Fri, 16 Dec 2005 10:59:20 +0100 Size: 18951 URL: From nm@REDACTED Mon Feb 6 19:15:00 2006 From: nm@REDACTED (Gaspar Chilingarov) Date: Mon, 6 Feb 2006 22:15:00 +0400 (AMT) Subject: implementing TCP in pure Erlang Message-ID: <52650.217.113.1.123.1139249700.squirrel@webmail.web.am> Hi! I need to look over the implementation of TCP protocol in Erlang and I'm sure I've seen it somewhere, but could not find it again. Are there any ready implementations? Thanks in advance -- Gaspar Chilingarov System Administrator t +37491 419763 w www.netter.am e nm@REDACTED From tobbe@REDACTED Mon Feb 6 20:41:33 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Mon, 06 Feb 2006 20:41:33 +0100 Subject: implementing TCP in pure Erlang In-Reply-To: <52650.217.113.1.123.1139249700.squirrel@webmail.web.am> References: <52650.217.113.1.123.1139249700.squirrel@webmail.web.am> Message-ID: Gaspar Chilingarov wrote: > Hi! > > > I need to look over the implementation of TCP protocol in Erlang and I'm sure > I've seen it somewhere, but could not find it again. You'll find it here: http://www.bluetail.com/tobbe/etcp/ > Are there any ready implementations? > Well, I wouldn't call it 'ready'. It is old, and haven't been used much. Cheers, Tobbe From nm@REDACTED Mon Feb 6 21:45:34 2006 From: nm@REDACTED (Gaspar Chilingarov) Date: Tue, 7 Feb 2006 00:45:34 +0400 (AMT) Subject: implementing TCP in pure Erlang [CLOSED] In-Reply-To: References: <52650.217.113.1.123.1139249700.squirrel@webmail.web.am> Message-ID: <58505.217.113.1.123.1139258734.squirrel@webmail.web.am> Oh, well! Thank you very much. Really I've overseen in in google results :( > Gaspar Chilingarov wrote: > >> Hi! >> I need to look over the implementation of TCP protocol in Erlang and I'm >> sure I've seen it somewhere, but could not find it again. > You'll find it here: > http://www.bluetail.com/tobbe/etcp/ >> Are there any ready implementations? > > Well, I wouldn't call it 'ready'. > It is old, and haven't been used much. > > > Cheers, Tobbe Ok, I'm looking just for a reference implementation to understand how connection oriented protocol should be implemented in Erlang. I've stuck in my development, so I need some reading,RTFS-ing and source digging :) -- Gaspar Chilingarov System Administrator t +37491 419763 w www.netter.am e nm@REDACTED From ulf.wiger@REDACTED Tue Feb 7 08:28:17 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 7 Feb 2006 08:28:17 +0100 Subject: implementing TCP in pure Erlang Message-ID: See also http://www.erlang.se/workshop/2005/tcpip_presentation.pdf /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of > Gaspar Chilingarov > Sent: den 6 februari 2006 19:15 > To: erlang-questions@REDACTED > Subject: implementing TCP in pure Erlang > > Hi! > > > I need to look over the implementation of TCP protocol in > Erlang and I'm sure I've seen it somewhere, but could not > find it again. > Are there any ready implementations? > > Thanks in advance > > -- > Gaspar Chilingarov > System Administrator > > t +37491 419763 > w www.netter.am > e nm@REDACTED > > From ryanobjc@REDACTED Tue Feb 7 08:51:24 2006 From: ryanobjc@REDACTED (Ryan Rawson) Date: Mon, 6 Feb 2006 23:51:24 -0800 Subject: Erlang and Ice Message-ID: <78568af10602062351t4ee5b19fvd22872b6174b0c75@mail.gmail.com> Has anyone used Ice (http://www.zeroc.com/) and Erlang together? On a broader note, I'm investigating hooking up a C++ client and a Erlang server. The basic idea is to use a high speed binary-oriented interface to support million of reads/second against an Erlang server. Anyone have any suggestions? -ryan From dmitriid@REDACTED Tue Feb 7 08:59:32 2006 From: dmitriid@REDACTED (Dmitrii Dimandt) Date: Tue, 7 Feb 2006 09:59:32 +0200 Subject: Erlang Canon? In-Reply-To: References: Message-ID: On 2/6/06, Daniel Luna wrote: > On Fri, 3 Feb 2006, Alan Harkreader wrote: > > Greetings! I'm interested in the list's opinion as to > > outstanding/representative works of erlang code, esp. for active > > (current practice), open (accessible), real-world (not idealized) > > projects. > > Off the top of my head (in no particular order): > > yaws > OTP > HiPE > ejabberd > Wings 3D > IDX tsunami > > (I hope I didn't forget anything obvious.) What about YXA? From joe.armstrong@REDACTED Tue Feb 7 13:08:45 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Tue, 7 Feb 2006 13:08:45 +0100 Subject: Booting from an iso Message-ID: Sorry about this question - since it's not an Erlang question What I often do is the following: 1 - load an .iso from the net 2 - burn a CD 3 - reboot my machine with the newly burnt CD in my CD drive Examples: memory test programs, device drivers, install disks. What I'd like to do is this: 1 - load an .iso from net and store it in some well defined boot directory on one of the file systems in some partition on my disk 2 - Configure grub so that it knows where the boot directory is When grub starts I'd like to: 3 - Be presented with a menu of all the iso's in the boot directory together with my normal boot options 4 - Boot the machine from one of the .iso's in the boot directory And: The same - only the boot directory would be on a USB flash memory The exercise of *burning a CD* just so that you can later-on boot from it seems daft - since the file on the CD was on my hard disk why can't I boot from it directly? Cheers /Joe From chris@REDACTED Tue Feb 7 14:05:32 2006 From: chris@REDACTED (Christophe Romain) Date: Tue, 7 Feb 2006 14:05:32 +0100 Subject: Booting from an iso In-Reply-To: References: Message-ID: <36b79add043442fc7d8e36ca433b4751@erlang-fr.org> i don't think this is possible as this with grub (maybe using a chainload module?) but depending of what you want to boot, you can use qemu (http://fabrice.bellard.free.fr/qemu/) to boot your iso file in a simulated pc without rebooting your computer best regards. From serge@REDACTED Tue Feb 7 14:35:31 2006 From: serge@REDACTED (Serge Aleynikov) Date: Tue, 07 Feb 2006 08:35:31 -0500 Subject: Erlang and Ice In-Reply-To: <78568af10602062351t4ee5b19fvd22872b6174b0c75@mail.gmail.com> References: <78568af10602062351t4ee5b19fvd22872b6174b0c75@mail.gmail.com> Message-ID: <43E8A223.2040903@hq.idt.net> Hi Ryan, I haven't used Ice, however skimming through its 1650-page manual makes me wonder if Ice is something widely used. Erlang OTP comes with ei interface that allows to write C-based clients. There is an EPI library (beta version) on sourceforge.net that encapsulates ei and gives you with C++ interface. In any event, getting million reads per second is going to be quite a challenge. Is it million transactions of a single read each, or N transactions with M reads per second (N*M = 10^6)? While the second case seems challenging yet doable, I am pretty skeptical about the feasibility of the first one without running into various I/O related bottlenecks. Serge Ryan Rawson wrote: > Has anyone used Ice (http://www.zeroc.com/) and Erlang together? > > On a broader note, I'm investigating hooking up a C++ client and a > Erlang server. The basic idea is to use a high speed binary-oriented > interface to support million of reads/second against an Erlang server. > > Anyone have any suggestions? > > -ryan From erlang@REDACTED Tue Feb 7 19:53:30 2006 From: erlang@REDACTED (Erlang Questions) Date: Tue, 7 Feb 2006 15:53:30 -0300 Subject: Lists search by first element of a tuple Message-ID: <4bee01c62c17$ca5b7860$2100a8c0@INSWITCH241> Hi to everyone, I want to search in a list like: 1> L=[{{1,2},3},{{1,4},3},{{2,4},8}]. [{{1,2},3},{{1,4},3},{{2,4},8}] by the first element of the tuple that is the first element of each tuple. Example, I can use: 2> lists:filter(fun(X) -> element(1,element(1,X)) == 1 end, L). [{{1,2},3},{{1,4},3}] There's a better way to perform such search? something like: 3> lists:keysearch({1,_}, 1, L). ** 1: variable '_' is unbound ** Thanks in advance, Carlos.- -------------- next part -------------- An HTML attachment was scrubbed... URL: From kruegger@REDACTED Tue Feb 7 19:34:57 2006 From: kruegger@REDACTED (Stephen Han) Date: Tue, 7 Feb 2006 10:34:57 -0800 Subject: Erlang Canon? In-Reply-To: References: Message-ID: <86f1f5350602071034s6c652122pa8183196cf90b4f2@mail.gmail.com> One vote for Yxa. I used together with SER for digest authentication test. IMHO, both of them have very similar feature, but here are what I liked about YXA 1. Interpretation of the Digest authentication standard makes more sense than SER 2. Good front end GUI 3. Running on both Linux and Windows (I put it in the INET Spectra, portable SS7 tester. My co-worker thinks Yxa is part of that protocol tester :-P 4. Pure Erlang. In other word, inherits all the elegancies of erlang. regards, On 2/6/06, Dmitrii Dimandt wrote: > > On 2/6/06, Daniel Luna wrote: > > On Fri, 3 Feb 2006, Alan Harkreader wrote: > > > Greetings! I'm interested in the list's opinion as to > > > outstanding/representative works of erlang code, esp. for active > > > (current practice), open (accessible), real-world (not idealized) > > > projects. > > > > Off the top of my head (in no particular order): > > > > yaws > > OTP > > HiPE > > ejabberd > > Wings 3D > > IDX tsunami > > > > (I hope I didn't forget anything obvious.) > > What about YXA? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf@REDACTED Tue Feb 7 21:37:27 2006 From: ulf@REDACTED (Ulf Wiger) Date: Tue, 07 Feb 2006 21:37:27 +0100 Subject: Lists search by first element of a tuple In-Reply-To: <4bee01c62c17$ca5b7860$2100a8c0@INSWITCH241> References: <4bee01c62c17$ca5b7860$2100a8c0@INSWITCH241> Message-ID: Den 2006-02-07 19:53:30 skrev Erlang Questions : > Hi to everyone, > > I want to search in a list like: > > 1> L=[{{1,2},3},{{1,4},3},{{2,4},8}]. > [{{1,2},3},{{1,4},3},{{2,4},8}] > > by the first element of the tuple that is the first element of each > tuple. > > Example, I can use: > > 2> lists:filter(fun(X) -> element(1,element(1,X)) == 1 end, L). > [{{1,2},3},{{1,4},3}] I think that's about as good as it gets, except perhaps for: [X || {{1,_},_}=X <- L] (... assuming the list objects are always two-tuples. Otherwise: [X || X <- L, element(1,element(1,X))==1], but that's not much more elegant than your suggestion.) > There's a better way to perform such search? > > something like: > > 3> lists:keysearch({1,_}, 1, L). > ** 1: variable '_' is unbound ** No, as you noticed. That is not valid Erlang. Also, lists:keysearch has different semantics from lists:filter/2. Lists:filter/2 will return _all_ matches, while lists:keysearch/3 will only return the first match. /Uffe -- Ulf Wiger From ryanobjc@REDACTED Tue Feb 7 23:33:09 2006 From: ryanobjc@REDACTED (Ryan Rawson) Date: Tue, 7 Feb 2006 14:33:09 -0800 Subject: Erlang and Ice In-Reply-To: <43E8A223.2040903@hq.idt.net> References: <78568af10602062351t4ee5b19fvd22872b6174b0c75@mail.gmail.com> <43E8A223.2040903@hq.idt.net> Message-ID: <78568af10602071433r17259317h22d78082ff5cfdfe@mail.gmail.com> Hey, I've heard good things about ice, but mostly in the context of the good things the devs have done. I dont know anyone using it right now. As for my problem, the reads arent technically transactional, so we dont have to deal with that overhead. They will be in the form of "give me data for the terms X,Y,Z". Some vectorizing of the calls will be possible, to reduce IO overhead. The estimate I gave was just strictly reads. In terms of getting that much data out of a single machine, I have at my disposal as many machines as I need (within reason). That is I'm hoping parallelism across machines will help me. Thanks, -ryan On 2/7/06, Serge Aleynikov wrote: > Hi Ryan, > > I haven't used Ice, however skimming through its 1650-page manual makes > me wonder if Ice is something widely used. > > Erlang OTP comes with ei interface that allows to write C-based clients. > There is an EPI library (beta version) on sourceforge.net that > encapsulates ei and gives you with C++ interface. > > In any event, getting million reads per second is going to be quite a > challenge. Is it million transactions of a single read each, or N > transactions with M reads per second (N*M = 10^6)? While the second > case seems challenging yet doable, I am pretty skeptical about the > feasibility of the first one without running into various I/O related > bottlenecks. > > Serge > > Ryan Rawson wrote: > > Has anyone used Ice (http://www.zeroc.com/) and Erlang together? > > > > On a broader note, I'm investigating hooking up a C++ client and a > > Erlang server. The basic idea is to use a high speed binary-oriented > > interface to support million of reads/second against an Erlang server. > > > > Anyone have any suggestions? > > > > -ryan > > From kinema@REDACTED Wed Feb 8 06:24:29 2006 From: kinema@REDACTED (Adam Hunt) Date: Tue, 7 Feb 2006 21:24:29 -0800 Subject: Erlang on eCos? Message-ID: <43e9808f.5765784d.578d.25e4@mx.gmail.com> Has anyone ported or attempted to port Erlang to eCos? I searched Google but didn't find anything. --adam -------------- next part -------------- An HTML attachment was scrubbed... URL: From erlang@REDACTED Wed Feb 8 09:41:48 2006 From: erlang@REDACTED (Peter Lund) Date: Wed, 08 Feb 2006 09:41:48 +0100 Subject: Lists search by first element of a tuple In-Reply-To: References: <4bee01c62c17$ca5b7860$2100a8c0@INSWITCH241> Message-ID: <43E9AECC.6090108@lundata.se> Ulf Wiger wrote: > I think that's about as good as it gets, except perhaps for: > > [X || {{1,_},_}=X <- L] Interesting matching! But why does not [X || X={{1,_},_} <- L] work when [X || {{1,_},_}=X <- L] works? (tested on R9C ) 1> [X||{1,_}=X<-[{2,3},{1,4},b,{1,7},c]]. [{1,4},{1,7}] 2> [X||X={1,_}=<-[{2,3},{1,4},b,{1,7},c]]. ** 1: variable '_' is unbound ** /Peter From csanto@REDACTED Wed Feb 8 09:45:16 2006 From: csanto@REDACTED (Corrado Santoro) Date: Wed, 08 Feb 2006 09:45:16 +0100 Subject: Initializing random seeds Message-ID: <43E9AF9C.8070102@diit.unict.it> I'm trying to use the functions of the random module to generate random numbers in different processes, but I have a problem with initialization. I know that the seed is stored in the process' properties so I'm initializing the seed in each process using the value returned by function now(). But I obtain the same random number sequence for each process. I've tried a simple code, attached to this email, and the output is: 30> rndtest:start(). Seed of <0.128.0> is {1139,388083,514683} Seed of <0.129.0> is {1139,388083,514695} Seed of <0.130.0> is {1139,388083,514701} Seed of <0.131.0> is {1139,388083,514707} <0.131.0>Number generated from proc <0.128.0> is 9 Number generated from proc <0.129.0> is 9 Number generated from proc <0.130.0> is 9 Number generated from proc <0.131.0> is 9 Do you have an hint to avoid this problem? Indeed I could solve the problem by using random number generator process and call it each time I need a new random number, but I would like to know if a different solution could be possible. Regards, --Corrado -- ====================================================== Eng. Corrado Santoro, Ph.D. University of Catania - Engineering Faculty Department of Computer Science and Telecommunications Engineering Viale A. Doria, 6 - 95125 CATANIA (ITALY) Tel: +39 095 7382380 +39 095 7387035 +39 095 7382365 +39 095 7382364 VoIP: sip:7035@REDACTED Fax: +39 095 7382397 EMail: csanto@REDACTED Personal Home Page: http://www.diit.unict.it/users/csanto NUXI Home Page: http://nuxi.diit.unict.it ====================================================== -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: rndtest.erl URL: From sanjaya@REDACTED Wed Feb 8 10:04:11 2006 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Wed, 8 Feb 2006 15:04:11 +0600 Subject: Fw: How To Use Erlang Driver Queue Message-ID: <01ca01c62c8e$a06660c0$5f00a8c0@wavenet.lk> Hi .... All, I have sent this mail to the community last month. But not a single reply received. Referring to the documentation in erl_driver it says "Also, the driver queue is an ErlIOVec." So, If any one can show me knows how to use the Erlang Driver Queue (ErlIOVec) to get Driver Side Events to emulator, it will be a great help. Thanks in advance, Sanjaya Vitharana ----- Original Message ----- From: Sanjaya Vitharana To: erlang-questions@REDACTED Sent: Monday, 09 January 2006 01:13 pm Subject: How To Use Erlang Driver Queue Hi...!!! How to use Erlang Driver Queue (ErlIOVec) to get Driver Side Events to emulator? I have tried with driver_output_term(...). But it's not work in the way i want, specially when I try to get the driverside events to emulator. Can't we use the driver_enq(...) function to directly put the messages to the queue, & get it from the emulator ? If it is possible, i'd like to know how this can be done. I have tried with driver_enq(...) to put the data, but don't receiced any event to the emulator. One thing I noted is, when stop the driver it calls flush. It seems the data I put into the queue was there till I stop the driver. I don't know i'm going in a proper way or not. So need any guidence from expert, because the documentation seems to be not enough to for this topic. Thanks in advance Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From michal@REDACTED Wed Feb 8 10:49:57 2006 From: michal@REDACTED (Michal Slaski) Date: Wed, 8 Feb 2006 10:49:57 +0100 Subject: who teaches erlang? Message-ID: On 02/02/06, Ulf Wiger (AL/EAB) wrote: > Raise your hand, anyone who knows of a > university that teaches Erlang. I graduated from the AGH University of Science and Technology in Krakow (Poland) and my master project was developed in Erlang. Right now there are several ongoing projects in Erlang, but there is no dedicated course. Erlang is introduced during the second part of The Theory of Compiling course, when students are developing a one semester long project. /Michal -- Michal Slaski www.erlang-consulting.com From gulias@REDACTED Wed Feb 8 10:58:19 2006 From: gulias@REDACTED (Victor M. Gulias) Date: Wed, 08 Feb 2006 10:58:19 +0100 Subject: who teaches erlang? In-Reply-To: (Ulf Wiger's message of "Thu, 2 Feb 2006 22:52:42 +0100") References: Message-ID: "Ulf Wiger (AL/EAB)" writes: > Poll: > Raise your hand, anyone who knows of a > university that teaches Erlang. In University of Corunna (Galicia, Spain), we use Erlang in undergraduate courses (as part of functional programming courses) as well as in some post-graduate modules (distributed systems). http://www.erlang.se/euc/05/Victor.pdf Regards, -- Victor M. Gulias From peterl@REDACTED Wed Feb 8 09:40:11 2006 From: peterl@REDACTED (Peter Lund) Date: Wed, 08 Feb 2006 09:40:11 +0100 Subject: Lists search by first element of a tuple In-Reply-To: References: <4bee01c62c17$ca5b7860$2100a8c0@INSWITCH241> Message-ID: <43E9AE6B.8060903@synap.se> Ulf Wiger wrote: > I think that's about as good as it gets, except perhaps for: > > [X || {{1,_},_}=X <- L] > Interesting matching! But why does not [X || X={{1,_},_} <- L] work when [X || {{1,_},_}=X <- L] works? (tested on R9C ) 1> [X||{1,_}=X<-[{2,3},{1,4},b,{1,7},c]]. [{1,4},{1,7}] 2> [X||X={1,_}=<-[{2,3},{1,4},b,{1,7},c]]. ** 1: variable '_' is unbound ** /Peter From y-isobe@REDACTED Wed Feb 8 10:35:53 2006 From: y-isobe@REDACTED (Yoshinao Isobe) Date: Wed, 8 Feb 2006 18:35:53 +0900 Subject: CFP: ASE 2006 Message-ID: <04a101c62c93$0e50d170$c6631d96@isobe3> news: Information about conference paper submission format was added. CALL FOR PAPERS 21th IEEE/ACM International Conference on Automated Software Engineering (ASE 2006) September 18-22, 2006 Tokyo, JAPAN http://www.ase-conference.jp --------- IMPORTANT DATES for Submissions --------- Workshop Proposal: February 15, 2006 Electronic Abstracts of Paper: February 24, 2006 Paper Submission: March 3, 2006 Tutorial Proposal: April 14, 2006 Doctoral Symposium Submissions: May 2, 2006 Tool Demo Submission: May 10, 2006 Workshop Paper Submission: June 23, 2006 ---------------------------------------------------------------------- The IEEE/ACM International Conference on Automated Software Engineering brings together researchers and practitioners to share ideas on the foundations, techniques, tools, and applications of automated software engineering technology. We invite contributions that address theoretical foundations, practical techniques, software tools, applications and/or experience reports in automated software engineering. ASE 2006 will include technical papers, invited talks, tutorials, workshops, tool demonstrations, and a doctoral symposium. General Chair Shinichi Honiden (honiden@REDACTED) National Institute of Informatics (NII), Japan http://research.nii.ac.jp/~honiden/ Program Co-Chairs Sebastian Uchitel (su2@REDACTED) Imperial College London, UK http://www.doc.ic.ac.uk/~su2/ Steve Easterbrook (sme@REDACTED) University of Toronto, Canada http://www.cs.toronto.edu/~sme/ +------------------------------+ | Call for Papers | +------------------------------+ Software engineering is concerned with the analysis, design, implementation, testing, and maintenance of large software systems. Automated software engineering is concerned with how to automate or partially automate these tasks to achieve significant improvements in quality and productivity. ASE 2006 encourages contributions describing basic research, novel applications and experience reports. In all cases, papers should carefully articulate the relevance of their contributions to the automation of software engineering tasks. The ASE on-line Bibliography serves as a reference for potential contributors: http://ase.informatik.uni-essen.de/olbib/index.html Solicited topics include, but are not limited to: - Automated reasoning techniques - Component-based systems - Computer-supported cooperative work - Configuration management - Domain modeling and meta-modeling - Human computer interaction - Knowledge acquisition & modeling - Knowledge management for SE - Maintenance and evolution - Modeling language semantics - Ontologies and methodologies - Open systems development - Product line architectures - Program understanding - Re-engineering - Reflection and Metadata approaches - Requirements engineering - Specification languages - Software architecture - Software design and synthesis - Software visualization - Testing - Tutoring, help, documentation systems - Verification and validation IEEE Computer Society Press will publish accepted papers in the conference proceedings. In addition, authors of a selection of papers from the conference will be invited to revise and re-submit extended versions of their papers for consideration for a special issue of the Journal of Automated Software Engineering (Kluwer). Papers submitted to ASE 2006 must not have been previously published, and must not be under review for publication elsewhere. Papers must STRICTLY adhere to submission guidelines. Papers exceeding the page limit or using condensed formatting will be administratively rejected and will not be reviewed. Papers must not exceed 10 pages in the conference format (see http://www.computer.org/portal/pages/ieeecs/publications/cps/cps_forms.html for the guidelines and ftp://pubftp.computer.org/Press/Outgoing/proceedings/ for the formatting files). All papers that conform to submission guidelines will be peer-reviewed by program committee members. All papers should be submitted by March 3, 2006 (abstracts should be submitted by February 24). More details are available at http://www.ase-conference.jp/CallForPapers.html . Important Dates for Papers: Electronic abstracts due: February 24, 2006 Paper submission deadline: March 3, 2006 Paper notification date: May 20, 2006 Camera-ready paper due: June 30, 2006 +------------------------------+ | Call for Workshops | +------------------------------+ ASE 2006 invites submissions of workshop proposals. The workshops co-located with the conference should provide an opportunity for exchanging views, advancing ideas, and discussing preliminary results on topics related to software engineering research and applications. Workshops should not be seen as an alternative forum for presenting full research papers. The workshops co-located with the conference will be held before the conference on September 18-19. A workshop may last one or two days. Workshop proposals should be written in English, not exceed 3 pages and submitted in PDF format via email to both workshop co-chairs. Proposals for organizing workshops should be prepared following the guidelines available at http://www.ase-conference.jp/CallForWorkshops.html or contact the Workshop Co-chairs for more information. Important Dates for Workshops: Workshop proposal deadline: February 15, 2006 Workshop proposal notification: March 1, 2006 Launch of calls for papers of accepted workshops: March 8, 2006 Workshop paper submission deadline: June 23, 2006 Workshop paper notification date: July 28, 2006 Final camera-ready copy of workshop papers: August 30, 2006 Workshop Co-chairs: Kathi Fisler (kfisler@REDACTED) Worcester Polytechnic Institute, USA http://web.cs.wpi.edu/~kfisler/ Hironori Washizaki (washizaki@REDACTED) National Institute of Informatics, Japan http://www.washizaki.net/index.html +------------------------------+ | Call for Tutorials | +------------------------------+ ASE 2006 invites half-day/full-day tutorials addressing theoretical foundations, practical techniques, software tools, and applications in areas related to the ASE topics. A Tutorial program that gives attendees the opportunity to gain new insights, knowledge and skills on evolving and emerging research topics in the area of automated software engineering will be an essential part of the ASE 2006. The Tutorials are scheduled for September 18 and 19, 2006 at the beginning of the ASE 2006 conference. Survey papers and/or tutorial notes will be made available to the tutorial attendees at the conference. Tutorials are intended to provide independent instruction on a relevant theme, therefore no commercial or sales-oriented presentations will be accepted. Instructors are invited to submit proposals for half-day and full-day tutorials and, upon selection, are required to provide tutorial notes or a survey paper on the topic of presentation in PDF. Proposals in PDF should be sent to both Tutorials Co-Chairs. See http://www.ase-conference.jp/CallForTutorials.html or contact the Tutorials Co-Chairs for more details. Important Dates for Tutorials: Submission deadline: April 14, 2006 Author notification: June 4, 2006 Tutorials: September 18-19, 2006 Tutorials Co-Chairs: Andrew Ireland (a.ireland@REDACTED) Heriot-Watt University, UK http://www.macs.hw.ac.uk/~air/ Katsuhisa Maruyama (maru@REDACTED) Ritsumeikan University, Japan http://www.fse.is.ritsumei.ac.jp/~maru/ +------------------------------+ | Call for Tool Demonstrations | +------------------------------+ Tools are central to automated software engineering. Hence, tool demonstrations will have a prominent role in the conference. Demonstrators will be expected to present their tools during one or more sessions that will be scheduled into the conference program. In addition, a 2-page paper will be published in the conference proceedings for each accepted tool demonstration. ASE 2006 solicits proposals for tool demonstrations related to automated software engineering. Tools can range from alpha-versions to fully developed products that are being prepared for commercialization. Products that are currently being commercialized will not be accepted as subjects of demonstrations. Tool demonstrations are not intended to be sales pitches, and should consequently highlight technical contributions. For further clarification, See http://www.ase-conference.jp/CallForDemonstrations.html or contact the Demonstrations Co-Chairs. Important Dates for Tool Demonstrations: Demo submission deadline: May 10, 2006 Notification date: June 2, 2006 Camera-ready due: June 30, 2006 Demonstrations Co-Chairs Nicolas Kicillof (nicok@REDACTED) University of Buenos Aires, Argentina http://www.dc.uba.ar/people/profesores/nicok/ Katsuhiko Gondow (gondow@REDACTED) Tokyo Institute of Technology, Japan http://www.sde.cs.titech.ac.jp/~gondow/index-e.html +------------------------------+ | Call for Doctoral Symposium | +------------------------------+ The ASE 2006 Doctoral Symposium seeks to bring together PhD students working on foundations, techniques, tools and applications of automated software engineering and give them the opportunity to present and to discuss their research with researchers in the ASE community in a constructive atmosphere. Specifically, the symposium aims to provide a setting whereby students receive feedback on their research and guidance on future directions from a broad group of advisors, foster a supportive community of scholars and a spirit of collaborative research, and contribute to the conference goals through interaction with other researchers and conference events. The Doctoral Symposium will be held on September 18, two days before the main conference. Selected students will present their work and receive constructive feedback from a panel of advisors and other Doctoral Symposium students. Note that advisors of student presenters will not be allowed to attend their student's presentations. In addition to scientific matters, students will have the opportunity to seek advice on various aspects of completing a PhD and performing research as a young professional in automated software engineering. For more information, see http://www.ase-conference.jp/CallForDoctoralSymposium.html or contact the Doctoral Symposium chairs. Important Dates for Doctoral Symposium: Deadline for submission: May 2, 2006 Notification of acceptance: June 9, 2006 Camera-ready paper due: July 7, 2006 Symposium Presentations: September 18, 2006 Doctoral Symposium Co-Chairs: Alexander Egyed (aegyed@REDACTED) Teknowledge Corporation, USA http://www.alexander-egyed.com/index.html Bernd Fischer (b.fischer@REDACTED) University of Southampton, UK http://ti.arc.nasa.gov/people/fischer/ ---------------------------------------------------------------------- For further information, please visit the conference website http://www.ase-conference.jp/ or contact the Publicity Chair. Publicity Chair Yoshinao Isobe (y-isobe@REDACTED) AIST, Japan http://staff.aist.go.jp/y-isobe From daniel@REDACTED Wed Feb 8 11:00:01 2006 From: daniel@REDACTED (Daniel Luna) Date: Wed, 8 Feb 2006 11:00:01 +0100 (CET) Subject: Initializing random seeds In-Reply-To: <43E9AF9C.8070102@diit.unict.it> References: <43E9AF9C.8070102@diit.unict.it> Message-ID: On Wed, 8 Feb 2006, Corrado Santoro (with some cutting by me) wrote: > I'm trying to use the functions of the random module to generate random > numbers in different processes. But I obtain the same random number > sequence for each process. > Number generated from proc <0.128.0> is 9 > Number generated from proc <0.129.0> is 9 > Number generated from proc <0.130.0> is 9 > Number generated from proc <0.131.0> is 9 > Do you have an hint to avoid this problem? Yes. Patience is the key. Try to generate just one more number and they should be different. With a few more numbers generated we will see only the first numbers generated are the same. If we look at the seeds we see that the last numbers differs in your test: > Seed of <0.128.0> is {1139,388083,514683} > Seed of <0.129.0> is {1139,388083,514695} > Seed of <0.130.0> is {1139,388083,514701} > Seed of <0.131.0> is {1139,388083,514707} This is not enough to make any difference in the first generated number (for small N). From random.erl: uniform() = ... + A3/30323 uniform(N) = trunc(uniform() * N) + 1. So for a small difference in A3 you will have the same random number the first time around. Given time though (just once more should be enough), these numbers will separate[*]. /Luna [*] But not that much unfortunately. They will give less "random" numbers than 4 processer with differing A1s and A2s. But probably enough for most applications. -- Daniel Luna | Top reasons that I have a beard: luna@REDACTED | a) Laziness. http://www.update.uu.se/~luna/ | b) I can. Don't look at my homepage (it stinks).| c) I can get away with it. From daniel@REDACTED Wed Feb 8 11:40:53 2006 From: daniel@REDACTED (Daniel Luna) Date: Wed, 8 Feb 2006 11:40:53 +0100 (CET) Subject: Initializing random seeds In-Reply-To: <43E9AF9C.8070102@diit.unict.it> References: <43E9AF9C.8070102@diit.unict.it> Message-ID: Reposting since I noticed that this address was not subscribed to the list. If it shows up twice, you know why... On Wed, 8 Feb 2006, Corrado Santoro (with some cutting by me) wrote: > I'm trying to use the functions of the random module to generate random > numbers in different processes. But I obtain the same random number > sequence for each process. > Number generated from proc <0.128.0> is 9 > Number generated from proc <0.129.0> is 9 > Number generated from proc <0.130.0> is 9 > Number generated from proc <0.131.0> is 9 > Do you have an hint to avoid this problem? Yes. Patience is the key. Try to generate just two more numbers and they should be different. With a few more numbers generated we will see only the first numbers generated are the same. If we look at the seeds we see that the last seed numbers differs in your test: > Seed of <0.128.0> is {1139,388083,514683} > Seed of <0.129.0> is {1139,388083,514695} > Seed of <0.130.0> is {1139,388083,514701} > Seed of <0.131.0> is {1139,388083,514707} This is not enough to make any difference in the first generated number (for small N). From random.erl: uniform() = ... + A3/30323 uniform(N) = trunc(uniform() * N) + 1. So for a small difference in A3 you will have the same random number the first time around. Given time though (just twice more should be enough), these numbers will separate[*]. /Luna [*] But not that much unfortunately. They will give less "random" numbers than 4 processer with differing A1s and A2s. But probably enough for most applications. -- Daniel Luna | Top reasons that I have a beard: luna@REDACTED | a) Laziness. http://www.update.uu.se/~luna/ | b) I can. Don't look at my homepage (it stinks).| c) I can get away with it. From mats.cronqvist@REDACTED Wed Feb 8 11:52:12 2006 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Wed, 08 Feb 2006 11:52:12 +0100 Subject: Lists search by first element of a tuple In-Reply-To: <43E9AE6B.8060903@synap.se> References: <4bee01c62c17$ca5b7860$2100a8c0@INSWITCH241> <43E9AE6B.8060903@synap.se> Message-ID: <43E9CD5C.4060906@ericsson.com> > > But why does not [X || X={{1,_},_} <- L] work when [X || {{1,_},_}=X <- > L] works? (tested on R9C ) > > 1> [X||{1,_}=X<-[{2,3},{1,4},b,{1,7},c]]. > [{1,4},{1,7}] > 2> [X||X={1,_}=<-[{2,3},{1,4},b,{1,7},c]]. > ** 1: variable '_' is unbound ** because of the typo ( =<- )? From erlang@REDACTED Wed Feb 8 12:21:43 2006 From: erlang@REDACTED (Peter Lund) Date: Wed, 08 Feb 2006 12:21:43 +0100 Subject: Lists search by first element of a tuple In-Reply-To: <43E9CD5C.4060906@ericsson.com> References: <4bee01c62c17$ca5b7860$2100a8c0@INSWITCH241> <43E9AE6B.8060903@synap.se> <43E9CD5C.4060906@ericsson.com> Message-ID: <43E9D447.3060902@lundata.se> Mats Cronqvist wrote: > >> 1> [X||{1,_}=X<-[{2,3},{1,4},b,{1,7},c]]. >> [{1,4},{1,7}] >> 2> [X||X={1,_}=<-[{2,3},{1,4},b,{1,7},c]]. >> ** 1: variable '_' is unbound ** > > because of the typo ( =<- )? Yes, that it was! [X||X={1,_}<-[{2,3},{1,4},b,{1,7},c]]. worked as it should! :) /Peter From rasmussen.bryan@REDACTED Wed Feb 8 13:04:16 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Wed, 8 Feb 2006 13:04:16 +0100 Subject: error logging with tty? Message-ID: <3bb44c6e0602080404q747a6451uad7bdc26befe600b@mail.gmail.com> Hi, I was just wondering, the documentation on the error logger says: " The events are, by default, logged to tty" what are the non-defaults? Is it at all possible to write error output to file. Is it possible to query a past error, as one would assume with normal concepts of logging? Cheers, Bryan Rasmussen From chaitanya.chalasani@REDACTED Wed Feb 8 13:19:50 2006 From: chaitanya.chalasani@REDACTED (Chaitanya Chalasani) Date: Wed, 8 Feb 2006 17:49:50 +0530 Subject: ODBC questions In-Reply-To: <20060205153912.GA17372@memphis.process-one.net> References: <20060205153912.GA17372@memphis.process-one.net> Message-ID: <200602081749.50165.chaitanya.chalasani@gmail.com> On Sunday 05 February 2006 21:09, Mickael Remond wrote: > Hello, > > I have recently been working a lot with ODBC and Erlang. One problem / > question remains: Is there any mechanism to detect when the connection > to the database is lost ? The purpose is to be able to try restarting > the connection. > I looked at the ODBC code, but did not find any relevant parts. > For now, the behaviour seems to be the following: When querying a > database who went offline, I get an error as the query response. The > text of the error explains that the database is not more reachable but > the ODBC process is still there. > > I suspect that such reconnection mechanism should be handled by the ODBC > driver. I have been doing my tests with MySQL. > > Does someone here have experienced the same reconnection problem with > ODBC ? Yes but not when the connection is lost , when you are trying to query a connection which is already broken then an error is shown -- Chaitanya Chalasani From tobbe@REDACTED Wed Feb 8 13:38:05 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Wed, 08 Feb 2006 13:38:05 +0100 Subject: Erlang compiler bug in R10 ? Message-ID: Hi, I'm trying to compile the ibrowse application in jungerl: ---------------------------------------------------------------- > make erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse.erl erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_http_client.erl Function chunk_request_body/3 refers to undefined label 410 ./ibrowse_http_client.erl:none: internal error in beam_dead; crash reason: {{case_clause,{'EXIT',{undefined_label,410}}}, [{compile,'-select_passes/2-anonymous-2-',2}, {compile,'-internal_comp/4-anonymous-1-',2}, {compile,fold_comp,3}, {compile,internal_comp,4}, {compile,internal,3}]} make: *** [../ebin/ibrowse_http_client.beam] Error 1 ------------------------------------------------------------------ I get this result with R10B-4, R10B-8, R10B-9 But with R9C, ibrowse compiles just fine. Cheers, Tobbe From ulf.wiger@REDACTED Wed Feb 8 13:54:37 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 8 Feb 2006 13:54:37 +0100 Subject: who teaches Erlang? Message-ID: Here is my current list. Hollar if something needs to be taken away, or if your favourite University is not represented (but should be). (Some of these, I've grabbed off the Web, or simply added based on my own recollection. Thanks to all of you who contributed. Corrado Santoro and Samuel Tardieu get a free beer each at the next EUC. Kostis gets one too for replying within an hour - right before midnight! Nice with some company during the night shift.) - Uppsala University, Uppsala - Chalmers, G?teborg - G?teborg IT University - Royal Institute of Techn. Sthlm - University of Kent - University of Sheffield - University of Edinburgh - Glasgow University - Heriot-Watt University - University of Coru?a, Spain - University of Catania, Italy - Engineering Institute of Oporto - Ecole Ingenieur T?l?com Paris - ?cole Nationale Sup?rieure des T?l?communications de Bretagne - RWTH, Aachen, Germany - Rensselaer Polytechnic Inst, NY - University of Texas at Arlington - University of Colorado - University of Krakow, Poland /Uffe From mickael.remond@REDACTED Wed Feb 8 14:35:08 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Wed, 8 Feb 2006 14:35:08 +0100 Subject: ODBC questions In-Reply-To: <200602081749.50165.chaitanya.chalasani@gmail.com> References: <20060205153912.GA17372@memphis.process-one.net> <200602081749.50165.chaitanya.chalasani@gmail.com> Message-ID: <20060208133508.GA10976@memphis.ilius.fr> * Chaitanya Chalasani [2006-02-08 17:49:50 +0530]: > Yes but not when the connection is lost , when you are trying to query a > connection which is already broken then an error is shown The problem with this message is that it is a textual message that depend on the driver. The message can change or be different from a database to another. This does not seem totally reliable. -- Micka?l R?mond http://www.process-one.net/ From serge@REDACTED Wed Feb 8 15:10:17 2006 From: serge@REDACTED (Serge Aleynikov) Date: Wed, 08 Feb 2006 09:10:17 -0500 Subject: error logging with tty? In-Reply-To: <3bb44c6e0602080404q747a6451uad7bdc26befe600b@mail.gmail.com> References: <3bb44c6e0602080404q747a6451uad7bdc26befe600b@mail.gmail.com> Message-ID: <43E9FBC9.4090207@hq.idt.net> Here's an extract from the kernel application documentation regarding possible options: error_logger = Value Value is one of: tty All standard error reports are written to stdio. This is the default option. {file, FileName} All standard error reports are written to the file FileName, where FileName is a string. false No error logger handler is installed. bryan rasmussen wrote: > Hi, I was just wondering, the documentation on the error logger says: > > " The events are, by default, logged to tty" > what are the non-defaults? > Is it at all possible to write error output to file. Is it possible to > query a past error, as one would assume with normal concepts of > logging? > > Cheers, > Bryan Rasmussen > From csanto@REDACTED Wed Feb 8 16:06:18 2006 From: csanto@REDACTED (Corrado Santoro) Date: Wed, 08 Feb 2006 16:06:18 +0100 Subject: Initializing random seeds In-Reply-To: References: <43E9AF9C.8070102@diit.unict.it> Message-ID: <43EA08EA.7020307@diit.unict.it> Hi Daniel, Daniel Luna wrote: > Yes. Patience is the key. Try to generate just one more number and they > should be different. > [cut] > uniform() = ... + A3/30323 > uniform(N) = trunc(uniform() * N) + 1. > > So for a small difference in A3 you will have the same random number the > first time around. Given time though (just once more should be enough), > these numbers will separate[*]. Yes! I saw the source code in random.erl, and maybe my solution of using an ad hoc process for random number generation is the key. Any other hint??? --Corrado -- ====================================================== Eng. Corrado Santoro, Ph.D. University of Catania - Engineering Faculty Department of Computer Science and Telecommunications Engineering Viale A. Doria, 6 - 95125 CATANIA (ITALY) Tel: +39 095 7382380 +39 095 7387035 +39 095 7382365 +39 095 7382364 VoIP: sip:7035@REDACTED Fax: +39 095 7382397 EMail: csanto@REDACTED Personal Home Page: http://www.diit.unict.it/users/csanto NUXI Home Page: http://nuxi.diit.unict.it ====================================================== From ulf.wiger@REDACTED Wed Feb 8 16:30:10 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 8 Feb 2006 16:30:10 +0100 Subject: Initializing random seeds Message-ID: Corrado Santoro wrote: > Yes! I saw the source code in random.erl, and maybe my > solution of using an ad hoc process for random number > generation is the key. Any other hint??? If you're always spawning from the same process, perhaps you could call now() before each time, and permute the microsec component from the right into the seed of the parent process? new_seed() -> {S1,S2,S3} = case get(random_seed) of undefined -> random:seed(), get(random_seed); Seed -> Seed end, {_, _, MSecs} = now(), random:seed({S2,S3,MSecs}), get(random_seed). A curious aspect of random.erl is that the random:seed/1 function returns the _old_ value, and there is no get_seed() function. Anyway, something like the above should give you more varying distributions. Regards, Uffe From daniel@REDACTED Wed Feb 8 17:14:59 2006 From: daniel@REDACTED (Daniel Luna) Date: Wed, 8 Feb 2006 17:14:59 +0100 (CET) Subject: Initializing random seeds In-Reply-To: References: Message-ID: On Wed, 8 Feb 2006, Ulf Wiger (AL/EAB) wrote: > A curious aspect of random.erl is that the > random:seed/1 function returns the _old_ value, > and there is no get_seed() function. I can provide you with one :-) get_seed() -> Seed = random:seed({1,1,1}), random:seed(Seed), Seed. :-) /Luna -- Daniel Luna | Current projects: daniel@REDACTED | - Consulting in Rome Yes, I'm one of those now. | - Learning Yaws www.erlang-consulting.com | - Looking for thesis ideas From camster@REDACTED Wed Feb 8 18:01:55 2006 From: camster@REDACTED (Richard Cameron) Date: Wed, 8 Feb 2006 17:01:55 +0000 Subject: error logging with tty? In-Reply-To: <3bb44c6e0602080404q747a6451uad7bdc26befe600b@mail.gmail.com> References: <3bb44c6e0602080404q747a6451uad7bdc26befe600b@mail.gmail.com> Message-ID: <5CBECB3A-D9CC-43B4-BC01-DA46A55D40E6@citeulike.org> On 8 Feb 2006, at 12:04, bryan rasmussen wrote: > Hi, I was just wondering, the documentation on the error logger says: > > " The events are, by default, logged to tty" > what are the non-defaults? The error logger is a standard OTP gen_event manager. See section 4 of the design principles documentation for details: > Is it at all possible to write error output to file. Is it possible to > query a past error, as one would assume with normal concepts of > logging? You can add any event handler you like to it. You could either write your own (to log the data to a text file, send you an instant message, alert you on a pager, whatever), or you could use the standard log_mf_h which will dump out your log messages to a binary file on disk. It's then possible to browse reports using the rb module (report browser) which decodes the binary to something readable and lets you search for previous errors. The easiest way to enable log_mf_h in your application is to put something like this in your config file: [{sasl, [ {error_logger_mf_dir,"/var/log/my_application"}, {error_logger_mf_maxbytes,10485760}, % 10 MB {error_logger_mf_maxfiles, 10} ]} See the SASL man page for more details. Richard. From robert.virding@REDACTED Wed Feb 8 18:45:44 2006 From: robert.virding@REDACTED (Robert Virding) Date: Wed, 08 Feb 2006 18:45:44 +0100 Subject: Erlang standard library quirks In-Reply-To: <17373.58606.343419.858352@antilipe.corelatus.se> References: <17373.58606.343419.858352@antilipe.corelatus.se> Message-ID: <43EA2E48.1020305@telia.com> Matthias Lang skrev: > James Hague writes: > > > What standard library quirks bug you? > > Two that spring to mind: > > - 'string' and 'list' use conflicting argument order conventions. > > In the string module, all functions which operate on a string > take the string as the _first_ argument. > > In the list module, the list is _last_ more often than not. > > Example: string:chr versus lists:member > > Not much which can be done about this, I think we're stuck with it. String uses the convention that the thing you are working on comes first. So does part of lists. While those functions in lists which take functional arguments have been influenced by functional languages where the thing comes last so you can more easily build partial evaluations. Yeah! The standard libraries are full of inconsistencies, not just argument order conventions, there are many, too many, naming conventions, both for functions and modules. Two reasons are different influences and that we just didn't worry about in the beginning. You could always change it later. However, then users started whining and complaining so we couldn't set it right. :-) > - The general vagueness about the speed/size properties of dict, > sets, gb_trees and other data structures. gb_trees (1), which > is one of the 'less vague' ones says > > Behaviour is logaritmic [sic] (as it should be). > > An alternative which is almost as terse, but more informative: > > Insertion, deletion and lookup are O(log N), amortised. > > dict is worse, with just a snooty > > The representation of a dictionary is not defined. > > it may as well say "don't you worry about that". Turns out > it's a hash (2). (Snooty reply) One reason for having an abstract data type like dict IS to hide the internal representation so that users don't go in and fiddle with things they should best leave alone. > Matthias > > (1): The original (?) paper about gb_trees is pleasantly lucid, a > pleasure to read: http://user.it.uu.se/~arnea/abs/gb.html > (2): Read the source, or > > http://thread.gmane.org/gmane.comp.lang.erlang.general/12385 > http://www.cs.cmu.edu/afs/cs.cmu.edu/user/christos/www/courses/826-resources/PAPERS+BOOK/linear-hashing.PDF The paper in Software, Practice and Experience describing the string storage for Icon was much more readable and understandable. From ulf.wiger@REDACTED Wed Feb 8 19:11:20 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 8 Feb 2006 19:11:20 +0100 Subject: Erlang standard library quirks Message-ID: Robert Virding > > dict is worse, with just a snooty > > > > The representation of a dictionary is not defined. > > > > it may as well say "don't you worry about that". Turns out > > it's a hash (2). > > (Snooty reply) One reason for having an abstract data type > like dict IS to hide the internal representation so that > users don't go in and fiddle with things they should best leave > alone. Of course, if the documentation of an abstract data type refuses to say anything about complexity, would you say it's generally safe to assume that it can be used for large data sets? (: /Uffe From cyberdanx@REDACTED Wed Feb 8 19:36:16 2006 From: cyberdanx@REDACTED (Chris Campbell) Date: Wed, 8 Feb 2006 18:36:16 +0000 Subject: TCP/IP Stream and recv? Message-ID: Hi, This may be a misunderstanding of tcp but here goes. The following client sends two messages to a client one after the other, then waits 5 seconds and exits. The server waits for 1 second after accepting a connection, then does 1 call to recv. It only retrieves the first message. Is this Erlang specific or TCP behaviour? My understanding of tcp is that it's a stream and recv may return both messages (ignoring fragmentation for the moment). I have only used tcp with single requests like HTTP so far. I'm now toying with something that will send messages back and forth hence why it's important to know if recv will pull a single message or it just pulls everything to make account for this in the protocol parser. Cheers, Chris Erlang (BEAM) emulator version 5.4.6 [source] [threads:0] Eshell V5.4.6 (abort with ^G) 1> c(client). {ok,client} 2> client:send_server(55806, 'localhost', "GIVE ME LOVE", "TOO LATE"). ok Erlang (BEAM) emulator version 5.4.6 [source] [threads:0] Eshell V5.4.6 (abort with ^G) 1> c(srv). {ok,srv} 2> srv:server(55806). GIVE ME LOVE ok -module(client). -export([send_server/4]). send_server(Port, Host, Msg1, Msg2) -> {ok, Socket} = gen_tcp:connect(Host, Port, [binary, {packet, 4}]), ok = gen_tcp:send(Socket, Msg1), ok = gen_tcp:send(Socket, Msg2), delay(4000), ok = gen_tcp:close(Socket). delay(X) -> receive ok -> ok after X -> ok end. -- -module(srv). -export([server/1]). server(Port) -> {ok, LSock} = gen_tcp:listen(Port, [binary, {packet, 4}, {active, false}]), {ok, Sock} = gen_tcp:accept(LSock), delay(1000), {ok, Bin} = do_recv(Sock), ok = gen_tcp:close(Sock), ok = gen_tcp:close(LSock), io:format("~s~n", [binary_to_list(Bin)]), ok. do_recv(Sock) -> gen_tcp:recv(Sock, 0). delay(X) -> receive ok -> ok after X -> ok end. -- From hedeland@REDACTED Wed Feb 8 20:11:24 2006 From: hedeland@REDACTED (Per Hedeland) Date: Wed, 8 Feb 2006 20:11:24 +0100 (CET) Subject: TCP/IP Stream and recv? In-Reply-To: Message-ID: <200602081911.k18JBOLu057500@tordmule.bluetail.com> Chris Campbell wrote: > >This may be a misunderstanding of tcp but here goes. The following >client sends two messages to a client one after the other, then waits >5 seconds and exits. The server waits for 1 second after accepting a >connection, then does 1 call to recv. It only retrieves the first >message. Is this Erlang specific or TCP behaviour? My understanding >of tcp is that it's a stream and recv may return both messages >(ignoring fragmentation for the moment). Generally correct, but... - what did you think that "{packet, 4}" option did?:-) >I have only used tcp with single requests like HTTP so far. I'm now >toying with something that will send messages back and forth hence why >it's important to know if recv will pull a single message or it just >pulls everything to make account for this in the protocol parser. If you use one of the packet options, it will pull a single message - that's what they do, implement "packet boundaries" on top of TCP. You could easily do it yourself in the Erlang code (or any other language), but it's a bit convenient to have the lower levels do it in some cases (maybe a bit more efficient too). If you don't use any of the packet options, it behaves just like TCP - there are no messages, only a byte stream, and your recv could get anything from 1 byte out of the first message to both messages complete. --Per Hedeland From paris@REDACTED Wed Feb 8 20:12:34 2006 From: paris@REDACTED (Javier =?iso-8859-1?Q?Par=EDs_Fern=E1ndez?=) Date: Wed, 8 Feb 2006 20:12:34 +0100 Subject: TCP/IP Stream and recv? In-Reply-To: References: Message-ID: <20060208191234.GA22554@dc.fi.udc.es> Hi, On Wed, Feb 08, 2006 at 06:36:16PM +0000, Chris Campbell wrote: > Hi, > > This may be a misunderstanding of tcp but here goes. The following > client sends two messages to a client one after the other, then waits > 5 seconds and exits. The server waits for 1 second after accepting a > connection, then does 1 call to recv. It only retrieves the first > message. Is this Erlang specific or TCP behaviour? My understanding > of tcp is that it's a stream and recv may return both messages > (ignoring fragmentation for the moment). Yes, it works that way. > I have only used tcp with single requests like HTTP so far. I'm now > toying with something that will send messages back and forth hence why > it's important to know if recv will pull a single message or it just > pulls everything to make account for this in the protocol parser. In your case it's due to the use of {packet, 4}, which is a feature added in Erlang to support sending messages using tcp, insted of having a continuous stream. If you want to receive everything in one call you hace to use either raw or 0. Regards. From cyberdanx@REDACTED Wed Feb 8 20:44:50 2006 From: cyberdanx@REDACTED (Chris Campbell) Date: Wed, 8 Feb 2006 19:44:50 +0000 Subject: TCP/IP Stream and recv? In-Reply-To: <200602081911.k18JBOLu057500@tordmule.bluetail.com> References: <200602081911.k18JBOLu057500@tordmule.bluetail.com> Message-ID: On 08/02/06, Per Hedeland wrote: > Generally correct, but... - what did you think that "{packet, 4}" option > did?:-) > I confess it didn't register what packets meant at that level. I was thinking lower level, but it's tcp not ip. > If you don't use any of the packet options, it behaves just like TCP - > there are no messages, only a byte stream, and your recv could get > anything from 1 byte out of the first message to both messages complete. I see, thanks. This implies if the client is in erlang, it's ok to use {packet, 4} but if the client is in another language you need to do as you suggest and implement a scheme for identifying starts/ends of messages in the stream or use the packaging format the OTP uses. Is it possible to instruct the system on the format of messages so that recv will pull a single message in a customised format? I just noticed the header option, is this what that is for? It doesn't really matter if we can't; another level of indirection will solve this anyway. Thanks again, Chris From benefitsdragon@REDACTED Wed Feb 8 20:56:55 2006 From: benefitsdragon@REDACTED (Benefits Dragon) Date: Wed, 8 Feb 2006 19:56:55 +0000 Subject: XP System Level Functions Message-ID: <2db317000602081156h31a5327dh7b8fc38715b6f87d@mail.gmail.com> Recently I had some spyware on my XP computer and I thought I'd have a go at creating some home-made detection programs in Erlang but I realised I didn't have a clue how to do a lot of the things I would need. I know its got the win32reg module that's fine for the registry but there were some other things I wondered how to do: 1. List and detail running processes 2. Identify which process is writing to disk or created/ing a file. 3. Get details of applications accessing the internet. Anyone know how to do these kind of things or whether they can be done in Erlang? Any pointers would be appreciated. From hedeland@REDACTED Wed Feb 8 22:47:24 2006 From: hedeland@REDACTED (Per Hedeland) Date: Wed, 8 Feb 2006 22:47:24 +0100 (CET) Subject: TCP/IP Stream and recv? In-Reply-To: Message-ID: <200602082147.k18LlOpF058090@tordmule.bluetail.com> Chris Campbell wrote: > >I see, thanks. This implies if the client is in erlang, it's ok to >use {packet, 4} but if the client is in another language you need to >do as you suggest and implement a scheme for identifying starts/ends >of messages in the stream or use the packaging format the OTP uses. Yes, I guess that's about right - assuming that you *want* to preserve message boundaries, of course. And if you do, and can't trivially determine them from the messages themselves, {packet, N} is probably the most obvious and trivial thing to implement in any other language too. And if both ends are Erlang, you could perhaps just use Erlang distribution instead, and just forget all about these worries... >Is it possible to instruct the system on the format of messages so >that recv will pull a single message in a customised format? Not that I know of. > I just >noticed the header option, is this what that is for? No, it doesn't affect how much is pulled, only the form it is delivered in. (And I guess it's pretty much obsoleted by the Bit Syntax.) --Per Hedeland From cyberdanx@REDACTED Thu Feb 9 00:12:42 2006 From: cyberdanx@REDACTED (Chris Campbell) Date: Wed, 8 Feb 2006 23:12:42 +0000 Subject: TCP/IP Stream and recv? In-Reply-To: <200602082147.k18LlOpF058090@tordmule.bluetail.com> References: <200602082147.k18LlOpF058090@tordmule.bluetail.com> Message-ID: On 08/02/06, Per Hedeland wrote: > > Yes, I guess that's about right - assuming that you *want* to preserve > message boundaries, of course. And if you do, and can't trivially > determine them from the messages themselves, {packet, N} is probably the > most obvious and trivial thing to implement in any other language too. That's true, but {packet, N} assumes the client is trustworthy and will send an N byte header containing the number of bytes followed by that number of bytes. If it sends less, the server will time out and kill the connection. If it sends more... Anyway, I think I'm getting ahead of myself thinking about untrustworthy clients. I'm only playing at the mo'. > And if both ends are Erlang, you could perhaps just use Erlang > distribution instead, and just forget all about these worries... :D I figured I'd better learn socket programming properly since it's a skill I don't really have, but might use. Then again, almost everything seems to be going over HTTP these days. Thanks again, Chris From jefcrane@REDACTED Thu Feb 9 06:32:51 2006 From: jefcrane@REDACTED (Jeff Crane) Date: Wed, 8 Feb 2006 21:32:51 -0800 (PST) Subject: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: Message-ID: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> It took me a month to save enough to drop 94$ on a retail book on erlang, now all the english copies are gone and some squatter is selling the last copy on Amazon used for 165$!!! Is anyone abroad able to locate and sell me an english copy of this book or know where I can order one? __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From mark.engelberg@REDACTED Thu Feb 9 08:09:17 2006 From: mark.engelberg@REDACTED (Mark Engelberg) Date: Wed, 8 Feb 2006 23:09:17 -0800 Subject: Locking data for writes, but not reads Message-ID: I've been trying to learn a bit about Erlang, and I'm not clear on how to implement this common idea using the Erlang mailbox paradigm for communication between processes. For example, let's say I have some process that manages a complex data structure. When other processes ask to read some information from the structure, it should read this information and deliver this information to the requesting process. In the meantime, it should continue processing messages (because it should be able to handle read requests in parallel). However, if it receives a message to modify or write to the data structure, it can't allow any more reads to take place until the write is completed. How can this be elegantly done in Erlang? There seems to be a couple of problems. First, it's not clear how to process the read commands in parallel. Erlang can't spawn off another process to handle a read request, because the new process won't have access to the data structure stored in the state of the managing process. The other tricky part seems to be that you can't start writing to the data structure until all reads are complete. Is there an easy way to find out that all pending reads are complete? Thanks, Mark From manolios@REDACTED Wed Feb 8 19:22:55 2006 From: manolios@REDACTED (Panagiotis Manolios) Date: Wed, 8 Feb 2006 13:22:55 -0500 Subject: FMCAD 2006 Call for Papers -- http://fmcad.org/2006 Message-ID: <20060208182255.GB948@cc.gatech.edu> FMCAD 2006 Call for Papers -- http://fmcad.org/2006 International Conference on Formal Methods in Computer-Aided Design Sponsored by IEEE, CEDA (Council on Electronic Design Automation) November 12-16, 2006, San Jose, California (Note: ICCAD also takes place in San Jose the previous week, Nov. 5-9) IMPORTANT DATES ======================================================================== Submission deadline: April 24, 2006 Acceptance notification: June 23, 2006 Final version due: July 28, 2006 SCOPE OF CONFERENCE ======================================================================== FMCAD 2006 is the sixth in a series of conferences on the theory and applications of formal methods in hardware and system verification. FMCAD provides a leading forum to researchers in academia and industry for presenting and discussing groundbreaking methods, technologies, theoretical results, and tools for reasoning formally about computing systems. In addition to the technical program, FMCAD will offer a full day of tutorials on model checking, theorem proving, decision procedures, and the application of such methods in industry. FMCAD will also include panels and affiliated workshops. Topics of interest for the technical program include, but are not limited to: + Foundations: model checking, theorem proving, abstraction and refinement techniques, compositional methods, decision procedures, SAT-based methods, combining deductive methods with decision procedures, and probabilistic methods in verification. + Applications of formal methods in design: assertion-based verification, equivalence checking, transaction-level verification, semi-formal verification, runtime verification, simulation and testcase generation, coverage analysis, microcode verification, embedded systems, software verification, concurrent systems, timing verification, and formal approaches to performance and power. + Model-based approaches: modeling and specification languages, hardware/software co-design and verification, design derivation and transformation, and correct-by-construction methods. + Formal methods for the design and verification of emerging and novel technologies: nano, quantum, biological, video, gaming, and multimedia applications. + Verification applications: tools, industrial experience reports, and case studies. PAPER SUBMISSIONS ======================================================================== Submissions must be made electronically in PDF format through the FMCAD Web site, http://fmcad.org/2006. There are two categories of papers: A. Regular papers. Authors are invited to submit papers of up to 8 pages using the IEEE Transactions format on letter-size paper with a 10-point font size (see http://www.ieee.org/portal/pages/pubs/transactions/stylesheets.html). A double-blind review process will be used, therefore, submissions must not identify the authors in any way. We recommend that self-citations are written in the third person. Submitted papers must contain original research that has not been concurrently submitted to any other conference and that has not previously been published elsewhere. Any partial overlap with any published or concurrently submitted paper must be clearly indicated. If experimental results are reported, authors are encouraged to provide enough access to their data so that results can be independently verified. Papers should contain a short abstract of approximately 150 words clearly stating the contribution of the submission. Finally, a small number of the accepted papers will be considered for a distinguished paper award. B. Short papers. The page limit is 2 pages using the same format as for regular papers. Short papers can describe applications, case studies, industrial experience reports, emerging results, or implemented tools with novel features. A demonstration will be required for accepted tool papers. ORGANIZATION ======================================================================== Chairs: Aarti Gupta, NEC Labs America Panagiotis Manolios, Georgia Tech Local Arrangements: Jeremy Levitt, Mentor Graphics Vigyan Singhal, Singhal ASIC Solutions Panels: Andreas Kuehlmann, Cadence Tutorials: Leonardo de Moura, SRI Webmasters: Sudarshan Srinivasan, Georgia Tech Daron Vroon, Georgia Tech Workshops: Ganesh Gopalakrishnan, Univ. Utah TUTORIALS ======================================================================== Jason Baumgartner, IBM Corporation Edmund M. Clarke, Carnegie Mellon University J Strother Moore, University of Texas at Austin Leonardo de Moura, SRI PROGRAM COMMITTEE ======================================================================== Clark Barrett, New York University, USA Jason Baumgartner, IBM Corporation, USA Valeria Bertacco, University of Michigan, USA Dominique Borrione, Grenoble University, France Supratik Chakraborty, Indian Institute of Technology Bombay, India Alessandro Cimatti, Istituto per la Ricerca Scientifica e Tecnologica, Italy Edmund M. Clarke, Carnegie Mellon University, USA Leonardo de Moura, SRI International, USA Rolf Drechsler, University of Bremen, Germany Malay K. Ganai, NEC Laboratories America, USA Ganesh Gopalakrishnan, University of Utah, USA Susanne Graf, VERIMAG, France Orna Grumberg, Technion - Israel Institute of Technology, Israel Aarti Gupta, NEC Laboratories America, USA Alan J. Hu, University of British Columbia, Canada Warren Hunt, University of Texas at Austin, USA Andreas Kuehlmann, Cadence Laboratories, USA Panagiotis Manolios, Georgia Institute of Technology, USA Andy Martin, IBM Research Division, USA Ken McMillan, Cadence Labs, USA John O'Leary, Intel Corp., USA Wolfgang Paul, Saarland University, Germany Carl Pixley, Synopsys Inc., USA Amir Pnueli, NYU, USA Natarajan Shankar, SRI International, USA Mary Sheeran, Chalmers University of Technology, Sweden Eli Singerman, Intel Corp., Israel Vigyan Singhal, Singhal ASIC Solutions, Inc., USA Anna Slobodova, Intel Corp., USA Fabio Somenzi, University of Colorado at Boulder, USA Richard Trefler, University of Waterloo, Canada Matthew Wilding, Rockwell Collins Inc., USA Yaron Wolfsthal, IBM, Israel FMCAD 2006 Call for Papers -- http://fmcad.org/2006 International Conference on Formal Methods in Computer-Aided Design Sponsored by IEEE, CEDA (Council on Electronic Design Automation) November 12-16, 2006, San Jose, California (Note: ICCAD also takes place in San Jose the previous week, Nov. 5-9) IMPORTANT DATES ======================================================================== Submission deadline: April 24, 2006 Acceptance notification: June 23, 2006 Final version due: July 28, 2006 SCOPE OF CONFERENCE ======================================================================== FMCAD 2006 is the sixth in a series of conferences on the theory and applications of formal methods in hardware and system verification. FMCAD provides a leading forum to researchers in academia and industry for presenting and discussing groundbreaking methods, technologies, theoretical results, and tools for reasoning formally about computing systems. In addition to the technical program, FMCAD will offer a full day of tutorials on model checking, theorem proving, decision procedures, and the application of such methods in industry. FMCAD will also include panels and affiliated workshops. Topics of interest for the technical program include, but are not limited to: + Foundations: model checking, theorem proving, abstraction and refinement techniques, compositional methods, decision procedures, SAT-based methods, combining deductive methods with decision procedures, and probabilistic methods in verification. + Applications of formal methods in design: assertion-based verification, equivalence checking, transaction-level verification, semi-formal verification, runtime verification, simulation and testcase generation, coverage analysis, microcode verification, embedded systems, software verification, concurrent systems, timing verification, and formal approaches to performance and power. + Model-based approaches: modeling and specification languages, hardware/software co-design and verification, design derivation and transformation, and correct-by-construction methods. + Formal methods for the design and verification of emerging and novel technologies: nano, quantum, biological, video, gaming, and multimedia applications. + Verification applications: tools, industrial experience reports, and case studies. PAPER SUBMISSIONS ======================================================================== Submissions must be made electronically in PDF format through the FMCAD Web site, http://fmcad.org/2006. There are two categories of papers: A. Regular papers. Authors are invited to submit papers of up to 8 pages using the IEEE Transactions format on letter-size paper with a 10-point font size (see http://www.ieee.org/portal/pages/pubs/transactions/stylesheets.html). A double-blind review process will be used, therefore, submissions must not identify the authors in any way. We recommend that self-citations are written in the third person. Submitted papers must contain original research that has not been concurrently submitted to any other conference and that has not previously been published elsewhere. Any partial overlap with any published or concurrently submitted paper must be clearly indicated. If experimental results are reported, authors are encouraged to provide enough access to their data so that results can be independently verified. Papers should contain a short abstract of approximately 150 words clearly stating the contribution of the submission. Finally, a small number of the accepted papers will be considered for a distinguished paper award. B. Short papers. The page limit is 2 pages using the same format as for regular papers. Short papers can describe applications, case studies, industrial experience reports, emerging results, or implemented tools with novel features. A demonstration will be required for accepted tool papers. ORGANIZATION ======================================================================== Chairs: Aarti Gupta, NEC Labs America Panagiotis Manolios, Georgia Tech Local Arrangements: Jeremy Levitt, Mentor Graphics Vigyan Singhal, Singhal ASIC Solutions Panels: Andreas Kuehlmann, Cadence Tutorials: Leonardo de Moura, SRI Webmasters: Sudarshan Srinivasan, Georgia Tech Daron Vroon, Georgia Tech Workshops: Ganesh Gopalakrishnan, Univ. Utah TUTORIALS ======================================================================== Jason Baumgartner, IBM Corporation Edmund M. Clarke, Carnegie Mellon University J Strother Moore, University of Texas at Austin Leonardo de Moura, SRI PROGRAM COMMITTEE ======================================================================== Clark Barrett, New York University, USA Jason Baumgartner, IBM Corporation, USA Valeria Bertacco, University of Michigan, USA Dominique Borrione, Grenoble University, France Supratik Chakraborty, Indian Institute of Technology Bombay, India Alessandro Cimatti, Istituto per la Ricerca Scientifica e Tecnologica, Italy Edmund M. Clarke, Carnegie Mellon University, USA Leonardo de Moura, SRI International, USA Rolf Drechsler, University of Bremen, Germany Malay K. Ganai, NEC Laboratories America, USA Ganesh Gopalakrishnan, University of Utah, USA Susanne Graf, VERIMAG, France Orna Grumberg, Technion - Israel Institute of Technology, Israel Aarti Gupta, NEC Laboratories America, USA Alan J. Hu, University of British Columbia, Canada Warren Hunt, University of Texas at Austin, USA Andreas Kuehlmann, Cadence Laboratories, USA Panagiotis Manolios, Georgia Institute of Technology, USA Andy Martin, IBM Research Division, USA Ken McMillan, Cadence Labs, USA John O'Leary, Intel Corp., USA Wolfgang Paul, Saarland University, Germany Carl Pixley, Synopsys Inc., USA Amir Pnueli, NYU, USA Natarajan Shankar, SRI International, USA Mary Sheeran, Chalmers University of Technology, Sweden Eli Singerman, Intel Corp., Israel Vigyan Singhal, Singhal ASIC Solutions, Inc., USA Anna Slobodova, Intel Corp., USA Fabio Somenzi, University of Colorado at Boulder, USA Richard Trefler, University of Waterloo, Canada Matthew Wilding, Rockwell Collins Inc., USA Yaron Wolfsthal, IBM, Israel From jakob@REDACTED Thu Feb 9 09:26:37 2006 From: jakob@REDACTED (Jakob Cederlund) Date: Thu, 09 Feb 2006 09:26:37 +0100 Subject: Fw: How To Use Erlang Driver Queue In-Reply-To: <01ca01c62c8e$a06660c0$5f00a8c0@wavenet.lk> References: <01ca01c62c8e$a06660c0$5f00a8c0@wavenet.lk> Message-ID: <43EAFCBD.8080600@erix.ericsson.se> Hello! The driver queue has _nothing_ to do with erlang messages to and from the driver. It is a driver-internal queue that the driver can use to hold data that is not yet ready to deliver to erlang, one example is partial messages read from the network. The driver queue is an ErlIOVec, so it can be sent to the emulator with driver_outputv, after which it should probably be cleared with driver_deq. The thing with the driver queue, the reason for having an API at all, is that the driver will not be closed (even if port_close/1 is called on the erlang side) as long as there is data in the queue. Hope this helps! /Jakob Sanjaya Vitharana wrote: > Hi .... All, > > I have sent this mail to the community last month. But not a single > reply received. > > Referring to the documentation in erl_driver it says "Also, the driver > queue is an ErlIOVec." > > So, If any one can show me knows how to use the Erlang Driver Queue > (ErlIOVec) to get Driver Side Events to emulator, it will be a great help. > > Thanks in advance, > > Sanjaya Vitharana > > ----- Original Message ----- > *From:* Sanjaya Vitharana > *To:* erlang-questions@REDACTED > *Sent:* Monday, 09 January 2006 01:13 pm > *Subject:* How To Use Erlang Driver Queue > > Hi...!!! > > How to use Erlang Driver Queue (ErlIOVec) to get Driver Side Events to > emulator? > > I have tried with driver_output_term(...). But it's not work in the > way i want, specially when I try to get the driverside events to emulator. > > Can't we use the driver_enq(...) function to directly put the messages > to the queue, & get it from the emulator ? If it is possible, i'd like > to know how this can be done. > > I have tried with driver_enq(...) to put the data, but don't receiced > any event to the emulator. One thing I noted is, when stop the driver > it calls flush. It seems the data I put into the queue was there till > I stop the driver. > > I don't know i'm going in a proper way or not. So need any guidence > from expert, because the documentation seems to be not enough to for > this topic. > > Thanks in advance > > Sanjaya Vitharana From erlang@REDACTED Thu Feb 9 09:50:10 2006 From: erlang@REDACTED (Peter Lund) Date: Thu, 09 Feb 2006 09:50:10 +0100 Subject: TCP/IP Stream and recv? In-Reply-To: References: <200602082147.k18LlOpF058090@tordmule.bluetail.com> Message-ID: <43EB0242.5030300@lundata.se> Chris Campbell wrote: >That's true, but {packet, N} assumes the client is trustworthy and >will send an N byte header containing the number of bytes followed by >that number of bytes. If it sends less, the server will time out and >kill the connection. If it sends more... > >Anyway, I think I'm getting ahead of myself thinking about >untrustworthy clients. I'm only playing at the mo'. > > Yes, TCP connections require both ends to talk correctly otherwise it wont work. A misbehaving client will simply not get any service by a server and if the server detect this it should probably just close down the connection. Debugging activity should then focus on the client's behaviour. /Peter From chsu79@REDACTED Thu Feb 9 10:10:26 2006 From: chsu79@REDACTED (Christian S) Date: Thu, 9 Feb 2006 10:10:26 +0100 Subject: Locking data for writes, but not reads In-Reply-To: References: Message-ID: 2006/2/9, Mark Engelberg : > For example, let's say I have some process that manages a complex data > structure. When other processes ask to read some information from the > structure, it should read this information and deliver this > information to the requesting process. In the meantime, it should > continue processing messages (because it should be able to handle read > requests in parallel). However, if it receives a message to modify or > write to the data structure, it can't allow any more reads to take > place until the write is completed. Perhaps the following approach relying on selective receives? loop(Structure) -> receive {read, Pid, LookupKey} -> ok = do_read(Pid, Structure, LookupKey), loop(Structure); {open_transaction, Pid, TransactionId} -> Pid ! {locked, self(), TransactionId}, {ok, NewStructure} = transaction(Structure, Structure, TransactionId), loop(NewStructure) end. transaction(OldStructure, Structure, TransactionId) -> receive {read, Pid, LookupKey} -> ok = do_read(Pid, OldStructure, LookupKey), transaction(OldStructure, Structure, TransactionId); {read, Pid, LookupKey, TransactionId} -> ok = do_read(Pid, Structure, LookupKey, TransactionId), transaction(OldStructure, Structure, TransactionId); {update, Pid, Update, TransactionId} -> {ok, UpdatedStructure} = do_update(Pid, Structure, Update, TransactionId), transaction(OldStructure, UpdatedStructure, TransactionId); {close_transaction, Pid, TransactionId} -> Pid ! {closed_transaction, self(), TransactionId}, {ok, Structure} end. In the 'loop' state it accepts ordinary reads and the opening of write transactions. This is how the user of the data structure process go about to modify the content: TId = make_ref(), Storage ! {transaction, self(), TId}, ...reads against modified tree and updates against it..., Storage ! {close_transaction, self(), TId} When in a transaction it will allow all messages through that know the transaction id. Ordinary reads will read the old structure. It is assumed that each update leave the structure usable for lookups. > How can this be elegantly done in Erlang? There seems to be a couple > of problems. First, it's not clear how to process the read commands > in parallel. Erlang can't spawn off another process to handle a read > request, because the new process won't have access to the data > structure stored in the state of the managing process. The other > tricky part seems to be that you can't start writing to the data > structure until all reads are complete. Is there an easy way to find > out that all pending reads are complete? > The approach I used just allow one to interleave read lookups on the unmodified structure while performing updates to build a new structure, no concurrent reads there. To make it concurrent you should probably keep multiple copies of the data, write-lock every copy when a transaction is started, collect update sequences in the write transaction, and on transaction end issue the updates to each update. It gets hairy, luckily though, we already have mnesia. From fritchie@REDACTED Thu Feb 9 10:25:30 2006 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Thu, 09 Feb 2006 03:25:30 -0600 Subject: Hakan Mattson's mnesia_internals_slides.pdf? Message-ID: <200602090925.k199PUlq034282@snookles.snookles.com> Does anyone have a copy lying around of H?kan Mattson's slides on Mnesia's internals? I've been stymied trying to find a copy: the hyperlink in the Erlang FAQ is broken, and both Mr. Google and Mr. Internet Archive haven't been able to help. -Scott From hakan@REDACTED Thu Feb 9 10:52:32 2006 From: hakan@REDACTED (Hakan Mattsson) Date: Thu, 9 Feb 2006 10:52:32 +0100 (CET) Subject: Hakan Mattson's mnesia_internals_slides.pdf? In-Reply-To: <200602090925.k199PUlq034282@snookles.snookles.com> References: <200602090925.k199PUlq034282@snookles.snookles.com> Message-ID: On Thu, 9 Feb 2006, Scott Lystig Fritchie wrote: SLF> Does anyone have a copy lying around of H?kan Mattson's slides SLF> on Mnesia's internals? I've been stymied trying to find a copy: SLF> the hyperlink in the Erlang FAQ is broken, and both Mr. Google and SLF> Mr. Internet Archive haven't been able to help. My (somewhat out-dated) home page was probably lost in the recent web-server crash. Now it is on-line again: http://www.erlang.org/~hakan/mnesia_internals_slides.pdf /H?kan From bjorn@REDACTED Thu Feb 9 11:04:54 2006 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 09 Feb 2006 11:04:54 +0100 Subject: Erlang compiler bug in R10 ? In-Reply-To: References: Message-ID: I'll fix the bug in R10B-10. /Bjorn Torbjorn Tornkvist writes: > Hi, > > I'm trying to compile the ibrowse application in jungerl: > ---------------------------------------------------------------- > > make > erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ > -o ../ebin ibrowse.erl > erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ > -o ../ebin ibrowse_http_client.erl > Function chunk_request_body/3 refers to undefined label 410 > ./ibrowse_http_client.erl:none: internal error in beam_dead; > crash reason: {{case_clause,{'EXIT',{undefined_label,410}}}, > [{compile,'-select_passes/2-anonymous-2-',2}, > {compile,'-internal_comp/4-anonymous-1-',2}, > {compile,fold_comp,3}, > {compile,internal_comp,4}, > {compile,internal,3}]} > make: *** [../ebin/ibrowse_http_client.beam] Error 1 > ------------------------------------------------------------------ > > I get this result with R10B-4, R10B-8, R10B-9 > > But with R9C, ibrowse compiles just fine. > > Cheers, Tobbe > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From ulf.wiger@REDACTED Thu Feb 9 11:06:00 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 9 Feb 2006 11:06:00 +0100 Subject: Where to get Concurrent Programming in Erlang (2nd Edition) Message-ID: $165 !!? Man! I have two copies of the book and one at home. I'm off to the bookstore now. (: (Actually, they are not mine to sell... otherwise, I could definitely part with one - esp the first edition.) /Uffe > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Jeff Crane > Sent: den 9 februari 2006 06:33 > To: erlang-questions@REDACTED > Subject: Where to get Concurrent Programming in Erlang (2nd Edition) > > It took me a month to save enough to drop 94$ on a retail > book on erlang, now all the english copies are gone and some > squatter is selling the last copy on Amazon used for 165$!!! > Is anyone abroad able to locate and sell me an english copy > of this book or know where I can order one? > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection > around http://mail.yahoo.com > From sjn@REDACTED Thu Feb 9 11:18:44 2006 From: sjn@REDACTED (Sanjay Mehta) Date: Thu, 09 Feb 2006 15:48:44 +0530 Subject: Hakan Mattson's mnesia_internals_slides.pdf? In-Reply-To: <200602090925.k199PUlq034282@snookles.snookles.com> References: <200602090925.k199PUlq034282@snookles.snookles.com> Message-ID: <43EB1704.5050000@cypress.com> http://www.erlang.org/~hakan/mnesia_internals_slides.pdf On 09/02/2006 2:55 PM, Scott Lystig Fritchie wrote: > Does anyone have a copy lying around of H?kan Mattson's slides > on Mnesia's internals? I've been stymied trying to find a copy: > the hyperlink in the Erlang FAQ is broken, and both Mr. Google and > Mr. Internet Archive haven't been able to help. > > -Scott > > From jakob@REDACTED Thu Feb 9 11:32:04 2006 From: jakob@REDACTED (Jakob Cederlund) Date: Thu, 09 Feb 2006 11:32:04 +0100 Subject: Questions about Erlang port drivers In-Reply-To: <14cf844b0601311325r2caee820o73b97a8ff823dbf8@mail.gmail.com> References: <14cf844b0601310806s71b363br58dc5fef4bbbfd83@mail.gmail.com> <43DFCD40.8040809@hyber.org> <14cf844b0601311325r2caee820o73b97a8ff823dbf8@mail.gmail.com> Message-ID: <43EB1A24.4060406@erix.ericsson.se> The current behaviour of driver_set_timer() is indeed a bug, and will be corrected, hopefully in the next release of R10. It will be fixed to work as described in the documentation. /Jakob From Bruce@REDACTED Thu Feb 9 11:34:31 2006 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Thu, 09 Feb 2006 23:34:31 +1300 Subject: Erlang compiler bug in R10 ? In-Reply-To: References: Message-ID: <43EB1AB7.3050103@Fitzsimons.org> Torbjorn Tornkvist wrote: > Hi, > > I'm trying to compile the ibrowse application in jungerl: > ---------------------------------------------------------------- > > make > erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ > -o ../ebin ibrowse.erl > erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ > -o ../ebin ibrowse_http_client.erl > Function chunk_request_body/3 refers to undefined label 410 > ./ibrowse_http_client.erl:none: internal error in beam_dead; > crash reason: {{case_clause,{'EXIT',{undefined_label,410}}}, > [{compile,'-select_passes/2-anonymous-2-',2}, > {compile,'-internal_comp/4-anonymous-1-',2}, > {compile,fold_comp,3}, > {compile,internal_comp,4}, > {compile,internal,3}]} > make: *** [../ebin/ibrowse_http_client.beam] Error 1 > ------------------------------------------------------------------ > Me too :-) This is a variant of a bug that I think Sean Hinde reported on an earlier R10. I used his workaround: replacing the ; in the clause it complains about with "or" fixes it, and the rest of the jungerl compiles okay. ; is or, right? I can never remember. Cheers, Bruce From mickael.remond@REDACTED Thu Feb 9 11:56:31 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Thu, 9 Feb 2006 11:56:31 +0100 Subject: Hakan Mattson's mnesia_internals_slides.pdf? In-Reply-To: <200602090925.k199PUlq034282@snookles.snookles.com> References: <200602090925.k199PUlq034282@snookles.snookles.com> Message-ID: <20060209105631.GA9725@memphis.ilius.fr> * Scott Lystig Fritchie [2006-02-09 03:25:30 -0600]: > Does anyone have a copy lying around of H?kan Mattson's slides > on Mnesia's internals? I've been stymied trying to find a copy: > the hyperlink in the Erlang FAQ is broken, and both Mr. Google and > Mr. Internet Archive haven't been able to help. Hello Scott, I have put a mirror copy on www.erlang-projects.org: http://www.erlang-projects.org/Public/projects/erlangotp/mnesia_internals_sli/view Have fun ! -- Micka?l R?mond http://www.process-one.net/ From julian.tibble@REDACTED Thu Feb 9 11:44:10 2006 From: julian.tibble@REDACTED (Julian Tibble) Date: Thu, 9 Feb 2006 10:44:10 -0000 Subject: Where to get Concurrent Programming in Erlang (2nd Edition) References: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> Message-ID: <006b01c62d65$c5bca820$0702a8c0@PORTHOS> > Subject: Where to get Concurrent Programming in Erlang (2nd Edition) That's the 1996 edition, right? It's available at amazon.co.uk for ?47.49. Amazon in other countries might have it as well. I have no idea how much it would cost to ship to you. Julian From raimo@REDACTED Thu Feb 9 12:23:06 2006 From: raimo@REDACTED (Raimo Niskanen) Date: 09 Feb 2006 12:23:06 +0100 Subject: Mirrors Message-ID: Do you know where there are reliable mirrors of http://www.erlang.org? I have written a little mini-HOWTO on how to mirror the contents including the mailing list archives to be found on http://www.erlang.org/mirrors.html. We need to update the list of known reliable mirrors. -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From Bruce@REDACTED Thu Feb 9 12:35:36 2006 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Fri, 10 Feb 2006 00:35:36 +1300 Subject: Erlang Books...WAS Re: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: <006b01c62d65$c5bca820$0702a8c0@PORTHOS> References: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> <006b01c62d65$c5bca820$0702a8c0@PORTHOS> Message-ID: <43EB2908.105@Fitzsimons.org> Hey I know this is a broken record, but are any new Erlang books getting off the ground? It grieves me to think that * can get a book out, but Erlang can't. Erlang needs it so much more, hell, it probably needs multiple books (Basics, OTP, Optimisation, Patterns, etc). I came across Joe's outline the other day, at http://www.geocities.com/erlang_journal/book1.html - very nice, but it seems to have stalled some time ago. The online docs are v.nice (nice job on R10) but speaking from experience I know that I needed the book sometimes. I know we're all busy people doing real work, but this is becoming a serious barrier to inducting new Erlang people. Is anyone progressing anything? Cheers, Bruce * Lucene, , Joomla, etc etc From ft@REDACTED Thu Feb 9 12:48:46 2006 From: ft@REDACTED (Fredrik Thulin) Date: Thu, 9 Feb 2006 12:48:46 +0100 Subject: Mirrors In-Reply-To: References: Message-ID: <200602091248.46093.ft@it.su.se> On Thursday 09 February 2006 12:23, Raimo Niskanen wrote: > Do you know where there are reliable mirrors of > http://www.erlang.org? > > I have written a little mini-HOWTO on how to mirror the > contents including the mailing list archives to be found > on http://www.erlang.org/mirrors.html. > > We need to update the list of known reliable mirrors. It is unnecessary hard to find the URLs of the mirrors in case the primary server is down. Might I suggest erlang.org doing something similar to lots of other sites, with www2.erlang.org, or www.se.erlang.org and www.other-tld.erlang.org etc? I can set up a mirror at Stockholm university, but I either have to invent a name for the mirror site under su.se, or have one provided by you (a CNAME to one of our web servers). Also, DNS for erlang.org has been a bit flakey for me at times, with only two servers listed in .org. I could set up secondary DNS service (even with IPv6 if you want) for erlang.org too if you wish. /Fredrik From mbj@REDACTED Thu Feb 9 13:05:29 2006 From: mbj@REDACTED (Martin Bjorklund) Date: Thu, 09 Feb 2006 13:05:29 +0100 (CET) Subject: bug/feature in code_server.erl Message-ID: <20060209.130529.108196424.mbj@tail-f.com> Hi, code:del_path() doesn't behave as expected: nassa src> ls /home/mbj/src/a.beam /home/mbj/src/a.beam nassa src> erl -pa /home/mbj/src Erlang (BEAM) emulator version 5.4.10 [source] [hipe] Eshell V5.4.10 (abort with ^G) 1> code:get_path(). ["/home/mbj/src", ".", "/home/mbj/src/otp_src_R10B-8/installed/lib/erlang/lib/kernel-2.10.11/ebin", 2> code:del_path("/home/mbj/src"). true 3> code:which(a). non_existing 4> code:load_file(a). {module,a} 5> code:which(a). "/home/mbj/src/a.beam" 6> code:get_path(). [".", "/home/mbj/src/otp_src_R10B-8/installed/lib/erlang/lib/kernel-2.10.11/ebin", In 1. we see that /home/mbj/src is in the path In 2. /home/mbj/src is deleted In 3. we can see that a.beam is not found in the path In 4. we can still load a.beam, from /home/mbj/src, although /home/mbj/src is not in the path. [browsing code_server.erl...] The problem is in code_server:mod_to_bin's last clause: mod_to_bin([], Mod) -> %% At last, try also erl_prim_loader's own method File = code_aux:to_path(Mod) ++ code_aux:objfile_extension(), case erl_prim_loader:get_file(File) of And it turns out that /home/mbj/src is in erl_prim_loader's path, since it was added with -pa. But why is this clause here? code_server grabs the path from erl_prim_loader at startup, and after that code should be loaded according to the path in code_server. The workaround for me is to clear erl_prim_loader's path. /martin From chaitanya.chalasani@REDACTED Thu Feb 9 13:44:22 2006 From: chaitanya.chalasani@REDACTED (Chaitanya Chalasani) Date: Thu, 9 Feb 2006 18:14:22 +0530 Subject: early warning - new rdbms In-Reply-To: References: Message-ID: <200602091814.22828.chaitanya.chalasani@gmail.com> I would like to beta-test as well. On Wednesday 25 January 2006 14:16, Ulf Wiger (AL/EAB) wrote: > I thought I'd let the cat out of the bag a little... > > If anyone wants to beta-test or help out with some > of the more advanced problems, let me know. > > > I've come pretty far along with a new version of > rdbms. It has several nice features, and I think > it's about to make the transition from 'somewhat > interesting' to 'actually useful': > > - JIT compilation of verification code. The overhead > for type and bounds checking is now only a few (~5) > microseconds per write operation. > - The parameterized indexes that I hacked into mnesia > before are now part of rdbms. This include ordered > indexes and fragmented indexes (i.e. hashed on > index value - so they should scale well.) > - Rdbms will handle fragmented tables transparently > (And actually handles plain tables with less overhead > than mnesia_frag does.) The overhead for using the > rdbms access module (compared to no access module) > on a plain transaction is in the order of 20 > microseconds on my 1 GHz SunBLADE. > - Rdbms hooks into the transaction handling in such a > way that it can automatically rebuild the verification > code as soon as a schema transaction commits. > - A readable file format for schema definitions, trying > to establish a structured way to create large mnesia > databases. I've also added a 'group' concept to be > able to group tables into corresponding subsystems, > since I thought this might be helpful in large > systems. > > > I'm planning to release rdbms with OTP R11, since it > requires some changes to mnesia that (hopefully) will > make it into R11. R11 is planned for May. > > Some of the (fairly minor) changes to mnesia so far: > > - The access module can hook into the transaction > flow by providing callbacks for begin_activity() > and end_activity(). Rdbms uses this for proper > handling of abort and commit triggers as well as > loop detection in referential integrity checks. > It also allows rdbms to detect schema changes. > - An 'on-load' hook allows rdbms to build indexes > the first time a table is loaded. > - A low-level access API for foreign tables. My > first foreign table attempt was a 'disk_log'. > It makes it possible to properly log events > inside a transaction context. You also get > replicated logs almost for free, as well as > (if you want to) fragmented logs. (: > My next attempt at a foreign table is a read- > only file system (doesn't have to be read-only, > but I thought I'd start with that.) Thus > the experiments with converting regexps to > the select pattern syntax. > > One interesting experiment might be to define > an ISAM table type for really large ordered sets > on disk. Combining it with rdbms, you can type- > specify the data types and then convert to > whatever format is expected by the ISAM files. > > Some questions to those who might be interested: > > - I'd like to break compatibility with the old > rdbms in some respects. Is this a problem for > anyone? (speak now or forever hold your peace) > - Do you have any suggestions or feature requests? > - Do you want to help out? > > Regards, > Uffe -- Chaitanya Chalasani From csanto@REDACTED Thu Feb 9 13:49:30 2006 From: csanto@REDACTED (Corrado Santoro) Date: Thu, 09 Feb 2006 13:49:30 +0100 Subject: bug/feature in code_server.erl In-Reply-To: <20060209.130529.108196424.mbj@tail-f.com> References: <20060209.130529.108196424.mbj@tail-f.com> Message-ID: <43EB3A5A.7020609@diit.unict.it> But the "." dir is still in the path, and your current dir is "/home/mbj/src". So, what's the problem here? --Corrado Martin Bjorklund wrote: > Hi, > > code:del_path() doesn't behave as expected: > > nassa src> ls /home/mbj/src/a.beam > /home/mbj/src/a.beam > > nassa src> erl -pa /home/mbj/src > Erlang (BEAM) emulator version 5.4.10 [source] [hipe] > > Eshell V5.4.10 (abort with ^G) > 1> code:get_path(). > ["/home/mbj/src", > ".", > "/home/mbj/src/otp_src_R10B-8/installed/lib/erlang/lib/kernel-2.10.11/ebin", > > > 2> code:del_path("/home/mbj/src"). > true > 3> code:which(a). > non_existing > 4> code:load_file(a). > {module,a} > 5> code:which(a). > "/home/mbj/src/a.beam" > > 6> code:get_path(). > [".", > "/home/mbj/src/otp_src_R10B-8/installed/lib/erlang/lib/kernel-2.10.11/ebin", > > > > > In 1. we see that /home/mbj/src is in the path > In 2. /home/mbj/src is deleted > In 3. we can see that a.beam is not found in the path > In 4. we can still load a.beam, from /home/mbj/src, although > /home/mbj/src is not in the path. > > > [browsing code_server.erl...] > > The problem is in code_server:mod_to_bin's last clause: > > mod_to_bin([], Mod) -> > %% At last, try also erl_prim_loader's own method > File = code_aux:to_path(Mod) ++ code_aux:objfile_extension(), > case erl_prim_loader:get_file(File) of > > And it turns out that /home/mbj/src is in erl_prim_loader's path, > since it was added with -pa. > > But why is this clause here? code_server grabs the path from > erl_prim_loader at startup, and after that code should be loaded > according to the path in code_server. > > The workaround for me is to clear erl_prim_loader's path. > > > > /martin > -- ====================================================== Eng. Corrado Santoro, Ph.D. University of Catania - Engineering Faculty Department of Computer Science and Telecommunications Engineering Viale A. Doria, 6 - 95125 CATANIA (ITALY) Tel: +39 095 7382380 +39 095 7387035 +39 095 7382365 +39 095 7382364 VoIP: sip:7035@REDACTED Fax: +39 095 7382397 EMail: csanto@REDACTED Personal Home Page: http://www.diit.unict.it/users/csanto NUXI Home Page: http://nuxi.diit.unict.it ====================================================== From mbj@REDACTED Thu Feb 9 14:12:47 2006 From: mbj@REDACTED (Martin Bjorklund) Date: Thu, 09 Feb 2006 14:12:47 +0100 (CET) Subject: bug/feature in code_server.erl In-Reply-To: <43EB3A5A.7020609@diit.unict.it> References: <20060209.130529.108196424.mbj@tail-f.com> <43EB3A5A.7020609@diit.unict.it> Message-ID: <20060209.141247.62916739.mbj@tail-f.com> Corrado Santoro wrote: > But the "." dir is still in the path, and your current dir is > "/home/mbj/src". So, what's the problem here? nope, cur dir, as it happens, is nassa src> pwd /home/mbj/src/tailf-src/trunk/otp/lib/mnesia/src if it had been /home/mbj/src, then I woudn't have got: > > 3> code:which(a). > > non_existing but "./a.beam" /martin From vlad.xx.dumitrescu@REDACTED Thu Feb 9 14:18:14 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Thu, 9 Feb 2006 14:18:14 +0100 Subject: case sensitivity for file api Message-ID: <11498CB7D3FCB54897058DE63BE3897C013754EA@esealmw105.eemea.ericsson.se> hi! I stumbled upon this problem, as I usually work on Windows and the files are in a ClearCase view on Unix: (test@REDACTED)20> io:format("~s~n", [os:cmd("dir s*tcap*.erl")]). 2006-01-30 13:23 29?899 sS7_Tcap.erl 2006-01-30 13:23 31?722 ss7_tcap.erl 2006-01-30 13:23 33?767 ss7_tcap_subsystem.erl ok (test@REDACTED)21> f(L),L=filelib:wildcard("s*tcap*.erl"). ["ss7_tcap.erl","ss7_tcap_subsystem.erl"] I guess that filelib and file use the local file driver, which for Windows is case insensitive. But since the network drive's filesystem isn't, there is a problem... Is there anything to do about it, except running the node on Unix? regards, Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: From raimo@REDACTED Thu Feb 9 14:20:40 2006 From: raimo@REDACTED (Raimo Niskanen) Date: 09 Feb 2006 14:20:40 +0100 Subject: Mirrors References: , <200602091248.46093.ft@it.su.se> Message-ID: ft@REDACTED (Fredrik Thulin) writes: > On Thursday 09 February 2006 12:23, Raimo Niskanen wrote: > > Do you know where there are reliable mirrors of > > http://www.erlang.org? > > > > I have written a little mini-HOWTO on how to mirror the > > contents including the mailing list archives to be found > > on http://www.erlang.org/mirrors.html. > > > > We need to update the list of known reliable mirrors. > > It is unnecessary hard to find the URLs of the mirrors in case the > primary server is down. Might I suggest erlang.org doing something > similar to lots of other sites, with www2.erlang.org, or > www.se.erlang.org and www.other-tld.erlang.org etc? > That is an excelent idea. I think I will vote for www=www1, www2, ... > I can set up a mirror at Stockholm university, but I either have to > invent a name for the mirror site under su.se, or have one provided by > you (a CNAME to one of our web servers). > I can configure a CNAME for you, and for other mirrors. > Also, DNS for erlang.org has been a bit flakey for me at times, with > only two servers listed in .org. I could set up secondary DNS service > (even with IPv6 if you want) for erlang.org too if you wish. > That would be very handy. Our current secondary name server strul.stupi.se has not been alive as far back as I remember. > /Fredrik -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From matthias@REDACTED Thu Feb 9 14:48:19 2006 From: matthias@REDACTED (Matthias Lang) Date: Thu, 9 Feb 2006 14:48:19 +0100 Subject: case sensitivity for file api In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C013754EA@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C013754EA@esealmw105.eemea.ericsson.se> Message-ID: <17387.18467.178886.184893@antilipe.corelatus.se> Vlad Dumitrescu XX (LN/EAB) writes: > (test@REDACTED)20> io:format("~s~n", [os:cmd("dir s*tcap*.erl")]). > 2006-01-30 13:23 29?899 sS7_Tcap.erl > 2006-01-30 13:23 31?722 ss7_tcap.erl > 2006-01-30 13:23 33?767 ss7_tcap_subsystem.erl > ok > (test@REDACTED)21> f(L),L=filelib:wildcard("s*tcap*.erl"). > ["ss7_tcap.erl","ss7_tcap_subsystem.erl"] > I guess that filelib and file use the local file driver, which for > Windows is case insensitive. I would draw the exact opposite conclusion from the information you've given, i.e. that whatever mechanism filelib uses, it must be case _sensitive_. Which is exactly as per the filelib manpage. Out of curiosity, how did you pick the hostname "EGILA003CTD0VFE"? Matthias From vlad.xx.dumitrescu@REDACTED Thu Feb 9 15:00:08 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Thu, 9 Feb 2006 15:00:08 +0100 Subject: case sensitivity for file api Message-ID: <11498CB7D3FCB54897058DE63BE3897C0137551D@esealmw105.eemea.ericsson.se> Hi > f(L),L=filelib:wildcard("s*tcap*.erl"). > > ["ss7_tcap.erl","ss7_tcap_subsystem.erl"] > > I would draw the exact opposite conclusion from the > information you've given, i.e. that whatever mechanism > filelib uses, it must be case _sensitive_. Which is exactly > as per the filelib manpage. Ouch, I should have tested with L=filelib:wildcard("s*cap*.erl"). Which gives the proper result... Sorry for the confusion. My problem is that I can open a file from a network drive and read from it. When saving it, however, the other files which only differ in capitalization are being overwritten... I've checked not and it's the same when using Emcas, so it's not an Erlang issue. > Out of curiosity, how did you pick the hostname "EGILA003CTD0VFE"? That was my nickname when I was a little boy :-) No, the name is automatically assigned and I don't really want to be associated with it ;-) Regards, Vlad From vlad.xx.dumitrescu@REDACTED Thu Feb 9 15:33:55 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Thu, 9 Feb 2006 15:33:55 +0100 Subject: case sensitivity for file api Message-ID: <11498CB7D3FCB54897058DE63BE3897C0137554C@esealmw105.eemea.ericsson.se> Hmmm, something is weird after all :-) Running ls() gives ... ss7_sys.erl ss7_tcap.erl ss7_tcap_subsystem.erl tcap.erl ... So sS7_Tcap.erl isn't visible there. Maybe it's file:list_dir() that uses the local file driver after all? Regards, Vlad From sam@REDACTED Thu Feb 9 15:40:26 2006 From: sam@REDACTED (Samuel Montgomery-Blinn) Date: Thu, 09 Feb 2006 09:40:26 -0500 Subject: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> References: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> Message-ID: <43EB545A.9060807@caveman.org> Jeff Crane wrote: >It took me a month to save enough to drop 94$ on a >retail book on erlang, now all the english copies are >gone and some squatter is selling the last copy on >Amazon used for 165$!!! Is anyone abroad able to >locate and sell me an english copy of this book or >know where I can order one? > >__________________________________________________ >Do You Yahoo!? >Tired of spam? Yahoo! Mail has the best spam protection around >http://mail.yahoo.com > > > http://froogle.google.com/froogle?q=concurrent+programming+in+erlang&btnG=Search+Froogle&lmode=unknown lists: *RSeTerminal Online Bookstore * http://216.177.128.70/cgi-bin/bookstore/1732245.html $47.95 and advertises "in stock" / /-Sam From rich.neswold@REDACTED Thu Feb 9 16:05:05 2006 From: rich.neswold@REDACTED (Rich Neswold) Date: Thu, 9 Feb 2006 09:05:05 -0600 Subject: Questions about Erlang port drivers In-Reply-To: <43EB1A24.4060406@erix.ericsson.se> References: <14cf844b0601310806s71b363br58dc5fef4bbbfd83@mail.gmail.com> <43DFCD40.8040809@hyber.org> <14cf844b0601311325r2caee820o73b97a8ff823dbf8@mail.gmail.com> <43EB1A24.4060406@erix.ericsson.se> Message-ID: <14cf844b0602090705w59dae8b4maaf70d4986bd6823@mail.gmail.com> On 2/9/06, Jakob Cederlund wrote: > The current behaviour of driver_set_timer() is indeed a bug, and will be > corrected, hopefully in the next release of R10. It will be fixed to > work as described in the documentation. Thank you! -- Rich AIM : rnezzy ICQ : 174908475 From ulf.wiger@REDACTED Thu Feb 9 16:14:40 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 9 Feb 2006 16:14:40 +0100 Subject: early warning - new rdbms Message-ID: Ok, but I've been sidetracked for a few days. I'm still doing some cleanups. I will let you all know as soon as I have something. (Again, I was unprepared for so many takers. I had expected to have to announce it a few times before anyone took the bait. ;) Regards, Ulf W > -----Original Message----- > From: Chaitanya Chalasani [mailto:chaitanya.chalasani@REDACTED] > Sent: den 9 februari 2006 13:44 > To: Ulf Wiger (AL/EAB) > Cc: erlang-questions@REDACTED > Subject: Re: early warning - new rdbms > > I would like to beta-test as well. > > On Wednesday 25 January 2006 14:16, Ulf Wiger (AL/EAB) wrote: > > I thought I'd let the cat out of the bag a little... > > > > If anyone wants to beta-test or help out with some of the more > > advanced problems, let me know. > > > > > > I've come pretty far along with a new version of rdbms. It > has several > > nice features, and I think it's about to make the transition from > > 'somewhat interesting' to 'actually useful': > > > > - JIT compilation of verification code. The overhead > > for type and bounds checking is now only a few (~5) > > microseconds per write operation. > > - The parameterized indexes that I hacked into mnesia > > before are now part of rdbms. This include ordered > > indexes and fragmented indexes (i.e. hashed on > > index value - so they should scale well.) > > - Rdbms will handle fragmented tables transparently > > (And actually handles plain tables with less overhead > > than mnesia_frag does.) The overhead for using the > > rdbms access module (compared to no access module) > > on a plain transaction is in the order of 20 > > microseconds on my 1 GHz SunBLADE. > > - Rdbms hooks into the transaction handling in such a > > way that it can automatically rebuild the verification > > code as soon as a schema transaction commits. > > - A readable file format for schema definitions, trying > > to establish a structured way to create large mnesia > > databases. I've also added a 'group' concept to be > > able to group tables into corresponding subsystems, > > since I thought this might be helpful in large > > systems. > > > > > > I'm planning to release rdbms with OTP R11, since it requires some > > changes to mnesia that (hopefully) will make it into R11. R11 is > > planned for May. > > > > Some of the (fairly minor) changes to mnesia so far: > > > > - The access module can hook into the transaction > > flow by providing callbacks for begin_activity() > > and end_activity(). Rdbms uses this for proper > > handling of abort and commit triggers as well as > > loop detection in referential integrity checks. > > It also allows rdbms to detect schema changes. > > - An 'on-load' hook allows rdbms to build indexes > > the first time a table is loaded. > > - A low-level access API for foreign tables. My > > first foreign table attempt was a 'disk_log'. > > It makes it possible to properly log events > > inside a transaction context. You also get > > replicated logs almost for free, as well as > > (if you want to) fragmented logs. (: > > My next attempt at a foreign table is a read- > > only file system (doesn't have to be read-only, > > but I thought I'd start with that.) Thus > > the experiments with converting regexps to > > the select pattern syntax. > > > > One interesting experiment might be to define an ISAM table > type for > > really large ordered sets on disk. Combining it with rdbms, you can > > type- specify the data types and then convert to whatever format is > > expected by the ISAM files. > > > > Some questions to those who might be interested: > > > > - I'd like to break compatibility with the old > > rdbms in some respects. Is this a problem for > > anyone? (speak now or forever hold your peace) > > - Do you have any suggestions or feature requests? > > - Do you want to help out? > > > > Regards, > > Uffe > > -- > Chaitanya Chalasani > From event@REDACTED Wed Feb 8 13:59:35 2006 From: event@REDACTED (event@REDACTED) Date: Wed, 8 Feb 2006 13:59:35 +0100 Subject: CFP: Rationality and Knowledge Workshop Message-ID: <20060208125935.GG4010@pluton.loria.fr> CALL FOR PAPERS Workshop Rationality and Knowledge August 7-11, 2006 www.cs.gc.cuny.edu/~sartemov/rkw Workshop organized as part of European Summer School on Logic, Language and Information ESSLLI 2006 http://esslli2006.lcc.uma.es/ July 31 - August 11, 2006 in Malaga, Spain ------------------------------------------------------------------------ Workshop Organizers: Sergei Artemov and Rohit Parikh ------------------------------------------------------------------------ Workshop Purpose: The workshop on rationality and knowledge intends to bring together young researchers from a wide variety of fields - including Artificial Intelligence, Cryptography, Distributed Computing, Economics and Game Theory, Linguistics, Logic, Philosophy, and Psychology, in order to further our understanding of interdisciplinary issues involving reasoning about rationality and knowledge. ------------------------------------------------------------------------ Workshop Topics: Topics of interest include, but are not limited to * semantic models for knowledge, for belief, and for uncertainty * epistemic logic * logics of knowledge and action * formal analysis of games * belief revision * logics of proofs and justification * the role of knowledge in general information flow * voting and social choice * social software * fair division. ------------------------------------------------------------------------ Submission details: Authors are invited to submit an extended abstract describing original work. Submissions should not exceed 8 pages. The following formats are accepted: PDF, PS, ASCII text. Please send your submission electronically by RKworkshop@REDACTED by the deadline listed below. The submissions will be reviewed by the workshop's programme committee and additional reviewers. The accepted papers will appear in the workshop proceedings published by ESSLLI. The format for the final versions will be available on the workshop website. A selection of papers will be published in a special issue of a leading Journal in this area. ------------------------------------------------------------------------ Workshop format: The workshop is part of ESSLLI and is open to all ESSLLI participants. It will consist of five 90-minute sessions held over five consecutive days in the second week of ESSLLI. There will be 2 or 3 slots for paper presentation and discussion per session. On the first day the workshop organizers will give an introduction to the topic. ------------------------------------------------------------------------ Important Dates: * Submissions: March 8, 2006 * Notification: April 21, 2006 * Preliminary programme: April 24, 2006 * ESSLLI early registration: May 1, 2006 * Final papers for proceedings: May 17, 2006 * Final programme: June 21, 2006 * Workshop dates: August 7-11, 2006 ------------------------------------------------------------------------ Invited Speakers: Johan van Benthem (Amsterdam/Stanford) Remzi Sanver (Istanbul Bilgi University) ------------------------------------------------------------------------ Workshop Programme Committee: * Sergei Artemov (New York) * Alexandru Baltag (Oxford) * Steven Brams (New York) * Adam Brandenburger (New York) * Melvin Fitting (New York) * Valentin Goranko (Johannesburg) * Joseph Halpern (Ithaca) * Vincent Hendricks (Roskilde) * Barteld Kooi (Groningen) * David Makinson (London) * Yoram Moses (Haifa) * Larry Moss (Indiana) * Elena Nogina (New York) * Rohit Parikh (New York) * Krister Segerberg (Uppsala) * Rineke Vergbugge (Groningen) * Renata Wasserman (Sao Paulo) * Tatiana Yavorskaya (Moscow) ------------------------------------------------------------------------ Local Arrangements: All workshop participants including the presenters will be required to register for ESSLLI. The registration fee for authors presenting a paper will correspond to the early student/workshop speaker registration fee. Moreover, a number of additional fee waiver grants will be made available by the OC on a competitive basis and workshop participants are eligible to apply for those. There will be no reimbursement for travel costs and accommodation. Workshop speakers who have difficulty in finding funding should contact the local organizing committee to ask for the possibilities for a grant. ------------------------------------------------------------------------ Further Information: About the workshop: www.cs.gc.cuny.edu/~sartemov/rkw About ESSLLI: http://esslli2006.lcc.uma.es/ ------------------------------------------------------------------------ This e-mail was delivered to you by event@REDACTED, what is a moderated list ran by Computational Intelligence Group of Clausthal University of Technology, Germany. All event announcements sent through this list are also listed in our conference planner at http://cig.in.tu-clausthal.de/index.php?id=planner. In the case of any requests, questions, or comments, do not hesitate and contact event-owner@REDACTED ASAP. ****************************************************** * CIG does not take any responsibility for validity * * of content of messages sent through this list. * ****************************************************** Computational Intelligence Group Department of Computer Science Clausthal University of Technology Germany http://cig.in.tu-clausthal.de/ From raimo@REDACTED Thu Feb 9 17:49:52 2006 From: raimo@REDACTED (Raimo Niskanen) Date: 09 Feb 2006 17:49:52 +0100 Subject: case sensitivity for file api References: <11498CB7D3FCB54897058DE63BE3897C0137551D@esealmw105.eemea.ericsson.se> Message-ID: I guess you already know this, but there should be a setting in the ClearCase administration tool on Windows that selects if names should be case sensitive or not. (Jumping in the middle of something I did not read from the start) vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX LN/EAB) writes: > Hi > > > f(L),L=filelib:wildcard("s*tcap*.erl"). > > > ["ss7_tcap.erl","ss7_tcap_subsystem.erl"] > > > > I would draw the exact opposite conclusion from the > > information you've given, i.e. that whatever mechanism > > filelib uses, it must be case _sensitive_. Which is exactly > > as per the filelib manpage. > > Ouch, I should have tested with > L=filelib:wildcard("s*cap*.erl"). > Which gives the proper result... Sorry for the confusion. > > My problem is that I can open a file from a network drive and read from > it. When saving it, however, the other files which only differ in > capitalization are being overwritten... I've checked not and it's the > same when using Emcas, so it's not an Erlang issue. > > > Out of curiosity, how did you pick the hostname "EGILA003CTD0VFE"? > > That was my nickname when I was a little boy :-) > No, the name is automatically assigned and I don't really want to be > associated with it ;-) > Just like often the case is regarding nicknames on grown up boys :-) > Regards, > Vlad -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From vlad_dumitrescu@REDACTED Thu Feb 9 19:46:13 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Thu, 9 Feb 2006 19:46:13 +0100 Subject: case sensitivity for file api References: <11498CB7D3FCB54897058DE63BE3897C0137551D@esealmw105.eemea.ericsson.se> Message-ID: From: "Raimo Niskanen" > I guess you already know this, but there should be a > setting in the ClearCase administration tool on Windows that > selects if names should be case sensitive or not. > (Jumping in the middle of something I did not read from the start) Yes, but the issue is that there are files whose names only differ by case. They are all needed. The problem is that when compiling from Windows I only get one beam file. regards, Vlad From erlang@REDACTED Thu Feb 9 19:58:13 2006 From: erlang@REDACTED (Michael McDaniel) Date: Thu, 9 Feb 2006 10:58:13 -0800 Subject: ODBC questions In-Reply-To: <20060205153912.GA17372@memphis.process-one.net> References: <20060205153912.GA17372@memphis.process-one.net> Message-ID: <20060209185812.GJ23283@delora.autosys.us> On Sun, Feb 05, 2006 at 04:39:12PM +0100, Mickael Remond wrote: > Hello, > > I have recently been working a lot with ODBC and Erlang. One problem / > question remains: Is there any mechanism to detect when the connection > to the database is lost ? The purpose is to be able to try restarting > the connection. > I looked at the ODBC code, but did not find any relevant parts. > For now, the behaviour seems to be the following: When querying a > database who went offline, I get an error as the query response. The > text of the error explains that the database is not more reachable but > the ODBC process is still there. > > I suspect that such reconnection mechanism should be handled by the ODBC > driver. I have been doing my tests with MySQL. > > Does someone here have experienced the same reconnection problem with > ODBC ? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I (perhaps naively) do the following in a (reliable) production system: readUpdateQuarry(Ref, CacheCallid, NewCallid) -> Z = "insert into quarry select " etc. etc. proprietary stuff case odbc:sql_query(Ref, Z) of {updated, Return} -> {updated, Return} ; {_, Error} -> expmaster:log_error(?MODULE, ?LINE, 'odbc:sql_query', Error) , {error, Error} end . where Ref is an ODBC connection. Everything works fast enough for this system for the calling function to disconnect/reconnect if there is a problem. Other insert/query functions I have will create a new connection and destroy the connection for each call. This is fast enough in my production environment also. I originally had designed to have a process that marshalled ODBC connections for the workers. That proved to be more hassle than it was worth since the above simpler system works plenty fast enough. ~Michael > > -- > Micka?l R?mond > http://www.process-one.net/ -- Michael McDaniel Portland, Oregon, USA http://autosys.us +1 503 283 5284 From fritchie@REDACTED Thu Feb 9 21:10:14 2006 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Thu, 09 Feb 2006 14:10:14 -0600 Subject: Hakan Mattson's mnesia_internals_slides.pdf? In-Reply-To: Message of "Thu, 09 Feb 2006 10:52:32 +0100." Message-ID: <200602092010.k19KAEvA013394@snookles.snookles.com> >>>>> "hm" == Hakan Mattsson writes: hm> My (somewhat out-dated) home page was probably lost in the recent hm> web-server crash. Now it is on-line again: I knew I was up too late -- I misspelled your surname, sorry! When I saw Sanjay's message that it was at the www.erlang.org URL after all, I began to doubt my sanity. Thanks for retrieving it. -Scott From thomasl_erlang@REDACTED Thu Feb 9 21:32:45 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Thu, 9 Feb 2006 12:32:45 -0800 (PST) Subject: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> Message-ID: <20060209203245.8633.qmail@web34406.mail.mud.yahoo.com> --- Jeff Crane wrote: > It took me a month to save enough to drop 94$ on a > retail book on erlang, now all the english copies > are > gone and some squatter is selling the last copy on > Amazon used for 165$!!! Is anyone abroad able to > locate and sell me an english copy of this book or > know where I can order one? Note that the first half of this book is available online. The second half basically contains a number of examples, though I'd say they are getting a bit long in the tooth by now (written before OTP was introduced, I believe). http://www.erlang.org/download/erlang-book-part1.pdf Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From thomasl_erlang@REDACTED Thu Feb 9 21:40:54 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Thu, 9 Feb 2006 12:40:54 -0800 (PST) Subject: Erlang Books...WAS Re: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: <43EB2908.105@Fitzsimons.org> Message-ID: <20060209204054.11777.qmail@web34406.mail.mud.yahoo.com> --- Bruce Fitzsimons wrote: > Hey I know this is a broken record, but are any new > Erlang books getting > off the ground? > > It grieves me to think that project>* can get a book > out, but Erlang can't. Erlang needs it so much more, > hell, it probably > needs multiple books (Basics, OTP, Optimisation, > Patterns, etc). > > I came across Joe's outline the other day, at > http://www.geocities.com/erlang_journal/book1.html - > very nice, but it > seems to have stalled some time ago. The online docs > are v.nice (nice > job on R10) but speaking from experience I know that > I needed the book > sometimes. > > I know we're all busy people doing real work, but > this is becoming a > serious barrier to inducting new Erlang people. Is > anyone progressing > anything? If one speaks french, there is a more modern book available, by our Mr. Remond. However, that said, I fully agree -- there is plenty of material which is not covered in the first book. The original book itself could be updated to cover the many important language features that have appeared since the book was published, such as funs, records, bit syntax, and so on. Furthermore, a book that teaches OTP might be nice, as would be one that shows people how to write good code; and to top it off, perhaps a slim volume on getting along with mnesia? Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From simonpeterchappell@REDACTED Thu Feb 9 22:17:27 2006 From: simonpeterchappell@REDACTED (Simon Chappell) Date: Thu, 9 Feb 2006 15:17:27 -0600 Subject: Erlang Books...WAS Re: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: <20060209204054.11777.qmail@web34406.mail.mud.yahoo.com> References: <43EB2908.105@Fitzsimons.org> <20060209204054.11777.qmail@web34406.mail.mud.yahoo.com> Message-ID: <8ed733900602091317xf17c319i885812ef9c1b6278@mail.gmail.com> Does anyone have any news on when/if an English translation of that book will be forthcoming? On 2/9/06, Thomas Lindgren wrote: > > > --- Bruce Fitzsimons wrote: > > > Hey I know this is a broken record, but are any new > > Erlang books getting > > off the ground? > > > > It grieves me to think that > project>* can get a book > > out, but Erlang can't. Erlang needs it so much more, > > hell, it probably > > needs multiple books (Basics, OTP, Optimisation, > > Patterns, etc). > > > > I came across Joe's outline the other day, at > > http://www.geocities.com/erlang_journal/book1.html - > > very nice, but it > > seems to have stalled some time ago. The online docs > > are v.nice (nice > > job on R10) but speaking from experience I know that > > I needed the book > > sometimes. > > > > I know we're all busy people doing real work, but > > this is becoming a > > serious barrier to inducting new Erlang people. Is > > anyone progressing > > anything? > > If one speaks french, there is a more modern book > available, by our Mr. Remond. > > However, that said, I fully agree -- there is plenty > of material which is not covered in the first book. > The original book itself could be updated to cover the > many important language features that have appeared > since the book was published, such as funs, records, > bit syntax, and so on. Furthermore, a book that > teaches OTP might be nice, as would be one that shows > people how to write good code; and to top it off, > perhaps a slim volume on getting along with mnesia? > > Best, > Thomas > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > -- www.simonpeter.org uab.blogspot.com From ryanobjc@REDACTED Fri Feb 10 01:55:36 2006 From: ryanobjc@REDACTED (Ryan Rawson) Date: Thu, 9 Feb 2006 16:55:36 -0800 Subject: Erlang Books...WAS Re: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: <43EB2908.105@Fitzsimons.org> References: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> <006b01c62d65$c5bca820$0702a8c0@PORTHOS> <43EB2908.105@Fitzsimons.org> Message-ID: <78568af10602091655h2c2a49b6yef25819d1ef93a43@mail.gmail.com> I'm sure O'Reilly would be more than willing to publish some books if content were furnished. Although I don't exactly work for them, if they are willing as you noted to publish "random pet OSS project" books, then why not erlang? -ryan On 2/9/06, Bruce Fitzsimons wrote: > Hey I know this is a broken record, but are any new Erlang books getting > off the ground? > > It grieves me to think that * can get a book > out, but Erlang can't. Erlang needs it so much more, hell, it probably > needs multiple books (Basics, OTP, Optimisation, Patterns, etc). > > I came across Joe's outline the other day, at > http://www.geocities.com/erlang_journal/book1.html - very nice, but it > seems to have stalled some time ago. The online docs are v.nice (nice > job on R10) but speaking from experience I know that I needed the book > sometimes. > > I know we're all busy people doing real work, but this is becoming a > serious barrier to inducting new Erlang people. Is anyone progressing > anything? > > Cheers, > Bruce > > * Lucene, , Joomla, etc etc > From her@REDACTED Fri Feb 10 07:00:17 2006 From: her@REDACTED (Helmut Enck-Radana) Date: Fri, 10 Feb 2006 07:00:17 +0100 Subject: Erlang Books...WAS Re: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: <78568af10602091655h2c2a49b6yef25819d1ef93a43@mail.gmail.co m> References: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> <006b01c62d65$c5bca820$0702a8c0@PORTHOS> <43EB2908.105@Fitzsimons.org> <78568af10602091655h2c2a49b6yef25819d1ef93a43@mail.gmail.com> Message-ID: <6.2.3.4.0.20060210065443.03456228@paradigma-software.de> At 01:55 2006-02-10, Ryan Rawson wrote: >I'm sure O'Reilly would be more than willing to publish some books >if content were furnished. Although I don't exactly work for them, >if they are willing as you noted to publish "random pet OSS project" >books, then why not erlang? Some years ago they weren't: At 11:19 2001-10-18, Joe Armstrong wrote: >At the last erlang conferense the idea of a new erlang book was discussed. > >I mailed O'reilly they wern't interested - not a big enough market. > >To jump start this I propose a wiki book - It's started at > >http://www.bluetail.com/wiki/showPage?node=ErlangOnLineBook > >There is a chapter plan at > >http://www.geocities.com/erlang_journal/book1.html > >Please hold detailed discussions on the wiki -- Helmut From cyberdanx@REDACTED Fri Feb 10 14:53:33 2006 From: cyberdanx@REDACTED (Chris Campbell) Date: Fri, 10 Feb 2006 13:53:33 +0000 Subject: Erlang Books...WAS Re: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: <6.2.3.4.0.20060210065443.03456228@paradigma-software.de> References: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> <006b01c62d65$c5bca820$0702a8c0@PORTHOS> <43EB2908.105@Fitzsimons.org> <78568af10602091655h2c2a49b6yef25819d1ef93a43@mail.gmail.com> <6.2.3.4.0.20060210065443.03456228@paradigma-software.de> Message-ID: On 10/02/06, Helmut Enck-Radana wrote: > At 01:55 2006-02-10, Ryan Rawson wrote: > >I'm sure O'Reilly would be more than willing to publish some books > >if content were furnished. Although I don't exactly work for them, > >if they are willing as you noted to publish "random pet OSS project" > >books, then why not erlang? > > Some years ago they weren't: I'm sure if you put AJAX or Web 2.0 in the title they'd go for it ;) Seriously, I could use a good book on the Erlang and the OTP. From rasmussen.bryan@REDACTED Fri Feb 10 15:15:50 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Fri, 10 Feb 2006 15:15:50 +0100 Subject: whatever happened to... Message-ID: <3bb44c6e0602100615w6ab5d6caod298c42b79ecca8f@mail.gmail.com> Eresye? "ERESYE is an Erlang library designed to allow the creation, management and execution of rule-processing engines, and is thus suited for the realization of expert systems" where does one get it? are there any other programs, projects, libraries out there that seem to have fallen through the cracks that might be nice to have around? Will it even run on newest OTP? Cheers, Bryan Rasmussen From rasmussen.bryan@REDACTED Fri Feb 10 15:30:18 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Fri, 10 Feb 2006 15:30:18 +0100 Subject: whatever happened to... In-Reply-To: <482776e5d3bfb353534965a24ae6b784@elisa.ee> References: <3bb44c6e0602100615w6ab5d6caod298c42b79ecca8f@mail.gmail.com> <482776e5d3bfb353534965a24ae6b784@elisa.ee> Message-ID: <3bb44c6e0602100630q21d45c10wcbe0314c8f9fa355@mail.gmail.com> Hi, Looks like eXAT uses Eresye, renamed Eres. Thanks. Cheers, Bryan Rasmussen On 2/10/06, Taavi Talvik wrote: > Is eXAT ( http://www.diit.unict.it/users/csanto/exat/whats.html) > something > similiar? > > best regards, > taavi > > > Eresye? > > > > "ERESYE is an Erlang library designed to allow the creation, management > > and execution of rule-processing engines, and is thus > > suited for the realization of expert systems" > > > > where does one get it? are there any other programs, projects, > > libraries out there that seem to have fallen through the cracks that > > might be nice to have around? Will it even run on newest OTP? > > > > Cheers, > > Bryan Rasmussen > > > > From taavi.talvik@REDACTED Fri Feb 10 15:28:26 2006 From: taavi.talvik@REDACTED (Taavi Talvik) Date: Fri, 10 Feb 2006 16:28:26 +0200 Subject: whatever happened to... In-Reply-To: <3bb44c6e0602100615w6ab5d6caod298c42b79ecca8f@mail.gmail.com> References: <3bb44c6e0602100615w6ab5d6caod298c42b79ecca8f@mail.gmail.com> Message-ID: <482776e5d3bfb353534965a24ae6b784@elisa.ee> Is eXAT ( http://www.diit.unict.it/users/csanto/exat/whats.html) something similiar? best regards, taavi > Eresye? > > "ERESYE is an Erlang library designed to allow the creation, management > and execution of rule-processing engines, and is thus > suited for the realization of expert systems" > > where does one get it? are there any other programs, projects, > libraries out there that seem to have fallen through the cracks that > might be nice to have around? Will it even run on newest OTP? > > Cheers, > Bryan Rasmussen > From fernando@REDACTED Fri Feb 10 16:13:38 2006 From: fernando@REDACTED (Fernando Rodriguez) Date: Fri, 10 Feb 2006 16:13:38 +0100 Subject: Erlang Books...WAS Re: Where to get Concurrent Programming in Erlang (2nd Edition) Message-ID: <6.2.3.4.0.20060210161128.03444ba8@paradigma-software.de> > At 01:55 2006-02-10, Ryan Rawson wrote: > >I'm sure O'Reilly would be more than willing to publish some > books if > >content were furnished. Although I don't exactly work for them, if > >they are willing as you noted to publish "random pet OSS project" > >books, then why not erlang? > > Some years ago they weren't: > > At 11:19 2001-10-18, Joe Armstrong wrote: > >At the last erlang conferense the idea of a new erlang book > was discussed. > > > >I mailed O'reilly they wern't interested - not a big enough market. Why not try A-Press? They've been publishing lisp books, sowhy not an Erlang on? From fernando@REDACTED Fri Feb 10 16:52:17 2006 From: fernando@REDACTED (Fernando Rodriguez) Date: Fri, 10 Feb 2006 16:52:17 +0100 Subject: Classical concurrent problems Message-ID: <002201c62e59$f9eb6b00$2101a8c0@fofao> Hi, Where can I find erlang solutions to classical concurrent problems such as the dinning philosophers? I tried googling but didn't find anything Thanks From alex.peake@REDACTED Fri Feb 10 17:32:54 2006 From: alex.peake@REDACTED (Alex Peake) Date: Fri, 10 Feb 2006 08:32:54 -0800 Subject: Erlang Books References: <6.2.3.4.0.20060210161128.03444ba8@paradigma-software.de> Message-ID: <001301c62e5f$ab12baa0$64020a0a@FEY> Quote from James Huddleston of APress (jhuddleston AT ...): "...I'm hoping to get the first book out by the end of 2006 and establish Apress as the premier publisher on F# and FP in 2007..." So if you give it an FP focus... Alex ----- Original Message ----- From: "Fernando Rodriguez (by way of Helmut Enck-Radana )" To: Sent: Friday, February 10, 2006 7:13 AM Subject: RE: Erlang Books...WAS Re: Where to get Concurrent Programming in Erlang (2nd Edition) > > At 01:55 2006-02-10, Ryan Rawson wrote: > > >I'm sure O'Reilly would be more than willing to publish some > > books if > > >content were furnished. Although I don't exactly work for them, if > > >they are willing as you noted to publish "random pet OSS project" > > >books, then why not erlang? > > > > Some years ago they weren't: > > > > At 11:19 2001-10-18, Joe Armstrong wrote: > > >At the last erlang conferense the idea of a new erlang book > > was discussed. > > > > > >I mailed O'reilly they wern't interested - not a big enough market. > > Why not try A-Press? They've been publishing lisp books, sowhy not an Erlang on? > From erlang@REDACTED Fri Feb 10 17:35:37 2006 From: erlang@REDACTED (Michael McDaniel) Date: Fri, 10 Feb 2006 08:35:37 -0800 Subject: Erlang compiler bug in R10 ? In-Reply-To: References: Message-ID: <20060210163536.GG1453@delora.autosys.us> works ok on my Ubuntu release 5.10 box (Debian) with R10B-9 $ pwd /home/mmcdanie/misc/src/erlang/ibrowse-1.0/src $ uname -r 2.6.12-9-386 $ erl -s init stop Erlang (BEAM) emulator version 5.4.12 [source] [hipe] Eshell V5.4.12 (abort with ^G) 1> $ make clean rm -f ../ebin/*.beam $ make erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse.erl erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_http_client.erl erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_app.erlerlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_sup.erlerlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_lib.erlerlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_test.erl On Wed, Feb 08, 2006 at 01:38:05PM +0100, Torbjorn Tornkvist wrote: > Hi, > > I'm trying to compile the ibrowse application in jungerl: > ---------------------------------------------------------------- > > make > erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ > -o ../ebin ibrowse.erl > erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ > -o ../ebin ibrowse_http_client.erl > Function chunk_request_body/3 refers to undefined label 410 > ./ibrowse_http_client.erl:none: internal error in beam_dead; > crash reason: {{case_clause,{'EXIT',{undefined_label,410}}}, > [{compile,'-select_passes/2-anonymous-2-',2}, > {compile,'-internal_comp/4-anonymous-1-',2}, > {compile,fold_comp,3}, > {compile,internal_comp,4}, > {compile,internal,3}]} > make: *** [../ebin/ibrowse_http_client.beam] Error 1 > ------------------------------------------------------------------ > > I get this result with R10B-4, R10B-8, R10B-9 > > But with R9C, ibrowse compiles just fine. > > Cheers, Tobbe > -- Michael McDaniel Portland, Oregon, USA http://autosys.us +1 503 283 5284 From erlang@REDACTED Fri Feb 10 17:39:23 2006 From: erlang@REDACTED (Michael McDaniel) Date: Fri, 10 Feb 2006 08:39:23 -0800 Subject: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> References: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> Message-ID: <20060210163921.GH1453@delora.autosys.us> http://www.powells.com had one recently ... Call the technical bookstore if you do not find title in their search engine. Number is listed in their pages or main bookstore can give you number. Also, for all of you coming to Portland in September I suggest you set aside some time and money to go to the Powell's bookstores - Main and Technical. You won't get out without buying *something* ! ~Michael (not affiliated w/Powells other than a 25 year customer) On Wed, Feb 08, 2006 at 09:32:51PM -0800, Jeff Crane wrote: > It took me a month to save enough to drop 94$ on a > retail book on erlang, now all the english copies are > gone and some squatter is selling the last copy on > Amazon used for 165$!!! Is anyone abroad able to > locate and sell me an english copy of this book or > know where I can order one? > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com -- Michael McDaniel Portland, Oregon, USA http://autosys.us +1 503 283 5284 From jerome@REDACTED Fri Feb 10 17:41:37 2006 From: jerome@REDACTED (=?iso-8859-1?b?Suly9G1l?= Desquilbet) Date: Fri, 10 Feb 2006 17:41:37 +0100 Subject: Classical concurrent problems In-Reply-To: <002201c62e59$f9eb6b00$2101a8c0@fofao> References: <002201c62e59$f9eb6b00$2101a8c0@fofao> Message-ID: <1139589697.43ecc2416adc4@ssl.ouvaton.coop> Selon Fernando Rodriguez : > Hi, > > Where can I find erlang solutions to classical concurrent problems > such as > the dinning philosophers? I tried googling but didn't find anything > > Thanks Here is a classical one, Primes by Sieve, that I more or less translated from Ada. It was my first Erlang program :-) One task by prime number. http://jerome.desquilbet.org/pages/271/ J?r?me. From mark@REDACTED Fri Feb 10 19:52:14 2006 From: mark@REDACTED (Mark Wutka) Date: Fri, 10 Feb 2006 13:52:14 -0500 Subject: Classical concurrent problems In-Reply-To: <002201c62e59$f9eb6b00$2101a8c0@fofao> References: <002201c62e59$f9eb6b00$2101a8c0@fofao> Message-ID: <20060210185214.GA3976@wutka.com> " Hi, " " Where can I find erlang solutions to classical concurrent problems such as " the dinning philosophers? I tried googling but didn't find anything " " Thanks " I did a version of it in Erlang, I just can't vouch for it being *good* Erlang. It isn't too long, so I think it's probably okay to just stick it in the message. The each chopstick and philosopher is a process. The philosophers strategy is just to pick up the left chopstick, then try the right. If it can't get the right, it drops the left, waits, and tries again. You can experiment with other strategies, of course. I put a wait_for function in chopstick to wait for a chopstick, but the current philosopher implementation doesn't use it. Mark --- chopstick.erl --- -module(chopstick). -export([start/0, pick_up/1, put_down/1, wait_for/1, is_available/1, chopstick/2]). start() -> spawn(chopstick, chopstick, [true, []]). chopstick(Available, WhoHas) -> receive %% Allow someone to pick up the chopstick if it is available {pick_up, Sender} when Available -> Sender ! picked_up, chopstick(false, Sender); %% If the chopstick is unavailable, don't allow it to be picked up {pick_up, Sender} when not Available -> Sender ! not_picked_up, chopstick(Available, WhoHas); %% Only allow the sender who holds the chopstick to release it {put_down, Sender} when Sender == WhoHas -> Sender ! put_down, chopstick(true, []); %% Consume any putdown messages for someone who isn't the sender {put_down, Sender} when Sender /= WhoHas -> chopstick(Available, WhoHas); %% Anyone can ask whether the stick is currently available {is_available, Sender} -> Sender ! {availability, Available}, chopstick(true, WhoHas); %% Anyone can wait for the stick to be released, if it is already %% available, just hand it over {wait_for, Sender} when Available -> Sender ! picked_up, chopstick(false, Sender); %% If someone wants to wait for the stick and it isn't available, %% wait for someone to put it down {wait_for, Sender} when not Available -> chopstick_wait(Sender, WhoHas) end. chopstick_wait(Waiter, WhoHas) -> receive %% When the stick is put down, let the waiting person have it {put_down, PutDownSender} when PutDownSender == WhoHas -> PutDownSender ! put_down, Waiter ! picked_up, chopstick(false, Waiter); %% Allow anyone to check on the stick status during a wait {is_available, AvailableSender} -> AvailableSender ! {availability, false}, chopstick_wait(Waiter, WhoHas); end. %% Define functions that interact with a chopstick process pick_up(Chopstick) -> Chopstick ! { pick_up, self() }, receive picked_up -> true; not_picked_up -> false end. put_down(Chopstick) -> Chopstick ! { put_down, self() }. is_available(Chopstick) -> Chopstick ! { is_available, self() }, receive {availability, Status} -> Status end. wait_for(Chopstick) -> Chopstick ! { wait_for, self() }, receive picked_up -> true end. --- philosopher.erl --- -module(philosopher). -export([start/3, think/3]). -define(MaxThink, 10000). -define(MaxEat, 10000). -define(MaxWait, 1000). start(Left, Right, Name) -> spawn(philosopher, think, [Left, Right, Name]). %% A philospher thinks for a while and then gets hungry think(Left, Right, Name) -> io:format("~s is thinking...~n", [Name]), timer:sleep(random:uniform(?MaxThink)), io:format("~s is hungry!~n", [Name]), pick_up_left(Left, Right, Name). %% To eat, the philosopher first tries to pick up the left chopstick pick_up_left(Left, Right, Name) -> GotLeft = chopstick:pick_up(Left), if GotLeft -> io:format("~s picked up left chopstick~n", [Name]), pick_up_right(Left, Right, Name); true -> %% If unable to get a chopstick, wait a little bit before trying timer:sleep(random:uniform(?MaxWait)), pick_up_left(Left, Right, Name) end. %% Once the philosopher has the left chopstick, he tries the right pick_up_right(Left, Right, Name) -> GotRight = chopstick:pick_up(Right), if GotRight -> io:format("~s picked up right chopstick~n", [Name]), eat(Left, Right, Name); true -> %% If the right is unavailable, put the left down and wait a bit chopstick:put_down(Left), io:format("~s put down left chopstick~n", [Name]), timer:sleep(random:uniform(?MaxWait)), pick_up_left(Left, Right, Name) end. %% Yum eat(Left, Right, Name) -> io:format("~s is eating~n", [Name]), timer:sleep(random:uniform(?MaxEat)), chopstick:put_down(Left), chopstick:put_down(Right), io:format("~s put down both chopsticks~n", [Name]), think(Left, Right, Name). --- dining.erl --- -module(dining). -export([start/0]). start() -> %% Create the chopsticks C1 = chopstick:start(), C2 = chopstick:start(), C3 = chopstick:start(), C4 = chopstick:start(), C5 = chopstick:start(), %% Start the philosophers each with a different pair of chopsticks philosopher:start(C1, C2, "Lao Tzu"), philosopher:start(C2, C3, "Plato"), philosopher:start(C3, C4, "Socrates"), philosopher:start(C4, C5, "Descartes"), philosopher:start(C5, C1, "Hume"). From rasmussen.bryan@REDACTED Fri Feb 10 21:53:26 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Fri, 10 Feb 2006 21:53:26 +0100 Subject: Erlang Books In-Reply-To: <001301c62e5f$ab12baa0$64020a0a@FEY> References: <6.2.3.4.0.20060210161128.03444ba8@paradigma-software.de> <001301c62e5f$ab12baa0$64020a0a@FEY> Message-ID: <3bb44c6e0602101253g1e1574dax1c2b6223e7d6df6e@mail.gmail.com> Okay if they're going to publish a book on F# they should definitely publish on Erlang, how many people have even heard of F#, that's a really far out idea.... that said I'd probably buy it. or trade in all my C# books for it. Cheers, Bryan Rasmussen On 2/10/06, Alex Peake wrote: > Quote from James Huddleston of APress (jhuddleston AT ...): > > "...I'm hoping to get the first book out by the end of 2006 and establish > Apress as the premier publisher on F# and FP in 2007..." > > So if you give it an FP focus... > > Alex > > > ----- Original Message ----- > From: "Fernando Rodriguez (by way of Helmut Enck-Radana > )" > To: > Sent: Friday, February 10, 2006 7:13 AM > Subject: RE: Erlang Books...WAS Re: Where to get Concurrent Programming in > Erlang (2nd Edition) > > > > > At 01:55 2006-02-10, Ryan Rawson wrote: > > > >I'm sure O'Reilly would be more than willing to publish some > > > books if > > > >content were furnished. Although I don't exactly work for them, if > > > >they are willing as you noted to publish "random pet OSS project" > > > >books, then why not erlang? > > > > > > Some years ago they weren't: > > > > > > At 11:19 2001-10-18, Joe Armstrong wrote: > > > >At the last erlang conferense the idea of a new erlang book > > > was discussed. > > > > > > > >I mailed O'reilly they wern't interested - not a big enough market. > > > > Why not try A-Press? They've been publishing lisp books, sowhy not an > Erlang on? > > > > From csanto@REDACTED Fri Feb 10 22:51:02 2006 From: csanto@REDACTED (Corrado Santoro) Date: Fri, 10 Feb 2006 22:51:02 +0100 Subject: whatever happened to... In-Reply-To: <3bb44c6e0602100630q21d45c10wcbe0314c8f9fa355@mail.gmail.com> References: <3bb44c6e0602100615w6ab5d6caod298c42b79ecca8f@mail.gmail.com> <482776e5d3bfb353534965a24ae6b784@elisa.ee> <3bb44c6e0602100630q21d45c10wcbe0314c8f9fa355@mail.gmail.com> Message-ID: <43ED0AC6.1000207@diit.unict.it> Hi all (and Bryan and Taavi), I'm one of the co-authors of ERESYE. It is part of eXAT but to obtain it you should contact me directly. I'll be glad to send you the code with the examples. Best regards, --Corrado bryan rasmussen wrote: > Hi, > Looks like eXAT uses Eresye, renamed Eres. Thanks. > > Cheers, > Bryan Rasmussen > > On 2/10/06, Taavi Talvik wrote: > >>Is eXAT ( http://www.diit.unict.it/users/csanto/exat/whats.html) >>something >>similiar? >> >>best regards, >>taavi >> >> >>>Eresye? >>> >>>"ERESYE is an Erlang library designed to allow the creation, management >>>and execution of rule-processing engines, and is thus >>>suited for the realization of expert systems" >>> >>>where does one get it? are there any other programs, projects, >>>libraries out there that seem to have fallen through the cracks that >>>might be nice to have around? Will it even run on newest OTP? >>> >>>Cheers, >>>Bryan Rasmussen >>> >> >> -- ====================================================== Eng. Corrado Santoro, Ph.D. University of Catania - Engineering Faculty Department of Computer Science and Telecommunications Engineering Viale A. Doria, 6 - 95125 CATANIA (ITALY) Tel: +39 095 7382380 +39 095 7387035 +39 095 7382365 +39 095 7382364 VoIP: sip:7035@REDACTED Fax: +39 095 7382397 EMail: csanto@REDACTED Personal Home Page: http://www.diit.unict.it/users/csanto NUXI Home Page: http://nuxi.diit.unict.it ====================================================== From alex.peake@REDACTED Fri Feb 10 23:14:07 2006 From: alex.peake@REDACTED (Alex Peake) Date: Fri, 10 Feb 2006 14:14:07 -0800 Subject: Erlang Books References: <6.2.3.4.0.20060210161128.03444ba8@paradigma-software.de> <001301c62e5f$ab12baa0$64020a0a@FEY> <3bb44c6e0602101253g1e1574dax1c2b6223e7d6df6e@mail.gmail.com> Message-ID: <000901c62e8f$5597ca90$64020a0a@FEY> F# is a very interesting language. It is really OCaml on .NET. Very powerful functional programming ideas with all the libraries of the .NET world.It is, in fact, where many of the new ideas in C# 2.0 came from (e.g. the Generics implementation) and C# 3.0 (e.g. type inference) are coming from. There is an implementation of their LINQ ideas too. ----- Original Message ----- From: "bryan rasmussen" To: "Alex Peake" Cc: ; "Fernando Rodriguez (by way of Helmut Enck-Radana )" Sent: Friday, February 10, 2006 12:53 PM Subject: Re: Erlang Books > Okay if they're going to publish a book on F# they should definitely > publish on Erlang, how many people have even heard of F#, that's a > really far out idea.... that said I'd probably buy it. or trade in all > my C# books for it. > > Cheers, > Bryan Rasmussen > > On 2/10/06, Alex Peake wrote: > > Quote from James Huddleston of APress (jhuddleston AT ...): > > > > "...I'm hoping to get the first book out by the end of 2006 and establish > > Apress as the premier publisher on F# and FP in 2007..." > > > > So if you give it an FP focus... > > > > Alex > > > > > > ----- Original Message ----- > > From: "Fernando Rodriguez (by way of Helmut Enck-Radana > > )" > > To: > > Sent: Friday, February 10, 2006 7:13 AM > > Subject: RE: Erlang Books...WAS Re: Where to get Concurrent Programming in > > Erlang (2nd Edition) > > > > > > > > At 01:55 2006-02-10, Ryan Rawson wrote: > > > > >I'm sure O'Reilly would be more than willing to publish some > > > > books if > > > > >content were furnished. Although I don't exactly work for them, if > > > > >they are willing as you noted to publish "random pet OSS project" > > > > >books, then why not erlang? > > > > > > > > Some years ago they weren't: > > > > > > > > At 11:19 2001-10-18, Joe Armstrong wrote: > > > > >At the last erlang conferense the idea of a new erlang book > > > > was discussed. > > > > > > > > > >I mailed O'reilly they wern't interested - not a big enough market. > > > > > > Why not try A-Press? They've been publishing lisp books, sowhy not an > > Erlang on? > > > > > > > > From rasmussen.bryan@REDACTED Fri Feb 10 23:20:21 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Fri, 10 Feb 2006 23:20:21 +0100 Subject: Erlang Books In-Reply-To: <000901c62e8f$5597ca90$64020a0a@FEY> References: <6.2.3.4.0.20060210161128.03444ba8@paradigma-software.de> <001301c62e5f$ab12baa0$64020a0a@FEY> <3bb44c6e0602101253g1e1574dax1c2b6223e7d6df6e@mail.gmail.com> <000901c62e8f$5597ca90$64020a0a@FEY> Message-ID: <3bb44c6e0602101420mdbd40a7o5254de1c6bedb7a@mail.gmail.com> I'm sure it is, I said I'd probably buy it, nonetheless who the hell has heard of it. It's a Microsoft Research project! There's gonna be a book? Then an erlang book should be a shoe in. Cheers, Bryan Rasmussen On 2/10/06, Alex Peake wrote: > F# is a very interesting language. It is really OCaml on .NET. Very powerful > functional programming ideas with all the libraries of the .NET world.It is, > in fact, where many of the new ideas in C# 2.0 came from (e.g. the Generics > implementation) and C# 3.0 (e.g. type inference) are coming from. There is > an implementation of their LINQ ideas too. > > > ----- Original Message ----- > From: "bryan rasmussen" > To: "Alex Peake" > Cc: ; "Fernando Rodriguez (by way of Helmut > Enck-Radana )" > Sent: Friday, February 10, 2006 12:53 PM > Subject: Re: Erlang Books > > > > Okay if they're going to publish a book on F# they should definitely > > publish on Erlang, how many people have even heard of F#, that's a > > really far out idea.... that said I'd probably buy it. or trade in all > > my C# books for it. > > > > Cheers, > > Bryan Rasmussen > > > > On 2/10/06, Alex Peake wrote: > > > Quote from James Huddleston of APress (jhuddleston AT ...): > > > > > > "...I'm hoping to get the first book out by the end of 2006 and > establish > > > Apress as the premier publisher on F# and FP in 2007..." > > > > > > So if you give it an FP focus... > > > > > > Alex > > > > > > > > > ----- Original Message ----- > > > From: "Fernando Rodriguez (by way of Helmut Enck-Radana > > > )" > > > To: > > > Sent: Friday, February 10, 2006 7:13 AM > > > Subject: RE: Erlang Books...WAS Re: Where to get Concurrent Programming > in > > > Erlang (2nd Edition) > > > > > > > > > > > At 01:55 2006-02-10, Ryan Rawson wrote: > > > > > >I'm sure O'Reilly would be more than willing to publish some > > > > > books if > > > > > >content were furnished. Although I don't exactly work for them, > if > > > > > >they are willing as you noted to publish "random pet OSS project" > > > > > >books, then why not erlang? > > > > > > > > > > Some years ago they weren't: > > > > > > > > > > At 11:19 2001-10-18, Joe Armstrong wrote: > > > > > >At the last erlang conferense the idea of a new erlang book > > > > > was discussed. > > > > > > > > > > > >I mailed O'reilly they wern't interested - not a big enough > market. > > > > > > > > Why not try A-Press? They've been publishing lisp books, sowhy not an > > > Erlang on? > > > > > > > > > > > > > > From jhreppy@REDACTED Fri Feb 10 18:33:07 2006 From: jhreppy@REDACTED (John Reppy) Date: Fri, 10 Feb 2006 11:33:07 -0600 Subject: ICFP 2006 --- Call for Papers Message-ID: <6C71D18E-FFD1-45B6-8268-4E07AFEC0A83@mac.com> International Conference on Functional Programming (ICFP 2006) Call for Papers September 18-20, 2006 Portland, Oregon, USA Submission deadline: 7 April, 2006 http://icfp06.cs.uchicago.edu ICFP 2006 seeks original papers on the art and science of functional programming. Submissions are invited on all topics ranging from principles to practice, from foundations to features, from abstraction to application. The scope includes all languages that encourage functional programming, including both purely applicative and imperative languages, as well as languages with objects and concurrency. Particular topics of interest include: * Applications and domain-specific languages: Systems programming, scientific and numerical computing, symbolic computing and artificial intelligence, databases, graphical user interfaces, multimedia programming, application scripting, system administration, distributed-systems and web programming, XML processing, security. * Foundations: Formal semantics, lambda calculus, type theory, monads, continuations, control, state, effects. * Design: Algorithms and data structures, modules and type systems, concurrency and distribution, components and composition, relations to object-oriented and logic programming. * Implementation: Abstract machines, compile-time and run-time optimization, just-in-time compilers, memory management. Interfaces to foreign functions, services, components and low-level machine resources. * Transformation and analysis: Abstract interpretation, partial evaluation, program transformation. * Software-development techniques for functional programming: Design patterns, specification, verification, validation, debugging, test generation, tracing and profiling. * Practice and experience: Functional programming in education and industry. * Functional pearls: Elegant, instructive examples of functional programming. Papers in the last two categories need not necessarily report original research results; they may instead, for example, report practical experience that will be useful to others, re-usable programming idioms, or elegant new ways of approaching a problem. A special issue of the Journal of Functional Programming will highlight selected papers from the meeting. Submission instructions are available at http://www.easychair.org/ ICFP2006/ The top submitted papers, as determined by the program committee, will be invited to submit journal versions for a special issue of JFP. Important Dates: Submission deadline: 7 April, 2006 On-line response to reviews: 14 May, 2006 Author notification: 273 May, 2006 Camera-ready copy: 26 June, 2006 Organizers: Conference Chair: John Reppy (University of Chicago) Program Chair: Julia Lawall (DIKU) Program Committee: Torben Amtoft (Kansas State University) Matthias Blume (Toyota Technological Institute at Chicago) Robby Findler (University of Chicago) Alain Frisch (INRIA Rocquencourt) Patricia Johann (Rutgers University) Yukiyoshi Kameyama (University of Tsukuba) Andres Loh (Universitat Bonn) Simon Marlow (Microsoft Research Ltd.) Greg Morrisett (Harvard University) Riccardo Pucella (Northeastern University) Doaitse Swierstra (Utrecht University) Mitch Wand (Northeastern University) Joe Wells (Heriot-Watt University) Hongwei Xi (Boston University) Steve Zdancewic (University of Pennsylvania) From mark@REDACTED Sat Feb 11 02:08:42 2006 From: mark@REDACTED (Mark Wutka) Date: Fri, 10 Feb 2006 20:08:42 -0500 Subject: Classical concurrent problems In-Reply-To: <20060210185214.GA3976@wutka.com> References: <002201c62e59$f9eb6b00$2101a8c0@fofao> <20060210185214.GA3976@wutka.com> Message-ID: <20060211010841.GA6835@wutka.com> " " Hi, " " " " Where can I find erlang solutions to classical concurrent problems such as " " the dinning philosophers? I tried googling but didn't find anything " " " " Thanks " " " " I did a version of it in Erlang, I just can't vouch for it being *good* " Erlang. It isn't too long, so I think it's probably okay to just stick " it in the message. The each chopstick and philosopher is a process. The " philosophers strategy is just to pick up the left chopstick, then try " the right. If it can't get the right, it drops the left, waits, and " tries again. You can experiment with other strategies, of course. " I put a wait_for function in chopstick to wait for a chopstick, but the " current philosopher implementation doesn't use it. " Mark I discovered a few things about my previous program. First, Sam Montgomery-Blinn was kind enough to point out the extraneous semicolon in chopstick.erl. Second, the random number generator appears to keep separate per-process seeds. When the 5 philosophers start up, they all start with identical seeds. I tried seeding with the time, but they all started up so fast, they still had the same seed. I modified dining.erl to compute random seeds for each philosopher. The philosopher process then initializes the random number generator at startup. Here is the updated dining.erl: -module(dining). -export([start/0]). start() -> %% Start the random number generator %% Create the chopsticks C1 = chopstick:start(), C2 = chopstick:start(), C3 = chopstick:start(), C4 = chopstick:start(), C5 = chopstick:start(), %% Start the philosophers each with a different pair of chopsticks philosopher:start(C1, C2, "Lao Tzu", randomize()), philosopher:start(C2, C3, "Plato", randomize()), philosopher:start(C3, C4, "Socrates", randomize()), philosopher:start(C4, C5, "Descartes", randomize()), philosopher:start(C5, C1, "Hume", randomize()). randomize() -> { random:uniform(100000), random:uniform(100000), random:uniform(100000) }. They I just modified the beginning of philosopher.erl: -module(philosopher). -export([start/4, init/4]). -define(MaxThink, 10000). -define(MaxEat, 10000). -define(MaxWait, 1000). start(Left, Right, Name, RandSeed) -> spawn(philosopher, init, [Left, Right, Name, RandSeed]). init(Left, Right, Name, RandSeed) -> {A1, A2, A3} = RandSeed, random:seed(A1, A2, A3), think(Left, Right, Name). . . . Now the processes seem much more spread out and there seemd to be less contention. Mark From dmitriid@REDACTED Sat Feb 11 11:26:32 2006 From: dmitriid@REDACTED (Dmitrii Dimandt) Date: Sat, 11 Feb 2006 12:26:32 +0200 Subject: Erlang Books...WAS Re: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: <6.2.3.4.0.20060210161128.03444ba8@paradigma-software.de> References: <6.2.3.4.0.20060210161128.03444ba8@paradigma-software.de> Message-ID: On 2/10/06, Fernando Rodriguez wrote: > > At 01:55 2006-02-10, Ryan Rawson wrote: > > >I'm sure O'Reilly would be more than willing to publish some > > books if > > >content were furnished. Although I don't exactly work for them, if > > >they are willing as you noted to publish "random pet OSS project" > > >books, then why not erlang? > > > > Some years ago they weren't: > > > > At 11:19 2001-10-18, Joe Armstrong wrote: > > >At the last erlang conferense the idea of a new erlang book > > was discussed. > > > > > >I mailed O'reilly they wern't interested - not a big enough market. > > Why not try A-Press? They've been publishing lisp books, sowhy not an Erlang on? > > Why not just put the entire book on the web? ;) Lik the "On Lisp" book? From Marc.Vanwoerkom@REDACTED Sat Feb 11 13:52:04 2006 From: Marc.Vanwoerkom@REDACTED (Marc van Woerkom) Date: Sat, 11 Feb 2006 13:52:04 +0100 Subject: Erlang Books...WAS Re: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: <6.2.3.4.0.20060210065443.03456228@paradigma-software.de> Message-ID: >>http://www.bluetail.com/wiki/showPage?node=ErlangOnLineBook >>http://www.geocities.com/erlang_journal/book1.html Those look but they illustrate that you need a lot of stamina to finish it properly. Indeed one could write several ones. Different difficulty level: - computer scientist (like the original), - one for interested newbies (like Mikael Remond's french book) Different focus: - functional programming (algorithms, data structures (!)) - distributed applications - network/telecomms programming - database programming (mnesia, Oracle & relational friends..) - web application development (Yaws..) .. This is so much, that I favour a community effort. E.g. the PHP online documentaton is excellent, certainly one of the reasons why it attracted many newcomers. Have you tried http://php.net/? e.g. http://php.net/array_map They allow comments for every page, so it is kind of a compromise between a Wiki and the statics docs where you can immediatly add your own content. My problem with the erlang wiki is that I got used to the Wikimedia software (the one behind wikipedia), I post on wikipedia if I have a bit time off and I hate it now to switch to another input syntax. I also like the way they organize things. That would make creating a Wikibook an option, but I don't like the idea that anyone could market it afterwards. (In case of the FreeBSD project I don't mind such, because I know money goes back to the project - but where go the bucks that are made with wikipedia contents?) This could be solved by running a wikimedia software on a erlang community server. (Or by pimping up the existing erlang wikis :-) Regards, Marc From erlang@REDACTED Sat Feb 11 20:13:53 2006 From: erlang@REDACTED (Michael McDaniel) Date: Sat, 11 Feb 2006 11:13:53 -0800 Subject: ODBC questions In-Reply-To: <20060209185812.GJ23283@delora.autosys.us> References: <20060205153912.GA17372@memphis.process-one.net> <20060209185812.GJ23283@delora.autosys.us> Message-ID: <20060211191352.GG24171@delora.autosys.us> On Sun, Feb 05, 2006 at 04:39:12PM +0100, Mickael Remond wrote: > Hello, > > I have recently been working a lot with ODBC and Erlang. One problem / > question remains: Is there any mechanism to detect when the connection > to the database is lost ? The purpose is to be able to try restarting > the connection. > I looked at the ODBC code, but did not find any relevant parts. > For now, the behaviour seems to be the following: When querying a > database who went offline, I get an error as the query response. The > text of the error explains that the database is not more reachable but > the ODBC process is still there. > > I suspect that such reconnection mechanism should be handled by the ODBC > driver. I have been doing my tests with MySQL. > > Does someone here have experienced the same reconnection problem with > ODBC ? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I (perhaps naively) do the following in a (reliable) production system: readUpdateQuarry(Ref, CacheCallid, NewCallid) -> Z = "insert into quarry select " etc. etc. proprietary stuff case odbc:sql_query(Ref, Z) of {updated, Return} -> {updated, Return} ; {_, Error} -> expmaster:log_error(?MODULE, ?LINE, 'odbc:sql_query', Error) , {error, Error} end . where Ref is an ODBC connection. Everything works fast enough for this system for the calling function to disconnect/reconnect if there is a problem. Other insert/query functions I have will create a new connection and destroy the connection for each call. This is fast enough in my production environment also. I originally had designed to have a process that marshalled ODBC connections for the workers. That proved to be more hassle than it was worth since the above simpler system works plenty fast enough. ~Michael > > -- > Micka?l R?mond > http://www.process-one.net/ -- Michael McDaniel Portland, Oregon, USA http://autosys.us +1 503 283 5284 From erlang@REDACTED Sat Feb 11 20:21:48 2006 From: erlang@REDACTED (Michael McDaniel) Date: Sat, 11 Feb 2006 11:21:48 -0800 Subject: Erlang compiler bug in R10 ? In-Reply-To: <20060210163536.GG1453@delora.autosys.us> References: <20060210163536.GG1453@delora.autosys.us> Message-ID: <20060211192147.GN24171@delora.autosys.us> works ok on my Ubuntu release 5.10 box (Debian) with R10B-9 $ pwd /home/mmcdanie/misc/src/erlang/ibrowse-1.0/src $ uname -r 2.6.12-9-386 $ erl -s init stop Erlang (BEAM) emulator version 5.4.12 [source] [hipe] Eshell V5.4.12 (abort with ^G) 1> $ make clean rm -f ../ebin/*.beam $ make erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse.erl erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_http_client.erl erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_app.erlerlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_sup.erlerlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_lib.erlerlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_test.erl On Wed, Feb 08, 2006 at 01:38:05PM +0100, Torbjorn Tornkvist wrote: > Hi, > > I'm trying to compile the ibrowse application in jungerl: > ---------------------------------------------------------------- > > make > erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ > -o ../ebin ibrowse.erl > erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ > -o ../ebin ibrowse_http_client.erl > Function chunk_request_body/3 refers to undefined label 410 > ./ibrowse_http_client.erl:none: internal error in beam_dead; > crash reason: {{case_clause,{'EXIT',{undefined_label,410}}}, > [{compile,'-select_passes/2-anonymous-2-',2}, > {compile,'-internal_comp/4-anonymous-1-',2}, > {compile,fold_comp,3}, > {compile,internal_comp,4}, > {compile,internal,3}]} > make: *** [../ebin/ibrowse_http_client.beam] Error 1 > ------------------------------------------------------------------ > > I get this result with R10B-4, R10B-8, R10B-9 > > But with R9C, ibrowse compiles just fine. > > Cheers, Tobbe > -- Michael McDaniel Portland, Oregon, USA http://autosys.us +1 503 283 5284 From gordonguthrie@REDACTED Sun Feb 12 19:59:00 2006 From: gordonguthrie@REDACTED (Gordon Guthrie) Date: Sun, 12 Feb 2006 18:59:00 +0000 Subject: Announcement: Erlang Automated Build Script Message-ID: <1139770740.43ef857480748@backawinner.gg> I have committed a script for the automated build and testing Erlang programmes to the Jungerl. erlang_automated_build is a shell script which will run some or all of: * a CVS download of code * a full compile * a test suite * a Dialyzer analysis * a Tsunami load test The results of these are graphed and copied to a location as a web page. There is also e-mail notification on fail/success. More details can be found in the documentation: http://cvs.sourceforge.net/viewcvs.py/jungerl/jungerl/lib/erlang_automated_build/doc/DOCUMENTATION.TXT?view=markup An example of the output is included under: $CVSROOT/jungerl/lib/erlang_automated_build/doc/examples/output Gordon Guthrie ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From kwang@REDACTED Sun Feb 12 11:02:01 2006 From: kwang@REDACTED (Kwangkeun Yi) Date: Sun, 12 Feb 2006 19:02:01 +0900 Subject: SAS'06 2nd Call For Papers Message-ID: ***************************************************************************** 2nd Call For Papers The 13th International Static Analysis Symposium (SAS'06) Seoul, Korea 29-31 August 2006 http://ropas.snu.ac.kr/sas06 ***************************************************************************** IMPORTANT DATES: PLEASE NOTE THE CHANGE OF DATES Submission: 14 April 2006 (<-------- was 7 April) Notification: 31 May 2006 (<-------- was 26 May) Camera-ready: 10 June 2006 SUMMARY Static Analysis is increasingly recognized as a fundamental tool for program verification, bug detection, compiler optimization, program understanding, and software maintenance. The series of Static Analysis Symposia has served as the primary venue for presentation of theoretical, practical, and application advances in the area. The Thirteenth International Static Analysis Symposium (SAS'06) will be held in Seoul, hosted by the Seoul National University. Previous symposia were held in London, Verona, San Diego, Madrid, Santa Barbara, Venice, Pisa, Paris, Aachen, Glasgow and Namur. The technical program for SAS'06 will consist of invited lectures, tutorials, presentations of refereed papers, and software demonstrations. Contributions are welcome on all aspects of Static Analysis, including, but not limited to abstract domains abstract interpretation abstract testing bug detection data flow analysis model checking new applications program specialization program verification security analysis theoretical frameworks type checking Submissions can address any programming paradigm, including concurrent, constraint, functional, imperative, logic and object-oriented programming. Survey papers, that present some aspect of the above topics with a new coherence, and application papers, that describe experience with industrial applications, are also welcomed. SUBMISSIONS INFORMATION - All submissions be submitted electronically online via the symposium web page http://ropas.snu.ac.kr/sas06. Acceptable formats are PostScript or PDF, viewable by Ghostview or Acrobat Reader. - Paper submissions should not exceed 15 pages in LNCS format, excluding bibliography and well-marked appendices. Program committee members are not required to read the appendices, and thus papers must be intelligible without them. - Papers must describe original work, be written and presented in English, and must not substantially overlap with papers that have been published or that are simultaneously submitted to a journal or a conference with refereed proceedings. - Submitted papers will be judged on the basis of significance, relevance, correctness, originality, and clarity. They should clearly identify what has been accomplished and why it is significant. - The proceedings will be published by Springer-Verlag's Lecture Notes in Computer Science series. PROGRAM CHAIR: Kwangkeun Yi (Seoul National U., Korea) Email: kwang@REDACTED PROGRAM COMMITTEE: Anindya Banerjee (Kansas State U., USA) Wei-Ngan Chin (National U. of Singapore, Singapore) Patrick Cousot (ENS Paris, France) Roberto Giacobazzi (U. of Verona, Italy) Chris Hankin (Imperial College, UK) Luddy Harrison (U. of Illinois at Urbana-Champaign, USA) Naoki Kobayashi (Tohoku U., Japan) Oukseh Lee (Hanyang U., Korea) Alan Mycroft (U. of Cambridge, UK) Kedar Namjoshi (Bell Labs., USA) Jens Palsberg (UCLA, USA) Andreas Podelski (Max-Planck-Institut, Germany) Ganesan Ramalingam (IBM T.J.Watson, USA) Radu Rugina (Cornell U., USA) Harald Sondergaard (U. of Melbourne, Australia) Zhendong Su (UC Davis, USA) Reinhard Wilhelm (U. des Saarlandes, Germany) ************************************************************************ From pete-expires-20060401@REDACTED Sun Feb 12 05:12:37 2006 From: pete-expires-20060401@REDACTED (Pete Kazmier) Date: Sat, 11 Feb 2006 23:12:37 -0500 Subject: SNMP Client example? Message-ID: <87vevldxl6.fsf@coco.kazmier.com> Could someone post or send me a simple example erlang program that is able to query an agent for its system.sysDescr.0? I am having a difficult time finding examples of how to use the Erlang snmp code in such a manner. I want to write a tool to help manage a large number (approximately 2000) of Cisco routers. This may be my way to get Erlang at my workplace. Thanks, Pete From renyix1@REDACTED Mon Feb 13 02:42:57 2006 From: renyix1@REDACTED (Renyi Xiong) Date: Sun, 12 Feb 2006 17:42:57 -0800 Subject: mnesia question Message-ID: does anybody know? 1. what happens if one of (not all of) the RAM replicas of Mnesia table fails when doing write operation? write fails? 2. Is Mnesia table RAM replica distributable across VPN network? 3. Is possible to add and remove RAM replica dynamically? Thanks, Renyi. From bjorn@REDACTED Mon Feb 13 09:21:38 2006 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 13 Feb 2006 09:21:38 +0100 Subject: Erlang compiler bug in R10 ? In-Reply-To: <20060211192147.GN24171@delora.autosys.us> References: <20060210163536.GG1453@delora.autosys.us> <20060211192147.GN24171@delora.autosys.us> Message-ID: You probably have a different version of ibrowse. There IS a bug in the compiler. /Bjorn Michael McDaniel writes: > works ok on my Ubuntu release 5.10 box (Debian) with R10B-9 > > $ pwd > /home/mmcdanie/misc/src/erlang/ibrowse-1.0/src > $ uname -r > 2.6.12-9-386 > $ erl -s init stop > Erlang (BEAM) emulator version 5.4.12 [source] [hipe] > > Eshell V5.4.12 (abort with ^G) > 1> > $ make clean > rm -f ../ebin/*.beam > $ make > erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse.erl > erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_http_client.erl > erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_app.erlerlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_sup.erlerlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_lib.erlerlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ -o ../ebin ibrowse_test.erl > > > On Wed, Feb 08, 2006 at 01:38:05PM +0100, Torbjorn Tornkvist wrote: > > Hi, > > > > I'm trying to compile the ibrowse application in jungerl: > > ---------------------------------------------------------------- > > > make > > erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ > > -o ../ebin ibrowse.erl > > erlc -W +warn_unused_vars +nowarn_shadow_vars +warn_unused_import -I./ > > -o ../ebin ibrowse_http_client.erl > > Function chunk_request_body/3 refers to undefined label 410 > > ./ibrowse_http_client.erl:none: internal error in beam_dead; > > crash reason: {{case_clause,{'EXIT',{undefined_label,410}}}, > > [{compile,'-select_passes/2-anonymous-2-',2}, > > {compile,'-internal_comp/4-anonymous-1-',2}, > > {compile,fold_comp,3}, > > {compile,internal_comp,4}, > > {compile,internal,3}]} > > make: *** [../ebin/ibrowse_http_client.beam] Error 1 > > ------------------------------------------------------------------ > > > > I get this result with R10B-4, R10B-8, R10B-9 > > > > But with R9C, ibrowse compiles just fine. > > > > Cheers, Tobbe > > > > -- > Michael McDaniel > Portland, Oregon, USA > http://autosys.us > +1 503 283 5284 > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From mike@REDACTED Mon Feb 13 09:22:36 2006 From: mike@REDACTED (Michael Williams) Date: 13 Feb 2006 08:22:36 GMT Subject: Erlang Books...WAS Re: Where to get Concurrent Programming in Erlang (2nd Edition) References: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com>, <006b01c62d65$c5bca820$0702a8c0@PORTHOS>, <43EB2908.105@Fitzsimons.org> Message-ID: Some while ago I realised that our book was getting somewhat out of date, so I wrote a tutorial about the basics of Erlang. This tutorial covers more or less the same things as the first part of the book, but is more up to date: http://www.erlang.org/doc/doc-5.4.12/doc/getting_started/part_frame.html /mike From sanjaya@REDACTED Mon Feb 13 10:26:41 2006 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Mon, 13 Feb 2006 15:26:41 +0600 Subject: Erlang-VoiceXML interpreter? Message-ID: <00e901c6307f$995433d0$5f00a8c0@wavenet.lk> Hi...ALL !!! Are there any VoiceXML interpreter written in Erlang? Prefer If anyone like to shere their partial work, or know some URL with opensource work. (I have urgent work with adoption of VoiceXML to our systems). Otherwise I have to start coding my own VoiceXML interpreter :( Any guidence, suggestions also accepted. Thanks in advance. Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From ulf.wiger@REDACTED Mon Feb 13 09:48:47 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 13 Feb 2006 09:48:47 +0100 Subject: mnesia question Message-ID: Renyi Xiong wrote: > > 1. what happens if one of (not all of) the RAM replicas of > Mnesia table fails when doing write operation? write fails? If you are using transactions, chances are good that mnesia will be able to follow through after all. The transaction is completed as an 'asymmetric' transaction, and the failed node gets the opportunity to update itself later. (Of course, assuming that the failed node is not the one that initiated the transaction.) If you're using dirty writes, you may end up with database inconsistency. Don't use dirty writes on replicated tables unless you really really know what you're doing. > 2. Is Mnesia table RAM replica distributable across VPN network? If you can get Distributed Erlang to work, you will be able to replicate mnesia tables. Without Distributed Erlang - no replication. > 3. Is possible to add and remove RAM replica dynamically? Yes, using the function mnesia:add_table_copy(Tab, Node, Type) where Type == ram_copies, if it's a RAM replica you want to add. Removing a replica: mnesia:del_table_copy(Tab, Node) Regards, Ulf W From hz@REDACTED Mon Feb 13 12:37:32 2006 From: hz@REDACTED (HORVATH Zoltan) Date: Mon, 13 Feb 2006 12:37:32 +0100 (CET) Subject: CFP IFL 2006, Budapest, Sep 4-6, 2006 Message-ID: Announcement and Call for Papers 18th International Workshop on Implementation and Application of Functional Languages IFL 2006 September 4-6, 2006 Budapest, Hungary http://plc.inf.elte.hu/ifl2006/ Hosted by the Department of Programming Languages and Compilers of the Faculty of Informatics at E?tv?s Lor?nd University --------- IMPORTANT DATES --------- * July 30th, 2006 Registration deadline * Aug 4th, 2006 Submission deadline for draft proceedings * Oct 24th, 2006 Submission deadline for post-refereeing process * Dec 8th, 2006 Notification of acceptance/rejection * Jan 31th 2007 Camera-ready papers ---------------------------------------------------------------------- Scope and Topics The IFL workshops form a tradition that has lasted for nearly two decades. The aim of these workshops is to bring together researchers actively engaged in the implementation and application of functional and function-based programming languages. They provide an open forum for researchers who wish to present and discuss new ideas and concepts, work in progress, preliminary results, etc. related primarily but not exclusively to the implementation and application of functional languages. Topics of interest include, but are not limited to: * language concepts * concurrent/parallel programming * type checking * concurrent/parallel program execution * compilation techniques * heap management * generic programming techniques * runtime profiling * (abstract) interpretation * performance measurements * automatic program generation * debugging and tracing * (abstract) machine architectures * verification * formal aspects * tools and programming techniques * array processing * demos of well working, useable tools and applications in functional languages Papers on applications demonstrating the suitability of novel ideas in any of the above areas and contributions on related theoretical work are also welcomed. The change of the workshop name adding the term "application", introduced in 2004, is to reflect the broader scope IFL has gained over recent years. Prospective authors are encouraged to submit papers to be published in the draft proceedings and to give presentations at the workshop. All contributions must be written in English, conform to the Springer-Verlag LNCS series format. Attendees at IFL'06 will have an opportunity to submit a revised version of their paper for post-workshop reviewing. Selected papers will be published by Springer Verlag in the well-known Lecture Notes in Computer Science (LNCS) Series, as has been a long-standing tradition for the IFL Workshops. Programme Committee Matthias Blume (Toyota Technological Institute, Chicago, USA) Zoran Budimac (University of Novi Sad, Serbia) Andrew Butterfield (Trinity College Dublin, Ireland) Ralf Hinze (University of Bonn, Germany) Zolt?n Horv?th (University E?tv?s Lor?nd, Budapest, Hungary) (Chair) Tam?s Kozsik (University E?tv?s Lor?nd, Budapest, Hungary) Hans-Wolfgang Loidl (University Ludwig-Maximilians, Munich, Germany) Fr?d?ric Loulergue (University of Orl?ans, France) Rita Loogen (University Philipps, Marburg, Germany) Simon Marlow (Microsoft Research, Cambridge, UK) Marco Morazan (Seton Hall University, NJ, USA) Yolanda Ortega-Mall?n (University Complutense, Madrid, Spain) Rinus Plasmeijer (University of Nijmegen, The Netherlands) Jaroslav Poruban (Technical University of Kosice, Slovakia) Anna So?s (University Babes-Bolyai, Cluj, Romania) Doaitse Swierstra (University of Utrecht, The Netherlands) Peter Thieman (University of Freiburg, Germany) German Vidal (Technical University of Valencia, Spain) Workshop Organization Zolt?n Horv?th, Vikt?ria Zs?k Department of Programming Languages and Compilers Faculty of Informatics E?tv?s Lor?nd University, Budapest, Hungary Further information Website: http://plc.inf.elte.hu/ifl2006/ E-mail: ifl2006@REDACTED From joe.armstrong@REDACTED Mon Feb 13 14:07:15 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Mon, 13 Feb 2006 14:07:15 +0100 Subject: Erlang Books...WAS Re: Where to get Concurrent Programming in Erlang (2nd Edition) Message-ID: > > > At 11:19 2001-10-18, Joe Armstrong wrote: > > > >At the last erlang conferense the idea of a new erlang > book > was > > discussed. > > > > > > > >I mailed O'reilly they wern't interested - not a big > enough market. > > > > Why not try A-Press? They've been publishing lisp books, > sowhy not an Erlang on? > > > > > > > Why not just put the entire book on the web? ;) Lik the "On > Lisp" book? Because there is no book (yet). Putting a book on the web is sometimes done at the end of the book's life cycle, this occures when the publisher is no longer earning any significant money from the book but while there is some continued interested in the work. The On Lisp book is only on the web since prentice hall gave the copyright back to Paul Graham and he made it available on the web. We want a new book as part of an attempt to get Erlang into the mainstream. PHP *is* mainstream - mainstream means there are huge piles of PHP books in my local bookstore - mainstream means there are jobs for people who know PHP. Mainstream means that consultants can earn money from PHP. Erlang is popular in it's niche, but is definatly not mainstream. Now one of the things you have to do to move from niche to mainstream is be visible in the bookstores. A lot of people (me included) like books - they boot quicky and are convenient to read on subways etc. Reading on-screen or reading a printout of a PDF file is just not as convenient as reading a book. Cheers /Joe From snickl@REDACTED Mon Feb 13 14:07:55 2006 From: snickl@REDACTED (Stefan Nickl) Date: Mon, 13 Feb 2006 14:07:55 +0100 (CET) Subject: IPMI / ATCA interface in erlang Message-ID: Hi all, anyone working on erlang interfacing to IPMI, RMCP, AdvancedTCA shelf/system management kind of stuff? CU, SN -- I have a BDI2000 and I'm not afraid to use it -- Pantelis Antoniou From ulf.wiger@REDACTED Mon Feb 13 14:40:18 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 13 Feb 2006 14:40:18 +0100 Subject: identity parse transform using syntax_tools Message-ID: I thought this might be of some use to those out there writing parse transforms. I simplified my plain_fsm_xform module into an entity parse transform callback. The main point is of course that a parse transform based on syntax_tools should be much more stable in time than cloning erl_id_trans and hacking it. The actual work is done in a fun: Fun = fun(Type, Form, Context, Acc) -> io:format("Type = ~p~n" "Form = ~p~n" "Context = ~p~n" "Acc = ~p~n", [Type, Form, Context, Acc]), {Form, _Recurse = true, Acc+1} end, and the parse_transform callback looks like this: parse_transform(Forms, _Options) -> Fun = fun(Type, Form, Context, Acc) -> ... end, {NewTree, _} = transform(Forms, Fun, _Acc = 1), [erl_syntax:revert(T) || T <- lists:flatten(NewTree)]. The Recurse flag can be set to false if there is no need to traverse the subtrees of a particular form. Perhaps an unnecessary optimization... I haven't tested it much - basically just compiling a module and checking that the printouts look ok. I've attached the module. Let me know what you think. Regards, Ulf W -------------- next part -------------- A non-text attachment was scrubbed... Name: stools_id_trans.erl Type: application/octet-stream Size: 3163 bytes Desc: stools_id_trans.erl URL: From tobbe@REDACTED Mon Feb 13 14:39:53 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Mon, 13 Feb 2006 14:39:53 +0100 Subject: SNMP Client example? In-Reply-To: <87vevldxl6.fsf@coco.kazmier.com> References: <87vevldxl6.fsf@coco.kazmier.com> Message-ID: Pete Kazmier wrote: > Could someone post or send me a simple example erlang program that is > able to query an agent for its system.sysDescr.0? I am having a > difficult time finding examples of how to use the Erlang snmp code in > such a manner. I want to write a tool to help manage a large number > (approximately 2000) of Cisco routers. This may be my way to get > Erlang at my workplace. > > Thanks, > Pete > Have you tried the HowTo at: http://www.trapexit.org/docs/howto/snmp_howto.html Cheers, Tobbe From dominique.boucher@REDACTED Mon Feb 13 15:54:56 2006 From: dominique.boucher@REDACTED (Dominique Boucher) Date: Mon, 13 Feb 2006 09:54:56 -0500 Subject: Erlang-VoiceXML interpreter? In-Reply-To: <00e901c6307f$995433d0$5f00a8c0@wavenet.lk> Message-ID: <200602131450.k1DEo8YZ016049@bergman.nuecho.ad> Hi Sanjaya, > Are there any VoiceXML interpreter written in Erlang? None that I am aware of. > Prefer If anyone like to shere their partial work, or know > some URL with opensource work. (I have urgent work with > adoption of VoiceXML to our systems). Otherwise I have to > start coding my own VoiceXML interpreter :( For the adoption of VoiceXML, do you really need to develop your own VoiceXML interpreter? What are your goals? Why can't you just use an existing one, even if it's not written in Erlang? Don't you just need a VoiceXML application framework instead? (I.e. a framework for developing VoiceXML applications in Erlang, at the right level of abstraction.) Developing a VoiceXML interpreter is one thing. Developing a carrier-grade VoiceXML gateway that interfaces to the telephony platform, the CTI platform, the various speech resources (TTS, speech recognizer, etc.), is another thing. You will need an ECMAScript interpreter that can be easily embedded in Erlang, and good caching mechanisms (for resources like recordings). A VoiceXML gateway is like a Web browser. It's not just a matter of interpreting the VoiceXML. I have been in the speech industry for the past 9 years now, and I can tell you that developing such a beast can easily take 1.5 to 2 years of development and testing at the bare minimum to get something stable enough for deployment. Having said that, I would very much like to see a VoiceXML gateway in Erlang. Cheers, Dominique Boucher Lead Developer N? ?cho Inc www.nuecho.com From vlad.xx.dumitrescu@REDACTED Mon Feb 13 15:57:43 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Mon, 13 Feb 2006 15:57:43 +0100 Subject: identity parse transform using syntax_tools Message-ID: <11498CB7D3FCB54897058DE63BE3897C01375C28@esealmw105.eemea.ericsson.se> Hi! Nice - a clean and readable implementation, very useful for simple transformations! Now I have to explain why I said "simple transformations" without making it sound like a negative remark :-) The code implements a preorder traversal of the tree. This means that the transformation of the current form has to be defined in terms of non-transformed code. Depending on the specific transformation, a definition in terms of transformed code might be significantly easier, so a postorder traversal might be what's needed. In the general case, I think one would really need to do a generalized 'Euler tour' traversal, meaning that the tree 0 / | \ 1 2 7 / \ /|\ 3 4 5 8 6 Would be traversed in the order 0 1 3 1 4 1 0 2 5 2 8 2 6 2 0 7 0 Defining a single function to manage this is quite difficult, especially if it is to remain readable. If the transformation is so complicated there are other options: making several passes over the tree defining a new language so that the correct tree is generated from normal parsing I am also very interested in meta-programming and its applications, and have some ideas about how to integrate such beasts with Erlang. Unfortunately, only ideas so far; translating those into code requires time that I don't have right now.... Best regards, Vlad From ulf.wiger@REDACTED Mon Feb 13 16:21:07 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 13 Feb 2006 16:21:07 +0100 Subject: identity parse transform using syntax_tools Message-ID: You're absolutely right. I tried to write a version that might work for most simple transforms. In plain_fsm_xform (I just realized I haven't actually published it yet), I did write something along the lines that you describe: http://article.gmane.org/gmane.comp.lang.erlang.general/12482 Obviously, it gets a bit too complicated for a generic support function. While I was writing it, I still ended up tagging the syntax tree with annotations, and used multiple passes. The annnotations go away when you revert to the standard parsed forms, so they can be used to tag the structure and then running multiple passes. /Uffe > -----Original Message----- > From: Vlad Dumitrescu XX (LN/EAB) > Sent: den 13 februari 2006 15:58 > To: Ulf Wiger (AL/EAB); erlang-questions@REDACTED > Subject: RE: identity parse transform using syntax_tools > > Hi! > > Nice - a clean and readable implementation, very useful for > simple transformations! > > Now I have to explain why I said "simple transformations" > without making it sound like a negative remark :-) > > The code implements a preorder traversal of the tree. This > means that the transformation of the current form has to be > defined in terms of non-transformed code. Depending on the > specific transformation, a definition in terms of transformed > code might be significantly easier, so a postorder traversal > might be what's needed. > > In the general case, I think one would really need to do a > generalized 'Euler tour' traversal, meaning that the tree > 0 > / | \ > 1 2 7 > / \ /|\ > 3 4 5 8 6 > > Would be traversed in the order 0 1 3 1 4 1 0 2 5 2 8 2 6 2 0 7 0 > > Defining a single function to manage this is quite difficult, > especially if it is to remain readable. > > If the transformation is so complicated there are other options: > making several passes over the tree > defining a new language so that the correct tree is > generated from normal parsing > > I am also very interested in meta-programming and its > applications, and have some ideas about how to integrate such > beasts with Erlang. Unfortunately, only ideas so far; > translating those into code requires time that I don't have > right now.... > > Best regards, > Vlad > > From pete-expires-20060401@REDACTED Mon Feb 13 15:26:37 2006 From: pete-expires-20060401@REDACTED (Pete Kazmier) Date: Mon, 13 Feb 2006 09:26:37 -0500 Subject: SNMP Client example? References: <87vevldxl6.fsf@coco.kazmier.com> Message-ID: <87r767e3mq.fsf@coco.kazmier.com> Torbjorn Tornkvist writes: > Pete Kazmier wrote: > >> Could someone post or send me a simple example erlang program that is >> able to query an agent for its system.sysDescr.0? I am having a >> difficult time finding examples of how to use the Erlang snmp code in >> such a manner. I want to write a tool to help manage a large number >> (approximately 2000) of Cisco routers. This may be my way to get >> Erlang at my workplace. >> > > Have you tried the HowTo at: > > http://www.trapexit.org/docs/howto/snmp_howto.html To be honest, I missed that one. A cursory glance seems to indicate that one must statically configure all of the agents that might be queried ahead of time in a local configuration file. I'm searching for a simple client API that would be equivalent to using net-snmp's 'snmpget' command-line utility? Ideally, such an API call would take a hostname, community, and oid as arguments, and then return the result. If such an interface does not exist, would it be easy for me to implement using the existing code? Or should I simply resort to calling out to the OS to invoke the command-line 'snmpget'? And finally, does the Erlang SNMP library support the placing of SNMP GETBULK requests? This is important in my case as I need to query some large tables on my Cisco routers. Thanks, Pete From vlad.xx.dumitrescu@REDACTED Mon Feb 13 16:34:38 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Mon, 13 Feb 2006 16:34:38 +0100 Subject: identity parse transform using syntax_tools Message-ID: <11498CB7D3FCB54897058DE63BE3897C01375C52@esealmw105.eemea.ericsson.se> > -----Original Message----- > From: Ulf Wiger (AL/EAB) > I tried to write a version that might work for most simple transforms. I think it is most commendable that you managed to do it. I've fiddled around with parse transforms too, but since I tried to remain general, there was little return in form of simplicity, so I abandoned the thing. Parse transforms are meant for simple stuff anyways :-) /Vlad From thomasl_erlang@REDACTED Mon Feb 13 17:12:14 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Mon, 13 Feb 2006 08:12:14 -0800 (PST) Subject: identity parse transform using syntax_tools In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C01375C28@esealmw105.eemea.ericsson.se> Message-ID: <20060213161214.21007.qmail@web34401.mail.mud.yahoo.com> --- "Vlad Dumitrescu XX (LN/EAB)" wrote: > Defining a single function to manage this is quite > difficult, especially > if it is to remain readable. I'm not sure about Euler-tours, but I have written a fair bit of code to traverse forms in or out of evaluation order (forwards, backwards, partial or total order, etc). It gets quite complicated, especially if one has dozens of traversals/transformations and needs to track the undocumented evolution of Erlang everywhere. Not to mention if there are bugs in the traversal code :-) My final version (so far) is a library, probably the most parametrized and least understandable bit of Erlang I have written, which distills it all into two basic "patterns". Nearly all transformations I have used are instances of these, or abstractions built on top of these. (Grepping the repository, it looks like there are over a hundred calls to these patterns in the current version of OM.) NB. I'm not using syntax_tools either :-) Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From hakan@REDACTED Mon Feb 13 16:54:09 2006 From: hakan@REDACTED (Hakan Mattsson) Date: Mon, 13 Feb 2006 16:54:09 +0100 (CET) Subject: mnesia question In-Reply-To: References: Message-ID: On Mon, 13 Feb 2006, Ulf Wiger (AL/EAB) wrote: UW> Renyi Xiong wrote: UW> > UW> > 1. what happens if one of (not all of) the RAM replicas of UW> > Mnesia table fails when doing write operation? write fails? UW> UW> If you are using transactions, chances are good that mnesia UW> will be able to follow through after all. The transaction UW> is completed as an 'asymmetric' transaction, and the failed UW> node gets the opportunity to update itself later. Yes, the transaction is completed consistently on the surviving nodes. On the node(s) where Mnesia fails to write, Mnesia will be terminated. When Mnesia later is started on these nodes, it will pick the table contents from the surviving node(s). This fundamental behavior is the same for all types of transactions as well as for dirty writes. For transactions using 3pc, the recovery procedure is more complicated as the failing nodes may need to determine the outcome of the transaction before the transaction log can be processed. 3pc is used for transactions involving updates of the schema or asymmetrically replicated tables. UW> (Of course, assuming that the failed node is not the UW> one that initiated the transaction.) The recovery procedure is the same, even if it was the failing node that initiated the transaction. UW> If you're using dirty writes, you may end up with UW> database inconsistency. Don't use dirty writes on UW> replicated tables unless you really really know what UW> you're doing. This is a good general advice. Using dirty writes on replicated tables, is about as hazardous as using master nodes, using the max_wait_for_decision configuration parameter or to force load tables. Elaborating with these mechanisms may easily end up with an inconsistent database as they bypasses the transaction recovery procedure in Mnesia. Sometime it is necessary to use these mechanisms, but use them with care. /H?kan UW> > 2. Is Mnesia table RAM replica distributable across VPN network? UW> UW> If you can get Distributed Erlang to work, you will be able to UW> replicate mnesia tables. Without Distributed Erlang - no replication. UW> UW> UW> > 3. Is possible to add and remove RAM replica dynamically? UW> UW> Yes, using the function UW> UW> mnesia:add_table_copy(Tab, Node, Type) UW> UW> where Type == ram_copies, if it's a RAM replica you want to add. UW> UW> Removing a replica: UW> UW> mnesia:del_table_copy(Tab, Node) UW> UW> Regards, UW> Ulf W From sean.hinde@REDACTED Mon Feb 13 20:03:50 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Mon, 13 Feb 2006 19:03:50 +0000 Subject: Microsoft concurrency work Message-ID: <3799AA63-A0D2-4F44-9910-45B80ED8A2A0@gmail.com> Hi, This stuff that microsoft are doing looks quite nice: mms://wm.microsoft.com/ms/msnse/0512/26042/CCR_Final_mbr.wmv One thing that struck me is that they effectively have a receive construct which says: Ref1 = make_ref(), pid() ! {Ref1, Reqest1}, Ref2 = make_ref(), pid() ! {Ref2, Reqest2}, receive {Ref1, Msg1} and {Ref2, Msg2} -> do_code_only_when_both_arrived(); Other -> handle_other_message() end I know we can build this in Erlang, but not without some faffing to track what has already arrived. Sean From james.hague@REDACTED Mon Feb 13 20:10:18 2006 From: james.hague@REDACTED (James Hague) Date: Mon, 13 Feb 2006 13:10:18 -0600 Subject: Longstanding issues: structs & standalone Erlang Message-ID: I was going through the erlang-questions archive, and it struck me how often a couple of issues have been brought up and just how much time has gone by without any action on them: 1. Joe's structs or another more dynamic alternative to records. This would fix a huge hole in the language, IMO. When I write code in Perl or Python, I'm always pleasantly surprised at how easy it is to group values together in a simple and dynamic fashion. Erlang's records are simplstic and static in comparison. 2. Some way of distributing standalone Erlang applications. There was SAE for a while, but it went stale and was never official. There are some directory tree trimmers, such as the one used for Wings 3D, but, wow, that's an ugly route. Maybe some clear documentation about what's needed to make a mini-Erlang system would help here? Part of me wants to say that Erlang is stagnating too much, that there's such a fixation (and understandably!) on supporting legacy applications that even conservative changes to the language or libraries are shot down. In frustration, James From her@REDACTED Mon Feb 13 22:09:53 2006 From: her@REDACTED (Helmut Enck-Radana) Date: Mon, 13 Feb 2006 22:09:53 +0100 Subject: Microsoft concurrency work In-Reply-To: <3799AA63-A0D2-4F44-9910-45B80ED8A2A0@gmail.com> References: <3799AA63-A0D2-4F44-9910-45B80ED8A2A0@gmail.com> Message-ID: <6.2.3.4.0.20060213215850.01e74a60@paradigma-software.de> At 20:03 2006-02-13, Sean Hinde wrote: >This stuff that microsoft are doing looks quite nice: > >mms://wm.microsoft.com/ms/msnse/0512/26042/CCR_Final_mbr.wmv Corresponding resources which can be accessed with a web browser: http://channel9.msdn.com/wiki/default.aspx/Channel9.ConcurrencyRuntime https://urresearch.rochester.edu/handle/1802/2105 -- Helmut From chandrashekhar.mullaparthi@REDACTED Mon Feb 13 22:13:37 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Mon, 13 Feb 2006 21:13:37 +0000 Subject: About Erlang system nodes In-Reply-To: <1139851452.29242.16.camel@home> References: <1134755532.5525.42.camel@home> <43A67622.9070000@hyber.org> <1139851452.29242.16.camel@home> Message-ID: On 13/02/06, Tony Zheng wrote: > Hi > > A distributed Erlang system consists of a number of Erlang runtime > systems communicating with each other. Each such runtime system is > called a NODE. Message passing between processes at different nodes. Are > these nodes physically separate? What do you mean "physically separate"? > Can I make two servers in the DIFFERENT > LOCATIONS as two nodes, synchronize the data of Mnesia on the two nodes? Yes you can. Checkout mnesia:create_schema/1 Chandru From sean.hinde@REDACTED Mon Feb 13 23:39:56 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Mon, 13 Feb 2006 22:39:56 +0000 Subject: Microsoft concurrency work In-Reply-To: <6.2.3.4.0.20060213215850.01e74a60@paradigma-software.de> References: <3799AA63-A0D2-4F44-9910-45B80ED8A2A0@gmail.com> <6.2.3.4.0.20060213215850.01e74a60@paradigma-software.de> Message-ID: On 13 Feb 2006, at 21:09, Helmut Enck-Radana wrote: > At 20:03 2006-02-13, Sean Hinde wrote: >> This stuff that microsoft are doing looks quite nice: >> >> mms://wm.microsoft.com/ms/msnse/0512/26042/CCR_Final_mbr.wmv > > Corresponding resources which can be accessed with a web browser: Firefox handles this fine on both OS X (windows media player) and Linux through mplayer. IE6 works fine on windows. Don't let the strange URL put you off. > > http://channel9.msdn.com/wiki/default.aspx/Channel9.ConcurrencyRuntime > https://urresearch.rochester.edu/handle/1802/2105 Thanks. Sean From tzheng@REDACTED Mon Feb 13 18:24:12 2006 From: tzheng@REDACTED (Tony Zheng) Date: Mon, 13 Feb 2006 09:24:12 -0800 Subject: About Erlang system nodes In-Reply-To: <43A67622.9070000@hyber.org> References: <1134755532.5525.42.camel@home> <43A67622.9070000@hyber.org> Message-ID: <1139851452.29242.16.camel@home> Hi A distributed Erlang system consists of a number of Erlang runtime systems communicating with each other. Each such runtime system is called a NODE. Message passing between processes at different nodes. Are these nodes physically separate? Can I make two servers in the DIFFERENT LOCATIONS as two nodes, synchronize the data of Mnesia on the two nodes? Thanks. Tony From pdmc05@REDACTED Tue Feb 14 01:09:14 2006 From: pdmc05@REDACTED (Martin Leucker) Date: Tue, 14 Feb 2006 01:09:14 +0100 Subject: FMICS'06 Call for Papers Message-ID: <20060214000914.GA15439@atbroy8.informatik.tu-muenchen.de> FMICS 2006 - PRELIMINARY CALL FOR PAPERS Please visit: http://fmics06.informatik.tu-muenchen.de/ ************************************************** * 11th International Workshop on * * Formal Methods for Industrial Critical Systems * * FMICS 2006 * * 26th-27th of August 2006, Bonn, Germany * ************************************************** FMICS 2006 is co-located with Concur 2006. IMPORTANT DATES --------------- Abstract: 26th of May 2006 Full Paper: 2nd of June 2006 Notification of Acceptance: 10th of July 2006 Final version due: 25th of July 2006 SCOPE OF THE WORKSHOP --------------------- The aim of the FMICS workshops is to provide a forum for researchers who are interested in the development and application of formal methods in industry. In particular, these workshops should bring together scientists that are active in the area of formal methods and interested in exchanging their experiences in the industrial usage of these methods. They also aim at the promotion of research and development for the improvement of formal methods and tools for industrial applications. INVITED SPEAKERS ---------------- Anna Slobodova, Intel Edward A. Lee, Berkeley PROGRAMME COMMITTEE ------------------- Lubos Brim (Masaryk Univ., Czech Republic) Co-Chair Rance Cleaveland (University of Maryland, USA) Wan Fokkink (Vrije Universiteit Amsterdam & CWI, The Netherlands) Stefania Gnesi (ISTI-CNR, Italy) Susanne Graf (VERIMAG, France) David Harel (Weizmann Institute of Science, Israel) Klaus Havelund (Kestrel Technology, USA) Thomas A. Henzinger (EPFL, Switzerland) Leszek Holenderski (Philips Research, The Netherlands) Stefan Kowalewski (RWTH Aachen, Germany) Marta Kwiatkowska (University of Birmingham, UK) Salvatore La Torre (Universita' degli Studi di Salerno, Italy) Martin Leucker (TU M?nchen, Germany) Co-Chair Tiziana Margaria (University of G?ttingen, Germany) Radu Mateescu (INRIA Rh?ne-Alpes and ENS Lyon, France) Doron Peled (University of Warwick, UK) Ernesto Pimentel (University of Malaga, Spain) Andreas Podelski (Max-Planck-Institut f?r Informatik, Germany) Don Sannella (University of Edinburgh, UK) Joseph Sifakis (VERIMAG, France) PAPER SUBMISSIONS ----------------- Submissions must be made electronically through the FMICS Web site. There are two categories of submissions: A. Regular papers: Papers should be up to 16 pages in LNCS format, with a clear abstract. Additional details may be included in a clearly marked appendix, which will be read at the discretion of the program committee. All submissions must report on original research. Submitted papers must not have previously appeared in a journal or conference with published proceedings and must not be concurrently submitted to any other conference. Any partial overlap with any such published or concurrently submitted paper must be clearly indicated. B. Tool presentations: Submissions, not exceeding 4 pages using LNCS format, should describe the implemented tool and its novel features. A demonstration is expected to accompany a tool presentation. PUBLICATION ----------- Accepted regular and tool papers will be published after the meeting jointly with accepted papers from PDMC'06 in an LNCS volume. As last year, the European Association of Software Science and Technology will be offering an award to the best FMICS paper. From vlad_dumitrescu@REDACTED Tue Feb 14 08:47:21 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Tue, 14 Feb 2006 08:47:21 +0100 Subject: Microsoft concurrency work In-Reply-To: <3799AA63-A0D2-4F44-9910-45B80ED8A2A0@gmail.com> Message-ID: Hi, > From: Sean Hinde > One thing that struck me is that they effectively have a > receive construct which says: > > receive > {Ref1, Msg1} and {Ref2, Msg2} -> > do_code_only_when_both_arrived(); > Other -> > handle_other_message() > end > > I know we can build this in Erlang, but not without some > faffing to track what has already arrived. Actually, they can even synchronize on messages in different mailboxes, which works fine because mailboxes aren't processes (in the Erlang sense). Powerful, but IMHO creating more problems than solving (at least when comparing to Erlang :-). Except for the fact that their handlers are dynamic (which we don't have), this type of handlers could be simulated by something like Pid = spawn(fun() -> receive {Ref1, Msg1} -> receive {Ref2, Msg2} -> do_code_only_when_both_arrived() end end), receive {Ref1, Msg1} -> Pid ! {Ref1, Msg1}; {Ref2, Msg2} -> Pid ! {Ref2, Msg2}; Other -> ... end, Which actually could work even for Msg1 and Msg2 coming from different processes (the problem being how to let them know the value of Pid). Also, I wonder how easy it is to keep track of all handlers that are installed on a single port at any moment in time. How am I supposed to choose the proper match predicate if I don't know what other predicates are active on that port? If I don't get a message that I expect, is it because it didn't arrive at all, or because some other handler ate it up? *brrr* a nightmare to debug... Comparing to a receive statement, where all cases are explicit, I think my bias is clear ;-) Alternatively, I might have misunderstood everything completely. ;-) Regards, Vlad From erlang@REDACTED Tue Feb 14 09:16:45 2006 From: erlang@REDACTED (Peter Lund) Date: Tue, 14 Feb 2006 09:16:45 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: References: Message-ID: <43F191ED.7080900@lundata.se> Yes, I think too that the SAE would contribute a lot in marketing Erlang to the world. Many times I have wanted to send some non-erlang windows user one zip-file containing an application and all necessary parts of erlang to be able to run this on his computer. Very rarely I have been in a position to tell that windows user to first download the full erlang development environment just to run some smallish app I have developed. To market Erlang better, I think we should like java have both a development environment for erlang nerds and one other much simplier way to install and run an erlang app. Some kind of packaging tool that works for windows generating files that WinZip can unpack would be excellent. Let's face it, the non-nerd commutity uses windows! (I do too for lot of erlang development :) ) /Peter James Hague wrote: >2. Some way of distributing standalone Erlang applications. There was >SAE for a while, but it went stale and was never official. There are >some directory tree trimmers, such as the one used for Wings 3D, but, >wow, that's an ugly route. Maybe some clear documentation about >what's needed to make a mini-Erlang system would help here? > >Part of me wants to say that Erlang is stagnating too much, that >there's such a fixation (and understandably!) on supporting legacy >applications that even conservative changes to the language or >libraries are shot down. > >In frustration, >James > > > From alex.arnon@REDACTED Tue Feb 14 10:29:10 2006 From: alex.arnon@REDACTED (Alex Arnon) Date: Tue, 14 Feb 2006 11:29:10 +0200 Subject: Microsoft concurrency work In-Reply-To: References: <3799AA63-A0D2-4F44-9910-45B80ED8A2A0@gmail.com> Message-ID: <944da41d0602140129v5801549uccfcaed19b03d962@mail.gmail.com> On 2/14/06, Vlad Dumitrescu wrote: > > Hi, > > > From: Sean Hinde > > One thing that struck me is that they effectively have a > > receive construct which says: > > > > receive > > {Ref1, Msg1} and {Ref2, Msg2} -> > > do_code_only_when_both_arrived(); > > Other -> > > handle_other_message() > > end > > > > I know we can build this in Erlang, but not without some > > faffing to track what has already arrived. > > Actually, they can even synchronize on messages in different mailboxes, > which works fine because mailboxes aren't processes (in the Erlang sense). > Powerful, but IMHO creating more problems than solving (at least when > comparing to Erlang :-). > > Except for the fact that their handlers are dynamic (which we don't have), > this type of handlers could be simulated by something like > Pid = spawn(fun() -> > receive > {Ref1, Msg1} -> > receive {Ref2, Msg2} -> > do_code_only_when_both_arrived() > end > end), > receive > {Ref1, Msg1} -> Pid ! {Ref1, Msg1}; > {Ref2, Msg2} -> Pid ! {Ref2, Msg2}; > Other -> > ... > end, > Which actually could work even for Msg1 and Msg2 coming from different > processes (the problem being how to let them know the value of Pid). > > > Also, I wonder how easy it is to keep track of all handlers that are > installed on a single port at any moment in time. How am I supposed to > choose the proper match predicate if I don't know what other predicates > are > active on that port? If I don't get a message that I expect, is it because > it didn't arrive at all, or because some other handler ate it up? *brrr* a > nightmare to debug... > > Comparing to a receive statement, where all cases are explicit, I think my > bias is clear ;-) > > Alternatively, I might have misunderstood everything completely. ;-) > > Regards, > Vlad > > > IMHO, your bias is well founded. Reading through the Polyphonic C# whitepaper (nice spin :) ), it seems to me that the approach would mitigate some of the monitor/mutex/semaphore pain, but ultimately not by much. It might make that kind of concurrent programming easier in some instances, but generally it seems to me to be too little, possibly too late. And not even a mention of Erlang in the whole document. Pfft. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Marc.Vanwoerkom@REDACTED Tue Feb 14 11:21:51 2006 From: Marc.Vanwoerkom@REDACTED (Marc van Woerkom) Date: Tue, 14 Feb 2006 11:21:51 +0100 Subject: TSS Symposium Looks at Next-Gen Java, J2EE Message-ID: My google alert on Erlang spew this out: > Tate outlines how Ruby on Rails, Erlang, Seaside, Spring, > Hibernate, and other approaches are helping Java/J2EE > devs write faster, cleaner and smarter code ... http://www.idevnews.com/IntegrationNews.asp?ID=210 Regards, Marc From hakan@REDACTED Tue Feb 14 11:04:01 2006 From: hakan@REDACTED (Hakan Mattsson) Date: Tue, 14 Feb 2006 11:04:01 +0100 (CET) Subject: mnesia question In-Reply-To: <004201c12062$406e7870$400fa8c0@HP78819433158> References: <004201c12062$406e7870$400fa8c0@HP78819433158> Message-ID: On Wed, 8 Aug 2001, Renyi Xiong wrote: RX> Thanks guys, RX> It's really helpful for us to understand how Mnesia works. RX> RX> 1.My understanding is when one node initiates a write operation it sends a RX> message to each of the replicas at same time and doesn't care the write RX> transaction status on other replicas. It's up to the transaction handler on RX> each node to handle the write transaction separately. Is that right? Yes, this is true for normal transactions using 2pc. But it is not as bad as it sounds as the transaction recovery protocol ensures that the outcome of the transaction always is atomic. If needed, Mnesia will automatically use 3pc as transaction protocol. It is slower, but takes care of transactions operating on multiple tables which are replicated asymmetrically. RX> 2.How do I know the write operation succeeds on at least RX> on of the replicas including the one which initiates it? Use mnesia:sync_transaction/1. It waits for all participating nodes to complete their commit work before it returns. It is slower, but needed in some applications. /H?kan RX> Thanks, RX> Renyi. RX> RX> ----- Original Message ----- From: "Hakan Mattsson" RX> To: "Ulf Wiger (AL/EAB)" RX> Cc: "Renyi Xiong" ; ; RX> RX> Sent: Monday, February 13, 2006 8:54 AM RX> Subject: RE: mnesia question RX> RX> RX> On Mon, 13 Feb 2006, Ulf Wiger (AL/EAB) wrote: RX> RX> UW> Renyi Xiong wrote: RX> UW> > RX> UW> > 1. what happens if one of (not all of) the RAM replicas of RX> UW> > Mnesia table fails when doing write operation? write fails? RX> UW> RX> UW> If you are using transactions, chances are good that mnesia RX> UW> will be able to follow through after all. The transaction RX> UW> is completed as an 'asymmetric' transaction, and the failed RX> UW> node gets the opportunity to update itself later. RX> RX> Yes, the transaction is completed consistently on the RX> surviving nodes. On the node(s) where Mnesia fails to RX> write, Mnesia will be terminated. When Mnesia later is RX> started on these nodes, it will pick the table contents RX> from the surviving node(s). This fundamental behavior RX> is the same for all types of transactions as well as RX> for dirty writes. RX> RX> For transactions using 3pc, the recovery procedure is RX> more complicated as the failing nodes may need to RX> determine the outcome of the transaction before the RX> transaction log can be processed. 3pc is used for RX> transactions involving updates of the schema or RX> asymmetrically replicated tables. RX> RX> UW> (Of course, assuming that the failed node is not the RX> UW> one that initiated the transaction.) RX> RX> The recovery procedure is the same, even if it was the RX> failing node that initiated the transaction. RX> RX> UW> If you're using dirty writes, you may end up with RX> UW> database inconsistency. Don't use dirty writes on RX> UW> replicated tables unless you really really know what RX> UW> you're doing. RX> RX> This is a good general advice. RX> RX> Using dirty writes on replicated tables, is about as RX> hazardous as using master nodes, using the RX> max_wait_for_decision configuration parameter or to RX> force load tables. Elaborating with these mechanisms RX> may easily end up with an inconsistent database as RX> they bypasses the transaction recovery procedure in RX> Mnesia. Sometime it is necessary to use these RX> mechanisms, but use them with care. RX> RX> /H?kan RX> RX> UW> > 2. Is Mnesia table RAM replica distributable across VPN network? RX> UW> RX> UW> If you can get Distributed Erlang to work, you will be able to RX> UW> replicate mnesia tables. Without Distributed Erlang - no replication. RX> UW> RX> UW> RX> UW> > 3. Is possible to add and remove RAM replica dynamically? RX> UW> RX> UW> Yes, using the function RX> UW> RX> UW> mnesia:add_table_copy(Tab, Node, Type) RX> UW> RX> UW> where Type == ram_copies, if it's a RAM replica you want to add. RX> UW> RX> UW> Removing a replica: RX> UW> RX> UW> mnesia:del_table_copy(Tab, Node) RX> UW> RX> UW> Regards, RX> UW> Ulf W From mickael.remond@REDACTED Tue Feb 14 10:50:02 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Tue, 14 Feb 2006 10:50:02 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <43F191ED.7080900@lundata.se> References: <43F191ED.7080900@lundata.se> Message-ID: <43F1A7CA.8030303@process-one.net> Hello Peter, Peter Lund a ?crit : > Yes, I think too that the SAE would contribute a lot in marketing Erlang > to the world. > > Many times I have wanted to send some non-erlang windows user one > zip-file containing an application and all necessary parts of erlang to > be able to run this on his computer. Very rarely I have been in a > position to tell that windows user to first download the full erlang > development environment just to run some smallish app I have developed. > To market Erlang better, I think we should like java have both a > development environment for erlang nerds and one other much simplier way > to install and run an erlang app. Some kind of packaging tool that works > for windows generating files that WinZip can unpack would be excellent. Note that you can package a minimal Erlang quite easily. This has been done to distribute Wings. We have done something similar to distribute ejabberd. The advantage of this is that the end result is not very big and you can hide the fact that the application is developed in Erlang for the user. SAE would be nice however. I remember that at some point a Windows version generating an executable (.exe) file was nearly working. -- Micka?l R?mond http://www.process-one.net/ From vlad.xx.dumitrescu@REDACTED Tue Feb 14 11:59:17 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Tue, 14 Feb 2006 11:59:17 +0100 Subject: Longstanding issues: structs & standalone Erlang Message-ID: <11498CB7D3FCB54897058DE63BE3897C01375E43@esealmw105.eemea.ericsson.se> > Note that you can package a minimal Erlang quite easily. This > has been done to distribute Wings. We have done something > similar to distribute ejabberd. Hi, Just another thought. Packaging a minimal distribution is only one part of it. There should be some simple way to strip away unneeded parts _with regard to the current application_. That is, if I happen to use snmp, include it; if not, don't. Regards, Vlad From vlad.xx.dumitrescu@REDACTED Tue Feb 14 10:08:58 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Tue, 14 Feb 2006 10:08:58 +0100 Subject: Longstanding issues: structs & standalone Erlang Message-ID: <11498CB7D3FCB54897058DE63BE3897C01375D73@esealmw105.eemea.ericsson.se> Hi, > Yes, I think too that the SAE would contribute a lot in > marketing Erlang to the world. I agree with that. OTOH, Java has the same problem. There are native code compilers, but in most cases one relies on a preinstalled JRE. And despite this, Java has already taken over the world (*just kidding*) > To market Erlang better, I think we should like java have > both a development environment for erlang nerds and one other > much simplier way to install and run an erlang app. Just like Java has JDK (50MB) and JRE (16MB). A possible issue with distributing even a greatly compressed runtime with each smallish application is that it's going to be quite a lot of deadweight anyway. Have 4-5 such smallish apps lying around and there go something like 80MB... Disk space is cheap, but not that cheap, IMHO. I would like to have something like JavaStart. An erlmerge that would be able to also download and install the runtime, if needed. Another variant would be to let code:load() access code repositories over the net. This way one could install a really minimal runtime, and libraries would be downloaded when used (code loader would of course start a background download and later use the local copy). Regards, Vlad From taavi@REDACTED Tue Feb 14 12:39:10 2006 From: taavi@REDACTED (Taavi Talvik) Date: Tue, 14 Feb 2006 13:39:10 +0200 Subject: How to join existing distributed mnesia database Message-ID: <4c02419f9e690ff1e1352a42dd7c98ef@uninet.ee> Hello! Lets say, I have created schema on app1@REDACTED, all distribution is enabled etc. Fiew tables are created. i.e. mnesia:create_schema(['app1@REDACTED']). mnesia:create_table(my_table, [{disc_copies, ['app1@REDACTED']}, {type, set}, {attributes, record_info(fields, my_table)}]), Now I want to add app2@REDACTED How can I get second system, lets say app2@REDACTED to situation where all schema and tables are fully replicated i.e. equivalent to situation, where they have worked together from beginning mnesia:create_schema(['app1@REDACTED', 'app2@REDACTED']). mnesia:create_table(my_table, [{disc_copies, ['app1@REDACTED', 'app2@REDACTED']}, {type, set}, {attributes, record_info(fields, my_table)}]), best regards, taavi From dgud@REDACTED Tue Feb 14 12:49:15 2006 From: dgud@REDACTED (Dan Gudmundsson) Date: Tue, 14 Feb 2006 12:49:15 +0100 Subject: How to join existing distributed mnesia database In-Reply-To: <4c02419f9e690ff1e1352a42dd7c98ef@uninet.ee> References: <4c02419f9e690ff1e1352a42dd7c98ef@uninet.ee> Message-ID: <17393.50107.181397.183737@rian.du.uab.ericsson.se> Without testing something like should work. On app2@REDACTED: mnesia:start(). mnesia:change_config(extra_db_nodes, [app1@REDACTED]). mnesia:change_table_copy_type(schema, node(), disc_copies). Tabs = mnesia:system_info(tables) -- [schema]. [mnesia:add_table_copy(Tab,node(), disc_copies) || Tab <- Tabs]. You should check the return values, though :-) /Dan Taavi Talvik writes: > Hello! > > Lets say, I have created schema on app1@REDACTED, > all distribution is enabled etc. Fiew tables are created. > i.e. > > mnesia:create_schema(['app1@REDACTED']). > > mnesia:create_table(my_table, > [{disc_copies, > ['app1@REDACTED']}, > {type, set}, > {attributes, > record_info(fields, my_table)}]), > > Now I want to add app2@REDACTED > > How can I get second system, lets say app2@REDACTED to situation > where all schema and tables are fully replicated > i.e. equivalent to situation, where they have worked together > from beginning > > mnesia:create_schema(['app1@REDACTED', 'app2@REDACTED']). > > mnesia:create_table(my_table, > [{disc_copies, ['app1@REDACTED', > 'app2@REDACTED']}, > {type, set}, > {attributes, > record_info(fields, my_table)}]), > > > best regards, > taavi From chandrashekhar.mullaparthi@REDACTED Tue Feb 14 13:13:46 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Tue, 14 Feb 2006 12:13:46 +0000 Subject: How to join existing distributed mnesia database In-Reply-To: <4c02419f9e690ff1e1352a42dd7c98ef@uninet.ee> References: <4c02419f9e690ff1e1352a42dd7c98ef@uninet.ee> Message-ID: On app1@REDACTED mnesia:add_table_copy(schema, app2@REDACTED, ram_copies). erl -sname app2@REDACTED mnesia:start(). mnesia:change_config(extra_db_nodes, [app1@REDACTED]). mnesia:change_table_copy_type(schema, node(), disc_copies). lists:foreach(fun(X) -> mnesia:add_table_copy(X, node(), disc_copies) end, mnesia:system_info(tables) -- [schema]). cheers Chandru On 14/02/06, Taavi Talvik wrote: > Hello! > > Lets say, I have created schema on app1@REDACTED, > all distribution is enabled etc. Fiew tables are created. > i.e. > > mnesia:create_schema(['app1@REDACTED']). > > mnesia:create_table(my_table, > [{disc_copies, > ['app1@REDACTED']}, > {type, set}, > {attributes, > record_info(fields, my_table)}]), > > Now I want to add app2@REDACTED > > How can I get second system, lets say app2@REDACTED to situation > where all schema and tables are fully replicated > i.e. equivalent to situation, where they have worked together > from beginning > > mnesia:create_schema(['app1@REDACTED', 'app2@REDACTED']). > > mnesia:create_table(my_table, > [{disc_copies, ['app1@REDACTED', > 'app2@REDACTED']}, > {type, set}, > {attributes, > record_info(fields, my_table)}]), > > > best regards, > taavi > > From daniel@REDACTED Tue Feb 14 14:15:08 2006 From: daniel@REDACTED (Daniel Luna) Date: Tue, 14 Feb 2006 14:15:08 +0100 (CET) Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C01375D73@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C01375D73@esealmw105.eemea.ericsson.se> Message-ID: On Tue, 14 Feb 2006, Vlad Dumitrescu XX (LN/EAB) wrote: >> To market Erlang better, I think we should like java have >> both a development environment for erlang nerds and one other >> much simplier way to install and run an erlang app. > > Just like Java has JDK (50MB) and JRE (16MB). A possible issue with > distributing even a greatly compressed runtime with each smallish > application is that it's going to be quite a lot of deadweight anyway. > Have 4-5 such smallish apps lying around and there go something like > 80MB... Disk space is cheap, but not that cheap, IMHO. So how small must it become to be small enough? I think that 16 MB should be easy to reach. My primary estimations puts it at about 5-10MB not including any libraries[*]. There are some solutions that would allow different programs to share parts of those MBs though. > I would like to have something like JavaStart. An erlmerge that would be > able to also download and install the runtime, if needed. > > Another variant would be to let code:load() access code repositories > over the net. This way one could install a really minimal runtime, and > libraries would be downloaded when used (code loader would of course > start a background download and later use the local copy). This is actually a nice idea. I have been toying with it before and I had some thought on how to do it (let's see if I can remember any): - Some sort of authentication (Erlang cookies are not really enough) - Version control of the libraries (which version of "this" depends on what version of "that") - Preloading of libraries (to make the most use of even a slow connection) - A way to package everything and put it on a computer without net access (smells like SAE) Bad things: You will have one copy per user instead of one copy per program. This could be worse in a multiuser environment. Different programs want to have different versions of libraries. Could get really hairy. /Luna [*] But since they are estimations I would expect them to vary around 100%. Ok, so maybe I should say 5 - 15. ps. If anyone is starting implementation of any of this, I want in. -- Daniel Luna | Current projects: daniel@REDACTED | - Consulting in Rome Yes, I'm one of those now. | - Learning Yaws www.erlang-consulting.com | - SAE From dgou@REDACTED Tue Feb 14 14:26:23 2006 From: dgou@REDACTED (Douglas Philips) Date: Tue, 14 Feb 2006 08:26:23 -0500 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C01375D73@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C01375D73@esealmw105.eemea.ericsson.se> Message-ID: <4656C392-141A-4976-9A6C-299784D022BE@mac.com> On 2006 Feb 14, at 4:08 AM, Vlad Dumitrescu XX (LN/EAB) indited: > I agree with that. OTOH, Java has the same problem. There are native > code compilers, but in most cases one relies on a preinstalled JRE. > And > despite this, Java has already taken over the world (*just kidding*) Right. Because JRE's "come with" the OS. Just as Python and Perl now often "come with" Linux and other FOSS OSes. > Just like Java has JDK (50MB) and JRE (16MB). A possible issue with > distributing even a greatly compressed runtime with each smallish > application is that it's going to be quite a lot of deadweight anyway. > Have 4-5 such smallish apps lying around and there go something like > 80MB... Disk space is cheap, but not that cheap, IMHO. Yup. > I would like to have something like JavaStart. An erlmerge that > would be > able to also download and install the runtime, if needed. I like that idea too, but with all the virus, worm, phishing, spyware, it makes me nervous to put all the eggs into this basket. > Another variant would be to let code:load() access code repositories > over the net. This way one could install a really minimal runtime, and > libraries would be downloaded when used (code loader would of course > start a background download and later use the local copy). That also sounds attractive. At least until self-updating program like Acrobat is hit with a virus. --D'gou From dgou@REDACTED Tue Feb 14 14:32:03 2006 From: dgou@REDACTED (Douglas Philips) Date: Tue, 14 Feb 2006 08:32:03 -0500 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: References: <11498CB7D3FCB54897058DE63BE3897C01375D73@esealmw105.eemea.ericsson.se> Message-ID: <260FD84E-8D64-4F7B-9BCD-9A9577CB9049@mac.com> On 2006 Feb 14, at 8:15 AM, Daniel Luna indited: > This is actually a nice idea. I have been toying with it before and > I had some thought on how to do it (let's see if I can remember any): > - Some sort of authentication (Erlang cookies are not really enough) agreed > - Version control of the libraries (which version of "this" > depends on what version of "that") This is an old problem, though not solved particularly well in most cases (COM I think ends up with a proliferation of libraries that you don't even know why or if you need them. Linux/BSD packaging systems attempt to solve this too, but I haven't seen any particularly nice solutions, though I also admit I haven't looked recently. The BSD Port system seems kind of nice) > - Preloading of libraries (to make the most use of even a slow > connection) First time start up time is a direct impact on the "out of the box" experience, and one never gets a second chance at a first impression, leading directly to: > - A way to package everything and put it on a computer without net > access > (smells like SAE) I think SAE is a nostalgic death-trap. Most modern applications are no longer one executable. Mac OS X is leading the way here, making a folder look like an application is the way to go. This while Windows is still bunding "resources" into the executable the way Mac OS used to do. ZIP files and Windows installers (which oft will download the "real app" from the web) seem to be the norm, and those are typically more than one file when its all said and done. > Bad things: > > You will have one copy per user instead of one copy per program. > This could be worse in a multiuser environment. > > Different programs want to have different versions of libraries. > Could get really hairy. Yup, but those two items tend to counter act each other... :-) > ps. If anyone is starting implementation of any of this, I want in. Me too. --D'gou From vlad_dumitrescu@REDACTED Tue Feb 14 14:42:16 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Tue, 14 Feb 2006 14:42:16 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: Message-ID: > -----Original Message----- > From: Daniel Luna [mailto:daniel@REDACTED] > This is actually a nice idea. I have been toying with it > before and I had some thought on how to do it (let's see if I > can remember any): > - Some sort of authentication (Erlang cookies are not really enough) > - Version control of the libraries (which version of "this" > depends on what version of "that") > - Preloading of libraries (to make the most use of even a slow connection) > - A way to package everything and put it on a computer > without net access (smells like SAE) What I had in mind wasn't a general repository like jungerl, but lazy access to the OTP distribution. Instead of downloading everything directly, you only take what you need. If the code is already present locally, it isn't downloaded (i.e. no updates!). If it isn't, it is only downloaded once, when first used (or if user requires it, we should have a command to do it) Security could be just a matter of checksums. SSH is an option too. Everything works just like today, only some libraries won't be present from the start. An application only needs to be pointed to the proper runtime (just like today). At a later stage, it could be possible to also update the libraries, but as you point out - that is much harder to get right. Regards, Vlad From bkhl@REDACTED Tue Feb 14 15:09:27 2006 From: bkhl@REDACTED (=?utf-8?Q?Bj=C3=B6rn_Lindstr=C3=B6m?=) Date: Tue, 14 Feb 2006 15:09:27 +0100 Subject: Longstanding issues: structs & standalone Erlang References: Message-ID: <87y80euj54.fsf@killalla.dreaming> "Vlad Dumitrescu" : > Security could be just a matter of checksums. SSH is an option too. GPG seems more to the point. That's what most Linux distributions do now, for instance apt on Debian. As for the rest, I always get suspicious when people make programming language specific package managers that tries to do what the distribution does already. To me, it's much more attractive with a system that can easily be hooked into dpkg, ports, RPM, or whatever. On that, you could build systems for turning out pre-packaged versions of the program for various platforms, including MacOS X single-file applications, Windows installers, Debian packages/repositories, or whatever. So basically, we want a build script that just picks out what it needs from Erlang/OTP and the program, puts it in a directory structure, and then lets the back-ends for the various platforms do their thing. Back-ends for .deb, RPM, MacOS X type application bundles and some sort of Windows installer program seems like a good first set of goals to me. Of course it would also need to support packing up the program separately, depending on a separate installed runtime system. -- Bj?rn Lindstr?m Student of computational linguistics, Uppsala University, Sweden From james.hague@REDACTED Tue Feb 14 15:41:58 2006 From: james.hague@REDACTED (James Hague) Date: Tue, 14 Feb 2006 08:41:58 -0600 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <260FD84E-8D64-4F7B-9BCD-9A9577CB9049@mac.com> References: <11498CB7D3FCB54897058DE63BE3897C01375D73@esealmw105.eemea.ericsson.se> <260FD84E-8D64-4F7B-9BCD-9A9577CB9049@mac.com> Message-ID: On 2/14/06, Douglas Philips wrote: > > I think SAE is a nostalgic death-trap. Most modern applications are > no longer one executable. Mac OS X is leading the way here, making a > folder look like an application is the way to go. And that's *fine*, as long as there's a well-documented way of trimming down an Erlang installation and making sure it runs in a clean way (such as not touching the registry or writing preference files under Windows). From mickael.remond@REDACTED Tue Feb 14 16:25:41 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Tue, 14 Feb 2006 16:25:41 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: References: <11498CB7D3FCB54897058DE63BE3897C01375D73@esealmw105.eemea.ericsson.se> <260FD84E-8D64-4F7B-9BCD-9A9577CB9049@mac.com> Message-ID: <43F1F675.7060905@process-one.net> James Hague a ?crit : > On 2/14/06, Douglas Philips wrote: >> I think SAE is a nostalgic death-trap. Most modern applications are >> no longer one executable. Mac OS X is leading the way here, making a >> folder look like an application is the way to go. > > And that's *fine*, as long as there's a well-documented way of > trimming down an Erlang installation and making sure it runs in a > clean way (such as not touching the registry or writing preference > files under Windows). This is something I have done for the REPOS CDROM: It is really possible to package a movable Erlang install. It is a little bit trickier on windows but it work as well. The Erlang environment on the REPOS CDROM works from the CDROM or can be copied on the hard drive and works exactly the same. -- Micka?l R?mond http://www.process-one.net/ From james.hague@REDACTED Tue Feb 14 22:33:12 2006 From: james.hague@REDACTED (James Hague) Date: Tue, 14 Feb 2006 15:33:12 -0600 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: References: Message-ID: Coincidentally, here's a note from Joel Reymont's blog, few weeks before he decided to ditch Erlang for Lisp: "I have reservations about applying Erlang to financial analysis and some readers have pointed out that my focus on fault-tolerance is overrated. I could write my translator in Erlang but would have no way to give my prospects or customers a binary for a quick demo, I would need to ask them to install the whole Erlang/OTP distribution as there's no such thing as standalone Erlang." http://wagerlabs.com/articles/2006/01/23/the-90-minute-scheme-to-c-compiler From klacke@REDACTED Tue Feb 14 23:39:31 2006 From: klacke@REDACTED (Claes Wikstrom) Date: Tue, 14 Feb 2006 23:39:31 +0100 Subject: yaws 1.58 Message-ID: <43F25C23.7060201@hyber.org> Folks, It's been a while but we have a new yaws release. Relnotes + code at http://yaws.hyber.org as usual. The relase contains some c-code which may need a bit of tweakery. pam authentication. For example I haven't even tried to compile it on Solaris ... but I'm sure somebody will . It runs on Linuxes, FreBSD and MacOs atleast. Enjoy ! /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From ryanobjc@REDACTED Wed Feb 15 03:12:49 2006 From: ryanobjc@REDACTED (Ryan Rawson) Date: Tue, 14 Feb 2006 18:12:49 -0800 Subject: mnesia disc schema nodes - how to add? Message-ID: <78568af10602141812g78261f6bjb2d6db451c8cf8e4@mail.gmail.com> Hey, I've messed about with mnesia a bunch today. It seems that mnesia needs to know the list of disc schema nodes when the schema is first created. But what if I want to add a disc schema node after the schema was created? Does it even make sense to do so? As far as I can tell there is no way - you can extend the schema onto the node, but you can only do so as a ram_copies, and you can't change the type of schema later. Finally if you just create 2 schemas and connect them, you get invalid schema cookie and your mnesia crashes. So, am I missing something? I've read the entire user's guide, and I didn't get a sense of what is the thing to do here. Thanks, -ryan From rlenglet@REDACTED Wed Feb 15 06:11:21 2006 From: rlenglet@REDACTED (Romain Lenglet) Date: Wed, 15 Feb 2006 14:11:21 +0900 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <87y80euj54.fsf@killalla.dreaming> References: <87y80euj54.fsf@killalla.dreaming> Message-ID: <200602151411.21601.rlenglet@users.forge.objectweb.org> Bj?rn Lindstr?m wrote: > As for the rest, I always get suspicious when people make > programming language specific package managers that tries to > do what the distribution does already. Exactly. And this is all too common in many languages: - Maven and JavaStart in Java, - PEAR in PHP, - RubyGems in Ruby, - Python's site-packages, ... and also in plugin-based applications, such as Eclipse or NetBeans. It seems that all those home-made specific packaging systems were created only because of the lack of a common packaging system on Windows. But they are superfluous on all Linux distributions I know of, for instance. I am running Debian, and I want to use only Debian's packaging system, not one packaging system for every language or for every application that would clutter my system with unmanageable files. > To me, it's much more attractive with a system that can easily > be hooked into dpkg, ports, RPM, or whatever. I completely agree. Packaging concerns must be left OUT of the Erlang implementation. For instance, Vlad Dumitrescu's proposal to bury packaging / installation code deep inside the implementation or Erlang is a bad idea for that reason: it would have to be patched / disabled on every platform that has a packaging system, to avoid it to interfere with the platform-managed packages. If anybody has to create a new Erlang-specific packaging system for platforms without one, please do it as an additional, optional software. > On that, you could build systems for turning out pre-packaged > versions of the program for various platforms, including MacOS > X single-file applications, Windows installers, Debian > packages/repositories, or whatever. > > So basically, we want a build script that just picks out what > it needs from Erlang/OTP and the program, puts it in a > directory structure, and then lets the back-ends for the > various platforms do their thing. Back-ends for .deb, RPM, > MacOS X type application bundles and some sort of Windows > installer program seems like a good first set of goals to me. > > Of course it would also need to support packing up the program > separately, depending on a separate installed runtime system. Having automated tools would be very nice. But an easier goal would be to define a POLICY for Erlang development, to make packaging easier. Usually, developers and packagers are different persons. The problem is for developers to make packaging easier to packagers. For instance, I propose the following rule: "Any Erlang application that uses other applications or languages (e.g. that includes C code) must use Autoconf and Automake." Then, and only then, it would be possible to automate the packaging process. The OTP design principles are a good start: they define a common directory hierarchy, etc. But they should be extended. For instance, the Release file format (.rel) should be extended to allow the declaration of optional dependencies (e.g. "sasl can be used if it is installed"), dependencies to ranges of versions (e.g. "stdlib >=1.12"), conflicts, etc. Debian's packaging system is a good source of inspiration to improve expressiveness of dependencies in release files. And to install only parts of Erlang/OTP according to the needs of specific apps, the solution on Debian is quite straightforward: we should split the "erlang" and "erlang-base" packages into one package for every app, with the right dependencies between those packages. E.g. the "os_mon-erlang" Debian package would have the following dependencies: Depends: kernel-erlang (>= 2.10), stdlib-erlang (>= 1.13) Recommends: sasl-erlang (>= 2.0) -- Romain LENGLET Pr. Chiba Shigeru Group Dept. of Mathematical and Computing Sciences Tokyo Institute of Technology From ulf@REDACTED Wed Feb 15 06:25:40 2006 From: ulf@REDACTED (Ulf Wiger) Date: Wed, 15 Feb 2006 06:25:40 +0100 Subject: mnesia disc schema nodes - how to add? In-Reply-To: <78568af10602141812g78261f6bjb2d6db451c8cf8e4@mail.gmail.com> References: <78568af10602141812g78261f6bjb2d6db451c8cf8e4@mail.gmail.com> Message-ID: Den 2006-02-15 03:12:49 skrev Ryan Rawson : > Hey, > > I've messed about with mnesia a bunch today. It seems that mnesia > needs to know the list of disc schema nodes when the schema is first > created. But what if I want to add a disc schema node after the > schema was created? Does it even make sense to do so? As far as I > can tell there is no way - you can extend the schema onto the node, > but you can only do so as a ram_copies, and you can't change the type > of schema later. Actually, you can, but this was a bit shaky before the last patch package. The answer was posted by Chandru and Dan G yesterday: http://www.erlang.org/ml-archive/erlang-questions/200602/msg00237.html http://www.erlang.org/ml-archive/erlang-questions/200602/msg00236.html The operative command is mnesia:change_table_copy_type(schema,Node, disc_copies) /Ulf W -- Ulf Wiger From dgou@REDACTED Wed Feb 15 08:19:11 2006 From: dgou@REDACTED (Douglas Philips) Date: Wed, 15 Feb 2006 02:19:11 -0500 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602151411.21601.rlenglet@users.forge.objectweb.org> References: <87y80euj54.fsf@killalla.dreaming> <200602151411.21601.rlenglet@users.forge.objectweb.org> Message-ID: <4A76174E-538A-46DD-B70A-5B534FE4E1E5@mac.com> On 2006 Feb 15, at 12:11 AM, Romain Lenglet indited: > Bj?rn Lindstr?m wrote: >> As for the rest, I always get suspicious when people make >> programming language specific package managers that tries to >> do what the distribution does already. > > Exactly. And this is all too common in many languages: > - Maven and JavaStart in Java, > - PEAR in PHP, > - RubyGems in Ruby, > - Python's site-packages, > ... > and also in plugin-based applications, such as Eclipse or > NetBeans. > > It seems that all those home-made specific packaging systems were > created only because of the lack of a common packaging system on > Windows. But they are superfluous on all Linux distributions I > know of, for instance. > > I am running Debian, and I want to use only Debian's packaging > system, not one packaging system for every language or for every > application that would clutter my system with unmanageable > files. Well, either things go down a fractured path, and those stuck with Windows continue to solve their problems, and those with package systems continue to ignore that and use their own, or a different solution is taken. Its hard not to laugh "I want to use only" ... the moral high ground is interesting, but its not clear what useful purpose it is serving here other than to say that those poor loser Windows users are screwed, lucky I'm not one of them! :-) >> To me, it's much more attractive with a system that can easily >> be hooked into dpkg, ports, RPM, or whatever. > > I completely agree. Packaging concerns must be left OUT of the > Erlang implementation. Modules are already a packing concern. I think you meant to say: the delivery and partitioning of application pieces (source, beam files, whatever) should not be part of Erlang. But it is hard not to draw the same conclusions with processes. Why should Erlang have its own process system just because Windows is too screwed up to do threads "right?" (Or Linux, or whatever). I found it interesting that you didn't mention, for example, Perl and CPAN. Of course CPAN is a huge success, so that makes it a less juicy target, eh? > For instance, Vlad Dumitrescu's proposal to bury packaging / > installation code deep inside the implementation or Erlang is a > bad idea for that reason: it would have to be patched / disabled > on every platform that has a packaging system, to avoid it to > interfere with the platform-managed packages. > > If anybody has to create a new Erlang-specific packaging system > for platforms without one, please do it as an additional, > optional software. How does that fit with multiple applications which want to have their own dependencies on specific versions of specific modules? Last i looked at RPM, that wasn't handled very well... >> On that, you could build systems for turning out pre-packaged >> versions of the program for various platforms, including MacOS >> X single-file applications, Windows installers, Debian >> packages/repositories, or whatever. >> >> So basically, we want a build script that just picks out what >> it needs from Erlang/OTP and the program, puts it in a >> directory structure, and then lets the back-ends for the >> various platforms do their thing. Back-ends for .deb, RPM, >> MacOS X type application bundles and some sort of Windows >> installer program seems like a good first set of goals to me. >> >> Of course it would also need to support packing up the program >> separately, depending on a separate installed runtime system. > > Having automated tools would be very nice. > > But an easier goal would be to define a POLICY for Erlang > development, to make packaging easier. Usually, developers and > packagers are different persons. The problem is for developers > to make packaging easier to packagers. > For instance, I propose the following rule: > "Any Erlang application that uses other applications or languages > (e.g. that includes C code) must use Autoconf and Automake." > > Then, and only then, it would be possible to automate the > packaging process. And what of bundles of other Erlang code, such as version dependencies on Erlang itself, or OTP? > The OTP design principles are a good start: they define a common > directory hierarchy, etc. But they should be extended. > For instance, the Release file format (.rel) should be extended > to allow the declaration of optional dependencies (e.g. "sasl > can be used if it is installed"), dependencies to ranges of > versions (e.g. "stdlib >=1.12"), conflicts, etc. > Debian's packaging system is a good source of inspiration to > improve expressiveness of dependencies in release files. But how does that work when another OSes native packaging doesn't have as much expressiveness? > And to install only parts of Erlang/OTP according to the needs of > specific apps, the solution on Debian is quite straightforward: > we should split the "erlang" and "erlang-base" packages into one > package for every app, with the right dependencies between those > packages. > E.g. the "os_mon-erlang" Debian package would have the following > dependencies: > Depends: kernel-erlang (>= 2.10), stdlib-erlang (>= 1.13) > Recommends: sasl-erlang (>= 2.0) Repeat immediately preceeding question. Yes, it is frustrating that Windows hasn't solved this problem. But I don't think you can say that all of the home made packaging systems are a result of that. There is a trend for many applications to "phone home" and check, on their own, to see if there is a newer version of themselves available. Some can be configured even to automatically update if there is (I'm not saying if this is good or bad, just that it is). Perhaps those applications don't do that under Linux* or *BSD simply because they really can't do so. Perhaps a bit less of the high'n'mighty Debian one true way and more of: What problems are being solved and is application deployment serving those who use the applications, or merely those who package them. My sysadmin (well, me) doesn't pay the user (me, again) to use the system, the other way around. (Sorry if this is terse, it is late in my time zone and I hope terseness isn't mistaken for a different tone.) --D'gou From lopstr06@REDACTED Tue Feb 14 20:14:12 2006 From: lopstr06@REDACTED (LOPSTR 2006) Date: Tue, 14 Feb 2006 20:14:12 +0100 Subject: LOPSTR'06 in Venice, Italy -- Call for Papers Message-ID: <200602141914.k1EJECTY012807@clip.dia.fi.upm.es> _____________________________________________________________________ CALL FOR PAPERS - LOPSTR'06 International Symposium on Logic-based Program Synthesis and Transformation JULY 12 - 14, 2006 : VENICE, ITALY http://www.dsi.unive.it/lopstr2006 _____________________________________________________________________ Co-located with * ICALP'06: Intl. Colloquium on Automata, Languages and Programming * PPDP'06: ACM Symp. on Principles & Practice of Declarative Programming * CSFW'06: IEEE Computer Security Foundations Workshop. Scope of the Symposium ---------------------- The aim of the LOPSTR series is to stimulate and promote international research and collaboration on logic-based program development. LOPSTR is open to contributions in logic-based program development in any language paradigm. LOPSTR has a reputation for being a lively, friendly forum for presenting and discussing work in progress, so it is a real workshop in the sense that it is also intended to provide useful feedback to authors on their research. Formal proceedings are produced only after the conference, so that authors can incorporate this feedback in the published papers. This year, tool demonstrations are also solicited as a separate submission category. Since 1994 the formal proceedings have been published in the LNCS series of Springer-Verlag. Previous LOPSTR events were held in London (2005, 2000), Verona (2004), Uppsala (2003), Madrid (2002), Paphos (2001), Venice (1999), Manchester (1998, 1992, 1991), Leuven (1997), Stockholm (1996), Arnhem (1995), Pisa (1994), and Louvain-la-Neuve (1993). Topics ------ Topics of interest cover all aspects of logic-based program development, all stages of the software life cycle, and issues of both programming-in-the-small and programming-in-the-large. Papers describing applications in these areas are especially welcome. The following is a non-exhaustive list of topics: * specification * synthesis * verification * transformation * specialization * analysis * optimization * composition * security * reuse * applications and tools * component-based software development * agent-based software development * software architectures * design patterns and frameworks * program refinement and logics for refinement Submission Guidelines --------------------- Both research papers and tool demonstrations are solicited. Authors can either submit extended abstracts or they can choose to submit full papers. Both work in progress and tool demonstrations must be submitted as extended abstracts. Contributions should be written in English and should present original work not concurrently submitted to other conferences or journals. Submissions should adhere to the LNCS style (see http://www.springer.de/comp/lncs/authors.html). * Full papers: should not exceed 16 pages (including references) in llncs format. These papers will be judged using standard conference quality criteria. Accepted papers will automatically appear in the pre-proceedings as well as in the formal proceedings, published in the LNCS series. The submission deadline for full papers is April 15, 2006. * Extended abstracts: should not exceed 6 pages in llncs format and may describe work in progress or tool demonstrations. Promising abstracts relevant to the scope of LOPSTR will be selected for presentation at the conference and will appear in the pre-proceedings. The submission deadline for extended abstracts is April 30, 2006. Accepted contributions have to be presented at the conference, including a live demo in the case of tool demonstrations, and will be collected in informal pre-proceedings which will be available at the conference. The formal proceedings of LOPSTR will be published in the Lecture Notes in Computer Science series by Springer-Verlag. After the conference, authors of extended abstracts describing research judged to be mature enough for possible publication in the final proceedings will be invited to submit full papers (or revised extended abstracts in the case of tool demonstrations). These submissions will be reviewed according to the usual refereeing procedures. If accepted, these contributions will be included in the formal proceedings together with the full papers submitted and accepted before the conference. Program Committee ----------------- * Slim Abdennadher * Roberto Bagnara * Gilles Barthe * John Gallagher * Robert Gl?ck * Michael Hanus * Pat Hill * Kazuhiko Kakehi * Andy King * Michael Leuschel * Fred Mesnard * German Puebla (Program Chair) * Sabina Rossi * Grigore Rosu * Wim Vanhoof * German Vidal Important dates --------------- * Submission of full papers: April 15, 2006 * Submission of extended abstracts: April 30, 2006 * Notification: May 20, 2006 * Camera-ready: June 10, 2006 * Conference: July 12-14, 2006 * Authors are asked to register with the online site and submit titles and abstracts of their intended submissions three days before the deadline, i.e., on April 12 for full papers and on April 27 for extended abstracts. From vlad.xx.dumitrescu@REDACTED Wed Feb 15 08:59:44 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Wed, 15 Feb 2006 08:59:44 +0100 Subject: Longstanding issues: structs & standalone Erlang Message-ID: <11498CB7D3FCB54897058DE63BE3897C01376069@esealmw105.eemea.ericsson.se> > -----Original Message----- > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Romain Lenglet > For instance, Vlad Dumitrescu's proposal to bury packaging / > installation code deep inside the implementation or Erlang is > a bad idea for that reason: it would have to be patched / > disabled on every platform that has a packaging system, to > avoid it to interfere with the platform-managed packages. I would like to make apoint again about my suggestion earlier, because I feel most people are mixing two different issues here. This doesn't mean that my idea can't be bad :-) but just that it feels it is misinterpreted. * One issue is general distribution of (third-party) applications and libraries, with all the versioning hell that follows. This *not* what I was referring to. * The other is distribution of Erlang releases, so that only a minimal archive has to be installed by default. What I suggested was to take a release, say R5B-4, and replace most of the library directories with a pointer to an URL where the content can be fetched from. This URL could be hardcoded, so that only official versions can be accessed. When the content is already present, it is used as-is. This means that one could just download the runtime + kernel + stdlib (more or less). The rest would follow when needed. Regards, Vlad From vlad.xx.dumitrescu@REDACTED Wed Feb 15 09:11:55 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Wed, 15 Feb 2006 09:11:55 +0100 Subject: Longstanding issues: structs & standalone Erlang Message-ID: <11498CB7D3FCB54897058DE63BE3897C0137607E@esealmw105.eemea.ericsson.se> > -----Original Message----- > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Romain Lenglet > I completely agree. Packaging concerns must be left OUT of the Erlang implementation. > [...] > And to install only parts of Erlang/OTP according to the > needs of specific apps, the solution on Debian is quite > straightforward: > we should split the "erlang" and "erlang-base" packages into > one package for every app, with the right dependencies > between those packages. > E.g. the "os_mon-erlang" Debian package would have the following > dependencies: > Depends: kernel-erlang (>= 2.10), stdlib-erlang (>= 1.13) > Recommends: sasl-erlang (>= 2.0) Could you please explain how is this to work in practice without somehow making the runtime aware of this mechanism? I don't get it. Suppose I have an app A1 that requires stdlib >= 4.13, and an app A2 that requires stdlib <= 4.12. Both of those can run with kernel >= 4.3 Now if A1 and A2 are standalone applications, it will work, because they will have separate startup scripts that will reference the correct stdlib in the code path. But if I start my Erlang node (that references stdlib 4.15) just to try things up, how would I make sure only A1 and not A2 is available, unless the runtime is aware of these dependency declarations? Regards, Vlad From ft@REDACTED Wed Feb 15 09:12:30 2006 From: ft@REDACTED (Fredrik Thulin) Date: Wed, 15 Feb 2006 09:12:30 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <4A76174E-538A-46DD-B70A-5B534FE4E1E5@mac.com> References: <200602151411.21601.rlenglet@users.forge.objectweb.org> <4A76174E-538A-46DD-B70A-5B534FE4E1E5@mac.com> Message-ID: <200602150912.31029.ft@it.su.se> On Wednesday 15 February 2006 08:19, Douglas Philips wrote: ... I was very close to jump into this thread responding to the part about Perl and CPAN, but at the last moment managed to fight that urge ;). This is not really a response directed just at you Douglas, but rather at the whole idea that the Erlang community should handle packaging of all Erlang software. I would just like to share my point of view, which is the one of a person involved in packaging software in Stockholm universitys variant of a packaging system like the BSD's ports-trees (buildit [1]). Packaging modules/whatever that usually gets installed via some other packaging system like for example CPAN is _incredibly_ difficult and frustrating. It makes it easy to install something if you have the time to log into each server where you want that something installed, and run a command or two, but it makes it waay more complicated to manage things on a larger scale. Larger scale in my case is several hundred servers and workstations at Stockholm university, but it could also be the user base of a distribution of some kind. Sure, for small installations (me and my Linux server, or me and my ten Linux servers), it is convenient to get all Erlang stuff packaged by the very same people that writes this Erlang stuff, and it is acceptable to trust them and issue a command like "install this-or-that", but this just doesn't cut it for larger installations. As a colleague of mine pointed out, it is important to keep build requirements and run-time requirements separate. I, as the developer of the Erlang application YXA, am really in the position to declare what dependencys my application has (essentially writing .rel files with verison numbers really), but firmly beleive that I should leave it to the people making a distribution to ensure that these dependencys are met at run-time! Yaws, ejabberd and YXA all install with "./configure; make; make install". That is extremely important in my opinion. /Fredrik [1] Open source, but apparently not advertised. In our subversion repository if anyone is interested. From rlenglet@REDACTED Wed Feb 15 09:43:45 2006 From: rlenglet@REDACTED (Romain Lenglet) Date: Wed, 15 Feb 2006 17:43:45 +0900 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C0137607E@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C0137607E@esealmw105.eemea.ericsson.se> Message-ID: <200602151743.45932.rlenglet@users.forge.objectweb.org> > > E.g. the "os_mon-erlang" Debian package would have the > > following dependencies: > > Depends: kernel-erlang (>= 2.10), stdlib-erlang (>= 1.13) > > Recommends: sasl-erlang (>= 2.0) > > Could you please explain how is this to work in practice > without somehow making the runtime aware of this mechanism? I > don't get it. > > Suppose I have an app A1 that requires stdlib >= 4.13, and an > app A2 that requires stdlib <= 4.12. Both of those can run > with kernel >= 4.3 > > Now if A1 and A2 are standalone applications, it will work, > because they will have separate startup scripts that will > reference the correct stdlib in the code path. > > But if I start my Erlang node (that references stdlib 4.15) > just to try things up, how would I make sure only A1 and not > A2 is available, unless the runtime is aware of these > dependency declarations? In Debian, there is only one version of every package that can be installed at one time (according to the package name). For instance, in my proposal above, only one version of stdlib and kernel can be installed at a time. So, depending on the installed version of stdlib, either A1 or A2 can be installed (not both). This can be solved by setting up a chroot, where another version of stdlib can be installed, to install the other app. Packages can be installed/deinstalled/upgraded/downgraded separately in the system and in every chroot. And the Erlang system would have no problem finding the right version of apps: only one version would be available in every chroot. In Debian, it is also allowed to put part of the version number in the package name. So we could have two packages: stdlib-4.12 and stdlib-4.13. Those could be installed simultaneously. (Although usually, only the major number is added to the package name.) The latter mechanism is usually used only when a big "jump" in functionality has happened, e.g. between libc5 and libc6. The problem is that the Erlang system cannot be able to choose the right installed version. The problem with both the standalone apps and the chroot solutions, is that some applications will be installed several times with the same version (e.g. stdlib, sasl or kernel), which wastes space. And an additional problem with the standalone solution is that it makes it difficult to upgrade included applications without upgrading the whole standalone application, which wastes bandwidth. Regards, -- Romain LENGLET From vlad.xx.dumitrescu@REDACTED Wed Feb 15 09:49:43 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Wed, 15 Feb 2006 09:49:43 +0100 Subject: Longstanding issues: structs & standalone Erlang Message-ID: <11498CB7D3FCB54897058DE63BE3897C013760B3@esealmw105.eemea.ericsson.se> Okay, thanks, now the picture is a little clearer. The main problem is still is that there is no such distribution system that is present on all OS. I guess that's why many roll out their own. This mechanism doesn't help much either if I just want to distribute a smallish binary application to my colleague, right? Or am I missing something? Regards, Vlad From ft@REDACTED Wed Feb 15 09:52:47 2006 From: ft@REDACTED (Fredrik Thulin) Date: Wed, 15 Feb 2006 09:52:47 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C0137607E@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C0137607E@esealmw105.eemea.ericsson.se> Message-ID: <200602150952.47133.ft@it.su.se> On Wednesday 15 February 2006 09:11, Vlad Dumitrescu XX (LN/EAB) wrote: ... >Suppose I have an app A1 that requires stdlib >= 4.13, and an app A2 >that requires stdlib <= 4.12. Both of those can run with kernel >= 4.3 ... > But if I start my Erlang node (that references stdlib 4.15) just to > try things up, how would I make sure only A1 and not A2 is available, > unless the runtime is aware of these dependency declarations? I'm not able to give answers as to how the Debian packaging systems would solve this problem, but I would imagine that you can't have two versions of the same package (stdlib-erlang) installed at the same time (when required, they seem to split such things up into two different packages that can co-exist under different paths). An alternative is to have a packaging system that allows you to have multiple parallell installations of something, under different prefixes. $ ls -d1 /pkg/erlang/*/lib/erlang/lib/stdlib* /pkg/erlang/R10B-6/lib/erlang/lib/stdlib-1.13.8 /pkg/erlang/R10B-9/lib/erlang/lib/stdlib-1.13.11 $ If I were to try something out, and it said it required stdlib 1.13.8, I would use the Erlang/OTP in /pkg/erlang/R10B-6/. Conflicts are conflicts. You must either resolve them by making it possible for the two different versions to co-exist, or you must choose which one you want - you can't have both installed in the same place at the same time. I might have missed something, but I don't beleive the Erlang way of specifying runtime dependencies allow you to say that you require stdlib >= 1.13.8, even though your application really would work with anything >= 1.13.8 (because that's when function 'x' was added or similar), but instead requires you to say that this particular version of the application you want to try or requires stdlib = 1.3.8, because that's the exact version the application developer has tested the application with, and therefor the only one you can be sure works. /Fredrik From vlad.xx.dumitrescu@REDACTED Wed Feb 15 10:02:48 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Wed, 15 Feb 2006 10:02:48 +0100 Subject: Longstanding issues: structs & standalone Erlang Message-ID: <11498CB7D3FCB54897058DE63BE3897C013760CF@esealmw105.eemea.ericsson.se> Hi, > -----Original Message----- > From: Fredrik Thulin [mailto:ft@REDACTED] > An alternative is to have a packaging system that allows you > to have multiple parallell installations of something, under > different prefixes. So if I understand things correctly, nothing is simpler than before :-) These beasts work with applications, but if I am using Erlang as a scripting language or from the shell, then they are of no use. If I start with just "erl", I might be very surprised that some package I just installed isn't visible or working, because the default erl isn't the one the package wants. Is this a correct assumption? Regards, Vlad From rlenglet@REDACTED Wed Feb 15 10:23:16 2006 From: rlenglet@REDACTED (Romain Lenglet) Date: Wed, 15 Feb 2006 18:23:16 +0900 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C013760B3@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C013760B3@esealmw105.eemea.ericsson.se> Message-ID: <200602151823.17052.rlenglet@users.forge.objectweb.org> > The main problem is still is that there is no such > distribution system that is present on all OS. I guess that's > why many roll out their own. > > This mechanism doesn't help much either if I just want to > distribute a smallish binary application to my colleague, > right? Or am I missing something? No, you didn't miss anything. ;-) My first point was: the solution to this problem must not be imposed, e.g. integrated in the implementation of Erlang, and must be left to external tools. My second point was: to make it easy to package an application with the widest range of external packaging tools possible, developers must still make an effort, e.g. by using GNU's autotools (as Fredrik Thulin pointed out, if it is sufficient to run ./configure ; make ; make install, then any packaging tool can be used), by following the standard OTP directory hierarchy, etc. Those "constraints" to developers should be written formally, in an "OTP packaging guidelines" document (?). I am thinking of something like these packaging guidelines for Ruby and Java, but even more precise: http://pkg-ruby-extras.alioth.debian.org/upstream-devs.html http://www.jpackage.org/request.php Once those rules are clear, it becomes easy to develop new external tools (including tools that automatically create self-contained, self-installable executables...), and to make packaging for any existing system straightforward. -- Romain LENGLET From vlad.xx.dumitrescu@REDACTED Wed Feb 15 10:25:23 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Wed, 15 Feb 2006 10:25:23 +0100 Subject: Longstanding issues: structs & standalone Erlang Message-ID: <11498CB7D3FCB54897058DE63BE3897C01376102@esealmw105.eemea.ericsson.se> > -----Original Message----- > From: Romain Lenglet [mailto:rlenglet@REDACTED] > No, you didn't miss anything. ;-) Good, I was beginning to think I have to take a vacation :-) > Once those rules are clear, it becomes easy to develop new > external tools (including tools that automatically create > self-contained, self-installable executables...), and to make > packaging for any existing system straightforward. Well, at least "easier" :-) /Vlad From ft@REDACTED Wed Feb 15 10:27:07 2006 From: ft@REDACTED (Fredrik Thulin) Date: Wed, 15 Feb 2006 10:27:07 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C013760CF@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C013760CF@esealmw105.eemea.ericsson.se> Message-ID: <200602151027.07413.ft@it.su.se> On Wednesday 15 February 2006 10:02, Vlad Dumitrescu XX (LN/EAB) wrote: ... > If I start with just "erl", I might be very surprised that some > package I just installed isn't visible or working, because the > default erl isn't the one the package wants. > > Is this a correct assumption? I don't know. It feels like we mix up my way of installing parallell versions of Erlang/OTP with the Debian way, which does not install parallell versions. In my case, an application like ejabberd, Yaws or YXA (I use all three, package all three in the same way, and have parallell versions of all three installed), would end up with the path to the 'right' version of Erlang/OTP in it's startup script. For ejabberd and Yaws, we have home-made shellscripts, but here is an example grep from YXA startup shellscript : /pkg/yxa/2004-10-10-su1/sbin/incomingproxy:erl="/pkg/erlang/R9C-0/bin/erl" /pkg/yxa/2004-11-11-su2/sbin/incomingproxy:erl="/pkg/erlang/R10B-1/bin/erl" /pkg/yxa/2005-01-05-su3/sbin/incomingproxy:erl="/pkg/erlang/R10B-2/bin/erl" ... /pkg/yxa/2005-06-22-su1/sbin/incomingproxy:erl="/pkg/erlang/R10B-6/bin/erl" /Fredrik From rrerlang@REDACTED Wed Feb 15 10:54:59 2006 From: rrerlang@REDACTED (Robert Raschke) Date: Wed, 15 Feb 2006 09:54:59 +0000 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C013760CF@esealmw105.eemea.ericsson.se> Message-ID: This discussion is very interesting and is providing me with a lot of insight into why a lot of SW producers and users like simple executables (as in, compiled to run on the metal). I have seen lots of applications written in Java that get distributed with their own private JRE because that is the only way the SW producer can reasonably guarantee ongoing support. This means that SW producers of applications written in interpreted languages (in the widest sense) do not trust the runtime systems they use (obviously there will be exceptions). I would think the main reason for this lies with the complexity of the languages involved and the sheer size of the libraries on offer. I personally do not trust any JRE distribution enough to blindly assume that the next version is going to work just fine for my app. I would assume something similar holds for new versions of the Erlang distro, but I haven't yet written a real application in Erlang. Anyway, this has veered a bit. I think that the Erlang package at the moment is great. But it is also very large. A small guide as to how the libraries are layered (core set, extensions, whole special purpose libs) would be a good start. This would allow somebody like me to feel more confident in removing parts of the library I know I will never need. Robby From gordonguthrie@REDACTED Wed Feb 15 11:52:36 2006 From: gordonguthrie@REDACTED (Gordon Guthrie) Date: Wed, 15 Feb 2006 10:52:36 +0000 Subject: AJAX and Yaws (late followup) Message-ID: <1140000756.43f307f4aedda@backawinner.gg> Folks This e-mail is a (very) late follow up to this thread... http://www.erlang.org/ml-archive/erlang-questions/200601/msg00296.html Yahoo has just open sourced (BSD license) a complete set of AJAX design patterns in javascript... http://developer.yahoo.net/ypatterns/index.php Looks well designed and comprehensive to me and would make for lovely AJAX development in Erlang. Gordon ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From camster@REDACTED Wed Feb 15 13:10:41 2006 From: camster@REDACTED (Richard Cameron) Date: Wed, 15 Feb 2006 12:10:41 +0000 Subject: AJAX and Yaws (late followup) In-Reply-To: <1140000756.43f307f4aedda@backawinner.gg> References: <1140000756.43f307f4aedda@backawinner.gg> Message-ID: <77DDC453-354E-4FA4-95E4-9F7A31070EC0@citeulike.org> On 15 Feb 2006, at 10:52, Gordon Guthrie wrote: > Yahoo has just open sourced (BSD license) a complete set of AJAX > design > patterns in javascript... > > http://developer.yahoo.net/ypatterns/index.php There's also the "UI Library" released at the same time: It's a bunch of javascript code which abstracts away some of the more painful browser-specific stuff into an "API". What looks of particular interest is the "event utility" library . For "javascript event" you could read "erlang message" if you plugged it into something like Chris Double's server push code . At some point I've got to produce a little GUI tool to monitor an internal application (it seems not everyone loves my approach of having an erlang shell as the "control panel") and I'm quite tempted to try to use something like this to push out status events rather than trying to do it in gs. Richard. From lenglet@REDACTED Wed Feb 15 11:07:12 2006 From: lenglet@REDACTED (Romain Lenglet) Date: Wed, 15 Feb 2006 19:07:12 +0900 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C013760CF@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C013760CF@esealmw105.eemea.ericsson.se> Message-ID: <200602151907.13216.lenglet@csg.is.titech.ac.jp> > > An alternative is to have a packaging system that allows you > > to have multiple parallell installations of something, under > > different prefixes. > > So if I understand things correctly, nothing is simpler than > before :-) > > These beasts work with applications, but if I am using Erlang > as a scripting language or from the shell, then they are of no > use. > > If I start with just "erl", I might be very surprised that > some package I just installed isn't visible or working, > because the default erl isn't the one the package wants. Anyway, the general problem of installation of multiple versions of a package (the "DLL Hell") is difficult. Nobody really has a solution. Only Microsoft has introduced versions in DLLs / assemblies, i.e. dependencies are explicitly to specific versions of DLLs: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/dplywithnet.asp The equivalent solution in Erlang would be to always specify the version of a module when using it, and to modify the runtime accordingly, e.g.: {io, '2.1'}:format("hello~n", []). Problem are: 1) that looks ugly in Erlang, 2) module versions are optional, 3) modules are not a unit of installation / configuration (applications are such units, and it is their versions that are important), 4) how to do dynamic code updates? In Linux distributions, simultaneous installation of different versions of a package is not allowed. And when this is absolutely necessary, e.g. for libc5 and libc6, then the version number is added to the package name and to installed files. An equivalent solution in Erlang would be to add version numbers into module names, e.g.: 'io-2.1':format("hello~n", []). Ugly, isn't it? Acceptable solutions to the multiple-versions-problem are: 1) chroots on Linux / BSD / anything with a package system, 2) self-contained, self-installable applications on other platforms. But I think that this specific problem of multiple versions only rarely occurs (?), so we should not focus on it. -- Romain LENGLET From bengt.kleberg@REDACTED Wed Feb 15 14:24:45 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Wed, 15 Feb 2006 14:24:45 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602150912.31029.ft@it.su.se> References: <200602151411.21601.rlenglet@users.forge.objectweb.org> <4A76174E-538A-46DD-B70A-5B534FE4E1E5@mac.com> <200602150912.31029.ft@it.su.se> Message-ID: <43F32B9D.8020000@ericsson.com> On 2006-02-15 09:12, Fredrik Thulin wrote: ...deleted > Yaws, ejabberd and YXA all install with "./configure; make; make > install". That is extremely important in my opinion. surely you mean that they do so on supported operating systems only? i usually have problems with: 1 ''./configure''. it does not find a compiler on mac-osx (i do not have xcode installed). 2 ''make''. it crashes on solaris (makefiles are ususally written for gnumake, not ''standard make''). both these problems would be avoidable if the installation used erlang. bengt From thomasl_erlang@REDACTED Wed Feb 15 15:50:04 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Wed, 15 Feb 2006 06:50:04 -0800 (PST) Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602151907.13216.lenglet@csg.is.titech.ac.jp> Message-ID: <20060215145004.58802.qmail@web34408.mail.mud.yahoo.com> --- Romain Lenglet wrote: > The equivalent solution in Erlang would be to always > specify the > version of a module when using it, and to modify the > runtime > accordingly, e.g.: > {io, '2.1'}:format("hello~n", []). > Problem are: 1) that looks ugly in Erlang, 2) module > versions are > optional, 3) modules are not a unit of installation > / > configuration (applications are such units, and it > is their > versions that are important), 4) how to do dynamic > code updates? If Erlang had an explicit notion of linking, it might work, e.g., by specifying somewhere that 'io' actually refers to module io with -vsn("2.1"). and that the code of io:format is the function found in the code object named (io, "2.1"). Calls to apply/3 would have to use a runtime association mapping atoms to actual modules. Code change could perhaps be done by explicit relinking, etc, (While Erlang's code change model is a pretty good local optimum, it doesn't seem to generalize very far beyond that point.) But I think this needs a bit more thought. Also, note that in practice, modules actually _are_ a unit of installation. Some projects or companies don't use applications or releases; other projects install smaller patches by loading new modules. (At this time, I have actually worked in more Erlang companies that _don't_ use fullblown OTP than such that do :-) Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From ft@REDACTED Wed Feb 15 16:36:36 2006 From: ft@REDACTED (Fredrik Thulin) Date: Wed, 15 Feb 2006 16:36:36 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <43F32B9D.8020000@ericsson.com> References: <200602150912.31029.ft@it.su.se> <43F32B9D.8020000@ericsson.com> Message-ID: <200602151636.36709.ft@it.su.se> On Wednesday 15 February 2006 14:24, Bengt Kleberg wrote: > On 2006-02-15 09:12, Fredrik Thulin wrote: > ...deleted > > > Yaws, ejabberd and YXA all install with "./configure; make; make > > install". That is extremely important in my opinion. > > surely you mean that they do so on supported operating systems only? > i usually have problems with: > 1 ''./configure''. it does not find a compiler on mac-osx (i do not > have xcode installed). There are obviosuly a bunch of prerequisites to compiling stuff, the first being to have a computer at all, and then somewhere along the road you end up with having to have a compiler installed. Anyway, compiling C stuff was not really what I thought we were discussing... > 2 ''make''. it crashes on solaris (makefiles are ususally written for > gnumake, not ''standard make''). Prerequisites again. GNU make is 'make' for me, in my packaging environment. We build GNU make as part of the bootstrap process. However, I know for a fact that at least one of the three mentioned applications can be built with BSD make too ;) > both these problems would be avoidable if the installation used > erlang. If you were in fact talking about a _C_ compiler (as opposed to 'erlc'), then how would using Erlang for the installation work without having xcode installed on mac-osx? /Fredrik From cyberdanx@REDACTED Wed Feb 15 18:48:08 2006 From: cyberdanx@REDACTED (Chris Campbell) Date: Wed, 15 Feb 2006 17:48:08 +0000 Subject: Threading state in erlang Message-ID: Hi, State is a pain, ain't it? What's the best way to deal with this pest in the following problem? I'm trying to write some good stream handling stuff to make parsing requests via TCP easier. In the program we have SMod which provides the basic stream operations for some type of stream. This can be a binary, tcp or anything that will support the interface. For tcp I have to thread the state, since the stream works roughly as follows. peek(#tcp_stream{socket=Socket, bytestream=Stream}=State, NumBytes) -> if size(Stream) >= NumBytes -> {Result, _Rest} = split(Stream, NumBytes), {ok, State, Result, NumBytes}; true -> case tcp_gen:recv(Socket, 0) of {ok, Bin} -> NewSt=#tcp_stream{socket=Socket, list_to_binary([Stream, Bin])}, peek(NewSt, NumBytes); {error, closed} -> {ok, State, Stream, size(Stream)} end end. I've written some code that does matching on general streams, match(SMod, Stream, Pattern) -> case SMod:peek_bytes(Stream, size(Pattern)) of {ok, NS, Pattern, size(Pattern)} -> {ok, T} = SMod:gobble_bytes(NS, size(Pattern)), {ok, T}; {ok, NS, _X, _Y} -> {nomatch, NS}; Other -> Other end. The stream state is threaded through like this, sometimes unnecessarily. case match(SMod, Stream, <<"SEARCH">>) of {ok, NS} -> parse_search_req(SMod, NS); {nomatch, NS} -> check_another(SMod, NS)... end. How can I avoid threading the state all over the place? Cheers, Chris Campbell From klacke@REDACTED Wed Feb 15 21:01:54 2006 From: klacke@REDACTED (Claes Wikstrom) Date: Wed, 15 Feb 2006 21:01:54 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602151636.36709.ft@it.su.se> References: <200602150912.31029.ft@it.su.se> <43F32B9D.8020000@ericsson.com> <200602151636.36709.ft@it.su.se> Message-ID: <43F388B2.9090501@hyber.org> Fredrik Thulin wrote: > On Wednesday 15 February 2006 14:24, Bengt Kleberg wrote: > >>On 2006-02-15 09:12, Fredrik Thulin wrote: >>...deleted Lots of opinions, I agree with Fredrik and Roman. Wouldn't the following pretty much solve the situation assuming that the Fredrik route is choosen. 1. Strip down OTP and make a base package consisting or erts, compiler, stdlib and kernel. 2. Take all other libs and make them standalone tarballs with their own configue, make, make install Makefiles 3. Establish rules, which are best practice on how to install erlang libs outside the base package. All libs in (2) should follow those rules. Not a lot of work at all. Actually for the OTP crew quite a bit of less work .. in the not so long run. From there on it's just up to the deb,rpm,emerge, ports packagers to to their normal stuff with libs from (2) _and_ here's the main point, with external libs as well such as Yaws or stuff from jungerl. We want to encourage this. .. right ? Easy. The whole idea of having multiple libs with multiple versions installed at the same time is mostly orthogonal to this. Besides, who wants that ? And those who want it, typically build their own sw around sw-upgrades to aid the process. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From taavi@REDACTED Wed Feb 15 21:16:52 2006 From: taavi@REDACTED (Taavi Talvik) Date: Wed, 15 Feb 2006 22:16:52 +0200 Subject: Forcing mnesia nodes to reconnect and reload inconsistent tables? Message-ID: Hello ! Is there any other way besides application restart for achieving database consistency after communication failure between two nodes. On slave node I have set mnesia:set_master_nodes(['host1@REDACTED']). Howerver, according to mnesia:info() both nodes still we each other as down. On "master" i got. =ERROR REPORT==== 15-Feb-2006::16:49:35 === Mnesia('dhcp@REDACTED'): ** ERROR ** mnesia_event got {inconsistent_database, running_partitioned_network, 'dhcp@REDACTED'} Basicly all tables on slave node can be reloaded from master, when communication is restored. net_adm:ping() works. best regards, taavi From ulf@REDACTED Wed Feb 15 23:06:20 2006 From: ulf@REDACTED (Ulf Wiger) Date: Wed, 15 Feb 2006 23:06:20 +0100 Subject: mnesia disc schema nodes - how to add? In-Reply-To: <78568af10602150208hd39c0cavb7265d810db0a9c0@mail.gmail.com> References: <78568af10602141812g78261f6bjb2d6db451c8cf8e4@mail.gmail.com> <78568af10602150208hd39c0cavb7265d810db0a9c0@mail.gmail.com> Message-ID: Den 2006-02-15 11:08:04 skrev Ryan Rawson : > Ah yes, brilliant. I missed the original posting, which was in my > mailbox :-) > > On a side note, how large have people pushed mnesia to? I'm doing > some enterprise work with erlang, and it's all about large data sets > and speed. Two topics which seem perfect for erlang. I had some fun with 64-bit Erlang and a SPARC with 16 GB of RAM back in November: http://www.erlang.org/ml-archive/erlang-questions/200511/msg00118.html /Ulf W -- Ulf Wiger From cyberdanx@REDACTED Thu Feb 16 01:04:38 2006 From: cyberdanx@REDACTED (Chris Campbell) Date: Thu, 16 Feb 2006 00:04:38 +0000 Subject: Threading state in erlang In-Reply-To: References: Message-ID: Doh! I'm a complete eejit! Use a *process* to manage the stream. Thanks to the person that pointed that out. Chris From dgou@REDACTED Thu Feb 16 01:12:59 2006 From: dgou@REDACTED (Douglas Philips) Date: Wed, 15 Feb 2006 19:12:59 -0500 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602150912.31029.ft@it.su.se> References: <200602151411.21601.rlenglet@users.forge.objectweb.org> <4A76174E-538A-46DD-B70A-5B534FE4E1E5@mac.com> <200602150912.31029.ft@it.su.se> Message-ID: On 2006 Feb 15, at 3:12 AM, Fredrik Thulin indited: > On Wednesday 15 February 2006 08:19, Douglas Philips wrote: > ... > Packaging modules/whatever that usually gets installed via some other > packaging system like for example CPAN is _incredibly_ difficult and > frustrating. It makes it easy to install something if you have the > time > to log into each server where you want that something installed, and > run a command or two, but it makes it waay more complicated to manage > things on a larger scale. I don't see how you can avoid that, since you have to run the packaging install commands on each machine, right? Or you can image/ghost one machine and unghost it n-hundred times with some customization (name, IP address, whatever)... Once you have to visit each machine to install some software, you can easily have a script that you scp in and execute. > Yaws, ejabberd and YXA all install with "./configure; make; make > install". That is extremely important in my opinion. I'm not seeing this distinction, between running your three commands everywhere or running some CPAN/E(rlang)PAN commands, or whatever. > /Fredrik > > [1] Open source, but apparently not advertised. In our subversion > repository if anyone is interested. Yes, googling "Stockholm buildIt" (without the quotes of course) didn't find it. A few years ago I worked at IBM and developed a tool (in Perl) that could produce native OS packaging for Solaris, AIX, HPUX, Linux (RedHat and SuSE). We also used it to semi-automatically feed a Windows NT table driven installer. So I know just how similar "all them unix" systems really are (or were). And what a pain it is when you have third party dependencies, and updates to same, and updates/ patches to the OS (oh, threads, sockets, etc. need OS patches, and what not), so I am very curious to see what buildIt does! --D'gou From dgou@REDACTED Thu Feb 16 01:16:44 2006 From: dgou@REDACTED (Douglas Philips) Date: Wed, 15 Feb 2006 19:16:44 -0500 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <6D77257F-3D0A-45EB-B5B6-C916F0B20BDD@mac.com> References: <11498CB7D3FCB54897058DE63BE3897C013760CF@esealmw105.eemea.ericsson.se> <200602151907.13216.lenglet@csg.is.titech.ac.jp> <6D77257F-3D0A-45EB-B5B6-C916F0B20BDD@mac.com> Message-ID: <550B109C-D9C9-4384-A61D-7DC83A9F263F@mac.com> > On 2006 Feb 15, at 5:07 AM, Romain Lenglet indited: > But I think that this specific problem of multiple versions only > rarely occurs (?), so we should not focus on it. Not so rare, actually. Anyone who ships Java solutions has been through that hell. Esp. when one companies software "Needs" a specific version, yours needs another, and there can be "only one" installed in the systems normal/default location. Worse when one system patch is needed for one package, but breaks another. If this isn't a problem with Erlang, it is not because Erlang is immune, it is because Erlang is not popular enough to have that many developers working on enough projects/products... OTOH, the more time goes by before Erlang is that popular, the more (I hope) options there will be to solve this problem. --D'gou From klacke@REDACTED Thu Feb 16 01:38:31 2006 From: klacke@REDACTED (Claes Wikstrom) Date: Thu, 16 Feb 2006 01:38:31 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <550B109C-D9C9-4384-A61D-7DC83A9F263F@mac.com> References: <11498CB7D3FCB54897058DE63BE3897C013760CF@esealmw105.eemea.ericsson.se> <200602151907.13216.lenglet@csg.is.titech.ac.jp> <6D77257F-3D0A-45EB-B5B6-C916F0B20BDD@mac.com> <550B109C-D9C9-4384-A61D-7DC83A9F263F@mac.com> Message-ID: <43F3C987.7060001@hyber.org> Douglas Philips wrote: > >> On 2006 Feb 15, at 5:07 AM, Romain Lenglet indited: >> But I think that this specific problem of multiple versions only >> rarely occurs (?), so we should not focus on it. > > > Not so rare, Would be rare with erlang, OTP crew has run an extremely conservatibe backwards compat policy over the years. Very good. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From ok@REDACTED Thu Feb 16 04:04:17 2006 From: ok@REDACTED (Richard A. O'Keefe) Date: Thu, 16 Feb 2006 16:04:17 +1300 (NZDT) Subject: Longstanding issues: structs & standalone Erlang Message-ID: <200602160304.k1G34H1e005636@atlas.otago.ac.nz> Robert Raschke wrote: Anyway, this has veered a bit. I think that the Erlang package at the moment is great. But it is also very large. I'm not running the current release of Erlang/OTP. The one I have contains 1707 *.beam files, for a total of about 29MB of beam file content (ignoring i-node space and wasted space in blocks). gzip just brings that down to 21MB, but I am sure that a tailored compression scheme could do much better. There are 1675 *.[ehy]rl files, for a total of about 23 MB of source code (including white space and comments). After stripping out comments and compressing runs of white space to single characters, that's just 15MB of source code. (So stripped source code is *smaller* than compressed .beam files...) Stripping and then compressing with gzip -9 reduces the size to just 2.5MB, which is hard to believe, but the result does uncompress to something plausible. Clearly it's saving a fair bit across file boundaries. For some files, that's not fair; on the other hand, if you are installing one part of Mnesia, you probably want them all, so it's actually entirely fair for quite a lot of the files. Anyway, we have a definite result here: all of the Erlang source files in a release with 29MB of beam stuff could be delivered in a single 2.5MB file, which is not _that_ big. It's rather smaller than the emulator binary, for example. This introduces the idea of a single executable which contains a suitable compressed form ("slim binary") of all the library sources inside itself (without growing much bigger!) and installs the .beam files as needed. This strikes me as crazy, but the numbers suggest that it might be crazy enough to work. From rpettit@REDACTED Thu Feb 16 06:36:32 2006 From: rpettit@REDACTED (Rick Pettit) Date: Wed, 15 Feb 2006 23:36:32 -0600 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <550B109C-D9C9-4384-A61D-7DC83A9F263F@mac.com> References: <11498CB7D3FCB54897058DE63BE3897C013760CF@esealmw105.eemea.ericsson.se> <200602151907.13216.lenglet@csg.is.titech.ac.jp> <6D77257F-3D0A-45EB-B5B6-C916F0B20BDD@mac.com> <550B109C-D9C9-4384-A61D-7DC83A9F263F@mac.com> Message-ID: <20060216053632.GB31944@vailsys.com> On Wed, Feb 15, 2006 at 07:16:44PM -0500, Douglas Philips wrote: > > >On 2006 Feb 15, at 5:07 AM, Romain Lenglet indited: > >But I think that this specific problem of multiple versions only > >rarely occurs (?), so we should not focus on it. > > Not so rare, actually. Anyone who ships Java solutions has been > through that hell. > Esp. when one companies software "Needs" a specific version, yours > needs another, and there can be "only one" installed in the systems > normal/default location. Worse when one system patch is needed for > one package, but breaks another. > > If this isn't a problem with Erlang, it is not because Erlang is > immune, it is because Erlang is not popular enough to have that many > developers working on enough projects/products... > > OTOH, the more time goes by before Erlang is that popular, the more > (I hope) options there will be to solve this problem. Well, there's always this option: http://www.netbsd.org/Documentation/software/packages.html "The NetBSD Packages Collection (pkgsrc) is a framework for building third-party software on NetBSD and other UNIX-like systems, currently containing over 5500 packages. It is used to enable freely available software to be configured and built easily on supported platforms." Here's a snippet from the "Why Pkgsrc?" page: Why pkgsrc? pkgsrc provides the following key features: * Easy building of software from source as well as the creation and installation of binary packages. The source and latest patches are retrieved from a master or mirror download site, checksum verified, then built on your system. Support for binary-only distributions is available for both native platforms and NetBSD emulated platforms. * All packages are installed in a consistent directory tree, including binaries, libraries, man pages and other documentation. * Package dependencies, including when performing package updates, are handled automatically. The configuration files of various packages are handled automatically during updates, so local changes are preserved. * Like NetBSD, pkgsrc is designed with portability in mind and consists of highly portable code. This allows the greatest speed of development when porting to new a platform. This portability also ensures that pkgsrc is consistent across all platforms. * The installation prefix, acceptable software licenses, international encryption requirements and build-time options for a large number of packages are all set in a simple, central configuration file. * The entire source (not including the distribution files) is freely available under a BSD license, so you may extend and adapt pkgsrc to your needs. Support for local packages and patches is available right out of the box, so you can configure it specifically for your environment. As for installing multiple versions of the same library, this is no problem. I haven't personally played much with "package views" (probably the "preferred" way to do this using NetBSD Pkgsrc): http://www.netbsd.org/Documentation/pkgsrc/faq.html#pkgviews-docs but I have played with package naming conventions, etc, in order to allow for the installation of multiple OTP libraries. I don't mean to beat a dead horse (I've posted about pkgsrc on this list before), but I do feel compelled to remind people about it every time this subject comes up. Check it out and see if it fits your needs. -Rick From vlad_dumitrescu@REDACTED Thu Feb 16 07:40:37 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Thu, 16 Feb 2006 07:40:37 +0100 Subject: Longstanding issues: structs & standalone Erlang References: <200602160304.k1G34H1e005636@atlas.otago.ac.nz> Message-ID: ----- Original Message ----- From: "Richard A. O'Keefe" > (So stripped source code is *smaller* than compressed .beam files...) Hi Richard, Depending on which release you are using, this might be an effect of the beam files being compiled with debug_info, which makes them in effect include the parsed source. regards, Vlad From dgud@REDACTED Thu Feb 16 08:19:23 2006 From: dgud@REDACTED (Dan Gudmundsson) Date: Thu, 16 Feb 2006 08:19:23 +0100 Subject: Forcing mnesia nodes to reconnect and reload inconsistent tables? In-Reply-To: References: Message-ID: <17396.10107.964874.84288@rian.du.uab.ericsson.se> Taavi Talvik writes: > Hello ! > > Is there any other way besides application restart for achieving > database consistency after communication failure between > two nodes. Nope you will have to restart atleast one node. /Dan From ft@REDACTED Thu Feb 16 09:04:44 2006 From: ft@REDACTED (Fredrik Thulin) Date: Thu, 16 Feb 2006 09:04:44 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: References: <200602150912.31029.ft@it.su.se> Message-ID: <200602160904.44192.ft@it.su.se> On Thursday 16 February 2006 01:12, Douglas Philips wrote: > On 2006 Feb 15, at 3:12 AM, Fredrik Thulin indited: > > On Wednesday 15 February 2006 08:19, Douglas Philips wrote: > > ... > > Packaging modules/whatever that usually gets installed via some > > other packaging system like for example CPAN is _incredibly_ > > difficult and frustrating. It makes it easy to install something if > > you have the time > > to log into each server where you want that something installed, > > and run a command or two, but it makes it waay more complicated to > > manage things on a larger scale. > > I don't see how you can avoid that, since you have to run the > packaging install commands on each machine, right? Well, no. It is all about _not_ having to log in to each machine. Either you can have something like cron-jobs that fetches all packages you want installed from somewhere, and installs them, or you effectively execute them from the same set of binaries made available via some kind of networked file system. This is what we do - we use AFS. In both these cases, the common part of the problem is the packaging. You need to distribute binaries, or instructions about how to generate binaries in some way. It is impractical to have to have one way to do this for regular programs (like KDE, the Erlang/OTP installation, your other favourite applications) and for programs that install "inside" any of the others (like CPAN for Perl, or some Erlang way to install Erlang applications). I am guessing now, but I think lots of people in the Erlang developer community more or less only care about the Erlang part of this problem, whilst I want to be able to install Erlang applications in the same way that I am already installing all the _other_ applications that I (really 'we' at Stockholm university) care about. I'm sure this is also important to all the UNIX distributions, which package perhaps 4000 UNIX applications (amongst which Erlang/OTP is one) in a shell/makefile based way already. So if we want our Erlang applications to be available to Erlang-users, then an Erlang-way to install those applications is the right way. If we want our Erlang applications to be available to everyone, then a more standard way of installing things is the way to go. I firmly beleive that this standard way for UNIX systems is "./configure && make && make install", and for Windows it's a single file executable installer. ... > > [1] Open source, but apparently not advertised. In our subversion > > repository if anyone is interested. > > Yes, googling "Stockholm buildIt" (without the quotes of course) > didn't find it. ... > what not), so I am very curious to see what buildIt does! The anonymous subversion repo is at svn://anonsvn.it.su.se/buildit/. $ svn co svn://anonsvn.it.su.se/buildit/ buildit $ cd buildit $ ./setup.sh $ ./pkg_do erlang R10B-9 /Fredrik From bkhl@REDACTED Thu Feb 16 00:02:40 2006 From: bkhl@REDACTED (=?utf-8?Q?Bj=C3=B6rn_Lindstr=C3=B6m?=) Date: Thu, 16 Feb 2006 00:02:40 +0100 Subject: Longstanding issues: structs & standalone Erlang References: <200602150912.31029.ft@it.su.se> <43F32B9D.8020000@ericsson.com> <200602151636.36709.ft@it.su.se> <43F388B2.9090501@hyber.org> Message-ID: <873bikmdin.fsf@killalla.dreaming> Claes Wikstrom : > From there on it's just up to the deb,rpm,emerge, ports > packagers to to their normal stuff with libs from (2) > _and_ here's the main point, with external libs as well > such as Yaws or stuff from jungerl. We want to > encourage this. .. right ? Me too. > The whole idea of having multiple libs with multiple versions > installed at the same time is mostly orthogonal to this. Besides, > who wants that ? And those who want it, typically build their own > sw around sw-upgrades to aid the process. I don't agree that this is tricky or orthogonal to anything said here. Just look at how most Linux/BSD systems handle gcc. You have separate directories for the libraries, and then links in the bin directories to the executables. The default one is just called 'gcc', the others 'gcc-3.4' and so forth. As long as it's easy to install Erlang this way using the configuration scripts, making packages for different versions of Erlang will not be that hard. -- Bj?rn Lindstr?m Student of computational linguistics, Uppsala University, Sweden From lenglet@REDACTED Thu Feb 16 04:49:52 2006 From: lenglet@REDACTED (Romain Lenglet) Date: Thu, 16 Feb 2006 12:49:52 +0900 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: References: <200602150912.31029.ft@it.su.se> Message-ID: <200602161249.52670.lenglet@csg.is.titech.ac.jp> Douglas Philips wrote: > On 2006 Feb 15, at 3:12 AM, Fredrik Thulin indited: > > On Wednesday 15 February 2006 08:19, Douglas Philips wrote: > > ... > > Packaging modules/whatever that usually gets installed via > > some other packaging system like for example CPAN is > > _incredibly_ difficult and frustrating. It makes it easy to > > install something if you have the time > > to log into each server where you want that something > > installed, and run a command or two, but it makes it waay > > more complicated to manage things on a larger scale. > > I don't see how you can avoid that, since you have to run the > packaging install commands on each machine, right? > Or you can image/ghost one machine and unghost it n-hundred > times with some customization (name, IP address, whatever)... > Once you have to visit each machine to install some software, > you can easily have a script that you scp in and execute. On Debian (sorry, I am very Debian-centric... ;-)), Full Automatic Install, combined with cfengine (which is not Debian-specific), is a good solution that does not require to "visit" each machine explicitly to install software. There is no need to interact with a system, locally or remotely, to install the system from bare metal, and additional software. But this requires to have packages for every software to install. -- Romain LENGLET Pr. Chiba Shigeru Group Dept. of Mathematical and Computing Sciences Tokyo Institute of Technology From marcin@REDACTED Thu Feb 16 09:54:39 2006 From: marcin@REDACTED (Marcin Kuczera) Date: Thu, 16 Feb 2006 13:54:39 +0500 Subject: how to list databases ? Message-ID: <001a01c632d6$a027f080$2d64250a@marcinek> hello, I am trying to get a databases list and list of keys. What I mean is, I have a command: mnesia:read({Db, DBKey}).my node is Ericsson's SGSN 5.5I want to get measurement counters which are probably kept in mnesia,but I have no idea what kind of Db and DBKey's values.Is there any method to list them ?Marcin From bengt.kleberg@REDACTED Thu Feb 16 12:12:45 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Thu, 16 Feb 2006 12:12:45 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: References: Message-ID: <43F45E2D.4040707@ericsson.com> On 2006-02-13 20:10, James Hague wrote: ...deleted > Part of me wants to say that Erlang is stagnating too much, that i think you are correct. imho, one way forward would be the new standard libraries as suggested by richard carlsson. bengt From dgou@REDACTED Thu Feb 16 16:17:23 2006 From: dgou@REDACTED (Douglas Philips) Date: Thu, 16 Feb 2006 10:17:23 -0500 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602160904.44192.ft@it.su.se> References: <200602150912.31029.ft@it.su.se> <200602160904.44192.ft@it.su.se> Message-ID: <8B870390-CA4D-4CBF-81FC-95A8F494E7E6@mac.com> On 2006 Feb 16, at 3:04 AM, Fredrik Thulin indited: > On Thursday 16 February 2006 01:12, Douglas Philips wrote: >> On 2006 Feb 15, at 3:12 AM, Fredrik Thulin indited: >> I don't see how you can avoid that, since you have to run the >> packaging install commands on each machine, right? > > Well, no. It is all about _not_ having to log in to each machine. > Either > you can have something like cron-jobs that fetches all packages you > want installed from somewhere, and installs them, or you effectively > execute them from the same set of binaries made available via some > kind > of networked file system. This is what we do - we use AFS. Yes, I know. AFS was created at CMU. Heh. And I never said you had to log in to each machine, just that the packaging install commands had to run on each machine. As long as the installation process does not require interaction with a human, it can be automated and handled with a cron job. That doesn't require (though it would be nice if it used) the native OS packaging. > In both these cases, the common part of the problem is the packaging. > You need to distribute binaries, or instructions about how to generate > binaries in some way. It is impractical to have to have one way to do > this for regular programs (like KDE, the Erlang/OTP installation, your > other favourite applications) and for programs that install "inside" > any of the others (like CPAN for Perl, or some Erlang way to install > Erlang applications). You almost had me there. There is no reason why the "inside Erlang way" couldn't in fact call out to the underlying OSes facility. But it is worse than that, because usually installing new software requires special priveleges (root, Administrator, etc.) and that is not likely to be available when some user wants to have a new Erlang module/application installed RIGHT NOW. Part of the problem is that there is no concept widely promulgated for seperating the OS's packages from the users. > I am guessing now, but I think lots of people in the Erlang developer > community more or less only care about the Erlang part of this > problem, > whilst I want to be able to install Erlang applications in the same > way > that I am already installing all the _other_ applications that I > (really 'we' at Stockholm university) care about. I'm sure this is > also > important to all the UNIX distributions, which package perhaps 4000 > UNIX applications (amongst which Erlang/OTP is one) in a shell/ > makefile > based way already. Again with the ignoring Windows. Look, I am not unsympathetic to ignoring windows, but I think that would disparage a significant number of actual Erlang developers. > So if we want our Erlang applications to be available to Erlang-users, > then an Erlang-way to install those applications is the right way. If > we want our Erlang applications to be available to everyone, then a > more standard way of installing things is the way to go. I firmly > beleive that this standard way for UNIX systems is "./configure && > make > && make install", and for Windows it's a single file executable > installer. I don't see why we have to choose between the two. Nor do I see why we have to do that makes the same solution impractical on Windows. > The anonymous subversion repo is at svn://anonsvn.it.su.se/buildit/. Thanks! --D'gou From ulf.wiger@REDACTED Thu Feb 16 16:32:38 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 16 Feb 2006 16:32:38 +0100 Subject: felix.sf.net Message-ID: I just stumbled across felix (http://felix.sf.net). It looks quite nice, what with good code generation to C++, lexing and parsing generator support and automatic memory management. Anyone else looked at it? Regards, Ulf W From james.hague@REDACTED Thu Feb 16 17:03:39 2006 From: james.hague@REDACTED (James Hague) Date: Thu, 16 Feb 2006 10:03:39 -0600 Subject: Erlang standard library quirks In-Reply-To: References: Message-ID: One more: lists:keysearch returns "{value, Tuple} | false" instead of just "Tuple | false". From bengt.kleberg@REDACTED Thu Feb 16 17:16:55 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Thu, 16 Feb 2006 17:16:55 +0100 Subject: felix.sf.net In-Reply-To: References: Message-ID: <43F4A577.2000503@ericsson.com> On 2006-02-16 16:32, Ulf Wiger (AL/EAB) wrote: > I just stumbled across felix (http://felix.sf.net). ...deleted > > Anyone else looked at it? fwiw: during my time with The Computer Language Shootout i was always impressed by clear head, and restrained presence, of John Skaller (the creator of felix). bengt From sam@REDACTED Thu Feb 16 17:45:52 2006 From: sam@REDACTED (Samuel Montgomery-Blinn) Date: Thu, 16 Feb 2006 11:45:52 -0500 Subject: Erlang standard library quirks In-Reply-To: References: Message-ID: <43F4AC40.7090905@caveman.org> James Hague wrote: >One more: > >lists:keysearch returns "{value, Tuple} | false" instead of just >"Tuple | false". > > > This is to distinguish the value "false" from the return code of "false", unless I am using the function incorrectly. -Sam From rpettit@REDACTED Thu Feb 16 17:56:23 2006 From: rpettit@REDACTED (Rick Pettit) Date: Thu, 16 Feb 2006 10:56:23 -0600 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <8B870390-CA4D-4CBF-81FC-95A8F494E7E6@mac.com> References: <200602150912.31029.ft@it.su.se> <200602160904.44192.ft@it.su.se> <8B870390-CA4D-4CBF-81FC-95A8F494E7E6@mac.com> Message-ID: <20060216165623.GD31944@vailsys.com> On Thu, Feb 16, 2006 at 10:17:23AM -0500, Douglas Philips wrote: > On 2006 Feb 16, at 3:04 AM, Fredrik Thulin indited: > >On Thursday 16 February 2006 01:12, Douglas Philips wrote: > >>On 2006 Feb 15, at 3:12 AM, Fredrik Thulin indited: > >>I don't see how you can avoid that, since you have to run the > >>packaging install commands on each machine, right? > > > >Well, no. It is all about _not_ having to log in to each machine. > >Either > >you can have something like cron-jobs that fetches all packages you > >want installed from somewhere, and installs them, or you effectively > >execute them from the same set of binaries made available via some > >kind > >of networked file system. This is what we do - we use AFS. > > Yes, I know. AFS was created at CMU. Heh. > And I never said you had to log in to each machine, just that the > packaging install commands had to run on each machine. > As long as the installation process does not require interaction with > a human, it can be automated and handled with a cron job. I prefer cfengine--I use it to avoid "black sheep" servers on our network. When packages get deployed, cfengine does the work. > That doesn't require (though it would be nice if it used) the native > OS packaging. I replace the native OS packaging system (on Solaris anyway) with NetBSD pkgsrc. When I install software, be it Erlang or other stuff, I build a NetBSD package (if there isn't one out there already--the packages collection is quite large these days). My packaging system doesn't change when the OS does, either. Nor does the cfengine configuration for building my network of servers. So all software is consistently deployed, regardless of OS, using the NetBSD packaging system (regardless of the host OS!) and cfengine (also quite portable). I should note that I haven't done much with Windows, only *NIX boxes. I understand cfengine works on Windows--as for Windows, not sure there is much support (other than Interix): http://www.netbsd.org/Documentation/software/packages.html#platforms > >In both these cases, the common part of the problem is the packaging. > >You need to distribute binaries, or instructions about how to generate > >binaries in some way. It is impractical to have to have one way to do > >this for regular programs (like KDE, the Erlang/OTP installation, your > >other favourite applications) and for programs that install "inside" > >any of the others (like CPAN for Perl, or some Erlang way to install > >Erlang applications). > > You almost had me there. There is no reason why the "inside Erlang > way" couldn't in fact call out to the underlying OSes facility. > But it is worse than that, because usually installing new software > requires special priveleges (root, Administrator, etc.) and that is > not likely to be available when some user wants to have a new Erlang > module/application installed RIGHT NOW. I should add that cfengine runs as root and one really must be careful to avoid shooting themselves in the foot. I wouldn't run cfengine on external servers, either (only on internal machines behind a firewall). > Part of the problem is that there is no concept widely promulgated > for seperating the OS's packages from the users. > > >I am guessing now, but I think lots of people in the Erlang developer > >community more or less only care about the Erlang part of this > >problem, > >whilst I want to be able to install Erlang applications in the same > >way > >that I am already installing all the _other_ applications that I > >(really 'we' at Stockholm university) care about. That's why I use NetBSD pkgsrc. [snip] -Rick From serge@REDACTED Thu Feb 16 18:47:00 2006 From: serge@REDACTED (Serge Aleynikov) Date: Thu, 16 Feb 2006 12:47:00 -0500 Subject: Erlang standard library quirks In-Reply-To: <43F4AC40.7090905@caveman.org> References: <43F4AC40.7090905@caveman.org> Message-ID: <43F4BA94.6090908@hq.idt.net> Apparently if lists:keysearch/3 is used the value returned (if found) should always be a tuple, so the use of {value, Value} is indeed excessive. 1> lists:keysearch(a, 1, [{b,2}, {a, false}]). {value,{a,false}} 2> lists:keysearch(c, 1, [{b,2}, {a, false}]). false Samuel Montgomery-Blinn wrote: > James Hague wrote: > >> One more: >> >> lists:keysearch returns "{value, Tuple} | false" instead of just >> "Tuple | false". >> >> >> > This is to distinguish the value "false" from the return code of > "false", unless I am using the function incorrectly. > > -Sam > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From sean.hinde@REDACTED Thu Feb 16 18:57:19 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Thu, 16 Feb 2006 18:57:19 +0100 Subject: Erlang standard library quirks In-Reply-To: <43F4AC40.7090905@caveman.org> References: <43F4AC40.7090905@caveman.org> Message-ID: <3E8136DE-4057-4F3A-83E4-6BE911890554@gmail.com> On 16 Feb 2006, at 17:45, Samuel Montgomery-Blinn wrote: > James Hague wrote: > >> One more: >> >> lists:keysearch returns "{value, Tuple} | false" instead of just >> "Tuple | false". >> >> > This is to distinguish the value "false" from the return code of > "false", unless I am using the function incorrectly. Except that it can never return a successful result of 'false' - on success it always returns a tuple. Which is not to say that I do not also find it one of the most ugly constructs in the libraries (and how about that sentence for an ugly construct :-) ). I have many times wrapped lists:keysearch in another function just to prevent the extra {value,..} cruft crapping all over my code. Sean From vlad_dumitrescu@REDACTED Thu Feb 16 22:27:23 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Thu, 16 Feb 2006 22:27:23 +0100 Subject: wild and crazy idea? References: Message-ID: Hello, Reading about Felix' fthreads I got this Wild And Crazy (tm) idea. After giving it some thought, it can't really be new (but if it is, I hereby claim full worldwide rights ;-) so if anyone has any pointer to further reading, I'll appreciate the feedback. The main question is one that nobody on this list should fail to answer right: what is the main thing that makes Erlang special? Of course, it is the stuff that earned Dr. Joe his title (so to speak): the lightweight & isolated processes framework and the monitoring and distribution mechanisms. For the purpose of this discussion, I claim that the rest is just syntactic sugar. Now to my idea: * would it be possible to separate these most important features from the actual language implementation? * is it possible to create such a generic framework, where one could plug in different virtual machines to execute the actual code, and offer all of them the same services that today only the beam vm enjoys? Is anything like this already out there? Well, some parts of it are, like PVM or MPI, but those have a different niche to fill and don't cover all the ground (or so I gather, at least, please set me straight if I'm wrong) What do you think? best regards, Vlad From ulf.wiger@REDACTED Thu Feb 16 23:41:46 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 16 Feb 2006 23:41:46 +0100 Subject: felix.sf.net Message-ID: I was in a hurry when I wrote this message. The idea I had when reading about felix was that one could try to write some glue code to allow felix programs to run in threads inside the VM, using the asynch driver interface to communicate between erlang and felix. Since felix is memory-safe and has constructs like closures, flexer and parser programming support, unicode strings, etc., and was designed to interface well with existing C++ code, it might provide a pretty good low-level environment for the kind of stuff that erlang doesn't do so well. /Ulf W > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Ulf > Wiger (AL/EAB) > Sent: den 16 februari 2006 16:33 > To: erlang-questions@REDACTED > Subject: felix.sf.net > > > I just stumbled across felix (http://felix.sf.net). > It looks quite nice, what with good code generation to C++, > lexing and parsing generator support and automatic memory management. > > Anyone else looked at it? > > Regards, > Ulf W > From spearce@REDACTED Thu Feb 16 23:41:30 2006 From: spearce@REDACTED (Shawn Pearce) Date: Thu, 16 Feb 2006 17:41:30 -0500 Subject: wild and crazy idea? In-Reply-To: References: Message-ID: <20060216224130.GA13895@spearce.org> Vlad Dumitrescu wrote: > The main question is one that nobody on this list should fail to answer > right: what is the main thing that makes Erlang special? > > Of course, it is the stuff that earned Dr. Joe his title (so to speak): the > lightweight & isolated processes framework and the monitoring and > distribution mechanisms. For the purpose of this discussion, I claim that > the rest is just syntactic sugar. > > Now to my idea: > * would it be possible to separate these most important features from > the actual language implementation? > * is it possible to create such a generic framework, where one could > plug in different virtual machines to execute the actual code, and offer > all of them the same services that today only the beam vm enjoys? How about the Microsoft Singularity project? They have tried to define something with the same basic concept you are asking for, except a virtual machine is not required (processes can use native code if they desire). I didn't see any concept of monitoring processes and handling failure (ala the supervisor module) however. At least not beyond terminating the errant process and praying. One nice thing about Singularity is they have defined how device drivers are to behave: just like any other message passing process. Which is quite unlike Erlang's driver model where it is common for the driver to be written in C and loaded into beam where it can cause all sorts of havoc. > Is anything like this already out there? Well, some parts of it are, like > PVM or MPI, but those have a different niche to fill and don't cover all > the ground (or so I gather, at least, please set me straight if I'm wrong) Interestingly it was my attempt to apply PVM to something which it wasn't built for that lead me to Erlang. :-) But aside from Singularity (which has been discussed on list recently) I haven't heard or seen of anything which comes close to the level of ease of construction as Erlang. I've tried to build such things before (in C++) using tools like ACE and it wasn't pretty. Definately not recommended. -- Shawn. From ryanobjc@REDACTED Fri Feb 17 00:09:12 2006 From: ryanobjc@REDACTED (Ryan Rawson) Date: Thu, 16 Feb 2006 15:09:12 -0800 Subject: wild and crazy idea? In-Reply-To: References: Message-ID: <78568af10602161509m2f1e6eddxfb5676596ce1bae6@mail.gmail.com> I actually disagree here. I think the cool thing about Erlang is that lightweight and isolated processes are _part_ of the language. That sending a message is a language construct and a basic part of the language, not a bolt on. Another important effect is the functional nature of the language. A major reason why I'm using Erlang is the pure functional nature. I believe this will naturally lead to less bugs, as most common bugs come from constructs which are impossible or difficult to write in Erlang (loops on arrays for example). I'd also like to point out that "syntactic sugar" is not merely sweet, but it can be an essential feature of the language. For example, list comprehensions - nothing that can't be done with recursion and lambdas, thus strictly its syntactic sugar. But what they give you is the ability to more concisely talk about your ideas. Why did Java add foreach, why does C# also have foreach? The ability to express the pure concept instead of bogus things about iterators, and the like. No, the important thing is to do something for each item of a list. Foreach is merely on the path to list comprehensions :-) Plus I'd miss the live code upgrades. -ryan On 2/16/06, Vlad Dumitrescu wrote: > Hello, > > Reading about Felix' fthreads I got this Wild And Crazy (tm) idea. After > giving it some thought, it can't really be new (but if it is, I hereby claim > full worldwide rights ;-) so if anyone has any pointer to further reading, > I'll appreciate the feedback. > > The main question is one that nobody on this list should fail to answer > right: what is the main thing that makes Erlang special? > > Of course, it is the stuff that earned Dr. Joe his title (so to speak): the > lightweight & isolated processes framework and the monitoring and > distribution mechanisms. For the purpose of this discussion, I claim that > the rest is just syntactic sugar. > > Now to my idea: > * would it be possible to separate these most important features from the > actual language implementation? > * is it possible to create such a generic framework, where one could plug > in different virtual machines to execute the actual code, and offer all of > them the same services that today only the beam vm enjoys? > > Is anything like this already out there? Well, some parts of it are, like > PVM or MPI, but those have a different niche to fill and don't cover all the > ground (or so I gather, at least, please set me straight if I'm wrong) > > What do you think? > best regards, > Vlad > From ok@REDACTED Fri Feb 17 06:04:17 2006 From: ok@REDACTED (Richard A. O'Keefe) Date: Fri, 17 Feb 2006 18:04:17 +1300 (NZDT) Subject: Longstanding issues: structs & standalone Erlang Message-ID: <200602170504.k1H54H8I160209@atlas.otago.ac.nz> Douglas Philips wrote: But it is worse than that, because usually installing new software requires special priveleges (root, Administrator, etc.) and that is not likely to be available when some user wants to have a new Erlang module/application installed RIGHT NOW. Sardonic laugh. I'm in exactly that situation with respect to another programming language. I have to install it in my own area, and the installation goes looking for all sorts of GNUish things where they are put on Linux. The maintainer basically told me that it's *my* fault that installation took me a week (and still isn't right) for being the only person to be using the package on Solaris without root access. The web is an increasingly hostile environment. This University's mail servers are groaning under the weight of malware that they (usually) filter out in time. So there's a policy: only one or two system admins per department have root access to _any_ machine on the University's net. Not even our HoD has root access. I'm sure this isn't the only University, nor even the only organisation, nor even the only organisation that develops software, that has such a policy. From ft@REDACTED Fri Feb 17 08:01:02 2006 From: ft@REDACTED (Fredrik Thulin) Date: Fri, 17 Feb 2006 08:01:02 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <8B870390-CA4D-4CBF-81FC-95A8F494E7E6@mac.com> References: <200602160904.44192.ft@it.su.se> <8B870390-CA4D-4CBF-81FC-95A8F494E7E6@mac.com> Message-ID: <200602170801.02497.ft@it.su.se> On Thursday 16 February 2006 16:17, Douglas Philips wrote: ... > And I never said you had to log in to each machine, just that the > packaging install commands had to run on each machine. > As long as the installation process does not require interaction with > a human, it can be automated and handled with a cron job. > That doesn't require (though it would be nice if it used) the native > OS packaging. I agree. I beleive though that packaging of Erlang applications should be possible by the people who have already packaged thousands of other applications in one packaging system or another - it should not be done 'in advance' like with CPAN. The developers of an application should express it's dependencys, not enforce a certain packaging. I have this opinion based on that all the attempts of such pre-packaging (or otherwise non-standard installation procedures) I've seen have caused me and my colleagues alot of extra work in making buildit modules for those applications - _none_ have made it simpler. This tells me that the same goes for all people involved in creating OS distributions, even though I realize that this is not true for people only managing a single (or a few) installations. (as a side point: buildit is not the native OS packaging, we always use a distribution underneath, although we install all the applications we really care about using buildit). > > In both these cases, the common part of the problem is the > > packaging. You need to distribute binaries, or instructions about > > how to generate binaries in some way. It is impractical to have to > > have one way to do this for regular programs (like KDE, the > > Erlang/OTP installation, your other favourite applications) and for > > programs that install "inside" any of the others (like CPAN for > > Perl, or some Erlang way to install Erlang applications). > > You almost had me there. There is no reason why the "inside Erlang > way" couldn't in fact call out to the underlying OSes facility. I'm not totally sure I understand what you mean, but if you mean that "./configure; make; make install" would do a lot of Erlang-stuff behind the scenes, then I have no objections to that. > But it is worse than that, because usually installing new software > requires special priveleges (root, Administrator, etc.) and that is > not likely to be available when some user wants to have a new Erlang > module/application installed RIGHT NOW. It won't be available through the "Erlang way" either. If Erlang/OTP is installed somewhere outside your home directory (or similar) by the system administrator, you can't modify Erlang/OTP. The only solution is to make it possible to have Erlang/OTP installed by someone else, and still install Erlang applications/librarys somewhere where you have write access. Erlang/OTP should of course continue to be installable wherever the user wants too. ... > Again with the ignoring Windows. Look, I am not unsympathetic to > ignoring windows, but I think that would disparage a significant > number of actual Erlang developers. I agree. I don't want to ignore Windows, but I have never heard of anything like BSD ports or Debian apt on Windows. As far as I know, Windows is all about next-next-finish installers that, if they are supposed to be downloaded from the Internet, are preferably single-file executables. /Fredrik From yerl@REDACTED Fri Feb 17 08:56:24 2006 From: yerl@REDACTED (Yerl) Date: Fri, 17 Feb 2006 08:56:24 +0100 Subject: Unix* + Erlang + SQLServer/Sybase Message-ID: <43F581A8.4070504@club-internet.fr> Hi All! You want to connect Erlang to Sybase or SQLServer databases from Unix-[like] systems? So simple! Install UnixODBC (http://www.unixodbc.org/) and FreeTDS (http://www.freetds.org/). After that, use the Erlang ODBC interface to connect to whatever you want. enjoy /ycrux From vlad_dumitrescu@REDACTED Fri Feb 17 09:03:37 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Fri, 17 Feb 2006 09:03:37 +0100 Subject: wild and crazy idea? In-Reply-To: <78568af10602161509m2f1e6eddxfb5676596ce1bae6@mail.gmail.com> Message-ID: > From: Ryan Rawson > > I actually disagree here. I think the cool thing about > Erlang is that lightweight and isolated processes are _part_ > of the language. [...] I'd also like to point out that "syntactic sugar" is not > merely sweet, but it can be an essential feature of the > language. For example, list comprehensions [...] Plus I'd miss the > live code upgrades. Hi, I fully agree. I did actually say "For the purpose of this discussion, I claim that the rest is just syntactic sugar." IMHO it's not realistic to assume we can impose Erlang as a language to the whole world. But seeing that many others are aiming to implement the very features that make the Erlang system what it is, I think it is worth considering if it would be possible to share those features. In the beginning, the only supported language vm would be the beam machine, so Erlang users can be oblivious of any change. But if someone would like to run (Ocaml | Felix | Ruby | Java | whatever), instead, why not let them implement their own language vm? I believe the result will be that even Erlang will end up enriched with new concepts. Or else everybody would switch to Erlang :-) There is an alternative, to let those other languages be compiled to beam code, but beam is very much Erlang, so I don't think it is a viable option. Anyway, it is not to say that if another language would be used on this runtime, it will remain unchanged. There are already language extensions for everything, it wouldn't be that difficult to extend any given language to include whatever syntactic or semantic sugar is needed. Of course, in today's ERTS the beam engine is very tightly integrated with the process framework, so to make this practical there is a lot of work. It isn't even certain it's possible to do without making compromises that would render the solution less useful than wished for. Regards, Vlad From vlad_dumitrescu@REDACTED Fri Feb 17 09:17:13 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Fri, 17 Feb 2006 09:17:13 +0100 Subject: wild and crazy idea? In-Reply-To: <20060216224130.GA13895@spearce.org> Message-ID: > -----Original Message----- > From: Shawn Pearce > How about the Microsoft Singularity project? Yes, I had forgotten about that one. Definitely interesting to study, but since the code isn't available, we could probably only expect to have something like this incorporated in Windows 2025 :-) They are building an OS, and so have to solve other issues that we could skip. Some concepts are also reminescent of Plan9/Inferno. What I had in mind was more a different packaging of what is already implemented and works fine, and opening for other communities to share and contribute. Regards, Vlad From luke@REDACTED Fri Feb 17 09:22:24 2006 From: luke@REDACTED (Luke Gorrie) Date: Fri, 17 Feb 2006 09:22:24 +0100 Subject: Unix* + Erlang + SQLServer/Sybase References: <43F581A8.4070504@club-internet.fr> Message-ID: Yerl writes: > You want to connect Erlang to Sybase or SQLServer databases from > Unix-[like] systems? > > So simple! > > Install UnixODBC (http://www.unixodbc.org/) and FreeTDS > (http://www.freetds.org/). > After that, use the Erlang ODBC interface to connect to whatever you want. FWIW we had to interface with Oracle 9i recently and it was very painless with OTP's odbc + UnixODBC framework + Easysoft's commercial (1K euro per machine) Oracle driver (which plugs into UnixODBC). Possibly this will be useful information for an archive-searcher in the future. :-) P.S. SQL databases are pretty cool. From rxiong@REDACTED Fri Feb 17 00:31:41 2006 From: rxiong@REDACTED (Renyi Xiong) Date: Thu, 16 Feb 2006 15:31:41 -0800 Subject: mnesia question References: <004201c12062$406e7870$400fa8c0@HP78819433158> Message-ID: <009b01c63351$26960010$400fa8c0@HP78819433158> what if one node participant fails to respond (machine down or network down) during commit process while the coordinator waiting for commit vote ('receive' waits forever for a message, right?) the reason why I'm asking this question is that: our system is designed to handle thousands of write transactions a second and to have multiple replicas to provide fault tolerance. if one replica down and fails to send 'mnesia_down' message. there is a good chance that a commit process is on going. does 'mnesia_monitor' on coordinator node handle that? Thanks, Renyi. ----- Original Message ----- From: "Hakan Mattsson" To: "Renyi Xiong" Cc: "Ulf Wiger (AL/EAB)" ; Sent: Tuesday, February 14, 2006 2:04 AM Subject: Re: mnesia question On Wed, 8 Aug 2001, Renyi Xiong wrote: RX> Thanks guys, RX> It's really helpful for us to understand how Mnesia works. RX> RX> 1.My understanding is when one node initiates a write operation it sends a RX> message to each of the replicas at same time and doesn't care the write RX> transaction status on other replicas. It's up to the transaction handler on RX> each node to handle the write transaction separately. Is that right? Yes, this is true for normal transactions using 2pc. But it is not as bad as it sounds as the transaction recovery protocol ensures that the outcome of the transaction always is atomic. If needed, Mnesia will automatically use 3pc as transaction protocol. It is slower, but takes care of transactions operating on multiple tables which are replicated asymmetrically. RX> 2.How do I know the write operation succeeds on at least RX> on of the replicas including the one which initiates it? Use mnesia:sync_transaction/1. It waits for all participating nodes to complete their commit work before it returns. It is slower, but needed in some applications. /H?kan RX> Thanks, RX> Renyi. RX> RX> ----- Original Message ----- From: "Hakan Mattsson" RX> To: "Ulf Wiger (AL/EAB)" RX> Cc: "Renyi Xiong" ; ; RX> RX> Sent: Monday, February 13, 2006 8:54 AM RX> Subject: RE: mnesia question RX> RX> RX> On Mon, 13 Feb 2006, Ulf Wiger (AL/EAB) wrote: RX> RX> UW> Renyi Xiong wrote: RX> UW> > RX> UW> > 1. what happens if one of (not all of) the RAM replicas of RX> UW> > Mnesia table fails when doing write operation? write fails? RX> UW> RX> UW> If you are using transactions, chances are good that mnesia RX> UW> will be able to follow through after all. The transaction RX> UW> is completed as an 'asymmetric' transaction, and the failed RX> UW> node gets the opportunity to update itself later. RX> RX> Yes, the transaction is completed consistently on the RX> surviving nodes. On the node(s) where Mnesia fails to RX> write, Mnesia will be terminated. When Mnesia later is RX> started on these nodes, it will pick the table contents RX> from the surviving node(s). This fundamental behavior RX> is the same for all types of transactions as well as RX> for dirty writes. RX> RX> For transactions using 3pc, the recovery procedure is RX> more complicated as the failing nodes may need to RX> determine the outcome of the transaction before the RX> transaction log can be processed. 3pc is used for RX> transactions involving updates of the schema or RX> asymmetrically replicated tables. RX> RX> UW> (Of course, assuming that the failed node is not the RX> UW> one that initiated the transaction.) RX> RX> The recovery procedure is the same, even if it was the RX> failing node that initiated the transaction. RX> RX> UW> If you're using dirty writes, you may end up with RX> UW> database inconsistency. Don't use dirty writes on RX> UW> replicated tables unless you really really know what RX> UW> you're doing. RX> RX> This is a good general advice. RX> RX> Using dirty writes on replicated tables, is about as RX> hazardous as using master nodes, using the RX> max_wait_for_decision configuration parameter or to RX> force load tables. Elaborating with these mechanisms RX> may easily end up with an inconsistent database as RX> they bypasses the transaction recovery procedure in RX> Mnesia. Sometime it is necessary to use these RX> mechanisms, but use them with care. RX> RX> /H?kan RX> RX> UW> > 2. Is Mnesia table RAM replica distributable across VPN network? RX> UW> RX> UW> If you can get Distributed Erlang to work, you will be able to RX> UW> replicate mnesia tables. Without Distributed Erlang - no replication. RX> UW> RX> UW> RX> UW> > 3. Is possible to add and remove RAM replica dynamically? RX> UW> RX> UW> Yes, using the function RX> UW> RX> UW> mnesia:add_table_copy(Tab, Node, Type) RX> UW> RX> UW> where Type == ram_copies, if it's a RAM replica you want to add. RX> UW> RX> UW> Removing a replica: RX> UW> RX> UW> mnesia:del_table_copy(Tab, Node) RX> UW> RX> UW> Regards, RX> UW> Ulf W From lenglet@REDACTED Fri Feb 17 02:06:16 2006 From: lenglet@REDACTED (Romain Lenglet) Date: Fri, 17 Feb 2006 10:06:16 +0900 Subject: wild and crazy idea? In-Reply-To: <78568af10602161509m2f1e6eddxfb5676596ce1bae6@mail.gmail.com> References: <78568af10602161509m2f1e6eddxfb5676596ce1bae6@mail.gmail.com> Message-ID: <200602171006.16191.lenglet@csg.is.titech.ac.jp> Ryan Rawson wrote: > I actually disagree here. I think the cool thing about Erlang > is that lightweight and isolated processes are _part_ of the > language. That sending a message is a language construct and > a basic part of the language, not a bolt on. Another > important effect is the functional nature of the language. A > major reason why I'm using Erlang is the pure functional > nature. I believe this will naturally lead to less bugs, as > most common bugs come from constructs which are impossible or > difficult to write in Erlang (loops on arrays for example). To backup your argument, I also think that the *combination* of pattern matching and messaging in the language is a major feature. Being able to pattern-match a message in a receive construct is extremely useful, and cannot be done (at least easily) if one separates those two features. Of course, pattern matching is also a major feature in itself, although not specific to Erlang. > I'd also like to point out that "syntactic sugar" is not > merely sweet, but it can be an essential feature of the > language. For example, list comprehensions - nothing that > can't be done with recursion and lambdas, thus strictly its > syntactic sugar. But what they give you is the ability to > more concisely talk about your ideas. Why did Java add > foreach, why does C# also have foreach? The ability to > express the pure concept instead of bogus things about > iterators, and the like. No, the important thing is to do > something for each item of a list. Foreach is merely on the > path to list comprehensions :-) I would also add unique assignment to variables, which prevents a lot of bugs. > Plus I'd miss the live code upgrades. -- Romain LENGLET From vlad.xx.dumitrescu@REDACTED Fri Feb 17 09:46:19 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Fri, 17 Feb 2006 09:46:19 +0100 Subject: wild and crazy idea? Message-ID: <11498CB7D3FCB54897058DE63BE3897C013ECD45@esealmw105.eemea.ericsson.se> > Of course, pattern matching is also a major feature in > itself, although not specific to Erlang. > > I would also add unique assignment to variables, which > prevents a lot of bugs. Trying to reformulate my previous statement, what I mean is that it is comparatively much easier to extend most programming languages to allow new language constructs and semantics like functional behaviour/pattern matching/single assignment/whatever, than it is to provide the kind of environment that the ERTS provides for Erlang processes. /Vlad From ryanobjc@REDACTED Fri Feb 17 09:53:04 2006 From: ryanobjc@REDACTED (Ryan Rawson) Date: Fri, 17 Feb 2006 00:53:04 -0800 Subject: wild and crazy idea? In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C013ECD45@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C013ECD45@esealmw105.eemea.ericsson.se> Message-ID: <78568af10602170053s4098cb43qb9ea6cb8852bf6d9@mail.gmail.com> Fair enough, but I think my point is that I expect at least 1/2 or more of the benefits I predict I will get from Erlang come from the language itself. Have you looked at gambit scheme? With the scheme->C compiler, maybe that is something you are thinking about? -ryan On 2/17/06, Vlad Dumitrescu XX (LN/EAB) wrote: > > Of course, pattern matching is also a major feature in > > itself, although not specific to Erlang. > > > > I would also add unique assignment to variables, which > > prevents a lot of bugs. > > Trying to reformulate my previous statement, what I mean is that it is > comparatively much easier to extend most programming languages to allow > new language constructs and semantics like functional behaviour/pattern > matching/single assignment/whatever, than it is to provide the kind of > environment that the ERTS provides for Erlang processes. > > /Vlad > > From vlad_dumitrescu@REDACTED Fri Feb 17 10:00:15 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Fri, 17 Feb 2006 10:00:15 +0100 Subject: wild and crazy idea? In-Reply-To: <78568af10602170053s4098cb43qb9ea6cb8852bf6d9@mail.gmail.com> Message-ID: > Have you looked at gambit scheme? With the scheme->C > compiler, maybe that is something you are thinking about? Not really, we want isolated processes, not threads :-) /Vlad From taavi@REDACTED Fri Feb 17 11:08:14 2006 From: taavi@REDACTED (Taavi Talvik) Date: Fri, 17 Feb 2006 12:08:14 +0200 Subject: Strange behavior (for me) Message-ID: > erl -mnesia dir /tmp Erlang (BEAM) emulator version 5.4.12 [source] [hipe] [threads:0] [kernel-poll] Eshell V5.4.12 (abort with ^G) 1> mnesia:start(). =ERROR REPORT==== 17-Feb-2006::11:59:20 === application_controller: syntax error before: '/': /tmp {error,{bad_environment_value,"/tmp"}} System: FreeBSD 6.0-RELEASE #0: Thu Nov 3 09:36:13 UTC 2005 root@REDACTED:/usr/obj/usr/src/sys/GENERIC Erlang compiled from port: erlang-r10b9,1 # $FreeBSD: ports/lang/erlang/Makefile,v 1.81 2006/02/04 23:52:18 olgeni Exp $ best regards, taavi From sanjaya@REDACTED Fri Feb 17 11:36:54 2006 From: sanjaya@REDACTED (Sanjaya Vitharana) Date: Fri, 17 Feb 2006 16:36:54 +0600 Subject: xmerl - Line Numbers ?? whitespace_was_expected Message-ID: <06ff01c633ae$122be330$5f00a8c0@wavenet.lk> Hi ...!!! vxml_test.vxml ---------------------------------------- Just try to parse the above vxml_test.vxml (3 line), with vxml.dtd from http://www.w3.org/TR/voicexml21/vxml.dtd as xmerl_scan:file("vxml_test.vxml",[{validation,true},{doctype_DTD, "vxml.dtd"}]). Question: 1.) {error,{whitespace_was_expected}} - what means this ??? I can't see anythig wrong in line 109 as shown by the xmerl_scan. Also can be there any errors after W3C pepole publised it ? 2.) But with commenting " xmerl_scan:file("vxml_test.vxml",[{validation,true},{doctype_DTD, "vxml.dtd"}]). 3690- fatal: {error,{whitespace_was_expected}} ** exited: {fatal,{{error,{whitespace_was_expected}}, {file,"./vxml.dtd"}, {line,109}, {col,30}}} ** 68> Thanks in advance Sanjaya Vitharana -------------- next part -------------- An HTML attachment was scrubbed... URL: From bertil.karlsson@REDACTED Fri Feb 17 12:17:34 2006 From: bertil.karlsson@REDACTED (Bertil Karlsson) Date: Fri, 17 Feb 2006 12:17:34 +0100 Subject: xmerl - Line Numbers ?? whitespace_was_expected In-Reply-To: <06ff01c633ae$122be330$5f00a8c0@wavenet.lk> References: <06ff01c633ae$122be330$5f00a8c0@wavenet.lk> Message-ID: <43F5B0CE.70102@ericsson.com> Next version os xmerl, which is coming soon, has better accuracy in telling where the error occured. One thing xmerl failed on earlier was expansion of parameter entities. /Bertil Sanjaya Vitharana wrote: > Hi ...!!! > > vxml_test.vxml > > > > > > ---------------------------------------- > Just try to parse the above vxml_test.vxml (3 line), with vxml.dtd > from http://www.w3.org/TR/voicexml21/vxml.dtd as > xmerl_scan:file("vxml_test.vxml",[{validation,true},{doctype_DTD, > "vxml.dtd"}]). > > Question: > 1.) {error,{whitespace_was_expected}} - what means this ??? I can't > see anythig wrong in line 109 as shown by the xmerl_scan. Also can be > there any errors after W3C pepole publised it ? > > 2.) But with commenting " moved to the {line,165}. That means something wrong/unsupported within > the above lines. Can anyone explane this ??? > > 3.) Also I think the Line numbers shown incorrectly??? > > Below the complete error I have got > > 67> xmerl_scan:file("vxml_test.vxml",[{validation,true},{doctype_DTD, > "vxml.dtd"}]). > 3690- fatal: {error,{whitespace_was_expected}} > ** exited: {fatal,{{error,{whitespace_was_expected}}, > {file,"./vxml.dtd"}, > {line,109}, > {col,30}}} ** > 68> > > > Thanks in advance > > Sanjaya Vitharana From hakan@REDACTED Fri Feb 17 10:57:26 2006 From: hakan@REDACTED (Hakan Mattsson) Date: Fri, 17 Feb 2006 10:57:26 +0100 (CET) Subject: mnesia question In-Reply-To: <009b01c63351$26960010$400fa8c0@HP78819433158> References: <004201c12062$406e7870$400fa8c0@HP78819433158> <009b01c63351$26960010$400fa8c0@HP78819433158> Message-ID: On Thu, 16 Feb 2006, Renyi Xiong wrote: RX> what if one node participant fails to respond (machine down or network down) RX> during commit process while the coordinator waiting for commit vote RX> ('receive' waits forever for a message, right?) Mnesia detects that and re-runs the transaction. Se below. Transaction recovery is a fundamental functionality in Mnesia as well as in all other DBMS's. RX> the reason why I'm asking this question is that: RX> RX> our system is designed to handle thousands of write transactions a second RX> and to have multiple replicas to provide fault tolerance. if one replica RX> down and fails to send 'mnesia_down' message. there is a good chance that a RX> commit process is on going. RX> RX> does 'mnesia_monitor' on coordinator node handle that? Yes, all mnesia_monitor's are linked to each others. When mnesia_monitor detects that some of the others are down, it will tell all coordinators and participants (via mnesia_tm) on the local node about it. The coordinators and participants will then act accoringly and recover their own transactions. /H?kan RX> Thanks, RX> Renyi. RX> RX> ----- Original Message ----- From: "Hakan Mattsson" RX> To: "Renyi Xiong" RX> Cc: "Ulf Wiger (AL/EAB)" ; RX> RX> Sent: Tuesday, February 14, 2006 2:04 AM RX> Subject: Re: mnesia question RX> RX> RX> On Wed, 8 Aug 2001, Renyi Xiong wrote: RX> RX> RX> Thanks guys, RX> RX> It's really helpful for us to understand how Mnesia works. RX> RX> RX> RX> 1.My understanding is when one node initiates a write operation it sends RX> a RX> RX> message to each of the replicas at same time and doesn't care the write RX> RX> transaction status on other replicas. It's up to the transaction handler RX> on RX> RX> each node to handle the write transaction separately. Is that right? RX> RX> Yes, this is true for normal transactions using RX> 2pc. But it is not as bad as it sounds as the RX> transaction recovery protocol ensures that the RX> outcome of the transaction always is atomic. RX> RX> If needed, Mnesia will automatically use 3pc as RX> transaction protocol. It is slower, but takes RX> care of transactions operating on multiple tables RX> which are replicated asymmetrically. RX> RX> RX> 2.How do I know the write operation succeeds on at least RX> RX> on of the replicas including the one which initiates it? RX> RX> Use mnesia:sync_transaction/1. It waits for all RX> participating nodes to complete their commit work RX> before it returns. It is slower, but needed in RX> some applications. RX> RX> /H?kan RX> RX> RX> Thanks, RX> RX> Renyi. RX> RX> RX> RX> ----- Original Message ----- From: "Hakan Mattsson" RX> RX> RX> To: "Ulf Wiger (AL/EAB)" RX> RX> Cc: "Renyi Xiong" ; ; RX> RX> RX> RX> Sent: Monday, February 13, 2006 8:54 AM RX> RX> Subject: RE: mnesia question RX> RX> RX> RX> RX> RX> On Mon, 13 Feb 2006, Ulf Wiger (AL/EAB) wrote: RX> RX> RX> RX> UW> Renyi Xiong wrote: RX> RX> UW> > RX> RX> UW> > 1. what happens if one of (not all of) the RAM replicas of RX> RX> UW> > Mnesia table fails when doing write operation? write fails? RX> RX> UW> RX> RX> UW> If you are using transactions, chances are good that mnesia RX> RX> UW> will be able to follow through after all. The transaction RX> RX> UW> is completed as an 'asymmetric' transaction, and the failed RX> RX> UW> node gets the opportunity to update itself later. RX> RX> RX> RX> Yes, the transaction is completed consistently on the RX> RX> surviving nodes. On the node(s) where Mnesia fails to RX> RX> write, Mnesia will be terminated. When Mnesia later is RX> RX> started on these nodes, it will pick the table contents RX> RX> from the surviving node(s). This fundamental behavior RX> RX> is the same for all types of transactions as well as RX> RX> for dirty writes. RX> RX> RX> RX> For transactions using 3pc, the recovery procedure is RX> RX> more complicated as the failing nodes may need to RX> RX> determine the outcome of the transaction before the RX> RX> transaction log can be processed. 3pc is used for RX> RX> transactions involving updates of the schema or RX> RX> asymmetrically replicated tables. RX> RX> RX> RX> UW> (Of course, assuming that the failed node is not the RX> RX> UW> one that initiated the transaction.) RX> RX> RX> RX> The recovery procedure is the same, even if it was the RX> RX> failing node that initiated the transaction. RX> RX> RX> RX> UW> If you're using dirty writes, you may end up with RX> RX> UW> database inconsistency. Don't use dirty writes on RX> RX> UW> replicated tables unless you really really know what RX> RX> UW> you're doing. RX> RX> RX> RX> This is a good general advice. RX> RX> RX> RX> Using dirty writes on replicated tables, is about as RX> RX> hazardous as using master nodes, using the RX> RX> max_wait_for_decision configuration parameter or to RX> RX> force load tables. Elaborating with these mechanisms RX> RX> may easily end up with an inconsistent database as RX> RX> they bypasses the transaction recovery procedure in RX> RX> Mnesia. Sometime it is necessary to use these RX> RX> mechanisms, but use them with care. RX> RX> RX> RX> /H?kan RX> RX> RX> RX> UW> > 2. Is Mnesia table RAM replica distributable across VPN network? RX> RX> UW> RX> RX> UW> If you can get Distributed Erlang to work, you will be able to RX> RX> UW> replicate mnesia tables. Without Distributed Erlang - no RX> replication. RX> RX> UW> RX> RX> UW> RX> RX> UW> > 3. Is possible to add and remove RAM replica dynamically? RX> RX> UW> RX> RX> UW> Yes, using the function RX> RX> UW> RX> RX> UW> mnesia:add_table_copy(Tab, Node, Type) RX> RX> UW> RX> RX> UW> where Type == ram_copies, if it's a RAM replica you want to add. RX> RX> UW> RX> RX> UW> Removing a replica: RX> RX> UW> RX> RX> UW> mnesia:del_table_copy(Tab, Node) RX> RX> UW> RX> RX> UW> Regards, RX> RX> UW> Ulf W From dgud@REDACTED Fri Feb 17 10:20:40 2006 From: dgud@REDACTED (Dan Gudmundsson) Date: Fri, 17 Feb 2006 10:20:40 +0100 Subject: mnesia question In-Reply-To: <009b01c63351$26960010$400fa8c0@HP78819433158> References: <004201c12062$406e7870$400fa8c0@HP78819433158> <009b01c63351$26960010$400fa8c0@HP78819433158> Message-ID: <17397.38248.707155.419589@rian.du.uab.ericsson.se> Renyi Xiong writes: > what if one node participant fails to respond (machine down or network down) > during commit process while the coordinator waiting for commit vote > ('receive' waits forever for a message, right?) > > the reason why I'm asking this question is that: > > our system is designed to handle thousands of write transactions a second > and to have multiple replicas to provide fault tolerance. if one replica > down and fails to send 'mnesia_down' message. there is a good chance that a > commit process is on going. > > does 'mnesia_monitor' on coordinator node handle that? Yes. :-) /Dan > > Thanks, > Renyi. > > ----- Original Message ----- > From: "Hakan Mattsson" > To: "Renyi Xiong" > Cc: "Ulf Wiger (AL/EAB)" ; > > Sent: Tuesday, February 14, 2006 2:04 AM > Subject: Re: mnesia question > > > On Wed, 8 Aug 2001, Renyi Xiong wrote: > > RX> Thanks guys, > RX> It's really helpful for us to understand how Mnesia works. > RX> > RX> 1.My understanding is when one node initiates a write operation it sends > a > RX> message to each of the replicas at same time and doesn't care the write > RX> transaction status on other replicas. It's up to the transaction handler > on > RX> each node to handle the write transaction separately. Is that right? > > Yes, this is true for normal transactions using > 2pc. But it is not as bad as it sounds as the > transaction recovery protocol ensures that the > outcome of the transaction always is atomic. > > If needed, Mnesia will automatically use 3pc as > transaction protocol. It is slower, but takes > care of transactions operating on multiple tables > which are replicated asymmetrically. > > RX> 2.How do I know the write operation succeeds on at least > RX> on of the replicas including the one which initiates it? > > Use mnesia:sync_transaction/1. It waits for all > participating nodes to complete their commit work > before it returns. It is slower, but needed in > some applications. > > /H?kan > > RX> Thanks, > RX> Renyi. > RX> > RX> ----- Original Message ----- From: "Hakan Mattsson" > > RX> To: "Ulf Wiger (AL/EAB)" > RX> Cc: "Renyi Xiong" ; ; > RX> > RX> Sent: Monday, February 13, 2006 8:54 AM > RX> Subject: RE: mnesia question > RX> > RX> > RX> On Mon, 13 Feb 2006, Ulf Wiger (AL/EAB) wrote: > RX> > RX> UW> Renyi Xiong wrote: > RX> UW> > > RX> UW> > 1. what happens if one of (not all of) the RAM replicas of > RX> UW> > Mnesia table fails when doing write operation? write fails? > RX> UW> > RX> UW> If you are using transactions, chances are good that mnesia > RX> UW> will be able to follow through after all. The transaction > RX> UW> is completed as an 'asymmetric' transaction, and the failed > RX> UW> node gets the opportunity to update itself later. > RX> > RX> Yes, the transaction is completed consistently on the > RX> surviving nodes. On the node(s) where Mnesia fails to > RX> write, Mnesia will be terminated. When Mnesia later is > RX> started on these nodes, it will pick the table contents > RX> from the surviving node(s). This fundamental behavior > RX> is the same for all types of transactions as well as > RX> for dirty writes. > RX> > RX> For transactions using 3pc, the recovery procedure is > RX> more complicated as the failing nodes may need to > RX> determine the outcome of the transaction before the > RX> transaction log can be processed. 3pc is used for > RX> transactions involving updates of the schema or > RX> asymmetrically replicated tables. > RX> > RX> UW> (Of course, assuming that the failed node is not the > RX> UW> one that initiated the transaction.) > RX> > RX> The recovery procedure is the same, even if it was the > RX> failing node that initiated the transaction. > RX> > RX> UW> If you're using dirty writes, you may end up with > RX> UW> database inconsistency. Don't use dirty writes on > RX> UW> replicated tables unless you really really know what > RX> UW> you're doing. > RX> > RX> This is a good general advice. > RX> > RX> Using dirty writes on replicated tables, is about as > RX> hazardous as using master nodes, using the > RX> max_wait_for_decision configuration parameter or to > RX> force load tables. Elaborating with these mechanisms > RX> may easily end up with an inconsistent database as > RX> they bypasses the transaction recovery procedure in > RX> Mnesia. Sometime it is necessary to use these > RX> mechanisms, but use them with care. > RX> > RX> /H?kan > RX> > RX> UW> > 2. Is Mnesia table RAM replica distributable across VPN network? > RX> UW> > RX> UW> If you can get Distributed Erlang to work, you will be able to > RX> UW> replicate mnesia tables. Without Distributed Erlang - no > replication. > RX> UW> > RX> UW> > RX> UW> > 3. Is possible to add and remove RAM replica dynamically? > RX> UW> > RX> UW> Yes, using the function > RX> UW> > RX> UW> mnesia:add_table_copy(Tab, Node, Type) > RX> UW> > RX> UW> where Type == ram_copies, if it's a RAM replica you want to add. > RX> UW> > RX> UW> Removing a replica: > RX> UW> > RX> UW> mnesia:del_table_copy(Tab, Node) > RX> UW> > RX> UW> Regards, > RX> UW> Ulf W From bertil.karlsson@REDACTED Fri Feb 17 13:43:57 2006 From: bertil.karlsson@REDACTED (Bertil Karlsson) Date: Fri, 17 Feb 2006 13:43:57 +0100 Subject: xmerl - Line Numbers ?? whitespace_was_expected In-Reply-To: <43F5B0CE.70102@ericsson.com> References: <06ff01c633ae$122be330$5f00a8c0@wavenet.lk> <43F5B0CE.70102@ericsson.com> Message-ID: <43F5C50D.6070701@ericsson.com> What I intended to write was that xmerl failed on counting line numbers when expanding PE references. This was one major issue causing bad line numbers. /Bertil Bertil Karlsson wrote: > Next version os xmerl, which is coming soon, has better accuracy in > telling where the error occured. One thing xmerl failed on earlier was > expansion of parameter entities. > > /Bertil > > > Sanjaya Vitharana wrote: > >> Hi ...!!! >> >> vxml_test.vxml >> >> >> >> >> >> ---------------------------------------- >> Just try to parse the above vxml_test.vxml (3 line), with vxml.dtd >> from http://www.w3.org/TR/voicexml21/vxml.dtd as >> xmerl_scan:file("vxml_test.vxml",[{validation,true},{doctype_DTD, >> "vxml.dtd"}]). >> >> Question: >> 1.) {error,{whitespace_was_expected}} - what means this ??? I can't >> see anythig wrong in line 109 as shown by the xmerl_scan. Also can be >> there any errors after W3C pepole publised it ? >> >> 2.) But with commenting "> moved to the {line,165}. That means something wrong/unsupported >> within the above lines. Can anyone explane this ??? >> >> 3.) Also I think the Line numbers shown incorrectly??? >> >> Below the complete error I have got >> >> 67> xmerl_scan:file("vxml_test.vxml",[{validation,true},{doctype_DTD, >> "vxml.dtd"}]). 3690- fatal: {error,{whitespace_was_expected}} >> ** exited: {fatal,{{error,{whitespace_was_expected}}, >> {file,"./vxml.dtd"}, >> {line,109}, >> {col,30}}} ** >> 68> >> >> >> Thanks in advance >> >> Sanjaya Vitharana > > From serge@REDACTED Fri Feb 17 17:10:18 2006 From: serge@REDACTED (Serge Aleynikov) Date: Fri, 17 Feb 2006 11:10:18 -0500 Subject: Strange behavior (for me) In-Reply-To: References: Message-ID: <43F5F56A.8080408@hq.idt.net> $ erl -mnesia dir '"/tmp"' Erlang (BEAM) emulator version 5.4.12 [source] [hipe] [threads:0] Eshell V5.4.12 (abort with ^G) 1> mnesia:start(). ok Taavi Talvik wrote: > > erl -mnesia dir /tmp > Erlang (BEAM) emulator version 5.4.12 [source] [hipe] [threads:0] > [kernel-poll] > > Eshell V5.4.12 (abort with ^G) > 1> mnesia:start(). > > =ERROR REPORT==== 17-Feb-2006::11:59:20 === > application_controller: syntax error before: '/': /tmp > {error,{bad_environment_value,"/tmp"}} > > System: > FreeBSD 6.0-RELEASE #0: Thu Nov 3 09:36:13 UTC 2005 > root@REDACTED:/usr/obj/usr/src/sys/GENERIC > > Erlang compiled from port: > erlang-r10b9,1 > # $FreeBSD: ports/lang/erlang/Makefile,v 1.81 2006/02/04 23:52:18 > olgeni Exp $ > > > > best regards, > taavi > > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From olivier@REDACTED Fri Feb 17 17:12:13 2006 From: olivier@REDACTED (olivier) Date: Fri, 17 Feb 2006 17:12:13 +0100 Subject: Strange behavior (for me) In-Reply-To: References: Message-ID: <43F5F5DD.6030304@dolphian.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Taavi Talvik wrote: >> erl -mnesia dir /tmp > Erlang (BEAM) emulator version 5.4.12 [source] [hipe] [threads:0] > [kernel-poll] > > Eshell V5.4.12 (abort with ^G) > 1> mnesia:start(). > > =ERROR REPORT==== 17-Feb-2006::11:59:20 === > application_controller: syntax error before: '/': /tmp > {error,{bad_environment_value,"/tmp"}} try erl -mnesia dir '"/tmp"' ? - -- Olivier -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFD9fXdpqVXaJzJYNIRAvdRAJ4tGnpNBfcGINHXqp8jgh1PG2J1wgCdHQzK /H3tOUO1JrKBRKEEF11JlHM= =Seyh -----END PGP SIGNATURE----- From ke.han@REDACTED Sat Feb 18 13:33:39 2006 From: ke.han@REDACTED (ke.han) Date: Sat, 18 Feb 2006 20:33:39 +0800 Subject: putty lock up connecting to ssh_sshd Message-ID: <43F71423.7060302@redstarling.com> I am starting ssh_sshd on a freebsd 6 server running erlang (starting from yaws). 1> ssh_sshd:listen(3322, [{user_passwords, [{"admin","admin"}]}]). {ok,<0.33.0>} I then go to my windows client and run putty, connecting to port 3322 on the appropriate ip. I receive the username and admin prompts to which I respectively reply admin and admin. My terminal responds by showing my the erlang shell as expected but then putty accepts no further input. Its simply locked up. The erlang server does not show any errors (until I close putty and get a disconnect). I have also tried to log in from a windows erlang shell with: ssh_ssh:connect("192.168.1.4", 3322, []). This first asks me if I want to accept the host address to which I reply "y". Then I get the following error on my erlang windows shell: ** exited: {error,enoent} ** again, no errors on the server shell. If I do the same thing with the server name mapping instead of the ip, I get the same results. Anyone else experience this? thanks, ke han From serge@REDACTED Sat Feb 18 15:42:40 2006 From: serge@REDACTED (Serge Aleynikov) Date: Sat, 18 Feb 2006 09:42:40 -0500 Subject: putty lock up connecting to ssh_sshd In-Reply-To: <43F71423.7060302@redstarling.com> References: <43F71423.7060302@redstarling.com> Message-ID: <43F73260.6020103@hq.idt.net> Do you have the HOME environment variable set? If not do set it to point to some existing directory, before starting an SSH server. See if this helps. Serge ke.han wrote: > I am starting ssh_sshd on a freebsd 6 server running erlang (starting > from yaws). > > 1> ssh_sshd:listen(3322, [{user_passwords, [{"admin","admin"}]}]). > {ok,<0.33.0>} > > I then go to my windows client and run putty, connecting to port 3322 on > the appropriate ip. > I receive the username and admin prompts to which I respectively reply > admin and admin. > My terminal responds by showing my the erlang shell as expected but then > putty accepts no further input. Its simply locked up. > > The erlang server does not show any errors (until I close putty and get > a disconnect). > > I have also tried to log in from a windows erlang shell with: > > ssh_ssh:connect("192.168.1.4", 3322, []). > > > This first asks me if I want to accept the host address to which I reply > "y". Then I get the following error on my erlang windows shell: > > ** exited: {error,enoent} ** > > > again, no errors on the server shell. > If I do the same thing with the server name mapping instead of the ip, I > get the same results. > > Anyone else experience this? > thanks, ke han > From lennart.ohman@REDACTED Sat Feb 18 17:48:53 2006 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Sat, 18 Feb 2006 17:48:53 +0100 Subject: putty lock up connecting to ssh_sshd In-Reply-To: <43F73260.6020103@hq.idt.net> Message-ID: Hi, I have been experimenting with Putty too and found it not to work well (not at all) with the erlang ssh server. The main reasons seems to be that the putty terminal identifies it self as version 1.99 which should mean version 1 or 2 if I am not mistaken. But the server does not handle this. The responsible person in the OTP team is notified. /Lennart ------------------------------------------------------------- Lennart Ohman office : +46-8-587 623 27 Sjoland & Thyselius Telecom AB cellular: +46-70-552 67 35 Sehlstedtsgatan 6 fax : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED > -----Original Message----- > From: owner-erlang-questions@REDACTED [mailto:owner-erlang- > questions@REDACTED] On Behalf Of Serge Aleynikov > Sent: Saturday, February 18, 2006 3:43 PM > To: ke.han > Cc: erlang-questions > Subject: Re: putty lock up connecting to ssh_sshd > > Do you have the HOME environment variable set? If not do set it to > point to some existing directory, before starting an SSH server. > > See if this helps. > > Serge > > ke.han wrote: > > I am starting ssh_sshd on a freebsd 6 server running erlang (starting > > from yaws). > > > > 1> ssh_sshd:listen(3322, [{user_passwords, [{"admin","admin"}]}]). > > {ok,<0.33.0>} > > > > I then go to my windows client and run putty, connecting to port 3322 on > > the appropriate ip. > > I receive the username and admin prompts to which I respectively reply > > admin and admin. > > My terminal responds by showing my the erlang shell as expected but then > > putty accepts no further input. Its simply locked up. > > > > The erlang server does not show any errors (until I close putty and get > > a disconnect). > > > > I have also tried to log in from a windows erlang shell with: > > > > ssh_ssh:connect("192.168.1.4", 3322, []). > > > > > > This first asks me if I want to accept the host address to which I reply > > "y". Then I get the following error on my erlang windows shell: > > > > ** exited: {error,enoent} ** > > > > > > again, no errors on the server shell. > > If I do the same thing with the server name mapping instead of the ip, I > > get the same results. > > > > Anyone else experience this? > > thanks, ke han > > From neumann@REDACTED Sun Feb 19 22:45:43 2006 From: neumann@REDACTED (Francois-Denis Gonthier) Date: Sun, 19 Feb 2006 16:45:43 -0500 Subject: Erlang licenses Message-ID: <200602191645.45383.neumann@lostwebsite.net> Hello all, Erlang 10.b.9-2 have been rejected for inclusion in Debian unstable because of an incomplete copyright file. Truthfully, lib/edoc and lib/syntax_tools are under an LGPL license. I've added LGPL to the regulatory copyright file. I suppose the rest is under the Erlang Public License. Is it safe to suppose this? F-D -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From rxiong@REDACTED Fri Feb 17 20:40:34 2006 From: rxiong@REDACTED (Renyi Xiong) Date: Fri, 17 Feb 2006 11:40:34 -0800 Subject: mnesia question References: <004201c12062$406e7870$400fa8c0@HP78819433158> <009b01c63351$26960010$400fa8c0@HP78819433158> Message-ID: <00cb01c633fa$07a6a480$400fa8c0@HP78819433158> That's wonderful. Since I don't wait for participants to complete their job (except local node?) if I use 'mnesia:transaction/1' instead of 'mnesia:sync_transaction/1', plus Mnesia put transaction logs onto disk even if database is RAM based (right?), RAM based database in this case (multiple replicas using 'mnesia:transaction/1') doesn't make much difference, is that right? Thanks a lot for your help, Renyi. ----- Original Message ----- From: "Hakan Mattsson" To: "Renyi Xiong" Cc: ; "Tony Zheng" ; ; "Ulf Wiger (AL/EAB)" Sent: Friday, February 17, 2006 1:57 AM Subject: Re: mnesia question On Thu, 16 Feb 2006, Renyi Xiong wrote: RX> what if one node participant fails to respond (machine down or network down) RX> during commit process while the coordinator waiting for commit vote RX> ('receive' waits forever for a message, right?) Mnesia detects that and re-runs the transaction. Se below. Transaction recovery is a fundamental functionality in Mnesia as well as in all other DBMS's. RX> the reason why I'm asking this question is that: RX> RX> our system is designed to handle thousands of write transactions a second RX> and to have multiple replicas to provide fault tolerance. if one replica RX> down and fails to send 'mnesia_down' message. there is a good chance that a RX> commit process is on going. RX> RX> does 'mnesia_monitor' on coordinator node handle that? Yes, all mnesia_monitor's are linked to each others. When mnesia_monitor detects that some of the others are down, it will tell all coordinators and participants (via mnesia_tm) on the local node about it. The coordinators and participants will then act accoringly and recover their own transactions. /H?kan RX> Thanks, RX> Renyi. RX> RX> ----- Original Message ----- From: "Hakan Mattsson" RX> To: "Renyi Xiong" RX> Cc: "Ulf Wiger (AL/EAB)" ; RX> RX> Sent: Tuesday, February 14, 2006 2:04 AM RX> Subject: Re: mnesia question RX> RX> RX> On Wed, 8 Aug 2001, Renyi Xiong wrote: RX> RX> RX> Thanks guys, RX> RX> It's really helpful for us to understand how Mnesia works. RX> RX> RX> RX> 1.My understanding is when one node initiates a write operation it sends RX> a RX> RX> message to each of the replicas at same time and doesn't care the write RX> RX> transaction status on other replicas. It's up to the transaction handler RX> on RX> RX> each node to handle the write transaction separately. Is that right? RX> RX> Yes, this is true for normal transactions using RX> 2pc. But it is not as bad as it sounds as the RX> transaction recovery protocol ensures that the RX> outcome of the transaction always is atomic. RX> RX> If needed, Mnesia will automatically use 3pc as RX> transaction protocol. It is slower, but takes RX> care of transactions operating on multiple tables RX> which are replicated asymmetrically. RX> RX> RX> 2.How do I know the write operation succeeds on at least RX> RX> on of the replicas including the one which initiates it? RX> RX> Use mnesia:sync_transaction/1. It waits for all RX> participating nodes to complete their commit work RX> before it returns. It is slower, but needed in RX> some applications. RX> RX> /H?kan RX> RX> RX> Thanks, RX> RX> Renyi. RX> RX> RX> RX> ----- Original Message ----- From: "Hakan Mattsson" RX> RX> RX> To: "Ulf Wiger (AL/EAB)" RX> RX> Cc: "Renyi Xiong" ; ; RX> RX> RX> RX> Sent: Monday, February 13, 2006 8:54 AM RX> RX> Subject: RE: mnesia question RX> RX> RX> RX> RX> RX> On Mon, 13 Feb 2006, Ulf Wiger (AL/EAB) wrote: RX> RX> RX> RX> UW> Renyi Xiong wrote: RX> RX> UW> > RX> RX> UW> > 1. what happens if one of (not all of) the RAM replicas of RX> RX> UW> > Mnesia table fails when doing write operation? write fails? RX> RX> UW> RX> RX> UW> If you are using transactions, chances are good that mnesia RX> RX> UW> will be able to follow through after all. The transaction RX> RX> UW> is completed as an 'asymmetric' transaction, and the failed RX> RX> UW> node gets the opportunity to update itself later. RX> RX> RX> RX> Yes, the transaction is completed consistently on the RX> RX> surviving nodes. On the node(s) where Mnesia fails to RX> RX> write, Mnesia will be terminated. When Mnesia later is RX> RX> started on these nodes, it will pick the table contents RX> RX> from the surviving node(s). This fundamental behavior RX> RX> is the same for all types of transactions as well as RX> RX> for dirty writes. RX> RX> RX> RX> For transactions using 3pc, the recovery procedure is RX> RX> more complicated as the failing nodes may need to RX> RX> determine the outcome of the transaction before the RX> RX> transaction log can be processed. 3pc is used for RX> RX> transactions involving updates of the schema or RX> RX> asymmetrically replicated tables. RX> RX> RX> RX> UW> (Of course, assuming that the failed node is not the RX> RX> UW> one that initiated the transaction.) RX> RX> RX> RX> The recovery procedure is the same, even if it was the RX> RX> failing node that initiated the transaction. RX> RX> RX> RX> UW> If you're using dirty writes, you may end up with RX> RX> UW> database inconsistency. Don't use dirty writes on RX> RX> UW> replicated tables unless you really really know what RX> RX> UW> you're doing. RX> RX> RX> RX> This is a good general advice. RX> RX> RX> RX> Using dirty writes on replicated tables, is about as RX> RX> hazardous as using master nodes, using the RX> RX> max_wait_for_decision configuration parameter or to RX> RX> force load tables. Elaborating with these mechanisms RX> RX> may easily end up with an inconsistent database as RX> RX> they bypasses the transaction recovery procedure in RX> RX> Mnesia. Sometime it is necessary to use these RX> RX> mechanisms, but use them with care. RX> RX> RX> RX> /H?kan RX> RX> RX> RX> UW> > 2. Is Mnesia table RAM replica distributable across VPN network? RX> RX> UW> RX> RX> UW> If you can get Distributed Erlang to work, you will be able to RX> RX> UW> replicate mnesia tables. Without Distributed Erlang - no RX> replication. RX> RX> UW> RX> RX> UW> RX> RX> UW> > 3. Is possible to add and remove RAM replica dynamically? RX> RX> UW> RX> RX> UW> Yes, using the function RX> RX> UW> RX> RX> UW> mnesia:add_table_copy(Tab, Node, Type) RX> RX> UW> RX> RX> UW> where Type == ram_copies, if it's a RAM replica you want to add. RX> RX> UW> RX> RX> UW> Removing a replica: RX> RX> UW> RX> RX> UW> mnesia:del_table_copy(Tab, Node) RX> RX> UW> RX> RX> UW> Regards, RX> RX> UW> Ulf W From rxiong@REDACTED Fri Feb 17 20:40:34 2006 From: rxiong@REDACTED (Renyi Xiong) Date: Fri, 17 Feb 2006 11:40:34 -0800 Subject: mnesia question References: <004201c12062$406e7870$400fa8c0@HP78819433158> <009b01c63351$26960010$400fa8c0@HP78819433158> Message-ID: <00cb01c633fa$07a6a480$400fa8c0@HP78819433158> That's wonderful. Since I don't wait for participants to complete their job (except local node?) if I use 'mnesia:transaction/1' instead of 'mnesia:sync_transaction/1', plus Mnesia put transaction logs onto disk even if database is RAM based (right?), RAM based database in this case (multiple replicas using 'mnesia:transaction/1') doesn't make much difference, is that right? Thanks a lot for your help, Renyi. ----- Original Message ----- From: "Hakan Mattsson" To: "Renyi Xiong" Cc: ; "Tony Zheng" ; ; "Ulf Wiger (AL/EAB)" Sent: Friday, February 17, 2006 1:57 AM Subject: Re: mnesia question On Thu, 16 Feb 2006, Renyi Xiong wrote: RX> what if one node participant fails to respond (machine down or network down) RX> during commit process while the coordinator waiting for commit vote RX> ('receive' waits forever for a message, right?) Mnesia detects that and re-runs the transaction. Se below. Transaction recovery is a fundamental functionality in Mnesia as well as in all other DBMS's. RX> the reason why I'm asking this question is that: RX> RX> our system is designed to handle thousands of write transactions a second RX> and to have multiple replicas to provide fault tolerance. if one replica RX> down and fails to send 'mnesia_down' message. there is a good chance that a RX> commit process is on going. RX> RX> does 'mnesia_monitor' on coordinator node handle that? Yes, all mnesia_monitor's are linked to each others. When mnesia_monitor detects that some of the others are down, it will tell all coordinators and participants (via mnesia_tm) on the local node about it. The coordinators and participants will then act accoringly and recover their own transactions. /H?kan RX> Thanks, RX> Renyi. RX> RX> ----- Original Message ----- From: "Hakan Mattsson" RX> To: "Renyi Xiong" RX> Cc: "Ulf Wiger (AL/EAB)" ; RX> RX> Sent: Tuesday, February 14, 2006 2:04 AM RX> Subject: Re: mnesia question RX> RX> RX> On Wed, 8 Aug 2001, Renyi Xiong wrote: RX> RX> RX> Thanks guys, RX> RX> It's really helpful for us to understand how Mnesia works. RX> RX> RX> RX> 1.My understanding is when one node initiates a write operation it sends RX> a RX> RX> message to each of the replicas at same time and doesn't care the write RX> RX> transaction status on other replicas. It's up to the transaction handler RX> on RX> RX> each node to handle the write transaction separately. Is that right? RX> RX> Yes, this is true for normal transactions using RX> 2pc. But it is not as bad as it sounds as the RX> transaction recovery protocol ensures that the RX> outcome of the transaction always is atomic. RX> RX> If needed, Mnesia will automatically use 3pc as RX> transaction protocol. It is slower, but takes RX> care of transactions operating on multiple tables RX> which are replicated asymmetrically. RX> RX> RX> 2.How do I know the write operation succeeds on at least RX> RX> on of the replicas including the one which initiates it? RX> RX> Use mnesia:sync_transaction/1. It waits for all RX> participating nodes to complete their commit work RX> before it returns. It is slower, but needed in RX> some applications. RX> RX> /H?kan RX> RX> RX> Thanks, RX> RX> Renyi. RX> RX> RX> RX> ----- Original Message ----- From: "Hakan Mattsson" RX> RX> RX> To: "Ulf Wiger (AL/EAB)" RX> RX> Cc: "Renyi Xiong" ; ; RX> RX> RX> RX> Sent: Monday, February 13, 2006 8:54 AM RX> RX> Subject: RE: mnesia question RX> RX> RX> RX> RX> RX> On Mon, 13 Feb 2006, Ulf Wiger (AL/EAB) wrote: RX> RX> RX> RX> UW> Renyi Xiong wrote: RX> RX> UW> > RX> RX> UW> > 1. what happens if one of (not all of) the RAM replicas of RX> RX> UW> > Mnesia table fails when doing write operation? write fails? RX> RX> UW> RX> RX> UW> If you are using transactions, chances are good that mnesia RX> RX> UW> will be able to follow through after all. The transaction RX> RX> UW> is completed as an 'asymmetric' transaction, and the failed RX> RX> UW> node gets the opportunity to update itself later. RX> RX> RX> RX> Yes, the transaction is completed consistently on the RX> RX> surviving nodes. On the node(s) where Mnesia fails to RX> RX> write, Mnesia will be terminated. When Mnesia later is RX> RX> started on these nodes, it will pick the table contents RX> RX> from the surviving node(s). This fundamental behavior RX> RX> is the same for all types of transactions as well as RX> RX> for dirty writes. RX> RX> RX> RX> For transactions using 3pc, the recovery procedure is RX> RX> more complicated as the failing nodes may need to RX> RX> determine the outcome of the transaction before the RX> RX> transaction log can be processed. 3pc is used for RX> RX> transactions involving updates of the schema or RX> RX> asymmetrically replicated tables. RX> RX> RX> RX> UW> (Of course, assuming that the failed node is not the RX> RX> UW> one that initiated the transaction.) RX> RX> RX> RX> The recovery procedure is the same, even if it was the RX> RX> failing node that initiated the transaction. RX> RX> RX> RX> UW> If you're using dirty writes, you may end up with RX> RX> UW> database inconsistency. Don't use dirty writes on RX> RX> UW> replicated tables unless you really really know what RX> RX> UW> you're doing. RX> RX> RX> RX> This is a good general advice. RX> RX> RX> RX> Using dirty writes on replicated tables, is about as RX> RX> hazardous as using master nodes, using the RX> RX> max_wait_for_decision configuration parameter or to RX> RX> force load tables. Elaborating with these mechanisms RX> RX> may easily end up with an inconsistent database as RX> RX> they bypasses the transaction recovery procedure in RX> RX> Mnesia. Sometime it is necessary to use these RX> RX> mechanisms, but use them with care. RX> RX> RX> RX> /H?kan RX> RX> RX> RX> UW> > 2. Is Mnesia table RAM replica distributable across VPN network? RX> RX> UW> RX> RX> UW> If you can get Distributed Erlang to work, you will be able to RX> RX> UW> replicate mnesia tables. Without Distributed Erlang - no RX> replication. RX> RX> UW> RX> RX> UW> RX> RX> UW> > 3. Is possible to add and remove RAM replica dynamically? RX> RX> UW> RX> RX> UW> Yes, using the function RX> RX> UW> RX> RX> UW> mnesia:add_table_copy(Tab, Node, Type) RX> RX> UW> RX> RX> UW> where Type == ram_copies, if it's a RAM replica you want to add. RX> RX> UW> RX> RX> UW> Removing a replica: RX> RX> UW> RX> RX> UW> mnesia:del_table_copy(Tab, Node) RX> RX> UW> RX> RX> UW> Regards, RX> RX> UW> Ulf W From martin.logan@REDACTED Fri Feb 17 23:52:07 2006 From: martin.logan@REDACTED (Martin Logan) Date: Fri, 17 Feb 2006 16:52:07 -0600 Subject: Why no news Message-ID: I have not been too active on the erlang list for a while. It has been bugging me. I have been developing software in JSP, .NET, PHP, Ruby on Rails and Python (we could do a much better web framework than rails or django IMHO). It has been a learning experience but I have been beating myself up because weather my job requires it or not, I need to get back to erlang (because it is better). So, here I come, and my first stop www.erlang.org and I notice that first entry in the news section is from July 28, 2004. Frightening, what is going on, are things slowing down, where the announcements of new things? I know the list is active because I still lurk on it. How about some more recent dates on the HP. Just a thought (and I realize I have done nothing to help things) Cheers, Martin ClearPace Martin J. Logan ClearPace martin.logan@REDACTED tel: mobile: 708-497-4576 ex 576 630-991-0082 Add me to your address book... Want a signature like this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From announcer@REDACTED Sat Feb 18 06:35:58 2006 From: announcer@REDACTED (DSD 2006) Date: Fri, 17 Feb 2006 21:35:58 -0800 Subject: DSD 2006 - Call For Papers - 9th EUROMICRO CONFERENCE ON DIGITAL SYSTEM DESIGN Message-ID: <346dc124f607b04fa9f15f1b44c9e1ee@confman.org> Our apologies if this is a duplicate email. @@@@@@@@@@@@@@@@@@@@@ DSD 2006 CALL FOR PAPERS @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ DSD?2006 9th EUROMICRO CONFERENCE ON DIGITAL SYSTEM DESIGN Architectures, Methods and Tools Cavtat near Dubrovnik, Croatia August 30th - September 1st, 2006 THIRD Call for Papers Distribution @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Important Dates: Submission of papers: March 15th, 2006 (Extended*) Notification of acceptance: May 3rd, 2006 Deadline for final version: June 9th, 2006 * due to many requests from potential authors the submission deadline is extended to March 15 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ The Program Committee will be grateful if the posters are distrubuted to other potential authors. DSD 2006 POSTERS @ http://www.confman.org/dsd06/posters/DSD-2006-posterf.pdf @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Euromicro Conference on Digital System Design (DSD) addresses all aspects of (embedded) digital and mixed hardware/software system engineering. It is a discussion forum for researchers and engineers working on state-of-the art investigations, development, and applications. It focuses on advanced system, design, and design automation concepts, paradigms, methods and tools, as well as, modern implementation technologies that enable effective and efficient development of high-quality (embedded) systems for important and demanding applications in fields such as (wireless) communication and networking; measurement and instrumentation; health-care and medicine; military, space, avionic and automotive systems; security; multi-media and ambient intelligence. The main areas of interest are the following: T1: Systems-on-a-chip/in-a-package: generic system platforms and platform-based design; network on chip; multi-processors; system on re-configurable chip; system FPGAs and structured ASICs; rapid prototyping; asynchronous systems; power, energy, timing, predictability and other quality issues; intellectual property, virtual components and design reuse. T2: Programmable/re-configurable architectures: processor, communication, memory and software architectures with focus on application specific and/or embedded computing, co-processors; processing arrays; programmable fabrics; embedded software; arithmetic, logic and special-operator units. T3: System, hardware and embedded software specification, modeling and validation: design languages; functional, structural and parametric specification and modeling; simulation, emulation, prototyping, and testing at the system, register-transfer, logic and physical levels; co-simulation and co verification. T4: System, hardware and embedded software synthesis: system, hardware/software and embedded software synthesis; behavioral, register-transfer, logic and physical circuit synthesis; multi-objective optimization observing power, performance, communication, interconnections, layout, technology, reliability, robustness, security, testability and other issues; (dynamic) management of computational resources, power, energy etc.; design environments for embedded systems and re-configurable computing. T5: Emerging technologies, system paradigms and design methodologies: optical, bio, nano and quantum technologies and computing; self-organizing and self adapting (wireless) systems; wireless sensor networks; ambient intelligence and augmented reality; ubiquitous, wearable and implanted systems; deep sub-micron design issues. T6: Applications of (embedded) digital systems with emphasis on demanding and new applications in fields such as: (wireless) communication and networking; measurement and instrumentation; health-care and medicine; military, space, avionic and automotive systems; security; multi-media, instrumentation and ambient intelligence; health-care and medicine; military, space, avionic and automotive systems; security; multi-media and ambient intelligence. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Special Topics and Sessions: ST1 (keynote): Design Methodology for Integrated Digital RF, Texsas Instruments TITLE: "Reinventing Design Methodology for Integrated 'Digital RF'". Dr. Roman Staszewski Design Manager, DRP Design, WTBU Texas Instruments SUMMARY: Both digital and RF/analog designers can claim they have proven and sufficient design methodologies. The luxury of isolation let them perfect their own world without any concern for the other. But, the world demands efficiency, the latest technology for pennies. While tight integration of RF and digital in SOC is the cost effective answer, it opens a design methodology Pandora Box. What previously could be ignored, has to be considered. What was proven and sufficient, may not work anymore. The resulting paradigm change affects all aspects of the design process from system architecture to circuit design to validation to test. SS1: Resource-Aware Sensor Network Systems SCOPE: The special session on ?Resource-Aware Sensor Network Systems? addresses concepts, implementations and applications of sensor network systems, as well as, new architectural models and hardware solutions in the sensor network domain. Papers on any of the following and re-lated topics will be considered for the special session: ? Sensor network concepts and architectures ? Sensing, processing and communicating on a chip ? Low-power and low-energy computation and communication ? Communication-computation trade-offs ? Resource-aware SW/HW Co-design ? Position determination and synchronization in sensor networks ? Fault-tolerance, dependability and robustness ? Prototypes and applications SESSION ORGANIZER: M. Handy, University of Rostock (DE)- matthias.handy@REDACTED SPECIAL SESSION SS1 WEB PAGE: http://www-md.e-technik.uni-rostock.de/ma/hm13/dsd06 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Special Session SS2: Low-Power and High-Performance Networks-on-Chip SCOPE Although this special session addresses all aspects related to concepts, implementations and applications of networks-on-chip and related EDA tools, its focus is on low-power and high-performance aspects. Papers on any of the following and related topics will be considered for the special session: ? Network-on-Chip concepts and architectures ? Application-specific communication on a chip and network topology ? Routing schemes, switch concepts, layouts, and signal transmission ? Low-power, low-energy and high-performance computation and communication ? Communication/computation and energy/performance trade-offs ? Static power minimization and dynamic power management ? Data coding, error detection, fault-tolerance and robustness ? Prototypes and applications Session Organizer: C. Cornelius, University of Rostock (DE) - claas.cornelius@REDACTED Special Session web page: http://www-md.e-technik.uni-rostock.de/ma/cc14/dsd06/ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Panel Sessions and Embedded Tutorials: Proposals for panel sessions and embedded tutorials are especially welcome. Please contact Program Chair (venki@REDACTED). Submission of papers: Regular Papers: Submissions can be made that describe innovative work in the scope of the Conference, and especially, in any of the above main areas of interest (please indicate the topic area). If you are submitting to a track please indicate the track area on the paper as: SS1 or SS2. Prospective authors are encouraged to submit their manuscripts for review electronically trough the following web page (http://www.dsdconf.org/) or by sending the paper to the Program Chair via email venki@REDACTED (only in the case of the web access problem) before the deadline for submission. Each manuscript should include the complete paper text, all illustrations, and references. The manuscript should conform to the required format single-spaced, double column, A4/US letter page size, 10-point size Times Roman font, up to 8 pages. In order to conduct a blind review, no indication of the authors' names should appear in the submitted manuscript. Case Study and Application Papers: Submissions can be made which report on state-of-the-art digital systems, design methods and/or tools, and (embedded) applications. Papers discussing lessons learned from practical experience, demanding or new applications, and experimental research are particularly encouraged. Manuscripts may be submitted in the same way as regular papers. The Program Committee will decide if papers will be accepted for a long presentation (30 minutes), short presentation (15 minutes), or as a poster. For long and short presentations, 8 pages will be assigned in the published proceedings. A poster presentation will be assigned 4 pages. Papers exceeding the page limit will be charged 50 Euro per page in excess. If the paper is accepted, at least one of the authors must pre-register and pay the conference fee before the deadline for submitting the camera-ready paper. Otherwise the paper will not be published in the proceedings. Check List: Prospective authors should check that the following information are included while submitting the paper(s) for refereeing purpose. () The paper and its title page should not contain the name(s) of the author(s), or their affiliation () The first page of the paper should the following information * Title of the paper * Track Area * Conference topic area (write the most appropriate topic area) * Up to six keywords @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Steering Committee: Chairman: Lech J?zwiak, Eindhoven Univ. of Technology (NL) Krzysztof Kuchcinski, Lund U. (SE) Antonio Nunez, U. Las Palmas (ES) Program Chair: Venki Muthukumar, UNLV, USA Deputy Program Chair: H. Kubatova, Cz. TU. in Prague, (CZ) Organizing General Chair: Prof. Ivica Crnkovic, U. M?lardalen (SE) Organizing Local Chair: Dr. Zoran Kalafatic, U. of Zagreb, Croatia Program Committee: Visit http://www.dsdcong.org/ for a complete list of Program Committee Members. Contact Information: Program Chair: Dr Venki Muthukumar Department of Electrical and Computer Engineering University of Nevada Las Vegas 4505 Maryland Parkway, Box 4026 Las Vegas, NV 89154-4026, USA Phone:??+1 702 895 3566 Fax:??????+1 702 895 4075 email:????venki@REDACTED DSD?06 web page: http://www.dsdconf.org/ Euromicro web page: http://www.euromicro.org/ DSD web page: http://www2.ele.tue.nl/dsd/ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ END OF CFP @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ------------------------------------------- Powered by CcMail 1.0 http://www.cicoandcico.com/products.php?option=ccmail Unsubscribe/Modify: http://www.dsdconf.org//ccmail/index.php?address=erlang-questions@REDACTED From bjorn@REDACTED Mon Feb 20 09:42:48 2006 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 20 Feb 2006 09:42:48 +0100 Subject: Why no news In-Reply-To: References: Message-ID: We haven't kept the News section updated, so now I have deleted it. What what we have done is releasing updates to R10B, nine of them so far, one approximately every other month. /Bjorn "Martin Logan" writes: > I have not been too active on the erlang list for a while. It has been > bugging me. I have been developing software in JSP, .NET, PHP, Ruby on > Rails and Python (we could do a much better web framework than rails or > django IMHO). It has been a learning experience but I have been beating > myself up because weather my job requires it or not, I need to get back > to erlang (because it is better). So, here I come, and my first stop > www.erlang.org and I notice that first entry > in the news section is from July 28, 2004. Frightening, what is going > on, are things slowing down, where the announcements of new things? I > know the list is active because I still lurk on it. How about some more > recent dates on the HP. > > > > Just a thought (and I realize I have done nothing to help things) > > > > Cheers, > > Martin > > ClearPace > > > > > > Martin J. Logan > > ClearPace > > martin.logan@REDACTED > > tel: > mobile: > > 708-497-4576 ex 576 > 630-991-0082 > > > > Add me to your address book... > > > Want a signature like this? > > > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From hakan@REDACTED Mon Feb 20 09:55:37 2006 From: hakan@REDACTED (Hakan Mattsson) Date: Mon, 20 Feb 2006 09:55:37 +0100 (CET) Subject: mnesia question In-Reply-To: <00cb01c633fa$07a6a480$400fa8c0@HP78819433158> References: <004201c12062$406e7870$400fa8c0@HP78819433158> <009b01c63351$26960010$400fa8c0@HP78819433158> <00cb01c633fa$07a6a480$400fa8c0@HP78819433158> Message-ID: On Fri, 17 Feb 2006, Renyi Xiong wrote: RX> That's wonderful. RX> RX> Since I don't wait for participants to complete their job (except local RX> node?) if I use 'mnesia:transaction/1' instead of RX> 'mnesia:sync_transaction/1', plus Mnesia put transaction logs onto disk RX> even if database is RAM based (right?), RAM based database in this case RX> (multiple replicas using 'mnesia:transaction/1') doesn't make much RX> difference, is that right? No, if the database is RAM based there will be no writes to disk at all. In that case the transaction recovery algortithm will rely on that some replica of all (important) tables always will be accessible. A power outage will vipe out the entire RAM database. Neither 'mnesia:transaction/1' nor 'mnesia:sync_transaction/1' ensures that the disk cache is flushed into durable storage. So if you are unlucky the transaction may be lost in both types of transactions. The worst scenario is when you get a power outage on all nodes directly after a transaction commit. In that case the plain 'mnesia:transaction/1' would have a little higher probability to be lost. But remember that both 'mnesia:transaction/1' and 'mnesia:sync_transaction/1' are always atomic. So even if you loose a committed transaction the database will remain consistent. /H?kan From joe.armstrong@REDACTED Mon Feb 20 10:14:17 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Mon, 20 Feb 2006 10:14:17 +0100 Subject: Jaws - coming soon - testers and advice wanted Message-ID: Hello, Progress report - jaws (yaws + templates) is progressing nicely. I have finally "made up my mind" (TM) and decided on a template syntax (two years thought and half a dozen prototypes "down the drain") - a compiler for this syntax has now been up and running for a few weeks and I am finalising the Ajax support. jaws is a template language for yaws (jaws is inspired by PHP, velocity and AJAX) - this posting contains a "first look" at the syntax. I'm not going to describe the semantics - you have to *guess* - it's rather easy. (Hints all webpages and templates get compiled to single functions) A *single* jaws file contains templates for *many* webpages - so that an entire application can be shipped as a single file. Here's a simple example, assumed to be in the file foo.jaws @module foo @webPage test(_)

factorial is @erl fac(0) -> 1; fac(N) -> N * fac(N-1). @webPage form(A)

@webPage posted(A)

Fac is @template red(X) @template banner(X)

Hello ${name:X} i hear you like ${likes:X} @webPage ajax(A)

...
update @webPage myfunc(A) myfunc(Args) -> [replace_contents("tag1", "

Hi .... "]. @webPage redirect(A)

You'll soon be redirected. This defines eight webpages and two templates in one jaws file. It gives examples of - template expansion - form handling - ajax - header manipulation (in the redirect example) << computationally is about 10-20 times faster than PHP and it works for bignums :-) >> It seems to me to be desirable to have the code which handles a form *immediately after the code which defines the form* (and not in another file) - it also seems desirable to be able to program HTML with subroutines, like this: @webPage foo(A) Some html ... ... @template fancy_box(A) .... ...
Note also how the site of ajax call is lexically near to the code which handles the call. javascript:erlcall(M, F, A) allows javascript to call an arbitary Erlang {M,F,A} This is achieved with ajax and a JSON encoding. MFA returns a list of actions that are to be performed on the webpage - ie (replace_contents("tag1" , HTML)) sets the innerHTML field of tag1 to HTML. At this stage I need two things: 1) Testers - a few good people who are interested in this kind of stuff 2) javascript help - the result of myfunc(Args) is a list of actions to be performed on a web page. A typical example is replace_contents(Tag, Html) When this is called in Erlang a JSON encoded term is sent back to the web page and after a little trickery jsReplaceContents(tag, html) is called where function jsReplaceContents(tag, html) { document.getElementById(tag).innerHTML = html; } I have defined a few simple functions (replace_contents(tag, HTML), delete_tag(Tag) etc. But I am really stretching my knowledge of javascript here. If any javascript guru wants to help please contact me. In particular does anybody have any ideas how to do this? If I have this
.... ... click
I want bar() to compute the id if the nearest containing div - in this case "foo" any ideas how to do this? - do I really have to "walk the tree" from the root of the DOM tree? /Joe From rasmussen.bryan@REDACTED Mon Feb 20 10:44:54 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Mon, 20 Feb 2006 10:44:54 +0100 Subject: Jaws - coming soon - testers and advice wanted In-Reply-To: References: Message-ID: <3bb44c6e0602200144n712a2387n47733184cb7ead43@mail.gmail.com> I might be able to do testing, dependent on figuring out my schedule which for the next 4 months is pretty hairy. A propos the javascript: http://mcc.id.au/xpathjs/ xpath in javascript. So perhaps it would be able to run an xpath, assuming that one gave the a element an id : //div[a[@id='myid']] Cheers, Bryan Rasmussen On 2/20/06, Joe Armstrong (AL/EAB) wrote: > > Hello, > > Progress report - jaws (yaws + templates) is progressing nicely. > I have finally "made up my mind" (TM) and decided on a template syntax > (two years thought and half a dozen prototypes "down the drain") - > a compiler for this syntax has now been up and running for a few weeks > and I am finalising the Ajax support. > > jaws is a template language for yaws (jaws is inspired by PHP, velocity > and AJAX) > - this posting contains a "first look" at the syntax. I'm not going to > describe the semantics - you have to *guess* - it's rather easy. > (Hints all webpages and templates get compiled to single functions) > > A *single* jaws file contains templates for *many* webpages - so that an > entire application can be shipped as a single file. > > Here's a simple example, assumed to be in the file foo.jaws > > @module foo > > @webPage test(_) > > >

factorial is > > @erl > fac(0) -> 1; > fac(N) -> N * fac(N-1). > > @webPage form(A) >

> >
> > @webPage posted(A) > N = list_to_integer(N), "" ?> > > > >

Fac is > > @template red(X) > > > @template banner(X) > >

Hello ${name:X} i hear you like ${likes:X} > > @webPage ajax(A) >

> ... >
> > update > > @webPage myfunc(A) > > myfunc(Args) -> > [replace_contents("tag1", "

Hi .... "]. > > @webPage redirect(A) > > >

You'll soon be redirected. > > This defines eight webpages and two templates in one jaws file. It > gives examples of > > - template expansion > - form handling > - ajax > - header manipulation (in the redirect example) > > << computationally is about 10-20 times faster than PHP > and it works for bignums :-) >> > > It seems to me to be desirable to have the code which handles a form > *immediately after the code which defines the form* (and not in another > file) - it also seems desirable to be able to program HTML with > subroutines, like this: > > @webPage foo(A) > > Some html > ... ... > > @template fancy_box(A) > .... ...
> > Note also how the site of ajax call is lexically near to the code which > handles the call. > > javascript:erlcall(M, F, A) allows javascript to call an arbitary Erlang > {M,F,A} > This is achieved with ajax and a JSON encoding. MFA returns a list > of actions that are to be performed on the webpage - ie > (replace_contents("tag1" , HTML)) > sets the innerHTML field of tag1 to HTML. > > At this stage I need two things: > 1) Testers - a few good people who are interested in this kind > of > stuff > 2) javascript help - the result of myfunc(Args) is a list of > actions to be > performed on a web page. A typical example is > > replace_contents(Tag, Html) > > When this is called in Erlang a JSON encoded term is sent > back to the > web page and after a little trickery > > jsReplaceContents(tag, html) is called > > where > > function jsReplaceContents(tag, html) { > document.getElementById(tag).innerHTML = html; > } > > I have defined a few simple functions (replace_contents(tag, HTML), > delete_tag(Tag) etc. > > But I am really stretching my knowledge of javascript here. > > If any javascript guru wants to help please contact me. > > In particular does anybody have any ideas how to do this? > > If I have this > >
> .... > ... click > >
> > I want bar() to compute the id if the nearest containing div - in this > case "foo" any ideas how to do this? - do I really have to "walk the > tree" from the root of the DOM tree? > > /Joe > From ulf.wiger@REDACTED Mon Feb 20 10:54:45 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 20 Feb 2006 10:54:45 +0100 Subject: FW: [Felix-language] Re: Erlang? Message-ID: John Skaller is thinking about using Erlang to improve the build and test environment for felix. I forward it to the list thinking that it might tickle someone's fancy. It doesn't sound terribly different from the challenge of building and testing OTP, right ? (Not Cc:ing the felix-language list. Cross-posting across mailing lists seems a bit absurd...) Regards, Ulf W -----Original Message----- From: skaller [mailto:skaller@REDACTED] Sent: den 20 februari 2006 10:18 To: Ulf Wiger (AL/EAB) Cc: felix-language@REDACTED Subject: RE: [Felix-language] Re: Erlang? On Fri, 2006-02-17 at 10:56 +0100, Ulf Wiger (AL/EAB) wrote: Re Erlang: there is a possible use for Erlang building Felix, unrelated to previous discussions of embedding. At present, Felix defines FOUR platforms: BUILD -- platform you build from source on HOST -- platform you program Felix on, run Felix compiler here TARGET -- platform you compiled generated C++ on RUN -- platform you run compiled C++ on All four platforms can be distinct. A platform is an environment -- a particular computer, a particular OS, particular toolchain. For example we can have BUILD=HOST= Cygwin, TARGET=RUN=Windows where it is the same box, but distinct platforms. But they could be four distinct machines. One consequence is that building the system can be tricky, in particular, it is impossible to run the regression tests if you are, for example, cross compiling on Linux for MinGW target. It is also hard to configure -- the build machine needs to get information about the run machine configuration .. :) So the developers need to test on multiple platforms and mess about quite a bit. We could use RPC and ssh or something to compile on one platform and build on another, but it is all very messy. A clean solution -- Erlang nodes. The hard part here is defered operation. Some nodes may be down, and we still need to communicate with them. That happens all the time when dual booting. So we'd need some 'relay' nodes to buffer things I guess. This is basically a standard workflow problem. I imagine Erlang is well suited to this kind of problem domain. -- John Skaller Felix, successor to C++: http://felix.sf.net From bengt.kleberg@REDACTED Mon Feb 20 11:01:19 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Mon, 20 Feb 2006 11:01:19 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602151636.36709.ft@it.su.se> References: <200602150912.31029.ft@it.su.se> <43F32B9D.8020000@ericsson.com> <200602151636.36709.ft@it.su.se> Message-ID: <43F9936F.2090708@ericsson.com> greetings, in general i find it difficult to explain the benefit of using erlang to install erlang applications to people that ''knows'' that the whole gnu system will always be present on every computer. On 2006-02-15 16:36, Fredrik Thulin wrote: ...deleted > There are obviosuly a bunch of prerequisites to compiling stuff, the > first being to have a computer at all, and then somewhere along the > road you end up with having to have a compiler installed. > > Anyway, compiling C stuff was not really what I thought we were > discussing... C stuff is what i am discussing. i am trying to say that it should _not_ be needed for a ''normal'' erlang application/library. >> 2 ''make''. it crashes on solaris (makefiles are ususally written for >> gnumake, not ''standard make''). > > Prerequisites again. GNU make is 'make' for me, in my packaging > environment. We build GNU make as part of the bootstrap process. > However, I know for a fact that at least one of the three mentioned > applications can be built with BSD make too ;) gnu make is make for you. and why does that mandate that it have to be make for me, too? and for every application that can work with standrad make, there are several that actually expects me to have the autotools installed. since they ship without configure, and expects me to build it from configure.in. >> both these problems would be avoidable if the installation used >> erlang. > > If you were in fact talking about a _C_ compiler (as opposed to 'erlc'), > then how would using Erlang for the installation work without having > xcode installed on mac-osx? if erlang was used for the install i would not need make, and if i did not need make i would not need a c compiler to build make. bengt From matthias@REDACTED Mon Feb 20 11:07:36 2006 From: matthias@REDACTED (Matthias Lang) Date: Mon, 20 Feb 2006 11:07:36 +0100 Subject: Jaws - coming soon - testers and advice wanted In-Reply-To: References: Message-ID: <17401.38120.655875.504629@antilipe.corelatus.se> Joe Armstrong (AL/EAB) writes: > Here's a simple example, assumed to be in the file foo.jaws >
> >
... >

Fac is ... > << computationally is about 10-20 times faster than PHP > and it works for bignums :-) >> What happens if someone enters N=123456789? Does the whole erlang node crash and burn, dumping out _all_ users on the site? Matthias From bengt.kleberg@REDACTED Mon Feb 20 11:27:31 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Mon, 20 Feb 2006 11:27:31 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <43F388B2.9090501@hyber.org> References: <200602150912.31029.ft@it.su.se> <43F32B9D.8020000@ericsson.com> <200602151636.36709.ft@it.su.se> <43F388B2.9090501@hyber.org> Message-ID: <43F99993.7050607@ericsson.com> On 2006-02-15 21:01, Claes Wikstrom wrote: ...deleted > 1. Strip down OTP and make a base package consisting > or erts, compiler, stdlib and kernel. a good idea. has not joe amstrong (among many) been advocating this for some time? > 2. Take all other libs and make them standalone tarballs > with their own configue, make, make install Makefiles if ''all other libs'' do not include c code i find it superflous to use make for this. why not have an erlang install? bengt From joe.armstrong@REDACTED Mon Feb 20 11:39:37 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Mon, 20 Feb 2006 11:39:37 +0100 Subject: Jaws - coming soon - testers and advice wanted Message-ID: > From: Matthias Lang > Sent: den 20 februari 2006 11:08 > To: erlang-questions@REDACTED > Subject: Re: Jaws - coming soon - testers and advice wanted > > Joe Armstrong (AL/EAB) writes: > > > Here's a simple example, assumed to be in the file foo.jaws > > >

> > > >
> ... > >

Fac is > ... > > << computationally is about 10-20 times > faster than PHP > and it works for bignums :-) >> > > What happens if someone enters N=123456789? > > Does the whole erlang node crash and burn, dumping out _all_ > users on the site? Yes :-) -- but I have also made a version which wraps all functions in a safety wrapper. ie M:F(A) gets compiled as safe:apply(N, F, A) safe:apply is a restrictive safety wrapper where I am extremely restrictive in what you can do. Here you can call your own stuff but calling external modules and BIFs is restricted, the safety wrapper allow spawning processes (but not to many) and restricts the maximum number of reductions that a process may perform in delivering a web page. Hopefully this can be used to make a "enterprise yaws" - where many different users can safely run their code within one yaws server. Approved applications (ie without the safety wrappers compiled in) could be run in the same system with no performance degradation. /Joe BTW - does Microsoft dislike Erlang? - the spelling checker in Microsoft Outlook suggest that M:F(A) is a typo and suggests the replacement text "MAFIA" > Matthias > From vlad_dumitrescu@REDACTED Mon Feb 20 12:06:33 2006 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Mon, 20 Feb 2006 12:06:33 +0100 Subject: Jaws - coming soon - testers and advice wanted References: Message-ID: Hi, > BTW - does Microsoft dislike Erlang? - the spelling checker > in Microsoft Outlook suggest that M:F(A) is a typo > and suggests the replacement text "MAFIA" Well, if you reformulate the question as "*why* does MS disike Erlang", you get a question that is much easier to answer :-) because Erlang gets into the same category as Google or Linux. /Vlad From chandrashekhar.mullaparthi@REDACTED Mon Feb 20 12:11:05 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Mon, 20 Feb 2006 11:11:05 +0000 Subject: Jaws - coming soon - testers and advice wanted In-Reply-To: <17401.38120.655875.504629@antilipe.corelatus.se> References: <17401.38120.655875.504629@antilipe.corelatus.se> Message-ID: On 20/02/06, Matthias Lang wrote: > Joe Armstrong (AL/EAB) writes: > > > Here's a simple example, assumed to be in the file foo.jaws > > >

> > > >
> ... > >

Fac is > ... > > << computationally is about 10-20 times faster than PHP > > and it works for bignums :-) >> > > What happens if someone enters N=123456789? > > Does the whole erlang node crash and burn, dumping out _all_ users on > the site? This isn't a "problem" with Jaws though. Even if you had a plain web form which submitted this value, you'd still run into the same problem if your factorial function naively accepted this value. fac(N) when is_integer(N) and (N > 1000) -> {error, nice_try}; fac(0) -> 1; fac(N) -> N * fac(N-1). Chandru From csanto@REDACTED Mon Feb 20 12:16:11 2006 From: csanto@REDACTED (Corrado Santoro) Date: Mon, 20 Feb 2006 12:16:11 +0100 Subject: Jaws - coming soon - testers and advice wanted In-Reply-To: References: Message-ID: <1140434171.43f9a4fb30d85@www.cdc.unict.it> Quoting "Joe Armstrong (AL/EAB)" : > BTW - does Microsoft dislike Erlang? - the spelling checker > in Microsoft Outlook suggest that M:F(A) is a typo > and suggests the replacement text "MAFIA" Wow!!! Could it possibile that Outlook has been written by a sicilian programmer??? Or maybe Microsoft in this cases reveals what it really is.... a "MAFIA"! :-)) Cheers, --Corrado -- ====================================================== Eng. Corrado Santoro, Ph.D. University of Catania - Engineering Faculty Department of Computer Science and Telecommunications Engineering Viale A. Doria, 6 - 95125 CATANIA (ITALY) Tel: +39 095 7382380 Fax: +39 095 338280 +39 095 7382365 +39 095 7382364 EMail: csanto@REDACTED Personal Home Page: http://www.diit.unict.it/users/csanto NUXI Home Page: http://nuxi.iit.unict.it ====================================================== ------------------------------------------------- This mail sent through IMP: http://www.cdc.unict.it/ From kostis@REDACTED Mon Feb 20 12:28:25 2006 From: kostis@REDACTED (Kostis Sagonas) Date: Mon, 20 Feb 2006 12:28:25 +0100 (MET) Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: Mail from 'Bengt Kleberg ' dated: Mon, 20 Feb 2006 11:27:31 +0100 Message-ID: <200602201128.k1KBSPtu029360@spikklubban.it.uu.se> Bengt Kleberg wrote: > On 2006-02-15 21:01, Claes Wikstrom wrote: > ...deleted > > 1. Strip down OTP and make a base package consisting > > or erts, compiler, stdlib and kernel. > > a good idea. So far, I have not read any extremely convincing arguments why doing this will make Erlang more popular or easy to adopt for serious project development. So I am not sure whether this is such a good idea as others think it is. One related obstacle is that currently doing this is not as straightforward as you may think it is. For example, "compiler + kernel + stdlib" contain calls to functions in the following applications: crypto, debugger, hipe, xref which means that if one wants to maintain the current functionality with a guarantee of not getting "unknown function" exceptions during runtime, either these four applications will also need to be included or calls to them will need to be eliminated. If the former is chosen, continuing this process until fixpoint, requires that the following set of applications is included: asn1, compiler, crypto, debugger, edoc, et, gs, hipe, inets, kernel, observer, mnesia, mnemosyne, parsetools, runtime_tools, snmp, stdlib, ssl, syntax_tools, tools, webtool, xmerl Pretty much the bulk of OTP these days, except for cos*, ic, megaco, mnesia_session, odbc, orber, os_mon, otp_mibs, pman, sasl, ssh, toolbar, and tv The moral: software with lots of functionality often comes with complex dependencies between its components. Kostis From alex.arnon@REDACTED Mon Feb 20 12:49:22 2006 From: alex.arnon@REDACTED (Alex Arnon) Date: Mon, 20 Feb 2006 13:49:22 +0200 Subject: Jaws - coming soon - testers and advice wanted In-Reply-To: References: <17401.38120.655875.504629@antilipe.corelatus.se> Message-ID: <944da41d0602200349w61e47102sd8510f97dc5990b4@mail.gmail.com> Could the Javascript apply(...) binding cause new atoms to be created? In that case, wouldn't that constitute a security hazard? -------------- next part -------------- An HTML attachment was scrubbed... URL: From matthias@REDACTED Mon Feb 20 13:04:39 2006 From: matthias@REDACTED (Matthias Lang) Date: Mon, 20 Feb 2006 13:04:39 +0100 Subject: Jaws - coming soon - testers and advice wanted In-Reply-To: References: <17401.38120.655875.504629@antilipe.corelatus.se> Message-ID: <17401.45143.505149.690136@antilipe.corelatus.se> chandru writes: > This isn't a "problem" with Jaws though. Even if you had a plain web > form which submitted this value, you'd still run into the same problem > if your factorial function naively accepted this value. The point I wanted to make was that, in this particular case, it is easier to shoot yourself in the foot using jaws than PHP. Or, more graphically, in PHP you shoot one person's foot, whereas in jaws you shoot thousands of people's feet all at the same time in a fabulous concurrent out-of-memory splatterfest. I didn't mean to imply that inets or yaws were any less splattersome. Matthias From pacini@REDACTED Mon Feb 20 13:13:44 2006 From: pacini@REDACTED (Filippo Pacini (S.G. Consulting)) Date: Mon, 20 Feb 2006 13:13:44 +0100 Subject: Jaws - coming soon - testers and advice wanted In-Reply-To: References: Message-ID: <43F9B278.6040700@sgconsulting.it> Hi, I might be able to do some testing, and maybe help a little with javascript, though I'm an Erlang newbie. Regarding the javascript below something like this should work: elRef is a reference to the a element, so instead of bar() you call the function as bar(this); function bar(elRef) { while (elRef) { var elRef = elRef.parentNode; if (elRef.nodeName.toLowerCase() == 'div') { alert(elRef.getAttribute('id')); return } } } Tested on firefox: it works if you write the link as click Not if you call bar directly in the href. I have no idea why. Filippo Pacini Joe Armstrong (AL/EAB) wrote: > > > In particular does anybody have any ideas how to do this? > > If I have this > >

> .... > ... click > >
> > I want bar() to compute the id if the nearest containing div - in this > case "foo" any ideas how to do this? - do I really have to "walk the > tree" from the root of the DOM tree? > > /Joe > From chris.double@REDACTED Mon Feb 20 13:29:11 2006 From: chris.double@REDACTED (Chris Double) Date: Tue, 21 Feb 2006 01:29:11 +1300 Subject: Jaws - coming soon - testers and advice wanted In-Reply-To: References: Message-ID: On 2/20/06, Joe Armstrong (AL/EAB) wrote: > I want bar() to compute the id if the nearest containing div - in this > case "foo" any ideas how to do this? - do I really have to "walk the > tree" from the root of the DOM tree? Some javascript code to do this: ---------------8<------------------- ---------------8<------------------- This should alert with 'baz', the nearest enclosing div. Chris. -- http://www.bluishcoder.co.nz From joe.armstrong@REDACTED Mon Feb 20 13:43:58 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Mon, 20 Feb 2006 13:43:58 +0100 Subject: Jaws - coming soon - testers and advice wanted Message-ID: No - javascript is executed on the client - never the server. Nothing you can do on the client can damange the sever *provided* the server code is safely compiled. I guess I omitted to say that in my "safe" mode of compilation *everything* is compiled with a safety wrapper (ie including BIFs) - thus apply(M, F, A) is transformed to safe:do(erlang, apply, [M,F,A]) and list_to_atom(X) to safe:do(erlang, list_to_atom, [X]) Then safe:do/3 can be written with any policy you like - to enable or disable more or less risky operations /Joe ________________________________ From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Alex Arnon Sent: den 20 februari 2006 12:49 To: erlang-questions@REDACTED Subject: Re: Jaws - coming soon - testers and advice wanted Could the Javascript apply(...) binding cause new atoms to be created? In that case, wouldn't that constitute a security hazard? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jakob@REDACTED Mon Feb 20 13:59:17 2006 From: jakob@REDACTED (Jakob Cederlund) Date: Mon, 20 Feb 2006 13:59:17 +0100 Subject: putty lock up connecting to ssh_sshd In-Reply-To: References: Message-ID: <43F9BD25.7020909@erix.ericsson.se> The upcoming R10B-10 will have an ssh that handles putty. It's more than the version handling that is updated to support it. (ssh.com should also work) Some timeout issues and a couple of things with sftp will also be fixed. /Jakob Cederlund, the responsible person :-) Lennart Ohman wrote: >Hi, >I have been experimenting with Putty too and found it not >to work well (not at all) with the erlang ssh server. >The main reasons seems to be that the putty terminal identifies >it self as version 1.99 which should mean version 1 or 2 if I >am not mistaken. But the server does not handle this. The >responsible person in the OTP team is notified. > >/Lennart > >------------------------------------------------------------- >Lennart Ohman office : +46-8-587 623 27 >Sjoland & Thyselius Telecom AB cellular: +46-70-552 67 35 >Sehlstedtsgatan 6 fax : +46-8-667 82 30 >SE-115 28, STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED > > >>-----Original Message----- >>From: owner-erlang-questions@REDACTED [mailto:owner-erlang- >>questions@REDACTED] On Behalf Of Serge Aleynikov >>Sent: Saturday, February 18, 2006 3:43 PM >>To: ke.han >>Cc: erlang-questions >>Subject: Re: putty lock up connecting to ssh_sshd >> >>Do you have the HOME environment variable set? If not do set it to >>point to some existing directory, before starting an SSH server. >> >>See if this helps. >> >>Serge >> >>ke.han wrote: >> >> >>>I am starting ssh_sshd on a freebsd 6 server running erlang (starting >>>from yaws). >>> >>>1> ssh_sshd:listen(3322, [{user_passwords, [{"admin","admin"}]}]). >>>{ok,<0.33.0>} >>> >>>I then go to my windows client and run putty, connecting to port 3322 on >>>the appropriate ip. >>>I receive the username and admin prompts to which I respectively reply >>>admin and admin. >>>My terminal responds by showing my the erlang shell as expected but then >>>putty accepts no further input. Its simply locked up. >>> >>>The erlang server does not show any errors (until I close putty and get >>>a disconnect). >>> >>>I have also tried to log in from a windows erlang shell with: >>> >>>ssh_ssh:connect("192.168.1.4", 3322, []). >>> >>> >>>This first asks me if I want to accept the host address to which I reply >>>"y". Then I get the following error on my erlang windows shell: >>> >>>** exited: {error,enoent} ** >>> >>> >>>again, no errors on the server shell. >>>If I do the same thing with the server name mapping instead of the ip, I >>>get the same results. >>> >>>Anyone else experience this? >>>thanks, ke han >>> >>> >>> > > > > > > From robert.virding@REDACTED Mon Feb 20 14:07:49 2006 From: robert.virding@REDACTED (Robert Virding) Date: Mon, 20 Feb 2006 14:07:49 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602201128.k1KBSPtu029360@spikklubban.it.uu.se> References: <200602201128.k1KBSPtu029360@spikklubban.it.uu.se> Message-ID: <43F9BF25.2000305@telia.com> Kostis Sagonas skrev: > Bengt Kleberg wrote: > > On 2006-02-15 21:01, Claes Wikstrom wrote: > > ...deleted > > > 1. Strip down OTP and make a base package consisting > > > or erts, compiler, stdlib and kernel. > > > > a good idea. > > So far, I have not read any extremely convincing arguments why > doing this will make Erlang more popular or easy to adopt for > serious project development. So I am not sure whether this is > such a good idea as others think it is. > > One related obstacle is that currently doing this is not as > straightforward as you may think it is. > > For example, "compiler + kernel + stdlib" contain calls to > functions in the following applications: > > crypto, debugger, hipe, xref > > which means that if one wants to maintain the current functionality > with a guarantee of not getting "unknown function" exceptions during > runtime, either these four applications will also need to be included > or calls to them will need to be eliminated. > > If the former is chosen, continuing this process until fixpoint, > requires that the following set of applications is included: > > asn1, compiler, crypto, debugger, edoc, et, gs, hipe, inets, > kernel, observer, mnesia, mnemosyne, parsetools, runtime_tools, > snmp, stdlib, ssl, syntax_tools, tools, webtool, xmerl > > Pretty much the bulk of OTP these days, except for > > cos*, ic, megaco, mnesia_session, odbc, orber, > os_mon, otp_mibs, pman, sasl, ssh, toolbar, and tv > > The moral: software with lots of functionality often comes with > complex dependencies between its components. The main problem is that to do this properly then the libraries have to be strictly layered, and OTP is decidedly NOT layered! For example 'erlang' is really part of the language yet also part of OTP, which means that from a layer view OTP is part of the language. If this was done then it would be possible to split OTP into separate packages. It is not impossible to do it, it would just take some work and someone to be "layer nazi" and decide. Robert From robert.virding@REDACTED Mon Feb 20 14:15:29 2006 From: robert.virding@REDACTED (Robert Virding) Date: Mon, 20 Feb 2006 14:15:29 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602201128.k1KBSPtu029360@spikklubban.it.uu.se> References: <200602201128.k1KBSPtu029360@spikklubban.it.uu.se> Message-ID: <43F9C0F1.1000407@telia.com> Kostis Sagonas skrev: > Bengt Kleberg wrote: > > On 2006-02-15 21:01, Claes Wikstrom wrote: > > ...deleted > > > 1. Strip down OTP and make a base package consisting > > > or erts, compiler, stdlib and kernel. > > > > a good idea. > > So far, I have not read any extremely convincing arguments why > doing this will make Erlang more popular or easy to adopt for > serious project development. So I am not sure whether this is > such a good idea as others think it is. I forgot to add that I also wonder if it would make Erlang more popular, but it would be easier to make stand-alone applications that don't contain everything. It would also make it easier to build new implementations as the dependencies become clearer. (and hopefully the boot sequence) Robert From alex.arnon@REDACTED Mon Feb 20 14:24:34 2006 From: alex.arnon@REDACTED (Alex Arnon) Date: Mon, 20 Feb 2006 15:24:34 +0200 Subject: Jaws - coming soon - testers and advice wanted In-Reply-To: References: Message-ID: <944da41d0602200524w627bf78auc2cb16fa825e2033@mail.gmail.com> On 2/20/06, Joe Armstrong (AL/EAB) wrote: > > No - javascript is executed on the client - never the server. Nothing you > can do on the client can damange the sever > *provided* the server code is safely compiled. > > I guess I omitted to say that in my "safe" mode of compilation > *everything* is compiled with a safety wrapper (ie including > BIFs) - thus > > apply(M, F, A) is transformed to safe:do(erlang, apply, [M,F,A]) > > and > > list_to_atom(X) to safe:do(erlang, list_to_atom, [X]) > > Then safe:do/3 can be written with any policy you like - to enable or > disable more or less risky operations > > /Joe > > > ------------------------------ > *From:* owner-erlang-questions@REDACTED [mailto: > owner-erlang-questions@REDACTED] *On Behalf Of *Alex Arnon > *Sent:* den 20 februari 2006 12:49 > *To:* erlang-questions@REDACTED > *Subject:* Re: Jaws - coming soon - testers and advice wanted > > Could the Javascript apply(...) binding cause new atoms to be created? In > that case, wouldn't that constitute a security hazard? > > So this would enable me to define explicit "bindings" to server-side functionality - excellent! BTW, how can one check if a string represents an existing atom or not? -------------- next part -------------- An HTML attachment was scrubbed... URL: From tobbe@REDACTED Mon Feb 20 14:25:28 2006 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Mon, 20 Feb 2006 14:25:28 +0100 Subject: inets - tftp.erl Message-ID: How come the excellent tftp.erl module isn't documented ? I just found it and it worked excellent ! Cheers, Tobbe From ulf.wiger@REDACTED Mon Feb 20 14:36:40 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 20 Feb 2006 14:36:40 +0100 Subject: Jaws - coming soon - testers and advice wanted Message-ID: Alex Arnon wrote: > > BTW, how can one check if a string represents an > existing atom or not? list_to_existing_atom(Str) /Ulf W From klacke@REDACTED Mon Feb 20 14:32:47 2006 From: klacke@REDACTED (Claes Wikstom) Date: Mon, 20 Feb 2006 14:32:47 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <43F99993.7050607@ericsson.com> References: <200602150912.31029.ft@it.su.se> <43F32B9D.8020000@ericsson.com> <200602151636.36709.ft@it.su.se> <43F388B2.9090501@hyber.org> <43F99993.7050607@ericsson.com> Message-ID: <43F9C4FF.3@hyber.org> Bengt Kleberg wrote: > > if ''all other libs'' do not include c code i find it superflous to use > make for this. why not have an erlang install? > A lot of the interesting modules to contain c code. Also why cater for a solution which disallows packages with C code. And finally, configure, make, make install packages makes it easy for everybody (including packagers) to build packages. /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From lenglet@REDACTED Mon Feb 20 12:39:57 2006 From: lenglet@REDACTED (Romain Lenglet) Date: Mon, 20 Feb 2006 20:39:57 +0900 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <43F9936F.2090708@ericsson.com> References: <200602151636.36709.ft@it.su.se> <43F9936F.2090708@ericsson.com> Message-ID: <200602202039.58025.lenglet@csg.is.titech.ac.jp> Hi, [...] > C stuff is what i am discussing. i am trying to say that it > should _not_ be needed for a ''normal'' erlang > application/library. Among the 70 Jungerl libraries, 17 include C code. Are you trying to say that you don't care for 24% of Erlang applications? Or is Jungerl not representative of real Erlang development (i.e. it is not "normal")? Or do you want to define a simple build system for the simple cases, and the let the difficult work out of its scope? [...] > if erlang was used for the install i would not need make, and > if i did not need make i would not need a c compiler to build > make. Perhaps we have not been clear. We do not propose to make every final user type ./configure ; make ; make install to install Erlang apps. We proposed to offer this as the *common interface* between developers and packagers, i.e. as a common means to build Erlang (and other) applications. I believe that an ambiguity in this thread lies in the confusion between the roles of developers, packagers and users, who have different needs and problems. Fredrik, Vlad, I and others are packagers: we want to provide installable packages for final users, from applications provided in source form by developers. In an ideal world (ideal from a packager's viewpoint), developers would directly provide packages for final users. But in the real world packaging requires some work, hence requires packagers in between developers and users. You are a final user? Very well, you should not have to deal with the installation of GNU make or anything like that, and a packager should have made a package readily usable for you. That's right. More generally, two questions were asked: 1- What common interface should be defined between developers and packagers? Fredrik and I proposed to use Autoconf and make, and you can discuss it, but please discuss it *as an interface* between developers and packagers. We believe that there are not so many packagers out there, and that a packager (not a final user) can still make the effort to install GNU make on its own system to package software for users. No, that's not that difficult... The problem in choosing another interface between developers and packagers, e.g. in choosing a build system that downloads code at build time, is that is would very probably make building *more difficult* for packaging systems such as Debian or buildit. In practice, such a build configuration would have to be redone from scratch for packaging: it would be just as if no build system were provided by the application developers... what a waste! Therefore, the interface between developers and packagers must be designed very carefully. Again, Autoconf and make are the best choice in an Unix world, and can also easily be used on Windows (Cygwin), but you can discuss it. It was also proposed to make every application (including every OTP app) released separately between developers and packagers, and (at least) between packagers and end users. Everybody seems to agree on that point. 2- What could be a packaging system for creating self-installable self-contained packages for systems that have no packaging system? This question is still open, but it is out of question that this system be Autoconf and make, of course. But still, we proposed that this packaging system takes source packages provided by developers, builds them using ./configure ; make ; make install, and creates self-installable, self-contained, easy-to-install packages for end-users. Regards, -- Romain LENGLET From luke@REDACTED Mon Feb 20 14:57:53 2006 From: luke@REDACTED (Luke Gorrie) Date: Mon, 20 Feb 2006 14:57:53 +0100 Subject: parmap/2 Message-ID: Howdy, I just found this function and thought it was cute enough to share on a rainy day: %% Map function F over list L in parallel. parmap(F, L) -> Parent = self(), [receive {Pid, Result} -> Result end || Pid <- [spawn(fun() -> Parent ! {self(), F(X)} end) || X <- L]]. From ke.han@REDACTED Mon Feb 20 15:21:00 2006 From: ke.han@REDACTED (ke.han) Date: Mon, 20 Feb 2006 22:21:00 +0800 Subject: Jaws - coming soon - testers and advice wanted In-Reply-To: References: Message-ID: <43F9D04C.2090102@redstarling.com> Sounds great Joe!!! gotta have a copy when your ready. I am just starting a process of building a framework based on the experience of a just finished mid-sized ajax/json/yaws/erlang/mnesia app. I am in the design phase of pulling together all the utils and fragmented metadata I wrote for the app into a cohesive and simple MVC framework. I am canvasing all the latest erlang code base for inclusion and influence...including Ulf's plain_fsm and (awaiting) rdbms and various ajax andf json patterns. My primary goal is to build a high level framework which formalizes the interaction of injecting a controller into a view and having the view contain metadata of the client/server interaction separate from the view layout/content. The idea is that the controller and domain objects (referenced via the controller and metadata interactions) are each plain_fsm "objects" that use "receive parse transforms" to allow the domain and controllers to "inherit" accessor, event and other framework behaviors. If this ramble makes no sense, hopefully, my first few sets of example code will ;-). But the important thing is I would love to study how to include your ideas with an open mind to transform my own into something better. These next 4 weeks are crucial for me as its my only time to spend 100% of my energy on getting this framework bootstrapped. (yes, I plan to open source the whole thing). thanks for the heads up!! ke han Joe Armstrong (AL/EAB) wrote: > No - javascript is executed on the client - never the server. Nothing > you can do on the client can damange the sever > *provided* the server code is safely compiled. > > I guess I omitted to say that in my "safe" mode of compilation > *everything* is compiled with a safety wrapper (ie including > BIFs) - thus > > apply(M, F, A) is transformed to safe:do(erlang, apply, [M,F,A]) > > and > > list_to_atom(X) to safe:do(erlang, list_to_atom, [X]) > > Then safe:do/3 can be written with any policy you like - to enable or > disable more or less risky operations > > /Joe > > > ------------------------------------------------------------------------ > *From:* owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] *On Behalf Of *Alex Arnon > *Sent:* den 20 februari 2006 12:49 > *To:* erlang-questions@REDACTED > *Subject:* Re: Jaws - coming soon - testers and advice wanted > > Could the Javascript apply(...) binding cause new atoms to be > created? In that case, wouldn't that constitute a security hazard? > From Marc.Vanwoerkom@REDACTED Mon Feb 20 15:38:44 2006 From: Marc.Vanwoerkom@REDACTED (Marc van Woerkom) Date: Mon, 20 Feb 2006 15:38:44 +0100 Subject: Fwd: Jaws - coming soon - testers and advice wanted Message-ID: --- die weitergeleitete Nachricht folgt --- -------------- next part -------------- An embedded message was scrubbed... From: "Marc van Woerkom" Subject: Re: Jaws - coming soon - testers and advice wanted Date: Mon, 20 Feb 2006 15:37:36 +0100 Size: 1824 URL: From dgou@REDACTED Mon Feb 20 16:31:52 2006 From: dgou@REDACTED (Douglas Philips) Date: Mon, 20 Feb 2006 10:31:52 -0500 Subject: Packaging Erlang (was: Longstanding issues: structs & standalone Erlang) In-Reply-To: <200602202039.58025.lenglet@csg.is.titech.ac.jp> References: <200602151636.36709.ft@it.su.se> <43F9936F.2090708@ericsson.com> <200602202039.58025.lenglet@csg.is.titech.ac.jp> Message-ID: On 2006 Feb 20, at 6:39 AM, Romain Lenglet wrote: > Perhaps we have not been clear. > ... > I believe that an ambiguity in this thread lies in the confusion > between the roles of developers, packagers and users, who have > different needs and problems. > > You are a final user? Very well, you should not have to deal with > the installation of GNU make or anything like that, and a > packager should have made a package readily usable for you. > That's right. Thank you for making this explicit, since I certainly was not seeing that "the packagers" were seeing that distinction. :-) The two issues are not completely unrelated, since the output of the packagers is what is to be used by the users... > 2- What could be a packaging system for creating self-installable > self-contained packages for systems that have no packaging > system? > > This question is still open, but it is out of question that this > system be Autoconf and make, of course. > But still, we proposed that this packaging system takes source > packages provided by developers, builds them using ./configure ; > make ; make install, and creates self-installable, > self-contained, easy-to-install packages for end-users. That is a decent step. I am a dyed in the wool, pry-from-my-cold-dead- hands Mac OS lover. However, for my $job I use PCs running Windows. There I find such solace as there is to be had from running cygwin. And I've found cygwin and company to be a very serviceable working programmer environment, so I think the packaging focus on unix tools would not be unduly hampered on windows if one were willing to use cygwin (there are likely other options, I am just not familiar with them). Focussing on the second issue (end user experience), there is still work to be done re: user-installable packaging vs. system administrator installable packaging. As far as I know, this is still in the realm of mostly unexplored territory. Many interpreted languages (perl, python, lisp) have had this problem to solve. Perl and Python (and TeX, which is not typically lumped in) have solved this quite successfully with a Comprehensive Archive Network (CPAN, CTAN, etc.). On the Mac, applications have (for the most part) moved away from installing themselves into the system and needing priveleges, with preferences, settings, etc. living under the home directory of the user(s) running them. Perhaps Firefox would be a more acceptable (than CPAN, etc.) example, wherein from within which I can install extensions, etc. etc. etc. Perhaps a distinction between the base erlang system (which might need an administrator to install) and user-add ons. Or perhaps we're just confusing two very different deployment scenarios? Back-room server rack unattended systems vs. user- interactive intensive 'desktop' applications? --Doug From hakan@REDACTED Mon Feb 20 17:32:26 2006 From: hakan@REDACTED (Hakan Mattsson) Date: Mon, 20 Feb 2006 17:32:26 +0100 (CET) Subject: inets - tftp.erl In-Reply-To: References: Message-ID: On Mon, 20 Feb 2006, Torbjorn Tornkvist wrote: TT> How come the excellent tftp.erl module isn't documented ? Hmpf... Mmmm... Eh, you know.... Well, it was like this... Hopefully I will get some slack time soon, so I will be able to document it for the R11 release. TT> I just found it and it worked excellent ! Thanks. /H?kan From ulf.wiger@REDACTED Mon Feb 20 18:07:49 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 20 Feb 2006 18:07:49 +0100 Subject: parallel programming survey results Message-ID: Check out http://www.parawiki.org/downloads/survey.pdf for the results of a parallel programming survey held a while ago. Apparently, the erlang showing was a bit too eager, so the reader is cautioned not to take the erlang figures too seriously. ;-) /Ulf W From chandrashekhar.mullaparthi@REDACTED Mon Feb 20 19:55:44 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Mon, 20 Feb 2006 18:55:44 +0000 Subject: parallel programming survey results In-Reply-To: References: Message-ID: On 20/02/06, Ulf Wiger (AL/EAB) wrote: > > Check out http://www.parawiki.org/downloads/survey.pdf > for the results of a parallel programming survey held > a while ago. Apparently, the erlang showing was a bit > too eager, so the reader is cautioned not to take the > erlang figures too seriously. ;-) The cautionary statement about Erlang said that the high response rate was because "an influential member of the community" (Joe) posted it to the mailing list. So what is wrong with that? We didn't all get together to decide on the answers before participating in the survey! They themselves tried to give the survey as much publicity as they could. Anyway, it shows that the community is hungry for publicity :-) From bjarne@REDACTED Tue Feb 21 09:45:26 2006 From: bjarne@REDACTED (=?iso-8859-1?Q?Bjarne_D=E4cker?=) Date: Tue, 21 Feb 2006 09:45:26 +0100 Subject: Why no news References: Message-ID: <006701c636c3$53f49ba0$b40669d4@segeltorp> I hope you didn't miss the call for papers for the ACM SIGPLAN Erlang Workshop. That's news! Bjarne ----- Original Message ----- From: Martin Logan To: erlang-questions@REDACTED Sent: Friday, February 17, 2006 11:52 PM Subject: Why no news I have not been too active on the erlang list for a while. It has been bugging me. I have been developing software in JSP, .NET, PHP, Ruby on Rails and Python (we could do a much better web framework than rails or django IMHO). It has been a learning experience but I have been beating myself up because weather my job requires it or not, I need to get back to erlang (because it is better). So, here I come, and my first stop www.erlang.org and I notice that first entry in the news section is from July 28, 2004. Frightening, what is going on, are things slowing down, where the announcements of new things? I know the list is active because I still lurk on it. How about some more recent dates on the HP. Just a thought (and I realize I have done nothing to help things) Cheers, Martin ClearPace Martin J. Logan ClearPace martin.logan@REDACTED tel: mobile: 708-497-4576 ex 576 630-991-0082 Add me to your address book... Want a signature like this? -------------- next part -------------- An HTML attachment was scrubbed... URL: From lenglet@REDACTED Tue Feb 21 09:28:54 2006 From: lenglet@REDACTED (Romain Lenglet) Date: Tue, 21 Feb 2006 17:28:54 +0900 Subject: Erlang licenses In-Reply-To: <200602191645.45383.neumann@lostwebsite.net> References: <200602191645.45383.neumann@lostwebsite.net> Message-ID: <200602211728.54578.lenglet@csg.is.titech.ac.jp> Hello, > Erlang 10.b.9-2 have been rejected for inclusion in Debian > unstable because of an incomplete copyright file. > > Truthfully, lib/edoc and lib/syntax_tools are under an LGPL > license. I've added LGPL to the regulatory copyright file. I > suppose the rest is under the Erlang Public License. Is it > safe to suppose this? I would like to add that there is the same problem with Jungerl: only 33 applications out of 70 have a distribution licence (i.e. have at least one file that contains the word "licence" ;-)), and there is no "default" global license for Jungerl as a whole. -- Romain LENGLET From erlang@REDACTED Tue Feb 21 09:58:37 2006 From: erlang@REDACTED (Peter Lund) Date: Tue, 21 Feb 2006 09:58:37 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <43F9C0F1.1000407@telia.com> References: <200602201128.k1KBSPtu029360@spikklubban.it.uu.se> <43F9C0F1.1000407@telia.com> Message-ID: <43FAD63D.2090801@lundata.se> Personally I am convinced it would help marketing erlang a lot and here is the reasoning: When a friend (or customer) of a erlang enthusiast wonders what can be done in erlang, the enthusiast naturally wants to send the friend (a windows user) a demo of something that the friend can run directly on his computer. Then the enthusiast says: "sorry, but to do this you need first to do A then B and C, then *hopefully* it works. Please tell me if you have any problem and I'll help you out running the demo". How many minus points do you think Erlang as a language gets in the friend's mind when receiving such an email?? Yes it is true that Erlang do not get many plus points just because the demo is easy for the friend/customer/manager to install and run, because that is the *normal* / *expected* behaviour of any demo in any other language. But if Erlang is perceived too complicated and only something for nerds and geeks, Erlang looses lots of the strong credibility it should have for its potential to be the language for a company's next big project development. That is why I think that any packaging tool that helps the erlang enthusiast creating a minimal erlang environment + demo app (for windows foremost) with options to include other stuff as well would be very useful for the marketing of Erlang. If this tool also handles a lot more it would just be a lot better of course. /Peter Robert Virding wrote: > Kostis Sagonas skrev: > >> Bengt Kleberg wrote: >> > On 2006-02-15 21:01, Claes Wikstrom wrote: >> > ...deleted >> > > 1. Strip down OTP and make a base package consisting >> > > or erts, compiler, stdlib and kernel. >> > > a good idea. >> >> So far, I have not read any extremely convincing arguments why >> doing this will make Erlang more popular or easy to adopt for >> serious project development. So I am not sure whether this is >> such a good idea as others think it is. > > > I forgot to add that I also wonder if it would make Erlang more > popular, but it would be easier to make stand-alone applications that > don't contain everything. It would also make it easier to build new > implementations as the dependencies become clearer. (and hopefully the > boot sequence) > > Robert > From Marc.Vanwoerkom@REDACTED Tue Feb 21 10:26:48 2006 From: Marc.Vanwoerkom@REDACTED (Marc van Woerkom) Date: Tue, 21 Feb 2006 10:26:48 +0100 Subject: Why no news In-Reply-To: <006701c636c3$53f49ba0$b40669d4@segeltorp> Message-ID: >better). So, here I come, and my first stop >www.erlang.org and I notice that first entry in the news >section is from July 28, 2004. Frightening, what is >going on, are things slowing down, where the >announcements of new things? The search feature isn't working too. Perhaps there are still problems with the server and this is just some interrim solution? Regards, Marc From vlad.xx.dumitrescu@REDACTED Tue Feb 21 10:43:37 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Tue, 21 Feb 2006 10:43:37 +0100 Subject: Longstanding issues: structs & standalone Erlang Message-ID: <11498CB7D3FCB54897058DE63BE3897C013ED3CE@esealmw105.eemea.ericsson.se> Hello, > -----Original Message----- > From: Peter Lund > > When a friend (or customer) of a erlang enthusiast wonders > what can be done in erlang, the enthusiast naturally wants to > send the friend (a windows user) a demo of something that the > friend can run directly on his computer. > > Then the enthusiast says: "sorry, but to do this you need > first to do A then B and C, then *hopefully* it works. Please > tell me if you have any problem and I'll help you out running > the demo". > > How many minus points do you think Erlang as a language gets > in the friend's mind when receiving such an email?? If I send to that friend a Perl script, I don't usually package it with a Perl distribution, but tell him to download and install one (if needed). I don't think that such a procedure would earn negative points. So in this case, I think it would be enough with a packaging method for an (built and ready to run!) application, so that it can be distributed as a single file and run with a simple command. Which could be as easy as using 7-Zip to create a self-extracting archive. Of course, if the app involves a graphics system besides, gs, then we enter a different realm... That said, I do believe that improving the layering (as Robert V. pointed out) would be beneficial (even if maybe not in a directly observable way). Trouble is that even if someone (outside OTP) would take the "layering fascist" hat and do the work, I have a feeling that the result would be similar to Richard Carlsson's reworking of stdlib: gathering dust in a dark corner despite all the merits... Regards, Vlad From gordonguthrie@REDACTED Tue Feb 21 11:20:36 2006 From: gordonguthrie@REDACTED (Gordon Guthrie) Date: Tue, 21 Feb 2006 10:20:36 +0000 Subject: Erlang licenses In-Reply-To: <200602211728.54578.lenglet@csg.is.titech.ac.jp> References: <200602191645.45383.neumann@lostwebsite.net> <200602211728.54578.lenglet@csg.is.titech.ac.jp> Message-ID: <1140517236.43fae9747b928@backawinner.gg> Quoting Romain Lenglet : > I would like to add that there is the same problem with Jungerl: > only 33 applications out of 70 have a distribution licence (i.e. > have at least one file that contains the word "licence" ;-)), Make that 34 of 70 - I have added a LICENSE file for my erlang_automated_build script ;-> Gordon 'good citizen' Guthrie > Hello, > > > Erlang 10.b.9-2 have been rejected for inclusion in Debian > > unstable because of an incomplete copyright file. > > > > Truthfully, lib/edoc and lib/syntax_tools are under an LGPL > > license. I've added LGPL to the regulatory copyright file. I > > suppose the rest is under the Erlang Public License. Is it > > safe to suppose this? > > I would like to add that there is the same problem with Jungerl: > only 33 applications out of 70 have a distribution licence (i.e. > have at least one file that contains the word "licence" ;-)), > and there is no "default" global license for Jungerl as a whole. > > -- > Romain LENGLET > > ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From rasmussen.bryan@REDACTED Tue Feb 21 11:15:02 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Tue, 21 Feb 2006 11:15:02 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <43FAD63D.2090801@lundata.se> References: <200602201128.k1KBSPtu029360@spikklubban.it.uu.se> <43F9C0F1.1000407@telia.com> <43FAD63D.2090801@lundata.se> Message-ID: <3bb44c6e0602210215m1e7c5463j66e44d40c89941d5@mail.gmail.com> "Yes it is true that Erlang do not get many plus points just because the demo is easy for the friend/customer/manager to install and run, because that is the *normal* / *expected* behaviour of any demo in any other language." It is? I'm pretty sure programs written in Java do not install as unobtrusively/smoothly as the average .exe. Nonetheless I am also for having a packaging deal. Cheers, Bryan Rasmussen On 2/21/06, Peter Lund wrote: > Personally I am convinced it would help marketing erlang a lot and here > is the reasoning: > > When a friend (or customer) of a erlang enthusiast wonders what can be > done in erlang, the enthusiast naturally wants to send the friend (a > windows user) a demo of something that the friend can run directly on > his computer. > > Then the enthusiast says: "sorry, but to do this you need first to do A > then B and C, then *hopefully* it works. Please tell me if you have any > problem and I'll help you out running the demo". > > How many minus points do you think Erlang as a language gets in the > friend's mind when receiving such an email?? > > Yes it is true that Erlang do not get many plus points just because the > demo is easy for the friend/customer/manager to install and run, because > that is the *normal* / *expected* behaviour of any demo in any other > language. But if Erlang is perceived too complicated and only something > for nerds and geeks, Erlang looses lots of the strong credibility it > should have for its potential to be the language for a company's next > big project development. > > That is why I think that any packaging tool that helps the erlang > enthusiast creating a minimal erlang environment + demo app (for windows > foremost) with options to include other stuff as well would be very > useful for the marketing of Erlang. If this tool also handles a lot more > it would just be a lot better of course. > > /Peter > > Robert Virding wrote: > > > Kostis Sagonas skrev: > > > >> Bengt Kleberg wrote: > >> > On 2006-02-15 21:01, Claes Wikstrom wrote: > >> > ...deleted > >> > > 1. Strip down OTP and make a base package consisting > >> > > or erts, compiler, stdlib and kernel. > >> > > a good idea. > >> > >> So far, I have not read any extremely convincing arguments why > >> doing this will make Erlang more popular or easy to adopt for > >> serious project development. So I am not sure whether this is > >> such a good idea as others think it is. > > > > > > I forgot to add that I also wonder if it would make Erlang more > > popular, but it would be easier to make stand-alone applications that > > don't contain everything. It would also make it easier to build new > > implementations as the dependencies become clearer. (and hopefully the > > boot sequence) > > > > Robert > > > From daniel@REDACTED Tue Feb 21 12:03:56 2006 From: daniel@REDACTED (Daniel Luna) Date: Tue, 21 Feb 2006 12:03:56 +0100 (CET) Subject: parallel programming survey results In-Reply-To: References: Message-ID: On Mon, 20 Feb 2006, Ulf Wiger (AL/EAB) wrote: > Apparently, the erlang showing was a bit too eager, so the reader is > cautioned not to take the erlang figures too seriously. ;-) But this is just plain stupid. "At [insert mailing list THEY sent to] there are probably a lot of [insert programming language] programmers, so these figures cannot be taken too seriously." So the possibility that a very high percent of erlang developers are using it for parallel programming did not occur to the authors? On the other hand, this whole survey seems to be bogus. If you remove the 130 Erlang answers you remove more than half of the total answers (256). I have no idea how they manage to get any results at all from that. /Luna -- Daniel Luna | Current projects: daniel@REDACTED | - Consulting in Rome Yes, I'm one of those now. | - Fixing my web page www.erlang-consulting.com | - [secret] From hirsch@REDACTED Tue Feb 21 11:46:08 2006 From: hirsch@REDACTED (Edward A. Hirsch) Date: Tue, 21 Feb 2006 13:46:08 +0300 (MSK) Subject: CSR-2006: Call for Participation Message-ID: <20060221104608.595B4578C4@euclid.pdmi.ras.ru> CALL FOR PARTICIPATION - CSR 2006 International Computer Science Symposium in Russia June 8-12, 2006, St.Petersburg, Russia Organized by St.Petersburg Department of Steklov Institute of Mathematics http://logic.pdmi.ras.ru/~csr2006 *** WE STRONGLY RECOMMEND TO REGISTER BEFORE February 28, 2006 *** CSR 2006 is the first conference in a projected series of regular events spanning all areas of computer science. The main part of the program of CSR 2006 consists of 65 contributed papers (out of 279 submissions) divided into two tracks, Theory and Application/Technology. CSR 2006 also features an opening lecture by Stephen A. Cook and 10 invited lectures (see below). In addition, before the conference, there will be two workshops at the conference location. St. Petersburg is beautiful at any time of year. The early summer, known as the "white nights" season, is especially lovely. The city is surrounded by wonderful tsar parks and palaces; an excursion to one of them will be a social program of the symposium. The preliminary program and registration information can be found at the conference Web site. We strongly recommend registering as soon as possible (preferably in February). Hotels are already quite booked. Early registration is especially important for foreign participants in order for both you and us to complete the required official paperwork needed to get a visa. The symposium is sponsored by the U.S. Civilian Research & Development Foundation and Russian Foundation for Basic Research. There is a limited financial support for participants from Russia. INVITED SPEAKERS ---------------- * Boaz Barak (Princeton University, USA) * Gerard Berry (Esterel Technologies, France) * Bob Colwell (R&E Colwell & Assoc. Inc., USA) * Byron Cook (Microsoft Research, USA) * Melvin Fitting (Lehman College and the Graduate Center, CUNY, USA) * Russell Impagliazzo (University of California at San Diego, USA) * Michael Kaminski (Technion, Israel) * Michael Kishinevsky (Intel, USA) * Pascal Koiran (Ecole Normale Suprieure de Lyon, France) * Omer Reingold (Weizmann Institute, Israel) WORKSHOPS --------- LARARL'06 --- Logic for Automated Reasoning and Automated Reasoning for Logic http://www.cs.miami.edu/~geoff/Conferences/LARARL/ WOWA'06 --- Workshop on Words and Automata http://math.usu.edu.ru/kadm/wowa.html PRELIMINARY PROGRAM ------------------- See our web site. From bjorn@REDACTED Tue Feb 21 11:57:38 2006 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 21 Feb 2006 11:57:38 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <43FAD63D.2090801@lundata.se> References: <200602201128.k1KBSPtu029360@spikklubban.it.uu.se> <43F9C0F1.1000407@telia.com> <43FAD63D.2090801@lundata.se> Message-ID: I agree. Wings would never have got as large user-base as it now has if users would first have to install Erlang/OTP. I know because the number one request in the early days was to have a standalone installer for Wings that included the necessary parts of Erlang/OTP. Even people who had successfully got Wings running, requested it because they wanted to show it for some friends and it was too much trouble to download another 25 MB package (the size of R8B for Windows). I had an idea to write a generic tool that would help packaging an Erlang application in the same way as Wings does, but I never seems to find the time to finish it. /Bjorn Peter Lund writes: > Personally I am convinced it would help marketing erlang a lot and > here is the reasoning: > > When a friend (or customer) of a erlang enthusiast wonders what can be > done in erlang, the enthusiast naturally wants to send the friend (a > windows user) a demo of something that the friend can run directly on > his computer. > > Then the enthusiast says: "sorry, but to do this you need first to do > A then B and C, then *hopefully* it works. Please tell me if you have > any problem and I'll help you out running the demo". > > How many minus points do you think Erlang as a language gets in the > friend's mind when receiving such an email?? > > Yes it is true that Erlang do not get many plus points just because > the demo is easy for the friend/customer/manager to install and run, > because that is the *normal* / *expected* behaviour of any demo in any > other language. But if Erlang is perceived too complicated and only > something for nerds and geeks, Erlang looses lots of the strong > credibility it should have for its potential to be the language for a > company's next big project development. > > That is why I think that any packaging tool that helps the erlang > enthusiast creating a minimal erlang environment + demo app (for > windows foremost) with options to include other stuff as well would be > very useful for the marketing of Erlang. If this tool also handles a > lot more it would just be a lot better of course. > > /Peter > > Robert Virding wrote: > > > Kostis Sagonas skrev: > > > >> Bengt Kleberg wrote: > >> > On 2006-02-15 21:01, Claes Wikstrom wrote: > >> > ...deleted > >> > > 1. Strip down OTP and make a base package consisting > >> > > or erts, compiler, stdlib and kernel. > >> > > a good idea. > >> > >> So far, I have not read any extremely convincing arguments why > >> doing this will make Erlang more popular or easy to adopt for > >> serious project development. So I am not sure whether this is > >> such a good idea as others think it is. > > > > > > I forgot to add that I also wonder if it would make Erlang more > > popular, but it would be easier to make stand-alone applications > > that don't contain everything. It would also make it easier to build > > new implementations as the dependencies become clearer. (and > > hopefully the boot sequence) > > > > Robert > > > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From ulf.wiger@REDACTED Tue Feb 21 13:32:39 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 21 Feb 2006 13:32:39 +0100 Subject: parallel programming survey results Message-ID: Daniel Luna wrote: > > On the other hand, this whole survey seems to be bogus. If > you remove the 130 Erlang answers you remove more than half > of the total answers (256). No, the actual number of people who claimed to be using Erlang was 38. 130 was a weighted number, which included how often the language is used for programming parallel systems. The average weight for the erlang users was 3.4 (3 = "often", 4 = "for every parallel application") This is a fairly high number, obviously, if we compare: OCaml 3.0 .NET 2.7 UPC 2.0 C 1.9 Python 1.8 Shell 1.7 Prolog 1.5 C++ 1.3 Fortran 1.3 Lisp 0.8 Java 0.6 It could be read as "those who know Erlang use it whenever they design parallel applications." BTW, I don't know if 38 respondents is a "relatively high" number for erlang, since just about everyone who uses it, uses it for parallel applications in some sense. In the survey, it is formulated thus: "Noteworthy is the fact that Erlang is one of the very few programming languages for which parallelism is an integral part of the language, and it therefore has high submissions for both questions one and two." One can of course note that while the survey form allowed ticking in simultaneous use of C, C++, Fortran, and Java, it encouraged only one mention each of a functional, logical or other programming language. I don't know how much this can be expected to have skewed the results in favour of the explicitly named languages. /Ulf W From Marc.Vanwoerkom@REDACTED Tue Feb 21 13:52:43 2006 From: Marc.Vanwoerkom@REDACTED (Marc van Woerkom) Date: Tue, 21 Feb 2006 13:52:43 +0100 Subject: Never trust a statistics you didn't forge yourself Message-ID: Hello, I just got a copy of your survey results and I am upset about it: First you write: > To raise more interest for the survey and generate submissions, we have sent messages to > several discussion groups, once shortly after the start of the survey and once shortly before > the end: > ? Usenet: comp.parallel, comp.parallel.mpi, comp.parallel.pvm, comp.sys.super, > aus.computers.parallel, comp.programming.threads > ? Mailing Lists: beowulf@REDACTED, lam@REDACTED, omp@REDACTED, > compunity@REDACTED, bspall@REDACTED > ? Forums: CodeGuru Forum, Intel Developer Services Forum > ? Websites: slashdot.org then > We know of one incident, where > an influential member of the Erlang community requested > members of their mailing list > to show their support for Erlang by participating in the > survey, which they promptly did. > Incidents like this one have of course influenced the > results as well. This implies that some kind of guru is able to motivate his minions. I can't remember who it was who posted this to erlang mailing list. I was just informed that there was a survey and of course it made perfect sense to participate as I am a user of a concurrent language. That's what it is good for. There are obviously at least two camps of concurrent problems - the massive number crunching ones and the ones where you have lots of parallel transactions in a possibly distributed system - that's where Erlang is strong. You obviously posted to - comp.parallel.pvm - beowulf@REDACTED - omp@REDACTED all from the number crunchers camp and even to - CodeGuru Forum which is a Java forum. Why did you not post to the erlang list yourself? > We have already told you the reasons for the relatively > > high numbers for Erlang in section > 2, so please treat them with caution. What can be deduced > from these numbers, > though, is that Erlang has a very active user community > and it is obviously possible to > write parallel programs in Erlang. You could have known before. Regards, Marc van Woerkom From mickael.remond@REDACTED Tue Feb 21 14:57:42 2006 From: mickael.remond@REDACTED (Mickael Remond) Date: Tue, 21 Feb 2006 14:57:42 +0100 Subject: Packaging Erlang applications (was Re: Longstanding issues: structs & standalone Erlang In-Reply-To: References: <200602201128.k1KBSPtu029360@spikklubban.it.uu.se> <43F9C0F1.1000407@telia.com> <43FAD63D.2090801@lundata.se> Message-ID: <20060221135742.GA15947@memphis.ilius.fr> * Bjorn Gustavsson [2006-02-21 11:57:38 +0100]: > I had an idea to write a generic tool that would help packaging an Erlang > application in the same way as Wings does, but I never seems to > find the time to finish it. I am jumping into this thread to announce several tools that we have develop with Christophe Romain and that are being tested. Here is what we have and will publish during the next week-end. - REPOS is the basis of our packaging method. I feel this tools has been highly underestimated as a medium to promote Erlang. Everytime I have made an Erlang demo based on the multiplaform CDROM REPOS, the audience was catch with a "wowww, that's cool" smile on their face. I used it to demonstrate ejabberd, BTT, Yaws, Tsung (ex-tsunami), etc. This is a very powerful tool :-) The last version (1.4-b1) is currently being tested, so not yet heavily announced, but you can download it already from its future home page: https://support.process-one.net/doc/display/CONTRIBS/Erlang+packaging - We have developed some script to help us generate, maintain and upgrade the Erlang REPOS environment. A lot more can be done in this area, but this toolset is already working very well for us. - Erlang Runtime (erlrt) We have developed a toolset to build single file package of Erlang applications. This approach use the content of the REPOS structure to make it possible to distribute an application as a single shell script and including dependancies coming from REPOS. This is currently working on MacOSX and Linux and we are looking for help to make it possible on Windows. - We are packaging Erlang applications inside graphical installers based on the content of the REPOS structure. A good example is the ejabberd Linux graphical installer but we are planning to do the same on Linux, Windows and MacOSX. - We are planning and designing a solution to make it possible to upgrade a REPOS structure by only downloading the differences from a central repository. Overall, our approach is the following: Applications becomes easy to package: You just have to integrate your application in the REPOS tree and select the relevant dependencies. You can thus use several distribution methods to distribute it to your users / customers. This roadmap is now in good shape. REPOS is already there for more than one year and a half and heavily tested. Erlrt is working and will be published soon. We are using graphical installers to distribute production ready software. It seems that this approach is working well for us at least. Comments and help are welcome ! -- Micka?l R?mond From vlad.xx.dumitrescu@REDACTED Tue Feb 21 15:08:06 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Tue, 21 Feb 2006 15:08:06 +0100 Subject: Packaging Erlang applications (was Re: Longstanding issues: structs & standalone Erlang Message-ID: <11498CB7D3FCB54897058DE63BE3897C013ED51A@esealmw105.eemea.ericsson.se> > - REPOS is the basis of our packaging method. I feel this > tools has been > highly underestimated as a medium to promote Erlang. Everytime I > have made an Erlang demo based on the multiplaform CDROM REPOS, the > audience was catch with a "wowww, that's cool" smile on their face. Hi, Speaking for myself, I didn't underestimate it, I just assumed that if a 40MB download is too large then a 100MB one would be even more so :-) REPOS is great if you can distribute a CD. Now those other tools sond even more interesting! Looking forward to trying them, and I might also find some time to get it to work on Windows, but I can't promise anything. Regards, Vlad From chris@REDACTED Tue Feb 21 16:45:46 2006 From: chris@REDACTED (Christophe Romain) Date: Tue, 21 Feb 2006 16:45:46 +0100 Subject: Packaging Erlang applications (was Re: Longstanding issues: structs & standalone Erlang In-Reply-To: <20060221135742.GA15947@memphis.ilius.fr> References: <200602201128.k1KBSPtu029360@spikklubban.it.uu.se> <43F9C0F1.1000407@telia.com> <43FAD63D.2090801@lundata.se> <20060221135742.GA15947@memphis.ilius.fr> Message-ID: Hi > - Erlang Runtime (erlrt) > We have developed a toolset to build single file package of Erlang > applications. for information, erlrt "hello world" il a 1.4Mb shell script. it does not require anything, it does not download anything. erlrt containing mnesia is a 1.6Mb shell script. including the full ejabberd directory (from sources) will create a 4.4Mb shell script. for now erlrt installs on disc (ramdisk support will be added soon) I will add a simple utility that will allow users to install dependencies they need, e.g.: erlrt:install(mnesia) will download mnesia archive and install into erlrt directory. From michal@REDACTED Tue Feb 21 16:50:51 2006 From: michal@REDACTED (Michal Slaski) Date: Tue, 21 Feb 2006 16:50:51 +0100 Subject: how to list databases ? In-Reply-To: <001a01c632d6$a027f080$2d64250a@marcinek> References: <001a01c632d6$a027f080$2d64250a@marcinek> Message-ID: <84d062da0602210750y6fe6454fo@mail.gmail.com> On 16/02/06, Marcin Kuczera wrote: > I am trying to get a databases list and list of keys. > > What I mean is, I have a command: > mnesia:read({Db, DBKey}).my node is Ericsson's SGSN 5.5I want to get > measurement counters which are probably kept in mnesia,but I have no idea > what kind of Db and DBKey's values.Is there any method to list them ? If you can connect to the node's shell then this code should list you all mnesia tables and keys: %% get all mnesia tables ListOfTables = mnesia:system_info(tables), %% get all keys for each table ListOfKeys = [{Table, mnesia:dirty_all_keys(Table)} || Table <- ListOfTables, Table /= schema ], %% ListOfKeys is a list of tuples %% with table name and table keys io:format("~p~n",[ListOfKeys]). You can also try running tv:start() and then go to menu View -> Mnesia Tables. -- Michal Slaski www.erlang-consulting.com From luke@REDACTED Tue Feb 21 17:48:33 2006 From: luke@REDACTED (Luke Gorrie) Date: Tue, 21 Feb 2006 17:48:33 +0100 Subject: parallel programming survey results References: Message-ID: Daniel Luna writes: > "At [insert mailing list THEY sent to] there are probably a lot of > [insert programming language] programmers, so these figures cannot be > taken too seriously." I can sympathise with the surveyors. They seem to be interested in parallel programming as in "using lots of hardware in parallel to solve a problem" like SETI, CGI rendering farms, etc. I bet they got a lot of responses from Erlang people writing internet servers & telecom systems which are another kettle of fish entirely. I don't think they did a very good job of spelling out what applications they were interested in though. Next you will be responding to functional programming surveys.. :-) From msuess@REDACTED Tue Feb 21 22:45:12 2006 From: msuess@REDACTED (Michael Suess) Date: Tue, 21 Feb 2006 22:45:12 +0100 Subject: Never trust a statistics you didn't forge yourself In-Reply-To: References: Message-ID: <200602212245.20395.msuess@uni-kassel.de> On Tuesday 21 February 2006 13:52, Marc van Woerkom wrote: > Hello, Dear Marc, dear members of the Erlang Mailing List, I am the main author of the study that has been discussed in this thread and also in this one: http://www.erlang.org/ml-archive/erlang-questions/200602/msg00355.html I have thought long about whether or not I should try to defend our study here, especially since we seem to have raised a lot of hostility here for some reason. I will therefore start with answering the points you made in this mail, and secondly add some opinions to the points raised in the other thread. > I just got a copy of your survey results and I am upset > about it: You are of course free to feel that way. I knew that I would upset some people with this study, especially the ones whose "pet system" has not gotten many votes. What surprises me though is, that I the only flames I got until now come from the Erlang-community, although Erlang has gotten way more than its share of publicity in our paper. > First you write: > > To raise more interest for the survey and generate submissions, we have > > sent messages to several discussion groups, once shortly after the start > > of the survey and once shortly before the end: > > ? Usenet: comp.parallel, comp.parallel.mpi, comp.parallel.pvm, > > comp.sys.super, aus.computers.parallel, comp.programming.threads > > ? Mailing Lists: beowulf@REDACTED, lam@REDACTED, omp@REDACTED, > > compunity@REDACTED, bspall@REDACTED > > ? Forums: CodeGuru Forum, Intel Developer Services Forum > > ? Websites: slashdot.org > > then > > > We know of one incident, where > > an influential member of the Erlang community requested > > members of their mailing list > > to show their support for Erlang by participating in the > > survey, which they promptly did. > > Incidents like this one have of course influenced the > > results as well. > > This implies that some kind of guru is able to motivate > his minions. This is your interpretation, and I certainly did not mean it that way. I have paid careful attention to make it very clear, how the study was carried out and whom I have contacted. I have tried to contact a mailing list or forum for every parallel programming system that was explicitly mentioned in the survey question two. Erlang is not explicitly mentioned there, and I have therefore not posted to this list. Why was it not explicitly mentioned there? Because I had to make a subjective choice about what systems interested me most, and about what systems I thought were most widely used. And like it or not, Erlang was not on this list. Fact is, that Joe posted about the survey on this mailing list, you can still find his post in the archives: http://www.erlang.org/ml-archive/erlang-questions/200510/msg00171.html Do any of you disagree, that Erlang has gotten a higher number of votes because of this? I do not think so. And let me get this straight: I am not mad at Joe for doing it or anything, these votes are as valid as anyone elses and I am thankful to anyone who provided me with his/her opinion. But I have an explanation for the relatively high number of votes for Erlang and I have been open about all other aspects of this survey. Why the heck should I keep this one secret?? I have made it very clear in my paper, that the results of this survey are not statistically relevant. They cannot be, because I know of no way to sample a proportional sample of the parallel programming community. If you have any idea on how to do that and have the money for it, feel free to contact me. I have not been able to find any comparable data anywhere at all. I did the best I could to provide at least some clues. These data are not statistics, they are indications at best. I have made it very clear in my paper, that the data are not statistically relevant. I have been very careful with my observations and I have been as open as I could regarding the process of gathering the data. More I cannot do. > I can't remember who it was who posted this to erlang > mailing list. I was just informed that there was a survey > and of course it made perfect sense to participate as I am > a user of a concurrent language. That's what it is good > for. Sure. Thanks again for voting and writing your opinion. > There are obviously at least two camps of concurrent > problems - the massive number crunching ones and the ones > where you have lots of parallel transactions in a possibly > distributed system - that's where Erlang is strong. > > > You obviously posted to > > - comp.parallel.pvm > - beowulf@REDACTED > - omp@REDACTED > > all from the number crunchers camp and even to > > - CodeGuru Forum > > which is a Java forum. > > Why did you not post to the erlang list yourself? I think I have explained the reasons for that above. > > We have already told you the reasons for the relatively > > high numbers > > for Erlang in section 2, so please treat them with caution. What can be > > deduced > from these numbers, though, is that Erlang has a very active > > user community > > and it is obviously possible to > > write parallel programs in Erlang. > > You could have known before. Yes, I could have. And since I have a colleague sitting right opposite to me, who lurks on this list, I even knew it beforehand. But if I only wrote about things I do NOT know in my papers, they would be pretty bad, wouldn't they? This paper has been downloaded more than 300 times in only two days, although I have not even made it public. All I did was send an email to all people who wanted to be notified of the results. How many of these people knew about Erlang beforehand? I bet not even half of them (although I could be wrong here, but I bet there are no data on this either). I believe I have not written anything bad at all about Erlang, rather the opposite. I have also written about the active Erlang community. I do not quite understand why this is held against me now, especially on this list and in an apparently hostile manner. To answer some other points: chandru wrote: > The cautionary statement about Erlang said that the high response rate > was because "an influential member of the community" (Joe) posted it > to the mailing list. So what is wrong with that? We didn't all get > together to decide on the answers before participating in the survey! > They themselves tried to give the survey as much publicity as they > could. I think I have answered this above. Nothing is wrong with that, but I still had to mention it somehow. I did not mean to insult anyone with the way I phrased it either. Daniel Luna wrote: > But this is just plain stupid. I do not think I can say anything to counter that level of discussion. > "At [insert mailing list THEY sent to] there are probably a lot of [insert > programming language] programmers, so these figures cannot be taken too > seriously." > So the possibility that a very high percent of erlang developers are using > it for parallel programming did not occur to the authors? Should I really reply to this? I will try: We have tried to contact a mailing list for every parallel programming system mentioned in question two. We have not contacted any other mailing lists for parallel programming systems like Erlang. Therefore, the numbers for the systems mentioned in question two can be compared in a way, and therefore they are in one figure. And the "Other" systems can be compared in a way. None of the other systems was contacted by us, and as far as we know, Erlang was the only "Other" system, where the survey got noticed at all. This is why the numbers for Erlang are unusually high and cannot be directly compared to the other systems, and this is why we mention it in the paper. Nothing more, nothing less. When I asked for review on this paper, the Erlang numbers were held against me again and again, and it was even suggested to take them out. I have decided not to do that, because I did not want to let my or anyone elses subjective opinion influence the results any more than necessary. Maybe I should have just listened... > On the other hand, this whole survey seems to be bogus. If you remove the > 130 Erlang answers you remove more than half of the total answers (256). I > have no idea how they manage to get any results at all from that. As Ulf already noted in his reply, there were no 130 Erlang answers. I am not really good at statistics, but I recall from one of my classes that anything with less than 20 participants is not statistically meaningful. We have had more than ten times that, so if you really want to complain, please do complain about the composition of our sample, but not about its size, because this will get you further in bashing the survey. Luke Gorrie wrote: > I can sympathise with the surveyors. They seem to be interested in > parallel programming as in "using lots of hardware in parallel to > solve a problem" like SETI, CGI rendering farms, etc. I bet they got a > lot of responses from Erlang people writing internet servers & telecom > systems which are another kettle of fish entirely. You are right, we come more from a high performance computing background. Nevertheless, I am interested in all kinds of parallel programming and I have even taken a look in the past at Erlang. Unfortunately, it does not give any speedups on multiple processors yet, but I hear that even this is changing, making it even more interesting for us. So why should I not welcome any answers from you people? You have a different perspective on parallel programming than I do, but I am very willing to listen to people with different perspectives, as quite often this leads to new insights... Ulf Wiger wrote: > One can of course note that while the survey form > allowed ticking in simultaneous use of C, C++, Fortran, > and Java, it encouraged only one mention each of a > functional, logical or other programming language. > I don't know how much this can be expected to have > skewed the results in favour of the explicitly named > languages. I expect this to have skewed the results quite a bit in favour of these languages, and this is the reason I have only compared the explicitly named ones with each other, and the "others" with each other. And even in comparing them, I have been very careful with my observations. This mail has gotten way out of hand. I hope I could clear things up a bit and show you people a little bit of my perspective on the matter. Thanks for listening, best regards from Germany, Michael Suess -- "What we do in life, echos in eternity..." M.: msuess@REDACTED | T.: +49-561-804-6269 | F.: +49-561-804-6219 WWW: http://www.plm.eecs.uni-kassel.de/plm/index.php?id=msuess Public PGP key and fingerprint available at above address. Research Associate, Programming Languages / Methodologies Research Group University of Kassel, Wilhelmsh?her Allee 73, D-34121 Kassel -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From ulf.wiger@REDACTED Wed Feb 22 00:34:21 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 22 Feb 2006 00:34:21 +0100 Subject: Never trust a statistics you didn't forge yourself Message-ID: Michael Suess wrote: > > I have thought long about whether or not I should try to > defend our study here, especially since we seem to have > raised a lot of hostility here for some reason. I wouldn't say that. At least the first two comments on the study had smileys in them. (: Personally, I can't recall a study where Erlang came out more favourably, after all. Erlang even received special mention. > You are of course free to feel that way. I knew that > I would upset some people with this study, especially > the ones whose "pet system" has not gotten many votes. > What surprises me though is, that I the only flames I > got until now come from the Erlang-community, although > Erlang has gotten way more than its share of publicity > in our paper. Why more than its share? Erlang clearly dominated the "functional languages" category. This was worthy of a comment. 38 responses is not that much, either from a statistical point of view, or considering that we log about 10-15,000 downloads/month from the erlang.org site. Clearly, most erlang users did _not_ respond (if they had, you'd really have some explaining to do in your report ;-) > I have paid careful attention to make it very > clear, how the study was carried out and whom > I have contacted. I agree. > Fact is, that Joe posted about the survey on this mailing > list, you can still find his post in the archives: > http://www.erlang.org/ml-archive/erlang-questions/200510/msg00171.html > > Do any of you disagree, that Erlang has gotten a higher > number of votes because of this? I do not think so. Of course, Joe's mail did very little beyond simply forwarding the link: "If you use Erlang, why not tell http://www.plm.eecs.uni-kassel.de/parasurvey/ About it /Joe" Most likely, Erlang would have received very few votes wihout it, mainly because most erlang users would not have known about the survey at all. To compare, you offered $50 book gift certificates in your own posts to e.g. http://softwareforums.intel.com/ids/board/message?board.id=42&message.id =676 http://softwareforums.intel.com/ids/board/message?board.id=42&message.id =768 http://www.lam-mpi.org/MailArchives/lam/2005/10/11389.php That is, you posted reminders as well in the other forums, again reminding of gift certificates. Nothing wrong with that -- you probably have to tease people with some rewards to get them to respond -- but it does make Joe's "rallying cry" to the Erlang community rather modest. (: > I have an explanation for the relatively high number > of votes for Erlang and I have been open about all > other aspects of this survey. Why the heck should > I keep this one secret?? As you mention in your report, Erlang is one of very few languages with built in support for concurrency. Practically all Erlang programs have some degree of concurrency in them, and many who learn Erlang will hesitate to use anything else for programming parallel applications(*). I still think that the number 38 could have been significantly higher, esp if there had been a reminder on the Erlang list as well, offering gift certificates. The number of Erlang users who responded is only surprising given that Erlang was not targeted for the survey. Like Luke, I have no problem with your decision not to include Erlang in the first place. (*) Although the applications where Erlang is used differs somewhat from the ones you were most interested in, as you've stated yourself. I venture to guess that this is also true for e.g. the OCaml crowd (was it the MLDonkey team that responded? ;-) > I have not been able to find any comparable data > anywhere at all. Neither have I. > I did the best I could to provide at least > some clues. So you did. Thank you for that. > None of the other systems was contacted by us, and > as far as we know, Erlang was the only "Other" > system, where the survey got noticed at all. > This is why the numbers for Erlang are unusually > high and cannot be directly compared to the other > systems, and this is why we mention it in the paper. > Nothing more, nothing less. Fair enough. But in our experience, most users of functional languages in general do not deal with concurrency much (this becomes obvious in forums like comp.lang.functional), whereas practically every erlang programmer around could have responded to your survey that they often or always use Erlang for programming parallel systems. > When I asked for review on this paper, the Erlang > numbers were held against me again and again, and > it was even suggested to take them out. Now, would you believe me when I say that this doesn't surprise me in the least. (: Last fall, there was a fairly lengthy thread on this list about a small company debating a mix of niche languages vs. C++. Here's one post that was particularly telling: http://article.gmane.org/gmane.comp.lang.erlang.general/11706 There are many members on this list who have taken a fair amount of heat in their time for favouring something so decidedly "not-C++-or-Java" as Erlang. Perhaps that makes us a bit too eager sometimes... > I have decided not to do that, because I did not want > to let my or anyone elses subjective opinion influence > the results any more than necessary. Maybe I should > have just listened... No, you did the right thing. (: Regards, Ulf Wiger From bengt.kleberg@REDACTED Wed Feb 22 08:13:44 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Wed, 22 Feb 2006 08:13:44 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602201128.k1KBSPtu029360@spikklubban.it.uu.se> References: <200602201128.k1KBSPtu029360@spikklubban.it.uu.se> Message-ID: <43FC0F28.70809@ericsson.com> On 2006-02-20 12:28, Kostis Sagonas wrote: ...deleted > The moral: software with lots of functionality often comes with > complex dependencies between its components. i would like to suggest another possiblity: software that has grown organically (without overall plan and/or guidelines) and always remains backwards compatible, often comes with complex dependencies between its components. i doubt that it is impossible to have the same functionality, as in the current complexly dependent erlang/otp, in a layered erlang distribution if the backwards compatibility could be allowed below 100%. i could be wrong, of course. bengt From bengt.kleberg@REDACTED Wed Feb 22 08:28:16 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Wed, 22 Feb 2006 08:28:16 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602202039.58025.lenglet@csg.is.titech.ac.jp> References: <200602151636.36709.ft@it.su.se> <43F9936F.2090708@ericsson.com> <200602202039.58025.lenglet@csg.is.titech.ac.jp> Message-ID: <43FC1290.5010002@ericsson.com> On 2006-02-20 12:39, Romain Lenglet wrote: > Hi, > > [...] >> C stuff is what i am discussing. i am trying to say that it >> should _not_ be needed for a ''normal'' erlang >> application/library. > > Among the 70 Jungerl libraries, 17 include C code. > Are you trying to say that you don't care for 24% of Erlang > applications? Or is Jungerl not representative of real Erlang > development (i.e. it is not "normal")? i am saying that the 76% of jungerl that do not use C is normal. the other 24% is not normal. > Or do you want to define a simple build system for the simple > cases, and the let the difficult work out of its scope? i would like to have a simple build/install system for normal erlang applications/libraries that would work without a gnu system (autotools, gnumake, gtar, gcc, etc). ...deleted > Perhaps we have not been clear. > > We do not propose to make every final user type > ./configure ; make ; make install to install Erlang apps. i thought this was what you proposed. ...deleted > More generally, two questions were asked: > > 1- What common interface should be defined between developers and > packagers? > > Fredrik and I proposed to use Autoconf and make, and you can > discuss it, but please discuss it *as an interface* between > developers and packagers. ...deleted > Again, Autoconf and make are the best choice in an Unix world, > and can also easily be used on Windows (Cygwin), but you can > discuss it. i do not belive that Autoconf and make are the best choice in an Unix world. > It was also proposed to make every application (including every > OTP app) released separately between developers and packagers, > and (at least) between packagers and end users. > Everybody seems to agree on that point. what if the packagers moved upstreams and became a part of the developers? bengt From kostis@REDACTED Wed Feb 22 08:28:36 2006 From: kostis@REDACTED (Kostis Sagonas) Date: Wed, 22 Feb 2006 08:28:36 +0100 (MET) Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: Mail from 'Bengt Kleberg ' dated: Wed, 22 Feb 2006 08:13:44 +0100 Message-ID: <200602220728.k1M7Saaa021255@spikklubban.it.uu.se> Bengt Kleberg wrote: > i would like to suggest another possiblity: > software that has grown organically (without overall plan and/or > guidelines) and always remains backwards compatible, often comes with > complex dependencies between its components. Very true. > i doubt that it is impossible to have the same functionality, as in the > current complexly dependent erlang/otp, in a layered erlang distribution > if the backwards compatibility could be allowed below 100%. This is also true. The only point I would like to add is that "overall plans and/or guidelines" are not enough, I am afraid. These guidelines should be backed up by software tools that enforce the layered software development property. Such tools are currently lacking. Kostis From bengt.kleberg@REDACTED Wed Feb 22 08:34:34 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Wed, 22 Feb 2006 08:34:34 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <43F9C4FF.3@hyber.org> References: <200602150912.31029.ft@it.su.se> <43F32B9D.8020000@ericsson.com> <200602151636.36709.ft@it.su.se> <43F388B2.9090501@hyber.org> <43F99993.7050607@ericsson.com> <43F9C4FF.3@hyber.org> Message-ID: <43FC140A.6090002@ericsson.com> On 2006-02-20 14:32, Claes Wikstom wrote: ...deleted > A lot of the interesting modules to contain c code. > > Also why cater for a solution which disallows packages > with C code. it would be possible to have a erlang solution that could ''call out'', os:cmd("configure, make, make install"), if more than erlang is requiered. make simple things simple, and difficult things possible. instead of making everything difficult, all the time. > And finally, configure, make, make install > packages makes it easy for everybody (including packagers) > to build packages. i try to voice the opinion that configure, make, make install is not easy for everybody. i could be wrong. bengt From bengt.kleberg@REDACTED Wed Feb 22 08:45:00 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Wed, 22 Feb 2006 08:45:00 +0100 Subject: Packaging Erlang In-Reply-To: References: <200602151636.36709.ft@it.su.se> <43F9936F.2090708@ericsson.com> <200602202039.58025.lenglet@csg.is.titech.ac.jp> Message-ID: <43FC167C.3040806@ericsson.com> Douglas Philips On 2006-02-20 16:31, Douglas Philips wrote: ...deleted > to be done re: user-installable packaging vs. system administrator > installable packaging. As far as I know, this is still in the realm of > mostly unexplored territory. Many interpreted languages (perl, python, > lisp) have had this problem to solve. Perl and Python (and TeX, which is > not typically lumped in) have solved this quite successfully with a > Comprehensive Archive Network (CPAN, CTAN, etc.). On the > Mac, applications have (for the most part) moved away from installing > themselves into the system and needing priveleges, with preferences, > settings, etc. living under the home directory of the user(s) running them. it has been described to me that one benefit of perl is cpan. afaik this is not a ''gnutools required'' system. i think erlang would ''look better'' if there was a cean system. i know i would like to build something like it :-) > Perhaps Firefox would be a more acceptable (than CPAN, etc.) example, > wherein from within which I can install extensions, etc. etc. etc. > Perhaps a distinction between the base erlang system (which might need > an administrator to install) and user-add ons. i agree that there is a distinction between the base erlang system and add ons. somewhere there is a kernel with c code, snd that is definitly distinct. > Or perhaps we're just confusing two very different deployment scenarios? > Back-room server rack unattended systems vs. user-interactive intensive > 'desktop' applications? i think that it is possible to have a much more difficult installation procedure if the installer is a sysadm. i also think that even a sysadm could handle a simple installation :-) the think to remember is that a simple installation must allow for choice. even a ''end user'' will at times want to install in the right place, as opposed to where the developper/packager expected the end user to install. bengt From ft@REDACTED Wed Feb 22 09:29:54 2006 From: ft@REDACTED (Fredrik Thulin) Date: Wed, 22 Feb 2006 09:29:54 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <43FC1290.5010002@ericsson.com> References: <200602202039.58025.lenglet@csg.is.titech.ac.jp> <43FC1290.5010002@ericsson.com> Message-ID: <200602220929.54228.ft@it.su.se> On Wednesday 22 February 2006 08:28, Bengt Kleberg wrote: ... > i would like to have a simple build/install system for normal erlang > applications/libraries that would work without a gnu system > (autotools, gnumake, gtar, gcc, etc). By any means. I have never intendet to say that GNU make should be required. I did say that for me, make is GNU make, but I also said that YXA could be compiled with BSD make. That didn't happen by accident, and did require some work from my side, so that people like you could compile YXA with BSD make as well. I bet that when we talk about Erlang in this thread, we all mean the Ericsson Erlang/OTP though - not just any Erlang ;). ... > > Again, Autoconf and make are the best choice in an Unix world, > > and can also easily be used on Windows (Cygwin), but you can > > discuss it. > > i do not belive that Autoconf and make are the best choice in an Unix > world. To be honest I don't particularly like Autoconf either. What I _do_ like is the de-facto standardized interface to install things that './configure; make; make install' provides. If 'configure' is really created by Autoconf or is in fact a perl-script (or what have you) doesn't matter to me, as long as it accepts the command line options I (as a packager) am used to (like --prefix). > > It was also proposed to make every application (including every > > OTP app) released separately between developers and packagers, > > and (at least) between packagers and end users. > > Everybody seems to agree on that point. > > what if the packagers moved upstreams and became a part of the > developers? This is totally unrealistic. Do you think that people from every distribution packaging stuff will want to become developers in all the languages they package? Bengt, it is rather clear to me that we have incompatible opinions in this matter. Without the intent of being condescending, I beleive that you consider Erlang to be a substantial part of your computer. This might be true for me too, personally, but as a packager, Erlang, Yaws, ejabberd and YXA together is less than one percent of all the packages in buildit (and buildit is small, with only ~650 packages). To be able to afford the effort, such small parts of the overall suite of packages can't require custom packaging methods. If we want Erlang applications to be available through the big distributions packaging systems, we must minimize the trouble the packagers have to go through, or create applications that creates a demand for the packagers to learn how to package them. I personally don't think we can create such demand without getting the distributions to package our applications _first_. /Fredrik From martin.logan@REDACTED Tue Feb 21 18:53:40 2006 From: martin.logan@REDACTED (Martin Logan) Date: Tue, 21 Feb 2006 11:53:40 -0600 Subject: Unix* + Erlang + SQLServer/Sybase Message-ID: I have it all in place, not just have to hook it up and write some code. Slightly scared, I wrote and app, using easy soft, OTP ODBC and oracle about 5 years ago and it was nun too pretty... Here's to a bright new day. Cheers, Martin -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Yerl Sent: Friday, February 17, 2006 1:56 AM To: erlang-questions@REDACTED Subject: Unix* + Erlang + SQLServer/Sybase Hi All! You want to connect Erlang to Sybase or SQLServer databases from Unix-[like] systems? So simple! Install UnixODBC (http://www.unixodbc.org/) and FreeTDS (http://www.freetds.org/). After that, use the Erlang ODBC interface to connect to whatever you want. enjoy /ycrux From martin.logan@REDACTED Tue Feb 21 17:39:03 2006 From: martin.logan@REDACTED (Martin Logan) Date: Tue, 21 Feb 2006 10:39:03 -0600 Subject: Jaws - coming soon - testers and advice wanted Message-ID: Please keep me up to date on your progress, or if you are looking for help I am willing join up and pitch in. I have just finished writing a few largish web apps in php and ruby on rails and was about to start writing an MVC framework of my own. No need to have 50 frameworks if we can have one good one. Cheers, Martin -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On ehalf Of ke.han Sent: Monday, February 20, 2006 8:21 AM To: Joe Armstrong (AL/EAB) Cc: Alex Arnon; erlang-questions@REDACTED Subject: Re: Jaws - coming soon - testers and advice wanted Sounds great Joe!!! gotta have a copy when your ready. I am just starting a process of building a framework based on the experience of a just finished mid-sized ajax/json/yaws/erlang/mnesia app. I am in the design phase of pulling together all the utils and fragmented metadata I wrote for the app into a cohesive and simple MVC framework. I am canvasing all the latest erlang code base for inclusion and influence...including Ulf's plain_fsm and (awaiting) rdbms and various ajax andf json patterns. My primary goal is to build a high level framework which formalizes the interaction of injecting a controller into a view and having the view contain metadata of the client/server interaction separate from the view layout/content. The idea is that the controller and domain objects (referenced via the controller and metadata interactions) are each plain_fsm "objects" that use "receive parse transforms" to allow the domain and controllers to "inherit" accessor, event and other framework behaviors. If this ramble makes no sense, hopefully, my first few sets of example code will ;-). But the important thing is I would love to study how to include your ideas with an open mind to transform my own into something better. These next 4 weeks are crucial for me as its my only time to spend 100% of my energy on getting this framework bootstrapped. (yes, I plan to open source the whole thing). thanks for the heads up!! ke han Joe Armstrong (AL/EAB) wrote: > No - javascript is executed on the client - never the server. Nothing > you can do on the client can damange the sever > *provided* the server code is safely compiled. > > I guess I omitted to say that in my "safe" mode of compilation > *everything* is compiled with a safety wrapper (ie including > BIFs) - thus > > apply(M, F, A) is transformed to safe:do(erlang, apply, [M,F,A]) > > and > > list_to_atom(X) to safe:do(erlang, list_to_atom, [X]) > > Then safe:do/3 can be written with any policy you like - to enable or > disable more or less risky operations > > /Joe > > > ------------------------------------------------------------------------ > *From:* owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] *On Behalf Of *Alex Arnon > *Sent:* den 20 februari 2006 12:49 > *To:* erlang-questions@REDACTED > *Subject:* Re: Jaws - coming soon - testers and advice wanted > > Could the Javascript apply(...) binding cause new atoms to be > created? In that case, wouldn't that constitute a security hazard? > From martin.logan@REDACTED Tue Feb 21 17:33:56 2006 From: martin.logan@REDACTED (Martin Logan) Date: Tue, 21 Feb 2006 10:33:56 -0600 Subject: Jaws - coming soon - testers and advice wanted Message-ID: I can do testing. It is quite serendipitous that you release this now. I am in the process of moving to yaws after spending time with php and ruby on rails. I am willing to take a shot at writing an application of my choice with jaws and providing feedback if it would be helpful to you. Do you have an example app already written that I could look at? Cheers, Martin -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Joe Armstrong (AL/EAB) Sent: Monday, February 20, 2006 3:14 AM To: erlang-questions@REDACTED Subject: Jaws - coming soon - testers and advice wanted Hello, Progress report - jaws (yaws + templates) is progressing nicely. I have finally "made up my mind" (TM) and decided on a template syntax (two years thought and half a dozen prototypes "down the drain") - a compiler for this syntax has now been up and running for a few weeks and I am finalising the Ajax support. jaws is a template language for yaws (jaws is inspired by PHP, velocity and AJAX) - this posting contains a "first look" at the syntax. I'm not going to describe the semantics - you have to *guess* - it's rather easy. (Hints all webpages and templates get compiled to single functions) A *single* jaws file contains templates for *many* webpages - so that an entire application can be shipped as a single file. Here's a simple example, assumed to be in the file foo.jaws @module foo @webPage test(_)

factorial is @erl fac(0) -> 1; fac(N) -> N * fac(N-1). @webPage form(A)

@webPage posted(A)

Fac is @template red(X) @template banner(X)

Hello ${name:X} i hear you like ${likes:X} @webPage ajax(A)

...
update @webPage myfunc(A) myfunc(Args) -> [replace_contents("tag1", "

Hi .... "]. @webPage redirect(A)

You'll soon be redirected. This defines eight webpages and two templates in one jaws file. It gives examples of - template expansion - form handling - ajax - header manipulation (in the redirect example) << computationally is about 10-20 times faster than PHP and it works for bignums :-) >> It seems to me to be desirable to have the code which handles a form *immediately after the code which defines the form* (and not in another file) - it also seems desirable to be able to program HTML with subroutines, like this: @webPage foo(A) Some html ... ... @template fancy_box(A) .... ...
Note also how the site of ajax call is lexically near to the code which handles the call. javascript:erlcall(M, F, A) allows javascript to call an arbitary Erlang {M,F,A} This is achieved with ajax and a JSON encoding. MFA returns a list of actions that are to be performed on the webpage - ie (replace_contents("tag1" , HTML)) sets the innerHTML field of tag1 to HTML. At this stage I need two things: 1) Testers - a few good people who are interested in this kind of stuff 2) javascript help - the result of myfunc(Args) is a list of actions to be performed on a web page. A typical example is replace_contents(Tag, Html) When this is called in Erlang a JSON encoded term is sent back to the web page and after a little trickery jsReplaceContents(tag, html) is called where function jsReplaceContents(tag, html) { document.getElementById(tag).innerHTML = html; } I have defined a few simple functions (replace_contents(tag, HTML), delete_tag(Tag) etc. But I am really stretching my knowledge of javascript here. If any javascript guru wants to help please contact me. In particular does anybody have any ideas how to do this? If I have this
.... ... click
I want bar() to compute the id if the nearest containing div - in this case "foo" any ideas how to do this? - do I really have to "walk the tree" from the root of the DOM tree? /Joe From andrae@REDACTED Wed Feb 22 01:47:22 2006 From: andrae@REDACTED (Andrae Muys) Date: Wed, 22 Feb 2006 10:47:22 +1000 Subject: parallel programming survey results In-Reply-To: References: Message-ID: <299D9038-9AFC-4E73-83A6-1C863D3D08C9@internode.on.net> On 22/02/2006, at 2:48 AM, Luke Gorrie wrote: > Daniel Luna writes: > >> "At [insert mailing list THEY sent to] there are probably a lot of >> [insert programming language] programmers, so these figures cannot be >> taken too seriously." > > I can sympathise with the surveyors. They seem to be interested in > parallel programming as in "using lots of hardware in parallel to > solve a problem" like SETI, CGI rendering farms, etc. I bet they got a > lot of responses from Erlang people writing internet servers & telecom > systems which are another kettle of fish entirely. > > I don't think they did a very good job of spelling out what > applications they were interested in though. You touch on two reasons why this paper was a waste of time. The choice of forums to advertise the survey predicted the outcome. Newgroups: comp.parallel : a moderated FAQ and RFP newsgroup supporting the other two c.p.* groups. comp.parallel.mpi : a C/C++/Fortran library for building distributed applications in C/C++/Fortran. comp.parallel.pvm: a C/C++/Fortran library for building distributed applications in C/C++/Fortran. comp.sys.super: another FAQ/RFP newsgroup. aus.computers.parallel: There have been exactly 8 posts since your survey announcement in Oct (6 were spam)! a dead-group. comp.programming.threads: an active group discussing the use of threads in C/C++ especially pthreads. If you doubt me, consider that the past 20 threads included 115 posts, of these 91 were exclusively C/C++/pthreads focused, 11 were lower level that language, 3 were spam, 2 were misposts and only 8 were remotely generic - none of which mentioned any language except C/C++. Mailing Lists: beowulf - good choice, but heavily dominated by MPI/PVM based applications. mpi - C/C++/Fortran pvm - C/C++/Fortran OpenMP x2 - C/C++/Fortran BSP - (from the website) "BSPlib can be used with C, C++, or Fortran." I don't know anything about the forums, Slashdot - good choice. Note that despite the survey's claim to survey 'parallel programmers', and its stated desire to test the claim "Java threads is growing strong", the survey was restricted to users of C, C++, and Fortran. It did not in any meaning way survey 'parallel programmers', or make any attempt to assess the use of Java in this field. So the paper's results should have been summarised as "If we ask C/C++/Fortran programmers what language they use they predominately answer C/C++/Fortran" Instead you state: "Obviously the hype around Java has managed to make the language known to many programmers, but has not convinced too many of them to actually use it for parallel programming." A statement that is simply not supported by the methodology; the closest we might legitimately come from these results is: "Of those programmers still using C, C++, or Fortran parallel programming technologies, very few use Java for their parallel programming." Which again is hardly earth-shattering news. The second reason is that that paper fails on a more fundamental level. It completely fails to define 'parallel programming', or to provide any background to identify the nature and constituents of 'the community' cited in the introduction. It is this failure of definition that causes a problem when the paper hand-waves away the inconvenient response rate from the erlang community. The erlang responses are not a problem in themselves, rather they highlight the intrinsic bias shown in the survey sample. A truly representative survey would have identified a community of users who write parallel programs, and have targeted them with solicitations Off the top of my head the following all make extensive use of parallel programming: Chemists Physicists Biotech Computational Mathematicians Web application developers Telecom Switch developers :) Embedded system developers (in my experience mostly C++ using pthreads or roll-your-own coroutine/user-level-thread libraries) Research Engineers (especially Mechanical) Almost none of these were surveyed except those few that both use MPI/ PVM/OpenMP and follow the associated newsgroup/mailing-list. This is appalling research, I am interested in knowing which journal accepted this paper so I know which journal I can avoid because any peer-review that passes this tautological waste of effort is not peer- reviewed in any meaningful sense of the phrase. Andrae Muys -------------- next part -------------- An HTML attachment was scrubbed... URL: From klacke@REDACTED Wed Feb 22 10:11:52 2006 From: klacke@REDACTED (Claes Wikstrom) Date: Wed, 22 Feb 2006 10:11:52 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <43FC140A.6090002@ericsson.com> References: <200602150912.31029.ft@it.su.se> <43F32B9D.8020000@ericsson.com> <200602151636.36709.ft@it.su.se> <43F388B2.9090501@hyber.org> <43F99993.7050607@ericsson.com> <43F9C4FF.3@hyber.org> <43FC140A.6090002@ericsson.com> Message-ID: <43FC2AD8.1090901@hyber.org> Bengt Kleberg wrote: > i could be wrong. > Yes, /klacke From michal@REDACTED Wed Feb 22 11:14:45 2006 From: michal@REDACTED (Michal Slaski) Date: Wed, 22 Feb 2006 11:14:45 +0100 Subject: Why no news In-Reply-To: References: <006701c636c3$53f49ba0$b40669d4@segeltorp> Message-ID: <84d062da0602220214k2d149c32i@mail.gmail.com> On 21/02/06, Marc van Woerkom wrote: > The search feature isn't working too. > Perhaps there are still problems with the server and this > is just some interrim solution? To search through emails I'm using google to return results only from the erlang mailing list: some keywords site:www.erlang.org/ml-archive/erlang-questions/ Regards, Michal -- Michal Slaski www.erlang-consulting.com From chandrashekhar.mullaparthi@REDACTED Wed Feb 22 11:33:39 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Wed, 22 Feb 2006 10:33:39 +0000 Subject: how to list databases ? In-Reply-To: <84d062da0602210750y6fe6454fo@mail.gmail.com> References: <001a01c632d6$a027f080$2d64250a@marcinek> <84d062da0602210750y6fe6454fo@mail.gmail.com> Message-ID: On 21/02/06, Michal Slaski wrote: > On 16/02/06, Marcin Kuczera wrote: > > I am trying to get a databases list and list of keys. > > > > What I mean is, I have a command: > > mnesia:read({Db, DBKey}).my node is Ericsson's SGSN 5.5I want to get > > measurement counters which are probably kept in mnesia,but I have no idea > > what kind of Db and DBKey's values.Is there any method to list them ? > > If you can connect to the node's shell then this code should list you > all mnesia tables and keys: > > %% get all mnesia tables > ListOfTables = mnesia:system_info(tables), > > %% get all keys for each table > ListOfKeys = > [{Table, mnesia:dirty_all_keys(Table)} || > Table <- ListOfTables, > Table /= schema ], > Use this with a bit of caution! On a node with tables with lots of entries you might end up with the node running out of memory! Marcin, you are probably better off sticking to the procedures laid out by E///. If by mistake you bring the node down, you might be in a bit of trouble :-) cheers Chandru From Marc.Vanwoerkom@REDACTED Wed Feb 22 11:35:39 2006 From: Marc.Vanwoerkom@REDACTED (Marc van Woerkom) Date: Wed, 22 Feb 2006 11:35:39 +0100 Subject: parallel programming survey results In-Reply-To: <299D9038-9AFC-4E73-83A6-1C863D3D08C9@internode.on.net> Message-ID: >So the paper's results should have been summarised as > >"If we ask C/C++/Fortran programmers what language they >use they predominately answer C/C++/Fortran" >"Of those programmers still using C, C++, or Fortran >parallel programming technologies, very few use Java for >their parallel programming." Yep, exactly. I wish I had said it this nice. :-) >This is appalling research, I am interested in knowing >which journal accepted this paper so I know which >journal I can avoid because any peer-review that passes >this tautological waste of effort is not peer- reviewed >in any meaningful sense of the phrase. Good brush-off. You are not a fellow BSD user as well, by chance? :-) Regeards, Marc From thomasl_erlang@REDACTED Wed Feb 22 11:49:10 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Wed, 22 Feb 2006 02:49:10 -0800 (PST) Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602220728.k1M7Saaa021255@spikklubban.it.uu.se> Message-ID: <20060222104910.19599.qmail@web34403.mail.mud.yahoo.com> --- Kostis Sagonas wrote: > This is also true. The only point I would like to > add is that > "overall plans and/or guidelines" are not enough, I > am afraid. > These guidelines should be backed up by software > tools that enforce > the layered software development property. > Such tools are currently lacking. xref computes a static call graph of sorts, which I guess would be the starting point for such a tool. (Or see below.) Find the strongly connected components of the call graph (in other words, the sets of functions that can all mutually reach one another by zero or more function calls) and look at how these span modules, applications, and (user-defined) layers. Extra credit if the tool can pinpoint problematic pieces of code and give nice, informative warnings. Double credit if there is an evaluation telling us whether layering is useful in practice :-) Higher-order calls is more difficult, of course, but I do recall seeing at least two analyzers from Uppsala computing/approximating higher-order call graphs, so this might not be a huge hurdle. Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From francesco@REDACTED Wed Feb 22 13:02:04 2006 From: francesco@REDACTED (Francesco Cesarini (Erlang Consulting)) Date: Wed, 22 Feb 2006 12:02:04 +0000 Subject: how to list databases ? Message-ID: Another way of getting all the keys is using ets:tab2list(TableName) as mnesia uses ets tables. But as Chandru says, be careful if you are doing it in a live network, as the result is stored in the shell history. The more times you do it, the more memory you consume and you might end up running out of memory (Been there, done it, not sure anyone noticed :-) ). Francesco -- http://www.erlang-consulting.com >-----Original Message----- >From: chandru [mailto:chandrashekhar.mullaparthi@REDACTED] >Sent: Wednesday, February 22, 2006 10:33 AM >To: 'Michal Slaski' >Cc: 'Marcin Kuczera', erlang-questions@REDACTED >Subject: Re: how to list databases ? > >On 21/02/06, Michal Slaski wrote: >> On 16/02/06, Marcin Kuczera wrote: >> > I am trying to get a databases list and list of keys. >> > >> > What I mean is, I have a command: >> > mnesia:read({Db, DBKey}).my node is Ericsson's SGSN 5.5I want to get >> > measurement counters which are probably kept in mnesia,but I have no idea >> > what kind of Db and DBKey's values.Is there any method to list them ? >> >> If you can connect to the node's shell then this code should list you >> all mnesia tables and keys: >> >> %% get all mnesia tables >> ListOfTables = mnesia:system_info(tables), >> >> %% get all keys for each table >> ListOfKeys = >> [{Table, mnesia:dirty_all_keys(Table)} || >> Table <- ListOfTables, >> Table /= schema ], >> > >Use this with a bit of caution! On a node with tables with lots of >entries you might end up with the node running out of memory! > >Marcin, you are probably better off sticking to the procedures laid >out by E///. If by mistake you bring the node down, you might be in a >bit of trouble :-) > >cheers >Chandru > -------------- next part -------------- An HTML attachment was scrubbed... URL: From joe.armstrong@REDACTED Wed Feb 22 13:09:28 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Wed, 22 Feb 2006 13:09:28 +0100 Subject: Never trust a statistics you didn't forge yourself Message-ID: > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Michael Suess > Sent: den 21 februari 2006 22:45 > To: Marc van Woerkom > Cc: leopold@REDACTED; erlang-questions@REDACTED > Subject: Re: Never trust a statistics you didn't forge yourself > > On Tuesday 21 February 2006 13:52, Marc van Woerkom wrote: > > Hello, > > Dear Marc, dear members of the Erlang Mailing List, > > I am the main author of the study that has been discussed in > this thread and also in this one: > http://www.erlang.org/ml-archive/erlang-questions/200602/msg00355.html > > I have thought long about whether or not I should try to > defend our study here, especially since we seem to have > raised a lot of hostility here for some reason. I will > therefore start with answering the points you made in this > mail, and secondly add some opinions to the points raised in > the other thread. > > > I just got a copy of your survey results and I am upset about it: Me too. > You are of course free to feel that way. I knew that I would > upset some people with this study, especially the ones whose > "pet system" has not gotten many votes. What surprises me > though is, that I the only flames I got until now come from > the Erlang-community, although Erlang has gotten way more > than its share of publicity in our paper. > > > First you write: > > > To raise more interest for the survey and generate > submissions, we > > > have sent messages to several discussion groups, once > shortly after > > > the start of the survey and once shortly before the end: > > > ? Usenet: comp.parallel, comp.parallel.mpi, comp.parallel.pvm, > > > comp.sys.super, aus.computers.parallel, > comp.programming.threads ? > > > Mailing Lists: beowulf@REDACTED, lam@REDACTED, > omp@REDACTED, > > > compunity@REDACTED, bspall@REDACTED > ? Forums: > > > CodeGuru Forum, Intel Developer Services Forum ? Websites: > > > slashdot.org > > > > then > > > > > We know of one incident, where > > > an influential member of the Erlang community requested > members of > > > their mailing list to show their support for Erlang by > participating > > > in the survey, which they promptly did. > > > Incidents like this one have of course influenced the results as > > > well. > > > > This implies that some kind of guru is able to motivate his minions. > > This is your interpretation, and I certainly did not mean it > that way. I have paid careful attention to make it very > clear, how the study was carried out and whom I have > contacted. I have tried to contact a mailing list or forum > for every parallel programming system that was explicitly > mentioned in the survey question two. Erlang is not > explicitly mentioned there, and I have therefore not posted > to this list. Why was it not explicitly mentioned there? > Because I had to make a subjective choice about what systems > interested me most, and about what systems I thought were > most widely used. And like it or not, Erlang was not on this list. > > Fact is, that Joe posted about the survey on this mailing > list, you can still find his post in the archives: > http://www.erlang.org/ml-archive/erlang-questions/200510/msg00171.html And what did I say here? - The complete post was: If you use Erlang, why not tell http://www.plm.eecs.uni-kassel.de/parasurvey/ About it /Joe Just compare this for a moment to what was posted to the LAM/MPI General User's Mailing List http://www.lam-mpi.org/MailArchives/lam/2005/10/11389.php I quote: > More than 50 people have filled out the survey this far, and therefore I will > be evaluating the results shortly (it will close in two weeks, on November > the 5th!). But before I do, please consider filling out the survey to make > the results even more valuable. Of course, I will make the results available > to everyone who participated. And before I forget to mention it: two gift > certificates from amazon.com are being awarded to everyone who participated. > Thank you for your cooperation, > Best Regards, > Michael Suess The bit about the gift certificates goes totally unmentioned in your paper. You say "An influential member of the Erlang community requested members of their mailing list to show there support of Erlang by participating in the Survey" - which is a false claim - I never said anything about support - I asked the people on this list to tell you about their experiences. And then you omit to say that gift certificates were offered to members of other mailing lists, and finally when you get an unexpectly positive response from the members of the Erlang mailing list you dismiss this this result since I asked members of this list to participate in your survey. Usually in an academic paper it is consider de rigour to describe your experimental procedure. Omitting to mention that you offered gift certificates to people who filled in the survey is rather strange since it is probably that it will bias the results. Note that doing so you may well have biased the results in favour of MPI - MPI got the highest rating among parallel programming systems - was this because you offered them gift certificates? If you are going to make unsubstantiated claims in your paper about the supposed influence of any mailing that I made to this list - then you should also mention the ways in which you other results might be biased. And by the way - you haven't sent me a gift certificate - was the offer only open to people on the MPI list? - did the other people on this list get any gift certificates? > Do any of you disagree, that Erlang has gotten a higher > number of votes because of this? I do not think so. And let > me get this straight: I am not mad at Joe for doing it or > anything, these votes are as valid as anyone elses and I am > thankful to anyone who provided me with his/her opinion. But > I have an explanation for the relatively high number of votes ********************* > for Erlang and I have been open about all other aspects of > this survey. Why the heck should I keep this one secret?? It's not an explanation - it's a hypothesis. This is not science it is your personal opinion with no evidence to support it. I can think of one or two other hypotheses. To start with Erlang is unique in your survey in the sense that concurrency is part of the language and not the OS. Let me give you some examples: c++ is a language but NOT a concurrent programming system PVM is a concurrent programming system but NOT a language This is true of ALL the languages/systems in your paper EXCEPT Erlang. Erlang is a language AND a concurrent programming system. And thus is belongs to both figures 2 and 5. Figure 2 is also incorrectly labelled - the caption is "Parallel programming languages" here you mention C, C++, Fortran, java , and something called functional and logical This is very misleading functional and logical are NOT languages they are classes of languages. C, Fortran are NOT parallel languages. Now there are parallel languages (Erlang, Oz, parlog, occam, ....) but non of the ones you mention are parallel languages. In C, C++, Java etc the concurrency is provided by the OS and NOT the language. Now back to hypothesis building - why did Erlang users response to your survey but users of PVM, C++ etc. did not. Here are some hypotheses 1) There are more Erlang users than we realise - it is spreading but we don't know about it 2) They are more active - evangelical - whatever 3) And influential person influenced the vote Now you say in your paper "An influential member of the Erlang community requested members of their mailing list to show there support of Erlang by participating in the Survey" I did not "request members .. to show their support" I said "If you use Erlang, why not tell ... about it" Later you say just after figure 4 "We have already told you the reasons for the relatively high numbers for Erlang is section 2, so please treat them with caution" I beg to differ, you have not "told you the reasons" - you have advanced ONE hypothesis. Now back to my three hypotheses (above) 1) - I suspect not 3) - I reject 2) - YES - we are more evangelical - programming languages are best likened to religions - we believe in them - they represent belief systems. So why are Erlang users more evangelical than other language/system users? Now this is pure guesswork - I think it's because Erlang is both a language and a parallel programming system - Erlang lowers the "barrier for entry" into parallel programming - it's really easy - and so it becomes possible to easily experiment with concurrent and parallel systems - this is (I think) the real reason why the Erlang figure were unexpectedly high. > I have made it very clear in my paper, that the results of > this survey are not statistically relevant. They cannot be, > because I know of no way to sample a proportional sample of > the parallel programming community. If you have any idea on > how to do that and have the money for it, feel free to > contact me. I have not been able to find any comparable data > anywhere at all. I did the best I could to provide at least > some clues. These data are not statistics, they are > indications at best. I have made it very clear in my paper, > that the data are not statistically relevant. I have been > very careful with my observations and I have been as open as > I could regarding the process of gathering the data. More I cannot do. > > > I can't remember who it was who posted this to erlang > mailing list. I > > was just informed that there was a survey and of course it made > > perfect sense to participate as I am a user of a concurrent > language. > > That's what it is good for. > > Sure. Thanks again for voting and writing your opinion. > > > There are obviously at least two camps of concurrent problems - the > > massive number crunching ones and the ones where you have lots of > > parallel transactions in a possibly distributed system - > that's where > > Erlang is strong. But you missed the biggest use of parallism - in distributed systems where the problem itself is intrinsically distributed. The world's biggest and first parallel machine was the telephone exchange. The internet itself is the biggest example of a concurrent and parallel system. This is where Erlang shines - in writing applications where the concurrency and distribution are an intrinsic part of the problem. This might also account for the high response rate from Erlang fans - Erlang is predominantly used for networking applications - and (I am speculating here) traditional parallel systems are used for number-crunching cluster like applications. Most hobby hackers like to build web-things rather than numerical cluster application so I guess yet another reason why you get an unexspectly positive response from the Erlang list is that there is a higher ratio of fun projects being performed my members of the list than in other groups. Also, I suspect we attract more hobby hackers than the traditional cluster programming techniques. /Joe From ulf.wiger@REDACTED Wed Feb 22 14:35:30 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 22 Feb 2006 14:35:30 +0100 Subject: Never trust a statistics you didn't forge yourself Message-ID: Joe Armstrong wrote: > > And by the way - you haven't sent me a gift certificate > - was the offer only open to people on the MPI list? > - did the other people on this list get any gift > certificates? I have no recollection of receiving one. > To start with Erlang is unique in your survey in > the sense that concurrency is part of the language > and not the OS. To be fair, Java does support concurrency at the language level. It just happens to do it poorly. I would also suggest that OCaml does it, at least through standard libraries. The libraries basically map the POSIX thread model, but there are VM-level threads, which means that OCaml programs can de- couple themselves from the OS thread support. /Ulf W From joe.armstrong@REDACTED Wed Feb 22 15:04:14 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Wed, 22 Feb 2006 15:04:14 +0100 Subject: Never trust a statistics you didn't forge yourself Message-ID: > -----Original Message----- > From: Ulf Wiger (AL/EAB) > Sent: den 22 februari 2006 14:36 > To: Joe Armstrong (AL/EAB); Michael Suess; Marc van Woerkom > Cc: leopold@REDACTED; erlang-questions@REDACTED > Subject: RE: Never trust a statistics you didn't forge yourself > > Joe Armstrong wrote: > > > > And by the way - you haven't sent me a gift certificate > > - was the offer only open to people on the MPI list? > > - did the other people on this list get any gift certificates? > > I have no recollection of receiving one. > > > > To start with Erlang is unique in your survey in the sense that > > concurrency is part of the language and not the OS. > > To be fair, Java does support concurrency at the language > level. It just happens to do it poorly. No it doesn't java thread map to OS threads - see for example The Java programming language is naturally multi-threaded and because of this the underlying OS implementation can make a substantial difference in the performance of your application. Fortunately (or unfortunately), you can choose from multiple threading models and different methods of synchronization within the model, but this varies from VM to VM. Adding to the confusion, the threads library will be transitioning from Solaris 8 to 9, eliminating many of these choices. Version 1.1 is based on green threads and won't be covered here. Green threads are simulated threads within the VM and were used prior to going to a native OS threading model in 1.2 and beyond. Green threads may have had an advantage on Linux at one point (since you don't have to spawn a process for each native thread), but VM technology has advanced significantly since version 1.1 and any benefit green threads had in the past is erased by the performance increases over the years. http://java.sun.com/docs/hotspot/threads/threads.html In other words the what you get depends upon the OS and the VM - ie the semantics of concurrency depend upon the semantics of the underlying OS - so it's "write once - debug on all known platforms". Note that in 1.1 they did things correctly - then they thought about it and went to the native OS threading model (1.2) - turning what might have developed into a nice language into a mess. Note they even use the P word to justify this ("performance increases") - yeah great - better performance at the cost of undefined semantics. Do our process pre-empt? - who knows - run it and see. This is why, or course, Erlang processes are far lighter weight than java threads, because they are simulated in the Erlang run-time system, so spawning a process only involves allocating a data structure and assigning a few variables and not mucking around with page tables and other nasty OS internal things. /Joe > I would also suggest that OCaml does it, at least through > standard libraries. The libraries basically map the POSIX > thread model, but there are VM-level threads, which means > that OCaml programs can de- couple themselves from the OS > thread support. > > /Ulf W > From ulf.wiger@REDACTED Wed Feb 22 15:24:30 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 22 Feb 2006 15:24:30 +0100 Subject: Never trust a statistics you didn't forge yourself Message-ID: (I've trimmed the receiver list a bit.) Joe wrote: > > > To be fair, Java does support concurrency at the language level. It > > just happens to do it poorly. > > No it doesn't java thread map to OS threads - see for example Well, yes, but mapping to OS threads shouldn't in itself disqualify a language from being called concurrency-oriented (Erlang/OTP R11 will probably support the option of making use of OS threads, at least for running multiple schedulers.) Java does support concurrency at the language level. It happens to do it poorly. Leaving the issue of preemptiveness open to each occasion is perhaps the worst mistake, but relying on a shared-object model is not that great either. The fact remains: Java _was_ designed with concurrency in mind. This is also the common perception. Quoting from "Java in a Nutshell" ((c) O'Reilly 1997): "Java makes programming with threads much easier, by providing built-in language support for threads. The java.lang package provides a Thread class that supports methods to start and stop threads and set thread priorities, among other things. The Java language syntax also supports threads directly with the 'synchronized' keyword. This keyword makes it extremely easy to mark sections of code or entire methods that should only be run by a single thread at a time." (Page 8) /Ulf W From Marc.Vanwoerkom@REDACTED Wed Feb 22 15:54:49 2006 From: Marc.Vanwoerkom@REDACTED (Marc van Woerkom) Date: Wed, 22 Feb 2006 15:54:49 +0100 Subject: Never trust a statistics you didn't forge yourself In-Reply-To: <200602212245.20395.msuess@uni-kassel.de> Message-ID: >You are of course free to feel that way. I knew that I >would upset some people >with this study, especially the ones whose "pet system" >has not gotten many >votes. What surprises me though is, that I the only >flames I got until now >come from the Erlang-community, although Erlang has >gotten way more than its >share of publicity in our paper. I am interested in any ranking of any of my pet systems, but this goes only a finite way. The issue here is not some ranking but scientific honesty. You have IMHO not dealt appropriately with the answers to your survey. Other posts here described the flaws better than I am able to do it. As an example that bad rankings don't cause any stirr take e.g. the big language shootout, which is discussed on this list occassionaly. >Do any of you disagree, that Erlang has gotten a higher >number of votes because of this? I am sure if you had posted here about the survey instead of Joe, it would have gotten exactly the same number of votes. Regards, Marc From chandrashekhar.mullaparthi@REDACTED Wed Feb 22 17:02:43 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Wed, 22 Feb 2006 16:02:43 +0000 Subject: Never trust a statistics you didn't forge yourself In-Reply-To: References: <200602212245.20395.msuess@uni-kassel.de> Message-ID: On 22/02/06, Marc van Woerkom wrote: > >Do any of you disagree, that Erlang has gotten a higher > >number of votes because of this? > > I am sure if you had posted here about the survey instead > of Joe, it would have gotten exactly the same number of > votes. Agreed! I didn't take part in the survey because *Joe* posted it. I took part in it because I wanted to make my views known about Erlang. From thomaswhitcomb@REDACTED Wed Feb 22 18:04:23 2006 From: thomaswhitcomb@REDACTED (Tom Whitcomb) Date: Wed, 22 Feb 2006 12:04:23 -0500 Subject: Finding your calling module Message-ID: <4CBD3913.229A3C38.72A78FD1@netscape.net> I'm using a callback pattern similar to the approach used in the gen_server. However, passing the module name around seems error prone and overly bound. Can a called function can determine the name of the module of its calling function without passing the module name as a parameter? thanks, tom __________________________________________________________________ Switch to Netscape Internet Service. As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register Netscape. Just the Net You Need. New! Netscape Toolbar for Internet Explorer Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp From ke.han@REDACTED Wed Feb 22 18:15:23 2006 From: ke.han@REDACTED (ke.han) Date: Thu, 23 Feb 2006 01:15:23 +0800 Subject: Never trust a statistics you didn't forge yourself In-Reply-To: References: Message-ID: <43FC9C2B.4060904@redstarling.com> I have to agree that not only Java, but many languages (if you count their library support) provide for concurrency via thread locks around shared data. I have built extremely scalable and efficient application and system frameworks in Java that encapsulate concurrency for the application programmer. And now that I don't have to support Java anymore, I looked for a different solution and found erlang was the best go forward solution (most notably for its concurrency model). I suppose we get used to the far more useful concurrency paradigm in erlang that the mainstream model appears low level and not a first class language feature. I'm sorry to see such a tirade about this parallel language report. I think the report speaks only two things: 1 - The report didn't have a large enough response to provide meaningful statistics. 2 - The only meaningfully statistic I can produce from the report and its fall out is that when other language communities were asked to fill out the questionnaire, they didn't show as much support as the erlang community. This statistic only holds if you think it was the community on the erlang maillist that were the bulk of the pro-erlang responses. What this implies is obviously subjective..but I know where I stand ;-) BTW, I remember the post which Joe wrote referencing the questionnaire. I did not fill it out. The reason I remember this post is because I read every post on this maillist regardless of the sender. One the many reasons I chose to use erlang is because I really like the maillist community...responsive, friendly, professional and not too much useless traffic (although this post may qualify ;-). thanks again to this maillist for making erlang a great choice!!! ke han Ulf Wiger (AL/EAB) wrote: > > (I've trimmed the receiver list a bit.) > > Joe wrote: >>> To be fair, Java does support concurrency at the language level. It >>> just happens to do it poorly. >> No it doesn't java thread map to OS threads - see for example > > Well, yes, but mapping to OS threads shouldn't in itself > disqualify a language from being called concurrency-oriented > (Erlang/OTP R11 will probably support the option of making > use of OS threads, at least for running multiple schedulers.) > > Java does support concurrency at the language level. It > happens to do it poorly. Leaving the issue of preemptiveness > open to each occasion is perhaps the worst mistake, but > relying on a shared-object model is not that great either. > > The fact remains: Java _was_ designed with concurrency in > mind. > > This is also the common perception. Quoting from "Java in > a Nutshell" ((c) O'Reilly 1997): > > "Java makes programming with threads much easier, by > providing built-in language support for threads. The > java.lang package provides a Thread class that supports > methods to start and stop threads and set thread > priorities, among other things. The Java language > syntax also supports threads directly with the > 'synchronized' keyword. This keyword makes it > extremely easy to mark sections of code or entire > methods that should only be run by a single thread > at a time." (Page 8) > > /Ulf W > From lennart.ohman@REDACTED Wed Feb 22 23:01:57 2006 From: lennart.ohman@REDACTED (Lennart Ohman) Date: Wed, 22 Feb 2006 23:01:57 +0100 Subject: how to list databases ? Message-ID: <000e01c637fb$99936310$0600a8c0@st.se> Hi Marcin, as an Erlang enthusiast I am of course thrilled to see new "faces" on the erlang-list asking seriously meant questions about Erlang. However in this case, being contracted by Ericsson, it is my "duty" to wear an Ericsson-hat and strongly advice against using this list to obtain instructions on how to operate Ericsson equipment. Though the suggestions you might get from the list are most often given by very knowledgeable persons and perfectly correct from an Erlang perspective. However not given in the context of the equipment at hand. As some responses have cautioned you, you may very well overload the system since there are no safety nets in the Erlang shell. And most importantly, the Erlang questions list is not an Ericsson channel of information, rather a free (within reasonable limits) forum for anyone. Please contact your official support organization for advice on how to extract the information you need. In this case I guess you want to use CLI commands to extract information on PM counters. If you are unable to find what you need I will be happy to forward your questions to the correct persons with in the GSN organization. (If it is not a live node we are talking about, but rather a test system in a lab, it becomes a different game of course. But as a comment to others too, please indicate so in the question. Otherwise people in Ericsson support organizations start to jump up and down) Best Regards, Lennart >hello, > >I am trying to get a databases list and list of keys. > >What I mean is, I have a command: >mnesia:read({Db, DBKey}).my node is Ericsson's SGSN 5.5I want to get >measurement counters which are probably kept in mnesia,but I have no idea >what kind of Db and DBKey's values.Is there any method to list them ?Marcin ------------------------------------------------------------- Lennart Ohman office : +46-8-587 623 27 Sjoland & Thyselius Telecom AB cellular: +46-70-552 67 35 Sehlstedtsgatan 6 fax : +46-8-667 82 30 SE-115 28, STOCKHOLM, SWEDEN email : lennart.ohman@REDACTED From mikael.karlsson@REDACTED Wed Feb 22 23:34:20 2006 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Wed, 22 Feb 2006 23:34:20 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <43FC2AD8.1090901@hyber.org> References: <43FC140A.6090002@ericsson.com> <43FC2AD8.1090901@hyber.org> Message-ID: <200602222334.21229.mikael.karlsson@creado.com> onsdag 22 februari 2006 10:11 skrev Claes Wikstrom: > Bengt Kleberg wrote: > > i try to voice the opinion that configure, make, make install is not > > easy for everybody. > > i could be wrong. > > Yes, > > > /klacke No, I would not be that sure that this is wrong. It is easy if you have the tools installed, but that may not always be the case. And there is a point in having a pure Erlang system (like REPOS ?) that can deploy "pure" erlang packages. See the other thread: http://www.erlang.org/ml-archive/erlang-questions/200602/msg00369.html Suppose 80 % of Erlang applications are not "contaminated" by C-code :-) then it would be nice to have a way to deploy them on an installed Erlang base system without having to think about other infrastructures. There should be some benefit of running on top of a VM. Java/Ant is another example of this. Why not make deployment apps like erlmerge sensitive about if there is a Makefile or an Emakefile (or none) and decide which route to take. The problem with deployment on Erlang, as I see it, is that it is not possible to add new applications to releases, and that they all have to go into the erlang root library. It would be nice if Erlang could have a secondary library path that was searched too, meaning that you could deploy applications in an own library without having to do code:add_path{a,z} for everyone of them. And making it easy to upgrade your Erlang base system without affecting your own additions. Regards Mikael From msuess@REDACTED Thu Feb 23 00:55:02 2006 From: msuess@REDACTED (Michael Suess) Date: Thu, 23 Feb 2006 00:55:02 +0100 Subject: Never trust a statistics you didn't forge yourself In-Reply-To: References: Message-ID: <200602230055.08986.msuess@uni-kassel.de> Hi Joe, hi members of this list, it is obvious by now, that there is not much I can do to convince you and at least some members of this list of the value of our study. Thats fine, and I can live with that. Just drop me a note, if you do not want to be notified of the results of our followup paper, and I will take you off my list. However, some claims have been made here regarding the process I used to carry out and evaluate this study and about my scientific integrity, which I believe to be false. I will at least try to address them in this mail, along with a few more perspectives from my side. On Wednesday 22 February 2006 13:09, Joe Armstrong (AL/EAB) wrote: [snip] > And what did I say here? - > > The complete post was: > > If you use Erlang, why not tell > > http://www.plm.eecs.uni-kassel.de/parasurvey/ > > About it > > /Joe > > Just compare this for a moment to what was posted to > the LAM/MPI General User's Mailing List > > http://www.lam-mpi.org/MailArchives/lam/2005/10/11389.php > > I quote: > > More than 50 people have filled out the survey this far, and > > therefore I will > > > be evaluating the results shortly (it will close in two weeks, > > on November > > > the 5th!). But before I do, please consider filling out the > > survey to make > > > the results even more valuable. Of course, I will make the > > results available > > > to everyone who participated. And before I forget to mention it: > > two gift > > > certificates from amazon.com are being awarded to everyone who > > participated. > > > Thank you for your cooperation, > > Best Regards, > > Michael Suess > > The bit about the gift certificates goes totally unmentioned in your > paper. p.2, Survey Methodology: "If participants submitted their answers along with a working e-mail address, they could win one of two 50$ gift certi?cates from amazon.com." > You say "An influential member of the Erlang community > requested members of their mailing list to show there support of Erlang > by participating > in the Survey" - which is a false claim - I never said anything about > support - I asked the > people on this list to tell you about their experiences. This seems to be the single most important point, that most people here are complaining about, right? Reading through your mail again, I admit that the phrase I used in the paper is quite strong and I will make sure to change it in my followup paper. I will even go as far as to say: "The phrase is misleading, my mistake, sorry about it." I would be very interested in how you or all the other people on this list who have been bothered by it would phrase it, though, as I cannot leave out the fact that you posted on this list entirely. Without this, figure 4 gives a very wrong impression, as the Erlang people were the only ones (of the systems mentioned in this figure) notified of the survey (whether by you, or by me does not make a difference here, as others have claimed). > And then you omit to say that gift certificates were offered to members > of other mailing > lists, and finally when you get an unexpectly positive response from the > members of the Erlang > mailing list you dismiss this this result since I asked members of this > list to > participate in your survey. > > Usually in an academic paper it is consider de rigour to describe your > experimental procedure. > Omitting to mention that you offered gift certificates to people who > filled in the > survey is rather strange since it is probably that it will bias the > results. > > Note that doing so you may well have biased the results in favour of MPI > - MPI got the highest > rating among parallel programming systems - was this because you offered > them gift certificates? > > If you are going to make unsubstantiated claims in your paper about the > supposed > influence of any mailing that I made to this list - then you should also > mention the > ways in which you other results might be biased. > > And by the way - you haven't sent me a gift certificate - was the offer > only open > to people on the MPI list? - did the other people on this list get any > gift certificates? This paragraph made me very angry at first, then very sad. I do not know how long it took you to write it, but it took me about 10 seconds to open the report, press "find" and search for "gift". There is only one result, and this is the quote given above. And it is exactly where it is supposed to be, right under "Survey Methodology". Is it really too much to ask of you to do the same and actually invest these 10 seconds, before you write 7 paragraphs of false claims about my scientific methodology and try to attack it on this level? You also alledge that I have skewed the results in favour of MPI by offering them gift certificates. Had you taken the time to check the other mailing lists and forums, you would have noticed that I send all of them EXACTLY the same mail, and all with the same offer. An offer which is also right on top of the survey. You will also notice, that the last sentence of each of these mails contains a mistake: "And before I forget to mention it: two gift certificates from amazon.com are being awarded to everyone who participated." This should more accurately read "among everyone who participated". I have noticed this only now, and this is the second mistake I will admin in this post. To my defense I can say that the right phrase was used at the top of the survey, and I will assume that everyone read that before he filled out the survey. Nevertheless, the winners of these certificates have been drawn, and their rewards have been given to them on January the 4th. One of them allowed me to publish his name, and it is Timothy Mattson of Intel fame. I have not gotten an answer from the other winner, about whether or not I can publish his name, and therefore I have to keep it secret. The last point I want to raise about these 7 paragraphs: you alledge that I do not mention the other ways in which my results could be biased. I can only kindly ask you to reread the section about "Survey Methodology", and you will find that I have made exactly this point very clear. [snip] > To start with Erlang is unique in your survey in the sense that > concurrency is part of the language and not the OS. > > Let me give you some examples: > > c++ is a language but NOT a concurrent programming system > PVM is a concurrent programming system but NOT a language > > This is true of ALL the languages/systems in your paper EXCEPT Erlang. > > Erlang is a language AND a concurrent programming system. > > And thus is belongs to both figures 2 and 5. I thought I had made this clear when you first wrote me about it in private mail. In Figures 2 and 5 you will find only the languages I explicitly asked about in my survey, and not the languages people put in by hand in any of the "other" options. To put all in one graph would have been extremely unfair against the "other" languages, don't you think? If I had explicitly asked for Erlang (or for Python or Ocaml) in questions 1 or 2, they would have gotten a higher number of votes than they have now. Had I not asked for Java, it would have gotten fewer votes. And therefore I can only compare the languages I explicitly asked for with each other, and the "other" languages with each other. And this is what I do. On the other hand, Erlang gets mentioned both for the "other languages" and for the "other systems" - only that there is no graph for the other systems, because only Erlang and .NET would show up in there at all. Let me quote the report again: "The other parallel programming systems submitted include a wide variety of systems, yet only Erlang (26 submissions, accumulating to a usage of 89) and .NET (four submissions with a usage of 10) managed to be mentioned more than three times. Noteworthy is the fact that Erlang is one of the very few programming languages for which parallelism is an integral part of the language, and it therefore has high submissions for both questions one and two." I know the point about Erlang being a language and a parallel programming system you are trying to make here, I have known it when I wrote the paper, I have known it when I first answered your private mail and I still know it now. What I do not know is what to do to make you understand, that I know it and that I am not here to bash Erlang or piss off you or the Erlang-community in any way! > Figure 2 is also incorrectly labelled - the caption is "Parallel > programming languages" > here you mention C, C++, Fortran, java , and something called functional > and logical > > This is very misleading functional and logical are NOT languages > they are classes > of languages. Thanks for educating me again, Joe. If you look at the survey (or figure 1 for that matter), you will see that I know the difference. Yet I am sure you understand that I had space constraints when I put the labels on the graph... > C, Fortran are NOT parallel languages. This is getting ridiculous. Please take a look at the survey again, or at figure 1 where the exact phrase of question one is printed: "How often have you used the following programming languages as a basis for your parallel applications during the last 3 years?" You will not argue with me, that these languages are base languages for many parallel programming systems, or will you? Could I have put that in the label of figure 2 again? Yes, but when I wrote the paper this did not occur to me, as the whole paper around the figures makes this point perfectly clear in my humble opinion. [snip] I am running out of time, and I cannot comment on the rest of the points made in your mail anyways, as I do not know the Erlang community enough. I will therefore try to address some other points made by other people: Andrae Muys wrote: > A truly representative survey would have identified a community of users who > write parallel programs, and have targeted them with solicitations And this is exactly the reason, why I have claimed no statistical value in the data whatsoever. I even write in the report itself: "For this reason, please take all results of this survey with a grain of salt, as they are not statistically sound! For statistical signi?cance, we would have to sample a proportional part of the parallel programming population, and we know of no way to do so (at least not within our budget). It is for this reason, that you will not ?nd any statistical measures applied to the data in this paper." And there you will also find the answer I would like to give to your claim. We know the data are not hard. And I have also done my homework and thought about how I could make these data more statistically useful, but I have come to the conclusion that I do not know how! And I am fairly sure when you go further than rough sketches of your plans to identify, sample and contact these subcommunities, you will come to a similar result, at least when you consider that this is just a side-track of my research and that we do not have as much money as we wish sometimes. But maybe you can prove me wrong and do a better survey, I would sure be interested in the results... >This is appalling research, I am interested in knowing which journal >accepted this paper so I know which journal I can avoid because any >peer-review that passes this tautological waste of effort is not >peer-reviewed in any meaningful sense of the phrase. *sigh*. Thank you for the very constructive criticism. Let me quote myself again: >I will be working on an extended version of this paper including all results >and hope to publish it in a research journal soon (I have contacted some >journals, and although this is not exactly traditional research, they have >showed interest) Note the part about the "extended version" and "showing interest". The extended version is not even written, nor peer-reviewed, all I did was ask some journals about whether or not they would accept a paper of this scope at all. Marc van Woerkom wrote: >The issue here is not some ranking but scientific honesty. >You have IMHO not dealt appropriately with the answers to >your survey. Other posts here described the flaws better >than I am able to do it. I think, I have spent the better part of this evening to answer the main attempts to challenge my scientific honesty or integrity. I have admitted two mistakes, which are not related to my honesty or integrity in any way. I have not put any claims in the paper I am not ready to defend here or anywhere else (with the possible exception noted at the beginning of this mail). I am the first to admit that I do make mistakes, but I am also getting tired of rehashing what I said in the paper or to fight things I am supposed to have done or not done, many of which are false or quoted out of context. >As an example that bad rankings don't cause any stirr take >e.g. the big language shootout, which is discussed on this >list occassionaly. And the reason for this could be, that they do not comment on the results at all ? Ulf Wiger wrote: >Why more than its share? Erlang clearly dominated the >"functional languages" category. This was worthy of >a comment. Yes, and I have made that comment, and a few more about Erlang. Just search for Erlang in the paper, and you will find many results. And thats what I mean by "its share of publicity". [snip] >Most likely, Erlang would have received very few votes >wihout it, mainly because most erlang users would >not have known about the survey at all. I have been trying to make that point somewhere at the top of this mail. Nice to see I am not alone in this regard. >That is, you posted reminders as well in the other >forums, again reminding of gift certificates. Nothing >wrong with that -- you probably have to tease people >with some rewards to get them to respond -- but it >does make Joe's "rallying cry" to the Erlang >community rather modest. (: I know that now, and thats why I admitted that mistake. [snip] >Although the applications where Erlang is used >differs somewhat from the ones you were most interested >in, as you've stated yourself. I venture to guess that >this is also true for e.g. the OCaml crowd (was it >the MLDonkey team that responded? ;-) I do not know, who responded in favour of OCaml, but I might add that I have looked at Ocaml very closely at the beginning of my research. Unfortunately, it has the same "problem" as Erlang: no speedups for parallel programs. And given my background and my goals, this is a showstopper. >> When I asked for review on this paper, the Erlang >> numbers were held against me again and again, and >> it was even suggested to take them out. >Now, would you believe me when I say that this doesn't >surprise me in the least. (: >Last fall, there was a fairly lengthy thread on this >list about a small company debating a mix of niche >languages vs. C++. Here's one post that was >particularly telling: >http://article.gmane.org/gmane.comp.lang.erlang.general/11706 >There are many members on this list who have taken >a fair amount of heat in their time for favouring >something so decidedly "not-C++-or-Java" as Erlang. >Perhaps that makes us a bit too eager sometimes... I don't know. What I also do not know, is how to end this mail. Therefore, I will just say thank you for listening, best regards, Michael -- "What we do in life, echos in eternity..." M.: msuess@REDACTED | T.: +49-561-804-6269 | F.: +49-561-804-6219 WWW: http://www.plm.eecs.uni-kassel.de/plm/index.php?id=msuess Public PGP key and fingerprint available at above address. Research Associate, Programming Languages / Methodologies Research Group University of Kassel, Wilhelmsh?her Allee 73, D-34121 Kassel -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: From chandrashekhar.mullaparthi@REDACTED Thu Feb 23 03:13:56 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Thu, 23 Feb 2006 02:13:56 +0000 Subject: Erlang licenses In-Reply-To: References: <200602191645.45383.neumann@lostwebsite.net> <200602211728.54578.lenglet@csg.is.titech.ac.jp> <1140517236.43fae9747b928@backawinner.gg> Message-ID: On 23/02/06, chandru wrote: > On 21/02/06, Gordon Guthrie wrote: > > Quoting Romain Lenglet : > > > > > I would like to add that there is the same problem with Jungerl: > > > only 33 applications out of 70 have a distribution licence (i.e. > > > have at least one file that contains the word "licence" ;-)), > > > > Make that 34 of 70 - I have added a LICENSE file for my erlang_automated_build > > script ;-> > > 33. I've added the LGPL license to ibrowse. Ahem! I mean 35. Chandru From chandrashekhar.mullaparthi@REDACTED Thu Feb 23 03:13:11 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Thu, 23 Feb 2006 02:13:11 +0000 Subject: Erlang licenses In-Reply-To: <1140517236.43fae9747b928@backawinner.gg> References: <200602191645.45383.neumann@lostwebsite.net> <200602211728.54578.lenglet@csg.is.titech.ac.jp> <1140517236.43fae9747b928@backawinner.gg> Message-ID: On 21/02/06, Gordon Guthrie wrote: > Quoting Romain Lenglet : > > > I would like to add that there is the same problem with Jungerl: > > only 33 applications out of 70 have a distribution licence (i.e. > > have at least one file that contains the word "licence" ;-)), > > Make that 34 of 70 - I have added a LICENSE file for my erlang_automated_build > script ;-> 33. I've added the LGPL license to ibrowse. cheers Chandru From rlenglet@REDACTED Thu Feb 23 03:15:30 2006 From: rlenglet@REDACTED (Romain Lenglet) Date: Thu, 23 Feb 2006 11:15:30 +0900 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602222334.21229.mikael.karlsson@creado.com> References: <43FC2AD8.1090901@hyber.org> <200602222334.21229.mikael.karlsson@creado.com> Message-ID: <200602231115.30534.rlenglet@users.forge.objectweb.org> Mikael Karlsson wrote: > onsdag 22 februari 2006 10:11 skrev Claes Wikstrom: > > Bengt Kleberg wrote: > > > i try to voice the opinion that configure, make, make > > > install is not easy for everybody. > > > i could be wrong. > > > > Yes, > > > > > > /klacke > > No, > I would not be that sure that this is wrong. > It is easy if you have the tools installed, but that may not > always be the case. Here is the same misunderstanding again... The proposal was *not* to use ./configure ; make ; make install for deployment / installation, but for *building packages*, which in turn can be deployed and installed. It is OK to create a new pure-Erlang packaging / deployment system, but 1) application developers should not have to deal with creating such packages, and 2) any application should be easily packagable by a packager using any packaging system. I want to emphasize on the latter point: 2-1) packaging should be made easy to packagers, 2-2) the choice of a packaging system should be let free to packagers (no packaging system, e.g. a "pure-Erlang" packaging system, should be imposed by developers). To make this possible, a common form for source packages provided by developers must be defined, e.g. by including a configure script and a Makefile in every source tarball. (Fredrik, you are right when writing that the configure script must not necessarily be generated by GNU Autoconf...) Nothing should prevent a packager to take a source Erlang application, to build it by running the provided configure script and Makefile rules, and to create a user-installable package using any "pure-Erlang" packaging system you want: in this scenario, end users of the package would not have to install anything else than Erlang. But please understand that this is not the only packaging scenario. Another packager should be able to take the very same application in the same source form, build it by running the provided configure script and Makefile rules, and create a Debian package that can be installed by end users using only the Debian package installation tools (hence, not requiring any "pure-Erlang" package installation tool like above). In the two packaging scenarii above, packagers can make sure that they have the right tools installed on their own systems to create installable packages (yes, I believe that any packager can make the effort to install a variant of Make on its system, at least). > And there is a point in having a pure > Erlang system (like REPOS ?) that can deploy "pure" erlang > packages. Yes, just like there is a point in having a pure Ruby system that can deploy "pure" Ruby packages, and a pure Java system that can deploy "pure" Java packages, and a pure Perl system that can deploy "pure" Perl packages, and a pure Python system that can deploy "pure" Python packages... (Sorry for the ironic tone... ;-)) I am just wondering how you can manage / upgrade applications on a system with such a proliferation of incompatible packaging systems? Really, I am not against this idea. I just say that a pure Erlang packaging system should not be imposed, and applications should be delivered by developers in source form with a configure script and a Makefile, and not in compiled form as a pure Erlang installable package. Creating installable packages is the job of a packager, and there may be many packagers of a single application, for different systems with different packaging systems. I am very sorry to repeat myself, and to decrease the signal / noise ratio of this mailing list, but I have the impression to not be understood. > See the other thread: > http://www.erlang.org/ml-archive/erlang-questions/200602/msg00 >369.html > > Suppose 80 % of Erlang applications are not "contaminated" by > C-code :-) then it would be nice to have a way to deploy them > on an installed Erlang base system without having to think > about other infrastructures. There should be some benefit of > running on top of a VM. Java/Ant is another example of this. Ant is a build system, not a packaging system. And even packages containing binary native code could be deployed using a packaging system in pure Erlang, there is no problem with that. One issue would be to be able to have several versions of every such package, one for every architecture / system, and the system should be able to choose and install the right version on a system. But this can be solved. Even with "pure" Erlang packages, that problem of native binary code would arise one day, with the spread of Hipe: a packaging system will have to offer different packages with modules that contain binary code generated by Hype, for every architecture supported by Hipe. > Why not make deployment apps like erlmerge sensitive about if > there is a Makefile or an Emakefile (or none) and decide which > route to take. > > The problem with deployment on Erlang, as I see it, is that it > is not possible to add new applications to releases, and that > they all have to go into the erlang root library. It would be > nice if Erlang could have a secondary library path that was > searched too, meaning that you could deploy applications in an > own library without having to do code:add_path{a,z} for > everyone of them. And making it easy to upgrade your Erlang > base system without affecting your own additions. You want the equivalent of Java's CLASSPATH environment variable. Why not?! But I believe that a CLASSPATH-like (why not call it MODULEPATH?) is of no help to manage packages. Normally, if a packaging system is able to install a package, it should also be able to uninstall and upgrade it automatically without having users to struggle with a PATH environment, and even if the packaging system had installed files in a common directory tree. Correct me if I am wrong. -- Romain LENGLET From jay@REDACTED Thu Feb 23 08:20:34 2006 From: jay@REDACTED (Jay Nelson) Date: Wed, 22 Feb 2006 23:20:34 -0800 Subject: Octopiler solves concurrency problems? Message-ID: <43FD6242.2050409@duomark.com> http://news.com.com/Octopiler+seeks+to+arm+Cell+programmers/2100-1007_3-6042132.html It isn't easy to write code for Cell, with its central processing core and eight accompanying special-purpose engines. Octopiler , which IBM Research plans to outline at a tutorial next month, aims to change all that. The software development tool converts a single, human-written program into several different programs that run simultaneously on Cell's various cores. "Programming Cell is relatively hard," said Illuminata analyst Gordon Haff, in particular because development tools must must divide software into threads running among different cores and keep those programs synchronized as they run. "Certainly a higher-level, more abstracted model makes programming a lot easier." more... jay From stevez@REDACTED Wed Feb 22 17:31:40 2006 From: stevez@REDACTED (Steve Zdancewic) Date: Wed, 22 Feb 2006 11:31:40 -0500 Subject: Final CFP: Programming Languages and Analysis for Security (PLAS) 2006 Message-ID: <43FC91EC.3090402@cis.upenn.edu> Final Call for Papers: Submission Deadline March 3, 2006 ----------------------------------------------------------------------- Call for Papers PLAS 2006 ACM SIGPLAN Workshop on Programming Languages and Analysis for Security http://www.cis.upenn.edu/~stevez/plas06.html co-located with ACM SIGPLAN PLDI 2006 Conference on Programming Language Design and Implementation Ottawa, Canada, June 10, 2006 The goal of PLAS 2006 is to provide a forum for researchers and practitioners to exchange and understand ideas and to seed new collaboration on the use of programming language and program analysis techniques that improve the security of software systems. The scope of PLAS includes, but is not limited to: -- Language-based techniques for security -- Program analysis and verification (including type systems and model checking) for security properties -- Compiler-based and program rewriting security enforcement mechanisms -- Security policies for information flow and access control -- High-level specification languages for security properties -- Model-driven approaches to security -- Applications, examples, and implementations of these security techniques Submission: We invite papers of two kinds: (1) Technical papers for "long" presentations during the workshop, and (2) papers for "short" presentations (10 minutes). Papers submitted for the long format should contain relatively mature content; short format papers can present more preliminary work, position statements, or work that is more exploratory in nature. The deadline for submissions of technical papers (for both the short and long presentations) is March 03, 2006. Papers must be formatted according the ACM proceedings format: "long" submissions should not exceed 10 pages in this format; "short" submissions should not exceed 4 pages. These page limits include everything (i.e., they are the total length of the paper). Papers submitted for the "long" category may be accepted as short presentations at the program committee's discretion. Email the submissions to stevez AT cis.upenn.edu. Submissions should be in PDF (preferably) or Postscript that is interpretable by Ghostscript and printable on US Letter and A4 sized paper. Templates for SIGPLAN-approved LaTeX format can be found at http://www.acm.org/sigs/sigplan/authorInformation.htm. We recommend using this format, which improves greatly on the ACM LaTeX format. Publication options: Authors of accepted papers may choose whether they would like their work published in a planned special issue of SIGPLAN Notices. Those papers that are not published in SIGPLAN Notices will only be considered part of the informal workshop proceedings and are therefor suitable for future publication in journal or other conference venues. Submitted papers must describe work unpublished in refereed venues, and not submitted for publication elsewhere (including journals and formal proceedings of conferences and workshops). See the SIGPLAN republication policy for more details http://www.acm.org/sigs/sigplan/republicationpolicy.htm Important dates: Submission deadline March 03, 2006 Notification of acceptance April 03, 2006 Final papers due April 24, 2006 Workshop June 10, 2006 Organizers: Steve Zdancewic, University of Pennsylvania, stevez AT cis.upenn.edu Vugranam C. Sreedhar, IBM T.J. Watson Research Center vugranam AT us.ibm.com Program Committee: Amal Ahmed, Harvard University, USA Anindya Banerjee, Kansas State University, USA Adriana Compagnoni, Stevens Institute of Technology, USA Elena Ferrari, University of Insubria at Como, Italy Michael Hicks, University of Maryland, USA Annie Liu, State University of New York at Stony Brook, USA Brigitte Pientka, McGill University, Canada Sriram Rajamani, Microsoft Research, India, Vugranam Sreedhar, IBM TJ Watson Research Center, USA Westley Weimer, University of Virginia, USA Steve Zdancewic, University of Pennsylvania, USA From happi@REDACTED Wed Feb 22 19:02:55 2006 From: happi@REDACTED (Erik Stenman) Date: Wed, 22 Feb 2006 19:02:55 +0100 Subject: Finding your calling module In-Reply-To: <4CBD3913.229A3C38.72A78FD1@netscape.net> References: <4CBD3913.229A3C38.72A78FD1@netscape.net> Message-ID: <43FCA74F.6030407@kreditor.se> Tom Whitcomb wrote: >I'm using a callback pattern similar to the approach used in the gen_server. However, passing the module name around seems error prone and overly bound. > >Can a called function can determine the name of the module of its calling function without passing the module name as a parameter? > > It depends on what you mean by "module of its calling function". If you are using a pattern like gen_server and the call actually is a rpc (a send between the caller and the callee) then I do not know how to do it without explicitly passing the caller as an argument. To find the closest caller on the callstack I have found the following hack useful on occations. (Note that tail-calls are not saved on the stack, and the solution is quite hacky... erlang_fault is not guaranteed to give a good stacktrace...) calling_mod() -> element(1,lists:nth(2,element(2,element(2,catch erlang:fault([]))))). calling_fun() -> element(2,lists:nth(2,element(2,element(2,catch erlang:fault([]))))). /Erik (Happi) Stenman From andrae@REDACTED Thu Feb 23 02:48:12 2006 From: andrae@REDACTED (Andrae Muys) Date: Thu, 23 Feb 2006 11:48:12 +1000 Subject: Never trust a statistics you didn't forge yourself In-Reply-To: <200602230055.08986.msuess@uni-kassel.de> References: <200602230055.08986.msuess@uni-kassel.de> Message-ID: <374710E2-5961-41DD-AAE2-D94DD3D5EDB4@netymon.com> On 23/02/2006, at 9:55 AM, Michael Suess wrote: [snip] > Andrae Muys wrote: >> A truly representative survey would have identified a community of >> users who >> write parallel programs, and have targeted them with solicitations > > And this is exactly the reason, why I have claimed no statistical > value in the > data whatsoever. I even write in the report itself: > > "For this reason, please take all results of this survey with a > grain of salt, > as they are not statistically sound! For statistical signi?cance, > we would > have to sample a proportional part of the parallel programming > population, > and we know of no way to do so (at least not within > our budget). It is for this reason, that you will not ?nd any > statistical > measures applied to the data in this paper." > > And there you will also find the answer I would like to give to > your claim. We > know the data are not hard. And I have also done my homework and > thought > about how I could make these data more statistically useful, but I > have come > to the conclusion that I do not know how! And I am fairly sure when > you go > further than rough sketches of your plans to identify, sample and > contact > these subcommunities, you will come to a similar result, at least > when you > consider that this is just a side-track of my research and that we > do not > have as much money as we wish sometimes. But maybe you can prove me > wrong and > do a better survey, I would sure be interested in the results... > [snip] > Marc van Woerkom wrote: [snip] >> As an example that bad rankings don't cause any stirr take >> e.g. the big language shootout, which is discussed on this >> list occassionaly. > > And the reason for this could be, that they do not comment on the > results at > all ? Bingo. Your disclaimer "they are not statistically sound" was spot on. And yet you tried to draw conclusions from the survey anyway. Now I am not a member of the erlang community, I just lurk here (this is not the place for me to explain why :). Consequently my concern is not because of any 'offense to erlang', but rather because the paper is shoddy science. This really is a matter of getting back to basics: 1. What was your hypothesis? 2. What was your methodology? 3. What were your results? 4. Can you draw meaningful conclusions that support or contradict your hypothesis from your results given your methodology? Hypothesis: 1. Everyone is using MPI these days. 2. Java threads is growing strong. Methodology: Prepare survey and publicise survey by posting to C/C++/Fortran based newsgroups and mailing lists Results: 1. Amongst C/C++/Fortran users MPI is going strong 2. Amongst C/C++/Fortran users Java threads is not. Conclusions: None. Unless you redefine 'everyone' to be 'C/C++/Fortran' users of traditional computation-based libraries. Of course doing a meaningful survey is hard. That your alternative was easy does not have any impact on the validity of your results. Andrae Muys From nigel.head@REDACTED Thu Feb 23 07:42:32 2006 From: nigel.head@REDACTED (Nigel Head) Date: Thu, 23 Feb 2006 07:42:32 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602222334.21229.mikael.karlsson@creado.com> References: <43FC140A.6090002@ericsson.com> <43FC2AD8.1090901@hyber.org> <200602222334.21229.mikael.karlsson@creado.com> Message-ID: On 22/02/06, Mikael Karlsson wrote: [...] > The problem with deployment on Erlang, as I see it, is that it is not > possible > to add new applications to releases, and that they all have to go into the > erlang root library. It would be nice if Erlang could have a secondary > library path that was searched too, meaning that you could deploy > applications > in an own library without having to do code:add_path{a,z} for everyone of > them. And making it easy to upgrade your Erlang base system without > affecting > your own additions. I have to say that I don't find the use of .erlang too terribly onerous for doing the add_path work. In spirit it's kind of like the venerable .cshrc|autoexec.bat||... Of course you wouldn't want installers just vomiting all over the .erlang file but I don't think it would be too hard to establish a convention for organising the adding of application specific setup segments ... -- N. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bengt.kleberg@REDACTED Thu Feb 23 08:59:04 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Thu, 23 Feb 2006 08:59:04 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602220728.k1M7Saaa021255@spikklubban.it.uu.se> References: <200602220728.k1M7Saaa021255@spikklubban.it.uu.se> Message-ID: <43FD6B48.9070202@ericsson.com> On 2006-02-22 08:28, Kostis Sagonas wrote: ...deleted > "overall plans and/or guidelines" are not enough, I am afraid. > These guidelines should be backed up by software tools that enforce > the layered software development property. > Such tools are currently lacking. i think it is possible to use xref to check a set of modules for consistency. if the plans and guidelines stipulated building each ''increment'' with only the layer below, and then mandated running xref on the result (insisting upon not allowing warnings/errors from xref :-) it might work. i use xref to check my block at work for internal consistency. it works better than dialyzer (for this purpose only). bengt From vlad.xx.dumitrescu@REDACTED Thu Feb 23 09:14:31 2006 From: vlad.xx.dumitrescu@REDACTED (Vlad Dumitrescu XX (LN/EAB)) Date: Thu, 23 Feb 2006 09:14:31 +0100 Subject: Longstanding issues: structs & standalone Erlang Message-ID: <11498CB7D3FCB54897058DE63BE3897C013ED925@esealmw105.eemea.ericsson.se> Hi, > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Bengt Kleberg > > On 2006-02-22 08:28, Kostis Sagonas wrote: > ...deleted > > "overall plans and/or guidelines" are not enough, I am afraid. > > These guidelines should be backed up by software tools that enforce > > the layered software development property. > > Such tools are currently lacking. > > i think it is possible to use xref to check a set of modules > for consistency. > if the plans and guidelines stipulated building each > ''increment'' with only the layer below, and then mandated > running xref on the result (insisting upon not allowing > warnings/errors from xref :-) it might work. > i use xref to check my block at work for internal > consistency. it works better than dialyzer (for this purpose only). I found an interesting tool for Java, called Macker (http://innig.net/macker/), that I think would be nice to translate to any language. The idea is to define the architecture in a file and let the tool check if the code is structured accordingly or not, spitting out errors and warnings. A simple and useless example, would give errors if any class having "Print" in its name tries to access any class in the "java" package. It wouldn't be all too difficult to build something similar with xref at the bottom. This could be nice to have together with the tool that Thomas Lindgren called for earlier, which analyzes the system and detects the layers by itself. Regards, Vlad From ulf.wiger@REDACTED Thu Feb 23 09:50:57 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 23 Feb 2006 09:50:57 +0100 Subject: Never trust a statistics you didn't forge yourself Message-ID: Michael Suess wrote: > > Ulf Wiger wrote: > >Why more than its share? Erlang clearly dominated the > >"functional languages" category. This was worthy of > >a comment. > > Yes, and I have made that comment, and a few more about > Erlang. Just search for Erlang in the paper, and you > will find many results. And thats what I mean by > "its share of publicity". I didn't emphasize properly - apologies. The question was: "Why _more_ than its share?" (Because that's what you wrote.) I personally didn't get the impression that Erlang got _more_ attention than it deserved based on the numbers. > I would be very interested in how you or all > the other people on this list who have been > bothered by it would phrase it, though, as I > cannot leave out the fact that you posted on > this list entirely. Without this, figure 4 > gives a very wrong impression, as the Erlang > people were the only ones (of the systems > mentioned in this figure) notified of the > survey (whether by you, or by me does not > make a difference here, as others have claimed). How about this? Other sites might have reported on the survey as well. Joe Armstrong, a respected member of the Erlang community, posted a link to the survey on the Erlang mailing list. While that post in itself is not sufficient to explain the relatively high numbers for Erlang, it is fair to assume that few Erlang programmers would have known about the survey otherwise. Very few other communities not specifically targeted by the survey managed to get mentioned more than three times. Regards, Ulf W From ulf.wiger@REDACTED Thu Feb 23 10:04:35 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 23 Feb 2006 10:04:35 +0100 Subject: Longstanding issues: structs & standalone Erlang Message-ID: Mikael Karlsson wrote: > > The problem with deployment on Erlang, as I see > it, is that it is not possible to add new > applications to releases, and that they all have > to go into the erlang root library. This is not true. You can provide several roots to the systools script, and you can have your own "releases" directory wherever you want. For our products, we _never_ add applications under the OTP_ROOT in our products. We treat OTP as a 3rd party package, and take care not to mix our own stuff with that of OTP. The 'builder' contrib puts boot scripts under the priv/ directory of an application, by default (I'm working on a new version that will build whole systems as easily). Here's an extract from a generated shell script for the 'rdbms' application: $ERL $SNAME -boot /home/etxuwig/work/blogorum/lib/rdbms-1.99/priv/rdbms -config /home/etxuwig/work/blogorum/lib/rdbms-1.99/priv/sys -boot_var BLOGORUM /home/etx uwig/work/blogorum -boot_var ROOT /vobs/mgwblade/tools/progs/Otp/OTP_LXA11930 Note the -boot_var entries. In the corresponding boot script, you will find: {path,["$ROOT/lib/mnesia-4.2.3/eb in"]}, {primLoad,[mnesia_tm, mnesia_text, mnesia_sup, and {path,["$BLOGORUM/lib/rdbms-1.99/ebin"]}, {primLoad,[trigger_test, re2ms, rdbms_verify, The -boot_var entries were initially intended to allow for relocatable boot scripts (e.g. when doing cross-builds), but can also (and are intended to) be used to manage multiple roots. /Ulf W From bengt.kleberg@REDACTED Thu Feb 23 10:30:25 2006 From: bengt.kleberg@REDACTED (Bengt Kleberg) Date: Thu, 23 Feb 2006 10:30:25 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602220929.54228.ft@it.su.se> References: <200602202039.58025.lenglet@csg.is.titech.ac.jp> <43FC1290.5010002@ericsson.com> <200602220929.54228.ft@it.su.se> Message-ID: <43FD80B1.2090803@ericsson.com> On 2006-02-22 09:29, Fredrik Thulin wrote: ...deleted > I bet that when we talk about Erlang in this thread, we all mean the > Ericsson Erlang/OTP though - not just any Erlang ;). like perl, erlang is a single source solution. however, we could be talking about erlang as it is installed. that is possible to do in more than one way. my personal installation has the proposed/potential/? new standard libraries. ...deleted > This is totally unrealistic. Do you think that people from every > distribution packaging stuff will want to become developers in all the > languages they package? this does not apply to my suggestion. you can not have understood what i meant. however, it is not an erlang issue and i will not expand. > Bengt, it is rather clear to me that we have incompatible opinions in > this matter. Without the intent of being condescending, I beleive that i agree. > To be able to afford the effort, such small parts of the overall suite > of packages can't require custom packaging methods. If we want Erlang > applications to be available through the big distributions packaging > systems, we must minimize the trouble the packagers have to go through, it would probaly be a good thing for erlang if the developers could publish something that could be built while insisting up as few specific programs as reasonably possible. it would also be a good thing if the build result could be tailored in as many ways as reasonably possible. i think these 2 wishes holds for all that build erlang. the difference i see between ''packagers'' and ''end users'' seems to be that packagers are more prone to insist upon beeing allowed to use their own procedure/programs/tools. since the second wish imho is the more important one i find this insistance strange. bengt From Marc.Vanwoerkom@REDACTED Thu Feb 23 11:41:23 2006 From: Marc.Vanwoerkom@REDACTED (Marc van Woerkom) Date: Thu, 23 Feb 2006 11:41:23 +0100 Subject: Never trust a statistics you didn't forge yourself In-Reply-To: <200602230055.08986.msuess@uni-kassel.de> Message-ID: Hello Michael! >>As an example that bad rankings don't cause any stirr >>take >>e.g. the big language shootout, which is discussed on >>this >>list occassionaly. > >And the reason for this could be, that they do not >comment on the results at >all ? The (fictitious) analogon of the bit that offended me would be something like: "Consider the good results for Erlang with a grain of salt, because an influential member of the Erlang mailing asked everyone to improve the benchmarks" .. and that had not happened sofar. I want to stress that I like to see Erlang in your paper, but with real numbers, be they bad or good, otherwise what is such a survey good for? I certainly don't want to force it. It is not that this stuff is in desperate need of publicity. As a rough estimation of publicity I just searched the ACM Digital Library. Of 171,143 indexed items, we get following hits: Erlang 584 MPI 1641 PVM 670 Beowulf 226 Java 12592 Haskell 955 OCaml 88 Fortran 12588 That's not bad. Regards, Marc From ulf.wiger@REDACTED Thu Feb 23 11:49:57 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 23 Feb 2006 11:49:57 +0100 Subject: rfc: rdbms - new type system Message-ID: Rdbms is asymptotically approaching beta status. (: Some comments on the following are most welcome. I started doing some cleanups and documentation. Currently, I'm in some kind of test-doc-driven development mode (code a little, write test suites, redesign, document, redesign to comply with the documentation, and so on.) I'm using a tiddlyWiki for the documentation, which I think fits very nicely with this way of working. The current holdup is that I'm completely redesigning the type system (after all, no-one demanded backwards compatibility...) I'm just getting ready to throw out the 'required' and 'bounds' properties, as they can be expressed as types. I removed some old types that were just... messy (e.g. 'compound'), as well as 'record' and 'tuples' which are now redundant. Current approach: Typedefs: you can specify {typedef, Name, Type} as a table property or a global property. Table typedefs shadow global typedefs. It is not possible to shadow predefined types. So, [{{attr,age, type}, integer}, {{attr,age,bounds}, {inclusive, 0, 100}}, {{attr,age,required}, true}] now becomes: {{attr, age, type}, {'and', [{'>=', 0}, {'=<', 150}]}} In this case, 'integer' and 'required' are implicit. In order to allow the value undefined, one could do this: [{{typedef, t_age}, {'and',[{'>=',0},{'=<',150}]}}, {{attr, age, type}, {'or',[{type,t_age},{'==',undefined}]}} ...which is messier than before, but mixing 'undefined' and integers in the same attribute also messes up the user's code. (: It certainly simplifies the 'rdbms' code a lot. The remaining other attribute property is 'default', which is used e.g. in cascading updates. The following type-checking code may serve to illustrate the type system (which compiles, but hasn't been tested yet): %%% check_type(Type, Value) -> boolean() %%% check_type(false, _) -> false; check_type(true, _) -> true; check_type(any, _) -> true; check_type({tuple, Arity, Ts}, X) when is_tuple(X), size(X) == Arity -> Elems = tuple_to_list(X), lists:zipwith( fun check_type/2, Ts, Elems); check_type({tuple, Arity}, X) when is_tuple(X), size(X) == Arity -> true; check_type(tuple, X) when is_tuple(X) -> true; check_type(integer, X) when is_integer(X) -> true; check_type(float, X) when is_float(X) -> true; check_type(number, X) when is_integer(X); is_float(X) -> true; check_type(atom, X) when is_atom(X) -> true; check_type(pid, X) when is_pid(X) -> true; check_type(port, X) when is_port(X) -> true; check_type(binary, X) when is_binary(X) -> true; check_type(string, X) -> try list_to_binary(X) of _ -> true catch error:_ -> false end; check_type(list, X) when is_list(X) -> true; check_type(nil, []) -> true; check_type({list,false},_) -> false; % optimization check_type({list, T}, [_|_]) when T==any; T==undefined -> true; check_type({list, T}, X) when is_list(X) -> while(true, fun(Elem) -> check_type(T, Elem) end, X); check_type(function, X) when is_function(X) -> true; check_type({function,Arity}, X) when is_function(X, Arity) -> true; check_type({'and',Ts}, X) -> lists:foldl(fun(T,Acc) -> Acc and check_type(T,X) end, true, Ts); check_type({'andalso',Ts}, X) -> while(true, fun(T) -> check_type(T, X) end, Ts); check_type({'or',Ts}, X) -> lists:foldl(fun(T,Acc) -> Acc or check_type(T,X) end, false, Ts); check_type({'orelse', Ts}, X) -> while(false, fun(T) -> check_type(T, X) end, Ts); check_type({'not', T}, X) -> not(check_type(T, X)); check_type({O,V}, X) when O=='==';O='=/=';O=='<';O=='>';O=='>=';O=='=<' -> erlang:O(X,V); check_type(_, _) -> false. while(Bool, F, L) when is_list(L) -> Not = not(Bool), try lists:foreach( fun(Elem) -> case F(Elem) of Not -> throw(Not); Bool -> Bool end end, X) of _ -> Bool catch throw:Not -> Not end. When types are added, I run some code that tries to simplify the types a bit. This code is naive at best, and I'm hoping to get some help with this later on. The main candidate is the {list, T} type. If T can be simplified into any of the values 'true', 'false', 'any', or 'undefined', then the list won't have to be traversed. While doing this, I also had to ask myself what {list, any} actually is supposed to mean. Currently, it's 'any non-empty list', as opposed to 'nil'. I'm perfectly willing to revisit this, since it has the unfortunate side effect that a typed list which includes [] becomes more difficult to specify: {'or', [nil, {list, integer}]} Perhaps it would be better to force those who want a non-empty list to write: {'andalso', [{'not',nil}, {list, any}]} (Formulating the question, I think I have decided to go for the latter. The test-doc- driven development process at work again. :) BTW, why would one want both 'and' and 'andalso' in this context? Shouldn't it always be 'andalso'? Regards, Ulf W From joe.armstrong@REDACTED Thu Feb 23 12:41:58 2006 From: joe.armstrong@REDACTED (Joe Armstrong (AL/EAB)) Date: Thu, 23 Feb 2006 12:41:58 +0100 Subject: Never trust a statistics you didn't forge yourself Message-ID: > -----Original Message----- > From: Michael Suess [mailto:msuess@REDACTED] > Sent: den 23 februari 2006 00:55 > To: Joe Armstrong (AL/EAB) > Cc: Marc van Woerkom; leopold@REDACTED; > erlang-questions@REDACTED > Subject: Re: Never trust a statistics you didn't forge yourself > > Hi Joe, hi members of this list, > > it is obvious by now, that there is not much I can do to > convince you and at least some members of this list of the > value of our study. Thats fine, and I can live with that. > Just drop me a note, if you do not want to be notified of the > results of our followup paper, and I will take you off my list. > > However, some claims have been made here regarding the > process I used to carry out and evaluate this study and about > my scientific integrity, which I believe to be false. I will > at least try to address them in this mail, along with a few > more perspectives from my side. > > On Wednesday 22 February 2006 13:09, Joe Armstrong (AL/EAB) wrote: > [snip] > > And what did I say here? - > > > > The complete post was: > > > > If you use Erlang, why not tell > > > > http://www.plm.eecs.uni-kassel.de/parasurvey/ > > > > About it > > > > /Joe > > > > Just compare this for a moment to what was posted to the LAM/MPI > > General User's Mailing List > > > > http://www.lam-mpi.org/MailArchives/lam/2005/10/11389.php > > > > I quote: > > > More than 50 people have filled out the survey this far, and > > > > therefore I will > > > > > be evaluating the results shortly (it will close in > two weeks, > > > > on November > > > > > the 5th!). But before I do, please consider filling out the > > > > survey to make > > > > > the results even more valuable. Of course, I will make the > > > > results available > > > > > to everyone who participated. And before I forget > to mention it: > > > > two gift > > > > > certificates from amazon.com are being awarded to > everyone who > > > > participated. > > > > > Thank you for your cooperation, > > > Best Regards, > > > Michael Suess > > > > The bit about the gift certificates goes totally > unmentioned in your > > paper. > > p.2, Survey Methodology: > "If participants submitted their answers along with a working > e-mail address, they could win one of two 50$ gift > certi?cates from amazon.com." > > > > You say "An influential member of the Erlang community > > requested members of their mailing list to show there > support of Erlang > > by participating > > in the Survey" - which is a false claim - I never said > anything about > > support - I asked the > > people on this list to tell you about their experiences. > > This seems to be the single most important point, that most > people here are > complaining about, right? Reading through your mail again, I > admit that the > phrase I used in the paper is quite strong and I will make > sure to change it > in my followup paper. I will even go as far as to say: > > "The phrase is misleading, my mistake, sorry about it." > > I would be very interested in how you or all the other people > on this list who > have been bothered by it would phrase it, though, as I cannot > leave out the > fact that you posted on this list entirely. Without this, > figure 4 gives a > very wrong impression, as the Erlang people were the only > ones (of the > systems mentioned in this figure) notified of the survey > (whether by you, or > by me does not make a difference here, as others have claimed). > > > And then you omit to say that gift certificates were > offered to members > > of other mailing > > lists, and finally when you get an unexpectly positive > response from the > > members of the Erlang > > mailing list you dismiss this this result since I asked > members of this > > list to > > participate in your survey. > > > > Usually in an academic paper it is consider de rigour to > describe your > > experimental procedure. > > Omitting to mention that you offered gift certificates to people who > > filled in the > > survey is rather strange since it is probably that it will bias the > > results. > > > > Note that doing so you may well have biased the results in > favour of MPI > > - MPI got the highest > > rating among parallel programming systems - was this > because you offered > > them gift certificates? > > > > If you are going to make unsubstantiated claims in your > paper about the > > supposed > > influence of any mailing that I made to this list - then > you should also > > mention the > > ways in which you other results might be biased. > > > > And by the way - you haven't sent me a gift certificate - > was the offer > > only open > > to people on the MPI list? - did the other people on this > list get any > > gift certificates? > > This paragraph made me very angry at first, then very sad. I > do not know how > long it took you to write it, but it took me about 10 seconds > to open the > report, press "find" and search for "gift". There is only one > result, and > this is the quote given above. And it is exactly where it is > supposed to be, > right under "Survey Methodology". Is it really too much to > ask of you to do > the same and actually invest these 10 seconds, before you > write 7 paragraphs > of false claims about my scientific methodology and try to > attack it on this > level? You're right - and I missed this part of the paper - sorry. When I wrote this I had just seen the posting to the net which said: "two gift certificates from amazon.com are being awarded to everyone who participated." The paper said ".. they could win one of two 50$ gift certificates" These mean different things. You said that my posting might have biased the results - this annoyed me and a lot of people on the Erlang list who responded to your survey, and I annoy you by pointing out that you have not accurately described your methods. It is not my intention to anger you, and I am sure that you did not intend to annoy various members of the Erlang list - but it was my intention to point out the difference between facts and speculations in your paper. It will be a better paper if you stick to the numbers, and leave off any attempt at guessing as to why they are as they are. I suggest you revise the paper a bit. You could say: << - I sent the following post to [list them] newsgroups " quote what you sent " As a result of this a number of message asking people to participate in the survey were cross posted to a number of different groups. It is impossible to estimate how the results of these messages biased the responses from the different groups. >> My personal opinions is that: - Offers of gift certificate has no effect on people filling in the survey, and - My posting to the Erlang list has no effect (other than making people aware that there was a survey - I think the response from the Erlang list would have been the same no matter who had sent the mail) [snipped] /Joe [can we put this bit of the argument to rest now and wave a few olive branches around - I have a program to write ] From ulf.wiger@REDACTED Thu Feb 23 12:44:36 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Thu, 23 Feb 2006 12:44:36 +0100 Subject: Never trust a statistics you didn't forge yourself Message-ID: Marc van Woerkom wrote: > > It is not that this stuff is in desperate need of publicity. > As a rough estimation of publicity I just searched the ACM > Digital Library. > Of 171,143 indexed items, we get following hits: > > Erlang 584 > MPI 1641 > PVM 670 > Beowulf 226 > Java 12592 > Haskell 955 > OCaml 88 > Fortran 12588 How many of the hits on Erlang were about the Erlang formula? (: BR, Ulf W From valentin@REDACTED Thu Feb 23 18:33:59 2006 From: valentin@REDACTED (Valentin Micic) Date: Thu, 23 Feb 2006 19:33:59 +0200 Subject: Never trust a statistics you didn't forge yourself References: Message-ID: <00ac01c6389f$55363810$7309fea9@MONEYMAKER2> [can we put this bit of the argument to rest now and wave a few olive branches around - I have a program to write ] Would I ever hear, or be bothered reading about survey, let alone results, if the whole thing wasn't so-in-my-face? I don't think so. Now that I did, I have to learn from it, otherwise, I spent all this time reading for no reason at all. At this point, a good question is: WHAT CAN I LEARN FROM IT? Can anybody, please, help me, for I can't figure it out. So for the lack of a better, I have to go with the stuff I already knew, i.e. There is no such a thing as bad publicity. So next time, when I want to do a survey on promiscuity of horse hoarders in Mongolia, all I have to do is to piss-off some respected social worker in New York/Paris/London... and while I'm at it, may just as well throw that Joe has big ears, or somethin' ;-). It's amazing how many fans Joe has. Well done Joe. V. From mikael.karlsson@REDACTED Thu Feb 23 23:16:26 2006 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Thu, 23 Feb 2006 23:16:26 +0100 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <200602231115.30534.rlenglet@users.forge.objectweb.org> References: <200602222334.21229.mikael.karlsson@creado.com> <200602231115.30534.rlenglet@users.forge.objectweb.org> Message-ID: <200602232316.26799.mikael.karlsson@creado.com> torsdag 23 februari 2006 03:15 skrev Romain Lenglet: > Mikael Karlsson wrote: > > onsdag 22 februari 2006 10:11 skrev Claes Wikstrom: > > > Bengt Kleberg wrote: > > > > i try to voice the opinion that configure, make, make > > > > install is not easy for everybody. > > > > i could be wrong. > > > > > > Yes, > > > > > > > > > /klacke > > > > No, > > I would not be that sure that this is wrong. > > It is easy if you have the tools installed, but that may not > > always be the case. > > Here is the same misunderstanding again... > The proposal was *not* to use ./configure ; make ; make install > for deployment / installation, but for *building packages*, > which in turn can be deployed and installed. Yes, it was a misunderstanding. Sorry, I guess I was to biased on the Erlmerge solution which seems to solve problems of platform dependency by compiling the packages on the target. > ... > ... > Yes, just like there is a point in having a pure Ruby system that > can deploy "pure" Ruby packages, and a pure Java system that can > deploy "pure" Java packages, and a pure Perl system that can > deploy "pure" Perl packages, and a pure Python system that can > deploy "pure" Python packages... > (Sorry for the ironic tone... ;-)) > I am just wondering how you can manage / upgrade applications on > a system with such a proliferation of incompatible packaging > systems? > > Really, I am not against this idea. I just say that a pure Erlang > packaging system should not be imposed, and applications should > be delivered by developers in source form with a configure > script and a Makefile, and not in compiled form as a pure Erlang > installable package. Creating installable packages is the job of > a packager, and there may be many packagers of a single > application, for different systems with different packaging > systems. OK, I get your point, I think. I agree that it should not be imposed, but it should be possible pack the system in such a way that you can deploy it in a proper way. If you would like to do a hot upgrade on a distributed Erlang system running on several nodes/computers you probably need a proper package for the ( pure erlang ? ) OTP release handler. > I am very sorry to repeat myself, and to decrease the signal / > noise ratio of this mailing list, but I have the impression to > not be understood. Sorry for the noise, but I guess I am biased towards a different type of application. > > See the other thread: > > http://www.erlang.org/ml-archive/erlang-questions/200602/msg00 > > > >369.html > > > > Suppose 80 % of Erlang applications are not "contaminated" by > > C-code :-) then it would be nice to have a way to deploy them > > on an installed Erlang base system without having to think > > about other infrastructures. There should be some benefit of > > running on top of a VM. Java/Ant is another example of this. > > Ant is a build system, not a packaging system. Yes, you are right, but beeing a member of the great Objectweb consortium you are aware of all the nice ant tasks available to make packages, for example for the consortiums JOnAS application server. I am even able to run an Ant task from my Eclipse environment that deploys the applications on a running JOnAS server. I can realize that this may not be a good path for all of us, but it may be for some :-) > And even packages containing binary native code could be deployed > using a packaging system in pure Erlang, there is no problem > with that. > One issue would be to be able to have several versions of every > such package, one for every architecture / system, and the > system should be able to choose and install the right version on > a system. But this can be solved. > > Even with "pure" Erlang packages, that problem of native binary > code would arise one day, with the spread of Hipe: a packaging > system will have to offer different packages with modules that > contain binary code generated by Hype, for every architecture > supported by Hipe. If the performance competition is Java for instance , I think you can come far with Erlang without HiPE enabled. I thought you could run any Erlang module compiled without HiPE enabled on any HiPE enabled platform. Is that not the case ? > You want the equivalent of Java's CLASSPATH environment variable. > Why not?! > > But I believe that a CLASSPATH-like (why not call it MODULEPATH?) > is of no help to manage packages. Normally, if a packaging > system is able to install a package, it should also be able to > uninstall and upgrade it automatically without having users to > struggle with a PATH environment, and even if the packaging > system had installed files in a common directory tree. > Correct me if I am wrong. I won't correct you, it seems I got even more corrected in a later posting on this topic. Nevertheless. I think when you run an Erlang distributed environment you need to use the native libraries for distributed deployment and lifecycle management. I am still missing a component binding contoller. Coming from objectweb, have you thought anything about a ( a'la Objectweb) Fractal binding (and attribute) controller for Erlang gen_servers? Cheers Mikael From taj.khattra@REDACTED Fri Feb 24 00:14:41 2006 From: taj.khattra@REDACTED (Taj Khattra) Date: Thu, 23 Feb 2006 15:14:41 -0800 Subject: Longstanding issues: structs & standalone Erlang In-Reply-To: <11498CB7D3FCB54897058DE63BE3897C013ED925@esealmw105.eemea.ericsson.se> References: <11498CB7D3FCB54897058DE63BE3897C013ED925@esealmw105.eemea.ericsson.se> Message-ID: <57a21f730602231514u66ad6b56sbef37b308b825051@mail.gmail.com> > I found an interesting tool for Java, called Macker > (http://innig.net/macker/), that I think would be nice to translate to > any language. Lattix LDM is a commercial tool, that can extract the dependency structure of a java program and display it as a DSM (dependency structure matrix): http://sdg.lcs.mit.edu/pubs/2005/oopsla05-dsm.pdf it would be neat to have something similar for erlang From tty@REDACTED Fri Feb 24 03:32:37 2006 From: tty@REDACTED (tty@REDACTED) Date: Thu, 23 Feb 2006 21:32:37 -0500 Subject: table_info on remote table Message-ID: Hi, I have a question regarding table_info. How does one make it work with a remote table ? Scenerio: Node A had a table 'tabA' with several entries, Node B was started using -mnesia extra_db_nodes pointing to Node A. I can see 'tabA' from Node B, do mnesia:read/1 etc but my mnesia:table_info(tabA, size) always return 0. However doing a length(mnesia:dirty_all_keys(tabA)) gives me the proper answer leading me to suspect I'm missing something. Thanks Tee From erlang@REDACTED Fri Feb 24 06:57:16 2006 From: erlang@REDACTED (Michael McDaniel) Date: Thu, 23 Feb 2006 21:57:16 -0800 Subject: table_info on remote table In-Reply-To: References: Message-ID: <20060224055716.GF19263@delora.autosys.us> On Thu, Feb 23, 2006 at 09:32:37PM -0500, tty@REDACTED wrote: > Hi, > > I have a question regarding table_info. How does one make it work with a remote table ? > > Scenerio: > > Node A had a table 'tabA' with several entries, Node B was started using -mnesia extra_db_nodes pointing to Node A. I can see 'tabA' from Node B, do mnesia:read/1 etc but my mnesia:table_info(tabA, size) always return 0. However doing a length(mnesia:dirty_all_keys(tabA)) gives me the proper answer leading me to suspect I'm missing something. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I have experienced that myself. I presumed (perhaps mistakenly) that it was due to mnesia:table_info/2 working with local tables only. I presumed that based on a "clue" from the documentation: " table_info(Tab, InfoKey) -> Info | exit({aborted, Reason}) ... arguments ... , the second is one of the following keys: all: This argument returns a list of all local table information. ... " Since it says "all local table information" it appeared to be the reason it would not work from a remote node. That would be swell if there is some other correctable reason why it would not work from a remote node. ~Michael > > Thanks > > Tee From ft@REDACTED Fri Feb 24 07:29:25 2006 From: ft@REDACTED (Fredrik Thulin) Date: Fri, 24 Feb 2006 07:29:25 +0100 Subject: table_info on remote table In-Reply-To: References: Message-ID: <200602240729.25459.ft@it.su.se> On Friday 24 February 2006 03:32, tty@REDACTED wrote: > Hi, > > I have a question regarding table_info. How does one make it work > with a remote table ? ... I beleive I had the same problem once. I got the following piece of code from Chandrashekhar Mullaparthi, which solved it for me at least. Try if it works for you or if your problem is actually another one. %%-------------------------------------------------------------------- %% Function: generic_table_info(Tab, Item) %% Tab = atom(), table name %% Item = atom(), item we are interested in %% Descrip.: Get mnesia table information, regardless of where table %% resides. %% Returns : term() %%-------------------------------------------------------------------- generic_table_info(Tab, Item) -> Info = fun(T, I) -> mnesia:table_info(T, I) end, mnesia:activity(async_dirty, Info, [Tab, Item], mnesia_frag). /Fredrik From rlenglet@REDACTED Fri Feb 24 07:57:22 2006 From: rlenglet@REDACTED (Romain Lenglet) Date: Fri, 24 Feb 2006 15:57:22 +0900 Subject: Dependency injection in Erlang (Disgression from: Longstanding issues: structs & standalone Erlang) In-Reply-To: <200602232316.26799.mikael.karlsson@creado.com> References: <200602231115.30534.rlenglet@users.forge.objectweb.org> <200602232316.26799.mikael.karlsson@creado.com> Message-ID: <200602241557.23693.rlenglet@users.forge.objectweb.org> Mikael Karlsson wrote: [...] > I am still > missing a component binding contoller. Coming from objectweb, > have you thought anything about a ( a'la Objectweb) Fractal > binding (and attribute) controller for Erlang gen_servers? I was one of the initial designers of Fractal, so I am quite fluent in Fractal concepts ;-), and like you I am missing some of Fractal features in Erlang. I even started implementing a generic Fractal membrane in Erlang. A problem with OTP is that it has mostly a static viewpoint: it is mostly all about code (modules), and the runtime architecture is static (the hierarchy of supervisor is generally static, processes have global names set statically, client processes depend statically on such global names, etc.). On the other hand, Fractal has a purely dynamic viewpoint, in the spirit of the OSI RM-ODP standard (Reference Model of Open Distributed Processing). On some points Fractal is more advanced than RM-ODP (separation between membrane and content in every object / component), and on some points it is more restricted (the only allowed interactions are interrogations, not signals or announcements or flows), but it maps to RM-ODP quite well. The strong point about Fractal/RM-ODP, is that the architecture is a dynamic concern: components (objects, in RM-ODP) are bound together through (possibly distributed) bindings, that are sorts of channels allowing interactions. Think of it as the channels and routes in SDL for instance, but dynamically reconfigurable. Fractal/RM-ODP allows also composite objects, i.e. objects that contain objects. In Fractal, these form hierarchies of control domains (composite components do control their content). Those concepts can be found almost as-is in Erlang/OTP: Erlang objects are like RM-ODP objects, hierarchies of supervisors and processes are similar to hierarchies of composite components in Fractal (hierarchy of control domains)... Erlang/OTP even offers runtime reflective access to the hierarchy of supervisors. But one feature is missing: Dependency Injection. In Erlang, bindings are implicit. I.e., there are bindings (in the engineering viewpoint, when first sending a message to a remote node, a TCP connection is first implicitly open, etc.), but creating and destroying bindings explicitly before and after sending a message is not necessary for a process. The problem, since bindings are not explicit, is that it becomes impossible to manage the architecture at runtime: it is impossible to know which process would send messages to which process. Therefore, if I want to replace a process with another, there is no general way to replace its name (pid) in the state of the processes that depended on it. Hence, I can't replace the process. In Erlang/OTP, a limited solution is the use of naming domains (node-local and global). But this is very limited. It makes it possible to replace a named process by another process with the same name: if client processes access that process through the naming domain, and not directly using its pid, then the replacement is possible and transparent. However, if for instance two processes 'client1' and 'client2' send messages to a same process 'server' through its name (e.g. 'server' is a name registered in the global naming domain), it is not possible at runtime to reconfigure 'client1' and 'client2' to make them access two different server processes. The problem, is that usually in Erlang/OTP (in all the Erlang programs I have seen), the names of server process are statically specified in the code of client modules, and there is no way to modify them at runtime. And it is even difficult to modify them statically, because it generally requires to modify the code. As a consequence, this makes it even difficult to reuse code (modules): a module that sends messages to a process named 'myniceserver' cannot easily be reused without the module that starts and implements the process named 'myniceserver'. That's where Dependency Injection is necessary. Cf. Fowler's excellent article: http://www.martinfowler.com/articles/injection.html The purpose of Fractal's binding controllers is essentially to offer dependency injection, but they can do more (they can create distributed bindings, etc.). In Erlang, we already have bindings, although implicit, so I believe that we need only to add a dependency injection mechanism, as an OTP design principle. Dependency injection would consist in having a naming domain local to every process, and letting the mapping between process-local names and real process names or pids be done from outside of the process implementation (hence, the architecture becomes a separate concern, implemented separately from functional code). There are two ways to do that in Erlang. Let's take gen_server as an example. 1- constructor injection: simply pass the pids or names of all the processes messages will be sent to, in the Args parameter, e.g.: gen_server:start_link(client1, [server1], []), gen_server:start_link(client1, [server2], []), gen_server:start_link(client2, [server1, server10, AnyOtherArg], []), ... In the modules, the domain name could be implemented generically as a dictionary in the process state: -module(client2). init([FooServerName, BarServerName, Anything]) -> Deps = dict:new(), Deps2 = dict:store('foo', FooServerName, Deps), Deps3 = dict:store('bar', BarServerName, Deps2), {ok, #state{deps = Deps3, anything = Anything}}. handle_cast(Request, State) -> Deps = State#state.deps, {ok, FooServerName} = dict:find('foo', Deps), %% e.g., forward the request: gen_server:cast(FooServerName, {hey, Request}), {noreply, State}. Drawback: there is no way to modify dependencies after the process is started. This is solved with method 2-. Alternatively, the process names could be stored directly in the State record in that case (one record field for every dependency), but it makes reflective access more difficult, cf. method 2- below... 2- getter/setter/interface injection: implement gen_server calls to get / set dependencies, i.e. to modify the process' local naming domain. E.g.: -module(client2). ... handle_call({getdep, Key}, From, State) -> Deps = State#state.deps, {reply, dict:find(Key, Deps), State}; handle_call({setdep, Key, Pid}, From, State) -> %% should check that Key is valid... Deps = State#state.deps, NewDeps = dict:store(Key, Pid, Deps), NewState = State#state{deps = NewDeps}, {reply, ok, NewState}. Of course, it is preferable to implement both approaches simultaneously. In addition, we could also add as in Fractal the distinction between optional and mandatory client interfaces, and the distinction between singleton and collection interfaces. And maybe it would be more efficient to use the process' dictionary directly (using get/1 and put/2)...?? Attribute control should be done the same way: through init/1 parameters, and through gen_server calls ({getattr, Attr} and {setattr, Attr, Val}). Although both concerns seem very similar that way, they must be separate (i.e. we must not to mix binding and attribute control) because the callbacks have a different semantics. For instance, when setting a dependency (setdep call), one would like to automatically link/1 the client and the server process. The dependency injection implementation above is the very minimum, but it allows many things already: transparent interposition, application-specific distributed bindings implemented in Erlang (e.g. one could implement a transparent proxy process between communicating processes, to do load balancing between several server processes, or to do group communication transparently...), etc. Of course, if we want to implement generic membranes as in Fractal, we would have to add a lot of things around, but functional modules would not have to implement more than the DI callbacks shown above, just as in Fractal/Java. My opinion is: KISS for developers, and be as Erlang- and OTP-compliant as possible. For instance, I don't like ErlCOM, which imposes a lot of non-functional code in modules (altough the concepts are the same as in Fractal, both being rooted in RM-ODP): http://www.ist-runes.org/docs/publications/EUC05.pdf It tries to translate implementation solutions that make sense in object-oriented, statically typed languages, into Erlang/OTP. But I think that it does not fit Erlang/OTP well. For instance, the idea to formally define interface signatures statically is a good idea in static typing languages such as Java (and I am a strong advocate of that), but does make little sense in a dynamic language such as Erlang, in which case it restricts flexibility for little gain. For instance, the set of messages that can be received or sent by an Erlang process at a given time, may change during the process' lifetime. In RM-ODP terms, its set of server and client interfaces mayh change over time. For instance, consider guards in receive statements, or in handle_cast callbacks: test(State) -> receive {sayhello, Arg} when State#state.acceptsayhello == true -> ... end. handle_cast({sayhello, Arg}, State) when State#state.acceptsayhello == true -> ... This cannot be captured in ErlCOM or Fractal, which consider that the set of client and server interfaces, and their signatures, (i.e. the component's type) do not change after component creation. One should not impose such limitations in Erlang. So le'ts keep it simple, stupid... And again, I think that the only thing that should be imposed to developers is the implementation of DI callbacks as described above. Any other control should be implemented outside of the functional modules' implementations, and even should be made optional. -- Romain LENGLET From erlang@REDACTED Fri Feb 24 08:04:05 2006 From: erlang@REDACTED (Michael McDaniel) Date: Thu, 23 Feb 2006 23:04:05 -0800 Subject: table_info on remote table In-Reply-To: <200602240729.25459.ft@it.su.se> References: <200602240729.25459.ft@it.su.se> Message-ID: <20060224070405.GG19263@delora.autosys.us> On Fri, Feb 24, 2006 at 07:29:25AM +0100, Fredrik Thulin wrote: > On Friday 24 February 2006 03:32, tty@REDACTED wrote: > > Hi, > > > > I have a question regarding table_info. How does one make it work > > with a remote table ? > ... > > I beleive I had the same problem once. I got the following piece of code > from Chandrashekhar Mullaparthi, which solved it for me at least. Try > if it works for you or if your problem is actually another one. > > %%-------------------------------------------------------------------- > %% Function: generic_table_info(Tab, Item) > %% Tab = atom(), table name > %% Item = atom(), item we are interested in > %% Descrip.: Get mnesia table information, regardless of where table > %% resides. > %% Returns : term() > %%-------------------------------------------------------------------- > generic_table_info(Tab, Item) -> > Info = fun(T, I) -> > mnesia:table_info(T, I) > end, > mnesia:activity(async_dirty, Info, [Tab, Item], mnesia_frag). > > /Fredrik ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Cool ! That worked for getting 'all' info on my remote table. Thanks Fredrik for reprinting this, and thanks Chandru for publishing it originally. ~Michael From mikael.karlsson@REDACTED Fri Feb 24 08:57:01 2006 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Fri, 24 Feb 2006 08:57:01 +0100 Subject: Deployment ( digression from: Longstanding issues: ...) In-Reply-To: References: Message-ID: <200602240857.01387.mikael.karlsson@creado.com> torsdag 23 februari 2006 10:04 skrev Ulf Wiger (AL/EAB): > Mikael Karlsson wrote: > > The problem with deployment on Erlang, as I see > > it, is that it is not possible to add new > > applications to releases, and that they all have > > to go into the erlang root library. > > This is not true. You can provide several roots > to the systools script, and you can have your own > "releases" directory wherever you want. > ... Oh dear, I better read the .. manual. I do not know what is worst, coming with false statements or having been unaware of this all theese years. I am still a bit lost though, with the concept of one boot file per application in the priv dir. My use case - scenario is this. Precondition: - a distributed erlang environment on several machines. - Erlang OTP installed in /usr/local/lib/erlang. - I "third party" application installed in /usr/local/yaws ( .erlang is used to add this to the path) - Starting erlang from an ordinary user /home/usr - export ERL_BASE=/home/usr/erl_base - All new apps to go into $ERL_BASE/lib, on all nodes. Can I, for all nodes in one go: 1. Make a relase package with one new application app1-vsn11 that goes into $ERL_BASE/lib 2. Make a release upgrade, upgrading to app1-vsn12 and add a new app2-vsn21 3. Make a release upgrade, adding app3-vsn31 and keep the old ones as is. 4. Make a release upgrade removing app2-vsn21, keeping everything else. And 1-4 without having to deal with all OTP application versions. Cheers Mikael From ulf.wiger@REDACTED Fri Feb 24 10:38:12 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 24 Feb 2006 10:38:12 +0100 Subject: Deployment ( digression from: Longstanding issues: ...) Message-ID: Mikael Karlsson wrote: > > I am still a bit lost though, with the concept of one boot > file per application in the priv dir. The concept I wanted to try out with 'builder' was to build a system incrementally, one application at a time. Basically, you could see it as building a unit test environment for each application. For each application, there's a boot script that fires up the applications needed by that particular application. The higher up you get, the more of the final system will be started. And you're always using the OTP scripts, so the unit test will be very similar to what happens in the final system. Unfortunately, builder is currently not very good at building a 'system', where the boot script is _not_ in the priv/ directory of some application. It was supposed to work, but apparently, I didn't test it. :-/ > My use case - scenario is this. > Precondition: > - a distributed erlang environment on several machines. > - Erlang OTP installed in /usr/local/lib/erlang. > - I "third party" application installed in /usr/local/yaws ( > .erlang is > used to add this to the path) > - Starting erlang from an ordinary user /home/usr > - export ERL_BASE=/home/usr/erl_base > - All new apps to go into $ERL_BASE/lib, on all nodes. > > Can I, for all nodes in one go: > 1. Make a relase package with one new application app1-vsn11 > that goes into $ERL_BASE/lib 2. Make a release upgrade, > upgrading to app1-vsn12 and add a new app2-vsn21 3. Make a > release upgrade, adding app3-vsn31 and keep the old ones as is. > 4. Make a release upgrade removing app2-vsn21, keeping > everything else. > > And 1-4 without having to deal with all OTP application versions. I'm not sure what kind of upgrade you envision that does not deal with the application versions. Or do you mean that you don't want to mess with putting in versions in all the different text files needed for systools? If so, that can be done ('builder' was supposed to do that too, but doesn't yet...) What builder does do is allow you either specify exactly which version of a particular app that you want to use, or have 'builder' simply select the most recent one. Upgrade is a b**** if you wan to do it smoothly. I think the Erlang/OTP code change support is mainly suited to fairly simple upgrades -- but that's fine, because we do a lot of those (error corrections, and 'interactive debugging'). In a large system with up to a hundred or so applications and thousands of processes, it is difficult to keep track of what actually happens when all processes are supposed to do their own code change... or rather, what tends to mess things up royally is restructuring of process hierarchies, renaming, deleting and moving ets tables, etc. And in a large system, all these things _will_ happen during a major upgrade. Also, equivalence test becomes extremely difficult -- how do you now that the "organically" upgraded system is equivalent to one that's been installed and initialized from scratch? There are other ways to do it: Mnesia nowadays is quite robust when it comes to bootstrapping a new schema from another node, and rather than transform_tables(), which happens within a (potentially huge) transaction, one can use traverse_backup() and transform both schema and data off-line. Then, one can restart the system. If it's a redundant system, the nodes have to be separated while upgrading the mnesia schema (assuming the schema needs changing). This can be done e.g. with cookies. If there are version differences in the application-level message-passing between nodes, this has to be taken care of by the applications, and no pre-package solution exists for that, AFAIK. I don't know of anyone who actually does upgrades like this, but it should work(tm). (: /Ulf W From chandrashekhar.mullaparthi@REDACTED Fri Feb 24 12:04:52 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Fri, 24 Feb 2006 11:04:52 +0000 Subject: Hardware recommendation Message-ID: Hello, Has anyone used the HP DL585 ProLiant servers for any critical applications? Or any HP hardware for that matter? I've never run any erlang apps on HP hardware and I'm not sure what to expect. The OS will be Solaris 10. It costs only half as much as an equivalent SUN machine (with our supplier atleast). cheers Chandru From chaitanya.chalasani@REDACTED Fri Feb 24 12:42:34 2006 From: chaitanya.chalasani@REDACTED (CHAITANYA CHALASANI) Date: Fri, 24 Feb 2006 17:12:34 +0530 Subject: Hardware recommendation In-Reply-To: References: Message-ID: Dear Chandru, We have a billing platform running on HP DL585 ProLiant server with erlang on RHEL3. The performance is great and we are having an uptime of more than a year with absolutely no issues. On 2/24/06, chandru wrote: > Hello, > > Has anyone used the HP DL585 ProLiant servers for any critical > applications? Or any HP hardware for that matter? I've never run any > erlang apps on HP hardware and I'm not sure what to expect. The OS > will be Solaris 10. It costs only half as much as an equivalent SUN > machine (with our supplier atleast). > > cheers > Chandru > -- Chaitanya Chalasani From ulf.wiger@REDACTED Fri Feb 24 12:47:43 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 24 Feb 2006 12:47:43 +0100 Subject: Hardware recommendation Message-ID: I ran Erlang on a HP back in 1993 -- even paid $1000 for a tape with Erlang on it. It worked fine. (: Perhaps that didn't help much... /Ulf W > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru > Sent: den 24 februari 2006 12:05 > To: erlang-questions@REDACTED > Subject: Hardware recommendation > > Hello, > > Has anyone used the HP DL585 ProLiant servers for any > critical applications? Or any HP hardware for that matter? > I've never run any erlang apps on HP hardware and I'm not > sure what to expect. The OS will be Solaris 10. It costs only > half as much as an equivalent SUN machine (with our supplier atleast). > > cheers > Chandru > From hedeland@REDACTED Fri Feb 24 13:12:48 2006 From: hedeland@REDACTED (Per Hedeland) Date: Fri, 24 Feb 2006 13:12:48 +0100 (CET) Subject: Hardware recommendation In-Reply-To: Message-ID: <200602241212.k1OCCmTZ065342@tordmule.bluetail.com> "Ulf Wiger \(AL/EAB\)" wrote: > >I ran Erlang on a HP back in 1993 -- even paid $1000 >for a tape with Erlang on it. It worked fine. (: But that was a "real" HP, right? - The ProLiant is just another PeeCee as far as I know...:-) (Not implying that there can't be quality differences between PeeCees...) --Per Hedeland From casper2000a@REDACTED Fri Feb 24 13:21:07 2006 From: casper2000a@REDACTED (Eranga Udesh) Date: Fri, 24 Feb 2006 18:21:07 +0600 Subject: Hardware recommendation In-Reply-To: Message-ID: <20060224122228.B6C6B40007C@mail.omnibis.com> Hi, We run many Erlang systems in HP ML/DL servers, with over 500 transactions per second, and it performance really well. We have over 2 yrs experience and so far nothing found as HW problems. Cheers, - Eranga -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of chandru Sent: Friday, February 24, 2006 5:05 PM To: erlang-questions@REDACTED Subject: Hardware recommendation Hello, Has anyone used the HP DL585 ProLiant servers for any critical applications? Or any HP hardware for that matter? I've never run any erlang apps on HP hardware and I'm not sure what to expect. The OS will be Solaris 10. It costs only half as much as an equivalent SUN machine (with our supplier atleast). cheers Chandru From ulf.wiger@REDACTED Fri Feb 24 13:32:11 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Fri, 24 Feb 2006 13:32:11 +0100 Subject: Hardware recommendation Message-ID: Per Hedeland wrote: > > "Ulf Wiger \(AL/EAB\)" wrote: > > > >I ran Erlang on a HP back in 1993 -- even paid $1000 for > >a tape with Erlang on it. It worked fine. (: > > But that was a "real" HP, right? - The ProLiant is just > another PeeCee as far as I know...:-) (Not implying that > there can't be quality differences between PeeCees...) Oh yes. It was a HP 9000/712 workstation, if I recall correctly. http://web.archive.org/web/19970710210119/www.hp.com/hpwebcat/hp9kw/712/ overview.html I remember that it was pretty solid -- built to last. Those were the days... /U From chaitanya.chalasani@REDACTED Fri Feb 24 13:43:14 2006 From: chaitanya.chalasani@REDACTED (CHAITANYA CHALASANI) Date: Fri, 24 Feb 2006 18:13:14 +0530 Subject: Hardware recommendation In-Reply-To: <200602241212.k1OCCmTZ065342@tordmule.bluetail.com> References: <200602241212.k1OCCmTZ065342@tordmule.bluetail.com> Message-ID: Isn't ProLiant a genune HP made? On 2/24/06, Per Hedeland wrote: > "Ulf Wiger \(AL/EAB\)" wrote: > > > >I ran Erlang on a HP back in 1993 -- even paid $1000 > >for a tape with Erlang on it. It worked fine. (: > > But that was a "real" HP, right? - The ProLiant is just another PeeCee > as far as I know...:-) (Not implying that there can't be quality > differences between PeeCees...) > > --Per Hedeland > > -- Chaitanya Chalasani From ke.han@REDACTED Fri Feb 24 13:53:04 2006 From: ke.han@REDACTED (ke.han) Date: Fri, 24 Feb 2006 20:53:04 +0800 Subject: Hardware recommendation In-Reply-To: References: Message-ID: <43FF01B0.7010504@redstarling.com> I don't think this is a matter between the hardware and erlang. Its the OS that matters in this case. If Solaris 10 is certified for the DL585 and erlang works well on Solaris 10 then you shouldn't have any trouble ;-). The DL585 is a solid opteron server. From most perspectives its no different from other xeon or opteron servers. Its nothing uniquely "HP". I have used erlang on many intel based PCs, servers and laptops with various Linux, BSD and Windows. Can't say anything for Solaris expect that if Sun and HP certify Solaris 10 for this hardware you should be fine. regards, ke han chandru wrote: > Hello, > > Has anyone used the HP DL585 ProLiant servers for any critical > applications? Or any HP hardware for that matter? I've never run any > erlang apps on HP hardware and I'm not sure what to expect. The OS > will be Solaris 10. It costs only half as much as an equivalent SUN > machine (with our supplier atleast). > > cheers > Chandru > From tty@REDACTED Fri Feb 24 14:06:48 2006 From: tty@REDACTED (tty@REDACTED) Date: Fri, 24 Feb 2006 08:06:48 -0500 Subject: table_info on remote table Message-ID: Hi, Thanks. This works. Guess I need to upgrade my Google-fu skills :) Was there an explaination why we need to use the mnesia_frag access module for this to work ? Just curious. tee -------- Original Message -------- From: Fredrik Thulin Apparently from: owner-erlang-questions@REDACTED To: tty@REDACTED Cc: erlang-questions@REDACTED Subject: Re: table_info on remote table Date: Fri, 24 Feb 2006 07:29:25 +0100 > On Friday 24 February 2006 03:32, tty@REDACTED wrote: > > Hi, > > > > I have a question regarding table_info. How does one make it work > > with a remote table ? > ... > > I beleive I had the same problem once. I got the following piece of code > from Chandrashekhar Mullaparthi, which solved it for me at least. Try > if it works for you or if your problem is actually another one. > > %%-------------------------------------------------------------------- > %% Function: generic_table_info(Tab, Item) > %% Tab = atom(), table name > %% Item = atom(), item we are interested in > %% Descrip.: Get mnesia table information, regardless of where table > %% resides. > %% Returns : term() > %%-------------------------------------------------------------------- > generic_table_info(Tab, Item) -> > Info = fun(T, I) -> > mnesia:table_info(T, I) > end, > mnesia:activity(async_dirty, Info, [Tab, Item], mnesia_frag). > > /Fredrik From chandrashekhar.mullaparthi@REDACTED Fri Feb 24 14:16:04 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Fri, 24 Feb 2006 13:16:04 +0000 Subject: Hardware recommendation In-Reply-To: <43FF01B0.7010504@redstarling.com> References: <43FF01B0.7010504@redstarling.com> Message-ID: On 24/02/06, ke.han wrote: > I don't think this is a matter between the hardware and erlang. Its the > OS that matters in this case. If Solaris 10 is certified for the DL585 > and erlang works well on Solaris 10 then you shouldn't have any trouble ;-). Thanks. That is what I thought but was just checking to make sure. Solaris 10 is certified for the DL585. cheers Chandru From gordonguthrie@REDACTED Fri Feb 24 14:49:48 2006 From: gordonguthrie@REDACTED (Gordon Guthrie) Date: Fri, 24 Feb 2006 13:49:48 +0000 Subject: Hardware recommendation Message-ID: <1140788988.43ff0efcb8a16@backawinner.gg> The DL585 is an enterprise class 64 bit Wintel server with on-board ILO access, hot disk swap, dual power supplies. These are properly engineered, very solid bits of kit. We have around 500 Wintel class servers (1). Our old standard procurement was: * DL360 (1U, 2 CPU, 2 disk, 32-bit) * DL380 (2U, 2 CPU, 5 disk, 32bit) We are currently shifting to the new 64-bit range as standard: * DL365 (1U, 2 CPU, 2 disk, 64-bit) * DL385 (2U, 2 CPU, 5 disk, 64-bit) * DL585 (2U, 4 CPU, 5 disk, 64-bit) The Proliant range was the old system standard Wintel kit for Scottish Enterprise, Intelligent Finance/Halifax and Direct Line Financial Services where I worked previously. 'Nobody ever got sacked for buying Hewlie-Pak!' - Dell are not really regarded as enterprise ready in this space - the only other option would be IBM kit which is rock solid. I wouldn't regard Solaris 10 for X84/64-86 as enterprise ready and vetoed its use on Wintel hardware here - (there was an additional complication that the intention was to run it in virtual mode under VMWare which is even further from being enterprise ready...)... If I had the money to myself however, a DL585 running Solaris 10 would be just smashing... Gordon (1) Wintel covers Netware, NT4 and Linux, I know, but what else can you do... Quoting chandru : > Hello, > > Has anyone used the HP DL585 ProLiant servers for any critical > applications? Or any HP hardware for that matter? I've never run any > erlang apps on HP hardware and I'm not sure what to expect. The OS > will be Solaris 10. It costs only half as much as an equivalent SUN > machine (with our supplier atleast). > > cheers > Chandru > > ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From chandrashekhar.mullaparthi@REDACTED Fri Feb 24 14:36:41 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Fri, 24 Feb 2006 13:36:41 +0000 Subject: Binary construction Message-ID: Hi, 23> <<1:16>>. <<0,1>> 24> <<21:16>>. <<0,21>> 25> <<321:16>>. <<1,65>> 26> <<4321:16>>. <<16,225>> 27> <<54321:16>>. <<212,49>> 28> <<654321:16>>. <<251,241>> 29> <<7654321:16>>. <<203,177>> 30> <<87654321:16>>. <<127,177>> Why are the resulting binaries all different? I thought that if I gave a value of more than 65535 and asked for it to be packed into 16 bits, I would always get <<255,255>>. Why is it not? cheers Chandru From chandrashekhar.mullaparthi@REDACTED Fri Feb 24 14:41:42 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Fri, 24 Feb 2006 13:41:42 +0000 Subject: Hardware recommendation In-Reply-To: <1140788988.43ff0efcb8a16@backawinner.gg> References: <1140788988.43ff0efcb8a16@backawinner.gg> Message-ID: On 24/02/06, Gordon Guthrie wrote: > The DL585 is an enterprise class 64 bit Wintel server with on-board ILO > access, hot disk swap, dual power supplies. These are properly engineered, > very solid bits of kit. > > > I wouldn't regard Solaris 10 for X84/64-86 as enterprise ready and vetoed its > use on Wintel hardware here - (there was an additional complication that the > intention was to run it in virtual mode under VMWare which is even further > from being enterprise ready...)... > Thanks! Have you used Solaris 10 on these h/w. Why do you think it is not enterprise ready? > If I had the money to myself however, a DL585 running Solaris 10 would be just > smashing... I was surprised how cheap these are actually (I am not paying for these out of my pocket :-)) A system with 128GB RAM, 1TB hard disk and 8 CPUs is about 35K GBP including 3 years onsite support! Chandru From chandrashekhar.mullaparthi@REDACTED Fri Feb 24 14:45:23 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Fri, 24 Feb 2006 13:45:23 +0000 Subject: table_info on remote table In-Reply-To: References: Message-ID: On 24/02/06, tty@REDACTED wrote: > Hi, > > Thanks. This works. Guess I need to upgrade my Google-fu skills :) > Was there an explaination why we need to use the mnesia_frag access module for this to work ? Just curious. > > tee Looking at mnesia_frag.erl it uses the where_to_read property of a table and makes an RPC call to that node. Whereas mnesia:table_info just uses ets:info(Tab, size) function call which ofcourse wont work for remote tables. cheers Chandru From per.gustafsson@REDACTED Fri Feb 24 15:00:13 2006 From: per.gustafsson@REDACTED (Per Gustafsson) Date: Fri, 24 Feb 2006 15:00:13 +0100 Subject: Binary construction In-Reply-To: References: Message-ID: <43FF116D.9040607@it.uu.se> Hi It's because when binaries are constructed from integers and there is an integer that is larger than the number of bits in the segment the low bits of the integer are put into the binary. i.e <> works the same as << (16#ffff band X) : 16 >>. Per chandru wrote: > Hi, > > 23> <<1:16>>. > <<0,1>> > 24> <<21:16>>. > <<0,21>> > 25> <<321:16>>. > <<1,65>> > 26> <<4321:16>>. > <<16,225>> > 27> <<54321:16>>. > <<212,49>> > 28> <<654321:16>>. > <<251,241>> > 29> <<7654321:16>>. > <<203,177>> > 30> <<87654321:16>>. > <<127,177>> > > Why are the resulting binaries all different? I thought that if I gave > a value of more than 65535 and asked for it to be packed into 16 bits, > I would always get <<255,255>>. Why is it not? > > cheers > Chandru From chandrashekhar.mullaparthi@REDACTED Fri Feb 24 15:03:16 2006 From: chandrashekhar.mullaparthi@REDACTED (chandru) Date: Fri, 24 Feb 2006 14:03:16 +0000 Subject: Binary construction In-Reply-To: References: Message-ID: Sorry! Dumb question! Ignore it! Chandru On 24/02/06, chandru wrote: > Hi, > > 23> <<1:16>>. > <<0,1>> > 24> <<21:16>>. > <<0,21>> > 25> <<321:16>>. > <<1,65>> > 26> <<4321:16>>. > <<16,225>> > 27> <<54321:16>>. > <<212,49>> > 28> <<654321:16>>. > <<251,241>> > 29> <<7654321:16>>. > <<203,177>> > 30> <<87654321:16>>. > <<127,177>> > > Why are the resulting binaries all different? I thought that if I gave > a value of more than 65535 and asked for it to be packed into 16 bits, > I would always get <<255,255>>. Why is it not? > > cheers > Chandru > From robert.virding@REDACTED Fri Feb 24 15:27:00 2006 From: robert.virding@REDACTED (Robert Virding) Date: Fri, 24 Feb 2006 15:27:00 +0100 Subject: parmap/2 In-Reply-To: References: Message-ID: <43FF17B4.8020400@telia.com> Hello Luke, That WAS a cute function, the only thing that could have made even cuter was if the receive's were in parallel. Though that wouldn't affect the result. Robert Luke Gorrie skrev: > Howdy, > > I just found this function and thought it was cute enough to share on > a rainy day: > > %% Map function F over list L in parallel. > parmap(F, L) -> > Parent = self(), > [receive {Pid, Result} -> Result end > || Pid <- [spawn(fun() -> Parent ! {self(), F(X)} end) || X <- L]]. > > > From tty@REDACTED Fri Feb 24 15:45:32 2006 From: tty@REDACTED (tty@REDACTED) Date: Fri, 24 Feb 2006 09:45:32 -0500 Subject: table_info on remote table Message-ID: Thanks. Serves me right for reading mnesia_frag in Appendix C of the User Guide instead of going to the source. t -------- Original Message -------- From: chandru To: "tty@REDACTED" Cc: ft@REDACTED, erlang-questions@REDACTED Subject: Re: table_info on remote table Date: Fri, 24 Feb 2006 13:45:23 +0000 > On 24/02/06, tty@REDACTED wrote: > > Hi, > > > > Thanks. This works. Guess I need to upgrade my Google-fu skills :) > > Was there an explaination why we need to use the mnesia_frag access module for this to work ? Just curious. > > > > tee > > Looking at mnesia_frag.erl it uses the where_to_read property of a > table and makes an RPC call to that node. Whereas mnesia:table_info > just uses ets:info(Tab, size) function call which ofcourse wont work > for remote tables. > > cheers > Chandru From thomas@REDACTED Fri Feb 24 17:03:56 2006 From: thomas@REDACTED (Thomas Johnsson) Date: Fri, 24 Feb 2006 17:03:56 +0100 Subject: phash2/1 for atoms Message-ID: <43FF2E6C.2080208@skri.net> erlang:phash2 as expected seems to give a "random" bit sequence for terms in general, eg., 69> erlang:phash2(0). 88723725 70> erlang:phash2(1). 2614250 71> erlang:phash2({}). 87486268 72> erlang:phash2({0}). 84975979 73> erlang:phash2([]). 113427502 74> erlang:phash2([1,2]). 13006701 However, applying phash2 to short atoms does not seem quite so "randomly wellbehaved": 57> erlang:phash2(a). 97 58> erlang:phash2(aa). 1649 59> erlang:phash2(aaa). 26481 60> erlang:phash2(aaaa). 423793 61> erlang:phash2(aaaaa). 6780785 62> erlang:phash2(aaaaaa). 108492657 63> erlang:phash2(aaaaaaa). 125269777 64> erlang:phash2(aaaaaaaa). 125268225 65> erlang:phash2(aaaaaaaaa). 125243393 66> erlang:phash2(aaaaaaaaaa). 124846081 67> erlang:phash2(baaaaaaaaa). 124907521 68> erlang:phash2(aaaaaaaaab). 124846082 Is this intentional, or a bug? Looking at the source in erts/emulator/beam/utils.c in the OTP distribution, it seems that for atoms atom_tab(atom_val(term))->slot.bucket.hvalue is always used, without using the "funny numbers" (HCONST_....) or UINT32_HASH. -- Thomas From gordonguthrie@REDACTED Fri Feb 24 17:47:59 2006 From: gordonguthrie@REDACTED (Gordon Guthrie) Date: Fri, 24 Feb 2006 16:47:59 +0000 Subject: Hardware recommendation In-Reply-To: References: <1140788988.43ff0efcb8a16@backawinner.gg> Message-ID: <1140799679.43ff38bf98de7@backawinner.gg> > Thanks! Have you used Solaris 10 on these h/w. Why do you think it is > not enterprise ready? It is not enterprise ready for a number of reasons: * Solaris 10 on Sparc is pretty much brand new (we are in the process of formulating a Solaris 8 to 10 upgrade strategy for our boxes - V-range up to a F12K) * Solaris on x86/x64-86 is not widely used yet * Solaris has entered and left the x64-86 market once already with their AMD based servers * Sun support and care for the previous x86 range of Solaris was rubbish The criteria to determine if it is enterprise ready are not really technical: * is the company going to support the product? * has the product been taken up by a significant user base? * is it rational to commmit to this product? - staff retraining - mandatory purchase of this platform - integration with other products * etc, etc The sort of things that make this a big deal if you have dozens of boxes, but are really just chump change if you have 2 or 3... YMMV Gordon ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ From klacke@REDACTED Fri Feb 24 19:01:15 2006 From: klacke@REDACTED (Claes Wikstrom) Date: Fri, 24 Feb 2006 19:01:15 +0100 Subject: parmap/2 In-Reply-To: <43FF17B4.8020400@telia.com> References: <43FF17B4.8020400@telia.com> Message-ID: <43FF49EB.3010102@hyber.org> Robert Virding wrote: > Hello Luke, > > That WAS a cute function, the only thing that could have made even cuter > was if the receive's were in parallel. Though that wouldn't affect the It's been in the rpc library for some 10 years or so. rpc:pmap/3 /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From mikael.karlsson@REDACTED Sat Feb 25 17:47:23 2006 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Sat, 25 Feb 2006 17:47:23 +0100 Subject: Dependency injection in Erlang (Disgression from: Longstanding issues: structs & standalone Erlang) In-Reply-To: <200602241557.23693.rlenglet@users.forge.objectweb.org> References: <200602232316.26799.mikael.karlsson@creado.com> <200602241557.23693.rlenglet@users.forge.objectweb.org> Message-ID: <200602251747.23615.mikael.karlsson@creado.com> Romain Lenglet wrote: [...] > I was one of the initial designers of Fractal, so I am quite > fluent in Fractal concepts ;-), and like you I am missing some > of Fractal features in Erlang. I even started implementing a > generic Fractal membrane in Erlang. Great! ... > Dependency injection would consist in having a naming domain > local to every process, and letting the mapping between > process-local names and real process names or pids be done from > outside of the process implementation (hence, the architecture > becomes a separate concern, implemented separately from > functional code). > > There are two ways to do that in Erlang. Let's take gen_server as > an example. > > 1- constructor injection: simply pass the pids or names of all > the processes messages will be sent to, in the Args parameter, > e.g.: > gen_server:start_link(client1, [server1], []), > gen_server:start_link(client1, [server2], []), > gen_server:start_link(client2, [server1, server10, AnyOtherArg], > []), > ... ... > Drawback: there is no way to modify dependencies after the > process is started. This is solved with method 2-. > > Alternatively, the process names could be stored directly in the > State record in that case (one record field for every > dependency), but it makes reflective access more difficult, cf. > method 2- below... > > > 2- getter/setter/interface injection: implement gen_server calls > to get / set dependencies, i.e. to modify the process' local > naming domain. E.g.: > > -module(client2). > ... > handle_call({getdep, Key}, From, State) -> > Deps = State#state.deps, > {reply, dict:find(Key, Deps), State}; > handle_call({setdep, Key, Pid}, From, State) -> > %% should check that Key is valid... > Deps = State#state.deps, > NewDeps = dict:store(Key, Pid, Deps), > NewState = State#state{deps = NewDeps}, > {reply, ok, NewState}. > > > Of course, it is preferable to implement both approaches > simultaneously. In addition, we could also add as in Fractal the > distinction between optional and mandatory client interfaces, and > the distinction between singleton and collection interfaces. > And maybe it would be more efficient to use the process' > dictionary directly (using get/1 and put/2)...?? > > Attribute control should be done the same way: through init/1 > parameters, and through gen_server calls ({getattr, Attr} and > {setattr, Attr, Val}). Although both concerns seem very similar > that way, they must be separate (i.e. we must not to mix binding > and attribute control) because the callbacks have a different > semantics. For instance, when setting a dependency (setdep > call), one would like to automatically link/1 the client and the > server process. > > The dependency injection implementation above is the very > minimum, but it allows many things already: transparent > interposition, application-specific distributed bindings > implemented in Erlang (e.g. one could implement a transparent > proxy process between communicating processes, to do load > balancing between several server processes, or to do group > communication transparently...), etc. > Of course, if we want to implement generic membranes as in > Fractal, we would have to add a lot of things around, but > functional modules would not have to implement more than the DI > callbacks shown above, just as in Fractal/Java. > My opinion is: KISS for developers, and be as Erlang- and > OTP-compliant as possible. I agree that one should keep it as simple as possible for developers, and the above concept, which resembles Fowlers Spring approach? allow you, as you state, to do many things already. Maybe, for Erlang, you could be a bit more "Fractalish" and expose the Fractal interface names as well, meaning that you could expose the binding controller in a section like: handle_call({'binding-controller', bindFc, {Key, PiD}}, From, State) -> Deps = State#state.deps, NewDeps = dict:store(Key, Pid, Deps), NewState = State#state{deps = NewDeps}, {reply, ok, NewState}; and attribute controller in a similar way. Binding and attribute control could also use library functions to make life easier for a developers. This would make it easy (but not a must) to use erlang modules for your own interfaces handle_call({interface1, methodx, Args}, From, State) -> Deps = State#state.deps, {ok, FooServerName} = dict:find('foo', Deps), %% e.g., forward the request: Reply = interface2:hey(FooServerName, Args), {reply, Reply, State}; module interface1 would implement something like methodx(Ref, Args) -> gen_server:call(Ref, {interface1, methodx, Args}). module interface2 hey(Ref, Args) -> gen_server:call(Ref, {interface2, hey, Args}). In this way you could implement interface specification and contract checking in erlang modules, which could be more dynamic compared to a static interface. The nice thing is that you will get a specification for your client (and for implementing your server). I think Fractal has yet another level, differing interface names and interface types, meaning that you should maybe bind your interface name to another module name. This could be quite interesting, the Erlang Corba idl compiler for instance generates interface modules with methods for idl specified metods like: ping(OE_THIS, NeededArguments) -> corba:call(OE_THIS, ping, [NeededArguments], ?MODULE). OE_THIS is the Corba Erlang object reference and not a erlang PiD, but it would still work to bind the erlang idl module as interface module and bind the server reference to the corba object. The client using the dependency injection could use either the Corba object or a gen_server Pid, without needing to know which, the interface would look the same. Maybe it is too complicated to bind both interface modules, and references though. Anyhow it would be easy to implement a gen_server proxy for the Corba object with similar looking interfaces. And you could probably implement interface modules for for other types of interfaces, like UBF contract checking etc. > For instance, I don't like ErlCOM, which imposes a lot of > non-functional code in modules (altough the concepts are the > same as in Fractal, both being rooted in RM-ODP): > http://www.ist-runes.org/docs/publications/EUC05.pdf I think a lot of the non-functional code could be hidden if it was implemented as its own behaviour. > It tries to translate implementation solutions that make sense in > object-oriented, statically typed languages, into Erlang/OTP. One problem with ErlCOM, if I understood it right, was that you could not have a many clients - one server relationship? > But I think that it does not fit Erlang/OTP well. > For instance, the idea to formally define interface signatures > statically is a good idea in static typing languages such as > Java (and I am a strong advocate of that), but does make little > sense in a dynamic language such as Erlang, in which case it > restricts flexibility for little gain. Interfaces are good from a specification point of perspective, implementing them as Erlang modules would give a better flexibility than static interfaces and add dynamics (like contract checking possibilites). But I agree that this should be a possibility, and not imposed. The example that you give below could be handled in an Erlang interface module if the State (or at least the attribute #state.acceptssayhello) is exposed in the interface. > For instance, the set of messages that can be received or sent by > an Erlang process at a given time, may change during the > process' lifetime. In RM-ODP terms, its set of server and client > interfaces mayh change over time. For instance, consider guards > in receive statements, or in handle_cast callbacks: > > test(State) -> > receive > {sayhello, Arg} > when State#state.acceptsayhello == true -> > ... > end. > > handle_cast({sayhello, Arg}, State) > when State#state.acceptsayhello == true -> > ... > > This cannot be captured in ErlCOM or Fractal, which consider that > the set of client and server interfaces, and their signatures, > (i.e. the component's type) do not change after component > creation. > > One should not impose such limitations in Erlang. So le'ts keep > it simple, stupid... > And again, I think that the only thing that should be imposed to > developers is the implementation of DI callbacks as described > above. > Any other control should be implemented outside of the functional > modules' implementations, and even should be made optional. I agree. One problem with a gen_server is that it will kill your client if you do not get a response within the Timeout time, 5 seconds default I think. This is not acceptable if you bind many components together expecting them to last for a long time. I think it could be a good idea to consider a fractal component behaviour, gen_fc ?, overriding the gen_server behaviour, making life, or at least the development, easier for developers. Regards Mikael Karlsson From robert.virding@REDACTED Sat Feb 25 17:56:26 2006 From: robert.virding@REDACTED (Robert Virding) Date: Sat, 25 Feb 2006 17:56:26 +0100 Subject: parmap/2 In-Reply-To: <43FF49EB.3010102@hyber.org> References: <43FF17B4.8020400@telia.com> <43FF49EB.3010102@hyber.org> Message-ID: <44008C3A.8070706@telia.com> What does it have to do with rpc's? I mean why there? Robert Claes Wikstrom skrev: > Robert Virding wrote: >> Hello Luke, >> >> That WAS a cute function, the only thing that could have made even >> cuter was if the receive's were in parallel. Though that wouldn't >> affect the > > It's been in the rpc library for some 10 years or so. > > rpc:pmap/3 > > > /klacke > > From klacke@REDACTED Sun Feb 26 01:42:25 2006 From: klacke@REDACTED (Claes Wikstrom) Date: Sun, 26 Feb 2006 01:42:25 +0100 Subject: parmap/2 In-Reply-To: <44008C3A.8070706@telia.com> References: <43FF17B4.8020400@telia.com> <43FF49EB.3010102@hyber.org> <44008C3A.8070706@telia.com> Message-ID: <4400F971.5080008@hyber.org> Robert Virding wrote: > What does it have to do with rpc's? I mean why there? > Because they are rpc's /klacke -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763 From ulf.wiger@REDACTED Sun Feb 26 08:01:51 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Sun, 26 Feb 2006 08:01:51 +0100 Subject: optimization of list comprehensions Message-ID: I've seen many examples of how people use list comprehensions as a form of beautified lists:foreach() - that is, they don't care about the return value of the comprehension. I hesitate to say that it's bad practice, even though one will build a potentially large list unnecessarily, since it's actually looks a lot nicer than using lists:foreach(). Question: would it be in some way hideous to introduce an optimization where such list comprehensions do everything except actually build the list? Then they could execute in constant space. /Ulf W From samuel@REDACTED Sun Feb 26 13:25:48 2006 From: samuel@REDACTED (Samuel Rivas) Date: Sun, 26 Feb 2006 13:25:48 +0100 Subject: optimization of list comprehensions In-Reply-To: References: Message-ID: <20060226122548.GA15454@crusher.lfcia.pri> Ulf Wiger (AL/EAB) wrote: > I've seen many examples of how people use > list comprehensions as a form of beautified > lists:foreach() - that is, they don't care > about the return value of the comprehension. > > I hesitate to say that it's bad practice, > even though one will build a potentially > large list unnecessarily, since it's > actually looks a lot nicer than using > lists:foreach(). Why? List comprehension is a tool to construct lists, lists:foreach has different semantics. > Question: would it be in some way hideous > to introduce an optimization where such > list comprehensions do everything except > actually build the list? Then they could > execute in constant space. I think it would. You would be writing a list that is not a list. A bit of elaboration: If you write [f(X) || X <- Somewhere] you mean "build a list applying f to every member of ". If you write lists:foreach(F,L) you mean "apply F to every member of L just for the side effects, don't care about the result". On the other hand, a smart compiler may be able to avoid building the list if it is not going to be used. But if the function were exported and the list comprehension were its result the compiler would not be able to apply the optimization anyway. So even if the optimization were introduced it would not always work. Regards -- Samuel From ke.han@REDACTED Sun Feb 26 13:52:23 2006 From: ke.han@REDACTED (ke.han) Date: Sun, 26 Feb 2006 20:52:23 +0800 Subject: rfc: rdbms - new type system In-Reply-To: References: Message-ID: <4401A487.6070203@redstarling.com> Ulf, In general I would like to see more primitives for the most common cases: float, coercedFloat, number, integer intervals of float, number, integer enums of any specified list accept undefined the attr is a list of another defined type etc... This would make the declarations easier to read and would probably make the constraint runtime checking more efficient. your example: [{{typedef, t_age}, {'and',[{'>=',0},{'=<',150}]}}, {{attr, age, type}, {'or',[{type,t_age},{'==',undefined}]}} is too messy as allowing undefined is very common. You are correct that undefined messes up user's app code. I am attempting to remedy this in my MVC framework (erlang JSON encoding and javascript code) where I handle type mapping between internal and external representation and handle missing (undefined) values. I would prefer something like: {{attr, age, type}, {'and', [{'>=', 0}, {'=<', 150}]}, {'or', undefined}} or perhaps these examples (changing your syntax even more): {{attr, age, [{integer, {interval, 0, 150}, undefined]} {{attr, time, [integer, {undefined, fun() -> erlang:now() end}]} % if the value is undefined, set the value to be the current time. 0..1 and 0..n relationships are the most common cardinality in mainstream apps. The app spec may say the cardinality should be 1..1 or 1..n, but the db needs to be able to handle empty lists and undefined relation prior to the app code enforcing these rules. I am imagining high-level declarations such as: {attr, person, {record, person}} % must be a record of type person {attr, person, [{record, person}, % must be a record of type person undefined]} % undefined is acceptable {attr, people, {list, person}} % people is a list of person type and if uninitialized will give an empty list. i.e. never undefined {attr, month, {enum, ["June", "July", August"]}} % any value in the list is acceptable Need to be able to set a number type which accepts both float and integers. This is an annoyance when using io_lib and others that expect a float and pass it 1 instead of 1.0. This causes me to write conversion code in my MVC framework. Something like this would work: {attr, price, coercedFloat} % ensures that if setting 1 instead of 1.0, you always get back 1.0 vs. {attr, price, float} % only accepts float or {attr, price, number} %% accepts integers and float but does not coerce; so you get back exactly what you put in That my feedback for now. So I see from your example how your defined types. How are you defining relations? Any relation integrity constraints? thanks, ke han Ulf Wiger (AL/EAB) wrote: > Rdbms is asymptotically approaching beta status. (: > > Some comments on the following are most welcome. > > I started doing some cleanups and documentation. > Currently, I'm in some kind of test-doc-driven > development mode (code a little, write test suites, > redesign, document, redesign to comply with the > documentation, and so on.) I'm using a tiddlyWiki > for the documentation, which I think fits very > nicely with this way of working. > > The current holdup is that I'm completely redesigning > the type system (after all, no-one demanded backwards > compatibility...) I'm just getting ready to throw out > the 'required' and 'bounds' properties, as they can be > expressed as types. > > I removed some old types that were just... messy > (e.g. 'compound'), as well as 'record' and 'tuples' > which are now redundant. > > > Current approach: > > Typedefs: you can specify {typedef, Name, Type} > as a table property or a global property. Table > typedefs shadow global typedefs. It is not > possible to shadow predefined types. > > So, > > [{{attr,age, type}, integer}, > {{attr,age,bounds}, {inclusive, 0, 100}}, > {{attr,age,required}, true}] > > now becomes: > > {{attr, age, type}, > {'and', [{'>=', 0}, > {'=<', 150}]}} > > In this case, 'integer' and 'required' are implicit. > > In order to allow the value undefined, > one could do this: > > [{{typedef, t_age}, > {'and',[{'>=',0},{'=<',150}]}}, > {{attr, age, type}, > {'or',[{type,t_age},{'==',undefined}]}} > > ...which is messier than before, but mixing > 'undefined' and integers in the same attribute > also messes up the user's code. (: > > It certainly simplifies the 'rdbms' code a lot. > > The remaining other attribute property > is 'default', which is used e.g. in > cascading updates. > > > The following type-checking code may serve > to illustrate the type system > (which compiles, but hasn't been tested yet): > > %%% check_type(Type, Value) -> boolean() > %%% > check_type(false, _) -> false; > check_type(true, _) -> true; > check_type(any, _) -> true; > check_type({tuple, Arity, Ts}, X) > when is_tuple(X), size(X) == Arity -> > Elems = tuple_to_list(X), > lists:zipwith( > fun check_type/2, Ts, Elems); > check_type({tuple, Arity}, X) > when is_tuple(X), size(X) == Arity -> true; > check_type(tuple, X) when is_tuple(X) -> true; > check_type(integer, X) when is_integer(X) -> true; > check_type(float, X) when is_float(X) -> true; > check_type(number, X) > when is_integer(X); is_float(X) -> true; > check_type(atom, X) when is_atom(X) -> true; > check_type(pid, X) when is_pid(X) -> true; > check_type(port, X) when is_port(X) -> true; > check_type(binary, X) when is_binary(X) -> true; > check_type(string, X) -> > try list_to_binary(X) of > _ -> true > catch > error:_ -> false > end; > check_type(list, X) when is_list(X) -> true; > check_type(nil, []) -> true; > check_type({list,false},_) -> > false; % optimization > check_type({list, T}, [_|_]) > when T==any; T==undefined -> true; > check_type({list, T}, X) when is_list(X) -> > while(true, fun(Elem) -> > check_type(T, Elem) > end, X); > check_type(function, X) > when is_function(X) -> true; > check_type({function,Arity}, X) > when is_function(X, Arity) -> true; > check_type({'and',Ts}, X) -> > lists:foldl(fun(T,Acc) -> > Acc and check_type(T,X) > end, true, Ts); > check_type({'andalso',Ts}, X) -> > while(true, fun(T) -> check_type(T, X) end, Ts); > check_type({'or',Ts}, X) -> > lists:foldl(fun(T,Acc) -> > Acc or check_type(T,X) > end, false, Ts); > check_type({'orelse', Ts}, X) -> > while(false, fun(T) -> check_type(T, X) end, Ts); > check_type({'not', T}, X) -> > not(check_type(T, X)); > check_type({O,V}, X) > when O=='==';O='=/=';O=='<';O=='>';O=='>=';O=='=<' -> > erlang:O(X,V); > check_type(_, _) -> > false. > > while(Bool, F, L) when is_list(L) -> > Not = not(Bool), > try lists:foreach( > fun(Elem) -> > case F(Elem) of > Not -> throw(Not); > Bool -> Bool > end > end, X) of > _ -> Bool > catch > throw:Not -> > Not > end. > > When types are added, I run some code that > tries to simplify the types a bit. This code > is naive at best, and I'm hoping to get some > help with this later on. The main candidate > is the {list, T} type. If T can be simplified > into any of the values 'true', 'false', 'any', > or 'undefined', then the list won't have to be > traversed. > > While doing this, I also had to ask myself > what {list, any} actually is supposed to mean. > Currently, it's 'any non-empty list', as opposed > to 'nil'. I'm perfectly willing to revisit this, > since it has the unfortunate side effect that > a typed list which includes [] becomes more > difficult to specify: > > {'or', [nil, {list, integer}]} > > Perhaps it would be better to force those > who want a non-empty list to write: > > {'andalso', [{'not',nil}, {list, any}]} > > (Formulating the question, I think I have > decided to go for the latter. The test-doc- > driven development process at work again. :) > > BTW, why would one want both 'and' and > 'andalso' in this context? Shouldn't it > always be 'andalso'? > > Regards, > Ulf W > From ulf.wiger@REDACTED Sun Feb 26 14:19:48 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Sun, 26 Feb 2006 14:19:48 +0100 Subject: optimization of list comprehensions Message-ID: Samuel Rivas wrote: > > Ulf Wiger (AL/EAB) wrote: > > > I hesitate to say that it's bad practice, even > > though one will build a potentially large list > > unnecessarily, since it's actually looks a lot > > nicer than using lists:foreach(). > > Why? List comprehension is a tool to construct lists, > lists:foreach has different semantics. Because [ets:insert(T, {K,V}) || {K,V} <- L, 17 > V, V > 144] is decidedly more concise and readable than lists:foreach(fun({K,V}) when 17 > V, V > 144 -> ets:insert(T, {K, V}); (_) -> ok end, L) 42 characters vs. 73, or seen another way: 7 characters of overhead vs 38. I don't fault programmers for choosing the construct that's both easiest to write and read, even if it means building a list unnecessarily. > On the other hand, a smart compiler may > be able to avoid building the list if it is > not going to be used. But if the function > were exported and the list comprehension were > its result the compiler would not be able to > apply the optimization anyway. So even if > the optimization were introduced it would > not always work. Indeed. A smart compiler would detect whether the value from the list comprehension is used in any way, which includes being used as the return value from the enclosing function. (: /Ulf W From ulf.wiger@REDACTED Sun Feb 26 15:30:20 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Sun, 26 Feb 2006 15:30:20 +0100 Subject: rfc: rdbms - new type system Message-ID: ke.han wrote: > > In general I would like to see more primitives > for the most common cases: > float, coercedFloat, number, integer I have float, number and integer. What would be the difference between number and coercedFloat? (ok, so further down, you've explained it.) > intervals of float, number, integer I used to have {inclusive, Min, Max} and {exclusive, Min, Max}. I thought I'd drop them in favour of {'and',[{'>',Min},{'<',Max}]} and similar. One can of course choose to let the type be implicit, at least if both floats and integers are acceptable. I decided to drop the interval notation since there are so many different useful intervals. Ex: {typedef, natural, {'and',[integer,{'>=',0}]}} I welcome suggestions on how to express it better. > enums of any specified list I can add enums. Good idea. > accept undefined I'll see if I can't make 'undefined' mean {'==', undefined} rather than "no type specified". > the attr is a list of another defined type etc... That would be {list, {type,T}} > I would prefer something like: > > {{attr, age, type}, > {'and', [{'>=', 0}, > {'=<', 150}]}, > {'or', undefined}} Not sure how to parse this... > > or perhaps these examples (changing your syntax even more): > > {{attr, age, > [{integer, {interval, 0, 150}, > undefined]} Using [T1 .. Tn] as shorthand for {'or',[T1..Tn]}? I've hesitated because I've thought that it makes it easier to make mistakes in the type expressions. Perhaps I'm wrong... > {{attr, time, > [integer, > {undefined, fun() -> erlang:now() end}]} % if the > value is undefined, set the value to be the current time. I used to have a form of dynamic types, but decided to drop them for now. I'd like to take a conservative stance on this for now. These things could be added later, I think. > 0..1 and 0..n relationships are the most common cardinality in > mainstream apps. The app spec may say the cardinality should > be 1..1 or > 1..n, but the db needs to be able to handle empty lists and undefined > relation prior to the app code enforcing these rules. > > I am imagining high-level declarations such as: > > {attr, person, > {record, person}} % must be a record of type person My current approach is that you have to first specify what think a person record looks like, by adding a typedef: {typedef, r_person, {tuple, Arity, [{'==',person}|...]}} I used to have a record type, but dropped it, since I thought using the tuple type would be acceptable. > {attr, person, > [{record, person}, % must be a record of type person > undefined]} % undefined is acceptable > > {attr, people, {list, person}} % people is a list of person > type and if > uninitialized will give an empty list. i.e. > never undefined I've had that ambition, but since 'undefined' is just a default value set when the record is initialized, this would be better handled by specifying [] as a default value in the record definition. Codd's rules for relational databases state that there must be a NULL value that is separate from anylegal value. Erlang doesn't have this, so 'rdbms' can't really achieve proper handling of null values. > Need to be able to set a number type which > accepts both float and integers. That would be the 'number' type. This is an annoyance when using io_lib and others > that expect > a float and pass it 1 instead of 1.0. This causes me to write > conversion code in my MVC framework. > > Something like this would work: > > {attr, price, coercedFloat} % ensures that if setting 1 > instead of 1.0, > you always get back 1.0 > vs. > {attr, price, float} % only accepts float > > or > > {attr, price, number} %% accepts integers and float but does > not coerce; > so you get back exactly what you put in Ok, but then I'd either have to do type coersion on reads and match operations, which would really slow things down, or coerce types in the type checking on writes. Doing passive type checking is both easier and faster. > So I see from your example how your defined types. > How are you defining relations? Any relation > integrity constraints? Yes, they are pretty much modeled after the ANSI SQL 92 standard. They haven't changed fundamentally since the 1.5 version, and are described in jungerl, in rdbms/doc/rdbms.pdf. I've added some things, but haven't verified them yet. /Ulf W From gronvald@REDACTED Sun Feb 26 18:15:32 2006 From: gronvald@REDACTED (Soren Gronvald) Date: Sun, 26 Feb 2006 09:15:32 -0800 (PST) Subject: http:request returns {error, session_remotly_closed} Message-ID: <20060226171532.2772.qmail@web32501.mail.mud.yahoo.com> hi, I have a problem with http:request that I think could be a bug (but of course it could be due to ignorance on my part). I am trying to read a url from yahoo.com in the simplest possible way - http:request(Url)- but it fails with the error {error,session_remotly_closed} This of course indicates that it is the server that causes trouble, but I can read the same url with other technologies (java and visual basic) with no hassle at all. And I can read similar but shorter urls from yahaoo.com with erlang http:request without problems. this url can be read successfully: U1 = "http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM&f=sl1d1t1c1baphgvn&e=.csv". and this fails. U2 = "http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl1d1t1c1baphgvn&e=.csv". both should return a comma separated list of stock exchange quotes from yahoo.com. As I can read the same url with other technologies it makes me think that there is a bug in the http client module. Or, could it be that I need some HTTPOptins/Options to make it work? I am using erlang R10B-9 on Windows XP SP2 professional edition with all updates applied. I have downloaded the precompiled version from erlang.org. Best regards Gronvald I have included program examples below this erlang program shows the problem % this works testurl(1) -> U = "http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM&f=sl1d1t1c1baphgvn&e=.csv", geturl(U); % this exits testurl(2) -> U = "http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl1d1t1c1baphgvn&e=.csv", geturl(U). geturl(Url) -> application:start(inets), X = http:request(Url), case X of {ok, { {_Version, 200, _ReasonPhrase}, _Headers, Body} } -> Body; _ -> X end. this java program will handle same situation without error import java.net.*; import java.io.*; public class Geturl { public static void main(String[] args) throws Exception { String u2 = "http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl1d1t1c1baphgvn&e=.csv"; URL url = new URL(u2); InputStream is = new BufferedInputStream(url.openStream()); Reader r = new InputStreamReader(is); int c = r.read(); while(c != -1) { System.out.print((char)c); c = r.read(); } } } __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From erlang@REDACTED Sun Feb 26 19:51:43 2006 From: erlang@REDACTED (Michael McDaniel) Date: Sun, 26 Feb 2006 10:51:43 -0800 Subject: http:request returns {error, session_remotly_closed} In-Reply-To: <20060226171532.2772.qmail@web32501.mail.mud.yahoo.com> References: <20060226171532.2772.qmail@web32501.mail.mud.yahoo.com> Message-ID: <20060226185143.GF9697@delora.autosys.us> On Sun, Feb 26, 2006 at 09:15:32AM -0800, Soren Gronvald wrote: > hi, > > I have a problem with http:request that I think could > be a bug (but of course it could be due to ignorance > on my part). > I am using erlang R10B-9 on Windows XP SP2 > professional edition with all updates applied. I have > downloaded the precompiled version from erlang.org. > > Best regards > Gronvald > > I have included program examples below > > this erlang program shows the problem > > % this works > testurl(1) -> > U = > "http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM&f=sl1d1t1c1baphgvn&e=.csv", > geturl(U); > > % this exits > testurl(2) -> > U = > "http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl1d1t1c1baphgvn&e=.csv", > geturl(U). > > geturl(Url) -> > application:start(inets), > X = http:request(Url), > case X of > {ok, { {_Version, 200, _ReasonPhrase}, _Headers, > Body} } -> > Body; > _ -> X > end. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I cut/pasted your code and compiled on R10B-9 on my Linux system. $ uname -a Linux delora 2.6.12-9-386 #1 Mon Oct 10 13:14:36 BST 2005 i686 GNU/Linux $ erl -sname del Erlang (BEAM) emulator version 5.4.12 [source] [hipe] Eshell V5.4.12 (abort with ^G) (del@REDACTED)1> c(foo). {ok,foo} (del@REDACTED)2> foo:testurl(1). "\"IBM\",80.10,\"2/24/2006\",\"4:00pm\",-0.10,N/A,N/A,80.20,80.65,79.85,3904100,\"INTL BUSINESS MAC\"\r\n\"GE\",33.14,\"2/24/2006\",\"4:01pm\",-0.12,N/A,N/A,33.26,33.305,33.02,18275300,\"GEN ELECTRIC CO\"\r\n\"GM\",19.99,\"2/24/2006\",\"4:00pm\",-0.60,N/A,N/A,20.59,20.68,19.99,10019600,\"GEN MOTORS\"\r\n" (del@REDACTED)3> foo:testurl(2). "\"IBM\",80.10,\"2/24/2006\",\"4:00pm\",-0.10,N/A,N/A,80.20,80.65,79.85,3904100,\"INTL BUSINESS MAC\"\r\n\"GE\",33.14,\"2/24/2006\",\"4:01pm\",-0.12,N/A,N/A,33.26,33.305,33.02,18275300,\"GEN ELECTRIC CO\"\r\n\"GM\",19.99,\"2/24/2006\",\"4:00pm\",-0.60,N/A,N/A,20.59,20.68,19.99,10019600,\"GEN MOTORS\"\r\n\"F\",8.10,\"2/24/2006\",\"4:01pm\",-0.07,N/A,N/A,8.17,8.21,8.06,12347100,\"FORD MOTOR CO\"\r\n\"PKD\",9.78,\"2/24/2006\",\"4:01pm\",+0.21,N/A,N/A,9.57,9.91,9.66,934600,\"PARKER DRILLING C\"\r\n\"GW\",7.14,\"2/24/2006\",\"4:03pm\",-0.05,N/A,N/A,7.19,7.29,7.10,5966300,\"GREY WOLF INC\"\r\n" (del@REDACTED)4> Sorry that I have no further help to provide in the Windows world, though you now know your code is ok. ~Michael P.S. test Linux is Debian, flavor Ubuntu rel 5.10 From igwan@REDACTED Sun Feb 26 20:21:19 2006 From: igwan@REDACTED (=?ISO-8859-1?Q?D=E9sir=E9_Cocoyer?=) Date: Sun, 26 Feb 2006 20:21:19 +0100 Subject: http:request returns {error, session_remotly_closed} In-Reply-To: <20060226171532.2772.qmail@web32501.mail.mud.yahoo.com> References: <20060226171532.2772.qmail@web32501.mail.mud.yahoo.com> Message-ID: <4401FFAF.8020104@free.fr> Soren Gronvald a ?crit : > hi, > > I have a problem with http:request that I think could > be a bug (but of course it could be due to ignorance > on my part). > I have XP SP2 and R10B-9, and the URL worked fine : Erlang (BEAM) emulator version 5.4.12 [threads:0] Eshell V5.4.12 (abort with ^G) 1> http:request("http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl 1d1t1c1baphgvn&e=.csv"). =INFO REPORT==== 26-Feb-2006::20:13:05 === The inets application was not started. Has now been started as a temporary appli cation. {ok,{{"HTTP/1.1",200,"OK"}, [{"connection","close"}, {"date","Sun, 26 Feb 2006 19:13:24 GMT"}, {"content-length","1066"}, {"content-type","application/octet-stream"}, {"p3p", "policyref=\"http://p3p.yahoo.com/w3c/p3p.xml\", CP=\"CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY O NL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV\""}, {"p3p", "policyref=\"http://p3p.yahoo.com/w3c/p3p.xml\", CP=\"CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY O NL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV\""}, {"cache-control","private"}, {"x-cache","MISS from finance.yahoo.com"}], "\"IBM\",80.10,\"2/24/2006\",\"4:00pm\",-0.10,N/A,N/A,80.20,80.65,79.85,390 4100,\"INTL BUSINESS MAC\"\r\n\"GE\",33.14,\"2/24/2006\",\"4:01pm\",-0.12,N/A,N/ A,33.26,33.305,33.02,18275300,\"GEN ELECTRIC CO\"\r\n\"GM\",19.99,\"2/24/2006\", \"4:00pm\",-0.60,N/A,N/A,20.59,20.68,19.99,10019600,\"GEN MOTORS\"\r\n\"F\",8.10 ,\"2/24/2006\",\"4:01pm\",-0.07,N/A,N/A,8.17,8.21,8.06,12347100,\"FORD MOTOR CO\ "\r\n\"PKD\",9.78,\"2/24/2006\",\"4:01pm\",+0.21,N/A,N/A,9.57,9.91,9.66,934600,\ "PARKER DRILLING C\"\r\n\"GW\",7.14,\"2/24/2006\",\"4:03pm\",-0.05,N/A,N/A,7.19, 7.29,7.10,5966300,\"GREY WOLF INC\"\r\n"}} From francesco@REDACTED Sun Feb 26 21:23:43 2006 From: francesco@REDACTED (Francesco Cesarini (Erlang Training & Consulting)) Date: Sun, 26 Feb 2006 20:23:43 +0000 Subject: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> References: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> Message-ID: <44020E4F.60308@erlang-consulting.com> We order the book in bulk from the publisher and get them delivered the following day. We've never had any problems. Last time I spoke to them, they still had a few hundred in stock. Your best bet is ordering it from them at http://www.pearsoned.co.uk/Bookshop/ or through amazon.co.uk When the above fails, let us know so we can send you one. Regards, Francesco -- http://www.erlang-consulting.com Jeff Crane wrote: > It took me a month to save enough to drop 94$ on a > retail book on erlang, now all the english copies are > gone and some squatter is selling the last copy on > Amazon used for 165$!!! Is anyone abroad able to > locate and sell me an english copy of this book or > know where I can order one? > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > From tomas.abrahamsson@REDACTED Sun Feb 26 23:21:25 2006 From: tomas.abrahamsson@REDACTED (Tomas Abrahamsson) Date: Sun, 26 Feb 2006 23:21:25 +0100 Subject: http:request returns {error, session_remotly_closed} In-Reply-To: <20060226171532.2772.qmail@web32501.mail.mud.yahoo.com> References: <20060226171532.2772.qmail@web32501.mail.mud.yahoo.com> Message-ID: On 2/26/06, Soren Gronvald wrote: > > I have a problem with http:request that I think could > be a bug (but of course it could be due to ignorance > on my part). > > I am trying to read a url from yahoo.com in the > simplest possible way - http:request(Url)- but it > fails with the error > > {error,session_remotly_closed} > I've seen this as well, even with communication over the loopback interface. However, I've never been able (or bothered enough) to pinpoint it. So far as I've seen, it seems to be pretty sensitive to timing issues. /Tomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From samuel@REDACTED Sun Feb 26 23:58:45 2006 From: samuel@REDACTED (Samuel Rivas) Date: Sun, 26 Feb 2006 23:58:45 +0100 Subject: optimization of list comprehensions In-Reply-To: References: Message-ID: <20060226225845.GA18708@crusher.lfcia.pri> Ulf Wiger (AL/EAB) wrote: > > Why? List comprehension is a tool to construct lists, > > lists:foreach has different semantics. > > Because > > [ets:insert(T, {K,V}) || {K,V} <- L, > 17 > V, V > 144] > > is decidedly more concise and readable than > > lists:foreach(fun({K,V}) when 17 > V, V > 144 -> > ets:insert(T, {K, V}); > (_) -> ok > end, L) > > 42 characters vs. 73, or seen another way: > 7 characters of overhead vs 38. > > I don't fault programmers for choosing the > construct that's both easiest to write and > read, even if it means building a list unnecessarily. I agree that lists:foreach construction is trifle ugly. But using lists comprehension is a hack. Maybe we must think of another syntax (nonlist-comprehension? :)) > > On the other hand, a smart compiler may > > be able to avoid building the list if it is > > not going to be used. But if the function > > were exported and the list comprehension were > > its result the compiler would not be able to > > apply the optimization anyway. So even if > > the optimization were introduced it would > > not always work. > > Indeed. A smart compiler would detect whether > the value from the list comprehension is used > in any way, which includes being used as the > return value from the enclosing function. (: You mean encouraging this kind of writing? : broadcast(Pids,M) -> [P ! M || P <- Pids], ok. Well, maybe ... I still think it is a misuse, but is indeed easier to read, specially if we add predicates ... Regards -- Samuel From ulf.wiger@REDACTED Mon Feb 27 00:25:05 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 27 Feb 2006 00:25:05 +0100 Subject: rdbms-1.99 Message-ID: I will keep adding nines until it's good enough to be called 2.0. (: I've been fighting to understand why a certain test case fails, but since I promised to release something by the end of this week (15 minutes to go), I thought I'd build a snapshot and upload it somewhere: http://ulf.wiger.net/rdbms-1.99.tgz I've started writing some new docs in rdbms-1.99/doc/rdbms.html (a tiddlywiki), but some things are still best described in the old doc (rdbms.pdf). You can also look at rdbms-1.99/test/src/rdbms_basic_SUITE.erl in order to see what works, and how it works. The test suite currently exercises: - creating normal tables, with no rdbms metadata - specifying types - the recently changed 'undefined' and {enum,...} types - creating parameterized indexes - creating a table and then adding a parameterized index (this is the one that started failing on me just 10 minutes ago. I swear it was working before that...) - Restarting mnesia and verifying that the indexes are reloaded (this test is incorrectly written; it succeeds, but mainly because it doesn't test the tricky part) - specifying referential integrity constraints: cascading deletes, and 'no_action' (cannot delete a parent while children exist) Note: you must compile the modules in the mnesia_patches subdirectory, and since mnesia.hrl has been modified, you have to recompile all other mnesia modules as well. It sucks, I know. There are some debug printouts that need to be eliminated. I have no test cases yet testing fragmented tables. The transparency stuff worked just fine a couple of weeks ago, and I don't recall changing anything that would have broken it. Fragmented (parameterized) indexes probably need some debugging. I've done quite a bit of merging and rearranging. The rdbms_import_server stuff is broken. The problem lies in rdbms_types, which hasn't been changed to reflect the new type system. Quite a few unfinished modules exist. Some cute code from Hans Nilsson, implementing the Porter Stemming Algorithm for efficient word searches, has not yet been fully integrated into rdbms. The idea is to offer a library function for word stem indexes. Ok, now it's actually past midnight, at least in my time zone. I realized I had forgotten to insert EPL statements in many of the modules. /: My plan is to test some more, document some more, and then check it into jungerl. /Ulf W From sean.hinde@REDACTED Mon Feb 27 00:33:52 2006 From: sean.hinde@REDACTED (Sean Hinde) Date: Sun, 26 Feb 2006 23:33:52 +0000 Subject: optimization of list comprehensions In-Reply-To: References: Message-ID: On 26 Feb 2006, at 13:19, Ulf Wiger ((AL/EAB)) wrote: > > Samuel Rivas wrote: >> >> Ulf Wiger (AL/EAB) wrote: > > Because > > [ets:insert(T, {K,V}) || {K,V} <- L, > 17 > V, V > 144] > > is decidedly more concise and readable than > > lists:foreach(fun({K,V}) when 17 > V, V > 144 -> > ets:insert(T, {K, V}); > (_) -> ok > end, L) > > 42 characters vs. 73, or seen another way: > 7 characters of overhead vs 38. > > I don't fault programmers for choosing the > construct that's both easiest to write and > read, even if it means building a list unnecessarily. Personally, I find the foreach version easier to read. It is more akin to reading an english sentence than decoding some strange proof theorum or other mathematical construct. Sean From ok@REDACTED Mon Feb 27 02:40:24 2006 From: ok@REDACTED (Richard A. O'Keefe) Date: Mon, 27 Feb 2006 14:40:24 +1300 (NZDT) Subject: Erlang & Hyperthreading Message-ID: <200602270140.k1R1eOgw218541@atlas.otago.ac.nz> There's some sort of company being set up in Dunedin to do something or other with multicore/hyperthread-style processors. I'm sorry to be vague about this, but I'm not actually involved. However, the University _is_ involved, and a colleague in this Department _is_ involved, and it seems that through him I will have access to an UltraSPARC-T1 later this year. (I hope I've got the name right: 8 UltraSPARC cores on the chip, 4 virtual processors per core, running Solaris 10.) I spoke briefly to my colleague about this today. (Erlang? Can that do multithreading?) He/they *would* be interested in running Erlang benchmarks on that machine when the machine is ready for Erlang and Erlang is ready for Erlang. My colleague is generally interested in parallel programming (distributed shared memory is his pet topic), telecommunications (he teaches our TELE papers), and is open-minded about non-mainstream languages (he has published papers on parallel Prolog). So please note me as - pantingly keen to get my hands on even an alpha release of a multicore-ready Erlang - interested in suggestions about suitable benchmarks From ke.han@REDACTED Mon Feb 27 02:57:31 2006 From: ke.han@REDACTED (ke.han) Date: Mon, 27 Feb 2006 09:57:31 +0800 Subject: rfc: rdbms - new type system In-Reply-To: References: Message-ID: <44025C8B.600@redstarling.com> thanks for the reply. Your type system is very flexible. My recommendations are mostly about usability/readability; especially for large sets of attributes. I have two basic thoughts on your type syntax: 1 - Its too complex/tedious when scanning a large list of attributes. It would be nice if the most common constraints have higher level shorthand notation like I've described. (If it doesn't effect item 2) you could add these high level notations as simple interface on your existing syntax. 2 - I am making wild assumptions about how this is implemented. ;-). I assume that things like.. >> {{attr, age, type}, >> {'and', [{'>=', 0}, >> {'=<', 150}]}, >> {'or', undefined}} ..get implemented as a collection of funs or applies. If this is so, having a higher level notation for these most common types would allow you to code more efficient single functions to handle them. If my assumptions about implementation are wrong, then ;-) As to the coercedFloat, I did not realize that modifying a value on write would slow things down much. However, if my app code has to check everywhere when I retrieve this value, I'm going to slow things down anyway. as to... >> {{attr, age, >> [{integer, {interval, 0, 150}, >> undefined]} > > Using [T1 .. Tn] as shorthand for > {'or',[T1..Tn]}? yes, I think the times you want 'and' operation is when you commit a record and want to cross check different field values. In your notation, for example: {{attr, person, record} {'and', {#person.firstName:length(), '<' ,255}}, {'and', {#person.age, '<', 150}}} I know the above is not correct, but thats the idea... so yes, if you are doing a single value check (not checking multiple values in a record) then I implied "or" in a list of constraints is most welcome. {{attr, age, [{integer, {inclusive, 0, 100}}, undefined]} Also, why the 'type' atom? isn't it implied we are defining types? I'm also confused about the difference between type and typedef. Why not just have a type and types can reuse/inherit other types? What added value is there to differentiate? thanks, ke han Ulf Wiger (AL/EAB) wrote: > ke.han wrote: >> In general I would like to see more primitives >> for the most common cases: >> float, coercedFloat, number, integer > > I have float, number and integer. > > What would be the difference between > number and coercedFloat? (ok, so further > down, you've explained it.) > >> intervals of float, number, integer > > I used to have {inclusive, Min, Max} > and {exclusive, Min, Max}. I thought I'd > drop them in favour of > {'and',[{'>',Min},{'<',Max}]} and similar. > One can of course choose to let the type > be implicit, at least if both floats and > integers are acceptable. > > I decided to drop the interval notation > since there are so many different useful > intervals. Ex: > > {typedef, natural, {'and',[integer,{'>=',0}]}} > > I welcome suggestions on how to express > it better. > >> enums of any specified list > > I can add enums. Good idea. > >> accept undefined > > I'll see if I can't make 'undefined' mean > {'==', undefined} rather than "no type specified". > >> the attr is a list of another defined type etc... > > That would be {list, {type,T}} > > >> I would prefer something like: >> >> {{attr, age, type}, >> {'and', [{'>=', 0}, >> {'=<', 150}]}, >> {'or', undefined}} > > Not sure how to parse this... > >> or perhaps these examples (changing your syntax even more): >> >> {{attr, age, >> [{integer, {interval, 0, 150}, >> undefined]} > > Using [T1 .. Tn] as shorthand for > {'or',[T1..Tn]}? > > I've hesitated because I've thought that > it makes it easier to make mistakes in the > type expressions. Perhaps I'm wrong... > > >> {{attr, time, >> [integer, >> {undefined, fun() -> erlang:now() end}]} % if the >> value is undefined, set the value to be the current time. > > I used to have a form of dynamic types, but decided to > drop them for now. I'd like to take a conservative > stance on this for now. These things could be added > later, I think. > >> 0..1 and 0..n relationships are the most common cardinality in >> mainstream apps. The app spec may say the cardinality should >> be 1..1 or >> 1..n, but the db needs to be able to handle empty lists and undefined >> relation prior to the app code enforcing these rules. >> >> I am imagining high-level declarations such as: >> >> {attr, person, >> {record, person}} % must be a record of type person > > My current approach is that you have to > first specify what think a person record > looks like, by adding a typedef: > > {typedef, r_person, > {tuple, Arity, [{'==',person}|...]}} > > I used to have a record type, but dropped it, since > I thought using the tuple type would be acceptable. > > >> {attr, person, >> [{record, person}, % must be a record of type person >> undefined]} % undefined is acceptable >> >> {attr, people, {list, person}} % people is a list of person >> type and if >> uninitialized will give an empty list. i.e. >> never undefined > > I've had that ambition, but since 'undefined' > is just a default value set when the record is > initialized, this would be better handled by > specifying [] as a default value in the record > definition. > > Codd's rules for relational databases state > that there must be a NULL value that is separate > from anylegal value. Erlang doesn't have this, > so 'rdbms' can't really achieve proper handling > of null values. > >> Need to be able to set a number type which >> accepts both float and integers. > > That would be the 'number' type. > > > This is an annoyance when using io_lib and others >> that expect >> a float and pass it 1 instead of 1.0. This causes me to write >> conversion code in my MVC framework. >> >> Something like this would work: >> >> {attr, price, coercedFloat} % ensures that if setting 1 >> instead of 1.0, >> you always get back 1.0 >> vs. >> {attr, price, float} % only accepts float >> >> or >> >> {attr, price, number} %% accepts integers and float but does >> not coerce; >> so you get back exactly what you put in > > Ok, but then I'd either have to do type coersion > on reads and match operations, which would really > slow things down, or coerce types in the type > checking on writes. Doing passive type checking is > both easier and faster. > >> So I see from your example how your defined types. >> How are you defining relations? Any relation >> integrity constraints? > > Yes, they are pretty much modeled after the > ANSI SQL 92 standard. They haven't changed > fundamentally since the 1.5 version, and are > described in jungerl, in rdbms/doc/rdbms.pdf. > I've added some things, but haven't verified > them yet. > > /Ulf W > From rlenglet@REDACTED Mon Feb 27 03:43:38 2006 From: rlenglet@REDACTED (Romain Lenglet) Date: Mon, 27 Feb 2006 11:43:38 +0900 Subject: rfc: rdbms - new type system In-Reply-To: <44025C8B.600@redstarling.com> References: <44025C8B.600@redstarling.com> Message-ID: <200602271143.39200.rlenglet@users.forge.objectweb.org> > Your type system is very flexible. I am wondering if ASN.1 could be used here. If one is looking for a flexible abstract syntax notation that allows to specify constraints, then ASN.1 seems to be the canonical choice. OTP's asn1 application already provides a parser for the abstract syntax, and defines a canonical mapping into Erlang terms: http://www.erlang.org/doc/doc-5.4.12/lib/asn1-1.4.4.9/doc/html/asn1_ug.html#1.5 Aren't you re-inventing ASN.1? ;-) -- Romain LENGLET From ryanobjc@REDACTED Mon Feb 27 03:56:29 2006 From: ryanobjc@REDACTED (Ryan Rawson) Date: Sun, 26 Feb 2006 18:56:29 -0800 Subject: Erlang & Hyperthreading In-Reply-To: <200602270140.k1R1eOgw218541@atlas.otago.ac.nz> References: <200602270140.k1R1eOgw218541@atlas.otago.ac.nz> Message-ID: <78568af10602261856p281ee871v29bcc62960fd1edc@mail.gmail.com> Hey all, I'm also interested in multi-threaded Erlang. I work in the Enterprise - not telecom. As such, SMP capable machines is the standard. At minimum you would expect to see 2 CPUs on a low powered machine. You could expect up to 8 CPUs on commodity Intel hardware as well. Generally hyperthreaded CPUs show up as multiple CPUs on Linux - but be warned, I heard of performance improvements by turning off HT. I have no other info than that tidbit, so your milage may vary. I believe the app was Oracle on Linux. It would be awesome to get technical preview of multiCPU aware/capable Erlang. Or perhaps access to the CVS tip that contains it. Waiting until end of 2006 seems like an awfully long time. More eyes finds more bugs, right? Thanks for you hard work, -ryan On 2/26/06, Richard A. O'Keefe wrote: > There's some sort of company being set up in Dunedin to do something or > other with multicore/hyperthread-style processors. I'm sorry to be > vague about this, but I'm not actually involved. However, the University > _is_ involved, and a colleague in this Department _is_ involved, and it > seems that through him I will have access to an UltraSPARC-T1 later this > year. (I hope I've got the name right: 8 UltraSPARC cores on the chip, > 4 virtual processors per core, running Solaris 10.) > > I spoke briefly to my colleague about this today. (Erlang? Can that > do multithreading?) He/they *would* be interested in running Erlang > benchmarks on that machine when the machine is ready for Erlang and > Erlang is ready for Erlang. My colleague is generally interested in > parallel programming (distributed shared memory is his pet topic), > telecommunications (he teaches our TELE papers), and is open-minded about > non-mainstream languages (he has published papers on parallel Prolog). > > So please note me as > - pantingly keen to get my hands on even an alpha release of a > multicore-ready Erlang > - interested in suggestions about suitable benchmarks > > From ok@REDACTED Mon Feb 27 04:31:04 2006 From: ok@REDACTED (Richard A. O'Keefe) Date: Mon, 27 Feb 2006 16:31:04 +1300 (NZDT) Subject: Erlang & Hyperthreading Message-ID: <200602270331.k1R3V4la232315@atlas.otago.ac.nz> "Ryan Rawson" wrote: You could expect up to 8 CPUs on commodity Intel hardware as well. Generally hyperthreaded CPUs show up as multiple CPUs on Linux - but be warned, I heard of performance improvements by turning off HT. Well, this is Solaris 10, not Linux, and it's UltraSPARC (presumably Ultra III), not Intel. Perhaps someone else may have more accurate information; I think it's effectively 8 x (4-way hyperthreaded) CPUs, not 1 x (8-way hyperthreaded). In any case, different horse from different stable, so maybe the results will be different. Maybe _this_ horse will learn to sing? From ke.han@REDACTED Mon Feb 27 04:47:08 2006 From: ke.han@REDACTED (ke.han) Date: Mon, 27 Feb 2006 11:47:08 +0800 Subject: Erlang & Hyperthreading In-Reply-To: <78568af10602261856p281ee871v29bcc62960fd1edc@mail.gmail.com> References: <200602270140.k1R1eOgw218541@atlas.otago.ac.nz> <78568af10602261856p281ee871v29bcc62960fd1edc@mail.gmail.com> Message-ID: <4402763C.4080203@redstarling.com> I am interested in both "multi-OS-thread" erlang as well as the Sun Niagra chip. I think it will be very interesting to see how multi-thread erlang does on a dual-core intel chip as well as how this differs (perhaps significantly) on the Sun Niagra architecture. Keep the list posted with any progress reports!!! Wish I had an excuse to get a new T1000 ;-) thanks, ke han Ryan Rawson wrote: > Hey all, > > I'm also interested in multi-threaded Erlang. > > I work in the Enterprise - not telecom. As such, SMP capable machines > is the standard. At minimum you would expect to see 2 CPUs on a low > powered machine. You could expect up to 8 CPUs on commodity Intel > hardware as well. Generally hyperthreaded CPUs show up as multiple > CPUs on Linux - but be warned, I heard of performance improvements by > turning off HT. I have no other info than that tidbit, so your milage > may vary. I believe the app was Oracle on Linux. > > It would be awesome to get technical preview of multiCPU aware/capable > Erlang. Or perhaps access to the CVS tip that contains it. Waiting > until end of 2006 seems like an awfully long time. More eyes finds > more bugs, right? > > Thanks for you hard work, > -ryan > > On 2/26/06, Richard A. O'Keefe wrote: >> There's some sort of company being set up in Dunedin to do something or >> other with multicore/hyperthread-style processors. I'm sorry to be >> vague about this, but I'm not actually involved. However, the University >> _is_ involved, and a colleague in this Department _is_ involved, and it >> seems that through him I will have access to an UltraSPARC-T1 later this >> year. (I hope I've got the name right: 8 UltraSPARC cores on the chip, >> 4 virtual processors per core, running Solaris 10.) >> >> I spoke briefly to my colleague about this today. (Erlang? Can that >> do multithreading?) He/they *would* be interested in running Erlang >> benchmarks on that machine when the machine is ready for Erlang and >> Erlang is ready for Erlang. My colleague is generally interested in >> parallel programming (distributed shared memory is his pet topic), >> telecommunications (he teaches our TELE papers), and is open-minded about >> non-mainstream languages (he has published papers on parallel Prolog). >> >> So please note me as >> - pantingly keen to get my hands on even an alpha release of a >> multicore-ready Erlang >> - interested in suggestions about suitable benchmarks >> >> > From ryanobjc@REDACTED Mon Feb 27 04:59:09 2006 From: ryanobjc@REDACTED (Ryan Rawson) Date: Sun, 26 Feb 2006 19:59:09 -0800 Subject: Erlang & Hyperthreading In-Reply-To: <200602270331.k1R3V4la232315@atlas.otago.ac.nz> References: <200602270331.k1R3V4la232315@atlas.otago.ac.nz> Message-ID: <78568af10602261959l6f7e1a2at48cd0e51074ffb25@mail.gmail.com> Generally most hyperthreading seeks to make 1 CPU appear like 2 virtual CPUs. From the OS level, you would show 2 CPUs in your system stats. The OS would then seek to schedule processes and threads on both... this is where you might get interference, because with HT you don't truly have 2 CPUs... you can end up with interference, which is what I believe our system and DBAs found. Turning off HT gave performance improvement. >From the Erlang side of things, it would be nice to have an Erlang runtime available (for testing at least) that uses OS threads so we can get the benefit of multiple CPUs. Even my iMac has dual CPUs (as dual core, the only thing they share is L2 cache). -ryan On 2/26/06, Richard A. O'Keefe wrote: > "Ryan Rawson" wrote: > You could expect up to 8 CPUs on commodity Intel hardware as well. > Generally hyperthreaded CPUs show up as multiple CPUs on Linux - > but be warned, I heard of performance improvements by turning off HT. > > Well, this is Solaris 10, not Linux, and it's UltraSPARC (presumably > Ultra III), not Intel. Perhaps someone else may have more accurate > information; I think it's effectively 8 x (4-way hyperthreaded) CPUs, > not 1 x (8-way hyperthreaded). In any case, different horse from different > stable, so maybe the results will be different. Maybe _this_ horse will > learn to sing? > From ryanobjc@REDACTED Mon Feb 27 05:02:16 2006 From: ryanobjc@REDACTED (Ryan Rawson) Date: Sun, 26 Feb 2006 20:02:16 -0800 Subject: Where to get Concurrent Programming in Erlang (2nd Edition) In-Reply-To: <44020E4F.60308@erlang-consulting.com> References: <20060209053251.49118.qmail@web31504.mail.mud.yahoo.com> <44020E4F.60308@erlang-consulting.com> Message-ID: <78568af10602262002p20a34a09hcb22bd1e0500170c@mail.gmail.com> Is it worth it to get the book? With the advent of OTP, I have heard from a few sources that the book does not cover OTP which is the most confusing part of Erlang (since the language is straightforward to learn). I ask in seriousness, because with my current project I am seeking to introduce Erlang as a development platform at my work. In fact you were visiting us recently, perhaps you remember me, Powerbook in the front row of Friday's lecture? -ryan On 2/26/06, Francesco Cesarini (Erlang Training & Consulting) wrote: > We order the book in bulk from the publisher and get them delivered the > following day. We've never had any problems. > > Last time I spoke to them, they still had a few hundred in stock. Your > best bet is ordering it from them at > http://www.pearsoned.co.uk/Bookshop/ or through amazon.co.uk > > When the above fails, let us know so we can send you one. > > Regards, > Francesco > -- > http://www.erlang-consulting.com > > > > Jeff Crane wrote: > > It took me a month to save enough to drop 94$ on a > > retail book on erlang, now all the english copies are > > gone and some squatter is selling the last copy on > > Amazon used for 165$!!! Is anyone abroad able to > > locate and sell me an english copy of this book or > > know where I can order one? > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > > > From rlenglet@REDACTED Mon Feb 27 05:03:34 2006 From: rlenglet@REDACTED (Romain Lenglet) Date: Mon, 27 Feb 2006 13:03:34 +0900 Subject: Dependency injection in Erlang (Disgression from: Longstanding issues: structs & standalone Erlang) In-Reply-To: <200602251747.23615.mikael.karlsson@creado.com> References: <200602241557.23693.rlenglet@users.forge.objectweb.org> <200602251747.23615.mikael.karlsson@creado.com> Message-ID: <200602271303.34997.rlenglet@users.forge.objectweb.org> Hi, > I agree that one should keep it as simple as possible for > developers, and the above concept, which resembles Fowlers > Spring approach? allow you, as you state, to do many things > already. This is not "Fowler's approach". His (significant) contribution is to have pinpointed the name "Dependency Injection", and to have separated it from other concerns. But what is described in his paper is very classical. For instance, you can check ObjectWeb's Kilim, a DI framework that existed long before Spring and other nowadays' trendy DI frameworks: http://kilim.objectweb.org/ > Binding and > attribute control could also use library functions to make > life easier for a developers. OK, why not. > Maybe, for Erlang, you could be a bit more "Fractalish" and > expose the Fractal interface names as well, meaning that you > could expose the binding controller in a section like: ... > This would make it easy (but not a must) to use erlang modules > for your own interfaces ... I think that you and I went too fast. Let's not try not to transpose as-is conceptual models and APIs such as Fractal's, that were designed for object-oriented programming languages. And let's use precise and standard terms. What is an interface? Quoting RM-ODP part 2, clause 8.4: an interface is "An abstraction of the behaviour of an object that consists of a subset of the interactions of that object together with a set of constraints on when they may occur. Each interaction of an object belongs to a unique interface. Thus the interfaces of an object form a partitioni of the interactions of that object." In the computational viewpoint, there is a distinction between server interfaces (respond to / consumes interactions) and client interfaces (initiate / produce interactions). (cf. part 3) Then, what can be described as an interface in an object-oriented language such as Java? Interactions are interrogations, i.e. method calls. Operation signatures are the method signatures defined in Java interfaces, so Java interfaces can be described as interface signatures. So, a server interface is the set of all the method calls on a given Java object, whose method signatures are defined in a given Java interface. An interface identifier is therefore a tuple: {object identifier, Java interface name}. Fractal additionally introduced local identifiers for interfaces, so that an interface reference is instead a tuple: {object identifier, local identifier} This has been introduced for various reasons: - an object can have several client interfaces with the same signature, but used for different purposes (and hence that may be bound to different server objects), so we need to distinguish them with local identifiers (i.e. names that are unambiguous in the context of that object), - in order to unify interface and binding management (and also to simplify the ADL), server interfaces also have local identifiers, and all interfaces (both client and server) have an identifier in a single naming domain specific to the object they belong to. Now, let's look at Erlang. Interactions are announcements (Erlang message transmissions). All messages are received by a process in a single message queue, and all messages are accepted. Therefore, I interpret this as: an Erlang process has a single server interface, materialized by its input message queue. That interface has a very simple signature: it contains one single annoucement signature, that could be specified as: acceptMessage(Term). All Erlang processes have a single server interface with that same interface signature. Since there is a single server interface, there is no need to give it an identifier, and it is unambiguously identified by the process identifier. And since there is only one announcement signature defined in every interface signature, there is no need to pass its identifier (be it "acceptMessage" or anything else...). However, since an object / process may have several client interfaces, it is necessary to distinguish them with identifiers in naming domains specific to every process. Cf. the calls I defined for Dependency Injection in my mail. > In this way you could implement interface specification and > contract checking in erlang modules, which could be more > dynamic compared to a static interface. The nice thing is that > you will get a specification for your client (and for > implementing your server). If for you "contract checking" equals Meyer's "Design by Contract(TM)", then I think that is wrong in the context of Erlang. What is a contract? Cf. RM-ODP part 2, clause 11.2.1: "An agreement governing part of the collective behaviour of a set of objects. A contract specifies obligations, permissions and prohibitions for the objects involved." Notably, a binding is one kind of contractual context (i.e. "the knowledge that a particular contract is in place, and thus that a particular behaviour of a set of objects is required", cf. clauses 13.2.3, 13.4.2) that constrains the behaviour of the bound objects. What is a behaviour? Cf. clause 8.6: "A collection of actions with a set of constraints on when they may occur." In Erlang, a behaviour is then a collection of message transmissions. Therefore, all what you want is simply to restrict the possible message transmissions between Erlang processes, and to check at runtime that such a restriction is respected. You don't need to introduce interface types (i.e. signatures) to do that, unlike in Fractal or ErlCOM, and you don't need to introduce server interface names, etc. Let's keep it simple, stupid. In the engineering viewpoint, this kind of checking is the role of interceptors, in bindings (cf. RM-ODP part 3, clause 8.2.1.4). You can do that already with the simple API I proposed: an interceptor is simply a filter. -module(myinterceptor). init(Args) -> {ok, []}. handle_call({getdep, Key}, From, State) -> Deps = State#state.deps, {reply, dict:find(Key, Deps), State}; handle_call({setdep, Key, Pid}, From, State) -> Deps = State#state.deps, NewDeps = dict:store(Key, Pid, Deps), NewState = State#state{deps = NewDeps}, {reply, ok, NewState}. handle_cast(RequestToCheck, State) -> case check(RequestToCheck, State) of {ok, NewState} -> Deps = State#state.deps, {ok, InterceptedName} = dict:find('intercepted', Deps), gen_server:cast(InterceptedName, RequestToCheck), {noreply, NewState}; {nok, NewState} -> %% log that {noreply, NewState}; Else -> Else end. check(RequestToCheck, State) -> %% anything you want here... Instead of directly binding a client process to a server process, just bind the interceptor in between: gen_server:call(Client, {setdep, service, Interceptor}), gen_server:call(Interceptor, {setdep, intercepted, Server}), Need anything else? :-) > I think Fractal has yet another level, differing interface > names and interface types, meaning that you should maybe bind > your interface name to another module name. I explained above the reasons why and when we need interface names. In addition, I think that it makes ADL specifications easier to read and write... > This could be > quite interesting, the Erlang Corba idl compiler for instance > generates interface modules with methods for idl specified > metods like: > > ping(OE_THIS, NeededArguments) -> > corba:call(OE_THIS, ping, [NeededArguments], ?MODULE). And then, what would be the interface and interrogation signatures corresponding to: - client side: Pid ! "hello". - server side: receive Msg -> io:format("~s~n", [Msg]). Introducing interface signatures and interaction signatures does not fit Erlang, and introduce unnecessary arbitrary restrictions that would make reuse of existing Erlang programs very hard. > > For instance, I don't like ErlCOM, which imposes a lot of > > non-functional code in modules (altough the concepts are the > > same as in Fractal, both being rooted in RM-ODP): > > http://www.ist-runes.org/docs/publications/EUC05.pdf > > I think a lot of the non-functional code could be hidden if it > was implemented as its own behaviour. Not sure. Main part of the code are callbacks that return the definitions of the functional interfaces specific to the component. That cannot be put in a generic behaviour. > > It tries to translate implementation solutions that make > > sense in object-oriented, statically typed languages, into > > Erlang/OTP. > > One problem with ErlCOM, if I understood it right, was that > you could not have a many clients - one server relationship? No, I doesn't have such a limitation. > Interfaces are good from a specification point of perspective, > implementing them as Erlang modules would give a better > flexibility than static interfaces and add dynamics (like > contract checking possibilites). It is not interfaces that are important, but interactions (i.e. in Erlang, sent messages). Contracts are about interactions. Interface signatures such as Java interfaces (and optionally Design by Contract(TM)'s pre- and post-conditions) are only one form of specification one can agree upon. > But I agree that this should > be a possibility, and not imposed. The example that you give > below could be handled in an Erlang interface module if the > State (or at least the attribute #state.acceptssayhello) is > exposed in the interface. That is one big problem with Design by Contract(TM): if you want interesting behaviour specifications, you end up disclosing all the internal state of objects, hence you break encapsulation. See papers on JML (Java Modelling Language) for a discussion about that problem, and possible solutions. But again, DbC is not the only way to specify and check things that can be agreed upon about behaviours. It is only one of the most well-known. Sometimes, writing control code is better. That is one of Fractal's mottos: "programmable control". Why invent a specification language, when you can already specify control things in your favorite programming language (cf. above the myinterceptor implementation). It is just as concise and powerful as formal specification languages. And Erlang has pattern matching, etc. that make it very usable to implement behaviour checking. > One problem with a gen_server is that it will kill your client > if you do not get a response within the Timeout time, 5 > seconds default I think. This is not acceptable if you bind > many components together expecting them to last for a long > time. I think it could be a good idea to consider a fractal > component behaviour, gen_fc ?, overriding the gen_server > behaviour, making life, or at least the development, easier > for developers. I'm not sure if this is necessary, but why not? I also agree that we don't necessarily need gen_server to implement Dependency Injection. My proposal was one example of implementation. -- Romain LENGLET From valentin@REDACTED Mon Feb 27 07:27:34 2006 From: valentin@REDACTED (Valentin Micic) Date: Mon, 27 Feb 2006 08:27:34 +0200 Subject: Erlang & Hyperthreading References: <200602270331.k1R3V4la232315@atlas.otago.ac.nz> Message-ID: <012501c63b66$e60a5e60$7309fea9@MONEYMAKER2> We've been briefly evaluating SUN Niagara -- single 8-core CPU. Initiall results were great -- we were not able to make this machine busy; however, it seems that we did experience some problems with TCP/IP. Well not sure why, it could be because we never build Erlang on Solaris 10, rather, we've just moved it accross... we are going to carry on with this evaluation at the later stage. We're still using R9, which doesn't seem to be compiling on Solaris 10 -- I haven't tried it myself, but been told that some headers are missing from Solaris 10. It seems that the best thing to do would be to move everything to R10, but there aren't enough hours in a day. Valentin. PS As far as Linux is concerned, depending on distribution, we had different experiences/frustrations. What is defeating about Linux is that one has to be a product manager in order to figure out what patches to install where and when, as far as RedHat is concerned. OTOH, we got much better results once we've moved to version 4, including much better CPU scheduling. In addition, we had lots of issues with various storage arrays (EMC, HP Eva & HP XP12000) -- once system gets busy in terms of disk I/O, we saw a lots of D's (D being an unconditional process suspension due to resource unavailability). Once we increased number of threads, as per Ulf's comment to some posting on the list, our performance increased dramatically. We still saw D's, but because drivers were serviced by different threads, we did not see main thread blocking. Come think of it, I've never thanked Ulf... Hey, Ulf -- thanks a lot. ----- Original Message ----- From: "Richard A. O'Keefe" To: Sent: Monday, February 27, 2006 5:31 AM Subject: Re: Erlang & Hyperthreading > "Ryan Rawson" wrote: > You could expect up to 8 CPUs on commodity Intel hardware as well. > Generally hyperthreaded CPUs show up as multiple CPUs on Linux - > but be warned, I heard of performance improvements by turning off HT. > > Well, this is Solaris 10, not Linux, and it's UltraSPARC (presumably > Ultra III), not Intel. Perhaps someone else may have more accurate > information; I think it's effectively 8 x (4-way hyperthreaded) CPUs, > not 1 x (8-way hyperthreaded). In any case, different horse from > different > stable, so maybe the results will be different. Maybe _this_ horse will > learn to sing? From gronvald@REDACTED Sun Feb 26 11:01:28 2006 From: gronvald@REDACTED (Soren Gronvald) Date: Sun, 26 Feb 2006 02:01:28 -0800 (PST) Subject: bug in http:request ? Message-ID: <20060226100128.90786.qmail@web32506.mail.mud.yahoo.com> hi, I have a problem with http:request that I think could be a bug (but of course it could be due to ignorance on my part). I am trying to read a url from yahoo.com in the simplest possible way - and it fails with the error {error,session_remotly_closed} This of course indicates that it is the server that causes trouble, but I can read the same url with other technologies (java and visual basic) with no hassle at all. And I can read similar but shorter urls from yahaoo.com with erlang http:request without problems. this url can be read successfully: U1 = "http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM&f=sl1d1t1c1baphgvn&e=.csv". and this fails. U2 = "http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl1d1t1c1baphgvn&e=.csv". both should return a comma separated list of stock exchange quotes from yahoo.com. As I can read the same url with other technologies it makes me think that there is a bug in the http client module. Or, could it be that I need some HTTPOptins/Options to make it work? I am using erlang R10B-9 on Windows XP SP2 professional edition with all updates applied. I have downloaded the precompiled version from erlang.org. Best regards Gronvald I have included program examples below this erlang program shows the problem % this works testurl(1) -> U = "http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM&f=sl1d1t1c1baphgvn&e=.csv", geturl(U); % this exits testurl(2) -> U = "http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl1d1t1c1baphgvn&e=.csv", geturl(U). geturl(Url) -> application:start(inets), X = http:request(Url), case X of {ok, { {_Version, 200, _ReasonPhrase}, _Headers, Body} } -> Body; _ -> X end. this java program will handle same situation without error import java.net.*; import java.io.*; public class Geturl { public static void main(String[] args) throws Exception { String u2 = "http://finance.yahoo.com/d/quotes.csv?s=IBM,GE,GM,F,PKD,GW&f=sl1d1t1c1baphgvn&e=.csv"; URL url = new URL(u2); InputStream is = new BufferedInputStream(url.openStream()); Reader r = new InputStreamReader(is); int c = r.read(); while(c != -1) { System.out.print((char)c); c = r.read(); } } } __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From seb@REDACTED Sun Feb 26 01:20:00 2006 From: seb@REDACTED (Sebastian Strollo) Date: 26 Feb 2006 01:20:00 +0100 Subject: config.guess in lib/erl_interface/src/auxdir is... Message-ID: <873bi7vumn.fsf@plato.strollo.org> ...outdated. Which makes it call my shiny new iMac (oooh, it is such a beautiful machine:-) an i386-apple-darwin8.5.1, instead of an i686-apple-darwin8.5.1 (which is what ers/autoconf/config.guess calls it) leading to build problems... Fix: make sure config.guess in erts/autoconf and lib/erl_interface are updated(*) and that they both are the same version. Cheers, /Sebastian (*) http://cvs.savannah.gnu.org/viewcvs/*checkout*/config/config/config.guess From mikael.karlsson@REDACTED Mon Feb 27 09:17:16 2006 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Mon, 27 Feb 2006 09:17:16 +0100 Subject: Deployment ( digression from: Longstanding issues: ...) In-Reply-To: References: Message-ID: <200602270917.17325.mikael.karlsson@creado.com> Ulf Wiger (AL/EAB) wrote: > > Can I, for all nodes in one go: > > 1. Make a relase package with one new application app1-vsn11 > > that goes into $ERL_BASE/lib 2. Make a release upgrade, > > upgrading to app1-vsn12 and add a new app2-vsn21 3. Make a > > release upgrade, adding app3-vsn31 and keep the old ones as is. > > 4. Make a release upgrade removing app2-vsn21, keeping > > everything else. > > > > And 1-4 without having to deal with all OTP application versions. > > I'm not sure what kind of upgrade you envision that does > not deal with the application versions. Or do you mean > that you don't want to mess with putting in versions in > all the different text files needed for systools? > If so, that can be done ('builder' was supposed to do that > too, but doesn't yet...) What builder does do is allow you > either specify exactly which version of a particular app > that you want to use, or have 'builder' simply select the > most recent one. I meant the last alternative. Thanks. With one quirk. The own apps (app1, app2 and app3) should be developed independently and at development time you do not know which of them, could be 1, or all, or others, that will be deployed, upgraded or removed on target system. They should basically be independent of each other. Mikael From ulf.wiger@REDACTED Mon Feb 27 09:50:08 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 27 Feb 2006 09:50:08 +0100 Subject: rfc: rdbms - new type system Message-ID: Romain Lenglet wrote: > > I am wondering if ASN.1 could be used here. > If one is looking for a flexible abstract syntax notation > that allows to specify constraints, then ASN.1 seems to be > the canonical choice. ... but I'm not sure how many people know ASN.1. Most people using mnesia/rdbms would probably want to describe native erlang terms, whereas ASN.1 is primarily an encoding specification. Another possibility would be to reuse the match specification syntax, a la ets:match_spec_run([Object], Pattern). If the result is [], a type violation is raised. The downside would be that enums and list types would be much more difficult (list types, near impossible) to specify. Also, match specs are notoriously difficult to write. > OTP's asn1 application already provides a parser for the > abstract syntax, and defines a canonical mapping into Erlang terms: > http://www.erlang.org/doc/doc-5.4.12/lib/asn1-1.4.4.9/doc/html > /asn1_ug.html#1.5 > > Aren't you re-inventing ASN.1? ;-) Well, isn't everyone? (: /Uffe From ulf.wiger@REDACTED Mon Feb 27 09:53:19 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 27 Feb 2006 09:53:19 +0100 Subject: Erlang & Hyperthreading Message-ID: Ryan Rawson wrote: > > It would be awesome to get technical preview of multiCPU > aware/capable Erlang. Or perhaps access to the CVS tip that > contains it. http://www.erlang.org/download/snapshots/otp_src_smp_P11B_2006-02-26.tar .gz /Ulf W From klacke@REDACTED Mon Feb 27 10:02:00 2006 From: klacke@REDACTED (Claes Wikstrom) Date: Mon, 27 Feb 2006 10:02:00 +0100 Subject: bug in http:request ? In-Reply-To: <20060226100128.90786.qmail@web32506.mail.mud.yahoo.com> References: <20060226100128.90786.qmail@web32506.mail.mud.yahoo.com> Message-ID: <4402C008.60305@hyber.org> Soren Gronvald wrote: > hi, > > I have a problem with http:request that I think could > be a bug (but of course it could be due to ignorance > on my part). > Try to use the http client "ibrowse" from jungerl instead. The http module in inets is weird. In my opinion it should be removed from OTP. /klacke From erlang@REDACTED Mon Feb 27 10:59:19 2006 From: erlang@REDACTED (Peter Lund) Date: Mon, 27 Feb 2006 10:59:19 +0100 Subject: optimization of list comprehensions In-Reply-To: References: Message-ID: <4402CD77.2040102@lundata.se> I confess also I like to use list comprehensions instead of the uglier lists:foreach. To make it clear that you are not at all interested of the return value, I propose that people do it this way: _ = [f(X) || X<-List], _ = [g(X) || X<-List2], Clearer than this it hardly can get... /Peter Ulf Wiger (AL/EAB) wrote: >I've seen many examples of how people use >list comprehensions as a form of beautified >lists:foreach() - that is, they don't care >about the return value of the comprehension. > >I hesitate to say that it's bad practice, >even though one will build a potentially >large list unnecessarily, since it's >actually looks a lot nicer than using >lists:foreach(). > >Question: would it be in some way hideous >to introduce an optimization where such >list comprehensions do everything except >actually build the list? Then they could >execute in constant space. > >/Ulf W > > > From ulf.wiger@REDACTED Mon Feb 27 12:35:11 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 27 Feb 2006 12:35:11 +0100 Subject: rfc: rdbms - new type system Message-ID: ke.han wrote: > > I have two basic thoughts on your type syntax: > > 1 - Its too complex/tedious when scanning a large > list of attributes. It would be nice if the most > common constraints have higher level shorthand > notation like I've described. (If it doesn't > effect item 2) you could add these high level > notations as simple interface on your existing > syntax. I've been thinking about a nice syntax for parameterized typedefs, but haven't figured it out yet. > 2 - I am making wild assumptions about how this is > implemented. ;-). I assume that things like.. > > >> {{attr, age, type}, > >> {'and', [{'>=', 0}, > >> {'=<', 150}]}, > >> {'or', undefined}} > > ..get implemented as a collection of funs or applies. No, currently, it's just a bunch of pattern matching. I posted the type checking code in my first message. My code generator selected type checks that could be generated as guards, etc. Currently, I don't do that. I do have a simplification step, where I try to reduce the types. It is very naive at the moment. But Erlang's pattern matching is very efficient. > As to the coercedFloat, I did not realize that > modifying a value on write would slow things down > much. I honestly haven't measured the difference. > However, if my app code has to check everywhere > when I retrieve this value, I'm going to slow things > down anyway. So, then the question becomes how common this scenario is. (: > as to... > > >> {{attr, age, > >> [{integer, {interval, 0, 150}, > >> undefined]} > > > > Using [T1 .. Tn] as shorthand for > > {'or',[T1..Tn]}? > > yes, I think the times you want 'and' operation is when you > commit a record and want to cross check different field > values. In your notation, for example: > > {{attr, person, record} > {'and', {#person.firstName:length(), '<' ,255}}, > {'and', {#person.age, '<', 150}}} I'm toying with the idea of allowing a match specification as a table-level 'type' specification: Ms = [{{1,2,'$1'}, [{is_integer,'$1'}], [{{1,2,{float,'$1'}}}]}]. [{{1,2,'$1'},[{is_integer,'$1'}],[{{1,2,{float,'$1'}}}]}] 10> ets:match_spec_run([{1,2,3}],ets:match_spec_compile(Ms)). [{1,2,3.00000}] It sure is ugly, but it's there, and it's fast. It is also able to do the type coercion you're asking for. > > I know the above is not correct, but thats the idea... > > so yes, if you are doing a single value check (not checking > multiple values in a record) then I implied "or" in a list of > constraints is most welcome. > > {{attr, age, > [{integer, {inclusive, 0, 100}}, > undefined]} > > > Also, why the 'type' atom? isn't it implied we are > defining types? No, {type, T} is a reference to a user-defined type. You can specify your own types either local to a table (which means you can refer to it in the type specifications of any attribute in that table), or globally, as a 'schema' table property. Any attribute type can refer to a globally defined type. Locally defined types shadow the global ones. > > I'm also confused about the difference between type and > typedef. Why not just have a type and types can > reuse/inherit other types? What added value is there to > differentiate? The idea of using the {type, T} wrapper was clarity. Shorthand notation is nice, but it can also lead to confusion, and make it easier to make mistakes, I think. I'd welcome more opinions on this. I want to be able to find a good balance between strictness, expressiveness and simplicity. /Ulf W From mats.cronqvist@REDACTED Mon Feb 27 13:35:32 2006 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Mon, 27 Feb 2006 13:35:32 +0100 Subject: optimization of list comprehensions In-Reply-To: References: Message-ID: <4402F214.1040007@ericsson.com> Ulf Wiger (AL/EAB) wrote: > > Samuel Rivas wrote: > >>Ulf Wiger (AL/EAB) wrote: >> >> >>>I hesitate to say that it's bad practice, even >>>though one will build a potentially large list >>>unnecessarily, since it's actually looks a lot >>>nicer than using lists:foreach(). >> >> Why? List comprehension is a tool to construct lists, >>lists:foreach has different semantics. > > [...] > > 42 characters vs. 73, or seen another way: > 7 characters of overhead vs 38. > > I don't fault programmers for choosing the > construct that's both easiest to write and > read, even if it means building a list unnecessarily. i too see lots of use of list comprehensions where lists:foreach/2 would be more appropriate. i suspect the reason is twofold; lots of people are scared of funs, and to most people (including me) a list comprehension is clearer. perhaps something like this could be introduced; (whatever(L) || L <- List) the value of which would be 'ok' (just like lists:foreach). mats From mats.cronqvist@REDACTED Mon Feb 27 13:50:15 2006 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Mon, 27 Feb 2006 13:50:15 +0100 Subject: flatmap Message-ID: <4402F587.6060508@ericsson.com> happended upon the description of lists:flatmap/2 (that i've never used), and was a bit mystified by the append/1 function used in the description. could it be that it should say flatten/1 ? mats flatmap(Function, List1) -> Element Types: Function = fun(A) -> B List1 = [A] Element = [B] flatmap behaves as if it had been defined as follows: flatmap(Func, List) -> append(map(Func, List)) From erik.reitsma@REDACTED Mon Feb 27 13:54:27 2006 From: erik.reitsma@REDACTED (Erik Reitsma (RY/ETM)) Date: Mon, 27 Feb 2006 13:54:27 +0100 Subject: How to check if a TCP socket is closed Message-ID: <110BA8ACEE682C479D0B008B6BE4AEB10C15ED@esealmw107.eemea.ericsson.se> Hi all, I have a TCP socket that is opened with {active, false}. Then I enter a receive clause (in a loop) in which I do not want to read from the socket, but I want to be informed when the socket is closed by the peer. I have not found a solution other than the following. loop(Socket) -> receive something -> do_something() after 2000 -> %% read from the socket to see if we can, timeout=0 case catch gen_tcp:recv(Socket, 0, 0) of {error, timeout} -> %% this is normal: no data loop(Socket); {error, Reason} -> %% something wrong with the socket, we're done done; {'EXIT', Reason} -> %% something worse with the socket, report it {error, Reason}; {ok, Data} -> %% got some data, store it for when we really need it (in some gen_tcp:recv/2) catch gen_tcp:unrecv(Args#arg.clisock, Data), loop(Socket) end end. I was looking for a way to check if a socket is closed without reading from it, and a way to make a socket 'active' only for non-data messages. Any suggestions? I actually want to do this in a page in Yaws, so I do not have much freedom to make the socket 'active'. *Erik. -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.virding@REDACTED Mon Feb 27 14:17:32 2006 From: robert.virding@REDACTED (Robert Virding) Date: Mon, 27 Feb 2006 14:17:32 +0100 Subject: flatmap In-Reply-To: <4402F587.6060508@ericsson.com> References: <4402F587.6060508@ericsson.com> Message-ID: <4402FBEC.2000504@telia.com> No, it should say append! Flatten/1 works recursively to completely flatten an term while append/1 only does it at the top level. Flatmap/2 should only flatten the top level, each call to Function returns a list of elements and flatmap doesn't return a list of lists, just a list of elements. If that makes sense? :-) So while map(F,L) -> [[1,2,3],[4,5,6],[7,8,9]] then flatmap(F,L) -> [1,2,3,4,5,6,7,8,9] If I remember correctly. The types don't really say much though, perhaps they should be: Function = fun (A) -> [B] List1 = [A] Element = [B] /Robert Mats Cronqvist skrev: > happended upon the description of lists:flatmap/2 (that i've never > used), and was a bit mystified by the append/1 function used in the > description. could it be that it should say flatten/1 ? > > mats > > flatmap(Function, List1) -> Element > Types: > Function = fun(A) -> B > List1 = [A] > Element = [B] > > flatmap behaves as if it had been defined as follows: > > flatmap(Func, List) -> > append(map(Func, List)) > From thomas@REDACTED Mon Feb 27 14:38:49 2006 From: thomas@REDACTED (Thomas Johnsson) Date: Mon, 27 Feb 2006 14:38:49 +0100 Subject: flatmap In-Reply-To: <4402F587.6060508@ericsson.com> References: <4402F587.6060508@ericsson.com> Message-ID: <440300E9.8050004@skri.net> The description seems correct except for the type of Function, which should be: Function = fun(A) -> [ B ] . from lists.erl: append([E]) -> E; append([H|T]) -> H ++ append(T); append([]) -> []. .... flatmap(F, [Hd|Tail]) -> F(Hd) ++ flatmap(F, Tail); flatmap(_, []) -> []. -- Thomas Mats Cronqvist wrote: > happended upon the description of lists:flatmap/2 (that i've never > used), and was a bit mystified by the append/1 function used in the > description. could it be that it should say flatten/1 ? > > mats > > flatmap(Function, List1) -> Element > Types: > Function = fun(A) -> B > List1 = [A] > Element = [B] > > flatmap behaves as if it had been defined as follows: > > flatmap(Func, List) -> > append(map(Func, List)) > From ernie.makris@REDACTED Mon Feb 27 15:05:31 2006 From: ernie.makris@REDACTED (Ernie Makris) Date: Mon, 27 Feb 2006 09:05:31 -0500 Subject: Erlang & Hyperthreading In-Reply-To: <012501c63b66$e60a5e60$7309fea9@MONEYMAKER2> References: <200602270331.k1R3V4la232315@atlas.otago.ac.nz> <012501c63b66$e60a5e60$7309fea9@MONEYMAKER2> Message-ID: <4403072B.1080209@comcast.net> If you want to try out the new smp version snapshot of R11B, surf to: http://www.erlang.org/download/snapshots/ Valentin Micic wrote: > We've been briefly evaluating SUN Niagara -- single 8-core CPU. > Initiall results were great -- we were not able to make this machine > busy; however, it seems that we did experience some problems with > TCP/IP. Well not sure why, it could be because we never build Erlang > on Solaris 10, rather, we've just moved it accross... we are going to > carry on with this evaluation at the later stage. > > We're still using R9, which doesn't seem to be compiling on Solaris 10 > -- I haven't tried it myself, but been told that some headers are > missing from Solaris 10. It seems that the best thing to do would be > to move everything to R10, but there aren't enough hours in a day. > > Valentin. > > PS > As far as Linux is concerned, depending on distribution, we had > different experiences/frustrations. What is defeating about Linux is > that one has to be a product manager in order to figure out what > patches to install where and when, as far as RedHat is concerned. > OTOH, we got much better results once we've moved to version 4, > including much better CPU scheduling. In addition, we had lots of > issues with various storage arrays (EMC, HP Eva & HP XP12000) -- once > system gets busy in terms of disk I/O, we saw a lots of D's (D being > an unconditional process suspension due to resource unavailability). > Once we increased number of threads, as per Ulf's comment to some > posting on the list, our performance increased dramatically. We still > saw D's, but because drivers were serviced by different threads, we > did not see main thread blocking. Come think of it, I've never thanked > Ulf... Hey, Ulf -- thanks a lot. > > > > ----- Original Message ----- From: "Richard A. O'Keefe" > > To: > Sent: Monday, February 27, 2006 5:31 AM > Subject: Re: Erlang & Hyperthreading > > >> "Ryan Rawson" wrote: >> You could expect up to 8 CPUs on commodity Intel hardware as well. >> Generally hyperthreaded CPUs show up as multiple CPUs on Linux - >> but be warned, I heard of performance improvements by turning off HT. >> >> Well, this is Solaris 10, not Linux, and it's UltraSPARC (presumably >> Ultra III), not Intel. Perhaps someone else may have more accurate >> information; I think it's effectively 8 x (4-way hyperthreaded) CPUs, >> not 1 x (8-way hyperthreaded). In any case, different horse from >> different >> stable, so maybe the results will be different. Maybe _this_ horse will >> learn to sing? > > From mats.cronqvist@REDACTED Mon Feb 27 15:07:18 2006 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Mon, 27 Feb 2006 15:07:18 +0100 Subject: flatmap In-Reply-To: <4402FBEC.2000504@telia.com> References: <4402F587.6060508@ericsson.com> <4402FBEC.2000504@telia.com> Message-ID: <44030796.6030406@ericsson.com> Robert Virding wrote: > No, it should say append! Flatten/1 works recursively to completely > flatten an term while append/1 only does it at the top level. ouch. i just took for granted that append/1 was a typo, since clearly :> something called 'append' must take two arguments... my bad. > The types don't really say much though, perhaps they should be: > > Function = fun (A) -> [B] > List1 = [A] > Element = list() yeah, and Element isn't such a great name for a list either. mats From bjorn@REDACTED Mon Feb 27 16:39:14 2006 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 27 Feb 2006 16:39:14 +0100 Subject: Erlang & Hyperthreading In-Reply-To: References: Message-ID: We have named our snapshots badly. There is not much difference between the P11B snapshots with "smp" in their name and the ones without "smp". All P11B snapshots include the SMP support. At times, the "smp" snapshot might be slightly more bleeding edge. To avoid confusion, we will soon remove the snapshots named "smp". The important thing is how you build. Run configure like this: ./configure --enable-smp-support --disable-lock-checking (add any other flags you normally use; build as usual) Don't expect huge performance gains, or any performance gains at all for that matter. Almost all of our work so far has been focused on stability. /Bjorn "Ulf Wiger \(AL/EAB\)" writes: > > Ryan Rawson wrote: > > > > It would be awesome to get technical preview of multiCPU > > aware/capable Erlang. Or perhaps access to the CVS tip that > > contains it. > > http://www.erlang.org/download/snapshots/otp_src_smp_P11B_2006-02-26.tar > .gz > > /Ulf W > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From ulf.wiger@REDACTED Mon Feb 27 16:54:16 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 27 Feb 2006 16:54:16 +0100 Subject: interplanetary internet research Message-ID: I noticed the following in a news item on CNet about Vint Cerf going to work for Google: "He is also working on a new set of communication protocols meant to be used in deep space for NASA's Jet Propulsion Laboratory aimed at creating an Internet communications connection between planets." That would be http://www.dtnrg.org/wiki, or "Delay Tolerant Networking Research Group" Now wouldn't it be appropriate to help the Interplanetary Internet Research Group create a really good research platform, where the planets could be simulated by erlang nodes? /Uffe (: From ulf.wiger@REDACTED Mon Feb 27 18:05:53 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Mon, 27 Feb 2006 18:05:53 +0100 Subject: rfc: rdbms - new type system Message-ID: Ulf Wiger wrote: > I'm toying with the idea of allowing a match specification > as a table-level 'type' specification: > Ms = [{{1,2,'$1'}, [{is_integer,'$1'}], [{{1,2,{float,'$1'}}}]}]. > [{{1,2,'$1'},[{is_integer,'$1'}],[{{1,2,{float,'$1'}}}]}] > 10> ets:match_spec_run([{1,2,3}],ets:match_spec_compile(Ms)). > [{1,2,3.00000}] > It sure is ugly, but it's there, and it's fast. It > is also able to do the type coercion you're asking for. Ok, I added this to rdbms. It gives you your float coercion: rdbms_write_filter(Config) when is_list(Config) -> ?line {atomic, ok} = rdbms:create_table( rdbms_w_filter, [{attributes, [key, value]}, {rdbms, [{write_filter, [{{rdbms_w_filter,'$1','$2'}, [], [{{rdbms_w_filter,'$1',{float,'$2'}}}]}]}, {{attr,value,type}, float} ]} ]), ?line {atomic, ok} = rdbms:create_table( rdbms_no_w_filter, [{attributes, [key, value]}, {rdbms, [ {{attr,value,type}, float} ]} ]), ?line trans(fun() -> mnesia:write({rdbms_w_filter, 17, 1}) end), ?line trans(fun() -> mnesia:write({rdbms_w_filter, 17, 1.0}) end), ?line fail_trans(fun() -> mnesia:write({rdbms_no_w_filter, 17, 1}) end), ?line trans(fun() -> mnesia:write({rdbms_no_w_filter, 17, 1.0}) end). (The type check on #rdbms_no_w_filter{value = 1} fails since it's not a float, and there is no filter.) Any type specifications are run on the output from the write_filter. If it doesn't produce a valid record, the transaction is aborted. There is also a read_filter, but I haven't added code for that yet. There is no overhead if the filters aren't used (the code generator doesn't lay out code if the filters are undefined). Applying the actual filter seems to take a few tens of microseconds. I have to compile the match spec each time. I don't think it can be avoided. /Uffe From mikael.karlsson@REDACTED Mon Feb 27 21:48:22 2006 From: mikael.karlsson@REDACTED (Mikael Karlsson) Date: Mon, 27 Feb 2006 21:48:22 +0100 Subject: Dependency injection in Erlang (Disgression from: Longstanding issues: structs & standalone Erlang) In-Reply-To: <200602271303.34997.rlenglet@users.forge.objectweb.org> References: <200602251747.23615.mikael.karlsson@creado.com> <200602271303.34997.rlenglet@users.forge.objectweb.org> Message-ID: <200602272148.22728.mikael.karlsson@creado.com> Romain LENGLET wrote: > ... > > I think that you and I went too fast. > Let's not try not to transpose as-is conceptual models and APIs > such as Fractal's, that were designed for object-oriented > programming languages. And let's use precise and standard terms. Thanks for the terminology intro. .. > > If for you "contract checking" equals Meyer's "Design by > Contract(TM)", then I think that is wrong in the context of > Erlang. [terminology stuff cut] I had that in mind, but maybe more from the practical point of checking things at runtime. UBF contracts are another example. > Therefore, all what you want is simply to restrict the possible > message transmissions between Erlang processes, and to check at > runtime that such a restriction is respected. Yes, that is all I want. > You don't need to introduce interface types (i.e. signatures) to > do that, unlike in Fractal or ErlCOM, and you don't need to > introduce server interface names, etc. Let's keep it simple, > stupid. OK. > In the engineering viewpoint, this kind of checking is the role > of interceptors, in bindings (cf. RM-ODP part 3, clause > 8.2.1.4). You can do that already with the simple API I > proposed: an interceptor is simply a filter. .. Nice example. > Instead of directly binding a client process to a server process, > just bind the interceptor in between: > gen_server:call(Client, {setdep, service, Interceptor}), > gen_server:call(Interceptor, {setdep, intercepted, Server}), > > Need anything else? :-) Not really. :-) But I want to be able to do it the other way too, even if it is more restrictive. I do recognize that a framework should not impose my style on others. If a dependency injection framework is limited to what you suggest (setdep/getdep) that would be possible. .. > > This could be > > quite interesting, the Erlang Corba idl compiler for instance > > generates interface modules with methods for idl specified > > metods like: > > > > ping(OE_THIS, NeededArguments) -> > > corba:call(OE_THIS, ping, [NeededArguments], ?MODULE). > > And then, what would be the interface and interrogation > signatures corresponding to: > - client side: Pid ! "hello". > - server side: receive Msg -> io:format("~s~n", [Msg]). There would not be any for this. I would not send an untagged message in my application, but be more restrictive. messy_interface:msg(PiD, "hello"). module messy_interface: mgs(Ref, Message) -> gen_server:cast(Ref,{messy_interface,msg, Message) But again this should be left out of any dependency injection framework. > Introducing interface signatures and interaction signatures does > not fit Erlang, and introduce unnecessary arbitrary restrictions > that would make reuse of existing Erlang programs very hard. Yes, but if I write new programs that are restricted to OTP behaviours I might come out OK. .. > > One problem with ErlCOM, if I understood it right, was that > > you could not have a many clients - one server relationship? > > No, I doesn't have such a limitation. OK, maybe I should be more specific, I thought you only could bind one ErlCOM interface to one ErlCOM receptor. If this is not the case I think it is a bit too complicated for me to understand anyway.... ... > That is one big problem with Design by Contract(TM): if you want > interesting behaviour specifications, you end up disclosing all > the internal state of objects, hence you break encapsulation. > See papers on JML (Java Modelling Language) for a discussion > about that problem, and possible solutions. > But again, DbC is not the only way to specify and check things > that can be agreed upon about behaviours. It is only one of the > most well-known. > > Sometimes, writing control code is better. That is one of > Fractal's mottos: "programmable control". Why invent a > specification language, when you can already specify control > things in your favorite programming language (cf. above the > myinterceptor implementation). > It is just as concise and powerful as formal specification > languages. And Erlang has pattern matching, etc. that make it > very usable to implement behaviour checking. Oh yes, and as designers we still can have the freedom of choosing to implement it in an interceptor process or in a module. > > One problem with a gen_server is that it will kill your client > > if you do not get a response within the Timeout time, 5 > > seconds default I think. This is not acceptable if you bind > > many components together expecting them to last for a long > > time. I think it could be a good idea to consider a fractal > > component behaviour, gen_fc ?, overriding the gen_server > > behaviour, making life, or at least the development, easier > > for developers. > > I'm not sure if this is necessary, but why not? OK, I think this should be done only if necessary, which I ( too ) am not so sure of anymore. > I also agree that we don't necessarily need gen_server to > implement Dependency Injection. My proposal was one example of > implementation. True. Actually if one was to implement a general dependency injection framework that would do all the "wiring" stuff, the binding operations would have to be in Erlang messages and not in gen_server calls in order not to leave out ordinary erlang processes or any other process types. In the gen_server, the dependency injection operations could be captured in the handle_info section anyway. Regards Mikael From eduardo@REDACTED Mon Feb 27 23:16:15 2006 From: eduardo@REDACTED (Eduardo Figoli (INS)) Date: Mon, 27 Feb 2006 20:16:15 -0200 Subject: PIDs an priority Message-ID: <012201c63beb$8db328c0$4a00a8c0@Inswitch251> I have a process that waits for messages and immediately (ala Erlang) spawn new processes. These new processes do some logic (accessing mnesia) and sometimes taking minutes. I have seen that ERTS makes priority to spawning processes rather than processing the ones already spawned. How does this works in ERTS? thanks Prepaid Expertise - Programmable Switches Powered by Ericsson Licensed Technology Eng. Eduardo Figoli - Development Center - IN Switch Solutions Inc. Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260 Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457 e-mail: eduardo@REDACTED -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 1429 bytes Desc: not available URL: From ulf@REDACTED Tue Feb 28 00:50:36 2006 From: ulf@REDACTED (Ulf Wiger) Date: Tue, 28 Feb 2006 00:50:36 +0100 Subject: PIDs an priority In-Reply-To: <012201c63beb$8db328c0$4a00a8c0@Inswitch251> References: <012201c63beb$8db328c0$4a00a8c0@Inswitch251> Message-ID: Den 2006-02-27 23:16:15 skrev Eduardo Figoli (INS) : > I have seen that ERTS makes priority to spawning processes rather than > processing the ones already spawned.How does this works in ERTS? Spawn is an asynchronous operation. The spawned process will be put in the scheduler queue while the spawning process continues. If you wanted to make the spawned process enter as quickly as possible, you could do something like this: start_child() -> Pid = spawn_opt( fun() -> ... end, [{priority, high}, link]), erlang:yield(), Pid. -- Ulf Wiger From serge@REDACTED Tue Feb 28 01:17:39 2006 From: serge@REDACTED (Serge Aleynikov) Date: Mon, 27 Feb 2006 19:17:39 -0500 Subject: timer:now_diff/2 documentation inconsistency Message-ID: <440396A3.6040108@hq.idt.net> There seems to be a documentation discrepancy: Here's what the docs says (stdlib/timer): ------------------------------------------------- now_diff(T2, T1) -> {Time, Value} Types: T1 = T2 = {MegaSecs, Secs, MicroSecs} MegaSecs = Secs = MicroSecs = integer() Calculates the time difference T2 - T1 in microseconds, where T1 and T2 probably are timestamp tuples returned from erlang:now/0. ------------------------------------------------- Here's the result type we get in the shell: $ erl Erlang (BEAM) emulator version 5.4.12 [source] [hipe] [threads:0] Eshell V5.4.12 (abort with ^G) 1> now(). {1141,85623,555497} 2> timer:now_diff(now(), v(1)). 12178593 Regards, Serge -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED From ryanobjc@REDACTED Tue Feb 28 01:47:41 2006 From: ryanobjc@REDACTED (Ryan Rawson) Date: Mon, 27 Feb 2006 16:47:41 -0800 Subject: Erlang & Hyperthreading In-Reply-To: References: Message-ID: <78568af10602271647w3241e124lc9b6ac3d0b8effb1@mail.gmail.com> Thanks for that. I missed it - I didn't see any explicit call out for tip/snapshots on the download page. As for performance - surely on a multicpu system with a SMP aware erlang running, one can expect better performance just by using multiple kernel threads and gaining the ability to run on several CPUs? Actual performance on a single cpu, I wouldn't expect any performance benefit. Thanks guys! -ryan On 27 Feb 2006 16:39:14 +0100, Bjorn Gustavsson wrote: > We have named our snapshots badly. > > There is not much difference between the P11B snapshots with "smp" in their > name and the ones without "smp". All P11B snapshots include the SMP support. > At times, the "smp" snapshot might be slightly more bleeding edge. > To avoid confusion, we will soon remove the snapshots named "smp". > > The important thing is how you build. Run configure like this: > > ./configure --enable-smp-support --disable-lock-checking > > (add any other flags you normally use; build as usual) > > Don't expect huge performance gains, or any performance gains at all > for that matter. Almost all of our work so far has been focused on > stability. > > /Bjorn > > "Ulf Wiger \(AL/EAB\)" writes: > > > > > Ryan Rawson wrote: > > > > > > It would be awesome to get technical preview of multiCPU > > > aware/capable Erlang. Or perhaps access to the CVS tip that > > > contains it. > > > > http://www.erlang.org/download/snapshots/otp_src_smp_P11B_2006-02-26.tar > > .gz > > > > /Ulf W > > > > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > From casper2000a@REDACTED Tue Feb 28 04:37:39 2006 From: casper2000a@REDACTED (Eranga Udesh) Date: Tue, 28 Feb 2006 09:37:39 +0600 Subject: Erlang & Hyperthreading In-Reply-To: Message-ID: <20060228033905.9B9B640004D@mail.omnibis.com> Hi, Can I consider as its stable enough, even though a it'll not give a huge performance gain? When will the P11B version be released officially? Cheers, - Eranga -----Original Message----- From: owner-erlang-questions@REDACTED [mailto:owner-erlang-questions@REDACTED] On Behalf Of Bjorn Gustavsson Sent: Monday, February 27, 2006 9:39 PM To: erlang-questions@REDACTED Subject: Re: Erlang & Hyperthreading We have named our snapshots badly. There is not much difference between the P11B snapshots with "smp" in their name and the ones without "smp". All P11B snapshots include the SMP support. At times, the "smp" snapshot might be slightly more bleeding edge. To avoid confusion, we will soon remove the snapshots named "smp". The important thing is how you build. Run configure like this: ./configure --enable-smp-support --disable-lock-checking (add any other flags you normally use; build as usual) Don't expect huge performance gains, or any performance gains at all for that matter. Almost all of our work so far has been focused on stability. /Bjorn "Ulf Wiger \(AL/EAB\)" writes: > > Ryan Rawson wrote: > > > > It would be awesome to get technical preview of multiCPU > > aware/capable Erlang. Or perhaps access to the CVS tip that > > contains it. > > http://www.erlang.org/download/snapshots/otp_src_smp_P11B_2006-02-26.tar > .gz > > /Ulf W > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From fritchie@REDACTED Tue Feb 28 06:14:00 2006 From: fritchie@REDACTED (Scott Lystig Fritchie) Date: Mon, 27 Feb 2006 23:14:00 -0600 Subject: Mnesia, mnesia_frag, and table locks using index_match_object et al. Message-ID: <200602280514.k1S5E0rk039233@snookles.snookles.com> Greetings. I just spent some time experimenting with a Mnesia table like this one: -record(thing, { primary_key, secondary_key, other_attribute_1, other_attribute_2 }). ok = mnesia:start(), {atomic, ok} = mnesia:create_table(thing, [{attributes, record_info(fields, thing)}, {ram_copies, [node()]}, {type, set}]), {atomic, ok} = mnesia:add_table_index(thing, secondary_key). {atomic, ok} = mnesia:change_table_frag(thing, {activate, []}), [{atomic, ok} = mnesia:change_table_frag(thing, {add_frag, [node()]}) || _I <- lists:seq(1, 4)], MatchHead = #thing{secondary_key = bound_atom_value, _ = '_'}, Thing = #thing{primary_key = blah_key, secondary_key = bound_atom_value}, F = fun() -> mnesia:match_object(thing, MatchHead, write), timer:sleep(10*1000), end, mnesia:activity(transaction, F, [], mnesia_frag). If I run this snippet of code, then sneak over onto another shell on the same node and run mnesia:info(), I see this: (foo1@REDACTED)2> mnesia:info(). ---> Processes holding locks <--- Lock: {{thing,'______WHOLETABLE_____'},write,{tid,10,<4491.36.0>}} Lock: {{thing_frag4,'______WHOLETABLE_____'},write,{tid,10,<4491.36.0>}} Lock: {{thing_frag2,'______WHOLETABLE_____'},write,{tid,10,<4491.36.0>}} Lock: {{thing_frag5,'______WHOLETABLE_____'},write,{tid,10,<4491.36.0>}} Lock: {{thing_frag3,'______WHOLETABLE_____'},write,{tid,10,<4491.36.0>}} ---> Processes waiting for locks <--- [...] The mnesia:index_read() function doesn't have an option to specify a write lock. The mnesia:index_match_object() function only support 'read' locking, but it also takes whole table locks. Also, mnesia:select() (using a full "match spec" using a guard list of [] and a result list of ['$_']) and mnesia:match_object() take whole table locks, too. After recovering from shock, I looked at mnesia_frag.erl. Sure enough, mnesia_frag:do_select/5 unconditionally takes a whole table lock.(*) Bummer. The search element in MatchHead is indeed bound. I was expecting that I'd see something like this instead: ---> Processes holding locks <--- Lock: {{thing,bound_atom_value},write,{tid,91994,<0.2828.0>}} Lock: {{thing_frag2,bound_atom_value},write,{tid,91994,<0.2828.0>}} [... one for each table fragment ...] Question: Is it really necessary to take whole table locks in cases like this? For my purpose, I would like to insert a single record into the 'thing' table *and* guarantee that both primary_key and secondary_key are unique. The former is trivial: the table type is 'set'. I was hoping to do the latter by the following (simplifed!) without whole table locks: %% Borrow the bindings for Thing and MatchHead from above [] = mnesia:read({thing, blah_key}), [] = mnesia:match_object(thing, MatchHead, write), ok = mnesia:write(Thing). I don't want to be forced to create a separate Mnesia table based on: -record(secondary_to_primary, { secondary_key, % matches secondary_key in 'thing' table primary_key % matches primary_key in 'thing' table }). ... where I take a write lock on secondary_to_primary's primary key. So ... Am I smoking crack, wishing to do something crazy? -Scott (*) I'm assuming that all the Mnesia functions mentioned above, when used with mnesia_frag, eventually get funnelled into mnesia_frag:do_select/5. From nils.muellner@REDACTED Tue Feb 28 08:44:44 2006 From: nils.muellner@REDACTED (=?ISO-8859-1?Q?Nils_M=FCllner?=) Date: Tue, 28 Feb 2006 08:44:44 +0100 Subject: timer:now_diff/2 documentation inconsistency In-Reply-To: <440396A3.6040108@hq.idt.net> References: <440396A3.6040108@hq.idt.net> Message-ID: <4403FF6C.8030300@heh.uni-oldenburg.de> > > Here's the result type we get in the shell: > > $ erl > Erlang (BEAM) emulator version 5.4.12 [source] [hipe] [threads:0] > > Eshell V5.4.12 (abort with ^G) > 1> now(). > {1141,85623,555497} > 2> timer:now_diff(now(), v(1)). > 12178593 hi, didn't know there was now_diff/2 ;-) i used sth like StartTime = now(), StopTime = breakCipher(EnCipher, FirstKey, IVec, Text), %%% returns now() when keypair is found {StartVekA,StartVekB,StartVekC} = StartTime, {StopVekA,StopVekB,StopVekC} = StopTime, ResVekC = StopVekC - StartVekC, ResVekB = StopVekB - StartVekB, ResVekA = StopVekA - StartVekA, if ResVekC < 0 -> ResVekCNew = ResVekC + 1000000, ResVekBNew = ResVekB - 1; true -> ResVekCNew = ResVekC, ResVekBNew = ResVekB end, if ResVekBNew < 0 -> ResVekBNewNew = ResVekBNew + 1000000, ResVekANew = ResVekA - 1; true -> ResVekBNewNew = ResVekBNew, ResVekANew = ResVekA end, ResultTime = {ResVekANew,ResVekBNewNew,ResVekCNew}, ResultTime. this should work. kind regards nils From mats.cronqvist@REDACTED Tue Feb 28 09:18:07 2006 From: mats.cronqvist@REDACTED (Mats Cronqvist) Date: Tue, 28 Feb 2006 09:18:07 +0100 Subject: rfc: rdbms - new type system In-Reply-To: References: Message-ID: <4404073F.3050802@ericsson.com> Ulf Wiger (AL/EAB) wrote: > [...] > > ?line trans(fun() -> > mnesia:write({rdbms_w_filter, 17, 1}) > end), > [...] exciting, non-syntactic, macro there. what does it do (except break syntax_tools?). mats From raimo@REDACTED Tue Feb 28 09:19:41 2006 From: raimo@REDACTED (Raimo Niskanen) Date: 28 Feb 2006 09:19:41 +0100 Subject: timer:now_diff/2 documentation inconsistency References: <440396A3.6040108@hq.idt.net> Message-ID: That is a cut-and-paste documentation bug from the function above; tc/3. The correct signature should be: now_diff(T2, T1) -> Tdiff Types T1 = T2 = {MegaSecs, Secs, MicroSecs} Tdiff = MegaSecs = Secs = MicroSecs = integer() serge@REDACTED (Serge Aleynikov) writes: > There seems to be a documentation discrepancy: > > > Here's what the docs says (stdlib/timer): > ------------------------------------------------- > now_diff(T2, T1) -> {Time, Value} > Types: > T1 = T2 = {MegaSecs, Secs, MicroSecs} > MegaSecs = Secs = MicroSecs = integer() > > Calculates the time difference T2 - T1 in microseconds, where T1 and > T2 probably are timestamp tuples returned from erlang:now/0. > ------------------------------------------------- > > > Here's the result type we get in the shell: > > $ erl > Erlang (BEAM) emulator version 5.4.12 [source] [hipe] [threads:0] > > Eshell V5.4.12 (abort with ^G) > 1> now(). > {1141,85623,555497} > 2> timer:now_diff(now(), v(1)). > 12178593 > > Regards, > > Serge > > -- > Serge Aleynikov > R&D Telecom, IDT Corp. > Tel: (973) 438-3436 > Fax: (973) 438-1464 > serge@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From ulf.wiger@REDACTED Tue Feb 28 09:34:02 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 28 Feb 2006 09:34:02 +0100 Subject: rfc: rdbms - new type system Message-ID: It's stolen from the test_server macros. It puts the current line number in the process dictionary, so that when your test case fails, the resulting web page can tell you (roughly) which line of code was last executed. /Ulf W > -----Original Message----- > From: owner-erlang-questions@REDACTED > [mailto:owner-erlang-questions@REDACTED] On Behalf Of Mats Cronqvist > Sent: den 28 februari 2006 09:18 > To: erlang-questions@REDACTED > Subject: Re: rfc: rdbms - new type system > > > > Ulf Wiger (AL/EAB) wrote: > > > [...] > > > > ?line trans(fun() -> > > mnesia:write({rdbms_w_filter, 17, 1}) > > end), > > [...] > exciting, non-syntactic, macro there. what does it do > (except break syntax_tools?). > > mats > From ulf.wiger@REDACTED Tue Feb 28 11:09:34 2006 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Tue, 28 Feb 2006 11:09:34 +0100 Subject: rfc: rdbms - new type system Message-ID: Ulf Wiger wrote: > > I'm toying with the idea of allowing a match specification > as a table-level 'type' specification: > > Ms = [{{1,2,'$1'}, [{is_integer,'$1'}], [{{1,2,{float,'$1'}}}]}]. > [{{1,2,'$1'},[{is_integer,'$1'}],[{{1,2,{float,'$1'}}}]}] > 10> ets:match_spec_run([{1,2,3}],ets:match_spec_compile(Ms)). > > [{1,2,3.00000}] Why did this work at all, btw? Re-reading the manual, I couldn't find mention of {float,'$1'} as a valid term construct. After having inserted code in rdbms to allow for a match spec as an input or output filter (basically a term rewriting filter, or just a record-level type check), I started thinking that perhaps the most useful rewriting op of all would be list_to_binary (and binary_to_list in the output filter) But list_to_binary obviously doesn't work in a match spec. Why not? And why does {float,'$1'} work? /Ulf W From bjorn@REDACTED Tue Feb 28 12:34:07 2006 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 28 Feb 2006 12:34:07 +0100 Subject: Erlang & Hyperthreading In-Reply-To: <78568af10602271647w3241e124lc9b6ac3d0b8effb1@mail.gmail.com> References: <78568af10602271647w3241e124lc9b6ac3d0b8effb1@mail.gmail.com> Message-ID: "Ryan Rawson" writes: > As for performance - surely on a multicpu system with a SMP aware > erlang running, one can expect better performance just by using > multiple kernel threads and gaining the ability to run on several > CPUs? No. Most of the internal data structures need to be locked, and locking doesn't come for free. Also, some Erlang applications may not have more than one process runnable at the time, even if it consists of many process. There might be one process runnable, and all the others waiting in a receive statement. The SMP-aware emulator will not help at all in that case. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From thomasl_erlang@REDACTED Tue Feb 28 14:09:43 2006 From: thomasl_erlang@REDACTED (Thomas Lindgren) Date: Tue, 28 Feb 2006 05:09:43 -0800 (PST) Subject: Erlang & Hyperthreading In-Reply-To: <78568af10602271647w3241e124lc9b6ac3d0b8effb1@mail.gmail.com> Message-ID: <20060228130943.86727.qmail@web34401.mail.mud.yahoo.com> --- Ryan Rawson wrote: > As for performance - surely on a multicpu system > with a SMP aware > erlang running, one can expect better performance > just by using > multiple kernel threads and gaining the ability to > run on several > CPUs? Actual performance on a single cpu, I > wouldn't expect any > performance benefit. There is the extra cost of locking access to shared data inside the VM; contention between threads; waiting for sequential, global background tasks like memory management [parallel GCs exist, though; not sure what OTP uses], etc. These problems are not specific to Erlang, naturally, but do tend to turn up in most parallel applications, particularly those that aren't designed to get around it. Symptoms: First, a multithreaded application on a single CPU will normally see a slowdown compared to the single-threaded version (depending on hardware, language and implementation, the precise number varies widely). Second, contention and sequentialization limits potential speedup, both relative to the multithreaded and the (faster) single-threaded base. If the application permits it, you could also try a less convenient and less flexible solution: running several distributed erlang nodes on the same SMP host. Since the nodes run at arm's length, the performance trade off is different. Best, Thomas __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From rasmussen.bryan@REDACTED Tue Feb 28 15:44:02 2006 From: rasmussen.bryan@REDACTED (bryan rasmussen) Date: Tue, 28 Feb 2006 15:44:02 +0100 Subject: ultimate vmware appliance? Message-ID: <3bb44c6e0602280644y59e9009bw46605ea434388eb3@mail.gmail.com> http://www.vmware.com/vmtn/appliances/challenge/ "Are you up for the challenge of creating the industry's most innovative virtual appliance? " and "Using open source or freely distributable components and/or your own code, create the most inventive and useful virtual appliance and win the $100,000 first prize!" and "To participate in the Ultimate Virtual Appliance Challenge (the "Challenge"), you must be at least 18 years old. The Challenge is open to individuals or teams of up to 10 people (the "Participant"), but not to corporate entries. By participating in the Challenge, Participants agree to be bound by these rules and to all decisions of VMware, which are final, binding and conclusive in all matters. To keep the Challenge legal and fair, we need to prohibit certain participants, see below." hmm, could the ultimate virtual appliance be running erlang. I've actually been thinking about that recently (before I saw the contest, which is why I decided to post), but can't figure a particular ultimate yet. Cheers, Bryan Rasmussen From camster@REDACTED Tue Feb 28 16:23:24 2006 From: camster@REDACTED (Richard Cameron) Date: Tue, 28 Feb 2006 15:23:24 +0000 Subject: Erlang: The Movie Message-ID: <655ACDFB-5860-4BA6-9475-F8D8E9E98CE8@citeulike.org> It looks like "Erlang: The Movie" has resurfaced in all its glory on Google Video: http://video.google.com/videoplay?docid=-5830318882717959520 From bjorn@REDACTED Tue Feb 28 16:42:21 2006 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 28 Feb 2006 16:42:21 +0100 Subject: Erlang & Hyperthreading In-Reply-To: <20060228033905.9B9B640004D@mail.omnibis.com> References: <20060228033905.9B9B640004D@mail.omnibis.com> Message-ID: "Eranga Udesh" writes: > Hi, > > Can I consider as its stable enough, even though a it'll not give a huge > performance gain? Stable enough for what? Our snapshots are only meant to be used for evaluation and testing purposes, not to be used in production use. We do consider the SMP emulator "stable enough" for that purpose. /Bjorn -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From luke@REDACTED Tue Feb 28 17:26:59 2006 From: luke@REDACTED (Luke Gorrie) Date: Tue, 28 Feb 2006 17:26:59 +0100 Subject: cvs rtag -r branch -d yesterday my_branch_yesterday (workaround) Message-ID: Howdy, This is a public service announcement. CVS does not support tagging on a branch at a certain date: $ cvs rtag -r branch -D yesterday my_branch_yesterday mymodule cvs [rtag aborted]: -r and -D options are mutually exclusive but you can achieve the right effect because -r and -D are compatible with 'cvs update'. You can checkout the right versions and then tag your working copy: mkdir /tmp/work cd !$ cvs co -r branch mymodule cvs update -r branch -D yesterday . cvs tag mybranch . That is all. From kostis@REDACTED Tue Feb 28 17:38:22 2006 From: kostis@REDACTED (Kostis Sagonas) Date: Tue, 28 Feb 2006 17:38:22 +0100 (MET) Subject: Documentation for open_port/2 Message-ID: <200602281638.k1SGcMgl011875@spikklubban.it.uu.se> The documentation of erlang:open_port/2 reads: ------------------------------------------------------------ open_port(PortName, PortSettings) -> port() Types: PortName = {spawn, Command} | {fd, In, Out} Command = string() In = Out = int() PortSettings = [Opt] Opt = {packet, N} | stream | {line, L} | {cd, Dir} | {env, Env} | exit_status | use_stdio | nouse_stdio | stderr_to_stdout | in | out | binary | eof N = 1 | 2 | 4 L = int() Dir = string() Env = [{Name, Val}] Name = string() Val = string() | false ------------------------------------------------------------ Which of the "string()" above should read "atom()" ? Can they be used interchangeably? Kostis From ernie.makris@REDACTED Tue Feb 28 18:11:10 2006 From: ernie.makris@REDACTED (Ernie Makris) Date: Tue, 28 Feb 2006 12:11:10 -0500 Subject: cvs rtag -r branch -d yesterday my_branch_yesterday (workaround) In-Reply-To: References: Message-ID: <4404842E.7080902@comcast.net> Or you can switch to subversion:) Luke Gorrie wrote: > Howdy, > > This is a public service announcement. > > CVS does not support tagging on a branch at a certain date: > > $ cvs rtag -r branch -D yesterday my_branch_yesterday mymodule > cvs [rtag aborted]: -r and -D options are mutually exclusive > > but you can achieve the right effect because -r and -D are compatible > with 'cvs update'. You can checkout the right versions and then tag > your working copy: > > mkdir /tmp/work > cd !$ > cvs co -r branch mymodule > cvs update -r branch -D yesterday . > cvs tag mybranch . > > That is all. > > > > From luke@REDACTED Tue Feb 28 18:12:46 2006 From: luke@REDACTED (Luke Gorrie) Date: Tue, 28 Feb 2006 18:12:46 +0100 Subject: parmap/2 References: <43FF17B4.8020400@telia.com> <43FF49EB.3010102@hyber.org> Message-ID: Claes Wikstrom writes: > Robert Virding wrote: >> Hello Luke, >> That WAS a cute function, the only thing that could have made even >> cuter was if the receive's were in parallel. Though that wouldn't >> affect the > > It's been in the rpc library for some 10 years or so. .. but did not work until R10's s/infinite/infinity/ fix as Tony just pointed out while trying to use it in a demo on R9. :-) From ulf@REDACTED Tue Feb 28 21:04:17 2006 From: ulf@REDACTED (Ulf Wiger) Date: Tue, 28 Feb 2006 21:04:17 +0100 Subject: Mnesia, mnesia_frag, and table locks using index_match_object et al. In-Reply-To: <200602280514.k1S5E0rk039233@snookles.snookles.com> References: <200602280514.k1S5E0rk039233@snookles.snookles.com> Message-ID: Den 2006-02-28 06:14:00 skrev Scott Lystig Fritchie : > For my purpose, I would like to insert a single record into the > 'thing' table *and* guarantee that both primary_key and secondary_key > are unique. The former is trivial: the table type is 'set'. I was > hoping to do the latter by the following (simplifed!) without whole > table locks: I had this implemented in my previous index hack in mnesia. I'm putting it into rdbms now. You will be able to specify a unique index on a secondary key. It will abort if the value is not unique to the current object. These index tabs will also support fragmentation, and will attempt to do index lookups on fragmented tables as efficiently as possible (find the index fragment with the given index value, then rpc only to the fragments with corresponding objects.) /Uffe -- Ulf Wiger From klacke@REDACTED Tue Feb 28 23:03:26 2006 From: klacke@REDACTED (Claes Wikstrom) Date: Tue, 28 Feb 2006 23:03:26 +0100 Subject: parmap/2 In-Reply-To: References: <43FF17B4.8020400@telia.com> <43FF49EB.3010102@hyber.org> Message-ID: <4404C8AE.3040401@hyber.org> Luke Gorrie wrote: > > > .. but did not work until R10's s/infinite/infinity/ fix as Tony just > pointed out while trying to use it in a demo on R9. :-) > Nice, see how useful that function was then :-) Not used ever for 10 years. -- Claes Wikstrom -- Caps lock is nowhere and http://www.hyber.org -- everything is under control cellphone: +46 70 2097763