Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: Get Involved With Pugs

by Corion (Patriarch)
on May 12, 2005 at 08:46 UTC ( [id://456294]=note: print w/replies, xml ) Need Help??


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

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.

Replies are listed 'Best First'.
Re^4: Get Involved With Pugs
by tphyahoo (Vicar) on May 12, 2005 at 08:50 UTC
    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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://456294]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-19 02:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found