Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Newbie question: lisp parsing error?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Michael O'Connor  
View profile  
 More options May 11 2004, 6:56 pm
Newsgroups: comp.lang.lisp
From: moconno...@yahoo.com (Michael O'Connor)
Date: 11 May 2004 01:56:47 -0700
Local: Tues, May 11 2004 6:56 pm
Subject: Newbie question: lisp parsing error?
Hi,

I get an error when trying to run the following example code (from the
Paul Graham book):

> (defun our-length (lst)

    (let ((len 0))
        (dolist (obj lst)
            (setf len (+ len 1)))
    len))
OUR-LENGTH
> (our-length (list 1 2 3))

*** - EVAL: variable L has no value

backtrace reveals that our-length is being read as:
(BLOCK OUR-LENGTH
 (LET ((LEN 0)) (DOLIST (OBJ LST) (SETF LEN (+ LEN 1))) L LEN))

Can someone tell me where that extra 'L' is coming from near the end
of the line, and is this a known problem?

If I remove the leading whitespace in the last line of our-length the
problem disappears. This happens in both CLisp (windows client) and
ECL (on Linux).

Thanks,

Michael


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juan Jose Garcia Ripoll  
View profile  
 More options May 11 2004, 8:01 pm
Newsgroups: comp.lang.lisp
From: Juan Jose Garcia Ripoll <postdo...@yahoo.de>
Date: Tue, 11 May 2004 12:01:26 +0200
Local: Tues, May 11 2004 8:01 pm
Subject: Re: Newbie question: lisp parsing error?
Hi Michael

I cannot reproduce this with neither of the two :-/ How did you type
this example? From the command line? Did you try saving this in a file
and loading it?

It could happend that, if you cut and pasted from a text file, you are
not pasting just normal characters, but unicode ones, that ECL does not
understand. This happens to me, for instance, when pasting text from
knode into a terminal. Most of the times the spaces are pasted with code
0x80 or something like that, which confuses ECL.

Regards,

Juanjo


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Antony Sequeira  
View profile  
 More options May 12 2004, 3:43 am
Newsgroups: comp.lang.lisp
From: Antony Sequeira <usemyfulln...@hotmail.com>
Date: Tue, 11 May 2004 17:43:26 GMT
Local: Wed, May 12 2004 3:43 am
Subject: Re: Newbie question: lisp parsing error?

I am a newbie and I get similar errors when I cut and paste from the pdf
for Paul Graham's OnLisp and I think it has to do with characters that
are not visible (control chars or maybe bytes that are not shown in your
charset).
The code above looks to be from the ACL book of PG and not OnLisp. You
might want to indicate that in your future posts and page # and the
source where you are copying from if you want someone to replicate
issues FWIW.
Usually I get these fixed by trial and error to find the problematic
part (in this case the last line as you indicated). The ` and ' always
seem get copied badly from the pdf in my case.
You could try a hex editor to see what you've got in your file if your
are curious.
Let me know if you find a better way to handle this kind of problem.
-Antony

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
adam connor  
View profile  
 More options May 13 2004, 9:28 am
Newsgroups: comp.lang.lisp
From: adam connor <adamNoDotHerecon...@mail.com>
Date: Wed, 12 May 2004 18:28:21 -0500
Local: Thurs, May 13 2004 9:28 am
Subject: Re: Newbie question: lisp parsing error?
Antony Sequeira <usemyfulln...@hotmail.com> said:

>I am a newbie and I get similar errors when I cut and paste from the pdf
>for Paul Graham's OnLisp and I think it has to do with characters that
>are not visible (control chars or maybe bytes that are not shown in your
>charset).

I have also gotten them copying and pasting into Clisp, although it
doesn't have to be from a PDF -- I can get these when copying from
another text editor. Slime avoids this, but even when using Clisp
directly retyping the example has always worked (or given me a
different, more sensisble, error.)

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tayssir John Gabbour  
View profile  
 More options May 13 2004, 5:10 pm
Newsgroups: comp.lang.lisp
From: tayss_te...@yahoo.com (Tayssir John Gabbour)
Date: 13 May 2004 00:10:19 -0700
Local: Thurs, May 13 2004 5:10 pm
Subject: Re: Newbie question: lisp parsing error?

adam connor <adamNoDotHerecon...@mail.com> wrote in message <news:0kc5a0l9uovsdfhj1vptpor8dkdhh16sq3@4ax.com>...
> Antony Sequeira <usemyfulln...@hotmail.com> said:
> >I am a newbie and I get similar errors when I cut and paste from the pdf
> >for Paul Graham's OnLisp and I think it has to do with characters that
> >are not visible (control chars or maybe bytes that are not shown in your
> >charset).

> I have also gotten them copying and pasting into Clisp, although it
> doesn't have to be from a PDF -- I can get these when copying from
> another text editor. Slime avoids this, but even when using Clisp
> directly retyping the example has always worked (or given me a
> different, more sensisble, error.)

I used to get Python errors when I cut & paste code from a PDF to
Python's builtin editor. Interesting to track that bug down...

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google