From not.for.email@REDACTED Tue Aug 1 10:08:53 2000 From: not.for.email@REDACTED (Gordon Beaton) Date: 1 Aug 2000 08:08:53 GMT Subject: binary_to_term References: <000b01bff88b$ff959940$5d00000a@st.se>, <8m3o45$s98$1@news.du.uab.ericsson.se>, <000901bffaeb$d1b323a0$5d00000a@st.se> Message-ID: <8m60il$hl$1@news.du.uab.ericsson.se> On 31 Jul 2000 12:35:32 GMT, Ulf Ekstr?m wrote: > I have the erl4.3.1 distribution (for Linux) but the problem is that > it contains object-files (no source files) and I havn't > succeded in linking them. This is because I do not know > which version of libc was used to produce them. > (they were built in 1995) It appears that the file was written with erlang 4.2 or earlier. The file contained the version number of the encoding method that, according to a comment in one of the header files, changed after 4.2. As far as I know there were no changes to the existing encoding, only additions. So after incrementing the version in the file I was able to use a current erlang to decode the contents. /gordon -- g o r d o n . b e a t o n @ e r i c s s o n . c o m software architecture laboratory ericsson research stockholm, sweden From Sean.Hinde@REDACTED Tue Aug 1 15:51:07 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 1 Aug 2000 14:51:07 +0100 Subject: Ordered term storage on Disk Message-ID: <402DD461F109D411977E0008C791C312565037@imp02mbx.one2one.co.uk> All, I notice from the dets docs that there is planned to be a future development which allows for ordered disk based term storage. Does anyone know if this is in R7, or alternatively does anyone have a solution which they would be happy to share? Thanks very much, Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From ulf.ekstrom@REDACTED Wed Aug 2 11:36:35 2000 From: ulf.ekstrom@REDACTED (=?iso-8859-1?Q?Ulf_Ekstr=F6m?=) Date: Wed, 2 Aug 2000 11:36:35 +0200 Subject: net:start/1 Message-ID: <001301bffc65$26ac8480$5d00000a@st.se> The function net:start/1 is no longer a part of Erlang. Does anyone know which the corresponding function is today? /Ulf Ekstr?m From ltaesch@REDACTED Wed Aug 2 13:28:20 2000 From: ltaesch@REDACTED (ltaesch@REDACTED) Date: Wed, 2 Aug 2000 07:28:20 -0400 (EDT) Subject: mnemosyne not running Message-ID: <0008020728207I.11589@weba8.iname.net> im trying basic mnemosyxne queries. when i have one table involved, its fine, but when i have two, i got: failed mnemosyne not running what does this message mean? do i have to start mnemosyne ? ------------------------------------------------------ Get free personalized email at http://four11.iname.com From mickael.remond@REDACTED Wed Aug 2 14:49:53 2000 From: mickael.remond@REDACTED (Mickael Remond) Date: 02 Aug 2000 14:49:53 +0200 Subject: mnemosyne not running In-Reply-To: ltaesch@europemail.com's message of "Wed, 2 Aug 2000 07:28:20 -0400 (EDT)" References: <0008020728207I.11589@weba8.iname.net> Message-ID: <87em47esjy.fsf@western.ird.idealx.com> >>>>> "ltaesch" == ltaesch writes: > im trying basic mnemosyxne queries. > when i have one table involved, its fine, but when i have two, i got: > failed mnemosyne not running > what does this message mean? do i have to start mnemosyne ? Yes. use mnemosyne:start() after your mnesia:start(). -- Micka?l R?mond - mickael.remond@REDACTED - http://IDEALX.com - 01 44 42 00 38 From enano@REDACTED Wed Aug 2 17:47:26 2000 From: enano@REDACTED (Miguel Barreiro Paz) Date: Wed, 2 Aug 2000 17:47:26 +0200 (CEST) Subject: mnemosyne not running In-Reply-To: <87em47esjy.fsf@western.ird.idealx.com> Message-ID: > Yes. use mnemosyne:start() after your mnesia:start(). application:start(mnemosyne) , I suppose :-) From mickael.remond@REDACTED Wed Aug 2 19:53:48 2000 From: mickael.remond@REDACTED (Mickael Remond) Date: 02 Aug 2000 19:53:48 +0200 Subject: mnemosyne not running In-Reply-To: Miguel Barreiro Paz's message of "Wed, 2 Aug 2000 17:47:26 +0200 (CEST)" References: Message-ID: <87og3bblcj.fsf@western.ird.idealx.com> >>>>> "Miguel" == Miguel Barreiro Paz writes: >> Yes. use mnemosyne:start() after your mnesia:start(). > application:start(mnemosyne) , I suppose :-) Oh. Yes. My mistake. Sorry. -- Micka?l R?mond - mickael.remond@REDACTED - http://IDEALX.com - 01 44 42 00 38 From bjowi@REDACTED Thu Aug 3 16:26:00 2000 From: bjowi@REDACTED (=?ISO-8859-1?Q?Bj=F6rn Wingman?=) Date: Thu, 3 Aug 2000 16:26:00 +0200 (MET DST) Subject: mnemosyne not running In-Reply-To: <3.0.5.32.19990621101910.00b726e0@pop.loop.com> (message from Hakan Mattsson on 22 Jun 1999 16:06:53 +0200) References: <3.0.5.32.19990620173000.00b61030@pop.loop.com> Message-ID: <200008031426.QAA08646@sture.lysator.liu.se> >There also exists an experimental SQL compiler that generates the >internal form of Mnemosyne from SQL. This work was performed as a >master thesis. > >A good starting point is to read Ronny Andersson's master thesis report. >It is available at: > > http://www.erlang.se/erlang/sure/main/club/university/xjobb/sql_compiler_report.pdf > >It was an experimental work where a complete SQL parser was >implemented in Erlang using yecc, but only a minor subset of SQL was >mapped to Mnesia and Mnemosyne. I can dig up the code, but I don't >think that it works today. That document seems to have moved. Can I get it somewhere? Has there been any progress on an sql to mnemosyne translator? /Bj?rn Wingman From mickael.remond@REDACTED Thu Aug 3 17:18:13 2000 From: mickael.remond@REDACTED (Mickael Remond) Date: 03 Aug 2000 17:18:13 +0200 Subject: mnemosyne not running In-Reply-To: "Björn Wingman"'s message of "Thu, 3 Aug 2000 16:26:00 +0200 (MET DST)" References: <3.0.5.32.19990620173000.00b61030@pop.loop.com> <200008031426.QAA08646@sture.lysator.liu.se> Message-ID: <878zueqsp6.fsf@western.ird.idealx.com> >>>>> "Bj?rn" == Bj?rn Wingman writes: >> http://www.erlang.se/erlang/sure/main/club/university/xjobb/sql_compiler_report.pdf > That document seems to have moved. Can I get it somewhere? Has there > been any progress on an sql to mnemosyne translator? http://www.ericsson.se/cslab/projects/erlang/sqlerlang/sqlerlang.html -- Micka?l R?mond - mickael.remond@REDACTED - http://IDEALX.com - 01 44 42 00 38 From per@REDACTED Thu Aug 3 18:07:20 2000 From: per@REDACTED (Per Hedeland) Date: Thu, 3 Aug 2000 18:07:20 +0200 (MET DST) Subject: mnemosyne not running In-Reply-To: <878zueqsp6.fsf@western.ird.idealx.com> References: <878zueqsp6.fsf@western.ird.idealx.com> Message-ID: <200008031607.e73G7KE04816@aalborg.du.uab.ericsson.se> Mickael Remond wrote: >>>>>> "Bj?rn" == Bj?rn Wingman writes: > > >> http://www.erlang.se/erlang/sure/main/club/university/xjobb/sql_compiler_report.pdf > > > That document seems to have moved. Can I get it somewhere? Has there > > been any progress on an sql to mnemosyne translator? > >http://www.ericsson.se/cslab/projects/erlang/sqlerlang/sqlerlang.html Actually no, that's not the same document - Ronny's thesis is now at http://www.erlang.se/publications/xjobb/sql_compiler_report.pdf (which you could have found by clicking "Publications" in the left-hand-menu on the error page from the old URL, and then searching for "sql" - purely hypothetically speaking, that is...:-). I don't know about any progress in this area, sorry. --Per Hedeland per@REDACTED From adam@REDACTED Thu Aug 3 19:18:46 2000 From: adam@REDACTED (Adam P. Jenkins) Date: Thu, 3 Aug 2000 13:18:46 -0400 Subject: erl and erlc fail to start on Redhat Linux 6.1 Message-ID: Hi, I'm having a problem getting erlang to run. I have a Linux system, on on PII 500Mhz, 128 megs ram, Redhat Linux 6.1 with kernel 2.2.12 and glibc 2.1.2. I first downloaded and installed erlang_otp-R6B-4.i386.rpm from www.erlang.org. When I try to run erl, I get the following error message: [dwarin:/tmp]# erl {error_logger,{{2000,8,3},{13,2,4}},supervisor_report,[{supervisor,{local,ke rnel _sup}},{errorContext,start_error},{reason,{'EXIT',{noproc,{gen_server,call,[ net_ sup,{start_child,{inet_gethost_native,{inet_gethost_native,start_link,[]},pe rman ent,1000,worker,[inet_gethost_native]}},infinity]}}}},{offender,[{pid,undefi ned} ,{name,inet_db},{mfa,{inet_db,start_link,[]}},{restart_type,permanent},{shut down ,2000},{child_type,worker}]}]} {error_logger,{{2000,8,3},{13,2,4}},crash_report,[[{pid,<0.7.0>},{registered _nam e,[]},{error_info,{shutdown,{kernel,start,[normal,[]]}}},{initial_call,{appl icat ion_master,init,[<0.5.0>,<0.6.0>,{appl_data,kernel,[application_controller,e rl_r eply,auth,boot_server,code_server,disk_log_server,disk_log_sup,erl_prim_load er,e rror_logger,file_server,fixtable_server,global_group,global_name_server,hear t,in it,kernel_config,kernel_sup,net_kernel,net_sup,rex,user,os_server,ddll_serve r,er l_epmd,inet_db,pg2],undefined,{kernel,[]},[application,application_controlle r,ap plication_master,application_starter,auth,code,code_aux,code_server,code_ser ver_ int,dist_util,erl_boot_server,erl_distribution,erl_open_port,erl_prim_loader ,erl _reply,erlang,error_handler,error_logger,file,global,global_group,global_sea rch, group,heart,inet6_tcp,inet6_tcp_dist,inet6_udp,inet_config,inet_hosts,inet_g etho st_native,inet_tcp_dist,otp_pre_init,init,kernel,kernel_config,net,net_adm,n et_k ernel,os,ram_file,rpc,user,user_drv,user_sup,disk_log,disk_log_1,disk_log_se rver ,disk_log_sup,dist_ac,erl_atom_cache,erl_ddll,erl_epmd,erl_external,erts_deb ug,f ixtable_server,gen_tcp,gen_udp,inet,inet_db,inet_dns,inet_parse,inet_res,ine t_tc p,inet_udp,pg2,seq_trace,socks5,socks5_auth,socks5_tcp,socks5_udp,wrap_log_r eade r],[],infinity,infinity},normal]}},{ancestors,[<0.6.0>]},{messages,[{'EXIT', <0.8 .0>,normal}]},{links,[<0.6.0>,<0.5.0>]},{dictionary,[]},{trap_exit,true},{st atus ,running},{heap_size,987},{stack_size,21},{reductions,1063}],[]]} {error_logger,{{2000,8,3},{13,2,4}},std_info,[{application,kernel},{exited,{ shut down,{kernel,start,[normal,[]]}}},{type,permanent}]} {'Kernel pid terminated',application_controller,shutdown} Kernel pid terminated (application_controller) (shutdown) [dwarin:/tmp]# I thought maybe this binary RPM had been built with incompatible libraries so I downloaded the source archive, otp_src_R6B-0.tar.gz, and ran ./configure and make. When make got to the point where it started to use erlc to compile erlang files, it gave a similar error: make[4]: Entering directory `/tmp/otp_src_R6B-0/lib/gs/contribs/bonk' erlc -W -bbeam -o../ebin bonk.erl {error_logger,{{2000,8,3},{12,54,34}},supervisor_report,[{supervisor,{local, kern el_sup}},{errorContext,start_error},{reason,{'EXIT',{noproc,{gen_server,call ,[ne t_sup,{start_child,{inet_gethost_native,{inet_gethost_native,start_link,[]}, perm anent,1000,worker,[inet_gethost_native]}},infinity]}}}},{offender,[{pid,unde fine d},{name,inet_db},{mfa,{inet_db,start_link,[]}},{restart_type,permanent},{sh utdo wn,2000},{child_type,worker}]}]} {error_logger,{{2000,8,3},{12,54,34}},crash_report,[[{pid,<0.7.0>},{register ed_n ame,[]},{error_info,{shutdown,{kernel,start,[normal,[]]}}},{initial_call,{ap plic ation_master,init,[<0.5.0>,<0.6.0>,{appl_data,kernel,[application_controller ,erl _reply,auth,boot_server,code_server,disk_log_server,disk_log_sup,erl_prim_lo ader ,error_logger,file_server,fixtable_server,global_group,global_name_server,he art, init,kernel_config,kernel_sup,net_kernel,net_sup,rex,user,os_server,ddll_ser ver, erl_epmd,inet_db,pg2],undefined,{kernel,[]},[application,application_control ler, application_master,application_starter,auth,code,code_aux,code_server,code_s erve r_int,dist_util,erl_boot_server,erl_distribution,erl_open_port,erl_prim_load er,e rl_reply,erlang,error_handler,error_logger,file,global,global_group,global_s earc h,group,heart,inet6_tcp,inet6_tcp_dist,inet6_udp,inet_config,inet_hosts,inet _get host_native,inet_tcp_dist,otp_pre_init,init,kernel,kernel_config,net,net_adm ,net _kernel,os,ram_file,rpc,user,user_drv,user_sup,disk_log,disk_log_1,disk_log_ serv er,disk_log_sup,dist_ac,erl_atom_cache,erl_ddll,erl_epmd,erl_external,erts_d ebug ,fixtable_server,gen_tcp,gen_udp,inet,inet_db,inet_dns,inet_parse,inet_res,i net_ tcp,inet_udp,pg2,seq_trace,socks5,socks5_auth,socks5_tcp,socks5_udp,wrap_log _rea der],[],infinity,infinity},normal]}},{ancestors,[<0.6.0>]},{messages,[{'EXIT ',<0 .8.0>,normal}]},{links,[<0.6.0>,<0.5.0>]},{dictionary,[]},{trap_exit,true},{ stat us,running},{heap_size,987},{stack_size,21},{reductions,1063}],[]]} {error_logger,{{2000,8,3},{12,54,34}},std_info,[{application,kernel},{exited ,{sh utdown,{kernel,start,[normal,[]]}}},{type,permanent}]} {'Kernel pid terminated',application_controller,shutdown} Kernel pid terminated (application_controller) (shutdown) make[4]: *** [../ebin/bonk.beam] Error 1 make[4]: Leaving directory `/tmp/otp_src_R6B-0/lib/gs/contribs/bonk' I had already uninstalled the binary erlang rpm, so I know this was using the version of erlc that it had just compiled. Do you have any idea why this is happening? I can't decipher anything intelligible from the error message. I can post the erl_crash.dump file too if that would help. I assume it's just something simple wrong with my setup. Thank you in advance for any help you can give. Adam -- Adam P. Jenkins adam@REDACTED  From bjowi@REDACTED Fri Aug 4 17:11:57 2000 From: bjowi@REDACTED (=?ISO-8859-1?Q?Bj=F6rn Wingman?=) Date: Fri, 4 Aug 2000 17:11:57 +0200 (MET DST) Subject: Problems compiling on IRIX64 Message-ID: <200008041511.RAA20825@sture.lysator.liu.se> Compilation on irix 6.5 fails with: gcc -c -o ../priv/obj/mips-sgi-irix6.5/setsockaddr_in.o -g -O2 -I/home/bjowi/otp_src_R6B-0/erts/autoconf/mips-sgi-irix6.5 -DHAVE_CONFIG_H setsockaddr_in.c setsockaddr_in.c: In function `setsockaddr_in': setsockaddr_in.c:64: `IPPORT_USERRESERVED' undeclared (first use in this function) setsockaddr_in.c:64: (Each undeclared identifier is reported only once setsockaddr_in.c:64: for each function it appears in.) make[4]: *** [../priv/obj/mips-sgi-irix6.5/setsockaddr_in.o] Error 1 make[4]: Leaving directory `/home/bjowi/otp_src_R6B-0/lib/orber/c_src' Sniplet from netinet/in.h on irix 6.5: * Ports > 5000 used to be reserved for non-root servers, * but this convention can no longer be used with large scale * systems. IPPORT_USERRESERVED is not defined. Instead, there is a #define IPPORT_MAXPORT 65535 /Bj?rn Wingman From pascal.brisset@REDACTED Fri Aug 4 21:36:51 2000 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Fri, 4 Aug 2000 21:36:51 +0200 (CEST) Subject: Performance of send_message() Message-ID: <200008041936.e74Jaok55916@hades.cslab.ericsson.net> I'm not very familiar with erlang implementation details, but it looks like the beam emulator in erts-4.9.1 sends messages by structurally copying them into the receiver's mailbox. In other words, sending a 2000-character string takes twice as long as sending a 1000-character string, and uses twice as much memory in the receiver's mailbox. Are there plans to optimize this and pass pointers instead in the case of local communications ? Is this compatible with the current GC ? What would be the gain ? I know I can "send" large amounts of data in constant time with binaries, but then the overhead is in term_to_binary/binary_to_term. - Pascal Brisset +33 2 96051928 - - France Telecom R&D DTL/MSV | 2, av Pierre Marzin | F-22307 Lannion - From martin@REDACTED Fri Aug 4 23:42:03 2000 From: martin@REDACTED (Martin Logan) Date: Fri, 4 Aug 2000 16:42:03 -0500 (CDT) Subject: Tcp {active, true} problem Message-ID: Hello all, I am writing a proxy server in erlang. I have run into a slight problem with gen_tcp. I am using {active, true} and receiving with receive {tcp, Socket, Packet} -> end If I send packets to this at a 500 milliseconds apart I receive all of the packets perfectly and the proxy works well. My problem arises when I send a number of packets quickly( < 500 ms). I receive them as one large ascii string. I was wondering, befor I write a parser of sorts, if there is some other way to deal with this problem. Thank you, Martin Logan From jim@REDACTED Sat Aug 5 01:07:00 2000 From: jim@REDACTED (Jim Larson) Date: Fri, 04 Aug 2000 16:07:00 -0700 Subject: Tcp {active, true} problem In-Reply-To: Your message of "Fri, 04 Aug 2000 16:42:03 CDT." Message-ID: <200008042307.QAA40941@eme110-115.Sendmail.COM> In message Martin Logan writes: > I am writing a proxy server in erlang. I have run into a slight >problem with gen_tcp. I am using {active, true} and receiving with > >receive > {tcp, Socket, Packet} -> >end > >If I send packets to this at a 500 milliseconds apart I receive all of the >packets perfectly and the proxy works well. My problem arises when I send >a number of packets quickly( < 500 ms). I receive them as one large ascii >string. I was wondering, befor I write a parser of sorts, if there is some >other way to deal with this problem. On most systems, the TCP machinery is free to split or join packets behind-the-scenes, since it's only providing reliable byte stream service. Any record separation must be done explicitly. You can either switch to UDP transport (and accept the possibility of loss, duplication, or reordering of data), or you can implement your own record separation. The {packet, PacketType} option allows the low-level driver to perform packetization for you, so that your Erlang code only deals with discrete packets. There are a variety of packet types built-in to suit your needs. The 1, 2, 4-type options will add the record separator for both sending and receiving data. If you have no particular ties to any of the other packet types, I'd recommend one of those. Jim From scott@REDACTED Sat Aug 5 01:18:31 2000 From: scott@REDACTED (Scott Lystig Fritchie) Date: Fri, 04 Aug 2000 18:18:31 -0500 Subject: Tcp {active, true} problem In-Reply-To: Message of "Fri, 04 Aug 2000 16:42:03 CDT." Message-ID: <200008042318.SAA56601@snookles.snookles.com> >>>>> "ml" == Martin Logan writes: ml> My problem ml> arises when I send a number of packets quickly( < 500 ms). I ml> receive them as one large ascii string. TCP will guarantee that your stream of data will arrive and with the bytes in the proper order (or let you know something went wrong), but it doesn't provide any guarantee beyond that. If a TCP stream S is established between A and B, and A writes 3 chunks of data to S (with lengths of L1, L2, and L3), you have no guarantee that B, executing read() or recv() or whatever three times, will read three chunks of data with respective lengths L1, L2, and L3.(*) In your greater than 500ms case, you were simply lucky that you got three reads of the size you were expecting. If you want that kind of record-boundary-honoring thing, you need to use UDP. UDP places limits on the maximum datagram size, so that solution doesn't work in all cases. Your other option is to embed additional data in the stream itself to tell the receiver where record boundaries lie. -Scott (*) Hm. W. Richard Stevens, _TCP/IP Illustrated, Vol 1_ states this more clearly? Differently, at least. IMO, every programmer should have this book on his/her shelf. After reading it all the way through, of course. :-) Page 224 says (except for typos): "A stream of 8-bit bytes is exchanged across the TCP connection between the two applications. There are no record markers automatically inserted by TCP. This is what we called a "byte stream service". If the application on one end writes 10 bytes, followed by a write of 20 bytes, followed by a write of 50 bytes, the application at the other end of the connection cannot tell what size the individual writes were. The other end may read the 80 bytes in four reads of 20 bytes at a time. One end puts a stream of bytes into TCP and the same, identical stream of bytes appears at the other end. "[...] This treatment of the byte stream by TCP is similar to the treatment of a file by the UNIX operating system. The UNIX kernel does no interpretation whatsoever of the bytes that an application reads or writes -- that is up to the application." From jhague@REDACTED Sat Aug 5 04:13:00 2000 From: jhague@REDACTED (James Hague) Date: Fri, 4 Aug 00 21:13:00 -0500 Subject: Performance of send_message() Message-ID: <200008050213.VAA16435@node-02.advancenet.net> >Are there plans to optimize this and pass pointers instead in the >case of local communications ? Is this compatible with the current >GC ? What would be the gain ? Ah, this has almost reached the level of Frequently Asked Question :) Ericsson's Erlang implementation does not do GC across process boundaries. That is, each process has its own memory space. This scheme has some nice properties. When a process is killed, the allocated memory can be freed in one shot, so there's no latent GC overhead. With relatively small processes, total GC time can be much smaller, because there are lots of little heaps instead of one monster heap. The disadvantage is that data passed between processes has to be copied, which can be bad in some situations. It is difficult to say if this is more or less important than the benefits mentioned above. I suspect that the average message size is fairly small? James From jhague@REDACTED Sat Aug 5 04:17:30 2000 From: jhague@REDACTED (James Hague) Date: Fri, 4 Aug 00 21:17:30 -0500 Subject: New Linked-in Driver documentation? Message-ID: <200008050218.VAA16741@node-02.advancenet.net> >I notice references to dynamicly loaded >drivers, and a few more entries in the driver_entry struct. Now this would be interesting. I've been thinking that it would be nice to have a generic driver that simply grabs data and sends it to a particular function in a particularly named library. Then you could just write a DLL or shared library instead of having to rebuild the emulator. This is especially true under Windows, because it doesn't seem possible to rebuild the emulator directly, at least without major headaches. James From scott@REDACTED Sat Aug 5 07:49:09 2000 From: scott@REDACTED (Scott Lystig Fritchie) Date: Sat, 05 Aug 2000 00:49:09 -0500 Subject: Performance of send_message() In-Reply-To: Message of "Fri, 04 Aug 2000 21:13:00 CDT." <200008050213.VAA16435@node-02.advancenet.net> Message-ID: <200008050549.AAA59123@snookles.snookles.com> >>>>> "jh" == James Hague writes: jh> The disadvantage is that data passed between processes has to be jh> copied, which can be bad in some situations. It's worth noting that the contents of binary objects are not copied to the recipient's heap. A binary pointer object is copied to the recipient's heap, but the binary object's data itself is not, making the size of the copied object constant. The object's data is reference counted and deallocated when the last pointer object is GC'ed into oblivion. A someone who has, for hours and days on end, many megabytes per second entering the Erlang VM via TCP and UDP, being passed to half a dozen different Erlang processes, and then spit out again (also at many MB/s :-), the binary data type's relative efficiency is appreciated. Our very first prototype was written before the network drivers could deal with data inside binaries -- we were lucky to be able to get 100KB/s throughput. -Scott From pascal.brisset@REDACTED Sat Aug 5 13:24:43 2000 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Sat, 5 Aug 2000 13:24:43 +0200 (CEST) Subject: Performance of send_message() In-Reply-To: <200008050213.VAA16435@node-02.advancenet.net> Message-ID: <200008051124.e75BOgk59379@hades.cslab.ericsson.net> > Ah, this has almost reached the level of Frequently Asked Question :) Indeed, I finally found plenty of information about the design choices in an old thread about garbage collection (http://www.erlang.org/ml-archive/erlang-questions/199908/msg00043.html). But I'm still puzzled by the results of simple benchmarks (definitely not representative of real applications): - Why does is take O(N^2) time to queue N atoms, but O(N) to queue N lists ? (ok, forgetting to flush messages is bad programming). - Why does process <0.25.0> need 8 times more collections (and time) than process <0.1.0> to do the same job ? According to process_info/1, they have the same priority, gc type, etc. Pid <0.1.0>, 10000 'x': 0.05 s, {heap_size,2584}, GC {139,248554,0} Pid <0.1.0>, 20000 'x': 0.16 s, {heap_size,2584}, GC {184,263973,0} Pid <0.1.0>, 40000 'x': 0.66 s, {heap_size,2584}, GC {263,266034,0} Pid <0.1.0>, 80000 'x': 2.98 s, {heap_size,2584}, GC {418,267637,0} Pid <0.1.0>, 160000 'x': 13.11 s, {heap_size,2584}, GC {726,268279,0} Pid <0.1.0>, 320000 'x': 56.39 s, {heap_size,2584}, GC {1343,270532,0} Pid <0.1.0>, 640000 'x': 230.19 s, {heap_size,2584}, GC {2574,271433,0} Pid <0.1.0>, 10000 '"x"': 0.03 s, {heap_size,75025}, GC {2587,273572,0} Pid <0.1.0>, 20000 '"x"': 0.05 s, {heap_size,75025}, GC {2588,276331,0} Pid <0.1.0>, 40000 '"x"': 0.15 s, {heap_size,317811}, GC {2593,316967,0} Pid <0.1.0>, 80000 '"x"': 0.20 s, {heap_size,317811}, GC {2594,335806,0} Pid <0.1.0>, 160000 '"x"': 0.71 s, {heap_size,1346269}, GC {2599,496442,0} Pid <0.1.0>, 320000 '"x"': 0.93 s, {heap_size,1346269}, GC {2600,554721,0} Pid <0.1.0>, 640000 '"x"': 2.68 s, {heap_size,2178309}, GC {2605,1510437,0} Pid <0.25.0>, 10000 'x': 0.28 s, {heap_size,233}, GC {2776,2485639,0} Pid <0.25.0>, 20000 'x': 1.18 s, {heap_size,233}, GC {3110,2486410,0} Pid <0.25.0>, 40000 'x': 5.23 s, {heap_size,233}, GC {3779,2490093,0} Pid <0.25.0>, 80000 'x': 24.58 s, {heap_size,233}, GC {5113,2490864,0} Pid <0.25.0>, 160000 'x': 113.06 s, {heap_size,233}, GC {7781,2491635,0} ... Running this with "erl -noshell -s msgsend run" on a AMD K6, 350MHz, Linux RedHat 6.2. No swapping, no network activity, etc. ---------------------------------------------------------------------- -module(msgsend). -export([run/0, scale/3]). run() -> scale(x, 10000, 7), scale("x", 10000, 7), spawn(msgsend, scale, [x,10000,7]). scale(Msg, N, 0) -> T0 = secs(), erlang:garbage_collect(), T1 = secs(), io:format("GC:~.2f s~n~p~n~n", [T1-T0, process_info(self())]); scale(Msg, N, K) -> T0 = secs(), send(Msg, N), T1 = secs(), N = flush(), io:format("Pid ~p, ~p '~p': ~.2f s, ~p, GC ~p~n", [self(), N, Msg, T1-T0, process_info(self(), heap_size), statistics(garbage_collection)]), scale(Msg, N*2, K-1). send(Msg, 0) -> ok; send(Msg, N) -> self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, self()!Msg, send(Msg, N-20). flush() -> flush(0). flush(N) -> receive _ -> flush(N+1) after 0 -> N end. secs() -> {A,B,C} = now(), A*1.0e6 + B + C*1.0e-6. ---------------------------------------------------------------------- - Pascal Brisset +33 2 96051928 - - France Telecom R&D DTL/MSV | 2, av Pierre Marzin | F-22307 Lannion - From Ruslan@REDACTED Sun Aug 6 16:47:45 2000 From: Ruslan@REDACTED (Ruslan Shevchenko) Date: Sun, 06 Aug 2000 17:47:45 +0300 Subject: erlang maintainer References: <20000806162105.A4780@cichlids.cichlids.com> Message-ID: <398D7A91.A97B7B46@Shevchenko.Kiev.UA> This is about FreeBSD port of erlang: Alexander Langer wrote: > > Thus spake Jimmy Olgeni (olgeni@REDACTED): > > > Looks like the current mail address is no longer valid (the domain > > does not resolve). > > True, want to become the new maintainer? > > Alex > previous erlang maintainer was I, than erlang guys ask me: can they be erlang maintainers of FreeBSD port ?, So, I cc this to erlang-questiong, may be them will take care about this. > -- > cat: /home/alex/.sig: No such file or directory > > To Unsubscribe: send mail to majordomo@REDACTED > with "unsubscribe freebsd-ports" in the body of the message From Bruce@REDACTED Sun Aug 6 18:03:42 2000 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Sun, 6 Aug 2000 18:03:42 +0200 Subject: New Linked-in Driver documentation? References: <200008050218.VAA16741@node-02.advancenet.net> Message-ID: <0da801bfffbf$e7afae70$0121970a@fitzsimons.org> Hi James, > Now this would be interesting. I've been thinking that it would be nice > to have a generic driver that simply grabs data and sends it to a > particular function in a particularly named library. Then you could just > write a DLL or shared library instead of having to rebuild the emulator. > This is especially true under Windows, because it doesn't seem possible > to rebuild the emulator directly, at least without major headaches. There is man page "erl -man erl_ddll", and I also found it in the Kernel manual. To quote it: "The erl_ddll module can load and link a linked-in driver, if run-time loading and linking of shared objects, or dynamic libraries, is supported by the underlying operat ing system." Tobbe's byteorder contribution uses this, although he also uses the old driver.h not the new erl_driver.h so I guess even more has changed in R6B. It looks like there is some queue-oriented stuff as well. All very nice, I just need to work out what it does and if/how to use it :-) Cheers, Bruce From kent@REDACTED Sun Aug 6 20:48:26 2000 From: kent@REDACTED (Kent Boortz) Date: 06 Aug 2000 20:48:26 +0200 Subject: erlang maintainer In-Reply-To: Ruslan Shevchenko's message of "Sun, 06 Aug 2000 17:47:45 +0300" References: <20000806162105.A4780@cichlids.cichlids.com> <398D7A91.A97B7B46@Shevchenko.Kiev.UA> Message-ID: We plan to start building and testing the OpenSource Erlang/OTP daily (like we do for the commercial Erlang/OTP). We have FreeBSD machines in our test lab. I will try to add the FreeBSD port and package building into the daily build. I can't at this time promise this but I will try to make it happen. This way the FreeBSD port/package will always be released at the same time as the source release. kent From pascal.brisset@REDACTED Sun Aug 6 20:50:58 2000 From: pascal.brisset@REDACTED (Pascal Brisset) Date: Sun, 6 Aug 2000 20:50:58 +0200 (CEST) Subject: Performance of send_message() In-Reply-To: <200008051124.e75BOgk59379@hades.cslab.ericsson.net> Message-ID: <200008061850.e76Iowk61949@hades.cslab.ericsson.net> OK, I found an explanation for both problems. The quadratic behaviour will definitely not happen in real applications. When beam 4.9.1 sends a constant object (atom, small int, etc), it allocates a useless off-heap message_buffer. This causes a GC every heap_sz/5 messages. Unfortunately, heap_sz remains constant, therefore GCs continue with the same frequency. I guess each GC needs to run through the message queue, hence the O(N^2) total time. Here's a possible patch. - Pascal Brisset +33 2 96051928 - - France Telecom R&D DTL/MSV | 2, av Pierre Marzin | F-22307 Lannion - --- otp_src_R6B-0/erts/emulator/beam/erl_message.c.dist Sun Aug 6 20:10:25 2000 +++ otp_src_R6B-0/erts/emulator/beam/erl_message.c Sun Aug 6 20:10:44 2000 @@ -190,8 +190,14 @@ token = copy_struct(SEQ_TRACE_TOKEN(sender), 6 /* TUPLE5 */, &hp, &receiver->off_heap); } else { + if ( msize ) { bp = new_message_buffer(msize); hp = bp->mem; + } + else { + bp = NULL; + hp = NULL; + } } message = copy_struct(message, msize, &hp, &receiver->off_heap); queue_message_tt(receiver, bp, message, token); From kent@REDACTED Sun Aug 6 21:07:06 2000 From: kent@REDACTED (Kent Boortz) Date: 06 Aug 2000 21:07:06 +0200 Subject: erlang maintainer In-Reply-To: Ruslan Shevchenko's message of "Sun, 06 Aug 2000 17:47:45 +0300" References: <20000806162105.A4780@cichlids.cichlids.com> <398D7A91.A97B7B46@Shevchenko.Kiev.UA> Message-ID: I got into the middle of this thread and was not really answering the question. The current maintainer of the FreeBSD Erlang port is Sebastian Strollo or . See http://www.erlang.org/download.html. kent From alex@REDACTED Sun Aug 6 21:13:59 2000 From: alex@REDACTED (Alexander Langer) Date: Sun, 6 Aug 2000 21:13:59 +0200 Subject: erlang maintainer In-Reply-To: ; from kent@erix.ericsson.se on Sun, Aug 06, 2000 at 09:07:06PM +0200 References: <20000806162105.A4780@cichlids.cichlids.com> <398D7A91.A97B7B46@Shevchenko.Kiev.UA> Message-ID: <20000806211359.A34889@cichlids.cichlids.com> Thus spake Kent Boortz (kent@REDACTED): > I got into the middle of this thread and was not really answering the > question. The current maintainer of the FreeBSD Erlang port is > Sebastian Strollo or . See > http://www.erlang.org/download.html. The current maintainer-address is @strollo.org, which is broken. alex:~ $ host strollo.org Host not found, try again. alex:~ $ host -t mx strollo.org Host not found, try again. That is why this thread came up. We must fix that. Is bluetail.com a valid address and Sebastian still active? Alex -- cat: /home/alex/.sig: No such file or directory From sam@REDACTED Mon Aug 7 10:30:25 2000 From: sam@REDACTED (Samuel Tardieu) Date: 07 Aug 2000 10:30:25 +0200 Subject: erlang maintainer In-Reply-To: Kent Boortz's message of "06 Aug 2000 21:07:06 +0200" References: <20000806162105.A4780@cichlids.cichlids.com> <398D7A91.A97B7B46@Shevchenko.Kiev.UA> Message-ID: <2000-08-07-10-30-25+trackit+sam@inf.enst.fr> >>>>> "Kent" == Kent Boortz writes: Kent> I got into the middle of this thread and was not really Kent> answering the question. The current maintainer of the FreeBSD Kent> Erlang port is Sebastian Strollo or Kent> . See http://www.erlang.org/download.html. And for those who have a doubt concerning the "liveness" of Sebastian, I can confirm that he is well alive; we exchanged some mails last week concerning precisely the FreeBSD port (more exactly SSL support and Mnesia 3.8.5). Sam -- Samuel Tardieu -- sam@REDACTED From bjowi@REDACTED Mon Aug 7 14:19:26 2000 From: bjowi@REDACTED (=?ISO-8859-1?Q?Bj=F6rn Wingman?=) Date: Mon, 7 Aug 2000 14:19:26 +0200 (MET DST) Subject: Mnesia session Message-ID: <200008071219.OAA27324@sture.lysator.liu.se> I'm trying to get a corba mnesia session working wich java (jacorb), and the manual says you should compile some idl-files. When I try to compile orber-3.0.1/COSS/CosNaming/cos_naming.idl with erlc +'{be, java}' /home/bjowi/pkg/erlang-R6B/lib/erlang/lib/orber-3.0.1/COSS/CosNaming/cos_naming.idl ...I get the error message below. Any ideas? /Bj?rn Wingman ---Long error printout--- Erlang IDL compiler version 3.8.1 Warning : Exceptions not supported for java mapping, "CosNaming::NamingContext::NotFound" ignored Warning : Exceptions not supported for java mapping, "CosNaming::NamingContext::CannotProceed" ignored Warning : Exceptions not supported for java mapping, "CosNaming::NamingContext::InvalidName" ignored Warning : Exceptions not supported for java mapping, "CosNaming::NamingContext::AlreadyBound" ignored Warning : Exceptions not supported for java mapping, "CosNaming::NamingContext::NotEmpty" ignored Fatal error : {function_clause,[{ic_java_type, getType, [{genobj, 17, undefined, 10, 11, 12, 13, 14, 15, 16, ["/home/bjowi/witas/dor/CosNaming/_NamingContextImplBase.java"], [{fd,#Port<0.24>,5}], [], ["/home/bjowi/witas/dor/CosNaming/_NamingContextStub.java"], [{fd,#Port<0.23>,4}], [], [], [], ["/home/bjowi/witas/dor/CosNaming/NamingContext.java"], [{fd,#Port<0.22>,3}], ["/home/bjowi/witas/dor/CosNaming/NamingContextHelper.java"], [{fd,#Port<0.25>,6}], ["/home/bjowi/witas/dor/CosNaming/NamingContextHolder.java"], [{fd,#Port<0.26>,7}], 1, true, false}, ["NamingContext","CosNaming"], {'Object',48}]}, {ic_jbe,gen_par_list,5}, {ic_jbe,emit_interface_prototypes,4}, {lists,foreach,2}, {ic_jbe,emit_interface,4}, {ic_jbe,gen_interface,3}, {ic_jbe,gen,3}, {ic,gen2,3}| more]} From nick@REDACTED Mon Aug 7 14:52:00 2000 From: nick@REDACTED (Niclas Eklund) Date: Mon, 7 Aug 2000 14:52:00 +0200 (MET DST) Subject: Mnesia session In-Reply-To: <200008071219.OAA27324@sture.lysator.liu.se> Message-ID: Hello! The IC Java BE is only for direct communication Java<->Erlang and uses the erlang external communication protocol. This protocol is not the same as CORBA IIOP/GIOP protocol. If you intend to use CORBA-communication you can only use IC to create erlang-stubs, thus, you have to use JacOrb's idl-compiler to generate java-stubs. It is not necessary to compile CosNaming for Orber or JacOrb since it's a part of the releases. If you want to use mnesia-session directly from java (without using CORBA) then CosNaming is not needed /Niclas On Mon, 7 Aug 2000, =?ISO-8859-1?Q?Bj=F6rn Wingman?= wrote: > I'm trying to get a corba mnesia session working wich java (jacorb), > and the manual says you should compile some idl-files. > > When I try to compile orber-3.0.1/COSS/CosNaming/cos_naming.idl with > > erlc +'{be, java}' /home/bjowi/pkg/erlang-R6B/lib/erlang/lib/orber-3.0.1/COSS/CosNaming/cos_naming.idl > > ...I get the error message below. > > Any ideas? > > /Bj?rn Wingman > > ---Long error printout--- > > Erlang IDL compiler version 3.8.1 > Warning : Exceptions not supported for java mapping, "CosNaming::NamingContext::NotFound" ignored From borge.fagerli@REDACTED Mon Aug 7 16:12:33 2000 From: borge.fagerli@REDACTED (borge.fagerli@REDACTED) Date: Mon, 7 Aug 2000 16:12:33 +0200 Subject: test suite design with erlang Message-ID: I'm currently working on a UML->TTCN translator. A Java program parses a .ptl file from Rational Rose and generates a ptl-summary file and a roles file as follows. In the end, an .mp file is generated for use in TTCN. ptl-summary example: ConnectionNoParam COL2:off_hook( ) COL3:Phone1 COL4:Port1 COL5:0 ConnectionNoParam COL2:dial_tone( ) COL3:Port1 COL4:Phone1 COL5:1 etc. The syntax is: TestCaseId:Packet Data Unit:Client:Supplier:Ordinal No. roles example: Port1:PCO Phone1:TestObject Phone2:TestObject Port2:PCO The test suite will need different toolboxes, such as bt(basic test tool) and also text parsing. The erlang code will read the ptl-summary file and roles file, generate test cases (PROCESS in bt-toolbox) for each TestCaseId with the corresponding PDU, write a log file (event handling?), stub out functions outside the unit under test, TRACE, PATTERN and VERIFY (included in bt-toolbox). I'm relatively new to erlang, and so far the problem lies in parsing the files for generating test cases. It seems that I will need a special toolbox for this, as this isn't regular pattern matching. The ptl-summary file example is a for a very simple PABX - the erlang program must be able to handle much larger files and systems. Any suggestions are appreciated! > B?rge A. Fagerli > Software Engineer, Professional Services > Telelogic Norge AS, Haakon VIIs gt 7A, N-7041 Trondheim, Norway > > Tel.no: +47 73 10 50 26, Mobile: +47 97 11 35 05, Fax: +47 73 10 50 01 > From seb@REDACTED Mon Aug 7 16:58:59 2000 From: seb@REDACTED (Sebastian Strollo) Date: 07 Aug 2000 16:58:59 +0200 Subject: erlang maintainer In-Reply-To: Alexander Langer's message of "Sun, 6 Aug 2000 21:13:59 +0200" References: <20000806162105.A4780@cichlids.cichlids.com> <398D7A91.A97B7B46@Shevchenko.Kiev.UA> <20000806211359.A34889@cichlids.cichlids.com> Message-ID: Alexander Langer writes: > Thus spake Kent Boortz (kent@REDACTED): > > > I got into the middle of this thread and was not really answering the > > question. The current maintainer of the FreeBSD Erlang port is > > Sebastian Strollo or . See > > http://www.erlang.org/download.html. > > The current maintainer-address is @strollo.org, which is broken. > > alex:~ $ host strollo.org > Host not found, try again. > alex:~ $ host -t mx strollo.org > Host not found, try again. > > That is why this thread came up. > We must fix that. Is bluetail.com a valid address and Sebastian still > active? Yes, sorry about the bad address (my nameservers are without a home temporarely and I had forgoten I had the strollo.org address in the port Makefile). I am however alive and well :-) although I was offline all day yesterday and today because we are changing offices. Anyways please change the address to and it should work fine. /Sebastian From kent@REDACTED Mon Aug 7 18:11:20 2000 From: kent@REDACTED (Kent Boortz) Date: 07 Aug 2000 18:11:20 +0200 Subject: test suite design with erlang In-Reply-To: 's message of "Mon, 7 Aug 2000 16:12:33 +0200" References: Message-ID: Are you talking about generating the test cases, i.e. the code or input to the testing or are you talking about investigating the test result from a test run? In other words, what is the "ptl-summary"? A specification for a test run or the result from one? Maybe your question is to someone that know rational rose, I don't know what "bt(basic test tool)" or "PROCESS in bt-toolbox" is all about. If the parsing is a problem is to be done off-line and a lot more complicated than in the small example you sent, why not use Perl for parsing (if you know Perl) and let it output the summary in a more easy to read format for Erlang. The summary lines you gave above can be parsed and tranform to the text representation of a term with print "[\n"; while () { chomp; # You got to looove Perl ;-) print " [",join(",",map {"\"$_\""} split(/\s*COL\d+:/)),"]"; print eof(DATA) ? "\n" : ",\n"; } print "].\n"; __DATA__ ConnectionNoParam COL2:off_hook( ) COL3:Phone1 COL4:Port1 COL5:0 ConnectionNoParam COL2:dial_tone( ) COL3:Port1 COL4:Phone1 COL5:1 and the output can be read with 1> file:consult("r.term"). {ok,[[["ConnectionNoParam","off_hook( )","Phone1","Port1","0"], ["ConnectionNoParam","dial_tone( )","Port1","Phone1","1"]]]} This will of cause not work if the summary files are huge and you can't have it all in memory. A solution in Erlang could be to read line by line, something like the attached file below. Problem is that parsing code like this often gets messy. A better solution might be to use the regexp:split() function and split each line on " COL[0-9]+:". kent -------------- next part -------------- A non-text attachment was scrubbed... Name: ttt.erl Type: application/octet-stream Size: 1894 bytes Desc: Ad hoc parsing example URL: From Bruce@REDACTED Mon Aug 7 21:03:11 2000 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Mon, 7 Aug 2000 21:03:11 +0200 Subject: Discoveries and Problems with dynamic linked-in drivers Message-ID: <019001c000a2$222efaa0$0121970a@fitzsimons.org> Okay, For those of your who are interested, I've found a script that builds the static driver table at ~/otp_src_R6B-0/erts/emulator/utils/make_driver_tab thats called from the makefile. It seems to search for drivers with a certain naming convention/location. But now I've seen how dynamic drivers can work using erl_ddll, I'm more interested in making one of those. The documentation is really helpful, and I've got one compiled, but.... when I load any type of driver, including Tobbes little byteorder driver, I get 4> erl_ddll:load_driver("/root/byteorder-1.0","byteorder_driver"). {error,{open_error,"/root/byteorder-1.0/byteorder_driver.so: undefined symbol: null_func"}} I replaced null_func with NULL and I get an undefined symbol on driver_output...so somethings wrong. I'm running under Linux R6B. All the driver functions are defined in io.c, which should be linked into erl (I guess) so I'm lost as to why its "undefined". The linked in drivers also use these functions, and they work, but I guess they are statically linked and I want to dynamically link. Can anyone help? Cheers, Bruce From matthias@REDACTED Mon Aug 7 22:37:58 2000 From: matthias@REDACTED (matthias@REDACTED) Date: Mon, 7 Aug 2000 15:37:58 -0500 (CDT) Subject: Scheme and Functional Programming 2000 Message-ID: <200008072037.PAA13001@africa.cs.rice.edu> ============================================================================ CALL FOR PARTICIPATION Scheme and Functional Programming Montreal, Canada, 17 September 2000 The workshop forms part of PLI 2000, which consists of the ICFP and PPDP conferences and other workshops. http://www.cs.rice.edu/~matthias/Scheme2000/ ============================================================================ Background and Theme: --------------------- Over the past few years, Scheme and its implementations have made tremendous progress in support of generative programming, shell scripting, COMponent support and distributed programming, graphics and GUI support, OO programming, and various other aspects of engineering real-world software. We are calling on implementors and users of Scheme systems to share their ideas at a workshop during PLI 2000 in Montreal. Program: -------- The program committee has selected five papers for long presentations and six papers for short presentations. The topics range from 3-dimensional projective geometry, COM support, and embedded applications to traditional themes such as macros. The workshop will end with an open discussion of Scheme issues. At this moment, the organizers foresee a discussion of the SRFI process and pre-SRFI presentations. If you wish to present a topic for this session, please send mail to Matthias Felleisen. For the actual program, please visit the Scheme 2000 web site: http://www.cs.rice.edu/~matthias/Scheme2000/ Registration: ------------- The workshop is collocated with PLI 2000 in Montreal. Please register for the workshop through the PLI Web site: http://www.cs.yorku.ca/pli-00/pli.html#registration Program committee ------------------ Kent Dybvig, Indiana University Marc Feeley, Universit? de Montr?al Matthias Felleisen, Rice University Daniel Friedman, Indiana University Manuel Serrano, Universit? de Nice (Sophia-Antipolis) Olin Shivers, Massachusetts Institute of Technology ============================================================================ From klacke@REDACTED Tue Aug 8 00:15:25 2000 From: klacke@REDACTED (Klacke) Date: Tue, 8 Aug 2000 00:15:25 +0200 Subject: Discoveries and Problems with dynamic linked-in drivers In-Reply-To: <019001c000a2$222efaa0$0121970a@fitzsimons.org> References: <019001c000a2$222efaa0$0121970a@fitzsimons.org> Message-ID: <20000808001525.A23008@bluetail.com> On Mon, Aug 07, 2000 at 09:03:11PM +0200, Bruce Fitzsimons wrote: > 4> erl_ddll:load_driver("/root/byteorder-1.0","byteorder_driver"). > {error,{open_error,"/root/byteorder-1.0/byteorder_driver.so: undefined > symbol: null_func"}} > This is typically what happens when the emulator is built without exporting it's symbols. Linux build needs a -rdynamic, free-bsd needs, -export-dynamic etc. The driver is loaded into the emulator and the loader tries to resolve the symbols it needs from the emulator. This should work "out of the box" though ?? /klacke -- Claes Wikstrom Bluetail AB http://www.bluetail.com From luc.taesch@REDACTED Tue Aug 8 11:20:14 2000 From: luc.taesch@REDACTED (luc.taesch@REDACTED) Date: Tue, 8 Aug 2000 11:20:14 +0200 Subject: record _info and guard record(X) seems to refuse variable as argument. Message-ID: record _info and guard record(X) seems to refuse variable as argument. can someone confirm that ? From luc.taesch@REDACTED Tue Aug 8 11:35:11 2000 From: luc.taesch@REDACTED (luc.taesch@REDACTED) Date: Tue, 8 Aug 2000 11:35:11 +0200 Subject: record _info and guard record(X) seems to refuse variable as argument. Message-ID: sorry , previsou posting was unclear. i mean, record_info refuse variable as table name. From hakan@REDACTED Tue Aug 8 12:09:26 2000 From: hakan@REDACTED (Hakan Mattsson) Date: Tue, 8 Aug 2000 12:09:26 +0200 (MET DST) Subject: does mnesia:load_textfile still work ? In-Reply-To: <3984644E.72445FD9@abom.com> Message-ID: On Sun, 30 Jul 2000, Luc Taesch wrote: Luc> i cant make mnesia:load_textfile work. Luc> Luc> the file i use is created from a dump_to_textfile, and is very basic Luc> Luc> i got the message: Luc> Luc> ***table funky already exists, just entering data Luc> Luc> {aborted,{no_exists,funky}} Luc> Luc> and no data are entered, nor table created. Luc> Luc> textfile:{tables,[{funky,[key,val]}]}. Luc> Luc> {funky,k1,v1}. Try with a textfile containing: {tables,[{funky,[{attributes, [key,val]}]}]}. {funky,k1,v1}. or simply: {tables,[{funky,[]}]}. {funky,k1,v1}. /H?kan --- H?kan Mattsson Ericsson Computer Science Laboratory http://www.ericsson.se/cslab/~hakan From borge.fagerli@REDACTED Tue Aug 8 12:22:15 2000 From: borge.fagerli@REDACTED (borge.fagerli@REDACTED) Date: Tue, 8 Aug 2000 12:22:15 +0200 Subject: test suite design in Erlang Message-ID: Ok, I'm gonna clarify below... > -----Original Message----- > From: Kent Boortz [SMTP:kent@REDACTED] > Sent: Monday, August 07, 2000 6:11 PM > To: borge.fagerli@REDACTED > Cc: erlang-questions@REDACTED > Subject: Re: test suite design with erlang > > > Are you talking about generating the test cases, i.e. the code > or input to the testing or are you talking about investigating > the test result from a test run? > > In other words, what is the "ptl-summary"? A specification for a test > run or the result from one? > The basis is a Message Sequence Chart in UML consisting of 4 units: Phone 1, Port 1, Port 2 and Phone 2. The ptl file is a textual representation of the different units and processes, as well as graphics interface in the given system. The ptl-summary file extracts the needed data for generating an mp-file for TTCN. The files: Excerpt from the ptl-summary file generated by the java program, with the testcases ConnectionNoParam and BusyConnection: ConnectionNoParam COL2:off_hook( ) COL3:Phone1 COL4:Port1 COL5:0 ConnectionNoParam COL2:dial_tone( ) COL3:Port1 COL4:Phone1 COL5:1 ConnectionNoParam COL2:dial_no(Byte) COL3:Phone1 COL4:Port1 COL5:2 ConnectionNoParam COL2:dial_no(Byte) COL3:Phone1 COL4:Port1 COL5:3 ConnectionNoParam COL2:dial_no(Byte) COL3:Phone1 COL4:Port1 COL5:4 ConnectionNoParam COL2:connection(String) COL3:Port1 COL4:Phone1 COL5:9 ConnectionNoParam COL2:start_ringing( ) COL3:Port1 COL4:Port2 COL5:5 ConnectionNoParam COL2:ringing_tone( ) COL3:Port2 COL4:Phone2 COL5:6 ConnectionNoParam COL2:off_hook( ) COL3:Phone2 COL4:Port2 COL5:7 ConnectionNoParam COL2:connect(String) COL3:Port2 COL4:Port1 COL5:8 ConnectionNoParam COL2:connection(String) COL3:Port2 COL4:Phone2 COL5:10 BusyConnection COL2:off_hook( ) COL3:Phone1 COL4:Port1 COL5:0 BusyConnection COL2:dial_tone( ) COL3:Port1 COL4:Phone1 COL5:1 BusyConnection COL2:dial_no(1) COL3:Phone1 COL4:Port1 COL5:2 BusyConnection COL2:dial_no(2) COL3:Phone1 COL4:Port1 COL5:3 BusyConnection COL2:dial_no(3) COL3:Phone1 COL4:Port1 COL5:4 BusyConnection COL2:busy_tone( ) COL3:Port1 COL4:Phone1 COL5:5 The roles.out file: Port1:PCO Phone1:TestObject Phone2:TestObject Port2:PCO I want to generate a test case in erlang, using the bt-toolbox (which is actually only found in the Ericsson database, restricted access). er_test_SUITE.erl , Basic test of Event Recording. Commands: PROC: Creates test procedure heading/log file/export function PATTERN: Create sting pattern to match TRACE: Write expression to log file VERIFY: Compare string pattern with log file Extract from this, with the units nonera_c (Test Object), nsw_gx(stub), ncs_SystemWorker(stub): PROC set_er_new_extid Fun1 = fun(Arg1) -> {fault, my_cid, [Arg1], my node} end, Fun2 = fun(Arg1, Arg2, Arg3, Arg4, Arg5, Arg6) -> {ok,void} end, bt:stub_start ( ), bt:stub_fun_def (nsw_gx, get_X_data_given_extId, Fun1) , bt:stub_fun_def (ncs_SystemWorker, cast, Fun2) , mnesia:delete_table(er_data), nonera_c:start_restart(void, 130, create, no_args), nonera_c:set_event_recording(void, "IMSI, 12345", ["GPRSAttach, true", "GPRSDetach, false", "GPRSTest, true"], my_log), bt:stub_stop( ), Key = mnesia:dirty_first(er_data), TRACE mnesia:dirty_read({er_data, Key}), PATTERN "no_cid" VERIFY TRACE_END The ptl-summary and the roles.out files should then be parsed, and testcases be generated for each event. The testcases will be different depending on who is Test Object, who is PCO, who is stub etc., and these are defined in the Roles.out file. Of course, Perl will be easier, but the original idea was to implement this in Erlang. I've been working on this for a couple of weeks now, and it's rather easy to adapt the basic framework in the example above to a given set of units and messages. The real problem lies in making the erlang program universally able to read ANY ptl-summary file and generate testcases for each and every event, creating the stubs etc. Thanks for all the help! > B?rge A. Fagerli > Software Engineer, Professional Services > Telelogic Norge AS, Haakon VIIs gt 7A, N-7041 Trondheim, Norway > > Tel.no: +47 73 10 50 26, Mobile: +47 97 11 35 05, Fax: +47 73 10 50 01 > From tony@REDACTED Tue Aug 8 13:19:14 2000 From: tony@REDACTED (Tony Rogvall) Date: Tue, 08 Aug 2000 13:19:14 +0200 Subject: Tcp {active, true} problem References: Message-ID: <398FECB2.2EC0037D@bluetail.com> Martin Logan wrote: > Hello all, > I am writing a proxy server in erlang. I have run into a slight > problem with gen_tcp. I am using {active, true} and receiving with > > receive > {tcp, Socket, Packet} -> > end > > If I send packets to this at a 500 milliseconds apart I receive all of the > packets perfectly and the proxy works well. My problem arises when I send > a number of packets quickly( < 500 ms). I receive them as one large ascii > string. I was wondering, befor I write a parser of sorts, if there is some > other way to deal with this problem. > Thank you, > Martin Logan As you already seen you can use {packet,1 | 2 | 4} to let the erlang driver packetize the data for you. I think the option {nodelay, true} might be of interest in this case. TCP_NODELAY option is used to set aside the buffering algorithm in the os kernel tcp/ip driver, leading to that the data is sent as quickly as possible and not optimized as stream data. -- /Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: tony.vcf Type: text/x-vcard Size: 352 bytes Desc: Card for Tony Rogvall URL: From ingela@REDACTED Tue Aug 8 12:50:32 2000 From: ingela@REDACTED (Ingela Anderton) Date: Tue, 8 Aug 2000 12:50:32 +0200 (MET DST) Subject: record _info and guard record(X) seems to refuse variable as argument. References: Message-ID: <200008081050.MAA06704@townsend.ericsson.se> luc.taesch@REDACTED wrote: > sorry , previsou posting was unclear. > > i mean, record_info refuse variable as table name. Well, that is because all records are handled by the precompiler and all reference to records are translated into tuples and tuple functions. I had a similar problem where I wanted to be able to be able to traverse a set of records creating lists with the record fields that where not undefined. I solved the problem with help of the following structure where I automatically generated the select function with an appropriate fun. -record(header, {title, bold, % true | false title_align, title_valign }). ... fields(header) -> record_info(fields, header); ... select(Record, header, title) -> Record#header.title; select(Record, header, bold) -> Record#header.bold; select(Record, header, title_align) -> Record#header.title_align; select(Record, header, title_valign) -> Record#header.title_valign; .... -- /m.v.h Ingela //The highway of life is always under construction. // |\ _,,,--,,_ ,) /,`.-'`' -, ;-;;' |,4- ) )-,_ ) /\ '---''(_/--' (_/-' Ericsson Utvecklings AB Phone : +46 8 719 18 13 Open Systems (f.d. Erlang Systems) Cellular/Mobile: +46 70 636 78 68 Torshamnsgatan 39 B Box 1214 http://www.erlang.se S-164 28 KISTA, SWEDEN ingela@REDACTED From kent@REDACTED Tue Aug 8 15:14:31 2000 From: kent@REDACTED (Kent Boortz) Date: 08 Aug 2000 15:14:31 +0200 Subject: Tcp {active, true} problem In-Reply-To: Tony Rogvall's message of "Tue, 08 Aug 2000 13:19:14 +0200" References: <398FECB2.2EC0037D@bluetail.com> Message-ID: >> problem with gen_tcp. I am using {active, true} and receiving with >> >> receive >> {tcp, Socket, Packet} -> >> end >> >> If I send packets to this at a 500 milliseconds apart I receive all of the >> packets perfectly and the proxy works well. My problem arises when I send >> a number of packets quickly( < 500 ms). I receive them as one large ascii >> string. I was wondering, befor I write a parser of sorts, if there is some >> other way to deal with this problem. > > As you already seen you can use {packet,1 | 2 | 4} to let the erlang driver > packetize the data for you. > I think the option {nodelay, true} might be of interest in this case. > TCP_NODELAY option is used to set aside the buffering algorithm in the os > kernel tcp/ip driver, leading to that the data is sent as quickly as possible > and not optimized as stream data. Are you sure that the TCP_NODELAY has that exact meaning, i.e. that it sets aside *all* buffering? I think the OS may choose to combine the data from two write operations even with that flag set. The opposite problem may also happen if the machine has some load, one larger "packet" sent may show up as two separate messages in Erlang. It may work to ignore this in 99.9% of the cases but a small OS upgrade or some load on the machine or network may easily break the code. I have in the past seen this problem while testing a product well known to all on this list ;-) kent From bjornfot@REDACTED Tue Aug 8 16:04:01 2000 From: bjornfot@REDACTED (Lars Bjornfot) Date: Tue, 08 Aug 2000 16:04:01 +0200 Subject: Tcp {active, true} problem References: <398FECB2.2EC0037D@bluetail.com> Message-ID: <39901351.1708DC69@erix.ericsson.se> Kent Boortz wrote: > > >> problem with gen_tcp. I am using {active, true} and receiving with > >> > >> receive > >> {tcp, Socket, Packet} -> > >> end > >> > >> If I send packets to this at a 500 milliseconds apart I receive all of the > >> packets perfectly and the proxy works well. My problem arises when I send > >> a number of packets quickly( < 500 ms). I receive them as one large ascii > >> string. I was wondering, befor I write a parser of sorts, if there is some > >> other way to deal with this problem. > > > > As you already seen you can use {packet,1 | 2 | 4} to let the erlang driver > > packetize the data for you. > > I think the option {nodelay, true} might be of interest in this case. > > TCP_NODELAY option is used to set aside the buffering algorithm in the os > > kernel tcp/ip driver, leading to that the data is sent as quickly as possible > > and not optimized as stream data. > > Are you sure that the TCP_NODELAY has that exact meaning, i.e. that it > sets aside *all* buffering? I think the OS may choose to combine the > data from two write operations even with that flag set. The opposite > problem may also happen if the machine has some load, one larger > "packet" sent may show up as two separate messages in Erlang. It may > work to ignore this in 99.9% of the cases but a small OS upgrade or > some load on the machine or network may easily break the code. TCP_NODELAY disables the Nagle algorithm. Nagle means the sender buffers data to send full frames, or at least waits until all outstanding frames are acknowledged before sending non-full frames. Disabling Nagle will probably give more network traffic. Reduced throughput and reduced latency. This may be what you want. But don't use it to impose some packet scheme. TCP is a stream. It is never safe to trust that a "packet" is sent in one piece and received in one piece, regardless of TCP_NODELAY. More on Nagle: http://www.cyberport.com/~tangent/programming/winsock/intermediate.html#nagle-desc Lasse From Bruce@REDACTED Tue Aug 8 19:42:32 2000 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Tue, 8 Aug 2000 19:42:32 +0200 Subject: Discoveries and Problems with dynamic linked-in drivers References: <019001c000a2$222efaa0$0121970a@fitzsimons.org> <20000808001525.A23008@bluetail.com> Message-ID: <02c001c00160$090e1560$0121970a@fitzsimons.org> > This is typically what happens when the emulator is built > without exporting it's symbols. > Linux build needs a -rdynamic, free-bsd needs, -export-dynamic etc. > The driver is loaded into the emulator and the loader tries to > resolve the symbols it needs from the emulator. > > This should work "out of the box" though ?? Thanks mate, I've just found a patch (on the web page...) that I haven't applied. Thanks once again for the the fast response and inside info though, I'm beginning to understand how dynamic libaries hang together under unix. Cheers, Bruce From conrad@REDACTED Tue Aug 8 21:11:54 2000 From: conrad@REDACTED (Mike Tilstra) Date: Tue, 8 Aug 2000 14:11:54 -0500 Subject: packet unstuffing. Message-ID: <20000808141154.H24822@sistina.com> I must be missing something obivious. I'm trying to write a server that responds to requests over TCP. The request comes in a packed network byte order structure. How do I pull this apart? Is there anything like perl's pack, unpack functions? Or will I need to write all of the code to do that? I think I see how to seperate the fields using the binary commands, but how do I get the numbers into the correct byte order? Thanks, -- Mike Tilstra conrad@REDACTED Today, I am the bug. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 232 bytes Desc: not available URL: From scott@REDACTED Tue Aug 8 23:53:24 2000 From: scott@REDACTED (Scott Lystig Fritchie) Date: Tue, 08 Aug 2000 16:53:24 -0500 Subject: packet unstuffing. In-Reply-To: Message of "Tue, 08 Aug 2000 14:11:54 CDT." <20000808141154.H24822@sistina.com> Message-ID: <200008082153.QAA20705@snookles.snookles.com> >>>>> "mt" == Mike Tilstra writes: mt> I must be missing something obivious. I'm trying to write a mt> server that responds to requests over TCP. The request comes in a mt> packed network byte order structure. How do I pull this apart? Until the Erlang "bit syntax" arrives, you've got to do it yourself. If the finished product looks like the research paper I've seen (http://www.erlang.se/euc/99/binaries.ps), Erlang will be a *really* sweet language to develop byte- and bit-twiddling protocols. Jim Larson and I are finally getting our collective acts together to rerelease a Sun/ONC RPC package ... but it's probably worth sending the basic XDR encoding & decoding functions to the mailing list now, just in case someone else is in the same situation that Mike is. A couple of notes: * These functions are friendly with data in binary objects. If you're dealing with byte lists, it's an exercise for the reader to adapt the module. * ONC/RPC XDR-encoded objects can have a variable length. Accordingly, a decoding function must tell you were it left off, in case you need to decode the next XDR-encoded object within the binary. Each dec_* function is called with a tuple {Binary, Position} and you get back a tuple {DecodedObject, {Binary, NewPosition}}. This makes sense if you're decoding a complex XDR data structure, e.g. (*) dec_readargs(_1) -> begin {_2,_3} = xdrlib:dec_byte_varray(_1,512), {_4,_5} = xdrlib:dec_unsigned_int(_3), {_6,_7} = xdrlib:dec_unsigned_int(_5), {{_2,_4,_6},_7} end. ... but is probably overkill for what Mike needs. Still, this should be a sufficient illustration of what needs to be done. -Scott (*) OK, so that example looks ugly. It's code automatically generated by "erpcgen", part of the RPC package we inherited from Tony Rogvall (thanks again!) and really will be recontributing to the community really soon now, really. :-) --- snip #1 of 2 --- snip #1 of 2 --- snip #1 of 2 --- snip #1 of 2 --- %%% File : xdrlib.hrl %%% Author : Tony Rogvall %%% Purpose : XDR integer macros %%% Created : 15 Aug 1997 by Tony Rogvall -author('tony@REDACTED'). -define(enc_unsigned_int(X), list_to_binary([((X) bsr 24) band 16#ff, ((X) bsr 16) band 16#ff, ((X) bsr 8) band 16#ff, (X) band 16#ff])). -define(enc_int(X), ?enc_unsigned_int(X)). -define(enc_unsigned_hyper(X), list_to_binary([((X) bsr 56) band 16#ff, ((X) bsr 48) band 16#ff, ((X) bsr 40) band 16#ff, ((X) bsr 32) band 16#ff, ((X) bsr 24) band 16#ff, ((X) bsr 16) band 16#ff, ((X) bsr 8) band 16#ff, (X) band 16#ff])). -define(enc_hyper(X), ?enc_unsigned_hyper(X)). -define(enc_bool(X), if (X) == true -> list_to_binary([0,0,0,1]); (X) == false -> list_to_binary([0,0,0,0]) end). --- snip #2 of 2 --- snip #2 of 2 --- snip #2 of 2 --- snip #2 of 2 --- %% xdrlib.erl %% %% XDR basic type encode/decode %% %% Decode routines: dec({Binary,Pos}) -> {Value, {Binary,NewPos}} %% Encode routines: enc(Elem) -> List %% -module(xdrlib). -compile([verbose, report_errors, report_warnings, trace]). -export([enc_int/1, dec_int/1, enc_unsigned_int/1, dec_unsigned_int/1, enc_hyper/1, dec_hyper/1, enc_unsigned_hyper/1, dec_unsigned_hyper/1, enc_bool/1, dec_bool/1, enc_float/1, dec_float/1, enc_double/1, dec_double/1, enc_byte_array/2, dec_byte_array/2, enc_byte_varray/2, dec_byte_varray/2]). -export([map/2, map_elem/3, map_velem/4]). -export([clnt_call/5, io_list_len/1, enc_align/1]). %% %% int %% enc_int(X) -> list_to_binary([((X) bsr 24) band 16#ff, ((X) bsr 16) band 16#ff, ((X) bsr 8) band 16#ff, (X) band 16#ff]). dec_int({B, P}) -> [X3,X2,X1,X0] = binary_to_list(B, P, P+3), X = (X3 bsl 24) + (X2 bsl 16) + (X1 bsl 8) + X0, if X3 >= 16#80 -> {X - 16#100000000, {B,P+4}}; true -> {X, {B,P+4}} end. %% %% unsigned_int %% enc_unsigned_int(X) -> list_to_binary([((X) bsr 24) band 16#ff, ((X) bsr 16) band 16#ff, ((X) bsr 8) band 16#ff, (X) band 16#ff]). %%XXXYYYXXX dec_unsigned_int({B, P}) -> %%XXXYYYXXX {erlang:decode_unsigned_int(B, P), {B,P+4}}. %%XXXYYYXXX {slf_exp:decode_unsigned_int(B, P), {B,P+4}}. dec_unsigned_int({B, P}) -> [X3,X2,X1,X0] = binary_to_list(B, P, P+3), {(X3 bsl 24) + (X2 bsl 16) + (X1 bsl 8) + X0, {B,P+4}}. %% %% hyper %% enc_hyper(X) -> list_to_binary([((X) bsr 56) band 16#ff, ((X) bsr 48) band 16#ff, ((X) bsr 40) band 16#ff, ((X) bsr 32) band 16#ff, ((X) bsr 24) band 16#ff, ((X) bsr 16) band 16#ff, ((X) bsr 8) band 16#ff, (X) band 16#ff]). dec_hyper({B, P}) -> [X7,X6,X5,X4,X3,X2,X1,X0] = binary_to_list(B, P, P+7), X = (X7 bsl 56) + (X6 bsl 48) + (X5 bsl 40) + (X4 bsl 32) + (X3 bsl 24) + (X2 bsl 16) + (X1 bsl 8) + X0, if X7 >= 16#80 -> {X - 16#10000000000000000, {B,P+8}}; true -> {X, {B,P+8}} end. %% %% unsigned_hyper %% enc_unsigned_hyper(X) -> list_to_binary([((X) bsr 56) band 16#ff, ((X) bsr 48) band 16#ff, ((X) bsr 40) band 16#ff, ((X) bsr 32) band 16#ff, ((X) bsr 24) band 16#ff, ((X) bsr 16) band 16#ff, ((X) bsr 8) band 16#ff, (X) band 16#ff]). dec_unsigned_hyper({B, P}) -> [X7,X6,X5,X4,X3,X2,X1,X0] = binary_to_list(B, P, P+7), {(X7 bsl 56) + (X6 bsl 48) + (X5 bsl 40) + (X4 bsl 32) + (X3 bsl 24) + (X2 bsl 16) + (X1 bsl 8) + X0, {B,P+8}}. %% %% bool %% enc_bool(true) -> list_to_binary([0,0,0,1]); enc_bool(false) -> list_to_binary([0,0,0,0]). dec_bool({B, P}) -> case binary_to_list(B, P, P+3) of [0,0,0,0] -> {false, {B,P+4}}; [0,0,0,1] -> {true, {B,P+4}} end. %% %% Float [S=1 | E=8 | F=23] %% X = (-1)^S * 2^(E-127) * 1.F %% -define(FLOAT_BASE, 16#800000). -define(FLOAT_BIAS, 127). enc_float(X) when float(X) -> {S, E, F} = enc_ieee(X, ?FLOAT_BASE, ?FLOAT_BIAS), list_to_binary([ (S bsl 7) bor ((E bsr 1) band 16#7f), ((F bsr 16) band 16#7f) bor ((E band 1) bsl 7), (F bsr 8) band 16#ff, (F band 16#ff) ]). dec_float({B, P}) -> [X3,X2,X1,X0] = binary_to_list(B, P, P+3), E = (X3 band 16#7f) bsl 1 + (X2 bsr 7), F = (X2 band 16#7f) bsl 16 + (X1 bsl 8) + X0, if E == 0, F == 0 -> {0.0, {B,P+4}}; X3 >= 16#80 -> {-scale_float(E-?FLOAT_BIAS, (1 + F / ?FLOAT_BASE)), {B,P+4}}; true -> {scale_float(E-?FLOAT_BIAS, (1 + F / ?FLOAT_BASE)), {B,P+4}} end. %% %% Double [S=1 | E=11 | F=52] %% X = (-1)^S * 2^(E-1023) * 1.F -define(DOUBLE_BASE, 16#10000000000000). -define(DOUBLE_BIAS, 1023). enc_double(X) when float(X) -> {S, E, F} = enc_ieee(X, ?DOUBLE_BASE, ?DOUBLE_BIAS), list_to_binary([ (S bsl 7) bor ((E bsr 4) band 16#7f), ((F bsr 48) band 16#0f) bor ((E band 16#f) bsl 4), (F bsr 40) band 16#ff, (F bsr 32) band 16#ff, (F bsr 24) band 16#ff, (F bsr 16) band 16#ff, (F bsr 8) band 16#ff, (F band 16#ff) ]). dec_double({B, P}) -> [X7,X6,X5,X4,X3,X2,X1,X0] = binary_to_list(B, P, P+7), E = (X7 band 16#7f) bsl 4 + (X6 bsr 4), F = (X6 band 16#0f) bsl 48 + (X5 bsl 40) + (X4 bsl 32) + (X3 bsl 24) + (X2 bsl 16) + (X1 bsl 8) + X0, if E == 0, F == 0 -> {0.0, {B,P+8}}; X7 >= 16#80 -> {-scale_float(E-?DOUBLE_BIAS, (1 + F / ?DOUBLE_BASE)), {B,P+8}}; true -> {scale_float(E-?DOUBLE_BIAS, (1 + F / ?DOUBLE_BASE)), {B,P+8}} end. %% %% unscale a float return {Sign, Exponent, Fraction} %% enc_ieee(X, Base, Bias) when X < 0 -> {E,F} = unscale_float(-X), {1, E + Bias, trunc((F-1)*Base)}; enc_ieee(X, Base, Bias) when X > 0 -> {E,F} = unscale_float(X), {0, E + Bias, trunc((F-1)*Base)}; enc_ieee(X, _, _) -> {0, 0, 0}. scale_float(E, M) when E >= 0 -> (1 bsl E) * M; scale_float(E, M) -> 1/(1 bsl -E) * M. unscale_float(X) when X == 1.0 -> {0, 0}; unscale_float(X) when X > 1.0 -> exp_down(X, 0); unscale_float(X) when X < 1.0 -> exp_up(X, 0); unscale_float(X) -> {0, X}. exp_down(X, E) when X >= 2 -> exp_down(X / 2, E+1); exp_down(X, E) -> {E, X}. exp_up(X, E) when X < 1 -> exp_up(X * 2, E-1); exp_up(X, E) -> {E, X}. %% %% opaque[N] %% enc_byte_array(Data, N) -> Len = io_list_len(Data), if Len == N -> true; true -> exit({xdr,limit}) end, list_to_binary([Data, enc_align(Len)]). dec_byte_array({B, P}, 0) -> %% Special clause to handle the case where P is past the %% end of the binary. {list_to_binary([]), {B, P}}; dec_byte_array({B, P}, N) -> {B1, B2} = split_binary(B, P-1), {B3, B4} = split_binary(B2, N), %% Count carefully! Recall that P is a 1-based index. {B3, {B, P+align(N)}}. %dec_byte_array_string_flavor({B, P}, N) -> % {binary_to_list(B, P, P+N-1), {B,align(P+N)}}. %% %% variable byte array %% enc_byte_varray(Data, Max) when integer(Max) -> Len = io_list_len(Data), if Max >= Len -> true; true -> exit({xdr, limit}) end, %% Rely on enc_unsigned_int() and enc_align to give us binaries. %% Assume that Data is a binary, also. (Won't hurt if it isn't, though). case Len rem 4 of 0 -> [enc_unsigned_int(Len), Data]; _ -> [enc_unsigned_int(Len), Data, enc_align(Len)] end; enc_byte_varray(Data, max) -> Len = io_list_len(Data), %% Ditto. case Len rem 4 of 0 -> [enc_unsigned_int(Len), Data]; _ -> [enc_unsigned_int(Len), Data, enc_align(Len)] end. dec_byte_varray(R0, Max) when integer(Max) -> {N,R1} = dec_unsigned_int(R0), if Max >= N -> true; true -> exit({xdr, limit}) end, dec_byte_array(R1, N); dec_byte_varray(R0, max) -> {N,R1} = dec_unsigned_int(R0), dec_byte_array(R1, N). %% not dependant on lists !!! rev([H|T], L) -> rev(T, [H|L]); rev([], L) -> L. enc_align(Len) -> case Len rem 4 of 0 -> []; 1 -> list_to_binary([0,0,0]); 2 -> list_to_binary([0,0]); 3 -> list_to_binary([0]) end. %dec_align({B, P}) -> % Len = dec_unsigned_int({B, P}), % case Len rem 4 of % 0 -> Len; % 1 -> Len+3; % 2 -> Len+2; % 3 -> Len+1 % end. % Increment the argument a minimal amount to bring it to a multiple of 4. align(Len) -> case Len rem 4 of 0 -> Len; 1 -> Len+3; 2 -> Len+2; 3 -> Len+1 end. %% %% io list length %% %%%XXXYYYXXX io_list_len(L) -> erlang:iolistlen(L). %%%XXXYYYXXX io_list_len(L) -> slf_exp:io_list_len(L). io_list_len(L) -> io_list_len(L, 0). io_list_len([H|T], N) -> if H >= 0, H =< 255 -> io_list_len(T, N+1); list(H) -> io_list_len(T, io_list_len(H,N)); binary(H) -> io_list_len(T, size(H) + N); true -> exit({xdr, opaque}) end; io_list_len(H, N) when binary(H) -> size(H) + N; io_list_len([], N) -> N. %% %% map_elem(fun(R) -> call(R), R0, N) %% %% map_velem(Fun, R0, max, N) -> map_elem0(Fun, R0, N, []); map_velem(Fun, R0, Max, N) when N =< Max -> map_elem0(Fun, R0, N, []). map_elem(Fun, R0, Size) -> map_elem0(Fun, R0, Size, []). map_elem0(Fun, R0, 0, L) -> {rev(L,[]), R0}; map_elem0(Fun, R0, N, L) -> {E,R1} = Fun(R0), map_elem0(Fun, R1, N-1, [E|L]). %% %% %% map(F, [Hd|Tail]) -> E = F(Hd), [E | map(F, Tail)]; map(F, []) -> []. %% %% Rpc stuff %% clnt_call(Clnt,Proc,Ver,Prog,Args) -> gen_server:call(Clnt, {rpc,Prog,Ver,Proc,Args}). From ltaesch@REDACTED Tue Aug 8 05:21:21 2000 From: ltaesch@REDACTED (Luc Taesch) Date: Tue, 08 Aug 2000 05:21:21 +0200 Subject: how many erlscriptalias directive can i have? Message-ID: <398F7CB1.A196C86D@abom.com> how many erlscriptalias directive can i have? when i have more than one , things goes wrong (have tried separated with 0,1 ,2 lines) -- First, they ignore you. Then, they laugh at you. Then, they fight you. Then, you win. --- Gandhi. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjarne@REDACTED Wed Aug 9 16:09:36 2000 From: bjarne@REDACTED (Bjarne =?iso-8859-1?Q?D=E4cker?=) Date: Wed, 09 Aug 2000 16:09:36 +0200 Subject: Erlang User Conference, October 3, Stockholm Message-ID: <39916620.764B9A3C@erix.ericsson.se> Call for Participation Erlang users and other interested parties are invited to the Sixth Erlang/OTP User Conference which will take place in ?lvsj?, Stockholm, on the 3rd of October. All information, conference program, how to register, where to go, how to pay, etc. etc. can be found in http://www.erlang.se/euc/00/ The conference program covers applications, implementations, and developments followed by a conference dinner on a traditional steam ship cruising in the Stockholm archipelago. Welcome and best regards, Bjarne D?cker Computer Science Laboratory Ericsson Utvecklings AB Box 1505 125 25 ?lvsj? - Stockholm Sweden From sam@REDACTED Wed Aug 9 17:09:23 2000 From: sam@REDACTED (Samuel Tardieu) Date: Wed, 9 Aug 2000 17:09:23 +0200 Subject: erl_interface remarks Message-ID: <2000-08-09-17-09-24+trackit+sam@inf.enst.fr> While playing with interfacing Erlang and Ada, I discovered the following two things: (1) The documentation of ERL_PID_NODE and ERL_PORT_NODE is wrong, as those functions return a char *, not a ETERM * (2) It would be great if all those macros were also exported as functions with the same name (in lower case maybe), so that it is possible to use them from another language than C just by linking with the library. Right now, I have to have a C wrapper to change the macros into functions so that I can call them from Ada. Same hold for defines such as ERL_MSG, ERL_TIMEOUT, etc., that could also be exported as external variables in addition to defines. Sam From sam@REDACTED Wed Aug 9 17:14:55 2000 From: sam@REDACTED (Samuel Tardieu) Date: Wed, 9 Aug 2000 17:14:55 +0200 Subject: erl_interface remarks In-Reply-To: <2000-08-09-17-09-24+trackit+sam@inf.enst.fr>; from sam@inf.enst.fr on Wed, Aug 09, 2000 at 05:09:23PM +0200 References: <2000-08-09-17-09-24+trackit+sam@inf.enst.fr> Message-ID: <2000-08-09-17-14-55+trackit+sam@inf.enst.fr> On 9/08, Samuel Tardieu wrote: | While playing with interfacing Erlang and Ada, I discovered the following | two things: Also, I cannot seem to find erl_init(). Did he disappear? From sam@REDACTED Wed Aug 9 17:16:34 2000 From: sam@REDACTED (Samuel Tardieu) Date: Wed, 9 Aug 2000 17:16:34 +0200 Subject: erl_interface remarks In-Reply-To: <2000-08-09-17-14-55+trackit+sam@inf.enst.fr>; from sam@inf.enst.fr on Wed, Aug 09, 2000 at 05:14:55PM +0200 References: <2000-08-09-17-09-24+trackit+sam@inf.enst.fr> <2000-08-09-17-14-55+trackit+sam@inf.enst.fr> Message-ID: <2000-08-09-17-16-34+trackit+sam@inf.enst.fr> On 9/08, Samuel Tardieu wrote: | On 9/08, Samuel Tardieu wrote: | | | While playing with interfacing Erlang and Ada, I discovered the following | | two things: | | Also, I cannot seem to find erl_init(). Did he disappear? Ooops, forget it, yet another macro that is not callable from anything but C:) From geoff@REDACTED Thu Aug 10 06:36:31 2000 From: geoff@REDACTED (Geoff Wong) Date: Thu, 10 Aug 2000 14:36:31 +1000 (EST) Subject: memory leak in the BEAM. Message-ID: <200008100436.EAA03343@gecko.serc.rmit.edu.au> Hi all, Not really a question; but posted for feedback. I've discovered a memory leak in the BEAM engine. Found it because some people pointed out Eddie was space leaking, I traced the leak to what appeared to be the crypto_drv'er. But after trying to find something wrong with that I traced it into the BEAM code. Try this multiple times, if you have crypto, and check the size of your BEAM process: -module(leak). -export([start/0]). start() -> crypto:start(), X = list_to_binary("assadfhesragire9g84390534r134r"), loop(10000,X). loop(0,X) -> done ; loop(C,X) -> crypto:md5_final(crypto:md5_update(crypto:md5_init(), X)), loop(C-1,X) . Anyway - here's the patch (it works for me), seems to be a minor problem with the off heap list of memory chunks, feedback welcome :) --- erts/emulator/beam/io.c.ORIG Wed Aug 9 17:03:26 2000 +++ erts/emulator/beam/io.c Thu Aug 10 14:17:47 2000 @@ -1446,7 +1446,7 @@ pb->thing_word = make_thing(PROC_BIN_SIZE-1, REFC_BINARY_SUBTAG); pb->size = b->orig_size; pb->next = p->off_heap.mso; - p->off_heap.mso = pb->next; + p->off_heap.mso = pb; pb->val = DriverBinary2Binary(b); pb->bytes = b->orig_bytes; p->off_heap.overhead += b->orig_size / BINARY_OVERHEAD_FACTOR / sizeof(E term); I'll build a new RPM for Redhat and place it on the eddieware site (in the next day or so) when I make sure this patch works correctly with Eddie. Geoff From klacke@REDACTED Thu Aug 10 14:20:25 2000 From: klacke@REDACTED (Klacke) Date: Thu, 10 Aug 2000 14:20:25 +0200 Subject: memory leak in the BEAM. In-Reply-To: <200008100436.EAA03343@gecko.serc.rmit.edu.au> References: <200008100436.EAA03343@gecko.serc.rmit.edu.au> Message-ID: <20000810142025.A3216@bluetail.com> On Thu, Aug 10, 2000 at 02:36:31PM +1000, Geoff Wong wrote: > > Anyway - here's the patch (it works for me), seems to be > a minor problem with the off heap list of memory chunks, feedback welcome :) > > --- erts/emulator/beam/io.c.ORIG Wed Aug 9 17:03:26 2000 > +++ erts/emulator/beam/io.c Thu Aug 10 14:17:47 2000 > @@ -1446,7 +1446,7 @@ > pb->thing_word = make_thing(PROC_BIN_SIZE-1, REFC_BINARY_SUBTAG); > pb->size = b->orig_size; > pb->next = p->off_heap.mso; > - p->off_heap.mso = pb->next; > + p->off_heap.mso = pb; > pb->val = DriverBinary2Binary(b); > pb->bytes = b->orig_bytes; > p->off_heap.overhead += b->orig_size / BINARY_OVERHEAD_FACTOR / sizeof(E > term); Great, /klacke -- Claes Wikstrom Bluetail AB http://www.bluetail.com From ltaesch@REDACTED Sat Aug 12 20:21:17 2000 From: ltaesch@REDACTED (Luc Taesch) Date: Sat, 12 Aug 2000 20:21:17 +0200 Subject: test suitte: alpha available. Message-ID: <3995959C.7774DB49@abom.com> i have an alpha versio of a test suite (XP style, basic repackaging of the mnesia test suite). anybody interested ? -- First, they ignore you. Then, they laugh at you. Then, they fight you. Then, you win. --- Gandhi. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jamesh@REDACTED Tue Aug 15 04:04:07 2000 From: jamesh@REDACTED (James Hague) Date: Mon, 14 Aug 2000 21:04:07 -0500 Subject: Updated BEAM spec? Message-ID: <3.0.32.20000814210406.00f35934@volition-inc.com> I asked this a ways back, before the latest Erlang release: Is there a document outlining the generic BEAM opcodes used by the emulator? The basic opcodes aren't too hard to figure out, but there are other opcode bits I don't understand (related to register lifetime, perhaps?). The BEAM doc on the web is terribly outdated. James From bjorn@REDACTED Tue Aug 15 12:53:00 2000 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 15 Aug 2000 12:53:00 +0200 Subject: Updated BEAM spec? In-Reply-To: James Hague's message of "Mon, 14 Aug 2000 21:04:07 -0500" References: <3.0.32.20000814210406.00f35934@volition-inc.com> Message-ID: There is still no BEAM document. I've been busy working with the R7 release. Perhaps after R7... Are you referrering to {'%live',N}? This is not a real instruction (meaning that the assembler will discard it and you will not find it in the .beam file). N indicates the number of live X registers at that point in the code. The code generator emits one such %live instruction at the end of every basic block. The beam_block modules uses the information to optimize basic blocks. /Bj?rn James Hague writes: > I asked this a ways back, before the latest Erlang release: Is there a > document outlining the generic BEAM opcodes used by the emulator? The > basic opcodes aren't too hard to figure out, but there are other opcode > bits I don't understand (related to register lifetime, perhaps?). The BEAM > doc on the web is terribly outdated. > > James > -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 +46 8 727 56 87 125 25 ?lvsj? From jamesh@REDACTED Tue Aug 15 18:08:45 2000 From: jamesh@REDACTED (James Hague) Date: Tue, 15 Aug 2000 11:08:45 -0500 Subject: Updated BEAM spec? Message-ID: <3.0.32.20000815110845.00f34544@volition-inc.com> At 12:53 PM 8/15/00 +0200, Bjorn Gustavsson wrote: >There is still no BEAM document. I've been busy working with the R7 release. >Perhaps after R7... > >Are you referrering to {'%live',N}? This is not a real instruction >(meaning that the assembler will discard it and you will not find it >in the .beam file). N indicates the number of live X registers at that >point in the code. The code generator emits one such %live instruction >at the end of every basic block. The beam_block modules uses the information >to optimize basic blocks. Thank you for the reply. Which part of the compiler/assembler would be best for seeing a list of generic beam opcodes and operand formats? I wrote a quickie utility a while back to take apart beam files, but not inside of the code chunk. James From zhihai@REDACTED Wed Aug 16 10:15:25 2000 From: zhihai@REDACTED (sailor) Date: Wed, 16 Aug 2000 16:15:25 +0800 Subject: couldn't open /usr/libexec/ld.so Message-ID: <005801c0075a$2198ffa0$b501010a@soim.com> hello,all I am a new erlang user,I met some problem after i installed erlang-6.1.0, when I run erl, error happen"Counld't open /usr/libexec/ld.so; how could I resolve this problem? thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ltaesch@REDACTED Mon Aug 14 07:47:04 2000 From: ltaesch@REDACTED (Luc Taesch) Date: Mon, 14 Aug 2000 07:47:04 +0200 Subject: licenses questions Message-ID: <399787D7.BFF5B3D4@abom.com> id like to publisg the test suite under GPL or L-GPL. as a lot is taken from mnesia test , which s is EPL, is it ok ? -- First, they ignore you. Then, they laugh at you. Then, they fight you. Then, you win. --- Gandhi. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ltaesch@REDACTED Mon Aug 14 20:35:35 2000 From: ltaesch@REDACTED (Luc Taesch) Date: Mon, 14 Aug 2000 20:35:35 +0200 Subject: path of hrl Message-ID: <39983BF7.5D4B7783@abom.com> id like to include an hrl that is in the top/lib/test-0.5/inc directory. i tried to include_lib("test/inc/xx.hrl"), but it doenst work . should i add this directory first to some path ? where ? where is set the directories path per default ? i hought everthing under $top would be included ? -- First, they ignore you. Then, they laugh at you. Then, they fight you. Then, you win. --- Gandhi. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bjorn@REDACTED Thu Aug 17 20:56:55 2000 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 17 Aug 2000 20:56:55 +0200 Subject: Updated BEAM spec? In-Reply-To: James Hague's message of "Tue, 15 Aug 2000 11:08:45 -0500" References: <3.0.32.20000815110845.00f34544@volition-inc.com> Message-ID: James Hague writes: > Thank you for the reply. Which part of the compiler/assembler would be > best for seeing a list of generic beam opcodes and operand formats? I > wrote a quickie utility a while back to take apart beam files, but not > inside of the code chunk. genop.tab and beam_asm.erl, both in the compiler application. -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 +46 8 727 56 87 125 25 ?lvsj? From conrad@REDACTED Sat Aug 19 02:59:14 2000 From: conrad@REDACTED (Mike Tilstra) Date: Fri, 18 Aug 2000 19:59:14 -0500 Subject: mneisa, mnemosyne questions... Message-ID: <20000818195914.B22547@sistina.com> Two questions here, hopefuly someone can answer these. First: Using mnemosyne to get a subset of a table, (with the cursor calls). Is there any way to get the N smallest that are greater than X? I have a section where I need to grab the next 64 items in sequenced order that have the use field set to false. (I want the next 64 in order that are true.) (did that make anysense?) I managed to get something working the way I want using match_object and a loop, but I was hoping that I could use a query for it. Second: sometimes, I need to grab any entry in the table that has the use field set to false. Is there a fast way to do this? I've tried a couple of things, and they are all pretty slow. (slower than looping over the *entire* table of 10000 elements) (so the fastest method I've found so far, is to loop over the elements, until I find one that is set to false. This is icky.) Thanks bunches, -- Mike Tilstra conrad@REDACTED Oh yeah, anybody got an ethernet card to fit my night table? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 232 bytes Desc: not available URL: From thantos@REDACTED Sat Aug 19 17:49:27 2000 From: thantos@REDACTED (Alexander Williams) Date: Sat, 19 Aug 2000 11:49:27 -0400 Subject: Erlang on Tru64 Message-ID: <000a01c009f5$0e911300$0200000a@mecha> Has anyone tried compiling Erlang under a 64-bit OS such as Tru64/OSF1? Has anyone wanted to, before now? :) (Unfortunately, I don't have access to the lab machines in the office from home right now, or I'd simply zip in and try to compile it.) -------------- next part -------------- An HTML attachment was scrubbed... URL: From kent@REDACTED Sun Aug 20 02:14:41 2000 From: kent@REDACTED (Kent Boortz) Date: 20 Aug 2000 02:14:41 +0200 Subject: Erlang on Tru64 In-Reply-To: "Alexander Williams"'s message of "Sat, 19 Aug 2000 11:49:27 -0400" References: <000a01c009f5$0e911300$0200000a@mecha> Message-ID: > Has anyone tried compiling Erlang under a 64-bit OS such as > Tru64/OSF1?? Has anyone wanted to, before now?? :) No real 64 bit port has been done that I know of. I did an experimental port 5 years ago of pre-OTP Erlang to Digital Alpha and Digital Unix/OSF1. But this was not a true 64 bit port, it used 32 bit pointers on a 64 bit machine. I definitely think it is time for a real 64 bit port now when both Intel and AMD move to 64 bits, kent From thantos@REDACTED Sun Aug 20 05:43:54 2000 From: thantos@REDACTED (Alexander Williams) Date: Sat, 19 Aug 2000 23:43:54 -0400 Subject: Erlang on Tru64 In-Reply-To: ; from kent@erix.ericsson.se on Sun, Aug 20, 2000 at 02:14:41AM +0200 References: <000a01c009f5$0e911300$0200000a@mecha> Message-ID: <20000819234354.A9316@gw.total-web.net> On Sun, Aug 20, 2000 at 02:14:41AM +0200, Kent Boortz wrote: > No real 64 bit port has been done that I know of. I did an Well ... bugger. [throws hat on the floor] So much for me being able to use Erlang in the role I really need it for. :/ I have a few (rather, several) million dollars worth of large, heavy, very fast Tru64 boxes I can bend to my evil will. Erlang would be a good choice of tool to do what I'm interested in ... Ah well. -- Alexander Williams (thantos@REDACTED) | In the End, "Blue Jester needs food." | Oblivion "Blue Jester needs fuku-wearing cuties." | Always http://www.chancel.org | Wins From ltaesch@REDACTED Sat Aug 19 08:19:54 2000 From: ltaesch@REDACTED (Luc Taesch) Date: Sat, 19 Aug 2000 08:19:54 +0200 Subject: gsb ? Message-ID: <399E2709.CED943A1@abom.com> ive read in (erlang.se) http://www.erlang.se/publications/xjobb/0101-molin-strom.ps.gz that a gs graphical editor has been tried. is it practically used ? open sourced ? are ther any other effort around that ? the publication mention limitations of gs due to its TCK/tk backend ; but this is 96. is it still true? -- First, they ignore you. Then, they laugh at you. Then, they fight you. Then, you win. --- Gandhi. Working code is what matter, not your market capitalization. --Kurt granroth -------------- next part -------------- An HTML attachment was scrubbed... URL: From kent@REDACTED Sun Aug 20 13:25:38 2000 From: kent@REDACTED (Kent Boortz) Date: 20 Aug 2000 13:25:38 +0200 Subject: gsb ? In-Reply-To: Luc Taesch's message of "Sat, 19 Aug 2000 08:19:54 +0200" References: <399E2709.CED943A1@abom.com> Message-ID: No it was never practically used (or maybe it was for the graphical xref application, I don't remember). We dropped gsb, it had many bugs and was hard to maintain (but it was reasonable complete and worked well in large parts). One reason it was not finished to be a product was that very few customers asked for a GUI builder. Another reason was an internal discussion about finding a GS replacement. The time wasn't right for adding a new GS tool. I don't see why it could not be put in as an "coding example" in the www.erlang.org contributions directory. I will ask around if this is possible. But it can't be expected to work out-of-the-box, work need to be done on it. kent From ltaesch@REDACTED Sat Aug 19 15:16:50 2000 From: ltaesch@REDACTED (Luc Taesch) Date: Sat, 19 Aug 2000 15:16:50 +0200 Subject: gsb ? References: <399E2709.CED943A1@abom.com> <14751.50312.264370.70104@whynot.localdomain> Message-ID: <399E88C2.58DC3B59@abom.com> Thks, Ill try. . what are the current options are ericsson? in eiffel , we used, the glade Gui maker, that generate an xml definition file, and then every language generate its code out of it , in a separate program(currently, c, c++, eiffel, python, look at :http://glade.pn.org/screenshots.html) of course, its more or less linked to gtk, but the xml generated out of glade is just a composite definition of a screen . Pascal Brisset wrote: > > that a gs graphical editor has been tried. is it practically used ? open > > It's in otp_src_R6B-0/lib/gs/contribs/gsb/ebin, > but "make install" does not install it. > > I'm using it for simple GUIs. > > -- Pascal Brisset -- First, they ignore you. Then, they laugh at you. Then, they fight you. Then, you win. --- Gandhi. Working code is what matter, not your market capitalization. --Kurt granroth From etxuwig@REDACTED Sun Aug 20 23:26:54 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Sun, 20 Aug 2000 23:26:54 +0200 (MET DST) Subject: Erlang on Tru64 In-Reply-To: <20000819234354.A9316@gw.total-web.net> Message-ID: On Sat, 19 Aug 2000, Alexander Williams wrote: >On Sun, Aug 20, 2000 at 02:14:41AM +0200, Kent Boortz wrote: >> No real 64 bit port has been done that I know of. I did an > >Well ... bugger. [throws hat on the floor] So much for me being able >to use Erlang in the role I really need it for. :/ I have a few >(rather, several) million dollars worth of large, heavy, very fast >Tru64 boxes I can bend to my evil will. Erlang would be a good choice >of tool to do what I'm interested in ... > >Ah well. As I remember my discussions with Bj?rn Gustavsson, a real 64 bit port wouldn't be that hard to do, but that it would be wise to wait until the tagging scheme had been rewritten. We're quickly approaching the next release of Erlang, which does indeed have an entirely new tagging scheme. Perhaps the time has come? /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Network Architecture & Product Strategies mob: +46 70 519 81 95 Ericsson Telecom AB, Datacom Networks and IP Services Varuv?gen 9, ?lvsj?, S-126 25 Stockholm, Sweden From sw@REDACTED Mon Aug 21 16:37:03 2000 From: sw@REDACTED (Stefan Willehadson) Date: Mon, 21 Aug 2000 16:37:03 +0200 Subject: JInterface - Peer authentication error Message-ID: <39A13E8F.65AB8551@cellpt.com> I've tried to connect an Erlang node to a Java node using JInterface (Erlang R6B and JDK 1.2.2). There seems to be a problem with the authentication when I try to connect the Erlang node to the Java node. The OtpConnection trace and the stack trace can be found below. ****** The trace from the creation and publishing of the Java node (foo) -> PUBLISH (r4) foo@REDACTED port=3219 <- OK ****** Upon a connection attempt from the erlang node (bar) <- ACCEPT FROM CAYENNE/10.1.42.6:3227 <- HANDSHAKE ntype=109 dist=5 remote=bar@REDACTED -> HANDSHAKE sendStatus status=ok local=foo@REDACTED -> HANDSHAKE sendChallenge flags=4 dist=5 challenge=-1435914638 local=foo@REDACTED ****** The stacktrace com.ericsson.otp.erlang.OtpAuthException: Peer authentication error. at com.ericsson.otp.erlang.OtpConnection.recvChallengeReply(OtpConnection.java:1297) at com.ericsson.otp.erlang.OtpConnection.doAccept(OtpConnection.java:1000) at com.ericsson.otp.erlang.OtpConnection.(OtpConnection.java:162) at com.ericsson.otp.erlang.OtpServer.accept(OtpServer.java:189) at Test.activate(Test.java:18) at Test.main(Test.java:26) I use the same cookie on both nodes..... Can anyone help? /stefan ------------------------------------------------------------------- Stefan Willehadson sw@REDACTED mobile: +46 707961474 CellPoint Systems www.cellpt.com office: +46 86332726 From Matthias.Lang@REDACTED Mon Aug 21 18:20:08 2000 From: Matthias.Lang@REDACTED (Matthias.Lang@REDACTED) Date: Mon, 21 Aug 2000 18:20:08 +0200 (MET DST) Subject: JInterface - Peer authentication error In-Reply-To: <39A13E8F.65AB8551@cellpt.com> References: <39A13E8F.65AB8551@cellpt.com> Message-ID: <14753.22200.516070.872099@gargle.gargle.HOWL> Stefan Willehadson writes: > I've tried to connect an Erlang node to a Java node using JInterface > (Erlang R6B and JDK 1.2.2). There seems to be a problem with the > authentication when I try to connect the Erlang node to the Java node. > The OtpConnection trace and the stack trace can be found below. There's a known problem (listed in the FAQ, section 5.7.8) if your java node is running in a non-default locale. Don't know if that has anything to do with your problem. Matthias From Sean.Hinde@REDACTED Mon Aug 21 20:55:56 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Mon, 21 Aug 2000 19:55:56 +0100 Subject: JInterface - Peer authentication error Message-ID: <402DD461F109D411977E0008C791C3125650A3@imp02mbx.one2one.co.uk> There was once a suggestion to use export LC_CTYPE=iso_8859_1. This hasn't made it into the FAQ and I don't know if it works. The problem is to do with the use of string encoding in the OtpErlang Package for the md5 checking. Rgds, Sean > -----Original Message----- > From: Matthias.Lang@REDACTED [mailto:Matthias.Lang@REDACTED] > Sent: 21 August 2000 17:20 > To: Stefan Willehadson > Cc: Erlang Questions > Subject: JInterface - Peer authentication error > > > > > Stefan Willehadson writes: > > I've tried to connect an Erlang node to a Java node using > JInterface > > (Erlang R6B and JDK 1.2.2). There seems to be a problem with the > > authentication when I try to connect the Erlang node to > the Java node. > > The OtpConnection trace and the stack trace can be found below. > > There's a known problem (listed in the FAQ, section 5.7.8) if your > java node is running in a non-default locale. Don't know if that has > anything to do with your problem. > > Matthias > NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From xiamin@REDACTED Tue Aug 22 02:57:52 2000 From: xiamin@REDACTED (Simon Raahauge DeSantis) Date: Mon, 21 Aug 2000 20:57:52 -0400 Subject: Error trying to build otp_src_R6B-0 Message-ID: <20000821205752.A7808@ghostpriest.rakis.net> I'm trying to compile Erlang/OTP (whatever it's called) on a NetBSD-1.4.2/SPARC system. THe build dies like this: erlc -W -bbeam -I/home/xiamin/apple/otp_src_R6B-0/lib/stdlib -o../ebin asn1ct_parser.erl Can't allocate 2056916 bytes of memory gmake[2]: *** [../ebin/asn1ct_parser.beam] Abort trap (core dumped) gmake[2]: Leaving directory `/home/xiamin/apple/otp_src_R6B-0/lib/asn1/src' gmake[1]: *** [opt] Error 2 gmake[1]: Leaving directory `/home/xiamin/apple/otp_src_R6B-0/lib/asn1' gmake: *** [opt] Error 2 *** Error code 2 Stop. xiamin@REDACTED ~/apple/otp_src_R6B-0 % Any insights into how I can fix this? TIA -- -Simon Raahauge DeSantis From hakan@REDACTED Tue Aug 22 10:56:43 2000 From: hakan@REDACTED (Hakan Mattsson) Date: Tue, 22 Aug 2000 10:56:43 +0200 (MET DST) Subject: mneisa, mnemosyne questions... In-Reply-To: <20000818195914.B22547@sistina.com> Message-ID: On Fri, 18 Aug 2000, Mike Tilstra wrote: > Two questions here, hopefuly someone can answer these. > > First: Using mnemosyne to get a subset of a table, (with the cursor calls). > Is there any way to get the N smallest that are greater than X? I have a > section where I need to grab the next 64 items in sequenced order that > have the use field set to false. (I want the next 64 in order that are > true.) (did that make anysense?) I managed to get something working the > way I want using match_object and a loop, but I was hoping that I could use > a query for it. It is a little bit unfortunate that Mnemosyne has such a nice syntax, since it often leads to an overuse of Mnemosyne. The Mnemosyne application is purely implemented on top of Mnesia, using the same API as ordinary Mnesia applications. A simple Mnemosyne query requesting only a few solutions boils down to a mnesia:match_object/3. Implying that all solutions first are copied to the process heap by ets/dets, then all but the few solutions you asked for are dropped. For more complex queries, the solutions are copied a few times more as the solutions are sent as messages between internal Mnemosyne processes and stored in a intermediate ets table. The greater then X comparison in your query implies that your query will be classified as a complex query. Nowdays ets has a extended match capability that allows "pico queries", enabling a wider range of comparison operators, than simple equality as in match_object. By using these pico queries more of the query evaluation can be made much more efficient by pushing it down into the ets-BIFs. But so far the corresponding functionality lacks both in dets and Mnesia. If you have extreamly high performance requirements and is hosting the table in a local ram_copies table, you have the option of using the new efficient matching capabilities directly in ets rather than waiting for the new functionality to be offered via dets' API, Mnesia's API and eventually by Mnemosyne. But if you have moderate performance requirements I would recommend you to use mnesia:match_object/3. > Second: sometimes, I need to grab any entry in the table that has the use > field set to false. Is there a fast way to do this? I've tried a couple > of things, and they are all pretty slow. (slower than looping over the > *entire* table of 10000 elements) (so the fastest method I've found so > far, is to loop over the elements, until I find one that is set to false. > This is icky.) Try one of these methods to find all elements with the 'use' attribute set to 'false': -record(rec, {key, use, foo, bar, etc}). safe_q(Tab) -> Wild = mnesia:table_info(Tab, wild_pattern), mnesia:match_object(Tab, Wild#rec{use = false}, read). dirty_q(Tab) -> Wild = mnesia:table_info(Tab, wild_pattern), mnesia:dirty_match_object(Tab, Wild#rec{use = false}). For the time being you have to post process the solutions by sorting them and perform the greater then comparison in order to make your query complete. /H?kan --- H?kan Mattsson Ericsson Computer Science Laboratory http://www.ericsson.se/cslab/~hakan From qramika@REDACTED Tue Aug 22 13:31:41 2000 From: qramika@REDACTED (Karlsson Mikael) Date: Tue, 22 Aug 2000 13:31:41 +0200 (MET DST) Subject: erl_interface do not include pthreads Message-ID: <200008221131.NAA26731@nic.era-a.ericsson.se> When I compile the erl_interface library on for sparc-sun-solaris2.7 it does not compile the function erl_init_pthreads in erl_pthreads.c even though support for pthreads have been identified when I run the config script on top level. It seems that some of the compiler flags are not set in this directory. The workaround for me was to add the flags -DUSE_THREADS -D_REENTRANT -DSOLARIS_THREADS -DHAVE_PTHREAD_H in the definition TYPE_FLAGS in the file .../otp_src_R6B-0/lib/erl_interface/src/sparc-sun-solaris2.7/Makefile Is there a more proper way to get the defines into the Makefile or is there something missing in the configuration support? /Mikael Karlsson From luc.taesch@REDACTED Tue Aug 22 17:28:33 2000 From: luc.taesch@REDACTED (luc.taesch@REDACTED) Date: Tue, 22 Aug 2000 17:28:33 +0200 Subject: typing Message-ID: i hve seen a type system at http://www.ericsson.se/cslab/~thomas/types.shtml. are there already some feedback on that approach ? is it "academic" or frozen ? used in projects? any projects to move that in compiler ? thks Luc From luc.taesch@REDACTED Tue Aug 22 17:26:10 2000 From: luc.taesch@REDACTED (luc.taesch@REDACTED) Date: Tue, 22 Aug 2000 17:26:10 +0200 Subject: eweb, trex, literate programming, other doc tools Message-ID: i was toying around with eweb and trex. 1) the eweb package has no eweb.erl, but a eweb.jam. where can i get this eweb.erl ? 2) any feedback on literate programming around? 3) is trex like tv ? why another one ? from http://www.erlang.org/user.html 4) what is the documentation standard in ericsson ? any specific tool? thks Luc From vances@REDACTED Tue Aug 22 17:29:08 2000 From: vances@REDACTED (Vance Shipley) Date: Tue, 22 Aug 2000 11:29:08 -0400 Subject: Error trying to build otp_src_R6B-0 In-Reply-To: <20000821205752.A7808@ghostpriest.rakis.net> Message-ID: Simon Raahauge writes: } } I'm trying to compile Erlang/OTP (whatever it's called) on a } NetBSD-1.4.2/SPARC system. THe build dies like this: } erlc -W -bbeam -I/home/xiamin/apple/otp_src_R6B-0/lib/stdlib -o../ebin } asn1ct_parser.erl } Can't allocate 2056916 bytes of memory I had this problem on Unixware as well. I had to tune the kernel to allow a higher maximum amount of memory to be allocated to a single user process. I'm not sure which kernel parameter you'll need on NetBSD. -Vance From jamesh@REDACTED Tue Aug 22 18:08:06 2000 From: jamesh@REDACTED (James Hague) Date: Tue, 22 Aug 2000 11:08:06 -0500 Subject: typing Message-ID: <3.0.32.20000822110806.00f57ad8@volition-inc.com> >are there already some feedback on that approach ? is it "academic" or frozen ? >used in projects? I asked this not too long ago. The response was that the type system was a cancelled project. James From Bruce@REDACTED Tue Aug 22 20:37:10 2000 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Tue, 22 Aug 2000 20:37:10 +0200 Subject: Drivers that drive me mad... Message-ID: <073f01c00c67$fcb6b110$0121970a@fitzsimons.org> Hi peoples, I just thought I'd throw this to the list and see if someone can tell me WHY? My dialogic driver has been sending me nutty for several days because whenever I sent it a command, it would die. No visible exit signals or anything. No reason that I could fathom, it worked fine from the shell. The situation I had was : 1. voice_call process that calls... 2. erlogic.erl that is a server for the dialogic commands. Dialogic events are received by a loop spawned from this driver and distributed(which seems nasty but I don't see a way around it). the loop process opens the port to... 3. erlogic_driver.so - the driver code Everything worked fine until I sent a command to erlogic.erl and it translated it and sent a command to the driver port (like a pid...but different) port ! {self(), {command, {"xxx"}}}. At this point the driver crashed and took the loop with it. I couldn't trap any message from it. After a few days of mucking around with this, I decided that maybe the process that opens a port should send the commands to it. And it works....yay! So my questions are - why are drivers ports different to pids? Is this documented anywhere? and why does it die without a sound (not typical erlang at all!). It seems to be the erlang interface code that kills it. Cheers, Bruce From ltaesch@REDACTED Mon Aug 21 20:22:39 2000 From: ltaesch@REDACTED (Luc Taesch) Date: Mon, 21 Aug 2000 20:22:39 +0200 Subject: typing References: <3.0.32.20000822110806.00f57ad8@volition-inc.com> Message-ID: <39A1736F.9E02E37E@abom.com> James Hague wrote: > >are there already some feedback on that approach ? is it "academic" or > frozen ? > >used in projects? > > I asked this not too long ago. The response was that the type system was a > cancelled project. any reason given ? i ve read some papers , like soft typing, type verification, and so on. is it cancelled for budget reason, or lack of interest, or as it broke the currents existing code ? or just because they dont believe hard enough in typing ? or any other deeper technical reason ? > > > James -- First, they ignore you. Then, they laugh at you. Then, they fight you. Then, you win. --- Gandhi. Working code is what matter, not your market capitalization. --Kurt granroth From shrogers@REDACTED Wed Aug 23 02:33:46 2000 From: shrogers@REDACTED (Steven H. Rogers) Date: Tue, 22 Aug 2000 19:33:46 -0500 Subject: Constraint Programming Message-ID: <39A31BEA.E0C1E46C@ionet.net> Does anyone know of any constraint satisfaction systems programmed in Erlang? Any references would be appreciated. -- Steve From Pekka.Hedqvist@REDACTED Wed Aug 23 04:15:13 2000 From: Pekka.Hedqvist@REDACTED (Pekka.Hedqvist@REDACTED) Date: Wed, 23 Aug 2000 12:15:13 +1000 (EST) Subject: Constraint Programming In-Reply-To: <39A31BEA.E0C1E46C@ionet.net> References: <39A31BEA.E0C1E46C@ionet.net> Message-ID: <14755.13233.129206.630745@tux.lodbroker.com> Greger Ottosson did his M.Sc. thesis on the subject: "An Extension of Erlang with Finite Domain Constraints" in 1995, it can be found at http://www.csd.uu.se/~greger From dgud@REDACTED Wed Aug 23 08:13:59 2000 From: dgud@REDACTED (Dan Gudmundsson) Date: Wed, 23 Aug 2000 08:13:59 +0200 (MET DST) Subject: Drivers that drive me mad... In-Reply-To: <073f01c00c67$fcb6b110$0121970a@fitzsimons.org> References: <073f01c00c67$fcb6b110$0121970a@fitzsimons.org> Message-ID: <14755.27559.648115.437738@gargle.gargle.HOWL> Bruce Fitzsimons writes: > Everything worked fine until I sent a command to erlogic.erl and it > translated it and sent a command to the driver port (like a pid...but > different) port ! {self(), {command, {"xxx"}}}. At this point the driver > crashed and took the loop with it. I couldn't trap any message from it. > > After a few days of mucking around with this, I decided that maybe the > process that opens a port should send the commands to it. And it > works....yay! It must not be the process who opened the port that sends to the port, but it must be it's Pid you sending as the first element in the tuple. Port ! {OpenPortPid, {command, ...}}. Answers to the port always comes to the opening process, so that's why you almost always have a erlang-process synchronizing things to the port. There are a couple of options you can use to get a message when the port dies, see the man page. But I have had problems with that before but I don't remember when and why..(on linux maybe) /Dan From thomas@REDACTED Wed Aug 23 08:44:19 2000 From: thomas@REDACTED (Thomas Arts) Date: Wed, 23 Aug 2000 08:44:19 +0200 Subject: typing References: <3.0.32.20000822110806.00f57ad8@volition-inc.com> Message-ID: <39A372C3.CB87C37F@cslab.ericsson.se> James Hague wrote: > > >are there already some feedback on that approach ? is it "academic" or > frozen ? > >used in projects? > > I asked this not too long ago. The response was that the type system was a > cancelled project. Well, the projects that tried the typesystem were canceled, that's what I wrote. The typesystem self is more in a frozen phase. Some experiments are going on, but on a low priority level. The problem is that Erlang has not been designed with a type system in mind. Adding one later is possible, but at a certain cost w.r.t. the freedom of programming. We are investigating whether we can find an acceptable compromise for things to give up. However, I can recommend everyone to start using teh SpecWeb software in order to make the datatype specifications. This is useful even without a checking program. Regards Thomas From Sean.Hinde@REDACTED Wed Aug 23 15:04:16 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Wed, 23 Aug 2000 14:04:16 +0100 Subject: typing Message-ID: <402DD461F109D411977E0008C791C3125650AD@imp02mbx.one2one.co.uk> It may be useful to share some of our findings here at One2One on using Erlang for some reasonably complex jobs.. Most common causes of bugs not found until runtime: 1. Referring to a non existent external function. 2. Mistyping (i.e. fingers not Type!) of atoms used as tags in either receive clauses or case clauses. 3. Printing Strings. The io[_lib]:format commands require you to know that a string is a string type before using %s to print it without double quotes, otherwise it crashes. In a weakly typed language with no efficient is_string/1 this is a royal PITA. These cause problems most in weird error capture cases which may have not been executed during testing (surely not). My personal favourite is error_report:format("Aargh"). We have not tended to have problems with adding Integers to Atoms or other such things which type systems protect against. One could think of possible solutions to these three which do not involve a full type system. 1. A tool to go through a system and root out external reference problems (admittedly difficult to deal with apply(M,F,A)) would help. It would also be nice when loading a piece of code into a running system to get a result which included some indication of whether all the external references were resolved, or even an option which would only load the new code if this was true. 2. I guess any solution to finger trouble in atoms is getting towards a proper type system. Maybe something which could be declared at the start of a module which restricted the set of atoms which could be defined in the source for that file would do 80% of the job. Language Guru help needed! 3. Well, a string type would help!! Barring that to implement something like in Java (ironically strongly typed) where you can send any rubbish into a System.out.println and it will do its best to format it in a nice readable form without adding extraneous " for example. The current C derived mini typed language %d%s is to me something of an anachronism. Having said all that we have had two large systems in service now for several months and not had a single outage. Thoughts? Sean > -----Original Message----- > From: Thomas Arts [mailto:thomas@REDACTED] > Sent: 23 August 2000 07:44 > To: James Hague > Cc: erlang-questions@REDACTED > Subject: Re: typing > > > James Hague wrote: > > > > >are there already some feedback on that approach ? is it > "academic" or > > frozen ? > > >used in projects? > > > > I asked this not too long ago. The response was that the > type system was a > > cancelled project. > > Well, the projects that tried the typesystem were canceled, > that's what I > wrote. The typesystem self is more in a frozen phase. Some experiments > are going on, but on a low priority level. The problem is > that Erlang has > not been designed with a type system in mind. Adding one > later is possible, > but at a certain cost w.r.t. the freedom of programming. We > are investigating > whether we can find an acceptable compromise for things to give up. > > However, I can recommend everyone to start using teh SpecWeb > software in > order to make the datatype specifications. This is useful even without > a checking program. > > Regards > Thomas > NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From matthias@REDACTED Wed Aug 23 15:30:58 2000 From: matthias@REDACTED (matthias@REDACTED) Date: Wed, 23 Aug 2000 08:30:58 -0500 (CDT) Subject: Scheme 2000: Call for Participation Message-ID: <200008231330.IAA18578@africa.cs.rice.edu> ============================================================================ CALL FOR PARTICIPATION Scheme and Functional Programming Montreal, Canada, 17 September 2000 The workshop forms part of PLI 2000, which consists of the ICFP and PPDP conferences and other workshops. http://www.cs.rice.edu/~matthias/Scheme2000/ ============================================================================ Background and Theme: --------------------- Over the past few years, Scheme and its implementations have made tremendous progress in support of generative programming, shell scripting, COMponent support and distributed programming, graphics and GUI support, OO programming, and various other aspects of engineering real-world software. We are calling on implementors and users of Scheme systems to share their ideas at a workshop during PLI 2000 in Montreal. Program: -------- The program committee has selected five papers for long presentations and six papers for short presentations. The topics range from 3-dimensional projective geometry, COM support, and embedded applications to traditional themes such as macros. The workshop will end with an open discussion of Scheme issues. At this moment, the organizers foresee a discussion of the SRFI process and pre-SRFI presentations. If you wish to present a topic for this session, please send mail to Matthias Felleisen. For the actual program, please visit the Scheme 2000 web site: http://www.cs.rice.edu/~matthias/Scheme2000/ Registration: ------------- The workshop is collocated with PLI 2000 in Montreal. Please register for the workshop through the PLI Web site: http://www.cs.yorku.ca/pli-00/pli.html#registration Program committee ------------------ Kent Dybvig, Indiana University Marc Feeley, Universit? de Montr?al Matthias Felleisen, Rice University Daniel Friedman, Indiana University Manuel Serrano, Universit? de Nice (Sophia-Antipolis) Olin Shivers, Massachusetts Institute of Technology ============================================================================ From Matthias.Lang@REDACTED Wed Aug 23 15:44:09 2000 From: Matthias.Lang@REDACTED (Matthias.Lang@REDACTED) Date: Wed, 23 Aug 2000 15:44:09 +0200 (MET DST) Subject: typing In-Reply-To: <402DD461F109D411977E0008C791C3125650AD@imp02mbx.one2one.co.uk> References: <402DD461F109D411977E0008C791C3125650AD@imp02mbx.one2one.co.uk> Message-ID: <14755.54569.195449.578002@gargle.gargle.HOWL> Sean Hinde writes: > 1. A tool to go through a system and root out external reference problems > (admittedly difficult to deal with apply(M,F,A)) would help. It would also > be nice when loading a piece of code into a running system to get a result > which included some indication of whether all the external references were > resolved, or even an option which would only load the new code if this was > true. There's a contribution on the erlang.org contributions page (http://www.erlang.org/user.html#depcheck-1.0) which appears to do this (but not handle apply). I haven't used it, though. Matthias From tonyp@REDACTED Wed Aug 23 15:44:52 2000 From: tonyp@REDACTED (Tony Pedley) Date: Wed, 23 Aug 2000 14:44:52 +0100 Subject: typing References: <402DD461F109D411977E0008C791C3125650AD@imp02mbx.one2one.co.uk> Message-ID: <39A3D554.5BE77699@terminus.ericsson.se> Sean Hinde wrote: > It may be useful to share some of our findings here at One2One on using > Erlang for some reasonably complex jobs.. > > Most common causes of bugs not found until runtime: > > 1. Referring to a non existent external function. > 2. Mistyping (i.e. fingers not Type!) of atoms used as tags in either > receive clauses or case clauses. > 3. Printing Strings. The io[_lib]:format commands require you to know that a > string is a string type before using %s to print it without double quotes, > otherwise it crashes. In a weakly typed language with no efficient > is_string/1 this is a royal PITA. > > These cause problems most in weird error capture cases which may have not > been executed during testing (surely not). My personal favourite is > error_report:format("Aargh"). > > We have not tended to have problems with adding Integers to Atoms or other > such things which type systems protect against. > > One could think of possible solutions to these three which do not involve a > full type system. > > 1. A tool to go through a system and root out external reference problems > (admittedly difficult to deal with apply(M,F,A)) would help. It would also > be nice when loading a piece of code into a running system to get a result > which included some indication of whether all the external references were > resolved, or even an option which would only load the new code if this was > true. > > 2. I guess any solution to finger trouble in atoms is getting towards a > proper type system. Maybe something which could be declared at the start of > a module which restricted the set of atoms which could be defined in the > source for that file would do 80% of the job. Language Guru help needed! > Another solution for this one is to use macros instead of atoms e.g. -define(Message,message). receive ?Message -> ok Any -> Any end This way any mistypes are spotted by the compiler, very usefull in genservers with a lot of state atoms > > 3. Well, a string type would help!! Barring that to implement something like > in Java (ironically strongly typed) where you can send any rubbish into a > System.out.println and it will do its best to format it in a nice readable > form without adding extraneous " for example. The current C derived mini > typed language %d%s is to me something of an anachronism. > > Having said all that we have had two large systems in service now for > several months and not had a single outage. > > Thoughts? > > Sean > > > -----Original Message----- > > From: Thomas Arts [mailto:thomas@REDACTED] > > Sent: 23 August 2000 07:44 > > To: James Hague > > Cc: erlang-questions@REDACTED > > Subject: Re: typing > > > > > > James Hague wrote: > > > > > > >are there already some feedback on that approach ? is it > > "academic" or > > > frozen ? > > > >used in projects? > > > > > > I asked this not too long ago. The response was that the > > type system was a > > > cancelled project. > > > > Well, the projects that tried the typesystem were canceled, > > that's what I > > wrote. The typesystem self is more in a frozen phase. Some experiments > > are going on, but on a low priority level. The problem is > > that Erlang has > > not been designed with a type system in mind. Adding one > > later is possible, > > but at a certain cost w.r.t. the freedom of programming. We > > are investigating > > whether we can find an acceptable compromise for things to give up. > > > > However, I can recommend everyone to start using teh SpecWeb > > software in > > order to make the datatype specifications. This is useful even without > > a checking program. > > > > Regards > > Thomas > > > > NOTICE AND DISCLAIMER: > This email (including attachments) is confidential. If you have received > this email in error please notify the sender immediately and delete this > email from your system without copying or disseminating it or placing any > reliance upon its contents. We cannot accept liability for any breaches of > confidence arising through use of email. Any opinions expressed in this > email (including attachments) are those of the author and do not necessarily > reflect our opinions. We will not accept responsibility for any commitments > made by our employees outside the scope of our business. We do not warrant > the accuracy or completeness of such information. -- ______________________________________________________________________ Tony Pedley mailto:tonyp@REDACTED Ericsson Intracom Ltd. Intranet : http://intracom.ericsson.se 1 Bede Island Internet : http://www.ericsson.co.uk/datacom/index.htm Leicester memoID : ECOM.CBERAM England Tel : +44 (0)116 2 542 400 LE2 7EU Fax : +44 (0)116 2 046 111 ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomas@REDACTED Wed Aug 23 15:48:00 2000 From: thomas@REDACTED (Thomas Arts) Date: Wed, 23 Aug 2000 15:48:00 +0200 Subject: typing References: <402DD461F109D411977E0008C791C3125650AD@imp02mbx.one2one.co.uk> Message-ID: <39A3D610.D45C0F61@cslab.ericsson.se> Sean Hinde wrote: > > It may be useful to share some of our findings here at One2One on using > Erlang for some reasonably complex jobs.. > > Most common causes of bugs not found until runtime: > > 1. Referring to a non existent external function. A type system that only examines module-wise cannot help you here. But this error is easily found by building the function dependency graph. > 2. Mistyping (i.e. fingers not Type!) of atoms used as tags in either > receive clauses or case clauses. This seems a trivial error, but in its full extend, it is hard to see that an atom is mistyped. In particular when a message is received, it is hard to find out what the allowed syntax of the message may be. The only thing that may help here is having a message specification and check that against the receive statements. If it is nothing but atoms one wants to check, it suffices to specify the messages as regular expressions with atoms in it and try to match with the receive statements in a module. Problem here is that modules do not need to correspond to processes... > 3. Printing Strings. The io[_lib]:format commands require you to know that a > string is a string type before using %s to print it without double quotes, > otherwise it crashes. In a weakly typed language with no efficient > is_string/1 this is a royal PITA. why do you need an efficient is_string/1? printing is inefficient anyway. > We have not tended to have problems with adding Integers to Atoms or other > such things which type systems protect against. I personally make these classical type errors, though not with atoms and integers, but with list of lists where I only use a list of depth one and such. Writing [] instead of [[]] for a base case... > One could think of possible solutions to these three which do not involve a > full type system. > > 1. A tool to go through a system and root out external reference problems > (admittedly difficult to deal with apply(M,F,A)) would help. It would also > be nice when loading a piece of code into a running system to get a result > which included some indication of whether all the external references were > resolved, or even an option which would only load the new code if this was > true. one should not use apply/3 and if one does, don't complain about errors that are hard to find. What about the cross-reference tool xref ? > 2. I guess any solution to finger trouble in atoms is getting towards a > proper type system. Maybe something which could be declared at the start of > a module which restricted the set of atoms which could be defined in the > source for that file would do 80% of the job. Language Guru help needed! A separate file stating Messages formats used in this module: {tag1,*,*,tag2,*} {tag3,*} tag4 {tag5,*,*} together with a small addition to a parse tool would do. But it won't prevent you from calling a process with {compute,16} and receiving {compute,X} when list(X) -> > 3. Well, a string type would help!! Barring that to implement something like > in Java (ironically strongly typed) where you can send any rubbish into a > System.out.println and it will do its best to format it in a nice readable > form without adding extraneous " for example. The current C derived mini > typed language %d%s is to me something of an anachronism. Adding a string type is something one needs to do in the runtime system. I don't know why this hasn't been done. The booleans should have had their own type as well. > Having said all that we have had two large systems in service now for > several months and not had a single outage. which is nice... probably it is not only typing that counts ;0). /Thomas From kenneth@REDACTED Wed Aug 23 15:56:38 2000 From: kenneth@REDACTED (Kenneth Lundin) Date: Wed, 23 Aug 2000 15:56:38 +0200 Subject: typing References: <402DD461F109D411977E0008C791C3125650AD@imp02mbx.one2one.co.uk> <14755.54569.195449.578002@gargle.gargle.HOWL> Message-ID: <39A3D816.2067AB37@erix.ericsson.se> Matthias.Lang@REDACTED wrote: > Sean Hinde writes: > > > 1. A tool to go through a system and root out external reference problems > > (admittedly difficult to deal with apply(M,F,A)) would help. It would also > > be nice when loading a piece of code into a running system to get a result > > which included some indication of whether all the external references were > > resolved, or even an option which would only load the new code if this was > > true. > > There's a contribution on the erlang.org contributions page > (http://www.erlang.org/user.html#depcheck-1.0) which appears to > do this (but not handle apply). I haven't used it, though. > There will be a new crossreference utility in the next Erlang/OTP to be delivered at the end of Sept (and planned to be released as Open Source a short while later). This tool can among other things indicate references to non existing external functions and give warnings about apply dependencies, but it can not detect which functions that are actually called with the apply. /Kenneth > > Matthias -- Kenneth Lundin Ericsson Utvecklings AB kenneth@REDACTED ?T2/UAB/F/P BOX 1505 +46 8 727 57 25 125 25 ?lvsj? From thantos@REDACTED Wed Aug 23 16:07:59 2000 From: thantos@REDACTED (Alexander Williams) Date: Wed, 23 Aug 2000 10:07:59 -0400 Subject: typing In-Reply-To: <402DD461F109D411977E0008C791C3125650AD@imp02mbx.one2one.co.uk>; from Sean.Hinde@one2one.co.uk on Wed, Aug 23, 2000 at 02:04:16PM +0100 References: <402DD461F109D411977E0008C791C3125650AD@imp02mbx.one2one.co.uk> Message-ID: <20000823100759.A23539@gw.total-web.net> On Wed, Aug 23, 2000 at 02:04:16PM +0100, Sean Hinde wrote: > 2. I guess any solution to finger trouble in atoms is getting towards a > proper type system. Maybe something which could be declared at the start of > a module which restricted the set of atoms which could be defined in the > source for that file would do 80% of the job. Language Guru help needed! Of course, you've just doubled the liklihood that you'll miskey the symbol, since that's one more CRITICAL time you'll have to type it. I'm not sure there's an automated way to avoid problems like this, save to use an integrated editor that only LETS you enter an identifier/symbol once and ever after provides a pulldown for it. That's not really a "language issue," though. > 3. Well, a string type would help!! Barring that to implement something like > in Java (ironically strongly typed) where you can send any rubbish into a In my experience, the best way to deal with this is to write a function that, given an Object, returns a string representation of that Object to the best of its ability. This is the way Python handles the problem, and I find it rather convenient. The "%s" directive automatically calls an Object's __str__ attribute which returns a string representation. Erlang could get away with providing an extensible function (possibly in string:) that handles Objects known about. An easy way to extend its functioning without some kind of type-checking or OOP encapsulation eludes me, however. -- Alexander Williams (thantos@REDACTED) | In the End, "Blue Jester needs food." | Oblivion "Blue Jester needs fuku-wearing cuties." | Always http://www.chancel.org | Wins From Sean.Hinde@REDACTED Wed Aug 23 16:14:41 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Wed, 23 Aug 2000 15:14:41 +0100 Subject: typing Message-ID: <402DD461F109D411977E0008C791C3125650AF@imp02mbx.one2one.co.uk> Guys, > > There's a contribution on the erlang.org contributions page > (http://www.erlang.org/user.html#depcheck-1.0) which appears to > do this (but not handle apply). I haven't used it, though. > > Matthias > I have used depcheck and did adapt it to go through a whole set of applications. I didn't mention it here as it uses exref which the docs suggest will be removed in R7. It is also pretty cumbersome and as you say doesn't deal with apply (or BIFs). (Just In - good news for R7!) Some of the comments came from a guy here who in a previous life spent 7 years writing SCPs in C. He is finding that he needs to be much more careful about typos than he used to be. Old C model - hack it in let the compiler find the typos, Erlang model - type it in very carefully and hope that in 6 months time your typo doesn't cause a breakage. He is feeling insecure about some of his code compared to C (!) Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From Sean.Hinde@REDACTED Wed Aug 23 16:18:02 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Wed, 23 Aug 2000 15:18:02 +0100 Subject: typing Message-ID: <402DD461F109D411977E0008C791C3125650B0@imp02mbx.one2one.co.uk> Thomas, > A separate file stating > Messages formats used in this module: > > {tag1,*,*,tag2,*} > {tag3,*} > tag4 > {tag5,*,*} > > together with a small addition to a parse tool would do. But > it won't prevent > you from calling a process with {compute,16} and receiving > {compute,X} when list(X) -> Agreed, but it would help I think. Better even in the same file! Maybe I'll have a bash at something. > Adding a string type is something one needs to do in the > runtime system. I don't know > why this hasn't been done. The booleans should have had their > own type as well. Any news on this front for R7 (or R8)? Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From Sean.Hinde@REDACTED Wed Aug 23 16:26:40 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Wed, 23 Aug 2000 15:26:40 +0100 Subject: typing Message-ID: <402DD461F109D411977E0008C791C3125650B2@imp02mbx.one2one.co.uk> Is anyone else using this sort of technique in big projects? How do Ericsson themselves minimise the likelyhood that these sorts of runtime errors will not make their way into system testing and hence cause big cost and delay? Sean Another solution for this one is to use macros instead of atoms e.g. -define(Message,message). receive ?Message -> ok Any -> Any end This way any mistypes are spotted by the compiler, very usefull in genservers with a lot of state atoms NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From cesarini@REDACTED Wed Aug 23 16:46:35 2000 From: cesarini@REDACTED (Francesco Cesarini) Date: Wed, 23 Aug 2000 15:46:35 +0100 Subject: typing References: <402DD461F109D411977E0008C791C3125650B2@imp02mbx.one2one.co.uk> Message-ID: <39A3E3CB.624AED82@terminus.ericsson.se> Sean Hinde wrote: > > Is anyone else using this sort of technique in big projects? > > How do Ericsson themselves minimise the likelyhood that these sorts of > runtime errors will not make their way into system testing and hence cause > big cost and delay? Not that I have seen it being used in major projects, but in 1995 I was using a little parser written by Hans at the CS lab. It chugged through a set of modules and returned all the atoms which appeared only once in the code, [together with their module and line number ?]. It helped detect most of the misspelt atom errors. If this program is still around, (or some one with the time wants to rewrite it), it would be great if it was added to the contributions section. Cheers, Francesco -- Francesco Cesarini Erlang/OTP consultant Cellular: INT+44-7776 250381 URL: http://welcome.to/cesarini.consulting From per@REDACTED Wed Aug 23 22:09:42 2000 From: per@REDACTED (Per Hedeland) Date: Wed, 23 Aug 2000 22:09:42 +0200 (CEST) Subject: Error trying to build otp_src_R6B-0 In-Reply-To: Message-ID: <200008232009.e7NK9gi43111@tordmule.bluetail.com> "Vance Shipley" wrote: > >Simon Raahauge writes: >} >} I'm trying to compile Erlang/OTP (whatever it's called) on a >} NetBSD-1.4.2/SPARC system. THe build dies like this: >} erlc -W -bbeam -I/home/xiamin/apple/otp_src_R6B-0/lib/stdlib -o../ebin >} asn1ct_parser.erl >} Can't allocate 2056916 bytes of memory > >I had this problem on Unixware as well. I had to tune the kernel to >allow a higher maximum amount of memory to be allocated to a single >user process. I'm not sure which kernel parameter you'll need on >NetBSD. Sounds unlikely for *BSD, I think (on FreeBSD the default limit seems to be 512MB) - perhaps Simon just needs more swap? That ASN.1 stuff does require a lot of memory...:-) --Per Hedeland per@REDACTED From xiamin@REDACTED Wed Aug 23 23:13:46 2000 From: xiamin@REDACTED (Simon Raahauge DeSantis) Date: Wed, 23 Aug 2000 17:13:46 -0400 Subject: Error trying to build otp_src_R6B-0 In-Reply-To: <200008232009.e7NK9gi43111@tordmule.bluetail.com>; from Per Hedeland on Wed, Aug 23, 2000 at 10:09:42PM +0200 References: <200008232009.e7NK9gi43111@tordmule.bluetail.com> Message-ID: <20000823171346.A29169@ghostpriest.rakis.net> On Wed, Aug 23, 2000 at 10:09:42PM +0200, Per Hedeland wrote: > "Vance Shipley" wrote: > > > >Simon Raahauge writes: > >} > >} I'm trying to compile Erlang/OTP (whatever it's called) on a > >} NetBSD-1.4.2/SPARC system. THe build dies like this: > >} erlc -W -bbeam -I/home/xiamin/apple/otp_src_R6B-0/lib/stdlib -o../ebin > >} asn1ct_parser.erl > >} Can't allocate 2056916 bytes of memory > > > >I had this problem on Unixware as well. I had to tune the kernel to > >allow a higher maximum amount of memory to be allocated to a single > >user process. I'm not sure which kernel parameter you'll need on > >NetBSD. > > Sounds unlikely for *BSD, I think (on FreeBSD the default limit seems to > be 512MB) - perhaps Simon just needs more swap? That ASN.1 stuff does > require a lot of memory...:-) > Turns out doing a simple 'unlimit' did the trick. (My machine has 64mb of physical and 128mb of swap so I'd hope it wasn't a lack of memory) Of course the build fails when it tries to build etk_drv.c as NetBSD doesn't (yet) support pthreads. Shouldn't that be detected at configure time? Hmmm. pth (The GNU Portable Thread Library) is in pkgsrc, could installing this help? I also had to do some ld stuff by hand where the makefile tried to do ld -share -soname etc etc. (It needed to be -Bshareable on my system) Erlang looks really cool and I'd love to have it running on my box so I could play around. -- -Simon Raahauge DeSantis From thantos@REDACTED Wed Aug 23 23:35:13 2000 From: thantos@REDACTED (Alexander Williams) Date: Wed, 23 Aug 2000 17:35:13 -0400 Subject: typing In-Reply-To: <402DD461F109D411977E0008C791C3125650AF@imp02mbx.one2one.co.uk>; from Sean.Hinde@one2one.co.uk on Wed, Aug 23, 2000 at 03:14:41PM +0100 References: <402DD461F109D411977E0008C791C3125650AF@imp02mbx.one2one.co.uk> Message-ID: <20000823173513.A24340@gw.total-web.net> On Wed, Aug 23, 2000 at 03:14:41PM +0100, Sean Hinde wrote: > Some of the comments came from a guy here who in a previous life spent 7 > years writing SCPs in C. He is finding that he needs to be much more careful > about typos than he used to be. Old C model - hack it in let the compiler > find the typos, Erlang model - type it in very carefully and hope that in 6 > months time your typo doesn't cause a breakage. He is feeling insecure about > some of his code compared to C (!) I'm not sure I really understand his adopted mindset, though maybe that comes from having worked in dynamic languages extensively. Does he not do integrated testing as he goes? Crank up a temporary Erlang node and send in the module/application, then begin unit testing of the functions over various inputs. If he does it as he goes, actually testing interactively as he writes the source, perhaps he'll be MORE secure about his code, because its been tested a brick at a time. Programming in dynamic languages does require a change in operational development mindset; the compiler no longer catches some kinds of errors for you, but is better at catching/adapting to others. Using the same kind of write-compile-rewrite cycle doesn't make sense. (I end up having the interpreter running, and literally "testing as I go." Probably end up testing more things that could go wrong than even the type system would catch, really.) -- Alexander Williams (thantos@REDACTED) | In the End, "Blue Jester needs food." | Oblivion "Blue Jester needs fuku-wearing cuties." | Always http://www.chancel.org | Wins From per@REDACTED Thu Aug 24 00:04:15 2000 From: per@REDACTED (Per Hedeland) Date: Thu, 24 Aug 2000 00:04:15 +0200 (CEST) Subject: Error trying to build otp_src_R6B-0 In-Reply-To: <20000823171346.A29169@ghostpriest.rakis.net> Message-ID: <200008232204.e7NM4FK43225@tordmule.bluetail.com> >Turns out doing a simple 'unlimit' did the trick. Great! >Of course the build fails when it tries to build etk_drv.c as NetBSD doesn't >(yet) support pthreads. Shouldn't that be detected at configure time? Hmmm. >pth (The GNU Portable Thread Library) is in pkgsrc, could installing this >help? I also had to do some ld stuff by hand where the makefile tried to do >ld -share -soname etc etc. (It needed to be -Bshareable on my system) >Erlang looks really cool and I'd love to have it running on my box so I >could play around. You should apply all the patches at the "Bugs and Fixes" page (http://www.erlang.org/faq/bugs_and_fixes.html) - they need to be applied to a just-unpacked distribution before 'configure' is run. (You can do it with 'cat /some/dir/tmp_patch_R6B0.* | patch -p0' in the otp_src_R6B-0 directory, which should probably be mentioned somewhere on the page...) There are fixes related to both these issues, hopefully they'll do the trick for you. Hm, actually it seems the -Bshareable won't happen - for a quick hack fix, try (after applying the patches but before running configure) changing the line (should be 4398:-) in erts/autoconf/configure that says freebsd2*) to something like freebsd2*|netbsd1*) (yes, it should probably be an actual test instead, but it's a bit complicated...). --Per Hedeland per@REDACTED From laufer@REDACTED Thu Aug 24 00:53:55 2000 From: laufer@REDACTED (=?iso-8859-1?Q?Konstantin_L=E4ufer?=) Date: Wed, 23 Aug 2000 17:53:55 -0500 Subject: REMINDER: ICFP Programming Contest - Task to be posted this Saturday 17:00 EST Message-ID: [Please note that the task for the ICFP Programming Contest will be posted this Saturday, August 26, at 17:00 EST (5 pm).] We are pleased to announce: The Third Annual ICFP PROGRAMMING CONTEST August 26-29, 2000 http://www.cs.cornell.edu/icfp/ Convinced your favorite programming language provides unbeatable productivity? Do functional languages lead to better and faster programs? Perhaps it's just the case that functional programming languages attract better programmers than other languages...and you and your friends are the best of the best. If so, we're providing you the opportunity to prove it! We are pleased to announce the Third Annual ICFP Programming Contest to be held in conjunction with the 2000 International Conference on Functional Programming (ICFP'00). All programmers are invited to enter the contest, either individually or in teams; we especially encourage students to enter. You may use any programming language (or combination of languages) to show your skill. On Saturday, August 26 at 5pm EST, we will publish a challenge task to registered participants. Teams will have until Tuesday, August 29 at 5pm EST (72 hours) to implement a program to perform this task and submit it to the contest judges. We've designed the contest for direct, head-to-head comparison of language technology and programming skill. We have a range of prizes for the winners: cash awards, famous texts on functional languages donated and autographed by the authors, special student prizes, and, of course, unlimited bragging rights. For more information about the contest, prizes, and registration, point your browser to: http://www.cs.cornell.edu/icfp. For more information about ICFP 2000, see: http://diwww.epfl.ch/~odersky/icfp2000 From laufer@REDACTED Thu Aug 24 00:57:36 2000 From: laufer@REDACTED (=?iso-8859-1?Q?Konstantin_L=E4ufer?=) Date: Wed, 23 Aug 2000 17:57:36 -0500 Subject: REMINDER: PLI 2000 Early Registration Deadline this Friday, August 25th Message-ID: PLI 2000 Principles, Logics, and Implementations of high-level programming languages Montr?al, Canada September 17-22, 2000 http://www.cs.yorku.ca/pli00 This is a reminder that the early registration deadline for PLI 2000 is August 25th. You need to reserve by the end of this week in order to get the cheaper registration rates and hotel bookings. The colloquium on Principles, Logics, and Implementations of high-level programming languages is a collection of conferences and workshops aimed at the advancement of high-level programming languages. PLI 2000 comprises the following conferences and workshops: ICFP International Conference on Functional Programming PPDP Principles and Practice of Declarative Programming Haskell Workshop on Haskell HLCL High-Level Concurrent Languages HOOTS Higher Order Operational Techniques in Semantics RULE Rule-Based Programming Scheme Workshop on Scheme and Functional Programming SAIG Semantics, Applications and Implementation of Program Generation TIC Types in Compilation For further information and registration forms, see http://www.cs.yorku.ca/pli00 From jon@REDACTED Thu Aug 24 07:27:11 2000 From: jon@REDACTED (Jon) Date: Thu, 24 Aug 2000 15:27:11 +1000 Subject: jon NEW EMAIL ADDRESS violetsphere@yahoo.com.au Message-ID: <39A4B22F.836A88BB@central.warehouse.net> jon holdsworth was jon@REDACTED will be again but not until much rewiring is done so use: violetsphere@REDACTED spheres! jon From joe@REDACTED Thu Aug 24 09:29:39 2000 From: joe@REDACTED (Joe Armstrong) Date: Thu, 24 Aug 2000 09:29:39 +0200 (CEST) Subject: typing In-Reply-To: <20000823173513.A24340@gw.total-web.net> Message-ID: On Wed, 23 Aug 2000, Alexander Williams wrote: > On Wed, Aug 23, 2000 at 03:14:41PM +0100, Sean Hinde wrote: > > Some of the comments came from a guy here who in a previous life spent 7 > > years writing SCPs in C. He is finding that he needs to be much more careful > > about typos than he used to be. Old C model - hack it in let the compiler > > find the typos, Erlang model - type it in very carefully and hope that in 6 > > months time your typo doesn't cause a breakage. He is feeling insecure about > > some of his code compared to C (!) Typing *is* useful but not a universal panacea. A type checker could *prove* that the following factorial program was correct: +type fac(int()) -> int(). fac(1) -> 17. To get a "nice warm feeling inside" I'd also like to make a few spot checks (i.e. compute fac(6) and check that I really do get 720)! <> As for being insecure in Erlang compared to C IHMO it's the other way around. In Erlang I write: -module(fac). -export([fac/1]). fac(0) -> 1; fac(N) -> N * fac(N-1). And then incremetally test. [joe@REDACTED] > erl Erlang (BEAM) emulator version 4.9.1.b8 [source] Eshell V4.9.1.b8 (abort with ^G) 1> c(fac). {ok,fac} 2> fac:fac(6). 720 - looking good. I'm getting a nice warm feeling inside :-) (oh and there *is* no type proof of correctness - but I'm not worried) - try again 3> fac:fac(200). 788657867364790503552363213932185062295135977687173263294742533244359449963403342920304284011984623904177212138919638830257642790242637105061926624952829931113462857270763317237396988943922445621451664240254033291864131227428294853277524242407573903240321257405579568660226031904170324062351700858796178922222789623703897374720000000000000000000000000000000000000000000000000 Now I have to make an act of faith - do I believe this? - Yes - the bignumber stuff was and is carefully tested. Would I believe a C program that did the same thing? - no I'd have to start worrying about the exact point when things overflowed etc. and *that* is hard. > 'm not sure I really understand his adopted mindset, though maybe > that comes from having worked in dynamic languages extensively. > > Does he not do integrated testing as he goes? Crank up a temporary > Erlang node and send in the module/application, then begin unit > testing of the functions over various inputs. If he does it as he > goes, actually testing interactively as he writes the source, perhaps > he'll be MORE secure about his code, because its been tested a brick > at a time. Yes! > > Programming in dynamic languages does require a change in operational > development mindset; the compiler no longer catches some kinds of > errors for you, but is better at catching/adapting to others. Using > the same kind of write-compile-rewrite cycle doesn't make sense. (I > end up having the interpreter running, and literally "testing as I > go." Probably end up testing more things that could go wrong than > even the type system would catch, really.) Yes again. It's even nicer you get to run your program really early in the development cycle. I view programming as the gradual discoving of types. When the development is over I then know the types. If I'd known them before I'd started then the program would have "written itself". Erlang is an vehicle that helps me discover the types. /Joe -- Joe Armstrong, Bluetail AB, tel: +46 8 692 22 11 Hantverkargatan 78, fax: +46 8 654 70 71 SE-112 38 Stockholm, Sweden info: www.bluetail.com From ltaesch@REDACTED Wed Aug 23 01:39:56 2000 From: ltaesch@REDACTED (Luc Taesch) Date: Wed, 23 Aug 2000 01:39:56 +0200 Subject: typing References: <402DD461F109D411977E0008C791C3125650AF@imp02mbx.one2one.co.uk> <20000823173513.A24340@gw.total-web.net> Message-ID: <39A30F4B.BCA6BAFD@abom.com> > > > I'm not sure I really understand his adopted mindset, though maybe > that comes from having worked in dynamic languages extensively. > > > > Programming in dynamic languages does require a change in operational > development mindset; the compiler no longer catches some kinds of > errors for you, but is better at catching/adapting to others. Using > the same kind of write-compile-rewrite cycle doesn't make sense. (I > end up having the interpreter running, and literally "testing as I > go." Probably end up testing more things that could go wrong than > even the type system would catch, really.) > I'll come from a heavily typed and statically typed and linked enviroenmemnt (Eiffel), and since im doing erlang for 1 month now, I understand what u said, and came to the same conclusion: the less typed, the more dynymically typed the language is, the more u need test rather than relying on the compiler/linker . ive experimenting XP (extreme programming ) approach recently, which put the focus on testing heavily, , and its not surprising that the originators of that (ward/beck) are smalltalker (which is dynamically typed). in their case, its not an option ! but do u have a test suite internally, at ericsson, which was not open-sourced ? is it alinke these Xunit test suite ? From thomas@REDACTED Thu Aug 24 10:00:35 2000 From: thomas@REDACTED (Thomas Arts) Date: Thu, 24 Aug 2000 10:00:35 +0200 Subject: typing References: <402DD461F109D411977E0008C791C3125650B2@imp02mbx.one2one.co.uk> <39A3E3CB.624AED82@terminus.ericsson.se> Message-ID: <39A4D623.49243E39@cslab.ericsson.se> Francesco Cesarini wrote: > Not that I have seen it being used in major projects, but in 1995 I was > using a little parser written by Hans at the CS lab. It chugged through > a set of modules and returned all the atoms which appeared only once in > the code, [together with their module and line number ?]. It helped > detect most of the misspelt atom errors. If this program is still > around, (or some one with the time wants to rewrite it), it would be > great if it was added to the contributions section. That's not so hard to write. See attached source code. Please test it for me, since that's not done yet. uniqatom.erl can be used to find all uniquely appearing atoms in a file (that is to say, functions and record names are not considered to be atoms in this). uniqatom:check(FileName). please use a string with extension .erl as FileName (e.g. "uniqatom.erl"). Best regards Thomas -------------- next part -------------- % % Thomas Arts % 20000824 % -module(uniqatom). -export([check/1,uniques/2]). -import(lists,[foldl/3]). check(FileName) -> Dir = filename:dirname(FileName), Module = filename:basename(FileName,".erl"), case epp:parse_file(FileName,[Dir],[]) of {ok,AbsForms} -> Atoms = foldl(fun(AbsForm,As) -> collect(AbsForm)++As end,[],AbsForms), [ "line "++integer_to_list(Line)++": "++atom_to_list(Atom) || {atom,Line,Atom}<-uniques(Atoms,[]) ]; {error,ErrorDesc} -> exit({?MODULE,"cannot read file "++FileName}) end. uniques([],_) -> []; uniques([H|T],Doubles) -> case member(H,T) of true -> uniques(T,[H|Doubles]); false -> case member(H,Doubles) of true -> uniques(T,Doubles); false -> [H|uniques(T,Doubles)] end end. member(_,[]) -> false; member({atom,_,Atom},[{atom,_,Atom}|_]) -> true; member(Atom,[_|Atoms]) -> member(Atom,Atoms). collect(AbsForm) -> case AbsForm of {function,Line,Name,Arity,Body} -> atoms(Body); _ -> [] end. atoms(Expr) -> case Expr of {atom,_,Atom} -> [Expr]; {tuple,_,Exprs} -> atoms(Exprs); {cons,_,Head,Tail} -> atoms([Head,Tail]); {lc,_,E,GenFils} -> atoms([E|GenFils]); {generate,_,Expr1,Expr2} -> atoms([Expr1,Expr2]); {clause,_,Patterns,Guards,Body} -> atoms(Patterns++Guards++Body); {'case',_,E,Clauses} -> atoms([E|Clauses]); [] -> []; [E|Es] -> atoms(E)++atoms(Es); {block,_,Exprs} -> atoms(Exprs); {match,_,Expr1,Expr2} -> atoms([Expr1,Expr2]); {'if',_,Clauses} -> atoms(Clauses); {'receive',_,Clauses} -> atoms(Clauses); {'receive',_,Clauses,TimeOut,Args} -> atoms(Clauses++Args); {'catch',_,Arg} -> atoms(Arg); {'throw',_,Arg} -> atoms(Arg); {call,_,Func,Args} -> atoms(Args); {op,_,Name,Arg} -> atoms(Arg); {op,_,Name,Arg1,Arg2} -> atoms([Arg1,Arg2]); {'fun',_,{clauses,Clauses}} -> atoms(Clauses); {record,_,Name,Fields} -> atoms(Fields); {record,_,Record,Name,Fields} -> atoms([Record|Fields]); {record_field,_,Name,E} -> atoms(E); {record_index,_,Record,Name,_} -> atoms(Record); _ -> [] end. From Sean.Hinde@REDACTED Thu Aug 24 15:37:51 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Thu, 24 Aug 2000 14:37:51 +0100 Subject: typing Message-ID: <402DD461F109D411977E0008C791C3125650B6@imp02mbx.one2one.co.uk> > Typing *is* useful but not a universal panacea. A type > As for being insecure in Erlang compared to C IHMO it's the other > way around. I totally agree in the vast majority of cases, which is why we are using it in our GSM Network so extensively and successfully :-) > > Does he not do integrated testing as he goes? Crank up a temporary Yes, but it is difficult to test all those hard to reach error cases such as you may for example find in socket programming when odd things happen in the network and you get different types of read errors (recoverable|non_recoverable). I'm sure in every system there are such paths which are never excercised in testing. My interest is in how to minimise the occurence of errors in the margins of the system by improved tools rather than more testing, and the ones I mentioned originally are not found by compiling or linking. (This is also why error_report:format("This function doesn't exist"). is such a favourite. It is reporting an error case, and doesn't work in itself - You need to do error_report:format("This function doesn't exist",[]). Even type errors even of the form f([[..]]) rather than f([..]) are likely to be in intricate bits of the system which are going to be bomb proof tested as a core brick and hence less of a problem. As I get more experience of deploying systems and more understanding of the gotchas things are improving, but as an engineer I am always looking for better tools. (Thank you again Joe and the guys!!) > > Programming in dynamic languages does require a change in > operational > > development mindset; the compiler no longer catches some kinds of This is also how I work. I haven't yet managed to wean our guy here out of stopping and starting the system every time he makes a change (or even move him from vi to Emacs)!! One tool which would help in the "keep a node running and do c(new_version)." development approach would be something which reported back as info from the runtime if the newly loaded version addressed any undefined external functions. Immediate feedback is the best kind (and it wouldn't add any runtime overhead). Sean. NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From Sean.Hinde@REDACTED Thu Aug 24 15:46:31 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Thu, 24 Aug 2000 14:46:31 +0100 Subject: typing Message-ID: <402DD461F109D411977E0008C791C3125650B7@imp02mbx.one2one.co.uk> Thomas, Francesco, > That's not so hard to write. See attached source code. Please test it > for me, since that's not done yet. Thanks for the idea and the code. I also wrote my own last night by hacking on the erl_id_trans.erl example in the stdlib source, but compared to yours it is something of an embarrasing mess ;-). It certainly seems to work, though running (actually my version) over mnesia reveals several hundred uniqatoms. I'll persevere with my own libraries and see what I find. Cheers, Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From Sean.Hinde@REDACTED Thu Aug 24 16:13:54 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Thu, 24 Aug 2000 15:13:54 +0100 Subject: QNX Message-ID: <402DD461F109D411977E0008C791C3125650B8@imp02mbx.one2one.co.uk> On a completely different subject.. Has anyone ever managed to compile OTP on QNX (www.qnx.com). I notice through the source there are several #ifdef QNXs but I've not tried to compile it myself. Also, Does anyone have any experience of running systems based on QNX? It seems to have some very nice properties which would go nicely with Erlang. Thanks, Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From klacke@REDACTED Thu Aug 24 18:31:47 2000 From: klacke@REDACTED (Klacke) Date: Thu, 24 Aug 2000 18:31:47 +0200 Subject: QNX In-Reply-To: <402DD461F109D411977E0008C791C3125650B8@imp02mbx.one2one.co.uk> References: <402DD461F109D411977E0008C791C3125650B8@imp02mbx.one2one.co.uk> Message-ID: <20000824183147.A12007@bluetail.com> On Thu, Aug 24, 2000 at 03:13:54PM +0100, Sean Hinde wrote: > On a completely different subject.. > > Has anyone ever managed to compile OTP on QNX (www.qnx.com). I notice > through the source there are several #ifdef QNXs but I've not tried to > compile it myself. Many years ago (in a different galaxy) I though that QNX was a beautiful little OS that would blend nicely with erlang. Ericsson was by then (probably still is ...) searching for a general purpose platform and I thought that maybe the combo QNX/erlang could fit. We got ourself a brand new superfast 486 and Magnus Fr?berg ported the whole thing to QNX. This turned out to be a dead duck though, nobody wanted it and by now the code has probably rotted and is completely useless. Anybody interested in QNX would have to make a brand new port. This should probably not be too hard though since QNX has improved their posix support vastly since (I guess 1995) when the port was done /klacke -- Claes Wikstrom Bluetail AB http://www.bluetail.com From Sean.Hinde@REDACTED Thu Aug 24 18:46:09 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Thu, 24 Aug 2000 17:46:09 +0100 Subject: QNX Message-ID: <402DD461F109D411977E0008C791C3125650BA@imp02mbx.one2one.co.uk> > Many years ago (in a different galaxy) I though that QNX was > a beautiful little OS that would blend nicely with erlang. I have just spotted it and agree it has some very nice properties which seem complementary. Not least: * asynchronous message passing both intra and inter node built into the kernel core, * built in resiliency across multiple Ethernet links between nodes (various methods including send on all and receiver selects the first to arrive, send via another node..). * hard real time. * Claimed full POSIX compliance. > This turned out to be a dead duck though, nobody wanted it and > by now the code has probably rotted and is completely useless. > Anybody interested in QNX would have to make a brand new port. > This should probably not be too hard though since QNX has > improved their posix support vastly since (I guess 1995) when > the port was done I'll have a go at compiling OTP on it if I get some time. It seems it might be worth another look. Rgds, Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From xiamin@REDACTED Thu Aug 24 23:33:07 2000 From: xiamin@REDACTED (Simon Raahauge DeSantis) Date: Thu, 24 Aug 2000 17:33:07 -0400 Subject: Error trying to build otp_src_R6B-0 In-Reply-To: <200008232204.e7NM4FK43225@tordmule.bluetail.com>; from Per Hedeland on Thu, Aug 24, 2000 at 12:04:15AM +0200 References: <20000823171346.A29169@ghostpriest.rakis.net> <200008232204.e7NM4FK43225@tordmule.bluetail.com> Message-ID: <20000824173307.A18396@ghostpriest.rakis.net> I patched the source as suggested by Per Hedeland and it built! It even runs. The only other thing I had to do was #define IPPORT_USERRESERVED for setsocketopt.c in Orber (or something like that). I made it 1024. I'm not sure what it really should be, but hopefully that'll work. Thanks to all who helped me getting this to work. -- -Simon Raahauge DeSantis From xiamin@REDACTED Fri Aug 25 19:46:55 2000 From: xiamin@REDACTED (Simon Raahauge DeSantis) Date: Fri, 25 Aug 2000 13:46:55 -0400 Subject: fwrite/format on sockets? Message-ID: <20000825134655.A24408@ghostpriest.rakis.net> It seems like calling fwrite/format on a socket fails with badarg. Is there a way to do something like this? If sockets are not IODevices usable by fwrite, is there an equiviland to Common Lisp's (format nil "Format string")? (Ie return the string which would normally be printed instead of printing it). TIA -- -Simon Raahauge DeSantis From tobbe@REDACTED Fri Aug 25 20:56:49 2000 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: 25 Aug 2000 20:56:49 +0200 Subject: fwrite/format on sockets? In-Reply-To: Simon Raahauge DeSantis's message of "Fri, 25 Aug 2000 13:46:55 -0400" References: <20000825134655.A24408@ghostpriest.rakis.net> Message-ID: > It seems like calling fwrite/format on a socket fails with badarg. Is there > a way to do something like this? Use: gen_tcp:send/2 for this. > If sockets are not IODevices usable by > fwrite, is there an equiviland to Common Lisp's (format nil "Format > string")? (Ie return the string which would normally be printed instead of > printing it). Use: io_lib:format/2 as shown in the example below: 1> lists:flatten(io_lib:format("hello ~s~n",["world"])). "hello world\n" Cheers /Tobbe From etxuwig@REDACTED Sat Aug 26 10:40:00 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Sat, 26 Aug 2000 10:40:00 +0200 (MET DST) Subject: typing In-Reply-To: <402DD461F109D411977E0008C791C3125650B7@imp02mbx.one2one.co.uk> Message-ID: On Thu, 24 Aug 2000, Sean Hinde wrote: >Thomas, Francesco, > >> That's not so hard to write. See attached source code. Please test it >> for me, since that's not done yet. > >Thanks for the idea and the code. I also wrote my own last night by hacking >on the erl_id_trans.erl example in the stdlib source, but compared to yours >it is something of an embarrasing mess ;-). > >It certainly seems to work, though running (actually my version) over mnesia >reveals several hundred uniqatoms. I'll persevere with my own libraries and >see what I find. > >Cheers, >Sean If your search is mainly for misspelled atoms, you could include a filter removing all atoms that occur e.g. > 2 times. /Uffe -- Ulf Wiger tfn: +46 8 719 81 95 Network Architecture & Product Strategies mob: +46 70 519 81 95 Ericsson Telecom AB, Datacom Networks and IP Services Varuv?gen 9, ?lvsj?, S-126 25 Stockholm, Sweden From mbj@REDACTED Sat Aug 26 12:35:54 2000 From: mbj@REDACTED (Martin Bjorklund) Date: Sat, 26 Aug 2000 12:35:54 +0200 Subject: fwrite/format on sockets? In-Reply-To: Your message of "25 Aug 2000 20:56:49 +0200" References: Message-ID: <20000826123554P.mbj@bluetail.com> Torbjorn Tornkvist wrote: > > > It seems like calling fwrite/format on a socket fails with badarg. Is there > > a way to do something like this? > > Use: gen_tcp:send/2 for this. > > > If sockets are not IODevices usable by > > fwrite, is there an equiviland to Common Lisp's (format nil "Format > > string")? (Ie return the string which would normally be printed instead of > > printing it). > > Use: io_lib:format/2 as shown in the example below: > > 1> lists:flatten(io_lib:format("hello ~s~n",["world"])). > "hello world\n" But note that gen_tcp:send/2 does not need a flattened list. In this case you can save some performance by sending the result from io_lib:format/2 directly to gen_tcp:send/2. Also, in many cases you might not even have to call io_lib:format/2, but instead write code like this: gen_tcp:send(Sock, [String, ": ", integer_to_list(Integer)]) and so on. (This is actually true for all ports. If you find yourself using lists:flatten a lot, think again!) /martin From dne@REDACTED Sun Aug 27 02:28:11 2000 From: dne@REDACTED (Daniel Neri) Date: 27 Aug 2000 02:28:11 +0200 Subject: QNX In-Reply-To: Sean Hinde's message of "Thu, 24 Aug 2000 15:13:54 +0100" References: <402DD461F109D411977E0008C791C3125650B8@imp02mbx.one2one.co.uk> Message-ID: <87vgwntun8.fsf@nowhere.mayonnaise.net> Sean Hinde writes: > Has anyone ever managed to compile OTP on QNX (www.qnx.com). I notice > through the source there are several #ifdef QNXs but I've not tried to > compile it myself. Yes, I've managed to get an emulator working on QNX 4.24 (this was OTP version 47.4.1). I didn't spend enough time on it to figure out what changes to make to the autoconf stuff, so I never released any patches. Though, I did make some notes of the important issues while doing it. I'll send them to the list as soon as I dig them up. Regards, --Daniel -- Daniel Neri dne@REDACTED From mickael.remond@REDACTED Mon Aug 28 12:16:22 2000 From: mickael.remond@REDACTED (Mickael Remond) Date: 28 Aug 2000 12:16:22 +0200 Subject: noshell problem Message-ID: <87snrphert.fsf@western.ird.idealx.com> Hi, I ma trying to launch an Erlang program in background so that I can close the terminal and let the server keep on working. But I encounter some problem with this feature. Here is what I am doing: I am launching my Erlang server : erl -noshell -s sessions start & => The programm reach the state stopped and seem to wait for input data. I also tried to launch my program with -noinput option, but the program also reach the stopped state. How do you launch your Erlang programm so that they run in the background (and so that you can close you terminal) ? Thank you in advance for your help. -- Micka?l R?mond From raimo@REDACTED Mon Aug 28 13:02:13 2000 From: raimo@REDACTED (Raimo Niskanen) Date: Mon, 28 Aug 2000 13:02:13 +0200 Subject: noshell problem References: <87snrphert.fsf@western.ird.idealx.com> Message-ID: <39AA46B5.EC804BCE@erix.ericsson.se> Mickael Remond wrote: > > Hi, > > I ma trying to launch an Erlang program in background so that I can close the > terminal and let the server keep on working. > > But I encounter some problem with this feature. > > Here is what I am doing: > > I am launching my Erlang server : > > erl -noshell -s sessions start & > > => The programm reach the state stopped and seem to wait for input data. > > I also tried to launch my program with -noinput option, but the program > also reach the stopped state. > > How do you launch your Erlang programm so that they run in the background (and > so that you can close you terminal) ? > > Thank you in advance for your help. > > -- > Micka?l R?mond Try: erl -detached -s sessions start (implies -noshell -noinput; no trailing &) / Raimo Niskanen, Erlang/OTP From chris.williams@REDACTED Mon Aug 28 13:31:16 2000 From: chris.williams@REDACTED (Chris Williams) Date: Mon, 28 Aug 2000 12:31:16 +0100 Subject: noshell problem References: <87snrphert.fsf@western.ird.idealx.com> Message-ID: <39AA4D84.7D7F7F78@ericsson.com> Hi, The noshell option will still give printouts in a shell but you will not be able to write to it A better option it to start the system in "embedded mode" with the command run_erl eg. $BINDIR/run_erl $PIPEDIR $LOGDIR "exec $BINDIR/erlexec \ -boot $RELDIR/start \ -s session start"> /dev/null 2>&1 & Where: PIPEDIR="/tmp/" or where you want BINDIR="/tmp/" or where you want This will run the your system in the background. //Chris ============================================================================ Christopher Williams Phone: +353 902 31365 Ericsson Systems ECN: 8301365 Expertise Limited, Mob: +353 87 64 888 04 Athlone, Fax: +353 902 31304 Co.Westmeath, http://www.eei.ericsson.se/~eeiaxm3 Ireland chris.williams@REDACTED ============================================================================ Mickael Remond wrote: > > Hi, > > I ma trying to launch an Erlang program in background so that I can close the > terminal and let the server keep on working. > > But I encounter some problem with this feature. > > Here is what I am doing: > > I am launching my Erlang server : > > erl -noshell -s sessions start & > > => The programm reach the state stopped and seem to wait for input data. > > I also tried to launch my program with -noinput option, but the program > also reach the stopped state. > > How do you launch your Erlang programm so that they run in the background (and > so that you can close you terminal) ? > > Thank you in advance for your help. > > -- > Micka?l R?mond -- From mickael.remond@REDACTED Mon Aug 28 13:34:09 2000 From: mickael.remond@REDACTED (Mickael Remond) Date: 28 Aug 2000 13:34:09 +0200 Subject: noshell problem In-Reply-To: Raimo Niskanen's message of "Mon, 28 Aug 2000 13:02:13 +0200" References: <87snrphert.fsf@western.ird.idealx.com> <39AA46B5.EC804BCE@erix.ericsson.se> Message-ID: <87snrpfwlq.fsf@western.ird.idealx.com> >>>>> "Raimo" == Raimo Niskanen writes: > Try: erl -detached -s sessions start > (implies -noshell -noinput; no trailing &) Thank you. This work very well. Someone pointed me to erl_call, but erl_call is not in the standard path. I like this one better. This option is not documented though ("man erl" does not show this option, which is however pretty useful). Thank you all for your quick help. -- Micka?l R?mond From thomas@REDACTED Tue Aug 29 09:16:51 2000 From: thomas@REDACTED (Thomas Arts) Date: Tue, 29 Aug 2000 09:16:51 +0200 Subject: Erlang session in IFL References: <87snrphert.fsf@western.ird.idealx.com> <39AA46B5.EC804BCE@erix.ericsson.se> <87snrpfwlq.fsf@western.ird.idealx.com> Message-ID: <39AB6363.903CFE7A@cslab.ericsson.se> Hi all Next week the international workshop on the implementation and use of functional languages will take place in Aachen (Germany). This workshop includes a special session about Erlang on September 7th: 12:30 Lunch 13:50 Welcome for Erlang session 14:00 Ulf Wiger Industrial-Strength Functional Programming: Experiences from the Ericsson AXD 301 Project 14:45 Dan Sahlin Safe Erlang: Extending Erlang with Secure Distribution 15:15 Break 16:00 Robert Tj?rnstr?m Hardware Execution of Erlang 16:45 Gennady Ghugunov A Tool for Verifying Erlang Programs 17:15 End of Workshop Participation and lunch are free of charge. Welcome! Please send me an email if you plan to come, such that I can make sure there are enough seats and that there is enough lunch served. thomas@REDACTED see http://www-i2.informatik.rwth-aachen.de/ifl2000/ for details on location. /Thomas From yvan.godin@REDACTED Tue Aug 29 11:52:05 2000 From: yvan.godin@REDACTED (yvan.godin@REDACTED) Date: Tue, 29 Aug 2000 11:52:05 +0200 (MEST) Subject: HTTPD and file Upload Message-ID: <967542725.39ab87c57ed7f@imp.free.fr> Hi, I am looking for ERLANG and HTTPD coding I got some trouble on the way to upload a file with INETS/HTTPD/MOD_ESI ? I have try this request: get(Env,[]) -> [header(), top("GET Example"), "
Input:
" ++ "\n", bottom()]; this generate the anwser ********************** blabla................. Parsed Input: [{"-----------------------------7d01ef9339d06e6\r\nContent-Disposition: form-data", []}, {" name", "\"input1\"\r\n\r\n\r\n-----------------------------7d01ef9339d06e6\r\nContent- Disposition: form-data"}, {" name","\"input2\""}, {" filename", "\"F:\\clean.txt\"\r\nContent-Type: text/plain\r\n\r\nFILE TEXT CONTENT .............................blabla................. 7d01ef9339d06e6--\r\n"}] so the content of the file seem mixed in variable content, and is not decoded ( this seem not usable for large file!) Does exist another method ? Is the server abble to deal with multipart form? thank for anwsers Yvan GODIN http://yvan.godin.free.fr EMail yvan.godin@REDACTED From tobbe@REDACTED Tue Aug 29 12:40:20 2000 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: 29 Aug 2000 12:40:20 +0200 Subject: HTTPD and file Upload In-Reply-To: yvan.godin@free.fr's message of "Tue, 29 Aug 2000 11:52:05 +0200 (MEST)" References: <967542725.39ab87c57ed7f@imp.free.fr> Message-ID: > Is the server abble to deal with multipart form? I'm not sure what a 'multipart form' means but you can take a look at an application that uses plenty of PUT/GET requests, here: http://www.bluetail.com/~tobbe/btt Cheers /Tobbe From yvan.godin@REDACTED Tue Aug 29 12:53:45 2000 From: yvan.godin@REDACTED (yvan.godin@REDACTED) Date: Tue, 29 Aug 2000 12:53:45 +0200 (MEST) Subject: HTTPD and file Upload In-Reply-To: References: <967542725.39ab87c57ed7f@imp.free.fr> Message-ID: <967546425.39ab96399774b@imp.free.fr> > > I'm not sure what a 'multipart form' means but you it's the way to UPLOAD file from HTTP client to server > can take a look at an application that uses plenty > of PUT/GET requests, here: > http://www.bluetail.com/~tobbe/btt I have got very little insigth to bluetail, but it seem they do not use the UpLoad mecanism! Yvan GODIN http://yvan.godin.free.fr EMail yvan.godin@REDACTED From daniel.neri@REDACTED Tue Aug 29 13:24:45 2000 From: daniel.neri@REDACTED (Daniel Neri) Date: 29 Aug 2000 13:24:45 +0200 Subject: HTTPD and file Upload In-Reply-To: Torbjorn Tornkvist's message of "29 Aug 2000 12:40:20 +0200" References: <967542725.39ab87c57ed7f@imp.free.fr> Message-ID: Torbjorn Tornkvist writes: > I'm not sure what a 'multipart form' means See RFC 1867[*]. Unfortunately, the inets httpd does not support it. Best wishes, --Daniel [*] http://www.rfc-editor.org/rfc/rfc1867.txt -- Daniel Neri mailto:dn@REDACTED Sigicom AB, Sweden http://www.sigicom.se From Sean.Hinde@REDACTED Tue Aug 29 13:50:28 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Tue, 29 Aug 2000 12:50:28 +0100 Subject: QNX Message-ID: <402DD461F109D411977E0008C791C3125650CD@imp02mbx.one2one.co.uk> > Yes, I've managed to get an emulator working on QNX 4.24 (this was OTP > version 47.4.1). I didn't spend enough time on it to figure out what > changes to make to the autoconf stuff, so I never released any > patches. Though, I did make some notes of the important issues while > doing it. I'll send them to the list as soon as I dig them up. The emulator (R6B) also seems to compile under QNX Neutrino (Their latest POSIX compliant version, soon to be widely released I believe). There didn't seem to be any changes required to autoconf. I haven't managed to compile the libraries yet but this should be there soon. It looks good, distribution works, but it is hard to know whether it works fully... We have the mnesia test suite but I've no idea how comprehensive this is. Hmm. Sean NOTICE AND DISCLAIMER: This email (including attachments) is confidential. If you have received this email in error please notify the sender immediately and delete this email from your system without copying or disseminating it or placing any reliance upon its contents. We cannot accept liability for any breaches of confidence arising through use of email. Any opinions expressed in this email (including attachments) are those of the author and do not necessarily reflect our opinions. We will not accept responsibility for any commitments made by our employees outside the scope of our business. We do not warrant the accuracy or completeness of such information. From bjarne@REDACTED Wed Aug 30 19:44:11 2000 From: bjarne@REDACTED (Bjarne =?iso-8859-1?Q?D=E4cker?=) Date: Wed, 30 Aug 2000 19:44:11 +0200 Subject: Erlang User Conference - Remainder Message-ID: <39AD47EB.D5F70A58@erix.ericsson.se> Dear all, Please note the 6th International Erlang/OTP User Conference http://www.erlang.se/euc/00/ Best regards, Bjarne From kurt.wilkin@REDACTED Wed Aug 30 23:59:19 2000 From: kurt.wilkin@REDACTED (Kurt) Date: Thu, 31 Aug 2000 09:59:19 +1200 Subject: Erlang.NET? Message-ID: <39AD83B7.72D96B04@actfs.co.nz> Just as a matter of interest, is there any thought of porting Erlang to the Microsoft .Net runtime? I appreciate that it is unlikely at the moment, but just wondered if it could ever happen, and what some of the main reasons for/against it are. Cheers, Kurt. From vladdu@REDACTED Thu Aug 31 22:39:01 2000 From: vladdu@REDACTED (Vlad Dumitrescu) Date: Thu, 31 Aug 2000 22:39:01 +0200 Subject: QNX thoughts (off-topic) Message-ID: Hi all! I have to confess that after checking out QNX, I had an "Ahaa!" experience very similar to the on I had when first reading about Erlang. I hope you'll excuse my ramblings, but I feel I have to share my thoughts... :-) I wonder if anyone knows if the threads and the IPC in QNX (especially the upcoming Neutrino) are lightweight enough to match the Erlang counterparts. If they do, then a very interesting vision begins to appear: an Erlang process becoming a QNX thread, with the messaging being passed natively... the Erlang runtime becomes just another OS extension, and the (Erlang-type) processes in the system need not be in Erlang anymore, but in any language... the beauty of the Erlang system, it's features encompassing the whole OS... Does that sound too weird? :-) /Vlad -------------- next part -------------- An HTML attachment was scrubbed... URL: