On Thu, Aug 28, 2003 at 06:17:07AM -0700, Amir Karger wrote:
> Hi. Hugely newbie at Parroting, but think it's the coolest.

Good stuff. I hope it stays that with the inevitable setbacks and
annoyances that will come while gaining experience.

> - Is it not being ported because of a lack of tuits, or because it's
> extremely hard?

I think it's party because of tuits, and party because to be done "properly"
it requires a couple of big features to be added to parrot, notably

1: dynamic opcode loading
2: dynamic bytecode conversion

(This is the point where someone tells me that dynamic opcode loading now
works)

We'd need dynamic opcode loading because we don't want to have the
Z-machine specific opcodes compiled into every parrot (or every other
specialist set of opcodes)
We'd want dynamic bytecode conversion because we want parrot to be
able to directly load Z-code files, rather than having to first run
an external program to convert them.

Both these features are wanted to seamlessly run any "alien" bytecode,
such as Python's bytecode, Java bytecode or .NET bytecode.

However, I don't think that we'd need them in place to begin working
on a Z-code port. (We'd just have to arrange to link in any specialist
Z-code ops for a while, and to convert Z-code before loading it)


> - A Perl 6 Summary from last year claimed Josh Wilmes was going to work
> on it. Does anyone know if he is and, if so, how far he's gotten?

I have no idea

> - Whether or not it's extremely hard, would it be useful to have some
> of the easy parts done by a newbie who can hack assembly but not well
> enough to put into the parrot core? In that case, which would be the
> easy parts?

I've no idea. How familiar are you with Z-code? About all that I know
(and I may be wrong) is that it fits in a virtual machine with 128K
total memory, that it has continuations (which we now have), and that
the Hitch-Hiker's Guide to the Galaxy adventure game was written in it.
Is the virtual machine stack based, or register based?
(I guess from your next paragraph that it's stack based)

Do you know enough Z-code to create Z-code regression tests that
progressively exercise features of the Z-machine (along with the
expected correct output) so that any implementor (possibly yourself)
knows when they've got it right?

> - I saw that Dan wanted to create a library to handle stack-based
> languages. I don't suppose that's been done at all? If not, I could
> steal from, e.g., befunge, which would be way better than starting from
> scratch. I would offer to create the library, but I'm not really
> confident enough about my (as-yet nonexistent) pasm-writing skills to
> write a library a bunch of other people use.

I don't think you'd necessarily need to know actual PASM. I think that
the tricky part is thinking about how to map from a stack machine to
a register machine. I've no idea what academic (or other) literature
there is on this. The simplest way to run a stack based language on
parrot would be to ignore most of the registers and just use parrot's
stack. However, this isn't going to be efficient. So researching/working
out how to efficiently map stack operations to use more than a couple
of registers would be very useful for all sorts of stack based languages.
Getting started on that would probably be very helpful - you don't need
to actually write the implementation PASM if you're able to describe
what needs to a co-volunteer.

Nicholas Clark

Reply via email to