unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* quasiquote badness
@ 2008-09-30 21:14 Andy Wingo
  2008-12-02 18:56 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Wingo @ 2008-09-30 21:14 UTC (permalink / raw)
  To: bug-guile

While diagnosing a problem in the vm branch, I found this in master:

    guile> `,@x
    (unquote-splicing x)

This should throw an error.

Andy
-- 
http://wingolog.org/




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: quasiquote badness
  2008-09-30 21:14 quasiquote badness Andy Wingo
@ 2008-12-02 18:56 ` Ludovic Courtès
  2008-12-03 15:23   ` Marijn Schouten (hkBst)
  2008-12-04 15:22   ` Andy Wingo
  0 siblings, 2 replies; 4+ messages in thread
From: Ludovic Courtès @ 2008-12-02 18:56 UTC (permalink / raw)
  To: bug-guile

Hello!

Andy Wingo <wingo@pobox.com> writes:

> While diagnosing a problem in the vm branch, I found this in master:
>
>     guile> `,@x
>     (unquote-splicing x)
>
> This should throw an error.

I think I agree, but interestingly, Bigloo's interpreter produces the
exact same result and Ikarus' gives ",@x".  Is there some subtle
subtlety we're missing or is everyone off?

Thanks,
Ludo'.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: quasiquote badness
  2008-12-02 18:56 ` Ludovic Courtès
@ 2008-12-03 15:23   ` Marijn Schouten (hkBst)
  2008-12-04 15:22   ` Andy Wingo
  1 sibling, 0 replies; 4+ messages in thread
From: Marijn Schouten (hkBst) @ 2008-12-03 15:23 UTC (permalink / raw)
  To: Ludovic �; +Cc: bug-guile

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ludovic � wrote:
> Hello!
> 
> Andy Wingo <wingo@pobox.com> writes:
> 
>> While diagnosing a problem in the vm branch, I found this in master:
>>
>>     guile> `,@x
>>     (unquote-splicing x)
>>
>> This should throw an error.
> 
> I think I agree, but interestingly, Bigloo's interpreter produces the
> exact same result and Ikarus' gives ",@x".  Is there some subtle
> subtlety we're missing or is everyone off?
> 
> Thanks,
> Ludo'.
> 

Shockingly many implementations do what guile does, others rightly complain:

$ ./source\ code/scheme/invoke/invoke.scm -e '`,@x'
Bigloo (3.2a)
(unquote-splicing x)
CHICKEN 3.3.0
(unquote-splicing x)
Elk 3.99.7
,@x
Gambit v4.3.2
unquote-splicingx
Gauche scheme interpreter, version 0.8.13 [utf-8,pthreads]
,@x
Guile 1.8.5
(unquote-splicing x)
ikarus is unavailable
kawa is unavailable
larceny is unavailable
MIT/GNU Scheme 7.7.90.+

;,@ in illegal context: x
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1.

2 error>
End of input stream reached.
Welcome to MzScheme v4.1.3 [3m], Copyright (c) 2004-2008 PLT Scheme Inc.
#f::24: unquote-splicing: invalid context within quasiquote at:
(unquote-splicing x) in: (quasiquote (unquote-splicing x))

RScheme 0.7.3.4-b7u
syntax error in form: `,@x
>> Rest symbol x not a substitution


scheme48 1.8

Warning: ,@ in invalid context
         x
         (&syntax-error)
'syntax-error

Schoca Shell (Version 0.3.0-cvs) by Christoph Bauer

schoca> ==> (unquote-splicing x)
schoca>
scm 5e4
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
SCM may be distributed under the terms of the GNU General Public Licence;
certain other uses are permitted as well. For details, see the file `COPYING',
which is included in the SCM distribution.
There is no warranty, to the extent permitted by law.
 This executable was loaded from "/usr/bin/scm"
(#@unquote-splicing x)
sigscheme 0.8.3
Error: in scm_symbol_value: unbound variable: x
sscm> sscm>
sisc is unavailable
stklos (version 0.98)
,@x
TinyScheme 1.39
> Error: Unquote-splicing wasn't in a list: ,@x

>


- --
Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-{lisp,ml} on FreeNode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkk2pHUACgkQp/VmCx0OL2yi/gCfZ7ZZP0cLgAvK9CRTu5jpiYEN
NEAAn2NoFVdbSVmMpFEMzMZcJbeJ5fkt
=1f7M
-----END PGP SIGNATURE-----




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: quasiquote badness
  2008-12-02 18:56 ` Ludovic Courtès
  2008-12-03 15:23   ` Marijn Schouten (hkBst)
@ 2008-12-04 15:22   ` Andy Wingo
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2008-12-04 15:22 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: bug-guile

Hi,

On Tue 02 Dec 2008 19:56, ludo@gnu.org (Ludovic Courtès) writes:

> Andy Wingo <wingo@pobox.com> writes:
>
>> While diagnosing a problem in the vm branch, I found this in master:
>>
>>     guile> `,@x
>>     (unquote-splicing x)
>>
>> This should throw an error.
>
> I think I agree, but interestingly, Bigloo's interpreter produces the
> exact same result and Ikarus' gives ",@x".  Is there some subtle
> subtlety we're missing or is everyone off?

Could be others are off? R5RS says in 4.2.6:

     If a comma appears followed immediately by an at-sign (@), then the
     following expression must evaluate to a list; the opening and
     closing parentheses of the list are then "stripped away" and the
     elements of the list are inserted in place of the comma at-sign
     expression sequence. A comma at-sign should only appear within a
     list or vector <qq template>.

The above template is not a list, therefore unquote-splicing is in an
invalid context.

R6RS is stricter, saying in 11.17:

     Any unquote-splicing or multi-operand unquote form must appear only
     within a list or vector qq template.

Cheers,

Andy
-- 
http://wingolog.org/




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-12-04 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-30 21:14 quasiquote badness Andy Wingo
2008-12-02 18:56 ` Ludovic Courtès
2008-12-03 15:23   ` Marijn Schouten (hkBst)
2008-12-04 15:22   ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).