Friday, June 23, 2006

 

Google Summer of Code 2006

Google Summer of Code is another interesting initiative from Google which I haven't heard about before or at least haven't mentioned it in this blog. Very interesting list of FOSS projects which Google deems important enough for the community and ideas from the authors of each respective project on various ways to improve it.

Check, for example, ideas from GNU Compiler Collection makers or from Haskell.

Labels: ,


Saturday, March 04, 2006

 

Perl-alike "open2" in Haskell

import System.Posix
import IO

-- similar to Perl open2
open2 :: String -> [String] -> IO (Fd,Fd)
open2 fileName cmdArgs = do
          (to_out,to_in) <- createPipe
          (from_out,from_in) <- createPipe
          pid <- forkProcess (do
              dupTo to_out stdInput
              dupTo from_in stdOutput
              closeFd to_in
              closeFd from_out
              closeFd to_out
              closeFd from_in
              executeFile fileName True cmdArgs Nothing)
          closeFd to_out
          closeFd from_in
          return (to_in,from_out)

Labels:


This page is powered by Blogger. Isn't yours?