in reply to Re: Get Involved With Pugs
in thread Get Involved With Pugs

Thanks, Limbic~Region.

PUGS on MS Windows looks like a good place to start if you want PUGS to play with Windows and ActiveState. Monastery post Hello Perl 6. Running pugs on Windows makes me pretty optimistic as well :)

FWIW, the binary windows installer for GHC.

Secondly, GHC Contributors indicates that GHC works with windows targetting mingw and cygwin. I seem to recall a chatterbox interaction the upshot of which was that getting PUGS to install on Cygwin was less than trivial, which come to think of it is what prompted me to ask whether PUGS could be installed on a windows box. Maybe this was a red herring though and I don't even need cygwin...

I just downloaded GHC for windows and will see if I can get PUGS onto my win box today, without cygwin. If anyone else has light to shed about this, would be great :)

Replies are listed 'Best First'.
Re^3: Get Involved With Pugs
by Corion (Patriarch) on May 12, 2005 at 08:46 UTC

    The "GHC for cygwin" is a misnomer, as GHC is mostly a native Win32 application. I haven't seen which backend for code generation GHC actually uses, but I assume it is built-in. I don't know if there is a build of GHC with MSVC, but as GHC is a compiler itself, I assume that GHC is compiled with itself mostly.

    I am developing Pugs on Win32 without any problems, because the support of GHC for Win32 is really good and one can easily access the Win32 API from within GHC. There are some things that are different between Pugs/Win32 and Pugs/POSIX:

    • fork() will not happen, or it will be the ugly abomination that fork emulation is under Perl5
    • system() and built-in threading (async blocks) don't play together. This might be fixed by making GHC spawn OS threads when launching a system() command, so the rest of Pugs continues running.
    • select() on non-sockets - WaitForSingleObject cannot wait for winsock.dll objects, and the select call of winsock does not know about the other kernel objects.
      My impression is these are basically the same things that are different between Perl/Win32 and Perl/POSIX. And for the same reason...

      Is this correct, or oversimplifying?

        Most of the Pugs Win32 support comes directly from what GHC provides, because Pugs doesn't have much C code in it. If GHC doesn't provide it, it can still be done if it is just a matter of finding the correct Win32 API call. If it requires anything more, it won't be done quickly, because that means hard work. As I've been mostly concerned about supporting the stuff that I want in Pugs, like sleep(), async() and system() and %*ENV, I've worked mostly on these parts. And that these parts were not supported by GHC as transparently as one might have liked is, I think, because of the difference between POSIX 2.x systems and Win32.