From: Peter Seibel
Subject: (/= (char-int c) (char-code c))?
Date: 
Message-ID: <m3n0i9ogkm.fsf@javamonkey.com>
Are there current Lisp implementations that actually use
implementation-defined character attributes? Or are they a relic of
the days when Lisp machines hung font information off of the actual
character objects in a buffer that was being displayed on the screen
and modifier bits off the the actual objects being generated by key
presses?

CLISP's implementation notes say it doesn't use any. I couldn't find
anything in Allegro's docs that said one way or the other.

-Peter

-- 
Peter Seibel                                      ·····@javamonkey.com

  The intellectual level needed   for  system design is  in  general
  grossly  underestimated. I am  convinced  more than ever that this
  type of work is very difficult and that every effort to do it with
  other than the best people is doomed to either failure or moderate
  success at enormous expense. --Edsger Dijkstra

From: Tim Bradshaw
Subject: Re: (/= (char-int c) (char-code c))?
Date: 
Message-ID: <ey38yttblnw.fsf@cley.com>
* Peter Seibel wrote:
> Are there current Lisp implementations that actually use
> implementation-defined character attributes? Or are they a relic of
> the days when Lisp machines hung font information off of the actual
> character objects in a buffer that was being displayed on the screen
> and modifier bits off the the actual objects being generated by key
> presses?

Yes, LispWorks does.
From: Peter Seibel
Subject: Re: (/= (char-int c) (char-code c))?
Date: 
Message-ID: <m3issxnloa.fsf@javamonkey.com>
Tim Bradshaw <···@cley.com> writes:

> * Peter Seibel wrote:
> > Are there current Lisp implementations that actually use
> > implementation-defined character attributes? Or are they a relic of
> > the days when Lisp machines hung font information off of the actual
> > character objects in a buffer that was being displayed on the screen
> > and modifier bits off the the actual objects being generated by key
> > presses?
> 
> Yes, LispWorks does.

Do you what they are and how they use them? Or can you point me to the
right place in their manual to read about them?

-Peter

-- 
Peter Seibel                                      ·····@javamonkey.com

  The intellectual level needed   for  system design is  in  general
  grossly  underestimated. I am  convinced  more than ever that this
  type of work is very difficult and that every effort to do it with
  other than the best people is doomed to either failure or moderate
  success at enormous expense. --Edsger Dijkstra
From: Tim Bradshaw
Subject: Re: (/= (char-int c) (char-code c))?
Date: 
Message-ID: <ey3d6j4qt4g.fsf@cley.com>
* Peter Seibel wrote:
> Do you what they are and how they use them? Or can you point me to the
> right place in their manual to read about them?

Not really.  However by experiment:

(char-code #\Meta-a) -> 65 ; note #\meta-a and #\meta-A are the same
(char-bits #\Meta-a) -> 2

CHAR-FONT and CHAR-BITS are obviously not in the CL package.

It seems to have (at least) 5 modifiers: control, shift, meta, hyper,
super, which can be used in combination.

Presumably all this stuff is used to implement the editor, as you'd
expect.  I'm not sure how it ties in with unicode support.

--tim
From: Peter Seibel
Subject: Re: (/= (char-int c) (char-code c))?
Date: 
Message-ID: <m3r87lm4kq.fsf@javamonkey.com>
Tim Bradshaw <···@cley.com> writes:

> * Peter Seibel wrote:
> > Are there current Lisp implementations that actually use
> > implementation-defined character attributes? Or are they a relic of
> > the days when Lisp machines hung font information off of the actual
> > character objects in a buffer that was being displayed on the screen
> > and modifier bits off the the actual objects being generated by key
> > presses?
> 
> Yes, LispWorks does.

Hmmm. If there's an easy way to get a hold of a character with some
non-null implementation-defined attributes, I'd be interested to know
what (char= c1 c2) evalutates to in LispWorks when:

  (and (= (char-code c1) (char-code c2) 
       (= (char-code c1) (char-int c1))
       (/= (char-code c2) (char-int c2))))

Per the CLHS, CHAR= is supposed to consider characters different if
they differ in their implementation-defined attributes, which I
believe should be reflected in the result of CHAR-INT. Based on some
email responses I got in an earlier thread, I wasn't the only one who
was a bit surprised that CHAR= was defined this way. Since it would
only matter in an implementation that actually uses
implementation-defined attributes, I'm curious if such impls in fact
implement CHAR= this way.

-Peter

P.S. Someday, I'll get around to installing LispWorks myself but if
someone wants to give this a whirl before then I'd be interested to
know the result.

-- 
Peter Seibel                                      ·····@javamonkey.com

  The intellectual level needed   for  system design is  in  general
  grossly  underestimated. I am  convinced  more than ever that this
  type of work is very difficult and that every effort to do it with
  other than the best people is doomed to either failure or moderate
  success at enormous expense. --Edsger Dijkstra