From: chenyu
Subject: newbie question
Date: 
Message-ID: <6143ac23.0311201925.f10e6a2@posting.google.com>
Hi everyone,
One of exercise is to require me to print ")" by function "princ".  I do like this :
(princ "(")

But the EDI doesn't allow to do it. How to solve the problem?
"cormanlisp" is used.


kind regards/chenyu

From: Kenny Tilton
Subject: Re: newbie question
Date: 
Message-ID: <BXgvb.125264$Gq.17252460@twister.nyc.rr.com>
chenyu wrote:

> Hi everyone,
> One of exercise is to require me to print ")" by function "princ".  I do like this :
> (princ "(")
> 
> But the EDI doesn't allow to do it. How to solve the problem?
> "cormanlisp" is used.

The bad news is that the above not working is a (I think!) known issue 
with Corman. Certainly is acting very badly over here for me.

The good news is that the exercise wants ")", not "(", and that just 
worked for me in Corman Lisp 2.01.

If you were right the second time and you have to print "(", then 
methinks you either have a very weird instructor or that your instructor 
is challenging you to find a workaround to a known problem with Corman 
as an exercise in learning, in which case I hesitate to spoil your fun. 
So here's a hint: it can be done pretty easily, but not using "(" itself.

kt

-- 
http://tilton-technology.com

Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Your Project Here! http://alu.cliki.net/Industry%20Application
From: Pascal Bourguignon
Subject: Re: newbie question
Date: 
Message-ID: <87fzginune.fsf@thalassa.informatimago.com>
·········@hotmail.com (chenyu) writes:

> Hi everyone,
> One of exercise is to require me to print ")" by function "princ".  I do like this :
> (princ "(")
> 
> But the EDI doesn't allow to do it. How to solve the problem?
> "cormanlisp" is used.

Bad EDI. Change EDI.

Why don't you use emacs? I've got no problem in emacs to write (princ "(")

On the other hand if your exercise is to print ")", you'd rather print
")" than "(".  Perhaps your EDI is really very very smart and does not
let you do an error that would mean flunking your exercise...

-- 
__Pascal_Bourguignon__
http://www.informatimago.com/
From: Kenny Tilton
Subject: Re: newbie question
Date: 
Message-ID: <Iijvb.126332$Gq.17327648@twister.nyc.rr.com>
Pascal Bourguignon wrote:

> ·········@hotmail.com (chenyu) writes:
> 
> 
>>Hi everyone,
>>One of exercise is to require me to print ")" by function "princ".  I do like this :
>>(princ "(")
>>
>>But the EDI doesn't allow to do it. How to solve the problem?
>>"cormanlisp" is used.
> 
> 
> Bad EDI. Change EDI.
> 
> Why don't you use emacs? I've got no problem in emacs to write (princ "(")

Through Corman?

Not just in the worksheet (REPL), but also in a Corman window for 
editing source files I tried defining a function including the 
problematic princ, based on faint and apparently erroneous recall that 
it was just an IDE issue. Nope. Won't even compile (which makes sense 
given that it looks like a parsing gaffe).

Not sure how Emacs would help: it cannot send sexprs to Corman, it has 
to send text, and text->symbolic is precisely where Corman seems to be 
slipping up.

kt

-- 
http://tilton-technology.com

Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film

Your Project Here! http://alu.cliki.net/Industry%20Application
From: Pascal Bourguignon
Subject: Re: newbie question
Date: 
Message-ID: <878ym9n3wy.fsf@thalassa.informatimago.com>
Kenny Tilton <·······@nyc.rr.com> writes:

> Pascal Bourguignon wrote:
> 
> > ·········@hotmail.com (chenyu) writes:
> >
> >>Hi everyone,
> >>One of exercise is to require me to print ")" by function "princ".  I do like this :
> >>(princ "(")
> >>
> >>But the EDI doesn't allow to do it. How to solve the problem?
> >>"cormanlisp" is used.
> > Bad EDI. Change EDI.
> > Why don't you use emacs? I've got no problem in emacs to write
> > (princ "(")
> 
> Through Corman?

Ok, my wrong.  I just guessed  that it should be an IDE problem (there
are some  stuff with ilisp(*) in emacs  too) rather than a  bug in the
lisp implementation used.




(*) for ilisp,  the problem is that it does not  take into account the
macro characters so if you define #" as something that does not expect
a closing " it's messed.
 
-- 
__Pascal_Bourguignon__
http://www.informatimago.com/