Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
READ-DELIMITED-FORM
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
  Messages 26 - 32 of 32 - Collapse all  -  Translate all to Translated (View all originals) < Older 
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
 
Erik Naggum  
View profile  
 More options Sep 5 2002, 11:06 am
Newsgroups: comp.lang.lisp
From: Erik Naggum <e...@naggum.no>
Date: 05 Sep 2002 15:06:51 +0000
Local: Thurs, Sep 5 2002 11:06 am
Subject: Re: READ-DELIMITED-FORM
* Tim Bradshaw
| It does?  I can find no mention of a case where READ returns zero values in
| the entry on it in the spec.  Do you mean that the reader macro function
| should return zero values?

  Yes, that was what I meant.  My bad.  But sadly, this goes to show my main
  point, that the support for using `read´ in its own (re)implementation is
  insufficient.  You need to get below the values returned by read to be able
  to capture the return value of reader macros.

--
Erik Naggum, Oslo, Norway

Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.


 
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.
Duane Rettig  
View profile  
 More options Sep 5 2002, 12:00 pm
Newsgroups: comp.lang.lisp
From: Duane Rettig <du...@franz.com>
Date: Thu, 05 Sep 2002 16:00:01 GMT
Local: Thurs, Sep 5 2002 12:00 pm
Subject: Re: READ-DELIMITED-FORM

Instead of digging into the details, try looking at what you are in
fact trying to accomplish, which is to implement READ using READ.
Now think about recursive algorithms and termination rules...

> I realise that this is not the right way to do what I'm trying to do,
> but I wanted to see if I could do it without either implementing a
> token reader from the spec, or finding the system's one.

But you _are_ using the system's one, since you are using READ.

> Sorry for being confusing.

Not confusing, just confused :-)

--
Duane Rettig    du...@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182  


 
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.
ilias  
View profile  
 More options Sep 5 2002, 2:30 pm
Newsgroups: comp.lang.lisp
From: ilias <at_n...@pontos.net>
Date: Thu, 05 Sep 2002 21:37:58 +0300
Local: Thurs, Sep 5 2002 2:37 pm
Subject: Re: READ-DELIMITED-FORM

Duane Rettig wrote:
>>whatever follows the possibly-consing dot and worry about whitespace.

> Instead of digging into the details, try looking at what you are in
> fact trying to accomplish, which is to implement READ using READ.
> Now think about recursive algorithms and termination rules...

hint: the result in less than 10 lines of conforming code

>>I realise that this is not the right way to do what I'm trying to do,
>>but I wanted to see if I could do it without either implementing a
>>token reader from the spec, or finding the system's one.

> But you _are_ using the system's one, since you are using READ.

i think he meant finding the systems *token* reader.

 
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.
Duane Rettig  
View profile  
 More options Sep 5 2002, 4:00 pm
Newsgroups: comp.lang.lisp
From: Duane Rettig <du...@franz.com>
Date: Thu, 05 Sep 2002 20:00:01 GMT
Local: Thurs, Sep 5 2002 4:00 pm
Subject: Re: READ-DELIMITED-FORM

ilias <at_n...@pontos.net> writes:
> Duane Rettig wrote:
> >>whatever follows the possibly-consing dot and worry about whitespace.
> > Instead of digging into the details, try looking at what you are in

> > fact trying to accomplish, which is to implement READ using READ.
> > Now think about recursive algorithms and termination rules...

> hint: the result in less than 10 lines of conforming code

Show us that result and we'll be happy to critique it for you.

> >>I realise that this is not the right way to do what I'm trying to do,
> >>but I wanted to see if I could do it without either implementing a
> >>token reader from the spec, or finding the system's one.
> > But you _are_ using the system's one, since you are using READ.

> i think he meant finding the systems *token* reader.

Precisely what I said.  READ _is_ the system's token reader.

--
Duane Rettig    du...@franz.com    Franz Inc.  http://www.franz.com/
555 12th St., Suite 1450               http://www.555citycenter.com/
Oakland, Ca. 94607        Phone: (510) 452-2000; Fax: (510) 452-0182  


 
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.
ilias  
View profile  
 More options Sep 5 2002, 4:43 pm
Newsgroups: comp.lang.lisp
From: ilias <at_n...@pontos.net>
Date: Thu, 05 Sep 2002 23:50:29 +0300
Local: Thurs, Sep 5 2002 4:50 pm
Subject: Re: READ-DELIMITED-FORM

coming soon. i'm not ready to try. 10 lines: intuitive 'guess'.

>>>>I realise that this is not the right way to do what I'm trying to do,
>>>>but I wanted to see if I could do it without either implementing a
>>>>token reader from the spec, or finding the system's one.

>>>But you _are_ using the system's one, since you are using READ.

>>i think he meant finding the systems *token* reader.

> Precisely what I said.  READ _is_ the system's token reader.

pseudocode:

function token-reader  (argument: stream)  returning token
function object-creator(argument: token)   returning object
function read          (argument: stream)  returning object

read(stream)
   string-token := token-reader(stream)
   object := object-creator( token )

i think this is his imagination of the internal structure, which seems
to me to be logical.

(i'm just writing the reply to your Scary-Table post.)


 
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.
Tim Bradshaw  
View profile  
 More options Sep 6 2002, 8:47 am
Newsgroups: comp.lang.lisp
From: Tim Bradshaw <t...@cley.com>
Date: 06 Sep 2002 12:34:17 +0100
Local: Fri, Sep 6 2002 7:34 am
Subject: Re: READ-DELIMITED-FORM

* Erik Naggum wrote:
>   Yes, that was what I meant.  My bad.  But sadly, this goes to show my main
>   point, that the support for using `read´ in its own (re)implementation is
>   insufficient.  You need to get below the values returned by read to be able
>   to capture the return value of reader macros.

Yes.  I've spend some more time thinking about this and I think it is
absolutely essential that you (not `you, Erik' but `you, someone who
wants to do this') implement the actual reader algorithm to do this:
there are no shortcuts.  In particular you have to consider
readmacros, but there are other things too.  Fortunately there is a
good description of the algorithm!

I have an implementation of RDF which I think almost works now, and it
essentially does that, with some cheats.  But it's very hairy, it
doesn't work on at least one implementation (due I think to stream
handling bugs in that implementation although I'm not sure), and it
has at least one potential bug and one actual bug.  The actual bug is
that it doesn't handle the #n# and #n= macros, because it doesn't know
how to set up the context for them - so it only works if it's called
within an outer READ (which is actually oK). Almost all the hair and
bugs are because you can't (in the standard language) get at the point
just before a token is made into an object and look at what is there.
(And no, I'm not going to post it, it's too embarrassing.)

So I'd really like it if implementations made READ-DELIMITED-LIST support
dotted forms, probably with an extra option to do so so they remain
compatible.

I'd also like the ability to intervene at the token->object stage, but
I don't have any idea what a (sub)standard way of doing that would
look like.

--tim


 
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.
Tim Bradshaw  
View profile  
 More options Sep 6 2002, 8:47 am
Newsgroups: comp.lang.lisp
From: Tim Bradshaw <t...@cley.com>
Date: 06 Sep 2002 12:39:37 +0100
Local: Fri, Sep 6 2002 7:39 am
Subject: Re: READ-DELIMITED-FORM

* Duane Rettig wrote:
> Instead of digging into the details, try looking at what you are in
> fact trying to accomplish, which is to implement READ using READ.
> Now think about recursive algorithms and termination rules...

yes, I have termination.  I don't (even in yesterday's version I
didn't) *just* use READ, I do other things and then, perhaps, call
READ.

> But you _are_ using the system's one, since you are using READ.

yes, but not directly - by the time READ has done its thing it's way
too late.  That's what the `other things' above do.

> Not confusing, just confused :-)

No, I don't think so.  I *was* confused, but I realised before
yesterday's article that you couldn't just do what I was originally
trying to do and I was trying (in a confusing way, I agree) to explain
one of the reasons why the naive technique can not work.

--tim


 
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 < Older 
« Back to Discussions « Newer topic     Older topic »