From: Alexander
Subject: nested backquote and cmucl
Date: 
Message-ID: <1126888436.351602.267840@g47g2000cwa.googlegroups.com>
Clisp:
[2]> (eval ``(,,@(list 1 2 3) 10))
(1 2 3 10)

Cmucl 19a:
* (eval ``(,,@(list 1 2 3) 10))

Invalid number of arguments: 4
   [Condition of type KERNEL:SIMPLE-PROGRAM-ERROR]

Why I get error on cmucl ? Is the expression correct?
Thanks.

From: Kent M Pitman
Subject: Re: nested backquote and cmucl
Date: 
Message-ID: <u4q8kaot5.fsf@nhplace.com>
"Alexander" <········@gmail.com> writes:

> Clisp:
> [2]> (eval ``(,,@(list 1 2 3) 10))
> (1 2 3 10)
> 
> Cmucl 19a:
> * (eval ``(,,@(list 1 2 3) 10))
> 
> Invalid number of arguments: 4
>    [Condition of type KERNEL:SIMPLE-PROGRAM-ERROR]
> 
> Why I get error on cmucl ? Is the expression correct?
> Thanks.

The expression is correct.  Looks to me like the implementation has a bug.

Incidentally, the use of ,,@ in the case of self-evaluating elements
in the list is something that's going to confuse you.  I recommend
that while you're learning by testing, you use data that is not 
self-evaluating so that you can detect additional evaluations.  To see
what I mean, try using ,',@ in the above [in an implementation where
it works] and you'll see it gets the same answer.  But if you used 
symbols in that situation (ones that weren't bound to themselves, I mean),
you'd get different effects from ,,@ and ,',@ .

Good luck.
From: Harald Hanche-Olsen
Subject: Re: nested backquote and cmucl
Date: 
Message-ID: <pcopsr9j5t3.fsf@shuttle.math.ntnu.no>
+ "Alexander" <········@gmail.com>:

| Clisp:
| [2]> (eval ``(,,@(list 1 2 3) 10))
| (1 2 3 10)
| 
| Cmucl 19a:
| * (eval ``(,,@(list 1 2 3) 10))
| 
| Invalid number of arguments: 4
|    [Condition of type KERNEL:SIMPLE-PROGRAM-ERROR]
| 
| Why I get error on cmucl ? Is the expression correct?

FWIW, I get (1 2 3 10) on cmucl 19a under FreeBSD.  Ditto with cmucl
19a under Solaris.  What architecture are you running on?

I believe the expression is correct, as far as my limited
understanding of nested backquote syntax goes.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- Debating gives most of us much more psychological satisfaction
  than thinking does: but it deprives us of whatever chance there is
  of getting closer to the truth.  -- C.P. Snow
From: Alexander
Subject: Re: nested backquote and cmucl
Date: 
Message-ID: <1126954489.192684.10040@g47g2000cwa.googlegroups.com>
Harald Hanche-Olsen wrote:
> FWIW, I get (1 2 3 10) on cmucl 19a under FreeBSD.  Ditto with cmucl
> 19a under Solaris.  What architecture are you running on?
>

Linux sh-2 2.6.8-24-default #1 Wed Oct 6 09:16:23 UTC 2004 i686 i686
i386 GNU/Linux

CMU Common Lisp 19a, running on sh-2
With core: /usr/lib/cmucl/lib/lisp.core
Dumped on: Wed, 2004-07-28 20:51:48+04:00 on lorien
See <http://www.cons.org/cmucl/> for support information.
Loaded subsystems:
    Python 1.1, target Intel x86
    CLOS based on Gerd's PCL 2004/04/14 03:32:47
From: Rob Warnock
Subject: Re: nested backquote and cmucl
Date: 
Message-ID: <qJWdneThI6qMiLPeRVn-tg@speakeasy.net>
Harald Hanche-Olsen  <······@math.ntnu.no> wrote:
+---------------
| + "Alexander" <········@gmail.com>:
| | Clisp:
| | [2]> (eval ``(,,@(list 1 2 3) 10))
| | (1 2 3 10)
+---------------

FWIW, a *really* old version of CLISP (2.29) barfs with this error:

    *** - EVAL: too many arguments given to CONS: (CONS 1 2 3 '(10))

+---------------
| | Cmucl 19a:
| | * (eval ``(,,@(list 1 2 3) 10))
| | Invalid number of arguments: 4
| |    [Condition of type KERNEL:SIMPLE-PROGRAM-ERROR]
| | 
| | Why I get error on cmucl ? Is the expression correct?
| 
| FWIW, I get (1 2 3 10) on cmucl 19a under FreeBSD.  Ditto with cmucl
| 19a under Solaris.  What architecture are you running on?
+---------------

I see the same error with FreeBSD-native 19a-pre3:

    Dumped on: Fri, 2004-07-02 11:56:53-07:00 on snapdragon.csl.sri.com

and Linux 19a:

    Dumped on: Wed, 2004-07-28 09:51:48-07:00 on lorien

Perhaps you have a newer "19a"?


-Rob

-----
Rob Warnock			<····@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607
From: Harald Hanche-Olsen
Subject: Re: nested backquote and cmucl
Date: 
Message-ID: <pcoll1tbm8p.fsf@shuttle.math.ntnu.no>
+ ····@rpw3.org (Rob Warnock):

| Perhaps you have a newer "19a"?

Dumped on: Tue, 2004-08-03 18:19:33+02:00 on snapdragon.csl.sri.com

Uh, now that I try again, I get the same error that you and others get.

Maybe I screwed up and tested on sbcl?  Nooo, I get the same error
even there.  I really can't explain what is happening.  Maybe I should
cut back on the coffee.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- Debating gives most of us much more psychological satisfaction
  than thinking does: but it deprives us of whatever chance there is
  of getting closer to the truth.  -- C.P. Snow