From icimjs@REDACTED Mon Feb 1 07:12:29 1999 From: icimjs@REDACTED (Elan) Date: Sun, 31 Jan 1999 22:12:29 -0800 Subject: Erlang, the mathematician? Message-ID: <3.0.5.32.19990131221229.008b8200@pop.loop.com> Hi, just out of curiosity, was Erlang named for the Danish mathematician Agner Krarup Erlang? TIA, Elan From joe@REDACTED Mon Feb 1 08:28:44 1999 From: joe@REDACTED (Joe Armstrong) Date: Mon, 1 Feb 1999 08:28:44 +0100 (MET) Subject: Erlang, the mathematician? In-Reply-To: <3.0.5.32.19990131221229.008b8200@pop.loop.com> Message-ID: > Hi, > > just out of curiosity, was Erlang named for the Danish mathematician Agner > Krarup Erlang? > > TIA, > > Elan > > Yes -- Joe Armstrong Computer Science Laboratory +46 8 719 9452 AT2/ETX/DN/SU Ericsson Telecom SE-126 25 Stockholm Sweden joe@REDACTED http://www.ericsson.se/cslab/~joe From mike@REDACTED Mon Feb 1 09:53:23 1999 From: mike@REDACTED (Michael C Williams) Date: Mon, 1 Feb 1999 09:53:23 +0100 (MET) Subject: Erlang, the mathematician? In-Reply-To: <3.0.5.32.19990131221229.008b8200@pop.loop.com> Message-ID: Yes! His work is widely used as a basis for traffic calulations in the Telcom area and as Ericsson is a telecom company the name seems apropriate. That doesn't mean that erlang is a telecom language though, it has been used in all sorts of applications. /Mike On Sun, 31 Jan 1999, Elan wrote: > Hi, > > just out of curiosity, was Erlang named for the Danish mathematician Agner > Krarup Erlang? > > TIA, > > Elan > > From crd@REDACTED Mon Feb 1 15:20:24 1999 From: crd@REDACTED (Craig Dickson) Date: Mon, 1 Feb 1999 06:20:24 -0800 Subject: Erlang, the mathematician? Message-ID: <001f01be4dee$04d6e520$6e02a8c0@crd.int2.inversenet.com> Joe Armstrong wrote: >> just out of curiosity, was Erlang named for the Danish mathematician Agner >> Krarup Erlang? > > Yes The language spec says this, and I don't doubt it, but I've always suspected a secondary meaning in the name: a contraction of the phrase "ERiccson LANGuage". Is this just coincidental, or was anyone actually thinking this at the time? Craig From bjarne@REDACTED Mon Feb 1 18:05:00 1999 From: bjarne@REDACTED (Bjarne =?iso-8859-1?Q?D=E4cker?=) Date: Mon, 01 Feb 1999 18:05:00 +0100 Subject: Erlang, the mathematician? References: <001f01be4dee$04d6e520$6e02a8c0@crd.int2.inversenet.com> Message-ID: <36B5DEBC.5C654A4A@erix.ericsson.se> Craig Dickson wrote: > > Joe Armstrong wrote: > > >> just out of curiosity, was Erlang named for the Danish mathematician > >> Agner Krarup Erlang ? > > > > Yes > > The language spec says this, and I don't doubt it, but I've always suspected > a secondary meaning in the name: a contraction of the phrase "ERicsson > LANGuage". Is this just coincidental, or was anyone actually thinking this > at the time ? Yes, indeed, we were very pleased with ourselves for having thought of such a good pun. Lately, however, we downplay the Ericsson aspect. Best regards, Bjarne From joe@REDACTED Mon Feb 1 22:11:58 1999 From: joe@REDACTED (Joe Armstrong) Date: Mon, 1 Feb 1999 22:11:58 +0100 (MET) Subject: Erlang, the mathematician? In-Reply-To: <001f01be4dee$04d6e520$6e02a8c0@crd.int2.inversenet.com> Message-ID: On Mon, 1 Feb 1999, Craig Dickson wrote: > Joe Armstrong wrote: > > >> just out of curiosity, was Erlang named for the Danish mathematician > Agner > >> Krarup Erlang? > > > > Yes > > The language spec says this, and I don't doubt it, but I've always suspected > a secondary meaning in the name: a contraction of the phrase "ERiccson > LANGuage". Is this just coincidental, or was anyone actually thinking this > at the time? > > Craig > 'Cor blimy - strike a duck - wot a coincidence ! "no comment" /Joe -- Joe Armstrong Computer Science Laboratory +46 8 719 9452 AT2/ETX/DN/SU Ericsson Telecom SE-126 25 Stockholm Sweden joe@REDACTED http://www.ericsson.se/cslab/~joe From joe@REDACTED Mon Feb 1 22:15:29 1999 From: joe@REDACTED (Joe Armstrong) Date: Mon, 1 Feb 1999 22:15:29 +0100 (MET) Subject: Erlang, the mathematician? In-Reply-To: <36B5DEBC.5C654A4A@erix.ericsson.se> Message-ID: > Yes, indeed, we were very pleased with ourselves > for having thought of such a good pun. Lately, > however, we downplay the Ericsson aspect. > > Best regards, > > Bjarne > Shhhhhhhh - people might be listening (trade secrets, industrial espionage, Nokia, Lucent ......) /Joe From svg@REDACTED Tue Feb 2 22:06:42 1999 From: svg@REDACTED (Vladimir Sekissov) Date: Wed, 3 Feb 1999 02:06:42 +0500 Subject: Possible bug? Message-ID: Good day. I installed and now use Open source Erlang, but then I am trying to compile code this letters others than ASCII(I'm a russian man) in atoms or strings I get compilation error. In interpreter the same code works fine without errors. My current environment is : Red Hat Linux 5.2(Intel). Erlang-47.4.0 . Regards. --- Vladimir Sekissov svg@REDACTED From klacke@REDACTED Wed Feb 3 09:25:20 1999 From: klacke@REDACTED (Claes Wikstrom) Date: Wed, 3 Feb 1999 09:25:20 +0100 (MET) Subject: Possible bug? In-Reply-To: References: Message-ID: <14008.2032.691274.428837@gin> Vladimir Sekissov writes: > Good day. > > I installed and now use Open source Erlang, but then I am trying to compile > code this letters others than ASCII(I'm a russian man) in atoms or > strings I get compilation error. > > In interpreter the same code works fine without errors. > Basically Erlang doesn't really support anything but plain ascii today. However the usage of non-ascii characters should not lead to compile time errors, only to ugly printouts. -module(a). -compile(export_all). a() -> "?????". This is supposed to be a string with swedish characters, see we also have non-ascii chars. I hope this shows up ok in your mailreader ...., Hmmmm ... mail .... another system with far from perfect non-ascii support. 1> c(a). {ok,a} 2> a:a(). "\345\344\344\344\344" /klacke From per@REDACTED Wed Feb 3 09:50:16 1999 From: per@REDACTED (Per Hedeland) Date: Wed, 3 Feb 1999 09:50:16 +0100 (MET) Subject: Possible bug? Message-ID: <199902030850.JAA05404@super.du.etx.ericsson.se> Klacke wrote: >Basically Erlang doesn't really support anything but plain ascii >today. However the usage of non-ascii characters should not >lead to compile time errors, only to ugly printouts. Actually, if you (on Solaris) set environment LANG=sv, or LC_CTYPE=iso_8859_1, your example produces a perfectly beautiful printout: 1> a:a(). "?????" I.e. Erlang uses the standardized isprint() etc functions, whose behaviour, assuming you have called the standardized setlocale() function properly (which Erlang does), is supposed to depend on the standardized environment variables LANG, LC_CTYPE, etc. Unfortunately the *values* of those variables aren't standardized:-(, you'll have to check your OS documentation to see what it wants/supports. (On Solaris some documentation can be found in setlocale(3C) and friends, but I believe you have to go hunting in the filesystem (/usr/lib/locale) to find the actual values.) --Per Hedeland per@REDACTED PS Other things (outside Erlang) may "break" in particular if you set LANG, e.g. floating point numbers, dates, error messages, etc may start to get printed in funny ways that the standardization bodies think you want - I guess some would call this a "feature" - oh well...:-) From klacke@REDACTED Wed Feb 3 10:10:44 1999 From: klacke@REDACTED (Claes Wikstrom) Date: Wed, 3 Feb 1999 10:10:44 +0100 (MET) Subject: Possible bug? In-Reply-To: <199902030850.JAA05404@super.du.etx.ericsson.se> References: <199902030850.JAA05404@super.du.etx.ericsson.se> Message-ID: <14008.4756.907255.530178@gin> Per Hedeland writes: > Klacke wrote: > >Basically Erlang doesn't really support anything but plain ascii > >today. However the usage of non-ascii characters should not > >lead to compile time errors, only to ugly printouts. > > Actually, if you (on Solaris) set environment LANG=sv, or > LC_CTYPE=iso_8859_1, your example produces a perfectly beautiful > printout: > > 1> a:a(). > "?????" On the other hand, if we try to use non-ascii chracters in i.e function names, it still doesn't work as expected. -module(a). ?????() -> a. Does indeed give a compile time error. Sadly enough we need to qoute the function name (which is an atom) '?????'() -> a. And now it get so ugly so that in my opinion it's better to stick with ascii-chars in the source code. /klacke From ulf.wiger@REDACTED Wed Feb 3 11:11:44 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Wed, 03 Feb 1999 11:11:44 +0100 Subject: Possible bug? References: <199902030850.JAA05404@super.du.etx.ericsson.se> Message-ID: <36B820E0.F769C800@etxb.ericsson.se> Per Hedeland wrote: > > Klacke wrote: > >Basically Erlang doesn't really support anything but plain ascii > >today. However the usage of non-ascii characters should not > >lead to compile time errors, only to ugly printouts. > > Actually, if you (on Solaris) set environment LANG=sv, or > LC_CTYPE=iso_8859_1, your example produces a perfectly beautiful > printout: > > 1> a:a(). > "?????" > > I.e. Erlang uses the standardized isprint() etc functions, whose > behaviour, assuming you have called the standardized setlocale() > function properly (which Erlang does), is supposed to depend on the > standardized environment variables LANG, LC_CTYPE, etc. Unfortunately > the *values* of those variables aren't standardized:-(, you'll have to > check your OS documentation to see what it wants/supports. > > (On Solaris some documentation can be found in setlocale(3C) and > friends, but I believe you have to go hunting in the filesystem > (/usr/lib/locale) to find the actual values.) > > --Per Hedeland > per@REDACTED > > PS Other things (outside Erlang) may "break" in particular if you set > LANG, e.g. floating point numbers, dates, error messages, etc may start > to get printed in funny ways that the standardization bodies think you > want - I guess some would call this a "feature" - oh well...:-) -- 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 ulf.wiger@REDACTED Wed Feb 3 11:14:16 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Wed, 03 Feb 1999 11:14:16 +0100 Subject: Possible bug? References: <199902030850.JAA05404@super.du.etx.ericsson.se> Message-ID: <36B82178.49B8F89E@etxb.ericsson.se> Per Hedeland wrote: > > PS Other things (outside Erlang) may "break" in particular if you set > LANG, e.g. floating point numbers, dates, error messages, etc may start > to get printed in funny ways that the standardization bodies think you > want - I guess some would call this a "feature" - oh well...:-) You should be able to avoid that by setting the desired environment variable in Erlang only: gandalf 10> erl -boot start_clean Erlang (JAM) emulator version 4.7.3.4 Eshell V4.7.3.4 (abort with ^G) 1> a:a(). "\345\344\366" gandalf 11> erl -boot start_clean -env LANG sv Erlang (JAM) emulator version 4.7.3.4 Eshell V4.7.3.4 (abort with ^G) 1> a:a(). "???" (There is also an Erlang function, os:getenv(Var), which returns the value of an OS environment variable.) /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 rv@REDACTED Wed Feb 3 12:01:29 1999 From: rv@REDACTED (Robert Virding) Date: Wed, 03 Feb 1999 12:01:29 +0100 Subject: Possible bug? In-Reply-To: Your message of "Wed, 03 Feb 1999 10:10:44 +0100." <14008.4756.907255.530178@gin> Message-ID: <199902031101.MAA22836@renat.du.etx.ericsson.se> Claes Wikstrom writes: >On the other hand, if we try to use non-ascii chracters in >i.e function names, it still doesn't work as expected. > >-module(a). > >?????() -> > a. > >Does indeed give a compile time error. Sadly enough we need to >qoute the function name (which is an atom) > >'?????'() -> > a. > >And now it get so ugly so that in my opinion it's better to stick >with ascii-chars in the source code. I am just installing a modification to Erlang/OTP (the non Open source) which modifies the Erlang syntax to use the full ISO 8859/1 (Latin-1) character set. This means that atoms and variables will be able to use characters like those above without quoting. This modification should migrate to OSE relatively quickly. Unfortunately this will be only Latin-1 so I am not sure how this will work with other character sets. If they have uppercase and lowercase characters in the same positions it should work, but I don't know if this is the case. Sometime in the future it is suggested that we will use Unicode but don't hold your breath. Robert From ulf.wiger@REDACTED Wed Feb 3 18:58:28 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Wed, 03 Feb 1999 18:58:28 +0100 Subject: bugs in gridfile Message-ID: <36B88E44.9F40D90E@etxb.ericsson.se> I have discovered that the gridfile (multi-key access) I posted on www.erlang.org has some faults in it. The split/merge algorithm was not correctly implemented, and the next/previous operations do not work right. I have fixed the split/merge problem and have figured out how to do the next/previous. I will post a new version real soon. If anyone is using the current version, or wants to start now, contact me for an early copy. I have also made a RAM-based version, which I will also post. It is actually pretty fast: Rough performance measurements (1000 objects, 3 dimensions) indicate: - insert: ca 500 us/object - lookup: ca 250 us/object - delete: ca 300 us/object - match: ca 80 ms matching 100/1000 objs (whole table scanned) - range_match: ca 3.6 ms for a search matching 20 objects -> roughly 150-200 us/(matching object) The above measurements where taken on an UltraSPARC 1 running BEAM on Solaris. - Each object had a payload of lists:seq(1,100). - Keys were composed as {1..10,1..10,1..10} and inserted in pseudo-random order. The disk-based variant, gridfile.erl, sped up as well when I got the split/merge to work better. /Uffe -- Ulf Wiger, Chief Designer AXD 301 Ericsson Telecom AB tfn: +46 8 719 81 95 Varuv?gen 9, ?lvsj? mob: +46 70 519 81 95 S-126 25 Stockholm, Sweden fax: +46 8 719 43 44 From icimjs@REDACTED Thu Feb 4 08:32:01 1999 From: icimjs@REDACTED (Elan) Date: Wed, 03 Feb 1999 23:32:01 -0800 Subject: inets Message-ID: <3.0.5.32.19990203233201.007e5890@pop.loop.com> Hi, I'm trying to start up inets under FreeBSD 2.2.6. I get the following erl_crash.dump >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Wed Feb 3 23:28:55 1999 Slogan: could not start kernel pid (application_controller) () Erlang (JAM) emulator version 47.4.0 Compiled on Wed Feb 3 22:42:26 1999 Process Information -------------------------------------------------- <0.0.0> Running. Registered as: init Spawned as: init:boot/1 Current call: init:crash/2 Message queue: [{'EXIT',<0.1.0>,killed}] Reductions=1450 stack=231 heap=6765 old_heap_sz=6765 Heap unused=5484 OldHeap unused=6765 -------------------------------------------------- Port Information -------------------------------------------------- Internal Table Information -------------------------------------------------- Hash Table(atom_tab), size(1201), used(810), objs(1336), depth(6) Index Table(atom_tab), size(1400), limit(65536), used(1336), rate(100) Atom space 10794/32772 Hash Table(module_code), size(47), used(16), objs(19), depth(2) Index Table(module_code), size(50), limit(65536), used(19), rate(10) Hash Table(export_list), size(397), used(265), objs(443), depth(5) Index Table(export_list), size(500), limit(65536), used(443), rate(100) Hash Table(process_reg), size(5), used(1), objs(1), depth(1) Allocated binary 27587 Allocated by process_desc 5040 Allocated by proc_bin_desc 400 Allocated by table_desc 0 Allocated by link_desc 320 Allocated by atom_desc 26800 Allocated by export_desc 12880 Allocated by module_desc 640 Allocated by preg_desc 320 -------------------------------------------------- Distribution Information Not alive Loaded Modules Information -------------------------------------------------- init 7438 erl_prim_loader 4556 Totals. Current code = 11994 Old code = 0 -------------------------------------------------- <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< I have created a file called inets.conf and saved it in the inets directory. (I saved the same file to inets/ebin just to be sure.) This file contains the following: >>>>>>>>>>>>>>>>>>>>>>>>> [{inets, [{services, [{httpd,"/var/tmp/server_root/conf/8888.conf"}, {httpd,"/var/tmp/server_root/conf/8080.conf"}]}]}]. <<<<<<<<<<<<<<<<<<<<<<<<<< I have also copied the server_root directory to /var/tmp/... according to the inets manual. Any ideas? TIA, Elan From mattias@REDACTED Thu Feb 4 10:01:05 1999 From: mattias@REDACTED (Mattias Nilsson) Date: Thu, 04 Feb 1999 10:01:05 +0100 Subject: inets Message-ID: <36B961D1.F57BBA54@erix.ericsson.se> Elan wrote: > > Hi, > > I'm trying to start up inets under FreeBSD 2.2.6. > > I get the following erl_crash.dump Could you also tell me how you started it, e.g did you start it from the command line using the -s option or did you start it from the shell using inets:start("configfile") or did you use application:start(inets) ? > > I have created a file called inets.conf and saved it in the inets > directory. (I saved the same file to inets/ebin just to be sure.) This file > contains the following: > > >>>>>>>>>>>>>>>>>>>>>>>>> > [{inets, > [{services, [{httpd,"/var/tmp/server_root/conf/8888.conf"}, > {httpd,"/var/tmp/server_root/conf/8080.conf"}]}]}]. > <<<<<<<<<<<<<<<<<<<<<<<<<< This file should be called inets.config. You should review your 8888.conf and 8080.conf files aswell, as theese are the real configuration files. > I have also copied the server_root directory to /var/tmp/... > > according to the inets manual. This should atleast be correct. -- Best Regards, Mattias Nilsson Ericsson Telecom AB, OTP & Applied Research From icimjs@REDACTED Fri Feb 5 20:37:50 1999 From: icimjs@REDACTED (Elan) Date: Fri, 05 Feb 1999 11:37:50 -0800 Subject: Erlang & ncurses Message-ID: <3.0.5.32.19990205113750.009e0760@pop.loop.com> Hi, I believe I've seen a webpage advertising an Erlang interface to ncurses. However, I can't recall where. Anybody know about this? TIA, Elan p.s. (Mattias, sorry I sent this message to you be mistake!) From icimjs@REDACTED Fri Feb 5 20:39:27 1999 From: icimjs@REDACTED (Elan) Date: Fri, 05 Feb 1999 11:39:27 -0800 Subject: inets Message-ID: <3.0.5.32.19990205113927.009e0760@pop.loop.com> Hi, I think that perhaps the problems I'm having are due to my using FreeBSD 2.2.6. The Erlang port is from the FreeBSD 3.0 distribution. I hope to get my server updated soon and then (probably) it'll work fine. TIA, Elan From icimjs@REDACTED Fri Feb 5 20:40:51 1999 From: icimjs@REDACTED (Elan) Date: Fri, 05 Feb 1999 11:40:51 -0800 Subject: winsock library Message-ID: <3.0.5.32.19990205114051.007b8c30@pop.loop.com> Hi, where is the sockets library stored in the FreeBSD port of Erlang? I couldn't find it anywhere. TIA, Elan From Ruslan@REDACTED Fri Feb 5 20:53:13 1999 From: Ruslan@REDACTED (Ruslan Shevchenko) Date: Fri, 05 Feb 1999 21:53:13 +0200 Subject: winsock library References: <3.0.5.32.19990205114051.007b8c30@pop.loop.com> Message-ID: <36BB4C29.74FA6E70@Shevchenko.Kiev.UA> Elan wrote: > Hi, > > where is the sockets library stored in the FreeBSD port of Erlang? > > I couldn't find it anywhere. > currently FreeBSD port of erlang is only Erlang itself. port Erlang-libs will be aviable in near future, ( I want to post it this week-end) for now I reccomend simple untar libraries.tar.gz in work directory of the port, (i. e. in /usr/ports/lang/erlang/work/ .... /libraries) (after installing Erlanf itself) then cd /usr/ports/lang/erlang/work make install and libraries would be installed Best Regards > > TIA, > > Elan From tobbe@REDACTED Fri Feb 5 22:16:38 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Sat, 06 Feb 1999 08:16:38 +1100 Subject: Erlang & ncurses In-Reply-To: <3.0.5.32.19990205113750.009e0760@pop.loop.com> References: <3.0.5.32.19990205113750.009e0760@pop.loop.com> Message-ID: <199902052116.IAA00368@campari.serc.rmit.edu.au> > I believe I've seen a webpage advertising an Erlang interface to ncurses. > However, I can't recall where. Anybody know about this? Yes, look at: http://www.serc.rmit.edu.au/~tobbe/gdc/ It is an enhancement made to IG (the Interface Generator), which makes it possible to start an Erlang node from your C program and still make use of an IG interface. To show what you can do with this. I wrote a little program that shows how to interface the necessary parts of the curses library to (re-)implement the Great Digital Clock program in Erlang. Cheers /Tobbe From richard@REDACTED Sat Feb 6 22:45:26 1999 From: richard@REDACTED (Richard Emberson) Date: Sat, 6 Feb 1999 13:45:26 -0800 Subject: Java Platform Message-ID: <21D0E5B50012D211AB7D006008C025B60890A3@mail1.manage.com> Looking over the platforms supported by Erlang I was wonder if there was any thoughs about or an effort underway to make the Java Virtual Machine a supported platform. What are the issues involved with such a task. Thanks. Richard Emberson richard@REDACTED -------------- next part -------------- An HTML attachment was scrubbed... URL: From klacke@REDACTED Sun Feb 7 01:00:33 1999 From: klacke@REDACTED (Claes Wikstrom) Date: Sun, 7 Feb 1999 01:00:33 +0100 (MET) Subject: Java Platform In-Reply-To: <21D0E5B50012D211AB7D006008C025B60890A3@mail1.manage.com> References: <21D0E5B50012D211AB7D006008C025B60890A3@mail1.manage.com> Message-ID: <14012.55201.227509.815144@gin> Richard Emberson writes: > > Looking over the platforms supported by Erlang I was wonder if > there was any thoughs about or an effort underway to make > the Java Virtual Machine a supported platform. What are the issues > involved with such a task. > I think that Bogdan Hausman looked into this some time ago, the result was not all that good though, I would be a tremendous work just to get Erlang to run in a browser. I personally don't think it's worth the effort. Since java already runs nicely ... ehhhh in the browser, nobody needs erlang to write applets. Besides, the strengths of erlang are not necessarily the sort of applications that runs in a browser. As for java standalones, it better to run our own emulator. There was a UK based company (called Persimon) that did ML for the JVM, however they just recently gave up on that. If it was due to technical reasons or business reasons, we don't know. > What are the issues > involved with such a task. > Write an erlang compiler that emits JVM byte codes, Solve the problem with tail calls in JVM (hard) Interface all the java libs out there. /klacke From icimjs@REDACTED Mon Feb 8 08:47:23 1999 From: icimjs@REDACTED (Elan) Date: Sun, 07 Feb 1999 23:47:23 -0800 Subject: inets Message-ID: <3.0.5.32.19990207234723.01aa57c0@pop.loop.com> Hi, FreeBSD: 1. Where do I find the sockets library for Erlang? Background: After having compiled a) the Erlang base file under FreeBSD 3.0 and b) the libraries.tar.gz file I end up with a library that does not appear to contain a sockets library. (Or maybe I'm not looking in the right places for it.) If I try to run application:start(sockets). as described in the inets manual, I get an error saying: {error,{"no such file or directory","sockets.app"}}. 2. Where does the file inets.conf belong? Background: The inets manual describes a file inets.conf: "A minimal application config file (from now on referred to as inets.conf) starting two HTTP servers typically looks as follows: [{inets, [{services,[{httpd,"/var/tmp/server_root/conf/8888.conf"}, {httpd,"/var/tmp/server_root/conf/8080.conf"}]}]}]." However, it doesn't state where the inets.conf should be stored. (Or I haven't been able to find where these instructions are given.) 3. I continue the example a) without having started sockets, b) without inets.conf c) having however copied the examples/server_root directory to /var/tmp/... - as instructed in the manual - and - having run application:start(inets). - I try to run start/0, which results in an error: 6> inets:start(). ** exited: {undef,{inets,start,[]}} ** 4. I then try running start/1 2> inets:start("/var/tmp/server_root/conf/8888.conf"). ** exited: {undef,{inets,start,["/var/tmp/server_root/conf/8888.conf"]}} ** I'm obviously running into quite a few problems. Can someone suggest solutions? TIA, Elan From mattias@REDACTED Mon Feb 8 09:32:03 1999 From: mattias@REDACTED (Mattias Nilsson) Date: Mon, 08 Feb 1999 09:32:03 +0100 Subject: inets References: <3.0.5.32.19990207234723.01aa57c0@pop.loop.com> Message-ID: <36BEA103.8DEBF41@erix.ericsson.se> Elan wrote: > > Hi, > > FreeBSD: > > 1. Where do I find the sockets library for Erlang? > Background: > After having compiled > a) the Erlang base file under FreeBSD 3.0 and > b) the libraries.tar.gz file > I end up with a library that does not appear to contain a sockets library. > (Or maybe I'm not looking in the right places for it.) If I try to run > application:start(sockets). > as described in the inets manual, I get an error saying: > {error,{"no such file or directory","sockets.app"}}. Don't use sockets. There is a better solution, namely gen_tcp (alias ip_comm) which is a newer, more stable and faster tcp driver for the emulator. Specify 'SocketType ip_comm' in your .conf files. > 2. Where does the file inets.conf belong? > Background: > The inets manual describes a file inets.conf: > "A minimal application config file (from now on referred to as inets.conf) > starting two HTTP servers typically looks as follows: > [{inets, > [{services,[{httpd,"/var/tmp/server_root/conf/8888.conf"}, > {httpd,"/var/tmp/server_root/conf/8080.conf"}]}]}]." > > However, it doesn't state where the inets.conf should be stored. (Or I > haven't been able to find where these instructions are given.) I think this is a bit confusing. inets.conf in this case is an application startup file, while in the rest of the manual, the .conf file references refeer to the Apache-style httpd config files. > 3. I continue the example > a) without having started sockets, > b) without inets.conf > c) having however copied the examples/server_root directory to /var/tmp/... > - as instructed in the manual - > and - having run application:start(inets). - I try to run start/0, which > results in an error: > 6> inets:start(). > ** exited: {undef,{inets,start,[]}} ** > > 4. I then try running start/1 > 2> inets:start("/var/tmp/server_root/conf/8888.conf"). > ** exited: {undef,{inets,start,["/var/tmp/server_root/conf/8888.conf"]}} ** > > I'm obviously running into quite a few problems. Can someone suggest > solutions? Try this (assuming your 8888.conf is correct): 1> httpd:start("/var/tmp/server_root/conf/8888.conf"). This should fire up a httpd server on port 8888 (assuming you have specified Port 8888 in the 8888.conf file). Let me know if you have any luck. -- Best Regards, Mattias Nilsson Open Telecom Platform / Open Systems / Ericsson From wboeke@REDACTED Mon Feb 8 17:31:36 1999 From: wboeke@REDACTED (wboeke@REDACTED) Date: Mon, 8 Feb 99 17:31:36 +0100 Subject: Construct for associative arrays Message-ID: <9902081631.AA25591@hzsbg01.nl.lucent.com> -------------------------------------------------------------------- From: W.Boeke, Lucent Technologies, boeke@REDACTED To : Erlang discussion group, erlang-questions@REDACTED Date: febr 8, 1999 -------------------------------------------------------------------- Hi, Suppose I have a record: -record(aap,{ johnnie }). a function: name() -> johnnie. and a variable assignment: Var = #aap{ johnnie=mad }, Now my question is: would it be TERRIBLE difficult to implement Erlang such that I could address a record member as follows: Var#aap.name() This way, working with associative arrays would become very simple. And these data structures are quite useful, once you are accustomed to them. Kind regards, Wouter Boeke From icimjs@REDACTED Mon Feb 8 22:41:47 1999 From: icimjs@REDACTED (Elan) Date: Mon, 08 Feb 1999 13:41:47 -0800 Subject: mnesia Message-ID: <3.0.5.32.19990208134147.008d0e90@pop.loop.com> Hi, the mnesia manual says that erl should be started with -config pointing at the directory in which the tables are stored. I'd rather set that path programmatically. Can that be done? How? TIA, Elan From icimjs@REDACTED Mon Feb 8 22:45:49 1999 From: icimjs@REDACTED (Elan) Date: Mon, 08 Feb 1999 13:45:49 -0800 Subject: more inets. Message-ID: <3.0.5.32.19990208134549.008c7740@pop.loop.com> Hi, first off, thanx Mattias, I followed your suggestions and it worked. I'm accessing my online webserver over telnet and I'd like to start the erlang httpd server in the background and just let it run, without leaving an interactive erlang shell dangling (which will be closed down when I close down the telnet connection anyway - and with it the httpd server!). Is there an easy (or not so easy) way to do that? How do I do that? TIA, Elan From tobbe@REDACTED Tue Feb 9 00:14:28 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Tue, 09 Feb 1999 10:14:28 +1100 Subject: more inets. In-Reply-To: <3.0.5.32.19990208134549.008c7740@pop.loop.com> References: <3.0.5.32.19990208134549.008c7740@pop.loop.com> Message-ID: <199902082314.KAA26248@universe.serc.rmit.edu.au> > I'm accessing my online webserver over telnet and I'd like to start the > erlang httpd server in the background and just let it run, without leaving > an interactive erlang shell dangling (which will be closed down when I Use the -nouser switch to avoid the shell (see also the man page: erl -man erl). To have Erlang running as a daemon you can use the following little C program: http://www.serc.rmit.edu.au/~tobbe/epop/daemon_wrapper.c Then, you can start your Erlang node as a daemon process: ./dw erl -noshell -s $(YOUR_PROGRAM) NB: If you also add: -sname $(A_NODE_NAME) you can attach yourself to that Erlang node by starting a remote shell from another Erlang node. (1. start another erlang node (use -sname $(ANOTHER_NAME) 2. Enter job control mode: C-g 3. Start a remote shell: r $(A_NODE_NAME)@$(THE_HOSTNAME) 4. Connect: c ) /Tobbe From tobbe@REDACTED Tue Feb 9 02:03:37 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Tue, 09 Feb 1999 12:03:37 +1100 Subject: Construct for associative arrays In-Reply-To: <9902081631.AA25591@hzsbg01.nl.lucent.com> References: <9902081631.AA25591@hzsbg01.nl.lucent.com> Message-ID: <199902090103.MAA00639@universe.serc.rmit.edu.au> > Now my question is: would it be TERRIBLE difficult to implement Erlang such > that I could address a record member as follows: Richard O'Keefe has come up with a much better solution called "Abstract Patterns", which he presented at the last Erlang User's Conference. You'll find his slides at (in powerpoint): http://www.erlang.se/onlinenews/New/Slides/Abstract_Pattern_Matching_for_Erlang.ppt Basically, Abstract Patterns removes the need for records and the Erlang preprocessor. > This way, working with associative arrays would become very simple. And these > data structures are quite useful, once you are accustomed to them. Have you had a look at: http://www.erlang.org/user.html#assoc-1.2 /Tobbe From ulf.wiger@REDACTED Tue Feb 9 07:58:40 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Tue, 09 Feb 1999 07:58:40 +0100 Subject: mnesia References: <3.0.5.32.19990208134147.008d0e90@pop.loop.com> Message-ID: <36BFDCA0.DB48CA55@etxb.ericsson.se> Elan wrote: > > Hi, > > the mnesia manual says that erl should be started with > -config > > pointing at the directory in which the tables are stored. I'd rather set > that path programmatically. Can that be done? How? > > TIA, > > Elan I believe that it's really -mnesia dir The 'dir' parameter can be set from the command line: erl -name -mnesia dir or in a "config" file, which is identified with the parameter 'config' erl -name -config For various reasons, the file should be named sys.config, and has the following format: [{AppName1, [{EnvVar, Val}]}]. For example: [{mnesia, [{dir, "/home/joe/test/mnesia.n1"}, {embedded_mnemnosyne, false}]}, {kernel, [{start_ddll, true}, {start_disk_log, true}]}]. Setting the environment variables programmatically *can* be done, but you have to use an internal function in the application_controller: application_controller:set_env(AppName, Key, Value) It is not recommended, and you will not find the function in any manual. What I do is that I generate the sys.config file programmatically during an installation phase. I don't think it's such a good idea to be changing those variables in a running system anyway - better to create a static configuration and then start the erlang node from it. /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 ulf.wiger@REDACTED Tue Feb 9 08:17:57 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Tue, 09 Feb 1999 08:17:57 +0100 Subject: mnesia References: <3.0.5.32.19990208134147.008d0e90@pop.loop.com> <36BFDCA0.DB48CA55@etxb.ericsson.se> Message-ID: <36BFE125.B5DE8E9E@etxb.ericsson.se> Ulf Wiger wrote: > > > Setting the environment variables programmatically *can* be done, but > you have to use an internal function in the application_controller: > > application_controller:set_env(AppName, Key, Value) > > It is not recommended, and you will not find the function in any manual. > Ok, confession time. ;) I *have* done this myself in production code: patch_load_mnesia(Dir) -> application:load(mnesia), application_controller:set_env(mnesia, dir, Dir). After this, you may issue application:start(mnesia). I do this in an installation program, which also configures a start command and a sys.config file. After that, all parameters are set correctly every time the system is started. However, there is also a function, mnesia:start(ExtraEnv), which does the same thing. It is not official either, so I guess it's just a matter of choosing your favourite undocumented feature and running with it. ;) I still recommend messing with the env variables at installation only, and not afterwards. /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 wboeke@REDACTED Tue Feb 9 09:25:26 1999 From: wboeke@REDACTED (wboeke@REDACTED) Date: Tue, 9 Feb 99 09:25:26 +0100 Subject: Updating a big AST Message-ID: <9902090825.AA26020@hzsbg01.nl.lucent.com> -------------------------------------------------------------------- From: W.Boeke, Lucent Technologies, boeke@REDACTED To : Erlang discussion group, erlang-questions@REDACTED Date: febr 9, 1999 -------------------------------------------------------------------- Hi, Tobbe, thanks for your helpful answer to my question about associative arrays. Here comes another (newbee) question. I must parse source code written in some rather unstructured language, and I want to fill several big AST's (abstract syntax trees) with the information that the parser reads. Thus, the AST's are updated in a way that is not known beforehand. For the AST's I could take process dictionary variables, because these can be updated destructively. However, for each small component that I add to an AST, I would be oblighed to copy the whole AST, and add the new component during this copy. I am aware that this is an old issue for functional languages, and I am shure that a nice pattern exists how to solve this in Erlang. Kind regards, Wouter Boeke From icimjs@REDACTED Tue Feb 9 11:23:56 1999 From: icimjs@REDACTED (Elan) Date: Tue, 09 Feb 1999 02:23:56 -0800 Subject: more inets Message-ID: <3.0.5.32.19990209022356.016f6ab0@pop.loop.com> Hi Tobbe, thanx for the great answers. erl- noshell -s $(PROGRAM_NAME) works like a charm. However, having compiled the daemon_wrapper.c on FreeBSD 3.0, doing ./dw erl -noshell -s $(PROGRAM_NAME) does nothing. dw starts up, runs, exists and there is absolutely no trace of the server. Any ideas? TIA, Elan From rv@REDACTED Tue Feb 9 12:51:36 1999 From: rv@REDACTED (Robert Virding) Date: Tue, 09 Feb 1999 12:51:36 +0100 Subject: Construct for associative arrays In-Reply-To: Your message of "Mon, 08 Feb 1999 17:31:36 +0100." <9902081631.AA25591@hzsbg01.nl.lucent.com> Message-ID: <199902091151.MAA00477@renat.du.etx.ericsson.se> wboeke@REDACTED writes: >Hi, > >Suppose I have a record: > > -record(aap,{ johnnie }). > >a function: > > name() -> johnnie. > >and a variable assignment: > > Var = #aap{ johnnie=mad }, > >Now my question is: would it be TERRIBLE difficult to implement Erlang such >that I could address a record member as follows: > > Var#aap.name() > >This way, working with associative arrays would become very simple. And these >data structures are quite useful, once you are accustomed to them. Basically what you are after is to be able to determine the field name of a record at runtime. This was discussed when records were added but we decided not to do it. It can be added if the desire is overwhelming. :-) The syntax would be with current priorities: Var#aap.(name()) Definitely look ROK's abstract patterns which Torbj?rn mentioned, they are also implementable on demand. Robert From tobbe@REDACTED Tue Feb 9 13:05:57 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Tue, 09 Feb 1999 23:05:57 +1100 Subject: Construct for associative arrays In-Reply-To: <199902091151.MAA00477@renat.du.etx.ericsson.se> References: <199902091151.MAA00477@renat.du.etx.ericsson.se> Message-ID: <199902091205.XAA00515@campari.serc.rmit.edu.au> rv> Definitely look ROK's abstract patterns which Torbj?rn mentioned, rv> they are also implementable on demand. Yes, please !! /Tobbe From wboeke@REDACTED Tue Feb 9 13:44:32 1999 From: wboeke@REDACTED (wboeke@REDACTED) Date: Tue, 9 Feb 99 13:44:32 +0100 Subject: Associative arrays Message-ID: <9902091244.AA08142@hzsbg01.nl.lucent.com> -------------------------------------------------------------------- From: W.Boeke, Lucent Technologies, boeke@REDACTED To : Erlang discussion group, erlang-questions@REDACTED Date: febr 9, 1999 -------------------------------------------------------------------- Hi, I asked for associative arrays, got helpful reactions from Tobbe and Robert, and read Richard's presentation about abstract patterns. I did not know that the implementaion of records relied on a (dumb) C preprocessor, but knowing this it is clear that this is not a very good solution. So I would be happy to use the abstract patterns solution once it is implemented and once I understand it. What I really need is the stepwise creation of a list, where I can later address the list members by name. These list members themself might be also associative arrays. So you could envision constructs like ape.getmemb('johnie').getmemb('leg').toe2 Things like this are possible with Erlang now (more or less) but they require a lot of temporal variables. Kind regards, Wouter Boeke From wboeke@REDACTED Wed Feb 10 13:16:48 1999 From: wboeke@REDACTED (wboeke@REDACTED) Date: Wed, 10 Feb 99 13:16:48 +0100 Subject: Associative arrays: solved Message-ID: <9902101216.AA16578@hzsbg01.nl.lucent.com> -------------------------------------------------------------------- From: W.Boeke, Lucent Technologies, boeke@REDACTED To : Erlang discussion group, erlang-questions@REDACTED Date: febr 10, 1999 -------------------------------------------------------------------- Hi, Yesterday I asked for an Erlang enhancement, such that I could specify something like: ape.getmemb('johnie').getmemb('leg').toe2 In the meantime I did some "re-inventing the wheel", and found out how to tackle such things in a functional way. Also www.erlang.org/user.html#assoc-1.2 offered inspiration, and I'm happy now about the subject of "associative arrays". By the way: I suppose that really enhancing Erlang is unpalatable, because of the big installed base? Kind regards, Wouter Boeke From ulf.wiger@REDACTED Wed Feb 10 13:26:54 1999 From: ulf.wiger@REDACTED (Ulf Wiger) Date: Wed, 10 Feb 1999 13:26:54 +0100 Subject: Associative arrays: solved References: <9902101216.AA16578@hzsbg01.nl.lucent.com> Message-ID: <36C17B0E.FD0D0D30@etxb.ericsson.se> wboeke@REDACTED wrote: > > > By the way: I suppose that really enhancing Erlang is unpalatable, > because of the big installed base? > It depends on how it is done. Personally, I'm very much in favour of ROK's abstract patterns, and I represent a pretty large customer. ;) It is important to keep supporting records for some time, but I don't think that abstract patterns would make that difficult. Enhancements are ok, as long as they are relevant and don't break your old code. Regards, 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 bhyde@REDACTED Wed Feb 10 18:43:17 1999 From: bhyde@REDACTED (Ben Hyde) Date: 10 Feb 1999 17:43:17 -0000 Subject: Comments on the www.erlang.org course. Message-ID: <19990210174317.7543.qmail@zap.ml.org> I've recently read thru the course that get's top billing at www.erlang.org. Here are a few typos and questions. - ben --- ** Sequential Programming typo: This lesson is missing one last 'back to top' button. question: What's the unicode, utf-8 etc. etc. story today. question: The string is a list implies that strings are not very dense? question: Atoms are interned in a per node pool and never reclaimed, I presume. *** Concurrent Programming **** Client Server Model typo: The code for request/1 uses the variable R rather than Rep by mistake. *** Error Handling **** Processes can trap exit signals. drawo: The illustration ought to show P3 linked to P2 not sending a message to P2. *** Advanced Topics **** References typo: The first sentence is not gramatical. question: Is this the only use of the term "symbol", and why? *** Obtaining System Information Typo: "want to do this?" not "what to do this?" ** History "Conclusion: The language must contain primitives for concurrency and error recovery, and the execution model must not have back-tracking. (Rules out Lisp and Prolog.)" Since Lisp does not have backtracking I guess it's time to backtrace and redo the entire project, eh? Misc: At this point in my climbing up the learning curve I was surprised that the application module and the tangle around load, path, etc. were not covered more. The error handling section was very useful. A terse statement of the exact coupling between exceptions, exit signals, and the error_handler would be nice. You all have a very nice system here. - ben From icimjs@REDACTED Wed Feb 10 21:38:18 1999 From: icimjs@REDACTED (Elan) Date: Wed, 10 Feb 1999 12:38:18 -0800 Subject: -sname vs. -name switch Message-ID: <3.0.5.32.19990210123818.008684b0@pop.loop.com> Hi, can I communicate with an erl system running online under FreeBSD from a local (modem connection) Win95 system using Werl, if I start both systems with the -sname switch, or do I have to use -name for this kind of application? TIA, Elan From mattias@REDACTED Wed Feb 10 21:44:33 1999 From: mattias@REDACTED (Mattias Nilsson) Date: Wed, 10 Feb 1999 21:44:33 +0100 Subject: -sname vs. -name switch References: <3.0.5.32.19990210123818.008684b0@pop.loop.com> Message-ID: <36C1EFB1.935AE734@erix.ericsson.se> Elan wrote: > > Hi, > > can I communicate with an erl system running online under FreeBSD from a > local (modem connection) Win95 system using Werl, if I start both systems > with the -sname switch, or do I have to use -name for this kind of > application? -sname should be ok if you're on the same subnet atleast. You should also make sure you use the same cookie (use the -setcookie switch to make sure, otherwise the .erlang.cookie file in your $HOME dir is read). -- Best Regards, Mattias Nilsson Open Telecom Platform, Open Systems, Ericsson From per@REDACTED Wed Feb 10 21:56:13 1999 From: per@REDACTED (Per Hedeland) Date: Wed, 10 Feb 1999 21:56:13 +0100 (MET) Subject: -sname vs. -name switch Message-ID: <199902102056.VAA26678@aalborg.du.etx.ericsson.se> Mattias wrote: > >Elan wrote: >> >> Hi, >> >> can I communicate with an erl system running online under FreeBSD from a >> local (modem connection) Win95 system using Werl, if I start both systems >> with the -sname switch, or do I have to use -name for this kind of >> application? > >-sname should be ok if you're on the same subnet atleast. You should >also make sure you use the >same cookie (use the -setcookie switch to make sure, otherwise the >.erlang.cookie file in your $HOME dir is read). HOWEVER, note that the *current* open-source/Unix version uses a distribution protocol that is incompatible with the *current* Win95/NT version - i.e. they can not communicate *at all* - see the http://www.erlang.org/download.html page. This will hopefully be fixed soon... --Per Hedeland per@REDACTED From klacke@REDACTED Wed Feb 10 23:38:45 1999 From: klacke@REDACTED (Claes Wikstrom) Date: Wed, 10 Feb 1999 23:38:45 +0100 (MET) Subject: gs Message-ID: <14018.2677.70773.639655@gin> Ok, it my turn to ask a question. ! How do I best (can I ??) setup what fonts "gs" shall use. It looks a bit ugly when running the GUI debugger on my home linux (RH 5.2) box /klacke From per@REDACTED Thu Feb 11 00:22:09 1999 From: per@REDACTED (Per Hedeland) Date: Thu, 11 Feb 1999 00:22:09 +0100 (MET) Subject: -sname vs. -name switch Message-ID: <199902102322.AAA19535@super.du.etx.ericsson.se> Mattias wrote: >-sname should be ok if you're on the same subnet atleast. You should >also make sure you use the >same cookie (use the -setcookie switch to make sure, otherwise the >.erlang.cookie file in your $HOME dir is read). Oh, and by the way: You *really* don't want to use -setcookie if you care at all about security and run in anything but a closed, friendly environment - at least on Unix anyone on the system can then find out your cookie using 'ps', and if they find out your cookie they can connect to your nodes, and if they can connect to your nodes they have all your privileges. --Per Hedeland per@REDACTED From bhyde@REDACTED Thu Feb 11 05:06:32 1999 From: bhyde@REDACTED (Ben Hyde) Date: 11 Feb 1999 04:06:32 -0000 Subject: Can't allocate? Message-ID: <19990211040632.11600.qmail@zap.ml.org> Any advise about this failure? > gmake .. ... erlc -W -bjam -o../ebin gtk_generic.erl Can't allocate 8713236 bytes of memory ... I seem to have lots of swap space at the point of failure. - ben From Ruslan@REDACTED Thu Feb 11 05:14:33 1999 From: Ruslan@REDACTED (Ruslan Shevchenko) Date: Thu, 11 Feb 1999 06:14:33 +0200 Subject: Can't allocate? References: <19990211040632.11600.qmail@zap.ml.org> Message-ID: <36C25929.B885CB1E@Shevchenko.Kiev.UA> Ben Hyde wrote: > > Any advise about this failure? > > > gmake .. > ... > erlc -W -bjam -o../ebin gtk_generic.erl > Can't allocate 8713236 bytes of memory > ... > > I seem to have lots of swap space at the point > of failure. - ben Check you ulimit settings. From bhyde@REDACTED Thu Feb 11 05:18:27 1999 From: bhyde@REDACTED (Ben Hyde) Date: Wed, 10 Feb 1999 23:18:27 -0500 (EST) Subject: Can't allocate? In-Reply-To: <36C25929.B885CB1E@Shevchenko.Kiev.UA> References: <19990211040632.11600.qmail@zap.ml.org> <36C25929.B885CB1E@Shevchenko.Kiev.UA> Message-ID: <14018.22995.116848.472333@zap.ml.org> Ruslan Shevchenko writes: >Ben Hyde wrote: >> >> Any advise about this failure? >> >> > gmake .. >> ... >> erlc -W -bjam -o../ebin gtk_generic.erl >> Can't allocate 8713236 bytes of memory >> ... >> >> I seem to have lots of swap space at the point >> of failure. - ben > > Check you ulimit settings. > Thanks! but too bad... $ ulimit unlimited Sorry, should have mentioned that in the original note. - ben From Ruslan@REDACTED Thu Feb 11 05:46:20 1999 From: Ruslan@REDACTED (Ruslan Shevchenko) Date: Thu, 11 Feb 1999 06:46:20 +0200 Subject: Can't allocate? References: <19990211040632.11600.qmail@zap.ml.org> <36C25929.B885CB1E@Shevchenko.Kiev.UA> <14018.22995.116848.472333@zap.ml.org> Message-ID: <36C2609C.D51C87@Shevchenko.Kiev.UA> Ben Hyde wrote: > > Ruslan Shevchenko writes: > >Ben Hyde wrote: > >> > >> Any advise about this failure? > >> > >> > gmake .. > >> ... > >> erlc -W -bjam -o../ebin gtk_generic.erl > >> Can't allocate 8713236 bytes of memory > >> ... > >> > >> I seem to have lots of swap space at the point > >> of failure. - ben > > > > Check you ulimit settings. > > > > Thanks! but too bad... > > $ ulimit > unlimited > Hmm, and what ulimit -d show ? > Sorry, should have mentioned that in the original > note. - ben From hakan@REDACTED Thu Feb 11 08:53:44 1999 From: hakan@REDACTED (Hakan Mattsson) Date: Thu, 11 Feb 1999 08:53:44 +0100 (MET) Subject: Can't allocate? In-Reply-To: <19990211040632.11600.qmail@zap.ml.org> Message-ID: On 11 Feb 1999, Ben Hyde wrote: bhyde>Date: 11 Feb 1999 04:06:32 -0000 bhyde>From: Ben Hyde bhyde>To: Erlang Q. bhyde>Subject: Can't allocate? bhyde> bhyde> bhyde>Any advise about this failure? bhyde> bhyde> > gmake .. bhyde> ... bhyde> erlc -W -bjam -o../ebin gtk_generic.erl bhyde> Can't allocate 8713236 bytes of memory bhyde> ... bhyde> bhyde>I seem to have lots of swap space at the point bhyde>of failure. - ben The error message means that the address space of the Erlang emulator has been exhausted. The current limit in JAM is about 240M. The limit has recently been increased i the new and better BEAM system. Hopefully the emulator produced a file named erl_crash.dump. It should contain useful information about the inner state of the emulator just before it gave up. /H?kan From mattias@REDACTED Thu Feb 11 09:05:09 1999 From: mattias@REDACTED (Mattias Nilsson) Date: Thu, 11 Feb 1999 09:05:09 +0100 Subject: Can't allocate? References: Message-ID: <36C28F35.2D27C653@erix.ericsson.se> > On 11 Feb 1999, Ben Hyde wrote: > > bhyde>Date: 11 Feb 1999 04:06:32 -0000 > bhyde>From: Ben Hyde > bhyde>To: Erlang Q. > bhyde>Subject: Can't allocate? > bhyde> > bhyde> > bhyde>Any advise about this failure? > bhyde> > bhyde> > gmake .. > bhyde> ... > bhyde> erlc -W -bjam -o../ebin gtk_generic.erl > bhyde> Can't allocate 8713236 bytes of memory > bhyde> ... > bhyde> > bhyde>I seem to have lots of swap space at the point > bhyde>of failure. - ben > > The error message means that the address space of the Erlang emulator > has been exhausted. The current limit in JAM is about 240M. The limit > has recently been increased i the new and better BEAM system. Sorry Hakan, but that is not the case. If the emulator runs out of address space it produces a message like: 'Got unusable memory block ...', which means it did a malloc() and got a block above the 256MB (28 bit) limit. The problem above may be caused by low memory, but could also be caused by a bug in the emulator, I couldn't say, so I'll keep my mouth shut. If it happens everytime (or atleast quite often), you should probably dig into the memory handling stuff of the emulator (yikes!). > Hopefully the emulator produced a file named erl_crash.dump. It > should contain useful information about the inner state of the > emulator just before it gave up. The erl_crash dump won't help much in most cases. It contains information about the processes that was running at the point of failure, and process information about them. Nowadays (in a more recent emulator), we have stack dumps in the erl-crash.dump file, which helps some more in some cases. Nothing like a regular core file, but still of some use. -- Best Regards, Mattias Nilsson Open Telecom Platform, Open Systems, Ericsson From per@REDACTED Thu Feb 11 09:35:06 1999 From: per@REDACTED (Per Hedeland) Date: Thu, 11 Feb 1999 09:35:06 +0100 (MET) Subject: Can't allocate? Message-ID: <199902110835.JAA27079@aalborg.du.etx.ericsson.se> Mattias wrote: >The problem above may be caused by low memory, but could also be caused >by a bug in the emulator, I couldn't say, so I'll keep my mouth shut. >If it happens everytime (or atleast quite often), you should probably >dig into the memory handling stuff of the emulator (yikes!). :-) We still haven't seen Ben's ulimit settings though ('ulimit' without arguments shows the file size limit, which isn't relevant of course). What limits exist and their default settings depend on the OS, e.g. in bash on a FreeBSD 2.2.8 system here 'ulimit -a' says core file size (blocks) 0 data seg size (kbytes) 32768 file size (blocks) unlimited max memory size (kbytes) 65536 stack size (kbytes) 16384 cpu time (seconds) unlimited max user processes 256 pipe size (512 bytes) 1 open files 1024 virtual memory (kbytes) 49152 - any of "data seg size", "max memory size", and "virtual memory" could be the culprit. (Around here we mostly run Solaris, which has rather more generous defaults: core file size (blocks) unlimited data seg size (kbytes) 2097148 file size (blocks) unlimited open files 64 pipe size (512 bytes) 10 stack size (kbytes) 8192 cpu time (seconds) unlimited max user processes 997 virtual memory (kbytes) unlimited - the 2 GB data size limit isn't likely to be noticed by Erlang.:-) --Per Hedeland per@REDACTED From joe@REDACTED Thu Feb 11 13:47:40 1999 From: joe@REDACTED (Joe Armstrong) Date: Thu, 11 Feb 1999 13:47:40 +0100 (MET) Subject: Comments on the www.erlang.org course. In-Reply-To: <19990210174317.7543.qmail@zap.ml.org> Message-ID: Hi Ben, Thanks a lot, I fixed up the errors that you observed. See below (and on the updated web site). > I've recently read thru the course that get's top billing at > www.erlang.org. Here are a few typos and questions. - ben Thanks - we always like complements :-) > --- > > ** Sequential Programming > typo: This lesson is missing one last 'back to top' button. fixed > question: What's the unicode, utf-8 etc. etc. story today. In the spec. Not yet implemented. > question: The string is a list implies that strings are not very dense? They take 8 bytes/character (is that what you meant?) Binaries take 1 byte/character (asymptotically) - the overhead on small binaries is << ask klacke, or tony >> > question: Atoms are interned in a per node pool and never reclaimed, I presume. Not specified. The current beam/jam does not garb the atom table. > > *** Concurrent Programming > > **** Client Server Model > typo: The code for request/1 uses the variable R rather than Rep by mistake. Fixed > > *** Error Handling > > **** Processes can trap exit signals. > drawo: The illustration ought to show P3 linked to P2 not sending a message to P2. > Fixed (I *lost* the .fig file so this fix took a looooooooong time :-() > *** Advanced Topics > **** References > typo: The first sentence is not gramatical. > question: Is this the only use of the term "symbol", and why? Fixed - major! rewrite (panic on - the standardisation committee doesn't really know what a reference is! - what happens if you store a reference in a file and read the file a million years later? - what happens to copies of references - what happens in parallel universes - what happens in the year 2000 - panic off) > > *** Obtaining System Information > Typo: "want to do this?" not "what to do this?" > Fixed > ** History > "Conclusion: The language must contain primitives for concurrency > and error recovery, and the execution model must not have back-tracking. > (Rules out Lisp and Prolog.)" > Since Lisp does not have backtracking I guess it's time to backtrace > and redo the entire project, eh? > Not fixed. Lisp was ruled out 'cos of lack of concurrency not backtracking! > > Misc: > At this point in my climbing up the learning curve I was surprised > that the application module and the tangle around load, path, etc. > were not covered more. Ummm - that stuff (paths, loading etc.) is a "local issue" - the course is (mostly) generic - although the boundary is not hard and fast. > > The error handling section was very useful. A terse statement of > the exact coupling between exceptions, exit signals, and the > error_handler would be nice. The precise statement is not terse! - see the book for the exact > coupling. You all have a very nice system here. - ben Thanks, /Joe -- Joe Armstrong Computer Science Laboratory +46 8 719 9452 AT2/ETX/DN/SU Ericsson Telecom SE-126 25 Stockholm Sweden joe@REDACTED http://www.ericsson.se/cslab/~joe From bhyde@REDACTED Fri Feb 12 20:31:52 1999 From: bhyde@REDACTED (Ben Hyde) Date: 12 Feb 1999 19:31:52 -0000 Subject: gs? Message-ID: <19990212193152.106.qmail@zap.ml.org> Hi again - I'm attempting to get gs to work now. I followed the direction for getting and building the unique tcl, and moving the files into the gs directory tree. The commands given in that README seem to be wrong < cp tcl7.6/unix/libtcl7.6.a $CC_ROOT/libraries/gs/c_src/lib/ > cp tcl7.6/unix/libtcl76.a $CC_ROOT/libraries/gs/c_src/lib/ < cp tcl7.6/unix/tcl2c $CC_ROOT/lib/libraries/gs/lib/ > cp tcl7.6/unix/tcl2c $CC_ROOT/libraries/gs/lib/ < cp tk4.2/unix/libtk4.2.a $CC_ROOT/libraries/gs/c_src/lib/ > cp tk4.2/unix/libtk42.a $CC_ROOT/libraries/gs/c_src/lib/ After building it (see: ) it just hangs. Below is the result of using dbg:c on it as it starts up. This was the first time I'd used dbg so I won't pretend to know what it means - but I think I'm missing something called "wrap." Thanks for your help. - ben (z@REDACTED)1> l(gs). {module,gs} (z@REDACTED)2> dbg:c(gs, start, []). (<0.34.0>) call erlang:whereis(code_server) ... (<0.41.0>) call erlang:db_put(12,{1,lives}) (<0.41.0>) call erlang:whereis(code_server) (<0.41.0>) call erlang:make_ref() (<0.41.0>) call erlang:node(code_server) (<0.41.0>) call erlang:whereis(code_server) (<0.41.0>) {'$gen_call',{<0.41.0>,#Ref},{ensure_loaded,gtk}} ! code_server (<0.41.0>) << {#Ref,{module,gtk}} (<0.41.0>) call erlang:function_exported(gtk,start_link,4) (<0.41.0>) call erlang:element(1,{kernel,false}) (<0.41.0>) call erlang:element(1,{{default,all,font},{screen,12}}) (<0.41.0>) call erlang:spawn_link(gtk,init,[{1,<0.41.0>,<0.41.0>,[{kernel,false},{{default,all,font},{screen,12}}]}]) (<0.41.0>) spawn <0.42.0> (<0.41.0>) link <0.42.0> (<0.41.0>) << {'EXIT',<0.42.0>, {choose_file,"/home/bhyde/work/erlang/erlang-47.4.0/erts-47.4.0/lib/gs-1.3.5/ebin/../priv/bin/", "wrap", [], {error,enoent}}} ... then it just hangs. There is nothing in /home/bhyde/work/erlang/erlang-47.4.0/erts-47.4.0/lib/gs-1.3.5/ebin/../priv/bin/ From klacke@REDACTED Sat Feb 13 00:08:24 1999 From: klacke@REDACTED (Claes Wikstrom) Date: Sat, 13 Feb 1999 00:08:24 +0100 (MET) Subject: gs? In-Reply-To: <19990212193152.106.qmail@zap.ml.org> References: <19990212193152.106.qmail@zap.ml.org> Message-ID: <14020.46184.349370.652455@gin> Ben Hyde writes: > > Hi again - > > I'm attempting to get gs to work now. I followed the > direction for getting and building the unique tcl, and > moving the files into the gs directory tree. The commands > given in that README seem to be wrong > > < cp tcl7.6/unix/libtcl7.6.a $CC_ROOT/libraries/gs/c_src/lib/ > > cp tcl7.6/unix/libtcl76.a $CC_ROOT/libraries/gs/c_src/lib/ > > < cp tcl7.6/unix/tcl2c $CC_ROOT/lib/libraries/gs/lib/ > > cp tcl7.6/unix/tcl2c $CC_ROOT/libraries/gs/lib/ > > < cp tk4.2/unix/libtk4.2.a $CC_ROOT/libraries/gs/c_src/lib/ > > cp tk4.2/unix/libtk42.a $CC_ROOT/libraries/gs/c_src/lib/ > > After building it (see: ) > it just hangs. Below is the result of using dbg:c on it > as it starts up. This was the first time I'd used dbg so > I won't pretend to know what it means - but I think I'm > missing something called "wrap." > Ok I just checked your build log and it didn't look to bright. It is all our fault and we have allready apologized ourselves enough over the pretty crappy makefiles in the first release ov Open Source Erlang. We're expecting to release a new version with clean Makefiles in just a couple of days, hopefully on monday. !! Which supposedly builds everything straight. Building "gs" with the first release requires exactly the right moves visavi picking up the patched version of tcl/tk, and copying the 5 right files to tye directory gs/c_src/lib This was a bad move from our side and in the next release this hazzle is removed. (Monday ..) Now, for the .... trace .. > Thanks for your help. - ben > > (z@REDACTED)1> l(gs). > {module,gs} > (z@REDACTED)2> dbg:c(gs, start, []). > (<0.34.0>) call erlang:whereis(code_server) > ... > (<0.41.0>) call erlang:db_put(12,{1,lives}) > (<0.41.0>) call erlang:whereis(code_server) > (<0.41.0>) call erlang:make_ref() > (<0.41.0>) call erlang:node(code_server) > (<0.41.0>) call erlang:whereis(code_server) > (<0.41.0>) {'$gen_call',{<0.41.0>,#Ref},{ensure_loaded,gtk}} ! code_server > (<0.41.0>) << {#Ref,{module,gtk}} > (<0.41.0>) call erlang:function_exported(gtk,start_link,4) > (<0.41.0>) call erlang:element(1,{kernel,false}) > (<0.41.0>) call erlang:element(1,{{default,all,font},{screen,12}}) > (<0.41.0>) call erlang:spawn_link(gtk,init,[{1,<0.41.0>,<0.41.0>,[{kernel,false},{{default,all,font},{screen,12}}]}]) > (<0.41.0>) spawn <0.42.0> > (<0.41.0>) link <0.42.0> > (<0.41.0>) << {'EXIT',<0.42.0>, > {choose_file,"/home/bhyde/work/erlang/erlang-47.4.0/erts-47.4.0/lib/gs-1.3.5/ebin/../priv/bin/", > "wrap", > [], > {error,enoent}}} > ... then it just hangs. And this is also expected since the buildlog (at your URL) shows that the build failed just at the place where the above trace tries to find the executable file /home/bhyde .... /lib/gs-1.3.5/ebin/../priv/bin/wrap So, here are your options. 1. Retry the gs build (read te README in gs/c_src very carefully) 2. Await the next release /klacke PS. I'm happy to see that you've found my good old trusty 'dbg' module, I thought I was the only user nowadays :-) From bhyde@REDACTED Sat Feb 13 01:58:32 1999 From: bhyde@REDACTED (Ben Hyde) Date: Fri, 12 Feb 1999 19:58:32 -0500 (EST) Subject: gs? In-Reply-To: <14020.46184.349370.652455@gin> References: <19990212193152.106.qmail@zap.ml.org> <14020.46184.349370.652455@gin> Message-ID: <14020.52532.615299.316660@zap.ml.org> Claes Wikstrom writes: thanks! >Ben Hyde writes: > > I'm attempting to get gs to work... >Ok I just checked your build log and it didn't look to bright. duh, I'll try again. >It is all our fault and we have allready apologized ourselves enough I want my money back! >We're expecting to release a new version with clean Makefiles >in just a couple of days, hopefully on monday. Monday is a holiday in the US so I think you ought to take the day off. > ... copying the >5 right files ... It only mentions 4. > to the directory gs/c_src/lib It says to put one of the four some place else. >So, here are your options. > >1. Retry the gs build (read te README in gs/c_src very carefully) >2. Await the next release I - greedy american - will take both. >PS. I'm happy to see that you've found my good old trusty >'dbg' module, I thought I was the only user nowadays :-) :-) - ben From markn@REDACTED Tue Feb 16 02:26:04 1999 From: markn@REDACTED (Mark Ng) Date: Tue, 16 Feb 1999 12:26:04 +1100 Subject: version numbers In-Reply-To: <3.0.5.32.19990208134147.008d0e90@pop.loop.com>; from Elan on Mon, Feb 08, 1999 at 01:41:47PM -0800 References: <3.0.5.32.19990208134147.008d0e90@pop.loop.com> Message-ID: <19990216122604.A880@pagan.localnet> I am kinda confused with the Erlang version numbers, the EPL says 4.7.x but in other places it is 47.x eg: file name for erlang-base tar ball and so is the JAM emulator. (is it just a coincidence with JAM or does its version number reflect the version of the erlang system ?). thanks, mark From markn@REDACTED Tue Feb 16 02:16:02 1999 From: markn@REDACTED (Mark Ng) Date: Tue, 16 Feb 1999 12:16:02 +1100 Subject: new minor release.. ? In-Reply-To: <14020.46184.349370.652455@gin>; from Claes Wikstrom on Sat, Feb 13, 1999 at 12:08:24AM +0100 References: <19990212193152.106.qmail@zap.ml.org> <14020.46184.349370.652455@gin> Message-ID: <19990216121602.A742@pagan.localnet> On Sat, Feb 13, 1999 at 12:08:24AM +0100, Claes Wikstrom wrote: > > We're expecting to release a new version with clean Makefiles > in just a couple of days, hopefully on monday. !! Which supposedly > builds everything straight. > Is this going to be just new Makefiles or are you guys throwing some fixes or minor enchanchments as well ?? thanks, mark From "mickael_remond"@REDACTED Mon Feb 22 10:06:30 1999 From: "mickael_remond"@REDACTED ("mickael_remond"@REDACTED) Date: Mon, 22 Feb 1999 10:06:30 +0100 Subject: Leex in parser tutorial 1.0 Message-ID: I did not manage to figure out how to use leex in the parser tutorial contrib. The make function in ecc_parse refers to leex:gen, but there is no leex.erl. There is only a leex.hrl in the directory, with no gen function exported. What should I do to run this complete example (the yecc part seems to produce a valide parser by the way). Thanks in advance for your help. Micka?l R?mond From rv@REDACTED Mon Feb 22 11:57:53 1999 From: rv@REDACTED (Robert Virding) Date: Mon, 22 Feb 1999 11:57:53 +0100 Subject: Leex in parser tutorial 1.0 In-Reply-To: Your message of "Mon, 22 Feb 1999 10:06:30 +0100." Message-ID: <199902221057.LAA10549@renat.du.etx.ericsson.se> "mickael_remond"@vuitton.com writes: >I did not manage to figure out how to use leex in the parser tutorial >contrib. > >The make function in ecc_parse refers to leex:gen, but there is no >leex.erl. There is only a leex.hrl in the directory, with no gen function >exported. > >What should I do to run this complete example (the yecc part seems to >produce a valide parser by the way). > >Thanks in advance for your help. > >Micka?l R?mond Leex has not really been released yet so it is not included in the distribution. I am developing it and there is a link on my homepage to a Leex page which shows what exists today. Read the caveats! Someday I'll release it. Robert -- Robert Virding Tel: +46 (0)8 719 95 28 Computer Science Laboratory Email: rv@REDACTED Ericsson Telecom AB WWW: http://www.ericsson.se/cslab/~rv S-126 25 ?LVSJ?, SWEDEN "Folk s?ger att jag inte bryr mig om n?gonting, men det skiter jag i". From tobbe@REDACTED Mon Feb 22 12:52:53 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Mon, 22 Feb 1999 22:52:53 +1100 Subject: Leex in parser tutorial 1.0 In-Reply-To: <199902221057.LAA10549@renat.du.etx.ericsson.se> References: <199902221057.LAA10549@renat.du.etx.ericsson.se> Message-ID: <199902221152.WAA00522@campari.serc.rmit.edu.au> > Leex has not really been released yet so it is not included in the > distribution. I am developing it and there is a link on my homepage > to a Leex page which shows what exists today. Read the caveats! > Someday I'll release it. Come on now Robert ! Why don't you put what you've got under the User Contrib area ? Perhaps someone else will finish what's left to do... ;-) /Tobbe From rv@REDACTED Mon Feb 22 14:48:23 1999 From: rv@REDACTED (Robert Virding) Date: Mon, 22 Feb 1999 14:48:23 +0100 Subject: Leex in parser tutorial 1.0 In-Reply-To: Your message of "Mon, 22 Feb 1999 22:52:53 +1100." <199902221152.WAA00522@campari.serc.rmit.edu.au> Message-ID: <199902221348.OAA11550@renat.du.etx.ericsson.se> Torbjorn Tornkvist writes: >> Leex has not really been released yet so it is not included in the >> distribution. I am developing it and there is a link on my homepage >> to a Leex page which shows what exists today. Read the caveats! >> Someday I'll release it. > >Come on now Robert ! Why don't you put what you've got >under the User Contrib area ? Perhaps someone else will >finish what's left to do... ;-) I don't like to release code with which I not satisfied! :-) I quite expect people to bugfix and extend the code but I would like to have the basics correct before it is released, especially seeing it must coexist with other parts of the io system. Robert From erlang-maintainers@REDACTED Wed Feb 24 16:00:39 1999 From: erlang-maintainers@REDACTED (erlang-maintainers@REDACTED) Date: 24 Feb 1999 16:00:39 +0100 Subject: Erlang 47.4.1 is now available! Message-ID: We are proud to announce that a new release of Open Source Erlang is available at http://www.erlang.org/ and it's mirror sites. Erlang is a small concurrent functional programming language developed by Ericsson. It is being used by Ericsson as a systems programming language for large concurrent distributed systems. This is the second Open source release of the Erlang programming language and its libraries. The release is called 47.4.1. It has the following improvements and additions to the first release of Open Source Erlang. - Clean build on a variety of targets with both gcc and a variety of cc's - Clean build of the faster BEAM erlang compiler - Much easier build process of the GUI libraries - A new direct interface to tk4.2 is provided which makes it possible to write GUI applications in Erlang with good performance characteristics. This new library is called "etk". - An application called "os_mon" is released. This is an application which makes it possible to monitor the world in the surrounding Operating System from within Erlang. - A new and improved version of the Erlang WWW server is released. - RPM's and binary releases are available for various platforms. - Executables as well as the source code for the win32 platform are released. It is now possible to use the version of Erlang found at http://www.erlang.org to write distributed applications running in heterogeneous environment consisting of unix and win32 machines. The release consists of a tremendous amount of source code and documentation. In particular we have: - The erlang runtime system. - Two different erlang compilers, JAM and BEAM. - The distributed DBMS Mnesia. - A GUI toolkit. - Distributed debugger. - A web server. - A Corba ORB. - An SNMP toolkit. - The Open Telecom Platform system libraries. (release management) All the source code compiles and runs on unixes as well as the win32 platform. We hope you will enjoy it! Best wishes from the Erlang team. From osinski@REDACTED Thu Feb 25 01:11:42 1999 From: osinski@REDACTED (Ed Osinski) Date: Wed, 24 Feb 1999 19:11:42 -0500 Subject: UnixWare -o bug erroneously detected on Solaris machine Message-ID: <19990224191142.C12440@valis.NYU.EDU> While running ./configure, I saw the following several times during the process (for every 'checking for UnixWare -o bug' message): ---------------------------------------------------------------------------- checking for UnixWare -o bug... License Error : Licensing product (Sun WorkShop Compiler C SPARC). License File: /opt/SUNWspro/SC5.0/bin/../../license_dir/sunpro.lic,1 Invalid (inconsistent) license key The license-key and data for the feature do no match. This usually happens when a license file has been altered Feature:workshop.c.sparc License path: FLEXlm error:-8,130. System Error: 0 Error 0 buggy ---------------------------------------------------------------------------- For some reason, I guess it is invoking cc for this test, although the compiler used for at least some other tests is gcc; near the beginning of the configure output I see: ---------------------------------------------------------------------------- checking for gcc... gcc checking whether the C compiler (gcc -R/usr/local/lib) works... yes checking whether the C compiler (gcc -R/usr/local/lib) is a cross-compiler... no checking whether we are using GNU C... yes ---------------------------------------------------------------------------- so I know that gcc was detected properly. I don't have cc installed, or at least, the license has expired. When I explicitly set CC to 'gcc', ./configure reports: ---------------------------------------------------------------------------- checking for UnixWare -o bug... OK ---------------------------------------------------------------------------- I am running on a Solaris 2.6 machine. - Ed Osinski From bparsia@REDACTED Thu Feb 25 01:45:14 1999 From: bparsia@REDACTED (Bijan Parsia) Date: Wed, 24 Feb 1999 19:45:14 -0500 Subject: List comprehensions in queries. In-Reply-To: Message-ID: Are there additional restrictions on list comprehensions in queries? I have the following query: PathLength = length(Path) + Depth, F = fun() -> Q = query [Item || Item <- table(cvn_path_item), lists:prefix(Path, Item.path), length(Item.path) =< PathLength] end, mnemosyne:eval(Q) end, Where #cvn_path_item.path is a list. If I try this I get: {aborted,{badarg,{ets,lookup, [db_get,[mnemosyne_catalog,{image,cvn_path_item}]]}}} But if I do the query, and then do the rest of the list comprehension on the result, it works fine. Help? Cheers, Bijan Parsia. From btu@REDACTED Thu Feb 25 07:55:57 1999 From: btu@REDACTED (Bjorn Turesson) Date: Thu, 25 Feb 1999 07:55:57 +0100 (MET) Subject: List comprehensions in queries. In-Reply-To: Message-ID: On Wed, 24 Feb 1999, Bijan Parsia wrote: > Are there additional restrictions on list comprehensions in queries? > > > I have the following query: > > PathLength = length(Path) + Depth, > F = fun() -> > Q = query [Item || Item <- table(cvn_path_item), > lists:prefix(Path, Item.path), > length(Item.path) =< PathLength] > end, > mnemosyne:eval(Q) > end, > > Where #cvn_path_item.path is a list. > > If I try this I get: > > {aborted,{badarg,{ets,lookup, > [db_get,[mnemosyne_catalog,{image,cvn_path_item}]]}}} > > But if I do the query, and then do the rest of the list comprehension on > the result, it works fine. > > Help? > > Cheers, > Bijan Parsia. I don't have the opensource release testable at my hands, but you did remeber to start mnesia and mnemosyne, didn't you? The following shell interaction works for me (slightly different release) using the code shown below. // Bjoern -------------------------------------------------- btu@REDACTED:mne$ erl Erlang (JAM) emulator version 4.7.3.3 Eshell V4.7.3.3 (abort with ^G) 1> c(q). {ok,q} 2> q:s(). {atomic,ok} 3> q:add_path([1,2,3,4,5]), q:add_path([2,3,4,5,6]), q:add_path([3,4,5,6,7]). {atomic,ok} 4> q:tstPath([2,3,4], 9999). {atomic,[{cvn_path_item,[2,3,4,5,6],undefined}]} -------------------------------------------------- Code as follows: -module(q). -export([s/0,add_path/1, tstPath/2]). -include_lib("mnemosyne/include/mnemosyne.hrl"). -record (cvn_path_item, {path, other_fields}). s () -> mnesia:start (), application:start(mnemosyne), mnesia:create_table (cvn_path_item, [{attributes, record_info(fields, cvn_path_item)}]). add_path (Path) -> Fun = fun () -> mnesia:write (#cvn_path_item{path=Path}) end, mnesia:transaction (Fun). tstPath (Path, Depth) -> PathLength = erlang:length(Path) + Depth, F = fun() -> Q = query [Item || Item <- table(cvn_path_item), lists:prefix(Path, Item.path), erlang:length(Item.path) =< PathLength] end, mnemosyne:eval(Q) end, mnesia:transaction(F). -------------------------------------------------------------- -- Mouse moved last hour: 9.23, today: 9.23, this week: 870.62 (meters) From bparsia@REDACTED Thu Feb 25 11:50:53 1999 From: bparsia@REDACTED (Bijan Parsia) Date: Thu, 25 Feb 1999 05:50:53 -0500 Subject: List comprehensions in queries. In-Reply-To: References: Message-ID: [snip] >I don't have the opensource release testable at my hands, but you did >remeber to start mnesia and mnemosyne, didn't you? >The following shell interaction works for me (slightly different release) >using the code shown below. > > // Bjoern > [snip] No I didn't remember! Well, I remembered to start mnesia, but not mnemosyne. Since "plain" queries were working I didn't even suspect I had too. Thanks, you completely solved my problem and I'm much happier now :) And this works find in the latest open source release. Cheers, Bijan Parsia. From tobbe@REDACTED Sat Feb 27 21:25:38 1999 From: tobbe@REDACTED (Torbjorn Tornkvist) Date: Sun, 28 Feb 1999 07:25:38 +1100 Subject: Non-web applications In-Reply-To: <01be6241$bcbdbc60$0900a8c0@vinho.elmo.net.br> References: <01be6241$bcbdbc60$0900a8c0@vinho.elmo.net.br> Message-ID: <199902272025.HAA00349@campari.serc.rmit.edu.au> juliana> Is it possble to use Eddie as a high-availability solution for other = juliana> applications than a web server, like database? juliana> juliana> Juliana A. de Freitas juliana> juliana@REDACTED juliana> Elmo Cal=E7ados S.A. maurice> If you require a high availability distributed database you could look at maurice> Mnesia. We actually use Mnesia within Eddie to distribute state information. Just want to add the info about Mnesia can be found at: http://www.erlang.org /Tobbe