Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Scratchpad confusion

5 views
Skip to first unread message

Allen Short

unread,
Oct 20, 2002, 5:51:44 PM10/20/02
to perl6-i...@perl.org
The ops described in PDD 6 and docs/parrot_assembly.pod for
scratchpads appear to be subtly different from the ones actually in
core.ops. In particular, i was led astray by the docs referring to the
"newpad" op and core.ops implementing "new_pad". which is it supposed
to be? =)

I started investigating scratchpads because I'm interested in
improving the scheme compiler. I'd agree with Sean O'Rourke's comments
(http://archive.develooper.com/perl6-i...@perl.org/msg12722.html)
-- the current ops seem too limited; in particular, I dont see how one
would save a scratchpad with a function definition, or modify the
toplevel scratchpad. Looking beyond Scheme, it appears to me that
other languages would need more flexible handling of scoping as well;
Common Lisp, for example, keeps functions in a separate namespace from
other variables. Being new to Parrot hacking, could someone point me
at the rationale for making scratchpads a special case, rather than a
PMC?

Allen

Jonathan Sillito

unread,
Oct 21, 2002, 11:57:36 AM10/21/02
to Perl6-Internals
I think, I can answer a few of these questions.

> -----Original Message-----
> From: Allen Short [mailto:was...@twistedmatrix.com]
>
> The ops described in PDD 6 and docs/parrot_assembly.pod for
> scratchpads appear to be subtly different from the ones actually in
> core.ops. In particular, i was led astray by the docs referring to the
> "newpad" op and core.ops implementing "new_pad". which is it supposed
> to be? =)

Neither, Dan Sugalski owes us an update, which should be coming soon ...

> I started investigating scratchpads because I'm interested in
> improving the scheme compiler. I'd agree with Sean O'Rourke's comments
> (http://archive.develooper.com/perl6-i...@perl.org/msg12722.html)
> -- the current ops seem too limited; in particular, I dont see how one
> would save a scratchpad with a function definition, or modify the
> toplevel scratchpad. Looking beyond Scheme, it appears to me that
> other languages would need more flexible handling of scoping as well;
> Common Lisp, for example, keeps functions in a separate namespace from
> other variables. Being new to Parrot hacking, could someone point me
> at the rationale for making scratchpads a special case, rather than a
> PMC?

I am sure they will be a PMC. In fact two different patches have been
submitted to make them PMCs, one by me and a better one by Sean O'Rourke.
Sean's has not been committed yet, probably because he is waiting for a
decision on the more flexible ops by Dan.

--
Jonathan Sillito

Dan Sugalski

unread,
Oct 23, 2002, 3:39:36 PM10/23/02
to Allen Short, perl6-i...@perl.org
At 4:51 PM -0500 10/20/02, Allen Short wrote:
>The ops described in PDD 6 and docs/parrot_assembly.pod for
>scratchpads appear to be subtly different from the ones actually in
>core.ops. In particular, i was led astray by the docs referring to the
>"newpad" op and core.ops implementing "new_pad". which is it supposed
>to be? =)

The name doesn't really matter, it's the functionality that's important.

>I started investigating scratchpads because I'm interested in
>improving the scheme compiler. I'd agree with Sean O'Rourke's comments
>(http://archive.develooper.com/perl6-i...@perl.org/msg12722.html)
>-- the current ops seem too limited; in particular, I dont see how one
>would save a scratchpad with a function definition, or modify the
>toplevel scratchpad. Looking beyond Scheme, it appears to me that
>other languages would need more flexible handling of scoping as well;
>Common Lisp, for example, keeps functions in a separate namespace from
>other variables. Being new to Parrot hacking, could someone point me
>at the rationale for making scratchpads a special case, rather than a
>PMC?

There's no reason they can't be both a special case and a PMC. I'm
not sure what we want to do for those languages that keep separate
namespaces for various things, though I'm thinking we'll maintain a
single global table with a prefix character that can be filtered out
by languages that don't use it.
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

0 new messages