From: =?ISO-8859-2?Q?Aleksander_Nabag=B3o?=
Subject: #8)
Date: 
Message-ID: <g5nd8d$qgj$1@srv.cyf-kr.edu.pl>
!

Is it possible to construct such a function for
set-dispatch-macro-character that
#8) would be fully equivalent to )))))))) ?

;;; any number, not '8' olny, of course.

-- 
A
.

From: Kenny
Subject: Re: #8)
Date: 
Message-ID: <487f4329$0$20903$607ed4bc@cv.net>
Aleksander Nabag�o wrote:
> !
> 
> Is it possible to construct such a function for
> set-dispatch-macro-character that
> #8) would be fully equivalent to )))))))) ?

Will there be little +/- GUI widgets next to the 8 so I can click on 
them until the left parens I want blinks?

That would be so cool!

kt
From: Matthias Buelow
Subject: Re: #8)
Date: 
Message-ID: <6e8u1oF5v6lhU1@mid.dfncis.de>
Aleksander Nabag�o wrote:

> Is it possible to construct such a function for
> set-dispatch-macro-character that
> #8) would be fully equivalent to )))))))) ?

You'd have to replace the macro function for #\(. However, the difficult
thing is, how to match the number against the recursion depth?
From: Pascal J. Bourguignon
Subject: Re: #8)
Date: 
Message-ID: <7cej5s8se4.fsf@pbourguignon.anevia.com>
Matthias Buelow <···@incubus.de> writes:

> Aleksander Nabagło wrote:
>
>> Is it possible to construct such a function for
>> set-dispatch-macro-character that
>> #8) would be fully equivalent to )))))))) ?
>
> You'd have to replace the macro function for #\(. However, the difficult
> thing is, how to match the number against the recursion depth?

Sounds like a good job for a special variable.

(defvar *read-recusion-length* 0)

Not only will you rewrite the reader macro for #\(,
but also the dispatch reader macro for #\# #\(,
#\# #\A, #\# #\S, and perhaps some others I'm forgeting.

 (a #( 1 2 #2A((a b) (c d #4)


And don't forget to update all the emacs mode that do paren matching
please.

-- 
__Pascal Bourguignon__
From: Matthias Buelow
Subject: Re: #8)
Date: 
Message-ID: <6e95psF5toatU1@mid.dfncis.de>
Pascal J. Bourguignon wrote:

> (defvar *read-recusion-length* 0)

However, the HyperSpec says: "The reader macro function must not have
any side effects other than on the input stream". Of course, one can
choose to ignore that...
From: =?ISO-8859-2?Q?Aleksander_Nabag=B3o?=
Subject: Re: #8)
Date: 
Message-ID: <g5pd8s$7u0$1@srv.cyf-kr.edu.pl>
!

Pascal J. Bourguignon napisa�(a):
> Sounds like a good job for a special variable.
> 
> (defvar *read-recusion-length* 0)
> 
> Not only will you rewrite the reader macro for #\(,
> but also the dispatch reader macro for #\# #\(,
> #\# #\A, #\# #\S, and perhaps some others I'm forgeting.
sssSS, it would be a havoc.

I have in mind pushing back the #\)'s,

#8) -> push source stream, push ))))))))#0)
when #\)'s consumed, #0) triggers restore
of the source stream; none modifications
to existing dispatch reader macros except #).

#) signals reader-error, ignoring num arg.

-- 
A
.
From: Matthias Buelow
Subject: Re: #8)
Date: 
Message-ID: <6eb2l9F67i9hU1@mid.dfncis.de>
Aleksander Nabag�o wrote:

> I have in mind pushing back the #\)'s,

You can push-back only 1 character in between reads...
From: John Thingstad
Subject: Re: #8)
Date: 
Message-ID: <op.uefs6cwkut4oq5@pandora.alfanett.no>
På Thu, 17 Jul 2008 14:29:53 +0200, skrev Aleksander Nabagło  
<·@ap.krakow.pl>:

> !
>
> Is it possible to construct such a function for
> set-dispatch-macro-character that
> #8) would be fully equivalent to )))))))) ?
>
> ;;; any number, not '8' olny, of course.
>

Yes, you can make the reader do that, but why would you want to?
Normally you use the paren matching to check you have closed to the right  
level.
Also the parens allow SLIME commands to manipulate the order of the sexp's  
(Ctrl-Alt-t) which this would mess up.
A more common use is a reader macro to close the rest of the parens.
But there is a SLIME command for that (Ctrl-c-Ctrl-q) so spesific reader  
syntax is rarely used anymore.
(On my Norwegian keyboard {[]·····@ are bound to AltGr which is the same  
as Ctrl-Alt so none of the Ctrl-Alt command on these keys work..
For example slime-close-all-parens Ctrl-Alt-] is impossible to enter.)


--------------
John Thingstad
From: Vassil Nikolov
Subject: Re: #8)
Date: 
Message-ID: <snzlk00j5y5.fsf@luna.vassil.nikolov.name>
On Thu, 17 Jul 2008 08:03:25 -0700 (PDT), ········@gmail.com said:
| ...
| 'wise', this strange antiquated term, means those things which doesn't
| have real drawbacks in the long term;

  They say that one who has information can make a mistake; one who
  has knowledge can correct that mistake; and one who has wisdom can
  avoid the mistake in the first place...

  (They also say that one who has information can post to Usenet; one
  who has knowledge can follow up to a post; and one who has wisdom
  can refrain from following up...)

  ---Vassil.


-- 
Peius melius est.  ---Ricardus Gabriel.
From: Vassil Nikolov
Subject: Re: #8)
Date: 
Message-ID: <snzej5sj58j.fsf@luna.vassil.nikolov.name>
On Thu, 17 Jul 2008 14:29:53 +0200, Aleksander Nabag�o <·@ap.krakow.pl> said:
| Is it possible to construct such a function for
| set-dispatch-macro-character that
| #8) would be fully equivalent to )))))))) ?

  By the way, `#)' is already taken and we _do_ want it to signal an
  error, so any such exercise or variation on that theme would have to
  choose a different character (or pair of character).

  See also the literature about Interlisp, which had a broadly similar
  facility called super-parentheses (a right bracket closed all
  parentheses up to a left bracket), so such a thing has been
  subjected to natural selection, in fact...

  ---Vassil.


-- 
Peius melius est.  ---Ricardus Gabriel.
From: Pascal J. Bourguignon
Subject: Re: #8)
Date: 
Message-ID: <87vdz3zr4x.fsf@hubble.informatimago.com>
Vassil Nikolov <···············@pobox.com> writes:

> On Thu, 17 Jul 2008 14:29:53 +0200, Aleksander Nabag�o <·@ap.krakow.pl> said:
> | Is it possible to construct such a function for
> | set-dispatch-macro-character that
> | #8) would be fully equivalent to )))))))) ?
>
>   By the way, `#)' is already taken and we _do_ want it to signal an
>   error, so any such exercise or variation on that theme would have to
>   choose a different character (or pair of character).
>
>   See also the literature about Interlisp, which had a broadly similar
>   facility called super-parentheses (a right bracket closed all
>   parentheses up to a left bracket), so such a thing has been
>   subjected to natural selection, in fact...

So what?  Jurassic Parcs are fun!


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

PLEASE NOTE: Some quantum physics theories suggest that when the
consumer is not directly observing this product, it may cease to
exist or will exist only in a vague and undetermined state.