Does anybody know of any Common Lisp implementation which does not use ASCII encodings for the graphic standard-characters? In other words, is there an implementation in which the following might return nil?
(loop for c across (format nil " !\"#$%&'()*+,-./0123456789:;<=>?@~
ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`~
abcdefghijklmnopqrstuvwxyz{|}~~")
as i from #x20
always (= i (char-code c)))
(Update 2010-01-02: It's disconcerting how invisible typos can be. I've corrected my original post which contained the words ANSI encodings.)
December 31 2009, 14:14:07 UTC 2 years ago
December 31 2009, 14:56:29 UTC 2 years ago
EBCDIC
An EBCDIC implementation would fail that test, since EBCDIC's alphabetic characters are not contiguous. According to Wikipedia, EBCDIC is still used as the character encoding on IBM mainframes, so a native LISP implementation may well be using EBCDIC.This might be of interest -
http://common-lisp.net/project/babel/da
I saw a couple of other promising links by Googling "ebcdic lisp".
--
Dunx
January 2 2010, 09:33:32 UTC 2 years ago
Anonymous
January 3 2010, 23:38:33 UTC 2 years ago
HiLISP anyone?
A curious g****e search lead me to this paper <http://ci.nii.ac.jp/naid/110002673529/en> describing HiLISP, `the first commercial Japanese Common Lisp implementation'. It discussesthe difficulty of implementing Japanese language support, but does not seem to mention whether these Hitachi mainframes use a non-ASCII native character set.
-- uuh
January 4 2010, 07:58:11 UTC 2 years ago
Re: HiLISP anyone?
Fascinating, thanks. Mind you, that was quite some time ago and it appears to have sunk without trace in the 20 years since.Anonymous
January 5 2010, 18:16:21 UTC 2 years ago
ASCII is-an ANSI
Wikipedia says "true ASCII is defined strictly only by ANSI standard", i.e., ANSI X3.4-1986, so you were actually more correct than you thought!And if you can't find any such implementation, I will gladly fork SBCL with only this one change, just to be the exception to the rule. ;-)
Anonymous
January 7 2010, 12:35:36 UTC 2 years ago
Re: ASCII is-an ANSI
I would have pointed out that ASCII was an ANSI standard too, though I wasn't motivated enough to expose my pedantry before someone else did first :-)I don't know who's offering to fork SBCL just to give you an example to talk about... but it shouldn't be too hard to do; there is already code in SBCL's src/code/cross-char.lisp that defends against a host lisp's CODE-CHAR/CHAR-CODE not being the same as the one that SBCL itself wants to define (named by SB!XC:CODE-CHAR/SB!XC:CHAR-CODE). You (Nick) are right that it hasn't yet come up in practice.
Some examples of implementation-defined representation that have come up in practice, in case you're interested in this kind of theoretical unportability, are: low values of ARRAY-DIMENSION-LIMIT (2^24 is too low to represent in-memory an sbcl core file); the representation of BYTE objects (the SBCL family uses conses, the CCL family bitmasks); and the BOOLE constants (CLISP uses a noticeably different mapping from SBCL).
Cheers,
Christophe
Anonymous
January 7 2010, 16:49:06 UTC 2 years ago
Other characters
Genera (including OpenGenera) uses #x89, #x8A and #x8D for #\tab, #\linefeed and #\return respectively.Rusty