Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#636 #'apply reacts differently to dotted list when compiled

closed-fixed
Sam Steingold
clisp (525)
5
2012-04-23
2012-04-12
Bill Evans
No

My abject apologies if this is a feature, not a bug.

If I (apply #'something 5 6 (append NIL "X")), where #'something begins with "defun something (a b &rest pieces)", then within #'something, (type-of pieces) will be either NULL (if the lisp program is interpreted) or (SIMPLE-BASE-STRING 1) (if the lisp program is compiled). Granted, I shouldn't be doing that, but ...

=== platform:
Linux tiger 2.6.32-5-686 #1 SMP Tue Mar 8 21:36:00 UTC 2011 i686 GNU/Linux
=== glibc version:
GNU C Library (Debian EGLIBC 2.11.2-10) stable release version 2.11.2, by Roland McGrath et al.
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.4.5.
Compiled on a Linux 2.6.32 system on 2011-01-23.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
For bug reporting instructions, please see:
<http://www.debian.org/Bugs/>.
=== clisp version:
GNU CLISP 2.49 (2010-07-07) (built 3543225158) (memory 3543225458)
Software: GNU C 4.4.5
gcc -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -O2 -fexpensive-optimizations -falign-functions=4 -DENABLE_UNICODE -DDYNAMIC_MODULES -I. -lreadline -lncurses -ldl libgnu_cl.a
SAFETY=0 HEAPCODES LINUX_NOEXEC_HEAPCODES SPVW_BLOCKS SPVW_MIXED TRIVIALMAP_MEMORY
libreadline 6.1
Features:
(REGEXP SYSCALLS I18N LOOP COMPILER CLOS MOP CLISP ANSI-CL COMMON-LISP LISP=CL
INTERPRETER SOCKETS GENERIC-STREAMS LOGICAL-PATHNAMES SCREEN GETTEXT UNICODE
BASE-CHAR=CHARACTER PC386 UNIX)
C Modules: (clisp i18n syscalls regexp)
Installation directory: /u/home/clisp/bug4/home/lib/clisp-2.49/
User language: ENGLISH
Machine: I686 (I686) tiger.x441afea5.org [10.0.0.1]
=== build details:
I downloaded the currently released version of clisp today (12 Apr 2012) from http://ftp.gnu.org/pub/gnu/clisp/latest.

I built it the normal way, as shown in the attached script. Placed into its own empty directory, that script downloads the source, builds and installs clisp, and runs the program, first interpreted and then compiled.

Discussion

  • Bill Evans
    Bill Evans
    2012-04-12

    script which builds clisp and runs the offending program, both interpreted and compiled

     
    Attachments
  • Sam Steingold
    Sam Steingold
    2012-04-12

    1. I don't think you can separate compiled from interpreted here: both are done by apply_closure

    2. I don't think adding an explicit list check to the evaluator makes much sense.

    3. Bruno, why do you have error_apply_dotted signal a program-error and error_apply_toofew signal an argument-list-dotted error? these look weird:

    > (apply #'cons 1)
    *** - APPLY: dotted argument list given to CONS : 1
    > (apply #'read-from-string "a" 2)
    *** - APPLY: argument list given to READ-FROM-STRING is dotted (terminated by 2)

    I think the messages (and errors) should be identical.

     
  • Sam Steingold
    Sam Steingold
    2012-04-23

    • assigned_to: haible --> sds
    • status: open --> closed-fixed
     
  • Sam Steingold
    Sam Steingold
    2012-04-23

    thank you for your bug report.
    the bug has been fixed in the source tree (mercurial/hg).
    you can either wait for the next release (recommended)
    or check out the current mercurial tree (see http://clisp.org\)
    and build CLISP from the sources (be advised that between
    releases the source tree is very unstable and may not even build
    on your platform).