Google Groups Home
Help | Sign in
Message from discussion Cat in Scheme
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
Ben Chambers  
View profile
 More options Sep 25 2007, 2:27 pm
From: Ben Chambers <bjchamb...@gmail.com>
Date: Tue, 25 Sep 2007 18:27:13 -0000
Local: Tues, Sep 25 2007 2:27 pm
Subject: Re: Cat in Scheme
I have most everything working from cat the specification.  I have all
of the level 0 and level 1 primitives working, except for some of the
ones that use while and empty.  As far as I can tell there is a
mistake in the specification of either some of the unit tests or some
of the functions.  Specifically, if the predicate for a while changes
the stack, these changes should actually affect the stack, right?  If
yes, than the empty primitive shouldn't pop the list off the stack (at
least, according to the test cases for a bunch of the things that use
whilene -- or whilene should duplicate the list before calling empty).

Can anyone confirm that this is a bug?

On Sep 25, 8:58 am, "Tom Schouten" <tom.goto10....@gmail.com> wrote:

> hi ben,

> about 'environment-ref':

> in  PLT scheme, using 'indentifier-binding', you can make the
> constant/function distinction at compile time. i think this is part of R6RS
> now too. i use this to distinguish between lexical/module/toplevel
> identifiers.

> for my global identifiers i use a separately implemented namespace so it
> won't clash with the scheme toplevel namespace. all names are resolved once
> from a hash table when they are executed using delay/force. all symbols are
> assumed to be functions.

> (it should be possible to use PLT module namespaces only, basicly you get a
> CAT module system for free then.)

> as you allude this makes it possible to expand a code list

>    (A 123 C)

> to

>    (lambda s (apply C (cons 123 (apply A s))))

>  where 'apply' is replaced by 'cons' directly if you know that the atom is a
> constant.

> my code that does this is here:

> http://darcs.goto10.org/brood/brood/rpn-tx.ss

> (http://darcs.goto10.org/brood/is the root of a darcs archive)

> it abstracts the way the global namespace is handled, and defers the real
> parsing using a 'compiler' object: i'm using it for a couple of different
> syntaxes (plain CAT, "writer monad lifted", and compositional forth macros /
> postponed forth)

> cheers
> tom


    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.

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