From jhague@REDACTED Tue Feb 1 03:01:38 2000 From: jhague@REDACTED (James Hague) Date: Mon, 31 Jan 00 20:01:38 -0600 Subject: Running Erlang w/o an OS Message-ID: <200002010207.UAA06622@node-02.advancenet.net> >wwas>I seem to remember seeing a reference (don't know where) to a >wwas>project that had Erlang running in a FPGA w/o any OS support. >wwas>Does this sound familiar to anyone? I can't find any reference to >wwas>it on www.elang.org . If this thing really exists, I would like >wwas>to take a look at it. TIA. The first thing that went through my head after reading about Transmeta's Crusoe announcement was "Hmmm...I wonder if you could make it understand the BEAM opcodes?" That might not actually be so far fetched. James From bjorn@REDACTED Tue Feb 1 11:17:53 2000 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 01 Feb 2000 11:17:53 +0100 Subject: Reducing number of copies of bulk network data In-Reply-To: Jim Larson's message of Thu, 27 Jan 2000 18:09:14 -0800 References: <200001280209.SAA00144@lefse.jetcafe.org> Message-ID: Jim Larson writes: > > Hello! > > I'm working on an Erlang application that needs to handle a large > bandwidth of network data, multiplexing it among a variety of other > (UNIX) processes, attached over TCP connections on the loopback > device. > > We use binary sockets to get the bulk data into Erlang binary form, > thus avoiding copies during intra-Erlang message-passing. > > When analyzing the performance of the application, I've noticed > that the current Internet socket driver (erts/emulator/drivers/common > /inet_drv.c) copies the data once during reception and once during > sending. > > UDP reception works fine, receiving data directly into its Binary > buffer. > > TCP reception, at least when packetizing is turned on, makes one > copy of the data. Is there any way to eliminate this copy? I know no obvious way to eliminate the copy. It might be possible by making the code in the inet driver smarter and more complicated. We have received some extensive patches to the inet driver and other parts of the runtime system. The patches will (among other things) eliminate the erlang processes currently needed to use sockets. We are investigating this patch to see if we can include it in R7. Before we've done that we don't want to make any changes to the inet driver which makes it more complicated. > > In our application, the binary received from the network is split > and reassembled into a new packet which is then sent back out over > another interface. However, for anything but a single binary, the > runtime system makes a copy of the I/O list into a contiguous > buffer, then passes that buffer to the driver. Is there any way > to eliminate this copy? > > I've noticed an "outputv" driver entry point which seems to accept > an iovec argument, instead of a simple pointer and length. This > would help our application tremendously. Is this entry point > well-supported in the runtime system? Is it mature enough for a > driver to use it? Yes, it should be. We have used it in some drivers. > > We'd eventually like to use shared memory to communicate with the > clients of our Erlang application that are running on the same > machine. To get true zero-copy, we'd need to be able to: > > - incorporate buffers from an mmap()'ed file as Erlang binary > objects; > > - receive data from a network socket directly into a buffer > in mmap()'ed space; > > - allocate all new binary objects, or buffers created by > the runtime system as concatenations of byte lists, into > buffers in mmap()'ed space. > > The easiest way to do this seems to be to: > > - modify the runtime system's malloc() wrappers to call > malloc() replacements that use shared memory (note that > this puts the entire Erlang heap into shared memory, > which may be extreme); The tagging scheme currently used dictates that heaps must be located in the lower one Giga-bytes of memory (or one Gb in some other part of the memory if you use EXTRA_POINTER_BITS). We are considering switching to a two-bit tagging scheme (allowing access to all memory), but it is unlikely what it will be done in R7. > > - create a new driver which can incorporate shared memory > buffers as new Erlang binaries. This seems feasible. It would only require minor changes to the runtime system to ensure that mmap'ed binaries are deallocated correctly when their reference counts reach zero. > > Are there any other ideas on how to do this? > > Lastly, will the upcoming binary syntax bring along an iovec-style > internal representation of binaries? This would allow us to > concatenate binaries with zero copies. Binary syntax and binary representation are actually separate issues. Our prototype implementation of the binary syntax (in R7) uses the "good old" reference-counted binaries. Our plans for binary representation are as follows: We plan to add heap binaries (small binaries up to, say, 64 bytes) will be stored on the heap and sub binaries (small heap based objects that can point to part of a reference-counted binary or heap binary). Actually, we did most of the hard work in R6B by changing the representation of binaries to include sub-tags. We think that the segmented binaries as implemented in the original binary syntax implemenation are too complicated to be worth doing. As an alternative, we are considering "lazy concatenation" of binaries: not concatenating binaries until really needed. This will probably not be done in R7. BTW, are you aware that you can combine binaries by simply building a list of the binaries? You can send the list directly to a port, and if the driver supports the outputv entry point, there will be no copying of the binaries. > > Thanks, > > Jim Larson > jim@REDACTED > /Bjorn -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 125 25 ?lvsj? From per@REDACTED Tue Feb 1 14:14:19 2000 From: per@REDACTED (Per Hedeland) Date: Tue, 1 Feb 2000 14:14:19 +0100 (MET) Subject: etk? In-Reply-To: <200001282205.QAA09691@allman.src.uchicago.edu> References: <200001282205.QAA09691@allman.src.uchicago.edu> Message-ID: <200002011314.OAA11289@aalborg.du.uab.ericsson.se> David Sallach wrote: > The open source FAQ suggests that GUI development should be done with etk >rather than gs because it is a newer and better package. Well, I guess that suggestion should really be taken as the opinion of the FAQ author rather than an "official statement" - but anyway: > However, I don't >see documentation for etk, either as a separate document, or in STDLIB. Is >it a part of R6B? Actually I posted this just a week ago:-) - here it is again: In the otp_src_doc_html_R6B-0.tar.gz tarball: lib/etk-0.9.2/doc/ (also online at http://www.erlang.org/documentation/lib/etk-0.9.2/doc/index.html) - not linked from the "main" page, though. In the otp_src_doc_man_R6B-0.tar.gz tarball: man/man3/etk.3 man/man3/tk.3 - should be accessible via 'erl -man (e)tk' when you've installed the man pages. > Are there any plans for Erlang to support a graphic system not based upon Tk? I don't know of any such plans for the "standard distribution" currently, but I believe some users are looking at an interface to gtk+. --Per Hedeland per@REDACTED From mml+erlquestions@REDACTED Tue Feb 1 14:15:44 2000 From: mml+erlquestions@REDACTED (mml+erlquestions@REDACTED) Date: Tue, 1 Feb 2000 14:15:44 +0100 (MET) Subject: Running Erlang w/o an OS In-Reply-To: <200002010207.UAA06622@node-02.advancenet.net> References: <200002010207.UAA06622@node-02.advancenet.net> Message-ID: <14486.56448.562194.30953@gargle.gargle.HOWL> > >wwas>project that had Erlang running in a FPGA w/o any OS support. > >wwas>Does this sound familiar to anyone? I can't find any reference to > The first thing that went through my head after reading about Transmeta's > Crusoe announcement was "Hmmm...I wonder if you could make it understand > the BEAM opcodes?" That might not actually be so far fetched. For the original poster, the person working on the Erlang FPGA is Robert Tjarnstrom. I'm not sure how much he'll say about what he's doing, if you're really really interested send me some mail and I'll dig up his email address. I expect the main use of an Erlang ASIC (or FPGA) to be part of a system which includes a normal CPU with a normal Erlang node on it. An operating system does, after all, provide some useful services like IO. What does that look like if we switch to crusoe? I can imagine a dual-CPU machine where one crusoe runs an instruction set suited to Erlang and one runs something more ordinary. When the Java virtual machine as specified, there was some hope that Erlang could run in it quite easily. This was dampened a bit because there are some things about the JVM which make life hard (I can't remember what). Subsequently other people have shown that maybe it's not so hard after all, e.g. Mobile Haskell: Compiling Lazy Functional Languages for the Java Virtual Machine by David Wakeling http://www.dcs.ex.ac.uk/~david/research/java.htm Matthias From paf@REDACTED Tue Feb 1 15:33:24 2000 From: paf@REDACTED (Paulo Ferreira) Date: Tue, 1 Feb 2000 14:33:24 +0000 Subject: Running Erlang w/o an OS In-Reply-To: <200002010207.UAA06622@node-02.advancenet.net> Message-ID: > >The first thing that went through my head after reading about Transmeta's >Crusoe announcement was "Hmmm...I wonder if you could make it understand >the BEAM opcodes?" That might not actually be so far fetched. > >James Well, dreaming while I am awake, how hard it would be to put a low power stack machine like the PSC1000 interpreting Beam Opcodes ? http://www.ptsc.com/psc1000/index.html Perhaps such an approach will be cheaper in terms of gates per processor ? Paulo Ferreira paf@REDACTED P.S.: Yes, I will read the beam documentation, real soon now !!! :-) :-) :-) :-) :-) :-) :-) :-) ====================================================== Paulo Ferreira paf@REDACTED From sam@REDACTED Tue Feb 1 18:48:05 2000 From: sam@REDACTED (Samuel Tardieu) Date: Tue, 1 Feb 2000 18:48:05 +0100 Subject: Running Erlang w/o an OS In-Reply-To: ; from paf@dei.isep.ipp.pt on Tue, Feb 01, 2000 at 02:33:24PM +0000 References: <200002010207.UAA06622@node-02.advancenet.net> Message-ID: <2000-02-01-18-48-05+trackit+sam@inf.enst.fr> | Well, dreaming while I am awake, how hard it would be to put a low power | stack machine like the PSC1000 interpreting Beam Opcodes ? I'm really interested on using Erlang on our embedded PPC processor. I'll finish the RTEMS port soon (hopefully within a week, as time permits) and work on porting the beam VM. If someone is already working on this, I'll happily join the porting effort. From jhague@REDACTED Wed Feb 2 03:14:03 2000 From: jhague@REDACTED (James Hague) Date: Tue, 1 Feb 00 20:14:03 -0600 Subject: Running Erlang w/o an OS Message-ID: <200002020220.UAA23494@node-02.advancenet.net> >P.S.: Yes, I will read the beam documentation, real soon now !!! Well, what little of it there is anyway :) Nudge, nudge. From geoff@REDACTED Wed Feb 2 15:14:16 2000 From: geoff@REDACTED (Geoff Wong) Date: Thu, 3 Feb 2000 01:14:16 +1100 (EST) Subject: Another RPM & patches. Message-ID: <200002021414.OAA26059@gecko.serc.rmit.edu.au> I noticed an RPM spec that was posted on here previously (by Mustafa via Per). It had the problem it bristled the existing installed system and tended to end up with a lot of miscellaneous stuff in it. I've built another RPM spec using the patches on the Erlang site and and some of my own patches so as not to bristle the existing system (I hope). Also included is a patch for detecting OpenSSL in the existing system (rather than SSleay within the source tree). And it installs the erl_interface and lib/ic libs and .h files in the location they were in the previous open source release (I think). Anyway - I should be able to put the RPM up on the eddieware.org site in the next day or so for those who don't like to wait hours for the build :-) The other thing to note is in /lib/snmp library is the default use of "nawk" in building. Probably should be autoconf'ed to use awk/gawk instead of nawk when nawk is not available. (make the script v2tov1.in or something and have autoconf handle it, or the Makefile could run sed on it; not too worried about snmp at this stage). Please send me any feedback/improvements on the RPM! Geoff --- otp.rpm.spec (cut here) Summary: The Erlang/OTP system. Name: erlang_otp # ######################################## # Uncomment "%define" and "Requires" # for your intended RedHat version # ##### RedHat 5.2 ##### #%define rhrel 5.2 #Requires: redhat-release < 6.0 # ##### RedHat 6.0 ##### %define rhrel 6.1 Requires: redhat-release >= 6.0 ######################################## # Version: R6B Release: 2 %define SrcRelease 1 Copyright: Ericsson Public License Group: Networking/Utilities Source: http://www.erlang.org/download/otp_src_%{version}-%{SrcRelease}.tar.gz Patch0: http://www.erlang.org/faq/tmp_patch_R6B0.1.1.txt Patch1: http://www.erlang.org/faq/tmp_patch_R6B0.2.txt Patch2: http://www.erlang.org/faq/tmp_patch_R6B0.3.txt Patch3: http://www.erlang.org/faq/tmp_patch_R6B0.4.txt Patch4: http://www.erlang.org/faq/tmp_patch_R6B0.5.txt Patch5: http://www.erlang.org/faq/tmp_patch_R6B0.6.txt Patch6: http://www.erlang.org/faq/tmp_patch_R6B0.7.txt Patch7: http://www.erlang.org/faq/tmp_patch_R6B0.8.txt Patch8: tmp_patch_R6B0.9.txt Patch9: tmp_patch_R6B0.10.txt Patch10: tmp_patch_R6B0.11.txt Patch11: tmp_patch_R6B0.12.txt Patch12: tmp_patch_R6B0.13.txt Patch13: tmp_patch_R6B0.14.txt Patch14: tmp_patch_R6B0.15.txt Provides: Open Source Erlang/OTP BuildRoot: /tmp/erlangbuild URL: http://www.erlang.org/ Packager: geoff@REDACTED %description The Erlang/OTP system --- Erlang is a programming language which has many features more commonly associated with an operating system than with a programming language: concurrent processes, scheduling, memory management, distribution, networking, etc. The development package in addition contains the Erlang sources for all base libraries. Includes the Erlang/OTP graphical libraries. NOTE: this RPM is intended for RedHat %{rhrel} systems. %prep rm -rf "$RPM_BUILD_ROOT" %setup -n otp_src_%{version}-0 patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.1.1.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.2.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.3.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.4.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.5.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.6.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.7.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.8.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.9.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.10.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.11.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.12.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.13.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.14.txt patch -p0 < $RPM_SOURCE_DIR/tmp_patch_R6B0.15.txt %build ./configure --prefix=/usr/local make %install rm -rf $RPM_BUILD_ROOT make install INSTALL_PREFIX="$RPM_BUILD_ROOT" %clean rm -rf "$RPM_BUILD_ROOT" %files %defattr(644 root root 755) %attr( - ,root,root) /usr/local/bin %attr( - ,root,root) /usr/local/lib %changelog * Wed Dec 1 1999 Geoff Wong - revamped spec file ----------------- tmp_patch_R6B0.9.txt (cut here) --- Makefile.in.ORIG Mon Jan 31 17:41:33 2000 +++ Makefile.in Wed Feb 2 01:02:44 2000 @@ -61,6 +61,7 @@ # You can *not* change these two, they have to stay this way for now. ERLANG_BINDIR = $(ERLANG_LIBDIR)/bin +ERLANG_IBINDIR = $(ERLANG_ILIBDIR)/bin ERLANG_ERTSBINDIR = $(ERLANG_LIBDIR)/$(ERTS)/bin # The directory in which man pages for above executables are put @@ -105,6 +106,8 @@ # depending on which system is preferred.) LOCAL_PATH = $(ERL_TOP)/erts/bin/$(TARGET):$(ERL_TOP)/erts/bin BOOTSTRAP_PATH = $(ERL_TOP)/bootstrap/bin +PATH := $(LOCAL_PATH):$(BOOTSTRAP_PATH):$(PATH) +export PATH # ---------------------------------------------------------------------- @@ -166,15 +169,15 @@ $(MAKE) TESTROOT=$(ERLANG_LIBDIR) BUILD_ALL=true release install.Install: - cd $(ERLANG_LIBDIR) && ./Install -minimal $(ERLANG_LIBDIR) + cd $(ERLANG_LIBDIR) && ./Install -prefix $(INSTALL_PREFIX) -minimal $(ERLANG_ILIBDIR) # # Erlang base public files # install.bin: rm -f $(BINDIR)/erl $(BINDIR)/erlc - ${LN_S} $(ERLANG_BINDIR)/erl $(BINDIR)/erl - ${LN_S} $(ERLANG_BINDIR)/erlc $(BINDIR)/erlc + ${LN_S} $(ERLANG_IBINDIR)/erl $(BINDIR)/erl + ${LN_S} $(ERLANG_IBINDIR)/erlc $(BINDIR)/erlc # # Directories needed before we can install ----------------- tmp_patch_R6B0.10.txt (cut here) --- erts/autoconf/configure.in.ORIG Wed Feb 2 15:35:56 2000 +++ erts/autoconf/configure.in Wed Feb 2 17:29:05 2000 @@ -493,15 +493,35 @@ AC_SUBST(ded_soname) dnl -dnl crypto also needs ssleay +dnl crypto also needs openSSL/ssleay dnl -AC_SUBST(SSLEAY_ROOT) -SSLEAY_ROOT= -if test -d ${ERL_TOP}/lib/ssl/usr/ssleay; then - SSLEAY_ROOT='$(ERL_TOP)/ssl/usr/ssleay/$(TARGET)' +dnl OpenSSL stuff + +AC_CHECK_HEADER(/usr/local/ssl/include/openssl/opensslv.h, ac_cv_openssl=yes, ac_cv_openssl=no) +if test $ac_cv_openssl = yes ; then + SSLEAY_ROOT=/usr/local/ssl/ + SSL_INCLUDE='-I/usr/local/ssl/include/openssl -I/usr/local/ssl/include' else - echo "I could not find ssleay" > ${ERL_TOP}/lib/crypto/SKIP + AC_CHECK_HEADER(/usr/ssl/include/openssl/opensslv.h, ac_cv_openssl=yes, ac_cv_openssl=no) + if test $ac_cv_openssl = yes ; then + SSLEAY_ROOT=/usr/ssl/ + SSL_INCLUDE='-I/usr/ssl/include/openssl -I/usr/ssl/include' + dnl how about ssleay + else + if test -d ${ERL_TOP}/lib/ssl/usr/ssleay; then + SSLEAY_ROOT='$(ERL_TOP)/ssl/usr/ssleay/$(TARGET)' + SSL_INCLUDE='-I$(ERL_TOP)/lib/ssl/usr/ssleay/include' + else + SSLEAY_ROOT= + SSL_INCLUDE= + AC_MSG_WARN([OpenSSL or SSleay not found, will build without SSL support]) + echo "I could not find OpenSSL or SSLeay" > $(ERL_TOP)/lib/crypto/SKIP + fi + fi fi + +AC_SUBST(SSL_INCLUDE) +AC_SUBST(SSLEAY_ROOT) #-------------------------------------------------------------------- ----------------- tmp_patch_R6B0.11.txt (cut here) --- erts/start_scripts/Makefile.ORIG Tue Feb 1 15:13:34 2000 +++ erts/start_scripts/Makefile Tue Feb 1 15:13:44 2000 @@ -55,7 +55,7 @@ start_all_example.rel SASL_PATH = -pa $(ROOTDIR)/lib/sasl/ebin -ELIBROOT = ../.. +ELIBROOT = ../../bootstrap/lib ELIBDIR = $(ELIBROOT)/lib SCRIPT_PATH = -I$(ELIBDIR)/kernel/ebin -I$(ELIBDIR)/stdlib/ebin -I$(ELIBDIR)/sasl/ebin SCRIPT_FLAGS = ----------------- tmp_patch_R6B0.12.txt (cut here) --- erts/etc/unix/Install.src.ORIG Tue Feb 1 17:19:37 2000 +++ erts/etc/unix/Install.src Tue Feb 1 17:19:09 2000 @@ -8,6 +8,9 @@ case $1 in -minimal) start_option=minimal ;; -sasl) start_option=sasl ;; + -prefix) + INSTALL_PREFIX=$2 + shift ;; *) ERL_ROOT=$1 ;; esac shift @@ -25,22 +28,22 @@ exit 1 fi -if [ ! -d $ERL_ROOT/erts-%I_VSN%/bin ] +if [ ! -d $INSTALL_PREFIX/$ERL_ROOT/erts-%I_VSN%/bin ] then echo "Install: The directory $ERL_ROOT/erts-%I_VSN%/bin does not exist" echo " Bad location or erts module not un-tared" exit 1 fi -if [ -d $ERL_ROOT/erts-%I_VSN%/obj ] +if [ -d $INSTALL_PREFIX/$ERL_ROOT/erts-%I_VSN%/obj ] then - cd $ERL_ROOT/erts-%I_VSN%/obj + cd $INSTALL_PREFIX/$ERL_ROOT/erts-%I_VSN%/obj sed -e "s;%FINAL_ROOTDIR%;$ERL_ROOT;" Makefile.src > Makefile fi -if [ ! -d $ERL_ROOT/bin ] +if [ ! -d $INSTALL_PREFIX/$ERL_ROOT/bin ] then - mkdir $ERL_ROOT/bin + mkdir $INSTALL_PREFIX/$ERL_ROOT/bin fi # @@ -57,7 +60,7 @@ TARGET="" ;; esac -cd $ERL_ROOT/erts-%I_VSN%/bin +cd $INSTALL_PREFIX/$ERL_ROOT/erts-%I_VSN%/bin sed -e "s;%FINAL_ROOTDIR%;$ERL_ROOT;" erl.src > erl chmod 755 erl @@ -67,15 +70,15 @@ # currently only on Solaris/SunOS 5 # if [ "X$TARGET" = "Xsunos5" ]; then - (cd $ERL_ROOT/erts-%I_VSN%/bin; + (cd $INSTALL_PREFIX/$ERL_ROOT/erts-%I_VSN%/bin; sed -e "s;%FINAL_ROOTDIR%;$ERL_ROOT;" start.src > start; chmod 755 start) fi -cd $ERL_ROOT/bin +cd $INSTALL_PREFIX/$ERL_ROOT/bin -cp -p $ERL_ROOT/erts-%I_VSN%/bin/erl . -cp -p $ERL_ROOT/erts-%I_VSN%/bin/erlc . +cp -p $INSTALL_PREFIX/$ERL_ROOT/erts-%I_VSN%/bin/erl . +cp -p $INSTALL_PREFIX/$ERL_ROOT/erts-%I_VSN%/bin/erlc . # # Set a soft link to epmd @@ -90,29 +93,29 @@ ln -s $ERL_ROOT/erts-%I_VSN%/bin/epmd epmd if [ "X$TARGET" = "Xsunos5" ]; then - cp -p $ERL_ROOT/erts-%I_VSN%/bin/run_erl . - cp -p $ERL_ROOT/erts-%I_VSN%/bin/to_erl . - cp -p $ERL_ROOT/erts-%I_VSN%/bin/start . - sed -e "s;%EMU%;%EMULATOR%%EMULATOR_NUMBER%;" $ERL_ROOT/erts-%I_VSN%/bin/start_erl.src > start_erl + cp -p $INSTALL_PREFIX/$ERL_ROOT/erts-%I_VSN%/bin/run_erl . + cp -p $INSTALL_PREFIX/$ERL_ROOT/erts-%I_VSN%/bin/to_erl . + cp -p $INSTALL_PREFIX/$ERL_ROOT/erts-%I_VSN%/bin/start . + sed -e "s;%EMU%;%EMULATOR%%EMULATOR_NUMBER%;" $INSTALL_PREFIX/$ERL_ROOT/erts-%I_VSN%/bin/start_erl.src > start_erl chmod 755 start_erl fi -if [ -d $ERL_ROOT/lib/sasl* ] +if [ -d $INSTALL_PREFIX/$ERL_ROOT/lib/sasl* ] then - (cd $ERL_ROOT/releases + (cd $INSTALL_PREFIX/$ERL_ROOT/releases echo %I_VSN% %I_SYSTEM_VSN% > start_erl.data) echo "" - (cd $ERL_ROOT/releases/%I_SYSTEM_VSN% + (cd $INSTALL_PREFIX/$ERL_ROOT/releases/%I_SYSTEM_VSN% echo "" echo "Building SASL boot script ..." # ERCL_EMULATOR="$ERL_ROOT/bin/erl +B -boot ./start" $ERL_ROOT/bin/erlc -s start_sasl.rel - $ERL_ROOT/bin/erl -noinput +B -boot ./start -s systools make_script start_sasl -s erlang halt - $ERL_ROOT/bin/erl -noinput +B -boot ./start -s release_handler create_RELEASES $ERL_ROOT start_sasl.rel -s erlang halt + $INSTALL_PREFIX/$ERL_ROOT/bin/erl -noinput +B -boot ./start -s systools make_script start_sasl -s erlang halt + $INSTALL_PREFIX/$ERL_ROOT/bin/erl -noinput +B -boot ./start -s release_handler create_RELEASES $ERL_ROOT start_sasl.rel -s erlang halt echo "") fi -if [ -f $ERL_ROOT/releases/%I_SYSTEM_VSN%/start_sasl.boot ] && \ +if [ -f $INSTALL_PREFIX/$ERL_ROOT/releases/%I_SYSTEM_VSN%/start_sasl.boot ] && \ [ "$start_option" = "query" ] then echo "Do you want to use a minimal system startup" @@ -142,10 +145,10 @@ # # Installation of pxw # -if [ -d $ERL_ROOT/lib/pxw -a -x $ERL_ROOT/lib/pxw/Install ] +if [ -d $INSTALL_PREFIX/$ERL_ROOT/lib/pxw -a -x $INSTALL_PREFIX/$ERL_ROOT/lib/pxw/Install ] then - cd $ERL_ROOT/lib/pxw - ./Install $ERL_ROOT + cd $INSTALL_PREFIX/$ERL_ROOT/lib/pxw + ./Install -prefix $INSTALL_PREFIX $ERL_ROOT fi # @@ -153,7 +156,7 @@ # but ignore failures. # if [ "X$TARGET" != "Xsunos5" ]; then - cd $ERL_ROOT/usr/lib + cd $INSTALL_PREFIX/$ERL_ROOT/usr/lib for library in lib*.a do (ranlib $library) > /dev/null 2>&1 @@ -165,10 +168,10 @@ # Fixing the man pages # -if [ -d $ERL_ROOT/man ] +if [ -d $INSTALL_PREFIX/$ERL_ROOT/man ] then - cd $ERL_ROOT - ./misc/format_man_pages $ERL_ROOT + cd $INSTALL_PREFIX/$ERL_ROOT + ./misc/format_man_pages $INSTALL_PREFIX/$ERL_ROOT fi ----------------- tmp_patch_R6B0.13.txt (cut here) --- lib/crypto/c_src/Makefile.in.ORIG Wed Feb 2 17:20:33 2000 +++ lib/crypto/c_src/Makefile.in Wed Feb 2 17:29:55 2000 @@ -49,11 +49,11 @@ SSLEAY_ROOT = @SSLEAY_ROOT@ SSLEAY_LIBDIR = $(SSLEAY_ROOT)/lib -SSLEAY_INCDIR = $(SSLEAY_ROOT)/include +SSLEAY_INCDIR = @SSL_INCLUDE@ # For erl_driver.h SYS_INCDIR = $(ERL_TOP)/erts/emulator/beam -INCLUDES = -I $(SSLEAY_INCDIR) -I $(SYS_INCDIR) +INCLUDES = $(SSLEAY_INCDIR) -I $(SYS_INCDIR) ifeq ($(TYPE),debug) TYPEMARKER = .debug ----------------- tmp_patch_R6B0.14.txt (cut here) --- lib/erl_interface/src/Makefile.in.ORIG Wed Feb 2 23:50:58 2000 +++ lib/erl_interface/src/Makefile.in Thu Feb 3 01:04:55 2000 @@ -181,9 +181,13 @@ $(INSTALL_DIR) $(RELSYSDIR)/lib $(INSTALL_DIR) $(RELSYSDIR)/bin $(INSTALL_DIR) $(RELSYSDIR)/src + $(INSTALL_DIR) $(RELEASE_PATH)/usr/lib + $(INSTALL_DIR) $(RELEASE_PATH)/usr/include $(INSTALL_DATA) $(ERL_HEADERS) $(RELSYSDIR)/include + $(INSTALL_DATA) $(ERL_HEADERS) $(RELEASE_PATH)/usr/include $(INSTALL_DATA) $(OBJDIR)/$(ERL_LIB) $(RELSYSDIR)/lib + $(INSTALL_DATA) $(OBJDIR)/$(ERL_LIB) $(RELEASE_PATH)/usr/lib # -$(RANLIB) $(RELSYSDIR)/lib/$(ERL_LIB) $(INSTALL_DATA) $(OBJDIR)/$(EI_LIB) $(RELSYSDIR)/lib ----------------- tmp_patch_R6B0.15.txt (cut here) --- lib/ic/c_src/Makefile.in.ORIG Wed Feb 2 23:59:17 2000 +++ lib/ic/c_src/Makefile.in Thu Feb 3 00:02:48 2000 @@ -132,7 +132,11 @@ $(INSTALL_DIR) $(RELSYSDIR)/c_src $(INSTALL_DIR) $(RELSYSDIR)/include $(INSTALL_DIR) $(RELSYSDIR)/priv/lib + $(INSTALL_DIR) $(RELEASE_PATH)/usr/include + $(INSTALL_DIR) $(RELEASE_PATH)/usr/lib $(INSTALL_DATA) $(IDL_FILES) $(H_FILES) $(RELSYSDIR)/include + $(INSTALL_DATA) $(IDL_FILES) $(H_FILES) $(RELEASE_PATH)/usr/include $(INSTALL_DATA) $(LIBRARY) $(RELSYSDIR)/priv/lib + $(INSTALL_DATA) $(LIBRARY) $(RELEASE_PATH)/usr/lib release_docs_spec: From rv@REDACTED Wed Feb 2 18:01:09 2000 From: rv@REDACTED (Robert Virding) Date: Wed, 02 Feb 2000 18:01:09 +0100 Subject: Running Erlang w/o an OS In-Reply-To: Your message of "Tue, 01 Feb 2000 14:15:44 +0100." <14486.56448.562194.30953@gargle.gargle.HOWL> Message-ID: <200002021701.SAA00996@trana.bluetail.com> mml+erlquestions@REDACTED writes: > >When the Java virtual machine as specified, there was some hope that >Erlang could run in it quite easily. This was dampened a bit because >there are some things about the JVM which make life hard (I can't >remember what). Subsequently other people have shown that maybe it's >not so hard after all, e.g. > > Mobile Haskell: Compiling Lazy Functional Languages for the > Java Virtual Machine by David Wakeling > > http://www.dcs.ex.ac.uk/~david/research/java.htm Unfortunately if you read the papers here you will see that while it possible to use the JVM the results are disappointing. The resultant implementations were *slower* by a factor 10-40 than a "normal" compiled implementation. While Erlang is not lazy we would have the same problems as those mentioned, mainly the lack of good primitives to do last call optimisation. This is absolutely critical and programming to get it slows down the whole system. There have been many suggestions to add hooks for LCO to the JVM but as far as I know none have been implemented. This is a bit surprising as JAVA could make good use of them as well. So it is not so hard if you can accept the major slow down. We here at Bluetail most definitely can not. Ulf? Robert From geoff@REDACTED Thu Feb 3 00:56:15 2000 From: geoff@REDACTED (Geoff Wong) Date: Thu, 3 Feb 2000 10:56:15 +1100 (EST) Subject: Another RPM & patches. In-Reply-To: <200002021414.OAA26059@gecko.serc.rmit.edu.au> from "Geoff Wong" at Feb 03, 2000 01:14:16 AM Message-ID: <200002022356.XAA28785@gecko.serc.rmit.edu.au> Per tells me I've confused his patch numbering scheme. So wherever I've got "tmp_patch*" consider it to be "local_patch*" for all patch numbers >= 9 :-) [ you can tell by the source lines in the RPM where they come from anyway ]. Also noticed a slight problem with local_patch_R6B0.9.txt. The order of the args to "Install" matters because I shifted in the script without checking for the null arg case. So here it is again (fixed): ---------------- local_patch_R6B0.9.txt (cut here). --- Makefile.in.ORIG Mon Jan 31 17:41:33 2000 +++ Makefile.in Thu Feb 3 10:45:06 2000 @@ -61,6 +61,7 @@ # You can *not* change these two, they have to stay this way for now. ERLANG_BINDIR = $(ERLANG_LIBDIR)/bin +ERLANG_IBINDIR = $(ERLANG_ILIBDIR)/bin ERLANG_ERTSBINDIR = $(ERLANG_LIBDIR)/$(ERTS)/bin # The directory in which man pages for above executables are put @@ -105,6 +106,8 @@ # depending on which system is preferred.) LOCAL_PATH = $(ERL_TOP)/erts/bin/$(TARGET):$(ERL_TOP)/erts/bin BOOTSTRAP_PATH = $(ERL_TOP)/bootstrap/bin +PATH := $(LOCAL_PATH):$(BOOTSTRAP_PATH):$(PATH) +export PATH # ---------------------------------------------------------------------- @@ -166,15 +169,15 @@ $(MAKE) TESTROOT=$(ERLANG_LIBDIR) BUILD_ALL=true release install.Install: - cd $(ERLANG_LIBDIR) && ./Install -minimal $(ERLANG_LIBDIR) + cd $(ERLANG_LIBDIR) && ./Install -minimal $(ERLANG_ILIBDIR) -prefix $(INSTALL_PREFIX) # # Erlang base public files # install.bin: rm -f $(BINDIR)/erl $(BINDIR)/erlc - ${LN_S} $(ERLANG_BINDIR)/erl $(BINDIR)/erl - ${LN_S} $(ERLANG_BINDIR)/erlc $(BINDIR)/erlc + ${LN_S} $(ERLANG_IBINDIR)/erl $(BINDIR)/erl + ${LN_S} $(ERLANG_IBINDIR)/erlc $(BINDIR)/erlc # # Directories needed before we can install From geoff@REDACTED Thu Feb 3 01:26:16 2000 From: geoff@REDACTED (Geoff Wong) Date: Thu, 3 Feb 2000 11:26:16 +1100 (EST) Subject: Another RPM & patches. In-Reply-To: <200002021414.OAA26059@gecko.serc.rmit.edu.au> from "Geoff Wong" at Feb 03, 2000 01:14:16 AM Message-ID: <200002030026.AAA29038@gecko.serc.rmit.edu.au> Hmm - one more thing and I'll stop mailing :-). After going to all the trouble to fix configure.in to check for OpenSSL I forgot to include the patch for configure itself (of course you could manually run autoconf - but that's not so good for an RPM). Although this may clash with the other patch to configure. So they probably should be combined into a single patch. Geoff ---------------- cut here (local_patch_R6B0.16.txt) --- erts/autoconf/configure.ORIG Thu Feb 3 11:20:10 2000 +++ erts/autoconf/configure Thu Feb 3 11:20:14 2000 @@ -1278,7 +1278,7 @@ done test -n "$YACC" || YACC="yacc" -for ac_prog in mawk gawk nawk awk +for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -4288,20 +4288,104 @@ -SSLEAY_ROOT= -if test -d ${ERL_TOP}/lib/ssl/usr/ssleay; then - SSLEAY_ROOT='$(ERL_TOP)/ssl/usr/ssleay/$(TARGET)' +ac_safe=`echo "/usr/local/ssl/include/openssl/opensslv.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for /usr/local/ssl/include/openssl/opensslv.h""... $ac_c" 1>&6 +echo "configure:4294: checking for /usr/local/ssl/include/openssl/opensslv.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 else - echo "I could not find ssleay" > ${ERL_TOP}/lib/crypto/SKIP + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_cv_openssl=yes +else + echo "$ac_t""no" 1>&6 +ac_cv_openssl=no fi +if test $ac_cv_openssl = yes ; then + SSLEAY_ROOT=/usr/local/ssl/ + SSL_INCLUDE='-I/usr/local/ssl/include/openssl -I/usr/local/ssl/include' +else + ac_safe=`echo "/usr/ssl/include/openssl/opensslv.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for /usr/ssl/include/openssl/opensslv.h""... $ac_c" 1>&6 +echo "configure:4332: checking for /usr/ssl/include/openssl/opensslv.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_cv_openssl=yes +else + echo "$ac_t""no" 1>&6 +ac_cv_openssl=no +fi + + if test $ac_cv_openssl = yes ; then + SSLEAY_ROOT=/usr/ssl/ + SSL_INCLUDE='-I/usr/ssl/include/openssl -I/usr/ssl/include' + else + if test -d ${ERL_TOP}/lib/ssl/usr/ssleay; then + SSLEAY_ROOT='$(ERL_TOP)/ssl/usr/ssleay/$(TARGET)' + SSL_INCLUDE='-I$(ERL_TOP)/lib/ssl/usr/ssleay/include' + else + SSLEAY_ROOT= + SSL_INCLUDE= + echo "configure: warning: OpenSSL or SSleay not found, will build without SSL support" 1>&2 + echo "I could not find OpenSSL or SSLeay" > $(ERL_TOP)/lib/crypto/SKIP + fi + fi +fi + + + + #-------------------------------------------------------------------- # Os mon stuff. #-------------------------------------------------------------------- echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:4305: checking for kstat_open in -lkstat" >&5 +echo "configure:4389: checking for kstat_open in -lkstat" >&5 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4309,7 +4393,7 @@ ac_save_LIBS="$LIBS" LIBS="-lkstat $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4349,7 +4433,7 @@ # Extract the first word of "javac", so it can be a program name with args. set dummy javac; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4353: checking for $ac_word" >&5 +echo "configure:4437: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_JAVAC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4392,7 +4476,7 @@ # Extract the first word of "g++", so it can be a program name with args. set dummy g++; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:4396: checking for $ac_word" >&5 +echo "configure:4480: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4643,6 +4727,7 @@ s%@DED_LD@%$DED_LD%g s%@DED_LDFLAGS@%$DED_LDFLAGS%g s%@ded_soname@%$ded_soname%g +s%@SSL_INCLUDE@%$SSL_INCLUDE%g s%@SSLEAY_ROOT@%$SSLEAY_ROOT%g s%@os_mon_programs@%$os_mon_programs%g s%@JAVAC@%$JAVAC%g From Matthias.Lang@REDACTED Thu Feb 3 17:42:20 2000 From: Matthias.Lang@REDACTED (Matthias.Lang@REDACTED) Date: Thu, 3 Feb 2000 17:42:20 +0100 (MET) Subject: Running Erlang w/o an OS In-Reply-To: <2000-02-01-18-48-05+trackit+sam@inf.enst.fr> References: <200002010207.UAA06622@node-02.advancenet.net> <2000-02-01-18-48-05+trackit+sam@inf.enst.fr> Message-ID: <14489.45036.707762.348387@gargle.gargle.HOWL> > I'm really interested on using Erlang on our embedded PPC processor. I'll > finish the RTEMS port soon (hopefully within a week, as time permits) and > work on porting the beam VM. If someone is already working on this, I'll > happily join the porting effort. I'm not clear about what RTEMS is or what you're planning to do. As far as I can tell from www.rtems.com, RTEMS is some sort of real-time OS with strong links to ADA and the US DOD. Having said that, I'll to compile Erlang for linux on an embedded PPC system (a PPC 860T) just as soon as I get a spare day. The plan is to get gcc and PERL running on the board and then natively compile Erlang, i.e. configure; make. I don't expect any large problems, but then again... I'll announce here when I have something that works, in case anyone is interested in binaries. Matthias From sam@REDACTED Thu Feb 3 18:52:30 2000 From: sam@REDACTED (Samuel Tardieu) Date: Thu, 3 Feb 2000 18:52:30 +0100 Subject: Running Erlang w/o an OS In-Reply-To: <14489.45036.707762.348387@gargle.gargle.HOWL>; from Matthias.Lang@ericsson.com on Thu, Feb 03, 2000 at 05:42:20PM +0100 References: <200002010207.UAA06622@node-02.advancenet.net> <2000-02-01-18-48-05+trackit+sam@inf.enst.fr> <14489.45036.707762.348387@gargle.gargle.HOWL> Message-ID: <2000-02-03-18-52-30+trackit+sam@inf.enst.fr> On 3/02, Matthias.Lang@REDACTED wrote: | | > I'm really interested on using Erlang on our embedded PPC processor. I'll | > finish the RTEMS port soon (hopefully within a week, as time permits) and | > work on porting the beam VM. If someone is already working on this, I'll | > happily join the porting effort. | | I'm not clear about what RTEMS is or what you're planning to do. As | far as I can tell from www.rtems.com, RTEMS is some sort of real-time | OS with strong links to ADA and the US DOD. I'll try to explain. Please let me know if I'm still unclear. Well, RTEMS is a real-time OS which has been developped with DoD support (it meant Real-Time Executive for Military System, and now M stands for Multiprocessor) on which the GNU Ada (GNAT) executive can be run [1] regardless of the architecture (the interface between RTEMS and the GNAT runtime is well defined, and worked on by both OAR (RTEMS side) and ACT (GNAT side)). | Having said that, I'll to compile Erlang for linux on an embedded PPC | system (a PPC 860T) just as soon as I get a spare day. The plan is to | get gcc and PERL running on the board and then natively compile | Erlang, i.e. configure; make. I don't expect any large problems, but | then again... I'll announce here when I have something that works, in | case anyone is interested in binaries. Your case is simple: you want a native Erlang port. And it exists already, just take it from the Debian mirrors [2]. What I want to do is cross-compile the beam virtual machine for RTEMS supported targets, which come in three typical configurations [3]: - small disk - no disk, but a pseudo-filesystem in flash memory - no disk, no pseudo-filesystem in flash memory, but ethernet or PPP available If support for cross-compilation (especially in configure.in) is already available, then this will be an hour work. However, if only native compilation is supported, this will be harder. The Linux binary can't of course be run on my RTEMS system, as it will deal with files, I/Os, syscalls, etc., and I have no native gcc for this target. Porting Linux and using it in a diskless configuration could be an option, but for other reasons, Linux is totally unsuited for the kind of tasks that our robot is supposed to handle. Sam [1] I speak here with my GNAT-team-member hat on [2] I speak here with my Erlang-maintainer-for-Debian hat on [3] I speak here with my researcher hat on From matthias@REDACTED Fri Feb 4 14:56:53 2000 From: matthias@REDACTED (Matthias Felleisen) Date: Fri, 4 Feb 2000 07:56:53 -0600 (CST) Subject: Scheme and Functional Programming 2000 Message-ID: <200002041356.HAA26640@africa.cs.rice.edu> ============================================================================ PRELIMINARY CALL FOR PAPERS Scheme and Functional Programming Montreal, Canada, 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. The organizers goal is to attract presentations on a broad spectrum of topics: * applications * environments * extensions * implementations * logics (predicate types) * programs The committee will consider submissions concerning Scheme and other functional languages (Erlang, Haskell, LISP, ML, XML, etc.). Submission details ------------------ Deadline for submission: 15 June 2000 The organizers seek two kinds of presentations: * regular: These presentations are like conventional workshop and conference presentation. * short: These presentations last up to 15 mins and are on unconventional topics. Examples include unusual applications, nifty Scheme programming tricks, ideas on implementations, designs and requests for implementations, etc. 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 Details ------- http://www.cs.rice.edu/~matthias/Scheme2000/ ============================================================================ From ja@REDACTED Tue Feb 8 12:18:13 2000 From: ja@REDACTED (Juan Antonio =?iso-8859-1?Q?Su=E1rez?= Romero) Date: Tue, 08 Feb 2000 12:18:13 +0100 Subject: Tutorial for beginners Message-ID: <389FFB75.C173E305@mail2.udc.es> Hello! Could anyone tell me where is a good tutorial on Erlang for beginners? Thanks in advance. J.A. From sam@REDACTED Tue Feb 8 12:49:10 2000 From: sam@REDACTED (Samuel Tardieu) Date: Tue, 8 Feb 2000 12:49:10 +0100 Subject: Tutorial for beginners In-Reply-To: <389FFB75.C173E305@mail2.udc.es>; from ja@mail2.udc.es on Tue, Feb 08, 2000 at 12:18:13PM +0100 References: <389FFB75.C173E305@mail2.udc.es> Message-ID: <2000-02-08-12-49-10+trackit+sam@inf.enst.fr> | Could anyone tell me where is a good tutorial on Erlang for beginners? There is one on the www.erlang.org site, have you looked there? From luke@REDACTED Tue Feb 8 12:56:02 2000 From: luke@REDACTED (Luke Gorrie) Date: 08 Feb 2000 12:56:02 +0100 Subject: Tutorial for beginners In-Reply-To: Samuel Tardieu's message of "Tue, 8 Feb 2000 12:49:10 +0100" References: <389FFB75.C173E305@mail2.udc.es> <2000-02-08-12-49-10+trackit+sam@inf.enst.fr> Message-ID: Samuel Tardieu writes: > | Could anyone tell me where is a good tutorial on Erlang for beginners? > > There is one on the www.erlang.org site, have you looked there? I'd particularly recommend part one of Concurrent Programming in Erlang (downloadable as pdf at www.erlang.org). I was a convert before I got to the end of that. Be sure to keep an Erlang shell open while you read it so that you can play around. Cheers, Luke From thomas@REDACTED Tue Feb 8 15:26:53 2000 From: thomas@REDACTED (Thomas Arts) Date: Tue, 08 Feb 2000 15:26:53 +0100 Subject: [Fwd: Rewriting756---termination_Dependency_Pair] Message-ID: <38A027AD.98605D0B@cslab.ericsson.se> Anyone has an answer on one of the questions below? /Thomas -------------- next part -------------- An embedded message was scrubbed... From: Bernhard Gramlich Subject: Re: Rewriting756---termination_Dependency_Pair Date: Tue, 8 Feb 2000 15:13:15 +0100 (MET) Size: 1998 URL: From sam@REDACTED Tue Feb 8 15:58:43 2000 From: sam@REDACTED (Samuel Tardieu) Date: 08 Feb 2000 15:58:43 +0100 Subject: [Fwd: Rewriting756---termination_Dependency_Pair] In-Reply-To: Thomas Arts's message of "Tue, 08 Feb 2000 15:26:53 +0100" References: <38A027AD.98605D0B@cslab.ericsson.se> Message-ID: <2000-02-08-15-58-43+trackit+sam@inf.enst.fr> >>>>> " " == Thomas Arts writes: > (1) Is there any hope that an Erlang version for osf1 will be > available in the near future? (I would rather guess "no"!?) I cannot answer for Erlang maintainers, but there is a fair amount of job before Erlang is ready for 64bits systems. > (2) How much disk space, roughly, does Erlang need (for installation + > usage) on a linux machine? If this is not too huge an amount > I'll try to install it (with your tool) at home on my laptop > (running with redhat linux). On Debian GNU/Linux for x86, you have: Package: erlang-mode Installed-Size: 234 Package: erlang-java Installed-Size: 945 Package: erlang-erl Installed-Size: 10732 Package: erlang-base Installed-Size: 5984 Package: erlang Installed-Size: 7220 (all sizes are in KB) Sam -- Samuel Tardieu -- sam@REDACTED From etxuwig@REDACTED Tue Feb 8 16:05:36 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Tue, 8 Feb 2000 16:05:36 +0100 (MET) Subject: [Fwd: Rewriting756---termination_Dependency_Pair] In-Reply-To: <2000-02-08-15-58-43+trackit+sam@inf.enst.fr> Message-ID: On 8 Feb 2000, Samuel Tardieu wrote: sam>>>>>> " " == Thomas Arts writes: sam> sam>> (1) Is there any hope that an Erlang version for osf1 will be sam>> available in the near future? (I would rather guess "no"!?) sam> sam>I cannot answer for Erlang maintainers, but there is a fair amount of sam>job before Erlang is ready for 64bits systems. On the other hand, I received an OSF port of Erlang already in '93. I can't promise that it will still be easy to recompile Erlang on OSF, but back then, it didn't present any problem at all (except for finding an Alpha for the compile.) Obviously, it won't be a true 64-bit system, but that shouldn't matter for your purposes, right? /Uffe -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From per@REDACTED Tue Feb 8 16:19:34 2000 From: per@REDACTED (Per Bergqvist) Date: Tue, 08 Feb 2000 16:19:34 +0100 Subject: [Fwd: Rewriting756---termination_Dependency_Pair] References: <38A027AD.98605D0B@cslab.ericsson.se> Message-ID: <38A03406.591265A9@cellpt.com> Somebody at Erlang systems (Magnus ???) made a port for a project I ran at Ericsson '95-'96. The port seemed to work fine but we never finished complete testing since we choose another platform than Alpha/DigitalUnix. The basic problem was that Erlang played around with the high bits in pointers to tag the data types and DigitalUnix used 64 bit pointers by default. Later on I worked with Digital Unix in another project and realized that you may force the compiler to use 32 bit pointers. This is probably the easiest way to get Erlang running. Regards Per Bergqvist CellPoint Systems AB Thomas Arts wrote: > Anyone has an answer on one of the questions below? > > /Thomas > > ------------------------------------------------------------------------ > > Subject: Re: Rewriting756---termination_Dependency_Pair > Date: Tue, 8 Feb 2000 15:13:15 +0100 (MET) > From: Bernhard Gramlich > To: Thomas Arts > > Dear Thomas, > > some weeks ago I've seen your announcement in the rewriting list > (concerning the second release of the implementation of the Dependency > Pair method). Since I would like to experiment a bit with your system, > run examples etc., I recently started to install the underlying Erlang > here. However, this was rather unsuccessful: The problem is most > probably due to our machine(s) here, Dec alpha with osf1 (for which > Erlang was/is not prepared)!? Hence my questions: > (1) Is there any hope that an Erlang version for osf1 will be > available in the near future? (I would rather guess "no"!?) > (2) How much disk space, roughly, does Erlang need (for installation + > usage) on a linux machine? If this is not too huge an amount I'll > try to install it (with your tool) at home on my laptop (running > with redhat linux). > > Best regards, > Bernhard. From Bruce@REDACTED Tue Feb 8 16:42:37 2000 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Tue, 8 Feb 2000 16:42:37 +0100 Subject: Wikie? In-Reply-To: Message-ID: <000201bf724b$20d1d780$1e21970a@bruce> Hi Luke, Will it return soon? Or are there more problems in the Aussie-Swede conversion process? :-) Cheers, Bruce PS Did everyone see the Erlang job available in Germany. I don't remember if it was 35 or 45 pounds an hour for 6 months. From luke@REDACTED Tue Feb 8 16:47:41 2000 From: luke@REDACTED (Luke Gorrie) Date: 08 Feb 2000 16:47:41 +0100 Subject: Wikie? In-Reply-To: "Bruce Fitzsimons"'s message of "Tue, 8 Feb 2000 16:42:37 +0100" References: <000201bf724b$20d1d780$1e21970a@bruce> Message-ID: "Bruce Fitzsimons" writes: > Hi Luke, > > Will it return soon? Or are there more problems in the Aussie-Swede > conversion process? It'll be back as soon as I can get it back :-) the delay is a human one - it seems that the person I asked to bring my machiness in Australia (where wikie.dets is) online is a little busier than I expected. 'Tis a long time though, I've been a bit distracted from it lately because of moving to sweden and all that. I'll redouble my nagging efforts and should also look at setting up an interim solution. Joe's been Wikie hacking (8.0 or something by now I think :-) so perhaps we can setup one here now and then suck the other content into it when I can lay my hands on it. Thanks for the reminder. :-) Cheers, Luke From sam@REDACTED Tue Feb 8 17:12:44 2000 From: sam@REDACTED (Samuel Tardieu) Date: Tue, 8 Feb 2000 17:12:44 +0100 Subject: Wikie? In-Reply-To: ; from luke@bluetail.com on Tue, Feb 08, 2000 at 04:47:41PM +0100 References: <000201bf724b$20d1d780$1e21970a@bruce> Message-ID: <2000-02-08-17-12-44+trackit+sam@inf.enst.fr> | It'll be back as soon as I can get it back :-) the delay is a human | one - it seems that the person I asked to bring my machiness in | Australia (where wikie.dets is) online is a little busier than I | expected. | | 'Tis a long time though, I've been a bit distracted from it lately | because of moving to sweden and all that. I'll redouble my nagging | efforts and should also look at setting up an interim solution. Joe's | been Wikie hacking (8.0 or something by now I think :-) so perhaps we | can setup one here now and then suck the other content into it when I | can lay my hands on it. Why not use replicated nodes when your machine is back online? This way, we will never have to suffer this again, thanks to distributed Erlang :) From per@REDACTED Tue Feb 8 23:02:08 2000 From: per@REDACTED (Per Hedeland) Date: Tue, 8 Feb 2000 23:02:08 +0100 (MET) Subject: ETK on Windows Message-ID: <200002082202.e18M28216299@super.du.uab.ericsson.se> Hello, There's now (finally!) what seems to be a workaround for the problem with the non-functional ETK in the Windows version available on the Bugs&Fixes page (http://www.erlang.org/faq/bugs_and_fixes.html) - let me know if it still doesn't work for you... --Per Hedeland per@REDACTED From Bruce@REDACTED Tue Feb 8 23:48:37 2000 From: Bruce@REDACTED (Bruce Fitzsimons) Date: Tue, 8 Feb 2000 23:48:37 +0100 Subject: ETK on Windows References: <200002082202.e18M28216299@super.du.uab.ericsson.se> Message-ID: <006601bf7286$a403cd80$0121970a@fitzsimons.org> > There's now (finally!) what seems to be a workaround for the problem Yay!!!! Thanks Per (and everyone else who worked on it). Bruce From ja@REDACTED Wed Feb 9 19:52:46 2000 From: ja@REDACTED (Juan Antonio =?iso-8859-1?Q?Su=E1rez?= Romero) Date: Wed, 09 Feb 2000 19:52:46 +0100 Subject: Mobile code with Erlang Message-ID: <38A1B77E.8C347FA6@mail2.udc.es> I have began to work with mobile agents (roughly speaking, programs that are able to travel across the nodes of a network) and I have observed that most of them are written in Java. Despite the (relative) slowness of this language, some mobile agents are used for packet-routing, for send video on demand, etc. I would like to know whether Erlang is powerful enough to develop a similar framework using this language instead of Java. Thanks in advance, J.A. From per@REDACTED Wed Feb 9 21:15:12 2000 From: per@REDACTED (Per Hedeland) Date: Wed, 9 Feb 2000 21:15:12 +0100 (MET) Subject: ETK on Windows In-Reply-To: <006601bf7286$a403cd80$0121970a@fitzsimons.org> References: <006601bf7286$a403cd80$0121970a@fitzsimons.org> Message-ID: <200002092015.VAA17511@aalborg.du.uab.ericsson.se> "Bruce Fitzsimons" wrote: >> There's now (finally!) what seems to be a workaround for the problem >Yay!!!! Should I take that to mean that it works?:-) --Per From scott@REDACTED Wed Feb 9 23:07:39 2000 From: scott@REDACTED (Scott Lystig Fritchie) Date: Wed, 09 Feb 2000 16:07:39 -0600 Subject: Why is connect() missing from inet_udp.erl? Message-ID: <200002092207.QAA48754@snookles.snookles.com> The inet_drv.c code in the source distribution for R6B (${SRC_DISTRO_TOP}/erts/emulator/drivers/common/inet_drv.c) contains the comment: case UDP_REQ_CONNECT: /* XXX this code is not used but leave it we may use it AGAIN ? */ I'm just guessing, but since the driver supports connected UDP sockets, and since the comment says what it does, did inet_udp once support connected UDP sockets? If so, why doesn't it now? I haven't used UDP all that much, so it was a bit of a surprise to find out that, if you send data via un-connected UDP socket to an unreachable port, e.g. machine-a -> machine-b UDP D=777 S=2346 LEN=23 machine-b -> machine-a ICMP Destination unreachable (Bad port) ... then the code on machine-a will not be aware of the ICMP message. Upon reflection, this makes sense. If the socket is not connected, how can the OS know who to notify when the ICMP message arrives? It's certainly possible to have machine-a simply time out waiting for a response, but if there's a way of knowing that the destination is bad, why wait? Included below is a small patch for adding connect(Socket, IPAddress, Port) and send(Socket, Data) to inet_udp.erl. It seems to work, but I haven't given it an industrial-strength thrashing yet. -Scott --- Scott Lystig Fritchie, 5401 - 10th Ave S, Minneapolis, MN 55417 USA Professional Governing: Is It Faked? --- snip --- snip --- snip --- snip --- snip --- snip --- snip --- --- inet_udp.erl.orig Fri Nov 26 16:23:26 1999 +++ inet_udp.erl Wed Feb 9 15:49:06 2000 @@ -18,7 +18,7 @@ -module(inet_udp). -export([open/1, open/2, close/1]). --export([send/4, recv/2]). +-export([send/4, recv/2, connect/3, send/2]). -export([controlling_process/2]). -export([getserv/1, getaddr/1]). @@ -60,9 +60,15 @@ send(S,{A,B,C,D},P,Data) when integer(A+B+C+D),P>=0,P=<16#ffff -> call(S, {sendto, {A,B,C,D}, P, Data}). +send(S,Data) -> + call(S, {send, Data}). + recv(S,Len) -> gen_udp:recv(S, Len). +connect(S,{A,B,C,D},P) when integer(A+B+C+D),P>=0,P=<16#ffff -> + call(S, {connect, {A,B,C,D}, P}). + close(S) -> gen_udp:close(S). @@ -155,6 +161,10 @@ reply(From, Tag, ok), handle_output(St#sock.fs, {IP,Port,Data}, Udp, Owner, St); + {call, From, Tag, {send,Data}} -> + reply(From, Tag, ok), + handle_output(St#sock.fs, {Data}, Udp, Owner, St); + {call, From, Tag, Request} -> case handle_call(Request, Udp, St) of {reply, Value, St1} -> @@ -286,6 +296,9 @@ handle_output([], Called, {IP,UP,Data}, Port, Owner, St) -> ll_sendto(Port, IP, UP, Data), socket_loop(Port, Owner, St#sock { fs = reverse(Called) }); +handle_output([], Called, {Data}, Port, Owner, St) -> + ll_send(Port, Data), + socket_loop(Port, Owner, St#sock { fs = reverse(Called) }); handle_output([{Fun,S} | Fs], Called, Data, Port, Owner, St) -> case Fun(output, Data, S) of {output, Data1, S1} -> @@ -339,6 +352,10 @@ ll_sendto(Udp,{A,B,C,D},UdpPort,Data) when integer(UdpPort) -> Udp ! {self(), {command, [?UDP_REQ_SENDTO, ?int16(UdpPort), [A,B,C,D], Data]}}, + ok. + +ll_send(Udp,Data) -> + Udp ! {self(), {command, [?UDP_REQ_SEND, Data]}}, ok. sync_cmd(Port, Cmd, Rep) -> From bjorn@REDACTED Thu Feb 10 10:19:28 2000 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 10 Feb 2000 10:19:28 +0100 Subject: Why is connect() missing from inet_udp.erl? In-Reply-To: Scott Lystig Fritchie's message of Wed, 09 Feb 2000 16:07:39 -0600 References: <200002092207.QAA48754@snookles.snookles.com> Message-ID: If I remember correctly, we removed support for connected sockets because it didn't work on some of our other platforms (Windows and/or VxWorks). /Bjorn Scott Lystig Fritchie writes: > > The inet_drv.c code in the source distribution for R6B > (${SRC_DISTRO_TOP}/erts/emulator/drivers/common/inet_drv.c) contains > the comment: > > case UDP_REQ_CONNECT: > /* XXX this code is not used but leave it we may use it AGAIN ? */ > > I'm just guessing, but since the driver supports connected UDP > sockets, and since the comment says what it does, did inet_udp once > support connected UDP sockets? If so, why doesn't it now? -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 125 25 ?lvsj? From sam@REDACTED Thu Feb 10 16:37:09 2000 From: sam@REDACTED (Samuel Tardieu) Date: 10 Feb 2000 16:37:09 +0100 Subject: Mobile code with Erlang In-Reply-To: Juan Antonio=?iso-8859-1?b?IFN14XJleg==?= Romero's message of "Wed, 09 Feb 2000 19:52:46 +0100" References: <38A1B77E.8C347FA6@mail2.udc.es> Message-ID: <2000-02-10-16-37-09+trackit+sam@inf.enst.fr> JA> I have began to work with mobile agents (roughly speaking, JA> programs that are able to travel across the nodes of a network) JA> and I have observed that most of them are written in Java. Despite JA> the (relative) slowness of this language, some mobile agents are JA> used for packet-routing, for send video on demand, etc. Erlang has not been open-sourced for a long time, which explain IMO the low number of Erlang applications found on the Internet. If I had to choose one language to start developing mobile agents, I would choose Erlang without any hesitation. JA> I would like to know whether Erlang is powerful enough to develop JA> a similar framework using this language instead of Java. According to my experience, Erlang programs run much faster than their Java counterpart. Moreover, the hot code-swapping feature should make it very practical to update mobile agents without bringing them down. Sam -- Samuel Tardieu -- sam@REDACTED From cesarini@REDACTED Thu Feb 10 17:26:31 2000 From: cesarini@REDACTED (Francesco Cesarini) Date: Thu, 10 Feb 2000 16:26:31 +0000 Subject: Mobile code with Erlang References: <38A1B77E.8C347FA6@mail2.udc.es> <2000-02-10-16-37-09+trackit+sam@inf.enst.fr> Message-ID: <38A2E6B7.2716B1FA@terminus.ericsson.se> > According to my experience, Erlang programs run much faster than their > Java counterpart. Moreover, the hot code-swapping feature should make > it very practical to update mobile agents without bringing them down. I believe Uppsala University ran a project on mobile agents [for last year students] back in 1996 using Erlang, so the idea is not new. Take out your Swedish - English dictionary (or favorite web page translator) and look at http://www.csd.uu.se/projects/marketspace/ If I remember correctly, it was a project partly funded by Telia (The Swedish Phone company), so I do not know if the source code is available. Regards, Francesco -- Francesco Cesarini Erlang/OTP Consultant Cellular: +44-(0)79-30580433 ECN:832-707192 From sam@REDACTED Thu Feb 10 17:29:45 2000 From: sam@REDACTED (Samuel Tardieu) Date: 10 Feb 2000 17:29:45 +0100 Subject: Using failover Message-ID: <2000-02-10-17-29-46+trackit+sam@inf.enst.fr> Due to major power trouble in my building, I built an application to monitor those power failures. Since this application needs to be fault tolerant, as its results are used by the technicians working on the power outages, I use the "distributed" kernel parameter. It is not clear to me what I should do in takeover mode. My application is mainly a globally registered gen_server. How can I cleanly shut down the server running on the other node (the one I'm taking over) and make sure it is done before starting the application locally? Won't this create a race condition where the application won't be restarted if the top-priority node dies after stopping the application on the remote node and before registering the new process locally? Note: I have no state to transfer between the node being taken over and the newly started one as everything is stored in a distributed Mnesia table. Thanks in advance for your explanations :) Sam -- Samuel Tardieu -- sam@REDACTED My application file is really simple, but the takeover alternative won't work as a server will be multiply registered. -module (pomonitor_app). -behaviour (application). -export ([start/2, stop/1]). start (normal, _) -> pomonitor_sup:start_link (); start ({failover, _}, _) -> pomonitor_sup:start_link (); start ({takeover, _}, _) -> pomonitor_sup:start_link (). stop (_) -> ok. From sam@REDACTED Thu Feb 10 17:32:06 2000 From: sam@REDACTED (Samuel Tardieu) Date: 10 Feb 2000 17:32:06 +0100 Subject: Using failover In-Reply-To: Samuel Tardieu's message of "10 Feb 2000 17:29:45 +0100" References: <2000-02-10-17-29-46+trackit+sam@inf.enst.fr> Message-ID: <2000-02-10-17-32-07+trackit+sam@inf.enst.fr> >>>>> "Sam" == Samuel Tardieu writes: Sam> Note: I have no state to transfer between the node being taken Sam> over and the newly started one as everything is stored in a Sam> distributed Mnesia table. Ooops, in fact it would help to be able to get some state exchanged between the two nodes, as not everything is stored in the tables :/ From nick@REDACTED Thu Feb 10 17:49:19 2000 From: nick@REDACTED (Nick Collier) Date: Thu, 10 Feb 2000 10:49:19 -0600 Subject: JInterface question Message-ID: <38A2EC0F.59440D44@src.uchicago.edu> Hi, I'm experimenting with the JInterface library and am having some problems getting it to work. I've written a simple java application that creates an OtpServer and publishes the server's port. I can see that it is registered with epmd when I do an epmd -names. However, I can't my erlang program to register with epmd. I can start the shell with -sname which then registers the shell with epmd, but how do I get anything run within the shell to be epmd aware? thanks, Nick -- Nick Collier Social Science Research Computing University of Chicago http://repast.sourceforge.net nick@REDACTED From etxuwig@REDACTED Thu Feb 10 18:11:51 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Thu, 10 Feb 2000 18:11:51 +0100 (MET) Subject: Using failover Message-ID: <200002101711.SAA02886@etxb.ericsson.se> > Date: 10 Feb 2000 17:29:45 +0100 > From: Samuel Tardieu > > Due to major power trouble in my building, I built an application to > monitor those power failures. Since this application needs to be > fault tolerant, as its results are used by the technicians working on > the power outages, I use the "distributed" kernel parameter. >From your later mail it appears as if you'd like to perform state transfer as well. Here goes: > It is not clear to me what I should do in takeover mode. My > application is mainly a globally registered gen_server. How can I > cleanly shut down the server running on the other node (the one I'm > taking over) and make sure it is done before starting the application > locally? Won't this create a race condition where the application > won't be restarted if the top-priority node dies after stopping the > application on the remote node and before registering the new process > locally? If you use global:re_register_name(Name, NewPid), the new instance of your process will simply take over the name, and calls to the global server will be re-routed to the new instance. The old application instance is shut down automatically when the new application instance is fully started. Here's a simple but relatively safe way of doing things: 1. First, add the following attribute to your app file (see erl -man application): %% This activates a phased start of the application. Mod:start/2 is %% always the first function to be called; then the functions in the %% start_phases list will be called in order. Syntax: [{Fun, Args}] %% which leads to the call Mod:Fun(Type, Args) (Mod as specified in the %% 'mod' attribute. Using this attribute, you may also get %% Type = {failover, Node} (it's done this way for BW compat reasons) {start_phases, [{go, []}]}, 2. Modify pomonitor_app.erl to include a callback for the go/2 phase: -module (pomonitor_app). -behaviour (application). -export ([start/2, go/2, stop/1]). start (normal, _) -> pomonitor_sup:start_link (); start ({failover, _}, _) -> pomonitor_sup:start_link (); start ({takeover, _}, _) -> pomonitor_sup:start_link (). go({takeover, FromNode}, _) -> pomonitor:perform_takeover(FromNode); go(_, _) -> % Type = normal | {failover, FromNode} ok. stop (_) -> ok. 3. Write a function to handle the takeover: pomonitor.erl (assuming this is a globally registered gen_server): perform_takeover(FromNode) -> gen_server:call(pomonitor, {perform_takeover, FromNode}). ... init(_) -> %% Need to check first before registering a global name. %% One way to do this is to use application:start_type() to find out %% whether the application is starting, or if it's a local process crash %% but this is not entirely safe. We could be restarting from a process %% crash on the retiring side of a takeover, after having passed on our %% state, but before shutting down. If this is the case, we MUST not %% re-register. Here we use global:safe_whereis_name/1 (not whereis_name/1 %% because we must send a message to global, giving it a chance to unreg %% me if I just crashed and am restarting. case global:safe_whereis_name(pomonitor) of undefined -> %% this is most likely a local process restart global:re_register_name(pomonitor, self()); _ -> %% there is another globally registered instance %% most likely a takeover in progress. Wait for takeover msg. skip end, ... {ok, #state{}}. handle_call({perform_takeover, FromNode}, From, State}) -> %% Cute detail of takeover. I first re-register, stealing the name; then %% I ask for the state. Pending calls from clients will be serviced %% on the other side; new calls (after my re_register_name()) will be %% buffered by me until I have the new state; afterwards, all calls will %% be serviced by me; the old instance can most likely just sit there and %% wait for its application to terminate. global:re_register_name(pomonitor, self()); NewState = gen_server:call({pomonitor, FromNode}, takeover_state), {reply, ok, NewState}; handle_call(takeover_state, From, State) -> {reply, State, State}; /Uffe Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From sam@REDACTED Thu Feb 10 18:32:49 2000 From: sam@REDACTED (Samuel Tardieu) Date: 10 Feb 2000 18:32:49 +0100 Subject: Using failover In-Reply-To: Ulf Wiger's message of "Thu, 10 Feb 2000 18:11:51 +0100 (MET)" References: <200002101711.SAA02886@etxb.ericsson.se> Message-ID: <2000-02-10-18-32-50+trackit+sam@inf.enst.fr> >>>>> "Ulf" == Ulf Wiger writes: Ulf> If you use global:re_register_name(Name, NewPid), the new Ulf> instance of your process will simply take over the name, and Ulf> calls to the global server will be re-routed to the new instance. Thanks! I just tried this, and it works perfectly, including the state transfer (well, ok, I never doubted it would work, this is Erlang after all :). In fact, I realized that I can loose the state without any drawback, and I will change my code so that the global server gets locally registered first then uses global:re_register_name (that I didn't know about). I can even reset my start_phases to an empty list. Ulf> The old application instance is shut down automatically when the Ulf> new application instance is fully started. Yup, that's what I've seen. Looking at the application with appmon (on a node that never dies of course :) is really impressive. I think that I get what I need to convince people to switch to Erlang, this is a good demo :) Thanks again for your advices, they were very precious! Sam, whose application will never die again :) -- Samuel Tardieu -- sam@REDACTED From sam@REDACTED Thu Feb 10 20:54:10 2000 From: sam@REDACTED (Samuel Tardieu) Date: 10 Feb 2000 20:54:10 +0100 Subject: Using failover In-Reply-To: Ulf Wiger's message of "Thu, 10 Feb 2000 18:11:51 +0100 (MET)" References: <200002101711.SAA02886@etxb.ericsson.se> Message-ID: <2000-02-10-20-54-10+trackit+sam@inf.enst.fr> >>>>> "Ulf" == Ulf Wiger writes: Ulf> Here's a simple but relatively safe way of doing things: By the way, I've finished a simple version of the whole thing, which is visible at . Fail over and take over situations, which have so far been intentionnally provoked, are also shown. Sam -- Samuel Tardieu -- sam@REDACTED From erik@REDACTED Thu Feb 10 23:21:45 2000 From: erik@REDACTED (Erik Klintskog) Date: Thu, 10 Feb 2000 23:21:45 +0100 Subject: Mobile code with Erlang References: <38A1B77E.8C347FA6@mail2.udc.es> <2000-02-10-16-37-09+trackit+sam@inf.enst.fr> <38A2E6B7.2716B1FA@terminus.ericsson.se> Message-ID: <38A339F8.4CFEBA40@sics.se> Francesco Cesarini wrote: > > According to my experience, Erlang programs run much faster than their > > Java counterpart. Moreover, the hot code-swapping feature should make > > it very practical to update mobile agents without bringing them down. > > I believe Uppsala University ran a project on mobile agents [for last > year > students] back in 1996 using Erlang, so the idea is not new. Take out > your > Swedish - English dictionary (or favorite web page translator) and look > at > > http://www.csd.uu.se/projects/marketspace/ > > If I remember correctly, it was a project partly funded by Telia (The > Swedish > Phone company), so I do not know if the source code is available. There where allso a project funded by ericsson that ran at Uppsala the same semester. The project called Steam implemented a platform for mobile agents in Erlang. There is a document about the outcome of the project available somewhere at the Erlang web pages, I dont recal the exact location, but search for Steam. The marsketspace project contained no mobile agents but some sort of intelligent agents. The agents where stationary and executed services for the users. The main goal in marketspace was to investigate agent communication languages. Steam's goal was security and mobility. /Erik Klintskog From sw@REDACTED Fri Feb 11 16:15:43 2000 From: sw@REDACTED (Stefan Willehadson) Date: Fri, 11 Feb 2000 09:15:43 -0600 Subject: Using failover References: <200002101711.SAA02886@etxb.ericsson.se> <2000-02-10-20-54-10+trackit+sam@inf.enst.fr> Message-ID: <38A4279F.1301262D@cellpt.com> Samuel Tardieu wrote: > By the way, I've finished a simple version of the whole thing, which > is visible at . I'm interesting in reading it, but I received the following reply from your web server: Proxy Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, dax@REDACTED and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Maybe you can post your report to the erlang-questions list... Regards, Stefan ------------------------------------------------------------------- Stefan Willehadson email: sw@REDACTED mobile: +46 707961474 Cellpoint Systems homepage: www.cellpt.com office: +46 859474900 From vladdu@REDACTED Fri Feb 11 10:06:12 2000 From: vladdu@REDACTED (Vlad Dumitrescu) Date: Fri, 11 Feb 2000 10:06:12 CET Subject: wikie source Message-ID: <20000211090612.80054.qmail@hotmail.com> Hi! Sorry to bring the question here, but maybe Joe is busy and someone else might have the answer. I would like to download and test the wikie-8 and pico-server applications, but the links from the wikie at bluetail are not working since a long time back... Does anyone know where to find the files? Why not publish them on erlang.org too? regards Vlad ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com From eeipan@REDACTED Fri Feb 11 10:27:48 2000 From: eeipan@REDACTED (Peter Andersson) Date: Fri, 11 Feb 2000 09:27:48 +0000 Subject: Mobile code with Erlang References: <38A1B77E.8C347FA6@mail2.udc.es> <2000-02-10-16-37-09+trackit+sam@inf.enst.fr> <38A2E6B7.2716B1FA@terminus.ericsson.se> Message-ID: <38A3D614.619B9D00@eei.ericsson.se> Hi, I was in the Marketspace project back then , actually. I worked in one of the two teams that developed their intelligent software agents in Erlang (the other 2 or 3 teams used Java if I don't remember it wrong). We were also a group of students that developed a suitable object oriented description language for ontologies (named ALLFONS - A Little Language For Ontologies) for the same project. (This language still exists, I believe, but has been improved, extended and renamed since then). Like Erik said, our agents were stationary (they executed on different machines but did not move around in the network). The project focused on investigating how useful agent technology can be, using intelligent agents with different roles (e.g. personal agent, broker, etc) for collecting and exchanging information on the Internet. My experience is that Erlang is a great choice for this type of application. Not only does it have excellent features for quick devolpment and prototyping, but I found the platform independence, concurrency and the existing socket interfaces and internet connection components to be especially useful for developing applications such as software agents. Also, 'yecc' makes life very easy when it comes to build a parser (like the one we made for ALLFONS). Actually, it was my personal experience of using Erlang in the Marketspace project that made me run straight to Erlang Systems looking for a job right after my University studies were finished! Regards /Peter Francesco Cesarini wrote: > > According to my experience, Erlang programs run much faster than their > > Java counterpart. Moreover, the hot code-swapping feature should make > > it very practical to update mobile agents without bringing them down. > > I believe Uppsala University ran a project on mobile agents [for last > year > students] back in 1996 using Erlang, so the idea is not new. Take out > your > Swedish - English dictionary (or favorite web page translator) and look > at > > http://www.csd.uu.se/projects/marketspace/ > > If I remember correctly, it was a project partly funded by Telia (The > Swedish > Phone company), so I do not know if the source code is available. > > Regards, > Francesco > -- > Francesco Cesarini > > Erlang/OTP Consultant > Cellular: +44-(0)79-30580433 > ECN:832-707192 From sam@REDACTED Fri Feb 11 11:28:33 2000 From: sam@REDACTED (Samuel Tardieu) Date: 11 Feb 2000 11:28:33 +0100 Subject: Using failover In-Reply-To: Stefan Willehadson's message of "Fri, 11 Feb 2000 09:15:43 -0600" References: <200002101711.SAA02886@etxb.ericsson.se> <2000-02-10-20-54-10+trackit+sam@inf.enst.fr> <38A4279F.1301262D@cellpt.com> Message-ID: <2000-02-11-11-28-33+trackit+sam@inf.enst.fr> Stefan> I'm interesting in reading it, but I received the following Stefan> reply from your web server: Stefan> Proxy Error The server encountered an internal error or Stefan> misconfiguration and was unable to complete your request. Sure, the power was off :) Try again :) In fact, www.infres.enst.fr is a regular Apache server (the CS dept. one), but is automatically proxied to , which happens to be an Erlang inets server. Since this server runs on a machine located in my office, and since I have power outage problems, there is no surprise. Now that I've played with dynamic relocation, failover and takeover, I will make the server fault tolerant too as soon as I have some time to spare on this. Sam -- Samuel Tardieu -- sam@REDACTED From per@REDACTED Fri Feb 11 22:36:46 2000 From: per@REDACTED (Per Hedeland) Date: Fri, 11 Feb 2000 22:36:46 +0100 (MET) Subject: JInterface question In-Reply-To: <38A2EC0F.59440D44@src.uchicago.edu> References: <38A2EC0F.59440D44@src.uchicago.edu> Message-ID: <200002112136.e1BLajg07537@super.du.uab.ericsson.se> Nick Collier wrote: >I'm experimenting with the JInterface library and am having some >problems getting it to work. > >I've written a simple java application that creates an OtpServer and >publishes the server's port. I can see that it is registered with epmd >when I do an epmd -names. However, I can't my erlang program to register >with epmd. I can start the shell with -sname which then registers the >shell with epmd, but how do I get anything run within the shell to be >epmd aware? I'm afraid I know next to nothing about Jinterface (and not much more about Java:-), but you seem to be a bit confused about the Erlang side of things - browsing the Jinterface docs, I'll venture a guess that this confusion stems from the fact(?:-) that on the Java side, a process and a node are basically the same thing, i.e. there is only one process per node - not so on the Erlang side, of course. I.e., -sname doesn't register the shell with epmd, it registers the entire Erlang node, i.e. instance of the runtime system. And Erlang processes don't need to be "epmd aware", or even necessarly "distribution aware" - they often just send their messages to some Pid (Process Id), which may or may not be on the same node. If a message is destined for another node, and no connection previously exists, one is made in a manner that is basically transparent to the sending process. So, you don't need to get "your erlang program to register with epmd", that is already done via the -sname at startup (or via net_kernel:start() after startup, if you prefer). To get the two nodes to talk to each other initially, they need to know about each other (or at least one needs to know about the other), either via configuration or via e.g. Erlang's net_adm:names(). Once that is out of the way, contact is typically established by means of sending a message to a registered process on the other node, or perhaps via spawn/4 (of course many of these low-level details are hidden when you use OTP). (I'm guessing that spawn/4 doesn't work in either direction of the Erlang-Java communication, while sending to a registered process works in both directions, with the registered name being ignored when going Erlang->Java.) --Per Hedeland per@REDACTED From franck@REDACTED Sat Feb 12 02:08:45 2000 From: franck@REDACTED (Franck van Breugel) Date: Fri, 11 Feb 2000 20:08:45 -0500 (EST) Subject: CFP PPDP 2000 Message-ID: Call For Papers ACM-SIGPLAN 2nd International Conference on Principles and Practice of Declarative Programming (PPDP 2000) Montreal, Canada, September 20-22, 2000 http://www.cs.yorku.ca/ppdp-00 Submission deadline: March 1, 2000 Program Co-Chairs: Maurizio Gabbrielli (University of Udine, Italy) gabbri@REDACTED Frank Pfenning (Carnegie Mellon University, Pittsburgh, USA) fp@REDACTED Program Committee: Samson Abramsky (University of Edinburgh, UK) Zena Ariola (University of Oregon, USA) Andrea Asperti (University of Bologna, Italy) Frank de Boer (University of Utrecht, NL) Radhia Cousot (Ecole Polytechnique, France) Danny De Schreye (Catholic U. Leuven, Belgium) Saumya Debray (University of Arizona, USA) Thom Fruhwirth (LMU Munich, Germany) Andrew Gordon (Microsoft Research, UK) Doug Howe (Bell Labs, USA) Claude Kirchner (LORIA & INRIA Nancy, France) Naoki Kobayashi (University of Tokyo, Japan) Michael Maher (Griffith University, Australia) Greg Morrisett (Cornell University, USA) Robert Nieuwenhuis (TU of Catalonia, Spain) Christine Paulin (LRI-University Paris Sud, France) Paul Tarau (University of North Texas, USA) German Vidal (University of Valencia, Spain) Invited Speakers: Francois Fages (INRIA, France) George Necula (University of California, Berkeley, USA) Prakash Panangaden (McGill University, Canada) Scope of the Conference: PPDP represents the union of two former conferences: Programming Languages, Implementations, Logics and Programs (PLILP) and Algebraic and Logic Programming (ALP). Continuing the tradition of PLILP/ALP, PPDP 2000 aims to stimulate research on the use of declarative methods in programming and on the design, implementation and application of programming languages that support such methods. Topics of interest include any aspect related to understanding, integrating and extending programming paradigms such as those for functional, logic, constraint and object-oriented programming; concurrent extensions and mobile computing; type theory; support for modularity; use of logical methods in the design of program development tools; program analysis and verification; abstract interpretation; development of implementation methods; application of the relevant paradigms and associated methods in industry and education. This list is not exhaustive: submissions related to new and interesting ideas relating broadly to declarative programming are encouraged. The technical program of the conference will combine presentations of the accepted papers with invited talks and advanced tutorials. Paper Submissions: Submissions must be received on or before March 1, 2000. Papers must describe original, previously unpublished work that has not been simultaneously submitted for publication elsewhere. They must be written in English, must contain a clearly delineated part intended for the proceedings not exceeding 15 pages and 11 pt font, or 12 pages and 9 pt (ACM conference format) and must have a cover page with an abstract of up to 200 words, keywords, postal and electronic mailing addresses, and phone and fax numbers of the corresponding author. Additional material for possible consideration by reviewers may be included in the form of appendices. All submissions are to be electronic unless specifically approved by the Program Co-Chairs. Submissions in PostScript format should be sent to ppdp-00@REDACTED Authors will be notified of acceptance decisions by May 15, 2000. Camera-ready copies of the accepted papers must be received by June 15, 2000. Publication: The proceedings will be published by ACM Press. Conference Venue and Related Events: PPDP 2000 is part of a federation of colloquia known as Principles, Logics and Implementations of high-level programming languages (PLI 2000) which includes the ACM-SIGPLAN International Conference on Functional Programming (ICFP 2000). The overall event will run from September 18 to September 23, 2000 and will be held in Montreal, Canada. Details about the affiliated conferences and workshops will appear at the URL http://www.cs.yorku.ca/pli-00 Sponsorship: PPDP 2000 is sponsored by ACM-SIGPLAN with support of with the support of ALP, COMPULOG AMERICAS and EATCS. Topics: Logic and Constraint Programming Functional Programming Object-Oriented Programming Concurrent Programming Mobile Computing Specification Languages and Methods Type and Module Systems Program Logics and Verification Program Analysis and Transformation Abstract Machines and Compilation Methods Parallel and Distributed Implementations Programming Environments Important dates: Submission deadline: March 1, 2000 Notification: May 15, 2000 Final Version: June 15, 2000 Conference: September 20-22, 2000 Conference Chair: Franck van Breugel (York University, Toronto, Canada) franck@REDACTED Web Site and Email Contact: URL: http://www.cs.yorku.ca/ppdp-00 email: ppdp-00@REDACTED email for submissions: ppdp-00@REDACTED From rconover@REDACTED Sun Feb 13 05:17:28 2000 From: rconover@REDACTED (Rusty Conover) Date: Sat, 12 Feb 2000 21:17:28 -0700 (MST) Subject: Cryto and SSL Message-ID: Excuse me if this has been asked before. I'm trying to build erlang with crypto and ssl enabled, but the code seems to be missing in the lib/ssl directory. What do I have to do to get it, or what am I doing wrong? I have built and installed SSLeay. Rusty -- Rusty Conover | rusty@REDACTED Systems Programmer | 406-586-5050 x242 Zoot Enterprises | http://www.zootweb.com From eeipan@REDACTED Sun Feb 13 12:47:31 2000 From: eeipan@REDACTED (Peter Andersson) Date: Sun, 13 Feb 2000 11:47:31 +0000 Subject: Mobile code with Erlang References: <38A1B77E.8C347FA6@mail2.udc.es> <2000-02-10-16-37-09+trackit+sam@inf.enst.fr> <38A2E6B7.2716B1FA@terminus.ericsson.se> <38A3D614.619B9D00@eei.ericsson.se> Message-ID: <38A699D3.23472B50@eei.ericsson.se> Hi, Regarding previous mails about implementing mobile agents in Erlang (can't remember who asked about it originally, now), here are a two documents that perhaps could be of interest: http://www.ericsson.se/cslab/archive/97/2/paam97.ps ftp://ftp.csd.uu.se/pub/papers/reports/0147.ps.gz Regards /Peter -- ?--? ? - ? ?-? ?--? ? ?--? ?--? ? ?- -? -?? ? ?-? ??? ??? --- -? Peter "Peppe" Andersson Ericsson Systems Expertise Ltd, Ireland address: Ericsson Software Campus address: Apartment No 43 (work) Athlone, Co. Westmeath (home) Irishtown Central Athlone, Co. Westmeath fax: +353 902 31304 phone: +353 902 31784 phone(mobile): +353 86 815 3813 email: eeipan@REDACTED ~ Anthony's Law of Force: "Do not force it, get a larger hammer" ~ ?--? ? - ? ?-? ?--? ? ?--? ?--? ? ?- -? -?? ? ?-? ??? ??? --- -? From carin.gustafsson@REDACTED Sun Feb 13 14:23:19 2000 From: carin.gustafsson@REDACTED (Carin Gustafsson (ETX)) Date: Sun, 13 Feb 2000 14:23:19 +0100 Subject: exclusive XOR Message-ID: <5FEBB1DCF877D31184040008C791DBDC030211A0@esemont055.gbg.edt.ericsson.se> Dos anyone know how to do exclusive XOR in Erlang My goal is to encrypt information, store it in Mnesia an on request decrypt an send as a ASCII file, is this possible ? Carin From patrik@REDACTED Sun Feb 13 16:48:03 2000 From: patrik@REDACTED (patrik) Date: Sun, 13 Feb 2000 16:48:03 +0100 (CET) Subject: exclusive XOR In-Reply-To: <5FEBB1DCF877D31184040008C791DBDC030211A0@esemont055.gbg.edt.ericsson.se> Message-ID: On Sun, 13 Feb 2000, Carin Gustafsson (ETX) wrote: > Dos anyone know how to do exclusive XOR in Erlang > > My goal is to encrypt information, store it in Mnesia > an on request decrypt an send as a ASCII file, is this > possible ? > > Carin > Try bxor (xor@REDACTED)2> (45 bxor 24) bxor 24. 45 /Cheers Patrik. -- Patrik Winroth Bluetail AB http://www.bluetail.com From dne@REDACTED Sun Feb 13 17:00:04 2000 From: dne@REDACTED (Daniel Neri) Date: Sun, 13 Feb 2000 17:00:04 +0100 Subject: exclusive XOR In-Reply-To: "Carin Gustafsson's message of "Sun, 13 Feb 2000 14:23:19 +0100" References: <87hffdyvdv.fsf@totally-fudged-out-message-id> Message-ID: <87ael5ytx7.fsf@nowhere.mayonnaise.net> "Carin Gustafsson (ETX)" writes: > Dos anyone know how to do exclusive XOR in Erlang If you mean exclusive-OR (I've never heard of exclusive-exclusive-OR), there's the "bxor" operator. Like this: ,---- | Erlang (BEAM) emulator version 4.9.1 [source] | | Eshell V4.9.1 (abort with ^G) | 1> 2#0010 bxor 2#1011. | 9 `---- Best regards, /Daniel -- Daniel Neri dne@REDACTED From sam@REDACTED Mon Feb 14 12:42:07 2000 From: sam@REDACTED (Samuel Tardieu) Date: 14 Feb 2000 12:42:07 +0100 Subject: exclusive XOR In-Reply-To: "Carin Gustafsson's message of "Sun, 13 Feb 2000 14:23:19 +0100" References: <5FEBB1DCF877D31184040008C791DBDC030211A0@esemont055.gbg.edt.ericsson.se> Message-ID: <2000-02-14-12-42-08+trackit+sam@inf.enst.fr> >>>>> "Carin" == ETX writes: Carin> Dos anyone know how to do exclusive XOR in Erlang My goal is to Carin> encrypt information, store it in Mnesia an on request decrypt Carin> an send as a ASCII file, is this possible ? Since you appear to be located in the free world, why don't you use the crypto application to encrypt data? Aren't you afraid of getting the illusion of security by using your own crypto algorithm?[1] Sam Footnotes: [1] Unless you plan to recode a "safe" crypto algorithm, but in this case, we're back to the usage of the Erlang crypto application. -- Samuel Tardieu -- sam@REDACTED From bjarne@REDACTED Mon Feb 14 16:17:11 2000 From: bjarne@REDACTED (Bjarne =?iso-8859-1?Q?D=E4cker?=) Date: Mon, 14 Feb 2000 16:17:11 +0100 Subject: Erlang User Conference - call for papers Message-ID: <38A81C77.C3879062@erix.ericsson.se> Dear Erlang friends, The Sixth International Erlang/OTP User Conference will take place in Stockholm on October 3, 2000. http://www.ericsson.se/cslab/projects/euc00/cfp.html Papers are invited, preferably reporting from actual application projects or exciting technical developments. New users of the open source are especially invited. There is room outside the lecture hall to show demo systems. Welcome and best regards from the EUC'00 organisation committee From peter@REDACTED Tue Feb 15 11:31:47 2000 From: peter@REDACTED (Peter H|gfeldt) Date: Tue, 15 Feb 2000 11:31:47 +0100 (MET) Subject: Cryto and SSL In-Reply-To: Message-ID: > Excuse me if this has been asked before. > > I'm trying to build erlang with crypto and ssl enabled, but the code seems > to be missing in the lib/ssl directory. What do I have to do to get it, > or what am I doing wrong? > > I have built and installed SSLeay. > > Rusty > -- > Rusty Conover | rusty@REDACTED > Systems Programmer | 406-586-5050 x242 > Zoot Enterprises | http://www.zootweb.com > Due to export control restrictions imposed by Swedish law, the Erlang ssl application is excluded from the Open-source Erlang R6B-0 release. There is some hope that the restrictions will be abolished in the future. When that happens, ssl will be included in the release. Before you build crypto set the SSLEAY_ROOT variable appropriately in lib/crypto/TARGET/Makefile. /Peter ------------------------------------------------------------------------- Peter H?gfeldt e-mail : peter@REDACTED Open Telecom Platform From Bob.Smart@REDACTED Thu Feb 17 01:12:22 2000 From: Bob.Smart@REDACTED (Bob Smart) Date: Thu, 17 Feb 2000 11:12:22 +1100 Subject: some questions (was Re: illegal guard) In-Reply-To: Your message of "Mon, 17 Jan 2000 08:56:13 BST." <3882CB1D.BBB32731@cslab.ericsson.se> Message-ID: <200002170012.LAA13839@stranger.vic.cmis.CSIRO.AU> 1. > One of the reasons for this is that guards > should be easy to implement and very fast to check I can understand this in receive, but do all guards have to be so restricted? For example it makes "if" prety useless. Mind you I worked out that you should use "case of ..." instead of "if". However that brings up another problem: Why do some things, like atom(X), only work inside guards and don't give boolean results elsewhere. This is a minor irritation when writing filter functions. 2. Erlang 5? I saw a reference to Erlang 5 (in the mercury users mailing list). Where is this being discussed? I have a few suggestions: not just on booleans and guards. 3. JVM? I saw a claim that the JVM doesn't handle tail recursion well so would be problematic for functional languages. Not sure where I saw this but on reflection I don't understand it. All you have to do (in Java rather than JVM terminology) is wrap the function body in "while(true) { ... }". When you want to do a tail recursion you just do (as you would at machine level): change the parameter and "continue". Obviously you have to exit such a routine with an explict "return val". Am I missing something? Bob From Pekka.Hedqvist@REDACTED Thu Feb 17 01:58:45 2000 From: Pekka.Hedqvist@REDACTED (Pekka.Hedqvist@REDACTED) Date: Thu, 17 Feb 2000 11:58:45 +1100 (EST) Subject: some questions (was Re: illegal guard) In-Reply-To: <200002170012.LAA13839@stranger.vic.cmis.CSIRO.AU> References: <3882CB1D.BBB32731@cslab.ericsson.se> <200002170012.LAA13839@stranger.vic.cmis.CSIRO.AU> Message-ID: <14507.18373.801347.380495@eddieware.eddieware.org> Bob Smart writes: > 1. > > One of the reasons for this is that guards > > should be easy to implement and very fast to check > > I can understand this in receive, but do all guards have to be so restricted? > For example it makes "if" prety useless. Mind you I worked out that you > should use "case of ..." instead of "if". However > that brings up another problem: > > Why do some things, like atom(X), only work inside guards and don't > give boolean results elsewhere. This is a minor irritation when writing > filter functions. I agree, for me its not obvious why all type check guards doesn't simply return true or false outside guards and why do this work: [X || X <- [1,2,3,a,f,[]], atom(X)]. [a,f] and not: 4> lists:filter(fun(X) -> atom(X) end, [1,2,a,b,d,[]]). ** exited: {undef,{shell_default,atom,[1]}} ** but this works of course: lists:filter(fun(X) when atom(X) -> true; (_) -> false end, [1,2,a,b,d,[]]). [a,b,d] > 3. JVM? > > I saw a claim that the JVM doesn't handle tail recursion well so > would be problematic for functional languages. Not sure where I saw > this but on reflection I don't understand it. All you have to do > (in Java rather than JVM terminology) is wrap the function body in > "while(true) { ... }". When you want to do a tail recursion you just > do (as you would at machine level): change the parameter and "continue". > Obviously you have to exit such a routine with an explict "return val". > Am I missing something? Kawa - the Scheme solves the recursion problem nicely. The major thing I see is howto represent tagged data efficently, thats necessery in a dynamically typed language like Erlang. Give each and every Erlang object and JVM object representation is neither fast or cost efficient. From jbottoms@REDACTED Thu Feb 17 05:07:05 2000 From: jbottoms@REDACTED (John W. Bottoms) Date: Wed, 16 Feb 2000 23:07:05 -0500 Subject: Class programming assignment References: <3882CB1D.BBB32731@cslab.ericsson.se> <200002170012.LAA13839@stranger.vic.cmis.CSIRO.AU> <14507.18373.801347.380495@eddieware.eddieware.org> Message-ID: <38AB73E9.CF017295@world.std.com> I would like to include a brief tutorial on Erlang in a datacomm course. The emphasis will be on SDL to Erlang conversion and provability. What kind of programming exercise could I assign as class work to expose students to the language? -John Bottoms From Matthias.Lang@REDACTED Sun Feb 20 10:16:33 2000 From: Matthias.Lang@REDACTED (Matthias.Lang@REDACTED) Date: Sun, 20 Feb 2000 10:16:33 +0100 (MET) Subject: preview copy of a new Erlang FAQ Message-ID: <14511.45297.608550.411052@gargle.gargle.HOWL> Hi, After the last open-source release, I resolved to go through the Erlang FAQ and update it. Somewhere along the way I added a few questions which seemed to pop up every so often on this mailing list and now it's grown: http://www.ericsson.se/cslab/~mml/faq/ I intend to put this up on the erlang.org site, but before I organise that, I'd appreciate if people here took a look through it. In particular * Those of you who were quoted (Per on Question 11.8, Mike on question 5.10 and Joe on 11.7) might want to check I'm not putting words in your mouth * There are a few calls for information spread around * I'm interested in suggestions for questions to be removed, added, reworded or corrected. Thanks Matthias From vladdu@REDACTED Sun Feb 20 15:57:00 2000 From: vladdu@REDACTED (Vlad Dumitrescu) Date: Sun, 20 Feb 2000 15:57:00 CET Subject: jive question Message-ID: <20000220145700.93949.qmail@hotmail.com> Hi! I am not very handy with Java, but I want to try Jive. It works with an application, but as an applet (running locally) it doesn't work (communication with Erlang seems to be the cause - more precisely the lack of it). What may be tha cause? wrong CLASSPATH maybe? regards Vlad ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com From jamesh@REDACTED Mon Feb 21 16:07:39 2000 From: jamesh@REDACTED (James Hague) Date: Mon, 21 Feb 2000 09:07:39 -0600 Subject: BEAM spec update? Message-ID: <3.0.32.20000221090739.00d449b8@volition-inc.com> Any progress on making a nice BEAM spec available? I've been itching to write my own BEAM interpreter :) From mike@REDACTED Mon Feb 21 09:22:15 2000 From: mike@REDACTED (Michael C Williams) Date: Mon, 21 Feb 2000 09:22:15 +0100 (MET) Subject: preview copy of a new Erlang FAQ In-Reply-To: <14511.45297.608550.411052@gargle.gargle.HOWL> Message-ID: > Mike Williams, one of Erlang's original developers, is fond of > saying "If you don't run experiments before you start designing > your system, your entire system will be an experiment". Should be: "If you don't run experiments before you start designing _a new system_ system, your entire system will be an experiment" > Large systems which spent most of their time communicating > with other systems, recovering from faults and making complex > decisions run at about the same speed as equivalent C programs. At the same speed, or faster than equivalent C programs. > Beginners typically over-estimate the cost of processes > and message passing. I think it is the other way round. Beginners _underestimate_ he cost of processes and message passing. But in 30 years of programming expereince, I have seldom met anybody who has overestimated the execution time of any larger program! On Sun, 20 Feb 2000 Matthias.Lang@REDACTED wrote: > Hi, > > After the last open-source release, I resolved to go through the > Erlang FAQ and update it. Somewhere along the way I added a > few questions which seemed to pop up every so often on this mailing > list and now it's grown: > > http://www.ericsson.se/cslab/~mml/faq/ > > I intend to put this up on the erlang.org site, but before I organise > that, I'd appreciate if people here took a look through it. In > particular > > * Those of you who were quoted (Per on Question 11.8, Mike on > question 5.10 and Joe on 11.7) might want to check I'm not > putting words in your mouth > > * There are a few calls for information spread around > > * I'm interested in suggestions for questions to be removed, > added, reworded or corrected. > > Thanks > > Matthias > > From klacke@REDACTED Tue Feb 22 12:06:02 2000 From: klacke@REDACTED (Klacke) Date: Tue, 22 Feb 2000 12:06:02 +0100 Subject: mnesia core Message-ID: <20000222120602.A74700@bluetail.com> Howdy, We have had some troubles with mnesia that crashes. We get the following fucker in the MnesiaCore file: [{crashinfo,{"~p got unexpected info: ~p; ~p~n", [mnesia_monitor, {'EXIT',<114.100.0>, {badarg,[{erlang,port_command,[#Port<114.3871>,"\t"]}, {file,ll_command,2}, {disk_log,handle,2}, {proc_lib,init_p,5}]}}, "Hint: check that the disk still is writable"]}}, It doesn't happen very often. We've been running our test suites here and it's happend a couple of times during the past weeks intensive testing. It appears to be some deep shit in the runtime system, possibly associated with ports. So, my question is if anybody else has experienced these mnesia crashes and if somebody knows about a fix. Cheers /klacke -- Claes Wikstrom Bluetail AB http://www.bluetail.com From luke@REDACTED Tue Feb 22 12:36:47 2000 From: luke@REDACTED (Luke Gorrie) Date: 22 Feb 2000 12:36:47 +0100 Subject: comment trimming in r6b Message-ID: Hey all, I was just reading through some of the erlang R6B sources and noticed that apparently all the author information, historical notes, and informal comments have been stripped out (at least in the files I looked at). That's quite different to 47.4.1, where there's a lot of this stuff throughout the code. I'd like to humbly suggest not doing that sort of thing :-) Because one of the things that made me like Erlang was the informal/human face of it - seeing the same names on the mailing list, on usenet, and in the sources, etc. I think the contrast between that and the typical dehumanised company-is-only-entity approach is a big advantage for Erlang. I've also found it useful to be able to mail authors directly to do things like confirm bug fixes, etc. In the R6B sources, you can't see their email addresses or names. Cheers, Luke From dgud@REDACTED Tue Feb 22 12:43:05 2000 From: dgud@REDACTED (Dan Gudmundsson) Date: Tue, 22 Feb 2000 12:43:05 +0100 (MET) Subject: mnesia core In-Reply-To: <20000222120602.A74700@bluetail.com> References: <20000222120602.A74700@bluetail.com> Message-ID: <14514.29936.83357.489779@rian> Nope, nothing I have ever seen or fixed, don't look like a mnesia problem though.. /Danne Klacke writes: > Howdy, > > We have had some troubles with mnesia that crashes. > We get the following fucker in the MnesiaCore file: > > > [{crashinfo,{"~p got unexpected info: ~p; ~p~n", > [mnesia_monitor, > {'EXIT',<114.100.0>, > {badarg,[{erlang,port_command,[#Port<114.3871>,"\t"]}, > {file,ll_command,2}, > {disk_log,handle,2}, > {proc_lib,init_p,5}]}}, > "Hint: check that the disk still is writable"]}}, > > > > It doesn't happen very often. We've been running our test suites > here and it's happend a couple of times during the past weeks intensive > testing. > > It appears to be some deep shit in the runtime system, possibly > associated with ports. So, my question is if anybody else > has experienced these mnesia crashes and if somebody knows about a > fix. > > > Cheers > > /klacke > > -- > Claes Wikstrom > Bluetail AB http://www.bluetail.com > From klacke@REDACTED Tue Feb 22 13:04:09 2000 From: klacke@REDACTED (Klacke) Date: Tue, 22 Feb 2000 13:04:09 +0100 Subject: comment trimming in r6b In-Reply-To: References: Message-ID: <20000222130409.A80666@bluetail.com> On Tue, Feb 22, 2000 at 12:36:47PM +0100, Luke Gorrie wrote: > Hey all, > > I was just reading through some of the erlang R6B sources and noticed > that apparently all the author information, historical notes, and > informal comments have been stripped out (at least in the files I > looked at). That's quite different to 47.4.1, where there's a lot of > this stuff throughout the code. > > I'd like to humbly suggest not doing that sort of thing :-) Because > one of the things that made me like Erlang was the informal/human face > of it - seeing the same names on the mailing list, on usenet, and in > the sources, etc. I think the contrast between that and the typical > dehumanised company-is-only-entity approach is a big advantage for > Erlang. I disliked it too when I saw it. However, thinking about it for while made me change my mind. Much of the authors/comments info in the source was also downright wrong and outdated. Many of the original authors aren't around any longer, neither is their code. Besides, there's an AUTHOR file for ecah app which says something about the original authors and the history of the app. See for example erts/AUTHORS /klacke Claes Wikstrom Bluetail AB http://www.bluetail.com From wadler@REDACTED Tue Feb 22 16:35:41 2000 From: wadler@REDACTED (Philip Wadler) Date: Tue, 22 Feb 2000 10:35:41 -0500 Subject: ICFP 2000 Message-ID: <200002221535.KAA14811@nslocum.cs.bell-labs.com> Below is the call for ICFP 2000. You may prefer to view it on the web: http://www.cs.bell-labs.com/~wadler/icfp2000 The submission deadline is fast approaching: 1 March 2000! Two invited speakers have accepted: Carl Seger, Intel Benjamin Pierce, University of Pennsylvania A third is in the works. This year we are experimenting with two special classes of submissions, Application letters (Applets) and Functional Pearls, to emphasize both the utility and the beauty of functional programming. If you have a nifty application or an elegant program that never quite seemed to fit the conference mold, then this is your year. And of course, we also want submissions that fulfill the traditional model of a crisp new research result. See you in Montreal! -- P Call for Papers ICFP 2000: International Conference on Functional Programming Montreal, Canada; 18--20 September 2000 (associated with PLI 2000) http://www.cs.bell-labs.com/~wadler/icfp2000 Scope ~~~~~~ ICFP 2000 seeks original papers on the full spectrum of the art, science, and practice of functional programming. The conference invites submissions on all topics ranging from principles to practice, from foundations to features, and from abstraction to application. The scope covers all languages that encourage programming with functions, including both purely applicative and imperative languages, as well as languages that support objects and concurrency. Papers setting new directions in functional programming are particularly encouraged. Topics of interest include, but are not limited to, the following: FOUNDATIONS: formal semantics, lambda calculus, type theory, monads, continuations, control, state, effects. DESIGN: modules and type systems, concurrency and distribution, components and composition, relations to object-oriented and logic programming, multiparadigm programming. IMPLEMENTATION: abstract machines, compile-time and run-time optimization, just-in-time compilers, memory management, foreign-function and component interfaces. TRANSFORMATION AND ANALYSIS: abstract interpretation, partial evaluation, program transformation, theorem proving, specification and verification. APPLICATIONS: scientific and numerical computing, symbolic computing and artificial intelligence, systems programming, databases, graphic user interfaces, multimedia programming, web programming. EXPERIENCE: FP in education and industry, ramifications on other paradigms and computing disciplines. The conference also solicits two special classes of submissions, application letters and functional pearls, described below. Application Letters (Applets) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Especially in industry, users of functional languages may be fully occupied writing functional programs, and may lack the time to write a full paper describing their work. Thus attendees often hear only from those developing functional languages --- the users are too busy using them. In order to attract greater participation from users, the conference solicits application letters describing experience using functional languages to solve real-world problems. Such papers might typically be about six pages (any length up to twelve pages is fine), and may be judged by interest of the application and novel use of functional languages as opposed to a crisp new research result. Functional Pearls ~~~~~~~~~~~~~~~~~~ Program committees traditionally expect a paper to make a contribution of a certain size. Ideas that are small, rounded, and glow with their own light may have a number of venues, but conferences are not typically among them. (Among the outlets have been columns such as Bentley's Programming Pearls in Communications of the ACM, Rem's Small Programming Exercises in Science of Computer Programming, and Barendregt's Theoretical Pearls and Bird's Functional Pearls in the Journal of Functional Programming.) As an experiment, this year the conference invites papers that develop a short functional program. Such papers might typically be about six pages (any length up to twelve pages is fine), and may be judged by elegance of development and clarity of expression as opposed to a crisp new research result. Submission guidelines ~~~~~~~~~~~~~~~~~~~~~~ Authors should submit a 100-200 word abstract and a full paper. Submissions should be no more than 12 pages in standard ACM conference format: two columns, nine point font on ten point baseline, page 20pc (3.33in) wide and 54pc (9in) tall with a column gutter of 2pc (0.33in). Submissions that do not meet these guidelines will not be considered. Suitable style files for Latex, Word, and Word Perfect are provided by the ACM at http://www.acm.org/sigs/pubs/proceed/template.html. Papers must be submitted in PDF format, or as PostScript documents that are interpretable by Ghostscript, and they must be printable on both USLetter and A4 paper. Individuals for which this requirement is a hardship should contact the program chair. Submitted papers must have content that has not previously been published in other conferences or refereed venues, and simultaneous submission to other conferences or refereed venues is unacceptable. Each paper should explain its contributions in both general and technical terms, clearly identifying what has been accomplished, saying why it is significant, and comparing it with previous work. Authors should strive to make the technical content of their papers understandable to a broad audience. Important dates and submission details ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Submission Deadline 13.00 EST (18.00 UTC), 1 March 2000 Submission Length 12 pages in ACM conference format Notification of Acceptance or Rejection8 May 2000 Final Paper Due 12 June 2000 ICFP '00 in Montreal 18--20 September 2000 The submission deadline and length above are firm. Submit electronically via the Web at: http://oopsla.acm.org/icfpservlets/login You will be asked to create and bookmark a personal page. (All information you give will be kept private.) You may submit at any time, and once you have submitted, you may update your submission at any time before the deadline. ICFP thanks OOPSLA and Bjorn Freeman-Benson for providing the submission software and server. Application letters and functional pearls should be labeled as such on the first page. They may be any length up to the full twelve pages, though shorter submissions are welcome. Authors of accepted papers will be required to sign ACM copyright release forms. Program Committee ~~~~~~~~~~~~~~~~~~ Program Chair Program Committee ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~ Philip Wadler Richard Bird, Oxford Bell Labs, Lucent Technologies Craig Chambers, Washington 600 Mountain Ave, room 2T-402 Charles Consel, IRISA Murray Hill, NJ 07974-0636, USA Susan Eisenbach, Imperial phone: +1 908 582 4004 Fergus Henderson, Melbourne http://www.cs.bell-labs.com/~wadler Ralf Hinze, Bonn wadler@REDACTED Shriram Krishnamurthi, Rice Xavier Leroy, INRIA/Trusted Logic General Chair Eugenio Moggi, Genova ~~~~~~~~~~~~~~ Greg Morisset, Cornell Martin Odersky Atsushi Ohori, Kyoto Ecole Polytechnique Federale de Lausanne Catuscia Palamidessi, Penn State Andrew Wright, Intertrust From richardc@REDACTED Tue Feb 22 17:48:57 2000 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 22 Feb 2000 17:48:57 +0100 Subject: Jinterface question Message-ID: <38B2BDF9.39573B94@csd.uu.se> Has anyone managed to get Jinterface (1.0) to talk to an Erlang node under Open Source Erlang R6B? I seem to be unable to get past the authentication, even though I think I set the cookies correctly. I would be happy to see a Java code example that has been shown to work. /Richard Carlsson -- Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://www.csd.uu.se/~richardc/ From gordon.beaton@REDACTED Tue Feb 22 18:43:35 2000 From: gordon.beaton@REDACTED (Gordon Beaton) Date: 22 Feb 2000 17:43:35 GMT Subject: Jinterface question References: <38B2BDF9.39573B94@csd.uu.se> Message-ID: <88uhs7$2do$1@news.du.uab.ericsson.se> On 22 Feb 2000 16:48:57 GMT, Richard Carlsson wrote: > Has anyone managed to get Jinterface (1.0) to talk to an Erlang node > under Open Source Erlang R6B? I seem to be unable to get past the > authentication, even though I think I set the cookies correctly. Are you specifically getting an OtpAuthException? > I would be happy to see a Java code example that has been shown to > work. This is really all you need to do to set up a connection from the Java side (I have not tried with the open source version): OtpServer self = new OtpServer(thisnodename, cookie); OtpPeer other = new OtpPeer(othernodename); OtpConnection conn = self.connect(other); If you suspect a problem, try setting Java system property OtpConnection.trace to some value like 4 before starting your java node, i.e.: java -DOtpConnection.trace=4 MyClass ... This will show you what happens during the connection setup. If you still aren't getting anywhere, post some code... /gordon -- g o r d o n . b e a t o n @ e r i c s s o n . c o m please no spam, chain letters or virtual postcards! From richardc@REDACTED Tue Feb 22 19:16:16 2000 From: richardc@REDACTED (Richard Carlsson) Date: Tue, 22 Feb 2000 19:16:16 +0100 (MET) Subject: Jinterface question In-Reply-To: <88uhs7$2do$1@news.du.uab.ericsson.se> Message-ID: On 22 Feb 2000, Gordon Beaton wrote: > On 22 Feb 2000 16:48:57 GMT, Richard Carlsson wrote: > > Has anyone managed to get Jinterface (1.0) to talk to an Erlang node > > under Open Source Erlang R6B? I seem to be unable to get past the > > authentication, even though I think I set the cookies correctly. > > Are you specifically getting an OtpAuthException? Yes. It occurs in `recvChallengeAck', at the point when OtpConnection has sent its "challenge" and tries to read something back, but apparently gets a short read, which is turned into a "Peer authentication error.". What this implies is beyond me, since I don't know the protocol. > This is really all you need to do to set up a connection from the Java > side (I have not tried with the open source version): > > OtpServer self = new OtpServer(thisnodename, cookie); > OtpPeer other = new OtpPeer(othernodename); > > OtpConnection conn = self.connect(other); Well, that's exactly the documentation example, which is also what I'm already doing, unless the cookie is wrong, but it is supposed to be just the string corresponding to the atom that the node uses as its cookie, as seen in `erlang:get_cookie()', right? I mean, I am able to get another Erlang node to talk to the first node by explicitly setting its cookie to the same value, so I don't see why I can't make it work for Jinterface. > If you suspect a problem, try setting Java system property > OtpConnection.trace to some value like 4 before starting your java > node, i.e.: > > java -DOtpConnection.trace=4 MyClass ... Did that. Even inserted some print statements in the Java code and recompiled to see what was going on. /Richard Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://www.csd.uu.se/~richardc/ From gordon.beaton@REDACTED Tue Feb 22 20:21:05 2000 From: gordon.beaton@REDACTED (Gordon Beaton) Date: 22 Feb 2000 19:21:05 GMT Subject: Jinterface question References: <88uhs7$2do$1@news.du.uab.ericsson.se>, Message-ID: <88unj1$47v$1@news.du.uab.ericsson.se> On 22 Feb 2000 18:16:16 GMT, Richard Carlsson wrote: > > java -DOtpConnection.trace=4 MyClass ... > > Did that. Even inserted some print statements in the Java code and > recompiled to see what was going on. Perhaps you could post the trace output so we can see what is going on too? /gordon -- g o r d o n . b e a t o n @ e r i c s s o n . c o m please no spam, chain letters or virtual postcards! From richardc@REDACTED Wed Feb 23 10:29:38 2000 From: richardc@REDACTED (Richard Carlsson) Date: Wed, 23 Feb 2000 10:29:38 +0100 (MET) Subject: Jinterface question In-Reply-To: <88unj1$47v$1@news.du.uab.ericsson.se> Message-ID: On 22 Feb 2000, Gordon Beaton wrote: > On 22 Feb 2000 18:16:16 GMT, Richard Carlsson wrote: > > > java -DOtpConnection.trace=4 MyClass ... > > > > Did that. Even inserted some print statements in the Java code and > > recompiled to see what was going on. > > Perhaps you could post the trace output so we can see what is going > on too? Here it is. The printout of "self.cookie() ->" is my own addition, done just before the exception is thrown -> LOOKUP (r4) foo@REDACTED <- PORT 55098 -> MD5 CONNECT TO harpo.it.uu.se:55098 -> HANDSHAKE sendName flags=4 dist=5 local=pp_client@REDACTED <- HANDSHAKE recvStatus (ok) local=pp_client@REDACTED <- HANDSHAKE recvChallenge from=foo@REDACTED challenge=218089577 local=pp_client@REDACTED -> HANDSHAKE sendChallengeReply challenge=-437147855 digest=283f393f3f3f3f683f73304a3f3f3157 local=pp_client@REDACTED self.cookie() -> GNGHONVCOKHWGENSXJFF com.ericsson.otp.erlang.OtpAuthException: Peer authentication error. -------- An on the Erlang side: =ERROR REPORT==== 23-Feb-2000::10:15:59 === ** Connection attempt from disallowed node 'pp_client@REDACTED' ** (foo@REDACTED)1> erlang:get_cookie(). 'GNGHONVCOKHWGENSXJFF' (foo@REDACTED)2> auth:get_cookie('pp_client@REDACTED'). 'GNGHONVCOKHWGENSXJFF' (foo@REDACTED)1> -------- Just to check that it is at all possible to connect to that node, I start another Erlang node, initially using a different cookie: Erlang (BEAM) emulator version 4.9.1 [source] Eshell V4.9.1 (abort with ^G) (bar@REDACTED)1> erlang:get_cookie(). 'LCGCVEJOKLRRXDWZOIZY' (bar@REDACTED)2> auth:get_cookie('foo@REDACTED'). 'LCGCVEJOKLRRXDWZOIZY' (bar@REDACTED)3> net_adm:ping('foo@REDACTED'). pang (bar@REDACTED)4> erlang:set_cookie('foo@REDACTED', 'GNGHONVCOKHWGENSXJFF'). true (bar@REDACTED)5> net_adm:ping('foo@REDACTED'). pong (bar@REDACTED)6> At the first `ping' attempt, the original node responded just like in the Java case: =ERROR REPORT==== 23-Feb-2000::10:20:22 === ** Connection attempt from disallowed node 'bar@REDACTED' ** but after I manually set the cookie, the connection worked just fine, so that Jinterface cannot connect appears rather strange. -------- One thing in OtpConnection.java that I could not help but notice: // This is nooo good as a challenge, // XXX fix me. static private int genChallenge() { return random.nextInt(); } although whether it can be the source of this error, I can't tell. /Richard Carlsson Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://www.csd.uu.se/~richardc/ From gordon.beaton@REDACTED Wed Feb 23 11:22:25 2000 From: gordon.beaton@REDACTED (Gordon Beaton) Date: 23 Feb 2000 10:22:25 GMT Subject: Jinterface question References: <88unj1$47v$1@news.du.uab.ericsson.se>, Message-ID: <890cd1$kk6$1@news.du.uab.ericsson.se> On 23 Feb 2000 09:29:38 GMT, Richard Carlsson wrote: > -> LOOKUP (r4) foo@REDACTED > <- PORT 55098 > -> MD5 CONNECT TO harpo.it.uu.se:55098 > -> HANDSHAKE sendName flags=4 dist=5 local=pp_client@REDACTED > <- HANDSHAKE recvStatus (ok) local=pp_client@REDACTED > <- HANDSHAKE recvChallenge from=foo@REDACTED challenge=218089577 > local=pp_client@REDACTED > -> HANDSHAKE sendChallengeReply challenge=-437147855 > digest=283f393f3f3f3f683f73304a3f3f3157 local=pp_client@REDACTED > self.cookie() -> GNGHONVCOKHWGENSXJFF > com.ericsson.otp.erlang.OtpAuthException: Peer authentication error. > > -------- > > An on the Erlang side: > > =ERROR REPORT==== 23-Feb-2000::10:15:59 === > ** Connection attempt from disallowed node 'pp_client@REDACTED' ** > > (foo@REDACTED)1> erlang:get_cookie(). > 'GNGHONVCOKHWGENSXJFF' > (foo@REDACTED)2> auth:get_cookie('pp_client@REDACTED'). > 'GNGHONVCOKHWGENSXJFF' > (foo@REDACTED)1> > > -------- Hmm... what does 'java -version' say? (I've heard a rumour that some of the bitshifting done in the MD5 handshake doesn't work properly on all jvm's, but I have yet to see this myself). /gordon -- g o r d o n . b e a t o n @ e r i c s s o n . c o m please no spam, chain letters or virtual postcards! From richardc@REDACTED Wed Feb 23 11:36:23 2000 From: richardc@REDACTED (Richard Carlsson) Date: Wed, 23 Feb 2000 11:36:23 +0100 (MET) Subject: Jinterface question In-Reply-To: <890cd1$kk6$1@news.du.uab.ericsson.se> Message-ID: On 23 Feb 2000, Gordon Beaton wrote: > On 23 Feb 2000 09:29:38 GMT, Richard Carlsson wrote: > > -> LOOKUP (r4) foo@REDACTED > > <- PORT 55098 > > -> MD5 CONNECT TO harpo.it.uu.se:55098 > > -> HANDSHAKE sendName flags=4 dist=5 local=pp_client@REDACTED > > <- HANDSHAKE recvStatus (ok) local=pp_client@REDACTED > > <- HANDSHAKE recvChallenge from=foo@REDACTED challenge=218089577 > > local=pp_client@REDACTED > > -> HANDSHAKE sendChallengeReply challenge=-437147855 > > digest=283f393f3f3f3f683f73304a3f3f3157 local=pp_client@REDACTED > > Hmm... what does 'java -version' say? java version "1.2.2" Classic VM (build JDK-1.2.2-001, green threads, sunwjit) > (I've heard a rumour that some of the bitshifting done in the MD5 > handshake doesn't work properly on all jvm's, but I have yet to see > this myself). Well, I hope some clever person finds the problem; I don't have the time to get deeper into this myself. Glad to hear I wasn't the only one who had encountered this, though. /Richard Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) E-mail: Richard.Carlsson@REDACTED WWW: http://www.csd.uu.se/~richardc/ From rv@REDACTED Wed Feb 23 11:50:11 2000 From: rv@REDACTED (Robert Virding) Date: Wed, 23 Feb 2000 11:50:11 +0100 Subject: some questions (was Re: illegal guard) In-Reply-To: Your message of "Thu, 17 Feb 2000 11:58:45 +1100." <14507.18373.801347.380495@eddieware.eddieware.org> Message-ID: <200002231050.LAA09782@trana.bluetail.com> Pekka.Hedqvist@REDACTED writes: >Bob Smart writes: > > 1. > > > One of the reasons for this is that guards > > > should be easy to implement and very fast to check > > > > I can understand this in receive, but do all guards have to be so restricted? > > For example it makes "if" prety useless. Mind you I worked out that you > > should use "case of ..." instead of "if". However > > that brings up another problem: > > > > Why do some things, like atom(X), only work inside guards and don't > > give boolean results elsewhere. This is a minor irritation when writing > > filter functions. >I agree, for me its not obvious why all type check guards doesn't simply >return true or false outside guards and why do this work: >[X || X <- [1,2,3,a,f,[]], atom(X)]. >[a,f] > >and not: >4> lists:filter(fun(X) -> atom(X) end, [1,2,a,b,d,[]]). >** exited: {undef,{shell_default,atom,[1]}} ** > >but this works of course: >lists:filter(fun(X) when atom(X) -> true; (_) -> false end, [1,2,a,b,d,[]]). >[a,b,d] This is coming. The latest suugestion is to create a number of type test functions "is_XXX(Term)" which will also be able to be used in guards as guard tests. The reason for adding the "is_" prefix is to be more explicit that these are boolean tests and to get around the problem with float/1 (think about it). > > 3. JVM? > > > > I saw a claim that the JVM doesn't handle tail recursion well so > > would be problematic for functional languages. Not sure where I saw > > this but on reflection I don't understand it. All you have to do > > (in Java rather than JVM terminology) is wrap the function body in > > "while(true) { ... }". When you want to do a tail recursion you just > > do (as you would at machine level): change the parameter and "continue". > > Obviously you have to exit such a routine with an explict "return val". > > Am I missing something? > >Kawa - the Scheme solves the recursion problem nicely. The major thing I see >is howto represent tagged data efficently, thats necessery in a dynamically >typed language like Erlang. Give each and every Erlang object and JVM >object representation is neither fast or cost efficient. The problem is that with the JVM you can only "call" another function, even if it is the last thing you do in a function. Wrapping it in a "while" does not help, this is how you transfer control. This means that you always come back to the caller, but this is precisely what you DON'T want to do for the last call. A "common" solution is to use a continuation passing style and explicitly carrying around a pointer of where you want to go after you are done. This works in the JVM but apparently significantly slows it down. Robert From per.bohlin@REDACTED Wed Feb 23 11:14:00 2000 From: per.bohlin@REDACTED (Per Bohlin) Date: Wed, 23 Feb 2000 11:14:00 +0100 Subject: Jinterface question References: Message-ID: <38B3B2E8.5553E617@etx.ericsson.se> I sent a question about the same thing before christmas. Never got any answer though. I patched my code in order to avoid the authority checks that are done. The original message follows. /Per > Subject: > jinterface questions > Date: > Mon, 20 Dec 1999 10:10:42 +0100 > From: > Per Bohlin > Organization: > Ericsson Telecom > To: > Erlang Questions > > > > > I tried to experiment a little bit with > JInterface starting with making a hidden connection > from a Java node to an Erlang Node. > > When doing this with the open source distribution > on my Home-PC with Windows 98 > and JDK 1.2 downloaded from javasoft.com > I did not succeed. > > The erlang side refuses to accept the connection. > Error printout: ** Connection attempt from disallowed node ... > > On the Java side I get an authorization exception > > I have found that there are some handshaking going on where > a random number is sent from Erlang to Java. Some calculations > are made on this number on both sides. The result is sent from Java to > erlang and the results are compared. > They are not identical so Erlang stops the connection. > > Doing the same thing at work with OTP-R6 on Sun/Solaris > works fine. > > I have now patched both dist_util.erl in the kernel source and > OtpConnection.java in jinterface so that the tests are avoided. > This seem to work, but I guess that is not the way to solve it. > What shall I do to make it work properly? > > > I also have a question about the functionallity of JInterface. > At first I thought that it provided the same functionallity to JAVA > that you get to C when using erl_interface. > > I've used erl_interface a bit in a User Interface tool where > C++ objects are represented with Erlang PID's. > When receiving messages from erlang a dictionary is used to keep > track of which object to transfer the message to based on the pid > that the message is sent to. So effectivly the erlang side can send > messages to C++ objects (represening windows) > as if they where Erlang processes. > > In JInterface it is possible to create Erlang PIDs on the java side. > But, I have not found any way of getting the PID that the Erlang message > was sent to. The messages just ends up in the > OtpConnection.receive > without reference to the PID that the message was sent to. > > Is there a way to find the PID that the message was sent to? > (And possibly also the PID of the process that the message was sent > from, > I don't need it but it is there in erl_interface) > > Thanks > > /Per Bohlin Richard Carlsson wrote: > > On 22 Feb 2000, Gordon Beaton wrote: > > > On 22 Feb 2000 18:16:16 GMT, Richard Carlsson wrote: > > > > java -DOtpConnection.trace=4 MyClass ... > > > > > > Did that. Even inserted some print statements in the Java code and > > > recompiled to see what was going on. > > > > Perhaps you could post the trace output so we can see what is going > > on too? > > Here it is. The printout of "self.cookie() ->" is my own addition, > done just before the exception is thrown > > -> LOOKUP (r4) foo@REDACTED > <- PORT 55098 > -> MD5 CONNECT TO harpo.it.uu.se:55098 > -> HANDSHAKE sendName flags=4 dist=5 local=pp_client@REDACTED > <- HANDSHAKE recvStatus (ok) local=pp_client@REDACTED > <- HANDSHAKE recvChallenge from=foo@REDACTED challenge=218089577 > local=pp_client@REDACTED > -> HANDSHAKE sendChallengeReply challenge=-437147855 > digest=283f393f3f3f3f683f73304a3f3f3157 local=pp_client@REDACTED > self.cookie() -> GNGHONVCOKHWGENSXJFF > com.ericsson.otp.erlang.OtpAuthException: Peer authentication error. > > -------- > > An on the Erlang side: > > =ERROR REPORT==== 23-Feb-2000::10:15:59 === > ** Connection attempt from disallowed node 'pp_client@REDACTED' ** > > (foo@REDACTED)1> erlang:get_cookie(). > 'GNGHONVCOKHWGENSXJFF' > (foo@REDACTED)2> auth:get_cookie('pp_client@REDACTED'). > 'GNGHONVCOKHWGENSXJFF' > (foo@REDACTED)1> > > -------- > > Just to check that it is at all possible to connect to that node, > I start another Erlang node, initially using a different cookie: > > Erlang (BEAM) emulator version 4.9.1 [source] > > Eshell V4.9.1 (abort with ^G) > (bar@REDACTED)1> erlang:get_cookie(). > 'LCGCVEJOKLRRXDWZOIZY' > (bar@REDACTED)2> auth:get_cookie('foo@REDACTED'). > 'LCGCVEJOKLRRXDWZOIZY' > (bar@REDACTED)3> net_adm:ping('foo@REDACTED'). > pang > (bar@REDACTED)4> erlang:set_cookie('foo@REDACTED', > 'GNGHONVCOKHWGENSXJFF'). > true > (bar@REDACTED)5> net_adm:ping('foo@REDACTED'). > pong > (bar@REDACTED)6> > > At the first `ping' attempt, the original node responded just like in the > Java case: > > =ERROR REPORT==== 23-Feb-2000::10:20:22 === > ** Connection attempt from disallowed node 'bar@REDACTED' ** > > but after I manually set the cookie, the connection worked just fine, > so that Jinterface cannot connect appears rather strange. > > -------- > > One thing in OtpConnection.java that I could not help but notice: > > // This is nooo good as a challenge, > // XXX fix me. > static private int genChallenge() { > return random.nextInt(); > } > > although whether it can be the source of this error, I can't tell. > > /Richard Carlsson > > Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) > E-mail: Richard.Carlsson@REDACTED WWW: http://www.csd.uu.se/~richardc/ From gordon.beaton@REDACTED Wed Feb 23 12:22:43 2000 From: gordon.beaton@REDACTED (Gordon Beaton) Date: 23 Feb 2000 11:22:43 GMT Subject: Jinterface question References: <890cd1$kk6$1@news.du.uab.ericsson.se>, Message-ID: <890fu3$lor$1@news.du.uab.ericsson.se> On 23 Feb 2000 10:36:23 GMT, Richard Carlsson wrote: > > Hmm... what does 'java -version' say? > > java version "1.2.2" > Classic VM (build JDK-1.2.2-001, green threads, sunwjit) > > > (I've heard a rumour that some of the bitshifting done in the MD5 > > handshake doesn't work properly on all jvm's, but I have yet to see > > this myself). > > Well, I hope some clever person finds the problem; I don't have the time > to get deeper into this myself. Glad to hear I wasn't the only one who had > encountered this, though. Odd. I am unable to reproduce the problem and honestly I have no idea what is causing it (have tried using the same JVM). I'll submit a bug report and hopefully someone who understands the md5 stuff can have a look at it. /gordon -- g o r d o n . b e a t o n @ e r i c s s o n . c o m please no spam, chain letters or virtual postcards! From dgud@REDACTED Wed Feb 23 12:28:44 2000 From: dgud@REDACTED (Dan Gudmundsson) Date: Wed, 23 Feb 2000 12:28:44 +0100 (MET) Subject: A new mnesia version Message-ID: <14515.50228.335187.147760@rian> Is available under bugs&fixes /Dan From gordon.beaton@REDACTED Wed Feb 23 12:55:13 2000 From: gordon.beaton@REDACTED (Gordon Beaton) Date: 23 Feb 2000 11:55:13 GMT Subject: Jinterface question References: , <38B3B2E8.5553E617@etx.ericsson.se> Message-ID: <890hr1$lor$2@news.du.uab.ericsson.se> On 23 Feb 2000 10:14:00 GMT, Per Bohlin wrote: > > I also have a question about the functionallity of JInterface. > > At first I thought that it provided the same functionallity to JAVA > > that you get to C when using erl_interface. > > I've used erl_interface a bit in a User Interface tool where > > C++ objects are represented with Erlang PID's. > > When receiving messages from erlang a dictionary is used to keep > > track of which object to transfer the message to based on the pid > > that the message is sent to. So effectivly the erlang side can send > > messages to C++ objects (represening windows) as if they where Erlang > > processes. > > > > In JInterface it is possible to create Erlang PIDs on the java side. > > But, I have not found any way of getting the PID that the Erlang message > > was sent to. The messages just ends up in the OtpConnection.receive > > without reference to the PID that the message was sent to. > > > > Is there a way to find the PID that the message was sent to? > > (And possibly also the PID of the process that the message was sent > > from, I don't need it but it is there in erl_interface) This was a design decision. I thought about returning the received message inside another object along with the header information, but one of the goals with Jinterface was to provide something that was a lot easier to use than erl-interface and in particular had a lower learning threshold. For example, all outgoing messages appear to come from the same Erlang Pid, you don't need to make them up in order to send messages to Erlang. By the same token, you don't get to find out what Pid messages were sent to. It's possible that this decision should be reevaluated. If you need to dispatch incoming messages to different receivers you can still do it quite easily by including the intended recipient in the body of the message: { pid, msg } or similar. The recipient doesn't even need to be a pid in this case, for example if you use an integer then you can switch on it. /gordon -- g o r d o n . b e a t o n @ e r i c s s o n . c o m please no spam, chain letters or virtual postcards! From per.bohlin@REDACTED Wed Feb 23 15:19:13 2000 From: per.bohlin@REDACTED (Per Bohlin) Date: Wed, 23 Feb 2000 15:19:13 +0100 Subject: Jinterface question References: <38B3B2E8.5553E617@etx.ericsson.se> <890hr1$lor$2@news.du.uab.ericsson.se> Message-ID: <38B3EC61.6138CB17@etx.ericsson.se> Gordon Beaton wrote: > > On 23 Feb 2000 10:14:00 GMT, Per Bohlin wrote: > > > I also have a question about the functionallity of JInterface. > > > At first I thought that it provided the same functionallity to JAVA > > > that you get to C when using erl_interface. > > > > I've used erl_interface a bit in a User Interface tool where > > > C++ objects are represented with Erlang PID's. > > > When receiving messages from erlang a dictionary is used to keep > > > track of which object to transfer the message to based on the pid > > > that the message is sent to. So effectivly the erlang side can send > > > messages to C++ objects (represening windows) as if they where Erlang > > > processes. > > > > > > In JInterface it is possible to create Erlang PIDs on the java side. > > > But, I have not found any way of getting the PID that the Erlang message > > > was sent to. The messages just ends up in the OtpConnection.receive > > > without reference to the PID that the message was sent to. > > > > > > Is there a way to find the PID that the message was sent to? > > > (And possibly also the PID of the process that the message was sent > > > from, I don't need it but it is there in erl_interface) > > This was a design decision. I thought about returning the received > message inside another object along with the header information, but > one of the goals with Jinterface was to provide something that was a > lot easier to use than erl-interface and in particular had a lower > learning threshold. > > For example, all outgoing messages appear to come from the same Erlang > Pid, you don't need to make them up in order to send messages to > Erlang. By the same token, you don't get to find out what Pid messages > were sent to. It's possible that this decision should be reevaluated. > > If you need to dispatch incoming messages to different receivers you > can still do it quite easily by including the intended recipient in > the body of the message: { pid, msg } or similar. The recipient > doesn't even need to be a pid in this case, for example if you use an > integer then you can switch on it. > This is exactly what I have done. But if you can diferentiate between the pids on the java side it is possible to make it behave like an erlang node containing erlang processes to which any process on the erlang side sends messages as if there where running in an other erlang node. I think that is quite elegant. I agree that erl_interface to some extent is more compicated in the sence that you have to retreive the message from a c-structure instead of getting the message directly. And I think it should continue to be like that, What I would like is either an more advanced function in which you get poth the pid and the message, or a function to call after you have retreived the message that retruns the pid the last message was sent to. These functions would then not be used if they are not wanted. /Per > /gordon > > -- > g o r d o n . b e a t o n @ e r i c s s o n . c o m > please no spam, chain letters or virtual postcards! From coq@REDACTED Wed Feb 23 16:44:00 2000 From: coq@REDACTED (J.A.) Date: Wed, 23 Feb 2000 07:44:00 -0800 (PST) Subject: About this list Message-ID: <27620258.951320641352.JavaMail.imail@swirly> Hi everyone. I would see all questions and answers posted to this list. Is there such file or site? Thanks in advance. J.A. _______________________________________________________ Get 100% FREE Internet Access powered by Excite Visit http://freeworld.excite.com From Sean.Hinde@REDACTED Wed Feb 23 17:15:26 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Wed, 23 Feb 2000 16:15:26 -0000 Subject: Erlang ports and Perl Message-ID: Hi all, I'm having a little difficulty with using a perl script as a port program: #!/usr/local/bin/perl while(1) { $cmd = ; print STDERR "Received OK"; print "ok"; print STDERR "Sent"; } My erlang port program: Port = open_port({spawn, "perlscript"}, [stream]), Port ! {self(), {command, "hello"}}, receive Data -> Data after 10000 timedout end The result of this is that perl receives the hello message and prints "Received OK" and "Sent" on stderr, but my erlang process never receives "ok". Tracing confirms that the hello message is sent to the port but nothing is received. Using an equivalent C program as the port program with the same erlang code works fine. Anyone any idea? Sean From Matthias.Lang@REDACTED Wed Feb 23 17:29:49 2000 From: Matthias.Lang@REDACTED (Matthias.Lang@REDACTED) Date: Wed, 23 Feb 2000 17:29:49 +0100 (MET) Subject: About this list In-Reply-To: <27620258.951320641352.JavaMail.imail@swirly> References: <27620258.951320641352.JavaMail.imail@swirly> Message-ID: <14516.2813.696696.671847@gargle.gargle.HOWL> > I would see all questions and answers posted to this list. Is there such > file or site? Since the list is run by majordomo, you can retrieve all the archive files by sending mail to majordomo. If you send mail to majordomo@REDACTED with the text index erlang-questions in the body of your email, you'll get a list of files back, which correspond to archives of each month's questions. If you wanted to have majordomo send you the archive of last october's questions, you'd send mail to majordomow with the text get erlang-questions erlang-questions.199910 in the body. Sometime soon (?) there'll be an HTML-ized version of the mailing list. Matthias From spearce@REDACTED Wed Feb 23 17:34:09 2000 From: spearce@REDACTED (Shawn Pearce) Date: Wed, 23 Feb 2000 11:34:09 -0500 Subject: Erlang ports and Perl In-Reply-To: ; from Sean Hinde on Wed, Feb 23, 2000 at 04:15:26PM -0000 References: Message-ID: <20000223113409.H8558@spearce.org> Sean, Perl output is typically line-buffered by default by Perl. This means that the underlying OS will not receive any information to pass onto another program (such as Erlang) unless a newline ("\n") is printed in Perl. Try doing the following before your while(1) loop starts: select((select(STDOUT),$| = 1)[0]); select((select(STDERR),$| = 1)[0]); to unbuffer both the STDOUT and STDERR streams and see if that makes a difference to your little program. Sean Hinde scrawled: > Hi all, > > I'm having a little difficulty with using a perl script as a port program: > > #!/usr/local/bin/perl > while(1) { > $cmd = ; > print STDERR "Received OK"; > print "ok"; > print STDERR "Sent"; > } > > My erlang port program: > > Port = open_port({spawn, "perlscript"}, [stream]), > Port ! {self(), {command, "hello"}}, > receive > Data -> > Data > after 10000 > timedout > end > > The result of this is that perl receives the hello message and prints > "Received OK" and "Sent" on stderr, but my erlang process never receives > "ok". Tracing confirms that the hello message is sent to the port but > nothing is received. Using an equivalent C program as the port program with > the same erlang code works fine. -- Shawn. ``If this had been a real life, you would have received instructions on where to go and what to do.'' From bobsh@REDACTED Wed Feb 23 18:04:31 2000 From: bobsh@REDACTED (Bob Shafer) Date: Wed, 23 Feb 2000 09:04:31 -0800 (PST) Subject: Erlang ports and Perl In-Reply-To: Message-ID: The "ok" is probably stuck in a buffer, and you need to flush it. There's at least one Perlism for that... I don't have a perl manual handy (and I use Perl only rarely, so don't remember), but I do have some code that needed to do that, and it uses "autoflush" and also "$|" might have something to do with it. On Wed, 23 Feb 2000, Sean Hinde wrote: > Hi all, > > I'm having a little difficulty with using a perl script as a port program: > > #!/usr/local/bin/perl > while(1) { > $cmd = ; > print STDERR "Received OK"; > print "ok"; > print STDERR "Sent"; > } > > My erlang port program: > > Port = open_port({spawn, "perlscript"}, [stream]), > Port ! {self(), {command, "hello"}}, > receive > Data -> > Data > after 10000 > timedout > end > > The result of this is that perl receives the hello message and prints > "Received OK" and "Sent" on stderr, but my erlang process never receives > "ok". Tracing confirms that the hello message is sent to the port but > nothing is received. Using an equivalent C program as the port program with > the same erlang code works fine. > > Anyone any idea? > > Sean > From simonb@REDACTED Wed Feb 23 17:59:55 2000 From: simonb@REDACTED (Simon Bennett) Date: Wed, 23 Feb 2000 16:59:55 +0000 Subject: Erlang ports and Perl References: Message-ID: <38B4120B.CB61E5E0@terminus.ericsson.se> Sean Hinde wrote: > I'm having a little difficulty with using a perl script as a port program: > > #!/usr/local/bin/perl > while(1) { > $cmd = ; > print STDERR "Received OK"; > print "ok"; > print STDERR "Sent"; > } > > My erlang port program: > > Port = open_port({spawn, "perlscript"}, [stream]), > Port ! {self(), {command, "hello"}}, > receive > Data -> > Data > after 10000 > timedout > end You could try replacing Data in the receive clause with: {Port, {data, Data}} Otherwise, I'm not sure, as I've only used it to C with the {packet, N} option to pass the length of the data between C and Erlang. Simon Bennett Information Systems Consultant ___________________________________________________________________ Simon Bennett E-mail: simonb@REDACTED Ericsson Intracom http://www.ericsson.se/UK/intracom 1 Bede Island Road Voice (UK) 0116 2542400 Leicester Voice (int) +44 116 2542400 England Voice ECN: 832 707 ext 232 LE2 7EU Fax: +44 (0)116 2046111 ___________________________________________________________________ From borys@REDACTED Wed Feb 23 18:56:58 2000 From: borys@REDACTED (borys) Date: Wed, 23 Feb 2000 12:56:58 -0500 (EST) Subject: Erlang ports and Perl In-Reply-To: from "Sean Hinde" at Feb 23, 2000 04:15:26 PM Message-ID: <200002231756.MAA25284@bill3.ncats.net> > #!/usr/local/bin/perl > while(1) { > $cmd = ; > print STDERR "Received OK"; > print "ok"; > print STDERR "Sent"; > } > The result of this is that perl receives the hello message and prints > "Received OK" and "Sent" on stderr, but my erlang process never receives > "ok". Tracing confirms that the hello message is sent to the port but > nothing is received. Using an equivalent C program as the port program with > the same erlang code works fine. Try turning line buffering off by either setting $| to 1 or by STDIN->autoflush(1). I imagine libc is waiting for a newline before it *really* sends the data. > Sean Trannie From Sean.Hinde@REDACTED Wed Feb 23 18:27:51 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Wed, 23 Feb 2000 17:27:51 -0000 Subject: Erlang ports and Perl Message-ID: This one seems to work. Thanks for all your answers. Sean -----Original Message----- From: Shawn Pearce [mailto:spearce@REDACTED] Sent: 23 February 2000 16:34 To: erlang-questions@REDACTED Subject: Re: Erlang ports and Perl Sean, Perl output is typically line-buffered by default by Perl. This means that the underlying OS will not receive any information to pass onto another program (such as Erlang) unless a newline ("\n") is printed in Perl. Try doing the following before your while(1) loop starts: select((select(STDOUT),$| = 1)[0]); select((select(STDERR),$| = 1)[0]); to unbuffer both the STDOUT and STDERR streams and see if that makes a difference to your little program. Sean Hinde scrawled: > Hi all, > > I'm having a little difficulty with using a perl script as a port program: > > #!/usr/local/bin/perl > while(1) { > $cmd = ; > print STDERR "Received OK"; > print "ok"; > print STDERR "Sent"; > } > > My erlang port program: > > Port = open_port({spawn, "perlscript"}, [stream]), > Port ! {self(), {command, "hello"}}, > receive > Data -> > Data > after 10000 > timedout > end > > The result of this is that perl receives the hello message and prints > "Received OK" and "Sent" on stderr, but my erlang process never receives > "ok". Tracing confirms that the hello message is sent to the port but > nothing is received. Using an equivalent C program as the port program with > the same erlang code works fine. -- Shawn. ``If this had been a real life, you would have received instructions on where to go and what to do.'' From scott@REDACTED Thu Feb 24 10:06:02 2000 From: scott@REDACTED (Scott Lystig Fritchie) Date: Thu, 24 Feb 2000 03:06:02 -0600 Subject: The mysteries of eprof Message-ID: <200002240906.DAA99698@snookles.snookles.com> Good morning. I hope this message is coherent: it's been a long day.(*) I've been fiddling a lot with eprof, trying to plumb its secrets. It's difficult to get used to, because it definitely isn't "gprof". Dealing strictly with wall-clock times is, well, difficult. I suppose the ideal tool would be able to count the CPU time consumed by the reductions made by a function *and* the CPU time consumed by BIFs *and* somehow account for CPU time consumed by scheduling, driver overhead, etc. Oh, and while I'm dreaming, we might as well sum all the time consumed by function F plus all the functions F calls. :-) Anyhow, there have been a few things I've discovered this week that don't make a lot of sense. One is actually eprof-specific. The other is more scheduling-oriented. The eprof question is: if I'm profiling an already-running process, and I let it go for N seconds, why doesn't total_analyse() report N seconds (or "close to N") worth of activity? I've been able to answer part of the question: if the process was asleep waiting for a message, the time from when eprof:profile() was called and when the message arrives. If that process never receives a message, then eprof thinks it did nothing. It *did* do nothing, but it would be less misleading if eprof could say it spent 100% of its time within the blocking function. Giving my understanding of how eprof & process tracing works (wall-clock timestamped messages are sent to the eprof process whenever a function is entered, exited, or calls/returns from another function), eprof's silence makes sense. When I point eprof at processes that are fairly busy, eprof:total_analyse() sums almost the entire amount of wall-clock time spent during the profiling. (This and all other examples use 20 seconds between eprof:profile() and eprof:stop_profiling().) For example: FUNCTION CALLS TIME SECONDS gen_server:loop_wait/1 489 98. % 18.2782 callback_server_hack:get_key/2 735 0.3 % 0.0586 callback_server_hack:handle_call/3 489 0.3 % 0.0571 gen_server:loop/6 489 0.1 % 0.0340 gen_server:reply/2 489 0.1 % 0.0253 gen_server:handle_msg/6 489 0.1 % 0.0188 [...] (These reports have been hacked to show the amount of wall-clock time in the rightmost column. If I remember, I'll include a patch below. The relative time percentage formatting is ugly, but it's good enough for me....) That's pretty close to 20 seconds. It'd be nice to know how eprof missed the other ~1.5 seconds, but I'm not that curious... ... unless it's the same reason that causes this: FUNCTION CALLS TIME SECONDS gen_tcp:call/2 928 58. % 3.6845 gen:wait_resp_mon/3 1009 15. % 0.9692 fnstuff:svc_tcp_main/5 906 8.0 % 0.5042 [...] It's still a 20 second sample. If I included all the report, the wall-clock time only adds up to 6.6 seconds. Since I'm reallyreally interested in profiling what this process is doing, it would be wonderful to know where the phantom time is. That second example leads me to my other question: why would gen_tcp:call/2 suck up so much time? (In my application, gen_udp:call/2 does the same thing.) To be honest, I believe I've answered that question, but the answer doesn't help (much) to fix the underlying problem. gen_tcp:call/2 looks like a classic example of what make_ref() is used for: uniquely tagging messages so that you can grab only the response to that packet. Process-wise, things look like: my process <--> inet_tcp:socket_loop/3 <--> Port handling the <-> The and friends socket Network As far as I can tell, the reason gen_tcp:call/2 takes so much time is that my system is actually busy enough that the message sent from my process -> inet_tcp:socket_loop/3 (via gen_tcp:send()) takes about 2.3ms (per call!) to be "receive"d by the recipient process. Almost immediately, the recipient sends back an acknowledgement, but it takes that long again before the ack is "receive"d by my process. Ideally, that data should be *on*the*wire* as soon as possible. I'd love to get rid of most of that 2.3ms latency, but I'm at a loss how. Well, short of playing games with the BEAM process scheduler.(**) Or reinventing the gen_tcp and gen_udp wheels by having my process talk directly to the port. :-( Any ideas from enlightened subscribers? -Scott (*) Good thing I started it shortly before noon! (**) I'm sure my colleages will be delighted to know I've been contemplating such things ... like a "!!" or some other hack to put the sending process to sleep ASAP and wake up the recipient ASAP. {sigh} --- Scott Lystig Fritchie, 5401 - 10th Ave S, Minneapolis, MN 55417 USA office: 612.827.2835, cell: 612.805.1383 Professional Governing: Is It Faked? --- snip --- snip --- snip --- snip --- snip --- snip --- snip --- snip --- --- eprof.erl.orig Fri Feb 18 19:21:03 2000 +++ eprof.erl Fri Feb 18 19:17:34 2000 @@ -302,7 +302,7 @@ total_analyse(T) -> Pcalls = reverse(keysort(2, replicas(ets:tab2list(T)))), Time = collect_times(Pcalls), - format("FUNCTION~44s TIME ~n", ["CALLS"]), + format("FUNCTION~44s TIME SECONDS~n", ["CALLS"]), printit(Pcalls, Time). analyse(notable) -> @@ -327,12 +327,12 @@ printit([],_) -> ok; printit([{{Mod,Fun,Arity}, Time, Calls} |Tail], ProcTime) -> - format("~s ~s ~s % ~n", [ff(Mod,Fun,Arity), fint(Calls), - fpf(100*(divide(Time,ProcTime)))]), + format("~s ~s ~3s % ~9.4f~n", [ff(Mod,Fun,Arity), fint(Calls), + fpf(100*(divide(Time,ProcTime))), Time/1000000]), printit(Tail, ProcTime); printit([{{_,{Mod,Fun,Arity}}, Time, Calls} |Tail], ProcTime) -> - format("~s ~s ~s % ~n", [ff(Mod,Fun,Arity), fint(Calls), - fpf(100*(divide(Time,ProcTime)))]), + format("~s ~s ~3s % ~9.4f~n", [ff(Mod,Fun,Arity), fint(Calls), + fpf(100*(divide(Time,ProcTime))), Time/1000000]), printit(Tail, ProcTime); printit([_|T], Time) -> printit(T, Time). @@ -351,7 +351,7 @@ strip_tail([H|T], I) -> [H|strip_tail(T, I-1)]; strip_tail([], I) -> []. -fpf(F) -> strip_tail(flatten(io_lib:format("~w", [round(F)])), 5). +fpf(F) -> strip_tail(flatten(io_lib:format("~.2f", [F])), 5). fint(Int) -> pad(flatten(io_lib:format("~w",[Int])), 10). mklist(0) -> []; From etxuwig@REDACTED Thu Feb 24 11:40:18 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Thu, 24 Feb 2000 11:40:18 +0100 (MET) Subject: The mysteries of eprof Message-ID: <200002241040.LAA24990@etxb.ericsson.se> > From: Scott Lystig Fritchie > To: erlang-questions@REDACTED > Subject: The mysteries of eprof > Date: Thu, 24 Feb 2000 03:06:02 -0600 > > Good morning. I hope this message is coherent: it's been a long > day.(*) > > I've been fiddling a lot with eprof, trying to plumb its secrets. > It's difficult to get used to, because it definitely isn't "gprof". > Dealing strictly with wall-clock times is, well, difficult. I suppose > the ideal tool would be able to count the CPU time consumed by the > reductions made by a function *and* the CPU time consumed by BIFs > *and* somehow account for CPU time consumed by scheduling, driver > overhead, etc. Oh, and while I'm dreaming, we might as well sum all > the time consumed by function F plus all the functions F calls. :-) I'm not going to try to answer your eprof questions other than noting that we at AXD 301 don't use it. We write our own trace programs using the trace() BIF directly. We believe that we can get better profiling from our own programs since they are written with knowledge of our application. In short: - to find out how much CPU time a certain process is using, use trace flags [running, timestamp] You will then see when the process is scheduled in/out, and will be able to sum up the CPU time used for the process. It will also give you a feeling for where it spends most of its time. - to find which processes are using up memory, you can trace on [garbage_collection, procs, timestamp, set_on_spawn] And write a little program that logs garbage collections. /Uffe Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From bjorn@REDACTED Thu Feb 24 12:10:55 2000 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 24 Feb 2000 12:10:55 +0100 Subject: The mysteries of eprof In-Reply-To: Scott Lystig Fritchie's message of Thu, 24 Feb 2000 03:06:02 -0600 References: <200002240906.DAA99698@snookles.snookles.com> Message-ID: Thanks for your comments and observations. There will be a better eprof for R7 (the next major OTP release). How much better we don't know yet since it is not finished, but at least the eprof process itself will have less overhead than in the current version (i.e. your own code will run *somewhat* slower when profiling, not *much* slower as with the current version of eprof). Maybe I will mail more information when the new version of eprof is finished. (BTW, the new version of eprof will not run on R6, because it will be dependent on new features in R7.) /Bjorn Scott Lystig Fritchie writes: > > Good morning. I hope this message is coherent: it's been a long > day.(*) > > I've been fiddling a lot with eprof, trying to plumb its secrets. > It's difficult to get used to, because it definitely isn't "gprof". > Dealing strictly with wall-clock times is, well, difficult. I suppose > the ideal tool would be able to count the CPU time consumed by the > reductions made by a function *and* the CPU time consumed by BIFs > *and* somehow account for CPU time consumed by scheduling, driver > overhead, etc. Oh, and while I'm dreaming, we might as well sum all > the time consumed by function F plus all the functions F calls. :-) > > Anyhow, there have been a few things I've discovered this week that > don't make a lot of sense. One is actually eprof-specific. The other > is more scheduling-oriented. > > The eprof question is: if I'm profiling an already-running process, > and I let it go for N seconds, why doesn't total_analyse() report N > seconds (or "close to N") worth of activity? > > I've been able to answer part of the question: if the process was > asleep waiting for a message, the time from when eprof:profile() was > called and when the message arrives. > > If that process never receives a message, then eprof thinks it did > nothing. It *did* do nothing, but it would be less misleading if > eprof could say it spent 100% of its time within the blocking > function. Giving my understanding of how eprof & process tracing > works (wall-clock timestamped messages are sent to the eprof process > whenever a function is entered, exited, or calls/returns from another > function), eprof's silence makes sense. > > When I point eprof at processes that are fairly busy, > eprof:total_analyse() sums almost the entire amount of wall-clock time > spent during the profiling. (This and all other examples use 20 > seconds between eprof:profile() and eprof:stop_profiling().) For > example: > > FUNCTION CALLS TIME SECONDS > gen_server:loop_wait/1 489 98. % 18.2782 > callback_server_hack:get_key/2 735 0.3 % 0.0586 > callback_server_hack:handle_call/3 489 0.3 % 0.0571 > gen_server:loop/6 489 0.1 % 0.0340 > gen_server:reply/2 489 0.1 % 0.0253 > gen_server:handle_msg/6 489 0.1 % 0.0188 > [...] > > (These reports have been hacked to show the amount of wall-clock time > in the rightmost column. If I remember, I'll include a patch below. > The relative time percentage formatting is ugly, but it's good enough > for me....) > > That's pretty close to 20 seconds. It'd be nice to know how eprof > missed the other ~1.5 seconds, but I'm not that curious... > > ... unless it's the same reason that causes this: > > FUNCTION CALLS TIME SECONDS > gen_tcp:call/2 928 58. % 3.6845 > gen:wait_resp_mon/3 1009 15. % 0.9692 > fnstuff:svc_tcp_main/5 906 8.0 % 0.5042 > [...] > > It's still a 20 second sample. If I included all the report, the > wall-clock time only adds up to 6.6 seconds. Since I'm reallyreally > interested in profiling what this process is doing, it would be > wonderful to know where the phantom time is. > > That second example leads me to my other question: why would > gen_tcp:call/2 suck up so much time? (In my application, > gen_udp:call/2 does the same thing.) To be honest, I believe I've > answered that question, but the answer doesn't help (much) to fix the > underlying problem. > > gen_tcp:call/2 looks like a classic example of what make_ref() is used > for: uniquely tagging messages so that you can grab only the response > to that packet. Process-wise, things look like: > > my process <--> inet_tcp:socket_loop/3 <--> Port handling the <-> The > and friends socket Network > > > As far as I can tell, the reason gen_tcp:call/2 takes so much time is > that my system is actually busy enough that the message sent from my > process -> inet_tcp:socket_loop/3 (via gen_tcp:send()) takes about > 2.3ms (per call!) to be "receive"d by the recipient process. Almost > immediately, the recipient sends back an acknowledgement, but it takes > that long again before the ack is "receive"d by my process. > > Ideally, that data should be *on*the*wire* as soon as possible. I'd > love to get rid of most of that 2.3ms latency, but I'm at a loss how. > Well, short of playing games with the BEAM process scheduler.(**) Or > reinventing the gen_tcp and gen_udp wheels by having my process talk > directly to the port. :-( > > Any ideas from enlightened subscribers? > > -Scott > > (*) Good thing I started it shortly before noon! > > (**) I'm sure my colleages will be delighted to know I've been > contemplating such things ... like a "!!" or some other hack to put > the sending process to sleep ASAP and wake up the recipient ASAP. > {sigh} > > --- > Scott Lystig Fritchie, > 5401 - 10th Ave S, Minneapolis, MN 55417 USA > office: 612.827.2835, cell: 612.805.1383 > Professional Governing: Is It Faked? -- Bj?rn Gustavsson Ericsson Utvecklings AB bjorn@REDACTED ?T2/UAB/F/P BOX 1505 125 25 ?lvsj? From shrogers@REDACTED Fri Feb 25 02:15:32 2000 From: shrogers@REDACTED (Steven H. Rogers, Ph.D.) Date: Thu, 24 Feb 2000 19:15:32 -0600 Subject: Open Source Erlang R6 on Win9X Message-ID: <38B5D7B4.975365A6@ionet.net> Is Win 9X supported? The documentation seems to imply that NT 4.0 is the minimum MS Windows system for R6. -- Steve From shrogers@REDACTED Fri Feb 25 02:42:15 2000 From: shrogers@REDACTED (Steven H. Rogers, Ph.D.) Date: Thu, 24 Feb 2000 19:42:15 -0600 Subject: R6 IDE on Linux? Message-ID: <38B5DDF7.FFA61AD3@ionet.net> I just installed Open Source Erlang R6B-0 on a Red Hat 6.1 Linux system to try it out. Invoking it with "erl -x" to verify intallation, I get "erlexec: You need the 'xerl' and 'pxw' bundles to run 'erl -x'". What am I missing? Are these bundles a seperate download? -- Steve From shrogers@REDACTED Fri Feb 25 03:12:46 2000 From: shrogers@REDACTED (Steven H. Rogers, Ph.D.) Date: Thu, 24 Feb 2000 20:12:46 -0600 Subject: Erlang Versus Python Message-ID: <38B5E51E.6C29565D@ionet.net> Does anyone care to comment on the merits of Erlang relative to Python for a couple projects that I have in mind? 1) Distributed Resource Scheduling System - This system is intended to assist human schedulers rather than automatically generate an "optimal" schedule. Resources include personnel, equipment, and space. A web based interface is desired to allow common browsers to be used as clients to the scheduling server. Several classes of users are to make scheduling inputs and view schedules. The distributed aspect arises from time to time when a portion of the organization operates semi-autonamously for a time using a local instance of the scheduling system, perhaps on a laptop. Network connections to the main organization will be intermittent and data synchronization is desired when the connection is available. 2) Automated Testing of Networked Devices - This system will test devices as they are connected to an Ethernet network with minimal user interaction. -- Steve From kenneth@REDACTED Fri Feb 25 08:49:25 2000 From: kenneth@REDACTED (Kenneth Lundin) Date: Fri, 25 Feb 2000 08:49:25 +0100 Subject: Open Source Erlang R6 on Win9X References: <38B5D7B4.975365A6@ionet.net> Message-ID: <38B63405.DF5F367B@erix.ericsson.se> "Steven H. Rogers, Ph.D." wrote: > Is Win 9X supported? The documentation seems to imply that NT 4.0 is > the minimum MS Windows system for R6. > > -- Steve The system runs fine on Win95 and Win98 for 99% of the functionality. There are some functions that only works on NT for example the start_srv service and a connection to the NT eventlogger etc. , we only perform serious testing on the NT 4.0 platform. In practice the system is perfectly ok to use on Win9x but for serious robust non stop operation systems I would recommend NT 4.0. /Kenneth (Product Manager Erlang/OTP) -- Kenneth Lundin Ericsson Utvecklings AB kenneth@REDACTED ?T2/UAB/F/P BOX 1505 +46 8 727 57 25 125 25 ?lvsj? From tobbe@REDACTED Fri Feb 25 08:57:39 2000 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: 25 Feb 2000 08:57:39 +0100 Subject: R6 IDE on Linux? In-Reply-To: "Steven H. Rogers, Ph.D."'s message of "Thu, 24 Feb 2000 19:42:15 -0600" References: <38B5DDF7.FFA61AD3@ionet.net> Message-ID: > I just installed Open Source Erlang R6B-0 on a Red Hat 6.1 Linux system > to try it out. Invoking it with "erl -x" to verify intallation, I get > "erlexec: You need the 'xerl' and 'pxw' bundles to run 'erl -x'". xerl is a very old and obsolete application. I suggest you use your favorite editor and a seperate Erlang shell to compile/run your programs. Example: create foo.erl --- foo.erl --- -module(foo). -export([start/0]). start() -> io:format("Hello World !"). --------------- --- Run the Erlang shell --- unix> erl Erlang (BEAM) emulator version 4.9.1.b3+ [source] Eshell V4.9.1.b3+ (abort with ^G) 1> c(foo). # Compile foo.erl foo 2> foo:start(). # Run foo:start/0 ok 3> ---------------------------- Cheers /Tobbe -- Torbj?rn T?rnkvist , tel: +46 8 692 22 15 , fax: +46 8 654 70 71 Bluetail AB , Hantverkargatan 78 , SE-112 38 Stockholm , Sweden Email: tobbe@REDACTED , Web: http://www.bluetail.com/~tobbe From tobbe@REDACTED Fri Feb 25 08:58:24 2000 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: 25 Feb 2000 08:58:24 +0100 Subject: Open Source Erlang R6 on Win9X In-Reply-To: "Steven H. Rogers, Ph.D."'s message of "Thu, 24 Feb 2000 19:15:32 -0600" References: <38B5D7B4.975365A6@ionet.net> Message-ID: > Is Win 9X supported? The documentation seems to imply that NT 4.0 is > the minimum MS Windows system for R6. You can run Erlang on Win 9x. Cheers /Tobbe -- Torbj?rn T?rnkvist , tel: +46 8 692 22 15 , fax: +46 8 654 70 71 Bluetail AB , Hantverkargatan 78 , SE-112 38 Stockholm , Sweden Email: tobbe@REDACTED , Web: http://www.bluetail.com/~tobbe From pan@REDACTED Fri Feb 25 10:18:45 2000 From: pan@REDACTED (Patrik Nyblom) Date: Fri, 25 Feb 2000 10:18:45 +0100 Subject: Jinterface question References: <890cd1$kk6$1@news.du.uab.ericsson.se>, Message-ID: <38B648F5.42AA53A5@erix.ericsson.se> Richard Carlsson wrote: > On 23 Feb 2000, Gordon Beaton wrote: > > > On 23 Feb 2000 09:29:38 GMT, Richard Carlsson wrote: > > > -> LOOKUP (r4) foo@REDACTED > > > <- PORT 55098 > > > -> MD5 CONNECT TO harpo.it.uu.se:55098 > > > -> HANDSHAKE sendName flags=4 dist=5 local=pp_client@REDACTED > > > <- HANDSHAKE recvStatus (ok) local=pp_client@REDACTED > > > <- HANDSHAKE recvChallenge from=foo@REDACTED challenge=218089577 > > > local=pp_client@REDACTED > > > -> HANDSHAKE sendChallengeReply challenge=-437147855 > > > digest=283f393f3f3f3f683f73304a3f3f3157 local=pp_client@REDACTED > > > > Hmm... what does 'java -version' say? > > java version "1.2.2" > Classic VM (build JDK-1.2.2-001, green threads, sunwjit) > > > (I've heard a rumour that some of the bitshifting done in the MD5 > > handshake doesn't work properly on all jvm's, but I have yet to see > > this myself). > > Well, I hope some clever person finds the problem; I don't have the time > to get deeper into this myself. Glad to hear I wasn't the only one who had > encountered this, though. > > /Richard Try this workaround: export LC_CTYPE=iso_8859_1 (or setenv LC_CTYPE iso_8859_1 if using (t)csh) and then run your program. There will be a patch to remove the character encoding dependency in the handshake *very* soon. > Richard Carlsson (richardc@REDACTED) (This space intentionally left blank.) > E-mail: Richard.Carlsson@REDACTED WWW: http://www.csd.uu.se/~richardc/ From shrogers@REDACTED Fri Feb 25 12:46:18 2000 From: shrogers@REDACTED (Steven H. Rogers) Date: Fri, 25 Feb 2000 05:46:18 -0600 Subject: R6 IDE on Linux? References: <38B5DDF7.FFA61AD3@ionet.net> Message-ID: <38B66B8A.CA5A6C5A@ionet.net> Torbjorn Tornkvist wrote: > > xerl is a very old and obsolete application. I suggest you use > your favorite editor and a seperate Erlang shell to compile/run > your programs. ... > I don't normally use IDE's, but I thought I'd give it a try. My favorite editor is NEdit. Does anyone know of an Erlang pattern highlight file is available for NEdit? -- Steve From fp@REDACTED Fri Feb 25 18:17:40 2000 From: fp@REDACTED (Frank Pfenning) Date: Fri, 25 Feb 2000 12:17:40 -0500 Subject: PPDP 2000 Deadline Extension Message-ID: <13570.951499060@raw.fox.cs.cmu.edu> Second Call for Papers ACM-SIGPLAN 2nd International Conference on Principles and Practice of Declarative Programming (PPDP 2000) Montreal, Canada, September 20-22, 2000 http://www.cs.yorku.ca/ppdp-00 NEW SUBMISSION DEADLINE: MARCH 15, 2000 (previously March 1, 2000) NEW SUBMISSION PROCEDURE: Via START Conference Systems (accessible via the conference home page) Program Co-Chairs: Maurizio Gabbrielli (University of Udine, Italy) gabbri@REDACTED Frank Pfenning (Carnegie Mellon University, Pittsburgh, USA) fp@REDACTED Program Committee: Samson Abramsky (University of Edinburgh, UK) Zena Ariola (University of Oregon, USA) Andrea Asperti (University of Bologna, Italy) Frank de Boer (University of Utrecht, NL) Radhia Cousot (Ecole Polytechnique, France) Danny De Schreye (Catholic U. Leuven, Belgium) Saumya Debray (University of Arizona, USA) Thom Fruhwirth (LMU Munich, Germany) Andrew Gordon (Microsoft Research, UK) Doug Howe (Bell Labs, USA) Claude Kirchner (LORIA & INRIA Nancy, France) Naoki Kobayashi (University of Tokyo, Japan) Michael Maher (Griffith University, Australia) Greg Morrisett (Cornell University, USA) Robert Nieuwenhuis (TU of Catalonia, Spain) Christine Paulin (LRI-University Paris Sud, France) Paul Tarau (University of North Texas, USA) German Vidal (University of Valencia, Spain) Scope of the Conference: PPDP represents the union of two former conferences: Programming Languages, Implementations, Logics and Programs (PLILP) and Algebraic and Logic Programming (ALP). Continuing the tradition of PLILP/ALP, PPDP 2000 aims to stimulate research on the use of declarative methods in programming and on the design, implementation and application of programming languages that support such methods. Topics of interest include any aspect related to understanding, integrating and extending programming paradigms such as those for functional, logic, constraint and object-oriented programming; concurrent extensions and mobile computing; type theory; support for modularity; use of logical methods in the design of program development tools; program analysis and verification; abstract interpretation; development of implementation methods; application of the relevant paradigms and associated methods in industry and education. This list is not exhaustive: submissions related to new and interesting ideas relating broadly to declarative programming are encouraged. The technical program of the conference will combine presentations of the accepted papers with invited talks and advanced tutorials. Paper Submissions: Submissions must be received on or before March 15, 2000. Papers must describe original, previously unpublished work that has not been simultaneously submitted for publication elsewhere. They must be written in English, must contain a clearly delineated part intended for the proceedings not exceeding 15 pages, 11 pt font, and must have a cover page with an abstract of up to 200 words, keywords, postal and electronic mailing addresses, and phone and fax numbers of the corresponding author. Additional material for possible consideration by reviewers may be included in the form of appendices. All submissions are to be electronic unless specifically approved by the Program Co-Chairs. Papers in PostScript or PDF format should be submitted via START conference services, accesible via the conference home page or directly at http://raw.fox.cs.cmu.edu:8080/ Authors will be notified of acceptance decisions by May 15, 2000. Camera-ready copies of the accepted papers must be received by June 15, 2000. Publication: The proceedings will be published by ACM Press. Conference Venue and Related Events: PPDP 2000 is part of a federation of colloquia known as Principles, Logics and Implementations of high-level programming languages (PLI 2000) which includes the International Conference on Functional Programming (ICFP 2000). The overall event will run from September 17 to September 22, 2000 and will be held in Montreal, Canada. Details about the affiliated conferences and workshops will appear at the URL http://www.cs.yorku.ca/pli-00 Sponsorship: PPDP 2000 is being sponsored by ACM (SIGPLAN) with support of ALP, COMPULOG AMERICAS and EATCS. Topics: Logic and Constraint Programming Functional Programming Object-Oriented Programming Concurrent Programming Mobile Computing Specification Languages and Methods Type and Module Systems Program Logics and Verification Program Analysis and Transformation Abstract Machines and Compilation Methods Parallel and Distributed Implementations Programming Environments Important dates: Submission deadline: March 15, 2000 Notification: May 15, 2000 Final Version: June 15, 2000 Conference: September 20-22, 2000 Conference Chair: Franck van Breugel (York University, Toronto, Canada) franck@REDACTED Web Site and Email Contact: URL: http://www.cs.yorku.ca/ppdp-00 email: ppdp-00@REDACTED URL for submissions: http://raw.fox.cs.cmu.edu:8080/ From sam@REDACTED Fri Feb 25 20:05:40 2000 From: sam@REDACTED (Samuel Tardieu) Date: 25 Feb 2000 20:05:40 +0100 Subject: A new mnesia version In-Reply-To: Dan Gudmundsson's message of "Wed, 23 Feb 2000 12:28:44 +0100 (MET)" References: <14515.50228.335187.147760@rian> Message-ID: <2000-02-25-20-05-40+trackit+sam@inf.enst.fr> >>>>> "Dan" == Dan Gudmundsson writes: Dan> Is available under bugs&fixes Great news! I just wrote in the last few days a LDAP server in Erlang which makes heavy use of Mnesia, and I got hit by the match_object and with the dump/load_to_text_file/record_name bug. I will try the new version. By the way, is anyone interested in an Erlang LDAP server? It implements the full LDAP protocol, but does not support access control and replication through LDAP itself at this time, but this will be added shortly. Sam -- Samuel Tardieu -- sam@REDACTED From mbj@REDACTED Fri Feb 25 22:22:25 2000 From: mbj@REDACTED (Martin Bjorklund) Date: Fri, 25 Feb 2000 22:22:25 +0100 Subject: user_default Message-ID: <20000225222225U.mbj@bluetail.com> o did you like the old c() better? o would you like to be able to use bt() in production environments? o tired of writing loops on funs in the shell to get info on ports? o ever wondered why you can't use registered names in process_info()? ... then put this module in your code path, e.g. in your .erlang file, and try i(), pi(), etc in the shell. ?mbj -------------- next part -------------- %%%---------------------------------------------------------------------- %%% File : user_default.erl %%% Author : Martin Bjorklund %%% Purpose : Nice shell features. %%% Created : 24 Feb 2000 by Martin Bjorklund %%%---------------------------------------------------------------------- -module(user_default). %% We Don't Believe in Authors %% -author('mbj@REDACTED'). -export([i/0, i/1, i/3, ni/0, ci/0, ci/3, cni/0, bt/1, bt/3]). -export([pi/0, pi/1, pi2/0]). -import(lists, [filter/2, foreach/2, flatmap/2]). -define(mbj, /martin). %% Good ol' i() but includes zooombie support i() -> i1(processes()). ni() -> i1(all_procs()). i(Pid) when pid(Pid) -> pinfo(Pid); i(Name) when atom(Name) -> case whereis(Name) of undefined -> undefined; Pid -> i(Pid) end. i(X,Y,Z) -> pinfo(c:pid(X,Y,Z)). %% If you like the new one ci() -> c:i(). ci(X,Y,Z) -> c:i(X,Y,Z). cni() -> c:ni(). %% Code modified from c.erl i1(Ps) -> Alive = filter(fun palive/1, Ps), i2(Alive), case filter(fun pzombie/1, Ps) of [] -> ok; Zombies -> %% Zombies is not the same as Ps-Alive, since the remote %% process that fetched Ps is included among Alive, but has %% exited (for ni/0). io:format("\nDead processes:\n"), i2(Zombies) end. i2(Ps) -> iformat("Pid", "Initial Call", "Current Function", "Reds", "Msgs"), {R,M} = lists:foldl(fun display_info/2, {0,0}, Ps), iformat("Total", "", "", io_lib:write(R), io_lib:write(M)). palive(Pid) -> case pinfo(Pid, status) of undefined -> false; {status, exiting} -> false; _ -> true end. pzombie(Pid) -> case pinfo(Pid, status) of undefined -> false; {status, exiting} -> true; _ -> false end. pinfo(Pid) -> case is_alive() of true -> rpc:call(node(Pid), erlang, process_info, [Pid]); false -> process_info(Pid) end. pinfo(Pid, Item) -> case is_alive() of true -> rpc:call(node(Pid), erlang, process_info, [Pid, Item]); false -> process_info(Pid, Item) end. all_procs() -> case is_alive() of true -> flatmap(fun (N) -> rpc:call(N, erlang, processes, []) end, [node() | nodes()]); false -> processes() end. display_info(Pid, {R,M}) -> case pinfo(Pid) of undefined -> {R, M}; Info -> Call = initial_call(Info), Curr = fetch(current_function, Info), Reds = fetch(reductions, Info), LM = fetch(message_queue_len, Info), iformat(io_lib:write(Pid), mfa_string(Call), mfa_string(Curr), io_lib:write(Reds), io_lib:write(LM)), {R+Reds, M+LM} end. %% We can do some assumptions about the initial call. %% If the initial call is proc_lib:init_p/5 we can find more information %% by calling the function proc_lib:translate_initial_call/1. initial_call(Info) -> case fetch(initial_call, Info) of {proc_lib, init_p, 5} -> proc_lib:translate_initial_call(Info); ICall -> ICall end. mfa_string({M, F, A}) -> io_lib:format("~w:~w/~w", [M, F, A]); mfa_string(X) -> io_lib:write(X). fetch(Key, Info) -> case lists:keysearch(Key, 1, Info) of {value, {_, Val}} -> Val; false -> 0 end. iformat(A1, A2, A3, A4, A5) -> io:format("~-12s ~-23s ~-23s ~12s ~4s\n", [A1,A2,A3,A4,A5]). %% Port info %% I don't really know which info is most relevent, so I included %% both pi() and pi2(). pi() -> piformat("Id", "Name", "Connected", "Initial Call", "Current Function"), do_pi(fun(Info) -> Pid = fetch(connected, Info), {ICall, Curr} = case pinfo(Pid) of undefined -> {[], []}; ProcInfo -> {initial_call(ProcInfo), fetch(current_function, ProcInfo)} end, Id = fetch(id, Info), Name = fetch(name, Info), piformat(io_lib:write(Id), Name, io_lib:write(Pid), mfa_string(ICall), mfa_string(Curr)) end). piformat(A1, A2, A3, A4, A5) -> io:format("~-6s ~-10s ~-12s ~-23s ~-23s\n", [A1,A2,A3,A4,A5]). pi2() -> pi2format("Id", "Name", "Connected", "Recv", "Sent"), do_pi(fun(Info) -> Id = fetch(id, Info), Name = fetch(name, Info), Pid = fetch(connected, Info), Recv = fetch(input, Info), Sent = fetch(output, Info), pi2format(io_lib:write(Id), Name, io_lib:write(Pid), io_lib:write(Recv), io_lib:write(Sent)) end). pi2format(A1, A2, A3, A4, A5) -> io:format("~-6s ~-20s ~-12s ~-10s ~-10s\n", [A1,A2,A3,A4,A5]). do_pi(Print) -> Ps = erlang:ports(), foreach( fun(P) -> case erlang:port_info(P) of undefined -> ok; Info -> Print(Info); _ -> ok end end, erlang:ports()). pi(Id) -> pi(erlang:ports(), Id). pi([P | Ps], Id) -> case erlang:port_info(P, id) of {id, Id} -> erlang:port_info(P); _ -> pi(Ps, Id) end; pi([], _Id) -> undefined. %% Doesn't do process_display, which means it can be used when %% remotely connecting to a node. bt(Pid) when pid(Pid) -> case pinfo(Pid, backtrace) of {backtrace, Bin} -> io:format("~s\n", [binary_to_list(Bin)]); _ -> undefined end; bt(Name) when atom(Name) -> case whereis(Name) of undefined -> undefined; Pid -> bt(Pid) end. bt(X,Y,Z) -> bt(c:pid(X,Y,Z)). From klacke@REDACTED Fri Feb 25 22:23:42 2000 From: klacke@REDACTED (Klacke) Date: Fri, 25 Feb 2000 22:23:42 +0100 Subject: A new mnesia version In-Reply-To: <2000-02-25-20-05-40+trackit+sam@inf.enst.fr> References: <14515.50228.335187.147760@rian> <2000-02-25-20-05-40+trackit+sam@inf.enst.fr> Message-ID: <20000225222342.A12979@bluetail.com> > By the way, is anyone interested in an Erlang LDAP server? Sure, very interested. /klacke Claes Wikstrom Bluetail AB http://www.bluetail.com From Sean.Hinde@REDACTED Fri Feb 25 23:39:13 2000 From: Sean.Hinde@REDACTED (Sean Hinde) Date: Fri, 25 Feb 2000 22:39:13 -0000 Subject: A new mnesia version Message-ID: >I just wrote in the last few days a LDAP server in Erlang which makes >heavy use of Mnesia, and I got hit by the match_object and with the >dump/load_to_text_file/record_name bug. I will try the new version.. > >By the way, is anyone interested in an Erlang LDAP server? It >implements the full LDAP protocol, but does not support access control >and replication through LDAP itself at this time, but this will be >added shortly. > > Sam I also started work on an LDAP server, which got started but turned into a RADIUS server - also using Mnesia. So Yes, definitely interested in your LDAP, and I'll also post my RADIUS. Sean From per@REDACTED Sat Feb 26 13:02:40 2000 From: per@REDACTED (Per Hedeland) Date: Sat, 26 Feb 2000 13:02:40 +0100 (MET) Subject: A new mnesia version In-Reply-To: References: Message-ID: <200002261202.e1QC2eE11637@super.du.uab.ericsson.se> Sean Hinde wrote: >I also started work on an LDAP server, which got started but turned into a >RADIUS server - also using Mnesia. That's an interesting transformation...:-) > So Yes, definitely interested in your >LDAP, and I'll also post my RADIUS. Please consider (both you and Sam, and anyone else for that matter) sending these things in as "user contributions" (http://www.erlang.org/user.html) - it may not be the greatest form of collaborative software development, but at least they're relatively easy to find. I think both LDAP and RADIUS servers would be very useful to lots of people! --Per Hedeland per@REDACTED From enano@REDACTED Sat Feb 26 14:33:38 2000 From: enano@REDACTED (Miguel Barreiro Paz) Date: Sat, 26 Feb 2000 14:33:38 +0100 (CET) Subject: A new mnesia version In-Reply-To: <2000-02-25-20-05-40+trackit+sam@inf.enst.fr> Message-ID: On 25 Feb 2000, Samuel Tardieu wrote: > By the way, is anyone interested in an Erlang LDAP server? It > implements the full LDAP protocol, but does not support access control Certainly, a lot. Regards, From wadler@REDACTED Sun Feb 27 15:10:31 2000 From: wadler@REDACTED (Philip Wadler) Date: Sun, 27 Feb 2000 09:10:31 -0500 Subject: ICFP 2000: new submission deadline Message-ID: <200002271410.JAA03341@nslocum.cs.bell-labs.com> In order to maintain the same deadline as our sister conference PPDP, we are postponing our submission deadline by two weeks. Our apologies for the change. ICFP 2000: International Conference on Functional Programming Montreal, Canada; 18--20 September 2000 (associated with PLI 2000/PPDP 2000) NEW SUBMISSION DEADLINE: 13.00 EST (18.00 UTC), 15 MARCH 2000 (previously 13.00 EST, 1 March 2000) http://www.cs.bell-labs.com/~wadler/icfp2000 Call and submission details online From shrogers@REDACTED Mon Feb 28 04:43:35 2000 From: shrogers@REDACTED (Steven H. Rogers) Date: Sun, 27 Feb 2000 21:43:35 -0600 Subject: Erlang Versus Python References: <200002280232.UAA08086@node-03.advancenet.net> Message-ID: <38B9EEE7.1F6CB7C6@ionet.net> James Hague wrote: > > >Does anyone care to comment on the merits of Erlang relative to Python > >for a couple projects that I have in mind? > > It's more a question of which language you get along with best. I think > everyone here would choose Erlang (myself included), but depending on > your background you might find Python easier to wrap your mind around. I knew that I wouldn't get an unbiased sample of opinion from this list, just a little additional insight into utility of the two languages for the problem domains that I mentioned. I'd expect that I could get prototypes working more quickly in Python, but that it would be easier to deliver robust, production systems in Erlang. I've been using mostly C/C++/Java the last few years, but have used APL and Scheme in the past, so I should be able to get my mind around either fairly well. Regards, Steve From scott@REDACTED Mon Feb 28 08:06:31 2000 From: scott@REDACTED (Scott Lystig Fritchie) Date: Mon, 28 Feb 2000 01:06:31 -0600 Subject: Usage of BIF port_control/3? Message-ID: <200002280706.BAA58606@snookles.snookles.com> I hope this isn't a "I didn't dig quite deep enough" question... ... I'm experimenting with the BIF port_control/3. One of the very few examples I can find is in inet.erl:ctl_getstat/2, which seems pretty straightforward. So I'm trying something like this: sync_cmd2(Port, Cmd, Bytes, Rep) -> case catch port_control(Port, Cmd, Bytes) of {'EXIT', _Stuff} -> io:format("XXX sync_cmd2 err clause 1\n"), {error, einval}; [Rep|Data] -> {ok, Data}; _Error -> io:format("XXX sync_cmd2 err clause 3: ~w\n", [_Error]), {error, einval} end. But it doesn't work. All I get are matches in clause 3, _Error = [], which causes my experiment to reimplement inet:ll_name/1 to barf. ll_name(Inet) -> case sync_cmd2(Inet, ?INET_REQ_NAME, [], ?INET_REP_NAME) of {ok, [P1, P0 | Addr]} -> {ok, { bytes_to_ip(Addr), ?u16(P1, P0) }}; Error -> Error end. If sync_cmd2(Port, Cmd, Bytes, Rep) starts out as -> Port ! {self(), {command, [Cmd|Bytes]}}, receive {Port, {data, [Rep|T]}} -> {ok, T}; %% ... and so on.... ... then it works. Also, if I use sync_cmd2(Port, Cmd, Bytes, Rep) -> port_command(Port, [Cmd|Bytes]), receive {Port, {data, [Rep | T]}} -> {ok, T}; %% ... and so on.... ... it also works. Am I overlooking something simple? -Scott From mbj@REDACTED Mon Feb 28 08:13:33 2000 From: mbj@REDACTED (Martin Bjorklund) Date: Mon, 28 Feb 2000 08:13:33 +0100 Subject: user_default In-Reply-To: Your message of "Fri, 25 Feb 2000 22:22:25 +0100" <20000225222225U.mbj@bluetail.com> References: <20000225222225U.mbj@bluetail.com> Message-ID: <20000228081333Z.mbj@bluetail.com> Martin Bjorklund wrote: > o did you like the old c() better? ^^^ Of course, that should be i() - display process info. ?mbj From jhague@REDACTED Mon Feb 28 03:34:13 2000 From: jhague@REDACTED (James Hague) Date: Sun, 27 Feb 00 20:34:13 -0600 Subject: Erlang Versus Python Message-ID: <200002280232.UAA08086@node-03.advancenet.net> >Does anyone care to comment on the merits of Erlang relative to Python >for a couple projects that I have in mind? It's more a question of which language you get along with best. I think everyone here would choose Erlang (myself included), but depending on your background you might find Python easier to wrap your mind around. From peter@REDACTED Mon Feb 28 09:15:54 2000 From: peter@REDACTED (Peter H|gfeldt) Date: Mon, 28 Feb 2000 09:15:54 +0100 (MET) Subject: Usage of BIF port_control/3? In-Reply-To: <200002280706.BAA58606@snookles.snookles.com> Message-ID: On Mon, 28 Feb 2000, Scott Lystig Fritchie wrote: > I hope this isn't a "I didn't dig quite deep enough" question... > > ... I'm experimenting with the BIF port_control/3. One of the very > few examples I can find is in inet.erl:ctl_getstat/2, which seems > pretty straightforward. So I'm trying something like this: > > sync_cmd2(Port, Cmd, Bytes, Rep) -> > case catch port_control(Port, Cmd, Bytes) of > {'EXIT', _Stuff} -> io:format("XXX sync_cmd2 err clause 1\n"), > {error, einval}; > [Rep|Data] -> {ok, Data}; > _Error -> io:format("XXX sync_cmd2 err clause 3: ~w\n", [_Error]), > {error, einval} > end. > > But it doesn't work. All I get are matches in clause 3, _Error = [], > which causes my experiment to reimplement inet:ll_name/1 to barf. > > ll_name(Inet) -> > case sync_cmd2(Inet, ?INET_REQ_NAME, [], ?INET_REP_NAME) of > {ok, [P1, P0 | Addr]} -> > {ok, { bytes_to_ip(Addr), ?u16(P1, P0) }}; > Error -> Error > end. > > If sync_cmd2(Port, Cmd, Bytes, Rep) starts out as -> > Port ! {self(), {command, [Cmd|Bytes]}}, > receive > {Port, {data, [Rep|T]}} -> {ok, T}; > %% ... and so on.... > > ... then it works. Also, if I use sync_cmd2(Port, Cmd, Bytes, Rep) -> > port_command(Port, [Cmd|Bytes]), > receive > {Port, {data, [Rep | T]}} -> {ok, T}; > %% ... and so on.... > > ... it also works. Am I overlooking something simple? > > -Scott > Port ! {self(), {command, Bytes}} and port_command(Port, Bytes) are equivalent, except that the second one can be used by any process, not only the port controller. The port_control/3 BIF only works for drivers that have implemented the control() function (see erl_driver.h for the ANSI prototype). The file crypto.erl in the Crypto application uses port_control/3 for the driver crypto_drv (see crypto_drv.c). Please, have a look. /Peter Peter H?gfeldt, e-mail : peter@REDACTED Open Telecom Platform From scott@REDACTED Mon Feb 28 09:23:58 2000 From: scott@REDACTED (Scott Lystig Fritchie) Date: Mon, 28 Feb 2000 02:23:58 -0600 Subject: Usage of BIF port_control/3? In-Reply-To: Message of "Mon, 28 Feb 2000 09:15:54 +0100." Message-ID: <200002280823.CAA59284@snookles.snookles.com> >>>>> "ph" == Peter H|gfeldt writes: ph> The port_control/3 BIF only works for drivers that have ph> implemented the control() function (see erl_driver.h for the ANSI ph> prototype). Silly me. I should've looked at that. I now understand why I wasn't getting the results I was expecting: the control function is only partially implemented: static int inet_ctl(inet_descriptor* desc, int cmd, char* buf, int len, char** res_buf, int res_size) { switch (cmd) { case INET_REQ_GETSTAT: { /* only option avail now */ char* dst; int dstlen = len*5 + 1; /* resulting length */ if (dstlen > INET_MAX_BUFFER) /* sanity check */ return 0; if (dstlen > res_size) { if ((dst = (char*) ALLOC(dstlen)) == NULL) return 0; *res_buf = dst; /* call will free this buffer */ } else dst = *res_buf; /* ok we fit in buffer given */ return inet_fill_stat(desc, buf, len, dst); } default: return 0; } } Foo on me for assuming it would be fully implemented. :-) Many thanks! -Scott From scott@REDACTED Mon Feb 28 09:31:51 2000 From: scott@REDACTED (Scott Lystig Fritchie) Date: Mon, 28 Feb 2000 02:31:51 -0600 Subject: Usage of BIF port_control/3? In-Reply-To: Message of "Mon, 28 Feb 2000 09:15:54 +0100." Message-ID: <200002280831.CAA59342@snookles.snookles.com> Gack! I wanted to include something else in my last message. {sigh} My colleagues joke that I live in Hawaii's time zone, not Minnesota's, but I guess it's getting late. The reason for my experimentation is that I'm working on a project where, under high workloads, inet:sockname/1 appears to block forever. It doesn't make much sense, but it's happening. (Stuck in inet:call/2.) I can't tell if it's a weird race condition where the socket closes at just the right time during the call, or if it's something completely different. So I've been mucking this weekend with inet.erl and inet_drv to find the cause and/or a workaround..... FWIW, I'm using R6B under FreeBSD 3.3 and 3.4. It'll take some time before I can try to duplicate the problem under some flavor of Solaris/SPARC. -Scott --- Scott Lystig Fritchie, 5401 - 10th Ave S, Minneapolis, MN 55417 USA Professional Governing: Is It Faked? From etxuwig@REDACTED Mon Feb 28 11:57:39 2000 From: etxuwig@REDACTED (Ulf Wiger) Date: Mon, 28 Feb 2000 11:57:39 +0100 (MET) Subject: Usage of BIF port_control/3? Message-ID: <200002281057.LAA10970@etxb.ericsson.se> > From: Scott Lystig Fritchie > To: erlang-questions@REDACTED > Subject: Re: Usage of BIF port_control/3? > Date: Mon, 28 Feb 2000 02:31:51 -0600 > > Gack! I wanted to include something else in my last message. {sigh} > My colleagues joke that I live in Hawaii's time zone, not Minnesota's, > but I guess it's getting late. > > The reason for my experimentation is that I'm working on a project > where, under high workloads, inet:sockname/1 appears to block forever. > It doesn't make much sense, but it's happening. (Stuck in > inet:call/2.) Scott, There are problems in inet.erl, and the OTP group is working on a fix. We have encountered similar problems. Our mail exchange with support was in Swedish, but basically: >From inet.erl: 256: call(Socket, Request) when record(Socket, socket) -> 257: Tag = make_ref(), 258: Pid = Socket#socket.pid, 259: Pid ! {call, self(), Tag, Request}, 260: receive 261: {Tag, Reply} -> Reply; 262: {'EXIT', Pid, Reason} -> 263: {error, closed}; 264: {tcp_closed, Socket} -> 265: {error, closed}; 266: {udp_closed, Socket} -> 267: {error, closed} 268: end. Since there is neither a timeout nor a monitor on the socket process. The controlling process is linked to the socket process but any other process trying to talk to the socket may hang forever. Unless you have the very latest patch (don't even know if there is one for Open Source Erlang yet -- we use commercial OTP R5B), you may run into this problem. There are other problems as well, for example in gen_tcp.erl: controlling_process(S, NewOwner) when record(S,socket),pid(NewOwner) -> case call(S, {set_owner, NewOwner}) of ok -> sync_input(S, NewOwner), S#socket.pid ! {commit_owner, NewOwner}, receive {owner, NewOwner} -> ok end; Error -> Error end. The receiver of the {commit_owner, NewOwner} message links itself to the process calling controlling_process/2, so if the socket pid has died, there will be an infinite wait (no link, monitor, or timeout guarding the dialog.) Perhaps your problems with inet are of this nature? /Uffe Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From jamesh@REDACTED Mon Feb 28 17:50:25 2000 From: jamesh@REDACTED (James Hague) Date: Mon, 28 Feb 2000 10:50:25 -0600 Subject: Roadmap for future releases? Message-ID: <3.0.32.20000228105025.00d5e908@volition-inc.com> There are some significant features which have been talked about for some time which haven't shown up in an official OTP release yet: * Abstract syntax patterns as a replacement for records. * Pattern matching on binaries (Klacke's scheme). Are either of these in development or were they simply proposals that never came to fruition? What else is slated for R7? James From pan@REDACTED Mon Feb 28 21:01:44 2000 From: pan@REDACTED (Patrik Nyblom) Date: Mon, 28 Feb 2000 21:01:44 +0100 Subject: Roadmap for future releases? References: <3.0.32.20000228105025.00d5e908@volition-inc.com> Message-ID: <38BAD428.A36EC2D8@erix.ericsson.se> Hi, Here's some answers, althogh maybe not the final ones... James Hague wrote: > There are some significant features which have been talked about for some > time which haven't shown up in an official OTP release yet: > > * Abstract syntax patterns as a replacement for records. We have had a master thesis "worker" on that, and it was implemented, but not really usable as long as the compiler cannot inline across module boundaries (which is a *big* thing to implement). Performance was everything but good. The idea is really good though, so it's not dropped, but probably nothing for R7. > > * Pattern matching on binaries (Klacke's scheme). > Pattern matching for binaries will (if nothing very strange happens) be included in R7, as well as binary construction using similar syntax. The syntax, as well as some semantics will however be somewhat different from Klackes/Tonys proposal and prototype implementation. > Are either of these in development or were they simply proposals that never > came to fruition? > > What else is slated for R7? Well, the binary syntax IS (as I see it) the most interesting new feature in R7, some of the other things we hope to be able to put into R7 include a new improved compiler (thats for sure), tracing improvements, new/improved Corba functionality and (probaly) a new COM interface on Windows. There is of course more than that, but thats what I (personally) see as the highlights. > > > James /Patrik From sallach@REDACTED Mon Feb 28 21:45:17 2000 From: sallach@REDACTED (David Sallach) Date: Mon, 28 Feb 2000 14:45:17 -0600 Subject: Erlang AI? Message-ID: <200002282046.OAA02910@allman.src.uchicago.edu> I greatly appreciate Erlang's combination of a symbolic language with enterprise virtues (robustness, concurrency, etc.). Most of the documents and discussion I've seen tend to emphasize the latter. Are there Erlang AI libraries, or open source Erlang AI projects? David Sallach From jhague@REDACTED Tue Feb 29 03:15:01 2000 From: jhague@REDACTED (James Hague) Date: Mon, 28 Feb 00 20:15:01 -0600 Subject: Roadmap for future releases? Message-ID: <200002290213.UAA21723@node-03.advancenet.net> >Pattern matching for binaries will (if nothing very strange happens) be >included in R7, as well as binary construction using similar syntax. Great news! Thanks for taking the time to respond. James From jhague@REDACTED Tue Feb 29 03:17:32 2000 From: jhague@REDACTED (James Hague) Date: Mon, 28 Feb 00 20:17:32 -0600 Subject: Erlang AI? Message-ID: <200002290216.UAA27333@node-02.advancenet.net> > I greatly appreciate Erlang's combination of a symbolic language with >enterprise virtues (robustness, concurrency, etc.). Most of the documents >and discussion I've seen tend to emphasize the latter. Are there Erlang AI >libraries, or open source Erlang AI projects? IMO Erlang is the best functional language for AI work, because of atoms and dynamic typing. It should be relatively easy to convert most any program in Norvig's _Paradigms of Artificial Intelligence Programming_ to Erlang. I've been meaning to try a few, but I haven't had the time. I'm still grinding out C++ code at a furious pace during the day, unfortunately :) James From crd@REDACTED Tue Feb 29 16:00:11 2000 From: crd@REDACTED (Craig Dickson) Date: Tue, 29 Feb 2000 07:00:11 -0800 Subject: Erlang AI? References: <200002290216.UAA27333@node-02.advancenet.net> Message-ID: <004401bf82c5$b18ded60$6f01140a@inkpad> James Hague wrote: > IMO Erlang is the best functional language for AI work, because of atoms > and dynamic typing. Scheme has both those properties, plus the ability to manipulate code as data, which I would think terribly useful for AI. Why is Erlang a better language for AI than Scheme? (I suppose Erlang's concurrency might be helpful.) > I'm still grinding out C++ code at a furious pace during the day, > unfortunately :) Me too (sigh). Any Erlang jobs in Silicon Valley? Craig From gandalf@REDACTED Tue Feb 29 22:23:36 2000 From: gandalf@REDACTED (Vladimir Ulogov) Date: Tue, 29 Feb 2000 16:23:36 -0500 Subject: Erlang Versus Python References: <200002280232.UAA08086@node-03.advancenet.net> <38B9EEE7.1F6CB7C6@ionet.net> Message-ID: <38BC38D8.756AA7BB@control.att.com> In my humble opinion it is no way to compare Erlang and Python. This is absolutely different languages. The key points are: - Python is OO dynamic language, Erlang - functional; - Python is not message oriented, Erlang is; - Python is not multi(task/threaded) initially. The fork() and thread package are supported not on all ports, The task are one of atomic types in Erlang; - Python internally do not have any network support, the CORBA/ILU/socket modules are system dependent, the no standard ways to connect to Python worlds over net (it's a couple libraries on the net, but none is a standard de-facto), the socket module presents on most platforms but you are having raw socket interface a-la old-good Unix and should take care about everything youself, Erlang - .... is; - Distributed database in the standard Python distribution ... what are you talking about, Erlang - having mnesia; What's good in Python and Erlang doesn't having: - Easy access to the module internals (functions, classes, variables); - On-fly compilation (if the source was changed, the python going to recompile bytecode itself). This is really nice but dangerous feature, if the updated module contains bugs, all system are going to crash; - Half automated way to create extension modules on C/C++ using swig, IG are very complicated for the most developers. - Easy pipes. If I'm spawning some task using popen I'm having as much instances as I'd spawn those tasks. In the Erlang open_port with the same portname means the same port (please correct me if I'm wrong), os:cmd(unix:cmd) also non-parallel if spawned from the different tasks. - It's possible to load module in the "private" space. In the Erlang, all available modules are global (correct me if I'm wrong) And this list are close to be infinite list :), So, the briefly speaking: - Python: Object Oriented general purpose dynamic interpreted language, well ported (even for DOS and Vax/VMS), having lot of network oriende modules/ GUI toolkits/ database connectors. Easy to extended with C/C++, SWIG extention available; - Erlang: functional development environment, with nice network capabilities, standard database and GUI, nice embedded possibilities for distributed computation. Pretty difficult to extend on C/C++. -- %% Vladimir I. Ulogov (gandalf@REDACTED) AT&T Labs "Where lands meets water. Where earth meets air. Where body meets mind. Where space meets time. We like to be on one side, and look at the other." D.Adams "Mostly harmless" From gandalf@REDACTED Tue Feb 29 23:06:03 2000 From: gandalf@REDACTED (Vladimir Ulogov) Date: Tue, 29 Feb 2000 17:06:03 -0500 Subject: Parttern matching in mnesia Message-ID: <38BC42CB.9587A504@control.att.com> Hello folks, Can somebody submit the samples for strings lookup in the mnesia table which will perform similar to 'LIKE' operator in SQL. Another word, how to construct operator like 'SELECT * FROM table WHERE str_field LIKE "%abc%' (lookup all str_filed which _contain_ "abc") using Mnesia/Mnemosyne -- %% Vladimir I. Ulogov (gandalf@REDACTED) AT&T Labs "Where lands meets water. Where earth meets air. Where body meets mind. Where space meets time. We like to be on one side, and look at the other." D.Adams "Mostly harmless" From gandalf@REDACTED Tue Feb 29 23:51:22 2000 From: gandalf@REDACTED (Vladimir Ulogov) Date: Tue, 29 Feb 2000 17:51:22 -0500 Subject: How to add db node dynamicaly Message-ID: <38BC4D6A.138239EF@control.att.com> Hello folks, another mnesia question: How to add new db node and populate database from the existing ones. As sample, I'm having two database nodes and wants to add new one. Is any standard way to add a new db node without stopping existing nodes? Is any db syncronisation tools for mnesia (something more complicated and flexible then just copying of the *.DAT files) -- %% Vladimir I. Ulogov (gandalf@REDACTED) AT&T Labs "Where lands meets water. Where earth meets air. Where body meets mind. Where space meets time. We like to be on one side, and look at the other." D.Adams "Mostly harmless"