Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  GHC7.4.1 -> LLVM ->W64 (Antoine Latter)
   2. Re:  Looking for the paper that defines Arrows. (Brent Yorgey)
   3.  How to improve performace of a dfs program (xiong.hua)


----------------------------------------------------------------------

Message: 1
Date: Tue, 5 Jun 2012 07:02:42 -0500
From: Antoine Latter <[email protected]>
Subject: Re: [Haskell-beginners] GHC7.4.1 -> LLVM ->W64
To: "Alexander.Vladislav.Popov" <[email protected]>
Cc: [email protected], beginners
        <[email protected]>
Message-ID:
        <cakjsnqhmmi8owlmq-9q1+szecd7wh+1n2ac76s56ookfwsh...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

On Tue, Jun 5, 2012 at 1:49 AM, Alexander.Vladislav.Popov
<[email protected]> wrote:
> Hi Haskellers,
>
> I want to build 64-bit Windows application.
> Will 64-bit mingw and compilation via LLVM help me?
> Who will shed light on it and lead me through darkened forest of my search?
>

If you're talking about using GHC to do this you might be better off
asking on the GHC-Users list (which I've CC'd, so I guess you've
already asked them!).

I know that folks were spending time on making GHC work for Win-64,
but I don't remember if it has shipped.

Antoine



------------------------------

Message: 2
Date: Tue, 5 Jun 2012 09:03:25 -0400
From: Brent Yorgey <[email protected]>
Subject: Re: [Haskell-beginners] Looking for the paper that defines
        Arrows.
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

On Mon, Jun 04, 2012 at 04:32:15PM -0700, Michael Litchard wrote:
> I'm looking for this. Is it necessary to pay someone for the privilege
> (the only option I've discovered) ?

Go to scholar.google.com and type in the title.  At the bottom of the
result you want, you will see a link like 'All 24 versions'.  Click on
this.  Usually there are PDFs available for free from many places (as
there are in this case as well).

-Brent



------------------------------

Message: 3
Date: Tue, 5 Jun 2012 21:33:26 +0800
From: "xiong.hua" <[email protected]>
Subject: [Haskell-beginners] How to improve performace of a dfs
        program
To: <[email protected]>
Cc: [email protected]
Message-ID: <000001cd431f$caa41310$5fec3930$@com>
Content-Type: text/plain; charset="us-ascii"

hi ,all :

   I'm a learn haskell couple of days , and I want to solve some problem
[http://codeforces.com/contest/194/problem/D] with haskell , I know the
algorithm for the problem and implement it with haskell , but i jsut get TLE
on the test case . Here is my code , how i can implement it more Efficient ?

 

code : 

import Data.Bits

import Data.Int

--import Debug.Trace

 

calc :: [Int64] -> [Int64] -> Int64

calc a b = sum $ zipWith (*) a b

 

 

-- a p r

fun2op :: [Int64] -> [Int] -> Int64 -> [Int64]

--fun2op a x r |

--   trace ("fun2op " ++ show a ++ " " ++ show x ++ " " ++ show r ) False =
undefined

fun2op _ [] _ = []

fun2op a (x:xs) r = (( a !! (x-1)) + r) : (fun2op a xs r )

 

gor :: [Int64] -> [Int64] -> Int -> Int -> Int64 -> Int64

gor a k dep u ans

         | (  ( u - dep ) .&.  1 :: Int) == 0 = max ans $ calc a k

         | otherwise = ans   

 

-- a , b , p , k  , r , u , last , dep , ans

dfs :: [Int64] -> [Int64] -> [Int] -> [Int64] -> Int64 -> Int -> Int -> Int
-> Int64 -> Int64

 

dfs a b p k r u l dep ans

--    | trace ("dfs " ++ show a ++ " " ++ show l ++ " " ++  show dep ++ " "
++ show ans) False = undefined

    | dep == u = max ans $ calc a k 

    | l == 1  = df1

    | otherwise  = max (df1) ( dfs (zipWith ( xor ) a b ) b p k r u 1
(dep+1) tmpans)

    where

        pa = fun2op a p r

        tmpans = gor a k dep u ans

        df1 = dfs pa b p k r u 2 (dep + 1) tmpans

 

 

rInt64 :: String -> Int64

rInt64 = read

 

rInt :: String -> Int

rInt = read

 

main = do

    ss <- getLine

    let tmp = words ss

    let u = rInt (tmp !! 1)

    let r = rInt64 ( tmp !! 2)

    let x = map (rInt) $ words ss

    let x = map (rInt) $ words ss

    aa <- getLine

    let a = map (rInt64) $ words aa

    bb <- getLine

    let b = map (rInt64) $ words bb

    kk <- getLine

    let k = map (rInt64) $ words kk

    pp <- getLine

    let p = map (rInt) $ words pp

    print ( dfs a b p k r u 0 0 (rInt64 "-1000000000000000000"))

 

--------------

Best Regards

GTALK: ivoryxiong AT gmail.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120605/d4f6dd8a/attachment.htm>

------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 48, Issue 4
****************************************

Reply via email to