From sds@usa.net Wed Mar 4 08:53:51 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 IAA04131 for ; Wed, 4 Mar 1998 08:53:50 -0800 (PST) Received: from mcfeely.concentric.net (mcfeely [207.155.184.83]) by uhura.concentric.net (8.8.8/(98/01/20 5.9)) id LAA16960; Wed, 4 Mar 1998 11:53:40 -0500 (EST) [1-800-745-2747 The Concentric Network] Errors-To: Received: from mute.eaglets.com (ts006d33.phe-pa.concentric.net [209.31.155.45]) by mcfeely.concentric.net (8.8.8) id LAA19460; Wed, 4 Mar 1998 11:50:21 -0500 (EST) Received: (from sds@localhost) by mute.eaglets.com (8.8.7/8.8.7) id LAA03450; Wed, 4 Mar 1998 11:51:53 -0500 To: Bruno Haible Subject: inlining in clisp 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: 04 Mar 1998 11:51:53 -0500 Message-ID: Lines: 76 I have an impression that clisp doesn't quite respect inlining. ZZ is inlined, YY is not, nevertheless, when called, they compile into the same thing. Of course, any CL is free to ignore any inline declarations. But, with CLISP, should I expect a large funcall overhead? > (declaim (inline zz)) nil > (defun zz (x) (1+ x)) zz > (compile 'zz) zz > (defun xx (x) (1- (zz x))) xx > (compile 'xx) xx > (disassemble 'xx) Disassembly of function xx (CONST 0) = zz 1 required arguments 0 optional arguments No rest parameter No keyword parameters 0 (load&push 1) 1 (call1&push 0) ; zz 3 (calls2 154) ; 1- 5 (skip&ret 2) # > (defun xx (x) (1- (1+ x))) xx > (compile 'xx) xx > (disassemble 'xx) Disassembly of function xx 1 required arguments 0 optional arguments No rest parameter No keyword parameters 0 (load&inc&push 1) 2 (calls2 154) ; 1- 4 (skip&ret 2) # > (defun yy (x) (1- x)) yy > (compile 'yy) yy > (defun xx (x) (1- (yy x))) xx > (compile 'xx) xx > (disassemble 'xx) Disassembly of function xx (CONST 0) = yy 1 required arguments 0 optional arguments No rest parameter No keyword parameters 0 (load&push 1) 1 (call1&push 0) ; yy 3 (calls2 154) ; 1- 5 (skip&ret 2) # > -- 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. A man paints with his brains and not with his hands. From PhilO@dmti.com Wed Mar 4 11:00:15 1998 Received: from smtp.dmti.com (smtp.dmti.com [205.164.43.18]) by seagull.cdrom.com (8.8.8/8.6.6) with SMTP id LAA04467 for ; Wed, 4 Mar 1998 11:00:14 -0800 (PST) Received: from dmti.com (172.31.0.10) by smtp.dmti.com (Connect2-SMTP 4.32.0001540) for ; Wed, 4 Mar 1998 13:02:23 -0600 Received: from DMTIDOM-Message_Server by dmti.com with Novell_GroupWise; Wed, 04 Mar 1998 13:01:35 -0600 Message-Id: X-Mailer: Novell GroupWise 4.1 Date: Wed, 04 Mar 1998 13:01:10 -0600 From: Phil Oelkers To: clisp-list@clisp.cons.org Subject: "Common LISP Modules" by Mark Watkins WTB Mime-Version: 1.0 Content-Type: text/plain Content-Disposition: inline I'd like to buy a copy of "Common LISP Modules" by Mark Watkins. I'd be willing to pay ~ $15 US + shipping. Used, abused, almost falling apart is OK. Phil Oelkers Database Analyst Direct Marketing Technology From sds@usa.net Wed Mar 4 14:25:23 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 OAA05216 for ; Wed, 4 Mar 1998 14:25:20 -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 RAA15507; Wed, 4 Mar 1998 17:25:15 -0500 (EST) [1-800-745-2747 The Concentric Network] Errors-To: Received: from mute.eaglets.com (ts006d07.phe-pa.concentric.net [209.31.155.19]) by marconi.concentric.net (8.8.8) id RAA17276; Wed, 4 Mar 1998 17:25:09 -0500 (EST) Received: (from sds@localhost) by mute.eaglets.com (8.8.7/8.8.7) id RAA04273; Wed, 4 Mar 1998 17:26:29 -0500 To: Bruno Haible Subject: default extensions 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: 04 Mar 1998 17:26:27 -0500 Message-ID: Lines: 14 X-Mailer: Gnus v5.5/Emacs 20.2 (load "zz") will look for zz.lsp and zz.fas, but not for zz.cl, or zz.lisp. 1. what is the rationale? 2. is it possible to change this behavior? 3. this doesn't seem to be documented in _impnotes. 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. Life is a sexually transmitted disease with 100% mortality. From hoehle@zeus.gmd.de Thu Mar 5 07:30:28 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 HAA03211 for ; Thu, 5 Mar 1998 07:30:25 -0800 (PST) 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 QAA23025 for ; Thu, 5 Mar 1998 16:30:21 +0100 (MET) Received: from amiga ([141.12.144.207]) by zeus.gmd.de with SMTP id AA07686 (5.67b8/IDA-1.5 for ); Thu, 5 Mar 1998 16:30:04 +0100 Date: Thu, 5 Mar 1998 16:30:04 +0100 Message-Id: <199803051530.AA07686@zeus.gmd.de> From: Joerg.Hoehle@gmd.de (Jorg-Cyril Hohle) To: clisp-list@seagull.cons.org Subject: default extensions In-Reply-To: References: Sam Steingold wrote: > (load "zz") will look for zz.lsp and zz.fas, but not for zz.cl, or > zz.lisp. > 1. what is the rationale? Compatibility among all platforms CLISP runs on. .lisp is four letters, .cl specific to '(and (not ALLEGRO) EXCL) only says my defsystem. Thus if you need it, add it to your own config.lsp and save-world, but don't make it global for all of CLISP. > 2. is it possible to change this behavior? > system::*source-file-types* (#".lsp") > 3. this doesn't seem to be documented in _impnotes. Correct, maybe move it to package LISP, like *LOAD-PATHS* at the same time? Regards, Jo"rg Ho"hle. Joerg.Hoehle@gmd.de http://zeus.gmd.de/~hoehle/amiga-clisp.html From hoehle@zeus.gmd.de Sat Mar 7 22:45:19 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 WAA00269 for ; Sat, 7 Mar 1998 22:45:16 -0800 (PST) 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 UAA22142 for ; Sat, 7 Mar 1998 20:56:18 +0100 (MET) Received: from amiga ([141.12.144.207]) by zeus.gmd.de with SMTP id AA21962 (5.67b8/IDA-1.5 for ); Sat, 7 Mar 1998 20:56:02 +0100 Date: Sat, 7 Mar 1998 20:56:02 +0100 Message-Id: <199803071956.AA21962@zeus.gmd.de> From: Joerg.Hoehle@gmd.de (Jorg-Cyril Hohle) To: clisp-list@clisp.cons.org Subject: weak hash tables implementable through FINALIZE? Hi, I think I once read an explanation about how to create weak hash tables through the use of CLISP's FINALIZE, but now I can't seem to find out a way to do so. In the opposite direction however, I can think how an implementation with weak-pointers can be expanded to implement FINALIZE. So is there a way in CLISP? Thanks for your help, Jo"rg Ho"hle. Joerg.Hoehle@gmd.de http://zeus.gmd.de/~hoehle/amiga-clisp.html From lenst@lysator.liu.se Tue Mar 10 02:28:41 1998 Received: from samantha.lysator.liu.se (samantha.lysator.liu.se [130.236.254.202]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id CAA01778 for ; Tue, 10 Mar 1998 02:28:39 -0800 (PST) Received: from harpenden.lysator.liu.se (Utriton@harpenden.lysator.liu.se [130.236.254.34]) by samantha.lysator.liu.se (8.8.7/8.8.7) with ESMTP id PAA28773 for ; Mon, 9 Mar 1998 15:47:22 +0100 (MET) Received: (from Utriton@localhost) by harpenden.lysator.liu.se (8.8.5/8.8.5) id PAA03697 for clisp-list@clisp.cons.org; Mon, 9 Mar 1998 15:47:07 +0100 (MET) X-Authentication-Warning: harpenden.lysator.liu.se: Utriton set sender to lenst@lysator.liu.se using -f >Received: from t2 (root@t2 [172.17.17.18]) by triton.lstaflin.pp.se (8.6.12/8.6.9) with ESMTP id IAA09932; Mon, 9 Mar 1998 08:45:47 +0100 Received: from t2 (root@t2 [172.17.17.18]) by triton.lstaflin.pp.se (8.6.12/8.6.9) with ESMTP id IAA09932; Mon, 9 Mar 1998 08:45:47 +0100 Received: by t2 id m0yBxEF-000N1kC (Debian Smail-3.2 1996-Jul-4 #2); Mon, 9 Mar 1998 08:44:07 +0100 (MET) Message-Id: Date: Mon, 9 Mar 1998 08:44:07 +0100 (MET) From: Lennart Staflin To: clisp-list@clisp.cons.org Subject: Loop macro odditiy Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=US-ASCII I have noticed the following behaviour of the loop macro in CLISP (version "1997-12-06 (December 1997)"): > (loop repeat 4 for p = 4 collect p) => (4 4 4 4) > (loop repeat 4 for p = (1+ 3) collect p) => (4 4 4 4 4) I think the two loop expressions should give the same result. //Lennart Staflin /*/ (:ABSOLUTE :WILD) From haible@ilog.fr Tue Mar 10 05:56:41 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 FAA04983 for ; Tue, 10 Mar 1998 05:56:16 -0800 (PST) Received: from ilog.ilog.fr ([172.17.4.53]) by sceaux.ilog.fr (8.8.8/8.8.7) with ESMTP id OAA27656 for ; Tue, 10 Mar 1998 14:54:44 +0100 (MET) 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 OAA24461; Tue, 10 Mar 1998 14:54:55 +0100 (MET) From: Bruno Haible Received: (from haible@localhost) by halles.ilog.fr (8.8.5/8.8.5) id OAA29786; Tue, 10 Mar 1998 14:54:55 +0100 (MET) Date: Tue, 10 Mar 1998 14:54:55 +0100 (MET) Message-Id: <199803101354.OAA29786@halles.ilog.fr> To: clisp-list@seagull.cons.org Subject: Re: weak hash tables implementable through FINALIZE? In-Reply-To: <199803071956.AA21962@zeus.gmd.de> References: <199803071956.AA21962@zeus.gmd.de> Jörg Höhle wrote: > I think I once read an explanation about how to create weak hash > tables through the use of CLISP's FINALIZE, but now I can't seem to > find out a way to do so. In the opposite direction however, I can > think how an implementation with weak-pointers can be expanded to > implement FINALIZE. > > So is there a way in CLISP? It is possible to implement FINALIZE using weak hash table, weak sets, or weak pointers. It doesn't seem possible to implement weak hash tables when all you have is FINALIZE. I think (but would be happy if someone could prove this formally) that FINALIZE triggers a function which gets called when the reference count of some object drops to 0, whereas for weak hash tables you need to trigger a function when the reference count drops to 1. Bruno From hoehle@zeus.gmd.de Tue Mar 10 13:37:08 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 NAA09294 for ; Tue, 10 Mar 1998 13:37:01 -0800 (PST) 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 WAA07153 for ; Tue, 10 Mar 1998 22:36:57 +0100 (MET) Received: by zeus.gmd.de id AA19902 (5.67b8/IDA-1.5 for clisp-list@clisp.cons.org); Tue, 10 Mar 1998 22:36:42 +0100 Date: Tue, 10 Mar 1998 22:36:42 +0100 Message-Id: <199803102136.AA19902@zeus.gmd.de> From: Joerg.Hoehle@gmd.de (Joerg Hoehle) To: clisp-list@clisp.cons.org Subject: weak hash tables implementable through FINALIZE? Content-Type: text Hi, [please excuse this if it's a repost to you, ML problems] I think I once read an explanation about how to create weak hash tables through the use of CLISP's FINALIZE, but now I can't seem to find out a way to do so. In the opposite direction however, I can think how an implementation with weak-pointers can be expanded to implement FINALIZE. So is there a way in CLISP? Thanks for your help, Jo"rg Ho"hle. Joerg.Hoehle@gmd.de http://zeus.gmd.de/~hoehle/amiga-clisp.html From haible@ilog.fr Tue Mar 10 15:04:23 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 PAA09717 for ; Tue, 10 Mar 1998 15:04:22 -0800 (PST) Received: from ilog.ilog.fr ([172.17.4.53]) by sceaux.ilog.fr (8.8.8/8.8.7) with ESMTP id AAA13204 for ; Wed, 11 Mar 1998 00:03:51 +0100 (MET) 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 AAA21374; Wed, 11 Mar 1998 00:04:00 +0100 (MET) From: Bruno Haible Received: (from haible@localhost) by halles.ilog.fr (8.8.5/8.8.5) id AAA07105; Wed, 11 Mar 1998 00:04:00 +0100 (MET) Date: Wed, 11 Mar 1998 00:04:00 +0100 (MET) Message-Id: <199803102304.AAA07105@halles.ilog.fr> To: clisp-list@seagull.cons.org Subject: Re: inlining in clisp In-Reply-To: References: Sam Steingold wrote: > I have an impression that clisp doesn't quite respect inlining. ZZ is > inlined, YY is not, nevertheless, when called, they compile into the same > thing. > > Of course, any CL is free to ignore any inline declarations. CLISP inlines only during COMPILE-FILE, not during COMPILE, and only functions defined in the same file or in REQUIREd files. Thus you cannot test inlining by calling COMPILE. Bruno From donc@ISI.EDU Tue Mar 10 21:28:57 1998 Received: from tnt.isi.edu (tnt.isi.edu [128.9.128.128]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id VAA11800 for ; Tue, 10 Mar 1998 21:28:56 -0800 (PST) Received: from ISI.EDU (tnt.isi.edu [128.9.128.128]) by tnt.isi.edu (8.8.7/8.8.6) with ESMTP id VAA24964; Tue, 10 Mar 1998 21:28:53 -0800 (PST) Message-Id: <199803110528.VAA24964@tnt.isi.edu> To: clisp-list@seagull.cons.org cc: haible@ilog.fr Subject: Re: weak hash tables implementable through FINALIZE? In-reply-to: Your message of "Tue, 10 Mar 1998 19:10:34 PST." <199803101354.OAA29786@halles.ilog.fr> Date: Tue, 10 Mar 1998 21:28:53 -0800 From: Don Cohen I think you can implement weak tables with finalize. Whenever you enter something in a weak table, give it a finalization that, if it's still there, will remove it. How does one implement finalize with weak hash tables? My impression was that these did not give you the ability to notice or otherwise do anything when the object was removed. In either case it seems that it's the GC that's critical here. It's not when the reference count goes to zero that you want to do something but when the object becomes gc-able (even if it is referenced by itself or other garbage). I suppose the way to do weak tables is not to mark from them, but after each gc mark phase, when you can tell whether something is garbage, you have to iterate through the weak tables, or in the case of incremental gc, you need to know which pointers to new stuff have been written in the weak tables. Are any of these things in clisp? From hoehle@zeus.gmd.de Thu Mar 19 18:07:42 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 SAA00249 for ; Thu, 19 Mar 1998 18:07:39 -0800 (PST) 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 WAA25970 for ; Mon, 16 Mar 1998 22:46:56 +0100 (MET) Received: from amiga ([141.12.144.207]) by zeus.gmd.de with SMTP id AA10227 (5.67b8/IDA-1.5 for ); Mon, 16 Mar 1998 22:46:39 +0100 Date: Mon, 16 Mar 1998 22:46:39 +0100 From: Joerg.Hoehle@gmd.de (Jorg-Cyril Hohle) To: clisp-list@clisp.cons.org Subject: calling finalize at exit? Message-Id: <1.1@[141.12.144.207]> Hi, I wonder if anybody is using FINALIZE. Especially, I wonder if somebody would find it more useful if CLISP promised to call finalizers at program exit. This way, external resources not freed by unwind-protect (any ?) could be setup to be freed at program exit at last. Even UNIX does not full resource tracking, (did you ever use shared memory or see an orphan window under X)? Current impnotes.txt says about the time finalizers are called: (Actually, it possibly never occurs.) BTW, I discovered that Java has a settable variable to control whether finalizers are to be called at program exit. I forgot its default value. Bye, Jo"rg Ho"hle. Joerg.Hoehle@gmd.de http://zeus.gmd.de/~hoehle/amiga-clisp.html From sds@usa.net Fri Mar 20 17:25:22 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 RAA00244 for ; Fri, 20 Mar 1998 17:25:22 -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 JAA11837; Fri, 20 Mar 1998 09:14:29 -0500 (EST) [1-800-745-2747 The Concentric Network] Errors-To: Received: from mute.eaglets.com (ts008d23.phe-pa.concentric.net [209.31.155.131]) by marconi.concentric.net (8.8.8) id JAA08769; Fri, 20 Mar 1998 09:14:27 -0500 (EST) Received: (from sds@localhost) by mute.eaglets.com (8.8.7/8.8.7) id JAA01498; Fri, 20 Mar 1998 09:15:00 -0500 To: clisp-list@clisp.cons.org Subject: declarations 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: 20 Mar 1998 09:14:59 -0500 Message-ID: Lines: 22 X-Mailer: Gnus v5.5/Emacs 20.2 (defun file-newer (f0 f1) "Return T if the first arg is newer than the second. Non-existent files are assumed to be VERY old." (flet ((fwd (ff) (or (ignore-errors (file-write-date ff)) 0))) (declare (ftype (function (t) integer) fwd)) (> (fwd f0) (fwd f1)))) clisp is unhappy about the declaration (while cmucl and acl eat it quite happily). Why? ERROR in function file-newer : Misplaced declaration: (declare (ftype (function (t) integer) fwd)) 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. What garlic is to food, insanity is to art. From Francois.Girault@etu.info.unicaen.fr Sun Mar 22 06:02:33 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 GAA08446 for ; Sun, 22 Mar 1998 06:02:32 -0800 (PST) Received: from cubitus.cubiland.ici (ppp1.etu.info.unicaen.fr [193.55.130.71]) by asterix.etu.info.unicaen.fr (8.7.5/8.7.3) with SMTP id PAA24581 for ; Sun, 22 Mar 1998 15:02:28 +0100 (MET) Sender: root@asterix.etu.info.unicaen.fr Message-ID: <351518A9.7C491C0B@etu.info.unicaen.fr> Date: Sun, 22 Mar 1998 14:56:57 +0100 From: Francois 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 References: Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit How can I use the socket interface ? How send information via the socket ? Please help me ;-) -- François GIRAULT mail : Francois.Girault@etu.info.unicaen.fr DEA Intelligence Artificielle & Algorithmique Université de Caen From bernardp@CLI.DI.Unipi.IT Mon Mar 23 05:19:31 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 FAA13333 for ; Mon, 23 Mar 1998 05:19:29 -0800 (PST) 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 OAA02880; Mon, 23 Mar 1998 14:19:41 +0100 (MET) From: Pierpaolo Bernardi Received: (bernardp@localhost) by helen.cli.di.unipi.it (8.7.5/8.6.12) id OAA10673; Mon, 23 Mar 1998 14:19:39 +0100 (MET) Message-Id: <199803231319.OAA10673@helen.cli.di.unipi.it> Subject: Re: declarations To: clisp-list@clisp.cons.org Date: Mon, 23 Mar 1998 14:19:38 +0100 (MET) In-Reply-To: from "Sam Steingold" at Mar 20, 98 07:09:51 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > (defun file-newer (f0 f1) > "Return T if the first arg is newer than the second. > Non-existent files are assumed to be VERY old." > (flet ((fwd (ff) (or (ignore-errors (file-write-date ff)) 0))) > (declare (ftype (function (t) integer) fwd)) > (> (fwd f0) (fwd f1)))) > > clisp is unhappy about the declaration (while cmucl and acl eat it quite > happily). Why? In which package you entered that code? Remember, that LISP is the package meant to be compatible with CLtL1, while CL is the package (trying to be) compatible with ANSI. Maybe this is the cause? (cannot check from here) Pierpaolo From sds@usa.net Mon Mar 23 06:39:48 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 GAA14092 for ; Mon, 23 Mar 1998 06:39:48 -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 JAA27685; Mon, 23 Mar 1998 09:40:05 -0500 (EST) [1-800-745-2747 The Concentric Network] Errors-To: Received: from mute.eaglets.com (ts008d19.phe-pa.concentric.net [209.31.155.127]) by marconi.concentric.net (8.8.8) id JAA19365; Mon, 23 Mar 1998 09:39:57 -0500 (EST) Received: (from sds@localhost) by mute.eaglets.com (8.8.7/8.8.7) id IAA04808; Mon, 23 Mar 1998 08:51:24 -0500 To: clisp-list@clisp.cons.org Subject: Re: declarations References: <199803231319.OAA10673@helen.cli.di.unipi.it> 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 In-Reply-To: Pierpaolo Bernardi's message of Mon, 23 Mar 1998 05:20:40 -0800 (PST) X-Mailer: Gnus v5.5/Emacs 20.2 Date: 23 Mar 1998 08:51:22 -0500 Message-ID: Lines: 29 >>>> In a very interesting message <199803231319.OAA10673@helen.cli.di.unipi.it> >>>> Sent on Mon, 23 Mar 1998 05:20:40 -0800 (PST) >>>> Honorable Pierpaolo Bernardi writes >>>> on the subject of "Re: declarations": >> > (defun file-newer (f0 f1) >> > "Return T if the first arg is newer than the second. >> > Non-existent files are assumed to be VERY old." >> > (flet ((fwd (ff) (or (ignore-errors (file-write-date ff)) 0))) >> > (declare (ftype (function (t) integer) fwd)) >> > (> (fwd f0) (fwd f1)))) >> > >> > clisp is unhappy about the declaration (while cmucl and acl eat it quite >> > happily). Why? >> >> In which package you entered that code? >> >> Remember, that LISP is the package meant to be compatible with CLtL1, >> while CL is the package (trying to be) compatible with ANSI. >> >> Maybe this is the cause? (cannot check from here) I do not use *any* package commands. All you see is done in clisp as it starts after build. -- 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. Who is Genral Failure and why is he reading my hard disk? From bernardp@CLI.DI.Unipi.IT Mon Mar 23 06:53:37 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 GAA14277 for ; Mon, 23 Mar 1998 06:53:31 -0800 (PST) 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 PAA08514; Mon, 23 Mar 1998 15:53:34 +0100 (MET) From: Pierpaolo Bernardi Received: (bernardp@localhost) by helen.cli.di.unipi.it (8.7.5/8.6.12) id PAA15260; Mon, 23 Mar 1998 15:53:31 +0100 (MET) Message-Id: <199803231453.PAA15260@helen.cli.di.unipi.it> Subject: Re: declarations To: clisp-list@clisp.cons.org Date: Mon, 23 Mar 1998 15:53:30 +0100 (MET) In-Reply-To: from "Sam Steingold" at Mar 23, 98 06:41:49 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit > >> In which package you entered that code? > >> > >> Remember, that LISP is the package meant to be compatible with CLtL1, > >> while CL is the package (trying to be) compatible with ANSI. > >> > >> Maybe this is the cause? (cannot check from here) > > I do not use *any* package commands. All you see is done in clisp as it > starts after build. So you are in Clisp's default package. I don't remember which package this is, as I always explicitly say to Clisp to start in package CL-USER (with the option -p). See the value of the var. *PACKAGE* to see in which package you are. Or, if you would like to be automatically reminded in which package you are, then set SYS::*PROMPT-WITH-PACKAGE* to T. Pierpaolo From haible@ilog.fr Mon Mar 23 06:57:24 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 GAA14430 for ; Mon, 23 Mar 1998 06:57:22 -0800 (PST) Received: from ilog.ilog.fr ([172.17.4.59]) by sceaux.ilog.fr (8.8.8/8.8.7) with ESMTP id PAA14879 for ; Mon, 23 Mar 1998 15:57:07 +0100 (MET) 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 PAA15987; Mon, 23 Mar 1998 15:57:42 +0100 (MET) From: Bruno Haible Received: (from haible@localhost) by halles.ilog.fr (8.8.5/8.8.5) id PAA22654; Mon, 23 Mar 1998 15:57:41 +0100 (MET) Date: Mon, 23 Mar 1998 15:57:41 +0100 (MET) Message-Id: <199803231457.PAA22654@halles.ilog.fr> To: clisp-list@clisp.cons.org Subject: Re: declarations In-Reply-To: References: Sam Steingold writes: > >> > (flet ((fwd (ff) (or (ignore-errors (file-write-date ff)) 0))) > >> > (declare (ftype (function (t) integer) fwd)) > >> > (> (fwd f0) (fwd f1)))) > >> > > >> > clisp is unhappy about the declaration (while cmucl and acl eat it quite > >> > happily). Why? > >> > >> In which package you entered that code? > > I do not use *any* package commands. All you see is done in clisp as it > starts after build. CLISP has two different FLET symbols: The one in package LISP, which you see in package USER, is CLtL1 compliant and does not allow declarations at the beginning of the body. The one in package COMMON-LISP, which you see in package COMMON-LISP-USER, is CLHS compliant and allows the declaration. Bruno From taube@uiuc.edu Mon Mar 23 08:36:00 1998 Received: from staff2.cso.uiuc.edu (root@staff2.cso.uiuc.edu [128.174.5.53]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id IAA14964 for ; Mon, 23 Mar 1998 08:35:59 -0800 (PST) Received: from [128.174.92.150] (tcomp2.music.uiuc.edu [128.174.92.150]) by staff2.cso.uiuc.edu (8.8.8/8.8.8) with ESMTP id KAA24694 for ; Mon, 23 Mar 1998 10:36:12 -0600 (CST) X-Sender: taube@ux1.cso.uiuc.edu Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Mon, 23 Mar 1998 10:41:32 -0600 To: clisp-list@clisp.cons.org From: Rick Taube Subject: error in clisp-1997-12-0 on Linux (Red Hat 5.0) I get a fatal error starting up clisp (binary release) on RedHat 5.0 Linux. The make produces some warnings: -------------------------------------------------------------------- [clisp-1997-12-06]# make cc -O base/lisp.a base/libintl.a base/libreadline.a base/libavcall.a base/libvacall.a base/libtrampoline.a -lncurses -o base/lisp.run base/lisp.a(lisp.o): In function `init_language': lisp.o(.text+0x562b): the `getwd' function is dangerous and should not be used. cc -O base/wlisp.a base/libintl.a base/libreadline.a base/libavcall.a base/libvacall.a base/libtrampoline.a -lncurses -o base/wlisp.run base/wlisp.a(wlisp.o): In function `init_language': wlisp.o(.text+0x6477): the `getwd' function is dangerous and should not be used. [clisp-1997-12-06]# ./base/lisp.run -M base/lispinit.mem i i i i i i i ooooo o ooooooo ooooo ooooo I I I I I I I 8 8 8 8 8 o 8 8 I I I I I I I 8 8 8 8 8 8 I I I I I I I 8 8 8 ooooo 8oooo I \ `+' / I 8 8 8 8 8 \ `-+-' / 8 o 8 8 o 8 8 `-__|__-' ooooo 8oooooo ooo8ooo ooooo 8 | ------+------ Copyright (c) Bruno Haible, Michael Stoll 1992, 1993 Copyright (c) Bruno Haible, Marcus Daniels 1994-1997 > *** - handle_fault error1 ! SIGSEGV cannot be cured. Fault address = 0x1. Segmentation fault (core dumped) From sds@usa.net Mon Mar 23 09:08:14 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 JAA15274 for ; Mon, 23 Mar 1998 09:08:13 -0800 (PST) Received: from mcfeely.concentric.net (mcfeely.concentric.net [207.155.184.83]) by darius.concentric.net (8.8.8/(98/01/20 5.9)) id MAA28565; Mon, 23 Mar 1998 12:08:27 -0500 (EST) [1-800-745-2747 The Concentric Network] Errors-To: Received: from mute.eaglets.com (ts008d19.phe-pa.concentric.net [209.31.155.127]) by mcfeely.concentric.net (8.8.8) id MAA05282; Mon, 23 Mar 1998 12:08:26 -0500 (EST) Received: (from sds@localhost) by mute.eaglets.com (8.8.7/8.8.7) id MAA06035; Mon, 23 Mar 1998 12:09:42 -0500 To: clisp-list@clisp.cons.org Subject: Re: declarations References: <199803231457.PAA22654@halles.ilog.fr> 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 In-Reply-To: Bruno Haible's message of Mon, 23 Mar 1998 06:57:35 -0800 (PST) X-Mailer: Gnus v5.5/Emacs 20.2 Date: 23 Mar 1998 12:09:40 -0500 Message-ID: Lines: 31 >>>> In a very interesting message <199803231457.PAA22654@halles.ilog.fr> >>>> Sent on Mon, 23 Mar 1998 06:57:35 -0800 (PST) >>>> Honorable Bruno Haible writes >>>> on the subject of "Re: declarations": >> >> CLISP has two different FLET symbols: The one in package LISP, which you >> see in package USER, is CLtL1 compliant and does not allow declarations >> at the beginning of the body. The one in package COMMON-LISP, which you >> see in package COMMON-LISP-USER, is CLHS compliant and allows the >> declaration. Aha. Interesting. 1. As we strive for ANSI compliance (at least *I* with we were striving...), shouldn't we start in package COMMON-LISP-USER? 2. If I start clisp -p CL-USER, I get WARNING in function #:top-level-form-1-2 in lines 1..39 : *warn-on-floating-point-contagion* is neither declared nor bound, it will be treated as if it were declared SPECIAL. WARNING in function #:top-level-form-1-2 in lines 1..39 : *default-float-format* is neither declared nor bound, it will be treated as if it were declared SPECIAL. Oh well... -- 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 only thing worse than X Windows: (X Windows) - X From haible@ilog.fr Mon Mar 23 11:25:45 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 LAA15977 for ; Mon, 23 Mar 1998 11:25:41 -0800 (PST) Received: from ilog.ilog.fr ([172.17.4.59]) by sceaux.ilog.fr (8.8.8/8.8.7) with ESMTP id UAA24805 for ; Mon, 23 Mar 1998 20:25:21 +0100 (MET) 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 UAA04619; Mon, 23 Mar 1998 20:25:58 +0100 (MET) From: Bruno Haible Received: (from haible@localhost) by halles.ilog.fr (8.8.5/8.8.5) id UAA25458; Mon, 23 Mar 1998 20:25:56 +0100 (MET) Date: Mon, 23 Mar 1998 20:25:56 +0100 (MET) Message-Id: <199803231925.UAA25458@halles.ilog.fr> To: clisp-list@clisp.cons.org Subject: Re: error in clisp-1997-12-0 on Linux (Red Hat 5.0) In-Reply-To: References: Rick Taube writes: > I get a fatal error starting up clisp (binary release) on RedHat 5.0 Linux. RedHat 5.0 Linux ships with libc6, which is binary incompatible with the libc5 against which I made the binary release. Since this appears to become an FAQ, I've just made CLISP binaries on a RedHat 5.0 Linux box. They are now in ftp://clisp.cons.org/pub/lisp/clisp/binaries/i386-linux-libc6/clisp.tar.gz and will soon appear in ftp://ftp2.cons.org/pub/lisp/clisp/binaries/i386-linux-libc6/clisp.tar.gz ftp://sunsite.unc.edu/pub/Linux/Incoming/clisp-linux-libc6.tar.gz ftp://sunsite.unc.edu/pub/Linux/devel/lang/lisp/clisp-linux-libc6.tar.gz Bruno From sds@usa.net Mon Mar 23 11:37:44 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 LAA16241 for ; Mon, 23 Mar 1998 11:37:44 -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 OAA19599; Mon, 23 Mar 1998 14:38:00 -0500 (EST) [1-800-745-2747 The Concentric Network] Errors-To: Received: from mute.eaglets.com (ts008d19.phe-pa.concentric.net [209.31.155.127]) by marconi.concentric.net (8.8.8) id OAA10410; Mon, 23 Mar 1998 14:37:58 -0500 (EST) Received: (from sds@localhost) by mute.eaglets.com (8.8.7/8.8.7) id OAA07380; Mon, 23 Mar 1998 14:39:08 -0500 To: Bruno Haible Subject: compile-file 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 Mar 1998 14:39:07 -0500 Message-ID: Lines: 12 It would seem that, in CLISP, compile-file doesn't return what CLHS sais it should: compile-file input-file &key output-file verbose print external-format => output-truename, warnings-p, failure-p -- 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. Microsoft: announce yesterday, code today, think tomorrow. From harpo@udel.edu Mon Mar 23 12:29:15 1998 Received: from rivendell.rdny.udel.edu (root@rivendell.rdny.udel.edu [128.175.25.101]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id MAA16695 for ; Mon, 23 Mar 1998 12:29:05 -0800 (PST) Received: from localhost (really [127.0.0.1]) by rivendell.rdny.udel.edu via in.smtpd with smtp (ident harpo using rfc1413) id (Debian Smail3.2.0.101) for ; Mon, 23 Mar 1998 15:20:33 -0500 (EST) Date: Mon, 23 Mar 1998 15:20:33 -0500 (EST) From: Will Lowe X-Sender: harpo@rivendell.rdny.udel.edu To: Multiple recipients of list Subject: Re: error in clisp-1997-12-0 on Linux (Red Hat 5.0) In-Reply-To: <199803231925.UAA25458@halles.ilog.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 23 Mar 1998, Bruno Haible wrote: > Since this appears to become an FAQ, I've just made CLISP binaries on a > RedHat 5.0 Linux box. They are now in Does this mean you've compiled a set of bindings for linux-libc6? I started these a while ago, was ordered by a professor to finish another project, and have spent the last several months trying to get it out the door before the deadline. Will -------------------------------------------------------------------------- | harpo@udel.edu lowe@cis.udel.edu lowe@debian.org | | http://www.cis.udel.edu/~lowe/ | | PGP Public Key: http://www.cis.udel.edu/~lowe/index.html#pgpkey | -------------------------------------------------------------------------- | You think you're so smart, but I've seen you naked | | and I'll prob'ly see you naked again ... | | --The Barenaked Ladies, "Blame It On Me" | -------------------------------------------------------------------------- From haible@ilog.fr Mon Mar 23 13:36: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 NAA17134 for ; Mon, 23 Mar 1998 13:36:48 -0800 (PST) Received: from ilog.ilog.fr ([172.17.4.59]) by sceaux.ilog.fr (8.8.8/8.8.7) with ESMTP id WAA01347 for ; Mon, 23 Mar 1998 22:36:26 +0100 (MET) 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 WAA10894; Mon, 23 Mar 1998 22:36:59 +0100 (MET) From: Bruno Haible Received: (from haible@localhost) by halles.ilog.fr (8.8.5/8.8.5) id WAA25756; Mon, 23 Mar 1998 22:37:01 +0100 (MET) Date: Mon, 23 Mar 1998 22:37:01 +0100 (MET) Message-Id: <199803232137.WAA25756@halles.ilog.fr> To: clisp-list@clisp.cons.org Subject: Re: error in clisp-1997-12-0 on Linux (Red Hat 5.0) In-Reply-To: References: Will Lowe writes: > > Does this mean you've compiled a set of bindings for linux-libc6? > I started these a while ago, ... No, I left this out today, exactly because libc4/5 and libc6 are binary incompatible. I only put in the modules wildcard, regexp and clx/new-clx. If you want to finish a bindings/linux-libc6, I can assure you that the need for it is increasing :-). Bruno From sds@usa.net Mon Mar 23 14:38: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 OAA17589 for ; Mon, 23 Mar 1998 14:38:25 -0800 (PST) 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 RAA06243; Mon, 23 Mar 1998 17:38:25 -0500 (EST) [1-800-745-2747 The Concentric Network] Errors-To: Received: from mute.eaglets.com (ts008d19.phe-pa.concentric.net [209.31.155.127]) by newman.concentric.net (8.8.8) id RAA29185; Mon, 23 Mar 1998 17:38:23 -0500 (EST) Received: (from sds@localhost) by mute.eaglets.com (8.8.7/8.8.7) id RAA08698; Mon, 23 Mar 1998 17:33:18 -0500 To: Bruno Haible Subject: USER vs CL-USER 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 Mar 1998 17:33:18 -0500 Message-ID: Lines: 8 Why are some functions (like lisp:run-program) exported to USER but not to CL-USER? -- 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. Microsoft: announce yesterday, code today, think tomorrow. From hoehle@zeus.gmd.de Tue Mar 24 16:02:34 1998 Received: from casparc.ppp.net (mail.ppp.net [194.64.12.35]) by seagull.cdrom.com (8.8.8/8.6.6) with SMTP id QAA01458 for ; Tue, 24 Mar 1998 16:02:24 -0800 (PST) Received: from mail.gmd.de by casparc.ppp.net with smtp (Smail3.1.28.1 #1) id m0yHWqH-0032PdC; Tue, 24 Mar 98 17:46 MET 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 RAA02697 for ; Tue, 24 Mar 1998 17:45:10 +0100 (MET) Received: from amiga ([141.12.144.207]) by zeus.gmd.de with SMTP id AA09020 (5.67b8/IDA-1.5 for ); Tue, 24 Mar 1998 17:44:49 +0100 Date: Tue, 24 Mar 1998 17:44:49 +0100 Message-Id: <199803241644.AA09020@zeus.gmd.de> From: Joerg.Hoehle@gmd.de (Jorg-Cyril Hohle) To: clisp-list@seagull.cons.org Subject: Re: weak hash tables implementable through FINALIZE? In-Reply-To: <199803110528.VAA24964@tnt.isi.edu> References: <199803110528.VAA24964@tnt.isi.edu> Don Cohen wrote in March: > I think you can implement weak tables with finalize. > Whenever you enter something in a weak table, give it a > finalization that, if it's still there, will remove it. You must be able to access present data in the table. If it's still in the table, it will not be finalized. Thus the GC must treat this table specially, thus it's no simple (Lisp only) solution that I was looking for. > How does one implement finalize with weak hash tables? I said "can be expanded" because I think that a Lisp system which contains a mechanism to support weak hash tables wouldn't require many modifications to be able to handle finalize: their support is similar, both must be treated specially by the GC. The converse seems true as well. > referenced by itself or other garbage). I suppose the way to > do weak tables is not to mark from them, but after each gc mark Correct. > Are any of these things in clisp? FINALIZE only, see impnotes.txt. Jo"rg Ho"hle. Joerg.Hoehle@gmd.de http://zeus.gmd.de/~hoehle/amiga-clisp.html From sds@usa.net Tue Mar 24 16:08:07 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 QAA01830 for ; Tue, 24 Mar 1998 16:08:07 -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 OAA00569; Tue, 24 Mar 1998 14:49:45 -0500 (EST) [1-800-745-2747 The Concentric Network] Errors-To: Received: from mute.eaglets.com (ts005d35.phe-pa.concentric.net [209.31.154.239]) by marconi.concentric.net (8.8.8) id OAA07139; Tue, 24 Mar 1998 14:49:38 -0500 (EST) Received: (from sds@localhost) by mute.eaglets.com (8.8.7/8.8.7) id NAA09916; Tue, 24 Mar 1998 13:07:44 -0500 To: cmucl-help@cons.org, Bruno Haible Sender: sds@usa.net Newsgroups: comp.lang.lisp Subject: princ & *print-readably* 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 Organization: disorganization X-Newsreader: Gnus v5.5/Emacs 20.2 Date: 24 Mar 1998 13:07:42 -0500 Message-ID: Lines: 61 Posted-To: comp.lang.lisp The following message is a courtesy copy of an article that has been posted to comp.lang.lisp as well. what should (let ((*print-readably* t)) (princ "zz")) print? "zz" or zz? ACL says zz, CMU says "zz", and CLISP said "zz" untill the today's patch wich changed this to zz. Who is right? $ clisp > (setq *print-readably* t) T > (princ "zzz") "zzz" "zzz" > Bye. $ lisp Validating memory ... done. Mapping 8261632 bytes at 0x1000000. Mapping 13979648 bytes at 0x5000000. CMU Common Lisp 18a x86-linux 1.4.0 cvs, running on mute.eaglets.com Send bug reports and questions to your local CMU CL maintainer, or to pw@snoopy.mv.com, or to s950045@uia.ac.be or Peter.VanEynde@uia.ua.ac.be or to cmucl-help@cons.org. (prefered) type (help) for help, (quit) to exit, and (demo) to see the demos Loaded subsystems: Python 1.0, target Intel x86 CLOS based on PCL version: September 16 92 PCL (f) CLX X Library MIT R5.02 Lisp-Tk 0.1 Clio Library 1 Defsystem Mar 13 1995 * (setq *print-readably* t) T "* "(princ "zzz") "zzz" "zzz" "* "(quit) $ acl Allegro CL 4.3 [Linux/X86; R1] (12/11/96 1:33) Copyright (C) 1985-1996, Franz Inc., Berkeley, CA, USA. All Rights Reserved. ;; Optimization settings: safety 1, space 1, speed 1, debug 2. ;; For a complete description of all compiler switches given the current ;; optimization settings evaluate (explain-compiler-settings). USER(1): (setq *print-readably* t) T USER(2): (princ "zzz") zzz "zzz" USER(3): EOF Really exit lisp [n]? ; Exiting Lisp $ -- 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. "Complete Idiots Guide to Running LINUX Unleashed in a Nutshell for Dumbies" From rbrennon@compmore.net Wed Mar 25 17:00:48 1998 Received: from mail.compmore.net (mailr.compmore.net [206.222.80.2]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id RAA00270 for ; Wed, 25 Mar 1998 17:00:46 -0800 (PST) Received: (from uucp@localhost) by mail.compmore.net (8.8.5/8.7.3) id UAA09954 for ; Tue, 24 Mar 1998 20:23:56 -0500 (EST) Received: from port79.compmore.net(206.222.81.79), claiming to be "hurtemi" via SMTP by mail.compmore.net, id smtpd009948; Tue Mar 24 20:23:50 1998 Message-Id: <3.0.5.32.19980324203600.009747a0@mail.compmore.net> X-Sender: rbrennon@mail.compmore.net X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Tue, 24 Mar 1998 20:36:00 -0500 To: clisp-list@clisp.cons.org From: Rob Subject: Bug in loop..? Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" I've been struggling with some code that I've been cutting over to CLISP, and I've come across something that looks like a bug. In the CLtL2 text on page 745 I found this: (loop for i from 1 to 10 when (> i 5) collect i finally (print i)) returns 11 (6 7 8 9 10) which works fine. I tried it because the following does not: (loop for i in '(1 2 3 4 5 6 7 8 9 10) when (> i 5) collect i finally (print i)) returns *** - EVAL: variable I has no value Is this correct behaviour, or is there something wrong with one of the environments, caused perhaps by the 'in' ? Please let me know if there is a fix, or this is not supported. Thanks. From hoehle@zeus.gmd.de Wed Mar 25 17:22:26 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 RAA01281 for ; Wed, 25 Mar 1998 17:22:23 -0800 (PST) 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 XAA11570 for ; Wed, 25 Mar 1998 23:00:37 +0100 (MET) Received: from amiga ([141.12.144.207]) by zeus.gmd.de with SMTP id AA22034 (5.67b8/IDA-1.5 for ); Wed, 25 Mar 1998 23:00:18 +0100 Date: Wed, 25 Mar 1998 23:00:18 +0100 Message-Id: <199803252200.AA22034@zeus.gmd.de> From: Joerg.Hoehle@gmd.de (Jorg-Cyril Hohle) To: clisp-list@clisp.cons.org Subject: clisp -q with -ifile Hi, wouldn't it be a nice modification if usage of the -q option would turn *load-verbose* to NIL, at least for files loaded with -i? I'm using lisp.run -q -Mlispinit.mem -i dvips.fas -x(pipeps"stack-gc.ps") | less and get ";;;Loading ..." messages at the start of the pipe. Bye, Jo"rg Ho"hle. Joerg.Hoehle@gmd.de http://zeus.gmd.de/~hoehle/amiga-clisp.html From haible@ilog.fr Thu Mar 26 06:27:22 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 GAA05550 for ; Thu, 26 Mar 1998 06:27:16 -0800 (PST) Received: from ilog.ilog.fr ([172.17.4.41]) by sceaux.ilog.fr (8.8.8/8.8.7) with ESMTP id PAA03837 for ; Thu, 26 Mar 1998 15:26:18 +0100 (MET) 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 PAA07014; Thu, 26 Mar 1998 15:26:54 +0100 (MET) From: Bruno Haible Received: (from haible@localhost) by halles.ilog.fr (8.8.5/8.8.5) id PAA20865; Thu, 26 Mar 1998 15:26:52 +0100 (MET) Date: Thu, 26 Mar 1998 15:26:52 +0100 (MET) Message-Id: <199803261426.PAA20865@halles.ilog.fr> To: clisp-list@clisp.cons.org Subject: Re: Bug in loop..? In-Reply-To: <3.0.5.32.19980324203600.009747a0@mail.compmore.net> References: <3.0.5.32.19980324203600.009747a0@mail.compmore.net> rbrennon@compmore.net writes: > the following does not [work]: > > (loop for i in '(1 2 3 4 5 6 7 8 9 10) > when (> i 5) > collect i > finally (print i)) > > returns > *** - EVAL: variable I has no value What are you trying to do anyway in the finally clause? Accessing the value of an element which is not on the list? In some implementations you might get 10, in some implementations you might get NIL. In CLISP you get an error because the situation is just too hairy to be supported. Bruno From haible@ilog.fr Thu Mar 26 06:47:44 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 GAA05765 for ; Thu, 26 Mar 1998 06:47:42 -0800 (PST) Received: from ilog.ilog.fr ([172.17.4.41]) by sceaux.ilog.fr (8.8.8/8.8.7) with ESMTP id PAA04470 for ; Thu, 26 Mar 1998 15:47:03 +0100 (MET) 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 PAA08640; Thu, 26 Mar 1998 15:47:39 +0100 (MET) From: Bruno Haible Received: (from haible@localhost) by halles.ilog.fr (8.8.5/8.8.5) id PAA22163; Thu, 26 Mar 1998 15:47:38 +0100 (MET) Date: Thu, 26 Mar 1998 15:47:38 +0100 (MET) Message-Id: <199803261447.PAA22163@halles.ilog.fr> To: clisp-list@clisp.cons.org Subject: Re: princ & *print-readably* In-Reply-To: References: [The following message is a courtesy copy of an article that has been posted to comp.lang.lisp by Kent M Pitman . I repost it here on my own responsibility. Sorry if you see it twice. Bruno] Sam Steingold writes: > what should (let ((*print-readably* t)) (princ "zz")) > print? "zz" or zz? > ACL says zz, CMU says "zz", and CLISP said "zz" untill the today's patch > wich changed this to zz. Who is right? Remember that Lisp is somewhat schizo about the use of the names print and prin1. PRINT-OBJECT, for example, implements PRIN1, not PRINT. PRIN1 is only so-called for ancient reasons. It ought to have been named PRINT and PRINT should have been named PRINT-ON-OWN-LINE or something. But for reasons of history and compatibility, it wasn't. *PRINT-READABLY* is best understood as *PRIN1-READABLY*. Its role in life is to bridge the gap between the fact that many things have a printed representation that is re-readble, but many do not. In particular, hash tables, streams, etc. are not re-readable. So there is nothing more annoying than writing a program that does (DEFUN SAVE-ALL-MY-DATA-FOR-TOMORROW (FILE) (WITH-OPEN-FILE (STREAM FILE :DIRECTION :OUTPUT) (PRINT *ALL-MY-DATA* STREAM))) only to find out what was saved to a file was (FOO BAR ...) or (FOO BAR #) because tomorrow when I'm going to do (DEFUN READ-ALL-MY-DATA (FILE) (WITH-OPEN-FILE (STREAM FILE :DIRECTION :INPUT) (SETQ *ALL-MY-DATA* (READ STREAM))))) I'm going to get a syntax error. So *PRINT-READABLY* tells Lisp that programs doing printing should err at PRINT-time when they fully well know that the result will not be re-readable. Much better to know your save failed and that you need to take alternate action (while the image is still running on day 1) than to find out later. This has happened to me more than once in the olden days. I'm sure to others as well. The fix was: (DEFUN SAVE-ALL-MY-DATA-FOR-TOMORROW (FILE) (WITH-OPEN-FILE (STREAM FILE :DIRECTION :OUTPUT) (LET ((*PRINT-READABLY* T)) (PRINT *ALL-MY-DATA* STREAM)))) [Actually, there are aalso "typical bugs" related to mismatch of package, etc, too. Hence really, (DEFUN SAVE-ALL-MY-DATA-FOR-TOMORROW (FILE) (WITH-OPEN-FILE (STREAM FILE :DIRECTION :OUTPUT) (WITH-STANDARD-IO-SYNTAX (PRINT *ALL-MY-DATA* STREAM)))) is better; it binds not only *PRINT-READABLY* but a number of other things people often forget to bind that they should. Now comes the problem of PRINC. Here's a fact worth noting: No one calls PRINC ever in files to be re-readable so it's just nutty to change it's behavior. That is, if a program does: (PRINC *ALL-MY-DATA* STREAM) or even (PRINC *SOME-OF-MY-DATA* STREAM) we know that one of these things is true: (a) you're lost whether or not you're using *print-readably* (b) you're not re-reading with READ (c) you're implementing PRINT using PRINC as a sub-primitive. Here's another observation: print-object methods often call PRINC out of tradition, often where write-string is desired. Some of this is tradition. Some is becuase ~A in format is used and there is no write-string operation in format. Having *print-readably* randomly turn a ~A into ~S would be an unmitigated disaster becuase it would break print-object methods everywhere, making them insert quotes, backslashes, etc. all over the place. As Erik points out, as far as the spec goes, there is no question (PRINC "FOO") should print FOO, not "FOO" no matter the binding of *PRINT-ESCAPE* or *PRINT-READABLY* that prevails outside the call to PRINC, since PRINC binds both of these variables to false while it executes, and so no code within it would be aware of the values prevailing outside. But I thought you might want to see the history/motivation so you could feel comfortable that this is not an accident or typo. From rbrennon@compmore.net Thu Mar 26 12:36:20 1998 Received: from mail.compmore.net (mailr.compmore.net [206.222.80.2]) by seagull.cdrom.com (8.8.8/8.6.6) with ESMTP id MAA06973 for ; Thu, 26 Mar 1998 12:36:19 -0800 (PST) Received: (from uucp@localhost) by mail.compmore.net (8.8.5/8.7.3) id PAA25748 for ; Thu, 26 Mar 1998 15:27:10 -0500 (EST) Received: from port87.compmore.net(206.222.81.87), claiming to be "hurtemi" via SMTP by mail.compmore.net, id smtpd025743; Thu Mar 26 15:27:08 1998 Message-Id: <3.0.5.32.19980326153946.0096f100@mail.compmore.net> X-Sender: rbrennon@mail.compmore.net X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Thu, 26 Mar 1998 15:39:46 -0500 To: clisp-list@clisp.cons.org From: Rob Subject: Re: Bug in loop..? In-Reply-To: <199803261426.PAA20865@halles.ilog.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" >> the following does not [work]: >> >> (loop for i in '(1 2 3 4 5 6 7 8 9 10) >> when (> i 5) >> collect i >> finally (print i)) >> >> returns >> *** - EVAL: variable I has no value > >What are you trying to do anyway in the finally clause? Well, this was just a simplified example. I'm actually running through a larger list that looks something like: ((a 5) (b 8) c) Until the point that a non-list is hit, the variable is pointing to the last list. At the end, finally actually returns (second i). So, I'm returning the second element of the last list in the larger list. In MCL, where this thing originated, it works (and the previous example returns 10). Rather than re-write it immediately, I tried the simple example with the 'from' 1..10. When I saw that it worked but the 'in' didn't, I figured it for a bug. Not a big deal really, I try to get it another way. Hopefully the code doesn't rely on this 'technique' too often! :) Thanks. From hoehle@zeus.gmd.de Sun Mar 29 12:15:27 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 MAA10007 for ; Sun, 29 Mar 1998 12:15:18 -0800 (PST) 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 WAA03247 for ; Sun, 29 Mar 1998 22:15:30 +0200 (MET DST) Received: from amiga ([141.12.144.207]) by zeus.gmd.de with SMTP id AA20517 (5.67b8/IDA-1.5 for ); Sun, 29 Mar 1998 22:15:08 +0200 Date: Sun, 29 Mar 1998 22:15:08 +0200 Message-Id: <199803292015.AA20517@zeus.gmd.de> From: Joerg.Hoehle@gmd.de (Jorg-Cyril Hohle) To: clisp-list@clisp.cons.org Subject: upcasing and readtable Hi, I've been using CLISP within a Korean project and observed a difference in behaviour between CLISP and CMUCL. I used the following to make both Lisps accept Korean 16-bit encoded Hangul characters. I don't have the specification, but I've been told that the MSB of Hangul characters is set to 1 and from what I see the 7th bit of the second byte is also set to 1. ;;; ;;; Try to accept ISO and Korean characters as regular upper-case ones ;;; (loop for i from #x80 to #xFF do ;; A0 seems enough (set-syntax-from-char (code-char i) #\A)) All I need to do is to accept these characters as symbol constituents, pass them through under the default readtable (I cannot use a readtable that is not :upcase as it would foul mixed english & Korean text) and print them later. However, it seems that CLISP always converts characters according to ISO_8859_1 or some such. > (lisp-implementation-version) "1997-08-07 (Aou>t 1997)" > '>>\"o>>\'o ; my un-iso-ed TeX notation for email >>\"O>>\'O What's the relationship between the readtable, casing, read&print? Is there a way to tell CLISP that the character set it has to handle is not the OS-native one (ISOLATIN_CHS on AmigaOS, HPROMAN8_CHS, IBMPC_CHS etc.)? Thanks, Jo"rg Ho"hle. Joerg.Hoehle@gmd.de http://zeus.gmd.de/~hoehle/amiga-clisp.html