From: Pebblestone
Subject: Any Chinese Lispers here?
Date: 
Message-ID: <1156461145.707902.45700@h48g2000cwc.googlegroups.com>
Le'ts keep contact! Lisp is an awesome language!

send me email!
··········@gmail.com

From: Pascal Bourguignon
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <87psep1zab.fsf@informatimago.com>
"Pebblestone" <··········@gmail.com> writes:

> Le'ts keep contact! Lisp is an awesome language!
>
> send me email!
> ··········@gmail.com

Hello!  

Even if we're not chinese, we can keep contact all the same.
Just don't use too many chinese symbols in your sources :-)


[126]> (defun 因子 (x) (if (< x 1) 1 (* x (因子 (1- x)))))
因子
[127]> (因子 12)
479001600
[128]>  (lisp-implementation-type)
"CLISP"


-- 
__Pascal Bourguignon__
From: Pebblestone
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <1156463534.120672.249670@h48g2000cwc.googlegroups.com>
hahaha!

clisp is cool.
btw, that should be 阶乘 factorial, while 因子 is factor.




Pascal Bourguignon wrote:
> "Pebblestone" <··········@gmail.com> writes:
>
> > Le'ts keep contact! Lisp is an awesome language!
> >
> > send me email!
> > ··········@gmail.com
>
> Hello!
>
> Even if we're not chinese, we can keep contact all the same.
> Just don't use too many chinese symbols in your sources :-)
>
>
> [126]> (defun 因子 (x) (if (< x 1) 1 (* x (因子 (1- x)))))
> 因子
> [127]> (因子 12)
> 479001600
> [128]>  (lisp-implementation-type)
> "CLISP"
> 
> 
> -- 
> __Pascal Bourguignon__
From: Pascal Bourguignon
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <87lkpd1wc9.fsf@informatimago.com>
"Pebblestone" <··········@gmail.com> writes:
> Pascal Bourguignon wrote:
>> "Pebblestone" <··········@gmail.com> writes:
>>
>> > Le'ts keep contact! Lisp is an awesome language!
>> >
>> > send me email!
>> > ··········@gmail.com
>>
>> Hello!
>>
>> Even if we're not chinese, we can keep contact all the same.
>> Just don't use too many chinese symbols in your sources :-)
>>
>>
>> [126]> (defun 因子 (x) (if (< x 1) 1 (* x (因子 (1- x)))))
>> 因子
>> [127]> (因子 12)
>> 479001600
>> [128]>  (lisp-implementation-type)
>> "CLISP"
>
> hahaha!
>
> clisp is cool.
> btw, that should be 阶乘 factorial, while 因子 is factor.

See what I mean :-)  I can't trust either the little chinese I tried
to learn or google translations...


-- 
__Pascal Bourguignon__
From: ············@gmail.com
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <1156481519.277249.204890@b28g2000cwb.googlegroups.com>
Pascal Bourguignon wrote:
> "Pebblestone" <··········@gmail.com> writes:
>
> > Le'ts keep contact! Lisp is an awesome language!
> >
> > send me email!
> > ··········@gmail.com
>
> Hello!
>
> Even if we're not chinese, we can keep contact all the same.
> Just don't use too many chinese symbols in your sources :-)
>
>
> [126]> (defun 因子 (x) (if (< x 1) 1 (* x (因子 (1- x)))))
> 因子
> [127]> (因子 12)
> 479001600
> [128]>  (lisp-implementation-type)
> "CLISP"

   Though it's supported in CLISP maybe, it's not supported in
Emacs/Slime environment from the LispBox, and I tried SBCL Win32 0.9.12
the Chinese characters cause some problem too.

   I have Corman Lisp in another PC, I will test it later.
From: Pascal Bourguignon
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <87sljlz8h8.fsf@informatimago.com>
·············@gmail.com" <············@gmail.com> writes:

> Pascal Bourguignon wrote:
>> "Pebblestone" <··········@gmail.com> writes:
>>
>> > Le'ts keep contact! Lisp is an awesome language!
>> >
>> > send me email!
>> > ··········@gmail.com
>>
>> Hello!
>>
>> Even if we're not chinese, we can keep contact all the same.
>> Just don't use too many chinese symbols in your sources :-)
>>
>>
>> [126]> (defun 因子 (x) (if (< x 1) 1 (* x (因子 (1- x)))))
>> 因子
>> [127]> (因子 12)
>> 479001600
>> [128]>  (lisp-implementation-type)
>> "CLISP"
>
>    Though it's supported in CLISP maybe, it's not supported in
> Emacs/Slime environment from the LispBox, and I tried SBCL Win32 0.9.12
> the Chinese characters cause some problem too.


You'll have to check for slime specific configuration, but with inferior-lisp, I just have to put this in ~/.emacs:

(setq default-process-coding-system  '(cons mule-utf-8 .mule-utf-8))
(setq inferior-lisp-program "/usr/local/bin/clisp -ansi -q -Kfull -I -Efile ISO-8859- -Epathname ISO-8859-1 -Eterminal UTF-8 -Emisc UTF-8 -Eforeign ISO-8859-1")

to enjoy unicode with clisp.


>    I have Corman Lisp in another PC, I will test it later.

-- 
__Pascal Bourguignon__
From: Fabien LE LEZ
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <49fse21vnmhb7mmnesmqh1ih4ghla92kiv@4ax.com>
On Fri, 25 Aug 2006 01:37:00 +0200, Pascal Bourguignon
<···@informatimago.com>:

>Just don't use too many chinese symbols in your sources :-)

Are kanjis acceptable in function names?
From: Sam Steingold
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <m3ac5ty90t.fsf@loiso.podval.org>
> * Fabien LE LEZ <········@tenzfgre.pbz> [2006-08-25 01:58:51 +0200]:
>
> On Fri, 25 Aug 2006 01:37:00 +0200, Pascal Bourguignon
> <···@informatimago.com>:
>
>>Just don't use too many chinese symbols in your sources :-)
>
> Are kanjis acceptable in function names?

why not?

-- 
Sam Steingold (http://www.podval.org/~sds) on Fedora Core release 5 (Bordeaux)
http://honestreporting.com http://thereligionofpeace.com
http://ffii.org http://dhimmi.com http://palestinefacts.org http://camera.org
Those who value Life above Freedom are destined to lose both.
From: Fabien LE LEZ
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <1vfse25lq4lgsre65q3f5lc93glvnan383@4ax.com>
On Thu, 24 Aug 2006 20:05:38 -0400, Sam Steingold <···@podval.org>:

>> Are kanjis acceptable in function names?
>
>why not?

Well, I'm on Windows, and accentuated letters (e.g. e acute) between
the command-line and GUI applications, as well as in filenames when
talking to a Samba server, are often a mess, so I avoid them as
possible. So, I figured that handling kanjis would be even worse...
From: Pebblestone
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <1156465655.049178.215690@74g2000cwt.googlegroups.com>
I agree, coding system is a mess, especially when dealing with
cross-platform.


Fabien LE LEZ wrote:
> On Thu, 24 Aug 2006 20:05:38 -0400, Sam Steingold <···@podval.org>:
>
> >> Are kanjis acceptable in function names?
> >
> >why not?
>
> Well, I'm on Windows, and accentuated letters (e.g. e acute) between
> the command-line and GUI applications, as well as in filenames when
> talking to a Samba server, are often a mess, so I avoid them as
> possible. So, I figured that handling kanjis would be even worse...
From: Sam Steingold
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <m34pw1y7ru.fsf@loiso.podval.org>
> * Fabien LE LEZ <········@tenzfgre.pbz> [2006-08-25 02:13:06 +0200]:
>
> On Thu, 24 Aug 2006 20:05:38 -0400, Sam Steingold <···@podval.org>:
>
>>> Are kanjis acceptable in function names?
>>
>>why not?
>
> Well, I'm on Windows, and accentuated letters (e.g. e acute) between
> the command-line and GUI applications, as well as in filenames when
> talking to a Samba server, are often a mess, so I avoid them as
> possible. So, I figured that handling kanjis would be even worse...

there is certain difference between "acceptable" and "recommended".
e.g., space, parentheses, tab etc are "acceptable" pathname characters
on unix and woe32, but they are not "recommended" (e.g., they tend to
break scripts).

yes, from the CLISP's POV there is no difference between "LATIN CAPITAL
LETTER A", "CYRILLIC CAPITAL LETTER A", and "SYRIAC DOTTED ZLAMA
HORIZONTAL" - all are constituent, and all can be used in function
names.  From the POV of people reading your code though, it would be
best if you used a language they understand.  E.g., since this is an
English language newsgroup, it would be a good idea to use English when
naming your functions.


-- 
Sam Steingold (http://www.podval.org/~sds) on Fedora Core release 5 (Bordeaux)
http://pmw.org.il http://camera.org http://israelunderattack.slide.com
http://openvotingconsortium.org http://palestinefacts.org http://memri.org
Is there another word for synonym?
From: Fabien LE LEZ
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <lbhse25pi29c06tkb0iag6nl3of6slaidm@4ax.com>
On Thu, 24 Aug 2006 20:32:37 -0400, Sam Steingold <···@podval.org>:

[Note: please don't send me a message by email each time you post
here. This is a newsgroup, not a mailing-list. Thanks.]

>From the POV of people reading your code though, it would be
>best if you used a language they understand.  E.g., since this is an
>English language newsgroup, it would be a good idea to use English when
>naming your functions.

There are two issues here:
	- the use of characters out of the [A-Za-z0-9_] set;
	- the use of a non-English language.

The two are independants:
	- most human languages can be written (and understood) without
using any other character: in latin languages you can just drop the
accents (e.g. l�ch� -> lache); in Japanese, you can write in romaji;
etc.
	- even in English, some words use accentuated letters. E.g.
na�ve, caf�. 
From: Robert Uhl
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <m33bblpk3a.fsf@NOSPAMgmail.com>
Fabien LE LEZ <········@gramster.com> writes:
>
> 	- even in English, some words use accentuated letters. E.g.
> naïve, café.

Most Americans would write those without the diacritics.  I tend to, but
then I also tend to use British spellings, German place names and a
punctuation scheme all my own.

-- 
Robert Uhl <http://public.xdi.org/=ruhl>
Architects cannot learn to design grand cathedrals if they are taught
all their drawing courses using only an Etch-a-Sketch because the
company struck a deal with the university...      --Gene Spafford
From: Pascal Bourguignon
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <87ejv51uzl.fsf@informatimago.com>
Fabien LE LEZ <········@gramster.com> writes:
> There are two issues here:
> 	- the use of characters out of the [A-Za-z0-9_] set;
> 	- the use of a non-English language.
>
> The two are independants:
> 	- most human languages can be written (and understood) without
> using any other character: in latin languages you can just drop the
> accents (e.g. l�ch� -> lache); 

Pas vraiment. 
Il est l�ch� = He's released.
Il est l�che = He's a coward.


> in Japanese, you can write in romaji;
> etc.
> 	- even in English, some words use accentuated letters. E.g.
> na�ve, caf�. 


-- 
__Pascal Bourguignon__
From: Fabien LE LEZ
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <hljse2pmo4qn6j0i58v1fskk4dsup1783o@4ax.com>
On Fri, 25 Aug 2006 03:09:50 +0200, Pascal Bourguignon
<···@informatimago.com>:

>Pas vraiment. 
>Il est l�ch� = He's released.
>Il est l�che = He's a coward.

Since variables are no cowards, the reader won't be confused.
From: Fabien LE LEZ
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <l7kse2h3qsc8qegt80k32gdj55n2hm8sfg@4ax.com>
I wrote:

>Since variables are no cowards, the reader won't be confused.

Note: I see your point, but I really didn't want to let you have the
last word.
And there are lots of situations where dropping the accents (and
reading accent-less text) is easier than forcing the system to handle
accentuated letters properly.
From: Jeffery Zhang
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <ecllm9$ouu$1@ruby.cit.cornell.edu>
I used to be able to read Chinese.

 When i look back on my essays back from high school, I realized why 
lisp felt so natural when I first saw it my senior year in college. I 
couldn't express myself clearly in plain linear English back in high 
school, I used to use tons of nested parenthetical comments in my 
English papers. My English teacher thought my essays were horribly 
structured, now I know why.

On 2006-08-24 20:25:18 -0500, Fabien LE LEZ <········@gramster.com> said:

> I wrote:
> 
>> Since variables are no cowards, the reader won't be confused.
> 
> Note: I see your point, but I really didn't want to let you have the
> last word.
> And there are lots of situations where dropping the accents (and
> reading accent-less text) is easier than forcing the system to handle
> accentuated letters properly.
From: ············@gmail.com
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <1156476030.750892.154120@75g2000cwc.googlegroups.com>
I am from Taiwan, and my native language is Traditional Chinese, but I
am not sure if I am considered a Lisper @·@
From: Fabien LE LEZ
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <uhrse29p59oopo8i504eiqrilqbtskrt1m@4ax.com>
On 24 Aug 2006 20:20:30 -0700, ·············@gmail.com"
<············@gmail.com>:

>I am from Taiwan, and my native language is Traditional Chinese, but I
>am not sure if I am considered a Lisper @·@

Well, at least you did manage to start a 120-message-long thread on
comp.lang.lisp. 
From: Fabien LE LEZ
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <q6ise25e7uqjsfbpojq9oo0tku5qjjhnin@4ax.com>
On Fri, 25 Aug 2006 01:37:00 +0200, Pascal Bourguignon
<···@informatimago.com>:

>[128]>  (lisp-implementation-type)
>"CLISP"

On my PC:

 >(lisp-implementation-type)
 "Kyoto Common Lisp"

Well, I suppose this one can handle kanjis.
(I believe Japanese kanjis are not very different from Chinese kanjis,
but I can be mistaken here.)
From: Pascal Bourguignon
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <87ac5t1upw.fsf@informatimago.com>
Fabien LE LEZ <········@gramster.com> writes:

> On Fri, 25 Aug 2006 01:37:00 +0200, Pascal Bourguignon
> <···@informatimago.com>:
>
>>[128]>  (lisp-implementation-type)
>>"CLISP"
>
> On my PC:
>
>  >(lisp-implementation-type)
>  "Kyoto Common Lisp"
>
> Well, I suppose this one can handle kanjis.
> (I believe Japanese kanjis are not very different from Chinese kanjis,
> but I can be mistaken here.)

Well, without knowing anything about Chinese or Japanese, I can
already distinguis Japanese kanji texts, from Chinese texts.

Wikipedia says: 

    The actual shape of many Chinese characters varies in different
    cultures. Mainland China adopted simplified characters in 1956,
    but Traditional Chinese characters are still used in Taiwan and
    Hong Kong. Japan has used its own less drastically simplified
    characters since 1946, [...].


-- 
__Pascal Bourguignon__
From: Lei Tang
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <ecnesv$peu$1@news.asu.edu>
Oh, this is way too cool. I didn't expect CLISP can handle Chinese 
directly. But the problem is emacs/xemacs and slime might not be good at 
handling Chinese.

-Lei


Pascal Bourguignon wrote:
> "Pebblestone" <··········@gmail.com> writes:
> 
> 
>>Le'ts keep contact! Lisp is an awesome language!
>>
>>send me email!
>>··········@gmail.com
> 
> 
> Hello!  
> 
> Even if we're not chinese, we can keep contact all the same.
> Just don't use too many chinese symbols in your sources :-)
> 
> 
> [126]> (defun 因子 (x) (if (< x 1) 1 (* x (因子 (1- x)))))
> 因子
> [127]> (因子 12)
> 479001600
> [128]>  (lisp-implementation-type)
> "CLISP"
> 
> 
From: Pascal Bourguignon
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <87sljky7vl.fsf@informatimago.com>
Lei Tang <······@asu.edu> writes:
> Pascal Bourguignon wrote:
>> "Pebblestone" <··········@gmail.com> writes:
>> 
>>>Le'ts keep contact! Lisp is an awesome language!
>>>
>>>send me email!
>>>··········@gmail.com
>> Hello!  Even if we're not chinese, we can keep contact all the same.
>> Just don't use too many chinese symbols in your sources :-)
>> [126]> (defun 因子 (x) (if (< x 1) 1 (* x (因子 (1- x)))))
>> 因子
>> [127]> (因子 12)
>> 479001600
>> [128]>  (lisp-implementation-type)
>> "CLISP"
>> 
> Oh, this is way too cool. I didn't expect CLISP can handle Chinese
> directly. But the problem is emacs/xemacs and slime might not be good
> at handling Chinese.


Works from slime too:


; SLIME 2006-02-10
CL-USER> (defun 阶乘 (x) (if (< x 1) 1 (* x (阶乘- x))))
阶乘
CL-USER> (阶乘 12)
; Evaluation aborted
CL-USER> (defun 阶乘 (x) (if (< x 1) 1 (* x (阶乘 (1- x)))))
阶乘
CL-USER> (阶乘 12)
479001600
CL-USER> 

And also from a lisp buffer, if I type:
(defun 阶乘 (x) (if (< x 1) 1 (* x (阶乘 (1- x))))) C-x C-e
(阶乘 13) C-x C-e

I get the result:

6227020800

and in *slime-repl*:

;;;; (defun 阶乘 (x) (if (< x 1) 1 (* x (阶乘 (1- x)))))  ...
;;;; (阶乘 13)  ...
CL-USER> 


If I right-click on the function name and select inspect, I get a buffer with:

A symbol.
 [type: SYMBOL]
--------------------
Its name is: "阶乘"
It is unbound.
It is a function: #<FUNCTION 阶乘 (X) (DECLARE (SYSTEM::IN-DEFUN 阶乘)) (BLOCK 阶乘 (IF (< X 1) 1 (* X (阶乘 (1- X)))))> [make funbound]
It is internal to the package: COMMON-LISP-USER [export it] [unintern it]
Property list: (SYSTEM::DEFINITION ((DEFUN 阶乘 (X) (IF (< X 1) 1 (* X (阶乘 (1- X))))) . #(NIL NIL NIL NIL ((DECLARATION XLIB::CLX-VALUES VALUES OPTIMIZE DECLARATION)))))

etc...


I'd be hard pressed to cite the minimal configuration settings needed
to make it work (I don't use slime often enough to know it that well),
but you can download my ~/.emacs from cvs at:

cvs -z3 -d ··················@cvs.informatimago.com:/usr/local/cvs/public/chrooted-cvs/cvs co home

and what I've cited in another message in this thread may be all there
is to it.  You can also check M-x apropos RET slime.*coding RET or
read the manual of slime.

-- 
__Pascal Bourguignon__
From: Fabien LE LEZ
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <o2jue2hu73fkjnrdj8knl1ivv1ko2fb2q4@4ax.com>
On Fri, 25 Aug 2006 20:42:38 +0200, Pascal Bourguignon
<···@informatimago.com>:

>CL-USER> (defun ?? (x) (if (< x 1) 1 (* x (??- x))))

>??

Just wondering... is this a double question mark, or some Chinese
character that Agent didn't manage to show on my PC?
From: Pascal Bourguignon
Subject: Re: Any Chinese Lispers here?
Date: 
Message-ID: <87odu8y5sh.fsf@informatimago.com>
Fabien LE LEZ <········@gramster.com> writes:

> On Fri, 25 Aug 2006 20:42:38 +0200, Pascal Bourguignon
> <···@informatimago.com>:
>
>>CL-USER> (defun ?? (x) (if (< x 1) 1 (* x (??- x))))
>
>>??
>
> Just wondering... is this a double question mark, or some Chinese
> character that Agent didn't manage to show on my PC?

Yes, they were two chinese characters.

(map 'list (function char-name)  "阶乘")
--> ("U9636" "U4E58") ; unfortunately, clisp doesn't know their names...

-- 
__Pascal Bourguignon__