From sds@usa.net Thu Apr 2 14:57:18 1998 Received: from uhura.concentric.net (uhura.concentric.net [206.173.119.93]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id OAA28630 for ; Thu, 2 Apr 1998 14:57:17 -0800 (PST) Received: from marconi.concentric.net (marconi [206.173.119.71]) by uhura.concentric.net (8.8.8/(98/01/20 5.9)) id RAA26217; Thu, 2 Apr 1998 17:57:57 -0500 (EST) [1-800-745-2747 The Concentric Network] Errors-To: Received: from mute.eaglets.com (ts005d07.phe-pa.concentric.net [209.31.154.211]) by marconi.concentric.net (8.8.8) id RAA12904; Thu, 2 Apr 1998 17:57:53 -0500 (EST) Received: (from sds@localhost) by mute.eaglets.com (8.8.7/8.8.7) id RAA12985; Thu, 2 Apr 1998 17:28:26 -0500 To: Bruno Haible Subject: socket-connect Return-Receipt-To: sds@usa.net X-Disclaimer: You should not expect anyone to agree with me. X-Attribution: Sam X-No-Archive: Yes From: Sam Steingold Date: 02 Apr 1998 17:27:55 -0500 Message-ID: Lines: 9 Is there a way to set timeout on socket-connect? It seems to be rather large right now. Thanks. -- Sam Steingold, running RedHat5 GNU/Linux (http://www.linux.org) Micros**t is not the answer. Micros**t is a question, and the answer is Linux, the choice of the GNU (http://www.gnu.org) generation. The software said it requires Windows 3.1 or better, so I installed Linux. From Francois.Girault@etu.info.unicaen.fr Fri Apr 3 00:53:37 1998 Received: from asterix.etu.info.unicaen.fr (asterix.etu.info.unicaen.fr [193.55.130.51]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id AAA00715 for ; Fri, 3 Apr 1998 00:51:21 -0800 (PST) Received: from cubitus (ppp4.etu.info.unicaen.fr [193.55.130.74]) by asterix.etu.info.unicaen.fr (8.7.5/8.7.3) with SMTP id KAA00961 for ; Fri, 3 Apr 1998 10:26:09 +0200 (MET DST) Sender: root@asterix.etu.info.unicaen.fr Message-ID: <35249D2E.1ABD7DD1@etu.info.unicaen.fr> Date: Fri, 03 Apr 1998 10:26:22 +0200 From: François GIRAULT X-Mailer: Mozilla 2.0 (X11; I; Linux 2.0.30 i486) MIME-Version: 1.0 To: clisp-list@clisp.cons.org Subject: socket-connect References: <35249C46.7A1C8ABE@etu.info.unicaen.fr> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit How to use socket whith UDP protocol instead of TCP/IP protocol ? The functions socket-connect ..., seems to connect whith TCP/IP but not whith UDP -- François GIRAULT mail : François.Girault@etu.info.unicaen.fr Tel: 02-31-85-62-18 DEA Intelligence Artificielle & Algorithmique Université de Caen From haible@ilog.fr Fri Apr 3 05:47:51 1998 Received: from sceaux.ilog.fr (sceaux.ilog.fr [193.55.64.10]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id FAA01763 for ; Fri, 3 Apr 1998 05:47:44 -0800 (PST) Received: from ilog.ilog.fr ([172.17.4.60]) by sceaux.ilog.fr (8.8.8/8.8.7) with ESMTP id PAA17927 for ; Fri, 3 Apr 1998 15:47:42 +0200 (MET DST) Received: from halles.ilog.fr (halles.ilog.fr [172.16.1.96]) by ilog.ilog.fr (8.8.8/8.7.3) with ESMTP id PAA28433; Fri, 3 Apr 1998 15:47:51 +0200 (MET DST) From: Bruno Haible Received: (from haible@localhost) by halles.ilog.fr (8.8.5/8.8.5) id PAA17141; Fri, 3 Apr 1998 15:47:49 +0200 (MET DST) Date: Fri, 3 Apr 1998 15:47:49 +0200 (MET DST) Message-Id: <199804031347.PAA17141@halles.ilog.fr> To: clisp-list@clisp.cons.org Subject: Re: socket-connect In-Reply-To: In-Reply-To: <35249D2E.1ABD7DD1@etu.info.unicaen.fr> References: References: <35249D2E.1ABD7DD1@etu.info.unicaen.fr> Sam Steingold wrote: > Is there a way to set timeout on socket-connect? > It seems to be rather large right now. You can try to modify the clisp sources: In socket.d, function `create_client_socket', you could add a call to `setsockopt' with parameter SO_SNDTIMEO or SO_RCVTIMEO. But I don't know whether this will affect only the data transmission timeout or also the timeout for establishing the connection. François GIRAULT wrote: > How to use socket whith UDP protocol instead of TCP/IP protocol ? > The functions socket-connect ..., seems to connect with TCP/IP but not > with UDP For UDP connections, you have to modify the clisp sources too. Bruno From sds@usa.net Tue Apr 7 09:58:58 1998 Received: from uhura.concentric.net (uhura.concentric.net [206.173.119.93]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id JAA12776 for ; Tue, 7 Apr 1998 09:58:58 -0700 (PDT) Received: from cliff.concentric.net (cliff [206.173.119.90]) by uhura.concentric.net (8.8.8/(98/01/20 5.9)) id NAA24437; Tue, 7 Apr 1998 13:00:11 -0400 (EDT) [1-800-745-2747 The Concentric Network] Errors-To: Received: from mute.eaglets.com (ts005d04.phe-pa.concentric.net [209.31.154.208]) by cliff.concentric.net (8.8.8) id NAA26366; Tue, 7 Apr 1998 13:00:08 -0400 (EDT) Received: (from sds@localhost) by mute.eaglets.com (8.8.7/8.8.7) id KAA00204; Tue, 7 Apr 1998 10:08:30 -0400 To: clisp-devel@seagull.cons.org, clisp-list@clisp.cons.org Subject: boolean Return-Receipt-To: sds@usa.net X-Disclaimer: You should not expect anyone to agree with me. X-Attribution: Sam X-No-Archive: Yes From: Sam Steingold Date: 07 Apr 1998 10:08:30 -0400 Message-ID: Lines: 26 X-Mailer: Gnus v5.5/Emacs 20.2 CLISP: [COMMON-LISP-USER]> (typep nil 'boolean) *** - typep: invalid type specification boolean [COMMON-LISP-USER]> CLHS: Type BOOLEAN Supertypes: boolean, symbol, t Description: The type boolean contains the symbols t and nil, which represent true and false, respectively. Thanks. -- Sam Steingold, running RedHat5 GNU/Linux (http://www.linux.org) Micros**t is not the answer. Micros**t is a question, and the answer is Linux, the choice of the GNU (http://www.gnu.org) generation. Single tasking: Just Say No. From haible@ilog.fr Tue Apr 7 10:57:50 1998 Received: from sceaux.ilog.fr (sceaux.ilog.fr [193.55.64.10]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id KAA05647 for ; Tue, 7 Apr 1998 10:57:46 -0700 (PDT) Received: from ilog.ilog.fr ([172.17.4.2]) by sceaux.ilog.fr (8.8.8/8.8.7) with ESMTP id TAA05766 for ; Tue, 7 Apr 1998 19:58:10 +0200 (MET DST) Received: from halles.ilog.fr (halles.ilog.fr [172.16.1.96]) by ilog.ilog.fr (8.8.8/8.7.3) with ESMTP id TAA09538; Tue, 7 Apr 1998 19:58:07 +0200 (MET DST) From: Bruno Haible Received: (from haible@localhost) by halles.ilog.fr (8.8.5/8.8.5) id TAA25319; Tue, 7 Apr 1998 19:58:07 +0200 (MET DST) Date: Tue, 7 Apr 1998 19:58:07 +0200 (MET DST) Message-Id: <199804071758.TAA25319@halles.ilog.fr> To: clisp-list@clisp.cons.org Subject: Re: boolean In-Reply-To: References: Sam Steingold writes: > CLISP: > [COMMON-LISP-USER]> (typep nil 'boolean) > > *** - typep: invalid type specification boolean Try this: (in-package "LISP") (when (find-package "FFI") (import (find-symbol "BOOLEAN" (find-package "FFI")))) (export 'boolean) (deftype boolean () '(member nil t)) (in-package "COMMON-LISP") (export 'lisp:boolean) Bruno From igor@pobox.com Tue Apr 7 15:00:08 1998 Received: from belltower.dyn.ml.org (host181.209-113-208.oemnetworks.com [209.113.208.181]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id PAA19005 for ; Tue, 7 Apr 1998 15:00:07 -0700 (PDT) From: igor@pobox.com Received: (from igor@localhost) by belltower.dyn.ml.org (8.8.8/8.8.7) id QAA28890; Tue, 7 Apr 1998 16:18:18 -0400 Message-ID: <19980407161815.63938@belltower.dyn.ml.org> Date: Tue, 7 Apr 1998 16:18:15 -0400 To: clisp-list@clisp.cons.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i I'm having trouble compiling CLISP under MkLinux: First of all, in unixaux.d, __fpu_control is declared, however it has already been declared in /usr/include/fpu_control.h. Anyhow, I added a '0 &&' in front of that, and it finished compiling all of the C files. However, after lisp.run has been sucessfully compiled and the .lsp files are being loaded, it seg-faults just after macros1.lsp finishes loading. A bit of poking with gdb indicates that it failed in the gc_mark() function. Has anyone experienced similar trouble? Thanks. -igor From haible@ilog.fr Tue Apr 7 15:26:12 1998 Received: from sceaux.ilog.fr (sceaux.ilog.fr [193.55.64.10]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id PAA19269 for ; Tue, 7 Apr 1998 15:26:11 -0700 (PDT) Received: from ilog.ilog.fr ([172.17.4.2]) by sceaux.ilog.fr (8.8.8/8.8.7) with ESMTP id AAA11720 for ; Wed, 8 Apr 1998 00:26:44 +0200 (MET DST) Received: from halles.ilog.fr (halles.ilog.fr [172.16.1.96]) by ilog.ilog.fr (8.8.8/8.7.3) with ESMTP id AAA15934; Wed, 8 Apr 1998 00:26:40 +0200 (MET DST) From: Bruno Haible Received: (from haible@localhost) by halles.ilog.fr (8.8.5/8.8.5) id AAA22848; Wed, 8 Apr 1998 00:26:41 +0200 (MET DST) Date: Wed, 8 Apr 1998 00:26:41 +0200 (MET DST) Message-Id: <199804072226.AAA22848@halles.ilog.fr> To: clisp-list@clisp.cons.org Subject: Re: building clisp on mklinux In-Reply-To: <19980407161815.63938@belltower.dyn.ml.org> References: <19980407161815.63938@belltower.dyn.ml.org> Jeff Dubrule writes: > I'm having trouble compiling CLISP under MkLinux: > > First of all, in unixaux.d, __fpu_control is declared, however it has > already been declared in /usr/include/fpu_control.h. Anyhow, I added a '0 > &&' in front of that, and it finished compiling all of the C files. To see whether this was right, start lisp.run and enter (/ 1.0d0 0.0d0) . If that gives an error message, fine. If it gives a core dump, you should better make the definition in unixaux.d match the one in /usr/include/fpu_control.h . > However, after lisp.run has been sucessfully compiled and the .lsp files are > being loaded, it seg-faults just after macros1.lsp finishes loading. A bit > of poking with gdb indicates that it failed in the gc_mark() function. Please try to add -DSAFETY=3 to the CFLAGS, remove all the *.o files and recompile. Do you get further this way? Btw, what version of clisp is this, and what version of gcc are you using? Bruno From igor@pobox.com Tue Apr 7 16:30:44 1998 Received: from belltower.dyn.ml.org (host68.209-113-208.oemnetworks.com [209.113.208.68]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id QAA19740 for ; Tue, 7 Apr 1998 16:29:26 -0700 (PDT) From: igor@pobox.com Received: (from igor@localhost) by belltower.dyn.ml.org (8.8.8/8.8.7) id TAA02724; Tue, 7 Apr 1998 19:34:25 -0400 Message-ID: <19980407193423.B30008@belltower.dyn.ml.org> Date: Tue, 7 Apr 1998 19:34:23 -0400 To: clisp-list@clisp.cons.org Subject: Re: building clisp on mklinux References: <199804072226.AAA22848@halles.ilog.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.90.12i In-Reply-To: <199804072226.AAA22848@halles.ilog.fr>; from Bruno Haible on Tue, Apr 07, 1998 at 03:26:34PM -0700 On Tue, Apr 07, 1998 at 03:26:34PM -0700, Bruno Haible wrote: > > To see whether this was right, start lisp.run and enter (/ 1.0d0 0.0d0) . It gives an error message nicely. > Please try to add -DSAFETY=3 to the CFLAGS, remove all the *.o files > and recompile. Do you get further this way? It crashes at exactly the same point. > Btw, what version of clisp is this, and what version of gcc are you using? This is clisp dated 1997-12-06. Is this the latest? The current C compiler for MkLinux is egcs version 1.0, release 2e. I've heard no complaints about incompatibility/instability about this compiler. People, in fact, seem to find a 15-20% performance increase under it. -igor From haible@ilog.fr Thu Apr 9 12:04:43 1998 Received: from sceaux.ilog.fr (sceaux.ilog.fr [193.55.64.10]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id MAA27159 for ; Thu, 9 Apr 1998 12:04:42 -0700 (PDT) Received: from ilog.ilog.fr ([172.17.4.52]) by sceaux.ilog.fr (8.8.8/8.8.7) with ESMTP id VAA25197; Thu, 9 Apr 1998 21:05:31 +0200 (MET DST) Received: from halles.ilog.fr (halles.ilog.fr [172.16.1.96]) by ilog.ilog.fr (8.8.8/8.7.3) with ESMTP id VAA02971; Thu, 9 Apr 1998 21:05:29 +0200 (MET DST) From: Bruno Haible Received: (from haible@localhost) by halles.ilog.fr (8.8.5/8.8.5) id VAA22244; Thu, 9 Apr 1998 21:05:27 +0200 (MET DST) Date: Thu, 9 Apr 1998 21:05:27 +0200 (MET DST) Message-Id: <199804091905.VAA22244@halles.ilog.fr> To: clisp-list@clisp.cons.org Cc: Stephen Anderson Subject: Re: building clisp on mklinux In-Reply-To: <19980407193423.B30008@belltower.dyn.ml.org> References: <19980407193423.B30008@belltower.dyn.ml.org> wrote: > I'm having trouble compiling CLISP under MkLinux: OK, with the help of Stephen Anderson , who gave me a guest account on a MkLinux machine, I was able to fix the problem: only the top 7 bits can be used for type tagging on this platform, not the top 8 bits. The binaries and source patch are in ftp://clisp.cons.org/pub/lisp/clisp/binaries/powerpc-mklinux-libc6/ and http://clisp.cons.org/~haible/clisp-archive/binaries/powerpc-mklinux-libc6/1997-12-06/ Bruno From sds@usa.net Tue Apr 14 12:30:06 1998 Received: from darius.concentric.net (darius.concentric.net [207.155.184.79]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id MAA07536 ; Tue, 14 Apr 1998 12:30:05 -0700 (PDT) Received: from newman.concentric.net (newman.concentric.net [207.155.184.71]) by darius.concentric.net (8.8.8/(98/01/20 5.9)) id PAA05124; Tue, 14 Apr 1998 15:30:14 -0400 (EDT) [1-800-745-2747 The Concentric Network] Errors-To: Received: from mute.eaglets.com (ts007d12.phe-pa.concentric.net [209.31.155.72]) by newman.concentric.net (8.8.8) id PAA00425; Tue, 14 Apr 1998 15:30:12 -0400 (EDT) Received: (from sds@localhost) by mute.eaglets.com (8.8.7/8.8.7) id RAA19990; Mon, 13 Apr 1998 17:04:33 -0400 To: Bruno Haible , clisp-devel@clisp.cons.org Subject: clisp reading stdin Return-Receipt-To: sds@usa.net X-Disclaimer: You should not expect anyone to agree with me. X-Attribution: Sam X-No-Archive: Yes From: Sam Steingold Date: 13 Apr 1998 17:03:41 -0400 Message-ID: Lines: 15 select "(+ 1 2) (+ 3 4)" (sans quotes) and paste it into an xterm with clisp. "3" is printed (i.e., only the first expression is evaluated). If you paste the same text into, acl, cmucl or gcl, both "3" and "7" are printed. -- Sam Steingold, running RedHat5 GNU/Linux (http://www.linux.org) Micros**t is not the answer. Micros**t is a question, and the answer is Linux, the choice of the GNU (http://www.gnu.org) generation. (let ((a "(let ((a %c%s%c)) (format a 34 a 34))")) (format a 34 a 34)) From sds@usa.net Tue Apr 14 15:05:58 1998 Received: from darius.concentric.net (darius.concentric.net [207.155.184.79]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id PAA08283 for ; Tue, 14 Apr 1998 15:05:53 -0700 (PDT) Received: from newman.concentric.net (newman.concentric.net [207.155.184.71]) by darius.concentric.net (8.8.8/(98/01/20 5.9)) id SAA06396; Tue, 14 Apr 1998 18:06:02 -0400 (EDT) [1-800-745-2747 The Concentric Network] Errors-To: Received: from mute.eaglets.com (ts007d12.phe-pa.concentric.net [209.31.155.72]) by newman.concentric.net (8.8.8) id SAA20105; Tue, 14 Apr 1998 18:06:00 -0400 (EDT) Received: (from sds@localhost) by mute.eaglets.com (8.8.7/8.8.7) id SAA07308; Tue, 14 Apr 1998 18:08:38 -0400 To: clisp-devel@seagull.cons.org, clisp-list@clisp.cons.org Subject: license Return-Receipt-To: sds@usa.net X-Disclaimer: You should not expect anyone to agree with me. X-Attribution: Sam X-No-Archive: Yes From: Sam Steingold Date: 14 Apr 1998 18:08:37 -0400 Message-ID: Lines: 21 X-Mailer: Gnus v5.5/Emacs 20.2 What is the reason for licensing clisp under GPL (as opposed to LGPL, as GCL and glibc are licensed)? Yes, I know that GCC is under GPL, not LGPL, but binaries produced by GCC can be put under any copyright. Since clisp doesn't produce binaries, the only way to distribute a CL program using CLISP is to dump the code into the memory image. Now this would be a derived work, so the source (*.lsp) would be required to be distributed. OTOH, if CLISP were licensed under LGPL, only the compiled files would have to be distributed (*.fas). It does look like an unnecessary restriction to me. This is a purely academic question. I am doing only in-house development, and none of my code will be distributed. Whatever I write in my leisure time is GPLed anyway. -- Sam Steingold, running RedHat5 GNU/Linux (http://www.linux.org) Micros**t is not the answer. Micros**t is a question, and the answer is Linux, the choice of the GNU (http://www.gnu.org) generation. Garbage In, Gospel Out From haible@ilog.fr Wed Apr 15 05:40:32 1998 Received: from sceaux.ilog.fr (sceaux.ilog.fr [193.55.64.10]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id FAA11707 for ; Wed, 15 Apr 1998 05:40:27 -0700 (PDT) Received: from ilog.ilog.fr ([172.17.4.54]) by sceaux.ilog.fr (8.8.8/8.8.7) with ESMTP id OAA21162 for ; Wed, 15 Apr 1998 14:39:32 +0200 (MET DST) Received: from halles.ilog.fr (halles.ilog.fr [172.16.1.96]) by ilog.ilog.fr (8.8.8/8.7.3) with ESMTP id OAA23884; Wed, 15 Apr 1998 14:39:45 +0200 (MET DST) From: Bruno Haible Received: (from haible@localhost) by halles.ilog.fr (8.8.5/8.8.5) id OAA09091; Wed, 15 Apr 1998 14:39:42 +0200 (MET DST) Date: Wed, 15 Apr 1998 14:39:42 +0200 (MET DST) Message-Id: <199804151239.OAA09091@halles.ilog.fr> To: clisp-list@clisp.cons.org Subject: Re: license In-Reply-To: References: Sam Steingold writes: > What is the reason for licensing clisp under GPL (as opposed to LGPL, as > GCL and glibc are licensed)? 1. Because the readline library used in clisp is under GPL. 2. Because I consider LGPL to be too weak. > Yes, I know that GCC is under GPL, not LGPL, but binaries produced by > GCC can be put under any copyright. Since clisp doesn't produce > binaries, the only way to distribute a CL program using CLISP is to dump > the code into the memory image. Now this would be a derived work, so > the source (*.lsp) would be required to be distributed. Some exceptions to the GPL are stated in clisp's COPYRIGHT file. Let me summarize: - One way to distribute an application is to distribute multiple .fas files (or to concatenate them into a single .fas file). These are normally not infected by clisp's GPL. "Normally" means: If they don't rely on CLISP internals and would as well run in any other Common Lisp implementation. (That is, if you write, say, a better debugger for CLISP, it will necessarily use CLISP internals and therefore have to be put under GPL.) - If you distribute a memory image, I want users to be able to modify the clisp in which your application runs (for example, in order to fix bugs like the cut&paste one you mentioned yesterday). This imposes a few more restrictions: You have to accompany your distribution with the sources of clisp and with the .lsp or .fas files which you used to build the memory image. Bruno From haible@ilog.fr Thu Apr 16 05:57:40 1998 Received: from sceaux.ilog.fr (sceaux.ilog.fr [193.55.64.10]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id FAA02351 for ; Thu, 16 Apr 1998 05:57:38 -0700 (PDT) Received: from ilog.ilog.fr ([172.17.4.54]) by sceaux.ilog.fr (8.8.8/8.8.7) with ESMTP id OAA24006 for ; Thu, 16 Apr 1998 14:56:58 +0200 (MET DST) Received: from halles.ilog.fr (halles.ilog.fr [172.16.1.96]) by ilog.ilog.fr (8.8.8/8.7.3) with ESMTP id OAA20122; Thu, 16 Apr 1998 14:57:35 +0200 (MET DST) From: Bruno Haible Received: (from haible@localhost) by halles.ilog.fr (8.8.5/8.8.5) id OAA06604; Thu, 16 Apr 1998 14:57:35 +0200 (MET DST) Date: Thu, 16 Apr 1998 14:57:35 +0200 (MET DST) Message-Id: <199804161257.OAA06604@halles.ilog.fr> To: clisp-list@clisp.cons.org Subject: Re: clisp reading stdin In-Reply-To: References: Sam Steingold writes: > select > "(+ 1 2) > (+ 3 4)" > (sans quotes) and paste it into an xterm with clisp. "3" is printed > (i.e., only the first expression is evaluated). This should be fixed in the next release. Thanks for reporting it. Bruno From sds@usa.net Thu Apr 23 14:03:28 1998 Received: from darius.concentric.net (darius.concentric.net [207.155.184.79]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id OAA13997 for ; Thu, 23 Apr 1998 14:03:27 -0700 (PDT) Received: from newman.concentric.net (newman.concentric.net [207.155.184.71]) by darius.concentric.net (8.8.8/(98/04/23 5.10)) id RAA15832; Thu, 23 Apr 1998 17:04:18 -0400 (EDT) [1-800-745-2747 The Concentric Network] Errors-To: Received: from mute.eaglets.com (ts005d08.phe-pa.concentric.net [209.31.154.212]) by newman.concentric.net (8.8.8) id RAA11776; Thu, 23 Apr 1998 17:04:14 -0400 (EDT) Received: (from sds@localhost) by mute.eaglets.com (8.8.7/8.8.7) id RAA29802; Thu, 23 Apr 1998 17:06:59 -0400 To: clisp-devel@seagull.cons.org, clisp-list@clisp.cons.org Subject: ansi cl floating point contagion Return-Receipt-To: sds@usa.net X-Disclaimer: You should not expect anyone to agree with me. X-Attribution: Sam X-No-Archive: Yes From: Sam Steingold Date: 23 Apr 1998 17:06:58 -0400 Message-ID: Lines: 206 X-Mailer: Gnus v5.5/Emacs 20.2 By a devious trick I managed to con Bruno into putting a mark at each spot where floating contagion occurs (actually, this was not a trick: I really did need the lisp:*warn-on-floating-point-contagion* variable, but now I could use it to fix the problem :-). Now I looked at all these places and made CLISP conform to the ANSI CL specs. After applying this patch you type "cd src; make CFLAGS="-O2 -s -DFLOAT_ANSI" and get a CLISP which conforms with the ANSI CL as far as the floating point contagion is concerned. On top of that, it should be smaller (just a trifle) and faster (probably) because the lisp:*warn-on-floating-point-contagion* is now gone and no check for it is performed at each FP operation and no backwards conversion if ever performed (like SF_x + DF_y --> was: SF(DF+(DF(x),y)), now: DF+(DF(x),y)). I would greatly appreciate comments and criticism. Note that *I* could not build clisp because of make: *** No rule to make target `callback/callback.h', needed by `foreign.o'. I would also appreciate if a kind soul added a --with-float-ansi a ./configure option. Thanks. -- Sam Steingold, running RedHat5 GNU/Linux (http://www.linux.org) Micros**t is not the answer. Micros**t is a question, and the answer is Linux, the choice of the GNU (http://www.gnu.org) generation. There are two kinds of egotists: 1) Those who admit it 2) The rest of us *** src/flo_rest.d.old Thu Apr 23 15:47:43 1998 --- src/flo_rest.d Thu Apr 23 16:07:10 1998 *************** *** 24,29 **** --- 24,30 ---- #endif + #ifndef FLOAT_ANSI # Warnt, wenn Floats verschiedenen Typs kombiniert werden. # warn_floating_point_contagion(); # kann GC auslösen *************** *** 35,41 **** pushSTACK(NIL); funcall(S(warn),3); } ! # Generiert eine Float-Operation F_op_F wie F_minus_F oder F_durch_F #define GEN_F_op1(op) \ --- 36,42 ---- pushSTACK(NIL); funcall(S(warn),3); } ! #endif # Generiert eine Float-Operation F_op_F wie F_minus_F oder F_durch_F #define GEN_F_op1(op) \ *************** *** 101,106 **** --- 102,165 ---- # s (=0 oder 1): Da LF_LF_comp Long-Floats verschiedener Längen verarbeitet, # braucht bei s=1 ein SF, FF oder DF nur zu einem LF der Länge LF_minlen # gemacht zu werden. + #ifdef FLOAT_ANSI + #define GEN_F_op2(arg1,arg2,SF_op,FF_op,DF_op,LF_op,r,s,RETURN) \ + { floatcase(arg1, \ + /* arg1 SF */ { floatcase(arg2, \ + /* arg2 SF */ { RETURN SF_op(arg1,arg2); }, \ + /* arg2 FF */ { pushSTACK(arg2); \ + arg1 = SF_to_FF(arg1); arg2 = popSTACK(); \ + RETURN FF_op(arg1,arg2); }, \ + /* arg2 DF */ { pushSTACK(arg2); \ + arg1 = SF_to_DF(arg1); arg2 = popSTACK(); \ + RETURN DF_op(arg1,arg2); }, \ + /* arg2 LF */ { pushSTACK(arg2); \ + arg1 = SF_to_LF(arg1,CONCAT(LFlen,s)(arg2)); arg2 = popSTACK(); \ + RETURN LF_op(arg1,arg2); } \ + ); \ + }, \ + /* arg1 FF */ { floatcase(arg2, \ + /* arg2 SF */ { pushSTACK(arg1); \ + arg2 = SF_to_FF(arg2); arg1 = popSTACK(); \ + RETURN FF_op(arg1,arg2); }, \ + /* arg2 FF */ { RETURN FF_op(arg1,arg2); }, \ + /* arg2 DF */ { pushSTACK(arg2); \ + arg1 = FF_to_DF(arg1); arg2 = popSTACK(); \ + RETURN DF_op(arg1,arg2); }, \ + /* arg2 LF */ { pushSTACK(arg2); \ + arg1 = FF_to_LF(arg1,CONCAT(LFlen,s)(arg2)); arg2 = popSTACK(); \ + RETURN LF_op(arg1,arg2); } \ + ); \ + }, \ + /* arg1 DF */ { floatcase(arg2, \ + /* arg2 SF */ { pushSTACK(arg1); \ + arg2 = SF_to_DF(arg2); arg1 = popSTACK(); \ + RETURN DF_op(arg1,arg2); }, \ + /* arg2 FF */ { pushSTACK(arg1); \ + arg2 = FF_to_DF(arg2); arg1 = popSTACK(); \ + RETURN DF_op(arg1,arg2); }, \ + /* arg2 DF */ { RETURN DF_op(arg1,arg2); }, \ + /* arg2 LF */ { pushSTACK(arg2); \ + arg1 = DF_to_LF(arg1,CONCAT(LFlen,s)(arg2)); arg2 = popSTACK(); \ + RETURN LF_op(arg1,arg2); } \ + ); \ + }, \ + /* arg1 LF */ { floatcase(arg2, \ + /* arg2 SF */ { pushSTACK(arg1); \ + arg2 = SF_to_LF(arg2,CONCAT(LFlen,s)(arg1)); arg1 = popSTACK(); \ + RETURN LF_op(arg1,arg2); }, \ + /* arg2 FF */ { pushSTACK(arg1); \ + arg2 = FF_to_LF(arg2,CONCAT(LFlen,s)(arg1)); arg1 = popSTACK(); \ + RETURN LF_op(arg1,arg2); }, \ + /* arg2 DF */ { pushSTACK(arg1); \ + arg2 = DF_to_LF(arg2,CONCAT(LFlen,s)(arg1)); arg1 = popSTACK(); \ + RETURN LF_op(arg1,arg2); }, \ + /* arg2 LF */ { CONCAT(GEN_LF_op2_,s)(arg1,arg2,LF_op,r,_EMA_ RETURN); } \ + ); \ + } \ + ); \ + } + #else #define GEN_F_op2(arg1,arg2,SF_op,FF_op,DF_op,LF_op,r,s,RETURN) \ { floatcase(arg1, \ /* arg1 SF */ { floatcase(arg2, \ *************** *** 211,216 **** --- 270,276 ---- } \ ); \ } + #endif # Hilfmacro, wenn arg1 und arg2 beide LF sind: #define GEN_LF_op2_0(arg1,arg2,LF_op,r,ergebnis_zuweisung) \ { var uintC len1 = TheLfloat(arg1)->len; \ *** src/constsym.d.old Thu Apr 23 15:45:46 1998 --- src/constsym.d Thu Apr 23 15:47:14 1998 *************** *** 1320,1326 **** --- 1320,1328 ---- LISPSYM(traced_definition,"TRACED-DEFINITION",system) # als Property in SYMBOL LISPSYM(gensym_counter,"*GENSYM-COUNTER*",lisp) # als Variable in SYMBOL LISPSYM(inhibit_floating_point_underflow,"*INHIBIT-FLOATING-POINT-UNDERFLOW*",system) # als Variable in LISPARIT + #ifndef FLOAT_ANSI LISPSYM(warn_on_floating_point_contagion,"*WARN-ON-FLOATING-POINT-CONTAGION*",lisp) + #endif LISPSYM(pi,"PI",lisp) # als Variable in LISPARIT LISPSYM(number,"NUMBER",lisp) # als Typ für LISPARIT LISPSYM(real,"REAL",lisp) # als Typ für LISPARIT *** src/lisparit.d.old Thu Apr 23 16:07:59 1998 --- src/lisparit.d Thu Apr 23 16:08:50 1998 *************** *** 1860,1867 **** --- 1860,1869 ---- define_variable(S(pi),x); # SYS::*INHIBIT-FLOATING-POINT-UNDERFLOW* := NIL define_variable(S(inhibit_floating_point_underflow),NIL); + #ifndef FLOAT_ANSI # *WARN-ON-FLOATING-POINT-CONTAGION* := T define_variable(S(warn_on_floating_point_contagion),T); + #endif } } *** src/realelem.d.old Thu Apr 23 16:09:27 1998 --- src/realelem.d Thu Apr 23 16:17:14 1998 *************** *** 122,129 **** --- 122,134 ---- { #define X { return x; } #define Y { return y; } + #ifdef FLOAT_ANSI + #define WX Y + #define WY X + #else #define WX goto warn_x; #define WY goto warn_y; + #endif if (R_rationalp(x)) Y elif (R_rationalp(y)) X else *************** *** 137,142 **** --- 142,148 ---- else WY }) ); + #ifndef FLOAT_ANSI warn_x: if (!nullp(Symbol_value(S(warn_on_floating_point_contagion)))) { pushSTACK(x); warn_floating_point_contagion(); x = popSTACK(); } *************** *** 145,150 **** --- 151,157 ---- if (!nullp(Symbol_value(S(warn_on_floating_point_contagion)))) { pushSTACK(y); warn_floating_point_contagion(); y = popSTACK(); } return y; + #endif #undef WY #undef WX #undef Y From hoehle@zeus.gmd.de Sun Apr 26 13:46:48 1998 Received: from mail.gmd.de (mail.gmd.de [129.26.8.90]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id NAA00406 for ; Sun, 26 Apr 1998 13:46:43 -0700 (PDT) Received: from zeus.gmd.de (zeus.gmd.de [129.26.145.1]) by mail.gmd.de (8.8.8/8.8.8) with SMTP id WAA03088 for ; Sun, 26 Apr 1998 22:47:59 +0200 (MET DST) Received: from kir ([141.12.144.207]) by zeus.gmd.de with SMTP id AA11337 (5.67b8/IDA-1.5 for ); Sun, 26 Apr 1998 22:47:30 +0200 Date: Sun, 26 Apr 1998 22:47:30 +0200 Message-Id: <199804262047.AA11337@zeus.gmd.de> From: Joerg.Hoehle@gmd.de (Jorg-Cyril Hohle) To: clisp-list@clisp.cons.org Subject: CLISP compiled with egcs compiler? Hi, did anybody try the above on any platform? Jo"rg Ho"hle. Joerg.Hoehle@gmd.de http://zeus.gmd.de/~hoehle/amiga-clisp.html From igor@pobox.com Sun Apr 26 21:00:14 1998 Received: from belltower.dyn.ml.org ([206.190.211.96]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id VAA01857 for ; Sun, 26 Apr 1998 21:00:12 -0700 (PDT) From: igor@pobox.com Received: (from igor@localhost) by belltower.dyn.ml.org (8.8.8/8.8.7) id SAA16624; Sun, 26 Apr 1998 18:37:49 -0400 Message-ID: <19980426183747.Q7774@belltower.dyn.ml.org> Date: Sun, 26 Apr 1998 18:37:47 -0400 To: clisp-list@clisp.cons.org Subject: Re: CLISP compiled with egcs compiler? References: <199804262047.AA11337@zeus.gmd.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.90.12i In-Reply-To: <199804262047.AA11337@zeus.gmd.de>; from Jorg-Cyril Hohle on Sun, Apr 26, 1998 at 01:48:11PM -0700 On Sun, Apr 26, 1998 at 01:48:11PM -0700, Jorg-Cyril Hohle wrote: > > did anybody try the above on any platform? Yup. It compiled fine (after Bruno's hack (thanks!)) on my MkLinux machine using egcs 1.0. -igor From Francois.Girault@etu.info.unicaen.fr Mon Apr 27 07:41:07 1998 Received: from asterix.etu.info.unicaen.fr (asterix.etu.info.unicaen.fr [193.55.130.51]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id HAA04156 for ; Mon, 27 Apr 1998 07:41:03 -0700 (PDT) Received: from gn2.etu.info.unicaen.fr (girault@gn2 [193.55.130.187]) by asterix.etu.info.unicaen.fr (8.9.0.Beta5/8.9.0.Beta5) with SMTP id QAA20473 for ; Mon, 27 Apr 1998 16:41:45 +0200 (MET DST) Sender: girault@etu.info.unicaen.fr Message-ID: <35449926.333A11C6@etu.info.unicaen.fr> Date: Mon, 27 Apr 1998 16:41:42 +0200 From: Francois Girault X-Mailer: Mozilla 3.04 (X11; I; Linux 2.0.33 i586) MIME-Version: 1.0 To: clisp-list@clisp.cons.org Subject: CLisp and thread References: <199804262047.AA11337@zeus.gmd.de> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I want to know if there is a Commonlisp package to use the threads. If not, there is an implementation of Clisp that accept the threads ? Thanks -- François GIRAULT mail : François.Girault@etu.info.unicaen.fr DEA Intelligence Artificielle & Algorithmique Université de Caen From bernardp@CLI.DI.Unipi.IT Mon Apr 27 08:14:52 1998 Received: from mailserver.cli.di.unipi.it (alice.cli.di.unipi.it [131.114.11.37]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id IAA04518 for ; Mon, 27 Apr 1998 08:14:36 -0700 (PDT) Organization: Centro di Calcolo - Dipartimento di Informatica di Pisa - Italy Received: from helen.cli.di.unipi.it (helen.cli.di.unipi.it [131.114.11.38]) by mailserver.cli.di.unipi.it (8.7.5/8.7.3) with ESMTP id RAA06053; Mon, 27 Apr 1998 17:16:03 +0200 (MET DST) From: Pierpaolo Bernardi Received: (bernardp@localhost) by helen.cli.di.unipi.it (8.7.5/8.6.12) id RAA29028; Mon, 27 Apr 1998 17:15:59 +0200 (MET DST) Message-Id: <199804271515.RAA29028@helen.cli.di.unipi.it> Subject: Re: CLisp and thread To: clisp-list@clisp.cons.org Date: Mon, 27 Apr 1998 17:15:59 +0200 (MET DST) In-Reply-To: <35449926.333A11C6@etu.info.unicaen.fr> from "Francois Girault" at Apr 27, 98 07:42:03 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > Hi, > > I want to know if there is a Commonlisp package to use the threads. If > not, there is an implementation of Clisp that accept the threads ? The current version of Clisp does not support threads, but some work has been done, and is being done, toward this end. Other free Common Lisp implementations that support threads are: Cmucl (only on certain platforms, if I understand correctly) http://www.cons.org/cmucl/ and ECL ftp://ftp.di.unipi.it/pub/lang/lisp Most commmercial CLs do have threads. Pierpaolo Bernardi. From ds26@gte.com Tue Apr 28 06:48:51 1998 Received: from gte.com (h132-197-8-26.gte.com [132.197.8.26]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id GAA09037 for ; Tue, 28 Apr 1998 06:48:49 -0700 (PDT) Received: from bunny.gte.com by gte.com (8.8.4/8.8.4) From: Dorai Sitaram Received: (ds26@localhost) by bunny.gte.com (8.6.9/8.6.9) id JAA15679 for clisp-list@clisp.cons.org; Tue, 28 Apr 1998 09:49:47 -0400 Message-Id: <199804281349.JAA15679@bunny.gte.com> Subject: princ bug To: clisp-list@clisp.cons.org Date: Tue, 28 Apr 1998 09:49:47 -0400 (EDT) X-Mailer: ELM [version 2.4 PL3] Content-Type: text (princ #\newline) displays two successive newlines. This can't be expected behavior, can it? --d From Francois.Girault@etu.info.unicaen.fr Tue Apr 28 14:40:13 1998 Received: from asterix.etu.info.unicaen.fr (asterix.etu.info.unicaen.fr [193.55.130.51]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id OAA10969 for ; Tue, 28 Apr 1998 14:40:06 -0700 (PDT) Received: from cubitus (ppp3.etu.info.unicaen.fr [193.55.130.73]) by asterix.etu.info.unicaen.fr (8.9.0.Beta5/8.9.0.Beta5) with SMTP id XAA26204 for ; Tue, 28 Apr 1998 23:41:31 +0200 (MET DST) Sender: root@asterix.etu.info.unicaen.fr Message-ID: <35464C6A.94E94A1@etu.info.unicaen.fr> Date: Tue, 28 Apr 1998 23:38:50 +0200 From: François GIRAULT X-Mailer: Mozilla 2.0 (X11; I; Linux 2.0.30 i486) MIME-Version: 1.0 To: clisp-list@clisp.cons.org Subject: Threads in ECoLisp References: <199804281349.JAA15679@bunny.gte.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, I am usng the threads for the first time, also I have some problems. (I am using the ECoLisp implementation of CLisp.) I want to create a class foo with two fields : : the label of the object : an integer increase regulary And I want to put the method "executer" in thread. Here is the program : | |(defclass foo () | ((num :initform 0 :initarg :num) | (cpt :initform 0 :initarg :cpt)) | ) | |(defmethod executer ((oself foo)) | (loop | (format t "num : ~a cpt : ~a~%" (slot-value oself 'num) |(slot-value oself 'cpt)) | (setf (slot-value oself 'cpt) (+ 1 (slot-value oself 'cpt))) | )) | | |(defun test () | (setf t1 (make-instance 'foo :num 1)) | (setf t2 (make-instance 'foo :num 2)) | | (setf th1 (make-thread #'executer)) | (setf th2 (make-thread #'executer)) | | (setf cont1 (make-continuation th1)) | (setf cont2 (make-continuation th2)) | | (resume cont1 t1) | (resume cont2 t2) |) And this is the error message |> (test) |# 08251aa8> |> Error: Segmentation violation. | Wrong type argument to a compiled function. | Signalled by an anonymous function. |;;; Warning: Clearing input from *debug-io* |Error: 1 is an illegal ihs index. | Signalled by an anonymous function. |Broken at NIL. |>> Could anyone help me ? Thanks. --- François GIRAULT mail : François.Girault@etu.info.unicaen.fr Tel: 02-31-85-62-18 DEA Intelligence Artificielle & Algorithmique Université de Caen Syntaxe-Error priez pour nous !