On Nov 10, 2006, at 4:32 AM, Paul Johnson wrote:

On Thu, Nov 09, 2006 at 08:29:27PM -0800, [EMAIL PROTECTED] wrote:

I might get a port of `sh` in a couple days; that should make life a
bit easier for all of us :) (and Tom Christiansen ;) )

Interesting. It should certainly save Tom a lot of work, but might also have
some real-world application.

I can attest to that. I'm developing a Unix layer for classic Mac OS called Lamp (Lamp Ain't Mac POSIX). I've been able to borrow some of the key header files from Matthias Neeracher's GUSI project (a Mac sockets implementation also used in his MacPerl port), but I don't have a full Unix libc, which makes compiling certain tools (like most shells) problematic.

So I've had to write my own. It's far from complete -- it does what I need it to, right now, but it's not going to run any configure scripts any time soon. A conforming sh (even as a Perl script) would be very useful to me (provided it's pure Perl, since I haven't implemented dlopen() yet).

I'm probably just going to translate the C line-by-line at first--a
more elegant solution can be taken care of later.

    "It is easier to port a shell than a shell script."
                --Larry Wall

It's also easier to write the shell from scratch, based on some of the scripts I've seen...

Maybe after that I can do a C-to-perl compiler ;)

How about a C compiler for Parrot?

http://www.parrotcode.org/

Josh


Reply via email to