From: Duane Rettig
Subject: Re: ····@
Date: 
Message-ID: <465v0yscu.fsf@beta.franz.com>
Pascal Costanza <········@web.de> writes:

> Hi folks,
> 
> I have written the following macro.

 [ ... ]

> Its purpose is to allow returning values from somewhere in the middle
> of a function.

 [ ... ]

> The purpose of this posting is to check whether I have got this macro
> right. It seems to work well - but is there anything I might have
> overlooked? Any comments?

It looks like Nils has already found some problem cases.  My functional
advice was going to be to test, test, test, but it seems Nils has done
some of that for you.

My other comment borders on a style issue; it is not about beauty or
ugliness, but about utility and liklihood of error (I am not sure what
exctly to call it).  It's about your choice of marker symbol: I think
that ·@ is not the best choice, because of what it makes the code look
like.  To illustrate, re your example:

> (defmethod test :around ()
>    (format t "around: ")
>    @(call-next-method)
>    (format t " :around"))

This looks like a mistake; it looks like you've forgotten a comma
(and, of course, a backquote, but the first-order code-read makes me
think "forgot a comma".

Perhaps a circumflex ("^") would be a better choice?  This carries
some precedent, since the circumflex is used in format strings as
an a sort of ending device, and although it carries different semantics,
they are closer to those of @ usage, and it doesn't carry the baggage
of having Lisp reader syntax associated with it.

Perhaps there is an even better choice.  I had thought of '<, but that
would leave one with either a feeling of a strange prefix math notation,
or else an imbalance with the human reader searching for the closing '>.

As I said, this borders on a style issue, and you are of course free
to stay with your choice.  I'm trying to perform a lookahead to what
your code written in this style will look like to you 6 months after
you write it...

-- 
Duane Rettig    ·····@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182   

From: Pascal Costanza
Subject: Re: ····@
Date: 
Message-ID: <3DD3EB39.7070504@web.de>
Duane Rettig wrote:
> Pascal Costanza <········@web.de> writes:
> 
> 
>>Hi folks,
>>
>>I have written the following macro.
> 
> 
>  [ ... ]
> 
> 
>>Its purpose is to allow returning values from somewhere in the middle
>>of a function.
> 
> 
>  [ ... ]
> 

> It looks like Nils has already found some problem cases.  My functional
> advice was going to be to test, test, test, but it seems Nils has done
> some of that for you.

Yes, he actually helped me to see what I should be looking for...

> My other comment borders on a style issue; it is not about beauty or
> ugliness, but about utility and liklihood of error (I am not sure what
> exctly to call it).  It's about your choice of marker symbol: I think
> that ·@ is not the best choice, because of what it makes the code look
> like.

Well, it seems that all the nice symbols have already been used. I don't 
like ^ because it's usually inconvenient to type, and reminds me of the 
pointer symbol in Pascal. What about <>?

(prog<>
   (...)
   <>(...)
   (...))

Or ~?

(prog~
    (...)
    ~(...)
    (...))


Pascal

-- 
Pascal Costanza               University of Bonn
···············@web.de        Institute of Computer Science III
http://www.pascalcostanza.de  R�merstr. 164, D-53117 Bonn (Germany)
From: Marco Antoniotti
Subject: Re: ····@
Date: 
Message-ID: <y6cy97vx6ua.fsf@octagon.valis.nyu.edu>
Pascal Costanza <········@web.de> writes:

> Duane Rettig wrote:
> > Pascal Costanza <········@web.de> writes:
> >
> >>Hi folks,
> >>
> >>I have written the following macro.
> >  [ ... ]
> >
> >>Its purpose is to allow returning values from somewhere in the middle
> >>of a function.
> >  [ ... ]
> >
> 
> > It looks like Nils has already found some problem cases.  My functional
> > advice was going to be to test, test, test, but it seems Nils has done
> > some of that for you.
> 
> Yes, he actually helped me to see what I should be looking for...
> 
> > My other comment borders on a style issue; it is not about beauty or
> > ugliness, but about utility and liklihood of error (I am not sure what
> > exctly to call it).  It's about your choice of marker symbol: I think
> > that ·@ is not the best choice, because of what it makes the code look
> > like.
> 
> Well, it seems that all the nice symbols have already been used. I
> don't like ^ because it's usually inconvenient to type, and reminds me
> of the pointer symbol in Pascal. What about <>?
> 
> (prog<>
>    (...)
>    <>(...)
>    (...))
> 
> Or ~?
> 
> (prog~
>     (...)
>     ~(...)
>     (...))
> 

Why not making it a special and local function or macro

        (prog-escape
            (...)
            (escape (...))
            (...))
?

-- 
Marco Antoniotti ========================================================
NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
715 Broadway 10th Floor                 fax  +1 - 212 - 995 4122
New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
                    "Hello New York! We'll do what we can!"
                           Bill Murray in `Ghostbusters'.
From: Duane Rettig
Subject: Re: ····@
Date: 
Message-ID: <41y5oynjz.fsf@beta.franz.com>
Pascal Costanza <········@web.de> writes:

> Duane Rettig wrote:
> 
> > My other comment borders on a style issue; it is not about beauty or
> > ugliness, but about utility and liklihood of error (I am not sure what
> > exctly to call it).  It's about your choice of marker symbol: I think
> > that ·@ is not the best choice, because of what it makes the code look
> > like.
> 
> Well, it seems that all the nice symbols have already been used. I
> don't like ^ because it's usually inconvenient to type, and reminds me
> of the pointer symbol in Pascal. What about <>?

Hmm, on my keyboard the @ key is above the 2, and the ^ key is above the
6; they're both shifted, and on the top row, and so I don't view one
as more inconvenient than the other.

As for <>; they are also both shifted keys for me, although they are on
the bottom row, and there are two of them.

Frankly, though, I almost never look at actual typing convenience, but
rather what things look like.

> (prog<>
>    (...)
>    <>(...)
>    (...))

Moving toward HTML, are we? :-)

> Or ~?
> 
> (prog~
>     (...)
>     ~(...)
>     (...))

Yuck.

-- 
Duane Rettig    ·····@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182   
From: Marcus Breiing
Subject: Re: ····@
Date: 
Message-ID: <U8JLp2uIEIcorSRYP3vIxr@breiing.com>
Duane Rettig <·····@franz.com> wrote:

> Hmm, on my keyboard the @ key is above the 2, and the ^ key is above
> the 6; they're both shifted, and on the top row, and so I don't view
> one as more inconvenient than the other.

On my keyboard, as on Pascal Costanza's (I guess), ^ is a dead key.
So you type ^+Space to get ^.  At least, nowadays it actually *works*
like that for me.  I had a setup once where typing this invariably got
me ^^, so I'd have to type ^+Space+Backspace to get a single caret.
Dr�le.


-- 
Marcus Breiing
···················@breiing.com (will expire)
From: Erik Naggum
Subject: Re: ····@
Date: 
Message-ID: <3246295927696009@naggum.no>
* Marcus Breiing
| On my keyboard, as on Pascal Costanza's (I guess), ^ is a dead key.
| So you type ^+Space to get ^.  At least, nowadays it actually *works*
| like that for me.  I had a setup once where typing this invariably got
| me ^^, so I'd have to type ^+Space+Backspace to get a single caret.

  If you edit text for human beings, this is not an insane keyboard layout.
  If you edit code, anything that keeps all of ASCII from being accessible
  without contortions is rabidly insane.  Programmers who cannot figure out
  how to unbraindamage their keyboards should become journalists or
  something where accuracy and intelligence are inconveniences.

  On Norwegian keyboards, {}[] are reachable with AltGr and a digit key on
  the left hand.  If you write in any language using the C syntax template,
  and you have /not/ changed to a US keyboard layout to get rid of this
  monstrous insanity, you deserve the wrists you are soon going to get.
  (But if someone wishes to argue against Java and C++ in Norway based on
  this incredible braindamage, I shall probably support them.)

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Joe Marshall
Subject: Re: ····@
Date: 
Message-ID: <u1ijet4i.fsf@ccs.neu.edu>
Erik Naggum <····@naggum.no> writes:

>   On Norwegian keyboards, {}[] are reachable with AltGr and a digit key on
>   the left hand.  If you write in any language using the C syntax template,
>   and you have /not/ changed to a US keyboard layout to get rid of this
>   monstrous insanity, you deserve the wrists you are soon going to get.

But what about trigrams......?
From: Erik Naggum
Subject: Re: ····@
Date: 
Message-ID: <3246302959841412@naggum.no>
* Joe Marshall
| But what about trigrams......?

  The whole trigram concept was invented by a particularly dishonest Danish
  nutjob who did not want to change his keyboard.  Now, C sports bigrams,
  one of his ideas that would have been shot down if anybody had bothered
  to check his claim that "X, Y, and Z used it", which he successfully used
  to fool at least 4 different standardization organizations by arguing
  that the others used it and running around fast enough to ensure that
  that argument was self-sustaining, however circular.  It was an amazing
  example of how it is possible to use the implicit trust in decisions made
  standardization organizations can be exploited.  Even the IETF was used
  in this political game and published a horribly bug-ridden RFC that is
  /completely/ worthless.

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Nils Goesche
Subject: Re: ····@
Date: 
Message-ID: <87adkbvhce.fsf@darkstar.cartan>
Erik Naggum <····@naggum.no> writes:

> * Joe Marshall
> | But what about trigrams......?
> 
>   The whole trigram concept was invented by a particularly
>   dishonest Danish nutjob who did not want to change his
>   keyboard.

Pardon my ignorance, but google didn't help much in this case.
What are trigrams?

Regards,
-- 
Nils G�sche
Ask not for whom the <CONTROL-G> tolls.

PGP key ID #xD26EF2A0
From: Erik Naggum
Subject: Re: ····@
Date: 
Message-ID: <3246307899334849@naggum.no>
* Nils Goesche
| Pardon my ignorance, but google didn't help much in this case.
| What are trigrams?

  A way for really stupid people to write C without changing to a rational
  keyboard layout.  I see now that they are actually called "trigraphs".
  In brief, the following replacements are made at a very early stage in
  the processing of the input files.

                               ??=   -->   #
                               ??(   -->   [
                               ??/   -->   \
                               ??)   -->   ]
                               ??'   -->   ^
                               ??<   -->   {
                               ??!   -->   |
                               ??>   -->   }
                               ??-   -->   ~

  As if this was not enough, we also have support for "digraphs":

In all aspects of the language, the six tokens

                       <:   :>   <%   %>   %:   %:%:

behave, respectively, the same as the six tokens

                       [    ]    {    }    #    ##

except for their spelling.
  
  The most significant consequence of these stunts is that you cannot hold
  obfuscated C contests, anymore.

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Nils Goesche
Subject: Re: ····@
Date: 
Message-ID: <871y5nvaew.fsf@darkstar.cartan>
Erik Naggum <····@naggum.no> writes:

> * Nils Goesche
> | Pardon my ignorance, but google didn't help much in this case.
> | What are trigrams?
> 
>   A way for really stupid people to write C without changing to
>   a rational keyboard layout.  I see now that they are actually
>   called "trigraphs".

Ah, sure.  I know these, of course.  Just one of the many things
the experienced C programmer gets bitten by once in a
while... :-( I don't remember a specific example, but I am
certain that there was more than one occasion I or a coworker got
bitten by this -- made for very hard to find bugs (always end
your exciting debug messages and comments with ?!, not with ??).

I have indeed been wondering all the time how something stupid
like this could ever enter the C standard.  Do you know the
story?  Is it written down somewhere?

Regards,
-- 
Nils G�sche
Ask not for whom the <CONTROL-G> tolls.

PGP key ID #xD26EF2A0
From: Erik Naggum
Subject: Re: ····@
Date: 
Message-ID: <3246317433421728@naggum.no>
* Nils Goesche <···@cartan.de>
| I have indeed been wondering all the time how something stupid like this
| could ever enter the C standard.  Do you know the story?  Is it written
| down somewhere?

  I just told the story.

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Nils Goesche
Subject: Re: ····@
Date: 
Message-ID: <87r8dnttaf.fsf@darkstar.cartan>
Erik Naggum <····@naggum.no> writes:

> * Nils Goesche <···@cartan.de>
> | I have indeed been wondering all the time how something
> | stupid like this could ever enter the C standard.  Do you
> | know the story?  Is it written down somewhere?
> 
>   I just told the story.

Yes, but I still don't know the name of the dane in question :-)
-- 
Nils G�sche
Ask not for whom the <CONTROL-G> tolls.

PGP key ID #xD26EF2A0
From: Erik Naggum
Subject: Re: ····@
Date: 
Message-ID: <3246320440887846@naggum.no>
* Nils Goesche
| Yes, but I still don't know the name of the dane in question :-)

  RFC 1345 should be a fairly good start in this regard.

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Marcus Breiing
Subject: Re: ····@
Date: 
Message-ID: <i3vO1ncjbCOOpehSn7AYBC@breiing.com>
Erik Naggum <····@naggum.no> wrote:

>   If you edit code, anything that keeps all of ASCII from being
>   accessible without contortions is rabidly insane.

Hitting two or even three keys in sequence to get an operator from
your favorite programming language isn't really *rabidly* insane.
Hell, if it were, we'd all have to switch to Paul Graham's Arc, which
seems to be based on that idea:-)

That said, the one place where I actually had to type the caret more
than once in a blue moon was in Gnus, to move up the reference chain.
I changed that keybinding, and that was it.

What isn't good thinking IMHO is for a language *designer* to reject a
syntax that would be really nice just because he can't type it
conveniently using his *current* setup.  That'd be like specifying a
fixed huffman tree for ZIP and expect people to adjust their
compressible material accordingly.

-- 
Marcus Breiing
···················@breiing.com (will expire)
From: Erik Naggum
Subject: Re: ····@
Date: 
Message-ID: <3246297994299651@naggum.no>
* Marcus Breiing
| That'd be like specifying a fixed huffman tree for ZIP and expect people
| to adjust their compressible material accordingly.

  Good analogy.

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Nils Goesche
Subject: Re: ····@
Date: 
Message-ID: <lklm3vx46c.fsf@cartan.de>
Marcus Breiing <············@breiing.com> writes:

> Duane Rettig <·····@franz.com> wrote:
> 
> > Hmm, on my keyboard the @ key is above the 2, and the ^ key is above
> > the 6; they're both shifted, and on the top row, and so I don't view
> > one as more inconvenient than the other.
> 
> On my keyboard, as on Pascal Costanza's (I guess), ^ is a dead key.
> So you type ^+Space to get ^.  At least, nowadays it actually *works*
> like that for me.  I had a setup once where typing this invariably got
> me ^^, so I'd have to type ^+Space+Backspace to get a single caret.
> Dr�le.

$ setxkbmap -layout us

It really pays off in the long run.

Regards,
-- 
Nils G�sche
"Don't ask for whom the <CTRL-G> tolls."

PGP key ID 0x0655CFA0
From: Marcus Breiing
Subject: Re: ····@
Date: 
Message-ID: <T7IFJUoOhR8dgv0iuFrkGJ@breiing.com>
Nils Goesche <······@cartan.de> wrote:

> $ setxkbmap -layout us

Well, I use Win2K as a device driver so that wouldn't work.  However,
on this system I can hit alt-shift to switch between German and US
layout on the fly.  Nifty.

I also do major-mode dependent remapping of �,� and �, but that's
about all the keyboard mangling I can stomach.  I like to retain the
ability to work on other people's computers.  I have almost *lost* the
ability to use non-RPN pocket calculators, and that bothers me,
sometimes:-)

-- 
Marcus Breiing
···················@breiing.com (will expire)
From: Erik Naggum
Subject: Re: ····@
Date: 
Message-ID: <3246295498081604@naggum.no>
* Pascal Costanza
| I don't like ^ because it's usually inconvenient to type, and reminds me
| of the pointer symbol in Pascal.

  This is one case where it makes sense to think about something even
  though it gives you painful associations.

  ^ is unshifted above the Y on my keyboard...

-- 
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
From: Thomas F. Burdick
Subject: Re: ····@
Date: 
Message-ID: <xcvfzu37p2z.fsf@apocalypse.OCF.Berkeley.EDU>
Erik Naggum <····@naggum.no> writes:

> * Pascal Costanza
> | I don't like ^ because it's usually inconvenient to type, and reminds me
> | of the pointer symbol in Pascal.
> 
>   This is one case where it makes sense to think about something even
>   though it gives you painful associations.
> 
>   ^ is unshifted above the Y on my keyboard...

Hmm, Pascal has painful memories of Pascal ...

If you're looking for positive associations, SmallTalk writes
  (return foo)
as
  ^foo
and it's got this nice up-arrow feel to it

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'